var controller = (function () {
'use strict';

var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};

function createCommonjsModule(fn, basedir, module) {
	return module = {
	  path: basedir,
	  exports: {},
	  require: function (path, base) {
      return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
    }
	}, fn(module, module.exports), module.exports;
}

function getCjsExportFromNamespace (n) {
	return n && n['default'] || n;
}

function commonjsRequire () {
	throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
}

var tslib = createCommonjsModule(function (module) {
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global global, define, System, Reflect, Promise */
var __extends;
var __assign;
var __rest;
var __decorate;
var __param;
var __metadata;
var __awaiter;
var __generator;
var __exportStar;
var __values;
var __read;
var __spread;
var __spreadArrays;
var __spreadArray;
var __await;
var __asyncGenerator;
var __asyncDelegator;
var __asyncValues;
var __makeTemplateObject;
var __importStar;
var __importDefault;
var __classPrivateFieldGet;
var __classPrivateFieldSet;
var __createBinding;
(function (factory) {
    var root = typeof commonjsGlobal === "object" ? commonjsGlobal : typeof self === "object" ? self : typeof this === "object" ? this : {};
    {
        factory(createExporter(root, createExporter(module.exports)));
    }
    function createExporter(exports, previous) {
        if (exports !== root) {
            if (typeof Object.create === "function") {
                Object.defineProperty(exports, "__esModule", { value: true });
            }
            else {
                exports.__esModule = true;
            }
        }
        return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };
    }
})
(function (exporter) {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };

    __extends = function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };

    __assign = Object.assign || function (t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
        }
        return t;
    };

    __rest = function (s, e) {
        var t = {};
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
            t[p] = s[p];
        if (s != null && typeof Object.getOwnPropertySymbols === "function")
            for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
                if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                    t[p[i]] = s[p[i]];
            }
        return t;
    };

    __decorate = function (decorators, target, key, desc) {
        var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
        if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
        else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    };

    __param = function (paramIndex, decorator) {
        return function (target, key) { decorator(target, key, paramIndex); }
    };

    __metadata = function (metadataKey, metadataValue) {
        if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
    };

    __awaiter = function (thisArg, _arguments, P, generator) {
        function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
        return new (P || (P = Promise))(function (resolve, reject) {
            function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
            function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
            function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
            step((generator = generator.apply(thisArg, _arguments || [])).next());
        });
    };

    __generator = function (thisArg, body) {
        var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
        return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
        function verb(n) { return function (v) { return step([n, v]); }; }
        function step(op) {
            if (f) throw new TypeError("Generator is already executing.");
            while (_) try {
                if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
                if (y = 0, t) op = [op[0] & 2, t.value];
                switch (op[0]) {
                    case 0: case 1: t = op; break;
                    case 4: _.label++; return { value: op[1], done: false };
                    case 5: _.label++; y = op[1]; op = [0]; continue;
                    case 7: op = _.ops.pop(); _.trys.pop(); continue;
                    default:
                        if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                        if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                        if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                        if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                        if (t[2]) _.ops.pop();
                        _.trys.pop(); continue;
                }
                op = body.call(thisArg, _);
            } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
            if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
        }
    };

    __exportStar = function(m, o) {
        for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
    };

    __createBinding = Object.create ? (function(o, m, k, k2) {
        if (k2 === undefined) k2 = k;
        Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
    }) : (function(o, m, k, k2) {
        if (k2 === undefined) k2 = k;
        o[k2] = m[k];
    });

    __values = function (o) {
        var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
        if (m) return m.call(o);
        if (o && typeof o.length === "number") return {
            next: function () {
                if (o && i >= o.length) o = void 0;
                return { value: o && o[i++], done: !o };
            }
        };
        throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
    };

    __read = function (o, n) {
        var m = typeof Symbol === "function" && o[Symbol.iterator];
        if (!m) return o;
        var i = m.call(o), r, ar = [], e;
        try {
            while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
        }
        catch (error) { e = { error: error }; }
        finally {
            try {
                if (r && !r.done && (m = i["return"])) m.call(i);
            }
            finally { if (e) throw e.error; }
        }
        return ar;
    };

    /** @deprecated */
    __spread = function () {
        for (var ar = [], i = 0; i < arguments.length; i++)
            ar = ar.concat(__read(arguments[i]));
        return ar;
    };

    /** @deprecated */
    __spreadArrays = function () {
        for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
        for (var r = Array(s), k = 0, i = 0; i < il; i++)
            for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
                r[k] = a[j];
        return r;
    };

    __spreadArray = function (to, from) {
        for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
            to[j] = from[i];
        return to;
    };

    __await = function (v) {
        return this instanceof __await ? (this.v = v, this) : new __await(v);
    };

    __asyncGenerator = function (thisArg, _arguments, generator) {
        if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
        var g = generator.apply(thisArg, _arguments || []), i, q = [];
        return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
        function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
        function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
        function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);  }
        function fulfill(value) { resume("next", value); }
        function reject(value) { resume("throw", value); }
        function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
    };

    __asyncDelegator = function (o) {
        var i, p;
        return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
        function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
    };

    __asyncValues = function (o) {
        if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
        var m = o[Symbol.asyncIterator], i;
        return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
        function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
        function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
    };

    __makeTemplateObject = function (cooked, raw) {
        if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
        return cooked;
    };

    var __setModuleDefault = Object.create ? (function(o, v) {
        Object.defineProperty(o, "default", { enumerable: true, value: v });
    }) : function(o, v) {
        o["default"] = v;
    };

    __importStar = function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
        __setModuleDefault(result, mod);
        return result;
    };

    __importDefault = function (mod) {
        return (mod && mod.__esModule) ? mod : { "default": mod };
    };

    __classPrivateFieldGet = function (receiver, state, kind, f) {
        if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
        if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
        return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
    };

    __classPrivateFieldSet = function (receiver, state, value, kind, f) {
        if (kind === "m") throw new TypeError("Private method is not writable");
        if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
        if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
        return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
    };

    exporter("__extends", __extends);
    exporter("__assign", __assign);
    exporter("__rest", __rest);
    exporter("__decorate", __decorate);
    exporter("__param", __param);
    exporter("__metadata", __metadata);
    exporter("__awaiter", __awaiter);
    exporter("__generator", __generator);
    exporter("__exportStar", __exportStar);
    exporter("__createBinding", __createBinding);
    exporter("__values", __values);
    exporter("__read", __read);
    exporter("__spread", __spread);
    exporter("__spreadArrays", __spreadArrays);
    exporter("__spreadArray", __spreadArray);
    exporter("__await", __await);
    exporter("__asyncGenerator", __asyncGenerator);
    exporter("__asyncDelegator", __asyncDelegator);
    exporter("__asyncValues", __asyncValues);
    exporter("__makeTemplateObject", __makeTemplateObject);
    exporter("__importStar", __importStar);
    exporter("__importDefault", __importDefault);
    exporter("__classPrivateFieldGet", __classPrivateFieldGet);
    exporter("__classPrivateFieldSet", __classPrivateFieldSet);
});
});

var perfetto_version = createCommonjsModule(function (module, exports) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.SCM_REVISION = exports.VERSION = void 0;
exports.VERSION = "v30.0-8d760d3b2";
exports.SCM_REVISION = "8d760d3b2a25abefae6fd63be3a095ae5bfb8d59";

});

var logging = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.reportError = exports.setErrorHandler = exports.assertFalse = exports.assertTrue = exports.assertExists = void 0;

let errorHandler = (_) => { };
function assertExists(value) {
    if (value === null || value === undefined) {
        throw new Error('Value doesn\'t exist');
    }
    return value;
}
exports.assertExists = assertExists;
function assertTrue(value, optMsg) {
    if (!value) {
        throw new Error(optMsg !== null && optMsg !== void 0 ? optMsg : 'Failed assertion');
    }
}
exports.assertTrue = assertTrue;
function assertFalse(value, optMsg) {
    assertTrue(!value, optMsg);
}
exports.assertFalse = assertFalse;
function setErrorHandler(handler) {
    errorHandler = handler;
}
exports.setErrorHandler = setErrorHandler;
function reportError(err) {
    let errLog = '';
    let errorObj = undefined;
    if (err instanceof ErrorEvent) {
        errLog = err.message;
        errorObj = err.error;
    }
    else if (err instanceof PromiseRejectionEvent) {
        errLog = `${err.reason}`;
        errorObj = err.reason;
    }
    else {
        errLog = `${err}`;
    }
    if (errorObj !== undefined && errorObj !== null) {
        const errStack = errorObj.stack;
        errLog += '\n';
        errLog += errStack !== undefined ? errStack : JSON.stringify(errorObj);
    }
    errLog += '\n\n';
    errLog += `${perfetto_version.VERSION} ${perfetto_version.SCM_REVISION}\n`;
    errLog += `UA: ${navigator.userAgent}\n`;
    console.error(errLog, err);
    errorHandler(errLog);
}
exports.reportError = reportError;

});

var registry = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Registry = void 0;
class Registry {
    constructor(key) {
        this.registry = new Map();
        this.key = key;
    }
    static kindRegistry() {
        return new Registry((t) => t.kind);
    }
    register(registrant) {
        const kind = this.key(registrant);
        if (this.registry.has(kind)) {
            throw new Error(`Registrant ${kind} already exists in the registry`);
        }
        this.registry.set(kind, registrant);
    }
    has(kind) {
        return this.registry.has(kind);
    }
    get(kind) {
        const registrant = this.registry.get(kind);
        if (registrant === undefined) {
            throw new Error(`${kind} has not been registered.`);
        }
        return registrant;
    }
    // Support iteration: for (const foo of fooRegistry.values()) { ... }
    *values() {
        yield* this.registry.values();
    }
    unregisterAllForTesting() {
        this.registry.clear();
    }
}
exports.Registry = Registry;

});

var time = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.TimeSpan = exports.currentDateHourAndMinute = exports.timeToCode = exports.formatTimestamp = exports.toNs = exports.toNsCeil = exports.toNsFloor = exports.fromNs = exports.timeToString = void 0;

const EPSILON = 0.0000000001;
// TODO(hjd): Combine with timeToCode.
function timeToString(sec) {
    const units = ['s', 'ms', 'us', 'ns'];
    const sign = Math.sign(sec);
    let n = Math.abs(sec);
    let u = 0;
    while (n < 1 && n !== 0 && u < units.length - 1) {
        n *= 1000;
        u++;
    }
    return `${sign < 0 ? '-' : ''}${Math.round(n * 10) / 10} ${units[u]}`;
}
exports.timeToString = timeToString;
function fromNs(ns) {
    return ns / 1e9;
}
exports.fromNs = fromNs;
function toNsFloor(seconds) {
    return Math.floor(seconds * 1e9);
}
exports.toNsFloor = toNsFloor;
function toNsCeil(seconds) {
    return Math.ceil(seconds * 1e9);
}
exports.toNsCeil = toNsCeil;
function toNs(seconds) {
    return Math.round(seconds * 1e9);
}
exports.toNs = toNs;
// 1000000023ns -> "1.000 000 023"
function formatTimestamp(sec) {
    const parts = sec.toFixed(9).split('.');
    parts[1] = parts[1].replace(/\B(?=(\d{3})+(?!\d))/g, ' ');
    return parts.join('.');
}
exports.formatTimestamp = formatTimestamp;
// TODO(hjd): Rename to formatTimestampWithUnits
// 1000000023ns -> "1s 23ns"
function timeToCode(sec) {
    let result = '';
    let ns = Math.round(sec * 1e9);
    if (ns < 1)
        return '0s';
    const unitAndValue = [
        ['m', 60000000000],
        ['s', 1000000000],
        ['ms', 1000000],
        ['us', 1000],
        ['ns', 1],
    ];
    unitAndValue.forEach((pair) => {
        const unit = pair[0];
        const val = pair[1];
        if (ns >= val) {
            const i = Math.floor(ns / val);
            ns -= i * val;
            result += i.toLocaleString() + unit + ' ';
        }
    });
    return result.slice(0, -1);
}
exports.timeToCode = timeToCode;
function currentDateHourAndMinute() {
    const date = new Date();
    return `${date.toISOString().substr(0, 10)}-${date.getHours()}-${date.getMinutes()}`;
}
exports.currentDateHourAndMinute = currentDateHourAndMinute;
class TimeSpan {
    constructor(start, end) {
        (0, logging.assertTrue)(start <= end);
        this.start = start;
        this.end = end;
    }
    clone() {
        return new TimeSpan(this.start, this.end);
    }
    equals(other) {
        return Math.abs(this.start - other.start) < EPSILON &&
            Math.abs(this.end - other.end) < EPSILON;
    }
    get duration() {
        return this.end - this.start;
    }
    isInBounds(sec) {
        return this.start <= sec && sec <= this.end;
    }
    add(sec) {
        return new TimeSpan(this.start + sec, this.end + sec);
    }
    contains(other) {
        return this.start <= other.start && other.end <= this.end;
    }
}
exports.TimeSpan = TimeSpan;

});

var track_data = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.LIMIT = void 0;
// TODO(hjd): Refactor into method on TrackController
exports.LIMIT = 10000;

});

var conversion_jobs = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConversionJobStatus = void 0;
(function (ConversionJobStatus) {
    ConversionJobStatus["InProgress"] = "InProgress";
    ConversionJobStatus["NotRunning"] = "NotRunning";
})(exports.ConversionJobStatus || (exports.ConversionJobStatus = {}));

});

var validators = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.arrayOf = exports.oneOf = exports.record = exports.bool = exports.num = exports.requiredStr = exports.str = exports.runValidator = exports.ValidationError = void 0;
// Helper function to flatten array of path chunks into a single string
// Example: ["config", "androidLogBuffers", "1"] is mapped to
// "config.androidLogBuffers[1]".
function renderPath(path) {
    let result = '';
    for (let i = 0; i < path.length; i++) {
        if (i > 0 && !path[i].startsWith('[')) {
            result += '.';
        }
        result += path[i];
    }
    return result;
}
class ValidationError extends Error {
}
exports.ValidationError = ValidationError;
// Abstract class for validating simple values, such as strings and booleans.
// Allows to avoid repetition of most of the code related to validation of
// these.
class PrimitiveValidator {
    constructor(defaultValue, required) {
        this.defaultValue = defaultValue;
        this.required = required;
    }
    validate(input, context) {
        if (this.predicate(input)) {
            return input;
        }
        if (this.required) {
            throw new ValidationError(renderPath(context.path));
        }
        if (input !== undefined) {
            // The value is defined, but does not conform to the expected type;
            // proceed with returning the default value but report the key.
            context.invalidKeys.push(renderPath(context.path));
        }
        return this.defaultValue;
    }
}
class StringValidator extends PrimitiveValidator {
    predicate(input) {
        return typeof input === 'string';
    }
}
class NumberValidator extends PrimitiveValidator {
    predicate(input) {
        return typeof input === 'number';
    }
}
class BooleanValidator extends PrimitiveValidator {
    predicate(input) {
        return typeof input === 'boolean';
    }
}
// Combinator for validators: takes a record of validators, and returns a
// validator for a record where record's fields passed to validator with the
// same name.
//
// Generic parameter T is instantiated to type of record of validators, and
// should be provided implicitly by type inference due to verbosity of its
// instantiations.
class RecordValidator {
    constructor(validators) {
        this.validators = validators;
    }
    validate(input, context) {
        // If value is missing or of incorrect type, empty record is still processed
        // in the loop below to initialize default fields of the nested object.
        let o = {};
        if (typeof input === 'object' && input !== null) {
            o = input;
        }
        else if (input !== undefined) {
            context.invalidKeys.push(renderPath(context.path));
        }
        const result = {};
        // Separate declaration is required to avoid assigning `string` type to `k`.
        for (const k in this.validators) {
            if (this.validators.hasOwnProperty(k)) {
                context.path.push(k);
                const validator = this.validators[k];
                // Accessing value of `k` of `o` is safe because `undefined` values are
                // considered to indicate a missing value and handled appropriately by
                // every provided validator.
                const valid = validator.validate(o[k], context);
                result[k] = valid;
                context.path.pop();
            }
        }
        // Check if passed object has any extra keys to be reported as such.
        for (const key of Object.keys(o)) {
            if (!this.validators.hasOwnProperty(key)) {
                context.path.push(key);
                context.extraKeys.push(renderPath(context.path));
                context.path.pop();
            }
        }
        return result;
    }
}
// Validator checking whether a value is one of preset values. Used in order to
// provide easy validation for union of literal types.
class OneOfValidator {
    constructor(validValues, defaultValue) {
        this.defaultValue = defaultValue;
        this.validValues = validValues;
    }
    validate(input, context) {
        if (this.validValues.includes(input)) {
            return input;
        }
        else if (input !== undefined) {
            context.invalidKeys.push(renderPath(context.path));
        }
        return this.defaultValue;
    }
}
// Validator for an array of elements, applying the same element validator for
// each element of an array. Uses empty array as a default value.
class ArrayValidator {
    constructor(elementValidator) {
        this.elementValidator = elementValidator;
    }
    validate(input, context) {
        const result = [];
        if (Array.isArray(input)) {
            for (let i = 0; i < input.length; i++) {
                context.path.push(`[${i}]`);
                result.push(this.elementValidator.validate(input[i], context));
                context.path.pop();
            }
        }
        else if (input !== undefined) {
            context.invalidKeys.push(renderPath(context.path));
        }
        return result;
    }
}
// Wrapper for running a validator initializing the context.
function runValidator(validator, input) {
    const context = {
        path: [],
        invalidKeys: [],
        extraKeys: [],
    };
    const result = validator.validate(input, context);
    return {
        result,
        invalidKeys: context.invalidKeys,
        extraKeys: context.extraKeys,
    };
}
exports.runValidator = runValidator;
// Shorthands for the validator classes above enabling concise notation.
function str(defaultValue = '') {
    return new StringValidator(defaultValue, false);
}
exports.str = str;
exports.requiredStr = new StringValidator('', true);
function num(defaultValue = 0) {
    return new NumberValidator(defaultValue, false);
}
exports.num = num;
function bool(defaultValue = false) {
    return new BooleanValidator(defaultValue, false);
}
exports.bool = bool;
function record(validators) {
    return new RecordValidator(validators);
}
exports.record = record;
function oneOf(values, defaultValue) {
    return new OneOfValidator(values, defaultValue);
}
exports.oneOf = oneOf;
function arrayOf(elementValidator) {
    return new ArrayValidator(elementValidator);
}
exports.arrayOf = arrayOf;

});

var record_config_types = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.createEmptyRecordConfig = exports.namedRecordConfigValidator = exports.recordConfigValidator = void 0;

const recordModes = ['STOP_WHEN_FULL', 'RING_BUFFER', 'LONG_TRACE'];
exports.recordConfigValidator = (0, validators.record)({
    mode: (0, validators.oneOf)(recordModes, 'STOP_WHEN_FULL'),
    durationMs: (0, validators.num)(10000.0),
    maxFileSizeMb: (0, validators.num)(100),
    fileWritePeriodMs: (0, validators.num)(2500),
    bufferSizeMb: (0, validators.num)(64.0),
    cpuSched: (0, validators.bool)(),
    cpuFreq: (0, validators.bool)(),
    cpuSyscall: (0, validators.bool)(),
    gpuFreq: (0, validators.bool)(),
    gpuMemTotal: (0, validators.bool)(),
    ftrace: (0, validators.bool)(),
    atrace: (0, validators.bool)(),
    ftraceEvents: (0, validators.arrayOf)((0, validators.str)()),
    ftraceExtraEvents: (0, validators.str)(),
    atraceCats: (0, validators.arrayOf)((0, validators.str)()),
    allAtraceApps: (0, validators.bool)(true),
    atraceApps: (0, validators.str)(),
    ftraceBufferSizeKb: (0, validators.num)(0),
    ftraceDrainPeriodMs: (0, validators.num)(0),
    androidLogs: (0, validators.bool)(),
    androidLogBuffers: (0, validators.arrayOf)((0, validators.str)()),
    androidFrameTimeline: (0, validators.bool)(),
    androidGameInterventionList: (0, validators.bool)(),
    cpuCoarse: (0, validators.bool)(),
    cpuCoarsePollMs: (0, validators.num)(1000),
    batteryDrain: (0, validators.bool)(),
    batteryDrainPollMs: (0, validators.num)(1000),
    boardSensors: (0, validators.bool)(),
    memHiFreq: (0, validators.bool)(),
    meminfo: (0, validators.bool)(),
    meminfoPeriodMs: (0, validators.num)(1000),
    meminfoCounters: (0, validators.arrayOf)((0, validators.str)()),
    vmstat: (0, validators.bool)(),
    vmstatPeriodMs: (0, validators.num)(1000),
    vmstatCounters: (0, validators.arrayOf)((0, validators.str)()),
    heapProfiling: (0, validators.bool)(),
    hpSamplingIntervalBytes: (0, validators.num)(4096),
    hpProcesses: (0, validators.str)(),
    hpContinuousDumpsPhase: (0, validators.num)(),
    hpContinuousDumpsInterval: (0, validators.num)(),
    hpSharedMemoryBuffer: (0, validators.num)(8 * 1048576),
    hpBlockClient: (0, validators.bool)(true),
    hpAllHeaps: (0, validators.bool)(),
    javaHeapDump: (0, validators.bool)(),
    jpProcesses: (0, validators.str)(),
    jpContinuousDumpsPhase: (0, validators.num)(),
    jpContinuousDumpsInterval: (0, validators.num)(),
    memLmk: (0, validators.bool)(),
    procStats: (0, validators.bool)(),
    procStatsPeriodMs: (0, validators.num)(1000),
    chromeCategoriesSelected: (0, validators.arrayOf)((0, validators.str)()),
    chromeHighOverheadCategoriesSelected: (0, validators.arrayOf)((0, validators.str)()),
    chromePrivacyFiltering: (0, validators.bool)(),
    chromeLogs: (0, validators.bool)(),
    taskScheduling: (0, validators.bool)(),
    ipcFlows: (0, validators.bool)(),
    jsExecution: (0, validators.bool)(),
    webContentRendering: (0, validators.bool)(),
    uiRendering: (0, validators.bool)(),
    inputEvents: (0, validators.bool)(),
    navigationAndLoading: (0, validators.bool)(),
    symbolizeKsyms: (0, validators.bool)(),
});
exports.namedRecordConfigValidator = (0, validators.record)({ title: validators.requiredStr, key: validators.requiredStr, config: exports.recordConfigValidator });
function createEmptyRecordConfig() {
    return (0, validators.runValidator)(exports.recordConfigValidator, {}).result;
}
exports.createEmptyRecordConfig = createEmptyRecordConfig;

});

var state = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.getContainingTrackId = exports.getBuiltinChromeCategoryList = exports.getDefaultRecordingTargets = exports.hasActiveProbes = exports.isAdbTarget = exports.isLinuxTarget = exports.isCrOSTarget = exports.isChromeTarget = exports.isAndroidTarget = exports.isAndroidP = exports.defaultTraceTime = exports.ProfileType = exports.InThreadTrackSortKey = exports.PrimaryTrackSortKey = exports.SCROLLING_TRACK_GROUP = exports.STATE_VERSION = exports.MAX_TIME = void 0;
exports.MAX_TIME = 180;
// 3: TrackKindPriority and related sorting changes.
// 5: Move a large number of items off frontendLocalState and onto state.
// 6: Common PivotTableConfig and pivot table specific PivotTableState.
// 7: Split Chrome categories in two and add 'symbolize ksyms' flag.
// 8: Rename several variables
// "[...]HeapProfileFlamegraph[...]" -> "[...]Flamegraph[...]".
// 9: Add a field to track last loaded recording profile name
// 10: Change last loaded profile tracking type to accommodate auto-save.
// 11: Rename updateChromeCategories to fetchChromeCategories.
// 12: Add a field to cache mapping from UI track ID to trace track ID in order
//     to speed up flow arrows rendering.
// 13: FlamegraphState changed to support area selection.
// 14: Changed the type of uiTrackIdByTraceTrackId from `Map` to an object with
// typed key/value because a `Map` does not preserve type during
// serialisation+deserialisation.
// 15: Added state for Pivot Table V2
// 16: Added boolean tracking if the flamegraph modal was dismissed
// 17:
// - add currentEngineId to track the id of the current engine
// - remove nextNoteId, nextAreaId and use nextId as a unique counter for all
//   indexing except the indexing of the engines
// 18: areaSelection change see b/235869542
// 19: Added visualisedArgs state.
// 20: Refactored thread sorting order.
// 21: Updated perf sample selection to include a ts range instead of single ts
// 22: Add log selection kind.
exports.STATE_VERSION = 22;
exports.SCROLLING_TRACK_GROUP = 'ScrollingTracks';
(function (PrimaryTrackSortKey) {
    PrimaryTrackSortKey[PrimaryTrackSortKey["DEBUG_SLICE_TRACK"] = 0] = "DEBUG_SLICE_TRACK";
    PrimaryTrackSortKey[PrimaryTrackSortKey["NULL_TRACK"] = 1] = "NULL_TRACK";
    PrimaryTrackSortKey[PrimaryTrackSortKey["PROCESS_SCHEDULING_TRACK"] = 2] = "PROCESS_SCHEDULING_TRACK";
    PrimaryTrackSortKey[PrimaryTrackSortKey["PROCESS_SUMMARY_TRACK"] = 3] = "PROCESS_SUMMARY_TRACK";
    PrimaryTrackSortKey[PrimaryTrackSortKey["EXPECTED_FRAMES_SLICE_TRACK"] = 4] = "EXPECTED_FRAMES_SLICE_TRACK";
    PrimaryTrackSortKey[PrimaryTrackSortKey["ACTUAL_FRAMES_SLICE_TRACK"] = 5] = "ACTUAL_FRAMES_SLICE_TRACK";
    PrimaryTrackSortKey[PrimaryTrackSortKey["PERF_SAMPLES_PROFILE_TRACK"] = 6] = "PERF_SAMPLES_PROFILE_TRACK";
    PrimaryTrackSortKey[PrimaryTrackSortKey["HEAP_PROFILE_TRACK"] = 7] = "HEAP_PROFILE_TRACK";
    PrimaryTrackSortKey[PrimaryTrackSortKey["MAIN_THREAD"] = 8] = "MAIN_THREAD";
    PrimaryTrackSortKey[PrimaryTrackSortKey["RENDER_THREAD"] = 9] = "RENDER_THREAD";
    PrimaryTrackSortKey[PrimaryTrackSortKey["GPU_COMPLETION_THREAD"] = 10] = "GPU_COMPLETION_THREAD";
    PrimaryTrackSortKey[PrimaryTrackSortKey["CHROME_IO_THREAD"] = 11] = "CHROME_IO_THREAD";
    PrimaryTrackSortKey[PrimaryTrackSortKey["CHROME_COMPOSITOR_THREAD"] = 12] = "CHROME_COMPOSITOR_THREAD";
    PrimaryTrackSortKey[PrimaryTrackSortKey["ORDINARY_THREAD"] = 13] = "ORDINARY_THREAD";
    PrimaryTrackSortKey[PrimaryTrackSortKey["COUNTER_TRACK"] = 14] = "COUNTER_TRACK";
    PrimaryTrackSortKey[PrimaryTrackSortKey["ASYNC_SLICE_TRACK"] = 15] = "ASYNC_SLICE_TRACK";
    PrimaryTrackSortKey[PrimaryTrackSortKey["ORDINARY_TRACK"] = 16] = "ORDINARY_TRACK";
})(exports.PrimaryTrackSortKey || (exports.PrimaryTrackSortKey = {}));
(function (InThreadTrackSortKey) {
    InThreadTrackSortKey[InThreadTrackSortKey["THREAD_COUNTER_TRACK"] = 0] = "THREAD_COUNTER_TRACK";
    InThreadTrackSortKey[InThreadTrackSortKey["THREAD_SCHEDULING_STATE_TRACK"] = 1] = "THREAD_SCHEDULING_STATE_TRACK";
    InThreadTrackSortKey[InThreadTrackSortKey["CPU_STACK_SAMPLES_TRACK"] = 2] = "CPU_STACK_SAMPLES_TRACK";
    InThreadTrackSortKey[InThreadTrackSortKey["VISUALISED_ARGS_TRACK"] = 3] = "VISUALISED_ARGS_TRACK";
    InThreadTrackSortKey[InThreadTrackSortKey["ORDINARY"] = 4] = "ORDINARY";
    InThreadTrackSortKey[InThreadTrackSortKey["DEFAULT_TRACK"] = 5] = "DEFAULT_TRACK";
})(exports.InThreadTrackSortKey || (exports.InThreadTrackSortKey = {}));
(function (ProfileType) {
    ProfileType["HEAP_PROFILE"] = "heap_profile";
    ProfileType["NATIVE_HEAP_PROFILE"] = "heap_profile:libc.malloc";
    ProfileType["JAVA_HEAP_PROFILE"] = "heap_profile:com.android.art";
    ProfileType["JAVA_HEAP_GRAPH"] = "graph";
    ProfileType["PERF_SAMPLE"] = "perf";
})(exports.ProfileType || (exports.ProfileType = {}));
exports.defaultTraceTime = {
    startSec: 0,
    endSec: 10,
};
function isAndroidP(target) {
    return target.os === 'P';
}
exports.isAndroidP = isAndroidP;
function isAndroidTarget(target) {
    return ['Q', 'P', 'O'].includes(target.os);
}
exports.isAndroidTarget = isAndroidTarget;
function isChromeTarget(target) {
    return ['C', 'CrOS'].includes(target.os);
}
exports.isChromeTarget = isChromeTarget;
function isCrOSTarget(target) {
    return target.os === 'CrOS';
}
exports.isCrOSTarget = isCrOSTarget;
function isLinuxTarget(target) {
    return target.os === 'L';
}
exports.isLinuxTarget = isLinuxTarget;
function isAdbTarget(target) {
    return !!target.serial;
}
exports.isAdbTarget = isAdbTarget;
function hasActiveProbes(config) {
    const fieldsWithEmptyResult = new Set(['hpBlockClient', 'allAtraceApps', 'chromePrivacyFiltering']);
    let key;
    for (key in config) {
        if (typeof (config[key]) === 'boolean' && config[key] === true &&
            !fieldsWithEmptyResult.has(key)) {
            return true;
        }
    }
    if (config.chromeCategoriesSelected.length > 0) {
        return true;
    }
    return config.chromeHighOverheadCategoriesSelected.length > 0;
}
exports.hasActiveProbes = hasActiveProbes;
function getDefaultRecordingTargets() {
    return [
        { os: 'Q', name: 'Android Q+' },
        { os: 'P', name: 'Android P' },
        { os: 'O', name: 'Android O-' },
        { os: 'C', name: 'Chrome' },
        { os: 'CrOS', name: 'Chrome OS (system trace)' },
        { os: 'L', name: 'Linux desktop' },
    ];
}
exports.getDefaultRecordingTargets = getDefaultRecordingTargets;
function getBuiltinChromeCategoryList() {
    // List of static Chrome categories, last updated at 2022-10-18 from HEAD of
    // Chromium's //base/trace_event/builtin_categories.h.
    return [
        'accessibility',
        'AccountFetcherService',
        'android_webview',
        'aogh',
        'audio',
        'base',
        'benchmark',
        'blink',
        'blink.animations',
        'blink.bindings',
        'blink.console',
        'blink.net',
        'blink.resource',
        'blink.user_timing',
        'blink.worker',
        'blink_gc',
        'blink_style',
        'Blob',
        'browser',
        'browsing_data',
        'CacheStorage',
        'Calculators',
        'CameraStream',
        'cppgc',
        'camera',
        'cast_app',
        'cast_perf_test',
        'cast.mdns',
        'cast.mdns.socket',
        'cast.stream',
        'catan_investigation',
        'cc',
        'cc.debug',
        'cdp.perf',
        'chromeos',
        'cma',
        'compositor',
        'content',
        'content_capture',
        'delegated_ink_trails',
        'device',
        'devtools',
        'devtools.contrast',
        'devtools.timeline',
        'disk_cache',
        'download',
        'download_service',
        'drm',
        'drmcursor',
        'dwrite',
        'DXVA_Decoding',
        'evdev',
        'event',
        'exo',
        'extensions',
        'explore_sites',
        'FileSystem',
        'file_system_provider',
        'fledge',
        'fonts',
        'GAMEPAD',
        'gpu',
        'gpu.angle',
        'gpu.capture',
        'headless',
        'history',
        'hwoverlays',
        'identity',
        'ime',
        'IndexedDB',
        'input',
        'io',
        'ipc',
        'Java',
        'jni',
        'jpeg',
        'latency',
        'latencyInfo',
        'leveldb',
        'loading',
        'log',
        'login',
        'media',
        'media_router',
        'memory',
        'midi',
        'mojom',
        'mus',
        'native',
        'navigation',
        'net',
        'netlog',
        'offline_pages',
        'omnibox',
        'oobe',
        'ozone',
        'partition_alloc',
        'passwords',
        'p2p',
        'page-serialization',
        'paint_preview',
        'pepper',
        'PlatformMalloc',
        'power',
        'ppapi',
        'ppapi_proxy',
        'print',
        'raf_investigation',
        'rail',
        'renderer',
        'renderer_host',
        'renderer.scheduler',
        'RLZ',
        'ServiceWorker',
        'SiteEngagement',
        'safe_browsing',
        'scheduler',
        'screenlock_monitor',
        'segmentation_platform',
        'sequence_manager',
        'service_manager',
        'sharing',
        'shell',
        'shortcut_viewer',
        'shutdown',
        'skia',
        'sql',
        'stadia_media',
        'stadia_rtc',
        'startup',
        'sync',
        'system_apps',
        'test_gpu',
        'thread_pool',
        'toplevel',
        'toplevel.flow',
        'ui',
        'v8',
        'v8.execute',
        'v8.wasm',
        'ValueStoreFrontend::Backend',
        'views',
        'views.frame',
        'viz',
        'vk',
        'wayland',
        'webaudio',
        'weblayer',
        'WebCore',
        'webrtc',
        'xr',
        'disabled-by-default-android_view_hierarchy',
        'disabled-by-default-animation-worklet',
        'disabled-by-default-audio',
        'disabled-by-default-audio-worklet',
        'disabled-by-default-base',
        'disabled-by-default-blink.debug',
        'disabled-by-default-blink.debug.display_lock',
        'disabled-by-default-blink.debug.layout',
        'disabled-by-default-blink.debug.layout.trees',
        'disabled-by-default-blink.feature_usage',
        'disabled-by-default-blink.image_decoding',
        'disabled-by-default-blink.invalidation',
        'disabled-by-default-identifiability',
        'disabled-by-default-cc',
        'disabled-by-default-cc.debug',
        'disabled-by-default-cc.debug.cdp-perf',
        'disabled-by-default-cc.debug.display_items',
        'disabled-by-default-cc.debug.picture',
        'disabled-by-default-cc.debug.scheduler',
        'disabled-by-default-cc.debug.scheduler.frames',
        'disabled-by-default-cc.debug.scheduler.now',
        'disabled-by-default-content.verbose',
        'disabled-by-default-cpu_profiler',
        'disabled-by-default-cppgc',
        'disabled-by-default-cpu_profiler.debug',
        'disabled-by-default-devtools.screenshot',
        'disabled-by-default-devtools.timeline',
        'disabled-by-default-devtools.timeline.frame',
        'disabled-by-default-devtools.timeline.inputs',
        'disabled-by-default-devtools.timeline.invalidationTracking',
        'disabled-by-default-devtools.timeline.layers',
        'disabled-by-default-devtools.timeline.picture',
        'disabled-by-default-devtools.timeline.stack',
        'disabled-by-default-file',
        'disabled-by-default-fonts',
        'disabled-by-default-gpu_cmd_queue',
        'disabled-by-default-gpu.dawn',
        'disabled-by-default-gpu.debug',
        'disabled-by-default-gpu.decoder',
        'disabled-by-default-gpu.device',
        'disabled-by-default-gpu.service',
        'disabled-by-default-gpu.vulkan.vma',
        'disabled-by-default-histogram_samples',
        'disabled-by-default-java-heap-profiler',
        'disabled-by-default-layer-element',
        'disabled-by-default-layout_shift.debug',
        'disabled-by-default-lifecycles',
        'disabled-by-default-loading',
        'disabled-by-default-mediastream',
        'disabled-by-default-memory-infra',
        'disabled-by-default-memory-infra.v8.code_stats',
        'disabled-by-default-mojom',
        'disabled-by-default-net',
        'disabled-by-default-network',
        'disabled-by-default-paint-worklet',
        'disabled-by-default-power',
        'disabled-by-default-renderer.scheduler',
        'disabled-by-default-renderer.scheduler.debug',
        'disabled-by-default-sequence_manager',
        'disabled-by-default-sequence_manager.debug',
        'disabled-by-default-sequence_manager.verbose_snapshots',
        'disabled-by-default-skia',
        'disabled-by-default-skia.gpu',
        'disabled-by-default-skia.gpu.cache',
        'disabled-by-default-skia.shaders',
        'disabled-by-default-SyncFileSystem',
        'disabled-by-default-system_stats',
        'disabled-by-default-thread_pool_diagnostics',
        'disabled-by-default-toplevel.ipc',
        'disabled-by-default-user_action_samples',
        'disabled-by-default-v8.compile',
        'disabled-by-default-v8.cpu_profiler',
        'disabled-by-default-v8.gc',
        'disabled-by-default-v8.gc_stats',
        'disabled-by-default-v8.ic_stats',
        'disabled-by-default-v8.inspector',
        'disabled-by-default-v8.runtime',
        'disabled-by-default-v8.runtime_stats',
        'disabled-by-default-v8.runtime_stats_sampling',
        'disabled-by-default-v8.stack_trace',
        'disabled-by-default-v8.turbofan',
        'disabled-by-default-v8.wasm.detailed',
        'disabled-by-default-v8.wasm.turbofan',
        'disabled-by-default-video_and_image_capture',
        'disabled-by-default-viz.gpu_composite_time',
        'disabled-by-default-viz.debug.overlay_planes',
        'disabled-by-default-viz.hit_testing_flow',
        'disabled-by-default-viz.overdraw',
        'disabled-by-default-viz.quads',
        'disabled-by-default-viz.surface_id_flow',
        'disabled-by-default-viz.surface_lifetime',
        'disabled-by-default-viz.triangles',
        'disabled-by-default-webaudio.audionode',
        'disabled-by-default-webrtc',
        'disabled-by-default-worker.scheduler',
        'disabled-by-default-xr.debug',
    ];
}
exports.getBuiltinChromeCategoryList = getBuiltinChromeCategoryList;
function getContainingTrackId(state, trackId) {
    const track = state.tracks[trackId];
    if (!track) {
        return null;
    }
    const parentId = track.trackGroup;
    if (!parentId) {
        return null;
    }
    return parentId;
}
exports.getContainingTrackId = getContainingTrackId;

});

var record_config = createCommonjsModule(function (module, exports) {
// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.recordTargetStore = exports.RecordTargetStore = exports.autosaveConfigStore = exports.AutosaveConfigStore = exports.recordConfigStore = exports.RecordConfigStore = void 0;



const LOCAL_STORAGE_RECORD_CONFIGS_KEY = 'recordConfigs';
const LOCAL_STORAGE_AUTOSAVE_CONFIG_KEY = 'autosaveConfig';
const LOCAL_STORAGE_RECORD_TARGET_OS_KEY = 'recordTargetOS';
class RecordConfigStore {
    constructor() {
        this.recordConfigs = [];
        this.recordConfigNames = new Set();
        this.reloadFromLocalStorage();
    }
    _save() {
        window.localStorage.setItem(LOCAL_STORAGE_RECORD_CONFIGS_KEY, JSON.stringify(this.recordConfigs.map((x) => x.result)));
    }
    save(recordConfig, title) {
        // We reload from local storage in case of concurrent
        // modifications of local storage from a different tab.
        this.reloadFromLocalStorage();
        const savedTitle = title ? title : new Date().toJSON();
        const config = {
            title: savedTitle,
            config: recordConfig,
            key: new Date().toJSON(),
        };
        this.recordConfigs.push({ result: config, invalidKeys: [], extraKeys: [] });
        this.recordConfigNames.add(savedTitle);
        this._save();
    }
    overwrite(recordConfig, key) {
        // We reload from local storage in case of concurrent
        // modifications of local storage from a different tab.
        this.reloadFromLocalStorage();
        const found = this.recordConfigs.find((e) => e.result.key === key);
        if (found === undefined) {
            throw new Error('trying to overwrite non-existing config');
        }
        found.result.config = recordConfig;
        this._save();
    }
    delete(key) {
        // We reload from local storage in case of concurrent
        // modifications of local storage from a different tab.
        this.reloadFromLocalStorage();
        let idx = -1;
        for (let i = 0; i < this.recordConfigs.length; ++i) {
            if (this.recordConfigs[i].result.key === key) {
                idx = i;
                break;
            }
        }
        if (idx !== -1) {
            this.recordConfigNames.delete(this.recordConfigs[idx].result.title);
            this.recordConfigs.splice(idx, 1);
            this._save();
        }
        else {
            // TODO(bsebastien): Show a warning message to the user in the UI.
            console.warn('The config selected doesn\'t exist any more');
        }
    }
    clearRecordConfigs() {
        this.recordConfigs = [];
        this.recordConfigNames.clear();
        this._save();
    }
    reloadFromLocalStorage() {
        const configsLocalStorage = window.localStorage.getItem(LOCAL_STORAGE_RECORD_CONFIGS_KEY);
        if (configsLocalStorage) {
            this.recordConfigNames.clear();
            try {
                const validConfigLocalStorage = [];
                const parsedConfigsLocalStorage = JSON.parse(configsLocalStorage);
                // Check if it's an array.
                if (!Array.isArray(parsedConfigsLocalStorage)) {
                    this.clearRecordConfigs();
                    return;
                }
                for (let i = 0; i < parsedConfigsLocalStorage.length; ++i) {
                    try {
                        validConfigLocalStorage.push((0, validators.runValidator)(record_config_types.namedRecordConfigValidator, parsedConfigsLocalStorage[i]));
                    }
                    catch (_a) {
                        // Parsing failed with unrecoverable error (e.g. title or key are
                        // missing), ignore the result.
                        console.log('Validation of saved record config has failed: ' +
                            JSON.stringify(parsedConfigsLocalStorage[i]));
                    }
                }
                this.recordConfigs = validConfigLocalStorage;
                this._save();
            }
            catch (e) {
                this.clearRecordConfigs();
            }
        }
        else {
            this.clearRecordConfigs();
        }
    }
    canSave(title) {
        return !this.recordConfigNames.has(title);
    }
}
exports.RecordConfigStore = RecordConfigStore;
// This class is a singleton to avoid many instances
// conflicting as they attempt to edit localStorage.
exports.recordConfigStore = new RecordConfigStore();
class AutosaveConfigStore {
    constructor() {
        this.hasSavedConfig = false;
        this.config = (0, record_config_types.createEmptyRecordConfig)();
        const savedItem = window.localStorage.getItem(LOCAL_STORAGE_AUTOSAVE_CONFIG_KEY);
        if (savedItem === null) {
            return;
        }
        const parsed = JSON.parse(savedItem);
        if (parsed !== null && typeof parsed === 'object') {
            this.config = (0, validators.runValidator)(record_config_types.recordConfigValidator, parsed).result;
            this.hasSavedConfig = true;
        }
    }
    get() {
        return this.config;
    }
    save(newConfig) {
        window.localStorage.setItem(LOCAL_STORAGE_AUTOSAVE_CONFIG_KEY, JSON.stringify(newConfig));
        this.config = newConfig;
        this.hasSavedConfig = true;
    }
}
exports.AutosaveConfigStore = AutosaveConfigStore;
exports.autosaveConfigStore = new AutosaveConfigStore();
class RecordTargetStore {
    constructor() {
        this.recordTargetOS =
            window.localStorage.getItem(LOCAL_STORAGE_RECORD_TARGET_OS_KEY);
    }
    get() {
        return this.recordTargetOS;
    }
    getValidTarget() {
        const validTargets = (0, state.getDefaultRecordingTargets)();
        const savedOS = this.get();
        const validSavedTarget = validTargets.find((el) => el.os === savedOS);
        return validSavedTarget || validTargets[0];
    }
    save(newTargetOS) {
        window.localStorage.setItem(LOCAL_STORAGE_RECORD_TARGET_OS_KEY, newTargetOS);
        this.recordTargetOS = newTargetOS;
    }
}
exports.RecordTargetStore = RecordTargetStore;
exports.recordTargetStore = new RecordTargetStore();

});

var feature_flags = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.RECORDING_V2_FLAG = exports.PERF_SAMPLE_FLAG = exports.featureFlags = exports.FlagsForTesting = exports.OverrideState = void 0;
var OverrideState;
(function (OverrideState) {
    OverrideState["DEFAULT"] = "DEFAULT";
    OverrideState["TRUE"] = "OVERRIDE_TRUE";
    OverrideState["FALSE"] = "OVERRIDE_FALSE";
})(OverrideState = exports.OverrideState || (exports.OverrideState = {}));
// Check if the given object is a valid FlagOverrides.
// This is necessary since someone could modify the persisted flags
// behind our backs.
function isFlagOverrides(o) {
    const states = [OverrideState.TRUE.toString(), OverrideState.FALSE.toString()];
    for (const v of Object.values(o)) {
        if (typeof v !== 'string' || !states.includes(v)) {
            return false;
        }
    }
    return true;
}
class Flags {
    constructor(store) {
        this.store = store;
        this.flags = new Map();
        this.overrides = {};
        this.load();
    }
    register(settings) {
        const id = settings.id;
        if (this.flags.has(id)) {
            throw new Error(`Flag with id "${id}" is already registered.`);
        }
        const saved = this.overrides[id];
        const state = saved === undefined ? OverrideState.DEFAULT : saved;
        const flag = new FlagImpl(this, state, settings);
        this.flags.set(id, flag);
        return flag;
    }
    allFlags() {
        const includeDevFlags = ['127.0.0.1', '::1', 'localhost'].includes(window.location.hostname);
        return [...this.flags.values()].filter((flag) => includeDevFlags || !flag.devOnly);
    }
    resetAll() {
        for (const flag of this.flags.values()) {
            flag.state = OverrideState.DEFAULT;
        }
        this.save();
    }
    load() {
        const o = this.store.load();
        if (isFlagOverrides(o)) {
            this.overrides = o;
        }
    }
    save() {
        for (const flag of this.flags.values()) {
            if (flag.isOverridden()) {
                this.overrides[flag.id] = flag.state;
            }
            else {
                delete this.overrides[flag.id];
            }
        }
        this.store.save(this.overrides);
    }
}
class FlagImpl {
    constructor(registry, state, settings) {
        this.registry = registry;
        this.id = settings.id;
        this.state = state;
        this.description = settings.description;
        this.defaultValue = settings.defaultValue;
        this.name = settings.name || settings.id;
        this.devOnly = settings.devOnly || false;
    }
    get() {
        switch (this.state) {
            case OverrideState.TRUE:
                return true;
            case OverrideState.FALSE:
                return false;
            case OverrideState.DEFAULT:
            default:
                return this.defaultValue;
        }
    }
    set(value) {
        const next = value ? OverrideState.TRUE : OverrideState.FALSE;
        if (this.state === next) {
            return;
        }
        this.state = next;
        this.registry.save();
    }
    overriddenState() {
        return this.state;
    }
    reset() {
        this.state = OverrideState.DEFAULT;
        this.registry.save();
    }
    isOverridden() {
        return this.state !== OverrideState.DEFAULT;
    }
}
class LocalStorageStore {
    load() {
        const s = localStorage.getItem(LocalStorageStore.KEY);
        let parsed;
        try {
            parsed = JSON.parse(s || '{}');
        }
        catch (e) {
            return {};
        }
        if (typeof parsed !== 'object' || parsed === null) {
            return {};
        }
        return parsed;
    }
    save(o) {
        const s = JSON.stringify(o);
        localStorage.setItem(LocalStorageStore.KEY, s);
    }
}
LocalStorageStore.KEY = 'perfettoFeatureFlags';
exports.FlagsForTesting = Flags;
exports.featureFlags = new Flags(new LocalStorageStore());
exports.PERF_SAMPLE_FLAG = exports.featureFlags.register({
    id: 'perfSampleFlamegraph',
    name: 'Perf Sample Flamegraph',
    description: 'Show flamegraph generated by a perf sample.',
    defaultValue: true,
});
exports.RECORDING_V2_FLAG = exports.featureFlags.register({
    id: 'recordingv2',
    name: 'Recording V2',
    description: 'Record using V2 interface',
    defaultValue: false,
});

});

var empty_state = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.createEmptyState = exports.createEmptyNonSerializableState = exports.COUNT_AGGREGATION = exports.keyedMap = void 0;




const AUTOLOAD_STARTED_CONFIG_FLAG = feature_flags.featureFlags.register({
    id: 'autoloadStartedConfig',
    name: 'Auto-load last used recording config',
    description: 'Starting a recording automatically saves its configuration. ' +
        'This flag controls whether this config is automatically loaded.',
    defaultValue: true,
});
function keyedMap(keyFn, ...values) {
    const result = new Map();
    for (const value of values) {
        result.set(keyFn(value), value);
    }
    return result;
}
exports.keyedMap = keyedMap;
exports.COUNT_AGGREGATION = {
    aggregationFunction: 'COUNT',
    // Exact column is ignored for count aggregation because it does not matter
    // what to count, use empty strings.
    column: { kind: 'regular', table: '', column: '' },
};
function createEmptyNonSerializableState() {
    return {
        pivotTableRedux: {
            queryResult: null,
            selectedSlicePivots: [{ kind: 'regular', table: 'slice', column: 'name' }],
            selectedPivots: [],
            selectedAggregations: [
                {
                    aggregationFunction: 'SUM',
                    column: { kind: 'regular', table: 'slice', column: 'dur' },
                },
                {
                    aggregationFunction: 'SUM',
                    column: { kind: 'regular', table: 'slice', column: 'thread_dur' },
                },
                exports.COUNT_AGGREGATION,
            ],
            constrainToArea: true,
            queryRequested: false,
            argumentNames: [],
            sortCriteria: {
                column: { kind: 'regular', table: 'slice', column: 'dur' },
                order: 'DESC',
            },
        },
    };
}
exports.createEmptyNonSerializableState = createEmptyNonSerializableState;
function createEmptyState() {
    return {
        version: state.STATE_VERSION,
        currentEngineId: undefined,
        nextId: '-1',
        newEngineMode: 'USE_HTTP_RPC_IF_AVAILABLE',
        engines: {},
        traceTime: Object.assign({}, state.defaultTraceTime),
        tracks: {},
        uiTrackIdByTraceTrackId: {},
        utidToThreadSortKey: {},
        aggregatePreferences: {},
        trackGroups: {},
        visibleTracks: [],
        pinnedTracks: [],
        scrollingTracks: [],
        areas: {},
        queries: {},
        metrics: {},
        permalink: {},
        notes: {},
        visualisedArgs: [],
        recordConfig: AUTOLOAD_STARTED_CONFIG_FLAG.get() ?
            record_config.autosaveConfigStore.get() :
            (0, record_config_types.createEmptyRecordConfig)(),
        displayConfigAsPbtxt: false,
        lastLoadedConfig: { type: 'NONE' },
        frontendLocalState: {
            omniboxState: {
                lastUpdate: 0,
                omnibox: '',
                mode: 'SEARCH',
            },
            visibleState: Object.assign(Object.assign({}, state.defaultTraceTime), { lastUpdate: 0, resolution: 0 }),
        },
        logsPagination: {
            offset: 0,
            count: 0,
        },
        status: { msg: '', timestamp: 0 },
        currentSelection: null,
        currentFlamegraphState: null,
        traceConversionInProgress: false,
        perfDebug: false,
        sidebarVisible: true,
        hoveredUtid: -1,
        hoveredPid: -1,
        hoveredLogsTimestamp: -1,
        hoveredNoteTimestamp: -1,
        highlightedSliceId: -1,
        focusedFlowIdLeft: -1,
        focusedFlowIdRight: -1,
        searchIndex: -1,
        recordingInProgress: false,
        recordingCancelled: false,
        extensionInstalled: false,
        flamegraphModalDismissed: false,
        recordingTarget: record_config.recordTargetStore.getValidTarget(),
        availableAdbDevices: [],
        fetchChromeCategories: false,
        chromeCategories: undefined,
        nonSerializableState: createEmptyNonSerializableState(),
    };
}
exports.createEmptyState = createEmptyState;

});

var channels = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.setChannel = exports.channelChanged = exports.getNextChannel = exports.getCurrentChannel = exports.DEFAULT_CHANNEL = void 0;

exports.DEFAULT_CHANNEL = 'stable';
const CHANNEL_KEY = 'perfettoUiChannel';
let currentChannel = undefined;
let nextChannel = undefined;
// This is the channel the UI is currently running. It doesn't change once the
// UI has been loaded.
function getCurrentChannel() {
    if (currentChannel === undefined) {
        currentChannel = localStorage.getItem(CHANNEL_KEY) || exports.DEFAULT_CHANNEL;
    }
    return currentChannel;
}
exports.getCurrentChannel = getCurrentChannel;
// This is the channel that will be applied on reload.
function getNextChannel() {
    if (nextChannel !== undefined) {
        return nextChannel;
    }
    return getCurrentChannel();
}
exports.getNextChannel = getNextChannel;
function channelChanged() {
    return getCurrentChannel() !== getNextChannel();
}
exports.channelChanged = channelChanged;
function setChannel(channel) {
    getCurrentChannel(); // Cache the current channel before mangling next one.
    nextChannel = channel;
    localStorage.setItem(CHANNEL_KEY, channel);
    globals.globals.rafScheduler.scheduleFullRedraw();
}
exports.setChannel = setChannel;

});

function Vnode(tag, key, attrs, children, text, dom) {
	return {tag: tag, key: key, attrs: attrs, children: children, text: text, dom: dom, domSize: undefined, state: undefined, events: undefined, instance: undefined}
}
Vnode.normalize = function(node) {
	if (Array.isArray(node)) return Vnode("[", undefined, undefined, Vnode.normalizeChildren(node), undefined, undefined)
	if (node == null || typeof node === "boolean") return null
	if (typeof node === "object") return node
	return Vnode("#", undefined, undefined, String(node), undefined, undefined)
};
Vnode.normalizeChildren = function(input) {
	var children = [];
	if (input.length) {
		var isKeyed = input[0] != null && input[0].key != null;
		// Note: this is a *very* perf-sensitive check.
		// Fun fact: merging the loop like this is somehow faster than splitting
		// it, noticeably so.
		for (var i = 1; i < input.length; i++) {
			if ((input[i] != null && input[i].key != null) !== isKeyed) {
				throw new TypeError(
					isKeyed && (input[i] != null || typeof input[i] === "boolean")
						? "In fragments, vnodes must either all have keys or none have keys. You may wish to consider using an explicit keyed empty fragment, m.fragment({key: ...}), instead of a hole."
						: "In fragments, vnodes must either all have keys or none have keys."
				)
			}
		}
		for (var i = 0; i < input.length; i++) {
			children[i] = Vnode.normalize(input[i]);
		}
	}
	return children
};

var vnode = Vnode;

// Call via `hyperscriptVnode.apply(startOffset, arguments)`
//
// The reason I do it this way, forwarding the arguments and passing the start
// offset in `this`, is so I don't have to create a temporary array in a
// performance-critical path.
//
// In native ES6, I'd instead add a final `...args` parameter to the
// `hyperscript` and `fragment` factories and define this as
// `hyperscriptVnode(...args)`, since modern engines do optimize that away. But
// ES5 (what Mithril.js requires thanks to IE support) doesn't give me that luxury,
// and engines aren't nearly intelligent enough to do either of these:
//
// 1. Elide the allocation for `[].slice.call(arguments, 1)` when it's passed to
//    another function only to be indexed.
// 2. Elide an `arguments` allocation when it's passed to any function other
//    than `Function.prototype.apply` or `Reflect.apply`.
//
// In ES6, it'd probably look closer to this (I'd need to profile it, though):
// module.exports = function(attrs, ...children) {
//     if (attrs == null || typeof attrs === "object" && attrs.tag == null && !Array.isArray(attrs)) {
//         if (children.length === 1 && Array.isArray(children[0])) children = children[0]
//     } else {
//         children = children.length === 0 && Array.isArray(attrs) ? attrs : [attrs, ...children]
//         attrs = undefined
//     }
//
//     if (attrs == null) attrs = {}
//     return Vnode("", attrs.key, attrs, children)
// }
var hyperscriptVnode = function() {
	var attrs = arguments[this], start = this + 1, children;

	if (attrs == null) {
		attrs = {};
	} else if (typeof attrs !== "object" || attrs.tag != null || Array.isArray(attrs)) {
		attrs = {};
		start = this;
	}

	if (arguments.length === start + 1) {
		children = arguments[start];
		if (!Array.isArray(children)) children = [children];
	} else {
		children = [];
		while (start < arguments.length) children.push(arguments[start++]);
	}

	return vnode("", attrs.key, attrs, children)
};

// This exists so I'm only saving it once.

var hasOwn = {}.hasOwnProperty;

var selectorParser = /(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g;
var selectorCache = {};

function isEmpty(object) {
	for (var key in object) if (hasOwn.call(object, key)) return false
	return true
}

function compileSelector(selector) {
	var match, tag = "div", classes = [], attrs = {};
	while (match = selectorParser.exec(selector)) {
		var type = match[1], value = match[2];
		if (type === "" && value !== "") tag = value;
		else if (type === "#") attrs.id = value;
		else if (type === ".") classes.push(value);
		else if (match[3][0] === "[") {
			var attrValue = match[6];
			if (attrValue) attrValue = attrValue.replace(/\\(["'])/g, "$1").replace(/\\\\/g, "\\");
			if (match[4] === "class") classes.push(attrValue);
			else attrs[match[4]] = attrValue === "" ? attrValue : attrValue || true;
		}
	}
	if (classes.length > 0) attrs.className = classes.join(" ");
	return selectorCache[selector] = {tag: tag, attrs: attrs}
}

function execSelector(state, vnode) {
	var attrs = vnode.attrs;
	var hasClass = hasOwn.call(attrs, "class");
	var className = hasClass ? attrs.class : attrs.className;

	vnode.tag = state.tag;
	vnode.attrs = {};

	if (!isEmpty(state.attrs) && !isEmpty(attrs)) {
		var newAttrs = {};

		for (var key in attrs) {
			if (hasOwn.call(attrs, key)) newAttrs[key] = attrs[key];
		}

		attrs = newAttrs;
	}

	for (var key in state.attrs) {
		if (hasOwn.call(state.attrs, key) && key !== "className" && !hasOwn.call(attrs, key)){
			attrs[key] = state.attrs[key];
		}
	}
	if (className != null || state.attrs.className != null) attrs.className =
		className != null
			? state.attrs.className != null
				? String(state.attrs.className) + " " + String(className)
				: className
			: state.attrs.className != null
				? state.attrs.className
				: null;

	if (hasClass) attrs.class = null;

	for (var key in attrs) {
		if (hasOwn.call(attrs, key) && key !== "key") {
			vnode.attrs = attrs;
			break
		}
	}

	return vnode
}

function hyperscript(selector) {
	if (selector == null || typeof selector !== "string" && typeof selector !== "function" && typeof selector.view !== "function") {
		throw Error("The selector must be either a string or a component.");
	}

	var vnode$1 = hyperscriptVnode.apply(1, arguments);

	if (typeof selector === "string") {
		vnode$1.children = vnode.normalizeChildren(vnode$1.children);
		if (selector !== "[") return execSelector(selectorCache[selector] || compileSelector(selector), vnode$1)
	}

	vnode$1.tag = selector;
	return vnode$1
}

var hyperscript_1 = hyperscript;

var trust = function(html) {
	if (html == null) html = "";
	return vnode("<", undefined, undefined, html, undefined, undefined)
};

var fragment = function() {
	var vnode$1 = hyperscriptVnode.apply(0, arguments);

	vnode$1.tag = "[";
	vnode$1.children = vnode.normalizeChildren(vnode$1.children);
	return vnode$1
};

hyperscript_1.trust = trust;
hyperscript_1.fragment = fragment;

var hyperscript_1$1 = hyperscript_1;

/** @constructor */
var PromisePolyfill = function(executor) {
	if (!(this instanceof PromisePolyfill)) throw new Error("Promise must be called with 'new'.")
	if (typeof executor !== "function") throw new TypeError("executor must be a function.")

	var self = this, resolvers = [], rejectors = [], resolveCurrent = handler(resolvers, true), rejectCurrent = handler(rejectors, false);
	var instance = self._instance = {resolvers: resolvers, rejectors: rejectors};
	var callAsync = typeof setImmediate === "function" ? setImmediate : setTimeout;
	function handler(list, shouldAbsorb) {
		return function execute(value) {
			var then;
			try {
				if (shouldAbsorb && value != null && (typeof value === "object" || typeof value === "function") && typeof (then = value.then) === "function") {
					if (value === self) throw new TypeError("Promise can't be resolved with itself.")
					executeOnce(then.bind(value));
				}
				else {
					callAsync(function() {
						if (!shouldAbsorb && list.length === 0) console.error("Possible unhandled promise rejection:", value);
						for (var i = 0; i < list.length; i++) list[i](value);
						resolvers.length = 0, rejectors.length = 0;
						instance.state = shouldAbsorb;
						instance.retry = function() {execute(value);};
					});
				}
			}
			catch (e) {
				rejectCurrent(e);
			}
		}
	}
	function executeOnce(then) {
		var runs = 0;
		function run(fn) {
			return function(value) {
				if (runs++ > 0) return
				fn(value);
			}
		}
		var onerror = run(rejectCurrent);
		try {then(run(resolveCurrent), onerror);} catch (e) {onerror(e);}
	}

	executeOnce(executor);
};
PromisePolyfill.prototype.then = function(onFulfilled, onRejection) {
	var self = this, instance = self._instance;
	function handle(callback, list, next, state) {
		list.push(function(value) {
			if (typeof callback !== "function") next(value);
			else try {resolveNext(callback(value));} catch (e) {if (rejectNext) rejectNext(e);}
		});
		if (typeof instance.retry === "function" && state === instance.state) instance.retry();
	}
	var resolveNext, rejectNext;
	var promise = new PromisePolyfill(function(resolve, reject) {resolveNext = resolve, rejectNext = reject;});
	handle(onFulfilled, instance.resolvers, resolveNext, true), handle(onRejection, instance.rejectors, rejectNext, false);
	return promise
};
PromisePolyfill.prototype.catch = function(onRejection) {
	return this.then(null, onRejection)
};
PromisePolyfill.prototype.finally = function(callback) {
	return this.then(
		function(value) {
			return PromisePolyfill.resolve(callback()).then(function() {
				return value
			})
		},
		function(reason) {
			return PromisePolyfill.resolve(callback()).then(function() {
				return PromisePolyfill.reject(reason);
			})
		}
	)
};
PromisePolyfill.resolve = function(value) {
	if (value instanceof PromisePolyfill) return value
	return new PromisePolyfill(function(resolve) {resolve(value);})
};
PromisePolyfill.reject = function(value) {
	return new PromisePolyfill(function(resolve, reject) {reject(value);})
};
PromisePolyfill.all = function(list) {
	return new PromisePolyfill(function(resolve, reject) {
		var total = list.length, count = 0, values = [];
		if (list.length === 0) resolve([]);
		else for (var i = 0; i < list.length; i++) {
			(function(i) {
				function consume(value) {
					count++;
					values[i] = value;
					if (count === total) resolve(values);
				}
				if (list[i] != null && (typeof list[i] === "object" || typeof list[i] === "function") && typeof list[i].then === "function") {
					list[i].then(consume, reject);
				}
				else consume(list[i]);
			})(i);
		}
	})
};
PromisePolyfill.race = function(list) {
	return new PromisePolyfill(function(resolve, reject) {
		for (var i = 0; i < list.length; i++) {
			list[i].then(resolve, reject);
		}
	})
};

var polyfill = PromisePolyfill;

var promise = createCommonjsModule(function (module) {



if (typeof window !== "undefined") {
	if (typeof window.Promise === "undefined") {
		window.Promise = polyfill;
	} else if (!window.Promise.prototype.finally) {
		window.Promise.prototype.finally = polyfill.prototype.finally;
	}
	module.exports = window.Promise;
} else if (typeof commonjsGlobal !== "undefined") {
	if (typeof commonjsGlobal.Promise === "undefined") {
		commonjsGlobal.Promise = polyfill;
	} else if (!commonjsGlobal.Promise.prototype.finally) {
		commonjsGlobal.Promise.prototype.finally = polyfill.prototype.finally;
	}
	module.exports = commonjsGlobal.Promise;
} else {
	module.exports = polyfill;
}
});

var render = function($window) {
	var $doc = $window && $window.document;
	var currentRedraw;

	var nameSpace = {
		svg: "http://www.w3.org/2000/svg",
		math: "http://www.w3.org/1998/Math/MathML"
	};

	function getNameSpace(vnode) {
		return vnode.attrs && vnode.attrs.xmlns || nameSpace[vnode.tag]
	}

	//sanity check to discourage people from doing `vnode.state = ...`
	function checkState(vnode, original) {
		if (vnode.state !== original) throw new Error("'vnode.state' must not be modified.")
	}

	//Note: the hook is passed as the `this` argument to allow proxying the
	//arguments without requiring a full array allocation to do so. It also
	//takes advantage of the fact the current `vnode` is the first argument in
	//all lifecycle methods.
	function callHook(vnode) {
		var original = vnode.state;
		try {
			return this.apply(original, arguments)
		} finally {
			checkState(vnode, original);
		}
	}

	// IE11 (at least) throws an UnspecifiedError when accessing document.activeElement when
	// inside an iframe. Catch and swallow this error, and heavy-handidly return null.
	function activeElement() {
		try {
			return $doc.activeElement
		} catch (e) {
			return null
		}
	}
	//create
	function createNodes(parent, vnodes, start, end, hooks, nextSibling, ns) {
		for (var i = start; i < end; i++) {
			var vnode = vnodes[i];
			if (vnode != null) {
				createNode(parent, vnode, hooks, ns, nextSibling);
			}
		}
	}
	function createNode(parent, vnode, hooks, ns, nextSibling) {
		var tag = vnode.tag;
		if (typeof tag === "string") {
			vnode.state = {};
			if (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks);
			switch (tag) {
				case "#": createText(parent, vnode, nextSibling); break
				case "<": createHTML(parent, vnode, ns, nextSibling); break
				case "[": createFragment(parent, vnode, hooks, ns, nextSibling); break
				default: createElement(parent, vnode, hooks, ns, nextSibling);
			}
		}
		else createComponent(parent, vnode, hooks, ns, nextSibling);
	}
	function createText(parent, vnode, nextSibling) {
		vnode.dom = $doc.createTextNode(vnode.children);
		insertNode(parent, vnode.dom, nextSibling);
	}
	var possibleParents = {caption: "table", thead: "table", tbody: "table", tfoot: "table", tr: "tbody", th: "tr", td: "tr", colgroup: "table", col: "colgroup"};
	function createHTML(parent, vnode, ns, nextSibling) {
		var match = vnode.children.match(/^\s*?<(\w+)/im) || [];
		// not using the proper parent makes the child element(s) vanish.
		//     var div = document.createElement("div")
		//     div.innerHTML = "<td>i</td><td>j</td>"
		//     console.log(div.innerHTML)
		// --> "ij", no <td> in sight.
		var temp = $doc.createElement(possibleParents[match[1]] || "div");
		if (ns === "http://www.w3.org/2000/svg") {
			temp.innerHTML = "<svg xmlns=\"http://www.w3.org/2000/svg\">" + vnode.children + "</svg>";
			temp = temp.firstChild;
		} else {
			temp.innerHTML = vnode.children;
		}
		vnode.dom = temp.firstChild;
		vnode.domSize = temp.childNodes.length;
		// Capture nodes to remove, so we don't confuse them.
		vnode.instance = [];
		var fragment = $doc.createDocumentFragment();
		var child;
		while (child = temp.firstChild) {
			vnode.instance.push(child);
			fragment.appendChild(child);
		}
		insertNode(parent, fragment, nextSibling);
	}
	function createFragment(parent, vnode, hooks, ns, nextSibling) {
		var fragment = $doc.createDocumentFragment();
		if (vnode.children != null) {
			var children = vnode.children;
			createNodes(fragment, children, 0, children.length, hooks, null, ns);
		}
		vnode.dom = fragment.firstChild;
		vnode.domSize = fragment.childNodes.length;
		insertNode(parent, fragment, nextSibling);
	}
	function createElement(parent, vnode, hooks, ns, nextSibling) {
		var tag = vnode.tag;
		var attrs = vnode.attrs;
		var is = attrs && attrs.is;

		ns = getNameSpace(vnode) || ns;

		var element = ns ?
			is ? $doc.createElementNS(ns, tag, {is: is}) : $doc.createElementNS(ns, tag) :
			is ? $doc.createElement(tag, {is: is}) : $doc.createElement(tag);
		vnode.dom = element;

		if (attrs != null) {
			setAttrs(vnode, attrs, ns);
		}

		insertNode(parent, element, nextSibling);

		if (!maybeSetContentEditable(vnode)) {
			if (vnode.children != null) {
				var children = vnode.children;
				createNodes(element, children, 0, children.length, hooks, null, ns);
				if (vnode.tag === "select" && attrs != null) setLateSelectAttrs(vnode, attrs);
			}
		}
	}
	function initComponent(vnode$1, hooks) {
		var sentinel;
		if (typeof vnode$1.tag.view === "function") {
			vnode$1.state = Object.create(vnode$1.tag);
			sentinel = vnode$1.state.view;
			if (sentinel.$$reentrantLock$$ != null) return
			sentinel.$$reentrantLock$$ = true;
		} else {
			vnode$1.state = void 0;
			sentinel = vnode$1.tag;
			if (sentinel.$$reentrantLock$$ != null) return
			sentinel.$$reentrantLock$$ = true;
			vnode$1.state = (vnode$1.tag.prototype != null && typeof vnode$1.tag.prototype.view === "function") ? new vnode$1.tag(vnode$1) : vnode$1.tag(vnode$1);
		}
		initLifecycle(vnode$1.state, vnode$1, hooks);
		if (vnode$1.attrs != null) initLifecycle(vnode$1.attrs, vnode$1, hooks);
		vnode$1.instance = vnode.normalize(callHook.call(vnode$1.state.view, vnode$1));
		if (vnode$1.instance === vnode$1) throw Error("A view cannot return the vnode it received as argument")
		sentinel.$$reentrantLock$$ = null;
	}
	function createComponent(parent, vnode, hooks, ns, nextSibling) {
		initComponent(vnode, hooks);
		if (vnode.instance != null) {
			createNode(parent, vnode.instance, hooks, ns, nextSibling);
			vnode.dom = vnode.instance.dom;
			vnode.domSize = vnode.dom != null ? vnode.instance.domSize : 0;
		}
		else {
			vnode.domSize = 0;
		}
	}

	//update
	/**
	 * @param {Element|Fragment} parent - the parent element
	 * @param {Vnode[] | null} old - the list of vnodes of the last `render()` call for
	 *                               this part of the tree
	 * @param {Vnode[] | null} vnodes - as above, but for the current `render()` call.
	 * @param {Function[]} hooks - an accumulator of post-render hooks (oncreate/onupdate)
	 * @param {Element | null} nextSibling - the next DOM node if we're dealing with a
	 *                                       fragment that is not the last item in its
	 *                                       parent
	 * @param {'svg' | 'math' | String | null} ns) - the current XML namespace, if any
	 * @returns void
	 */
	// This function diffs and patches lists of vnodes, both keyed and unkeyed.
	//
	// We will:
	//
	// 1. describe its general structure
	// 2. focus on the diff algorithm optimizations
	// 3. discuss DOM node operations.

	// ## Overview:
	//
	// The updateNodes() function:
	// - deals with trivial cases
	// - determines whether the lists are keyed or unkeyed based on the first non-null node
	//   of each list.
	// - diffs them and patches the DOM if needed (that's the brunt of the code)
	// - manages the leftovers: after diffing, are there:
	//   - old nodes left to remove?
	// 	 - new nodes to insert?
	// 	 deal with them!
	//
	// The lists are only iterated over once, with an exception for the nodes in `old` that
	// are visited in the fourth part of the diff and in the `removeNodes` loop.

	// ## Diffing
	//
	// Reading https://github.com/localvoid/ivi/blob/ddc09d06abaef45248e6133f7040d00d3c6be853/packages/ivi/src/vdom/implementation.ts#L617-L837
	// may be good for context on longest increasing subsequence-based logic for moving nodes.
	//
	// In order to diff keyed lists, one has to
	//
	// 1) match nodes in both lists, per key, and update them accordingly
	// 2) create the nodes present in the new list, but absent in the old one
	// 3) remove the nodes present in the old list, but absent in the new one
	// 4) figure out what nodes in 1) to move in order to minimize the DOM operations.
	//
	// To achieve 1) one can create a dictionary of keys => index (for the old list), then iterate
	// over the new list and for each new vnode, find the corresponding vnode in the old list using
	// the map.
	// 2) is achieved in the same step: if a new node has no corresponding entry in the map, it is new
	// and must be created.
	// For the removals, we actually remove the nodes that have been updated from the old list.
	// The nodes that remain in that list after 1) and 2) have been performed can be safely removed.
	// The fourth step is a bit more complex and relies on the longest increasing subsequence (LIS)
	// algorithm.
	//
	// the longest increasing subsequence is the list of nodes that can remain in place. Imagine going
	// from `1,2,3,4,5` to `4,5,1,2,3` where the numbers are not necessarily the keys, but the indices
	// corresponding to the keyed nodes in the old list (keyed nodes `e,d,c,b,a` => `b,a,e,d,c` would
	//  match the above lists, for example).
	//
	// In there are two increasing subsequences: `4,5` and `1,2,3`, the latter being the longest. We
	// can update those nodes without moving them, and only call `insertNode` on `4` and `5`.
	//
	// @localvoid adapted the algo to also support node deletions and insertions (the `lis` is actually
	// the longest increasing subsequence *of old nodes still present in the new list*).
	//
	// It is a general algorithm that is fireproof in all circumstances, but it requires the allocation
	// and the construction of a `key => oldIndex` map, and three arrays (one with `newIndex => oldIndex`,
	// the `LIS` and a temporary one to create the LIS).
	//
	// So we cheat where we can: if the tails of the lists are identical, they are guaranteed to be part of
	// the LIS and can be updated without moving them.
	//
	// If two nodes are swapped, they are guaranteed not to be part of the LIS, and must be moved (with
	// the exception of the last node if the list is fully reversed).
	//
	// ## Finding the next sibling.
	//
	// `updateNode()` and `createNode()` expect a nextSibling parameter to perform DOM operations.
	// When the list is being traversed top-down, at any index, the DOM nodes up to the previous
	// vnode reflect the content of the new list, whereas the rest of the DOM nodes reflect the old
	// list. The next sibling must be looked for in the old list using `getNextSibling(... oldStart + 1 ...)`.
	//
	// In the other scenarios (swaps, upwards traversal, map-based diff),
	// the new vnodes list is traversed upwards. The DOM nodes at the bottom of the list reflect the
	// bottom part of the new vnodes list, and we can use the `v.dom`  value of the previous node
	// as the next sibling (cached in the `nextSibling` variable).


	// ## DOM node moves
	//
	// In most scenarios `updateNode()` and `createNode()` perform the DOM operations. However,
	// this is not the case if the node moved (second and fourth part of the diff algo). We move
	// the old DOM nodes before updateNode runs because it enables us to use the cached `nextSibling`
	// variable rather than fetching it using `getNextSibling()`.
	//
	// The fourth part of the diff currently inserts nodes unconditionally, leading to issues
	// like #1791 and #1999. We need to be smarter about those situations where adjascent old
	// nodes remain together in the new list in a way that isn't covered by parts one and
	// three of the diff algo.

	function updateNodes(parent, old, vnodes, hooks, nextSibling, ns) {
		if (old === vnodes || old == null && vnodes == null) return
		else if (old == null || old.length === 0) createNodes(parent, vnodes, 0, vnodes.length, hooks, nextSibling, ns);
		else if (vnodes == null || vnodes.length === 0) removeNodes(parent, old, 0, old.length);
		else {
			var isOldKeyed = old[0] != null && old[0].key != null;
			var isKeyed = vnodes[0] != null && vnodes[0].key != null;
			var start = 0, oldStart = 0;
			if (!isOldKeyed) while (oldStart < old.length && old[oldStart] == null) oldStart++;
			if (!isKeyed) while (start < vnodes.length && vnodes[start] == null) start++;
			if (isOldKeyed !== isKeyed) {
				removeNodes(parent, old, oldStart, old.length);
				createNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns);
			} else if (!isKeyed) {
				// Don't index past the end of either list (causes deopts).
				var commonLength = old.length < vnodes.length ? old.length : vnodes.length;
				// Rewind if necessary to the first non-null index on either side.
				// We could alternatively either explicitly create or remove nodes when `start !== oldStart`
				// but that would be optimizing for sparse lists which are more rare than dense ones.
				start = start < oldStart ? start : oldStart;
				for (; start < commonLength; start++) {
					o = old[start];
					v = vnodes[start];
					if (o === v || o == null && v == null) continue
					else if (o == null) createNode(parent, v, hooks, ns, getNextSibling(old, start + 1, nextSibling));
					else if (v == null) removeNode(parent, o);
					else updateNode(parent, o, v, hooks, getNextSibling(old, start + 1, nextSibling), ns);
				}
				if (old.length > commonLength) removeNodes(parent, old, start, old.length);
				if (vnodes.length > commonLength) createNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns);
			} else {
				// keyed diff
				var oldEnd = old.length - 1, end = vnodes.length - 1, map, o, v, oe, ve, topSibling;

				// bottom-up
				while (oldEnd >= oldStart && end >= start) {
					oe = old[oldEnd];
					ve = vnodes[end];
					if (oe.key !== ve.key) break
					if (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns);
					if (ve.dom != null) nextSibling = ve.dom;
					oldEnd--, end--;
				}
				// top-down
				while (oldEnd >= oldStart && end >= start) {
					o = old[oldStart];
					v = vnodes[start];
					if (o.key !== v.key) break
					oldStart++, start++;
					if (o !== v) updateNode(parent, o, v, hooks, getNextSibling(old, oldStart, nextSibling), ns);
				}
				// swaps and list reversals
				while (oldEnd >= oldStart && end >= start) {
					if (start === end) break
					if (o.key !== ve.key || oe.key !== v.key) break
					topSibling = getNextSibling(old, oldStart, nextSibling);
					moveNodes(parent, oe, topSibling);
					if (oe !== v) updateNode(parent, oe, v, hooks, topSibling, ns);
					if (++start <= --end) moveNodes(parent, o, nextSibling);
					if (o !== ve) updateNode(parent, o, ve, hooks, nextSibling, ns);
					if (ve.dom != null) nextSibling = ve.dom;
					oldStart++; oldEnd--;
					oe = old[oldEnd];
					ve = vnodes[end];
					o = old[oldStart];
					v = vnodes[start];
				}
				// bottom up once again
				while (oldEnd >= oldStart && end >= start) {
					if (oe.key !== ve.key) break
					if (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns);
					if (ve.dom != null) nextSibling = ve.dom;
					oldEnd--, end--;
					oe = old[oldEnd];
					ve = vnodes[end];
				}
				if (start > end) removeNodes(parent, old, oldStart, oldEnd + 1);
				else if (oldStart > oldEnd) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns);
				else {
					// inspired by ivi https://github.com/ivijs/ivi/ by Boris Kaul
					var originalNextSibling = nextSibling, vnodesLength = end - start + 1, oldIndices = new Array(vnodesLength), li=0, i=0, pos = 2147483647, matched = 0, map, lisIndices;
					for (i = 0; i < vnodesLength; i++) oldIndices[i] = -1;
					for (i = end; i >= start; i--) {
						if (map == null) map = getKeyMap(old, oldStart, oldEnd + 1);
						ve = vnodes[i];
						var oldIndex = map[ve.key];
						if (oldIndex != null) {
							pos = (oldIndex < pos) ? oldIndex : -1; // becomes -1 if nodes were re-ordered
							oldIndices[i-start] = oldIndex;
							oe = old[oldIndex];
							old[oldIndex] = null;
							if (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns);
							if (ve.dom != null) nextSibling = ve.dom;
							matched++;
						}
					}
					nextSibling = originalNextSibling;
					if (matched !== oldEnd - oldStart + 1) removeNodes(parent, old, oldStart, oldEnd + 1);
					if (matched === 0) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns);
					else {
						if (pos === -1) {
							// the indices of the indices of the items that are part of the
							// longest increasing subsequence in the oldIndices list
							lisIndices = makeLisIndices(oldIndices);
							li = lisIndices.length - 1;
							for (i = end; i >= start; i--) {
								v = vnodes[i];
								if (oldIndices[i-start] === -1) createNode(parent, v, hooks, ns, nextSibling);
								else {
									if (lisIndices[li] === i - start) li--;
									else moveNodes(parent, v, nextSibling);
								}
								if (v.dom != null) nextSibling = vnodes[i].dom;
							}
						} else {
							for (i = end; i >= start; i--) {
								v = vnodes[i];
								if (oldIndices[i-start] === -1) createNode(parent, v, hooks, ns, nextSibling);
								if (v.dom != null) nextSibling = vnodes[i].dom;
							}
						}
					}
				}
			}
		}
	}
	function updateNode(parent, old, vnode, hooks, nextSibling, ns) {
		var oldTag = old.tag, tag = vnode.tag;
		if (oldTag === tag) {
			vnode.state = old.state;
			vnode.events = old.events;
			if (shouldNotUpdate(vnode, old)) return
			if (typeof oldTag === "string") {
				if (vnode.attrs != null) {
					updateLifecycle(vnode.attrs, vnode, hooks);
				}
				switch (oldTag) {
					case "#": updateText(old, vnode); break
					case "<": updateHTML(parent, old, vnode, ns, nextSibling); break
					case "[": updateFragment(parent, old, vnode, hooks, nextSibling, ns); break
					default: updateElement(old, vnode, hooks, ns);
				}
			}
			else updateComponent(parent, old, vnode, hooks, nextSibling, ns);
		}
		else {
			removeNode(parent, old);
			createNode(parent, vnode, hooks, ns, nextSibling);
		}
	}
	function updateText(old, vnode) {
		if (old.children.toString() !== vnode.children.toString()) {
			old.dom.nodeValue = vnode.children;
		}
		vnode.dom = old.dom;
	}
	function updateHTML(parent, old, vnode, ns, nextSibling) {
		if (old.children !== vnode.children) {
			removeHTML(parent, old);
			createHTML(parent, vnode, ns, nextSibling);
		}
		else {
			vnode.dom = old.dom;
			vnode.domSize = old.domSize;
			vnode.instance = old.instance;
		}
	}
	function updateFragment(parent, old, vnode, hooks, nextSibling, ns) {
		updateNodes(parent, old.children, vnode.children, hooks, nextSibling, ns);
		var domSize = 0, children = vnode.children;
		vnode.dom = null;
		if (children != null) {
			for (var i = 0; i < children.length; i++) {
				var child = children[i];
				if (child != null && child.dom != null) {
					if (vnode.dom == null) vnode.dom = child.dom;
					domSize += child.domSize || 1;
				}
			}
			if (domSize !== 1) vnode.domSize = domSize;
		}
	}
	function updateElement(old, vnode, hooks, ns) {
		var element = vnode.dom = old.dom;
		ns = getNameSpace(vnode) || ns;

		if (vnode.tag === "textarea") {
			if (vnode.attrs == null) vnode.attrs = {};
		}
		updateAttrs(vnode, old.attrs, vnode.attrs, ns);
		if (!maybeSetContentEditable(vnode)) {
			updateNodes(element, old.children, vnode.children, hooks, null, ns);
		}
	}
	function updateComponent(parent, old, vnode$1, hooks, nextSibling, ns) {
		vnode$1.instance = vnode.normalize(callHook.call(vnode$1.state.view, vnode$1));
		if (vnode$1.instance === vnode$1) throw Error("A view cannot return the vnode it received as argument")
		updateLifecycle(vnode$1.state, vnode$1, hooks);
		if (vnode$1.attrs != null) updateLifecycle(vnode$1.attrs, vnode$1, hooks);
		if (vnode$1.instance != null) {
			if (old.instance == null) createNode(parent, vnode$1.instance, hooks, ns, nextSibling);
			else updateNode(parent, old.instance, vnode$1.instance, hooks, nextSibling, ns);
			vnode$1.dom = vnode$1.instance.dom;
			vnode$1.domSize = vnode$1.instance.domSize;
		}
		else if (old.instance != null) {
			removeNode(parent, old.instance);
			vnode$1.dom = undefined;
			vnode$1.domSize = 0;
		}
		else {
			vnode$1.dom = old.dom;
			vnode$1.domSize = old.domSize;
		}
	}
	function getKeyMap(vnodes, start, end) {
		var map = Object.create(null);
		for (; start < end; start++) {
			var vnode = vnodes[start];
			if (vnode != null) {
				var key = vnode.key;
				if (key != null) map[key] = start;
			}
		}
		return map
	}
	// Lifted from ivi https://github.com/ivijs/ivi/
	// takes a list of unique numbers (-1 is special and can
	// occur multiple times) and returns an array with the indices
	// of the items that are part of the longest increasing
	// subsequence
	var lisTemp = [];
	function makeLisIndices(a) {
		var result = [0];
		var u = 0, v = 0, i = 0;
		var il = lisTemp.length = a.length;
		for (var i = 0; i < il; i++) lisTemp[i] = a[i];
		for (var i = 0; i < il; ++i) {
			if (a[i] === -1) continue
			var j = result[result.length - 1];
			if (a[j] < a[i]) {
				lisTemp[i] = j;
				result.push(i);
				continue
			}
			u = 0;
			v = result.length - 1;
			while (u < v) {
				// Fast integer average without overflow.
				// eslint-disable-next-line no-bitwise
				var c = (u >>> 1) + (v >>> 1) + (u & v & 1);
				if (a[result[c]] < a[i]) {
					u = c + 1;
				}
				else {
					v = c;
				}
			}
			if (a[i] < a[result[u]]) {
				if (u > 0) lisTemp[i] = result[u - 1];
				result[u] = i;
			}
		}
		u = result.length;
		v = result[u - 1];
		while (u-- > 0) {
			result[u] = v;
			v = lisTemp[v];
		}
		lisTemp.length = 0;
		return result
	}

	function getNextSibling(vnodes, i, nextSibling) {
		for (; i < vnodes.length; i++) {
			if (vnodes[i] != null && vnodes[i].dom != null) return vnodes[i].dom
		}
		return nextSibling
	}

	// This covers a really specific edge case:
	// - Parent node is keyed and contains child
	// - Child is removed, returns unresolved promise in `onbeforeremove`
	// - Parent node is moved in keyed diff
	// - Remaining children still need moved appropriately
	//
	// Ideally, I'd track removed nodes as well, but that introduces a lot more
	// complexity and I'm not exactly interested in doing that.
	function moveNodes(parent, vnode, nextSibling) {
		var frag = $doc.createDocumentFragment();
		moveChildToFrag(parent, frag, vnode);
		insertNode(parent, frag, nextSibling);
	}
	function moveChildToFrag(parent, frag, vnode) {
		// Dodge the recursion overhead in a few of the most common cases.
		while (vnode.dom != null && vnode.dom.parentNode === parent) {
			if (typeof vnode.tag !== "string") {
				vnode = vnode.instance;
				if (vnode != null) continue
			} else if (vnode.tag === "<") {
				for (var i = 0; i < vnode.instance.length; i++) {
					frag.appendChild(vnode.instance[i]);
				}
			} else if (vnode.tag !== "[") {
				// Don't recurse for text nodes *or* elements, just fragments
				frag.appendChild(vnode.dom);
			} else if (vnode.children.length === 1) {
				vnode = vnode.children[0];
				if (vnode != null) continue
			} else {
				for (var i = 0; i < vnode.children.length; i++) {
					var child = vnode.children[i];
					if (child != null) moveChildToFrag(parent, frag, child);
				}
			}
			break
		}
	}

	function insertNode(parent, dom, nextSibling) {
		if (nextSibling != null) parent.insertBefore(dom, nextSibling);
		else parent.appendChild(dom);
	}

	function maybeSetContentEditable(vnode) {
		if (vnode.attrs == null || (
			vnode.attrs.contenteditable == null && // attribute
			vnode.attrs.contentEditable == null // property
		)) return false
		var children = vnode.children;
		if (children != null && children.length === 1 && children[0].tag === "<") {
			var content = children[0].children;
			if (vnode.dom.innerHTML !== content) vnode.dom.innerHTML = content;
		}
		else if (children != null && children.length !== 0) throw new Error("Child node of a contenteditable must be trusted.")
		return true
	}

	//remove
	function removeNodes(parent, vnodes, start, end) {
		for (var i = start; i < end; i++) {
			var vnode = vnodes[i];
			if (vnode != null) removeNode(parent, vnode);
		}
	}
	function removeNode(parent, vnode) {
		var mask = 0;
		var original = vnode.state;
		var stateResult, attrsResult;
		if (typeof vnode.tag !== "string" && typeof vnode.state.onbeforeremove === "function") {
			var result = callHook.call(vnode.state.onbeforeremove, vnode);
			if (result != null && typeof result.then === "function") {
				mask = 1;
				stateResult = result;
			}
		}
		if (vnode.attrs && typeof vnode.attrs.onbeforeremove === "function") {
			var result = callHook.call(vnode.attrs.onbeforeremove, vnode);
			if (result != null && typeof result.then === "function") {
				// eslint-disable-next-line no-bitwise
				mask |= 2;
				attrsResult = result;
			}
		}
		checkState(vnode, original);

		// If we can, try to fast-path it and avoid all the overhead of awaiting
		if (!mask) {
			onremove(vnode);
			removeChild(parent, vnode);
		} else {
			if (stateResult != null) {
				var next = function () {
					// eslint-disable-next-line no-bitwise
					if (mask & 1) { mask &= 2; if (!mask) reallyRemove(); }
				};
				stateResult.then(next, next);
			}
			if (attrsResult != null) {
				var next = function () {
					// eslint-disable-next-line no-bitwise
					if (mask & 2) { mask &= 1; if (!mask) reallyRemove(); }
				};
				attrsResult.then(next, next);
			}
		}

		function reallyRemove() {
			checkState(vnode, original);
			onremove(vnode);
			removeChild(parent, vnode);
		}
	}
	function removeHTML(parent, vnode) {
		for (var i = 0; i < vnode.instance.length; i++) {
			parent.removeChild(vnode.instance[i]);
		}
	}
	function removeChild(parent, vnode) {
		// Dodge the recursion overhead in a few of the most common cases.
		while (vnode.dom != null && vnode.dom.parentNode === parent) {
			if (typeof vnode.tag !== "string") {
				vnode = vnode.instance;
				if (vnode != null) continue
			} else if (vnode.tag === "<") {
				removeHTML(parent, vnode);
			} else {
				if (vnode.tag !== "[") {
					parent.removeChild(vnode.dom);
					if (!Array.isArray(vnode.children)) break
				}
				if (vnode.children.length === 1) {
					vnode = vnode.children[0];
					if (vnode != null) continue
				} else {
					for (var i = 0; i < vnode.children.length; i++) {
						var child = vnode.children[i];
						if (child != null) removeChild(parent, child);
					}
				}
			}
			break
		}
	}
	function onremove(vnode) {
		if (typeof vnode.tag !== "string" && typeof vnode.state.onremove === "function") callHook.call(vnode.state.onremove, vnode);
		if (vnode.attrs && typeof vnode.attrs.onremove === "function") callHook.call(vnode.attrs.onremove, vnode);
		if (typeof vnode.tag !== "string") {
			if (vnode.instance != null) onremove(vnode.instance);
		} else {
			var children = vnode.children;
			if (Array.isArray(children)) {
				for (var i = 0; i < children.length; i++) {
					var child = children[i];
					if (child != null) onremove(child);
				}
			}
		}
	}

	//attrs
	function setAttrs(vnode, attrs, ns) {
		// If you assign an input type that is not supported by IE 11 with an assignment expression, an error will occur.
		//
		// Also, the DOM does things to inputs based on the value, so it needs set first.
		// See: https://github.com/MithrilJS/mithril.js/issues/2622
		if (vnode.tag === "input" && attrs.type != null) vnode.dom.setAttribute("type", attrs.type);
		var isFileInput = attrs != null && vnode.tag === "input" && attrs.type === "file";
		for (var key in attrs) {
			setAttr(vnode, key, null, attrs[key], ns, isFileInput);
		}
	}
	function setAttr(vnode, key, old, value, ns, isFileInput) {
		if (key === "key" || key === "is" || value == null || isLifecycleMethod(key) || (old === value && !isFormAttribute(vnode, key)) && typeof value !== "object" || key === "type" && vnode.tag === "input") return
		if (key[0] === "o" && key[1] === "n") return updateEvent(vnode, key, value)
		if (key.slice(0, 6) === "xlink:") vnode.dom.setAttributeNS("http://www.w3.org/1999/xlink", key.slice(6), value);
		else if (key === "style") updateStyle(vnode.dom, old, value);
		else if (hasPropertyKey(vnode, key, ns)) {
			if (key === "value") {
				// Only do the coercion if we're actually going to check the value.
				/* eslint-disable no-implicit-coercion */
				//setting input[value] to same value by typing on focused element moves cursor to end in Chrome
				//setting input[type=file][value] to same value causes an error to be generated if it's non-empty
				if ((vnode.tag === "input" || vnode.tag === "textarea") && vnode.dom.value === "" + value && (isFileInput || vnode.dom === activeElement())) return
				//setting select[value] to same value while having select open blinks select dropdown in Chrome
				if (vnode.tag === "select" && old !== null && vnode.dom.value === "" + value) return
				//setting option[value] to same value while having select open blinks select dropdown in Chrome
				if (vnode.tag === "option" && old !== null && vnode.dom.value === "" + value) return
				//setting input[type=file][value] to different value is an error if it's non-empty
				// Not ideal, but it at least works around the most common source of uncaught exceptions for now.
				if (isFileInput && "" + value !== "") { console.error("`value` is read-only on file inputs!"); return }
				/* eslint-enable no-implicit-coercion */
			}
			vnode.dom[key] = value;
		} else {
			if (typeof value === "boolean") {
				if (value) vnode.dom.setAttribute(key, "");
				else vnode.dom.removeAttribute(key);
			}
			else vnode.dom.setAttribute(key === "className" ? "class" : key, value);
		}
	}
	function removeAttr(vnode, key, old, ns) {
		if (key === "key" || key === "is" || old == null || isLifecycleMethod(key)) return
		if (key[0] === "o" && key[1] === "n") updateEvent(vnode, key, undefined);
		else if (key === "style") updateStyle(vnode.dom, old, null);
		else if (
			hasPropertyKey(vnode, key, ns)
			&& key !== "className"
			&& key !== "title" // creates "null" as title
			&& !(key === "value" && (
				vnode.tag === "option"
				|| vnode.tag === "select" && vnode.dom.selectedIndex === -1 && vnode.dom === activeElement()
			))
			&& !(vnode.tag === "input" && key === "type")
		) {
			vnode.dom[key] = null;
		} else {
			var nsLastIndex = key.indexOf(":");
			if (nsLastIndex !== -1) key = key.slice(nsLastIndex + 1);
			if (old !== false) vnode.dom.removeAttribute(key === "className" ? "class" : key);
		}
	}
	function setLateSelectAttrs(vnode, attrs) {
		if ("value" in attrs) {
			if(attrs.value === null) {
				if (vnode.dom.selectedIndex !== -1) vnode.dom.value = null;
			} else {
				var normalized = "" + attrs.value; // eslint-disable-line no-implicit-coercion
				if (vnode.dom.value !== normalized || vnode.dom.selectedIndex === -1) {
					vnode.dom.value = normalized;
				}
			}
		}
		if ("selectedIndex" in attrs) setAttr(vnode, "selectedIndex", null, attrs.selectedIndex, undefined);
	}
	function updateAttrs(vnode, old, attrs, ns) {
		if (old && old === attrs) {
			console.warn("Don't reuse attrs object, use new object for every redraw, this will throw in next major");
		}
		if (attrs != null) {
			// If you assign an input type that is not supported by IE 11 with an assignment expression, an error will occur.
			//
			// Also, the DOM does things to inputs based on the value, so it needs set first.
			// See: https://github.com/MithrilJS/mithril.js/issues/2622
			if (vnode.tag === "input" && attrs.type != null) vnode.dom.setAttribute("type", attrs.type);
			var isFileInput = vnode.tag === "input" && attrs.type === "file";
			for (var key in attrs) {
				setAttr(vnode, key, old && old[key], attrs[key], ns, isFileInput);
			}
		}
		var val;
		if (old != null) {
			for (var key in old) {
				if (((val = old[key]) != null) && (attrs == null || attrs[key] == null)) {
					removeAttr(vnode, key, val, ns);
				}
			}
		}
	}
	function isFormAttribute(vnode, attr) {
		return attr === "value" || attr === "checked" || attr === "selectedIndex" || attr === "selected" && vnode.dom === activeElement() || vnode.tag === "option" && vnode.dom.parentNode === $doc.activeElement
	}
	function isLifecycleMethod(attr) {
		return attr === "oninit" || attr === "oncreate" || attr === "onupdate" || attr === "onremove" || attr === "onbeforeremove" || attr === "onbeforeupdate"
	}
	function hasPropertyKey(vnode, key, ns) {
		// Filter out namespaced keys
		return ns === undefined && (
			// If it's a custom element, just keep it.
			vnode.tag.indexOf("-") > -1 || vnode.attrs != null && vnode.attrs.is ||
			// If it's a normal element, let's try to avoid a few browser bugs.
			key !== "href" && key !== "list" && key !== "form" && key !== "width" && key !== "height"// && key !== "type"
			// Defer the property check until *after* we check everything.
		) && key in vnode.dom
	}

	//style
	var uppercaseRegex = /[A-Z]/g;
	function toLowerCase(capital) { return "-" + capital.toLowerCase() }
	function normalizeKey(key) {
		return key[0] === "-" && key[1] === "-" ? key :
			key === "cssFloat" ? "float" :
				key.replace(uppercaseRegex, toLowerCase)
	}
	function updateStyle(element, old, style) {
		if (old === style) ; else if (style == null) {
			// New style is missing, just clear it.
			element.style.cssText = "";
		} else if (typeof style !== "object") {
			// New style is a string, let engine deal with patching.
			element.style.cssText = style;
		} else if (old == null || typeof old !== "object") {
			// `old` is missing or a string, `style` is an object.
			element.style.cssText = "";
			// Add new style properties
			for (var key in style) {
				var value = style[key];
				if (value != null) element.style.setProperty(normalizeKey(key), String(value));
			}
		} else {
			// Both old & new are (different) objects.
			// Update style properties that have changed
			for (var key in style) {
				var value = style[key];
				if (value != null && (value = String(value)) !== String(old[key])) {
					element.style.setProperty(normalizeKey(key), value);
				}
			}
			// Remove style properties that no longer exist
			for (var key in old) {
				if (old[key] != null && style[key] == null) {
					element.style.removeProperty(normalizeKey(key));
				}
			}
		}
	}

	// Here's an explanation of how this works:
	// 1. The event names are always (by design) prefixed by `on`.
	// 2. The EventListener interface accepts either a function or an object
	//    with a `handleEvent` method.
	// 3. The object does not inherit from `Object.prototype`, to avoid
	//    any potential interference with that (e.g. setters).
	// 4. The event name is remapped to the handler before calling it.
	// 5. In function-based event handlers, `ev.target === this`. We replicate
	//    that below.
	// 6. In function-based event handlers, `return false` prevents the default
	//    action and stops event propagation. We replicate that below.
	function EventDict() {
		// Save this, so the current redraw is correctly tracked.
		this._ = currentRedraw;
	}
	EventDict.prototype = Object.create(null);
	EventDict.prototype.handleEvent = function (ev) {
		var handler = this["on" + ev.type];
		var result;
		if (typeof handler === "function") result = handler.call(ev.currentTarget, ev);
		else if (typeof handler.handleEvent === "function") handler.handleEvent(ev);
		if (this._ && ev.redraw !== false) (0, this._)();
		if (result === false) {
			ev.preventDefault();
			ev.stopPropagation();
		}
	};

	//event
	function updateEvent(vnode, key, value) {
		if (vnode.events != null) {
			vnode.events._ = currentRedraw;
			if (vnode.events[key] === value) return
			if (value != null && (typeof value === "function" || typeof value === "object")) {
				if (vnode.events[key] == null) vnode.dom.addEventListener(key.slice(2), vnode.events, false);
				vnode.events[key] = value;
			} else {
				if (vnode.events[key] != null) vnode.dom.removeEventListener(key.slice(2), vnode.events, false);
				vnode.events[key] = undefined;
			}
		} else if (value != null && (typeof value === "function" || typeof value === "object")) {
			vnode.events = new EventDict();
			vnode.dom.addEventListener(key.slice(2), vnode.events, false);
			vnode.events[key] = value;
		}
	}

	//lifecycle
	function initLifecycle(source, vnode, hooks) {
		if (typeof source.oninit === "function") callHook.call(source.oninit, vnode);
		if (typeof source.oncreate === "function") hooks.push(callHook.bind(source.oncreate, vnode));
	}
	function updateLifecycle(source, vnode, hooks) {
		if (typeof source.onupdate === "function") hooks.push(callHook.bind(source.onupdate, vnode));
	}
	function shouldNotUpdate(vnode, old) {
		do {
			if (vnode.attrs != null && typeof vnode.attrs.onbeforeupdate === "function") {
				var force = callHook.call(vnode.attrs.onbeforeupdate, vnode, old);
				if (force !== undefined && !force) break
			}
			if (typeof vnode.tag !== "string" && typeof vnode.state.onbeforeupdate === "function") {
				var force = callHook.call(vnode.state.onbeforeupdate, vnode, old);
				if (force !== undefined && !force) break
			}
			return false
		} while (false); // eslint-disable-line no-constant-condition
		vnode.dom = old.dom;
		vnode.domSize = old.domSize;
		vnode.instance = old.instance;
		// One would think having the actual latest attributes would be ideal,
		// but it doesn't let us properly diff based on our current internal
		// representation. We have to save not only the old DOM info, but also
		// the attributes used to create it, as we diff *that*, not against the
		// DOM directly (with a few exceptions in `setAttr`). And, of course, we
		// need to save the children and text as they are conceptually not
		// unlike special "attributes" internally.
		vnode.attrs = old.attrs;
		vnode.children = old.children;
		vnode.text = old.text;
		return true
	}

	var currentDOM;

	return function(dom, vnodes, redraw) {
		if (!dom) throw new TypeError("DOM element being rendered to does not exist.")
		if (currentDOM != null && dom.contains(currentDOM)) {
			throw new TypeError("Node is currently being rendered to and thus is locked.")
		}
		var prevRedraw = currentRedraw;
		var prevDOM = currentDOM;
		var hooks = [];
		var active = activeElement();
		var namespace = dom.namespaceURI;

		currentDOM = dom;
		currentRedraw = typeof redraw === "function" ? redraw : undefined;
		try {
			// First time rendering into a node clears it out
			if (dom.vnodes == null) dom.textContent = "";
			vnodes = vnode.normalizeChildren(Array.isArray(vnodes) ? vnodes : [vnodes]);
			updateNodes(dom, dom.vnodes, vnodes, hooks, null, namespace === "http://www.w3.org/1999/xhtml" ? undefined : namespace);
			dom.vnodes = vnodes;
			// `document.activeElement` can return null: https://html.spec.whatwg.org/multipage/interaction.html#dom-document-activeelement
			if (active != null && activeElement() !== active && typeof active.focus === "function") active.focus();
			for (var i = 0; i < hooks.length; i++) hooks[i]();
		} finally {
			currentRedraw = prevRedraw;
			currentDOM = prevDOM;
		}
	}
};

var render$1 = render(typeof window !== "undefined" ? window : null);

var mountRedraw = function(render, schedule, console) {
	var subscriptions = [];
	var pending = false;
	var offset = -1;

	function sync() {
		for (offset = 0; offset < subscriptions.length; offset += 2) {
			try { render(subscriptions[offset], vnode(subscriptions[offset + 1]), redraw); }
			catch (e) { console.error(e); }
		}
		offset = -1;
	}

	function redraw() {
		if (!pending) {
			pending = true;
			schedule(function() {
				pending = false;
				sync();
			});
		}
	}

	redraw.sync = sync;

	function mount(root, component) {
		if (component != null && component.view == null && typeof component !== "function") {
			throw new TypeError("m.mount expects a component, not a vnode.")
		}

		var index = subscriptions.indexOf(root);
		if (index >= 0) {
			subscriptions.splice(index, 2);
			if (index <= offset) offset -= 2;
			render(root, []);
		}

		if (component != null) {
			subscriptions.push(root, component);
			render(root, vnode(component), redraw);
		}
	}

	return {mount: mount, redraw: redraw}
};

var mountRedraw$1 = mountRedraw(render$1, typeof requestAnimationFrame !== "undefined" ? requestAnimationFrame : null, typeof console !== "undefined" ? console : null);

var build = function(object) {
	if (Object.prototype.toString.call(object) !== "[object Object]") return ""

	var args = [];
	for (var key in object) {
		destructure(key, object[key]);
	}

	return args.join("&")

	function destructure(key, value) {
		if (Array.isArray(value)) {
			for (var i = 0; i < value.length; i++) {
				destructure(key + "[" + i + "]", value[i]);
			}
		}
		else if (Object.prototype.toString.call(value) === "[object Object]") {
			for (var i in value) {
				destructure(key + "[" + i + "]", value[i]);
			}
		}
		else args.push(encodeURIComponent(key) + (value != null && value !== "" ? "=" + encodeURIComponent(value) : ""));
	}
};

var assign = Object.assign || function(target, source) {
	for (var key in source) {
		if (hasOwn.call(source, key)) target[key] = source[key];
	}
};

// Returns `path` from `template` + `params`
var build$1 = function(template, params) {
	if ((/:([^\/\.-]+)(\.{3})?:/).test(template)) {
		throw new SyntaxError("Template parameter names must be separated by either a '/', '-', or '.'.")
	}
	if (params == null) return template
	var queryIndex = template.indexOf("?");
	var hashIndex = template.indexOf("#");
	var queryEnd = hashIndex < 0 ? template.length : hashIndex;
	var pathEnd = queryIndex < 0 ? queryEnd : queryIndex;
	var path = template.slice(0, pathEnd);
	var query = {};

	assign(query, params);

	var resolved = path.replace(/:([^\/\.-]+)(\.{3})?/g, function(m, key, variadic) {
		delete query[key];
		// If no such parameter exists, don't interpolate it.
		if (params[key] == null) return m
		// Escape normal parameters, but not variadic ones.
		return variadic ? params[key] : encodeURIComponent(String(params[key]))
	});

	// In case the template substitution adds new query/hash parameters.
	var newQueryIndex = resolved.indexOf("?");
	var newHashIndex = resolved.indexOf("#");
	var newQueryEnd = newHashIndex < 0 ? resolved.length : newHashIndex;
	var newPathEnd = newQueryIndex < 0 ? newQueryEnd : newQueryIndex;
	var result = resolved.slice(0, newPathEnd);

	if (queryIndex >= 0) result += template.slice(queryIndex, queryEnd);
	if (newQueryIndex >= 0) result += (queryIndex < 0 ? "?" : "&") + resolved.slice(newQueryIndex, newQueryEnd);
	var querystring = build(query);
	if (querystring) result += (queryIndex < 0 && newQueryIndex < 0 ? "?" : "&") + querystring;
	if (hashIndex >= 0) result += template.slice(hashIndex);
	if (newHashIndex >= 0) result += (hashIndex < 0 ? "" : "&") + resolved.slice(newHashIndex);
	return result
};

var request = function($window, Promise, oncompletion) {
	var callbackCount = 0;

	function PromiseProxy(executor) {
		return new Promise(executor)
	}

	// In case the global Promise is some userland library's where they rely on
	// `foo instanceof this.constructor`, `this.constructor.resolve(value)`, or
	// similar. Let's *not* break them.
	PromiseProxy.prototype = Promise.prototype;
	PromiseProxy.__proto__ = Promise; // eslint-disable-line no-proto

	function makeRequest(factory) {
		return function(url, args) {
			if (typeof url !== "string") { args = url; url = url.url; }
			else if (args == null) args = {};
			var promise = new Promise(function(resolve, reject) {
				factory(build$1(url, args.params), args, function (data) {
					if (typeof args.type === "function") {
						if (Array.isArray(data)) {
							for (var i = 0; i < data.length; i++) {
								data[i] = new args.type(data[i]);
							}
						}
						else data = new args.type(data);
					}
					resolve(data);
				}, reject);
			});
			if (args.background === true) return promise
			var count = 0;
			function complete() {
				if (--count === 0 && typeof oncompletion === "function") oncompletion();
			}

			return wrap(promise)

			function wrap(promise) {
				var then = promise.then;
				// Set the constructor, so engines know to not await or resolve
				// this as a native promise. At the time of writing, this is
				// only necessary for V8, but their behavior is the correct
				// behavior per spec. See this spec issue for more details:
				// https://github.com/tc39/ecma262/issues/1577. Also, see the
				// corresponding comment in `request/tests/test-request.js` for
				// a bit more background on the issue at hand.
				promise.constructor = PromiseProxy;
				promise.then = function() {
					count++;
					var next = then.apply(promise, arguments);
					next.then(complete, function(e) {
						complete();
						if (count === 0) throw e
					});
					return wrap(next)
				};
				return promise
			}
		}
	}

	function hasHeader(args, name) {
		for (var key in args.headers) {
			if (hasOwn.call(args.headers, key) && key.toLowerCase() === name) return true
		}
		return false
	}

	return {
		request: makeRequest(function(url, args, resolve, reject) {
			var method = args.method != null ? args.method.toUpperCase() : "GET";
			var body = args.body;
			var assumeJSON = (args.serialize == null || args.serialize === JSON.serialize) && !(body instanceof $window.FormData || body instanceof $window.URLSearchParams);
			var responseType = args.responseType || (typeof args.extract === "function" ? "" : "json");

			var xhr = new $window.XMLHttpRequest(), aborted = false, isTimeout = false;
			var original = xhr, replacedAbort;
			var abort = xhr.abort;

			xhr.abort = function() {
				aborted = true;
				abort.call(this);
			};

			xhr.open(method, url, args.async !== false, typeof args.user === "string" ? args.user : undefined, typeof args.password === "string" ? args.password : undefined);

			if (assumeJSON && body != null && !hasHeader(args, "content-type")) {
				xhr.setRequestHeader("Content-Type", "application/json; charset=utf-8");
			}
			if (typeof args.deserialize !== "function" && !hasHeader(args, "accept")) {
				xhr.setRequestHeader("Accept", "application/json, text/*");
			}
			if (args.withCredentials) xhr.withCredentials = args.withCredentials;
			if (args.timeout) xhr.timeout = args.timeout;
			xhr.responseType = responseType;

			for (var key in args.headers) {
				if (hasOwn.call(args.headers, key)) {
					xhr.setRequestHeader(key, args.headers[key]);
				}
			}

			xhr.onreadystatechange = function(ev) {
				// Don't throw errors on xhr.abort().
				if (aborted) return

				if (ev.target.readyState === 4) {
					try {
						var success = (ev.target.status >= 200 && ev.target.status < 300) || ev.target.status === 304 || (/^file:\/\//i).test(url);
						// When the response type isn't "" or "text",
						// `xhr.responseText` is the wrong thing to use.
						// Browsers do the right thing and throw here, and we
						// should honor that and do the right thing by
						// preferring `xhr.response` where possible/practical.
						var response = ev.target.response, message;

						if (responseType === "json") {
							// For IE and Edge, which don't implement
							// `responseType: "json"`.
							if (!ev.target.responseType && typeof args.extract !== "function") {
								// Handle no-content which will not parse.
								try { response = JSON.parse(ev.target.responseText); }
								catch (e) { response = null; }
							}
						} else if (!responseType || responseType === "text") {
							// Only use this default if it's text. If a parsed
							// document is needed on old IE and friends (all
							// unsupported), the user should use a custom
							// `config` instead. They're already using this at
							// their own risk.
							if (response == null) response = ev.target.responseText;
						}

						if (typeof args.extract === "function") {
							response = args.extract(ev.target, args);
							success = true;
						} else if (typeof args.deserialize === "function") {
							response = args.deserialize(response);
						}
						if (success) resolve(response);
						else {
							var completeErrorResponse = function() {
								try { message = ev.target.responseText; }
								catch (e) { message = response; }
								var error = new Error(message);
								error.code = ev.target.status;
								error.response = response;
								reject(error);
							};

							if (xhr.status === 0) {
								// Use setTimeout to push this code block onto the event queue
								// This allows `xhr.ontimeout` to run in the case that there is a timeout
								// Without this setTimeout, `xhr.ontimeout` doesn't have a chance to reject
								// as `xhr.onreadystatechange` will run before it
								setTimeout(function() {
									if (isTimeout) return
									completeErrorResponse();
								});
							} else completeErrorResponse();
						}
					}
					catch (e) {
						reject(e);
					}
				}
			};

			xhr.ontimeout = function (ev) {
				isTimeout = true;
				var error = new Error("Request timed out");
				error.code = ev.target.status;
				reject(error);
			};

			if (typeof args.config === "function") {
				xhr = args.config(xhr, args, url) || xhr;

				// Propagate the `abort` to any replacement XHR as well.
				if (xhr !== original) {
					replacedAbort = xhr.abort;
					xhr.abort = function() {
						aborted = true;
						replacedAbort.call(this);
					};
				}
			}

			if (body == null) xhr.send();
			else if (typeof args.serialize === "function") xhr.send(args.serialize(body));
			else if (body instanceof $window.FormData || body instanceof $window.URLSearchParams) xhr.send(body);
			else xhr.send(JSON.stringify(body));
		}),
		jsonp: makeRequest(function(url, args, resolve, reject) {
			var callbackName = args.callbackName || "_mithril_" + Math.round(Math.random() * 1e16) + "_" + callbackCount++;
			var script = $window.document.createElement("script");
			$window[callbackName] = function(data) {
				delete $window[callbackName];
				script.parentNode.removeChild(script);
				resolve(data);
			};
			script.onerror = function() {
				delete $window[callbackName];
				script.parentNode.removeChild(script);
				reject(new Error("JSONP request failed"));
			};
			script.src = url + (url.indexOf("?") < 0 ? "?" : "&") +
				encodeURIComponent(args.callbackKey || "callback") + "=" +
				encodeURIComponent(callbackName);
			$window.document.documentElement.appendChild(script);
		}),
	}
};

var request$1 = request(typeof window !== "undefined" ? window : null, promise, mountRedraw$1.redraw);

function decodeURIComponentSave(str) {
	try {
		return decodeURIComponent(str)
	} catch(err) {
		return str
	}
}

var parse = function(string) {
	if (string === "" || string == null) return {}
	if (string.charAt(0) === "?") string = string.slice(1);

	var entries = string.split("&"), counters = {}, data = {};
	for (var i = 0; i < entries.length; i++) {
		var entry = entries[i].split("=");
		var key = decodeURIComponentSave(entry[0]);
		var value = entry.length === 2 ? decodeURIComponentSave(entry[1]) : "";

		if (value === "true") value = true;
		else if (value === "false") value = false;

		var levels = key.split(/\]\[?|\[/);
		var cursor = data;
		if (key.indexOf("[") > -1) levels.pop();
		for (var j = 0; j < levels.length; j++) {
			var level = levels[j], nextLevel = levels[j + 1];
			var isNumber = nextLevel == "" || !isNaN(parseInt(nextLevel, 10));
			if (level === "") {
				var key = levels.slice(0, j).join();
				if (counters[key] == null) {
					counters[key] = Array.isArray(cursor) ? cursor.length : 0;
				}
				level = counters[key]++;
			}
			// Disallow direct prototype pollution
			else if (level === "__proto__") break
			if (j === levels.length - 1) cursor[level] = value;
			else {
				// Read own properties exclusively to disallow indirect
				// prototype pollution
				var desc = Object.getOwnPropertyDescriptor(cursor, level);
				if (desc != null) desc = desc.value;
				if (desc == null) cursor[level] = desc = isNumber ? [] : {};
				cursor = desc;
			}
		}
	}
	return data
};

// Returns `{path, params}` from `url`
var parse$1 = function(url) {
	var queryIndex = url.indexOf("?");
	var hashIndex = url.indexOf("#");
	var queryEnd = hashIndex < 0 ? url.length : hashIndex;
	var pathEnd = queryIndex < 0 ? queryEnd : queryIndex;
	var path = url.slice(0, pathEnd).replace(/\/{2,}/g, "/");

	if (!path) path = "/";
	else {
		if (path[0] !== "/") path = "/" + path;
		if (path.length > 1 && path[path.length - 1] === "/") path = path.slice(0, -1);
	}
	return {
		path: path,
		params: queryIndex < 0
			? {}
			: parse(url.slice(queryIndex + 1, queryEnd)),
	}
};

// Compiles a template into a function that takes a resolved path (without query
// strings) and returns an object containing the template parameters with their
// parsed values. This expects the input of the compiled template to be the
// output of `parsePathname`. Note that it does *not* remove query parameters
// specified in the template.
var compileTemplate = function(template) {
	var templateData = parse$1(template);
	var templateKeys = Object.keys(templateData.params);
	var keys = [];
	var regexp = new RegExp("^" + templateData.path.replace(
		// I escape literal text so people can use things like `:file.:ext` or
		// `:lang-:locale` in routes. This is all merged into one pass so I
		// don't also accidentally escape `-` and make it harder to detect it to
		// ban it from template parameters.
		/:([^\/.-]+)(\.{3}|\.(?!\.)|-)?|[\\^$*+.()|\[\]{}]/g,
		function(m, key, extra) {
			if (key == null) return "\\" + m
			keys.push({k: key, r: extra === "..."});
			if (extra === "...") return "(.*)"
			if (extra === ".") return "([^/]+)\\."
			return "([^/]+)" + (extra || "")
		}
	) + "$");
	return function(data) {
		// First, check the params. Usually, there isn't any, and it's just
		// checking a static set.
		for (var i = 0; i < templateKeys.length; i++) {
			if (templateData.params[templateKeys[i]] !== data.params[templateKeys[i]]) return false
		}
		// If no interpolations exist, let's skip all the ceremony
		if (!keys.length) return regexp.test(data.path)
		var values = regexp.exec(data.path);
		if (values == null) return false
		for (var i = 0; i < keys.length; i++) {
			data.params[keys[i].k] = keys[i].r ? values[i + 1] : decodeURIComponent(values[i + 1]);
		}
		return true
	}
};

// Note: this is mildly perf-sensitive.
//
// It does *not* use `delete` - dynamic `delete`s usually cause objects to bail
// out into dictionary mode and just generally cause a bunch of optimization
// issues within engines.
//
// Ideally, I would've preferred to do this, if it weren't for the optimization
// issues:
//
// ```js
// const hasOwn = require("./hasOwn")
// const magic = [
//     "key", "oninit", "oncreate", "onbeforeupdate", "onupdate",
//     "onbeforeremove", "onremove",
// ]
// module.exports = (attrs, extras) => {
//     const result = Object.assign(Object.create(null), attrs)
//     for (const key of magic) delete result[key]
//     if (extras != null) for (const key of extras) delete result[key]
//     return result
// }
// ```


// Words in RegExp literals are sometimes mangled incorrectly by the internal bundler, so use RegExp().
var magic = new RegExp("^(?:key|oninit|oncreate|onbeforeupdate|onupdate|onbeforeremove|onremove)$");

var censor = function(attrs, extras) {
	var result = {};

	if (extras != null) {
		for (var key in attrs) {
			if (hasOwn.call(attrs, key) && !magic.test(key) && extras.indexOf(key) < 0) {
				result[key] = attrs[key];
			}
		}
	} else {
		for (var key in attrs) {
			if (hasOwn.call(attrs, key) && !magic.test(key)) {
				result[key] = attrs[key];
			}
		}
	}

	return result
};

var sentinel = {};

function decodeURIComponentSave$1(component) {
	try {
		return decodeURIComponent(component)
	} catch(e) {
		return component
	}
}

var router = function($window, mountRedraw) {
	var callAsync = $window == null
		// In case Mithril.js' loaded globally without the DOM, let's not break
		? null
		: typeof $window.setImmediate === "function" ? $window.setImmediate : $window.setTimeout;
	var p = promise.resolve();

	var scheduled = false;

	// state === 0: init
	// state === 1: scheduled
	// state === 2: done
	var ready = false;
	var state = 0;

	var compiled, fallbackRoute;

	var currentResolver = sentinel, component, attrs, currentPath, lastUpdate;

	var RouterRoot = {
		onbeforeupdate: function() {
			state = state ? 2 : 1;
			return !(!state || sentinel === currentResolver)
		},
		onremove: function() {
			$window.removeEventListener("popstate", fireAsync, false);
			$window.removeEventListener("hashchange", resolveRoute, false);
		},
		view: function() {
			if (!state || sentinel === currentResolver) return
			// Wrap in a fragment to preserve existing key semantics
			var vnode$1 = [vnode(component, attrs.key, attrs)];
			if (currentResolver) vnode$1 = currentResolver.render(vnode$1[0]);
			return vnode$1
		},
	};

	var SKIP = route.SKIP = {};

	function resolveRoute() {
		scheduled = false;
		// Consider the pathname holistically. The prefix might even be invalid,
		// but that's not our problem.
		var prefix = $window.location.hash;
		if (route.prefix[0] !== "#") {
			prefix = $window.location.search + prefix;
			if (route.prefix[0] !== "?") {
				prefix = $window.location.pathname + prefix;
				if (prefix[0] !== "/") prefix = "/" + prefix;
			}
		}
		// This seemingly useless `.concat()` speeds up the tests quite a bit,
		// since the representation is consistently a relatively poorly
		// optimized cons string.
		var path = prefix.concat()
			.replace(/(?:%[a-f89][a-f0-9])+/gim, decodeURIComponentSave$1)
			.slice(route.prefix.length);
		var data = parse$1(path);

		assign(data.params, $window.history.state);

		function reject(e) {
			console.error(e);
			setPath(fallbackRoute, null, {replace: true});
		}

		loop(0);
		function loop(i) {
			// state === 0: init
			// state === 1: scheduled
			// state === 2: done
			for (; i < compiled.length; i++) {
				if (compiled[i].check(data)) {
					var payload = compiled[i].component;
					var matchedRoute = compiled[i].route;
					var localComp = payload;
					var update = lastUpdate = function(comp) {
						if (update !== lastUpdate) return
						if (comp === SKIP) return loop(i + 1)
						component = comp != null && (typeof comp.view === "function" || typeof comp === "function")? comp : "div";
						attrs = data.params, currentPath = path, lastUpdate = null;
						currentResolver = payload.render ? payload : null;
						if (state === 2) mountRedraw.redraw();
						else {
							state = 2;
							mountRedraw.redraw.sync();
						}
					};
					// There's no understating how much I *wish* I could
					// use `async`/`await` here...
					if (payload.view || typeof payload === "function") {
						payload = {};
						update(localComp);
					}
					else if (payload.onmatch) {
						p.then(function () {
							return payload.onmatch(data.params, path, matchedRoute)
						}).then(update, path === fallbackRoute ? null : reject);
					}
					else update("div");
					return
				}
			}

			if (path === fallbackRoute) {
				throw new Error("Could not resolve default route " + fallbackRoute + ".")
			}
			setPath(fallbackRoute, null, {replace: true});
		}
	}

	// Set it unconditionally so `m.route.set` and `m.route.Link` both work,
	// even if neither `pushState` nor `hashchange` are supported. It's
	// cleared if `hashchange` is used, since that makes it automatically
	// async.
	function fireAsync() {
		if (!scheduled) {
			scheduled = true;
			// TODO: just do `mountRedraw.redraw()` here and elide the timer
			// dependency. Note that this will muck with tests a *lot*, so it's
			// not as easy of a change as it sounds.
			callAsync(resolveRoute);
		}
	}

	function setPath(path, data, options) {
		path = build$1(path, data);
		if (ready) {
			fireAsync();
			var state = options ? options.state : null;
			var title = options ? options.title : null;
			if (options && options.replace) $window.history.replaceState(state, title, route.prefix + path);
			else $window.history.pushState(state, title, route.prefix + path);
		}
		else {
			$window.location.href = route.prefix + path;
		}
	}

	function route(root, defaultRoute, routes) {
		if (!root) throw new TypeError("DOM element being rendered to does not exist.")

		compiled = Object.keys(routes).map(function(route) {
			if (route[0] !== "/") throw new SyntaxError("Routes must start with a '/'.")
			if ((/:([^\/\.-]+)(\.{3})?:/).test(route)) {
				throw new SyntaxError("Route parameter names must be separated with either '/', '.', or '-'.")
			}
			return {
				route: route,
				component: routes[route],
				check: compileTemplate(route),
			}
		});
		fallbackRoute = defaultRoute;
		if (defaultRoute != null) {
			var defaultData = parse$1(defaultRoute);

			if (!compiled.some(function (i) { return i.check(defaultData) })) {
				throw new ReferenceError("Default route doesn't match any known routes.")
			}
		}

		if (typeof $window.history.pushState === "function") {
			$window.addEventListener("popstate", fireAsync, false);
		} else if (route.prefix[0] === "#") {
			$window.addEventListener("hashchange", resolveRoute, false);
		}

		ready = true;
		mountRedraw.mount(root, RouterRoot);
		resolveRoute();
	}
	route.set = function(path, data, options) {
		if (lastUpdate != null) {
			options = options || {};
			options.replace = true;
		}
		lastUpdate = null;
		setPath(path, data, options);
	};
	route.get = function() {return currentPath};
	route.prefix = "#!";
	route.Link = {
		view: function(vnode) {
			// Omit the used parameters from the rendered element - they are
			// internal. Also, censor the various lifecycle methods.
			//
			// We don't strip the other parameters because for convenience we
			// let them be specified in the selector as well.
			var child = hyperscript_1(
				vnode.attrs.selector || "a",
				censor(vnode.attrs, ["options", "params", "selector", "onclick"]),
				vnode.children
			);
			var options, onclick, href;

			// Let's provide a *right* way to disable a route link, rather than
			// letting people screw up accessibility on accident.
			//
			// The attribute is coerced so users don't get surprised over
			// `disabled: 0` resulting in a button that's somehow routable
			// despite being visibly disabled.
			if (child.attrs.disabled = Boolean(child.attrs.disabled)) {
				child.attrs.href = null;
				child.attrs["aria-disabled"] = "true";
				// If you *really* do want add `onclick` on a disabled link, use
				// an `oncreate` hook to add it.
			} else {
				options = vnode.attrs.options;
				onclick = vnode.attrs.onclick;
				// Easier to build it now to keep it isomorphic.
				href = build$1(child.attrs.href, vnode.attrs.params);
				child.attrs.href = route.prefix + href;
				child.attrs.onclick = function(e) {
					var result;
					if (typeof onclick === "function") {
						result = onclick.call(e.currentTarget, e);
					} else if (onclick == null || typeof onclick !== "object") ; else if (typeof onclick.handleEvent === "function") {
						onclick.handleEvent(e);
					}

					// Adapted from React Router's implementation:
					// https://github.com/ReactTraining/react-router/blob/520a0acd48ae1b066eb0b07d6d4d1790a1d02482/packages/react-router-dom/modules/Link.js
					//
					// Try to be flexible and intuitive in how we handle links.
					// Fun fact: links aren't as obvious to get right as you
					// would expect. There's a lot more valid ways to click a
					// link than this, and one might want to not simply click a
					// link, but right click or command-click it to copy the
					// link target, etc. Nope, this isn't just for blind people.
					if (
						// Skip if `onclick` prevented default
						result !== false && !e.defaultPrevented &&
						// Ignore everything but left clicks
						(e.button === 0 || e.which === 0 || e.which === 1) &&
						// Let the browser handle `target=_blank`, etc.
						(!e.currentTarget.target || e.currentTarget.target === "_self") &&
						// No modifier keys
						!e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey
					) {
						e.preventDefault();
						e.redraw = false;
						route.set(href, null, options);
					}
				};
			}
			return child
		},
	};
	route.param = function(key) {
		return attrs && key != null ? attrs[key] : attrs
	};

	return route
};

var route = router(typeof window !== "undefined" ? window : null, mountRedraw$1);

var m$1 = function m() { return hyperscript_1$1.apply(this, arguments) };
m$1.m = hyperscript_1$1;
m$1.trust = hyperscript_1$1.trust;
m$1.fragment = hyperscript_1$1.fragment;
m$1.Fragment = "[";
m$1.mount = mountRedraw$1.mount;
m$1.route = route;
m$1.render = render$1;
m$1.redraw = mountRedraw$1.redraw;
m$1.request = request$1.request;
m$1.jsonp = request$1.jsonp;
m$1.parseQueryString = parse;
m$1.buildQueryString = build;
m$1.parsePathname = parse$1;
m$1.buildPathname = build$1;
m$1.vnode = vnode;
m$1.PromisePolyfill = polyfill;
m$1.censor = censor;

var mithril = m$1;

var router$1 = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Router = exports.ROUTE_PREFIX = void 0;


exports.ROUTE_PREFIX = '#!';
const DEFAULT_ROUTE = '/';
// This router does two things:
// 1) Maps fragment paths (#!/page/subpage) to Mithril components.
// The route map is passed to the ctor and is later used when calling the
// resolve() method.
//
// 2) Handles the (optional) args, e.g. #!/page?arg=1&arg2=2.
// Route args are carry information that is orthogonal to the page (e.g. the
// trace id).
// local_cache_key has some special treatment: once a URL has a local_cache_key,
// it gets automatically appended to further navigations that don't have one.
// For instance if the current url is #!/viewer?local_cache_key=1234 and a later
// action (either user-initiated or code-initited) navigates to #!/info, the
// rotuer will automatically replace the history entry with
// #!/info?local_cache_key=1234.
// This is to keep propagating the trace id across page changes, for handling
// tab discards (b/175041881).
//
// This class does NOT deal with the "load a trace when the url contains ?url=
// or ?local_cache_key=". That logic lives in trace_url_handler.ts, which is
// triggered by Router.onRouteChanged().
class Router {
    constructor(routes) {
        this.recentChanges = [];
        // frontend/index.ts calls maybeOpenTraceFromRoute() + redraw here.
        // This event is decoupled for testing and to avoid circular deps.
        this.onRouteChanged = () => { };
        (0, logging.assertExists)(routes[DEFAULT_ROUTE]);
        this.routes = routes;
        window.onhashchange = (e) => this.onHashChange(e);
    }
    onHashChange(e) {
        this.crashIfLivelock();
        const oldRoute = Router.parseUrl(e.oldURL);
        const newRoute = Router.parseUrl(e.newURL);
        if (newRoute.args.local_cache_key === undefined &&
            oldRoute.args.local_cache_key) {
            // Propagate `local_cache_key across` navigations. When a trace is loaded,
            // the URL becomes #!/viewer?local_cache_key=123. `local_cache_key` allows
            // reopening the trace from cache in the case of a reload or discard.
            // When using the UI we can hit "bare" links (e.g. just '#!/info') which
            // don't have the trace_uuid:
            // - When clicking on an <a> element from the sidebar.
            // - When the code calls Router.navigate().
            // - When the user pastes a URL from docs page.
            // In all these cases we want to keep propagating the `local_cache_key`.
            // We do so by re-setting the `local_cache_key` and doing a
            // location.replace which overwrites the history entry (note
            // location.replace is NOT just a String.replace operation).
            newRoute.args.local_cache_key = oldRoute.args.local_cache_key;
        }
        const args = mithril.buildQueryString(newRoute.args);
        let normalizedFragment = `#!${newRoute.page}${newRoute.subpage}`;
        normalizedFragment += args.length > 0 ? '?' + args : '';
        if (!e.newURL.endsWith(normalizedFragment)) {
            location.replace(normalizedFragment);
            return;
        }
        this.onRouteChanged(newRoute);
    }
    // Returns the component for the current route in the URL.
    // If no route matches the URL, returns a component corresponding to
    // |this.defaultRoute|.
    resolve() {
        const route = Router.parseFragment(location.hash);
        let component = this.routes[route.page];
        if (component === undefined) {
            component = (0, logging.assertExists)(this.routes[DEFAULT_ROUTE]);
        }
        return mithril(component, { subpage: route.subpage });
    }
    static navigate(newHash) {
        (0, logging.assertTrue)(newHash.startsWith(exports.ROUTE_PREFIX));
        window.location.hash = newHash;
    }
    // Breaks down a fragment into a Route object.
    // Sample input:
    // '#!/record/gpu?local_cache_key=abcd-1234'
    // Sample output:
    // {page: '/record', subpage: '/gpu', args: {local_cache_key: 'abcd-1234'}}
    static parseFragment(hash) {
        const prefixLength = exports.ROUTE_PREFIX.length;
        let route = '';
        if (hash.startsWith(exports.ROUTE_PREFIX)) {
            route = hash.substr(prefixLength).split('?')[0];
        }
        let page = route;
        let subpage = '';
        const splittingPoint = route.indexOf('/', 1);
        if (splittingPoint > 0) {
            page = route.substr(0, splittingPoint);
            subpage = route.substr(splittingPoint);
        }
        const argsStart = hash.indexOf('?');
        const argsStr = argsStart < 0 ? '' : hash.substr(argsStart + 1);
        const args = argsStr ? mithril.parseQueryString(hash.substr(argsStart)) : {};
        // TODO(primiano): remove this in mid-2022. trace_id is the same concept of
        // local_cache_key. Just at some point we renamed it to make it more obvious
        // to people that those URLs cannot be copy-pasted in bugs. For now this
        // handles cases of reloading pages from old version.
        if ('trace_id' in args) {
            if (!('local_cache_key' in args)) {
                args['local_cache_key'] = args['trace_id'];
            }
            delete args['trace_id'];
        }
        return { page, subpage, args };
    }
    // Like parseFragment() but takes a full URL.
    static parseUrl(url) {
        const hashPos = url.indexOf('#');
        const fragment = hashPos < 0 ? '' : url.substr(hashPos);
        return Router.parseFragment(fragment);
    }
    // Throws if EVENT_LIMIT onhashchange events occur within WINDOW_MS.
    crashIfLivelock() {
        const WINDOW_MS = 1000;
        const EVENT_LIMIT = 20;
        const now = Date.now();
        while (this.recentChanges.length > 0 &&
            now - this.recentChanges[0] > WINDOW_MS) {
            this.recentChanges.shift();
        }
        this.recentChanges.push(now);
        if (this.recentChanges.length > EVENT_LIMIT) {
            throw new Error('History rewriting livelock');
        }
    }
}
exports.Router = Router;

});

var analytics = createCommonjsModule(function (module, exports) {
// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.NullAnalytics = exports.initAnalytics = void 0;




const ANALYTICS_ID = 'UA-137828855-1';
const PAGE_TITLE = 'no-page-title';
function initAnalytics() {
    // Only initialize logging on the official site and on localhost (to catch
    // analytics bugs when testing locally).
    // Skip analytics is the fragment has "testing=1", this is used by UI tests.
    if ((window.location.origin.startsWith('http://localhost:') ||
        window.location.origin.endsWith('.perfetto.dev')) &&
        !globals.globals.testing) {
        return new AnalyticsImpl();
    }
    return new NullAnalytics();
}
exports.initAnalytics = initAnalytics;
const gtagGlobals = window;
class NullAnalytics {
    initialize() { }
    updatePath(_) { }
    logEvent(_x, _y) { }
    logError(_x) { }
    isEnabled() {
        return false;
    }
}
exports.NullAnalytics = NullAnalytics;
class AnalyticsImpl {
    constructor() {
        this.initialized_ = false;
        // The code below is taken from the official Google Analytics docs [1] and
        // adapted to TypeScript. We have it here rather than as an inline script
        // in index.html (as suggested by GA's docs) because inline scripts don't
        // play nicely with the CSP policy, at least in Firefox (Firefox doesn't
        // support all CSP 3 features we use).
        // [1] https://developers.google.com/analytics/devguides/collection/gtagjs .
        gtagGlobals.dataLayer = gtagGlobals.dataLayer || [];
        function gtagFunction(..._) {
            // This needs to be a function and not a lambda. |arguments| behaves
            // slightly differently in a lambda and breaks GA.
            gtagGlobals.dataLayer.push(arguments);
        }
        gtagGlobals.gtag = gtagFunction;
        gtagGlobals.gtag('js', new Date());
    }
    // This is callled only after the script that sets isInternalUser loads.
    // It is fine to call updatePath() and log*() functions before initialize().
    // The gtag() function internally enqueues all requests into |dataLayer|.
    initialize() {
        if (this.initialized_)
            return;
        this.initialized_ = true;
        const script = document.createElement('script');
        script.src = 'https://www.googletagmanager.com/gtag/js?id=' + ANALYTICS_ID;
        script.defer = true;
        document.head.appendChild(script);
        const route = router$1.Router.parseUrl(window.location.href).page || '/';
        console.log(`GA initialized. route=${route}`, `isInternalUser=${globals.globals.isInternalUser}`);
        // GA's reccomendation for SPAs is to disable automatic page views and
        // manually send page_view events. See:
        // https://developers.google.com/analytics/devguides/collection/gtagjs/pages#manual_pageviews
        gtagGlobals.gtag('config', ANALYTICS_ID, {
            allow_google_signals: false,
            anonymize_ip: true,
            page_path: route,
            referrer: document.referrer.split('?')[0],
            send_page_view: false,
            page_title: PAGE_TITLE,
            dimension1: globals.globals.isInternalUser ? '1' : '0',
            dimension2: perfetto_version.VERSION,
            dimension3: (0, channels.getCurrentChannel)(),
        });
        this.updatePath(route);
    }
    updatePath(path) {
        gtagGlobals.gtag('event', 'page_view', { page_path: path, page_title: PAGE_TITLE });
    }
    logEvent(category, event) {
        gtagGlobals.gtag('event', event, { event_category: category });
    }
    logError(description, fatal = true) {
        gtagGlobals.gtag('event', 'exception', { description, fatal });
    }
    isEnabled() {
        return true;
    }
}

});

var rate_limiters = createCommonjsModule(function (module, exports) {
// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.debounce = exports.ratelimit = void 0;
// Returns a wrapper around |f| which calls f at most once every |ms|ms.
function ratelimit(f, ms) {
    let inProgess = false;
    return () => {
        if (inProgess) {
            return;
        }
        inProgess = true;
        window.setTimeout(() => {
            f();
            inProgess = false;
        }, ms);
    };
}
exports.ratelimit = ratelimit;
// Returns a wrapper around |f| which waits for a |ms|ms pause in calls
// before calling |f|.
function debounce(f, ms) {
    let timerId;
    return () => {
        if (timerId) {
            window.clearTimeout(timerId);
        }
        timerId = window.setTimeout(() => {
            f();
            timerId = undefined;
        }, ms);
    };
}
exports.debounce = debounce;

});

var time_scale = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.computeZoom = exports.TimeScale = void 0;


const MAX_ZOOM_SPAN_SEC = 1e-8; // 10 ns.
/**
 * Defines a mapping between number and seconds for the entire application.
 * Linearly scales time values from boundsMs to pixel values in boundsPx and
 * back.
 */
class TimeScale {
    constructor(timeBounds, boundsPx) {
        this.secPerPx = 0;
        this.timeBounds = timeBounds;
        this._startPx = boundsPx[0];
        this._endPx = boundsPx[1];
        this.updateSlope();
    }
    updateSlope() {
        this.secPerPx = this.timeBounds.duration / (this._endPx - this._startPx);
    }
    deltaTimeToPx(time) {
        return Math.round(time / this.secPerPx);
    }
    timeToPx(time) {
        return this._startPx + (time - this.timeBounds.start) / this.secPerPx;
    }
    pxToTime(px) {
        return this.timeBounds.start + (px - this._startPx) * this.secPerPx;
    }
    deltaPxToDuration(px) {
        return px * this.secPerPx;
    }
    setTimeBounds(timeBounds) {
        this.timeBounds = timeBounds;
        this.updateSlope();
    }
    setLimitsPx(pxStart, pxEnd) {
        (0, logging.assertFalse)(pxStart === pxEnd);
        (0, logging.assertTrue)(pxStart >= 0 && pxEnd >= 0);
        this._startPx = pxStart;
        this._endPx = pxEnd;
        this.updateSlope();
    }
    timeInBounds(time) {
        return this.timeBounds.isInBounds(time);
    }
    get startPx() {
        return this._startPx;
    }
    get endPx() {
        return this._endPx;
    }
}
exports.TimeScale = TimeScale;
function computeZoom(scale, span, zoomFactor, zoomPx) {
    const startPx = scale.startPx;
    const endPx = scale.endPx;
    const deltaPx = endPx - startPx;
    const deltaTime = span.end - span.start;
    const newDeltaTime = Math.max(deltaTime * zoomFactor, MAX_ZOOM_SPAN_SEC);
    const clampedZoomPx = Math.max(startPx, Math.min(endPx, zoomPx));
    const zoomTime = scale.pxToTime(clampedZoomPx);
    const r = (clampedZoomPx - startPx) / deltaPx;
    const newStartTime = zoomTime - newDeltaTime * r;
    const newEndTime = newStartTime + newDeltaTime;
    return new time.TimeSpan(newStartTime, newEndTime);
}
exports.computeZoom = computeZoom;

});

var frontend_local_state = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.FrontendLocalState = void 0;






function chooseLatest(current, next) {
    if (next !== current && next.lastUpdate > current.lastUpdate) {
        // |next| is from state. Callers may mutate the return value of
        // this function so we need to clone |next| to prevent bad mutations
        // of state:
        return Object.assign({}, next);
    }
    return current;
}
function capBetween(t, start, end) {
    return Math.min(Math.max(t, start), end);
}
// Calculate the space a scrollbar takes up so that we can subtract it from
// the canvas width.
function calculateScrollbarWidth() {
    const outer = document.createElement('div');
    outer.style.overflowY = 'scroll';
    const inner = document.createElement('div');
    outer.appendChild(inner);
    document.body.appendChild(outer);
    const width = outer.getBoundingClientRect().width - inner.getBoundingClientRect().width;
    document.body.removeChild(outer);
    return width;
}
/**
 * State that is shared between several frontend components, but not the
 * controller. This state is updated at 60fps.
 */
class FrontendLocalState {
    constructor() {
        this.visibleWindowTime = new time.TimeSpan(0, 10);
        this.timeScale = new time_scale.TimeScale(this.visibleWindowTime, [0, 0]);
        this.showPanningHint = false;
        this.showCookieConsent = false;
        this.visibleTracks = new Set();
        this.prevVisibleTracks = new Set();
        this.httpRpcState = { connected: false };
        this.newVersionAvailable = false;
        this.showPivotTable = false;
        // This is used to calculate the tracks within a Y range for area selection.
        this.areaY = {};
        this._omniboxState = {
            lastUpdate: 0,
            omnibox: '',
            mode: 'SEARCH',
        };
        this._visibleState = {
            lastUpdate: 0,
            startSec: 0,
            endSec: 10,
            resolution: 1,
        };
        this.setOmniboxDebounced = (0, rate_limiters.debounce)(() => {
            globals.globals.dispatch(actions.Actions.setOmnibox(Object.assign({}, this._omniboxState)));
        }, 20);
        this.ratelimitedUpdateVisible = (0, rate_limiters.ratelimit)(() => {
            globals.globals.dispatch(actions.Actions.setVisibleTraceTime(this._visibleState));
        }, 50);
    }
    // TODO: there is some redundancy in the fact that both |visibleWindowTime|
    // and a |timeScale| have a notion of time range. That should live in one
    // place only.
    getScrollbarWidth() {
        if (this.scrollBarWidth === undefined) {
            this.scrollBarWidth = calculateScrollbarWidth();
        }
        return this.scrollBarWidth;
    }
    setHttpRpcState(httpRpcState) {
        this.httpRpcState = httpRpcState;
        globals.globals.rafScheduler.scheduleFullRedraw();
    }
    addVisibleTrack(trackId) {
        this.visibleTracks.add(trackId);
    }
    // Called when beginning a canvas redraw.
    clearVisibleTracks() {
        this.visibleTracks.clear();
    }
    // Called when the canvas redraw is complete.
    sendVisibleTracks() {
        if (this.prevVisibleTracks.size !== this.visibleTracks.size ||
            ![...this.prevVisibleTracks].every((value) => this.visibleTracks.has(value))) {
            globals.globals.dispatch(actions.Actions.setVisibleTracks({ tracks: Array.from(this.visibleTracks) }));
            this.prevVisibleTracks = new Set(this.visibleTracks);
        }
    }
    togglePivotTable() {
        this.showPivotTable = !this.showPivotTable;
        globals.globals.rafScheduler.scheduleFullRedraw();
    }
    mergeState(state) {
        // This is unfortunately subtle. This class mutates this._visibleState.
        // Since we may not mutate |state| (in order to make immer's immutable
        // updates work) this means that we have to make a copy of the visibleState.
        // when updating it. We don't want to have to do that unnecessarily so
        // chooseLatest returns a shallow clone of state.visibleState *only* when
        // that is the newer state. All of these complications should vanish when
        // we remove this class.
        const previousVisibleState = this._visibleState;
        this._omniboxState = chooseLatest(this._omniboxState, state.omniboxState);
        this._visibleState = chooseLatest(this._visibleState, state.visibleState);
        const visibleStateWasUpdated = previousVisibleState !== this._visibleState;
        if (visibleStateWasUpdated) {
            this.updateLocalTime(new time.TimeSpan(this._visibleState.startSec, this._visibleState.endSec));
        }
    }
    selectArea(startSec, endSec, tracks = this._selectedArea ? this._selectedArea.tracks : []) {
        (0, logging.assertTrue)(endSec >= startSec);
        this.showPanningHint = true;
        this._selectedArea = { startSec, endSec, tracks },
            globals.globals.rafScheduler.scheduleFullRedraw();
    }
    deselectArea() {
        this._selectedArea = undefined;
        globals.globals.rafScheduler.scheduleRedraw();
    }
    get selectedArea() {
        return this._selectedArea;
    }
    setOmnibox(value, mode) {
        this._omniboxState.omnibox = value;
        this._omniboxState.mode = mode;
        this._omniboxState.lastUpdate = Date.now() / 1000;
        this.setOmniboxDebounced();
    }
    get omnibox() {
        return this._omniboxState.omnibox;
    }
    updateLocalTime(ts) {
        const traceTime = globals.globals.state.traceTime;
        const startSec = capBetween(ts.start, traceTime.startSec, traceTime.endSec);
        const endSec = capBetween(ts.end, traceTime.startSec, traceTime.endSec);
        this.visibleWindowTime = new time.TimeSpan(startSec, endSec);
        this.timeScale.setTimeBounds(this.visibleWindowTime);
        this.updateResolution();
    }
    updateResolution() {
        this._visibleState.lastUpdate = Date.now() / 1000;
        this._visibleState.resolution = globals.globals.getCurResolution();
        this.ratelimitedUpdateVisible();
    }
    updateVisibleTime(ts) {
        this.updateLocalTime(ts);
        this._visibleState.lastUpdate = Date.now() / 1000;
        this._visibleState.startSec = this.visibleWindowTime.start;
        this._visibleState.endSec = this.visibleWindowTime.end;
        this._visibleState.resolution = globals.globals.getCurResolution();
        this.ratelimitedUpdateVisible();
    }
    getVisibleStateBounds() {
        return [this.visibleWindowTime.start, this.visibleWindowTime.end];
    }
    // Whenever start/end px of the timeScale is changed, update
    // the resolution.
    updateLocalLimits(pxStart, pxEnd) {
        // Numbers received here can be negative or equal, but we should fix that
        // before updating the timescale.
        pxStart = Math.max(0, pxStart);
        pxEnd = Math.max(0, pxEnd);
        if (pxStart === pxEnd)
            pxEnd = pxStart + 1;
        this.timeScale.setLimitsPx(pxStart, pxEnd);
        this.updateResolution();
    }
}
exports.FrontendLocalState = FrontendLocalState;

});

var perf = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.perfDisplay = exports.runningStatStr = exports.RunningStatistics = exports.measure = exports.debugNow = exports.perfDebug = void 0;



// Shorthand for if globals perf debug mode is on.
const perfDebug = () => globals.globals.state.perfDebug;
exports.perfDebug = perfDebug;
// Returns performance.now() if perfDebug is enabled, otherwise 0.
// This is needed because calling performance.now is generally expensive
// and should not be done for every frame.
const debugNow = () => (0, exports.perfDebug)() ? performance.now() : 0;
exports.debugNow = debugNow;
// Returns execution time of |fn| if perf debug mode is on. Returns 0 otherwise.
function measure(fn) {
    const start = (0, exports.debugNow)();
    fn();
    return (0, exports.debugNow)() - start;
}
exports.measure = measure;
// Stores statistics about samples, and keeps a fixed size buffer of most recent
// samples.
class RunningStatistics {
    constructor(_maxBufferSize = 10) {
        this._maxBufferSize = _maxBufferSize;
        this._count = 0;
        this._mean = 0;
        this._lastValue = 0;
        this.buffer = [];
    }
    addValue(value) {
        this._lastValue = value;
        this.buffer.push(value);
        if (this.buffer.length > this._maxBufferSize) {
            this.buffer.shift();
        }
        this._mean = (this._mean * this._count + value) / (this._count + 1);
        this._count++;
    }
    get mean() {
        return this._mean;
    }
    get count() {
        return this._count;
    }
    get bufferMean() {
        return this.buffer.reduce((sum, v) => sum + v, 0) / this.buffer.length;
    }
    get bufferSize() {
        return this.buffer.length;
    }
    get maxBufferSize() {
        return this._maxBufferSize;
    }
    get last() {
        return this._lastValue;
    }
}
exports.RunningStatistics = RunningStatistics;
// Returns a summary string representation of a RunningStatistics object.
function runningStatStr(stat) {
    return `Last: ${stat.last.toFixed(2)}ms | ` +
        `Avg: ${stat.mean.toFixed(2)}ms | ` +
        `Avg${stat.maxBufferSize}: ${stat.bufferMean.toFixed(2)}ms`;
}
exports.runningStatStr = runningStatStr;
// Globals singleton class that renders performance stats for the whole app.
class PerfDisplay {
    constructor() {
        this.containers = [];
    }
    addContainer(container) {
        this.containers.push(container);
    }
    removeContainer(container) {
        const i = this.containers.indexOf(container);
        this.containers.splice(i, 1);
    }
    renderPerfStats() {
        if (!(0, exports.perfDebug)())
            return;
        const perfDisplayEl = document.querySelector('.perf-stats');
        if (!perfDisplayEl)
            return;
        mithril.render(perfDisplayEl, [
            mithril('section', globals.globals.rafScheduler.renderPerfStats()),
            mithril('button.close-button', {
                onclick: () => globals.globals.dispatch(actions.Actions.togglePerfDebug({})),
            }, mithril('i.material-icons', 'close')),
            this.containers.map((c, i) => mithril('section', c.renderPerfStats(i))),
        ]);
    }
}
exports.perfDisplay = new PerfDisplay();

});

var raf_scheduler = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.RafScheduler = void 0;




function statTableHeader() {
    return mithril('tr', mithril('th', ''), mithril('th', 'Last (ms)'), mithril('th', 'Avg (ms)'), mithril('th', 'Avg-10 (ms)'));
}
function statTableRow(title, stat) {
    return mithril('tr', mithril('td', title), mithril('td', stat.last.toFixed(2)), mithril('td', stat.mean.toFixed(2)), mithril('td', stat.bufferMean.toFixed(2)));
}
// This class orchestrates all RAFs in the UI. It ensures that there is only
// one animation frame handler overall and that callbacks are called in
// predictable order. There are two types of callbacks here:
// - actions (e.g. pan/zoon animations), which will alter the "fast"
//  (main-thread-only) state (e.g. update visible time bounds @ 60 fps).
// - redraw callbacks that will repaint canvases.
// This class guarantees that, on each frame, redraw callbacks are called after
// all action callbacks.
class RafScheduler {
    constructor() {
        this.actionCallbacks = new Set();
        this.canvasRedrawCallbacks = new Set();
        this._syncDomRedraw = (_) => { };
        this.hasScheduledNextFrame = false;
        this.requestedFullRedraw = false;
        this.isRedrawing = false;
        this._shutdown = false;
        this.perfStats = {
            rafActions: new perf.RunningStatistics(),
            rafCanvas: new perf.RunningStatistics(),
            rafDom: new perf.RunningStatistics(),
            rafTotal: new perf.RunningStatistics(),
            domRedraw: new perf.RunningStatistics(),
        };
    }
    start(cb) {
        this.actionCallbacks.add(cb);
        this.maybeScheduleAnimationFrame();
    }
    stop(cb) {
        this.actionCallbacks.delete(cb);
    }
    addRedrawCallback(cb) {
        this.canvasRedrawCallbacks.add(cb);
    }
    removeRedrawCallback(cb) {
        this.canvasRedrawCallbacks.delete(cb);
    }
    scheduleRedraw() {
        this.maybeScheduleAnimationFrame(true);
    }
    shutdown() {
        this._shutdown = true;
    }
    set domRedraw(cb) {
        this._syncDomRedraw = cb || ((_) => { });
    }
    scheduleFullRedraw() {
        this.requestedFullRedraw = true;
        this.maybeScheduleAnimationFrame(true);
    }
    syncDomRedraw(nowMs) {
        const redrawStart = (0, perf.debugNow)();
        this._syncDomRedraw(nowMs);
        if ((0, perf.perfDebug)()) {
            this.perfStats.domRedraw.addValue((0, perf.debugNow)() - redrawStart);
        }
    }
    get hasPendingRedraws() {
        return this.isRedrawing || this.hasScheduledNextFrame;
    }
    syncCanvasRedraw(nowMs) {
        const redrawStart = (0, perf.debugNow)();
        if (this.isRedrawing)
            return;
        globals.globals.frontendLocalState.clearVisibleTracks();
        this.isRedrawing = true;
        for (const redraw of this.canvasRedrawCallbacks)
            redraw(nowMs);
        this.isRedrawing = false;
        globals.globals.frontendLocalState.sendVisibleTracks();
        if ((0, perf.perfDebug)()) {
            this.perfStats.rafCanvas.addValue((0, perf.debugNow)() - redrawStart);
        }
    }
    maybeScheduleAnimationFrame(force = false) {
        if (this.hasScheduledNextFrame)
            return;
        if (this.actionCallbacks.size !== 0 || force) {
            this.hasScheduledNextFrame = true;
            window.requestAnimationFrame(this.onAnimationFrame.bind(this));
        }
    }
    onAnimationFrame(nowMs) {
        if (this._shutdown)
            return;
        const rafStart = (0, perf.debugNow)();
        this.hasScheduledNextFrame = false;
        const doFullRedraw = this.requestedFullRedraw;
        this.requestedFullRedraw = false;
        const actionTime = (0, perf.measure)(() => {
            for (const action of this.actionCallbacks)
                action(nowMs);
        });
        const domTime = (0, perf.measure)(() => {
            if (doFullRedraw)
                this.syncDomRedraw(nowMs);
        });
        const canvasTime = (0, perf.measure)(() => this.syncCanvasRedraw(nowMs));
        const totalRafTime = (0, perf.debugNow)() - rafStart;
        this.updatePerfStats(actionTime, domTime, canvasTime, totalRafTime);
        perf.perfDisplay.renderPerfStats();
        this.maybeScheduleAnimationFrame();
    }
    updatePerfStats(actionsTime, domTime, canvasTime, totalRafTime) {
        if (!(0, perf.perfDebug)())
            return;
        this.perfStats.rafActions.addValue(actionsTime);
        this.perfStats.rafDom.addValue(domTime);
        this.perfStats.rafCanvas.addValue(canvasTime);
        this.perfStats.rafTotal.addValue(totalRafTime);
    }
    renderPerfStats() {
        (0, logging.assertTrue)((0, perf.perfDebug)());
        return mithril('div', mithril('div', [
            mithril('button', { onclick: () => this.scheduleRedraw() }, 'Do Canvas Redraw'),
            '   |   ',
            mithril('button', { onclick: () => this.scheduleFullRedraw() }, 'Do Full Redraw'),
        ]), mithril('div', 'Raf Timing ' +
            '(Total may not add up due to imprecision)'), mithril('table', statTableHeader(), statTableRow('Actions', this.perfStats.rafActions), statTableRow('Dom', this.perfStats.rafDom), statTableRow('Canvas', this.perfStats.rafCanvas), statTableRow('Total', this.perfStats.rafTotal)), mithril('div', 'Dom redraw: ' +
            `Count: ${this.perfStats.domRedraw.count} | ` +
            (0, perf.runningStatStr)(this.perfStats.domRedraw)));
    }
}
exports.RafScheduler = RafScheduler;

});

var service_worker_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.ServiceWorkerController = void 0;

// Handles registration, unregistration and lifecycle of the service worker.
// This class contains only the controlling logic, all the code in here runs in
// the main thread, not in the service worker thread.
// The actual service worker code is in src/service_worker.
// Design doc: http://go/perfetto-offline.


// We use a dedicated |caches| object to share a global boolean beween the main
// thread and the SW. SW cannot use local-storage or anything else other than
// IndexedDB (which would be overkill).
const BYPASS_ID = 'BYPASS_SERVICE_WORKER';
class ServiceWorkerController {
    constructor() {
        this._initialWorker = null;
        this._bypassed = false;
        this._installing = false;
    }
    // Caller should reload().
    setBypass(bypass) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            if (!('serviceWorker' in navigator))
                return; // Not supported.
            this._bypassed = bypass;
            if (bypass) {
                yield caches.open(BYPASS_ID); // Create the entry.
                for (const reg of yield navigator.serviceWorker.getRegistrations()) {
                    yield reg.unregister();
                }
            }
            else {
                yield caches.delete(BYPASS_ID);
                if (window.localStorage) {
                    window.localStorage.setItem('bypassDisabled', '1');
                }
                this.install();
            }
            globals.globals.rafScheduler.scheduleFullRedraw();
        });
    }
    onStateChange(sw) {
        globals.globals.rafScheduler.scheduleFullRedraw();
        if (sw.state === 'installing') {
            this._installing = true;
        }
        else if (sw.state === 'activated') {
            this._installing = false;
            // Don't show the notification if the site was served straight
            // from the network (e.g., on the very first visit or after
            // Ctrl+Shift+R). In these cases, we are already at the last
            // version.
            if (sw !== this._initialWorker && this._initialWorker) {
                globals.globals.frontendLocalState.newVersionAvailable = true;
            }
        }
    }
    monitorWorker(sw) {
        if (!sw)
            return;
        sw.addEventListener('error', (e) => (0, logging.reportError)(e));
        sw.addEventListener('statechange', () => this.onStateChange(sw));
        this.onStateChange(sw); // Trigger updates for the current state.
    }
    install() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            if (!('serviceWorker' in navigator))
                return; // Not supported.
            if (location.pathname !== '/') {
                // Disable the service worker when the UI is loaded from a non-root URL
                // (e.g. from the CI artifacts GCS bucket). Supporting the case of a
                // nested index.html is too cumbersome and has no benefits.
                return;
            }
            // If this is localhost disable the service worker by default, unless the
            // user manually re-enabled it (in which case bypassDisabled = '1').
            const hostname = location.hostname;
            const isLocalhost = ['127.0.0.1', '::1', 'localhost'].includes(hostname);
            const bypassDisabled = window.localStorage &&
                window.localStorage.getItem('bypassDisabled') === '1';
            if (isLocalhost && !bypassDisabled) {
                yield this.setBypass(true); // Will cause the check below to bail out.
            }
            if (yield caches.has(BYPASS_ID)) {
                this._bypassed = true;
                console.log('Skipping service worker registration, disabled by the user');
                return;
            }
            // In production cases versionDir == VERSION. We use this here for ease of
            // testing (so we can have /v1.0.0a/ /v1.0.0b/ even if they have the same
            // version code).
            const versionDir = globals.globals.root.split('/').slice(-2)[0];
            const swUri = `/service_worker.js?v=${versionDir}`;
            navigator.serviceWorker.register(swUri).then((registration) => {
                this._initialWorker = registration.active;
                // At this point there are two options:
                // 1. This is the first time we visit the site (or cache was cleared) and
                //    no SW is installed yet. In this case |installing| will be set.
                // 2. A SW is already installed (though it might be obsolete). In this
                //    case |active| will be set.
                this.monitorWorker(registration.installing);
                this.monitorWorker(registration.active);
                // Setup the event that shows the "Updated to v1.2.3" notification.
                registration.addEventListener('updatefound', () => {
                    this.monitorWorker(registration.installing);
                });
            });
        });
    }
    get bypassed() {
        return this._bypassed;
    }
    get installing() {
        return this._installing;
    }
}
exports.ServiceWorkerController = ServiceWorkerController;

});

var globals = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.globals = void 0;









function getRoot() {
    // Works out the root directory where the content should be served from
    // e.g. `http://origin/v1.2.3/`.
    const script = document.currentScript;
    // Needed for DOM tests, that do not have script element.
    if (script === null) {
        return '';
    }
    let root = script.src;
    root = root.substr(0, root.lastIndexOf('/') + 1);
    return root;
}
/**
 * Global accessors for state/dispatch in the frontend.
 */
class Globals {
    constructor() {
        this.root = getRoot();
        this._testing = false;
        this._dispatch = undefined;
        this._state = undefined;
        this._frontendLocalState = undefined;
        this._rafScheduler = undefined;
        this._serviceWorkerController = undefined;
        this._logging = undefined;
        this._isInternalUser = undefined;
        // TODO(hjd): Unify trackDataStore, queryResults, overviewStore, threads.
        this._trackDataStore = undefined;
        this._queryResults = undefined;
        this._overviewStore = undefined;
        this._aggregateDataStore = undefined;
        this._threadMap = undefined;
        this._sliceDetails = undefined;
        this._threadStateDetails = undefined;
        this._connectedFlows = undefined;
        this._selectedFlows = undefined;
        this._visibleFlowCategories = undefined;
        this._counterDetails = undefined;
        this._flamegraphDetails = undefined;
        this._cpuProfileDetails = undefined;
        this._numQueriesQueued = 0;
        this._bufferUsage = undefined;
        this._recordingLog = undefined;
        this._traceErrors = undefined;
        this._metricError = undefined;
        this._metricResult = undefined;
        this._hasFtrace = undefined;
        this._jobStatus = undefined;
        this._router = undefined;
        this._embeddedMode = undefined;
        this._hideSidebar = undefined;
        // TODO(hjd): Remove once we no longer need to update UUID on redraw.
        this._publishRedraw = undefined;
        this._currentSearchResults = {
            sliceIds: new Float64Array(0),
            tsStarts: new Float64Array(0),
            utids: new Float64Array(0),
            trackIds: [],
            sources: [],
            totalResults: 0,
        };
        this.searchSummary = {
            tsStarts: new Float64Array(0),
            tsEnds: new Float64Array(0),
            count: new Uint8Array(0),
        };
        this.engines = new Map();
    }
    initialize(dispatch, router) {
        this._dispatch = dispatch;
        this._router = router;
        this._state = (0, empty_state.createEmptyState)();
        this._frontendLocalState = new frontend_local_state.FrontendLocalState();
        this._rafScheduler = new raf_scheduler.RafScheduler();
        this._serviceWorkerController = new service_worker_controller.ServiceWorkerController();
        this._testing =
            self.location && self.location.search.indexOf('testing=1') >= 0;
        this._logging = (0, analytics.initAnalytics)();
        // TODO(hjd): Unify trackDataStore, queryResults, overviewStore, threads.
        this._trackDataStore = new Map();
        this._queryResults = new Map();
        this._overviewStore = new Map();
        this._aggregateDataStore = new Map();
        this._threadMap = new Map();
        this._sliceDetails = {};
        this._connectedFlows = [];
        this._selectedFlows = [];
        this._visibleFlowCategories = new Map();
        this._counterDetails = {};
        this._threadStateDetails = {};
        this._flamegraphDetails = {};
        this._cpuProfileDetails = {};
        this.engines.clear();
    }
    get router() {
        return (0, logging.assertExists)(this._router);
    }
    get publishRedraw() {
        return this._publishRedraw || (() => { });
    }
    set publishRedraw(f) {
        this._publishRedraw = f;
    }
    get state() {
        return (0, logging.assertExists)(this._state);
    }
    set state(state) {
        this._state = (0, logging.assertExists)(state);
    }
    get dispatch() {
        return (0, logging.assertExists)(this._dispatch);
    }
    get frontendLocalState() {
        return (0, logging.assertExists)(this._frontendLocalState);
    }
    get rafScheduler() {
        return (0, logging.assertExists)(this._rafScheduler);
    }
    get logging() {
        return (0, logging.assertExists)(this._logging);
    }
    get serviceWorkerController() {
        return (0, logging.assertExists)(this._serviceWorkerController);
    }
    // TODO(hjd): Unify trackDataStore, queryResults, overviewStore, threads.
    get overviewStore() {
        return (0, logging.assertExists)(this._overviewStore);
    }
    get trackDataStore() {
        return (0, logging.assertExists)(this._trackDataStore);
    }
    get queryResults() {
        return (0, logging.assertExists)(this._queryResults);
    }
    get threads() {
        return (0, logging.assertExists)(this._threadMap);
    }
    get sliceDetails() {
        return (0, logging.assertExists)(this._sliceDetails);
    }
    set sliceDetails(click) {
        this._sliceDetails = (0, logging.assertExists)(click);
    }
    get threadStateDetails() {
        return (0, logging.assertExists)(this._threadStateDetails);
    }
    set threadStateDetails(click) {
        this._threadStateDetails = (0, logging.assertExists)(click);
    }
    get connectedFlows() {
        return (0, logging.assertExists)(this._connectedFlows);
    }
    set connectedFlows(connectedFlows) {
        this._connectedFlows = (0, logging.assertExists)(connectedFlows);
    }
    get selectedFlows() {
        return (0, logging.assertExists)(this._selectedFlows);
    }
    set selectedFlows(selectedFlows) {
        this._selectedFlows = (0, logging.assertExists)(selectedFlows);
    }
    get visibleFlowCategories() {
        return (0, logging.assertExists)(this._visibleFlowCategories);
    }
    set visibleFlowCategories(visibleFlowCategories) {
        this._visibleFlowCategories = (0, logging.assertExists)(visibleFlowCategories);
    }
    get counterDetails() {
        return (0, logging.assertExists)(this._counterDetails);
    }
    set counterDetails(click) {
        this._counterDetails = (0, logging.assertExists)(click);
    }
    get aggregateDataStore() {
        return (0, logging.assertExists)(this._aggregateDataStore);
    }
    get flamegraphDetails() {
        return (0, logging.assertExists)(this._flamegraphDetails);
    }
    set flamegraphDetails(click) {
        this._flamegraphDetails = (0, logging.assertExists)(click);
    }
    get traceErrors() {
        return this._traceErrors;
    }
    setTraceErrors(arg) {
        this._traceErrors = arg;
    }
    get metricError() {
        return this._metricError;
    }
    setMetricError(arg) {
        this._metricError = arg;
    }
    get metricResult() {
        return this._metricResult;
    }
    setMetricResult(result) {
        this._metricResult = result;
    }
    get cpuProfileDetails() {
        return (0, logging.assertExists)(this._cpuProfileDetails);
    }
    set cpuProfileDetails(click) {
        this._cpuProfileDetails = (0, logging.assertExists)(click);
    }
    set numQueuedQueries(value) {
        this._numQueriesQueued = value;
    }
    get numQueuedQueries() {
        return this._numQueriesQueued;
    }
    get bufferUsage() {
        return this._bufferUsage;
    }
    get recordingLog() {
        return this._recordingLog;
    }
    get currentSearchResults() {
        return this._currentSearchResults;
    }
    set currentSearchResults(results) {
        this._currentSearchResults = results;
    }
    get hasFtrace() {
        return !!this._hasFtrace;
    }
    set hasFtrace(value) {
        this._hasFtrace = value;
    }
    getConversionJobStatus(name) {
        return this.getJobStatusMap().get(name) || conversion_jobs.ConversionJobStatus.NotRunning;
    }
    setConversionJobStatus(name, status) {
        const map = this.getJobStatusMap();
        if (status === conversion_jobs.ConversionJobStatus.NotRunning) {
            map.delete(name);
        }
        else {
            map.set(name, status);
        }
    }
    getJobStatusMap() {
        if (!this._jobStatus) {
            this._jobStatus = new Map();
        }
        return this._jobStatus;
    }
    get embeddedMode() {
        return !!this._embeddedMode;
    }
    set embeddedMode(value) {
        this._embeddedMode = value;
    }
    get hideSidebar() {
        return !!this._hideSidebar;
    }
    set hideSidebar(value) {
        this._hideSidebar = value;
    }
    setBufferUsage(bufferUsage) {
        this._bufferUsage = bufferUsage;
    }
    setTrackData(id, data) {
        this.trackDataStore.set(id, data);
    }
    setRecordingLog(recordingLog) {
        this._recordingLog = recordingLog;
    }
    setAggregateData(kind, data) {
        this.aggregateDataStore.set(kind, data);
    }
    getCurResolution() {
        // Truncate the resolution to the closest power of 2 (in nanosecond space).
        // We choose to work in ns space because resolution is consumed be track
        // controllers for quantization and they rely on resolution to be a power
        // of 2 in nanosecond form. This is property does not hold if we work in
        // second space.
        //
        // This effectively means the resolution changes approximately every 6 zoom
        // levels. Logic: each zoom level represents a delta of 0.1 * (visible
        // window span). Therefore, zooming out by six levels is 1.1^6 ~= 2.
        // Similarily, zooming in six levels is 0.9^6 ~= 0.5.
        const pxToSec = this.frontendLocalState.timeScale.deltaPxToDuration(1);
        // TODO(b/186265930): Remove once fixed:
        if (!isFinite(pxToSec)) {
            // Resolution is in pixels per second so 1000 means 1px = 1ms.
            console.error(`b/186265930: Bad pxToSec suppressed ${pxToSec}`);
            return (0, time.fromNs)(Math.pow(2, Math.floor(Math.log2((0, time.toNs)(1000)))));
        }
        const pxToNs = Math.max((0, time.toNs)(pxToSec), 1);
        const resolution = (0, time.fromNs)(Math.pow(2, Math.floor(Math.log2(pxToNs))));
        const log2 = Math.log2((0, time.toNs)(resolution));
        if (log2 % 1 !== 0) {
            throw new Error(`Resolution should be a power of two.
        pxToSec: ${pxToSec},
        pxToNs: ${pxToNs},
        resolution: ${resolution},
        log2: ${Math.log2((0, time.toNs)(resolution))}`);
        }
        return resolution;
    }
    getCurrentEngine() {
        if (!this.state.currentEngineId) {
            return undefined;
        }
        return this.state.engines[this.state.currentEngineId];
    }
    makeSelection(action, tabToOpen = 'current_selection') {
        // A new selection should cancel the current search selection.
        exports.globals.dispatch(actions.Actions.setSearchIndex({ index: -1 }));
        const tab = action.type === 'deselect' ? undefined : tabToOpen;
        exports.globals.dispatch(actions.Actions.setCurrentTab({ tab }));
        exports.globals.dispatch(action);
    }
    resetForTesting() {
        this._dispatch = undefined;
        this._state = undefined;
        this._frontendLocalState = undefined;
        this._rafScheduler = undefined;
        this._serviceWorkerController = undefined;
        // TODO(hjd): Unify trackDataStore, queryResults, overviewStore, threads.
        this._trackDataStore = undefined;
        this._queryResults = undefined;
        this._overviewStore = undefined;
        this._threadMap = undefined;
        this._sliceDetails = undefined;
        this._threadStateDetails = undefined;
        this._aggregateDataStore = undefined;
        this._numQueriesQueued = 0;
        this._metricResult = undefined;
        this._currentSearchResults = {
            sliceIds: new Float64Array(0),
            tsStarts: new Float64Array(0),
            utids: new Float64Array(0),
            trackIds: [],
            sources: [],
            totalResults: 0,
        };
    }
    // This variable is set by the is_internal_user.js script if the user is a
    // googler. This is used to avoid exposing features that are not ready yet
    // for public consumption. The gated features themselves are not secret.
    // If a user has been detected as a Googler once, make that sticky in
    // localStorage, so that we keep treating them as such when they connect over
    // public networks.
    get isInternalUser() {
        if (this._isInternalUser === undefined) {
            this._isInternalUser = localStorage.getItem('isInternalUser') === '1';
        }
        return this._isInternalUser;
    }
    set isInternalUser(value) {
        localStorage.setItem('isInternalUser', value ? '1' : '0');
        this._isInternalUser = value;
    }
    get testing() {
        return this._testing;
    }
    // Used when switching to the legacy TraceViewer UI.
    // Most resources are cleaned up by replacing the current |window| object,
    // however pending RAFs and workers seem to outlive the |window| and need to
    // be cleaned up explicitly.
    shutdown() {
        this._rafScheduler.shutdown();
    }
}
exports.globals = new Globals();

});

var comparator_builder = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.EqualsBuilder = void 0;
// Simple builder-style class to implement object equality more succinctly.
class EqualsBuilder {
    constructor(first, second) {
        this.result = true;
        this.first = first;
        this.second = second;
    }
    comparePrimitive(getter) {
        if (this.result) {
            this.result = getter(this.first) === getter(this.second);
        }
        return this;
    }
    compare(comparator, getter) {
        if (this.result) {
            this.result = comparator(getter(this.first), getter(this.second));
        }
        return this;
    }
    equals() {
        return this.result;
    }
}
exports.EqualsBuilder = EqualsBuilder;

});

var pivot_table_redux_types = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.aggregationKey = exports.columnKey = exports.aggregationEquals = exports.toggleEnabled = exports.tableColumnEquals = void 0;

function tableColumnEquals(t1, t2) {
    switch (t1.kind) {
        case 'argument': {
            return t2.kind === 'argument' && t1.argument === t2.argument;
        }
        case 'regular': {
            return t2.kind === 'regular' && t1.table === t2.table &&
                t1.column === t2.column;
        }
    }
}
exports.tableColumnEquals = tableColumnEquals;
function toggleEnabled(compare, arr, column, enabled) {
    if (enabled && arr.find((value) => compare(column, value)) === undefined) {
        arr.push(column);
    }
    if (!enabled) {
        const index = arr.findIndex((value) => compare(column, value));
        if (index !== -1) {
            arr.splice(index, 1);
        }
    }
}
exports.toggleEnabled = toggleEnabled;
function aggregationEquals(agg1, agg2) {
    return new comparator_builder.EqualsBuilder(agg1, agg2)
        .comparePrimitive((agg) => agg.aggregationFunction)
        .compare(tableColumnEquals, (agg) => agg.column)
        .equals();
}
exports.aggregationEquals = aggregationEquals;
// Used to convert TableColumn to a string in order to store it in a Map, as
// ES6 does not support compound Set/Map keys. This function should only be used
// for interning keys, and does not have any requirements beyond different
// TableColumn objects mapping to different strings.
function columnKey(tableColumn) {
    switch (tableColumn.kind) {
        case 'argument': {
            return `argument:${tableColumn.argument}`;
        }
        case 'regular': {
            return `${tableColumn.table}.${tableColumn.column}`;
        }
    }
}
exports.columnKey = columnKey;
function aggregationKey(aggregation) {
    return `${aggregation.aggregationFunction}:${columnKey(aggregation.column)}`;
}
exports.aggregationKey = aggregationKey;

});

var colorName = {
	"aliceblue": [240, 248, 255],
	"antiquewhite": [250, 235, 215],
	"aqua": [0, 255, 255],
	"aquamarine": [127, 255, 212],
	"azure": [240, 255, 255],
	"beige": [245, 245, 220],
	"bisque": [255, 228, 196],
	"black": [0, 0, 0],
	"blanchedalmond": [255, 235, 205],
	"blue": [0, 0, 255],
	"blueviolet": [138, 43, 226],
	"brown": [165, 42, 42],
	"burlywood": [222, 184, 135],
	"cadetblue": [95, 158, 160],
	"chartreuse": [127, 255, 0],
	"chocolate": [210, 105, 30],
	"coral": [255, 127, 80],
	"cornflowerblue": [100, 149, 237],
	"cornsilk": [255, 248, 220],
	"crimson": [220, 20, 60],
	"cyan": [0, 255, 255],
	"darkblue": [0, 0, 139],
	"darkcyan": [0, 139, 139],
	"darkgoldenrod": [184, 134, 11],
	"darkgray": [169, 169, 169],
	"darkgreen": [0, 100, 0],
	"darkgrey": [169, 169, 169],
	"darkkhaki": [189, 183, 107],
	"darkmagenta": [139, 0, 139],
	"darkolivegreen": [85, 107, 47],
	"darkorange": [255, 140, 0],
	"darkorchid": [153, 50, 204],
	"darkred": [139, 0, 0],
	"darksalmon": [233, 150, 122],
	"darkseagreen": [143, 188, 143],
	"darkslateblue": [72, 61, 139],
	"darkslategray": [47, 79, 79],
	"darkslategrey": [47, 79, 79],
	"darkturquoise": [0, 206, 209],
	"darkviolet": [148, 0, 211],
	"deeppink": [255, 20, 147],
	"deepskyblue": [0, 191, 255],
	"dimgray": [105, 105, 105],
	"dimgrey": [105, 105, 105],
	"dodgerblue": [30, 144, 255],
	"firebrick": [178, 34, 34],
	"floralwhite": [255, 250, 240],
	"forestgreen": [34, 139, 34],
	"fuchsia": [255, 0, 255],
	"gainsboro": [220, 220, 220],
	"ghostwhite": [248, 248, 255],
	"gold": [255, 215, 0],
	"goldenrod": [218, 165, 32],
	"gray": [128, 128, 128],
	"green": [0, 128, 0],
	"greenyellow": [173, 255, 47],
	"grey": [128, 128, 128],
	"honeydew": [240, 255, 240],
	"hotpink": [255, 105, 180],
	"indianred": [205, 92, 92],
	"indigo": [75, 0, 130],
	"ivory": [255, 255, 240],
	"khaki": [240, 230, 140],
	"lavender": [230, 230, 250],
	"lavenderblush": [255, 240, 245],
	"lawngreen": [124, 252, 0],
	"lemonchiffon": [255, 250, 205],
	"lightblue": [173, 216, 230],
	"lightcoral": [240, 128, 128],
	"lightcyan": [224, 255, 255],
	"lightgoldenrodyellow": [250, 250, 210],
	"lightgray": [211, 211, 211],
	"lightgreen": [144, 238, 144],
	"lightgrey": [211, 211, 211],
	"lightpink": [255, 182, 193],
	"lightsalmon": [255, 160, 122],
	"lightseagreen": [32, 178, 170],
	"lightskyblue": [135, 206, 250],
	"lightslategray": [119, 136, 153],
	"lightslategrey": [119, 136, 153],
	"lightsteelblue": [176, 196, 222],
	"lightyellow": [255, 255, 224],
	"lime": [0, 255, 0],
	"limegreen": [50, 205, 50],
	"linen": [250, 240, 230],
	"magenta": [255, 0, 255],
	"maroon": [128, 0, 0],
	"mediumaquamarine": [102, 205, 170],
	"mediumblue": [0, 0, 205],
	"mediumorchid": [186, 85, 211],
	"mediumpurple": [147, 112, 219],
	"mediumseagreen": [60, 179, 113],
	"mediumslateblue": [123, 104, 238],
	"mediumspringgreen": [0, 250, 154],
	"mediumturquoise": [72, 209, 204],
	"mediumvioletred": [199, 21, 133],
	"midnightblue": [25, 25, 112],
	"mintcream": [245, 255, 250],
	"mistyrose": [255, 228, 225],
	"moccasin": [255, 228, 181],
	"navajowhite": [255, 222, 173],
	"navy": [0, 0, 128],
	"oldlace": [253, 245, 230],
	"olive": [128, 128, 0],
	"olivedrab": [107, 142, 35],
	"orange": [255, 165, 0],
	"orangered": [255, 69, 0],
	"orchid": [218, 112, 214],
	"palegoldenrod": [238, 232, 170],
	"palegreen": [152, 251, 152],
	"paleturquoise": [175, 238, 238],
	"palevioletred": [219, 112, 147],
	"papayawhip": [255, 239, 213],
	"peachpuff": [255, 218, 185],
	"peru": [205, 133, 63],
	"pink": [255, 192, 203],
	"plum": [221, 160, 221],
	"powderblue": [176, 224, 230],
	"purple": [128, 0, 128],
	"rebeccapurple": [102, 51, 153],
	"red": [255, 0, 0],
	"rosybrown": [188, 143, 143],
	"royalblue": [65, 105, 225],
	"saddlebrown": [139, 69, 19],
	"salmon": [250, 128, 114],
	"sandybrown": [244, 164, 96],
	"seagreen": [46, 139, 87],
	"seashell": [255, 245, 238],
	"sienna": [160, 82, 45],
	"silver": [192, 192, 192],
	"skyblue": [135, 206, 235],
	"slateblue": [106, 90, 205],
	"slategray": [112, 128, 144],
	"slategrey": [112, 128, 144],
	"snow": [255, 250, 250],
	"springgreen": [0, 255, 127],
	"steelblue": [70, 130, 180],
	"tan": [210, 180, 140],
	"teal": [0, 128, 128],
	"thistle": [216, 191, 216],
	"tomato": [255, 99, 71],
	"turquoise": [64, 224, 208],
	"violet": [238, 130, 238],
	"wheat": [245, 222, 179],
	"white": [255, 255, 255],
	"whitesmoke": [245, 245, 245],
	"yellow": [255, 255, 0],
	"yellowgreen": [154, 205, 50]
};

/* MIT license */
/* eslint-disable no-mixed-operators */


// NOTE: conversions should only return primitive values (i.e. arrays, or
//       values that give correct `typeof` results).
//       do not use box values types (i.e. Number(), String(), etc.)

const reverseKeywords = {};
for (const key of Object.keys(colorName)) {
	reverseKeywords[colorName[key]] = key;
}

const convert = {
	rgb: {channels: 3, labels: 'rgb'},
	hsl: {channels: 3, labels: 'hsl'},
	hsv: {channels: 3, labels: 'hsv'},
	hwb: {channels: 3, labels: 'hwb'},
	cmyk: {channels: 4, labels: 'cmyk'},
	xyz: {channels: 3, labels: 'xyz'},
	lab: {channels: 3, labels: 'lab'},
	lch: {channels: 3, labels: 'lch'},
	hex: {channels: 1, labels: ['hex']},
	keyword: {channels: 1, labels: ['keyword']},
	ansi16: {channels: 1, labels: ['ansi16']},
	ansi256: {channels: 1, labels: ['ansi256']},
	hcg: {channels: 3, labels: ['h', 'c', 'g']},
	apple: {channels: 3, labels: ['r16', 'g16', 'b16']},
	gray: {channels: 1, labels: ['gray']}
};

var conversions = convert;

// Hide .channels and .labels properties
for (const model of Object.keys(convert)) {
	if (!('channels' in convert[model])) {
		throw new Error('missing channels property: ' + model);
	}

	if (!('labels' in convert[model])) {
		throw new Error('missing channel labels property: ' + model);
	}

	if (convert[model].labels.length !== convert[model].channels) {
		throw new Error('channel and label counts mismatch: ' + model);
	}

	const {channels, labels} = convert[model];
	delete convert[model].channels;
	delete convert[model].labels;
	Object.defineProperty(convert[model], 'channels', {value: channels});
	Object.defineProperty(convert[model], 'labels', {value: labels});
}

convert.rgb.hsl = function (rgb) {
	const r = rgb[0] / 255;
	const g = rgb[1] / 255;
	const b = rgb[2] / 255;
	const min = Math.min(r, g, b);
	const max = Math.max(r, g, b);
	const delta = max - min;
	let h;
	let s;

	if (max === min) {
		h = 0;
	} else if (r === max) {
		h = (g - b) / delta;
	} else if (g === max) {
		h = 2 + (b - r) / delta;
	} else if (b === max) {
		h = 4 + (r - g) / delta;
	}

	h = Math.min(h * 60, 360);

	if (h < 0) {
		h += 360;
	}

	const l = (min + max) / 2;

	if (max === min) {
		s = 0;
	} else if (l <= 0.5) {
		s = delta / (max + min);
	} else {
		s = delta / (2 - max - min);
	}

	return [h, s * 100, l * 100];
};

convert.rgb.hsv = function (rgb) {
	let rdif;
	let gdif;
	let bdif;
	let h;
	let s;

	const r = rgb[0] / 255;
	const g = rgb[1] / 255;
	const b = rgb[2] / 255;
	const v = Math.max(r, g, b);
	const diff = v - Math.min(r, g, b);
	const diffc = function (c) {
		return (v - c) / 6 / diff + 1 / 2;
	};

	if (diff === 0) {
		h = 0;
		s = 0;
	} else {
		s = diff / v;
		rdif = diffc(r);
		gdif = diffc(g);
		bdif = diffc(b);

		if (r === v) {
			h = bdif - gdif;
		} else if (g === v) {
			h = (1 / 3) + rdif - bdif;
		} else if (b === v) {
			h = (2 / 3) + gdif - rdif;
		}

		if (h < 0) {
			h += 1;
		} else if (h > 1) {
			h -= 1;
		}
	}

	return [
		h * 360,
		s * 100,
		v * 100
	];
};

convert.rgb.hwb = function (rgb) {
	const r = rgb[0];
	const g = rgb[1];
	let b = rgb[2];
	const h = convert.rgb.hsl(rgb)[0];
	const w = 1 / 255 * Math.min(r, Math.min(g, b));

	b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));

	return [h, w * 100, b * 100];
};

convert.rgb.cmyk = function (rgb) {
	const r = rgb[0] / 255;
	const g = rgb[1] / 255;
	const b = rgb[2] / 255;

	const k = Math.min(1 - r, 1 - g, 1 - b);
	const c = (1 - r - k) / (1 - k) || 0;
	const m = (1 - g - k) / (1 - k) || 0;
	const y = (1 - b - k) / (1 - k) || 0;

	return [c * 100, m * 100, y * 100, k * 100];
};

function comparativeDistance(x, y) {
	/*
		See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
	*/
	return (
		((x[0] - y[0]) ** 2) +
		((x[1] - y[1]) ** 2) +
		((x[2] - y[2]) ** 2)
	);
}

convert.rgb.keyword = function (rgb) {
	const reversed = reverseKeywords[rgb];
	if (reversed) {
		return reversed;
	}

	let currentClosestDistance = Infinity;
	let currentClosestKeyword;

	for (const keyword of Object.keys(colorName)) {
		const value = colorName[keyword];

		// Compute comparative distance
		const distance = comparativeDistance(rgb, value);

		// Check if its less, if so set as closest
		if (distance < currentClosestDistance) {
			currentClosestDistance = distance;
			currentClosestKeyword = keyword;
		}
	}

	return currentClosestKeyword;
};

convert.keyword.rgb = function (keyword) {
	return colorName[keyword];
};

convert.rgb.xyz = function (rgb) {
	let r = rgb[0] / 255;
	let g = rgb[1] / 255;
	let b = rgb[2] / 255;

	// Assume sRGB
	r = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92);
	g = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92);
	b = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92);

	const x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);
	const y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);
	const z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);

	return [x * 100, y * 100, z * 100];
};

convert.rgb.lab = function (rgb) {
	const xyz = convert.rgb.xyz(rgb);
	let x = xyz[0];
	let y = xyz[1];
	let z = xyz[2];

	x /= 95.047;
	y /= 100;
	z /= 108.883;

	x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);
	y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);
	z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);

	const l = (116 * y) - 16;
	const a = 500 * (x - y);
	const b = 200 * (y - z);

	return [l, a, b];
};

convert.hsl.rgb = function (hsl) {
	const h = hsl[0] / 360;
	const s = hsl[1] / 100;
	const l = hsl[2] / 100;
	let t2;
	let t3;
	let val;

	if (s === 0) {
		val = l * 255;
		return [val, val, val];
	}

	if (l < 0.5) {
		t2 = l * (1 + s);
	} else {
		t2 = l + s - l * s;
	}

	const t1 = 2 * l - t2;

	const rgb = [0, 0, 0];
	for (let i = 0; i < 3; i++) {
		t3 = h + 1 / 3 * -(i - 1);
		if (t3 < 0) {
			t3++;
		}

		if (t3 > 1) {
			t3--;
		}

		if (6 * t3 < 1) {
			val = t1 + (t2 - t1) * 6 * t3;
		} else if (2 * t3 < 1) {
			val = t2;
		} else if (3 * t3 < 2) {
			val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
		} else {
			val = t1;
		}

		rgb[i] = val * 255;
	}

	return rgb;
};

convert.hsl.hsv = function (hsl) {
	const h = hsl[0];
	let s = hsl[1] / 100;
	let l = hsl[2] / 100;
	let smin = s;
	const lmin = Math.max(l, 0.01);

	l *= 2;
	s *= (l <= 1) ? l : 2 - l;
	smin *= lmin <= 1 ? lmin : 2 - lmin;
	const v = (l + s) / 2;
	const sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);

	return [h, sv * 100, v * 100];
};

convert.hsv.rgb = function (hsv) {
	const h = hsv[0] / 60;
	const s = hsv[1] / 100;
	let v = hsv[2] / 100;
	const hi = Math.floor(h) % 6;

	const f = h - Math.floor(h);
	const p = 255 * v * (1 - s);
	const q = 255 * v * (1 - (s * f));
	const t = 255 * v * (1 - (s * (1 - f)));
	v *= 255;

	switch (hi) {
		case 0:
			return [v, t, p];
		case 1:
			return [q, v, p];
		case 2:
			return [p, v, t];
		case 3:
			return [p, q, v];
		case 4:
			return [t, p, v];
		case 5:
			return [v, p, q];
	}
};

convert.hsv.hsl = function (hsv) {
	const h = hsv[0];
	const s = hsv[1] / 100;
	const v = hsv[2] / 100;
	const vmin = Math.max(v, 0.01);
	let sl;
	let l;

	l = (2 - s) * v;
	const lmin = (2 - s) * vmin;
	sl = s * vmin;
	sl /= (lmin <= 1) ? lmin : 2 - lmin;
	sl = sl || 0;
	l /= 2;

	return [h, sl * 100, l * 100];
};

// http://dev.w3.org/csswg/css-color/#hwb-to-rgb
convert.hwb.rgb = function (hwb) {
	const h = hwb[0] / 360;
	let wh = hwb[1] / 100;
	let bl = hwb[2] / 100;
	const ratio = wh + bl;
	let f;

	// Wh + bl cant be > 1
	if (ratio > 1) {
		wh /= ratio;
		bl /= ratio;
	}

	const i = Math.floor(6 * h);
	const v = 1 - bl;
	f = 6 * h - i;

	if ((i & 0x01) !== 0) {
		f = 1 - f;
	}

	const n = wh + f * (v - wh); // Linear interpolation

	let r;
	let g;
	let b;
	/* eslint-disable max-statements-per-line,no-multi-spaces */
	switch (i) {
		default:
		case 6:
		case 0: r = v;  g = n;  b = wh; break;
		case 1: r = n;  g = v;  b = wh; break;
		case 2: r = wh; g = v;  b = n; break;
		case 3: r = wh; g = n;  b = v; break;
		case 4: r = n;  g = wh; b = v; break;
		case 5: r = v;  g = wh; b = n; break;
	}
	/* eslint-enable max-statements-per-line,no-multi-spaces */

	return [r * 255, g * 255, b * 255];
};

convert.cmyk.rgb = function (cmyk) {
	const c = cmyk[0] / 100;
	const m = cmyk[1] / 100;
	const y = cmyk[2] / 100;
	const k = cmyk[3] / 100;

	const r = 1 - Math.min(1, c * (1 - k) + k);
	const g = 1 - Math.min(1, m * (1 - k) + k);
	const b = 1 - Math.min(1, y * (1 - k) + k);

	return [r * 255, g * 255, b * 255];
};

convert.xyz.rgb = function (xyz) {
	const x = xyz[0] / 100;
	const y = xyz[1] / 100;
	const z = xyz[2] / 100;
	let r;
	let g;
	let b;

	r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);
	g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);
	b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);

	// Assume sRGB
	r = r > 0.0031308
		? ((1.055 * (r ** (1.0 / 2.4))) - 0.055)
		: r * 12.92;

	g = g > 0.0031308
		? ((1.055 * (g ** (1.0 / 2.4))) - 0.055)
		: g * 12.92;

	b = b > 0.0031308
		? ((1.055 * (b ** (1.0 / 2.4))) - 0.055)
		: b * 12.92;

	r = Math.min(Math.max(0, r), 1);
	g = Math.min(Math.max(0, g), 1);
	b = Math.min(Math.max(0, b), 1);

	return [r * 255, g * 255, b * 255];
};

convert.xyz.lab = function (xyz) {
	let x = xyz[0];
	let y = xyz[1];
	let z = xyz[2];

	x /= 95.047;
	y /= 100;
	z /= 108.883;

	x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);
	y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);
	z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);

	const l = (116 * y) - 16;
	const a = 500 * (x - y);
	const b = 200 * (y - z);

	return [l, a, b];
};

convert.lab.xyz = function (lab) {
	const l = lab[0];
	const a = lab[1];
	const b = lab[2];
	let x;
	let y;
	let z;

	y = (l + 16) / 116;
	x = a / 500 + y;
	z = y - b / 200;

	const y2 = y ** 3;
	const x2 = x ** 3;
	const z2 = z ** 3;
	y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
	x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
	z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;

	x *= 95.047;
	y *= 100;
	z *= 108.883;

	return [x, y, z];
};

convert.lab.lch = function (lab) {
	const l = lab[0];
	const a = lab[1];
	const b = lab[2];
	let h;

	const hr = Math.atan2(b, a);
	h = hr * 360 / 2 / Math.PI;

	if (h < 0) {
		h += 360;
	}

	const c = Math.sqrt(a * a + b * b);

	return [l, c, h];
};

convert.lch.lab = function (lch) {
	const l = lch[0];
	const c = lch[1];
	const h = lch[2];

	const hr = h / 360 * 2 * Math.PI;
	const a = c * Math.cos(hr);
	const b = c * Math.sin(hr);

	return [l, a, b];
};

convert.rgb.ansi16 = function (args, saturation = null) {
	const [r, g, b] = args;
	let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization

	value = Math.round(value / 50);

	if (value === 0) {
		return 30;
	}

	let ansi = 30
		+ ((Math.round(b / 255) << 2)
		| (Math.round(g / 255) << 1)
		| Math.round(r / 255));

	if (value === 2) {
		ansi += 60;
	}

	return ansi;
};

convert.hsv.ansi16 = function (args) {
	// Optimization here; we already know the value and don't need to get
	// it converted for us.
	return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
};

convert.rgb.ansi256 = function (args) {
	const r = args[0];
	const g = args[1];
	const b = args[2];

	// We use the extended greyscale palette here, with the exception of
	// black and white. normal palette only has 4 greyscale shades.
	if (r === g && g === b) {
		if (r < 8) {
			return 16;
		}

		if (r > 248) {
			return 231;
		}

		return Math.round(((r - 8) / 247) * 24) + 232;
	}

	const ansi = 16
		+ (36 * Math.round(r / 255 * 5))
		+ (6 * Math.round(g / 255 * 5))
		+ Math.round(b / 255 * 5);

	return ansi;
};

convert.ansi16.rgb = function (args) {
	let color = args % 10;

	// Handle greyscale
	if (color === 0 || color === 7) {
		if (args > 50) {
			color += 3.5;
		}

		color = color / 10.5 * 255;

		return [color, color, color];
	}

	const mult = (~~(args > 50) + 1) * 0.5;
	const r = ((color & 1) * mult) * 255;
	const g = (((color >> 1) & 1) * mult) * 255;
	const b = (((color >> 2) & 1) * mult) * 255;

	return [r, g, b];
};

convert.ansi256.rgb = function (args) {
	// Handle greyscale
	if (args >= 232) {
		const c = (args - 232) * 10 + 8;
		return [c, c, c];
	}

	args -= 16;

	let rem;
	const r = Math.floor(args / 36) / 5 * 255;
	const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
	const b = (rem % 6) / 5 * 255;

	return [r, g, b];
};

convert.rgb.hex = function (args) {
	const integer = ((Math.round(args[0]) & 0xFF) << 16)
		+ ((Math.round(args[1]) & 0xFF) << 8)
		+ (Math.round(args[2]) & 0xFF);

	const string = integer.toString(16).toUpperCase();
	return '000000'.substring(string.length) + string;
};

convert.hex.rgb = function (args) {
	const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
	if (!match) {
		return [0, 0, 0];
	}

	let colorString = match[0];

	if (match[0].length === 3) {
		colorString = colorString.split('').map(char => {
			return char + char;
		}).join('');
	}

	const integer = parseInt(colorString, 16);
	const r = (integer >> 16) & 0xFF;
	const g = (integer >> 8) & 0xFF;
	const b = integer & 0xFF;

	return [r, g, b];
};

convert.rgb.hcg = function (rgb) {
	const r = rgb[0] / 255;
	const g = rgb[1] / 255;
	const b = rgb[2] / 255;
	const max = Math.max(Math.max(r, g), b);
	const min = Math.min(Math.min(r, g), b);
	const chroma = (max - min);
	let grayscale;
	let hue;

	if (chroma < 1) {
		grayscale = min / (1 - chroma);
	} else {
		grayscale = 0;
	}

	if (chroma <= 0) {
		hue = 0;
	} else
	if (max === r) {
		hue = ((g - b) / chroma) % 6;
	} else
	if (max === g) {
		hue = 2 + (b - r) / chroma;
	} else {
		hue = 4 + (r - g) / chroma;
	}

	hue /= 6;
	hue %= 1;

	return [hue * 360, chroma * 100, grayscale * 100];
};

convert.hsl.hcg = function (hsl) {
	const s = hsl[1] / 100;
	const l = hsl[2] / 100;

	const c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));

	let f = 0;
	if (c < 1.0) {
		f = (l - 0.5 * c) / (1.0 - c);
	}

	return [hsl[0], c * 100, f * 100];
};

convert.hsv.hcg = function (hsv) {
	const s = hsv[1] / 100;
	const v = hsv[2] / 100;

	const c = s * v;
	let f = 0;

	if (c < 1.0) {
		f = (v - c) / (1 - c);
	}

	return [hsv[0], c * 100, f * 100];
};

convert.hcg.rgb = function (hcg) {
	const h = hcg[0] / 360;
	const c = hcg[1] / 100;
	const g = hcg[2] / 100;

	if (c === 0.0) {
		return [g * 255, g * 255, g * 255];
	}

	const pure = [0, 0, 0];
	const hi = (h % 1) * 6;
	const v = hi % 1;
	const w = 1 - v;
	let mg = 0;

	/* eslint-disable max-statements-per-line */
	switch (Math.floor(hi)) {
		case 0:
			pure[0] = 1; pure[1] = v; pure[2] = 0; break;
		case 1:
			pure[0] = w; pure[1] = 1; pure[2] = 0; break;
		case 2:
			pure[0] = 0; pure[1] = 1; pure[2] = v; break;
		case 3:
			pure[0] = 0; pure[1] = w; pure[2] = 1; break;
		case 4:
			pure[0] = v; pure[1] = 0; pure[2] = 1; break;
		default:
			pure[0] = 1; pure[1] = 0; pure[2] = w;
	}
	/* eslint-enable max-statements-per-line */

	mg = (1.0 - c) * g;

	return [
		(c * pure[0] + mg) * 255,
		(c * pure[1] + mg) * 255,
		(c * pure[2] + mg) * 255
	];
};

convert.hcg.hsv = function (hcg) {
	const c = hcg[1] / 100;
	const g = hcg[2] / 100;

	const v = c + g * (1.0 - c);
	let f = 0;

	if (v > 0.0) {
		f = c / v;
	}

	return [hcg[0], f * 100, v * 100];
};

convert.hcg.hsl = function (hcg) {
	const c = hcg[1] / 100;
	const g = hcg[2] / 100;

	const l = g * (1.0 - c) + 0.5 * c;
	let s = 0;

	if (l > 0.0 && l < 0.5) {
		s = c / (2 * l);
	} else
	if (l >= 0.5 && l < 1.0) {
		s = c / (2 * (1 - l));
	}

	return [hcg[0], s * 100, l * 100];
};

convert.hcg.hwb = function (hcg) {
	const c = hcg[1] / 100;
	const g = hcg[2] / 100;
	const v = c + g * (1.0 - c);
	return [hcg[0], (v - c) * 100, (1 - v) * 100];
};

convert.hwb.hcg = function (hwb) {
	const w = hwb[1] / 100;
	const b = hwb[2] / 100;
	const v = 1 - b;
	const c = v - w;
	let g = 0;

	if (c < 1) {
		g = (v - c) / (1 - c);
	}

	return [hwb[0], c * 100, g * 100];
};

convert.apple.rgb = function (apple) {
	return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];
};

convert.rgb.apple = function (rgb) {
	return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];
};

convert.gray.rgb = function (args) {
	return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
};

convert.gray.hsl = function (args) {
	return [0, 0, args[0]];
};

convert.gray.hsv = convert.gray.hsl;

convert.gray.hwb = function (gray) {
	return [0, 100, gray[0]];
};

convert.gray.cmyk = function (gray) {
	return [0, 0, 0, gray[0]];
};

convert.gray.lab = function (gray) {
	return [gray[0], 0, 0];
};

convert.gray.hex = function (gray) {
	const val = Math.round(gray[0] / 100 * 255) & 0xFF;
	const integer = (val << 16) + (val << 8) + val;

	const string = integer.toString(16).toUpperCase();
	return '000000'.substring(string.length) + string;
};

convert.rgb.gray = function (rgb) {
	const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
	return [val / 255 * 100];
};

/*
	This function routes a model to all other models.

	all functions that are routed have a property `.conversion` attached
	to the returned synthetic function. This property is an array
	of strings, each with the steps in between the 'from' and 'to'
	color models (inclusive).

	conversions that are not possible simply are not included.
*/

function buildGraph() {
	const graph = {};
	// https://jsperf.com/object-keys-vs-for-in-with-closure/3
	const models = Object.keys(conversions);

	for (let len = models.length, i = 0; i < len; i++) {
		graph[models[i]] = {
			// http://jsperf.com/1-vs-infinity
			// micro-opt, but this is simple.
			distance: -1,
			parent: null
		};
	}

	return graph;
}

// https://en.wikipedia.org/wiki/Breadth-first_search
function deriveBFS(fromModel) {
	const graph = buildGraph();
	const queue = [fromModel]; // Unshift -> queue -> pop

	graph[fromModel].distance = 0;

	while (queue.length) {
		const current = queue.pop();
		const adjacents = Object.keys(conversions[current]);

		for (let len = adjacents.length, i = 0; i < len; i++) {
			const adjacent = adjacents[i];
			const node = graph[adjacent];

			if (node.distance === -1) {
				node.distance = graph[current].distance + 1;
				node.parent = current;
				queue.unshift(adjacent);
			}
		}
	}

	return graph;
}

function link(from, to) {
	return function (args) {
		return to(from(args));
	};
}

function wrapConversion(toModel, graph) {
	const path = [graph[toModel].parent, toModel];
	let fn = conversions[graph[toModel].parent][toModel];

	let cur = graph[toModel].parent;
	while (graph[cur].parent) {
		path.unshift(graph[cur].parent);
		fn = link(conversions[graph[cur].parent][cur], fn);
		cur = graph[cur].parent;
	}

	fn.conversion = path;
	return fn;
}

var route$1 = function (fromModel) {
	const graph = deriveBFS(fromModel);
	const conversion = {};

	const models = Object.keys(graph);
	for (let len = models.length, i = 0; i < len; i++) {
		const toModel = models[i];
		const node = graph[toModel];

		if (node.parent === null) {
			// No possible conversion, or this node is the source model.
			continue;
		}

		conversion[toModel] = wrapConversion(toModel, graph);
	}

	return conversion;
};

const convert$1 = {};

const models = Object.keys(conversions);

function wrapRaw(fn) {
	const wrappedFn = function (...args) {
		const arg0 = args[0];
		if (arg0 === undefined || arg0 === null) {
			return arg0;
		}

		if (arg0.length > 1) {
			args = arg0;
		}

		return fn(args);
	};

	// Preserve .conversion property if there is one
	if ('conversion' in fn) {
		wrappedFn.conversion = fn.conversion;
	}

	return wrappedFn;
}

function wrapRounded(fn) {
	const wrappedFn = function (...args) {
		const arg0 = args[0];

		if (arg0 === undefined || arg0 === null) {
			return arg0;
		}

		if (arg0.length > 1) {
			args = arg0;
		}

		const result = fn(args);

		// We're assuming the result is an array here.
		// see notice in conversions.js; don't use box types
		// in conversion functions.
		if (typeof result === 'object') {
			for (let len = result.length, i = 0; i < len; i++) {
				result[i] = Math.round(result[i]);
			}
		}

		return result;
	};

	// Preserve .conversion property if there is one
	if ('conversion' in fn) {
		wrappedFn.conversion = fn.conversion;
	}

	return wrappedFn;
}

models.forEach(fromModel => {
	convert$1[fromModel] = {};

	Object.defineProperty(convert$1[fromModel], 'channels', {value: conversions[fromModel].channels});
	Object.defineProperty(convert$1[fromModel], 'labels', {value: conversions[fromModel].labels});

	const routes = route$1(fromModel);
	const routeModels = Object.keys(routes);

	routeModels.forEach(toModel => {
		const fn = routes[toModel];

		convert$1[fromModel][toModel] = wrapRounded(fn);
		convert$1[fromModel][toModel].raw = wrapRaw(fn);
	});
});

var colorConvert = convert$1;

// Generated by Haxe 3.4.4
var hsluv = hsluv || {};
hsluv.Geometry = function() { };
hsluv.Geometry.intersectLineLine = function(a,b) {
	var x = (a.intercept - b.intercept) / (b.slope - a.slope);
	var y = a.slope * x + a.intercept;
	return { x : x, y : y};
};
hsluv.Geometry.distanceFromOrigin = function(point) {
	return Math.sqrt(Math.pow(point.x,2) + Math.pow(point.y,2));
};
hsluv.Geometry.distanceLineFromOrigin = function(line) {
	return Math.abs(line.intercept) / Math.sqrt(Math.pow(line.slope,2) + 1);
};
hsluv.Geometry.perpendicularThroughPoint = function(line,point) {
	var slope = -1 / line.slope;
	var intercept = point.y - slope * point.x;
	return { slope : slope, intercept : intercept};
};
hsluv.Geometry.angleFromOrigin = function(point) {
	return Math.atan2(point.y,point.x);
};
hsluv.Geometry.normalizeAngle = function(angle) {
	var m = 2 * Math.PI;
	return (angle % m + m) % m;
};
hsluv.Geometry.lengthOfRayUntilIntersect = function(theta,line) {
	return line.intercept / (Math.sin(theta) - line.slope * Math.cos(theta));
};
hsluv.Hsluv = function() { };
hsluv.Hsluv.getBounds = function(L) {
	var result = [];
	var sub1 = Math.pow(L + 16,3) / 1560896;
	var sub2 = sub1 > hsluv.Hsluv.epsilon ? sub1 : L / hsluv.Hsluv.kappa;
	var _g = 0;
	while(_g < 3) {
		var c = _g++;
		var m1 = hsluv.Hsluv.m[c][0];
		var m2 = hsluv.Hsluv.m[c][1];
		var m3 = hsluv.Hsluv.m[c][2];
		var _g1 = 0;
		while(_g1 < 2) {
			var t = _g1++;
			var top1 = (284517 * m1 - 94839 * m3) * sub2;
			var top2 = (838422 * m3 + 769860 * m2 + 731718 * m1) * L * sub2 - 769860 * t * L;
			var bottom = (632260 * m3 - 126452 * m2) * sub2 + 126452 * t;
			result.push({ slope : top1 / bottom, intercept : top2 / bottom});
		}
	}
	return result;
};
hsluv.Hsluv.maxSafeChromaForL = function(L) {
	var bounds = hsluv.Hsluv.getBounds(L);
	var min = Infinity;
	var _g = 0;
	while(_g < bounds.length) {
		var bound = bounds[_g];
		++_g;
		var length = hsluv.Geometry.distanceLineFromOrigin(bound);
		min = Math.min(min,length);
	}
	return min;
};
hsluv.Hsluv.maxChromaForLH = function(L,H) {
	var hrad = H / 360 * Math.PI * 2;
	var bounds = hsluv.Hsluv.getBounds(L);
	var min = Infinity;
	var _g = 0;
	while(_g < bounds.length) {
		var bound = bounds[_g];
		++_g;
		var length = hsluv.Geometry.lengthOfRayUntilIntersect(hrad,bound);
		if(length >= 0) {
			min = Math.min(min,length);
		}
	}
	return min;
};
hsluv.Hsluv.dotProduct = function(a,b) {
	var sum = 0;
	var _g1 = 0;
	var _g = a.length;
	while(_g1 < _g) {
		var i = _g1++;
		sum += a[i] * b[i];
	}
	return sum;
};
hsluv.Hsluv.fromLinear = function(c) {
	if(c <= 0.0031308) {
		return 12.92 * c;
	} else {
		return 1.055 * Math.pow(c,0.416666666666666685) - 0.055;
	}
};
hsluv.Hsluv.toLinear = function(c) {
	if(c > 0.04045) {
		return Math.pow((c + 0.055) / 1.055,2.4);
	} else {
		return c / 12.92;
	}
};
hsluv.Hsluv.xyzToRgb = function(tuple) {
	return [hsluv.Hsluv.fromLinear(hsluv.Hsluv.dotProduct(hsluv.Hsluv.m[0],tuple)),hsluv.Hsluv.fromLinear(hsluv.Hsluv.dotProduct(hsluv.Hsluv.m[1],tuple)),hsluv.Hsluv.fromLinear(hsluv.Hsluv.dotProduct(hsluv.Hsluv.m[2],tuple))];
};
hsluv.Hsluv.rgbToXyz = function(tuple) {
	var rgbl = [hsluv.Hsluv.toLinear(tuple[0]),hsluv.Hsluv.toLinear(tuple[1]),hsluv.Hsluv.toLinear(tuple[2])];
	return [hsluv.Hsluv.dotProduct(hsluv.Hsluv.minv[0],rgbl),hsluv.Hsluv.dotProduct(hsluv.Hsluv.minv[1],rgbl),hsluv.Hsluv.dotProduct(hsluv.Hsluv.minv[2],rgbl)];
};
hsluv.Hsluv.yToL = function(Y) {
	if(Y <= hsluv.Hsluv.epsilon) {
		return Y / hsluv.Hsluv.refY * hsluv.Hsluv.kappa;
	} else {
		return 116 * Math.pow(Y / hsluv.Hsluv.refY,0.333333333333333315) - 16;
	}
};
hsluv.Hsluv.lToY = function(L) {
	if(L <= 8) {
		return hsluv.Hsluv.refY * L / hsluv.Hsluv.kappa;
	} else {
		return hsluv.Hsluv.refY * Math.pow((L + 16) / 116,3);
	}
};
hsluv.Hsluv.xyzToLuv = function(tuple) {
	var X = tuple[0];
	var Y = tuple[1];
	var Z = tuple[2];
	var divider = X + 15 * Y + 3 * Z;
	var varU = 4 * X;
	var varV = 9 * Y;
	if(divider != 0) {
		varU /= divider;
		varV /= divider;
	} else {
		varU = NaN;
		varV = NaN;
	}
	var L = hsluv.Hsluv.yToL(Y);
	if(L == 0) {
		return [0,0,0];
	}
	var U = 13 * L * (varU - hsluv.Hsluv.refU);
	var V = 13 * L * (varV - hsluv.Hsluv.refV);
	return [L,U,V];
};
hsluv.Hsluv.luvToXyz = function(tuple) {
	var L = tuple[0];
	var U = tuple[1];
	var V = tuple[2];
	if(L == 0) {
		return [0,0,0];
	}
	var varU = U / (13 * L) + hsluv.Hsluv.refU;
	var varV = V / (13 * L) + hsluv.Hsluv.refV;
	var Y = hsluv.Hsluv.lToY(L);
	var X = 0 - 9 * Y * varU / ((varU - 4) * varV - varU * varV);
	var Z = (9 * Y - 15 * varV * Y - varV * X) / (3 * varV);
	return [X,Y,Z];
};
hsluv.Hsluv.luvToLch = function(tuple) {
	var L = tuple[0];
	var U = tuple[1];
	var V = tuple[2];
	var C = Math.sqrt(U * U + V * V);
	var H;
	if(C < 0.00000001) {
		H = 0;
	} else {
		var Hrad = Math.atan2(V,U);
		H = Hrad * 180.0 / Math.PI;
		if(H < 0) {
			H = 360 + H;
		}
	}
	return [L,C,H];
};
hsluv.Hsluv.lchToLuv = function(tuple) {
	var L = tuple[0];
	var C = tuple[1];
	var H = tuple[2];
	var Hrad = H / 360.0 * 2 * Math.PI;
	var U = Math.cos(Hrad) * C;
	var V = Math.sin(Hrad) * C;
	return [L,U,V];
};
hsluv.Hsluv.hsluvToLch = function(tuple) {
	var H = tuple[0];
	var S = tuple[1];
	var L = tuple[2];
	if(L > 99.9999999) {
		return [100,0,H];
	}
	if(L < 0.00000001) {
		return [0,0,H];
	}
	var max = hsluv.Hsluv.maxChromaForLH(L,H);
	var C = max / 100 * S;
	return [L,C,H];
};
hsluv.Hsluv.lchToHsluv = function(tuple) {
	var L = tuple[0];
	var C = tuple[1];
	var H = tuple[2];
	if(L > 99.9999999) {
		return [H,0,100];
	}
	if(L < 0.00000001) {
		return [H,0,0];
	}
	var max = hsluv.Hsluv.maxChromaForLH(L,H);
	var S = C / max * 100;
	return [H,S,L];
};
hsluv.Hsluv.hpluvToLch = function(tuple) {
	var H = tuple[0];
	var S = tuple[1];
	var L = tuple[2];
	if(L > 99.9999999) {
		return [100,0,H];
	}
	if(L < 0.00000001) {
		return [0,0,H];
	}
	var max = hsluv.Hsluv.maxSafeChromaForL(L);
	var C = max / 100 * S;
	return [L,C,H];
};
hsluv.Hsluv.lchToHpluv = function(tuple) {
	var L = tuple[0];
	var C = tuple[1];
	var H = tuple[2];
	if(L > 99.9999999) {
		return [H,0,100];
	}
	if(L < 0.00000001) {
		return [H,0,0];
	}
	var max = hsluv.Hsluv.maxSafeChromaForL(L);
	var S = C / max * 100;
	return [H,S,L];
};
hsluv.Hsluv.rgbToHex = function(tuple) {
	var h = "#";
	var _g = 0;
	while(_g < 3) {
		var i = _g++;
		var chan = tuple[i];
		var c = Math.round(chan * 255);
		var digit2 = c % 16;
		var digit1 = (c - digit2) / 16 | 0;
		h += hsluv.Hsluv.hexChars.charAt(digit1) + hsluv.Hsluv.hexChars.charAt(digit2);
	}
	return h;
};
hsluv.Hsluv.hexToRgb = function(hex) {
	hex = hex.toLowerCase();
	var ret = [];
	var _g = 0;
	while(_g < 3) {
		var i = _g++;
		var digit1 = hsluv.Hsluv.hexChars.indexOf(hex.charAt(i * 2 + 1));
		var digit2 = hsluv.Hsluv.hexChars.indexOf(hex.charAt(i * 2 + 2));
		var n = digit1 * 16 + digit2;
		ret.push(n / 255.0);
	}
	return ret;
};
hsluv.Hsluv.lchToRgb = function(tuple) {
	return hsluv.Hsluv.xyzToRgb(hsluv.Hsluv.luvToXyz(hsluv.Hsluv.lchToLuv(tuple)));
};
hsluv.Hsluv.rgbToLch = function(tuple) {
	return hsluv.Hsluv.luvToLch(hsluv.Hsluv.xyzToLuv(hsluv.Hsluv.rgbToXyz(tuple)));
};
hsluv.Hsluv.hsluvToRgb = function(tuple) {
	return hsluv.Hsluv.lchToRgb(hsluv.Hsluv.hsluvToLch(tuple));
};
hsluv.Hsluv.rgbToHsluv = function(tuple) {
	return hsluv.Hsluv.lchToHsluv(hsluv.Hsluv.rgbToLch(tuple));
};
hsluv.Hsluv.hpluvToRgb = function(tuple) {
	return hsluv.Hsluv.lchToRgb(hsluv.Hsluv.hpluvToLch(tuple));
};
hsluv.Hsluv.rgbToHpluv = function(tuple) {
	return hsluv.Hsluv.lchToHpluv(hsluv.Hsluv.rgbToLch(tuple));
};
hsluv.Hsluv.hsluvToHex = function(tuple) {
	return hsluv.Hsluv.rgbToHex(hsluv.Hsluv.hsluvToRgb(tuple));
};
hsluv.Hsluv.hpluvToHex = function(tuple) {
	return hsluv.Hsluv.rgbToHex(hsluv.Hsluv.hpluvToRgb(tuple));
};
hsluv.Hsluv.hexToHsluv = function(s) {
	return hsluv.Hsluv.rgbToHsluv(hsluv.Hsluv.hexToRgb(s));
};
hsluv.Hsluv.hexToHpluv = function(s) {
	return hsluv.Hsluv.rgbToHpluv(hsluv.Hsluv.hexToRgb(s));
};
hsluv.Hsluv.m = [[3.240969941904521,-1.537383177570093,-0.498610760293],[-0.96924363628087,1.87596750150772,0.041555057407175],[0.055630079696993,-0.20397695888897,1.056971514242878]];
hsluv.Hsluv.minv = [[0.41239079926595,0.35758433938387,0.18048078840183],[0.21263900587151,0.71516867876775,0.072192315360733],[0.019330818715591,0.11919477979462,0.95053215224966]];
hsluv.Hsluv.refY = 1.0;
hsluv.Hsluv.refU = 0.19783000664283;
hsluv.Hsluv.refV = 0.46831999493879;
hsluv.Hsluv.kappa = 903.2962962;
hsluv.Hsluv.epsilon = 0.0088564516;
hsluv.Hsluv.hexChars = "0123456789abcdef";
var root = {
    "hsluvToRgb": hsluv.Hsluv.hsluvToRgb,
    "rgbToHsluv": hsluv.Hsluv.rgbToHsluv,
    "hpluvToRgb": hsluv.Hsluv.hpluvToRgb,
    "rgbToHpluv": hsluv.Hsluv.rgbToHpluv,
    "hsluvToHex": hsluv.Hsluv.hsluvToHex,
    "hexToHsluv": hsluv.Hsluv.hexToHsluv,
    "hpluvToHex": hsluv.Hsluv.hpluvToHex,
    "hexToHpluv": hsluv.Hsluv.hexToHpluv,
    "lchToHpluv": hsluv.Hsluv.lchToHpluv,
    "hpluvToLch": hsluv.Hsluv.hpluvToLch,
    "lchToHsluv": hsluv.Hsluv.lchToHsluv,
    "hsluvToLch": hsluv.Hsluv.hsluvToLch,
    "lchToLuv": hsluv.Hsluv.lchToLuv,
    "luvToLch": hsluv.Hsluv.luvToLch,
    "xyzToLuv": hsluv.Hsluv.xyzToLuv,
    "luvToXyz": hsluv.Hsluv.luvToXyz,
    "xyzToRgb": hsluv.Hsluv.xyzToRgb,
    "rgbToXyz": hsluv.Hsluv.rgbToXyz,
    "lchToRgb": hsluv.Hsluv.lchToRgb,
    "rgbToLch": hsluv.Hsluv.rgbToLch
};

var hsluv_1 = root;

var hsluv_cache = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.cachedHsluvToHex = void 0;

class HsluvCache {
    constructor() {
        this.storage = new Map();
    }
    get(hue, saturation, lightness) {
        const key = hue * 1e6 + saturation * 1e3 + lightness;
        const value = this.storage.get(key);
        if (value === undefined) {
            const computed = (0, hsluv_1.hsluvToHex)([hue, saturation, lightness]);
            this.storage.set(key, computed);
            return computed;
        }
        return value;
    }
}
const cache = new HsluvCache();
function cachedHsluvToHex(hue, saturation, lightness) {
    return cache.get(hue, saturation, lightness);
}
exports.cachedHsluvToHex = cachedHsluvToHex;

});

var colorizer = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.colorCompare = exports.colorToStr = exports.colorForThreadIdleSlice = exports.hslForSlice = exports.randomColor = exports.colorForThread = exports.colorForTid = exports.textColorForState = exports.colorForState = exports.hueForCpu = exports.GRAY_COLOR = void 0;


const MD_PALETTE = [
    { c: 'red', h: 4, s: 90, l: 58 },
    { c: 'pink', h: 340, s: 82, l: 52 },
    { c: 'purple', h: 291, s: 64, l: 42 },
    { c: 'deep purple', h: 262, s: 52, l: 47 },
    { c: 'indigo', h: 231, s: 48, l: 48 },
    { c: 'blue', h: 207, s: 90, l: 54 },
    { c: 'light blue', h: 199, s: 98, l: 48 },
    { c: 'cyan', h: 187, s: 100, l: 42 },
    { c: 'teal', h: 174, s: 100, l: 29 },
    { c: 'green', h: 122, s: 39, l: 49 },
    { c: 'light green', h: 88, s: 50, l: 53 },
    { c: 'lime', h: 66, s: 70, l: 54 },
    { c: 'amber', h: 45, s: 100, l: 51 },
    { c: 'orange', h: 36, s: 100, l: 50 },
    { c: 'deep orange', h: 14, s: 100, l: 57 },
    { c: 'brown', h: 16, s: 25, l: 38 },
    { c: 'blue gray', h: 200, s: 18, l: 46 },
    { c: 'yellow', h: 54, s: 100, l: 62 },
];
exports.GRAY_COLOR = {
    c: 'grey',
    h: 0,
    s: 0,
    l: 62,
};
function hash(s, max) {
    let hash = 0x811c9dc5 & 0xfffffff;
    for (let i = 0; i < s.length; i++) {
        hash ^= s.charCodeAt(i);
        hash = (hash * 16777619) & 0xffffffff;
    }
    return Math.abs(hash) % max;
}
function hueForCpu(cpu) {
    return (128 + (32 * cpu)) % 256;
}
exports.hueForCpu = hueForCpu;
const DESAT_RED = {
    c: 'desat red',
    h: 3,
    s: 30,
    l: 49,
};
const DARK_GREEN = {
    c: 'dark green',
    h: 120,
    s: 44,
    l: 34,
};
const LIME_GREEN = {
    c: 'lime green',
    h: 75,
    s: 55,
    l: 47,
};
const TRANSPARENT_WHITE = {
    c: 'white',
    h: 0,
    s: 1,
    l: 97,
    a: 0.55,
};
const ORANGE = {
    c: 'orange',
    h: 36,
    s: 100,
    l: 50,
};
const INDIGO = {
    c: 'indigo',
    h: 231,
    s: 48,
    l: 48,
};
function colorForState(state) {
    if (state === 'Running') {
        return DARK_GREEN;
    }
    else if (state.startsWith('Runnable')) {
        return LIME_GREEN;
    }
    else if (state.includes('Uninterruptible Sleep')) {
        if (state.includes('non-IO')) {
            return DESAT_RED;
        }
        return ORANGE;
    }
    else if (state.includes('Sleeping') || state.includes('Idle')) {
        return TRANSPARENT_WHITE;
    }
    return INDIGO;
}
exports.colorForState = colorForState;
function textColorForState(stateCode) {
    const background = colorForState(stateCode);
    return background.l > 80 ? '#404040' : '#fff';
}
exports.textColorForState = textColorForState;
function colorForTid(tid) {
    const colorIdx = hash(tid.toString(), MD_PALETTE.length);
    return Object.assign({}, MD_PALETTE[colorIdx]);
}
exports.colorForTid = colorForTid;
function colorForThread(thread) {
    if (thread === undefined) {
        return Object.assign({}, exports.GRAY_COLOR);
    }
    const tid = thread.pid ? thread.pid : thread.tid;
    return colorForTid(tid);
}
exports.colorForThread = colorForThread;
// 40 different random hues 9 degrees apart.
function randomColor() {
    const hue = Math.floor(Math.random() * 40) * 9;
    return '#' + colorConvert.hsl.hex([hue, 90, 30]);
}
exports.randomColor = randomColor;
// Chooses a color uniform at random based on hash(sliceName).  Returns [hue,
// saturation, lightness].
//
// Prefer converting this to an RGB color using hsluv, not the browser's
// built-in vanilla HSL handling.  This is because this function chooses
// hue/lightness uniform at random, but HSL is not perceptually uniform.  See
// https://www.boronine.com/2012/03/26/Color-Spaces-for-Human-Beings/.
//
// If isSelected, the color will be particularly dark, making it stand out.
function hslForSlice(sliceName, isSelected) {
    const hue = hash(sliceName, 360);
    // Saturation 100 would give the most differentiation between colors, but it's
    // garish.
    const saturation = 80;
    const lightness = isSelected ? 30 : hash(sliceName + 'x', 40) + 40;
    return [hue, saturation, lightness];
}
exports.hslForSlice = hslForSlice;
// Lightens the color for thread slices to represent wall time.
function colorForThreadIdleSlice(hue, saturation, lightness, isSelected) {
    // Increase lightness by 80% when selected and 40% otherwise,
    // without exceeding 88.
    let newLightness = isSelected ? lightness * 1.8 : lightness * 1.4;
    newLightness = Math.min(newLightness, 88);
    return (0, hsluv_cache.cachedHsluvToHex)(hue, saturation, newLightness);
}
exports.colorForThreadIdleSlice = colorForThreadIdleSlice;
function colorToStr(color) {
    if (color.a !== undefined) {
        return `hsla(${color.h}, ${color.s}%, ${color.l}%, ${color.a})`;
    }
    return `hsl(${color.h}, ${color.s}%, ${color.l}%)`;
}
exports.colorToStr = colorToStr;
function colorCompare(x, y) {
    return (x.h - y.h) || (x.s - y.s) || (x.l - y.l);
}
exports.colorCompare = colorCompare;

});

var flamegraph_util = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.findRootSize = exports.mergeCallsites = exports.expandCallsites = exports.DEFAULT_VIEWING_OPTION = exports.PERF_SAMPLES_KEY = exports.OBJECTS_ALLOCATED_KEY = exports.OBJECTS_ALLOCATED_NOT_FREED_KEY = exports.ALLOC_SPACE_MEMORY_ALLOCATED_KEY = exports.SPACE_MEMORY_ALLOCATED_NOT_FREED_KEY = void 0;
exports.SPACE_MEMORY_ALLOCATED_NOT_FREED_KEY = 'SPACE';
exports.ALLOC_SPACE_MEMORY_ALLOCATED_KEY = 'ALLOC_SPACE';
exports.OBJECTS_ALLOCATED_NOT_FREED_KEY = 'OBJECTS';
exports.OBJECTS_ALLOCATED_KEY = 'ALLOC_OBJECTS';
exports.PERF_SAMPLES_KEY = 'PERF_SAMPLES';
exports.DEFAULT_VIEWING_OPTION = exports.SPACE_MEMORY_ALLOCATED_NOT_FREED_KEY;
function expandCallsites(data, clickedCallsiteIndex) {
    if (clickedCallsiteIndex === -1)
        return data;
    const expandedCallsites = [];
    if (clickedCallsiteIndex >= data.length || clickedCallsiteIndex < -1) {
        return expandedCallsites;
    }
    const clickedCallsite = data[clickedCallsiteIndex];
    expandedCallsites.unshift(clickedCallsite);
    // Adding parents
    let parentId = clickedCallsite.parentId;
    while (parentId > -1) {
        expandedCallsites.unshift(data[parentId]);
        parentId = data[parentId].parentId;
    }
    // Adding children
    const parents = [];
    parents.push(clickedCallsiteIndex);
    for (let i = clickedCallsiteIndex + 1; i < data.length; i++) {
        const element = data[i];
        if (parents.includes(element.parentId)) {
            expandedCallsites.push(element);
            parents.push(element.id);
        }
    }
    return expandedCallsites;
}
exports.expandCallsites = expandCallsites;
// Merge callsites that have approximately width less than
// MIN_PIXEL_DISPLAYED. All small callsites in the same depth and with same
// parent will be merged to one with total size of all merged callsites.
function mergeCallsites(data, minSizeDisplayed) {
    const mergedData = [];
    const mergedCallsites = new Map();
    for (let i = 0; i < data.length; i++) {
        // When a small callsite is found, it will be merged with other small
        // callsites of the same depth. So if the current callsite has already been
        // merged we can skip it.
        if (mergedCallsites.has(data[i].id)) {
            continue;
        }
        const copiedCallsite = copyCallsite(data[i]);
        copiedCallsite.parentId =
            getCallsitesParentHash(copiedCallsite, mergedCallsites);
        let mergedAny = false;
        // If current callsite is small, find other small callsites with same depth
        // and parent and merge them into the current one, marking them as merged.
        if (copiedCallsite.totalSize <= minSizeDisplayed && i + 1 < data.length) {
            let j = i + 1;
            let nextCallsite = data[j];
            while (j < data.length && copiedCallsite.depth === nextCallsite.depth) {
                if (copiedCallsite.parentId ===
                    getCallsitesParentHash(nextCallsite, mergedCallsites) &&
                    nextCallsite.totalSize <= minSizeDisplayed) {
                    copiedCallsite.totalSize += nextCallsite.totalSize;
                    mergedCallsites.set(nextCallsite.id, copiedCallsite.id);
                    mergedAny = true;
                }
                j++;
                nextCallsite = data[j];
            }
            if (mergedAny) {
                copiedCallsite.name = '[merged]';
                copiedCallsite.merged = true;
            }
        }
        mergedData.push(copiedCallsite);
    }
    return mergedData;
}
exports.mergeCallsites = mergeCallsites;
function copyCallsite(callsite) {
    return {
        id: callsite.id,
        parentId: callsite.parentId,
        depth: callsite.depth,
        name: callsite.name,
        totalSize: callsite.totalSize,
        mapping: callsite.mapping,
        selfSize: callsite.selfSize,
        merged: callsite.merged,
        highlighted: callsite.highlighted,
        location: callsite.location,
    };
}
function getCallsitesParentHash(callsite, map) {
    return map.has(callsite.parentId) ? +map.get(callsite.parentId) :
        callsite.parentId;
}
function findRootSize(data) {
    let totalSize = 0;
    let i = 0;
    while (i < data.length && data[i].depth === 0) {
        totalSize += data[i].totalSize;
        i++;
    }
    return totalSize;
}
exports.findRootSize = findRootSize;

});

var aspromise = asPromise;

/**
 * Callback as used by {@link util.asPromise}.
 * @typedef asPromiseCallback
 * @type {function}
 * @param {Error|null} error Error, if any
 * @param {...*} params Additional arguments
 * @returns {undefined}
 */

/**
 * Returns a promise from a node-style callback function.
 * @memberof util
 * @param {asPromiseCallback} fn Function to call
 * @param {*} ctx Function context
 * @param {...*} params Function arguments
 * @returns {Promise<*>} Promisified function
 */
function asPromise(fn, ctx/*, varargs */) {
    var params  = new Array(arguments.length - 1),
        offset  = 0,
        index   = 2,
        pending = true;
    while (index < arguments.length)
        params[offset++] = arguments[index++];
    return new Promise(function executor(resolve, reject) {
        params[offset] = function callback(err/*, varargs */) {
            if (pending) {
                pending = false;
                if (err)
                    reject(err);
                else {
                    var params = new Array(arguments.length - 1),
                        offset = 0;
                    while (offset < params.length)
                        params[offset++] = arguments[offset];
                    resolve.apply(null, params);
                }
            }
        };
        try {
            fn.apply(ctx || null, params);
        } catch (err) {
            if (pending) {
                pending = false;
                reject(err);
            }
        }
    });
}

var base64_1 = createCommonjsModule(function (module, exports) {

/**
 * A minimal base64 implementation for number arrays.
 * @memberof util
 * @namespace
 */
var base64 = exports;

/**
 * Calculates the byte length of a base64 encoded string.
 * @param {string} string Base64 encoded string
 * @returns {number} Byte length
 */
base64.length = function length(string) {
    var p = string.length;
    if (!p)
        return 0;
    var n = 0;
    while (--p % 4 > 1 && string.charAt(p) === "=")
        ++n;
    return Math.ceil(string.length * 3) / 4 - n;
};

// Base64 encoding table
var b64 = new Array(64);

// Base64 decoding table
var s64 = new Array(123);

// 65..90, 97..122, 48..57, 43, 47
for (var i = 0; i < 64;)
    s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;

/**
 * Encodes a buffer to a base64 encoded string.
 * @param {Uint8Array} buffer Source buffer
 * @param {number} start Source start
 * @param {number} end Source end
 * @returns {string} Base64 encoded string
 */
base64.encode = function encode(buffer, start, end) {
    var parts = null,
        chunk = [];
    var i = 0, // output index
        j = 0, // goto index
        t;     // temporary
    while (start < end) {
        var b = buffer[start++];
        switch (j) {
            case 0:
                chunk[i++] = b64[b >> 2];
                t = (b & 3) << 4;
                j = 1;
                break;
            case 1:
                chunk[i++] = b64[t | b >> 4];
                t = (b & 15) << 2;
                j = 2;
                break;
            case 2:
                chunk[i++] = b64[t | b >> 6];
                chunk[i++] = b64[b & 63];
                j = 0;
                break;
        }
        if (i > 8191) {
            (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
            i = 0;
        }
    }
    if (j) {
        chunk[i++] = b64[t];
        chunk[i++] = 61;
        if (j === 1)
            chunk[i++] = 61;
    }
    if (parts) {
        if (i)
            parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));
        return parts.join("");
    }
    return String.fromCharCode.apply(String, chunk.slice(0, i));
};

var invalidEncoding = "invalid encoding";

/**
 * Decodes a base64 encoded string to a buffer.
 * @param {string} string Source string
 * @param {Uint8Array} buffer Destination buffer
 * @param {number} offset Destination offset
 * @returns {number} Number of bytes written
 * @throws {Error} If encoding is invalid
 */
base64.decode = function decode(string, buffer, offset) {
    var start = offset;
    var j = 0, // goto index
        t;     // temporary
    for (var i = 0; i < string.length;) {
        var c = string.charCodeAt(i++);
        if (c === 61 && j > 1)
            break;
        if ((c = s64[c]) === undefined)
            throw Error(invalidEncoding);
        switch (j) {
            case 0:
                t = c;
                j = 1;
                break;
            case 1:
                buffer[offset++] = t << 2 | (c & 48) >> 4;
                t = c;
                j = 2;
                break;
            case 2:
                buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;
                t = c;
                j = 3;
                break;
            case 3:
                buffer[offset++] = (t & 3) << 6 | c;
                j = 0;
                break;
        }
    }
    if (j === 1)
        throw Error(invalidEncoding);
    return offset - start;
};

/**
 * Tests if the specified string appears to be base64 encoded.
 * @param {string} string String to test
 * @returns {boolean} `true` if probably base64 encoded, otherwise false
 */
base64.test = function test(string) {
    return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);
};
});

var eventemitter = EventEmitter;

/**
 * Constructs a new event emitter instance.
 * @classdesc A minimal event emitter.
 * @memberof util
 * @constructor
 */
function EventEmitter() {

    /**
     * Registered listeners.
     * @type {Object.<string,*>}
     * @private
     */
    this._listeners = {};
}

/**
 * Registers an event listener.
 * @param {string} evt Event name
 * @param {function} fn Listener
 * @param {*} [ctx] Listener context
 * @returns {util.EventEmitter} `this`
 */
EventEmitter.prototype.on = function on(evt, fn, ctx) {
    (this._listeners[evt] || (this._listeners[evt] = [])).push({
        fn  : fn,
        ctx : ctx || this
    });
    return this;
};

/**
 * Removes an event listener or any matching listeners if arguments are omitted.
 * @param {string} [evt] Event name. Removes all listeners if omitted.
 * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted.
 * @returns {util.EventEmitter} `this`
 */
EventEmitter.prototype.off = function off(evt, fn) {
    if (evt === undefined)
        this._listeners = {};
    else {
        if (fn === undefined)
            this._listeners[evt] = [];
        else {
            var listeners = this._listeners[evt];
            for (var i = 0; i < listeners.length;)
                if (listeners[i].fn === fn)
                    listeners.splice(i, 1);
                else
                    ++i;
        }
    }
    return this;
};

/**
 * Emits an event by calling its listeners with the specified arguments.
 * @param {string} evt Event name
 * @param {...*} args Arguments
 * @returns {util.EventEmitter} `this`
 */
EventEmitter.prototype.emit = function emit(evt) {
    var listeners = this._listeners[evt];
    if (listeners) {
        var args = [],
            i = 1;
        for (; i < arguments.length;)
            args.push(arguments[i++]);
        for (i = 0; i < listeners.length;)
            listeners[i].fn.apply(listeners[i++].ctx, args);
    }
    return this;
};

var float_1 = factory(factory);

/**
 * Reads / writes floats / doubles from / to buffers.
 * @name util.float
 * @namespace
 */

/**
 * Writes a 32 bit float to a buffer using little endian byte order.
 * @name util.float.writeFloatLE
 * @function
 * @param {number} val Value to write
 * @param {Uint8Array} buf Target buffer
 * @param {number} pos Target buffer offset
 * @returns {undefined}
 */

/**
 * Writes a 32 bit float to a buffer using big endian byte order.
 * @name util.float.writeFloatBE
 * @function
 * @param {number} val Value to write
 * @param {Uint8Array} buf Target buffer
 * @param {number} pos Target buffer offset
 * @returns {undefined}
 */

/**
 * Reads a 32 bit float from a buffer using little endian byte order.
 * @name util.float.readFloatLE
 * @function
 * @param {Uint8Array} buf Source buffer
 * @param {number} pos Source buffer offset
 * @returns {number} Value read
 */

/**
 * Reads a 32 bit float from a buffer using big endian byte order.
 * @name util.float.readFloatBE
 * @function
 * @param {Uint8Array} buf Source buffer
 * @param {number} pos Source buffer offset
 * @returns {number} Value read
 */

/**
 * Writes a 64 bit double to a buffer using little endian byte order.
 * @name util.float.writeDoubleLE
 * @function
 * @param {number} val Value to write
 * @param {Uint8Array} buf Target buffer
 * @param {number} pos Target buffer offset
 * @returns {undefined}
 */

/**
 * Writes a 64 bit double to a buffer using big endian byte order.
 * @name util.float.writeDoubleBE
 * @function
 * @param {number} val Value to write
 * @param {Uint8Array} buf Target buffer
 * @param {number} pos Target buffer offset
 * @returns {undefined}
 */

/**
 * Reads a 64 bit double from a buffer using little endian byte order.
 * @name util.float.readDoubleLE
 * @function
 * @param {Uint8Array} buf Source buffer
 * @param {number} pos Source buffer offset
 * @returns {number} Value read
 */

/**
 * Reads a 64 bit double from a buffer using big endian byte order.
 * @name util.float.readDoubleBE
 * @function
 * @param {Uint8Array} buf Source buffer
 * @param {number} pos Source buffer offset
 * @returns {number} Value read
 */

// Factory function for the purpose of node-based testing in modified global environments
function factory(exports) {

    // float: typed array
    if (typeof Float32Array !== "undefined") (function() {

        var f32 = new Float32Array([ -0 ]),
            f8b = new Uint8Array(f32.buffer),
            le  = f8b[3] === 128;

        function writeFloat_f32_cpy(val, buf, pos) {
            f32[0] = val;
            buf[pos    ] = f8b[0];
            buf[pos + 1] = f8b[1];
            buf[pos + 2] = f8b[2];
            buf[pos + 3] = f8b[3];
        }

        function writeFloat_f32_rev(val, buf, pos) {
            f32[0] = val;
            buf[pos    ] = f8b[3];
            buf[pos + 1] = f8b[2];
            buf[pos + 2] = f8b[1];
            buf[pos + 3] = f8b[0];
        }

        /* istanbul ignore next */
        exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;
        /* istanbul ignore next */
        exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;

        function readFloat_f32_cpy(buf, pos) {
            f8b[0] = buf[pos    ];
            f8b[1] = buf[pos + 1];
            f8b[2] = buf[pos + 2];
            f8b[3] = buf[pos + 3];
            return f32[0];
        }

        function readFloat_f32_rev(buf, pos) {
            f8b[3] = buf[pos    ];
            f8b[2] = buf[pos + 1];
            f8b[1] = buf[pos + 2];
            f8b[0] = buf[pos + 3];
            return f32[0];
        }

        /* istanbul ignore next */
        exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;
        /* istanbul ignore next */
        exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;

    // float: ieee754
    })(); else (function() {

        function writeFloat_ieee754(writeUint, val, buf, pos) {
            var sign = val < 0 ? 1 : 0;
            if (sign)
                val = -val;
            if (val === 0)
                writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos);
            else if (isNaN(val))
                writeUint(2143289344, buf, pos);
            else if (val > 3.4028234663852886e+38) // +-Infinity
                writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);
            else if (val < 1.1754943508222875e-38) // denormal
                writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos);
            else {
                var exponent = Math.floor(Math.log(val) / Math.LN2),
                    mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;
                writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);
            }
        }

        exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);
        exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);

        function readFloat_ieee754(readUint, buf, pos) {
            var uint = readUint(buf, pos),
                sign = (uint >> 31) * 2 + 1,
                exponent = uint >>> 23 & 255,
                mantissa = uint & 8388607;
            return exponent === 255
                ? mantissa
                ? NaN
                : sign * Infinity
                : exponent === 0 // denormal
                ? sign * 1.401298464324817e-45 * mantissa
                : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);
        }

        exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE);
        exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE);

    })();

    // double: typed array
    if (typeof Float64Array !== "undefined") (function() {

        var f64 = new Float64Array([-0]),
            f8b = new Uint8Array(f64.buffer),
            le  = f8b[7] === 128;

        function writeDouble_f64_cpy(val, buf, pos) {
            f64[0] = val;
            buf[pos    ] = f8b[0];
            buf[pos + 1] = f8b[1];
            buf[pos + 2] = f8b[2];
            buf[pos + 3] = f8b[3];
            buf[pos + 4] = f8b[4];
            buf[pos + 5] = f8b[5];
            buf[pos + 6] = f8b[6];
            buf[pos + 7] = f8b[7];
        }

        function writeDouble_f64_rev(val, buf, pos) {
            f64[0] = val;
            buf[pos    ] = f8b[7];
            buf[pos + 1] = f8b[6];
            buf[pos + 2] = f8b[5];
            buf[pos + 3] = f8b[4];
            buf[pos + 4] = f8b[3];
            buf[pos + 5] = f8b[2];
            buf[pos + 6] = f8b[1];
            buf[pos + 7] = f8b[0];
        }

        /* istanbul ignore next */
        exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;
        /* istanbul ignore next */
        exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;

        function readDouble_f64_cpy(buf, pos) {
            f8b[0] = buf[pos    ];
            f8b[1] = buf[pos + 1];
            f8b[2] = buf[pos + 2];
            f8b[3] = buf[pos + 3];
            f8b[4] = buf[pos + 4];
            f8b[5] = buf[pos + 5];
            f8b[6] = buf[pos + 6];
            f8b[7] = buf[pos + 7];
            return f64[0];
        }

        function readDouble_f64_rev(buf, pos) {
            f8b[7] = buf[pos    ];
            f8b[6] = buf[pos + 1];
            f8b[5] = buf[pos + 2];
            f8b[4] = buf[pos + 3];
            f8b[3] = buf[pos + 4];
            f8b[2] = buf[pos + 5];
            f8b[1] = buf[pos + 6];
            f8b[0] = buf[pos + 7];
            return f64[0];
        }

        /* istanbul ignore next */
        exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;
        /* istanbul ignore next */
        exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;

    // double: ieee754
    })(); else (function() {

        function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {
            var sign = val < 0 ? 1 : 0;
            if (sign)
                val = -val;
            if (val === 0) {
                writeUint(0, buf, pos + off0);
                writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1);
            } else if (isNaN(val)) {
                writeUint(0, buf, pos + off0);
                writeUint(2146959360, buf, pos + off1);
            } else if (val > 1.7976931348623157e+308) { // +-Infinity
                writeUint(0, buf, pos + off0);
                writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);
            } else {
                var mantissa;
                if (val < 2.2250738585072014e-308) { // denormal
                    mantissa = val / 5e-324;
                    writeUint(mantissa >>> 0, buf, pos + off0);
                    writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);
                } else {
                    var exponent = Math.floor(Math.log(val) / Math.LN2);
                    if (exponent === 1024)
                        exponent = 1023;
                    mantissa = val * Math.pow(2, -exponent);
                    writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);
                    writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);
                }
            }
        }

        exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);
        exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);

        function readDouble_ieee754(readUint, off0, off1, buf, pos) {
            var lo = readUint(buf, pos + off0),
                hi = readUint(buf, pos + off1);
            var sign = (hi >> 31) * 2 + 1,
                exponent = hi >>> 20 & 2047,
                mantissa = 4294967296 * (hi & 1048575) + lo;
            return exponent === 2047
                ? mantissa
                ? NaN
                : sign * Infinity
                : exponent === 0 // denormal
                ? sign * 5e-324 * mantissa
                : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);
        }

        exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);
        exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);

    })();

    return exports;
}

// uint helpers

function writeUintLE(val, buf, pos) {
    buf[pos    ] =  val        & 255;
    buf[pos + 1] =  val >>> 8  & 255;
    buf[pos + 2] =  val >>> 16 & 255;
    buf[pos + 3] =  val >>> 24;
}

function writeUintBE(val, buf, pos) {
    buf[pos    ] =  val >>> 24;
    buf[pos + 1] =  val >>> 16 & 255;
    buf[pos + 2] =  val >>> 8  & 255;
    buf[pos + 3] =  val        & 255;
}

function readUintLE(buf, pos) {
    return (buf[pos    ]
          | buf[pos + 1] << 8
          | buf[pos + 2] << 16
          | buf[pos + 3] << 24) >>> 0;
}

function readUintBE(buf, pos) {
    return (buf[pos    ] << 24
          | buf[pos + 1] << 16
          | buf[pos + 2] << 8
          | buf[pos + 3]) >>> 0;
}

var inquire_1 = inquire;

/**
 * Requires a module only if available.
 * @memberof util
 * @param {string} moduleName Module to require
 * @returns {?Object} Required module if available and not empty, otherwise `null`
 */
function inquire(moduleName) {
    try {
        var mod = undefined; // eslint-disable-line no-eval
        if (mod && (mod.length || Object.keys(mod).length))
            return mod;
    } catch (e) {} // eslint-disable-line no-empty
    return null;
}

var utf8_1 = createCommonjsModule(function (module, exports) {

/**
 * A minimal UTF8 implementation for number arrays.
 * @memberof util
 * @namespace
 */
var utf8 = exports;

/**
 * Calculates the UTF8 byte length of a string.
 * @param {string} string String
 * @returns {number} Byte length
 */
utf8.length = function utf8_length(string) {
    var len = 0,
        c = 0;
    for (var i = 0; i < string.length; ++i) {
        c = string.charCodeAt(i);
        if (c < 128)
            len += 1;
        else if (c < 2048)
            len += 2;
        else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) {
            ++i;
            len += 4;
        } else
            len += 3;
    }
    return len;
};

/**
 * Reads UTF8 bytes as a string.
 * @param {Uint8Array} buffer Source buffer
 * @param {number} start Source start
 * @param {number} end Source end
 * @returns {string} String read
 */
utf8.read = function utf8_read(buffer, start, end) {
    var len = end - start;
    if (len < 1)
        return "";
    var parts = null,
        chunk = [],
        i = 0, // char offset
        t;     // temporary
    while (start < end) {
        t = buffer[start++];
        if (t < 128)
            chunk[i++] = t;
        else if (t > 191 && t < 224)
            chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;
        else if (t > 239 && t < 365) {
            t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;
            chunk[i++] = 0xD800 + (t >> 10);
            chunk[i++] = 0xDC00 + (t & 1023);
        } else
            chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;
        if (i > 8191) {
            (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
            i = 0;
        }
    }
    if (parts) {
        if (i)
            parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));
        return parts.join("");
    }
    return String.fromCharCode.apply(String, chunk.slice(0, i));
};

/**
 * Writes a string as UTF8 bytes.
 * @param {string} string Source string
 * @param {Uint8Array} buffer Destination buffer
 * @param {number} offset Destination offset
 * @returns {number} Bytes written
 */
utf8.write = function utf8_write(string, buffer, offset) {
    var start = offset,
        c1, // character 1
        c2; // character 2
    for (var i = 0; i < string.length; ++i) {
        c1 = string.charCodeAt(i);
        if (c1 < 128) {
            buffer[offset++] = c1;
        } else if (c1 < 2048) {
            buffer[offset++] = c1 >> 6       | 192;
            buffer[offset++] = c1       & 63 | 128;
        } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) {
            c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF);
            ++i;
            buffer[offset++] = c1 >> 18      | 240;
            buffer[offset++] = c1 >> 12 & 63 | 128;
            buffer[offset++] = c1 >> 6  & 63 | 128;
            buffer[offset++] = c1       & 63 | 128;
        } else {
            buffer[offset++] = c1 >> 12      | 224;
            buffer[offset++] = c1 >> 6  & 63 | 128;
            buffer[offset++] = c1       & 63 | 128;
        }
    }
    return offset - start;
};
});

var pool_1 = pool;

/**
 * An allocator as used by {@link util.pool}.
 * @typedef PoolAllocator
 * @type {function}
 * @param {number} size Buffer size
 * @returns {Uint8Array} Buffer
 */

/**
 * A slicer as used by {@link util.pool}.
 * @typedef PoolSlicer
 * @type {function}
 * @param {number} start Start offset
 * @param {number} end End offset
 * @returns {Uint8Array} Buffer slice
 * @this {Uint8Array}
 */

/**
 * A general purpose buffer pool.
 * @memberof util
 * @function
 * @param {PoolAllocator} alloc Allocator
 * @param {PoolSlicer} slice Slicer
 * @param {number} [size=8192] Slab size
 * @returns {PoolAllocator} Pooled allocator
 */
function pool(alloc, slice, size) {
    var SIZE   = size || 8192;
    var MAX    = SIZE >>> 1;
    var slab   = null;
    var offset = SIZE;
    return function pool_alloc(size) {
        if (size < 1 || size > MAX)
            return alloc(size);
        if (offset + size > SIZE) {
            slab = alloc(SIZE);
            offset = 0;
        }
        var buf = slice.call(slab, offset, offset += size);
        if (offset & 7) // align to 32 bit
            offset = (offset | 7) + 1;
        return buf;
    };
}

var longbits = LongBits;



/**
 * Constructs new long bits.
 * @classdesc Helper class for working with the low and high bits of a 64 bit value.
 * @memberof util
 * @constructor
 * @param {number} lo Low 32 bits, unsigned
 * @param {number} hi High 32 bits, unsigned
 */
function LongBits(lo, hi) {

    // note that the casts below are theoretically unnecessary as of today, but older statically
    // generated converter code might still call the ctor with signed 32bits. kept for compat.

    /**
     * Low bits.
     * @type {number}
     */
    this.lo = lo >>> 0;

    /**
     * High bits.
     * @type {number}
     */
    this.hi = hi >>> 0;
}

/**
 * Zero bits.
 * @memberof util.LongBits
 * @type {util.LongBits}
 */
var zero = LongBits.zero = new LongBits(0, 0);

zero.toNumber = function() { return 0; };
zero.zzEncode = zero.zzDecode = function() { return this; };
zero.length = function() { return 1; };

/**
 * Zero hash.
 * @memberof util.LongBits
 * @type {string}
 */
var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0";

/**
 * Constructs new long bits from the specified number.
 * @param {number} value Value
 * @returns {util.LongBits} Instance
 */
LongBits.fromNumber = function fromNumber(value) {
    if (value === 0)
        return zero;
    var sign = value < 0;
    if (sign)
        value = -value;
    var lo = value >>> 0,
        hi = (value - lo) / 4294967296 >>> 0;
    if (sign) {
        hi = ~hi >>> 0;
        lo = ~lo >>> 0;
        if (++lo > 4294967295) {
            lo = 0;
            if (++hi > 4294967295)
                hi = 0;
        }
    }
    return new LongBits(lo, hi);
};

/**
 * Constructs new long bits from a number, long or string.
 * @param {Long|number|string} value Value
 * @returns {util.LongBits} Instance
 */
LongBits.from = function from(value) {
    if (typeof value === "number")
        return LongBits.fromNumber(value);
    if (minimal.isString(value)) {
        /* istanbul ignore else */
        if (minimal.Long)
            value = minimal.Long.fromString(value);
        else
            return LongBits.fromNumber(parseInt(value, 10));
    }
    return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;
};

/**
 * Converts this long bits to a possibly unsafe JavaScript number.
 * @param {boolean} [unsigned=false] Whether unsigned or not
 * @returns {number} Possibly unsafe number
 */
LongBits.prototype.toNumber = function toNumber(unsigned) {
    if (!unsigned && this.hi >>> 31) {
        var lo = ~this.lo + 1 >>> 0,
            hi = ~this.hi     >>> 0;
        if (!lo)
            hi = hi + 1 >>> 0;
        return -(lo + hi * 4294967296);
    }
    return this.lo + this.hi * 4294967296;
};

/**
 * Converts this long bits to a long.
 * @param {boolean} [unsigned=false] Whether unsigned or not
 * @returns {Long} Long
 */
LongBits.prototype.toLong = function toLong(unsigned) {
    return minimal.Long
        ? new minimal.Long(this.lo | 0, this.hi | 0, Boolean(unsigned))
        /* istanbul ignore next */
        : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };
};

var charCodeAt = String.prototype.charCodeAt;

/**
 * Constructs new long bits from the specified 8 characters long hash.
 * @param {string} hash Hash
 * @returns {util.LongBits} Bits
 */
LongBits.fromHash = function fromHash(hash) {
    if (hash === zeroHash)
        return zero;
    return new LongBits(
        ( charCodeAt.call(hash, 0)
        | charCodeAt.call(hash, 1) << 8
        | charCodeAt.call(hash, 2) << 16
        | charCodeAt.call(hash, 3) << 24) >>> 0
    ,
        ( charCodeAt.call(hash, 4)
        | charCodeAt.call(hash, 5) << 8
        | charCodeAt.call(hash, 6) << 16
        | charCodeAt.call(hash, 7) << 24) >>> 0
    );
};

/**
 * Converts this long bits to a 8 characters long hash.
 * @returns {string} Hash
 */
LongBits.prototype.toHash = function toHash() {
    return String.fromCharCode(
        this.lo        & 255,
        this.lo >>> 8  & 255,
        this.lo >>> 16 & 255,
        this.lo >>> 24      ,
        this.hi        & 255,
        this.hi >>> 8  & 255,
        this.hi >>> 16 & 255,
        this.hi >>> 24
    );
};

/**
 * Zig-zag encodes this long bits.
 * @returns {util.LongBits} `this`
 */
LongBits.prototype.zzEncode = function zzEncode() {
    var mask =   this.hi >> 31;
    this.hi  = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;
    this.lo  = ( this.lo << 1                   ^ mask) >>> 0;
    return this;
};

/**
 * Zig-zag decodes this long bits.
 * @returns {util.LongBits} `this`
 */
LongBits.prototype.zzDecode = function zzDecode() {
    var mask = -(this.lo & 1);
    this.lo  = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;
    this.hi  = ( this.hi >>> 1                  ^ mask) >>> 0;
    return this;
};

/**
 * Calculates the length of this longbits when encoded as a varint.
 * @returns {number} Length
 */
LongBits.prototype.length = function length() {
    var part0 =  this.lo,
        part1 = (this.lo >>> 28 | this.hi << 4) >>> 0,
        part2 =  this.hi >>> 24;
    return part2 === 0
         ? part1 === 0
           ? part0 < 16384
             ? part0 < 128 ? 1 : 2
             : part0 < 2097152 ? 3 : 4
           : part1 < 16384
             ? part1 < 128 ? 5 : 6
             : part1 < 2097152 ? 7 : 8
         : part2 < 128 ? 9 : 10;
};

var minimal = createCommonjsModule(function (module, exports) {
var util = exports;

// used to return a Promise where callback is omitted
util.asPromise = aspromise;

// converts to / from base64 encoded strings
util.base64 = base64_1;

// base class of rpc.Service
util.EventEmitter = eventemitter;

// float handling accross browsers
util.float = float_1;

// requires modules optionally and hides the call from bundlers
util.inquire = inquire_1;

// converts to / from utf8 encoded strings
util.utf8 = utf8_1;

// provides a node-like buffer pool in the browser
util.pool = pool_1;

// utility to work with the low and high bits of a 64 bit value
util.LongBits = longbits;

/**
 * Whether running within node or not.
 * @memberof util
 * @type {boolean}
 */
util.isNode = Boolean(typeof commonjsGlobal !== "undefined"
                   && commonjsGlobal
                   && commonjsGlobal.process
                   && commonjsGlobal.process.versions
                   && commonjsGlobal.process.versions.node);

/**
 * Global object reference.
 * @memberof util
 * @type {Object}
 */
util.global = util.isNode && commonjsGlobal
           || typeof window !== "undefined" && window
           || typeof self   !== "undefined" && self
           || commonjsGlobal; // eslint-disable-line no-invalid-this

/**
 * An immuable empty array.
 * @memberof util
 * @type {Array.<*>}
 * @const
 */
util.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes

/**
 * An immutable empty object.
 * @type {Object}
 * @const
 */
util.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes

/**
 * Tests if the specified value is an integer.
 * @function
 * @param {*} value Value to test
 * @returns {boolean} `true` if the value is an integer
 */
util.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) {
    return typeof value === "number" && isFinite(value) && Math.floor(value) === value;
};

/**
 * Tests if the specified value is a string.
 * @param {*} value Value to test
 * @returns {boolean} `true` if the value is a string
 */
util.isString = function isString(value) {
    return typeof value === "string" || value instanceof String;
};

/**
 * Tests if the specified value is a non-null object.
 * @param {*} value Value to test
 * @returns {boolean} `true` if the value is a non-null object
 */
util.isObject = function isObject(value) {
    return value && typeof value === "object";
};

/**
 * Checks if a property on a message is considered to be present.
 * This is an alias of {@link util.isSet}.
 * @function
 * @param {Object} obj Plain object or message instance
 * @param {string} prop Property name
 * @returns {boolean} `true` if considered to be present, otherwise `false`
 */
util.isset =

/**
 * Checks if a property on a message is considered to be present.
 * @param {Object} obj Plain object or message instance
 * @param {string} prop Property name
 * @returns {boolean} `true` if considered to be present, otherwise `false`
 */
util.isSet = function isSet(obj, prop) {
    var value = obj[prop];
    if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins
        return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;
    return false;
};

/**
 * Any compatible Buffer instance.
 * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings.
 * @interface Buffer
 * @extends Uint8Array
 */

/**
 * Node's Buffer class if available.
 * @type {Constructor<Buffer>}
 */
util.Buffer = (function() {
    try {
        var Buffer = util.inquire("buffer").Buffer;
        // refuse to use non-node buffers if not explicitly assigned (perf reasons):
        return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null;
    } catch (e) {
        /* istanbul ignore next */
        return null;
    }
})();

// Internal alias of or polyfull for Buffer.from.
util._Buffer_from = null;

// Internal alias of or polyfill for Buffer.allocUnsafe.
util._Buffer_allocUnsafe = null;

/**
 * Creates a new buffer of whatever type supported by the environment.
 * @param {number|number[]} [sizeOrArray=0] Buffer size or number array
 * @returns {Uint8Array|Buffer} Buffer
 */
util.newBuffer = function newBuffer(sizeOrArray) {
    /* istanbul ignore next */
    return typeof sizeOrArray === "number"
        ? util.Buffer
            ? util._Buffer_allocUnsafe(sizeOrArray)
            : new util.Array(sizeOrArray)
        : util.Buffer
            ? util._Buffer_from(sizeOrArray)
            : typeof Uint8Array === "undefined"
                ? sizeOrArray
                : new Uint8Array(sizeOrArray);
};

/**
 * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`.
 * @type {Constructor<Uint8Array>}
 */
util.Array = typeof Uint8Array !== "undefined" ? Uint8Array /* istanbul ignore next */ : Array;

/**
 * Any compatible Long instance.
 * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.
 * @interface Long
 * @property {number} low Low bits
 * @property {number} high High bits
 * @property {boolean} unsigned Whether unsigned or not
 */

/**
 * Long.js's Long class if available.
 * @type {Constructor<Long>}
 */
util.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long
         || /* istanbul ignore next */ util.global.Long
         || util.inquire("long");

/**
 * Regular expression used to verify 2 bit (`bool`) map keys.
 * @type {RegExp}
 * @const
 */
util.key2Re = /^true|false|0|1$/;

/**
 * Regular expression used to verify 32 bit (`int32` etc.) map keys.
 * @type {RegExp}
 * @const
 */
util.key32Re = /^-?(?:0|[1-9][0-9]*)$/;

/**
 * Regular expression used to verify 64 bit (`int64` etc.) map keys.
 * @type {RegExp}
 * @const
 */
util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;

/**
 * Converts a number or long to an 8 characters long hash string.
 * @param {Long|number} value Value to convert
 * @returns {string} Hash
 */
util.longToHash = function longToHash(value) {
    return value
        ? util.LongBits.from(value).toHash()
        : util.LongBits.zeroHash;
};

/**
 * Converts an 8 characters long hash string to a long or number.
 * @param {string} hash Hash
 * @param {boolean} [unsigned=false] Whether unsigned or not
 * @returns {Long|number} Original value
 */
util.longFromHash = function longFromHash(hash, unsigned) {
    var bits = util.LongBits.fromHash(hash);
    if (util.Long)
        return util.Long.fromBits(bits.lo, bits.hi, unsigned);
    return bits.toNumber(Boolean(unsigned));
};

/**
 * Merges the properties of the source object into the destination object.
 * @memberof util
 * @param {Object.<string,*>} dst Destination object
 * @param {Object.<string,*>} src Source object
 * @param {boolean} [ifNotSet=false] Merges only if the key is not already set
 * @returns {Object.<string,*>} Destination object
 */
function merge(dst, src, ifNotSet) { // used by converters
    for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)
        if (dst[keys[i]] === undefined || !ifNotSet)
            dst[keys[i]] = src[keys[i]];
    return dst;
}

util.merge = merge;

/**
 * Converts the first character of a string to lower case.
 * @param {string} str String to convert
 * @returns {string} Converted string
 */
util.lcFirst = function lcFirst(str) {
    return str.charAt(0).toLowerCase() + str.substring(1);
};

/**
 * Creates a custom error constructor.
 * @memberof util
 * @param {string} name Error name
 * @returns {Constructor<Error>} Custom error constructor
 */
function newError(name) {

    function CustomError(message, properties) {

        if (!(this instanceof CustomError))
            return new CustomError(message, properties);

        // Error.call(this, message);
        // ^ just returns a new error instance because the ctor can be called as a function

        Object.defineProperty(this, "message", { get: function() { return message; } });

        /* istanbul ignore next */
        if (Error.captureStackTrace) // node
            Error.captureStackTrace(this, CustomError);
        else
            Object.defineProperty(this, "stack", { value: new Error().stack || "" });

        if (properties)
            merge(this, properties);
    }

    (CustomError.prototype = Object.create(Error.prototype)).constructor = CustomError;

    Object.defineProperty(CustomError.prototype, "name", { get: function() { return name; } });

    CustomError.prototype.toString = function toString() {
        return this.name + ": " + this.message;
    };

    return CustomError;
}

util.newError = newError;

/**
 * Constructs a new protocol error.
 * @classdesc Error subclass indicating a protocol specifc error.
 * @memberof util
 * @extends Error
 * @template T extends Message<T>
 * @constructor
 * @param {string} message Error message
 * @param {Object.<string,*>} [properties] Additional properties
 * @example
 * try {
 *     MyMessage.decode(someBuffer); // throws if required fields are missing
 * } catch (e) {
 *     if (e instanceof ProtocolError && e.instance)
 *         console.log("decoded so far: " + JSON.stringify(e.instance));
 * }
 */
util.ProtocolError = newError("ProtocolError");

/**
 * So far decoded message instance.
 * @name util.ProtocolError#instance
 * @type {Message<T>}
 */

/**
 * A OneOf getter as returned by {@link util.oneOfGetter}.
 * @typedef OneOfGetter
 * @type {function}
 * @returns {string|undefined} Set field name, if any
 */

/**
 * Builds a getter for a oneof's present field name.
 * @param {string[]} fieldNames Field names
 * @returns {OneOfGetter} Unbound getter
 */
util.oneOfGetter = function getOneOf(fieldNames) {
    var fieldMap = {};
    for (var i = 0; i < fieldNames.length; ++i)
        fieldMap[fieldNames[i]] = 1;

    /**
     * @returns {string|undefined} Set field name, if any
     * @this Object
     * @ignore
     */
    return function() { // eslint-disable-line consistent-return
        for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i)
            if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null)
                return keys[i];
    };
};

/**
 * A OneOf setter as returned by {@link util.oneOfSetter}.
 * @typedef OneOfSetter
 * @type {function}
 * @param {string|undefined} value Field name
 * @returns {undefined}
 */

/**
 * Builds a setter for a oneof's present field name.
 * @param {string[]} fieldNames Field names
 * @returns {OneOfSetter} Unbound setter
 */
util.oneOfSetter = function setOneOf(fieldNames) {

    /**
     * @param {string} name Field name
     * @returns {undefined}
     * @this Object
     * @ignore
     */
    return function(name) {
        for (var i = 0; i < fieldNames.length; ++i)
            if (fieldNames[i] !== name)
                delete this[fieldNames[i]];
    };
};

/**
 * Default conversion options used for {@link Message#toJSON} implementations.
 *
 * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely:
 *
 * - Longs become strings
 * - Enums become string keys
 * - Bytes become base64 encoded strings
 * - (Sub-)Messages become plain objects
 * - Maps become plain objects with all string keys
 * - Repeated fields become arrays
 * - NaN and Infinity for float and double fields become strings
 *
 * @type {IConversionOptions}
 * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json
 */
util.toJSONOptions = {
    longs: String,
    enums: String,
    bytes: String,
    json: true
};

// Sets up buffer utility according to the environment (called in index-minimal)
util._configure = function() {
    var Buffer = util.Buffer;
    /* istanbul ignore if */
    if (!Buffer) {
        util._Buffer_from = util._Buffer_allocUnsafe = null;
        return;
    }
    // because node 4.x buffers are incompatible & immutable
    // see: https://github.com/dcodeIO/protobuf.js/pull/665
    util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from ||
        /* istanbul ignore next */
        function Buffer_from(value, encoding) {
            return new Buffer(value, encoding);
        };
    util._Buffer_allocUnsafe = Buffer.allocUnsafe ||
        /* istanbul ignore next */
        function Buffer_allocUnsafe(size) {
            return new Buffer(size);
        };
};
});

var writer = Writer;



var BufferWriter; // cyclic

var LongBits$1  = minimal.LongBits,
    base64    = minimal.base64,
    utf8      = minimal.utf8;

/**
 * Constructs a new writer operation instance.
 * @classdesc Scheduled writer operation.
 * @constructor
 * @param {function(*, Uint8Array, number)} fn Function to call
 * @param {number} len Value byte length
 * @param {*} val Value to write
 * @ignore
 */
function Op(fn, len, val) {

    /**
     * Function to call.
     * @type {function(Uint8Array, number, *)}
     */
    this.fn = fn;

    /**
     * Value byte length.
     * @type {number}
     */
    this.len = len;

    /**
     * Next operation.
     * @type {Writer.Op|undefined}
     */
    this.next = undefined;

    /**
     * Value to write.
     * @type {*}
     */
    this.val = val; // type varies
}

/* istanbul ignore next */
function noop() {} // eslint-disable-line no-empty-function

/**
 * Constructs a new writer state instance.
 * @classdesc Copied writer state.
 * @memberof Writer
 * @constructor
 * @param {Writer} writer Writer to copy state from
 * @ignore
 */
function State(writer) {

    /**
     * Current head.
     * @type {Writer.Op}
     */
    this.head = writer.head;

    /**
     * Current tail.
     * @type {Writer.Op}
     */
    this.tail = writer.tail;

    /**
     * Current buffer length.
     * @type {number}
     */
    this.len = writer.len;

    /**
     * Next state.
     * @type {State|null}
     */
    this.next = writer.states;
}

/**
 * Constructs a new writer instance.
 * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`.
 * @constructor
 */
function Writer() {

    /**
     * Current length.
     * @type {number}
     */
    this.len = 0;

    /**
     * Operations head.
     * @type {Object}
     */
    this.head = new Op(noop, 0, 0);

    /**
     * Operations tail
     * @type {Object}
     */
    this.tail = this.head;

    /**
     * Linked forked states.
     * @type {Object|null}
     */
    this.states = null;

    // When a value is written, the writer calculates its byte length and puts it into a linked
    // list of operations to perform when finish() is called. This both allows us to allocate
    // buffers of the exact required size and reduces the amount of work we have to do compared
    // to first calculating over objects and then encoding over objects. In our case, the encoding
    // part is just a linked list walk calling operations with already prepared values.
}

var create = function create() {
    return minimal.Buffer
        ? function create_buffer_setup() {
            return (Writer.create = function create_buffer() {
                return new BufferWriter();
            })();
        }
        /* istanbul ignore next */
        : function create_array() {
            return new Writer();
        };
};

/**
 * Creates a new writer.
 * @function
 * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer}
 */
Writer.create = create();

/**
 * Allocates a buffer of the specified size.
 * @param {number} size Buffer size
 * @returns {Uint8Array} Buffer
 */
Writer.alloc = function alloc(size) {
    return new minimal.Array(size);
};

// Use Uint8Array buffer pool in the browser, just like node does with buffers
/* istanbul ignore else */
if (minimal.Array !== Array)
    Writer.alloc = minimal.pool(Writer.alloc, minimal.Array.prototype.subarray);

/**
 * Pushes a new operation to the queue.
 * @param {function(Uint8Array, number, *)} fn Function to call
 * @param {number} len Value byte length
 * @param {number} val Value to write
 * @returns {Writer} `this`
 * @private
 */
Writer.prototype._push = function push(fn, len, val) {
    this.tail = this.tail.next = new Op(fn, len, val);
    this.len += len;
    return this;
};

function writeByte(val, buf, pos) {
    buf[pos] = val & 255;
}

function writeVarint32(val, buf, pos) {
    while (val > 127) {
        buf[pos++] = val & 127 | 128;
        val >>>= 7;
    }
    buf[pos] = val;
}

/**
 * Constructs a new varint writer operation instance.
 * @classdesc Scheduled varint writer operation.
 * @extends Op
 * @constructor
 * @param {number} len Value byte length
 * @param {number} val Value to write
 * @ignore
 */
function VarintOp(len, val) {
    this.len = len;
    this.next = undefined;
    this.val = val;
}

VarintOp.prototype = Object.create(Op.prototype);
VarintOp.prototype.fn = writeVarint32;

/**
 * Writes an unsigned 32 bit value as a varint.
 * @param {number} value Value to write
 * @returns {Writer} `this`
 */
Writer.prototype.uint32 = function write_uint32(value) {
    // here, the call to this.push has been inlined and a varint specific Op subclass is used.
    // uint32 is by far the most frequently used operation and benefits significantly from this.
    this.len += (this.tail = this.tail.next = new VarintOp(
        (value = value >>> 0)
                < 128       ? 1
        : value < 16384     ? 2
        : value < 2097152   ? 3
        : value < 268435456 ? 4
        :                     5,
    value)).len;
    return this;
};

/**
 * Writes a signed 32 bit value as a varint.
 * @function
 * @param {number} value Value to write
 * @returns {Writer} `this`
 */
Writer.prototype.int32 = function write_int32(value) {
    return value < 0
        ? this._push(writeVarint64, 10, LongBits$1.fromNumber(value)) // 10 bytes per spec
        : this.uint32(value);
};

/**
 * Writes a 32 bit value as a varint, zig-zag encoded.
 * @param {number} value Value to write
 * @returns {Writer} `this`
 */
Writer.prototype.sint32 = function write_sint32(value) {
    return this.uint32((value << 1 ^ value >> 31) >>> 0);
};

function writeVarint64(val, buf, pos) {
    while (val.hi) {
        buf[pos++] = val.lo & 127 | 128;
        val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;
        val.hi >>>= 7;
    }
    while (val.lo > 127) {
        buf[pos++] = val.lo & 127 | 128;
        val.lo = val.lo >>> 7;
    }
    buf[pos++] = val.lo;
}

/**
 * Writes an unsigned 64 bit value as a varint.
 * @param {Long|number|string} value Value to write
 * @returns {Writer} `this`
 * @throws {TypeError} If `value` is a string and no long library is present.
 */
Writer.prototype.uint64 = function write_uint64(value) {
    var bits = LongBits$1.from(value);
    return this._push(writeVarint64, bits.length(), bits);
};

/**
 * Writes a signed 64 bit value as a varint.
 * @function
 * @param {Long|number|string} value Value to write
 * @returns {Writer} `this`
 * @throws {TypeError} If `value` is a string and no long library is present.
 */
Writer.prototype.int64 = Writer.prototype.uint64;

/**
 * Writes a signed 64 bit value as a varint, zig-zag encoded.
 * @param {Long|number|string} value Value to write
 * @returns {Writer} `this`
 * @throws {TypeError} If `value` is a string and no long library is present.
 */
Writer.prototype.sint64 = function write_sint64(value) {
    var bits = LongBits$1.from(value).zzEncode();
    return this._push(writeVarint64, bits.length(), bits);
};

/**
 * Writes a boolish value as a varint.
 * @param {boolean} value Value to write
 * @returns {Writer} `this`
 */
Writer.prototype.bool = function write_bool(value) {
    return this._push(writeByte, 1, value ? 1 : 0);
};

function writeFixed32(val, buf, pos) {
    buf[pos    ] =  val         & 255;
    buf[pos + 1] =  val >>> 8   & 255;
    buf[pos + 2] =  val >>> 16  & 255;
    buf[pos + 3] =  val >>> 24;
}

/**
 * Writes an unsigned 32 bit value as fixed 32 bits.
 * @param {number} value Value to write
 * @returns {Writer} `this`
 */
Writer.prototype.fixed32 = function write_fixed32(value) {
    return this._push(writeFixed32, 4, value >>> 0);
};

/**
 * Writes a signed 32 bit value as fixed 32 bits.
 * @function
 * @param {number} value Value to write
 * @returns {Writer} `this`
 */
Writer.prototype.sfixed32 = Writer.prototype.fixed32;

/**
 * Writes an unsigned 64 bit value as fixed 64 bits.
 * @param {Long|number|string} value Value to write
 * @returns {Writer} `this`
 * @throws {TypeError} If `value` is a string and no long library is present.
 */
Writer.prototype.fixed64 = function write_fixed64(value) {
    var bits = LongBits$1.from(value);
    return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);
};

/**
 * Writes a signed 64 bit value as fixed 64 bits.
 * @function
 * @param {Long|number|string} value Value to write
 * @returns {Writer} `this`
 * @throws {TypeError} If `value` is a string and no long library is present.
 */
Writer.prototype.sfixed64 = Writer.prototype.fixed64;

/**
 * Writes a float (32 bit).
 * @function
 * @param {number} value Value to write
 * @returns {Writer} `this`
 */
Writer.prototype.float = function write_float(value) {
    return this._push(minimal.float.writeFloatLE, 4, value);
};

/**
 * Writes a double (64 bit float).
 * @function
 * @param {number} value Value to write
 * @returns {Writer} `this`
 */
Writer.prototype.double = function write_double(value) {
    return this._push(minimal.float.writeDoubleLE, 8, value);
};

var writeBytes = minimal.Array.prototype.set
    ? function writeBytes_set(val, buf, pos) {
        buf.set(val, pos); // also works for plain array values
    }
    /* istanbul ignore next */
    : function writeBytes_for(val, buf, pos) {
        for (var i = 0; i < val.length; ++i)
            buf[pos + i] = val[i];
    };

/**
 * Writes a sequence of bytes.
 * @param {Uint8Array|string} value Buffer or base64 encoded string to write
 * @returns {Writer} `this`
 */
Writer.prototype.bytes = function write_bytes(value) {
    var len = value.length >>> 0;
    if (!len)
        return this._push(writeByte, 1, 0);
    if (minimal.isString(value)) {
        var buf = Writer.alloc(len = base64.length(value));
        base64.decode(value, buf, 0);
        value = buf;
    }
    return this.uint32(len)._push(writeBytes, len, value);
};

/**
 * Writes a string.
 * @param {string} value Value to write
 * @returns {Writer} `this`
 */
Writer.prototype.string = function write_string(value) {
    var len = utf8.length(value);
    return len
        ? this.uint32(len)._push(utf8.write, len, value)
        : this._push(writeByte, 1, 0);
};

/**
 * Forks this writer's state by pushing it to a stack.
 * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state.
 * @returns {Writer} `this`
 */
Writer.prototype.fork = function fork() {
    this.states = new State(this);
    this.head = this.tail = new Op(noop, 0, 0);
    this.len = 0;
    return this;
};

/**
 * Resets this instance to the last state.
 * @returns {Writer} `this`
 */
Writer.prototype.reset = function reset() {
    if (this.states) {
        this.head   = this.states.head;
        this.tail   = this.states.tail;
        this.len    = this.states.len;
        this.states = this.states.next;
    } else {
        this.head = this.tail = new Op(noop, 0, 0);
        this.len  = 0;
    }
    return this;
};

/**
 * Resets to the last state and appends the fork state's current write length as a varint followed by its operations.
 * @returns {Writer} `this`
 */
Writer.prototype.ldelim = function ldelim() {
    var head = this.head,
        tail = this.tail,
        len  = this.len;
    this.reset().uint32(len);
    if (len) {
        this.tail.next = head.next; // skip noop
        this.tail = tail;
        this.len += len;
    }
    return this;
};

/**
 * Finishes the write operation.
 * @returns {Uint8Array} Finished buffer
 */
Writer.prototype.finish = function finish() {
    var head = this.head.next, // skip noop
        buf  = this.constructor.alloc(this.len),
        pos  = 0;
    while (head) {
        head.fn(head.val, buf, pos);
        pos += head.len;
        head = head.next;
    }
    // this.head = this.tail = null;
    return buf;
};

Writer._configure = function(BufferWriter_) {
    BufferWriter = BufferWriter_;
    Writer.create = create();
    BufferWriter._configure();
};

var writer_buffer = BufferWriter$1;

// extends Writer

(BufferWriter$1.prototype = Object.create(writer.prototype)).constructor = BufferWriter$1;



/**
 * Constructs a new buffer writer instance.
 * @classdesc Wire format writer using node buffers.
 * @extends Writer
 * @constructor
 */
function BufferWriter$1() {
    writer.call(this);
}

BufferWriter$1._configure = function () {
    /**
     * Allocates a buffer of the specified size.
     * @function
     * @param {number} size Buffer size
     * @returns {Buffer} Buffer
     */
    BufferWriter$1.alloc = minimal._Buffer_allocUnsafe;

    BufferWriter$1.writeBytesBuffer = minimal.Buffer && minimal.Buffer.prototype instanceof Uint8Array && minimal.Buffer.prototype.set.name === "set"
        ? function writeBytesBuffer_set(val, buf, pos) {
          buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)
          // also works for plain array values
        }
        /* istanbul ignore next */
        : function writeBytesBuffer_copy(val, buf, pos) {
          if (val.copy) // Buffer values
            val.copy(buf, pos, 0, val.length);
          else for (var i = 0; i < val.length;) // plain array values
            buf[pos++] = val[i++];
        };
};


/**
 * @override
 */
BufferWriter$1.prototype.bytes = function write_bytes_buffer(value) {
    if (minimal.isString(value))
        value = minimal._Buffer_from(value, "base64");
    var len = value.length >>> 0;
    this.uint32(len);
    if (len)
        this._push(BufferWriter$1.writeBytesBuffer, len, value);
    return this;
};

function writeStringBuffer(val, buf, pos) {
    if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions)
        minimal.utf8.write(val, buf, pos);
    else if (buf.utf8Write)
        buf.utf8Write(val, pos);
    else
        buf.write(val, pos);
}

/**
 * @override
 */
BufferWriter$1.prototype.string = function write_string_buffer(value) {
    var len = minimal.Buffer.byteLength(value);
    this.uint32(len);
    if (len)
        this._push(writeStringBuffer, len, value);
    return this;
};


/**
 * Finishes the write operation.
 * @name BufferWriter#finish
 * @function
 * @returns {Buffer} Finished buffer
 */

BufferWriter$1._configure();

var reader = Reader;



var BufferReader; // cyclic

var LongBits$2  = minimal.LongBits,
    utf8$1      = minimal.utf8;

/* istanbul ignore next */
function indexOutOfRange(reader, writeLength) {
    return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len);
}

/**
 * Constructs a new reader instance using the specified buffer.
 * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`.
 * @constructor
 * @param {Uint8Array} buffer Buffer to read from
 */
function Reader(buffer) {

    /**
     * Read buffer.
     * @type {Uint8Array}
     */
    this.buf = buffer;

    /**
     * Read buffer position.
     * @type {number}
     */
    this.pos = 0;

    /**
     * Read buffer length.
     * @type {number}
     */
    this.len = buffer.length;
}

var create_array = typeof Uint8Array !== "undefined"
    ? function create_typed_array(buffer) {
        if (buffer instanceof Uint8Array || Array.isArray(buffer))
            return new Reader(buffer);
        throw Error("illegal buffer");
    }
    /* istanbul ignore next */
    : function create_array(buffer) {
        if (Array.isArray(buffer))
            return new Reader(buffer);
        throw Error("illegal buffer");
    };

var create$1 = function create() {
    return minimal.Buffer
        ? function create_buffer_setup(buffer) {
            return (Reader.create = function create_buffer(buffer) {
                return minimal.Buffer.isBuffer(buffer)
                    ? new BufferReader(buffer)
                    /* istanbul ignore next */
                    : create_array(buffer);
            })(buffer);
        }
        /* istanbul ignore next */
        : create_array;
};

/**
 * Creates a new reader using the specified buffer.
 * @function
 * @param {Uint8Array|Buffer} buffer Buffer to read from
 * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader}
 * @throws {Error} If `buffer` is not a valid buffer
 */
Reader.create = create$1();

Reader.prototype._slice = minimal.Array.prototype.subarray || /* istanbul ignore next */ minimal.Array.prototype.slice;

/**
 * Reads a varint as an unsigned 32 bit value.
 * @function
 * @returns {number} Value read
 */
Reader.prototype.uint32 = (function read_uint32_setup() {
    var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!)
    return function read_uint32() {
        value = (         this.buf[this.pos] & 127       ) >>> 0; if (this.buf[this.pos++] < 128) return value;
        value = (value | (this.buf[this.pos] & 127) <<  7) >>> 0; if (this.buf[this.pos++] < 128) return value;
        value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value;
        value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value;
        value = (value | (this.buf[this.pos] &  15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value;

        /* istanbul ignore if */
        if ((this.pos += 5) > this.len) {
            this.pos = this.len;
            throw indexOutOfRange(this, 10);
        }
        return value;
    };
})();

/**
 * Reads a varint as a signed 32 bit value.
 * @returns {number} Value read
 */
Reader.prototype.int32 = function read_int32() {
    return this.uint32() | 0;
};

/**
 * Reads a zig-zag encoded varint as a signed 32 bit value.
 * @returns {number} Value read
 */
Reader.prototype.sint32 = function read_sint32() {
    var value = this.uint32();
    return value >>> 1 ^ -(value & 1) | 0;
};

/* eslint-disable no-invalid-this */

function readLongVarint() {
    // tends to deopt with local vars for octet etc.
    var bits = new LongBits$2(0, 0);
    var i = 0;
    if (this.len - this.pos > 4) { // fast route (lo)
        for (; i < 4; ++i) {
            // 1st..4th
            bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;
            if (this.buf[this.pos++] < 128)
                return bits;
        }
        // 5th
        bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;
        bits.hi = (bits.hi | (this.buf[this.pos] & 127) >>  4) >>> 0;
        if (this.buf[this.pos++] < 128)
            return bits;
        i = 0;
    } else {
        for (; i < 3; ++i) {
            /* istanbul ignore if */
            if (this.pos >= this.len)
                throw indexOutOfRange(this);
            // 1st..3th
            bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;
            if (this.buf[this.pos++] < 128)
                return bits;
        }
        // 4th
        bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;
        return bits;
    }
    if (this.len - this.pos > 4) { // fast route (hi)
        for (; i < 5; ++i) {
            // 6th..10th
            bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;
            if (this.buf[this.pos++] < 128)
                return bits;
        }
    } else {
        for (; i < 5; ++i) {
            /* istanbul ignore if */
            if (this.pos >= this.len)
                throw indexOutOfRange(this);
            // 6th..10th
            bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;
            if (this.buf[this.pos++] < 128)
                return bits;
        }
    }
    /* istanbul ignore next */
    throw Error("invalid varint encoding");
}

/* eslint-enable no-invalid-this */

/**
 * Reads a varint as a signed 64 bit value.
 * @name Reader#int64
 * @function
 * @returns {Long} Value read
 */

/**
 * Reads a varint as an unsigned 64 bit value.
 * @name Reader#uint64
 * @function
 * @returns {Long} Value read
 */

/**
 * Reads a zig-zag encoded varint as a signed 64 bit value.
 * @name Reader#sint64
 * @function
 * @returns {Long} Value read
 */

/**
 * Reads a varint as a boolean.
 * @returns {boolean} Value read
 */
Reader.prototype.bool = function read_bool() {
    return this.uint32() !== 0;
};

function readFixed32_end(buf, end) { // note that this uses `end`, not `pos`
    return (buf[end - 4]
          | buf[end - 3] << 8
          | buf[end - 2] << 16
          | buf[end - 1] << 24) >>> 0;
}

/**
 * Reads fixed 32 bits as an unsigned 32 bit integer.
 * @returns {number} Value read
 */
Reader.prototype.fixed32 = function read_fixed32() {

    /* istanbul ignore if */
    if (this.pos + 4 > this.len)
        throw indexOutOfRange(this, 4);

    return readFixed32_end(this.buf, this.pos += 4);
};

/**
 * Reads fixed 32 bits as a signed 32 bit integer.
 * @returns {number} Value read
 */
Reader.prototype.sfixed32 = function read_sfixed32() {

    /* istanbul ignore if */
    if (this.pos + 4 > this.len)
        throw indexOutOfRange(this, 4);

    return readFixed32_end(this.buf, this.pos += 4) | 0;
};

/* eslint-disable no-invalid-this */

function readFixed64(/* this: Reader */) {

    /* istanbul ignore if */
    if (this.pos + 8 > this.len)
        throw indexOutOfRange(this, 8);

    return new LongBits$2(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));
}

/* eslint-enable no-invalid-this */

/**
 * Reads fixed 64 bits.
 * @name Reader#fixed64
 * @function
 * @returns {Long} Value read
 */

/**
 * Reads zig-zag encoded fixed 64 bits.
 * @name Reader#sfixed64
 * @function
 * @returns {Long} Value read
 */

/**
 * Reads a float (32 bit) as a number.
 * @function
 * @returns {number} Value read
 */
Reader.prototype.float = function read_float() {

    /* istanbul ignore if */
    if (this.pos + 4 > this.len)
        throw indexOutOfRange(this, 4);

    var value = minimal.float.readFloatLE(this.buf, this.pos);
    this.pos += 4;
    return value;
};

/**
 * Reads a double (64 bit float) as a number.
 * @function
 * @returns {number} Value read
 */
Reader.prototype.double = function read_double() {

    /* istanbul ignore if */
    if (this.pos + 8 > this.len)
        throw indexOutOfRange(this, 4);

    var value = minimal.float.readDoubleLE(this.buf, this.pos);
    this.pos += 8;
    return value;
};

/**
 * Reads a sequence of bytes preceeded by its length as a varint.
 * @returns {Uint8Array} Value read
 */
Reader.prototype.bytes = function read_bytes() {
    var length = this.uint32(),
        start  = this.pos,
        end    = this.pos + length;

    /* istanbul ignore if */
    if (end > this.len)
        throw indexOutOfRange(this, length);

    this.pos += length;
    if (Array.isArray(this.buf)) // plain array
        return this.buf.slice(start, end);
    return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1
        ? new this.buf.constructor(0)
        : this._slice.call(this.buf, start, end);
};

/**
 * Reads a string preceeded by its byte length as a varint.
 * @returns {string} Value read
 */
Reader.prototype.string = function read_string() {
    var bytes = this.bytes();
    return utf8$1.read(bytes, 0, bytes.length);
};

/**
 * Skips the specified number of bytes if specified, otherwise skips a varint.
 * @param {number} [length] Length if known, otherwise a varint is assumed
 * @returns {Reader} `this`
 */
Reader.prototype.skip = function skip(length) {
    if (typeof length === "number") {
        /* istanbul ignore if */
        if (this.pos + length > this.len)
            throw indexOutOfRange(this, length);
        this.pos += length;
    } else {
        do {
            /* istanbul ignore if */
            if (this.pos >= this.len)
                throw indexOutOfRange(this);
        } while (this.buf[this.pos++] & 128);
    }
    return this;
};

/**
 * Skips the next element of the specified wire type.
 * @param {number} wireType Wire type received
 * @returns {Reader} `this`
 */
Reader.prototype.skipType = function(wireType) {
    switch (wireType) {
        case 0:
            this.skip();
            break;
        case 1:
            this.skip(8);
            break;
        case 2:
            this.skip(this.uint32());
            break;
        case 3:
            while ((wireType = this.uint32() & 7) !== 4) {
                this.skipType(wireType);
            }
            break;
        case 5:
            this.skip(4);
            break;

        /* istanbul ignore next */
        default:
            throw Error("invalid wire type " + wireType + " at offset " + this.pos);
    }
    return this;
};

Reader._configure = function(BufferReader_) {
    BufferReader = BufferReader_;
    Reader.create = create$1();
    BufferReader._configure();

    var fn = minimal.Long ? "toLong" : /* istanbul ignore next */ "toNumber";
    minimal.merge(Reader.prototype, {

        int64: function read_int64() {
            return readLongVarint.call(this)[fn](false);
        },

        uint64: function read_uint64() {
            return readLongVarint.call(this)[fn](true);
        },

        sint64: function read_sint64() {
            return readLongVarint.call(this).zzDecode()[fn](false);
        },

        fixed64: function read_fixed64() {
            return readFixed64.call(this)[fn](true);
        },

        sfixed64: function read_sfixed64() {
            return readFixed64.call(this)[fn](false);
        }

    });
};

var reader_buffer = BufferReader$1;

// extends Reader

(BufferReader$1.prototype = Object.create(reader.prototype)).constructor = BufferReader$1;



/**
 * Constructs a new buffer reader instance.
 * @classdesc Wire format reader using node buffers.
 * @extends Reader
 * @constructor
 * @param {Buffer} buffer Buffer to read from
 */
function BufferReader$1(buffer) {
    reader.call(this, buffer);

    /**
     * Read buffer.
     * @name BufferReader#buf
     * @type {Buffer}
     */
}

BufferReader$1._configure = function () {
    /* istanbul ignore else */
    if (minimal.Buffer)
        BufferReader$1.prototype._slice = minimal.Buffer.prototype.slice;
};


/**
 * @override
 */
BufferReader$1.prototype.string = function read_string_buffer() {
    var len = this.uint32(); // modifies pos
    return this.buf.utf8Slice
        ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len))
        : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + len, this.len));
};

/**
 * Reads a sequence of bytes preceeded by its length as a varint.
 * @name BufferReader#bytes
 * @function
 * @returns {Buffer} Value read
 */

BufferReader$1._configure();

var service = Service;



// Extends EventEmitter
(Service.prototype = Object.create(minimal.EventEmitter.prototype)).constructor = Service;

/**
 * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}.
 *
 * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`.
 * @typedef rpc.ServiceMethodCallback
 * @template TRes extends Message<TRes>
 * @type {function}
 * @param {Error|null} error Error, if any
 * @param {TRes} [response] Response message
 * @returns {undefined}
 */

/**
 * A service method part of a {@link rpc.Service} as created by {@link Service.create}.
 * @typedef rpc.ServiceMethod
 * @template TReq extends Message<TReq>
 * @template TRes extends Message<TRes>
 * @type {function}
 * @param {TReq|Properties<TReq>} request Request message or plain object
 * @param {rpc.ServiceMethodCallback<TRes>} [callback] Node-style callback called with the error, if any, and the response message
 * @returns {Promise<Message<TRes>>} Promise if `callback` has been omitted, otherwise `undefined`
 */

/**
 * Constructs a new RPC service instance.
 * @classdesc An RPC service as returned by {@link Service#create}.
 * @exports rpc.Service
 * @extends util.EventEmitter
 * @constructor
 * @param {RPCImpl} rpcImpl RPC implementation
 * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
 * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
 */
function Service(rpcImpl, requestDelimited, responseDelimited) {

    if (typeof rpcImpl !== "function")
        throw TypeError("rpcImpl must be a function");

    minimal.EventEmitter.call(this);

    /**
     * RPC implementation. Becomes `null` once the service is ended.
     * @type {RPCImpl|null}
     */
    this.rpcImpl = rpcImpl;

    /**
     * Whether requests are length-delimited.
     * @type {boolean}
     */
    this.requestDelimited = Boolean(requestDelimited);

    /**
     * Whether responses are length-delimited.
     * @type {boolean}
     */
    this.responseDelimited = Boolean(responseDelimited);
}

/**
 * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}.
 * @param {Method|rpc.ServiceMethod<TReq,TRes>} method Reflected or static method
 * @param {Constructor<TReq>} requestCtor Request constructor
 * @param {Constructor<TRes>} responseCtor Response constructor
 * @param {TReq|Properties<TReq>} request Request message or plain object
 * @param {rpc.ServiceMethodCallback<TRes>} callback Service callback
 * @returns {undefined}
 * @template TReq extends Message<TReq>
 * @template TRes extends Message<TRes>
 */
Service.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {

    if (!request)
        throw TypeError("request must be specified");

    var self = this;
    if (!callback)
        return minimal.asPromise(rpcCall, self, method, requestCtor, responseCtor, request);

    if (!self.rpcImpl) {
        setTimeout(function() { callback(Error("already ended")); }, 0);
        return undefined;
    }

    try {
        return self.rpcImpl(
            method,
            requestCtor[self.requestDelimited ? "encodeDelimited" : "encode"](request).finish(),
            function rpcCallback(err, response) {

                if (err) {
                    self.emit("error", err, method);
                    return callback(err);
                }

                if (response === null) {
                    self.end(/* endedByRPC */ true);
                    return undefined;
                }

                if (!(response instanceof responseCtor)) {
                    try {
                        response = responseCtor[self.responseDelimited ? "decodeDelimited" : "decode"](response);
                    } catch (err) {
                        self.emit("error", err, method);
                        return callback(err);
                    }
                }

                self.emit("data", response, method);
                return callback(null, response);
            }
        );
    } catch (err) {
        self.emit("error", err, method);
        setTimeout(function() { callback(err); }, 0);
        return undefined;
    }
};

/**
 * Ends this service and emits the `end` event.
 * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation.
 * @returns {rpc.Service} `this`
 */
Service.prototype.end = function end(endedByRPC) {
    if (this.rpcImpl) {
        if (!endedByRPC) // signal end to rpcImpl
            this.rpcImpl(null, null, null);
        this.rpcImpl = null;
        this.emit("end").off();
    }
    return this;
};

var rpc_1 = createCommonjsModule(function (module, exports) {

/**
 * Streaming RPC helpers.
 * @namespace
 */
var rpc = exports;

/**
 * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets.
 * @typedef RPCImpl
 * @type {function}
 * @param {Method|rpc.ServiceMethod<Message<{}>,Message<{}>>} method Reflected or static method being called
 * @param {Uint8Array} requestData Request data
 * @param {RPCImplCallback} callback Callback function
 * @returns {undefined}
 * @example
 * function rpcImpl(method, requestData, callback) {
 *     if (protobuf.util.lcFirst(method.name) !== "myMethod") // compatible with static code
 *         throw Error("no such method");
 *     asynchronouslyObtainAResponse(requestData, function(err, responseData) {
 *         callback(err, responseData);
 *     });
 * }
 */

/**
 * Node-style callback as used by {@link RPCImpl}.
 * @typedef RPCImplCallback
 * @type {function}
 * @param {Error|null} error Error, if any, otherwise `null`
 * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error
 * @returns {undefined}
 */

rpc.Service = service;
});

var roots = {};

var indexMinimal = createCommonjsModule(function (module, exports) {
var protobuf = exports;

/**
 * Build type, one of `"full"`, `"light"` or `"minimal"`.
 * @name build
 * @type {string}
 * @const
 */
protobuf.build = "minimal";

// Serialization
protobuf.Writer       = writer;
protobuf.BufferWriter = writer_buffer;
protobuf.Reader       = reader;
protobuf.BufferReader = reader_buffer;

// Utility
protobuf.util         = minimal;
protobuf.rpc          = rpc_1;
protobuf.roots        = roots;
protobuf.configure    = configure;

/* istanbul ignore next */
/**
 * Reconfigures the library according to the environment.
 * @returns {undefined}
 */
function configure() {
    protobuf.util._configure();
    protobuf.Writer._configure(protobuf.BufferWriter);
    protobuf.Reader._configure(protobuf.BufferReader);
}

// Set up buffer utility according to the environment
configure();
});

var minimal$1 = indexMinimal;

// Common aliases
var $Reader = minimal$1.Reader, $Writer = minimal$1.Writer, $util = minimal$1.util;

// Exported root namespace
var $root = minimal$1.roots["default"] || (minimal$1.roots["default"] = {});

$root.perfetto = (function() {

    /**
     * Namespace perfetto.
     * @exports perfetto
     * @namespace
     */
    var perfetto = {};

    perfetto.protos = (function() {

        /**
         * Namespace protos.
         * @memberof perfetto
         * @namespace
         */
        var protos = {};

        protos.TraceStats = (function() {

            /**
             * Properties of a TraceStats.
             * @memberof perfetto.protos
             * @interface ITraceStats
             * @property {Array.<perfetto.protos.TraceStats.IBufferStats>|null} [bufferStats] TraceStats bufferStats
             * @property {number|null} [producersConnected] TraceStats producersConnected
             * @property {number|null} [producersSeen] TraceStats producersSeen
             * @property {number|null} [dataSourcesRegistered] TraceStats dataSourcesRegistered
             * @property {number|null} [dataSourcesSeen] TraceStats dataSourcesSeen
             * @property {number|null} [tracingSessions] TraceStats tracingSessions
             * @property {number|null} [totalBuffers] TraceStats totalBuffers
             * @property {number|null} [chunksDiscarded] TraceStats chunksDiscarded
             * @property {number|null} [patchesDiscarded] TraceStats patchesDiscarded
             * @property {number|null} [invalidPackets] TraceStats invalidPackets
             * @property {perfetto.protos.TraceStats.IFilterStats|null} [filterStats] TraceStats filterStats
             * @property {number|null} [flushesRequested] TraceStats flushesRequested
             * @property {number|null} [flushesSucceeded] TraceStats flushesSucceeded
             * @property {number|null} [flushesFailed] TraceStats flushesFailed
             * @property {perfetto.protos.TraceStats.FinalFlushOutcome|null} [finalFlushOutcome] TraceStats finalFlushOutcome
             */

            /**
             * Constructs a new TraceStats.
             * @memberof perfetto.protos
             * @classdesc Represents a TraceStats.
             * @implements ITraceStats
             * @constructor
             * @param {perfetto.protos.ITraceStats=} [p] Properties to set
             */
            function TraceStats(p) {
                this.bufferStats = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TraceStats bufferStats.
             * @member {Array.<perfetto.protos.TraceStats.IBufferStats>} bufferStats
             * @memberof perfetto.protos.TraceStats
             * @instance
             */
            TraceStats.prototype.bufferStats = $util.emptyArray;

            /**
             * TraceStats producersConnected.
             * @member {number} producersConnected
             * @memberof perfetto.protos.TraceStats
             * @instance
             */
            TraceStats.prototype.producersConnected = 0;

            /**
             * TraceStats producersSeen.
             * @member {number} producersSeen
             * @memberof perfetto.protos.TraceStats
             * @instance
             */
            TraceStats.prototype.producersSeen = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TraceStats dataSourcesRegistered.
             * @member {number} dataSourcesRegistered
             * @memberof perfetto.protos.TraceStats
             * @instance
             */
            TraceStats.prototype.dataSourcesRegistered = 0;

            /**
             * TraceStats dataSourcesSeen.
             * @member {number} dataSourcesSeen
             * @memberof perfetto.protos.TraceStats
             * @instance
             */
            TraceStats.prototype.dataSourcesSeen = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TraceStats tracingSessions.
             * @member {number} tracingSessions
             * @memberof perfetto.protos.TraceStats
             * @instance
             */
            TraceStats.prototype.tracingSessions = 0;

            /**
             * TraceStats totalBuffers.
             * @member {number} totalBuffers
             * @memberof perfetto.protos.TraceStats
             * @instance
             */
            TraceStats.prototype.totalBuffers = 0;

            /**
             * TraceStats chunksDiscarded.
             * @member {number} chunksDiscarded
             * @memberof perfetto.protos.TraceStats
             * @instance
             */
            TraceStats.prototype.chunksDiscarded = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TraceStats patchesDiscarded.
             * @member {number} patchesDiscarded
             * @memberof perfetto.protos.TraceStats
             * @instance
             */
            TraceStats.prototype.patchesDiscarded = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TraceStats invalidPackets.
             * @member {number} invalidPackets
             * @memberof perfetto.protos.TraceStats
             * @instance
             */
            TraceStats.prototype.invalidPackets = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TraceStats filterStats.
             * @member {perfetto.protos.TraceStats.IFilterStats|null|undefined} filterStats
             * @memberof perfetto.protos.TraceStats
             * @instance
             */
            TraceStats.prototype.filterStats = null;

            /**
             * TraceStats flushesRequested.
             * @member {number} flushesRequested
             * @memberof perfetto.protos.TraceStats
             * @instance
             */
            TraceStats.prototype.flushesRequested = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TraceStats flushesSucceeded.
             * @member {number} flushesSucceeded
             * @memberof perfetto.protos.TraceStats
             * @instance
             */
            TraceStats.prototype.flushesSucceeded = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TraceStats flushesFailed.
             * @member {number} flushesFailed
             * @memberof perfetto.protos.TraceStats
             * @instance
             */
            TraceStats.prototype.flushesFailed = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TraceStats finalFlushOutcome.
             * @member {perfetto.protos.TraceStats.FinalFlushOutcome} finalFlushOutcome
             * @memberof perfetto.protos.TraceStats
             * @instance
             */
            TraceStats.prototype.finalFlushOutcome = 0;

            /**
             * Creates a new TraceStats instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TraceStats
             * @static
             * @param {perfetto.protos.ITraceStats=} [properties] Properties to set
             * @returns {perfetto.protos.TraceStats} TraceStats instance
             */
            TraceStats.create = function create(properties) {
                return new TraceStats(properties);
            };

            /**
             * Encodes the specified TraceStats message. Does not implicitly {@link perfetto.protos.TraceStats.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TraceStats
             * @static
             * @param {perfetto.protos.ITraceStats} m TraceStats message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TraceStats.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.bufferStats != null && m.bufferStats.length) {
                    for (var i = 0; i < m.bufferStats.length; ++i)
                        $root.perfetto.protos.TraceStats.BufferStats.encode(m.bufferStats[i], w.uint32(10).fork()).ldelim();
                }
                if (m.producersConnected != null && Object.hasOwnProperty.call(m, "producersConnected"))
                    w.uint32(16).uint32(m.producersConnected);
                if (m.producersSeen != null && Object.hasOwnProperty.call(m, "producersSeen"))
                    w.uint32(24).uint64(m.producersSeen);
                if (m.dataSourcesRegistered != null && Object.hasOwnProperty.call(m, "dataSourcesRegistered"))
                    w.uint32(32).uint32(m.dataSourcesRegistered);
                if (m.dataSourcesSeen != null && Object.hasOwnProperty.call(m, "dataSourcesSeen"))
                    w.uint32(40).uint64(m.dataSourcesSeen);
                if (m.tracingSessions != null && Object.hasOwnProperty.call(m, "tracingSessions"))
                    w.uint32(48).uint32(m.tracingSessions);
                if (m.totalBuffers != null && Object.hasOwnProperty.call(m, "totalBuffers"))
                    w.uint32(56).uint32(m.totalBuffers);
                if (m.chunksDiscarded != null && Object.hasOwnProperty.call(m, "chunksDiscarded"))
                    w.uint32(64).uint64(m.chunksDiscarded);
                if (m.patchesDiscarded != null && Object.hasOwnProperty.call(m, "patchesDiscarded"))
                    w.uint32(72).uint64(m.patchesDiscarded);
                if (m.invalidPackets != null && Object.hasOwnProperty.call(m, "invalidPackets"))
                    w.uint32(80).uint64(m.invalidPackets);
                if (m.filterStats != null && Object.hasOwnProperty.call(m, "filterStats"))
                    $root.perfetto.protos.TraceStats.FilterStats.encode(m.filterStats, w.uint32(90).fork()).ldelim();
                if (m.flushesRequested != null && Object.hasOwnProperty.call(m, "flushesRequested"))
                    w.uint32(96).uint64(m.flushesRequested);
                if (m.flushesSucceeded != null && Object.hasOwnProperty.call(m, "flushesSucceeded"))
                    w.uint32(104).uint64(m.flushesSucceeded);
                if (m.flushesFailed != null && Object.hasOwnProperty.call(m, "flushesFailed"))
                    w.uint32(112).uint64(m.flushesFailed);
                if (m.finalFlushOutcome != null && Object.hasOwnProperty.call(m, "finalFlushOutcome"))
                    w.uint32(120).int32(m.finalFlushOutcome);
                return w;
            };

            /**
             * Encodes the specified TraceStats message, length delimited. Does not implicitly {@link perfetto.protos.TraceStats.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TraceStats
             * @static
             * @param {perfetto.protos.ITraceStats} message TraceStats message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TraceStats.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TraceStats message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TraceStats
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TraceStats} TraceStats
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TraceStats.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TraceStats();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.bufferStats && m.bufferStats.length))
                            m.bufferStats = [];
                        m.bufferStats.push($root.perfetto.protos.TraceStats.BufferStats.decode(r, r.uint32()));
                        break;
                    case 2:
                        m.producersConnected = r.uint32();
                        break;
                    case 3:
                        m.producersSeen = r.uint64();
                        break;
                    case 4:
                        m.dataSourcesRegistered = r.uint32();
                        break;
                    case 5:
                        m.dataSourcesSeen = r.uint64();
                        break;
                    case 6:
                        m.tracingSessions = r.uint32();
                        break;
                    case 7:
                        m.totalBuffers = r.uint32();
                        break;
                    case 8:
                        m.chunksDiscarded = r.uint64();
                        break;
                    case 9:
                        m.patchesDiscarded = r.uint64();
                        break;
                    case 10:
                        m.invalidPackets = r.uint64();
                        break;
                    case 11:
                        m.filterStats = $root.perfetto.protos.TraceStats.FilterStats.decode(r, r.uint32());
                        break;
                    case 12:
                        m.flushesRequested = r.uint64();
                        break;
                    case 13:
                        m.flushesSucceeded = r.uint64();
                        break;
                    case 14:
                        m.flushesFailed = r.uint64();
                        break;
                    case 15:
                        m.finalFlushOutcome = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TraceStats message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TraceStats
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TraceStats} TraceStats
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TraceStats.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TraceStats message.
             * @function verify
             * @memberof perfetto.protos.TraceStats
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TraceStats.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.bufferStats != null && m.hasOwnProperty("bufferStats")) {
                    if (!Array.isArray(m.bufferStats))
                        return "bufferStats: array expected";
                    for (var i = 0; i < m.bufferStats.length; ++i) {
                        {
                            var e = $root.perfetto.protos.TraceStats.BufferStats.verify(m.bufferStats[i]);
                            if (e)
                                return "bufferStats." + e;
                        }
                    }
                }
                if (m.producersConnected != null && m.hasOwnProperty("producersConnected")) {
                    if (!$util.isInteger(m.producersConnected))
                        return "producersConnected: integer expected";
                }
                if (m.producersSeen != null && m.hasOwnProperty("producersSeen")) {
                    if (!$util.isInteger(m.producersSeen) && !(m.producersSeen && $util.isInteger(m.producersSeen.low) && $util.isInteger(m.producersSeen.high)))
                        return "producersSeen: integer|Long expected";
                }
                if (m.dataSourcesRegistered != null && m.hasOwnProperty("dataSourcesRegistered")) {
                    if (!$util.isInteger(m.dataSourcesRegistered))
                        return "dataSourcesRegistered: integer expected";
                }
                if (m.dataSourcesSeen != null && m.hasOwnProperty("dataSourcesSeen")) {
                    if (!$util.isInteger(m.dataSourcesSeen) && !(m.dataSourcesSeen && $util.isInteger(m.dataSourcesSeen.low) && $util.isInteger(m.dataSourcesSeen.high)))
                        return "dataSourcesSeen: integer|Long expected";
                }
                if (m.tracingSessions != null && m.hasOwnProperty("tracingSessions")) {
                    if (!$util.isInteger(m.tracingSessions))
                        return "tracingSessions: integer expected";
                }
                if (m.totalBuffers != null && m.hasOwnProperty("totalBuffers")) {
                    if (!$util.isInteger(m.totalBuffers))
                        return "totalBuffers: integer expected";
                }
                if (m.chunksDiscarded != null && m.hasOwnProperty("chunksDiscarded")) {
                    if (!$util.isInteger(m.chunksDiscarded) && !(m.chunksDiscarded && $util.isInteger(m.chunksDiscarded.low) && $util.isInteger(m.chunksDiscarded.high)))
                        return "chunksDiscarded: integer|Long expected";
                }
                if (m.patchesDiscarded != null && m.hasOwnProperty("patchesDiscarded")) {
                    if (!$util.isInteger(m.patchesDiscarded) && !(m.patchesDiscarded && $util.isInteger(m.patchesDiscarded.low) && $util.isInteger(m.patchesDiscarded.high)))
                        return "patchesDiscarded: integer|Long expected";
                }
                if (m.invalidPackets != null && m.hasOwnProperty("invalidPackets")) {
                    if (!$util.isInteger(m.invalidPackets) && !(m.invalidPackets && $util.isInteger(m.invalidPackets.low) && $util.isInteger(m.invalidPackets.high)))
                        return "invalidPackets: integer|Long expected";
                }
                if (m.filterStats != null && m.hasOwnProperty("filterStats")) {
                    {
                        var e = $root.perfetto.protos.TraceStats.FilterStats.verify(m.filterStats);
                        if (e)
                            return "filterStats." + e;
                    }
                }
                if (m.flushesRequested != null && m.hasOwnProperty("flushesRequested")) {
                    if (!$util.isInteger(m.flushesRequested) && !(m.flushesRequested && $util.isInteger(m.flushesRequested.low) && $util.isInteger(m.flushesRequested.high)))
                        return "flushesRequested: integer|Long expected";
                }
                if (m.flushesSucceeded != null && m.hasOwnProperty("flushesSucceeded")) {
                    if (!$util.isInteger(m.flushesSucceeded) && !(m.flushesSucceeded && $util.isInteger(m.flushesSucceeded.low) && $util.isInteger(m.flushesSucceeded.high)))
                        return "flushesSucceeded: integer|Long expected";
                }
                if (m.flushesFailed != null && m.hasOwnProperty("flushesFailed")) {
                    if (!$util.isInteger(m.flushesFailed) && !(m.flushesFailed && $util.isInteger(m.flushesFailed.low) && $util.isInteger(m.flushesFailed.high)))
                        return "flushesFailed: integer|Long expected";
                }
                if (m.finalFlushOutcome != null && m.hasOwnProperty("finalFlushOutcome")) {
                    switch (m.finalFlushOutcome) {
                    default:
                        return "finalFlushOutcome: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates a TraceStats message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TraceStats
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TraceStats} TraceStats
             */
            TraceStats.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TraceStats)
                    return d;
                var m = new $root.perfetto.protos.TraceStats();
                if (d.bufferStats) {
                    if (!Array.isArray(d.bufferStats))
                        throw TypeError(".perfetto.protos.TraceStats.bufferStats: array expected");
                    m.bufferStats = [];
                    for (var i = 0; i < d.bufferStats.length; ++i) {
                        if (typeof d.bufferStats[i] !== "object")
                            throw TypeError(".perfetto.protos.TraceStats.bufferStats: object expected");
                        m.bufferStats[i] = $root.perfetto.protos.TraceStats.BufferStats.fromObject(d.bufferStats[i]);
                    }
                }
                if (d.producersConnected != null) {
                    m.producersConnected = d.producersConnected >>> 0;
                }
                if (d.producersSeen != null) {
                    if ($util.Long)
                        (m.producersSeen = $util.Long.fromValue(d.producersSeen)).unsigned = true;
                    else if (typeof d.producersSeen === "string")
                        m.producersSeen = parseInt(d.producersSeen, 10);
                    else if (typeof d.producersSeen === "number")
                        m.producersSeen = d.producersSeen;
                    else if (typeof d.producersSeen === "object")
                        m.producersSeen = new $util.LongBits(d.producersSeen.low >>> 0, d.producersSeen.high >>> 0).toNumber(true);
                }
                if (d.dataSourcesRegistered != null) {
                    m.dataSourcesRegistered = d.dataSourcesRegistered >>> 0;
                }
                if (d.dataSourcesSeen != null) {
                    if ($util.Long)
                        (m.dataSourcesSeen = $util.Long.fromValue(d.dataSourcesSeen)).unsigned = true;
                    else if (typeof d.dataSourcesSeen === "string")
                        m.dataSourcesSeen = parseInt(d.dataSourcesSeen, 10);
                    else if (typeof d.dataSourcesSeen === "number")
                        m.dataSourcesSeen = d.dataSourcesSeen;
                    else if (typeof d.dataSourcesSeen === "object")
                        m.dataSourcesSeen = new $util.LongBits(d.dataSourcesSeen.low >>> 0, d.dataSourcesSeen.high >>> 0).toNumber(true);
                }
                if (d.tracingSessions != null) {
                    m.tracingSessions = d.tracingSessions >>> 0;
                }
                if (d.totalBuffers != null) {
                    m.totalBuffers = d.totalBuffers >>> 0;
                }
                if (d.chunksDiscarded != null) {
                    if ($util.Long)
                        (m.chunksDiscarded = $util.Long.fromValue(d.chunksDiscarded)).unsigned = true;
                    else if (typeof d.chunksDiscarded === "string")
                        m.chunksDiscarded = parseInt(d.chunksDiscarded, 10);
                    else if (typeof d.chunksDiscarded === "number")
                        m.chunksDiscarded = d.chunksDiscarded;
                    else if (typeof d.chunksDiscarded === "object")
                        m.chunksDiscarded = new $util.LongBits(d.chunksDiscarded.low >>> 0, d.chunksDiscarded.high >>> 0).toNumber(true);
                }
                if (d.patchesDiscarded != null) {
                    if ($util.Long)
                        (m.patchesDiscarded = $util.Long.fromValue(d.patchesDiscarded)).unsigned = true;
                    else if (typeof d.patchesDiscarded === "string")
                        m.patchesDiscarded = parseInt(d.patchesDiscarded, 10);
                    else if (typeof d.patchesDiscarded === "number")
                        m.patchesDiscarded = d.patchesDiscarded;
                    else if (typeof d.patchesDiscarded === "object")
                        m.patchesDiscarded = new $util.LongBits(d.patchesDiscarded.low >>> 0, d.patchesDiscarded.high >>> 0).toNumber(true);
                }
                if (d.invalidPackets != null) {
                    if ($util.Long)
                        (m.invalidPackets = $util.Long.fromValue(d.invalidPackets)).unsigned = true;
                    else if (typeof d.invalidPackets === "string")
                        m.invalidPackets = parseInt(d.invalidPackets, 10);
                    else if (typeof d.invalidPackets === "number")
                        m.invalidPackets = d.invalidPackets;
                    else if (typeof d.invalidPackets === "object")
                        m.invalidPackets = new $util.LongBits(d.invalidPackets.low >>> 0, d.invalidPackets.high >>> 0).toNumber(true);
                }
                if (d.filterStats != null) {
                    if (typeof d.filterStats !== "object")
                        throw TypeError(".perfetto.protos.TraceStats.filterStats: object expected");
                    m.filterStats = $root.perfetto.protos.TraceStats.FilterStats.fromObject(d.filterStats);
                }
                if (d.flushesRequested != null) {
                    if ($util.Long)
                        (m.flushesRequested = $util.Long.fromValue(d.flushesRequested)).unsigned = true;
                    else if (typeof d.flushesRequested === "string")
                        m.flushesRequested = parseInt(d.flushesRequested, 10);
                    else if (typeof d.flushesRequested === "number")
                        m.flushesRequested = d.flushesRequested;
                    else if (typeof d.flushesRequested === "object")
                        m.flushesRequested = new $util.LongBits(d.flushesRequested.low >>> 0, d.flushesRequested.high >>> 0).toNumber(true);
                }
                if (d.flushesSucceeded != null) {
                    if ($util.Long)
                        (m.flushesSucceeded = $util.Long.fromValue(d.flushesSucceeded)).unsigned = true;
                    else if (typeof d.flushesSucceeded === "string")
                        m.flushesSucceeded = parseInt(d.flushesSucceeded, 10);
                    else if (typeof d.flushesSucceeded === "number")
                        m.flushesSucceeded = d.flushesSucceeded;
                    else if (typeof d.flushesSucceeded === "object")
                        m.flushesSucceeded = new $util.LongBits(d.flushesSucceeded.low >>> 0, d.flushesSucceeded.high >>> 0).toNumber(true);
                }
                if (d.flushesFailed != null) {
                    if ($util.Long)
                        (m.flushesFailed = $util.Long.fromValue(d.flushesFailed)).unsigned = true;
                    else if (typeof d.flushesFailed === "string")
                        m.flushesFailed = parseInt(d.flushesFailed, 10);
                    else if (typeof d.flushesFailed === "number")
                        m.flushesFailed = d.flushesFailed;
                    else if (typeof d.flushesFailed === "object")
                        m.flushesFailed = new $util.LongBits(d.flushesFailed.low >>> 0, d.flushesFailed.high >>> 0).toNumber(true);
                }
                switch (d.finalFlushOutcome) {
                case "FINAL_FLUSH_UNSPECIFIED":
                case 0:
                    m.finalFlushOutcome = 0;
                    break;
                case "FINAL_FLUSH_SUCCEEDED":
                case 1:
                    m.finalFlushOutcome = 1;
                    break;
                case "FINAL_FLUSH_FAILED":
                case 2:
                    m.finalFlushOutcome = 2;
                    break;
                }
                return m;
            };

            /**
             * Creates a plain object from a TraceStats message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TraceStats
             * @static
             * @param {perfetto.protos.TraceStats} m TraceStats
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TraceStats.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.bufferStats = [];
                }
                if (o.defaults) {
                    d.producersConnected = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.producersSeen = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.producersSeen = o.longs === String ? "0" : 0;
                    d.dataSourcesRegistered = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dataSourcesSeen = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dataSourcesSeen = o.longs === String ? "0" : 0;
                    d.tracingSessions = 0;
                    d.totalBuffers = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.chunksDiscarded = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.chunksDiscarded = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.patchesDiscarded = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.patchesDiscarded = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.invalidPackets = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.invalidPackets = o.longs === String ? "0" : 0;
                    d.filterStats = null;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.flushesRequested = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.flushesRequested = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.flushesSucceeded = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.flushesSucceeded = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.flushesFailed = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.flushesFailed = o.longs === String ? "0" : 0;
                    d.finalFlushOutcome = o.enums === String ? "FINAL_FLUSH_UNSPECIFIED" : 0;
                }
                if (m.bufferStats && m.bufferStats.length) {
                    d.bufferStats = [];
                    for (var j = 0; j < m.bufferStats.length; ++j) {
                        d.bufferStats[j] = $root.perfetto.protos.TraceStats.BufferStats.toObject(m.bufferStats[j], o);
                    }
                }
                if (m.producersConnected != null && m.hasOwnProperty("producersConnected")) {
                    d.producersConnected = m.producersConnected;
                }
                if (m.producersSeen != null && m.hasOwnProperty("producersSeen")) {
                    if (typeof m.producersSeen === "number")
                        d.producersSeen = o.longs === String ? String(m.producersSeen) : m.producersSeen;
                    else
                        d.producersSeen = o.longs === String ? $util.Long.prototype.toString.call(m.producersSeen) : o.longs === Number ? new $util.LongBits(m.producersSeen.low >>> 0, m.producersSeen.high >>> 0).toNumber(true) : m.producersSeen;
                }
                if (m.dataSourcesRegistered != null && m.hasOwnProperty("dataSourcesRegistered")) {
                    d.dataSourcesRegistered = m.dataSourcesRegistered;
                }
                if (m.dataSourcesSeen != null && m.hasOwnProperty("dataSourcesSeen")) {
                    if (typeof m.dataSourcesSeen === "number")
                        d.dataSourcesSeen = o.longs === String ? String(m.dataSourcesSeen) : m.dataSourcesSeen;
                    else
                        d.dataSourcesSeen = o.longs === String ? $util.Long.prototype.toString.call(m.dataSourcesSeen) : o.longs === Number ? new $util.LongBits(m.dataSourcesSeen.low >>> 0, m.dataSourcesSeen.high >>> 0).toNumber(true) : m.dataSourcesSeen;
                }
                if (m.tracingSessions != null && m.hasOwnProperty("tracingSessions")) {
                    d.tracingSessions = m.tracingSessions;
                }
                if (m.totalBuffers != null && m.hasOwnProperty("totalBuffers")) {
                    d.totalBuffers = m.totalBuffers;
                }
                if (m.chunksDiscarded != null && m.hasOwnProperty("chunksDiscarded")) {
                    if (typeof m.chunksDiscarded === "number")
                        d.chunksDiscarded = o.longs === String ? String(m.chunksDiscarded) : m.chunksDiscarded;
                    else
                        d.chunksDiscarded = o.longs === String ? $util.Long.prototype.toString.call(m.chunksDiscarded) : o.longs === Number ? new $util.LongBits(m.chunksDiscarded.low >>> 0, m.chunksDiscarded.high >>> 0).toNumber(true) : m.chunksDiscarded;
                }
                if (m.patchesDiscarded != null && m.hasOwnProperty("patchesDiscarded")) {
                    if (typeof m.patchesDiscarded === "number")
                        d.patchesDiscarded = o.longs === String ? String(m.patchesDiscarded) : m.patchesDiscarded;
                    else
                        d.patchesDiscarded = o.longs === String ? $util.Long.prototype.toString.call(m.patchesDiscarded) : o.longs === Number ? new $util.LongBits(m.patchesDiscarded.low >>> 0, m.patchesDiscarded.high >>> 0).toNumber(true) : m.patchesDiscarded;
                }
                if (m.invalidPackets != null && m.hasOwnProperty("invalidPackets")) {
                    if (typeof m.invalidPackets === "number")
                        d.invalidPackets = o.longs === String ? String(m.invalidPackets) : m.invalidPackets;
                    else
                        d.invalidPackets = o.longs === String ? $util.Long.prototype.toString.call(m.invalidPackets) : o.longs === Number ? new $util.LongBits(m.invalidPackets.low >>> 0, m.invalidPackets.high >>> 0).toNumber(true) : m.invalidPackets;
                }
                if (m.filterStats != null && m.hasOwnProperty("filterStats")) {
                    d.filterStats = $root.perfetto.protos.TraceStats.FilterStats.toObject(m.filterStats, o);
                }
                if (m.flushesRequested != null && m.hasOwnProperty("flushesRequested")) {
                    if (typeof m.flushesRequested === "number")
                        d.flushesRequested = o.longs === String ? String(m.flushesRequested) : m.flushesRequested;
                    else
                        d.flushesRequested = o.longs === String ? $util.Long.prototype.toString.call(m.flushesRequested) : o.longs === Number ? new $util.LongBits(m.flushesRequested.low >>> 0, m.flushesRequested.high >>> 0).toNumber(true) : m.flushesRequested;
                }
                if (m.flushesSucceeded != null && m.hasOwnProperty("flushesSucceeded")) {
                    if (typeof m.flushesSucceeded === "number")
                        d.flushesSucceeded = o.longs === String ? String(m.flushesSucceeded) : m.flushesSucceeded;
                    else
                        d.flushesSucceeded = o.longs === String ? $util.Long.prototype.toString.call(m.flushesSucceeded) : o.longs === Number ? new $util.LongBits(m.flushesSucceeded.low >>> 0, m.flushesSucceeded.high >>> 0).toNumber(true) : m.flushesSucceeded;
                }
                if (m.flushesFailed != null && m.hasOwnProperty("flushesFailed")) {
                    if (typeof m.flushesFailed === "number")
                        d.flushesFailed = o.longs === String ? String(m.flushesFailed) : m.flushesFailed;
                    else
                        d.flushesFailed = o.longs === String ? $util.Long.prototype.toString.call(m.flushesFailed) : o.longs === Number ? new $util.LongBits(m.flushesFailed.low >>> 0, m.flushesFailed.high >>> 0).toNumber(true) : m.flushesFailed;
                }
                if (m.finalFlushOutcome != null && m.hasOwnProperty("finalFlushOutcome")) {
                    d.finalFlushOutcome = o.enums === String ? $root.perfetto.protos.TraceStats.FinalFlushOutcome[m.finalFlushOutcome] : m.finalFlushOutcome;
                }
                return d;
            };

            /**
             * Converts this TraceStats to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TraceStats
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TraceStats.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            TraceStats.BufferStats = (function() {

                /**
                 * Properties of a BufferStats.
                 * @memberof perfetto.protos.TraceStats
                 * @interface IBufferStats
                 * @property {number|null} [bufferSize] BufferStats bufferSize
                 * @property {number|null} [bytesWritten] BufferStats bytesWritten
                 * @property {number|null} [bytesOverwritten] BufferStats bytesOverwritten
                 * @property {number|null} [bytesRead] BufferStats bytesRead
                 * @property {number|null} [paddingBytesWritten] BufferStats paddingBytesWritten
                 * @property {number|null} [paddingBytesCleared] BufferStats paddingBytesCleared
                 * @property {number|null} [chunksWritten] BufferStats chunksWritten
                 * @property {number|null} [chunksRewritten] BufferStats chunksRewritten
                 * @property {number|null} [chunksOverwritten] BufferStats chunksOverwritten
                 * @property {number|null} [chunksDiscarded] BufferStats chunksDiscarded
                 * @property {number|null} [chunksRead] BufferStats chunksRead
                 * @property {number|null} [chunksCommittedOutOfOrder] BufferStats chunksCommittedOutOfOrder
                 * @property {number|null} [writeWrapCount] BufferStats writeWrapCount
                 * @property {number|null} [patchesSucceeded] BufferStats patchesSucceeded
                 * @property {number|null} [patchesFailed] BufferStats patchesFailed
                 * @property {number|null} [readaheadsSucceeded] BufferStats readaheadsSucceeded
                 * @property {number|null} [readaheadsFailed] BufferStats readaheadsFailed
                 * @property {number|null} [abiViolations] BufferStats abiViolations
                 * @property {number|null} [traceWriterPacketLoss] BufferStats traceWriterPacketLoss
                 */

                /**
                 * Constructs a new BufferStats.
                 * @memberof perfetto.protos.TraceStats
                 * @classdesc Represents a BufferStats.
                 * @implements IBufferStats
                 * @constructor
                 * @param {perfetto.protos.TraceStats.IBufferStats=} [p] Properties to set
                 */
                function BufferStats(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * BufferStats bufferSize.
                 * @member {number} bufferSize
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @instance
                 */
                BufferStats.prototype.bufferSize = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * BufferStats bytesWritten.
                 * @member {number} bytesWritten
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @instance
                 */
                BufferStats.prototype.bytesWritten = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * BufferStats bytesOverwritten.
                 * @member {number} bytesOverwritten
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @instance
                 */
                BufferStats.prototype.bytesOverwritten = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * BufferStats bytesRead.
                 * @member {number} bytesRead
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @instance
                 */
                BufferStats.prototype.bytesRead = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * BufferStats paddingBytesWritten.
                 * @member {number} paddingBytesWritten
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @instance
                 */
                BufferStats.prototype.paddingBytesWritten = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * BufferStats paddingBytesCleared.
                 * @member {number} paddingBytesCleared
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @instance
                 */
                BufferStats.prototype.paddingBytesCleared = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * BufferStats chunksWritten.
                 * @member {number} chunksWritten
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @instance
                 */
                BufferStats.prototype.chunksWritten = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * BufferStats chunksRewritten.
                 * @member {number} chunksRewritten
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @instance
                 */
                BufferStats.prototype.chunksRewritten = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * BufferStats chunksOverwritten.
                 * @member {number} chunksOverwritten
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @instance
                 */
                BufferStats.prototype.chunksOverwritten = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * BufferStats chunksDiscarded.
                 * @member {number} chunksDiscarded
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @instance
                 */
                BufferStats.prototype.chunksDiscarded = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * BufferStats chunksRead.
                 * @member {number} chunksRead
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @instance
                 */
                BufferStats.prototype.chunksRead = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * BufferStats chunksCommittedOutOfOrder.
                 * @member {number} chunksCommittedOutOfOrder
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @instance
                 */
                BufferStats.prototype.chunksCommittedOutOfOrder = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * BufferStats writeWrapCount.
                 * @member {number} writeWrapCount
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @instance
                 */
                BufferStats.prototype.writeWrapCount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * BufferStats patchesSucceeded.
                 * @member {number} patchesSucceeded
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @instance
                 */
                BufferStats.prototype.patchesSucceeded = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * BufferStats patchesFailed.
                 * @member {number} patchesFailed
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @instance
                 */
                BufferStats.prototype.patchesFailed = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * BufferStats readaheadsSucceeded.
                 * @member {number} readaheadsSucceeded
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @instance
                 */
                BufferStats.prototype.readaheadsSucceeded = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * BufferStats readaheadsFailed.
                 * @member {number} readaheadsFailed
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @instance
                 */
                BufferStats.prototype.readaheadsFailed = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * BufferStats abiViolations.
                 * @member {number} abiViolations
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @instance
                 */
                BufferStats.prototype.abiViolations = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * BufferStats traceWriterPacketLoss.
                 * @member {number} traceWriterPacketLoss
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @instance
                 */
                BufferStats.prototype.traceWriterPacketLoss = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Creates a new BufferStats instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @static
                 * @param {perfetto.protos.TraceStats.IBufferStats=} [properties] Properties to set
                 * @returns {perfetto.protos.TraceStats.BufferStats} BufferStats instance
                 */
                BufferStats.create = function create(properties) {
                    return new BufferStats(properties);
                };

                /**
                 * Encodes the specified BufferStats message. Does not implicitly {@link perfetto.protos.TraceStats.BufferStats.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @static
                 * @param {perfetto.protos.TraceStats.IBufferStats} m BufferStats message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BufferStats.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.bytesWritten != null && Object.hasOwnProperty.call(m, "bytesWritten"))
                        w.uint32(8).uint64(m.bytesWritten);
                    if (m.chunksWritten != null && Object.hasOwnProperty.call(m, "chunksWritten"))
                        w.uint32(16).uint64(m.chunksWritten);
                    if (m.chunksOverwritten != null && Object.hasOwnProperty.call(m, "chunksOverwritten"))
                        w.uint32(24).uint64(m.chunksOverwritten);
                    if (m.writeWrapCount != null && Object.hasOwnProperty.call(m, "writeWrapCount"))
                        w.uint32(32).uint64(m.writeWrapCount);
                    if (m.patchesSucceeded != null && Object.hasOwnProperty.call(m, "patchesSucceeded"))
                        w.uint32(40).uint64(m.patchesSucceeded);
                    if (m.patchesFailed != null && Object.hasOwnProperty.call(m, "patchesFailed"))
                        w.uint32(48).uint64(m.patchesFailed);
                    if (m.readaheadsSucceeded != null && Object.hasOwnProperty.call(m, "readaheadsSucceeded"))
                        w.uint32(56).uint64(m.readaheadsSucceeded);
                    if (m.readaheadsFailed != null && Object.hasOwnProperty.call(m, "readaheadsFailed"))
                        w.uint32(64).uint64(m.readaheadsFailed);
                    if (m.abiViolations != null && Object.hasOwnProperty.call(m, "abiViolations"))
                        w.uint32(72).uint64(m.abiViolations);
                    if (m.chunksRewritten != null && Object.hasOwnProperty.call(m, "chunksRewritten"))
                        w.uint32(80).uint64(m.chunksRewritten);
                    if (m.chunksCommittedOutOfOrder != null && Object.hasOwnProperty.call(m, "chunksCommittedOutOfOrder"))
                        w.uint32(88).uint64(m.chunksCommittedOutOfOrder);
                    if (m.bufferSize != null && Object.hasOwnProperty.call(m, "bufferSize"))
                        w.uint32(96).uint64(m.bufferSize);
                    if (m.bytesOverwritten != null && Object.hasOwnProperty.call(m, "bytesOverwritten"))
                        w.uint32(104).uint64(m.bytesOverwritten);
                    if (m.bytesRead != null && Object.hasOwnProperty.call(m, "bytesRead"))
                        w.uint32(112).uint64(m.bytesRead);
                    if (m.paddingBytesWritten != null && Object.hasOwnProperty.call(m, "paddingBytesWritten"))
                        w.uint32(120).uint64(m.paddingBytesWritten);
                    if (m.paddingBytesCleared != null && Object.hasOwnProperty.call(m, "paddingBytesCleared"))
                        w.uint32(128).uint64(m.paddingBytesCleared);
                    if (m.chunksRead != null && Object.hasOwnProperty.call(m, "chunksRead"))
                        w.uint32(136).uint64(m.chunksRead);
                    if (m.chunksDiscarded != null && Object.hasOwnProperty.call(m, "chunksDiscarded"))
                        w.uint32(144).uint64(m.chunksDiscarded);
                    if (m.traceWriterPacketLoss != null && Object.hasOwnProperty.call(m, "traceWriterPacketLoss"))
                        w.uint32(152).uint64(m.traceWriterPacketLoss);
                    return w;
                };

                /**
                 * Encodes the specified BufferStats message, length delimited. Does not implicitly {@link perfetto.protos.TraceStats.BufferStats.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @static
                 * @param {perfetto.protos.TraceStats.IBufferStats} message BufferStats message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BufferStats.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a BufferStats message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.TraceStats.BufferStats} BufferStats
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BufferStats.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TraceStats.BufferStats();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 12:
                            m.bufferSize = r.uint64();
                            break;
                        case 1:
                            m.bytesWritten = r.uint64();
                            break;
                        case 13:
                            m.bytesOverwritten = r.uint64();
                            break;
                        case 14:
                            m.bytesRead = r.uint64();
                            break;
                        case 15:
                            m.paddingBytesWritten = r.uint64();
                            break;
                        case 16:
                            m.paddingBytesCleared = r.uint64();
                            break;
                        case 2:
                            m.chunksWritten = r.uint64();
                            break;
                        case 10:
                            m.chunksRewritten = r.uint64();
                            break;
                        case 3:
                            m.chunksOverwritten = r.uint64();
                            break;
                        case 18:
                            m.chunksDiscarded = r.uint64();
                            break;
                        case 17:
                            m.chunksRead = r.uint64();
                            break;
                        case 11:
                            m.chunksCommittedOutOfOrder = r.uint64();
                            break;
                        case 4:
                            m.writeWrapCount = r.uint64();
                            break;
                        case 5:
                            m.patchesSucceeded = r.uint64();
                            break;
                        case 6:
                            m.patchesFailed = r.uint64();
                            break;
                        case 7:
                            m.readaheadsSucceeded = r.uint64();
                            break;
                        case 8:
                            m.readaheadsFailed = r.uint64();
                            break;
                        case 9:
                            m.abiViolations = r.uint64();
                            break;
                        case 19:
                            m.traceWriterPacketLoss = r.uint64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a BufferStats message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.TraceStats.BufferStats} BufferStats
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BufferStats.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a BufferStats message.
                 * @function verify
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                BufferStats.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.bufferSize != null && m.hasOwnProperty("bufferSize")) {
                        if (!$util.isInteger(m.bufferSize) && !(m.bufferSize && $util.isInteger(m.bufferSize.low) && $util.isInteger(m.bufferSize.high)))
                            return "bufferSize: integer|Long expected";
                    }
                    if (m.bytesWritten != null && m.hasOwnProperty("bytesWritten")) {
                        if (!$util.isInteger(m.bytesWritten) && !(m.bytesWritten && $util.isInteger(m.bytesWritten.low) && $util.isInteger(m.bytesWritten.high)))
                            return "bytesWritten: integer|Long expected";
                    }
                    if (m.bytesOverwritten != null && m.hasOwnProperty("bytesOverwritten")) {
                        if (!$util.isInteger(m.bytesOverwritten) && !(m.bytesOverwritten && $util.isInteger(m.bytesOverwritten.low) && $util.isInteger(m.bytesOverwritten.high)))
                            return "bytesOverwritten: integer|Long expected";
                    }
                    if (m.bytesRead != null && m.hasOwnProperty("bytesRead")) {
                        if (!$util.isInteger(m.bytesRead) && !(m.bytesRead && $util.isInteger(m.bytesRead.low) && $util.isInteger(m.bytesRead.high)))
                            return "bytesRead: integer|Long expected";
                    }
                    if (m.paddingBytesWritten != null && m.hasOwnProperty("paddingBytesWritten")) {
                        if (!$util.isInteger(m.paddingBytesWritten) && !(m.paddingBytesWritten && $util.isInteger(m.paddingBytesWritten.low) && $util.isInteger(m.paddingBytesWritten.high)))
                            return "paddingBytesWritten: integer|Long expected";
                    }
                    if (m.paddingBytesCleared != null && m.hasOwnProperty("paddingBytesCleared")) {
                        if (!$util.isInteger(m.paddingBytesCleared) && !(m.paddingBytesCleared && $util.isInteger(m.paddingBytesCleared.low) && $util.isInteger(m.paddingBytesCleared.high)))
                            return "paddingBytesCleared: integer|Long expected";
                    }
                    if (m.chunksWritten != null && m.hasOwnProperty("chunksWritten")) {
                        if (!$util.isInteger(m.chunksWritten) && !(m.chunksWritten && $util.isInteger(m.chunksWritten.low) && $util.isInteger(m.chunksWritten.high)))
                            return "chunksWritten: integer|Long expected";
                    }
                    if (m.chunksRewritten != null && m.hasOwnProperty("chunksRewritten")) {
                        if (!$util.isInteger(m.chunksRewritten) && !(m.chunksRewritten && $util.isInteger(m.chunksRewritten.low) && $util.isInteger(m.chunksRewritten.high)))
                            return "chunksRewritten: integer|Long expected";
                    }
                    if (m.chunksOverwritten != null && m.hasOwnProperty("chunksOverwritten")) {
                        if (!$util.isInteger(m.chunksOverwritten) && !(m.chunksOverwritten && $util.isInteger(m.chunksOverwritten.low) && $util.isInteger(m.chunksOverwritten.high)))
                            return "chunksOverwritten: integer|Long expected";
                    }
                    if (m.chunksDiscarded != null && m.hasOwnProperty("chunksDiscarded")) {
                        if (!$util.isInteger(m.chunksDiscarded) && !(m.chunksDiscarded && $util.isInteger(m.chunksDiscarded.low) && $util.isInteger(m.chunksDiscarded.high)))
                            return "chunksDiscarded: integer|Long expected";
                    }
                    if (m.chunksRead != null && m.hasOwnProperty("chunksRead")) {
                        if (!$util.isInteger(m.chunksRead) && !(m.chunksRead && $util.isInteger(m.chunksRead.low) && $util.isInteger(m.chunksRead.high)))
                            return "chunksRead: integer|Long expected";
                    }
                    if (m.chunksCommittedOutOfOrder != null && m.hasOwnProperty("chunksCommittedOutOfOrder")) {
                        if (!$util.isInteger(m.chunksCommittedOutOfOrder) && !(m.chunksCommittedOutOfOrder && $util.isInteger(m.chunksCommittedOutOfOrder.low) && $util.isInteger(m.chunksCommittedOutOfOrder.high)))
                            return "chunksCommittedOutOfOrder: integer|Long expected";
                    }
                    if (m.writeWrapCount != null && m.hasOwnProperty("writeWrapCount")) {
                        if (!$util.isInteger(m.writeWrapCount) && !(m.writeWrapCount && $util.isInteger(m.writeWrapCount.low) && $util.isInteger(m.writeWrapCount.high)))
                            return "writeWrapCount: integer|Long expected";
                    }
                    if (m.patchesSucceeded != null && m.hasOwnProperty("patchesSucceeded")) {
                        if (!$util.isInteger(m.patchesSucceeded) && !(m.patchesSucceeded && $util.isInteger(m.patchesSucceeded.low) && $util.isInteger(m.patchesSucceeded.high)))
                            return "patchesSucceeded: integer|Long expected";
                    }
                    if (m.patchesFailed != null && m.hasOwnProperty("patchesFailed")) {
                        if (!$util.isInteger(m.patchesFailed) && !(m.patchesFailed && $util.isInteger(m.patchesFailed.low) && $util.isInteger(m.patchesFailed.high)))
                            return "patchesFailed: integer|Long expected";
                    }
                    if (m.readaheadsSucceeded != null && m.hasOwnProperty("readaheadsSucceeded")) {
                        if (!$util.isInteger(m.readaheadsSucceeded) && !(m.readaheadsSucceeded && $util.isInteger(m.readaheadsSucceeded.low) && $util.isInteger(m.readaheadsSucceeded.high)))
                            return "readaheadsSucceeded: integer|Long expected";
                    }
                    if (m.readaheadsFailed != null && m.hasOwnProperty("readaheadsFailed")) {
                        if (!$util.isInteger(m.readaheadsFailed) && !(m.readaheadsFailed && $util.isInteger(m.readaheadsFailed.low) && $util.isInteger(m.readaheadsFailed.high)))
                            return "readaheadsFailed: integer|Long expected";
                    }
                    if (m.abiViolations != null && m.hasOwnProperty("abiViolations")) {
                        if (!$util.isInteger(m.abiViolations) && !(m.abiViolations && $util.isInteger(m.abiViolations.low) && $util.isInteger(m.abiViolations.high)))
                            return "abiViolations: integer|Long expected";
                    }
                    if (m.traceWriterPacketLoss != null && m.hasOwnProperty("traceWriterPacketLoss")) {
                        if (!$util.isInteger(m.traceWriterPacketLoss) && !(m.traceWriterPacketLoss && $util.isInteger(m.traceWriterPacketLoss.low) && $util.isInteger(m.traceWriterPacketLoss.high)))
                            return "traceWriterPacketLoss: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a BufferStats message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.TraceStats.BufferStats} BufferStats
                 */
                BufferStats.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.TraceStats.BufferStats)
                        return d;
                    var m = new $root.perfetto.protos.TraceStats.BufferStats();
                    if (d.bufferSize != null) {
                        if ($util.Long)
                            (m.bufferSize = $util.Long.fromValue(d.bufferSize)).unsigned = true;
                        else if (typeof d.bufferSize === "string")
                            m.bufferSize = parseInt(d.bufferSize, 10);
                        else if (typeof d.bufferSize === "number")
                            m.bufferSize = d.bufferSize;
                        else if (typeof d.bufferSize === "object")
                            m.bufferSize = new $util.LongBits(d.bufferSize.low >>> 0, d.bufferSize.high >>> 0).toNumber(true);
                    }
                    if (d.bytesWritten != null) {
                        if ($util.Long)
                            (m.bytesWritten = $util.Long.fromValue(d.bytesWritten)).unsigned = true;
                        else if (typeof d.bytesWritten === "string")
                            m.bytesWritten = parseInt(d.bytesWritten, 10);
                        else if (typeof d.bytesWritten === "number")
                            m.bytesWritten = d.bytesWritten;
                        else if (typeof d.bytesWritten === "object")
                            m.bytesWritten = new $util.LongBits(d.bytesWritten.low >>> 0, d.bytesWritten.high >>> 0).toNumber(true);
                    }
                    if (d.bytesOverwritten != null) {
                        if ($util.Long)
                            (m.bytesOverwritten = $util.Long.fromValue(d.bytesOverwritten)).unsigned = true;
                        else if (typeof d.bytesOverwritten === "string")
                            m.bytesOverwritten = parseInt(d.bytesOverwritten, 10);
                        else if (typeof d.bytesOverwritten === "number")
                            m.bytesOverwritten = d.bytesOverwritten;
                        else if (typeof d.bytesOverwritten === "object")
                            m.bytesOverwritten = new $util.LongBits(d.bytesOverwritten.low >>> 0, d.bytesOverwritten.high >>> 0).toNumber(true);
                    }
                    if (d.bytesRead != null) {
                        if ($util.Long)
                            (m.bytesRead = $util.Long.fromValue(d.bytesRead)).unsigned = true;
                        else if (typeof d.bytesRead === "string")
                            m.bytesRead = parseInt(d.bytesRead, 10);
                        else if (typeof d.bytesRead === "number")
                            m.bytesRead = d.bytesRead;
                        else if (typeof d.bytesRead === "object")
                            m.bytesRead = new $util.LongBits(d.bytesRead.low >>> 0, d.bytesRead.high >>> 0).toNumber(true);
                    }
                    if (d.paddingBytesWritten != null) {
                        if ($util.Long)
                            (m.paddingBytesWritten = $util.Long.fromValue(d.paddingBytesWritten)).unsigned = true;
                        else if (typeof d.paddingBytesWritten === "string")
                            m.paddingBytesWritten = parseInt(d.paddingBytesWritten, 10);
                        else if (typeof d.paddingBytesWritten === "number")
                            m.paddingBytesWritten = d.paddingBytesWritten;
                        else if (typeof d.paddingBytesWritten === "object")
                            m.paddingBytesWritten = new $util.LongBits(d.paddingBytesWritten.low >>> 0, d.paddingBytesWritten.high >>> 0).toNumber(true);
                    }
                    if (d.paddingBytesCleared != null) {
                        if ($util.Long)
                            (m.paddingBytesCleared = $util.Long.fromValue(d.paddingBytesCleared)).unsigned = true;
                        else if (typeof d.paddingBytesCleared === "string")
                            m.paddingBytesCleared = parseInt(d.paddingBytesCleared, 10);
                        else if (typeof d.paddingBytesCleared === "number")
                            m.paddingBytesCleared = d.paddingBytesCleared;
                        else if (typeof d.paddingBytesCleared === "object")
                            m.paddingBytesCleared = new $util.LongBits(d.paddingBytesCleared.low >>> 0, d.paddingBytesCleared.high >>> 0).toNumber(true);
                    }
                    if (d.chunksWritten != null) {
                        if ($util.Long)
                            (m.chunksWritten = $util.Long.fromValue(d.chunksWritten)).unsigned = true;
                        else if (typeof d.chunksWritten === "string")
                            m.chunksWritten = parseInt(d.chunksWritten, 10);
                        else if (typeof d.chunksWritten === "number")
                            m.chunksWritten = d.chunksWritten;
                        else if (typeof d.chunksWritten === "object")
                            m.chunksWritten = new $util.LongBits(d.chunksWritten.low >>> 0, d.chunksWritten.high >>> 0).toNumber(true);
                    }
                    if (d.chunksRewritten != null) {
                        if ($util.Long)
                            (m.chunksRewritten = $util.Long.fromValue(d.chunksRewritten)).unsigned = true;
                        else if (typeof d.chunksRewritten === "string")
                            m.chunksRewritten = parseInt(d.chunksRewritten, 10);
                        else if (typeof d.chunksRewritten === "number")
                            m.chunksRewritten = d.chunksRewritten;
                        else if (typeof d.chunksRewritten === "object")
                            m.chunksRewritten = new $util.LongBits(d.chunksRewritten.low >>> 0, d.chunksRewritten.high >>> 0).toNumber(true);
                    }
                    if (d.chunksOverwritten != null) {
                        if ($util.Long)
                            (m.chunksOverwritten = $util.Long.fromValue(d.chunksOverwritten)).unsigned = true;
                        else if (typeof d.chunksOverwritten === "string")
                            m.chunksOverwritten = parseInt(d.chunksOverwritten, 10);
                        else if (typeof d.chunksOverwritten === "number")
                            m.chunksOverwritten = d.chunksOverwritten;
                        else if (typeof d.chunksOverwritten === "object")
                            m.chunksOverwritten = new $util.LongBits(d.chunksOverwritten.low >>> 0, d.chunksOverwritten.high >>> 0).toNumber(true);
                    }
                    if (d.chunksDiscarded != null) {
                        if ($util.Long)
                            (m.chunksDiscarded = $util.Long.fromValue(d.chunksDiscarded)).unsigned = true;
                        else if (typeof d.chunksDiscarded === "string")
                            m.chunksDiscarded = parseInt(d.chunksDiscarded, 10);
                        else if (typeof d.chunksDiscarded === "number")
                            m.chunksDiscarded = d.chunksDiscarded;
                        else if (typeof d.chunksDiscarded === "object")
                            m.chunksDiscarded = new $util.LongBits(d.chunksDiscarded.low >>> 0, d.chunksDiscarded.high >>> 0).toNumber(true);
                    }
                    if (d.chunksRead != null) {
                        if ($util.Long)
                            (m.chunksRead = $util.Long.fromValue(d.chunksRead)).unsigned = true;
                        else if (typeof d.chunksRead === "string")
                            m.chunksRead = parseInt(d.chunksRead, 10);
                        else if (typeof d.chunksRead === "number")
                            m.chunksRead = d.chunksRead;
                        else if (typeof d.chunksRead === "object")
                            m.chunksRead = new $util.LongBits(d.chunksRead.low >>> 0, d.chunksRead.high >>> 0).toNumber(true);
                    }
                    if (d.chunksCommittedOutOfOrder != null) {
                        if ($util.Long)
                            (m.chunksCommittedOutOfOrder = $util.Long.fromValue(d.chunksCommittedOutOfOrder)).unsigned = true;
                        else if (typeof d.chunksCommittedOutOfOrder === "string")
                            m.chunksCommittedOutOfOrder = parseInt(d.chunksCommittedOutOfOrder, 10);
                        else if (typeof d.chunksCommittedOutOfOrder === "number")
                            m.chunksCommittedOutOfOrder = d.chunksCommittedOutOfOrder;
                        else if (typeof d.chunksCommittedOutOfOrder === "object")
                            m.chunksCommittedOutOfOrder = new $util.LongBits(d.chunksCommittedOutOfOrder.low >>> 0, d.chunksCommittedOutOfOrder.high >>> 0).toNumber(true);
                    }
                    if (d.writeWrapCount != null) {
                        if ($util.Long)
                            (m.writeWrapCount = $util.Long.fromValue(d.writeWrapCount)).unsigned = true;
                        else if (typeof d.writeWrapCount === "string")
                            m.writeWrapCount = parseInt(d.writeWrapCount, 10);
                        else if (typeof d.writeWrapCount === "number")
                            m.writeWrapCount = d.writeWrapCount;
                        else if (typeof d.writeWrapCount === "object")
                            m.writeWrapCount = new $util.LongBits(d.writeWrapCount.low >>> 0, d.writeWrapCount.high >>> 0).toNumber(true);
                    }
                    if (d.patchesSucceeded != null) {
                        if ($util.Long)
                            (m.patchesSucceeded = $util.Long.fromValue(d.patchesSucceeded)).unsigned = true;
                        else if (typeof d.patchesSucceeded === "string")
                            m.patchesSucceeded = parseInt(d.patchesSucceeded, 10);
                        else if (typeof d.patchesSucceeded === "number")
                            m.patchesSucceeded = d.patchesSucceeded;
                        else if (typeof d.patchesSucceeded === "object")
                            m.patchesSucceeded = new $util.LongBits(d.patchesSucceeded.low >>> 0, d.patchesSucceeded.high >>> 0).toNumber(true);
                    }
                    if (d.patchesFailed != null) {
                        if ($util.Long)
                            (m.patchesFailed = $util.Long.fromValue(d.patchesFailed)).unsigned = true;
                        else if (typeof d.patchesFailed === "string")
                            m.patchesFailed = parseInt(d.patchesFailed, 10);
                        else if (typeof d.patchesFailed === "number")
                            m.patchesFailed = d.patchesFailed;
                        else if (typeof d.patchesFailed === "object")
                            m.patchesFailed = new $util.LongBits(d.patchesFailed.low >>> 0, d.patchesFailed.high >>> 0).toNumber(true);
                    }
                    if (d.readaheadsSucceeded != null) {
                        if ($util.Long)
                            (m.readaheadsSucceeded = $util.Long.fromValue(d.readaheadsSucceeded)).unsigned = true;
                        else if (typeof d.readaheadsSucceeded === "string")
                            m.readaheadsSucceeded = parseInt(d.readaheadsSucceeded, 10);
                        else if (typeof d.readaheadsSucceeded === "number")
                            m.readaheadsSucceeded = d.readaheadsSucceeded;
                        else if (typeof d.readaheadsSucceeded === "object")
                            m.readaheadsSucceeded = new $util.LongBits(d.readaheadsSucceeded.low >>> 0, d.readaheadsSucceeded.high >>> 0).toNumber(true);
                    }
                    if (d.readaheadsFailed != null) {
                        if ($util.Long)
                            (m.readaheadsFailed = $util.Long.fromValue(d.readaheadsFailed)).unsigned = true;
                        else if (typeof d.readaheadsFailed === "string")
                            m.readaheadsFailed = parseInt(d.readaheadsFailed, 10);
                        else if (typeof d.readaheadsFailed === "number")
                            m.readaheadsFailed = d.readaheadsFailed;
                        else if (typeof d.readaheadsFailed === "object")
                            m.readaheadsFailed = new $util.LongBits(d.readaheadsFailed.low >>> 0, d.readaheadsFailed.high >>> 0).toNumber(true);
                    }
                    if (d.abiViolations != null) {
                        if ($util.Long)
                            (m.abiViolations = $util.Long.fromValue(d.abiViolations)).unsigned = true;
                        else if (typeof d.abiViolations === "string")
                            m.abiViolations = parseInt(d.abiViolations, 10);
                        else if (typeof d.abiViolations === "number")
                            m.abiViolations = d.abiViolations;
                        else if (typeof d.abiViolations === "object")
                            m.abiViolations = new $util.LongBits(d.abiViolations.low >>> 0, d.abiViolations.high >>> 0).toNumber(true);
                    }
                    if (d.traceWriterPacketLoss != null) {
                        if ($util.Long)
                            (m.traceWriterPacketLoss = $util.Long.fromValue(d.traceWriterPacketLoss)).unsigned = true;
                        else if (typeof d.traceWriterPacketLoss === "string")
                            m.traceWriterPacketLoss = parseInt(d.traceWriterPacketLoss, 10);
                        else if (typeof d.traceWriterPacketLoss === "number")
                            m.traceWriterPacketLoss = d.traceWriterPacketLoss;
                        else if (typeof d.traceWriterPacketLoss === "object")
                            m.traceWriterPacketLoss = new $util.LongBits(d.traceWriterPacketLoss.low >>> 0, d.traceWriterPacketLoss.high >>> 0).toNumber(true);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a BufferStats message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @static
                 * @param {perfetto.protos.TraceStats.BufferStats} m BufferStats
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                BufferStats.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.bytesWritten = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.bytesWritten = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.chunksWritten = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.chunksWritten = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.chunksOverwritten = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.chunksOverwritten = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.writeWrapCount = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.writeWrapCount = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.patchesSucceeded = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.patchesSucceeded = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.patchesFailed = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.patchesFailed = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.readaheadsSucceeded = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.readaheadsSucceeded = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.readaheadsFailed = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.readaheadsFailed = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.abiViolations = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.abiViolations = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.chunksRewritten = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.chunksRewritten = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.chunksCommittedOutOfOrder = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.chunksCommittedOutOfOrder = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.bufferSize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.bufferSize = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.bytesOverwritten = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.bytesOverwritten = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.bytesRead = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.bytesRead = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.paddingBytesWritten = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.paddingBytesWritten = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.paddingBytesCleared = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.paddingBytesCleared = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.chunksRead = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.chunksRead = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.chunksDiscarded = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.chunksDiscarded = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.traceWriterPacketLoss = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.traceWriterPacketLoss = o.longs === String ? "0" : 0;
                    }
                    if (m.bytesWritten != null && m.hasOwnProperty("bytesWritten")) {
                        if (typeof m.bytesWritten === "number")
                            d.bytesWritten = o.longs === String ? String(m.bytesWritten) : m.bytesWritten;
                        else
                            d.bytesWritten = o.longs === String ? $util.Long.prototype.toString.call(m.bytesWritten) : o.longs === Number ? new $util.LongBits(m.bytesWritten.low >>> 0, m.bytesWritten.high >>> 0).toNumber(true) : m.bytesWritten;
                    }
                    if (m.chunksWritten != null && m.hasOwnProperty("chunksWritten")) {
                        if (typeof m.chunksWritten === "number")
                            d.chunksWritten = o.longs === String ? String(m.chunksWritten) : m.chunksWritten;
                        else
                            d.chunksWritten = o.longs === String ? $util.Long.prototype.toString.call(m.chunksWritten) : o.longs === Number ? new $util.LongBits(m.chunksWritten.low >>> 0, m.chunksWritten.high >>> 0).toNumber(true) : m.chunksWritten;
                    }
                    if (m.chunksOverwritten != null && m.hasOwnProperty("chunksOverwritten")) {
                        if (typeof m.chunksOverwritten === "number")
                            d.chunksOverwritten = o.longs === String ? String(m.chunksOverwritten) : m.chunksOverwritten;
                        else
                            d.chunksOverwritten = o.longs === String ? $util.Long.prototype.toString.call(m.chunksOverwritten) : o.longs === Number ? new $util.LongBits(m.chunksOverwritten.low >>> 0, m.chunksOverwritten.high >>> 0).toNumber(true) : m.chunksOverwritten;
                    }
                    if (m.writeWrapCount != null && m.hasOwnProperty("writeWrapCount")) {
                        if (typeof m.writeWrapCount === "number")
                            d.writeWrapCount = o.longs === String ? String(m.writeWrapCount) : m.writeWrapCount;
                        else
                            d.writeWrapCount = o.longs === String ? $util.Long.prototype.toString.call(m.writeWrapCount) : o.longs === Number ? new $util.LongBits(m.writeWrapCount.low >>> 0, m.writeWrapCount.high >>> 0).toNumber(true) : m.writeWrapCount;
                    }
                    if (m.patchesSucceeded != null && m.hasOwnProperty("patchesSucceeded")) {
                        if (typeof m.patchesSucceeded === "number")
                            d.patchesSucceeded = o.longs === String ? String(m.patchesSucceeded) : m.patchesSucceeded;
                        else
                            d.patchesSucceeded = o.longs === String ? $util.Long.prototype.toString.call(m.patchesSucceeded) : o.longs === Number ? new $util.LongBits(m.patchesSucceeded.low >>> 0, m.patchesSucceeded.high >>> 0).toNumber(true) : m.patchesSucceeded;
                    }
                    if (m.patchesFailed != null && m.hasOwnProperty("patchesFailed")) {
                        if (typeof m.patchesFailed === "number")
                            d.patchesFailed = o.longs === String ? String(m.patchesFailed) : m.patchesFailed;
                        else
                            d.patchesFailed = o.longs === String ? $util.Long.prototype.toString.call(m.patchesFailed) : o.longs === Number ? new $util.LongBits(m.patchesFailed.low >>> 0, m.patchesFailed.high >>> 0).toNumber(true) : m.patchesFailed;
                    }
                    if (m.readaheadsSucceeded != null && m.hasOwnProperty("readaheadsSucceeded")) {
                        if (typeof m.readaheadsSucceeded === "number")
                            d.readaheadsSucceeded = o.longs === String ? String(m.readaheadsSucceeded) : m.readaheadsSucceeded;
                        else
                            d.readaheadsSucceeded = o.longs === String ? $util.Long.prototype.toString.call(m.readaheadsSucceeded) : o.longs === Number ? new $util.LongBits(m.readaheadsSucceeded.low >>> 0, m.readaheadsSucceeded.high >>> 0).toNumber(true) : m.readaheadsSucceeded;
                    }
                    if (m.readaheadsFailed != null && m.hasOwnProperty("readaheadsFailed")) {
                        if (typeof m.readaheadsFailed === "number")
                            d.readaheadsFailed = o.longs === String ? String(m.readaheadsFailed) : m.readaheadsFailed;
                        else
                            d.readaheadsFailed = o.longs === String ? $util.Long.prototype.toString.call(m.readaheadsFailed) : o.longs === Number ? new $util.LongBits(m.readaheadsFailed.low >>> 0, m.readaheadsFailed.high >>> 0).toNumber(true) : m.readaheadsFailed;
                    }
                    if (m.abiViolations != null && m.hasOwnProperty("abiViolations")) {
                        if (typeof m.abiViolations === "number")
                            d.abiViolations = o.longs === String ? String(m.abiViolations) : m.abiViolations;
                        else
                            d.abiViolations = o.longs === String ? $util.Long.prototype.toString.call(m.abiViolations) : o.longs === Number ? new $util.LongBits(m.abiViolations.low >>> 0, m.abiViolations.high >>> 0).toNumber(true) : m.abiViolations;
                    }
                    if (m.chunksRewritten != null && m.hasOwnProperty("chunksRewritten")) {
                        if (typeof m.chunksRewritten === "number")
                            d.chunksRewritten = o.longs === String ? String(m.chunksRewritten) : m.chunksRewritten;
                        else
                            d.chunksRewritten = o.longs === String ? $util.Long.prototype.toString.call(m.chunksRewritten) : o.longs === Number ? new $util.LongBits(m.chunksRewritten.low >>> 0, m.chunksRewritten.high >>> 0).toNumber(true) : m.chunksRewritten;
                    }
                    if (m.chunksCommittedOutOfOrder != null && m.hasOwnProperty("chunksCommittedOutOfOrder")) {
                        if (typeof m.chunksCommittedOutOfOrder === "number")
                            d.chunksCommittedOutOfOrder = o.longs === String ? String(m.chunksCommittedOutOfOrder) : m.chunksCommittedOutOfOrder;
                        else
                            d.chunksCommittedOutOfOrder = o.longs === String ? $util.Long.prototype.toString.call(m.chunksCommittedOutOfOrder) : o.longs === Number ? new $util.LongBits(m.chunksCommittedOutOfOrder.low >>> 0, m.chunksCommittedOutOfOrder.high >>> 0).toNumber(true) : m.chunksCommittedOutOfOrder;
                    }
                    if (m.bufferSize != null && m.hasOwnProperty("bufferSize")) {
                        if (typeof m.bufferSize === "number")
                            d.bufferSize = o.longs === String ? String(m.bufferSize) : m.bufferSize;
                        else
                            d.bufferSize = o.longs === String ? $util.Long.prototype.toString.call(m.bufferSize) : o.longs === Number ? new $util.LongBits(m.bufferSize.low >>> 0, m.bufferSize.high >>> 0).toNumber(true) : m.bufferSize;
                    }
                    if (m.bytesOverwritten != null && m.hasOwnProperty("bytesOverwritten")) {
                        if (typeof m.bytesOverwritten === "number")
                            d.bytesOverwritten = o.longs === String ? String(m.bytesOverwritten) : m.bytesOverwritten;
                        else
                            d.bytesOverwritten = o.longs === String ? $util.Long.prototype.toString.call(m.bytesOverwritten) : o.longs === Number ? new $util.LongBits(m.bytesOverwritten.low >>> 0, m.bytesOverwritten.high >>> 0).toNumber(true) : m.bytesOverwritten;
                    }
                    if (m.bytesRead != null && m.hasOwnProperty("bytesRead")) {
                        if (typeof m.bytesRead === "number")
                            d.bytesRead = o.longs === String ? String(m.bytesRead) : m.bytesRead;
                        else
                            d.bytesRead = o.longs === String ? $util.Long.prototype.toString.call(m.bytesRead) : o.longs === Number ? new $util.LongBits(m.bytesRead.low >>> 0, m.bytesRead.high >>> 0).toNumber(true) : m.bytesRead;
                    }
                    if (m.paddingBytesWritten != null && m.hasOwnProperty("paddingBytesWritten")) {
                        if (typeof m.paddingBytesWritten === "number")
                            d.paddingBytesWritten = o.longs === String ? String(m.paddingBytesWritten) : m.paddingBytesWritten;
                        else
                            d.paddingBytesWritten = o.longs === String ? $util.Long.prototype.toString.call(m.paddingBytesWritten) : o.longs === Number ? new $util.LongBits(m.paddingBytesWritten.low >>> 0, m.paddingBytesWritten.high >>> 0).toNumber(true) : m.paddingBytesWritten;
                    }
                    if (m.paddingBytesCleared != null && m.hasOwnProperty("paddingBytesCleared")) {
                        if (typeof m.paddingBytesCleared === "number")
                            d.paddingBytesCleared = o.longs === String ? String(m.paddingBytesCleared) : m.paddingBytesCleared;
                        else
                            d.paddingBytesCleared = o.longs === String ? $util.Long.prototype.toString.call(m.paddingBytesCleared) : o.longs === Number ? new $util.LongBits(m.paddingBytesCleared.low >>> 0, m.paddingBytesCleared.high >>> 0).toNumber(true) : m.paddingBytesCleared;
                    }
                    if (m.chunksRead != null && m.hasOwnProperty("chunksRead")) {
                        if (typeof m.chunksRead === "number")
                            d.chunksRead = o.longs === String ? String(m.chunksRead) : m.chunksRead;
                        else
                            d.chunksRead = o.longs === String ? $util.Long.prototype.toString.call(m.chunksRead) : o.longs === Number ? new $util.LongBits(m.chunksRead.low >>> 0, m.chunksRead.high >>> 0).toNumber(true) : m.chunksRead;
                    }
                    if (m.chunksDiscarded != null && m.hasOwnProperty("chunksDiscarded")) {
                        if (typeof m.chunksDiscarded === "number")
                            d.chunksDiscarded = o.longs === String ? String(m.chunksDiscarded) : m.chunksDiscarded;
                        else
                            d.chunksDiscarded = o.longs === String ? $util.Long.prototype.toString.call(m.chunksDiscarded) : o.longs === Number ? new $util.LongBits(m.chunksDiscarded.low >>> 0, m.chunksDiscarded.high >>> 0).toNumber(true) : m.chunksDiscarded;
                    }
                    if (m.traceWriterPacketLoss != null && m.hasOwnProperty("traceWriterPacketLoss")) {
                        if (typeof m.traceWriterPacketLoss === "number")
                            d.traceWriterPacketLoss = o.longs === String ? String(m.traceWriterPacketLoss) : m.traceWriterPacketLoss;
                        else
                            d.traceWriterPacketLoss = o.longs === String ? $util.Long.prototype.toString.call(m.traceWriterPacketLoss) : o.longs === Number ? new $util.LongBits(m.traceWriterPacketLoss.low >>> 0, m.traceWriterPacketLoss.high >>> 0).toNumber(true) : m.traceWriterPacketLoss;
                    }
                    return d;
                };

                /**
                 * Converts this BufferStats to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.TraceStats.BufferStats
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                BufferStats.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return BufferStats;
            })();

            TraceStats.FilterStats = (function() {

                /**
                 * Properties of a FilterStats.
                 * @memberof perfetto.protos.TraceStats
                 * @interface IFilterStats
                 * @property {number|null} [inputPackets] FilterStats inputPackets
                 * @property {number|null} [inputBytes] FilterStats inputBytes
                 * @property {number|null} [outputBytes] FilterStats outputBytes
                 * @property {number|null} [errors] FilterStats errors
                 */

                /**
                 * Constructs a new FilterStats.
                 * @memberof perfetto.protos.TraceStats
                 * @classdesc Represents a FilterStats.
                 * @implements IFilterStats
                 * @constructor
                 * @param {perfetto.protos.TraceStats.IFilterStats=} [p] Properties to set
                 */
                function FilterStats(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * FilterStats inputPackets.
                 * @member {number} inputPackets
                 * @memberof perfetto.protos.TraceStats.FilterStats
                 * @instance
                 */
                FilterStats.prototype.inputPackets = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * FilterStats inputBytes.
                 * @member {number} inputBytes
                 * @memberof perfetto.protos.TraceStats.FilterStats
                 * @instance
                 */
                FilterStats.prototype.inputBytes = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * FilterStats outputBytes.
                 * @member {number} outputBytes
                 * @memberof perfetto.protos.TraceStats.FilterStats
                 * @instance
                 */
                FilterStats.prototype.outputBytes = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * FilterStats errors.
                 * @member {number} errors
                 * @memberof perfetto.protos.TraceStats.FilterStats
                 * @instance
                 */
                FilterStats.prototype.errors = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Creates a new FilterStats instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.TraceStats.FilterStats
                 * @static
                 * @param {perfetto.protos.TraceStats.IFilterStats=} [properties] Properties to set
                 * @returns {perfetto.protos.TraceStats.FilterStats} FilterStats instance
                 */
                FilterStats.create = function create(properties) {
                    return new FilterStats(properties);
                };

                /**
                 * Encodes the specified FilterStats message. Does not implicitly {@link perfetto.protos.TraceStats.FilterStats.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.TraceStats.FilterStats
                 * @static
                 * @param {perfetto.protos.TraceStats.IFilterStats} m FilterStats message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FilterStats.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.inputPackets != null && Object.hasOwnProperty.call(m, "inputPackets"))
                        w.uint32(8).uint64(m.inputPackets);
                    if (m.inputBytes != null && Object.hasOwnProperty.call(m, "inputBytes"))
                        w.uint32(16).uint64(m.inputBytes);
                    if (m.outputBytes != null && Object.hasOwnProperty.call(m, "outputBytes"))
                        w.uint32(24).uint64(m.outputBytes);
                    if (m.errors != null && Object.hasOwnProperty.call(m, "errors"))
                        w.uint32(32).uint64(m.errors);
                    return w;
                };

                /**
                 * Encodes the specified FilterStats message, length delimited. Does not implicitly {@link perfetto.protos.TraceStats.FilterStats.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.TraceStats.FilterStats
                 * @static
                 * @param {perfetto.protos.TraceStats.IFilterStats} message FilterStats message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FilterStats.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a FilterStats message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.TraceStats.FilterStats
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.TraceStats.FilterStats} FilterStats
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FilterStats.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TraceStats.FilterStats();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.inputPackets = r.uint64();
                            break;
                        case 2:
                            m.inputBytes = r.uint64();
                            break;
                        case 3:
                            m.outputBytes = r.uint64();
                            break;
                        case 4:
                            m.errors = r.uint64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a FilterStats message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.TraceStats.FilterStats
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.TraceStats.FilterStats} FilterStats
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FilterStats.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a FilterStats message.
                 * @function verify
                 * @memberof perfetto.protos.TraceStats.FilterStats
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                FilterStats.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.inputPackets != null && m.hasOwnProperty("inputPackets")) {
                        if (!$util.isInteger(m.inputPackets) && !(m.inputPackets && $util.isInteger(m.inputPackets.low) && $util.isInteger(m.inputPackets.high)))
                            return "inputPackets: integer|Long expected";
                    }
                    if (m.inputBytes != null && m.hasOwnProperty("inputBytes")) {
                        if (!$util.isInteger(m.inputBytes) && !(m.inputBytes && $util.isInteger(m.inputBytes.low) && $util.isInteger(m.inputBytes.high)))
                            return "inputBytes: integer|Long expected";
                    }
                    if (m.outputBytes != null && m.hasOwnProperty("outputBytes")) {
                        if (!$util.isInteger(m.outputBytes) && !(m.outputBytes && $util.isInteger(m.outputBytes.low) && $util.isInteger(m.outputBytes.high)))
                            return "outputBytes: integer|Long expected";
                    }
                    if (m.errors != null && m.hasOwnProperty("errors")) {
                        if (!$util.isInteger(m.errors) && !(m.errors && $util.isInteger(m.errors.low) && $util.isInteger(m.errors.high)))
                            return "errors: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a FilterStats message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.TraceStats.FilterStats
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.TraceStats.FilterStats} FilterStats
                 */
                FilterStats.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.TraceStats.FilterStats)
                        return d;
                    var m = new $root.perfetto.protos.TraceStats.FilterStats();
                    if (d.inputPackets != null) {
                        if ($util.Long)
                            (m.inputPackets = $util.Long.fromValue(d.inputPackets)).unsigned = true;
                        else if (typeof d.inputPackets === "string")
                            m.inputPackets = parseInt(d.inputPackets, 10);
                        else if (typeof d.inputPackets === "number")
                            m.inputPackets = d.inputPackets;
                        else if (typeof d.inputPackets === "object")
                            m.inputPackets = new $util.LongBits(d.inputPackets.low >>> 0, d.inputPackets.high >>> 0).toNumber(true);
                    }
                    if (d.inputBytes != null) {
                        if ($util.Long)
                            (m.inputBytes = $util.Long.fromValue(d.inputBytes)).unsigned = true;
                        else if (typeof d.inputBytes === "string")
                            m.inputBytes = parseInt(d.inputBytes, 10);
                        else if (typeof d.inputBytes === "number")
                            m.inputBytes = d.inputBytes;
                        else if (typeof d.inputBytes === "object")
                            m.inputBytes = new $util.LongBits(d.inputBytes.low >>> 0, d.inputBytes.high >>> 0).toNumber(true);
                    }
                    if (d.outputBytes != null) {
                        if ($util.Long)
                            (m.outputBytes = $util.Long.fromValue(d.outputBytes)).unsigned = true;
                        else if (typeof d.outputBytes === "string")
                            m.outputBytes = parseInt(d.outputBytes, 10);
                        else if (typeof d.outputBytes === "number")
                            m.outputBytes = d.outputBytes;
                        else if (typeof d.outputBytes === "object")
                            m.outputBytes = new $util.LongBits(d.outputBytes.low >>> 0, d.outputBytes.high >>> 0).toNumber(true);
                    }
                    if (d.errors != null) {
                        if ($util.Long)
                            (m.errors = $util.Long.fromValue(d.errors)).unsigned = true;
                        else if (typeof d.errors === "string")
                            m.errors = parseInt(d.errors, 10);
                        else if (typeof d.errors === "number")
                            m.errors = d.errors;
                        else if (typeof d.errors === "object")
                            m.errors = new $util.LongBits(d.errors.low >>> 0, d.errors.high >>> 0).toNumber(true);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a FilterStats message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.TraceStats.FilterStats
                 * @static
                 * @param {perfetto.protos.TraceStats.FilterStats} m FilterStats
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                FilterStats.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.inputPackets = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.inputPackets = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.inputBytes = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.inputBytes = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.outputBytes = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.outputBytes = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.errors = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.errors = o.longs === String ? "0" : 0;
                    }
                    if (m.inputPackets != null && m.hasOwnProperty("inputPackets")) {
                        if (typeof m.inputPackets === "number")
                            d.inputPackets = o.longs === String ? String(m.inputPackets) : m.inputPackets;
                        else
                            d.inputPackets = o.longs === String ? $util.Long.prototype.toString.call(m.inputPackets) : o.longs === Number ? new $util.LongBits(m.inputPackets.low >>> 0, m.inputPackets.high >>> 0).toNumber(true) : m.inputPackets;
                    }
                    if (m.inputBytes != null && m.hasOwnProperty("inputBytes")) {
                        if (typeof m.inputBytes === "number")
                            d.inputBytes = o.longs === String ? String(m.inputBytes) : m.inputBytes;
                        else
                            d.inputBytes = o.longs === String ? $util.Long.prototype.toString.call(m.inputBytes) : o.longs === Number ? new $util.LongBits(m.inputBytes.low >>> 0, m.inputBytes.high >>> 0).toNumber(true) : m.inputBytes;
                    }
                    if (m.outputBytes != null && m.hasOwnProperty("outputBytes")) {
                        if (typeof m.outputBytes === "number")
                            d.outputBytes = o.longs === String ? String(m.outputBytes) : m.outputBytes;
                        else
                            d.outputBytes = o.longs === String ? $util.Long.prototype.toString.call(m.outputBytes) : o.longs === Number ? new $util.LongBits(m.outputBytes.low >>> 0, m.outputBytes.high >>> 0).toNumber(true) : m.outputBytes;
                    }
                    if (m.errors != null && m.hasOwnProperty("errors")) {
                        if (typeof m.errors === "number")
                            d.errors = o.longs === String ? String(m.errors) : m.errors;
                        else
                            d.errors = o.longs === String ? $util.Long.prototype.toString.call(m.errors) : o.longs === Number ? new $util.LongBits(m.errors.low >>> 0, m.errors.high >>> 0).toNumber(true) : m.errors;
                    }
                    return d;
                };

                /**
                 * Converts this FilterStats to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.TraceStats.FilterStats
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                FilterStats.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return FilterStats;
            })();

            /**
             * FinalFlushOutcome enum.
             * @name perfetto.protos.TraceStats.FinalFlushOutcome
             * @enum {number}
             * @property {number} FINAL_FLUSH_UNSPECIFIED=0 FINAL_FLUSH_UNSPECIFIED value
             * @property {number} FINAL_FLUSH_SUCCEEDED=1 FINAL_FLUSH_SUCCEEDED value
             * @property {number} FINAL_FLUSH_FAILED=2 FINAL_FLUSH_FAILED value
             */
            TraceStats.FinalFlushOutcome = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "FINAL_FLUSH_UNSPECIFIED"] = 0;
                values[valuesById[1] = "FINAL_FLUSH_SUCCEEDED"] = 1;
                values[valuesById[2] = "FINAL_FLUSH_FAILED"] = 2;
                return values;
            })();

            return TraceStats;
        })();

        protos.TracingServiceCapabilities = (function() {

            /**
             * Properties of a TracingServiceCapabilities.
             * @memberof perfetto.protos
             * @interface ITracingServiceCapabilities
             * @property {boolean|null} [hasQueryCapabilities] TracingServiceCapabilities hasQueryCapabilities
             * @property {Array.<perfetto.protos.ObservableEvents.Type>|null} [observableEvents] TracingServiceCapabilities observableEvents
             * @property {boolean|null} [hasTraceConfigOutputPath] TracingServiceCapabilities hasTraceConfigOutputPath
             */

            /**
             * Constructs a new TracingServiceCapabilities.
             * @memberof perfetto.protos
             * @classdesc Represents a TracingServiceCapabilities.
             * @implements ITracingServiceCapabilities
             * @constructor
             * @param {perfetto.protos.ITracingServiceCapabilities=} [p] Properties to set
             */
            function TracingServiceCapabilities(p) {
                this.observableEvents = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TracingServiceCapabilities hasQueryCapabilities.
             * @member {boolean} hasQueryCapabilities
             * @memberof perfetto.protos.TracingServiceCapabilities
             * @instance
             */
            TracingServiceCapabilities.prototype.hasQueryCapabilities = false;

            /**
             * TracingServiceCapabilities observableEvents.
             * @member {Array.<perfetto.protos.ObservableEvents.Type>} observableEvents
             * @memberof perfetto.protos.TracingServiceCapabilities
             * @instance
             */
            TracingServiceCapabilities.prototype.observableEvents = $util.emptyArray;

            /**
             * TracingServiceCapabilities hasTraceConfigOutputPath.
             * @member {boolean} hasTraceConfigOutputPath
             * @memberof perfetto.protos.TracingServiceCapabilities
             * @instance
             */
            TracingServiceCapabilities.prototype.hasTraceConfigOutputPath = false;

            /**
             * Creates a new TracingServiceCapabilities instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TracingServiceCapabilities
             * @static
             * @param {perfetto.protos.ITracingServiceCapabilities=} [properties] Properties to set
             * @returns {perfetto.protos.TracingServiceCapabilities} TracingServiceCapabilities instance
             */
            TracingServiceCapabilities.create = function create(properties) {
                return new TracingServiceCapabilities(properties);
            };

            /**
             * Encodes the specified TracingServiceCapabilities message. Does not implicitly {@link perfetto.protos.TracingServiceCapabilities.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TracingServiceCapabilities
             * @static
             * @param {perfetto.protos.ITracingServiceCapabilities} m TracingServiceCapabilities message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TracingServiceCapabilities.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.hasQueryCapabilities != null && Object.hasOwnProperty.call(m, "hasQueryCapabilities"))
                    w.uint32(8).bool(m.hasQueryCapabilities);
                if (m.observableEvents != null && m.observableEvents.length) {
                    for (var i = 0; i < m.observableEvents.length; ++i)
                        w.uint32(16).int32(m.observableEvents[i]);
                }
                if (m.hasTraceConfigOutputPath != null && Object.hasOwnProperty.call(m, "hasTraceConfigOutputPath"))
                    w.uint32(24).bool(m.hasTraceConfigOutputPath);
                return w;
            };

            /**
             * Encodes the specified TracingServiceCapabilities message, length delimited. Does not implicitly {@link perfetto.protos.TracingServiceCapabilities.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TracingServiceCapabilities
             * @static
             * @param {perfetto.protos.ITracingServiceCapabilities} message TracingServiceCapabilities message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TracingServiceCapabilities.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TracingServiceCapabilities message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TracingServiceCapabilities
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TracingServiceCapabilities} TracingServiceCapabilities
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TracingServiceCapabilities.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TracingServiceCapabilities();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.hasQueryCapabilities = r.bool();
                        break;
                    case 2:
                        if (!(m.observableEvents && m.observableEvents.length))
                            m.observableEvents = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.observableEvents.push(r.int32());
                        } else
                            m.observableEvents.push(r.int32());
                        break;
                    case 3:
                        m.hasTraceConfigOutputPath = r.bool();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TracingServiceCapabilities message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TracingServiceCapabilities
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TracingServiceCapabilities} TracingServiceCapabilities
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TracingServiceCapabilities.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TracingServiceCapabilities message.
             * @function verify
             * @memberof perfetto.protos.TracingServiceCapabilities
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TracingServiceCapabilities.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.hasQueryCapabilities != null && m.hasOwnProperty("hasQueryCapabilities")) {
                    if (typeof m.hasQueryCapabilities !== "boolean")
                        return "hasQueryCapabilities: boolean expected";
                }
                if (m.observableEvents != null && m.hasOwnProperty("observableEvents")) {
                    if (!Array.isArray(m.observableEvents))
                        return "observableEvents: array expected";
                    for (var i = 0; i < m.observableEvents.length; ++i) {
                        switch (m.observableEvents[i]) {
                        default:
                            return "observableEvents: enum value[] expected";
                        case 0:
                        case 1:
                        case 2:
                            break;
                        }
                    }
                }
                if (m.hasTraceConfigOutputPath != null && m.hasOwnProperty("hasTraceConfigOutputPath")) {
                    if (typeof m.hasTraceConfigOutputPath !== "boolean")
                        return "hasTraceConfigOutputPath: boolean expected";
                }
                return null;
            };

            /**
             * Creates a TracingServiceCapabilities message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TracingServiceCapabilities
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TracingServiceCapabilities} TracingServiceCapabilities
             */
            TracingServiceCapabilities.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TracingServiceCapabilities)
                    return d;
                var m = new $root.perfetto.protos.TracingServiceCapabilities();
                if (d.hasQueryCapabilities != null) {
                    m.hasQueryCapabilities = Boolean(d.hasQueryCapabilities);
                }
                if (d.observableEvents) {
                    if (!Array.isArray(d.observableEvents))
                        throw TypeError(".perfetto.protos.TracingServiceCapabilities.observableEvents: array expected");
                    m.observableEvents = [];
                    for (var i = 0; i < d.observableEvents.length; ++i) {
                        switch (d.observableEvents[i]) {
                        default:
                        case "TYPE_UNSPECIFIED":
                        case 0:
                            m.observableEvents[i] = 0;
                            break;
                        case "TYPE_DATA_SOURCES_INSTANCES":
                        case 1:
                            m.observableEvents[i] = 1;
                            break;
                        case "TYPE_ALL_DATA_SOURCES_STARTED":
                        case 2:
                            m.observableEvents[i] = 2;
                            break;
                        }
                    }
                }
                if (d.hasTraceConfigOutputPath != null) {
                    m.hasTraceConfigOutputPath = Boolean(d.hasTraceConfigOutputPath);
                }
                return m;
            };

            /**
             * Creates a plain object from a TracingServiceCapabilities message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TracingServiceCapabilities
             * @static
             * @param {perfetto.protos.TracingServiceCapabilities} m TracingServiceCapabilities
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TracingServiceCapabilities.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.observableEvents = [];
                }
                if (o.defaults) {
                    d.hasQueryCapabilities = false;
                    d.hasTraceConfigOutputPath = false;
                }
                if (m.hasQueryCapabilities != null && m.hasOwnProperty("hasQueryCapabilities")) {
                    d.hasQueryCapabilities = m.hasQueryCapabilities;
                }
                if (m.observableEvents && m.observableEvents.length) {
                    d.observableEvents = [];
                    for (var j = 0; j < m.observableEvents.length; ++j) {
                        d.observableEvents[j] = o.enums === String ? $root.perfetto.protos.ObservableEvents.Type[m.observableEvents[j]] : m.observableEvents[j];
                    }
                }
                if (m.hasTraceConfigOutputPath != null && m.hasOwnProperty("hasTraceConfigOutputPath")) {
                    d.hasTraceConfigOutputPath = m.hasTraceConfigOutputPath;
                }
                return d;
            };

            /**
             * Converts this TracingServiceCapabilities to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TracingServiceCapabilities
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TracingServiceCapabilities.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TracingServiceCapabilities;
        })();

        protos.ObservableEvents = (function() {

            /**
             * Properties of an ObservableEvents.
             * @memberof perfetto.protos
             * @interface IObservableEvents
             * @property {Array.<perfetto.protos.ObservableEvents.IDataSourceInstanceStateChange>|null} [instanceStateChanges] ObservableEvents instanceStateChanges
             * @property {boolean|null} [allDataSourcesStarted] ObservableEvents allDataSourcesStarted
             */

            /**
             * Constructs a new ObservableEvents.
             * @memberof perfetto.protos
             * @classdesc Represents an ObservableEvents.
             * @implements IObservableEvents
             * @constructor
             * @param {perfetto.protos.IObservableEvents=} [p] Properties to set
             */
            function ObservableEvents(p) {
                this.instanceStateChanges = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ObservableEvents instanceStateChanges.
             * @member {Array.<perfetto.protos.ObservableEvents.IDataSourceInstanceStateChange>} instanceStateChanges
             * @memberof perfetto.protos.ObservableEvents
             * @instance
             */
            ObservableEvents.prototype.instanceStateChanges = $util.emptyArray;

            /**
             * ObservableEvents allDataSourcesStarted.
             * @member {boolean} allDataSourcesStarted
             * @memberof perfetto.protos.ObservableEvents
             * @instance
             */
            ObservableEvents.prototype.allDataSourcesStarted = false;

            /**
             * Creates a new ObservableEvents instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ObservableEvents
             * @static
             * @param {perfetto.protos.IObservableEvents=} [properties] Properties to set
             * @returns {perfetto.protos.ObservableEvents} ObservableEvents instance
             */
            ObservableEvents.create = function create(properties) {
                return new ObservableEvents(properties);
            };

            /**
             * Encodes the specified ObservableEvents message. Does not implicitly {@link perfetto.protos.ObservableEvents.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ObservableEvents
             * @static
             * @param {perfetto.protos.IObservableEvents} m ObservableEvents message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ObservableEvents.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.instanceStateChanges != null && m.instanceStateChanges.length) {
                    for (var i = 0; i < m.instanceStateChanges.length; ++i)
                        $root.perfetto.protos.ObservableEvents.DataSourceInstanceStateChange.encode(m.instanceStateChanges[i], w.uint32(10).fork()).ldelim();
                }
                if (m.allDataSourcesStarted != null && Object.hasOwnProperty.call(m, "allDataSourcesStarted"))
                    w.uint32(16).bool(m.allDataSourcesStarted);
                return w;
            };

            /**
             * Encodes the specified ObservableEvents message, length delimited. Does not implicitly {@link perfetto.protos.ObservableEvents.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ObservableEvents
             * @static
             * @param {perfetto.protos.IObservableEvents} message ObservableEvents message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ObservableEvents.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an ObservableEvents message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ObservableEvents
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ObservableEvents} ObservableEvents
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ObservableEvents.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ObservableEvents();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.instanceStateChanges && m.instanceStateChanges.length))
                            m.instanceStateChanges = [];
                        m.instanceStateChanges.push($root.perfetto.protos.ObservableEvents.DataSourceInstanceStateChange.decode(r, r.uint32()));
                        break;
                    case 2:
                        m.allDataSourcesStarted = r.bool();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an ObservableEvents message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ObservableEvents
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ObservableEvents} ObservableEvents
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ObservableEvents.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an ObservableEvents message.
             * @function verify
             * @memberof perfetto.protos.ObservableEvents
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ObservableEvents.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.instanceStateChanges != null && m.hasOwnProperty("instanceStateChanges")) {
                    if (!Array.isArray(m.instanceStateChanges))
                        return "instanceStateChanges: array expected";
                    for (var i = 0; i < m.instanceStateChanges.length; ++i) {
                        {
                            var e = $root.perfetto.protos.ObservableEvents.DataSourceInstanceStateChange.verify(m.instanceStateChanges[i]);
                            if (e)
                                return "instanceStateChanges." + e;
                        }
                    }
                }
                if (m.allDataSourcesStarted != null && m.hasOwnProperty("allDataSourcesStarted")) {
                    if (typeof m.allDataSourcesStarted !== "boolean")
                        return "allDataSourcesStarted: boolean expected";
                }
                return null;
            };

            /**
             * Creates an ObservableEvents message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ObservableEvents
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ObservableEvents} ObservableEvents
             */
            ObservableEvents.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ObservableEvents)
                    return d;
                var m = new $root.perfetto.protos.ObservableEvents();
                if (d.instanceStateChanges) {
                    if (!Array.isArray(d.instanceStateChanges))
                        throw TypeError(".perfetto.protos.ObservableEvents.instanceStateChanges: array expected");
                    m.instanceStateChanges = [];
                    for (var i = 0; i < d.instanceStateChanges.length; ++i) {
                        if (typeof d.instanceStateChanges[i] !== "object")
                            throw TypeError(".perfetto.protos.ObservableEvents.instanceStateChanges: object expected");
                        m.instanceStateChanges[i] = $root.perfetto.protos.ObservableEvents.DataSourceInstanceStateChange.fromObject(d.instanceStateChanges[i]);
                    }
                }
                if (d.allDataSourcesStarted != null) {
                    m.allDataSourcesStarted = Boolean(d.allDataSourcesStarted);
                }
                return m;
            };

            /**
             * Creates a plain object from an ObservableEvents message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ObservableEvents
             * @static
             * @param {perfetto.protos.ObservableEvents} m ObservableEvents
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ObservableEvents.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.instanceStateChanges = [];
                }
                if (o.defaults) {
                    d.allDataSourcesStarted = false;
                }
                if (m.instanceStateChanges && m.instanceStateChanges.length) {
                    d.instanceStateChanges = [];
                    for (var j = 0; j < m.instanceStateChanges.length; ++j) {
                        d.instanceStateChanges[j] = $root.perfetto.protos.ObservableEvents.DataSourceInstanceStateChange.toObject(m.instanceStateChanges[j], o);
                    }
                }
                if (m.allDataSourcesStarted != null && m.hasOwnProperty("allDataSourcesStarted")) {
                    d.allDataSourcesStarted = m.allDataSourcesStarted;
                }
                return d;
            };

            /**
             * Converts this ObservableEvents to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ObservableEvents
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ObservableEvents.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * Type enum.
             * @name perfetto.protos.ObservableEvents.Type
             * @enum {number}
             * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value
             * @property {number} TYPE_DATA_SOURCES_INSTANCES=1 TYPE_DATA_SOURCES_INSTANCES value
             * @property {number} TYPE_ALL_DATA_SOURCES_STARTED=2 TYPE_ALL_DATA_SOURCES_STARTED value
             */
            ObservableEvents.Type = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0;
                values[valuesById[1] = "TYPE_DATA_SOURCES_INSTANCES"] = 1;
                values[valuesById[2] = "TYPE_ALL_DATA_SOURCES_STARTED"] = 2;
                return values;
            })();

            /**
             * DataSourceInstanceState enum.
             * @name perfetto.protos.ObservableEvents.DataSourceInstanceState
             * @enum {number}
             * @property {number} DATA_SOURCE_INSTANCE_STATE_STOPPED=1 DATA_SOURCE_INSTANCE_STATE_STOPPED value
             * @property {number} DATA_SOURCE_INSTANCE_STATE_STARTED=2 DATA_SOURCE_INSTANCE_STATE_STARTED value
             */
            ObservableEvents.DataSourceInstanceState = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[1] = "DATA_SOURCE_INSTANCE_STATE_STOPPED"] = 1;
                values[valuesById[2] = "DATA_SOURCE_INSTANCE_STATE_STARTED"] = 2;
                return values;
            })();

            ObservableEvents.DataSourceInstanceStateChange = (function() {

                /**
                 * Properties of a DataSourceInstanceStateChange.
                 * @memberof perfetto.protos.ObservableEvents
                 * @interface IDataSourceInstanceStateChange
                 * @property {string|null} [producerName] DataSourceInstanceStateChange producerName
                 * @property {string|null} [dataSourceName] DataSourceInstanceStateChange dataSourceName
                 * @property {perfetto.protos.ObservableEvents.DataSourceInstanceState|null} [state] DataSourceInstanceStateChange state
                 */

                /**
                 * Constructs a new DataSourceInstanceStateChange.
                 * @memberof perfetto.protos.ObservableEvents
                 * @classdesc Represents a DataSourceInstanceStateChange.
                 * @implements IDataSourceInstanceStateChange
                 * @constructor
                 * @param {perfetto.protos.ObservableEvents.IDataSourceInstanceStateChange=} [p] Properties to set
                 */
                function DataSourceInstanceStateChange(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * DataSourceInstanceStateChange producerName.
                 * @member {string} producerName
                 * @memberof perfetto.protos.ObservableEvents.DataSourceInstanceStateChange
                 * @instance
                 */
                DataSourceInstanceStateChange.prototype.producerName = "";

                /**
                 * DataSourceInstanceStateChange dataSourceName.
                 * @member {string} dataSourceName
                 * @memberof perfetto.protos.ObservableEvents.DataSourceInstanceStateChange
                 * @instance
                 */
                DataSourceInstanceStateChange.prototype.dataSourceName = "";

                /**
                 * DataSourceInstanceStateChange state.
                 * @member {perfetto.protos.ObservableEvents.DataSourceInstanceState} state
                 * @memberof perfetto.protos.ObservableEvents.DataSourceInstanceStateChange
                 * @instance
                 */
                DataSourceInstanceStateChange.prototype.state = 1;

                /**
                 * Creates a new DataSourceInstanceStateChange instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.ObservableEvents.DataSourceInstanceStateChange
                 * @static
                 * @param {perfetto.protos.ObservableEvents.IDataSourceInstanceStateChange=} [properties] Properties to set
                 * @returns {perfetto.protos.ObservableEvents.DataSourceInstanceStateChange} DataSourceInstanceStateChange instance
                 */
                DataSourceInstanceStateChange.create = function create(properties) {
                    return new DataSourceInstanceStateChange(properties);
                };

                /**
                 * Encodes the specified DataSourceInstanceStateChange message. Does not implicitly {@link perfetto.protos.ObservableEvents.DataSourceInstanceStateChange.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.ObservableEvents.DataSourceInstanceStateChange
                 * @static
                 * @param {perfetto.protos.ObservableEvents.IDataSourceInstanceStateChange} m DataSourceInstanceStateChange message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                DataSourceInstanceStateChange.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.producerName != null && Object.hasOwnProperty.call(m, "producerName"))
                        w.uint32(10).string(m.producerName);
                    if (m.dataSourceName != null && Object.hasOwnProperty.call(m, "dataSourceName"))
                        w.uint32(18).string(m.dataSourceName);
                    if (m.state != null && Object.hasOwnProperty.call(m, "state"))
                        w.uint32(24).int32(m.state);
                    return w;
                };

                /**
                 * Encodes the specified DataSourceInstanceStateChange message, length delimited. Does not implicitly {@link perfetto.protos.ObservableEvents.DataSourceInstanceStateChange.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.ObservableEvents.DataSourceInstanceStateChange
                 * @static
                 * @param {perfetto.protos.ObservableEvents.IDataSourceInstanceStateChange} message DataSourceInstanceStateChange message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                DataSourceInstanceStateChange.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a DataSourceInstanceStateChange message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.ObservableEvents.DataSourceInstanceStateChange
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.ObservableEvents.DataSourceInstanceStateChange} DataSourceInstanceStateChange
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                DataSourceInstanceStateChange.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ObservableEvents.DataSourceInstanceStateChange();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.producerName = r.string();
                            break;
                        case 2:
                            m.dataSourceName = r.string();
                            break;
                        case 3:
                            m.state = r.int32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a DataSourceInstanceStateChange message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.ObservableEvents.DataSourceInstanceStateChange
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.ObservableEvents.DataSourceInstanceStateChange} DataSourceInstanceStateChange
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                DataSourceInstanceStateChange.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a DataSourceInstanceStateChange message.
                 * @function verify
                 * @memberof perfetto.protos.ObservableEvents.DataSourceInstanceStateChange
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                DataSourceInstanceStateChange.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.producerName != null && m.hasOwnProperty("producerName")) {
                        if (!$util.isString(m.producerName))
                            return "producerName: string expected";
                    }
                    if (m.dataSourceName != null && m.hasOwnProperty("dataSourceName")) {
                        if (!$util.isString(m.dataSourceName))
                            return "dataSourceName: string expected";
                    }
                    if (m.state != null && m.hasOwnProperty("state")) {
                        switch (m.state) {
                        default:
                            return "state: enum value expected";
                        case 1:
                        case 2:
                            break;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a DataSourceInstanceStateChange message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.ObservableEvents.DataSourceInstanceStateChange
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.ObservableEvents.DataSourceInstanceStateChange} DataSourceInstanceStateChange
                 */
                DataSourceInstanceStateChange.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.ObservableEvents.DataSourceInstanceStateChange)
                        return d;
                    var m = new $root.perfetto.protos.ObservableEvents.DataSourceInstanceStateChange();
                    if (d.producerName != null) {
                        m.producerName = String(d.producerName);
                    }
                    if (d.dataSourceName != null) {
                        m.dataSourceName = String(d.dataSourceName);
                    }
                    switch (d.state) {
                    case "DATA_SOURCE_INSTANCE_STATE_STOPPED":
                    case 1:
                        m.state = 1;
                        break;
                    case "DATA_SOURCE_INSTANCE_STATE_STARTED":
                    case 2:
                        m.state = 2;
                        break;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a DataSourceInstanceStateChange message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.ObservableEvents.DataSourceInstanceStateChange
                 * @static
                 * @param {perfetto.protos.ObservableEvents.DataSourceInstanceStateChange} m DataSourceInstanceStateChange
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                DataSourceInstanceStateChange.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.producerName = "";
                        d.dataSourceName = "";
                        d.state = o.enums === String ? "DATA_SOURCE_INSTANCE_STATE_STOPPED" : 1;
                    }
                    if (m.producerName != null && m.hasOwnProperty("producerName")) {
                        d.producerName = m.producerName;
                    }
                    if (m.dataSourceName != null && m.hasOwnProperty("dataSourceName")) {
                        d.dataSourceName = m.dataSourceName;
                    }
                    if (m.state != null && m.hasOwnProperty("state")) {
                        d.state = o.enums === String ? $root.perfetto.protos.ObservableEvents.DataSourceInstanceState[m.state] : m.state;
                    }
                    return d;
                };

                /**
                 * Converts this DataSourceInstanceStateChange to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.ObservableEvents.DataSourceInstanceStateChange
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                DataSourceInstanceStateChange.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return DataSourceInstanceStateChange;
            })();

            return ObservableEvents;
        })();

        protos.FtraceDescriptor = (function() {

            /**
             * Properties of a FtraceDescriptor.
             * @memberof perfetto.protos
             * @interface IFtraceDescriptor
             * @property {Array.<perfetto.protos.FtraceDescriptor.IAtraceCategory>|null} [atraceCategories] FtraceDescriptor atraceCategories
             */

            /**
             * Constructs a new FtraceDescriptor.
             * @memberof perfetto.protos
             * @classdesc Represents a FtraceDescriptor.
             * @implements IFtraceDescriptor
             * @constructor
             * @param {perfetto.protos.IFtraceDescriptor=} [p] Properties to set
             */
            function FtraceDescriptor(p) {
                this.atraceCategories = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * FtraceDescriptor atraceCategories.
             * @member {Array.<perfetto.protos.FtraceDescriptor.IAtraceCategory>} atraceCategories
             * @memberof perfetto.protos.FtraceDescriptor
             * @instance
             */
            FtraceDescriptor.prototype.atraceCategories = $util.emptyArray;

            /**
             * Creates a new FtraceDescriptor instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.FtraceDescriptor
             * @static
             * @param {perfetto.protos.IFtraceDescriptor=} [properties] Properties to set
             * @returns {perfetto.protos.FtraceDescriptor} FtraceDescriptor instance
             */
            FtraceDescriptor.create = function create(properties) {
                return new FtraceDescriptor(properties);
            };

            /**
             * Encodes the specified FtraceDescriptor message. Does not implicitly {@link perfetto.protos.FtraceDescriptor.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.FtraceDescriptor
             * @static
             * @param {perfetto.protos.IFtraceDescriptor} m FtraceDescriptor message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FtraceDescriptor.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.atraceCategories != null && m.atraceCategories.length) {
                    for (var i = 0; i < m.atraceCategories.length; ++i)
                        $root.perfetto.protos.FtraceDescriptor.AtraceCategory.encode(m.atraceCategories[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified FtraceDescriptor message, length delimited. Does not implicitly {@link perfetto.protos.FtraceDescriptor.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.FtraceDescriptor
             * @static
             * @param {perfetto.protos.IFtraceDescriptor} message FtraceDescriptor message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FtraceDescriptor.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a FtraceDescriptor message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.FtraceDescriptor
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.FtraceDescriptor} FtraceDescriptor
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FtraceDescriptor.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FtraceDescriptor();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.atraceCategories && m.atraceCategories.length))
                            m.atraceCategories = [];
                        m.atraceCategories.push($root.perfetto.protos.FtraceDescriptor.AtraceCategory.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a FtraceDescriptor message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.FtraceDescriptor
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.FtraceDescriptor} FtraceDescriptor
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FtraceDescriptor.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a FtraceDescriptor message.
             * @function verify
             * @memberof perfetto.protos.FtraceDescriptor
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            FtraceDescriptor.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.atraceCategories != null && m.hasOwnProperty("atraceCategories")) {
                    if (!Array.isArray(m.atraceCategories))
                        return "atraceCategories: array expected";
                    for (var i = 0; i < m.atraceCategories.length; ++i) {
                        {
                            var e = $root.perfetto.protos.FtraceDescriptor.AtraceCategory.verify(m.atraceCategories[i]);
                            if (e)
                                return "atraceCategories." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a FtraceDescriptor message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.FtraceDescriptor
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.FtraceDescriptor} FtraceDescriptor
             */
            FtraceDescriptor.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.FtraceDescriptor)
                    return d;
                var m = new $root.perfetto.protos.FtraceDescriptor();
                if (d.atraceCategories) {
                    if (!Array.isArray(d.atraceCategories))
                        throw TypeError(".perfetto.protos.FtraceDescriptor.atraceCategories: array expected");
                    m.atraceCategories = [];
                    for (var i = 0; i < d.atraceCategories.length; ++i) {
                        if (typeof d.atraceCategories[i] !== "object")
                            throw TypeError(".perfetto.protos.FtraceDescriptor.atraceCategories: object expected");
                        m.atraceCategories[i] = $root.perfetto.protos.FtraceDescriptor.AtraceCategory.fromObject(d.atraceCategories[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a FtraceDescriptor message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.FtraceDescriptor
             * @static
             * @param {perfetto.protos.FtraceDescriptor} m FtraceDescriptor
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            FtraceDescriptor.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.atraceCategories = [];
                }
                if (m.atraceCategories && m.atraceCategories.length) {
                    d.atraceCategories = [];
                    for (var j = 0; j < m.atraceCategories.length; ++j) {
                        d.atraceCategories[j] = $root.perfetto.protos.FtraceDescriptor.AtraceCategory.toObject(m.atraceCategories[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this FtraceDescriptor to JSON.
             * @function toJSON
             * @memberof perfetto.protos.FtraceDescriptor
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            FtraceDescriptor.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            FtraceDescriptor.AtraceCategory = (function() {

                /**
                 * Properties of an AtraceCategory.
                 * @memberof perfetto.protos.FtraceDescriptor
                 * @interface IAtraceCategory
                 * @property {string|null} [name] AtraceCategory name
                 * @property {string|null} [description] AtraceCategory description
                 */

                /**
                 * Constructs a new AtraceCategory.
                 * @memberof perfetto.protos.FtraceDescriptor
                 * @classdesc Represents an AtraceCategory.
                 * @implements IAtraceCategory
                 * @constructor
                 * @param {perfetto.protos.FtraceDescriptor.IAtraceCategory=} [p] Properties to set
                 */
                function AtraceCategory(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * AtraceCategory name.
                 * @member {string} name
                 * @memberof perfetto.protos.FtraceDescriptor.AtraceCategory
                 * @instance
                 */
                AtraceCategory.prototype.name = "";

                /**
                 * AtraceCategory description.
                 * @member {string} description
                 * @memberof perfetto.protos.FtraceDescriptor.AtraceCategory
                 * @instance
                 */
                AtraceCategory.prototype.description = "";

                /**
                 * Creates a new AtraceCategory instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.FtraceDescriptor.AtraceCategory
                 * @static
                 * @param {perfetto.protos.FtraceDescriptor.IAtraceCategory=} [properties] Properties to set
                 * @returns {perfetto.protos.FtraceDescriptor.AtraceCategory} AtraceCategory instance
                 */
                AtraceCategory.create = function create(properties) {
                    return new AtraceCategory(properties);
                };

                /**
                 * Encodes the specified AtraceCategory message. Does not implicitly {@link perfetto.protos.FtraceDescriptor.AtraceCategory.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.FtraceDescriptor.AtraceCategory
                 * @static
                 * @param {perfetto.protos.FtraceDescriptor.IAtraceCategory} m AtraceCategory message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                AtraceCategory.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(10).string(m.name);
                    if (m.description != null && Object.hasOwnProperty.call(m, "description"))
                        w.uint32(18).string(m.description);
                    return w;
                };

                /**
                 * Encodes the specified AtraceCategory message, length delimited. Does not implicitly {@link perfetto.protos.FtraceDescriptor.AtraceCategory.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.FtraceDescriptor.AtraceCategory
                 * @static
                 * @param {perfetto.protos.FtraceDescriptor.IAtraceCategory} message AtraceCategory message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                AtraceCategory.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an AtraceCategory message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.FtraceDescriptor.AtraceCategory
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.FtraceDescriptor.AtraceCategory} AtraceCategory
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                AtraceCategory.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FtraceDescriptor.AtraceCategory();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.name = r.string();
                            break;
                        case 2:
                            m.description = r.string();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an AtraceCategory message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.FtraceDescriptor.AtraceCategory
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.FtraceDescriptor.AtraceCategory} AtraceCategory
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                AtraceCategory.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an AtraceCategory message.
                 * @function verify
                 * @memberof perfetto.protos.FtraceDescriptor.AtraceCategory
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                AtraceCategory.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    if (m.description != null && m.hasOwnProperty("description")) {
                        if (!$util.isString(m.description))
                            return "description: string expected";
                    }
                    return null;
                };

                /**
                 * Creates an AtraceCategory message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.FtraceDescriptor.AtraceCategory
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.FtraceDescriptor.AtraceCategory} AtraceCategory
                 */
                AtraceCategory.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.FtraceDescriptor.AtraceCategory)
                        return d;
                    var m = new $root.perfetto.protos.FtraceDescriptor.AtraceCategory();
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    if (d.description != null) {
                        m.description = String(d.description);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an AtraceCategory message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.FtraceDescriptor.AtraceCategory
                 * @static
                 * @param {perfetto.protos.FtraceDescriptor.AtraceCategory} m AtraceCategory
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                AtraceCategory.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.name = "";
                        d.description = "";
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    if (m.description != null && m.hasOwnProperty("description")) {
                        d.description = m.description;
                    }
                    return d;
                };

                /**
                 * Converts this AtraceCategory to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.FtraceDescriptor.AtraceCategory
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                AtraceCategory.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return AtraceCategory;
            })();

            return FtraceDescriptor;
        })();

        protos.GpuCounterDescriptor = (function() {

            /**
             * Properties of a GpuCounterDescriptor.
             * @memberof perfetto.protos
             * @interface IGpuCounterDescriptor
             * @property {Array.<perfetto.protos.GpuCounterDescriptor.IGpuCounterSpec>|null} [specs] GpuCounterDescriptor specs
             * @property {Array.<perfetto.protos.GpuCounterDescriptor.IGpuCounterBlock>|null} [blocks] GpuCounterDescriptor blocks
             * @property {number|null} [minSamplingPeriodNs] GpuCounterDescriptor minSamplingPeriodNs
             * @property {number|null} [maxSamplingPeriodNs] GpuCounterDescriptor maxSamplingPeriodNs
             * @property {boolean|null} [supportsInstrumentedSampling] GpuCounterDescriptor supportsInstrumentedSampling
             */

            /**
             * Constructs a new GpuCounterDescriptor.
             * @memberof perfetto.protos
             * @classdesc Represents a GpuCounterDescriptor.
             * @implements IGpuCounterDescriptor
             * @constructor
             * @param {perfetto.protos.IGpuCounterDescriptor=} [p] Properties to set
             */
            function GpuCounterDescriptor(p) {
                this.specs = [];
                this.blocks = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * GpuCounterDescriptor specs.
             * @member {Array.<perfetto.protos.GpuCounterDescriptor.IGpuCounterSpec>} specs
             * @memberof perfetto.protos.GpuCounterDescriptor
             * @instance
             */
            GpuCounterDescriptor.prototype.specs = $util.emptyArray;

            /**
             * GpuCounterDescriptor blocks.
             * @member {Array.<perfetto.protos.GpuCounterDescriptor.IGpuCounterBlock>} blocks
             * @memberof perfetto.protos.GpuCounterDescriptor
             * @instance
             */
            GpuCounterDescriptor.prototype.blocks = $util.emptyArray;

            /**
             * GpuCounterDescriptor minSamplingPeriodNs.
             * @member {number} minSamplingPeriodNs
             * @memberof perfetto.protos.GpuCounterDescriptor
             * @instance
             */
            GpuCounterDescriptor.prototype.minSamplingPeriodNs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * GpuCounterDescriptor maxSamplingPeriodNs.
             * @member {number} maxSamplingPeriodNs
             * @memberof perfetto.protos.GpuCounterDescriptor
             * @instance
             */
            GpuCounterDescriptor.prototype.maxSamplingPeriodNs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * GpuCounterDescriptor supportsInstrumentedSampling.
             * @member {boolean} supportsInstrumentedSampling
             * @memberof perfetto.protos.GpuCounterDescriptor
             * @instance
             */
            GpuCounterDescriptor.prototype.supportsInstrumentedSampling = false;

            /**
             * Creates a new GpuCounterDescriptor instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.GpuCounterDescriptor
             * @static
             * @param {perfetto.protos.IGpuCounterDescriptor=} [properties] Properties to set
             * @returns {perfetto.protos.GpuCounterDescriptor} GpuCounterDescriptor instance
             */
            GpuCounterDescriptor.create = function create(properties) {
                return new GpuCounterDescriptor(properties);
            };

            /**
             * Encodes the specified GpuCounterDescriptor message. Does not implicitly {@link perfetto.protos.GpuCounterDescriptor.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.GpuCounterDescriptor
             * @static
             * @param {perfetto.protos.IGpuCounterDescriptor} m GpuCounterDescriptor message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GpuCounterDescriptor.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.specs != null && m.specs.length) {
                    for (var i = 0; i < m.specs.length; ++i)
                        $root.perfetto.protos.GpuCounterDescriptor.GpuCounterSpec.encode(m.specs[i], w.uint32(10).fork()).ldelim();
                }
                if (m.blocks != null && m.blocks.length) {
                    for (var i = 0; i < m.blocks.length; ++i)
                        $root.perfetto.protos.GpuCounterDescriptor.GpuCounterBlock.encode(m.blocks[i], w.uint32(18).fork()).ldelim();
                }
                if (m.minSamplingPeriodNs != null && Object.hasOwnProperty.call(m, "minSamplingPeriodNs"))
                    w.uint32(24).uint64(m.minSamplingPeriodNs);
                if (m.maxSamplingPeriodNs != null && Object.hasOwnProperty.call(m, "maxSamplingPeriodNs"))
                    w.uint32(32).uint64(m.maxSamplingPeriodNs);
                if (m.supportsInstrumentedSampling != null && Object.hasOwnProperty.call(m, "supportsInstrumentedSampling"))
                    w.uint32(40).bool(m.supportsInstrumentedSampling);
                return w;
            };

            /**
             * Encodes the specified GpuCounterDescriptor message, length delimited. Does not implicitly {@link perfetto.protos.GpuCounterDescriptor.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.GpuCounterDescriptor
             * @static
             * @param {perfetto.protos.IGpuCounterDescriptor} message GpuCounterDescriptor message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GpuCounterDescriptor.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a GpuCounterDescriptor message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.GpuCounterDescriptor
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.GpuCounterDescriptor} GpuCounterDescriptor
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GpuCounterDescriptor.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.GpuCounterDescriptor();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.specs && m.specs.length))
                            m.specs = [];
                        m.specs.push($root.perfetto.protos.GpuCounterDescriptor.GpuCounterSpec.decode(r, r.uint32()));
                        break;
                    case 2:
                        if (!(m.blocks && m.blocks.length))
                            m.blocks = [];
                        m.blocks.push($root.perfetto.protos.GpuCounterDescriptor.GpuCounterBlock.decode(r, r.uint32()));
                        break;
                    case 3:
                        m.minSamplingPeriodNs = r.uint64();
                        break;
                    case 4:
                        m.maxSamplingPeriodNs = r.uint64();
                        break;
                    case 5:
                        m.supportsInstrumentedSampling = r.bool();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a GpuCounterDescriptor message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.GpuCounterDescriptor
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.GpuCounterDescriptor} GpuCounterDescriptor
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GpuCounterDescriptor.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a GpuCounterDescriptor message.
             * @function verify
             * @memberof perfetto.protos.GpuCounterDescriptor
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            GpuCounterDescriptor.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.specs != null && m.hasOwnProperty("specs")) {
                    if (!Array.isArray(m.specs))
                        return "specs: array expected";
                    for (var i = 0; i < m.specs.length; ++i) {
                        {
                            var e = $root.perfetto.protos.GpuCounterDescriptor.GpuCounterSpec.verify(m.specs[i]);
                            if (e)
                                return "specs." + e;
                        }
                    }
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (!Array.isArray(m.blocks))
                        return "blocks: array expected";
                    for (var i = 0; i < m.blocks.length; ++i) {
                        {
                            var e = $root.perfetto.protos.GpuCounterDescriptor.GpuCounterBlock.verify(m.blocks[i]);
                            if (e)
                                return "blocks." + e;
                        }
                    }
                }
                if (m.minSamplingPeriodNs != null && m.hasOwnProperty("minSamplingPeriodNs")) {
                    if (!$util.isInteger(m.minSamplingPeriodNs) && !(m.minSamplingPeriodNs && $util.isInteger(m.minSamplingPeriodNs.low) && $util.isInteger(m.minSamplingPeriodNs.high)))
                        return "minSamplingPeriodNs: integer|Long expected";
                }
                if (m.maxSamplingPeriodNs != null && m.hasOwnProperty("maxSamplingPeriodNs")) {
                    if (!$util.isInteger(m.maxSamplingPeriodNs) && !(m.maxSamplingPeriodNs && $util.isInteger(m.maxSamplingPeriodNs.low) && $util.isInteger(m.maxSamplingPeriodNs.high)))
                        return "maxSamplingPeriodNs: integer|Long expected";
                }
                if (m.supportsInstrumentedSampling != null && m.hasOwnProperty("supportsInstrumentedSampling")) {
                    if (typeof m.supportsInstrumentedSampling !== "boolean")
                        return "supportsInstrumentedSampling: boolean expected";
                }
                return null;
            };

            /**
             * Creates a GpuCounterDescriptor message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.GpuCounterDescriptor
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.GpuCounterDescriptor} GpuCounterDescriptor
             */
            GpuCounterDescriptor.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.GpuCounterDescriptor)
                    return d;
                var m = new $root.perfetto.protos.GpuCounterDescriptor();
                if (d.specs) {
                    if (!Array.isArray(d.specs))
                        throw TypeError(".perfetto.protos.GpuCounterDescriptor.specs: array expected");
                    m.specs = [];
                    for (var i = 0; i < d.specs.length; ++i) {
                        if (typeof d.specs[i] !== "object")
                            throw TypeError(".perfetto.protos.GpuCounterDescriptor.specs: object expected");
                        m.specs[i] = $root.perfetto.protos.GpuCounterDescriptor.GpuCounterSpec.fromObject(d.specs[i]);
                    }
                }
                if (d.blocks) {
                    if (!Array.isArray(d.blocks))
                        throw TypeError(".perfetto.protos.GpuCounterDescriptor.blocks: array expected");
                    m.blocks = [];
                    for (var i = 0; i < d.blocks.length; ++i) {
                        if (typeof d.blocks[i] !== "object")
                            throw TypeError(".perfetto.protos.GpuCounterDescriptor.blocks: object expected");
                        m.blocks[i] = $root.perfetto.protos.GpuCounterDescriptor.GpuCounterBlock.fromObject(d.blocks[i]);
                    }
                }
                if (d.minSamplingPeriodNs != null) {
                    if ($util.Long)
                        (m.minSamplingPeriodNs = $util.Long.fromValue(d.minSamplingPeriodNs)).unsigned = true;
                    else if (typeof d.minSamplingPeriodNs === "string")
                        m.minSamplingPeriodNs = parseInt(d.minSamplingPeriodNs, 10);
                    else if (typeof d.minSamplingPeriodNs === "number")
                        m.minSamplingPeriodNs = d.minSamplingPeriodNs;
                    else if (typeof d.minSamplingPeriodNs === "object")
                        m.minSamplingPeriodNs = new $util.LongBits(d.minSamplingPeriodNs.low >>> 0, d.minSamplingPeriodNs.high >>> 0).toNumber(true);
                }
                if (d.maxSamplingPeriodNs != null) {
                    if ($util.Long)
                        (m.maxSamplingPeriodNs = $util.Long.fromValue(d.maxSamplingPeriodNs)).unsigned = true;
                    else if (typeof d.maxSamplingPeriodNs === "string")
                        m.maxSamplingPeriodNs = parseInt(d.maxSamplingPeriodNs, 10);
                    else if (typeof d.maxSamplingPeriodNs === "number")
                        m.maxSamplingPeriodNs = d.maxSamplingPeriodNs;
                    else if (typeof d.maxSamplingPeriodNs === "object")
                        m.maxSamplingPeriodNs = new $util.LongBits(d.maxSamplingPeriodNs.low >>> 0, d.maxSamplingPeriodNs.high >>> 0).toNumber(true);
                }
                if (d.supportsInstrumentedSampling != null) {
                    m.supportsInstrumentedSampling = Boolean(d.supportsInstrumentedSampling);
                }
                return m;
            };

            /**
             * Creates a plain object from a GpuCounterDescriptor message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.GpuCounterDescriptor
             * @static
             * @param {perfetto.protos.GpuCounterDescriptor} m GpuCounterDescriptor
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            GpuCounterDescriptor.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.specs = [];
                    d.blocks = [];
                }
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.minSamplingPeriodNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.minSamplingPeriodNs = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.maxSamplingPeriodNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.maxSamplingPeriodNs = o.longs === String ? "0" : 0;
                    d.supportsInstrumentedSampling = false;
                }
                if (m.specs && m.specs.length) {
                    d.specs = [];
                    for (var j = 0; j < m.specs.length; ++j) {
                        d.specs[j] = $root.perfetto.protos.GpuCounterDescriptor.GpuCounterSpec.toObject(m.specs[j], o);
                    }
                }
                if (m.blocks && m.blocks.length) {
                    d.blocks = [];
                    for (var j = 0; j < m.blocks.length; ++j) {
                        d.blocks[j] = $root.perfetto.protos.GpuCounterDescriptor.GpuCounterBlock.toObject(m.blocks[j], o);
                    }
                }
                if (m.minSamplingPeriodNs != null && m.hasOwnProperty("minSamplingPeriodNs")) {
                    if (typeof m.minSamplingPeriodNs === "number")
                        d.minSamplingPeriodNs = o.longs === String ? String(m.minSamplingPeriodNs) : m.minSamplingPeriodNs;
                    else
                        d.minSamplingPeriodNs = o.longs === String ? $util.Long.prototype.toString.call(m.minSamplingPeriodNs) : o.longs === Number ? new $util.LongBits(m.minSamplingPeriodNs.low >>> 0, m.minSamplingPeriodNs.high >>> 0).toNumber(true) : m.minSamplingPeriodNs;
                }
                if (m.maxSamplingPeriodNs != null && m.hasOwnProperty("maxSamplingPeriodNs")) {
                    if (typeof m.maxSamplingPeriodNs === "number")
                        d.maxSamplingPeriodNs = o.longs === String ? String(m.maxSamplingPeriodNs) : m.maxSamplingPeriodNs;
                    else
                        d.maxSamplingPeriodNs = o.longs === String ? $util.Long.prototype.toString.call(m.maxSamplingPeriodNs) : o.longs === Number ? new $util.LongBits(m.maxSamplingPeriodNs.low >>> 0, m.maxSamplingPeriodNs.high >>> 0).toNumber(true) : m.maxSamplingPeriodNs;
                }
                if (m.supportsInstrumentedSampling != null && m.hasOwnProperty("supportsInstrumentedSampling")) {
                    d.supportsInstrumentedSampling = m.supportsInstrumentedSampling;
                }
                return d;
            };

            /**
             * Converts this GpuCounterDescriptor to JSON.
             * @function toJSON
             * @memberof perfetto.protos.GpuCounterDescriptor
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            GpuCounterDescriptor.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * GpuCounterGroup enum.
             * @name perfetto.protos.GpuCounterDescriptor.GpuCounterGroup
             * @enum {number}
             * @property {number} UNCLASSIFIED=0 UNCLASSIFIED value
             * @property {number} SYSTEM=1 SYSTEM value
             * @property {number} VERTICES=2 VERTICES value
             * @property {number} FRAGMENTS=3 FRAGMENTS value
             * @property {number} PRIMITIVES=4 PRIMITIVES value
             * @property {number} MEMORY=5 MEMORY value
             * @property {number} COMPUTE=6 COMPUTE value
             */
            GpuCounterDescriptor.GpuCounterGroup = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNCLASSIFIED"] = 0;
                values[valuesById[1] = "SYSTEM"] = 1;
                values[valuesById[2] = "VERTICES"] = 2;
                values[valuesById[3] = "FRAGMENTS"] = 3;
                values[valuesById[4] = "PRIMITIVES"] = 4;
                values[valuesById[5] = "MEMORY"] = 5;
                values[valuesById[6] = "COMPUTE"] = 6;
                return values;
            })();

            GpuCounterDescriptor.GpuCounterSpec = (function() {

                /**
                 * Properties of a GpuCounterSpec.
                 * @memberof perfetto.protos.GpuCounterDescriptor
                 * @interface IGpuCounterSpec
                 * @property {number|null} [counterId] GpuCounterSpec counterId
                 * @property {string|null} [name] GpuCounterSpec name
                 * @property {string|null} [description] GpuCounterSpec description
                 * @property {number|null} [intPeakValue] GpuCounterSpec intPeakValue
                 * @property {number|null} [doublePeakValue] GpuCounterSpec doublePeakValue
                 * @property {Array.<perfetto.protos.GpuCounterDescriptor.MeasureUnit>|null} [numeratorUnits] GpuCounterSpec numeratorUnits
                 * @property {Array.<perfetto.protos.GpuCounterDescriptor.MeasureUnit>|null} [denominatorUnits] GpuCounterSpec denominatorUnits
                 * @property {boolean|null} [selectByDefault] GpuCounterSpec selectByDefault
                 * @property {Array.<perfetto.protos.GpuCounterDescriptor.GpuCounterGroup>|null} [groups] GpuCounterSpec groups
                 */

                /**
                 * Constructs a new GpuCounterSpec.
                 * @memberof perfetto.protos.GpuCounterDescriptor
                 * @classdesc Represents a GpuCounterSpec.
                 * @implements IGpuCounterSpec
                 * @constructor
                 * @param {perfetto.protos.GpuCounterDescriptor.IGpuCounterSpec=} [p] Properties to set
                 */
                function GpuCounterSpec(p) {
                    this.numeratorUnits = [];
                    this.denominatorUnits = [];
                    this.groups = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * GpuCounterSpec counterId.
                 * @member {number} counterId
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterSpec
                 * @instance
                 */
                GpuCounterSpec.prototype.counterId = 0;

                /**
                 * GpuCounterSpec name.
                 * @member {string} name
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterSpec
                 * @instance
                 */
                GpuCounterSpec.prototype.name = "";

                /**
                 * GpuCounterSpec description.
                 * @member {string} description
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterSpec
                 * @instance
                 */
                GpuCounterSpec.prototype.description = "";

                /**
                 * GpuCounterSpec intPeakValue.
                 * @member {number} intPeakValue
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterSpec
                 * @instance
                 */
                GpuCounterSpec.prototype.intPeakValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * GpuCounterSpec doublePeakValue.
                 * @member {number} doublePeakValue
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterSpec
                 * @instance
                 */
                GpuCounterSpec.prototype.doublePeakValue = 0;

                /**
                 * GpuCounterSpec numeratorUnits.
                 * @member {Array.<perfetto.protos.GpuCounterDescriptor.MeasureUnit>} numeratorUnits
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterSpec
                 * @instance
                 */
                GpuCounterSpec.prototype.numeratorUnits = $util.emptyArray;

                /**
                 * GpuCounterSpec denominatorUnits.
                 * @member {Array.<perfetto.protos.GpuCounterDescriptor.MeasureUnit>} denominatorUnits
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterSpec
                 * @instance
                 */
                GpuCounterSpec.prototype.denominatorUnits = $util.emptyArray;

                /**
                 * GpuCounterSpec selectByDefault.
                 * @member {boolean} selectByDefault
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterSpec
                 * @instance
                 */
                GpuCounterSpec.prototype.selectByDefault = false;

                /**
                 * GpuCounterSpec groups.
                 * @member {Array.<perfetto.protos.GpuCounterDescriptor.GpuCounterGroup>} groups
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterSpec
                 * @instance
                 */
                GpuCounterSpec.prototype.groups = $util.emptyArray;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * GpuCounterSpec peakValue.
                 * @member {"intPeakValue"|"doublePeakValue"|undefined} peakValue
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterSpec
                 * @instance
                 */
                Object.defineProperty(GpuCounterSpec.prototype, "peakValue", {
                    get: $util.oneOfGetter($oneOfFields = ["intPeakValue", "doublePeakValue"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new GpuCounterSpec instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterSpec
                 * @static
                 * @param {perfetto.protos.GpuCounterDescriptor.IGpuCounterSpec=} [properties] Properties to set
                 * @returns {perfetto.protos.GpuCounterDescriptor.GpuCounterSpec} GpuCounterSpec instance
                 */
                GpuCounterSpec.create = function create(properties) {
                    return new GpuCounterSpec(properties);
                };

                /**
                 * Encodes the specified GpuCounterSpec message. Does not implicitly {@link perfetto.protos.GpuCounterDescriptor.GpuCounterSpec.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterSpec
                 * @static
                 * @param {perfetto.protos.GpuCounterDescriptor.IGpuCounterSpec} m GpuCounterSpec message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                GpuCounterSpec.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.counterId != null && Object.hasOwnProperty.call(m, "counterId"))
                        w.uint32(8).uint32(m.counterId);
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(18).string(m.name);
                    if (m.description != null && Object.hasOwnProperty.call(m, "description"))
                        w.uint32(26).string(m.description);
                    if (m.intPeakValue != null && Object.hasOwnProperty.call(m, "intPeakValue"))
                        w.uint32(40).int64(m.intPeakValue);
                    if (m.doublePeakValue != null && Object.hasOwnProperty.call(m, "doublePeakValue"))
                        w.uint32(49).double(m.doublePeakValue);
                    if (m.numeratorUnits != null && m.numeratorUnits.length) {
                        for (var i = 0; i < m.numeratorUnits.length; ++i)
                            w.uint32(56).int32(m.numeratorUnits[i]);
                    }
                    if (m.denominatorUnits != null && m.denominatorUnits.length) {
                        for (var i = 0; i < m.denominatorUnits.length; ++i)
                            w.uint32(64).int32(m.denominatorUnits[i]);
                    }
                    if (m.selectByDefault != null && Object.hasOwnProperty.call(m, "selectByDefault"))
                        w.uint32(72).bool(m.selectByDefault);
                    if (m.groups != null && m.groups.length) {
                        for (var i = 0; i < m.groups.length; ++i)
                            w.uint32(80).int32(m.groups[i]);
                    }
                    return w;
                };

                /**
                 * Encodes the specified GpuCounterSpec message, length delimited. Does not implicitly {@link perfetto.protos.GpuCounterDescriptor.GpuCounterSpec.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterSpec
                 * @static
                 * @param {perfetto.protos.GpuCounterDescriptor.IGpuCounterSpec} message GpuCounterSpec message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                GpuCounterSpec.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a GpuCounterSpec message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterSpec
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.GpuCounterDescriptor.GpuCounterSpec} GpuCounterSpec
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                GpuCounterSpec.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.GpuCounterDescriptor.GpuCounterSpec();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.counterId = r.uint32();
                            break;
                        case 2:
                            m.name = r.string();
                            break;
                        case 3:
                            m.description = r.string();
                            break;
                        case 5:
                            m.intPeakValue = r.int64();
                            break;
                        case 6:
                            m.doublePeakValue = r.double();
                            break;
                        case 7:
                            if (!(m.numeratorUnits && m.numeratorUnits.length))
                                m.numeratorUnits = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.numeratorUnits.push(r.int32());
                            } else
                                m.numeratorUnits.push(r.int32());
                            break;
                        case 8:
                            if (!(m.denominatorUnits && m.denominatorUnits.length))
                                m.denominatorUnits = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.denominatorUnits.push(r.int32());
                            } else
                                m.denominatorUnits.push(r.int32());
                            break;
                        case 9:
                            m.selectByDefault = r.bool();
                            break;
                        case 10:
                            if (!(m.groups && m.groups.length))
                                m.groups = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.groups.push(r.int32());
                            } else
                                m.groups.push(r.int32());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a GpuCounterSpec message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterSpec
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.GpuCounterDescriptor.GpuCounterSpec} GpuCounterSpec
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                GpuCounterSpec.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a GpuCounterSpec message.
                 * @function verify
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterSpec
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                GpuCounterSpec.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    var p = {};
                    if (m.counterId != null && m.hasOwnProperty("counterId")) {
                        if (!$util.isInteger(m.counterId))
                            return "counterId: integer expected";
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    if (m.description != null && m.hasOwnProperty("description")) {
                        if (!$util.isString(m.description))
                            return "description: string expected";
                    }
                    if (m.intPeakValue != null && m.hasOwnProperty("intPeakValue")) {
                        p.peakValue = 1;
                        if (!$util.isInteger(m.intPeakValue) && !(m.intPeakValue && $util.isInteger(m.intPeakValue.low) && $util.isInteger(m.intPeakValue.high)))
                            return "intPeakValue: integer|Long expected";
                    }
                    if (m.doublePeakValue != null && m.hasOwnProperty("doublePeakValue")) {
                        if (p.peakValue === 1)
                            return "peakValue: multiple values";
                        p.peakValue = 1;
                        if (typeof m.doublePeakValue !== "number")
                            return "doublePeakValue: number expected";
                    }
                    if (m.numeratorUnits != null && m.hasOwnProperty("numeratorUnits")) {
                        if (!Array.isArray(m.numeratorUnits))
                            return "numeratorUnits: array expected";
                        for (var i = 0; i < m.numeratorUnits.length; ++i) {
                            switch (m.numeratorUnits[i]) {
                            default:
                                return "numeratorUnits: enum value[] expected";
                            case 0:
                            case 1:
                            case 2:
                            case 3:
                            case 4:
                            case 5:
                            case 6:
                            case 7:
                            case 8:
                            case 9:
                            case 10:
                            case 11:
                            case 12:
                            case 13:
                            case 14:
                            case 15:
                            case 16:
                            case 17:
                            case 18:
                            case 19:
                            case 20:
                            case 21:
                            case 22:
                            case 23:
                            case 24:
                            case 25:
                            case 26:
                            case 27:
                            case 38:
                            case 39:
                            case 28:
                            case 29:
                            case 30:
                            case 31:
                            case 32:
                            case 33:
                            case 34:
                            case 35:
                            case 36:
                            case 37:
                            case 40:
                                break;
                            }
                        }
                    }
                    if (m.denominatorUnits != null && m.hasOwnProperty("denominatorUnits")) {
                        if (!Array.isArray(m.denominatorUnits))
                            return "denominatorUnits: array expected";
                        for (var i = 0; i < m.denominatorUnits.length; ++i) {
                            switch (m.denominatorUnits[i]) {
                            default:
                                return "denominatorUnits: enum value[] expected";
                            case 0:
                            case 1:
                            case 2:
                            case 3:
                            case 4:
                            case 5:
                            case 6:
                            case 7:
                            case 8:
                            case 9:
                            case 10:
                            case 11:
                            case 12:
                            case 13:
                            case 14:
                            case 15:
                            case 16:
                            case 17:
                            case 18:
                            case 19:
                            case 20:
                            case 21:
                            case 22:
                            case 23:
                            case 24:
                            case 25:
                            case 26:
                            case 27:
                            case 38:
                            case 39:
                            case 28:
                            case 29:
                            case 30:
                            case 31:
                            case 32:
                            case 33:
                            case 34:
                            case 35:
                            case 36:
                            case 37:
                            case 40:
                                break;
                            }
                        }
                    }
                    if (m.selectByDefault != null && m.hasOwnProperty("selectByDefault")) {
                        if (typeof m.selectByDefault !== "boolean")
                            return "selectByDefault: boolean expected";
                    }
                    if (m.groups != null && m.hasOwnProperty("groups")) {
                        if (!Array.isArray(m.groups))
                            return "groups: array expected";
                        for (var i = 0; i < m.groups.length; ++i) {
                            switch (m.groups[i]) {
                            default:
                                return "groups: enum value[] expected";
                            case 0:
                            case 1:
                            case 2:
                            case 3:
                            case 4:
                            case 5:
                            case 6:
                                break;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates a GpuCounterSpec message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterSpec
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.GpuCounterDescriptor.GpuCounterSpec} GpuCounterSpec
                 */
                GpuCounterSpec.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.GpuCounterDescriptor.GpuCounterSpec)
                        return d;
                    var m = new $root.perfetto.protos.GpuCounterDescriptor.GpuCounterSpec();
                    if (d.counterId != null) {
                        m.counterId = d.counterId >>> 0;
                    }
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    if (d.description != null) {
                        m.description = String(d.description);
                    }
                    if (d.intPeakValue != null) {
                        if ($util.Long)
                            (m.intPeakValue = $util.Long.fromValue(d.intPeakValue)).unsigned = false;
                        else if (typeof d.intPeakValue === "string")
                            m.intPeakValue = parseInt(d.intPeakValue, 10);
                        else if (typeof d.intPeakValue === "number")
                            m.intPeakValue = d.intPeakValue;
                        else if (typeof d.intPeakValue === "object")
                            m.intPeakValue = new $util.LongBits(d.intPeakValue.low >>> 0, d.intPeakValue.high >>> 0).toNumber();
                    }
                    if (d.doublePeakValue != null) {
                        m.doublePeakValue = Number(d.doublePeakValue);
                    }
                    if (d.numeratorUnits) {
                        if (!Array.isArray(d.numeratorUnits))
                            throw TypeError(".perfetto.protos.GpuCounterDescriptor.GpuCounterSpec.numeratorUnits: array expected");
                        m.numeratorUnits = [];
                        for (var i = 0; i < d.numeratorUnits.length; ++i) {
                            switch (d.numeratorUnits[i]) {
                            default:
                            case "NONE":
                            case 0:
                                m.numeratorUnits[i] = 0;
                                break;
                            case "BIT":
                            case 1:
                                m.numeratorUnits[i] = 1;
                                break;
                            case "KILOBIT":
                            case 2:
                                m.numeratorUnits[i] = 2;
                                break;
                            case "MEGABIT":
                            case 3:
                                m.numeratorUnits[i] = 3;
                                break;
                            case "GIGABIT":
                            case 4:
                                m.numeratorUnits[i] = 4;
                                break;
                            case "TERABIT":
                            case 5:
                                m.numeratorUnits[i] = 5;
                                break;
                            case "PETABIT":
                            case 6:
                                m.numeratorUnits[i] = 6;
                                break;
                            case "BYTE":
                            case 7:
                                m.numeratorUnits[i] = 7;
                                break;
                            case "KILOBYTE":
                            case 8:
                                m.numeratorUnits[i] = 8;
                                break;
                            case "MEGABYTE":
                            case 9:
                                m.numeratorUnits[i] = 9;
                                break;
                            case "GIGABYTE":
                            case 10:
                                m.numeratorUnits[i] = 10;
                                break;
                            case "TERABYTE":
                            case 11:
                                m.numeratorUnits[i] = 11;
                                break;
                            case "PETABYTE":
                            case 12:
                                m.numeratorUnits[i] = 12;
                                break;
                            case "HERTZ":
                            case 13:
                                m.numeratorUnits[i] = 13;
                                break;
                            case "KILOHERTZ":
                            case 14:
                                m.numeratorUnits[i] = 14;
                                break;
                            case "MEGAHERTZ":
                            case 15:
                                m.numeratorUnits[i] = 15;
                                break;
                            case "GIGAHERTZ":
                            case 16:
                                m.numeratorUnits[i] = 16;
                                break;
                            case "TERAHERTZ":
                            case 17:
                                m.numeratorUnits[i] = 17;
                                break;
                            case "PETAHERTZ":
                            case 18:
                                m.numeratorUnits[i] = 18;
                                break;
                            case "NANOSECOND":
                            case 19:
                                m.numeratorUnits[i] = 19;
                                break;
                            case "MICROSECOND":
                            case 20:
                                m.numeratorUnits[i] = 20;
                                break;
                            case "MILLISECOND":
                            case 21:
                                m.numeratorUnits[i] = 21;
                                break;
                            case "SECOND":
                            case 22:
                                m.numeratorUnits[i] = 22;
                                break;
                            case "MINUTE":
                            case 23:
                                m.numeratorUnits[i] = 23;
                                break;
                            case "HOUR":
                            case 24:
                                m.numeratorUnits[i] = 24;
                                break;
                            case "VERTEX":
                            case 25:
                                m.numeratorUnits[i] = 25;
                                break;
                            case "PIXEL":
                            case 26:
                                m.numeratorUnits[i] = 26;
                                break;
                            case "TRIANGLE":
                            case 27:
                                m.numeratorUnits[i] = 27;
                                break;
                            case "PRIMITIVE":
                            case 38:
                                m.numeratorUnits[i] = 38;
                                break;
                            case "FRAGMENT":
                            case 39:
                                m.numeratorUnits[i] = 39;
                                break;
                            case "MILLIWATT":
                            case 28:
                                m.numeratorUnits[i] = 28;
                                break;
                            case "WATT":
                            case 29:
                                m.numeratorUnits[i] = 29;
                                break;
                            case "KILOWATT":
                            case 30:
                                m.numeratorUnits[i] = 30;
                                break;
                            case "JOULE":
                            case 31:
                                m.numeratorUnits[i] = 31;
                                break;
                            case "VOLT":
                            case 32:
                                m.numeratorUnits[i] = 32;
                                break;
                            case "AMPERE":
                            case 33:
                                m.numeratorUnits[i] = 33;
                                break;
                            case "CELSIUS":
                            case 34:
                                m.numeratorUnits[i] = 34;
                                break;
                            case "FAHRENHEIT":
                            case 35:
                                m.numeratorUnits[i] = 35;
                                break;
                            case "KELVIN":
                            case 36:
                                m.numeratorUnits[i] = 36;
                                break;
                            case "PERCENT":
                            case 37:
                                m.numeratorUnits[i] = 37;
                                break;
                            case "INSTRUCTION":
                            case 40:
                                m.numeratorUnits[i] = 40;
                                break;
                            }
                        }
                    }
                    if (d.denominatorUnits) {
                        if (!Array.isArray(d.denominatorUnits))
                            throw TypeError(".perfetto.protos.GpuCounterDescriptor.GpuCounterSpec.denominatorUnits: array expected");
                        m.denominatorUnits = [];
                        for (var i = 0; i < d.denominatorUnits.length; ++i) {
                            switch (d.denominatorUnits[i]) {
                            default:
                            case "NONE":
                            case 0:
                                m.denominatorUnits[i] = 0;
                                break;
                            case "BIT":
                            case 1:
                                m.denominatorUnits[i] = 1;
                                break;
                            case "KILOBIT":
                            case 2:
                                m.denominatorUnits[i] = 2;
                                break;
                            case "MEGABIT":
                            case 3:
                                m.denominatorUnits[i] = 3;
                                break;
                            case "GIGABIT":
                            case 4:
                                m.denominatorUnits[i] = 4;
                                break;
                            case "TERABIT":
                            case 5:
                                m.denominatorUnits[i] = 5;
                                break;
                            case "PETABIT":
                            case 6:
                                m.denominatorUnits[i] = 6;
                                break;
                            case "BYTE":
                            case 7:
                                m.denominatorUnits[i] = 7;
                                break;
                            case "KILOBYTE":
                            case 8:
                                m.denominatorUnits[i] = 8;
                                break;
                            case "MEGABYTE":
                            case 9:
                                m.denominatorUnits[i] = 9;
                                break;
                            case "GIGABYTE":
                            case 10:
                                m.denominatorUnits[i] = 10;
                                break;
                            case "TERABYTE":
                            case 11:
                                m.denominatorUnits[i] = 11;
                                break;
                            case "PETABYTE":
                            case 12:
                                m.denominatorUnits[i] = 12;
                                break;
                            case "HERTZ":
                            case 13:
                                m.denominatorUnits[i] = 13;
                                break;
                            case "KILOHERTZ":
                            case 14:
                                m.denominatorUnits[i] = 14;
                                break;
                            case "MEGAHERTZ":
                            case 15:
                                m.denominatorUnits[i] = 15;
                                break;
                            case "GIGAHERTZ":
                            case 16:
                                m.denominatorUnits[i] = 16;
                                break;
                            case "TERAHERTZ":
                            case 17:
                                m.denominatorUnits[i] = 17;
                                break;
                            case "PETAHERTZ":
                            case 18:
                                m.denominatorUnits[i] = 18;
                                break;
                            case "NANOSECOND":
                            case 19:
                                m.denominatorUnits[i] = 19;
                                break;
                            case "MICROSECOND":
                            case 20:
                                m.denominatorUnits[i] = 20;
                                break;
                            case "MILLISECOND":
                            case 21:
                                m.denominatorUnits[i] = 21;
                                break;
                            case "SECOND":
                            case 22:
                                m.denominatorUnits[i] = 22;
                                break;
                            case "MINUTE":
                            case 23:
                                m.denominatorUnits[i] = 23;
                                break;
                            case "HOUR":
                            case 24:
                                m.denominatorUnits[i] = 24;
                                break;
                            case "VERTEX":
                            case 25:
                                m.denominatorUnits[i] = 25;
                                break;
                            case "PIXEL":
                            case 26:
                                m.denominatorUnits[i] = 26;
                                break;
                            case "TRIANGLE":
                            case 27:
                                m.denominatorUnits[i] = 27;
                                break;
                            case "PRIMITIVE":
                            case 38:
                                m.denominatorUnits[i] = 38;
                                break;
                            case "FRAGMENT":
                            case 39:
                                m.denominatorUnits[i] = 39;
                                break;
                            case "MILLIWATT":
                            case 28:
                                m.denominatorUnits[i] = 28;
                                break;
                            case "WATT":
                            case 29:
                                m.denominatorUnits[i] = 29;
                                break;
                            case "KILOWATT":
                            case 30:
                                m.denominatorUnits[i] = 30;
                                break;
                            case "JOULE":
                            case 31:
                                m.denominatorUnits[i] = 31;
                                break;
                            case "VOLT":
                            case 32:
                                m.denominatorUnits[i] = 32;
                                break;
                            case "AMPERE":
                            case 33:
                                m.denominatorUnits[i] = 33;
                                break;
                            case "CELSIUS":
                            case 34:
                                m.denominatorUnits[i] = 34;
                                break;
                            case "FAHRENHEIT":
                            case 35:
                                m.denominatorUnits[i] = 35;
                                break;
                            case "KELVIN":
                            case 36:
                                m.denominatorUnits[i] = 36;
                                break;
                            case "PERCENT":
                            case 37:
                                m.denominatorUnits[i] = 37;
                                break;
                            case "INSTRUCTION":
                            case 40:
                                m.denominatorUnits[i] = 40;
                                break;
                            }
                        }
                    }
                    if (d.selectByDefault != null) {
                        m.selectByDefault = Boolean(d.selectByDefault);
                    }
                    if (d.groups) {
                        if (!Array.isArray(d.groups))
                            throw TypeError(".perfetto.protos.GpuCounterDescriptor.GpuCounterSpec.groups: array expected");
                        m.groups = [];
                        for (var i = 0; i < d.groups.length; ++i) {
                            switch (d.groups[i]) {
                            default:
                            case "UNCLASSIFIED":
                            case 0:
                                m.groups[i] = 0;
                                break;
                            case "SYSTEM":
                            case 1:
                                m.groups[i] = 1;
                                break;
                            case "VERTICES":
                            case 2:
                                m.groups[i] = 2;
                                break;
                            case "FRAGMENTS":
                            case 3:
                                m.groups[i] = 3;
                                break;
                            case "PRIMITIVES":
                            case 4:
                                m.groups[i] = 4;
                                break;
                            case "MEMORY":
                            case 5:
                                m.groups[i] = 5;
                                break;
                            case "COMPUTE":
                            case 6:
                                m.groups[i] = 6;
                                break;
                            }
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a GpuCounterSpec message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterSpec
                 * @static
                 * @param {perfetto.protos.GpuCounterDescriptor.GpuCounterSpec} m GpuCounterSpec
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                GpuCounterSpec.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.numeratorUnits = [];
                        d.denominatorUnits = [];
                        d.groups = [];
                    }
                    if (o.defaults) {
                        d.counterId = 0;
                        d.name = "";
                        d.description = "";
                        d.selectByDefault = false;
                    }
                    if (m.counterId != null && m.hasOwnProperty("counterId")) {
                        d.counterId = m.counterId;
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    if (m.description != null && m.hasOwnProperty("description")) {
                        d.description = m.description;
                    }
                    if (m.intPeakValue != null && m.hasOwnProperty("intPeakValue")) {
                        if (typeof m.intPeakValue === "number")
                            d.intPeakValue = o.longs === String ? String(m.intPeakValue) : m.intPeakValue;
                        else
                            d.intPeakValue = o.longs === String ? $util.Long.prototype.toString.call(m.intPeakValue) : o.longs === Number ? new $util.LongBits(m.intPeakValue.low >>> 0, m.intPeakValue.high >>> 0).toNumber() : m.intPeakValue;
                        if (o.oneofs)
                            d.peakValue = "intPeakValue";
                    }
                    if (m.doublePeakValue != null && m.hasOwnProperty("doublePeakValue")) {
                        d.doublePeakValue = o.json && !isFinite(m.doublePeakValue) ? String(m.doublePeakValue) : m.doublePeakValue;
                        if (o.oneofs)
                            d.peakValue = "doublePeakValue";
                    }
                    if (m.numeratorUnits && m.numeratorUnits.length) {
                        d.numeratorUnits = [];
                        for (var j = 0; j < m.numeratorUnits.length; ++j) {
                            d.numeratorUnits[j] = o.enums === String ? $root.perfetto.protos.GpuCounterDescriptor.MeasureUnit[m.numeratorUnits[j]] : m.numeratorUnits[j];
                        }
                    }
                    if (m.denominatorUnits && m.denominatorUnits.length) {
                        d.denominatorUnits = [];
                        for (var j = 0; j < m.denominatorUnits.length; ++j) {
                            d.denominatorUnits[j] = o.enums === String ? $root.perfetto.protos.GpuCounterDescriptor.MeasureUnit[m.denominatorUnits[j]] : m.denominatorUnits[j];
                        }
                    }
                    if (m.selectByDefault != null && m.hasOwnProperty("selectByDefault")) {
                        d.selectByDefault = m.selectByDefault;
                    }
                    if (m.groups && m.groups.length) {
                        d.groups = [];
                        for (var j = 0; j < m.groups.length; ++j) {
                            d.groups[j] = o.enums === String ? $root.perfetto.protos.GpuCounterDescriptor.GpuCounterGroup[m.groups[j]] : m.groups[j];
                        }
                    }
                    return d;
                };

                /**
                 * Converts this GpuCounterSpec to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterSpec
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                GpuCounterSpec.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return GpuCounterSpec;
            })();

            GpuCounterDescriptor.GpuCounterBlock = (function() {

                /**
                 * Properties of a GpuCounterBlock.
                 * @memberof perfetto.protos.GpuCounterDescriptor
                 * @interface IGpuCounterBlock
                 * @property {number|null} [blockId] GpuCounterBlock blockId
                 * @property {number|null} [blockCapacity] GpuCounterBlock blockCapacity
                 * @property {string|null} [name] GpuCounterBlock name
                 * @property {string|null} [description] GpuCounterBlock description
                 * @property {Array.<number>|null} [counterIds] GpuCounterBlock counterIds
                 */

                /**
                 * Constructs a new GpuCounterBlock.
                 * @memberof perfetto.protos.GpuCounterDescriptor
                 * @classdesc Represents a GpuCounterBlock.
                 * @implements IGpuCounterBlock
                 * @constructor
                 * @param {perfetto.protos.GpuCounterDescriptor.IGpuCounterBlock=} [p] Properties to set
                 */
                function GpuCounterBlock(p) {
                    this.counterIds = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * GpuCounterBlock blockId.
                 * @member {number} blockId
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterBlock
                 * @instance
                 */
                GpuCounterBlock.prototype.blockId = 0;

                /**
                 * GpuCounterBlock blockCapacity.
                 * @member {number} blockCapacity
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterBlock
                 * @instance
                 */
                GpuCounterBlock.prototype.blockCapacity = 0;

                /**
                 * GpuCounterBlock name.
                 * @member {string} name
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterBlock
                 * @instance
                 */
                GpuCounterBlock.prototype.name = "";

                /**
                 * GpuCounterBlock description.
                 * @member {string} description
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterBlock
                 * @instance
                 */
                GpuCounterBlock.prototype.description = "";

                /**
                 * GpuCounterBlock counterIds.
                 * @member {Array.<number>} counterIds
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterBlock
                 * @instance
                 */
                GpuCounterBlock.prototype.counterIds = $util.emptyArray;

                /**
                 * Creates a new GpuCounterBlock instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterBlock
                 * @static
                 * @param {perfetto.protos.GpuCounterDescriptor.IGpuCounterBlock=} [properties] Properties to set
                 * @returns {perfetto.protos.GpuCounterDescriptor.GpuCounterBlock} GpuCounterBlock instance
                 */
                GpuCounterBlock.create = function create(properties) {
                    return new GpuCounterBlock(properties);
                };

                /**
                 * Encodes the specified GpuCounterBlock message. Does not implicitly {@link perfetto.protos.GpuCounterDescriptor.GpuCounterBlock.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterBlock
                 * @static
                 * @param {perfetto.protos.GpuCounterDescriptor.IGpuCounterBlock} m GpuCounterBlock message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                GpuCounterBlock.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.blockId != null && Object.hasOwnProperty.call(m, "blockId"))
                        w.uint32(8).uint32(m.blockId);
                    if (m.blockCapacity != null && Object.hasOwnProperty.call(m, "blockCapacity"))
                        w.uint32(16).uint32(m.blockCapacity);
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(26).string(m.name);
                    if (m.description != null && Object.hasOwnProperty.call(m, "description"))
                        w.uint32(34).string(m.description);
                    if (m.counterIds != null && m.counterIds.length) {
                        for (var i = 0; i < m.counterIds.length; ++i)
                            w.uint32(40).uint32(m.counterIds[i]);
                    }
                    return w;
                };

                /**
                 * Encodes the specified GpuCounterBlock message, length delimited. Does not implicitly {@link perfetto.protos.GpuCounterDescriptor.GpuCounterBlock.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterBlock
                 * @static
                 * @param {perfetto.protos.GpuCounterDescriptor.IGpuCounterBlock} message GpuCounterBlock message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                GpuCounterBlock.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a GpuCounterBlock message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterBlock
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.GpuCounterDescriptor.GpuCounterBlock} GpuCounterBlock
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                GpuCounterBlock.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.GpuCounterDescriptor.GpuCounterBlock();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.blockId = r.uint32();
                            break;
                        case 2:
                            m.blockCapacity = r.uint32();
                            break;
                        case 3:
                            m.name = r.string();
                            break;
                        case 4:
                            m.description = r.string();
                            break;
                        case 5:
                            if (!(m.counterIds && m.counterIds.length))
                                m.counterIds = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.counterIds.push(r.uint32());
                            } else
                                m.counterIds.push(r.uint32());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a GpuCounterBlock message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterBlock
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.GpuCounterDescriptor.GpuCounterBlock} GpuCounterBlock
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                GpuCounterBlock.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a GpuCounterBlock message.
                 * @function verify
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterBlock
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                GpuCounterBlock.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.blockId != null && m.hasOwnProperty("blockId")) {
                        if (!$util.isInteger(m.blockId))
                            return "blockId: integer expected";
                    }
                    if (m.blockCapacity != null && m.hasOwnProperty("blockCapacity")) {
                        if (!$util.isInteger(m.blockCapacity))
                            return "blockCapacity: integer expected";
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    if (m.description != null && m.hasOwnProperty("description")) {
                        if (!$util.isString(m.description))
                            return "description: string expected";
                    }
                    if (m.counterIds != null && m.hasOwnProperty("counterIds")) {
                        if (!Array.isArray(m.counterIds))
                            return "counterIds: array expected";
                        for (var i = 0; i < m.counterIds.length; ++i) {
                            if (!$util.isInteger(m.counterIds[i]))
                                return "counterIds: integer[] expected";
                        }
                    }
                    return null;
                };

                /**
                 * Creates a GpuCounterBlock message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterBlock
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.GpuCounterDescriptor.GpuCounterBlock} GpuCounterBlock
                 */
                GpuCounterBlock.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.GpuCounterDescriptor.GpuCounterBlock)
                        return d;
                    var m = new $root.perfetto.protos.GpuCounterDescriptor.GpuCounterBlock();
                    if (d.blockId != null) {
                        m.blockId = d.blockId >>> 0;
                    }
                    if (d.blockCapacity != null) {
                        m.blockCapacity = d.blockCapacity >>> 0;
                    }
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    if (d.description != null) {
                        m.description = String(d.description);
                    }
                    if (d.counterIds) {
                        if (!Array.isArray(d.counterIds))
                            throw TypeError(".perfetto.protos.GpuCounterDescriptor.GpuCounterBlock.counterIds: array expected");
                        m.counterIds = [];
                        for (var i = 0; i < d.counterIds.length; ++i) {
                            m.counterIds[i] = d.counterIds[i] >>> 0;
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a GpuCounterBlock message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterBlock
                 * @static
                 * @param {perfetto.protos.GpuCounterDescriptor.GpuCounterBlock} m GpuCounterBlock
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                GpuCounterBlock.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.counterIds = [];
                    }
                    if (o.defaults) {
                        d.blockId = 0;
                        d.blockCapacity = 0;
                        d.name = "";
                        d.description = "";
                    }
                    if (m.blockId != null && m.hasOwnProperty("blockId")) {
                        d.blockId = m.blockId;
                    }
                    if (m.blockCapacity != null && m.hasOwnProperty("blockCapacity")) {
                        d.blockCapacity = m.blockCapacity;
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    if (m.description != null && m.hasOwnProperty("description")) {
                        d.description = m.description;
                    }
                    if (m.counterIds && m.counterIds.length) {
                        d.counterIds = [];
                        for (var j = 0; j < m.counterIds.length; ++j) {
                            d.counterIds[j] = m.counterIds[j];
                        }
                    }
                    return d;
                };

                /**
                 * Converts this GpuCounterBlock to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.GpuCounterDescriptor.GpuCounterBlock
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                GpuCounterBlock.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return GpuCounterBlock;
            })();

            /**
             * MeasureUnit enum.
             * @name perfetto.protos.GpuCounterDescriptor.MeasureUnit
             * @enum {number}
             * @property {number} NONE=0 NONE value
             * @property {number} BIT=1 BIT value
             * @property {number} KILOBIT=2 KILOBIT value
             * @property {number} MEGABIT=3 MEGABIT value
             * @property {number} GIGABIT=4 GIGABIT value
             * @property {number} TERABIT=5 TERABIT value
             * @property {number} PETABIT=6 PETABIT value
             * @property {number} BYTE=7 BYTE value
             * @property {number} KILOBYTE=8 KILOBYTE value
             * @property {number} MEGABYTE=9 MEGABYTE value
             * @property {number} GIGABYTE=10 GIGABYTE value
             * @property {number} TERABYTE=11 TERABYTE value
             * @property {number} PETABYTE=12 PETABYTE value
             * @property {number} HERTZ=13 HERTZ value
             * @property {number} KILOHERTZ=14 KILOHERTZ value
             * @property {number} MEGAHERTZ=15 MEGAHERTZ value
             * @property {number} GIGAHERTZ=16 GIGAHERTZ value
             * @property {number} TERAHERTZ=17 TERAHERTZ value
             * @property {number} PETAHERTZ=18 PETAHERTZ value
             * @property {number} NANOSECOND=19 NANOSECOND value
             * @property {number} MICROSECOND=20 MICROSECOND value
             * @property {number} MILLISECOND=21 MILLISECOND value
             * @property {number} SECOND=22 SECOND value
             * @property {number} MINUTE=23 MINUTE value
             * @property {number} HOUR=24 HOUR value
             * @property {number} VERTEX=25 VERTEX value
             * @property {number} PIXEL=26 PIXEL value
             * @property {number} TRIANGLE=27 TRIANGLE value
             * @property {number} PRIMITIVE=38 PRIMITIVE value
             * @property {number} FRAGMENT=39 FRAGMENT value
             * @property {number} MILLIWATT=28 MILLIWATT value
             * @property {number} WATT=29 WATT value
             * @property {number} KILOWATT=30 KILOWATT value
             * @property {number} JOULE=31 JOULE value
             * @property {number} VOLT=32 VOLT value
             * @property {number} AMPERE=33 AMPERE value
             * @property {number} CELSIUS=34 CELSIUS value
             * @property {number} FAHRENHEIT=35 FAHRENHEIT value
             * @property {number} KELVIN=36 KELVIN value
             * @property {number} PERCENT=37 PERCENT value
             * @property {number} INSTRUCTION=40 INSTRUCTION value
             */
            GpuCounterDescriptor.MeasureUnit = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "NONE"] = 0;
                values[valuesById[1] = "BIT"] = 1;
                values[valuesById[2] = "KILOBIT"] = 2;
                values[valuesById[3] = "MEGABIT"] = 3;
                values[valuesById[4] = "GIGABIT"] = 4;
                values[valuesById[5] = "TERABIT"] = 5;
                values[valuesById[6] = "PETABIT"] = 6;
                values[valuesById[7] = "BYTE"] = 7;
                values[valuesById[8] = "KILOBYTE"] = 8;
                values[valuesById[9] = "MEGABYTE"] = 9;
                values[valuesById[10] = "GIGABYTE"] = 10;
                values[valuesById[11] = "TERABYTE"] = 11;
                values[valuesById[12] = "PETABYTE"] = 12;
                values[valuesById[13] = "HERTZ"] = 13;
                values[valuesById[14] = "KILOHERTZ"] = 14;
                values[valuesById[15] = "MEGAHERTZ"] = 15;
                values[valuesById[16] = "GIGAHERTZ"] = 16;
                values[valuesById[17] = "TERAHERTZ"] = 17;
                values[valuesById[18] = "PETAHERTZ"] = 18;
                values[valuesById[19] = "NANOSECOND"] = 19;
                values[valuesById[20] = "MICROSECOND"] = 20;
                values[valuesById[21] = "MILLISECOND"] = 21;
                values[valuesById[22] = "SECOND"] = 22;
                values[valuesById[23] = "MINUTE"] = 23;
                values[valuesById[24] = "HOUR"] = 24;
                values[valuesById[25] = "VERTEX"] = 25;
                values[valuesById[26] = "PIXEL"] = 26;
                values[valuesById[27] = "TRIANGLE"] = 27;
                values[valuesById[38] = "PRIMITIVE"] = 38;
                values[valuesById[39] = "FRAGMENT"] = 39;
                values[valuesById[28] = "MILLIWATT"] = 28;
                values[valuesById[29] = "WATT"] = 29;
                values[valuesById[30] = "KILOWATT"] = 30;
                values[valuesById[31] = "JOULE"] = 31;
                values[valuesById[32] = "VOLT"] = 32;
                values[valuesById[33] = "AMPERE"] = 33;
                values[valuesById[34] = "CELSIUS"] = 34;
                values[valuesById[35] = "FAHRENHEIT"] = 35;
                values[valuesById[36] = "KELVIN"] = 36;
                values[valuesById[37] = "PERCENT"] = 37;
                values[valuesById[40] = "INSTRUCTION"] = 40;
                return values;
            })();

            return GpuCounterDescriptor;
        })();

        protos.TrackEventCategory = (function() {

            /**
             * Properties of a TrackEventCategory.
             * @memberof perfetto.protos
             * @interface ITrackEventCategory
             * @property {string|null} [name] TrackEventCategory name
             * @property {string|null} [description] TrackEventCategory description
             * @property {Array.<string>|null} [tags] TrackEventCategory tags
             */

            /**
             * Constructs a new TrackEventCategory.
             * @memberof perfetto.protos
             * @classdesc Represents a TrackEventCategory.
             * @implements ITrackEventCategory
             * @constructor
             * @param {perfetto.protos.ITrackEventCategory=} [p] Properties to set
             */
            function TrackEventCategory(p) {
                this.tags = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TrackEventCategory name.
             * @member {string} name
             * @memberof perfetto.protos.TrackEventCategory
             * @instance
             */
            TrackEventCategory.prototype.name = "";

            /**
             * TrackEventCategory description.
             * @member {string} description
             * @memberof perfetto.protos.TrackEventCategory
             * @instance
             */
            TrackEventCategory.prototype.description = "";

            /**
             * TrackEventCategory tags.
             * @member {Array.<string>} tags
             * @memberof perfetto.protos.TrackEventCategory
             * @instance
             */
            TrackEventCategory.prototype.tags = $util.emptyArray;

            /**
             * Creates a new TrackEventCategory instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrackEventCategory
             * @static
             * @param {perfetto.protos.ITrackEventCategory=} [properties] Properties to set
             * @returns {perfetto.protos.TrackEventCategory} TrackEventCategory instance
             */
            TrackEventCategory.create = function create(properties) {
                return new TrackEventCategory(properties);
            };

            /**
             * Encodes the specified TrackEventCategory message. Does not implicitly {@link perfetto.protos.TrackEventCategory.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrackEventCategory
             * @static
             * @param {perfetto.protos.ITrackEventCategory} m TrackEventCategory message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrackEventCategory.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                if (m.description != null && Object.hasOwnProperty.call(m, "description"))
                    w.uint32(18).string(m.description);
                if (m.tags != null && m.tags.length) {
                    for (var i = 0; i < m.tags.length; ++i)
                        w.uint32(26).string(m.tags[i]);
                }
                return w;
            };

            /**
             * Encodes the specified TrackEventCategory message, length delimited. Does not implicitly {@link perfetto.protos.TrackEventCategory.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrackEventCategory
             * @static
             * @param {perfetto.protos.ITrackEventCategory} message TrackEventCategory message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrackEventCategory.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrackEventCategory message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrackEventCategory
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrackEventCategory} TrackEventCategory
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrackEventCategory.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrackEventCategory();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    case 2:
                        m.description = r.string();
                        break;
                    case 3:
                        if (!(m.tags && m.tags.length))
                            m.tags = [];
                        m.tags.push(r.string());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrackEventCategory message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrackEventCategory
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrackEventCategory} TrackEventCategory
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrackEventCategory.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrackEventCategory message.
             * @function verify
             * @memberof perfetto.protos.TrackEventCategory
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrackEventCategory.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.description != null && m.hasOwnProperty("description")) {
                    if (!$util.isString(m.description))
                        return "description: string expected";
                }
                if (m.tags != null && m.hasOwnProperty("tags")) {
                    if (!Array.isArray(m.tags))
                        return "tags: array expected";
                    for (var i = 0; i < m.tags.length; ++i) {
                        if (!$util.isString(m.tags[i]))
                            return "tags: string[] expected";
                    }
                }
                return null;
            };

            /**
             * Creates a TrackEventCategory message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrackEventCategory
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrackEventCategory} TrackEventCategory
             */
            TrackEventCategory.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrackEventCategory)
                    return d;
                var m = new $root.perfetto.protos.TrackEventCategory();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.description != null) {
                    m.description = String(d.description);
                }
                if (d.tags) {
                    if (!Array.isArray(d.tags))
                        throw TypeError(".perfetto.protos.TrackEventCategory.tags: array expected");
                    m.tags = [];
                    for (var i = 0; i < d.tags.length; ++i) {
                        m.tags[i] = String(d.tags[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a TrackEventCategory message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrackEventCategory
             * @static
             * @param {perfetto.protos.TrackEventCategory} m TrackEventCategory
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrackEventCategory.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.tags = [];
                }
                if (o.defaults) {
                    d.name = "";
                    d.description = "";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.description != null && m.hasOwnProperty("description")) {
                    d.description = m.description;
                }
                if (m.tags && m.tags.length) {
                    d.tags = [];
                    for (var j = 0; j < m.tags.length; ++j) {
                        d.tags[j] = m.tags[j];
                    }
                }
                return d;
            };

            /**
             * Converts this TrackEventCategory to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrackEventCategory
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrackEventCategory.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrackEventCategory;
        })();

        protos.TrackEventDescriptor = (function() {

            /**
             * Properties of a TrackEventDescriptor.
             * @memberof perfetto.protos
             * @interface ITrackEventDescriptor
             * @property {Array.<perfetto.protos.ITrackEventCategory>|null} [availableCategories] TrackEventDescriptor availableCategories
             */

            /**
             * Constructs a new TrackEventDescriptor.
             * @memberof perfetto.protos
             * @classdesc Represents a TrackEventDescriptor.
             * @implements ITrackEventDescriptor
             * @constructor
             * @param {perfetto.protos.ITrackEventDescriptor=} [p] Properties to set
             */
            function TrackEventDescriptor(p) {
                this.availableCategories = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TrackEventDescriptor availableCategories.
             * @member {Array.<perfetto.protos.ITrackEventCategory>} availableCategories
             * @memberof perfetto.protos.TrackEventDescriptor
             * @instance
             */
            TrackEventDescriptor.prototype.availableCategories = $util.emptyArray;

            /**
             * Creates a new TrackEventDescriptor instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrackEventDescriptor
             * @static
             * @param {perfetto.protos.ITrackEventDescriptor=} [properties] Properties to set
             * @returns {perfetto.protos.TrackEventDescriptor} TrackEventDescriptor instance
             */
            TrackEventDescriptor.create = function create(properties) {
                return new TrackEventDescriptor(properties);
            };

            /**
             * Encodes the specified TrackEventDescriptor message. Does not implicitly {@link perfetto.protos.TrackEventDescriptor.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrackEventDescriptor
             * @static
             * @param {perfetto.protos.ITrackEventDescriptor} m TrackEventDescriptor message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrackEventDescriptor.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.availableCategories != null && m.availableCategories.length) {
                    for (var i = 0; i < m.availableCategories.length; ++i)
                        $root.perfetto.protos.TrackEventCategory.encode(m.availableCategories[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified TrackEventDescriptor message, length delimited. Does not implicitly {@link perfetto.protos.TrackEventDescriptor.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrackEventDescriptor
             * @static
             * @param {perfetto.protos.ITrackEventDescriptor} message TrackEventDescriptor message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrackEventDescriptor.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrackEventDescriptor message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrackEventDescriptor
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrackEventDescriptor} TrackEventDescriptor
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrackEventDescriptor.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrackEventDescriptor();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.availableCategories && m.availableCategories.length))
                            m.availableCategories = [];
                        m.availableCategories.push($root.perfetto.protos.TrackEventCategory.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrackEventDescriptor message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrackEventDescriptor
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrackEventDescriptor} TrackEventDescriptor
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrackEventDescriptor.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrackEventDescriptor message.
             * @function verify
             * @memberof perfetto.protos.TrackEventDescriptor
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrackEventDescriptor.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.availableCategories != null && m.hasOwnProperty("availableCategories")) {
                    if (!Array.isArray(m.availableCategories))
                        return "availableCategories: array expected";
                    for (var i = 0; i < m.availableCategories.length; ++i) {
                        {
                            var e = $root.perfetto.protos.TrackEventCategory.verify(m.availableCategories[i]);
                            if (e)
                                return "availableCategories." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a TrackEventDescriptor message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrackEventDescriptor
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrackEventDescriptor} TrackEventDescriptor
             */
            TrackEventDescriptor.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrackEventDescriptor)
                    return d;
                var m = new $root.perfetto.protos.TrackEventDescriptor();
                if (d.availableCategories) {
                    if (!Array.isArray(d.availableCategories))
                        throw TypeError(".perfetto.protos.TrackEventDescriptor.availableCategories: array expected");
                    m.availableCategories = [];
                    for (var i = 0; i < d.availableCategories.length; ++i) {
                        if (typeof d.availableCategories[i] !== "object")
                            throw TypeError(".perfetto.protos.TrackEventDescriptor.availableCategories: object expected");
                        m.availableCategories[i] = $root.perfetto.protos.TrackEventCategory.fromObject(d.availableCategories[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a TrackEventDescriptor message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrackEventDescriptor
             * @static
             * @param {perfetto.protos.TrackEventDescriptor} m TrackEventDescriptor
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrackEventDescriptor.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.availableCategories = [];
                }
                if (m.availableCategories && m.availableCategories.length) {
                    d.availableCategories = [];
                    for (var j = 0; j < m.availableCategories.length; ++j) {
                        d.availableCategories[j] = $root.perfetto.protos.TrackEventCategory.toObject(m.availableCategories[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this TrackEventDescriptor to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrackEventDescriptor
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrackEventDescriptor.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrackEventDescriptor;
        })();

        protos.DataSourceDescriptor = (function() {

            /**
             * Properties of a DataSourceDescriptor.
             * @memberof perfetto.protos
             * @interface IDataSourceDescriptor
             * @property {string|null} [name] DataSourceDescriptor name
             * @property {number|null} [id] DataSourceDescriptor id
             * @property {boolean|null} [willNotifyOnStop] DataSourceDescriptor willNotifyOnStop
             * @property {boolean|null} [willNotifyOnStart] DataSourceDescriptor willNotifyOnStart
             * @property {boolean|null} [handlesIncrementalStateClear] DataSourceDescriptor handlesIncrementalStateClear
             * @property {perfetto.protos.IGpuCounterDescriptor|null} [gpuCounterDescriptor] DataSourceDescriptor gpuCounterDescriptor
             * @property {perfetto.protos.ITrackEventDescriptor|null} [trackEventDescriptor] DataSourceDescriptor trackEventDescriptor
             * @property {perfetto.protos.IFtraceDescriptor|null} [ftraceDescriptor] DataSourceDescriptor ftraceDescriptor
             */

            /**
             * Constructs a new DataSourceDescriptor.
             * @memberof perfetto.protos
             * @classdesc Represents a DataSourceDescriptor.
             * @implements IDataSourceDescriptor
             * @constructor
             * @param {perfetto.protos.IDataSourceDescriptor=} [p] Properties to set
             */
            function DataSourceDescriptor(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DataSourceDescriptor name.
             * @member {string} name
             * @memberof perfetto.protos.DataSourceDescriptor
             * @instance
             */
            DataSourceDescriptor.prototype.name = "";

            /**
             * DataSourceDescriptor id.
             * @member {number} id
             * @memberof perfetto.protos.DataSourceDescriptor
             * @instance
             */
            DataSourceDescriptor.prototype.id = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * DataSourceDescriptor willNotifyOnStop.
             * @member {boolean} willNotifyOnStop
             * @memberof perfetto.protos.DataSourceDescriptor
             * @instance
             */
            DataSourceDescriptor.prototype.willNotifyOnStop = false;

            /**
             * DataSourceDescriptor willNotifyOnStart.
             * @member {boolean} willNotifyOnStart
             * @memberof perfetto.protos.DataSourceDescriptor
             * @instance
             */
            DataSourceDescriptor.prototype.willNotifyOnStart = false;

            /**
             * DataSourceDescriptor handlesIncrementalStateClear.
             * @member {boolean} handlesIncrementalStateClear
             * @memberof perfetto.protos.DataSourceDescriptor
             * @instance
             */
            DataSourceDescriptor.prototype.handlesIncrementalStateClear = false;

            /**
             * DataSourceDescriptor gpuCounterDescriptor.
             * @member {perfetto.protos.IGpuCounterDescriptor|null|undefined} gpuCounterDescriptor
             * @memberof perfetto.protos.DataSourceDescriptor
             * @instance
             */
            DataSourceDescriptor.prototype.gpuCounterDescriptor = null;

            /**
             * DataSourceDescriptor trackEventDescriptor.
             * @member {perfetto.protos.ITrackEventDescriptor|null|undefined} trackEventDescriptor
             * @memberof perfetto.protos.DataSourceDescriptor
             * @instance
             */
            DataSourceDescriptor.prototype.trackEventDescriptor = null;

            /**
             * DataSourceDescriptor ftraceDescriptor.
             * @member {perfetto.protos.IFtraceDescriptor|null|undefined} ftraceDescriptor
             * @memberof perfetto.protos.DataSourceDescriptor
             * @instance
             */
            DataSourceDescriptor.prototype.ftraceDescriptor = null;

            /**
             * Creates a new DataSourceDescriptor instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DataSourceDescriptor
             * @static
             * @param {perfetto.protos.IDataSourceDescriptor=} [properties] Properties to set
             * @returns {perfetto.protos.DataSourceDescriptor} DataSourceDescriptor instance
             */
            DataSourceDescriptor.create = function create(properties) {
                return new DataSourceDescriptor(properties);
            };

            /**
             * Encodes the specified DataSourceDescriptor message. Does not implicitly {@link perfetto.protos.DataSourceDescriptor.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DataSourceDescriptor
             * @static
             * @param {perfetto.protos.IDataSourceDescriptor} m DataSourceDescriptor message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DataSourceDescriptor.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                if (m.willNotifyOnStop != null && Object.hasOwnProperty.call(m, "willNotifyOnStop"))
                    w.uint32(16).bool(m.willNotifyOnStop);
                if (m.willNotifyOnStart != null && Object.hasOwnProperty.call(m, "willNotifyOnStart"))
                    w.uint32(24).bool(m.willNotifyOnStart);
                if (m.handlesIncrementalStateClear != null && Object.hasOwnProperty.call(m, "handlesIncrementalStateClear"))
                    w.uint32(32).bool(m.handlesIncrementalStateClear);
                if (m.gpuCounterDescriptor != null && Object.hasOwnProperty.call(m, "gpuCounterDescriptor"))
                    $root.perfetto.protos.GpuCounterDescriptor.encode(m.gpuCounterDescriptor, w.uint32(42).fork()).ldelim();
                if (m.trackEventDescriptor != null && Object.hasOwnProperty.call(m, "trackEventDescriptor"))
                    $root.perfetto.protos.TrackEventDescriptor.encode(m.trackEventDescriptor, w.uint32(50).fork()).ldelim();
                if (m.id != null && Object.hasOwnProperty.call(m, "id"))
                    w.uint32(56).uint64(m.id);
                if (m.ftraceDescriptor != null && Object.hasOwnProperty.call(m, "ftraceDescriptor"))
                    $root.perfetto.protos.FtraceDescriptor.encode(m.ftraceDescriptor, w.uint32(66).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified DataSourceDescriptor message, length delimited. Does not implicitly {@link perfetto.protos.DataSourceDescriptor.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DataSourceDescriptor
             * @static
             * @param {perfetto.protos.IDataSourceDescriptor} message DataSourceDescriptor message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DataSourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DataSourceDescriptor message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DataSourceDescriptor
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DataSourceDescriptor} DataSourceDescriptor
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DataSourceDescriptor.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DataSourceDescriptor();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    case 7:
                        m.id = r.uint64();
                        break;
                    case 2:
                        m.willNotifyOnStop = r.bool();
                        break;
                    case 3:
                        m.willNotifyOnStart = r.bool();
                        break;
                    case 4:
                        m.handlesIncrementalStateClear = r.bool();
                        break;
                    case 5:
                        m.gpuCounterDescriptor = $root.perfetto.protos.GpuCounterDescriptor.decode(r, r.uint32());
                        break;
                    case 6:
                        m.trackEventDescriptor = $root.perfetto.protos.TrackEventDescriptor.decode(r, r.uint32());
                        break;
                    case 8:
                        m.ftraceDescriptor = $root.perfetto.protos.FtraceDescriptor.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DataSourceDescriptor message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DataSourceDescriptor
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DataSourceDescriptor} DataSourceDescriptor
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DataSourceDescriptor.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DataSourceDescriptor message.
             * @function verify
             * @memberof perfetto.protos.DataSourceDescriptor
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DataSourceDescriptor.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.id != null && m.hasOwnProperty("id")) {
                    if (!$util.isInteger(m.id) && !(m.id && $util.isInteger(m.id.low) && $util.isInteger(m.id.high)))
                        return "id: integer|Long expected";
                }
                if (m.willNotifyOnStop != null && m.hasOwnProperty("willNotifyOnStop")) {
                    if (typeof m.willNotifyOnStop !== "boolean")
                        return "willNotifyOnStop: boolean expected";
                }
                if (m.willNotifyOnStart != null && m.hasOwnProperty("willNotifyOnStart")) {
                    if (typeof m.willNotifyOnStart !== "boolean")
                        return "willNotifyOnStart: boolean expected";
                }
                if (m.handlesIncrementalStateClear != null && m.hasOwnProperty("handlesIncrementalStateClear")) {
                    if (typeof m.handlesIncrementalStateClear !== "boolean")
                        return "handlesIncrementalStateClear: boolean expected";
                }
                if (m.gpuCounterDescriptor != null && m.hasOwnProperty("gpuCounterDescriptor")) {
                    {
                        var e = $root.perfetto.protos.GpuCounterDescriptor.verify(m.gpuCounterDescriptor);
                        if (e)
                            return "gpuCounterDescriptor." + e;
                    }
                }
                if (m.trackEventDescriptor != null && m.hasOwnProperty("trackEventDescriptor")) {
                    {
                        var e = $root.perfetto.protos.TrackEventDescriptor.verify(m.trackEventDescriptor);
                        if (e)
                            return "trackEventDescriptor." + e;
                    }
                }
                if (m.ftraceDescriptor != null && m.hasOwnProperty("ftraceDescriptor")) {
                    {
                        var e = $root.perfetto.protos.FtraceDescriptor.verify(m.ftraceDescriptor);
                        if (e)
                            return "ftraceDescriptor." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a DataSourceDescriptor message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DataSourceDescriptor
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DataSourceDescriptor} DataSourceDescriptor
             */
            DataSourceDescriptor.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DataSourceDescriptor)
                    return d;
                var m = new $root.perfetto.protos.DataSourceDescriptor();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.id != null) {
                    if ($util.Long)
                        (m.id = $util.Long.fromValue(d.id)).unsigned = true;
                    else if (typeof d.id === "string")
                        m.id = parseInt(d.id, 10);
                    else if (typeof d.id === "number")
                        m.id = d.id;
                    else if (typeof d.id === "object")
                        m.id = new $util.LongBits(d.id.low >>> 0, d.id.high >>> 0).toNumber(true);
                }
                if (d.willNotifyOnStop != null) {
                    m.willNotifyOnStop = Boolean(d.willNotifyOnStop);
                }
                if (d.willNotifyOnStart != null) {
                    m.willNotifyOnStart = Boolean(d.willNotifyOnStart);
                }
                if (d.handlesIncrementalStateClear != null) {
                    m.handlesIncrementalStateClear = Boolean(d.handlesIncrementalStateClear);
                }
                if (d.gpuCounterDescriptor != null) {
                    if (typeof d.gpuCounterDescriptor !== "object")
                        throw TypeError(".perfetto.protos.DataSourceDescriptor.gpuCounterDescriptor: object expected");
                    m.gpuCounterDescriptor = $root.perfetto.protos.GpuCounterDescriptor.fromObject(d.gpuCounterDescriptor);
                }
                if (d.trackEventDescriptor != null) {
                    if (typeof d.trackEventDescriptor !== "object")
                        throw TypeError(".perfetto.protos.DataSourceDescriptor.trackEventDescriptor: object expected");
                    m.trackEventDescriptor = $root.perfetto.protos.TrackEventDescriptor.fromObject(d.trackEventDescriptor);
                }
                if (d.ftraceDescriptor != null) {
                    if (typeof d.ftraceDescriptor !== "object")
                        throw TypeError(".perfetto.protos.DataSourceDescriptor.ftraceDescriptor: object expected");
                    m.ftraceDescriptor = $root.perfetto.protos.FtraceDescriptor.fromObject(d.ftraceDescriptor);
                }
                return m;
            };

            /**
             * Creates a plain object from a DataSourceDescriptor message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DataSourceDescriptor
             * @static
             * @param {perfetto.protos.DataSourceDescriptor} m DataSourceDescriptor
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DataSourceDescriptor.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                    d.willNotifyOnStop = false;
                    d.willNotifyOnStart = false;
                    d.handlesIncrementalStateClear = false;
                    d.gpuCounterDescriptor = null;
                    d.trackEventDescriptor = null;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.id = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.id = o.longs === String ? "0" : 0;
                    d.ftraceDescriptor = null;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.willNotifyOnStop != null && m.hasOwnProperty("willNotifyOnStop")) {
                    d.willNotifyOnStop = m.willNotifyOnStop;
                }
                if (m.willNotifyOnStart != null && m.hasOwnProperty("willNotifyOnStart")) {
                    d.willNotifyOnStart = m.willNotifyOnStart;
                }
                if (m.handlesIncrementalStateClear != null && m.hasOwnProperty("handlesIncrementalStateClear")) {
                    d.handlesIncrementalStateClear = m.handlesIncrementalStateClear;
                }
                if (m.gpuCounterDescriptor != null && m.hasOwnProperty("gpuCounterDescriptor")) {
                    d.gpuCounterDescriptor = $root.perfetto.protos.GpuCounterDescriptor.toObject(m.gpuCounterDescriptor, o);
                }
                if (m.trackEventDescriptor != null && m.hasOwnProperty("trackEventDescriptor")) {
                    d.trackEventDescriptor = $root.perfetto.protos.TrackEventDescriptor.toObject(m.trackEventDescriptor, o);
                }
                if (m.id != null && m.hasOwnProperty("id")) {
                    if (typeof m.id === "number")
                        d.id = o.longs === String ? String(m.id) : m.id;
                    else
                        d.id = o.longs === String ? $util.Long.prototype.toString.call(m.id) : o.longs === Number ? new $util.LongBits(m.id.low >>> 0, m.id.high >>> 0).toNumber(true) : m.id;
                }
                if (m.ftraceDescriptor != null && m.hasOwnProperty("ftraceDescriptor")) {
                    d.ftraceDescriptor = $root.perfetto.protos.FtraceDescriptor.toObject(m.ftraceDescriptor, o);
                }
                return d;
            };

            /**
             * Converts this DataSourceDescriptor to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DataSourceDescriptor
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DataSourceDescriptor.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DataSourceDescriptor;
        })();

        protos.TracingServiceState = (function() {

            /**
             * Properties of a TracingServiceState.
             * @memberof perfetto.protos
             * @interface ITracingServiceState
             * @property {Array.<perfetto.protos.TracingServiceState.IProducer>|null} [producers] TracingServiceState producers
             * @property {Array.<perfetto.protos.TracingServiceState.IDataSource>|null} [dataSources] TracingServiceState dataSources
             * @property {Array.<perfetto.protos.TracingServiceState.ITracingSession>|null} [tracingSessions] TracingServiceState tracingSessions
             * @property {boolean|null} [supportsTracingSessions] TracingServiceState supportsTracingSessions
             * @property {number|null} [numSessions] TracingServiceState numSessions
             * @property {number|null} [numSessionsStarted] TracingServiceState numSessionsStarted
             * @property {string|null} [tracingServiceVersion] TracingServiceState tracingServiceVersion
             */

            /**
             * Constructs a new TracingServiceState.
             * @memberof perfetto.protos
             * @classdesc Represents a TracingServiceState.
             * @implements ITracingServiceState
             * @constructor
             * @param {perfetto.protos.ITracingServiceState=} [p] Properties to set
             */
            function TracingServiceState(p) {
                this.producers = [];
                this.dataSources = [];
                this.tracingSessions = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TracingServiceState producers.
             * @member {Array.<perfetto.protos.TracingServiceState.IProducer>} producers
             * @memberof perfetto.protos.TracingServiceState
             * @instance
             */
            TracingServiceState.prototype.producers = $util.emptyArray;

            /**
             * TracingServiceState dataSources.
             * @member {Array.<perfetto.protos.TracingServiceState.IDataSource>} dataSources
             * @memberof perfetto.protos.TracingServiceState
             * @instance
             */
            TracingServiceState.prototype.dataSources = $util.emptyArray;

            /**
             * TracingServiceState tracingSessions.
             * @member {Array.<perfetto.protos.TracingServiceState.ITracingSession>} tracingSessions
             * @memberof perfetto.protos.TracingServiceState
             * @instance
             */
            TracingServiceState.prototype.tracingSessions = $util.emptyArray;

            /**
             * TracingServiceState supportsTracingSessions.
             * @member {boolean} supportsTracingSessions
             * @memberof perfetto.protos.TracingServiceState
             * @instance
             */
            TracingServiceState.prototype.supportsTracingSessions = false;

            /**
             * TracingServiceState numSessions.
             * @member {number} numSessions
             * @memberof perfetto.protos.TracingServiceState
             * @instance
             */
            TracingServiceState.prototype.numSessions = 0;

            /**
             * TracingServiceState numSessionsStarted.
             * @member {number} numSessionsStarted
             * @memberof perfetto.protos.TracingServiceState
             * @instance
             */
            TracingServiceState.prototype.numSessionsStarted = 0;

            /**
             * TracingServiceState tracingServiceVersion.
             * @member {string} tracingServiceVersion
             * @memberof perfetto.protos.TracingServiceState
             * @instance
             */
            TracingServiceState.prototype.tracingServiceVersion = "";

            /**
             * Creates a new TracingServiceState instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TracingServiceState
             * @static
             * @param {perfetto.protos.ITracingServiceState=} [properties] Properties to set
             * @returns {perfetto.protos.TracingServiceState} TracingServiceState instance
             */
            TracingServiceState.create = function create(properties) {
                return new TracingServiceState(properties);
            };

            /**
             * Encodes the specified TracingServiceState message. Does not implicitly {@link perfetto.protos.TracingServiceState.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TracingServiceState
             * @static
             * @param {perfetto.protos.ITracingServiceState} m TracingServiceState message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TracingServiceState.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.producers != null && m.producers.length) {
                    for (var i = 0; i < m.producers.length; ++i)
                        $root.perfetto.protos.TracingServiceState.Producer.encode(m.producers[i], w.uint32(10).fork()).ldelim();
                }
                if (m.dataSources != null && m.dataSources.length) {
                    for (var i = 0; i < m.dataSources.length; ++i)
                        $root.perfetto.protos.TracingServiceState.DataSource.encode(m.dataSources[i], w.uint32(18).fork()).ldelim();
                }
                if (m.numSessions != null && Object.hasOwnProperty.call(m, "numSessions"))
                    w.uint32(24).int32(m.numSessions);
                if (m.numSessionsStarted != null && Object.hasOwnProperty.call(m, "numSessionsStarted"))
                    w.uint32(32).int32(m.numSessionsStarted);
                if (m.tracingServiceVersion != null && Object.hasOwnProperty.call(m, "tracingServiceVersion"))
                    w.uint32(42).string(m.tracingServiceVersion);
                if (m.tracingSessions != null && m.tracingSessions.length) {
                    for (var i = 0; i < m.tracingSessions.length; ++i)
                        $root.perfetto.protos.TracingServiceState.TracingSession.encode(m.tracingSessions[i], w.uint32(50).fork()).ldelim();
                }
                if (m.supportsTracingSessions != null && Object.hasOwnProperty.call(m, "supportsTracingSessions"))
                    w.uint32(56).bool(m.supportsTracingSessions);
                return w;
            };

            /**
             * Encodes the specified TracingServiceState message, length delimited. Does not implicitly {@link perfetto.protos.TracingServiceState.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TracingServiceState
             * @static
             * @param {perfetto.protos.ITracingServiceState} message TracingServiceState message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TracingServiceState.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TracingServiceState message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TracingServiceState
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TracingServiceState} TracingServiceState
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TracingServiceState.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TracingServiceState();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.producers && m.producers.length))
                            m.producers = [];
                        m.producers.push($root.perfetto.protos.TracingServiceState.Producer.decode(r, r.uint32()));
                        break;
                    case 2:
                        if (!(m.dataSources && m.dataSources.length))
                            m.dataSources = [];
                        m.dataSources.push($root.perfetto.protos.TracingServiceState.DataSource.decode(r, r.uint32()));
                        break;
                    case 6:
                        if (!(m.tracingSessions && m.tracingSessions.length))
                            m.tracingSessions = [];
                        m.tracingSessions.push($root.perfetto.protos.TracingServiceState.TracingSession.decode(r, r.uint32()));
                        break;
                    case 7:
                        m.supportsTracingSessions = r.bool();
                        break;
                    case 3:
                        m.numSessions = r.int32();
                        break;
                    case 4:
                        m.numSessionsStarted = r.int32();
                        break;
                    case 5:
                        m.tracingServiceVersion = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TracingServiceState message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TracingServiceState
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TracingServiceState} TracingServiceState
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TracingServiceState.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TracingServiceState message.
             * @function verify
             * @memberof perfetto.protos.TracingServiceState
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TracingServiceState.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.producers != null && m.hasOwnProperty("producers")) {
                    if (!Array.isArray(m.producers))
                        return "producers: array expected";
                    for (var i = 0; i < m.producers.length; ++i) {
                        {
                            var e = $root.perfetto.protos.TracingServiceState.Producer.verify(m.producers[i]);
                            if (e)
                                return "producers." + e;
                        }
                    }
                }
                if (m.dataSources != null && m.hasOwnProperty("dataSources")) {
                    if (!Array.isArray(m.dataSources))
                        return "dataSources: array expected";
                    for (var i = 0; i < m.dataSources.length; ++i) {
                        {
                            var e = $root.perfetto.protos.TracingServiceState.DataSource.verify(m.dataSources[i]);
                            if (e)
                                return "dataSources." + e;
                        }
                    }
                }
                if (m.tracingSessions != null && m.hasOwnProperty("tracingSessions")) {
                    if (!Array.isArray(m.tracingSessions))
                        return "tracingSessions: array expected";
                    for (var i = 0; i < m.tracingSessions.length; ++i) {
                        {
                            var e = $root.perfetto.protos.TracingServiceState.TracingSession.verify(m.tracingSessions[i]);
                            if (e)
                                return "tracingSessions." + e;
                        }
                    }
                }
                if (m.supportsTracingSessions != null && m.hasOwnProperty("supportsTracingSessions")) {
                    if (typeof m.supportsTracingSessions !== "boolean")
                        return "supportsTracingSessions: boolean expected";
                }
                if (m.numSessions != null && m.hasOwnProperty("numSessions")) {
                    if (!$util.isInteger(m.numSessions))
                        return "numSessions: integer expected";
                }
                if (m.numSessionsStarted != null && m.hasOwnProperty("numSessionsStarted")) {
                    if (!$util.isInteger(m.numSessionsStarted))
                        return "numSessionsStarted: integer expected";
                }
                if (m.tracingServiceVersion != null && m.hasOwnProperty("tracingServiceVersion")) {
                    if (!$util.isString(m.tracingServiceVersion))
                        return "tracingServiceVersion: string expected";
                }
                return null;
            };

            /**
             * Creates a TracingServiceState message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TracingServiceState
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TracingServiceState} TracingServiceState
             */
            TracingServiceState.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TracingServiceState)
                    return d;
                var m = new $root.perfetto.protos.TracingServiceState();
                if (d.producers) {
                    if (!Array.isArray(d.producers))
                        throw TypeError(".perfetto.protos.TracingServiceState.producers: array expected");
                    m.producers = [];
                    for (var i = 0; i < d.producers.length; ++i) {
                        if (typeof d.producers[i] !== "object")
                            throw TypeError(".perfetto.protos.TracingServiceState.producers: object expected");
                        m.producers[i] = $root.perfetto.protos.TracingServiceState.Producer.fromObject(d.producers[i]);
                    }
                }
                if (d.dataSources) {
                    if (!Array.isArray(d.dataSources))
                        throw TypeError(".perfetto.protos.TracingServiceState.dataSources: array expected");
                    m.dataSources = [];
                    for (var i = 0; i < d.dataSources.length; ++i) {
                        if (typeof d.dataSources[i] !== "object")
                            throw TypeError(".perfetto.protos.TracingServiceState.dataSources: object expected");
                        m.dataSources[i] = $root.perfetto.protos.TracingServiceState.DataSource.fromObject(d.dataSources[i]);
                    }
                }
                if (d.tracingSessions) {
                    if (!Array.isArray(d.tracingSessions))
                        throw TypeError(".perfetto.protos.TracingServiceState.tracingSessions: array expected");
                    m.tracingSessions = [];
                    for (var i = 0; i < d.tracingSessions.length; ++i) {
                        if (typeof d.tracingSessions[i] !== "object")
                            throw TypeError(".perfetto.protos.TracingServiceState.tracingSessions: object expected");
                        m.tracingSessions[i] = $root.perfetto.protos.TracingServiceState.TracingSession.fromObject(d.tracingSessions[i]);
                    }
                }
                if (d.supportsTracingSessions != null) {
                    m.supportsTracingSessions = Boolean(d.supportsTracingSessions);
                }
                if (d.numSessions != null) {
                    m.numSessions = d.numSessions | 0;
                }
                if (d.numSessionsStarted != null) {
                    m.numSessionsStarted = d.numSessionsStarted | 0;
                }
                if (d.tracingServiceVersion != null) {
                    m.tracingServiceVersion = String(d.tracingServiceVersion);
                }
                return m;
            };

            /**
             * Creates a plain object from a TracingServiceState message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TracingServiceState
             * @static
             * @param {perfetto.protos.TracingServiceState} m TracingServiceState
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TracingServiceState.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.producers = [];
                    d.dataSources = [];
                    d.tracingSessions = [];
                }
                if (o.defaults) {
                    d.numSessions = 0;
                    d.numSessionsStarted = 0;
                    d.tracingServiceVersion = "";
                    d.supportsTracingSessions = false;
                }
                if (m.producers && m.producers.length) {
                    d.producers = [];
                    for (var j = 0; j < m.producers.length; ++j) {
                        d.producers[j] = $root.perfetto.protos.TracingServiceState.Producer.toObject(m.producers[j], o);
                    }
                }
                if (m.dataSources && m.dataSources.length) {
                    d.dataSources = [];
                    for (var j = 0; j < m.dataSources.length; ++j) {
                        d.dataSources[j] = $root.perfetto.protos.TracingServiceState.DataSource.toObject(m.dataSources[j], o);
                    }
                }
                if (m.numSessions != null && m.hasOwnProperty("numSessions")) {
                    d.numSessions = m.numSessions;
                }
                if (m.numSessionsStarted != null && m.hasOwnProperty("numSessionsStarted")) {
                    d.numSessionsStarted = m.numSessionsStarted;
                }
                if (m.tracingServiceVersion != null && m.hasOwnProperty("tracingServiceVersion")) {
                    d.tracingServiceVersion = m.tracingServiceVersion;
                }
                if (m.tracingSessions && m.tracingSessions.length) {
                    d.tracingSessions = [];
                    for (var j = 0; j < m.tracingSessions.length; ++j) {
                        d.tracingSessions[j] = $root.perfetto.protos.TracingServiceState.TracingSession.toObject(m.tracingSessions[j], o);
                    }
                }
                if (m.supportsTracingSessions != null && m.hasOwnProperty("supportsTracingSessions")) {
                    d.supportsTracingSessions = m.supportsTracingSessions;
                }
                return d;
            };

            /**
             * Converts this TracingServiceState to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TracingServiceState
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TracingServiceState.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            TracingServiceState.Producer = (function() {

                /**
                 * Properties of a Producer.
                 * @memberof perfetto.protos.TracingServiceState
                 * @interface IProducer
                 * @property {number|null} [id] Producer id
                 * @property {string|null} [name] Producer name
                 * @property {number|null} [pid] Producer pid
                 * @property {number|null} [uid] Producer uid
                 * @property {string|null} [sdkVersion] Producer sdkVersion
                 */

                /**
                 * Constructs a new Producer.
                 * @memberof perfetto.protos.TracingServiceState
                 * @classdesc Represents a Producer.
                 * @implements IProducer
                 * @constructor
                 * @param {perfetto.protos.TracingServiceState.IProducer=} [p] Properties to set
                 */
                function Producer(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Producer id.
                 * @member {number} id
                 * @memberof perfetto.protos.TracingServiceState.Producer
                 * @instance
                 */
                Producer.prototype.id = 0;

                /**
                 * Producer name.
                 * @member {string} name
                 * @memberof perfetto.protos.TracingServiceState.Producer
                 * @instance
                 */
                Producer.prototype.name = "";

                /**
                 * Producer pid.
                 * @member {number} pid
                 * @memberof perfetto.protos.TracingServiceState.Producer
                 * @instance
                 */
                Producer.prototype.pid = 0;

                /**
                 * Producer uid.
                 * @member {number} uid
                 * @memberof perfetto.protos.TracingServiceState.Producer
                 * @instance
                 */
                Producer.prototype.uid = 0;

                /**
                 * Producer sdkVersion.
                 * @member {string} sdkVersion
                 * @memberof perfetto.protos.TracingServiceState.Producer
                 * @instance
                 */
                Producer.prototype.sdkVersion = "";

                /**
                 * Creates a new Producer instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.TracingServiceState.Producer
                 * @static
                 * @param {perfetto.protos.TracingServiceState.IProducer=} [properties] Properties to set
                 * @returns {perfetto.protos.TracingServiceState.Producer} Producer instance
                 */
                Producer.create = function create(properties) {
                    return new Producer(properties);
                };

                /**
                 * Encodes the specified Producer message. Does not implicitly {@link perfetto.protos.TracingServiceState.Producer.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.TracingServiceState.Producer
                 * @static
                 * @param {perfetto.protos.TracingServiceState.IProducer} m Producer message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Producer.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.id != null && Object.hasOwnProperty.call(m, "id"))
                        w.uint32(8).int32(m.id);
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(18).string(m.name);
                    if (m.uid != null && Object.hasOwnProperty.call(m, "uid"))
                        w.uint32(24).int32(m.uid);
                    if (m.sdkVersion != null && Object.hasOwnProperty.call(m, "sdkVersion"))
                        w.uint32(34).string(m.sdkVersion);
                    if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                        w.uint32(40).int32(m.pid);
                    return w;
                };

                /**
                 * Encodes the specified Producer message, length delimited. Does not implicitly {@link perfetto.protos.TracingServiceState.Producer.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.TracingServiceState.Producer
                 * @static
                 * @param {perfetto.protos.TracingServiceState.IProducer} message Producer message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Producer.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Producer message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.TracingServiceState.Producer
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.TracingServiceState.Producer} Producer
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Producer.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TracingServiceState.Producer();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.id = r.int32();
                            break;
                        case 2:
                            m.name = r.string();
                            break;
                        case 5:
                            m.pid = r.int32();
                            break;
                        case 3:
                            m.uid = r.int32();
                            break;
                        case 4:
                            m.sdkVersion = r.string();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Producer message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.TracingServiceState.Producer
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.TracingServiceState.Producer} Producer
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Producer.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Producer message.
                 * @function verify
                 * @memberof perfetto.protos.TracingServiceState.Producer
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Producer.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.id != null && m.hasOwnProperty("id")) {
                        if (!$util.isInteger(m.id))
                            return "id: integer expected";
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        if (!$util.isInteger(m.pid))
                            return "pid: integer expected";
                    }
                    if (m.uid != null && m.hasOwnProperty("uid")) {
                        if (!$util.isInteger(m.uid))
                            return "uid: integer expected";
                    }
                    if (m.sdkVersion != null && m.hasOwnProperty("sdkVersion")) {
                        if (!$util.isString(m.sdkVersion))
                            return "sdkVersion: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a Producer message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.TracingServiceState.Producer
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.TracingServiceState.Producer} Producer
                 */
                Producer.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.TracingServiceState.Producer)
                        return d;
                    var m = new $root.perfetto.protos.TracingServiceState.Producer();
                    if (d.id != null) {
                        m.id = d.id | 0;
                    }
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    if (d.pid != null) {
                        m.pid = d.pid | 0;
                    }
                    if (d.uid != null) {
                        m.uid = d.uid | 0;
                    }
                    if (d.sdkVersion != null) {
                        m.sdkVersion = String(d.sdkVersion);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Producer message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.TracingServiceState.Producer
                 * @static
                 * @param {perfetto.protos.TracingServiceState.Producer} m Producer
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Producer.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.id = 0;
                        d.name = "";
                        d.uid = 0;
                        d.sdkVersion = "";
                        d.pid = 0;
                    }
                    if (m.id != null && m.hasOwnProperty("id")) {
                        d.id = m.id;
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    if (m.uid != null && m.hasOwnProperty("uid")) {
                        d.uid = m.uid;
                    }
                    if (m.sdkVersion != null && m.hasOwnProperty("sdkVersion")) {
                        d.sdkVersion = m.sdkVersion;
                    }
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        d.pid = m.pid;
                    }
                    return d;
                };

                /**
                 * Converts this Producer to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.TracingServiceState.Producer
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Producer.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Producer;
            })();

            TracingServiceState.DataSource = (function() {

                /**
                 * Properties of a DataSource.
                 * @memberof perfetto.protos.TracingServiceState
                 * @interface IDataSource
                 * @property {perfetto.protos.IDataSourceDescriptor|null} [dsDescriptor] DataSource dsDescriptor
                 * @property {number|null} [producerId] DataSource producerId
                 */

                /**
                 * Constructs a new DataSource.
                 * @memberof perfetto.protos.TracingServiceState
                 * @classdesc Represents a DataSource.
                 * @implements IDataSource
                 * @constructor
                 * @param {perfetto.protos.TracingServiceState.IDataSource=} [p] Properties to set
                 */
                function DataSource(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * DataSource dsDescriptor.
                 * @member {perfetto.protos.IDataSourceDescriptor|null|undefined} dsDescriptor
                 * @memberof perfetto.protos.TracingServiceState.DataSource
                 * @instance
                 */
                DataSource.prototype.dsDescriptor = null;

                /**
                 * DataSource producerId.
                 * @member {number} producerId
                 * @memberof perfetto.protos.TracingServiceState.DataSource
                 * @instance
                 */
                DataSource.prototype.producerId = 0;

                /**
                 * Creates a new DataSource instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.TracingServiceState.DataSource
                 * @static
                 * @param {perfetto.protos.TracingServiceState.IDataSource=} [properties] Properties to set
                 * @returns {perfetto.protos.TracingServiceState.DataSource} DataSource instance
                 */
                DataSource.create = function create(properties) {
                    return new DataSource(properties);
                };

                /**
                 * Encodes the specified DataSource message. Does not implicitly {@link perfetto.protos.TracingServiceState.DataSource.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.TracingServiceState.DataSource
                 * @static
                 * @param {perfetto.protos.TracingServiceState.IDataSource} m DataSource message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                DataSource.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.dsDescriptor != null && Object.hasOwnProperty.call(m, "dsDescriptor"))
                        $root.perfetto.protos.DataSourceDescriptor.encode(m.dsDescriptor, w.uint32(10).fork()).ldelim();
                    if (m.producerId != null && Object.hasOwnProperty.call(m, "producerId"))
                        w.uint32(16).int32(m.producerId);
                    return w;
                };

                /**
                 * Encodes the specified DataSource message, length delimited. Does not implicitly {@link perfetto.protos.TracingServiceState.DataSource.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.TracingServiceState.DataSource
                 * @static
                 * @param {perfetto.protos.TracingServiceState.IDataSource} message DataSource message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                DataSource.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a DataSource message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.TracingServiceState.DataSource
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.TracingServiceState.DataSource} DataSource
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                DataSource.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TracingServiceState.DataSource();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.dsDescriptor = $root.perfetto.protos.DataSourceDescriptor.decode(r, r.uint32());
                            break;
                        case 2:
                            m.producerId = r.int32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a DataSource message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.TracingServiceState.DataSource
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.TracingServiceState.DataSource} DataSource
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                DataSource.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a DataSource message.
                 * @function verify
                 * @memberof perfetto.protos.TracingServiceState.DataSource
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                DataSource.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.dsDescriptor != null && m.hasOwnProperty("dsDescriptor")) {
                        {
                            var e = $root.perfetto.protos.DataSourceDescriptor.verify(m.dsDescriptor);
                            if (e)
                                return "dsDescriptor." + e;
                        }
                    }
                    if (m.producerId != null && m.hasOwnProperty("producerId")) {
                        if (!$util.isInteger(m.producerId))
                            return "producerId: integer expected";
                    }
                    return null;
                };

                /**
                 * Creates a DataSource message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.TracingServiceState.DataSource
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.TracingServiceState.DataSource} DataSource
                 */
                DataSource.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.TracingServiceState.DataSource)
                        return d;
                    var m = new $root.perfetto.protos.TracingServiceState.DataSource();
                    if (d.dsDescriptor != null) {
                        if (typeof d.dsDescriptor !== "object")
                            throw TypeError(".perfetto.protos.TracingServiceState.DataSource.dsDescriptor: object expected");
                        m.dsDescriptor = $root.perfetto.protos.DataSourceDescriptor.fromObject(d.dsDescriptor);
                    }
                    if (d.producerId != null) {
                        m.producerId = d.producerId | 0;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a DataSource message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.TracingServiceState.DataSource
                 * @static
                 * @param {perfetto.protos.TracingServiceState.DataSource} m DataSource
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                DataSource.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.dsDescriptor = null;
                        d.producerId = 0;
                    }
                    if (m.dsDescriptor != null && m.hasOwnProperty("dsDescriptor")) {
                        d.dsDescriptor = $root.perfetto.protos.DataSourceDescriptor.toObject(m.dsDescriptor, o);
                    }
                    if (m.producerId != null && m.hasOwnProperty("producerId")) {
                        d.producerId = m.producerId;
                    }
                    return d;
                };

                /**
                 * Converts this DataSource to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.TracingServiceState.DataSource
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                DataSource.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return DataSource;
            })();

            TracingServiceState.TracingSession = (function() {

                /**
                 * Properties of a TracingSession.
                 * @memberof perfetto.protos.TracingServiceState
                 * @interface ITracingSession
                 * @property {number|null} [id] TracingSession id
                 * @property {number|null} [consumerUid] TracingSession consumerUid
                 * @property {string|null} [state] TracingSession state
                 * @property {string|null} [uniqueSessionName] TracingSession uniqueSessionName
                 * @property {Array.<number>|null} [bufferSizeKb] TracingSession bufferSizeKb
                 * @property {number|null} [durationMs] TracingSession durationMs
                 * @property {number|null} [numDataSources] TracingSession numDataSources
                 * @property {number|null} [startRealtimeNs] TracingSession startRealtimeNs
                 */

                /**
                 * Constructs a new TracingSession.
                 * @memberof perfetto.protos.TracingServiceState
                 * @classdesc Represents a TracingSession.
                 * @implements ITracingSession
                 * @constructor
                 * @param {perfetto.protos.TracingServiceState.ITracingSession=} [p] Properties to set
                 */
                function TracingSession(p) {
                    this.bufferSizeKb = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * TracingSession id.
                 * @member {number} id
                 * @memberof perfetto.protos.TracingServiceState.TracingSession
                 * @instance
                 */
                TracingSession.prototype.id = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * TracingSession consumerUid.
                 * @member {number} consumerUid
                 * @memberof perfetto.protos.TracingServiceState.TracingSession
                 * @instance
                 */
                TracingSession.prototype.consumerUid = 0;

                /**
                 * TracingSession state.
                 * @member {string} state
                 * @memberof perfetto.protos.TracingServiceState.TracingSession
                 * @instance
                 */
                TracingSession.prototype.state = "";

                /**
                 * TracingSession uniqueSessionName.
                 * @member {string} uniqueSessionName
                 * @memberof perfetto.protos.TracingServiceState.TracingSession
                 * @instance
                 */
                TracingSession.prototype.uniqueSessionName = "";

                /**
                 * TracingSession bufferSizeKb.
                 * @member {Array.<number>} bufferSizeKb
                 * @memberof perfetto.protos.TracingServiceState.TracingSession
                 * @instance
                 */
                TracingSession.prototype.bufferSizeKb = $util.emptyArray;

                /**
                 * TracingSession durationMs.
                 * @member {number} durationMs
                 * @memberof perfetto.protos.TracingServiceState.TracingSession
                 * @instance
                 */
                TracingSession.prototype.durationMs = 0;

                /**
                 * TracingSession numDataSources.
                 * @member {number} numDataSources
                 * @memberof perfetto.protos.TracingServiceState.TracingSession
                 * @instance
                 */
                TracingSession.prototype.numDataSources = 0;

                /**
                 * TracingSession startRealtimeNs.
                 * @member {number} startRealtimeNs
                 * @memberof perfetto.protos.TracingServiceState.TracingSession
                 * @instance
                 */
                TracingSession.prototype.startRealtimeNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new TracingSession instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.TracingServiceState.TracingSession
                 * @static
                 * @param {perfetto.protos.TracingServiceState.ITracingSession=} [properties] Properties to set
                 * @returns {perfetto.protos.TracingServiceState.TracingSession} TracingSession instance
                 */
                TracingSession.create = function create(properties) {
                    return new TracingSession(properties);
                };

                /**
                 * Encodes the specified TracingSession message. Does not implicitly {@link perfetto.protos.TracingServiceState.TracingSession.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.TracingServiceState.TracingSession
                 * @static
                 * @param {perfetto.protos.TracingServiceState.ITracingSession} m TracingSession message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                TracingSession.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.id != null && Object.hasOwnProperty.call(m, "id"))
                        w.uint32(8).uint64(m.id);
                    if (m.consumerUid != null && Object.hasOwnProperty.call(m, "consumerUid"))
                        w.uint32(16).int32(m.consumerUid);
                    if (m.state != null && Object.hasOwnProperty.call(m, "state"))
                        w.uint32(26).string(m.state);
                    if (m.uniqueSessionName != null && Object.hasOwnProperty.call(m, "uniqueSessionName"))
                        w.uint32(34).string(m.uniqueSessionName);
                    if (m.bufferSizeKb != null && m.bufferSizeKb.length) {
                        for (var i = 0; i < m.bufferSizeKb.length; ++i)
                            w.uint32(40).uint32(m.bufferSizeKb[i]);
                    }
                    if (m.durationMs != null && Object.hasOwnProperty.call(m, "durationMs"))
                        w.uint32(48).uint32(m.durationMs);
                    if (m.numDataSources != null && Object.hasOwnProperty.call(m, "numDataSources"))
                        w.uint32(56).uint32(m.numDataSources);
                    if (m.startRealtimeNs != null && Object.hasOwnProperty.call(m, "startRealtimeNs"))
                        w.uint32(64).int64(m.startRealtimeNs);
                    return w;
                };

                /**
                 * Encodes the specified TracingSession message, length delimited. Does not implicitly {@link perfetto.protos.TracingServiceState.TracingSession.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.TracingServiceState.TracingSession
                 * @static
                 * @param {perfetto.protos.TracingServiceState.ITracingSession} message TracingSession message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                TracingSession.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a TracingSession message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.TracingServiceState.TracingSession
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.TracingServiceState.TracingSession} TracingSession
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                TracingSession.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TracingServiceState.TracingSession();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.id = r.uint64();
                            break;
                        case 2:
                            m.consumerUid = r.int32();
                            break;
                        case 3:
                            m.state = r.string();
                            break;
                        case 4:
                            m.uniqueSessionName = r.string();
                            break;
                        case 5:
                            if (!(m.bufferSizeKb && m.bufferSizeKb.length))
                                m.bufferSizeKb = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.bufferSizeKb.push(r.uint32());
                            } else
                                m.bufferSizeKb.push(r.uint32());
                            break;
                        case 6:
                            m.durationMs = r.uint32();
                            break;
                        case 7:
                            m.numDataSources = r.uint32();
                            break;
                        case 8:
                            m.startRealtimeNs = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a TracingSession message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.TracingServiceState.TracingSession
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.TracingServiceState.TracingSession} TracingSession
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                TracingSession.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a TracingSession message.
                 * @function verify
                 * @memberof perfetto.protos.TracingServiceState.TracingSession
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                TracingSession.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.id != null && m.hasOwnProperty("id")) {
                        if (!$util.isInteger(m.id) && !(m.id && $util.isInteger(m.id.low) && $util.isInteger(m.id.high)))
                            return "id: integer|Long expected";
                    }
                    if (m.consumerUid != null && m.hasOwnProperty("consumerUid")) {
                        if (!$util.isInteger(m.consumerUid))
                            return "consumerUid: integer expected";
                    }
                    if (m.state != null && m.hasOwnProperty("state")) {
                        if (!$util.isString(m.state))
                            return "state: string expected";
                    }
                    if (m.uniqueSessionName != null && m.hasOwnProperty("uniqueSessionName")) {
                        if (!$util.isString(m.uniqueSessionName))
                            return "uniqueSessionName: string expected";
                    }
                    if (m.bufferSizeKb != null && m.hasOwnProperty("bufferSizeKb")) {
                        if (!Array.isArray(m.bufferSizeKb))
                            return "bufferSizeKb: array expected";
                        for (var i = 0; i < m.bufferSizeKb.length; ++i) {
                            if (!$util.isInteger(m.bufferSizeKb[i]))
                                return "bufferSizeKb: integer[] expected";
                        }
                    }
                    if (m.durationMs != null && m.hasOwnProperty("durationMs")) {
                        if (!$util.isInteger(m.durationMs))
                            return "durationMs: integer expected";
                    }
                    if (m.numDataSources != null && m.hasOwnProperty("numDataSources")) {
                        if (!$util.isInteger(m.numDataSources))
                            return "numDataSources: integer expected";
                    }
                    if (m.startRealtimeNs != null && m.hasOwnProperty("startRealtimeNs")) {
                        if (!$util.isInteger(m.startRealtimeNs) && !(m.startRealtimeNs && $util.isInteger(m.startRealtimeNs.low) && $util.isInteger(m.startRealtimeNs.high)))
                            return "startRealtimeNs: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a TracingSession message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.TracingServiceState.TracingSession
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.TracingServiceState.TracingSession} TracingSession
                 */
                TracingSession.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.TracingServiceState.TracingSession)
                        return d;
                    var m = new $root.perfetto.protos.TracingServiceState.TracingSession();
                    if (d.id != null) {
                        if ($util.Long)
                            (m.id = $util.Long.fromValue(d.id)).unsigned = true;
                        else if (typeof d.id === "string")
                            m.id = parseInt(d.id, 10);
                        else if (typeof d.id === "number")
                            m.id = d.id;
                        else if (typeof d.id === "object")
                            m.id = new $util.LongBits(d.id.low >>> 0, d.id.high >>> 0).toNumber(true);
                    }
                    if (d.consumerUid != null) {
                        m.consumerUid = d.consumerUid | 0;
                    }
                    if (d.state != null) {
                        m.state = String(d.state);
                    }
                    if (d.uniqueSessionName != null) {
                        m.uniqueSessionName = String(d.uniqueSessionName);
                    }
                    if (d.bufferSizeKb) {
                        if (!Array.isArray(d.bufferSizeKb))
                            throw TypeError(".perfetto.protos.TracingServiceState.TracingSession.bufferSizeKb: array expected");
                        m.bufferSizeKb = [];
                        for (var i = 0; i < d.bufferSizeKb.length; ++i) {
                            m.bufferSizeKb[i] = d.bufferSizeKb[i] >>> 0;
                        }
                    }
                    if (d.durationMs != null) {
                        m.durationMs = d.durationMs >>> 0;
                    }
                    if (d.numDataSources != null) {
                        m.numDataSources = d.numDataSources >>> 0;
                    }
                    if (d.startRealtimeNs != null) {
                        if ($util.Long)
                            (m.startRealtimeNs = $util.Long.fromValue(d.startRealtimeNs)).unsigned = false;
                        else if (typeof d.startRealtimeNs === "string")
                            m.startRealtimeNs = parseInt(d.startRealtimeNs, 10);
                        else if (typeof d.startRealtimeNs === "number")
                            m.startRealtimeNs = d.startRealtimeNs;
                        else if (typeof d.startRealtimeNs === "object")
                            m.startRealtimeNs = new $util.LongBits(d.startRealtimeNs.low >>> 0, d.startRealtimeNs.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a TracingSession message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.TracingServiceState.TracingSession
                 * @static
                 * @param {perfetto.protos.TracingServiceState.TracingSession} m TracingSession
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                TracingSession.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.bufferSizeKb = [];
                    }
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.id = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.id = o.longs === String ? "0" : 0;
                        d.consumerUid = 0;
                        d.state = "";
                        d.uniqueSessionName = "";
                        d.durationMs = 0;
                        d.numDataSources = 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.startRealtimeNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.startRealtimeNs = o.longs === String ? "0" : 0;
                    }
                    if (m.id != null && m.hasOwnProperty("id")) {
                        if (typeof m.id === "number")
                            d.id = o.longs === String ? String(m.id) : m.id;
                        else
                            d.id = o.longs === String ? $util.Long.prototype.toString.call(m.id) : o.longs === Number ? new $util.LongBits(m.id.low >>> 0, m.id.high >>> 0).toNumber(true) : m.id;
                    }
                    if (m.consumerUid != null && m.hasOwnProperty("consumerUid")) {
                        d.consumerUid = m.consumerUid;
                    }
                    if (m.state != null && m.hasOwnProperty("state")) {
                        d.state = m.state;
                    }
                    if (m.uniqueSessionName != null && m.hasOwnProperty("uniqueSessionName")) {
                        d.uniqueSessionName = m.uniqueSessionName;
                    }
                    if (m.bufferSizeKb && m.bufferSizeKb.length) {
                        d.bufferSizeKb = [];
                        for (var j = 0; j < m.bufferSizeKb.length; ++j) {
                            d.bufferSizeKb[j] = m.bufferSizeKb[j];
                        }
                    }
                    if (m.durationMs != null && m.hasOwnProperty("durationMs")) {
                        d.durationMs = m.durationMs;
                    }
                    if (m.numDataSources != null && m.hasOwnProperty("numDataSources")) {
                        d.numDataSources = m.numDataSources;
                    }
                    if (m.startRealtimeNs != null && m.hasOwnProperty("startRealtimeNs")) {
                        if (typeof m.startRealtimeNs === "number")
                            d.startRealtimeNs = o.longs === String ? String(m.startRealtimeNs) : m.startRealtimeNs;
                        else
                            d.startRealtimeNs = o.longs === String ? $util.Long.prototype.toString.call(m.startRealtimeNs) : o.longs === Number ? new $util.LongBits(m.startRealtimeNs.low >>> 0, m.startRealtimeNs.high >>> 0).toNumber() : m.startRealtimeNs;
                    }
                    return d;
                };

                /**
                 * Converts this TracingSession to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.TracingServiceState.TracingSession
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                TracingSession.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return TracingSession;
            })();

            return TracingServiceState;
        })();

        /**
         * BuiltinClock enum.
         * @name perfetto.protos.BuiltinClock
         * @enum {number}
         * @property {number} BUILTIN_CLOCK_UNKNOWN=0 BUILTIN_CLOCK_UNKNOWN value
         * @property {number} BUILTIN_CLOCK_REALTIME=1 BUILTIN_CLOCK_REALTIME value
         * @property {number} BUILTIN_CLOCK_REALTIME_COARSE=2 BUILTIN_CLOCK_REALTIME_COARSE value
         * @property {number} BUILTIN_CLOCK_MONOTONIC=3 BUILTIN_CLOCK_MONOTONIC value
         * @property {number} BUILTIN_CLOCK_MONOTONIC_COARSE=4 BUILTIN_CLOCK_MONOTONIC_COARSE value
         * @property {number} BUILTIN_CLOCK_MONOTONIC_RAW=5 BUILTIN_CLOCK_MONOTONIC_RAW value
         * @property {number} BUILTIN_CLOCK_BOOTTIME=6 BUILTIN_CLOCK_BOOTTIME value
         * @property {number} BUILTIN_CLOCK_MAX_ID=63 BUILTIN_CLOCK_MAX_ID value
         */
        protos.BuiltinClock = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "BUILTIN_CLOCK_UNKNOWN"] = 0;
            values[valuesById[1] = "BUILTIN_CLOCK_REALTIME"] = 1;
            values[valuesById[2] = "BUILTIN_CLOCK_REALTIME_COARSE"] = 2;
            values[valuesById[3] = "BUILTIN_CLOCK_MONOTONIC"] = 3;
            values[valuesById[4] = "BUILTIN_CLOCK_MONOTONIC_COARSE"] = 4;
            values[valuesById[5] = "BUILTIN_CLOCK_MONOTONIC_RAW"] = 5;
            values[valuesById[6] = "BUILTIN_CLOCK_BOOTTIME"] = 6;
            values[valuesById[63] = "BUILTIN_CLOCK_MAX_ID"] = 63;
            return values;
        })();

        protos.AndroidGameInterventionListConfig = (function() {

            /**
             * Properties of an AndroidGameInterventionListConfig.
             * @memberof perfetto.protos
             * @interface IAndroidGameInterventionListConfig
             * @property {Array.<string>|null} [packageNameFilter] AndroidGameInterventionListConfig packageNameFilter
             */

            /**
             * Constructs a new AndroidGameInterventionListConfig.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidGameInterventionListConfig.
             * @implements IAndroidGameInterventionListConfig
             * @constructor
             * @param {perfetto.protos.IAndroidGameInterventionListConfig=} [p] Properties to set
             */
            function AndroidGameInterventionListConfig(p) {
                this.packageNameFilter = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidGameInterventionListConfig packageNameFilter.
             * @member {Array.<string>} packageNameFilter
             * @memberof perfetto.protos.AndroidGameInterventionListConfig
             * @instance
             */
            AndroidGameInterventionListConfig.prototype.packageNameFilter = $util.emptyArray;

            /**
             * Creates a new AndroidGameInterventionListConfig instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidGameInterventionListConfig
             * @static
             * @param {perfetto.protos.IAndroidGameInterventionListConfig=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidGameInterventionListConfig} AndroidGameInterventionListConfig instance
             */
            AndroidGameInterventionListConfig.create = function create(properties) {
                return new AndroidGameInterventionListConfig(properties);
            };

            /**
             * Encodes the specified AndroidGameInterventionListConfig message. Does not implicitly {@link perfetto.protos.AndroidGameInterventionListConfig.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidGameInterventionListConfig
             * @static
             * @param {perfetto.protos.IAndroidGameInterventionListConfig} m AndroidGameInterventionListConfig message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidGameInterventionListConfig.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.packageNameFilter != null && m.packageNameFilter.length) {
                    for (var i = 0; i < m.packageNameFilter.length; ++i)
                        w.uint32(10).string(m.packageNameFilter[i]);
                }
                return w;
            };

            /**
             * Encodes the specified AndroidGameInterventionListConfig message, length delimited. Does not implicitly {@link perfetto.protos.AndroidGameInterventionListConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidGameInterventionListConfig
             * @static
             * @param {perfetto.protos.IAndroidGameInterventionListConfig} message AndroidGameInterventionListConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidGameInterventionListConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidGameInterventionListConfig message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidGameInterventionListConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidGameInterventionListConfig} AndroidGameInterventionListConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidGameInterventionListConfig.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidGameInterventionListConfig();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.packageNameFilter && m.packageNameFilter.length))
                            m.packageNameFilter = [];
                        m.packageNameFilter.push(r.string());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidGameInterventionListConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidGameInterventionListConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidGameInterventionListConfig} AndroidGameInterventionListConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidGameInterventionListConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidGameInterventionListConfig message.
             * @function verify
             * @memberof perfetto.protos.AndroidGameInterventionListConfig
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidGameInterventionListConfig.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.packageNameFilter != null && m.hasOwnProperty("packageNameFilter")) {
                    if (!Array.isArray(m.packageNameFilter))
                        return "packageNameFilter: array expected";
                    for (var i = 0; i < m.packageNameFilter.length; ++i) {
                        if (!$util.isString(m.packageNameFilter[i]))
                            return "packageNameFilter: string[] expected";
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidGameInterventionListConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidGameInterventionListConfig
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidGameInterventionListConfig} AndroidGameInterventionListConfig
             */
            AndroidGameInterventionListConfig.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidGameInterventionListConfig)
                    return d;
                var m = new $root.perfetto.protos.AndroidGameInterventionListConfig();
                if (d.packageNameFilter) {
                    if (!Array.isArray(d.packageNameFilter))
                        throw TypeError(".perfetto.protos.AndroidGameInterventionListConfig.packageNameFilter: array expected");
                    m.packageNameFilter = [];
                    for (var i = 0; i < d.packageNameFilter.length; ++i) {
                        m.packageNameFilter[i] = String(d.packageNameFilter[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidGameInterventionListConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidGameInterventionListConfig
             * @static
             * @param {perfetto.protos.AndroidGameInterventionListConfig} m AndroidGameInterventionListConfig
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidGameInterventionListConfig.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.packageNameFilter = [];
                }
                if (m.packageNameFilter && m.packageNameFilter.length) {
                    d.packageNameFilter = [];
                    for (var j = 0; j < m.packageNameFilter.length; ++j) {
                        d.packageNameFilter[j] = m.packageNameFilter[j];
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidGameInterventionListConfig to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidGameInterventionListConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidGameInterventionListConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AndroidGameInterventionListConfig;
        })();

        /**
         * AndroidLogId enum.
         * @name perfetto.protos.AndroidLogId
         * @enum {number}
         * @property {number} LID_DEFAULT=0 LID_DEFAULT value
         * @property {number} LID_RADIO=1 LID_RADIO value
         * @property {number} LID_EVENTS=2 LID_EVENTS value
         * @property {number} LID_SYSTEM=3 LID_SYSTEM value
         * @property {number} LID_CRASH=4 LID_CRASH value
         * @property {number} LID_STATS=5 LID_STATS value
         * @property {number} LID_SECURITY=6 LID_SECURITY value
         * @property {number} LID_KERNEL=7 LID_KERNEL value
         */
        protos.AndroidLogId = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "LID_DEFAULT"] = 0;
            values[valuesById[1] = "LID_RADIO"] = 1;
            values[valuesById[2] = "LID_EVENTS"] = 2;
            values[valuesById[3] = "LID_SYSTEM"] = 3;
            values[valuesById[4] = "LID_CRASH"] = 4;
            values[valuesById[5] = "LID_STATS"] = 5;
            values[valuesById[6] = "LID_SECURITY"] = 6;
            values[valuesById[7] = "LID_KERNEL"] = 7;
            return values;
        })();

        /**
         * AndroidLogPriority enum.
         * @name perfetto.protos.AndroidLogPriority
         * @enum {number}
         * @property {number} PRIO_UNSPECIFIED=0 PRIO_UNSPECIFIED value
         * @property {number} PRIO_UNUSED=1 PRIO_UNUSED value
         * @property {number} PRIO_VERBOSE=2 PRIO_VERBOSE value
         * @property {number} PRIO_DEBUG=3 PRIO_DEBUG value
         * @property {number} PRIO_INFO=4 PRIO_INFO value
         * @property {number} PRIO_WARN=5 PRIO_WARN value
         * @property {number} PRIO_ERROR=6 PRIO_ERROR value
         * @property {number} PRIO_FATAL=7 PRIO_FATAL value
         */
        protos.AndroidLogPriority = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "PRIO_UNSPECIFIED"] = 0;
            values[valuesById[1] = "PRIO_UNUSED"] = 1;
            values[valuesById[2] = "PRIO_VERBOSE"] = 2;
            values[valuesById[3] = "PRIO_DEBUG"] = 3;
            values[valuesById[4] = "PRIO_INFO"] = 4;
            values[valuesById[5] = "PRIO_WARN"] = 5;
            values[valuesById[6] = "PRIO_ERROR"] = 6;
            values[valuesById[7] = "PRIO_FATAL"] = 7;
            return values;
        })();

        protos.AndroidLogConfig = (function() {

            /**
             * Properties of an AndroidLogConfig.
             * @memberof perfetto.protos
             * @interface IAndroidLogConfig
             * @property {Array.<perfetto.protos.AndroidLogId>|null} [logIds] AndroidLogConfig logIds
             * @property {perfetto.protos.AndroidLogPriority|null} [minPrio] AndroidLogConfig minPrio
             * @property {Array.<string>|null} [filterTags] AndroidLogConfig filterTags
             */

            /**
             * Constructs a new AndroidLogConfig.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidLogConfig.
             * @implements IAndroidLogConfig
             * @constructor
             * @param {perfetto.protos.IAndroidLogConfig=} [p] Properties to set
             */
            function AndroidLogConfig(p) {
                this.logIds = [];
                this.filterTags = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidLogConfig logIds.
             * @member {Array.<perfetto.protos.AndroidLogId>} logIds
             * @memberof perfetto.protos.AndroidLogConfig
             * @instance
             */
            AndroidLogConfig.prototype.logIds = $util.emptyArray;

            /**
             * AndroidLogConfig minPrio.
             * @member {perfetto.protos.AndroidLogPriority} minPrio
             * @memberof perfetto.protos.AndroidLogConfig
             * @instance
             */
            AndroidLogConfig.prototype.minPrio = 0;

            /**
             * AndroidLogConfig filterTags.
             * @member {Array.<string>} filterTags
             * @memberof perfetto.protos.AndroidLogConfig
             * @instance
             */
            AndroidLogConfig.prototype.filterTags = $util.emptyArray;

            /**
             * Creates a new AndroidLogConfig instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidLogConfig
             * @static
             * @param {perfetto.protos.IAndroidLogConfig=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidLogConfig} AndroidLogConfig instance
             */
            AndroidLogConfig.create = function create(properties) {
                return new AndroidLogConfig(properties);
            };

            /**
             * Encodes the specified AndroidLogConfig message. Does not implicitly {@link perfetto.protos.AndroidLogConfig.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidLogConfig
             * @static
             * @param {perfetto.protos.IAndroidLogConfig} m AndroidLogConfig message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidLogConfig.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.logIds != null && m.logIds.length) {
                    for (var i = 0; i < m.logIds.length; ++i)
                        w.uint32(8).int32(m.logIds[i]);
                }
                if (m.minPrio != null && Object.hasOwnProperty.call(m, "minPrio"))
                    w.uint32(24).int32(m.minPrio);
                if (m.filterTags != null && m.filterTags.length) {
                    for (var i = 0; i < m.filterTags.length; ++i)
                        w.uint32(34).string(m.filterTags[i]);
                }
                return w;
            };

            /**
             * Encodes the specified AndroidLogConfig message, length delimited. Does not implicitly {@link perfetto.protos.AndroidLogConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidLogConfig
             * @static
             * @param {perfetto.protos.IAndroidLogConfig} message AndroidLogConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidLogConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidLogConfig message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidLogConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidLogConfig} AndroidLogConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidLogConfig.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidLogConfig();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.logIds && m.logIds.length))
                            m.logIds = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.logIds.push(r.int32());
                        } else
                            m.logIds.push(r.int32());
                        break;
                    case 3:
                        m.minPrio = r.int32();
                        break;
                    case 4:
                        if (!(m.filterTags && m.filterTags.length))
                            m.filterTags = [];
                        m.filterTags.push(r.string());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidLogConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidLogConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidLogConfig} AndroidLogConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidLogConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidLogConfig message.
             * @function verify
             * @memberof perfetto.protos.AndroidLogConfig
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidLogConfig.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.logIds != null && m.hasOwnProperty("logIds")) {
                    if (!Array.isArray(m.logIds))
                        return "logIds: array expected";
                    for (var i = 0; i < m.logIds.length; ++i) {
                        switch (m.logIds[i]) {
                        default:
                            return "logIds: enum value[] expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                        case 6:
                        case 7:
                            break;
                        }
                    }
                }
                if (m.minPrio != null && m.hasOwnProperty("minPrio")) {
                    switch (m.minPrio) {
                    default:
                        return "minPrio: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                    case 6:
                    case 7:
                        break;
                    }
                }
                if (m.filterTags != null && m.hasOwnProperty("filterTags")) {
                    if (!Array.isArray(m.filterTags))
                        return "filterTags: array expected";
                    for (var i = 0; i < m.filterTags.length; ++i) {
                        if (!$util.isString(m.filterTags[i]))
                            return "filterTags: string[] expected";
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidLogConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidLogConfig
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidLogConfig} AndroidLogConfig
             */
            AndroidLogConfig.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidLogConfig)
                    return d;
                var m = new $root.perfetto.protos.AndroidLogConfig();
                if (d.logIds) {
                    if (!Array.isArray(d.logIds))
                        throw TypeError(".perfetto.protos.AndroidLogConfig.logIds: array expected");
                    m.logIds = [];
                    for (var i = 0; i < d.logIds.length; ++i) {
                        switch (d.logIds[i]) {
                        default:
                        case "LID_DEFAULT":
                        case 0:
                            m.logIds[i] = 0;
                            break;
                        case "LID_RADIO":
                        case 1:
                            m.logIds[i] = 1;
                            break;
                        case "LID_EVENTS":
                        case 2:
                            m.logIds[i] = 2;
                            break;
                        case "LID_SYSTEM":
                        case 3:
                            m.logIds[i] = 3;
                            break;
                        case "LID_CRASH":
                        case 4:
                            m.logIds[i] = 4;
                            break;
                        case "LID_STATS":
                        case 5:
                            m.logIds[i] = 5;
                            break;
                        case "LID_SECURITY":
                        case 6:
                            m.logIds[i] = 6;
                            break;
                        case "LID_KERNEL":
                        case 7:
                            m.logIds[i] = 7;
                            break;
                        }
                    }
                }
                switch (d.minPrio) {
                case "PRIO_UNSPECIFIED":
                case 0:
                    m.minPrio = 0;
                    break;
                case "PRIO_UNUSED":
                case 1:
                    m.minPrio = 1;
                    break;
                case "PRIO_VERBOSE":
                case 2:
                    m.minPrio = 2;
                    break;
                case "PRIO_DEBUG":
                case 3:
                    m.minPrio = 3;
                    break;
                case "PRIO_INFO":
                case 4:
                    m.minPrio = 4;
                    break;
                case "PRIO_WARN":
                case 5:
                    m.minPrio = 5;
                    break;
                case "PRIO_ERROR":
                case 6:
                    m.minPrio = 6;
                    break;
                case "PRIO_FATAL":
                case 7:
                    m.minPrio = 7;
                    break;
                }
                if (d.filterTags) {
                    if (!Array.isArray(d.filterTags))
                        throw TypeError(".perfetto.protos.AndroidLogConfig.filterTags: array expected");
                    m.filterTags = [];
                    for (var i = 0; i < d.filterTags.length; ++i) {
                        m.filterTags[i] = String(d.filterTags[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidLogConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidLogConfig
             * @static
             * @param {perfetto.protos.AndroidLogConfig} m AndroidLogConfig
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidLogConfig.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.logIds = [];
                    d.filterTags = [];
                }
                if (o.defaults) {
                    d.minPrio = o.enums === String ? "PRIO_UNSPECIFIED" : 0;
                }
                if (m.logIds && m.logIds.length) {
                    d.logIds = [];
                    for (var j = 0; j < m.logIds.length; ++j) {
                        d.logIds[j] = o.enums === String ? $root.perfetto.protos.AndroidLogId[m.logIds[j]] : m.logIds[j];
                    }
                }
                if (m.minPrio != null && m.hasOwnProperty("minPrio")) {
                    d.minPrio = o.enums === String ? $root.perfetto.protos.AndroidLogPriority[m.minPrio] : m.minPrio;
                }
                if (m.filterTags && m.filterTags.length) {
                    d.filterTags = [];
                    for (var j = 0; j < m.filterTags.length; ++j) {
                        d.filterTags[j] = m.filterTags[j];
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidLogConfig to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidLogConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidLogConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AndroidLogConfig;
        })();

        protos.AndroidPolledStateConfig = (function() {

            /**
             * Properties of an AndroidPolledStateConfig.
             * @memberof perfetto.protos
             * @interface IAndroidPolledStateConfig
             * @property {number|null} [pollMs] AndroidPolledStateConfig pollMs
             */

            /**
             * Constructs a new AndroidPolledStateConfig.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidPolledStateConfig.
             * @implements IAndroidPolledStateConfig
             * @constructor
             * @param {perfetto.protos.IAndroidPolledStateConfig=} [p] Properties to set
             */
            function AndroidPolledStateConfig(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidPolledStateConfig pollMs.
             * @member {number} pollMs
             * @memberof perfetto.protos.AndroidPolledStateConfig
             * @instance
             */
            AndroidPolledStateConfig.prototype.pollMs = 0;

            /**
             * Creates a new AndroidPolledStateConfig instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidPolledStateConfig
             * @static
             * @param {perfetto.protos.IAndroidPolledStateConfig=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidPolledStateConfig} AndroidPolledStateConfig instance
             */
            AndroidPolledStateConfig.create = function create(properties) {
                return new AndroidPolledStateConfig(properties);
            };

            /**
             * Encodes the specified AndroidPolledStateConfig message. Does not implicitly {@link perfetto.protos.AndroidPolledStateConfig.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidPolledStateConfig
             * @static
             * @param {perfetto.protos.IAndroidPolledStateConfig} m AndroidPolledStateConfig message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidPolledStateConfig.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.pollMs != null && Object.hasOwnProperty.call(m, "pollMs"))
                    w.uint32(8).uint32(m.pollMs);
                return w;
            };

            /**
             * Encodes the specified AndroidPolledStateConfig message, length delimited. Does not implicitly {@link perfetto.protos.AndroidPolledStateConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidPolledStateConfig
             * @static
             * @param {perfetto.protos.IAndroidPolledStateConfig} message AndroidPolledStateConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidPolledStateConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidPolledStateConfig message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidPolledStateConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidPolledStateConfig} AndroidPolledStateConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidPolledStateConfig.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidPolledStateConfig();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.pollMs = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidPolledStateConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidPolledStateConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidPolledStateConfig} AndroidPolledStateConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidPolledStateConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidPolledStateConfig message.
             * @function verify
             * @memberof perfetto.protos.AndroidPolledStateConfig
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidPolledStateConfig.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.pollMs != null && m.hasOwnProperty("pollMs")) {
                    if (!$util.isInteger(m.pollMs))
                        return "pollMs: integer expected";
                }
                return null;
            };

            /**
             * Creates an AndroidPolledStateConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidPolledStateConfig
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidPolledStateConfig} AndroidPolledStateConfig
             */
            AndroidPolledStateConfig.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidPolledStateConfig)
                    return d;
                var m = new $root.perfetto.protos.AndroidPolledStateConfig();
                if (d.pollMs != null) {
                    m.pollMs = d.pollMs >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidPolledStateConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidPolledStateConfig
             * @static
             * @param {perfetto.protos.AndroidPolledStateConfig} m AndroidPolledStateConfig
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidPolledStateConfig.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.pollMs = 0;
                }
                if (m.pollMs != null && m.hasOwnProperty("pollMs")) {
                    d.pollMs = m.pollMs;
                }
                return d;
            };

            /**
             * Converts this AndroidPolledStateConfig to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidPolledStateConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidPolledStateConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AndroidPolledStateConfig;
        })();

        protos.AndroidSystemPropertyConfig = (function() {

            /**
             * Properties of an AndroidSystemPropertyConfig.
             * @memberof perfetto.protos
             * @interface IAndroidSystemPropertyConfig
             * @property {number|null} [pollMs] AndroidSystemPropertyConfig pollMs
             * @property {Array.<string>|null} [propertyName] AndroidSystemPropertyConfig propertyName
             */

            /**
             * Constructs a new AndroidSystemPropertyConfig.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidSystemPropertyConfig.
             * @implements IAndroidSystemPropertyConfig
             * @constructor
             * @param {perfetto.protos.IAndroidSystemPropertyConfig=} [p] Properties to set
             */
            function AndroidSystemPropertyConfig(p) {
                this.propertyName = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidSystemPropertyConfig pollMs.
             * @member {number} pollMs
             * @memberof perfetto.protos.AndroidSystemPropertyConfig
             * @instance
             */
            AndroidSystemPropertyConfig.prototype.pollMs = 0;

            /**
             * AndroidSystemPropertyConfig propertyName.
             * @member {Array.<string>} propertyName
             * @memberof perfetto.protos.AndroidSystemPropertyConfig
             * @instance
             */
            AndroidSystemPropertyConfig.prototype.propertyName = $util.emptyArray;

            /**
             * Creates a new AndroidSystemPropertyConfig instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidSystemPropertyConfig
             * @static
             * @param {perfetto.protos.IAndroidSystemPropertyConfig=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidSystemPropertyConfig} AndroidSystemPropertyConfig instance
             */
            AndroidSystemPropertyConfig.create = function create(properties) {
                return new AndroidSystemPropertyConfig(properties);
            };

            /**
             * Encodes the specified AndroidSystemPropertyConfig message. Does not implicitly {@link perfetto.protos.AndroidSystemPropertyConfig.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidSystemPropertyConfig
             * @static
             * @param {perfetto.protos.IAndroidSystemPropertyConfig} m AndroidSystemPropertyConfig message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidSystemPropertyConfig.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.pollMs != null && Object.hasOwnProperty.call(m, "pollMs"))
                    w.uint32(8).uint32(m.pollMs);
                if (m.propertyName != null && m.propertyName.length) {
                    for (var i = 0; i < m.propertyName.length; ++i)
                        w.uint32(18).string(m.propertyName[i]);
                }
                return w;
            };

            /**
             * Encodes the specified AndroidSystemPropertyConfig message, length delimited. Does not implicitly {@link perfetto.protos.AndroidSystemPropertyConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidSystemPropertyConfig
             * @static
             * @param {perfetto.protos.IAndroidSystemPropertyConfig} message AndroidSystemPropertyConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidSystemPropertyConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidSystemPropertyConfig message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidSystemPropertyConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidSystemPropertyConfig} AndroidSystemPropertyConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidSystemPropertyConfig.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidSystemPropertyConfig();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.pollMs = r.uint32();
                        break;
                    case 2:
                        if (!(m.propertyName && m.propertyName.length))
                            m.propertyName = [];
                        m.propertyName.push(r.string());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidSystemPropertyConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidSystemPropertyConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidSystemPropertyConfig} AndroidSystemPropertyConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidSystemPropertyConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidSystemPropertyConfig message.
             * @function verify
             * @memberof perfetto.protos.AndroidSystemPropertyConfig
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidSystemPropertyConfig.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.pollMs != null && m.hasOwnProperty("pollMs")) {
                    if (!$util.isInteger(m.pollMs))
                        return "pollMs: integer expected";
                }
                if (m.propertyName != null && m.hasOwnProperty("propertyName")) {
                    if (!Array.isArray(m.propertyName))
                        return "propertyName: array expected";
                    for (var i = 0; i < m.propertyName.length; ++i) {
                        if (!$util.isString(m.propertyName[i]))
                            return "propertyName: string[] expected";
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidSystemPropertyConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidSystemPropertyConfig
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidSystemPropertyConfig} AndroidSystemPropertyConfig
             */
            AndroidSystemPropertyConfig.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidSystemPropertyConfig)
                    return d;
                var m = new $root.perfetto.protos.AndroidSystemPropertyConfig();
                if (d.pollMs != null) {
                    m.pollMs = d.pollMs >>> 0;
                }
                if (d.propertyName) {
                    if (!Array.isArray(d.propertyName))
                        throw TypeError(".perfetto.protos.AndroidSystemPropertyConfig.propertyName: array expected");
                    m.propertyName = [];
                    for (var i = 0; i < d.propertyName.length; ++i) {
                        m.propertyName[i] = String(d.propertyName[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidSystemPropertyConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidSystemPropertyConfig
             * @static
             * @param {perfetto.protos.AndroidSystemPropertyConfig} m AndroidSystemPropertyConfig
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidSystemPropertyConfig.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.propertyName = [];
                }
                if (o.defaults) {
                    d.pollMs = 0;
                }
                if (m.pollMs != null && m.hasOwnProperty("pollMs")) {
                    d.pollMs = m.pollMs;
                }
                if (m.propertyName && m.propertyName.length) {
                    d.propertyName = [];
                    for (var j = 0; j < m.propertyName.length; ++j) {
                        d.propertyName[j] = m.propertyName[j];
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidSystemPropertyConfig to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidSystemPropertyConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidSystemPropertyConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AndroidSystemPropertyConfig;
        })();

        protos.PackagesListConfig = (function() {

            /**
             * Properties of a PackagesListConfig.
             * @memberof perfetto.protos
             * @interface IPackagesListConfig
             * @property {Array.<string>|null} [packageNameFilter] PackagesListConfig packageNameFilter
             */

            /**
             * Constructs a new PackagesListConfig.
             * @memberof perfetto.protos
             * @classdesc Represents a PackagesListConfig.
             * @implements IPackagesListConfig
             * @constructor
             * @param {perfetto.protos.IPackagesListConfig=} [p] Properties to set
             */
            function PackagesListConfig(p) {
                this.packageNameFilter = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * PackagesListConfig packageNameFilter.
             * @member {Array.<string>} packageNameFilter
             * @memberof perfetto.protos.PackagesListConfig
             * @instance
             */
            PackagesListConfig.prototype.packageNameFilter = $util.emptyArray;

            /**
             * Creates a new PackagesListConfig instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.PackagesListConfig
             * @static
             * @param {perfetto.protos.IPackagesListConfig=} [properties] Properties to set
             * @returns {perfetto.protos.PackagesListConfig} PackagesListConfig instance
             */
            PackagesListConfig.create = function create(properties) {
                return new PackagesListConfig(properties);
            };

            /**
             * Encodes the specified PackagesListConfig message. Does not implicitly {@link perfetto.protos.PackagesListConfig.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.PackagesListConfig
             * @static
             * @param {perfetto.protos.IPackagesListConfig} m PackagesListConfig message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PackagesListConfig.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.packageNameFilter != null && m.packageNameFilter.length) {
                    for (var i = 0; i < m.packageNameFilter.length; ++i)
                        w.uint32(10).string(m.packageNameFilter[i]);
                }
                return w;
            };

            /**
             * Encodes the specified PackagesListConfig message, length delimited. Does not implicitly {@link perfetto.protos.PackagesListConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.PackagesListConfig
             * @static
             * @param {perfetto.protos.IPackagesListConfig} message PackagesListConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PackagesListConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a PackagesListConfig message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.PackagesListConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.PackagesListConfig} PackagesListConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PackagesListConfig.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.PackagesListConfig();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.packageNameFilter && m.packageNameFilter.length))
                            m.packageNameFilter = [];
                        m.packageNameFilter.push(r.string());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a PackagesListConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.PackagesListConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.PackagesListConfig} PackagesListConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PackagesListConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a PackagesListConfig message.
             * @function verify
             * @memberof perfetto.protos.PackagesListConfig
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            PackagesListConfig.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.packageNameFilter != null && m.hasOwnProperty("packageNameFilter")) {
                    if (!Array.isArray(m.packageNameFilter))
                        return "packageNameFilter: array expected";
                    for (var i = 0; i < m.packageNameFilter.length; ++i) {
                        if (!$util.isString(m.packageNameFilter[i]))
                            return "packageNameFilter: string[] expected";
                    }
                }
                return null;
            };

            /**
             * Creates a PackagesListConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.PackagesListConfig
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.PackagesListConfig} PackagesListConfig
             */
            PackagesListConfig.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.PackagesListConfig)
                    return d;
                var m = new $root.perfetto.protos.PackagesListConfig();
                if (d.packageNameFilter) {
                    if (!Array.isArray(d.packageNameFilter))
                        throw TypeError(".perfetto.protos.PackagesListConfig.packageNameFilter: array expected");
                    m.packageNameFilter = [];
                    for (var i = 0; i < d.packageNameFilter.length; ++i) {
                        m.packageNameFilter[i] = String(d.packageNameFilter[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a PackagesListConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.PackagesListConfig
             * @static
             * @param {perfetto.protos.PackagesListConfig} m PackagesListConfig
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            PackagesListConfig.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.packageNameFilter = [];
                }
                if (m.packageNameFilter && m.packageNameFilter.length) {
                    d.packageNameFilter = [];
                    for (var j = 0; j < m.packageNameFilter.length; ++j) {
                        d.packageNameFilter[j] = m.packageNameFilter[j];
                    }
                }
                return d;
            };

            /**
             * Converts this PackagesListConfig to JSON.
             * @function toJSON
             * @memberof perfetto.protos.PackagesListConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            PackagesListConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return PackagesListConfig;
        })();

        protos.ChromeConfig = (function() {

            /**
             * Properties of a ChromeConfig.
             * @memberof perfetto.protos
             * @interface IChromeConfig
             * @property {string|null} [traceConfig] ChromeConfig traceConfig
             * @property {boolean|null} [privacyFilteringEnabled] ChromeConfig privacyFilteringEnabled
             * @property {boolean|null} [convertToLegacyJson] ChromeConfig convertToLegacyJson
             * @property {perfetto.protos.ChromeConfig.ClientPriority|null} [clientPriority] ChromeConfig clientPriority
             * @property {string|null} [jsonAgentLabelFilter] ChromeConfig jsonAgentLabelFilter
             */

            /**
             * Constructs a new ChromeConfig.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeConfig.
             * @implements IChromeConfig
             * @constructor
             * @param {perfetto.protos.IChromeConfig=} [p] Properties to set
             */
            function ChromeConfig(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeConfig traceConfig.
             * @member {string} traceConfig
             * @memberof perfetto.protos.ChromeConfig
             * @instance
             */
            ChromeConfig.prototype.traceConfig = "";

            /**
             * ChromeConfig privacyFilteringEnabled.
             * @member {boolean} privacyFilteringEnabled
             * @memberof perfetto.protos.ChromeConfig
             * @instance
             */
            ChromeConfig.prototype.privacyFilteringEnabled = false;

            /**
             * ChromeConfig convertToLegacyJson.
             * @member {boolean} convertToLegacyJson
             * @memberof perfetto.protos.ChromeConfig
             * @instance
             */
            ChromeConfig.prototype.convertToLegacyJson = false;

            /**
             * ChromeConfig clientPriority.
             * @member {perfetto.protos.ChromeConfig.ClientPriority} clientPriority
             * @memberof perfetto.protos.ChromeConfig
             * @instance
             */
            ChromeConfig.prototype.clientPriority = 0;

            /**
             * ChromeConfig jsonAgentLabelFilter.
             * @member {string} jsonAgentLabelFilter
             * @memberof perfetto.protos.ChromeConfig
             * @instance
             */
            ChromeConfig.prototype.jsonAgentLabelFilter = "";

            /**
             * Creates a new ChromeConfig instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeConfig
             * @static
             * @param {perfetto.protos.IChromeConfig=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeConfig} ChromeConfig instance
             */
            ChromeConfig.create = function create(properties) {
                return new ChromeConfig(properties);
            };

            /**
             * Encodes the specified ChromeConfig message. Does not implicitly {@link perfetto.protos.ChromeConfig.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeConfig
             * @static
             * @param {perfetto.protos.IChromeConfig} m ChromeConfig message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeConfig.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.traceConfig != null && Object.hasOwnProperty.call(m, "traceConfig"))
                    w.uint32(10).string(m.traceConfig);
                if (m.privacyFilteringEnabled != null && Object.hasOwnProperty.call(m, "privacyFilteringEnabled"))
                    w.uint32(16).bool(m.privacyFilteringEnabled);
                if (m.convertToLegacyJson != null && Object.hasOwnProperty.call(m, "convertToLegacyJson"))
                    w.uint32(24).bool(m.convertToLegacyJson);
                if (m.clientPriority != null && Object.hasOwnProperty.call(m, "clientPriority"))
                    w.uint32(32).int32(m.clientPriority);
                if (m.jsonAgentLabelFilter != null && Object.hasOwnProperty.call(m, "jsonAgentLabelFilter"))
                    w.uint32(42).string(m.jsonAgentLabelFilter);
                return w;
            };

            /**
             * Encodes the specified ChromeConfig message, length delimited. Does not implicitly {@link perfetto.protos.ChromeConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeConfig
             * @static
             * @param {perfetto.protos.IChromeConfig} message ChromeConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeConfig message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeConfig} ChromeConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeConfig.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeConfig();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.traceConfig = r.string();
                        break;
                    case 2:
                        m.privacyFilteringEnabled = r.bool();
                        break;
                    case 3:
                        m.convertToLegacyJson = r.bool();
                        break;
                    case 4:
                        m.clientPriority = r.int32();
                        break;
                    case 5:
                        m.jsonAgentLabelFilter = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeConfig} ChromeConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeConfig message.
             * @function verify
             * @memberof perfetto.protos.ChromeConfig
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeConfig.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.traceConfig != null && m.hasOwnProperty("traceConfig")) {
                    if (!$util.isString(m.traceConfig))
                        return "traceConfig: string expected";
                }
                if (m.privacyFilteringEnabled != null && m.hasOwnProperty("privacyFilteringEnabled")) {
                    if (typeof m.privacyFilteringEnabled !== "boolean")
                        return "privacyFilteringEnabled: boolean expected";
                }
                if (m.convertToLegacyJson != null && m.hasOwnProperty("convertToLegacyJson")) {
                    if (typeof m.convertToLegacyJson !== "boolean")
                        return "convertToLegacyJson: boolean expected";
                }
                if (m.clientPriority != null && m.hasOwnProperty("clientPriority")) {
                    switch (m.clientPriority) {
                    default:
                        return "clientPriority: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                }
                if (m.jsonAgentLabelFilter != null && m.hasOwnProperty("jsonAgentLabelFilter")) {
                    if (!$util.isString(m.jsonAgentLabelFilter))
                        return "jsonAgentLabelFilter: string expected";
                }
                return null;
            };

            /**
             * Creates a ChromeConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeConfig
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeConfig} ChromeConfig
             */
            ChromeConfig.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeConfig)
                    return d;
                var m = new $root.perfetto.protos.ChromeConfig();
                if (d.traceConfig != null) {
                    m.traceConfig = String(d.traceConfig);
                }
                if (d.privacyFilteringEnabled != null) {
                    m.privacyFilteringEnabled = Boolean(d.privacyFilteringEnabled);
                }
                if (d.convertToLegacyJson != null) {
                    m.convertToLegacyJson = Boolean(d.convertToLegacyJson);
                }
                switch (d.clientPriority) {
                case "UNKNOWN":
                case 0:
                    m.clientPriority = 0;
                    break;
                case "BACKGROUND":
                case 1:
                    m.clientPriority = 1;
                    break;
                case "USER_INITIATED":
                case 2:
                    m.clientPriority = 2;
                    break;
                }
                if (d.jsonAgentLabelFilter != null) {
                    m.jsonAgentLabelFilter = String(d.jsonAgentLabelFilter);
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeConfig
             * @static
             * @param {perfetto.protos.ChromeConfig} m ChromeConfig
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeConfig.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.traceConfig = "";
                    d.privacyFilteringEnabled = false;
                    d.convertToLegacyJson = false;
                    d.clientPriority = o.enums === String ? "UNKNOWN" : 0;
                    d.jsonAgentLabelFilter = "";
                }
                if (m.traceConfig != null && m.hasOwnProperty("traceConfig")) {
                    d.traceConfig = m.traceConfig;
                }
                if (m.privacyFilteringEnabled != null && m.hasOwnProperty("privacyFilteringEnabled")) {
                    d.privacyFilteringEnabled = m.privacyFilteringEnabled;
                }
                if (m.convertToLegacyJson != null && m.hasOwnProperty("convertToLegacyJson")) {
                    d.convertToLegacyJson = m.convertToLegacyJson;
                }
                if (m.clientPriority != null && m.hasOwnProperty("clientPriority")) {
                    d.clientPriority = o.enums === String ? $root.perfetto.protos.ChromeConfig.ClientPriority[m.clientPriority] : m.clientPriority;
                }
                if (m.jsonAgentLabelFilter != null && m.hasOwnProperty("jsonAgentLabelFilter")) {
                    d.jsonAgentLabelFilter = m.jsonAgentLabelFilter;
                }
                return d;
            };

            /**
             * Converts this ChromeConfig to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * ClientPriority enum.
             * @name perfetto.protos.ChromeConfig.ClientPriority
             * @enum {number}
             * @property {number} UNKNOWN=0 UNKNOWN value
             * @property {number} BACKGROUND=1 BACKGROUND value
             * @property {number} USER_INITIATED=2 USER_INITIATED value
             */
            ChromeConfig.ClientPriority = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN"] = 0;
                values[valuesById[1] = "BACKGROUND"] = 1;
                values[valuesById[2] = "USER_INITIATED"] = 2;
                return values;
            })();

            return ChromeConfig;
        })();

        protos.FtraceConfig = (function() {

            /**
             * Properties of a FtraceConfig.
             * @memberof perfetto.protos
             * @interface IFtraceConfig
             * @property {Array.<string>|null} [ftraceEvents] FtraceConfig ftraceEvents
             * @property {Array.<string>|null} [atraceCategories] FtraceConfig atraceCategories
             * @property {Array.<string>|null} [atraceApps] FtraceConfig atraceApps
             * @property {number|null} [bufferSizeKb] FtraceConfig bufferSizeKb
             * @property {number|null} [drainPeriodMs] FtraceConfig drainPeriodMs
             * @property {perfetto.protos.FtraceConfig.ICompactSchedConfig|null} [compactSched] FtraceConfig compactSched
             * @property {perfetto.protos.FtraceConfig.IPrintFilter|null} [printFilter] FtraceConfig printFilter
             * @property {boolean|null} [symbolizeKsyms] FtraceConfig symbolizeKsyms
             * @property {perfetto.protos.FtraceConfig.KsymsMemPolicy|null} [ksymsMemPolicy] FtraceConfig ksymsMemPolicy
             * @property {boolean|null} [initializeKsymsSynchronouslyForTesting] FtraceConfig initializeKsymsSynchronouslyForTesting
             * @property {boolean|null} [throttleRssStat] FtraceConfig throttleRssStat
             * @property {boolean|null} [disableGenericEvents] FtraceConfig disableGenericEvents
             * @property {Array.<string>|null} [syscallEvents] FtraceConfig syscallEvents
             * @property {boolean|null} [enableFunctionGraph] FtraceConfig enableFunctionGraph
             * @property {Array.<string>|null} [functionFilters] FtraceConfig functionFilters
             * @property {Array.<string>|null} [functionGraphRoots] FtraceConfig functionGraphRoots
             */

            /**
             * Constructs a new FtraceConfig.
             * @memberof perfetto.protos
             * @classdesc Represents a FtraceConfig.
             * @implements IFtraceConfig
             * @constructor
             * @param {perfetto.protos.IFtraceConfig=} [p] Properties to set
             */
            function FtraceConfig(p) {
                this.ftraceEvents = [];
                this.atraceCategories = [];
                this.atraceApps = [];
                this.syscallEvents = [];
                this.functionFilters = [];
                this.functionGraphRoots = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * FtraceConfig ftraceEvents.
             * @member {Array.<string>} ftraceEvents
             * @memberof perfetto.protos.FtraceConfig
             * @instance
             */
            FtraceConfig.prototype.ftraceEvents = $util.emptyArray;

            /**
             * FtraceConfig atraceCategories.
             * @member {Array.<string>} atraceCategories
             * @memberof perfetto.protos.FtraceConfig
             * @instance
             */
            FtraceConfig.prototype.atraceCategories = $util.emptyArray;

            /**
             * FtraceConfig atraceApps.
             * @member {Array.<string>} atraceApps
             * @memberof perfetto.protos.FtraceConfig
             * @instance
             */
            FtraceConfig.prototype.atraceApps = $util.emptyArray;

            /**
             * FtraceConfig bufferSizeKb.
             * @member {number} bufferSizeKb
             * @memberof perfetto.protos.FtraceConfig
             * @instance
             */
            FtraceConfig.prototype.bufferSizeKb = 0;

            /**
             * FtraceConfig drainPeriodMs.
             * @member {number} drainPeriodMs
             * @memberof perfetto.protos.FtraceConfig
             * @instance
             */
            FtraceConfig.prototype.drainPeriodMs = 0;

            /**
             * FtraceConfig compactSched.
             * @member {perfetto.protos.FtraceConfig.ICompactSchedConfig|null|undefined} compactSched
             * @memberof perfetto.protos.FtraceConfig
             * @instance
             */
            FtraceConfig.prototype.compactSched = null;

            /**
             * FtraceConfig printFilter.
             * @member {perfetto.protos.FtraceConfig.IPrintFilter|null|undefined} printFilter
             * @memberof perfetto.protos.FtraceConfig
             * @instance
             */
            FtraceConfig.prototype.printFilter = null;

            /**
             * FtraceConfig symbolizeKsyms.
             * @member {boolean} symbolizeKsyms
             * @memberof perfetto.protos.FtraceConfig
             * @instance
             */
            FtraceConfig.prototype.symbolizeKsyms = false;

            /**
             * FtraceConfig ksymsMemPolicy.
             * @member {perfetto.protos.FtraceConfig.KsymsMemPolicy} ksymsMemPolicy
             * @memberof perfetto.protos.FtraceConfig
             * @instance
             */
            FtraceConfig.prototype.ksymsMemPolicy = 0;

            /**
             * FtraceConfig initializeKsymsSynchronouslyForTesting.
             * @member {boolean} initializeKsymsSynchronouslyForTesting
             * @memberof perfetto.protos.FtraceConfig
             * @instance
             */
            FtraceConfig.prototype.initializeKsymsSynchronouslyForTesting = false;

            /**
             * FtraceConfig throttleRssStat.
             * @member {boolean} throttleRssStat
             * @memberof perfetto.protos.FtraceConfig
             * @instance
             */
            FtraceConfig.prototype.throttleRssStat = false;

            /**
             * FtraceConfig disableGenericEvents.
             * @member {boolean} disableGenericEvents
             * @memberof perfetto.protos.FtraceConfig
             * @instance
             */
            FtraceConfig.prototype.disableGenericEvents = false;

            /**
             * FtraceConfig syscallEvents.
             * @member {Array.<string>} syscallEvents
             * @memberof perfetto.protos.FtraceConfig
             * @instance
             */
            FtraceConfig.prototype.syscallEvents = $util.emptyArray;

            /**
             * FtraceConfig enableFunctionGraph.
             * @member {boolean} enableFunctionGraph
             * @memberof perfetto.protos.FtraceConfig
             * @instance
             */
            FtraceConfig.prototype.enableFunctionGraph = false;

            /**
             * FtraceConfig functionFilters.
             * @member {Array.<string>} functionFilters
             * @memberof perfetto.protos.FtraceConfig
             * @instance
             */
            FtraceConfig.prototype.functionFilters = $util.emptyArray;

            /**
             * FtraceConfig functionGraphRoots.
             * @member {Array.<string>} functionGraphRoots
             * @memberof perfetto.protos.FtraceConfig
             * @instance
             */
            FtraceConfig.prototype.functionGraphRoots = $util.emptyArray;

            /**
             * Creates a new FtraceConfig instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.FtraceConfig
             * @static
             * @param {perfetto.protos.IFtraceConfig=} [properties] Properties to set
             * @returns {perfetto.protos.FtraceConfig} FtraceConfig instance
             */
            FtraceConfig.create = function create(properties) {
                return new FtraceConfig(properties);
            };

            /**
             * Encodes the specified FtraceConfig message. Does not implicitly {@link perfetto.protos.FtraceConfig.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.FtraceConfig
             * @static
             * @param {perfetto.protos.IFtraceConfig} m FtraceConfig message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FtraceConfig.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.ftraceEvents != null && m.ftraceEvents.length) {
                    for (var i = 0; i < m.ftraceEvents.length; ++i)
                        w.uint32(10).string(m.ftraceEvents[i]);
                }
                if (m.atraceCategories != null && m.atraceCategories.length) {
                    for (var i = 0; i < m.atraceCategories.length; ++i)
                        w.uint32(18).string(m.atraceCategories[i]);
                }
                if (m.atraceApps != null && m.atraceApps.length) {
                    for (var i = 0; i < m.atraceApps.length; ++i)
                        w.uint32(26).string(m.atraceApps[i]);
                }
                if (m.bufferSizeKb != null && Object.hasOwnProperty.call(m, "bufferSizeKb"))
                    w.uint32(80).uint32(m.bufferSizeKb);
                if (m.drainPeriodMs != null && Object.hasOwnProperty.call(m, "drainPeriodMs"))
                    w.uint32(88).uint32(m.drainPeriodMs);
                if (m.compactSched != null && Object.hasOwnProperty.call(m, "compactSched"))
                    $root.perfetto.protos.FtraceConfig.CompactSchedConfig.encode(m.compactSched, w.uint32(98).fork()).ldelim();
                if (m.symbolizeKsyms != null && Object.hasOwnProperty.call(m, "symbolizeKsyms"))
                    w.uint32(104).bool(m.symbolizeKsyms);
                if (m.initializeKsymsSynchronouslyForTesting != null && Object.hasOwnProperty.call(m, "initializeKsymsSynchronouslyForTesting"))
                    w.uint32(112).bool(m.initializeKsymsSynchronouslyForTesting);
                if (m.throttleRssStat != null && Object.hasOwnProperty.call(m, "throttleRssStat"))
                    w.uint32(120).bool(m.throttleRssStat);
                if (m.disableGenericEvents != null && Object.hasOwnProperty.call(m, "disableGenericEvents"))
                    w.uint32(128).bool(m.disableGenericEvents);
                if (m.ksymsMemPolicy != null && Object.hasOwnProperty.call(m, "ksymsMemPolicy"))
                    w.uint32(136).int32(m.ksymsMemPolicy);
                if (m.syscallEvents != null && m.syscallEvents.length) {
                    for (var i = 0; i < m.syscallEvents.length; ++i)
                        w.uint32(146).string(m.syscallEvents[i]);
                }
                if (m.enableFunctionGraph != null && Object.hasOwnProperty.call(m, "enableFunctionGraph"))
                    w.uint32(152).bool(m.enableFunctionGraph);
                if (m.functionFilters != null && m.functionFilters.length) {
                    for (var i = 0; i < m.functionFilters.length; ++i)
                        w.uint32(162).string(m.functionFilters[i]);
                }
                if (m.functionGraphRoots != null && m.functionGraphRoots.length) {
                    for (var i = 0; i < m.functionGraphRoots.length; ++i)
                        w.uint32(170).string(m.functionGraphRoots[i]);
                }
                if (m.printFilter != null && Object.hasOwnProperty.call(m, "printFilter"))
                    $root.perfetto.protos.FtraceConfig.PrintFilter.encode(m.printFilter, w.uint32(178).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified FtraceConfig message, length delimited. Does not implicitly {@link perfetto.protos.FtraceConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.FtraceConfig
             * @static
             * @param {perfetto.protos.IFtraceConfig} message FtraceConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FtraceConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a FtraceConfig message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.FtraceConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.FtraceConfig} FtraceConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FtraceConfig.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FtraceConfig();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.ftraceEvents && m.ftraceEvents.length))
                            m.ftraceEvents = [];
                        m.ftraceEvents.push(r.string());
                        break;
                    case 2:
                        if (!(m.atraceCategories && m.atraceCategories.length))
                            m.atraceCategories = [];
                        m.atraceCategories.push(r.string());
                        break;
                    case 3:
                        if (!(m.atraceApps && m.atraceApps.length))
                            m.atraceApps = [];
                        m.atraceApps.push(r.string());
                        break;
                    case 10:
                        m.bufferSizeKb = r.uint32();
                        break;
                    case 11:
                        m.drainPeriodMs = r.uint32();
                        break;
                    case 12:
                        m.compactSched = $root.perfetto.protos.FtraceConfig.CompactSchedConfig.decode(r, r.uint32());
                        break;
                    case 22:
                        m.printFilter = $root.perfetto.protos.FtraceConfig.PrintFilter.decode(r, r.uint32());
                        break;
                    case 13:
                        m.symbolizeKsyms = r.bool();
                        break;
                    case 17:
                        m.ksymsMemPolicy = r.int32();
                        break;
                    case 14:
                        m.initializeKsymsSynchronouslyForTesting = r.bool();
                        break;
                    case 15:
                        m.throttleRssStat = r.bool();
                        break;
                    case 16:
                        m.disableGenericEvents = r.bool();
                        break;
                    case 18:
                        if (!(m.syscallEvents && m.syscallEvents.length))
                            m.syscallEvents = [];
                        m.syscallEvents.push(r.string());
                        break;
                    case 19:
                        m.enableFunctionGraph = r.bool();
                        break;
                    case 20:
                        if (!(m.functionFilters && m.functionFilters.length))
                            m.functionFilters = [];
                        m.functionFilters.push(r.string());
                        break;
                    case 21:
                        if (!(m.functionGraphRoots && m.functionGraphRoots.length))
                            m.functionGraphRoots = [];
                        m.functionGraphRoots.push(r.string());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a FtraceConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.FtraceConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.FtraceConfig} FtraceConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FtraceConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a FtraceConfig message.
             * @function verify
             * @memberof perfetto.protos.FtraceConfig
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            FtraceConfig.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.ftraceEvents != null && m.hasOwnProperty("ftraceEvents")) {
                    if (!Array.isArray(m.ftraceEvents))
                        return "ftraceEvents: array expected";
                    for (var i = 0; i < m.ftraceEvents.length; ++i) {
                        if (!$util.isString(m.ftraceEvents[i]))
                            return "ftraceEvents: string[] expected";
                    }
                }
                if (m.atraceCategories != null && m.hasOwnProperty("atraceCategories")) {
                    if (!Array.isArray(m.atraceCategories))
                        return "atraceCategories: array expected";
                    for (var i = 0; i < m.atraceCategories.length; ++i) {
                        if (!$util.isString(m.atraceCategories[i]))
                            return "atraceCategories: string[] expected";
                    }
                }
                if (m.atraceApps != null && m.hasOwnProperty("atraceApps")) {
                    if (!Array.isArray(m.atraceApps))
                        return "atraceApps: array expected";
                    for (var i = 0; i < m.atraceApps.length; ++i) {
                        if (!$util.isString(m.atraceApps[i]))
                            return "atraceApps: string[] expected";
                    }
                }
                if (m.bufferSizeKb != null && m.hasOwnProperty("bufferSizeKb")) {
                    if (!$util.isInteger(m.bufferSizeKb))
                        return "bufferSizeKb: integer expected";
                }
                if (m.drainPeriodMs != null && m.hasOwnProperty("drainPeriodMs")) {
                    if (!$util.isInteger(m.drainPeriodMs))
                        return "drainPeriodMs: integer expected";
                }
                if (m.compactSched != null && m.hasOwnProperty("compactSched")) {
                    {
                        var e = $root.perfetto.protos.FtraceConfig.CompactSchedConfig.verify(m.compactSched);
                        if (e)
                            return "compactSched." + e;
                    }
                }
                if (m.printFilter != null && m.hasOwnProperty("printFilter")) {
                    {
                        var e = $root.perfetto.protos.FtraceConfig.PrintFilter.verify(m.printFilter);
                        if (e)
                            return "printFilter." + e;
                    }
                }
                if (m.symbolizeKsyms != null && m.hasOwnProperty("symbolizeKsyms")) {
                    if (typeof m.symbolizeKsyms !== "boolean")
                        return "symbolizeKsyms: boolean expected";
                }
                if (m.ksymsMemPolicy != null && m.hasOwnProperty("ksymsMemPolicy")) {
                    switch (m.ksymsMemPolicy) {
                    default:
                        return "ksymsMemPolicy: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                }
                if (m.initializeKsymsSynchronouslyForTesting != null && m.hasOwnProperty("initializeKsymsSynchronouslyForTesting")) {
                    if (typeof m.initializeKsymsSynchronouslyForTesting !== "boolean")
                        return "initializeKsymsSynchronouslyForTesting: boolean expected";
                }
                if (m.throttleRssStat != null && m.hasOwnProperty("throttleRssStat")) {
                    if (typeof m.throttleRssStat !== "boolean")
                        return "throttleRssStat: boolean expected";
                }
                if (m.disableGenericEvents != null && m.hasOwnProperty("disableGenericEvents")) {
                    if (typeof m.disableGenericEvents !== "boolean")
                        return "disableGenericEvents: boolean expected";
                }
                if (m.syscallEvents != null && m.hasOwnProperty("syscallEvents")) {
                    if (!Array.isArray(m.syscallEvents))
                        return "syscallEvents: array expected";
                    for (var i = 0; i < m.syscallEvents.length; ++i) {
                        if (!$util.isString(m.syscallEvents[i]))
                            return "syscallEvents: string[] expected";
                    }
                }
                if (m.enableFunctionGraph != null && m.hasOwnProperty("enableFunctionGraph")) {
                    if (typeof m.enableFunctionGraph !== "boolean")
                        return "enableFunctionGraph: boolean expected";
                }
                if (m.functionFilters != null && m.hasOwnProperty("functionFilters")) {
                    if (!Array.isArray(m.functionFilters))
                        return "functionFilters: array expected";
                    for (var i = 0; i < m.functionFilters.length; ++i) {
                        if (!$util.isString(m.functionFilters[i]))
                            return "functionFilters: string[] expected";
                    }
                }
                if (m.functionGraphRoots != null && m.hasOwnProperty("functionGraphRoots")) {
                    if (!Array.isArray(m.functionGraphRoots))
                        return "functionGraphRoots: array expected";
                    for (var i = 0; i < m.functionGraphRoots.length; ++i) {
                        if (!$util.isString(m.functionGraphRoots[i]))
                            return "functionGraphRoots: string[] expected";
                    }
                }
                return null;
            };

            /**
             * Creates a FtraceConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.FtraceConfig
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.FtraceConfig} FtraceConfig
             */
            FtraceConfig.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.FtraceConfig)
                    return d;
                var m = new $root.perfetto.protos.FtraceConfig();
                if (d.ftraceEvents) {
                    if (!Array.isArray(d.ftraceEvents))
                        throw TypeError(".perfetto.protos.FtraceConfig.ftraceEvents: array expected");
                    m.ftraceEvents = [];
                    for (var i = 0; i < d.ftraceEvents.length; ++i) {
                        m.ftraceEvents[i] = String(d.ftraceEvents[i]);
                    }
                }
                if (d.atraceCategories) {
                    if (!Array.isArray(d.atraceCategories))
                        throw TypeError(".perfetto.protos.FtraceConfig.atraceCategories: array expected");
                    m.atraceCategories = [];
                    for (var i = 0; i < d.atraceCategories.length; ++i) {
                        m.atraceCategories[i] = String(d.atraceCategories[i]);
                    }
                }
                if (d.atraceApps) {
                    if (!Array.isArray(d.atraceApps))
                        throw TypeError(".perfetto.protos.FtraceConfig.atraceApps: array expected");
                    m.atraceApps = [];
                    for (var i = 0; i < d.atraceApps.length; ++i) {
                        m.atraceApps[i] = String(d.atraceApps[i]);
                    }
                }
                if (d.bufferSizeKb != null) {
                    m.bufferSizeKb = d.bufferSizeKb >>> 0;
                }
                if (d.drainPeriodMs != null) {
                    m.drainPeriodMs = d.drainPeriodMs >>> 0;
                }
                if (d.compactSched != null) {
                    if (typeof d.compactSched !== "object")
                        throw TypeError(".perfetto.protos.FtraceConfig.compactSched: object expected");
                    m.compactSched = $root.perfetto.protos.FtraceConfig.CompactSchedConfig.fromObject(d.compactSched);
                }
                if (d.printFilter != null) {
                    if (typeof d.printFilter !== "object")
                        throw TypeError(".perfetto.protos.FtraceConfig.printFilter: object expected");
                    m.printFilter = $root.perfetto.protos.FtraceConfig.PrintFilter.fromObject(d.printFilter);
                }
                if (d.symbolizeKsyms != null) {
                    m.symbolizeKsyms = Boolean(d.symbolizeKsyms);
                }
                switch (d.ksymsMemPolicy) {
                case "KSYMS_UNSPECIFIED":
                case 0:
                    m.ksymsMemPolicy = 0;
                    break;
                case "KSYMS_CLEANUP_ON_STOP":
                case 1:
                    m.ksymsMemPolicy = 1;
                    break;
                case "KSYMS_RETAIN":
                case 2:
                    m.ksymsMemPolicy = 2;
                    break;
                }
                if (d.initializeKsymsSynchronouslyForTesting != null) {
                    m.initializeKsymsSynchronouslyForTesting = Boolean(d.initializeKsymsSynchronouslyForTesting);
                }
                if (d.throttleRssStat != null) {
                    m.throttleRssStat = Boolean(d.throttleRssStat);
                }
                if (d.disableGenericEvents != null) {
                    m.disableGenericEvents = Boolean(d.disableGenericEvents);
                }
                if (d.syscallEvents) {
                    if (!Array.isArray(d.syscallEvents))
                        throw TypeError(".perfetto.protos.FtraceConfig.syscallEvents: array expected");
                    m.syscallEvents = [];
                    for (var i = 0; i < d.syscallEvents.length; ++i) {
                        m.syscallEvents[i] = String(d.syscallEvents[i]);
                    }
                }
                if (d.enableFunctionGraph != null) {
                    m.enableFunctionGraph = Boolean(d.enableFunctionGraph);
                }
                if (d.functionFilters) {
                    if (!Array.isArray(d.functionFilters))
                        throw TypeError(".perfetto.protos.FtraceConfig.functionFilters: array expected");
                    m.functionFilters = [];
                    for (var i = 0; i < d.functionFilters.length; ++i) {
                        m.functionFilters[i] = String(d.functionFilters[i]);
                    }
                }
                if (d.functionGraphRoots) {
                    if (!Array.isArray(d.functionGraphRoots))
                        throw TypeError(".perfetto.protos.FtraceConfig.functionGraphRoots: array expected");
                    m.functionGraphRoots = [];
                    for (var i = 0; i < d.functionGraphRoots.length; ++i) {
                        m.functionGraphRoots[i] = String(d.functionGraphRoots[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a FtraceConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.FtraceConfig
             * @static
             * @param {perfetto.protos.FtraceConfig} m FtraceConfig
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            FtraceConfig.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.ftraceEvents = [];
                    d.atraceCategories = [];
                    d.atraceApps = [];
                    d.syscallEvents = [];
                    d.functionFilters = [];
                    d.functionGraphRoots = [];
                }
                if (o.defaults) {
                    d.bufferSizeKb = 0;
                    d.drainPeriodMs = 0;
                    d.compactSched = null;
                    d.symbolizeKsyms = false;
                    d.initializeKsymsSynchronouslyForTesting = false;
                    d.throttleRssStat = false;
                    d.disableGenericEvents = false;
                    d.ksymsMemPolicy = o.enums === String ? "KSYMS_UNSPECIFIED" : 0;
                    d.enableFunctionGraph = false;
                    d.printFilter = null;
                }
                if (m.ftraceEvents && m.ftraceEvents.length) {
                    d.ftraceEvents = [];
                    for (var j = 0; j < m.ftraceEvents.length; ++j) {
                        d.ftraceEvents[j] = m.ftraceEvents[j];
                    }
                }
                if (m.atraceCategories && m.atraceCategories.length) {
                    d.atraceCategories = [];
                    for (var j = 0; j < m.atraceCategories.length; ++j) {
                        d.atraceCategories[j] = m.atraceCategories[j];
                    }
                }
                if (m.atraceApps && m.atraceApps.length) {
                    d.atraceApps = [];
                    for (var j = 0; j < m.atraceApps.length; ++j) {
                        d.atraceApps[j] = m.atraceApps[j];
                    }
                }
                if (m.bufferSizeKb != null && m.hasOwnProperty("bufferSizeKb")) {
                    d.bufferSizeKb = m.bufferSizeKb;
                }
                if (m.drainPeriodMs != null && m.hasOwnProperty("drainPeriodMs")) {
                    d.drainPeriodMs = m.drainPeriodMs;
                }
                if (m.compactSched != null && m.hasOwnProperty("compactSched")) {
                    d.compactSched = $root.perfetto.protos.FtraceConfig.CompactSchedConfig.toObject(m.compactSched, o);
                }
                if (m.symbolizeKsyms != null && m.hasOwnProperty("symbolizeKsyms")) {
                    d.symbolizeKsyms = m.symbolizeKsyms;
                }
                if (m.initializeKsymsSynchronouslyForTesting != null && m.hasOwnProperty("initializeKsymsSynchronouslyForTesting")) {
                    d.initializeKsymsSynchronouslyForTesting = m.initializeKsymsSynchronouslyForTesting;
                }
                if (m.throttleRssStat != null && m.hasOwnProperty("throttleRssStat")) {
                    d.throttleRssStat = m.throttleRssStat;
                }
                if (m.disableGenericEvents != null && m.hasOwnProperty("disableGenericEvents")) {
                    d.disableGenericEvents = m.disableGenericEvents;
                }
                if (m.ksymsMemPolicy != null && m.hasOwnProperty("ksymsMemPolicy")) {
                    d.ksymsMemPolicy = o.enums === String ? $root.perfetto.protos.FtraceConfig.KsymsMemPolicy[m.ksymsMemPolicy] : m.ksymsMemPolicy;
                }
                if (m.syscallEvents && m.syscallEvents.length) {
                    d.syscallEvents = [];
                    for (var j = 0; j < m.syscallEvents.length; ++j) {
                        d.syscallEvents[j] = m.syscallEvents[j];
                    }
                }
                if (m.enableFunctionGraph != null && m.hasOwnProperty("enableFunctionGraph")) {
                    d.enableFunctionGraph = m.enableFunctionGraph;
                }
                if (m.functionFilters && m.functionFilters.length) {
                    d.functionFilters = [];
                    for (var j = 0; j < m.functionFilters.length; ++j) {
                        d.functionFilters[j] = m.functionFilters[j];
                    }
                }
                if (m.functionGraphRoots && m.functionGraphRoots.length) {
                    d.functionGraphRoots = [];
                    for (var j = 0; j < m.functionGraphRoots.length; ++j) {
                        d.functionGraphRoots[j] = m.functionGraphRoots[j];
                    }
                }
                if (m.printFilter != null && m.hasOwnProperty("printFilter")) {
                    d.printFilter = $root.perfetto.protos.FtraceConfig.PrintFilter.toObject(m.printFilter, o);
                }
                return d;
            };

            /**
             * Converts this FtraceConfig to JSON.
             * @function toJSON
             * @memberof perfetto.protos.FtraceConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            FtraceConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            FtraceConfig.CompactSchedConfig = (function() {

                /**
                 * Properties of a CompactSchedConfig.
                 * @memberof perfetto.protos.FtraceConfig
                 * @interface ICompactSchedConfig
                 * @property {boolean|null} [enabled] CompactSchedConfig enabled
                 */

                /**
                 * Constructs a new CompactSchedConfig.
                 * @memberof perfetto.protos.FtraceConfig
                 * @classdesc Represents a CompactSchedConfig.
                 * @implements ICompactSchedConfig
                 * @constructor
                 * @param {perfetto.protos.FtraceConfig.ICompactSchedConfig=} [p] Properties to set
                 */
                function CompactSchedConfig(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * CompactSchedConfig enabled.
                 * @member {boolean} enabled
                 * @memberof perfetto.protos.FtraceConfig.CompactSchedConfig
                 * @instance
                 */
                CompactSchedConfig.prototype.enabled = false;

                /**
                 * Creates a new CompactSchedConfig instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.FtraceConfig.CompactSchedConfig
                 * @static
                 * @param {perfetto.protos.FtraceConfig.ICompactSchedConfig=} [properties] Properties to set
                 * @returns {perfetto.protos.FtraceConfig.CompactSchedConfig} CompactSchedConfig instance
                 */
                CompactSchedConfig.create = function create(properties) {
                    return new CompactSchedConfig(properties);
                };

                /**
                 * Encodes the specified CompactSchedConfig message. Does not implicitly {@link perfetto.protos.FtraceConfig.CompactSchedConfig.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.FtraceConfig.CompactSchedConfig
                 * @static
                 * @param {perfetto.protos.FtraceConfig.ICompactSchedConfig} m CompactSchedConfig message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CompactSchedConfig.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.enabled != null && Object.hasOwnProperty.call(m, "enabled"))
                        w.uint32(8).bool(m.enabled);
                    return w;
                };

                /**
                 * Encodes the specified CompactSchedConfig message, length delimited. Does not implicitly {@link perfetto.protos.FtraceConfig.CompactSchedConfig.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.FtraceConfig.CompactSchedConfig
                 * @static
                 * @param {perfetto.protos.FtraceConfig.ICompactSchedConfig} message CompactSchedConfig message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CompactSchedConfig.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a CompactSchedConfig message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.FtraceConfig.CompactSchedConfig
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.FtraceConfig.CompactSchedConfig} CompactSchedConfig
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CompactSchedConfig.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FtraceConfig.CompactSchedConfig();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.enabled = r.bool();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a CompactSchedConfig message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.FtraceConfig.CompactSchedConfig
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.FtraceConfig.CompactSchedConfig} CompactSchedConfig
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CompactSchedConfig.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a CompactSchedConfig message.
                 * @function verify
                 * @memberof perfetto.protos.FtraceConfig.CompactSchedConfig
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                CompactSchedConfig.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.enabled != null && m.hasOwnProperty("enabled")) {
                        if (typeof m.enabled !== "boolean")
                            return "enabled: boolean expected";
                    }
                    return null;
                };

                /**
                 * Creates a CompactSchedConfig message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.FtraceConfig.CompactSchedConfig
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.FtraceConfig.CompactSchedConfig} CompactSchedConfig
                 */
                CompactSchedConfig.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.FtraceConfig.CompactSchedConfig)
                        return d;
                    var m = new $root.perfetto.protos.FtraceConfig.CompactSchedConfig();
                    if (d.enabled != null) {
                        m.enabled = Boolean(d.enabled);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a CompactSchedConfig message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.FtraceConfig.CompactSchedConfig
                 * @static
                 * @param {perfetto.protos.FtraceConfig.CompactSchedConfig} m CompactSchedConfig
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                CompactSchedConfig.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.enabled = false;
                    }
                    if (m.enabled != null && m.hasOwnProperty("enabled")) {
                        d.enabled = m.enabled;
                    }
                    return d;
                };

                /**
                 * Converts this CompactSchedConfig to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.FtraceConfig.CompactSchedConfig
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                CompactSchedConfig.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return CompactSchedConfig;
            })();

            FtraceConfig.PrintFilter = (function() {

                /**
                 * Properties of a PrintFilter.
                 * @memberof perfetto.protos.FtraceConfig
                 * @interface IPrintFilter
                 * @property {Array.<perfetto.protos.FtraceConfig.PrintFilter.IRule>|null} [rules] PrintFilter rules
                 */

                /**
                 * Constructs a new PrintFilter.
                 * @memberof perfetto.protos.FtraceConfig
                 * @classdesc Represents a PrintFilter.
                 * @implements IPrintFilter
                 * @constructor
                 * @param {perfetto.protos.FtraceConfig.IPrintFilter=} [p] Properties to set
                 */
                function PrintFilter(p) {
                    this.rules = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * PrintFilter rules.
                 * @member {Array.<perfetto.protos.FtraceConfig.PrintFilter.IRule>} rules
                 * @memberof perfetto.protos.FtraceConfig.PrintFilter
                 * @instance
                 */
                PrintFilter.prototype.rules = $util.emptyArray;

                /**
                 * Creates a new PrintFilter instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.FtraceConfig.PrintFilter
                 * @static
                 * @param {perfetto.protos.FtraceConfig.IPrintFilter=} [properties] Properties to set
                 * @returns {perfetto.protos.FtraceConfig.PrintFilter} PrintFilter instance
                 */
                PrintFilter.create = function create(properties) {
                    return new PrintFilter(properties);
                };

                /**
                 * Encodes the specified PrintFilter message. Does not implicitly {@link perfetto.protos.FtraceConfig.PrintFilter.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.FtraceConfig.PrintFilter
                 * @static
                 * @param {perfetto.protos.FtraceConfig.IPrintFilter} m PrintFilter message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PrintFilter.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.rules != null && m.rules.length) {
                        for (var i = 0; i < m.rules.length; ++i)
                            $root.perfetto.protos.FtraceConfig.PrintFilter.Rule.encode(m.rules[i], w.uint32(10).fork()).ldelim();
                    }
                    return w;
                };

                /**
                 * Encodes the specified PrintFilter message, length delimited. Does not implicitly {@link perfetto.protos.FtraceConfig.PrintFilter.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.FtraceConfig.PrintFilter
                 * @static
                 * @param {perfetto.protos.FtraceConfig.IPrintFilter} message PrintFilter message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PrintFilter.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a PrintFilter message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.FtraceConfig.PrintFilter
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.FtraceConfig.PrintFilter} PrintFilter
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PrintFilter.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FtraceConfig.PrintFilter();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            if (!(m.rules && m.rules.length))
                                m.rules = [];
                            m.rules.push($root.perfetto.protos.FtraceConfig.PrintFilter.Rule.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a PrintFilter message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.FtraceConfig.PrintFilter
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.FtraceConfig.PrintFilter} PrintFilter
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PrintFilter.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a PrintFilter message.
                 * @function verify
                 * @memberof perfetto.protos.FtraceConfig.PrintFilter
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                PrintFilter.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.rules != null && m.hasOwnProperty("rules")) {
                        if (!Array.isArray(m.rules))
                            return "rules: array expected";
                        for (var i = 0; i < m.rules.length; ++i) {
                            {
                                var e = $root.perfetto.protos.FtraceConfig.PrintFilter.Rule.verify(m.rules[i]);
                                if (e)
                                    return "rules." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates a PrintFilter message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.FtraceConfig.PrintFilter
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.FtraceConfig.PrintFilter} PrintFilter
                 */
                PrintFilter.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.FtraceConfig.PrintFilter)
                        return d;
                    var m = new $root.perfetto.protos.FtraceConfig.PrintFilter();
                    if (d.rules) {
                        if (!Array.isArray(d.rules))
                            throw TypeError(".perfetto.protos.FtraceConfig.PrintFilter.rules: array expected");
                        m.rules = [];
                        for (var i = 0; i < d.rules.length; ++i) {
                            if (typeof d.rules[i] !== "object")
                                throw TypeError(".perfetto.protos.FtraceConfig.PrintFilter.rules: object expected");
                            m.rules[i] = $root.perfetto.protos.FtraceConfig.PrintFilter.Rule.fromObject(d.rules[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a PrintFilter message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.FtraceConfig.PrintFilter
                 * @static
                 * @param {perfetto.protos.FtraceConfig.PrintFilter} m PrintFilter
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                PrintFilter.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.rules = [];
                    }
                    if (m.rules && m.rules.length) {
                        d.rules = [];
                        for (var j = 0; j < m.rules.length; ++j) {
                            d.rules[j] = $root.perfetto.protos.FtraceConfig.PrintFilter.Rule.toObject(m.rules[j], o);
                        }
                    }
                    return d;
                };

                /**
                 * Converts this PrintFilter to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.FtraceConfig.PrintFilter
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                PrintFilter.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                PrintFilter.Rule = (function() {

                    /**
                     * Properties of a Rule.
                     * @memberof perfetto.protos.FtraceConfig.PrintFilter
                     * @interface IRule
                     * @property {string|null} [prefix] Rule prefix
                     * @property {boolean|null} [allow] Rule allow
                     */

                    /**
                     * Constructs a new Rule.
                     * @memberof perfetto.protos.FtraceConfig.PrintFilter
                     * @classdesc Represents a Rule.
                     * @implements IRule
                     * @constructor
                     * @param {perfetto.protos.FtraceConfig.PrintFilter.IRule=} [p] Properties to set
                     */
                    function Rule(p) {
                        if (p)
                            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                                if (p[ks[i]] != null)
                                    this[ks[i]] = p[ks[i]];
                    }

                    /**
                     * Rule prefix.
                     * @member {string} prefix
                     * @memberof perfetto.protos.FtraceConfig.PrintFilter.Rule
                     * @instance
                     */
                    Rule.prototype.prefix = "";

                    /**
                     * Rule allow.
                     * @member {boolean} allow
                     * @memberof perfetto.protos.FtraceConfig.PrintFilter.Rule
                     * @instance
                     */
                    Rule.prototype.allow = false;

                    /**
                     * Creates a new Rule instance using the specified properties.
                     * @function create
                     * @memberof perfetto.protos.FtraceConfig.PrintFilter.Rule
                     * @static
                     * @param {perfetto.protos.FtraceConfig.PrintFilter.IRule=} [properties] Properties to set
                     * @returns {perfetto.protos.FtraceConfig.PrintFilter.Rule} Rule instance
                     */
                    Rule.create = function create(properties) {
                        return new Rule(properties);
                    };

                    /**
                     * Encodes the specified Rule message. Does not implicitly {@link perfetto.protos.FtraceConfig.PrintFilter.Rule.verify|verify} messages.
                     * @function encode
                     * @memberof perfetto.protos.FtraceConfig.PrintFilter.Rule
                     * @static
                     * @param {perfetto.protos.FtraceConfig.PrintFilter.IRule} m Rule message or plain object to encode
                     * @param {$protobuf.Writer} [w] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Rule.encode = function encode(m, w) {
                        if (!w)
                            w = $Writer.create();
                        if (m.prefix != null && Object.hasOwnProperty.call(m, "prefix"))
                            w.uint32(10).string(m.prefix);
                        if (m.allow != null && Object.hasOwnProperty.call(m, "allow"))
                            w.uint32(16).bool(m.allow);
                        return w;
                    };

                    /**
                     * Encodes the specified Rule message, length delimited. Does not implicitly {@link perfetto.protos.FtraceConfig.PrintFilter.Rule.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof perfetto.protos.FtraceConfig.PrintFilter.Rule
                     * @static
                     * @param {perfetto.protos.FtraceConfig.PrintFilter.IRule} message Rule message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Rule.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a Rule message from the specified reader or buffer.
                     * @function decode
                     * @memberof perfetto.protos.FtraceConfig.PrintFilter.Rule
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                     * @param {number} [l] Message length if known beforehand
                     * @returns {perfetto.protos.FtraceConfig.PrintFilter.Rule} Rule
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Rule.decode = function decode(r, l) {
                        if (!(r instanceof $Reader))
                            r = $Reader.create(r);
                        var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FtraceConfig.PrintFilter.Rule();
                        while (r.pos < c) {
                            var t = r.uint32();
                            switch (t >>> 3) {
                            case 1:
                                m.prefix = r.string();
                                break;
                            case 2:
                                m.allow = r.bool();
                                break;
                            default:
                                r.skipType(t & 7);
                                break;
                            }
                        }
                        return m;
                    };

                    /**
                     * Decodes a Rule message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof perfetto.protos.FtraceConfig.PrintFilter.Rule
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {perfetto.protos.FtraceConfig.PrintFilter.Rule} Rule
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Rule.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a Rule message.
                     * @function verify
                     * @memberof perfetto.protos.FtraceConfig.PrintFilter.Rule
                     * @static
                     * @param {Object.<string,*>} m Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    Rule.verify = function verify(m) {
                        if (typeof m !== "object" || m === null)
                            return "object expected";
                        if (m.prefix != null && m.hasOwnProperty("prefix")) {
                            if (!$util.isString(m.prefix))
                                return "prefix: string expected";
                        }
                        if (m.allow != null && m.hasOwnProperty("allow")) {
                            if (typeof m.allow !== "boolean")
                                return "allow: boolean expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a Rule message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof perfetto.protos.FtraceConfig.PrintFilter.Rule
                     * @static
                     * @param {Object.<string,*>} d Plain object
                     * @returns {perfetto.protos.FtraceConfig.PrintFilter.Rule} Rule
                     */
                    Rule.fromObject = function fromObject(d) {
                        if (d instanceof $root.perfetto.protos.FtraceConfig.PrintFilter.Rule)
                            return d;
                        var m = new $root.perfetto.protos.FtraceConfig.PrintFilter.Rule();
                        if (d.prefix != null) {
                            m.prefix = String(d.prefix);
                        }
                        if (d.allow != null) {
                            m.allow = Boolean(d.allow);
                        }
                        return m;
                    };

                    /**
                     * Creates a plain object from a Rule message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof perfetto.protos.FtraceConfig.PrintFilter.Rule
                     * @static
                     * @param {perfetto.protos.FtraceConfig.PrintFilter.Rule} m Rule
                     * @param {$protobuf.IConversionOptions} [o] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    Rule.toObject = function toObject(m, o) {
                        if (!o)
                            o = {};
                        var d = {};
                        if (o.defaults) {
                            d.prefix = "";
                            d.allow = false;
                        }
                        if (m.prefix != null && m.hasOwnProperty("prefix")) {
                            d.prefix = m.prefix;
                        }
                        if (m.allow != null && m.hasOwnProperty("allow")) {
                            d.allow = m.allow;
                        }
                        return d;
                    };

                    /**
                     * Converts this Rule to JSON.
                     * @function toJSON
                     * @memberof perfetto.protos.FtraceConfig.PrintFilter.Rule
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    Rule.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                    };

                    return Rule;
                })();

                return PrintFilter;
            })();

            /**
             * KsymsMemPolicy enum.
             * @name perfetto.protos.FtraceConfig.KsymsMemPolicy
             * @enum {number}
             * @property {number} KSYMS_UNSPECIFIED=0 KSYMS_UNSPECIFIED value
             * @property {number} KSYMS_CLEANUP_ON_STOP=1 KSYMS_CLEANUP_ON_STOP value
             * @property {number} KSYMS_RETAIN=2 KSYMS_RETAIN value
             */
            FtraceConfig.KsymsMemPolicy = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "KSYMS_UNSPECIFIED"] = 0;
                values[valuesById[1] = "KSYMS_CLEANUP_ON_STOP"] = 1;
                values[valuesById[2] = "KSYMS_RETAIN"] = 2;
                return values;
            })();

            return FtraceConfig;
        })();

        protos.GpuCounterConfig = (function() {

            /**
             * Properties of a GpuCounterConfig.
             * @memberof perfetto.protos
             * @interface IGpuCounterConfig
             * @property {number|null} [counterPeriodNs] GpuCounterConfig counterPeriodNs
             * @property {Array.<number>|null} [counterIds] GpuCounterConfig counterIds
             * @property {boolean|null} [instrumentedSampling] GpuCounterConfig instrumentedSampling
             * @property {boolean|null} [fixGpuClock] GpuCounterConfig fixGpuClock
             */

            /**
             * Constructs a new GpuCounterConfig.
             * @memberof perfetto.protos
             * @classdesc Represents a GpuCounterConfig.
             * @implements IGpuCounterConfig
             * @constructor
             * @param {perfetto.protos.IGpuCounterConfig=} [p] Properties to set
             */
            function GpuCounterConfig(p) {
                this.counterIds = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * GpuCounterConfig counterPeriodNs.
             * @member {number} counterPeriodNs
             * @memberof perfetto.protos.GpuCounterConfig
             * @instance
             */
            GpuCounterConfig.prototype.counterPeriodNs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * GpuCounterConfig counterIds.
             * @member {Array.<number>} counterIds
             * @memberof perfetto.protos.GpuCounterConfig
             * @instance
             */
            GpuCounterConfig.prototype.counterIds = $util.emptyArray;

            /**
             * GpuCounterConfig instrumentedSampling.
             * @member {boolean} instrumentedSampling
             * @memberof perfetto.protos.GpuCounterConfig
             * @instance
             */
            GpuCounterConfig.prototype.instrumentedSampling = false;

            /**
             * GpuCounterConfig fixGpuClock.
             * @member {boolean} fixGpuClock
             * @memberof perfetto.protos.GpuCounterConfig
             * @instance
             */
            GpuCounterConfig.prototype.fixGpuClock = false;

            /**
             * Creates a new GpuCounterConfig instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.GpuCounterConfig
             * @static
             * @param {perfetto.protos.IGpuCounterConfig=} [properties] Properties to set
             * @returns {perfetto.protos.GpuCounterConfig} GpuCounterConfig instance
             */
            GpuCounterConfig.create = function create(properties) {
                return new GpuCounterConfig(properties);
            };

            /**
             * Encodes the specified GpuCounterConfig message. Does not implicitly {@link perfetto.protos.GpuCounterConfig.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.GpuCounterConfig
             * @static
             * @param {perfetto.protos.IGpuCounterConfig} m GpuCounterConfig message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GpuCounterConfig.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.counterPeriodNs != null && Object.hasOwnProperty.call(m, "counterPeriodNs"))
                    w.uint32(8).uint64(m.counterPeriodNs);
                if (m.counterIds != null && m.counterIds.length) {
                    for (var i = 0; i < m.counterIds.length; ++i)
                        w.uint32(16).uint32(m.counterIds[i]);
                }
                if (m.instrumentedSampling != null && Object.hasOwnProperty.call(m, "instrumentedSampling"))
                    w.uint32(24).bool(m.instrumentedSampling);
                if (m.fixGpuClock != null && Object.hasOwnProperty.call(m, "fixGpuClock"))
                    w.uint32(32).bool(m.fixGpuClock);
                return w;
            };

            /**
             * Encodes the specified GpuCounterConfig message, length delimited. Does not implicitly {@link perfetto.protos.GpuCounterConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.GpuCounterConfig
             * @static
             * @param {perfetto.protos.IGpuCounterConfig} message GpuCounterConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GpuCounterConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a GpuCounterConfig message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.GpuCounterConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.GpuCounterConfig} GpuCounterConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GpuCounterConfig.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.GpuCounterConfig();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.counterPeriodNs = r.uint64();
                        break;
                    case 2:
                        if (!(m.counterIds && m.counterIds.length))
                            m.counterIds = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.counterIds.push(r.uint32());
                        } else
                            m.counterIds.push(r.uint32());
                        break;
                    case 3:
                        m.instrumentedSampling = r.bool();
                        break;
                    case 4:
                        m.fixGpuClock = r.bool();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a GpuCounterConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.GpuCounterConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.GpuCounterConfig} GpuCounterConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GpuCounterConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a GpuCounterConfig message.
             * @function verify
             * @memberof perfetto.protos.GpuCounterConfig
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            GpuCounterConfig.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.counterPeriodNs != null && m.hasOwnProperty("counterPeriodNs")) {
                    if (!$util.isInteger(m.counterPeriodNs) && !(m.counterPeriodNs && $util.isInteger(m.counterPeriodNs.low) && $util.isInteger(m.counterPeriodNs.high)))
                        return "counterPeriodNs: integer|Long expected";
                }
                if (m.counterIds != null && m.hasOwnProperty("counterIds")) {
                    if (!Array.isArray(m.counterIds))
                        return "counterIds: array expected";
                    for (var i = 0; i < m.counterIds.length; ++i) {
                        if (!$util.isInteger(m.counterIds[i]))
                            return "counterIds: integer[] expected";
                    }
                }
                if (m.instrumentedSampling != null && m.hasOwnProperty("instrumentedSampling")) {
                    if (typeof m.instrumentedSampling !== "boolean")
                        return "instrumentedSampling: boolean expected";
                }
                if (m.fixGpuClock != null && m.hasOwnProperty("fixGpuClock")) {
                    if (typeof m.fixGpuClock !== "boolean")
                        return "fixGpuClock: boolean expected";
                }
                return null;
            };

            /**
             * Creates a GpuCounterConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.GpuCounterConfig
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.GpuCounterConfig} GpuCounterConfig
             */
            GpuCounterConfig.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.GpuCounterConfig)
                    return d;
                var m = new $root.perfetto.protos.GpuCounterConfig();
                if (d.counterPeriodNs != null) {
                    if ($util.Long)
                        (m.counterPeriodNs = $util.Long.fromValue(d.counterPeriodNs)).unsigned = true;
                    else if (typeof d.counterPeriodNs === "string")
                        m.counterPeriodNs = parseInt(d.counterPeriodNs, 10);
                    else if (typeof d.counterPeriodNs === "number")
                        m.counterPeriodNs = d.counterPeriodNs;
                    else if (typeof d.counterPeriodNs === "object")
                        m.counterPeriodNs = new $util.LongBits(d.counterPeriodNs.low >>> 0, d.counterPeriodNs.high >>> 0).toNumber(true);
                }
                if (d.counterIds) {
                    if (!Array.isArray(d.counterIds))
                        throw TypeError(".perfetto.protos.GpuCounterConfig.counterIds: array expected");
                    m.counterIds = [];
                    for (var i = 0; i < d.counterIds.length; ++i) {
                        m.counterIds[i] = d.counterIds[i] >>> 0;
                    }
                }
                if (d.instrumentedSampling != null) {
                    m.instrumentedSampling = Boolean(d.instrumentedSampling);
                }
                if (d.fixGpuClock != null) {
                    m.fixGpuClock = Boolean(d.fixGpuClock);
                }
                return m;
            };

            /**
             * Creates a plain object from a GpuCounterConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.GpuCounterConfig
             * @static
             * @param {perfetto.protos.GpuCounterConfig} m GpuCounterConfig
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            GpuCounterConfig.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.counterIds = [];
                }
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.counterPeriodNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.counterPeriodNs = o.longs === String ? "0" : 0;
                    d.instrumentedSampling = false;
                    d.fixGpuClock = false;
                }
                if (m.counterPeriodNs != null && m.hasOwnProperty("counterPeriodNs")) {
                    if (typeof m.counterPeriodNs === "number")
                        d.counterPeriodNs = o.longs === String ? String(m.counterPeriodNs) : m.counterPeriodNs;
                    else
                        d.counterPeriodNs = o.longs === String ? $util.Long.prototype.toString.call(m.counterPeriodNs) : o.longs === Number ? new $util.LongBits(m.counterPeriodNs.low >>> 0, m.counterPeriodNs.high >>> 0).toNumber(true) : m.counterPeriodNs;
                }
                if (m.counterIds && m.counterIds.length) {
                    d.counterIds = [];
                    for (var j = 0; j < m.counterIds.length; ++j) {
                        d.counterIds[j] = m.counterIds[j];
                    }
                }
                if (m.instrumentedSampling != null && m.hasOwnProperty("instrumentedSampling")) {
                    d.instrumentedSampling = m.instrumentedSampling;
                }
                if (m.fixGpuClock != null && m.hasOwnProperty("fixGpuClock")) {
                    d.fixGpuClock = m.fixGpuClock;
                }
                return d;
            };

            /**
             * Converts this GpuCounterConfig to JSON.
             * @function toJSON
             * @memberof perfetto.protos.GpuCounterConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            GpuCounterConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return GpuCounterConfig;
        })();

        protos.VulkanMemoryConfig = (function() {

            /**
             * Properties of a VulkanMemoryConfig.
             * @memberof perfetto.protos
             * @interface IVulkanMemoryConfig
             * @property {boolean|null} [trackDriverMemoryUsage] VulkanMemoryConfig trackDriverMemoryUsage
             * @property {boolean|null} [trackDeviceMemoryUsage] VulkanMemoryConfig trackDeviceMemoryUsage
             */

            /**
             * Constructs a new VulkanMemoryConfig.
             * @memberof perfetto.protos
             * @classdesc Represents a VulkanMemoryConfig.
             * @implements IVulkanMemoryConfig
             * @constructor
             * @param {perfetto.protos.IVulkanMemoryConfig=} [p] Properties to set
             */
            function VulkanMemoryConfig(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * VulkanMemoryConfig trackDriverMemoryUsage.
             * @member {boolean} trackDriverMemoryUsage
             * @memberof perfetto.protos.VulkanMemoryConfig
             * @instance
             */
            VulkanMemoryConfig.prototype.trackDriverMemoryUsage = false;

            /**
             * VulkanMemoryConfig trackDeviceMemoryUsage.
             * @member {boolean} trackDeviceMemoryUsage
             * @memberof perfetto.protos.VulkanMemoryConfig
             * @instance
             */
            VulkanMemoryConfig.prototype.trackDeviceMemoryUsage = false;

            /**
             * Creates a new VulkanMemoryConfig instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.VulkanMemoryConfig
             * @static
             * @param {perfetto.protos.IVulkanMemoryConfig=} [properties] Properties to set
             * @returns {perfetto.protos.VulkanMemoryConfig} VulkanMemoryConfig instance
             */
            VulkanMemoryConfig.create = function create(properties) {
                return new VulkanMemoryConfig(properties);
            };

            /**
             * Encodes the specified VulkanMemoryConfig message. Does not implicitly {@link perfetto.protos.VulkanMemoryConfig.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.VulkanMemoryConfig
             * @static
             * @param {perfetto.protos.IVulkanMemoryConfig} m VulkanMemoryConfig message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            VulkanMemoryConfig.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.trackDriverMemoryUsage != null && Object.hasOwnProperty.call(m, "trackDriverMemoryUsage"))
                    w.uint32(8).bool(m.trackDriverMemoryUsage);
                if (m.trackDeviceMemoryUsage != null && Object.hasOwnProperty.call(m, "trackDeviceMemoryUsage"))
                    w.uint32(16).bool(m.trackDeviceMemoryUsage);
                return w;
            };

            /**
             * Encodes the specified VulkanMemoryConfig message, length delimited. Does not implicitly {@link perfetto.protos.VulkanMemoryConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.VulkanMemoryConfig
             * @static
             * @param {perfetto.protos.IVulkanMemoryConfig} message VulkanMemoryConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            VulkanMemoryConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a VulkanMemoryConfig message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.VulkanMemoryConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.VulkanMemoryConfig} VulkanMemoryConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            VulkanMemoryConfig.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.VulkanMemoryConfig();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.trackDriverMemoryUsage = r.bool();
                        break;
                    case 2:
                        m.trackDeviceMemoryUsage = r.bool();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a VulkanMemoryConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.VulkanMemoryConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.VulkanMemoryConfig} VulkanMemoryConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            VulkanMemoryConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a VulkanMemoryConfig message.
             * @function verify
             * @memberof perfetto.protos.VulkanMemoryConfig
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            VulkanMemoryConfig.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.trackDriverMemoryUsage != null && m.hasOwnProperty("trackDriverMemoryUsage")) {
                    if (typeof m.trackDriverMemoryUsage !== "boolean")
                        return "trackDriverMemoryUsage: boolean expected";
                }
                if (m.trackDeviceMemoryUsage != null && m.hasOwnProperty("trackDeviceMemoryUsage")) {
                    if (typeof m.trackDeviceMemoryUsage !== "boolean")
                        return "trackDeviceMemoryUsage: boolean expected";
                }
                return null;
            };

            /**
             * Creates a VulkanMemoryConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.VulkanMemoryConfig
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.VulkanMemoryConfig} VulkanMemoryConfig
             */
            VulkanMemoryConfig.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.VulkanMemoryConfig)
                    return d;
                var m = new $root.perfetto.protos.VulkanMemoryConfig();
                if (d.trackDriverMemoryUsage != null) {
                    m.trackDriverMemoryUsage = Boolean(d.trackDriverMemoryUsage);
                }
                if (d.trackDeviceMemoryUsage != null) {
                    m.trackDeviceMemoryUsage = Boolean(d.trackDeviceMemoryUsage);
                }
                return m;
            };

            /**
             * Creates a plain object from a VulkanMemoryConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.VulkanMemoryConfig
             * @static
             * @param {perfetto.protos.VulkanMemoryConfig} m VulkanMemoryConfig
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            VulkanMemoryConfig.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.trackDriverMemoryUsage = false;
                    d.trackDeviceMemoryUsage = false;
                }
                if (m.trackDriverMemoryUsage != null && m.hasOwnProperty("trackDriverMemoryUsage")) {
                    d.trackDriverMemoryUsage = m.trackDriverMemoryUsage;
                }
                if (m.trackDeviceMemoryUsage != null && m.hasOwnProperty("trackDeviceMemoryUsage")) {
                    d.trackDeviceMemoryUsage = m.trackDeviceMemoryUsage;
                }
                return d;
            };

            /**
             * Converts this VulkanMemoryConfig to JSON.
             * @function toJSON
             * @memberof perfetto.protos.VulkanMemoryConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            VulkanMemoryConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return VulkanMemoryConfig;
        })();

        protos.InodeFileConfig = (function() {

            /**
             * Properties of an InodeFileConfig.
             * @memberof perfetto.protos
             * @interface IInodeFileConfig
             * @property {number|null} [scanIntervalMs] InodeFileConfig scanIntervalMs
             * @property {number|null} [scanDelayMs] InodeFileConfig scanDelayMs
             * @property {number|null} [scanBatchSize] InodeFileConfig scanBatchSize
             * @property {boolean|null} [doNotScan] InodeFileConfig doNotScan
             * @property {Array.<string>|null} [scanMountPoints] InodeFileConfig scanMountPoints
             * @property {Array.<perfetto.protos.InodeFileConfig.IMountPointMappingEntry>|null} [mountPointMapping] InodeFileConfig mountPointMapping
             */

            /**
             * Constructs a new InodeFileConfig.
             * @memberof perfetto.protos
             * @classdesc Represents an InodeFileConfig.
             * @implements IInodeFileConfig
             * @constructor
             * @param {perfetto.protos.IInodeFileConfig=} [p] Properties to set
             */
            function InodeFileConfig(p) {
                this.scanMountPoints = [];
                this.mountPointMapping = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * InodeFileConfig scanIntervalMs.
             * @member {number} scanIntervalMs
             * @memberof perfetto.protos.InodeFileConfig
             * @instance
             */
            InodeFileConfig.prototype.scanIntervalMs = 0;

            /**
             * InodeFileConfig scanDelayMs.
             * @member {number} scanDelayMs
             * @memberof perfetto.protos.InodeFileConfig
             * @instance
             */
            InodeFileConfig.prototype.scanDelayMs = 0;

            /**
             * InodeFileConfig scanBatchSize.
             * @member {number} scanBatchSize
             * @memberof perfetto.protos.InodeFileConfig
             * @instance
             */
            InodeFileConfig.prototype.scanBatchSize = 0;

            /**
             * InodeFileConfig doNotScan.
             * @member {boolean} doNotScan
             * @memberof perfetto.protos.InodeFileConfig
             * @instance
             */
            InodeFileConfig.prototype.doNotScan = false;

            /**
             * InodeFileConfig scanMountPoints.
             * @member {Array.<string>} scanMountPoints
             * @memberof perfetto.protos.InodeFileConfig
             * @instance
             */
            InodeFileConfig.prototype.scanMountPoints = $util.emptyArray;

            /**
             * InodeFileConfig mountPointMapping.
             * @member {Array.<perfetto.protos.InodeFileConfig.IMountPointMappingEntry>} mountPointMapping
             * @memberof perfetto.protos.InodeFileConfig
             * @instance
             */
            InodeFileConfig.prototype.mountPointMapping = $util.emptyArray;

            /**
             * Creates a new InodeFileConfig instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.InodeFileConfig
             * @static
             * @param {perfetto.protos.IInodeFileConfig=} [properties] Properties to set
             * @returns {perfetto.protos.InodeFileConfig} InodeFileConfig instance
             */
            InodeFileConfig.create = function create(properties) {
                return new InodeFileConfig(properties);
            };

            /**
             * Encodes the specified InodeFileConfig message. Does not implicitly {@link perfetto.protos.InodeFileConfig.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.InodeFileConfig
             * @static
             * @param {perfetto.protos.IInodeFileConfig} m InodeFileConfig message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InodeFileConfig.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.scanIntervalMs != null && Object.hasOwnProperty.call(m, "scanIntervalMs"))
                    w.uint32(8).uint32(m.scanIntervalMs);
                if (m.scanDelayMs != null && Object.hasOwnProperty.call(m, "scanDelayMs"))
                    w.uint32(16).uint32(m.scanDelayMs);
                if (m.scanBatchSize != null && Object.hasOwnProperty.call(m, "scanBatchSize"))
                    w.uint32(24).uint32(m.scanBatchSize);
                if (m.doNotScan != null && Object.hasOwnProperty.call(m, "doNotScan"))
                    w.uint32(32).bool(m.doNotScan);
                if (m.scanMountPoints != null && m.scanMountPoints.length) {
                    for (var i = 0; i < m.scanMountPoints.length; ++i)
                        w.uint32(42).string(m.scanMountPoints[i]);
                }
                if (m.mountPointMapping != null && m.mountPointMapping.length) {
                    for (var i = 0; i < m.mountPointMapping.length; ++i)
                        $root.perfetto.protos.InodeFileConfig.MountPointMappingEntry.encode(m.mountPointMapping[i], w.uint32(50).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified InodeFileConfig message, length delimited. Does not implicitly {@link perfetto.protos.InodeFileConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.InodeFileConfig
             * @static
             * @param {perfetto.protos.IInodeFileConfig} message InodeFileConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InodeFileConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an InodeFileConfig message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.InodeFileConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.InodeFileConfig} InodeFileConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InodeFileConfig.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.InodeFileConfig();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.scanIntervalMs = r.uint32();
                        break;
                    case 2:
                        m.scanDelayMs = r.uint32();
                        break;
                    case 3:
                        m.scanBatchSize = r.uint32();
                        break;
                    case 4:
                        m.doNotScan = r.bool();
                        break;
                    case 5:
                        if (!(m.scanMountPoints && m.scanMountPoints.length))
                            m.scanMountPoints = [];
                        m.scanMountPoints.push(r.string());
                        break;
                    case 6:
                        if (!(m.mountPointMapping && m.mountPointMapping.length))
                            m.mountPointMapping = [];
                        m.mountPointMapping.push($root.perfetto.protos.InodeFileConfig.MountPointMappingEntry.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an InodeFileConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.InodeFileConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.InodeFileConfig} InodeFileConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InodeFileConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an InodeFileConfig message.
             * @function verify
             * @memberof perfetto.protos.InodeFileConfig
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            InodeFileConfig.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.scanIntervalMs != null && m.hasOwnProperty("scanIntervalMs")) {
                    if (!$util.isInteger(m.scanIntervalMs))
                        return "scanIntervalMs: integer expected";
                }
                if (m.scanDelayMs != null && m.hasOwnProperty("scanDelayMs")) {
                    if (!$util.isInteger(m.scanDelayMs))
                        return "scanDelayMs: integer expected";
                }
                if (m.scanBatchSize != null && m.hasOwnProperty("scanBatchSize")) {
                    if (!$util.isInteger(m.scanBatchSize))
                        return "scanBatchSize: integer expected";
                }
                if (m.doNotScan != null && m.hasOwnProperty("doNotScan")) {
                    if (typeof m.doNotScan !== "boolean")
                        return "doNotScan: boolean expected";
                }
                if (m.scanMountPoints != null && m.hasOwnProperty("scanMountPoints")) {
                    if (!Array.isArray(m.scanMountPoints))
                        return "scanMountPoints: array expected";
                    for (var i = 0; i < m.scanMountPoints.length; ++i) {
                        if (!$util.isString(m.scanMountPoints[i]))
                            return "scanMountPoints: string[] expected";
                    }
                }
                if (m.mountPointMapping != null && m.hasOwnProperty("mountPointMapping")) {
                    if (!Array.isArray(m.mountPointMapping))
                        return "mountPointMapping: array expected";
                    for (var i = 0; i < m.mountPointMapping.length; ++i) {
                        {
                            var e = $root.perfetto.protos.InodeFileConfig.MountPointMappingEntry.verify(m.mountPointMapping[i]);
                            if (e)
                                return "mountPointMapping." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an InodeFileConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.InodeFileConfig
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.InodeFileConfig} InodeFileConfig
             */
            InodeFileConfig.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.InodeFileConfig)
                    return d;
                var m = new $root.perfetto.protos.InodeFileConfig();
                if (d.scanIntervalMs != null) {
                    m.scanIntervalMs = d.scanIntervalMs >>> 0;
                }
                if (d.scanDelayMs != null) {
                    m.scanDelayMs = d.scanDelayMs >>> 0;
                }
                if (d.scanBatchSize != null) {
                    m.scanBatchSize = d.scanBatchSize >>> 0;
                }
                if (d.doNotScan != null) {
                    m.doNotScan = Boolean(d.doNotScan);
                }
                if (d.scanMountPoints) {
                    if (!Array.isArray(d.scanMountPoints))
                        throw TypeError(".perfetto.protos.InodeFileConfig.scanMountPoints: array expected");
                    m.scanMountPoints = [];
                    for (var i = 0; i < d.scanMountPoints.length; ++i) {
                        m.scanMountPoints[i] = String(d.scanMountPoints[i]);
                    }
                }
                if (d.mountPointMapping) {
                    if (!Array.isArray(d.mountPointMapping))
                        throw TypeError(".perfetto.protos.InodeFileConfig.mountPointMapping: array expected");
                    m.mountPointMapping = [];
                    for (var i = 0; i < d.mountPointMapping.length; ++i) {
                        if (typeof d.mountPointMapping[i] !== "object")
                            throw TypeError(".perfetto.protos.InodeFileConfig.mountPointMapping: object expected");
                        m.mountPointMapping[i] = $root.perfetto.protos.InodeFileConfig.MountPointMappingEntry.fromObject(d.mountPointMapping[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an InodeFileConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.InodeFileConfig
             * @static
             * @param {perfetto.protos.InodeFileConfig} m InodeFileConfig
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            InodeFileConfig.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.scanMountPoints = [];
                    d.mountPointMapping = [];
                }
                if (o.defaults) {
                    d.scanIntervalMs = 0;
                    d.scanDelayMs = 0;
                    d.scanBatchSize = 0;
                    d.doNotScan = false;
                }
                if (m.scanIntervalMs != null && m.hasOwnProperty("scanIntervalMs")) {
                    d.scanIntervalMs = m.scanIntervalMs;
                }
                if (m.scanDelayMs != null && m.hasOwnProperty("scanDelayMs")) {
                    d.scanDelayMs = m.scanDelayMs;
                }
                if (m.scanBatchSize != null && m.hasOwnProperty("scanBatchSize")) {
                    d.scanBatchSize = m.scanBatchSize;
                }
                if (m.doNotScan != null && m.hasOwnProperty("doNotScan")) {
                    d.doNotScan = m.doNotScan;
                }
                if (m.scanMountPoints && m.scanMountPoints.length) {
                    d.scanMountPoints = [];
                    for (var j = 0; j < m.scanMountPoints.length; ++j) {
                        d.scanMountPoints[j] = m.scanMountPoints[j];
                    }
                }
                if (m.mountPointMapping && m.mountPointMapping.length) {
                    d.mountPointMapping = [];
                    for (var j = 0; j < m.mountPointMapping.length; ++j) {
                        d.mountPointMapping[j] = $root.perfetto.protos.InodeFileConfig.MountPointMappingEntry.toObject(m.mountPointMapping[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this InodeFileConfig to JSON.
             * @function toJSON
             * @memberof perfetto.protos.InodeFileConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            InodeFileConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            InodeFileConfig.MountPointMappingEntry = (function() {

                /**
                 * Properties of a MountPointMappingEntry.
                 * @memberof perfetto.protos.InodeFileConfig
                 * @interface IMountPointMappingEntry
                 * @property {string|null} [mountpoint] MountPointMappingEntry mountpoint
                 * @property {Array.<string>|null} [scanRoots] MountPointMappingEntry scanRoots
                 */

                /**
                 * Constructs a new MountPointMappingEntry.
                 * @memberof perfetto.protos.InodeFileConfig
                 * @classdesc Represents a MountPointMappingEntry.
                 * @implements IMountPointMappingEntry
                 * @constructor
                 * @param {perfetto.protos.InodeFileConfig.IMountPointMappingEntry=} [p] Properties to set
                 */
                function MountPointMappingEntry(p) {
                    this.scanRoots = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * MountPointMappingEntry mountpoint.
                 * @member {string} mountpoint
                 * @memberof perfetto.protos.InodeFileConfig.MountPointMappingEntry
                 * @instance
                 */
                MountPointMappingEntry.prototype.mountpoint = "";

                /**
                 * MountPointMappingEntry scanRoots.
                 * @member {Array.<string>} scanRoots
                 * @memberof perfetto.protos.InodeFileConfig.MountPointMappingEntry
                 * @instance
                 */
                MountPointMappingEntry.prototype.scanRoots = $util.emptyArray;

                /**
                 * Creates a new MountPointMappingEntry instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.InodeFileConfig.MountPointMappingEntry
                 * @static
                 * @param {perfetto.protos.InodeFileConfig.IMountPointMappingEntry=} [properties] Properties to set
                 * @returns {perfetto.protos.InodeFileConfig.MountPointMappingEntry} MountPointMappingEntry instance
                 */
                MountPointMappingEntry.create = function create(properties) {
                    return new MountPointMappingEntry(properties);
                };

                /**
                 * Encodes the specified MountPointMappingEntry message. Does not implicitly {@link perfetto.protos.InodeFileConfig.MountPointMappingEntry.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.InodeFileConfig.MountPointMappingEntry
                 * @static
                 * @param {perfetto.protos.InodeFileConfig.IMountPointMappingEntry} m MountPointMappingEntry message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                MountPointMappingEntry.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.mountpoint != null && Object.hasOwnProperty.call(m, "mountpoint"))
                        w.uint32(10).string(m.mountpoint);
                    if (m.scanRoots != null && m.scanRoots.length) {
                        for (var i = 0; i < m.scanRoots.length; ++i)
                            w.uint32(18).string(m.scanRoots[i]);
                    }
                    return w;
                };

                /**
                 * Encodes the specified MountPointMappingEntry message, length delimited. Does not implicitly {@link perfetto.protos.InodeFileConfig.MountPointMappingEntry.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.InodeFileConfig.MountPointMappingEntry
                 * @static
                 * @param {perfetto.protos.InodeFileConfig.IMountPointMappingEntry} message MountPointMappingEntry message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                MountPointMappingEntry.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a MountPointMappingEntry message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.InodeFileConfig.MountPointMappingEntry
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.InodeFileConfig.MountPointMappingEntry} MountPointMappingEntry
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                MountPointMappingEntry.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.InodeFileConfig.MountPointMappingEntry();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.mountpoint = r.string();
                            break;
                        case 2:
                            if (!(m.scanRoots && m.scanRoots.length))
                                m.scanRoots = [];
                            m.scanRoots.push(r.string());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a MountPointMappingEntry message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.InodeFileConfig.MountPointMappingEntry
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.InodeFileConfig.MountPointMappingEntry} MountPointMappingEntry
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                MountPointMappingEntry.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a MountPointMappingEntry message.
                 * @function verify
                 * @memberof perfetto.protos.InodeFileConfig.MountPointMappingEntry
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                MountPointMappingEntry.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.mountpoint != null && m.hasOwnProperty("mountpoint")) {
                        if (!$util.isString(m.mountpoint))
                            return "mountpoint: string expected";
                    }
                    if (m.scanRoots != null && m.hasOwnProperty("scanRoots")) {
                        if (!Array.isArray(m.scanRoots))
                            return "scanRoots: array expected";
                        for (var i = 0; i < m.scanRoots.length; ++i) {
                            if (!$util.isString(m.scanRoots[i]))
                                return "scanRoots: string[] expected";
                        }
                    }
                    return null;
                };

                /**
                 * Creates a MountPointMappingEntry message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.InodeFileConfig.MountPointMappingEntry
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.InodeFileConfig.MountPointMappingEntry} MountPointMappingEntry
                 */
                MountPointMappingEntry.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.InodeFileConfig.MountPointMappingEntry)
                        return d;
                    var m = new $root.perfetto.protos.InodeFileConfig.MountPointMappingEntry();
                    if (d.mountpoint != null) {
                        m.mountpoint = String(d.mountpoint);
                    }
                    if (d.scanRoots) {
                        if (!Array.isArray(d.scanRoots))
                            throw TypeError(".perfetto.protos.InodeFileConfig.MountPointMappingEntry.scanRoots: array expected");
                        m.scanRoots = [];
                        for (var i = 0; i < d.scanRoots.length; ++i) {
                            m.scanRoots[i] = String(d.scanRoots[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a MountPointMappingEntry message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.InodeFileConfig.MountPointMappingEntry
                 * @static
                 * @param {perfetto.protos.InodeFileConfig.MountPointMappingEntry} m MountPointMappingEntry
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                MountPointMappingEntry.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.scanRoots = [];
                    }
                    if (o.defaults) {
                        d.mountpoint = "";
                    }
                    if (m.mountpoint != null && m.hasOwnProperty("mountpoint")) {
                        d.mountpoint = m.mountpoint;
                    }
                    if (m.scanRoots && m.scanRoots.length) {
                        d.scanRoots = [];
                        for (var j = 0; j < m.scanRoots.length; ++j) {
                            d.scanRoots[j] = m.scanRoots[j];
                        }
                    }
                    return d;
                };

                /**
                 * Converts this MountPointMappingEntry to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.InodeFileConfig.MountPointMappingEntry
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                MountPointMappingEntry.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return MountPointMappingEntry;
            })();

            return InodeFileConfig;
        })();

        protos.ConsoleConfig = (function() {

            /**
             * Properties of a ConsoleConfig.
             * @memberof perfetto.protos
             * @interface IConsoleConfig
             * @property {perfetto.protos.ConsoleConfig.Output|null} [output] ConsoleConfig output
             * @property {boolean|null} [enableColors] ConsoleConfig enableColors
             */

            /**
             * Constructs a new ConsoleConfig.
             * @memberof perfetto.protos
             * @classdesc Represents a ConsoleConfig.
             * @implements IConsoleConfig
             * @constructor
             * @param {perfetto.protos.IConsoleConfig=} [p] Properties to set
             */
            function ConsoleConfig(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ConsoleConfig output.
             * @member {perfetto.protos.ConsoleConfig.Output} output
             * @memberof perfetto.protos.ConsoleConfig
             * @instance
             */
            ConsoleConfig.prototype.output = 0;

            /**
             * ConsoleConfig enableColors.
             * @member {boolean} enableColors
             * @memberof perfetto.protos.ConsoleConfig
             * @instance
             */
            ConsoleConfig.prototype.enableColors = false;

            /**
             * Creates a new ConsoleConfig instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ConsoleConfig
             * @static
             * @param {perfetto.protos.IConsoleConfig=} [properties] Properties to set
             * @returns {perfetto.protos.ConsoleConfig} ConsoleConfig instance
             */
            ConsoleConfig.create = function create(properties) {
                return new ConsoleConfig(properties);
            };

            /**
             * Encodes the specified ConsoleConfig message. Does not implicitly {@link perfetto.protos.ConsoleConfig.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ConsoleConfig
             * @static
             * @param {perfetto.protos.IConsoleConfig} m ConsoleConfig message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ConsoleConfig.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.output != null && Object.hasOwnProperty.call(m, "output"))
                    w.uint32(8).int32(m.output);
                if (m.enableColors != null && Object.hasOwnProperty.call(m, "enableColors"))
                    w.uint32(16).bool(m.enableColors);
                return w;
            };

            /**
             * Encodes the specified ConsoleConfig message, length delimited. Does not implicitly {@link perfetto.protos.ConsoleConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ConsoleConfig
             * @static
             * @param {perfetto.protos.IConsoleConfig} message ConsoleConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ConsoleConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ConsoleConfig message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ConsoleConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ConsoleConfig} ConsoleConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ConsoleConfig.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ConsoleConfig();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.output = r.int32();
                        break;
                    case 2:
                        m.enableColors = r.bool();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ConsoleConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ConsoleConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ConsoleConfig} ConsoleConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ConsoleConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ConsoleConfig message.
             * @function verify
             * @memberof perfetto.protos.ConsoleConfig
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ConsoleConfig.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.output != null && m.hasOwnProperty("output")) {
                    switch (m.output) {
                    default:
                        return "output: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                }
                if (m.enableColors != null && m.hasOwnProperty("enableColors")) {
                    if (typeof m.enableColors !== "boolean")
                        return "enableColors: boolean expected";
                }
                return null;
            };

            /**
             * Creates a ConsoleConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ConsoleConfig
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ConsoleConfig} ConsoleConfig
             */
            ConsoleConfig.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ConsoleConfig)
                    return d;
                var m = new $root.perfetto.protos.ConsoleConfig();
                switch (d.output) {
                case "OUTPUT_UNSPECIFIED":
                case 0:
                    m.output = 0;
                    break;
                case "OUTPUT_STDOUT":
                case 1:
                    m.output = 1;
                    break;
                case "OUTPUT_STDERR":
                case 2:
                    m.output = 2;
                    break;
                }
                if (d.enableColors != null) {
                    m.enableColors = Boolean(d.enableColors);
                }
                return m;
            };

            /**
             * Creates a plain object from a ConsoleConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ConsoleConfig
             * @static
             * @param {perfetto.protos.ConsoleConfig} m ConsoleConfig
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ConsoleConfig.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.output = o.enums === String ? "OUTPUT_UNSPECIFIED" : 0;
                    d.enableColors = false;
                }
                if (m.output != null && m.hasOwnProperty("output")) {
                    d.output = o.enums === String ? $root.perfetto.protos.ConsoleConfig.Output[m.output] : m.output;
                }
                if (m.enableColors != null && m.hasOwnProperty("enableColors")) {
                    d.enableColors = m.enableColors;
                }
                return d;
            };

            /**
             * Converts this ConsoleConfig to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ConsoleConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ConsoleConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * Output enum.
             * @name perfetto.protos.ConsoleConfig.Output
             * @enum {number}
             * @property {number} OUTPUT_UNSPECIFIED=0 OUTPUT_UNSPECIFIED value
             * @property {number} OUTPUT_STDOUT=1 OUTPUT_STDOUT value
             * @property {number} OUTPUT_STDERR=2 OUTPUT_STDERR value
             */
            ConsoleConfig.Output = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "OUTPUT_UNSPECIFIED"] = 0;
                values[valuesById[1] = "OUTPUT_STDOUT"] = 1;
                values[valuesById[2] = "OUTPUT_STDERR"] = 2;
                return values;
            })();

            return ConsoleConfig;
        })();

        protos.InterceptorConfig = (function() {

            /**
             * Properties of an InterceptorConfig.
             * @memberof perfetto.protos
             * @interface IInterceptorConfig
             * @property {string|null} [name] InterceptorConfig name
             * @property {perfetto.protos.IConsoleConfig|null} [consoleConfig] InterceptorConfig consoleConfig
             */

            /**
             * Constructs a new InterceptorConfig.
             * @memberof perfetto.protos
             * @classdesc Represents an InterceptorConfig.
             * @implements IInterceptorConfig
             * @constructor
             * @param {perfetto.protos.IInterceptorConfig=} [p] Properties to set
             */
            function InterceptorConfig(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * InterceptorConfig name.
             * @member {string} name
             * @memberof perfetto.protos.InterceptorConfig
             * @instance
             */
            InterceptorConfig.prototype.name = "";

            /**
             * InterceptorConfig consoleConfig.
             * @member {perfetto.protos.IConsoleConfig|null|undefined} consoleConfig
             * @memberof perfetto.protos.InterceptorConfig
             * @instance
             */
            InterceptorConfig.prototype.consoleConfig = null;

            /**
             * Creates a new InterceptorConfig instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.InterceptorConfig
             * @static
             * @param {perfetto.protos.IInterceptorConfig=} [properties] Properties to set
             * @returns {perfetto.protos.InterceptorConfig} InterceptorConfig instance
             */
            InterceptorConfig.create = function create(properties) {
                return new InterceptorConfig(properties);
            };

            /**
             * Encodes the specified InterceptorConfig message. Does not implicitly {@link perfetto.protos.InterceptorConfig.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.InterceptorConfig
             * @static
             * @param {perfetto.protos.IInterceptorConfig} m InterceptorConfig message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InterceptorConfig.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                if (m.consoleConfig != null && Object.hasOwnProperty.call(m, "consoleConfig"))
                    $root.perfetto.protos.ConsoleConfig.encode(m.consoleConfig, w.uint32(802).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified InterceptorConfig message, length delimited. Does not implicitly {@link perfetto.protos.InterceptorConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.InterceptorConfig
             * @static
             * @param {perfetto.protos.IInterceptorConfig} message InterceptorConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InterceptorConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an InterceptorConfig message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.InterceptorConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.InterceptorConfig} InterceptorConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InterceptorConfig.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.InterceptorConfig();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    case 100:
                        m.consoleConfig = $root.perfetto.protos.ConsoleConfig.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an InterceptorConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.InterceptorConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.InterceptorConfig} InterceptorConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InterceptorConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an InterceptorConfig message.
             * @function verify
             * @memberof perfetto.protos.InterceptorConfig
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            InterceptorConfig.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.consoleConfig != null && m.hasOwnProperty("consoleConfig")) {
                    {
                        var e = $root.perfetto.protos.ConsoleConfig.verify(m.consoleConfig);
                        if (e)
                            return "consoleConfig." + e;
                    }
                }
                return null;
            };

            /**
             * Creates an InterceptorConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.InterceptorConfig
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.InterceptorConfig} InterceptorConfig
             */
            InterceptorConfig.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.InterceptorConfig)
                    return d;
                var m = new $root.perfetto.protos.InterceptorConfig();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.consoleConfig != null) {
                    if (typeof d.consoleConfig !== "object")
                        throw TypeError(".perfetto.protos.InterceptorConfig.consoleConfig: object expected");
                    m.consoleConfig = $root.perfetto.protos.ConsoleConfig.fromObject(d.consoleConfig);
                }
                return m;
            };

            /**
             * Creates a plain object from an InterceptorConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.InterceptorConfig
             * @static
             * @param {perfetto.protos.InterceptorConfig} m InterceptorConfig
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            InterceptorConfig.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                    d.consoleConfig = null;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.consoleConfig != null && m.hasOwnProperty("consoleConfig")) {
                    d.consoleConfig = $root.perfetto.protos.ConsoleConfig.toObject(m.consoleConfig, o);
                }
                return d;
            };

            /**
             * Converts this InterceptorConfig to JSON.
             * @function toJSON
             * @memberof perfetto.protos.InterceptorConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            InterceptorConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return InterceptorConfig;
        })();

        protos.AndroidPowerConfig = (function() {

            /**
             * Properties of an AndroidPowerConfig.
             * @memberof perfetto.protos
             * @interface IAndroidPowerConfig
             * @property {number|null} [batteryPollMs] AndroidPowerConfig batteryPollMs
             * @property {Array.<perfetto.protos.AndroidPowerConfig.BatteryCounters>|null} [batteryCounters] AndroidPowerConfig batteryCounters
             * @property {boolean|null} [collectPowerRails] AndroidPowerConfig collectPowerRails
             * @property {boolean|null} [collectEnergyEstimationBreakdown] AndroidPowerConfig collectEnergyEstimationBreakdown
             */

            /**
             * Constructs a new AndroidPowerConfig.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidPowerConfig.
             * @implements IAndroidPowerConfig
             * @constructor
             * @param {perfetto.protos.IAndroidPowerConfig=} [p] Properties to set
             */
            function AndroidPowerConfig(p) {
                this.batteryCounters = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidPowerConfig batteryPollMs.
             * @member {number} batteryPollMs
             * @memberof perfetto.protos.AndroidPowerConfig
             * @instance
             */
            AndroidPowerConfig.prototype.batteryPollMs = 0;

            /**
             * AndroidPowerConfig batteryCounters.
             * @member {Array.<perfetto.protos.AndroidPowerConfig.BatteryCounters>} batteryCounters
             * @memberof perfetto.protos.AndroidPowerConfig
             * @instance
             */
            AndroidPowerConfig.prototype.batteryCounters = $util.emptyArray;

            /**
             * AndroidPowerConfig collectPowerRails.
             * @member {boolean} collectPowerRails
             * @memberof perfetto.protos.AndroidPowerConfig
             * @instance
             */
            AndroidPowerConfig.prototype.collectPowerRails = false;

            /**
             * AndroidPowerConfig collectEnergyEstimationBreakdown.
             * @member {boolean} collectEnergyEstimationBreakdown
             * @memberof perfetto.protos.AndroidPowerConfig
             * @instance
             */
            AndroidPowerConfig.prototype.collectEnergyEstimationBreakdown = false;

            /**
             * Creates a new AndroidPowerConfig instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidPowerConfig
             * @static
             * @param {perfetto.protos.IAndroidPowerConfig=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidPowerConfig} AndroidPowerConfig instance
             */
            AndroidPowerConfig.create = function create(properties) {
                return new AndroidPowerConfig(properties);
            };

            /**
             * Encodes the specified AndroidPowerConfig message. Does not implicitly {@link perfetto.protos.AndroidPowerConfig.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidPowerConfig
             * @static
             * @param {perfetto.protos.IAndroidPowerConfig} m AndroidPowerConfig message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidPowerConfig.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.batteryPollMs != null && Object.hasOwnProperty.call(m, "batteryPollMs"))
                    w.uint32(8).uint32(m.batteryPollMs);
                if (m.batteryCounters != null && m.batteryCounters.length) {
                    for (var i = 0; i < m.batteryCounters.length; ++i)
                        w.uint32(16).int32(m.batteryCounters[i]);
                }
                if (m.collectPowerRails != null && Object.hasOwnProperty.call(m, "collectPowerRails"))
                    w.uint32(24).bool(m.collectPowerRails);
                if (m.collectEnergyEstimationBreakdown != null && Object.hasOwnProperty.call(m, "collectEnergyEstimationBreakdown"))
                    w.uint32(32).bool(m.collectEnergyEstimationBreakdown);
                return w;
            };

            /**
             * Encodes the specified AndroidPowerConfig message, length delimited. Does not implicitly {@link perfetto.protos.AndroidPowerConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidPowerConfig
             * @static
             * @param {perfetto.protos.IAndroidPowerConfig} message AndroidPowerConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidPowerConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidPowerConfig message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidPowerConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidPowerConfig} AndroidPowerConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidPowerConfig.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidPowerConfig();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.batteryPollMs = r.uint32();
                        break;
                    case 2:
                        if (!(m.batteryCounters && m.batteryCounters.length))
                            m.batteryCounters = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.batteryCounters.push(r.int32());
                        } else
                            m.batteryCounters.push(r.int32());
                        break;
                    case 3:
                        m.collectPowerRails = r.bool();
                        break;
                    case 4:
                        m.collectEnergyEstimationBreakdown = r.bool();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidPowerConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidPowerConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidPowerConfig} AndroidPowerConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidPowerConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidPowerConfig message.
             * @function verify
             * @memberof perfetto.protos.AndroidPowerConfig
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidPowerConfig.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.batteryPollMs != null && m.hasOwnProperty("batteryPollMs")) {
                    if (!$util.isInteger(m.batteryPollMs))
                        return "batteryPollMs: integer expected";
                }
                if (m.batteryCounters != null && m.hasOwnProperty("batteryCounters")) {
                    if (!Array.isArray(m.batteryCounters))
                        return "batteryCounters: array expected";
                    for (var i = 0; i < m.batteryCounters.length; ++i) {
                        switch (m.batteryCounters[i]) {
                        default:
                            return "batteryCounters: enum value[] expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                            break;
                        }
                    }
                }
                if (m.collectPowerRails != null && m.hasOwnProperty("collectPowerRails")) {
                    if (typeof m.collectPowerRails !== "boolean")
                        return "collectPowerRails: boolean expected";
                }
                if (m.collectEnergyEstimationBreakdown != null && m.hasOwnProperty("collectEnergyEstimationBreakdown")) {
                    if (typeof m.collectEnergyEstimationBreakdown !== "boolean")
                        return "collectEnergyEstimationBreakdown: boolean expected";
                }
                return null;
            };

            /**
             * Creates an AndroidPowerConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidPowerConfig
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidPowerConfig} AndroidPowerConfig
             */
            AndroidPowerConfig.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidPowerConfig)
                    return d;
                var m = new $root.perfetto.protos.AndroidPowerConfig();
                if (d.batteryPollMs != null) {
                    m.batteryPollMs = d.batteryPollMs >>> 0;
                }
                if (d.batteryCounters) {
                    if (!Array.isArray(d.batteryCounters))
                        throw TypeError(".perfetto.protos.AndroidPowerConfig.batteryCounters: array expected");
                    m.batteryCounters = [];
                    for (var i = 0; i < d.batteryCounters.length; ++i) {
                        switch (d.batteryCounters[i]) {
                        default:
                        case "BATTERY_COUNTER_UNSPECIFIED":
                        case 0:
                            m.batteryCounters[i] = 0;
                            break;
                        case "BATTERY_COUNTER_CHARGE":
                        case 1:
                            m.batteryCounters[i] = 1;
                            break;
                        case "BATTERY_COUNTER_CAPACITY_PERCENT":
                        case 2:
                            m.batteryCounters[i] = 2;
                            break;
                        case "BATTERY_COUNTER_CURRENT":
                        case 3:
                            m.batteryCounters[i] = 3;
                            break;
                        case "BATTERY_COUNTER_CURRENT_AVG":
                        case 4:
                            m.batteryCounters[i] = 4;
                            break;
                        }
                    }
                }
                if (d.collectPowerRails != null) {
                    m.collectPowerRails = Boolean(d.collectPowerRails);
                }
                if (d.collectEnergyEstimationBreakdown != null) {
                    m.collectEnergyEstimationBreakdown = Boolean(d.collectEnergyEstimationBreakdown);
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidPowerConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidPowerConfig
             * @static
             * @param {perfetto.protos.AndroidPowerConfig} m AndroidPowerConfig
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidPowerConfig.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.batteryCounters = [];
                }
                if (o.defaults) {
                    d.batteryPollMs = 0;
                    d.collectPowerRails = false;
                    d.collectEnergyEstimationBreakdown = false;
                }
                if (m.batteryPollMs != null && m.hasOwnProperty("batteryPollMs")) {
                    d.batteryPollMs = m.batteryPollMs;
                }
                if (m.batteryCounters && m.batteryCounters.length) {
                    d.batteryCounters = [];
                    for (var j = 0; j < m.batteryCounters.length; ++j) {
                        d.batteryCounters[j] = o.enums === String ? $root.perfetto.protos.AndroidPowerConfig.BatteryCounters[m.batteryCounters[j]] : m.batteryCounters[j];
                    }
                }
                if (m.collectPowerRails != null && m.hasOwnProperty("collectPowerRails")) {
                    d.collectPowerRails = m.collectPowerRails;
                }
                if (m.collectEnergyEstimationBreakdown != null && m.hasOwnProperty("collectEnergyEstimationBreakdown")) {
                    d.collectEnergyEstimationBreakdown = m.collectEnergyEstimationBreakdown;
                }
                return d;
            };

            /**
             * Converts this AndroidPowerConfig to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidPowerConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidPowerConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * BatteryCounters enum.
             * @name perfetto.protos.AndroidPowerConfig.BatteryCounters
             * @enum {number}
             * @property {number} BATTERY_COUNTER_UNSPECIFIED=0 BATTERY_COUNTER_UNSPECIFIED value
             * @property {number} BATTERY_COUNTER_CHARGE=1 BATTERY_COUNTER_CHARGE value
             * @property {number} BATTERY_COUNTER_CAPACITY_PERCENT=2 BATTERY_COUNTER_CAPACITY_PERCENT value
             * @property {number} BATTERY_COUNTER_CURRENT=3 BATTERY_COUNTER_CURRENT value
             * @property {number} BATTERY_COUNTER_CURRENT_AVG=4 BATTERY_COUNTER_CURRENT_AVG value
             */
            AndroidPowerConfig.BatteryCounters = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "BATTERY_COUNTER_UNSPECIFIED"] = 0;
                values[valuesById[1] = "BATTERY_COUNTER_CHARGE"] = 1;
                values[valuesById[2] = "BATTERY_COUNTER_CAPACITY_PERCENT"] = 2;
                values[valuesById[3] = "BATTERY_COUNTER_CURRENT"] = 3;
                values[valuesById[4] = "BATTERY_COUNTER_CURRENT_AVG"] = 4;
                return values;
            })();

            return AndroidPowerConfig;
        })();

        protos.ProcessStatsConfig = (function() {

            /**
             * Properties of a ProcessStatsConfig.
             * @memberof perfetto.protos
             * @interface IProcessStatsConfig
             * @property {Array.<perfetto.protos.ProcessStatsConfig.Quirks>|null} [quirks] ProcessStatsConfig quirks
             * @property {boolean|null} [scanAllProcessesOnStart] ProcessStatsConfig scanAllProcessesOnStart
             * @property {boolean|null} [recordThreadNames] ProcessStatsConfig recordThreadNames
             * @property {number|null} [procStatsPollMs] ProcessStatsConfig procStatsPollMs
             * @property {number|null} [procStatsCacheTtlMs] ProcessStatsConfig procStatsCacheTtlMs
             */

            /**
             * Constructs a new ProcessStatsConfig.
             * @memberof perfetto.protos
             * @classdesc Represents a ProcessStatsConfig.
             * @implements IProcessStatsConfig
             * @constructor
             * @param {perfetto.protos.IProcessStatsConfig=} [p] Properties to set
             */
            function ProcessStatsConfig(p) {
                this.quirks = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ProcessStatsConfig quirks.
             * @member {Array.<perfetto.protos.ProcessStatsConfig.Quirks>} quirks
             * @memberof perfetto.protos.ProcessStatsConfig
             * @instance
             */
            ProcessStatsConfig.prototype.quirks = $util.emptyArray;

            /**
             * ProcessStatsConfig scanAllProcessesOnStart.
             * @member {boolean} scanAllProcessesOnStart
             * @memberof perfetto.protos.ProcessStatsConfig
             * @instance
             */
            ProcessStatsConfig.prototype.scanAllProcessesOnStart = false;

            /**
             * ProcessStatsConfig recordThreadNames.
             * @member {boolean} recordThreadNames
             * @memberof perfetto.protos.ProcessStatsConfig
             * @instance
             */
            ProcessStatsConfig.prototype.recordThreadNames = false;

            /**
             * ProcessStatsConfig procStatsPollMs.
             * @member {number} procStatsPollMs
             * @memberof perfetto.protos.ProcessStatsConfig
             * @instance
             */
            ProcessStatsConfig.prototype.procStatsPollMs = 0;

            /**
             * ProcessStatsConfig procStatsCacheTtlMs.
             * @member {number} procStatsCacheTtlMs
             * @memberof perfetto.protos.ProcessStatsConfig
             * @instance
             */
            ProcessStatsConfig.prototype.procStatsCacheTtlMs = 0;

            /**
             * Creates a new ProcessStatsConfig instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ProcessStatsConfig
             * @static
             * @param {perfetto.protos.IProcessStatsConfig=} [properties] Properties to set
             * @returns {perfetto.protos.ProcessStatsConfig} ProcessStatsConfig instance
             */
            ProcessStatsConfig.create = function create(properties) {
                return new ProcessStatsConfig(properties);
            };

            /**
             * Encodes the specified ProcessStatsConfig message. Does not implicitly {@link perfetto.protos.ProcessStatsConfig.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ProcessStatsConfig
             * @static
             * @param {perfetto.protos.IProcessStatsConfig} m ProcessStatsConfig message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ProcessStatsConfig.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.quirks != null && m.quirks.length) {
                    for (var i = 0; i < m.quirks.length; ++i)
                        w.uint32(8).int32(m.quirks[i]);
                }
                if (m.scanAllProcessesOnStart != null && Object.hasOwnProperty.call(m, "scanAllProcessesOnStart"))
                    w.uint32(16).bool(m.scanAllProcessesOnStart);
                if (m.recordThreadNames != null && Object.hasOwnProperty.call(m, "recordThreadNames"))
                    w.uint32(24).bool(m.recordThreadNames);
                if (m.procStatsPollMs != null && Object.hasOwnProperty.call(m, "procStatsPollMs"))
                    w.uint32(32).uint32(m.procStatsPollMs);
                if (m.procStatsCacheTtlMs != null && Object.hasOwnProperty.call(m, "procStatsCacheTtlMs"))
                    w.uint32(48).uint32(m.procStatsCacheTtlMs);
                return w;
            };

            /**
             * Encodes the specified ProcessStatsConfig message, length delimited. Does not implicitly {@link perfetto.protos.ProcessStatsConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ProcessStatsConfig
             * @static
             * @param {perfetto.protos.IProcessStatsConfig} message ProcessStatsConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ProcessStatsConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ProcessStatsConfig message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ProcessStatsConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ProcessStatsConfig} ProcessStatsConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ProcessStatsConfig.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ProcessStatsConfig();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.quirks && m.quirks.length))
                            m.quirks = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.quirks.push(r.int32());
                        } else
                            m.quirks.push(r.int32());
                        break;
                    case 2:
                        m.scanAllProcessesOnStart = r.bool();
                        break;
                    case 3:
                        m.recordThreadNames = r.bool();
                        break;
                    case 4:
                        m.procStatsPollMs = r.uint32();
                        break;
                    case 6:
                        m.procStatsCacheTtlMs = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ProcessStatsConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ProcessStatsConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ProcessStatsConfig} ProcessStatsConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ProcessStatsConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ProcessStatsConfig message.
             * @function verify
             * @memberof perfetto.protos.ProcessStatsConfig
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ProcessStatsConfig.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.quirks != null && m.hasOwnProperty("quirks")) {
                    if (!Array.isArray(m.quirks))
                        return "quirks: array expected";
                    for (var i = 0; i < m.quirks.length; ++i) {
                        switch (m.quirks[i]) {
                        default:
                            return "quirks: enum value[] expected";
                        case 0:
                        case 1:
                        case 2:
                            break;
                        }
                    }
                }
                if (m.scanAllProcessesOnStart != null && m.hasOwnProperty("scanAllProcessesOnStart")) {
                    if (typeof m.scanAllProcessesOnStart !== "boolean")
                        return "scanAllProcessesOnStart: boolean expected";
                }
                if (m.recordThreadNames != null && m.hasOwnProperty("recordThreadNames")) {
                    if (typeof m.recordThreadNames !== "boolean")
                        return "recordThreadNames: boolean expected";
                }
                if (m.procStatsPollMs != null && m.hasOwnProperty("procStatsPollMs")) {
                    if (!$util.isInteger(m.procStatsPollMs))
                        return "procStatsPollMs: integer expected";
                }
                if (m.procStatsCacheTtlMs != null && m.hasOwnProperty("procStatsCacheTtlMs")) {
                    if (!$util.isInteger(m.procStatsCacheTtlMs))
                        return "procStatsCacheTtlMs: integer expected";
                }
                return null;
            };

            /**
             * Creates a ProcessStatsConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ProcessStatsConfig
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ProcessStatsConfig} ProcessStatsConfig
             */
            ProcessStatsConfig.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ProcessStatsConfig)
                    return d;
                var m = new $root.perfetto.protos.ProcessStatsConfig();
                if (d.quirks) {
                    if (!Array.isArray(d.quirks))
                        throw TypeError(".perfetto.protos.ProcessStatsConfig.quirks: array expected");
                    m.quirks = [];
                    for (var i = 0; i < d.quirks.length; ++i) {
                        switch (d.quirks[i]) {
                        default:
                        case "QUIRKS_UNSPECIFIED":
                        case 0:
                            m.quirks[i] = 0;
                            break;
                        case "DISABLE_INITIAL_DUMP":
                        case 1:
                            m.quirks[i] = 1;
                            break;
                        case "DISABLE_ON_DEMAND":
                        case 2:
                            m.quirks[i] = 2;
                            break;
                        }
                    }
                }
                if (d.scanAllProcessesOnStart != null) {
                    m.scanAllProcessesOnStart = Boolean(d.scanAllProcessesOnStart);
                }
                if (d.recordThreadNames != null) {
                    m.recordThreadNames = Boolean(d.recordThreadNames);
                }
                if (d.procStatsPollMs != null) {
                    m.procStatsPollMs = d.procStatsPollMs >>> 0;
                }
                if (d.procStatsCacheTtlMs != null) {
                    m.procStatsCacheTtlMs = d.procStatsCacheTtlMs >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a ProcessStatsConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ProcessStatsConfig
             * @static
             * @param {perfetto.protos.ProcessStatsConfig} m ProcessStatsConfig
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ProcessStatsConfig.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.quirks = [];
                }
                if (o.defaults) {
                    d.scanAllProcessesOnStart = false;
                    d.recordThreadNames = false;
                    d.procStatsPollMs = 0;
                    d.procStatsCacheTtlMs = 0;
                }
                if (m.quirks && m.quirks.length) {
                    d.quirks = [];
                    for (var j = 0; j < m.quirks.length; ++j) {
                        d.quirks[j] = o.enums === String ? $root.perfetto.protos.ProcessStatsConfig.Quirks[m.quirks[j]] : m.quirks[j];
                    }
                }
                if (m.scanAllProcessesOnStart != null && m.hasOwnProperty("scanAllProcessesOnStart")) {
                    d.scanAllProcessesOnStart = m.scanAllProcessesOnStart;
                }
                if (m.recordThreadNames != null && m.hasOwnProperty("recordThreadNames")) {
                    d.recordThreadNames = m.recordThreadNames;
                }
                if (m.procStatsPollMs != null && m.hasOwnProperty("procStatsPollMs")) {
                    d.procStatsPollMs = m.procStatsPollMs;
                }
                if (m.procStatsCacheTtlMs != null && m.hasOwnProperty("procStatsCacheTtlMs")) {
                    d.procStatsCacheTtlMs = m.procStatsCacheTtlMs;
                }
                return d;
            };

            /**
             * Converts this ProcessStatsConfig to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ProcessStatsConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ProcessStatsConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * Quirks enum.
             * @name perfetto.protos.ProcessStatsConfig.Quirks
             * @enum {number}
             * @property {number} QUIRKS_UNSPECIFIED=0 QUIRKS_UNSPECIFIED value
             * @property {number} DISABLE_INITIAL_DUMP=1 DISABLE_INITIAL_DUMP value
             * @property {number} DISABLE_ON_DEMAND=2 DISABLE_ON_DEMAND value
             */
            ProcessStatsConfig.Quirks = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "QUIRKS_UNSPECIFIED"] = 0;
                values[valuesById[1] = "DISABLE_INITIAL_DUMP"] = 1;
                values[valuesById[2] = "DISABLE_ON_DEMAND"] = 2;
                return values;
            })();

            return ProcessStatsConfig;
        })();

        protos.HeapprofdConfig = (function() {

            /**
             * Properties of a HeapprofdConfig.
             * @memberof perfetto.protos
             * @interface IHeapprofdConfig
             * @property {number|null} [samplingIntervalBytes] HeapprofdConfig samplingIntervalBytes
             * @property {number|null} [adaptiveSamplingShmemThreshold] HeapprofdConfig adaptiveSamplingShmemThreshold
             * @property {number|null} [adaptiveSamplingMaxSamplingIntervalBytes] HeapprofdConfig adaptiveSamplingMaxSamplingIntervalBytes
             * @property {Array.<string>|null} [processCmdline] HeapprofdConfig processCmdline
             * @property {Array.<number>|null} [pid] HeapprofdConfig pid
             * @property {Array.<string>|null} [targetInstalledBy] HeapprofdConfig targetInstalledBy
             * @property {Array.<string>|null} [heaps] HeapprofdConfig heaps
             * @property {Array.<string>|null} [excludeHeaps] HeapprofdConfig excludeHeaps
             * @property {boolean|null} [streamAllocations] HeapprofdConfig streamAllocations
             * @property {Array.<number>|null} [heapSamplingIntervals] HeapprofdConfig heapSamplingIntervals
             * @property {boolean|null} [allHeaps] HeapprofdConfig allHeaps
             * @property {boolean|null} [all] HeapprofdConfig all
             * @property {number|null} [minAnonymousMemoryKb] HeapprofdConfig minAnonymousMemoryKb
             * @property {number|null} [maxHeapprofdMemoryKb] HeapprofdConfig maxHeapprofdMemoryKb
             * @property {number|null} [maxHeapprofdCpuSecs] HeapprofdConfig maxHeapprofdCpuSecs
             * @property {Array.<string>|null} [skipSymbolPrefix] HeapprofdConfig skipSymbolPrefix
             * @property {perfetto.protos.HeapprofdConfig.IContinuousDumpConfig|null} [continuousDumpConfig] HeapprofdConfig continuousDumpConfig
             * @property {number|null} [shmemSizeBytes] HeapprofdConfig shmemSizeBytes
             * @property {boolean|null} [blockClient] HeapprofdConfig blockClient
             * @property {number|null} [blockClientTimeoutUs] HeapprofdConfig blockClientTimeoutUs
             * @property {boolean|null} [noStartup] HeapprofdConfig noStartup
             * @property {boolean|null} [noRunning] HeapprofdConfig noRunning
             * @property {boolean|null} [dumpAtMax] HeapprofdConfig dumpAtMax
             * @property {boolean|null} [disableForkTeardown] HeapprofdConfig disableForkTeardown
             * @property {boolean|null} [disableVforkDetection] HeapprofdConfig disableVforkDetection
             */

            /**
             * Constructs a new HeapprofdConfig.
             * @memberof perfetto.protos
             * @classdesc Represents a HeapprofdConfig.
             * @implements IHeapprofdConfig
             * @constructor
             * @param {perfetto.protos.IHeapprofdConfig=} [p] Properties to set
             */
            function HeapprofdConfig(p) {
                this.processCmdline = [];
                this.pid = [];
                this.targetInstalledBy = [];
                this.heaps = [];
                this.excludeHeaps = [];
                this.heapSamplingIntervals = [];
                this.skipSymbolPrefix = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * HeapprofdConfig samplingIntervalBytes.
             * @member {number} samplingIntervalBytes
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             */
            HeapprofdConfig.prototype.samplingIntervalBytes = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * HeapprofdConfig adaptiveSamplingShmemThreshold.
             * @member {number} adaptiveSamplingShmemThreshold
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             */
            HeapprofdConfig.prototype.adaptiveSamplingShmemThreshold = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * HeapprofdConfig adaptiveSamplingMaxSamplingIntervalBytes.
             * @member {number} adaptiveSamplingMaxSamplingIntervalBytes
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             */
            HeapprofdConfig.prototype.adaptiveSamplingMaxSamplingIntervalBytes = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * HeapprofdConfig processCmdline.
             * @member {Array.<string>} processCmdline
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             */
            HeapprofdConfig.prototype.processCmdline = $util.emptyArray;

            /**
             * HeapprofdConfig pid.
             * @member {Array.<number>} pid
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             */
            HeapprofdConfig.prototype.pid = $util.emptyArray;

            /**
             * HeapprofdConfig targetInstalledBy.
             * @member {Array.<string>} targetInstalledBy
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             */
            HeapprofdConfig.prototype.targetInstalledBy = $util.emptyArray;

            /**
             * HeapprofdConfig heaps.
             * @member {Array.<string>} heaps
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             */
            HeapprofdConfig.prototype.heaps = $util.emptyArray;

            /**
             * HeapprofdConfig excludeHeaps.
             * @member {Array.<string>} excludeHeaps
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             */
            HeapprofdConfig.prototype.excludeHeaps = $util.emptyArray;

            /**
             * HeapprofdConfig streamAllocations.
             * @member {boolean} streamAllocations
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             */
            HeapprofdConfig.prototype.streamAllocations = false;

            /**
             * HeapprofdConfig heapSamplingIntervals.
             * @member {Array.<number>} heapSamplingIntervals
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             */
            HeapprofdConfig.prototype.heapSamplingIntervals = $util.emptyArray;

            /**
             * HeapprofdConfig allHeaps.
             * @member {boolean} allHeaps
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             */
            HeapprofdConfig.prototype.allHeaps = false;

            /**
             * HeapprofdConfig all.
             * @member {boolean} all
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             */
            HeapprofdConfig.prototype.all = false;

            /**
             * HeapprofdConfig minAnonymousMemoryKb.
             * @member {number} minAnonymousMemoryKb
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             */
            HeapprofdConfig.prototype.minAnonymousMemoryKb = 0;

            /**
             * HeapprofdConfig maxHeapprofdMemoryKb.
             * @member {number} maxHeapprofdMemoryKb
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             */
            HeapprofdConfig.prototype.maxHeapprofdMemoryKb = 0;

            /**
             * HeapprofdConfig maxHeapprofdCpuSecs.
             * @member {number} maxHeapprofdCpuSecs
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             */
            HeapprofdConfig.prototype.maxHeapprofdCpuSecs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * HeapprofdConfig skipSymbolPrefix.
             * @member {Array.<string>} skipSymbolPrefix
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             */
            HeapprofdConfig.prototype.skipSymbolPrefix = $util.emptyArray;

            /**
             * HeapprofdConfig continuousDumpConfig.
             * @member {perfetto.protos.HeapprofdConfig.IContinuousDumpConfig|null|undefined} continuousDumpConfig
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             */
            HeapprofdConfig.prototype.continuousDumpConfig = null;

            /**
             * HeapprofdConfig shmemSizeBytes.
             * @member {number} shmemSizeBytes
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             */
            HeapprofdConfig.prototype.shmemSizeBytes = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * HeapprofdConfig blockClient.
             * @member {boolean} blockClient
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             */
            HeapprofdConfig.prototype.blockClient = false;

            /**
             * HeapprofdConfig blockClientTimeoutUs.
             * @member {number} blockClientTimeoutUs
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             */
            HeapprofdConfig.prototype.blockClientTimeoutUs = 0;

            /**
             * HeapprofdConfig noStartup.
             * @member {boolean} noStartup
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             */
            HeapprofdConfig.prototype.noStartup = false;

            /**
             * HeapprofdConfig noRunning.
             * @member {boolean} noRunning
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             */
            HeapprofdConfig.prototype.noRunning = false;

            /**
             * HeapprofdConfig dumpAtMax.
             * @member {boolean} dumpAtMax
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             */
            HeapprofdConfig.prototype.dumpAtMax = false;

            /**
             * HeapprofdConfig disableForkTeardown.
             * @member {boolean} disableForkTeardown
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             */
            HeapprofdConfig.prototype.disableForkTeardown = false;

            /**
             * HeapprofdConfig disableVforkDetection.
             * @member {boolean} disableVforkDetection
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             */
            HeapprofdConfig.prototype.disableVforkDetection = false;

            /**
             * Creates a new HeapprofdConfig instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.HeapprofdConfig
             * @static
             * @param {perfetto.protos.IHeapprofdConfig=} [properties] Properties to set
             * @returns {perfetto.protos.HeapprofdConfig} HeapprofdConfig instance
             */
            HeapprofdConfig.create = function create(properties) {
                return new HeapprofdConfig(properties);
            };

            /**
             * Encodes the specified HeapprofdConfig message. Does not implicitly {@link perfetto.protos.HeapprofdConfig.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.HeapprofdConfig
             * @static
             * @param {perfetto.protos.IHeapprofdConfig} m HeapprofdConfig message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HeapprofdConfig.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.samplingIntervalBytes != null && Object.hasOwnProperty.call(m, "samplingIntervalBytes"))
                    w.uint32(8).uint64(m.samplingIntervalBytes);
                if (m.processCmdline != null && m.processCmdline.length) {
                    for (var i = 0; i < m.processCmdline.length; ++i)
                        w.uint32(18).string(m.processCmdline[i]);
                }
                if (m.pid != null && m.pid.length) {
                    for (var i = 0; i < m.pid.length; ++i)
                        w.uint32(32).uint64(m.pid[i]);
                }
                if (m.all != null && Object.hasOwnProperty.call(m, "all"))
                    w.uint32(40).bool(m.all);
                if (m.continuousDumpConfig != null && Object.hasOwnProperty.call(m, "continuousDumpConfig"))
                    $root.perfetto.protos.HeapprofdConfig.ContinuousDumpConfig.encode(m.continuousDumpConfig, w.uint32(50).fork()).ldelim();
                if (m.skipSymbolPrefix != null && m.skipSymbolPrefix.length) {
                    for (var i = 0; i < m.skipSymbolPrefix.length; ++i)
                        w.uint32(58).string(m.skipSymbolPrefix[i]);
                }
                if (m.shmemSizeBytes != null && Object.hasOwnProperty.call(m, "shmemSizeBytes"))
                    w.uint32(64).uint64(m.shmemSizeBytes);
                if (m.blockClient != null && Object.hasOwnProperty.call(m, "blockClient"))
                    w.uint32(72).bool(m.blockClient);
                if (m.noStartup != null && Object.hasOwnProperty.call(m, "noStartup"))
                    w.uint32(80).bool(m.noStartup);
                if (m.noRunning != null && Object.hasOwnProperty.call(m, "noRunning"))
                    w.uint32(88).bool(m.noRunning);
                if (m.dumpAtMax != null && Object.hasOwnProperty.call(m, "dumpAtMax"))
                    w.uint32(104).bool(m.dumpAtMax);
                if (m.blockClientTimeoutUs != null && Object.hasOwnProperty.call(m, "blockClientTimeoutUs"))
                    w.uint32(112).uint32(m.blockClientTimeoutUs);
                if (m.minAnonymousMemoryKb != null && Object.hasOwnProperty.call(m, "minAnonymousMemoryKb"))
                    w.uint32(120).uint32(m.minAnonymousMemoryKb);
                if (m.maxHeapprofdMemoryKb != null && Object.hasOwnProperty.call(m, "maxHeapprofdMemoryKb"))
                    w.uint32(128).uint32(m.maxHeapprofdMemoryKb);
                if (m.maxHeapprofdCpuSecs != null && Object.hasOwnProperty.call(m, "maxHeapprofdCpuSecs"))
                    w.uint32(136).uint64(m.maxHeapprofdCpuSecs);
                if (m.disableForkTeardown != null && Object.hasOwnProperty.call(m, "disableForkTeardown"))
                    w.uint32(144).bool(m.disableForkTeardown);
                if (m.disableVforkDetection != null && Object.hasOwnProperty.call(m, "disableVforkDetection"))
                    w.uint32(152).bool(m.disableVforkDetection);
                if (m.heaps != null && m.heaps.length) {
                    for (var i = 0; i < m.heaps.length; ++i)
                        w.uint32(162).string(m.heaps[i]);
                }
                if (m.allHeaps != null && Object.hasOwnProperty.call(m, "allHeaps"))
                    w.uint32(168).bool(m.allHeaps);
                if (m.heapSamplingIntervals != null && m.heapSamplingIntervals.length) {
                    for (var i = 0; i < m.heapSamplingIntervals.length; ++i)
                        w.uint32(176).uint64(m.heapSamplingIntervals[i]);
                }
                if (m.streamAllocations != null && Object.hasOwnProperty.call(m, "streamAllocations"))
                    w.uint32(184).bool(m.streamAllocations);
                if (m.adaptiveSamplingShmemThreshold != null && Object.hasOwnProperty.call(m, "adaptiveSamplingShmemThreshold"))
                    w.uint32(192).uint64(m.adaptiveSamplingShmemThreshold);
                if (m.adaptiveSamplingMaxSamplingIntervalBytes != null && Object.hasOwnProperty.call(m, "adaptiveSamplingMaxSamplingIntervalBytes"))
                    w.uint32(200).uint64(m.adaptiveSamplingMaxSamplingIntervalBytes);
                if (m.targetInstalledBy != null && m.targetInstalledBy.length) {
                    for (var i = 0; i < m.targetInstalledBy.length; ++i)
                        w.uint32(210).string(m.targetInstalledBy[i]);
                }
                if (m.excludeHeaps != null && m.excludeHeaps.length) {
                    for (var i = 0; i < m.excludeHeaps.length; ++i)
                        w.uint32(218).string(m.excludeHeaps[i]);
                }
                return w;
            };

            /**
             * Encodes the specified HeapprofdConfig message, length delimited. Does not implicitly {@link perfetto.protos.HeapprofdConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.HeapprofdConfig
             * @static
             * @param {perfetto.protos.IHeapprofdConfig} message HeapprofdConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HeapprofdConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a HeapprofdConfig message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.HeapprofdConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.HeapprofdConfig} HeapprofdConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HeapprofdConfig.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.HeapprofdConfig();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.samplingIntervalBytes = r.uint64();
                        break;
                    case 24:
                        m.adaptiveSamplingShmemThreshold = r.uint64();
                        break;
                    case 25:
                        m.adaptiveSamplingMaxSamplingIntervalBytes = r.uint64();
                        break;
                    case 2:
                        if (!(m.processCmdline && m.processCmdline.length))
                            m.processCmdline = [];
                        m.processCmdline.push(r.string());
                        break;
                    case 4:
                        if (!(m.pid && m.pid.length))
                            m.pid = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.pid.push(r.uint64());
                        } else
                            m.pid.push(r.uint64());
                        break;
                    case 26:
                        if (!(m.targetInstalledBy && m.targetInstalledBy.length))
                            m.targetInstalledBy = [];
                        m.targetInstalledBy.push(r.string());
                        break;
                    case 20:
                        if (!(m.heaps && m.heaps.length))
                            m.heaps = [];
                        m.heaps.push(r.string());
                        break;
                    case 27:
                        if (!(m.excludeHeaps && m.excludeHeaps.length))
                            m.excludeHeaps = [];
                        m.excludeHeaps.push(r.string());
                        break;
                    case 23:
                        m.streamAllocations = r.bool();
                        break;
                    case 22:
                        if (!(m.heapSamplingIntervals && m.heapSamplingIntervals.length))
                            m.heapSamplingIntervals = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.heapSamplingIntervals.push(r.uint64());
                        } else
                            m.heapSamplingIntervals.push(r.uint64());
                        break;
                    case 21:
                        m.allHeaps = r.bool();
                        break;
                    case 5:
                        m.all = r.bool();
                        break;
                    case 15:
                        m.minAnonymousMemoryKb = r.uint32();
                        break;
                    case 16:
                        m.maxHeapprofdMemoryKb = r.uint32();
                        break;
                    case 17:
                        m.maxHeapprofdCpuSecs = r.uint64();
                        break;
                    case 7:
                        if (!(m.skipSymbolPrefix && m.skipSymbolPrefix.length))
                            m.skipSymbolPrefix = [];
                        m.skipSymbolPrefix.push(r.string());
                        break;
                    case 6:
                        m.continuousDumpConfig = $root.perfetto.protos.HeapprofdConfig.ContinuousDumpConfig.decode(r, r.uint32());
                        break;
                    case 8:
                        m.shmemSizeBytes = r.uint64();
                        break;
                    case 9:
                        m.blockClient = r.bool();
                        break;
                    case 14:
                        m.blockClientTimeoutUs = r.uint32();
                        break;
                    case 10:
                        m.noStartup = r.bool();
                        break;
                    case 11:
                        m.noRunning = r.bool();
                        break;
                    case 13:
                        m.dumpAtMax = r.bool();
                        break;
                    case 18:
                        m.disableForkTeardown = r.bool();
                        break;
                    case 19:
                        m.disableVforkDetection = r.bool();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a HeapprofdConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.HeapprofdConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.HeapprofdConfig} HeapprofdConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HeapprofdConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a HeapprofdConfig message.
             * @function verify
             * @memberof perfetto.protos.HeapprofdConfig
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            HeapprofdConfig.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.samplingIntervalBytes != null && m.hasOwnProperty("samplingIntervalBytes")) {
                    if (!$util.isInteger(m.samplingIntervalBytes) && !(m.samplingIntervalBytes && $util.isInteger(m.samplingIntervalBytes.low) && $util.isInteger(m.samplingIntervalBytes.high)))
                        return "samplingIntervalBytes: integer|Long expected";
                }
                if (m.adaptiveSamplingShmemThreshold != null && m.hasOwnProperty("adaptiveSamplingShmemThreshold")) {
                    if (!$util.isInteger(m.adaptiveSamplingShmemThreshold) && !(m.adaptiveSamplingShmemThreshold && $util.isInteger(m.adaptiveSamplingShmemThreshold.low) && $util.isInteger(m.adaptiveSamplingShmemThreshold.high)))
                        return "adaptiveSamplingShmemThreshold: integer|Long expected";
                }
                if (m.adaptiveSamplingMaxSamplingIntervalBytes != null && m.hasOwnProperty("adaptiveSamplingMaxSamplingIntervalBytes")) {
                    if (!$util.isInteger(m.adaptiveSamplingMaxSamplingIntervalBytes) && !(m.adaptiveSamplingMaxSamplingIntervalBytes && $util.isInteger(m.adaptiveSamplingMaxSamplingIntervalBytes.low) && $util.isInteger(m.adaptiveSamplingMaxSamplingIntervalBytes.high)))
                        return "adaptiveSamplingMaxSamplingIntervalBytes: integer|Long expected";
                }
                if (m.processCmdline != null && m.hasOwnProperty("processCmdline")) {
                    if (!Array.isArray(m.processCmdline))
                        return "processCmdline: array expected";
                    for (var i = 0; i < m.processCmdline.length; ++i) {
                        if (!$util.isString(m.processCmdline[i]))
                            return "processCmdline: string[] expected";
                    }
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!Array.isArray(m.pid))
                        return "pid: array expected";
                    for (var i = 0; i < m.pid.length; ++i) {
                        if (!$util.isInteger(m.pid[i]) && !(m.pid[i] && $util.isInteger(m.pid[i].low) && $util.isInteger(m.pid[i].high)))
                            return "pid: integer|Long[] expected";
                    }
                }
                if (m.targetInstalledBy != null && m.hasOwnProperty("targetInstalledBy")) {
                    if (!Array.isArray(m.targetInstalledBy))
                        return "targetInstalledBy: array expected";
                    for (var i = 0; i < m.targetInstalledBy.length; ++i) {
                        if (!$util.isString(m.targetInstalledBy[i]))
                            return "targetInstalledBy: string[] expected";
                    }
                }
                if (m.heaps != null && m.hasOwnProperty("heaps")) {
                    if (!Array.isArray(m.heaps))
                        return "heaps: array expected";
                    for (var i = 0; i < m.heaps.length; ++i) {
                        if (!$util.isString(m.heaps[i]))
                            return "heaps: string[] expected";
                    }
                }
                if (m.excludeHeaps != null && m.hasOwnProperty("excludeHeaps")) {
                    if (!Array.isArray(m.excludeHeaps))
                        return "excludeHeaps: array expected";
                    for (var i = 0; i < m.excludeHeaps.length; ++i) {
                        if (!$util.isString(m.excludeHeaps[i]))
                            return "excludeHeaps: string[] expected";
                    }
                }
                if (m.streamAllocations != null && m.hasOwnProperty("streamAllocations")) {
                    if (typeof m.streamAllocations !== "boolean")
                        return "streamAllocations: boolean expected";
                }
                if (m.heapSamplingIntervals != null && m.hasOwnProperty("heapSamplingIntervals")) {
                    if (!Array.isArray(m.heapSamplingIntervals))
                        return "heapSamplingIntervals: array expected";
                    for (var i = 0; i < m.heapSamplingIntervals.length; ++i) {
                        if (!$util.isInteger(m.heapSamplingIntervals[i]) && !(m.heapSamplingIntervals[i] && $util.isInteger(m.heapSamplingIntervals[i].low) && $util.isInteger(m.heapSamplingIntervals[i].high)))
                            return "heapSamplingIntervals: integer|Long[] expected";
                    }
                }
                if (m.allHeaps != null && m.hasOwnProperty("allHeaps")) {
                    if (typeof m.allHeaps !== "boolean")
                        return "allHeaps: boolean expected";
                }
                if (m.all != null && m.hasOwnProperty("all")) {
                    if (typeof m.all !== "boolean")
                        return "all: boolean expected";
                }
                if (m.minAnonymousMemoryKb != null && m.hasOwnProperty("minAnonymousMemoryKb")) {
                    if (!$util.isInteger(m.minAnonymousMemoryKb))
                        return "minAnonymousMemoryKb: integer expected";
                }
                if (m.maxHeapprofdMemoryKb != null && m.hasOwnProperty("maxHeapprofdMemoryKb")) {
                    if (!$util.isInteger(m.maxHeapprofdMemoryKb))
                        return "maxHeapprofdMemoryKb: integer expected";
                }
                if (m.maxHeapprofdCpuSecs != null && m.hasOwnProperty("maxHeapprofdCpuSecs")) {
                    if (!$util.isInteger(m.maxHeapprofdCpuSecs) && !(m.maxHeapprofdCpuSecs && $util.isInteger(m.maxHeapprofdCpuSecs.low) && $util.isInteger(m.maxHeapprofdCpuSecs.high)))
                        return "maxHeapprofdCpuSecs: integer|Long expected";
                }
                if (m.skipSymbolPrefix != null && m.hasOwnProperty("skipSymbolPrefix")) {
                    if (!Array.isArray(m.skipSymbolPrefix))
                        return "skipSymbolPrefix: array expected";
                    for (var i = 0; i < m.skipSymbolPrefix.length; ++i) {
                        if (!$util.isString(m.skipSymbolPrefix[i]))
                            return "skipSymbolPrefix: string[] expected";
                    }
                }
                if (m.continuousDumpConfig != null && m.hasOwnProperty("continuousDumpConfig")) {
                    {
                        var e = $root.perfetto.protos.HeapprofdConfig.ContinuousDumpConfig.verify(m.continuousDumpConfig);
                        if (e)
                            return "continuousDumpConfig." + e;
                    }
                }
                if (m.shmemSizeBytes != null && m.hasOwnProperty("shmemSizeBytes")) {
                    if (!$util.isInteger(m.shmemSizeBytes) && !(m.shmemSizeBytes && $util.isInteger(m.shmemSizeBytes.low) && $util.isInteger(m.shmemSizeBytes.high)))
                        return "shmemSizeBytes: integer|Long expected";
                }
                if (m.blockClient != null && m.hasOwnProperty("blockClient")) {
                    if (typeof m.blockClient !== "boolean")
                        return "blockClient: boolean expected";
                }
                if (m.blockClientTimeoutUs != null && m.hasOwnProperty("blockClientTimeoutUs")) {
                    if (!$util.isInteger(m.blockClientTimeoutUs))
                        return "blockClientTimeoutUs: integer expected";
                }
                if (m.noStartup != null && m.hasOwnProperty("noStartup")) {
                    if (typeof m.noStartup !== "boolean")
                        return "noStartup: boolean expected";
                }
                if (m.noRunning != null && m.hasOwnProperty("noRunning")) {
                    if (typeof m.noRunning !== "boolean")
                        return "noRunning: boolean expected";
                }
                if (m.dumpAtMax != null && m.hasOwnProperty("dumpAtMax")) {
                    if (typeof m.dumpAtMax !== "boolean")
                        return "dumpAtMax: boolean expected";
                }
                if (m.disableForkTeardown != null && m.hasOwnProperty("disableForkTeardown")) {
                    if (typeof m.disableForkTeardown !== "boolean")
                        return "disableForkTeardown: boolean expected";
                }
                if (m.disableVforkDetection != null && m.hasOwnProperty("disableVforkDetection")) {
                    if (typeof m.disableVforkDetection !== "boolean")
                        return "disableVforkDetection: boolean expected";
                }
                return null;
            };

            /**
             * Creates a HeapprofdConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.HeapprofdConfig
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.HeapprofdConfig} HeapprofdConfig
             */
            HeapprofdConfig.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.HeapprofdConfig)
                    return d;
                var m = new $root.perfetto.protos.HeapprofdConfig();
                if (d.samplingIntervalBytes != null) {
                    if ($util.Long)
                        (m.samplingIntervalBytes = $util.Long.fromValue(d.samplingIntervalBytes)).unsigned = true;
                    else if (typeof d.samplingIntervalBytes === "string")
                        m.samplingIntervalBytes = parseInt(d.samplingIntervalBytes, 10);
                    else if (typeof d.samplingIntervalBytes === "number")
                        m.samplingIntervalBytes = d.samplingIntervalBytes;
                    else if (typeof d.samplingIntervalBytes === "object")
                        m.samplingIntervalBytes = new $util.LongBits(d.samplingIntervalBytes.low >>> 0, d.samplingIntervalBytes.high >>> 0).toNumber(true);
                }
                if (d.adaptiveSamplingShmemThreshold != null) {
                    if ($util.Long)
                        (m.adaptiveSamplingShmemThreshold = $util.Long.fromValue(d.adaptiveSamplingShmemThreshold)).unsigned = true;
                    else if (typeof d.adaptiveSamplingShmemThreshold === "string")
                        m.adaptiveSamplingShmemThreshold = parseInt(d.adaptiveSamplingShmemThreshold, 10);
                    else if (typeof d.adaptiveSamplingShmemThreshold === "number")
                        m.adaptiveSamplingShmemThreshold = d.adaptiveSamplingShmemThreshold;
                    else if (typeof d.adaptiveSamplingShmemThreshold === "object")
                        m.adaptiveSamplingShmemThreshold = new $util.LongBits(d.adaptiveSamplingShmemThreshold.low >>> 0, d.adaptiveSamplingShmemThreshold.high >>> 0).toNumber(true);
                }
                if (d.adaptiveSamplingMaxSamplingIntervalBytes != null) {
                    if ($util.Long)
                        (m.adaptiveSamplingMaxSamplingIntervalBytes = $util.Long.fromValue(d.adaptiveSamplingMaxSamplingIntervalBytes)).unsigned = true;
                    else if (typeof d.adaptiveSamplingMaxSamplingIntervalBytes === "string")
                        m.adaptiveSamplingMaxSamplingIntervalBytes = parseInt(d.adaptiveSamplingMaxSamplingIntervalBytes, 10);
                    else if (typeof d.adaptiveSamplingMaxSamplingIntervalBytes === "number")
                        m.adaptiveSamplingMaxSamplingIntervalBytes = d.adaptiveSamplingMaxSamplingIntervalBytes;
                    else if (typeof d.adaptiveSamplingMaxSamplingIntervalBytes === "object")
                        m.adaptiveSamplingMaxSamplingIntervalBytes = new $util.LongBits(d.adaptiveSamplingMaxSamplingIntervalBytes.low >>> 0, d.adaptiveSamplingMaxSamplingIntervalBytes.high >>> 0).toNumber(true);
                }
                if (d.processCmdline) {
                    if (!Array.isArray(d.processCmdline))
                        throw TypeError(".perfetto.protos.HeapprofdConfig.processCmdline: array expected");
                    m.processCmdline = [];
                    for (var i = 0; i < d.processCmdline.length; ++i) {
                        m.processCmdline[i] = String(d.processCmdline[i]);
                    }
                }
                if (d.pid) {
                    if (!Array.isArray(d.pid))
                        throw TypeError(".perfetto.protos.HeapprofdConfig.pid: array expected");
                    m.pid = [];
                    for (var i = 0; i < d.pid.length; ++i) {
                        if ($util.Long)
                            (m.pid[i] = $util.Long.fromValue(d.pid[i])).unsigned = true;
                        else if (typeof d.pid[i] === "string")
                            m.pid[i] = parseInt(d.pid[i], 10);
                        else if (typeof d.pid[i] === "number")
                            m.pid[i] = d.pid[i];
                        else if (typeof d.pid[i] === "object")
                            m.pid[i] = new $util.LongBits(d.pid[i].low >>> 0, d.pid[i].high >>> 0).toNumber(true);
                    }
                }
                if (d.targetInstalledBy) {
                    if (!Array.isArray(d.targetInstalledBy))
                        throw TypeError(".perfetto.protos.HeapprofdConfig.targetInstalledBy: array expected");
                    m.targetInstalledBy = [];
                    for (var i = 0; i < d.targetInstalledBy.length; ++i) {
                        m.targetInstalledBy[i] = String(d.targetInstalledBy[i]);
                    }
                }
                if (d.heaps) {
                    if (!Array.isArray(d.heaps))
                        throw TypeError(".perfetto.protos.HeapprofdConfig.heaps: array expected");
                    m.heaps = [];
                    for (var i = 0; i < d.heaps.length; ++i) {
                        m.heaps[i] = String(d.heaps[i]);
                    }
                }
                if (d.excludeHeaps) {
                    if (!Array.isArray(d.excludeHeaps))
                        throw TypeError(".perfetto.protos.HeapprofdConfig.excludeHeaps: array expected");
                    m.excludeHeaps = [];
                    for (var i = 0; i < d.excludeHeaps.length; ++i) {
                        m.excludeHeaps[i] = String(d.excludeHeaps[i]);
                    }
                }
                if (d.streamAllocations != null) {
                    m.streamAllocations = Boolean(d.streamAllocations);
                }
                if (d.heapSamplingIntervals) {
                    if (!Array.isArray(d.heapSamplingIntervals))
                        throw TypeError(".perfetto.protos.HeapprofdConfig.heapSamplingIntervals: array expected");
                    m.heapSamplingIntervals = [];
                    for (var i = 0; i < d.heapSamplingIntervals.length; ++i) {
                        if ($util.Long)
                            (m.heapSamplingIntervals[i] = $util.Long.fromValue(d.heapSamplingIntervals[i])).unsigned = true;
                        else if (typeof d.heapSamplingIntervals[i] === "string")
                            m.heapSamplingIntervals[i] = parseInt(d.heapSamplingIntervals[i], 10);
                        else if (typeof d.heapSamplingIntervals[i] === "number")
                            m.heapSamplingIntervals[i] = d.heapSamplingIntervals[i];
                        else if (typeof d.heapSamplingIntervals[i] === "object")
                            m.heapSamplingIntervals[i] = new $util.LongBits(d.heapSamplingIntervals[i].low >>> 0, d.heapSamplingIntervals[i].high >>> 0).toNumber(true);
                    }
                }
                if (d.allHeaps != null) {
                    m.allHeaps = Boolean(d.allHeaps);
                }
                if (d.all != null) {
                    m.all = Boolean(d.all);
                }
                if (d.minAnonymousMemoryKb != null) {
                    m.minAnonymousMemoryKb = d.minAnonymousMemoryKb >>> 0;
                }
                if (d.maxHeapprofdMemoryKb != null) {
                    m.maxHeapprofdMemoryKb = d.maxHeapprofdMemoryKb >>> 0;
                }
                if (d.maxHeapprofdCpuSecs != null) {
                    if ($util.Long)
                        (m.maxHeapprofdCpuSecs = $util.Long.fromValue(d.maxHeapprofdCpuSecs)).unsigned = true;
                    else if (typeof d.maxHeapprofdCpuSecs === "string")
                        m.maxHeapprofdCpuSecs = parseInt(d.maxHeapprofdCpuSecs, 10);
                    else if (typeof d.maxHeapprofdCpuSecs === "number")
                        m.maxHeapprofdCpuSecs = d.maxHeapprofdCpuSecs;
                    else if (typeof d.maxHeapprofdCpuSecs === "object")
                        m.maxHeapprofdCpuSecs = new $util.LongBits(d.maxHeapprofdCpuSecs.low >>> 0, d.maxHeapprofdCpuSecs.high >>> 0).toNumber(true);
                }
                if (d.skipSymbolPrefix) {
                    if (!Array.isArray(d.skipSymbolPrefix))
                        throw TypeError(".perfetto.protos.HeapprofdConfig.skipSymbolPrefix: array expected");
                    m.skipSymbolPrefix = [];
                    for (var i = 0; i < d.skipSymbolPrefix.length; ++i) {
                        m.skipSymbolPrefix[i] = String(d.skipSymbolPrefix[i]);
                    }
                }
                if (d.continuousDumpConfig != null) {
                    if (typeof d.continuousDumpConfig !== "object")
                        throw TypeError(".perfetto.protos.HeapprofdConfig.continuousDumpConfig: object expected");
                    m.continuousDumpConfig = $root.perfetto.protos.HeapprofdConfig.ContinuousDumpConfig.fromObject(d.continuousDumpConfig);
                }
                if (d.shmemSizeBytes != null) {
                    if ($util.Long)
                        (m.shmemSizeBytes = $util.Long.fromValue(d.shmemSizeBytes)).unsigned = true;
                    else if (typeof d.shmemSizeBytes === "string")
                        m.shmemSizeBytes = parseInt(d.shmemSizeBytes, 10);
                    else if (typeof d.shmemSizeBytes === "number")
                        m.shmemSizeBytes = d.shmemSizeBytes;
                    else if (typeof d.shmemSizeBytes === "object")
                        m.shmemSizeBytes = new $util.LongBits(d.shmemSizeBytes.low >>> 0, d.shmemSizeBytes.high >>> 0).toNumber(true);
                }
                if (d.blockClient != null) {
                    m.blockClient = Boolean(d.blockClient);
                }
                if (d.blockClientTimeoutUs != null) {
                    m.blockClientTimeoutUs = d.blockClientTimeoutUs >>> 0;
                }
                if (d.noStartup != null) {
                    m.noStartup = Boolean(d.noStartup);
                }
                if (d.noRunning != null) {
                    m.noRunning = Boolean(d.noRunning);
                }
                if (d.dumpAtMax != null) {
                    m.dumpAtMax = Boolean(d.dumpAtMax);
                }
                if (d.disableForkTeardown != null) {
                    m.disableForkTeardown = Boolean(d.disableForkTeardown);
                }
                if (d.disableVforkDetection != null) {
                    m.disableVforkDetection = Boolean(d.disableVforkDetection);
                }
                return m;
            };

            /**
             * Creates a plain object from a HeapprofdConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.HeapprofdConfig
             * @static
             * @param {perfetto.protos.HeapprofdConfig} m HeapprofdConfig
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            HeapprofdConfig.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.processCmdline = [];
                    d.pid = [];
                    d.skipSymbolPrefix = [];
                    d.heaps = [];
                    d.heapSamplingIntervals = [];
                    d.targetInstalledBy = [];
                    d.excludeHeaps = [];
                }
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.samplingIntervalBytes = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.samplingIntervalBytes = o.longs === String ? "0" : 0;
                    d.all = false;
                    d.continuousDumpConfig = null;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.shmemSizeBytes = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.shmemSizeBytes = o.longs === String ? "0" : 0;
                    d.blockClient = false;
                    d.noStartup = false;
                    d.noRunning = false;
                    d.dumpAtMax = false;
                    d.blockClientTimeoutUs = 0;
                    d.minAnonymousMemoryKb = 0;
                    d.maxHeapprofdMemoryKb = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.maxHeapprofdCpuSecs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.maxHeapprofdCpuSecs = o.longs === String ? "0" : 0;
                    d.disableForkTeardown = false;
                    d.disableVforkDetection = false;
                    d.allHeaps = false;
                    d.streamAllocations = false;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.adaptiveSamplingShmemThreshold = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.adaptiveSamplingShmemThreshold = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.adaptiveSamplingMaxSamplingIntervalBytes = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.adaptiveSamplingMaxSamplingIntervalBytes = o.longs === String ? "0" : 0;
                }
                if (m.samplingIntervalBytes != null && m.hasOwnProperty("samplingIntervalBytes")) {
                    if (typeof m.samplingIntervalBytes === "number")
                        d.samplingIntervalBytes = o.longs === String ? String(m.samplingIntervalBytes) : m.samplingIntervalBytes;
                    else
                        d.samplingIntervalBytes = o.longs === String ? $util.Long.prototype.toString.call(m.samplingIntervalBytes) : o.longs === Number ? new $util.LongBits(m.samplingIntervalBytes.low >>> 0, m.samplingIntervalBytes.high >>> 0).toNumber(true) : m.samplingIntervalBytes;
                }
                if (m.processCmdline && m.processCmdline.length) {
                    d.processCmdline = [];
                    for (var j = 0; j < m.processCmdline.length; ++j) {
                        d.processCmdline[j] = m.processCmdline[j];
                    }
                }
                if (m.pid && m.pid.length) {
                    d.pid = [];
                    for (var j = 0; j < m.pid.length; ++j) {
                        if (typeof m.pid[j] === "number")
                            d.pid[j] = o.longs === String ? String(m.pid[j]) : m.pid[j];
                        else
                            d.pid[j] = o.longs === String ? $util.Long.prototype.toString.call(m.pid[j]) : o.longs === Number ? new $util.LongBits(m.pid[j].low >>> 0, m.pid[j].high >>> 0).toNumber(true) : m.pid[j];
                    }
                }
                if (m.all != null && m.hasOwnProperty("all")) {
                    d.all = m.all;
                }
                if (m.continuousDumpConfig != null && m.hasOwnProperty("continuousDumpConfig")) {
                    d.continuousDumpConfig = $root.perfetto.protos.HeapprofdConfig.ContinuousDumpConfig.toObject(m.continuousDumpConfig, o);
                }
                if (m.skipSymbolPrefix && m.skipSymbolPrefix.length) {
                    d.skipSymbolPrefix = [];
                    for (var j = 0; j < m.skipSymbolPrefix.length; ++j) {
                        d.skipSymbolPrefix[j] = m.skipSymbolPrefix[j];
                    }
                }
                if (m.shmemSizeBytes != null && m.hasOwnProperty("shmemSizeBytes")) {
                    if (typeof m.shmemSizeBytes === "number")
                        d.shmemSizeBytes = o.longs === String ? String(m.shmemSizeBytes) : m.shmemSizeBytes;
                    else
                        d.shmemSizeBytes = o.longs === String ? $util.Long.prototype.toString.call(m.shmemSizeBytes) : o.longs === Number ? new $util.LongBits(m.shmemSizeBytes.low >>> 0, m.shmemSizeBytes.high >>> 0).toNumber(true) : m.shmemSizeBytes;
                }
                if (m.blockClient != null && m.hasOwnProperty("blockClient")) {
                    d.blockClient = m.blockClient;
                }
                if (m.noStartup != null && m.hasOwnProperty("noStartup")) {
                    d.noStartup = m.noStartup;
                }
                if (m.noRunning != null && m.hasOwnProperty("noRunning")) {
                    d.noRunning = m.noRunning;
                }
                if (m.dumpAtMax != null && m.hasOwnProperty("dumpAtMax")) {
                    d.dumpAtMax = m.dumpAtMax;
                }
                if (m.blockClientTimeoutUs != null && m.hasOwnProperty("blockClientTimeoutUs")) {
                    d.blockClientTimeoutUs = m.blockClientTimeoutUs;
                }
                if (m.minAnonymousMemoryKb != null && m.hasOwnProperty("minAnonymousMemoryKb")) {
                    d.minAnonymousMemoryKb = m.minAnonymousMemoryKb;
                }
                if (m.maxHeapprofdMemoryKb != null && m.hasOwnProperty("maxHeapprofdMemoryKb")) {
                    d.maxHeapprofdMemoryKb = m.maxHeapprofdMemoryKb;
                }
                if (m.maxHeapprofdCpuSecs != null && m.hasOwnProperty("maxHeapprofdCpuSecs")) {
                    if (typeof m.maxHeapprofdCpuSecs === "number")
                        d.maxHeapprofdCpuSecs = o.longs === String ? String(m.maxHeapprofdCpuSecs) : m.maxHeapprofdCpuSecs;
                    else
                        d.maxHeapprofdCpuSecs = o.longs === String ? $util.Long.prototype.toString.call(m.maxHeapprofdCpuSecs) : o.longs === Number ? new $util.LongBits(m.maxHeapprofdCpuSecs.low >>> 0, m.maxHeapprofdCpuSecs.high >>> 0).toNumber(true) : m.maxHeapprofdCpuSecs;
                }
                if (m.disableForkTeardown != null && m.hasOwnProperty("disableForkTeardown")) {
                    d.disableForkTeardown = m.disableForkTeardown;
                }
                if (m.disableVforkDetection != null && m.hasOwnProperty("disableVforkDetection")) {
                    d.disableVforkDetection = m.disableVforkDetection;
                }
                if (m.heaps && m.heaps.length) {
                    d.heaps = [];
                    for (var j = 0; j < m.heaps.length; ++j) {
                        d.heaps[j] = m.heaps[j];
                    }
                }
                if (m.allHeaps != null && m.hasOwnProperty("allHeaps")) {
                    d.allHeaps = m.allHeaps;
                }
                if (m.heapSamplingIntervals && m.heapSamplingIntervals.length) {
                    d.heapSamplingIntervals = [];
                    for (var j = 0; j < m.heapSamplingIntervals.length; ++j) {
                        if (typeof m.heapSamplingIntervals[j] === "number")
                            d.heapSamplingIntervals[j] = o.longs === String ? String(m.heapSamplingIntervals[j]) : m.heapSamplingIntervals[j];
                        else
                            d.heapSamplingIntervals[j] = o.longs === String ? $util.Long.prototype.toString.call(m.heapSamplingIntervals[j]) : o.longs === Number ? new $util.LongBits(m.heapSamplingIntervals[j].low >>> 0, m.heapSamplingIntervals[j].high >>> 0).toNumber(true) : m.heapSamplingIntervals[j];
                    }
                }
                if (m.streamAllocations != null && m.hasOwnProperty("streamAllocations")) {
                    d.streamAllocations = m.streamAllocations;
                }
                if (m.adaptiveSamplingShmemThreshold != null && m.hasOwnProperty("adaptiveSamplingShmemThreshold")) {
                    if (typeof m.adaptiveSamplingShmemThreshold === "number")
                        d.adaptiveSamplingShmemThreshold = o.longs === String ? String(m.adaptiveSamplingShmemThreshold) : m.adaptiveSamplingShmemThreshold;
                    else
                        d.adaptiveSamplingShmemThreshold = o.longs === String ? $util.Long.prototype.toString.call(m.adaptiveSamplingShmemThreshold) : o.longs === Number ? new $util.LongBits(m.adaptiveSamplingShmemThreshold.low >>> 0, m.adaptiveSamplingShmemThreshold.high >>> 0).toNumber(true) : m.adaptiveSamplingShmemThreshold;
                }
                if (m.adaptiveSamplingMaxSamplingIntervalBytes != null && m.hasOwnProperty("adaptiveSamplingMaxSamplingIntervalBytes")) {
                    if (typeof m.adaptiveSamplingMaxSamplingIntervalBytes === "number")
                        d.adaptiveSamplingMaxSamplingIntervalBytes = o.longs === String ? String(m.adaptiveSamplingMaxSamplingIntervalBytes) : m.adaptiveSamplingMaxSamplingIntervalBytes;
                    else
                        d.adaptiveSamplingMaxSamplingIntervalBytes = o.longs === String ? $util.Long.prototype.toString.call(m.adaptiveSamplingMaxSamplingIntervalBytes) : o.longs === Number ? new $util.LongBits(m.adaptiveSamplingMaxSamplingIntervalBytes.low >>> 0, m.adaptiveSamplingMaxSamplingIntervalBytes.high >>> 0).toNumber(true) : m.adaptiveSamplingMaxSamplingIntervalBytes;
                }
                if (m.targetInstalledBy && m.targetInstalledBy.length) {
                    d.targetInstalledBy = [];
                    for (var j = 0; j < m.targetInstalledBy.length; ++j) {
                        d.targetInstalledBy[j] = m.targetInstalledBy[j];
                    }
                }
                if (m.excludeHeaps && m.excludeHeaps.length) {
                    d.excludeHeaps = [];
                    for (var j = 0; j < m.excludeHeaps.length; ++j) {
                        d.excludeHeaps[j] = m.excludeHeaps[j];
                    }
                }
                return d;
            };

            /**
             * Converts this HeapprofdConfig to JSON.
             * @function toJSON
             * @memberof perfetto.protos.HeapprofdConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            HeapprofdConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            HeapprofdConfig.ContinuousDumpConfig = (function() {

                /**
                 * Properties of a ContinuousDumpConfig.
                 * @memberof perfetto.protos.HeapprofdConfig
                 * @interface IContinuousDumpConfig
                 * @property {number|null} [dumpPhaseMs] ContinuousDumpConfig dumpPhaseMs
                 * @property {number|null} [dumpIntervalMs] ContinuousDumpConfig dumpIntervalMs
                 */

                /**
                 * Constructs a new ContinuousDumpConfig.
                 * @memberof perfetto.protos.HeapprofdConfig
                 * @classdesc Represents a ContinuousDumpConfig.
                 * @implements IContinuousDumpConfig
                 * @constructor
                 * @param {perfetto.protos.HeapprofdConfig.IContinuousDumpConfig=} [p] Properties to set
                 */
                function ContinuousDumpConfig(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * ContinuousDumpConfig dumpPhaseMs.
                 * @member {number} dumpPhaseMs
                 * @memberof perfetto.protos.HeapprofdConfig.ContinuousDumpConfig
                 * @instance
                 */
                ContinuousDumpConfig.prototype.dumpPhaseMs = 0;

                /**
                 * ContinuousDumpConfig dumpIntervalMs.
                 * @member {number} dumpIntervalMs
                 * @memberof perfetto.protos.HeapprofdConfig.ContinuousDumpConfig
                 * @instance
                 */
                ContinuousDumpConfig.prototype.dumpIntervalMs = 0;

                /**
                 * Creates a new ContinuousDumpConfig instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.HeapprofdConfig.ContinuousDumpConfig
                 * @static
                 * @param {perfetto.protos.HeapprofdConfig.IContinuousDumpConfig=} [properties] Properties to set
                 * @returns {perfetto.protos.HeapprofdConfig.ContinuousDumpConfig} ContinuousDumpConfig instance
                 */
                ContinuousDumpConfig.create = function create(properties) {
                    return new ContinuousDumpConfig(properties);
                };

                /**
                 * Encodes the specified ContinuousDumpConfig message. Does not implicitly {@link perfetto.protos.HeapprofdConfig.ContinuousDumpConfig.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.HeapprofdConfig.ContinuousDumpConfig
                 * @static
                 * @param {perfetto.protos.HeapprofdConfig.IContinuousDumpConfig} m ContinuousDumpConfig message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ContinuousDumpConfig.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.dumpPhaseMs != null && Object.hasOwnProperty.call(m, "dumpPhaseMs"))
                        w.uint32(40).uint32(m.dumpPhaseMs);
                    if (m.dumpIntervalMs != null && Object.hasOwnProperty.call(m, "dumpIntervalMs"))
                        w.uint32(48).uint32(m.dumpIntervalMs);
                    return w;
                };

                /**
                 * Encodes the specified ContinuousDumpConfig message, length delimited. Does not implicitly {@link perfetto.protos.HeapprofdConfig.ContinuousDumpConfig.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.HeapprofdConfig.ContinuousDumpConfig
                 * @static
                 * @param {perfetto.protos.HeapprofdConfig.IContinuousDumpConfig} message ContinuousDumpConfig message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ContinuousDumpConfig.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a ContinuousDumpConfig message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.HeapprofdConfig.ContinuousDumpConfig
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.HeapprofdConfig.ContinuousDumpConfig} ContinuousDumpConfig
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ContinuousDumpConfig.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.HeapprofdConfig.ContinuousDumpConfig();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 5:
                            m.dumpPhaseMs = r.uint32();
                            break;
                        case 6:
                            m.dumpIntervalMs = r.uint32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a ContinuousDumpConfig message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.HeapprofdConfig.ContinuousDumpConfig
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.HeapprofdConfig.ContinuousDumpConfig} ContinuousDumpConfig
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ContinuousDumpConfig.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a ContinuousDumpConfig message.
                 * @function verify
                 * @memberof perfetto.protos.HeapprofdConfig.ContinuousDumpConfig
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ContinuousDumpConfig.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.dumpPhaseMs != null && m.hasOwnProperty("dumpPhaseMs")) {
                        if (!$util.isInteger(m.dumpPhaseMs))
                            return "dumpPhaseMs: integer expected";
                    }
                    if (m.dumpIntervalMs != null && m.hasOwnProperty("dumpIntervalMs")) {
                        if (!$util.isInteger(m.dumpIntervalMs))
                            return "dumpIntervalMs: integer expected";
                    }
                    return null;
                };

                /**
                 * Creates a ContinuousDumpConfig message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.HeapprofdConfig.ContinuousDumpConfig
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.HeapprofdConfig.ContinuousDumpConfig} ContinuousDumpConfig
                 */
                ContinuousDumpConfig.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.HeapprofdConfig.ContinuousDumpConfig)
                        return d;
                    var m = new $root.perfetto.protos.HeapprofdConfig.ContinuousDumpConfig();
                    if (d.dumpPhaseMs != null) {
                        m.dumpPhaseMs = d.dumpPhaseMs >>> 0;
                    }
                    if (d.dumpIntervalMs != null) {
                        m.dumpIntervalMs = d.dumpIntervalMs >>> 0;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a ContinuousDumpConfig message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.HeapprofdConfig.ContinuousDumpConfig
                 * @static
                 * @param {perfetto.protos.HeapprofdConfig.ContinuousDumpConfig} m ContinuousDumpConfig
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ContinuousDumpConfig.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.dumpPhaseMs = 0;
                        d.dumpIntervalMs = 0;
                    }
                    if (m.dumpPhaseMs != null && m.hasOwnProperty("dumpPhaseMs")) {
                        d.dumpPhaseMs = m.dumpPhaseMs;
                    }
                    if (m.dumpIntervalMs != null && m.hasOwnProperty("dumpIntervalMs")) {
                        d.dumpIntervalMs = m.dumpIntervalMs;
                    }
                    return d;
                };

                /**
                 * Converts this ContinuousDumpConfig to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.HeapprofdConfig.ContinuousDumpConfig
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ContinuousDumpConfig.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return ContinuousDumpConfig;
            })();

            return HeapprofdConfig;
        })();

        protos.JavaHprofConfig = (function() {

            /**
             * Properties of a JavaHprofConfig.
             * @memberof perfetto.protos
             * @interface IJavaHprofConfig
             * @property {Array.<string>|null} [processCmdline] JavaHprofConfig processCmdline
             * @property {Array.<number>|null} [pid] JavaHprofConfig pid
             * @property {Array.<string>|null} [targetInstalledBy] JavaHprofConfig targetInstalledBy
             * @property {perfetto.protos.JavaHprofConfig.IContinuousDumpConfig|null} [continuousDumpConfig] JavaHprofConfig continuousDumpConfig
             * @property {number|null} [minAnonymousMemoryKb] JavaHprofConfig minAnonymousMemoryKb
             * @property {boolean|null} [dumpSmaps] JavaHprofConfig dumpSmaps
             * @property {Array.<string>|null} [ignoredTypes] JavaHprofConfig ignoredTypes
             */

            /**
             * Constructs a new JavaHprofConfig.
             * @memberof perfetto.protos
             * @classdesc Represents a JavaHprofConfig.
             * @implements IJavaHprofConfig
             * @constructor
             * @param {perfetto.protos.IJavaHprofConfig=} [p] Properties to set
             */
            function JavaHprofConfig(p) {
                this.processCmdline = [];
                this.pid = [];
                this.targetInstalledBy = [];
                this.ignoredTypes = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * JavaHprofConfig processCmdline.
             * @member {Array.<string>} processCmdline
             * @memberof perfetto.protos.JavaHprofConfig
             * @instance
             */
            JavaHprofConfig.prototype.processCmdline = $util.emptyArray;

            /**
             * JavaHprofConfig pid.
             * @member {Array.<number>} pid
             * @memberof perfetto.protos.JavaHprofConfig
             * @instance
             */
            JavaHprofConfig.prototype.pid = $util.emptyArray;

            /**
             * JavaHprofConfig targetInstalledBy.
             * @member {Array.<string>} targetInstalledBy
             * @memberof perfetto.protos.JavaHprofConfig
             * @instance
             */
            JavaHprofConfig.prototype.targetInstalledBy = $util.emptyArray;

            /**
             * JavaHprofConfig continuousDumpConfig.
             * @member {perfetto.protos.JavaHprofConfig.IContinuousDumpConfig|null|undefined} continuousDumpConfig
             * @memberof perfetto.protos.JavaHprofConfig
             * @instance
             */
            JavaHprofConfig.prototype.continuousDumpConfig = null;

            /**
             * JavaHprofConfig minAnonymousMemoryKb.
             * @member {number} minAnonymousMemoryKb
             * @memberof perfetto.protos.JavaHprofConfig
             * @instance
             */
            JavaHprofConfig.prototype.minAnonymousMemoryKb = 0;

            /**
             * JavaHprofConfig dumpSmaps.
             * @member {boolean} dumpSmaps
             * @memberof perfetto.protos.JavaHprofConfig
             * @instance
             */
            JavaHprofConfig.prototype.dumpSmaps = false;

            /**
             * JavaHprofConfig ignoredTypes.
             * @member {Array.<string>} ignoredTypes
             * @memberof perfetto.protos.JavaHprofConfig
             * @instance
             */
            JavaHprofConfig.prototype.ignoredTypes = $util.emptyArray;

            /**
             * Creates a new JavaHprofConfig instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.JavaHprofConfig
             * @static
             * @param {perfetto.protos.IJavaHprofConfig=} [properties] Properties to set
             * @returns {perfetto.protos.JavaHprofConfig} JavaHprofConfig instance
             */
            JavaHprofConfig.create = function create(properties) {
                return new JavaHprofConfig(properties);
            };

            /**
             * Encodes the specified JavaHprofConfig message. Does not implicitly {@link perfetto.protos.JavaHprofConfig.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.JavaHprofConfig
             * @static
             * @param {perfetto.protos.IJavaHprofConfig} m JavaHprofConfig message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            JavaHprofConfig.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.processCmdline != null && m.processCmdline.length) {
                    for (var i = 0; i < m.processCmdline.length; ++i)
                        w.uint32(10).string(m.processCmdline[i]);
                }
                if (m.pid != null && m.pid.length) {
                    for (var i = 0; i < m.pid.length; ++i)
                        w.uint32(16).uint64(m.pid[i]);
                }
                if (m.continuousDumpConfig != null && Object.hasOwnProperty.call(m, "continuousDumpConfig"))
                    $root.perfetto.protos.JavaHprofConfig.ContinuousDumpConfig.encode(m.continuousDumpConfig, w.uint32(26).fork()).ldelim();
                if (m.minAnonymousMemoryKb != null && Object.hasOwnProperty.call(m, "minAnonymousMemoryKb"))
                    w.uint32(32).uint32(m.minAnonymousMemoryKb);
                if (m.dumpSmaps != null && Object.hasOwnProperty.call(m, "dumpSmaps"))
                    w.uint32(40).bool(m.dumpSmaps);
                if (m.ignoredTypes != null && m.ignoredTypes.length) {
                    for (var i = 0; i < m.ignoredTypes.length; ++i)
                        w.uint32(50).string(m.ignoredTypes[i]);
                }
                if (m.targetInstalledBy != null && m.targetInstalledBy.length) {
                    for (var i = 0; i < m.targetInstalledBy.length; ++i)
                        w.uint32(58).string(m.targetInstalledBy[i]);
                }
                return w;
            };

            /**
             * Encodes the specified JavaHprofConfig message, length delimited. Does not implicitly {@link perfetto.protos.JavaHprofConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.JavaHprofConfig
             * @static
             * @param {perfetto.protos.IJavaHprofConfig} message JavaHprofConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            JavaHprofConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a JavaHprofConfig message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.JavaHprofConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.JavaHprofConfig} JavaHprofConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            JavaHprofConfig.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.JavaHprofConfig();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.processCmdline && m.processCmdline.length))
                            m.processCmdline = [];
                        m.processCmdline.push(r.string());
                        break;
                    case 2:
                        if (!(m.pid && m.pid.length))
                            m.pid = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.pid.push(r.uint64());
                        } else
                            m.pid.push(r.uint64());
                        break;
                    case 7:
                        if (!(m.targetInstalledBy && m.targetInstalledBy.length))
                            m.targetInstalledBy = [];
                        m.targetInstalledBy.push(r.string());
                        break;
                    case 3:
                        m.continuousDumpConfig = $root.perfetto.protos.JavaHprofConfig.ContinuousDumpConfig.decode(r, r.uint32());
                        break;
                    case 4:
                        m.minAnonymousMemoryKb = r.uint32();
                        break;
                    case 5:
                        m.dumpSmaps = r.bool();
                        break;
                    case 6:
                        if (!(m.ignoredTypes && m.ignoredTypes.length))
                            m.ignoredTypes = [];
                        m.ignoredTypes.push(r.string());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a JavaHprofConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.JavaHprofConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.JavaHprofConfig} JavaHprofConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            JavaHprofConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a JavaHprofConfig message.
             * @function verify
             * @memberof perfetto.protos.JavaHprofConfig
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            JavaHprofConfig.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.processCmdline != null && m.hasOwnProperty("processCmdline")) {
                    if (!Array.isArray(m.processCmdline))
                        return "processCmdline: array expected";
                    for (var i = 0; i < m.processCmdline.length; ++i) {
                        if (!$util.isString(m.processCmdline[i]))
                            return "processCmdline: string[] expected";
                    }
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!Array.isArray(m.pid))
                        return "pid: array expected";
                    for (var i = 0; i < m.pid.length; ++i) {
                        if (!$util.isInteger(m.pid[i]) && !(m.pid[i] && $util.isInteger(m.pid[i].low) && $util.isInteger(m.pid[i].high)))
                            return "pid: integer|Long[] expected";
                    }
                }
                if (m.targetInstalledBy != null && m.hasOwnProperty("targetInstalledBy")) {
                    if (!Array.isArray(m.targetInstalledBy))
                        return "targetInstalledBy: array expected";
                    for (var i = 0; i < m.targetInstalledBy.length; ++i) {
                        if (!$util.isString(m.targetInstalledBy[i]))
                            return "targetInstalledBy: string[] expected";
                    }
                }
                if (m.continuousDumpConfig != null && m.hasOwnProperty("continuousDumpConfig")) {
                    {
                        var e = $root.perfetto.protos.JavaHprofConfig.ContinuousDumpConfig.verify(m.continuousDumpConfig);
                        if (e)
                            return "continuousDumpConfig." + e;
                    }
                }
                if (m.minAnonymousMemoryKb != null && m.hasOwnProperty("minAnonymousMemoryKb")) {
                    if (!$util.isInteger(m.minAnonymousMemoryKb))
                        return "minAnonymousMemoryKb: integer expected";
                }
                if (m.dumpSmaps != null && m.hasOwnProperty("dumpSmaps")) {
                    if (typeof m.dumpSmaps !== "boolean")
                        return "dumpSmaps: boolean expected";
                }
                if (m.ignoredTypes != null && m.hasOwnProperty("ignoredTypes")) {
                    if (!Array.isArray(m.ignoredTypes))
                        return "ignoredTypes: array expected";
                    for (var i = 0; i < m.ignoredTypes.length; ++i) {
                        if (!$util.isString(m.ignoredTypes[i]))
                            return "ignoredTypes: string[] expected";
                    }
                }
                return null;
            };

            /**
             * Creates a JavaHprofConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.JavaHprofConfig
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.JavaHprofConfig} JavaHprofConfig
             */
            JavaHprofConfig.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.JavaHprofConfig)
                    return d;
                var m = new $root.perfetto.protos.JavaHprofConfig();
                if (d.processCmdline) {
                    if (!Array.isArray(d.processCmdline))
                        throw TypeError(".perfetto.protos.JavaHprofConfig.processCmdline: array expected");
                    m.processCmdline = [];
                    for (var i = 0; i < d.processCmdline.length; ++i) {
                        m.processCmdline[i] = String(d.processCmdline[i]);
                    }
                }
                if (d.pid) {
                    if (!Array.isArray(d.pid))
                        throw TypeError(".perfetto.protos.JavaHprofConfig.pid: array expected");
                    m.pid = [];
                    for (var i = 0; i < d.pid.length; ++i) {
                        if ($util.Long)
                            (m.pid[i] = $util.Long.fromValue(d.pid[i])).unsigned = true;
                        else if (typeof d.pid[i] === "string")
                            m.pid[i] = parseInt(d.pid[i], 10);
                        else if (typeof d.pid[i] === "number")
                            m.pid[i] = d.pid[i];
                        else if (typeof d.pid[i] === "object")
                            m.pid[i] = new $util.LongBits(d.pid[i].low >>> 0, d.pid[i].high >>> 0).toNumber(true);
                    }
                }
                if (d.targetInstalledBy) {
                    if (!Array.isArray(d.targetInstalledBy))
                        throw TypeError(".perfetto.protos.JavaHprofConfig.targetInstalledBy: array expected");
                    m.targetInstalledBy = [];
                    for (var i = 0; i < d.targetInstalledBy.length; ++i) {
                        m.targetInstalledBy[i] = String(d.targetInstalledBy[i]);
                    }
                }
                if (d.continuousDumpConfig != null) {
                    if (typeof d.continuousDumpConfig !== "object")
                        throw TypeError(".perfetto.protos.JavaHprofConfig.continuousDumpConfig: object expected");
                    m.continuousDumpConfig = $root.perfetto.protos.JavaHprofConfig.ContinuousDumpConfig.fromObject(d.continuousDumpConfig);
                }
                if (d.minAnonymousMemoryKb != null) {
                    m.minAnonymousMemoryKb = d.minAnonymousMemoryKb >>> 0;
                }
                if (d.dumpSmaps != null) {
                    m.dumpSmaps = Boolean(d.dumpSmaps);
                }
                if (d.ignoredTypes) {
                    if (!Array.isArray(d.ignoredTypes))
                        throw TypeError(".perfetto.protos.JavaHprofConfig.ignoredTypes: array expected");
                    m.ignoredTypes = [];
                    for (var i = 0; i < d.ignoredTypes.length; ++i) {
                        m.ignoredTypes[i] = String(d.ignoredTypes[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a JavaHprofConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.JavaHprofConfig
             * @static
             * @param {perfetto.protos.JavaHprofConfig} m JavaHprofConfig
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            JavaHprofConfig.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.processCmdline = [];
                    d.pid = [];
                    d.ignoredTypes = [];
                    d.targetInstalledBy = [];
                }
                if (o.defaults) {
                    d.continuousDumpConfig = null;
                    d.minAnonymousMemoryKb = 0;
                    d.dumpSmaps = false;
                }
                if (m.processCmdline && m.processCmdline.length) {
                    d.processCmdline = [];
                    for (var j = 0; j < m.processCmdline.length; ++j) {
                        d.processCmdline[j] = m.processCmdline[j];
                    }
                }
                if (m.pid && m.pid.length) {
                    d.pid = [];
                    for (var j = 0; j < m.pid.length; ++j) {
                        if (typeof m.pid[j] === "number")
                            d.pid[j] = o.longs === String ? String(m.pid[j]) : m.pid[j];
                        else
                            d.pid[j] = o.longs === String ? $util.Long.prototype.toString.call(m.pid[j]) : o.longs === Number ? new $util.LongBits(m.pid[j].low >>> 0, m.pid[j].high >>> 0).toNumber(true) : m.pid[j];
                    }
                }
                if (m.continuousDumpConfig != null && m.hasOwnProperty("continuousDumpConfig")) {
                    d.continuousDumpConfig = $root.perfetto.protos.JavaHprofConfig.ContinuousDumpConfig.toObject(m.continuousDumpConfig, o);
                }
                if (m.minAnonymousMemoryKb != null && m.hasOwnProperty("minAnonymousMemoryKb")) {
                    d.minAnonymousMemoryKb = m.minAnonymousMemoryKb;
                }
                if (m.dumpSmaps != null && m.hasOwnProperty("dumpSmaps")) {
                    d.dumpSmaps = m.dumpSmaps;
                }
                if (m.ignoredTypes && m.ignoredTypes.length) {
                    d.ignoredTypes = [];
                    for (var j = 0; j < m.ignoredTypes.length; ++j) {
                        d.ignoredTypes[j] = m.ignoredTypes[j];
                    }
                }
                if (m.targetInstalledBy && m.targetInstalledBy.length) {
                    d.targetInstalledBy = [];
                    for (var j = 0; j < m.targetInstalledBy.length; ++j) {
                        d.targetInstalledBy[j] = m.targetInstalledBy[j];
                    }
                }
                return d;
            };

            /**
             * Converts this JavaHprofConfig to JSON.
             * @function toJSON
             * @memberof perfetto.protos.JavaHprofConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            JavaHprofConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            JavaHprofConfig.ContinuousDumpConfig = (function() {

                /**
                 * Properties of a ContinuousDumpConfig.
                 * @memberof perfetto.protos.JavaHprofConfig
                 * @interface IContinuousDumpConfig
                 * @property {number|null} [dumpPhaseMs] ContinuousDumpConfig dumpPhaseMs
                 * @property {number|null} [dumpIntervalMs] ContinuousDumpConfig dumpIntervalMs
                 * @property {boolean|null} [scanPidsOnlyOnStart] ContinuousDumpConfig scanPidsOnlyOnStart
                 */

                /**
                 * Constructs a new ContinuousDumpConfig.
                 * @memberof perfetto.protos.JavaHprofConfig
                 * @classdesc Represents a ContinuousDumpConfig.
                 * @implements IContinuousDumpConfig
                 * @constructor
                 * @param {perfetto.protos.JavaHprofConfig.IContinuousDumpConfig=} [p] Properties to set
                 */
                function ContinuousDumpConfig(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * ContinuousDumpConfig dumpPhaseMs.
                 * @member {number} dumpPhaseMs
                 * @memberof perfetto.protos.JavaHprofConfig.ContinuousDumpConfig
                 * @instance
                 */
                ContinuousDumpConfig.prototype.dumpPhaseMs = 0;

                /**
                 * ContinuousDumpConfig dumpIntervalMs.
                 * @member {number} dumpIntervalMs
                 * @memberof perfetto.protos.JavaHprofConfig.ContinuousDumpConfig
                 * @instance
                 */
                ContinuousDumpConfig.prototype.dumpIntervalMs = 0;

                /**
                 * ContinuousDumpConfig scanPidsOnlyOnStart.
                 * @member {boolean} scanPidsOnlyOnStart
                 * @memberof perfetto.protos.JavaHprofConfig.ContinuousDumpConfig
                 * @instance
                 */
                ContinuousDumpConfig.prototype.scanPidsOnlyOnStart = false;

                /**
                 * Creates a new ContinuousDumpConfig instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.JavaHprofConfig.ContinuousDumpConfig
                 * @static
                 * @param {perfetto.protos.JavaHprofConfig.IContinuousDumpConfig=} [properties] Properties to set
                 * @returns {perfetto.protos.JavaHprofConfig.ContinuousDumpConfig} ContinuousDumpConfig instance
                 */
                ContinuousDumpConfig.create = function create(properties) {
                    return new ContinuousDumpConfig(properties);
                };

                /**
                 * Encodes the specified ContinuousDumpConfig message. Does not implicitly {@link perfetto.protos.JavaHprofConfig.ContinuousDumpConfig.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.JavaHprofConfig.ContinuousDumpConfig
                 * @static
                 * @param {perfetto.protos.JavaHprofConfig.IContinuousDumpConfig} m ContinuousDumpConfig message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ContinuousDumpConfig.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.dumpPhaseMs != null && Object.hasOwnProperty.call(m, "dumpPhaseMs"))
                        w.uint32(8).uint32(m.dumpPhaseMs);
                    if (m.dumpIntervalMs != null && Object.hasOwnProperty.call(m, "dumpIntervalMs"))
                        w.uint32(16).uint32(m.dumpIntervalMs);
                    if (m.scanPidsOnlyOnStart != null && Object.hasOwnProperty.call(m, "scanPidsOnlyOnStart"))
                        w.uint32(24).bool(m.scanPidsOnlyOnStart);
                    return w;
                };

                /**
                 * Encodes the specified ContinuousDumpConfig message, length delimited. Does not implicitly {@link perfetto.protos.JavaHprofConfig.ContinuousDumpConfig.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.JavaHprofConfig.ContinuousDumpConfig
                 * @static
                 * @param {perfetto.protos.JavaHprofConfig.IContinuousDumpConfig} message ContinuousDumpConfig message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ContinuousDumpConfig.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a ContinuousDumpConfig message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.JavaHprofConfig.ContinuousDumpConfig
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.JavaHprofConfig.ContinuousDumpConfig} ContinuousDumpConfig
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ContinuousDumpConfig.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.JavaHprofConfig.ContinuousDumpConfig();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.dumpPhaseMs = r.uint32();
                            break;
                        case 2:
                            m.dumpIntervalMs = r.uint32();
                            break;
                        case 3:
                            m.scanPidsOnlyOnStart = r.bool();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a ContinuousDumpConfig message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.JavaHprofConfig.ContinuousDumpConfig
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.JavaHprofConfig.ContinuousDumpConfig} ContinuousDumpConfig
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ContinuousDumpConfig.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a ContinuousDumpConfig message.
                 * @function verify
                 * @memberof perfetto.protos.JavaHprofConfig.ContinuousDumpConfig
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ContinuousDumpConfig.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.dumpPhaseMs != null && m.hasOwnProperty("dumpPhaseMs")) {
                        if (!$util.isInteger(m.dumpPhaseMs))
                            return "dumpPhaseMs: integer expected";
                    }
                    if (m.dumpIntervalMs != null && m.hasOwnProperty("dumpIntervalMs")) {
                        if (!$util.isInteger(m.dumpIntervalMs))
                            return "dumpIntervalMs: integer expected";
                    }
                    if (m.scanPidsOnlyOnStart != null && m.hasOwnProperty("scanPidsOnlyOnStart")) {
                        if (typeof m.scanPidsOnlyOnStart !== "boolean")
                            return "scanPidsOnlyOnStart: boolean expected";
                    }
                    return null;
                };

                /**
                 * Creates a ContinuousDumpConfig message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.JavaHprofConfig.ContinuousDumpConfig
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.JavaHprofConfig.ContinuousDumpConfig} ContinuousDumpConfig
                 */
                ContinuousDumpConfig.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.JavaHprofConfig.ContinuousDumpConfig)
                        return d;
                    var m = new $root.perfetto.protos.JavaHprofConfig.ContinuousDumpConfig();
                    if (d.dumpPhaseMs != null) {
                        m.dumpPhaseMs = d.dumpPhaseMs >>> 0;
                    }
                    if (d.dumpIntervalMs != null) {
                        m.dumpIntervalMs = d.dumpIntervalMs >>> 0;
                    }
                    if (d.scanPidsOnlyOnStart != null) {
                        m.scanPidsOnlyOnStart = Boolean(d.scanPidsOnlyOnStart);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a ContinuousDumpConfig message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.JavaHprofConfig.ContinuousDumpConfig
                 * @static
                 * @param {perfetto.protos.JavaHprofConfig.ContinuousDumpConfig} m ContinuousDumpConfig
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ContinuousDumpConfig.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.dumpPhaseMs = 0;
                        d.dumpIntervalMs = 0;
                        d.scanPidsOnlyOnStart = false;
                    }
                    if (m.dumpPhaseMs != null && m.hasOwnProperty("dumpPhaseMs")) {
                        d.dumpPhaseMs = m.dumpPhaseMs;
                    }
                    if (m.dumpIntervalMs != null && m.hasOwnProperty("dumpIntervalMs")) {
                        d.dumpIntervalMs = m.dumpIntervalMs;
                    }
                    if (m.scanPidsOnlyOnStart != null && m.hasOwnProperty("scanPidsOnlyOnStart")) {
                        d.scanPidsOnlyOnStart = m.scanPidsOnlyOnStart;
                    }
                    return d;
                };

                /**
                 * Converts this ContinuousDumpConfig to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.JavaHprofConfig.ContinuousDumpConfig
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ContinuousDumpConfig.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return ContinuousDumpConfig;
            })();

            return JavaHprofConfig;
        })();

        protos.PerfEvents = (function() {

            /**
             * Properties of a PerfEvents.
             * @memberof perfetto.protos
             * @interface IPerfEvents
             */

            /**
             * Constructs a new PerfEvents.
             * @memberof perfetto.protos
             * @classdesc Represents a PerfEvents.
             * @implements IPerfEvents
             * @constructor
             * @param {perfetto.protos.IPerfEvents=} [p] Properties to set
             */
            function PerfEvents(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Creates a new PerfEvents instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.PerfEvents
             * @static
             * @param {perfetto.protos.IPerfEvents=} [properties] Properties to set
             * @returns {perfetto.protos.PerfEvents} PerfEvents instance
             */
            PerfEvents.create = function create(properties) {
                return new PerfEvents(properties);
            };

            /**
             * Encodes the specified PerfEvents message. Does not implicitly {@link perfetto.protos.PerfEvents.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.PerfEvents
             * @static
             * @param {perfetto.protos.IPerfEvents} m PerfEvents message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PerfEvents.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                return w;
            };

            /**
             * Encodes the specified PerfEvents message, length delimited. Does not implicitly {@link perfetto.protos.PerfEvents.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.PerfEvents
             * @static
             * @param {perfetto.protos.IPerfEvents} message PerfEvents message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PerfEvents.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a PerfEvents message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.PerfEvents
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.PerfEvents} PerfEvents
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PerfEvents.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.PerfEvents();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a PerfEvents message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.PerfEvents
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.PerfEvents} PerfEvents
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PerfEvents.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a PerfEvents message.
             * @function verify
             * @memberof perfetto.protos.PerfEvents
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            PerfEvents.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates a PerfEvents message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.PerfEvents
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.PerfEvents} PerfEvents
             */
            PerfEvents.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.PerfEvents)
                    return d;
                return new $root.perfetto.protos.PerfEvents();
            };

            /**
             * Creates a plain object from a PerfEvents message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.PerfEvents
             * @static
             * @param {perfetto.protos.PerfEvents} m PerfEvents
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            PerfEvents.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this PerfEvents to JSON.
             * @function toJSON
             * @memberof perfetto.protos.PerfEvents
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            PerfEvents.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            PerfEvents.Timebase = (function() {

                /**
                 * Properties of a Timebase.
                 * @memberof perfetto.protos.PerfEvents
                 * @interface ITimebase
                 * @property {number|null} [frequency] Timebase frequency
                 * @property {number|null} [period] Timebase period
                 * @property {perfetto.protos.PerfEvents.Counter|null} [counter] Timebase counter
                 * @property {perfetto.protos.PerfEvents.ITracepoint|null} [tracepoint] Timebase tracepoint
                 * @property {perfetto.protos.PerfEvents.IRawEvent|null} [rawEvent] Timebase rawEvent
                 * @property {perfetto.protos.PerfEvents.PerfClock|null} [timestampClock] Timebase timestampClock
                 * @property {string|null} [name] Timebase name
                 */

                /**
                 * Constructs a new Timebase.
                 * @memberof perfetto.protos.PerfEvents
                 * @classdesc Represents a Timebase.
                 * @implements ITimebase
                 * @constructor
                 * @param {perfetto.protos.PerfEvents.ITimebase=} [p] Properties to set
                 */
                function Timebase(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Timebase frequency.
                 * @member {number} frequency
                 * @memberof perfetto.protos.PerfEvents.Timebase
                 * @instance
                 */
                Timebase.prototype.frequency = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Timebase period.
                 * @member {number} period
                 * @memberof perfetto.protos.PerfEvents.Timebase
                 * @instance
                 */
                Timebase.prototype.period = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Timebase counter.
                 * @member {perfetto.protos.PerfEvents.Counter} counter
                 * @memberof perfetto.protos.PerfEvents.Timebase
                 * @instance
                 */
                Timebase.prototype.counter = 0;

                /**
                 * Timebase tracepoint.
                 * @member {perfetto.protos.PerfEvents.ITracepoint|null|undefined} tracepoint
                 * @memberof perfetto.protos.PerfEvents.Timebase
                 * @instance
                 */
                Timebase.prototype.tracepoint = null;

                /**
                 * Timebase rawEvent.
                 * @member {perfetto.protos.PerfEvents.IRawEvent|null|undefined} rawEvent
                 * @memberof perfetto.protos.PerfEvents.Timebase
                 * @instance
                 */
                Timebase.prototype.rawEvent = null;

                /**
                 * Timebase timestampClock.
                 * @member {perfetto.protos.PerfEvents.PerfClock} timestampClock
                 * @memberof perfetto.protos.PerfEvents.Timebase
                 * @instance
                 */
                Timebase.prototype.timestampClock = 0;

                /**
                 * Timebase name.
                 * @member {string} name
                 * @memberof perfetto.protos.PerfEvents.Timebase
                 * @instance
                 */
                Timebase.prototype.name = "";

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * Timebase interval.
                 * @member {"frequency"|"period"|undefined} interval
                 * @memberof perfetto.protos.PerfEvents.Timebase
                 * @instance
                 */
                Object.defineProperty(Timebase.prototype, "interval", {
                    get: $util.oneOfGetter($oneOfFields = ["frequency", "period"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Timebase event.
                 * @member {"counter"|"tracepoint"|"rawEvent"|undefined} event
                 * @memberof perfetto.protos.PerfEvents.Timebase
                 * @instance
                 */
                Object.defineProperty(Timebase.prototype, "event", {
                    get: $util.oneOfGetter($oneOfFields = ["counter", "tracepoint", "rawEvent"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new Timebase instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.PerfEvents.Timebase
                 * @static
                 * @param {perfetto.protos.PerfEvents.ITimebase=} [properties] Properties to set
                 * @returns {perfetto.protos.PerfEvents.Timebase} Timebase instance
                 */
                Timebase.create = function create(properties) {
                    return new Timebase(properties);
                };

                /**
                 * Encodes the specified Timebase message. Does not implicitly {@link perfetto.protos.PerfEvents.Timebase.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.PerfEvents.Timebase
                 * @static
                 * @param {perfetto.protos.PerfEvents.ITimebase} m Timebase message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Timebase.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.period != null && Object.hasOwnProperty.call(m, "period"))
                        w.uint32(8).uint64(m.period);
                    if (m.frequency != null && Object.hasOwnProperty.call(m, "frequency"))
                        w.uint32(16).uint64(m.frequency);
                    if (m.tracepoint != null && Object.hasOwnProperty.call(m, "tracepoint"))
                        $root.perfetto.protos.PerfEvents.Tracepoint.encode(m.tracepoint, w.uint32(26).fork()).ldelim();
                    if (m.counter != null && Object.hasOwnProperty.call(m, "counter"))
                        w.uint32(32).int32(m.counter);
                    if (m.rawEvent != null && Object.hasOwnProperty.call(m, "rawEvent"))
                        $root.perfetto.protos.PerfEvents.RawEvent.encode(m.rawEvent, w.uint32(42).fork()).ldelim();
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(82).string(m.name);
                    if (m.timestampClock != null && Object.hasOwnProperty.call(m, "timestampClock"))
                        w.uint32(88).int32(m.timestampClock);
                    return w;
                };

                /**
                 * Encodes the specified Timebase message, length delimited. Does not implicitly {@link perfetto.protos.PerfEvents.Timebase.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.PerfEvents.Timebase
                 * @static
                 * @param {perfetto.protos.PerfEvents.ITimebase} message Timebase message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Timebase.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Timebase message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.PerfEvents.Timebase
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.PerfEvents.Timebase} Timebase
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Timebase.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.PerfEvents.Timebase();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 2:
                            m.frequency = r.uint64();
                            break;
                        case 1:
                            m.period = r.uint64();
                            break;
                        case 4:
                            m.counter = r.int32();
                            break;
                        case 3:
                            m.tracepoint = $root.perfetto.protos.PerfEvents.Tracepoint.decode(r, r.uint32());
                            break;
                        case 5:
                            m.rawEvent = $root.perfetto.protos.PerfEvents.RawEvent.decode(r, r.uint32());
                            break;
                        case 11:
                            m.timestampClock = r.int32();
                            break;
                        case 10:
                            m.name = r.string();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Timebase message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.PerfEvents.Timebase
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.PerfEvents.Timebase} Timebase
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Timebase.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Timebase message.
                 * @function verify
                 * @memberof perfetto.protos.PerfEvents.Timebase
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Timebase.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    var p = {};
                    if (m.frequency != null && m.hasOwnProperty("frequency")) {
                        p.interval = 1;
                        if (!$util.isInteger(m.frequency) && !(m.frequency && $util.isInteger(m.frequency.low) && $util.isInteger(m.frequency.high)))
                            return "frequency: integer|Long expected";
                    }
                    if (m.period != null && m.hasOwnProperty("period")) {
                        if (p.interval === 1)
                            return "interval: multiple values";
                        p.interval = 1;
                        if (!$util.isInteger(m.period) && !(m.period && $util.isInteger(m.period.low) && $util.isInteger(m.period.high)))
                            return "period: integer|Long expected";
                    }
                    if (m.counter != null && m.hasOwnProperty("counter")) {
                        p.event = 1;
                        switch (m.counter) {
                        default:
                            return "counter: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                        case 6:
                        case 7:
                        case 8:
                        case 9:
                        case 20:
                        case 10:
                        case 11:
                        case 12:
                        case 13:
                        case 14:
                        case 15:
                        case 16:
                        case 17:
                        case 18:
                        case 19:
                            break;
                        }
                    }
                    if (m.tracepoint != null && m.hasOwnProperty("tracepoint")) {
                        if (p.event === 1)
                            return "event: multiple values";
                        p.event = 1;
                        {
                            var e = $root.perfetto.protos.PerfEvents.Tracepoint.verify(m.tracepoint);
                            if (e)
                                return "tracepoint." + e;
                        }
                    }
                    if (m.rawEvent != null && m.hasOwnProperty("rawEvent")) {
                        if (p.event === 1)
                            return "event: multiple values";
                        p.event = 1;
                        {
                            var e = $root.perfetto.protos.PerfEvents.RawEvent.verify(m.rawEvent);
                            if (e)
                                return "rawEvent." + e;
                        }
                    }
                    if (m.timestampClock != null && m.hasOwnProperty("timestampClock")) {
                        switch (m.timestampClock) {
                        default:
                            return "timestampClock: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                            break;
                        }
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a Timebase message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.PerfEvents.Timebase
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.PerfEvents.Timebase} Timebase
                 */
                Timebase.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.PerfEvents.Timebase)
                        return d;
                    var m = new $root.perfetto.protos.PerfEvents.Timebase();
                    if (d.frequency != null) {
                        if ($util.Long)
                            (m.frequency = $util.Long.fromValue(d.frequency)).unsigned = true;
                        else if (typeof d.frequency === "string")
                            m.frequency = parseInt(d.frequency, 10);
                        else if (typeof d.frequency === "number")
                            m.frequency = d.frequency;
                        else if (typeof d.frequency === "object")
                            m.frequency = new $util.LongBits(d.frequency.low >>> 0, d.frequency.high >>> 0).toNumber(true);
                    }
                    if (d.period != null) {
                        if ($util.Long)
                            (m.period = $util.Long.fromValue(d.period)).unsigned = true;
                        else if (typeof d.period === "string")
                            m.period = parseInt(d.period, 10);
                        else if (typeof d.period === "number")
                            m.period = d.period;
                        else if (typeof d.period === "object")
                            m.period = new $util.LongBits(d.period.low >>> 0, d.period.high >>> 0).toNumber(true);
                    }
                    switch (d.counter) {
                    case "UNKNOWN_COUNTER":
                    case 0:
                        m.counter = 0;
                        break;
                    case "SW_CPU_CLOCK":
                    case 1:
                        m.counter = 1;
                        break;
                    case "SW_PAGE_FAULTS":
                    case 2:
                        m.counter = 2;
                        break;
                    case "SW_TASK_CLOCK":
                    case 3:
                        m.counter = 3;
                        break;
                    case "SW_CONTEXT_SWITCHES":
                    case 4:
                        m.counter = 4;
                        break;
                    case "SW_CPU_MIGRATIONS":
                    case 5:
                        m.counter = 5;
                        break;
                    case "SW_PAGE_FAULTS_MIN":
                    case 6:
                        m.counter = 6;
                        break;
                    case "SW_PAGE_FAULTS_MAJ":
                    case 7:
                        m.counter = 7;
                        break;
                    case "SW_ALIGNMENT_FAULTS":
                    case 8:
                        m.counter = 8;
                        break;
                    case "SW_EMULATION_FAULTS":
                    case 9:
                        m.counter = 9;
                        break;
                    case "SW_DUMMY":
                    case 20:
                        m.counter = 20;
                        break;
                    case "HW_CPU_CYCLES":
                    case 10:
                        m.counter = 10;
                        break;
                    case "HW_INSTRUCTIONS":
                    case 11:
                        m.counter = 11;
                        break;
                    case "HW_CACHE_REFERENCES":
                    case 12:
                        m.counter = 12;
                        break;
                    case "HW_CACHE_MISSES":
                    case 13:
                        m.counter = 13;
                        break;
                    case "HW_BRANCH_INSTRUCTIONS":
                    case 14:
                        m.counter = 14;
                        break;
                    case "HW_BRANCH_MISSES":
                    case 15:
                        m.counter = 15;
                        break;
                    case "HW_BUS_CYCLES":
                    case 16:
                        m.counter = 16;
                        break;
                    case "HW_STALLED_CYCLES_FRONTEND":
                    case 17:
                        m.counter = 17;
                        break;
                    case "HW_STALLED_CYCLES_BACKEND":
                    case 18:
                        m.counter = 18;
                        break;
                    case "HW_REF_CPU_CYCLES":
                    case 19:
                        m.counter = 19;
                        break;
                    }
                    if (d.tracepoint != null) {
                        if (typeof d.tracepoint !== "object")
                            throw TypeError(".perfetto.protos.PerfEvents.Timebase.tracepoint: object expected");
                        m.tracepoint = $root.perfetto.protos.PerfEvents.Tracepoint.fromObject(d.tracepoint);
                    }
                    if (d.rawEvent != null) {
                        if (typeof d.rawEvent !== "object")
                            throw TypeError(".perfetto.protos.PerfEvents.Timebase.rawEvent: object expected");
                        m.rawEvent = $root.perfetto.protos.PerfEvents.RawEvent.fromObject(d.rawEvent);
                    }
                    switch (d.timestampClock) {
                    case "UNKNOWN_PERF_CLOCK":
                    case 0:
                        m.timestampClock = 0;
                        break;
                    case "PERF_CLOCK_REALTIME":
                    case 1:
                        m.timestampClock = 1;
                        break;
                    case "PERF_CLOCK_MONOTONIC":
                    case 2:
                        m.timestampClock = 2;
                        break;
                    case "PERF_CLOCK_MONOTONIC_RAW":
                    case 3:
                        m.timestampClock = 3;
                        break;
                    case "PERF_CLOCK_BOOTTIME":
                    case 4:
                        m.timestampClock = 4;
                        break;
                    }
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Timebase message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.PerfEvents.Timebase
                 * @static
                 * @param {perfetto.protos.PerfEvents.Timebase} m Timebase
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Timebase.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.name = "";
                        d.timestampClock = o.enums === String ? "UNKNOWN_PERF_CLOCK" : 0;
                    }
                    if (m.period != null && m.hasOwnProperty("period")) {
                        if (typeof m.period === "number")
                            d.period = o.longs === String ? String(m.period) : m.period;
                        else
                            d.period = o.longs === String ? $util.Long.prototype.toString.call(m.period) : o.longs === Number ? new $util.LongBits(m.period.low >>> 0, m.period.high >>> 0).toNumber(true) : m.period;
                        if (o.oneofs)
                            d.interval = "period";
                    }
                    if (m.frequency != null && m.hasOwnProperty("frequency")) {
                        if (typeof m.frequency === "number")
                            d.frequency = o.longs === String ? String(m.frequency) : m.frequency;
                        else
                            d.frequency = o.longs === String ? $util.Long.prototype.toString.call(m.frequency) : o.longs === Number ? new $util.LongBits(m.frequency.low >>> 0, m.frequency.high >>> 0).toNumber(true) : m.frequency;
                        if (o.oneofs)
                            d.interval = "frequency";
                    }
                    if (m.tracepoint != null && m.hasOwnProperty("tracepoint")) {
                        d.tracepoint = $root.perfetto.protos.PerfEvents.Tracepoint.toObject(m.tracepoint, o);
                        if (o.oneofs)
                            d.event = "tracepoint";
                    }
                    if (m.counter != null && m.hasOwnProperty("counter")) {
                        d.counter = o.enums === String ? $root.perfetto.protos.PerfEvents.Counter[m.counter] : m.counter;
                        if (o.oneofs)
                            d.event = "counter";
                    }
                    if (m.rawEvent != null && m.hasOwnProperty("rawEvent")) {
                        d.rawEvent = $root.perfetto.protos.PerfEvents.RawEvent.toObject(m.rawEvent, o);
                        if (o.oneofs)
                            d.event = "rawEvent";
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    if (m.timestampClock != null && m.hasOwnProperty("timestampClock")) {
                        d.timestampClock = o.enums === String ? $root.perfetto.protos.PerfEvents.PerfClock[m.timestampClock] : m.timestampClock;
                    }
                    return d;
                };

                /**
                 * Converts this Timebase to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.PerfEvents.Timebase
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Timebase.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Timebase;
            })();

            /**
             * Counter enum.
             * @name perfetto.protos.PerfEvents.Counter
             * @enum {number}
             * @property {number} UNKNOWN_COUNTER=0 UNKNOWN_COUNTER value
             * @property {number} SW_CPU_CLOCK=1 SW_CPU_CLOCK value
             * @property {number} SW_PAGE_FAULTS=2 SW_PAGE_FAULTS value
             * @property {number} SW_TASK_CLOCK=3 SW_TASK_CLOCK value
             * @property {number} SW_CONTEXT_SWITCHES=4 SW_CONTEXT_SWITCHES value
             * @property {number} SW_CPU_MIGRATIONS=5 SW_CPU_MIGRATIONS value
             * @property {number} SW_PAGE_FAULTS_MIN=6 SW_PAGE_FAULTS_MIN value
             * @property {number} SW_PAGE_FAULTS_MAJ=7 SW_PAGE_FAULTS_MAJ value
             * @property {number} SW_ALIGNMENT_FAULTS=8 SW_ALIGNMENT_FAULTS value
             * @property {number} SW_EMULATION_FAULTS=9 SW_EMULATION_FAULTS value
             * @property {number} SW_DUMMY=20 SW_DUMMY value
             * @property {number} HW_CPU_CYCLES=10 HW_CPU_CYCLES value
             * @property {number} HW_INSTRUCTIONS=11 HW_INSTRUCTIONS value
             * @property {number} HW_CACHE_REFERENCES=12 HW_CACHE_REFERENCES value
             * @property {number} HW_CACHE_MISSES=13 HW_CACHE_MISSES value
             * @property {number} HW_BRANCH_INSTRUCTIONS=14 HW_BRANCH_INSTRUCTIONS value
             * @property {number} HW_BRANCH_MISSES=15 HW_BRANCH_MISSES value
             * @property {number} HW_BUS_CYCLES=16 HW_BUS_CYCLES value
             * @property {number} HW_STALLED_CYCLES_FRONTEND=17 HW_STALLED_CYCLES_FRONTEND value
             * @property {number} HW_STALLED_CYCLES_BACKEND=18 HW_STALLED_CYCLES_BACKEND value
             * @property {number} HW_REF_CPU_CYCLES=19 HW_REF_CPU_CYCLES value
             */
            PerfEvents.Counter = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN_COUNTER"] = 0;
                values[valuesById[1] = "SW_CPU_CLOCK"] = 1;
                values[valuesById[2] = "SW_PAGE_FAULTS"] = 2;
                values[valuesById[3] = "SW_TASK_CLOCK"] = 3;
                values[valuesById[4] = "SW_CONTEXT_SWITCHES"] = 4;
                values[valuesById[5] = "SW_CPU_MIGRATIONS"] = 5;
                values[valuesById[6] = "SW_PAGE_FAULTS_MIN"] = 6;
                values[valuesById[7] = "SW_PAGE_FAULTS_MAJ"] = 7;
                values[valuesById[8] = "SW_ALIGNMENT_FAULTS"] = 8;
                values[valuesById[9] = "SW_EMULATION_FAULTS"] = 9;
                values[valuesById[20] = "SW_DUMMY"] = 20;
                values[valuesById[10] = "HW_CPU_CYCLES"] = 10;
                values[valuesById[11] = "HW_INSTRUCTIONS"] = 11;
                values[valuesById[12] = "HW_CACHE_REFERENCES"] = 12;
                values[valuesById[13] = "HW_CACHE_MISSES"] = 13;
                values[valuesById[14] = "HW_BRANCH_INSTRUCTIONS"] = 14;
                values[valuesById[15] = "HW_BRANCH_MISSES"] = 15;
                values[valuesById[16] = "HW_BUS_CYCLES"] = 16;
                values[valuesById[17] = "HW_STALLED_CYCLES_FRONTEND"] = 17;
                values[valuesById[18] = "HW_STALLED_CYCLES_BACKEND"] = 18;
                values[valuesById[19] = "HW_REF_CPU_CYCLES"] = 19;
                return values;
            })();

            PerfEvents.Tracepoint = (function() {

                /**
                 * Properties of a Tracepoint.
                 * @memberof perfetto.protos.PerfEvents
                 * @interface ITracepoint
                 * @property {string|null} [name] Tracepoint name
                 * @property {string|null} [filter] Tracepoint filter
                 */

                /**
                 * Constructs a new Tracepoint.
                 * @memberof perfetto.protos.PerfEvents
                 * @classdesc Represents a Tracepoint.
                 * @implements ITracepoint
                 * @constructor
                 * @param {perfetto.protos.PerfEvents.ITracepoint=} [p] Properties to set
                 */
                function Tracepoint(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Tracepoint name.
                 * @member {string} name
                 * @memberof perfetto.protos.PerfEvents.Tracepoint
                 * @instance
                 */
                Tracepoint.prototype.name = "";

                /**
                 * Tracepoint filter.
                 * @member {string} filter
                 * @memberof perfetto.protos.PerfEvents.Tracepoint
                 * @instance
                 */
                Tracepoint.prototype.filter = "";

                /**
                 * Creates a new Tracepoint instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.PerfEvents.Tracepoint
                 * @static
                 * @param {perfetto.protos.PerfEvents.ITracepoint=} [properties] Properties to set
                 * @returns {perfetto.protos.PerfEvents.Tracepoint} Tracepoint instance
                 */
                Tracepoint.create = function create(properties) {
                    return new Tracepoint(properties);
                };

                /**
                 * Encodes the specified Tracepoint message. Does not implicitly {@link perfetto.protos.PerfEvents.Tracepoint.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.PerfEvents.Tracepoint
                 * @static
                 * @param {perfetto.protos.PerfEvents.ITracepoint} m Tracepoint message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Tracepoint.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(10).string(m.name);
                    if (m.filter != null && Object.hasOwnProperty.call(m, "filter"))
                        w.uint32(18).string(m.filter);
                    return w;
                };

                /**
                 * Encodes the specified Tracepoint message, length delimited. Does not implicitly {@link perfetto.protos.PerfEvents.Tracepoint.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.PerfEvents.Tracepoint
                 * @static
                 * @param {perfetto.protos.PerfEvents.ITracepoint} message Tracepoint message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Tracepoint.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Tracepoint message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.PerfEvents.Tracepoint
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.PerfEvents.Tracepoint} Tracepoint
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Tracepoint.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.PerfEvents.Tracepoint();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.name = r.string();
                            break;
                        case 2:
                            m.filter = r.string();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Tracepoint message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.PerfEvents.Tracepoint
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.PerfEvents.Tracepoint} Tracepoint
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Tracepoint.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Tracepoint message.
                 * @function verify
                 * @memberof perfetto.protos.PerfEvents.Tracepoint
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Tracepoint.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    if (m.filter != null && m.hasOwnProperty("filter")) {
                        if (!$util.isString(m.filter))
                            return "filter: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a Tracepoint message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.PerfEvents.Tracepoint
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.PerfEvents.Tracepoint} Tracepoint
                 */
                Tracepoint.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.PerfEvents.Tracepoint)
                        return d;
                    var m = new $root.perfetto.protos.PerfEvents.Tracepoint();
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    if (d.filter != null) {
                        m.filter = String(d.filter);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Tracepoint message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.PerfEvents.Tracepoint
                 * @static
                 * @param {perfetto.protos.PerfEvents.Tracepoint} m Tracepoint
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Tracepoint.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.name = "";
                        d.filter = "";
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    if (m.filter != null && m.hasOwnProperty("filter")) {
                        d.filter = m.filter;
                    }
                    return d;
                };

                /**
                 * Converts this Tracepoint to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.PerfEvents.Tracepoint
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Tracepoint.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Tracepoint;
            })();

            PerfEvents.RawEvent = (function() {

                /**
                 * Properties of a RawEvent.
                 * @memberof perfetto.protos.PerfEvents
                 * @interface IRawEvent
                 * @property {number|null} [type] RawEvent type
                 * @property {number|null} [config] RawEvent config
                 * @property {number|null} [config1] RawEvent config1
                 * @property {number|null} [config2] RawEvent config2
                 */

                /**
                 * Constructs a new RawEvent.
                 * @memberof perfetto.protos.PerfEvents
                 * @classdesc Represents a RawEvent.
                 * @implements IRawEvent
                 * @constructor
                 * @param {perfetto.protos.PerfEvents.IRawEvent=} [p] Properties to set
                 */
                function RawEvent(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * RawEvent type.
                 * @member {number} type
                 * @memberof perfetto.protos.PerfEvents.RawEvent
                 * @instance
                 */
                RawEvent.prototype.type = 0;

                /**
                 * RawEvent config.
                 * @member {number} config
                 * @memberof perfetto.protos.PerfEvents.RawEvent
                 * @instance
                 */
                RawEvent.prototype.config = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * RawEvent config1.
                 * @member {number} config1
                 * @memberof perfetto.protos.PerfEvents.RawEvent
                 * @instance
                 */
                RawEvent.prototype.config1 = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * RawEvent config2.
                 * @member {number} config2
                 * @memberof perfetto.protos.PerfEvents.RawEvent
                 * @instance
                 */
                RawEvent.prototype.config2 = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Creates a new RawEvent instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.PerfEvents.RawEvent
                 * @static
                 * @param {perfetto.protos.PerfEvents.IRawEvent=} [properties] Properties to set
                 * @returns {perfetto.protos.PerfEvents.RawEvent} RawEvent instance
                 */
                RawEvent.create = function create(properties) {
                    return new RawEvent(properties);
                };

                /**
                 * Encodes the specified RawEvent message. Does not implicitly {@link perfetto.protos.PerfEvents.RawEvent.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.PerfEvents.RawEvent
                 * @static
                 * @param {perfetto.protos.PerfEvents.IRawEvent} m RawEvent message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                RawEvent.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                        w.uint32(8).uint32(m.type);
                    if (m.config != null && Object.hasOwnProperty.call(m, "config"))
                        w.uint32(16).uint64(m.config);
                    if (m.config1 != null && Object.hasOwnProperty.call(m, "config1"))
                        w.uint32(24).uint64(m.config1);
                    if (m.config2 != null && Object.hasOwnProperty.call(m, "config2"))
                        w.uint32(32).uint64(m.config2);
                    return w;
                };

                /**
                 * Encodes the specified RawEvent message, length delimited. Does not implicitly {@link perfetto.protos.PerfEvents.RawEvent.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.PerfEvents.RawEvent
                 * @static
                 * @param {perfetto.protos.PerfEvents.IRawEvent} message RawEvent message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                RawEvent.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a RawEvent message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.PerfEvents.RawEvent
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.PerfEvents.RawEvent} RawEvent
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                RawEvent.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.PerfEvents.RawEvent();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.type = r.uint32();
                            break;
                        case 2:
                            m.config = r.uint64();
                            break;
                        case 3:
                            m.config1 = r.uint64();
                            break;
                        case 4:
                            m.config2 = r.uint64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a RawEvent message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.PerfEvents.RawEvent
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.PerfEvents.RawEvent} RawEvent
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                RawEvent.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a RawEvent message.
                 * @function verify
                 * @memberof perfetto.protos.PerfEvents.RawEvent
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                RawEvent.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.type != null && m.hasOwnProperty("type")) {
                        if (!$util.isInteger(m.type))
                            return "type: integer expected";
                    }
                    if (m.config != null && m.hasOwnProperty("config")) {
                        if (!$util.isInteger(m.config) && !(m.config && $util.isInteger(m.config.low) && $util.isInteger(m.config.high)))
                            return "config: integer|Long expected";
                    }
                    if (m.config1 != null && m.hasOwnProperty("config1")) {
                        if (!$util.isInteger(m.config1) && !(m.config1 && $util.isInteger(m.config1.low) && $util.isInteger(m.config1.high)))
                            return "config1: integer|Long expected";
                    }
                    if (m.config2 != null && m.hasOwnProperty("config2")) {
                        if (!$util.isInteger(m.config2) && !(m.config2 && $util.isInteger(m.config2.low) && $util.isInteger(m.config2.high)))
                            return "config2: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a RawEvent message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.PerfEvents.RawEvent
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.PerfEvents.RawEvent} RawEvent
                 */
                RawEvent.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.PerfEvents.RawEvent)
                        return d;
                    var m = new $root.perfetto.protos.PerfEvents.RawEvent();
                    if (d.type != null) {
                        m.type = d.type >>> 0;
                    }
                    if (d.config != null) {
                        if ($util.Long)
                            (m.config = $util.Long.fromValue(d.config)).unsigned = true;
                        else if (typeof d.config === "string")
                            m.config = parseInt(d.config, 10);
                        else if (typeof d.config === "number")
                            m.config = d.config;
                        else if (typeof d.config === "object")
                            m.config = new $util.LongBits(d.config.low >>> 0, d.config.high >>> 0).toNumber(true);
                    }
                    if (d.config1 != null) {
                        if ($util.Long)
                            (m.config1 = $util.Long.fromValue(d.config1)).unsigned = true;
                        else if (typeof d.config1 === "string")
                            m.config1 = parseInt(d.config1, 10);
                        else if (typeof d.config1 === "number")
                            m.config1 = d.config1;
                        else if (typeof d.config1 === "object")
                            m.config1 = new $util.LongBits(d.config1.low >>> 0, d.config1.high >>> 0).toNumber(true);
                    }
                    if (d.config2 != null) {
                        if ($util.Long)
                            (m.config2 = $util.Long.fromValue(d.config2)).unsigned = true;
                        else if (typeof d.config2 === "string")
                            m.config2 = parseInt(d.config2, 10);
                        else if (typeof d.config2 === "number")
                            m.config2 = d.config2;
                        else if (typeof d.config2 === "object")
                            m.config2 = new $util.LongBits(d.config2.low >>> 0, d.config2.high >>> 0).toNumber(true);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a RawEvent message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.PerfEvents.RawEvent
                 * @static
                 * @param {perfetto.protos.PerfEvents.RawEvent} m RawEvent
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                RawEvent.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.type = 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.config = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.config = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.config1 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.config1 = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.config2 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.config2 = o.longs === String ? "0" : 0;
                    }
                    if (m.type != null && m.hasOwnProperty("type")) {
                        d.type = m.type;
                    }
                    if (m.config != null && m.hasOwnProperty("config")) {
                        if (typeof m.config === "number")
                            d.config = o.longs === String ? String(m.config) : m.config;
                        else
                            d.config = o.longs === String ? $util.Long.prototype.toString.call(m.config) : o.longs === Number ? new $util.LongBits(m.config.low >>> 0, m.config.high >>> 0).toNumber(true) : m.config;
                    }
                    if (m.config1 != null && m.hasOwnProperty("config1")) {
                        if (typeof m.config1 === "number")
                            d.config1 = o.longs === String ? String(m.config1) : m.config1;
                        else
                            d.config1 = o.longs === String ? $util.Long.prototype.toString.call(m.config1) : o.longs === Number ? new $util.LongBits(m.config1.low >>> 0, m.config1.high >>> 0).toNumber(true) : m.config1;
                    }
                    if (m.config2 != null && m.hasOwnProperty("config2")) {
                        if (typeof m.config2 === "number")
                            d.config2 = o.longs === String ? String(m.config2) : m.config2;
                        else
                            d.config2 = o.longs === String ? $util.Long.prototype.toString.call(m.config2) : o.longs === Number ? new $util.LongBits(m.config2.low >>> 0, m.config2.high >>> 0).toNumber(true) : m.config2;
                    }
                    return d;
                };

                /**
                 * Converts this RawEvent to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.PerfEvents.RawEvent
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                RawEvent.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return RawEvent;
            })();

            /**
             * PerfClock enum.
             * @name perfetto.protos.PerfEvents.PerfClock
             * @enum {number}
             * @property {number} UNKNOWN_PERF_CLOCK=0 UNKNOWN_PERF_CLOCK value
             * @property {number} PERF_CLOCK_REALTIME=1 PERF_CLOCK_REALTIME value
             * @property {number} PERF_CLOCK_MONOTONIC=2 PERF_CLOCK_MONOTONIC value
             * @property {number} PERF_CLOCK_MONOTONIC_RAW=3 PERF_CLOCK_MONOTONIC_RAW value
             * @property {number} PERF_CLOCK_BOOTTIME=4 PERF_CLOCK_BOOTTIME value
             */
            PerfEvents.PerfClock = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNKNOWN_PERF_CLOCK"] = 0;
                values[valuesById[1] = "PERF_CLOCK_REALTIME"] = 1;
                values[valuesById[2] = "PERF_CLOCK_MONOTONIC"] = 2;
                values[valuesById[3] = "PERF_CLOCK_MONOTONIC_RAW"] = 3;
                values[valuesById[4] = "PERF_CLOCK_BOOTTIME"] = 4;
                return values;
            })();

            return PerfEvents;
        })();

        protos.PerfEventConfig = (function() {

            /**
             * Properties of a PerfEventConfig.
             * @memberof perfetto.protos
             * @interface IPerfEventConfig
             * @property {perfetto.protos.PerfEvents.ITimebase|null} [timebase] PerfEventConfig timebase
             * @property {perfetto.protos.PerfEventConfig.ICallstackSampling|null} [callstackSampling] PerfEventConfig callstackSampling
             * @property {number|null} [ringBufferReadPeriodMs] PerfEventConfig ringBufferReadPeriodMs
             * @property {number|null} [ringBufferPages] PerfEventConfig ringBufferPages
             * @property {number|null} [maxEnqueuedFootprintKb] PerfEventConfig maxEnqueuedFootprintKb
             * @property {number|null} [maxDaemonMemoryKb] PerfEventConfig maxDaemonMemoryKb
             * @property {number|null} [remoteDescriptorTimeoutMs] PerfEventConfig remoteDescriptorTimeoutMs
             * @property {number|null} [unwindStateClearPeriodMs] PerfEventConfig unwindStateClearPeriodMs
             * @property {Array.<string>|null} [targetInstalledBy] PerfEventConfig targetInstalledBy
             * @property {boolean|null} [allCpus] PerfEventConfig allCpus
             * @property {number|null} [samplingFrequency] PerfEventConfig samplingFrequency
             * @property {boolean|null} [kernelFrames] PerfEventConfig kernelFrames
             * @property {Array.<number>|null} [targetPid] PerfEventConfig targetPid
             * @property {Array.<string>|null} [targetCmdline] PerfEventConfig targetCmdline
             * @property {Array.<number>|null} [excludePid] PerfEventConfig excludePid
             * @property {Array.<string>|null} [excludeCmdline] PerfEventConfig excludeCmdline
             * @property {number|null} [additionalCmdlineCount] PerfEventConfig additionalCmdlineCount
             */

            /**
             * Constructs a new PerfEventConfig.
             * @memberof perfetto.protos
             * @classdesc Represents a PerfEventConfig.
             * @implements IPerfEventConfig
             * @constructor
             * @param {perfetto.protos.IPerfEventConfig=} [p] Properties to set
             */
            function PerfEventConfig(p) {
                this.targetInstalledBy = [];
                this.targetPid = [];
                this.targetCmdline = [];
                this.excludePid = [];
                this.excludeCmdline = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * PerfEventConfig timebase.
             * @member {perfetto.protos.PerfEvents.ITimebase|null|undefined} timebase
             * @memberof perfetto.protos.PerfEventConfig
             * @instance
             */
            PerfEventConfig.prototype.timebase = null;

            /**
             * PerfEventConfig callstackSampling.
             * @member {perfetto.protos.PerfEventConfig.ICallstackSampling|null|undefined} callstackSampling
             * @memberof perfetto.protos.PerfEventConfig
             * @instance
             */
            PerfEventConfig.prototype.callstackSampling = null;

            /**
             * PerfEventConfig ringBufferReadPeriodMs.
             * @member {number} ringBufferReadPeriodMs
             * @memberof perfetto.protos.PerfEventConfig
             * @instance
             */
            PerfEventConfig.prototype.ringBufferReadPeriodMs = 0;

            /**
             * PerfEventConfig ringBufferPages.
             * @member {number} ringBufferPages
             * @memberof perfetto.protos.PerfEventConfig
             * @instance
             */
            PerfEventConfig.prototype.ringBufferPages = 0;

            /**
             * PerfEventConfig maxEnqueuedFootprintKb.
             * @member {number} maxEnqueuedFootprintKb
             * @memberof perfetto.protos.PerfEventConfig
             * @instance
             */
            PerfEventConfig.prototype.maxEnqueuedFootprintKb = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * PerfEventConfig maxDaemonMemoryKb.
             * @member {number} maxDaemonMemoryKb
             * @memberof perfetto.protos.PerfEventConfig
             * @instance
             */
            PerfEventConfig.prototype.maxDaemonMemoryKb = 0;

            /**
             * PerfEventConfig remoteDescriptorTimeoutMs.
             * @member {number} remoteDescriptorTimeoutMs
             * @memberof perfetto.protos.PerfEventConfig
             * @instance
             */
            PerfEventConfig.prototype.remoteDescriptorTimeoutMs = 0;

            /**
             * PerfEventConfig unwindStateClearPeriodMs.
             * @member {number} unwindStateClearPeriodMs
             * @memberof perfetto.protos.PerfEventConfig
             * @instance
             */
            PerfEventConfig.prototype.unwindStateClearPeriodMs = 0;

            /**
             * PerfEventConfig targetInstalledBy.
             * @member {Array.<string>} targetInstalledBy
             * @memberof perfetto.protos.PerfEventConfig
             * @instance
             */
            PerfEventConfig.prototype.targetInstalledBy = $util.emptyArray;

            /**
             * PerfEventConfig allCpus.
             * @member {boolean} allCpus
             * @memberof perfetto.protos.PerfEventConfig
             * @instance
             */
            PerfEventConfig.prototype.allCpus = false;

            /**
             * PerfEventConfig samplingFrequency.
             * @member {number} samplingFrequency
             * @memberof perfetto.protos.PerfEventConfig
             * @instance
             */
            PerfEventConfig.prototype.samplingFrequency = 0;

            /**
             * PerfEventConfig kernelFrames.
             * @member {boolean} kernelFrames
             * @memberof perfetto.protos.PerfEventConfig
             * @instance
             */
            PerfEventConfig.prototype.kernelFrames = false;

            /**
             * PerfEventConfig targetPid.
             * @member {Array.<number>} targetPid
             * @memberof perfetto.protos.PerfEventConfig
             * @instance
             */
            PerfEventConfig.prototype.targetPid = $util.emptyArray;

            /**
             * PerfEventConfig targetCmdline.
             * @member {Array.<string>} targetCmdline
             * @memberof perfetto.protos.PerfEventConfig
             * @instance
             */
            PerfEventConfig.prototype.targetCmdline = $util.emptyArray;

            /**
             * PerfEventConfig excludePid.
             * @member {Array.<number>} excludePid
             * @memberof perfetto.protos.PerfEventConfig
             * @instance
             */
            PerfEventConfig.prototype.excludePid = $util.emptyArray;

            /**
             * PerfEventConfig excludeCmdline.
             * @member {Array.<string>} excludeCmdline
             * @memberof perfetto.protos.PerfEventConfig
             * @instance
             */
            PerfEventConfig.prototype.excludeCmdline = $util.emptyArray;

            /**
             * PerfEventConfig additionalCmdlineCount.
             * @member {number} additionalCmdlineCount
             * @memberof perfetto.protos.PerfEventConfig
             * @instance
             */
            PerfEventConfig.prototype.additionalCmdlineCount = 0;

            /**
             * Creates a new PerfEventConfig instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.PerfEventConfig
             * @static
             * @param {perfetto.protos.IPerfEventConfig=} [properties] Properties to set
             * @returns {perfetto.protos.PerfEventConfig} PerfEventConfig instance
             */
            PerfEventConfig.create = function create(properties) {
                return new PerfEventConfig(properties);
            };

            /**
             * Encodes the specified PerfEventConfig message. Does not implicitly {@link perfetto.protos.PerfEventConfig.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.PerfEventConfig
             * @static
             * @param {perfetto.protos.IPerfEventConfig} m PerfEventConfig message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PerfEventConfig.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.allCpus != null && Object.hasOwnProperty.call(m, "allCpus"))
                    w.uint32(8).bool(m.allCpus);
                if (m.samplingFrequency != null && Object.hasOwnProperty.call(m, "samplingFrequency"))
                    w.uint32(16).uint32(m.samplingFrequency);
                if (m.ringBufferPages != null && Object.hasOwnProperty.call(m, "ringBufferPages"))
                    w.uint32(24).uint32(m.ringBufferPages);
                if (m.targetPid != null && m.targetPid.length) {
                    for (var i = 0; i < m.targetPid.length; ++i)
                        w.uint32(32).int32(m.targetPid[i]);
                }
                if (m.targetCmdline != null && m.targetCmdline.length) {
                    for (var i = 0; i < m.targetCmdline.length; ++i)
                        w.uint32(42).string(m.targetCmdline[i]);
                }
                if (m.excludePid != null && m.excludePid.length) {
                    for (var i = 0; i < m.excludePid.length; ++i)
                        w.uint32(48).int32(m.excludePid[i]);
                }
                if (m.excludeCmdline != null && m.excludeCmdline.length) {
                    for (var i = 0; i < m.excludeCmdline.length; ++i)
                        w.uint32(58).string(m.excludeCmdline[i]);
                }
                if (m.ringBufferReadPeriodMs != null && Object.hasOwnProperty.call(m, "ringBufferReadPeriodMs"))
                    w.uint32(64).uint32(m.ringBufferReadPeriodMs);
                if (m.remoteDescriptorTimeoutMs != null && Object.hasOwnProperty.call(m, "remoteDescriptorTimeoutMs"))
                    w.uint32(72).uint32(m.remoteDescriptorTimeoutMs);
                if (m.unwindStateClearPeriodMs != null && Object.hasOwnProperty.call(m, "unwindStateClearPeriodMs"))
                    w.uint32(80).uint32(m.unwindStateClearPeriodMs);
                if (m.additionalCmdlineCount != null && Object.hasOwnProperty.call(m, "additionalCmdlineCount"))
                    w.uint32(88).uint32(m.additionalCmdlineCount);
                if (m.kernelFrames != null && Object.hasOwnProperty.call(m, "kernelFrames"))
                    w.uint32(96).bool(m.kernelFrames);
                if (m.maxDaemonMemoryKb != null && Object.hasOwnProperty.call(m, "maxDaemonMemoryKb"))
                    w.uint32(104).uint32(m.maxDaemonMemoryKb);
                if (m.timebase != null && Object.hasOwnProperty.call(m, "timebase"))
                    $root.perfetto.protos.PerfEvents.Timebase.encode(m.timebase, w.uint32(122).fork()).ldelim();
                if (m.callstackSampling != null && Object.hasOwnProperty.call(m, "callstackSampling"))
                    $root.perfetto.protos.PerfEventConfig.CallstackSampling.encode(m.callstackSampling, w.uint32(130).fork()).ldelim();
                if (m.maxEnqueuedFootprintKb != null && Object.hasOwnProperty.call(m, "maxEnqueuedFootprintKb"))
                    w.uint32(136).uint64(m.maxEnqueuedFootprintKb);
                if (m.targetInstalledBy != null && m.targetInstalledBy.length) {
                    for (var i = 0; i < m.targetInstalledBy.length; ++i)
                        w.uint32(146).string(m.targetInstalledBy[i]);
                }
                return w;
            };

            /**
             * Encodes the specified PerfEventConfig message, length delimited. Does not implicitly {@link perfetto.protos.PerfEventConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.PerfEventConfig
             * @static
             * @param {perfetto.protos.IPerfEventConfig} message PerfEventConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PerfEventConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a PerfEventConfig message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.PerfEventConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.PerfEventConfig} PerfEventConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PerfEventConfig.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.PerfEventConfig();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 15:
                        m.timebase = $root.perfetto.protos.PerfEvents.Timebase.decode(r, r.uint32());
                        break;
                    case 16:
                        m.callstackSampling = $root.perfetto.protos.PerfEventConfig.CallstackSampling.decode(r, r.uint32());
                        break;
                    case 8:
                        m.ringBufferReadPeriodMs = r.uint32();
                        break;
                    case 3:
                        m.ringBufferPages = r.uint32();
                        break;
                    case 17:
                        m.maxEnqueuedFootprintKb = r.uint64();
                        break;
                    case 13:
                        m.maxDaemonMemoryKb = r.uint32();
                        break;
                    case 9:
                        m.remoteDescriptorTimeoutMs = r.uint32();
                        break;
                    case 10:
                        m.unwindStateClearPeriodMs = r.uint32();
                        break;
                    case 18:
                        if (!(m.targetInstalledBy && m.targetInstalledBy.length))
                            m.targetInstalledBy = [];
                        m.targetInstalledBy.push(r.string());
                        break;
                    case 1:
                        m.allCpus = r.bool();
                        break;
                    case 2:
                        m.samplingFrequency = r.uint32();
                        break;
                    case 12:
                        m.kernelFrames = r.bool();
                        break;
                    case 4:
                        if (!(m.targetPid && m.targetPid.length))
                            m.targetPid = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.targetPid.push(r.int32());
                        } else
                            m.targetPid.push(r.int32());
                        break;
                    case 5:
                        if (!(m.targetCmdline && m.targetCmdline.length))
                            m.targetCmdline = [];
                        m.targetCmdline.push(r.string());
                        break;
                    case 6:
                        if (!(m.excludePid && m.excludePid.length))
                            m.excludePid = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.excludePid.push(r.int32());
                        } else
                            m.excludePid.push(r.int32());
                        break;
                    case 7:
                        if (!(m.excludeCmdline && m.excludeCmdline.length))
                            m.excludeCmdline = [];
                        m.excludeCmdline.push(r.string());
                        break;
                    case 11:
                        m.additionalCmdlineCount = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a PerfEventConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.PerfEventConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.PerfEventConfig} PerfEventConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PerfEventConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a PerfEventConfig message.
             * @function verify
             * @memberof perfetto.protos.PerfEventConfig
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            PerfEventConfig.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.timebase != null && m.hasOwnProperty("timebase")) {
                    {
                        var e = $root.perfetto.protos.PerfEvents.Timebase.verify(m.timebase);
                        if (e)
                            return "timebase." + e;
                    }
                }
                if (m.callstackSampling != null && m.hasOwnProperty("callstackSampling")) {
                    {
                        var e = $root.perfetto.protos.PerfEventConfig.CallstackSampling.verify(m.callstackSampling);
                        if (e)
                            return "callstackSampling." + e;
                    }
                }
                if (m.ringBufferReadPeriodMs != null && m.hasOwnProperty("ringBufferReadPeriodMs")) {
                    if (!$util.isInteger(m.ringBufferReadPeriodMs))
                        return "ringBufferReadPeriodMs: integer expected";
                }
                if (m.ringBufferPages != null && m.hasOwnProperty("ringBufferPages")) {
                    if (!$util.isInteger(m.ringBufferPages))
                        return "ringBufferPages: integer expected";
                }
                if (m.maxEnqueuedFootprintKb != null && m.hasOwnProperty("maxEnqueuedFootprintKb")) {
                    if (!$util.isInteger(m.maxEnqueuedFootprintKb) && !(m.maxEnqueuedFootprintKb && $util.isInteger(m.maxEnqueuedFootprintKb.low) && $util.isInteger(m.maxEnqueuedFootprintKb.high)))
                        return "maxEnqueuedFootprintKb: integer|Long expected";
                }
                if (m.maxDaemonMemoryKb != null && m.hasOwnProperty("maxDaemonMemoryKb")) {
                    if (!$util.isInteger(m.maxDaemonMemoryKb))
                        return "maxDaemonMemoryKb: integer expected";
                }
                if (m.remoteDescriptorTimeoutMs != null && m.hasOwnProperty("remoteDescriptorTimeoutMs")) {
                    if (!$util.isInteger(m.remoteDescriptorTimeoutMs))
                        return "remoteDescriptorTimeoutMs: integer expected";
                }
                if (m.unwindStateClearPeriodMs != null && m.hasOwnProperty("unwindStateClearPeriodMs")) {
                    if (!$util.isInteger(m.unwindStateClearPeriodMs))
                        return "unwindStateClearPeriodMs: integer expected";
                }
                if (m.targetInstalledBy != null && m.hasOwnProperty("targetInstalledBy")) {
                    if (!Array.isArray(m.targetInstalledBy))
                        return "targetInstalledBy: array expected";
                    for (var i = 0; i < m.targetInstalledBy.length; ++i) {
                        if (!$util.isString(m.targetInstalledBy[i]))
                            return "targetInstalledBy: string[] expected";
                    }
                }
                if (m.allCpus != null && m.hasOwnProperty("allCpus")) {
                    if (typeof m.allCpus !== "boolean")
                        return "allCpus: boolean expected";
                }
                if (m.samplingFrequency != null && m.hasOwnProperty("samplingFrequency")) {
                    if (!$util.isInteger(m.samplingFrequency))
                        return "samplingFrequency: integer expected";
                }
                if (m.kernelFrames != null && m.hasOwnProperty("kernelFrames")) {
                    if (typeof m.kernelFrames !== "boolean")
                        return "kernelFrames: boolean expected";
                }
                if (m.targetPid != null && m.hasOwnProperty("targetPid")) {
                    if (!Array.isArray(m.targetPid))
                        return "targetPid: array expected";
                    for (var i = 0; i < m.targetPid.length; ++i) {
                        if (!$util.isInteger(m.targetPid[i]))
                            return "targetPid: integer[] expected";
                    }
                }
                if (m.targetCmdline != null && m.hasOwnProperty("targetCmdline")) {
                    if (!Array.isArray(m.targetCmdline))
                        return "targetCmdline: array expected";
                    for (var i = 0; i < m.targetCmdline.length; ++i) {
                        if (!$util.isString(m.targetCmdline[i]))
                            return "targetCmdline: string[] expected";
                    }
                }
                if (m.excludePid != null && m.hasOwnProperty("excludePid")) {
                    if (!Array.isArray(m.excludePid))
                        return "excludePid: array expected";
                    for (var i = 0; i < m.excludePid.length; ++i) {
                        if (!$util.isInteger(m.excludePid[i]))
                            return "excludePid: integer[] expected";
                    }
                }
                if (m.excludeCmdline != null && m.hasOwnProperty("excludeCmdline")) {
                    if (!Array.isArray(m.excludeCmdline))
                        return "excludeCmdline: array expected";
                    for (var i = 0; i < m.excludeCmdline.length; ++i) {
                        if (!$util.isString(m.excludeCmdline[i]))
                            return "excludeCmdline: string[] expected";
                    }
                }
                if (m.additionalCmdlineCount != null && m.hasOwnProperty("additionalCmdlineCount")) {
                    if (!$util.isInteger(m.additionalCmdlineCount))
                        return "additionalCmdlineCount: integer expected";
                }
                return null;
            };

            /**
             * Creates a PerfEventConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.PerfEventConfig
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.PerfEventConfig} PerfEventConfig
             */
            PerfEventConfig.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.PerfEventConfig)
                    return d;
                var m = new $root.perfetto.protos.PerfEventConfig();
                if (d.timebase != null) {
                    if (typeof d.timebase !== "object")
                        throw TypeError(".perfetto.protos.PerfEventConfig.timebase: object expected");
                    m.timebase = $root.perfetto.protos.PerfEvents.Timebase.fromObject(d.timebase);
                }
                if (d.callstackSampling != null) {
                    if (typeof d.callstackSampling !== "object")
                        throw TypeError(".perfetto.protos.PerfEventConfig.callstackSampling: object expected");
                    m.callstackSampling = $root.perfetto.protos.PerfEventConfig.CallstackSampling.fromObject(d.callstackSampling);
                }
                if (d.ringBufferReadPeriodMs != null) {
                    m.ringBufferReadPeriodMs = d.ringBufferReadPeriodMs >>> 0;
                }
                if (d.ringBufferPages != null) {
                    m.ringBufferPages = d.ringBufferPages >>> 0;
                }
                if (d.maxEnqueuedFootprintKb != null) {
                    if ($util.Long)
                        (m.maxEnqueuedFootprintKb = $util.Long.fromValue(d.maxEnqueuedFootprintKb)).unsigned = true;
                    else if (typeof d.maxEnqueuedFootprintKb === "string")
                        m.maxEnqueuedFootprintKb = parseInt(d.maxEnqueuedFootprintKb, 10);
                    else if (typeof d.maxEnqueuedFootprintKb === "number")
                        m.maxEnqueuedFootprintKb = d.maxEnqueuedFootprintKb;
                    else if (typeof d.maxEnqueuedFootprintKb === "object")
                        m.maxEnqueuedFootprintKb = new $util.LongBits(d.maxEnqueuedFootprintKb.low >>> 0, d.maxEnqueuedFootprintKb.high >>> 0).toNumber(true);
                }
                if (d.maxDaemonMemoryKb != null) {
                    m.maxDaemonMemoryKb = d.maxDaemonMemoryKb >>> 0;
                }
                if (d.remoteDescriptorTimeoutMs != null) {
                    m.remoteDescriptorTimeoutMs = d.remoteDescriptorTimeoutMs >>> 0;
                }
                if (d.unwindStateClearPeriodMs != null) {
                    m.unwindStateClearPeriodMs = d.unwindStateClearPeriodMs >>> 0;
                }
                if (d.targetInstalledBy) {
                    if (!Array.isArray(d.targetInstalledBy))
                        throw TypeError(".perfetto.protos.PerfEventConfig.targetInstalledBy: array expected");
                    m.targetInstalledBy = [];
                    for (var i = 0; i < d.targetInstalledBy.length; ++i) {
                        m.targetInstalledBy[i] = String(d.targetInstalledBy[i]);
                    }
                }
                if (d.allCpus != null) {
                    m.allCpus = Boolean(d.allCpus);
                }
                if (d.samplingFrequency != null) {
                    m.samplingFrequency = d.samplingFrequency >>> 0;
                }
                if (d.kernelFrames != null) {
                    m.kernelFrames = Boolean(d.kernelFrames);
                }
                if (d.targetPid) {
                    if (!Array.isArray(d.targetPid))
                        throw TypeError(".perfetto.protos.PerfEventConfig.targetPid: array expected");
                    m.targetPid = [];
                    for (var i = 0; i < d.targetPid.length; ++i) {
                        m.targetPid[i] = d.targetPid[i] | 0;
                    }
                }
                if (d.targetCmdline) {
                    if (!Array.isArray(d.targetCmdline))
                        throw TypeError(".perfetto.protos.PerfEventConfig.targetCmdline: array expected");
                    m.targetCmdline = [];
                    for (var i = 0; i < d.targetCmdline.length; ++i) {
                        m.targetCmdline[i] = String(d.targetCmdline[i]);
                    }
                }
                if (d.excludePid) {
                    if (!Array.isArray(d.excludePid))
                        throw TypeError(".perfetto.protos.PerfEventConfig.excludePid: array expected");
                    m.excludePid = [];
                    for (var i = 0; i < d.excludePid.length; ++i) {
                        m.excludePid[i] = d.excludePid[i] | 0;
                    }
                }
                if (d.excludeCmdline) {
                    if (!Array.isArray(d.excludeCmdline))
                        throw TypeError(".perfetto.protos.PerfEventConfig.excludeCmdline: array expected");
                    m.excludeCmdline = [];
                    for (var i = 0; i < d.excludeCmdline.length; ++i) {
                        m.excludeCmdline[i] = String(d.excludeCmdline[i]);
                    }
                }
                if (d.additionalCmdlineCount != null) {
                    m.additionalCmdlineCount = d.additionalCmdlineCount >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a PerfEventConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.PerfEventConfig
             * @static
             * @param {perfetto.protos.PerfEventConfig} m PerfEventConfig
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            PerfEventConfig.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.targetPid = [];
                    d.targetCmdline = [];
                    d.excludePid = [];
                    d.excludeCmdline = [];
                    d.targetInstalledBy = [];
                }
                if (o.defaults) {
                    d.allCpus = false;
                    d.samplingFrequency = 0;
                    d.ringBufferPages = 0;
                    d.ringBufferReadPeriodMs = 0;
                    d.remoteDescriptorTimeoutMs = 0;
                    d.unwindStateClearPeriodMs = 0;
                    d.additionalCmdlineCount = 0;
                    d.kernelFrames = false;
                    d.maxDaemonMemoryKb = 0;
                    d.timebase = null;
                    d.callstackSampling = null;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.maxEnqueuedFootprintKb = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.maxEnqueuedFootprintKb = o.longs === String ? "0" : 0;
                }
                if (m.allCpus != null && m.hasOwnProperty("allCpus")) {
                    d.allCpus = m.allCpus;
                }
                if (m.samplingFrequency != null && m.hasOwnProperty("samplingFrequency")) {
                    d.samplingFrequency = m.samplingFrequency;
                }
                if (m.ringBufferPages != null && m.hasOwnProperty("ringBufferPages")) {
                    d.ringBufferPages = m.ringBufferPages;
                }
                if (m.targetPid && m.targetPid.length) {
                    d.targetPid = [];
                    for (var j = 0; j < m.targetPid.length; ++j) {
                        d.targetPid[j] = m.targetPid[j];
                    }
                }
                if (m.targetCmdline && m.targetCmdline.length) {
                    d.targetCmdline = [];
                    for (var j = 0; j < m.targetCmdline.length; ++j) {
                        d.targetCmdline[j] = m.targetCmdline[j];
                    }
                }
                if (m.excludePid && m.excludePid.length) {
                    d.excludePid = [];
                    for (var j = 0; j < m.excludePid.length; ++j) {
                        d.excludePid[j] = m.excludePid[j];
                    }
                }
                if (m.excludeCmdline && m.excludeCmdline.length) {
                    d.excludeCmdline = [];
                    for (var j = 0; j < m.excludeCmdline.length; ++j) {
                        d.excludeCmdline[j] = m.excludeCmdline[j];
                    }
                }
                if (m.ringBufferReadPeriodMs != null && m.hasOwnProperty("ringBufferReadPeriodMs")) {
                    d.ringBufferReadPeriodMs = m.ringBufferReadPeriodMs;
                }
                if (m.remoteDescriptorTimeoutMs != null && m.hasOwnProperty("remoteDescriptorTimeoutMs")) {
                    d.remoteDescriptorTimeoutMs = m.remoteDescriptorTimeoutMs;
                }
                if (m.unwindStateClearPeriodMs != null && m.hasOwnProperty("unwindStateClearPeriodMs")) {
                    d.unwindStateClearPeriodMs = m.unwindStateClearPeriodMs;
                }
                if (m.additionalCmdlineCount != null && m.hasOwnProperty("additionalCmdlineCount")) {
                    d.additionalCmdlineCount = m.additionalCmdlineCount;
                }
                if (m.kernelFrames != null && m.hasOwnProperty("kernelFrames")) {
                    d.kernelFrames = m.kernelFrames;
                }
                if (m.maxDaemonMemoryKb != null && m.hasOwnProperty("maxDaemonMemoryKb")) {
                    d.maxDaemonMemoryKb = m.maxDaemonMemoryKb;
                }
                if (m.timebase != null && m.hasOwnProperty("timebase")) {
                    d.timebase = $root.perfetto.protos.PerfEvents.Timebase.toObject(m.timebase, o);
                }
                if (m.callstackSampling != null && m.hasOwnProperty("callstackSampling")) {
                    d.callstackSampling = $root.perfetto.protos.PerfEventConfig.CallstackSampling.toObject(m.callstackSampling, o);
                }
                if (m.maxEnqueuedFootprintKb != null && m.hasOwnProperty("maxEnqueuedFootprintKb")) {
                    if (typeof m.maxEnqueuedFootprintKb === "number")
                        d.maxEnqueuedFootprintKb = o.longs === String ? String(m.maxEnqueuedFootprintKb) : m.maxEnqueuedFootprintKb;
                    else
                        d.maxEnqueuedFootprintKb = o.longs === String ? $util.Long.prototype.toString.call(m.maxEnqueuedFootprintKb) : o.longs === Number ? new $util.LongBits(m.maxEnqueuedFootprintKb.low >>> 0, m.maxEnqueuedFootprintKb.high >>> 0).toNumber(true) : m.maxEnqueuedFootprintKb;
                }
                if (m.targetInstalledBy && m.targetInstalledBy.length) {
                    d.targetInstalledBy = [];
                    for (var j = 0; j < m.targetInstalledBy.length; ++j) {
                        d.targetInstalledBy[j] = m.targetInstalledBy[j];
                    }
                }
                return d;
            };

            /**
             * Converts this PerfEventConfig to JSON.
             * @function toJSON
             * @memberof perfetto.protos.PerfEventConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            PerfEventConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            PerfEventConfig.CallstackSampling = (function() {

                /**
                 * Properties of a CallstackSampling.
                 * @memberof perfetto.protos.PerfEventConfig
                 * @interface ICallstackSampling
                 * @property {perfetto.protos.PerfEventConfig.IScope|null} [scope] CallstackSampling scope
                 * @property {boolean|null} [kernelFrames] CallstackSampling kernelFrames
                 * @property {perfetto.protos.PerfEventConfig.UnwindMode|null} [userFrames] CallstackSampling userFrames
                 */

                /**
                 * Constructs a new CallstackSampling.
                 * @memberof perfetto.protos.PerfEventConfig
                 * @classdesc Represents a CallstackSampling.
                 * @implements ICallstackSampling
                 * @constructor
                 * @param {perfetto.protos.PerfEventConfig.ICallstackSampling=} [p] Properties to set
                 */
                function CallstackSampling(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * CallstackSampling scope.
                 * @member {perfetto.protos.PerfEventConfig.IScope|null|undefined} scope
                 * @memberof perfetto.protos.PerfEventConfig.CallstackSampling
                 * @instance
                 */
                CallstackSampling.prototype.scope = null;

                /**
                 * CallstackSampling kernelFrames.
                 * @member {boolean} kernelFrames
                 * @memberof perfetto.protos.PerfEventConfig.CallstackSampling
                 * @instance
                 */
                CallstackSampling.prototype.kernelFrames = false;

                /**
                 * CallstackSampling userFrames.
                 * @member {perfetto.protos.PerfEventConfig.UnwindMode} userFrames
                 * @memberof perfetto.protos.PerfEventConfig.CallstackSampling
                 * @instance
                 */
                CallstackSampling.prototype.userFrames = 0;

                /**
                 * Creates a new CallstackSampling instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.PerfEventConfig.CallstackSampling
                 * @static
                 * @param {perfetto.protos.PerfEventConfig.ICallstackSampling=} [properties] Properties to set
                 * @returns {perfetto.protos.PerfEventConfig.CallstackSampling} CallstackSampling instance
                 */
                CallstackSampling.create = function create(properties) {
                    return new CallstackSampling(properties);
                };

                /**
                 * Encodes the specified CallstackSampling message. Does not implicitly {@link perfetto.protos.PerfEventConfig.CallstackSampling.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.PerfEventConfig.CallstackSampling
                 * @static
                 * @param {perfetto.protos.PerfEventConfig.ICallstackSampling} m CallstackSampling message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CallstackSampling.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.scope != null && Object.hasOwnProperty.call(m, "scope"))
                        $root.perfetto.protos.PerfEventConfig.Scope.encode(m.scope, w.uint32(10).fork()).ldelim();
                    if (m.kernelFrames != null && Object.hasOwnProperty.call(m, "kernelFrames"))
                        w.uint32(16).bool(m.kernelFrames);
                    if (m.userFrames != null && Object.hasOwnProperty.call(m, "userFrames"))
                        w.uint32(24).int32(m.userFrames);
                    return w;
                };

                /**
                 * Encodes the specified CallstackSampling message, length delimited. Does not implicitly {@link perfetto.protos.PerfEventConfig.CallstackSampling.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.PerfEventConfig.CallstackSampling
                 * @static
                 * @param {perfetto.protos.PerfEventConfig.ICallstackSampling} message CallstackSampling message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CallstackSampling.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a CallstackSampling message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.PerfEventConfig.CallstackSampling
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.PerfEventConfig.CallstackSampling} CallstackSampling
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CallstackSampling.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.PerfEventConfig.CallstackSampling();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.scope = $root.perfetto.protos.PerfEventConfig.Scope.decode(r, r.uint32());
                            break;
                        case 2:
                            m.kernelFrames = r.bool();
                            break;
                        case 3:
                            m.userFrames = r.int32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a CallstackSampling message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.PerfEventConfig.CallstackSampling
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.PerfEventConfig.CallstackSampling} CallstackSampling
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CallstackSampling.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a CallstackSampling message.
                 * @function verify
                 * @memberof perfetto.protos.PerfEventConfig.CallstackSampling
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                CallstackSampling.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.scope != null && m.hasOwnProperty("scope")) {
                        {
                            var e = $root.perfetto.protos.PerfEventConfig.Scope.verify(m.scope);
                            if (e)
                                return "scope." + e;
                        }
                    }
                    if (m.kernelFrames != null && m.hasOwnProperty("kernelFrames")) {
                        if (typeof m.kernelFrames !== "boolean")
                            return "kernelFrames: boolean expected";
                    }
                    if (m.userFrames != null && m.hasOwnProperty("userFrames")) {
                        switch (m.userFrames) {
                        default:
                            return "userFrames: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                            break;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a CallstackSampling message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.PerfEventConfig.CallstackSampling
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.PerfEventConfig.CallstackSampling} CallstackSampling
                 */
                CallstackSampling.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.PerfEventConfig.CallstackSampling)
                        return d;
                    var m = new $root.perfetto.protos.PerfEventConfig.CallstackSampling();
                    if (d.scope != null) {
                        if (typeof d.scope !== "object")
                            throw TypeError(".perfetto.protos.PerfEventConfig.CallstackSampling.scope: object expected");
                        m.scope = $root.perfetto.protos.PerfEventConfig.Scope.fromObject(d.scope);
                    }
                    if (d.kernelFrames != null) {
                        m.kernelFrames = Boolean(d.kernelFrames);
                    }
                    switch (d.userFrames) {
                    case "UNWIND_UNKNOWN":
                    case 0:
                        m.userFrames = 0;
                        break;
                    case "UNWIND_SKIP":
                    case 1:
                        m.userFrames = 1;
                        break;
                    case "UNWIND_DWARF":
                    case 2:
                        m.userFrames = 2;
                        break;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a CallstackSampling message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.PerfEventConfig.CallstackSampling
                 * @static
                 * @param {perfetto.protos.PerfEventConfig.CallstackSampling} m CallstackSampling
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                CallstackSampling.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.scope = null;
                        d.kernelFrames = false;
                        d.userFrames = o.enums === String ? "UNWIND_UNKNOWN" : 0;
                    }
                    if (m.scope != null && m.hasOwnProperty("scope")) {
                        d.scope = $root.perfetto.protos.PerfEventConfig.Scope.toObject(m.scope, o);
                    }
                    if (m.kernelFrames != null && m.hasOwnProperty("kernelFrames")) {
                        d.kernelFrames = m.kernelFrames;
                    }
                    if (m.userFrames != null && m.hasOwnProperty("userFrames")) {
                        d.userFrames = o.enums === String ? $root.perfetto.protos.PerfEventConfig.UnwindMode[m.userFrames] : m.userFrames;
                    }
                    return d;
                };

                /**
                 * Converts this CallstackSampling to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.PerfEventConfig.CallstackSampling
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                CallstackSampling.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return CallstackSampling;
            })();

            PerfEventConfig.Scope = (function() {

                /**
                 * Properties of a Scope.
                 * @memberof perfetto.protos.PerfEventConfig
                 * @interface IScope
                 * @property {Array.<number>|null} [targetPid] Scope targetPid
                 * @property {Array.<string>|null} [targetCmdline] Scope targetCmdline
                 * @property {Array.<number>|null} [excludePid] Scope excludePid
                 * @property {Array.<string>|null} [excludeCmdline] Scope excludeCmdline
                 * @property {number|null} [additionalCmdlineCount] Scope additionalCmdlineCount
                 * @property {number|null} [processShardCount] Scope processShardCount
                 */

                /**
                 * Constructs a new Scope.
                 * @memberof perfetto.protos.PerfEventConfig
                 * @classdesc Represents a Scope.
                 * @implements IScope
                 * @constructor
                 * @param {perfetto.protos.PerfEventConfig.IScope=} [p] Properties to set
                 */
                function Scope(p) {
                    this.targetPid = [];
                    this.targetCmdline = [];
                    this.excludePid = [];
                    this.excludeCmdline = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Scope targetPid.
                 * @member {Array.<number>} targetPid
                 * @memberof perfetto.protos.PerfEventConfig.Scope
                 * @instance
                 */
                Scope.prototype.targetPid = $util.emptyArray;

                /**
                 * Scope targetCmdline.
                 * @member {Array.<string>} targetCmdline
                 * @memberof perfetto.protos.PerfEventConfig.Scope
                 * @instance
                 */
                Scope.prototype.targetCmdline = $util.emptyArray;

                /**
                 * Scope excludePid.
                 * @member {Array.<number>} excludePid
                 * @memberof perfetto.protos.PerfEventConfig.Scope
                 * @instance
                 */
                Scope.prototype.excludePid = $util.emptyArray;

                /**
                 * Scope excludeCmdline.
                 * @member {Array.<string>} excludeCmdline
                 * @memberof perfetto.protos.PerfEventConfig.Scope
                 * @instance
                 */
                Scope.prototype.excludeCmdline = $util.emptyArray;

                /**
                 * Scope additionalCmdlineCount.
                 * @member {number} additionalCmdlineCount
                 * @memberof perfetto.protos.PerfEventConfig.Scope
                 * @instance
                 */
                Scope.prototype.additionalCmdlineCount = 0;

                /**
                 * Scope processShardCount.
                 * @member {number} processShardCount
                 * @memberof perfetto.protos.PerfEventConfig.Scope
                 * @instance
                 */
                Scope.prototype.processShardCount = 0;

                /**
                 * Creates a new Scope instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.PerfEventConfig.Scope
                 * @static
                 * @param {perfetto.protos.PerfEventConfig.IScope=} [properties] Properties to set
                 * @returns {perfetto.protos.PerfEventConfig.Scope} Scope instance
                 */
                Scope.create = function create(properties) {
                    return new Scope(properties);
                };

                /**
                 * Encodes the specified Scope message. Does not implicitly {@link perfetto.protos.PerfEventConfig.Scope.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.PerfEventConfig.Scope
                 * @static
                 * @param {perfetto.protos.PerfEventConfig.IScope} m Scope message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Scope.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.targetPid != null && m.targetPid.length) {
                        for (var i = 0; i < m.targetPid.length; ++i)
                            w.uint32(8).int32(m.targetPid[i]);
                    }
                    if (m.targetCmdline != null && m.targetCmdline.length) {
                        for (var i = 0; i < m.targetCmdline.length; ++i)
                            w.uint32(18).string(m.targetCmdline[i]);
                    }
                    if (m.excludePid != null && m.excludePid.length) {
                        for (var i = 0; i < m.excludePid.length; ++i)
                            w.uint32(24).int32(m.excludePid[i]);
                    }
                    if (m.excludeCmdline != null && m.excludeCmdline.length) {
                        for (var i = 0; i < m.excludeCmdline.length; ++i)
                            w.uint32(34).string(m.excludeCmdline[i]);
                    }
                    if (m.additionalCmdlineCount != null && Object.hasOwnProperty.call(m, "additionalCmdlineCount"))
                        w.uint32(40).uint32(m.additionalCmdlineCount);
                    if (m.processShardCount != null && Object.hasOwnProperty.call(m, "processShardCount"))
                        w.uint32(48).uint32(m.processShardCount);
                    return w;
                };

                /**
                 * Encodes the specified Scope message, length delimited. Does not implicitly {@link perfetto.protos.PerfEventConfig.Scope.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.PerfEventConfig.Scope
                 * @static
                 * @param {perfetto.protos.PerfEventConfig.IScope} message Scope message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Scope.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Scope message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.PerfEventConfig.Scope
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.PerfEventConfig.Scope} Scope
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Scope.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.PerfEventConfig.Scope();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            if (!(m.targetPid && m.targetPid.length))
                                m.targetPid = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.targetPid.push(r.int32());
                            } else
                                m.targetPid.push(r.int32());
                            break;
                        case 2:
                            if (!(m.targetCmdline && m.targetCmdline.length))
                                m.targetCmdline = [];
                            m.targetCmdline.push(r.string());
                            break;
                        case 3:
                            if (!(m.excludePid && m.excludePid.length))
                                m.excludePid = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.excludePid.push(r.int32());
                            } else
                                m.excludePid.push(r.int32());
                            break;
                        case 4:
                            if (!(m.excludeCmdline && m.excludeCmdline.length))
                                m.excludeCmdline = [];
                            m.excludeCmdline.push(r.string());
                            break;
                        case 5:
                            m.additionalCmdlineCount = r.uint32();
                            break;
                        case 6:
                            m.processShardCount = r.uint32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Scope message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.PerfEventConfig.Scope
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.PerfEventConfig.Scope} Scope
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Scope.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Scope message.
                 * @function verify
                 * @memberof perfetto.protos.PerfEventConfig.Scope
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Scope.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.targetPid != null && m.hasOwnProperty("targetPid")) {
                        if (!Array.isArray(m.targetPid))
                            return "targetPid: array expected";
                        for (var i = 0; i < m.targetPid.length; ++i) {
                            if (!$util.isInteger(m.targetPid[i]))
                                return "targetPid: integer[] expected";
                        }
                    }
                    if (m.targetCmdline != null && m.hasOwnProperty("targetCmdline")) {
                        if (!Array.isArray(m.targetCmdline))
                            return "targetCmdline: array expected";
                        for (var i = 0; i < m.targetCmdline.length; ++i) {
                            if (!$util.isString(m.targetCmdline[i]))
                                return "targetCmdline: string[] expected";
                        }
                    }
                    if (m.excludePid != null && m.hasOwnProperty("excludePid")) {
                        if (!Array.isArray(m.excludePid))
                            return "excludePid: array expected";
                        for (var i = 0; i < m.excludePid.length; ++i) {
                            if (!$util.isInteger(m.excludePid[i]))
                                return "excludePid: integer[] expected";
                        }
                    }
                    if (m.excludeCmdline != null && m.hasOwnProperty("excludeCmdline")) {
                        if (!Array.isArray(m.excludeCmdline))
                            return "excludeCmdline: array expected";
                        for (var i = 0; i < m.excludeCmdline.length; ++i) {
                            if (!$util.isString(m.excludeCmdline[i]))
                                return "excludeCmdline: string[] expected";
                        }
                    }
                    if (m.additionalCmdlineCount != null && m.hasOwnProperty("additionalCmdlineCount")) {
                        if (!$util.isInteger(m.additionalCmdlineCount))
                            return "additionalCmdlineCount: integer expected";
                    }
                    if (m.processShardCount != null && m.hasOwnProperty("processShardCount")) {
                        if (!$util.isInteger(m.processShardCount))
                            return "processShardCount: integer expected";
                    }
                    return null;
                };

                /**
                 * Creates a Scope message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.PerfEventConfig.Scope
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.PerfEventConfig.Scope} Scope
                 */
                Scope.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.PerfEventConfig.Scope)
                        return d;
                    var m = new $root.perfetto.protos.PerfEventConfig.Scope();
                    if (d.targetPid) {
                        if (!Array.isArray(d.targetPid))
                            throw TypeError(".perfetto.protos.PerfEventConfig.Scope.targetPid: array expected");
                        m.targetPid = [];
                        for (var i = 0; i < d.targetPid.length; ++i) {
                            m.targetPid[i] = d.targetPid[i] | 0;
                        }
                    }
                    if (d.targetCmdline) {
                        if (!Array.isArray(d.targetCmdline))
                            throw TypeError(".perfetto.protos.PerfEventConfig.Scope.targetCmdline: array expected");
                        m.targetCmdline = [];
                        for (var i = 0; i < d.targetCmdline.length; ++i) {
                            m.targetCmdline[i] = String(d.targetCmdline[i]);
                        }
                    }
                    if (d.excludePid) {
                        if (!Array.isArray(d.excludePid))
                            throw TypeError(".perfetto.protos.PerfEventConfig.Scope.excludePid: array expected");
                        m.excludePid = [];
                        for (var i = 0; i < d.excludePid.length; ++i) {
                            m.excludePid[i] = d.excludePid[i] | 0;
                        }
                    }
                    if (d.excludeCmdline) {
                        if (!Array.isArray(d.excludeCmdline))
                            throw TypeError(".perfetto.protos.PerfEventConfig.Scope.excludeCmdline: array expected");
                        m.excludeCmdline = [];
                        for (var i = 0; i < d.excludeCmdline.length; ++i) {
                            m.excludeCmdline[i] = String(d.excludeCmdline[i]);
                        }
                    }
                    if (d.additionalCmdlineCount != null) {
                        m.additionalCmdlineCount = d.additionalCmdlineCount >>> 0;
                    }
                    if (d.processShardCount != null) {
                        m.processShardCount = d.processShardCount >>> 0;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Scope message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.PerfEventConfig.Scope
                 * @static
                 * @param {perfetto.protos.PerfEventConfig.Scope} m Scope
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Scope.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.targetPid = [];
                        d.targetCmdline = [];
                        d.excludePid = [];
                        d.excludeCmdline = [];
                    }
                    if (o.defaults) {
                        d.additionalCmdlineCount = 0;
                        d.processShardCount = 0;
                    }
                    if (m.targetPid && m.targetPid.length) {
                        d.targetPid = [];
                        for (var j = 0; j < m.targetPid.length; ++j) {
                            d.targetPid[j] = m.targetPid[j];
                        }
                    }
                    if (m.targetCmdline && m.targetCmdline.length) {
                        d.targetCmdline = [];
                        for (var j = 0; j < m.targetCmdline.length; ++j) {
                            d.targetCmdline[j] = m.targetCmdline[j];
                        }
                    }
                    if (m.excludePid && m.excludePid.length) {
                        d.excludePid = [];
                        for (var j = 0; j < m.excludePid.length; ++j) {
                            d.excludePid[j] = m.excludePid[j];
                        }
                    }
                    if (m.excludeCmdline && m.excludeCmdline.length) {
                        d.excludeCmdline = [];
                        for (var j = 0; j < m.excludeCmdline.length; ++j) {
                            d.excludeCmdline[j] = m.excludeCmdline[j];
                        }
                    }
                    if (m.additionalCmdlineCount != null && m.hasOwnProperty("additionalCmdlineCount")) {
                        d.additionalCmdlineCount = m.additionalCmdlineCount;
                    }
                    if (m.processShardCount != null && m.hasOwnProperty("processShardCount")) {
                        d.processShardCount = m.processShardCount;
                    }
                    return d;
                };

                /**
                 * Converts this Scope to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.PerfEventConfig.Scope
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Scope.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Scope;
            })();

            /**
             * UnwindMode enum.
             * @name perfetto.protos.PerfEventConfig.UnwindMode
             * @enum {number}
             * @property {number} UNWIND_UNKNOWN=0 UNWIND_UNKNOWN value
             * @property {number} UNWIND_SKIP=1 UNWIND_SKIP value
             * @property {number} UNWIND_DWARF=2 UNWIND_DWARF value
             */
            PerfEventConfig.UnwindMode = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNWIND_UNKNOWN"] = 0;
                values[valuesById[1] = "UNWIND_SKIP"] = 1;
                values[valuesById[2] = "UNWIND_DWARF"] = 2;
                return values;
            })();

            return PerfEventConfig;
        })();

        /**
         * AtomId enum.
         * @name perfetto.protos.AtomId
         * @enum {number}
         * @property {number} BLE_SCAN_STATE_CHANGED=2 BLE_SCAN_STATE_CHANGED value
         * @property {number} PROCESS_STATE_CHANGED=3 PROCESS_STATE_CHANGED value
         * @property {number} BLE_SCAN_RESULT_RECEIVED=4 BLE_SCAN_RESULT_RECEIVED value
         * @property {number} SENSOR_STATE_CHANGED=5 SENSOR_STATE_CHANGED value
         * @property {number} GPS_SCAN_STATE_CHANGED=6 GPS_SCAN_STATE_CHANGED value
         * @property {number} SYNC_STATE_CHANGED=7 SYNC_STATE_CHANGED value
         * @property {number} SCHEDULED_JOB_STATE_CHANGED=8 SCHEDULED_JOB_STATE_CHANGED value
         * @property {number} SCREEN_BRIGHTNESS_CHANGED=9 SCREEN_BRIGHTNESS_CHANGED value
         * @property {number} WAKELOCK_STATE_CHANGED=10 WAKELOCK_STATE_CHANGED value
         * @property {number} LONG_PARTIAL_WAKELOCK_STATE_CHANGED=11 LONG_PARTIAL_WAKELOCK_STATE_CHANGED value
         * @property {number} MOBILE_RADIO_POWER_STATE_CHANGED=12 MOBILE_RADIO_POWER_STATE_CHANGED value
         * @property {number} WIFI_RADIO_POWER_STATE_CHANGED=13 WIFI_RADIO_POWER_STATE_CHANGED value
         * @property {number} ACTIVITY_MANAGER_SLEEP_STATE_CHANGED=14 ACTIVITY_MANAGER_SLEEP_STATE_CHANGED value
         * @property {number} MEMORY_FACTOR_STATE_CHANGED=15 MEMORY_FACTOR_STATE_CHANGED value
         * @property {number} EXCESSIVE_CPU_USAGE_REPORTED=16 EXCESSIVE_CPU_USAGE_REPORTED value
         * @property {number} CACHED_KILL_REPORTED=17 CACHED_KILL_REPORTED value
         * @property {number} PROCESS_MEMORY_STAT_REPORTED=18 PROCESS_MEMORY_STAT_REPORTED value
         * @property {number} LAUNCHER_EVENT=19 LAUNCHER_EVENT value
         * @property {number} BATTERY_SAVER_MODE_STATE_CHANGED=20 BATTERY_SAVER_MODE_STATE_CHANGED value
         * @property {number} DEVICE_IDLE_MODE_STATE_CHANGED=21 DEVICE_IDLE_MODE_STATE_CHANGED value
         * @property {number} DEVICE_IDLING_MODE_STATE_CHANGED=22 DEVICE_IDLING_MODE_STATE_CHANGED value
         * @property {number} AUDIO_STATE_CHANGED=23 AUDIO_STATE_CHANGED value
         * @property {number} MEDIA_CODEC_STATE_CHANGED=24 MEDIA_CODEC_STATE_CHANGED value
         * @property {number} CAMERA_STATE_CHANGED=25 CAMERA_STATE_CHANGED value
         * @property {number} FLASHLIGHT_STATE_CHANGED=26 FLASHLIGHT_STATE_CHANGED value
         * @property {number} UID_PROCESS_STATE_CHANGED=27 UID_PROCESS_STATE_CHANGED value
         * @property {number} PROCESS_LIFE_CYCLE_STATE_CHANGED=28 PROCESS_LIFE_CYCLE_STATE_CHANGED value
         * @property {number} SCREEN_STATE_CHANGED=29 SCREEN_STATE_CHANGED value
         * @property {number} BATTERY_LEVEL_CHANGED=30 BATTERY_LEVEL_CHANGED value
         * @property {number} CHARGING_STATE_CHANGED=31 CHARGING_STATE_CHANGED value
         * @property {number} PLUGGED_STATE_CHANGED=32 PLUGGED_STATE_CHANGED value
         * @property {number} INTERACTIVE_STATE_CHANGED=33 INTERACTIVE_STATE_CHANGED value
         * @property {number} TOUCH_EVENT_REPORTED=34 TOUCH_EVENT_REPORTED value
         * @property {number} WAKEUP_ALARM_OCCURRED=35 WAKEUP_ALARM_OCCURRED value
         * @property {number} KERNEL_WAKEUP_REPORTED=36 KERNEL_WAKEUP_REPORTED value
         * @property {number} WIFI_LOCK_STATE_CHANGED=37 WIFI_LOCK_STATE_CHANGED value
         * @property {number} WIFI_SIGNAL_STRENGTH_CHANGED=38 WIFI_SIGNAL_STRENGTH_CHANGED value
         * @property {number} WIFI_SCAN_STATE_CHANGED=39 WIFI_SCAN_STATE_CHANGED value
         * @property {number} PHONE_SIGNAL_STRENGTH_CHANGED=40 PHONE_SIGNAL_STRENGTH_CHANGED value
         * @property {number} SETTING_CHANGED=41 SETTING_CHANGED value
         * @property {number} ACTIVITY_FOREGROUND_STATE_CHANGED=42 ACTIVITY_FOREGROUND_STATE_CHANGED value
         * @property {number} ISOLATED_UID_CHANGED=43 ISOLATED_UID_CHANGED value
         * @property {number} PACKET_WAKEUP_OCCURRED=44 PACKET_WAKEUP_OCCURRED value
         * @property {number} WALL_CLOCK_TIME_SHIFTED=45 WALL_CLOCK_TIME_SHIFTED value
         * @property {number} ANOMALY_DETECTED=46 ANOMALY_DETECTED value
         * @property {number} APP_BREADCRUMB_REPORTED=47 APP_BREADCRUMB_REPORTED value
         * @property {number} APP_START_OCCURRED=48 APP_START_OCCURRED value
         * @property {number} APP_START_CANCELED=49 APP_START_CANCELED value
         * @property {number} APP_START_FULLY_DRAWN=50 APP_START_FULLY_DRAWN value
         * @property {number} LMK_KILL_OCCURRED=51 LMK_KILL_OCCURRED value
         * @property {number} PICTURE_IN_PICTURE_STATE_CHANGED=52 PICTURE_IN_PICTURE_STATE_CHANGED value
         * @property {number} WIFI_MULTICAST_LOCK_STATE_CHANGED=53 WIFI_MULTICAST_LOCK_STATE_CHANGED value
         * @property {number} LMK_STATE_CHANGED=54 LMK_STATE_CHANGED value
         * @property {number} APP_START_MEMORY_STATE_CAPTURED=55 APP_START_MEMORY_STATE_CAPTURED value
         * @property {number} SHUTDOWN_SEQUENCE_REPORTED=56 SHUTDOWN_SEQUENCE_REPORTED value
         * @property {number} BOOT_SEQUENCE_REPORTED=57 BOOT_SEQUENCE_REPORTED value
         * @property {number} DAVEY_OCCURRED=58 DAVEY_OCCURRED value
         * @property {number} OVERLAY_STATE_CHANGED=59 OVERLAY_STATE_CHANGED value
         * @property {number} FOREGROUND_SERVICE_STATE_CHANGED=60 FOREGROUND_SERVICE_STATE_CHANGED value
         * @property {number} CALL_STATE_CHANGED=61 CALL_STATE_CHANGED value
         * @property {number} KEYGUARD_STATE_CHANGED=62 KEYGUARD_STATE_CHANGED value
         * @property {number} KEYGUARD_BOUNCER_STATE_CHANGED=63 KEYGUARD_BOUNCER_STATE_CHANGED value
         * @property {number} KEYGUARD_BOUNCER_PASSWORD_ENTERED=64 KEYGUARD_BOUNCER_PASSWORD_ENTERED value
         * @property {number} APP_DIED=65 APP_DIED value
         * @property {number} RESOURCE_CONFIGURATION_CHANGED=66 RESOURCE_CONFIGURATION_CHANGED value
         * @property {number} BLUETOOTH_ENABLED_STATE_CHANGED=67 BLUETOOTH_ENABLED_STATE_CHANGED value
         * @property {number} BLUETOOTH_CONNECTION_STATE_CHANGED=68 BLUETOOTH_CONNECTION_STATE_CHANGED value
         * @property {number} GPS_SIGNAL_QUALITY_CHANGED=69 GPS_SIGNAL_QUALITY_CHANGED value
         * @property {number} USB_CONNECTOR_STATE_CHANGED=70 USB_CONNECTOR_STATE_CHANGED value
         * @property {number} SPEAKER_IMPEDANCE_REPORTED=71 SPEAKER_IMPEDANCE_REPORTED value
         * @property {number} HARDWARE_FAILED=72 HARDWARE_FAILED value
         * @property {number} PHYSICAL_DROP_DETECTED=73 PHYSICAL_DROP_DETECTED value
         * @property {number} CHARGE_CYCLES_REPORTED=74 CHARGE_CYCLES_REPORTED value
         * @property {number} MOBILE_CONNECTION_STATE_CHANGED=75 MOBILE_CONNECTION_STATE_CHANGED value
         * @property {number} MOBILE_RADIO_TECHNOLOGY_CHANGED=76 MOBILE_RADIO_TECHNOLOGY_CHANGED value
         * @property {number} USB_DEVICE_ATTACHED=77 USB_DEVICE_ATTACHED value
         * @property {number} APP_CRASH_OCCURRED=78 APP_CRASH_OCCURRED value
         * @property {number} ANR_OCCURRED=79 ANR_OCCURRED value
         * @property {number} WTF_OCCURRED=80 WTF_OCCURRED value
         * @property {number} LOW_MEM_REPORTED=81 LOW_MEM_REPORTED value
         * @property {number} GENERIC_ATOM=82 GENERIC_ATOM value
         * @property {number} KEY_VALUE_PAIRS_ATOM=83 KEY_VALUE_PAIRS_ATOM value
         * @property {number} VIBRATOR_STATE_CHANGED=84 VIBRATOR_STATE_CHANGED value
         * @property {number} DEFERRED_JOB_STATS_REPORTED=85 DEFERRED_JOB_STATS_REPORTED value
         * @property {number} THERMAL_THROTTLING=86 THERMAL_THROTTLING value
         * @property {number} BIOMETRIC_ACQUIRED=87 BIOMETRIC_ACQUIRED value
         * @property {number} BIOMETRIC_AUTHENTICATED=88 BIOMETRIC_AUTHENTICATED value
         * @property {number} BIOMETRIC_ERROR_OCCURRED=89 BIOMETRIC_ERROR_OCCURRED value
         * @property {number} UI_EVENT_REPORTED=90 UI_EVENT_REPORTED value
         * @property {number} BATTERY_HEALTH_SNAPSHOT=91 BATTERY_HEALTH_SNAPSHOT value
         * @property {number} SLOW_IO=92 SLOW_IO value
         * @property {number} BATTERY_CAUSED_SHUTDOWN=93 BATTERY_CAUSED_SHUTDOWN value
         * @property {number} PHONE_SERVICE_STATE_CHANGED=94 PHONE_SERVICE_STATE_CHANGED value
         * @property {number} PHONE_STATE_CHANGED=95 PHONE_STATE_CHANGED value
         * @property {number} USER_RESTRICTION_CHANGED=96 USER_RESTRICTION_CHANGED value
         * @property {number} SETTINGS_UI_CHANGED=97 SETTINGS_UI_CHANGED value
         * @property {number} CONNECTIVITY_STATE_CHANGED=98 CONNECTIVITY_STATE_CHANGED value
         * @property {number} SERVICE_STATE_CHANGED=99 SERVICE_STATE_CHANGED value
         * @property {number} SERVICE_LAUNCH_REPORTED=100 SERVICE_LAUNCH_REPORTED value
         * @property {number} FLAG_FLIP_UPDATE_OCCURRED=101 FLAG_FLIP_UPDATE_OCCURRED value
         * @property {number} BINARY_PUSH_STATE_CHANGED=102 BINARY_PUSH_STATE_CHANGED value
         * @property {number} DEVICE_POLICY_EVENT=103 DEVICE_POLICY_EVENT value
         * @property {number} DOCS_UI_FILE_OP_CANCELED=104 DOCS_UI_FILE_OP_CANCELED value
         * @property {number} DOCS_UI_FILE_OP_COPY_MOVE_MODE_REPORTED=105 DOCS_UI_FILE_OP_COPY_MOVE_MODE_REPORTED value
         * @property {number} DOCS_UI_FILE_OP_FAILURE=106 DOCS_UI_FILE_OP_FAILURE value
         * @property {number} DOCS_UI_PROVIDER_FILE_OP=107 DOCS_UI_PROVIDER_FILE_OP value
         * @property {number} DOCS_UI_INVALID_SCOPED_ACCESS_REQUEST=108 DOCS_UI_INVALID_SCOPED_ACCESS_REQUEST value
         * @property {number} DOCS_UI_LAUNCH_REPORTED=109 DOCS_UI_LAUNCH_REPORTED value
         * @property {number} DOCS_UI_ROOT_VISITED=110 DOCS_UI_ROOT_VISITED value
         * @property {number} DOCS_UI_STARTUP_MS=111 DOCS_UI_STARTUP_MS value
         * @property {number} DOCS_UI_USER_ACTION_REPORTED=112 DOCS_UI_USER_ACTION_REPORTED value
         * @property {number} WIFI_ENABLED_STATE_CHANGED=113 WIFI_ENABLED_STATE_CHANGED value
         * @property {number} WIFI_RUNNING_STATE_CHANGED=114 WIFI_RUNNING_STATE_CHANGED value
         * @property {number} APP_COMPACTED=115 APP_COMPACTED value
         * @property {number} NETWORK_DNS_EVENT_REPORTED=116 NETWORK_DNS_EVENT_REPORTED value
         * @property {number} DOCS_UI_PICKER_LAUNCHED_FROM_REPORTED=117 DOCS_UI_PICKER_LAUNCHED_FROM_REPORTED value
         * @property {number} DOCS_UI_PICK_RESULT_REPORTED=118 DOCS_UI_PICK_RESULT_REPORTED value
         * @property {number} DOCS_UI_SEARCH_MODE_REPORTED=119 DOCS_UI_SEARCH_MODE_REPORTED value
         * @property {number} DOCS_UI_SEARCH_TYPE_REPORTED=120 DOCS_UI_SEARCH_TYPE_REPORTED value
         * @property {number} DATA_STALL_EVENT=121 DATA_STALL_EVENT value
         * @property {number} RESCUE_PARTY_RESET_REPORTED=122 RESCUE_PARTY_RESET_REPORTED value
         * @property {number} SIGNED_CONFIG_REPORTED=123 SIGNED_CONFIG_REPORTED value
         * @property {number} GNSS_NI_EVENT_REPORTED=124 GNSS_NI_EVENT_REPORTED value
         * @property {number} BLUETOOTH_LINK_LAYER_CONNECTION_EVENT=125 BLUETOOTH_LINK_LAYER_CONNECTION_EVENT value
         * @property {number} BLUETOOTH_ACL_CONNECTION_STATE_CHANGED=126 BLUETOOTH_ACL_CONNECTION_STATE_CHANGED value
         * @property {number} BLUETOOTH_SCO_CONNECTION_STATE_CHANGED=127 BLUETOOTH_SCO_CONNECTION_STATE_CHANGED value
         * @property {number} APP_DOWNGRADED=128 APP_DOWNGRADED value
         * @property {number} APP_OPTIMIZED_AFTER_DOWNGRADED=129 APP_OPTIMIZED_AFTER_DOWNGRADED value
         * @property {number} LOW_STORAGE_STATE_CHANGED=130 LOW_STORAGE_STATE_CHANGED value
         * @property {number} GNSS_NFW_NOTIFICATION_REPORTED=131 GNSS_NFW_NOTIFICATION_REPORTED value
         * @property {number} GNSS_CONFIGURATION_REPORTED=132 GNSS_CONFIGURATION_REPORTED value
         * @property {number} USB_PORT_OVERHEAT_EVENT_REPORTED=133 USB_PORT_OVERHEAT_EVENT_REPORTED value
         * @property {number} NFC_ERROR_OCCURRED=134 NFC_ERROR_OCCURRED value
         * @property {number} NFC_STATE_CHANGED=135 NFC_STATE_CHANGED value
         * @property {number} NFC_BEAM_OCCURRED=136 NFC_BEAM_OCCURRED value
         * @property {number} NFC_CARDEMULATION_OCCURRED=137 NFC_CARDEMULATION_OCCURRED value
         * @property {number} NFC_TAG_OCCURRED=138 NFC_TAG_OCCURRED value
         * @property {number} NFC_HCE_TRANSACTION_OCCURRED=139 NFC_HCE_TRANSACTION_OCCURRED value
         * @property {number} SE_STATE_CHANGED=140 SE_STATE_CHANGED value
         * @property {number} SE_OMAPI_REPORTED=141 SE_OMAPI_REPORTED value
         * @property {number} BROADCAST_DISPATCH_LATENCY_REPORTED=142 BROADCAST_DISPATCH_LATENCY_REPORTED value
         * @property {number} ATTENTION_MANAGER_SERVICE_RESULT_REPORTED=143 ATTENTION_MANAGER_SERVICE_RESULT_REPORTED value
         * @property {number} ADB_CONNECTION_CHANGED=144 ADB_CONNECTION_CHANGED value
         * @property {number} SPEECH_DSP_STAT_REPORTED=145 SPEECH_DSP_STAT_REPORTED value
         * @property {number} USB_CONTAMINANT_REPORTED=146 USB_CONTAMINANT_REPORTED value
         * @property {number} WATCHDOG_ROLLBACK_OCCURRED=147 WATCHDOG_ROLLBACK_OCCURRED value
         * @property {number} BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED=148 BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED value
         * @property {number} BUBBLE_UI_CHANGED=149 BUBBLE_UI_CHANGED value
         * @property {number} SCHEDULED_JOB_CONSTRAINT_CHANGED=150 SCHEDULED_JOB_CONSTRAINT_CHANGED value
         * @property {number} BLUETOOTH_ACTIVE_DEVICE_CHANGED=151 BLUETOOTH_ACTIVE_DEVICE_CHANGED value
         * @property {number} BLUETOOTH_A2DP_PLAYBACK_STATE_CHANGED=152 BLUETOOTH_A2DP_PLAYBACK_STATE_CHANGED value
         * @property {number} BLUETOOTH_A2DP_CODEC_CONFIG_CHANGED=153 BLUETOOTH_A2DP_CODEC_CONFIG_CHANGED value
         * @property {number} BLUETOOTH_A2DP_CODEC_CAPABILITY_CHANGED=154 BLUETOOTH_A2DP_CODEC_CAPABILITY_CHANGED value
         * @property {number} BLUETOOTH_A2DP_AUDIO_UNDERRUN_REPORTED=155 BLUETOOTH_A2DP_AUDIO_UNDERRUN_REPORTED value
         * @property {number} BLUETOOTH_A2DP_AUDIO_OVERRUN_REPORTED=156 BLUETOOTH_A2DP_AUDIO_OVERRUN_REPORTED value
         * @property {number} BLUETOOTH_DEVICE_RSSI_REPORTED=157 BLUETOOTH_DEVICE_RSSI_REPORTED value
         * @property {number} BLUETOOTH_DEVICE_FAILED_CONTACT_COUNTER_REPORTED=158 BLUETOOTH_DEVICE_FAILED_CONTACT_COUNTER_REPORTED value
         * @property {number} BLUETOOTH_DEVICE_TX_POWER_LEVEL_REPORTED=159 BLUETOOTH_DEVICE_TX_POWER_LEVEL_REPORTED value
         * @property {number} BLUETOOTH_HCI_TIMEOUT_REPORTED=160 BLUETOOTH_HCI_TIMEOUT_REPORTED value
         * @property {number} BLUETOOTH_QUALITY_REPORT_REPORTED=161 BLUETOOTH_QUALITY_REPORT_REPORTED value
         * @property {number} BLUETOOTH_DEVICE_INFO_REPORTED=162 BLUETOOTH_DEVICE_INFO_REPORTED value
         * @property {number} BLUETOOTH_REMOTE_VERSION_INFO_REPORTED=163 BLUETOOTH_REMOTE_VERSION_INFO_REPORTED value
         * @property {number} BLUETOOTH_SDP_ATTRIBUTE_REPORTED=164 BLUETOOTH_SDP_ATTRIBUTE_REPORTED value
         * @property {number} BLUETOOTH_BOND_STATE_CHANGED=165 BLUETOOTH_BOND_STATE_CHANGED value
         * @property {number} BLUETOOTH_CLASSIC_PAIRING_EVENT_REPORTED=166 BLUETOOTH_CLASSIC_PAIRING_EVENT_REPORTED value
         * @property {number} BLUETOOTH_SMP_PAIRING_EVENT_REPORTED=167 BLUETOOTH_SMP_PAIRING_EVENT_REPORTED value
         * @property {number} SCREEN_TIMEOUT_EXTENSION_REPORTED=168 SCREEN_TIMEOUT_EXTENSION_REPORTED value
         * @property {number} PROCESS_START_TIME=169 PROCESS_START_TIME value
         * @property {number} PERMISSION_GRANT_REQUEST_RESULT_REPORTED=170 PERMISSION_GRANT_REQUEST_RESULT_REPORTED value
         * @property {number} BLUETOOTH_SOCKET_CONNECTION_STATE_CHANGED=171 BLUETOOTH_SOCKET_CONNECTION_STATE_CHANGED value
         * @property {number} DEVICE_IDENTIFIER_ACCESS_DENIED=172 DEVICE_IDENTIFIER_ACCESS_DENIED value
         * @property {number} BUBBLE_DEVELOPER_ERROR_REPORTED=173 BUBBLE_DEVELOPER_ERROR_REPORTED value
         * @property {number} ASSIST_GESTURE_STAGE_REPORTED=174 ASSIST_GESTURE_STAGE_REPORTED value
         * @property {number} ASSIST_GESTURE_FEEDBACK_REPORTED=175 ASSIST_GESTURE_FEEDBACK_REPORTED value
         * @property {number} ASSIST_GESTURE_PROGRESS_REPORTED=176 ASSIST_GESTURE_PROGRESS_REPORTED value
         * @property {number} TOUCH_GESTURE_CLASSIFIED=177 TOUCH_GESTURE_CLASSIFIED value
         * @property {number} HIDDEN_API_USED=178 HIDDEN_API_USED value
         * @property {number} STYLE_UI_CHANGED=179 STYLE_UI_CHANGED value
         * @property {number} PRIVACY_INDICATORS_INTERACTED=180 PRIVACY_INDICATORS_INTERACTED value
         * @property {number} APP_INSTALL_ON_EXTERNAL_STORAGE_REPORTED=181 APP_INSTALL_ON_EXTERNAL_STORAGE_REPORTED value
         * @property {number} NETWORK_STACK_REPORTED=182 NETWORK_STACK_REPORTED value
         * @property {number} APP_MOVED_STORAGE_REPORTED=183 APP_MOVED_STORAGE_REPORTED value
         * @property {number} BIOMETRIC_ENROLLED=184 BIOMETRIC_ENROLLED value
         * @property {number} SYSTEM_SERVER_WATCHDOG_OCCURRED=185 SYSTEM_SERVER_WATCHDOG_OCCURRED value
         * @property {number} TOMB_STONE_OCCURRED=186 TOMB_STONE_OCCURRED value
         * @property {number} BLUETOOTH_CLASS_OF_DEVICE_REPORTED=187 BLUETOOTH_CLASS_OF_DEVICE_REPORTED value
         * @property {number} INTELLIGENCE_EVENT_REPORTED=188 INTELLIGENCE_EVENT_REPORTED value
         * @property {number} THERMAL_THROTTLING_SEVERITY_STATE_CHANGED=189 THERMAL_THROTTLING_SEVERITY_STATE_CHANGED value
         * @property {number} ROLE_REQUEST_RESULT_REPORTED=190 ROLE_REQUEST_RESULT_REPORTED value
         * @property {number} MEDIAMETRICS_AUDIOPOLICY_REPORTED=191 MEDIAMETRICS_AUDIOPOLICY_REPORTED value
         * @property {number} MEDIAMETRICS_AUDIORECORD_REPORTED=192 MEDIAMETRICS_AUDIORECORD_REPORTED value
         * @property {number} MEDIAMETRICS_AUDIOTHREAD_REPORTED=193 MEDIAMETRICS_AUDIOTHREAD_REPORTED value
         * @property {number} MEDIAMETRICS_AUDIOTRACK_REPORTED=194 MEDIAMETRICS_AUDIOTRACK_REPORTED value
         * @property {number} MEDIAMETRICS_CODEC_REPORTED=195 MEDIAMETRICS_CODEC_REPORTED value
         * @property {number} MEDIAMETRICS_DRM_WIDEVINE_REPORTED=196 MEDIAMETRICS_DRM_WIDEVINE_REPORTED value
         * @property {number} MEDIAMETRICS_EXTRACTOR_REPORTED=197 MEDIAMETRICS_EXTRACTOR_REPORTED value
         * @property {number} MEDIAMETRICS_MEDIADRM_REPORTED=198 MEDIAMETRICS_MEDIADRM_REPORTED value
         * @property {number} MEDIAMETRICS_NUPLAYER_REPORTED=199 MEDIAMETRICS_NUPLAYER_REPORTED value
         * @property {number} MEDIAMETRICS_RECORDER_REPORTED=200 MEDIAMETRICS_RECORDER_REPORTED value
         * @property {number} MEDIAMETRICS_DRMMANAGER_REPORTED=201 MEDIAMETRICS_DRMMANAGER_REPORTED value
         * @property {number} CAR_POWER_STATE_CHANGED=203 CAR_POWER_STATE_CHANGED value
         * @property {number} GARAGE_MODE_INFO=204 GARAGE_MODE_INFO value
         * @property {number} TEST_ATOM_REPORTED=205 TEST_ATOM_REPORTED value
         * @property {number} CONTENT_CAPTURE_CALLER_MISMATCH_REPORTED=206 CONTENT_CAPTURE_CALLER_MISMATCH_REPORTED value
         * @property {number} CONTENT_CAPTURE_SERVICE_EVENTS=207 CONTENT_CAPTURE_SERVICE_EVENTS value
         * @property {number} CONTENT_CAPTURE_SESSION_EVENTS=208 CONTENT_CAPTURE_SESSION_EVENTS value
         * @property {number} CONTENT_CAPTURE_FLUSHED=209 CONTENT_CAPTURE_FLUSHED value
         * @property {number} LOCATION_MANAGER_API_USAGE_REPORTED=210 LOCATION_MANAGER_API_USAGE_REPORTED value
         * @property {number} REVIEW_PERMISSIONS_FRAGMENT_RESULT_REPORTED=211 REVIEW_PERMISSIONS_FRAGMENT_RESULT_REPORTED value
         * @property {number} RUNTIME_PERMISSIONS_UPGRADE_RESULT=212 RUNTIME_PERMISSIONS_UPGRADE_RESULT value
         * @property {number} GRANT_PERMISSIONS_ACTIVITY_BUTTON_ACTIONS=213 GRANT_PERMISSIONS_ACTIVITY_BUTTON_ACTIONS value
         * @property {number} LOCATION_ACCESS_CHECK_NOTIFICATION_ACTION=214 LOCATION_ACCESS_CHECK_NOTIFICATION_ACTION value
         * @property {number} APP_PERMISSION_FRAGMENT_ACTION_REPORTED=215 APP_PERMISSION_FRAGMENT_ACTION_REPORTED value
         * @property {number} APP_PERMISSION_FRAGMENT_VIEWED=216 APP_PERMISSION_FRAGMENT_VIEWED value
         * @property {number} APP_PERMISSIONS_FRAGMENT_VIEWED=217 APP_PERMISSIONS_FRAGMENT_VIEWED value
         * @property {number} PERMISSION_APPS_FRAGMENT_VIEWED=218 PERMISSION_APPS_FRAGMENT_VIEWED value
         * @property {number} TEXT_SELECTION_EVENT=219 TEXT_SELECTION_EVENT value
         * @property {number} TEXT_LINKIFY_EVENT=220 TEXT_LINKIFY_EVENT value
         * @property {number} CONVERSATION_ACTIONS_EVENT=221 CONVERSATION_ACTIONS_EVENT value
         * @property {number} LANGUAGE_DETECTION_EVENT=222 LANGUAGE_DETECTION_EVENT value
         * @property {number} EXCLUSION_RECT_STATE_CHANGED=223 EXCLUSION_RECT_STATE_CHANGED value
         * @property {number} BACK_GESTURE_REPORTED_REPORTED=224 BACK_GESTURE_REPORTED_REPORTED value
         * @property {number} UPDATE_ENGINE_UPDATE_ATTEMPT_REPORTED=225 UPDATE_ENGINE_UPDATE_ATTEMPT_REPORTED value
         * @property {number} UPDATE_ENGINE_SUCCESSFUL_UPDATE_REPORTED=226 UPDATE_ENGINE_SUCCESSFUL_UPDATE_REPORTED value
         * @property {number} CAMERA_ACTION_EVENT=227 CAMERA_ACTION_EVENT value
         * @property {number} APP_COMPATIBILITY_CHANGE_REPORTED=228 APP_COMPATIBILITY_CHANGE_REPORTED value
         * @property {number} PERFETTO_UPLOADED=229 PERFETTO_UPLOADED value
         * @property {number} VMS_CLIENT_CONNECTION_STATE_CHANGED=230 VMS_CLIENT_CONNECTION_STATE_CHANGED value
         * @property {number} MEDIA_PROVIDER_SCAN_OCCURRED=233 MEDIA_PROVIDER_SCAN_OCCURRED value
         * @property {number} MEDIA_CONTENT_DELETED=234 MEDIA_CONTENT_DELETED value
         * @property {number} MEDIA_PROVIDER_PERMISSION_REQUESTED=235 MEDIA_PROVIDER_PERMISSION_REQUESTED value
         * @property {number} MEDIA_PROVIDER_SCHEMA_CHANGED=236 MEDIA_PROVIDER_SCHEMA_CHANGED value
         * @property {number} MEDIA_PROVIDER_IDLE_MAINTENANCE_FINISHED=237 MEDIA_PROVIDER_IDLE_MAINTENANCE_FINISHED value
         * @property {number} REBOOT_ESCROW_RECOVERY_REPORTED=238 REBOOT_ESCROW_RECOVERY_REPORTED value
         * @property {number} BOOT_TIME_EVENT_DURATION_REPORTED=239 BOOT_TIME_EVENT_DURATION_REPORTED value
         * @property {number} BOOT_TIME_EVENT_ELAPSED_TIME_REPORTED=240 BOOT_TIME_EVENT_ELAPSED_TIME_REPORTED value
         * @property {number} BOOT_TIME_EVENT_UTC_TIME_REPORTED=241 BOOT_TIME_EVENT_UTC_TIME_REPORTED value
         * @property {number} BOOT_TIME_EVENT_ERROR_CODE_REPORTED=242 BOOT_TIME_EVENT_ERROR_CODE_REPORTED value
         * @property {number} USERSPACE_REBOOT_REPORTED=243 USERSPACE_REBOOT_REPORTED value
         * @property {number} NOTIFICATION_REPORTED=244 NOTIFICATION_REPORTED value
         * @property {number} NOTIFICATION_PANEL_REPORTED=245 NOTIFICATION_PANEL_REPORTED value
         * @property {number} NOTIFICATION_CHANNEL_MODIFIED=246 NOTIFICATION_CHANNEL_MODIFIED value
         * @property {number} INTEGRITY_CHECK_RESULT_REPORTED=247 INTEGRITY_CHECK_RESULT_REPORTED value
         * @property {number} INTEGRITY_RULES_PUSHED=248 INTEGRITY_RULES_PUSHED value
         * @property {number} CB_MESSAGE_REPORTED=249 CB_MESSAGE_REPORTED value
         * @property {number} CB_MESSAGE_ERROR=250 CB_MESSAGE_ERROR value
         * @property {number} WIFI_HEALTH_STAT_REPORTED=251 WIFI_HEALTH_STAT_REPORTED value
         * @property {number} WIFI_FAILURE_STAT_REPORTED=252 WIFI_FAILURE_STAT_REPORTED value
         * @property {number} WIFI_CONNECTION_RESULT_REPORTED=253 WIFI_CONNECTION_RESULT_REPORTED value
         * @property {number} APP_FREEZE_CHANGED=254 APP_FREEZE_CHANGED value
         * @property {number} SNAPSHOT_MERGE_REPORTED=255 SNAPSHOT_MERGE_REPORTED value
         * @property {number} FOREGROUND_SERVICE_APP_OP_SESSION_ENDED=256 FOREGROUND_SERVICE_APP_OP_SESSION_ENDED value
         * @property {number} DISPLAY_JANK_REPORTED=257 DISPLAY_JANK_REPORTED value
         * @property {number} APP_STANDBY_BUCKET_CHANGED=258 APP_STANDBY_BUCKET_CHANGED value
         * @property {number} SHARESHEET_STARTED=259 SHARESHEET_STARTED value
         * @property {number} RANKING_SELECTED=260 RANKING_SELECTED value
         * @property {number} TVSETTINGS_UI_INTERACTED=261 TVSETTINGS_UI_INTERACTED value
         * @property {number} LAUNCHER_SNAPSHOT=262 LAUNCHER_SNAPSHOT value
         * @property {number} PACKAGE_INSTALLER_V2_REPORTED=263 PACKAGE_INSTALLER_V2_REPORTED value
         * @property {number} USER_LIFECYCLE_JOURNEY_REPORTED=264 USER_LIFECYCLE_JOURNEY_REPORTED value
         * @property {number} USER_LIFECYCLE_EVENT_OCCURRED=265 USER_LIFECYCLE_EVENT_OCCURRED value
         * @property {number} ACCESSIBILITY_SHORTCUT_REPORTED=266 ACCESSIBILITY_SHORTCUT_REPORTED value
         * @property {number} ACCESSIBILITY_SERVICE_REPORTED=267 ACCESSIBILITY_SERVICE_REPORTED value
         * @property {number} DOCS_UI_DRAG_AND_DROP_REPORTED=268 DOCS_UI_DRAG_AND_DROP_REPORTED value
         * @property {number} APP_USAGE_EVENT_OCCURRED=269 APP_USAGE_EVENT_OCCURRED value
         * @property {number} AUTO_REVOKE_NOTIFICATION_CLICKED=270 AUTO_REVOKE_NOTIFICATION_CLICKED value
         * @property {number} AUTO_REVOKE_FRAGMENT_APP_VIEWED=271 AUTO_REVOKE_FRAGMENT_APP_VIEWED value
         * @property {number} AUTO_REVOKED_APP_INTERACTION=272 AUTO_REVOKED_APP_INTERACTION value
         * @property {number} APP_PERMISSION_GROUPS_FRAGMENT_AUTO_REVOKE_ACTION=273 APP_PERMISSION_GROUPS_FRAGMENT_AUTO_REVOKE_ACTION value
         * @property {number} EVS_USAGE_STATS_REPORTED=274 EVS_USAGE_STATS_REPORTED value
         * @property {number} AUDIO_POWER_USAGE_DATA_REPORTED=275 AUDIO_POWER_USAGE_DATA_REPORTED value
         * @property {number} TV_TUNER_STATE_CHANGED=276 TV_TUNER_STATE_CHANGED value
         * @property {number} MEDIAOUTPUT_OP_SWITCH_REPORTED=277 MEDIAOUTPUT_OP_SWITCH_REPORTED value
         * @property {number} CB_MESSAGE_FILTERED=278 CB_MESSAGE_FILTERED value
         * @property {number} TV_TUNER_DVR_STATUS=279 TV_TUNER_DVR_STATUS value
         * @property {number} TV_CAS_SESSION_OPEN_STATUS=280 TV_CAS_SESSION_OPEN_STATUS value
         * @property {number} ASSISTANT_INVOCATION_REPORTED=281 ASSISTANT_INVOCATION_REPORTED value
         * @property {number} DISPLAY_WAKE_REPORTED=282 DISPLAY_WAKE_REPORTED value
         * @property {number} CAR_USER_HAL_MODIFY_USER_REQUEST_REPORTED=283 CAR_USER_HAL_MODIFY_USER_REQUEST_REPORTED value
         * @property {number} CAR_USER_HAL_MODIFY_USER_RESPONSE_REPORTED=284 CAR_USER_HAL_MODIFY_USER_RESPONSE_REPORTED value
         * @property {number} CAR_USER_HAL_POST_SWITCH_RESPONSE_REPORTED=285 CAR_USER_HAL_POST_SWITCH_RESPONSE_REPORTED value
         * @property {number} CAR_USER_HAL_INITIAL_USER_INFO_REQUEST_REPORTED=286 CAR_USER_HAL_INITIAL_USER_INFO_REQUEST_REPORTED value
         * @property {number} CAR_USER_HAL_INITIAL_USER_INFO_RESPONSE_REPORTED=287 CAR_USER_HAL_INITIAL_USER_INFO_RESPONSE_REPORTED value
         * @property {number} CAR_USER_HAL_USER_ASSOCIATION_REQUEST_REPORTED=288 CAR_USER_HAL_USER_ASSOCIATION_REQUEST_REPORTED value
         * @property {number} CAR_USER_HAL_SET_USER_ASSOCIATION_RESPONSE_REPORTED=289 CAR_USER_HAL_SET_USER_ASSOCIATION_RESPONSE_REPORTED value
         * @property {number} NETWORK_IP_PROVISIONING_REPORTED=290 NETWORK_IP_PROVISIONING_REPORTED value
         * @property {number} NETWORK_DHCP_RENEW_REPORTED=291 NETWORK_DHCP_RENEW_REPORTED value
         * @property {number} NETWORK_VALIDATION_REPORTED=292 NETWORK_VALIDATION_REPORTED value
         * @property {number} NETWORK_STACK_QUIRK_REPORTED=293 NETWORK_STACK_QUIRK_REPORTED value
         * @property {number} MEDIAMETRICS_AUDIORECORDDEVICEUSAGE_REPORTED=294 MEDIAMETRICS_AUDIORECORDDEVICEUSAGE_REPORTED value
         * @property {number} MEDIAMETRICS_AUDIOTHREADDEVICEUSAGE_REPORTED=295 MEDIAMETRICS_AUDIOTHREADDEVICEUSAGE_REPORTED value
         * @property {number} MEDIAMETRICS_AUDIOTRACKDEVICEUSAGE_REPORTED=296 MEDIAMETRICS_AUDIOTRACKDEVICEUSAGE_REPORTED value
         * @property {number} MEDIAMETRICS_AUDIODEVICECONNECTION_REPORTED=297 MEDIAMETRICS_AUDIODEVICECONNECTION_REPORTED value
         * @property {number} BLOB_COMMITTED=298 BLOB_COMMITTED value
         * @property {number} BLOB_LEASED=299 BLOB_LEASED value
         * @property {number} BLOB_OPENED=300 BLOB_OPENED value
         * @property {number} CONTACTS_PROVIDER_STATUS_REPORTED=301 CONTACTS_PROVIDER_STATUS_REPORTED value
         * @property {number} KEYSTORE_KEY_EVENT_REPORTED=302 KEYSTORE_KEY_EVENT_REPORTED value
         * @property {number} NETWORK_TETHERING_REPORTED=303 NETWORK_TETHERING_REPORTED value
         * @property {number} IME_TOUCH_REPORTED=304 IME_TOUCH_REPORTED value
         * @property {number} UI_INTERACTION_FRAME_INFO_REPORTED=305 UI_INTERACTION_FRAME_INFO_REPORTED value
         * @property {number} UI_ACTION_LATENCY_REPORTED=306 UI_ACTION_LATENCY_REPORTED value
         * @property {number} WIFI_DISCONNECT_REPORTED=307 WIFI_DISCONNECT_REPORTED value
         * @property {number} WIFI_CONNECTION_STATE_CHANGED=308 WIFI_CONNECTION_STATE_CHANGED value
         * @property {number} HDMI_CEC_ACTIVE_SOURCE_CHANGED=309 HDMI_CEC_ACTIVE_SOURCE_CHANGED value
         * @property {number} HDMI_CEC_MESSAGE_REPORTED=310 HDMI_CEC_MESSAGE_REPORTED value
         * @property {number} AIRPLANE_MODE=311 AIRPLANE_MODE value
         * @property {number} MODEM_RESTART=312 MODEM_RESTART value
         * @property {number} CARRIER_ID_MISMATCH_REPORTED=313 CARRIER_ID_MISMATCH_REPORTED value
         * @property {number} CARRIER_ID_TABLE_UPDATED=314 CARRIER_ID_TABLE_UPDATED value
         * @property {number} DATA_STALL_RECOVERY_REPORTED=315 DATA_STALL_RECOVERY_REPORTED value
         * @property {number} MEDIAMETRICS_MEDIAPARSER_REPORTED=316 MEDIAMETRICS_MEDIAPARSER_REPORTED value
         * @property {number} TLS_HANDSHAKE_REPORTED=317 TLS_HANDSHAKE_REPORTED value
         * @property {number} TEXT_CLASSIFIER_API_USAGE_REPORTED=318 TEXT_CLASSIFIER_API_USAGE_REPORTED value
         * @property {number} CAR_WATCHDOG_KILL_STATS_REPORTED=319 CAR_WATCHDOG_KILL_STATS_REPORTED value
         * @property {number} MEDIAMETRICS_PLAYBACK_REPORTED=320 MEDIAMETRICS_PLAYBACK_REPORTED value
         * @property {number} MEDIA_NETWORK_INFO_CHANGED=321 MEDIA_NETWORK_INFO_CHANGED value
         * @property {number} MEDIA_PLAYBACK_STATE_CHANGED=322 MEDIA_PLAYBACK_STATE_CHANGED value
         * @property {number} MEDIA_PLAYBACK_ERROR_REPORTED=323 MEDIA_PLAYBACK_ERROR_REPORTED value
         * @property {number} MEDIA_PLAYBACK_TRACK_CHANGED=324 MEDIA_PLAYBACK_TRACK_CHANGED value
         * @property {number} WIFI_SCAN_REPORTED=325 WIFI_SCAN_REPORTED value
         * @property {number} WIFI_PNO_SCAN_REPORTED=326 WIFI_PNO_SCAN_REPORTED value
         * @property {number} TIF_TUNE_CHANGED=327 TIF_TUNE_CHANGED value
         * @property {number} AUTO_ROTATE_REPORTED=328 AUTO_ROTATE_REPORTED value
         * @property {number} PERFETTO_TRIGGER=329 PERFETTO_TRIGGER value
         * @property {number} TRANSCODING_DATA=330 TRANSCODING_DATA value
         * @property {number} IMS_SERVICE_ENTITLEMENT_UPDATED=331 IMS_SERVICE_ENTITLEMENT_UPDATED value
         * @property {number} ART_DATUM_REPORTED=332 ART_DATUM_REPORTED value
         * @property {number} DEVICE_ROTATED=333 DEVICE_ROTATED value
         * @property {number} SIM_SPECIFIC_SETTINGS_RESTORED=334 SIM_SPECIFIC_SETTINGS_RESTORED value
         * @property {number} PIN_STORAGE_EVENT=336 PIN_STORAGE_EVENT value
         * @property {number} FACE_DOWN_REPORTED=337 FACE_DOWN_REPORTED value
         * @property {number} BLUETOOTH_HAL_CRASH_REASON_REPORTED=338 BLUETOOTH_HAL_CRASH_REASON_REPORTED value
         * @property {number} REBOOT_ESCROW_PREPARATION_REPORTED=339 REBOOT_ESCROW_PREPARATION_REPORTED value
         * @property {number} REBOOT_ESCROW_LSKF_CAPTURE_REPORTED=340 REBOOT_ESCROW_LSKF_CAPTURE_REPORTED value
         * @property {number} REBOOT_ESCROW_REBOOT_REPORTED=341 REBOOT_ESCROW_REBOOT_REPORTED value
         * @property {number} BINDER_LATENCY_REPORTED=342 BINDER_LATENCY_REPORTED value
         * @property {number} MEDIAMETRICS_AAUDIOSTREAM_REPORTED=343 MEDIAMETRICS_AAUDIOSTREAM_REPORTED value
         * @property {number} MEDIA_TRANSCODING_SESSION_ENDED=344 MEDIA_TRANSCODING_SESSION_ENDED value
         * @property {number} MAGNIFICATION_USAGE_REPORTED=345 MAGNIFICATION_USAGE_REPORTED value
         * @property {number} MAGNIFICATION_MODE_WITH_IME_ON_REPORTED=346 MAGNIFICATION_MODE_WITH_IME_ON_REPORTED value
         * @property {number} APP_SEARCH_CALL_STATS_REPORTED=347 APP_SEARCH_CALL_STATS_REPORTED value
         * @property {number} APP_SEARCH_PUT_DOCUMENT_STATS_REPORTED=348 APP_SEARCH_PUT_DOCUMENT_STATS_REPORTED value
         * @property {number} DEVICE_CONTROL_CHANGED=349 DEVICE_CONTROL_CHANGED value
         * @property {number} DEVICE_STATE_CHANGED=350 DEVICE_STATE_CHANGED value
         * @property {number} INPUTDEVICE_REGISTERED=351 INPUTDEVICE_REGISTERED value
         * @property {number} SMARTSPACE_CARD_REPORTED=352 SMARTSPACE_CARD_REPORTED value
         * @property {number} AUTH_PROMPT_AUTHENTICATE_INVOKED=353 AUTH_PROMPT_AUTHENTICATE_INVOKED value
         * @property {number} AUTH_MANAGER_CAN_AUTHENTICATE_INVOKED=354 AUTH_MANAGER_CAN_AUTHENTICATE_INVOKED value
         * @property {number} AUTH_ENROLL_ACTION_INVOKED=355 AUTH_ENROLL_ACTION_INVOKED value
         * @property {number} AUTH_DEPRECATED_API_USED=356 AUTH_DEPRECATED_API_USED value
         * @property {number} UNATTENDED_REBOOT_OCCURRED=357 UNATTENDED_REBOOT_OCCURRED value
         * @property {number} LONG_REBOOT_BLOCKING_REPORTED=358 LONG_REBOOT_BLOCKING_REPORTED value
         * @property {number} LOCATION_TIME_ZONE_PROVIDER_STATE_CHANGED=359 LOCATION_TIME_ZONE_PROVIDER_STATE_CHANGED value
         * @property {number} FDTRACK_EVENT_OCCURRED=364 FDTRACK_EVENT_OCCURRED value
         * @property {number} TIMEOUT_AUTO_EXTENDED_REPORTED=365 TIMEOUT_AUTO_EXTENDED_REPORTED value
         * @property {number} ODREFRESH_REPORTED=366 ODREFRESH_REPORTED value
         * @property {number} ALARM_BATCH_DELIVERED=367 ALARM_BATCH_DELIVERED value
         * @property {number} ALARM_SCHEDULED=368 ALARM_SCHEDULED value
         * @property {number} CAR_WATCHDOG_IO_OVERUSE_STATS_REPORTED=369 CAR_WATCHDOG_IO_OVERUSE_STATS_REPORTED value
         * @property {number} USER_LEVEL_HIBERNATION_STATE_CHANGED=370 USER_LEVEL_HIBERNATION_STATE_CHANGED value
         * @property {number} APP_SEARCH_INITIALIZE_STATS_REPORTED=371 APP_SEARCH_INITIALIZE_STATS_REPORTED value
         * @property {number} APP_SEARCH_QUERY_STATS_REPORTED=372 APP_SEARCH_QUERY_STATS_REPORTED value
         * @property {number} APP_PROCESS_DIED=373 APP_PROCESS_DIED value
         * @property {number} NETWORK_IP_REACHABILITY_MONITOR_REPORTED=374 NETWORK_IP_REACHABILITY_MONITOR_REPORTED value
         * @property {number} SLOW_INPUT_EVENT_REPORTED=375 SLOW_INPUT_EVENT_REPORTED value
         * @property {number} ANR_OCCURRED_PROCESSING_STARTED=376 ANR_OCCURRED_PROCESSING_STARTED value
         * @property {number} APP_SEARCH_REMOVE_STATS_REPORTED=377 APP_SEARCH_REMOVE_STATS_REPORTED value
         * @property {number} MEDIA_CODEC_REPORTED=378 MEDIA_CODEC_REPORTED value
         * @property {number} PERMISSION_USAGE_FRAGMENT_INTERACTION=379 PERMISSION_USAGE_FRAGMENT_INTERACTION value
         * @property {number} PERMISSION_DETAILS_INTERACTION=380 PERMISSION_DETAILS_INTERACTION value
         * @property {number} PRIVACY_SENSOR_TOGGLE_INTERACTION=381 PRIVACY_SENSOR_TOGGLE_INTERACTION value
         * @property {number} PRIVACY_TOGGLE_DIALOG_INTERACTION=382 PRIVACY_TOGGLE_DIALOG_INTERACTION value
         * @property {number} APP_SEARCH_OPTIMIZE_STATS_REPORTED=383 APP_SEARCH_OPTIMIZE_STATS_REPORTED value
         * @property {number} APP_COMPAT_STATE_CHANGED=386 APP_COMPAT_STATE_CHANGED value
         * @property {number} SIZE_COMPAT_RESTART_BUTTON_EVENT_REPORTED=387 SIZE_COMPAT_RESTART_BUTTON_EVENT_REPORTED value
         * @property {number} SPLITSCREEN_UI_CHANGED=388 SPLITSCREEN_UI_CHANGED value
         * @property {number} BLUETOOTH_CODE_PATH_COUNTER=390 BLUETOOTH_CODE_PATH_COUNTER value
         * @property {number} BLUETOOTH_LE_BATCH_SCAN_REPORT_DELAY=392 BLUETOOTH_LE_BATCH_SCAN_REPORT_DELAY value
         * @property {number} ACCESSIBILITY_FLOATING_MENU_UI_CHANGED=393 ACCESSIBILITY_FLOATING_MENU_UI_CHANGED value
         * @property {number} NEURALNETWORKS_COMPILATION_COMPLETED=394 NEURALNETWORKS_COMPILATION_COMPLETED value
         * @property {number} NEURALNETWORKS_EXECUTION_COMPLETED=395 NEURALNETWORKS_EXECUTION_COMPLETED value
         * @property {number} NEURALNETWORKS_COMPILATION_FAILED=396 NEURALNETWORKS_COMPILATION_FAILED value
         * @property {number} NEURALNETWORKS_EXECUTION_FAILED=397 NEURALNETWORKS_EXECUTION_FAILED value
         * @property {number} VM_CREATION_REQUESTED=409 VM_CREATION_REQUESTED value
         * @property {number} CAMERA_COMPAT_CONTROL_EVENT_REPORTED=411 CAMERA_COMPAT_CONTROL_EVENT_REPORTED value
         * @property {number} TRACING_SERVICE_REPORT_EVENT=424 TRACING_SERVICE_REPORT_EVENT value
         * @property {number} EARLY_BOOT_COMP_OS_ARTIFACTS_CHECK_REPORTED=419 EARLY_BOOT_COMP_OS_ARTIFACTS_CHECK_REPORTED value
         * @property {number} ISOLATED_COMPILATION_SCHEDULED=457 ISOLATED_COMPILATION_SCHEDULED value
         * @property {number} ISOLATED_COMPILATION_ENDED=458 ISOLATED_COMPILATION_ENDED value
         * @property {number} TELEPHONY_ANOMALY_DETECTED=461 TELEPHONY_ANOMALY_DETECTED value
         * @property {number} HOTWORD_DETECTOR_CREATE_REQUESTED=430 HOTWORD_DETECTOR_CREATE_REQUESTED value
         * @property {number} HOTWORD_DETECTION_SERVICE_INIT_RESULT_REPORTED=431 HOTWORD_DETECTION_SERVICE_INIT_RESULT_REPORTED value
         * @property {number} HOTWORD_DETECTION_SERVICE_RESTARTED=432 HOTWORD_DETECTION_SERVICE_RESTARTED value
         * @property {number} HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED=433 HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED value
         * @property {number} HOTWORD_DETECTOR_EVENTS=434 HOTWORD_DETECTOR_EVENTS value
         * @property {number} REMOTE_KEY_PROVISIONING_ATTEMPT=463 REMOTE_KEY_PROVISIONING_ATTEMPT value
         * @property {number} REMOTE_KEY_PROVISIONING_NETWORK_INFO=464 REMOTE_KEY_PROVISIONING_NETWORK_INFO value
         * @property {number} REMOTE_KEY_PROVISIONING_TIMING=465 REMOTE_KEY_PROVISIONING_TIMING value
         * @property {number} WIFI_BYTES_TRANSFER=10000 WIFI_BYTES_TRANSFER value
         * @property {number} WIFI_BYTES_TRANSFER_BY_FG_BG=10001 WIFI_BYTES_TRANSFER_BY_FG_BG value
         * @property {number} MOBILE_BYTES_TRANSFER=10002 MOBILE_BYTES_TRANSFER value
         * @property {number} MOBILE_BYTES_TRANSFER_BY_FG_BG=10003 MOBILE_BYTES_TRANSFER_BY_FG_BG value
         * @property {number} BLUETOOTH_BYTES_TRANSFER=10006 BLUETOOTH_BYTES_TRANSFER value
         * @property {number} KERNEL_WAKELOCK=10004 KERNEL_WAKELOCK value
         * @property {number} SUBSYSTEM_SLEEP_STATE=10005 SUBSYSTEM_SLEEP_STATE value
         * @property {number} CPU_TIME_PER_UID=10009 CPU_TIME_PER_UID value
         * @property {number} CPU_TIME_PER_UID_FREQ=10010 CPU_TIME_PER_UID_FREQ value
         * @property {number} WIFI_ACTIVITY_INFO=10011 WIFI_ACTIVITY_INFO value
         * @property {number} MODEM_ACTIVITY_INFO=10012 MODEM_ACTIVITY_INFO value
         * @property {number} BLUETOOTH_ACTIVITY_INFO=10007 BLUETOOTH_ACTIVITY_INFO value
         * @property {number} PROCESS_MEMORY_STATE=10013 PROCESS_MEMORY_STATE value
         * @property {number} SYSTEM_ELAPSED_REALTIME=10014 SYSTEM_ELAPSED_REALTIME value
         * @property {number} SYSTEM_UPTIME=10015 SYSTEM_UPTIME value
         * @property {number} CPU_ACTIVE_TIME=10016 CPU_ACTIVE_TIME value
         * @property {number} CPU_CLUSTER_TIME=10017 CPU_CLUSTER_TIME value
         * @property {number} DISK_SPACE=10018 DISK_SPACE value
         * @property {number} REMAINING_BATTERY_CAPACITY=10019 REMAINING_BATTERY_CAPACITY value
         * @property {number} FULL_BATTERY_CAPACITY=10020 FULL_BATTERY_CAPACITY value
         * @property {number} TEMPERATURE=10021 TEMPERATURE value
         * @property {number} BINDER_CALLS=10022 BINDER_CALLS value
         * @property {number} BINDER_CALLS_EXCEPTIONS=10023 BINDER_CALLS_EXCEPTIONS value
         * @property {number} LOOPER_STATS=10024 LOOPER_STATS value
         * @property {number} DISK_STATS=10025 DISK_STATS value
         * @property {number} DIRECTORY_USAGE=10026 DIRECTORY_USAGE value
         * @property {number} APP_SIZE=10027 APP_SIZE value
         * @property {number} CATEGORY_SIZE=10028 CATEGORY_SIZE value
         * @property {number} PROC_STATS=10029 PROC_STATS value
         * @property {number} BATTERY_VOLTAGE=10030 BATTERY_VOLTAGE value
         * @property {number} NUM_FINGERPRINTS_ENROLLED=10031 NUM_FINGERPRINTS_ENROLLED value
         * @property {number} DISK_IO=10032 DISK_IO value
         * @property {number} POWER_PROFILE=10033 POWER_PROFILE value
         * @property {number} PROC_STATS_PKG_PROC=10034 PROC_STATS_PKG_PROC value
         * @property {number} PROCESS_CPU_TIME=10035 PROCESS_CPU_TIME value
         * @property {number} CPU_TIME_PER_THREAD_FREQ=10037 CPU_TIME_PER_THREAD_FREQ value
         * @property {number} ON_DEVICE_POWER_MEASUREMENT=10038 ON_DEVICE_POWER_MEASUREMENT value
         * @property {number} DEVICE_CALCULATED_POWER_USE=10039 DEVICE_CALCULATED_POWER_USE value
         * @property {number} DEVICE_CALCULATED_POWER_BLAME_UID=10040 DEVICE_CALCULATED_POWER_BLAME_UID value
         * @property {number} DEVICE_CALCULATED_POWER_BLAME_OTHER=10041 DEVICE_CALCULATED_POWER_BLAME_OTHER value
         * @property {number} PROCESS_MEMORY_HIGH_WATER_MARK=10042 PROCESS_MEMORY_HIGH_WATER_MARK value
         * @property {number} BATTERY_LEVEL=10043 BATTERY_LEVEL value
         * @property {number} BUILD_INFORMATION=10044 BUILD_INFORMATION value
         * @property {number} BATTERY_CYCLE_COUNT=10045 BATTERY_CYCLE_COUNT value
         * @property {number} DEBUG_ELAPSED_CLOCK=10046 DEBUG_ELAPSED_CLOCK value
         * @property {number} DEBUG_FAILING_ELAPSED_CLOCK=10047 DEBUG_FAILING_ELAPSED_CLOCK value
         * @property {number} NUM_FACES_ENROLLED=10048 NUM_FACES_ENROLLED value
         * @property {number} ROLE_HOLDER=10049 ROLE_HOLDER value
         * @property {number} DANGEROUS_PERMISSION_STATE=10050 DANGEROUS_PERMISSION_STATE value
         * @property {number} TRAIN_INFO=10051 TRAIN_INFO value
         * @property {number} TIME_ZONE_DATA_INFO=10052 TIME_ZONE_DATA_INFO value
         * @property {number} EXTERNAL_STORAGE_INFO=10053 EXTERNAL_STORAGE_INFO value
         * @property {number} GPU_STATS_GLOBAL_INFO=10054 GPU_STATS_GLOBAL_INFO value
         * @property {number} GPU_STATS_APP_INFO=10055 GPU_STATS_APP_INFO value
         * @property {number} SYSTEM_ION_HEAP_SIZE=10056 SYSTEM_ION_HEAP_SIZE value
         * @property {number} APPS_ON_EXTERNAL_STORAGE_INFO=10057 APPS_ON_EXTERNAL_STORAGE_INFO value
         * @property {number} FACE_SETTINGS=10058 FACE_SETTINGS value
         * @property {number} COOLING_DEVICE=10059 COOLING_DEVICE value
         * @property {number} APP_OPS=10060 APP_OPS value
         * @property {number} PROCESS_SYSTEM_ION_HEAP_SIZE=10061 PROCESS_SYSTEM_ION_HEAP_SIZE value
         * @property {number} SURFACEFLINGER_STATS_GLOBAL_INFO=10062 SURFACEFLINGER_STATS_GLOBAL_INFO value
         * @property {number} SURFACEFLINGER_STATS_LAYER_INFO=10063 SURFACEFLINGER_STATS_LAYER_INFO value
         * @property {number} PROCESS_MEMORY_SNAPSHOT=10064 PROCESS_MEMORY_SNAPSHOT value
         * @property {number} VMS_CLIENT_STATS=10065 VMS_CLIENT_STATS value
         * @property {number} NOTIFICATION_REMOTE_VIEWS=10066 NOTIFICATION_REMOTE_VIEWS value
         * @property {number} DANGEROUS_PERMISSION_STATE_SAMPLED=10067 DANGEROUS_PERMISSION_STATE_SAMPLED value
         * @property {number} GRAPHICS_STATS=10068 GRAPHICS_STATS value
         * @property {number} RUNTIME_APP_OP_ACCESS=10069 RUNTIME_APP_OP_ACCESS value
         * @property {number} ION_HEAP_SIZE=10070 ION_HEAP_SIZE value
         * @property {number} PACKAGE_NOTIFICATION_PREFERENCES=10071 PACKAGE_NOTIFICATION_PREFERENCES value
         * @property {number} PACKAGE_NOTIFICATION_CHANNEL_PREFERENCES=10072 PACKAGE_NOTIFICATION_CHANNEL_PREFERENCES value
         * @property {number} PACKAGE_NOTIFICATION_CHANNEL_GROUP_PREFERENCES=10073 PACKAGE_NOTIFICATION_CHANNEL_GROUP_PREFERENCES value
         * @property {number} GNSS_STATS=10074 GNSS_STATS value
         * @property {number} ATTRIBUTED_APP_OPS=10075 ATTRIBUTED_APP_OPS value
         * @property {number} VOICE_CALL_SESSION=10076 VOICE_CALL_SESSION value
         * @property {number} VOICE_CALL_RAT_USAGE=10077 VOICE_CALL_RAT_USAGE value
         * @property {number} SIM_SLOT_STATE=10078 SIM_SLOT_STATE value
         * @property {number} SUPPORTED_RADIO_ACCESS_FAMILY=10079 SUPPORTED_RADIO_ACCESS_FAMILY value
         * @property {number} SETTING_SNAPSHOT=10080 SETTING_SNAPSHOT value
         * @property {number} BLOB_INFO=10081 BLOB_INFO value
         * @property {number} DATA_USAGE_BYTES_TRANSFER=10082 DATA_USAGE_BYTES_TRANSFER value
         * @property {number} BYTES_TRANSFER_BY_TAG_AND_METERED=10083 BYTES_TRANSFER_BY_TAG_AND_METERED value
         * @property {number} DND_MODE_RULE=10084 DND_MODE_RULE value
         * @property {number} GENERAL_EXTERNAL_STORAGE_ACCESS_STATS=10085 GENERAL_EXTERNAL_STORAGE_ACCESS_STATS value
         * @property {number} INCOMING_SMS=10086 INCOMING_SMS value
         * @property {number} OUTGOING_SMS=10087 OUTGOING_SMS value
         * @property {number} CARRIER_ID_TABLE_VERSION=10088 CARRIER_ID_TABLE_VERSION value
         * @property {number} DATA_CALL_SESSION=10089 DATA_CALL_SESSION value
         * @property {number} CELLULAR_SERVICE_STATE=10090 CELLULAR_SERVICE_STATE value
         * @property {number} CELLULAR_DATA_SERVICE_SWITCH=10091 CELLULAR_DATA_SERVICE_SWITCH value
         * @property {number} SYSTEM_MEMORY=10092 SYSTEM_MEMORY value
         * @property {number} IMS_REGISTRATION_TERMINATION=10093 IMS_REGISTRATION_TERMINATION value
         * @property {number} IMS_REGISTRATION_STATS=10094 IMS_REGISTRATION_STATS value
         * @property {number} CPU_TIME_PER_CLUSTER_FREQ=10095 CPU_TIME_PER_CLUSTER_FREQ value
         * @property {number} CPU_CYCLES_PER_UID_CLUSTER=10096 CPU_CYCLES_PER_UID_CLUSTER value
         * @property {number} DEVICE_ROTATED_DATA=10097 DEVICE_ROTATED_DATA value
         * @property {number} CPU_CYCLES_PER_THREAD_GROUP_CLUSTER=10098 CPU_CYCLES_PER_THREAD_GROUP_CLUSTER value
         * @property {number} MEDIA_DRM_ACTIVITY_INFO=10099 MEDIA_DRM_ACTIVITY_INFO value
         * @property {number} OEM_MANAGED_BYTES_TRANSFER=10100 OEM_MANAGED_BYTES_TRANSFER value
         * @property {number} GNSS_POWER_STATS=10101 GNSS_POWER_STATS value
         * @property {number} TIME_ZONE_DETECTOR_STATE=10102 TIME_ZONE_DETECTOR_STATE value
         * @property {number} KEYSTORE2_STORAGE_STATS=10103 KEYSTORE2_STORAGE_STATS value
         * @property {number} RKP_POOL_STATS=10104 RKP_POOL_STATS value
         * @property {number} PROCESS_DMABUF_MEMORY=10105 PROCESS_DMABUF_MEMORY value
         * @property {number} PENDING_ALARM_INFO=10106 PENDING_ALARM_INFO value
         * @property {number} USER_LEVEL_HIBERNATED_APPS=10107 USER_LEVEL_HIBERNATED_APPS value
         * @property {number} LAUNCHER_LAYOUT_SNAPSHOT=10108 LAUNCHER_LAYOUT_SNAPSHOT value
         * @property {number} GLOBAL_HIBERNATED_APPS=10109 GLOBAL_HIBERNATED_APPS value
         * @property {number} INPUT_EVENT_LATENCY_SKETCH=10110 INPUT_EVENT_LATENCY_SKETCH value
         * @property {number} BATTERY_USAGE_STATS_BEFORE_RESET=10111 BATTERY_USAGE_STATS_BEFORE_RESET value
         * @property {number} BATTERY_USAGE_STATS_SINCE_RESET=10112 BATTERY_USAGE_STATS_SINCE_RESET value
         * @property {number} BATTERY_USAGE_STATS_SINCE_RESET_USING_POWER_PROFILE_MODEL=10113 BATTERY_USAGE_STATS_SINCE_RESET_USING_POWER_PROFILE_MODEL value
         * @property {number} INSTALLED_INCREMENTAL_PACKAGE=10114 INSTALLED_INCREMENTAL_PACKAGE value
         * @property {number} TELEPHONY_NETWORK_REQUESTS=10115 TELEPHONY_NETWORK_REQUESTS value
         * @property {number} APP_SEARCH_STORAGE_INFO=10116 APP_SEARCH_STORAGE_INFO value
         * @property {number} VMSTAT=10117 VMSTAT value
         * @property {number} KEYSTORE2_KEY_CREATION_WITH_GENERAL_INFO=10118 KEYSTORE2_KEY_CREATION_WITH_GENERAL_INFO value
         * @property {number} KEYSTORE2_KEY_CREATION_WITH_AUTH_INFO=10119 KEYSTORE2_KEY_CREATION_WITH_AUTH_INFO value
         * @property {number} KEYSTORE2_KEY_CREATION_WITH_PURPOSE_AND_MODES_INFO=10120 KEYSTORE2_KEY_CREATION_WITH_PURPOSE_AND_MODES_INFO value
         * @property {number} KEYSTORE2_ATOM_WITH_OVERFLOW=10121 KEYSTORE2_ATOM_WITH_OVERFLOW value
         * @property {number} KEYSTORE2_KEY_OPERATION_WITH_PURPOSE_AND_MODES_INFO=10122 KEYSTORE2_KEY_OPERATION_WITH_PURPOSE_AND_MODES_INFO value
         * @property {number} KEYSTORE2_KEY_OPERATION_WITH_GENERAL_INFO=10123 KEYSTORE2_KEY_OPERATION_WITH_GENERAL_INFO value
         * @property {number} RKP_ERROR_STATS=10124 RKP_ERROR_STATS value
         * @property {number} KEYSTORE2_CRASH_STATS=10125 KEYSTORE2_CRASH_STATS value
         * @property {number} ACCESSIBILITY_SHORTCUT_STATS=10127 ACCESSIBILITY_SHORTCUT_STATS value
         * @property {number} ACCESSIBILITY_FLOATING_MENU_STATS=10128 ACCESSIBILITY_FLOATING_MENU_STATS value
         * @property {number} CAR_WATCHDOG_SYSTEM_IO_USAGE_SUMMARY=10131 CAR_WATCHDOG_SYSTEM_IO_USAGE_SUMMARY value
         * @property {number} CAR_WATCHDOG_UID_IO_USAGE_SUMMARY=10132 CAR_WATCHDOG_UID_IO_USAGE_SUMMARY value
         * @property {number} IMS_REGISTRATION_FEATURE_TAG_STATS=10133 IMS_REGISTRATION_FEATURE_TAG_STATS value
         * @property {number} RCS_CLIENT_PROVISIONING_STATS=10134 RCS_CLIENT_PROVISIONING_STATS value
         * @property {number} RCS_ACS_PROVISIONING_STATS=10135 RCS_ACS_PROVISIONING_STATS value
         * @property {number} SIP_DELEGATE_STATS=10136 SIP_DELEGATE_STATS value
         * @property {number} SIP_TRANSPORT_FEATURE_TAG_STATS=10137 SIP_TRANSPORT_FEATURE_TAG_STATS value
         * @property {number} SIP_MESSAGE_RESPONSE=10138 SIP_MESSAGE_RESPONSE value
         * @property {number} SIP_TRANSPORT_SESSION=10139 SIP_TRANSPORT_SESSION value
         * @property {number} IMS_DEDICATED_BEARER_LISTENER_EVENT=10140 IMS_DEDICATED_BEARER_LISTENER_EVENT value
         * @property {number} IMS_DEDICATED_BEARER_EVENT=10141 IMS_DEDICATED_BEARER_EVENT value
         * @property {number} IMS_REGISTRATION_SERVICE_DESC_STATS=10142 IMS_REGISTRATION_SERVICE_DESC_STATS value
         * @property {number} UCE_EVENT_STATS=10143 UCE_EVENT_STATS value
         * @property {number} PRESENCE_NOTIFY_EVENT=10144 PRESENCE_NOTIFY_EVENT value
         * @property {number} GBA_EVENT=10145 GBA_EVENT value
         * @property {number} REMOTE_KEY_PROVISIONING_ERROR_COUNTS=10155 REMOTE_KEY_PROVISIONING_ERROR_COUNTS value
         */
        protos.AtomId = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[2] = "BLE_SCAN_STATE_CHANGED"] = 2;
            values[valuesById[3] = "PROCESS_STATE_CHANGED"] = 3;
            values[valuesById[4] = "BLE_SCAN_RESULT_RECEIVED"] = 4;
            values[valuesById[5] = "SENSOR_STATE_CHANGED"] = 5;
            values[valuesById[6] = "GPS_SCAN_STATE_CHANGED"] = 6;
            values[valuesById[7] = "SYNC_STATE_CHANGED"] = 7;
            values[valuesById[8] = "SCHEDULED_JOB_STATE_CHANGED"] = 8;
            values[valuesById[9] = "SCREEN_BRIGHTNESS_CHANGED"] = 9;
            values[valuesById[10] = "WAKELOCK_STATE_CHANGED"] = 10;
            values[valuesById[11] = "LONG_PARTIAL_WAKELOCK_STATE_CHANGED"] = 11;
            values[valuesById[12] = "MOBILE_RADIO_POWER_STATE_CHANGED"] = 12;
            values[valuesById[13] = "WIFI_RADIO_POWER_STATE_CHANGED"] = 13;
            values[valuesById[14] = "ACTIVITY_MANAGER_SLEEP_STATE_CHANGED"] = 14;
            values[valuesById[15] = "MEMORY_FACTOR_STATE_CHANGED"] = 15;
            values[valuesById[16] = "EXCESSIVE_CPU_USAGE_REPORTED"] = 16;
            values[valuesById[17] = "CACHED_KILL_REPORTED"] = 17;
            values[valuesById[18] = "PROCESS_MEMORY_STAT_REPORTED"] = 18;
            values[valuesById[19] = "LAUNCHER_EVENT"] = 19;
            values[valuesById[20] = "BATTERY_SAVER_MODE_STATE_CHANGED"] = 20;
            values[valuesById[21] = "DEVICE_IDLE_MODE_STATE_CHANGED"] = 21;
            values[valuesById[22] = "DEVICE_IDLING_MODE_STATE_CHANGED"] = 22;
            values[valuesById[23] = "AUDIO_STATE_CHANGED"] = 23;
            values[valuesById[24] = "MEDIA_CODEC_STATE_CHANGED"] = 24;
            values[valuesById[25] = "CAMERA_STATE_CHANGED"] = 25;
            values[valuesById[26] = "FLASHLIGHT_STATE_CHANGED"] = 26;
            values[valuesById[27] = "UID_PROCESS_STATE_CHANGED"] = 27;
            values[valuesById[28] = "PROCESS_LIFE_CYCLE_STATE_CHANGED"] = 28;
            values[valuesById[29] = "SCREEN_STATE_CHANGED"] = 29;
            values[valuesById[30] = "BATTERY_LEVEL_CHANGED"] = 30;
            values[valuesById[31] = "CHARGING_STATE_CHANGED"] = 31;
            values[valuesById[32] = "PLUGGED_STATE_CHANGED"] = 32;
            values[valuesById[33] = "INTERACTIVE_STATE_CHANGED"] = 33;
            values[valuesById[34] = "TOUCH_EVENT_REPORTED"] = 34;
            values[valuesById[35] = "WAKEUP_ALARM_OCCURRED"] = 35;
            values[valuesById[36] = "KERNEL_WAKEUP_REPORTED"] = 36;
            values[valuesById[37] = "WIFI_LOCK_STATE_CHANGED"] = 37;
            values[valuesById[38] = "WIFI_SIGNAL_STRENGTH_CHANGED"] = 38;
            values[valuesById[39] = "WIFI_SCAN_STATE_CHANGED"] = 39;
            values[valuesById[40] = "PHONE_SIGNAL_STRENGTH_CHANGED"] = 40;
            values[valuesById[41] = "SETTING_CHANGED"] = 41;
            values[valuesById[42] = "ACTIVITY_FOREGROUND_STATE_CHANGED"] = 42;
            values[valuesById[43] = "ISOLATED_UID_CHANGED"] = 43;
            values[valuesById[44] = "PACKET_WAKEUP_OCCURRED"] = 44;
            values[valuesById[45] = "WALL_CLOCK_TIME_SHIFTED"] = 45;
            values[valuesById[46] = "ANOMALY_DETECTED"] = 46;
            values[valuesById[47] = "APP_BREADCRUMB_REPORTED"] = 47;
            values[valuesById[48] = "APP_START_OCCURRED"] = 48;
            values[valuesById[49] = "APP_START_CANCELED"] = 49;
            values[valuesById[50] = "APP_START_FULLY_DRAWN"] = 50;
            values[valuesById[51] = "LMK_KILL_OCCURRED"] = 51;
            values[valuesById[52] = "PICTURE_IN_PICTURE_STATE_CHANGED"] = 52;
            values[valuesById[53] = "WIFI_MULTICAST_LOCK_STATE_CHANGED"] = 53;
            values[valuesById[54] = "LMK_STATE_CHANGED"] = 54;
            values[valuesById[55] = "APP_START_MEMORY_STATE_CAPTURED"] = 55;
            values[valuesById[56] = "SHUTDOWN_SEQUENCE_REPORTED"] = 56;
            values[valuesById[57] = "BOOT_SEQUENCE_REPORTED"] = 57;
            values[valuesById[58] = "DAVEY_OCCURRED"] = 58;
            values[valuesById[59] = "OVERLAY_STATE_CHANGED"] = 59;
            values[valuesById[60] = "FOREGROUND_SERVICE_STATE_CHANGED"] = 60;
            values[valuesById[61] = "CALL_STATE_CHANGED"] = 61;
            values[valuesById[62] = "KEYGUARD_STATE_CHANGED"] = 62;
            values[valuesById[63] = "KEYGUARD_BOUNCER_STATE_CHANGED"] = 63;
            values[valuesById[64] = "KEYGUARD_BOUNCER_PASSWORD_ENTERED"] = 64;
            values[valuesById[65] = "APP_DIED"] = 65;
            values[valuesById[66] = "RESOURCE_CONFIGURATION_CHANGED"] = 66;
            values[valuesById[67] = "BLUETOOTH_ENABLED_STATE_CHANGED"] = 67;
            values[valuesById[68] = "BLUETOOTH_CONNECTION_STATE_CHANGED"] = 68;
            values[valuesById[69] = "GPS_SIGNAL_QUALITY_CHANGED"] = 69;
            values[valuesById[70] = "USB_CONNECTOR_STATE_CHANGED"] = 70;
            values[valuesById[71] = "SPEAKER_IMPEDANCE_REPORTED"] = 71;
            values[valuesById[72] = "HARDWARE_FAILED"] = 72;
            values[valuesById[73] = "PHYSICAL_DROP_DETECTED"] = 73;
            values[valuesById[74] = "CHARGE_CYCLES_REPORTED"] = 74;
            values[valuesById[75] = "MOBILE_CONNECTION_STATE_CHANGED"] = 75;
            values[valuesById[76] = "MOBILE_RADIO_TECHNOLOGY_CHANGED"] = 76;
            values[valuesById[77] = "USB_DEVICE_ATTACHED"] = 77;
            values[valuesById[78] = "APP_CRASH_OCCURRED"] = 78;
            values[valuesById[79] = "ANR_OCCURRED"] = 79;
            values[valuesById[80] = "WTF_OCCURRED"] = 80;
            values[valuesById[81] = "LOW_MEM_REPORTED"] = 81;
            values[valuesById[82] = "GENERIC_ATOM"] = 82;
            values[valuesById[83] = "KEY_VALUE_PAIRS_ATOM"] = 83;
            values[valuesById[84] = "VIBRATOR_STATE_CHANGED"] = 84;
            values[valuesById[85] = "DEFERRED_JOB_STATS_REPORTED"] = 85;
            values[valuesById[86] = "THERMAL_THROTTLING"] = 86;
            values[valuesById[87] = "BIOMETRIC_ACQUIRED"] = 87;
            values[valuesById[88] = "BIOMETRIC_AUTHENTICATED"] = 88;
            values[valuesById[89] = "BIOMETRIC_ERROR_OCCURRED"] = 89;
            values[valuesById[90] = "UI_EVENT_REPORTED"] = 90;
            values[valuesById[91] = "BATTERY_HEALTH_SNAPSHOT"] = 91;
            values[valuesById[92] = "SLOW_IO"] = 92;
            values[valuesById[93] = "BATTERY_CAUSED_SHUTDOWN"] = 93;
            values[valuesById[94] = "PHONE_SERVICE_STATE_CHANGED"] = 94;
            values[valuesById[95] = "PHONE_STATE_CHANGED"] = 95;
            values[valuesById[96] = "USER_RESTRICTION_CHANGED"] = 96;
            values[valuesById[97] = "SETTINGS_UI_CHANGED"] = 97;
            values[valuesById[98] = "CONNECTIVITY_STATE_CHANGED"] = 98;
            values[valuesById[99] = "SERVICE_STATE_CHANGED"] = 99;
            values[valuesById[100] = "SERVICE_LAUNCH_REPORTED"] = 100;
            values[valuesById[101] = "FLAG_FLIP_UPDATE_OCCURRED"] = 101;
            values[valuesById[102] = "BINARY_PUSH_STATE_CHANGED"] = 102;
            values[valuesById[103] = "DEVICE_POLICY_EVENT"] = 103;
            values[valuesById[104] = "DOCS_UI_FILE_OP_CANCELED"] = 104;
            values[valuesById[105] = "DOCS_UI_FILE_OP_COPY_MOVE_MODE_REPORTED"] = 105;
            values[valuesById[106] = "DOCS_UI_FILE_OP_FAILURE"] = 106;
            values[valuesById[107] = "DOCS_UI_PROVIDER_FILE_OP"] = 107;
            values[valuesById[108] = "DOCS_UI_INVALID_SCOPED_ACCESS_REQUEST"] = 108;
            values[valuesById[109] = "DOCS_UI_LAUNCH_REPORTED"] = 109;
            values[valuesById[110] = "DOCS_UI_ROOT_VISITED"] = 110;
            values[valuesById[111] = "DOCS_UI_STARTUP_MS"] = 111;
            values[valuesById[112] = "DOCS_UI_USER_ACTION_REPORTED"] = 112;
            values[valuesById[113] = "WIFI_ENABLED_STATE_CHANGED"] = 113;
            values[valuesById[114] = "WIFI_RUNNING_STATE_CHANGED"] = 114;
            values[valuesById[115] = "APP_COMPACTED"] = 115;
            values[valuesById[116] = "NETWORK_DNS_EVENT_REPORTED"] = 116;
            values[valuesById[117] = "DOCS_UI_PICKER_LAUNCHED_FROM_REPORTED"] = 117;
            values[valuesById[118] = "DOCS_UI_PICK_RESULT_REPORTED"] = 118;
            values[valuesById[119] = "DOCS_UI_SEARCH_MODE_REPORTED"] = 119;
            values[valuesById[120] = "DOCS_UI_SEARCH_TYPE_REPORTED"] = 120;
            values[valuesById[121] = "DATA_STALL_EVENT"] = 121;
            values[valuesById[122] = "RESCUE_PARTY_RESET_REPORTED"] = 122;
            values[valuesById[123] = "SIGNED_CONFIG_REPORTED"] = 123;
            values[valuesById[124] = "GNSS_NI_EVENT_REPORTED"] = 124;
            values[valuesById[125] = "BLUETOOTH_LINK_LAYER_CONNECTION_EVENT"] = 125;
            values[valuesById[126] = "BLUETOOTH_ACL_CONNECTION_STATE_CHANGED"] = 126;
            values[valuesById[127] = "BLUETOOTH_SCO_CONNECTION_STATE_CHANGED"] = 127;
            values[valuesById[128] = "APP_DOWNGRADED"] = 128;
            values[valuesById[129] = "APP_OPTIMIZED_AFTER_DOWNGRADED"] = 129;
            values[valuesById[130] = "LOW_STORAGE_STATE_CHANGED"] = 130;
            values[valuesById[131] = "GNSS_NFW_NOTIFICATION_REPORTED"] = 131;
            values[valuesById[132] = "GNSS_CONFIGURATION_REPORTED"] = 132;
            values[valuesById[133] = "USB_PORT_OVERHEAT_EVENT_REPORTED"] = 133;
            values[valuesById[134] = "NFC_ERROR_OCCURRED"] = 134;
            values[valuesById[135] = "NFC_STATE_CHANGED"] = 135;
            values[valuesById[136] = "NFC_BEAM_OCCURRED"] = 136;
            values[valuesById[137] = "NFC_CARDEMULATION_OCCURRED"] = 137;
            values[valuesById[138] = "NFC_TAG_OCCURRED"] = 138;
            values[valuesById[139] = "NFC_HCE_TRANSACTION_OCCURRED"] = 139;
            values[valuesById[140] = "SE_STATE_CHANGED"] = 140;
            values[valuesById[141] = "SE_OMAPI_REPORTED"] = 141;
            values[valuesById[142] = "BROADCAST_DISPATCH_LATENCY_REPORTED"] = 142;
            values[valuesById[143] = "ATTENTION_MANAGER_SERVICE_RESULT_REPORTED"] = 143;
            values[valuesById[144] = "ADB_CONNECTION_CHANGED"] = 144;
            values[valuesById[145] = "SPEECH_DSP_STAT_REPORTED"] = 145;
            values[valuesById[146] = "USB_CONTAMINANT_REPORTED"] = 146;
            values[valuesById[147] = "WATCHDOG_ROLLBACK_OCCURRED"] = 147;
            values[valuesById[148] = "BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED"] = 148;
            values[valuesById[149] = "BUBBLE_UI_CHANGED"] = 149;
            values[valuesById[150] = "SCHEDULED_JOB_CONSTRAINT_CHANGED"] = 150;
            values[valuesById[151] = "BLUETOOTH_ACTIVE_DEVICE_CHANGED"] = 151;
            values[valuesById[152] = "BLUETOOTH_A2DP_PLAYBACK_STATE_CHANGED"] = 152;
            values[valuesById[153] = "BLUETOOTH_A2DP_CODEC_CONFIG_CHANGED"] = 153;
            values[valuesById[154] = "BLUETOOTH_A2DP_CODEC_CAPABILITY_CHANGED"] = 154;
            values[valuesById[155] = "BLUETOOTH_A2DP_AUDIO_UNDERRUN_REPORTED"] = 155;
            values[valuesById[156] = "BLUETOOTH_A2DP_AUDIO_OVERRUN_REPORTED"] = 156;
            values[valuesById[157] = "BLUETOOTH_DEVICE_RSSI_REPORTED"] = 157;
            values[valuesById[158] = "BLUETOOTH_DEVICE_FAILED_CONTACT_COUNTER_REPORTED"] = 158;
            values[valuesById[159] = "BLUETOOTH_DEVICE_TX_POWER_LEVEL_REPORTED"] = 159;
            values[valuesById[160] = "BLUETOOTH_HCI_TIMEOUT_REPORTED"] = 160;
            values[valuesById[161] = "BLUETOOTH_QUALITY_REPORT_REPORTED"] = 161;
            values[valuesById[162] = "BLUETOOTH_DEVICE_INFO_REPORTED"] = 162;
            values[valuesById[163] = "BLUETOOTH_REMOTE_VERSION_INFO_REPORTED"] = 163;
            values[valuesById[164] = "BLUETOOTH_SDP_ATTRIBUTE_REPORTED"] = 164;
            values[valuesById[165] = "BLUETOOTH_BOND_STATE_CHANGED"] = 165;
            values[valuesById[166] = "BLUETOOTH_CLASSIC_PAIRING_EVENT_REPORTED"] = 166;
            values[valuesById[167] = "BLUETOOTH_SMP_PAIRING_EVENT_REPORTED"] = 167;
            values[valuesById[168] = "SCREEN_TIMEOUT_EXTENSION_REPORTED"] = 168;
            values[valuesById[169] = "PROCESS_START_TIME"] = 169;
            values[valuesById[170] = "PERMISSION_GRANT_REQUEST_RESULT_REPORTED"] = 170;
            values[valuesById[171] = "BLUETOOTH_SOCKET_CONNECTION_STATE_CHANGED"] = 171;
            values[valuesById[172] = "DEVICE_IDENTIFIER_ACCESS_DENIED"] = 172;
            values[valuesById[173] = "BUBBLE_DEVELOPER_ERROR_REPORTED"] = 173;
            values[valuesById[174] = "ASSIST_GESTURE_STAGE_REPORTED"] = 174;
            values[valuesById[175] = "ASSIST_GESTURE_FEEDBACK_REPORTED"] = 175;
            values[valuesById[176] = "ASSIST_GESTURE_PROGRESS_REPORTED"] = 176;
            values[valuesById[177] = "TOUCH_GESTURE_CLASSIFIED"] = 177;
            values[valuesById[178] = "HIDDEN_API_USED"] = 178;
            values[valuesById[179] = "STYLE_UI_CHANGED"] = 179;
            values[valuesById[180] = "PRIVACY_INDICATORS_INTERACTED"] = 180;
            values[valuesById[181] = "APP_INSTALL_ON_EXTERNAL_STORAGE_REPORTED"] = 181;
            values[valuesById[182] = "NETWORK_STACK_REPORTED"] = 182;
            values[valuesById[183] = "APP_MOVED_STORAGE_REPORTED"] = 183;
            values[valuesById[184] = "BIOMETRIC_ENROLLED"] = 184;
            values[valuesById[185] = "SYSTEM_SERVER_WATCHDOG_OCCURRED"] = 185;
            values[valuesById[186] = "TOMB_STONE_OCCURRED"] = 186;
            values[valuesById[187] = "BLUETOOTH_CLASS_OF_DEVICE_REPORTED"] = 187;
            values[valuesById[188] = "INTELLIGENCE_EVENT_REPORTED"] = 188;
            values[valuesById[189] = "THERMAL_THROTTLING_SEVERITY_STATE_CHANGED"] = 189;
            values[valuesById[190] = "ROLE_REQUEST_RESULT_REPORTED"] = 190;
            values[valuesById[191] = "MEDIAMETRICS_AUDIOPOLICY_REPORTED"] = 191;
            values[valuesById[192] = "MEDIAMETRICS_AUDIORECORD_REPORTED"] = 192;
            values[valuesById[193] = "MEDIAMETRICS_AUDIOTHREAD_REPORTED"] = 193;
            values[valuesById[194] = "MEDIAMETRICS_AUDIOTRACK_REPORTED"] = 194;
            values[valuesById[195] = "MEDIAMETRICS_CODEC_REPORTED"] = 195;
            values[valuesById[196] = "MEDIAMETRICS_DRM_WIDEVINE_REPORTED"] = 196;
            values[valuesById[197] = "MEDIAMETRICS_EXTRACTOR_REPORTED"] = 197;
            values[valuesById[198] = "MEDIAMETRICS_MEDIADRM_REPORTED"] = 198;
            values[valuesById[199] = "MEDIAMETRICS_NUPLAYER_REPORTED"] = 199;
            values[valuesById[200] = "MEDIAMETRICS_RECORDER_REPORTED"] = 200;
            values[valuesById[201] = "MEDIAMETRICS_DRMMANAGER_REPORTED"] = 201;
            values[valuesById[203] = "CAR_POWER_STATE_CHANGED"] = 203;
            values[valuesById[204] = "GARAGE_MODE_INFO"] = 204;
            values[valuesById[205] = "TEST_ATOM_REPORTED"] = 205;
            values[valuesById[206] = "CONTENT_CAPTURE_CALLER_MISMATCH_REPORTED"] = 206;
            values[valuesById[207] = "CONTENT_CAPTURE_SERVICE_EVENTS"] = 207;
            values[valuesById[208] = "CONTENT_CAPTURE_SESSION_EVENTS"] = 208;
            values[valuesById[209] = "CONTENT_CAPTURE_FLUSHED"] = 209;
            values[valuesById[210] = "LOCATION_MANAGER_API_USAGE_REPORTED"] = 210;
            values[valuesById[211] = "REVIEW_PERMISSIONS_FRAGMENT_RESULT_REPORTED"] = 211;
            values[valuesById[212] = "RUNTIME_PERMISSIONS_UPGRADE_RESULT"] = 212;
            values[valuesById[213] = "GRANT_PERMISSIONS_ACTIVITY_BUTTON_ACTIONS"] = 213;
            values[valuesById[214] = "LOCATION_ACCESS_CHECK_NOTIFICATION_ACTION"] = 214;
            values[valuesById[215] = "APP_PERMISSION_FRAGMENT_ACTION_REPORTED"] = 215;
            values[valuesById[216] = "APP_PERMISSION_FRAGMENT_VIEWED"] = 216;
            values[valuesById[217] = "APP_PERMISSIONS_FRAGMENT_VIEWED"] = 217;
            values[valuesById[218] = "PERMISSION_APPS_FRAGMENT_VIEWED"] = 218;
            values[valuesById[219] = "TEXT_SELECTION_EVENT"] = 219;
            values[valuesById[220] = "TEXT_LINKIFY_EVENT"] = 220;
            values[valuesById[221] = "CONVERSATION_ACTIONS_EVENT"] = 221;
            values[valuesById[222] = "LANGUAGE_DETECTION_EVENT"] = 222;
            values[valuesById[223] = "EXCLUSION_RECT_STATE_CHANGED"] = 223;
            values[valuesById[224] = "BACK_GESTURE_REPORTED_REPORTED"] = 224;
            values[valuesById[225] = "UPDATE_ENGINE_UPDATE_ATTEMPT_REPORTED"] = 225;
            values[valuesById[226] = "UPDATE_ENGINE_SUCCESSFUL_UPDATE_REPORTED"] = 226;
            values[valuesById[227] = "CAMERA_ACTION_EVENT"] = 227;
            values[valuesById[228] = "APP_COMPATIBILITY_CHANGE_REPORTED"] = 228;
            values[valuesById[229] = "PERFETTO_UPLOADED"] = 229;
            values[valuesById[230] = "VMS_CLIENT_CONNECTION_STATE_CHANGED"] = 230;
            values[valuesById[233] = "MEDIA_PROVIDER_SCAN_OCCURRED"] = 233;
            values[valuesById[234] = "MEDIA_CONTENT_DELETED"] = 234;
            values[valuesById[235] = "MEDIA_PROVIDER_PERMISSION_REQUESTED"] = 235;
            values[valuesById[236] = "MEDIA_PROVIDER_SCHEMA_CHANGED"] = 236;
            values[valuesById[237] = "MEDIA_PROVIDER_IDLE_MAINTENANCE_FINISHED"] = 237;
            values[valuesById[238] = "REBOOT_ESCROW_RECOVERY_REPORTED"] = 238;
            values[valuesById[239] = "BOOT_TIME_EVENT_DURATION_REPORTED"] = 239;
            values[valuesById[240] = "BOOT_TIME_EVENT_ELAPSED_TIME_REPORTED"] = 240;
            values[valuesById[241] = "BOOT_TIME_EVENT_UTC_TIME_REPORTED"] = 241;
            values[valuesById[242] = "BOOT_TIME_EVENT_ERROR_CODE_REPORTED"] = 242;
            values[valuesById[243] = "USERSPACE_REBOOT_REPORTED"] = 243;
            values[valuesById[244] = "NOTIFICATION_REPORTED"] = 244;
            values[valuesById[245] = "NOTIFICATION_PANEL_REPORTED"] = 245;
            values[valuesById[246] = "NOTIFICATION_CHANNEL_MODIFIED"] = 246;
            values[valuesById[247] = "INTEGRITY_CHECK_RESULT_REPORTED"] = 247;
            values[valuesById[248] = "INTEGRITY_RULES_PUSHED"] = 248;
            values[valuesById[249] = "CB_MESSAGE_REPORTED"] = 249;
            values[valuesById[250] = "CB_MESSAGE_ERROR"] = 250;
            values[valuesById[251] = "WIFI_HEALTH_STAT_REPORTED"] = 251;
            values[valuesById[252] = "WIFI_FAILURE_STAT_REPORTED"] = 252;
            values[valuesById[253] = "WIFI_CONNECTION_RESULT_REPORTED"] = 253;
            values[valuesById[254] = "APP_FREEZE_CHANGED"] = 254;
            values[valuesById[255] = "SNAPSHOT_MERGE_REPORTED"] = 255;
            values[valuesById[256] = "FOREGROUND_SERVICE_APP_OP_SESSION_ENDED"] = 256;
            values[valuesById[257] = "DISPLAY_JANK_REPORTED"] = 257;
            values[valuesById[258] = "APP_STANDBY_BUCKET_CHANGED"] = 258;
            values[valuesById[259] = "SHARESHEET_STARTED"] = 259;
            values[valuesById[260] = "RANKING_SELECTED"] = 260;
            values[valuesById[261] = "TVSETTINGS_UI_INTERACTED"] = 261;
            values[valuesById[262] = "LAUNCHER_SNAPSHOT"] = 262;
            values[valuesById[263] = "PACKAGE_INSTALLER_V2_REPORTED"] = 263;
            values[valuesById[264] = "USER_LIFECYCLE_JOURNEY_REPORTED"] = 264;
            values[valuesById[265] = "USER_LIFECYCLE_EVENT_OCCURRED"] = 265;
            values[valuesById[266] = "ACCESSIBILITY_SHORTCUT_REPORTED"] = 266;
            values[valuesById[267] = "ACCESSIBILITY_SERVICE_REPORTED"] = 267;
            values[valuesById[268] = "DOCS_UI_DRAG_AND_DROP_REPORTED"] = 268;
            values[valuesById[269] = "APP_USAGE_EVENT_OCCURRED"] = 269;
            values[valuesById[270] = "AUTO_REVOKE_NOTIFICATION_CLICKED"] = 270;
            values[valuesById[271] = "AUTO_REVOKE_FRAGMENT_APP_VIEWED"] = 271;
            values[valuesById[272] = "AUTO_REVOKED_APP_INTERACTION"] = 272;
            values[valuesById[273] = "APP_PERMISSION_GROUPS_FRAGMENT_AUTO_REVOKE_ACTION"] = 273;
            values[valuesById[274] = "EVS_USAGE_STATS_REPORTED"] = 274;
            values[valuesById[275] = "AUDIO_POWER_USAGE_DATA_REPORTED"] = 275;
            values[valuesById[276] = "TV_TUNER_STATE_CHANGED"] = 276;
            values[valuesById[277] = "MEDIAOUTPUT_OP_SWITCH_REPORTED"] = 277;
            values[valuesById[278] = "CB_MESSAGE_FILTERED"] = 278;
            values[valuesById[279] = "TV_TUNER_DVR_STATUS"] = 279;
            values[valuesById[280] = "TV_CAS_SESSION_OPEN_STATUS"] = 280;
            values[valuesById[281] = "ASSISTANT_INVOCATION_REPORTED"] = 281;
            values[valuesById[282] = "DISPLAY_WAKE_REPORTED"] = 282;
            values[valuesById[283] = "CAR_USER_HAL_MODIFY_USER_REQUEST_REPORTED"] = 283;
            values[valuesById[284] = "CAR_USER_HAL_MODIFY_USER_RESPONSE_REPORTED"] = 284;
            values[valuesById[285] = "CAR_USER_HAL_POST_SWITCH_RESPONSE_REPORTED"] = 285;
            values[valuesById[286] = "CAR_USER_HAL_INITIAL_USER_INFO_REQUEST_REPORTED"] = 286;
            values[valuesById[287] = "CAR_USER_HAL_INITIAL_USER_INFO_RESPONSE_REPORTED"] = 287;
            values[valuesById[288] = "CAR_USER_HAL_USER_ASSOCIATION_REQUEST_REPORTED"] = 288;
            values[valuesById[289] = "CAR_USER_HAL_SET_USER_ASSOCIATION_RESPONSE_REPORTED"] = 289;
            values[valuesById[290] = "NETWORK_IP_PROVISIONING_REPORTED"] = 290;
            values[valuesById[291] = "NETWORK_DHCP_RENEW_REPORTED"] = 291;
            values[valuesById[292] = "NETWORK_VALIDATION_REPORTED"] = 292;
            values[valuesById[293] = "NETWORK_STACK_QUIRK_REPORTED"] = 293;
            values[valuesById[294] = "MEDIAMETRICS_AUDIORECORDDEVICEUSAGE_REPORTED"] = 294;
            values[valuesById[295] = "MEDIAMETRICS_AUDIOTHREADDEVICEUSAGE_REPORTED"] = 295;
            values[valuesById[296] = "MEDIAMETRICS_AUDIOTRACKDEVICEUSAGE_REPORTED"] = 296;
            values[valuesById[297] = "MEDIAMETRICS_AUDIODEVICECONNECTION_REPORTED"] = 297;
            values[valuesById[298] = "BLOB_COMMITTED"] = 298;
            values[valuesById[299] = "BLOB_LEASED"] = 299;
            values[valuesById[300] = "BLOB_OPENED"] = 300;
            values[valuesById[301] = "CONTACTS_PROVIDER_STATUS_REPORTED"] = 301;
            values[valuesById[302] = "KEYSTORE_KEY_EVENT_REPORTED"] = 302;
            values[valuesById[303] = "NETWORK_TETHERING_REPORTED"] = 303;
            values[valuesById[304] = "IME_TOUCH_REPORTED"] = 304;
            values[valuesById[305] = "UI_INTERACTION_FRAME_INFO_REPORTED"] = 305;
            values[valuesById[306] = "UI_ACTION_LATENCY_REPORTED"] = 306;
            values[valuesById[307] = "WIFI_DISCONNECT_REPORTED"] = 307;
            values[valuesById[308] = "WIFI_CONNECTION_STATE_CHANGED"] = 308;
            values[valuesById[309] = "HDMI_CEC_ACTIVE_SOURCE_CHANGED"] = 309;
            values[valuesById[310] = "HDMI_CEC_MESSAGE_REPORTED"] = 310;
            values[valuesById[311] = "AIRPLANE_MODE"] = 311;
            values[valuesById[312] = "MODEM_RESTART"] = 312;
            values[valuesById[313] = "CARRIER_ID_MISMATCH_REPORTED"] = 313;
            values[valuesById[314] = "CARRIER_ID_TABLE_UPDATED"] = 314;
            values[valuesById[315] = "DATA_STALL_RECOVERY_REPORTED"] = 315;
            values[valuesById[316] = "MEDIAMETRICS_MEDIAPARSER_REPORTED"] = 316;
            values[valuesById[317] = "TLS_HANDSHAKE_REPORTED"] = 317;
            values[valuesById[318] = "TEXT_CLASSIFIER_API_USAGE_REPORTED"] = 318;
            values[valuesById[319] = "CAR_WATCHDOG_KILL_STATS_REPORTED"] = 319;
            values[valuesById[320] = "MEDIAMETRICS_PLAYBACK_REPORTED"] = 320;
            values[valuesById[321] = "MEDIA_NETWORK_INFO_CHANGED"] = 321;
            values[valuesById[322] = "MEDIA_PLAYBACK_STATE_CHANGED"] = 322;
            values[valuesById[323] = "MEDIA_PLAYBACK_ERROR_REPORTED"] = 323;
            values[valuesById[324] = "MEDIA_PLAYBACK_TRACK_CHANGED"] = 324;
            values[valuesById[325] = "WIFI_SCAN_REPORTED"] = 325;
            values[valuesById[326] = "WIFI_PNO_SCAN_REPORTED"] = 326;
            values[valuesById[327] = "TIF_TUNE_CHANGED"] = 327;
            values[valuesById[328] = "AUTO_ROTATE_REPORTED"] = 328;
            values[valuesById[329] = "PERFETTO_TRIGGER"] = 329;
            values[valuesById[330] = "TRANSCODING_DATA"] = 330;
            values[valuesById[331] = "IMS_SERVICE_ENTITLEMENT_UPDATED"] = 331;
            values[valuesById[332] = "ART_DATUM_REPORTED"] = 332;
            values[valuesById[333] = "DEVICE_ROTATED"] = 333;
            values[valuesById[334] = "SIM_SPECIFIC_SETTINGS_RESTORED"] = 334;
            values[valuesById[336] = "PIN_STORAGE_EVENT"] = 336;
            values[valuesById[337] = "FACE_DOWN_REPORTED"] = 337;
            values[valuesById[338] = "BLUETOOTH_HAL_CRASH_REASON_REPORTED"] = 338;
            values[valuesById[339] = "REBOOT_ESCROW_PREPARATION_REPORTED"] = 339;
            values[valuesById[340] = "REBOOT_ESCROW_LSKF_CAPTURE_REPORTED"] = 340;
            values[valuesById[341] = "REBOOT_ESCROW_REBOOT_REPORTED"] = 341;
            values[valuesById[342] = "BINDER_LATENCY_REPORTED"] = 342;
            values[valuesById[343] = "MEDIAMETRICS_AAUDIOSTREAM_REPORTED"] = 343;
            values[valuesById[344] = "MEDIA_TRANSCODING_SESSION_ENDED"] = 344;
            values[valuesById[345] = "MAGNIFICATION_USAGE_REPORTED"] = 345;
            values[valuesById[346] = "MAGNIFICATION_MODE_WITH_IME_ON_REPORTED"] = 346;
            values[valuesById[347] = "APP_SEARCH_CALL_STATS_REPORTED"] = 347;
            values[valuesById[348] = "APP_SEARCH_PUT_DOCUMENT_STATS_REPORTED"] = 348;
            values[valuesById[349] = "DEVICE_CONTROL_CHANGED"] = 349;
            values[valuesById[350] = "DEVICE_STATE_CHANGED"] = 350;
            values[valuesById[351] = "INPUTDEVICE_REGISTERED"] = 351;
            values[valuesById[352] = "SMARTSPACE_CARD_REPORTED"] = 352;
            values[valuesById[353] = "AUTH_PROMPT_AUTHENTICATE_INVOKED"] = 353;
            values[valuesById[354] = "AUTH_MANAGER_CAN_AUTHENTICATE_INVOKED"] = 354;
            values[valuesById[355] = "AUTH_ENROLL_ACTION_INVOKED"] = 355;
            values[valuesById[356] = "AUTH_DEPRECATED_API_USED"] = 356;
            values[valuesById[357] = "UNATTENDED_REBOOT_OCCURRED"] = 357;
            values[valuesById[358] = "LONG_REBOOT_BLOCKING_REPORTED"] = 358;
            values[valuesById[359] = "LOCATION_TIME_ZONE_PROVIDER_STATE_CHANGED"] = 359;
            values[valuesById[364] = "FDTRACK_EVENT_OCCURRED"] = 364;
            values[valuesById[365] = "TIMEOUT_AUTO_EXTENDED_REPORTED"] = 365;
            values[valuesById[366] = "ODREFRESH_REPORTED"] = 366;
            values[valuesById[367] = "ALARM_BATCH_DELIVERED"] = 367;
            values[valuesById[368] = "ALARM_SCHEDULED"] = 368;
            values[valuesById[369] = "CAR_WATCHDOG_IO_OVERUSE_STATS_REPORTED"] = 369;
            values[valuesById[370] = "USER_LEVEL_HIBERNATION_STATE_CHANGED"] = 370;
            values[valuesById[371] = "APP_SEARCH_INITIALIZE_STATS_REPORTED"] = 371;
            values[valuesById[372] = "APP_SEARCH_QUERY_STATS_REPORTED"] = 372;
            values[valuesById[373] = "APP_PROCESS_DIED"] = 373;
            values[valuesById[374] = "NETWORK_IP_REACHABILITY_MONITOR_REPORTED"] = 374;
            values[valuesById[375] = "SLOW_INPUT_EVENT_REPORTED"] = 375;
            values[valuesById[376] = "ANR_OCCURRED_PROCESSING_STARTED"] = 376;
            values[valuesById[377] = "APP_SEARCH_REMOVE_STATS_REPORTED"] = 377;
            values[valuesById[378] = "MEDIA_CODEC_REPORTED"] = 378;
            values[valuesById[379] = "PERMISSION_USAGE_FRAGMENT_INTERACTION"] = 379;
            values[valuesById[380] = "PERMISSION_DETAILS_INTERACTION"] = 380;
            values[valuesById[381] = "PRIVACY_SENSOR_TOGGLE_INTERACTION"] = 381;
            values[valuesById[382] = "PRIVACY_TOGGLE_DIALOG_INTERACTION"] = 382;
            values[valuesById[383] = "APP_SEARCH_OPTIMIZE_STATS_REPORTED"] = 383;
            values[valuesById[386] = "APP_COMPAT_STATE_CHANGED"] = 386;
            values[valuesById[387] = "SIZE_COMPAT_RESTART_BUTTON_EVENT_REPORTED"] = 387;
            values[valuesById[388] = "SPLITSCREEN_UI_CHANGED"] = 388;
            values[valuesById[390] = "BLUETOOTH_CODE_PATH_COUNTER"] = 390;
            values[valuesById[392] = "BLUETOOTH_LE_BATCH_SCAN_REPORT_DELAY"] = 392;
            values[valuesById[393] = "ACCESSIBILITY_FLOATING_MENU_UI_CHANGED"] = 393;
            values[valuesById[394] = "NEURALNETWORKS_COMPILATION_COMPLETED"] = 394;
            values[valuesById[395] = "NEURALNETWORKS_EXECUTION_COMPLETED"] = 395;
            values[valuesById[396] = "NEURALNETWORKS_COMPILATION_FAILED"] = 396;
            values[valuesById[397] = "NEURALNETWORKS_EXECUTION_FAILED"] = 397;
            values[valuesById[409] = "VM_CREATION_REQUESTED"] = 409;
            values[valuesById[411] = "CAMERA_COMPAT_CONTROL_EVENT_REPORTED"] = 411;
            values[valuesById[424] = "TRACING_SERVICE_REPORT_EVENT"] = 424;
            values[valuesById[419] = "EARLY_BOOT_COMP_OS_ARTIFACTS_CHECK_REPORTED"] = 419;
            values[valuesById[457] = "ISOLATED_COMPILATION_SCHEDULED"] = 457;
            values[valuesById[458] = "ISOLATED_COMPILATION_ENDED"] = 458;
            values[valuesById[461] = "TELEPHONY_ANOMALY_DETECTED"] = 461;
            values[valuesById[430] = "HOTWORD_DETECTOR_CREATE_REQUESTED"] = 430;
            values[valuesById[431] = "HOTWORD_DETECTION_SERVICE_INIT_RESULT_REPORTED"] = 431;
            values[valuesById[432] = "HOTWORD_DETECTION_SERVICE_RESTARTED"] = 432;
            values[valuesById[433] = "HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED"] = 433;
            values[valuesById[434] = "HOTWORD_DETECTOR_EVENTS"] = 434;
            values[valuesById[463] = "REMOTE_KEY_PROVISIONING_ATTEMPT"] = 463;
            values[valuesById[464] = "REMOTE_KEY_PROVISIONING_NETWORK_INFO"] = 464;
            values[valuesById[465] = "REMOTE_KEY_PROVISIONING_TIMING"] = 465;
            values[valuesById[10000] = "WIFI_BYTES_TRANSFER"] = 10000;
            values[valuesById[10001] = "WIFI_BYTES_TRANSFER_BY_FG_BG"] = 10001;
            values[valuesById[10002] = "MOBILE_BYTES_TRANSFER"] = 10002;
            values[valuesById[10003] = "MOBILE_BYTES_TRANSFER_BY_FG_BG"] = 10003;
            values[valuesById[10006] = "BLUETOOTH_BYTES_TRANSFER"] = 10006;
            values[valuesById[10004] = "KERNEL_WAKELOCK"] = 10004;
            values[valuesById[10005] = "SUBSYSTEM_SLEEP_STATE"] = 10005;
            values[valuesById[10009] = "CPU_TIME_PER_UID"] = 10009;
            values[valuesById[10010] = "CPU_TIME_PER_UID_FREQ"] = 10010;
            values[valuesById[10011] = "WIFI_ACTIVITY_INFO"] = 10011;
            values[valuesById[10012] = "MODEM_ACTIVITY_INFO"] = 10012;
            values[valuesById[10007] = "BLUETOOTH_ACTIVITY_INFO"] = 10007;
            values[valuesById[10013] = "PROCESS_MEMORY_STATE"] = 10013;
            values[valuesById[10014] = "SYSTEM_ELAPSED_REALTIME"] = 10014;
            values[valuesById[10015] = "SYSTEM_UPTIME"] = 10015;
            values[valuesById[10016] = "CPU_ACTIVE_TIME"] = 10016;
            values[valuesById[10017] = "CPU_CLUSTER_TIME"] = 10017;
            values[valuesById[10018] = "DISK_SPACE"] = 10018;
            values[valuesById[10019] = "REMAINING_BATTERY_CAPACITY"] = 10019;
            values[valuesById[10020] = "FULL_BATTERY_CAPACITY"] = 10020;
            values[valuesById[10021] = "TEMPERATURE"] = 10021;
            values[valuesById[10022] = "BINDER_CALLS"] = 10022;
            values[valuesById[10023] = "BINDER_CALLS_EXCEPTIONS"] = 10023;
            values[valuesById[10024] = "LOOPER_STATS"] = 10024;
            values[valuesById[10025] = "DISK_STATS"] = 10025;
            values[valuesById[10026] = "DIRECTORY_USAGE"] = 10026;
            values[valuesById[10027] = "APP_SIZE"] = 10027;
            values[valuesById[10028] = "CATEGORY_SIZE"] = 10028;
            values[valuesById[10029] = "PROC_STATS"] = 10029;
            values[valuesById[10030] = "BATTERY_VOLTAGE"] = 10030;
            values[valuesById[10031] = "NUM_FINGERPRINTS_ENROLLED"] = 10031;
            values[valuesById[10032] = "DISK_IO"] = 10032;
            values[valuesById[10033] = "POWER_PROFILE"] = 10033;
            values[valuesById[10034] = "PROC_STATS_PKG_PROC"] = 10034;
            values[valuesById[10035] = "PROCESS_CPU_TIME"] = 10035;
            values[valuesById[10037] = "CPU_TIME_PER_THREAD_FREQ"] = 10037;
            values[valuesById[10038] = "ON_DEVICE_POWER_MEASUREMENT"] = 10038;
            values[valuesById[10039] = "DEVICE_CALCULATED_POWER_USE"] = 10039;
            values[valuesById[10040] = "DEVICE_CALCULATED_POWER_BLAME_UID"] = 10040;
            values[valuesById[10041] = "DEVICE_CALCULATED_POWER_BLAME_OTHER"] = 10041;
            values[valuesById[10042] = "PROCESS_MEMORY_HIGH_WATER_MARK"] = 10042;
            values[valuesById[10043] = "BATTERY_LEVEL"] = 10043;
            values[valuesById[10044] = "BUILD_INFORMATION"] = 10044;
            values[valuesById[10045] = "BATTERY_CYCLE_COUNT"] = 10045;
            values[valuesById[10046] = "DEBUG_ELAPSED_CLOCK"] = 10046;
            values[valuesById[10047] = "DEBUG_FAILING_ELAPSED_CLOCK"] = 10047;
            values[valuesById[10048] = "NUM_FACES_ENROLLED"] = 10048;
            values[valuesById[10049] = "ROLE_HOLDER"] = 10049;
            values[valuesById[10050] = "DANGEROUS_PERMISSION_STATE"] = 10050;
            values[valuesById[10051] = "TRAIN_INFO"] = 10051;
            values[valuesById[10052] = "TIME_ZONE_DATA_INFO"] = 10052;
            values[valuesById[10053] = "EXTERNAL_STORAGE_INFO"] = 10053;
            values[valuesById[10054] = "GPU_STATS_GLOBAL_INFO"] = 10054;
            values[valuesById[10055] = "GPU_STATS_APP_INFO"] = 10055;
            values[valuesById[10056] = "SYSTEM_ION_HEAP_SIZE"] = 10056;
            values[valuesById[10057] = "APPS_ON_EXTERNAL_STORAGE_INFO"] = 10057;
            values[valuesById[10058] = "FACE_SETTINGS"] = 10058;
            values[valuesById[10059] = "COOLING_DEVICE"] = 10059;
            values[valuesById[10060] = "APP_OPS"] = 10060;
            values[valuesById[10061] = "PROCESS_SYSTEM_ION_HEAP_SIZE"] = 10061;
            values[valuesById[10062] = "SURFACEFLINGER_STATS_GLOBAL_INFO"] = 10062;
            values[valuesById[10063] = "SURFACEFLINGER_STATS_LAYER_INFO"] = 10063;
            values[valuesById[10064] = "PROCESS_MEMORY_SNAPSHOT"] = 10064;
            values[valuesById[10065] = "VMS_CLIENT_STATS"] = 10065;
            values[valuesById[10066] = "NOTIFICATION_REMOTE_VIEWS"] = 10066;
            values[valuesById[10067] = "DANGEROUS_PERMISSION_STATE_SAMPLED"] = 10067;
            values[valuesById[10068] = "GRAPHICS_STATS"] = 10068;
            values[valuesById[10069] = "RUNTIME_APP_OP_ACCESS"] = 10069;
            values[valuesById[10070] = "ION_HEAP_SIZE"] = 10070;
            values[valuesById[10071] = "PACKAGE_NOTIFICATION_PREFERENCES"] = 10071;
            values[valuesById[10072] = "PACKAGE_NOTIFICATION_CHANNEL_PREFERENCES"] = 10072;
            values[valuesById[10073] = "PACKAGE_NOTIFICATION_CHANNEL_GROUP_PREFERENCES"] = 10073;
            values[valuesById[10074] = "GNSS_STATS"] = 10074;
            values[valuesById[10075] = "ATTRIBUTED_APP_OPS"] = 10075;
            values[valuesById[10076] = "VOICE_CALL_SESSION"] = 10076;
            values[valuesById[10077] = "VOICE_CALL_RAT_USAGE"] = 10077;
            values[valuesById[10078] = "SIM_SLOT_STATE"] = 10078;
            values[valuesById[10079] = "SUPPORTED_RADIO_ACCESS_FAMILY"] = 10079;
            values[valuesById[10080] = "SETTING_SNAPSHOT"] = 10080;
            values[valuesById[10081] = "BLOB_INFO"] = 10081;
            values[valuesById[10082] = "DATA_USAGE_BYTES_TRANSFER"] = 10082;
            values[valuesById[10083] = "BYTES_TRANSFER_BY_TAG_AND_METERED"] = 10083;
            values[valuesById[10084] = "DND_MODE_RULE"] = 10084;
            values[valuesById[10085] = "GENERAL_EXTERNAL_STORAGE_ACCESS_STATS"] = 10085;
            values[valuesById[10086] = "INCOMING_SMS"] = 10086;
            values[valuesById[10087] = "OUTGOING_SMS"] = 10087;
            values[valuesById[10088] = "CARRIER_ID_TABLE_VERSION"] = 10088;
            values[valuesById[10089] = "DATA_CALL_SESSION"] = 10089;
            values[valuesById[10090] = "CELLULAR_SERVICE_STATE"] = 10090;
            values[valuesById[10091] = "CELLULAR_DATA_SERVICE_SWITCH"] = 10091;
            values[valuesById[10092] = "SYSTEM_MEMORY"] = 10092;
            values[valuesById[10093] = "IMS_REGISTRATION_TERMINATION"] = 10093;
            values[valuesById[10094] = "IMS_REGISTRATION_STATS"] = 10094;
            values[valuesById[10095] = "CPU_TIME_PER_CLUSTER_FREQ"] = 10095;
            values[valuesById[10096] = "CPU_CYCLES_PER_UID_CLUSTER"] = 10096;
            values[valuesById[10097] = "DEVICE_ROTATED_DATA"] = 10097;
            values[valuesById[10098] = "CPU_CYCLES_PER_THREAD_GROUP_CLUSTER"] = 10098;
            values[valuesById[10099] = "MEDIA_DRM_ACTIVITY_INFO"] = 10099;
            values[valuesById[10100] = "OEM_MANAGED_BYTES_TRANSFER"] = 10100;
            values[valuesById[10101] = "GNSS_POWER_STATS"] = 10101;
            values[valuesById[10102] = "TIME_ZONE_DETECTOR_STATE"] = 10102;
            values[valuesById[10103] = "KEYSTORE2_STORAGE_STATS"] = 10103;
            values[valuesById[10104] = "RKP_POOL_STATS"] = 10104;
            values[valuesById[10105] = "PROCESS_DMABUF_MEMORY"] = 10105;
            values[valuesById[10106] = "PENDING_ALARM_INFO"] = 10106;
            values[valuesById[10107] = "USER_LEVEL_HIBERNATED_APPS"] = 10107;
            values[valuesById[10108] = "LAUNCHER_LAYOUT_SNAPSHOT"] = 10108;
            values[valuesById[10109] = "GLOBAL_HIBERNATED_APPS"] = 10109;
            values[valuesById[10110] = "INPUT_EVENT_LATENCY_SKETCH"] = 10110;
            values[valuesById[10111] = "BATTERY_USAGE_STATS_BEFORE_RESET"] = 10111;
            values[valuesById[10112] = "BATTERY_USAGE_STATS_SINCE_RESET"] = 10112;
            values[valuesById[10113] = "BATTERY_USAGE_STATS_SINCE_RESET_USING_POWER_PROFILE_MODEL"] = 10113;
            values[valuesById[10114] = "INSTALLED_INCREMENTAL_PACKAGE"] = 10114;
            values[valuesById[10115] = "TELEPHONY_NETWORK_REQUESTS"] = 10115;
            values[valuesById[10116] = "APP_SEARCH_STORAGE_INFO"] = 10116;
            values[valuesById[10117] = "VMSTAT"] = 10117;
            values[valuesById[10118] = "KEYSTORE2_KEY_CREATION_WITH_GENERAL_INFO"] = 10118;
            values[valuesById[10119] = "KEYSTORE2_KEY_CREATION_WITH_AUTH_INFO"] = 10119;
            values[valuesById[10120] = "KEYSTORE2_KEY_CREATION_WITH_PURPOSE_AND_MODES_INFO"] = 10120;
            values[valuesById[10121] = "KEYSTORE2_ATOM_WITH_OVERFLOW"] = 10121;
            values[valuesById[10122] = "KEYSTORE2_KEY_OPERATION_WITH_PURPOSE_AND_MODES_INFO"] = 10122;
            values[valuesById[10123] = "KEYSTORE2_KEY_OPERATION_WITH_GENERAL_INFO"] = 10123;
            values[valuesById[10124] = "RKP_ERROR_STATS"] = 10124;
            values[valuesById[10125] = "KEYSTORE2_CRASH_STATS"] = 10125;
            values[valuesById[10127] = "ACCESSIBILITY_SHORTCUT_STATS"] = 10127;
            values[valuesById[10128] = "ACCESSIBILITY_FLOATING_MENU_STATS"] = 10128;
            values[valuesById[10131] = "CAR_WATCHDOG_SYSTEM_IO_USAGE_SUMMARY"] = 10131;
            values[valuesById[10132] = "CAR_WATCHDOG_UID_IO_USAGE_SUMMARY"] = 10132;
            values[valuesById[10133] = "IMS_REGISTRATION_FEATURE_TAG_STATS"] = 10133;
            values[valuesById[10134] = "RCS_CLIENT_PROVISIONING_STATS"] = 10134;
            values[valuesById[10135] = "RCS_ACS_PROVISIONING_STATS"] = 10135;
            values[valuesById[10136] = "SIP_DELEGATE_STATS"] = 10136;
            values[valuesById[10137] = "SIP_TRANSPORT_FEATURE_TAG_STATS"] = 10137;
            values[valuesById[10138] = "SIP_MESSAGE_RESPONSE"] = 10138;
            values[valuesById[10139] = "SIP_TRANSPORT_SESSION"] = 10139;
            values[valuesById[10140] = "IMS_DEDICATED_BEARER_LISTENER_EVENT"] = 10140;
            values[valuesById[10141] = "IMS_DEDICATED_BEARER_EVENT"] = 10141;
            values[valuesById[10142] = "IMS_REGISTRATION_SERVICE_DESC_STATS"] = 10142;
            values[valuesById[10143] = "UCE_EVENT_STATS"] = 10143;
            values[valuesById[10144] = "PRESENCE_NOTIFY_EVENT"] = 10144;
            values[valuesById[10145] = "GBA_EVENT"] = 10145;
            values[valuesById[10155] = "REMOTE_KEY_PROVISIONING_ERROR_COUNTS"] = 10155;
            return values;
        })();

        protos.StatsdTracingConfig = (function() {

            /**
             * Properties of a StatsdTracingConfig.
             * @memberof perfetto.protos
             * @interface IStatsdTracingConfig
             * @property {Array.<perfetto.protos.AtomId>|null} [pushAtomId] StatsdTracingConfig pushAtomId
             * @property {Array.<number>|null} [rawPushAtomId] StatsdTracingConfig rawPushAtomId
             * @property {Array.<perfetto.protos.IStatsdPullAtomConfig>|null} [pullConfig] StatsdTracingConfig pullConfig
             */

            /**
             * Constructs a new StatsdTracingConfig.
             * @memberof perfetto.protos
             * @classdesc Represents a StatsdTracingConfig.
             * @implements IStatsdTracingConfig
             * @constructor
             * @param {perfetto.protos.IStatsdTracingConfig=} [p] Properties to set
             */
            function StatsdTracingConfig(p) {
                this.pushAtomId = [];
                this.rawPushAtomId = [];
                this.pullConfig = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * StatsdTracingConfig pushAtomId.
             * @member {Array.<perfetto.protos.AtomId>} pushAtomId
             * @memberof perfetto.protos.StatsdTracingConfig
             * @instance
             */
            StatsdTracingConfig.prototype.pushAtomId = $util.emptyArray;

            /**
             * StatsdTracingConfig rawPushAtomId.
             * @member {Array.<number>} rawPushAtomId
             * @memberof perfetto.protos.StatsdTracingConfig
             * @instance
             */
            StatsdTracingConfig.prototype.rawPushAtomId = $util.emptyArray;

            /**
             * StatsdTracingConfig pullConfig.
             * @member {Array.<perfetto.protos.IStatsdPullAtomConfig>} pullConfig
             * @memberof perfetto.protos.StatsdTracingConfig
             * @instance
             */
            StatsdTracingConfig.prototype.pullConfig = $util.emptyArray;

            /**
             * Creates a new StatsdTracingConfig instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.StatsdTracingConfig
             * @static
             * @param {perfetto.protos.IStatsdTracingConfig=} [properties] Properties to set
             * @returns {perfetto.protos.StatsdTracingConfig} StatsdTracingConfig instance
             */
            StatsdTracingConfig.create = function create(properties) {
                return new StatsdTracingConfig(properties);
            };

            /**
             * Encodes the specified StatsdTracingConfig message. Does not implicitly {@link perfetto.protos.StatsdTracingConfig.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.StatsdTracingConfig
             * @static
             * @param {perfetto.protos.IStatsdTracingConfig} m StatsdTracingConfig message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StatsdTracingConfig.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.pushAtomId != null && m.pushAtomId.length) {
                    for (var i = 0; i < m.pushAtomId.length; ++i)
                        w.uint32(8).int32(m.pushAtomId[i]);
                }
                if (m.rawPushAtomId != null && m.rawPushAtomId.length) {
                    for (var i = 0; i < m.rawPushAtomId.length; ++i)
                        w.uint32(16).int32(m.rawPushAtomId[i]);
                }
                if (m.pullConfig != null && m.pullConfig.length) {
                    for (var i = 0; i < m.pullConfig.length; ++i)
                        $root.perfetto.protos.StatsdPullAtomConfig.encode(m.pullConfig[i], w.uint32(26).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified StatsdTracingConfig message, length delimited. Does not implicitly {@link perfetto.protos.StatsdTracingConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.StatsdTracingConfig
             * @static
             * @param {perfetto.protos.IStatsdTracingConfig} message StatsdTracingConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StatsdTracingConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a StatsdTracingConfig message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.StatsdTracingConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.StatsdTracingConfig} StatsdTracingConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatsdTracingConfig.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.StatsdTracingConfig();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.pushAtomId && m.pushAtomId.length))
                            m.pushAtomId = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.pushAtomId.push(r.int32());
                        } else
                            m.pushAtomId.push(r.int32());
                        break;
                    case 2:
                        if (!(m.rawPushAtomId && m.rawPushAtomId.length))
                            m.rawPushAtomId = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.rawPushAtomId.push(r.int32());
                        } else
                            m.rawPushAtomId.push(r.int32());
                        break;
                    case 3:
                        if (!(m.pullConfig && m.pullConfig.length))
                            m.pullConfig = [];
                        m.pullConfig.push($root.perfetto.protos.StatsdPullAtomConfig.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a StatsdTracingConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.StatsdTracingConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.StatsdTracingConfig} StatsdTracingConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatsdTracingConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a StatsdTracingConfig message.
             * @function verify
             * @memberof perfetto.protos.StatsdTracingConfig
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            StatsdTracingConfig.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.pushAtomId != null && m.hasOwnProperty("pushAtomId")) {
                    if (!Array.isArray(m.pushAtomId))
                        return "pushAtomId: array expected";
                    for (var i = 0; i < m.pushAtomId.length; ++i) {
                        switch (m.pushAtomId[i]) {
                        default:
                            return "pushAtomId: enum value[] expected";
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                        case 6:
                        case 7:
                        case 8:
                        case 9:
                        case 10:
                        case 11:
                        case 12:
                        case 13:
                        case 14:
                        case 15:
                        case 16:
                        case 17:
                        case 18:
                        case 19:
                        case 20:
                        case 21:
                        case 22:
                        case 23:
                        case 24:
                        case 25:
                        case 26:
                        case 27:
                        case 28:
                        case 29:
                        case 30:
                        case 31:
                        case 32:
                        case 33:
                        case 34:
                        case 35:
                        case 36:
                        case 37:
                        case 38:
                        case 39:
                        case 40:
                        case 41:
                        case 42:
                        case 43:
                        case 44:
                        case 45:
                        case 46:
                        case 47:
                        case 48:
                        case 49:
                        case 50:
                        case 51:
                        case 52:
                        case 53:
                        case 54:
                        case 55:
                        case 56:
                        case 57:
                        case 58:
                        case 59:
                        case 60:
                        case 61:
                        case 62:
                        case 63:
                        case 64:
                        case 65:
                        case 66:
                        case 67:
                        case 68:
                        case 69:
                        case 70:
                        case 71:
                        case 72:
                        case 73:
                        case 74:
                        case 75:
                        case 76:
                        case 77:
                        case 78:
                        case 79:
                        case 80:
                        case 81:
                        case 82:
                        case 83:
                        case 84:
                        case 85:
                        case 86:
                        case 87:
                        case 88:
                        case 89:
                        case 90:
                        case 91:
                        case 92:
                        case 93:
                        case 94:
                        case 95:
                        case 96:
                        case 97:
                        case 98:
                        case 99:
                        case 100:
                        case 101:
                        case 102:
                        case 103:
                        case 104:
                        case 105:
                        case 106:
                        case 107:
                        case 108:
                        case 109:
                        case 110:
                        case 111:
                        case 112:
                        case 113:
                        case 114:
                        case 115:
                        case 116:
                        case 117:
                        case 118:
                        case 119:
                        case 120:
                        case 121:
                        case 122:
                        case 123:
                        case 124:
                        case 125:
                        case 126:
                        case 127:
                        case 128:
                        case 129:
                        case 130:
                        case 131:
                        case 132:
                        case 133:
                        case 134:
                        case 135:
                        case 136:
                        case 137:
                        case 138:
                        case 139:
                        case 140:
                        case 141:
                        case 142:
                        case 143:
                        case 144:
                        case 145:
                        case 146:
                        case 147:
                        case 148:
                        case 149:
                        case 150:
                        case 151:
                        case 152:
                        case 153:
                        case 154:
                        case 155:
                        case 156:
                        case 157:
                        case 158:
                        case 159:
                        case 160:
                        case 161:
                        case 162:
                        case 163:
                        case 164:
                        case 165:
                        case 166:
                        case 167:
                        case 168:
                        case 169:
                        case 170:
                        case 171:
                        case 172:
                        case 173:
                        case 174:
                        case 175:
                        case 176:
                        case 177:
                        case 178:
                        case 179:
                        case 180:
                        case 181:
                        case 182:
                        case 183:
                        case 184:
                        case 185:
                        case 186:
                        case 187:
                        case 188:
                        case 189:
                        case 190:
                        case 191:
                        case 192:
                        case 193:
                        case 194:
                        case 195:
                        case 196:
                        case 197:
                        case 198:
                        case 199:
                        case 200:
                        case 201:
                        case 203:
                        case 204:
                        case 205:
                        case 206:
                        case 207:
                        case 208:
                        case 209:
                        case 210:
                        case 211:
                        case 212:
                        case 213:
                        case 214:
                        case 215:
                        case 216:
                        case 217:
                        case 218:
                        case 219:
                        case 220:
                        case 221:
                        case 222:
                        case 223:
                        case 224:
                        case 225:
                        case 226:
                        case 227:
                        case 228:
                        case 229:
                        case 230:
                        case 233:
                        case 234:
                        case 235:
                        case 236:
                        case 237:
                        case 238:
                        case 239:
                        case 240:
                        case 241:
                        case 242:
                        case 243:
                        case 244:
                        case 245:
                        case 246:
                        case 247:
                        case 248:
                        case 249:
                        case 250:
                        case 251:
                        case 252:
                        case 253:
                        case 254:
                        case 255:
                        case 256:
                        case 257:
                        case 258:
                        case 259:
                        case 260:
                        case 261:
                        case 262:
                        case 263:
                        case 264:
                        case 265:
                        case 266:
                        case 267:
                        case 268:
                        case 269:
                        case 270:
                        case 271:
                        case 272:
                        case 273:
                        case 274:
                        case 275:
                        case 276:
                        case 277:
                        case 278:
                        case 279:
                        case 280:
                        case 281:
                        case 282:
                        case 283:
                        case 284:
                        case 285:
                        case 286:
                        case 287:
                        case 288:
                        case 289:
                        case 290:
                        case 291:
                        case 292:
                        case 293:
                        case 294:
                        case 295:
                        case 296:
                        case 297:
                        case 298:
                        case 299:
                        case 300:
                        case 301:
                        case 302:
                        case 303:
                        case 304:
                        case 305:
                        case 306:
                        case 307:
                        case 308:
                        case 309:
                        case 310:
                        case 311:
                        case 312:
                        case 313:
                        case 314:
                        case 315:
                        case 316:
                        case 317:
                        case 318:
                        case 319:
                        case 320:
                        case 321:
                        case 322:
                        case 323:
                        case 324:
                        case 325:
                        case 326:
                        case 327:
                        case 328:
                        case 329:
                        case 330:
                        case 331:
                        case 332:
                        case 333:
                        case 334:
                        case 336:
                        case 337:
                        case 338:
                        case 339:
                        case 340:
                        case 341:
                        case 342:
                        case 343:
                        case 344:
                        case 345:
                        case 346:
                        case 347:
                        case 348:
                        case 349:
                        case 350:
                        case 351:
                        case 352:
                        case 353:
                        case 354:
                        case 355:
                        case 356:
                        case 357:
                        case 358:
                        case 359:
                        case 364:
                        case 365:
                        case 366:
                        case 367:
                        case 368:
                        case 369:
                        case 370:
                        case 371:
                        case 372:
                        case 373:
                        case 374:
                        case 375:
                        case 376:
                        case 377:
                        case 378:
                        case 379:
                        case 380:
                        case 381:
                        case 382:
                        case 383:
                        case 386:
                        case 387:
                        case 388:
                        case 390:
                        case 392:
                        case 393:
                        case 394:
                        case 395:
                        case 396:
                        case 397:
                        case 409:
                        case 411:
                        case 424:
                        case 419:
                        case 457:
                        case 458:
                        case 461:
                        case 430:
                        case 431:
                        case 432:
                        case 433:
                        case 434:
                        case 463:
                        case 464:
                        case 465:
                        case 10000:
                        case 10001:
                        case 10002:
                        case 10003:
                        case 10006:
                        case 10004:
                        case 10005:
                        case 10009:
                        case 10010:
                        case 10011:
                        case 10012:
                        case 10007:
                        case 10013:
                        case 10014:
                        case 10015:
                        case 10016:
                        case 10017:
                        case 10018:
                        case 10019:
                        case 10020:
                        case 10021:
                        case 10022:
                        case 10023:
                        case 10024:
                        case 10025:
                        case 10026:
                        case 10027:
                        case 10028:
                        case 10029:
                        case 10030:
                        case 10031:
                        case 10032:
                        case 10033:
                        case 10034:
                        case 10035:
                        case 10037:
                        case 10038:
                        case 10039:
                        case 10040:
                        case 10041:
                        case 10042:
                        case 10043:
                        case 10044:
                        case 10045:
                        case 10046:
                        case 10047:
                        case 10048:
                        case 10049:
                        case 10050:
                        case 10051:
                        case 10052:
                        case 10053:
                        case 10054:
                        case 10055:
                        case 10056:
                        case 10057:
                        case 10058:
                        case 10059:
                        case 10060:
                        case 10061:
                        case 10062:
                        case 10063:
                        case 10064:
                        case 10065:
                        case 10066:
                        case 10067:
                        case 10068:
                        case 10069:
                        case 10070:
                        case 10071:
                        case 10072:
                        case 10073:
                        case 10074:
                        case 10075:
                        case 10076:
                        case 10077:
                        case 10078:
                        case 10079:
                        case 10080:
                        case 10081:
                        case 10082:
                        case 10083:
                        case 10084:
                        case 10085:
                        case 10086:
                        case 10087:
                        case 10088:
                        case 10089:
                        case 10090:
                        case 10091:
                        case 10092:
                        case 10093:
                        case 10094:
                        case 10095:
                        case 10096:
                        case 10097:
                        case 10098:
                        case 10099:
                        case 10100:
                        case 10101:
                        case 10102:
                        case 10103:
                        case 10104:
                        case 10105:
                        case 10106:
                        case 10107:
                        case 10108:
                        case 10109:
                        case 10110:
                        case 10111:
                        case 10112:
                        case 10113:
                        case 10114:
                        case 10115:
                        case 10116:
                        case 10117:
                        case 10118:
                        case 10119:
                        case 10120:
                        case 10121:
                        case 10122:
                        case 10123:
                        case 10124:
                        case 10125:
                        case 10127:
                        case 10128:
                        case 10131:
                        case 10132:
                        case 10133:
                        case 10134:
                        case 10135:
                        case 10136:
                        case 10137:
                        case 10138:
                        case 10139:
                        case 10140:
                        case 10141:
                        case 10142:
                        case 10143:
                        case 10144:
                        case 10145:
                        case 10155:
                            break;
                        }
                    }
                }
                if (m.rawPushAtomId != null && m.hasOwnProperty("rawPushAtomId")) {
                    if (!Array.isArray(m.rawPushAtomId))
                        return "rawPushAtomId: array expected";
                    for (var i = 0; i < m.rawPushAtomId.length; ++i) {
                        if (!$util.isInteger(m.rawPushAtomId[i]))
                            return "rawPushAtomId: integer[] expected";
                    }
                }
                if (m.pullConfig != null && m.hasOwnProperty("pullConfig")) {
                    if (!Array.isArray(m.pullConfig))
                        return "pullConfig: array expected";
                    for (var i = 0; i < m.pullConfig.length; ++i) {
                        {
                            var e = $root.perfetto.protos.StatsdPullAtomConfig.verify(m.pullConfig[i]);
                            if (e)
                                return "pullConfig." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a StatsdTracingConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.StatsdTracingConfig
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.StatsdTracingConfig} StatsdTracingConfig
             */
            StatsdTracingConfig.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.StatsdTracingConfig)
                    return d;
                var m = new $root.perfetto.protos.StatsdTracingConfig();
                if (d.pushAtomId) {
                    if (!Array.isArray(d.pushAtomId))
                        throw TypeError(".perfetto.protos.StatsdTracingConfig.pushAtomId: array expected");
                    m.pushAtomId = [];
                    for (var i = 0; i < d.pushAtomId.length; ++i) {
                        switch (d.pushAtomId[i]) {
                        default:
                        case "BLE_SCAN_STATE_CHANGED":
                        case 2:
                            m.pushAtomId[i] = 2;
                            break;
                        case "PROCESS_STATE_CHANGED":
                        case 3:
                            m.pushAtomId[i] = 3;
                            break;
                        case "BLE_SCAN_RESULT_RECEIVED":
                        case 4:
                            m.pushAtomId[i] = 4;
                            break;
                        case "SENSOR_STATE_CHANGED":
                        case 5:
                            m.pushAtomId[i] = 5;
                            break;
                        case "GPS_SCAN_STATE_CHANGED":
                        case 6:
                            m.pushAtomId[i] = 6;
                            break;
                        case "SYNC_STATE_CHANGED":
                        case 7:
                            m.pushAtomId[i] = 7;
                            break;
                        case "SCHEDULED_JOB_STATE_CHANGED":
                        case 8:
                            m.pushAtomId[i] = 8;
                            break;
                        case "SCREEN_BRIGHTNESS_CHANGED":
                        case 9:
                            m.pushAtomId[i] = 9;
                            break;
                        case "WAKELOCK_STATE_CHANGED":
                        case 10:
                            m.pushAtomId[i] = 10;
                            break;
                        case "LONG_PARTIAL_WAKELOCK_STATE_CHANGED":
                        case 11:
                            m.pushAtomId[i] = 11;
                            break;
                        case "MOBILE_RADIO_POWER_STATE_CHANGED":
                        case 12:
                            m.pushAtomId[i] = 12;
                            break;
                        case "WIFI_RADIO_POWER_STATE_CHANGED":
                        case 13:
                            m.pushAtomId[i] = 13;
                            break;
                        case "ACTIVITY_MANAGER_SLEEP_STATE_CHANGED":
                        case 14:
                            m.pushAtomId[i] = 14;
                            break;
                        case "MEMORY_FACTOR_STATE_CHANGED":
                        case 15:
                            m.pushAtomId[i] = 15;
                            break;
                        case "EXCESSIVE_CPU_USAGE_REPORTED":
                        case 16:
                            m.pushAtomId[i] = 16;
                            break;
                        case "CACHED_KILL_REPORTED":
                        case 17:
                            m.pushAtomId[i] = 17;
                            break;
                        case "PROCESS_MEMORY_STAT_REPORTED":
                        case 18:
                            m.pushAtomId[i] = 18;
                            break;
                        case "LAUNCHER_EVENT":
                        case 19:
                            m.pushAtomId[i] = 19;
                            break;
                        case "BATTERY_SAVER_MODE_STATE_CHANGED":
                        case 20:
                            m.pushAtomId[i] = 20;
                            break;
                        case "DEVICE_IDLE_MODE_STATE_CHANGED":
                        case 21:
                            m.pushAtomId[i] = 21;
                            break;
                        case "DEVICE_IDLING_MODE_STATE_CHANGED":
                        case 22:
                            m.pushAtomId[i] = 22;
                            break;
                        case "AUDIO_STATE_CHANGED":
                        case 23:
                            m.pushAtomId[i] = 23;
                            break;
                        case "MEDIA_CODEC_STATE_CHANGED":
                        case 24:
                            m.pushAtomId[i] = 24;
                            break;
                        case "CAMERA_STATE_CHANGED":
                        case 25:
                            m.pushAtomId[i] = 25;
                            break;
                        case "FLASHLIGHT_STATE_CHANGED":
                        case 26:
                            m.pushAtomId[i] = 26;
                            break;
                        case "UID_PROCESS_STATE_CHANGED":
                        case 27:
                            m.pushAtomId[i] = 27;
                            break;
                        case "PROCESS_LIFE_CYCLE_STATE_CHANGED":
                        case 28:
                            m.pushAtomId[i] = 28;
                            break;
                        case "SCREEN_STATE_CHANGED":
                        case 29:
                            m.pushAtomId[i] = 29;
                            break;
                        case "BATTERY_LEVEL_CHANGED":
                        case 30:
                            m.pushAtomId[i] = 30;
                            break;
                        case "CHARGING_STATE_CHANGED":
                        case 31:
                            m.pushAtomId[i] = 31;
                            break;
                        case "PLUGGED_STATE_CHANGED":
                        case 32:
                            m.pushAtomId[i] = 32;
                            break;
                        case "INTERACTIVE_STATE_CHANGED":
                        case 33:
                            m.pushAtomId[i] = 33;
                            break;
                        case "TOUCH_EVENT_REPORTED":
                        case 34:
                            m.pushAtomId[i] = 34;
                            break;
                        case "WAKEUP_ALARM_OCCURRED":
                        case 35:
                            m.pushAtomId[i] = 35;
                            break;
                        case "KERNEL_WAKEUP_REPORTED":
                        case 36:
                            m.pushAtomId[i] = 36;
                            break;
                        case "WIFI_LOCK_STATE_CHANGED":
                        case 37:
                            m.pushAtomId[i] = 37;
                            break;
                        case "WIFI_SIGNAL_STRENGTH_CHANGED":
                        case 38:
                            m.pushAtomId[i] = 38;
                            break;
                        case "WIFI_SCAN_STATE_CHANGED":
                        case 39:
                            m.pushAtomId[i] = 39;
                            break;
                        case "PHONE_SIGNAL_STRENGTH_CHANGED":
                        case 40:
                            m.pushAtomId[i] = 40;
                            break;
                        case "SETTING_CHANGED":
                        case 41:
                            m.pushAtomId[i] = 41;
                            break;
                        case "ACTIVITY_FOREGROUND_STATE_CHANGED":
                        case 42:
                            m.pushAtomId[i] = 42;
                            break;
                        case "ISOLATED_UID_CHANGED":
                        case 43:
                            m.pushAtomId[i] = 43;
                            break;
                        case "PACKET_WAKEUP_OCCURRED":
                        case 44:
                            m.pushAtomId[i] = 44;
                            break;
                        case "WALL_CLOCK_TIME_SHIFTED":
                        case 45:
                            m.pushAtomId[i] = 45;
                            break;
                        case "ANOMALY_DETECTED":
                        case 46:
                            m.pushAtomId[i] = 46;
                            break;
                        case "APP_BREADCRUMB_REPORTED":
                        case 47:
                            m.pushAtomId[i] = 47;
                            break;
                        case "APP_START_OCCURRED":
                        case 48:
                            m.pushAtomId[i] = 48;
                            break;
                        case "APP_START_CANCELED":
                        case 49:
                            m.pushAtomId[i] = 49;
                            break;
                        case "APP_START_FULLY_DRAWN":
                        case 50:
                            m.pushAtomId[i] = 50;
                            break;
                        case "LMK_KILL_OCCURRED":
                        case 51:
                            m.pushAtomId[i] = 51;
                            break;
                        case "PICTURE_IN_PICTURE_STATE_CHANGED":
                        case 52:
                            m.pushAtomId[i] = 52;
                            break;
                        case "WIFI_MULTICAST_LOCK_STATE_CHANGED":
                        case 53:
                            m.pushAtomId[i] = 53;
                            break;
                        case "LMK_STATE_CHANGED":
                        case 54:
                            m.pushAtomId[i] = 54;
                            break;
                        case "APP_START_MEMORY_STATE_CAPTURED":
                        case 55:
                            m.pushAtomId[i] = 55;
                            break;
                        case "SHUTDOWN_SEQUENCE_REPORTED":
                        case 56:
                            m.pushAtomId[i] = 56;
                            break;
                        case "BOOT_SEQUENCE_REPORTED":
                        case 57:
                            m.pushAtomId[i] = 57;
                            break;
                        case "DAVEY_OCCURRED":
                        case 58:
                            m.pushAtomId[i] = 58;
                            break;
                        case "OVERLAY_STATE_CHANGED":
                        case 59:
                            m.pushAtomId[i] = 59;
                            break;
                        case "FOREGROUND_SERVICE_STATE_CHANGED":
                        case 60:
                            m.pushAtomId[i] = 60;
                            break;
                        case "CALL_STATE_CHANGED":
                        case 61:
                            m.pushAtomId[i] = 61;
                            break;
                        case "KEYGUARD_STATE_CHANGED":
                        case 62:
                            m.pushAtomId[i] = 62;
                            break;
                        case "KEYGUARD_BOUNCER_STATE_CHANGED":
                        case 63:
                            m.pushAtomId[i] = 63;
                            break;
                        case "KEYGUARD_BOUNCER_PASSWORD_ENTERED":
                        case 64:
                            m.pushAtomId[i] = 64;
                            break;
                        case "APP_DIED":
                        case 65:
                            m.pushAtomId[i] = 65;
                            break;
                        case "RESOURCE_CONFIGURATION_CHANGED":
                        case 66:
                            m.pushAtomId[i] = 66;
                            break;
                        case "BLUETOOTH_ENABLED_STATE_CHANGED":
                        case 67:
                            m.pushAtomId[i] = 67;
                            break;
                        case "BLUETOOTH_CONNECTION_STATE_CHANGED":
                        case 68:
                            m.pushAtomId[i] = 68;
                            break;
                        case "GPS_SIGNAL_QUALITY_CHANGED":
                        case 69:
                            m.pushAtomId[i] = 69;
                            break;
                        case "USB_CONNECTOR_STATE_CHANGED":
                        case 70:
                            m.pushAtomId[i] = 70;
                            break;
                        case "SPEAKER_IMPEDANCE_REPORTED":
                        case 71:
                            m.pushAtomId[i] = 71;
                            break;
                        case "HARDWARE_FAILED":
                        case 72:
                            m.pushAtomId[i] = 72;
                            break;
                        case "PHYSICAL_DROP_DETECTED":
                        case 73:
                            m.pushAtomId[i] = 73;
                            break;
                        case "CHARGE_CYCLES_REPORTED":
                        case 74:
                            m.pushAtomId[i] = 74;
                            break;
                        case "MOBILE_CONNECTION_STATE_CHANGED":
                        case 75:
                            m.pushAtomId[i] = 75;
                            break;
                        case "MOBILE_RADIO_TECHNOLOGY_CHANGED":
                        case 76:
                            m.pushAtomId[i] = 76;
                            break;
                        case "USB_DEVICE_ATTACHED":
                        case 77:
                            m.pushAtomId[i] = 77;
                            break;
                        case "APP_CRASH_OCCURRED":
                        case 78:
                            m.pushAtomId[i] = 78;
                            break;
                        case "ANR_OCCURRED":
                        case 79:
                            m.pushAtomId[i] = 79;
                            break;
                        case "WTF_OCCURRED":
                        case 80:
                            m.pushAtomId[i] = 80;
                            break;
                        case "LOW_MEM_REPORTED":
                        case 81:
                            m.pushAtomId[i] = 81;
                            break;
                        case "GENERIC_ATOM":
                        case 82:
                            m.pushAtomId[i] = 82;
                            break;
                        case "KEY_VALUE_PAIRS_ATOM":
                        case 83:
                            m.pushAtomId[i] = 83;
                            break;
                        case "VIBRATOR_STATE_CHANGED":
                        case 84:
                            m.pushAtomId[i] = 84;
                            break;
                        case "DEFERRED_JOB_STATS_REPORTED":
                        case 85:
                            m.pushAtomId[i] = 85;
                            break;
                        case "THERMAL_THROTTLING":
                        case 86:
                            m.pushAtomId[i] = 86;
                            break;
                        case "BIOMETRIC_ACQUIRED":
                        case 87:
                            m.pushAtomId[i] = 87;
                            break;
                        case "BIOMETRIC_AUTHENTICATED":
                        case 88:
                            m.pushAtomId[i] = 88;
                            break;
                        case "BIOMETRIC_ERROR_OCCURRED":
                        case 89:
                            m.pushAtomId[i] = 89;
                            break;
                        case "UI_EVENT_REPORTED":
                        case 90:
                            m.pushAtomId[i] = 90;
                            break;
                        case "BATTERY_HEALTH_SNAPSHOT":
                        case 91:
                            m.pushAtomId[i] = 91;
                            break;
                        case "SLOW_IO":
                        case 92:
                            m.pushAtomId[i] = 92;
                            break;
                        case "BATTERY_CAUSED_SHUTDOWN":
                        case 93:
                            m.pushAtomId[i] = 93;
                            break;
                        case "PHONE_SERVICE_STATE_CHANGED":
                        case 94:
                            m.pushAtomId[i] = 94;
                            break;
                        case "PHONE_STATE_CHANGED":
                        case 95:
                            m.pushAtomId[i] = 95;
                            break;
                        case "USER_RESTRICTION_CHANGED":
                        case 96:
                            m.pushAtomId[i] = 96;
                            break;
                        case "SETTINGS_UI_CHANGED":
                        case 97:
                            m.pushAtomId[i] = 97;
                            break;
                        case "CONNECTIVITY_STATE_CHANGED":
                        case 98:
                            m.pushAtomId[i] = 98;
                            break;
                        case "SERVICE_STATE_CHANGED":
                        case 99:
                            m.pushAtomId[i] = 99;
                            break;
                        case "SERVICE_LAUNCH_REPORTED":
                        case 100:
                            m.pushAtomId[i] = 100;
                            break;
                        case "FLAG_FLIP_UPDATE_OCCURRED":
                        case 101:
                            m.pushAtomId[i] = 101;
                            break;
                        case "BINARY_PUSH_STATE_CHANGED":
                        case 102:
                            m.pushAtomId[i] = 102;
                            break;
                        case "DEVICE_POLICY_EVENT":
                        case 103:
                            m.pushAtomId[i] = 103;
                            break;
                        case "DOCS_UI_FILE_OP_CANCELED":
                        case 104:
                            m.pushAtomId[i] = 104;
                            break;
                        case "DOCS_UI_FILE_OP_COPY_MOVE_MODE_REPORTED":
                        case 105:
                            m.pushAtomId[i] = 105;
                            break;
                        case "DOCS_UI_FILE_OP_FAILURE":
                        case 106:
                            m.pushAtomId[i] = 106;
                            break;
                        case "DOCS_UI_PROVIDER_FILE_OP":
                        case 107:
                            m.pushAtomId[i] = 107;
                            break;
                        case "DOCS_UI_INVALID_SCOPED_ACCESS_REQUEST":
                        case 108:
                            m.pushAtomId[i] = 108;
                            break;
                        case "DOCS_UI_LAUNCH_REPORTED":
                        case 109:
                            m.pushAtomId[i] = 109;
                            break;
                        case "DOCS_UI_ROOT_VISITED":
                        case 110:
                            m.pushAtomId[i] = 110;
                            break;
                        case "DOCS_UI_STARTUP_MS":
                        case 111:
                            m.pushAtomId[i] = 111;
                            break;
                        case "DOCS_UI_USER_ACTION_REPORTED":
                        case 112:
                            m.pushAtomId[i] = 112;
                            break;
                        case "WIFI_ENABLED_STATE_CHANGED":
                        case 113:
                            m.pushAtomId[i] = 113;
                            break;
                        case "WIFI_RUNNING_STATE_CHANGED":
                        case 114:
                            m.pushAtomId[i] = 114;
                            break;
                        case "APP_COMPACTED":
                        case 115:
                            m.pushAtomId[i] = 115;
                            break;
                        case "NETWORK_DNS_EVENT_REPORTED":
                        case 116:
                            m.pushAtomId[i] = 116;
                            break;
                        case "DOCS_UI_PICKER_LAUNCHED_FROM_REPORTED":
                        case 117:
                            m.pushAtomId[i] = 117;
                            break;
                        case "DOCS_UI_PICK_RESULT_REPORTED":
                        case 118:
                            m.pushAtomId[i] = 118;
                            break;
                        case "DOCS_UI_SEARCH_MODE_REPORTED":
                        case 119:
                            m.pushAtomId[i] = 119;
                            break;
                        case "DOCS_UI_SEARCH_TYPE_REPORTED":
                        case 120:
                            m.pushAtomId[i] = 120;
                            break;
                        case "DATA_STALL_EVENT":
                        case 121:
                            m.pushAtomId[i] = 121;
                            break;
                        case "RESCUE_PARTY_RESET_REPORTED":
                        case 122:
                            m.pushAtomId[i] = 122;
                            break;
                        case "SIGNED_CONFIG_REPORTED":
                        case 123:
                            m.pushAtomId[i] = 123;
                            break;
                        case "GNSS_NI_EVENT_REPORTED":
                        case 124:
                            m.pushAtomId[i] = 124;
                            break;
                        case "BLUETOOTH_LINK_LAYER_CONNECTION_EVENT":
                        case 125:
                            m.pushAtomId[i] = 125;
                            break;
                        case "BLUETOOTH_ACL_CONNECTION_STATE_CHANGED":
                        case 126:
                            m.pushAtomId[i] = 126;
                            break;
                        case "BLUETOOTH_SCO_CONNECTION_STATE_CHANGED":
                        case 127:
                            m.pushAtomId[i] = 127;
                            break;
                        case "APP_DOWNGRADED":
                        case 128:
                            m.pushAtomId[i] = 128;
                            break;
                        case "APP_OPTIMIZED_AFTER_DOWNGRADED":
                        case 129:
                            m.pushAtomId[i] = 129;
                            break;
                        case "LOW_STORAGE_STATE_CHANGED":
                        case 130:
                            m.pushAtomId[i] = 130;
                            break;
                        case "GNSS_NFW_NOTIFICATION_REPORTED":
                        case 131:
                            m.pushAtomId[i] = 131;
                            break;
                        case "GNSS_CONFIGURATION_REPORTED":
                        case 132:
                            m.pushAtomId[i] = 132;
                            break;
                        case "USB_PORT_OVERHEAT_EVENT_REPORTED":
                        case 133:
                            m.pushAtomId[i] = 133;
                            break;
                        case "NFC_ERROR_OCCURRED":
                        case 134:
                            m.pushAtomId[i] = 134;
                            break;
                        case "NFC_STATE_CHANGED":
                        case 135:
                            m.pushAtomId[i] = 135;
                            break;
                        case "NFC_BEAM_OCCURRED":
                        case 136:
                            m.pushAtomId[i] = 136;
                            break;
                        case "NFC_CARDEMULATION_OCCURRED":
                        case 137:
                            m.pushAtomId[i] = 137;
                            break;
                        case "NFC_TAG_OCCURRED":
                        case 138:
                            m.pushAtomId[i] = 138;
                            break;
                        case "NFC_HCE_TRANSACTION_OCCURRED":
                        case 139:
                            m.pushAtomId[i] = 139;
                            break;
                        case "SE_STATE_CHANGED":
                        case 140:
                            m.pushAtomId[i] = 140;
                            break;
                        case "SE_OMAPI_REPORTED":
                        case 141:
                            m.pushAtomId[i] = 141;
                            break;
                        case "BROADCAST_DISPATCH_LATENCY_REPORTED":
                        case 142:
                            m.pushAtomId[i] = 142;
                            break;
                        case "ATTENTION_MANAGER_SERVICE_RESULT_REPORTED":
                        case 143:
                            m.pushAtomId[i] = 143;
                            break;
                        case "ADB_CONNECTION_CHANGED":
                        case 144:
                            m.pushAtomId[i] = 144;
                            break;
                        case "SPEECH_DSP_STAT_REPORTED":
                        case 145:
                            m.pushAtomId[i] = 145;
                            break;
                        case "USB_CONTAMINANT_REPORTED":
                        case 146:
                            m.pushAtomId[i] = 146;
                            break;
                        case "WATCHDOG_ROLLBACK_OCCURRED":
                        case 147:
                            m.pushAtomId[i] = 147;
                            break;
                        case "BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED":
                        case 148:
                            m.pushAtomId[i] = 148;
                            break;
                        case "BUBBLE_UI_CHANGED":
                        case 149:
                            m.pushAtomId[i] = 149;
                            break;
                        case "SCHEDULED_JOB_CONSTRAINT_CHANGED":
                        case 150:
                            m.pushAtomId[i] = 150;
                            break;
                        case "BLUETOOTH_ACTIVE_DEVICE_CHANGED":
                        case 151:
                            m.pushAtomId[i] = 151;
                            break;
                        case "BLUETOOTH_A2DP_PLAYBACK_STATE_CHANGED":
                        case 152:
                            m.pushAtomId[i] = 152;
                            break;
                        case "BLUETOOTH_A2DP_CODEC_CONFIG_CHANGED":
                        case 153:
                            m.pushAtomId[i] = 153;
                            break;
                        case "BLUETOOTH_A2DP_CODEC_CAPABILITY_CHANGED":
                        case 154:
                            m.pushAtomId[i] = 154;
                            break;
                        case "BLUETOOTH_A2DP_AUDIO_UNDERRUN_REPORTED":
                        case 155:
                            m.pushAtomId[i] = 155;
                            break;
                        case "BLUETOOTH_A2DP_AUDIO_OVERRUN_REPORTED":
                        case 156:
                            m.pushAtomId[i] = 156;
                            break;
                        case "BLUETOOTH_DEVICE_RSSI_REPORTED":
                        case 157:
                            m.pushAtomId[i] = 157;
                            break;
                        case "BLUETOOTH_DEVICE_FAILED_CONTACT_COUNTER_REPORTED":
                        case 158:
                            m.pushAtomId[i] = 158;
                            break;
                        case "BLUETOOTH_DEVICE_TX_POWER_LEVEL_REPORTED":
                        case 159:
                            m.pushAtomId[i] = 159;
                            break;
                        case "BLUETOOTH_HCI_TIMEOUT_REPORTED":
                        case 160:
                            m.pushAtomId[i] = 160;
                            break;
                        case "BLUETOOTH_QUALITY_REPORT_REPORTED":
                        case 161:
                            m.pushAtomId[i] = 161;
                            break;
                        case "BLUETOOTH_DEVICE_INFO_REPORTED":
                        case 162:
                            m.pushAtomId[i] = 162;
                            break;
                        case "BLUETOOTH_REMOTE_VERSION_INFO_REPORTED":
                        case 163:
                            m.pushAtomId[i] = 163;
                            break;
                        case "BLUETOOTH_SDP_ATTRIBUTE_REPORTED":
                        case 164:
                            m.pushAtomId[i] = 164;
                            break;
                        case "BLUETOOTH_BOND_STATE_CHANGED":
                        case 165:
                            m.pushAtomId[i] = 165;
                            break;
                        case "BLUETOOTH_CLASSIC_PAIRING_EVENT_REPORTED":
                        case 166:
                            m.pushAtomId[i] = 166;
                            break;
                        case "BLUETOOTH_SMP_PAIRING_EVENT_REPORTED":
                        case 167:
                            m.pushAtomId[i] = 167;
                            break;
                        case "SCREEN_TIMEOUT_EXTENSION_REPORTED":
                        case 168:
                            m.pushAtomId[i] = 168;
                            break;
                        case "PROCESS_START_TIME":
                        case 169:
                            m.pushAtomId[i] = 169;
                            break;
                        case "PERMISSION_GRANT_REQUEST_RESULT_REPORTED":
                        case 170:
                            m.pushAtomId[i] = 170;
                            break;
                        case "BLUETOOTH_SOCKET_CONNECTION_STATE_CHANGED":
                        case 171:
                            m.pushAtomId[i] = 171;
                            break;
                        case "DEVICE_IDENTIFIER_ACCESS_DENIED":
                        case 172:
                            m.pushAtomId[i] = 172;
                            break;
                        case "BUBBLE_DEVELOPER_ERROR_REPORTED":
                        case 173:
                            m.pushAtomId[i] = 173;
                            break;
                        case "ASSIST_GESTURE_STAGE_REPORTED":
                        case 174:
                            m.pushAtomId[i] = 174;
                            break;
                        case "ASSIST_GESTURE_FEEDBACK_REPORTED":
                        case 175:
                            m.pushAtomId[i] = 175;
                            break;
                        case "ASSIST_GESTURE_PROGRESS_REPORTED":
                        case 176:
                            m.pushAtomId[i] = 176;
                            break;
                        case "TOUCH_GESTURE_CLASSIFIED":
                        case 177:
                            m.pushAtomId[i] = 177;
                            break;
                        case "HIDDEN_API_USED":
                        case 178:
                            m.pushAtomId[i] = 178;
                            break;
                        case "STYLE_UI_CHANGED":
                        case 179:
                            m.pushAtomId[i] = 179;
                            break;
                        case "PRIVACY_INDICATORS_INTERACTED":
                        case 180:
                            m.pushAtomId[i] = 180;
                            break;
                        case "APP_INSTALL_ON_EXTERNAL_STORAGE_REPORTED":
                        case 181:
                            m.pushAtomId[i] = 181;
                            break;
                        case "NETWORK_STACK_REPORTED":
                        case 182:
                            m.pushAtomId[i] = 182;
                            break;
                        case "APP_MOVED_STORAGE_REPORTED":
                        case 183:
                            m.pushAtomId[i] = 183;
                            break;
                        case "BIOMETRIC_ENROLLED":
                        case 184:
                            m.pushAtomId[i] = 184;
                            break;
                        case "SYSTEM_SERVER_WATCHDOG_OCCURRED":
                        case 185:
                            m.pushAtomId[i] = 185;
                            break;
                        case "TOMB_STONE_OCCURRED":
                        case 186:
                            m.pushAtomId[i] = 186;
                            break;
                        case "BLUETOOTH_CLASS_OF_DEVICE_REPORTED":
                        case 187:
                            m.pushAtomId[i] = 187;
                            break;
                        case "INTELLIGENCE_EVENT_REPORTED":
                        case 188:
                            m.pushAtomId[i] = 188;
                            break;
                        case "THERMAL_THROTTLING_SEVERITY_STATE_CHANGED":
                        case 189:
                            m.pushAtomId[i] = 189;
                            break;
                        case "ROLE_REQUEST_RESULT_REPORTED":
                        case 190:
                            m.pushAtomId[i] = 190;
                            break;
                        case "MEDIAMETRICS_AUDIOPOLICY_REPORTED":
                        case 191:
                            m.pushAtomId[i] = 191;
                            break;
                        case "MEDIAMETRICS_AUDIORECORD_REPORTED":
                        case 192:
                            m.pushAtomId[i] = 192;
                            break;
                        case "MEDIAMETRICS_AUDIOTHREAD_REPORTED":
                        case 193:
                            m.pushAtomId[i] = 193;
                            break;
                        case "MEDIAMETRICS_AUDIOTRACK_REPORTED":
                        case 194:
                            m.pushAtomId[i] = 194;
                            break;
                        case "MEDIAMETRICS_CODEC_REPORTED":
                        case 195:
                            m.pushAtomId[i] = 195;
                            break;
                        case "MEDIAMETRICS_DRM_WIDEVINE_REPORTED":
                        case 196:
                            m.pushAtomId[i] = 196;
                            break;
                        case "MEDIAMETRICS_EXTRACTOR_REPORTED":
                        case 197:
                            m.pushAtomId[i] = 197;
                            break;
                        case "MEDIAMETRICS_MEDIADRM_REPORTED":
                        case 198:
                            m.pushAtomId[i] = 198;
                            break;
                        case "MEDIAMETRICS_NUPLAYER_REPORTED":
                        case 199:
                            m.pushAtomId[i] = 199;
                            break;
                        case "MEDIAMETRICS_RECORDER_REPORTED":
                        case 200:
                            m.pushAtomId[i] = 200;
                            break;
                        case "MEDIAMETRICS_DRMMANAGER_REPORTED":
                        case 201:
                            m.pushAtomId[i] = 201;
                            break;
                        case "CAR_POWER_STATE_CHANGED":
                        case 203:
                            m.pushAtomId[i] = 203;
                            break;
                        case "GARAGE_MODE_INFO":
                        case 204:
                            m.pushAtomId[i] = 204;
                            break;
                        case "TEST_ATOM_REPORTED":
                        case 205:
                            m.pushAtomId[i] = 205;
                            break;
                        case "CONTENT_CAPTURE_CALLER_MISMATCH_REPORTED":
                        case 206:
                            m.pushAtomId[i] = 206;
                            break;
                        case "CONTENT_CAPTURE_SERVICE_EVENTS":
                        case 207:
                            m.pushAtomId[i] = 207;
                            break;
                        case "CONTENT_CAPTURE_SESSION_EVENTS":
                        case 208:
                            m.pushAtomId[i] = 208;
                            break;
                        case "CONTENT_CAPTURE_FLUSHED":
                        case 209:
                            m.pushAtomId[i] = 209;
                            break;
                        case "LOCATION_MANAGER_API_USAGE_REPORTED":
                        case 210:
                            m.pushAtomId[i] = 210;
                            break;
                        case "REVIEW_PERMISSIONS_FRAGMENT_RESULT_REPORTED":
                        case 211:
                            m.pushAtomId[i] = 211;
                            break;
                        case "RUNTIME_PERMISSIONS_UPGRADE_RESULT":
                        case 212:
                            m.pushAtomId[i] = 212;
                            break;
                        case "GRANT_PERMISSIONS_ACTIVITY_BUTTON_ACTIONS":
                        case 213:
                            m.pushAtomId[i] = 213;
                            break;
                        case "LOCATION_ACCESS_CHECK_NOTIFICATION_ACTION":
                        case 214:
                            m.pushAtomId[i] = 214;
                            break;
                        case "APP_PERMISSION_FRAGMENT_ACTION_REPORTED":
                        case 215:
                            m.pushAtomId[i] = 215;
                            break;
                        case "APP_PERMISSION_FRAGMENT_VIEWED":
                        case 216:
                            m.pushAtomId[i] = 216;
                            break;
                        case "APP_PERMISSIONS_FRAGMENT_VIEWED":
                        case 217:
                            m.pushAtomId[i] = 217;
                            break;
                        case "PERMISSION_APPS_FRAGMENT_VIEWED":
                        case 218:
                            m.pushAtomId[i] = 218;
                            break;
                        case "TEXT_SELECTION_EVENT":
                        case 219:
                            m.pushAtomId[i] = 219;
                            break;
                        case "TEXT_LINKIFY_EVENT":
                        case 220:
                            m.pushAtomId[i] = 220;
                            break;
                        case "CONVERSATION_ACTIONS_EVENT":
                        case 221:
                            m.pushAtomId[i] = 221;
                            break;
                        case "LANGUAGE_DETECTION_EVENT":
                        case 222:
                            m.pushAtomId[i] = 222;
                            break;
                        case "EXCLUSION_RECT_STATE_CHANGED":
                        case 223:
                            m.pushAtomId[i] = 223;
                            break;
                        case "BACK_GESTURE_REPORTED_REPORTED":
                        case 224:
                            m.pushAtomId[i] = 224;
                            break;
                        case "UPDATE_ENGINE_UPDATE_ATTEMPT_REPORTED":
                        case 225:
                            m.pushAtomId[i] = 225;
                            break;
                        case "UPDATE_ENGINE_SUCCESSFUL_UPDATE_REPORTED":
                        case 226:
                            m.pushAtomId[i] = 226;
                            break;
                        case "CAMERA_ACTION_EVENT":
                        case 227:
                            m.pushAtomId[i] = 227;
                            break;
                        case "APP_COMPATIBILITY_CHANGE_REPORTED":
                        case 228:
                            m.pushAtomId[i] = 228;
                            break;
                        case "PERFETTO_UPLOADED":
                        case 229:
                            m.pushAtomId[i] = 229;
                            break;
                        case "VMS_CLIENT_CONNECTION_STATE_CHANGED":
                        case 230:
                            m.pushAtomId[i] = 230;
                            break;
                        case "MEDIA_PROVIDER_SCAN_OCCURRED":
                        case 233:
                            m.pushAtomId[i] = 233;
                            break;
                        case "MEDIA_CONTENT_DELETED":
                        case 234:
                            m.pushAtomId[i] = 234;
                            break;
                        case "MEDIA_PROVIDER_PERMISSION_REQUESTED":
                        case 235:
                            m.pushAtomId[i] = 235;
                            break;
                        case "MEDIA_PROVIDER_SCHEMA_CHANGED":
                        case 236:
                            m.pushAtomId[i] = 236;
                            break;
                        case "MEDIA_PROVIDER_IDLE_MAINTENANCE_FINISHED":
                        case 237:
                            m.pushAtomId[i] = 237;
                            break;
                        case "REBOOT_ESCROW_RECOVERY_REPORTED":
                        case 238:
                            m.pushAtomId[i] = 238;
                            break;
                        case "BOOT_TIME_EVENT_DURATION_REPORTED":
                        case 239:
                            m.pushAtomId[i] = 239;
                            break;
                        case "BOOT_TIME_EVENT_ELAPSED_TIME_REPORTED":
                        case 240:
                            m.pushAtomId[i] = 240;
                            break;
                        case "BOOT_TIME_EVENT_UTC_TIME_REPORTED":
                        case 241:
                            m.pushAtomId[i] = 241;
                            break;
                        case "BOOT_TIME_EVENT_ERROR_CODE_REPORTED":
                        case 242:
                            m.pushAtomId[i] = 242;
                            break;
                        case "USERSPACE_REBOOT_REPORTED":
                        case 243:
                            m.pushAtomId[i] = 243;
                            break;
                        case "NOTIFICATION_REPORTED":
                        case 244:
                            m.pushAtomId[i] = 244;
                            break;
                        case "NOTIFICATION_PANEL_REPORTED":
                        case 245:
                            m.pushAtomId[i] = 245;
                            break;
                        case "NOTIFICATION_CHANNEL_MODIFIED":
                        case 246:
                            m.pushAtomId[i] = 246;
                            break;
                        case "INTEGRITY_CHECK_RESULT_REPORTED":
                        case 247:
                            m.pushAtomId[i] = 247;
                            break;
                        case "INTEGRITY_RULES_PUSHED":
                        case 248:
                            m.pushAtomId[i] = 248;
                            break;
                        case "CB_MESSAGE_REPORTED":
                        case 249:
                            m.pushAtomId[i] = 249;
                            break;
                        case "CB_MESSAGE_ERROR":
                        case 250:
                            m.pushAtomId[i] = 250;
                            break;
                        case "WIFI_HEALTH_STAT_REPORTED":
                        case 251:
                            m.pushAtomId[i] = 251;
                            break;
                        case "WIFI_FAILURE_STAT_REPORTED":
                        case 252:
                            m.pushAtomId[i] = 252;
                            break;
                        case "WIFI_CONNECTION_RESULT_REPORTED":
                        case 253:
                            m.pushAtomId[i] = 253;
                            break;
                        case "APP_FREEZE_CHANGED":
                        case 254:
                            m.pushAtomId[i] = 254;
                            break;
                        case "SNAPSHOT_MERGE_REPORTED":
                        case 255:
                            m.pushAtomId[i] = 255;
                            break;
                        case "FOREGROUND_SERVICE_APP_OP_SESSION_ENDED":
                        case 256:
                            m.pushAtomId[i] = 256;
                            break;
                        case "DISPLAY_JANK_REPORTED":
                        case 257:
                            m.pushAtomId[i] = 257;
                            break;
                        case "APP_STANDBY_BUCKET_CHANGED":
                        case 258:
                            m.pushAtomId[i] = 258;
                            break;
                        case "SHARESHEET_STARTED":
                        case 259:
                            m.pushAtomId[i] = 259;
                            break;
                        case "RANKING_SELECTED":
                        case 260:
                            m.pushAtomId[i] = 260;
                            break;
                        case "TVSETTINGS_UI_INTERACTED":
                        case 261:
                            m.pushAtomId[i] = 261;
                            break;
                        case "LAUNCHER_SNAPSHOT":
                        case 262:
                            m.pushAtomId[i] = 262;
                            break;
                        case "PACKAGE_INSTALLER_V2_REPORTED":
                        case 263:
                            m.pushAtomId[i] = 263;
                            break;
                        case "USER_LIFECYCLE_JOURNEY_REPORTED":
                        case 264:
                            m.pushAtomId[i] = 264;
                            break;
                        case "USER_LIFECYCLE_EVENT_OCCURRED":
                        case 265:
                            m.pushAtomId[i] = 265;
                            break;
                        case "ACCESSIBILITY_SHORTCUT_REPORTED":
                        case 266:
                            m.pushAtomId[i] = 266;
                            break;
                        case "ACCESSIBILITY_SERVICE_REPORTED":
                        case 267:
                            m.pushAtomId[i] = 267;
                            break;
                        case "DOCS_UI_DRAG_AND_DROP_REPORTED":
                        case 268:
                            m.pushAtomId[i] = 268;
                            break;
                        case "APP_USAGE_EVENT_OCCURRED":
                        case 269:
                            m.pushAtomId[i] = 269;
                            break;
                        case "AUTO_REVOKE_NOTIFICATION_CLICKED":
                        case 270:
                            m.pushAtomId[i] = 270;
                            break;
                        case "AUTO_REVOKE_FRAGMENT_APP_VIEWED":
                        case 271:
                            m.pushAtomId[i] = 271;
                            break;
                        case "AUTO_REVOKED_APP_INTERACTION":
                        case 272:
                            m.pushAtomId[i] = 272;
                            break;
                        case "APP_PERMISSION_GROUPS_FRAGMENT_AUTO_REVOKE_ACTION":
                        case 273:
                            m.pushAtomId[i] = 273;
                            break;
                        case "EVS_USAGE_STATS_REPORTED":
                        case 274:
                            m.pushAtomId[i] = 274;
                            break;
                        case "AUDIO_POWER_USAGE_DATA_REPORTED":
                        case 275:
                            m.pushAtomId[i] = 275;
                            break;
                        case "TV_TUNER_STATE_CHANGED":
                        case 276:
                            m.pushAtomId[i] = 276;
                            break;
                        case "MEDIAOUTPUT_OP_SWITCH_REPORTED":
                        case 277:
                            m.pushAtomId[i] = 277;
                            break;
                        case "CB_MESSAGE_FILTERED":
                        case 278:
                            m.pushAtomId[i] = 278;
                            break;
                        case "TV_TUNER_DVR_STATUS":
                        case 279:
                            m.pushAtomId[i] = 279;
                            break;
                        case "TV_CAS_SESSION_OPEN_STATUS":
                        case 280:
                            m.pushAtomId[i] = 280;
                            break;
                        case "ASSISTANT_INVOCATION_REPORTED":
                        case 281:
                            m.pushAtomId[i] = 281;
                            break;
                        case "DISPLAY_WAKE_REPORTED":
                        case 282:
                            m.pushAtomId[i] = 282;
                            break;
                        case "CAR_USER_HAL_MODIFY_USER_REQUEST_REPORTED":
                        case 283:
                            m.pushAtomId[i] = 283;
                            break;
                        case "CAR_USER_HAL_MODIFY_USER_RESPONSE_REPORTED":
                        case 284:
                            m.pushAtomId[i] = 284;
                            break;
                        case "CAR_USER_HAL_POST_SWITCH_RESPONSE_REPORTED":
                        case 285:
                            m.pushAtomId[i] = 285;
                            break;
                        case "CAR_USER_HAL_INITIAL_USER_INFO_REQUEST_REPORTED":
                        case 286:
                            m.pushAtomId[i] = 286;
                            break;
                        case "CAR_USER_HAL_INITIAL_USER_INFO_RESPONSE_REPORTED":
                        case 287:
                            m.pushAtomId[i] = 287;
                            break;
                        case "CAR_USER_HAL_USER_ASSOCIATION_REQUEST_REPORTED":
                        case 288:
                            m.pushAtomId[i] = 288;
                            break;
                        case "CAR_USER_HAL_SET_USER_ASSOCIATION_RESPONSE_REPORTED":
                        case 289:
                            m.pushAtomId[i] = 289;
                            break;
                        case "NETWORK_IP_PROVISIONING_REPORTED":
                        case 290:
                            m.pushAtomId[i] = 290;
                            break;
                        case "NETWORK_DHCP_RENEW_REPORTED":
                        case 291:
                            m.pushAtomId[i] = 291;
                            break;
                        case "NETWORK_VALIDATION_REPORTED":
                        case 292:
                            m.pushAtomId[i] = 292;
                            break;
                        case "NETWORK_STACK_QUIRK_REPORTED":
                        case 293:
                            m.pushAtomId[i] = 293;
                            break;
                        case "MEDIAMETRICS_AUDIORECORDDEVICEUSAGE_REPORTED":
                        case 294:
                            m.pushAtomId[i] = 294;
                            break;
                        case "MEDIAMETRICS_AUDIOTHREADDEVICEUSAGE_REPORTED":
                        case 295:
                            m.pushAtomId[i] = 295;
                            break;
                        case "MEDIAMETRICS_AUDIOTRACKDEVICEUSAGE_REPORTED":
                        case 296:
                            m.pushAtomId[i] = 296;
                            break;
                        case "MEDIAMETRICS_AUDIODEVICECONNECTION_REPORTED":
                        case 297:
                            m.pushAtomId[i] = 297;
                            break;
                        case "BLOB_COMMITTED":
                        case 298:
                            m.pushAtomId[i] = 298;
                            break;
                        case "BLOB_LEASED":
                        case 299:
                            m.pushAtomId[i] = 299;
                            break;
                        case "BLOB_OPENED":
                        case 300:
                            m.pushAtomId[i] = 300;
                            break;
                        case "CONTACTS_PROVIDER_STATUS_REPORTED":
                        case 301:
                            m.pushAtomId[i] = 301;
                            break;
                        case "KEYSTORE_KEY_EVENT_REPORTED":
                        case 302:
                            m.pushAtomId[i] = 302;
                            break;
                        case "NETWORK_TETHERING_REPORTED":
                        case 303:
                            m.pushAtomId[i] = 303;
                            break;
                        case "IME_TOUCH_REPORTED":
                        case 304:
                            m.pushAtomId[i] = 304;
                            break;
                        case "UI_INTERACTION_FRAME_INFO_REPORTED":
                        case 305:
                            m.pushAtomId[i] = 305;
                            break;
                        case "UI_ACTION_LATENCY_REPORTED":
                        case 306:
                            m.pushAtomId[i] = 306;
                            break;
                        case "WIFI_DISCONNECT_REPORTED":
                        case 307:
                            m.pushAtomId[i] = 307;
                            break;
                        case "WIFI_CONNECTION_STATE_CHANGED":
                        case 308:
                            m.pushAtomId[i] = 308;
                            break;
                        case "HDMI_CEC_ACTIVE_SOURCE_CHANGED":
                        case 309:
                            m.pushAtomId[i] = 309;
                            break;
                        case "HDMI_CEC_MESSAGE_REPORTED":
                        case 310:
                            m.pushAtomId[i] = 310;
                            break;
                        case "AIRPLANE_MODE":
                        case 311:
                            m.pushAtomId[i] = 311;
                            break;
                        case "MODEM_RESTART":
                        case 312:
                            m.pushAtomId[i] = 312;
                            break;
                        case "CARRIER_ID_MISMATCH_REPORTED":
                        case 313:
                            m.pushAtomId[i] = 313;
                            break;
                        case "CARRIER_ID_TABLE_UPDATED":
                        case 314:
                            m.pushAtomId[i] = 314;
                            break;
                        case "DATA_STALL_RECOVERY_REPORTED":
                        case 315:
                            m.pushAtomId[i] = 315;
                            break;
                        case "MEDIAMETRICS_MEDIAPARSER_REPORTED":
                        case 316:
                            m.pushAtomId[i] = 316;
                            break;
                        case "TLS_HANDSHAKE_REPORTED":
                        case 317:
                            m.pushAtomId[i] = 317;
                            break;
                        case "TEXT_CLASSIFIER_API_USAGE_REPORTED":
                        case 318:
                            m.pushAtomId[i] = 318;
                            break;
                        case "CAR_WATCHDOG_KILL_STATS_REPORTED":
                        case 319:
                            m.pushAtomId[i] = 319;
                            break;
                        case "MEDIAMETRICS_PLAYBACK_REPORTED":
                        case 320:
                            m.pushAtomId[i] = 320;
                            break;
                        case "MEDIA_NETWORK_INFO_CHANGED":
                        case 321:
                            m.pushAtomId[i] = 321;
                            break;
                        case "MEDIA_PLAYBACK_STATE_CHANGED":
                        case 322:
                            m.pushAtomId[i] = 322;
                            break;
                        case "MEDIA_PLAYBACK_ERROR_REPORTED":
                        case 323:
                            m.pushAtomId[i] = 323;
                            break;
                        case "MEDIA_PLAYBACK_TRACK_CHANGED":
                        case 324:
                            m.pushAtomId[i] = 324;
                            break;
                        case "WIFI_SCAN_REPORTED":
                        case 325:
                            m.pushAtomId[i] = 325;
                            break;
                        case "WIFI_PNO_SCAN_REPORTED":
                        case 326:
                            m.pushAtomId[i] = 326;
                            break;
                        case "TIF_TUNE_CHANGED":
                        case 327:
                            m.pushAtomId[i] = 327;
                            break;
                        case "AUTO_ROTATE_REPORTED":
                        case 328:
                            m.pushAtomId[i] = 328;
                            break;
                        case "PERFETTO_TRIGGER":
                        case 329:
                            m.pushAtomId[i] = 329;
                            break;
                        case "TRANSCODING_DATA":
                        case 330:
                            m.pushAtomId[i] = 330;
                            break;
                        case "IMS_SERVICE_ENTITLEMENT_UPDATED":
                        case 331:
                            m.pushAtomId[i] = 331;
                            break;
                        case "ART_DATUM_REPORTED":
                        case 332:
                            m.pushAtomId[i] = 332;
                            break;
                        case "DEVICE_ROTATED":
                        case 333:
                            m.pushAtomId[i] = 333;
                            break;
                        case "SIM_SPECIFIC_SETTINGS_RESTORED":
                        case 334:
                            m.pushAtomId[i] = 334;
                            break;
                        case "PIN_STORAGE_EVENT":
                        case 336:
                            m.pushAtomId[i] = 336;
                            break;
                        case "FACE_DOWN_REPORTED":
                        case 337:
                            m.pushAtomId[i] = 337;
                            break;
                        case "BLUETOOTH_HAL_CRASH_REASON_REPORTED":
                        case 338:
                            m.pushAtomId[i] = 338;
                            break;
                        case "REBOOT_ESCROW_PREPARATION_REPORTED":
                        case 339:
                            m.pushAtomId[i] = 339;
                            break;
                        case "REBOOT_ESCROW_LSKF_CAPTURE_REPORTED":
                        case 340:
                            m.pushAtomId[i] = 340;
                            break;
                        case "REBOOT_ESCROW_REBOOT_REPORTED":
                        case 341:
                            m.pushAtomId[i] = 341;
                            break;
                        case "BINDER_LATENCY_REPORTED":
                        case 342:
                            m.pushAtomId[i] = 342;
                            break;
                        case "MEDIAMETRICS_AAUDIOSTREAM_REPORTED":
                        case 343:
                            m.pushAtomId[i] = 343;
                            break;
                        case "MEDIA_TRANSCODING_SESSION_ENDED":
                        case 344:
                            m.pushAtomId[i] = 344;
                            break;
                        case "MAGNIFICATION_USAGE_REPORTED":
                        case 345:
                            m.pushAtomId[i] = 345;
                            break;
                        case "MAGNIFICATION_MODE_WITH_IME_ON_REPORTED":
                        case 346:
                            m.pushAtomId[i] = 346;
                            break;
                        case "APP_SEARCH_CALL_STATS_REPORTED":
                        case 347:
                            m.pushAtomId[i] = 347;
                            break;
                        case "APP_SEARCH_PUT_DOCUMENT_STATS_REPORTED":
                        case 348:
                            m.pushAtomId[i] = 348;
                            break;
                        case "DEVICE_CONTROL_CHANGED":
                        case 349:
                            m.pushAtomId[i] = 349;
                            break;
                        case "DEVICE_STATE_CHANGED":
                        case 350:
                            m.pushAtomId[i] = 350;
                            break;
                        case "INPUTDEVICE_REGISTERED":
                        case 351:
                            m.pushAtomId[i] = 351;
                            break;
                        case "SMARTSPACE_CARD_REPORTED":
                        case 352:
                            m.pushAtomId[i] = 352;
                            break;
                        case "AUTH_PROMPT_AUTHENTICATE_INVOKED":
                        case 353:
                            m.pushAtomId[i] = 353;
                            break;
                        case "AUTH_MANAGER_CAN_AUTHENTICATE_INVOKED":
                        case 354:
                            m.pushAtomId[i] = 354;
                            break;
                        case "AUTH_ENROLL_ACTION_INVOKED":
                        case 355:
                            m.pushAtomId[i] = 355;
                            break;
                        case "AUTH_DEPRECATED_API_USED":
                        case 356:
                            m.pushAtomId[i] = 356;
                            break;
                        case "UNATTENDED_REBOOT_OCCURRED":
                        case 357:
                            m.pushAtomId[i] = 357;
                            break;
                        case "LONG_REBOOT_BLOCKING_REPORTED":
                        case 358:
                            m.pushAtomId[i] = 358;
                            break;
                        case "LOCATION_TIME_ZONE_PROVIDER_STATE_CHANGED":
                        case 359:
                            m.pushAtomId[i] = 359;
                            break;
                        case "FDTRACK_EVENT_OCCURRED":
                        case 364:
                            m.pushAtomId[i] = 364;
                            break;
                        case "TIMEOUT_AUTO_EXTENDED_REPORTED":
                        case 365:
                            m.pushAtomId[i] = 365;
                            break;
                        case "ODREFRESH_REPORTED":
                        case 366:
                            m.pushAtomId[i] = 366;
                            break;
                        case "ALARM_BATCH_DELIVERED":
                        case 367:
                            m.pushAtomId[i] = 367;
                            break;
                        case "ALARM_SCHEDULED":
                        case 368:
                            m.pushAtomId[i] = 368;
                            break;
                        case "CAR_WATCHDOG_IO_OVERUSE_STATS_REPORTED":
                        case 369:
                            m.pushAtomId[i] = 369;
                            break;
                        case "USER_LEVEL_HIBERNATION_STATE_CHANGED":
                        case 370:
                            m.pushAtomId[i] = 370;
                            break;
                        case "APP_SEARCH_INITIALIZE_STATS_REPORTED":
                        case 371:
                            m.pushAtomId[i] = 371;
                            break;
                        case "APP_SEARCH_QUERY_STATS_REPORTED":
                        case 372:
                            m.pushAtomId[i] = 372;
                            break;
                        case "APP_PROCESS_DIED":
                        case 373:
                            m.pushAtomId[i] = 373;
                            break;
                        case "NETWORK_IP_REACHABILITY_MONITOR_REPORTED":
                        case 374:
                            m.pushAtomId[i] = 374;
                            break;
                        case "SLOW_INPUT_EVENT_REPORTED":
                        case 375:
                            m.pushAtomId[i] = 375;
                            break;
                        case "ANR_OCCURRED_PROCESSING_STARTED":
                        case 376:
                            m.pushAtomId[i] = 376;
                            break;
                        case "APP_SEARCH_REMOVE_STATS_REPORTED":
                        case 377:
                            m.pushAtomId[i] = 377;
                            break;
                        case "MEDIA_CODEC_REPORTED":
                        case 378:
                            m.pushAtomId[i] = 378;
                            break;
                        case "PERMISSION_USAGE_FRAGMENT_INTERACTION":
                        case 379:
                            m.pushAtomId[i] = 379;
                            break;
                        case "PERMISSION_DETAILS_INTERACTION":
                        case 380:
                            m.pushAtomId[i] = 380;
                            break;
                        case "PRIVACY_SENSOR_TOGGLE_INTERACTION":
                        case 381:
                            m.pushAtomId[i] = 381;
                            break;
                        case "PRIVACY_TOGGLE_DIALOG_INTERACTION":
                        case 382:
                            m.pushAtomId[i] = 382;
                            break;
                        case "APP_SEARCH_OPTIMIZE_STATS_REPORTED":
                        case 383:
                            m.pushAtomId[i] = 383;
                            break;
                        case "APP_COMPAT_STATE_CHANGED":
                        case 386:
                            m.pushAtomId[i] = 386;
                            break;
                        case "SIZE_COMPAT_RESTART_BUTTON_EVENT_REPORTED":
                        case 387:
                            m.pushAtomId[i] = 387;
                            break;
                        case "SPLITSCREEN_UI_CHANGED":
                        case 388:
                            m.pushAtomId[i] = 388;
                            break;
                        case "BLUETOOTH_CODE_PATH_COUNTER":
                        case 390:
                            m.pushAtomId[i] = 390;
                            break;
                        case "BLUETOOTH_LE_BATCH_SCAN_REPORT_DELAY":
                        case 392:
                            m.pushAtomId[i] = 392;
                            break;
                        case "ACCESSIBILITY_FLOATING_MENU_UI_CHANGED":
                        case 393:
                            m.pushAtomId[i] = 393;
                            break;
                        case "NEURALNETWORKS_COMPILATION_COMPLETED":
                        case 394:
                            m.pushAtomId[i] = 394;
                            break;
                        case "NEURALNETWORKS_EXECUTION_COMPLETED":
                        case 395:
                            m.pushAtomId[i] = 395;
                            break;
                        case "NEURALNETWORKS_COMPILATION_FAILED":
                        case 396:
                            m.pushAtomId[i] = 396;
                            break;
                        case "NEURALNETWORKS_EXECUTION_FAILED":
                        case 397:
                            m.pushAtomId[i] = 397;
                            break;
                        case "VM_CREATION_REQUESTED":
                        case 409:
                            m.pushAtomId[i] = 409;
                            break;
                        case "CAMERA_COMPAT_CONTROL_EVENT_REPORTED":
                        case 411:
                            m.pushAtomId[i] = 411;
                            break;
                        case "TRACING_SERVICE_REPORT_EVENT":
                        case 424:
                            m.pushAtomId[i] = 424;
                            break;
                        case "EARLY_BOOT_COMP_OS_ARTIFACTS_CHECK_REPORTED":
                        case 419:
                            m.pushAtomId[i] = 419;
                            break;
                        case "ISOLATED_COMPILATION_SCHEDULED":
                        case 457:
                            m.pushAtomId[i] = 457;
                            break;
                        case "ISOLATED_COMPILATION_ENDED":
                        case 458:
                            m.pushAtomId[i] = 458;
                            break;
                        case "TELEPHONY_ANOMALY_DETECTED":
                        case 461:
                            m.pushAtomId[i] = 461;
                            break;
                        case "HOTWORD_DETECTOR_CREATE_REQUESTED":
                        case 430:
                            m.pushAtomId[i] = 430;
                            break;
                        case "HOTWORD_DETECTION_SERVICE_INIT_RESULT_REPORTED":
                        case 431:
                            m.pushAtomId[i] = 431;
                            break;
                        case "HOTWORD_DETECTION_SERVICE_RESTARTED":
                        case 432:
                            m.pushAtomId[i] = 432;
                            break;
                        case "HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED":
                        case 433:
                            m.pushAtomId[i] = 433;
                            break;
                        case "HOTWORD_DETECTOR_EVENTS":
                        case 434:
                            m.pushAtomId[i] = 434;
                            break;
                        case "REMOTE_KEY_PROVISIONING_ATTEMPT":
                        case 463:
                            m.pushAtomId[i] = 463;
                            break;
                        case "REMOTE_KEY_PROVISIONING_NETWORK_INFO":
                        case 464:
                            m.pushAtomId[i] = 464;
                            break;
                        case "REMOTE_KEY_PROVISIONING_TIMING":
                        case 465:
                            m.pushAtomId[i] = 465;
                            break;
                        case "WIFI_BYTES_TRANSFER":
                        case 10000:
                            m.pushAtomId[i] = 10000;
                            break;
                        case "WIFI_BYTES_TRANSFER_BY_FG_BG":
                        case 10001:
                            m.pushAtomId[i] = 10001;
                            break;
                        case "MOBILE_BYTES_TRANSFER":
                        case 10002:
                            m.pushAtomId[i] = 10002;
                            break;
                        case "MOBILE_BYTES_TRANSFER_BY_FG_BG":
                        case 10003:
                            m.pushAtomId[i] = 10003;
                            break;
                        case "BLUETOOTH_BYTES_TRANSFER":
                        case 10006:
                            m.pushAtomId[i] = 10006;
                            break;
                        case "KERNEL_WAKELOCK":
                        case 10004:
                            m.pushAtomId[i] = 10004;
                            break;
                        case "SUBSYSTEM_SLEEP_STATE":
                        case 10005:
                            m.pushAtomId[i] = 10005;
                            break;
                        case "CPU_TIME_PER_UID":
                        case 10009:
                            m.pushAtomId[i] = 10009;
                            break;
                        case "CPU_TIME_PER_UID_FREQ":
                        case 10010:
                            m.pushAtomId[i] = 10010;
                            break;
                        case "WIFI_ACTIVITY_INFO":
                        case 10011:
                            m.pushAtomId[i] = 10011;
                            break;
                        case "MODEM_ACTIVITY_INFO":
                        case 10012:
                            m.pushAtomId[i] = 10012;
                            break;
                        case "BLUETOOTH_ACTIVITY_INFO":
                        case 10007:
                            m.pushAtomId[i] = 10007;
                            break;
                        case "PROCESS_MEMORY_STATE":
                        case 10013:
                            m.pushAtomId[i] = 10013;
                            break;
                        case "SYSTEM_ELAPSED_REALTIME":
                        case 10014:
                            m.pushAtomId[i] = 10014;
                            break;
                        case "SYSTEM_UPTIME":
                        case 10015:
                            m.pushAtomId[i] = 10015;
                            break;
                        case "CPU_ACTIVE_TIME":
                        case 10016:
                            m.pushAtomId[i] = 10016;
                            break;
                        case "CPU_CLUSTER_TIME":
                        case 10017:
                            m.pushAtomId[i] = 10017;
                            break;
                        case "DISK_SPACE":
                        case 10018:
                            m.pushAtomId[i] = 10018;
                            break;
                        case "REMAINING_BATTERY_CAPACITY":
                        case 10019:
                            m.pushAtomId[i] = 10019;
                            break;
                        case "FULL_BATTERY_CAPACITY":
                        case 10020:
                            m.pushAtomId[i] = 10020;
                            break;
                        case "TEMPERATURE":
                        case 10021:
                            m.pushAtomId[i] = 10021;
                            break;
                        case "BINDER_CALLS":
                        case 10022:
                            m.pushAtomId[i] = 10022;
                            break;
                        case "BINDER_CALLS_EXCEPTIONS":
                        case 10023:
                            m.pushAtomId[i] = 10023;
                            break;
                        case "LOOPER_STATS":
                        case 10024:
                            m.pushAtomId[i] = 10024;
                            break;
                        case "DISK_STATS":
                        case 10025:
                            m.pushAtomId[i] = 10025;
                            break;
                        case "DIRECTORY_USAGE":
                        case 10026:
                            m.pushAtomId[i] = 10026;
                            break;
                        case "APP_SIZE":
                        case 10027:
                            m.pushAtomId[i] = 10027;
                            break;
                        case "CATEGORY_SIZE":
                        case 10028:
                            m.pushAtomId[i] = 10028;
                            break;
                        case "PROC_STATS":
                        case 10029:
                            m.pushAtomId[i] = 10029;
                            break;
                        case "BATTERY_VOLTAGE":
                        case 10030:
                            m.pushAtomId[i] = 10030;
                            break;
                        case "NUM_FINGERPRINTS_ENROLLED":
                        case 10031:
                            m.pushAtomId[i] = 10031;
                            break;
                        case "DISK_IO":
                        case 10032:
                            m.pushAtomId[i] = 10032;
                            break;
                        case "POWER_PROFILE":
                        case 10033:
                            m.pushAtomId[i] = 10033;
                            break;
                        case "PROC_STATS_PKG_PROC":
                        case 10034:
                            m.pushAtomId[i] = 10034;
                            break;
                        case "PROCESS_CPU_TIME":
                        case 10035:
                            m.pushAtomId[i] = 10035;
                            break;
                        case "CPU_TIME_PER_THREAD_FREQ":
                        case 10037:
                            m.pushAtomId[i] = 10037;
                            break;
                        case "ON_DEVICE_POWER_MEASUREMENT":
                        case 10038:
                            m.pushAtomId[i] = 10038;
                            break;
                        case "DEVICE_CALCULATED_POWER_USE":
                        case 10039:
                            m.pushAtomId[i] = 10039;
                            break;
                        case "DEVICE_CALCULATED_POWER_BLAME_UID":
                        case 10040:
                            m.pushAtomId[i] = 10040;
                            break;
                        case "DEVICE_CALCULATED_POWER_BLAME_OTHER":
                        case 10041:
                            m.pushAtomId[i] = 10041;
                            break;
                        case "PROCESS_MEMORY_HIGH_WATER_MARK":
                        case 10042:
                            m.pushAtomId[i] = 10042;
                            break;
                        case "BATTERY_LEVEL":
                        case 10043:
                            m.pushAtomId[i] = 10043;
                            break;
                        case "BUILD_INFORMATION":
                        case 10044:
                            m.pushAtomId[i] = 10044;
                            break;
                        case "BATTERY_CYCLE_COUNT":
                        case 10045:
                            m.pushAtomId[i] = 10045;
                            break;
                        case "DEBUG_ELAPSED_CLOCK":
                        case 10046:
                            m.pushAtomId[i] = 10046;
                            break;
                        case "DEBUG_FAILING_ELAPSED_CLOCK":
                        case 10047:
                            m.pushAtomId[i] = 10047;
                            break;
                        case "NUM_FACES_ENROLLED":
                        case 10048:
                            m.pushAtomId[i] = 10048;
                            break;
                        case "ROLE_HOLDER":
                        case 10049:
                            m.pushAtomId[i] = 10049;
                            break;
                        case "DANGEROUS_PERMISSION_STATE":
                        case 10050:
                            m.pushAtomId[i] = 10050;
                            break;
                        case "TRAIN_INFO":
                        case 10051:
                            m.pushAtomId[i] = 10051;
                            break;
                        case "TIME_ZONE_DATA_INFO":
                        case 10052:
                            m.pushAtomId[i] = 10052;
                            break;
                        case "EXTERNAL_STORAGE_INFO":
                        case 10053:
                            m.pushAtomId[i] = 10053;
                            break;
                        case "GPU_STATS_GLOBAL_INFO":
                        case 10054:
                            m.pushAtomId[i] = 10054;
                            break;
                        case "GPU_STATS_APP_INFO":
                        case 10055:
                            m.pushAtomId[i] = 10055;
                            break;
                        case "SYSTEM_ION_HEAP_SIZE":
                        case 10056:
                            m.pushAtomId[i] = 10056;
                            break;
                        case "APPS_ON_EXTERNAL_STORAGE_INFO":
                        case 10057:
                            m.pushAtomId[i] = 10057;
                            break;
                        case "FACE_SETTINGS":
                        case 10058:
                            m.pushAtomId[i] = 10058;
                            break;
                        case "COOLING_DEVICE":
                        case 10059:
                            m.pushAtomId[i] = 10059;
                            break;
                        case "APP_OPS":
                        case 10060:
                            m.pushAtomId[i] = 10060;
                            break;
                        case "PROCESS_SYSTEM_ION_HEAP_SIZE":
                        case 10061:
                            m.pushAtomId[i] = 10061;
                            break;
                        case "SURFACEFLINGER_STATS_GLOBAL_INFO":
                        case 10062:
                            m.pushAtomId[i] = 10062;
                            break;
                        case "SURFACEFLINGER_STATS_LAYER_INFO":
                        case 10063:
                            m.pushAtomId[i] = 10063;
                            break;
                        case "PROCESS_MEMORY_SNAPSHOT":
                        case 10064:
                            m.pushAtomId[i] = 10064;
                            break;
                        case "VMS_CLIENT_STATS":
                        case 10065:
                            m.pushAtomId[i] = 10065;
                            break;
                        case "NOTIFICATION_REMOTE_VIEWS":
                        case 10066:
                            m.pushAtomId[i] = 10066;
                            break;
                        case "DANGEROUS_PERMISSION_STATE_SAMPLED":
                        case 10067:
                            m.pushAtomId[i] = 10067;
                            break;
                        case "GRAPHICS_STATS":
                        case 10068:
                            m.pushAtomId[i] = 10068;
                            break;
                        case "RUNTIME_APP_OP_ACCESS":
                        case 10069:
                            m.pushAtomId[i] = 10069;
                            break;
                        case "ION_HEAP_SIZE":
                        case 10070:
                            m.pushAtomId[i] = 10070;
                            break;
                        case "PACKAGE_NOTIFICATION_PREFERENCES":
                        case 10071:
                            m.pushAtomId[i] = 10071;
                            break;
                        case "PACKAGE_NOTIFICATION_CHANNEL_PREFERENCES":
                        case 10072:
                            m.pushAtomId[i] = 10072;
                            break;
                        case "PACKAGE_NOTIFICATION_CHANNEL_GROUP_PREFERENCES":
                        case 10073:
                            m.pushAtomId[i] = 10073;
                            break;
                        case "GNSS_STATS":
                        case 10074:
                            m.pushAtomId[i] = 10074;
                            break;
                        case "ATTRIBUTED_APP_OPS":
                        case 10075:
                            m.pushAtomId[i] = 10075;
                            break;
                        case "VOICE_CALL_SESSION":
                        case 10076:
                            m.pushAtomId[i] = 10076;
                            break;
                        case "VOICE_CALL_RAT_USAGE":
                        case 10077:
                            m.pushAtomId[i] = 10077;
                            break;
                        case "SIM_SLOT_STATE":
                        case 10078:
                            m.pushAtomId[i] = 10078;
                            break;
                        case "SUPPORTED_RADIO_ACCESS_FAMILY":
                        case 10079:
                            m.pushAtomId[i] = 10079;
                            break;
                        case "SETTING_SNAPSHOT":
                        case 10080:
                            m.pushAtomId[i] = 10080;
                            break;
                        case "BLOB_INFO":
                        case 10081:
                            m.pushAtomId[i] = 10081;
                            break;
                        case "DATA_USAGE_BYTES_TRANSFER":
                        case 10082:
                            m.pushAtomId[i] = 10082;
                            break;
                        case "BYTES_TRANSFER_BY_TAG_AND_METERED":
                        case 10083:
                            m.pushAtomId[i] = 10083;
                            break;
                        case "DND_MODE_RULE":
                        case 10084:
                            m.pushAtomId[i] = 10084;
                            break;
                        case "GENERAL_EXTERNAL_STORAGE_ACCESS_STATS":
                        case 10085:
                            m.pushAtomId[i] = 10085;
                            break;
                        case "INCOMING_SMS":
                        case 10086:
                            m.pushAtomId[i] = 10086;
                            break;
                        case "OUTGOING_SMS":
                        case 10087:
                            m.pushAtomId[i] = 10087;
                            break;
                        case "CARRIER_ID_TABLE_VERSION":
                        case 10088:
                            m.pushAtomId[i] = 10088;
                            break;
                        case "DATA_CALL_SESSION":
                        case 10089:
                            m.pushAtomId[i] = 10089;
                            break;
                        case "CELLULAR_SERVICE_STATE":
                        case 10090:
                            m.pushAtomId[i] = 10090;
                            break;
                        case "CELLULAR_DATA_SERVICE_SWITCH":
                        case 10091:
                            m.pushAtomId[i] = 10091;
                            break;
                        case "SYSTEM_MEMORY":
                        case 10092:
                            m.pushAtomId[i] = 10092;
                            break;
                        case "IMS_REGISTRATION_TERMINATION":
                        case 10093:
                            m.pushAtomId[i] = 10093;
                            break;
                        case "IMS_REGISTRATION_STATS":
                        case 10094:
                            m.pushAtomId[i] = 10094;
                            break;
                        case "CPU_TIME_PER_CLUSTER_FREQ":
                        case 10095:
                            m.pushAtomId[i] = 10095;
                            break;
                        case "CPU_CYCLES_PER_UID_CLUSTER":
                        case 10096:
                            m.pushAtomId[i] = 10096;
                            break;
                        case "DEVICE_ROTATED_DATA":
                        case 10097:
                            m.pushAtomId[i] = 10097;
                            break;
                        case "CPU_CYCLES_PER_THREAD_GROUP_CLUSTER":
                        case 10098:
                            m.pushAtomId[i] = 10098;
                            break;
                        case "MEDIA_DRM_ACTIVITY_INFO":
                        case 10099:
                            m.pushAtomId[i] = 10099;
                            break;
                        case "OEM_MANAGED_BYTES_TRANSFER":
                        case 10100:
                            m.pushAtomId[i] = 10100;
                            break;
                        case "GNSS_POWER_STATS":
                        case 10101:
                            m.pushAtomId[i] = 10101;
                            break;
                        case "TIME_ZONE_DETECTOR_STATE":
                        case 10102:
                            m.pushAtomId[i] = 10102;
                            break;
                        case "KEYSTORE2_STORAGE_STATS":
                        case 10103:
                            m.pushAtomId[i] = 10103;
                            break;
                        case "RKP_POOL_STATS":
                        case 10104:
                            m.pushAtomId[i] = 10104;
                            break;
                        case "PROCESS_DMABUF_MEMORY":
                        case 10105:
                            m.pushAtomId[i] = 10105;
                            break;
                        case "PENDING_ALARM_INFO":
                        case 10106:
                            m.pushAtomId[i] = 10106;
                            break;
                        case "USER_LEVEL_HIBERNATED_APPS":
                        case 10107:
                            m.pushAtomId[i] = 10107;
                            break;
                        case "LAUNCHER_LAYOUT_SNAPSHOT":
                        case 10108:
                            m.pushAtomId[i] = 10108;
                            break;
                        case "GLOBAL_HIBERNATED_APPS":
                        case 10109:
                            m.pushAtomId[i] = 10109;
                            break;
                        case "INPUT_EVENT_LATENCY_SKETCH":
                        case 10110:
                            m.pushAtomId[i] = 10110;
                            break;
                        case "BATTERY_USAGE_STATS_BEFORE_RESET":
                        case 10111:
                            m.pushAtomId[i] = 10111;
                            break;
                        case "BATTERY_USAGE_STATS_SINCE_RESET":
                        case 10112:
                            m.pushAtomId[i] = 10112;
                            break;
                        case "BATTERY_USAGE_STATS_SINCE_RESET_USING_POWER_PROFILE_MODEL":
                        case 10113:
                            m.pushAtomId[i] = 10113;
                            break;
                        case "INSTALLED_INCREMENTAL_PACKAGE":
                        case 10114:
                            m.pushAtomId[i] = 10114;
                            break;
                        case "TELEPHONY_NETWORK_REQUESTS":
                        case 10115:
                            m.pushAtomId[i] = 10115;
                            break;
                        case "APP_SEARCH_STORAGE_INFO":
                        case 10116:
                            m.pushAtomId[i] = 10116;
                            break;
                        case "VMSTAT":
                        case 10117:
                            m.pushAtomId[i] = 10117;
                            break;
                        case "KEYSTORE2_KEY_CREATION_WITH_GENERAL_INFO":
                        case 10118:
                            m.pushAtomId[i] = 10118;
                            break;
                        case "KEYSTORE2_KEY_CREATION_WITH_AUTH_INFO":
                        case 10119:
                            m.pushAtomId[i] = 10119;
                            break;
                        case "KEYSTORE2_KEY_CREATION_WITH_PURPOSE_AND_MODES_INFO":
                        case 10120:
                            m.pushAtomId[i] = 10120;
                            break;
                        case "KEYSTORE2_ATOM_WITH_OVERFLOW":
                        case 10121:
                            m.pushAtomId[i] = 10121;
                            break;
                        case "KEYSTORE2_KEY_OPERATION_WITH_PURPOSE_AND_MODES_INFO":
                        case 10122:
                            m.pushAtomId[i] = 10122;
                            break;
                        case "KEYSTORE2_KEY_OPERATION_WITH_GENERAL_INFO":
                        case 10123:
                            m.pushAtomId[i] = 10123;
                            break;
                        case "RKP_ERROR_STATS":
                        case 10124:
                            m.pushAtomId[i] = 10124;
                            break;
                        case "KEYSTORE2_CRASH_STATS":
                        case 10125:
                            m.pushAtomId[i] = 10125;
                            break;
                        case "ACCESSIBILITY_SHORTCUT_STATS":
                        case 10127:
                            m.pushAtomId[i] = 10127;
                            break;
                        case "ACCESSIBILITY_FLOATING_MENU_STATS":
                        case 10128:
                            m.pushAtomId[i] = 10128;
                            break;
                        case "CAR_WATCHDOG_SYSTEM_IO_USAGE_SUMMARY":
                        case 10131:
                            m.pushAtomId[i] = 10131;
                            break;
                        case "CAR_WATCHDOG_UID_IO_USAGE_SUMMARY":
                        case 10132:
                            m.pushAtomId[i] = 10132;
                            break;
                        case "IMS_REGISTRATION_FEATURE_TAG_STATS":
                        case 10133:
                            m.pushAtomId[i] = 10133;
                            break;
                        case "RCS_CLIENT_PROVISIONING_STATS":
                        case 10134:
                            m.pushAtomId[i] = 10134;
                            break;
                        case "RCS_ACS_PROVISIONING_STATS":
                        case 10135:
                            m.pushAtomId[i] = 10135;
                            break;
                        case "SIP_DELEGATE_STATS":
                        case 10136:
                            m.pushAtomId[i] = 10136;
                            break;
                        case "SIP_TRANSPORT_FEATURE_TAG_STATS":
                        case 10137:
                            m.pushAtomId[i] = 10137;
                            break;
                        case "SIP_MESSAGE_RESPONSE":
                        case 10138:
                            m.pushAtomId[i] = 10138;
                            break;
                        case "SIP_TRANSPORT_SESSION":
                        case 10139:
                            m.pushAtomId[i] = 10139;
                            break;
                        case "IMS_DEDICATED_BEARER_LISTENER_EVENT":
                        case 10140:
                            m.pushAtomId[i] = 10140;
                            break;
                        case "IMS_DEDICATED_BEARER_EVENT":
                        case 10141:
                            m.pushAtomId[i] = 10141;
                            break;
                        case "IMS_REGISTRATION_SERVICE_DESC_STATS":
                        case 10142:
                            m.pushAtomId[i] = 10142;
                            break;
                        case "UCE_EVENT_STATS":
                        case 10143:
                            m.pushAtomId[i] = 10143;
                            break;
                        case "PRESENCE_NOTIFY_EVENT":
                        case 10144:
                            m.pushAtomId[i] = 10144;
                            break;
                        case "GBA_EVENT":
                        case 10145:
                            m.pushAtomId[i] = 10145;
                            break;
                        case "REMOTE_KEY_PROVISIONING_ERROR_COUNTS":
                        case 10155:
                            m.pushAtomId[i] = 10155;
                            break;
                        }
                    }
                }
                if (d.rawPushAtomId) {
                    if (!Array.isArray(d.rawPushAtomId))
                        throw TypeError(".perfetto.protos.StatsdTracingConfig.rawPushAtomId: array expected");
                    m.rawPushAtomId = [];
                    for (var i = 0; i < d.rawPushAtomId.length; ++i) {
                        m.rawPushAtomId[i] = d.rawPushAtomId[i] | 0;
                    }
                }
                if (d.pullConfig) {
                    if (!Array.isArray(d.pullConfig))
                        throw TypeError(".perfetto.protos.StatsdTracingConfig.pullConfig: array expected");
                    m.pullConfig = [];
                    for (var i = 0; i < d.pullConfig.length; ++i) {
                        if (typeof d.pullConfig[i] !== "object")
                            throw TypeError(".perfetto.protos.StatsdTracingConfig.pullConfig: object expected");
                        m.pullConfig[i] = $root.perfetto.protos.StatsdPullAtomConfig.fromObject(d.pullConfig[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a StatsdTracingConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.StatsdTracingConfig
             * @static
             * @param {perfetto.protos.StatsdTracingConfig} m StatsdTracingConfig
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            StatsdTracingConfig.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.pushAtomId = [];
                    d.rawPushAtomId = [];
                    d.pullConfig = [];
                }
                if (m.pushAtomId && m.pushAtomId.length) {
                    d.pushAtomId = [];
                    for (var j = 0; j < m.pushAtomId.length; ++j) {
                        d.pushAtomId[j] = o.enums === String ? $root.perfetto.protos.AtomId[m.pushAtomId[j]] : m.pushAtomId[j];
                    }
                }
                if (m.rawPushAtomId && m.rawPushAtomId.length) {
                    d.rawPushAtomId = [];
                    for (var j = 0; j < m.rawPushAtomId.length; ++j) {
                        d.rawPushAtomId[j] = m.rawPushAtomId[j];
                    }
                }
                if (m.pullConfig && m.pullConfig.length) {
                    d.pullConfig = [];
                    for (var j = 0; j < m.pullConfig.length; ++j) {
                        d.pullConfig[j] = $root.perfetto.protos.StatsdPullAtomConfig.toObject(m.pullConfig[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this StatsdTracingConfig to JSON.
             * @function toJSON
             * @memberof perfetto.protos.StatsdTracingConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            StatsdTracingConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return StatsdTracingConfig;
        })();

        protos.StatsdPullAtomConfig = (function() {

            /**
             * Properties of a StatsdPullAtomConfig.
             * @memberof perfetto.protos
             * @interface IStatsdPullAtomConfig
             * @property {Array.<perfetto.protos.AtomId>|null} [pullAtomId] StatsdPullAtomConfig pullAtomId
             * @property {Array.<number>|null} [rawPullAtomId] StatsdPullAtomConfig rawPullAtomId
             * @property {number|null} [pullFrequencyMs] StatsdPullAtomConfig pullFrequencyMs
             * @property {Array.<string>|null} [packages] StatsdPullAtomConfig packages
             */

            /**
             * Constructs a new StatsdPullAtomConfig.
             * @memberof perfetto.protos
             * @classdesc Represents a StatsdPullAtomConfig.
             * @implements IStatsdPullAtomConfig
             * @constructor
             * @param {perfetto.protos.IStatsdPullAtomConfig=} [p] Properties to set
             */
            function StatsdPullAtomConfig(p) {
                this.pullAtomId = [];
                this.rawPullAtomId = [];
                this.packages = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * StatsdPullAtomConfig pullAtomId.
             * @member {Array.<perfetto.protos.AtomId>} pullAtomId
             * @memberof perfetto.protos.StatsdPullAtomConfig
             * @instance
             */
            StatsdPullAtomConfig.prototype.pullAtomId = $util.emptyArray;

            /**
             * StatsdPullAtomConfig rawPullAtomId.
             * @member {Array.<number>} rawPullAtomId
             * @memberof perfetto.protos.StatsdPullAtomConfig
             * @instance
             */
            StatsdPullAtomConfig.prototype.rawPullAtomId = $util.emptyArray;

            /**
             * StatsdPullAtomConfig pullFrequencyMs.
             * @member {number} pullFrequencyMs
             * @memberof perfetto.protos.StatsdPullAtomConfig
             * @instance
             */
            StatsdPullAtomConfig.prototype.pullFrequencyMs = 0;

            /**
             * StatsdPullAtomConfig packages.
             * @member {Array.<string>} packages
             * @memberof perfetto.protos.StatsdPullAtomConfig
             * @instance
             */
            StatsdPullAtomConfig.prototype.packages = $util.emptyArray;

            /**
             * Creates a new StatsdPullAtomConfig instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.StatsdPullAtomConfig
             * @static
             * @param {perfetto.protos.IStatsdPullAtomConfig=} [properties] Properties to set
             * @returns {perfetto.protos.StatsdPullAtomConfig} StatsdPullAtomConfig instance
             */
            StatsdPullAtomConfig.create = function create(properties) {
                return new StatsdPullAtomConfig(properties);
            };

            /**
             * Encodes the specified StatsdPullAtomConfig message. Does not implicitly {@link perfetto.protos.StatsdPullAtomConfig.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.StatsdPullAtomConfig
             * @static
             * @param {perfetto.protos.IStatsdPullAtomConfig} m StatsdPullAtomConfig message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StatsdPullAtomConfig.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.pullAtomId != null && m.pullAtomId.length) {
                    for (var i = 0; i < m.pullAtomId.length; ++i)
                        w.uint32(8).int32(m.pullAtomId[i]);
                }
                if (m.rawPullAtomId != null && m.rawPullAtomId.length) {
                    for (var i = 0; i < m.rawPullAtomId.length; ++i)
                        w.uint32(16).int32(m.rawPullAtomId[i]);
                }
                if (m.pullFrequencyMs != null && Object.hasOwnProperty.call(m, "pullFrequencyMs"))
                    w.uint32(24).int32(m.pullFrequencyMs);
                if (m.packages != null && m.packages.length) {
                    for (var i = 0; i < m.packages.length; ++i)
                        w.uint32(34).string(m.packages[i]);
                }
                return w;
            };

            /**
             * Encodes the specified StatsdPullAtomConfig message, length delimited. Does not implicitly {@link perfetto.protos.StatsdPullAtomConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.StatsdPullAtomConfig
             * @static
             * @param {perfetto.protos.IStatsdPullAtomConfig} message StatsdPullAtomConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StatsdPullAtomConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a StatsdPullAtomConfig message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.StatsdPullAtomConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.StatsdPullAtomConfig} StatsdPullAtomConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatsdPullAtomConfig.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.StatsdPullAtomConfig();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.pullAtomId && m.pullAtomId.length))
                            m.pullAtomId = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.pullAtomId.push(r.int32());
                        } else
                            m.pullAtomId.push(r.int32());
                        break;
                    case 2:
                        if (!(m.rawPullAtomId && m.rawPullAtomId.length))
                            m.rawPullAtomId = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.rawPullAtomId.push(r.int32());
                        } else
                            m.rawPullAtomId.push(r.int32());
                        break;
                    case 3:
                        m.pullFrequencyMs = r.int32();
                        break;
                    case 4:
                        if (!(m.packages && m.packages.length))
                            m.packages = [];
                        m.packages.push(r.string());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a StatsdPullAtomConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.StatsdPullAtomConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.StatsdPullAtomConfig} StatsdPullAtomConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatsdPullAtomConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a StatsdPullAtomConfig message.
             * @function verify
             * @memberof perfetto.protos.StatsdPullAtomConfig
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            StatsdPullAtomConfig.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.pullAtomId != null && m.hasOwnProperty("pullAtomId")) {
                    if (!Array.isArray(m.pullAtomId))
                        return "pullAtomId: array expected";
                    for (var i = 0; i < m.pullAtomId.length; ++i) {
                        switch (m.pullAtomId[i]) {
                        default:
                            return "pullAtomId: enum value[] expected";
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                        case 6:
                        case 7:
                        case 8:
                        case 9:
                        case 10:
                        case 11:
                        case 12:
                        case 13:
                        case 14:
                        case 15:
                        case 16:
                        case 17:
                        case 18:
                        case 19:
                        case 20:
                        case 21:
                        case 22:
                        case 23:
                        case 24:
                        case 25:
                        case 26:
                        case 27:
                        case 28:
                        case 29:
                        case 30:
                        case 31:
                        case 32:
                        case 33:
                        case 34:
                        case 35:
                        case 36:
                        case 37:
                        case 38:
                        case 39:
                        case 40:
                        case 41:
                        case 42:
                        case 43:
                        case 44:
                        case 45:
                        case 46:
                        case 47:
                        case 48:
                        case 49:
                        case 50:
                        case 51:
                        case 52:
                        case 53:
                        case 54:
                        case 55:
                        case 56:
                        case 57:
                        case 58:
                        case 59:
                        case 60:
                        case 61:
                        case 62:
                        case 63:
                        case 64:
                        case 65:
                        case 66:
                        case 67:
                        case 68:
                        case 69:
                        case 70:
                        case 71:
                        case 72:
                        case 73:
                        case 74:
                        case 75:
                        case 76:
                        case 77:
                        case 78:
                        case 79:
                        case 80:
                        case 81:
                        case 82:
                        case 83:
                        case 84:
                        case 85:
                        case 86:
                        case 87:
                        case 88:
                        case 89:
                        case 90:
                        case 91:
                        case 92:
                        case 93:
                        case 94:
                        case 95:
                        case 96:
                        case 97:
                        case 98:
                        case 99:
                        case 100:
                        case 101:
                        case 102:
                        case 103:
                        case 104:
                        case 105:
                        case 106:
                        case 107:
                        case 108:
                        case 109:
                        case 110:
                        case 111:
                        case 112:
                        case 113:
                        case 114:
                        case 115:
                        case 116:
                        case 117:
                        case 118:
                        case 119:
                        case 120:
                        case 121:
                        case 122:
                        case 123:
                        case 124:
                        case 125:
                        case 126:
                        case 127:
                        case 128:
                        case 129:
                        case 130:
                        case 131:
                        case 132:
                        case 133:
                        case 134:
                        case 135:
                        case 136:
                        case 137:
                        case 138:
                        case 139:
                        case 140:
                        case 141:
                        case 142:
                        case 143:
                        case 144:
                        case 145:
                        case 146:
                        case 147:
                        case 148:
                        case 149:
                        case 150:
                        case 151:
                        case 152:
                        case 153:
                        case 154:
                        case 155:
                        case 156:
                        case 157:
                        case 158:
                        case 159:
                        case 160:
                        case 161:
                        case 162:
                        case 163:
                        case 164:
                        case 165:
                        case 166:
                        case 167:
                        case 168:
                        case 169:
                        case 170:
                        case 171:
                        case 172:
                        case 173:
                        case 174:
                        case 175:
                        case 176:
                        case 177:
                        case 178:
                        case 179:
                        case 180:
                        case 181:
                        case 182:
                        case 183:
                        case 184:
                        case 185:
                        case 186:
                        case 187:
                        case 188:
                        case 189:
                        case 190:
                        case 191:
                        case 192:
                        case 193:
                        case 194:
                        case 195:
                        case 196:
                        case 197:
                        case 198:
                        case 199:
                        case 200:
                        case 201:
                        case 203:
                        case 204:
                        case 205:
                        case 206:
                        case 207:
                        case 208:
                        case 209:
                        case 210:
                        case 211:
                        case 212:
                        case 213:
                        case 214:
                        case 215:
                        case 216:
                        case 217:
                        case 218:
                        case 219:
                        case 220:
                        case 221:
                        case 222:
                        case 223:
                        case 224:
                        case 225:
                        case 226:
                        case 227:
                        case 228:
                        case 229:
                        case 230:
                        case 233:
                        case 234:
                        case 235:
                        case 236:
                        case 237:
                        case 238:
                        case 239:
                        case 240:
                        case 241:
                        case 242:
                        case 243:
                        case 244:
                        case 245:
                        case 246:
                        case 247:
                        case 248:
                        case 249:
                        case 250:
                        case 251:
                        case 252:
                        case 253:
                        case 254:
                        case 255:
                        case 256:
                        case 257:
                        case 258:
                        case 259:
                        case 260:
                        case 261:
                        case 262:
                        case 263:
                        case 264:
                        case 265:
                        case 266:
                        case 267:
                        case 268:
                        case 269:
                        case 270:
                        case 271:
                        case 272:
                        case 273:
                        case 274:
                        case 275:
                        case 276:
                        case 277:
                        case 278:
                        case 279:
                        case 280:
                        case 281:
                        case 282:
                        case 283:
                        case 284:
                        case 285:
                        case 286:
                        case 287:
                        case 288:
                        case 289:
                        case 290:
                        case 291:
                        case 292:
                        case 293:
                        case 294:
                        case 295:
                        case 296:
                        case 297:
                        case 298:
                        case 299:
                        case 300:
                        case 301:
                        case 302:
                        case 303:
                        case 304:
                        case 305:
                        case 306:
                        case 307:
                        case 308:
                        case 309:
                        case 310:
                        case 311:
                        case 312:
                        case 313:
                        case 314:
                        case 315:
                        case 316:
                        case 317:
                        case 318:
                        case 319:
                        case 320:
                        case 321:
                        case 322:
                        case 323:
                        case 324:
                        case 325:
                        case 326:
                        case 327:
                        case 328:
                        case 329:
                        case 330:
                        case 331:
                        case 332:
                        case 333:
                        case 334:
                        case 336:
                        case 337:
                        case 338:
                        case 339:
                        case 340:
                        case 341:
                        case 342:
                        case 343:
                        case 344:
                        case 345:
                        case 346:
                        case 347:
                        case 348:
                        case 349:
                        case 350:
                        case 351:
                        case 352:
                        case 353:
                        case 354:
                        case 355:
                        case 356:
                        case 357:
                        case 358:
                        case 359:
                        case 364:
                        case 365:
                        case 366:
                        case 367:
                        case 368:
                        case 369:
                        case 370:
                        case 371:
                        case 372:
                        case 373:
                        case 374:
                        case 375:
                        case 376:
                        case 377:
                        case 378:
                        case 379:
                        case 380:
                        case 381:
                        case 382:
                        case 383:
                        case 386:
                        case 387:
                        case 388:
                        case 390:
                        case 392:
                        case 393:
                        case 394:
                        case 395:
                        case 396:
                        case 397:
                        case 409:
                        case 411:
                        case 424:
                        case 419:
                        case 457:
                        case 458:
                        case 461:
                        case 430:
                        case 431:
                        case 432:
                        case 433:
                        case 434:
                        case 463:
                        case 464:
                        case 465:
                        case 10000:
                        case 10001:
                        case 10002:
                        case 10003:
                        case 10006:
                        case 10004:
                        case 10005:
                        case 10009:
                        case 10010:
                        case 10011:
                        case 10012:
                        case 10007:
                        case 10013:
                        case 10014:
                        case 10015:
                        case 10016:
                        case 10017:
                        case 10018:
                        case 10019:
                        case 10020:
                        case 10021:
                        case 10022:
                        case 10023:
                        case 10024:
                        case 10025:
                        case 10026:
                        case 10027:
                        case 10028:
                        case 10029:
                        case 10030:
                        case 10031:
                        case 10032:
                        case 10033:
                        case 10034:
                        case 10035:
                        case 10037:
                        case 10038:
                        case 10039:
                        case 10040:
                        case 10041:
                        case 10042:
                        case 10043:
                        case 10044:
                        case 10045:
                        case 10046:
                        case 10047:
                        case 10048:
                        case 10049:
                        case 10050:
                        case 10051:
                        case 10052:
                        case 10053:
                        case 10054:
                        case 10055:
                        case 10056:
                        case 10057:
                        case 10058:
                        case 10059:
                        case 10060:
                        case 10061:
                        case 10062:
                        case 10063:
                        case 10064:
                        case 10065:
                        case 10066:
                        case 10067:
                        case 10068:
                        case 10069:
                        case 10070:
                        case 10071:
                        case 10072:
                        case 10073:
                        case 10074:
                        case 10075:
                        case 10076:
                        case 10077:
                        case 10078:
                        case 10079:
                        case 10080:
                        case 10081:
                        case 10082:
                        case 10083:
                        case 10084:
                        case 10085:
                        case 10086:
                        case 10087:
                        case 10088:
                        case 10089:
                        case 10090:
                        case 10091:
                        case 10092:
                        case 10093:
                        case 10094:
                        case 10095:
                        case 10096:
                        case 10097:
                        case 10098:
                        case 10099:
                        case 10100:
                        case 10101:
                        case 10102:
                        case 10103:
                        case 10104:
                        case 10105:
                        case 10106:
                        case 10107:
                        case 10108:
                        case 10109:
                        case 10110:
                        case 10111:
                        case 10112:
                        case 10113:
                        case 10114:
                        case 10115:
                        case 10116:
                        case 10117:
                        case 10118:
                        case 10119:
                        case 10120:
                        case 10121:
                        case 10122:
                        case 10123:
                        case 10124:
                        case 10125:
                        case 10127:
                        case 10128:
                        case 10131:
                        case 10132:
                        case 10133:
                        case 10134:
                        case 10135:
                        case 10136:
                        case 10137:
                        case 10138:
                        case 10139:
                        case 10140:
                        case 10141:
                        case 10142:
                        case 10143:
                        case 10144:
                        case 10145:
                        case 10155:
                            break;
                        }
                    }
                }
                if (m.rawPullAtomId != null && m.hasOwnProperty("rawPullAtomId")) {
                    if (!Array.isArray(m.rawPullAtomId))
                        return "rawPullAtomId: array expected";
                    for (var i = 0; i < m.rawPullAtomId.length; ++i) {
                        if (!$util.isInteger(m.rawPullAtomId[i]))
                            return "rawPullAtomId: integer[] expected";
                    }
                }
                if (m.pullFrequencyMs != null && m.hasOwnProperty("pullFrequencyMs")) {
                    if (!$util.isInteger(m.pullFrequencyMs))
                        return "pullFrequencyMs: integer expected";
                }
                if (m.packages != null && m.hasOwnProperty("packages")) {
                    if (!Array.isArray(m.packages))
                        return "packages: array expected";
                    for (var i = 0; i < m.packages.length; ++i) {
                        if (!$util.isString(m.packages[i]))
                            return "packages: string[] expected";
                    }
                }
                return null;
            };

            /**
             * Creates a StatsdPullAtomConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.StatsdPullAtomConfig
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.StatsdPullAtomConfig} StatsdPullAtomConfig
             */
            StatsdPullAtomConfig.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.StatsdPullAtomConfig)
                    return d;
                var m = new $root.perfetto.protos.StatsdPullAtomConfig();
                if (d.pullAtomId) {
                    if (!Array.isArray(d.pullAtomId))
                        throw TypeError(".perfetto.protos.StatsdPullAtomConfig.pullAtomId: array expected");
                    m.pullAtomId = [];
                    for (var i = 0; i < d.pullAtomId.length; ++i) {
                        switch (d.pullAtomId[i]) {
                        default:
                        case "BLE_SCAN_STATE_CHANGED":
                        case 2:
                            m.pullAtomId[i] = 2;
                            break;
                        case "PROCESS_STATE_CHANGED":
                        case 3:
                            m.pullAtomId[i] = 3;
                            break;
                        case "BLE_SCAN_RESULT_RECEIVED":
                        case 4:
                            m.pullAtomId[i] = 4;
                            break;
                        case "SENSOR_STATE_CHANGED":
                        case 5:
                            m.pullAtomId[i] = 5;
                            break;
                        case "GPS_SCAN_STATE_CHANGED":
                        case 6:
                            m.pullAtomId[i] = 6;
                            break;
                        case "SYNC_STATE_CHANGED":
                        case 7:
                            m.pullAtomId[i] = 7;
                            break;
                        case "SCHEDULED_JOB_STATE_CHANGED":
                        case 8:
                            m.pullAtomId[i] = 8;
                            break;
                        case "SCREEN_BRIGHTNESS_CHANGED":
                        case 9:
                            m.pullAtomId[i] = 9;
                            break;
                        case "WAKELOCK_STATE_CHANGED":
                        case 10:
                            m.pullAtomId[i] = 10;
                            break;
                        case "LONG_PARTIAL_WAKELOCK_STATE_CHANGED":
                        case 11:
                            m.pullAtomId[i] = 11;
                            break;
                        case "MOBILE_RADIO_POWER_STATE_CHANGED":
                        case 12:
                            m.pullAtomId[i] = 12;
                            break;
                        case "WIFI_RADIO_POWER_STATE_CHANGED":
                        case 13:
                            m.pullAtomId[i] = 13;
                            break;
                        case "ACTIVITY_MANAGER_SLEEP_STATE_CHANGED":
                        case 14:
                            m.pullAtomId[i] = 14;
                            break;
                        case "MEMORY_FACTOR_STATE_CHANGED":
                        case 15:
                            m.pullAtomId[i] = 15;
                            break;
                        case "EXCESSIVE_CPU_USAGE_REPORTED":
                        case 16:
                            m.pullAtomId[i] = 16;
                            break;
                        case "CACHED_KILL_REPORTED":
                        case 17:
                            m.pullAtomId[i] = 17;
                            break;
                        case "PROCESS_MEMORY_STAT_REPORTED":
                        case 18:
                            m.pullAtomId[i] = 18;
                            break;
                        case "LAUNCHER_EVENT":
                        case 19:
                            m.pullAtomId[i] = 19;
                            break;
                        case "BATTERY_SAVER_MODE_STATE_CHANGED":
                        case 20:
                            m.pullAtomId[i] = 20;
                            break;
                        case "DEVICE_IDLE_MODE_STATE_CHANGED":
                        case 21:
                            m.pullAtomId[i] = 21;
                            break;
                        case "DEVICE_IDLING_MODE_STATE_CHANGED":
                        case 22:
                            m.pullAtomId[i] = 22;
                            break;
                        case "AUDIO_STATE_CHANGED":
                        case 23:
                            m.pullAtomId[i] = 23;
                            break;
                        case "MEDIA_CODEC_STATE_CHANGED":
                        case 24:
                            m.pullAtomId[i] = 24;
                            break;
                        case "CAMERA_STATE_CHANGED":
                        case 25:
                            m.pullAtomId[i] = 25;
                            break;
                        case "FLASHLIGHT_STATE_CHANGED":
                        case 26:
                            m.pullAtomId[i] = 26;
                            break;
                        case "UID_PROCESS_STATE_CHANGED":
                        case 27:
                            m.pullAtomId[i] = 27;
                            break;
                        case "PROCESS_LIFE_CYCLE_STATE_CHANGED":
                        case 28:
                            m.pullAtomId[i] = 28;
                            break;
                        case "SCREEN_STATE_CHANGED":
                        case 29:
                            m.pullAtomId[i] = 29;
                            break;
                        case "BATTERY_LEVEL_CHANGED":
                        case 30:
                            m.pullAtomId[i] = 30;
                            break;
                        case "CHARGING_STATE_CHANGED":
                        case 31:
                            m.pullAtomId[i] = 31;
                            break;
                        case "PLUGGED_STATE_CHANGED":
                        case 32:
                            m.pullAtomId[i] = 32;
                            break;
                        case "INTERACTIVE_STATE_CHANGED":
                        case 33:
                            m.pullAtomId[i] = 33;
                            break;
                        case "TOUCH_EVENT_REPORTED":
                        case 34:
                            m.pullAtomId[i] = 34;
                            break;
                        case "WAKEUP_ALARM_OCCURRED":
                        case 35:
                            m.pullAtomId[i] = 35;
                            break;
                        case "KERNEL_WAKEUP_REPORTED":
                        case 36:
                            m.pullAtomId[i] = 36;
                            break;
                        case "WIFI_LOCK_STATE_CHANGED":
                        case 37:
                            m.pullAtomId[i] = 37;
                            break;
                        case "WIFI_SIGNAL_STRENGTH_CHANGED":
                        case 38:
                            m.pullAtomId[i] = 38;
                            break;
                        case "WIFI_SCAN_STATE_CHANGED":
                        case 39:
                            m.pullAtomId[i] = 39;
                            break;
                        case "PHONE_SIGNAL_STRENGTH_CHANGED":
                        case 40:
                            m.pullAtomId[i] = 40;
                            break;
                        case "SETTING_CHANGED":
                        case 41:
                            m.pullAtomId[i] = 41;
                            break;
                        case "ACTIVITY_FOREGROUND_STATE_CHANGED":
                        case 42:
                            m.pullAtomId[i] = 42;
                            break;
                        case "ISOLATED_UID_CHANGED":
                        case 43:
                            m.pullAtomId[i] = 43;
                            break;
                        case "PACKET_WAKEUP_OCCURRED":
                        case 44:
                            m.pullAtomId[i] = 44;
                            break;
                        case "WALL_CLOCK_TIME_SHIFTED":
                        case 45:
                            m.pullAtomId[i] = 45;
                            break;
                        case "ANOMALY_DETECTED":
                        case 46:
                            m.pullAtomId[i] = 46;
                            break;
                        case "APP_BREADCRUMB_REPORTED":
                        case 47:
                            m.pullAtomId[i] = 47;
                            break;
                        case "APP_START_OCCURRED":
                        case 48:
                            m.pullAtomId[i] = 48;
                            break;
                        case "APP_START_CANCELED":
                        case 49:
                            m.pullAtomId[i] = 49;
                            break;
                        case "APP_START_FULLY_DRAWN":
                        case 50:
                            m.pullAtomId[i] = 50;
                            break;
                        case "LMK_KILL_OCCURRED":
                        case 51:
                            m.pullAtomId[i] = 51;
                            break;
                        case "PICTURE_IN_PICTURE_STATE_CHANGED":
                        case 52:
                            m.pullAtomId[i] = 52;
                            break;
                        case "WIFI_MULTICAST_LOCK_STATE_CHANGED":
                        case 53:
                            m.pullAtomId[i] = 53;
                            break;
                        case "LMK_STATE_CHANGED":
                        case 54:
                            m.pullAtomId[i] = 54;
                            break;
                        case "APP_START_MEMORY_STATE_CAPTURED":
                        case 55:
                            m.pullAtomId[i] = 55;
                            break;
                        case "SHUTDOWN_SEQUENCE_REPORTED":
                        case 56:
                            m.pullAtomId[i] = 56;
                            break;
                        case "BOOT_SEQUENCE_REPORTED":
                        case 57:
                            m.pullAtomId[i] = 57;
                            break;
                        case "DAVEY_OCCURRED":
                        case 58:
                            m.pullAtomId[i] = 58;
                            break;
                        case "OVERLAY_STATE_CHANGED":
                        case 59:
                            m.pullAtomId[i] = 59;
                            break;
                        case "FOREGROUND_SERVICE_STATE_CHANGED":
                        case 60:
                            m.pullAtomId[i] = 60;
                            break;
                        case "CALL_STATE_CHANGED":
                        case 61:
                            m.pullAtomId[i] = 61;
                            break;
                        case "KEYGUARD_STATE_CHANGED":
                        case 62:
                            m.pullAtomId[i] = 62;
                            break;
                        case "KEYGUARD_BOUNCER_STATE_CHANGED":
                        case 63:
                            m.pullAtomId[i] = 63;
                            break;
                        case "KEYGUARD_BOUNCER_PASSWORD_ENTERED":
                        case 64:
                            m.pullAtomId[i] = 64;
                            break;
                        case "APP_DIED":
                        case 65:
                            m.pullAtomId[i] = 65;
                            break;
                        case "RESOURCE_CONFIGURATION_CHANGED":
                        case 66:
                            m.pullAtomId[i] = 66;
                            break;
                        case "BLUETOOTH_ENABLED_STATE_CHANGED":
                        case 67:
                            m.pullAtomId[i] = 67;
                            break;
                        case "BLUETOOTH_CONNECTION_STATE_CHANGED":
                        case 68:
                            m.pullAtomId[i] = 68;
                            break;
                        case "GPS_SIGNAL_QUALITY_CHANGED":
                        case 69:
                            m.pullAtomId[i] = 69;
                            break;
                        case "USB_CONNECTOR_STATE_CHANGED":
                        case 70:
                            m.pullAtomId[i] = 70;
                            break;
                        case "SPEAKER_IMPEDANCE_REPORTED":
                        case 71:
                            m.pullAtomId[i] = 71;
                            break;
                        case "HARDWARE_FAILED":
                        case 72:
                            m.pullAtomId[i] = 72;
                            break;
                        case "PHYSICAL_DROP_DETECTED":
                        case 73:
                            m.pullAtomId[i] = 73;
                            break;
                        case "CHARGE_CYCLES_REPORTED":
                        case 74:
                            m.pullAtomId[i] = 74;
                            break;
                        case "MOBILE_CONNECTION_STATE_CHANGED":
                        case 75:
                            m.pullAtomId[i] = 75;
                            break;
                        case "MOBILE_RADIO_TECHNOLOGY_CHANGED":
                        case 76:
                            m.pullAtomId[i] = 76;
                            break;
                        case "USB_DEVICE_ATTACHED":
                        case 77:
                            m.pullAtomId[i] = 77;
                            break;
                        case "APP_CRASH_OCCURRED":
                        case 78:
                            m.pullAtomId[i] = 78;
                            break;
                        case "ANR_OCCURRED":
                        case 79:
                            m.pullAtomId[i] = 79;
                            break;
                        case "WTF_OCCURRED":
                        case 80:
                            m.pullAtomId[i] = 80;
                            break;
                        case "LOW_MEM_REPORTED":
                        case 81:
                            m.pullAtomId[i] = 81;
                            break;
                        case "GENERIC_ATOM":
                        case 82:
                            m.pullAtomId[i] = 82;
                            break;
                        case "KEY_VALUE_PAIRS_ATOM":
                        case 83:
                            m.pullAtomId[i] = 83;
                            break;
                        case "VIBRATOR_STATE_CHANGED":
                        case 84:
                            m.pullAtomId[i] = 84;
                            break;
                        case "DEFERRED_JOB_STATS_REPORTED":
                        case 85:
                            m.pullAtomId[i] = 85;
                            break;
                        case "THERMAL_THROTTLING":
                        case 86:
                            m.pullAtomId[i] = 86;
                            break;
                        case "BIOMETRIC_ACQUIRED":
                        case 87:
                            m.pullAtomId[i] = 87;
                            break;
                        case "BIOMETRIC_AUTHENTICATED":
                        case 88:
                            m.pullAtomId[i] = 88;
                            break;
                        case "BIOMETRIC_ERROR_OCCURRED":
                        case 89:
                            m.pullAtomId[i] = 89;
                            break;
                        case "UI_EVENT_REPORTED":
                        case 90:
                            m.pullAtomId[i] = 90;
                            break;
                        case "BATTERY_HEALTH_SNAPSHOT":
                        case 91:
                            m.pullAtomId[i] = 91;
                            break;
                        case "SLOW_IO":
                        case 92:
                            m.pullAtomId[i] = 92;
                            break;
                        case "BATTERY_CAUSED_SHUTDOWN":
                        case 93:
                            m.pullAtomId[i] = 93;
                            break;
                        case "PHONE_SERVICE_STATE_CHANGED":
                        case 94:
                            m.pullAtomId[i] = 94;
                            break;
                        case "PHONE_STATE_CHANGED":
                        case 95:
                            m.pullAtomId[i] = 95;
                            break;
                        case "USER_RESTRICTION_CHANGED":
                        case 96:
                            m.pullAtomId[i] = 96;
                            break;
                        case "SETTINGS_UI_CHANGED":
                        case 97:
                            m.pullAtomId[i] = 97;
                            break;
                        case "CONNECTIVITY_STATE_CHANGED":
                        case 98:
                            m.pullAtomId[i] = 98;
                            break;
                        case "SERVICE_STATE_CHANGED":
                        case 99:
                            m.pullAtomId[i] = 99;
                            break;
                        case "SERVICE_LAUNCH_REPORTED":
                        case 100:
                            m.pullAtomId[i] = 100;
                            break;
                        case "FLAG_FLIP_UPDATE_OCCURRED":
                        case 101:
                            m.pullAtomId[i] = 101;
                            break;
                        case "BINARY_PUSH_STATE_CHANGED":
                        case 102:
                            m.pullAtomId[i] = 102;
                            break;
                        case "DEVICE_POLICY_EVENT":
                        case 103:
                            m.pullAtomId[i] = 103;
                            break;
                        case "DOCS_UI_FILE_OP_CANCELED":
                        case 104:
                            m.pullAtomId[i] = 104;
                            break;
                        case "DOCS_UI_FILE_OP_COPY_MOVE_MODE_REPORTED":
                        case 105:
                            m.pullAtomId[i] = 105;
                            break;
                        case "DOCS_UI_FILE_OP_FAILURE":
                        case 106:
                            m.pullAtomId[i] = 106;
                            break;
                        case "DOCS_UI_PROVIDER_FILE_OP":
                        case 107:
                            m.pullAtomId[i] = 107;
                            break;
                        case "DOCS_UI_INVALID_SCOPED_ACCESS_REQUEST":
                        case 108:
                            m.pullAtomId[i] = 108;
                            break;
                        case "DOCS_UI_LAUNCH_REPORTED":
                        case 109:
                            m.pullAtomId[i] = 109;
                            break;
                        case "DOCS_UI_ROOT_VISITED":
                        case 110:
                            m.pullAtomId[i] = 110;
                            break;
                        case "DOCS_UI_STARTUP_MS":
                        case 111:
                            m.pullAtomId[i] = 111;
                            break;
                        case "DOCS_UI_USER_ACTION_REPORTED":
                        case 112:
                            m.pullAtomId[i] = 112;
                            break;
                        case "WIFI_ENABLED_STATE_CHANGED":
                        case 113:
                            m.pullAtomId[i] = 113;
                            break;
                        case "WIFI_RUNNING_STATE_CHANGED":
                        case 114:
                            m.pullAtomId[i] = 114;
                            break;
                        case "APP_COMPACTED":
                        case 115:
                            m.pullAtomId[i] = 115;
                            break;
                        case "NETWORK_DNS_EVENT_REPORTED":
                        case 116:
                            m.pullAtomId[i] = 116;
                            break;
                        case "DOCS_UI_PICKER_LAUNCHED_FROM_REPORTED":
                        case 117:
                            m.pullAtomId[i] = 117;
                            break;
                        case "DOCS_UI_PICK_RESULT_REPORTED":
                        case 118:
                            m.pullAtomId[i] = 118;
                            break;
                        case "DOCS_UI_SEARCH_MODE_REPORTED":
                        case 119:
                            m.pullAtomId[i] = 119;
                            break;
                        case "DOCS_UI_SEARCH_TYPE_REPORTED":
                        case 120:
                            m.pullAtomId[i] = 120;
                            break;
                        case "DATA_STALL_EVENT":
                        case 121:
                            m.pullAtomId[i] = 121;
                            break;
                        case "RESCUE_PARTY_RESET_REPORTED":
                        case 122:
                            m.pullAtomId[i] = 122;
                            break;
                        case "SIGNED_CONFIG_REPORTED":
                        case 123:
                            m.pullAtomId[i] = 123;
                            break;
                        case "GNSS_NI_EVENT_REPORTED":
                        case 124:
                            m.pullAtomId[i] = 124;
                            break;
                        case "BLUETOOTH_LINK_LAYER_CONNECTION_EVENT":
                        case 125:
                            m.pullAtomId[i] = 125;
                            break;
                        case "BLUETOOTH_ACL_CONNECTION_STATE_CHANGED":
                        case 126:
                            m.pullAtomId[i] = 126;
                            break;
                        case "BLUETOOTH_SCO_CONNECTION_STATE_CHANGED":
                        case 127:
                            m.pullAtomId[i] = 127;
                            break;
                        case "APP_DOWNGRADED":
                        case 128:
                            m.pullAtomId[i] = 128;
                            break;
                        case "APP_OPTIMIZED_AFTER_DOWNGRADED":
                        case 129:
                            m.pullAtomId[i] = 129;
                            break;
                        case "LOW_STORAGE_STATE_CHANGED":
                        case 130:
                            m.pullAtomId[i] = 130;
                            break;
                        case "GNSS_NFW_NOTIFICATION_REPORTED":
                        case 131:
                            m.pullAtomId[i] = 131;
                            break;
                        case "GNSS_CONFIGURATION_REPORTED":
                        case 132:
                            m.pullAtomId[i] = 132;
                            break;
                        case "USB_PORT_OVERHEAT_EVENT_REPORTED":
                        case 133:
                            m.pullAtomId[i] = 133;
                            break;
                        case "NFC_ERROR_OCCURRED":
                        case 134:
                            m.pullAtomId[i] = 134;
                            break;
                        case "NFC_STATE_CHANGED":
                        case 135:
                            m.pullAtomId[i] = 135;
                            break;
                        case "NFC_BEAM_OCCURRED":
                        case 136:
                            m.pullAtomId[i] = 136;
                            break;
                        case "NFC_CARDEMULATION_OCCURRED":
                        case 137:
                            m.pullAtomId[i] = 137;
                            break;
                        case "NFC_TAG_OCCURRED":
                        case 138:
                            m.pullAtomId[i] = 138;
                            break;
                        case "NFC_HCE_TRANSACTION_OCCURRED":
                        case 139:
                            m.pullAtomId[i] = 139;
                            break;
                        case "SE_STATE_CHANGED":
                        case 140:
                            m.pullAtomId[i] = 140;
                            break;
                        case "SE_OMAPI_REPORTED":
                        case 141:
                            m.pullAtomId[i] = 141;
                            break;
                        case "BROADCAST_DISPATCH_LATENCY_REPORTED":
                        case 142:
                            m.pullAtomId[i] = 142;
                            break;
                        case "ATTENTION_MANAGER_SERVICE_RESULT_REPORTED":
                        case 143:
                            m.pullAtomId[i] = 143;
                            break;
                        case "ADB_CONNECTION_CHANGED":
                        case 144:
                            m.pullAtomId[i] = 144;
                            break;
                        case "SPEECH_DSP_STAT_REPORTED":
                        case 145:
                            m.pullAtomId[i] = 145;
                            break;
                        case "USB_CONTAMINANT_REPORTED":
                        case 146:
                            m.pullAtomId[i] = 146;
                            break;
                        case "WATCHDOG_ROLLBACK_OCCURRED":
                        case 147:
                            m.pullAtomId[i] = 147;
                            break;
                        case "BIOMETRIC_SYSTEM_HEALTH_ISSUE_DETECTED":
                        case 148:
                            m.pullAtomId[i] = 148;
                            break;
                        case "BUBBLE_UI_CHANGED":
                        case 149:
                            m.pullAtomId[i] = 149;
                            break;
                        case "SCHEDULED_JOB_CONSTRAINT_CHANGED":
                        case 150:
                            m.pullAtomId[i] = 150;
                            break;
                        case "BLUETOOTH_ACTIVE_DEVICE_CHANGED":
                        case 151:
                            m.pullAtomId[i] = 151;
                            break;
                        case "BLUETOOTH_A2DP_PLAYBACK_STATE_CHANGED":
                        case 152:
                            m.pullAtomId[i] = 152;
                            break;
                        case "BLUETOOTH_A2DP_CODEC_CONFIG_CHANGED":
                        case 153:
                            m.pullAtomId[i] = 153;
                            break;
                        case "BLUETOOTH_A2DP_CODEC_CAPABILITY_CHANGED":
                        case 154:
                            m.pullAtomId[i] = 154;
                            break;
                        case "BLUETOOTH_A2DP_AUDIO_UNDERRUN_REPORTED":
                        case 155:
                            m.pullAtomId[i] = 155;
                            break;
                        case "BLUETOOTH_A2DP_AUDIO_OVERRUN_REPORTED":
                        case 156:
                            m.pullAtomId[i] = 156;
                            break;
                        case "BLUETOOTH_DEVICE_RSSI_REPORTED":
                        case 157:
                            m.pullAtomId[i] = 157;
                            break;
                        case "BLUETOOTH_DEVICE_FAILED_CONTACT_COUNTER_REPORTED":
                        case 158:
                            m.pullAtomId[i] = 158;
                            break;
                        case "BLUETOOTH_DEVICE_TX_POWER_LEVEL_REPORTED":
                        case 159:
                            m.pullAtomId[i] = 159;
                            break;
                        case "BLUETOOTH_HCI_TIMEOUT_REPORTED":
                        case 160:
                            m.pullAtomId[i] = 160;
                            break;
                        case "BLUETOOTH_QUALITY_REPORT_REPORTED":
                        case 161:
                            m.pullAtomId[i] = 161;
                            break;
                        case "BLUETOOTH_DEVICE_INFO_REPORTED":
                        case 162:
                            m.pullAtomId[i] = 162;
                            break;
                        case "BLUETOOTH_REMOTE_VERSION_INFO_REPORTED":
                        case 163:
                            m.pullAtomId[i] = 163;
                            break;
                        case "BLUETOOTH_SDP_ATTRIBUTE_REPORTED":
                        case 164:
                            m.pullAtomId[i] = 164;
                            break;
                        case "BLUETOOTH_BOND_STATE_CHANGED":
                        case 165:
                            m.pullAtomId[i] = 165;
                            break;
                        case "BLUETOOTH_CLASSIC_PAIRING_EVENT_REPORTED":
                        case 166:
                            m.pullAtomId[i] = 166;
                            break;
                        case "BLUETOOTH_SMP_PAIRING_EVENT_REPORTED":
                        case 167:
                            m.pullAtomId[i] = 167;
                            break;
                        case "SCREEN_TIMEOUT_EXTENSION_REPORTED":
                        case 168:
                            m.pullAtomId[i] = 168;
                            break;
                        case "PROCESS_START_TIME":
                        case 169:
                            m.pullAtomId[i] = 169;
                            break;
                        case "PERMISSION_GRANT_REQUEST_RESULT_REPORTED":
                        case 170:
                            m.pullAtomId[i] = 170;
                            break;
                        case "BLUETOOTH_SOCKET_CONNECTION_STATE_CHANGED":
                        case 171:
                            m.pullAtomId[i] = 171;
                            break;
                        case "DEVICE_IDENTIFIER_ACCESS_DENIED":
                        case 172:
                            m.pullAtomId[i] = 172;
                            break;
                        case "BUBBLE_DEVELOPER_ERROR_REPORTED":
                        case 173:
                            m.pullAtomId[i] = 173;
                            break;
                        case "ASSIST_GESTURE_STAGE_REPORTED":
                        case 174:
                            m.pullAtomId[i] = 174;
                            break;
                        case "ASSIST_GESTURE_FEEDBACK_REPORTED":
                        case 175:
                            m.pullAtomId[i] = 175;
                            break;
                        case "ASSIST_GESTURE_PROGRESS_REPORTED":
                        case 176:
                            m.pullAtomId[i] = 176;
                            break;
                        case "TOUCH_GESTURE_CLASSIFIED":
                        case 177:
                            m.pullAtomId[i] = 177;
                            break;
                        case "HIDDEN_API_USED":
                        case 178:
                            m.pullAtomId[i] = 178;
                            break;
                        case "STYLE_UI_CHANGED":
                        case 179:
                            m.pullAtomId[i] = 179;
                            break;
                        case "PRIVACY_INDICATORS_INTERACTED":
                        case 180:
                            m.pullAtomId[i] = 180;
                            break;
                        case "APP_INSTALL_ON_EXTERNAL_STORAGE_REPORTED":
                        case 181:
                            m.pullAtomId[i] = 181;
                            break;
                        case "NETWORK_STACK_REPORTED":
                        case 182:
                            m.pullAtomId[i] = 182;
                            break;
                        case "APP_MOVED_STORAGE_REPORTED":
                        case 183:
                            m.pullAtomId[i] = 183;
                            break;
                        case "BIOMETRIC_ENROLLED":
                        case 184:
                            m.pullAtomId[i] = 184;
                            break;
                        case "SYSTEM_SERVER_WATCHDOG_OCCURRED":
                        case 185:
                            m.pullAtomId[i] = 185;
                            break;
                        case "TOMB_STONE_OCCURRED":
                        case 186:
                            m.pullAtomId[i] = 186;
                            break;
                        case "BLUETOOTH_CLASS_OF_DEVICE_REPORTED":
                        case 187:
                            m.pullAtomId[i] = 187;
                            break;
                        case "INTELLIGENCE_EVENT_REPORTED":
                        case 188:
                            m.pullAtomId[i] = 188;
                            break;
                        case "THERMAL_THROTTLING_SEVERITY_STATE_CHANGED":
                        case 189:
                            m.pullAtomId[i] = 189;
                            break;
                        case "ROLE_REQUEST_RESULT_REPORTED":
                        case 190:
                            m.pullAtomId[i] = 190;
                            break;
                        case "MEDIAMETRICS_AUDIOPOLICY_REPORTED":
                        case 191:
                            m.pullAtomId[i] = 191;
                            break;
                        case "MEDIAMETRICS_AUDIORECORD_REPORTED":
                        case 192:
                            m.pullAtomId[i] = 192;
                            break;
                        case "MEDIAMETRICS_AUDIOTHREAD_REPORTED":
                        case 193:
                            m.pullAtomId[i] = 193;
                            break;
                        case "MEDIAMETRICS_AUDIOTRACK_REPORTED":
                        case 194:
                            m.pullAtomId[i] = 194;
                            break;
                        case "MEDIAMETRICS_CODEC_REPORTED":
                        case 195:
                            m.pullAtomId[i] = 195;
                            break;
                        case "MEDIAMETRICS_DRM_WIDEVINE_REPORTED":
                        case 196:
                            m.pullAtomId[i] = 196;
                            break;
                        case "MEDIAMETRICS_EXTRACTOR_REPORTED":
                        case 197:
                            m.pullAtomId[i] = 197;
                            break;
                        case "MEDIAMETRICS_MEDIADRM_REPORTED":
                        case 198:
                            m.pullAtomId[i] = 198;
                            break;
                        case "MEDIAMETRICS_NUPLAYER_REPORTED":
                        case 199:
                            m.pullAtomId[i] = 199;
                            break;
                        case "MEDIAMETRICS_RECORDER_REPORTED":
                        case 200:
                            m.pullAtomId[i] = 200;
                            break;
                        case "MEDIAMETRICS_DRMMANAGER_REPORTED":
                        case 201:
                            m.pullAtomId[i] = 201;
                            break;
                        case "CAR_POWER_STATE_CHANGED":
                        case 203:
                            m.pullAtomId[i] = 203;
                            break;
                        case "GARAGE_MODE_INFO":
                        case 204:
                            m.pullAtomId[i] = 204;
                            break;
                        case "TEST_ATOM_REPORTED":
                        case 205:
                            m.pullAtomId[i] = 205;
                            break;
                        case "CONTENT_CAPTURE_CALLER_MISMATCH_REPORTED":
                        case 206:
                            m.pullAtomId[i] = 206;
                            break;
                        case "CONTENT_CAPTURE_SERVICE_EVENTS":
                        case 207:
                            m.pullAtomId[i] = 207;
                            break;
                        case "CONTENT_CAPTURE_SESSION_EVENTS":
                        case 208:
                            m.pullAtomId[i] = 208;
                            break;
                        case "CONTENT_CAPTURE_FLUSHED":
                        case 209:
                            m.pullAtomId[i] = 209;
                            break;
                        case "LOCATION_MANAGER_API_USAGE_REPORTED":
                        case 210:
                            m.pullAtomId[i] = 210;
                            break;
                        case "REVIEW_PERMISSIONS_FRAGMENT_RESULT_REPORTED":
                        case 211:
                            m.pullAtomId[i] = 211;
                            break;
                        case "RUNTIME_PERMISSIONS_UPGRADE_RESULT":
                        case 212:
                            m.pullAtomId[i] = 212;
                            break;
                        case "GRANT_PERMISSIONS_ACTIVITY_BUTTON_ACTIONS":
                        case 213:
                            m.pullAtomId[i] = 213;
                            break;
                        case "LOCATION_ACCESS_CHECK_NOTIFICATION_ACTION":
                        case 214:
                            m.pullAtomId[i] = 214;
                            break;
                        case "APP_PERMISSION_FRAGMENT_ACTION_REPORTED":
                        case 215:
                            m.pullAtomId[i] = 215;
                            break;
                        case "APP_PERMISSION_FRAGMENT_VIEWED":
                        case 216:
                            m.pullAtomId[i] = 216;
                            break;
                        case "APP_PERMISSIONS_FRAGMENT_VIEWED":
                        case 217:
                            m.pullAtomId[i] = 217;
                            break;
                        case "PERMISSION_APPS_FRAGMENT_VIEWED":
                        case 218:
                            m.pullAtomId[i] = 218;
                            break;
                        case "TEXT_SELECTION_EVENT":
                        case 219:
                            m.pullAtomId[i] = 219;
                            break;
                        case "TEXT_LINKIFY_EVENT":
                        case 220:
                            m.pullAtomId[i] = 220;
                            break;
                        case "CONVERSATION_ACTIONS_EVENT":
                        case 221:
                            m.pullAtomId[i] = 221;
                            break;
                        case "LANGUAGE_DETECTION_EVENT":
                        case 222:
                            m.pullAtomId[i] = 222;
                            break;
                        case "EXCLUSION_RECT_STATE_CHANGED":
                        case 223:
                            m.pullAtomId[i] = 223;
                            break;
                        case "BACK_GESTURE_REPORTED_REPORTED":
                        case 224:
                            m.pullAtomId[i] = 224;
                            break;
                        case "UPDATE_ENGINE_UPDATE_ATTEMPT_REPORTED":
                        case 225:
                            m.pullAtomId[i] = 225;
                            break;
                        case "UPDATE_ENGINE_SUCCESSFUL_UPDATE_REPORTED":
                        case 226:
                            m.pullAtomId[i] = 226;
                            break;
                        case "CAMERA_ACTION_EVENT":
                        case 227:
                            m.pullAtomId[i] = 227;
                            break;
                        case "APP_COMPATIBILITY_CHANGE_REPORTED":
                        case 228:
                            m.pullAtomId[i] = 228;
                            break;
                        case "PERFETTO_UPLOADED":
                        case 229:
                            m.pullAtomId[i] = 229;
                            break;
                        case "VMS_CLIENT_CONNECTION_STATE_CHANGED":
                        case 230:
                            m.pullAtomId[i] = 230;
                            break;
                        case "MEDIA_PROVIDER_SCAN_OCCURRED":
                        case 233:
                            m.pullAtomId[i] = 233;
                            break;
                        case "MEDIA_CONTENT_DELETED":
                        case 234:
                            m.pullAtomId[i] = 234;
                            break;
                        case "MEDIA_PROVIDER_PERMISSION_REQUESTED":
                        case 235:
                            m.pullAtomId[i] = 235;
                            break;
                        case "MEDIA_PROVIDER_SCHEMA_CHANGED":
                        case 236:
                            m.pullAtomId[i] = 236;
                            break;
                        case "MEDIA_PROVIDER_IDLE_MAINTENANCE_FINISHED":
                        case 237:
                            m.pullAtomId[i] = 237;
                            break;
                        case "REBOOT_ESCROW_RECOVERY_REPORTED":
                        case 238:
                            m.pullAtomId[i] = 238;
                            break;
                        case "BOOT_TIME_EVENT_DURATION_REPORTED":
                        case 239:
                            m.pullAtomId[i] = 239;
                            break;
                        case "BOOT_TIME_EVENT_ELAPSED_TIME_REPORTED":
                        case 240:
                            m.pullAtomId[i] = 240;
                            break;
                        case "BOOT_TIME_EVENT_UTC_TIME_REPORTED":
                        case 241:
                            m.pullAtomId[i] = 241;
                            break;
                        case "BOOT_TIME_EVENT_ERROR_CODE_REPORTED":
                        case 242:
                            m.pullAtomId[i] = 242;
                            break;
                        case "USERSPACE_REBOOT_REPORTED":
                        case 243:
                            m.pullAtomId[i] = 243;
                            break;
                        case "NOTIFICATION_REPORTED":
                        case 244:
                            m.pullAtomId[i] = 244;
                            break;
                        case "NOTIFICATION_PANEL_REPORTED":
                        case 245:
                            m.pullAtomId[i] = 245;
                            break;
                        case "NOTIFICATION_CHANNEL_MODIFIED":
                        case 246:
                            m.pullAtomId[i] = 246;
                            break;
                        case "INTEGRITY_CHECK_RESULT_REPORTED":
                        case 247:
                            m.pullAtomId[i] = 247;
                            break;
                        case "INTEGRITY_RULES_PUSHED":
                        case 248:
                            m.pullAtomId[i] = 248;
                            break;
                        case "CB_MESSAGE_REPORTED":
                        case 249:
                            m.pullAtomId[i] = 249;
                            break;
                        case "CB_MESSAGE_ERROR":
                        case 250:
                            m.pullAtomId[i] = 250;
                            break;
                        case "WIFI_HEALTH_STAT_REPORTED":
                        case 251:
                            m.pullAtomId[i] = 251;
                            break;
                        case "WIFI_FAILURE_STAT_REPORTED":
                        case 252:
                            m.pullAtomId[i] = 252;
                            break;
                        case "WIFI_CONNECTION_RESULT_REPORTED":
                        case 253:
                            m.pullAtomId[i] = 253;
                            break;
                        case "APP_FREEZE_CHANGED":
                        case 254:
                            m.pullAtomId[i] = 254;
                            break;
                        case "SNAPSHOT_MERGE_REPORTED":
                        case 255:
                            m.pullAtomId[i] = 255;
                            break;
                        case "FOREGROUND_SERVICE_APP_OP_SESSION_ENDED":
                        case 256:
                            m.pullAtomId[i] = 256;
                            break;
                        case "DISPLAY_JANK_REPORTED":
                        case 257:
                            m.pullAtomId[i] = 257;
                            break;
                        case "APP_STANDBY_BUCKET_CHANGED":
                        case 258:
                            m.pullAtomId[i] = 258;
                            break;
                        case "SHARESHEET_STARTED":
                        case 259:
                            m.pullAtomId[i] = 259;
                            break;
                        case "RANKING_SELECTED":
                        case 260:
                            m.pullAtomId[i] = 260;
                            break;
                        case "TVSETTINGS_UI_INTERACTED":
                        case 261:
                            m.pullAtomId[i] = 261;
                            break;
                        case "LAUNCHER_SNAPSHOT":
                        case 262:
                            m.pullAtomId[i] = 262;
                            break;
                        case "PACKAGE_INSTALLER_V2_REPORTED":
                        case 263:
                            m.pullAtomId[i] = 263;
                            break;
                        case "USER_LIFECYCLE_JOURNEY_REPORTED":
                        case 264:
                            m.pullAtomId[i] = 264;
                            break;
                        case "USER_LIFECYCLE_EVENT_OCCURRED":
                        case 265:
                            m.pullAtomId[i] = 265;
                            break;
                        case "ACCESSIBILITY_SHORTCUT_REPORTED":
                        case 266:
                            m.pullAtomId[i] = 266;
                            break;
                        case "ACCESSIBILITY_SERVICE_REPORTED":
                        case 267:
                            m.pullAtomId[i] = 267;
                            break;
                        case "DOCS_UI_DRAG_AND_DROP_REPORTED":
                        case 268:
                            m.pullAtomId[i] = 268;
                            break;
                        case "APP_USAGE_EVENT_OCCURRED":
                        case 269:
                            m.pullAtomId[i] = 269;
                            break;
                        case "AUTO_REVOKE_NOTIFICATION_CLICKED":
                        case 270:
                            m.pullAtomId[i] = 270;
                            break;
                        case "AUTO_REVOKE_FRAGMENT_APP_VIEWED":
                        case 271:
                            m.pullAtomId[i] = 271;
                            break;
                        case "AUTO_REVOKED_APP_INTERACTION":
                        case 272:
                            m.pullAtomId[i] = 272;
                            break;
                        case "APP_PERMISSION_GROUPS_FRAGMENT_AUTO_REVOKE_ACTION":
                        case 273:
                            m.pullAtomId[i] = 273;
                            break;
                        case "EVS_USAGE_STATS_REPORTED":
                        case 274:
                            m.pullAtomId[i] = 274;
                            break;
                        case "AUDIO_POWER_USAGE_DATA_REPORTED":
                        case 275:
                            m.pullAtomId[i] = 275;
                            break;
                        case "TV_TUNER_STATE_CHANGED":
                        case 276:
                            m.pullAtomId[i] = 276;
                            break;
                        case "MEDIAOUTPUT_OP_SWITCH_REPORTED":
                        case 277:
                            m.pullAtomId[i] = 277;
                            break;
                        case "CB_MESSAGE_FILTERED":
                        case 278:
                            m.pullAtomId[i] = 278;
                            break;
                        case "TV_TUNER_DVR_STATUS":
                        case 279:
                            m.pullAtomId[i] = 279;
                            break;
                        case "TV_CAS_SESSION_OPEN_STATUS":
                        case 280:
                            m.pullAtomId[i] = 280;
                            break;
                        case "ASSISTANT_INVOCATION_REPORTED":
                        case 281:
                            m.pullAtomId[i] = 281;
                            break;
                        case "DISPLAY_WAKE_REPORTED":
                        case 282:
                            m.pullAtomId[i] = 282;
                            break;
                        case "CAR_USER_HAL_MODIFY_USER_REQUEST_REPORTED":
                        case 283:
                            m.pullAtomId[i] = 283;
                            break;
                        case "CAR_USER_HAL_MODIFY_USER_RESPONSE_REPORTED":
                        case 284:
                            m.pullAtomId[i] = 284;
                            break;
                        case "CAR_USER_HAL_POST_SWITCH_RESPONSE_REPORTED":
                        case 285:
                            m.pullAtomId[i] = 285;
                            break;
                        case "CAR_USER_HAL_INITIAL_USER_INFO_REQUEST_REPORTED":
                        case 286:
                            m.pullAtomId[i] = 286;
                            break;
                        case "CAR_USER_HAL_INITIAL_USER_INFO_RESPONSE_REPORTED":
                        case 287:
                            m.pullAtomId[i] = 287;
                            break;
                        case "CAR_USER_HAL_USER_ASSOCIATION_REQUEST_REPORTED":
                        case 288:
                            m.pullAtomId[i] = 288;
                            break;
                        case "CAR_USER_HAL_SET_USER_ASSOCIATION_RESPONSE_REPORTED":
                        case 289:
                            m.pullAtomId[i] = 289;
                            break;
                        case "NETWORK_IP_PROVISIONING_REPORTED":
                        case 290:
                            m.pullAtomId[i] = 290;
                            break;
                        case "NETWORK_DHCP_RENEW_REPORTED":
                        case 291:
                            m.pullAtomId[i] = 291;
                            break;
                        case "NETWORK_VALIDATION_REPORTED":
                        case 292:
                            m.pullAtomId[i] = 292;
                            break;
                        case "NETWORK_STACK_QUIRK_REPORTED":
                        case 293:
                            m.pullAtomId[i] = 293;
                            break;
                        case "MEDIAMETRICS_AUDIORECORDDEVICEUSAGE_REPORTED":
                        case 294:
                            m.pullAtomId[i] = 294;
                            break;
                        case "MEDIAMETRICS_AUDIOTHREADDEVICEUSAGE_REPORTED":
                        case 295:
                            m.pullAtomId[i] = 295;
                            break;
                        case "MEDIAMETRICS_AUDIOTRACKDEVICEUSAGE_REPORTED":
                        case 296:
                            m.pullAtomId[i] = 296;
                            break;
                        case "MEDIAMETRICS_AUDIODEVICECONNECTION_REPORTED":
                        case 297:
                            m.pullAtomId[i] = 297;
                            break;
                        case "BLOB_COMMITTED":
                        case 298:
                            m.pullAtomId[i] = 298;
                            break;
                        case "BLOB_LEASED":
                        case 299:
                            m.pullAtomId[i] = 299;
                            break;
                        case "BLOB_OPENED":
                        case 300:
                            m.pullAtomId[i] = 300;
                            break;
                        case "CONTACTS_PROVIDER_STATUS_REPORTED":
                        case 301:
                            m.pullAtomId[i] = 301;
                            break;
                        case "KEYSTORE_KEY_EVENT_REPORTED":
                        case 302:
                            m.pullAtomId[i] = 302;
                            break;
                        case "NETWORK_TETHERING_REPORTED":
                        case 303:
                            m.pullAtomId[i] = 303;
                            break;
                        case "IME_TOUCH_REPORTED":
                        case 304:
                            m.pullAtomId[i] = 304;
                            break;
                        case "UI_INTERACTION_FRAME_INFO_REPORTED":
                        case 305:
                            m.pullAtomId[i] = 305;
                            break;
                        case "UI_ACTION_LATENCY_REPORTED":
                        case 306:
                            m.pullAtomId[i] = 306;
                            break;
                        case "WIFI_DISCONNECT_REPORTED":
                        case 307:
                            m.pullAtomId[i] = 307;
                            break;
                        case "WIFI_CONNECTION_STATE_CHANGED":
                        case 308:
                            m.pullAtomId[i] = 308;
                            break;
                        case "HDMI_CEC_ACTIVE_SOURCE_CHANGED":
                        case 309:
                            m.pullAtomId[i] = 309;
                            break;
                        case "HDMI_CEC_MESSAGE_REPORTED":
                        case 310:
                            m.pullAtomId[i] = 310;
                            break;
                        case "AIRPLANE_MODE":
                        case 311:
                            m.pullAtomId[i] = 311;
                            break;
                        case "MODEM_RESTART":
                        case 312:
                            m.pullAtomId[i] = 312;
                            break;
                        case "CARRIER_ID_MISMATCH_REPORTED":
                        case 313:
                            m.pullAtomId[i] = 313;
                            break;
                        case "CARRIER_ID_TABLE_UPDATED":
                        case 314:
                            m.pullAtomId[i] = 314;
                            break;
                        case "DATA_STALL_RECOVERY_REPORTED":
                        case 315:
                            m.pullAtomId[i] = 315;
                            break;
                        case "MEDIAMETRICS_MEDIAPARSER_REPORTED":
                        case 316:
                            m.pullAtomId[i] = 316;
                            break;
                        case "TLS_HANDSHAKE_REPORTED":
                        case 317:
                            m.pullAtomId[i] = 317;
                            break;
                        case "TEXT_CLASSIFIER_API_USAGE_REPORTED":
                        case 318:
                            m.pullAtomId[i] = 318;
                            break;
                        case "CAR_WATCHDOG_KILL_STATS_REPORTED":
                        case 319:
                            m.pullAtomId[i] = 319;
                            break;
                        case "MEDIAMETRICS_PLAYBACK_REPORTED":
                        case 320:
                            m.pullAtomId[i] = 320;
                            break;
                        case "MEDIA_NETWORK_INFO_CHANGED":
                        case 321:
                            m.pullAtomId[i] = 321;
                            break;
                        case "MEDIA_PLAYBACK_STATE_CHANGED":
                        case 322:
                            m.pullAtomId[i] = 322;
                            break;
                        case "MEDIA_PLAYBACK_ERROR_REPORTED":
                        case 323:
                            m.pullAtomId[i] = 323;
                            break;
                        case "MEDIA_PLAYBACK_TRACK_CHANGED":
                        case 324:
                            m.pullAtomId[i] = 324;
                            break;
                        case "WIFI_SCAN_REPORTED":
                        case 325:
                            m.pullAtomId[i] = 325;
                            break;
                        case "WIFI_PNO_SCAN_REPORTED":
                        case 326:
                            m.pullAtomId[i] = 326;
                            break;
                        case "TIF_TUNE_CHANGED":
                        case 327:
                            m.pullAtomId[i] = 327;
                            break;
                        case "AUTO_ROTATE_REPORTED":
                        case 328:
                            m.pullAtomId[i] = 328;
                            break;
                        case "PERFETTO_TRIGGER":
                        case 329:
                            m.pullAtomId[i] = 329;
                            break;
                        case "TRANSCODING_DATA":
                        case 330:
                            m.pullAtomId[i] = 330;
                            break;
                        case "IMS_SERVICE_ENTITLEMENT_UPDATED":
                        case 331:
                            m.pullAtomId[i] = 331;
                            break;
                        case "ART_DATUM_REPORTED":
                        case 332:
                            m.pullAtomId[i] = 332;
                            break;
                        case "DEVICE_ROTATED":
                        case 333:
                            m.pullAtomId[i] = 333;
                            break;
                        case "SIM_SPECIFIC_SETTINGS_RESTORED":
                        case 334:
                            m.pullAtomId[i] = 334;
                            break;
                        case "PIN_STORAGE_EVENT":
                        case 336:
                            m.pullAtomId[i] = 336;
                            break;
                        case "FACE_DOWN_REPORTED":
                        case 337:
                            m.pullAtomId[i] = 337;
                            break;
                        case "BLUETOOTH_HAL_CRASH_REASON_REPORTED":
                        case 338:
                            m.pullAtomId[i] = 338;
                            break;
                        case "REBOOT_ESCROW_PREPARATION_REPORTED":
                        case 339:
                            m.pullAtomId[i] = 339;
                            break;
                        case "REBOOT_ESCROW_LSKF_CAPTURE_REPORTED":
                        case 340:
                            m.pullAtomId[i] = 340;
                            break;
                        case "REBOOT_ESCROW_REBOOT_REPORTED":
                        case 341:
                            m.pullAtomId[i] = 341;
                            break;
                        case "BINDER_LATENCY_REPORTED":
                        case 342:
                            m.pullAtomId[i] = 342;
                            break;
                        case "MEDIAMETRICS_AAUDIOSTREAM_REPORTED":
                        case 343:
                            m.pullAtomId[i] = 343;
                            break;
                        case "MEDIA_TRANSCODING_SESSION_ENDED":
                        case 344:
                            m.pullAtomId[i] = 344;
                            break;
                        case "MAGNIFICATION_USAGE_REPORTED":
                        case 345:
                            m.pullAtomId[i] = 345;
                            break;
                        case "MAGNIFICATION_MODE_WITH_IME_ON_REPORTED":
                        case 346:
                            m.pullAtomId[i] = 346;
                            break;
                        case "APP_SEARCH_CALL_STATS_REPORTED":
                        case 347:
                            m.pullAtomId[i] = 347;
                            break;
                        case "APP_SEARCH_PUT_DOCUMENT_STATS_REPORTED":
                        case 348:
                            m.pullAtomId[i] = 348;
                            break;
                        case "DEVICE_CONTROL_CHANGED":
                        case 349:
                            m.pullAtomId[i] = 349;
                            break;
                        case "DEVICE_STATE_CHANGED":
                        case 350:
                            m.pullAtomId[i] = 350;
                            break;
                        case "INPUTDEVICE_REGISTERED":
                        case 351:
                            m.pullAtomId[i] = 351;
                            break;
                        case "SMARTSPACE_CARD_REPORTED":
                        case 352:
                            m.pullAtomId[i] = 352;
                            break;
                        case "AUTH_PROMPT_AUTHENTICATE_INVOKED":
                        case 353:
                            m.pullAtomId[i] = 353;
                            break;
                        case "AUTH_MANAGER_CAN_AUTHENTICATE_INVOKED":
                        case 354:
                            m.pullAtomId[i] = 354;
                            break;
                        case "AUTH_ENROLL_ACTION_INVOKED":
                        case 355:
                            m.pullAtomId[i] = 355;
                            break;
                        case "AUTH_DEPRECATED_API_USED":
                        case 356:
                            m.pullAtomId[i] = 356;
                            break;
                        case "UNATTENDED_REBOOT_OCCURRED":
                        case 357:
                            m.pullAtomId[i] = 357;
                            break;
                        case "LONG_REBOOT_BLOCKING_REPORTED":
                        case 358:
                            m.pullAtomId[i] = 358;
                            break;
                        case "LOCATION_TIME_ZONE_PROVIDER_STATE_CHANGED":
                        case 359:
                            m.pullAtomId[i] = 359;
                            break;
                        case "FDTRACK_EVENT_OCCURRED":
                        case 364:
                            m.pullAtomId[i] = 364;
                            break;
                        case "TIMEOUT_AUTO_EXTENDED_REPORTED":
                        case 365:
                            m.pullAtomId[i] = 365;
                            break;
                        case "ODREFRESH_REPORTED":
                        case 366:
                            m.pullAtomId[i] = 366;
                            break;
                        case "ALARM_BATCH_DELIVERED":
                        case 367:
                            m.pullAtomId[i] = 367;
                            break;
                        case "ALARM_SCHEDULED":
                        case 368:
                            m.pullAtomId[i] = 368;
                            break;
                        case "CAR_WATCHDOG_IO_OVERUSE_STATS_REPORTED":
                        case 369:
                            m.pullAtomId[i] = 369;
                            break;
                        case "USER_LEVEL_HIBERNATION_STATE_CHANGED":
                        case 370:
                            m.pullAtomId[i] = 370;
                            break;
                        case "APP_SEARCH_INITIALIZE_STATS_REPORTED":
                        case 371:
                            m.pullAtomId[i] = 371;
                            break;
                        case "APP_SEARCH_QUERY_STATS_REPORTED":
                        case 372:
                            m.pullAtomId[i] = 372;
                            break;
                        case "APP_PROCESS_DIED":
                        case 373:
                            m.pullAtomId[i] = 373;
                            break;
                        case "NETWORK_IP_REACHABILITY_MONITOR_REPORTED":
                        case 374:
                            m.pullAtomId[i] = 374;
                            break;
                        case "SLOW_INPUT_EVENT_REPORTED":
                        case 375:
                            m.pullAtomId[i] = 375;
                            break;
                        case "ANR_OCCURRED_PROCESSING_STARTED":
                        case 376:
                            m.pullAtomId[i] = 376;
                            break;
                        case "APP_SEARCH_REMOVE_STATS_REPORTED":
                        case 377:
                            m.pullAtomId[i] = 377;
                            break;
                        case "MEDIA_CODEC_REPORTED":
                        case 378:
                            m.pullAtomId[i] = 378;
                            break;
                        case "PERMISSION_USAGE_FRAGMENT_INTERACTION":
                        case 379:
                            m.pullAtomId[i] = 379;
                            break;
                        case "PERMISSION_DETAILS_INTERACTION":
                        case 380:
                            m.pullAtomId[i] = 380;
                            break;
                        case "PRIVACY_SENSOR_TOGGLE_INTERACTION":
                        case 381:
                            m.pullAtomId[i] = 381;
                            break;
                        case "PRIVACY_TOGGLE_DIALOG_INTERACTION":
                        case 382:
                            m.pullAtomId[i] = 382;
                            break;
                        case "APP_SEARCH_OPTIMIZE_STATS_REPORTED":
                        case 383:
                            m.pullAtomId[i] = 383;
                            break;
                        case "APP_COMPAT_STATE_CHANGED":
                        case 386:
                            m.pullAtomId[i] = 386;
                            break;
                        case "SIZE_COMPAT_RESTART_BUTTON_EVENT_REPORTED":
                        case 387:
                            m.pullAtomId[i] = 387;
                            break;
                        case "SPLITSCREEN_UI_CHANGED":
                        case 388:
                            m.pullAtomId[i] = 388;
                            break;
                        case "BLUETOOTH_CODE_PATH_COUNTER":
                        case 390:
                            m.pullAtomId[i] = 390;
                            break;
                        case "BLUETOOTH_LE_BATCH_SCAN_REPORT_DELAY":
                        case 392:
                            m.pullAtomId[i] = 392;
                            break;
                        case "ACCESSIBILITY_FLOATING_MENU_UI_CHANGED":
                        case 393:
                            m.pullAtomId[i] = 393;
                            break;
                        case "NEURALNETWORKS_COMPILATION_COMPLETED":
                        case 394:
                            m.pullAtomId[i] = 394;
                            break;
                        case "NEURALNETWORKS_EXECUTION_COMPLETED":
                        case 395:
                            m.pullAtomId[i] = 395;
                            break;
                        case "NEURALNETWORKS_COMPILATION_FAILED":
                        case 396:
                            m.pullAtomId[i] = 396;
                            break;
                        case "NEURALNETWORKS_EXECUTION_FAILED":
                        case 397:
                            m.pullAtomId[i] = 397;
                            break;
                        case "VM_CREATION_REQUESTED":
                        case 409:
                            m.pullAtomId[i] = 409;
                            break;
                        case "CAMERA_COMPAT_CONTROL_EVENT_REPORTED":
                        case 411:
                            m.pullAtomId[i] = 411;
                            break;
                        case "TRACING_SERVICE_REPORT_EVENT":
                        case 424:
                            m.pullAtomId[i] = 424;
                            break;
                        case "EARLY_BOOT_COMP_OS_ARTIFACTS_CHECK_REPORTED":
                        case 419:
                            m.pullAtomId[i] = 419;
                            break;
                        case "ISOLATED_COMPILATION_SCHEDULED":
                        case 457:
                            m.pullAtomId[i] = 457;
                            break;
                        case "ISOLATED_COMPILATION_ENDED":
                        case 458:
                            m.pullAtomId[i] = 458;
                            break;
                        case "TELEPHONY_ANOMALY_DETECTED":
                        case 461:
                            m.pullAtomId[i] = 461;
                            break;
                        case "HOTWORD_DETECTOR_CREATE_REQUESTED":
                        case 430:
                            m.pullAtomId[i] = 430;
                            break;
                        case "HOTWORD_DETECTION_SERVICE_INIT_RESULT_REPORTED":
                        case 431:
                            m.pullAtomId[i] = 431;
                            break;
                        case "HOTWORD_DETECTION_SERVICE_RESTARTED":
                        case 432:
                            m.pullAtomId[i] = 432;
                            break;
                        case "HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED":
                        case 433:
                            m.pullAtomId[i] = 433;
                            break;
                        case "HOTWORD_DETECTOR_EVENTS":
                        case 434:
                            m.pullAtomId[i] = 434;
                            break;
                        case "REMOTE_KEY_PROVISIONING_ATTEMPT":
                        case 463:
                            m.pullAtomId[i] = 463;
                            break;
                        case "REMOTE_KEY_PROVISIONING_NETWORK_INFO":
                        case 464:
                            m.pullAtomId[i] = 464;
                            break;
                        case "REMOTE_KEY_PROVISIONING_TIMING":
                        case 465:
                            m.pullAtomId[i] = 465;
                            break;
                        case "WIFI_BYTES_TRANSFER":
                        case 10000:
                            m.pullAtomId[i] = 10000;
                            break;
                        case "WIFI_BYTES_TRANSFER_BY_FG_BG":
                        case 10001:
                            m.pullAtomId[i] = 10001;
                            break;
                        case "MOBILE_BYTES_TRANSFER":
                        case 10002:
                            m.pullAtomId[i] = 10002;
                            break;
                        case "MOBILE_BYTES_TRANSFER_BY_FG_BG":
                        case 10003:
                            m.pullAtomId[i] = 10003;
                            break;
                        case "BLUETOOTH_BYTES_TRANSFER":
                        case 10006:
                            m.pullAtomId[i] = 10006;
                            break;
                        case "KERNEL_WAKELOCK":
                        case 10004:
                            m.pullAtomId[i] = 10004;
                            break;
                        case "SUBSYSTEM_SLEEP_STATE":
                        case 10005:
                            m.pullAtomId[i] = 10005;
                            break;
                        case "CPU_TIME_PER_UID":
                        case 10009:
                            m.pullAtomId[i] = 10009;
                            break;
                        case "CPU_TIME_PER_UID_FREQ":
                        case 10010:
                            m.pullAtomId[i] = 10010;
                            break;
                        case "WIFI_ACTIVITY_INFO":
                        case 10011:
                            m.pullAtomId[i] = 10011;
                            break;
                        case "MODEM_ACTIVITY_INFO":
                        case 10012:
                            m.pullAtomId[i] = 10012;
                            break;
                        case "BLUETOOTH_ACTIVITY_INFO":
                        case 10007:
                            m.pullAtomId[i] = 10007;
                            break;
                        case "PROCESS_MEMORY_STATE":
                        case 10013:
                            m.pullAtomId[i] = 10013;
                            break;
                        case "SYSTEM_ELAPSED_REALTIME":
                        case 10014:
                            m.pullAtomId[i] = 10014;
                            break;
                        case "SYSTEM_UPTIME":
                        case 10015:
                            m.pullAtomId[i] = 10015;
                            break;
                        case "CPU_ACTIVE_TIME":
                        case 10016:
                            m.pullAtomId[i] = 10016;
                            break;
                        case "CPU_CLUSTER_TIME":
                        case 10017:
                            m.pullAtomId[i] = 10017;
                            break;
                        case "DISK_SPACE":
                        case 10018:
                            m.pullAtomId[i] = 10018;
                            break;
                        case "REMAINING_BATTERY_CAPACITY":
                        case 10019:
                            m.pullAtomId[i] = 10019;
                            break;
                        case "FULL_BATTERY_CAPACITY":
                        case 10020:
                            m.pullAtomId[i] = 10020;
                            break;
                        case "TEMPERATURE":
                        case 10021:
                            m.pullAtomId[i] = 10021;
                            break;
                        case "BINDER_CALLS":
                        case 10022:
                            m.pullAtomId[i] = 10022;
                            break;
                        case "BINDER_CALLS_EXCEPTIONS":
                        case 10023:
                            m.pullAtomId[i] = 10023;
                            break;
                        case "LOOPER_STATS":
                        case 10024:
                            m.pullAtomId[i] = 10024;
                            break;
                        case "DISK_STATS":
                        case 10025:
                            m.pullAtomId[i] = 10025;
                            break;
                        case "DIRECTORY_USAGE":
                        case 10026:
                            m.pullAtomId[i] = 10026;
                            break;
                        case "APP_SIZE":
                        case 10027:
                            m.pullAtomId[i] = 10027;
                            break;
                        case "CATEGORY_SIZE":
                        case 10028:
                            m.pullAtomId[i] = 10028;
                            break;
                        case "PROC_STATS":
                        case 10029:
                            m.pullAtomId[i] = 10029;
                            break;
                        case "BATTERY_VOLTAGE":
                        case 10030:
                            m.pullAtomId[i] = 10030;
                            break;
                        case "NUM_FINGERPRINTS_ENROLLED":
                        case 10031:
                            m.pullAtomId[i] = 10031;
                            break;
                        case "DISK_IO":
                        case 10032:
                            m.pullAtomId[i] = 10032;
                            break;
                        case "POWER_PROFILE":
                        case 10033:
                            m.pullAtomId[i] = 10033;
                            break;
                        case "PROC_STATS_PKG_PROC":
                        case 10034:
                            m.pullAtomId[i] = 10034;
                            break;
                        case "PROCESS_CPU_TIME":
                        case 10035:
                            m.pullAtomId[i] = 10035;
                            break;
                        case "CPU_TIME_PER_THREAD_FREQ":
                        case 10037:
                            m.pullAtomId[i] = 10037;
                            break;
                        case "ON_DEVICE_POWER_MEASUREMENT":
                        case 10038:
                            m.pullAtomId[i] = 10038;
                            break;
                        case "DEVICE_CALCULATED_POWER_USE":
                        case 10039:
                            m.pullAtomId[i] = 10039;
                            break;
                        case "DEVICE_CALCULATED_POWER_BLAME_UID":
                        case 10040:
                            m.pullAtomId[i] = 10040;
                            break;
                        case "DEVICE_CALCULATED_POWER_BLAME_OTHER":
                        case 10041:
                            m.pullAtomId[i] = 10041;
                            break;
                        case "PROCESS_MEMORY_HIGH_WATER_MARK":
                        case 10042:
                            m.pullAtomId[i] = 10042;
                            break;
                        case "BATTERY_LEVEL":
                        case 10043:
                            m.pullAtomId[i] = 10043;
                            break;
                        case "BUILD_INFORMATION":
                        case 10044:
                            m.pullAtomId[i] = 10044;
                            break;
                        case "BATTERY_CYCLE_COUNT":
                        case 10045:
                            m.pullAtomId[i] = 10045;
                            break;
                        case "DEBUG_ELAPSED_CLOCK":
                        case 10046:
                            m.pullAtomId[i] = 10046;
                            break;
                        case "DEBUG_FAILING_ELAPSED_CLOCK":
                        case 10047:
                            m.pullAtomId[i] = 10047;
                            break;
                        case "NUM_FACES_ENROLLED":
                        case 10048:
                            m.pullAtomId[i] = 10048;
                            break;
                        case "ROLE_HOLDER":
                        case 10049:
                            m.pullAtomId[i] = 10049;
                            break;
                        case "DANGEROUS_PERMISSION_STATE":
                        case 10050:
                            m.pullAtomId[i] = 10050;
                            break;
                        case "TRAIN_INFO":
                        case 10051:
                            m.pullAtomId[i] = 10051;
                            break;
                        case "TIME_ZONE_DATA_INFO":
                        case 10052:
                            m.pullAtomId[i] = 10052;
                            break;
                        case "EXTERNAL_STORAGE_INFO":
                        case 10053:
                            m.pullAtomId[i] = 10053;
                            break;
                        case "GPU_STATS_GLOBAL_INFO":
                        case 10054:
                            m.pullAtomId[i] = 10054;
                            break;
                        case "GPU_STATS_APP_INFO":
                        case 10055:
                            m.pullAtomId[i] = 10055;
                            break;
                        case "SYSTEM_ION_HEAP_SIZE":
                        case 10056:
                            m.pullAtomId[i] = 10056;
                            break;
                        case "APPS_ON_EXTERNAL_STORAGE_INFO":
                        case 10057:
                            m.pullAtomId[i] = 10057;
                            break;
                        case "FACE_SETTINGS":
                        case 10058:
                            m.pullAtomId[i] = 10058;
                            break;
                        case "COOLING_DEVICE":
                        case 10059:
                            m.pullAtomId[i] = 10059;
                            break;
                        case "APP_OPS":
                        case 10060:
                            m.pullAtomId[i] = 10060;
                            break;
                        case "PROCESS_SYSTEM_ION_HEAP_SIZE":
                        case 10061:
                            m.pullAtomId[i] = 10061;
                            break;
                        case "SURFACEFLINGER_STATS_GLOBAL_INFO":
                        case 10062:
                            m.pullAtomId[i] = 10062;
                            break;
                        case "SURFACEFLINGER_STATS_LAYER_INFO":
                        case 10063:
                            m.pullAtomId[i] = 10063;
                            break;
                        case "PROCESS_MEMORY_SNAPSHOT":
                        case 10064:
                            m.pullAtomId[i] = 10064;
                            break;
                        case "VMS_CLIENT_STATS":
                        case 10065:
                            m.pullAtomId[i] = 10065;
                            break;
                        case "NOTIFICATION_REMOTE_VIEWS":
                        case 10066:
                            m.pullAtomId[i] = 10066;
                            break;
                        case "DANGEROUS_PERMISSION_STATE_SAMPLED":
                        case 10067:
                            m.pullAtomId[i] = 10067;
                            break;
                        case "GRAPHICS_STATS":
                        case 10068:
                            m.pullAtomId[i] = 10068;
                            break;
                        case "RUNTIME_APP_OP_ACCESS":
                        case 10069:
                            m.pullAtomId[i] = 10069;
                            break;
                        case "ION_HEAP_SIZE":
                        case 10070:
                            m.pullAtomId[i] = 10070;
                            break;
                        case "PACKAGE_NOTIFICATION_PREFERENCES":
                        case 10071:
                            m.pullAtomId[i] = 10071;
                            break;
                        case "PACKAGE_NOTIFICATION_CHANNEL_PREFERENCES":
                        case 10072:
                            m.pullAtomId[i] = 10072;
                            break;
                        case "PACKAGE_NOTIFICATION_CHANNEL_GROUP_PREFERENCES":
                        case 10073:
                            m.pullAtomId[i] = 10073;
                            break;
                        case "GNSS_STATS":
                        case 10074:
                            m.pullAtomId[i] = 10074;
                            break;
                        case "ATTRIBUTED_APP_OPS":
                        case 10075:
                            m.pullAtomId[i] = 10075;
                            break;
                        case "VOICE_CALL_SESSION":
                        case 10076:
                            m.pullAtomId[i] = 10076;
                            break;
                        case "VOICE_CALL_RAT_USAGE":
                        case 10077:
                            m.pullAtomId[i] = 10077;
                            break;
                        case "SIM_SLOT_STATE":
                        case 10078:
                            m.pullAtomId[i] = 10078;
                            break;
                        case "SUPPORTED_RADIO_ACCESS_FAMILY":
                        case 10079:
                            m.pullAtomId[i] = 10079;
                            break;
                        case "SETTING_SNAPSHOT":
                        case 10080:
                            m.pullAtomId[i] = 10080;
                            break;
                        case "BLOB_INFO":
                        case 10081:
                            m.pullAtomId[i] = 10081;
                            break;
                        case "DATA_USAGE_BYTES_TRANSFER":
                        case 10082:
                            m.pullAtomId[i] = 10082;
                            break;
                        case "BYTES_TRANSFER_BY_TAG_AND_METERED":
                        case 10083:
                            m.pullAtomId[i] = 10083;
                            break;
                        case "DND_MODE_RULE":
                        case 10084:
                            m.pullAtomId[i] = 10084;
                            break;
                        case "GENERAL_EXTERNAL_STORAGE_ACCESS_STATS":
                        case 10085:
                            m.pullAtomId[i] = 10085;
                            break;
                        case "INCOMING_SMS":
                        case 10086:
                            m.pullAtomId[i] = 10086;
                            break;
                        case "OUTGOING_SMS":
                        case 10087:
                            m.pullAtomId[i] = 10087;
                            break;
                        case "CARRIER_ID_TABLE_VERSION":
                        case 10088:
                            m.pullAtomId[i] = 10088;
                            break;
                        case "DATA_CALL_SESSION":
                        case 10089:
                            m.pullAtomId[i] = 10089;
                            break;
                        case "CELLULAR_SERVICE_STATE":
                        case 10090:
                            m.pullAtomId[i] = 10090;
                            break;
                        case "CELLULAR_DATA_SERVICE_SWITCH":
                        case 10091:
                            m.pullAtomId[i] = 10091;
                            break;
                        case "SYSTEM_MEMORY":
                        case 10092:
                            m.pullAtomId[i] = 10092;
                            break;
                        case "IMS_REGISTRATION_TERMINATION":
                        case 10093:
                            m.pullAtomId[i] = 10093;
                            break;
                        case "IMS_REGISTRATION_STATS":
                        case 10094:
                            m.pullAtomId[i] = 10094;
                            break;
                        case "CPU_TIME_PER_CLUSTER_FREQ":
                        case 10095:
                            m.pullAtomId[i] = 10095;
                            break;
                        case "CPU_CYCLES_PER_UID_CLUSTER":
                        case 10096:
                            m.pullAtomId[i] = 10096;
                            break;
                        case "DEVICE_ROTATED_DATA":
                        case 10097:
                            m.pullAtomId[i] = 10097;
                            break;
                        case "CPU_CYCLES_PER_THREAD_GROUP_CLUSTER":
                        case 10098:
                            m.pullAtomId[i] = 10098;
                            break;
                        case "MEDIA_DRM_ACTIVITY_INFO":
                        case 10099:
                            m.pullAtomId[i] = 10099;
                            break;
                        case "OEM_MANAGED_BYTES_TRANSFER":
                        case 10100:
                            m.pullAtomId[i] = 10100;
                            break;
                        case "GNSS_POWER_STATS":
                        case 10101:
                            m.pullAtomId[i] = 10101;
                            break;
                        case "TIME_ZONE_DETECTOR_STATE":
                        case 10102:
                            m.pullAtomId[i] = 10102;
                            break;
                        case "KEYSTORE2_STORAGE_STATS":
                        case 10103:
                            m.pullAtomId[i] = 10103;
                            break;
                        case "RKP_POOL_STATS":
                        case 10104:
                            m.pullAtomId[i] = 10104;
                            break;
                        case "PROCESS_DMABUF_MEMORY":
                        case 10105:
                            m.pullAtomId[i] = 10105;
                            break;
                        case "PENDING_ALARM_INFO":
                        case 10106:
                            m.pullAtomId[i] = 10106;
                            break;
                        case "USER_LEVEL_HIBERNATED_APPS":
                        case 10107:
                            m.pullAtomId[i] = 10107;
                            break;
                        case "LAUNCHER_LAYOUT_SNAPSHOT":
                        case 10108:
                            m.pullAtomId[i] = 10108;
                            break;
                        case "GLOBAL_HIBERNATED_APPS":
                        case 10109:
                            m.pullAtomId[i] = 10109;
                            break;
                        case "INPUT_EVENT_LATENCY_SKETCH":
                        case 10110:
                            m.pullAtomId[i] = 10110;
                            break;
                        case "BATTERY_USAGE_STATS_BEFORE_RESET":
                        case 10111:
                            m.pullAtomId[i] = 10111;
                            break;
                        case "BATTERY_USAGE_STATS_SINCE_RESET":
                        case 10112:
                            m.pullAtomId[i] = 10112;
                            break;
                        case "BATTERY_USAGE_STATS_SINCE_RESET_USING_POWER_PROFILE_MODEL":
                        case 10113:
                            m.pullAtomId[i] = 10113;
                            break;
                        case "INSTALLED_INCREMENTAL_PACKAGE":
                        case 10114:
                            m.pullAtomId[i] = 10114;
                            break;
                        case "TELEPHONY_NETWORK_REQUESTS":
                        case 10115:
                            m.pullAtomId[i] = 10115;
                            break;
                        case "APP_SEARCH_STORAGE_INFO":
                        case 10116:
                            m.pullAtomId[i] = 10116;
                            break;
                        case "VMSTAT":
                        case 10117:
                            m.pullAtomId[i] = 10117;
                            break;
                        case "KEYSTORE2_KEY_CREATION_WITH_GENERAL_INFO":
                        case 10118:
                            m.pullAtomId[i] = 10118;
                            break;
                        case "KEYSTORE2_KEY_CREATION_WITH_AUTH_INFO":
                        case 10119:
                            m.pullAtomId[i] = 10119;
                            break;
                        case "KEYSTORE2_KEY_CREATION_WITH_PURPOSE_AND_MODES_INFO":
                        case 10120:
                            m.pullAtomId[i] = 10120;
                            break;
                        case "KEYSTORE2_ATOM_WITH_OVERFLOW":
                        case 10121:
                            m.pullAtomId[i] = 10121;
                            break;
                        case "KEYSTORE2_KEY_OPERATION_WITH_PURPOSE_AND_MODES_INFO":
                        case 10122:
                            m.pullAtomId[i] = 10122;
                            break;
                        case "KEYSTORE2_KEY_OPERATION_WITH_GENERAL_INFO":
                        case 10123:
                            m.pullAtomId[i] = 10123;
                            break;
                        case "RKP_ERROR_STATS":
                        case 10124:
                            m.pullAtomId[i] = 10124;
                            break;
                        case "KEYSTORE2_CRASH_STATS":
                        case 10125:
                            m.pullAtomId[i] = 10125;
                            break;
                        case "ACCESSIBILITY_SHORTCUT_STATS":
                        case 10127:
                            m.pullAtomId[i] = 10127;
                            break;
                        case "ACCESSIBILITY_FLOATING_MENU_STATS":
                        case 10128:
                            m.pullAtomId[i] = 10128;
                            break;
                        case "CAR_WATCHDOG_SYSTEM_IO_USAGE_SUMMARY":
                        case 10131:
                            m.pullAtomId[i] = 10131;
                            break;
                        case "CAR_WATCHDOG_UID_IO_USAGE_SUMMARY":
                        case 10132:
                            m.pullAtomId[i] = 10132;
                            break;
                        case "IMS_REGISTRATION_FEATURE_TAG_STATS":
                        case 10133:
                            m.pullAtomId[i] = 10133;
                            break;
                        case "RCS_CLIENT_PROVISIONING_STATS":
                        case 10134:
                            m.pullAtomId[i] = 10134;
                            break;
                        case "RCS_ACS_PROVISIONING_STATS":
                        case 10135:
                            m.pullAtomId[i] = 10135;
                            break;
                        case "SIP_DELEGATE_STATS":
                        case 10136:
                            m.pullAtomId[i] = 10136;
                            break;
                        case "SIP_TRANSPORT_FEATURE_TAG_STATS":
                        case 10137:
                            m.pullAtomId[i] = 10137;
                            break;
                        case "SIP_MESSAGE_RESPONSE":
                        case 10138:
                            m.pullAtomId[i] = 10138;
                            break;
                        case "SIP_TRANSPORT_SESSION":
                        case 10139:
                            m.pullAtomId[i] = 10139;
                            break;
                        case "IMS_DEDICATED_BEARER_LISTENER_EVENT":
                        case 10140:
                            m.pullAtomId[i] = 10140;
                            break;
                        case "IMS_DEDICATED_BEARER_EVENT":
                        case 10141:
                            m.pullAtomId[i] = 10141;
                            break;
                        case "IMS_REGISTRATION_SERVICE_DESC_STATS":
                        case 10142:
                            m.pullAtomId[i] = 10142;
                            break;
                        case "UCE_EVENT_STATS":
                        case 10143:
                            m.pullAtomId[i] = 10143;
                            break;
                        case "PRESENCE_NOTIFY_EVENT":
                        case 10144:
                            m.pullAtomId[i] = 10144;
                            break;
                        case "GBA_EVENT":
                        case 10145:
                            m.pullAtomId[i] = 10145;
                            break;
                        case "REMOTE_KEY_PROVISIONING_ERROR_COUNTS":
                        case 10155:
                            m.pullAtomId[i] = 10155;
                            break;
                        }
                    }
                }
                if (d.rawPullAtomId) {
                    if (!Array.isArray(d.rawPullAtomId))
                        throw TypeError(".perfetto.protos.StatsdPullAtomConfig.rawPullAtomId: array expected");
                    m.rawPullAtomId = [];
                    for (var i = 0; i < d.rawPullAtomId.length; ++i) {
                        m.rawPullAtomId[i] = d.rawPullAtomId[i] | 0;
                    }
                }
                if (d.pullFrequencyMs != null) {
                    m.pullFrequencyMs = d.pullFrequencyMs | 0;
                }
                if (d.packages) {
                    if (!Array.isArray(d.packages))
                        throw TypeError(".perfetto.protos.StatsdPullAtomConfig.packages: array expected");
                    m.packages = [];
                    for (var i = 0; i < d.packages.length; ++i) {
                        m.packages[i] = String(d.packages[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a StatsdPullAtomConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.StatsdPullAtomConfig
             * @static
             * @param {perfetto.protos.StatsdPullAtomConfig} m StatsdPullAtomConfig
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            StatsdPullAtomConfig.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.pullAtomId = [];
                    d.rawPullAtomId = [];
                    d.packages = [];
                }
                if (o.defaults) {
                    d.pullFrequencyMs = 0;
                }
                if (m.pullAtomId && m.pullAtomId.length) {
                    d.pullAtomId = [];
                    for (var j = 0; j < m.pullAtomId.length; ++j) {
                        d.pullAtomId[j] = o.enums === String ? $root.perfetto.protos.AtomId[m.pullAtomId[j]] : m.pullAtomId[j];
                    }
                }
                if (m.rawPullAtomId && m.rawPullAtomId.length) {
                    d.rawPullAtomId = [];
                    for (var j = 0; j < m.rawPullAtomId.length; ++j) {
                        d.rawPullAtomId[j] = m.rawPullAtomId[j];
                    }
                }
                if (m.pullFrequencyMs != null && m.hasOwnProperty("pullFrequencyMs")) {
                    d.pullFrequencyMs = m.pullFrequencyMs;
                }
                if (m.packages && m.packages.length) {
                    d.packages = [];
                    for (var j = 0; j < m.packages.length; ++j) {
                        d.packages[j] = m.packages[j];
                    }
                }
                return d;
            };

            /**
             * Converts this StatsdPullAtomConfig to JSON.
             * @function toJSON
             * @memberof perfetto.protos.StatsdPullAtomConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            StatsdPullAtomConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return StatsdPullAtomConfig;
        })();

        /**
         * MeminfoCounters enum.
         * @name perfetto.protos.MeminfoCounters
         * @enum {number}
         * @property {number} MEMINFO_UNSPECIFIED=0 MEMINFO_UNSPECIFIED value
         * @property {number} MEMINFO_MEM_TOTAL=1 MEMINFO_MEM_TOTAL value
         * @property {number} MEMINFO_MEM_FREE=2 MEMINFO_MEM_FREE value
         * @property {number} MEMINFO_MEM_AVAILABLE=3 MEMINFO_MEM_AVAILABLE value
         * @property {number} MEMINFO_BUFFERS=4 MEMINFO_BUFFERS value
         * @property {number} MEMINFO_CACHED=5 MEMINFO_CACHED value
         * @property {number} MEMINFO_SWAP_CACHED=6 MEMINFO_SWAP_CACHED value
         * @property {number} MEMINFO_ACTIVE=7 MEMINFO_ACTIVE value
         * @property {number} MEMINFO_INACTIVE=8 MEMINFO_INACTIVE value
         * @property {number} MEMINFO_ACTIVE_ANON=9 MEMINFO_ACTIVE_ANON value
         * @property {number} MEMINFO_INACTIVE_ANON=10 MEMINFO_INACTIVE_ANON value
         * @property {number} MEMINFO_ACTIVE_FILE=11 MEMINFO_ACTIVE_FILE value
         * @property {number} MEMINFO_INACTIVE_FILE=12 MEMINFO_INACTIVE_FILE value
         * @property {number} MEMINFO_UNEVICTABLE=13 MEMINFO_UNEVICTABLE value
         * @property {number} MEMINFO_MLOCKED=14 MEMINFO_MLOCKED value
         * @property {number} MEMINFO_SWAP_TOTAL=15 MEMINFO_SWAP_TOTAL value
         * @property {number} MEMINFO_SWAP_FREE=16 MEMINFO_SWAP_FREE value
         * @property {number} MEMINFO_DIRTY=17 MEMINFO_DIRTY value
         * @property {number} MEMINFO_WRITEBACK=18 MEMINFO_WRITEBACK value
         * @property {number} MEMINFO_ANON_PAGES=19 MEMINFO_ANON_PAGES value
         * @property {number} MEMINFO_MAPPED=20 MEMINFO_MAPPED value
         * @property {number} MEMINFO_SHMEM=21 MEMINFO_SHMEM value
         * @property {number} MEMINFO_SLAB=22 MEMINFO_SLAB value
         * @property {number} MEMINFO_SLAB_RECLAIMABLE=23 MEMINFO_SLAB_RECLAIMABLE value
         * @property {number} MEMINFO_SLAB_UNRECLAIMABLE=24 MEMINFO_SLAB_UNRECLAIMABLE value
         * @property {number} MEMINFO_KERNEL_STACK=25 MEMINFO_KERNEL_STACK value
         * @property {number} MEMINFO_PAGE_TABLES=26 MEMINFO_PAGE_TABLES value
         * @property {number} MEMINFO_COMMIT_LIMIT=27 MEMINFO_COMMIT_LIMIT value
         * @property {number} MEMINFO_COMMITED_AS=28 MEMINFO_COMMITED_AS value
         * @property {number} MEMINFO_VMALLOC_TOTAL=29 MEMINFO_VMALLOC_TOTAL value
         * @property {number} MEMINFO_VMALLOC_USED=30 MEMINFO_VMALLOC_USED value
         * @property {number} MEMINFO_VMALLOC_CHUNK=31 MEMINFO_VMALLOC_CHUNK value
         * @property {number} MEMINFO_CMA_TOTAL=32 MEMINFO_CMA_TOTAL value
         * @property {number} MEMINFO_CMA_FREE=33 MEMINFO_CMA_FREE value
         */
        protos.MeminfoCounters = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "MEMINFO_UNSPECIFIED"] = 0;
            values[valuesById[1] = "MEMINFO_MEM_TOTAL"] = 1;
            values[valuesById[2] = "MEMINFO_MEM_FREE"] = 2;
            values[valuesById[3] = "MEMINFO_MEM_AVAILABLE"] = 3;
            values[valuesById[4] = "MEMINFO_BUFFERS"] = 4;
            values[valuesById[5] = "MEMINFO_CACHED"] = 5;
            values[valuesById[6] = "MEMINFO_SWAP_CACHED"] = 6;
            values[valuesById[7] = "MEMINFO_ACTIVE"] = 7;
            values[valuesById[8] = "MEMINFO_INACTIVE"] = 8;
            values[valuesById[9] = "MEMINFO_ACTIVE_ANON"] = 9;
            values[valuesById[10] = "MEMINFO_INACTIVE_ANON"] = 10;
            values[valuesById[11] = "MEMINFO_ACTIVE_FILE"] = 11;
            values[valuesById[12] = "MEMINFO_INACTIVE_FILE"] = 12;
            values[valuesById[13] = "MEMINFO_UNEVICTABLE"] = 13;
            values[valuesById[14] = "MEMINFO_MLOCKED"] = 14;
            values[valuesById[15] = "MEMINFO_SWAP_TOTAL"] = 15;
            values[valuesById[16] = "MEMINFO_SWAP_FREE"] = 16;
            values[valuesById[17] = "MEMINFO_DIRTY"] = 17;
            values[valuesById[18] = "MEMINFO_WRITEBACK"] = 18;
            values[valuesById[19] = "MEMINFO_ANON_PAGES"] = 19;
            values[valuesById[20] = "MEMINFO_MAPPED"] = 20;
            values[valuesById[21] = "MEMINFO_SHMEM"] = 21;
            values[valuesById[22] = "MEMINFO_SLAB"] = 22;
            values[valuesById[23] = "MEMINFO_SLAB_RECLAIMABLE"] = 23;
            values[valuesById[24] = "MEMINFO_SLAB_UNRECLAIMABLE"] = 24;
            values[valuesById[25] = "MEMINFO_KERNEL_STACK"] = 25;
            values[valuesById[26] = "MEMINFO_PAGE_TABLES"] = 26;
            values[valuesById[27] = "MEMINFO_COMMIT_LIMIT"] = 27;
            values[valuesById[28] = "MEMINFO_COMMITED_AS"] = 28;
            values[valuesById[29] = "MEMINFO_VMALLOC_TOTAL"] = 29;
            values[valuesById[30] = "MEMINFO_VMALLOC_USED"] = 30;
            values[valuesById[31] = "MEMINFO_VMALLOC_CHUNK"] = 31;
            values[valuesById[32] = "MEMINFO_CMA_TOTAL"] = 32;
            values[valuesById[33] = "MEMINFO_CMA_FREE"] = 33;
            return values;
        })();

        /**
         * VmstatCounters enum.
         * @name perfetto.protos.VmstatCounters
         * @enum {number}
         * @property {number} VMSTAT_UNSPECIFIED=0 VMSTAT_UNSPECIFIED value
         * @property {number} VMSTAT_NR_FREE_PAGES=1 VMSTAT_NR_FREE_PAGES value
         * @property {number} VMSTAT_NR_ALLOC_BATCH=2 VMSTAT_NR_ALLOC_BATCH value
         * @property {number} VMSTAT_NR_INACTIVE_ANON=3 VMSTAT_NR_INACTIVE_ANON value
         * @property {number} VMSTAT_NR_ACTIVE_ANON=4 VMSTAT_NR_ACTIVE_ANON value
         * @property {number} VMSTAT_NR_INACTIVE_FILE=5 VMSTAT_NR_INACTIVE_FILE value
         * @property {number} VMSTAT_NR_ACTIVE_FILE=6 VMSTAT_NR_ACTIVE_FILE value
         * @property {number} VMSTAT_NR_UNEVICTABLE=7 VMSTAT_NR_UNEVICTABLE value
         * @property {number} VMSTAT_NR_MLOCK=8 VMSTAT_NR_MLOCK value
         * @property {number} VMSTAT_NR_ANON_PAGES=9 VMSTAT_NR_ANON_PAGES value
         * @property {number} VMSTAT_NR_MAPPED=10 VMSTAT_NR_MAPPED value
         * @property {number} VMSTAT_NR_FILE_PAGES=11 VMSTAT_NR_FILE_PAGES value
         * @property {number} VMSTAT_NR_DIRTY=12 VMSTAT_NR_DIRTY value
         * @property {number} VMSTAT_NR_WRITEBACK=13 VMSTAT_NR_WRITEBACK value
         * @property {number} VMSTAT_NR_SLAB_RECLAIMABLE=14 VMSTAT_NR_SLAB_RECLAIMABLE value
         * @property {number} VMSTAT_NR_SLAB_UNRECLAIMABLE=15 VMSTAT_NR_SLAB_UNRECLAIMABLE value
         * @property {number} VMSTAT_NR_PAGE_TABLE_PAGES=16 VMSTAT_NR_PAGE_TABLE_PAGES value
         * @property {number} VMSTAT_NR_KERNEL_STACK=17 VMSTAT_NR_KERNEL_STACK value
         * @property {number} VMSTAT_NR_OVERHEAD=18 VMSTAT_NR_OVERHEAD value
         * @property {number} VMSTAT_NR_UNSTABLE=19 VMSTAT_NR_UNSTABLE value
         * @property {number} VMSTAT_NR_BOUNCE=20 VMSTAT_NR_BOUNCE value
         * @property {number} VMSTAT_NR_VMSCAN_WRITE=21 VMSTAT_NR_VMSCAN_WRITE value
         * @property {number} VMSTAT_NR_VMSCAN_IMMEDIATE_RECLAIM=22 VMSTAT_NR_VMSCAN_IMMEDIATE_RECLAIM value
         * @property {number} VMSTAT_NR_WRITEBACK_TEMP=23 VMSTAT_NR_WRITEBACK_TEMP value
         * @property {number} VMSTAT_NR_ISOLATED_ANON=24 VMSTAT_NR_ISOLATED_ANON value
         * @property {number} VMSTAT_NR_ISOLATED_FILE=25 VMSTAT_NR_ISOLATED_FILE value
         * @property {number} VMSTAT_NR_SHMEM=26 VMSTAT_NR_SHMEM value
         * @property {number} VMSTAT_NR_DIRTIED=27 VMSTAT_NR_DIRTIED value
         * @property {number} VMSTAT_NR_WRITTEN=28 VMSTAT_NR_WRITTEN value
         * @property {number} VMSTAT_NR_PAGES_SCANNED=29 VMSTAT_NR_PAGES_SCANNED value
         * @property {number} VMSTAT_WORKINGSET_REFAULT=30 VMSTAT_WORKINGSET_REFAULT value
         * @property {number} VMSTAT_WORKINGSET_ACTIVATE=31 VMSTAT_WORKINGSET_ACTIVATE value
         * @property {number} VMSTAT_WORKINGSET_NODERECLAIM=32 VMSTAT_WORKINGSET_NODERECLAIM value
         * @property {number} VMSTAT_NR_ANON_TRANSPARENT_HUGEPAGES=33 VMSTAT_NR_ANON_TRANSPARENT_HUGEPAGES value
         * @property {number} VMSTAT_NR_FREE_CMA=34 VMSTAT_NR_FREE_CMA value
         * @property {number} VMSTAT_NR_SWAPCACHE=35 VMSTAT_NR_SWAPCACHE value
         * @property {number} VMSTAT_NR_DIRTY_THRESHOLD=36 VMSTAT_NR_DIRTY_THRESHOLD value
         * @property {number} VMSTAT_NR_DIRTY_BACKGROUND_THRESHOLD=37 VMSTAT_NR_DIRTY_BACKGROUND_THRESHOLD value
         * @property {number} VMSTAT_PGPGIN=38 VMSTAT_PGPGIN value
         * @property {number} VMSTAT_PGPGOUT=39 VMSTAT_PGPGOUT value
         * @property {number} VMSTAT_PGPGOUTCLEAN=40 VMSTAT_PGPGOUTCLEAN value
         * @property {number} VMSTAT_PSWPIN=41 VMSTAT_PSWPIN value
         * @property {number} VMSTAT_PSWPOUT=42 VMSTAT_PSWPOUT value
         * @property {number} VMSTAT_PGALLOC_DMA=43 VMSTAT_PGALLOC_DMA value
         * @property {number} VMSTAT_PGALLOC_NORMAL=44 VMSTAT_PGALLOC_NORMAL value
         * @property {number} VMSTAT_PGALLOC_MOVABLE=45 VMSTAT_PGALLOC_MOVABLE value
         * @property {number} VMSTAT_PGFREE=46 VMSTAT_PGFREE value
         * @property {number} VMSTAT_PGACTIVATE=47 VMSTAT_PGACTIVATE value
         * @property {number} VMSTAT_PGDEACTIVATE=48 VMSTAT_PGDEACTIVATE value
         * @property {number} VMSTAT_PGFAULT=49 VMSTAT_PGFAULT value
         * @property {number} VMSTAT_PGMAJFAULT=50 VMSTAT_PGMAJFAULT value
         * @property {number} VMSTAT_PGREFILL_DMA=51 VMSTAT_PGREFILL_DMA value
         * @property {number} VMSTAT_PGREFILL_NORMAL=52 VMSTAT_PGREFILL_NORMAL value
         * @property {number} VMSTAT_PGREFILL_MOVABLE=53 VMSTAT_PGREFILL_MOVABLE value
         * @property {number} VMSTAT_PGSTEAL_KSWAPD_DMA=54 VMSTAT_PGSTEAL_KSWAPD_DMA value
         * @property {number} VMSTAT_PGSTEAL_KSWAPD_NORMAL=55 VMSTAT_PGSTEAL_KSWAPD_NORMAL value
         * @property {number} VMSTAT_PGSTEAL_KSWAPD_MOVABLE=56 VMSTAT_PGSTEAL_KSWAPD_MOVABLE value
         * @property {number} VMSTAT_PGSTEAL_DIRECT_DMA=57 VMSTAT_PGSTEAL_DIRECT_DMA value
         * @property {number} VMSTAT_PGSTEAL_DIRECT_NORMAL=58 VMSTAT_PGSTEAL_DIRECT_NORMAL value
         * @property {number} VMSTAT_PGSTEAL_DIRECT_MOVABLE=59 VMSTAT_PGSTEAL_DIRECT_MOVABLE value
         * @property {number} VMSTAT_PGSCAN_KSWAPD_DMA=60 VMSTAT_PGSCAN_KSWAPD_DMA value
         * @property {number} VMSTAT_PGSCAN_KSWAPD_NORMAL=61 VMSTAT_PGSCAN_KSWAPD_NORMAL value
         * @property {number} VMSTAT_PGSCAN_KSWAPD_MOVABLE=62 VMSTAT_PGSCAN_KSWAPD_MOVABLE value
         * @property {number} VMSTAT_PGSCAN_DIRECT_DMA=63 VMSTAT_PGSCAN_DIRECT_DMA value
         * @property {number} VMSTAT_PGSCAN_DIRECT_NORMAL=64 VMSTAT_PGSCAN_DIRECT_NORMAL value
         * @property {number} VMSTAT_PGSCAN_DIRECT_MOVABLE=65 VMSTAT_PGSCAN_DIRECT_MOVABLE value
         * @property {number} VMSTAT_PGSCAN_DIRECT_THROTTLE=66 VMSTAT_PGSCAN_DIRECT_THROTTLE value
         * @property {number} VMSTAT_PGINODESTEAL=67 VMSTAT_PGINODESTEAL value
         * @property {number} VMSTAT_SLABS_SCANNED=68 VMSTAT_SLABS_SCANNED value
         * @property {number} VMSTAT_KSWAPD_INODESTEAL=69 VMSTAT_KSWAPD_INODESTEAL value
         * @property {number} VMSTAT_KSWAPD_LOW_WMARK_HIT_QUICKLY=70 VMSTAT_KSWAPD_LOW_WMARK_HIT_QUICKLY value
         * @property {number} VMSTAT_KSWAPD_HIGH_WMARK_HIT_QUICKLY=71 VMSTAT_KSWAPD_HIGH_WMARK_HIT_QUICKLY value
         * @property {number} VMSTAT_PAGEOUTRUN=72 VMSTAT_PAGEOUTRUN value
         * @property {number} VMSTAT_ALLOCSTALL=73 VMSTAT_ALLOCSTALL value
         * @property {number} VMSTAT_PGROTATED=74 VMSTAT_PGROTATED value
         * @property {number} VMSTAT_DROP_PAGECACHE=75 VMSTAT_DROP_PAGECACHE value
         * @property {number} VMSTAT_DROP_SLAB=76 VMSTAT_DROP_SLAB value
         * @property {number} VMSTAT_PGMIGRATE_SUCCESS=77 VMSTAT_PGMIGRATE_SUCCESS value
         * @property {number} VMSTAT_PGMIGRATE_FAIL=78 VMSTAT_PGMIGRATE_FAIL value
         * @property {number} VMSTAT_COMPACT_MIGRATE_SCANNED=79 VMSTAT_COMPACT_MIGRATE_SCANNED value
         * @property {number} VMSTAT_COMPACT_FREE_SCANNED=80 VMSTAT_COMPACT_FREE_SCANNED value
         * @property {number} VMSTAT_COMPACT_ISOLATED=81 VMSTAT_COMPACT_ISOLATED value
         * @property {number} VMSTAT_COMPACT_STALL=82 VMSTAT_COMPACT_STALL value
         * @property {number} VMSTAT_COMPACT_FAIL=83 VMSTAT_COMPACT_FAIL value
         * @property {number} VMSTAT_COMPACT_SUCCESS=84 VMSTAT_COMPACT_SUCCESS value
         * @property {number} VMSTAT_COMPACT_DAEMON_WAKE=85 VMSTAT_COMPACT_DAEMON_WAKE value
         * @property {number} VMSTAT_UNEVICTABLE_PGS_CULLED=86 VMSTAT_UNEVICTABLE_PGS_CULLED value
         * @property {number} VMSTAT_UNEVICTABLE_PGS_SCANNED=87 VMSTAT_UNEVICTABLE_PGS_SCANNED value
         * @property {number} VMSTAT_UNEVICTABLE_PGS_RESCUED=88 VMSTAT_UNEVICTABLE_PGS_RESCUED value
         * @property {number} VMSTAT_UNEVICTABLE_PGS_MLOCKED=89 VMSTAT_UNEVICTABLE_PGS_MLOCKED value
         * @property {number} VMSTAT_UNEVICTABLE_PGS_MUNLOCKED=90 VMSTAT_UNEVICTABLE_PGS_MUNLOCKED value
         * @property {number} VMSTAT_UNEVICTABLE_PGS_CLEARED=91 VMSTAT_UNEVICTABLE_PGS_CLEARED value
         * @property {number} VMSTAT_UNEVICTABLE_PGS_STRANDED=92 VMSTAT_UNEVICTABLE_PGS_STRANDED value
         * @property {number} VMSTAT_NR_ZSPAGES=93 VMSTAT_NR_ZSPAGES value
         * @property {number} VMSTAT_NR_ION_HEAP=94 VMSTAT_NR_ION_HEAP value
         * @property {number} VMSTAT_NR_GPU_HEAP=95 VMSTAT_NR_GPU_HEAP value
         * @property {number} VMSTAT_ALLOCSTALL_DMA=96 VMSTAT_ALLOCSTALL_DMA value
         * @property {number} VMSTAT_ALLOCSTALL_MOVABLE=97 VMSTAT_ALLOCSTALL_MOVABLE value
         * @property {number} VMSTAT_ALLOCSTALL_NORMAL=98 VMSTAT_ALLOCSTALL_NORMAL value
         * @property {number} VMSTAT_COMPACT_DAEMON_FREE_SCANNED=99 VMSTAT_COMPACT_DAEMON_FREE_SCANNED value
         * @property {number} VMSTAT_COMPACT_DAEMON_MIGRATE_SCANNED=100 VMSTAT_COMPACT_DAEMON_MIGRATE_SCANNED value
         * @property {number} VMSTAT_NR_FASTRPC=101 VMSTAT_NR_FASTRPC value
         * @property {number} VMSTAT_NR_INDIRECTLY_RECLAIMABLE=102 VMSTAT_NR_INDIRECTLY_RECLAIMABLE value
         * @property {number} VMSTAT_NR_ION_HEAP_POOL=103 VMSTAT_NR_ION_HEAP_POOL value
         * @property {number} VMSTAT_NR_KERNEL_MISC_RECLAIMABLE=104 VMSTAT_NR_KERNEL_MISC_RECLAIMABLE value
         * @property {number} VMSTAT_NR_SHADOW_CALL_STACK_BYTES=105 VMSTAT_NR_SHADOW_CALL_STACK_BYTES value
         * @property {number} VMSTAT_NR_SHMEM_HUGEPAGES=106 VMSTAT_NR_SHMEM_HUGEPAGES value
         * @property {number} VMSTAT_NR_SHMEM_PMDMAPPED=107 VMSTAT_NR_SHMEM_PMDMAPPED value
         * @property {number} VMSTAT_NR_UNRECLAIMABLE_PAGES=108 VMSTAT_NR_UNRECLAIMABLE_PAGES value
         * @property {number} VMSTAT_NR_ZONE_ACTIVE_ANON=109 VMSTAT_NR_ZONE_ACTIVE_ANON value
         * @property {number} VMSTAT_NR_ZONE_ACTIVE_FILE=110 VMSTAT_NR_ZONE_ACTIVE_FILE value
         * @property {number} VMSTAT_NR_ZONE_INACTIVE_ANON=111 VMSTAT_NR_ZONE_INACTIVE_ANON value
         * @property {number} VMSTAT_NR_ZONE_INACTIVE_FILE=112 VMSTAT_NR_ZONE_INACTIVE_FILE value
         * @property {number} VMSTAT_NR_ZONE_UNEVICTABLE=113 VMSTAT_NR_ZONE_UNEVICTABLE value
         * @property {number} VMSTAT_NR_ZONE_WRITE_PENDING=114 VMSTAT_NR_ZONE_WRITE_PENDING value
         * @property {number} VMSTAT_OOM_KILL=115 VMSTAT_OOM_KILL value
         * @property {number} VMSTAT_PGLAZYFREE=116 VMSTAT_PGLAZYFREE value
         * @property {number} VMSTAT_PGLAZYFREED=117 VMSTAT_PGLAZYFREED value
         * @property {number} VMSTAT_PGREFILL=118 VMSTAT_PGREFILL value
         * @property {number} VMSTAT_PGSCAN_DIRECT=119 VMSTAT_PGSCAN_DIRECT value
         * @property {number} VMSTAT_PGSCAN_KSWAPD=120 VMSTAT_PGSCAN_KSWAPD value
         * @property {number} VMSTAT_PGSKIP_DMA=121 VMSTAT_PGSKIP_DMA value
         * @property {number} VMSTAT_PGSKIP_MOVABLE=122 VMSTAT_PGSKIP_MOVABLE value
         * @property {number} VMSTAT_PGSKIP_NORMAL=123 VMSTAT_PGSKIP_NORMAL value
         * @property {number} VMSTAT_PGSTEAL_DIRECT=124 VMSTAT_PGSTEAL_DIRECT value
         * @property {number} VMSTAT_PGSTEAL_KSWAPD=125 VMSTAT_PGSTEAL_KSWAPD value
         * @property {number} VMSTAT_SWAP_RA=126 VMSTAT_SWAP_RA value
         * @property {number} VMSTAT_SWAP_RA_HIT=127 VMSTAT_SWAP_RA_HIT value
         * @property {number} VMSTAT_WORKINGSET_RESTORE=128 VMSTAT_WORKINGSET_RESTORE value
         */
        protos.VmstatCounters = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "VMSTAT_UNSPECIFIED"] = 0;
            values[valuesById[1] = "VMSTAT_NR_FREE_PAGES"] = 1;
            values[valuesById[2] = "VMSTAT_NR_ALLOC_BATCH"] = 2;
            values[valuesById[3] = "VMSTAT_NR_INACTIVE_ANON"] = 3;
            values[valuesById[4] = "VMSTAT_NR_ACTIVE_ANON"] = 4;
            values[valuesById[5] = "VMSTAT_NR_INACTIVE_FILE"] = 5;
            values[valuesById[6] = "VMSTAT_NR_ACTIVE_FILE"] = 6;
            values[valuesById[7] = "VMSTAT_NR_UNEVICTABLE"] = 7;
            values[valuesById[8] = "VMSTAT_NR_MLOCK"] = 8;
            values[valuesById[9] = "VMSTAT_NR_ANON_PAGES"] = 9;
            values[valuesById[10] = "VMSTAT_NR_MAPPED"] = 10;
            values[valuesById[11] = "VMSTAT_NR_FILE_PAGES"] = 11;
            values[valuesById[12] = "VMSTAT_NR_DIRTY"] = 12;
            values[valuesById[13] = "VMSTAT_NR_WRITEBACK"] = 13;
            values[valuesById[14] = "VMSTAT_NR_SLAB_RECLAIMABLE"] = 14;
            values[valuesById[15] = "VMSTAT_NR_SLAB_UNRECLAIMABLE"] = 15;
            values[valuesById[16] = "VMSTAT_NR_PAGE_TABLE_PAGES"] = 16;
            values[valuesById[17] = "VMSTAT_NR_KERNEL_STACK"] = 17;
            values[valuesById[18] = "VMSTAT_NR_OVERHEAD"] = 18;
            values[valuesById[19] = "VMSTAT_NR_UNSTABLE"] = 19;
            values[valuesById[20] = "VMSTAT_NR_BOUNCE"] = 20;
            values[valuesById[21] = "VMSTAT_NR_VMSCAN_WRITE"] = 21;
            values[valuesById[22] = "VMSTAT_NR_VMSCAN_IMMEDIATE_RECLAIM"] = 22;
            values[valuesById[23] = "VMSTAT_NR_WRITEBACK_TEMP"] = 23;
            values[valuesById[24] = "VMSTAT_NR_ISOLATED_ANON"] = 24;
            values[valuesById[25] = "VMSTAT_NR_ISOLATED_FILE"] = 25;
            values[valuesById[26] = "VMSTAT_NR_SHMEM"] = 26;
            values[valuesById[27] = "VMSTAT_NR_DIRTIED"] = 27;
            values[valuesById[28] = "VMSTAT_NR_WRITTEN"] = 28;
            values[valuesById[29] = "VMSTAT_NR_PAGES_SCANNED"] = 29;
            values[valuesById[30] = "VMSTAT_WORKINGSET_REFAULT"] = 30;
            values[valuesById[31] = "VMSTAT_WORKINGSET_ACTIVATE"] = 31;
            values[valuesById[32] = "VMSTAT_WORKINGSET_NODERECLAIM"] = 32;
            values[valuesById[33] = "VMSTAT_NR_ANON_TRANSPARENT_HUGEPAGES"] = 33;
            values[valuesById[34] = "VMSTAT_NR_FREE_CMA"] = 34;
            values[valuesById[35] = "VMSTAT_NR_SWAPCACHE"] = 35;
            values[valuesById[36] = "VMSTAT_NR_DIRTY_THRESHOLD"] = 36;
            values[valuesById[37] = "VMSTAT_NR_DIRTY_BACKGROUND_THRESHOLD"] = 37;
            values[valuesById[38] = "VMSTAT_PGPGIN"] = 38;
            values[valuesById[39] = "VMSTAT_PGPGOUT"] = 39;
            values[valuesById[40] = "VMSTAT_PGPGOUTCLEAN"] = 40;
            values[valuesById[41] = "VMSTAT_PSWPIN"] = 41;
            values[valuesById[42] = "VMSTAT_PSWPOUT"] = 42;
            values[valuesById[43] = "VMSTAT_PGALLOC_DMA"] = 43;
            values[valuesById[44] = "VMSTAT_PGALLOC_NORMAL"] = 44;
            values[valuesById[45] = "VMSTAT_PGALLOC_MOVABLE"] = 45;
            values[valuesById[46] = "VMSTAT_PGFREE"] = 46;
            values[valuesById[47] = "VMSTAT_PGACTIVATE"] = 47;
            values[valuesById[48] = "VMSTAT_PGDEACTIVATE"] = 48;
            values[valuesById[49] = "VMSTAT_PGFAULT"] = 49;
            values[valuesById[50] = "VMSTAT_PGMAJFAULT"] = 50;
            values[valuesById[51] = "VMSTAT_PGREFILL_DMA"] = 51;
            values[valuesById[52] = "VMSTAT_PGREFILL_NORMAL"] = 52;
            values[valuesById[53] = "VMSTAT_PGREFILL_MOVABLE"] = 53;
            values[valuesById[54] = "VMSTAT_PGSTEAL_KSWAPD_DMA"] = 54;
            values[valuesById[55] = "VMSTAT_PGSTEAL_KSWAPD_NORMAL"] = 55;
            values[valuesById[56] = "VMSTAT_PGSTEAL_KSWAPD_MOVABLE"] = 56;
            values[valuesById[57] = "VMSTAT_PGSTEAL_DIRECT_DMA"] = 57;
            values[valuesById[58] = "VMSTAT_PGSTEAL_DIRECT_NORMAL"] = 58;
            values[valuesById[59] = "VMSTAT_PGSTEAL_DIRECT_MOVABLE"] = 59;
            values[valuesById[60] = "VMSTAT_PGSCAN_KSWAPD_DMA"] = 60;
            values[valuesById[61] = "VMSTAT_PGSCAN_KSWAPD_NORMAL"] = 61;
            values[valuesById[62] = "VMSTAT_PGSCAN_KSWAPD_MOVABLE"] = 62;
            values[valuesById[63] = "VMSTAT_PGSCAN_DIRECT_DMA"] = 63;
            values[valuesById[64] = "VMSTAT_PGSCAN_DIRECT_NORMAL"] = 64;
            values[valuesById[65] = "VMSTAT_PGSCAN_DIRECT_MOVABLE"] = 65;
            values[valuesById[66] = "VMSTAT_PGSCAN_DIRECT_THROTTLE"] = 66;
            values[valuesById[67] = "VMSTAT_PGINODESTEAL"] = 67;
            values[valuesById[68] = "VMSTAT_SLABS_SCANNED"] = 68;
            values[valuesById[69] = "VMSTAT_KSWAPD_INODESTEAL"] = 69;
            values[valuesById[70] = "VMSTAT_KSWAPD_LOW_WMARK_HIT_QUICKLY"] = 70;
            values[valuesById[71] = "VMSTAT_KSWAPD_HIGH_WMARK_HIT_QUICKLY"] = 71;
            values[valuesById[72] = "VMSTAT_PAGEOUTRUN"] = 72;
            values[valuesById[73] = "VMSTAT_ALLOCSTALL"] = 73;
            values[valuesById[74] = "VMSTAT_PGROTATED"] = 74;
            values[valuesById[75] = "VMSTAT_DROP_PAGECACHE"] = 75;
            values[valuesById[76] = "VMSTAT_DROP_SLAB"] = 76;
            values[valuesById[77] = "VMSTAT_PGMIGRATE_SUCCESS"] = 77;
            values[valuesById[78] = "VMSTAT_PGMIGRATE_FAIL"] = 78;
            values[valuesById[79] = "VMSTAT_COMPACT_MIGRATE_SCANNED"] = 79;
            values[valuesById[80] = "VMSTAT_COMPACT_FREE_SCANNED"] = 80;
            values[valuesById[81] = "VMSTAT_COMPACT_ISOLATED"] = 81;
            values[valuesById[82] = "VMSTAT_COMPACT_STALL"] = 82;
            values[valuesById[83] = "VMSTAT_COMPACT_FAIL"] = 83;
            values[valuesById[84] = "VMSTAT_COMPACT_SUCCESS"] = 84;
            values[valuesById[85] = "VMSTAT_COMPACT_DAEMON_WAKE"] = 85;
            values[valuesById[86] = "VMSTAT_UNEVICTABLE_PGS_CULLED"] = 86;
            values[valuesById[87] = "VMSTAT_UNEVICTABLE_PGS_SCANNED"] = 87;
            values[valuesById[88] = "VMSTAT_UNEVICTABLE_PGS_RESCUED"] = 88;
            values[valuesById[89] = "VMSTAT_UNEVICTABLE_PGS_MLOCKED"] = 89;
            values[valuesById[90] = "VMSTAT_UNEVICTABLE_PGS_MUNLOCKED"] = 90;
            values[valuesById[91] = "VMSTAT_UNEVICTABLE_PGS_CLEARED"] = 91;
            values[valuesById[92] = "VMSTAT_UNEVICTABLE_PGS_STRANDED"] = 92;
            values[valuesById[93] = "VMSTAT_NR_ZSPAGES"] = 93;
            values[valuesById[94] = "VMSTAT_NR_ION_HEAP"] = 94;
            values[valuesById[95] = "VMSTAT_NR_GPU_HEAP"] = 95;
            values[valuesById[96] = "VMSTAT_ALLOCSTALL_DMA"] = 96;
            values[valuesById[97] = "VMSTAT_ALLOCSTALL_MOVABLE"] = 97;
            values[valuesById[98] = "VMSTAT_ALLOCSTALL_NORMAL"] = 98;
            values[valuesById[99] = "VMSTAT_COMPACT_DAEMON_FREE_SCANNED"] = 99;
            values[valuesById[100] = "VMSTAT_COMPACT_DAEMON_MIGRATE_SCANNED"] = 100;
            values[valuesById[101] = "VMSTAT_NR_FASTRPC"] = 101;
            values[valuesById[102] = "VMSTAT_NR_INDIRECTLY_RECLAIMABLE"] = 102;
            values[valuesById[103] = "VMSTAT_NR_ION_HEAP_POOL"] = 103;
            values[valuesById[104] = "VMSTAT_NR_KERNEL_MISC_RECLAIMABLE"] = 104;
            values[valuesById[105] = "VMSTAT_NR_SHADOW_CALL_STACK_BYTES"] = 105;
            values[valuesById[106] = "VMSTAT_NR_SHMEM_HUGEPAGES"] = 106;
            values[valuesById[107] = "VMSTAT_NR_SHMEM_PMDMAPPED"] = 107;
            values[valuesById[108] = "VMSTAT_NR_UNRECLAIMABLE_PAGES"] = 108;
            values[valuesById[109] = "VMSTAT_NR_ZONE_ACTIVE_ANON"] = 109;
            values[valuesById[110] = "VMSTAT_NR_ZONE_ACTIVE_FILE"] = 110;
            values[valuesById[111] = "VMSTAT_NR_ZONE_INACTIVE_ANON"] = 111;
            values[valuesById[112] = "VMSTAT_NR_ZONE_INACTIVE_FILE"] = 112;
            values[valuesById[113] = "VMSTAT_NR_ZONE_UNEVICTABLE"] = 113;
            values[valuesById[114] = "VMSTAT_NR_ZONE_WRITE_PENDING"] = 114;
            values[valuesById[115] = "VMSTAT_OOM_KILL"] = 115;
            values[valuesById[116] = "VMSTAT_PGLAZYFREE"] = 116;
            values[valuesById[117] = "VMSTAT_PGLAZYFREED"] = 117;
            values[valuesById[118] = "VMSTAT_PGREFILL"] = 118;
            values[valuesById[119] = "VMSTAT_PGSCAN_DIRECT"] = 119;
            values[valuesById[120] = "VMSTAT_PGSCAN_KSWAPD"] = 120;
            values[valuesById[121] = "VMSTAT_PGSKIP_DMA"] = 121;
            values[valuesById[122] = "VMSTAT_PGSKIP_MOVABLE"] = 122;
            values[valuesById[123] = "VMSTAT_PGSKIP_NORMAL"] = 123;
            values[valuesById[124] = "VMSTAT_PGSTEAL_DIRECT"] = 124;
            values[valuesById[125] = "VMSTAT_PGSTEAL_KSWAPD"] = 125;
            values[valuesById[126] = "VMSTAT_SWAP_RA"] = 126;
            values[valuesById[127] = "VMSTAT_SWAP_RA_HIT"] = 127;
            values[valuesById[128] = "VMSTAT_WORKINGSET_RESTORE"] = 128;
            return values;
        })();

        protos.SysStatsConfig = (function() {

            /**
             * Properties of a SysStatsConfig.
             * @memberof perfetto.protos
             * @interface ISysStatsConfig
             * @property {number|null} [meminfoPeriodMs] SysStatsConfig meminfoPeriodMs
             * @property {Array.<perfetto.protos.MeminfoCounters>|null} [meminfoCounters] SysStatsConfig meminfoCounters
             * @property {number|null} [vmstatPeriodMs] SysStatsConfig vmstatPeriodMs
             * @property {Array.<perfetto.protos.VmstatCounters>|null} [vmstatCounters] SysStatsConfig vmstatCounters
             * @property {number|null} [statPeriodMs] SysStatsConfig statPeriodMs
             * @property {Array.<perfetto.protos.SysStatsConfig.StatCounters>|null} [statCounters] SysStatsConfig statCounters
             * @property {number|null} [devfreqPeriodMs] SysStatsConfig devfreqPeriodMs
             * @property {number|null} [cpufreqPeriodMs] SysStatsConfig cpufreqPeriodMs
             * @property {number|null} [buddyinfoPeriodMs] SysStatsConfig buddyinfoPeriodMs
             * @property {number|null} [diskstatPeriodMs] SysStatsConfig diskstatPeriodMs
             */

            /**
             * Constructs a new SysStatsConfig.
             * @memberof perfetto.protos
             * @classdesc Represents a SysStatsConfig.
             * @implements ISysStatsConfig
             * @constructor
             * @param {perfetto.protos.ISysStatsConfig=} [p] Properties to set
             */
            function SysStatsConfig(p) {
                this.meminfoCounters = [];
                this.vmstatCounters = [];
                this.statCounters = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SysStatsConfig meminfoPeriodMs.
             * @member {number} meminfoPeriodMs
             * @memberof perfetto.protos.SysStatsConfig
             * @instance
             */
            SysStatsConfig.prototype.meminfoPeriodMs = 0;

            /**
             * SysStatsConfig meminfoCounters.
             * @member {Array.<perfetto.protos.MeminfoCounters>} meminfoCounters
             * @memberof perfetto.protos.SysStatsConfig
             * @instance
             */
            SysStatsConfig.prototype.meminfoCounters = $util.emptyArray;

            /**
             * SysStatsConfig vmstatPeriodMs.
             * @member {number} vmstatPeriodMs
             * @memberof perfetto.protos.SysStatsConfig
             * @instance
             */
            SysStatsConfig.prototype.vmstatPeriodMs = 0;

            /**
             * SysStatsConfig vmstatCounters.
             * @member {Array.<perfetto.protos.VmstatCounters>} vmstatCounters
             * @memberof perfetto.protos.SysStatsConfig
             * @instance
             */
            SysStatsConfig.prototype.vmstatCounters = $util.emptyArray;

            /**
             * SysStatsConfig statPeriodMs.
             * @member {number} statPeriodMs
             * @memberof perfetto.protos.SysStatsConfig
             * @instance
             */
            SysStatsConfig.prototype.statPeriodMs = 0;

            /**
             * SysStatsConfig statCounters.
             * @member {Array.<perfetto.protos.SysStatsConfig.StatCounters>} statCounters
             * @memberof perfetto.protos.SysStatsConfig
             * @instance
             */
            SysStatsConfig.prototype.statCounters = $util.emptyArray;

            /**
             * SysStatsConfig devfreqPeriodMs.
             * @member {number} devfreqPeriodMs
             * @memberof perfetto.protos.SysStatsConfig
             * @instance
             */
            SysStatsConfig.prototype.devfreqPeriodMs = 0;

            /**
             * SysStatsConfig cpufreqPeriodMs.
             * @member {number} cpufreqPeriodMs
             * @memberof perfetto.protos.SysStatsConfig
             * @instance
             */
            SysStatsConfig.prototype.cpufreqPeriodMs = 0;

            /**
             * SysStatsConfig buddyinfoPeriodMs.
             * @member {number} buddyinfoPeriodMs
             * @memberof perfetto.protos.SysStatsConfig
             * @instance
             */
            SysStatsConfig.prototype.buddyinfoPeriodMs = 0;

            /**
             * SysStatsConfig diskstatPeriodMs.
             * @member {number} diskstatPeriodMs
             * @memberof perfetto.protos.SysStatsConfig
             * @instance
             */
            SysStatsConfig.prototype.diskstatPeriodMs = 0;

            /**
             * Creates a new SysStatsConfig instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SysStatsConfig
             * @static
             * @param {perfetto.protos.ISysStatsConfig=} [properties] Properties to set
             * @returns {perfetto.protos.SysStatsConfig} SysStatsConfig instance
             */
            SysStatsConfig.create = function create(properties) {
                return new SysStatsConfig(properties);
            };

            /**
             * Encodes the specified SysStatsConfig message. Does not implicitly {@link perfetto.protos.SysStatsConfig.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SysStatsConfig
             * @static
             * @param {perfetto.protos.ISysStatsConfig} m SysStatsConfig message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SysStatsConfig.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.meminfoPeriodMs != null && Object.hasOwnProperty.call(m, "meminfoPeriodMs"))
                    w.uint32(8).uint32(m.meminfoPeriodMs);
                if (m.meminfoCounters != null && m.meminfoCounters.length) {
                    for (var i = 0; i < m.meminfoCounters.length; ++i)
                        w.uint32(16).int32(m.meminfoCounters[i]);
                }
                if (m.vmstatPeriodMs != null && Object.hasOwnProperty.call(m, "vmstatPeriodMs"))
                    w.uint32(24).uint32(m.vmstatPeriodMs);
                if (m.vmstatCounters != null && m.vmstatCounters.length) {
                    for (var i = 0; i < m.vmstatCounters.length; ++i)
                        w.uint32(32).int32(m.vmstatCounters[i]);
                }
                if (m.statPeriodMs != null && Object.hasOwnProperty.call(m, "statPeriodMs"))
                    w.uint32(40).uint32(m.statPeriodMs);
                if (m.statCounters != null && m.statCounters.length) {
                    for (var i = 0; i < m.statCounters.length; ++i)
                        w.uint32(48).int32(m.statCounters[i]);
                }
                if (m.devfreqPeriodMs != null && Object.hasOwnProperty.call(m, "devfreqPeriodMs"))
                    w.uint32(56).uint32(m.devfreqPeriodMs);
                if (m.cpufreqPeriodMs != null && Object.hasOwnProperty.call(m, "cpufreqPeriodMs"))
                    w.uint32(64).uint32(m.cpufreqPeriodMs);
                if (m.buddyinfoPeriodMs != null && Object.hasOwnProperty.call(m, "buddyinfoPeriodMs"))
                    w.uint32(72).uint32(m.buddyinfoPeriodMs);
                if (m.diskstatPeriodMs != null && Object.hasOwnProperty.call(m, "diskstatPeriodMs"))
                    w.uint32(80).uint32(m.diskstatPeriodMs);
                return w;
            };

            /**
             * Encodes the specified SysStatsConfig message, length delimited. Does not implicitly {@link perfetto.protos.SysStatsConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SysStatsConfig
             * @static
             * @param {perfetto.protos.ISysStatsConfig} message SysStatsConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SysStatsConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SysStatsConfig message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SysStatsConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SysStatsConfig} SysStatsConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SysStatsConfig.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SysStatsConfig();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.meminfoPeriodMs = r.uint32();
                        break;
                    case 2:
                        if (!(m.meminfoCounters && m.meminfoCounters.length))
                            m.meminfoCounters = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.meminfoCounters.push(r.int32());
                        } else
                            m.meminfoCounters.push(r.int32());
                        break;
                    case 3:
                        m.vmstatPeriodMs = r.uint32();
                        break;
                    case 4:
                        if (!(m.vmstatCounters && m.vmstatCounters.length))
                            m.vmstatCounters = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.vmstatCounters.push(r.int32());
                        } else
                            m.vmstatCounters.push(r.int32());
                        break;
                    case 5:
                        m.statPeriodMs = r.uint32();
                        break;
                    case 6:
                        if (!(m.statCounters && m.statCounters.length))
                            m.statCounters = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.statCounters.push(r.int32());
                        } else
                            m.statCounters.push(r.int32());
                        break;
                    case 7:
                        m.devfreqPeriodMs = r.uint32();
                        break;
                    case 8:
                        m.cpufreqPeriodMs = r.uint32();
                        break;
                    case 9:
                        m.buddyinfoPeriodMs = r.uint32();
                        break;
                    case 10:
                        m.diskstatPeriodMs = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SysStatsConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SysStatsConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SysStatsConfig} SysStatsConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SysStatsConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SysStatsConfig message.
             * @function verify
             * @memberof perfetto.protos.SysStatsConfig
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SysStatsConfig.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.meminfoPeriodMs != null && m.hasOwnProperty("meminfoPeriodMs")) {
                    if (!$util.isInteger(m.meminfoPeriodMs))
                        return "meminfoPeriodMs: integer expected";
                }
                if (m.meminfoCounters != null && m.hasOwnProperty("meminfoCounters")) {
                    if (!Array.isArray(m.meminfoCounters))
                        return "meminfoCounters: array expected";
                    for (var i = 0; i < m.meminfoCounters.length; ++i) {
                        switch (m.meminfoCounters[i]) {
                        default:
                            return "meminfoCounters: enum value[] expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                        case 6:
                        case 7:
                        case 8:
                        case 9:
                        case 10:
                        case 11:
                        case 12:
                        case 13:
                        case 14:
                        case 15:
                        case 16:
                        case 17:
                        case 18:
                        case 19:
                        case 20:
                        case 21:
                        case 22:
                        case 23:
                        case 24:
                        case 25:
                        case 26:
                        case 27:
                        case 28:
                        case 29:
                        case 30:
                        case 31:
                        case 32:
                        case 33:
                            break;
                        }
                    }
                }
                if (m.vmstatPeriodMs != null && m.hasOwnProperty("vmstatPeriodMs")) {
                    if (!$util.isInteger(m.vmstatPeriodMs))
                        return "vmstatPeriodMs: integer expected";
                }
                if (m.vmstatCounters != null && m.hasOwnProperty("vmstatCounters")) {
                    if (!Array.isArray(m.vmstatCounters))
                        return "vmstatCounters: array expected";
                    for (var i = 0; i < m.vmstatCounters.length; ++i) {
                        switch (m.vmstatCounters[i]) {
                        default:
                            return "vmstatCounters: enum value[] expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                        case 6:
                        case 7:
                        case 8:
                        case 9:
                        case 10:
                        case 11:
                        case 12:
                        case 13:
                        case 14:
                        case 15:
                        case 16:
                        case 17:
                        case 18:
                        case 19:
                        case 20:
                        case 21:
                        case 22:
                        case 23:
                        case 24:
                        case 25:
                        case 26:
                        case 27:
                        case 28:
                        case 29:
                        case 30:
                        case 31:
                        case 32:
                        case 33:
                        case 34:
                        case 35:
                        case 36:
                        case 37:
                        case 38:
                        case 39:
                        case 40:
                        case 41:
                        case 42:
                        case 43:
                        case 44:
                        case 45:
                        case 46:
                        case 47:
                        case 48:
                        case 49:
                        case 50:
                        case 51:
                        case 52:
                        case 53:
                        case 54:
                        case 55:
                        case 56:
                        case 57:
                        case 58:
                        case 59:
                        case 60:
                        case 61:
                        case 62:
                        case 63:
                        case 64:
                        case 65:
                        case 66:
                        case 67:
                        case 68:
                        case 69:
                        case 70:
                        case 71:
                        case 72:
                        case 73:
                        case 74:
                        case 75:
                        case 76:
                        case 77:
                        case 78:
                        case 79:
                        case 80:
                        case 81:
                        case 82:
                        case 83:
                        case 84:
                        case 85:
                        case 86:
                        case 87:
                        case 88:
                        case 89:
                        case 90:
                        case 91:
                        case 92:
                        case 93:
                        case 94:
                        case 95:
                        case 96:
                        case 97:
                        case 98:
                        case 99:
                        case 100:
                        case 101:
                        case 102:
                        case 103:
                        case 104:
                        case 105:
                        case 106:
                        case 107:
                        case 108:
                        case 109:
                        case 110:
                        case 111:
                        case 112:
                        case 113:
                        case 114:
                        case 115:
                        case 116:
                        case 117:
                        case 118:
                        case 119:
                        case 120:
                        case 121:
                        case 122:
                        case 123:
                        case 124:
                        case 125:
                        case 126:
                        case 127:
                        case 128:
                            break;
                        }
                    }
                }
                if (m.statPeriodMs != null && m.hasOwnProperty("statPeriodMs")) {
                    if (!$util.isInteger(m.statPeriodMs))
                        return "statPeriodMs: integer expected";
                }
                if (m.statCounters != null && m.hasOwnProperty("statCounters")) {
                    if (!Array.isArray(m.statCounters))
                        return "statCounters: array expected";
                    for (var i = 0; i < m.statCounters.length; ++i) {
                        switch (m.statCounters[i]) {
                        default:
                            return "statCounters: enum value[] expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                            break;
                        }
                    }
                }
                if (m.devfreqPeriodMs != null && m.hasOwnProperty("devfreqPeriodMs")) {
                    if (!$util.isInteger(m.devfreqPeriodMs))
                        return "devfreqPeriodMs: integer expected";
                }
                if (m.cpufreqPeriodMs != null && m.hasOwnProperty("cpufreqPeriodMs")) {
                    if (!$util.isInteger(m.cpufreqPeriodMs))
                        return "cpufreqPeriodMs: integer expected";
                }
                if (m.buddyinfoPeriodMs != null && m.hasOwnProperty("buddyinfoPeriodMs")) {
                    if (!$util.isInteger(m.buddyinfoPeriodMs))
                        return "buddyinfoPeriodMs: integer expected";
                }
                if (m.diskstatPeriodMs != null && m.hasOwnProperty("diskstatPeriodMs")) {
                    if (!$util.isInteger(m.diskstatPeriodMs))
                        return "diskstatPeriodMs: integer expected";
                }
                return null;
            };

            /**
             * Creates a SysStatsConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SysStatsConfig
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SysStatsConfig} SysStatsConfig
             */
            SysStatsConfig.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SysStatsConfig)
                    return d;
                var m = new $root.perfetto.protos.SysStatsConfig();
                if (d.meminfoPeriodMs != null) {
                    m.meminfoPeriodMs = d.meminfoPeriodMs >>> 0;
                }
                if (d.meminfoCounters) {
                    if (!Array.isArray(d.meminfoCounters))
                        throw TypeError(".perfetto.protos.SysStatsConfig.meminfoCounters: array expected");
                    m.meminfoCounters = [];
                    for (var i = 0; i < d.meminfoCounters.length; ++i) {
                        switch (d.meminfoCounters[i]) {
                        default:
                        case "MEMINFO_UNSPECIFIED":
                        case 0:
                            m.meminfoCounters[i] = 0;
                            break;
                        case "MEMINFO_MEM_TOTAL":
                        case 1:
                            m.meminfoCounters[i] = 1;
                            break;
                        case "MEMINFO_MEM_FREE":
                        case 2:
                            m.meminfoCounters[i] = 2;
                            break;
                        case "MEMINFO_MEM_AVAILABLE":
                        case 3:
                            m.meminfoCounters[i] = 3;
                            break;
                        case "MEMINFO_BUFFERS":
                        case 4:
                            m.meminfoCounters[i] = 4;
                            break;
                        case "MEMINFO_CACHED":
                        case 5:
                            m.meminfoCounters[i] = 5;
                            break;
                        case "MEMINFO_SWAP_CACHED":
                        case 6:
                            m.meminfoCounters[i] = 6;
                            break;
                        case "MEMINFO_ACTIVE":
                        case 7:
                            m.meminfoCounters[i] = 7;
                            break;
                        case "MEMINFO_INACTIVE":
                        case 8:
                            m.meminfoCounters[i] = 8;
                            break;
                        case "MEMINFO_ACTIVE_ANON":
                        case 9:
                            m.meminfoCounters[i] = 9;
                            break;
                        case "MEMINFO_INACTIVE_ANON":
                        case 10:
                            m.meminfoCounters[i] = 10;
                            break;
                        case "MEMINFO_ACTIVE_FILE":
                        case 11:
                            m.meminfoCounters[i] = 11;
                            break;
                        case "MEMINFO_INACTIVE_FILE":
                        case 12:
                            m.meminfoCounters[i] = 12;
                            break;
                        case "MEMINFO_UNEVICTABLE":
                        case 13:
                            m.meminfoCounters[i] = 13;
                            break;
                        case "MEMINFO_MLOCKED":
                        case 14:
                            m.meminfoCounters[i] = 14;
                            break;
                        case "MEMINFO_SWAP_TOTAL":
                        case 15:
                            m.meminfoCounters[i] = 15;
                            break;
                        case "MEMINFO_SWAP_FREE":
                        case 16:
                            m.meminfoCounters[i] = 16;
                            break;
                        case "MEMINFO_DIRTY":
                        case 17:
                            m.meminfoCounters[i] = 17;
                            break;
                        case "MEMINFO_WRITEBACK":
                        case 18:
                            m.meminfoCounters[i] = 18;
                            break;
                        case "MEMINFO_ANON_PAGES":
                        case 19:
                            m.meminfoCounters[i] = 19;
                            break;
                        case "MEMINFO_MAPPED":
                        case 20:
                            m.meminfoCounters[i] = 20;
                            break;
                        case "MEMINFO_SHMEM":
                        case 21:
                            m.meminfoCounters[i] = 21;
                            break;
                        case "MEMINFO_SLAB":
                        case 22:
                            m.meminfoCounters[i] = 22;
                            break;
                        case "MEMINFO_SLAB_RECLAIMABLE":
                        case 23:
                            m.meminfoCounters[i] = 23;
                            break;
                        case "MEMINFO_SLAB_UNRECLAIMABLE":
                        case 24:
                            m.meminfoCounters[i] = 24;
                            break;
                        case "MEMINFO_KERNEL_STACK":
                        case 25:
                            m.meminfoCounters[i] = 25;
                            break;
                        case "MEMINFO_PAGE_TABLES":
                        case 26:
                            m.meminfoCounters[i] = 26;
                            break;
                        case "MEMINFO_COMMIT_LIMIT":
                        case 27:
                            m.meminfoCounters[i] = 27;
                            break;
                        case "MEMINFO_COMMITED_AS":
                        case 28:
                            m.meminfoCounters[i] = 28;
                            break;
                        case "MEMINFO_VMALLOC_TOTAL":
                        case 29:
                            m.meminfoCounters[i] = 29;
                            break;
                        case "MEMINFO_VMALLOC_USED":
                        case 30:
                            m.meminfoCounters[i] = 30;
                            break;
                        case "MEMINFO_VMALLOC_CHUNK":
                        case 31:
                            m.meminfoCounters[i] = 31;
                            break;
                        case "MEMINFO_CMA_TOTAL":
                        case 32:
                            m.meminfoCounters[i] = 32;
                            break;
                        case "MEMINFO_CMA_FREE":
                        case 33:
                            m.meminfoCounters[i] = 33;
                            break;
                        }
                    }
                }
                if (d.vmstatPeriodMs != null) {
                    m.vmstatPeriodMs = d.vmstatPeriodMs >>> 0;
                }
                if (d.vmstatCounters) {
                    if (!Array.isArray(d.vmstatCounters))
                        throw TypeError(".perfetto.protos.SysStatsConfig.vmstatCounters: array expected");
                    m.vmstatCounters = [];
                    for (var i = 0; i < d.vmstatCounters.length; ++i) {
                        switch (d.vmstatCounters[i]) {
                        default:
                        case "VMSTAT_UNSPECIFIED":
                        case 0:
                            m.vmstatCounters[i] = 0;
                            break;
                        case "VMSTAT_NR_FREE_PAGES":
                        case 1:
                            m.vmstatCounters[i] = 1;
                            break;
                        case "VMSTAT_NR_ALLOC_BATCH":
                        case 2:
                            m.vmstatCounters[i] = 2;
                            break;
                        case "VMSTAT_NR_INACTIVE_ANON":
                        case 3:
                            m.vmstatCounters[i] = 3;
                            break;
                        case "VMSTAT_NR_ACTIVE_ANON":
                        case 4:
                            m.vmstatCounters[i] = 4;
                            break;
                        case "VMSTAT_NR_INACTIVE_FILE":
                        case 5:
                            m.vmstatCounters[i] = 5;
                            break;
                        case "VMSTAT_NR_ACTIVE_FILE":
                        case 6:
                            m.vmstatCounters[i] = 6;
                            break;
                        case "VMSTAT_NR_UNEVICTABLE":
                        case 7:
                            m.vmstatCounters[i] = 7;
                            break;
                        case "VMSTAT_NR_MLOCK":
                        case 8:
                            m.vmstatCounters[i] = 8;
                            break;
                        case "VMSTAT_NR_ANON_PAGES":
                        case 9:
                            m.vmstatCounters[i] = 9;
                            break;
                        case "VMSTAT_NR_MAPPED":
                        case 10:
                            m.vmstatCounters[i] = 10;
                            break;
                        case "VMSTAT_NR_FILE_PAGES":
                        case 11:
                            m.vmstatCounters[i] = 11;
                            break;
                        case "VMSTAT_NR_DIRTY":
                        case 12:
                            m.vmstatCounters[i] = 12;
                            break;
                        case "VMSTAT_NR_WRITEBACK":
                        case 13:
                            m.vmstatCounters[i] = 13;
                            break;
                        case "VMSTAT_NR_SLAB_RECLAIMABLE":
                        case 14:
                            m.vmstatCounters[i] = 14;
                            break;
                        case "VMSTAT_NR_SLAB_UNRECLAIMABLE":
                        case 15:
                            m.vmstatCounters[i] = 15;
                            break;
                        case "VMSTAT_NR_PAGE_TABLE_PAGES":
                        case 16:
                            m.vmstatCounters[i] = 16;
                            break;
                        case "VMSTAT_NR_KERNEL_STACK":
                        case 17:
                            m.vmstatCounters[i] = 17;
                            break;
                        case "VMSTAT_NR_OVERHEAD":
                        case 18:
                            m.vmstatCounters[i] = 18;
                            break;
                        case "VMSTAT_NR_UNSTABLE":
                        case 19:
                            m.vmstatCounters[i] = 19;
                            break;
                        case "VMSTAT_NR_BOUNCE":
                        case 20:
                            m.vmstatCounters[i] = 20;
                            break;
                        case "VMSTAT_NR_VMSCAN_WRITE":
                        case 21:
                            m.vmstatCounters[i] = 21;
                            break;
                        case "VMSTAT_NR_VMSCAN_IMMEDIATE_RECLAIM":
                        case 22:
                            m.vmstatCounters[i] = 22;
                            break;
                        case "VMSTAT_NR_WRITEBACK_TEMP":
                        case 23:
                            m.vmstatCounters[i] = 23;
                            break;
                        case "VMSTAT_NR_ISOLATED_ANON":
                        case 24:
                            m.vmstatCounters[i] = 24;
                            break;
                        case "VMSTAT_NR_ISOLATED_FILE":
                        case 25:
                            m.vmstatCounters[i] = 25;
                            break;
                        case "VMSTAT_NR_SHMEM":
                        case 26:
                            m.vmstatCounters[i] = 26;
                            break;
                        case "VMSTAT_NR_DIRTIED":
                        case 27:
                            m.vmstatCounters[i] = 27;
                            break;
                        case "VMSTAT_NR_WRITTEN":
                        case 28:
                            m.vmstatCounters[i] = 28;
                            break;
                        case "VMSTAT_NR_PAGES_SCANNED":
                        case 29:
                            m.vmstatCounters[i] = 29;
                            break;
                        case "VMSTAT_WORKINGSET_REFAULT":
                        case 30:
                            m.vmstatCounters[i] = 30;
                            break;
                        case "VMSTAT_WORKINGSET_ACTIVATE":
                        case 31:
                            m.vmstatCounters[i] = 31;
                            break;
                        case "VMSTAT_WORKINGSET_NODERECLAIM":
                        case 32:
                            m.vmstatCounters[i] = 32;
                            break;
                        case "VMSTAT_NR_ANON_TRANSPARENT_HUGEPAGES":
                        case 33:
                            m.vmstatCounters[i] = 33;
                            break;
                        case "VMSTAT_NR_FREE_CMA":
                        case 34:
                            m.vmstatCounters[i] = 34;
                            break;
                        case "VMSTAT_NR_SWAPCACHE":
                        case 35:
                            m.vmstatCounters[i] = 35;
                            break;
                        case "VMSTAT_NR_DIRTY_THRESHOLD":
                        case 36:
                            m.vmstatCounters[i] = 36;
                            break;
                        case "VMSTAT_NR_DIRTY_BACKGROUND_THRESHOLD":
                        case 37:
                            m.vmstatCounters[i] = 37;
                            break;
                        case "VMSTAT_PGPGIN":
                        case 38:
                            m.vmstatCounters[i] = 38;
                            break;
                        case "VMSTAT_PGPGOUT":
                        case 39:
                            m.vmstatCounters[i] = 39;
                            break;
                        case "VMSTAT_PGPGOUTCLEAN":
                        case 40:
                            m.vmstatCounters[i] = 40;
                            break;
                        case "VMSTAT_PSWPIN":
                        case 41:
                            m.vmstatCounters[i] = 41;
                            break;
                        case "VMSTAT_PSWPOUT":
                        case 42:
                            m.vmstatCounters[i] = 42;
                            break;
                        case "VMSTAT_PGALLOC_DMA":
                        case 43:
                            m.vmstatCounters[i] = 43;
                            break;
                        case "VMSTAT_PGALLOC_NORMAL":
                        case 44:
                            m.vmstatCounters[i] = 44;
                            break;
                        case "VMSTAT_PGALLOC_MOVABLE":
                        case 45:
                            m.vmstatCounters[i] = 45;
                            break;
                        case "VMSTAT_PGFREE":
                        case 46:
                            m.vmstatCounters[i] = 46;
                            break;
                        case "VMSTAT_PGACTIVATE":
                        case 47:
                            m.vmstatCounters[i] = 47;
                            break;
                        case "VMSTAT_PGDEACTIVATE":
                        case 48:
                            m.vmstatCounters[i] = 48;
                            break;
                        case "VMSTAT_PGFAULT":
                        case 49:
                            m.vmstatCounters[i] = 49;
                            break;
                        case "VMSTAT_PGMAJFAULT":
                        case 50:
                            m.vmstatCounters[i] = 50;
                            break;
                        case "VMSTAT_PGREFILL_DMA":
                        case 51:
                            m.vmstatCounters[i] = 51;
                            break;
                        case "VMSTAT_PGREFILL_NORMAL":
                        case 52:
                            m.vmstatCounters[i] = 52;
                            break;
                        case "VMSTAT_PGREFILL_MOVABLE":
                        case 53:
                            m.vmstatCounters[i] = 53;
                            break;
                        case "VMSTAT_PGSTEAL_KSWAPD_DMA":
                        case 54:
                            m.vmstatCounters[i] = 54;
                            break;
                        case "VMSTAT_PGSTEAL_KSWAPD_NORMAL":
                        case 55:
                            m.vmstatCounters[i] = 55;
                            break;
                        case "VMSTAT_PGSTEAL_KSWAPD_MOVABLE":
                        case 56:
                            m.vmstatCounters[i] = 56;
                            break;
                        case "VMSTAT_PGSTEAL_DIRECT_DMA":
                        case 57:
                            m.vmstatCounters[i] = 57;
                            break;
                        case "VMSTAT_PGSTEAL_DIRECT_NORMAL":
                        case 58:
                            m.vmstatCounters[i] = 58;
                            break;
                        case "VMSTAT_PGSTEAL_DIRECT_MOVABLE":
                        case 59:
                            m.vmstatCounters[i] = 59;
                            break;
                        case "VMSTAT_PGSCAN_KSWAPD_DMA":
                        case 60:
                            m.vmstatCounters[i] = 60;
                            break;
                        case "VMSTAT_PGSCAN_KSWAPD_NORMAL":
                        case 61:
                            m.vmstatCounters[i] = 61;
                            break;
                        case "VMSTAT_PGSCAN_KSWAPD_MOVABLE":
                        case 62:
                            m.vmstatCounters[i] = 62;
                            break;
                        case "VMSTAT_PGSCAN_DIRECT_DMA":
                        case 63:
                            m.vmstatCounters[i] = 63;
                            break;
                        case "VMSTAT_PGSCAN_DIRECT_NORMAL":
                        case 64:
                            m.vmstatCounters[i] = 64;
                            break;
                        case "VMSTAT_PGSCAN_DIRECT_MOVABLE":
                        case 65:
                            m.vmstatCounters[i] = 65;
                            break;
                        case "VMSTAT_PGSCAN_DIRECT_THROTTLE":
                        case 66:
                            m.vmstatCounters[i] = 66;
                            break;
                        case "VMSTAT_PGINODESTEAL":
                        case 67:
                            m.vmstatCounters[i] = 67;
                            break;
                        case "VMSTAT_SLABS_SCANNED":
                        case 68:
                            m.vmstatCounters[i] = 68;
                            break;
                        case "VMSTAT_KSWAPD_INODESTEAL":
                        case 69:
                            m.vmstatCounters[i] = 69;
                            break;
                        case "VMSTAT_KSWAPD_LOW_WMARK_HIT_QUICKLY":
                        case 70:
                            m.vmstatCounters[i] = 70;
                            break;
                        case "VMSTAT_KSWAPD_HIGH_WMARK_HIT_QUICKLY":
                        case 71:
                            m.vmstatCounters[i] = 71;
                            break;
                        case "VMSTAT_PAGEOUTRUN":
                        case 72:
                            m.vmstatCounters[i] = 72;
                            break;
                        case "VMSTAT_ALLOCSTALL":
                        case 73:
                            m.vmstatCounters[i] = 73;
                            break;
                        case "VMSTAT_PGROTATED":
                        case 74:
                            m.vmstatCounters[i] = 74;
                            break;
                        case "VMSTAT_DROP_PAGECACHE":
                        case 75:
                            m.vmstatCounters[i] = 75;
                            break;
                        case "VMSTAT_DROP_SLAB":
                        case 76:
                            m.vmstatCounters[i] = 76;
                            break;
                        case "VMSTAT_PGMIGRATE_SUCCESS":
                        case 77:
                            m.vmstatCounters[i] = 77;
                            break;
                        case "VMSTAT_PGMIGRATE_FAIL":
                        case 78:
                            m.vmstatCounters[i] = 78;
                            break;
                        case "VMSTAT_COMPACT_MIGRATE_SCANNED":
                        case 79:
                            m.vmstatCounters[i] = 79;
                            break;
                        case "VMSTAT_COMPACT_FREE_SCANNED":
                        case 80:
                            m.vmstatCounters[i] = 80;
                            break;
                        case "VMSTAT_COMPACT_ISOLATED":
                        case 81:
                            m.vmstatCounters[i] = 81;
                            break;
                        case "VMSTAT_COMPACT_STALL":
                        case 82:
                            m.vmstatCounters[i] = 82;
                            break;
                        case "VMSTAT_COMPACT_FAIL":
                        case 83:
                            m.vmstatCounters[i] = 83;
                            break;
                        case "VMSTAT_COMPACT_SUCCESS":
                        case 84:
                            m.vmstatCounters[i] = 84;
                            break;
                        case "VMSTAT_COMPACT_DAEMON_WAKE":
                        case 85:
                            m.vmstatCounters[i] = 85;
                            break;
                        case "VMSTAT_UNEVICTABLE_PGS_CULLED":
                        case 86:
                            m.vmstatCounters[i] = 86;
                            break;
                        case "VMSTAT_UNEVICTABLE_PGS_SCANNED":
                        case 87:
                            m.vmstatCounters[i] = 87;
                            break;
                        case "VMSTAT_UNEVICTABLE_PGS_RESCUED":
                        case 88:
                            m.vmstatCounters[i] = 88;
                            break;
                        case "VMSTAT_UNEVICTABLE_PGS_MLOCKED":
                        case 89:
                            m.vmstatCounters[i] = 89;
                            break;
                        case "VMSTAT_UNEVICTABLE_PGS_MUNLOCKED":
                        case 90:
                            m.vmstatCounters[i] = 90;
                            break;
                        case "VMSTAT_UNEVICTABLE_PGS_CLEARED":
                        case 91:
                            m.vmstatCounters[i] = 91;
                            break;
                        case "VMSTAT_UNEVICTABLE_PGS_STRANDED":
                        case 92:
                            m.vmstatCounters[i] = 92;
                            break;
                        case "VMSTAT_NR_ZSPAGES":
                        case 93:
                            m.vmstatCounters[i] = 93;
                            break;
                        case "VMSTAT_NR_ION_HEAP":
                        case 94:
                            m.vmstatCounters[i] = 94;
                            break;
                        case "VMSTAT_NR_GPU_HEAP":
                        case 95:
                            m.vmstatCounters[i] = 95;
                            break;
                        case "VMSTAT_ALLOCSTALL_DMA":
                        case 96:
                            m.vmstatCounters[i] = 96;
                            break;
                        case "VMSTAT_ALLOCSTALL_MOVABLE":
                        case 97:
                            m.vmstatCounters[i] = 97;
                            break;
                        case "VMSTAT_ALLOCSTALL_NORMAL":
                        case 98:
                            m.vmstatCounters[i] = 98;
                            break;
                        case "VMSTAT_COMPACT_DAEMON_FREE_SCANNED":
                        case 99:
                            m.vmstatCounters[i] = 99;
                            break;
                        case "VMSTAT_COMPACT_DAEMON_MIGRATE_SCANNED":
                        case 100:
                            m.vmstatCounters[i] = 100;
                            break;
                        case "VMSTAT_NR_FASTRPC":
                        case 101:
                            m.vmstatCounters[i] = 101;
                            break;
                        case "VMSTAT_NR_INDIRECTLY_RECLAIMABLE":
                        case 102:
                            m.vmstatCounters[i] = 102;
                            break;
                        case "VMSTAT_NR_ION_HEAP_POOL":
                        case 103:
                            m.vmstatCounters[i] = 103;
                            break;
                        case "VMSTAT_NR_KERNEL_MISC_RECLAIMABLE":
                        case 104:
                            m.vmstatCounters[i] = 104;
                            break;
                        case "VMSTAT_NR_SHADOW_CALL_STACK_BYTES":
                        case 105:
                            m.vmstatCounters[i] = 105;
                            break;
                        case "VMSTAT_NR_SHMEM_HUGEPAGES":
                        case 106:
                            m.vmstatCounters[i] = 106;
                            break;
                        case "VMSTAT_NR_SHMEM_PMDMAPPED":
                        case 107:
                            m.vmstatCounters[i] = 107;
                            break;
                        case "VMSTAT_NR_UNRECLAIMABLE_PAGES":
                        case 108:
                            m.vmstatCounters[i] = 108;
                            break;
                        case "VMSTAT_NR_ZONE_ACTIVE_ANON":
                        case 109:
                            m.vmstatCounters[i] = 109;
                            break;
                        case "VMSTAT_NR_ZONE_ACTIVE_FILE":
                        case 110:
                            m.vmstatCounters[i] = 110;
                            break;
                        case "VMSTAT_NR_ZONE_INACTIVE_ANON":
                        case 111:
                            m.vmstatCounters[i] = 111;
                            break;
                        case "VMSTAT_NR_ZONE_INACTIVE_FILE":
                        case 112:
                            m.vmstatCounters[i] = 112;
                            break;
                        case "VMSTAT_NR_ZONE_UNEVICTABLE":
                        case 113:
                            m.vmstatCounters[i] = 113;
                            break;
                        case "VMSTAT_NR_ZONE_WRITE_PENDING":
                        case 114:
                            m.vmstatCounters[i] = 114;
                            break;
                        case "VMSTAT_OOM_KILL":
                        case 115:
                            m.vmstatCounters[i] = 115;
                            break;
                        case "VMSTAT_PGLAZYFREE":
                        case 116:
                            m.vmstatCounters[i] = 116;
                            break;
                        case "VMSTAT_PGLAZYFREED":
                        case 117:
                            m.vmstatCounters[i] = 117;
                            break;
                        case "VMSTAT_PGREFILL":
                        case 118:
                            m.vmstatCounters[i] = 118;
                            break;
                        case "VMSTAT_PGSCAN_DIRECT":
                        case 119:
                            m.vmstatCounters[i] = 119;
                            break;
                        case "VMSTAT_PGSCAN_KSWAPD":
                        case 120:
                            m.vmstatCounters[i] = 120;
                            break;
                        case "VMSTAT_PGSKIP_DMA":
                        case 121:
                            m.vmstatCounters[i] = 121;
                            break;
                        case "VMSTAT_PGSKIP_MOVABLE":
                        case 122:
                            m.vmstatCounters[i] = 122;
                            break;
                        case "VMSTAT_PGSKIP_NORMAL":
                        case 123:
                            m.vmstatCounters[i] = 123;
                            break;
                        case "VMSTAT_PGSTEAL_DIRECT":
                        case 124:
                            m.vmstatCounters[i] = 124;
                            break;
                        case "VMSTAT_PGSTEAL_KSWAPD":
                        case 125:
                            m.vmstatCounters[i] = 125;
                            break;
                        case "VMSTAT_SWAP_RA":
                        case 126:
                            m.vmstatCounters[i] = 126;
                            break;
                        case "VMSTAT_SWAP_RA_HIT":
                        case 127:
                            m.vmstatCounters[i] = 127;
                            break;
                        case "VMSTAT_WORKINGSET_RESTORE":
                        case 128:
                            m.vmstatCounters[i] = 128;
                            break;
                        }
                    }
                }
                if (d.statPeriodMs != null) {
                    m.statPeriodMs = d.statPeriodMs >>> 0;
                }
                if (d.statCounters) {
                    if (!Array.isArray(d.statCounters))
                        throw TypeError(".perfetto.protos.SysStatsConfig.statCounters: array expected");
                    m.statCounters = [];
                    for (var i = 0; i < d.statCounters.length; ++i) {
                        switch (d.statCounters[i]) {
                        default:
                        case "STAT_UNSPECIFIED":
                        case 0:
                            m.statCounters[i] = 0;
                            break;
                        case "STAT_CPU_TIMES":
                        case 1:
                            m.statCounters[i] = 1;
                            break;
                        case "STAT_IRQ_COUNTS":
                        case 2:
                            m.statCounters[i] = 2;
                            break;
                        case "STAT_SOFTIRQ_COUNTS":
                        case 3:
                            m.statCounters[i] = 3;
                            break;
                        case "STAT_FORK_COUNT":
                        case 4:
                            m.statCounters[i] = 4;
                            break;
                        }
                    }
                }
                if (d.devfreqPeriodMs != null) {
                    m.devfreqPeriodMs = d.devfreqPeriodMs >>> 0;
                }
                if (d.cpufreqPeriodMs != null) {
                    m.cpufreqPeriodMs = d.cpufreqPeriodMs >>> 0;
                }
                if (d.buddyinfoPeriodMs != null) {
                    m.buddyinfoPeriodMs = d.buddyinfoPeriodMs >>> 0;
                }
                if (d.diskstatPeriodMs != null) {
                    m.diskstatPeriodMs = d.diskstatPeriodMs >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SysStatsConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SysStatsConfig
             * @static
             * @param {perfetto.protos.SysStatsConfig} m SysStatsConfig
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SysStatsConfig.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.meminfoCounters = [];
                    d.vmstatCounters = [];
                    d.statCounters = [];
                }
                if (o.defaults) {
                    d.meminfoPeriodMs = 0;
                    d.vmstatPeriodMs = 0;
                    d.statPeriodMs = 0;
                    d.devfreqPeriodMs = 0;
                    d.cpufreqPeriodMs = 0;
                    d.buddyinfoPeriodMs = 0;
                    d.diskstatPeriodMs = 0;
                }
                if (m.meminfoPeriodMs != null && m.hasOwnProperty("meminfoPeriodMs")) {
                    d.meminfoPeriodMs = m.meminfoPeriodMs;
                }
                if (m.meminfoCounters && m.meminfoCounters.length) {
                    d.meminfoCounters = [];
                    for (var j = 0; j < m.meminfoCounters.length; ++j) {
                        d.meminfoCounters[j] = o.enums === String ? $root.perfetto.protos.MeminfoCounters[m.meminfoCounters[j]] : m.meminfoCounters[j];
                    }
                }
                if (m.vmstatPeriodMs != null && m.hasOwnProperty("vmstatPeriodMs")) {
                    d.vmstatPeriodMs = m.vmstatPeriodMs;
                }
                if (m.vmstatCounters && m.vmstatCounters.length) {
                    d.vmstatCounters = [];
                    for (var j = 0; j < m.vmstatCounters.length; ++j) {
                        d.vmstatCounters[j] = o.enums === String ? $root.perfetto.protos.VmstatCounters[m.vmstatCounters[j]] : m.vmstatCounters[j];
                    }
                }
                if (m.statPeriodMs != null && m.hasOwnProperty("statPeriodMs")) {
                    d.statPeriodMs = m.statPeriodMs;
                }
                if (m.statCounters && m.statCounters.length) {
                    d.statCounters = [];
                    for (var j = 0; j < m.statCounters.length; ++j) {
                        d.statCounters[j] = o.enums === String ? $root.perfetto.protos.SysStatsConfig.StatCounters[m.statCounters[j]] : m.statCounters[j];
                    }
                }
                if (m.devfreqPeriodMs != null && m.hasOwnProperty("devfreqPeriodMs")) {
                    d.devfreqPeriodMs = m.devfreqPeriodMs;
                }
                if (m.cpufreqPeriodMs != null && m.hasOwnProperty("cpufreqPeriodMs")) {
                    d.cpufreqPeriodMs = m.cpufreqPeriodMs;
                }
                if (m.buddyinfoPeriodMs != null && m.hasOwnProperty("buddyinfoPeriodMs")) {
                    d.buddyinfoPeriodMs = m.buddyinfoPeriodMs;
                }
                if (m.diskstatPeriodMs != null && m.hasOwnProperty("diskstatPeriodMs")) {
                    d.diskstatPeriodMs = m.diskstatPeriodMs;
                }
                return d;
            };

            /**
             * Converts this SysStatsConfig to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SysStatsConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SysStatsConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * StatCounters enum.
             * @name perfetto.protos.SysStatsConfig.StatCounters
             * @enum {number}
             * @property {number} STAT_UNSPECIFIED=0 STAT_UNSPECIFIED value
             * @property {number} STAT_CPU_TIMES=1 STAT_CPU_TIMES value
             * @property {number} STAT_IRQ_COUNTS=2 STAT_IRQ_COUNTS value
             * @property {number} STAT_SOFTIRQ_COUNTS=3 STAT_SOFTIRQ_COUNTS value
             * @property {number} STAT_FORK_COUNT=4 STAT_FORK_COUNT value
             */
            SysStatsConfig.StatCounters = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "STAT_UNSPECIFIED"] = 0;
                values[valuesById[1] = "STAT_CPU_TIMES"] = 1;
                values[valuesById[2] = "STAT_IRQ_COUNTS"] = 2;
                values[valuesById[3] = "STAT_SOFTIRQ_COUNTS"] = 3;
                values[valuesById[4] = "STAT_FORK_COUNT"] = 4;
                return values;
            })();

            return SysStatsConfig;
        })();

        protos.SystemInfoConfig = (function() {

            /**
             * Properties of a SystemInfoConfig.
             * @memberof perfetto.protos
             * @interface ISystemInfoConfig
             */

            /**
             * Constructs a new SystemInfoConfig.
             * @memberof perfetto.protos
             * @classdesc Represents a SystemInfoConfig.
             * @implements ISystemInfoConfig
             * @constructor
             * @param {perfetto.protos.ISystemInfoConfig=} [p] Properties to set
             */
            function SystemInfoConfig(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Creates a new SystemInfoConfig instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SystemInfoConfig
             * @static
             * @param {perfetto.protos.ISystemInfoConfig=} [properties] Properties to set
             * @returns {perfetto.protos.SystemInfoConfig} SystemInfoConfig instance
             */
            SystemInfoConfig.create = function create(properties) {
                return new SystemInfoConfig(properties);
            };

            /**
             * Encodes the specified SystemInfoConfig message. Does not implicitly {@link perfetto.protos.SystemInfoConfig.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SystemInfoConfig
             * @static
             * @param {perfetto.protos.ISystemInfoConfig} m SystemInfoConfig message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SystemInfoConfig.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                return w;
            };

            /**
             * Encodes the specified SystemInfoConfig message, length delimited. Does not implicitly {@link perfetto.protos.SystemInfoConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SystemInfoConfig
             * @static
             * @param {perfetto.protos.ISystemInfoConfig} message SystemInfoConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SystemInfoConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SystemInfoConfig message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SystemInfoConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SystemInfoConfig} SystemInfoConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SystemInfoConfig.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SystemInfoConfig();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SystemInfoConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SystemInfoConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SystemInfoConfig} SystemInfoConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SystemInfoConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SystemInfoConfig message.
             * @function verify
             * @memberof perfetto.protos.SystemInfoConfig
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SystemInfoConfig.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates a SystemInfoConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SystemInfoConfig
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SystemInfoConfig} SystemInfoConfig
             */
            SystemInfoConfig.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SystemInfoConfig)
                    return d;
                return new $root.perfetto.protos.SystemInfoConfig();
            };

            /**
             * Creates a plain object from a SystemInfoConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SystemInfoConfig
             * @static
             * @param {perfetto.protos.SystemInfoConfig} m SystemInfoConfig
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SystemInfoConfig.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this SystemInfoConfig to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SystemInfoConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SystemInfoConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SystemInfoConfig;
        })();

        protos.TestConfig = (function() {

            /**
             * Properties of a TestConfig.
             * @memberof perfetto.protos
             * @interface ITestConfig
             * @property {number|null} [messageCount] TestConfig messageCount
             * @property {number|null} [maxMessagesPerSecond] TestConfig maxMessagesPerSecond
             * @property {number|null} [seed] TestConfig seed
             * @property {number|null} [messageSize] TestConfig messageSize
             * @property {boolean|null} [sendBatchOnRegister] TestConfig sendBatchOnRegister
             * @property {perfetto.protos.TestConfig.IDummyFields|null} [dummyFields] TestConfig dummyFields
             */

            /**
             * Constructs a new TestConfig.
             * @memberof perfetto.protos
             * @classdesc Represents a TestConfig.
             * @implements ITestConfig
             * @constructor
             * @param {perfetto.protos.ITestConfig=} [p] Properties to set
             */
            function TestConfig(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TestConfig messageCount.
             * @member {number} messageCount
             * @memberof perfetto.protos.TestConfig
             * @instance
             */
            TestConfig.prototype.messageCount = 0;

            /**
             * TestConfig maxMessagesPerSecond.
             * @member {number} maxMessagesPerSecond
             * @memberof perfetto.protos.TestConfig
             * @instance
             */
            TestConfig.prototype.maxMessagesPerSecond = 0;

            /**
             * TestConfig seed.
             * @member {number} seed
             * @memberof perfetto.protos.TestConfig
             * @instance
             */
            TestConfig.prototype.seed = 0;

            /**
             * TestConfig messageSize.
             * @member {number} messageSize
             * @memberof perfetto.protos.TestConfig
             * @instance
             */
            TestConfig.prototype.messageSize = 0;

            /**
             * TestConfig sendBatchOnRegister.
             * @member {boolean} sendBatchOnRegister
             * @memberof perfetto.protos.TestConfig
             * @instance
             */
            TestConfig.prototype.sendBatchOnRegister = false;

            /**
             * TestConfig dummyFields.
             * @member {perfetto.protos.TestConfig.IDummyFields|null|undefined} dummyFields
             * @memberof perfetto.protos.TestConfig
             * @instance
             */
            TestConfig.prototype.dummyFields = null;

            /**
             * Creates a new TestConfig instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TestConfig
             * @static
             * @param {perfetto.protos.ITestConfig=} [properties] Properties to set
             * @returns {perfetto.protos.TestConfig} TestConfig instance
             */
            TestConfig.create = function create(properties) {
                return new TestConfig(properties);
            };

            /**
             * Encodes the specified TestConfig message. Does not implicitly {@link perfetto.protos.TestConfig.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TestConfig
             * @static
             * @param {perfetto.protos.ITestConfig} m TestConfig message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TestConfig.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.messageCount != null && Object.hasOwnProperty.call(m, "messageCount"))
                    w.uint32(8).uint32(m.messageCount);
                if (m.maxMessagesPerSecond != null && Object.hasOwnProperty.call(m, "maxMessagesPerSecond"))
                    w.uint32(16).uint32(m.maxMessagesPerSecond);
                if (m.seed != null && Object.hasOwnProperty.call(m, "seed"))
                    w.uint32(24).uint32(m.seed);
                if (m.messageSize != null && Object.hasOwnProperty.call(m, "messageSize"))
                    w.uint32(32).uint32(m.messageSize);
                if (m.sendBatchOnRegister != null && Object.hasOwnProperty.call(m, "sendBatchOnRegister"))
                    w.uint32(40).bool(m.sendBatchOnRegister);
                if (m.dummyFields != null && Object.hasOwnProperty.call(m, "dummyFields"))
                    $root.perfetto.protos.TestConfig.DummyFields.encode(m.dummyFields, w.uint32(50).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified TestConfig message, length delimited. Does not implicitly {@link perfetto.protos.TestConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TestConfig
             * @static
             * @param {perfetto.protos.ITestConfig} message TestConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TestConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TestConfig message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TestConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TestConfig} TestConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TestConfig.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TestConfig();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.messageCount = r.uint32();
                        break;
                    case 2:
                        m.maxMessagesPerSecond = r.uint32();
                        break;
                    case 3:
                        m.seed = r.uint32();
                        break;
                    case 4:
                        m.messageSize = r.uint32();
                        break;
                    case 5:
                        m.sendBatchOnRegister = r.bool();
                        break;
                    case 6:
                        m.dummyFields = $root.perfetto.protos.TestConfig.DummyFields.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TestConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TestConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TestConfig} TestConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TestConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TestConfig message.
             * @function verify
             * @memberof perfetto.protos.TestConfig
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TestConfig.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.messageCount != null && m.hasOwnProperty("messageCount")) {
                    if (!$util.isInteger(m.messageCount))
                        return "messageCount: integer expected";
                }
                if (m.maxMessagesPerSecond != null && m.hasOwnProperty("maxMessagesPerSecond")) {
                    if (!$util.isInteger(m.maxMessagesPerSecond))
                        return "maxMessagesPerSecond: integer expected";
                }
                if (m.seed != null && m.hasOwnProperty("seed")) {
                    if (!$util.isInteger(m.seed))
                        return "seed: integer expected";
                }
                if (m.messageSize != null && m.hasOwnProperty("messageSize")) {
                    if (!$util.isInteger(m.messageSize))
                        return "messageSize: integer expected";
                }
                if (m.sendBatchOnRegister != null && m.hasOwnProperty("sendBatchOnRegister")) {
                    if (typeof m.sendBatchOnRegister !== "boolean")
                        return "sendBatchOnRegister: boolean expected";
                }
                if (m.dummyFields != null && m.hasOwnProperty("dummyFields")) {
                    {
                        var e = $root.perfetto.protos.TestConfig.DummyFields.verify(m.dummyFields);
                        if (e)
                            return "dummyFields." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a TestConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TestConfig
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TestConfig} TestConfig
             */
            TestConfig.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TestConfig)
                    return d;
                var m = new $root.perfetto.protos.TestConfig();
                if (d.messageCount != null) {
                    m.messageCount = d.messageCount >>> 0;
                }
                if (d.maxMessagesPerSecond != null) {
                    m.maxMessagesPerSecond = d.maxMessagesPerSecond >>> 0;
                }
                if (d.seed != null) {
                    m.seed = d.seed >>> 0;
                }
                if (d.messageSize != null) {
                    m.messageSize = d.messageSize >>> 0;
                }
                if (d.sendBatchOnRegister != null) {
                    m.sendBatchOnRegister = Boolean(d.sendBatchOnRegister);
                }
                if (d.dummyFields != null) {
                    if (typeof d.dummyFields !== "object")
                        throw TypeError(".perfetto.protos.TestConfig.dummyFields: object expected");
                    m.dummyFields = $root.perfetto.protos.TestConfig.DummyFields.fromObject(d.dummyFields);
                }
                return m;
            };

            /**
             * Creates a plain object from a TestConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TestConfig
             * @static
             * @param {perfetto.protos.TestConfig} m TestConfig
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TestConfig.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.messageCount = 0;
                    d.maxMessagesPerSecond = 0;
                    d.seed = 0;
                    d.messageSize = 0;
                    d.sendBatchOnRegister = false;
                    d.dummyFields = null;
                }
                if (m.messageCount != null && m.hasOwnProperty("messageCount")) {
                    d.messageCount = m.messageCount;
                }
                if (m.maxMessagesPerSecond != null && m.hasOwnProperty("maxMessagesPerSecond")) {
                    d.maxMessagesPerSecond = m.maxMessagesPerSecond;
                }
                if (m.seed != null && m.hasOwnProperty("seed")) {
                    d.seed = m.seed;
                }
                if (m.messageSize != null && m.hasOwnProperty("messageSize")) {
                    d.messageSize = m.messageSize;
                }
                if (m.sendBatchOnRegister != null && m.hasOwnProperty("sendBatchOnRegister")) {
                    d.sendBatchOnRegister = m.sendBatchOnRegister;
                }
                if (m.dummyFields != null && m.hasOwnProperty("dummyFields")) {
                    d.dummyFields = $root.perfetto.protos.TestConfig.DummyFields.toObject(m.dummyFields, o);
                }
                return d;
            };

            /**
             * Converts this TestConfig to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TestConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TestConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            TestConfig.DummyFields = (function() {

                /**
                 * Properties of a DummyFields.
                 * @memberof perfetto.protos.TestConfig
                 * @interface IDummyFields
                 * @property {number|null} [fieldUint32] DummyFields fieldUint32
                 * @property {number|null} [fieldInt32] DummyFields fieldInt32
                 * @property {number|null} [fieldUint64] DummyFields fieldUint64
                 * @property {number|null} [fieldInt64] DummyFields fieldInt64
                 * @property {number|null} [fieldFixed64] DummyFields fieldFixed64
                 * @property {number|null} [fieldSfixed64] DummyFields fieldSfixed64
                 * @property {number|null} [fieldFixed32] DummyFields fieldFixed32
                 * @property {number|null} [fieldSfixed32] DummyFields fieldSfixed32
                 * @property {number|null} [fieldDouble] DummyFields fieldDouble
                 * @property {number|null} [fieldFloat] DummyFields fieldFloat
                 * @property {number|null} [fieldSint64] DummyFields fieldSint64
                 * @property {number|null} [fieldSint32] DummyFields fieldSint32
                 * @property {string|null} [fieldString] DummyFields fieldString
                 * @property {Uint8Array|null} [fieldBytes] DummyFields fieldBytes
                 */

                /**
                 * Constructs a new DummyFields.
                 * @memberof perfetto.protos.TestConfig
                 * @classdesc Represents a DummyFields.
                 * @implements IDummyFields
                 * @constructor
                 * @param {perfetto.protos.TestConfig.IDummyFields=} [p] Properties to set
                 */
                function DummyFields(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * DummyFields fieldUint32.
                 * @member {number} fieldUint32
                 * @memberof perfetto.protos.TestConfig.DummyFields
                 * @instance
                 */
                DummyFields.prototype.fieldUint32 = 0;

                /**
                 * DummyFields fieldInt32.
                 * @member {number} fieldInt32
                 * @memberof perfetto.protos.TestConfig.DummyFields
                 * @instance
                 */
                DummyFields.prototype.fieldInt32 = 0;

                /**
                 * DummyFields fieldUint64.
                 * @member {number} fieldUint64
                 * @memberof perfetto.protos.TestConfig.DummyFields
                 * @instance
                 */
                DummyFields.prototype.fieldUint64 = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * DummyFields fieldInt64.
                 * @member {number} fieldInt64
                 * @memberof perfetto.protos.TestConfig.DummyFields
                 * @instance
                 */
                DummyFields.prototype.fieldInt64 = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * DummyFields fieldFixed64.
                 * @member {number} fieldFixed64
                 * @memberof perfetto.protos.TestConfig.DummyFields
                 * @instance
                 */
                DummyFields.prototype.fieldFixed64 = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * DummyFields fieldSfixed64.
                 * @member {number} fieldSfixed64
                 * @memberof perfetto.protos.TestConfig.DummyFields
                 * @instance
                 */
                DummyFields.prototype.fieldSfixed64 = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * DummyFields fieldFixed32.
                 * @member {number} fieldFixed32
                 * @memberof perfetto.protos.TestConfig.DummyFields
                 * @instance
                 */
                DummyFields.prototype.fieldFixed32 = 0;

                /**
                 * DummyFields fieldSfixed32.
                 * @member {number} fieldSfixed32
                 * @memberof perfetto.protos.TestConfig.DummyFields
                 * @instance
                 */
                DummyFields.prototype.fieldSfixed32 = 0;

                /**
                 * DummyFields fieldDouble.
                 * @member {number} fieldDouble
                 * @memberof perfetto.protos.TestConfig.DummyFields
                 * @instance
                 */
                DummyFields.prototype.fieldDouble = 0;

                /**
                 * DummyFields fieldFloat.
                 * @member {number} fieldFloat
                 * @memberof perfetto.protos.TestConfig.DummyFields
                 * @instance
                 */
                DummyFields.prototype.fieldFloat = 0;

                /**
                 * DummyFields fieldSint64.
                 * @member {number} fieldSint64
                 * @memberof perfetto.protos.TestConfig.DummyFields
                 * @instance
                 */
                DummyFields.prototype.fieldSint64 = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * DummyFields fieldSint32.
                 * @member {number} fieldSint32
                 * @memberof perfetto.protos.TestConfig.DummyFields
                 * @instance
                 */
                DummyFields.prototype.fieldSint32 = 0;

                /**
                 * DummyFields fieldString.
                 * @member {string} fieldString
                 * @memberof perfetto.protos.TestConfig.DummyFields
                 * @instance
                 */
                DummyFields.prototype.fieldString = "";

                /**
                 * DummyFields fieldBytes.
                 * @member {Uint8Array} fieldBytes
                 * @memberof perfetto.protos.TestConfig.DummyFields
                 * @instance
                 */
                DummyFields.prototype.fieldBytes = $util.newBuffer([]);

                /**
                 * Creates a new DummyFields instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.TestConfig.DummyFields
                 * @static
                 * @param {perfetto.protos.TestConfig.IDummyFields=} [properties] Properties to set
                 * @returns {perfetto.protos.TestConfig.DummyFields} DummyFields instance
                 */
                DummyFields.create = function create(properties) {
                    return new DummyFields(properties);
                };

                /**
                 * Encodes the specified DummyFields message. Does not implicitly {@link perfetto.protos.TestConfig.DummyFields.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.TestConfig.DummyFields
                 * @static
                 * @param {perfetto.protos.TestConfig.IDummyFields} m DummyFields message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                DummyFields.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.fieldUint32 != null && Object.hasOwnProperty.call(m, "fieldUint32"))
                        w.uint32(8).uint32(m.fieldUint32);
                    if (m.fieldInt32 != null && Object.hasOwnProperty.call(m, "fieldInt32"))
                        w.uint32(16).int32(m.fieldInt32);
                    if (m.fieldUint64 != null && Object.hasOwnProperty.call(m, "fieldUint64"))
                        w.uint32(24).uint64(m.fieldUint64);
                    if (m.fieldInt64 != null && Object.hasOwnProperty.call(m, "fieldInt64"))
                        w.uint32(32).int64(m.fieldInt64);
                    if (m.fieldFixed64 != null && Object.hasOwnProperty.call(m, "fieldFixed64"))
                        w.uint32(41).fixed64(m.fieldFixed64);
                    if (m.fieldSfixed64 != null && Object.hasOwnProperty.call(m, "fieldSfixed64"))
                        w.uint32(49).sfixed64(m.fieldSfixed64);
                    if (m.fieldFixed32 != null && Object.hasOwnProperty.call(m, "fieldFixed32"))
                        w.uint32(61).fixed32(m.fieldFixed32);
                    if (m.fieldSfixed32 != null && Object.hasOwnProperty.call(m, "fieldSfixed32"))
                        w.uint32(69).sfixed32(m.fieldSfixed32);
                    if (m.fieldDouble != null && Object.hasOwnProperty.call(m, "fieldDouble"))
                        w.uint32(73).double(m.fieldDouble);
                    if (m.fieldFloat != null && Object.hasOwnProperty.call(m, "fieldFloat"))
                        w.uint32(85).float(m.fieldFloat);
                    if (m.fieldSint64 != null && Object.hasOwnProperty.call(m, "fieldSint64"))
                        w.uint32(88).sint64(m.fieldSint64);
                    if (m.fieldSint32 != null && Object.hasOwnProperty.call(m, "fieldSint32"))
                        w.uint32(96).sint32(m.fieldSint32);
                    if (m.fieldString != null && Object.hasOwnProperty.call(m, "fieldString"))
                        w.uint32(106).string(m.fieldString);
                    if (m.fieldBytes != null && Object.hasOwnProperty.call(m, "fieldBytes"))
                        w.uint32(114).bytes(m.fieldBytes);
                    return w;
                };

                /**
                 * Encodes the specified DummyFields message, length delimited. Does not implicitly {@link perfetto.protos.TestConfig.DummyFields.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.TestConfig.DummyFields
                 * @static
                 * @param {perfetto.protos.TestConfig.IDummyFields} message DummyFields message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                DummyFields.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a DummyFields message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.TestConfig.DummyFields
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.TestConfig.DummyFields} DummyFields
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                DummyFields.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TestConfig.DummyFields();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.fieldUint32 = r.uint32();
                            break;
                        case 2:
                            m.fieldInt32 = r.int32();
                            break;
                        case 3:
                            m.fieldUint64 = r.uint64();
                            break;
                        case 4:
                            m.fieldInt64 = r.int64();
                            break;
                        case 5:
                            m.fieldFixed64 = r.fixed64();
                            break;
                        case 6:
                            m.fieldSfixed64 = r.sfixed64();
                            break;
                        case 7:
                            m.fieldFixed32 = r.fixed32();
                            break;
                        case 8:
                            m.fieldSfixed32 = r.sfixed32();
                            break;
                        case 9:
                            m.fieldDouble = r.double();
                            break;
                        case 10:
                            m.fieldFloat = r.float();
                            break;
                        case 11:
                            m.fieldSint64 = r.sint64();
                            break;
                        case 12:
                            m.fieldSint32 = r.sint32();
                            break;
                        case 13:
                            m.fieldString = r.string();
                            break;
                        case 14:
                            m.fieldBytes = r.bytes();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a DummyFields message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.TestConfig.DummyFields
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.TestConfig.DummyFields} DummyFields
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                DummyFields.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a DummyFields message.
                 * @function verify
                 * @memberof perfetto.protos.TestConfig.DummyFields
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                DummyFields.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.fieldUint32 != null && m.hasOwnProperty("fieldUint32")) {
                        if (!$util.isInteger(m.fieldUint32))
                            return "fieldUint32: integer expected";
                    }
                    if (m.fieldInt32 != null && m.hasOwnProperty("fieldInt32")) {
                        if (!$util.isInteger(m.fieldInt32))
                            return "fieldInt32: integer expected";
                    }
                    if (m.fieldUint64 != null && m.hasOwnProperty("fieldUint64")) {
                        if (!$util.isInteger(m.fieldUint64) && !(m.fieldUint64 && $util.isInteger(m.fieldUint64.low) && $util.isInteger(m.fieldUint64.high)))
                            return "fieldUint64: integer|Long expected";
                    }
                    if (m.fieldInt64 != null && m.hasOwnProperty("fieldInt64")) {
                        if (!$util.isInteger(m.fieldInt64) && !(m.fieldInt64 && $util.isInteger(m.fieldInt64.low) && $util.isInteger(m.fieldInt64.high)))
                            return "fieldInt64: integer|Long expected";
                    }
                    if (m.fieldFixed64 != null && m.hasOwnProperty("fieldFixed64")) {
                        if (!$util.isInteger(m.fieldFixed64) && !(m.fieldFixed64 && $util.isInteger(m.fieldFixed64.low) && $util.isInteger(m.fieldFixed64.high)))
                            return "fieldFixed64: integer|Long expected";
                    }
                    if (m.fieldSfixed64 != null && m.hasOwnProperty("fieldSfixed64")) {
                        if (!$util.isInteger(m.fieldSfixed64) && !(m.fieldSfixed64 && $util.isInteger(m.fieldSfixed64.low) && $util.isInteger(m.fieldSfixed64.high)))
                            return "fieldSfixed64: integer|Long expected";
                    }
                    if (m.fieldFixed32 != null && m.hasOwnProperty("fieldFixed32")) {
                        if (!$util.isInteger(m.fieldFixed32))
                            return "fieldFixed32: integer expected";
                    }
                    if (m.fieldSfixed32 != null && m.hasOwnProperty("fieldSfixed32")) {
                        if (!$util.isInteger(m.fieldSfixed32))
                            return "fieldSfixed32: integer expected";
                    }
                    if (m.fieldDouble != null && m.hasOwnProperty("fieldDouble")) {
                        if (typeof m.fieldDouble !== "number")
                            return "fieldDouble: number expected";
                    }
                    if (m.fieldFloat != null && m.hasOwnProperty("fieldFloat")) {
                        if (typeof m.fieldFloat !== "number")
                            return "fieldFloat: number expected";
                    }
                    if (m.fieldSint64 != null && m.hasOwnProperty("fieldSint64")) {
                        if (!$util.isInteger(m.fieldSint64) && !(m.fieldSint64 && $util.isInteger(m.fieldSint64.low) && $util.isInteger(m.fieldSint64.high)))
                            return "fieldSint64: integer|Long expected";
                    }
                    if (m.fieldSint32 != null && m.hasOwnProperty("fieldSint32")) {
                        if (!$util.isInteger(m.fieldSint32))
                            return "fieldSint32: integer expected";
                    }
                    if (m.fieldString != null && m.hasOwnProperty("fieldString")) {
                        if (!$util.isString(m.fieldString))
                            return "fieldString: string expected";
                    }
                    if (m.fieldBytes != null && m.hasOwnProperty("fieldBytes")) {
                        if (!(m.fieldBytes && typeof m.fieldBytes.length === "number" || $util.isString(m.fieldBytes)))
                            return "fieldBytes: buffer expected";
                    }
                    return null;
                };

                /**
                 * Creates a DummyFields message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.TestConfig.DummyFields
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.TestConfig.DummyFields} DummyFields
                 */
                DummyFields.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.TestConfig.DummyFields)
                        return d;
                    var m = new $root.perfetto.protos.TestConfig.DummyFields();
                    if (d.fieldUint32 != null) {
                        m.fieldUint32 = d.fieldUint32 >>> 0;
                    }
                    if (d.fieldInt32 != null) {
                        m.fieldInt32 = d.fieldInt32 | 0;
                    }
                    if (d.fieldUint64 != null) {
                        if ($util.Long)
                            (m.fieldUint64 = $util.Long.fromValue(d.fieldUint64)).unsigned = true;
                        else if (typeof d.fieldUint64 === "string")
                            m.fieldUint64 = parseInt(d.fieldUint64, 10);
                        else if (typeof d.fieldUint64 === "number")
                            m.fieldUint64 = d.fieldUint64;
                        else if (typeof d.fieldUint64 === "object")
                            m.fieldUint64 = new $util.LongBits(d.fieldUint64.low >>> 0, d.fieldUint64.high >>> 0).toNumber(true);
                    }
                    if (d.fieldInt64 != null) {
                        if ($util.Long)
                            (m.fieldInt64 = $util.Long.fromValue(d.fieldInt64)).unsigned = false;
                        else if (typeof d.fieldInt64 === "string")
                            m.fieldInt64 = parseInt(d.fieldInt64, 10);
                        else if (typeof d.fieldInt64 === "number")
                            m.fieldInt64 = d.fieldInt64;
                        else if (typeof d.fieldInt64 === "object")
                            m.fieldInt64 = new $util.LongBits(d.fieldInt64.low >>> 0, d.fieldInt64.high >>> 0).toNumber();
                    }
                    if (d.fieldFixed64 != null) {
                        if ($util.Long)
                            (m.fieldFixed64 = $util.Long.fromValue(d.fieldFixed64)).unsigned = false;
                        else if (typeof d.fieldFixed64 === "string")
                            m.fieldFixed64 = parseInt(d.fieldFixed64, 10);
                        else if (typeof d.fieldFixed64 === "number")
                            m.fieldFixed64 = d.fieldFixed64;
                        else if (typeof d.fieldFixed64 === "object")
                            m.fieldFixed64 = new $util.LongBits(d.fieldFixed64.low >>> 0, d.fieldFixed64.high >>> 0).toNumber();
                    }
                    if (d.fieldSfixed64 != null) {
                        if ($util.Long)
                            (m.fieldSfixed64 = $util.Long.fromValue(d.fieldSfixed64)).unsigned = false;
                        else if (typeof d.fieldSfixed64 === "string")
                            m.fieldSfixed64 = parseInt(d.fieldSfixed64, 10);
                        else if (typeof d.fieldSfixed64 === "number")
                            m.fieldSfixed64 = d.fieldSfixed64;
                        else if (typeof d.fieldSfixed64 === "object")
                            m.fieldSfixed64 = new $util.LongBits(d.fieldSfixed64.low >>> 0, d.fieldSfixed64.high >>> 0).toNumber();
                    }
                    if (d.fieldFixed32 != null) {
                        m.fieldFixed32 = d.fieldFixed32 >>> 0;
                    }
                    if (d.fieldSfixed32 != null) {
                        m.fieldSfixed32 = d.fieldSfixed32 | 0;
                    }
                    if (d.fieldDouble != null) {
                        m.fieldDouble = Number(d.fieldDouble);
                    }
                    if (d.fieldFloat != null) {
                        m.fieldFloat = Number(d.fieldFloat);
                    }
                    if (d.fieldSint64 != null) {
                        if ($util.Long)
                            (m.fieldSint64 = $util.Long.fromValue(d.fieldSint64)).unsigned = false;
                        else if (typeof d.fieldSint64 === "string")
                            m.fieldSint64 = parseInt(d.fieldSint64, 10);
                        else if (typeof d.fieldSint64 === "number")
                            m.fieldSint64 = d.fieldSint64;
                        else if (typeof d.fieldSint64 === "object")
                            m.fieldSint64 = new $util.LongBits(d.fieldSint64.low >>> 0, d.fieldSint64.high >>> 0).toNumber();
                    }
                    if (d.fieldSint32 != null) {
                        m.fieldSint32 = d.fieldSint32 | 0;
                    }
                    if (d.fieldString != null) {
                        m.fieldString = String(d.fieldString);
                    }
                    if (d.fieldBytes != null) {
                        if (typeof d.fieldBytes === "string")
                            $util.base64.decode(d.fieldBytes, m.fieldBytes = $util.newBuffer($util.base64.length(d.fieldBytes)), 0);
                        else if (d.fieldBytes.length)
                            m.fieldBytes = d.fieldBytes;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a DummyFields message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.TestConfig.DummyFields
                 * @static
                 * @param {perfetto.protos.TestConfig.DummyFields} m DummyFields
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                DummyFields.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.fieldUint32 = 0;
                        d.fieldInt32 = 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.fieldUint64 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.fieldUint64 = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.fieldInt64 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.fieldInt64 = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.fieldFixed64 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.fieldFixed64 = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.fieldSfixed64 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.fieldSfixed64 = o.longs === String ? "0" : 0;
                        d.fieldFixed32 = 0;
                        d.fieldSfixed32 = 0;
                        d.fieldDouble = 0;
                        d.fieldFloat = 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.fieldSint64 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.fieldSint64 = o.longs === String ? "0" : 0;
                        d.fieldSint32 = 0;
                        d.fieldString = "";
                        if (o.bytes === String)
                            d.fieldBytes = "";
                        else {
                            d.fieldBytes = [];
                            if (o.bytes !== Array)
                                d.fieldBytes = $util.newBuffer(d.fieldBytes);
                        }
                    }
                    if (m.fieldUint32 != null && m.hasOwnProperty("fieldUint32")) {
                        d.fieldUint32 = m.fieldUint32;
                    }
                    if (m.fieldInt32 != null && m.hasOwnProperty("fieldInt32")) {
                        d.fieldInt32 = m.fieldInt32;
                    }
                    if (m.fieldUint64 != null && m.hasOwnProperty("fieldUint64")) {
                        if (typeof m.fieldUint64 === "number")
                            d.fieldUint64 = o.longs === String ? String(m.fieldUint64) : m.fieldUint64;
                        else
                            d.fieldUint64 = o.longs === String ? $util.Long.prototype.toString.call(m.fieldUint64) : o.longs === Number ? new $util.LongBits(m.fieldUint64.low >>> 0, m.fieldUint64.high >>> 0).toNumber(true) : m.fieldUint64;
                    }
                    if (m.fieldInt64 != null && m.hasOwnProperty("fieldInt64")) {
                        if (typeof m.fieldInt64 === "number")
                            d.fieldInt64 = o.longs === String ? String(m.fieldInt64) : m.fieldInt64;
                        else
                            d.fieldInt64 = o.longs === String ? $util.Long.prototype.toString.call(m.fieldInt64) : o.longs === Number ? new $util.LongBits(m.fieldInt64.low >>> 0, m.fieldInt64.high >>> 0).toNumber() : m.fieldInt64;
                    }
                    if (m.fieldFixed64 != null && m.hasOwnProperty("fieldFixed64")) {
                        if (typeof m.fieldFixed64 === "number")
                            d.fieldFixed64 = o.longs === String ? String(m.fieldFixed64) : m.fieldFixed64;
                        else
                            d.fieldFixed64 = o.longs === String ? $util.Long.prototype.toString.call(m.fieldFixed64) : o.longs === Number ? new $util.LongBits(m.fieldFixed64.low >>> 0, m.fieldFixed64.high >>> 0).toNumber() : m.fieldFixed64;
                    }
                    if (m.fieldSfixed64 != null && m.hasOwnProperty("fieldSfixed64")) {
                        if (typeof m.fieldSfixed64 === "number")
                            d.fieldSfixed64 = o.longs === String ? String(m.fieldSfixed64) : m.fieldSfixed64;
                        else
                            d.fieldSfixed64 = o.longs === String ? $util.Long.prototype.toString.call(m.fieldSfixed64) : o.longs === Number ? new $util.LongBits(m.fieldSfixed64.low >>> 0, m.fieldSfixed64.high >>> 0).toNumber() : m.fieldSfixed64;
                    }
                    if (m.fieldFixed32 != null && m.hasOwnProperty("fieldFixed32")) {
                        d.fieldFixed32 = m.fieldFixed32;
                    }
                    if (m.fieldSfixed32 != null && m.hasOwnProperty("fieldSfixed32")) {
                        d.fieldSfixed32 = m.fieldSfixed32;
                    }
                    if (m.fieldDouble != null && m.hasOwnProperty("fieldDouble")) {
                        d.fieldDouble = o.json && !isFinite(m.fieldDouble) ? String(m.fieldDouble) : m.fieldDouble;
                    }
                    if (m.fieldFloat != null && m.hasOwnProperty("fieldFloat")) {
                        d.fieldFloat = o.json && !isFinite(m.fieldFloat) ? String(m.fieldFloat) : m.fieldFloat;
                    }
                    if (m.fieldSint64 != null && m.hasOwnProperty("fieldSint64")) {
                        if (typeof m.fieldSint64 === "number")
                            d.fieldSint64 = o.longs === String ? String(m.fieldSint64) : m.fieldSint64;
                        else
                            d.fieldSint64 = o.longs === String ? $util.Long.prototype.toString.call(m.fieldSint64) : o.longs === Number ? new $util.LongBits(m.fieldSint64.low >>> 0, m.fieldSint64.high >>> 0).toNumber() : m.fieldSint64;
                    }
                    if (m.fieldSint32 != null && m.hasOwnProperty("fieldSint32")) {
                        d.fieldSint32 = m.fieldSint32;
                    }
                    if (m.fieldString != null && m.hasOwnProperty("fieldString")) {
                        d.fieldString = m.fieldString;
                    }
                    if (m.fieldBytes != null && m.hasOwnProperty("fieldBytes")) {
                        d.fieldBytes = o.bytes === String ? $util.base64.encode(m.fieldBytes, 0, m.fieldBytes.length) : o.bytes === Array ? Array.prototype.slice.call(m.fieldBytes) : m.fieldBytes;
                    }
                    return d;
                };

                /**
                 * Converts this DummyFields to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.TestConfig.DummyFields
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                DummyFields.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return DummyFields;
            })();

            return TestConfig;
        })();

        protos.TrackEventConfig = (function() {

            /**
             * Properties of a TrackEventConfig.
             * @memberof perfetto.protos
             * @interface ITrackEventConfig
             * @property {Array.<string>|null} [disabledCategories] TrackEventConfig disabledCategories
             * @property {Array.<string>|null} [enabledCategories] TrackEventConfig enabledCategories
             * @property {Array.<string>|null} [disabledTags] TrackEventConfig disabledTags
             * @property {Array.<string>|null} [enabledTags] TrackEventConfig enabledTags
             * @property {boolean|null} [disableIncrementalTimestamps] TrackEventConfig disableIncrementalTimestamps
             * @property {number|null} [timestampUnitMultiplier] TrackEventConfig timestampUnitMultiplier
             * @property {boolean|null} [filterDebugAnnotations] TrackEventConfig filterDebugAnnotations
             * @property {boolean|null} [enableThreadTimeSampling] TrackEventConfig enableThreadTimeSampling
             * @property {boolean|null} [filterDynamicEventNames] TrackEventConfig filterDynamicEventNames
             */

            /**
             * Constructs a new TrackEventConfig.
             * @memberof perfetto.protos
             * @classdesc Represents a TrackEventConfig.
             * @implements ITrackEventConfig
             * @constructor
             * @param {perfetto.protos.ITrackEventConfig=} [p] Properties to set
             */
            function TrackEventConfig(p) {
                this.disabledCategories = [];
                this.enabledCategories = [];
                this.disabledTags = [];
                this.enabledTags = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TrackEventConfig disabledCategories.
             * @member {Array.<string>} disabledCategories
             * @memberof perfetto.protos.TrackEventConfig
             * @instance
             */
            TrackEventConfig.prototype.disabledCategories = $util.emptyArray;

            /**
             * TrackEventConfig enabledCategories.
             * @member {Array.<string>} enabledCategories
             * @memberof perfetto.protos.TrackEventConfig
             * @instance
             */
            TrackEventConfig.prototype.enabledCategories = $util.emptyArray;

            /**
             * TrackEventConfig disabledTags.
             * @member {Array.<string>} disabledTags
             * @memberof perfetto.protos.TrackEventConfig
             * @instance
             */
            TrackEventConfig.prototype.disabledTags = $util.emptyArray;

            /**
             * TrackEventConfig enabledTags.
             * @member {Array.<string>} enabledTags
             * @memberof perfetto.protos.TrackEventConfig
             * @instance
             */
            TrackEventConfig.prototype.enabledTags = $util.emptyArray;

            /**
             * TrackEventConfig disableIncrementalTimestamps.
             * @member {boolean} disableIncrementalTimestamps
             * @memberof perfetto.protos.TrackEventConfig
             * @instance
             */
            TrackEventConfig.prototype.disableIncrementalTimestamps = false;

            /**
             * TrackEventConfig timestampUnitMultiplier.
             * @member {number} timestampUnitMultiplier
             * @memberof perfetto.protos.TrackEventConfig
             * @instance
             */
            TrackEventConfig.prototype.timestampUnitMultiplier = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TrackEventConfig filterDebugAnnotations.
             * @member {boolean} filterDebugAnnotations
             * @memberof perfetto.protos.TrackEventConfig
             * @instance
             */
            TrackEventConfig.prototype.filterDebugAnnotations = false;

            /**
             * TrackEventConfig enableThreadTimeSampling.
             * @member {boolean} enableThreadTimeSampling
             * @memberof perfetto.protos.TrackEventConfig
             * @instance
             */
            TrackEventConfig.prototype.enableThreadTimeSampling = false;

            /**
             * TrackEventConfig filterDynamicEventNames.
             * @member {boolean} filterDynamicEventNames
             * @memberof perfetto.protos.TrackEventConfig
             * @instance
             */
            TrackEventConfig.prototype.filterDynamicEventNames = false;

            /**
             * Creates a new TrackEventConfig instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrackEventConfig
             * @static
             * @param {perfetto.protos.ITrackEventConfig=} [properties] Properties to set
             * @returns {perfetto.protos.TrackEventConfig} TrackEventConfig instance
             */
            TrackEventConfig.create = function create(properties) {
                return new TrackEventConfig(properties);
            };

            /**
             * Encodes the specified TrackEventConfig message. Does not implicitly {@link perfetto.protos.TrackEventConfig.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrackEventConfig
             * @static
             * @param {perfetto.protos.ITrackEventConfig} m TrackEventConfig message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrackEventConfig.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.disabledCategories != null && m.disabledCategories.length) {
                    for (var i = 0; i < m.disabledCategories.length; ++i)
                        w.uint32(10).string(m.disabledCategories[i]);
                }
                if (m.enabledCategories != null && m.enabledCategories.length) {
                    for (var i = 0; i < m.enabledCategories.length; ++i)
                        w.uint32(18).string(m.enabledCategories[i]);
                }
                if (m.disabledTags != null && m.disabledTags.length) {
                    for (var i = 0; i < m.disabledTags.length; ++i)
                        w.uint32(26).string(m.disabledTags[i]);
                }
                if (m.enabledTags != null && m.enabledTags.length) {
                    for (var i = 0; i < m.enabledTags.length; ++i)
                        w.uint32(34).string(m.enabledTags[i]);
                }
                if (m.disableIncrementalTimestamps != null && Object.hasOwnProperty.call(m, "disableIncrementalTimestamps"))
                    w.uint32(40).bool(m.disableIncrementalTimestamps);
                if (m.timestampUnitMultiplier != null && Object.hasOwnProperty.call(m, "timestampUnitMultiplier"))
                    w.uint32(48).uint64(m.timestampUnitMultiplier);
                if (m.filterDebugAnnotations != null && Object.hasOwnProperty.call(m, "filterDebugAnnotations"))
                    w.uint32(56).bool(m.filterDebugAnnotations);
                if (m.enableThreadTimeSampling != null && Object.hasOwnProperty.call(m, "enableThreadTimeSampling"))
                    w.uint32(64).bool(m.enableThreadTimeSampling);
                if (m.filterDynamicEventNames != null && Object.hasOwnProperty.call(m, "filterDynamicEventNames"))
                    w.uint32(72).bool(m.filterDynamicEventNames);
                return w;
            };

            /**
             * Encodes the specified TrackEventConfig message, length delimited. Does not implicitly {@link perfetto.protos.TrackEventConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrackEventConfig
             * @static
             * @param {perfetto.protos.ITrackEventConfig} message TrackEventConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrackEventConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrackEventConfig message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrackEventConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrackEventConfig} TrackEventConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrackEventConfig.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrackEventConfig();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.disabledCategories && m.disabledCategories.length))
                            m.disabledCategories = [];
                        m.disabledCategories.push(r.string());
                        break;
                    case 2:
                        if (!(m.enabledCategories && m.enabledCategories.length))
                            m.enabledCategories = [];
                        m.enabledCategories.push(r.string());
                        break;
                    case 3:
                        if (!(m.disabledTags && m.disabledTags.length))
                            m.disabledTags = [];
                        m.disabledTags.push(r.string());
                        break;
                    case 4:
                        if (!(m.enabledTags && m.enabledTags.length))
                            m.enabledTags = [];
                        m.enabledTags.push(r.string());
                        break;
                    case 5:
                        m.disableIncrementalTimestamps = r.bool();
                        break;
                    case 6:
                        m.timestampUnitMultiplier = r.uint64();
                        break;
                    case 7:
                        m.filterDebugAnnotations = r.bool();
                        break;
                    case 8:
                        m.enableThreadTimeSampling = r.bool();
                        break;
                    case 9:
                        m.filterDynamicEventNames = r.bool();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrackEventConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrackEventConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrackEventConfig} TrackEventConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrackEventConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrackEventConfig message.
             * @function verify
             * @memberof perfetto.protos.TrackEventConfig
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrackEventConfig.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.disabledCategories != null && m.hasOwnProperty("disabledCategories")) {
                    if (!Array.isArray(m.disabledCategories))
                        return "disabledCategories: array expected";
                    for (var i = 0; i < m.disabledCategories.length; ++i) {
                        if (!$util.isString(m.disabledCategories[i]))
                            return "disabledCategories: string[] expected";
                    }
                }
                if (m.enabledCategories != null && m.hasOwnProperty("enabledCategories")) {
                    if (!Array.isArray(m.enabledCategories))
                        return "enabledCategories: array expected";
                    for (var i = 0; i < m.enabledCategories.length; ++i) {
                        if (!$util.isString(m.enabledCategories[i]))
                            return "enabledCategories: string[] expected";
                    }
                }
                if (m.disabledTags != null && m.hasOwnProperty("disabledTags")) {
                    if (!Array.isArray(m.disabledTags))
                        return "disabledTags: array expected";
                    for (var i = 0; i < m.disabledTags.length; ++i) {
                        if (!$util.isString(m.disabledTags[i]))
                            return "disabledTags: string[] expected";
                    }
                }
                if (m.enabledTags != null && m.hasOwnProperty("enabledTags")) {
                    if (!Array.isArray(m.enabledTags))
                        return "enabledTags: array expected";
                    for (var i = 0; i < m.enabledTags.length; ++i) {
                        if (!$util.isString(m.enabledTags[i]))
                            return "enabledTags: string[] expected";
                    }
                }
                if (m.disableIncrementalTimestamps != null && m.hasOwnProperty("disableIncrementalTimestamps")) {
                    if (typeof m.disableIncrementalTimestamps !== "boolean")
                        return "disableIncrementalTimestamps: boolean expected";
                }
                if (m.timestampUnitMultiplier != null && m.hasOwnProperty("timestampUnitMultiplier")) {
                    if (!$util.isInteger(m.timestampUnitMultiplier) && !(m.timestampUnitMultiplier && $util.isInteger(m.timestampUnitMultiplier.low) && $util.isInteger(m.timestampUnitMultiplier.high)))
                        return "timestampUnitMultiplier: integer|Long expected";
                }
                if (m.filterDebugAnnotations != null && m.hasOwnProperty("filterDebugAnnotations")) {
                    if (typeof m.filterDebugAnnotations !== "boolean")
                        return "filterDebugAnnotations: boolean expected";
                }
                if (m.enableThreadTimeSampling != null && m.hasOwnProperty("enableThreadTimeSampling")) {
                    if (typeof m.enableThreadTimeSampling !== "boolean")
                        return "enableThreadTimeSampling: boolean expected";
                }
                if (m.filterDynamicEventNames != null && m.hasOwnProperty("filterDynamicEventNames")) {
                    if (typeof m.filterDynamicEventNames !== "boolean")
                        return "filterDynamicEventNames: boolean expected";
                }
                return null;
            };

            /**
             * Creates a TrackEventConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrackEventConfig
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrackEventConfig} TrackEventConfig
             */
            TrackEventConfig.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrackEventConfig)
                    return d;
                var m = new $root.perfetto.protos.TrackEventConfig();
                if (d.disabledCategories) {
                    if (!Array.isArray(d.disabledCategories))
                        throw TypeError(".perfetto.protos.TrackEventConfig.disabledCategories: array expected");
                    m.disabledCategories = [];
                    for (var i = 0; i < d.disabledCategories.length; ++i) {
                        m.disabledCategories[i] = String(d.disabledCategories[i]);
                    }
                }
                if (d.enabledCategories) {
                    if (!Array.isArray(d.enabledCategories))
                        throw TypeError(".perfetto.protos.TrackEventConfig.enabledCategories: array expected");
                    m.enabledCategories = [];
                    for (var i = 0; i < d.enabledCategories.length; ++i) {
                        m.enabledCategories[i] = String(d.enabledCategories[i]);
                    }
                }
                if (d.disabledTags) {
                    if (!Array.isArray(d.disabledTags))
                        throw TypeError(".perfetto.protos.TrackEventConfig.disabledTags: array expected");
                    m.disabledTags = [];
                    for (var i = 0; i < d.disabledTags.length; ++i) {
                        m.disabledTags[i] = String(d.disabledTags[i]);
                    }
                }
                if (d.enabledTags) {
                    if (!Array.isArray(d.enabledTags))
                        throw TypeError(".perfetto.protos.TrackEventConfig.enabledTags: array expected");
                    m.enabledTags = [];
                    for (var i = 0; i < d.enabledTags.length; ++i) {
                        m.enabledTags[i] = String(d.enabledTags[i]);
                    }
                }
                if (d.disableIncrementalTimestamps != null) {
                    m.disableIncrementalTimestamps = Boolean(d.disableIncrementalTimestamps);
                }
                if (d.timestampUnitMultiplier != null) {
                    if ($util.Long)
                        (m.timestampUnitMultiplier = $util.Long.fromValue(d.timestampUnitMultiplier)).unsigned = true;
                    else if (typeof d.timestampUnitMultiplier === "string")
                        m.timestampUnitMultiplier = parseInt(d.timestampUnitMultiplier, 10);
                    else if (typeof d.timestampUnitMultiplier === "number")
                        m.timestampUnitMultiplier = d.timestampUnitMultiplier;
                    else if (typeof d.timestampUnitMultiplier === "object")
                        m.timestampUnitMultiplier = new $util.LongBits(d.timestampUnitMultiplier.low >>> 0, d.timestampUnitMultiplier.high >>> 0).toNumber(true);
                }
                if (d.filterDebugAnnotations != null) {
                    m.filterDebugAnnotations = Boolean(d.filterDebugAnnotations);
                }
                if (d.enableThreadTimeSampling != null) {
                    m.enableThreadTimeSampling = Boolean(d.enableThreadTimeSampling);
                }
                if (d.filterDynamicEventNames != null) {
                    m.filterDynamicEventNames = Boolean(d.filterDynamicEventNames);
                }
                return m;
            };

            /**
             * Creates a plain object from a TrackEventConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrackEventConfig
             * @static
             * @param {perfetto.protos.TrackEventConfig} m TrackEventConfig
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrackEventConfig.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.disabledCategories = [];
                    d.enabledCategories = [];
                    d.disabledTags = [];
                    d.enabledTags = [];
                }
                if (o.defaults) {
                    d.disableIncrementalTimestamps = false;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.timestampUnitMultiplier = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.timestampUnitMultiplier = o.longs === String ? "0" : 0;
                    d.filterDebugAnnotations = false;
                    d.enableThreadTimeSampling = false;
                    d.filterDynamicEventNames = false;
                }
                if (m.disabledCategories && m.disabledCategories.length) {
                    d.disabledCategories = [];
                    for (var j = 0; j < m.disabledCategories.length; ++j) {
                        d.disabledCategories[j] = m.disabledCategories[j];
                    }
                }
                if (m.enabledCategories && m.enabledCategories.length) {
                    d.enabledCategories = [];
                    for (var j = 0; j < m.enabledCategories.length; ++j) {
                        d.enabledCategories[j] = m.enabledCategories[j];
                    }
                }
                if (m.disabledTags && m.disabledTags.length) {
                    d.disabledTags = [];
                    for (var j = 0; j < m.disabledTags.length; ++j) {
                        d.disabledTags[j] = m.disabledTags[j];
                    }
                }
                if (m.enabledTags && m.enabledTags.length) {
                    d.enabledTags = [];
                    for (var j = 0; j < m.enabledTags.length; ++j) {
                        d.enabledTags[j] = m.enabledTags[j];
                    }
                }
                if (m.disableIncrementalTimestamps != null && m.hasOwnProperty("disableIncrementalTimestamps")) {
                    d.disableIncrementalTimestamps = m.disableIncrementalTimestamps;
                }
                if (m.timestampUnitMultiplier != null && m.hasOwnProperty("timestampUnitMultiplier")) {
                    if (typeof m.timestampUnitMultiplier === "number")
                        d.timestampUnitMultiplier = o.longs === String ? String(m.timestampUnitMultiplier) : m.timestampUnitMultiplier;
                    else
                        d.timestampUnitMultiplier = o.longs === String ? $util.Long.prototype.toString.call(m.timestampUnitMultiplier) : o.longs === Number ? new $util.LongBits(m.timestampUnitMultiplier.low >>> 0, m.timestampUnitMultiplier.high >>> 0).toNumber(true) : m.timestampUnitMultiplier;
                }
                if (m.filterDebugAnnotations != null && m.hasOwnProperty("filterDebugAnnotations")) {
                    d.filterDebugAnnotations = m.filterDebugAnnotations;
                }
                if (m.enableThreadTimeSampling != null && m.hasOwnProperty("enableThreadTimeSampling")) {
                    d.enableThreadTimeSampling = m.enableThreadTimeSampling;
                }
                if (m.filterDynamicEventNames != null && m.hasOwnProperty("filterDynamicEventNames")) {
                    d.filterDynamicEventNames = m.filterDynamicEventNames;
                }
                return d;
            };

            /**
             * Converts this TrackEventConfig to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrackEventConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrackEventConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrackEventConfig;
        })();

        protos.DataSourceConfig = (function() {

            /**
             * Properties of a DataSourceConfig.
             * @memberof perfetto.protos
             * @interface IDataSourceConfig
             * @property {string|null} [name] DataSourceConfig name
             * @property {number|null} [targetBuffer] DataSourceConfig targetBuffer
             * @property {number|null} [traceDurationMs] DataSourceConfig traceDurationMs
             * @property {number|null} [stopTimeoutMs] DataSourceConfig stopTimeoutMs
             * @property {boolean|null} [enableExtraGuardrails] DataSourceConfig enableExtraGuardrails
             * @property {perfetto.protos.DataSourceConfig.SessionInitiator|null} [sessionInitiator] DataSourceConfig sessionInitiator
             * @property {number|null} [tracingSessionId] DataSourceConfig tracingSessionId
             * @property {perfetto.protos.IFtraceConfig|null} [ftraceConfig] DataSourceConfig ftraceConfig
             * @property {perfetto.protos.IInodeFileConfig|null} [inodeFileConfig] DataSourceConfig inodeFileConfig
             * @property {perfetto.protos.IProcessStatsConfig|null} [processStatsConfig] DataSourceConfig processStatsConfig
             * @property {perfetto.protos.ISysStatsConfig|null} [sysStatsConfig] DataSourceConfig sysStatsConfig
             * @property {perfetto.protos.IHeapprofdConfig|null} [heapprofdConfig] DataSourceConfig heapprofdConfig
             * @property {perfetto.protos.IJavaHprofConfig|null} [javaHprofConfig] DataSourceConfig javaHprofConfig
             * @property {perfetto.protos.IAndroidPowerConfig|null} [androidPowerConfig] DataSourceConfig androidPowerConfig
             * @property {perfetto.protos.IAndroidLogConfig|null} [androidLogConfig] DataSourceConfig androidLogConfig
             * @property {perfetto.protos.IGpuCounterConfig|null} [gpuCounterConfig] DataSourceConfig gpuCounterConfig
             * @property {perfetto.protos.IAndroidGameInterventionListConfig|null} [androidGameInterventionListConfig] DataSourceConfig androidGameInterventionListConfig
             * @property {perfetto.protos.IPackagesListConfig|null} [packagesListConfig] DataSourceConfig packagesListConfig
             * @property {perfetto.protos.IPerfEventConfig|null} [perfEventConfig] DataSourceConfig perfEventConfig
             * @property {perfetto.protos.IVulkanMemoryConfig|null} [vulkanMemoryConfig] DataSourceConfig vulkanMemoryConfig
             * @property {perfetto.protos.ITrackEventConfig|null} [trackEventConfig] DataSourceConfig trackEventConfig
             * @property {perfetto.protos.IAndroidPolledStateConfig|null} [androidPolledStateConfig] DataSourceConfig androidPolledStateConfig
             * @property {perfetto.protos.IAndroidSystemPropertyConfig|null} [androidSystemPropertyConfig] DataSourceConfig androidSystemPropertyConfig
             * @property {perfetto.protos.IStatsdTracingConfig|null} [statsdTracingConfig] DataSourceConfig statsdTracingConfig
             * @property {perfetto.protos.ISystemInfoConfig|null} [systemInfoConfig] DataSourceConfig systemInfoConfig
             * @property {perfetto.protos.IChromeConfig|null} [chromeConfig] DataSourceConfig chromeConfig
             * @property {perfetto.protos.IInterceptorConfig|null} [interceptorConfig] DataSourceConfig interceptorConfig
             * @property {string|null} [legacyConfig] DataSourceConfig legacyConfig
             * @property {perfetto.protos.ITestConfig|null} [forTesting] DataSourceConfig forTesting
             */

            /**
             * Constructs a new DataSourceConfig.
             * @memberof perfetto.protos
             * @classdesc Represents a DataSourceConfig.
             * @implements IDataSourceConfig
             * @constructor
             * @param {perfetto.protos.IDataSourceConfig=} [p] Properties to set
             */
            function DataSourceConfig(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DataSourceConfig name.
             * @member {string} name
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.name = "";

            /**
             * DataSourceConfig targetBuffer.
             * @member {number} targetBuffer
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.targetBuffer = 0;

            /**
             * DataSourceConfig traceDurationMs.
             * @member {number} traceDurationMs
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.traceDurationMs = 0;

            /**
             * DataSourceConfig stopTimeoutMs.
             * @member {number} stopTimeoutMs
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.stopTimeoutMs = 0;

            /**
             * DataSourceConfig enableExtraGuardrails.
             * @member {boolean} enableExtraGuardrails
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.enableExtraGuardrails = false;

            /**
             * DataSourceConfig sessionInitiator.
             * @member {perfetto.protos.DataSourceConfig.SessionInitiator} sessionInitiator
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.sessionInitiator = 0;

            /**
             * DataSourceConfig tracingSessionId.
             * @member {number} tracingSessionId
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.tracingSessionId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * DataSourceConfig ftraceConfig.
             * @member {perfetto.protos.IFtraceConfig|null|undefined} ftraceConfig
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.ftraceConfig = null;

            /**
             * DataSourceConfig inodeFileConfig.
             * @member {perfetto.protos.IInodeFileConfig|null|undefined} inodeFileConfig
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.inodeFileConfig = null;

            /**
             * DataSourceConfig processStatsConfig.
             * @member {perfetto.protos.IProcessStatsConfig|null|undefined} processStatsConfig
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.processStatsConfig = null;

            /**
             * DataSourceConfig sysStatsConfig.
             * @member {perfetto.protos.ISysStatsConfig|null|undefined} sysStatsConfig
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.sysStatsConfig = null;

            /**
             * DataSourceConfig heapprofdConfig.
             * @member {perfetto.protos.IHeapprofdConfig|null|undefined} heapprofdConfig
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.heapprofdConfig = null;

            /**
             * DataSourceConfig javaHprofConfig.
             * @member {perfetto.protos.IJavaHprofConfig|null|undefined} javaHprofConfig
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.javaHprofConfig = null;

            /**
             * DataSourceConfig androidPowerConfig.
             * @member {perfetto.protos.IAndroidPowerConfig|null|undefined} androidPowerConfig
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.androidPowerConfig = null;

            /**
             * DataSourceConfig androidLogConfig.
             * @member {perfetto.protos.IAndroidLogConfig|null|undefined} androidLogConfig
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.androidLogConfig = null;

            /**
             * DataSourceConfig gpuCounterConfig.
             * @member {perfetto.protos.IGpuCounterConfig|null|undefined} gpuCounterConfig
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.gpuCounterConfig = null;

            /**
             * DataSourceConfig androidGameInterventionListConfig.
             * @member {perfetto.protos.IAndroidGameInterventionListConfig|null|undefined} androidGameInterventionListConfig
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.androidGameInterventionListConfig = null;

            /**
             * DataSourceConfig packagesListConfig.
             * @member {perfetto.protos.IPackagesListConfig|null|undefined} packagesListConfig
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.packagesListConfig = null;

            /**
             * DataSourceConfig perfEventConfig.
             * @member {perfetto.protos.IPerfEventConfig|null|undefined} perfEventConfig
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.perfEventConfig = null;

            /**
             * DataSourceConfig vulkanMemoryConfig.
             * @member {perfetto.protos.IVulkanMemoryConfig|null|undefined} vulkanMemoryConfig
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.vulkanMemoryConfig = null;

            /**
             * DataSourceConfig trackEventConfig.
             * @member {perfetto.protos.ITrackEventConfig|null|undefined} trackEventConfig
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.trackEventConfig = null;

            /**
             * DataSourceConfig androidPolledStateConfig.
             * @member {perfetto.protos.IAndroidPolledStateConfig|null|undefined} androidPolledStateConfig
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.androidPolledStateConfig = null;

            /**
             * DataSourceConfig androidSystemPropertyConfig.
             * @member {perfetto.protos.IAndroidSystemPropertyConfig|null|undefined} androidSystemPropertyConfig
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.androidSystemPropertyConfig = null;

            /**
             * DataSourceConfig statsdTracingConfig.
             * @member {perfetto.protos.IStatsdTracingConfig|null|undefined} statsdTracingConfig
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.statsdTracingConfig = null;

            /**
             * DataSourceConfig systemInfoConfig.
             * @member {perfetto.protos.ISystemInfoConfig|null|undefined} systemInfoConfig
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.systemInfoConfig = null;

            /**
             * DataSourceConfig chromeConfig.
             * @member {perfetto.protos.IChromeConfig|null|undefined} chromeConfig
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.chromeConfig = null;

            /**
             * DataSourceConfig interceptorConfig.
             * @member {perfetto.protos.IInterceptorConfig|null|undefined} interceptorConfig
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.interceptorConfig = null;

            /**
             * DataSourceConfig legacyConfig.
             * @member {string} legacyConfig
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.legacyConfig = "";

            /**
             * DataSourceConfig forTesting.
             * @member {perfetto.protos.ITestConfig|null|undefined} forTesting
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             */
            DataSourceConfig.prototype.forTesting = null;

            /**
             * Creates a new DataSourceConfig instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DataSourceConfig
             * @static
             * @param {perfetto.protos.IDataSourceConfig=} [properties] Properties to set
             * @returns {perfetto.protos.DataSourceConfig} DataSourceConfig instance
             */
            DataSourceConfig.create = function create(properties) {
                return new DataSourceConfig(properties);
            };

            /**
             * Encodes the specified DataSourceConfig message. Does not implicitly {@link perfetto.protos.DataSourceConfig.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DataSourceConfig
             * @static
             * @param {perfetto.protos.IDataSourceConfig} m DataSourceConfig message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DataSourceConfig.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                if (m.targetBuffer != null && Object.hasOwnProperty.call(m, "targetBuffer"))
                    w.uint32(16).uint32(m.targetBuffer);
                if (m.traceDurationMs != null && Object.hasOwnProperty.call(m, "traceDurationMs"))
                    w.uint32(24).uint32(m.traceDurationMs);
                if (m.tracingSessionId != null && Object.hasOwnProperty.call(m, "tracingSessionId"))
                    w.uint32(32).uint64(m.tracingSessionId);
                if (m.enableExtraGuardrails != null && Object.hasOwnProperty.call(m, "enableExtraGuardrails"))
                    w.uint32(48).bool(m.enableExtraGuardrails);
                if (m.stopTimeoutMs != null && Object.hasOwnProperty.call(m, "stopTimeoutMs"))
                    w.uint32(56).uint32(m.stopTimeoutMs);
                if (m.sessionInitiator != null && Object.hasOwnProperty.call(m, "sessionInitiator"))
                    w.uint32(64).int32(m.sessionInitiator);
                if (m.ftraceConfig != null && Object.hasOwnProperty.call(m, "ftraceConfig"))
                    $root.perfetto.protos.FtraceConfig.encode(m.ftraceConfig, w.uint32(802).fork()).ldelim();
                if (m.chromeConfig != null && Object.hasOwnProperty.call(m, "chromeConfig"))
                    $root.perfetto.protos.ChromeConfig.encode(m.chromeConfig, w.uint32(810).fork()).ldelim();
                if (m.inodeFileConfig != null && Object.hasOwnProperty.call(m, "inodeFileConfig"))
                    $root.perfetto.protos.InodeFileConfig.encode(m.inodeFileConfig, w.uint32(818).fork()).ldelim();
                if (m.processStatsConfig != null && Object.hasOwnProperty.call(m, "processStatsConfig"))
                    $root.perfetto.protos.ProcessStatsConfig.encode(m.processStatsConfig, w.uint32(826).fork()).ldelim();
                if (m.sysStatsConfig != null && Object.hasOwnProperty.call(m, "sysStatsConfig"))
                    $root.perfetto.protos.SysStatsConfig.encode(m.sysStatsConfig, w.uint32(834).fork()).ldelim();
                if (m.heapprofdConfig != null && Object.hasOwnProperty.call(m, "heapprofdConfig"))
                    $root.perfetto.protos.HeapprofdConfig.encode(m.heapprofdConfig, w.uint32(842).fork()).ldelim();
                if (m.androidPowerConfig != null && Object.hasOwnProperty.call(m, "androidPowerConfig"))
                    $root.perfetto.protos.AndroidPowerConfig.encode(m.androidPowerConfig, w.uint32(850).fork()).ldelim();
                if (m.androidLogConfig != null && Object.hasOwnProperty.call(m, "androidLogConfig"))
                    $root.perfetto.protos.AndroidLogConfig.encode(m.androidLogConfig, w.uint32(858).fork()).ldelim();
                if (m.gpuCounterConfig != null && Object.hasOwnProperty.call(m, "gpuCounterConfig"))
                    $root.perfetto.protos.GpuCounterConfig.encode(m.gpuCounterConfig, w.uint32(866).fork()).ldelim();
                if (m.packagesListConfig != null && Object.hasOwnProperty.call(m, "packagesListConfig"))
                    $root.perfetto.protos.PackagesListConfig.encode(m.packagesListConfig, w.uint32(874).fork()).ldelim();
                if (m.javaHprofConfig != null && Object.hasOwnProperty.call(m, "javaHprofConfig"))
                    $root.perfetto.protos.JavaHprofConfig.encode(m.javaHprofConfig, w.uint32(882).fork()).ldelim();
                if (m.perfEventConfig != null && Object.hasOwnProperty.call(m, "perfEventConfig"))
                    $root.perfetto.protos.PerfEventConfig.encode(m.perfEventConfig, w.uint32(890).fork()).ldelim();
                if (m.vulkanMemoryConfig != null && Object.hasOwnProperty.call(m, "vulkanMemoryConfig"))
                    $root.perfetto.protos.VulkanMemoryConfig.encode(m.vulkanMemoryConfig, w.uint32(898).fork()).ldelim();
                if (m.trackEventConfig != null && Object.hasOwnProperty.call(m, "trackEventConfig"))
                    $root.perfetto.protos.TrackEventConfig.encode(m.trackEventConfig, w.uint32(906).fork()).ldelim();
                if (m.androidPolledStateConfig != null && Object.hasOwnProperty.call(m, "androidPolledStateConfig"))
                    $root.perfetto.protos.AndroidPolledStateConfig.encode(m.androidPolledStateConfig, w.uint32(914).fork()).ldelim();
                if (m.interceptorConfig != null && Object.hasOwnProperty.call(m, "interceptorConfig"))
                    $root.perfetto.protos.InterceptorConfig.encode(m.interceptorConfig, w.uint32(922).fork()).ldelim();
                if (m.androidGameInterventionListConfig != null && Object.hasOwnProperty.call(m, "androidGameInterventionListConfig"))
                    $root.perfetto.protos.AndroidGameInterventionListConfig.encode(m.androidGameInterventionListConfig, w.uint32(930).fork()).ldelim();
                if (m.statsdTracingConfig != null && Object.hasOwnProperty.call(m, "statsdTracingConfig"))
                    $root.perfetto.protos.StatsdTracingConfig.encode(m.statsdTracingConfig, w.uint32(938).fork()).ldelim();
                if (m.androidSystemPropertyConfig != null && Object.hasOwnProperty.call(m, "androidSystemPropertyConfig"))
                    $root.perfetto.protos.AndroidSystemPropertyConfig.encode(m.androidSystemPropertyConfig, w.uint32(946).fork()).ldelim();
                if (m.systemInfoConfig != null && Object.hasOwnProperty.call(m, "systemInfoConfig"))
                    $root.perfetto.protos.SystemInfoConfig.encode(m.systemInfoConfig, w.uint32(954).fork()).ldelim();
                if (m.legacyConfig != null && Object.hasOwnProperty.call(m, "legacyConfig"))
                    w.uint32(8002).string(m.legacyConfig);
                if (m.forTesting != null && Object.hasOwnProperty.call(m, "forTesting"))
                    $root.perfetto.protos.TestConfig.encode(m.forTesting, w.uint32(8010).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified DataSourceConfig message, length delimited. Does not implicitly {@link perfetto.protos.DataSourceConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DataSourceConfig
             * @static
             * @param {perfetto.protos.IDataSourceConfig} message DataSourceConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DataSourceConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DataSourceConfig message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DataSourceConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DataSourceConfig} DataSourceConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DataSourceConfig.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DataSourceConfig();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    case 2:
                        m.targetBuffer = r.uint32();
                        break;
                    case 3:
                        m.traceDurationMs = r.uint32();
                        break;
                    case 7:
                        m.stopTimeoutMs = r.uint32();
                        break;
                    case 6:
                        m.enableExtraGuardrails = r.bool();
                        break;
                    case 8:
                        m.sessionInitiator = r.int32();
                        break;
                    case 4:
                        m.tracingSessionId = r.uint64();
                        break;
                    case 100:
                        m.ftraceConfig = $root.perfetto.protos.FtraceConfig.decode(r, r.uint32());
                        break;
                    case 102:
                        m.inodeFileConfig = $root.perfetto.protos.InodeFileConfig.decode(r, r.uint32());
                        break;
                    case 103:
                        m.processStatsConfig = $root.perfetto.protos.ProcessStatsConfig.decode(r, r.uint32());
                        break;
                    case 104:
                        m.sysStatsConfig = $root.perfetto.protos.SysStatsConfig.decode(r, r.uint32());
                        break;
                    case 105:
                        m.heapprofdConfig = $root.perfetto.protos.HeapprofdConfig.decode(r, r.uint32());
                        break;
                    case 110:
                        m.javaHprofConfig = $root.perfetto.protos.JavaHprofConfig.decode(r, r.uint32());
                        break;
                    case 106:
                        m.androidPowerConfig = $root.perfetto.protos.AndroidPowerConfig.decode(r, r.uint32());
                        break;
                    case 107:
                        m.androidLogConfig = $root.perfetto.protos.AndroidLogConfig.decode(r, r.uint32());
                        break;
                    case 108:
                        m.gpuCounterConfig = $root.perfetto.protos.GpuCounterConfig.decode(r, r.uint32());
                        break;
                    case 116:
                        m.androidGameInterventionListConfig = $root.perfetto.protos.AndroidGameInterventionListConfig.decode(r, r.uint32());
                        break;
                    case 109:
                        m.packagesListConfig = $root.perfetto.protos.PackagesListConfig.decode(r, r.uint32());
                        break;
                    case 111:
                        m.perfEventConfig = $root.perfetto.protos.PerfEventConfig.decode(r, r.uint32());
                        break;
                    case 112:
                        m.vulkanMemoryConfig = $root.perfetto.protos.VulkanMemoryConfig.decode(r, r.uint32());
                        break;
                    case 113:
                        m.trackEventConfig = $root.perfetto.protos.TrackEventConfig.decode(r, r.uint32());
                        break;
                    case 114:
                        m.androidPolledStateConfig = $root.perfetto.protos.AndroidPolledStateConfig.decode(r, r.uint32());
                        break;
                    case 118:
                        m.androidSystemPropertyConfig = $root.perfetto.protos.AndroidSystemPropertyConfig.decode(r, r.uint32());
                        break;
                    case 117:
                        m.statsdTracingConfig = $root.perfetto.protos.StatsdTracingConfig.decode(r, r.uint32());
                        break;
                    case 119:
                        m.systemInfoConfig = $root.perfetto.protos.SystemInfoConfig.decode(r, r.uint32());
                        break;
                    case 101:
                        m.chromeConfig = $root.perfetto.protos.ChromeConfig.decode(r, r.uint32());
                        break;
                    case 115:
                        m.interceptorConfig = $root.perfetto.protos.InterceptorConfig.decode(r, r.uint32());
                        break;
                    case 1000:
                        m.legacyConfig = r.string();
                        break;
                    case 1001:
                        m.forTesting = $root.perfetto.protos.TestConfig.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DataSourceConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DataSourceConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DataSourceConfig} DataSourceConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DataSourceConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DataSourceConfig message.
             * @function verify
             * @memberof perfetto.protos.DataSourceConfig
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DataSourceConfig.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.targetBuffer != null && m.hasOwnProperty("targetBuffer")) {
                    if (!$util.isInteger(m.targetBuffer))
                        return "targetBuffer: integer expected";
                }
                if (m.traceDurationMs != null && m.hasOwnProperty("traceDurationMs")) {
                    if (!$util.isInteger(m.traceDurationMs))
                        return "traceDurationMs: integer expected";
                }
                if (m.stopTimeoutMs != null && m.hasOwnProperty("stopTimeoutMs")) {
                    if (!$util.isInteger(m.stopTimeoutMs))
                        return "stopTimeoutMs: integer expected";
                }
                if (m.enableExtraGuardrails != null && m.hasOwnProperty("enableExtraGuardrails")) {
                    if (typeof m.enableExtraGuardrails !== "boolean")
                        return "enableExtraGuardrails: boolean expected";
                }
                if (m.sessionInitiator != null && m.hasOwnProperty("sessionInitiator")) {
                    switch (m.sessionInitiator) {
                    default:
                        return "sessionInitiator: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                }
                if (m.tracingSessionId != null && m.hasOwnProperty("tracingSessionId")) {
                    if (!$util.isInteger(m.tracingSessionId) && !(m.tracingSessionId && $util.isInteger(m.tracingSessionId.low) && $util.isInteger(m.tracingSessionId.high)))
                        return "tracingSessionId: integer|Long expected";
                }
                if (m.ftraceConfig != null && m.hasOwnProperty("ftraceConfig")) {
                    {
                        var e = $root.perfetto.protos.FtraceConfig.verify(m.ftraceConfig);
                        if (e)
                            return "ftraceConfig." + e;
                    }
                }
                if (m.inodeFileConfig != null && m.hasOwnProperty("inodeFileConfig")) {
                    {
                        var e = $root.perfetto.protos.InodeFileConfig.verify(m.inodeFileConfig);
                        if (e)
                            return "inodeFileConfig." + e;
                    }
                }
                if (m.processStatsConfig != null && m.hasOwnProperty("processStatsConfig")) {
                    {
                        var e = $root.perfetto.protos.ProcessStatsConfig.verify(m.processStatsConfig);
                        if (e)
                            return "processStatsConfig." + e;
                    }
                }
                if (m.sysStatsConfig != null && m.hasOwnProperty("sysStatsConfig")) {
                    {
                        var e = $root.perfetto.protos.SysStatsConfig.verify(m.sysStatsConfig);
                        if (e)
                            return "sysStatsConfig." + e;
                    }
                }
                if (m.heapprofdConfig != null && m.hasOwnProperty("heapprofdConfig")) {
                    {
                        var e = $root.perfetto.protos.HeapprofdConfig.verify(m.heapprofdConfig);
                        if (e)
                            return "heapprofdConfig." + e;
                    }
                }
                if (m.javaHprofConfig != null && m.hasOwnProperty("javaHprofConfig")) {
                    {
                        var e = $root.perfetto.protos.JavaHprofConfig.verify(m.javaHprofConfig);
                        if (e)
                            return "javaHprofConfig." + e;
                    }
                }
                if (m.androidPowerConfig != null && m.hasOwnProperty("androidPowerConfig")) {
                    {
                        var e = $root.perfetto.protos.AndroidPowerConfig.verify(m.androidPowerConfig);
                        if (e)
                            return "androidPowerConfig." + e;
                    }
                }
                if (m.androidLogConfig != null && m.hasOwnProperty("androidLogConfig")) {
                    {
                        var e = $root.perfetto.protos.AndroidLogConfig.verify(m.androidLogConfig);
                        if (e)
                            return "androidLogConfig." + e;
                    }
                }
                if (m.gpuCounterConfig != null && m.hasOwnProperty("gpuCounterConfig")) {
                    {
                        var e = $root.perfetto.protos.GpuCounterConfig.verify(m.gpuCounterConfig);
                        if (e)
                            return "gpuCounterConfig." + e;
                    }
                }
                if (m.androidGameInterventionListConfig != null && m.hasOwnProperty("androidGameInterventionListConfig")) {
                    {
                        var e = $root.perfetto.protos.AndroidGameInterventionListConfig.verify(m.androidGameInterventionListConfig);
                        if (e)
                            return "androidGameInterventionListConfig." + e;
                    }
                }
                if (m.packagesListConfig != null && m.hasOwnProperty("packagesListConfig")) {
                    {
                        var e = $root.perfetto.protos.PackagesListConfig.verify(m.packagesListConfig);
                        if (e)
                            return "packagesListConfig." + e;
                    }
                }
                if (m.perfEventConfig != null && m.hasOwnProperty("perfEventConfig")) {
                    {
                        var e = $root.perfetto.protos.PerfEventConfig.verify(m.perfEventConfig);
                        if (e)
                            return "perfEventConfig." + e;
                    }
                }
                if (m.vulkanMemoryConfig != null && m.hasOwnProperty("vulkanMemoryConfig")) {
                    {
                        var e = $root.perfetto.protos.VulkanMemoryConfig.verify(m.vulkanMemoryConfig);
                        if (e)
                            return "vulkanMemoryConfig." + e;
                    }
                }
                if (m.trackEventConfig != null && m.hasOwnProperty("trackEventConfig")) {
                    {
                        var e = $root.perfetto.protos.TrackEventConfig.verify(m.trackEventConfig);
                        if (e)
                            return "trackEventConfig." + e;
                    }
                }
                if (m.androidPolledStateConfig != null && m.hasOwnProperty("androidPolledStateConfig")) {
                    {
                        var e = $root.perfetto.protos.AndroidPolledStateConfig.verify(m.androidPolledStateConfig);
                        if (e)
                            return "androidPolledStateConfig." + e;
                    }
                }
                if (m.androidSystemPropertyConfig != null && m.hasOwnProperty("androidSystemPropertyConfig")) {
                    {
                        var e = $root.perfetto.protos.AndroidSystemPropertyConfig.verify(m.androidSystemPropertyConfig);
                        if (e)
                            return "androidSystemPropertyConfig." + e;
                    }
                }
                if (m.statsdTracingConfig != null && m.hasOwnProperty("statsdTracingConfig")) {
                    {
                        var e = $root.perfetto.protos.StatsdTracingConfig.verify(m.statsdTracingConfig);
                        if (e)
                            return "statsdTracingConfig." + e;
                    }
                }
                if (m.systemInfoConfig != null && m.hasOwnProperty("systemInfoConfig")) {
                    {
                        var e = $root.perfetto.protos.SystemInfoConfig.verify(m.systemInfoConfig);
                        if (e)
                            return "systemInfoConfig." + e;
                    }
                }
                if (m.chromeConfig != null && m.hasOwnProperty("chromeConfig")) {
                    {
                        var e = $root.perfetto.protos.ChromeConfig.verify(m.chromeConfig);
                        if (e)
                            return "chromeConfig." + e;
                    }
                }
                if (m.interceptorConfig != null && m.hasOwnProperty("interceptorConfig")) {
                    {
                        var e = $root.perfetto.protos.InterceptorConfig.verify(m.interceptorConfig);
                        if (e)
                            return "interceptorConfig." + e;
                    }
                }
                if (m.legacyConfig != null && m.hasOwnProperty("legacyConfig")) {
                    if (!$util.isString(m.legacyConfig))
                        return "legacyConfig: string expected";
                }
                if (m.forTesting != null && m.hasOwnProperty("forTesting")) {
                    {
                        var e = $root.perfetto.protos.TestConfig.verify(m.forTesting);
                        if (e)
                            return "forTesting." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a DataSourceConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DataSourceConfig
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DataSourceConfig} DataSourceConfig
             */
            DataSourceConfig.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DataSourceConfig)
                    return d;
                var m = new $root.perfetto.protos.DataSourceConfig();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.targetBuffer != null) {
                    m.targetBuffer = d.targetBuffer >>> 0;
                }
                if (d.traceDurationMs != null) {
                    m.traceDurationMs = d.traceDurationMs >>> 0;
                }
                if (d.stopTimeoutMs != null) {
                    m.stopTimeoutMs = d.stopTimeoutMs >>> 0;
                }
                if (d.enableExtraGuardrails != null) {
                    m.enableExtraGuardrails = Boolean(d.enableExtraGuardrails);
                }
                switch (d.sessionInitiator) {
                case "SESSION_INITIATOR_UNSPECIFIED":
                case 0:
                    m.sessionInitiator = 0;
                    break;
                case "SESSION_INITIATOR_TRUSTED_SYSTEM":
                case 1:
                    m.sessionInitiator = 1;
                    break;
                }
                if (d.tracingSessionId != null) {
                    if ($util.Long)
                        (m.tracingSessionId = $util.Long.fromValue(d.tracingSessionId)).unsigned = true;
                    else if (typeof d.tracingSessionId === "string")
                        m.tracingSessionId = parseInt(d.tracingSessionId, 10);
                    else if (typeof d.tracingSessionId === "number")
                        m.tracingSessionId = d.tracingSessionId;
                    else if (typeof d.tracingSessionId === "object")
                        m.tracingSessionId = new $util.LongBits(d.tracingSessionId.low >>> 0, d.tracingSessionId.high >>> 0).toNumber(true);
                }
                if (d.ftraceConfig != null) {
                    if (typeof d.ftraceConfig !== "object")
                        throw TypeError(".perfetto.protos.DataSourceConfig.ftraceConfig: object expected");
                    m.ftraceConfig = $root.perfetto.protos.FtraceConfig.fromObject(d.ftraceConfig);
                }
                if (d.inodeFileConfig != null) {
                    if (typeof d.inodeFileConfig !== "object")
                        throw TypeError(".perfetto.protos.DataSourceConfig.inodeFileConfig: object expected");
                    m.inodeFileConfig = $root.perfetto.protos.InodeFileConfig.fromObject(d.inodeFileConfig);
                }
                if (d.processStatsConfig != null) {
                    if (typeof d.processStatsConfig !== "object")
                        throw TypeError(".perfetto.protos.DataSourceConfig.processStatsConfig: object expected");
                    m.processStatsConfig = $root.perfetto.protos.ProcessStatsConfig.fromObject(d.processStatsConfig);
                }
                if (d.sysStatsConfig != null) {
                    if (typeof d.sysStatsConfig !== "object")
                        throw TypeError(".perfetto.protos.DataSourceConfig.sysStatsConfig: object expected");
                    m.sysStatsConfig = $root.perfetto.protos.SysStatsConfig.fromObject(d.sysStatsConfig);
                }
                if (d.heapprofdConfig != null) {
                    if (typeof d.heapprofdConfig !== "object")
                        throw TypeError(".perfetto.protos.DataSourceConfig.heapprofdConfig: object expected");
                    m.heapprofdConfig = $root.perfetto.protos.HeapprofdConfig.fromObject(d.heapprofdConfig);
                }
                if (d.javaHprofConfig != null) {
                    if (typeof d.javaHprofConfig !== "object")
                        throw TypeError(".perfetto.protos.DataSourceConfig.javaHprofConfig: object expected");
                    m.javaHprofConfig = $root.perfetto.protos.JavaHprofConfig.fromObject(d.javaHprofConfig);
                }
                if (d.androidPowerConfig != null) {
                    if (typeof d.androidPowerConfig !== "object")
                        throw TypeError(".perfetto.protos.DataSourceConfig.androidPowerConfig: object expected");
                    m.androidPowerConfig = $root.perfetto.protos.AndroidPowerConfig.fromObject(d.androidPowerConfig);
                }
                if (d.androidLogConfig != null) {
                    if (typeof d.androidLogConfig !== "object")
                        throw TypeError(".perfetto.protos.DataSourceConfig.androidLogConfig: object expected");
                    m.androidLogConfig = $root.perfetto.protos.AndroidLogConfig.fromObject(d.androidLogConfig);
                }
                if (d.gpuCounterConfig != null) {
                    if (typeof d.gpuCounterConfig !== "object")
                        throw TypeError(".perfetto.protos.DataSourceConfig.gpuCounterConfig: object expected");
                    m.gpuCounterConfig = $root.perfetto.protos.GpuCounterConfig.fromObject(d.gpuCounterConfig);
                }
                if (d.androidGameInterventionListConfig != null) {
                    if (typeof d.androidGameInterventionListConfig !== "object")
                        throw TypeError(".perfetto.protos.DataSourceConfig.androidGameInterventionListConfig: object expected");
                    m.androidGameInterventionListConfig = $root.perfetto.protos.AndroidGameInterventionListConfig.fromObject(d.androidGameInterventionListConfig);
                }
                if (d.packagesListConfig != null) {
                    if (typeof d.packagesListConfig !== "object")
                        throw TypeError(".perfetto.protos.DataSourceConfig.packagesListConfig: object expected");
                    m.packagesListConfig = $root.perfetto.protos.PackagesListConfig.fromObject(d.packagesListConfig);
                }
                if (d.perfEventConfig != null) {
                    if (typeof d.perfEventConfig !== "object")
                        throw TypeError(".perfetto.protos.DataSourceConfig.perfEventConfig: object expected");
                    m.perfEventConfig = $root.perfetto.protos.PerfEventConfig.fromObject(d.perfEventConfig);
                }
                if (d.vulkanMemoryConfig != null) {
                    if (typeof d.vulkanMemoryConfig !== "object")
                        throw TypeError(".perfetto.protos.DataSourceConfig.vulkanMemoryConfig: object expected");
                    m.vulkanMemoryConfig = $root.perfetto.protos.VulkanMemoryConfig.fromObject(d.vulkanMemoryConfig);
                }
                if (d.trackEventConfig != null) {
                    if (typeof d.trackEventConfig !== "object")
                        throw TypeError(".perfetto.protos.DataSourceConfig.trackEventConfig: object expected");
                    m.trackEventConfig = $root.perfetto.protos.TrackEventConfig.fromObject(d.trackEventConfig);
                }
                if (d.androidPolledStateConfig != null) {
                    if (typeof d.androidPolledStateConfig !== "object")
                        throw TypeError(".perfetto.protos.DataSourceConfig.androidPolledStateConfig: object expected");
                    m.androidPolledStateConfig = $root.perfetto.protos.AndroidPolledStateConfig.fromObject(d.androidPolledStateConfig);
                }
                if (d.androidSystemPropertyConfig != null) {
                    if (typeof d.androidSystemPropertyConfig !== "object")
                        throw TypeError(".perfetto.protos.DataSourceConfig.androidSystemPropertyConfig: object expected");
                    m.androidSystemPropertyConfig = $root.perfetto.protos.AndroidSystemPropertyConfig.fromObject(d.androidSystemPropertyConfig);
                }
                if (d.statsdTracingConfig != null) {
                    if (typeof d.statsdTracingConfig !== "object")
                        throw TypeError(".perfetto.protos.DataSourceConfig.statsdTracingConfig: object expected");
                    m.statsdTracingConfig = $root.perfetto.protos.StatsdTracingConfig.fromObject(d.statsdTracingConfig);
                }
                if (d.systemInfoConfig != null) {
                    if (typeof d.systemInfoConfig !== "object")
                        throw TypeError(".perfetto.protos.DataSourceConfig.systemInfoConfig: object expected");
                    m.systemInfoConfig = $root.perfetto.protos.SystemInfoConfig.fromObject(d.systemInfoConfig);
                }
                if (d.chromeConfig != null) {
                    if (typeof d.chromeConfig !== "object")
                        throw TypeError(".perfetto.protos.DataSourceConfig.chromeConfig: object expected");
                    m.chromeConfig = $root.perfetto.protos.ChromeConfig.fromObject(d.chromeConfig);
                }
                if (d.interceptorConfig != null) {
                    if (typeof d.interceptorConfig !== "object")
                        throw TypeError(".perfetto.protos.DataSourceConfig.interceptorConfig: object expected");
                    m.interceptorConfig = $root.perfetto.protos.InterceptorConfig.fromObject(d.interceptorConfig);
                }
                if (d.legacyConfig != null) {
                    m.legacyConfig = String(d.legacyConfig);
                }
                if (d.forTesting != null) {
                    if (typeof d.forTesting !== "object")
                        throw TypeError(".perfetto.protos.DataSourceConfig.forTesting: object expected");
                    m.forTesting = $root.perfetto.protos.TestConfig.fromObject(d.forTesting);
                }
                return m;
            };

            /**
             * Creates a plain object from a DataSourceConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DataSourceConfig
             * @static
             * @param {perfetto.protos.DataSourceConfig} m DataSourceConfig
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DataSourceConfig.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                    d.targetBuffer = 0;
                    d.traceDurationMs = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.tracingSessionId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.tracingSessionId = o.longs === String ? "0" : 0;
                    d.enableExtraGuardrails = false;
                    d.stopTimeoutMs = 0;
                    d.sessionInitiator = o.enums === String ? "SESSION_INITIATOR_UNSPECIFIED" : 0;
                    d.ftraceConfig = null;
                    d.chromeConfig = null;
                    d.inodeFileConfig = null;
                    d.processStatsConfig = null;
                    d.sysStatsConfig = null;
                    d.heapprofdConfig = null;
                    d.androidPowerConfig = null;
                    d.androidLogConfig = null;
                    d.gpuCounterConfig = null;
                    d.packagesListConfig = null;
                    d.javaHprofConfig = null;
                    d.perfEventConfig = null;
                    d.vulkanMemoryConfig = null;
                    d.trackEventConfig = null;
                    d.androidPolledStateConfig = null;
                    d.interceptorConfig = null;
                    d.androidGameInterventionListConfig = null;
                    d.statsdTracingConfig = null;
                    d.androidSystemPropertyConfig = null;
                    d.systemInfoConfig = null;
                    d.legacyConfig = "";
                    d.forTesting = null;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.targetBuffer != null && m.hasOwnProperty("targetBuffer")) {
                    d.targetBuffer = m.targetBuffer;
                }
                if (m.traceDurationMs != null && m.hasOwnProperty("traceDurationMs")) {
                    d.traceDurationMs = m.traceDurationMs;
                }
                if (m.tracingSessionId != null && m.hasOwnProperty("tracingSessionId")) {
                    if (typeof m.tracingSessionId === "number")
                        d.tracingSessionId = o.longs === String ? String(m.tracingSessionId) : m.tracingSessionId;
                    else
                        d.tracingSessionId = o.longs === String ? $util.Long.prototype.toString.call(m.tracingSessionId) : o.longs === Number ? new $util.LongBits(m.tracingSessionId.low >>> 0, m.tracingSessionId.high >>> 0).toNumber(true) : m.tracingSessionId;
                }
                if (m.enableExtraGuardrails != null && m.hasOwnProperty("enableExtraGuardrails")) {
                    d.enableExtraGuardrails = m.enableExtraGuardrails;
                }
                if (m.stopTimeoutMs != null && m.hasOwnProperty("stopTimeoutMs")) {
                    d.stopTimeoutMs = m.stopTimeoutMs;
                }
                if (m.sessionInitiator != null && m.hasOwnProperty("sessionInitiator")) {
                    d.sessionInitiator = o.enums === String ? $root.perfetto.protos.DataSourceConfig.SessionInitiator[m.sessionInitiator] : m.sessionInitiator;
                }
                if (m.ftraceConfig != null && m.hasOwnProperty("ftraceConfig")) {
                    d.ftraceConfig = $root.perfetto.protos.FtraceConfig.toObject(m.ftraceConfig, o);
                }
                if (m.chromeConfig != null && m.hasOwnProperty("chromeConfig")) {
                    d.chromeConfig = $root.perfetto.protos.ChromeConfig.toObject(m.chromeConfig, o);
                }
                if (m.inodeFileConfig != null && m.hasOwnProperty("inodeFileConfig")) {
                    d.inodeFileConfig = $root.perfetto.protos.InodeFileConfig.toObject(m.inodeFileConfig, o);
                }
                if (m.processStatsConfig != null && m.hasOwnProperty("processStatsConfig")) {
                    d.processStatsConfig = $root.perfetto.protos.ProcessStatsConfig.toObject(m.processStatsConfig, o);
                }
                if (m.sysStatsConfig != null && m.hasOwnProperty("sysStatsConfig")) {
                    d.sysStatsConfig = $root.perfetto.protos.SysStatsConfig.toObject(m.sysStatsConfig, o);
                }
                if (m.heapprofdConfig != null && m.hasOwnProperty("heapprofdConfig")) {
                    d.heapprofdConfig = $root.perfetto.protos.HeapprofdConfig.toObject(m.heapprofdConfig, o);
                }
                if (m.androidPowerConfig != null && m.hasOwnProperty("androidPowerConfig")) {
                    d.androidPowerConfig = $root.perfetto.protos.AndroidPowerConfig.toObject(m.androidPowerConfig, o);
                }
                if (m.androidLogConfig != null && m.hasOwnProperty("androidLogConfig")) {
                    d.androidLogConfig = $root.perfetto.protos.AndroidLogConfig.toObject(m.androidLogConfig, o);
                }
                if (m.gpuCounterConfig != null && m.hasOwnProperty("gpuCounterConfig")) {
                    d.gpuCounterConfig = $root.perfetto.protos.GpuCounterConfig.toObject(m.gpuCounterConfig, o);
                }
                if (m.packagesListConfig != null && m.hasOwnProperty("packagesListConfig")) {
                    d.packagesListConfig = $root.perfetto.protos.PackagesListConfig.toObject(m.packagesListConfig, o);
                }
                if (m.javaHprofConfig != null && m.hasOwnProperty("javaHprofConfig")) {
                    d.javaHprofConfig = $root.perfetto.protos.JavaHprofConfig.toObject(m.javaHprofConfig, o);
                }
                if (m.perfEventConfig != null && m.hasOwnProperty("perfEventConfig")) {
                    d.perfEventConfig = $root.perfetto.protos.PerfEventConfig.toObject(m.perfEventConfig, o);
                }
                if (m.vulkanMemoryConfig != null && m.hasOwnProperty("vulkanMemoryConfig")) {
                    d.vulkanMemoryConfig = $root.perfetto.protos.VulkanMemoryConfig.toObject(m.vulkanMemoryConfig, o);
                }
                if (m.trackEventConfig != null && m.hasOwnProperty("trackEventConfig")) {
                    d.trackEventConfig = $root.perfetto.protos.TrackEventConfig.toObject(m.trackEventConfig, o);
                }
                if (m.androidPolledStateConfig != null && m.hasOwnProperty("androidPolledStateConfig")) {
                    d.androidPolledStateConfig = $root.perfetto.protos.AndroidPolledStateConfig.toObject(m.androidPolledStateConfig, o);
                }
                if (m.interceptorConfig != null && m.hasOwnProperty("interceptorConfig")) {
                    d.interceptorConfig = $root.perfetto.protos.InterceptorConfig.toObject(m.interceptorConfig, o);
                }
                if (m.androidGameInterventionListConfig != null && m.hasOwnProperty("androidGameInterventionListConfig")) {
                    d.androidGameInterventionListConfig = $root.perfetto.protos.AndroidGameInterventionListConfig.toObject(m.androidGameInterventionListConfig, o);
                }
                if (m.statsdTracingConfig != null && m.hasOwnProperty("statsdTracingConfig")) {
                    d.statsdTracingConfig = $root.perfetto.protos.StatsdTracingConfig.toObject(m.statsdTracingConfig, o);
                }
                if (m.androidSystemPropertyConfig != null && m.hasOwnProperty("androidSystemPropertyConfig")) {
                    d.androidSystemPropertyConfig = $root.perfetto.protos.AndroidSystemPropertyConfig.toObject(m.androidSystemPropertyConfig, o);
                }
                if (m.systemInfoConfig != null && m.hasOwnProperty("systemInfoConfig")) {
                    d.systemInfoConfig = $root.perfetto.protos.SystemInfoConfig.toObject(m.systemInfoConfig, o);
                }
                if (m.legacyConfig != null && m.hasOwnProperty("legacyConfig")) {
                    d.legacyConfig = m.legacyConfig;
                }
                if (m.forTesting != null && m.hasOwnProperty("forTesting")) {
                    d.forTesting = $root.perfetto.protos.TestConfig.toObject(m.forTesting, o);
                }
                return d;
            };

            /**
             * Converts this DataSourceConfig to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DataSourceConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DataSourceConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * SessionInitiator enum.
             * @name perfetto.protos.DataSourceConfig.SessionInitiator
             * @enum {number}
             * @property {number} SESSION_INITIATOR_UNSPECIFIED=0 SESSION_INITIATOR_UNSPECIFIED value
             * @property {number} SESSION_INITIATOR_TRUSTED_SYSTEM=1 SESSION_INITIATOR_TRUSTED_SYSTEM value
             */
            DataSourceConfig.SessionInitiator = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "SESSION_INITIATOR_UNSPECIFIED"] = 0;
                values[valuesById[1] = "SESSION_INITIATOR_TRUSTED_SYSTEM"] = 1;
                return values;
            })();

            return DataSourceConfig;
        })();

        protos.TraceConfig = (function() {

            /**
             * Properties of a TraceConfig.
             * @memberof perfetto.protos
             * @interface ITraceConfig
             * @property {Array.<perfetto.protos.TraceConfig.IBufferConfig>|null} [buffers] TraceConfig buffers
             * @property {Array.<perfetto.protos.TraceConfig.IDataSource>|null} [dataSources] TraceConfig dataSources
             * @property {perfetto.protos.TraceConfig.IBuiltinDataSource|null} [builtinDataSources] TraceConfig builtinDataSources
             * @property {number|null} [durationMs] TraceConfig durationMs
             * @property {boolean|null} [enableExtraGuardrails] TraceConfig enableExtraGuardrails
             * @property {perfetto.protos.TraceConfig.LockdownModeOperation|null} [lockdownMode] TraceConfig lockdownMode
             * @property {Array.<perfetto.protos.TraceConfig.IProducerConfig>|null} [producers] TraceConfig producers
             * @property {perfetto.protos.TraceConfig.IStatsdMetadata|null} [statsdMetadata] TraceConfig statsdMetadata
             * @property {boolean|null} [writeIntoFile] TraceConfig writeIntoFile
             * @property {string|null} [outputPath] TraceConfig outputPath
             * @property {number|null} [fileWritePeriodMs] TraceConfig fileWritePeriodMs
             * @property {number|null} [maxFileSizeBytes] TraceConfig maxFileSizeBytes
             * @property {perfetto.protos.TraceConfig.IGuardrailOverrides|null} [guardrailOverrides] TraceConfig guardrailOverrides
             * @property {boolean|null} [deferredStart] TraceConfig deferredStart
             * @property {number|null} [flushPeriodMs] TraceConfig flushPeriodMs
             * @property {number|null} [flushTimeoutMs] TraceConfig flushTimeoutMs
             * @property {number|null} [dataSourceStopTimeoutMs] TraceConfig dataSourceStopTimeoutMs
             * @property {boolean|null} [notifyTraceur] TraceConfig notifyTraceur
             * @property {number|null} [bugreportScore] TraceConfig bugreportScore
             * @property {perfetto.protos.TraceConfig.ITriggerConfig|null} [triggerConfig] TraceConfig triggerConfig
             * @property {Array.<string>|null} [activateTriggers] TraceConfig activateTriggers
             * @property {perfetto.protos.TraceConfig.IIncrementalStateConfig|null} [incrementalStateConfig] TraceConfig incrementalStateConfig
             * @property {boolean|null} [allowUserBuildTracing] TraceConfig allowUserBuildTracing
             * @property {string|null} [uniqueSessionName] TraceConfig uniqueSessionName
             * @property {perfetto.protos.TraceConfig.CompressionType|null} [compressionType] TraceConfig compressionType
             * @property {perfetto.protos.TraceConfig.IIncidentReportConfig|null} [incidentReportConfig] TraceConfig incidentReportConfig
             * @property {perfetto.protos.TraceConfig.StatsdLogging|null} [statsdLogging] TraceConfig statsdLogging
             * @property {number|null} [traceUuidMsb] TraceConfig traceUuidMsb
             * @property {number|null} [traceUuidLsb] TraceConfig traceUuidLsb
             * @property {perfetto.protos.TraceConfig.ITraceFilter|null} [traceFilter] TraceConfig traceFilter
             * @property {perfetto.protos.TraceConfig.IAndroidReportConfig|null} [androidReportConfig] TraceConfig androidReportConfig
             * @property {perfetto.protos.TraceConfig.ICmdTraceStartDelay|null} [cmdTraceStartDelay] TraceConfig cmdTraceStartDelay
             */

            /**
             * Constructs a new TraceConfig.
             * @memberof perfetto.protos
             * @classdesc Represents a TraceConfig.
             * @implements ITraceConfig
             * @constructor
             * @param {perfetto.protos.ITraceConfig=} [p] Properties to set
             */
            function TraceConfig(p) {
                this.buffers = [];
                this.dataSources = [];
                this.producers = [];
                this.activateTriggers = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TraceConfig buffers.
             * @member {Array.<perfetto.protos.TraceConfig.IBufferConfig>} buffers
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.buffers = $util.emptyArray;

            /**
             * TraceConfig dataSources.
             * @member {Array.<perfetto.protos.TraceConfig.IDataSource>} dataSources
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.dataSources = $util.emptyArray;

            /**
             * TraceConfig builtinDataSources.
             * @member {perfetto.protos.TraceConfig.IBuiltinDataSource|null|undefined} builtinDataSources
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.builtinDataSources = null;

            /**
             * TraceConfig durationMs.
             * @member {number} durationMs
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.durationMs = 0;

            /**
             * TraceConfig enableExtraGuardrails.
             * @member {boolean} enableExtraGuardrails
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.enableExtraGuardrails = false;

            /**
             * TraceConfig lockdownMode.
             * @member {perfetto.protos.TraceConfig.LockdownModeOperation} lockdownMode
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.lockdownMode = 0;

            /**
             * TraceConfig producers.
             * @member {Array.<perfetto.protos.TraceConfig.IProducerConfig>} producers
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.producers = $util.emptyArray;

            /**
             * TraceConfig statsdMetadata.
             * @member {perfetto.protos.TraceConfig.IStatsdMetadata|null|undefined} statsdMetadata
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.statsdMetadata = null;

            /**
             * TraceConfig writeIntoFile.
             * @member {boolean} writeIntoFile
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.writeIntoFile = false;

            /**
             * TraceConfig outputPath.
             * @member {string} outputPath
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.outputPath = "";

            /**
             * TraceConfig fileWritePeriodMs.
             * @member {number} fileWritePeriodMs
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.fileWritePeriodMs = 0;

            /**
             * TraceConfig maxFileSizeBytes.
             * @member {number} maxFileSizeBytes
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.maxFileSizeBytes = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TraceConfig guardrailOverrides.
             * @member {perfetto.protos.TraceConfig.IGuardrailOverrides|null|undefined} guardrailOverrides
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.guardrailOverrides = null;

            /**
             * TraceConfig deferredStart.
             * @member {boolean} deferredStart
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.deferredStart = false;

            /**
             * TraceConfig flushPeriodMs.
             * @member {number} flushPeriodMs
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.flushPeriodMs = 0;

            /**
             * TraceConfig flushTimeoutMs.
             * @member {number} flushTimeoutMs
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.flushTimeoutMs = 0;

            /**
             * TraceConfig dataSourceStopTimeoutMs.
             * @member {number} dataSourceStopTimeoutMs
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.dataSourceStopTimeoutMs = 0;

            /**
             * TraceConfig notifyTraceur.
             * @member {boolean} notifyTraceur
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.notifyTraceur = false;

            /**
             * TraceConfig bugreportScore.
             * @member {number} bugreportScore
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.bugreportScore = 0;

            /**
             * TraceConfig triggerConfig.
             * @member {perfetto.protos.TraceConfig.ITriggerConfig|null|undefined} triggerConfig
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.triggerConfig = null;

            /**
             * TraceConfig activateTriggers.
             * @member {Array.<string>} activateTriggers
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.activateTriggers = $util.emptyArray;

            /**
             * TraceConfig incrementalStateConfig.
             * @member {perfetto.protos.TraceConfig.IIncrementalStateConfig|null|undefined} incrementalStateConfig
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.incrementalStateConfig = null;

            /**
             * TraceConfig allowUserBuildTracing.
             * @member {boolean} allowUserBuildTracing
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.allowUserBuildTracing = false;

            /**
             * TraceConfig uniqueSessionName.
             * @member {string} uniqueSessionName
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.uniqueSessionName = "";

            /**
             * TraceConfig compressionType.
             * @member {perfetto.protos.TraceConfig.CompressionType} compressionType
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.compressionType = 0;

            /**
             * TraceConfig incidentReportConfig.
             * @member {perfetto.protos.TraceConfig.IIncidentReportConfig|null|undefined} incidentReportConfig
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.incidentReportConfig = null;

            /**
             * TraceConfig statsdLogging.
             * @member {perfetto.protos.TraceConfig.StatsdLogging} statsdLogging
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.statsdLogging = 0;

            /**
             * TraceConfig traceUuidMsb.
             * @member {number} traceUuidMsb
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.traceUuidMsb = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * TraceConfig traceUuidLsb.
             * @member {number} traceUuidLsb
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.traceUuidLsb = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * TraceConfig traceFilter.
             * @member {perfetto.protos.TraceConfig.ITraceFilter|null|undefined} traceFilter
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.traceFilter = null;

            /**
             * TraceConfig androidReportConfig.
             * @member {perfetto.protos.TraceConfig.IAndroidReportConfig|null|undefined} androidReportConfig
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.androidReportConfig = null;

            /**
             * TraceConfig cmdTraceStartDelay.
             * @member {perfetto.protos.TraceConfig.ICmdTraceStartDelay|null|undefined} cmdTraceStartDelay
             * @memberof perfetto.protos.TraceConfig
             * @instance
             */
            TraceConfig.prototype.cmdTraceStartDelay = null;

            /**
             * Creates a new TraceConfig instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TraceConfig
             * @static
             * @param {perfetto.protos.ITraceConfig=} [properties] Properties to set
             * @returns {perfetto.protos.TraceConfig} TraceConfig instance
             */
            TraceConfig.create = function create(properties) {
                return new TraceConfig(properties);
            };

            /**
             * Encodes the specified TraceConfig message. Does not implicitly {@link perfetto.protos.TraceConfig.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TraceConfig
             * @static
             * @param {perfetto.protos.ITraceConfig} m TraceConfig message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TraceConfig.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.buffers != null && m.buffers.length) {
                    for (var i = 0; i < m.buffers.length; ++i)
                        $root.perfetto.protos.TraceConfig.BufferConfig.encode(m.buffers[i], w.uint32(10).fork()).ldelim();
                }
                if (m.dataSources != null && m.dataSources.length) {
                    for (var i = 0; i < m.dataSources.length; ++i)
                        $root.perfetto.protos.TraceConfig.DataSource.encode(m.dataSources[i], w.uint32(18).fork()).ldelim();
                }
                if (m.durationMs != null && Object.hasOwnProperty.call(m, "durationMs"))
                    w.uint32(24).uint32(m.durationMs);
                if (m.enableExtraGuardrails != null && Object.hasOwnProperty.call(m, "enableExtraGuardrails"))
                    w.uint32(32).bool(m.enableExtraGuardrails);
                if (m.lockdownMode != null && Object.hasOwnProperty.call(m, "lockdownMode"))
                    w.uint32(40).int32(m.lockdownMode);
                if (m.producers != null && m.producers.length) {
                    for (var i = 0; i < m.producers.length; ++i)
                        $root.perfetto.protos.TraceConfig.ProducerConfig.encode(m.producers[i], w.uint32(50).fork()).ldelim();
                }
                if (m.statsdMetadata != null && Object.hasOwnProperty.call(m, "statsdMetadata"))
                    $root.perfetto.protos.TraceConfig.StatsdMetadata.encode(m.statsdMetadata, w.uint32(58).fork()).ldelim();
                if (m.writeIntoFile != null && Object.hasOwnProperty.call(m, "writeIntoFile"))
                    w.uint32(64).bool(m.writeIntoFile);
                if (m.fileWritePeriodMs != null && Object.hasOwnProperty.call(m, "fileWritePeriodMs"))
                    w.uint32(72).uint32(m.fileWritePeriodMs);
                if (m.maxFileSizeBytes != null && Object.hasOwnProperty.call(m, "maxFileSizeBytes"))
                    w.uint32(80).uint64(m.maxFileSizeBytes);
                if (m.guardrailOverrides != null && Object.hasOwnProperty.call(m, "guardrailOverrides"))
                    $root.perfetto.protos.TraceConfig.GuardrailOverrides.encode(m.guardrailOverrides, w.uint32(90).fork()).ldelim();
                if (m.deferredStart != null && Object.hasOwnProperty.call(m, "deferredStart"))
                    w.uint32(96).bool(m.deferredStart);
                if (m.flushPeriodMs != null && Object.hasOwnProperty.call(m, "flushPeriodMs"))
                    w.uint32(104).uint32(m.flushPeriodMs);
                if (m.flushTimeoutMs != null && Object.hasOwnProperty.call(m, "flushTimeoutMs"))
                    w.uint32(112).uint32(m.flushTimeoutMs);
                if (m.notifyTraceur != null && Object.hasOwnProperty.call(m, "notifyTraceur"))
                    w.uint32(128).bool(m.notifyTraceur);
                if (m.triggerConfig != null && Object.hasOwnProperty.call(m, "triggerConfig"))
                    $root.perfetto.protos.TraceConfig.TriggerConfig.encode(m.triggerConfig, w.uint32(138).fork()).ldelim();
                if (m.activateTriggers != null && m.activateTriggers.length) {
                    for (var i = 0; i < m.activateTriggers.length; ++i)
                        w.uint32(146).string(m.activateTriggers[i]);
                }
                if (m.allowUserBuildTracing != null && Object.hasOwnProperty.call(m, "allowUserBuildTracing"))
                    w.uint32(152).bool(m.allowUserBuildTracing);
                if (m.builtinDataSources != null && Object.hasOwnProperty.call(m, "builtinDataSources"))
                    $root.perfetto.protos.TraceConfig.BuiltinDataSource.encode(m.builtinDataSources, w.uint32(162).fork()).ldelim();
                if (m.incrementalStateConfig != null && Object.hasOwnProperty.call(m, "incrementalStateConfig"))
                    $root.perfetto.protos.TraceConfig.IncrementalStateConfig.encode(m.incrementalStateConfig, w.uint32(170).fork()).ldelim();
                if (m.uniqueSessionName != null && Object.hasOwnProperty.call(m, "uniqueSessionName"))
                    w.uint32(178).string(m.uniqueSessionName);
                if (m.dataSourceStopTimeoutMs != null && Object.hasOwnProperty.call(m, "dataSourceStopTimeoutMs"))
                    w.uint32(184).uint32(m.dataSourceStopTimeoutMs);
                if (m.compressionType != null && Object.hasOwnProperty.call(m, "compressionType"))
                    w.uint32(192).int32(m.compressionType);
                if (m.incidentReportConfig != null && Object.hasOwnProperty.call(m, "incidentReportConfig"))
                    $root.perfetto.protos.TraceConfig.IncidentReportConfig.encode(m.incidentReportConfig, w.uint32(202).fork()).ldelim();
                if (m.traceUuidMsb != null && Object.hasOwnProperty.call(m, "traceUuidMsb"))
                    w.uint32(216).int64(m.traceUuidMsb);
                if (m.traceUuidLsb != null && Object.hasOwnProperty.call(m, "traceUuidLsb"))
                    w.uint32(224).int64(m.traceUuidLsb);
                if (m.outputPath != null && Object.hasOwnProperty.call(m, "outputPath"))
                    w.uint32(234).string(m.outputPath);
                if (m.bugreportScore != null && Object.hasOwnProperty.call(m, "bugreportScore"))
                    w.uint32(240).int32(m.bugreportScore);
                if (m.statsdLogging != null && Object.hasOwnProperty.call(m, "statsdLogging"))
                    w.uint32(248).int32(m.statsdLogging);
                if (m.traceFilter != null && Object.hasOwnProperty.call(m, "traceFilter"))
                    $root.perfetto.protos.TraceConfig.TraceFilter.encode(m.traceFilter, w.uint32(266).fork()).ldelim();
                if (m.androidReportConfig != null && Object.hasOwnProperty.call(m, "androidReportConfig"))
                    $root.perfetto.protos.TraceConfig.AndroidReportConfig.encode(m.androidReportConfig, w.uint32(274).fork()).ldelim();
                if (m.cmdTraceStartDelay != null && Object.hasOwnProperty.call(m, "cmdTraceStartDelay"))
                    $root.perfetto.protos.TraceConfig.CmdTraceStartDelay.encode(m.cmdTraceStartDelay, w.uint32(282).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified TraceConfig message, length delimited. Does not implicitly {@link perfetto.protos.TraceConfig.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TraceConfig
             * @static
             * @param {perfetto.protos.ITraceConfig} message TraceConfig message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TraceConfig.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TraceConfig message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TraceConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TraceConfig} TraceConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TraceConfig.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TraceConfig();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.buffers && m.buffers.length))
                            m.buffers = [];
                        m.buffers.push($root.perfetto.protos.TraceConfig.BufferConfig.decode(r, r.uint32()));
                        break;
                    case 2:
                        if (!(m.dataSources && m.dataSources.length))
                            m.dataSources = [];
                        m.dataSources.push($root.perfetto.protos.TraceConfig.DataSource.decode(r, r.uint32()));
                        break;
                    case 20:
                        m.builtinDataSources = $root.perfetto.protos.TraceConfig.BuiltinDataSource.decode(r, r.uint32());
                        break;
                    case 3:
                        m.durationMs = r.uint32();
                        break;
                    case 4:
                        m.enableExtraGuardrails = r.bool();
                        break;
                    case 5:
                        m.lockdownMode = r.int32();
                        break;
                    case 6:
                        if (!(m.producers && m.producers.length))
                            m.producers = [];
                        m.producers.push($root.perfetto.protos.TraceConfig.ProducerConfig.decode(r, r.uint32()));
                        break;
                    case 7:
                        m.statsdMetadata = $root.perfetto.protos.TraceConfig.StatsdMetadata.decode(r, r.uint32());
                        break;
                    case 8:
                        m.writeIntoFile = r.bool();
                        break;
                    case 29:
                        m.outputPath = r.string();
                        break;
                    case 9:
                        m.fileWritePeriodMs = r.uint32();
                        break;
                    case 10:
                        m.maxFileSizeBytes = r.uint64();
                        break;
                    case 11:
                        m.guardrailOverrides = $root.perfetto.protos.TraceConfig.GuardrailOverrides.decode(r, r.uint32());
                        break;
                    case 12:
                        m.deferredStart = r.bool();
                        break;
                    case 13:
                        m.flushPeriodMs = r.uint32();
                        break;
                    case 14:
                        m.flushTimeoutMs = r.uint32();
                        break;
                    case 23:
                        m.dataSourceStopTimeoutMs = r.uint32();
                        break;
                    case 16:
                        m.notifyTraceur = r.bool();
                        break;
                    case 30:
                        m.bugreportScore = r.int32();
                        break;
                    case 17:
                        m.triggerConfig = $root.perfetto.protos.TraceConfig.TriggerConfig.decode(r, r.uint32());
                        break;
                    case 18:
                        if (!(m.activateTriggers && m.activateTriggers.length))
                            m.activateTriggers = [];
                        m.activateTriggers.push(r.string());
                        break;
                    case 21:
                        m.incrementalStateConfig = $root.perfetto.protos.TraceConfig.IncrementalStateConfig.decode(r, r.uint32());
                        break;
                    case 19:
                        m.allowUserBuildTracing = r.bool();
                        break;
                    case 22:
                        m.uniqueSessionName = r.string();
                        break;
                    case 24:
                        m.compressionType = r.int32();
                        break;
                    case 25:
                        m.incidentReportConfig = $root.perfetto.protos.TraceConfig.IncidentReportConfig.decode(r, r.uint32());
                        break;
                    case 31:
                        m.statsdLogging = r.int32();
                        break;
                    case 27:
                        m.traceUuidMsb = r.int64();
                        break;
                    case 28:
                        m.traceUuidLsb = r.int64();
                        break;
                    case 33:
                        m.traceFilter = $root.perfetto.protos.TraceConfig.TraceFilter.decode(r, r.uint32());
                        break;
                    case 34:
                        m.androidReportConfig = $root.perfetto.protos.TraceConfig.AndroidReportConfig.decode(r, r.uint32());
                        break;
                    case 35:
                        m.cmdTraceStartDelay = $root.perfetto.protos.TraceConfig.CmdTraceStartDelay.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TraceConfig message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TraceConfig
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TraceConfig} TraceConfig
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TraceConfig.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TraceConfig message.
             * @function verify
             * @memberof perfetto.protos.TraceConfig
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TraceConfig.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.buffers != null && m.hasOwnProperty("buffers")) {
                    if (!Array.isArray(m.buffers))
                        return "buffers: array expected";
                    for (var i = 0; i < m.buffers.length; ++i) {
                        {
                            var e = $root.perfetto.protos.TraceConfig.BufferConfig.verify(m.buffers[i]);
                            if (e)
                                return "buffers." + e;
                        }
                    }
                }
                if (m.dataSources != null && m.hasOwnProperty("dataSources")) {
                    if (!Array.isArray(m.dataSources))
                        return "dataSources: array expected";
                    for (var i = 0; i < m.dataSources.length; ++i) {
                        {
                            var e = $root.perfetto.protos.TraceConfig.DataSource.verify(m.dataSources[i]);
                            if (e)
                                return "dataSources." + e;
                        }
                    }
                }
                if (m.builtinDataSources != null && m.hasOwnProperty("builtinDataSources")) {
                    {
                        var e = $root.perfetto.protos.TraceConfig.BuiltinDataSource.verify(m.builtinDataSources);
                        if (e)
                            return "builtinDataSources." + e;
                    }
                }
                if (m.durationMs != null && m.hasOwnProperty("durationMs")) {
                    if (!$util.isInteger(m.durationMs))
                        return "durationMs: integer expected";
                }
                if (m.enableExtraGuardrails != null && m.hasOwnProperty("enableExtraGuardrails")) {
                    if (typeof m.enableExtraGuardrails !== "boolean")
                        return "enableExtraGuardrails: boolean expected";
                }
                if (m.lockdownMode != null && m.hasOwnProperty("lockdownMode")) {
                    switch (m.lockdownMode) {
                    default:
                        return "lockdownMode: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                }
                if (m.producers != null && m.hasOwnProperty("producers")) {
                    if (!Array.isArray(m.producers))
                        return "producers: array expected";
                    for (var i = 0; i < m.producers.length; ++i) {
                        {
                            var e = $root.perfetto.protos.TraceConfig.ProducerConfig.verify(m.producers[i]);
                            if (e)
                                return "producers." + e;
                        }
                    }
                }
                if (m.statsdMetadata != null && m.hasOwnProperty("statsdMetadata")) {
                    {
                        var e = $root.perfetto.protos.TraceConfig.StatsdMetadata.verify(m.statsdMetadata);
                        if (e)
                            return "statsdMetadata." + e;
                    }
                }
                if (m.writeIntoFile != null && m.hasOwnProperty("writeIntoFile")) {
                    if (typeof m.writeIntoFile !== "boolean")
                        return "writeIntoFile: boolean expected";
                }
                if (m.outputPath != null && m.hasOwnProperty("outputPath")) {
                    if (!$util.isString(m.outputPath))
                        return "outputPath: string expected";
                }
                if (m.fileWritePeriodMs != null && m.hasOwnProperty("fileWritePeriodMs")) {
                    if (!$util.isInteger(m.fileWritePeriodMs))
                        return "fileWritePeriodMs: integer expected";
                }
                if (m.maxFileSizeBytes != null && m.hasOwnProperty("maxFileSizeBytes")) {
                    if (!$util.isInteger(m.maxFileSizeBytes) && !(m.maxFileSizeBytes && $util.isInteger(m.maxFileSizeBytes.low) && $util.isInteger(m.maxFileSizeBytes.high)))
                        return "maxFileSizeBytes: integer|Long expected";
                }
                if (m.guardrailOverrides != null && m.hasOwnProperty("guardrailOverrides")) {
                    {
                        var e = $root.perfetto.protos.TraceConfig.GuardrailOverrides.verify(m.guardrailOverrides);
                        if (e)
                            return "guardrailOverrides." + e;
                    }
                }
                if (m.deferredStart != null && m.hasOwnProperty("deferredStart")) {
                    if (typeof m.deferredStart !== "boolean")
                        return "deferredStart: boolean expected";
                }
                if (m.flushPeriodMs != null && m.hasOwnProperty("flushPeriodMs")) {
                    if (!$util.isInteger(m.flushPeriodMs))
                        return "flushPeriodMs: integer expected";
                }
                if (m.flushTimeoutMs != null && m.hasOwnProperty("flushTimeoutMs")) {
                    if (!$util.isInteger(m.flushTimeoutMs))
                        return "flushTimeoutMs: integer expected";
                }
                if (m.dataSourceStopTimeoutMs != null && m.hasOwnProperty("dataSourceStopTimeoutMs")) {
                    if (!$util.isInteger(m.dataSourceStopTimeoutMs))
                        return "dataSourceStopTimeoutMs: integer expected";
                }
                if (m.notifyTraceur != null && m.hasOwnProperty("notifyTraceur")) {
                    if (typeof m.notifyTraceur !== "boolean")
                        return "notifyTraceur: boolean expected";
                }
                if (m.bugreportScore != null && m.hasOwnProperty("bugreportScore")) {
                    if (!$util.isInteger(m.bugreportScore))
                        return "bugreportScore: integer expected";
                }
                if (m.triggerConfig != null && m.hasOwnProperty("triggerConfig")) {
                    {
                        var e = $root.perfetto.protos.TraceConfig.TriggerConfig.verify(m.triggerConfig);
                        if (e)
                            return "triggerConfig." + e;
                    }
                }
                if (m.activateTriggers != null && m.hasOwnProperty("activateTriggers")) {
                    if (!Array.isArray(m.activateTriggers))
                        return "activateTriggers: array expected";
                    for (var i = 0; i < m.activateTriggers.length; ++i) {
                        if (!$util.isString(m.activateTriggers[i]))
                            return "activateTriggers: string[] expected";
                    }
                }
                if (m.incrementalStateConfig != null && m.hasOwnProperty("incrementalStateConfig")) {
                    {
                        var e = $root.perfetto.protos.TraceConfig.IncrementalStateConfig.verify(m.incrementalStateConfig);
                        if (e)
                            return "incrementalStateConfig." + e;
                    }
                }
                if (m.allowUserBuildTracing != null && m.hasOwnProperty("allowUserBuildTracing")) {
                    if (typeof m.allowUserBuildTracing !== "boolean")
                        return "allowUserBuildTracing: boolean expected";
                }
                if (m.uniqueSessionName != null && m.hasOwnProperty("uniqueSessionName")) {
                    if (!$util.isString(m.uniqueSessionName))
                        return "uniqueSessionName: string expected";
                }
                if (m.compressionType != null && m.hasOwnProperty("compressionType")) {
                    switch (m.compressionType) {
                    default:
                        return "compressionType: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                }
                if (m.incidentReportConfig != null && m.hasOwnProperty("incidentReportConfig")) {
                    {
                        var e = $root.perfetto.protos.TraceConfig.IncidentReportConfig.verify(m.incidentReportConfig);
                        if (e)
                            return "incidentReportConfig." + e;
                    }
                }
                if (m.statsdLogging != null && m.hasOwnProperty("statsdLogging")) {
                    switch (m.statsdLogging) {
                    default:
                        return "statsdLogging: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                }
                if (m.traceUuidMsb != null && m.hasOwnProperty("traceUuidMsb")) {
                    if (!$util.isInteger(m.traceUuidMsb) && !(m.traceUuidMsb && $util.isInteger(m.traceUuidMsb.low) && $util.isInteger(m.traceUuidMsb.high)))
                        return "traceUuidMsb: integer|Long expected";
                }
                if (m.traceUuidLsb != null && m.hasOwnProperty("traceUuidLsb")) {
                    if (!$util.isInteger(m.traceUuidLsb) && !(m.traceUuidLsb && $util.isInteger(m.traceUuidLsb.low) && $util.isInteger(m.traceUuidLsb.high)))
                        return "traceUuidLsb: integer|Long expected";
                }
                if (m.traceFilter != null && m.hasOwnProperty("traceFilter")) {
                    {
                        var e = $root.perfetto.protos.TraceConfig.TraceFilter.verify(m.traceFilter);
                        if (e)
                            return "traceFilter." + e;
                    }
                }
                if (m.androidReportConfig != null && m.hasOwnProperty("androidReportConfig")) {
                    {
                        var e = $root.perfetto.protos.TraceConfig.AndroidReportConfig.verify(m.androidReportConfig);
                        if (e)
                            return "androidReportConfig." + e;
                    }
                }
                if (m.cmdTraceStartDelay != null && m.hasOwnProperty("cmdTraceStartDelay")) {
                    {
                        var e = $root.perfetto.protos.TraceConfig.CmdTraceStartDelay.verify(m.cmdTraceStartDelay);
                        if (e)
                            return "cmdTraceStartDelay." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a TraceConfig message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TraceConfig
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TraceConfig} TraceConfig
             */
            TraceConfig.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TraceConfig)
                    return d;
                var m = new $root.perfetto.protos.TraceConfig();
                if (d.buffers) {
                    if (!Array.isArray(d.buffers))
                        throw TypeError(".perfetto.protos.TraceConfig.buffers: array expected");
                    m.buffers = [];
                    for (var i = 0; i < d.buffers.length; ++i) {
                        if (typeof d.buffers[i] !== "object")
                            throw TypeError(".perfetto.protos.TraceConfig.buffers: object expected");
                        m.buffers[i] = $root.perfetto.protos.TraceConfig.BufferConfig.fromObject(d.buffers[i]);
                    }
                }
                if (d.dataSources) {
                    if (!Array.isArray(d.dataSources))
                        throw TypeError(".perfetto.protos.TraceConfig.dataSources: array expected");
                    m.dataSources = [];
                    for (var i = 0; i < d.dataSources.length; ++i) {
                        if (typeof d.dataSources[i] !== "object")
                            throw TypeError(".perfetto.protos.TraceConfig.dataSources: object expected");
                        m.dataSources[i] = $root.perfetto.protos.TraceConfig.DataSource.fromObject(d.dataSources[i]);
                    }
                }
                if (d.builtinDataSources != null) {
                    if (typeof d.builtinDataSources !== "object")
                        throw TypeError(".perfetto.protos.TraceConfig.builtinDataSources: object expected");
                    m.builtinDataSources = $root.perfetto.protos.TraceConfig.BuiltinDataSource.fromObject(d.builtinDataSources);
                }
                if (d.durationMs != null) {
                    m.durationMs = d.durationMs >>> 0;
                }
                if (d.enableExtraGuardrails != null) {
                    m.enableExtraGuardrails = Boolean(d.enableExtraGuardrails);
                }
                switch (d.lockdownMode) {
                case "LOCKDOWN_UNCHANGED":
                case 0:
                    m.lockdownMode = 0;
                    break;
                case "LOCKDOWN_CLEAR":
                case 1:
                    m.lockdownMode = 1;
                    break;
                case "LOCKDOWN_SET":
                case 2:
                    m.lockdownMode = 2;
                    break;
                }
                if (d.producers) {
                    if (!Array.isArray(d.producers))
                        throw TypeError(".perfetto.protos.TraceConfig.producers: array expected");
                    m.producers = [];
                    for (var i = 0; i < d.producers.length; ++i) {
                        if (typeof d.producers[i] !== "object")
                            throw TypeError(".perfetto.protos.TraceConfig.producers: object expected");
                        m.producers[i] = $root.perfetto.protos.TraceConfig.ProducerConfig.fromObject(d.producers[i]);
                    }
                }
                if (d.statsdMetadata != null) {
                    if (typeof d.statsdMetadata !== "object")
                        throw TypeError(".perfetto.protos.TraceConfig.statsdMetadata: object expected");
                    m.statsdMetadata = $root.perfetto.protos.TraceConfig.StatsdMetadata.fromObject(d.statsdMetadata);
                }
                if (d.writeIntoFile != null) {
                    m.writeIntoFile = Boolean(d.writeIntoFile);
                }
                if (d.outputPath != null) {
                    m.outputPath = String(d.outputPath);
                }
                if (d.fileWritePeriodMs != null) {
                    m.fileWritePeriodMs = d.fileWritePeriodMs >>> 0;
                }
                if (d.maxFileSizeBytes != null) {
                    if ($util.Long)
                        (m.maxFileSizeBytes = $util.Long.fromValue(d.maxFileSizeBytes)).unsigned = true;
                    else if (typeof d.maxFileSizeBytes === "string")
                        m.maxFileSizeBytes = parseInt(d.maxFileSizeBytes, 10);
                    else if (typeof d.maxFileSizeBytes === "number")
                        m.maxFileSizeBytes = d.maxFileSizeBytes;
                    else if (typeof d.maxFileSizeBytes === "object")
                        m.maxFileSizeBytes = new $util.LongBits(d.maxFileSizeBytes.low >>> 0, d.maxFileSizeBytes.high >>> 0).toNumber(true);
                }
                if (d.guardrailOverrides != null) {
                    if (typeof d.guardrailOverrides !== "object")
                        throw TypeError(".perfetto.protos.TraceConfig.guardrailOverrides: object expected");
                    m.guardrailOverrides = $root.perfetto.protos.TraceConfig.GuardrailOverrides.fromObject(d.guardrailOverrides);
                }
                if (d.deferredStart != null) {
                    m.deferredStart = Boolean(d.deferredStart);
                }
                if (d.flushPeriodMs != null) {
                    m.flushPeriodMs = d.flushPeriodMs >>> 0;
                }
                if (d.flushTimeoutMs != null) {
                    m.flushTimeoutMs = d.flushTimeoutMs >>> 0;
                }
                if (d.dataSourceStopTimeoutMs != null) {
                    m.dataSourceStopTimeoutMs = d.dataSourceStopTimeoutMs >>> 0;
                }
                if (d.notifyTraceur != null) {
                    m.notifyTraceur = Boolean(d.notifyTraceur);
                }
                if (d.bugreportScore != null) {
                    m.bugreportScore = d.bugreportScore | 0;
                }
                if (d.triggerConfig != null) {
                    if (typeof d.triggerConfig !== "object")
                        throw TypeError(".perfetto.protos.TraceConfig.triggerConfig: object expected");
                    m.triggerConfig = $root.perfetto.protos.TraceConfig.TriggerConfig.fromObject(d.triggerConfig);
                }
                if (d.activateTriggers) {
                    if (!Array.isArray(d.activateTriggers))
                        throw TypeError(".perfetto.protos.TraceConfig.activateTriggers: array expected");
                    m.activateTriggers = [];
                    for (var i = 0; i < d.activateTriggers.length; ++i) {
                        m.activateTriggers[i] = String(d.activateTriggers[i]);
                    }
                }
                if (d.incrementalStateConfig != null) {
                    if (typeof d.incrementalStateConfig !== "object")
                        throw TypeError(".perfetto.protos.TraceConfig.incrementalStateConfig: object expected");
                    m.incrementalStateConfig = $root.perfetto.protos.TraceConfig.IncrementalStateConfig.fromObject(d.incrementalStateConfig);
                }
                if (d.allowUserBuildTracing != null) {
                    m.allowUserBuildTracing = Boolean(d.allowUserBuildTracing);
                }
                if (d.uniqueSessionName != null) {
                    m.uniqueSessionName = String(d.uniqueSessionName);
                }
                switch (d.compressionType) {
                case "COMPRESSION_TYPE_UNSPECIFIED":
                case 0:
                    m.compressionType = 0;
                    break;
                case "COMPRESSION_TYPE_DEFLATE":
                case 1:
                    m.compressionType = 1;
                    break;
                }
                if (d.incidentReportConfig != null) {
                    if (typeof d.incidentReportConfig !== "object")
                        throw TypeError(".perfetto.protos.TraceConfig.incidentReportConfig: object expected");
                    m.incidentReportConfig = $root.perfetto.protos.TraceConfig.IncidentReportConfig.fromObject(d.incidentReportConfig);
                }
                switch (d.statsdLogging) {
                case "STATSD_LOGGING_UNSPECIFIED":
                case 0:
                    m.statsdLogging = 0;
                    break;
                case "STATSD_LOGGING_ENABLED":
                case 1:
                    m.statsdLogging = 1;
                    break;
                case "STATSD_LOGGING_DISABLED":
                case 2:
                    m.statsdLogging = 2;
                    break;
                }
                if (d.traceUuidMsb != null) {
                    if ($util.Long)
                        (m.traceUuidMsb = $util.Long.fromValue(d.traceUuidMsb)).unsigned = false;
                    else if (typeof d.traceUuidMsb === "string")
                        m.traceUuidMsb = parseInt(d.traceUuidMsb, 10);
                    else if (typeof d.traceUuidMsb === "number")
                        m.traceUuidMsb = d.traceUuidMsb;
                    else if (typeof d.traceUuidMsb === "object")
                        m.traceUuidMsb = new $util.LongBits(d.traceUuidMsb.low >>> 0, d.traceUuidMsb.high >>> 0).toNumber();
                }
                if (d.traceUuidLsb != null) {
                    if ($util.Long)
                        (m.traceUuidLsb = $util.Long.fromValue(d.traceUuidLsb)).unsigned = false;
                    else if (typeof d.traceUuidLsb === "string")
                        m.traceUuidLsb = parseInt(d.traceUuidLsb, 10);
                    else if (typeof d.traceUuidLsb === "number")
                        m.traceUuidLsb = d.traceUuidLsb;
                    else if (typeof d.traceUuidLsb === "object")
                        m.traceUuidLsb = new $util.LongBits(d.traceUuidLsb.low >>> 0, d.traceUuidLsb.high >>> 0).toNumber();
                }
                if (d.traceFilter != null) {
                    if (typeof d.traceFilter !== "object")
                        throw TypeError(".perfetto.protos.TraceConfig.traceFilter: object expected");
                    m.traceFilter = $root.perfetto.protos.TraceConfig.TraceFilter.fromObject(d.traceFilter);
                }
                if (d.androidReportConfig != null) {
                    if (typeof d.androidReportConfig !== "object")
                        throw TypeError(".perfetto.protos.TraceConfig.androidReportConfig: object expected");
                    m.androidReportConfig = $root.perfetto.protos.TraceConfig.AndroidReportConfig.fromObject(d.androidReportConfig);
                }
                if (d.cmdTraceStartDelay != null) {
                    if (typeof d.cmdTraceStartDelay !== "object")
                        throw TypeError(".perfetto.protos.TraceConfig.cmdTraceStartDelay: object expected");
                    m.cmdTraceStartDelay = $root.perfetto.protos.TraceConfig.CmdTraceStartDelay.fromObject(d.cmdTraceStartDelay);
                }
                return m;
            };

            /**
             * Creates a plain object from a TraceConfig message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TraceConfig
             * @static
             * @param {perfetto.protos.TraceConfig} m TraceConfig
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TraceConfig.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.buffers = [];
                    d.dataSources = [];
                    d.producers = [];
                    d.activateTriggers = [];
                }
                if (o.defaults) {
                    d.durationMs = 0;
                    d.enableExtraGuardrails = false;
                    d.lockdownMode = o.enums === String ? "LOCKDOWN_UNCHANGED" : 0;
                    d.statsdMetadata = null;
                    d.writeIntoFile = false;
                    d.fileWritePeriodMs = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.maxFileSizeBytes = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.maxFileSizeBytes = o.longs === String ? "0" : 0;
                    d.guardrailOverrides = null;
                    d.deferredStart = false;
                    d.flushPeriodMs = 0;
                    d.flushTimeoutMs = 0;
                    d.notifyTraceur = false;
                    d.triggerConfig = null;
                    d.allowUserBuildTracing = false;
                    d.builtinDataSources = null;
                    d.incrementalStateConfig = null;
                    d.uniqueSessionName = "";
                    d.dataSourceStopTimeoutMs = 0;
                    d.compressionType = o.enums === String ? "COMPRESSION_TYPE_UNSPECIFIED" : 0;
                    d.incidentReportConfig = null;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.traceUuidMsb = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.traceUuidMsb = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.traceUuidLsb = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.traceUuidLsb = o.longs === String ? "0" : 0;
                    d.outputPath = "";
                    d.bugreportScore = 0;
                    d.statsdLogging = o.enums === String ? "STATSD_LOGGING_UNSPECIFIED" : 0;
                    d.traceFilter = null;
                    d.androidReportConfig = null;
                    d.cmdTraceStartDelay = null;
                }
                if (m.buffers && m.buffers.length) {
                    d.buffers = [];
                    for (var j = 0; j < m.buffers.length; ++j) {
                        d.buffers[j] = $root.perfetto.protos.TraceConfig.BufferConfig.toObject(m.buffers[j], o);
                    }
                }
                if (m.dataSources && m.dataSources.length) {
                    d.dataSources = [];
                    for (var j = 0; j < m.dataSources.length; ++j) {
                        d.dataSources[j] = $root.perfetto.protos.TraceConfig.DataSource.toObject(m.dataSources[j], o);
                    }
                }
                if (m.durationMs != null && m.hasOwnProperty("durationMs")) {
                    d.durationMs = m.durationMs;
                }
                if (m.enableExtraGuardrails != null && m.hasOwnProperty("enableExtraGuardrails")) {
                    d.enableExtraGuardrails = m.enableExtraGuardrails;
                }
                if (m.lockdownMode != null && m.hasOwnProperty("lockdownMode")) {
                    d.lockdownMode = o.enums === String ? $root.perfetto.protos.TraceConfig.LockdownModeOperation[m.lockdownMode] : m.lockdownMode;
                }
                if (m.producers && m.producers.length) {
                    d.producers = [];
                    for (var j = 0; j < m.producers.length; ++j) {
                        d.producers[j] = $root.perfetto.protos.TraceConfig.ProducerConfig.toObject(m.producers[j], o);
                    }
                }
                if (m.statsdMetadata != null && m.hasOwnProperty("statsdMetadata")) {
                    d.statsdMetadata = $root.perfetto.protos.TraceConfig.StatsdMetadata.toObject(m.statsdMetadata, o);
                }
                if (m.writeIntoFile != null && m.hasOwnProperty("writeIntoFile")) {
                    d.writeIntoFile = m.writeIntoFile;
                }
                if (m.fileWritePeriodMs != null && m.hasOwnProperty("fileWritePeriodMs")) {
                    d.fileWritePeriodMs = m.fileWritePeriodMs;
                }
                if (m.maxFileSizeBytes != null && m.hasOwnProperty("maxFileSizeBytes")) {
                    if (typeof m.maxFileSizeBytes === "number")
                        d.maxFileSizeBytes = o.longs === String ? String(m.maxFileSizeBytes) : m.maxFileSizeBytes;
                    else
                        d.maxFileSizeBytes = o.longs === String ? $util.Long.prototype.toString.call(m.maxFileSizeBytes) : o.longs === Number ? new $util.LongBits(m.maxFileSizeBytes.low >>> 0, m.maxFileSizeBytes.high >>> 0).toNumber(true) : m.maxFileSizeBytes;
                }
                if (m.guardrailOverrides != null && m.hasOwnProperty("guardrailOverrides")) {
                    d.guardrailOverrides = $root.perfetto.protos.TraceConfig.GuardrailOverrides.toObject(m.guardrailOverrides, o);
                }
                if (m.deferredStart != null && m.hasOwnProperty("deferredStart")) {
                    d.deferredStart = m.deferredStart;
                }
                if (m.flushPeriodMs != null && m.hasOwnProperty("flushPeriodMs")) {
                    d.flushPeriodMs = m.flushPeriodMs;
                }
                if (m.flushTimeoutMs != null && m.hasOwnProperty("flushTimeoutMs")) {
                    d.flushTimeoutMs = m.flushTimeoutMs;
                }
                if (m.notifyTraceur != null && m.hasOwnProperty("notifyTraceur")) {
                    d.notifyTraceur = m.notifyTraceur;
                }
                if (m.triggerConfig != null && m.hasOwnProperty("triggerConfig")) {
                    d.triggerConfig = $root.perfetto.protos.TraceConfig.TriggerConfig.toObject(m.triggerConfig, o);
                }
                if (m.activateTriggers && m.activateTriggers.length) {
                    d.activateTriggers = [];
                    for (var j = 0; j < m.activateTriggers.length; ++j) {
                        d.activateTriggers[j] = m.activateTriggers[j];
                    }
                }
                if (m.allowUserBuildTracing != null && m.hasOwnProperty("allowUserBuildTracing")) {
                    d.allowUserBuildTracing = m.allowUserBuildTracing;
                }
                if (m.builtinDataSources != null && m.hasOwnProperty("builtinDataSources")) {
                    d.builtinDataSources = $root.perfetto.protos.TraceConfig.BuiltinDataSource.toObject(m.builtinDataSources, o);
                }
                if (m.incrementalStateConfig != null && m.hasOwnProperty("incrementalStateConfig")) {
                    d.incrementalStateConfig = $root.perfetto.protos.TraceConfig.IncrementalStateConfig.toObject(m.incrementalStateConfig, o);
                }
                if (m.uniqueSessionName != null && m.hasOwnProperty("uniqueSessionName")) {
                    d.uniqueSessionName = m.uniqueSessionName;
                }
                if (m.dataSourceStopTimeoutMs != null && m.hasOwnProperty("dataSourceStopTimeoutMs")) {
                    d.dataSourceStopTimeoutMs = m.dataSourceStopTimeoutMs;
                }
                if (m.compressionType != null && m.hasOwnProperty("compressionType")) {
                    d.compressionType = o.enums === String ? $root.perfetto.protos.TraceConfig.CompressionType[m.compressionType] : m.compressionType;
                }
                if (m.incidentReportConfig != null && m.hasOwnProperty("incidentReportConfig")) {
                    d.incidentReportConfig = $root.perfetto.protos.TraceConfig.IncidentReportConfig.toObject(m.incidentReportConfig, o);
                }
                if (m.traceUuidMsb != null && m.hasOwnProperty("traceUuidMsb")) {
                    if (typeof m.traceUuidMsb === "number")
                        d.traceUuidMsb = o.longs === String ? String(m.traceUuidMsb) : m.traceUuidMsb;
                    else
                        d.traceUuidMsb = o.longs === String ? $util.Long.prototype.toString.call(m.traceUuidMsb) : o.longs === Number ? new $util.LongBits(m.traceUuidMsb.low >>> 0, m.traceUuidMsb.high >>> 0).toNumber() : m.traceUuidMsb;
                }
                if (m.traceUuidLsb != null && m.hasOwnProperty("traceUuidLsb")) {
                    if (typeof m.traceUuidLsb === "number")
                        d.traceUuidLsb = o.longs === String ? String(m.traceUuidLsb) : m.traceUuidLsb;
                    else
                        d.traceUuidLsb = o.longs === String ? $util.Long.prototype.toString.call(m.traceUuidLsb) : o.longs === Number ? new $util.LongBits(m.traceUuidLsb.low >>> 0, m.traceUuidLsb.high >>> 0).toNumber() : m.traceUuidLsb;
                }
                if (m.outputPath != null && m.hasOwnProperty("outputPath")) {
                    d.outputPath = m.outputPath;
                }
                if (m.bugreportScore != null && m.hasOwnProperty("bugreportScore")) {
                    d.bugreportScore = m.bugreportScore;
                }
                if (m.statsdLogging != null && m.hasOwnProperty("statsdLogging")) {
                    d.statsdLogging = o.enums === String ? $root.perfetto.protos.TraceConfig.StatsdLogging[m.statsdLogging] : m.statsdLogging;
                }
                if (m.traceFilter != null && m.hasOwnProperty("traceFilter")) {
                    d.traceFilter = $root.perfetto.protos.TraceConfig.TraceFilter.toObject(m.traceFilter, o);
                }
                if (m.androidReportConfig != null && m.hasOwnProperty("androidReportConfig")) {
                    d.androidReportConfig = $root.perfetto.protos.TraceConfig.AndroidReportConfig.toObject(m.androidReportConfig, o);
                }
                if (m.cmdTraceStartDelay != null && m.hasOwnProperty("cmdTraceStartDelay")) {
                    d.cmdTraceStartDelay = $root.perfetto.protos.TraceConfig.CmdTraceStartDelay.toObject(m.cmdTraceStartDelay, o);
                }
                return d;
            };

            /**
             * Converts this TraceConfig to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TraceConfig
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TraceConfig.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            TraceConfig.BufferConfig = (function() {

                /**
                 * Properties of a BufferConfig.
                 * @memberof perfetto.protos.TraceConfig
                 * @interface IBufferConfig
                 * @property {number|null} [sizeKb] BufferConfig sizeKb
                 * @property {perfetto.protos.TraceConfig.BufferConfig.FillPolicy|null} [fillPolicy] BufferConfig fillPolicy
                 */

                /**
                 * Constructs a new BufferConfig.
                 * @memberof perfetto.protos.TraceConfig
                 * @classdesc Represents a BufferConfig.
                 * @implements IBufferConfig
                 * @constructor
                 * @param {perfetto.protos.TraceConfig.IBufferConfig=} [p] Properties to set
                 */
                function BufferConfig(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * BufferConfig sizeKb.
                 * @member {number} sizeKb
                 * @memberof perfetto.protos.TraceConfig.BufferConfig
                 * @instance
                 */
                BufferConfig.prototype.sizeKb = 0;

                /**
                 * BufferConfig fillPolicy.
                 * @member {perfetto.protos.TraceConfig.BufferConfig.FillPolicy} fillPolicy
                 * @memberof perfetto.protos.TraceConfig.BufferConfig
                 * @instance
                 */
                BufferConfig.prototype.fillPolicy = 0;

                /**
                 * Creates a new BufferConfig instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.TraceConfig.BufferConfig
                 * @static
                 * @param {perfetto.protos.TraceConfig.IBufferConfig=} [properties] Properties to set
                 * @returns {perfetto.protos.TraceConfig.BufferConfig} BufferConfig instance
                 */
                BufferConfig.create = function create(properties) {
                    return new BufferConfig(properties);
                };

                /**
                 * Encodes the specified BufferConfig message. Does not implicitly {@link perfetto.protos.TraceConfig.BufferConfig.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.TraceConfig.BufferConfig
                 * @static
                 * @param {perfetto.protos.TraceConfig.IBufferConfig} m BufferConfig message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BufferConfig.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.sizeKb != null && Object.hasOwnProperty.call(m, "sizeKb"))
                        w.uint32(8).uint32(m.sizeKb);
                    if (m.fillPolicy != null && Object.hasOwnProperty.call(m, "fillPolicy"))
                        w.uint32(32).int32(m.fillPolicy);
                    return w;
                };

                /**
                 * Encodes the specified BufferConfig message, length delimited. Does not implicitly {@link perfetto.protos.TraceConfig.BufferConfig.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.TraceConfig.BufferConfig
                 * @static
                 * @param {perfetto.protos.TraceConfig.IBufferConfig} message BufferConfig message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BufferConfig.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a BufferConfig message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.TraceConfig.BufferConfig
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.TraceConfig.BufferConfig} BufferConfig
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BufferConfig.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TraceConfig.BufferConfig();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.sizeKb = r.uint32();
                            break;
                        case 4:
                            m.fillPolicy = r.int32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a BufferConfig message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.TraceConfig.BufferConfig
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.TraceConfig.BufferConfig} BufferConfig
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BufferConfig.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a BufferConfig message.
                 * @function verify
                 * @memberof perfetto.protos.TraceConfig.BufferConfig
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                BufferConfig.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.sizeKb != null && m.hasOwnProperty("sizeKb")) {
                        if (!$util.isInteger(m.sizeKb))
                            return "sizeKb: integer expected";
                    }
                    if (m.fillPolicy != null && m.hasOwnProperty("fillPolicy")) {
                        switch (m.fillPolicy) {
                        default:
                            return "fillPolicy: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                            break;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a BufferConfig message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.TraceConfig.BufferConfig
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.TraceConfig.BufferConfig} BufferConfig
                 */
                BufferConfig.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.TraceConfig.BufferConfig)
                        return d;
                    var m = new $root.perfetto.protos.TraceConfig.BufferConfig();
                    if (d.sizeKb != null) {
                        m.sizeKb = d.sizeKb >>> 0;
                    }
                    switch (d.fillPolicy) {
                    case "UNSPECIFIED":
                    case 0:
                        m.fillPolicy = 0;
                        break;
                    case "RING_BUFFER":
                    case 1:
                        m.fillPolicy = 1;
                        break;
                    case "DISCARD":
                    case 2:
                        m.fillPolicy = 2;
                        break;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a BufferConfig message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.TraceConfig.BufferConfig
                 * @static
                 * @param {perfetto.protos.TraceConfig.BufferConfig} m BufferConfig
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                BufferConfig.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.sizeKb = 0;
                        d.fillPolicy = o.enums === String ? "UNSPECIFIED" : 0;
                    }
                    if (m.sizeKb != null && m.hasOwnProperty("sizeKb")) {
                        d.sizeKb = m.sizeKb;
                    }
                    if (m.fillPolicy != null && m.hasOwnProperty("fillPolicy")) {
                        d.fillPolicy = o.enums === String ? $root.perfetto.protos.TraceConfig.BufferConfig.FillPolicy[m.fillPolicy] : m.fillPolicy;
                    }
                    return d;
                };

                /**
                 * Converts this BufferConfig to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.TraceConfig.BufferConfig
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                BufferConfig.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                /**
                 * FillPolicy enum.
                 * @name perfetto.protos.TraceConfig.BufferConfig.FillPolicy
                 * @enum {number}
                 * @property {number} UNSPECIFIED=0 UNSPECIFIED value
                 * @property {number} RING_BUFFER=1 RING_BUFFER value
                 * @property {number} DISCARD=2 DISCARD value
                 */
                BufferConfig.FillPolicy = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "UNSPECIFIED"] = 0;
                    values[valuesById[1] = "RING_BUFFER"] = 1;
                    values[valuesById[2] = "DISCARD"] = 2;
                    return values;
                })();

                return BufferConfig;
            })();

            TraceConfig.DataSource = (function() {

                /**
                 * Properties of a DataSource.
                 * @memberof perfetto.protos.TraceConfig
                 * @interface IDataSource
                 * @property {perfetto.protos.IDataSourceConfig|null} [config] DataSource config
                 * @property {Array.<string>|null} [producerNameFilter] DataSource producerNameFilter
                 * @property {Array.<string>|null} [producerNameRegexFilter] DataSource producerNameRegexFilter
                 */

                /**
                 * Constructs a new DataSource.
                 * @memberof perfetto.protos.TraceConfig
                 * @classdesc Represents a DataSource.
                 * @implements IDataSource
                 * @constructor
                 * @param {perfetto.protos.TraceConfig.IDataSource=} [p] Properties to set
                 */
                function DataSource(p) {
                    this.producerNameFilter = [];
                    this.producerNameRegexFilter = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * DataSource config.
                 * @member {perfetto.protos.IDataSourceConfig|null|undefined} config
                 * @memberof perfetto.protos.TraceConfig.DataSource
                 * @instance
                 */
                DataSource.prototype.config = null;

                /**
                 * DataSource producerNameFilter.
                 * @member {Array.<string>} producerNameFilter
                 * @memberof perfetto.protos.TraceConfig.DataSource
                 * @instance
                 */
                DataSource.prototype.producerNameFilter = $util.emptyArray;

                /**
                 * DataSource producerNameRegexFilter.
                 * @member {Array.<string>} producerNameRegexFilter
                 * @memberof perfetto.protos.TraceConfig.DataSource
                 * @instance
                 */
                DataSource.prototype.producerNameRegexFilter = $util.emptyArray;

                /**
                 * Creates a new DataSource instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.TraceConfig.DataSource
                 * @static
                 * @param {perfetto.protos.TraceConfig.IDataSource=} [properties] Properties to set
                 * @returns {perfetto.protos.TraceConfig.DataSource} DataSource instance
                 */
                DataSource.create = function create(properties) {
                    return new DataSource(properties);
                };

                /**
                 * Encodes the specified DataSource message. Does not implicitly {@link perfetto.protos.TraceConfig.DataSource.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.TraceConfig.DataSource
                 * @static
                 * @param {perfetto.protos.TraceConfig.IDataSource} m DataSource message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                DataSource.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.config != null && Object.hasOwnProperty.call(m, "config"))
                        $root.perfetto.protos.DataSourceConfig.encode(m.config, w.uint32(10).fork()).ldelim();
                    if (m.producerNameFilter != null && m.producerNameFilter.length) {
                        for (var i = 0; i < m.producerNameFilter.length; ++i)
                            w.uint32(18).string(m.producerNameFilter[i]);
                    }
                    if (m.producerNameRegexFilter != null && m.producerNameRegexFilter.length) {
                        for (var i = 0; i < m.producerNameRegexFilter.length; ++i)
                            w.uint32(26).string(m.producerNameRegexFilter[i]);
                    }
                    return w;
                };

                /**
                 * Encodes the specified DataSource message, length delimited. Does not implicitly {@link perfetto.protos.TraceConfig.DataSource.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.TraceConfig.DataSource
                 * @static
                 * @param {perfetto.protos.TraceConfig.IDataSource} message DataSource message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                DataSource.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a DataSource message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.TraceConfig.DataSource
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.TraceConfig.DataSource} DataSource
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                DataSource.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TraceConfig.DataSource();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.config = $root.perfetto.protos.DataSourceConfig.decode(r, r.uint32());
                            break;
                        case 2:
                            if (!(m.producerNameFilter && m.producerNameFilter.length))
                                m.producerNameFilter = [];
                            m.producerNameFilter.push(r.string());
                            break;
                        case 3:
                            if (!(m.producerNameRegexFilter && m.producerNameRegexFilter.length))
                                m.producerNameRegexFilter = [];
                            m.producerNameRegexFilter.push(r.string());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a DataSource message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.TraceConfig.DataSource
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.TraceConfig.DataSource} DataSource
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                DataSource.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a DataSource message.
                 * @function verify
                 * @memberof perfetto.protos.TraceConfig.DataSource
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                DataSource.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.config != null && m.hasOwnProperty("config")) {
                        {
                            var e = $root.perfetto.protos.DataSourceConfig.verify(m.config);
                            if (e)
                                return "config." + e;
                        }
                    }
                    if (m.producerNameFilter != null && m.hasOwnProperty("producerNameFilter")) {
                        if (!Array.isArray(m.producerNameFilter))
                            return "producerNameFilter: array expected";
                        for (var i = 0; i < m.producerNameFilter.length; ++i) {
                            if (!$util.isString(m.producerNameFilter[i]))
                                return "producerNameFilter: string[] expected";
                        }
                    }
                    if (m.producerNameRegexFilter != null && m.hasOwnProperty("producerNameRegexFilter")) {
                        if (!Array.isArray(m.producerNameRegexFilter))
                            return "producerNameRegexFilter: array expected";
                        for (var i = 0; i < m.producerNameRegexFilter.length; ++i) {
                            if (!$util.isString(m.producerNameRegexFilter[i]))
                                return "producerNameRegexFilter: string[] expected";
                        }
                    }
                    return null;
                };

                /**
                 * Creates a DataSource message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.TraceConfig.DataSource
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.TraceConfig.DataSource} DataSource
                 */
                DataSource.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.TraceConfig.DataSource)
                        return d;
                    var m = new $root.perfetto.protos.TraceConfig.DataSource();
                    if (d.config != null) {
                        if (typeof d.config !== "object")
                            throw TypeError(".perfetto.protos.TraceConfig.DataSource.config: object expected");
                        m.config = $root.perfetto.protos.DataSourceConfig.fromObject(d.config);
                    }
                    if (d.producerNameFilter) {
                        if (!Array.isArray(d.producerNameFilter))
                            throw TypeError(".perfetto.protos.TraceConfig.DataSource.producerNameFilter: array expected");
                        m.producerNameFilter = [];
                        for (var i = 0; i < d.producerNameFilter.length; ++i) {
                            m.producerNameFilter[i] = String(d.producerNameFilter[i]);
                        }
                    }
                    if (d.producerNameRegexFilter) {
                        if (!Array.isArray(d.producerNameRegexFilter))
                            throw TypeError(".perfetto.protos.TraceConfig.DataSource.producerNameRegexFilter: array expected");
                        m.producerNameRegexFilter = [];
                        for (var i = 0; i < d.producerNameRegexFilter.length; ++i) {
                            m.producerNameRegexFilter[i] = String(d.producerNameRegexFilter[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a DataSource message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.TraceConfig.DataSource
                 * @static
                 * @param {perfetto.protos.TraceConfig.DataSource} m DataSource
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                DataSource.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.producerNameFilter = [];
                        d.producerNameRegexFilter = [];
                    }
                    if (o.defaults) {
                        d.config = null;
                    }
                    if (m.config != null && m.hasOwnProperty("config")) {
                        d.config = $root.perfetto.protos.DataSourceConfig.toObject(m.config, o);
                    }
                    if (m.producerNameFilter && m.producerNameFilter.length) {
                        d.producerNameFilter = [];
                        for (var j = 0; j < m.producerNameFilter.length; ++j) {
                            d.producerNameFilter[j] = m.producerNameFilter[j];
                        }
                    }
                    if (m.producerNameRegexFilter && m.producerNameRegexFilter.length) {
                        d.producerNameRegexFilter = [];
                        for (var j = 0; j < m.producerNameRegexFilter.length; ++j) {
                            d.producerNameRegexFilter[j] = m.producerNameRegexFilter[j];
                        }
                    }
                    return d;
                };

                /**
                 * Converts this DataSource to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.TraceConfig.DataSource
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                DataSource.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return DataSource;
            })();

            TraceConfig.BuiltinDataSource = (function() {

                /**
                 * Properties of a BuiltinDataSource.
                 * @memberof perfetto.protos.TraceConfig
                 * @interface IBuiltinDataSource
                 * @property {boolean|null} [disableClockSnapshotting] BuiltinDataSource disableClockSnapshotting
                 * @property {boolean|null} [disableTraceConfig] BuiltinDataSource disableTraceConfig
                 * @property {boolean|null} [disableSystemInfo] BuiltinDataSource disableSystemInfo
                 * @property {boolean|null} [disableServiceEvents] BuiltinDataSource disableServiceEvents
                 * @property {perfetto.protos.BuiltinClock|null} [primaryTraceClock] BuiltinDataSource primaryTraceClock
                 * @property {number|null} [snapshotIntervalMs] BuiltinDataSource snapshotIntervalMs
                 * @property {boolean|null} [preferSuspendClockForSnapshot] BuiltinDataSource preferSuspendClockForSnapshot
                 */

                /**
                 * Constructs a new BuiltinDataSource.
                 * @memberof perfetto.protos.TraceConfig
                 * @classdesc Represents a BuiltinDataSource.
                 * @implements IBuiltinDataSource
                 * @constructor
                 * @param {perfetto.protos.TraceConfig.IBuiltinDataSource=} [p] Properties to set
                 */
                function BuiltinDataSource(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * BuiltinDataSource disableClockSnapshotting.
                 * @member {boolean} disableClockSnapshotting
                 * @memberof perfetto.protos.TraceConfig.BuiltinDataSource
                 * @instance
                 */
                BuiltinDataSource.prototype.disableClockSnapshotting = false;

                /**
                 * BuiltinDataSource disableTraceConfig.
                 * @member {boolean} disableTraceConfig
                 * @memberof perfetto.protos.TraceConfig.BuiltinDataSource
                 * @instance
                 */
                BuiltinDataSource.prototype.disableTraceConfig = false;

                /**
                 * BuiltinDataSource disableSystemInfo.
                 * @member {boolean} disableSystemInfo
                 * @memberof perfetto.protos.TraceConfig.BuiltinDataSource
                 * @instance
                 */
                BuiltinDataSource.prototype.disableSystemInfo = false;

                /**
                 * BuiltinDataSource disableServiceEvents.
                 * @member {boolean} disableServiceEvents
                 * @memberof perfetto.protos.TraceConfig.BuiltinDataSource
                 * @instance
                 */
                BuiltinDataSource.prototype.disableServiceEvents = false;

                /**
                 * BuiltinDataSource primaryTraceClock.
                 * @member {perfetto.protos.BuiltinClock} primaryTraceClock
                 * @memberof perfetto.protos.TraceConfig.BuiltinDataSource
                 * @instance
                 */
                BuiltinDataSource.prototype.primaryTraceClock = 0;

                /**
                 * BuiltinDataSource snapshotIntervalMs.
                 * @member {number} snapshotIntervalMs
                 * @memberof perfetto.protos.TraceConfig.BuiltinDataSource
                 * @instance
                 */
                BuiltinDataSource.prototype.snapshotIntervalMs = 0;

                /**
                 * BuiltinDataSource preferSuspendClockForSnapshot.
                 * @member {boolean} preferSuspendClockForSnapshot
                 * @memberof perfetto.protos.TraceConfig.BuiltinDataSource
                 * @instance
                 */
                BuiltinDataSource.prototype.preferSuspendClockForSnapshot = false;

                /**
                 * Creates a new BuiltinDataSource instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.TraceConfig.BuiltinDataSource
                 * @static
                 * @param {perfetto.protos.TraceConfig.IBuiltinDataSource=} [properties] Properties to set
                 * @returns {perfetto.protos.TraceConfig.BuiltinDataSource} BuiltinDataSource instance
                 */
                BuiltinDataSource.create = function create(properties) {
                    return new BuiltinDataSource(properties);
                };

                /**
                 * Encodes the specified BuiltinDataSource message. Does not implicitly {@link perfetto.protos.TraceConfig.BuiltinDataSource.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.TraceConfig.BuiltinDataSource
                 * @static
                 * @param {perfetto.protos.TraceConfig.IBuiltinDataSource} m BuiltinDataSource message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BuiltinDataSource.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.disableClockSnapshotting != null && Object.hasOwnProperty.call(m, "disableClockSnapshotting"))
                        w.uint32(8).bool(m.disableClockSnapshotting);
                    if (m.disableTraceConfig != null && Object.hasOwnProperty.call(m, "disableTraceConfig"))
                        w.uint32(16).bool(m.disableTraceConfig);
                    if (m.disableSystemInfo != null && Object.hasOwnProperty.call(m, "disableSystemInfo"))
                        w.uint32(24).bool(m.disableSystemInfo);
                    if (m.disableServiceEvents != null && Object.hasOwnProperty.call(m, "disableServiceEvents"))
                        w.uint32(32).bool(m.disableServiceEvents);
                    if (m.primaryTraceClock != null && Object.hasOwnProperty.call(m, "primaryTraceClock"))
                        w.uint32(40).int32(m.primaryTraceClock);
                    if (m.snapshotIntervalMs != null && Object.hasOwnProperty.call(m, "snapshotIntervalMs"))
                        w.uint32(48).uint32(m.snapshotIntervalMs);
                    if (m.preferSuspendClockForSnapshot != null && Object.hasOwnProperty.call(m, "preferSuspendClockForSnapshot"))
                        w.uint32(56).bool(m.preferSuspendClockForSnapshot);
                    return w;
                };

                /**
                 * Encodes the specified BuiltinDataSource message, length delimited. Does not implicitly {@link perfetto.protos.TraceConfig.BuiltinDataSource.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.TraceConfig.BuiltinDataSource
                 * @static
                 * @param {perfetto.protos.TraceConfig.IBuiltinDataSource} message BuiltinDataSource message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BuiltinDataSource.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a BuiltinDataSource message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.TraceConfig.BuiltinDataSource
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.TraceConfig.BuiltinDataSource} BuiltinDataSource
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BuiltinDataSource.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TraceConfig.BuiltinDataSource();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.disableClockSnapshotting = r.bool();
                            break;
                        case 2:
                            m.disableTraceConfig = r.bool();
                            break;
                        case 3:
                            m.disableSystemInfo = r.bool();
                            break;
                        case 4:
                            m.disableServiceEvents = r.bool();
                            break;
                        case 5:
                            m.primaryTraceClock = r.int32();
                            break;
                        case 6:
                            m.snapshotIntervalMs = r.uint32();
                            break;
                        case 7:
                            m.preferSuspendClockForSnapshot = r.bool();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a BuiltinDataSource message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.TraceConfig.BuiltinDataSource
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.TraceConfig.BuiltinDataSource} BuiltinDataSource
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BuiltinDataSource.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a BuiltinDataSource message.
                 * @function verify
                 * @memberof perfetto.protos.TraceConfig.BuiltinDataSource
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                BuiltinDataSource.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.disableClockSnapshotting != null && m.hasOwnProperty("disableClockSnapshotting")) {
                        if (typeof m.disableClockSnapshotting !== "boolean")
                            return "disableClockSnapshotting: boolean expected";
                    }
                    if (m.disableTraceConfig != null && m.hasOwnProperty("disableTraceConfig")) {
                        if (typeof m.disableTraceConfig !== "boolean")
                            return "disableTraceConfig: boolean expected";
                    }
                    if (m.disableSystemInfo != null && m.hasOwnProperty("disableSystemInfo")) {
                        if (typeof m.disableSystemInfo !== "boolean")
                            return "disableSystemInfo: boolean expected";
                    }
                    if (m.disableServiceEvents != null && m.hasOwnProperty("disableServiceEvents")) {
                        if (typeof m.disableServiceEvents !== "boolean")
                            return "disableServiceEvents: boolean expected";
                    }
                    if (m.primaryTraceClock != null && m.hasOwnProperty("primaryTraceClock")) {
                        switch (m.primaryTraceClock) {
                        default:
                            return "primaryTraceClock: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                        case 6:
                        case 63:
                            break;
                        }
                    }
                    if (m.snapshotIntervalMs != null && m.hasOwnProperty("snapshotIntervalMs")) {
                        if (!$util.isInteger(m.snapshotIntervalMs))
                            return "snapshotIntervalMs: integer expected";
                    }
                    if (m.preferSuspendClockForSnapshot != null && m.hasOwnProperty("preferSuspendClockForSnapshot")) {
                        if (typeof m.preferSuspendClockForSnapshot !== "boolean")
                            return "preferSuspendClockForSnapshot: boolean expected";
                    }
                    return null;
                };

                /**
                 * Creates a BuiltinDataSource message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.TraceConfig.BuiltinDataSource
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.TraceConfig.BuiltinDataSource} BuiltinDataSource
                 */
                BuiltinDataSource.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.TraceConfig.BuiltinDataSource)
                        return d;
                    var m = new $root.perfetto.protos.TraceConfig.BuiltinDataSource();
                    if (d.disableClockSnapshotting != null) {
                        m.disableClockSnapshotting = Boolean(d.disableClockSnapshotting);
                    }
                    if (d.disableTraceConfig != null) {
                        m.disableTraceConfig = Boolean(d.disableTraceConfig);
                    }
                    if (d.disableSystemInfo != null) {
                        m.disableSystemInfo = Boolean(d.disableSystemInfo);
                    }
                    if (d.disableServiceEvents != null) {
                        m.disableServiceEvents = Boolean(d.disableServiceEvents);
                    }
                    switch (d.primaryTraceClock) {
                    case "BUILTIN_CLOCK_UNKNOWN":
                    case 0:
                        m.primaryTraceClock = 0;
                        break;
                    case "BUILTIN_CLOCK_REALTIME":
                    case 1:
                        m.primaryTraceClock = 1;
                        break;
                    case "BUILTIN_CLOCK_REALTIME_COARSE":
                    case 2:
                        m.primaryTraceClock = 2;
                        break;
                    case "BUILTIN_CLOCK_MONOTONIC":
                    case 3:
                        m.primaryTraceClock = 3;
                        break;
                    case "BUILTIN_CLOCK_MONOTONIC_COARSE":
                    case 4:
                        m.primaryTraceClock = 4;
                        break;
                    case "BUILTIN_CLOCK_MONOTONIC_RAW":
                    case 5:
                        m.primaryTraceClock = 5;
                        break;
                    case "BUILTIN_CLOCK_BOOTTIME":
                    case 6:
                        m.primaryTraceClock = 6;
                        break;
                    case "BUILTIN_CLOCK_MAX_ID":
                    case 63:
                        m.primaryTraceClock = 63;
                        break;
                    }
                    if (d.snapshotIntervalMs != null) {
                        m.snapshotIntervalMs = d.snapshotIntervalMs >>> 0;
                    }
                    if (d.preferSuspendClockForSnapshot != null) {
                        m.preferSuspendClockForSnapshot = Boolean(d.preferSuspendClockForSnapshot);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a BuiltinDataSource message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.TraceConfig.BuiltinDataSource
                 * @static
                 * @param {perfetto.protos.TraceConfig.BuiltinDataSource} m BuiltinDataSource
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                BuiltinDataSource.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.disableClockSnapshotting = false;
                        d.disableTraceConfig = false;
                        d.disableSystemInfo = false;
                        d.disableServiceEvents = false;
                        d.primaryTraceClock = o.enums === String ? "BUILTIN_CLOCK_UNKNOWN" : 0;
                        d.snapshotIntervalMs = 0;
                        d.preferSuspendClockForSnapshot = false;
                    }
                    if (m.disableClockSnapshotting != null && m.hasOwnProperty("disableClockSnapshotting")) {
                        d.disableClockSnapshotting = m.disableClockSnapshotting;
                    }
                    if (m.disableTraceConfig != null && m.hasOwnProperty("disableTraceConfig")) {
                        d.disableTraceConfig = m.disableTraceConfig;
                    }
                    if (m.disableSystemInfo != null && m.hasOwnProperty("disableSystemInfo")) {
                        d.disableSystemInfo = m.disableSystemInfo;
                    }
                    if (m.disableServiceEvents != null && m.hasOwnProperty("disableServiceEvents")) {
                        d.disableServiceEvents = m.disableServiceEvents;
                    }
                    if (m.primaryTraceClock != null && m.hasOwnProperty("primaryTraceClock")) {
                        d.primaryTraceClock = o.enums === String ? $root.perfetto.protos.BuiltinClock[m.primaryTraceClock] : m.primaryTraceClock;
                    }
                    if (m.snapshotIntervalMs != null && m.hasOwnProperty("snapshotIntervalMs")) {
                        d.snapshotIntervalMs = m.snapshotIntervalMs;
                    }
                    if (m.preferSuspendClockForSnapshot != null && m.hasOwnProperty("preferSuspendClockForSnapshot")) {
                        d.preferSuspendClockForSnapshot = m.preferSuspendClockForSnapshot;
                    }
                    return d;
                };

                /**
                 * Converts this BuiltinDataSource to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.TraceConfig.BuiltinDataSource
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                BuiltinDataSource.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return BuiltinDataSource;
            })();

            /**
             * LockdownModeOperation enum.
             * @name perfetto.protos.TraceConfig.LockdownModeOperation
             * @enum {number}
             * @property {number} LOCKDOWN_UNCHANGED=0 LOCKDOWN_UNCHANGED value
             * @property {number} LOCKDOWN_CLEAR=1 LOCKDOWN_CLEAR value
             * @property {number} LOCKDOWN_SET=2 LOCKDOWN_SET value
             */
            TraceConfig.LockdownModeOperation = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "LOCKDOWN_UNCHANGED"] = 0;
                values[valuesById[1] = "LOCKDOWN_CLEAR"] = 1;
                values[valuesById[2] = "LOCKDOWN_SET"] = 2;
                return values;
            })();

            TraceConfig.ProducerConfig = (function() {

                /**
                 * Properties of a ProducerConfig.
                 * @memberof perfetto.protos.TraceConfig
                 * @interface IProducerConfig
                 * @property {string|null} [producerName] ProducerConfig producerName
                 * @property {number|null} [shmSizeKb] ProducerConfig shmSizeKb
                 * @property {number|null} [pageSizeKb] ProducerConfig pageSizeKb
                 */

                /**
                 * Constructs a new ProducerConfig.
                 * @memberof perfetto.protos.TraceConfig
                 * @classdesc Represents a ProducerConfig.
                 * @implements IProducerConfig
                 * @constructor
                 * @param {perfetto.protos.TraceConfig.IProducerConfig=} [p] Properties to set
                 */
                function ProducerConfig(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * ProducerConfig producerName.
                 * @member {string} producerName
                 * @memberof perfetto.protos.TraceConfig.ProducerConfig
                 * @instance
                 */
                ProducerConfig.prototype.producerName = "";

                /**
                 * ProducerConfig shmSizeKb.
                 * @member {number} shmSizeKb
                 * @memberof perfetto.protos.TraceConfig.ProducerConfig
                 * @instance
                 */
                ProducerConfig.prototype.shmSizeKb = 0;

                /**
                 * ProducerConfig pageSizeKb.
                 * @member {number} pageSizeKb
                 * @memberof perfetto.protos.TraceConfig.ProducerConfig
                 * @instance
                 */
                ProducerConfig.prototype.pageSizeKb = 0;

                /**
                 * Creates a new ProducerConfig instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.TraceConfig.ProducerConfig
                 * @static
                 * @param {perfetto.protos.TraceConfig.IProducerConfig=} [properties] Properties to set
                 * @returns {perfetto.protos.TraceConfig.ProducerConfig} ProducerConfig instance
                 */
                ProducerConfig.create = function create(properties) {
                    return new ProducerConfig(properties);
                };

                /**
                 * Encodes the specified ProducerConfig message. Does not implicitly {@link perfetto.protos.TraceConfig.ProducerConfig.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.TraceConfig.ProducerConfig
                 * @static
                 * @param {perfetto.protos.TraceConfig.IProducerConfig} m ProducerConfig message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProducerConfig.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.producerName != null && Object.hasOwnProperty.call(m, "producerName"))
                        w.uint32(10).string(m.producerName);
                    if (m.shmSizeKb != null && Object.hasOwnProperty.call(m, "shmSizeKb"))
                        w.uint32(16).uint32(m.shmSizeKb);
                    if (m.pageSizeKb != null && Object.hasOwnProperty.call(m, "pageSizeKb"))
                        w.uint32(24).uint32(m.pageSizeKb);
                    return w;
                };

                /**
                 * Encodes the specified ProducerConfig message, length delimited. Does not implicitly {@link perfetto.protos.TraceConfig.ProducerConfig.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.TraceConfig.ProducerConfig
                 * @static
                 * @param {perfetto.protos.TraceConfig.IProducerConfig} message ProducerConfig message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProducerConfig.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a ProducerConfig message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.TraceConfig.ProducerConfig
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.TraceConfig.ProducerConfig} ProducerConfig
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProducerConfig.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TraceConfig.ProducerConfig();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.producerName = r.string();
                            break;
                        case 2:
                            m.shmSizeKb = r.uint32();
                            break;
                        case 3:
                            m.pageSizeKb = r.uint32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a ProducerConfig message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.TraceConfig.ProducerConfig
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.TraceConfig.ProducerConfig} ProducerConfig
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProducerConfig.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a ProducerConfig message.
                 * @function verify
                 * @memberof perfetto.protos.TraceConfig.ProducerConfig
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ProducerConfig.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.producerName != null && m.hasOwnProperty("producerName")) {
                        if (!$util.isString(m.producerName))
                            return "producerName: string expected";
                    }
                    if (m.shmSizeKb != null && m.hasOwnProperty("shmSizeKb")) {
                        if (!$util.isInteger(m.shmSizeKb))
                            return "shmSizeKb: integer expected";
                    }
                    if (m.pageSizeKb != null && m.hasOwnProperty("pageSizeKb")) {
                        if (!$util.isInteger(m.pageSizeKb))
                            return "pageSizeKb: integer expected";
                    }
                    return null;
                };

                /**
                 * Creates a ProducerConfig message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.TraceConfig.ProducerConfig
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.TraceConfig.ProducerConfig} ProducerConfig
                 */
                ProducerConfig.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.TraceConfig.ProducerConfig)
                        return d;
                    var m = new $root.perfetto.protos.TraceConfig.ProducerConfig();
                    if (d.producerName != null) {
                        m.producerName = String(d.producerName);
                    }
                    if (d.shmSizeKb != null) {
                        m.shmSizeKb = d.shmSizeKb >>> 0;
                    }
                    if (d.pageSizeKb != null) {
                        m.pageSizeKb = d.pageSizeKb >>> 0;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a ProducerConfig message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.TraceConfig.ProducerConfig
                 * @static
                 * @param {perfetto.protos.TraceConfig.ProducerConfig} m ProducerConfig
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ProducerConfig.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.producerName = "";
                        d.shmSizeKb = 0;
                        d.pageSizeKb = 0;
                    }
                    if (m.producerName != null && m.hasOwnProperty("producerName")) {
                        d.producerName = m.producerName;
                    }
                    if (m.shmSizeKb != null && m.hasOwnProperty("shmSizeKb")) {
                        d.shmSizeKb = m.shmSizeKb;
                    }
                    if (m.pageSizeKb != null && m.hasOwnProperty("pageSizeKb")) {
                        d.pageSizeKb = m.pageSizeKb;
                    }
                    return d;
                };

                /**
                 * Converts this ProducerConfig to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.TraceConfig.ProducerConfig
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ProducerConfig.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return ProducerConfig;
            })();

            TraceConfig.StatsdMetadata = (function() {

                /**
                 * Properties of a StatsdMetadata.
                 * @memberof perfetto.protos.TraceConfig
                 * @interface IStatsdMetadata
                 * @property {number|null} [triggeringAlertId] StatsdMetadata triggeringAlertId
                 * @property {number|null} [triggeringConfigUid] StatsdMetadata triggeringConfigUid
                 * @property {number|null} [triggeringConfigId] StatsdMetadata triggeringConfigId
                 * @property {number|null} [triggeringSubscriptionId] StatsdMetadata triggeringSubscriptionId
                 */

                /**
                 * Constructs a new StatsdMetadata.
                 * @memberof perfetto.protos.TraceConfig
                 * @classdesc Represents a StatsdMetadata.
                 * @implements IStatsdMetadata
                 * @constructor
                 * @param {perfetto.protos.TraceConfig.IStatsdMetadata=} [p] Properties to set
                 */
                function StatsdMetadata(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * StatsdMetadata triggeringAlertId.
                 * @member {number} triggeringAlertId
                 * @memberof perfetto.protos.TraceConfig.StatsdMetadata
                 * @instance
                 */
                StatsdMetadata.prototype.triggeringAlertId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * StatsdMetadata triggeringConfigUid.
                 * @member {number} triggeringConfigUid
                 * @memberof perfetto.protos.TraceConfig.StatsdMetadata
                 * @instance
                 */
                StatsdMetadata.prototype.triggeringConfigUid = 0;

                /**
                 * StatsdMetadata triggeringConfigId.
                 * @member {number} triggeringConfigId
                 * @memberof perfetto.protos.TraceConfig.StatsdMetadata
                 * @instance
                 */
                StatsdMetadata.prototype.triggeringConfigId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * StatsdMetadata triggeringSubscriptionId.
                 * @member {number} triggeringSubscriptionId
                 * @memberof perfetto.protos.TraceConfig.StatsdMetadata
                 * @instance
                 */
                StatsdMetadata.prototype.triggeringSubscriptionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new StatsdMetadata instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.TraceConfig.StatsdMetadata
                 * @static
                 * @param {perfetto.protos.TraceConfig.IStatsdMetadata=} [properties] Properties to set
                 * @returns {perfetto.protos.TraceConfig.StatsdMetadata} StatsdMetadata instance
                 */
                StatsdMetadata.create = function create(properties) {
                    return new StatsdMetadata(properties);
                };

                /**
                 * Encodes the specified StatsdMetadata message. Does not implicitly {@link perfetto.protos.TraceConfig.StatsdMetadata.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.TraceConfig.StatsdMetadata
                 * @static
                 * @param {perfetto.protos.TraceConfig.IStatsdMetadata} m StatsdMetadata message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                StatsdMetadata.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.triggeringAlertId != null && Object.hasOwnProperty.call(m, "triggeringAlertId"))
                        w.uint32(8).int64(m.triggeringAlertId);
                    if (m.triggeringConfigUid != null && Object.hasOwnProperty.call(m, "triggeringConfigUid"))
                        w.uint32(16).int32(m.triggeringConfigUid);
                    if (m.triggeringConfigId != null && Object.hasOwnProperty.call(m, "triggeringConfigId"))
                        w.uint32(24).int64(m.triggeringConfigId);
                    if (m.triggeringSubscriptionId != null && Object.hasOwnProperty.call(m, "triggeringSubscriptionId"))
                        w.uint32(32).int64(m.triggeringSubscriptionId);
                    return w;
                };

                /**
                 * Encodes the specified StatsdMetadata message, length delimited. Does not implicitly {@link perfetto.protos.TraceConfig.StatsdMetadata.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.TraceConfig.StatsdMetadata
                 * @static
                 * @param {perfetto.protos.TraceConfig.IStatsdMetadata} message StatsdMetadata message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                StatsdMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a StatsdMetadata message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.TraceConfig.StatsdMetadata
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.TraceConfig.StatsdMetadata} StatsdMetadata
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                StatsdMetadata.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TraceConfig.StatsdMetadata();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.triggeringAlertId = r.int64();
                            break;
                        case 2:
                            m.triggeringConfigUid = r.int32();
                            break;
                        case 3:
                            m.triggeringConfigId = r.int64();
                            break;
                        case 4:
                            m.triggeringSubscriptionId = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a StatsdMetadata message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.TraceConfig.StatsdMetadata
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.TraceConfig.StatsdMetadata} StatsdMetadata
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                StatsdMetadata.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a StatsdMetadata message.
                 * @function verify
                 * @memberof perfetto.protos.TraceConfig.StatsdMetadata
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                StatsdMetadata.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.triggeringAlertId != null && m.hasOwnProperty("triggeringAlertId")) {
                        if (!$util.isInteger(m.triggeringAlertId) && !(m.triggeringAlertId && $util.isInteger(m.triggeringAlertId.low) && $util.isInteger(m.triggeringAlertId.high)))
                            return "triggeringAlertId: integer|Long expected";
                    }
                    if (m.triggeringConfigUid != null && m.hasOwnProperty("triggeringConfigUid")) {
                        if (!$util.isInteger(m.triggeringConfigUid))
                            return "triggeringConfigUid: integer expected";
                    }
                    if (m.triggeringConfigId != null && m.hasOwnProperty("triggeringConfigId")) {
                        if (!$util.isInteger(m.triggeringConfigId) && !(m.triggeringConfigId && $util.isInteger(m.triggeringConfigId.low) && $util.isInteger(m.triggeringConfigId.high)))
                            return "triggeringConfigId: integer|Long expected";
                    }
                    if (m.triggeringSubscriptionId != null && m.hasOwnProperty("triggeringSubscriptionId")) {
                        if (!$util.isInteger(m.triggeringSubscriptionId) && !(m.triggeringSubscriptionId && $util.isInteger(m.triggeringSubscriptionId.low) && $util.isInteger(m.triggeringSubscriptionId.high)))
                            return "triggeringSubscriptionId: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a StatsdMetadata message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.TraceConfig.StatsdMetadata
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.TraceConfig.StatsdMetadata} StatsdMetadata
                 */
                StatsdMetadata.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.TraceConfig.StatsdMetadata)
                        return d;
                    var m = new $root.perfetto.protos.TraceConfig.StatsdMetadata();
                    if (d.triggeringAlertId != null) {
                        if ($util.Long)
                            (m.triggeringAlertId = $util.Long.fromValue(d.triggeringAlertId)).unsigned = false;
                        else if (typeof d.triggeringAlertId === "string")
                            m.triggeringAlertId = parseInt(d.triggeringAlertId, 10);
                        else if (typeof d.triggeringAlertId === "number")
                            m.triggeringAlertId = d.triggeringAlertId;
                        else if (typeof d.triggeringAlertId === "object")
                            m.triggeringAlertId = new $util.LongBits(d.triggeringAlertId.low >>> 0, d.triggeringAlertId.high >>> 0).toNumber();
                    }
                    if (d.triggeringConfigUid != null) {
                        m.triggeringConfigUid = d.triggeringConfigUid | 0;
                    }
                    if (d.triggeringConfigId != null) {
                        if ($util.Long)
                            (m.triggeringConfigId = $util.Long.fromValue(d.triggeringConfigId)).unsigned = false;
                        else if (typeof d.triggeringConfigId === "string")
                            m.triggeringConfigId = parseInt(d.triggeringConfigId, 10);
                        else if (typeof d.triggeringConfigId === "number")
                            m.triggeringConfigId = d.triggeringConfigId;
                        else if (typeof d.triggeringConfigId === "object")
                            m.triggeringConfigId = new $util.LongBits(d.triggeringConfigId.low >>> 0, d.triggeringConfigId.high >>> 0).toNumber();
                    }
                    if (d.triggeringSubscriptionId != null) {
                        if ($util.Long)
                            (m.triggeringSubscriptionId = $util.Long.fromValue(d.triggeringSubscriptionId)).unsigned = false;
                        else if (typeof d.triggeringSubscriptionId === "string")
                            m.triggeringSubscriptionId = parseInt(d.triggeringSubscriptionId, 10);
                        else if (typeof d.triggeringSubscriptionId === "number")
                            m.triggeringSubscriptionId = d.triggeringSubscriptionId;
                        else if (typeof d.triggeringSubscriptionId === "object")
                            m.triggeringSubscriptionId = new $util.LongBits(d.triggeringSubscriptionId.low >>> 0, d.triggeringSubscriptionId.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a StatsdMetadata message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.TraceConfig.StatsdMetadata
                 * @static
                 * @param {perfetto.protos.TraceConfig.StatsdMetadata} m StatsdMetadata
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                StatsdMetadata.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.triggeringAlertId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.triggeringAlertId = o.longs === String ? "0" : 0;
                        d.triggeringConfigUid = 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.triggeringConfigId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.triggeringConfigId = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.triggeringSubscriptionId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.triggeringSubscriptionId = o.longs === String ? "0" : 0;
                    }
                    if (m.triggeringAlertId != null && m.hasOwnProperty("triggeringAlertId")) {
                        if (typeof m.triggeringAlertId === "number")
                            d.triggeringAlertId = o.longs === String ? String(m.triggeringAlertId) : m.triggeringAlertId;
                        else
                            d.triggeringAlertId = o.longs === String ? $util.Long.prototype.toString.call(m.triggeringAlertId) : o.longs === Number ? new $util.LongBits(m.triggeringAlertId.low >>> 0, m.triggeringAlertId.high >>> 0).toNumber() : m.triggeringAlertId;
                    }
                    if (m.triggeringConfigUid != null && m.hasOwnProperty("triggeringConfigUid")) {
                        d.triggeringConfigUid = m.triggeringConfigUid;
                    }
                    if (m.triggeringConfigId != null && m.hasOwnProperty("triggeringConfigId")) {
                        if (typeof m.triggeringConfigId === "number")
                            d.triggeringConfigId = o.longs === String ? String(m.triggeringConfigId) : m.triggeringConfigId;
                        else
                            d.triggeringConfigId = o.longs === String ? $util.Long.prototype.toString.call(m.triggeringConfigId) : o.longs === Number ? new $util.LongBits(m.triggeringConfigId.low >>> 0, m.triggeringConfigId.high >>> 0).toNumber() : m.triggeringConfigId;
                    }
                    if (m.triggeringSubscriptionId != null && m.hasOwnProperty("triggeringSubscriptionId")) {
                        if (typeof m.triggeringSubscriptionId === "number")
                            d.triggeringSubscriptionId = o.longs === String ? String(m.triggeringSubscriptionId) : m.triggeringSubscriptionId;
                        else
                            d.triggeringSubscriptionId = o.longs === String ? $util.Long.prototype.toString.call(m.triggeringSubscriptionId) : o.longs === Number ? new $util.LongBits(m.triggeringSubscriptionId.low >>> 0, m.triggeringSubscriptionId.high >>> 0).toNumber() : m.triggeringSubscriptionId;
                    }
                    return d;
                };

                /**
                 * Converts this StatsdMetadata to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.TraceConfig.StatsdMetadata
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                StatsdMetadata.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return StatsdMetadata;
            })();

            TraceConfig.GuardrailOverrides = (function() {

                /**
                 * Properties of a GuardrailOverrides.
                 * @memberof perfetto.protos.TraceConfig
                 * @interface IGuardrailOverrides
                 * @property {number|null} [maxUploadPerDayBytes] GuardrailOverrides maxUploadPerDayBytes
                 */

                /**
                 * Constructs a new GuardrailOverrides.
                 * @memberof perfetto.protos.TraceConfig
                 * @classdesc Represents a GuardrailOverrides.
                 * @implements IGuardrailOverrides
                 * @constructor
                 * @param {perfetto.protos.TraceConfig.IGuardrailOverrides=} [p] Properties to set
                 */
                function GuardrailOverrides(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * GuardrailOverrides maxUploadPerDayBytes.
                 * @member {number} maxUploadPerDayBytes
                 * @memberof perfetto.protos.TraceConfig.GuardrailOverrides
                 * @instance
                 */
                GuardrailOverrides.prototype.maxUploadPerDayBytes = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Creates a new GuardrailOverrides instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.TraceConfig.GuardrailOverrides
                 * @static
                 * @param {perfetto.protos.TraceConfig.IGuardrailOverrides=} [properties] Properties to set
                 * @returns {perfetto.protos.TraceConfig.GuardrailOverrides} GuardrailOverrides instance
                 */
                GuardrailOverrides.create = function create(properties) {
                    return new GuardrailOverrides(properties);
                };

                /**
                 * Encodes the specified GuardrailOverrides message. Does not implicitly {@link perfetto.protos.TraceConfig.GuardrailOverrides.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.TraceConfig.GuardrailOverrides
                 * @static
                 * @param {perfetto.protos.TraceConfig.IGuardrailOverrides} m GuardrailOverrides message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                GuardrailOverrides.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.maxUploadPerDayBytes != null && Object.hasOwnProperty.call(m, "maxUploadPerDayBytes"))
                        w.uint32(8).uint64(m.maxUploadPerDayBytes);
                    return w;
                };

                /**
                 * Encodes the specified GuardrailOverrides message, length delimited. Does not implicitly {@link perfetto.protos.TraceConfig.GuardrailOverrides.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.TraceConfig.GuardrailOverrides
                 * @static
                 * @param {perfetto.protos.TraceConfig.IGuardrailOverrides} message GuardrailOverrides message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                GuardrailOverrides.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a GuardrailOverrides message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.TraceConfig.GuardrailOverrides
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.TraceConfig.GuardrailOverrides} GuardrailOverrides
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                GuardrailOverrides.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TraceConfig.GuardrailOverrides();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.maxUploadPerDayBytes = r.uint64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a GuardrailOverrides message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.TraceConfig.GuardrailOverrides
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.TraceConfig.GuardrailOverrides} GuardrailOverrides
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                GuardrailOverrides.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a GuardrailOverrides message.
                 * @function verify
                 * @memberof perfetto.protos.TraceConfig.GuardrailOverrides
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                GuardrailOverrides.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.maxUploadPerDayBytes != null && m.hasOwnProperty("maxUploadPerDayBytes")) {
                        if (!$util.isInteger(m.maxUploadPerDayBytes) && !(m.maxUploadPerDayBytes && $util.isInteger(m.maxUploadPerDayBytes.low) && $util.isInteger(m.maxUploadPerDayBytes.high)))
                            return "maxUploadPerDayBytes: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a GuardrailOverrides message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.TraceConfig.GuardrailOverrides
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.TraceConfig.GuardrailOverrides} GuardrailOverrides
                 */
                GuardrailOverrides.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.TraceConfig.GuardrailOverrides)
                        return d;
                    var m = new $root.perfetto.protos.TraceConfig.GuardrailOverrides();
                    if (d.maxUploadPerDayBytes != null) {
                        if ($util.Long)
                            (m.maxUploadPerDayBytes = $util.Long.fromValue(d.maxUploadPerDayBytes)).unsigned = true;
                        else if (typeof d.maxUploadPerDayBytes === "string")
                            m.maxUploadPerDayBytes = parseInt(d.maxUploadPerDayBytes, 10);
                        else if (typeof d.maxUploadPerDayBytes === "number")
                            m.maxUploadPerDayBytes = d.maxUploadPerDayBytes;
                        else if (typeof d.maxUploadPerDayBytes === "object")
                            m.maxUploadPerDayBytes = new $util.LongBits(d.maxUploadPerDayBytes.low >>> 0, d.maxUploadPerDayBytes.high >>> 0).toNumber(true);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a GuardrailOverrides message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.TraceConfig.GuardrailOverrides
                 * @static
                 * @param {perfetto.protos.TraceConfig.GuardrailOverrides} m GuardrailOverrides
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                GuardrailOverrides.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.maxUploadPerDayBytes = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.maxUploadPerDayBytes = o.longs === String ? "0" : 0;
                    }
                    if (m.maxUploadPerDayBytes != null && m.hasOwnProperty("maxUploadPerDayBytes")) {
                        if (typeof m.maxUploadPerDayBytes === "number")
                            d.maxUploadPerDayBytes = o.longs === String ? String(m.maxUploadPerDayBytes) : m.maxUploadPerDayBytes;
                        else
                            d.maxUploadPerDayBytes = o.longs === String ? $util.Long.prototype.toString.call(m.maxUploadPerDayBytes) : o.longs === Number ? new $util.LongBits(m.maxUploadPerDayBytes.low >>> 0, m.maxUploadPerDayBytes.high >>> 0).toNumber(true) : m.maxUploadPerDayBytes;
                    }
                    return d;
                };

                /**
                 * Converts this GuardrailOverrides to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.TraceConfig.GuardrailOverrides
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                GuardrailOverrides.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return GuardrailOverrides;
            })();

            TraceConfig.TriggerConfig = (function() {

                /**
                 * Properties of a TriggerConfig.
                 * @memberof perfetto.protos.TraceConfig
                 * @interface ITriggerConfig
                 * @property {perfetto.protos.TraceConfig.TriggerConfig.TriggerMode|null} [triggerMode] TriggerConfig triggerMode
                 * @property {Array.<perfetto.protos.TraceConfig.TriggerConfig.ITrigger>|null} [triggers] TriggerConfig triggers
                 * @property {number|null} [triggerTimeoutMs] TriggerConfig triggerTimeoutMs
                 */

                /**
                 * Constructs a new TriggerConfig.
                 * @memberof perfetto.protos.TraceConfig
                 * @classdesc Represents a TriggerConfig.
                 * @implements ITriggerConfig
                 * @constructor
                 * @param {perfetto.protos.TraceConfig.ITriggerConfig=} [p] Properties to set
                 */
                function TriggerConfig(p) {
                    this.triggers = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * TriggerConfig triggerMode.
                 * @member {perfetto.protos.TraceConfig.TriggerConfig.TriggerMode} triggerMode
                 * @memberof perfetto.protos.TraceConfig.TriggerConfig
                 * @instance
                 */
                TriggerConfig.prototype.triggerMode = 0;

                /**
                 * TriggerConfig triggers.
                 * @member {Array.<perfetto.protos.TraceConfig.TriggerConfig.ITrigger>} triggers
                 * @memberof perfetto.protos.TraceConfig.TriggerConfig
                 * @instance
                 */
                TriggerConfig.prototype.triggers = $util.emptyArray;

                /**
                 * TriggerConfig triggerTimeoutMs.
                 * @member {number} triggerTimeoutMs
                 * @memberof perfetto.protos.TraceConfig.TriggerConfig
                 * @instance
                 */
                TriggerConfig.prototype.triggerTimeoutMs = 0;

                /**
                 * Creates a new TriggerConfig instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.TraceConfig.TriggerConfig
                 * @static
                 * @param {perfetto.protos.TraceConfig.ITriggerConfig=} [properties] Properties to set
                 * @returns {perfetto.protos.TraceConfig.TriggerConfig} TriggerConfig instance
                 */
                TriggerConfig.create = function create(properties) {
                    return new TriggerConfig(properties);
                };

                /**
                 * Encodes the specified TriggerConfig message. Does not implicitly {@link perfetto.protos.TraceConfig.TriggerConfig.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.TraceConfig.TriggerConfig
                 * @static
                 * @param {perfetto.protos.TraceConfig.ITriggerConfig} m TriggerConfig message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                TriggerConfig.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.triggerMode != null && Object.hasOwnProperty.call(m, "triggerMode"))
                        w.uint32(8).int32(m.triggerMode);
                    if (m.triggers != null && m.triggers.length) {
                        for (var i = 0; i < m.triggers.length; ++i)
                            $root.perfetto.protos.TraceConfig.TriggerConfig.Trigger.encode(m.triggers[i], w.uint32(18).fork()).ldelim();
                    }
                    if (m.triggerTimeoutMs != null && Object.hasOwnProperty.call(m, "triggerTimeoutMs"))
                        w.uint32(24).uint32(m.triggerTimeoutMs);
                    return w;
                };

                /**
                 * Encodes the specified TriggerConfig message, length delimited. Does not implicitly {@link perfetto.protos.TraceConfig.TriggerConfig.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.TraceConfig.TriggerConfig
                 * @static
                 * @param {perfetto.protos.TraceConfig.ITriggerConfig} message TriggerConfig message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                TriggerConfig.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a TriggerConfig message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.TraceConfig.TriggerConfig
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.TraceConfig.TriggerConfig} TriggerConfig
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                TriggerConfig.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TraceConfig.TriggerConfig();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.triggerMode = r.int32();
                            break;
                        case 2:
                            if (!(m.triggers && m.triggers.length))
                                m.triggers = [];
                            m.triggers.push($root.perfetto.protos.TraceConfig.TriggerConfig.Trigger.decode(r, r.uint32()));
                            break;
                        case 3:
                            m.triggerTimeoutMs = r.uint32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a TriggerConfig message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.TraceConfig.TriggerConfig
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.TraceConfig.TriggerConfig} TriggerConfig
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                TriggerConfig.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a TriggerConfig message.
                 * @function verify
                 * @memberof perfetto.protos.TraceConfig.TriggerConfig
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                TriggerConfig.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.triggerMode != null && m.hasOwnProperty("triggerMode")) {
                        switch (m.triggerMode) {
                        default:
                            return "triggerMode: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                            break;
                        }
                    }
                    if (m.triggers != null && m.hasOwnProperty("triggers")) {
                        if (!Array.isArray(m.triggers))
                            return "triggers: array expected";
                        for (var i = 0; i < m.triggers.length; ++i) {
                            {
                                var e = $root.perfetto.protos.TraceConfig.TriggerConfig.Trigger.verify(m.triggers[i]);
                                if (e)
                                    return "triggers." + e;
                            }
                        }
                    }
                    if (m.triggerTimeoutMs != null && m.hasOwnProperty("triggerTimeoutMs")) {
                        if (!$util.isInteger(m.triggerTimeoutMs))
                            return "triggerTimeoutMs: integer expected";
                    }
                    return null;
                };

                /**
                 * Creates a TriggerConfig message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.TraceConfig.TriggerConfig
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.TraceConfig.TriggerConfig} TriggerConfig
                 */
                TriggerConfig.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.TraceConfig.TriggerConfig)
                        return d;
                    var m = new $root.perfetto.protos.TraceConfig.TriggerConfig();
                    switch (d.triggerMode) {
                    case "UNSPECIFIED":
                    case 0:
                        m.triggerMode = 0;
                        break;
                    case "START_TRACING":
                    case 1:
                        m.triggerMode = 1;
                        break;
                    case "STOP_TRACING":
                    case 2:
                        m.triggerMode = 2;
                        break;
                    }
                    if (d.triggers) {
                        if (!Array.isArray(d.triggers))
                            throw TypeError(".perfetto.protos.TraceConfig.TriggerConfig.triggers: array expected");
                        m.triggers = [];
                        for (var i = 0; i < d.triggers.length; ++i) {
                            if (typeof d.triggers[i] !== "object")
                                throw TypeError(".perfetto.protos.TraceConfig.TriggerConfig.triggers: object expected");
                            m.triggers[i] = $root.perfetto.protos.TraceConfig.TriggerConfig.Trigger.fromObject(d.triggers[i]);
                        }
                    }
                    if (d.triggerTimeoutMs != null) {
                        m.triggerTimeoutMs = d.triggerTimeoutMs >>> 0;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a TriggerConfig message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.TraceConfig.TriggerConfig
                 * @static
                 * @param {perfetto.protos.TraceConfig.TriggerConfig} m TriggerConfig
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                TriggerConfig.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.triggers = [];
                    }
                    if (o.defaults) {
                        d.triggerMode = o.enums === String ? "UNSPECIFIED" : 0;
                        d.triggerTimeoutMs = 0;
                    }
                    if (m.triggerMode != null && m.hasOwnProperty("triggerMode")) {
                        d.triggerMode = o.enums === String ? $root.perfetto.protos.TraceConfig.TriggerConfig.TriggerMode[m.triggerMode] : m.triggerMode;
                    }
                    if (m.triggers && m.triggers.length) {
                        d.triggers = [];
                        for (var j = 0; j < m.triggers.length; ++j) {
                            d.triggers[j] = $root.perfetto.protos.TraceConfig.TriggerConfig.Trigger.toObject(m.triggers[j], o);
                        }
                    }
                    if (m.triggerTimeoutMs != null && m.hasOwnProperty("triggerTimeoutMs")) {
                        d.triggerTimeoutMs = m.triggerTimeoutMs;
                    }
                    return d;
                };

                /**
                 * Converts this TriggerConfig to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.TraceConfig.TriggerConfig
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                TriggerConfig.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                /**
                 * TriggerMode enum.
                 * @name perfetto.protos.TraceConfig.TriggerConfig.TriggerMode
                 * @enum {number}
                 * @property {number} UNSPECIFIED=0 UNSPECIFIED value
                 * @property {number} START_TRACING=1 START_TRACING value
                 * @property {number} STOP_TRACING=2 STOP_TRACING value
                 */
                TriggerConfig.TriggerMode = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "UNSPECIFIED"] = 0;
                    values[valuesById[1] = "START_TRACING"] = 1;
                    values[valuesById[2] = "STOP_TRACING"] = 2;
                    return values;
                })();

                TriggerConfig.Trigger = (function() {

                    /**
                     * Properties of a Trigger.
                     * @memberof perfetto.protos.TraceConfig.TriggerConfig
                     * @interface ITrigger
                     * @property {string|null} [name] Trigger name
                     * @property {string|null} [producerNameRegex] Trigger producerNameRegex
                     * @property {number|null} [stopDelayMs] Trigger stopDelayMs
                     * @property {number|null} [maxPer_24H] Trigger maxPer_24H
                     * @property {number|null} [skipProbability] Trigger skipProbability
                     */

                    /**
                     * Constructs a new Trigger.
                     * @memberof perfetto.protos.TraceConfig.TriggerConfig
                     * @classdesc Represents a Trigger.
                     * @implements ITrigger
                     * @constructor
                     * @param {perfetto.protos.TraceConfig.TriggerConfig.ITrigger=} [p] Properties to set
                     */
                    function Trigger(p) {
                        if (p)
                            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                                if (p[ks[i]] != null)
                                    this[ks[i]] = p[ks[i]];
                    }

                    /**
                     * Trigger name.
                     * @member {string} name
                     * @memberof perfetto.protos.TraceConfig.TriggerConfig.Trigger
                     * @instance
                     */
                    Trigger.prototype.name = "";

                    /**
                     * Trigger producerNameRegex.
                     * @member {string} producerNameRegex
                     * @memberof perfetto.protos.TraceConfig.TriggerConfig.Trigger
                     * @instance
                     */
                    Trigger.prototype.producerNameRegex = "";

                    /**
                     * Trigger stopDelayMs.
                     * @member {number} stopDelayMs
                     * @memberof perfetto.protos.TraceConfig.TriggerConfig.Trigger
                     * @instance
                     */
                    Trigger.prototype.stopDelayMs = 0;

                    /**
                     * Trigger maxPer_24H.
                     * @member {number} maxPer_24H
                     * @memberof perfetto.protos.TraceConfig.TriggerConfig.Trigger
                     * @instance
                     */
                    Trigger.prototype.maxPer_24H = 0;

                    /**
                     * Trigger skipProbability.
                     * @member {number} skipProbability
                     * @memberof perfetto.protos.TraceConfig.TriggerConfig.Trigger
                     * @instance
                     */
                    Trigger.prototype.skipProbability = 0;

                    /**
                     * Creates a new Trigger instance using the specified properties.
                     * @function create
                     * @memberof perfetto.protos.TraceConfig.TriggerConfig.Trigger
                     * @static
                     * @param {perfetto.protos.TraceConfig.TriggerConfig.ITrigger=} [properties] Properties to set
                     * @returns {perfetto.protos.TraceConfig.TriggerConfig.Trigger} Trigger instance
                     */
                    Trigger.create = function create(properties) {
                        return new Trigger(properties);
                    };

                    /**
                     * Encodes the specified Trigger message. Does not implicitly {@link perfetto.protos.TraceConfig.TriggerConfig.Trigger.verify|verify} messages.
                     * @function encode
                     * @memberof perfetto.protos.TraceConfig.TriggerConfig.Trigger
                     * @static
                     * @param {perfetto.protos.TraceConfig.TriggerConfig.ITrigger} m Trigger message or plain object to encode
                     * @param {$protobuf.Writer} [w] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Trigger.encode = function encode(m, w) {
                        if (!w)
                            w = $Writer.create();
                        if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                            w.uint32(10).string(m.name);
                        if (m.producerNameRegex != null && Object.hasOwnProperty.call(m, "producerNameRegex"))
                            w.uint32(18).string(m.producerNameRegex);
                        if (m.stopDelayMs != null && Object.hasOwnProperty.call(m, "stopDelayMs"))
                            w.uint32(24).uint32(m.stopDelayMs);
                        if (m.maxPer_24H != null && Object.hasOwnProperty.call(m, "maxPer_24H"))
                            w.uint32(32).uint32(m.maxPer_24H);
                        if (m.skipProbability != null && Object.hasOwnProperty.call(m, "skipProbability"))
                            w.uint32(41).double(m.skipProbability);
                        return w;
                    };

                    /**
                     * Encodes the specified Trigger message, length delimited. Does not implicitly {@link perfetto.protos.TraceConfig.TriggerConfig.Trigger.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof perfetto.protos.TraceConfig.TriggerConfig.Trigger
                     * @static
                     * @param {perfetto.protos.TraceConfig.TriggerConfig.ITrigger} message Trigger message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Trigger.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a Trigger message from the specified reader or buffer.
                     * @function decode
                     * @memberof perfetto.protos.TraceConfig.TriggerConfig.Trigger
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                     * @param {number} [l] Message length if known beforehand
                     * @returns {perfetto.protos.TraceConfig.TriggerConfig.Trigger} Trigger
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Trigger.decode = function decode(r, l) {
                        if (!(r instanceof $Reader))
                            r = $Reader.create(r);
                        var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TraceConfig.TriggerConfig.Trigger();
                        while (r.pos < c) {
                            var t = r.uint32();
                            switch (t >>> 3) {
                            case 1:
                                m.name = r.string();
                                break;
                            case 2:
                                m.producerNameRegex = r.string();
                                break;
                            case 3:
                                m.stopDelayMs = r.uint32();
                                break;
                            case 4:
                                m.maxPer_24H = r.uint32();
                                break;
                            case 5:
                                m.skipProbability = r.double();
                                break;
                            default:
                                r.skipType(t & 7);
                                break;
                            }
                        }
                        return m;
                    };

                    /**
                     * Decodes a Trigger message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof perfetto.protos.TraceConfig.TriggerConfig.Trigger
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {perfetto.protos.TraceConfig.TriggerConfig.Trigger} Trigger
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Trigger.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a Trigger message.
                     * @function verify
                     * @memberof perfetto.protos.TraceConfig.TriggerConfig.Trigger
                     * @static
                     * @param {Object.<string,*>} m Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    Trigger.verify = function verify(m) {
                        if (typeof m !== "object" || m === null)
                            return "object expected";
                        if (m.name != null && m.hasOwnProperty("name")) {
                            if (!$util.isString(m.name))
                                return "name: string expected";
                        }
                        if (m.producerNameRegex != null && m.hasOwnProperty("producerNameRegex")) {
                            if (!$util.isString(m.producerNameRegex))
                                return "producerNameRegex: string expected";
                        }
                        if (m.stopDelayMs != null && m.hasOwnProperty("stopDelayMs")) {
                            if (!$util.isInteger(m.stopDelayMs))
                                return "stopDelayMs: integer expected";
                        }
                        if (m.maxPer_24H != null && m.hasOwnProperty("maxPer_24H")) {
                            if (!$util.isInteger(m.maxPer_24H))
                                return "maxPer_24H: integer expected";
                        }
                        if (m.skipProbability != null && m.hasOwnProperty("skipProbability")) {
                            if (typeof m.skipProbability !== "number")
                                return "skipProbability: number expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a Trigger message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof perfetto.protos.TraceConfig.TriggerConfig.Trigger
                     * @static
                     * @param {Object.<string,*>} d Plain object
                     * @returns {perfetto.protos.TraceConfig.TriggerConfig.Trigger} Trigger
                     */
                    Trigger.fromObject = function fromObject(d) {
                        if (d instanceof $root.perfetto.protos.TraceConfig.TriggerConfig.Trigger)
                            return d;
                        var m = new $root.perfetto.protos.TraceConfig.TriggerConfig.Trigger();
                        if (d.name != null) {
                            m.name = String(d.name);
                        }
                        if (d.producerNameRegex != null) {
                            m.producerNameRegex = String(d.producerNameRegex);
                        }
                        if (d.stopDelayMs != null) {
                            m.stopDelayMs = d.stopDelayMs >>> 0;
                        }
                        if (d.maxPer_24H != null) {
                            m.maxPer_24H = d.maxPer_24H >>> 0;
                        }
                        if (d.skipProbability != null) {
                            m.skipProbability = Number(d.skipProbability);
                        }
                        return m;
                    };

                    /**
                     * Creates a plain object from a Trigger message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof perfetto.protos.TraceConfig.TriggerConfig.Trigger
                     * @static
                     * @param {perfetto.protos.TraceConfig.TriggerConfig.Trigger} m Trigger
                     * @param {$protobuf.IConversionOptions} [o] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    Trigger.toObject = function toObject(m, o) {
                        if (!o)
                            o = {};
                        var d = {};
                        if (o.defaults) {
                            d.name = "";
                            d.producerNameRegex = "";
                            d.stopDelayMs = 0;
                            d.maxPer_24H = 0;
                            d.skipProbability = 0;
                        }
                        if (m.name != null && m.hasOwnProperty("name")) {
                            d.name = m.name;
                        }
                        if (m.producerNameRegex != null && m.hasOwnProperty("producerNameRegex")) {
                            d.producerNameRegex = m.producerNameRegex;
                        }
                        if (m.stopDelayMs != null && m.hasOwnProperty("stopDelayMs")) {
                            d.stopDelayMs = m.stopDelayMs;
                        }
                        if (m.maxPer_24H != null && m.hasOwnProperty("maxPer_24H")) {
                            d.maxPer_24H = m.maxPer_24H;
                        }
                        if (m.skipProbability != null && m.hasOwnProperty("skipProbability")) {
                            d.skipProbability = o.json && !isFinite(m.skipProbability) ? String(m.skipProbability) : m.skipProbability;
                        }
                        return d;
                    };

                    /**
                     * Converts this Trigger to JSON.
                     * @function toJSON
                     * @memberof perfetto.protos.TraceConfig.TriggerConfig.Trigger
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    Trigger.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                    };

                    return Trigger;
                })();

                return TriggerConfig;
            })();

            TraceConfig.IncrementalStateConfig = (function() {

                /**
                 * Properties of an IncrementalStateConfig.
                 * @memberof perfetto.protos.TraceConfig
                 * @interface IIncrementalStateConfig
                 * @property {number|null} [clearPeriodMs] IncrementalStateConfig clearPeriodMs
                 */

                /**
                 * Constructs a new IncrementalStateConfig.
                 * @memberof perfetto.protos.TraceConfig
                 * @classdesc Represents an IncrementalStateConfig.
                 * @implements IIncrementalStateConfig
                 * @constructor
                 * @param {perfetto.protos.TraceConfig.IIncrementalStateConfig=} [p] Properties to set
                 */
                function IncrementalStateConfig(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * IncrementalStateConfig clearPeriodMs.
                 * @member {number} clearPeriodMs
                 * @memberof perfetto.protos.TraceConfig.IncrementalStateConfig
                 * @instance
                 */
                IncrementalStateConfig.prototype.clearPeriodMs = 0;

                /**
                 * Creates a new IncrementalStateConfig instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.TraceConfig.IncrementalStateConfig
                 * @static
                 * @param {perfetto.protos.TraceConfig.IIncrementalStateConfig=} [properties] Properties to set
                 * @returns {perfetto.protos.TraceConfig.IncrementalStateConfig} IncrementalStateConfig instance
                 */
                IncrementalStateConfig.create = function create(properties) {
                    return new IncrementalStateConfig(properties);
                };

                /**
                 * Encodes the specified IncrementalStateConfig message. Does not implicitly {@link perfetto.protos.TraceConfig.IncrementalStateConfig.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.TraceConfig.IncrementalStateConfig
                 * @static
                 * @param {perfetto.protos.TraceConfig.IIncrementalStateConfig} m IncrementalStateConfig message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                IncrementalStateConfig.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.clearPeriodMs != null && Object.hasOwnProperty.call(m, "clearPeriodMs"))
                        w.uint32(8).uint32(m.clearPeriodMs);
                    return w;
                };

                /**
                 * Encodes the specified IncrementalStateConfig message, length delimited. Does not implicitly {@link perfetto.protos.TraceConfig.IncrementalStateConfig.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.TraceConfig.IncrementalStateConfig
                 * @static
                 * @param {perfetto.protos.TraceConfig.IIncrementalStateConfig} message IncrementalStateConfig message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                IncrementalStateConfig.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an IncrementalStateConfig message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.TraceConfig.IncrementalStateConfig
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.TraceConfig.IncrementalStateConfig} IncrementalStateConfig
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                IncrementalStateConfig.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TraceConfig.IncrementalStateConfig();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.clearPeriodMs = r.uint32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an IncrementalStateConfig message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.TraceConfig.IncrementalStateConfig
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.TraceConfig.IncrementalStateConfig} IncrementalStateConfig
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                IncrementalStateConfig.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an IncrementalStateConfig message.
                 * @function verify
                 * @memberof perfetto.protos.TraceConfig.IncrementalStateConfig
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                IncrementalStateConfig.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.clearPeriodMs != null && m.hasOwnProperty("clearPeriodMs")) {
                        if (!$util.isInteger(m.clearPeriodMs))
                            return "clearPeriodMs: integer expected";
                    }
                    return null;
                };

                /**
                 * Creates an IncrementalStateConfig message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.TraceConfig.IncrementalStateConfig
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.TraceConfig.IncrementalStateConfig} IncrementalStateConfig
                 */
                IncrementalStateConfig.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.TraceConfig.IncrementalStateConfig)
                        return d;
                    var m = new $root.perfetto.protos.TraceConfig.IncrementalStateConfig();
                    if (d.clearPeriodMs != null) {
                        m.clearPeriodMs = d.clearPeriodMs >>> 0;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an IncrementalStateConfig message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.TraceConfig.IncrementalStateConfig
                 * @static
                 * @param {perfetto.protos.TraceConfig.IncrementalStateConfig} m IncrementalStateConfig
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                IncrementalStateConfig.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.clearPeriodMs = 0;
                    }
                    if (m.clearPeriodMs != null && m.hasOwnProperty("clearPeriodMs")) {
                        d.clearPeriodMs = m.clearPeriodMs;
                    }
                    return d;
                };

                /**
                 * Converts this IncrementalStateConfig to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.TraceConfig.IncrementalStateConfig
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                IncrementalStateConfig.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return IncrementalStateConfig;
            })();

            /**
             * CompressionType enum.
             * @name perfetto.protos.TraceConfig.CompressionType
             * @enum {number}
             * @property {number} COMPRESSION_TYPE_UNSPECIFIED=0 COMPRESSION_TYPE_UNSPECIFIED value
             * @property {number} COMPRESSION_TYPE_DEFLATE=1 COMPRESSION_TYPE_DEFLATE value
             */
            TraceConfig.CompressionType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "COMPRESSION_TYPE_UNSPECIFIED"] = 0;
                values[valuesById[1] = "COMPRESSION_TYPE_DEFLATE"] = 1;
                return values;
            })();

            TraceConfig.IncidentReportConfig = (function() {

                /**
                 * Properties of an IncidentReportConfig.
                 * @memberof perfetto.protos.TraceConfig
                 * @interface IIncidentReportConfig
                 * @property {string|null} [destinationPackage] IncidentReportConfig destinationPackage
                 * @property {string|null} [destinationClass] IncidentReportConfig destinationClass
                 * @property {number|null} [privacyLevel] IncidentReportConfig privacyLevel
                 * @property {boolean|null} [skipIncidentd] IncidentReportConfig skipIncidentd
                 * @property {boolean|null} [skipDropbox] IncidentReportConfig skipDropbox
                 */

                /**
                 * Constructs a new IncidentReportConfig.
                 * @memberof perfetto.protos.TraceConfig
                 * @classdesc Represents an IncidentReportConfig.
                 * @implements IIncidentReportConfig
                 * @constructor
                 * @param {perfetto.protos.TraceConfig.IIncidentReportConfig=} [p] Properties to set
                 */
                function IncidentReportConfig(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * IncidentReportConfig destinationPackage.
                 * @member {string} destinationPackage
                 * @memberof perfetto.protos.TraceConfig.IncidentReportConfig
                 * @instance
                 */
                IncidentReportConfig.prototype.destinationPackage = "";

                /**
                 * IncidentReportConfig destinationClass.
                 * @member {string} destinationClass
                 * @memberof perfetto.protos.TraceConfig.IncidentReportConfig
                 * @instance
                 */
                IncidentReportConfig.prototype.destinationClass = "";

                /**
                 * IncidentReportConfig privacyLevel.
                 * @member {number} privacyLevel
                 * @memberof perfetto.protos.TraceConfig.IncidentReportConfig
                 * @instance
                 */
                IncidentReportConfig.prototype.privacyLevel = 0;

                /**
                 * IncidentReportConfig skipIncidentd.
                 * @member {boolean} skipIncidentd
                 * @memberof perfetto.protos.TraceConfig.IncidentReportConfig
                 * @instance
                 */
                IncidentReportConfig.prototype.skipIncidentd = false;

                /**
                 * IncidentReportConfig skipDropbox.
                 * @member {boolean} skipDropbox
                 * @memberof perfetto.protos.TraceConfig.IncidentReportConfig
                 * @instance
                 */
                IncidentReportConfig.prototype.skipDropbox = false;

                /**
                 * Creates a new IncidentReportConfig instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.TraceConfig.IncidentReportConfig
                 * @static
                 * @param {perfetto.protos.TraceConfig.IIncidentReportConfig=} [properties] Properties to set
                 * @returns {perfetto.protos.TraceConfig.IncidentReportConfig} IncidentReportConfig instance
                 */
                IncidentReportConfig.create = function create(properties) {
                    return new IncidentReportConfig(properties);
                };

                /**
                 * Encodes the specified IncidentReportConfig message. Does not implicitly {@link perfetto.protos.TraceConfig.IncidentReportConfig.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.TraceConfig.IncidentReportConfig
                 * @static
                 * @param {perfetto.protos.TraceConfig.IIncidentReportConfig} m IncidentReportConfig message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                IncidentReportConfig.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.destinationPackage != null && Object.hasOwnProperty.call(m, "destinationPackage"))
                        w.uint32(10).string(m.destinationPackage);
                    if (m.destinationClass != null && Object.hasOwnProperty.call(m, "destinationClass"))
                        w.uint32(18).string(m.destinationClass);
                    if (m.privacyLevel != null && Object.hasOwnProperty.call(m, "privacyLevel"))
                        w.uint32(24).int32(m.privacyLevel);
                    if (m.skipDropbox != null && Object.hasOwnProperty.call(m, "skipDropbox"))
                        w.uint32(32).bool(m.skipDropbox);
                    if (m.skipIncidentd != null && Object.hasOwnProperty.call(m, "skipIncidentd"))
                        w.uint32(40).bool(m.skipIncidentd);
                    return w;
                };

                /**
                 * Encodes the specified IncidentReportConfig message, length delimited. Does not implicitly {@link perfetto.protos.TraceConfig.IncidentReportConfig.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.TraceConfig.IncidentReportConfig
                 * @static
                 * @param {perfetto.protos.TraceConfig.IIncidentReportConfig} message IncidentReportConfig message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                IncidentReportConfig.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an IncidentReportConfig message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.TraceConfig.IncidentReportConfig
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.TraceConfig.IncidentReportConfig} IncidentReportConfig
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                IncidentReportConfig.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TraceConfig.IncidentReportConfig();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.destinationPackage = r.string();
                            break;
                        case 2:
                            m.destinationClass = r.string();
                            break;
                        case 3:
                            m.privacyLevel = r.int32();
                            break;
                        case 5:
                            m.skipIncidentd = r.bool();
                            break;
                        case 4:
                            m.skipDropbox = r.bool();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an IncidentReportConfig message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.TraceConfig.IncidentReportConfig
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.TraceConfig.IncidentReportConfig} IncidentReportConfig
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                IncidentReportConfig.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an IncidentReportConfig message.
                 * @function verify
                 * @memberof perfetto.protos.TraceConfig.IncidentReportConfig
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                IncidentReportConfig.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.destinationPackage != null && m.hasOwnProperty("destinationPackage")) {
                        if (!$util.isString(m.destinationPackage))
                            return "destinationPackage: string expected";
                    }
                    if (m.destinationClass != null && m.hasOwnProperty("destinationClass")) {
                        if (!$util.isString(m.destinationClass))
                            return "destinationClass: string expected";
                    }
                    if (m.privacyLevel != null && m.hasOwnProperty("privacyLevel")) {
                        if (!$util.isInteger(m.privacyLevel))
                            return "privacyLevel: integer expected";
                    }
                    if (m.skipIncidentd != null && m.hasOwnProperty("skipIncidentd")) {
                        if (typeof m.skipIncidentd !== "boolean")
                            return "skipIncidentd: boolean expected";
                    }
                    if (m.skipDropbox != null && m.hasOwnProperty("skipDropbox")) {
                        if (typeof m.skipDropbox !== "boolean")
                            return "skipDropbox: boolean expected";
                    }
                    return null;
                };

                /**
                 * Creates an IncidentReportConfig message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.TraceConfig.IncidentReportConfig
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.TraceConfig.IncidentReportConfig} IncidentReportConfig
                 */
                IncidentReportConfig.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.TraceConfig.IncidentReportConfig)
                        return d;
                    var m = new $root.perfetto.protos.TraceConfig.IncidentReportConfig();
                    if (d.destinationPackage != null) {
                        m.destinationPackage = String(d.destinationPackage);
                    }
                    if (d.destinationClass != null) {
                        m.destinationClass = String(d.destinationClass);
                    }
                    if (d.privacyLevel != null) {
                        m.privacyLevel = d.privacyLevel | 0;
                    }
                    if (d.skipIncidentd != null) {
                        m.skipIncidentd = Boolean(d.skipIncidentd);
                    }
                    if (d.skipDropbox != null) {
                        m.skipDropbox = Boolean(d.skipDropbox);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an IncidentReportConfig message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.TraceConfig.IncidentReportConfig
                 * @static
                 * @param {perfetto.protos.TraceConfig.IncidentReportConfig} m IncidentReportConfig
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                IncidentReportConfig.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.destinationPackage = "";
                        d.destinationClass = "";
                        d.privacyLevel = 0;
                        d.skipDropbox = false;
                        d.skipIncidentd = false;
                    }
                    if (m.destinationPackage != null && m.hasOwnProperty("destinationPackage")) {
                        d.destinationPackage = m.destinationPackage;
                    }
                    if (m.destinationClass != null && m.hasOwnProperty("destinationClass")) {
                        d.destinationClass = m.destinationClass;
                    }
                    if (m.privacyLevel != null && m.hasOwnProperty("privacyLevel")) {
                        d.privacyLevel = m.privacyLevel;
                    }
                    if (m.skipDropbox != null && m.hasOwnProperty("skipDropbox")) {
                        d.skipDropbox = m.skipDropbox;
                    }
                    if (m.skipIncidentd != null && m.hasOwnProperty("skipIncidentd")) {
                        d.skipIncidentd = m.skipIncidentd;
                    }
                    return d;
                };

                /**
                 * Converts this IncidentReportConfig to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.TraceConfig.IncidentReportConfig
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                IncidentReportConfig.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return IncidentReportConfig;
            })();

            /**
             * StatsdLogging enum.
             * @name perfetto.protos.TraceConfig.StatsdLogging
             * @enum {number}
             * @property {number} STATSD_LOGGING_UNSPECIFIED=0 STATSD_LOGGING_UNSPECIFIED value
             * @property {number} STATSD_LOGGING_ENABLED=1 STATSD_LOGGING_ENABLED value
             * @property {number} STATSD_LOGGING_DISABLED=2 STATSD_LOGGING_DISABLED value
             */
            TraceConfig.StatsdLogging = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "STATSD_LOGGING_UNSPECIFIED"] = 0;
                values[valuesById[1] = "STATSD_LOGGING_ENABLED"] = 1;
                values[valuesById[2] = "STATSD_LOGGING_DISABLED"] = 2;
                return values;
            })();

            TraceConfig.TraceFilter = (function() {

                /**
                 * Properties of a TraceFilter.
                 * @memberof perfetto.protos.TraceConfig
                 * @interface ITraceFilter
                 * @property {Uint8Array|null} [bytecode] TraceFilter bytecode
                 */

                /**
                 * Constructs a new TraceFilter.
                 * @memberof perfetto.protos.TraceConfig
                 * @classdesc Represents a TraceFilter.
                 * @implements ITraceFilter
                 * @constructor
                 * @param {perfetto.protos.TraceConfig.ITraceFilter=} [p] Properties to set
                 */
                function TraceFilter(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * TraceFilter bytecode.
                 * @member {Uint8Array} bytecode
                 * @memberof perfetto.protos.TraceConfig.TraceFilter
                 * @instance
                 */
                TraceFilter.prototype.bytecode = $util.newBuffer([]);

                /**
                 * Creates a new TraceFilter instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.TraceConfig.TraceFilter
                 * @static
                 * @param {perfetto.protos.TraceConfig.ITraceFilter=} [properties] Properties to set
                 * @returns {perfetto.protos.TraceConfig.TraceFilter} TraceFilter instance
                 */
                TraceFilter.create = function create(properties) {
                    return new TraceFilter(properties);
                };

                /**
                 * Encodes the specified TraceFilter message. Does not implicitly {@link perfetto.protos.TraceConfig.TraceFilter.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.TraceConfig.TraceFilter
                 * @static
                 * @param {perfetto.protos.TraceConfig.ITraceFilter} m TraceFilter message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                TraceFilter.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.bytecode != null && Object.hasOwnProperty.call(m, "bytecode"))
                        w.uint32(10).bytes(m.bytecode);
                    return w;
                };

                /**
                 * Encodes the specified TraceFilter message, length delimited. Does not implicitly {@link perfetto.protos.TraceConfig.TraceFilter.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.TraceConfig.TraceFilter
                 * @static
                 * @param {perfetto.protos.TraceConfig.ITraceFilter} message TraceFilter message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                TraceFilter.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a TraceFilter message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.TraceConfig.TraceFilter
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.TraceConfig.TraceFilter} TraceFilter
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                TraceFilter.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TraceConfig.TraceFilter();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.bytecode = r.bytes();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a TraceFilter message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.TraceConfig.TraceFilter
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.TraceConfig.TraceFilter} TraceFilter
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                TraceFilter.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a TraceFilter message.
                 * @function verify
                 * @memberof perfetto.protos.TraceConfig.TraceFilter
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                TraceFilter.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.bytecode != null && m.hasOwnProperty("bytecode")) {
                        if (!(m.bytecode && typeof m.bytecode.length === "number" || $util.isString(m.bytecode)))
                            return "bytecode: buffer expected";
                    }
                    return null;
                };

                /**
                 * Creates a TraceFilter message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.TraceConfig.TraceFilter
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.TraceConfig.TraceFilter} TraceFilter
                 */
                TraceFilter.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.TraceConfig.TraceFilter)
                        return d;
                    var m = new $root.perfetto.protos.TraceConfig.TraceFilter();
                    if (d.bytecode != null) {
                        if (typeof d.bytecode === "string")
                            $util.base64.decode(d.bytecode, m.bytecode = $util.newBuffer($util.base64.length(d.bytecode)), 0);
                        else if (d.bytecode.length)
                            m.bytecode = d.bytecode;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a TraceFilter message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.TraceConfig.TraceFilter
                 * @static
                 * @param {perfetto.protos.TraceConfig.TraceFilter} m TraceFilter
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                TraceFilter.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if (o.bytes === String)
                            d.bytecode = "";
                        else {
                            d.bytecode = [];
                            if (o.bytes !== Array)
                                d.bytecode = $util.newBuffer(d.bytecode);
                        }
                    }
                    if (m.bytecode != null && m.hasOwnProperty("bytecode")) {
                        d.bytecode = o.bytes === String ? $util.base64.encode(m.bytecode, 0, m.bytecode.length) : o.bytes === Array ? Array.prototype.slice.call(m.bytecode) : m.bytecode;
                    }
                    return d;
                };

                /**
                 * Converts this TraceFilter to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.TraceConfig.TraceFilter
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                TraceFilter.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return TraceFilter;
            })();

            TraceConfig.AndroidReportConfig = (function() {

                /**
                 * Properties of an AndroidReportConfig.
                 * @memberof perfetto.protos.TraceConfig
                 * @interface IAndroidReportConfig
                 * @property {string|null} [reporterServicePackage] AndroidReportConfig reporterServicePackage
                 * @property {string|null} [reporterServiceClass] AndroidReportConfig reporterServiceClass
                 * @property {boolean|null} [skipReport] AndroidReportConfig skipReport
                 * @property {boolean|null} [usePipeInFrameworkForTesting] AndroidReportConfig usePipeInFrameworkForTesting
                 */

                /**
                 * Constructs a new AndroidReportConfig.
                 * @memberof perfetto.protos.TraceConfig
                 * @classdesc Represents an AndroidReportConfig.
                 * @implements IAndroidReportConfig
                 * @constructor
                 * @param {perfetto.protos.TraceConfig.IAndroidReportConfig=} [p] Properties to set
                 */
                function AndroidReportConfig(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * AndroidReportConfig reporterServicePackage.
                 * @member {string} reporterServicePackage
                 * @memberof perfetto.protos.TraceConfig.AndroidReportConfig
                 * @instance
                 */
                AndroidReportConfig.prototype.reporterServicePackage = "";

                /**
                 * AndroidReportConfig reporterServiceClass.
                 * @member {string} reporterServiceClass
                 * @memberof perfetto.protos.TraceConfig.AndroidReportConfig
                 * @instance
                 */
                AndroidReportConfig.prototype.reporterServiceClass = "";

                /**
                 * AndroidReportConfig skipReport.
                 * @member {boolean} skipReport
                 * @memberof perfetto.protos.TraceConfig.AndroidReportConfig
                 * @instance
                 */
                AndroidReportConfig.prototype.skipReport = false;

                /**
                 * AndroidReportConfig usePipeInFrameworkForTesting.
                 * @member {boolean} usePipeInFrameworkForTesting
                 * @memberof perfetto.protos.TraceConfig.AndroidReportConfig
                 * @instance
                 */
                AndroidReportConfig.prototype.usePipeInFrameworkForTesting = false;

                /**
                 * Creates a new AndroidReportConfig instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.TraceConfig.AndroidReportConfig
                 * @static
                 * @param {perfetto.protos.TraceConfig.IAndroidReportConfig=} [properties] Properties to set
                 * @returns {perfetto.protos.TraceConfig.AndroidReportConfig} AndroidReportConfig instance
                 */
                AndroidReportConfig.create = function create(properties) {
                    return new AndroidReportConfig(properties);
                };

                /**
                 * Encodes the specified AndroidReportConfig message. Does not implicitly {@link perfetto.protos.TraceConfig.AndroidReportConfig.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.TraceConfig.AndroidReportConfig
                 * @static
                 * @param {perfetto.protos.TraceConfig.IAndroidReportConfig} m AndroidReportConfig message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                AndroidReportConfig.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.reporterServicePackage != null && Object.hasOwnProperty.call(m, "reporterServicePackage"))
                        w.uint32(10).string(m.reporterServicePackage);
                    if (m.reporterServiceClass != null && Object.hasOwnProperty.call(m, "reporterServiceClass"))
                        w.uint32(18).string(m.reporterServiceClass);
                    if (m.skipReport != null && Object.hasOwnProperty.call(m, "skipReport"))
                        w.uint32(24).bool(m.skipReport);
                    if (m.usePipeInFrameworkForTesting != null && Object.hasOwnProperty.call(m, "usePipeInFrameworkForTesting"))
                        w.uint32(32).bool(m.usePipeInFrameworkForTesting);
                    return w;
                };

                /**
                 * Encodes the specified AndroidReportConfig message, length delimited. Does not implicitly {@link perfetto.protos.TraceConfig.AndroidReportConfig.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.TraceConfig.AndroidReportConfig
                 * @static
                 * @param {perfetto.protos.TraceConfig.IAndroidReportConfig} message AndroidReportConfig message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                AndroidReportConfig.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an AndroidReportConfig message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.TraceConfig.AndroidReportConfig
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.TraceConfig.AndroidReportConfig} AndroidReportConfig
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                AndroidReportConfig.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TraceConfig.AndroidReportConfig();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.reporterServicePackage = r.string();
                            break;
                        case 2:
                            m.reporterServiceClass = r.string();
                            break;
                        case 3:
                            m.skipReport = r.bool();
                            break;
                        case 4:
                            m.usePipeInFrameworkForTesting = r.bool();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an AndroidReportConfig message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.TraceConfig.AndroidReportConfig
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.TraceConfig.AndroidReportConfig} AndroidReportConfig
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                AndroidReportConfig.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an AndroidReportConfig message.
                 * @function verify
                 * @memberof perfetto.protos.TraceConfig.AndroidReportConfig
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                AndroidReportConfig.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.reporterServicePackage != null && m.hasOwnProperty("reporterServicePackage")) {
                        if (!$util.isString(m.reporterServicePackage))
                            return "reporterServicePackage: string expected";
                    }
                    if (m.reporterServiceClass != null && m.hasOwnProperty("reporterServiceClass")) {
                        if (!$util.isString(m.reporterServiceClass))
                            return "reporterServiceClass: string expected";
                    }
                    if (m.skipReport != null && m.hasOwnProperty("skipReport")) {
                        if (typeof m.skipReport !== "boolean")
                            return "skipReport: boolean expected";
                    }
                    if (m.usePipeInFrameworkForTesting != null && m.hasOwnProperty("usePipeInFrameworkForTesting")) {
                        if (typeof m.usePipeInFrameworkForTesting !== "boolean")
                            return "usePipeInFrameworkForTesting: boolean expected";
                    }
                    return null;
                };

                /**
                 * Creates an AndroidReportConfig message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.TraceConfig.AndroidReportConfig
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.TraceConfig.AndroidReportConfig} AndroidReportConfig
                 */
                AndroidReportConfig.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.TraceConfig.AndroidReportConfig)
                        return d;
                    var m = new $root.perfetto.protos.TraceConfig.AndroidReportConfig();
                    if (d.reporterServicePackage != null) {
                        m.reporterServicePackage = String(d.reporterServicePackage);
                    }
                    if (d.reporterServiceClass != null) {
                        m.reporterServiceClass = String(d.reporterServiceClass);
                    }
                    if (d.skipReport != null) {
                        m.skipReport = Boolean(d.skipReport);
                    }
                    if (d.usePipeInFrameworkForTesting != null) {
                        m.usePipeInFrameworkForTesting = Boolean(d.usePipeInFrameworkForTesting);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an AndroidReportConfig message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.TraceConfig.AndroidReportConfig
                 * @static
                 * @param {perfetto.protos.TraceConfig.AndroidReportConfig} m AndroidReportConfig
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                AndroidReportConfig.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.reporterServicePackage = "";
                        d.reporterServiceClass = "";
                        d.skipReport = false;
                        d.usePipeInFrameworkForTesting = false;
                    }
                    if (m.reporterServicePackage != null && m.hasOwnProperty("reporterServicePackage")) {
                        d.reporterServicePackage = m.reporterServicePackage;
                    }
                    if (m.reporterServiceClass != null && m.hasOwnProperty("reporterServiceClass")) {
                        d.reporterServiceClass = m.reporterServiceClass;
                    }
                    if (m.skipReport != null && m.hasOwnProperty("skipReport")) {
                        d.skipReport = m.skipReport;
                    }
                    if (m.usePipeInFrameworkForTesting != null && m.hasOwnProperty("usePipeInFrameworkForTesting")) {
                        d.usePipeInFrameworkForTesting = m.usePipeInFrameworkForTesting;
                    }
                    return d;
                };

                /**
                 * Converts this AndroidReportConfig to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.TraceConfig.AndroidReportConfig
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                AndroidReportConfig.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return AndroidReportConfig;
            })();

            TraceConfig.CmdTraceStartDelay = (function() {

                /**
                 * Properties of a CmdTraceStartDelay.
                 * @memberof perfetto.protos.TraceConfig
                 * @interface ICmdTraceStartDelay
                 * @property {number|null} [minDelayMs] CmdTraceStartDelay minDelayMs
                 * @property {number|null} [maxDelayMs] CmdTraceStartDelay maxDelayMs
                 */

                /**
                 * Constructs a new CmdTraceStartDelay.
                 * @memberof perfetto.protos.TraceConfig
                 * @classdesc Represents a CmdTraceStartDelay.
                 * @implements ICmdTraceStartDelay
                 * @constructor
                 * @param {perfetto.protos.TraceConfig.ICmdTraceStartDelay=} [p] Properties to set
                 */
                function CmdTraceStartDelay(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * CmdTraceStartDelay minDelayMs.
                 * @member {number} minDelayMs
                 * @memberof perfetto.protos.TraceConfig.CmdTraceStartDelay
                 * @instance
                 */
                CmdTraceStartDelay.prototype.minDelayMs = 0;

                /**
                 * CmdTraceStartDelay maxDelayMs.
                 * @member {number} maxDelayMs
                 * @memberof perfetto.protos.TraceConfig.CmdTraceStartDelay
                 * @instance
                 */
                CmdTraceStartDelay.prototype.maxDelayMs = 0;

                /**
                 * Creates a new CmdTraceStartDelay instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.TraceConfig.CmdTraceStartDelay
                 * @static
                 * @param {perfetto.protos.TraceConfig.ICmdTraceStartDelay=} [properties] Properties to set
                 * @returns {perfetto.protos.TraceConfig.CmdTraceStartDelay} CmdTraceStartDelay instance
                 */
                CmdTraceStartDelay.create = function create(properties) {
                    return new CmdTraceStartDelay(properties);
                };

                /**
                 * Encodes the specified CmdTraceStartDelay message. Does not implicitly {@link perfetto.protos.TraceConfig.CmdTraceStartDelay.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.TraceConfig.CmdTraceStartDelay
                 * @static
                 * @param {perfetto.protos.TraceConfig.ICmdTraceStartDelay} m CmdTraceStartDelay message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CmdTraceStartDelay.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.minDelayMs != null && Object.hasOwnProperty.call(m, "minDelayMs"))
                        w.uint32(8).uint32(m.minDelayMs);
                    if (m.maxDelayMs != null && Object.hasOwnProperty.call(m, "maxDelayMs"))
                        w.uint32(16).uint32(m.maxDelayMs);
                    return w;
                };

                /**
                 * Encodes the specified CmdTraceStartDelay message, length delimited. Does not implicitly {@link perfetto.protos.TraceConfig.CmdTraceStartDelay.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.TraceConfig.CmdTraceStartDelay
                 * @static
                 * @param {perfetto.protos.TraceConfig.ICmdTraceStartDelay} message CmdTraceStartDelay message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CmdTraceStartDelay.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a CmdTraceStartDelay message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.TraceConfig.CmdTraceStartDelay
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.TraceConfig.CmdTraceStartDelay} CmdTraceStartDelay
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CmdTraceStartDelay.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TraceConfig.CmdTraceStartDelay();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.minDelayMs = r.uint32();
                            break;
                        case 2:
                            m.maxDelayMs = r.uint32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a CmdTraceStartDelay message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.TraceConfig.CmdTraceStartDelay
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.TraceConfig.CmdTraceStartDelay} CmdTraceStartDelay
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CmdTraceStartDelay.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a CmdTraceStartDelay message.
                 * @function verify
                 * @memberof perfetto.protos.TraceConfig.CmdTraceStartDelay
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                CmdTraceStartDelay.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.minDelayMs != null && m.hasOwnProperty("minDelayMs")) {
                        if (!$util.isInteger(m.minDelayMs))
                            return "minDelayMs: integer expected";
                    }
                    if (m.maxDelayMs != null && m.hasOwnProperty("maxDelayMs")) {
                        if (!$util.isInteger(m.maxDelayMs))
                            return "maxDelayMs: integer expected";
                    }
                    return null;
                };

                /**
                 * Creates a CmdTraceStartDelay message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.TraceConfig.CmdTraceStartDelay
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.TraceConfig.CmdTraceStartDelay} CmdTraceStartDelay
                 */
                CmdTraceStartDelay.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.TraceConfig.CmdTraceStartDelay)
                        return d;
                    var m = new $root.perfetto.protos.TraceConfig.CmdTraceStartDelay();
                    if (d.minDelayMs != null) {
                        m.minDelayMs = d.minDelayMs >>> 0;
                    }
                    if (d.maxDelayMs != null) {
                        m.maxDelayMs = d.maxDelayMs >>> 0;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a CmdTraceStartDelay message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.TraceConfig.CmdTraceStartDelay
                 * @static
                 * @param {perfetto.protos.TraceConfig.CmdTraceStartDelay} m CmdTraceStartDelay
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                CmdTraceStartDelay.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.minDelayMs = 0;
                        d.maxDelayMs = 0;
                    }
                    if (m.minDelayMs != null && m.hasOwnProperty("minDelayMs")) {
                        d.minDelayMs = m.minDelayMs;
                    }
                    if (m.maxDelayMs != null && m.hasOwnProperty("maxDelayMs")) {
                        d.maxDelayMs = m.maxDelayMs;
                    }
                    return d;
                };

                /**
                 * Converts this CmdTraceStartDelay to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.TraceConfig.CmdTraceStartDelay
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                CmdTraceStartDelay.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return CmdTraceStartDelay;
            })();

            return TraceConfig;
        })();

        protos.ConsumerPort = (function() {

            /**
             * Constructs a new ConsumerPort service.
             * @memberof perfetto.protos
             * @classdesc Represents a ConsumerPort
             * @extends $protobuf.rpc.Service
             * @constructor
             * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
             * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
             * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
             */
            function ConsumerPort(rpcImpl, requestDelimited, responseDelimited) {
                minimal$1.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
            }

            (ConsumerPort.prototype = Object.create(minimal$1.rpc.Service.prototype)).constructor = ConsumerPort;

            /**
             * Creates new ConsumerPort service using the specified rpc implementation.
             * @function create
             * @memberof perfetto.protos.ConsumerPort
             * @static
             * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
             * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
             * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
             * @returns {ConsumerPort} RPC service. Useful where requests and/or responses are streamed.
             */
            ConsumerPort.create = function create(rpcImpl, requestDelimited, responseDelimited) {
                return new this(rpcImpl, requestDelimited, responseDelimited);
            };

            /**
             * Callback as used by {@link perfetto.protos.ConsumerPort#enableTracing}.
             * @memberof perfetto.protos.ConsumerPort
             * @typedef EnableTracingCallback
             * @type {function}
             * @param {Error|null} error Error, if any
             * @param {perfetto.protos.EnableTracingResponse} [response] EnableTracingResponse
             */

            /**
             * Calls EnableTracing.
             * @function enableTracing
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IEnableTracingRequest} request EnableTracingRequest message or plain object
             * @param {perfetto.protos.ConsumerPort.EnableTracingCallback} callback Node-style callback called with the error, if any, and EnableTracingResponse
             * @returns {undefined}
             * @variation 1
             */
            Object.defineProperty(ConsumerPort.prototype.enableTracing = function enableTracing(request, callback) {
                return this.rpcCall(enableTracing, $root.perfetto.protos.EnableTracingRequest, $root.perfetto.protos.EnableTracingResponse, request, callback);
            }, "name", { value: "EnableTracing" });

            /**
             * Calls EnableTracing.
             * @function enableTracing
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IEnableTracingRequest} request EnableTracingRequest message or plain object
             * @returns {Promise<perfetto.protos.EnableTracingResponse>} Promise
             * @variation 2
             */

            /**
             * Callback as used by {@link perfetto.protos.ConsumerPort#disableTracing}.
             * @memberof perfetto.protos.ConsumerPort
             * @typedef DisableTracingCallback
             * @type {function}
             * @param {Error|null} error Error, if any
             * @param {perfetto.protos.DisableTracingResponse} [response] DisableTracingResponse
             */

            /**
             * Calls DisableTracing.
             * @function disableTracing
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IDisableTracingRequest} request DisableTracingRequest message or plain object
             * @param {perfetto.protos.ConsumerPort.DisableTracingCallback} callback Node-style callback called with the error, if any, and DisableTracingResponse
             * @returns {undefined}
             * @variation 1
             */
            Object.defineProperty(ConsumerPort.prototype.disableTracing = function disableTracing(request, callback) {
                return this.rpcCall(disableTracing, $root.perfetto.protos.DisableTracingRequest, $root.perfetto.protos.DisableTracingResponse, request, callback);
            }, "name", { value: "DisableTracing" });

            /**
             * Calls DisableTracing.
             * @function disableTracing
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IDisableTracingRequest} request DisableTracingRequest message or plain object
             * @returns {Promise<perfetto.protos.DisableTracingResponse>} Promise
             * @variation 2
             */

            /**
             * Callback as used by {@link perfetto.protos.ConsumerPort#readBuffers}.
             * @memberof perfetto.protos.ConsumerPort
             * @typedef ReadBuffersCallback
             * @type {function}
             * @param {Error|null} error Error, if any
             * @param {perfetto.protos.ReadBuffersResponse} [response] ReadBuffersResponse
             */

            /**
             * Calls ReadBuffers.
             * @function readBuffers
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IReadBuffersRequest} request ReadBuffersRequest message or plain object
             * @param {perfetto.protos.ConsumerPort.ReadBuffersCallback} callback Node-style callback called with the error, if any, and ReadBuffersResponse
             * @returns {undefined}
             * @variation 1
             */
            Object.defineProperty(ConsumerPort.prototype.readBuffers = function readBuffers(request, callback) {
                return this.rpcCall(readBuffers, $root.perfetto.protos.ReadBuffersRequest, $root.perfetto.protos.ReadBuffersResponse, request, callback);
            }, "name", { value: "ReadBuffers" });

            /**
             * Calls ReadBuffers.
             * @function readBuffers
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IReadBuffersRequest} request ReadBuffersRequest message or plain object
             * @returns {Promise<perfetto.protos.ReadBuffersResponse>} Promise
             * @variation 2
             */

            /**
             * Callback as used by {@link perfetto.protos.ConsumerPort#freeBuffers}.
             * @memberof perfetto.protos.ConsumerPort
             * @typedef FreeBuffersCallback
             * @type {function}
             * @param {Error|null} error Error, if any
             * @param {perfetto.protos.FreeBuffersResponse} [response] FreeBuffersResponse
             */

            /**
             * Calls FreeBuffers.
             * @function freeBuffers
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IFreeBuffersRequest} request FreeBuffersRequest message or plain object
             * @param {perfetto.protos.ConsumerPort.FreeBuffersCallback} callback Node-style callback called with the error, if any, and FreeBuffersResponse
             * @returns {undefined}
             * @variation 1
             */
            Object.defineProperty(ConsumerPort.prototype.freeBuffers = function freeBuffers(request, callback) {
                return this.rpcCall(freeBuffers, $root.perfetto.protos.FreeBuffersRequest, $root.perfetto.protos.FreeBuffersResponse, request, callback);
            }, "name", { value: "FreeBuffers" });

            /**
             * Calls FreeBuffers.
             * @function freeBuffers
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IFreeBuffersRequest} request FreeBuffersRequest message or plain object
             * @returns {Promise<perfetto.protos.FreeBuffersResponse>} Promise
             * @variation 2
             */

            /**
             * Callback as used by {@link perfetto.protos.ConsumerPort#flush}.
             * @memberof perfetto.protos.ConsumerPort
             * @typedef FlushCallback
             * @type {function}
             * @param {Error|null} error Error, if any
             * @param {perfetto.protos.FlushResponse} [response] FlushResponse
             */

            /**
             * Calls Flush.
             * @function flush
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IFlushRequest} request FlushRequest message or plain object
             * @param {perfetto.protos.ConsumerPort.FlushCallback} callback Node-style callback called with the error, if any, and FlushResponse
             * @returns {undefined}
             * @variation 1
             */
            Object.defineProperty(ConsumerPort.prototype.flush = function flush(request, callback) {
                return this.rpcCall(flush, $root.perfetto.protos.FlushRequest, $root.perfetto.protos.FlushResponse, request, callback);
            }, "name", { value: "Flush" });

            /**
             * Calls Flush.
             * @function flush
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IFlushRequest} request FlushRequest message or plain object
             * @returns {Promise<perfetto.protos.FlushResponse>} Promise
             * @variation 2
             */

            /**
             * Callback as used by {@link perfetto.protos.ConsumerPort#startTracing}.
             * @memberof perfetto.protos.ConsumerPort
             * @typedef StartTracingCallback
             * @type {function}
             * @param {Error|null} error Error, if any
             * @param {perfetto.protos.StartTracingResponse} [response] StartTracingResponse
             */

            /**
             * Calls StartTracing.
             * @function startTracing
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IStartTracingRequest} request StartTracingRequest message or plain object
             * @param {perfetto.protos.ConsumerPort.StartTracingCallback} callback Node-style callback called with the error, if any, and StartTracingResponse
             * @returns {undefined}
             * @variation 1
             */
            Object.defineProperty(ConsumerPort.prototype.startTracing = function startTracing(request, callback) {
                return this.rpcCall(startTracing, $root.perfetto.protos.StartTracingRequest, $root.perfetto.protos.StartTracingResponse, request, callback);
            }, "name", { value: "StartTracing" });

            /**
             * Calls StartTracing.
             * @function startTracing
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IStartTracingRequest} request StartTracingRequest message or plain object
             * @returns {Promise<perfetto.protos.StartTracingResponse>} Promise
             * @variation 2
             */

            /**
             * Callback as used by {@link perfetto.protos.ConsumerPort#changeTraceConfig}.
             * @memberof perfetto.protos.ConsumerPort
             * @typedef ChangeTraceConfigCallback
             * @type {function}
             * @param {Error|null} error Error, if any
             * @param {perfetto.protos.ChangeTraceConfigResponse} [response] ChangeTraceConfigResponse
             */

            /**
             * Calls ChangeTraceConfig.
             * @function changeTraceConfig
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IChangeTraceConfigRequest} request ChangeTraceConfigRequest message or plain object
             * @param {perfetto.protos.ConsumerPort.ChangeTraceConfigCallback} callback Node-style callback called with the error, if any, and ChangeTraceConfigResponse
             * @returns {undefined}
             * @variation 1
             */
            Object.defineProperty(ConsumerPort.prototype.changeTraceConfig = function changeTraceConfig(request, callback) {
                return this.rpcCall(changeTraceConfig, $root.perfetto.protos.ChangeTraceConfigRequest, $root.perfetto.protos.ChangeTraceConfigResponse, request, callback);
            }, "name", { value: "ChangeTraceConfig" });

            /**
             * Calls ChangeTraceConfig.
             * @function changeTraceConfig
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IChangeTraceConfigRequest} request ChangeTraceConfigRequest message or plain object
             * @returns {Promise<perfetto.protos.ChangeTraceConfigResponse>} Promise
             * @variation 2
             */

            /**
             * Callback as used by {@link perfetto.protos.ConsumerPort#detach}.
             * @memberof perfetto.protos.ConsumerPort
             * @typedef DetachCallback
             * @type {function}
             * @param {Error|null} error Error, if any
             * @param {perfetto.protos.DetachResponse} [response] DetachResponse
             */

            /**
             * Calls Detach.
             * @function detach
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IDetachRequest} request DetachRequest message or plain object
             * @param {perfetto.protos.ConsumerPort.DetachCallback} callback Node-style callback called with the error, if any, and DetachResponse
             * @returns {undefined}
             * @variation 1
             */
            Object.defineProperty(ConsumerPort.prototype.detach = function detach(request, callback) {
                return this.rpcCall(detach, $root.perfetto.protos.DetachRequest, $root.perfetto.protos.DetachResponse, request, callback);
            }, "name", { value: "Detach" });

            /**
             * Calls Detach.
             * @function detach
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IDetachRequest} request DetachRequest message or plain object
             * @returns {Promise<perfetto.protos.DetachResponse>} Promise
             * @variation 2
             */

            /**
             * Callback as used by {@link perfetto.protos.ConsumerPort#attach}.
             * @memberof perfetto.protos.ConsumerPort
             * @typedef AttachCallback
             * @type {function}
             * @param {Error|null} error Error, if any
             * @param {perfetto.protos.AttachResponse} [response] AttachResponse
             */

            /**
             * Calls Attach.
             * @function attach
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IAttachRequest} request AttachRequest message or plain object
             * @param {perfetto.protos.ConsumerPort.AttachCallback} callback Node-style callback called with the error, if any, and AttachResponse
             * @returns {undefined}
             * @variation 1
             */
            Object.defineProperty(ConsumerPort.prototype.attach = function attach(request, callback) {
                return this.rpcCall(attach, $root.perfetto.protos.AttachRequest, $root.perfetto.protos.AttachResponse, request, callback);
            }, "name", { value: "Attach" });

            /**
             * Calls Attach.
             * @function attach
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IAttachRequest} request AttachRequest message or plain object
             * @returns {Promise<perfetto.protos.AttachResponse>} Promise
             * @variation 2
             */

            /**
             * Callback as used by {@link perfetto.protos.ConsumerPort#getTraceStats}.
             * @memberof perfetto.protos.ConsumerPort
             * @typedef GetTraceStatsCallback
             * @type {function}
             * @param {Error|null} error Error, if any
             * @param {perfetto.protos.GetTraceStatsResponse} [response] GetTraceStatsResponse
             */

            /**
             * Calls GetTraceStats.
             * @function getTraceStats
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IGetTraceStatsRequest} request GetTraceStatsRequest message or plain object
             * @param {perfetto.protos.ConsumerPort.GetTraceStatsCallback} callback Node-style callback called with the error, if any, and GetTraceStatsResponse
             * @returns {undefined}
             * @variation 1
             */
            Object.defineProperty(ConsumerPort.prototype.getTraceStats = function getTraceStats(request, callback) {
                return this.rpcCall(getTraceStats, $root.perfetto.protos.GetTraceStatsRequest, $root.perfetto.protos.GetTraceStatsResponse, request, callback);
            }, "name", { value: "GetTraceStats" });

            /**
             * Calls GetTraceStats.
             * @function getTraceStats
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IGetTraceStatsRequest} request GetTraceStatsRequest message or plain object
             * @returns {Promise<perfetto.protos.GetTraceStatsResponse>} Promise
             * @variation 2
             */

            /**
             * Callback as used by {@link perfetto.protos.ConsumerPort#observeEvents}.
             * @memberof perfetto.protos.ConsumerPort
             * @typedef ObserveEventsCallback
             * @type {function}
             * @param {Error|null} error Error, if any
             * @param {perfetto.protos.ObserveEventsResponse} [response] ObserveEventsResponse
             */

            /**
             * Calls ObserveEvents.
             * @function observeEvents
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IObserveEventsRequest} request ObserveEventsRequest message or plain object
             * @param {perfetto.protos.ConsumerPort.ObserveEventsCallback} callback Node-style callback called with the error, if any, and ObserveEventsResponse
             * @returns {undefined}
             * @variation 1
             */
            Object.defineProperty(ConsumerPort.prototype.observeEvents = function observeEvents(request, callback) {
                return this.rpcCall(observeEvents, $root.perfetto.protos.ObserveEventsRequest, $root.perfetto.protos.ObserveEventsResponse, request, callback);
            }, "name", { value: "ObserveEvents" });

            /**
             * Calls ObserveEvents.
             * @function observeEvents
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IObserveEventsRequest} request ObserveEventsRequest message or plain object
             * @returns {Promise<perfetto.protos.ObserveEventsResponse>} Promise
             * @variation 2
             */

            /**
             * Callback as used by {@link perfetto.protos.ConsumerPort#queryServiceState}.
             * @memberof perfetto.protos.ConsumerPort
             * @typedef QueryServiceStateCallback
             * @type {function}
             * @param {Error|null} error Error, if any
             * @param {perfetto.protos.QueryServiceStateResponse} [response] QueryServiceStateResponse
             */

            /**
             * Calls QueryServiceState.
             * @function queryServiceState
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IQueryServiceStateRequest} request QueryServiceStateRequest message or plain object
             * @param {perfetto.protos.ConsumerPort.QueryServiceStateCallback} callback Node-style callback called with the error, if any, and QueryServiceStateResponse
             * @returns {undefined}
             * @variation 1
             */
            Object.defineProperty(ConsumerPort.prototype.queryServiceState = function queryServiceState(request, callback) {
                return this.rpcCall(queryServiceState, $root.perfetto.protos.QueryServiceStateRequest, $root.perfetto.protos.QueryServiceStateResponse, request, callback);
            }, "name", { value: "QueryServiceState" });

            /**
             * Calls QueryServiceState.
             * @function queryServiceState
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IQueryServiceStateRequest} request QueryServiceStateRequest message or plain object
             * @returns {Promise<perfetto.protos.QueryServiceStateResponse>} Promise
             * @variation 2
             */

            /**
             * Callback as used by {@link perfetto.protos.ConsumerPort#queryCapabilities}.
             * @memberof perfetto.protos.ConsumerPort
             * @typedef QueryCapabilitiesCallback
             * @type {function}
             * @param {Error|null} error Error, if any
             * @param {perfetto.protos.QueryCapabilitiesResponse} [response] QueryCapabilitiesResponse
             */

            /**
             * Calls QueryCapabilities.
             * @function queryCapabilities
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IQueryCapabilitiesRequest} request QueryCapabilitiesRequest message or plain object
             * @param {perfetto.protos.ConsumerPort.QueryCapabilitiesCallback} callback Node-style callback called with the error, if any, and QueryCapabilitiesResponse
             * @returns {undefined}
             * @variation 1
             */
            Object.defineProperty(ConsumerPort.prototype.queryCapabilities = function queryCapabilities(request, callback) {
                return this.rpcCall(queryCapabilities, $root.perfetto.protos.QueryCapabilitiesRequest, $root.perfetto.protos.QueryCapabilitiesResponse, request, callback);
            }, "name", { value: "QueryCapabilities" });

            /**
             * Calls QueryCapabilities.
             * @function queryCapabilities
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.IQueryCapabilitiesRequest} request QueryCapabilitiesRequest message or plain object
             * @returns {Promise<perfetto.protos.QueryCapabilitiesResponse>} Promise
             * @variation 2
             */

            /**
             * Callback as used by {@link perfetto.protos.ConsumerPort#saveTraceForBugreport}.
             * @memberof perfetto.protos.ConsumerPort
             * @typedef SaveTraceForBugreportCallback
             * @type {function}
             * @param {Error|null} error Error, if any
             * @param {perfetto.protos.SaveTraceForBugreportResponse} [response] SaveTraceForBugreportResponse
             */

            /**
             * Calls SaveTraceForBugreport.
             * @function saveTraceForBugreport
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.ISaveTraceForBugreportRequest} request SaveTraceForBugreportRequest message or plain object
             * @param {perfetto.protos.ConsumerPort.SaveTraceForBugreportCallback} callback Node-style callback called with the error, if any, and SaveTraceForBugreportResponse
             * @returns {undefined}
             * @variation 1
             */
            Object.defineProperty(ConsumerPort.prototype.saveTraceForBugreport = function saveTraceForBugreport(request, callback) {
                return this.rpcCall(saveTraceForBugreport, $root.perfetto.protos.SaveTraceForBugreportRequest, $root.perfetto.protos.SaveTraceForBugreportResponse, request, callback);
            }, "name", { value: "SaveTraceForBugreport" });

            /**
             * Calls SaveTraceForBugreport.
             * @function saveTraceForBugreport
             * @memberof perfetto.protos.ConsumerPort
             * @instance
             * @param {perfetto.protos.ISaveTraceForBugreportRequest} request SaveTraceForBugreportRequest message or plain object
             * @returns {Promise<perfetto.protos.SaveTraceForBugreportResponse>} Promise
             * @variation 2
             */

            return ConsumerPort;
        })();

        protos.EnableTracingRequest = (function() {

            /**
             * Properties of an EnableTracingRequest.
             * @memberof perfetto.protos
             * @interface IEnableTracingRequest
             * @property {perfetto.protos.ITraceConfig|null} [traceConfig] EnableTracingRequest traceConfig
             * @property {boolean|null} [attachNotificationOnly] EnableTracingRequest attachNotificationOnly
             */

            /**
             * Constructs a new EnableTracingRequest.
             * @memberof perfetto.protos
             * @classdesc Represents an EnableTracingRequest.
             * @implements IEnableTracingRequest
             * @constructor
             * @param {perfetto.protos.IEnableTracingRequest=} [p] Properties to set
             */
            function EnableTracingRequest(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * EnableTracingRequest traceConfig.
             * @member {perfetto.protos.ITraceConfig|null|undefined} traceConfig
             * @memberof perfetto.protos.EnableTracingRequest
             * @instance
             */
            EnableTracingRequest.prototype.traceConfig = null;

            /**
             * EnableTracingRequest attachNotificationOnly.
             * @member {boolean} attachNotificationOnly
             * @memberof perfetto.protos.EnableTracingRequest
             * @instance
             */
            EnableTracingRequest.prototype.attachNotificationOnly = false;

            /**
             * Creates a new EnableTracingRequest instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.EnableTracingRequest
             * @static
             * @param {perfetto.protos.IEnableTracingRequest=} [properties] Properties to set
             * @returns {perfetto.protos.EnableTracingRequest} EnableTracingRequest instance
             */
            EnableTracingRequest.create = function create(properties) {
                return new EnableTracingRequest(properties);
            };

            /**
             * Encodes the specified EnableTracingRequest message. Does not implicitly {@link perfetto.protos.EnableTracingRequest.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.EnableTracingRequest
             * @static
             * @param {perfetto.protos.IEnableTracingRequest} m EnableTracingRequest message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EnableTracingRequest.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.traceConfig != null && Object.hasOwnProperty.call(m, "traceConfig"))
                    $root.perfetto.protos.TraceConfig.encode(m.traceConfig, w.uint32(10).fork()).ldelim();
                if (m.attachNotificationOnly != null && Object.hasOwnProperty.call(m, "attachNotificationOnly"))
                    w.uint32(16).bool(m.attachNotificationOnly);
                return w;
            };

            /**
             * Encodes the specified EnableTracingRequest message, length delimited. Does not implicitly {@link perfetto.protos.EnableTracingRequest.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.EnableTracingRequest
             * @static
             * @param {perfetto.protos.IEnableTracingRequest} message EnableTracingRequest message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EnableTracingRequest.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an EnableTracingRequest message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.EnableTracingRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.EnableTracingRequest} EnableTracingRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EnableTracingRequest.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.EnableTracingRequest();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.traceConfig = $root.perfetto.protos.TraceConfig.decode(r, r.uint32());
                        break;
                    case 2:
                        m.attachNotificationOnly = r.bool();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an EnableTracingRequest message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.EnableTracingRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.EnableTracingRequest} EnableTracingRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EnableTracingRequest.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an EnableTracingRequest message.
             * @function verify
             * @memberof perfetto.protos.EnableTracingRequest
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            EnableTracingRequest.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.traceConfig != null && m.hasOwnProperty("traceConfig")) {
                    {
                        var e = $root.perfetto.protos.TraceConfig.verify(m.traceConfig);
                        if (e)
                            return "traceConfig." + e;
                    }
                }
                if (m.attachNotificationOnly != null && m.hasOwnProperty("attachNotificationOnly")) {
                    if (typeof m.attachNotificationOnly !== "boolean")
                        return "attachNotificationOnly: boolean expected";
                }
                return null;
            };

            /**
             * Creates an EnableTracingRequest message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.EnableTracingRequest
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.EnableTracingRequest} EnableTracingRequest
             */
            EnableTracingRequest.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.EnableTracingRequest)
                    return d;
                var m = new $root.perfetto.protos.EnableTracingRequest();
                if (d.traceConfig != null) {
                    if (typeof d.traceConfig !== "object")
                        throw TypeError(".perfetto.protos.EnableTracingRequest.traceConfig: object expected");
                    m.traceConfig = $root.perfetto.protos.TraceConfig.fromObject(d.traceConfig);
                }
                if (d.attachNotificationOnly != null) {
                    m.attachNotificationOnly = Boolean(d.attachNotificationOnly);
                }
                return m;
            };

            /**
             * Creates a plain object from an EnableTracingRequest message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.EnableTracingRequest
             * @static
             * @param {perfetto.protos.EnableTracingRequest} m EnableTracingRequest
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            EnableTracingRequest.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.traceConfig = null;
                    d.attachNotificationOnly = false;
                }
                if (m.traceConfig != null && m.hasOwnProperty("traceConfig")) {
                    d.traceConfig = $root.perfetto.protos.TraceConfig.toObject(m.traceConfig, o);
                }
                if (m.attachNotificationOnly != null && m.hasOwnProperty("attachNotificationOnly")) {
                    d.attachNotificationOnly = m.attachNotificationOnly;
                }
                return d;
            };

            /**
             * Converts this EnableTracingRequest to JSON.
             * @function toJSON
             * @memberof perfetto.protos.EnableTracingRequest
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            EnableTracingRequest.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return EnableTracingRequest;
        })();

        protos.EnableTracingResponse = (function() {

            /**
             * Properties of an EnableTracingResponse.
             * @memberof perfetto.protos
             * @interface IEnableTracingResponse
             * @property {boolean|null} [disabled] EnableTracingResponse disabled
             * @property {string|null} [error] EnableTracingResponse error
             */

            /**
             * Constructs a new EnableTracingResponse.
             * @memberof perfetto.protos
             * @classdesc Represents an EnableTracingResponse.
             * @implements IEnableTracingResponse
             * @constructor
             * @param {perfetto.protos.IEnableTracingResponse=} [p] Properties to set
             */
            function EnableTracingResponse(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * EnableTracingResponse disabled.
             * @member {boolean} disabled
             * @memberof perfetto.protos.EnableTracingResponse
             * @instance
             */
            EnableTracingResponse.prototype.disabled = false;

            /**
             * EnableTracingResponse error.
             * @member {string} error
             * @memberof perfetto.protos.EnableTracingResponse
             * @instance
             */
            EnableTracingResponse.prototype.error = "";

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * EnableTracingResponse state.
             * @member {"disabled"|undefined} state
             * @memberof perfetto.protos.EnableTracingResponse
             * @instance
             */
            Object.defineProperty(EnableTracingResponse.prototype, "state", {
                get: $util.oneOfGetter($oneOfFields = ["disabled"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new EnableTracingResponse instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.EnableTracingResponse
             * @static
             * @param {perfetto.protos.IEnableTracingResponse=} [properties] Properties to set
             * @returns {perfetto.protos.EnableTracingResponse} EnableTracingResponse instance
             */
            EnableTracingResponse.create = function create(properties) {
                return new EnableTracingResponse(properties);
            };

            /**
             * Encodes the specified EnableTracingResponse message. Does not implicitly {@link perfetto.protos.EnableTracingResponse.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.EnableTracingResponse
             * @static
             * @param {perfetto.protos.IEnableTracingResponse} m EnableTracingResponse message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EnableTracingResponse.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.disabled != null && Object.hasOwnProperty.call(m, "disabled"))
                    w.uint32(8).bool(m.disabled);
                if (m.error != null && Object.hasOwnProperty.call(m, "error"))
                    w.uint32(26).string(m.error);
                return w;
            };

            /**
             * Encodes the specified EnableTracingResponse message, length delimited. Does not implicitly {@link perfetto.protos.EnableTracingResponse.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.EnableTracingResponse
             * @static
             * @param {perfetto.protos.IEnableTracingResponse} message EnableTracingResponse message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EnableTracingResponse.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an EnableTracingResponse message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.EnableTracingResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.EnableTracingResponse} EnableTracingResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EnableTracingResponse.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.EnableTracingResponse();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.disabled = r.bool();
                        break;
                    case 3:
                        m.error = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an EnableTracingResponse message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.EnableTracingResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.EnableTracingResponse} EnableTracingResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EnableTracingResponse.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an EnableTracingResponse message.
             * @function verify
             * @memberof perfetto.protos.EnableTracingResponse
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            EnableTracingResponse.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.disabled != null && m.hasOwnProperty("disabled")) {
                    if (typeof m.disabled !== "boolean")
                        return "disabled: boolean expected";
                }
                if (m.error != null && m.hasOwnProperty("error")) {
                    if (!$util.isString(m.error))
                        return "error: string expected";
                }
                return null;
            };

            /**
             * Creates an EnableTracingResponse message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.EnableTracingResponse
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.EnableTracingResponse} EnableTracingResponse
             */
            EnableTracingResponse.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.EnableTracingResponse)
                    return d;
                var m = new $root.perfetto.protos.EnableTracingResponse();
                if (d.disabled != null) {
                    m.disabled = Boolean(d.disabled);
                }
                if (d.error != null) {
                    m.error = String(d.error);
                }
                return m;
            };

            /**
             * Creates a plain object from an EnableTracingResponse message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.EnableTracingResponse
             * @static
             * @param {perfetto.protos.EnableTracingResponse} m EnableTracingResponse
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            EnableTracingResponse.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.error = "";
                }
                if (m.disabled != null && m.hasOwnProperty("disabled")) {
                    d.disabled = m.disabled;
                    if (o.oneofs)
                        d.state = "disabled";
                }
                if (m.error != null && m.hasOwnProperty("error")) {
                    d.error = m.error;
                }
                return d;
            };

            /**
             * Converts this EnableTracingResponse to JSON.
             * @function toJSON
             * @memberof perfetto.protos.EnableTracingResponse
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            EnableTracingResponse.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return EnableTracingResponse;
        })();

        protos.StartTracingRequest = (function() {

            /**
             * Properties of a StartTracingRequest.
             * @memberof perfetto.protos
             * @interface IStartTracingRequest
             */

            /**
             * Constructs a new StartTracingRequest.
             * @memberof perfetto.protos
             * @classdesc Represents a StartTracingRequest.
             * @implements IStartTracingRequest
             * @constructor
             * @param {perfetto.protos.IStartTracingRequest=} [p] Properties to set
             */
            function StartTracingRequest(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Creates a new StartTracingRequest instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.StartTracingRequest
             * @static
             * @param {perfetto.protos.IStartTracingRequest=} [properties] Properties to set
             * @returns {perfetto.protos.StartTracingRequest} StartTracingRequest instance
             */
            StartTracingRequest.create = function create(properties) {
                return new StartTracingRequest(properties);
            };

            /**
             * Encodes the specified StartTracingRequest message. Does not implicitly {@link perfetto.protos.StartTracingRequest.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.StartTracingRequest
             * @static
             * @param {perfetto.protos.IStartTracingRequest} m StartTracingRequest message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StartTracingRequest.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                return w;
            };

            /**
             * Encodes the specified StartTracingRequest message, length delimited. Does not implicitly {@link perfetto.protos.StartTracingRequest.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.StartTracingRequest
             * @static
             * @param {perfetto.protos.IStartTracingRequest} message StartTracingRequest message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StartTracingRequest.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a StartTracingRequest message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.StartTracingRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.StartTracingRequest} StartTracingRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StartTracingRequest.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.StartTracingRequest();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a StartTracingRequest message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.StartTracingRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.StartTracingRequest} StartTracingRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StartTracingRequest.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a StartTracingRequest message.
             * @function verify
             * @memberof perfetto.protos.StartTracingRequest
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            StartTracingRequest.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates a StartTracingRequest message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.StartTracingRequest
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.StartTracingRequest} StartTracingRequest
             */
            StartTracingRequest.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.StartTracingRequest)
                    return d;
                return new $root.perfetto.protos.StartTracingRequest();
            };

            /**
             * Creates a plain object from a StartTracingRequest message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.StartTracingRequest
             * @static
             * @param {perfetto.protos.StartTracingRequest} m StartTracingRequest
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            StartTracingRequest.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this StartTracingRequest to JSON.
             * @function toJSON
             * @memberof perfetto.protos.StartTracingRequest
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            StartTracingRequest.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return StartTracingRequest;
        })();

        protos.StartTracingResponse = (function() {

            /**
             * Properties of a StartTracingResponse.
             * @memberof perfetto.protos
             * @interface IStartTracingResponse
             */

            /**
             * Constructs a new StartTracingResponse.
             * @memberof perfetto.protos
             * @classdesc Represents a StartTracingResponse.
             * @implements IStartTracingResponse
             * @constructor
             * @param {perfetto.protos.IStartTracingResponse=} [p] Properties to set
             */
            function StartTracingResponse(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Creates a new StartTracingResponse instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.StartTracingResponse
             * @static
             * @param {perfetto.protos.IStartTracingResponse=} [properties] Properties to set
             * @returns {perfetto.protos.StartTracingResponse} StartTracingResponse instance
             */
            StartTracingResponse.create = function create(properties) {
                return new StartTracingResponse(properties);
            };

            /**
             * Encodes the specified StartTracingResponse message. Does not implicitly {@link perfetto.protos.StartTracingResponse.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.StartTracingResponse
             * @static
             * @param {perfetto.protos.IStartTracingResponse} m StartTracingResponse message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StartTracingResponse.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                return w;
            };

            /**
             * Encodes the specified StartTracingResponse message, length delimited. Does not implicitly {@link perfetto.protos.StartTracingResponse.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.StartTracingResponse
             * @static
             * @param {perfetto.protos.IStartTracingResponse} message StartTracingResponse message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StartTracingResponse.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a StartTracingResponse message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.StartTracingResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.StartTracingResponse} StartTracingResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StartTracingResponse.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.StartTracingResponse();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a StartTracingResponse message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.StartTracingResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.StartTracingResponse} StartTracingResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StartTracingResponse.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a StartTracingResponse message.
             * @function verify
             * @memberof perfetto.protos.StartTracingResponse
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            StartTracingResponse.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates a StartTracingResponse message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.StartTracingResponse
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.StartTracingResponse} StartTracingResponse
             */
            StartTracingResponse.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.StartTracingResponse)
                    return d;
                return new $root.perfetto.protos.StartTracingResponse();
            };

            /**
             * Creates a plain object from a StartTracingResponse message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.StartTracingResponse
             * @static
             * @param {perfetto.protos.StartTracingResponse} m StartTracingResponse
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            StartTracingResponse.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this StartTracingResponse to JSON.
             * @function toJSON
             * @memberof perfetto.protos.StartTracingResponse
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            StartTracingResponse.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return StartTracingResponse;
        })();

        protos.ChangeTraceConfigRequest = (function() {

            /**
             * Properties of a ChangeTraceConfigRequest.
             * @memberof perfetto.protos
             * @interface IChangeTraceConfigRequest
             * @property {perfetto.protos.ITraceConfig|null} [traceConfig] ChangeTraceConfigRequest traceConfig
             */

            /**
             * Constructs a new ChangeTraceConfigRequest.
             * @memberof perfetto.protos
             * @classdesc Represents a ChangeTraceConfigRequest.
             * @implements IChangeTraceConfigRequest
             * @constructor
             * @param {perfetto.protos.IChangeTraceConfigRequest=} [p] Properties to set
             */
            function ChangeTraceConfigRequest(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChangeTraceConfigRequest traceConfig.
             * @member {perfetto.protos.ITraceConfig|null|undefined} traceConfig
             * @memberof perfetto.protos.ChangeTraceConfigRequest
             * @instance
             */
            ChangeTraceConfigRequest.prototype.traceConfig = null;

            /**
             * Creates a new ChangeTraceConfigRequest instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChangeTraceConfigRequest
             * @static
             * @param {perfetto.protos.IChangeTraceConfigRequest=} [properties] Properties to set
             * @returns {perfetto.protos.ChangeTraceConfigRequest} ChangeTraceConfigRequest instance
             */
            ChangeTraceConfigRequest.create = function create(properties) {
                return new ChangeTraceConfigRequest(properties);
            };

            /**
             * Encodes the specified ChangeTraceConfigRequest message. Does not implicitly {@link perfetto.protos.ChangeTraceConfigRequest.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChangeTraceConfigRequest
             * @static
             * @param {perfetto.protos.IChangeTraceConfigRequest} m ChangeTraceConfigRequest message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChangeTraceConfigRequest.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.traceConfig != null && Object.hasOwnProperty.call(m, "traceConfig"))
                    $root.perfetto.protos.TraceConfig.encode(m.traceConfig, w.uint32(10).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified ChangeTraceConfigRequest message, length delimited. Does not implicitly {@link perfetto.protos.ChangeTraceConfigRequest.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChangeTraceConfigRequest
             * @static
             * @param {perfetto.protos.IChangeTraceConfigRequest} message ChangeTraceConfigRequest message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChangeTraceConfigRequest.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChangeTraceConfigRequest message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChangeTraceConfigRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChangeTraceConfigRequest} ChangeTraceConfigRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChangeTraceConfigRequest.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChangeTraceConfigRequest();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.traceConfig = $root.perfetto.protos.TraceConfig.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChangeTraceConfigRequest message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChangeTraceConfigRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChangeTraceConfigRequest} ChangeTraceConfigRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChangeTraceConfigRequest.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChangeTraceConfigRequest message.
             * @function verify
             * @memberof perfetto.protos.ChangeTraceConfigRequest
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChangeTraceConfigRequest.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.traceConfig != null && m.hasOwnProperty("traceConfig")) {
                    {
                        var e = $root.perfetto.protos.TraceConfig.verify(m.traceConfig);
                        if (e)
                            return "traceConfig." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a ChangeTraceConfigRequest message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChangeTraceConfigRequest
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChangeTraceConfigRequest} ChangeTraceConfigRequest
             */
            ChangeTraceConfigRequest.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChangeTraceConfigRequest)
                    return d;
                var m = new $root.perfetto.protos.ChangeTraceConfigRequest();
                if (d.traceConfig != null) {
                    if (typeof d.traceConfig !== "object")
                        throw TypeError(".perfetto.protos.ChangeTraceConfigRequest.traceConfig: object expected");
                    m.traceConfig = $root.perfetto.protos.TraceConfig.fromObject(d.traceConfig);
                }
                return m;
            };

            /**
             * Creates a plain object from a ChangeTraceConfigRequest message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChangeTraceConfigRequest
             * @static
             * @param {perfetto.protos.ChangeTraceConfigRequest} m ChangeTraceConfigRequest
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChangeTraceConfigRequest.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.traceConfig = null;
                }
                if (m.traceConfig != null && m.hasOwnProperty("traceConfig")) {
                    d.traceConfig = $root.perfetto.protos.TraceConfig.toObject(m.traceConfig, o);
                }
                return d;
            };

            /**
             * Converts this ChangeTraceConfigRequest to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChangeTraceConfigRequest
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChangeTraceConfigRequest.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ChangeTraceConfigRequest;
        })();

        protos.ChangeTraceConfigResponse = (function() {

            /**
             * Properties of a ChangeTraceConfigResponse.
             * @memberof perfetto.protos
             * @interface IChangeTraceConfigResponse
             */

            /**
             * Constructs a new ChangeTraceConfigResponse.
             * @memberof perfetto.protos
             * @classdesc Represents a ChangeTraceConfigResponse.
             * @implements IChangeTraceConfigResponse
             * @constructor
             * @param {perfetto.protos.IChangeTraceConfigResponse=} [p] Properties to set
             */
            function ChangeTraceConfigResponse(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Creates a new ChangeTraceConfigResponse instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChangeTraceConfigResponse
             * @static
             * @param {perfetto.protos.IChangeTraceConfigResponse=} [properties] Properties to set
             * @returns {perfetto.protos.ChangeTraceConfigResponse} ChangeTraceConfigResponse instance
             */
            ChangeTraceConfigResponse.create = function create(properties) {
                return new ChangeTraceConfigResponse(properties);
            };

            /**
             * Encodes the specified ChangeTraceConfigResponse message. Does not implicitly {@link perfetto.protos.ChangeTraceConfigResponse.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChangeTraceConfigResponse
             * @static
             * @param {perfetto.protos.IChangeTraceConfigResponse} m ChangeTraceConfigResponse message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChangeTraceConfigResponse.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                return w;
            };

            /**
             * Encodes the specified ChangeTraceConfigResponse message, length delimited. Does not implicitly {@link perfetto.protos.ChangeTraceConfigResponse.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChangeTraceConfigResponse
             * @static
             * @param {perfetto.protos.IChangeTraceConfigResponse} message ChangeTraceConfigResponse message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChangeTraceConfigResponse.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChangeTraceConfigResponse message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChangeTraceConfigResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChangeTraceConfigResponse} ChangeTraceConfigResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChangeTraceConfigResponse.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChangeTraceConfigResponse();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChangeTraceConfigResponse message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChangeTraceConfigResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChangeTraceConfigResponse} ChangeTraceConfigResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChangeTraceConfigResponse.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChangeTraceConfigResponse message.
             * @function verify
             * @memberof perfetto.protos.ChangeTraceConfigResponse
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChangeTraceConfigResponse.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates a ChangeTraceConfigResponse message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChangeTraceConfigResponse
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChangeTraceConfigResponse} ChangeTraceConfigResponse
             */
            ChangeTraceConfigResponse.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChangeTraceConfigResponse)
                    return d;
                return new $root.perfetto.protos.ChangeTraceConfigResponse();
            };

            /**
             * Creates a plain object from a ChangeTraceConfigResponse message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChangeTraceConfigResponse
             * @static
             * @param {perfetto.protos.ChangeTraceConfigResponse} m ChangeTraceConfigResponse
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChangeTraceConfigResponse.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this ChangeTraceConfigResponse to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChangeTraceConfigResponse
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChangeTraceConfigResponse.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ChangeTraceConfigResponse;
        })();

        protos.DisableTracingRequest = (function() {

            /**
             * Properties of a DisableTracingRequest.
             * @memberof perfetto.protos
             * @interface IDisableTracingRequest
             */

            /**
             * Constructs a new DisableTracingRequest.
             * @memberof perfetto.protos
             * @classdesc Represents a DisableTracingRequest.
             * @implements IDisableTracingRequest
             * @constructor
             * @param {perfetto.protos.IDisableTracingRequest=} [p] Properties to set
             */
            function DisableTracingRequest(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Creates a new DisableTracingRequest instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DisableTracingRequest
             * @static
             * @param {perfetto.protos.IDisableTracingRequest=} [properties] Properties to set
             * @returns {perfetto.protos.DisableTracingRequest} DisableTracingRequest instance
             */
            DisableTracingRequest.create = function create(properties) {
                return new DisableTracingRequest(properties);
            };

            /**
             * Encodes the specified DisableTracingRequest message. Does not implicitly {@link perfetto.protos.DisableTracingRequest.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DisableTracingRequest
             * @static
             * @param {perfetto.protos.IDisableTracingRequest} m DisableTracingRequest message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DisableTracingRequest.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                return w;
            };

            /**
             * Encodes the specified DisableTracingRequest message, length delimited. Does not implicitly {@link perfetto.protos.DisableTracingRequest.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DisableTracingRequest
             * @static
             * @param {perfetto.protos.IDisableTracingRequest} message DisableTracingRequest message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DisableTracingRequest.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DisableTracingRequest message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DisableTracingRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DisableTracingRequest} DisableTracingRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DisableTracingRequest.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DisableTracingRequest();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DisableTracingRequest message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DisableTracingRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DisableTracingRequest} DisableTracingRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DisableTracingRequest.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DisableTracingRequest message.
             * @function verify
             * @memberof perfetto.protos.DisableTracingRequest
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DisableTracingRequest.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates a DisableTracingRequest message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DisableTracingRequest
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DisableTracingRequest} DisableTracingRequest
             */
            DisableTracingRequest.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DisableTracingRequest)
                    return d;
                return new $root.perfetto.protos.DisableTracingRequest();
            };

            /**
             * Creates a plain object from a DisableTracingRequest message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DisableTracingRequest
             * @static
             * @param {perfetto.protos.DisableTracingRequest} m DisableTracingRequest
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DisableTracingRequest.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this DisableTracingRequest to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DisableTracingRequest
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DisableTracingRequest.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DisableTracingRequest;
        })();

        protos.DisableTracingResponse = (function() {

            /**
             * Properties of a DisableTracingResponse.
             * @memberof perfetto.protos
             * @interface IDisableTracingResponse
             */

            /**
             * Constructs a new DisableTracingResponse.
             * @memberof perfetto.protos
             * @classdesc Represents a DisableTracingResponse.
             * @implements IDisableTracingResponse
             * @constructor
             * @param {perfetto.protos.IDisableTracingResponse=} [p] Properties to set
             */
            function DisableTracingResponse(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Creates a new DisableTracingResponse instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DisableTracingResponse
             * @static
             * @param {perfetto.protos.IDisableTracingResponse=} [properties] Properties to set
             * @returns {perfetto.protos.DisableTracingResponse} DisableTracingResponse instance
             */
            DisableTracingResponse.create = function create(properties) {
                return new DisableTracingResponse(properties);
            };

            /**
             * Encodes the specified DisableTracingResponse message. Does not implicitly {@link perfetto.protos.DisableTracingResponse.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DisableTracingResponse
             * @static
             * @param {perfetto.protos.IDisableTracingResponse} m DisableTracingResponse message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DisableTracingResponse.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                return w;
            };

            /**
             * Encodes the specified DisableTracingResponse message, length delimited. Does not implicitly {@link perfetto.protos.DisableTracingResponse.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DisableTracingResponse
             * @static
             * @param {perfetto.protos.IDisableTracingResponse} message DisableTracingResponse message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DisableTracingResponse.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DisableTracingResponse message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DisableTracingResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DisableTracingResponse} DisableTracingResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DisableTracingResponse.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DisableTracingResponse();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DisableTracingResponse message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DisableTracingResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DisableTracingResponse} DisableTracingResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DisableTracingResponse.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DisableTracingResponse message.
             * @function verify
             * @memberof perfetto.protos.DisableTracingResponse
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DisableTracingResponse.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates a DisableTracingResponse message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DisableTracingResponse
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DisableTracingResponse} DisableTracingResponse
             */
            DisableTracingResponse.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DisableTracingResponse)
                    return d;
                return new $root.perfetto.protos.DisableTracingResponse();
            };

            /**
             * Creates a plain object from a DisableTracingResponse message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DisableTracingResponse
             * @static
             * @param {perfetto.protos.DisableTracingResponse} m DisableTracingResponse
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DisableTracingResponse.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this DisableTracingResponse to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DisableTracingResponse
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DisableTracingResponse.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DisableTracingResponse;
        })();

        protos.ReadBuffersRequest = (function() {

            /**
             * Properties of a ReadBuffersRequest.
             * @memberof perfetto.protos
             * @interface IReadBuffersRequest
             */

            /**
             * Constructs a new ReadBuffersRequest.
             * @memberof perfetto.protos
             * @classdesc Represents a ReadBuffersRequest.
             * @implements IReadBuffersRequest
             * @constructor
             * @param {perfetto.protos.IReadBuffersRequest=} [p] Properties to set
             */
            function ReadBuffersRequest(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Creates a new ReadBuffersRequest instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ReadBuffersRequest
             * @static
             * @param {perfetto.protos.IReadBuffersRequest=} [properties] Properties to set
             * @returns {perfetto.protos.ReadBuffersRequest} ReadBuffersRequest instance
             */
            ReadBuffersRequest.create = function create(properties) {
                return new ReadBuffersRequest(properties);
            };

            /**
             * Encodes the specified ReadBuffersRequest message. Does not implicitly {@link perfetto.protos.ReadBuffersRequest.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ReadBuffersRequest
             * @static
             * @param {perfetto.protos.IReadBuffersRequest} m ReadBuffersRequest message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ReadBuffersRequest.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                return w;
            };

            /**
             * Encodes the specified ReadBuffersRequest message, length delimited. Does not implicitly {@link perfetto.protos.ReadBuffersRequest.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ReadBuffersRequest
             * @static
             * @param {perfetto.protos.IReadBuffersRequest} message ReadBuffersRequest message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ReadBuffersRequest.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ReadBuffersRequest message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ReadBuffersRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ReadBuffersRequest} ReadBuffersRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ReadBuffersRequest.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ReadBuffersRequest();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ReadBuffersRequest message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ReadBuffersRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ReadBuffersRequest} ReadBuffersRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ReadBuffersRequest.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ReadBuffersRequest message.
             * @function verify
             * @memberof perfetto.protos.ReadBuffersRequest
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ReadBuffersRequest.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates a ReadBuffersRequest message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ReadBuffersRequest
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ReadBuffersRequest} ReadBuffersRequest
             */
            ReadBuffersRequest.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ReadBuffersRequest)
                    return d;
                return new $root.perfetto.protos.ReadBuffersRequest();
            };

            /**
             * Creates a plain object from a ReadBuffersRequest message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ReadBuffersRequest
             * @static
             * @param {perfetto.protos.ReadBuffersRequest} m ReadBuffersRequest
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ReadBuffersRequest.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this ReadBuffersRequest to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ReadBuffersRequest
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ReadBuffersRequest.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ReadBuffersRequest;
        })();

        protos.ReadBuffersResponse = (function() {

            /**
             * Properties of a ReadBuffersResponse.
             * @memberof perfetto.protos
             * @interface IReadBuffersResponse
             * @property {Array.<perfetto.protos.ReadBuffersResponse.ISlice>|null} [slices] ReadBuffersResponse slices
             */

            /**
             * Constructs a new ReadBuffersResponse.
             * @memberof perfetto.protos
             * @classdesc Represents a ReadBuffersResponse.
             * @implements IReadBuffersResponse
             * @constructor
             * @param {perfetto.protos.IReadBuffersResponse=} [p] Properties to set
             */
            function ReadBuffersResponse(p) {
                this.slices = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ReadBuffersResponse slices.
             * @member {Array.<perfetto.protos.ReadBuffersResponse.ISlice>} slices
             * @memberof perfetto.protos.ReadBuffersResponse
             * @instance
             */
            ReadBuffersResponse.prototype.slices = $util.emptyArray;

            /**
             * Creates a new ReadBuffersResponse instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ReadBuffersResponse
             * @static
             * @param {perfetto.protos.IReadBuffersResponse=} [properties] Properties to set
             * @returns {perfetto.protos.ReadBuffersResponse} ReadBuffersResponse instance
             */
            ReadBuffersResponse.create = function create(properties) {
                return new ReadBuffersResponse(properties);
            };

            /**
             * Encodes the specified ReadBuffersResponse message. Does not implicitly {@link perfetto.protos.ReadBuffersResponse.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ReadBuffersResponse
             * @static
             * @param {perfetto.protos.IReadBuffersResponse} m ReadBuffersResponse message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ReadBuffersResponse.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.slices != null && m.slices.length) {
                    for (var i = 0; i < m.slices.length; ++i)
                        $root.perfetto.protos.ReadBuffersResponse.Slice.encode(m.slices[i], w.uint32(18).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified ReadBuffersResponse message, length delimited. Does not implicitly {@link perfetto.protos.ReadBuffersResponse.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ReadBuffersResponse
             * @static
             * @param {perfetto.protos.IReadBuffersResponse} message ReadBuffersResponse message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ReadBuffersResponse.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ReadBuffersResponse message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ReadBuffersResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ReadBuffersResponse} ReadBuffersResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ReadBuffersResponse.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ReadBuffersResponse();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 2:
                        if (!(m.slices && m.slices.length))
                            m.slices = [];
                        m.slices.push($root.perfetto.protos.ReadBuffersResponse.Slice.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ReadBuffersResponse message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ReadBuffersResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ReadBuffersResponse} ReadBuffersResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ReadBuffersResponse.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ReadBuffersResponse message.
             * @function verify
             * @memberof perfetto.protos.ReadBuffersResponse
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ReadBuffersResponse.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.slices != null && m.hasOwnProperty("slices")) {
                    if (!Array.isArray(m.slices))
                        return "slices: array expected";
                    for (var i = 0; i < m.slices.length; ++i) {
                        {
                            var e = $root.perfetto.protos.ReadBuffersResponse.Slice.verify(m.slices[i]);
                            if (e)
                                return "slices." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a ReadBuffersResponse message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ReadBuffersResponse
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ReadBuffersResponse} ReadBuffersResponse
             */
            ReadBuffersResponse.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ReadBuffersResponse)
                    return d;
                var m = new $root.perfetto.protos.ReadBuffersResponse();
                if (d.slices) {
                    if (!Array.isArray(d.slices))
                        throw TypeError(".perfetto.protos.ReadBuffersResponse.slices: array expected");
                    m.slices = [];
                    for (var i = 0; i < d.slices.length; ++i) {
                        if (typeof d.slices[i] !== "object")
                            throw TypeError(".perfetto.protos.ReadBuffersResponse.slices: object expected");
                        m.slices[i] = $root.perfetto.protos.ReadBuffersResponse.Slice.fromObject(d.slices[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a ReadBuffersResponse message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ReadBuffersResponse
             * @static
             * @param {perfetto.protos.ReadBuffersResponse} m ReadBuffersResponse
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ReadBuffersResponse.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.slices = [];
                }
                if (m.slices && m.slices.length) {
                    d.slices = [];
                    for (var j = 0; j < m.slices.length; ++j) {
                        d.slices[j] = $root.perfetto.protos.ReadBuffersResponse.Slice.toObject(m.slices[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this ReadBuffersResponse to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ReadBuffersResponse
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ReadBuffersResponse.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            ReadBuffersResponse.Slice = (function() {

                /**
                 * Properties of a Slice.
                 * @memberof perfetto.protos.ReadBuffersResponse
                 * @interface ISlice
                 * @property {Uint8Array|null} [data] Slice data
                 * @property {boolean|null} [lastSliceForPacket] Slice lastSliceForPacket
                 */

                /**
                 * Constructs a new Slice.
                 * @memberof perfetto.protos.ReadBuffersResponse
                 * @classdesc Represents a Slice.
                 * @implements ISlice
                 * @constructor
                 * @param {perfetto.protos.ReadBuffersResponse.ISlice=} [p] Properties to set
                 */
                function Slice(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Slice data.
                 * @member {Uint8Array} data
                 * @memberof perfetto.protos.ReadBuffersResponse.Slice
                 * @instance
                 */
                Slice.prototype.data = $util.newBuffer([]);

                /**
                 * Slice lastSliceForPacket.
                 * @member {boolean} lastSliceForPacket
                 * @memberof perfetto.protos.ReadBuffersResponse.Slice
                 * @instance
                 */
                Slice.prototype.lastSliceForPacket = false;

                /**
                 * Creates a new Slice instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.ReadBuffersResponse.Slice
                 * @static
                 * @param {perfetto.protos.ReadBuffersResponse.ISlice=} [properties] Properties to set
                 * @returns {perfetto.protos.ReadBuffersResponse.Slice} Slice instance
                 */
                Slice.create = function create(properties) {
                    return new Slice(properties);
                };

                /**
                 * Encodes the specified Slice message. Does not implicitly {@link perfetto.protos.ReadBuffersResponse.Slice.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.ReadBuffersResponse.Slice
                 * @static
                 * @param {perfetto.protos.ReadBuffersResponse.ISlice} m Slice message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Slice.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.data != null && Object.hasOwnProperty.call(m, "data"))
                        w.uint32(10).bytes(m.data);
                    if (m.lastSliceForPacket != null && Object.hasOwnProperty.call(m, "lastSliceForPacket"))
                        w.uint32(16).bool(m.lastSliceForPacket);
                    return w;
                };

                /**
                 * Encodes the specified Slice message, length delimited. Does not implicitly {@link perfetto.protos.ReadBuffersResponse.Slice.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.ReadBuffersResponse.Slice
                 * @static
                 * @param {perfetto.protos.ReadBuffersResponse.ISlice} message Slice message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Slice.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Slice message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.ReadBuffersResponse.Slice
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.ReadBuffersResponse.Slice} Slice
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Slice.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ReadBuffersResponse.Slice();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.data = r.bytes();
                            break;
                        case 2:
                            m.lastSliceForPacket = r.bool();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Slice message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.ReadBuffersResponse.Slice
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.ReadBuffersResponse.Slice} Slice
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Slice.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Slice message.
                 * @function verify
                 * @memberof perfetto.protos.ReadBuffersResponse.Slice
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Slice.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.data != null && m.hasOwnProperty("data")) {
                        if (!(m.data && typeof m.data.length === "number" || $util.isString(m.data)))
                            return "data: buffer expected";
                    }
                    if (m.lastSliceForPacket != null && m.hasOwnProperty("lastSliceForPacket")) {
                        if (typeof m.lastSliceForPacket !== "boolean")
                            return "lastSliceForPacket: boolean expected";
                    }
                    return null;
                };

                /**
                 * Creates a Slice message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.ReadBuffersResponse.Slice
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.ReadBuffersResponse.Slice} Slice
                 */
                Slice.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.ReadBuffersResponse.Slice)
                        return d;
                    var m = new $root.perfetto.protos.ReadBuffersResponse.Slice();
                    if (d.data != null) {
                        if (typeof d.data === "string")
                            $util.base64.decode(d.data, m.data = $util.newBuffer($util.base64.length(d.data)), 0);
                        else if (d.data.length)
                            m.data = d.data;
                    }
                    if (d.lastSliceForPacket != null) {
                        m.lastSliceForPacket = Boolean(d.lastSliceForPacket);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Slice message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.ReadBuffersResponse.Slice
                 * @static
                 * @param {perfetto.protos.ReadBuffersResponse.Slice} m Slice
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Slice.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if (o.bytes === String)
                            d.data = "";
                        else {
                            d.data = [];
                            if (o.bytes !== Array)
                                d.data = $util.newBuffer(d.data);
                        }
                        d.lastSliceForPacket = false;
                    }
                    if (m.data != null && m.hasOwnProperty("data")) {
                        d.data = o.bytes === String ? $util.base64.encode(m.data, 0, m.data.length) : o.bytes === Array ? Array.prototype.slice.call(m.data) : m.data;
                    }
                    if (m.lastSliceForPacket != null && m.hasOwnProperty("lastSliceForPacket")) {
                        d.lastSliceForPacket = m.lastSliceForPacket;
                    }
                    return d;
                };

                /**
                 * Converts this Slice to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.ReadBuffersResponse.Slice
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Slice.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Slice;
            })();

            return ReadBuffersResponse;
        })();

        protos.FreeBuffersRequest = (function() {

            /**
             * Properties of a FreeBuffersRequest.
             * @memberof perfetto.protos
             * @interface IFreeBuffersRequest
             * @property {Array.<number>|null} [bufferIds] FreeBuffersRequest bufferIds
             */

            /**
             * Constructs a new FreeBuffersRequest.
             * @memberof perfetto.protos
             * @classdesc Represents a FreeBuffersRequest.
             * @implements IFreeBuffersRequest
             * @constructor
             * @param {perfetto.protos.IFreeBuffersRequest=} [p] Properties to set
             */
            function FreeBuffersRequest(p) {
                this.bufferIds = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * FreeBuffersRequest bufferIds.
             * @member {Array.<number>} bufferIds
             * @memberof perfetto.protos.FreeBuffersRequest
             * @instance
             */
            FreeBuffersRequest.prototype.bufferIds = $util.emptyArray;

            /**
             * Creates a new FreeBuffersRequest instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.FreeBuffersRequest
             * @static
             * @param {perfetto.protos.IFreeBuffersRequest=} [properties] Properties to set
             * @returns {perfetto.protos.FreeBuffersRequest} FreeBuffersRequest instance
             */
            FreeBuffersRequest.create = function create(properties) {
                return new FreeBuffersRequest(properties);
            };

            /**
             * Encodes the specified FreeBuffersRequest message. Does not implicitly {@link perfetto.protos.FreeBuffersRequest.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.FreeBuffersRequest
             * @static
             * @param {perfetto.protos.IFreeBuffersRequest} m FreeBuffersRequest message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FreeBuffersRequest.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.bufferIds != null && m.bufferIds.length) {
                    for (var i = 0; i < m.bufferIds.length; ++i)
                        w.uint32(8).uint32(m.bufferIds[i]);
                }
                return w;
            };

            /**
             * Encodes the specified FreeBuffersRequest message, length delimited. Does not implicitly {@link perfetto.protos.FreeBuffersRequest.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.FreeBuffersRequest
             * @static
             * @param {perfetto.protos.IFreeBuffersRequest} message FreeBuffersRequest message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FreeBuffersRequest.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a FreeBuffersRequest message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.FreeBuffersRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.FreeBuffersRequest} FreeBuffersRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FreeBuffersRequest.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FreeBuffersRequest();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.bufferIds && m.bufferIds.length))
                            m.bufferIds = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.bufferIds.push(r.uint32());
                        } else
                            m.bufferIds.push(r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a FreeBuffersRequest message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.FreeBuffersRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.FreeBuffersRequest} FreeBuffersRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FreeBuffersRequest.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a FreeBuffersRequest message.
             * @function verify
             * @memberof perfetto.protos.FreeBuffersRequest
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            FreeBuffersRequest.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.bufferIds != null && m.hasOwnProperty("bufferIds")) {
                    if (!Array.isArray(m.bufferIds))
                        return "bufferIds: array expected";
                    for (var i = 0; i < m.bufferIds.length; ++i) {
                        if (!$util.isInteger(m.bufferIds[i]))
                            return "bufferIds: integer[] expected";
                    }
                }
                return null;
            };

            /**
             * Creates a FreeBuffersRequest message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.FreeBuffersRequest
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.FreeBuffersRequest} FreeBuffersRequest
             */
            FreeBuffersRequest.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.FreeBuffersRequest)
                    return d;
                var m = new $root.perfetto.protos.FreeBuffersRequest();
                if (d.bufferIds) {
                    if (!Array.isArray(d.bufferIds))
                        throw TypeError(".perfetto.protos.FreeBuffersRequest.bufferIds: array expected");
                    m.bufferIds = [];
                    for (var i = 0; i < d.bufferIds.length; ++i) {
                        m.bufferIds[i] = d.bufferIds[i] >>> 0;
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a FreeBuffersRequest message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.FreeBuffersRequest
             * @static
             * @param {perfetto.protos.FreeBuffersRequest} m FreeBuffersRequest
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            FreeBuffersRequest.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.bufferIds = [];
                }
                if (m.bufferIds && m.bufferIds.length) {
                    d.bufferIds = [];
                    for (var j = 0; j < m.bufferIds.length; ++j) {
                        d.bufferIds[j] = m.bufferIds[j];
                    }
                }
                return d;
            };

            /**
             * Converts this FreeBuffersRequest to JSON.
             * @function toJSON
             * @memberof perfetto.protos.FreeBuffersRequest
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            FreeBuffersRequest.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return FreeBuffersRequest;
        })();

        protos.FreeBuffersResponse = (function() {

            /**
             * Properties of a FreeBuffersResponse.
             * @memberof perfetto.protos
             * @interface IFreeBuffersResponse
             */

            /**
             * Constructs a new FreeBuffersResponse.
             * @memberof perfetto.protos
             * @classdesc Represents a FreeBuffersResponse.
             * @implements IFreeBuffersResponse
             * @constructor
             * @param {perfetto.protos.IFreeBuffersResponse=} [p] Properties to set
             */
            function FreeBuffersResponse(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Creates a new FreeBuffersResponse instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.FreeBuffersResponse
             * @static
             * @param {perfetto.protos.IFreeBuffersResponse=} [properties] Properties to set
             * @returns {perfetto.protos.FreeBuffersResponse} FreeBuffersResponse instance
             */
            FreeBuffersResponse.create = function create(properties) {
                return new FreeBuffersResponse(properties);
            };

            /**
             * Encodes the specified FreeBuffersResponse message. Does not implicitly {@link perfetto.protos.FreeBuffersResponse.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.FreeBuffersResponse
             * @static
             * @param {perfetto.protos.IFreeBuffersResponse} m FreeBuffersResponse message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FreeBuffersResponse.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                return w;
            };

            /**
             * Encodes the specified FreeBuffersResponse message, length delimited. Does not implicitly {@link perfetto.protos.FreeBuffersResponse.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.FreeBuffersResponse
             * @static
             * @param {perfetto.protos.IFreeBuffersResponse} message FreeBuffersResponse message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FreeBuffersResponse.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a FreeBuffersResponse message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.FreeBuffersResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.FreeBuffersResponse} FreeBuffersResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FreeBuffersResponse.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FreeBuffersResponse();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a FreeBuffersResponse message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.FreeBuffersResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.FreeBuffersResponse} FreeBuffersResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FreeBuffersResponse.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a FreeBuffersResponse message.
             * @function verify
             * @memberof perfetto.protos.FreeBuffersResponse
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            FreeBuffersResponse.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates a FreeBuffersResponse message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.FreeBuffersResponse
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.FreeBuffersResponse} FreeBuffersResponse
             */
            FreeBuffersResponse.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.FreeBuffersResponse)
                    return d;
                return new $root.perfetto.protos.FreeBuffersResponse();
            };

            /**
             * Creates a plain object from a FreeBuffersResponse message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.FreeBuffersResponse
             * @static
             * @param {perfetto.protos.FreeBuffersResponse} m FreeBuffersResponse
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            FreeBuffersResponse.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this FreeBuffersResponse to JSON.
             * @function toJSON
             * @memberof perfetto.protos.FreeBuffersResponse
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            FreeBuffersResponse.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return FreeBuffersResponse;
        })();

        protos.FlushRequest = (function() {

            /**
             * Properties of a FlushRequest.
             * @memberof perfetto.protos
             * @interface IFlushRequest
             * @property {number|null} [timeoutMs] FlushRequest timeoutMs
             */

            /**
             * Constructs a new FlushRequest.
             * @memberof perfetto.protos
             * @classdesc Represents a FlushRequest.
             * @implements IFlushRequest
             * @constructor
             * @param {perfetto.protos.IFlushRequest=} [p] Properties to set
             */
            function FlushRequest(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * FlushRequest timeoutMs.
             * @member {number} timeoutMs
             * @memberof perfetto.protos.FlushRequest
             * @instance
             */
            FlushRequest.prototype.timeoutMs = 0;

            /**
             * Creates a new FlushRequest instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.FlushRequest
             * @static
             * @param {perfetto.protos.IFlushRequest=} [properties] Properties to set
             * @returns {perfetto.protos.FlushRequest} FlushRequest instance
             */
            FlushRequest.create = function create(properties) {
                return new FlushRequest(properties);
            };

            /**
             * Encodes the specified FlushRequest message. Does not implicitly {@link perfetto.protos.FlushRequest.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.FlushRequest
             * @static
             * @param {perfetto.protos.IFlushRequest} m FlushRequest message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FlushRequest.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.timeoutMs != null && Object.hasOwnProperty.call(m, "timeoutMs"))
                    w.uint32(8).uint32(m.timeoutMs);
                return w;
            };

            /**
             * Encodes the specified FlushRequest message, length delimited. Does not implicitly {@link perfetto.protos.FlushRequest.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.FlushRequest
             * @static
             * @param {perfetto.protos.IFlushRequest} message FlushRequest message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FlushRequest.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a FlushRequest message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.FlushRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.FlushRequest} FlushRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FlushRequest.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FlushRequest();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.timeoutMs = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a FlushRequest message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.FlushRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.FlushRequest} FlushRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FlushRequest.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a FlushRequest message.
             * @function verify
             * @memberof perfetto.protos.FlushRequest
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            FlushRequest.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.timeoutMs != null && m.hasOwnProperty("timeoutMs")) {
                    if (!$util.isInteger(m.timeoutMs))
                        return "timeoutMs: integer expected";
                }
                return null;
            };

            /**
             * Creates a FlushRequest message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.FlushRequest
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.FlushRequest} FlushRequest
             */
            FlushRequest.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.FlushRequest)
                    return d;
                var m = new $root.perfetto.protos.FlushRequest();
                if (d.timeoutMs != null) {
                    m.timeoutMs = d.timeoutMs >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a FlushRequest message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.FlushRequest
             * @static
             * @param {perfetto.protos.FlushRequest} m FlushRequest
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            FlushRequest.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.timeoutMs = 0;
                }
                if (m.timeoutMs != null && m.hasOwnProperty("timeoutMs")) {
                    d.timeoutMs = m.timeoutMs;
                }
                return d;
            };

            /**
             * Converts this FlushRequest to JSON.
             * @function toJSON
             * @memberof perfetto.protos.FlushRequest
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            FlushRequest.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return FlushRequest;
        })();

        protos.FlushResponse = (function() {

            /**
             * Properties of a FlushResponse.
             * @memberof perfetto.protos
             * @interface IFlushResponse
             */

            /**
             * Constructs a new FlushResponse.
             * @memberof perfetto.protos
             * @classdesc Represents a FlushResponse.
             * @implements IFlushResponse
             * @constructor
             * @param {perfetto.protos.IFlushResponse=} [p] Properties to set
             */
            function FlushResponse(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Creates a new FlushResponse instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.FlushResponse
             * @static
             * @param {perfetto.protos.IFlushResponse=} [properties] Properties to set
             * @returns {perfetto.protos.FlushResponse} FlushResponse instance
             */
            FlushResponse.create = function create(properties) {
                return new FlushResponse(properties);
            };

            /**
             * Encodes the specified FlushResponse message. Does not implicitly {@link perfetto.protos.FlushResponse.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.FlushResponse
             * @static
             * @param {perfetto.protos.IFlushResponse} m FlushResponse message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FlushResponse.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                return w;
            };

            /**
             * Encodes the specified FlushResponse message, length delimited. Does not implicitly {@link perfetto.protos.FlushResponse.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.FlushResponse
             * @static
             * @param {perfetto.protos.IFlushResponse} message FlushResponse message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FlushResponse.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a FlushResponse message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.FlushResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.FlushResponse} FlushResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FlushResponse.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FlushResponse();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a FlushResponse message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.FlushResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.FlushResponse} FlushResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FlushResponse.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a FlushResponse message.
             * @function verify
             * @memberof perfetto.protos.FlushResponse
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            FlushResponse.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates a FlushResponse message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.FlushResponse
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.FlushResponse} FlushResponse
             */
            FlushResponse.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.FlushResponse)
                    return d;
                return new $root.perfetto.protos.FlushResponse();
            };

            /**
             * Creates a plain object from a FlushResponse message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.FlushResponse
             * @static
             * @param {perfetto.protos.FlushResponse} m FlushResponse
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            FlushResponse.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this FlushResponse to JSON.
             * @function toJSON
             * @memberof perfetto.protos.FlushResponse
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            FlushResponse.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return FlushResponse;
        })();

        protos.DetachRequest = (function() {

            /**
             * Properties of a DetachRequest.
             * @memberof perfetto.protos
             * @interface IDetachRequest
             * @property {string|null} [key] DetachRequest key
             */

            /**
             * Constructs a new DetachRequest.
             * @memberof perfetto.protos
             * @classdesc Represents a DetachRequest.
             * @implements IDetachRequest
             * @constructor
             * @param {perfetto.protos.IDetachRequest=} [p] Properties to set
             */
            function DetachRequest(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DetachRequest key.
             * @member {string} key
             * @memberof perfetto.protos.DetachRequest
             * @instance
             */
            DetachRequest.prototype.key = "";

            /**
             * Creates a new DetachRequest instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DetachRequest
             * @static
             * @param {perfetto.protos.IDetachRequest=} [properties] Properties to set
             * @returns {perfetto.protos.DetachRequest} DetachRequest instance
             */
            DetachRequest.create = function create(properties) {
                return new DetachRequest(properties);
            };

            /**
             * Encodes the specified DetachRequest message. Does not implicitly {@link perfetto.protos.DetachRequest.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DetachRequest
             * @static
             * @param {perfetto.protos.IDetachRequest} m DetachRequest message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DetachRequest.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.key != null && Object.hasOwnProperty.call(m, "key"))
                    w.uint32(10).string(m.key);
                return w;
            };

            /**
             * Encodes the specified DetachRequest message, length delimited. Does not implicitly {@link perfetto.protos.DetachRequest.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DetachRequest
             * @static
             * @param {perfetto.protos.IDetachRequest} message DetachRequest message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DetachRequest.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DetachRequest message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DetachRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DetachRequest} DetachRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DetachRequest.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DetachRequest();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.key = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DetachRequest message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DetachRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DetachRequest} DetachRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DetachRequest.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DetachRequest message.
             * @function verify
             * @memberof perfetto.protos.DetachRequest
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DetachRequest.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.key != null && m.hasOwnProperty("key")) {
                    if (!$util.isString(m.key))
                        return "key: string expected";
                }
                return null;
            };

            /**
             * Creates a DetachRequest message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DetachRequest
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DetachRequest} DetachRequest
             */
            DetachRequest.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DetachRequest)
                    return d;
                var m = new $root.perfetto.protos.DetachRequest();
                if (d.key != null) {
                    m.key = String(d.key);
                }
                return m;
            };

            /**
             * Creates a plain object from a DetachRequest message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DetachRequest
             * @static
             * @param {perfetto.protos.DetachRequest} m DetachRequest
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DetachRequest.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.key = "";
                }
                if (m.key != null && m.hasOwnProperty("key")) {
                    d.key = m.key;
                }
                return d;
            };

            /**
             * Converts this DetachRequest to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DetachRequest
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DetachRequest.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DetachRequest;
        })();

        protos.DetachResponse = (function() {

            /**
             * Properties of a DetachResponse.
             * @memberof perfetto.protos
             * @interface IDetachResponse
             */

            /**
             * Constructs a new DetachResponse.
             * @memberof perfetto.protos
             * @classdesc Represents a DetachResponse.
             * @implements IDetachResponse
             * @constructor
             * @param {perfetto.protos.IDetachResponse=} [p] Properties to set
             */
            function DetachResponse(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Creates a new DetachResponse instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DetachResponse
             * @static
             * @param {perfetto.protos.IDetachResponse=} [properties] Properties to set
             * @returns {perfetto.protos.DetachResponse} DetachResponse instance
             */
            DetachResponse.create = function create(properties) {
                return new DetachResponse(properties);
            };

            /**
             * Encodes the specified DetachResponse message. Does not implicitly {@link perfetto.protos.DetachResponse.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DetachResponse
             * @static
             * @param {perfetto.protos.IDetachResponse} m DetachResponse message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DetachResponse.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                return w;
            };

            /**
             * Encodes the specified DetachResponse message, length delimited. Does not implicitly {@link perfetto.protos.DetachResponse.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DetachResponse
             * @static
             * @param {perfetto.protos.IDetachResponse} message DetachResponse message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DetachResponse.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DetachResponse message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DetachResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DetachResponse} DetachResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DetachResponse.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DetachResponse();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DetachResponse message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DetachResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DetachResponse} DetachResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DetachResponse.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DetachResponse message.
             * @function verify
             * @memberof perfetto.protos.DetachResponse
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DetachResponse.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates a DetachResponse message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DetachResponse
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DetachResponse} DetachResponse
             */
            DetachResponse.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DetachResponse)
                    return d;
                return new $root.perfetto.protos.DetachResponse();
            };

            /**
             * Creates a plain object from a DetachResponse message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DetachResponse
             * @static
             * @param {perfetto.protos.DetachResponse} m DetachResponse
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DetachResponse.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this DetachResponse to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DetachResponse
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DetachResponse.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DetachResponse;
        })();

        protos.AttachRequest = (function() {

            /**
             * Properties of an AttachRequest.
             * @memberof perfetto.protos
             * @interface IAttachRequest
             * @property {string|null} [key] AttachRequest key
             */

            /**
             * Constructs a new AttachRequest.
             * @memberof perfetto.protos
             * @classdesc Represents an AttachRequest.
             * @implements IAttachRequest
             * @constructor
             * @param {perfetto.protos.IAttachRequest=} [p] Properties to set
             */
            function AttachRequest(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AttachRequest key.
             * @member {string} key
             * @memberof perfetto.protos.AttachRequest
             * @instance
             */
            AttachRequest.prototype.key = "";

            /**
             * Creates a new AttachRequest instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AttachRequest
             * @static
             * @param {perfetto.protos.IAttachRequest=} [properties] Properties to set
             * @returns {perfetto.protos.AttachRequest} AttachRequest instance
             */
            AttachRequest.create = function create(properties) {
                return new AttachRequest(properties);
            };

            /**
             * Encodes the specified AttachRequest message. Does not implicitly {@link perfetto.protos.AttachRequest.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AttachRequest
             * @static
             * @param {perfetto.protos.IAttachRequest} m AttachRequest message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AttachRequest.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.key != null && Object.hasOwnProperty.call(m, "key"))
                    w.uint32(10).string(m.key);
                return w;
            };

            /**
             * Encodes the specified AttachRequest message, length delimited. Does not implicitly {@link perfetto.protos.AttachRequest.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AttachRequest
             * @static
             * @param {perfetto.protos.IAttachRequest} message AttachRequest message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AttachRequest.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AttachRequest message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AttachRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AttachRequest} AttachRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AttachRequest.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AttachRequest();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.key = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AttachRequest message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AttachRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AttachRequest} AttachRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AttachRequest.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AttachRequest message.
             * @function verify
             * @memberof perfetto.protos.AttachRequest
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AttachRequest.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.key != null && m.hasOwnProperty("key")) {
                    if (!$util.isString(m.key))
                        return "key: string expected";
                }
                return null;
            };

            /**
             * Creates an AttachRequest message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AttachRequest
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AttachRequest} AttachRequest
             */
            AttachRequest.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AttachRequest)
                    return d;
                var m = new $root.perfetto.protos.AttachRequest();
                if (d.key != null) {
                    m.key = String(d.key);
                }
                return m;
            };

            /**
             * Creates a plain object from an AttachRequest message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AttachRequest
             * @static
             * @param {perfetto.protos.AttachRequest} m AttachRequest
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AttachRequest.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.key = "";
                }
                if (m.key != null && m.hasOwnProperty("key")) {
                    d.key = m.key;
                }
                return d;
            };

            /**
             * Converts this AttachRequest to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AttachRequest
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AttachRequest.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AttachRequest;
        })();

        protos.AttachResponse = (function() {

            /**
             * Properties of an AttachResponse.
             * @memberof perfetto.protos
             * @interface IAttachResponse
             * @property {perfetto.protos.ITraceConfig|null} [traceConfig] AttachResponse traceConfig
             */

            /**
             * Constructs a new AttachResponse.
             * @memberof perfetto.protos
             * @classdesc Represents an AttachResponse.
             * @implements IAttachResponse
             * @constructor
             * @param {perfetto.protos.IAttachResponse=} [p] Properties to set
             */
            function AttachResponse(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AttachResponse traceConfig.
             * @member {perfetto.protos.ITraceConfig|null|undefined} traceConfig
             * @memberof perfetto.protos.AttachResponse
             * @instance
             */
            AttachResponse.prototype.traceConfig = null;

            /**
             * Creates a new AttachResponse instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AttachResponse
             * @static
             * @param {perfetto.protos.IAttachResponse=} [properties] Properties to set
             * @returns {perfetto.protos.AttachResponse} AttachResponse instance
             */
            AttachResponse.create = function create(properties) {
                return new AttachResponse(properties);
            };

            /**
             * Encodes the specified AttachResponse message. Does not implicitly {@link perfetto.protos.AttachResponse.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AttachResponse
             * @static
             * @param {perfetto.protos.IAttachResponse} m AttachResponse message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AttachResponse.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.traceConfig != null && Object.hasOwnProperty.call(m, "traceConfig"))
                    $root.perfetto.protos.TraceConfig.encode(m.traceConfig, w.uint32(10).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified AttachResponse message, length delimited. Does not implicitly {@link perfetto.protos.AttachResponse.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AttachResponse
             * @static
             * @param {perfetto.protos.IAttachResponse} message AttachResponse message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AttachResponse.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AttachResponse message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AttachResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AttachResponse} AttachResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AttachResponse.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AttachResponse();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.traceConfig = $root.perfetto.protos.TraceConfig.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AttachResponse message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AttachResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AttachResponse} AttachResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AttachResponse.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AttachResponse message.
             * @function verify
             * @memberof perfetto.protos.AttachResponse
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AttachResponse.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.traceConfig != null && m.hasOwnProperty("traceConfig")) {
                    {
                        var e = $root.perfetto.protos.TraceConfig.verify(m.traceConfig);
                        if (e)
                            return "traceConfig." + e;
                    }
                }
                return null;
            };

            /**
             * Creates an AttachResponse message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AttachResponse
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AttachResponse} AttachResponse
             */
            AttachResponse.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AttachResponse)
                    return d;
                var m = new $root.perfetto.protos.AttachResponse();
                if (d.traceConfig != null) {
                    if (typeof d.traceConfig !== "object")
                        throw TypeError(".perfetto.protos.AttachResponse.traceConfig: object expected");
                    m.traceConfig = $root.perfetto.protos.TraceConfig.fromObject(d.traceConfig);
                }
                return m;
            };

            /**
             * Creates a plain object from an AttachResponse message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AttachResponse
             * @static
             * @param {perfetto.protos.AttachResponse} m AttachResponse
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AttachResponse.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.traceConfig = null;
                }
                if (m.traceConfig != null && m.hasOwnProperty("traceConfig")) {
                    d.traceConfig = $root.perfetto.protos.TraceConfig.toObject(m.traceConfig, o);
                }
                return d;
            };

            /**
             * Converts this AttachResponse to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AttachResponse
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AttachResponse.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AttachResponse;
        })();

        protos.GetTraceStatsRequest = (function() {

            /**
             * Properties of a GetTraceStatsRequest.
             * @memberof perfetto.protos
             * @interface IGetTraceStatsRequest
             */

            /**
             * Constructs a new GetTraceStatsRequest.
             * @memberof perfetto.protos
             * @classdesc Represents a GetTraceStatsRequest.
             * @implements IGetTraceStatsRequest
             * @constructor
             * @param {perfetto.protos.IGetTraceStatsRequest=} [p] Properties to set
             */
            function GetTraceStatsRequest(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Creates a new GetTraceStatsRequest instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.GetTraceStatsRequest
             * @static
             * @param {perfetto.protos.IGetTraceStatsRequest=} [properties] Properties to set
             * @returns {perfetto.protos.GetTraceStatsRequest} GetTraceStatsRequest instance
             */
            GetTraceStatsRequest.create = function create(properties) {
                return new GetTraceStatsRequest(properties);
            };

            /**
             * Encodes the specified GetTraceStatsRequest message. Does not implicitly {@link perfetto.protos.GetTraceStatsRequest.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.GetTraceStatsRequest
             * @static
             * @param {perfetto.protos.IGetTraceStatsRequest} m GetTraceStatsRequest message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GetTraceStatsRequest.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                return w;
            };

            /**
             * Encodes the specified GetTraceStatsRequest message, length delimited. Does not implicitly {@link perfetto.protos.GetTraceStatsRequest.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.GetTraceStatsRequest
             * @static
             * @param {perfetto.protos.IGetTraceStatsRequest} message GetTraceStatsRequest message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GetTraceStatsRequest.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a GetTraceStatsRequest message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.GetTraceStatsRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.GetTraceStatsRequest} GetTraceStatsRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GetTraceStatsRequest.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.GetTraceStatsRequest();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a GetTraceStatsRequest message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.GetTraceStatsRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.GetTraceStatsRequest} GetTraceStatsRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GetTraceStatsRequest.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a GetTraceStatsRequest message.
             * @function verify
             * @memberof perfetto.protos.GetTraceStatsRequest
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            GetTraceStatsRequest.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates a GetTraceStatsRequest message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.GetTraceStatsRequest
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.GetTraceStatsRequest} GetTraceStatsRequest
             */
            GetTraceStatsRequest.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.GetTraceStatsRequest)
                    return d;
                return new $root.perfetto.protos.GetTraceStatsRequest();
            };

            /**
             * Creates a plain object from a GetTraceStatsRequest message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.GetTraceStatsRequest
             * @static
             * @param {perfetto.protos.GetTraceStatsRequest} m GetTraceStatsRequest
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            GetTraceStatsRequest.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this GetTraceStatsRequest to JSON.
             * @function toJSON
             * @memberof perfetto.protos.GetTraceStatsRequest
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            GetTraceStatsRequest.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return GetTraceStatsRequest;
        })();

        protos.GetTraceStatsResponse = (function() {

            /**
             * Properties of a GetTraceStatsResponse.
             * @memberof perfetto.protos
             * @interface IGetTraceStatsResponse
             * @property {perfetto.protos.ITraceStats|null} [traceStats] GetTraceStatsResponse traceStats
             */

            /**
             * Constructs a new GetTraceStatsResponse.
             * @memberof perfetto.protos
             * @classdesc Represents a GetTraceStatsResponse.
             * @implements IGetTraceStatsResponse
             * @constructor
             * @param {perfetto.protos.IGetTraceStatsResponse=} [p] Properties to set
             */
            function GetTraceStatsResponse(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * GetTraceStatsResponse traceStats.
             * @member {perfetto.protos.ITraceStats|null|undefined} traceStats
             * @memberof perfetto.protos.GetTraceStatsResponse
             * @instance
             */
            GetTraceStatsResponse.prototype.traceStats = null;

            /**
             * Creates a new GetTraceStatsResponse instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.GetTraceStatsResponse
             * @static
             * @param {perfetto.protos.IGetTraceStatsResponse=} [properties] Properties to set
             * @returns {perfetto.protos.GetTraceStatsResponse} GetTraceStatsResponse instance
             */
            GetTraceStatsResponse.create = function create(properties) {
                return new GetTraceStatsResponse(properties);
            };

            /**
             * Encodes the specified GetTraceStatsResponse message. Does not implicitly {@link perfetto.protos.GetTraceStatsResponse.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.GetTraceStatsResponse
             * @static
             * @param {perfetto.protos.IGetTraceStatsResponse} m GetTraceStatsResponse message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GetTraceStatsResponse.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.traceStats != null && Object.hasOwnProperty.call(m, "traceStats"))
                    $root.perfetto.protos.TraceStats.encode(m.traceStats, w.uint32(10).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified GetTraceStatsResponse message, length delimited. Does not implicitly {@link perfetto.protos.GetTraceStatsResponse.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.GetTraceStatsResponse
             * @static
             * @param {perfetto.protos.IGetTraceStatsResponse} message GetTraceStatsResponse message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GetTraceStatsResponse.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a GetTraceStatsResponse message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.GetTraceStatsResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.GetTraceStatsResponse} GetTraceStatsResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GetTraceStatsResponse.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.GetTraceStatsResponse();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.traceStats = $root.perfetto.protos.TraceStats.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a GetTraceStatsResponse message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.GetTraceStatsResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.GetTraceStatsResponse} GetTraceStatsResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GetTraceStatsResponse.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a GetTraceStatsResponse message.
             * @function verify
             * @memberof perfetto.protos.GetTraceStatsResponse
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            GetTraceStatsResponse.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.traceStats != null && m.hasOwnProperty("traceStats")) {
                    {
                        var e = $root.perfetto.protos.TraceStats.verify(m.traceStats);
                        if (e)
                            return "traceStats." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a GetTraceStatsResponse message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.GetTraceStatsResponse
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.GetTraceStatsResponse} GetTraceStatsResponse
             */
            GetTraceStatsResponse.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.GetTraceStatsResponse)
                    return d;
                var m = new $root.perfetto.protos.GetTraceStatsResponse();
                if (d.traceStats != null) {
                    if (typeof d.traceStats !== "object")
                        throw TypeError(".perfetto.protos.GetTraceStatsResponse.traceStats: object expected");
                    m.traceStats = $root.perfetto.protos.TraceStats.fromObject(d.traceStats);
                }
                return m;
            };

            /**
             * Creates a plain object from a GetTraceStatsResponse message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.GetTraceStatsResponse
             * @static
             * @param {perfetto.protos.GetTraceStatsResponse} m GetTraceStatsResponse
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            GetTraceStatsResponse.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.traceStats = null;
                }
                if (m.traceStats != null && m.hasOwnProperty("traceStats")) {
                    d.traceStats = $root.perfetto.protos.TraceStats.toObject(m.traceStats, o);
                }
                return d;
            };

            /**
             * Converts this GetTraceStatsResponse to JSON.
             * @function toJSON
             * @memberof perfetto.protos.GetTraceStatsResponse
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            GetTraceStatsResponse.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return GetTraceStatsResponse;
        })();

        protos.ObserveEventsRequest = (function() {

            /**
             * Properties of an ObserveEventsRequest.
             * @memberof perfetto.protos
             * @interface IObserveEventsRequest
             * @property {Array.<perfetto.protos.ObservableEvents.Type>|null} [eventsToObserve] ObserveEventsRequest eventsToObserve
             */

            /**
             * Constructs a new ObserveEventsRequest.
             * @memberof perfetto.protos
             * @classdesc Represents an ObserveEventsRequest.
             * @implements IObserveEventsRequest
             * @constructor
             * @param {perfetto.protos.IObserveEventsRequest=} [p] Properties to set
             */
            function ObserveEventsRequest(p) {
                this.eventsToObserve = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ObserveEventsRequest eventsToObserve.
             * @member {Array.<perfetto.protos.ObservableEvents.Type>} eventsToObserve
             * @memberof perfetto.protos.ObserveEventsRequest
             * @instance
             */
            ObserveEventsRequest.prototype.eventsToObserve = $util.emptyArray;

            /**
             * Creates a new ObserveEventsRequest instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ObserveEventsRequest
             * @static
             * @param {perfetto.protos.IObserveEventsRequest=} [properties] Properties to set
             * @returns {perfetto.protos.ObserveEventsRequest} ObserveEventsRequest instance
             */
            ObserveEventsRequest.create = function create(properties) {
                return new ObserveEventsRequest(properties);
            };

            /**
             * Encodes the specified ObserveEventsRequest message. Does not implicitly {@link perfetto.protos.ObserveEventsRequest.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ObserveEventsRequest
             * @static
             * @param {perfetto.protos.IObserveEventsRequest} m ObserveEventsRequest message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ObserveEventsRequest.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.eventsToObserve != null && m.eventsToObserve.length) {
                    for (var i = 0; i < m.eventsToObserve.length; ++i)
                        w.uint32(8).int32(m.eventsToObserve[i]);
                }
                return w;
            };

            /**
             * Encodes the specified ObserveEventsRequest message, length delimited. Does not implicitly {@link perfetto.protos.ObserveEventsRequest.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ObserveEventsRequest
             * @static
             * @param {perfetto.protos.IObserveEventsRequest} message ObserveEventsRequest message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ObserveEventsRequest.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an ObserveEventsRequest message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ObserveEventsRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ObserveEventsRequest} ObserveEventsRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ObserveEventsRequest.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ObserveEventsRequest();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.eventsToObserve && m.eventsToObserve.length))
                            m.eventsToObserve = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.eventsToObserve.push(r.int32());
                        } else
                            m.eventsToObserve.push(r.int32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an ObserveEventsRequest message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ObserveEventsRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ObserveEventsRequest} ObserveEventsRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ObserveEventsRequest.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an ObserveEventsRequest message.
             * @function verify
             * @memberof perfetto.protos.ObserveEventsRequest
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ObserveEventsRequest.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.eventsToObserve != null && m.hasOwnProperty("eventsToObserve")) {
                    if (!Array.isArray(m.eventsToObserve))
                        return "eventsToObserve: array expected";
                    for (var i = 0; i < m.eventsToObserve.length; ++i) {
                        switch (m.eventsToObserve[i]) {
                        default:
                            return "eventsToObserve: enum value[] expected";
                        case 0:
                        case 1:
                        case 2:
                            break;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an ObserveEventsRequest message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ObserveEventsRequest
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ObserveEventsRequest} ObserveEventsRequest
             */
            ObserveEventsRequest.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ObserveEventsRequest)
                    return d;
                var m = new $root.perfetto.protos.ObserveEventsRequest();
                if (d.eventsToObserve) {
                    if (!Array.isArray(d.eventsToObserve))
                        throw TypeError(".perfetto.protos.ObserveEventsRequest.eventsToObserve: array expected");
                    m.eventsToObserve = [];
                    for (var i = 0; i < d.eventsToObserve.length; ++i) {
                        switch (d.eventsToObserve[i]) {
                        default:
                        case "TYPE_UNSPECIFIED":
                        case 0:
                            m.eventsToObserve[i] = 0;
                            break;
                        case "TYPE_DATA_SOURCES_INSTANCES":
                        case 1:
                            m.eventsToObserve[i] = 1;
                            break;
                        case "TYPE_ALL_DATA_SOURCES_STARTED":
                        case 2:
                            m.eventsToObserve[i] = 2;
                            break;
                        }
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an ObserveEventsRequest message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ObserveEventsRequest
             * @static
             * @param {perfetto.protos.ObserveEventsRequest} m ObserveEventsRequest
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ObserveEventsRequest.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.eventsToObserve = [];
                }
                if (m.eventsToObserve && m.eventsToObserve.length) {
                    d.eventsToObserve = [];
                    for (var j = 0; j < m.eventsToObserve.length; ++j) {
                        d.eventsToObserve[j] = o.enums === String ? $root.perfetto.protos.ObservableEvents.Type[m.eventsToObserve[j]] : m.eventsToObserve[j];
                    }
                }
                return d;
            };

            /**
             * Converts this ObserveEventsRequest to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ObserveEventsRequest
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ObserveEventsRequest.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ObserveEventsRequest;
        })();

        protos.ObserveEventsResponse = (function() {

            /**
             * Properties of an ObserveEventsResponse.
             * @memberof perfetto.protos
             * @interface IObserveEventsResponse
             * @property {perfetto.protos.IObservableEvents|null} [events] ObserveEventsResponse events
             */

            /**
             * Constructs a new ObserveEventsResponse.
             * @memberof perfetto.protos
             * @classdesc Represents an ObserveEventsResponse.
             * @implements IObserveEventsResponse
             * @constructor
             * @param {perfetto.protos.IObserveEventsResponse=} [p] Properties to set
             */
            function ObserveEventsResponse(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ObserveEventsResponse events.
             * @member {perfetto.protos.IObservableEvents|null|undefined} events
             * @memberof perfetto.protos.ObserveEventsResponse
             * @instance
             */
            ObserveEventsResponse.prototype.events = null;

            /**
             * Creates a new ObserveEventsResponse instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ObserveEventsResponse
             * @static
             * @param {perfetto.protos.IObserveEventsResponse=} [properties] Properties to set
             * @returns {perfetto.protos.ObserveEventsResponse} ObserveEventsResponse instance
             */
            ObserveEventsResponse.create = function create(properties) {
                return new ObserveEventsResponse(properties);
            };

            /**
             * Encodes the specified ObserveEventsResponse message. Does not implicitly {@link perfetto.protos.ObserveEventsResponse.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ObserveEventsResponse
             * @static
             * @param {perfetto.protos.IObserveEventsResponse} m ObserveEventsResponse message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ObserveEventsResponse.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.events != null && Object.hasOwnProperty.call(m, "events"))
                    $root.perfetto.protos.ObservableEvents.encode(m.events, w.uint32(10).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified ObserveEventsResponse message, length delimited. Does not implicitly {@link perfetto.protos.ObserveEventsResponse.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ObserveEventsResponse
             * @static
             * @param {perfetto.protos.IObserveEventsResponse} message ObserveEventsResponse message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ObserveEventsResponse.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an ObserveEventsResponse message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ObserveEventsResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ObserveEventsResponse} ObserveEventsResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ObserveEventsResponse.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ObserveEventsResponse();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.events = $root.perfetto.protos.ObservableEvents.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an ObserveEventsResponse message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ObserveEventsResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ObserveEventsResponse} ObserveEventsResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ObserveEventsResponse.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an ObserveEventsResponse message.
             * @function verify
             * @memberof perfetto.protos.ObserveEventsResponse
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ObserveEventsResponse.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.events != null && m.hasOwnProperty("events")) {
                    {
                        var e = $root.perfetto.protos.ObservableEvents.verify(m.events);
                        if (e)
                            return "events." + e;
                    }
                }
                return null;
            };

            /**
             * Creates an ObserveEventsResponse message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ObserveEventsResponse
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ObserveEventsResponse} ObserveEventsResponse
             */
            ObserveEventsResponse.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ObserveEventsResponse)
                    return d;
                var m = new $root.perfetto.protos.ObserveEventsResponse();
                if (d.events != null) {
                    if (typeof d.events !== "object")
                        throw TypeError(".perfetto.protos.ObserveEventsResponse.events: object expected");
                    m.events = $root.perfetto.protos.ObservableEvents.fromObject(d.events);
                }
                return m;
            };

            /**
             * Creates a plain object from an ObserveEventsResponse message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ObserveEventsResponse
             * @static
             * @param {perfetto.protos.ObserveEventsResponse} m ObserveEventsResponse
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ObserveEventsResponse.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.events = null;
                }
                if (m.events != null && m.hasOwnProperty("events")) {
                    d.events = $root.perfetto.protos.ObservableEvents.toObject(m.events, o);
                }
                return d;
            };

            /**
             * Converts this ObserveEventsResponse to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ObserveEventsResponse
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ObserveEventsResponse.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ObserveEventsResponse;
        })();

        protos.QueryServiceStateRequest = (function() {

            /**
             * Properties of a QueryServiceStateRequest.
             * @memberof perfetto.protos
             * @interface IQueryServiceStateRequest
             */

            /**
             * Constructs a new QueryServiceStateRequest.
             * @memberof perfetto.protos
             * @classdesc Represents a QueryServiceStateRequest.
             * @implements IQueryServiceStateRequest
             * @constructor
             * @param {perfetto.protos.IQueryServiceStateRequest=} [p] Properties to set
             */
            function QueryServiceStateRequest(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Creates a new QueryServiceStateRequest instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.QueryServiceStateRequest
             * @static
             * @param {perfetto.protos.IQueryServiceStateRequest=} [properties] Properties to set
             * @returns {perfetto.protos.QueryServiceStateRequest} QueryServiceStateRequest instance
             */
            QueryServiceStateRequest.create = function create(properties) {
                return new QueryServiceStateRequest(properties);
            };

            /**
             * Encodes the specified QueryServiceStateRequest message. Does not implicitly {@link perfetto.protos.QueryServiceStateRequest.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.QueryServiceStateRequest
             * @static
             * @param {perfetto.protos.IQueryServiceStateRequest} m QueryServiceStateRequest message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            QueryServiceStateRequest.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                return w;
            };

            /**
             * Encodes the specified QueryServiceStateRequest message, length delimited. Does not implicitly {@link perfetto.protos.QueryServiceStateRequest.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.QueryServiceStateRequest
             * @static
             * @param {perfetto.protos.IQueryServiceStateRequest} message QueryServiceStateRequest message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            QueryServiceStateRequest.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a QueryServiceStateRequest message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.QueryServiceStateRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.QueryServiceStateRequest} QueryServiceStateRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            QueryServiceStateRequest.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.QueryServiceStateRequest();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a QueryServiceStateRequest message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.QueryServiceStateRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.QueryServiceStateRequest} QueryServiceStateRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            QueryServiceStateRequest.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a QueryServiceStateRequest message.
             * @function verify
             * @memberof perfetto.protos.QueryServiceStateRequest
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            QueryServiceStateRequest.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates a QueryServiceStateRequest message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.QueryServiceStateRequest
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.QueryServiceStateRequest} QueryServiceStateRequest
             */
            QueryServiceStateRequest.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.QueryServiceStateRequest)
                    return d;
                return new $root.perfetto.protos.QueryServiceStateRequest();
            };

            /**
             * Creates a plain object from a QueryServiceStateRequest message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.QueryServiceStateRequest
             * @static
             * @param {perfetto.protos.QueryServiceStateRequest} m QueryServiceStateRequest
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            QueryServiceStateRequest.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this QueryServiceStateRequest to JSON.
             * @function toJSON
             * @memberof perfetto.protos.QueryServiceStateRequest
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            QueryServiceStateRequest.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return QueryServiceStateRequest;
        })();

        protos.QueryServiceStateResponse = (function() {

            /**
             * Properties of a QueryServiceStateResponse.
             * @memberof perfetto.protos
             * @interface IQueryServiceStateResponse
             * @property {perfetto.protos.ITracingServiceState|null} [serviceState] QueryServiceStateResponse serviceState
             */

            /**
             * Constructs a new QueryServiceStateResponse.
             * @memberof perfetto.protos
             * @classdesc Represents a QueryServiceStateResponse.
             * @implements IQueryServiceStateResponse
             * @constructor
             * @param {perfetto.protos.IQueryServiceStateResponse=} [p] Properties to set
             */
            function QueryServiceStateResponse(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * QueryServiceStateResponse serviceState.
             * @member {perfetto.protos.ITracingServiceState|null|undefined} serviceState
             * @memberof perfetto.protos.QueryServiceStateResponse
             * @instance
             */
            QueryServiceStateResponse.prototype.serviceState = null;

            /**
             * Creates a new QueryServiceStateResponse instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.QueryServiceStateResponse
             * @static
             * @param {perfetto.protos.IQueryServiceStateResponse=} [properties] Properties to set
             * @returns {perfetto.protos.QueryServiceStateResponse} QueryServiceStateResponse instance
             */
            QueryServiceStateResponse.create = function create(properties) {
                return new QueryServiceStateResponse(properties);
            };

            /**
             * Encodes the specified QueryServiceStateResponse message. Does not implicitly {@link perfetto.protos.QueryServiceStateResponse.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.QueryServiceStateResponse
             * @static
             * @param {perfetto.protos.IQueryServiceStateResponse} m QueryServiceStateResponse message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            QueryServiceStateResponse.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.serviceState != null && Object.hasOwnProperty.call(m, "serviceState"))
                    $root.perfetto.protos.TracingServiceState.encode(m.serviceState, w.uint32(10).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified QueryServiceStateResponse message, length delimited. Does not implicitly {@link perfetto.protos.QueryServiceStateResponse.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.QueryServiceStateResponse
             * @static
             * @param {perfetto.protos.IQueryServiceStateResponse} message QueryServiceStateResponse message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            QueryServiceStateResponse.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a QueryServiceStateResponse message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.QueryServiceStateResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.QueryServiceStateResponse} QueryServiceStateResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            QueryServiceStateResponse.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.QueryServiceStateResponse();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.serviceState = $root.perfetto.protos.TracingServiceState.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a QueryServiceStateResponse message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.QueryServiceStateResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.QueryServiceStateResponse} QueryServiceStateResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            QueryServiceStateResponse.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a QueryServiceStateResponse message.
             * @function verify
             * @memberof perfetto.protos.QueryServiceStateResponse
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            QueryServiceStateResponse.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.serviceState != null && m.hasOwnProperty("serviceState")) {
                    {
                        var e = $root.perfetto.protos.TracingServiceState.verify(m.serviceState);
                        if (e)
                            return "serviceState." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a QueryServiceStateResponse message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.QueryServiceStateResponse
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.QueryServiceStateResponse} QueryServiceStateResponse
             */
            QueryServiceStateResponse.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.QueryServiceStateResponse)
                    return d;
                var m = new $root.perfetto.protos.QueryServiceStateResponse();
                if (d.serviceState != null) {
                    if (typeof d.serviceState !== "object")
                        throw TypeError(".perfetto.protos.QueryServiceStateResponse.serviceState: object expected");
                    m.serviceState = $root.perfetto.protos.TracingServiceState.fromObject(d.serviceState);
                }
                return m;
            };

            /**
             * Creates a plain object from a QueryServiceStateResponse message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.QueryServiceStateResponse
             * @static
             * @param {perfetto.protos.QueryServiceStateResponse} m QueryServiceStateResponse
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            QueryServiceStateResponse.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.serviceState = null;
                }
                if (m.serviceState != null && m.hasOwnProperty("serviceState")) {
                    d.serviceState = $root.perfetto.protos.TracingServiceState.toObject(m.serviceState, o);
                }
                return d;
            };

            /**
             * Converts this QueryServiceStateResponse to JSON.
             * @function toJSON
             * @memberof perfetto.protos.QueryServiceStateResponse
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            QueryServiceStateResponse.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return QueryServiceStateResponse;
        })();

        protos.QueryCapabilitiesRequest = (function() {

            /**
             * Properties of a QueryCapabilitiesRequest.
             * @memberof perfetto.protos
             * @interface IQueryCapabilitiesRequest
             */

            /**
             * Constructs a new QueryCapabilitiesRequest.
             * @memberof perfetto.protos
             * @classdesc Represents a QueryCapabilitiesRequest.
             * @implements IQueryCapabilitiesRequest
             * @constructor
             * @param {perfetto.protos.IQueryCapabilitiesRequest=} [p] Properties to set
             */
            function QueryCapabilitiesRequest(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Creates a new QueryCapabilitiesRequest instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.QueryCapabilitiesRequest
             * @static
             * @param {perfetto.protos.IQueryCapabilitiesRequest=} [properties] Properties to set
             * @returns {perfetto.protos.QueryCapabilitiesRequest} QueryCapabilitiesRequest instance
             */
            QueryCapabilitiesRequest.create = function create(properties) {
                return new QueryCapabilitiesRequest(properties);
            };

            /**
             * Encodes the specified QueryCapabilitiesRequest message. Does not implicitly {@link perfetto.protos.QueryCapabilitiesRequest.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.QueryCapabilitiesRequest
             * @static
             * @param {perfetto.protos.IQueryCapabilitiesRequest} m QueryCapabilitiesRequest message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            QueryCapabilitiesRequest.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                return w;
            };

            /**
             * Encodes the specified QueryCapabilitiesRequest message, length delimited. Does not implicitly {@link perfetto.protos.QueryCapabilitiesRequest.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.QueryCapabilitiesRequest
             * @static
             * @param {perfetto.protos.IQueryCapabilitiesRequest} message QueryCapabilitiesRequest message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            QueryCapabilitiesRequest.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a QueryCapabilitiesRequest message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.QueryCapabilitiesRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.QueryCapabilitiesRequest} QueryCapabilitiesRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            QueryCapabilitiesRequest.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.QueryCapabilitiesRequest();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a QueryCapabilitiesRequest message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.QueryCapabilitiesRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.QueryCapabilitiesRequest} QueryCapabilitiesRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            QueryCapabilitiesRequest.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a QueryCapabilitiesRequest message.
             * @function verify
             * @memberof perfetto.protos.QueryCapabilitiesRequest
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            QueryCapabilitiesRequest.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates a QueryCapabilitiesRequest message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.QueryCapabilitiesRequest
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.QueryCapabilitiesRequest} QueryCapabilitiesRequest
             */
            QueryCapabilitiesRequest.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.QueryCapabilitiesRequest)
                    return d;
                return new $root.perfetto.protos.QueryCapabilitiesRequest();
            };

            /**
             * Creates a plain object from a QueryCapabilitiesRequest message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.QueryCapabilitiesRequest
             * @static
             * @param {perfetto.protos.QueryCapabilitiesRequest} m QueryCapabilitiesRequest
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            QueryCapabilitiesRequest.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this QueryCapabilitiesRequest to JSON.
             * @function toJSON
             * @memberof perfetto.protos.QueryCapabilitiesRequest
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            QueryCapabilitiesRequest.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return QueryCapabilitiesRequest;
        })();

        protos.QueryCapabilitiesResponse = (function() {

            /**
             * Properties of a QueryCapabilitiesResponse.
             * @memberof perfetto.protos
             * @interface IQueryCapabilitiesResponse
             * @property {perfetto.protos.ITracingServiceCapabilities|null} [capabilities] QueryCapabilitiesResponse capabilities
             */

            /**
             * Constructs a new QueryCapabilitiesResponse.
             * @memberof perfetto.protos
             * @classdesc Represents a QueryCapabilitiesResponse.
             * @implements IQueryCapabilitiesResponse
             * @constructor
             * @param {perfetto.protos.IQueryCapabilitiesResponse=} [p] Properties to set
             */
            function QueryCapabilitiesResponse(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * QueryCapabilitiesResponse capabilities.
             * @member {perfetto.protos.ITracingServiceCapabilities|null|undefined} capabilities
             * @memberof perfetto.protos.QueryCapabilitiesResponse
             * @instance
             */
            QueryCapabilitiesResponse.prototype.capabilities = null;

            /**
             * Creates a new QueryCapabilitiesResponse instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.QueryCapabilitiesResponse
             * @static
             * @param {perfetto.protos.IQueryCapabilitiesResponse=} [properties] Properties to set
             * @returns {perfetto.protos.QueryCapabilitiesResponse} QueryCapabilitiesResponse instance
             */
            QueryCapabilitiesResponse.create = function create(properties) {
                return new QueryCapabilitiesResponse(properties);
            };

            /**
             * Encodes the specified QueryCapabilitiesResponse message. Does not implicitly {@link perfetto.protos.QueryCapabilitiesResponse.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.QueryCapabilitiesResponse
             * @static
             * @param {perfetto.protos.IQueryCapabilitiesResponse} m QueryCapabilitiesResponse message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            QueryCapabilitiesResponse.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.capabilities != null && Object.hasOwnProperty.call(m, "capabilities"))
                    $root.perfetto.protos.TracingServiceCapabilities.encode(m.capabilities, w.uint32(10).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified QueryCapabilitiesResponse message, length delimited. Does not implicitly {@link perfetto.protos.QueryCapabilitiesResponse.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.QueryCapabilitiesResponse
             * @static
             * @param {perfetto.protos.IQueryCapabilitiesResponse} message QueryCapabilitiesResponse message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            QueryCapabilitiesResponse.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a QueryCapabilitiesResponse message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.QueryCapabilitiesResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.QueryCapabilitiesResponse} QueryCapabilitiesResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            QueryCapabilitiesResponse.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.QueryCapabilitiesResponse();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.capabilities = $root.perfetto.protos.TracingServiceCapabilities.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a QueryCapabilitiesResponse message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.QueryCapabilitiesResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.QueryCapabilitiesResponse} QueryCapabilitiesResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            QueryCapabilitiesResponse.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a QueryCapabilitiesResponse message.
             * @function verify
             * @memberof perfetto.protos.QueryCapabilitiesResponse
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            QueryCapabilitiesResponse.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.capabilities != null && m.hasOwnProperty("capabilities")) {
                    {
                        var e = $root.perfetto.protos.TracingServiceCapabilities.verify(m.capabilities);
                        if (e)
                            return "capabilities." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a QueryCapabilitiesResponse message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.QueryCapabilitiesResponse
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.QueryCapabilitiesResponse} QueryCapabilitiesResponse
             */
            QueryCapabilitiesResponse.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.QueryCapabilitiesResponse)
                    return d;
                var m = new $root.perfetto.protos.QueryCapabilitiesResponse();
                if (d.capabilities != null) {
                    if (typeof d.capabilities !== "object")
                        throw TypeError(".perfetto.protos.QueryCapabilitiesResponse.capabilities: object expected");
                    m.capabilities = $root.perfetto.protos.TracingServiceCapabilities.fromObject(d.capabilities);
                }
                return m;
            };

            /**
             * Creates a plain object from a QueryCapabilitiesResponse message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.QueryCapabilitiesResponse
             * @static
             * @param {perfetto.protos.QueryCapabilitiesResponse} m QueryCapabilitiesResponse
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            QueryCapabilitiesResponse.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.capabilities = null;
                }
                if (m.capabilities != null && m.hasOwnProperty("capabilities")) {
                    d.capabilities = $root.perfetto.protos.TracingServiceCapabilities.toObject(m.capabilities, o);
                }
                return d;
            };

            /**
             * Converts this QueryCapabilitiesResponse to JSON.
             * @function toJSON
             * @memberof perfetto.protos.QueryCapabilitiesResponse
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            QueryCapabilitiesResponse.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return QueryCapabilitiesResponse;
        })();

        protos.SaveTraceForBugreportRequest = (function() {

            /**
             * Properties of a SaveTraceForBugreportRequest.
             * @memberof perfetto.protos
             * @interface ISaveTraceForBugreportRequest
             */

            /**
             * Constructs a new SaveTraceForBugreportRequest.
             * @memberof perfetto.protos
             * @classdesc Represents a SaveTraceForBugreportRequest.
             * @implements ISaveTraceForBugreportRequest
             * @constructor
             * @param {perfetto.protos.ISaveTraceForBugreportRequest=} [p] Properties to set
             */
            function SaveTraceForBugreportRequest(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Creates a new SaveTraceForBugreportRequest instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SaveTraceForBugreportRequest
             * @static
             * @param {perfetto.protos.ISaveTraceForBugreportRequest=} [properties] Properties to set
             * @returns {perfetto.protos.SaveTraceForBugreportRequest} SaveTraceForBugreportRequest instance
             */
            SaveTraceForBugreportRequest.create = function create(properties) {
                return new SaveTraceForBugreportRequest(properties);
            };

            /**
             * Encodes the specified SaveTraceForBugreportRequest message. Does not implicitly {@link perfetto.protos.SaveTraceForBugreportRequest.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SaveTraceForBugreportRequest
             * @static
             * @param {perfetto.protos.ISaveTraceForBugreportRequest} m SaveTraceForBugreportRequest message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SaveTraceForBugreportRequest.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                return w;
            };

            /**
             * Encodes the specified SaveTraceForBugreportRequest message, length delimited. Does not implicitly {@link perfetto.protos.SaveTraceForBugreportRequest.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SaveTraceForBugreportRequest
             * @static
             * @param {perfetto.protos.ISaveTraceForBugreportRequest} message SaveTraceForBugreportRequest message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SaveTraceForBugreportRequest.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SaveTraceForBugreportRequest message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SaveTraceForBugreportRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SaveTraceForBugreportRequest} SaveTraceForBugreportRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SaveTraceForBugreportRequest.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SaveTraceForBugreportRequest();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SaveTraceForBugreportRequest message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SaveTraceForBugreportRequest
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SaveTraceForBugreportRequest} SaveTraceForBugreportRequest
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SaveTraceForBugreportRequest.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SaveTraceForBugreportRequest message.
             * @function verify
             * @memberof perfetto.protos.SaveTraceForBugreportRequest
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SaveTraceForBugreportRequest.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates a SaveTraceForBugreportRequest message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SaveTraceForBugreportRequest
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SaveTraceForBugreportRequest} SaveTraceForBugreportRequest
             */
            SaveTraceForBugreportRequest.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SaveTraceForBugreportRequest)
                    return d;
                return new $root.perfetto.protos.SaveTraceForBugreportRequest();
            };

            /**
             * Creates a plain object from a SaveTraceForBugreportRequest message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SaveTraceForBugreportRequest
             * @static
             * @param {perfetto.protos.SaveTraceForBugreportRequest} m SaveTraceForBugreportRequest
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SaveTraceForBugreportRequest.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this SaveTraceForBugreportRequest to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SaveTraceForBugreportRequest
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SaveTraceForBugreportRequest.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SaveTraceForBugreportRequest;
        })();

        protos.SaveTraceForBugreportResponse = (function() {

            /**
             * Properties of a SaveTraceForBugreportResponse.
             * @memberof perfetto.protos
             * @interface ISaveTraceForBugreportResponse
             * @property {boolean|null} [success] SaveTraceForBugreportResponse success
             * @property {string|null} [msg] SaveTraceForBugreportResponse msg
             */

            /**
             * Constructs a new SaveTraceForBugreportResponse.
             * @memberof perfetto.protos
             * @classdesc Represents a SaveTraceForBugreportResponse.
             * @implements ISaveTraceForBugreportResponse
             * @constructor
             * @param {perfetto.protos.ISaveTraceForBugreportResponse=} [p] Properties to set
             */
            function SaveTraceForBugreportResponse(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SaveTraceForBugreportResponse success.
             * @member {boolean} success
             * @memberof perfetto.protos.SaveTraceForBugreportResponse
             * @instance
             */
            SaveTraceForBugreportResponse.prototype.success = false;

            /**
             * SaveTraceForBugreportResponse msg.
             * @member {string} msg
             * @memberof perfetto.protos.SaveTraceForBugreportResponse
             * @instance
             */
            SaveTraceForBugreportResponse.prototype.msg = "";

            /**
             * Creates a new SaveTraceForBugreportResponse instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SaveTraceForBugreportResponse
             * @static
             * @param {perfetto.protos.ISaveTraceForBugreportResponse=} [properties] Properties to set
             * @returns {perfetto.protos.SaveTraceForBugreportResponse} SaveTraceForBugreportResponse instance
             */
            SaveTraceForBugreportResponse.create = function create(properties) {
                return new SaveTraceForBugreportResponse(properties);
            };

            /**
             * Encodes the specified SaveTraceForBugreportResponse message. Does not implicitly {@link perfetto.protos.SaveTraceForBugreportResponse.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SaveTraceForBugreportResponse
             * @static
             * @param {perfetto.protos.ISaveTraceForBugreportResponse} m SaveTraceForBugreportResponse message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SaveTraceForBugreportResponse.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.success != null && Object.hasOwnProperty.call(m, "success"))
                    w.uint32(8).bool(m.success);
                if (m.msg != null && Object.hasOwnProperty.call(m, "msg"))
                    w.uint32(18).string(m.msg);
                return w;
            };

            /**
             * Encodes the specified SaveTraceForBugreportResponse message, length delimited. Does not implicitly {@link perfetto.protos.SaveTraceForBugreportResponse.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SaveTraceForBugreportResponse
             * @static
             * @param {perfetto.protos.ISaveTraceForBugreportResponse} message SaveTraceForBugreportResponse message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SaveTraceForBugreportResponse.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SaveTraceForBugreportResponse message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SaveTraceForBugreportResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SaveTraceForBugreportResponse} SaveTraceForBugreportResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SaveTraceForBugreportResponse.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SaveTraceForBugreportResponse();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.success = r.bool();
                        break;
                    case 2:
                        m.msg = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SaveTraceForBugreportResponse message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SaveTraceForBugreportResponse
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SaveTraceForBugreportResponse} SaveTraceForBugreportResponse
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SaveTraceForBugreportResponse.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SaveTraceForBugreportResponse message.
             * @function verify
             * @memberof perfetto.protos.SaveTraceForBugreportResponse
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SaveTraceForBugreportResponse.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.success != null && m.hasOwnProperty("success")) {
                    if (typeof m.success !== "boolean")
                        return "success: boolean expected";
                }
                if (m.msg != null && m.hasOwnProperty("msg")) {
                    if (!$util.isString(m.msg))
                        return "msg: string expected";
                }
                return null;
            };

            /**
             * Creates a SaveTraceForBugreportResponse message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SaveTraceForBugreportResponse
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SaveTraceForBugreportResponse} SaveTraceForBugreportResponse
             */
            SaveTraceForBugreportResponse.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SaveTraceForBugreportResponse)
                    return d;
                var m = new $root.perfetto.protos.SaveTraceForBugreportResponse();
                if (d.success != null) {
                    m.success = Boolean(d.success);
                }
                if (d.msg != null) {
                    m.msg = String(d.msg);
                }
                return m;
            };

            /**
             * Creates a plain object from a SaveTraceForBugreportResponse message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SaveTraceForBugreportResponse
             * @static
             * @param {perfetto.protos.SaveTraceForBugreportResponse} m SaveTraceForBugreportResponse
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SaveTraceForBugreportResponse.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.success = false;
                    d.msg = "";
                }
                if (m.success != null && m.hasOwnProperty("success")) {
                    d.success = m.success;
                }
                if (m.msg != null && m.hasOwnProperty("msg")) {
                    d.msg = m.msg;
                }
                return d;
            };

            /**
             * Converts this SaveTraceForBugreportResponse to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SaveTraceForBugreportResponse
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SaveTraceForBugreportResponse.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SaveTraceForBugreportResponse;
        })();

        protos.IPCFrame = (function() {

            /**
             * Properties of a IPCFrame.
             * @memberof perfetto.protos
             * @interface IIPCFrame
             * @property {number|null} [requestId] IPCFrame requestId
             * @property {perfetto.protos.IPCFrame.IBindService|null} [msgBindService] IPCFrame msgBindService
             * @property {perfetto.protos.IPCFrame.IBindServiceReply|null} [msgBindServiceReply] IPCFrame msgBindServiceReply
             * @property {perfetto.protos.IPCFrame.IInvokeMethod|null} [msgInvokeMethod] IPCFrame msgInvokeMethod
             * @property {perfetto.protos.IPCFrame.IInvokeMethodReply|null} [msgInvokeMethodReply] IPCFrame msgInvokeMethodReply
             * @property {perfetto.protos.IPCFrame.IRequestError|null} [msgRequestError] IPCFrame msgRequestError
             * @property {Array.<Uint8Array>|null} [dataForTesting] IPCFrame dataForTesting
             */

            /**
             * Constructs a new IPCFrame.
             * @memberof perfetto.protos
             * @classdesc Represents a IPCFrame.
             * @implements IIPCFrame
             * @constructor
             * @param {perfetto.protos.IIPCFrame=} [p] Properties to set
             */
            function IPCFrame(p) {
                this.dataForTesting = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IPCFrame requestId.
             * @member {number} requestId
             * @memberof perfetto.protos.IPCFrame
             * @instance
             */
            IPCFrame.prototype.requestId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IPCFrame msgBindService.
             * @member {perfetto.protos.IPCFrame.IBindService|null|undefined} msgBindService
             * @memberof perfetto.protos.IPCFrame
             * @instance
             */
            IPCFrame.prototype.msgBindService = null;

            /**
             * IPCFrame msgBindServiceReply.
             * @member {perfetto.protos.IPCFrame.IBindServiceReply|null|undefined} msgBindServiceReply
             * @memberof perfetto.protos.IPCFrame
             * @instance
             */
            IPCFrame.prototype.msgBindServiceReply = null;

            /**
             * IPCFrame msgInvokeMethod.
             * @member {perfetto.protos.IPCFrame.IInvokeMethod|null|undefined} msgInvokeMethod
             * @memberof perfetto.protos.IPCFrame
             * @instance
             */
            IPCFrame.prototype.msgInvokeMethod = null;

            /**
             * IPCFrame msgInvokeMethodReply.
             * @member {perfetto.protos.IPCFrame.IInvokeMethodReply|null|undefined} msgInvokeMethodReply
             * @memberof perfetto.protos.IPCFrame
             * @instance
             */
            IPCFrame.prototype.msgInvokeMethodReply = null;

            /**
             * IPCFrame msgRequestError.
             * @member {perfetto.protos.IPCFrame.IRequestError|null|undefined} msgRequestError
             * @memberof perfetto.protos.IPCFrame
             * @instance
             */
            IPCFrame.prototype.msgRequestError = null;

            /**
             * IPCFrame dataForTesting.
             * @member {Array.<Uint8Array>} dataForTesting
             * @memberof perfetto.protos.IPCFrame
             * @instance
             */
            IPCFrame.prototype.dataForTesting = $util.emptyArray;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * IPCFrame msg.
             * @member {"msgBindService"|"msgBindServiceReply"|"msgInvokeMethod"|"msgInvokeMethodReply"|"msgRequestError"|undefined} msg
             * @memberof perfetto.protos.IPCFrame
             * @instance
             */
            Object.defineProperty(IPCFrame.prototype, "msg", {
                get: $util.oneOfGetter($oneOfFields = ["msgBindService", "msgBindServiceReply", "msgInvokeMethod", "msgInvokeMethodReply", "msgRequestError"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new IPCFrame instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IPCFrame
             * @static
             * @param {perfetto.protos.IIPCFrame=} [properties] Properties to set
             * @returns {perfetto.protos.IPCFrame} IPCFrame instance
             */
            IPCFrame.create = function create(properties) {
                return new IPCFrame(properties);
            };

            /**
             * Encodes the specified IPCFrame message. Does not implicitly {@link perfetto.protos.IPCFrame.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IPCFrame
             * @static
             * @param {perfetto.protos.IIPCFrame} m IPCFrame message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IPCFrame.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dataForTesting != null && m.dataForTesting.length) {
                    for (var i = 0; i < m.dataForTesting.length; ++i)
                        w.uint32(10).bytes(m.dataForTesting[i]);
                }
                if (m.requestId != null && Object.hasOwnProperty.call(m, "requestId"))
                    w.uint32(16).uint64(m.requestId);
                if (m.msgBindService != null && Object.hasOwnProperty.call(m, "msgBindService"))
                    $root.perfetto.protos.IPCFrame.BindService.encode(m.msgBindService, w.uint32(26).fork()).ldelim();
                if (m.msgBindServiceReply != null && Object.hasOwnProperty.call(m, "msgBindServiceReply"))
                    $root.perfetto.protos.IPCFrame.BindServiceReply.encode(m.msgBindServiceReply, w.uint32(34).fork()).ldelim();
                if (m.msgInvokeMethod != null && Object.hasOwnProperty.call(m, "msgInvokeMethod"))
                    $root.perfetto.protos.IPCFrame.InvokeMethod.encode(m.msgInvokeMethod, w.uint32(42).fork()).ldelim();
                if (m.msgInvokeMethodReply != null && Object.hasOwnProperty.call(m, "msgInvokeMethodReply"))
                    $root.perfetto.protos.IPCFrame.InvokeMethodReply.encode(m.msgInvokeMethodReply, w.uint32(50).fork()).ldelim();
                if (m.msgRequestError != null && Object.hasOwnProperty.call(m, "msgRequestError"))
                    $root.perfetto.protos.IPCFrame.RequestError.encode(m.msgRequestError, w.uint32(58).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified IPCFrame message, length delimited. Does not implicitly {@link perfetto.protos.IPCFrame.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IPCFrame
             * @static
             * @param {perfetto.protos.IIPCFrame} message IPCFrame message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IPCFrame.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a IPCFrame message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IPCFrame
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IPCFrame} IPCFrame
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IPCFrame.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IPCFrame();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 2:
                        m.requestId = r.uint64();
                        break;
                    case 3:
                        m.msgBindService = $root.perfetto.protos.IPCFrame.BindService.decode(r, r.uint32());
                        break;
                    case 4:
                        m.msgBindServiceReply = $root.perfetto.protos.IPCFrame.BindServiceReply.decode(r, r.uint32());
                        break;
                    case 5:
                        m.msgInvokeMethod = $root.perfetto.protos.IPCFrame.InvokeMethod.decode(r, r.uint32());
                        break;
                    case 6:
                        m.msgInvokeMethodReply = $root.perfetto.protos.IPCFrame.InvokeMethodReply.decode(r, r.uint32());
                        break;
                    case 7:
                        m.msgRequestError = $root.perfetto.protos.IPCFrame.RequestError.decode(r, r.uint32());
                        break;
                    case 1:
                        if (!(m.dataForTesting && m.dataForTesting.length))
                            m.dataForTesting = [];
                        m.dataForTesting.push(r.bytes());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a IPCFrame message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IPCFrame
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IPCFrame} IPCFrame
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IPCFrame.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a IPCFrame message.
             * @function verify
             * @memberof perfetto.protos.IPCFrame
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IPCFrame.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                var p = {};
                if (m.requestId != null && m.hasOwnProperty("requestId")) {
                    if (!$util.isInteger(m.requestId) && !(m.requestId && $util.isInteger(m.requestId.low) && $util.isInteger(m.requestId.high)))
                        return "requestId: integer|Long expected";
                }
                if (m.msgBindService != null && m.hasOwnProperty("msgBindService")) {
                    p.msg = 1;
                    {
                        var e = $root.perfetto.protos.IPCFrame.BindService.verify(m.msgBindService);
                        if (e)
                            return "msgBindService." + e;
                    }
                }
                if (m.msgBindServiceReply != null && m.hasOwnProperty("msgBindServiceReply")) {
                    if (p.msg === 1)
                        return "msg: multiple values";
                    p.msg = 1;
                    {
                        var e = $root.perfetto.protos.IPCFrame.BindServiceReply.verify(m.msgBindServiceReply);
                        if (e)
                            return "msgBindServiceReply." + e;
                    }
                }
                if (m.msgInvokeMethod != null && m.hasOwnProperty("msgInvokeMethod")) {
                    if (p.msg === 1)
                        return "msg: multiple values";
                    p.msg = 1;
                    {
                        var e = $root.perfetto.protos.IPCFrame.InvokeMethod.verify(m.msgInvokeMethod);
                        if (e)
                            return "msgInvokeMethod." + e;
                    }
                }
                if (m.msgInvokeMethodReply != null && m.hasOwnProperty("msgInvokeMethodReply")) {
                    if (p.msg === 1)
                        return "msg: multiple values";
                    p.msg = 1;
                    {
                        var e = $root.perfetto.protos.IPCFrame.InvokeMethodReply.verify(m.msgInvokeMethodReply);
                        if (e)
                            return "msgInvokeMethodReply." + e;
                    }
                }
                if (m.msgRequestError != null && m.hasOwnProperty("msgRequestError")) {
                    if (p.msg === 1)
                        return "msg: multiple values";
                    p.msg = 1;
                    {
                        var e = $root.perfetto.protos.IPCFrame.RequestError.verify(m.msgRequestError);
                        if (e)
                            return "msgRequestError." + e;
                    }
                }
                if (m.dataForTesting != null && m.hasOwnProperty("dataForTesting")) {
                    if (!Array.isArray(m.dataForTesting))
                        return "dataForTesting: array expected";
                    for (var i = 0; i < m.dataForTesting.length; ++i) {
                        if (!(m.dataForTesting[i] && typeof m.dataForTesting[i].length === "number" || $util.isString(m.dataForTesting[i])))
                            return "dataForTesting: buffer[] expected";
                    }
                }
                return null;
            };

            /**
             * Creates a IPCFrame message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IPCFrame
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IPCFrame} IPCFrame
             */
            IPCFrame.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IPCFrame)
                    return d;
                var m = new $root.perfetto.protos.IPCFrame();
                if (d.requestId != null) {
                    if ($util.Long)
                        (m.requestId = $util.Long.fromValue(d.requestId)).unsigned = true;
                    else if (typeof d.requestId === "string")
                        m.requestId = parseInt(d.requestId, 10);
                    else if (typeof d.requestId === "number")
                        m.requestId = d.requestId;
                    else if (typeof d.requestId === "object")
                        m.requestId = new $util.LongBits(d.requestId.low >>> 0, d.requestId.high >>> 0).toNumber(true);
                }
                if (d.msgBindService != null) {
                    if (typeof d.msgBindService !== "object")
                        throw TypeError(".perfetto.protos.IPCFrame.msgBindService: object expected");
                    m.msgBindService = $root.perfetto.protos.IPCFrame.BindService.fromObject(d.msgBindService);
                }
                if (d.msgBindServiceReply != null) {
                    if (typeof d.msgBindServiceReply !== "object")
                        throw TypeError(".perfetto.protos.IPCFrame.msgBindServiceReply: object expected");
                    m.msgBindServiceReply = $root.perfetto.protos.IPCFrame.BindServiceReply.fromObject(d.msgBindServiceReply);
                }
                if (d.msgInvokeMethod != null) {
                    if (typeof d.msgInvokeMethod !== "object")
                        throw TypeError(".perfetto.protos.IPCFrame.msgInvokeMethod: object expected");
                    m.msgInvokeMethod = $root.perfetto.protos.IPCFrame.InvokeMethod.fromObject(d.msgInvokeMethod);
                }
                if (d.msgInvokeMethodReply != null) {
                    if (typeof d.msgInvokeMethodReply !== "object")
                        throw TypeError(".perfetto.protos.IPCFrame.msgInvokeMethodReply: object expected");
                    m.msgInvokeMethodReply = $root.perfetto.protos.IPCFrame.InvokeMethodReply.fromObject(d.msgInvokeMethodReply);
                }
                if (d.msgRequestError != null) {
                    if (typeof d.msgRequestError !== "object")
                        throw TypeError(".perfetto.protos.IPCFrame.msgRequestError: object expected");
                    m.msgRequestError = $root.perfetto.protos.IPCFrame.RequestError.fromObject(d.msgRequestError);
                }
                if (d.dataForTesting) {
                    if (!Array.isArray(d.dataForTesting))
                        throw TypeError(".perfetto.protos.IPCFrame.dataForTesting: array expected");
                    m.dataForTesting = [];
                    for (var i = 0; i < d.dataForTesting.length; ++i) {
                        if (typeof d.dataForTesting[i] === "string")
                            $util.base64.decode(d.dataForTesting[i], m.dataForTesting[i] = $util.newBuffer($util.base64.length(d.dataForTesting[i])), 0);
                        else if (d.dataForTesting[i].length)
                            m.dataForTesting[i] = d.dataForTesting[i];
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a IPCFrame message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IPCFrame
             * @static
             * @param {perfetto.protos.IPCFrame} m IPCFrame
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IPCFrame.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.dataForTesting = [];
                }
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.requestId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.requestId = o.longs === String ? "0" : 0;
                }
                if (m.dataForTesting && m.dataForTesting.length) {
                    d.dataForTesting = [];
                    for (var j = 0; j < m.dataForTesting.length; ++j) {
                        d.dataForTesting[j] = o.bytes === String ? $util.base64.encode(m.dataForTesting[j], 0, m.dataForTesting[j].length) : o.bytes === Array ? Array.prototype.slice.call(m.dataForTesting[j]) : m.dataForTesting[j];
                    }
                }
                if (m.requestId != null && m.hasOwnProperty("requestId")) {
                    if (typeof m.requestId === "number")
                        d.requestId = o.longs === String ? String(m.requestId) : m.requestId;
                    else
                        d.requestId = o.longs === String ? $util.Long.prototype.toString.call(m.requestId) : o.longs === Number ? new $util.LongBits(m.requestId.low >>> 0, m.requestId.high >>> 0).toNumber(true) : m.requestId;
                }
                if (m.msgBindService != null && m.hasOwnProperty("msgBindService")) {
                    d.msgBindService = $root.perfetto.protos.IPCFrame.BindService.toObject(m.msgBindService, o);
                    if (o.oneofs)
                        d.msg = "msgBindService";
                }
                if (m.msgBindServiceReply != null && m.hasOwnProperty("msgBindServiceReply")) {
                    d.msgBindServiceReply = $root.perfetto.protos.IPCFrame.BindServiceReply.toObject(m.msgBindServiceReply, o);
                    if (o.oneofs)
                        d.msg = "msgBindServiceReply";
                }
                if (m.msgInvokeMethod != null && m.hasOwnProperty("msgInvokeMethod")) {
                    d.msgInvokeMethod = $root.perfetto.protos.IPCFrame.InvokeMethod.toObject(m.msgInvokeMethod, o);
                    if (o.oneofs)
                        d.msg = "msgInvokeMethod";
                }
                if (m.msgInvokeMethodReply != null && m.hasOwnProperty("msgInvokeMethodReply")) {
                    d.msgInvokeMethodReply = $root.perfetto.protos.IPCFrame.InvokeMethodReply.toObject(m.msgInvokeMethodReply, o);
                    if (o.oneofs)
                        d.msg = "msgInvokeMethodReply";
                }
                if (m.msgRequestError != null && m.hasOwnProperty("msgRequestError")) {
                    d.msgRequestError = $root.perfetto.protos.IPCFrame.RequestError.toObject(m.msgRequestError, o);
                    if (o.oneofs)
                        d.msg = "msgRequestError";
                }
                return d;
            };

            /**
             * Converts this IPCFrame to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IPCFrame
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IPCFrame.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            IPCFrame.BindService = (function() {

                /**
                 * Properties of a BindService.
                 * @memberof perfetto.protos.IPCFrame
                 * @interface IBindService
                 * @property {string|null} [serviceName] BindService serviceName
                 */

                /**
                 * Constructs a new BindService.
                 * @memberof perfetto.protos.IPCFrame
                 * @classdesc Represents a BindService.
                 * @implements IBindService
                 * @constructor
                 * @param {perfetto.protos.IPCFrame.IBindService=} [p] Properties to set
                 */
                function BindService(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * BindService serviceName.
                 * @member {string} serviceName
                 * @memberof perfetto.protos.IPCFrame.BindService
                 * @instance
                 */
                BindService.prototype.serviceName = "";

                /**
                 * Creates a new BindService instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.IPCFrame.BindService
                 * @static
                 * @param {perfetto.protos.IPCFrame.IBindService=} [properties] Properties to set
                 * @returns {perfetto.protos.IPCFrame.BindService} BindService instance
                 */
                BindService.create = function create(properties) {
                    return new BindService(properties);
                };

                /**
                 * Encodes the specified BindService message. Does not implicitly {@link perfetto.protos.IPCFrame.BindService.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.IPCFrame.BindService
                 * @static
                 * @param {perfetto.protos.IPCFrame.IBindService} m BindService message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BindService.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.serviceName != null && Object.hasOwnProperty.call(m, "serviceName"))
                        w.uint32(10).string(m.serviceName);
                    return w;
                };

                /**
                 * Encodes the specified BindService message, length delimited. Does not implicitly {@link perfetto.protos.IPCFrame.BindService.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.IPCFrame.BindService
                 * @static
                 * @param {perfetto.protos.IPCFrame.IBindService} message BindService message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BindService.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a BindService message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.IPCFrame.BindService
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.IPCFrame.BindService} BindService
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BindService.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IPCFrame.BindService();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.serviceName = r.string();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a BindService message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.IPCFrame.BindService
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.IPCFrame.BindService} BindService
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BindService.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a BindService message.
                 * @function verify
                 * @memberof perfetto.protos.IPCFrame.BindService
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                BindService.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.serviceName != null && m.hasOwnProperty("serviceName")) {
                        if (!$util.isString(m.serviceName))
                            return "serviceName: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a BindService message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.IPCFrame.BindService
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.IPCFrame.BindService} BindService
                 */
                BindService.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.IPCFrame.BindService)
                        return d;
                    var m = new $root.perfetto.protos.IPCFrame.BindService();
                    if (d.serviceName != null) {
                        m.serviceName = String(d.serviceName);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a BindService message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.IPCFrame.BindService
                 * @static
                 * @param {perfetto.protos.IPCFrame.BindService} m BindService
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                BindService.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.serviceName = "";
                    }
                    if (m.serviceName != null && m.hasOwnProperty("serviceName")) {
                        d.serviceName = m.serviceName;
                    }
                    return d;
                };

                /**
                 * Converts this BindService to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.IPCFrame.BindService
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                BindService.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return BindService;
            })();

            IPCFrame.BindServiceReply = (function() {

                /**
                 * Properties of a BindServiceReply.
                 * @memberof perfetto.protos.IPCFrame
                 * @interface IBindServiceReply
                 * @property {boolean|null} [success] BindServiceReply success
                 * @property {number|null} [serviceId] BindServiceReply serviceId
                 * @property {Array.<perfetto.protos.IPCFrame.BindServiceReply.IMethodInfo>|null} [methods] BindServiceReply methods
                 */

                /**
                 * Constructs a new BindServiceReply.
                 * @memberof perfetto.protos.IPCFrame
                 * @classdesc Represents a BindServiceReply.
                 * @implements IBindServiceReply
                 * @constructor
                 * @param {perfetto.protos.IPCFrame.IBindServiceReply=} [p] Properties to set
                 */
                function BindServiceReply(p) {
                    this.methods = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * BindServiceReply success.
                 * @member {boolean} success
                 * @memberof perfetto.protos.IPCFrame.BindServiceReply
                 * @instance
                 */
                BindServiceReply.prototype.success = false;

                /**
                 * BindServiceReply serviceId.
                 * @member {number} serviceId
                 * @memberof perfetto.protos.IPCFrame.BindServiceReply
                 * @instance
                 */
                BindServiceReply.prototype.serviceId = 0;

                /**
                 * BindServiceReply methods.
                 * @member {Array.<perfetto.protos.IPCFrame.BindServiceReply.IMethodInfo>} methods
                 * @memberof perfetto.protos.IPCFrame.BindServiceReply
                 * @instance
                 */
                BindServiceReply.prototype.methods = $util.emptyArray;

                /**
                 * Creates a new BindServiceReply instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.IPCFrame.BindServiceReply
                 * @static
                 * @param {perfetto.protos.IPCFrame.IBindServiceReply=} [properties] Properties to set
                 * @returns {perfetto.protos.IPCFrame.BindServiceReply} BindServiceReply instance
                 */
                BindServiceReply.create = function create(properties) {
                    return new BindServiceReply(properties);
                };

                /**
                 * Encodes the specified BindServiceReply message. Does not implicitly {@link perfetto.protos.IPCFrame.BindServiceReply.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.IPCFrame.BindServiceReply
                 * @static
                 * @param {perfetto.protos.IPCFrame.IBindServiceReply} m BindServiceReply message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BindServiceReply.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.success != null && Object.hasOwnProperty.call(m, "success"))
                        w.uint32(8).bool(m.success);
                    if (m.serviceId != null && Object.hasOwnProperty.call(m, "serviceId"))
                        w.uint32(16).uint32(m.serviceId);
                    if (m.methods != null && m.methods.length) {
                        for (var i = 0; i < m.methods.length; ++i)
                            $root.perfetto.protos.IPCFrame.BindServiceReply.MethodInfo.encode(m.methods[i], w.uint32(26).fork()).ldelim();
                    }
                    return w;
                };

                /**
                 * Encodes the specified BindServiceReply message, length delimited. Does not implicitly {@link perfetto.protos.IPCFrame.BindServiceReply.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.IPCFrame.BindServiceReply
                 * @static
                 * @param {perfetto.protos.IPCFrame.IBindServiceReply} message BindServiceReply message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BindServiceReply.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a BindServiceReply message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.IPCFrame.BindServiceReply
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.IPCFrame.BindServiceReply} BindServiceReply
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BindServiceReply.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IPCFrame.BindServiceReply();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.success = r.bool();
                            break;
                        case 2:
                            m.serviceId = r.uint32();
                            break;
                        case 3:
                            if (!(m.methods && m.methods.length))
                                m.methods = [];
                            m.methods.push($root.perfetto.protos.IPCFrame.BindServiceReply.MethodInfo.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a BindServiceReply message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.IPCFrame.BindServiceReply
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.IPCFrame.BindServiceReply} BindServiceReply
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BindServiceReply.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a BindServiceReply message.
                 * @function verify
                 * @memberof perfetto.protos.IPCFrame.BindServiceReply
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                BindServiceReply.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.success != null && m.hasOwnProperty("success")) {
                        if (typeof m.success !== "boolean")
                            return "success: boolean expected";
                    }
                    if (m.serviceId != null && m.hasOwnProperty("serviceId")) {
                        if (!$util.isInteger(m.serviceId))
                            return "serviceId: integer expected";
                    }
                    if (m.methods != null && m.hasOwnProperty("methods")) {
                        if (!Array.isArray(m.methods))
                            return "methods: array expected";
                        for (var i = 0; i < m.methods.length; ++i) {
                            {
                                var e = $root.perfetto.protos.IPCFrame.BindServiceReply.MethodInfo.verify(m.methods[i]);
                                if (e)
                                    return "methods." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates a BindServiceReply message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.IPCFrame.BindServiceReply
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.IPCFrame.BindServiceReply} BindServiceReply
                 */
                BindServiceReply.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.IPCFrame.BindServiceReply)
                        return d;
                    var m = new $root.perfetto.protos.IPCFrame.BindServiceReply();
                    if (d.success != null) {
                        m.success = Boolean(d.success);
                    }
                    if (d.serviceId != null) {
                        m.serviceId = d.serviceId >>> 0;
                    }
                    if (d.methods) {
                        if (!Array.isArray(d.methods))
                            throw TypeError(".perfetto.protos.IPCFrame.BindServiceReply.methods: array expected");
                        m.methods = [];
                        for (var i = 0; i < d.methods.length; ++i) {
                            if (typeof d.methods[i] !== "object")
                                throw TypeError(".perfetto.protos.IPCFrame.BindServiceReply.methods: object expected");
                            m.methods[i] = $root.perfetto.protos.IPCFrame.BindServiceReply.MethodInfo.fromObject(d.methods[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a BindServiceReply message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.IPCFrame.BindServiceReply
                 * @static
                 * @param {perfetto.protos.IPCFrame.BindServiceReply} m BindServiceReply
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                BindServiceReply.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.methods = [];
                    }
                    if (o.defaults) {
                        d.success = false;
                        d.serviceId = 0;
                    }
                    if (m.success != null && m.hasOwnProperty("success")) {
                        d.success = m.success;
                    }
                    if (m.serviceId != null && m.hasOwnProperty("serviceId")) {
                        d.serviceId = m.serviceId;
                    }
                    if (m.methods && m.methods.length) {
                        d.methods = [];
                        for (var j = 0; j < m.methods.length; ++j) {
                            d.methods[j] = $root.perfetto.protos.IPCFrame.BindServiceReply.MethodInfo.toObject(m.methods[j], o);
                        }
                    }
                    return d;
                };

                /**
                 * Converts this BindServiceReply to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.IPCFrame.BindServiceReply
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                BindServiceReply.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                BindServiceReply.MethodInfo = (function() {

                    /**
                     * Properties of a MethodInfo.
                     * @memberof perfetto.protos.IPCFrame.BindServiceReply
                     * @interface IMethodInfo
                     * @property {number|null} [id] MethodInfo id
                     * @property {string|null} [name] MethodInfo name
                     */

                    /**
                     * Constructs a new MethodInfo.
                     * @memberof perfetto.protos.IPCFrame.BindServiceReply
                     * @classdesc Represents a MethodInfo.
                     * @implements IMethodInfo
                     * @constructor
                     * @param {perfetto.protos.IPCFrame.BindServiceReply.IMethodInfo=} [p] Properties to set
                     */
                    function MethodInfo(p) {
                        if (p)
                            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                                if (p[ks[i]] != null)
                                    this[ks[i]] = p[ks[i]];
                    }

                    /**
                     * MethodInfo id.
                     * @member {number} id
                     * @memberof perfetto.protos.IPCFrame.BindServiceReply.MethodInfo
                     * @instance
                     */
                    MethodInfo.prototype.id = 0;

                    /**
                     * MethodInfo name.
                     * @member {string} name
                     * @memberof perfetto.protos.IPCFrame.BindServiceReply.MethodInfo
                     * @instance
                     */
                    MethodInfo.prototype.name = "";

                    /**
                     * Creates a new MethodInfo instance using the specified properties.
                     * @function create
                     * @memberof perfetto.protos.IPCFrame.BindServiceReply.MethodInfo
                     * @static
                     * @param {perfetto.protos.IPCFrame.BindServiceReply.IMethodInfo=} [properties] Properties to set
                     * @returns {perfetto.protos.IPCFrame.BindServiceReply.MethodInfo} MethodInfo instance
                     */
                    MethodInfo.create = function create(properties) {
                        return new MethodInfo(properties);
                    };

                    /**
                     * Encodes the specified MethodInfo message. Does not implicitly {@link perfetto.protos.IPCFrame.BindServiceReply.MethodInfo.verify|verify} messages.
                     * @function encode
                     * @memberof perfetto.protos.IPCFrame.BindServiceReply.MethodInfo
                     * @static
                     * @param {perfetto.protos.IPCFrame.BindServiceReply.IMethodInfo} m MethodInfo message or plain object to encode
                     * @param {$protobuf.Writer} [w] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    MethodInfo.encode = function encode(m, w) {
                        if (!w)
                            w = $Writer.create();
                        if (m.id != null && Object.hasOwnProperty.call(m, "id"))
                            w.uint32(8).uint32(m.id);
                        if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                            w.uint32(18).string(m.name);
                        return w;
                    };

                    /**
                     * Encodes the specified MethodInfo message, length delimited. Does not implicitly {@link perfetto.protos.IPCFrame.BindServiceReply.MethodInfo.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof perfetto.protos.IPCFrame.BindServiceReply.MethodInfo
                     * @static
                     * @param {perfetto.protos.IPCFrame.BindServiceReply.IMethodInfo} message MethodInfo message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    MethodInfo.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a MethodInfo message from the specified reader or buffer.
                     * @function decode
                     * @memberof perfetto.protos.IPCFrame.BindServiceReply.MethodInfo
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                     * @param {number} [l] Message length if known beforehand
                     * @returns {perfetto.protos.IPCFrame.BindServiceReply.MethodInfo} MethodInfo
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    MethodInfo.decode = function decode(r, l) {
                        if (!(r instanceof $Reader))
                            r = $Reader.create(r);
                        var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IPCFrame.BindServiceReply.MethodInfo();
                        while (r.pos < c) {
                            var t = r.uint32();
                            switch (t >>> 3) {
                            case 1:
                                m.id = r.uint32();
                                break;
                            case 2:
                                m.name = r.string();
                                break;
                            default:
                                r.skipType(t & 7);
                                break;
                            }
                        }
                        return m;
                    };

                    /**
                     * Decodes a MethodInfo message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof perfetto.protos.IPCFrame.BindServiceReply.MethodInfo
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {perfetto.protos.IPCFrame.BindServiceReply.MethodInfo} MethodInfo
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    MethodInfo.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a MethodInfo message.
                     * @function verify
                     * @memberof perfetto.protos.IPCFrame.BindServiceReply.MethodInfo
                     * @static
                     * @param {Object.<string,*>} m Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    MethodInfo.verify = function verify(m) {
                        if (typeof m !== "object" || m === null)
                            return "object expected";
                        if (m.id != null && m.hasOwnProperty("id")) {
                            if (!$util.isInteger(m.id))
                                return "id: integer expected";
                        }
                        if (m.name != null && m.hasOwnProperty("name")) {
                            if (!$util.isString(m.name))
                                return "name: string expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a MethodInfo message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof perfetto.protos.IPCFrame.BindServiceReply.MethodInfo
                     * @static
                     * @param {Object.<string,*>} d Plain object
                     * @returns {perfetto.protos.IPCFrame.BindServiceReply.MethodInfo} MethodInfo
                     */
                    MethodInfo.fromObject = function fromObject(d) {
                        if (d instanceof $root.perfetto.protos.IPCFrame.BindServiceReply.MethodInfo)
                            return d;
                        var m = new $root.perfetto.protos.IPCFrame.BindServiceReply.MethodInfo();
                        if (d.id != null) {
                            m.id = d.id >>> 0;
                        }
                        if (d.name != null) {
                            m.name = String(d.name);
                        }
                        return m;
                    };

                    /**
                     * Creates a plain object from a MethodInfo message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof perfetto.protos.IPCFrame.BindServiceReply.MethodInfo
                     * @static
                     * @param {perfetto.protos.IPCFrame.BindServiceReply.MethodInfo} m MethodInfo
                     * @param {$protobuf.IConversionOptions} [o] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    MethodInfo.toObject = function toObject(m, o) {
                        if (!o)
                            o = {};
                        var d = {};
                        if (o.defaults) {
                            d.id = 0;
                            d.name = "";
                        }
                        if (m.id != null && m.hasOwnProperty("id")) {
                            d.id = m.id;
                        }
                        if (m.name != null && m.hasOwnProperty("name")) {
                            d.name = m.name;
                        }
                        return d;
                    };

                    /**
                     * Converts this MethodInfo to JSON.
                     * @function toJSON
                     * @memberof perfetto.protos.IPCFrame.BindServiceReply.MethodInfo
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    MethodInfo.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                    };

                    return MethodInfo;
                })();

                return BindServiceReply;
            })();

            IPCFrame.InvokeMethod = (function() {

                /**
                 * Properties of an InvokeMethod.
                 * @memberof perfetto.protos.IPCFrame
                 * @interface IInvokeMethod
                 * @property {number|null} [serviceId] InvokeMethod serviceId
                 * @property {number|null} [methodId] InvokeMethod methodId
                 * @property {Uint8Array|null} [argsProto] InvokeMethod argsProto
                 * @property {boolean|null} [dropReply] InvokeMethod dropReply
                 */

                /**
                 * Constructs a new InvokeMethod.
                 * @memberof perfetto.protos.IPCFrame
                 * @classdesc Represents an InvokeMethod.
                 * @implements IInvokeMethod
                 * @constructor
                 * @param {perfetto.protos.IPCFrame.IInvokeMethod=} [p] Properties to set
                 */
                function InvokeMethod(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * InvokeMethod serviceId.
                 * @member {number} serviceId
                 * @memberof perfetto.protos.IPCFrame.InvokeMethod
                 * @instance
                 */
                InvokeMethod.prototype.serviceId = 0;

                /**
                 * InvokeMethod methodId.
                 * @member {number} methodId
                 * @memberof perfetto.protos.IPCFrame.InvokeMethod
                 * @instance
                 */
                InvokeMethod.prototype.methodId = 0;

                /**
                 * InvokeMethod argsProto.
                 * @member {Uint8Array} argsProto
                 * @memberof perfetto.protos.IPCFrame.InvokeMethod
                 * @instance
                 */
                InvokeMethod.prototype.argsProto = $util.newBuffer([]);

                /**
                 * InvokeMethod dropReply.
                 * @member {boolean} dropReply
                 * @memberof perfetto.protos.IPCFrame.InvokeMethod
                 * @instance
                 */
                InvokeMethod.prototype.dropReply = false;

                /**
                 * Creates a new InvokeMethod instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.IPCFrame.InvokeMethod
                 * @static
                 * @param {perfetto.protos.IPCFrame.IInvokeMethod=} [properties] Properties to set
                 * @returns {perfetto.protos.IPCFrame.InvokeMethod} InvokeMethod instance
                 */
                InvokeMethod.create = function create(properties) {
                    return new InvokeMethod(properties);
                };

                /**
                 * Encodes the specified InvokeMethod message. Does not implicitly {@link perfetto.protos.IPCFrame.InvokeMethod.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.IPCFrame.InvokeMethod
                 * @static
                 * @param {perfetto.protos.IPCFrame.IInvokeMethod} m InvokeMethod message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                InvokeMethod.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.serviceId != null && Object.hasOwnProperty.call(m, "serviceId"))
                        w.uint32(8).uint32(m.serviceId);
                    if (m.methodId != null && Object.hasOwnProperty.call(m, "methodId"))
                        w.uint32(16).uint32(m.methodId);
                    if (m.argsProto != null && Object.hasOwnProperty.call(m, "argsProto"))
                        w.uint32(26).bytes(m.argsProto);
                    if (m.dropReply != null && Object.hasOwnProperty.call(m, "dropReply"))
                        w.uint32(32).bool(m.dropReply);
                    return w;
                };

                /**
                 * Encodes the specified InvokeMethod message, length delimited. Does not implicitly {@link perfetto.protos.IPCFrame.InvokeMethod.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.IPCFrame.InvokeMethod
                 * @static
                 * @param {perfetto.protos.IPCFrame.IInvokeMethod} message InvokeMethod message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                InvokeMethod.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an InvokeMethod message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.IPCFrame.InvokeMethod
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.IPCFrame.InvokeMethod} InvokeMethod
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                InvokeMethod.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IPCFrame.InvokeMethod();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.serviceId = r.uint32();
                            break;
                        case 2:
                            m.methodId = r.uint32();
                            break;
                        case 3:
                            m.argsProto = r.bytes();
                            break;
                        case 4:
                            m.dropReply = r.bool();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an InvokeMethod message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.IPCFrame.InvokeMethod
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.IPCFrame.InvokeMethod} InvokeMethod
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                InvokeMethod.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an InvokeMethod message.
                 * @function verify
                 * @memberof perfetto.protos.IPCFrame.InvokeMethod
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                InvokeMethod.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.serviceId != null && m.hasOwnProperty("serviceId")) {
                        if (!$util.isInteger(m.serviceId))
                            return "serviceId: integer expected";
                    }
                    if (m.methodId != null && m.hasOwnProperty("methodId")) {
                        if (!$util.isInteger(m.methodId))
                            return "methodId: integer expected";
                    }
                    if (m.argsProto != null && m.hasOwnProperty("argsProto")) {
                        if (!(m.argsProto && typeof m.argsProto.length === "number" || $util.isString(m.argsProto)))
                            return "argsProto: buffer expected";
                    }
                    if (m.dropReply != null && m.hasOwnProperty("dropReply")) {
                        if (typeof m.dropReply !== "boolean")
                            return "dropReply: boolean expected";
                    }
                    return null;
                };

                /**
                 * Creates an InvokeMethod message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.IPCFrame.InvokeMethod
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.IPCFrame.InvokeMethod} InvokeMethod
                 */
                InvokeMethod.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.IPCFrame.InvokeMethod)
                        return d;
                    var m = new $root.perfetto.protos.IPCFrame.InvokeMethod();
                    if (d.serviceId != null) {
                        m.serviceId = d.serviceId >>> 0;
                    }
                    if (d.methodId != null) {
                        m.methodId = d.methodId >>> 0;
                    }
                    if (d.argsProto != null) {
                        if (typeof d.argsProto === "string")
                            $util.base64.decode(d.argsProto, m.argsProto = $util.newBuffer($util.base64.length(d.argsProto)), 0);
                        else if (d.argsProto.length)
                            m.argsProto = d.argsProto;
                    }
                    if (d.dropReply != null) {
                        m.dropReply = Boolean(d.dropReply);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an InvokeMethod message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.IPCFrame.InvokeMethod
                 * @static
                 * @param {perfetto.protos.IPCFrame.InvokeMethod} m InvokeMethod
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                InvokeMethod.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.serviceId = 0;
                        d.methodId = 0;
                        if (o.bytes === String)
                            d.argsProto = "";
                        else {
                            d.argsProto = [];
                            if (o.bytes !== Array)
                                d.argsProto = $util.newBuffer(d.argsProto);
                        }
                        d.dropReply = false;
                    }
                    if (m.serviceId != null && m.hasOwnProperty("serviceId")) {
                        d.serviceId = m.serviceId;
                    }
                    if (m.methodId != null && m.hasOwnProperty("methodId")) {
                        d.methodId = m.methodId;
                    }
                    if (m.argsProto != null && m.hasOwnProperty("argsProto")) {
                        d.argsProto = o.bytes === String ? $util.base64.encode(m.argsProto, 0, m.argsProto.length) : o.bytes === Array ? Array.prototype.slice.call(m.argsProto) : m.argsProto;
                    }
                    if (m.dropReply != null && m.hasOwnProperty("dropReply")) {
                        d.dropReply = m.dropReply;
                    }
                    return d;
                };

                /**
                 * Converts this InvokeMethod to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.IPCFrame.InvokeMethod
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                InvokeMethod.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return InvokeMethod;
            })();

            IPCFrame.InvokeMethodReply = (function() {

                /**
                 * Properties of an InvokeMethodReply.
                 * @memberof perfetto.protos.IPCFrame
                 * @interface IInvokeMethodReply
                 * @property {boolean|null} [success] InvokeMethodReply success
                 * @property {boolean|null} [hasMore] InvokeMethodReply hasMore
                 * @property {Uint8Array|null} [replyProto] InvokeMethodReply replyProto
                 */

                /**
                 * Constructs a new InvokeMethodReply.
                 * @memberof perfetto.protos.IPCFrame
                 * @classdesc Represents an InvokeMethodReply.
                 * @implements IInvokeMethodReply
                 * @constructor
                 * @param {perfetto.protos.IPCFrame.IInvokeMethodReply=} [p] Properties to set
                 */
                function InvokeMethodReply(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * InvokeMethodReply success.
                 * @member {boolean} success
                 * @memberof perfetto.protos.IPCFrame.InvokeMethodReply
                 * @instance
                 */
                InvokeMethodReply.prototype.success = false;

                /**
                 * InvokeMethodReply hasMore.
                 * @member {boolean} hasMore
                 * @memberof perfetto.protos.IPCFrame.InvokeMethodReply
                 * @instance
                 */
                InvokeMethodReply.prototype.hasMore = false;

                /**
                 * InvokeMethodReply replyProto.
                 * @member {Uint8Array} replyProto
                 * @memberof perfetto.protos.IPCFrame.InvokeMethodReply
                 * @instance
                 */
                InvokeMethodReply.prototype.replyProto = $util.newBuffer([]);

                /**
                 * Creates a new InvokeMethodReply instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.IPCFrame.InvokeMethodReply
                 * @static
                 * @param {perfetto.protos.IPCFrame.IInvokeMethodReply=} [properties] Properties to set
                 * @returns {perfetto.protos.IPCFrame.InvokeMethodReply} InvokeMethodReply instance
                 */
                InvokeMethodReply.create = function create(properties) {
                    return new InvokeMethodReply(properties);
                };

                /**
                 * Encodes the specified InvokeMethodReply message. Does not implicitly {@link perfetto.protos.IPCFrame.InvokeMethodReply.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.IPCFrame.InvokeMethodReply
                 * @static
                 * @param {perfetto.protos.IPCFrame.IInvokeMethodReply} m InvokeMethodReply message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                InvokeMethodReply.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.success != null && Object.hasOwnProperty.call(m, "success"))
                        w.uint32(8).bool(m.success);
                    if (m.hasMore != null && Object.hasOwnProperty.call(m, "hasMore"))
                        w.uint32(16).bool(m.hasMore);
                    if (m.replyProto != null && Object.hasOwnProperty.call(m, "replyProto"))
                        w.uint32(26).bytes(m.replyProto);
                    return w;
                };

                /**
                 * Encodes the specified InvokeMethodReply message, length delimited. Does not implicitly {@link perfetto.protos.IPCFrame.InvokeMethodReply.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.IPCFrame.InvokeMethodReply
                 * @static
                 * @param {perfetto.protos.IPCFrame.IInvokeMethodReply} message InvokeMethodReply message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                InvokeMethodReply.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an InvokeMethodReply message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.IPCFrame.InvokeMethodReply
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.IPCFrame.InvokeMethodReply} InvokeMethodReply
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                InvokeMethodReply.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IPCFrame.InvokeMethodReply();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.success = r.bool();
                            break;
                        case 2:
                            m.hasMore = r.bool();
                            break;
                        case 3:
                            m.replyProto = r.bytes();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an InvokeMethodReply message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.IPCFrame.InvokeMethodReply
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.IPCFrame.InvokeMethodReply} InvokeMethodReply
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                InvokeMethodReply.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an InvokeMethodReply message.
                 * @function verify
                 * @memberof perfetto.protos.IPCFrame.InvokeMethodReply
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                InvokeMethodReply.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.success != null && m.hasOwnProperty("success")) {
                        if (typeof m.success !== "boolean")
                            return "success: boolean expected";
                    }
                    if (m.hasMore != null && m.hasOwnProperty("hasMore")) {
                        if (typeof m.hasMore !== "boolean")
                            return "hasMore: boolean expected";
                    }
                    if (m.replyProto != null && m.hasOwnProperty("replyProto")) {
                        if (!(m.replyProto && typeof m.replyProto.length === "number" || $util.isString(m.replyProto)))
                            return "replyProto: buffer expected";
                    }
                    return null;
                };

                /**
                 * Creates an InvokeMethodReply message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.IPCFrame.InvokeMethodReply
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.IPCFrame.InvokeMethodReply} InvokeMethodReply
                 */
                InvokeMethodReply.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.IPCFrame.InvokeMethodReply)
                        return d;
                    var m = new $root.perfetto.protos.IPCFrame.InvokeMethodReply();
                    if (d.success != null) {
                        m.success = Boolean(d.success);
                    }
                    if (d.hasMore != null) {
                        m.hasMore = Boolean(d.hasMore);
                    }
                    if (d.replyProto != null) {
                        if (typeof d.replyProto === "string")
                            $util.base64.decode(d.replyProto, m.replyProto = $util.newBuffer($util.base64.length(d.replyProto)), 0);
                        else if (d.replyProto.length)
                            m.replyProto = d.replyProto;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an InvokeMethodReply message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.IPCFrame.InvokeMethodReply
                 * @static
                 * @param {perfetto.protos.IPCFrame.InvokeMethodReply} m InvokeMethodReply
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                InvokeMethodReply.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.success = false;
                        d.hasMore = false;
                        if (o.bytes === String)
                            d.replyProto = "";
                        else {
                            d.replyProto = [];
                            if (o.bytes !== Array)
                                d.replyProto = $util.newBuffer(d.replyProto);
                        }
                    }
                    if (m.success != null && m.hasOwnProperty("success")) {
                        d.success = m.success;
                    }
                    if (m.hasMore != null && m.hasOwnProperty("hasMore")) {
                        d.hasMore = m.hasMore;
                    }
                    if (m.replyProto != null && m.hasOwnProperty("replyProto")) {
                        d.replyProto = o.bytes === String ? $util.base64.encode(m.replyProto, 0, m.replyProto.length) : o.bytes === Array ? Array.prototype.slice.call(m.replyProto) : m.replyProto;
                    }
                    return d;
                };

                /**
                 * Converts this InvokeMethodReply to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.IPCFrame.InvokeMethodReply
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                InvokeMethodReply.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return InvokeMethodReply;
            })();

            IPCFrame.RequestError = (function() {

                /**
                 * Properties of a RequestError.
                 * @memberof perfetto.protos.IPCFrame
                 * @interface IRequestError
                 * @property {string|null} [error] RequestError error
                 */

                /**
                 * Constructs a new RequestError.
                 * @memberof perfetto.protos.IPCFrame
                 * @classdesc Represents a RequestError.
                 * @implements IRequestError
                 * @constructor
                 * @param {perfetto.protos.IPCFrame.IRequestError=} [p] Properties to set
                 */
                function RequestError(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * RequestError error.
                 * @member {string} error
                 * @memberof perfetto.protos.IPCFrame.RequestError
                 * @instance
                 */
                RequestError.prototype.error = "";

                /**
                 * Creates a new RequestError instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.IPCFrame.RequestError
                 * @static
                 * @param {perfetto.protos.IPCFrame.IRequestError=} [properties] Properties to set
                 * @returns {perfetto.protos.IPCFrame.RequestError} RequestError instance
                 */
                RequestError.create = function create(properties) {
                    return new RequestError(properties);
                };

                /**
                 * Encodes the specified RequestError message. Does not implicitly {@link perfetto.protos.IPCFrame.RequestError.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.IPCFrame.RequestError
                 * @static
                 * @param {perfetto.protos.IPCFrame.IRequestError} m RequestError message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                RequestError.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.error != null && Object.hasOwnProperty.call(m, "error"))
                        w.uint32(10).string(m.error);
                    return w;
                };

                /**
                 * Encodes the specified RequestError message, length delimited. Does not implicitly {@link perfetto.protos.IPCFrame.RequestError.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.IPCFrame.RequestError
                 * @static
                 * @param {perfetto.protos.IPCFrame.IRequestError} message RequestError message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                RequestError.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a RequestError message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.IPCFrame.RequestError
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.IPCFrame.RequestError} RequestError
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                RequestError.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IPCFrame.RequestError();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.error = r.string();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a RequestError message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.IPCFrame.RequestError
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.IPCFrame.RequestError} RequestError
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                RequestError.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a RequestError message.
                 * @function verify
                 * @memberof perfetto.protos.IPCFrame.RequestError
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                RequestError.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.error != null && m.hasOwnProperty("error")) {
                        if (!$util.isString(m.error))
                            return "error: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a RequestError message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.IPCFrame.RequestError
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.IPCFrame.RequestError} RequestError
                 */
                RequestError.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.IPCFrame.RequestError)
                        return d;
                    var m = new $root.perfetto.protos.IPCFrame.RequestError();
                    if (d.error != null) {
                        m.error = String(d.error);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a RequestError message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.IPCFrame.RequestError
                 * @static
                 * @param {perfetto.protos.IPCFrame.RequestError} m RequestError
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                RequestError.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.error = "";
                    }
                    if (m.error != null && m.hasOwnProperty("error")) {
                        d.error = m.error;
                    }
                    return d;
                };

                /**
                 * Converts this RequestError to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.IPCFrame.RequestError
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                RequestError.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return RequestError;
            })();

            return IPCFrame;
        })();

        protos.TraceMetadata = (function() {

            /**
             * Properties of a TraceMetadata.
             * @memberof perfetto.protos
             * @interface ITraceMetadata
             * @property {number|null} [traceDurationNs] TraceMetadata traceDurationNs
             * @property {string|null} [traceUuid] TraceMetadata traceUuid
             * @property {string|null} [androidBuildFingerprint] TraceMetadata androidBuildFingerprint
             * @property {number|null} [statsdTriggeringSubscriptionId] TraceMetadata statsdTriggeringSubscriptionId
             * @property {number|null} [traceSizeBytes] TraceMetadata traceSizeBytes
             * @property {Array.<string>|null} [traceTrigger] TraceMetadata traceTrigger
             * @property {string|null} [uniqueSessionName] TraceMetadata uniqueSessionName
             * @property {string|null} [traceConfigPbtxt] TraceMetadata traceConfigPbtxt
             * @property {number|null} [schedDurationNs] TraceMetadata schedDurationNs
             */

            /**
             * Constructs a new TraceMetadata.
             * @memberof perfetto.protos
             * @classdesc Represents a TraceMetadata.
             * @implements ITraceMetadata
             * @constructor
             * @param {perfetto.protos.ITraceMetadata=} [p] Properties to set
             */
            function TraceMetadata(p) {
                this.traceTrigger = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TraceMetadata traceDurationNs.
             * @member {number} traceDurationNs
             * @memberof perfetto.protos.TraceMetadata
             * @instance
             */
            TraceMetadata.prototype.traceDurationNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * TraceMetadata traceUuid.
             * @member {string} traceUuid
             * @memberof perfetto.protos.TraceMetadata
             * @instance
             */
            TraceMetadata.prototype.traceUuid = "";

            /**
             * TraceMetadata androidBuildFingerprint.
             * @member {string} androidBuildFingerprint
             * @memberof perfetto.protos.TraceMetadata
             * @instance
             */
            TraceMetadata.prototype.androidBuildFingerprint = "";

            /**
             * TraceMetadata statsdTriggeringSubscriptionId.
             * @member {number} statsdTriggeringSubscriptionId
             * @memberof perfetto.protos.TraceMetadata
             * @instance
             */
            TraceMetadata.prototype.statsdTriggeringSubscriptionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * TraceMetadata traceSizeBytes.
             * @member {number} traceSizeBytes
             * @memberof perfetto.protos.TraceMetadata
             * @instance
             */
            TraceMetadata.prototype.traceSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * TraceMetadata traceTrigger.
             * @member {Array.<string>} traceTrigger
             * @memberof perfetto.protos.TraceMetadata
             * @instance
             */
            TraceMetadata.prototype.traceTrigger = $util.emptyArray;

            /**
             * TraceMetadata uniqueSessionName.
             * @member {string} uniqueSessionName
             * @memberof perfetto.protos.TraceMetadata
             * @instance
             */
            TraceMetadata.prototype.uniqueSessionName = "";

            /**
             * TraceMetadata traceConfigPbtxt.
             * @member {string} traceConfigPbtxt
             * @memberof perfetto.protos.TraceMetadata
             * @instance
             */
            TraceMetadata.prototype.traceConfigPbtxt = "";

            /**
             * TraceMetadata schedDurationNs.
             * @member {number} schedDurationNs
             * @memberof perfetto.protos.TraceMetadata
             * @instance
             */
            TraceMetadata.prototype.schedDurationNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new TraceMetadata instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TraceMetadata
             * @static
             * @param {perfetto.protos.ITraceMetadata=} [properties] Properties to set
             * @returns {perfetto.protos.TraceMetadata} TraceMetadata instance
             */
            TraceMetadata.create = function create(properties) {
                return new TraceMetadata(properties);
            };

            /**
             * Encodes the specified TraceMetadata message. Does not implicitly {@link perfetto.protos.TraceMetadata.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TraceMetadata
             * @static
             * @param {perfetto.protos.ITraceMetadata} m TraceMetadata message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TraceMetadata.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.traceDurationNs != null && Object.hasOwnProperty.call(m, "traceDurationNs"))
                    w.uint32(16).int64(m.traceDurationNs);
                if (m.traceUuid != null && Object.hasOwnProperty.call(m, "traceUuid"))
                    w.uint32(26).string(m.traceUuid);
                if (m.androidBuildFingerprint != null && Object.hasOwnProperty.call(m, "androidBuildFingerprint"))
                    w.uint32(34).string(m.androidBuildFingerprint);
                if (m.statsdTriggeringSubscriptionId != null && Object.hasOwnProperty.call(m, "statsdTriggeringSubscriptionId"))
                    w.uint32(40).int64(m.statsdTriggeringSubscriptionId);
                if (m.traceSizeBytes != null && Object.hasOwnProperty.call(m, "traceSizeBytes"))
                    w.uint32(48).int64(m.traceSizeBytes);
                if (m.traceTrigger != null && m.traceTrigger.length) {
                    for (var i = 0; i < m.traceTrigger.length; ++i)
                        w.uint32(58).string(m.traceTrigger[i]);
                }
                if (m.uniqueSessionName != null && Object.hasOwnProperty.call(m, "uniqueSessionName"))
                    w.uint32(66).string(m.uniqueSessionName);
                if (m.traceConfigPbtxt != null && Object.hasOwnProperty.call(m, "traceConfigPbtxt"))
                    w.uint32(74).string(m.traceConfigPbtxt);
                if (m.schedDurationNs != null && Object.hasOwnProperty.call(m, "schedDurationNs"))
                    w.uint32(80).int64(m.schedDurationNs);
                return w;
            };

            /**
             * Encodes the specified TraceMetadata message, length delimited. Does not implicitly {@link perfetto.protos.TraceMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TraceMetadata
             * @static
             * @param {perfetto.protos.ITraceMetadata} message TraceMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TraceMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TraceMetadata message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TraceMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TraceMetadata} TraceMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TraceMetadata.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TraceMetadata();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 2:
                        m.traceDurationNs = r.int64();
                        break;
                    case 3:
                        m.traceUuid = r.string();
                        break;
                    case 4:
                        m.androidBuildFingerprint = r.string();
                        break;
                    case 5:
                        m.statsdTriggeringSubscriptionId = r.int64();
                        break;
                    case 6:
                        m.traceSizeBytes = r.int64();
                        break;
                    case 7:
                        if (!(m.traceTrigger && m.traceTrigger.length))
                            m.traceTrigger = [];
                        m.traceTrigger.push(r.string());
                        break;
                    case 8:
                        m.uniqueSessionName = r.string();
                        break;
                    case 9:
                        m.traceConfigPbtxt = r.string();
                        break;
                    case 10:
                        m.schedDurationNs = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TraceMetadata message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TraceMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TraceMetadata} TraceMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TraceMetadata.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TraceMetadata message.
             * @function verify
             * @memberof perfetto.protos.TraceMetadata
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TraceMetadata.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.traceDurationNs != null && m.hasOwnProperty("traceDurationNs")) {
                    if (!$util.isInteger(m.traceDurationNs) && !(m.traceDurationNs && $util.isInteger(m.traceDurationNs.low) && $util.isInteger(m.traceDurationNs.high)))
                        return "traceDurationNs: integer|Long expected";
                }
                if (m.traceUuid != null && m.hasOwnProperty("traceUuid")) {
                    if (!$util.isString(m.traceUuid))
                        return "traceUuid: string expected";
                }
                if (m.androidBuildFingerprint != null && m.hasOwnProperty("androidBuildFingerprint")) {
                    if (!$util.isString(m.androidBuildFingerprint))
                        return "androidBuildFingerprint: string expected";
                }
                if (m.statsdTriggeringSubscriptionId != null && m.hasOwnProperty("statsdTriggeringSubscriptionId")) {
                    if (!$util.isInteger(m.statsdTriggeringSubscriptionId) && !(m.statsdTriggeringSubscriptionId && $util.isInteger(m.statsdTriggeringSubscriptionId.low) && $util.isInteger(m.statsdTriggeringSubscriptionId.high)))
                        return "statsdTriggeringSubscriptionId: integer|Long expected";
                }
                if (m.traceSizeBytes != null && m.hasOwnProperty("traceSizeBytes")) {
                    if (!$util.isInteger(m.traceSizeBytes) && !(m.traceSizeBytes && $util.isInteger(m.traceSizeBytes.low) && $util.isInteger(m.traceSizeBytes.high)))
                        return "traceSizeBytes: integer|Long expected";
                }
                if (m.traceTrigger != null && m.hasOwnProperty("traceTrigger")) {
                    if (!Array.isArray(m.traceTrigger))
                        return "traceTrigger: array expected";
                    for (var i = 0; i < m.traceTrigger.length; ++i) {
                        if (!$util.isString(m.traceTrigger[i]))
                            return "traceTrigger: string[] expected";
                    }
                }
                if (m.uniqueSessionName != null && m.hasOwnProperty("uniqueSessionName")) {
                    if (!$util.isString(m.uniqueSessionName))
                        return "uniqueSessionName: string expected";
                }
                if (m.traceConfigPbtxt != null && m.hasOwnProperty("traceConfigPbtxt")) {
                    if (!$util.isString(m.traceConfigPbtxt))
                        return "traceConfigPbtxt: string expected";
                }
                if (m.schedDurationNs != null && m.hasOwnProperty("schedDurationNs")) {
                    if (!$util.isInteger(m.schedDurationNs) && !(m.schedDurationNs && $util.isInteger(m.schedDurationNs.low) && $util.isInteger(m.schedDurationNs.high)))
                        return "schedDurationNs: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a TraceMetadata message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TraceMetadata
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TraceMetadata} TraceMetadata
             */
            TraceMetadata.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TraceMetadata)
                    return d;
                var m = new $root.perfetto.protos.TraceMetadata();
                if (d.traceDurationNs != null) {
                    if ($util.Long)
                        (m.traceDurationNs = $util.Long.fromValue(d.traceDurationNs)).unsigned = false;
                    else if (typeof d.traceDurationNs === "string")
                        m.traceDurationNs = parseInt(d.traceDurationNs, 10);
                    else if (typeof d.traceDurationNs === "number")
                        m.traceDurationNs = d.traceDurationNs;
                    else if (typeof d.traceDurationNs === "object")
                        m.traceDurationNs = new $util.LongBits(d.traceDurationNs.low >>> 0, d.traceDurationNs.high >>> 0).toNumber();
                }
                if (d.traceUuid != null) {
                    m.traceUuid = String(d.traceUuid);
                }
                if (d.androidBuildFingerprint != null) {
                    m.androidBuildFingerprint = String(d.androidBuildFingerprint);
                }
                if (d.statsdTriggeringSubscriptionId != null) {
                    if ($util.Long)
                        (m.statsdTriggeringSubscriptionId = $util.Long.fromValue(d.statsdTriggeringSubscriptionId)).unsigned = false;
                    else if (typeof d.statsdTriggeringSubscriptionId === "string")
                        m.statsdTriggeringSubscriptionId = parseInt(d.statsdTriggeringSubscriptionId, 10);
                    else if (typeof d.statsdTriggeringSubscriptionId === "number")
                        m.statsdTriggeringSubscriptionId = d.statsdTriggeringSubscriptionId;
                    else if (typeof d.statsdTriggeringSubscriptionId === "object")
                        m.statsdTriggeringSubscriptionId = new $util.LongBits(d.statsdTriggeringSubscriptionId.low >>> 0, d.statsdTriggeringSubscriptionId.high >>> 0).toNumber();
                }
                if (d.traceSizeBytes != null) {
                    if ($util.Long)
                        (m.traceSizeBytes = $util.Long.fromValue(d.traceSizeBytes)).unsigned = false;
                    else if (typeof d.traceSizeBytes === "string")
                        m.traceSizeBytes = parseInt(d.traceSizeBytes, 10);
                    else if (typeof d.traceSizeBytes === "number")
                        m.traceSizeBytes = d.traceSizeBytes;
                    else if (typeof d.traceSizeBytes === "object")
                        m.traceSizeBytes = new $util.LongBits(d.traceSizeBytes.low >>> 0, d.traceSizeBytes.high >>> 0).toNumber();
                }
                if (d.traceTrigger) {
                    if (!Array.isArray(d.traceTrigger))
                        throw TypeError(".perfetto.protos.TraceMetadata.traceTrigger: array expected");
                    m.traceTrigger = [];
                    for (var i = 0; i < d.traceTrigger.length; ++i) {
                        m.traceTrigger[i] = String(d.traceTrigger[i]);
                    }
                }
                if (d.uniqueSessionName != null) {
                    m.uniqueSessionName = String(d.uniqueSessionName);
                }
                if (d.traceConfigPbtxt != null) {
                    m.traceConfigPbtxt = String(d.traceConfigPbtxt);
                }
                if (d.schedDurationNs != null) {
                    if ($util.Long)
                        (m.schedDurationNs = $util.Long.fromValue(d.schedDurationNs)).unsigned = false;
                    else if (typeof d.schedDurationNs === "string")
                        m.schedDurationNs = parseInt(d.schedDurationNs, 10);
                    else if (typeof d.schedDurationNs === "number")
                        m.schedDurationNs = d.schedDurationNs;
                    else if (typeof d.schedDurationNs === "object")
                        m.schedDurationNs = new $util.LongBits(d.schedDurationNs.low >>> 0, d.schedDurationNs.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from a TraceMetadata message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TraceMetadata
             * @static
             * @param {perfetto.protos.TraceMetadata} m TraceMetadata
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TraceMetadata.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.traceTrigger = [];
                }
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.traceDurationNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.traceDurationNs = o.longs === String ? "0" : 0;
                    d.traceUuid = "";
                    d.androidBuildFingerprint = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.statsdTriggeringSubscriptionId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.statsdTriggeringSubscriptionId = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.traceSizeBytes = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.traceSizeBytes = o.longs === String ? "0" : 0;
                    d.uniqueSessionName = "";
                    d.traceConfigPbtxt = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.schedDurationNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.schedDurationNs = o.longs === String ? "0" : 0;
                }
                if (m.traceDurationNs != null && m.hasOwnProperty("traceDurationNs")) {
                    if (typeof m.traceDurationNs === "number")
                        d.traceDurationNs = o.longs === String ? String(m.traceDurationNs) : m.traceDurationNs;
                    else
                        d.traceDurationNs = o.longs === String ? $util.Long.prototype.toString.call(m.traceDurationNs) : o.longs === Number ? new $util.LongBits(m.traceDurationNs.low >>> 0, m.traceDurationNs.high >>> 0).toNumber() : m.traceDurationNs;
                }
                if (m.traceUuid != null && m.hasOwnProperty("traceUuid")) {
                    d.traceUuid = m.traceUuid;
                }
                if (m.androidBuildFingerprint != null && m.hasOwnProperty("androidBuildFingerprint")) {
                    d.androidBuildFingerprint = m.androidBuildFingerprint;
                }
                if (m.statsdTriggeringSubscriptionId != null && m.hasOwnProperty("statsdTriggeringSubscriptionId")) {
                    if (typeof m.statsdTriggeringSubscriptionId === "number")
                        d.statsdTriggeringSubscriptionId = o.longs === String ? String(m.statsdTriggeringSubscriptionId) : m.statsdTriggeringSubscriptionId;
                    else
                        d.statsdTriggeringSubscriptionId = o.longs === String ? $util.Long.prototype.toString.call(m.statsdTriggeringSubscriptionId) : o.longs === Number ? new $util.LongBits(m.statsdTriggeringSubscriptionId.low >>> 0, m.statsdTriggeringSubscriptionId.high >>> 0).toNumber() : m.statsdTriggeringSubscriptionId;
                }
                if (m.traceSizeBytes != null && m.hasOwnProperty("traceSizeBytes")) {
                    if (typeof m.traceSizeBytes === "number")
                        d.traceSizeBytes = o.longs === String ? String(m.traceSizeBytes) : m.traceSizeBytes;
                    else
                        d.traceSizeBytes = o.longs === String ? $util.Long.prototype.toString.call(m.traceSizeBytes) : o.longs === Number ? new $util.LongBits(m.traceSizeBytes.low >>> 0, m.traceSizeBytes.high >>> 0).toNumber() : m.traceSizeBytes;
                }
                if (m.traceTrigger && m.traceTrigger.length) {
                    d.traceTrigger = [];
                    for (var j = 0; j < m.traceTrigger.length; ++j) {
                        d.traceTrigger[j] = m.traceTrigger[j];
                    }
                }
                if (m.uniqueSessionName != null && m.hasOwnProperty("uniqueSessionName")) {
                    d.uniqueSessionName = m.uniqueSessionName;
                }
                if (m.traceConfigPbtxt != null && m.hasOwnProperty("traceConfigPbtxt")) {
                    d.traceConfigPbtxt = m.traceConfigPbtxt;
                }
                if (m.schedDurationNs != null && m.hasOwnProperty("schedDurationNs")) {
                    if (typeof m.schedDurationNs === "number")
                        d.schedDurationNs = o.longs === String ? String(m.schedDurationNs) : m.schedDurationNs;
                    else
                        d.schedDurationNs = o.longs === String ? $util.Long.prototype.toString.call(m.schedDurationNs) : o.longs === Number ? new $util.LongBits(m.schedDurationNs.low >>> 0, m.schedDurationNs.high >>> 0).toNumber() : m.schedDurationNs;
                }
                return d;
            };

            /**
             * Converts this TraceMetadata to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TraceMetadata
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TraceMetadata.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TraceMetadata;
        })();

        protos.TraceAnalysisStats = (function() {

            /**
             * Properties of a TraceAnalysisStats.
             * @memberof perfetto.protos
             * @interface ITraceAnalysisStats
             * @property {Array.<perfetto.protos.TraceAnalysisStats.IStat>|null} [stat] TraceAnalysisStats stat
             */

            /**
             * Constructs a new TraceAnalysisStats.
             * @memberof perfetto.protos
             * @classdesc Represents a TraceAnalysisStats.
             * @implements ITraceAnalysisStats
             * @constructor
             * @param {perfetto.protos.ITraceAnalysisStats=} [p] Properties to set
             */
            function TraceAnalysisStats(p) {
                this.stat = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TraceAnalysisStats stat.
             * @member {Array.<perfetto.protos.TraceAnalysisStats.IStat>} stat
             * @memberof perfetto.protos.TraceAnalysisStats
             * @instance
             */
            TraceAnalysisStats.prototype.stat = $util.emptyArray;

            /**
             * Creates a new TraceAnalysisStats instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TraceAnalysisStats
             * @static
             * @param {perfetto.protos.ITraceAnalysisStats=} [properties] Properties to set
             * @returns {perfetto.protos.TraceAnalysisStats} TraceAnalysisStats instance
             */
            TraceAnalysisStats.create = function create(properties) {
                return new TraceAnalysisStats(properties);
            };

            /**
             * Encodes the specified TraceAnalysisStats message. Does not implicitly {@link perfetto.protos.TraceAnalysisStats.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TraceAnalysisStats
             * @static
             * @param {perfetto.protos.ITraceAnalysisStats} m TraceAnalysisStats message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TraceAnalysisStats.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.stat != null && m.stat.length) {
                    for (var i = 0; i < m.stat.length; ++i)
                        $root.perfetto.protos.TraceAnalysisStats.Stat.encode(m.stat[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified TraceAnalysisStats message, length delimited. Does not implicitly {@link perfetto.protos.TraceAnalysisStats.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TraceAnalysisStats
             * @static
             * @param {perfetto.protos.ITraceAnalysisStats} message TraceAnalysisStats message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TraceAnalysisStats.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TraceAnalysisStats message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TraceAnalysisStats
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TraceAnalysisStats} TraceAnalysisStats
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TraceAnalysisStats.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TraceAnalysisStats();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.stat && m.stat.length))
                            m.stat = [];
                        m.stat.push($root.perfetto.protos.TraceAnalysisStats.Stat.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TraceAnalysisStats message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TraceAnalysisStats
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TraceAnalysisStats} TraceAnalysisStats
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TraceAnalysisStats.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TraceAnalysisStats message.
             * @function verify
             * @memberof perfetto.protos.TraceAnalysisStats
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TraceAnalysisStats.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.stat != null && m.hasOwnProperty("stat")) {
                    if (!Array.isArray(m.stat))
                        return "stat: array expected";
                    for (var i = 0; i < m.stat.length; ++i) {
                        {
                            var e = $root.perfetto.protos.TraceAnalysisStats.Stat.verify(m.stat[i]);
                            if (e)
                                return "stat." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a TraceAnalysisStats message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TraceAnalysisStats
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TraceAnalysisStats} TraceAnalysisStats
             */
            TraceAnalysisStats.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TraceAnalysisStats)
                    return d;
                var m = new $root.perfetto.protos.TraceAnalysisStats();
                if (d.stat) {
                    if (!Array.isArray(d.stat))
                        throw TypeError(".perfetto.protos.TraceAnalysisStats.stat: array expected");
                    m.stat = [];
                    for (var i = 0; i < d.stat.length; ++i) {
                        if (typeof d.stat[i] !== "object")
                            throw TypeError(".perfetto.protos.TraceAnalysisStats.stat: object expected");
                        m.stat[i] = $root.perfetto.protos.TraceAnalysisStats.Stat.fromObject(d.stat[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a TraceAnalysisStats message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TraceAnalysisStats
             * @static
             * @param {perfetto.protos.TraceAnalysisStats} m TraceAnalysisStats
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TraceAnalysisStats.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.stat = [];
                }
                if (m.stat && m.stat.length) {
                    d.stat = [];
                    for (var j = 0; j < m.stat.length; ++j) {
                        d.stat[j] = $root.perfetto.protos.TraceAnalysisStats.Stat.toObject(m.stat[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this TraceAnalysisStats to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TraceAnalysisStats
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TraceAnalysisStats.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * Severity enum.
             * @name perfetto.protos.TraceAnalysisStats.Severity
             * @enum {number}
             * @property {number} SEVERITY_UNKNOWN=0 SEVERITY_UNKNOWN value
             * @property {number} SEVERITY_INFO=1 SEVERITY_INFO value
             * @property {number} SEVERITY_DATA_LOSS=2 SEVERITY_DATA_LOSS value
             * @property {number} SEVERITY_ERROR=3 SEVERITY_ERROR value
             */
            TraceAnalysisStats.Severity = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "SEVERITY_UNKNOWN"] = 0;
                values[valuesById[1] = "SEVERITY_INFO"] = 1;
                values[valuesById[2] = "SEVERITY_DATA_LOSS"] = 2;
                values[valuesById[3] = "SEVERITY_ERROR"] = 3;
                return values;
            })();

            /**
             * Source enum.
             * @name perfetto.protos.TraceAnalysisStats.Source
             * @enum {number}
             * @property {number} SOURCE_UNKNOWN=0 SOURCE_UNKNOWN value
             * @property {number} SOURCE_TRACE=1 SOURCE_TRACE value
             * @property {number} SOURCE_ANALYSIS=2 SOURCE_ANALYSIS value
             */
            TraceAnalysisStats.Source = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "SOURCE_UNKNOWN"] = 0;
                values[valuesById[1] = "SOURCE_TRACE"] = 1;
                values[valuesById[2] = "SOURCE_ANALYSIS"] = 2;
                return values;
            })();

            TraceAnalysisStats.Stat = (function() {

                /**
                 * Properties of a Stat.
                 * @memberof perfetto.protos.TraceAnalysisStats
                 * @interface IStat
                 * @property {string|null} [name] Stat name
                 * @property {number|null} [idx] Stat idx
                 * @property {perfetto.protos.TraceAnalysisStats.Severity|null} [severity] Stat severity
                 * @property {perfetto.protos.TraceAnalysisStats.Source|null} [source] Stat source
                 * @property {number|null} [count] Stat count
                 */

                /**
                 * Constructs a new Stat.
                 * @memberof perfetto.protos.TraceAnalysisStats
                 * @classdesc Represents a Stat.
                 * @implements IStat
                 * @constructor
                 * @param {perfetto.protos.TraceAnalysisStats.IStat=} [p] Properties to set
                 */
                function Stat(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Stat name.
                 * @member {string} name
                 * @memberof perfetto.protos.TraceAnalysisStats.Stat
                 * @instance
                 */
                Stat.prototype.name = "";

                /**
                 * Stat idx.
                 * @member {number} idx
                 * @memberof perfetto.protos.TraceAnalysisStats.Stat
                 * @instance
                 */
                Stat.prototype.idx = 0;

                /**
                 * Stat severity.
                 * @member {perfetto.protos.TraceAnalysisStats.Severity} severity
                 * @memberof perfetto.protos.TraceAnalysisStats.Stat
                 * @instance
                 */
                Stat.prototype.severity = 0;

                /**
                 * Stat source.
                 * @member {perfetto.protos.TraceAnalysisStats.Source} source
                 * @memberof perfetto.protos.TraceAnalysisStats.Stat
                 * @instance
                 */
                Stat.prototype.source = 0;

                /**
                 * Stat count.
                 * @member {number} count
                 * @memberof perfetto.protos.TraceAnalysisStats.Stat
                 * @instance
                 */
                Stat.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new Stat instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.TraceAnalysisStats.Stat
                 * @static
                 * @param {perfetto.protos.TraceAnalysisStats.IStat=} [properties] Properties to set
                 * @returns {perfetto.protos.TraceAnalysisStats.Stat} Stat instance
                 */
                Stat.create = function create(properties) {
                    return new Stat(properties);
                };

                /**
                 * Encodes the specified Stat message. Does not implicitly {@link perfetto.protos.TraceAnalysisStats.Stat.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.TraceAnalysisStats.Stat
                 * @static
                 * @param {perfetto.protos.TraceAnalysisStats.IStat} m Stat message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Stat.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(10).string(m.name);
                    if (m.idx != null && Object.hasOwnProperty.call(m, "idx"))
                        w.uint32(16).uint32(m.idx);
                    if (m.severity != null && Object.hasOwnProperty.call(m, "severity"))
                        w.uint32(24).int32(m.severity);
                    if (m.source != null && Object.hasOwnProperty.call(m, "source"))
                        w.uint32(32).int32(m.source);
                    if (m.count != null && Object.hasOwnProperty.call(m, "count"))
                        w.uint32(40).int64(m.count);
                    return w;
                };

                /**
                 * Encodes the specified Stat message, length delimited. Does not implicitly {@link perfetto.protos.TraceAnalysisStats.Stat.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.TraceAnalysisStats.Stat
                 * @static
                 * @param {perfetto.protos.TraceAnalysisStats.IStat} message Stat message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Stat.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Stat message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.TraceAnalysisStats.Stat
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.TraceAnalysisStats.Stat} Stat
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Stat.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TraceAnalysisStats.Stat();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.name = r.string();
                            break;
                        case 2:
                            m.idx = r.uint32();
                            break;
                        case 3:
                            m.severity = r.int32();
                            break;
                        case 4:
                            m.source = r.int32();
                            break;
                        case 5:
                            m.count = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Stat message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.TraceAnalysisStats.Stat
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.TraceAnalysisStats.Stat} Stat
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Stat.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Stat message.
                 * @function verify
                 * @memberof perfetto.protos.TraceAnalysisStats.Stat
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Stat.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    if (m.idx != null && m.hasOwnProperty("idx")) {
                        if (!$util.isInteger(m.idx))
                            return "idx: integer expected";
                    }
                    if (m.severity != null && m.hasOwnProperty("severity")) {
                        switch (m.severity) {
                        default:
                            return "severity: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                            break;
                        }
                    }
                    if (m.source != null && m.hasOwnProperty("source")) {
                        switch (m.source) {
                        default:
                            return "source: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                            break;
                        }
                    }
                    if (m.count != null && m.hasOwnProperty("count")) {
                        if (!$util.isInteger(m.count) && !(m.count && $util.isInteger(m.count.low) && $util.isInteger(m.count.high)))
                            return "count: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a Stat message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.TraceAnalysisStats.Stat
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.TraceAnalysisStats.Stat} Stat
                 */
                Stat.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.TraceAnalysisStats.Stat)
                        return d;
                    var m = new $root.perfetto.protos.TraceAnalysisStats.Stat();
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    if (d.idx != null) {
                        m.idx = d.idx >>> 0;
                    }
                    switch (d.severity) {
                    case "SEVERITY_UNKNOWN":
                    case 0:
                        m.severity = 0;
                        break;
                    case "SEVERITY_INFO":
                    case 1:
                        m.severity = 1;
                        break;
                    case "SEVERITY_DATA_LOSS":
                    case 2:
                        m.severity = 2;
                        break;
                    case "SEVERITY_ERROR":
                    case 3:
                        m.severity = 3;
                        break;
                    }
                    switch (d.source) {
                    case "SOURCE_UNKNOWN":
                    case 0:
                        m.source = 0;
                        break;
                    case "SOURCE_TRACE":
                    case 1:
                        m.source = 1;
                        break;
                    case "SOURCE_ANALYSIS":
                    case 2:
                        m.source = 2;
                        break;
                    }
                    if (d.count != null) {
                        if ($util.Long)
                            (m.count = $util.Long.fromValue(d.count)).unsigned = false;
                        else if (typeof d.count === "string")
                            m.count = parseInt(d.count, 10);
                        else if (typeof d.count === "number")
                            m.count = d.count;
                        else if (typeof d.count === "object")
                            m.count = new $util.LongBits(d.count.low >>> 0, d.count.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Stat message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.TraceAnalysisStats.Stat
                 * @static
                 * @param {perfetto.protos.TraceAnalysisStats.Stat} m Stat
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Stat.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.name = "";
                        d.idx = 0;
                        d.severity = o.enums === String ? "SEVERITY_UNKNOWN" : 0;
                        d.source = o.enums === String ? "SOURCE_UNKNOWN" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.count = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.count = o.longs === String ? "0" : 0;
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    if (m.idx != null && m.hasOwnProperty("idx")) {
                        d.idx = m.idx;
                    }
                    if (m.severity != null && m.hasOwnProperty("severity")) {
                        d.severity = o.enums === String ? $root.perfetto.protos.TraceAnalysisStats.Severity[m.severity] : m.severity;
                    }
                    if (m.source != null && m.hasOwnProperty("source")) {
                        d.source = o.enums === String ? $root.perfetto.protos.TraceAnalysisStats.Source[m.source] : m.source;
                    }
                    if (m.count != null && m.hasOwnProperty("count")) {
                        if (typeof m.count === "number")
                            d.count = o.longs === String ? String(m.count) : m.count;
                        else
                            d.count = o.longs === String ? $util.Long.prototype.toString.call(m.count) : o.longs === Number ? new $util.LongBits(m.count.low >>> 0, m.count.high >>> 0).toNumber() : m.count;
                    }
                    return d;
                };

                /**
                 * Converts this Stat to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.TraceAnalysisStats.Stat
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Stat.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Stat;
            })();

            return TraceAnalysisStats;
        })();

        protos.TraceMetrics = (function() {

            /**
             * Properties of a TraceMetrics.
             * @memberof perfetto.protos
             * @interface ITraceMetrics
             * @property {perfetto.protos.IAndroidBatteryMetric|null} [androidBatt] TraceMetrics androidBatt
             * @property {perfetto.protos.IAndroidCpuMetric|null} [androidCpu] TraceMetrics androidCpu
             * @property {perfetto.protos.IAndroidMemoryMetric|null} [androidMem] TraceMetrics androidMem
             * @property {perfetto.protos.IAndroidMemoryUnaggregatedMetric|null} [androidMemUnagg] TraceMetrics androidMemUnagg
             * @property {perfetto.protos.IAndroidPackageList|null} [androidPackageList] TraceMetrics androidPackageList
             * @property {perfetto.protos.IAndroidIonMetric|null} [androidIon] TraceMetrics androidIon
             * @property {perfetto.protos.IAndroidFastrpcMetric|null} [androidFastrpc] TraceMetrics androidFastrpc
             * @property {perfetto.protos.IAndroidLmkMetric|null} [androidLmk] TraceMetrics androidLmk
             * @property {perfetto.protos.IAndroidPowerRails|null} [androidPowrails] TraceMetrics androidPowrails
             * @property {perfetto.protos.IAndroidStartupMetric|null} [androidStartup] TraceMetrics androidStartup
             * @property {perfetto.protos.ITraceMetadata|null} [traceMetadata] TraceMetrics traceMetadata
             * @property {perfetto.protos.ITraceAnalysisStats|null} [traceStats] TraceMetrics traceStats
             * @property {perfetto.protos.IUnsymbolizedFrames|null} [unsymbolizedFrames] TraceMetrics unsymbolizedFrames
             * @property {perfetto.protos.IJavaHeapStats|null} [javaHeapStats] TraceMetrics javaHeapStats
             * @property {perfetto.protos.IJavaHeapHistogram|null} [javaHeapHistogram] TraceMetrics javaHeapHistogram
             * @property {perfetto.protos.IAndroidLmkReasonMetric|null} [androidLmkReason] TraceMetrics androidLmkReason
             * @property {perfetto.protos.IAndroidHwuiMetric|null} [androidHwuiMetric] TraceMetrics androidHwuiMetric
             * @property {perfetto.protos.IAndroidDisplayMetrics|null} [displayMetrics] TraceMetrics displayMetrics
             * @property {perfetto.protos.IAndroidTaskNames|null} [androidTaskNames] TraceMetrics androidTaskNames
             * @property {perfetto.protos.IAndroidSurfaceflingerMetric|null} [androidSurfaceflinger] TraceMetrics androidSurfaceflinger
             * @property {perfetto.protos.IAndroidGpuMetric|null} [androidGpu] TraceMetrics androidGpu
             * @property {perfetto.protos.IAndroidSysUiCujMetrics|null} [androidSysuiCuj] TraceMetrics androidSysuiCuj
             * @property {perfetto.protos.IAndroidJankCujMetric|null} [androidJankCuj] TraceMetrics androidJankCuj
             * @property {perfetto.protos.IAndroidHwcomposerMetrics|null} [androidHwcomposer] TraceMetrics androidHwcomposer
             * @property {perfetto.protos.IG2dMetrics|null} [g2d] TraceMetrics g2d
             * @property {perfetto.protos.IAndroidDmaHeapMetric|null} [androidDmaHeap] TraceMetrics androidDmaHeap
             * @property {perfetto.protos.IAndroidTraceQualityMetric|null} [androidTraceQuality] TraceMetrics androidTraceQuality
             * @property {perfetto.protos.IProfilerSmaps|null} [profilerSmaps] TraceMetrics profilerSmaps
             * @property {perfetto.protos.IAndroidMultiuserMetric|null} [androidMultiuser] TraceMetrics androidMultiuser
             * @property {perfetto.protos.IAndroidSimpleperfMetric|null} [androidSimpleperf] TraceMetrics androidSimpleperf
             * @property {perfetto.protos.IAndroidCameraMetric|null} [androidCamera] TraceMetrics androidCamera
             * @property {perfetto.protos.IAndroidDvfsMetric|null} [androidDvfs] TraceMetrics androidDvfs
             * @property {perfetto.protos.IAndroidNetworkMetric|null} [androidNetperf] TraceMetrics androidNetperf
             * @property {perfetto.protos.IAndroidCameraUnaggregatedMetric|null} [androidCameraUnagg] TraceMetrics androidCameraUnagg
             * @property {perfetto.protos.IAndroidRtRuntimeMetric|null} [androidRtRuntime] TraceMetrics androidRtRuntime
             * @property {perfetto.protos.IAndroidIrqRuntimeMetric|null} [androidIrqRuntime] TraceMetrics androidIrqRuntime
             * @property {perfetto.protos.IAndroidTrustyWorkqueues|null} [androidTrustyWorkqueues] TraceMetrics androidTrustyWorkqueues
             * @property {perfetto.protos.IAndroidOtherTracesMetric|null} [androidOtherTraces] TraceMetrics androidOtherTraces
             * @property {perfetto.protos.IAndroidBinderMetric|null} [androidBinder] TraceMetrics androidBinder
             * @property {perfetto.protos.IAndroidFrameTimelineMetric|null} [androidFrameTimelineMetric] TraceMetrics androidFrameTimelineMetric
             */

            /**
             * Constructs a new TraceMetrics.
             * @memberof perfetto.protos
             * @classdesc Represents a TraceMetrics.
             * @implements ITraceMetrics
             * @constructor
             * @param {perfetto.protos.ITraceMetrics=} [p] Properties to set
             */
            function TraceMetrics(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TraceMetrics androidBatt.
             * @member {perfetto.protos.IAndroidBatteryMetric|null|undefined} androidBatt
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidBatt = null;

            /**
             * TraceMetrics androidCpu.
             * @member {perfetto.protos.IAndroidCpuMetric|null|undefined} androidCpu
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidCpu = null;

            /**
             * TraceMetrics androidMem.
             * @member {perfetto.protos.IAndroidMemoryMetric|null|undefined} androidMem
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidMem = null;

            /**
             * TraceMetrics androidMemUnagg.
             * @member {perfetto.protos.IAndroidMemoryUnaggregatedMetric|null|undefined} androidMemUnagg
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidMemUnagg = null;

            /**
             * TraceMetrics androidPackageList.
             * @member {perfetto.protos.IAndroidPackageList|null|undefined} androidPackageList
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidPackageList = null;

            /**
             * TraceMetrics androidIon.
             * @member {perfetto.protos.IAndroidIonMetric|null|undefined} androidIon
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidIon = null;

            /**
             * TraceMetrics androidFastrpc.
             * @member {perfetto.protos.IAndroidFastrpcMetric|null|undefined} androidFastrpc
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidFastrpc = null;

            /**
             * TraceMetrics androidLmk.
             * @member {perfetto.protos.IAndroidLmkMetric|null|undefined} androidLmk
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidLmk = null;

            /**
             * TraceMetrics androidPowrails.
             * @member {perfetto.protos.IAndroidPowerRails|null|undefined} androidPowrails
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidPowrails = null;

            /**
             * TraceMetrics androidStartup.
             * @member {perfetto.protos.IAndroidStartupMetric|null|undefined} androidStartup
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidStartup = null;

            /**
             * TraceMetrics traceMetadata.
             * @member {perfetto.protos.ITraceMetadata|null|undefined} traceMetadata
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.traceMetadata = null;

            /**
             * TraceMetrics traceStats.
             * @member {perfetto.protos.ITraceAnalysisStats|null|undefined} traceStats
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.traceStats = null;

            /**
             * TraceMetrics unsymbolizedFrames.
             * @member {perfetto.protos.IUnsymbolizedFrames|null|undefined} unsymbolizedFrames
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.unsymbolizedFrames = null;

            /**
             * TraceMetrics javaHeapStats.
             * @member {perfetto.protos.IJavaHeapStats|null|undefined} javaHeapStats
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.javaHeapStats = null;

            /**
             * TraceMetrics javaHeapHistogram.
             * @member {perfetto.protos.IJavaHeapHistogram|null|undefined} javaHeapHistogram
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.javaHeapHistogram = null;

            /**
             * TraceMetrics androidLmkReason.
             * @member {perfetto.protos.IAndroidLmkReasonMetric|null|undefined} androidLmkReason
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidLmkReason = null;

            /**
             * TraceMetrics androidHwuiMetric.
             * @member {perfetto.protos.IAndroidHwuiMetric|null|undefined} androidHwuiMetric
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidHwuiMetric = null;

            /**
             * TraceMetrics displayMetrics.
             * @member {perfetto.protos.IAndroidDisplayMetrics|null|undefined} displayMetrics
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.displayMetrics = null;

            /**
             * TraceMetrics androidTaskNames.
             * @member {perfetto.protos.IAndroidTaskNames|null|undefined} androidTaskNames
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidTaskNames = null;

            /**
             * TraceMetrics androidSurfaceflinger.
             * @member {perfetto.protos.IAndroidSurfaceflingerMetric|null|undefined} androidSurfaceflinger
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidSurfaceflinger = null;

            /**
             * TraceMetrics androidGpu.
             * @member {perfetto.protos.IAndroidGpuMetric|null|undefined} androidGpu
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidGpu = null;

            /**
             * TraceMetrics androidSysuiCuj.
             * @member {perfetto.protos.IAndroidSysUiCujMetrics|null|undefined} androidSysuiCuj
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidSysuiCuj = null;

            /**
             * TraceMetrics androidJankCuj.
             * @member {perfetto.protos.IAndroidJankCujMetric|null|undefined} androidJankCuj
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidJankCuj = null;

            /**
             * TraceMetrics androidHwcomposer.
             * @member {perfetto.protos.IAndroidHwcomposerMetrics|null|undefined} androidHwcomposer
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidHwcomposer = null;

            /**
             * TraceMetrics g2d.
             * @member {perfetto.protos.IG2dMetrics|null|undefined} g2d
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.g2d = null;

            /**
             * TraceMetrics androidDmaHeap.
             * @member {perfetto.protos.IAndroidDmaHeapMetric|null|undefined} androidDmaHeap
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidDmaHeap = null;

            /**
             * TraceMetrics androidTraceQuality.
             * @member {perfetto.protos.IAndroidTraceQualityMetric|null|undefined} androidTraceQuality
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidTraceQuality = null;

            /**
             * TraceMetrics profilerSmaps.
             * @member {perfetto.protos.IProfilerSmaps|null|undefined} profilerSmaps
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.profilerSmaps = null;

            /**
             * TraceMetrics androidMultiuser.
             * @member {perfetto.protos.IAndroidMultiuserMetric|null|undefined} androidMultiuser
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidMultiuser = null;

            /**
             * TraceMetrics androidSimpleperf.
             * @member {perfetto.protos.IAndroidSimpleperfMetric|null|undefined} androidSimpleperf
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidSimpleperf = null;

            /**
             * TraceMetrics androidCamera.
             * @member {perfetto.protos.IAndroidCameraMetric|null|undefined} androidCamera
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidCamera = null;

            /**
             * TraceMetrics androidDvfs.
             * @member {perfetto.protos.IAndroidDvfsMetric|null|undefined} androidDvfs
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidDvfs = null;

            /**
             * TraceMetrics androidNetperf.
             * @member {perfetto.protos.IAndroidNetworkMetric|null|undefined} androidNetperf
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidNetperf = null;

            /**
             * TraceMetrics androidCameraUnagg.
             * @member {perfetto.protos.IAndroidCameraUnaggregatedMetric|null|undefined} androidCameraUnagg
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidCameraUnagg = null;

            /**
             * TraceMetrics androidRtRuntime.
             * @member {perfetto.protos.IAndroidRtRuntimeMetric|null|undefined} androidRtRuntime
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidRtRuntime = null;

            /**
             * TraceMetrics androidIrqRuntime.
             * @member {perfetto.protos.IAndroidIrqRuntimeMetric|null|undefined} androidIrqRuntime
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidIrqRuntime = null;

            /**
             * TraceMetrics androidTrustyWorkqueues.
             * @member {perfetto.protos.IAndroidTrustyWorkqueues|null|undefined} androidTrustyWorkqueues
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidTrustyWorkqueues = null;

            /**
             * TraceMetrics androidOtherTraces.
             * @member {perfetto.protos.IAndroidOtherTracesMetric|null|undefined} androidOtherTraces
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidOtherTraces = null;

            /**
             * TraceMetrics androidBinder.
             * @member {perfetto.protos.IAndroidBinderMetric|null|undefined} androidBinder
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidBinder = null;

            /**
             * TraceMetrics androidFrameTimelineMetric.
             * @member {perfetto.protos.IAndroidFrameTimelineMetric|null|undefined} androidFrameTimelineMetric
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             */
            TraceMetrics.prototype.androidFrameTimelineMetric = null;

            /**
             * Creates a new TraceMetrics instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TraceMetrics
             * @static
             * @param {perfetto.protos.ITraceMetrics=} [properties] Properties to set
             * @returns {perfetto.protos.TraceMetrics} TraceMetrics instance
             */
            TraceMetrics.create = function create(properties) {
                return new TraceMetrics(properties);
            };

            /**
             * Encodes the specified TraceMetrics message. Does not implicitly {@link perfetto.protos.TraceMetrics.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TraceMetrics
             * @static
             * @param {perfetto.protos.ITraceMetrics} m TraceMetrics message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TraceMetrics.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.androidMem != null && Object.hasOwnProperty.call(m, "androidMem"))
                    $root.perfetto.protos.AndroidMemoryMetric.encode(m.androidMem, w.uint32(10).fork()).ldelim();
                if (m.androidStartup != null && Object.hasOwnProperty.call(m, "androidStartup"))
                    $root.perfetto.protos.AndroidStartupMetric.encode(m.androidStartup, w.uint32(18).fork()).ldelim();
                if (m.traceMetadata != null && Object.hasOwnProperty.call(m, "traceMetadata"))
                    $root.perfetto.protos.TraceMetadata.encode(m.traceMetadata, w.uint32(26).fork()).ldelim();
                if (m.androidBatt != null && Object.hasOwnProperty.call(m, "androidBatt"))
                    $root.perfetto.protos.AndroidBatteryMetric.encode(m.androidBatt, w.uint32(42).fork()).ldelim();
                if (m.androidCpu != null && Object.hasOwnProperty.call(m, "androidCpu"))
                    $root.perfetto.protos.AndroidCpuMetric.encode(m.androidCpu, w.uint32(50).fork()).ldelim();
                if (m.androidPowrails != null && Object.hasOwnProperty.call(m, "androidPowrails"))
                    $root.perfetto.protos.AndroidPowerRails.encode(m.androidPowrails, w.uint32(58).fork()).ldelim();
                if (m.androidLmk != null && Object.hasOwnProperty.call(m, "androidLmk"))
                    $root.perfetto.protos.AndroidLmkMetric.encode(m.androidLmk, w.uint32(66).fork()).ldelim();
                if (m.androidIon != null && Object.hasOwnProperty.call(m, "androidIon"))
                    $root.perfetto.protos.AndroidIonMetric.encode(m.androidIon, w.uint32(74).fork()).ldelim();
                if (m.androidMemUnagg != null && Object.hasOwnProperty.call(m, "androidMemUnagg"))
                    $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.encode(m.androidMemUnagg, w.uint32(90).fork()).ldelim();
                if (m.androidPackageList != null && Object.hasOwnProperty.call(m, "androidPackageList"))
                    $root.perfetto.protos.AndroidPackageList.encode(m.androidPackageList, w.uint32(98).fork()).ldelim();
                if (m.unsymbolizedFrames != null && Object.hasOwnProperty.call(m, "unsymbolizedFrames"))
                    $root.perfetto.protos.UnsymbolizedFrames.encode(m.unsymbolizedFrames, w.uint32(122).fork()).ldelim();
                if (m.javaHeapStats != null && Object.hasOwnProperty.call(m, "javaHeapStats"))
                    $root.perfetto.protos.JavaHeapStats.encode(m.javaHeapStats, w.uint32(138).fork()).ldelim();
                if (m.androidLmkReason != null && Object.hasOwnProperty.call(m, "androidLmkReason"))
                    $root.perfetto.protos.AndroidLmkReasonMetric.encode(m.androidLmkReason, w.uint32(146).fork()).ldelim();
                if (m.androidHwuiMetric != null && Object.hasOwnProperty.call(m, "androidHwuiMetric"))
                    $root.perfetto.protos.AndroidHwuiMetric.encode(m.androidHwuiMetric, w.uint32(162).fork()).ldelim();
                if (m.javaHeapHistogram != null && Object.hasOwnProperty.call(m, "javaHeapHistogram"))
                    $root.perfetto.protos.JavaHeapHistogram.encode(m.javaHeapHistogram, w.uint32(170).fork()).ldelim();
                if (m.displayMetrics != null && Object.hasOwnProperty.call(m, "displayMetrics"))
                    $root.perfetto.protos.AndroidDisplayMetrics.encode(m.displayMetrics, w.uint32(178).fork()).ldelim();
                if (m.androidTaskNames != null && Object.hasOwnProperty.call(m, "androidTaskNames"))
                    $root.perfetto.protos.AndroidTaskNames.encode(m.androidTaskNames, w.uint32(186).fork()).ldelim();
                if (m.androidSurfaceflinger != null && Object.hasOwnProperty.call(m, "androidSurfaceflinger"))
                    $root.perfetto.protos.AndroidSurfaceflingerMetric.encode(m.androidSurfaceflinger, w.uint32(202).fork()).ldelim();
                if (m.androidGpu != null && Object.hasOwnProperty.call(m, "androidGpu"))
                    $root.perfetto.protos.AndroidGpuMetric.encode(m.androidGpu, w.uint32(210).fork()).ldelim();
                if (m.androidSysuiCuj != null && Object.hasOwnProperty.call(m, "androidSysuiCuj"))
                    $root.perfetto.protos.AndroidSysUiCujMetrics.encode(m.androidSysuiCuj, w.uint32(218).fork()).ldelim();
                if (m.androidHwcomposer != null && Object.hasOwnProperty.call(m, "androidHwcomposer"))
                    $root.perfetto.protos.AndroidHwcomposerMetrics.encode(m.androidHwcomposer, w.uint32(226).fork()).ldelim();
                if (m.g2d != null && Object.hasOwnProperty.call(m, "g2d"))
                    $root.perfetto.protos.G2dMetrics.encode(m.g2d, w.uint32(242).fork()).ldelim();
                if (m.androidFastrpc != null && Object.hasOwnProperty.call(m, "androidFastrpc"))
                    $root.perfetto.protos.AndroidFastrpcMetric.encode(m.androidFastrpc, w.uint32(250).fork()).ldelim();
                if (m.androidDmaHeap != null && Object.hasOwnProperty.call(m, "androidDmaHeap"))
                    $root.perfetto.protos.AndroidDmaHeapMetric.encode(m.androidDmaHeap, w.uint32(258).fork()).ldelim();
                if (m.traceStats != null && Object.hasOwnProperty.call(m, "traceStats"))
                    $root.perfetto.protos.TraceAnalysisStats.encode(m.traceStats, w.uint32(266).fork()).ldelim();
                if (m.androidTraceQuality != null && Object.hasOwnProperty.call(m, "androidTraceQuality"))
                    $root.perfetto.protos.AndroidTraceQualityMetric.encode(m.androidTraceQuality, w.uint32(274).fork()).ldelim();
                if (m.profilerSmaps != null && Object.hasOwnProperty.call(m, "profilerSmaps"))
                    $root.perfetto.protos.ProfilerSmaps.encode(m.profilerSmaps, w.uint32(282).fork()).ldelim();
                if (m.androidMultiuser != null && Object.hasOwnProperty.call(m, "androidMultiuser"))
                    $root.perfetto.protos.AndroidMultiuserMetric.encode(m.androidMultiuser, w.uint32(290).fork()).ldelim();
                if (m.androidSimpleperf != null && Object.hasOwnProperty.call(m, "androidSimpleperf"))
                    $root.perfetto.protos.AndroidSimpleperfMetric.encode(m.androidSimpleperf, w.uint32(298).fork()).ldelim();
                if (m.androidCamera != null && Object.hasOwnProperty.call(m, "androidCamera"))
                    $root.perfetto.protos.AndroidCameraMetric.encode(m.androidCamera, w.uint32(306).fork()).ldelim();
                if (m.androidDvfs != null && Object.hasOwnProperty.call(m, "androidDvfs"))
                    $root.perfetto.protos.AndroidDvfsMetric.encode(m.androidDvfs, w.uint32(314).fork()).ldelim();
                if (m.androidNetperf != null && Object.hasOwnProperty.call(m, "androidNetperf"))
                    $root.perfetto.protos.AndroidNetworkMetric.encode(m.androidNetperf, w.uint32(322).fork()).ldelim();
                if (m.androidCameraUnagg != null && Object.hasOwnProperty.call(m, "androidCameraUnagg"))
                    $root.perfetto.protos.AndroidCameraUnaggregatedMetric.encode(m.androidCameraUnagg, w.uint32(330).fork()).ldelim();
                if (m.androidRtRuntime != null && Object.hasOwnProperty.call(m, "androidRtRuntime"))
                    $root.perfetto.protos.AndroidRtRuntimeMetric.encode(m.androidRtRuntime, w.uint32(338).fork()).ldelim();
                if (m.androidIrqRuntime != null && Object.hasOwnProperty.call(m, "androidIrqRuntime"))
                    $root.perfetto.protos.AndroidIrqRuntimeMetric.encode(m.androidIrqRuntime, w.uint32(346).fork()).ldelim();
                if (m.androidTrustyWorkqueues != null && Object.hasOwnProperty.call(m, "androidTrustyWorkqueues"))
                    $root.perfetto.protos.AndroidTrustyWorkqueues.encode(m.androidTrustyWorkqueues, w.uint32(354).fork()).ldelim();
                if (m.androidOtherTraces != null && Object.hasOwnProperty.call(m, "androidOtherTraces"))
                    $root.perfetto.protos.AndroidOtherTracesMetric.encode(m.androidOtherTraces, w.uint32(362).fork()).ldelim();
                if (m.androidBinder != null && Object.hasOwnProperty.call(m, "androidBinder"))
                    $root.perfetto.protos.AndroidBinderMetric.encode(m.androidBinder, w.uint32(370).fork()).ldelim();
                if (m.androidFrameTimelineMetric != null && Object.hasOwnProperty.call(m, "androidFrameTimelineMetric"))
                    $root.perfetto.protos.AndroidFrameTimelineMetric.encode(m.androidFrameTimelineMetric, w.uint32(378).fork()).ldelim();
                if (m.androidJankCuj != null && Object.hasOwnProperty.call(m, "androidJankCuj"))
                    $root.perfetto.protos.AndroidJankCujMetric.encode(m.androidJankCuj, w.uint32(386).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified TraceMetrics message, length delimited. Does not implicitly {@link perfetto.protos.TraceMetrics.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TraceMetrics
             * @static
             * @param {perfetto.protos.ITraceMetrics} message TraceMetrics message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TraceMetrics.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TraceMetrics message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TraceMetrics
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TraceMetrics} TraceMetrics
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TraceMetrics.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TraceMetrics();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 5:
                        m.androidBatt = $root.perfetto.protos.AndroidBatteryMetric.decode(r, r.uint32());
                        break;
                    case 6:
                        m.androidCpu = $root.perfetto.protos.AndroidCpuMetric.decode(r, r.uint32());
                        break;
                    case 1:
                        m.androidMem = $root.perfetto.protos.AndroidMemoryMetric.decode(r, r.uint32());
                        break;
                    case 11:
                        m.androidMemUnagg = $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.decode(r, r.uint32());
                        break;
                    case 12:
                        m.androidPackageList = $root.perfetto.protos.AndroidPackageList.decode(r, r.uint32());
                        break;
                    case 9:
                        m.androidIon = $root.perfetto.protos.AndroidIonMetric.decode(r, r.uint32());
                        break;
                    case 31:
                        m.androidFastrpc = $root.perfetto.protos.AndroidFastrpcMetric.decode(r, r.uint32());
                        break;
                    case 8:
                        m.androidLmk = $root.perfetto.protos.AndroidLmkMetric.decode(r, r.uint32());
                        break;
                    case 7:
                        m.androidPowrails = $root.perfetto.protos.AndroidPowerRails.decode(r, r.uint32());
                        break;
                    case 2:
                        m.androidStartup = $root.perfetto.protos.AndroidStartupMetric.decode(r, r.uint32());
                        break;
                    case 3:
                        m.traceMetadata = $root.perfetto.protos.TraceMetadata.decode(r, r.uint32());
                        break;
                    case 33:
                        m.traceStats = $root.perfetto.protos.TraceAnalysisStats.decode(r, r.uint32());
                        break;
                    case 15:
                        m.unsymbolizedFrames = $root.perfetto.protos.UnsymbolizedFrames.decode(r, r.uint32());
                        break;
                    case 17:
                        m.javaHeapStats = $root.perfetto.protos.JavaHeapStats.decode(r, r.uint32());
                        break;
                    case 21:
                        m.javaHeapHistogram = $root.perfetto.protos.JavaHeapHistogram.decode(r, r.uint32());
                        break;
                    case 18:
                        m.androidLmkReason = $root.perfetto.protos.AndroidLmkReasonMetric.decode(r, r.uint32());
                        break;
                    case 20:
                        m.androidHwuiMetric = $root.perfetto.protos.AndroidHwuiMetric.decode(r, r.uint32());
                        break;
                    case 22:
                        m.displayMetrics = $root.perfetto.protos.AndroidDisplayMetrics.decode(r, r.uint32());
                        break;
                    case 23:
                        m.androidTaskNames = $root.perfetto.protos.AndroidTaskNames.decode(r, r.uint32());
                        break;
                    case 25:
                        m.androidSurfaceflinger = $root.perfetto.protos.AndroidSurfaceflingerMetric.decode(r, r.uint32());
                        break;
                    case 26:
                        m.androidGpu = $root.perfetto.protos.AndroidGpuMetric.decode(r, r.uint32());
                        break;
                    case 27:
                        m.androidSysuiCuj = $root.perfetto.protos.AndroidSysUiCujMetrics.decode(r, r.uint32());
                        break;
                    case 48:
                        m.androidJankCuj = $root.perfetto.protos.AndroidJankCujMetric.decode(r, r.uint32());
                        break;
                    case 28:
                        m.androidHwcomposer = $root.perfetto.protos.AndroidHwcomposerMetrics.decode(r, r.uint32());
                        break;
                    case 30:
                        m.g2d = $root.perfetto.protos.G2dMetrics.decode(r, r.uint32());
                        break;
                    case 32:
                        m.androidDmaHeap = $root.perfetto.protos.AndroidDmaHeapMetric.decode(r, r.uint32());
                        break;
                    case 34:
                        m.androidTraceQuality = $root.perfetto.protos.AndroidTraceQualityMetric.decode(r, r.uint32());
                        break;
                    case 35:
                        m.profilerSmaps = $root.perfetto.protos.ProfilerSmaps.decode(r, r.uint32());
                        break;
                    case 36:
                        m.androidMultiuser = $root.perfetto.protos.AndroidMultiuserMetric.decode(r, r.uint32());
                        break;
                    case 37:
                        m.androidSimpleperf = $root.perfetto.protos.AndroidSimpleperfMetric.decode(r, r.uint32());
                        break;
                    case 38:
                        m.androidCamera = $root.perfetto.protos.AndroidCameraMetric.decode(r, r.uint32());
                        break;
                    case 39:
                        m.androidDvfs = $root.perfetto.protos.AndroidDvfsMetric.decode(r, r.uint32());
                        break;
                    case 40:
                        m.androidNetperf = $root.perfetto.protos.AndroidNetworkMetric.decode(r, r.uint32());
                        break;
                    case 41:
                        m.androidCameraUnagg = $root.perfetto.protos.AndroidCameraUnaggregatedMetric.decode(r, r.uint32());
                        break;
                    case 42:
                        m.androidRtRuntime = $root.perfetto.protos.AndroidRtRuntimeMetric.decode(r, r.uint32());
                        break;
                    case 43:
                        m.androidIrqRuntime = $root.perfetto.protos.AndroidIrqRuntimeMetric.decode(r, r.uint32());
                        break;
                    case 44:
                        m.androidTrustyWorkqueues = $root.perfetto.protos.AndroidTrustyWorkqueues.decode(r, r.uint32());
                        break;
                    case 45:
                        m.androidOtherTraces = $root.perfetto.protos.AndroidOtherTracesMetric.decode(r, r.uint32());
                        break;
                    case 46:
                        m.androidBinder = $root.perfetto.protos.AndroidBinderMetric.decode(r, r.uint32());
                        break;
                    case 47:
                        m.androidFrameTimelineMetric = $root.perfetto.protos.AndroidFrameTimelineMetric.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TraceMetrics message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TraceMetrics
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TraceMetrics} TraceMetrics
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TraceMetrics.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TraceMetrics message.
             * @function verify
             * @memberof perfetto.protos.TraceMetrics
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TraceMetrics.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.androidBatt != null && m.hasOwnProperty("androidBatt")) {
                    {
                        var e = $root.perfetto.protos.AndroidBatteryMetric.verify(m.androidBatt);
                        if (e)
                            return "androidBatt." + e;
                    }
                }
                if (m.androidCpu != null && m.hasOwnProperty("androidCpu")) {
                    {
                        var e = $root.perfetto.protos.AndroidCpuMetric.verify(m.androidCpu);
                        if (e)
                            return "androidCpu." + e;
                    }
                }
                if (m.androidMem != null && m.hasOwnProperty("androidMem")) {
                    {
                        var e = $root.perfetto.protos.AndroidMemoryMetric.verify(m.androidMem);
                        if (e)
                            return "androidMem." + e;
                    }
                }
                if (m.androidMemUnagg != null && m.hasOwnProperty("androidMemUnagg")) {
                    {
                        var e = $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.verify(m.androidMemUnagg);
                        if (e)
                            return "androidMemUnagg." + e;
                    }
                }
                if (m.androidPackageList != null && m.hasOwnProperty("androidPackageList")) {
                    {
                        var e = $root.perfetto.protos.AndroidPackageList.verify(m.androidPackageList);
                        if (e)
                            return "androidPackageList." + e;
                    }
                }
                if (m.androidIon != null && m.hasOwnProperty("androidIon")) {
                    {
                        var e = $root.perfetto.protos.AndroidIonMetric.verify(m.androidIon);
                        if (e)
                            return "androidIon." + e;
                    }
                }
                if (m.androidFastrpc != null && m.hasOwnProperty("androidFastrpc")) {
                    {
                        var e = $root.perfetto.protos.AndroidFastrpcMetric.verify(m.androidFastrpc);
                        if (e)
                            return "androidFastrpc." + e;
                    }
                }
                if (m.androidLmk != null && m.hasOwnProperty("androidLmk")) {
                    {
                        var e = $root.perfetto.protos.AndroidLmkMetric.verify(m.androidLmk);
                        if (e)
                            return "androidLmk." + e;
                    }
                }
                if (m.androidPowrails != null && m.hasOwnProperty("androidPowrails")) {
                    {
                        var e = $root.perfetto.protos.AndroidPowerRails.verify(m.androidPowrails);
                        if (e)
                            return "androidPowrails." + e;
                    }
                }
                if (m.androidStartup != null && m.hasOwnProperty("androidStartup")) {
                    {
                        var e = $root.perfetto.protos.AndroidStartupMetric.verify(m.androidStartup);
                        if (e)
                            return "androidStartup." + e;
                    }
                }
                if (m.traceMetadata != null && m.hasOwnProperty("traceMetadata")) {
                    {
                        var e = $root.perfetto.protos.TraceMetadata.verify(m.traceMetadata);
                        if (e)
                            return "traceMetadata." + e;
                    }
                }
                if (m.traceStats != null && m.hasOwnProperty("traceStats")) {
                    {
                        var e = $root.perfetto.protos.TraceAnalysisStats.verify(m.traceStats);
                        if (e)
                            return "traceStats." + e;
                    }
                }
                if (m.unsymbolizedFrames != null && m.hasOwnProperty("unsymbolizedFrames")) {
                    {
                        var e = $root.perfetto.protos.UnsymbolizedFrames.verify(m.unsymbolizedFrames);
                        if (e)
                            return "unsymbolizedFrames." + e;
                    }
                }
                if (m.javaHeapStats != null && m.hasOwnProperty("javaHeapStats")) {
                    {
                        var e = $root.perfetto.protos.JavaHeapStats.verify(m.javaHeapStats);
                        if (e)
                            return "javaHeapStats." + e;
                    }
                }
                if (m.javaHeapHistogram != null && m.hasOwnProperty("javaHeapHistogram")) {
                    {
                        var e = $root.perfetto.protos.JavaHeapHistogram.verify(m.javaHeapHistogram);
                        if (e)
                            return "javaHeapHistogram." + e;
                    }
                }
                if (m.androidLmkReason != null && m.hasOwnProperty("androidLmkReason")) {
                    {
                        var e = $root.perfetto.protos.AndroidLmkReasonMetric.verify(m.androidLmkReason);
                        if (e)
                            return "androidLmkReason." + e;
                    }
                }
                if (m.androidHwuiMetric != null && m.hasOwnProperty("androidHwuiMetric")) {
                    {
                        var e = $root.perfetto.protos.AndroidHwuiMetric.verify(m.androidHwuiMetric);
                        if (e)
                            return "androidHwuiMetric." + e;
                    }
                }
                if (m.displayMetrics != null && m.hasOwnProperty("displayMetrics")) {
                    {
                        var e = $root.perfetto.protos.AndroidDisplayMetrics.verify(m.displayMetrics);
                        if (e)
                            return "displayMetrics." + e;
                    }
                }
                if (m.androidTaskNames != null && m.hasOwnProperty("androidTaskNames")) {
                    {
                        var e = $root.perfetto.protos.AndroidTaskNames.verify(m.androidTaskNames);
                        if (e)
                            return "androidTaskNames." + e;
                    }
                }
                if (m.androidSurfaceflinger != null && m.hasOwnProperty("androidSurfaceflinger")) {
                    {
                        var e = $root.perfetto.protos.AndroidSurfaceflingerMetric.verify(m.androidSurfaceflinger);
                        if (e)
                            return "androidSurfaceflinger." + e;
                    }
                }
                if (m.androidGpu != null && m.hasOwnProperty("androidGpu")) {
                    {
                        var e = $root.perfetto.protos.AndroidGpuMetric.verify(m.androidGpu);
                        if (e)
                            return "androidGpu." + e;
                    }
                }
                if (m.androidSysuiCuj != null && m.hasOwnProperty("androidSysuiCuj")) {
                    {
                        var e = $root.perfetto.protos.AndroidSysUiCujMetrics.verify(m.androidSysuiCuj);
                        if (e)
                            return "androidSysuiCuj." + e;
                    }
                }
                if (m.androidJankCuj != null && m.hasOwnProperty("androidJankCuj")) {
                    {
                        var e = $root.perfetto.protos.AndroidJankCujMetric.verify(m.androidJankCuj);
                        if (e)
                            return "androidJankCuj." + e;
                    }
                }
                if (m.androidHwcomposer != null && m.hasOwnProperty("androidHwcomposer")) {
                    {
                        var e = $root.perfetto.protos.AndroidHwcomposerMetrics.verify(m.androidHwcomposer);
                        if (e)
                            return "androidHwcomposer." + e;
                    }
                }
                if (m.g2d != null && m.hasOwnProperty("g2d")) {
                    {
                        var e = $root.perfetto.protos.G2dMetrics.verify(m.g2d);
                        if (e)
                            return "g2d." + e;
                    }
                }
                if (m.androidDmaHeap != null && m.hasOwnProperty("androidDmaHeap")) {
                    {
                        var e = $root.perfetto.protos.AndroidDmaHeapMetric.verify(m.androidDmaHeap);
                        if (e)
                            return "androidDmaHeap." + e;
                    }
                }
                if (m.androidTraceQuality != null && m.hasOwnProperty("androidTraceQuality")) {
                    {
                        var e = $root.perfetto.protos.AndroidTraceQualityMetric.verify(m.androidTraceQuality);
                        if (e)
                            return "androidTraceQuality." + e;
                    }
                }
                if (m.profilerSmaps != null && m.hasOwnProperty("profilerSmaps")) {
                    {
                        var e = $root.perfetto.protos.ProfilerSmaps.verify(m.profilerSmaps);
                        if (e)
                            return "profilerSmaps." + e;
                    }
                }
                if (m.androidMultiuser != null && m.hasOwnProperty("androidMultiuser")) {
                    {
                        var e = $root.perfetto.protos.AndroidMultiuserMetric.verify(m.androidMultiuser);
                        if (e)
                            return "androidMultiuser." + e;
                    }
                }
                if (m.androidSimpleperf != null && m.hasOwnProperty("androidSimpleperf")) {
                    {
                        var e = $root.perfetto.protos.AndroidSimpleperfMetric.verify(m.androidSimpleperf);
                        if (e)
                            return "androidSimpleperf." + e;
                    }
                }
                if (m.androidCamera != null && m.hasOwnProperty("androidCamera")) {
                    {
                        var e = $root.perfetto.protos.AndroidCameraMetric.verify(m.androidCamera);
                        if (e)
                            return "androidCamera." + e;
                    }
                }
                if (m.androidDvfs != null && m.hasOwnProperty("androidDvfs")) {
                    {
                        var e = $root.perfetto.protos.AndroidDvfsMetric.verify(m.androidDvfs);
                        if (e)
                            return "androidDvfs." + e;
                    }
                }
                if (m.androidNetperf != null && m.hasOwnProperty("androidNetperf")) {
                    {
                        var e = $root.perfetto.protos.AndroidNetworkMetric.verify(m.androidNetperf);
                        if (e)
                            return "androidNetperf." + e;
                    }
                }
                if (m.androidCameraUnagg != null && m.hasOwnProperty("androidCameraUnagg")) {
                    {
                        var e = $root.perfetto.protos.AndroidCameraUnaggregatedMetric.verify(m.androidCameraUnagg);
                        if (e)
                            return "androidCameraUnagg." + e;
                    }
                }
                if (m.androidRtRuntime != null && m.hasOwnProperty("androidRtRuntime")) {
                    {
                        var e = $root.perfetto.protos.AndroidRtRuntimeMetric.verify(m.androidRtRuntime);
                        if (e)
                            return "androidRtRuntime." + e;
                    }
                }
                if (m.androidIrqRuntime != null && m.hasOwnProperty("androidIrqRuntime")) {
                    {
                        var e = $root.perfetto.protos.AndroidIrqRuntimeMetric.verify(m.androidIrqRuntime);
                        if (e)
                            return "androidIrqRuntime." + e;
                    }
                }
                if (m.androidTrustyWorkqueues != null && m.hasOwnProperty("androidTrustyWorkqueues")) {
                    {
                        var e = $root.perfetto.protos.AndroidTrustyWorkqueues.verify(m.androidTrustyWorkqueues);
                        if (e)
                            return "androidTrustyWorkqueues." + e;
                    }
                }
                if (m.androidOtherTraces != null && m.hasOwnProperty("androidOtherTraces")) {
                    {
                        var e = $root.perfetto.protos.AndroidOtherTracesMetric.verify(m.androidOtherTraces);
                        if (e)
                            return "androidOtherTraces." + e;
                    }
                }
                if (m.androidBinder != null && m.hasOwnProperty("androidBinder")) {
                    {
                        var e = $root.perfetto.protos.AndroidBinderMetric.verify(m.androidBinder);
                        if (e)
                            return "androidBinder." + e;
                    }
                }
                if (m.androidFrameTimelineMetric != null && m.hasOwnProperty("androidFrameTimelineMetric")) {
                    {
                        var e = $root.perfetto.protos.AndroidFrameTimelineMetric.verify(m.androidFrameTimelineMetric);
                        if (e)
                            return "androidFrameTimelineMetric." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a TraceMetrics message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TraceMetrics
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TraceMetrics} TraceMetrics
             */
            TraceMetrics.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TraceMetrics)
                    return d;
                var m = new $root.perfetto.protos.TraceMetrics();
                if (d.androidBatt != null) {
                    if (typeof d.androidBatt !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidBatt: object expected");
                    m.androidBatt = $root.perfetto.protos.AndroidBatteryMetric.fromObject(d.androidBatt);
                }
                if (d.androidCpu != null) {
                    if (typeof d.androidCpu !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidCpu: object expected");
                    m.androidCpu = $root.perfetto.protos.AndroidCpuMetric.fromObject(d.androidCpu);
                }
                if (d.androidMem != null) {
                    if (typeof d.androidMem !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidMem: object expected");
                    m.androidMem = $root.perfetto.protos.AndroidMemoryMetric.fromObject(d.androidMem);
                }
                if (d.androidMemUnagg != null) {
                    if (typeof d.androidMemUnagg !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidMemUnagg: object expected");
                    m.androidMemUnagg = $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.fromObject(d.androidMemUnagg);
                }
                if (d.androidPackageList != null) {
                    if (typeof d.androidPackageList !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidPackageList: object expected");
                    m.androidPackageList = $root.perfetto.protos.AndroidPackageList.fromObject(d.androidPackageList);
                }
                if (d.androidIon != null) {
                    if (typeof d.androidIon !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidIon: object expected");
                    m.androidIon = $root.perfetto.protos.AndroidIonMetric.fromObject(d.androidIon);
                }
                if (d.androidFastrpc != null) {
                    if (typeof d.androidFastrpc !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidFastrpc: object expected");
                    m.androidFastrpc = $root.perfetto.protos.AndroidFastrpcMetric.fromObject(d.androidFastrpc);
                }
                if (d.androidLmk != null) {
                    if (typeof d.androidLmk !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidLmk: object expected");
                    m.androidLmk = $root.perfetto.protos.AndroidLmkMetric.fromObject(d.androidLmk);
                }
                if (d.androidPowrails != null) {
                    if (typeof d.androidPowrails !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidPowrails: object expected");
                    m.androidPowrails = $root.perfetto.protos.AndroidPowerRails.fromObject(d.androidPowrails);
                }
                if (d.androidStartup != null) {
                    if (typeof d.androidStartup !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidStartup: object expected");
                    m.androidStartup = $root.perfetto.protos.AndroidStartupMetric.fromObject(d.androidStartup);
                }
                if (d.traceMetadata != null) {
                    if (typeof d.traceMetadata !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.traceMetadata: object expected");
                    m.traceMetadata = $root.perfetto.protos.TraceMetadata.fromObject(d.traceMetadata);
                }
                if (d.traceStats != null) {
                    if (typeof d.traceStats !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.traceStats: object expected");
                    m.traceStats = $root.perfetto.protos.TraceAnalysisStats.fromObject(d.traceStats);
                }
                if (d.unsymbolizedFrames != null) {
                    if (typeof d.unsymbolizedFrames !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.unsymbolizedFrames: object expected");
                    m.unsymbolizedFrames = $root.perfetto.protos.UnsymbolizedFrames.fromObject(d.unsymbolizedFrames);
                }
                if (d.javaHeapStats != null) {
                    if (typeof d.javaHeapStats !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.javaHeapStats: object expected");
                    m.javaHeapStats = $root.perfetto.protos.JavaHeapStats.fromObject(d.javaHeapStats);
                }
                if (d.javaHeapHistogram != null) {
                    if (typeof d.javaHeapHistogram !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.javaHeapHistogram: object expected");
                    m.javaHeapHistogram = $root.perfetto.protos.JavaHeapHistogram.fromObject(d.javaHeapHistogram);
                }
                if (d.androidLmkReason != null) {
                    if (typeof d.androidLmkReason !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidLmkReason: object expected");
                    m.androidLmkReason = $root.perfetto.protos.AndroidLmkReasonMetric.fromObject(d.androidLmkReason);
                }
                if (d.androidHwuiMetric != null) {
                    if (typeof d.androidHwuiMetric !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidHwuiMetric: object expected");
                    m.androidHwuiMetric = $root.perfetto.protos.AndroidHwuiMetric.fromObject(d.androidHwuiMetric);
                }
                if (d.displayMetrics != null) {
                    if (typeof d.displayMetrics !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.displayMetrics: object expected");
                    m.displayMetrics = $root.perfetto.protos.AndroidDisplayMetrics.fromObject(d.displayMetrics);
                }
                if (d.androidTaskNames != null) {
                    if (typeof d.androidTaskNames !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidTaskNames: object expected");
                    m.androidTaskNames = $root.perfetto.protos.AndroidTaskNames.fromObject(d.androidTaskNames);
                }
                if (d.androidSurfaceflinger != null) {
                    if (typeof d.androidSurfaceflinger !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidSurfaceflinger: object expected");
                    m.androidSurfaceflinger = $root.perfetto.protos.AndroidSurfaceflingerMetric.fromObject(d.androidSurfaceflinger);
                }
                if (d.androidGpu != null) {
                    if (typeof d.androidGpu !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidGpu: object expected");
                    m.androidGpu = $root.perfetto.protos.AndroidGpuMetric.fromObject(d.androidGpu);
                }
                if (d.androidSysuiCuj != null) {
                    if (typeof d.androidSysuiCuj !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidSysuiCuj: object expected");
                    m.androidSysuiCuj = $root.perfetto.protos.AndroidSysUiCujMetrics.fromObject(d.androidSysuiCuj);
                }
                if (d.androidJankCuj != null) {
                    if (typeof d.androidJankCuj !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidJankCuj: object expected");
                    m.androidJankCuj = $root.perfetto.protos.AndroidJankCujMetric.fromObject(d.androidJankCuj);
                }
                if (d.androidHwcomposer != null) {
                    if (typeof d.androidHwcomposer !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidHwcomposer: object expected");
                    m.androidHwcomposer = $root.perfetto.protos.AndroidHwcomposerMetrics.fromObject(d.androidHwcomposer);
                }
                if (d.g2d != null) {
                    if (typeof d.g2d !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.g2d: object expected");
                    m.g2d = $root.perfetto.protos.G2dMetrics.fromObject(d.g2d);
                }
                if (d.androidDmaHeap != null) {
                    if (typeof d.androidDmaHeap !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidDmaHeap: object expected");
                    m.androidDmaHeap = $root.perfetto.protos.AndroidDmaHeapMetric.fromObject(d.androidDmaHeap);
                }
                if (d.androidTraceQuality != null) {
                    if (typeof d.androidTraceQuality !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidTraceQuality: object expected");
                    m.androidTraceQuality = $root.perfetto.protos.AndroidTraceQualityMetric.fromObject(d.androidTraceQuality);
                }
                if (d.profilerSmaps != null) {
                    if (typeof d.profilerSmaps !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.profilerSmaps: object expected");
                    m.profilerSmaps = $root.perfetto.protos.ProfilerSmaps.fromObject(d.profilerSmaps);
                }
                if (d.androidMultiuser != null) {
                    if (typeof d.androidMultiuser !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidMultiuser: object expected");
                    m.androidMultiuser = $root.perfetto.protos.AndroidMultiuserMetric.fromObject(d.androidMultiuser);
                }
                if (d.androidSimpleperf != null) {
                    if (typeof d.androidSimpleperf !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidSimpleperf: object expected");
                    m.androidSimpleperf = $root.perfetto.protos.AndroidSimpleperfMetric.fromObject(d.androidSimpleperf);
                }
                if (d.androidCamera != null) {
                    if (typeof d.androidCamera !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidCamera: object expected");
                    m.androidCamera = $root.perfetto.protos.AndroidCameraMetric.fromObject(d.androidCamera);
                }
                if (d.androidDvfs != null) {
                    if (typeof d.androidDvfs !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidDvfs: object expected");
                    m.androidDvfs = $root.perfetto.protos.AndroidDvfsMetric.fromObject(d.androidDvfs);
                }
                if (d.androidNetperf != null) {
                    if (typeof d.androidNetperf !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidNetperf: object expected");
                    m.androidNetperf = $root.perfetto.protos.AndroidNetworkMetric.fromObject(d.androidNetperf);
                }
                if (d.androidCameraUnagg != null) {
                    if (typeof d.androidCameraUnagg !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidCameraUnagg: object expected");
                    m.androidCameraUnagg = $root.perfetto.protos.AndroidCameraUnaggregatedMetric.fromObject(d.androidCameraUnagg);
                }
                if (d.androidRtRuntime != null) {
                    if (typeof d.androidRtRuntime !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidRtRuntime: object expected");
                    m.androidRtRuntime = $root.perfetto.protos.AndroidRtRuntimeMetric.fromObject(d.androidRtRuntime);
                }
                if (d.androidIrqRuntime != null) {
                    if (typeof d.androidIrqRuntime !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidIrqRuntime: object expected");
                    m.androidIrqRuntime = $root.perfetto.protos.AndroidIrqRuntimeMetric.fromObject(d.androidIrqRuntime);
                }
                if (d.androidTrustyWorkqueues != null) {
                    if (typeof d.androidTrustyWorkqueues !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidTrustyWorkqueues: object expected");
                    m.androidTrustyWorkqueues = $root.perfetto.protos.AndroidTrustyWorkqueues.fromObject(d.androidTrustyWorkqueues);
                }
                if (d.androidOtherTraces != null) {
                    if (typeof d.androidOtherTraces !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidOtherTraces: object expected");
                    m.androidOtherTraces = $root.perfetto.protos.AndroidOtherTracesMetric.fromObject(d.androidOtherTraces);
                }
                if (d.androidBinder != null) {
                    if (typeof d.androidBinder !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidBinder: object expected");
                    m.androidBinder = $root.perfetto.protos.AndroidBinderMetric.fromObject(d.androidBinder);
                }
                if (d.androidFrameTimelineMetric != null) {
                    if (typeof d.androidFrameTimelineMetric !== "object")
                        throw TypeError(".perfetto.protos.TraceMetrics.androidFrameTimelineMetric: object expected");
                    m.androidFrameTimelineMetric = $root.perfetto.protos.AndroidFrameTimelineMetric.fromObject(d.androidFrameTimelineMetric);
                }
                return m;
            };

            /**
             * Creates a plain object from a TraceMetrics message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TraceMetrics
             * @static
             * @param {perfetto.protos.TraceMetrics} m TraceMetrics
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TraceMetrics.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.androidMem = null;
                    d.androidStartup = null;
                    d.traceMetadata = null;
                    d.androidBatt = null;
                    d.androidCpu = null;
                    d.androidPowrails = null;
                    d.androidLmk = null;
                    d.androidIon = null;
                    d.androidMemUnagg = null;
                    d.androidPackageList = null;
                    d.unsymbolizedFrames = null;
                    d.javaHeapStats = null;
                    d.androidLmkReason = null;
                    d.androidHwuiMetric = null;
                    d.javaHeapHistogram = null;
                    d.displayMetrics = null;
                    d.androidTaskNames = null;
                    d.androidSurfaceflinger = null;
                    d.androidGpu = null;
                    d.androidSysuiCuj = null;
                    d.androidHwcomposer = null;
                    d.g2d = null;
                    d.androidFastrpc = null;
                    d.androidDmaHeap = null;
                    d.traceStats = null;
                    d.androidTraceQuality = null;
                    d.profilerSmaps = null;
                    d.androidMultiuser = null;
                    d.androidSimpleperf = null;
                    d.androidCamera = null;
                    d.androidDvfs = null;
                    d.androidNetperf = null;
                    d.androidCameraUnagg = null;
                    d.androidRtRuntime = null;
                    d.androidIrqRuntime = null;
                    d.androidTrustyWorkqueues = null;
                    d.androidOtherTraces = null;
                    d.androidBinder = null;
                    d.androidFrameTimelineMetric = null;
                    d.androidJankCuj = null;
                }
                if (m.androidMem != null && m.hasOwnProperty("androidMem")) {
                    d.androidMem = $root.perfetto.protos.AndroidMemoryMetric.toObject(m.androidMem, o);
                }
                if (m.androidStartup != null && m.hasOwnProperty("androidStartup")) {
                    d.androidStartup = $root.perfetto.protos.AndroidStartupMetric.toObject(m.androidStartup, o);
                }
                if (m.traceMetadata != null && m.hasOwnProperty("traceMetadata")) {
                    d.traceMetadata = $root.perfetto.protos.TraceMetadata.toObject(m.traceMetadata, o);
                }
                if (m.androidBatt != null && m.hasOwnProperty("androidBatt")) {
                    d.androidBatt = $root.perfetto.protos.AndroidBatteryMetric.toObject(m.androidBatt, o);
                }
                if (m.androidCpu != null && m.hasOwnProperty("androidCpu")) {
                    d.androidCpu = $root.perfetto.protos.AndroidCpuMetric.toObject(m.androidCpu, o);
                }
                if (m.androidPowrails != null && m.hasOwnProperty("androidPowrails")) {
                    d.androidPowrails = $root.perfetto.protos.AndroidPowerRails.toObject(m.androidPowrails, o);
                }
                if (m.androidLmk != null && m.hasOwnProperty("androidLmk")) {
                    d.androidLmk = $root.perfetto.protos.AndroidLmkMetric.toObject(m.androidLmk, o);
                }
                if (m.androidIon != null && m.hasOwnProperty("androidIon")) {
                    d.androidIon = $root.perfetto.protos.AndroidIonMetric.toObject(m.androidIon, o);
                }
                if (m.androidMemUnagg != null && m.hasOwnProperty("androidMemUnagg")) {
                    d.androidMemUnagg = $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.toObject(m.androidMemUnagg, o);
                }
                if (m.androidPackageList != null && m.hasOwnProperty("androidPackageList")) {
                    d.androidPackageList = $root.perfetto.protos.AndroidPackageList.toObject(m.androidPackageList, o);
                }
                if (m.unsymbolizedFrames != null && m.hasOwnProperty("unsymbolizedFrames")) {
                    d.unsymbolizedFrames = $root.perfetto.protos.UnsymbolizedFrames.toObject(m.unsymbolizedFrames, o);
                }
                if (m.javaHeapStats != null && m.hasOwnProperty("javaHeapStats")) {
                    d.javaHeapStats = $root.perfetto.protos.JavaHeapStats.toObject(m.javaHeapStats, o);
                }
                if (m.androidLmkReason != null && m.hasOwnProperty("androidLmkReason")) {
                    d.androidLmkReason = $root.perfetto.protos.AndroidLmkReasonMetric.toObject(m.androidLmkReason, o);
                }
                if (m.androidHwuiMetric != null && m.hasOwnProperty("androidHwuiMetric")) {
                    d.androidHwuiMetric = $root.perfetto.protos.AndroidHwuiMetric.toObject(m.androidHwuiMetric, o);
                }
                if (m.javaHeapHistogram != null && m.hasOwnProperty("javaHeapHistogram")) {
                    d.javaHeapHistogram = $root.perfetto.protos.JavaHeapHistogram.toObject(m.javaHeapHistogram, o);
                }
                if (m.displayMetrics != null && m.hasOwnProperty("displayMetrics")) {
                    d.displayMetrics = $root.perfetto.protos.AndroidDisplayMetrics.toObject(m.displayMetrics, o);
                }
                if (m.androidTaskNames != null && m.hasOwnProperty("androidTaskNames")) {
                    d.androidTaskNames = $root.perfetto.protos.AndroidTaskNames.toObject(m.androidTaskNames, o);
                }
                if (m.androidSurfaceflinger != null && m.hasOwnProperty("androidSurfaceflinger")) {
                    d.androidSurfaceflinger = $root.perfetto.protos.AndroidSurfaceflingerMetric.toObject(m.androidSurfaceflinger, o);
                }
                if (m.androidGpu != null && m.hasOwnProperty("androidGpu")) {
                    d.androidGpu = $root.perfetto.protos.AndroidGpuMetric.toObject(m.androidGpu, o);
                }
                if (m.androidSysuiCuj != null && m.hasOwnProperty("androidSysuiCuj")) {
                    d.androidSysuiCuj = $root.perfetto.protos.AndroidSysUiCujMetrics.toObject(m.androidSysuiCuj, o);
                }
                if (m.androidHwcomposer != null && m.hasOwnProperty("androidHwcomposer")) {
                    d.androidHwcomposer = $root.perfetto.protos.AndroidHwcomposerMetrics.toObject(m.androidHwcomposer, o);
                }
                if (m.g2d != null && m.hasOwnProperty("g2d")) {
                    d.g2d = $root.perfetto.protos.G2dMetrics.toObject(m.g2d, o);
                }
                if (m.androidFastrpc != null && m.hasOwnProperty("androidFastrpc")) {
                    d.androidFastrpc = $root.perfetto.protos.AndroidFastrpcMetric.toObject(m.androidFastrpc, o);
                }
                if (m.androidDmaHeap != null && m.hasOwnProperty("androidDmaHeap")) {
                    d.androidDmaHeap = $root.perfetto.protos.AndroidDmaHeapMetric.toObject(m.androidDmaHeap, o);
                }
                if (m.traceStats != null && m.hasOwnProperty("traceStats")) {
                    d.traceStats = $root.perfetto.protos.TraceAnalysisStats.toObject(m.traceStats, o);
                }
                if (m.androidTraceQuality != null && m.hasOwnProperty("androidTraceQuality")) {
                    d.androidTraceQuality = $root.perfetto.protos.AndroidTraceQualityMetric.toObject(m.androidTraceQuality, o);
                }
                if (m.profilerSmaps != null && m.hasOwnProperty("profilerSmaps")) {
                    d.profilerSmaps = $root.perfetto.protos.ProfilerSmaps.toObject(m.profilerSmaps, o);
                }
                if (m.androidMultiuser != null && m.hasOwnProperty("androidMultiuser")) {
                    d.androidMultiuser = $root.perfetto.protos.AndroidMultiuserMetric.toObject(m.androidMultiuser, o);
                }
                if (m.androidSimpleperf != null && m.hasOwnProperty("androidSimpleperf")) {
                    d.androidSimpleperf = $root.perfetto.protos.AndroidSimpleperfMetric.toObject(m.androidSimpleperf, o);
                }
                if (m.androidCamera != null && m.hasOwnProperty("androidCamera")) {
                    d.androidCamera = $root.perfetto.protos.AndroidCameraMetric.toObject(m.androidCamera, o);
                }
                if (m.androidDvfs != null && m.hasOwnProperty("androidDvfs")) {
                    d.androidDvfs = $root.perfetto.protos.AndroidDvfsMetric.toObject(m.androidDvfs, o);
                }
                if (m.androidNetperf != null && m.hasOwnProperty("androidNetperf")) {
                    d.androidNetperf = $root.perfetto.protos.AndroidNetworkMetric.toObject(m.androidNetperf, o);
                }
                if (m.androidCameraUnagg != null && m.hasOwnProperty("androidCameraUnagg")) {
                    d.androidCameraUnagg = $root.perfetto.protos.AndroidCameraUnaggregatedMetric.toObject(m.androidCameraUnagg, o);
                }
                if (m.androidRtRuntime != null && m.hasOwnProperty("androidRtRuntime")) {
                    d.androidRtRuntime = $root.perfetto.protos.AndroidRtRuntimeMetric.toObject(m.androidRtRuntime, o);
                }
                if (m.androidIrqRuntime != null && m.hasOwnProperty("androidIrqRuntime")) {
                    d.androidIrqRuntime = $root.perfetto.protos.AndroidIrqRuntimeMetric.toObject(m.androidIrqRuntime, o);
                }
                if (m.androidTrustyWorkqueues != null && m.hasOwnProperty("androidTrustyWorkqueues")) {
                    d.androidTrustyWorkqueues = $root.perfetto.protos.AndroidTrustyWorkqueues.toObject(m.androidTrustyWorkqueues, o);
                }
                if (m.androidOtherTraces != null && m.hasOwnProperty("androidOtherTraces")) {
                    d.androidOtherTraces = $root.perfetto.protos.AndroidOtherTracesMetric.toObject(m.androidOtherTraces, o);
                }
                if (m.androidBinder != null && m.hasOwnProperty("androidBinder")) {
                    d.androidBinder = $root.perfetto.protos.AndroidBinderMetric.toObject(m.androidBinder, o);
                }
                if (m.androidFrameTimelineMetric != null && m.hasOwnProperty("androidFrameTimelineMetric")) {
                    d.androidFrameTimelineMetric = $root.perfetto.protos.AndroidFrameTimelineMetric.toObject(m.androidFrameTimelineMetric, o);
                }
                if (m.androidJankCuj != null && m.hasOwnProperty("androidJankCuj")) {
                    d.androidJankCuj = $root.perfetto.protos.AndroidJankCujMetric.toObject(m.androidJankCuj, o);
                }
                return d;
            };

            /**
             * Converts this TraceMetrics to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TraceMetrics
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TraceMetrics.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TraceMetrics;
        })();

        protos.AndroidFrameTimelineMetric = (function() {

            /**
             * Properties of an AndroidFrameTimelineMetric.
             * @memberof perfetto.protos
             * @interface IAndroidFrameTimelineMetric
             * @property {number|null} [totalFrames] AndroidFrameTimelineMetric totalFrames
             * @property {number|null} [missedAppFrames] AndroidFrameTimelineMetric missedAppFrames
             * @property {Array.<perfetto.protos.AndroidFrameTimelineMetric.IProcessBreakdown>|null} [process] AndroidFrameTimelineMetric process
             */

            /**
             * Constructs a new AndroidFrameTimelineMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidFrameTimelineMetric.
             * @implements IAndroidFrameTimelineMetric
             * @constructor
             * @param {perfetto.protos.IAndroidFrameTimelineMetric=} [p] Properties to set
             */
            function AndroidFrameTimelineMetric(p) {
                this.process = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidFrameTimelineMetric totalFrames.
             * @member {number} totalFrames
             * @memberof perfetto.protos.AndroidFrameTimelineMetric
             * @instance
             */
            AndroidFrameTimelineMetric.prototype.totalFrames = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * AndroidFrameTimelineMetric missedAppFrames.
             * @member {number} missedAppFrames
             * @memberof perfetto.protos.AndroidFrameTimelineMetric
             * @instance
             */
            AndroidFrameTimelineMetric.prototype.missedAppFrames = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * AndroidFrameTimelineMetric process.
             * @member {Array.<perfetto.protos.AndroidFrameTimelineMetric.IProcessBreakdown>} process
             * @memberof perfetto.protos.AndroidFrameTimelineMetric
             * @instance
             */
            AndroidFrameTimelineMetric.prototype.process = $util.emptyArray;

            /**
             * Creates a new AndroidFrameTimelineMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidFrameTimelineMetric
             * @static
             * @param {perfetto.protos.IAndroidFrameTimelineMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidFrameTimelineMetric} AndroidFrameTimelineMetric instance
             */
            AndroidFrameTimelineMetric.create = function create(properties) {
                return new AndroidFrameTimelineMetric(properties);
            };

            /**
             * Encodes the specified AndroidFrameTimelineMetric message. Does not implicitly {@link perfetto.protos.AndroidFrameTimelineMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidFrameTimelineMetric
             * @static
             * @param {perfetto.protos.IAndroidFrameTimelineMetric} m AndroidFrameTimelineMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidFrameTimelineMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.process != null && m.process.length) {
                    for (var i = 0; i < m.process.length; ++i)
                        $root.perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown.encode(m.process[i], w.uint32(18).fork()).ldelim();
                }
                if (m.totalFrames != null && Object.hasOwnProperty.call(m, "totalFrames"))
                    w.uint32(32).int64(m.totalFrames);
                if (m.missedAppFrames != null && Object.hasOwnProperty.call(m, "missedAppFrames"))
                    w.uint32(40).int64(m.missedAppFrames);
                return w;
            };

            /**
             * Encodes the specified AndroidFrameTimelineMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidFrameTimelineMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidFrameTimelineMetric
             * @static
             * @param {perfetto.protos.IAndroidFrameTimelineMetric} message AndroidFrameTimelineMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidFrameTimelineMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidFrameTimelineMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidFrameTimelineMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidFrameTimelineMetric} AndroidFrameTimelineMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidFrameTimelineMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidFrameTimelineMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 4:
                        m.totalFrames = r.int64();
                        break;
                    case 5:
                        m.missedAppFrames = r.int64();
                        break;
                    case 2:
                        if (!(m.process && m.process.length))
                            m.process = [];
                        m.process.push($root.perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidFrameTimelineMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidFrameTimelineMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidFrameTimelineMetric} AndroidFrameTimelineMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidFrameTimelineMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidFrameTimelineMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidFrameTimelineMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidFrameTimelineMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.totalFrames != null && m.hasOwnProperty("totalFrames")) {
                    if (!$util.isInteger(m.totalFrames) && !(m.totalFrames && $util.isInteger(m.totalFrames.low) && $util.isInteger(m.totalFrames.high)))
                        return "totalFrames: integer|Long expected";
                }
                if (m.missedAppFrames != null && m.hasOwnProperty("missedAppFrames")) {
                    if (!$util.isInteger(m.missedAppFrames) && !(m.missedAppFrames && $util.isInteger(m.missedAppFrames.low) && $util.isInteger(m.missedAppFrames.high)))
                        return "missedAppFrames: integer|Long expected";
                }
                if (m.process != null && m.hasOwnProperty("process")) {
                    if (!Array.isArray(m.process))
                        return "process: array expected";
                    for (var i = 0; i < m.process.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown.verify(m.process[i]);
                            if (e)
                                return "process." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidFrameTimelineMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidFrameTimelineMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidFrameTimelineMetric} AndroidFrameTimelineMetric
             */
            AndroidFrameTimelineMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidFrameTimelineMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidFrameTimelineMetric();
                if (d.totalFrames != null) {
                    if ($util.Long)
                        (m.totalFrames = $util.Long.fromValue(d.totalFrames)).unsigned = false;
                    else if (typeof d.totalFrames === "string")
                        m.totalFrames = parseInt(d.totalFrames, 10);
                    else if (typeof d.totalFrames === "number")
                        m.totalFrames = d.totalFrames;
                    else if (typeof d.totalFrames === "object")
                        m.totalFrames = new $util.LongBits(d.totalFrames.low >>> 0, d.totalFrames.high >>> 0).toNumber();
                }
                if (d.missedAppFrames != null) {
                    if ($util.Long)
                        (m.missedAppFrames = $util.Long.fromValue(d.missedAppFrames)).unsigned = false;
                    else if (typeof d.missedAppFrames === "string")
                        m.missedAppFrames = parseInt(d.missedAppFrames, 10);
                    else if (typeof d.missedAppFrames === "number")
                        m.missedAppFrames = d.missedAppFrames;
                    else if (typeof d.missedAppFrames === "object")
                        m.missedAppFrames = new $util.LongBits(d.missedAppFrames.low >>> 0, d.missedAppFrames.high >>> 0).toNumber();
                }
                if (d.process) {
                    if (!Array.isArray(d.process))
                        throw TypeError(".perfetto.protos.AndroidFrameTimelineMetric.process: array expected");
                    m.process = [];
                    for (var i = 0; i < d.process.length; ++i) {
                        if (typeof d.process[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidFrameTimelineMetric.process: object expected");
                        m.process[i] = $root.perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown.fromObject(d.process[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidFrameTimelineMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidFrameTimelineMetric
             * @static
             * @param {perfetto.protos.AndroidFrameTimelineMetric} m AndroidFrameTimelineMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidFrameTimelineMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.process = [];
                }
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.totalFrames = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.totalFrames = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.missedAppFrames = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.missedAppFrames = o.longs === String ? "0" : 0;
                }
                if (m.process && m.process.length) {
                    d.process = [];
                    for (var j = 0; j < m.process.length; ++j) {
                        d.process[j] = $root.perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown.toObject(m.process[j], o);
                    }
                }
                if (m.totalFrames != null && m.hasOwnProperty("totalFrames")) {
                    if (typeof m.totalFrames === "number")
                        d.totalFrames = o.longs === String ? String(m.totalFrames) : m.totalFrames;
                    else
                        d.totalFrames = o.longs === String ? $util.Long.prototype.toString.call(m.totalFrames) : o.longs === Number ? new $util.LongBits(m.totalFrames.low >>> 0, m.totalFrames.high >>> 0).toNumber() : m.totalFrames;
                }
                if (m.missedAppFrames != null && m.hasOwnProperty("missedAppFrames")) {
                    if (typeof m.missedAppFrames === "number")
                        d.missedAppFrames = o.longs === String ? String(m.missedAppFrames) : m.missedAppFrames;
                    else
                        d.missedAppFrames = o.longs === String ? $util.Long.prototype.toString.call(m.missedAppFrames) : o.longs === Number ? new $util.LongBits(m.missedAppFrames.low >>> 0, m.missedAppFrames.high >>> 0).toNumber() : m.missedAppFrames;
                }
                return d;
            };

            /**
             * Converts this AndroidFrameTimelineMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidFrameTimelineMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidFrameTimelineMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidFrameTimelineMetric.ProcessBreakdown = (function() {

                /**
                 * Properties of a ProcessBreakdown.
                 * @memberof perfetto.protos.AndroidFrameTimelineMetric
                 * @interface IProcessBreakdown
                 * @property {perfetto.protos.IAndroidProcessMetadata|null} [process] ProcessBreakdown process
                 * @property {number|null} [totalFrames] ProcessBreakdown totalFrames
                 * @property {number|null} [missedFrames] ProcessBreakdown missedFrames
                 * @property {number|null} [missedAppFrames] ProcessBreakdown missedAppFrames
                 * @property {number|null} [missedSfFrames] ProcessBreakdown missedSfFrames
                 * @property {number|null} [frameDurMax] ProcessBreakdown frameDurMax
                 * @property {number|null} [frameDurAvg] ProcessBreakdown frameDurAvg
                 * @property {number|null} [frameDurP50] ProcessBreakdown frameDurP50
                 * @property {number|null} [frameDurP90] ProcessBreakdown frameDurP90
                 * @property {number|null} [frameDurP95] ProcessBreakdown frameDurP95
                 * @property {number|null} [frameDurP99] ProcessBreakdown frameDurP99
                 */

                /**
                 * Constructs a new ProcessBreakdown.
                 * @memberof perfetto.protos.AndroidFrameTimelineMetric
                 * @classdesc Represents a ProcessBreakdown.
                 * @implements IProcessBreakdown
                 * @constructor
                 * @param {perfetto.protos.AndroidFrameTimelineMetric.IProcessBreakdown=} [p] Properties to set
                 */
                function ProcessBreakdown(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * ProcessBreakdown process.
                 * @member {perfetto.protos.IAndroidProcessMetadata|null|undefined} process
                 * @memberof perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown
                 * @instance
                 */
                ProcessBreakdown.prototype.process = null;

                /**
                 * ProcessBreakdown totalFrames.
                 * @member {number} totalFrames
                 * @memberof perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown
                 * @instance
                 */
                ProcessBreakdown.prototype.totalFrames = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * ProcessBreakdown missedFrames.
                 * @member {number} missedFrames
                 * @memberof perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown
                 * @instance
                 */
                ProcessBreakdown.prototype.missedFrames = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * ProcessBreakdown missedAppFrames.
                 * @member {number} missedAppFrames
                 * @memberof perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown
                 * @instance
                 */
                ProcessBreakdown.prototype.missedAppFrames = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * ProcessBreakdown missedSfFrames.
                 * @member {number} missedSfFrames
                 * @memberof perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown
                 * @instance
                 */
                ProcessBreakdown.prototype.missedSfFrames = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * ProcessBreakdown frameDurMax.
                 * @member {number} frameDurMax
                 * @memberof perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown
                 * @instance
                 */
                ProcessBreakdown.prototype.frameDurMax = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * ProcessBreakdown frameDurAvg.
                 * @member {number} frameDurAvg
                 * @memberof perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown
                 * @instance
                 */
                ProcessBreakdown.prototype.frameDurAvg = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * ProcessBreakdown frameDurP50.
                 * @member {number} frameDurP50
                 * @memberof perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown
                 * @instance
                 */
                ProcessBreakdown.prototype.frameDurP50 = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * ProcessBreakdown frameDurP90.
                 * @member {number} frameDurP90
                 * @memberof perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown
                 * @instance
                 */
                ProcessBreakdown.prototype.frameDurP90 = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * ProcessBreakdown frameDurP95.
                 * @member {number} frameDurP95
                 * @memberof perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown
                 * @instance
                 */
                ProcessBreakdown.prototype.frameDurP95 = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * ProcessBreakdown frameDurP99.
                 * @member {number} frameDurP99
                 * @memberof perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown
                 * @instance
                 */
                ProcessBreakdown.prototype.frameDurP99 = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new ProcessBreakdown instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown
                 * @static
                 * @param {perfetto.protos.AndroidFrameTimelineMetric.IProcessBreakdown=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown} ProcessBreakdown instance
                 */
                ProcessBreakdown.create = function create(properties) {
                    return new ProcessBreakdown(properties);
                };

                /**
                 * Encodes the specified ProcessBreakdown message. Does not implicitly {@link perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown
                 * @static
                 * @param {perfetto.protos.AndroidFrameTimelineMetric.IProcessBreakdown} m ProcessBreakdown message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProcessBreakdown.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.process != null && Object.hasOwnProperty.call(m, "process"))
                        $root.perfetto.protos.AndroidProcessMetadata.encode(m.process, w.uint32(26).fork()).ldelim();
                    if (m.totalFrames != null && Object.hasOwnProperty.call(m, "totalFrames"))
                        w.uint32(32).int64(m.totalFrames);
                    if (m.missedFrames != null && Object.hasOwnProperty.call(m, "missedFrames"))
                        w.uint32(40).int64(m.missedFrames);
                    if (m.missedAppFrames != null && Object.hasOwnProperty.call(m, "missedAppFrames"))
                        w.uint32(48).int64(m.missedAppFrames);
                    if (m.missedSfFrames != null && Object.hasOwnProperty.call(m, "missedSfFrames"))
                        w.uint32(56).int64(m.missedSfFrames);
                    if (m.frameDurMax != null && Object.hasOwnProperty.call(m, "frameDurMax"))
                        w.uint32(64).int64(m.frameDurMax);
                    if (m.frameDurAvg != null && Object.hasOwnProperty.call(m, "frameDurAvg"))
                        w.uint32(72).int64(m.frameDurAvg);
                    if (m.frameDurP50 != null && Object.hasOwnProperty.call(m, "frameDurP50"))
                        w.uint32(80).int64(m.frameDurP50);
                    if (m.frameDurP90 != null && Object.hasOwnProperty.call(m, "frameDurP90"))
                        w.uint32(88).int64(m.frameDurP90);
                    if (m.frameDurP95 != null && Object.hasOwnProperty.call(m, "frameDurP95"))
                        w.uint32(96).int64(m.frameDurP95);
                    if (m.frameDurP99 != null && Object.hasOwnProperty.call(m, "frameDurP99"))
                        w.uint32(104).int64(m.frameDurP99);
                    return w;
                };

                /**
                 * Encodes the specified ProcessBreakdown message, length delimited. Does not implicitly {@link perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown
                 * @static
                 * @param {perfetto.protos.AndroidFrameTimelineMetric.IProcessBreakdown} message ProcessBreakdown message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProcessBreakdown.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a ProcessBreakdown message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown} ProcessBreakdown
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProcessBreakdown.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 3:
                            m.process = $root.perfetto.protos.AndroidProcessMetadata.decode(r, r.uint32());
                            break;
                        case 4:
                            m.totalFrames = r.int64();
                            break;
                        case 5:
                            m.missedFrames = r.int64();
                            break;
                        case 6:
                            m.missedAppFrames = r.int64();
                            break;
                        case 7:
                            m.missedSfFrames = r.int64();
                            break;
                        case 8:
                            m.frameDurMax = r.int64();
                            break;
                        case 9:
                            m.frameDurAvg = r.int64();
                            break;
                        case 10:
                            m.frameDurP50 = r.int64();
                            break;
                        case 11:
                            m.frameDurP90 = r.int64();
                            break;
                        case 12:
                            m.frameDurP95 = r.int64();
                            break;
                        case 13:
                            m.frameDurP99 = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a ProcessBreakdown message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown} ProcessBreakdown
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProcessBreakdown.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a ProcessBreakdown message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ProcessBreakdown.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.process != null && m.hasOwnProperty("process")) {
                        {
                            var e = $root.perfetto.protos.AndroidProcessMetadata.verify(m.process);
                            if (e)
                                return "process." + e;
                        }
                    }
                    if (m.totalFrames != null && m.hasOwnProperty("totalFrames")) {
                        if (!$util.isInteger(m.totalFrames) && !(m.totalFrames && $util.isInteger(m.totalFrames.low) && $util.isInteger(m.totalFrames.high)))
                            return "totalFrames: integer|Long expected";
                    }
                    if (m.missedFrames != null && m.hasOwnProperty("missedFrames")) {
                        if (!$util.isInteger(m.missedFrames) && !(m.missedFrames && $util.isInteger(m.missedFrames.low) && $util.isInteger(m.missedFrames.high)))
                            return "missedFrames: integer|Long expected";
                    }
                    if (m.missedAppFrames != null && m.hasOwnProperty("missedAppFrames")) {
                        if (!$util.isInteger(m.missedAppFrames) && !(m.missedAppFrames && $util.isInteger(m.missedAppFrames.low) && $util.isInteger(m.missedAppFrames.high)))
                            return "missedAppFrames: integer|Long expected";
                    }
                    if (m.missedSfFrames != null && m.hasOwnProperty("missedSfFrames")) {
                        if (!$util.isInteger(m.missedSfFrames) && !(m.missedSfFrames && $util.isInteger(m.missedSfFrames.low) && $util.isInteger(m.missedSfFrames.high)))
                            return "missedSfFrames: integer|Long expected";
                    }
                    if (m.frameDurMax != null && m.hasOwnProperty("frameDurMax")) {
                        if (!$util.isInteger(m.frameDurMax) && !(m.frameDurMax && $util.isInteger(m.frameDurMax.low) && $util.isInteger(m.frameDurMax.high)))
                            return "frameDurMax: integer|Long expected";
                    }
                    if (m.frameDurAvg != null && m.hasOwnProperty("frameDurAvg")) {
                        if (!$util.isInteger(m.frameDurAvg) && !(m.frameDurAvg && $util.isInteger(m.frameDurAvg.low) && $util.isInteger(m.frameDurAvg.high)))
                            return "frameDurAvg: integer|Long expected";
                    }
                    if (m.frameDurP50 != null && m.hasOwnProperty("frameDurP50")) {
                        if (!$util.isInteger(m.frameDurP50) && !(m.frameDurP50 && $util.isInteger(m.frameDurP50.low) && $util.isInteger(m.frameDurP50.high)))
                            return "frameDurP50: integer|Long expected";
                    }
                    if (m.frameDurP90 != null && m.hasOwnProperty("frameDurP90")) {
                        if (!$util.isInteger(m.frameDurP90) && !(m.frameDurP90 && $util.isInteger(m.frameDurP90.low) && $util.isInteger(m.frameDurP90.high)))
                            return "frameDurP90: integer|Long expected";
                    }
                    if (m.frameDurP95 != null && m.hasOwnProperty("frameDurP95")) {
                        if (!$util.isInteger(m.frameDurP95) && !(m.frameDurP95 && $util.isInteger(m.frameDurP95.low) && $util.isInteger(m.frameDurP95.high)))
                            return "frameDurP95: integer|Long expected";
                    }
                    if (m.frameDurP99 != null && m.hasOwnProperty("frameDurP99")) {
                        if (!$util.isInteger(m.frameDurP99) && !(m.frameDurP99 && $util.isInteger(m.frameDurP99.low) && $util.isInteger(m.frameDurP99.high)))
                            return "frameDurP99: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a ProcessBreakdown message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown} ProcessBreakdown
                 */
                ProcessBreakdown.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown)
                        return d;
                    var m = new $root.perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown();
                    if (d.process != null) {
                        if (typeof d.process !== "object")
                            throw TypeError(".perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown.process: object expected");
                        m.process = $root.perfetto.protos.AndroidProcessMetadata.fromObject(d.process);
                    }
                    if (d.totalFrames != null) {
                        if ($util.Long)
                            (m.totalFrames = $util.Long.fromValue(d.totalFrames)).unsigned = false;
                        else if (typeof d.totalFrames === "string")
                            m.totalFrames = parseInt(d.totalFrames, 10);
                        else if (typeof d.totalFrames === "number")
                            m.totalFrames = d.totalFrames;
                        else if (typeof d.totalFrames === "object")
                            m.totalFrames = new $util.LongBits(d.totalFrames.low >>> 0, d.totalFrames.high >>> 0).toNumber();
                    }
                    if (d.missedFrames != null) {
                        if ($util.Long)
                            (m.missedFrames = $util.Long.fromValue(d.missedFrames)).unsigned = false;
                        else if (typeof d.missedFrames === "string")
                            m.missedFrames = parseInt(d.missedFrames, 10);
                        else if (typeof d.missedFrames === "number")
                            m.missedFrames = d.missedFrames;
                        else if (typeof d.missedFrames === "object")
                            m.missedFrames = new $util.LongBits(d.missedFrames.low >>> 0, d.missedFrames.high >>> 0).toNumber();
                    }
                    if (d.missedAppFrames != null) {
                        if ($util.Long)
                            (m.missedAppFrames = $util.Long.fromValue(d.missedAppFrames)).unsigned = false;
                        else if (typeof d.missedAppFrames === "string")
                            m.missedAppFrames = parseInt(d.missedAppFrames, 10);
                        else if (typeof d.missedAppFrames === "number")
                            m.missedAppFrames = d.missedAppFrames;
                        else if (typeof d.missedAppFrames === "object")
                            m.missedAppFrames = new $util.LongBits(d.missedAppFrames.low >>> 0, d.missedAppFrames.high >>> 0).toNumber();
                    }
                    if (d.missedSfFrames != null) {
                        if ($util.Long)
                            (m.missedSfFrames = $util.Long.fromValue(d.missedSfFrames)).unsigned = false;
                        else if (typeof d.missedSfFrames === "string")
                            m.missedSfFrames = parseInt(d.missedSfFrames, 10);
                        else if (typeof d.missedSfFrames === "number")
                            m.missedSfFrames = d.missedSfFrames;
                        else if (typeof d.missedSfFrames === "object")
                            m.missedSfFrames = new $util.LongBits(d.missedSfFrames.low >>> 0, d.missedSfFrames.high >>> 0).toNumber();
                    }
                    if (d.frameDurMax != null) {
                        if ($util.Long)
                            (m.frameDurMax = $util.Long.fromValue(d.frameDurMax)).unsigned = false;
                        else if (typeof d.frameDurMax === "string")
                            m.frameDurMax = parseInt(d.frameDurMax, 10);
                        else if (typeof d.frameDurMax === "number")
                            m.frameDurMax = d.frameDurMax;
                        else if (typeof d.frameDurMax === "object")
                            m.frameDurMax = new $util.LongBits(d.frameDurMax.low >>> 0, d.frameDurMax.high >>> 0).toNumber();
                    }
                    if (d.frameDurAvg != null) {
                        if ($util.Long)
                            (m.frameDurAvg = $util.Long.fromValue(d.frameDurAvg)).unsigned = false;
                        else if (typeof d.frameDurAvg === "string")
                            m.frameDurAvg = parseInt(d.frameDurAvg, 10);
                        else if (typeof d.frameDurAvg === "number")
                            m.frameDurAvg = d.frameDurAvg;
                        else if (typeof d.frameDurAvg === "object")
                            m.frameDurAvg = new $util.LongBits(d.frameDurAvg.low >>> 0, d.frameDurAvg.high >>> 0).toNumber();
                    }
                    if (d.frameDurP50 != null) {
                        if ($util.Long)
                            (m.frameDurP50 = $util.Long.fromValue(d.frameDurP50)).unsigned = false;
                        else if (typeof d.frameDurP50 === "string")
                            m.frameDurP50 = parseInt(d.frameDurP50, 10);
                        else if (typeof d.frameDurP50 === "number")
                            m.frameDurP50 = d.frameDurP50;
                        else if (typeof d.frameDurP50 === "object")
                            m.frameDurP50 = new $util.LongBits(d.frameDurP50.low >>> 0, d.frameDurP50.high >>> 0).toNumber();
                    }
                    if (d.frameDurP90 != null) {
                        if ($util.Long)
                            (m.frameDurP90 = $util.Long.fromValue(d.frameDurP90)).unsigned = false;
                        else if (typeof d.frameDurP90 === "string")
                            m.frameDurP90 = parseInt(d.frameDurP90, 10);
                        else if (typeof d.frameDurP90 === "number")
                            m.frameDurP90 = d.frameDurP90;
                        else if (typeof d.frameDurP90 === "object")
                            m.frameDurP90 = new $util.LongBits(d.frameDurP90.low >>> 0, d.frameDurP90.high >>> 0).toNumber();
                    }
                    if (d.frameDurP95 != null) {
                        if ($util.Long)
                            (m.frameDurP95 = $util.Long.fromValue(d.frameDurP95)).unsigned = false;
                        else if (typeof d.frameDurP95 === "string")
                            m.frameDurP95 = parseInt(d.frameDurP95, 10);
                        else if (typeof d.frameDurP95 === "number")
                            m.frameDurP95 = d.frameDurP95;
                        else if (typeof d.frameDurP95 === "object")
                            m.frameDurP95 = new $util.LongBits(d.frameDurP95.low >>> 0, d.frameDurP95.high >>> 0).toNumber();
                    }
                    if (d.frameDurP99 != null) {
                        if ($util.Long)
                            (m.frameDurP99 = $util.Long.fromValue(d.frameDurP99)).unsigned = false;
                        else if (typeof d.frameDurP99 === "string")
                            m.frameDurP99 = parseInt(d.frameDurP99, 10);
                        else if (typeof d.frameDurP99 === "number")
                            m.frameDurP99 = d.frameDurP99;
                        else if (typeof d.frameDurP99 === "object")
                            m.frameDurP99 = new $util.LongBits(d.frameDurP99.low >>> 0, d.frameDurP99.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a ProcessBreakdown message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown
                 * @static
                 * @param {perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown} m ProcessBreakdown
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ProcessBreakdown.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.process = null;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.totalFrames = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.totalFrames = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.missedFrames = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.missedFrames = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.missedAppFrames = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.missedAppFrames = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.missedSfFrames = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.missedSfFrames = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.frameDurMax = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.frameDurMax = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.frameDurAvg = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.frameDurAvg = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.frameDurP50 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.frameDurP50 = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.frameDurP90 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.frameDurP90 = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.frameDurP95 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.frameDurP95 = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.frameDurP99 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.frameDurP99 = o.longs === String ? "0" : 0;
                    }
                    if (m.process != null && m.hasOwnProperty("process")) {
                        d.process = $root.perfetto.protos.AndroidProcessMetadata.toObject(m.process, o);
                    }
                    if (m.totalFrames != null && m.hasOwnProperty("totalFrames")) {
                        if (typeof m.totalFrames === "number")
                            d.totalFrames = o.longs === String ? String(m.totalFrames) : m.totalFrames;
                        else
                            d.totalFrames = o.longs === String ? $util.Long.prototype.toString.call(m.totalFrames) : o.longs === Number ? new $util.LongBits(m.totalFrames.low >>> 0, m.totalFrames.high >>> 0).toNumber() : m.totalFrames;
                    }
                    if (m.missedFrames != null && m.hasOwnProperty("missedFrames")) {
                        if (typeof m.missedFrames === "number")
                            d.missedFrames = o.longs === String ? String(m.missedFrames) : m.missedFrames;
                        else
                            d.missedFrames = o.longs === String ? $util.Long.prototype.toString.call(m.missedFrames) : o.longs === Number ? new $util.LongBits(m.missedFrames.low >>> 0, m.missedFrames.high >>> 0).toNumber() : m.missedFrames;
                    }
                    if (m.missedAppFrames != null && m.hasOwnProperty("missedAppFrames")) {
                        if (typeof m.missedAppFrames === "number")
                            d.missedAppFrames = o.longs === String ? String(m.missedAppFrames) : m.missedAppFrames;
                        else
                            d.missedAppFrames = o.longs === String ? $util.Long.prototype.toString.call(m.missedAppFrames) : o.longs === Number ? new $util.LongBits(m.missedAppFrames.low >>> 0, m.missedAppFrames.high >>> 0).toNumber() : m.missedAppFrames;
                    }
                    if (m.missedSfFrames != null && m.hasOwnProperty("missedSfFrames")) {
                        if (typeof m.missedSfFrames === "number")
                            d.missedSfFrames = o.longs === String ? String(m.missedSfFrames) : m.missedSfFrames;
                        else
                            d.missedSfFrames = o.longs === String ? $util.Long.prototype.toString.call(m.missedSfFrames) : o.longs === Number ? new $util.LongBits(m.missedSfFrames.low >>> 0, m.missedSfFrames.high >>> 0).toNumber() : m.missedSfFrames;
                    }
                    if (m.frameDurMax != null && m.hasOwnProperty("frameDurMax")) {
                        if (typeof m.frameDurMax === "number")
                            d.frameDurMax = o.longs === String ? String(m.frameDurMax) : m.frameDurMax;
                        else
                            d.frameDurMax = o.longs === String ? $util.Long.prototype.toString.call(m.frameDurMax) : o.longs === Number ? new $util.LongBits(m.frameDurMax.low >>> 0, m.frameDurMax.high >>> 0).toNumber() : m.frameDurMax;
                    }
                    if (m.frameDurAvg != null && m.hasOwnProperty("frameDurAvg")) {
                        if (typeof m.frameDurAvg === "number")
                            d.frameDurAvg = o.longs === String ? String(m.frameDurAvg) : m.frameDurAvg;
                        else
                            d.frameDurAvg = o.longs === String ? $util.Long.prototype.toString.call(m.frameDurAvg) : o.longs === Number ? new $util.LongBits(m.frameDurAvg.low >>> 0, m.frameDurAvg.high >>> 0).toNumber() : m.frameDurAvg;
                    }
                    if (m.frameDurP50 != null && m.hasOwnProperty("frameDurP50")) {
                        if (typeof m.frameDurP50 === "number")
                            d.frameDurP50 = o.longs === String ? String(m.frameDurP50) : m.frameDurP50;
                        else
                            d.frameDurP50 = o.longs === String ? $util.Long.prototype.toString.call(m.frameDurP50) : o.longs === Number ? new $util.LongBits(m.frameDurP50.low >>> 0, m.frameDurP50.high >>> 0).toNumber() : m.frameDurP50;
                    }
                    if (m.frameDurP90 != null && m.hasOwnProperty("frameDurP90")) {
                        if (typeof m.frameDurP90 === "number")
                            d.frameDurP90 = o.longs === String ? String(m.frameDurP90) : m.frameDurP90;
                        else
                            d.frameDurP90 = o.longs === String ? $util.Long.prototype.toString.call(m.frameDurP90) : o.longs === Number ? new $util.LongBits(m.frameDurP90.low >>> 0, m.frameDurP90.high >>> 0).toNumber() : m.frameDurP90;
                    }
                    if (m.frameDurP95 != null && m.hasOwnProperty("frameDurP95")) {
                        if (typeof m.frameDurP95 === "number")
                            d.frameDurP95 = o.longs === String ? String(m.frameDurP95) : m.frameDurP95;
                        else
                            d.frameDurP95 = o.longs === String ? $util.Long.prototype.toString.call(m.frameDurP95) : o.longs === Number ? new $util.LongBits(m.frameDurP95.low >>> 0, m.frameDurP95.high >>> 0).toNumber() : m.frameDurP95;
                    }
                    if (m.frameDurP99 != null && m.hasOwnProperty("frameDurP99")) {
                        if (typeof m.frameDurP99 === "number")
                            d.frameDurP99 = o.longs === String ? String(m.frameDurP99) : m.frameDurP99;
                        else
                            d.frameDurP99 = o.longs === String ? $util.Long.prototype.toString.call(m.frameDurP99) : o.longs === Number ? new $util.LongBits(m.frameDurP99.low >>> 0, m.frameDurP99.high >>> 0).toNumber() : m.frameDurP99;
                    }
                    return d;
                };

                /**
                 * Converts this ProcessBreakdown to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidFrameTimelineMetric.ProcessBreakdown
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ProcessBreakdown.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return ProcessBreakdown;
            })();

            return AndroidFrameTimelineMetric;
        })();

        protos.AndroidProcessMetadata = (function() {

            /**
             * Properties of an AndroidProcessMetadata.
             * @memberof perfetto.protos
             * @interface IAndroidProcessMetadata
             * @property {string|null} [name] AndroidProcessMetadata name
             * @property {number|null} [uid] AndroidProcessMetadata uid
             * @property {perfetto.protos.AndroidProcessMetadata.IPackage|null} ["package"] AndroidProcessMetadata package
             * @property {Array.<perfetto.protos.AndroidProcessMetadata.IPackage>|null} [packagesForUid] AndroidProcessMetadata packagesForUid
             */

            /**
             * Constructs a new AndroidProcessMetadata.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidProcessMetadata.
             * @implements IAndroidProcessMetadata
             * @constructor
             * @param {perfetto.protos.IAndroidProcessMetadata=} [p] Properties to set
             */
            function AndroidProcessMetadata(p) {
                this.packagesForUid = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidProcessMetadata name.
             * @member {string} name
             * @memberof perfetto.protos.AndroidProcessMetadata
             * @instance
             */
            AndroidProcessMetadata.prototype.name = "";

            /**
             * AndroidProcessMetadata uid.
             * @member {number} uid
             * @memberof perfetto.protos.AndroidProcessMetadata
             * @instance
             */
            AndroidProcessMetadata.prototype.uid = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * AndroidProcessMetadata package.
             * @member {perfetto.protos.AndroidProcessMetadata.IPackage|null|undefined} package
             * @memberof perfetto.protos.AndroidProcessMetadata
             * @instance
             */
            AndroidProcessMetadata.prototype["package"] = null;

            /**
             * AndroidProcessMetadata packagesForUid.
             * @member {Array.<perfetto.protos.AndroidProcessMetadata.IPackage>} packagesForUid
             * @memberof perfetto.protos.AndroidProcessMetadata
             * @instance
             */
            AndroidProcessMetadata.prototype.packagesForUid = $util.emptyArray;

            /**
             * Creates a new AndroidProcessMetadata instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidProcessMetadata
             * @static
             * @param {perfetto.protos.IAndroidProcessMetadata=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidProcessMetadata} AndroidProcessMetadata instance
             */
            AndroidProcessMetadata.create = function create(properties) {
                return new AndroidProcessMetadata(properties);
            };

            /**
             * Encodes the specified AndroidProcessMetadata message. Does not implicitly {@link perfetto.protos.AndroidProcessMetadata.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidProcessMetadata
             * @static
             * @param {perfetto.protos.IAndroidProcessMetadata} m AndroidProcessMetadata message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidProcessMetadata.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                if (m.uid != null && Object.hasOwnProperty.call(m, "uid"))
                    w.uint32(16).int64(m.uid);
                if (m["package"] != null && Object.hasOwnProperty.call(m, "package"))
                    $root.perfetto.protos.AndroidProcessMetadata.Package.encode(m["package"], w.uint32(58).fork()).ldelim();
                if (m.packagesForUid != null && m.packagesForUid.length) {
                    for (var i = 0; i < m.packagesForUid.length; ++i)
                        $root.perfetto.protos.AndroidProcessMetadata.Package.encode(m.packagesForUid[i], w.uint32(66).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified AndroidProcessMetadata message, length delimited. Does not implicitly {@link perfetto.protos.AndroidProcessMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidProcessMetadata
             * @static
             * @param {perfetto.protos.IAndroidProcessMetadata} message AndroidProcessMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidProcessMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidProcessMetadata message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidProcessMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidProcessMetadata} AndroidProcessMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidProcessMetadata.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidProcessMetadata();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    case 2:
                        m.uid = r.int64();
                        break;
                    case 7:
                        m["package"] = $root.perfetto.protos.AndroidProcessMetadata.Package.decode(r, r.uint32());
                        break;
                    case 8:
                        if (!(m.packagesForUid && m.packagesForUid.length))
                            m.packagesForUid = [];
                        m.packagesForUid.push($root.perfetto.protos.AndroidProcessMetadata.Package.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidProcessMetadata message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidProcessMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidProcessMetadata} AndroidProcessMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidProcessMetadata.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidProcessMetadata message.
             * @function verify
             * @memberof perfetto.protos.AndroidProcessMetadata
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidProcessMetadata.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.uid != null && m.hasOwnProperty("uid")) {
                    if (!$util.isInteger(m.uid) && !(m.uid && $util.isInteger(m.uid.low) && $util.isInteger(m.uid.high)))
                        return "uid: integer|Long expected";
                }
                if (m["package"] != null && m.hasOwnProperty("package")) {
                    {
                        var e = $root.perfetto.protos.AndroidProcessMetadata.Package.verify(m["package"]);
                        if (e)
                            return "package." + e;
                    }
                }
                if (m.packagesForUid != null && m.hasOwnProperty("packagesForUid")) {
                    if (!Array.isArray(m.packagesForUid))
                        return "packagesForUid: array expected";
                    for (var i = 0; i < m.packagesForUid.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidProcessMetadata.Package.verify(m.packagesForUid[i]);
                            if (e)
                                return "packagesForUid." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidProcessMetadata message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidProcessMetadata
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidProcessMetadata} AndroidProcessMetadata
             */
            AndroidProcessMetadata.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidProcessMetadata)
                    return d;
                var m = new $root.perfetto.protos.AndroidProcessMetadata();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.uid != null) {
                    if ($util.Long)
                        (m.uid = $util.Long.fromValue(d.uid)).unsigned = false;
                    else if (typeof d.uid === "string")
                        m.uid = parseInt(d.uid, 10);
                    else if (typeof d.uid === "number")
                        m.uid = d.uid;
                    else if (typeof d.uid === "object")
                        m.uid = new $util.LongBits(d.uid.low >>> 0, d.uid.high >>> 0).toNumber();
                }
                if (d["package"] != null) {
                    if (typeof d["package"] !== "object")
                        throw TypeError(".perfetto.protos.AndroidProcessMetadata.package: object expected");
                    m["package"] = $root.perfetto.protos.AndroidProcessMetadata.Package.fromObject(d["package"]);
                }
                if (d.packagesForUid) {
                    if (!Array.isArray(d.packagesForUid))
                        throw TypeError(".perfetto.protos.AndroidProcessMetadata.packagesForUid: array expected");
                    m.packagesForUid = [];
                    for (var i = 0; i < d.packagesForUid.length; ++i) {
                        if (typeof d.packagesForUid[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidProcessMetadata.packagesForUid: object expected");
                        m.packagesForUid[i] = $root.perfetto.protos.AndroidProcessMetadata.Package.fromObject(d.packagesForUid[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidProcessMetadata message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidProcessMetadata
             * @static
             * @param {perfetto.protos.AndroidProcessMetadata} m AndroidProcessMetadata
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidProcessMetadata.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.packagesForUid = [];
                }
                if (o.defaults) {
                    d.name = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.uid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.uid = o.longs === String ? "0" : 0;
                    d["package"] = null;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.uid != null && m.hasOwnProperty("uid")) {
                    if (typeof m.uid === "number")
                        d.uid = o.longs === String ? String(m.uid) : m.uid;
                    else
                        d.uid = o.longs === String ? $util.Long.prototype.toString.call(m.uid) : o.longs === Number ? new $util.LongBits(m.uid.low >>> 0, m.uid.high >>> 0).toNumber() : m.uid;
                }
                if (m["package"] != null && m.hasOwnProperty("package")) {
                    d["package"] = $root.perfetto.protos.AndroidProcessMetadata.Package.toObject(m["package"], o);
                }
                if (m.packagesForUid && m.packagesForUid.length) {
                    d.packagesForUid = [];
                    for (var j = 0; j < m.packagesForUid.length; ++j) {
                        d.packagesForUid[j] = $root.perfetto.protos.AndroidProcessMetadata.Package.toObject(m.packagesForUid[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidProcessMetadata to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidProcessMetadata
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidProcessMetadata.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidProcessMetadata.Package = (function() {

                /**
                 * Properties of a Package.
                 * @memberof perfetto.protos.AndroidProcessMetadata
                 * @interface IPackage
                 * @property {string|null} [packageName] Package packageName
                 * @property {number|null} [apkVersionCode] Package apkVersionCode
                 * @property {boolean|null} [debuggable] Package debuggable
                 */

                /**
                 * Constructs a new Package.
                 * @memberof perfetto.protos.AndroidProcessMetadata
                 * @classdesc Represents a Package.
                 * @implements IPackage
                 * @constructor
                 * @param {perfetto.protos.AndroidProcessMetadata.IPackage=} [p] Properties to set
                 */
                function Package(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Package packageName.
                 * @member {string} packageName
                 * @memberof perfetto.protos.AndroidProcessMetadata.Package
                 * @instance
                 */
                Package.prototype.packageName = "";

                /**
                 * Package apkVersionCode.
                 * @member {number} apkVersionCode
                 * @memberof perfetto.protos.AndroidProcessMetadata.Package
                 * @instance
                 */
                Package.prototype.apkVersionCode = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Package debuggable.
                 * @member {boolean} debuggable
                 * @memberof perfetto.protos.AndroidProcessMetadata.Package
                 * @instance
                 */
                Package.prototype.debuggable = false;

                /**
                 * Creates a new Package instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidProcessMetadata.Package
                 * @static
                 * @param {perfetto.protos.AndroidProcessMetadata.IPackage=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidProcessMetadata.Package} Package instance
                 */
                Package.create = function create(properties) {
                    return new Package(properties);
                };

                /**
                 * Encodes the specified Package message. Does not implicitly {@link perfetto.protos.AndroidProcessMetadata.Package.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidProcessMetadata.Package
                 * @static
                 * @param {perfetto.protos.AndroidProcessMetadata.IPackage} m Package message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Package.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.packageName != null && Object.hasOwnProperty.call(m, "packageName"))
                        w.uint32(10).string(m.packageName);
                    if (m.apkVersionCode != null && Object.hasOwnProperty.call(m, "apkVersionCode"))
                        w.uint32(16).int64(m.apkVersionCode);
                    if (m.debuggable != null && Object.hasOwnProperty.call(m, "debuggable"))
                        w.uint32(24).bool(m.debuggable);
                    return w;
                };

                /**
                 * Encodes the specified Package message, length delimited. Does not implicitly {@link perfetto.protos.AndroidProcessMetadata.Package.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidProcessMetadata.Package
                 * @static
                 * @param {perfetto.protos.AndroidProcessMetadata.IPackage} message Package message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Package.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Package message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidProcessMetadata.Package
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidProcessMetadata.Package} Package
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Package.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidProcessMetadata.Package();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.packageName = r.string();
                            break;
                        case 2:
                            m.apkVersionCode = r.int64();
                            break;
                        case 3:
                            m.debuggable = r.bool();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Package message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidProcessMetadata.Package
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidProcessMetadata.Package} Package
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Package.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Package message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidProcessMetadata.Package
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Package.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.packageName != null && m.hasOwnProperty("packageName")) {
                        if (!$util.isString(m.packageName))
                            return "packageName: string expected";
                    }
                    if (m.apkVersionCode != null && m.hasOwnProperty("apkVersionCode")) {
                        if (!$util.isInteger(m.apkVersionCode) && !(m.apkVersionCode && $util.isInteger(m.apkVersionCode.low) && $util.isInteger(m.apkVersionCode.high)))
                            return "apkVersionCode: integer|Long expected";
                    }
                    if (m.debuggable != null && m.hasOwnProperty("debuggable")) {
                        if (typeof m.debuggable !== "boolean")
                            return "debuggable: boolean expected";
                    }
                    return null;
                };

                /**
                 * Creates a Package message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidProcessMetadata.Package
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidProcessMetadata.Package} Package
                 */
                Package.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidProcessMetadata.Package)
                        return d;
                    var m = new $root.perfetto.protos.AndroidProcessMetadata.Package();
                    if (d.packageName != null) {
                        m.packageName = String(d.packageName);
                    }
                    if (d.apkVersionCode != null) {
                        if ($util.Long)
                            (m.apkVersionCode = $util.Long.fromValue(d.apkVersionCode)).unsigned = false;
                        else if (typeof d.apkVersionCode === "string")
                            m.apkVersionCode = parseInt(d.apkVersionCode, 10);
                        else if (typeof d.apkVersionCode === "number")
                            m.apkVersionCode = d.apkVersionCode;
                        else if (typeof d.apkVersionCode === "object")
                            m.apkVersionCode = new $util.LongBits(d.apkVersionCode.low >>> 0, d.apkVersionCode.high >>> 0).toNumber();
                    }
                    if (d.debuggable != null) {
                        m.debuggable = Boolean(d.debuggable);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Package message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidProcessMetadata.Package
                 * @static
                 * @param {perfetto.protos.AndroidProcessMetadata.Package} m Package
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Package.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.packageName = "";
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.apkVersionCode = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.apkVersionCode = o.longs === String ? "0" : 0;
                        d.debuggable = false;
                    }
                    if (m.packageName != null && m.hasOwnProperty("packageName")) {
                        d.packageName = m.packageName;
                    }
                    if (m.apkVersionCode != null && m.hasOwnProperty("apkVersionCode")) {
                        if (typeof m.apkVersionCode === "number")
                            d.apkVersionCode = o.longs === String ? String(m.apkVersionCode) : m.apkVersionCode;
                        else
                            d.apkVersionCode = o.longs === String ? $util.Long.prototype.toString.call(m.apkVersionCode) : o.longs === Number ? new $util.LongBits(m.apkVersionCode.low >>> 0, m.apkVersionCode.high >>> 0).toNumber() : m.apkVersionCode;
                    }
                    if (m.debuggable != null && m.hasOwnProperty("debuggable")) {
                        d.debuggable = m.debuggable;
                    }
                    return d;
                };

                /**
                 * Converts this Package to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidProcessMetadata.Package
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Package.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Package;
            })();

            return AndroidProcessMetadata;
        })();

        protos.AndroidBatteryMetric = (function() {

            /**
             * Properties of an AndroidBatteryMetric.
             * @memberof perfetto.protos
             * @interface IAndroidBatteryMetric
             * @property {Array.<perfetto.protos.AndroidBatteryMetric.IBatteryCounters>|null} [batteryCounters] AndroidBatteryMetric batteryCounters
             * @property {perfetto.protos.AndroidBatteryMetric.IBatteryAggregates|null} [batteryAggregates] AndroidBatteryMetric batteryAggregates
             * @property {Array.<perfetto.protos.AndroidBatteryMetric.ISuspendPeriod>|null} [suspendPeriod] AndroidBatteryMetric suspendPeriod
             */

            /**
             * Constructs a new AndroidBatteryMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidBatteryMetric.
             * @implements IAndroidBatteryMetric
             * @constructor
             * @param {perfetto.protos.IAndroidBatteryMetric=} [p] Properties to set
             */
            function AndroidBatteryMetric(p) {
                this.batteryCounters = [];
                this.suspendPeriod = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidBatteryMetric batteryCounters.
             * @member {Array.<perfetto.protos.AndroidBatteryMetric.IBatteryCounters>} batteryCounters
             * @memberof perfetto.protos.AndroidBatteryMetric
             * @instance
             */
            AndroidBatteryMetric.prototype.batteryCounters = $util.emptyArray;

            /**
             * AndroidBatteryMetric batteryAggregates.
             * @member {perfetto.protos.AndroidBatteryMetric.IBatteryAggregates|null|undefined} batteryAggregates
             * @memberof perfetto.protos.AndroidBatteryMetric
             * @instance
             */
            AndroidBatteryMetric.prototype.batteryAggregates = null;

            /**
             * AndroidBatteryMetric suspendPeriod.
             * @member {Array.<perfetto.protos.AndroidBatteryMetric.ISuspendPeriod>} suspendPeriod
             * @memberof perfetto.protos.AndroidBatteryMetric
             * @instance
             */
            AndroidBatteryMetric.prototype.suspendPeriod = $util.emptyArray;

            /**
             * Creates a new AndroidBatteryMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidBatteryMetric
             * @static
             * @param {perfetto.protos.IAndroidBatteryMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidBatteryMetric} AndroidBatteryMetric instance
             */
            AndroidBatteryMetric.create = function create(properties) {
                return new AndroidBatteryMetric(properties);
            };

            /**
             * Encodes the specified AndroidBatteryMetric message. Does not implicitly {@link perfetto.protos.AndroidBatteryMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidBatteryMetric
             * @static
             * @param {perfetto.protos.IAndroidBatteryMetric} m AndroidBatteryMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidBatteryMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.batteryCounters != null && m.batteryCounters.length) {
                    for (var i = 0; i < m.batteryCounters.length; ++i)
                        $root.perfetto.protos.AndroidBatteryMetric.BatteryCounters.encode(m.batteryCounters[i], w.uint32(10).fork()).ldelim();
                }
                if (m.batteryAggregates != null && Object.hasOwnProperty.call(m, "batteryAggregates"))
                    $root.perfetto.protos.AndroidBatteryMetric.BatteryAggregates.encode(m.batteryAggregates, w.uint32(18).fork()).ldelim();
                if (m.suspendPeriod != null && m.suspendPeriod.length) {
                    for (var i = 0; i < m.suspendPeriod.length; ++i)
                        $root.perfetto.protos.AndroidBatteryMetric.SuspendPeriod.encode(m.suspendPeriod[i], w.uint32(26).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified AndroidBatteryMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidBatteryMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidBatteryMetric
             * @static
             * @param {perfetto.protos.IAndroidBatteryMetric} message AndroidBatteryMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidBatteryMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidBatteryMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidBatteryMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidBatteryMetric} AndroidBatteryMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidBatteryMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidBatteryMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.batteryCounters && m.batteryCounters.length))
                            m.batteryCounters = [];
                        m.batteryCounters.push($root.perfetto.protos.AndroidBatteryMetric.BatteryCounters.decode(r, r.uint32()));
                        break;
                    case 2:
                        m.batteryAggregates = $root.perfetto.protos.AndroidBatteryMetric.BatteryAggregates.decode(r, r.uint32());
                        break;
                    case 3:
                        if (!(m.suspendPeriod && m.suspendPeriod.length))
                            m.suspendPeriod = [];
                        m.suspendPeriod.push($root.perfetto.protos.AndroidBatteryMetric.SuspendPeriod.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidBatteryMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidBatteryMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidBatteryMetric} AndroidBatteryMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidBatteryMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidBatteryMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidBatteryMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidBatteryMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.batteryCounters != null && m.hasOwnProperty("batteryCounters")) {
                    if (!Array.isArray(m.batteryCounters))
                        return "batteryCounters: array expected";
                    for (var i = 0; i < m.batteryCounters.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidBatteryMetric.BatteryCounters.verify(m.batteryCounters[i]);
                            if (e)
                                return "batteryCounters." + e;
                        }
                    }
                }
                if (m.batteryAggregates != null && m.hasOwnProperty("batteryAggregates")) {
                    {
                        var e = $root.perfetto.protos.AndroidBatteryMetric.BatteryAggregates.verify(m.batteryAggregates);
                        if (e)
                            return "batteryAggregates." + e;
                    }
                }
                if (m.suspendPeriod != null && m.hasOwnProperty("suspendPeriod")) {
                    if (!Array.isArray(m.suspendPeriod))
                        return "suspendPeriod: array expected";
                    for (var i = 0; i < m.suspendPeriod.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidBatteryMetric.SuspendPeriod.verify(m.suspendPeriod[i]);
                            if (e)
                                return "suspendPeriod." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidBatteryMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidBatteryMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidBatteryMetric} AndroidBatteryMetric
             */
            AndroidBatteryMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidBatteryMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidBatteryMetric();
                if (d.batteryCounters) {
                    if (!Array.isArray(d.batteryCounters))
                        throw TypeError(".perfetto.protos.AndroidBatteryMetric.batteryCounters: array expected");
                    m.batteryCounters = [];
                    for (var i = 0; i < d.batteryCounters.length; ++i) {
                        if (typeof d.batteryCounters[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidBatteryMetric.batteryCounters: object expected");
                        m.batteryCounters[i] = $root.perfetto.protos.AndroidBatteryMetric.BatteryCounters.fromObject(d.batteryCounters[i]);
                    }
                }
                if (d.batteryAggregates != null) {
                    if (typeof d.batteryAggregates !== "object")
                        throw TypeError(".perfetto.protos.AndroidBatteryMetric.batteryAggregates: object expected");
                    m.batteryAggregates = $root.perfetto.protos.AndroidBatteryMetric.BatteryAggregates.fromObject(d.batteryAggregates);
                }
                if (d.suspendPeriod) {
                    if (!Array.isArray(d.suspendPeriod))
                        throw TypeError(".perfetto.protos.AndroidBatteryMetric.suspendPeriod: array expected");
                    m.suspendPeriod = [];
                    for (var i = 0; i < d.suspendPeriod.length; ++i) {
                        if (typeof d.suspendPeriod[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidBatteryMetric.suspendPeriod: object expected");
                        m.suspendPeriod[i] = $root.perfetto.protos.AndroidBatteryMetric.SuspendPeriod.fromObject(d.suspendPeriod[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidBatteryMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidBatteryMetric
             * @static
             * @param {perfetto.protos.AndroidBatteryMetric} m AndroidBatteryMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidBatteryMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.batteryCounters = [];
                    d.suspendPeriod = [];
                }
                if (o.defaults) {
                    d.batteryAggregates = null;
                }
                if (m.batteryCounters && m.batteryCounters.length) {
                    d.batteryCounters = [];
                    for (var j = 0; j < m.batteryCounters.length; ++j) {
                        d.batteryCounters[j] = $root.perfetto.protos.AndroidBatteryMetric.BatteryCounters.toObject(m.batteryCounters[j], o);
                    }
                }
                if (m.batteryAggregates != null && m.hasOwnProperty("batteryAggregates")) {
                    d.batteryAggregates = $root.perfetto.protos.AndroidBatteryMetric.BatteryAggregates.toObject(m.batteryAggregates, o);
                }
                if (m.suspendPeriod && m.suspendPeriod.length) {
                    d.suspendPeriod = [];
                    for (var j = 0; j < m.suspendPeriod.length; ++j) {
                        d.suspendPeriod[j] = $root.perfetto.protos.AndroidBatteryMetric.SuspendPeriod.toObject(m.suspendPeriod[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidBatteryMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidBatteryMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidBatteryMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidBatteryMetric.BatteryCounters = (function() {

                /**
                 * Properties of a BatteryCounters.
                 * @memberof perfetto.protos.AndroidBatteryMetric
                 * @interface IBatteryCounters
                 * @property {number|null} [timestampNs] BatteryCounters timestampNs
                 * @property {number|null} [chargeCounterUah] BatteryCounters chargeCounterUah
                 * @property {number|null} [capacityPercent] BatteryCounters capacityPercent
                 * @property {number|null} [currentUa] BatteryCounters currentUa
                 * @property {number|null} [currentAvgUa] BatteryCounters currentAvgUa
                 */

                /**
                 * Constructs a new BatteryCounters.
                 * @memberof perfetto.protos.AndroidBatteryMetric
                 * @classdesc Represents a BatteryCounters.
                 * @implements IBatteryCounters
                 * @constructor
                 * @param {perfetto.protos.AndroidBatteryMetric.IBatteryCounters=} [p] Properties to set
                 */
                function BatteryCounters(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * BatteryCounters timestampNs.
                 * @member {number} timestampNs
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryCounters
                 * @instance
                 */
                BatteryCounters.prototype.timestampNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * BatteryCounters chargeCounterUah.
                 * @member {number} chargeCounterUah
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryCounters
                 * @instance
                 */
                BatteryCounters.prototype.chargeCounterUah = 0;

                /**
                 * BatteryCounters capacityPercent.
                 * @member {number} capacityPercent
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryCounters
                 * @instance
                 */
                BatteryCounters.prototype.capacityPercent = 0;

                /**
                 * BatteryCounters currentUa.
                 * @member {number} currentUa
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryCounters
                 * @instance
                 */
                BatteryCounters.prototype.currentUa = 0;

                /**
                 * BatteryCounters currentAvgUa.
                 * @member {number} currentAvgUa
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryCounters
                 * @instance
                 */
                BatteryCounters.prototype.currentAvgUa = 0;

                /**
                 * Creates a new BatteryCounters instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryCounters
                 * @static
                 * @param {perfetto.protos.AndroidBatteryMetric.IBatteryCounters=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidBatteryMetric.BatteryCounters} BatteryCounters instance
                 */
                BatteryCounters.create = function create(properties) {
                    return new BatteryCounters(properties);
                };

                /**
                 * Encodes the specified BatteryCounters message. Does not implicitly {@link perfetto.protos.AndroidBatteryMetric.BatteryCounters.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryCounters
                 * @static
                 * @param {perfetto.protos.AndroidBatteryMetric.IBatteryCounters} m BatteryCounters message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BatteryCounters.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.timestampNs != null && Object.hasOwnProperty.call(m, "timestampNs"))
                        w.uint32(8).int64(m.timestampNs);
                    if (m.chargeCounterUah != null && Object.hasOwnProperty.call(m, "chargeCounterUah"))
                        w.uint32(17).double(m.chargeCounterUah);
                    if (m.capacityPercent != null && Object.hasOwnProperty.call(m, "capacityPercent"))
                        w.uint32(29).float(m.capacityPercent);
                    if (m.currentUa != null && Object.hasOwnProperty.call(m, "currentUa"))
                        w.uint32(33).double(m.currentUa);
                    if (m.currentAvgUa != null && Object.hasOwnProperty.call(m, "currentAvgUa"))
                        w.uint32(41).double(m.currentAvgUa);
                    return w;
                };

                /**
                 * Encodes the specified BatteryCounters message, length delimited. Does not implicitly {@link perfetto.protos.AndroidBatteryMetric.BatteryCounters.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryCounters
                 * @static
                 * @param {perfetto.protos.AndroidBatteryMetric.IBatteryCounters} message BatteryCounters message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BatteryCounters.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a BatteryCounters message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryCounters
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidBatteryMetric.BatteryCounters} BatteryCounters
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BatteryCounters.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidBatteryMetric.BatteryCounters();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.timestampNs = r.int64();
                            break;
                        case 2:
                            m.chargeCounterUah = r.double();
                            break;
                        case 3:
                            m.capacityPercent = r.float();
                            break;
                        case 4:
                            m.currentUa = r.double();
                            break;
                        case 5:
                            m.currentAvgUa = r.double();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a BatteryCounters message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryCounters
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidBatteryMetric.BatteryCounters} BatteryCounters
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BatteryCounters.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a BatteryCounters message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryCounters
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                BatteryCounters.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.timestampNs != null && m.hasOwnProperty("timestampNs")) {
                        if (!$util.isInteger(m.timestampNs) && !(m.timestampNs && $util.isInteger(m.timestampNs.low) && $util.isInteger(m.timestampNs.high)))
                            return "timestampNs: integer|Long expected";
                    }
                    if (m.chargeCounterUah != null && m.hasOwnProperty("chargeCounterUah")) {
                        if (typeof m.chargeCounterUah !== "number")
                            return "chargeCounterUah: number expected";
                    }
                    if (m.capacityPercent != null && m.hasOwnProperty("capacityPercent")) {
                        if (typeof m.capacityPercent !== "number")
                            return "capacityPercent: number expected";
                    }
                    if (m.currentUa != null && m.hasOwnProperty("currentUa")) {
                        if (typeof m.currentUa !== "number")
                            return "currentUa: number expected";
                    }
                    if (m.currentAvgUa != null && m.hasOwnProperty("currentAvgUa")) {
                        if (typeof m.currentAvgUa !== "number")
                            return "currentAvgUa: number expected";
                    }
                    return null;
                };

                /**
                 * Creates a BatteryCounters message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryCounters
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidBatteryMetric.BatteryCounters} BatteryCounters
                 */
                BatteryCounters.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidBatteryMetric.BatteryCounters)
                        return d;
                    var m = new $root.perfetto.protos.AndroidBatteryMetric.BatteryCounters();
                    if (d.timestampNs != null) {
                        if ($util.Long)
                            (m.timestampNs = $util.Long.fromValue(d.timestampNs)).unsigned = false;
                        else if (typeof d.timestampNs === "string")
                            m.timestampNs = parseInt(d.timestampNs, 10);
                        else if (typeof d.timestampNs === "number")
                            m.timestampNs = d.timestampNs;
                        else if (typeof d.timestampNs === "object")
                            m.timestampNs = new $util.LongBits(d.timestampNs.low >>> 0, d.timestampNs.high >>> 0).toNumber();
                    }
                    if (d.chargeCounterUah != null) {
                        m.chargeCounterUah = Number(d.chargeCounterUah);
                    }
                    if (d.capacityPercent != null) {
                        m.capacityPercent = Number(d.capacityPercent);
                    }
                    if (d.currentUa != null) {
                        m.currentUa = Number(d.currentUa);
                    }
                    if (d.currentAvgUa != null) {
                        m.currentAvgUa = Number(d.currentAvgUa);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a BatteryCounters message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryCounters
                 * @static
                 * @param {perfetto.protos.AndroidBatteryMetric.BatteryCounters} m BatteryCounters
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                BatteryCounters.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.timestampNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.timestampNs = o.longs === String ? "0" : 0;
                        d.chargeCounterUah = 0;
                        d.capacityPercent = 0;
                        d.currentUa = 0;
                        d.currentAvgUa = 0;
                    }
                    if (m.timestampNs != null && m.hasOwnProperty("timestampNs")) {
                        if (typeof m.timestampNs === "number")
                            d.timestampNs = o.longs === String ? String(m.timestampNs) : m.timestampNs;
                        else
                            d.timestampNs = o.longs === String ? $util.Long.prototype.toString.call(m.timestampNs) : o.longs === Number ? new $util.LongBits(m.timestampNs.low >>> 0, m.timestampNs.high >>> 0).toNumber() : m.timestampNs;
                    }
                    if (m.chargeCounterUah != null && m.hasOwnProperty("chargeCounterUah")) {
                        d.chargeCounterUah = o.json && !isFinite(m.chargeCounterUah) ? String(m.chargeCounterUah) : m.chargeCounterUah;
                    }
                    if (m.capacityPercent != null && m.hasOwnProperty("capacityPercent")) {
                        d.capacityPercent = o.json && !isFinite(m.capacityPercent) ? String(m.capacityPercent) : m.capacityPercent;
                    }
                    if (m.currentUa != null && m.hasOwnProperty("currentUa")) {
                        d.currentUa = o.json && !isFinite(m.currentUa) ? String(m.currentUa) : m.currentUa;
                    }
                    if (m.currentAvgUa != null && m.hasOwnProperty("currentAvgUa")) {
                        d.currentAvgUa = o.json && !isFinite(m.currentAvgUa) ? String(m.currentAvgUa) : m.currentAvgUa;
                    }
                    return d;
                };

                /**
                 * Converts this BatteryCounters to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryCounters
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                BatteryCounters.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return BatteryCounters;
            })();

            AndroidBatteryMetric.BatteryAggregates = (function() {

                /**
                 * Properties of a BatteryAggregates.
                 * @memberof perfetto.protos.AndroidBatteryMetric
                 * @interface IBatteryAggregates
                 * @property {number|null} [totalScreenOffNs] BatteryAggregates totalScreenOffNs
                 * @property {number|null} [totalScreenOnNs] BatteryAggregates totalScreenOnNs
                 * @property {number|null} [totalScreenDozeNs] BatteryAggregates totalScreenDozeNs
                 * @property {number|null} [totalWakelockNs] BatteryAggregates totalWakelockNs
                 * @property {number|null} [sleepNs] BatteryAggregates sleepNs
                 * @property {number|null} [sleepScreenOffNs] BatteryAggregates sleepScreenOffNs
                 * @property {number|null} [sleepScreenOnNs] BatteryAggregates sleepScreenOnNs
                 * @property {number|null} [sleepScreenDozeNs] BatteryAggregates sleepScreenDozeNs
                 */

                /**
                 * Constructs a new BatteryAggregates.
                 * @memberof perfetto.protos.AndroidBatteryMetric
                 * @classdesc Represents a BatteryAggregates.
                 * @implements IBatteryAggregates
                 * @constructor
                 * @param {perfetto.protos.AndroidBatteryMetric.IBatteryAggregates=} [p] Properties to set
                 */
                function BatteryAggregates(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * BatteryAggregates totalScreenOffNs.
                 * @member {number} totalScreenOffNs
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryAggregates
                 * @instance
                 */
                BatteryAggregates.prototype.totalScreenOffNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * BatteryAggregates totalScreenOnNs.
                 * @member {number} totalScreenOnNs
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryAggregates
                 * @instance
                 */
                BatteryAggregates.prototype.totalScreenOnNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * BatteryAggregates totalScreenDozeNs.
                 * @member {number} totalScreenDozeNs
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryAggregates
                 * @instance
                 */
                BatteryAggregates.prototype.totalScreenDozeNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * BatteryAggregates totalWakelockNs.
                 * @member {number} totalWakelockNs
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryAggregates
                 * @instance
                 */
                BatteryAggregates.prototype.totalWakelockNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * BatteryAggregates sleepNs.
                 * @member {number} sleepNs
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryAggregates
                 * @instance
                 */
                BatteryAggregates.prototype.sleepNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * BatteryAggregates sleepScreenOffNs.
                 * @member {number} sleepScreenOffNs
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryAggregates
                 * @instance
                 */
                BatteryAggregates.prototype.sleepScreenOffNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * BatteryAggregates sleepScreenOnNs.
                 * @member {number} sleepScreenOnNs
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryAggregates
                 * @instance
                 */
                BatteryAggregates.prototype.sleepScreenOnNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * BatteryAggregates sleepScreenDozeNs.
                 * @member {number} sleepScreenDozeNs
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryAggregates
                 * @instance
                 */
                BatteryAggregates.prototype.sleepScreenDozeNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new BatteryAggregates instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryAggregates
                 * @static
                 * @param {perfetto.protos.AndroidBatteryMetric.IBatteryAggregates=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidBatteryMetric.BatteryAggregates} BatteryAggregates instance
                 */
                BatteryAggregates.create = function create(properties) {
                    return new BatteryAggregates(properties);
                };

                /**
                 * Encodes the specified BatteryAggregates message. Does not implicitly {@link perfetto.protos.AndroidBatteryMetric.BatteryAggregates.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryAggregates
                 * @static
                 * @param {perfetto.protos.AndroidBatteryMetric.IBatteryAggregates} m BatteryAggregates message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BatteryAggregates.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.totalScreenOffNs != null && Object.hasOwnProperty.call(m, "totalScreenOffNs"))
                        w.uint32(8).int64(m.totalScreenOffNs);
                    if (m.totalScreenOnNs != null && Object.hasOwnProperty.call(m, "totalScreenOnNs"))
                        w.uint32(16).int64(m.totalScreenOnNs);
                    if (m.totalScreenDozeNs != null && Object.hasOwnProperty.call(m, "totalScreenDozeNs"))
                        w.uint32(24).int64(m.totalScreenDozeNs);
                    if (m.totalWakelockNs != null && Object.hasOwnProperty.call(m, "totalWakelockNs"))
                        w.uint32(32).int64(m.totalWakelockNs);
                    if (m.sleepNs != null && Object.hasOwnProperty.call(m, "sleepNs"))
                        w.uint32(40).int64(m.sleepNs);
                    if (m.sleepScreenOffNs != null && Object.hasOwnProperty.call(m, "sleepScreenOffNs"))
                        w.uint32(48).int64(m.sleepScreenOffNs);
                    if (m.sleepScreenOnNs != null && Object.hasOwnProperty.call(m, "sleepScreenOnNs"))
                        w.uint32(56).int64(m.sleepScreenOnNs);
                    if (m.sleepScreenDozeNs != null && Object.hasOwnProperty.call(m, "sleepScreenDozeNs"))
                        w.uint32(64).int64(m.sleepScreenDozeNs);
                    return w;
                };

                /**
                 * Encodes the specified BatteryAggregates message, length delimited. Does not implicitly {@link perfetto.protos.AndroidBatteryMetric.BatteryAggregates.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryAggregates
                 * @static
                 * @param {perfetto.protos.AndroidBatteryMetric.IBatteryAggregates} message BatteryAggregates message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BatteryAggregates.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a BatteryAggregates message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryAggregates
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidBatteryMetric.BatteryAggregates} BatteryAggregates
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BatteryAggregates.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidBatteryMetric.BatteryAggregates();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.totalScreenOffNs = r.int64();
                            break;
                        case 2:
                            m.totalScreenOnNs = r.int64();
                            break;
                        case 3:
                            m.totalScreenDozeNs = r.int64();
                            break;
                        case 4:
                            m.totalWakelockNs = r.int64();
                            break;
                        case 5:
                            m.sleepNs = r.int64();
                            break;
                        case 6:
                            m.sleepScreenOffNs = r.int64();
                            break;
                        case 7:
                            m.sleepScreenOnNs = r.int64();
                            break;
                        case 8:
                            m.sleepScreenDozeNs = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a BatteryAggregates message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryAggregates
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidBatteryMetric.BatteryAggregates} BatteryAggregates
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BatteryAggregates.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a BatteryAggregates message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryAggregates
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                BatteryAggregates.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.totalScreenOffNs != null && m.hasOwnProperty("totalScreenOffNs")) {
                        if (!$util.isInteger(m.totalScreenOffNs) && !(m.totalScreenOffNs && $util.isInteger(m.totalScreenOffNs.low) && $util.isInteger(m.totalScreenOffNs.high)))
                            return "totalScreenOffNs: integer|Long expected";
                    }
                    if (m.totalScreenOnNs != null && m.hasOwnProperty("totalScreenOnNs")) {
                        if (!$util.isInteger(m.totalScreenOnNs) && !(m.totalScreenOnNs && $util.isInteger(m.totalScreenOnNs.low) && $util.isInteger(m.totalScreenOnNs.high)))
                            return "totalScreenOnNs: integer|Long expected";
                    }
                    if (m.totalScreenDozeNs != null && m.hasOwnProperty("totalScreenDozeNs")) {
                        if (!$util.isInteger(m.totalScreenDozeNs) && !(m.totalScreenDozeNs && $util.isInteger(m.totalScreenDozeNs.low) && $util.isInteger(m.totalScreenDozeNs.high)))
                            return "totalScreenDozeNs: integer|Long expected";
                    }
                    if (m.totalWakelockNs != null && m.hasOwnProperty("totalWakelockNs")) {
                        if (!$util.isInteger(m.totalWakelockNs) && !(m.totalWakelockNs && $util.isInteger(m.totalWakelockNs.low) && $util.isInteger(m.totalWakelockNs.high)))
                            return "totalWakelockNs: integer|Long expected";
                    }
                    if (m.sleepNs != null && m.hasOwnProperty("sleepNs")) {
                        if (!$util.isInteger(m.sleepNs) && !(m.sleepNs && $util.isInteger(m.sleepNs.low) && $util.isInteger(m.sleepNs.high)))
                            return "sleepNs: integer|Long expected";
                    }
                    if (m.sleepScreenOffNs != null && m.hasOwnProperty("sleepScreenOffNs")) {
                        if (!$util.isInteger(m.sleepScreenOffNs) && !(m.sleepScreenOffNs && $util.isInteger(m.sleepScreenOffNs.low) && $util.isInteger(m.sleepScreenOffNs.high)))
                            return "sleepScreenOffNs: integer|Long expected";
                    }
                    if (m.sleepScreenOnNs != null && m.hasOwnProperty("sleepScreenOnNs")) {
                        if (!$util.isInteger(m.sleepScreenOnNs) && !(m.sleepScreenOnNs && $util.isInteger(m.sleepScreenOnNs.low) && $util.isInteger(m.sleepScreenOnNs.high)))
                            return "sleepScreenOnNs: integer|Long expected";
                    }
                    if (m.sleepScreenDozeNs != null && m.hasOwnProperty("sleepScreenDozeNs")) {
                        if (!$util.isInteger(m.sleepScreenDozeNs) && !(m.sleepScreenDozeNs && $util.isInteger(m.sleepScreenDozeNs.low) && $util.isInteger(m.sleepScreenDozeNs.high)))
                            return "sleepScreenDozeNs: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a BatteryAggregates message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryAggregates
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidBatteryMetric.BatteryAggregates} BatteryAggregates
                 */
                BatteryAggregates.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidBatteryMetric.BatteryAggregates)
                        return d;
                    var m = new $root.perfetto.protos.AndroidBatteryMetric.BatteryAggregates();
                    if (d.totalScreenOffNs != null) {
                        if ($util.Long)
                            (m.totalScreenOffNs = $util.Long.fromValue(d.totalScreenOffNs)).unsigned = false;
                        else if (typeof d.totalScreenOffNs === "string")
                            m.totalScreenOffNs = parseInt(d.totalScreenOffNs, 10);
                        else if (typeof d.totalScreenOffNs === "number")
                            m.totalScreenOffNs = d.totalScreenOffNs;
                        else if (typeof d.totalScreenOffNs === "object")
                            m.totalScreenOffNs = new $util.LongBits(d.totalScreenOffNs.low >>> 0, d.totalScreenOffNs.high >>> 0).toNumber();
                    }
                    if (d.totalScreenOnNs != null) {
                        if ($util.Long)
                            (m.totalScreenOnNs = $util.Long.fromValue(d.totalScreenOnNs)).unsigned = false;
                        else if (typeof d.totalScreenOnNs === "string")
                            m.totalScreenOnNs = parseInt(d.totalScreenOnNs, 10);
                        else if (typeof d.totalScreenOnNs === "number")
                            m.totalScreenOnNs = d.totalScreenOnNs;
                        else if (typeof d.totalScreenOnNs === "object")
                            m.totalScreenOnNs = new $util.LongBits(d.totalScreenOnNs.low >>> 0, d.totalScreenOnNs.high >>> 0).toNumber();
                    }
                    if (d.totalScreenDozeNs != null) {
                        if ($util.Long)
                            (m.totalScreenDozeNs = $util.Long.fromValue(d.totalScreenDozeNs)).unsigned = false;
                        else if (typeof d.totalScreenDozeNs === "string")
                            m.totalScreenDozeNs = parseInt(d.totalScreenDozeNs, 10);
                        else if (typeof d.totalScreenDozeNs === "number")
                            m.totalScreenDozeNs = d.totalScreenDozeNs;
                        else if (typeof d.totalScreenDozeNs === "object")
                            m.totalScreenDozeNs = new $util.LongBits(d.totalScreenDozeNs.low >>> 0, d.totalScreenDozeNs.high >>> 0).toNumber();
                    }
                    if (d.totalWakelockNs != null) {
                        if ($util.Long)
                            (m.totalWakelockNs = $util.Long.fromValue(d.totalWakelockNs)).unsigned = false;
                        else if (typeof d.totalWakelockNs === "string")
                            m.totalWakelockNs = parseInt(d.totalWakelockNs, 10);
                        else if (typeof d.totalWakelockNs === "number")
                            m.totalWakelockNs = d.totalWakelockNs;
                        else if (typeof d.totalWakelockNs === "object")
                            m.totalWakelockNs = new $util.LongBits(d.totalWakelockNs.low >>> 0, d.totalWakelockNs.high >>> 0).toNumber();
                    }
                    if (d.sleepNs != null) {
                        if ($util.Long)
                            (m.sleepNs = $util.Long.fromValue(d.sleepNs)).unsigned = false;
                        else if (typeof d.sleepNs === "string")
                            m.sleepNs = parseInt(d.sleepNs, 10);
                        else if (typeof d.sleepNs === "number")
                            m.sleepNs = d.sleepNs;
                        else if (typeof d.sleepNs === "object")
                            m.sleepNs = new $util.LongBits(d.sleepNs.low >>> 0, d.sleepNs.high >>> 0).toNumber();
                    }
                    if (d.sleepScreenOffNs != null) {
                        if ($util.Long)
                            (m.sleepScreenOffNs = $util.Long.fromValue(d.sleepScreenOffNs)).unsigned = false;
                        else if (typeof d.sleepScreenOffNs === "string")
                            m.sleepScreenOffNs = parseInt(d.sleepScreenOffNs, 10);
                        else if (typeof d.sleepScreenOffNs === "number")
                            m.sleepScreenOffNs = d.sleepScreenOffNs;
                        else if (typeof d.sleepScreenOffNs === "object")
                            m.sleepScreenOffNs = new $util.LongBits(d.sleepScreenOffNs.low >>> 0, d.sleepScreenOffNs.high >>> 0).toNumber();
                    }
                    if (d.sleepScreenOnNs != null) {
                        if ($util.Long)
                            (m.sleepScreenOnNs = $util.Long.fromValue(d.sleepScreenOnNs)).unsigned = false;
                        else if (typeof d.sleepScreenOnNs === "string")
                            m.sleepScreenOnNs = parseInt(d.sleepScreenOnNs, 10);
                        else if (typeof d.sleepScreenOnNs === "number")
                            m.sleepScreenOnNs = d.sleepScreenOnNs;
                        else if (typeof d.sleepScreenOnNs === "object")
                            m.sleepScreenOnNs = new $util.LongBits(d.sleepScreenOnNs.low >>> 0, d.sleepScreenOnNs.high >>> 0).toNumber();
                    }
                    if (d.sleepScreenDozeNs != null) {
                        if ($util.Long)
                            (m.sleepScreenDozeNs = $util.Long.fromValue(d.sleepScreenDozeNs)).unsigned = false;
                        else if (typeof d.sleepScreenDozeNs === "string")
                            m.sleepScreenDozeNs = parseInt(d.sleepScreenDozeNs, 10);
                        else if (typeof d.sleepScreenDozeNs === "number")
                            m.sleepScreenDozeNs = d.sleepScreenDozeNs;
                        else if (typeof d.sleepScreenDozeNs === "object")
                            m.sleepScreenDozeNs = new $util.LongBits(d.sleepScreenDozeNs.low >>> 0, d.sleepScreenDozeNs.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a BatteryAggregates message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryAggregates
                 * @static
                 * @param {perfetto.protos.AndroidBatteryMetric.BatteryAggregates} m BatteryAggregates
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                BatteryAggregates.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.totalScreenOffNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.totalScreenOffNs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.totalScreenOnNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.totalScreenOnNs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.totalScreenDozeNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.totalScreenDozeNs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.totalWakelockNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.totalWakelockNs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.sleepNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.sleepNs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.sleepScreenOffNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.sleepScreenOffNs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.sleepScreenOnNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.sleepScreenOnNs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.sleepScreenDozeNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.sleepScreenDozeNs = o.longs === String ? "0" : 0;
                    }
                    if (m.totalScreenOffNs != null && m.hasOwnProperty("totalScreenOffNs")) {
                        if (typeof m.totalScreenOffNs === "number")
                            d.totalScreenOffNs = o.longs === String ? String(m.totalScreenOffNs) : m.totalScreenOffNs;
                        else
                            d.totalScreenOffNs = o.longs === String ? $util.Long.prototype.toString.call(m.totalScreenOffNs) : o.longs === Number ? new $util.LongBits(m.totalScreenOffNs.low >>> 0, m.totalScreenOffNs.high >>> 0).toNumber() : m.totalScreenOffNs;
                    }
                    if (m.totalScreenOnNs != null && m.hasOwnProperty("totalScreenOnNs")) {
                        if (typeof m.totalScreenOnNs === "number")
                            d.totalScreenOnNs = o.longs === String ? String(m.totalScreenOnNs) : m.totalScreenOnNs;
                        else
                            d.totalScreenOnNs = o.longs === String ? $util.Long.prototype.toString.call(m.totalScreenOnNs) : o.longs === Number ? new $util.LongBits(m.totalScreenOnNs.low >>> 0, m.totalScreenOnNs.high >>> 0).toNumber() : m.totalScreenOnNs;
                    }
                    if (m.totalScreenDozeNs != null && m.hasOwnProperty("totalScreenDozeNs")) {
                        if (typeof m.totalScreenDozeNs === "number")
                            d.totalScreenDozeNs = o.longs === String ? String(m.totalScreenDozeNs) : m.totalScreenDozeNs;
                        else
                            d.totalScreenDozeNs = o.longs === String ? $util.Long.prototype.toString.call(m.totalScreenDozeNs) : o.longs === Number ? new $util.LongBits(m.totalScreenDozeNs.low >>> 0, m.totalScreenDozeNs.high >>> 0).toNumber() : m.totalScreenDozeNs;
                    }
                    if (m.totalWakelockNs != null && m.hasOwnProperty("totalWakelockNs")) {
                        if (typeof m.totalWakelockNs === "number")
                            d.totalWakelockNs = o.longs === String ? String(m.totalWakelockNs) : m.totalWakelockNs;
                        else
                            d.totalWakelockNs = o.longs === String ? $util.Long.prototype.toString.call(m.totalWakelockNs) : o.longs === Number ? new $util.LongBits(m.totalWakelockNs.low >>> 0, m.totalWakelockNs.high >>> 0).toNumber() : m.totalWakelockNs;
                    }
                    if (m.sleepNs != null && m.hasOwnProperty("sleepNs")) {
                        if (typeof m.sleepNs === "number")
                            d.sleepNs = o.longs === String ? String(m.sleepNs) : m.sleepNs;
                        else
                            d.sleepNs = o.longs === String ? $util.Long.prototype.toString.call(m.sleepNs) : o.longs === Number ? new $util.LongBits(m.sleepNs.low >>> 0, m.sleepNs.high >>> 0).toNumber() : m.sleepNs;
                    }
                    if (m.sleepScreenOffNs != null && m.hasOwnProperty("sleepScreenOffNs")) {
                        if (typeof m.sleepScreenOffNs === "number")
                            d.sleepScreenOffNs = o.longs === String ? String(m.sleepScreenOffNs) : m.sleepScreenOffNs;
                        else
                            d.sleepScreenOffNs = o.longs === String ? $util.Long.prototype.toString.call(m.sleepScreenOffNs) : o.longs === Number ? new $util.LongBits(m.sleepScreenOffNs.low >>> 0, m.sleepScreenOffNs.high >>> 0).toNumber() : m.sleepScreenOffNs;
                    }
                    if (m.sleepScreenOnNs != null && m.hasOwnProperty("sleepScreenOnNs")) {
                        if (typeof m.sleepScreenOnNs === "number")
                            d.sleepScreenOnNs = o.longs === String ? String(m.sleepScreenOnNs) : m.sleepScreenOnNs;
                        else
                            d.sleepScreenOnNs = o.longs === String ? $util.Long.prototype.toString.call(m.sleepScreenOnNs) : o.longs === Number ? new $util.LongBits(m.sleepScreenOnNs.low >>> 0, m.sleepScreenOnNs.high >>> 0).toNumber() : m.sleepScreenOnNs;
                    }
                    if (m.sleepScreenDozeNs != null && m.hasOwnProperty("sleepScreenDozeNs")) {
                        if (typeof m.sleepScreenDozeNs === "number")
                            d.sleepScreenDozeNs = o.longs === String ? String(m.sleepScreenDozeNs) : m.sleepScreenDozeNs;
                        else
                            d.sleepScreenDozeNs = o.longs === String ? $util.Long.prototype.toString.call(m.sleepScreenDozeNs) : o.longs === Number ? new $util.LongBits(m.sleepScreenDozeNs.low >>> 0, m.sleepScreenDozeNs.high >>> 0).toNumber() : m.sleepScreenDozeNs;
                    }
                    return d;
                };

                /**
                 * Converts this BatteryAggregates to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidBatteryMetric.BatteryAggregates
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                BatteryAggregates.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return BatteryAggregates;
            })();

            AndroidBatteryMetric.SuspendPeriod = (function() {

                /**
                 * Properties of a SuspendPeriod.
                 * @memberof perfetto.protos.AndroidBatteryMetric
                 * @interface ISuspendPeriod
                 * @property {number|null} [timestampNs] SuspendPeriod timestampNs
                 * @property {number|null} [durationNs] SuspendPeriod durationNs
                 */

                /**
                 * Constructs a new SuspendPeriod.
                 * @memberof perfetto.protos.AndroidBatteryMetric
                 * @classdesc Represents a SuspendPeriod.
                 * @implements ISuspendPeriod
                 * @constructor
                 * @param {perfetto.protos.AndroidBatteryMetric.ISuspendPeriod=} [p] Properties to set
                 */
                function SuspendPeriod(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * SuspendPeriod timestampNs.
                 * @member {number} timestampNs
                 * @memberof perfetto.protos.AndroidBatteryMetric.SuspendPeriod
                 * @instance
                 */
                SuspendPeriod.prototype.timestampNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * SuspendPeriod durationNs.
                 * @member {number} durationNs
                 * @memberof perfetto.protos.AndroidBatteryMetric.SuspendPeriod
                 * @instance
                 */
                SuspendPeriod.prototype.durationNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new SuspendPeriod instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidBatteryMetric.SuspendPeriod
                 * @static
                 * @param {perfetto.protos.AndroidBatteryMetric.ISuspendPeriod=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidBatteryMetric.SuspendPeriod} SuspendPeriod instance
                 */
                SuspendPeriod.create = function create(properties) {
                    return new SuspendPeriod(properties);
                };

                /**
                 * Encodes the specified SuspendPeriod message. Does not implicitly {@link perfetto.protos.AndroidBatteryMetric.SuspendPeriod.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidBatteryMetric.SuspendPeriod
                 * @static
                 * @param {perfetto.protos.AndroidBatteryMetric.ISuspendPeriod} m SuspendPeriod message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                SuspendPeriod.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.timestampNs != null && Object.hasOwnProperty.call(m, "timestampNs"))
                        w.uint32(8).int64(m.timestampNs);
                    if (m.durationNs != null && Object.hasOwnProperty.call(m, "durationNs"))
                        w.uint32(16).int64(m.durationNs);
                    return w;
                };

                /**
                 * Encodes the specified SuspendPeriod message, length delimited. Does not implicitly {@link perfetto.protos.AndroidBatteryMetric.SuspendPeriod.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidBatteryMetric.SuspendPeriod
                 * @static
                 * @param {perfetto.protos.AndroidBatteryMetric.ISuspendPeriod} message SuspendPeriod message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                SuspendPeriod.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a SuspendPeriod message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidBatteryMetric.SuspendPeriod
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidBatteryMetric.SuspendPeriod} SuspendPeriod
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                SuspendPeriod.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidBatteryMetric.SuspendPeriod();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.timestampNs = r.int64();
                            break;
                        case 2:
                            m.durationNs = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a SuspendPeriod message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidBatteryMetric.SuspendPeriod
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidBatteryMetric.SuspendPeriod} SuspendPeriod
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                SuspendPeriod.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a SuspendPeriod message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidBatteryMetric.SuspendPeriod
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                SuspendPeriod.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.timestampNs != null && m.hasOwnProperty("timestampNs")) {
                        if (!$util.isInteger(m.timestampNs) && !(m.timestampNs && $util.isInteger(m.timestampNs.low) && $util.isInteger(m.timestampNs.high)))
                            return "timestampNs: integer|Long expected";
                    }
                    if (m.durationNs != null && m.hasOwnProperty("durationNs")) {
                        if (!$util.isInteger(m.durationNs) && !(m.durationNs && $util.isInteger(m.durationNs.low) && $util.isInteger(m.durationNs.high)))
                            return "durationNs: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a SuspendPeriod message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidBatteryMetric.SuspendPeriod
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidBatteryMetric.SuspendPeriod} SuspendPeriod
                 */
                SuspendPeriod.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidBatteryMetric.SuspendPeriod)
                        return d;
                    var m = new $root.perfetto.protos.AndroidBatteryMetric.SuspendPeriod();
                    if (d.timestampNs != null) {
                        if ($util.Long)
                            (m.timestampNs = $util.Long.fromValue(d.timestampNs)).unsigned = false;
                        else if (typeof d.timestampNs === "string")
                            m.timestampNs = parseInt(d.timestampNs, 10);
                        else if (typeof d.timestampNs === "number")
                            m.timestampNs = d.timestampNs;
                        else if (typeof d.timestampNs === "object")
                            m.timestampNs = new $util.LongBits(d.timestampNs.low >>> 0, d.timestampNs.high >>> 0).toNumber();
                    }
                    if (d.durationNs != null) {
                        if ($util.Long)
                            (m.durationNs = $util.Long.fromValue(d.durationNs)).unsigned = false;
                        else if (typeof d.durationNs === "string")
                            m.durationNs = parseInt(d.durationNs, 10);
                        else if (typeof d.durationNs === "number")
                            m.durationNs = d.durationNs;
                        else if (typeof d.durationNs === "object")
                            m.durationNs = new $util.LongBits(d.durationNs.low >>> 0, d.durationNs.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a SuspendPeriod message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidBatteryMetric.SuspendPeriod
                 * @static
                 * @param {perfetto.protos.AndroidBatteryMetric.SuspendPeriod} m SuspendPeriod
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                SuspendPeriod.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.timestampNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.timestampNs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.durationNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.durationNs = o.longs === String ? "0" : 0;
                    }
                    if (m.timestampNs != null && m.hasOwnProperty("timestampNs")) {
                        if (typeof m.timestampNs === "number")
                            d.timestampNs = o.longs === String ? String(m.timestampNs) : m.timestampNs;
                        else
                            d.timestampNs = o.longs === String ? $util.Long.prototype.toString.call(m.timestampNs) : o.longs === Number ? new $util.LongBits(m.timestampNs.low >>> 0, m.timestampNs.high >>> 0).toNumber() : m.timestampNs;
                    }
                    if (m.durationNs != null && m.hasOwnProperty("durationNs")) {
                        if (typeof m.durationNs === "number")
                            d.durationNs = o.longs === String ? String(m.durationNs) : m.durationNs;
                        else
                            d.durationNs = o.longs === String ? $util.Long.prototype.toString.call(m.durationNs) : o.longs === Number ? new $util.LongBits(m.durationNs.low >>> 0, m.durationNs.high >>> 0).toNumber() : m.durationNs;
                    }
                    return d;
                };

                /**
                 * Converts this SuspendPeriod to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidBatteryMetric.SuspendPeriod
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                SuspendPeriod.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return SuspendPeriod;
            })();

            return AndroidBatteryMetric;
        })();

        protos.AndroidCpuMetric = (function() {

            /**
             * Properties of an AndroidCpuMetric.
             * @memberof perfetto.protos
             * @interface IAndroidCpuMetric
             * @property {Array.<perfetto.protos.AndroidCpuMetric.IProcess>|null} [processInfo] AndroidCpuMetric processInfo
             */

            /**
             * Constructs a new AndroidCpuMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidCpuMetric.
             * @implements IAndroidCpuMetric
             * @constructor
             * @param {perfetto.protos.IAndroidCpuMetric=} [p] Properties to set
             */
            function AndroidCpuMetric(p) {
                this.processInfo = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidCpuMetric processInfo.
             * @member {Array.<perfetto.protos.AndroidCpuMetric.IProcess>} processInfo
             * @memberof perfetto.protos.AndroidCpuMetric
             * @instance
             */
            AndroidCpuMetric.prototype.processInfo = $util.emptyArray;

            /**
             * Creates a new AndroidCpuMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidCpuMetric
             * @static
             * @param {perfetto.protos.IAndroidCpuMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidCpuMetric} AndroidCpuMetric instance
             */
            AndroidCpuMetric.create = function create(properties) {
                return new AndroidCpuMetric(properties);
            };

            /**
             * Encodes the specified AndroidCpuMetric message. Does not implicitly {@link perfetto.protos.AndroidCpuMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidCpuMetric
             * @static
             * @param {perfetto.protos.IAndroidCpuMetric} m AndroidCpuMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidCpuMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.processInfo != null && m.processInfo.length) {
                    for (var i = 0; i < m.processInfo.length; ++i)
                        $root.perfetto.protos.AndroidCpuMetric.Process.encode(m.processInfo[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified AndroidCpuMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidCpuMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidCpuMetric
             * @static
             * @param {perfetto.protos.IAndroidCpuMetric} message AndroidCpuMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidCpuMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidCpuMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidCpuMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidCpuMetric} AndroidCpuMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidCpuMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidCpuMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.processInfo && m.processInfo.length))
                            m.processInfo = [];
                        m.processInfo.push($root.perfetto.protos.AndroidCpuMetric.Process.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidCpuMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidCpuMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidCpuMetric} AndroidCpuMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidCpuMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidCpuMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidCpuMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidCpuMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.processInfo != null && m.hasOwnProperty("processInfo")) {
                    if (!Array.isArray(m.processInfo))
                        return "processInfo: array expected";
                    for (var i = 0; i < m.processInfo.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidCpuMetric.Process.verify(m.processInfo[i]);
                            if (e)
                                return "processInfo." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidCpuMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidCpuMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidCpuMetric} AndroidCpuMetric
             */
            AndroidCpuMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidCpuMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidCpuMetric();
                if (d.processInfo) {
                    if (!Array.isArray(d.processInfo))
                        throw TypeError(".perfetto.protos.AndroidCpuMetric.processInfo: array expected");
                    m.processInfo = [];
                    for (var i = 0; i < d.processInfo.length; ++i) {
                        if (typeof d.processInfo[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidCpuMetric.processInfo: object expected");
                        m.processInfo[i] = $root.perfetto.protos.AndroidCpuMetric.Process.fromObject(d.processInfo[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidCpuMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidCpuMetric
             * @static
             * @param {perfetto.protos.AndroidCpuMetric} m AndroidCpuMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidCpuMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.processInfo = [];
                }
                if (m.processInfo && m.processInfo.length) {
                    d.processInfo = [];
                    for (var j = 0; j < m.processInfo.length; ++j) {
                        d.processInfo[j] = $root.perfetto.protos.AndroidCpuMetric.Process.toObject(m.processInfo[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidCpuMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidCpuMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidCpuMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidCpuMetric.Metrics = (function() {

                /**
                 * Properties of a Metrics.
                 * @memberof perfetto.protos.AndroidCpuMetric
                 * @interface IMetrics
                 * @property {number|null} [mcycles] Metrics mcycles
                 * @property {number|null} [runtimeNs] Metrics runtimeNs
                 * @property {number|null} [minFreqKhz] Metrics minFreqKhz
                 * @property {number|null} [maxFreqKhz] Metrics maxFreqKhz
                 * @property {number|null} [avgFreqKhz] Metrics avgFreqKhz
                 */

                /**
                 * Constructs a new Metrics.
                 * @memberof perfetto.protos.AndroidCpuMetric
                 * @classdesc Represents a Metrics.
                 * @implements IMetrics
                 * @constructor
                 * @param {perfetto.protos.AndroidCpuMetric.IMetrics=} [p] Properties to set
                 */
                function Metrics(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Metrics mcycles.
                 * @member {number} mcycles
                 * @memberof perfetto.protos.AndroidCpuMetric.Metrics
                 * @instance
                 */
                Metrics.prototype.mcycles = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Metrics runtimeNs.
                 * @member {number} runtimeNs
                 * @memberof perfetto.protos.AndroidCpuMetric.Metrics
                 * @instance
                 */
                Metrics.prototype.runtimeNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Metrics minFreqKhz.
                 * @member {number} minFreqKhz
                 * @memberof perfetto.protos.AndroidCpuMetric.Metrics
                 * @instance
                 */
                Metrics.prototype.minFreqKhz = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Metrics maxFreqKhz.
                 * @member {number} maxFreqKhz
                 * @memberof perfetto.protos.AndroidCpuMetric.Metrics
                 * @instance
                 */
                Metrics.prototype.maxFreqKhz = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Metrics avgFreqKhz.
                 * @member {number} avgFreqKhz
                 * @memberof perfetto.protos.AndroidCpuMetric.Metrics
                 * @instance
                 */
                Metrics.prototype.avgFreqKhz = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new Metrics instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidCpuMetric.Metrics
                 * @static
                 * @param {perfetto.protos.AndroidCpuMetric.IMetrics=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidCpuMetric.Metrics} Metrics instance
                 */
                Metrics.create = function create(properties) {
                    return new Metrics(properties);
                };

                /**
                 * Encodes the specified Metrics message. Does not implicitly {@link perfetto.protos.AndroidCpuMetric.Metrics.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidCpuMetric.Metrics
                 * @static
                 * @param {perfetto.protos.AndroidCpuMetric.IMetrics} m Metrics message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Metrics.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.mcycles != null && Object.hasOwnProperty.call(m, "mcycles"))
                        w.uint32(8).int64(m.mcycles);
                    if (m.runtimeNs != null && Object.hasOwnProperty.call(m, "runtimeNs"))
                        w.uint32(16).int64(m.runtimeNs);
                    if (m.minFreqKhz != null && Object.hasOwnProperty.call(m, "minFreqKhz"))
                        w.uint32(24).int64(m.minFreqKhz);
                    if (m.maxFreqKhz != null && Object.hasOwnProperty.call(m, "maxFreqKhz"))
                        w.uint32(32).int64(m.maxFreqKhz);
                    if (m.avgFreqKhz != null && Object.hasOwnProperty.call(m, "avgFreqKhz"))
                        w.uint32(40).int64(m.avgFreqKhz);
                    return w;
                };

                /**
                 * Encodes the specified Metrics message, length delimited. Does not implicitly {@link perfetto.protos.AndroidCpuMetric.Metrics.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidCpuMetric.Metrics
                 * @static
                 * @param {perfetto.protos.AndroidCpuMetric.IMetrics} message Metrics message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Metrics.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Metrics message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidCpuMetric.Metrics
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidCpuMetric.Metrics} Metrics
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Metrics.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidCpuMetric.Metrics();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.mcycles = r.int64();
                            break;
                        case 2:
                            m.runtimeNs = r.int64();
                            break;
                        case 3:
                            m.minFreqKhz = r.int64();
                            break;
                        case 4:
                            m.maxFreqKhz = r.int64();
                            break;
                        case 5:
                            m.avgFreqKhz = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Metrics message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidCpuMetric.Metrics
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidCpuMetric.Metrics} Metrics
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Metrics.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Metrics message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidCpuMetric.Metrics
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Metrics.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.mcycles != null && m.hasOwnProperty("mcycles")) {
                        if (!$util.isInteger(m.mcycles) && !(m.mcycles && $util.isInteger(m.mcycles.low) && $util.isInteger(m.mcycles.high)))
                            return "mcycles: integer|Long expected";
                    }
                    if (m.runtimeNs != null && m.hasOwnProperty("runtimeNs")) {
                        if (!$util.isInteger(m.runtimeNs) && !(m.runtimeNs && $util.isInteger(m.runtimeNs.low) && $util.isInteger(m.runtimeNs.high)))
                            return "runtimeNs: integer|Long expected";
                    }
                    if (m.minFreqKhz != null && m.hasOwnProperty("minFreqKhz")) {
                        if (!$util.isInteger(m.minFreqKhz) && !(m.minFreqKhz && $util.isInteger(m.minFreqKhz.low) && $util.isInteger(m.minFreqKhz.high)))
                            return "minFreqKhz: integer|Long expected";
                    }
                    if (m.maxFreqKhz != null && m.hasOwnProperty("maxFreqKhz")) {
                        if (!$util.isInteger(m.maxFreqKhz) && !(m.maxFreqKhz && $util.isInteger(m.maxFreqKhz.low) && $util.isInteger(m.maxFreqKhz.high)))
                            return "maxFreqKhz: integer|Long expected";
                    }
                    if (m.avgFreqKhz != null && m.hasOwnProperty("avgFreqKhz")) {
                        if (!$util.isInteger(m.avgFreqKhz) && !(m.avgFreqKhz && $util.isInteger(m.avgFreqKhz.low) && $util.isInteger(m.avgFreqKhz.high)))
                            return "avgFreqKhz: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a Metrics message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidCpuMetric.Metrics
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidCpuMetric.Metrics} Metrics
                 */
                Metrics.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidCpuMetric.Metrics)
                        return d;
                    var m = new $root.perfetto.protos.AndroidCpuMetric.Metrics();
                    if (d.mcycles != null) {
                        if ($util.Long)
                            (m.mcycles = $util.Long.fromValue(d.mcycles)).unsigned = false;
                        else if (typeof d.mcycles === "string")
                            m.mcycles = parseInt(d.mcycles, 10);
                        else if (typeof d.mcycles === "number")
                            m.mcycles = d.mcycles;
                        else if (typeof d.mcycles === "object")
                            m.mcycles = new $util.LongBits(d.mcycles.low >>> 0, d.mcycles.high >>> 0).toNumber();
                    }
                    if (d.runtimeNs != null) {
                        if ($util.Long)
                            (m.runtimeNs = $util.Long.fromValue(d.runtimeNs)).unsigned = false;
                        else if (typeof d.runtimeNs === "string")
                            m.runtimeNs = parseInt(d.runtimeNs, 10);
                        else if (typeof d.runtimeNs === "number")
                            m.runtimeNs = d.runtimeNs;
                        else if (typeof d.runtimeNs === "object")
                            m.runtimeNs = new $util.LongBits(d.runtimeNs.low >>> 0, d.runtimeNs.high >>> 0).toNumber();
                    }
                    if (d.minFreqKhz != null) {
                        if ($util.Long)
                            (m.minFreqKhz = $util.Long.fromValue(d.minFreqKhz)).unsigned = false;
                        else if (typeof d.minFreqKhz === "string")
                            m.minFreqKhz = parseInt(d.minFreqKhz, 10);
                        else if (typeof d.minFreqKhz === "number")
                            m.minFreqKhz = d.minFreqKhz;
                        else if (typeof d.minFreqKhz === "object")
                            m.minFreqKhz = new $util.LongBits(d.minFreqKhz.low >>> 0, d.minFreqKhz.high >>> 0).toNumber();
                    }
                    if (d.maxFreqKhz != null) {
                        if ($util.Long)
                            (m.maxFreqKhz = $util.Long.fromValue(d.maxFreqKhz)).unsigned = false;
                        else if (typeof d.maxFreqKhz === "string")
                            m.maxFreqKhz = parseInt(d.maxFreqKhz, 10);
                        else if (typeof d.maxFreqKhz === "number")
                            m.maxFreqKhz = d.maxFreqKhz;
                        else if (typeof d.maxFreqKhz === "object")
                            m.maxFreqKhz = new $util.LongBits(d.maxFreqKhz.low >>> 0, d.maxFreqKhz.high >>> 0).toNumber();
                    }
                    if (d.avgFreqKhz != null) {
                        if ($util.Long)
                            (m.avgFreqKhz = $util.Long.fromValue(d.avgFreqKhz)).unsigned = false;
                        else if (typeof d.avgFreqKhz === "string")
                            m.avgFreqKhz = parseInt(d.avgFreqKhz, 10);
                        else if (typeof d.avgFreqKhz === "number")
                            m.avgFreqKhz = d.avgFreqKhz;
                        else if (typeof d.avgFreqKhz === "object")
                            m.avgFreqKhz = new $util.LongBits(d.avgFreqKhz.low >>> 0, d.avgFreqKhz.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Metrics message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidCpuMetric.Metrics
                 * @static
                 * @param {perfetto.protos.AndroidCpuMetric.Metrics} m Metrics
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Metrics.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.mcycles = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.mcycles = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.runtimeNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.runtimeNs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.minFreqKhz = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.minFreqKhz = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.maxFreqKhz = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.maxFreqKhz = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.avgFreqKhz = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.avgFreqKhz = o.longs === String ? "0" : 0;
                    }
                    if (m.mcycles != null && m.hasOwnProperty("mcycles")) {
                        if (typeof m.mcycles === "number")
                            d.mcycles = o.longs === String ? String(m.mcycles) : m.mcycles;
                        else
                            d.mcycles = o.longs === String ? $util.Long.prototype.toString.call(m.mcycles) : o.longs === Number ? new $util.LongBits(m.mcycles.low >>> 0, m.mcycles.high >>> 0).toNumber() : m.mcycles;
                    }
                    if (m.runtimeNs != null && m.hasOwnProperty("runtimeNs")) {
                        if (typeof m.runtimeNs === "number")
                            d.runtimeNs = o.longs === String ? String(m.runtimeNs) : m.runtimeNs;
                        else
                            d.runtimeNs = o.longs === String ? $util.Long.prototype.toString.call(m.runtimeNs) : o.longs === Number ? new $util.LongBits(m.runtimeNs.low >>> 0, m.runtimeNs.high >>> 0).toNumber() : m.runtimeNs;
                    }
                    if (m.minFreqKhz != null && m.hasOwnProperty("minFreqKhz")) {
                        if (typeof m.minFreqKhz === "number")
                            d.minFreqKhz = o.longs === String ? String(m.minFreqKhz) : m.minFreqKhz;
                        else
                            d.minFreqKhz = o.longs === String ? $util.Long.prototype.toString.call(m.minFreqKhz) : o.longs === Number ? new $util.LongBits(m.minFreqKhz.low >>> 0, m.minFreqKhz.high >>> 0).toNumber() : m.minFreqKhz;
                    }
                    if (m.maxFreqKhz != null && m.hasOwnProperty("maxFreqKhz")) {
                        if (typeof m.maxFreqKhz === "number")
                            d.maxFreqKhz = o.longs === String ? String(m.maxFreqKhz) : m.maxFreqKhz;
                        else
                            d.maxFreqKhz = o.longs === String ? $util.Long.prototype.toString.call(m.maxFreqKhz) : o.longs === Number ? new $util.LongBits(m.maxFreqKhz.low >>> 0, m.maxFreqKhz.high >>> 0).toNumber() : m.maxFreqKhz;
                    }
                    if (m.avgFreqKhz != null && m.hasOwnProperty("avgFreqKhz")) {
                        if (typeof m.avgFreqKhz === "number")
                            d.avgFreqKhz = o.longs === String ? String(m.avgFreqKhz) : m.avgFreqKhz;
                        else
                            d.avgFreqKhz = o.longs === String ? $util.Long.prototype.toString.call(m.avgFreqKhz) : o.longs === Number ? new $util.LongBits(m.avgFreqKhz.low >>> 0, m.avgFreqKhz.high >>> 0).toNumber() : m.avgFreqKhz;
                    }
                    return d;
                };

                /**
                 * Converts this Metrics to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidCpuMetric.Metrics
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Metrics.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Metrics;
            })();

            AndroidCpuMetric.CoreData = (function() {

                /**
                 * Properties of a CoreData.
                 * @memberof perfetto.protos.AndroidCpuMetric
                 * @interface ICoreData
                 * @property {number|null} [id] CoreData id
                 * @property {perfetto.protos.AndroidCpuMetric.IMetrics|null} [metrics] CoreData metrics
                 */

                /**
                 * Constructs a new CoreData.
                 * @memberof perfetto.protos.AndroidCpuMetric
                 * @classdesc Represents a CoreData.
                 * @implements ICoreData
                 * @constructor
                 * @param {perfetto.protos.AndroidCpuMetric.ICoreData=} [p] Properties to set
                 */
                function CoreData(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * CoreData id.
                 * @member {number} id
                 * @memberof perfetto.protos.AndroidCpuMetric.CoreData
                 * @instance
                 */
                CoreData.prototype.id = 0;

                /**
                 * CoreData metrics.
                 * @member {perfetto.protos.AndroidCpuMetric.IMetrics|null|undefined} metrics
                 * @memberof perfetto.protos.AndroidCpuMetric.CoreData
                 * @instance
                 */
                CoreData.prototype.metrics = null;

                /**
                 * Creates a new CoreData instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidCpuMetric.CoreData
                 * @static
                 * @param {perfetto.protos.AndroidCpuMetric.ICoreData=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidCpuMetric.CoreData} CoreData instance
                 */
                CoreData.create = function create(properties) {
                    return new CoreData(properties);
                };

                /**
                 * Encodes the specified CoreData message. Does not implicitly {@link perfetto.protos.AndroidCpuMetric.CoreData.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidCpuMetric.CoreData
                 * @static
                 * @param {perfetto.protos.AndroidCpuMetric.ICoreData} m CoreData message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CoreData.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.id != null && Object.hasOwnProperty.call(m, "id"))
                        w.uint32(8).uint32(m.id);
                    if (m.metrics != null && Object.hasOwnProperty.call(m, "metrics"))
                        $root.perfetto.protos.AndroidCpuMetric.Metrics.encode(m.metrics, w.uint32(50).fork()).ldelim();
                    return w;
                };

                /**
                 * Encodes the specified CoreData message, length delimited. Does not implicitly {@link perfetto.protos.AndroidCpuMetric.CoreData.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidCpuMetric.CoreData
                 * @static
                 * @param {perfetto.protos.AndroidCpuMetric.ICoreData} message CoreData message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CoreData.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a CoreData message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidCpuMetric.CoreData
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidCpuMetric.CoreData} CoreData
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CoreData.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidCpuMetric.CoreData();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.id = r.uint32();
                            break;
                        case 6:
                            m.metrics = $root.perfetto.protos.AndroidCpuMetric.Metrics.decode(r, r.uint32());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a CoreData message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidCpuMetric.CoreData
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidCpuMetric.CoreData} CoreData
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CoreData.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a CoreData message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidCpuMetric.CoreData
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                CoreData.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.id != null && m.hasOwnProperty("id")) {
                        if (!$util.isInteger(m.id))
                            return "id: integer expected";
                    }
                    if (m.metrics != null && m.hasOwnProperty("metrics")) {
                        {
                            var e = $root.perfetto.protos.AndroidCpuMetric.Metrics.verify(m.metrics);
                            if (e)
                                return "metrics." + e;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a CoreData message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidCpuMetric.CoreData
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidCpuMetric.CoreData} CoreData
                 */
                CoreData.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidCpuMetric.CoreData)
                        return d;
                    var m = new $root.perfetto.protos.AndroidCpuMetric.CoreData();
                    if (d.id != null) {
                        m.id = d.id >>> 0;
                    }
                    if (d.metrics != null) {
                        if (typeof d.metrics !== "object")
                            throw TypeError(".perfetto.protos.AndroidCpuMetric.CoreData.metrics: object expected");
                        m.metrics = $root.perfetto.protos.AndroidCpuMetric.Metrics.fromObject(d.metrics);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a CoreData message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidCpuMetric.CoreData
                 * @static
                 * @param {perfetto.protos.AndroidCpuMetric.CoreData} m CoreData
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                CoreData.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.id = 0;
                        d.metrics = null;
                    }
                    if (m.id != null && m.hasOwnProperty("id")) {
                        d.id = m.id;
                    }
                    if (m.metrics != null && m.hasOwnProperty("metrics")) {
                        d.metrics = $root.perfetto.protos.AndroidCpuMetric.Metrics.toObject(m.metrics, o);
                    }
                    return d;
                };

                /**
                 * Converts this CoreData to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidCpuMetric.CoreData
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                CoreData.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return CoreData;
            })();

            AndroidCpuMetric.CoreTypeData = (function() {

                /**
                 * Properties of a CoreTypeData.
                 * @memberof perfetto.protos.AndroidCpuMetric
                 * @interface ICoreTypeData
                 * @property {string|null} [type] CoreTypeData type
                 * @property {perfetto.protos.AndroidCpuMetric.IMetrics|null} [metrics] CoreTypeData metrics
                 */

                /**
                 * Constructs a new CoreTypeData.
                 * @memberof perfetto.protos.AndroidCpuMetric
                 * @classdesc Represents a CoreTypeData.
                 * @implements ICoreTypeData
                 * @constructor
                 * @param {perfetto.protos.AndroidCpuMetric.ICoreTypeData=} [p] Properties to set
                 */
                function CoreTypeData(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * CoreTypeData type.
                 * @member {string} type
                 * @memberof perfetto.protos.AndroidCpuMetric.CoreTypeData
                 * @instance
                 */
                CoreTypeData.prototype.type = "";

                /**
                 * CoreTypeData metrics.
                 * @member {perfetto.protos.AndroidCpuMetric.IMetrics|null|undefined} metrics
                 * @memberof perfetto.protos.AndroidCpuMetric.CoreTypeData
                 * @instance
                 */
                CoreTypeData.prototype.metrics = null;

                /**
                 * Creates a new CoreTypeData instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidCpuMetric.CoreTypeData
                 * @static
                 * @param {perfetto.protos.AndroidCpuMetric.ICoreTypeData=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidCpuMetric.CoreTypeData} CoreTypeData instance
                 */
                CoreTypeData.create = function create(properties) {
                    return new CoreTypeData(properties);
                };

                /**
                 * Encodes the specified CoreTypeData message. Does not implicitly {@link perfetto.protos.AndroidCpuMetric.CoreTypeData.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidCpuMetric.CoreTypeData
                 * @static
                 * @param {perfetto.protos.AndroidCpuMetric.ICoreTypeData} m CoreTypeData message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CoreTypeData.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                        w.uint32(10).string(m.type);
                    if (m.metrics != null && Object.hasOwnProperty.call(m, "metrics"))
                        $root.perfetto.protos.AndroidCpuMetric.Metrics.encode(m.metrics, w.uint32(18).fork()).ldelim();
                    return w;
                };

                /**
                 * Encodes the specified CoreTypeData message, length delimited. Does not implicitly {@link perfetto.protos.AndroidCpuMetric.CoreTypeData.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidCpuMetric.CoreTypeData
                 * @static
                 * @param {perfetto.protos.AndroidCpuMetric.ICoreTypeData} message CoreTypeData message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CoreTypeData.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a CoreTypeData message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidCpuMetric.CoreTypeData
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidCpuMetric.CoreTypeData} CoreTypeData
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CoreTypeData.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidCpuMetric.CoreTypeData();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.type = r.string();
                            break;
                        case 2:
                            m.metrics = $root.perfetto.protos.AndroidCpuMetric.Metrics.decode(r, r.uint32());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a CoreTypeData message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidCpuMetric.CoreTypeData
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidCpuMetric.CoreTypeData} CoreTypeData
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CoreTypeData.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a CoreTypeData message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidCpuMetric.CoreTypeData
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                CoreTypeData.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.type != null && m.hasOwnProperty("type")) {
                        if (!$util.isString(m.type))
                            return "type: string expected";
                    }
                    if (m.metrics != null && m.hasOwnProperty("metrics")) {
                        {
                            var e = $root.perfetto.protos.AndroidCpuMetric.Metrics.verify(m.metrics);
                            if (e)
                                return "metrics." + e;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a CoreTypeData message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidCpuMetric.CoreTypeData
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidCpuMetric.CoreTypeData} CoreTypeData
                 */
                CoreTypeData.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidCpuMetric.CoreTypeData)
                        return d;
                    var m = new $root.perfetto.protos.AndroidCpuMetric.CoreTypeData();
                    if (d.type != null) {
                        m.type = String(d.type);
                    }
                    if (d.metrics != null) {
                        if (typeof d.metrics !== "object")
                            throw TypeError(".perfetto.protos.AndroidCpuMetric.CoreTypeData.metrics: object expected");
                        m.metrics = $root.perfetto.protos.AndroidCpuMetric.Metrics.fromObject(d.metrics);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a CoreTypeData message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidCpuMetric.CoreTypeData
                 * @static
                 * @param {perfetto.protos.AndroidCpuMetric.CoreTypeData} m CoreTypeData
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                CoreTypeData.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.type = "";
                        d.metrics = null;
                    }
                    if (m.type != null && m.hasOwnProperty("type")) {
                        d.type = m.type;
                    }
                    if (m.metrics != null && m.hasOwnProperty("metrics")) {
                        d.metrics = $root.perfetto.protos.AndroidCpuMetric.Metrics.toObject(m.metrics, o);
                    }
                    return d;
                };

                /**
                 * Converts this CoreTypeData to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidCpuMetric.CoreTypeData
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                CoreTypeData.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return CoreTypeData;
            })();

            AndroidCpuMetric.Thread = (function() {

                /**
                 * Properties of a Thread.
                 * @memberof perfetto.protos.AndroidCpuMetric
                 * @interface IThread
                 * @property {string|null} [name] Thread name
                 * @property {perfetto.protos.AndroidCpuMetric.IMetrics|null} [metrics] Thread metrics
                 * @property {Array.<perfetto.protos.AndroidCpuMetric.ICoreData>|null} [core] Thread core
                 * @property {Array.<perfetto.protos.AndroidCpuMetric.ICoreTypeData>|null} [coreType] Thread coreType
                 */

                /**
                 * Constructs a new Thread.
                 * @memberof perfetto.protos.AndroidCpuMetric
                 * @classdesc Represents a Thread.
                 * @implements IThread
                 * @constructor
                 * @param {perfetto.protos.AndroidCpuMetric.IThread=} [p] Properties to set
                 */
                function Thread(p) {
                    this.core = [];
                    this.coreType = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Thread name.
                 * @member {string} name
                 * @memberof perfetto.protos.AndroidCpuMetric.Thread
                 * @instance
                 */
                Thread.prototype.name = "";

                /**
                 * Thread metrics.
                 * @member {perfetto.protos.AndroidCpuMetric.IMetrics|null|undefined} metrics
                 * @memberof perfetto.protos.AndroidCpuMetric.Thread
                 * @instance
                 */
                Thread.prototype.metrics = null;

                /**
                 * Thread core.
                 * @member {Array.<perfetto.protos.AndroidCpuMetric.ICoreData>} core
                 * @memberof perfetto.protos.AndroidCpuMetric.Thread
                 * @instance
                 */
                Thread.prototype.core = $util.emptyArray;

                /**
                 * Thread coreType.
                 * @member {Array.<perfetto.protos.AndroidCpuMetric.ICoreTypeData>} coreType
                 * @memberof perfetto.protos.AndroidCpuMetric.Thread
                 * @instance
                 */
                Thread.prototype.coreType = $util.emptyArray;

                /**
                 * Creates a new Thread instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidCpuMetric.Thread
                 * @static
                 * @param {perfetto.protos.AndroidCpuMetric.IThread=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidCpuMetric.Thread} Thread instance
                 */
                Thread.create = function create(properties) {
                    return new Thread(properties);
                };

                /**
                 * Encodes the specified Thread message. Does not implicitly {@link perfetto.protos.AndroidCpuMetric.Thread.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidCpuMetric.Thread
                 * @static
                 * @param {perfetto.protos.AndroidCpuMetric.IThread} m Thread message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Thread.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(10).string(m.name);
                    if (m.core != null && m.core.length) {
                        for (var i = 0; i < m.core.length; ++i)
                            $root.perfetto.protos.AndroidCpuMetric.CoreData.encode(m.core[i], w.uint32(18).fork()).ldelim();
                    }
                    if (m.metrics != null && Object.hasOwnProperty.call(m, "metrics"))
                        $root.perfetto.protos.AndroidCpuMetric.Metrics.encode(m.metrics, w.uint32(34).fork()).ldelim();
                    if (m.coreType != null && m.coreType.length) {
                        for (var i = 0; i < m.coreType.length; ++i)
                            $root.perfetto.protos.AndroidCpuMetric.CoreTypeData.encode(m.coreType[i], w.uint32(42).fork()).ldelim();
                    }
                    return w;
                };

                /**
                 * Encodes the specified Thread message, length delimited. Does not implicitly {@link perfetto.protos.AndroidCpuMetric.Thread.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidCpuMetric.Thread
                 * @static
                 * @param {perfetto.protos.AndroidCpuMetric.IThread} message Thread message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Thread.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Thread message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidCpuMetric.Thread
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidCpuMetric.Thread} Thread
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Thread.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidCpuMetric.Thread();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.name = r.string();
                            break;
                        case 4:
                            m.metrics = $root.perfetto.protos.AndroidCpuMetric.Metrics.decode(r, r.uint32());
                            break;
                        case 2:
                            if (!(m.core && m.core.length))
                                m.core = [];
                            m.core.push($root.perfetto.protos.AndroidCpuMetric.CoreData.decode(r, r.uint32()));
                            break;
                        case 5:
                            if (!(m.coreType && m.coreType.length))
                                m.coreType = [];
                            m.coreType.push($root.perfetto.protos.AndroidCpuMetric.CoreTypeData.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Thread message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidCpuMetric.Thread
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidCpuMetric.Thread} Thread
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Thread.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Thread message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidCpuMetric.Thread
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Thread.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    if (m.metrics != null && m.hasOwnProperty("metrics")) {
                        {
                            var e = $root.perfetto.protos.AndroidCpuMetric.Metrics.verify(m.metrics);
                            if (e)
                                return "metrics." + e;
                        }
                    }
                    if (m.core != null && m.hasOwnProperty("core")) {
                        if (!Array.isArray(m.core))
                            return "core: array expected";
                        for (var i = 0; i < m.core.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidCpuMetric.CoreData.verify(m.core[i]);
                                if (e)
                                    return "core." + e;
                            }
                        }
                    }
                    if (m.coreType != null && m.hasOwnProperty("coreType")) {
                        if (!Array.isArray(m.coreType))
                            return "coreType: array expected";
                        for (var i = 0; i < m.coreType.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidCpuMetric.CoreTypeData.verify(m.coreType[i]);
                                if (e)
                                    return "coreType." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates a Thread message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidCpuMetric.Thread
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidCpuMetric.Thread} Thread
                 */
                Thread.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidCpuMetric.Thread)
                        return d;
                    var m = new $root.perfetto.protos.AndroidCpuMetric.Thread();
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    if (d.metrics != null) {
                        if (typeof d.metrics !== "object")
                            throw TypeError(".perfetto.protos.AndroidCpuMetric.Thread.metrics: object expected");
                        m.metrics = $root.perfetto.protos.AndroidCpuMetric.Metrics.fromObject(d.metrics);
                    }
                    if (d.core) {
                        if (!Array.isArray(d.core))
                            throw TypeError(".perfetto.protos.AndroidCpuMetric.Thread.core: array expected");
                        m.core = [];
                        for (var i = 0; i < d.core.length; ++i) {
                            if (typeof d.core[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidCpuMetric.Thread.core: object expected");
                            m.core[i] = $root.perfetto.protos.AndroidCpuMetric.CoreData.fromObject(d.core[i]);
                        }
                    }
                    if (d.coreType) {
                        if (!Array.isArray(d.coreType))
                            throw TypeError(".perfetto.protos.AndroidCpuMetric.Thread.coreType: array expected");
                        m.coreType = [];
                        for (var i = 0; i < d.coreType.length; ++i) {
                            if (typeof d.coreType[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidCpuMetric.Thread.coreType: object expected");
                            m.coreType[i] = $root.perfetto.protos.AndroidCpuMetric.CoreTypeData.fromObject(d.coreType[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Thread message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidCpuMetric.Thread
                 * @static
                 * @param {perfetto.protos.AndroidCpuMetric.Thread} m Thread
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Thread.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.core = [];
                        d.coreType = [];
                    }
                    if (o.defaults) {
                        d.name = "";
                        d.metrics = null;
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    if (m.core && m.core.length) {
                        d.core = [];
                        for (var j = 0; j < m.core.length; ++j) {
                            d.core[j] = $root.perfetto.protos.AndroidCpuMetric.CoreData.toObject(m.core[j], o);
                        }
                    }
                    if (m.metrics != null && m.hasOwnProperty("metrics")) {
                        d.metrics = $root.perfetto.protos.AndroidCpuMetric.Metrics.toObject(m.metrics, o);
                    }
                    if (m.coreType && m.coreType.length) {
                        d.coreType = [];
                        for (var j = 0; j < m.coreType.length; ++j) {
                            d.coreType[j] = $root.perfetto.protos.AndroidCpuMetric.CoreTypeData.toObject(m.coreType[j], o);
                        }
                    }
                    return d;
                };

                /**
                 * Converts this Thread to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidCpuMetric.Thread
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Thread.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Thread;
            })();

            AndroidCpuMetric.Process = (function() {

                /**
                 * Properties of a Process.
                 * @memberof perfetto.protos.AndroidCpuMetric
                 * @interface IProcess
                 * @property {string|null} [name] Process name
                 * @property {perfetto.protos.AndroidCpuMetric.IMetrics|null} [metrics] Process metrics
                 * @property {Array.<perfetto.protos.AndroidCpuMetric.IThread>|null} [threads] Process threads
                 * @property {Array.<perfetto.protos.AndroidCpuMetric.ICoreData>|null} [core] Process core
                 * @property {Array.<perfetto.protos.AndroidCpuMetric.ICoreTypeData>|null} [coreType] Process coreType
                 */

                /**
                 * Constructs a new Process.
                 * @memberof perfetto.protos.AndroidCpuMetric
                 * @classdesc Represents a Process.
                 * @implements IProcess
                 * @constructor
                 * @param {perfetto.protos.AndroidCpuMetric.IProcess=} [p] Properties to set
                 */
                function Process(p) {
                    this.threads = [];
                    this.core = [];
                    this.coreType = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Process name.
                 * @member {string} name
                 * @memberof perfetto.protos.AndroidCpuMetric.Process
                 * @instance
                 */
                Process.prototype.name = "";

                /**
                 * Process metrics.
                 * @member {perfetto.protos.AndroidCpuMetric.IMetrics|null|undefined} metrics
                 * @memberof perfetto.protos.AndroidCpuMetric.Process
                 * @instance
                 */
                Process.prototype.metrics = null;

                /**
                 * Process threads.
                 * @member {Array.<perfetto.protos.AndroidCpuMetric.IThread>} threads
                 * @memberof perfetto.protos.AndroidCpuMetric.Process
                 * @instance
                 */
                Process.prototype.threads = $util.emptyArray;

                /**
                 * Process core.
                 * @member {Array.<perfetto.protos.AndroidCpuMetric.ICoreData>} core
                 * @memberof perfetto.protos.AndroidCpuMetric.Process
                 * @instance
                 */
                Process.prototype.core = $util.emptyArray;

                /**
                 * Process coreType.
                 * @member {Array.<perfetto.protos.AndroidCpuMetric.ICoreTypeData>} coreType
                 * @memberof perfetto.protos.AndroidCpuMetric.Process
                 * @instance
                 */
                Process.prototype.coreType = $util.emptyArray;

                /**
                 * Creates a new Process instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidCpuMetric.Process
                 * @static
                 * @param {perfetto.protos.AndroidCpuMetric.IProcess=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidCpuMetric.Process} Process instance
                 */
                Process.create = function create(properties) {
                    return new Process(properties);
                };

                /**
                 * Encodes the specified Process message. Does not implicitly {@link perfetto.protos.AndroidCpuMetric.Process.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidCpuMetric.Process
                 * @static
                 * @param {perfetto.protos.AndroidCpuMetric.IProcess} m Process message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Process.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(10).string(m.name);
                    if (m.metrics != null && Object.hasOwnProperty.call(m, "metrics"))
                        $root.perfetto.protos.AndroidCpuMetric.Metrics.encode(m.metrics, w.uint32(34).fork()).ldelim();
                    if (m.coreType != null && m.coreType.length) {
                        for (var i = 0; i < m.coreType.length; ++i)
                            $root.perfetto.protos.AndroidCpuMetric.CoreTypeData.encode(m.coreType[i], w.uint32(42).fork()).ldelim();
                    }
                    if (m.threads != null && m.threads.length) {
                        for (var i = 0; i < m.threads.length; ++i)
                            $root.perfetto.protos.AndroidCpuMetric.Thread.encode(m.threads[i], w.uint32(50).fork()).ldelim();
                    }
                    if (m.core != null && m.core.length) {
                        for (var i = 0; i < m.core.length; ++i)
                            $root.perfetto.protos.AndroidCpuMetric.CoreData.encode(m.core[i], w.uint32(58).fork()).ldelim();
                    }
                    return w;
                };

                /**
                 * Encodes the specified Process message, length delimited. Does not implicitly {@link perfetto.protos.AndroidCpuMetric.Process.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidCpuMetric.Process
                 * @static
                 * @param {perfetto.protos.AndroidCpuMetric.IProcess} message Process message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Process.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Process message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidCpuMetric.Process
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidCpuMetric.Process} Process
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Process.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidCpuMetric.Process();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.name = r.string();
                            break;
                        case 4:
                            m.metrics = $root.perfetto.protos.AndroidCpuMetric.Metrics.decode(r, r.uint32());
                            break;
                        case 6:
                            if (!(m.threads && m.threads.length))
                                m.threads = [];
                            m.threads.push($root.perfetto.protos.AndroidCpuMetric.Thread.decode(r, r.uint32()));
                            break;
                        case 7:
                            if (!(m.core && m.core.length))
                                m.core = [];
                            m.core.push($root.perfetto.protos.AndroidCpuMetric.CoreData.decode(r, r.uint32()));
                            break;
                        case 5:
                            if (!(m.coreType && m.coreType.length))
                                m.coreType = [];
                            m.coreType.push($root.perfetto.protos.AndroidCpuMetric.CoreTypeData.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Process message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidCpuMetric.Process
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidCpuMetric.Process} Process
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Process.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Process message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidCpuMetric.Process
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Process.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    if (m.metrics != null && m.hasOwnProperty("metrics")) {
                        {
                            var e = $root.perfetto.protos.AndroidCpuMetric.Metrics.verify(m.metrics);
                            if (e)
                                return "metrics." + e;
                        }
                    }
                    if (m.threads != null && m.hasOwnProperty("threads")) {
                        if (!Array.isArray(m.threads))
                            return "threads: array expected";
                        for (var i = 0; i < m.threads.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidCpuMetric.Thread.verify(m.threads[i]);
                                if (e)
                                    return "threads." + e;
                            }
                        }
                    }
                    if (m.core != null && m.hasOwnProperty("core")) {
                        if (!Array.isArray(m.core))
                            return "core: array expected";
                        for (var i = 0; i < m.core.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidCpuMetric.CoreData.verify(m.core[i]);
                                if (e)
                                    return "core." + e;
                            }
                        }
                    }
                    if (m.coreType != null && m.hasOwnProperty("coreType")) {
                        if (!Array.isArray(m.coreType))
                            return "coreType: array expected";
                        for (var i = 0; i < m.coreType.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidCpuMetric.CoreTypeData.verify(m.coreType[i]);
                                if (e)
                                    return "coreType." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates a Process message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidCpuMetric.Process
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidCpuMetric.Process} Process
                 */
                Process.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidCpuMetric.Process)
                        return d;
                    var m = new $root.perfetto.protos.AndroidCpuMetric.Process();
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    if (d.metrics != null) {
                        if (typeof d.metrics !== "object")
                            throw TypeError(".perfetto.protos.AndroidCpuMetric.Process.metrics: object expected");
                        m.metrics = $root.perfetto.protos.AndroidCpuMetric.Metrics.fromObject(d.metrics);
                    }
                    if (d.threads) {
                        if (!Array.isArray(d.threads))
                            throw TypeError(".perfetto.protos.AndroidCpuMetric.Process.threads: array expected");
                        m.threads = [];
                        for (var i = 0; i < d.threads.length; ++i) {
                            if (typeof d.threads[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidCpuMetric.Process.threads: object expected");
                            m.threads[i] = $root.perfetto.protos.AndroidCpuMetric.Thread.fromObject(d.threads[i]);
                        }
                    }
                    if (d.core) {
                        if (!Array.isArray(d.core))
                            throw TypeError(".perfetto.protos.AndroidCpuMetric.Process.core: array expected");
                        m.core = [];
                        for (var i = 0; i < d.core.length; ++i) {
                            if (typeof d.core[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidCpuMetric.Process.core: object expected");
                            m.core[i] = $root.perfetto.protos.AndroidCpuMetric.CoreData.fromObject(d.core[i]);
                        }
                    }
                    if (d.coreType) {
                        if (!Array.isArray(d.coreType))
                            throw TypeError(".perfetto.protos.AndroidCpuMetric.Process.coreType: array expected");
                        m.coreType = [];
                        for (var i = 0; i < d.coreType.length; ++i) {
                            if (typeof d.coreType[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidCpuMetric.Process.coreType: object expected");
                            m.coreType[i] = $root.perfetto.protos.AndroidCpuMetric.CoreTypeData.fromObject(d.coreType[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Process message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidCpuMetric.Process
                 * @static
                 * @param {perfetto.protos.AndroidCpuMetric.Process} m Process
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Process.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.coreType = [];
                        d.threads = [];
                        d.core = [];
                    }
                    if (o.defaults) {
                        d.name = "";
                        d.metrics = null;
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    if (m.metrics != null && m.hasOwnProperty("metrics")) {
                        d.metrics = $root.perfetto.protos.AndroidCpuMetric.Metrics.toObject(m.metrics, o);
                    }
                    if (m.coreType && m.coreType.length) {
                        d.coreType = [];
                        for (var j = 0; j < m.coreType.length; ++j) {
                            d.coreType[j] = $root.perfetto.protos.AndroidCpuMetric.CoreTypeData.toObject(m.coreType[j], o);
                        }
                    }
                    if (m.threads && m.threads.length) {
                        d.threads = [];
                        for (var j = 0; j < m.threads.length; ++j) {
                            d.threads[j] = $root.perfetto.protos.AndroidCpuMetric.Thread.toObject(m.threads[j], o);
                        }
                    }
                    if (m.core && m.core.length) {
                        d.core = [];
                        for (var j = 0; j < m.core.length; ++j) {
                            d.core[j] = $root.perfetto.protos.AndroidCpuMetric.CoreData.toObject(m.core[j], o);
                        }
                    }
                    return d;
                };

                /**
                 * Converts this Process to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidCpuMetric.Process
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Process.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Process;
            })();

            return AndroidCpuMetric;
        })();

        protos.AndroidCameraMetric = (function() {

            /**
             * Properties of an AndroidCameraMetric.
             * @memberof perfetto.protos
             * @interface IAndroidCameraMetric
             * @property {perfetto.protos.AndroidCameraMetric.ICounter|null} [gcRssAndDma] AndroidCameraMetric gcRssAndDma
             */

            /**
             * Constructs a new AndroidCameraMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidCameraMetric.
             * @implements IAndroidCameraMetric
             * @constructor
             * @param {perfetto.protos.IAndroidCameraMetric=} [p] Properties to set
             */
            function AndroidCameraMetric(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidCameraMetric gcRssAndDma.
             * @member {perfetto.protos.AndroidCameraMetric.ICounter|null|undefined} gcRssAndDma
             * @memberof perfetto.protos.AndroidCameraMetric
             * @instance
             */
            AndroidCameraMetric.prototype.gcRssAndDma = null;

            /**
             * Creates a new AndroidCameraMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidCameraMetric
             * @static
             * @param {perfetto.protos.IAndroidCameraMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidCameraMetric} AndroidCameraMetric instance
             */
            AndroidCameraMetric.create = function create(properties) {
                return new AndroidCameraMetric(properties);
            };

            /**
             * Encodes the specified AndroidCameraMetric message. Does not implicitly {@link perfetto.protos.AndroidCameraMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidCameraMetric
             * @static
             * @param {perfetto.protos.IAndroidCameraMetric} m AndroidCameraMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidCameraMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.gcRssAndDma != null && Object.hasOwnProperty.call(m, "gcRssAndDma"))
                    $root.perfetto.protos.AndroidCameraMetric.Counter.encode(m.gcRssAndDma, w.uint32(10).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified AndroidCameraMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidCameraMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidCameraMetric
             * @static
             * @param {perfetto.protos.IAndroidCameraMetric} message AndroidCameraMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidCameraMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidCameraMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidCameraMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidCameraMetric} AndroidCameraMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidCameraMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidCameraMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.gcRssAndDma = $root.perfetto.protos.AndroidCameraMetric.Counter.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidCameraMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidCameraMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidCameraMetric} AndroidCameraMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidCameraMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidCameraMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidCameraMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidCameraMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.gcRssAndDma != null && m.hasOwnProperty("gcRssAndDma")) {
                    {
                        var e = $root.perfetto.protos.AndroidCameraMetric.Counter.verify(m.gcRssAndDma);
                        if (e)
                            return "gcRssAndDma." + e;
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidCameraMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidCameraMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidCameraMetric} AndroidCameraMetric
             */
            AndroidCameraMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidCameraMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidCameraMetric();
                if (d.gcRssAndDma != null) {
                    if (typeof d.gcRssAndDma !== "object")
                        throw TypeError(".perfetto.protos.AndroidCameraMetric.gcRssAndDma: object expected");
                    m.gcRssAndDma = $root.perfetto.protos.AndroidCameraMetric.Counter.fromObject(d.gcRssAndDma);
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidCameraMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidCameraMetric
             * @static
             * @param {perfetto.protos.AndroidCameraMetric} m AndroidCameraMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidCameraMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.gcRssAndDma = null;
                }
                if (m.gcRssAndDma != null && m.hasOwnProperty("gcRssAndDma")) {
                    d.gcRssAndDma = $root.perfetto.protos.AndroidCameraMetric.Counter.toObject(m.gcRssAndDma, o);
                }
                return d;
            };

            /**
             * Converts this AndroidCameraMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidCameraMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidCameraMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidCameraMetric.Counter = (function() {

                /**
                 * Properties of a Counter.
                 * @memberof perfetto.protos.AndroidCameraMetric
                 * @interface ICounter
                 * @property {number|null} [min] Counter min
                 * @property {number|null} [max] Counter max
                 * @property {number|null} [avg] Counter avg
                 */

                /**
                 * Constructs a new Counter.
                 * @memberof perfetto.protos.AndroidCameraMetric
                 * @classdesc Represents a Counter.
                 * @implements ICounter
                 * @constructor
                 * @param {perfetto.protos.AndroidCameraMetric.ICounter=} [p] Properties to set
                 */
                function Counter(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Counter min.
                 * @member {number} min
                 * @memberof perfetto.protos.AndroidCameraMetric.Counter
                 * @instance
                 */
                Counter.prototype.min = 0;

                /**
                 * Counter max.
                 * @member {number} max
                 * @memberof perfetto.protos.AndroidCameraMetric.Counter
                 * @instance
                 */
                Counter.prototype.max = 0;

                /**
                 * Counter avg.
                 * @member {number} avg
                 * @memberof perfetto.protos.AndroidCameraMetric.Counter
                 * @instance
                 */
                Counter.prototype.avg = 0;

                /**
                 * Creates a new Counter instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidCameraMetric.Counter
                 * @static
                 * @param {perfetto.protos.AndroidCameraMetric.ICounter=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidCameraMetric.Counter} Counter instance
                 */
                Counter.create = function create(properties) {
                    return new Counter(properties);
                };

                /**
                 * Encodes the specified Counter message. Does not implicitly {@link perfetto.protos.AndroidCameraMetric.Counter.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidCameraMetric.Counter
                 * @static
                 * @param {perfetto.protos.AndroidCameraMetric.ICounter} m Counter message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Counter.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.min != null && Object.hasOwnProperty.call(m, "min"))
                        w.uint32(9).double(m.min);
                    if (m.max != null && Object.hasOwnProperty.call(m, "max"))
                        w.uint32(17).double(m.max);
                    if (m.avg != null && Object.hasOwnProperty.call(m, "avg"))
                        w.uint32(25).double(m.avg);
                    return w;
                };

                /**
                 * Encodes the specified Counter message, length delimited. Does not implicitly {@link perfetto.protos.AndroidCameraMetric.Counter.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidCameraMetric.Counter
                 * @static
                 * @param {perfetto.protos.AndroidCameraMetric.ICounter} message Counter message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Counter.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Counter message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidCameraMetric.Counter
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidCameraMetric.Counter} Counter
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Counter.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidCameraMetric.Counter();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.min = r.double();
                            break;
                        case 2:
                            m.max = r.double();
                            break;
                        case 3:
                            m.avg = r.double();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Counter message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidCameraMetric.Counter
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidCameraMetric.Counter} Counter
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Counter.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Counter message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidCameraMetric.Counter
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Counter.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.min != null && m.hasOwnProperty("min")) {
                        if (typeof m.min !== "number")
                            return "min: number expected";
                    }
                    if (m.max != null && m.hasOwnProperty("max")) {
                        if (typeof m.max !== "number")
                            return "max: number expected";
                    }
                    if (m.avg != null && m.hasOwnProperty("avg")) {
                        if (typeof m.avg !== "number")
                            return "avg: number expected";
                    }
                    return null;
                };

                /**
                 * Creates a Counter message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidCameraMetric.Counter
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidCameraMetric.Counter} Counter
                 */
                Counter.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidCameraMetric.Counter)
                        return d;
                    var m = new $root.perfetto.protos.AndroidCameraMetric.Counter();
                    if (d.min != null) {
                        m.min = Number(d.min);
                    }
                    if (d.max != null) {
                        m.max = Number(d.max);
                    }
                    if (d.avg != null) {
                        m.avg = Number(d.avg);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Counter message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidCameraMetric.Counter
                 * @static
                 * @param {perfetto.protos.AndroidCameraMetric.Counter} m Counter
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Counter.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.min = 0;
                        d.max = 0;
                        d.avg = 0;
                    }
                    if (m.min != null && m.hasOwnProperty("min")) {
                        d.min = o.json && !isFinite(m.min) ? String(m.min) : m.min;
                    }
                    if (m.max != null && m.hasOwnProperty("max")) {
                        d.max = o.json && !isFinite(m.max) ? String(m.max) : m.max;
                    }
                    if (m.avg != null && m.hasOwnProperty("avg")) {
                        d.avg = o.json && !isFinite(m.avg) ? String(m.avg) : m.avg;
                    }
                    return d;
                };

                /**
                 * Converts this Counter to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidCameraMetric.Counter
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Counter.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Counter;
            })();

            return AndroidCameraMetric;
        })();

        protos.AndroidCameraUnaggregatedMetric = (function() {

            /**
             * Properties of an AndroidCameraUnaggregatedMetric.
             * @memberof perfetto.protos
             * @interface IAndroidCameraUnaggregatedMetric
             * @property {Array.<perfetto.protos.AndroidCameraUnaggregatedMetric.IValue>|null} [gcRssAndDma] AndroidCameraUnaggregatedMetric gcRssAndDma
             */

            /**
             * Constructs a new AndroidCameraUnaggregatedMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidCameraUnaggregatedMetric.
             * @implements IAndroidCameraUnaggregatedMetric
             * @constructor
             * @param {perfetto.protos.IAndroidCameraUnaggregatedMetric=} [p] Properties to set
             */
            function AndroidCameraUnaggregatedMetric(p) {
                this.gcRssAndDma = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidCameraUnaggregatedMetric gcRssAndDma.
             * @member {Array.<perfetto.protos.AndroidCameraUnaggregatedMetric.IValue>} gcRssAndDma
             * @memberof perfetto.protos.AndroidCameraUnaggregatedMetric
             * @instance
             */
            AndroidCameraUnaggregatedMetric.prototype.gcRssAndDma = $util.emptyArray;

            /**
             * Creates a new AndroidCameraUnaggregatedMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidCameraUnaggregatedMetric
             * @static
             * @param {perfetto.protos.IAndroidCameraUnaggregatedMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidCameraUnaggregatedMetric} AndroidCameraUnaggregatedMetric instance
             */
            AndroidCameraUnaggregatedMetric.create = function create(properties) {
                return new AndroidCameraUnaggregatedMetric(properties);
            };

            /**
             * Encodes the specified AndroidCameraUnaggregatedMetric message. Does not implicitly {@link perfetto.protos.AndroidCameraUnaggregatedMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidCameraUnaggregatedMetric
             * @static
             * @param {perfetto.protos.IAndroidCameraUnaggregatedMetric} m AndroidCameraUnaggregatedMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidCameraUnaggregatedMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.gcRssAndDma != null && m.gcRssAndDma.length) {
                    for (var i = 0; i < m.gcRssAndDma.length; ++i)
                        $root.perfetto.protos.AndroidCameraUnaggregatedMetric.Value.encode(m.gcRssAndDma[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified AndroidCameraUnaggregatedMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidCameraUnaggregatedMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidCameraUnaggregatedMetric
             * @static
             * @param {perfetto.protos.IAndroidCameraUnaggregatedMetric} message AndroidCameraUnaggregatedMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidCameraUnaggregatedMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidCameraUnaggregatedMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidCameraUnaggregatedMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidCameraUnaggregatedMetric} AndroidCameraUnaggregatedMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidCameraUnaggregatedMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidCameraUnaggregatedMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.gcRssAndDma && m.gcRssAndDma.length))
                            m.gcRssAndDma = [];
                        m.gcRssAndDma.push($root.perfetto.protos.AndroidCameraUnaggregatedMetric.Value.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidCameraUnaggregatedMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidCameraUnaggregatedMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidCameraUnaggregatedMetric} AndroidCameraUnaggregatedMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidCameraUnaggregatedMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidCameraUnaggregatedMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidCameraUnaggregatedMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidCameraUnaggregatedMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.gcRssAndDma != null && m.hasOwnProperty("gcRssAndDma")) {
                    if (!Array.isArray(m.gcRssAndDma))
                        return "gcRssAndDma: array expected";
                    for (var i = 0; i < m.gcRssAndDma.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidCameraUnaggregatedMetric.Value.verify(m.gcRssAndDma[i]);
                            if (e)
                                return "gcRssAndDma." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidCameraUnaggregatedMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidCameraUnaggregatedMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidCameraUnaggregatedMetric} AndroidCameraUnaggregatedMetric
             */
            AndroidCameraUnaggregatedMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidCameraUnaggregatedMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidCameraUnaggregatedMetric();
                if (d.gcRssAndDma) {
                    if (!Array.isArray(d.gcRssAndDma))
                        throw TypeError(".perfetto.protos.AndroidCameraUnaggregatedMetric.gcRssAndDma: array expected");
                    m.gcRssAndDma = [];
                    for (var i = 0; i < d.gcRssAndDma.length; ++i) {
                        if (typeof d.gcRssAndDma[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidCameraUnaggregatedMetric.gcRssAndDma: object expected");
                        m.gcRssAndDma[i] = $root.perfetto.protos.AndroidCameraUnaggregatedMetric.Value.fromObject(d.gcRssAndDma[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidCameraUnaggregatedMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidCameraUnaggregatedMetric
             * @static
             * @param {perfetto.protos.AndroidCameraUnaggregatedMetric} m AndroidCameraUnaggregatedMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidCameraUnaggregatedMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.gcRssAndDma = [];
                }
                if (m.gcRssAndDma && m.gcRssAndDma.length) {
                    d.gcRssAndDma = [];
                    for (var j = 0; j < m.gcRssAndDma.length; ++j) {
                        d.gcRssAndDma[j] = $root.perfetto.protos.AndroidCameraUnaggregatedMetric.Value.toObject(m.gcRssAndDma[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidCameraUnaggregatedMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidCameraUnaggregatedMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidCameraUnaggregatedMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidCameraUnaggregatedMetric.Value = (function() {

                /**
                 * Properties of a Value.
                 * @memberof perfetto.protos.AndroidCameraUnaggregatedMetric
                 * @interface IValue
                 * @property {number|null} [ts] Value ts
                 * @property {number|null} [value] Value value
                 */

                /**
                 * Constructs a new Value.
                 * @memberof perfetto.protos.AndroidCameraUnaggregatedMetric
                 * @classdesc Represents a Value.
                 * @implements IValue
                 * @constructor
                 * @param {perfetto.protos.AndroidCameraUnaggregatedMetric.IValue=} [p] Properties to set
                 */
                function Value(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Value ts.
                 * @member {number} ts
                 * @memberof perfetto.protos.AndroidCameraUnaggregatedMetric.Value
                 * @instance
                 */
                Value.prototype.ts = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Value value.
                 * @member {number} value
                 * @memberof perfetto.protos.AndroidCameraUnaggregatedMetric.Value
                 * @instance
                 */
                Value.prototype.value = 0;

                /**
                 * Creates a new Value instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidCameraUnaggregatedMetric.Value
                 * @static
                 * @param {perfetto.protos.AndroidCameraUnaggregatedMetric.IValue=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidCameraUnaggregatedMetric.Value} Value instance
                 */
                Value.create = function create(properties) {
                    return new Value(properties);
                };

                /**
                 * Encodes the specified Value message. Does not implicitly {@link perfetto.protos.AndroidCameraUnaggregatedMetric.Value.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidCameraUnaggregatedMetric.Value
                 * @static
                 * @param {perfetto.protos.AndroidCameraUnaggregatedMetric.IValue} m Value message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Value.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.ts != null && Object.hasOwnProperty.call(m, "ts"))
                        w.uint32(8).int64(m.ts);
                    if (m.value != null && Object.hasOwnProperty.call(m, "value"))
                        w.uint32(17).double(m.value);
                    return w;
                };

                /**
                 * Encodes the specified Value message, length delimited. Does not implicitly {@link perfetto.protos.AndroidCameraUnaggregatedMetric.Value.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidCameraUnaggregatedMetric.Value
                 * @static
                 * @param {perfetto.protos.AndroidCameraUnaggregatedMetric.IValue} message Value message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Value.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Value message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidCameraUnaggregatedMetric.Value
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidCameraUnaggregatedMetric.Value} Value
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Value.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidCameraUnaggregatedMetric.Value();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.ts = r.int64();
                            break;
                        case 2:
                            m.value = r.double();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Value message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidCameraUnaggregatedMetric.Value
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidCameraUnaggregatedMetric.Value} Value
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Value.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Value message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidCameraUnaggregatedMetric.Value
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Value.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.ts != null && m.hasOwnProperty("ts")) {
                        if (!$util.isInteger(m.ts) && !(m.ts && $util.isInteger(m.ts.low) && $util.isInteger(m.ts.high)))
                            return "ts: integer|Long expected";
                    }
                    if (m.value != null && m.hasOwnProperty("value")) {
                        if (typeof m.value !== "number")
                            return "value: number expected";
                    }
                    return null;
                };

                /**
                 * Creates a Value message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidCameraUnaggregatedMetric.Value
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidCameraUnaggregatedMetric.Value} Value
                 */
                Value.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidCameraUnaggregatedMetric.Value)
                        return d;
                    var m = new $root.perfetto.protos.AndroidCameraUnaggregatedMetric.Value();
                    if (d.ts != null) {
                        if ($util.Long)
                            (m.ts = $util.Long.fromValue(d.ts)).unsigned = false;
                        else if (typeof d.ts === "string")
                            m.ts = parseInt(d.ts, 10);
                        else if (typeof d.ts === "number")
                            m.ts = d.ts;
                        else if (typeof d.ts === "object")
                            m.ts = new $util.LongBits(d.ts.low >>> 0, d.ts.high >>> 0).toNumber();
                    }
                    if (d.value != null) {
                        m.value = Number(d.value);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Value message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidCameraUnaggregatedMetric.Value
                 * @static
                 * @param {perfetto.protos.AndroidCameraUnaggregatedMetric.Value} m Value
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Value.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.ts = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.ts = o.longs === String ? "0" : 0;
                        d.value = 0;
                    }
                    if (m.ts != null && m.hasOwnProperty("ts")) {
                        if (typeof m.ts === "number")
                            d.ts = o.longs === String ? String(m.ts) : m.ts;
                        else
                            d.ts = o.longs === String ? $util.Long.prototype.toString.call(m.ts) : o.longs === Number ? new $util.LongBits(m.ts.low >>> 0, m.ts.high >>> 0).toNumber() : m.ts;
                    }
                    if (m.value != null && m.hasOwnProperty("value")) {
                        d.value = o.json && !isFinite(m.value) ? String(m.value) : m.value;
                    }
                    return d;
                };

                /**
                 * Converts this Value to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidCameraUnaggregatedMetric.Value
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Value.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Value;
            })();

            return AndroidCameraUnaggregatedMetric;
        })();

        protos.AndroidDisplayMetrics = (function() {

            /**
             * Properties of an AndroidDisplayMetrics.
             * @memberof perfetto.protos
             * @interface IAndroidDisplayMetrics
             * @property {number|null} [totalDuplicateFrames] AndroidDisplayMetrics totalDuplicateFrames
             * @property {number|null} [duplicateFramesLogged] AndroidDisplayMetrics duplicateFramesLogged
             * @property {number|null} [totalDpuUnderrunCount] AndroidDisplayMetrics totalDpuUnderrunCount
             * @property {number|null} [refreshRateSwitches] AndroidDisplayMetrics refreshRateSwitches
             * @property {Array.<perfetto.protos.AndroidDisplayMetrics.IRefreshRateStat>|null} [refreshRateStats] AndroidDisplayMetrics refreshRateStats
             * @property {perfetto.protos.AndroidDisplayMetrics.IUpdatePowerState|null} [updatePowerState] AndroidDisplayMetrics updatePowerState
             */

            /**
             * Constructs a new AndroidDisplayMetrics.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidDisplayMetrics.
             * @implements IAndroidDisplayMetrics
             * @constructor
             * @param {perfetto.protos.IAndroidDisplayMetrics=} [p] Properties to set
             */
            function AndroidDisplayMetrics(p) {
                this.refreshRateStats = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidDisplayMetrics totalDuplicateFrames.
             * @member {number} totalDuplicateFrames
             * @memberof perfetto.protos.AndroidDisplayMetrics
             * @instance
             */
            AndroidDisplayMetrics.prototype.totalDuplicateFrames = 0;

            /**
             * AndroidDisplayMetrics duplicateFramesLogged.
             * @member {number} duplicateFramesLogged
             * @memberof perfetto.protos.AndroidDisplayMetrics
             * @instance
             */
            AndroidDisplayMetrics.prototype.duplicateFramesLogged = 0;

            /**
             * AndroidDisplayMetrics totalDpuUnderrunCount.
             * @member {number} totalDpuUnderrunCount
             * @memberof perfetto.protos.AndroidDisplayMetrics
             * @instance
             */
            AndroidDisplayMetrics.prototype.totalDpuUnderrunCount = 0;

            /**
             * AndroidDisplayMetrics refreshRateSwitches.
             * @member {number} refreshRateSwitches
             * @memberof perfetto.protos.AndroidDisplayMetrics
             * @instance
             */
            AndroidDisplayMetrics.prototype.refreshRateSwitches = 0;

            /**
             * AndroidDisplayMetrics refreshRateStats.
             * @member {Array.<perfetto.protos.AndroidDisplayMetrics.IRefreshRateStat>} refreshRateStats
             * @memberof perfetto.protos.AndroidDisplayMetrics
             * @instance
             */
            AndroidDisplayMetrics.prototype.refreshRateStats = $util.emptyArray;

            /**
             * AndroidDisplayMetrics updatePowerState.
             * @member {perfetto.protos.AndroidDisplayMetrics.IUpdatePowerState|null|undefined} updatePowerState
             * @memberof perfetto.protos.AndroidDisplayMetrics
             * @instance
             */
            AndroidDisplayMetrics.prototype.updatePowerState = null;

            /**
             * Creates a new AndroidDisplayMetrics instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidDisplayMetrics
             * @static
             * @param {perfetto.protos.IAndroidDisplayMetrics=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidDisplayMetrics} AndroidDisplayMetrics instance
             */
            AndroidDisplayMetrics.create = function create(properties) {
                return new AndroidDisplayMetrics(properties);
            };

            /**
             * Encodes the specified AndroidDisplayMetrics message. Does not implicitly {@link perfetto.protos.AndroidDisplayMetrics.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidDisplayMetrics
             * @static
             * @param {perfetto.protos.IAndroidDisplayMetrics} m AndroidDisplayMetrics message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidDisplayMetrics.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.totalDuplicateFrames != null && Object.hasOwnProperty.call(m, "totalDuplicateFrames"))
                    w.uint32(8).uint32(m.totalDuplicateFrames);
                if (m.duplicateFramesLogged != null && Object.hasOwnProperty.call(m, "duplicateFramesLogged"))
                    w.uint32(16).uint32(m.duplicateFramesLogged);
                if (m.totalDpuUnderrunCount != null && Object.hasOwnProperty.call(m, "totalDpuUnderrunCount"))
                    w.uint32(24).uint32(m.totalDpuUnderrunCount);
                if (m.refreshRateSwitches != null && Object.hasOwnProperty.call(m, "refreshRateSwitches"))
                    w.uint32(32).uint32(m.refreshRateSwitches);
                if (m.refreshRateStats != null && m.refreshRateStats.length) {
                    for (var i = 0; i < m.refreshRateStats.length; ++i)
                        $root.perfetto.protos.AndroidDisplayMetrics.RefreshRateStat.encode(m.refreshRateStats[i], w.uint32(42).fork()).ldelim();
                }
                if (m.updatePowerState != null && Object.hasOwnProperty.call(m, "updatePowerState"))
                    $root.perfetto.protos.AndroidDisplayMetrics.UpdatePowerState.encode(m.updatePowerState, w.uint32(50).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified AndroidDisplayMetrics message, length delimited. Does not implicitly {@link perfetto.protos.AndroidDisplayMetrics.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidDisplayMetrics
             * @static
             * @param {perfetto.protos.IAndroidDisplayMetrics} message AndroidDisplayMetrics message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidDisplayMetrics.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidDisplayMetrics message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidDisplayMetrics
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidDisplayMetrics} AndroidDisplayMetrics
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidDisplayMetrics.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidDisplayMetrics();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.totalDuplicateFrames = r.uint32();
                        break;
                    case 2:
                        m.duplicateFramesLogged = r.uint32();
                        break;
                    case 3:
                        m.totalDpuUnderrunCount = r.uint32();
                        break;
                    case 4:
                        m.refreshRateSwitches = r.uint32();
                        break;
                    case 5:
                        if (!(m.refreshRateStats && m.refreshRateStats.length))
                            m.refreshRateStats = [];
                        m.refreshRateStats.push($root.perfetto.protos.AndroidDisplayMetrics.RefreshRateStat.decode(r, r.uint32()));
                        break;
                    case 6:
                        m.updatePowerState = $root.perfetto.protos.AndroidDisplayMetrics.UpdatePowerState.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidDisplayMetrics message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidDisplayMetrics
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidDisplayMetrics} AndroidDisplayMetrics
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidDisplayMetrics.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidDisplayMetrics message.
             * @function verify
             * @memberof perfetto.protos.AndroidDisplayMetrics
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidDisplayMetrics.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.totalDuplicateFrames != null && m.hasOwnProperty("totalDuplicateFrames")) {
                    if (!$util.isInteger(m.totalDuplicateFrames))
                        return "totalDuplicateFrames: integer expected";
                }
                if (m.duplicateFramesLogged != null && m.hasOwnProperty("duplicateFramesLogged")) {
                    if (!$util.isInteger(m.duplicateFramesLogged))
                        return "duplicateFramesLogged: integer expected";
                }
                if (m.totalDpuUnderrunCount != null && m.hasOwnProperty("totalDpuUnderrunCount")) {
                    if (!$util.isInteger(m.totalDpuUnderrunCount))
                        return "totalDpuUnderrunCount: integer expected";
                }
                if (m.refreshRateSwitches != null && m.hasOwnProperty("refreshRateSwitches")) {
                    if (!$util.isInteger(m.refreshRateSwitches))
                        return "refreshRateSwitches: integer expected";
                }
                if (m.refreshRateStats != null && m.hasOwnProperty("refreshRateStats")) {
                    if (!Array.isArray(m.refreshRateStats))
                        return "refreshRateStats: array expected";
                    for (var i = 0; i < m.refreshRateStats.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidDisplayMetrics.RefreshRateStat.verify(m.refreshRateStats[i]);
                            if (e)
                                return "refreshRateStats." + e;
                        }
                    }
                }
                if (m.updatePowerState != null && m.hasOwnProperty("updatePowerState")) {
                    {
                        var e = $root.perfetto.protos.AndroidDisplayMetrics.UpdatePowerState.verify(m.updatePowerState);
                        if (e)
                            return "updatePowerState." + e;
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidDisplayMetrics message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidDisplayMetrics
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidDisplayMetrics} AndroidDisplayMetrics
             */
            AndroidDisplayMetrics.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidDisplayMetrics)
                    return d;
                var m = new $root.perfetto.protos.AndroidDisplayMetrics();
                if (d.totalDuplicateFrames != null) {
                    m.totalDuplicateFrames = d.totalDuplicateFrames >>> 0;
                }
                if (d.duplicateFramesLogged != null) {
                    m.duplicateFramesLogged = d.duplicateFramesLogged >>> 0;
                }
                if (d.totalDpuUnderrunCount != null) {
                    m.totalDpuUnderrunCount = d.totalDpuUnderrunCount >>> 0;
                }
                if (d.refreshRateSwitches != null) {
                    m.refreshRateSwitches = d.refreshRateSwitches >>> 0;
                }
                if (d.refreshRateStats) {
                    if (!Array.isArray(d.refreshRateStats))
                        throw TypeError(".perfetto.protos.AndroidDisplayMetrics.refreshRateStats: array expected");
                    m.refreshRateStats = [];
                    for (var i = 0; i < d.refreshRateStats.length; ++i) {
                        if (typeof d.refreshRateStats[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidDisplayMetrics.refreshRateStats: object expected");
                        m.refreshRateStats[i] = $root.perfetto.protos.AndroidDisplayMetrics.RefreshRateStat.fromObject(d.refreshRateStats[i]);
                    }
                }
                if (d.updatePowerState != null) {
                    if (typeof d.updatePowerState !== "object")
                        throw TypeError(".perfetto.protos.AndroidDisplayMetrics.updatePowerState: object expected");
                    m.updatePowerState = $root.perfetto.protos.AndroidDisplayMetrics.UpdatePowerState.fromObject(d.updatePowerState);
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidDisplayMetrics message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidDisplayMetrics
             * @static
             * @param {perfetto.protos.AndroidDisplayMetrics} m AndroidDisplayMetrics
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidDisplayMetrics.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.refreshRateStats = [];
                }
                if (o.defaults) {
                    d.totalDuplicateFrames = 0;
                    d.duplicateFramesLogged = 0;
                    d.totalDpuUnderrunCount = 0;
                    d.refreshRateSwitches = 0;
                    d.updatePowerState = null;
                }
                if (m.totalDuplicateFrames != null && m.hasOwnProperty("totalDuplicateFrames")) {
                    d.totalDuplicateFrames = m.totalDuplicateFrames;
                }
                if (m.duplicateFramesLogged != null && m.hasOwnProperty("duplicateFramesLogged")) {
                    d.duplicateFramesLogged = m.duplicateFramesLogged;
                }
                if (m.totalDpuUnderrunCount != null && m.hasOwnProperty("totalDpuUnderrunCount")) {
                    d.totalDpuUnderrunCount = m.totalDpuUnderrunCount;
                }
                if (m.refreshRateSwitches != null && m.hasOwnProperty("refreshRateSwitches")) {
                    d.refreshRateSwitches = m.refreshRateSwitches;
                }
                if (m.refreshRateStats && m.refreshRateStats.length) {
                    d.refreshRateStats = [];
                    for (var j = 0; j < m.refreshRateStats.length; ++j) {
                        d.refreshRateStats[j] = $root.perfetto.protos.AndroidDisplayMetrics.RefreshRateStat.toObject(m.refreshRateStats[j], o);
                    }
                }
                if (m.updatePowerState != null && m.hasOwnProperty("updatePowerState")) {
                    d.updatePowerState = $root.perfetto.protos.AndroidDisplayMetrics.UpdatePowerState.toObject(m.updatePowerState, o);
                }
                return d;
            };

            /**
             * Converts this AndroidDisplayMetrics to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidDisplayMetrics
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidDisplayMetrics.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidDisplayMetrics.RefreshRateStat = (function() {

                /**
                 * Properties of a RefreshRateStat.
                 * @memberof perfetto.protos.AndroidDisplayMetrics
                 * @interface IRefreshRateStat
                 * @property {number|null} [refreshRateFps] RefreshRateStat refreshRateFps
                 * @property {number|null} [count] RefreshRateStat count
                 * @property {number|null} [totalDurMs] RefreshRateStat totalDurMs
                 * @property {number|null} [avgDurMs] RefreshRateStat avgDurMs
                 */

                /**
                 * Constructs a new RefreshRateStat.
                 * @memberof perfetto.protos.AndroidDisplayMetrics
                 * @classdesc Represents a RefreshRateStat.
                 * @implements IRefreshRateStat
                 * @constructor
                 * @param {perfetto.protos.AndroidDisplayMetrics.IRefreshRateStat=} [p] Properties to set
                 */
                function RefreshRateStat(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * RefreshRateStat refreshRateFps.
                 * @member {number} refreshRateFps
                 * @memberof perfetto.protos.AndroidDisplayMetrics.RefreshRateStat
                 * @instance
                 */
                RefreshRateStat.prototype.refreshRateFps = 0;

                /**
                 * RefreshRateStat count.
                 * @member {number} count
                 * @memberof perfetto.protos.AndroidDisplayMetrics.RefreshRateStat
                 * @instance
                 */
                RefreshRateStat.prototype.count = 0;

                /**
                 * RefreshRateStat totalDurMs.
                 * @member {number} totalDurMs
                 * @memberof perfetto.protos.AndroidDisplayMetrics.RefreshRateStat
                 * @instance
                 */
                RefreshRateStat.prototype.totalDurMs = 0;

                /**
                 * RefreshRateStat avgDurMs.
                 * @member {number} avgDurMs
                 * @memberof perfetto.protos.AndroidDisplayMetrics.RefreshRateStat
                 * @instance
                 */
                RefreshRateStat.prototype.avgDurMs = 0;

                /**
                 * Creates a new RefreshRateStat instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidDisplayMetrics.RefreshRateStat
                 * @static
                 * @param {perfetto.protos.AndroidDisplayMetrics.IRefreshRateStat=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidDisplayMetrics.RefreshRateStat} RefreshRateStat instance
                 */
                RefreshRateStat.create = function create(properties) {
                    return new RefreshRateStat(properties);
                };

                /**
                 * Encodes the specified RefreshRateStat message. Does not implicitly {@link perfetto.protos.AndroidDisplayMetrics.RefreshRateStat.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidDisplayMetrics.RefreshRateStat
                 * @static
                 * @param {perfetto.protos.AndroidDisplayMetrics.IRefreshRateStat} m RefreshRateStat message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                RefreshRateStat.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.refreshRateFps != null && Object.hasOwnProperty.call(m, "refreshRateFps"))
                        w.uint32(8).uint32(m.refreshRateFps);
                    if (m.count != null && Object.hasOwnProperty.call(m, "count"))
                        w.uint32(16).uint32(m.count);
                    if (m.totalDurMs != null && Object.hasOwnProperty.call(m, "totalDurMs"))
                        w.uint32(25).double(m.totalDurMs);
                    if (m.avgDurMs != null && Object.hasOwnProperty.call(m, "avgDurMs"))
                        w.uint32(33).double(m.avgDurMs);
                    return w;
                };

                /**
                 * Encodes the specified RefreshRateStat message, length delimited. Does not implicitly {@link perfetto.protos.AndroidDisplayMetrics.RefreshRateStat.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidDisplayMetrics.RefreshRateStat
                 * @static
                 * @param {perfetto.protos.AndroidDisplayMetrics.IRefreshRateStat} message RefreshRateStat message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                RefreshRateStat.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a RefreshRateStat message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidDisplayMetrics.RefreshRateStat
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidDisplayMetrics.RefreshRateStat} RefreshRateStat
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                RefreshRateStat.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidDisplayMetrics.RefreshRateStat();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.refreshRateFps = r.uint32();
                            break;
                        case 2:
                            m.count = r.uint32();
                            break;
                        case 3:
                            m.totalDurMs = r.double();
                            break;
                        case 4:
                            m.avgDurMs = r.double();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a RefreshRateStat message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidDisplayMetrics.RefreshRateStat
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidDisplayMetrics.RefreshRateStat} RefreshRateStat
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                RefreshRateStat.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a RefreshRateStat message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidDisplayMetrics.RefreshRateStat
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                RefreshRateStat.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.refreshRateFps != null && m.hasOwnProperty("refreshRateFps")) {
                        if (!$util.isInteger(m.refreshRateFps))
                            return "refreshRateFps: integer expected";
                    }
                    if (m.count != null && m.hasOwnProperty("count")) {
                        if (!$util.isInteger(m.count))
                            return "count: integer expected";
                    }
                    if (m.totalDurMs != null && m.hasOwnProperty("totalDurMs")) {
                        if (typeof m.totalDurMs !== "number")
                            return "totalDurMs: number expected";
                    }
                    if (m.avgDurMs != null && m.hasOwnProperty("avgDurMs")) {
                        if (typeof m.avgDurMs !== "number")
                            return "avgDurMs: number expected";
                    }
                    return null;
                };

                /**
                 * Creates a RefreshRateStat message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidDisplayMetrics.RefreshRateStat
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidDisplayMetrics.RefreshRateStat} RefreshRateStat
                 */
                RefreshRateStat.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidDisplayMetrics.RefreshRateStat)
                        return d;
                    var m = new $root.perfetto.protos.AndroidDisplayMetrics.RefreshRateStat();
                    if (d.refreshRateFps != null) {
                        m.refreshRateFps = d.refreshRateFps >>> 0;
                    }
                    if (d.count != null) {
                        m.count = d.count >>> 0;
                    }
                    if (d.totalDurMs != null) {
                        m.totalDurMs = Number(d.totalDurMs);
                    }
                    if (d.avgDurMs != null) {
                        m.avgDurMs = Number(d.avgDurMs);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a RefreshRateStat message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidDisplayMetrics.RefreshRateStat
                 * @static
                 * @param {perfetto.protos.AndroidDisplayMetrics.RefreshRateStat} m RefreshRateStat
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                RefreshRateStat.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.refreshRateFps = 0;
                        d.count = 0;
                        d.totalDurMs = 0;
                        d.avgDurMs = 0;
                    }
                    if (m.refreshRateFps != null && m.hasOwnProperty("refreshRateFps")) {
                        d.refreshRateFps = m.refreshRateFps;
                    }
                    if (m.count != null && m.hasOwnProperty("count")) {
                        d.count = m.count;
                    }
                    if (m.totalDurMs != null && m.hasOwnProperty("totalDurMs")) {
                        d.totalDurMs = o.json && !isFinite(m.totalDurMs) ? String(m.totalDurMs) : m.totalDurMs;
                    }
                    if (m.avgDurMs != null && m.hasOwnProperty("avgDurMs")) {
                        d.avgDurMs = o.json && !isFinite(m.avgDurMs) ? String(m.avgDurMs) : m.avgDurMs;
                    }
                    return d;
                };

                /**
                 * Converts this RefreshRateStat to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidDisplayMetrics.RefreshRateStat
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                RefreshRateStat.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return RefreshRateStat;
            })();

            AndroidDisplayMetrics.UpdatePowerState = (function() {

                /**
                 * Properties of an UpdatePowerState.
                 * @memberof perfetto.protos.AndroidDisplayMetrics
                 * @interface IUpdatePowerState
                 * @property {number|null} [avgRuntimeMs] UpdatePowerState avgRuntimeMs
                 */

                /**
                 * Constructs a new UpdatePowerState.
                 * @memberof perfetto.protos.AndroidDisplayMetrics
                 * @classdesc Represents an UpdatePowerState.
                 * @implements IUpdatePowerState
                 * @constructor
                 * @param {perfetto.protos.AndroidDisplayMetrics.IUpdatePowerState=} [p] Properties to set
                 */
                function UpdatePowerState(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * UpdatePowerState avgRuntimeMs.
                 * @member {number} avgRuntimeMs
                 * @memberof perfetto.protos.AndroidDisplayMetrics.UpdatePowerState
                 * @instance
                 */
                UpdatePowerState.prototype.avgRuntimeMs = 0;

                /**
                 * Creates a new UpdatePowerState instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidDisplayMetrics.UpdatePowerState
                 * @static
                 * @param {perfetto.protos.AndroidDisplayMetrics.IUpdatePowerState=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidDisplayMetrics.UpdatePowerState} UpdatePowerState instance
                 */
                UpdatePowerState.create = function create(properties) {
                    return new UpdatePowerState(properties);
                };

                /**
                 * Encodes the specified UpdatePowerState message. Does not implicitly {@link perfetto.protos.AndroidDisplayMetrics.UpdatePowerState.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidDisplayMetrics.UpdatePowerState
                 * @static
                 * @param {perfetto.protos.AndroidDisplayMetrics.IUpdatePowerState} m UpdatePowerState message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                UpdatePowerState.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.avgRuntimeMs != null && Object.hasOwnProperty.call(m, "avgRuntimeMs"))
                        w.uint32(8).uint32(m.avgRuntimeMs);
                    return w;
                };

                /**
                 * Encodes the specified UpdatePowerState message, length delimited. Does not implicitly {@link perfetto.protos.AndroidDisplayMetrics.UpdatePowerState.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidDisplayMetrics.UpdatePowerState
                 * @static
                 * @param {perfetto.protos.AndroidDisplayMetrics.IUpdatePowerState} message UpdatePowerState message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                UpdatePowerState.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an UpdatePowerState message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidDisplayMetrics.UpdatePowerState
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidDisplayMetrics.UpdatePowerState} UpdatePowerState
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                UpdatePowerState.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidDisplayMetrics.UpdatePowerState();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.avgRuntimeMs = r.uint32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an UpdatePowerState message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidDisplayMetrics.UpdatePowerState
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidDisplayMetrics.UpdatePowerState} UpdatePowerState
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                UpdatePowerState.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an UpdatePowerState message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidDisplayMetrics.UpdatePowerState
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                UpdatePowerState.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.avgRuntimeMs != null && m.hasOwnProperty("avgRuntimeMs")) {
                        if (!$util.isInteger(m.avgRuntimeMs))
                            return "avgRuntimeMs: integer expected";
                    }
                    return null;
                };

                /**
                 * Creates an UpdatePowerState message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidDisplayMetrics.UpdatePowerState
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidDisplayMetrics.UpdatePowerState} UpdatePowerState
                 */
                UpdatePowerState.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidDisplayMetrics.UpdatePowerState)
                        return d;
                    var m = new $root.perfetto.protos.AndroidDisplayMetrics.UpdatePowerState();
                    if (d.avgRuntimeMs != null) {
                        m.avgRuntimeMs = d.avgRuntimeMs >>> 0;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an UpdatePowerState message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidDisplayMetrics.UpdatePowerState
                 * @static
                 * @param {perfetto.protos.AndroidDisplayMetrics.UpdatePowerState} m UpdatePowerState
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                UpdatePowerState.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.avgRuntimeMs = 0;
                    }
                    if (m.avgRuntimeMs != null && m.hasOwnProperty("avgRuntimeMs")) {
                        d.avgRuntimeMs = m.avgRuntimeMs;
                    }
                    return d;
                };

                /**
                 * Converts this UpdatePowerState to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidDisplayMetrics.UpdatePowerState
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                UpdatePowerState.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return UpdatePowerState;
            })();

            return AndroidDisplayMetrics;
        })();

        protos.AndroidDmaHeapMetric = (function() {

            /**
             * Properties of an AndroidDmaHeapMetric.
             * @memberof perfetto.protos
             * @interface IAndroidDmaHeapMetric
             * @property {number|null} [avgSizeBytes] AndroidDmaHeapMetric avgSizeBytes
             * @property {number|null} [minSizeBytes] AndroidDmaHeapMetric minSizeBytes
             * @property {number|null} [maxSizeBytes] AndroidDmaHeapMetric maxSizeBytes
             * @property {number|null} [totalAllocSizeBytes] AndroidDmaHeapMetric totalAllocSizeBytes
             */

            /**
             * Constructs a new AndroidDmaHeapMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidDmaHeapMetric.
             * @implements IAndroidDmaHeapMetric
             * @constructor
             * @param {perfetto.protos.IAndroidDmaHeapMetric=} [p] Properties to set
             */
            function AndroidDmaHeapMetric(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidDmaHeapMetric avgSizeBytes.
             * @member {number} avgSizeBytes
             * @memberof perfetto.protos.AndroidDmaHeapMetric
             * @instance
             */
            AndroidDmaHeapMetric.prototype.avgSizeBytes = 0;

            /**
             * AndroidDmaHeapMetric minSizeBytes.
             * @member {number} minSizeBytes
             * @memberof perfetto.protos.AndroidDmaHeapMetric
             * @instance
             */
            AndroidDmaHeapMetric.prototype.minSizeBytes = 0;

            /**
             * AndroidDmaHeapMetric maxSizeBytes.
             * @member {number} maxSizeBytes
             * @memberof perfetto.protos.AndroidDmaHeapMetric
             * @instance
             */
            AndroidDmaHeapMetric.prototype.maxSizeBytes = 0;

            /**
             * AndroidDmaHeapMetric totalAllocSizeBytes.
             * @member {number} totalAllocSizeBytes
             * @memberof perfetto.protos.AndroidDmaHeapMetric
             * @instance
             */
            AndroidDmaHeapMetric.prototype.totalAllocSizeBytes = 0;

            /**
             * Creates a new AndroidDmaHeapMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidDmaHeapMetric
             * @static
             * @param {perfetto.protos.IAndroidDmaHeapMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidDmaHeapMetric} AndroidDmaHeapMetric instance
             */
            AndroidDmaHeapMetric.create = function create(properties) {
                return new AndroidDmaHeapMetric(properties);
            };

            /**
             * Encodes the specified AndroidDmaHeapMetric message. Does not implicitly {@link perfetto.protos.AndroidDmaHeapMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidDmaHeapMetric
             * @static
             * @param {perfetto.protos.IAndroidDmaHeapMetric} m AndroidDmaHeapMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidDmaHeapMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.avgSizeBytes != null && Object.hasOwnProperty.call(m, "avgSizeBytes"))
                    w.uint32(9).double(m.avgSizeBytes);
                if (m.minSizeBytes != null && Object.hasOwnProperty.call(m, "minSizeBytes"))
                    w.uint32(17).double(m.minSizeBytes);
                if (m.maxSizeBytes != null && Object.hasOwnProperty.call(m, "maxSizeBytes"))
                    w.uint32(25).double(m.maxSizeBytes);
                if (m.totalAllocSizeBytes != null && Object.hasOwnProperty.call(m, "totalAllocSizeBytes"))
                    w.uint32(33).double(m.totalAllocSizeBytes);
                return w;
            };

            /**
             * Encodes the specified AndroidDmaHeapMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidDmaHeapMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidDmaHeapMetric
             * @static
             * @param {perfetto.protos.IAndroidDmaHeapMetric} message AndroidDmaHeapMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidDmaHeapMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidDmaHeapMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidDmaHeapMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidDmaHeapMetric} AndroidDmaHeapMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidDmaHeapMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidDmaHeapMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.avgSizeBytes = r.double();
                        break;
                    case 2:
                        m.minSizeBytes = r.double();
                        break;
                    case 3:
                        m.maxSizeBytes = r.double();
                        break;
                    case 4:
                        m.totalAllocSizeBytes = r.double();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidDmaHeapMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidDmaHeapMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidDmaHeapMetric} AndroidDmaHeapMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidDmaHeapMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidDmaHeapMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidDmaHeapMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidDmaHeapMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.avgSizeBytes != null && m.hasOwnProperty("avgSizeBytes")) {
                    if (typeof m.avgSizeBytes !== "number")
                        return "avgSizeBytes: number expected";
                }
                if (m.minSizeBytes != null && m.hasOwnProperty("minSizeBytes")) {
                    if (typeof m.minSizeBytes !== "number")
                        return "minSizeBytes: number expected";
                }
                if (m.maxSizeBytes != null && m.hasOwnProperty("maxSizeBytes")) {
                    if (typeof m.maxSizeBytes !== "number")
                        return "maxSizeBytes: number expected";
                }
                if (m.totalAllocSizeBytes != null && m.hasOwnProperty("totalAllocSizeBytes")) {
                    if (typeof m.totalAllocSizeBytes !== "number")
                        return "totalAllocSizeBytes: number expected";
                }
                return null;
            };

            /**
             * Creates an AndroidDmaHeapMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidDmaHeapMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidDmaHeapMetric} AndroidDmaHeapMetric
             */
            AndroidDmaHeapMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidDmaHeapMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidDmaHeapMetric();
                if (d.avgSizeBytes != null) {
                    m.avgSizeBytes = Number(d.avgSizeBytes);
                }
                if (d.minSizeBytes != null) {
                    m.minSizeBytes = Number(d.minSizeBytes);
                }
                if (d.maxSizeBytes != null) {
                    m.maxSizeBytes = Number(d.maxSizeBytes);
                }
                if (d.totalAllocSizeBytes != null) {
                    m.totalAllocSizeBytes = Number(d.totalAllocSizeBytes);
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidDmaHeapMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidDmaHeapMetric
             * @static
             * @param {perfetto.protos.AndroidDmaHeapMetric} m AndroidDmaHeapMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidDmaHeapMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.avgSizeBytes = 0;
                    d.minSizeBytes = 0;
                    d.maxSizeBytes = 0;
                    d.totalAllocSizeBytes = 0;
                }
                if (m.avgSizeBytes != null && m.hasOwnProperty("avgSizeBytes")) {
                    d.avgSizeBytes = o.json && !isFinite(m.avgSizeBytes) ? String(m.avgSizeBytes) : m.avgSizeBytes;
                }
                if (m.minSizeBytes != null && m.hasOwnProperty("minSizeBytes")) {
                    d.minSizeBytes = o.json && !isFinite(m.minSizeBytes) ? String(m.minSizeBytes) : m.minSizeBytes;
                }
                if (m.maxSizeBytes != null && m.hasOwnProperty("maxSizeBytes")) {
                    d.maxSizeBytes = o.json && !isFinite(m.maxSizeBytes) ? String(m.maxSizeBytes) : m.maxSizeBytes;
                }
                if (m.totalAllocSizeBytes != null && m.hasOwnProperty("totalAllocSizeBytes")) {
                    d.totalAllocSizeBytes = o.json && !isFinite(m.totalAllocSizeBytes) ? String(m.totalAllocSizeBytes) : m.totalAllocSizeBytes;
                }
                return d;
            };

            /**
             * Converts this AndroidDmaHeapMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidDmaHeapMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidDmaHeapMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AndroidDmaHeapMetric;
        })();

        protos.AndroidDvfsMetric = (function() {

            /**
             * Properties of an AndroidDvfsMetric.
             * @memberof perfetto.protos
             * @interface IAndroidDvfsMetric
             * @property {Array.<perfetto.protos.AndroidDvfsMetric.IFrequencyResidency>|null} [freqResidencies] AndroidDvfsMetric freqResidencies
             */

            /**
             * Constructs a new AndroidDvfsMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidDvfsMetric.
             * @implements IAndroidDvfsMetric
             * @constructor
             * @param {perfetto.protos.IAndroidDvfsMetric=} [p] Properties to set
             */
            function AndroidDvfsMetric(p) {
                this.freqResidencies = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidDvfsMetric freqResidencies.
             * @member {Array.<perfetto.protos.AndroidDvfsMetric.IFrequencyResidency>} freqResidencies
             * @memberof perfetto.protos.AndroidDvfsMetric
             * @instance
             */
            AndroidDvfsMetric.prototype.freqResidencies = $util.emptyArray;

            /**
             * Creates a new AndroidDvfsMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidDvfsMetric
             * @static
             * @param {perfetto.protos.IAndroidDvfsMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidDvfsMetric} AndroidDvfsMetric instance
             */
            AndroidDvfsMetric.create = function create(properties) {
                return new AndroidDvfsMetric(properties);
            };

            /**
             * Encodes the specified AndroidDvfsMetric message. Does not implicitly {@link perfetto.protos.AndroidDvfsMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidDvfsMetric
             * @static
             * @param {perfetto.protos.IAndroidDvfsMetric} m AndroidDvfsMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidDvfsMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.freqResidencies != null && m.freqResidencies.length) {
                    for (var i = 0; i < m.freqResidencies.length; ++i)
                        $root.perfetto.protos.AndroidDvfsMetric.FrequencyResidency.encode(m.freqResidencies[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified AndroidDvfsMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidDvfsMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidDvfsMetric
             * @static
             * @param {perfetto.protos.IAndroidDvfsMetric} message AndroidDvfsMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidDvfsMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidDvfsMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidDvfsMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidDvfsMetric} AndroidDvfsMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidDvfsMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidDvfsMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.freqResidencies && m.freqResidencies.length))
                            m.freqResidencies = [];
                        m.freqResidencies.push($root.perfetto.protos.AndroidDvfsMetric.FrequencyResidency.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidDvfsMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidDvfsMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidDvfsMetric} AndroidDvfsMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidDvfsMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidDvfsMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidDvfsMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidDvfsMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.freqResidencies != null && m.hasOwnProperty("freqResidencies")) {
                    if (!Array.isArray(m.freqResidencies))
                        return "freqResidencies: array expected";
                    for (var i = 0; i < m.freqResidencies.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidDvfsMetric.FrequencyResidency.verify(m.freqResidencies[i]);
                            if (e)
                                return "freqResidencies." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidDvfsMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidDvfsMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidDvfsMetric} AndroidDvfsMetric
             */
            AndroidDvfsMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidDvfsMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidDvfsMetric();
                if (d.freqResidencies) {
                    if (!Array.isArray(d.freqResidencies))
                        throw TypeError(".perfetto.protos.AndroidDvfsMetric.freqResidencies: array expected");
                    m.freqResidencies = [];
                    for (var i = 0; i < d.freqResidencies.length; ++i) {
                        if (typeof d.freqResidencies[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidDvfsMetric.freqResidencies: object expected");
                        m.freqResidencies[i] = $root.perfetto.protos.AndroidDvfsMetric.FrequencyResidency.fromObject(d.freqResidencies[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidDvfsMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidDvfsMetric
             * @static
             * @param {perfetto.protos.AndroidDvfsMetric} m AndroidDvfsMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidDvfsMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.freqResidencies = [];
                }
                if (m.freqResidencies && m.freqResidencies.length) {
                    d.freqResidencies = [];
                    for (var j = 0; j < m.freqResidencies.length; ++j) {
                        d.freqResidencies[j] = $root.perfetto.protos.AndroidDvfsMetric.FrequencyResidency.toObject(m.freqResidencies[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidDvfsMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidDvfsMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidDvfsMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidDvfsMetric.BandStat = (function() {

                /**
                 * Properties of a BandStat.
                 * @memberof perfetto.protos.AndroidDvfsMetric
                 * @interface IBandStat
                 * @property {number|null} [freqValue] BandStat freqValue
                 * @property {number|null} [percentage] BandStat percentage
                 * @property {number|null} [durationNs] BandStat durationNs
                 */

                /**
                 * Constructs a new BandStat.
                 * @memberof perfetto.protos.AndroidDvfsMetric
                 * @classdesc Represents a BandStat.
                 * @implements IBandStat
                 * @constructor
                 * @param {perfetto.protos.AndroidDvfsMetric.IBandStat=} [p] Properties to set
                 */
                function BandStat(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * BandStat freqValue.
                 * @member {number} freqValue
                 * @memberof perfetto.protos.AndroidDvfsMetric.BandStat
                 * @instance
                 */
                BandStat.prototype.freqValue = 0;

                /**
                 * BandStat percentage.
                 * @member {number} percentage
                 * @memberof perfetto.protos.AndroidDvfsMetric.BandStat
                 * @instance
                 */
                BandStat.prototype.percentage = 0;

                /**
                 * BandStat durationNs.
                 * @member {number} durationNs
                 * @memberof perfetto.protos.AndroidDvfsMetric.BandStat
                 * @instance
                 */
                BandStat.prototype.durationNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new BandStat instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidDvfsMetric.BandStat
                 * @static
                 * @param {perfetto.protos.AndroidDvfsMetric.IBandStat=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidDvfsMetric.BandStat} BandStat instance
                 */
                BandStat.create = function create(properties) {
                    return new BandStat(properties);
                };

                /**
                 * Encodes the specified BandStat message. Does not implicitly {@link perfetto.protos.AndroidDvfsMetric.BandStat.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidDvfsMetric.BandStat
                 * @static
                 * @param {perfetto.protos.AndroidDvfsMetric.IBandStat} m BandStat message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BandStat.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.freqValue != null && Object.hasOwnProperty.call(m, "freqValue"))
                        w.uint32(8).int32(m.freqValue);
                    if (m.percentage != null && Object.hasOwnProperty.call(m, "percentage"))
                        w.uint32(17).double(m.percentage);
                    if (m.durationNs != null && Object.hasOwnProperty.call(m, "durationNs"))
                        w.uint32(24).int64(m.durationNs);
                    return w;
                };

                /**
                 * Encodes the specified BandStat message, length delimited. Does not implicitly {@link perfetto.protos.AndroidDvfsMetric.BandStat.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidDvfsMetric.BandStat
                 * @static
                 * @param {perfetto.protos.AndroidDvfsMetric.IBandStat} message BandStat message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BandStat.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a BandStat message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidDvfsMetric.BandStat
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidDvfsMetric.BandStat} BandStat
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BandStat.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidDvfsMetric.BandStat();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.freqValue = r.int32();
                            break;
                        case 2:
                            m.percentage = r.double();
                            break;
                        case 3:
                            m.durationNs = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a BandStat message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidDvfsMetric.BandStat
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidDvfsMetric.BandStat} BandStat
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BandStat.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a BandStat message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidDvfsMetric.BandStat
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                BandStat.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.freqValue != null && m.hasOwnProperty("freqValue")) {
                        if (!$util.isInteger(m.freqValue))
                            return "freqValue: integer expected";
                    }
                    if (m.percentage != null && m.hasOwnProperty("percentage")) {
                        if (typeof m.percentage !== "number")
                            return "percentage: number expected";
                    }
                    if (m.durationNs != null && m.hasOwnProperty("durationNs")) {
                        if (!$util.isInteger(m.durationNs) && !(m.durationNs && $util.isInteger(m.durationNs.low) && $util.isInteger(m.durationNs.high)))
                            return "durationNs: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a BandStat message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidDvfsMetric.BandStat
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidDvfsMetric.BandStat} BandStat
                 */
                BandStat.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidDvfsMetric.BandStat)
                        return d;
                    var m = new $root.perfetto.protos.AndroidDvfsMetric.BandStat();
                    if (d.freqValue != null) {
                        m.freqValue = d.freqValue | 0;
                    }
                    if (d.percentage != null) {
                        m.percentage = Number(d.percentage);
                    }
                    if (d.durationNs != null) {
                        if ($util.Long)
                            (m.durationNs = $util.Long.fromValue(d.durationNs)).unsigned = false;
                        else if (typeof d.durationNs === "string")
                            m.durationNs = parseInt(d.durationNs, 10);
                        else if (typeof d.durationNs === "number")
                            m.durationNs = d.durationNs;
                        else if (typeof d.durationNs === "object")
                            m.durationNs = new $util.LongBits(d.durationNs.low >>> 0, d.durationNs.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a BandStat message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidDvfsMetric.BandStat
                 * @static
                 * @param {perfetto.protos.AndroidDvfsMetric.BandStat} m BandStat
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                BandStat.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.freqValue = 0;
                        d.percentage = 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.durationNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.durationNs = o.longs === String ? "0" : 0;
                    }
                    if (m.freqValue != null && m.hasOwnProperty("freqValue")) {
                        d.freqValue = m.freqValue;
                    }
                    if (m.percentage != null && m.hasOwnProperty("percentage")) {
                        d.percentage = o.json && !isFinite(m.percentage) ? String(m.percentage) : m.percentage;
                    }
                    if (m.durationNs != null && m.hasOwnProperty("durationNs")) {
                        if (typeof m.durationNs === "number")
                            d.durationNs = o.longs === String ? String(m.durationNs) : m.durationNs;
                        else
                            d.durationNs = o.longs === String ? $util.Long.prototype.toString.call(m.durationNs) : o.longs === Number ? new $util.LongBits(m.durationNs.low >>> 0, m.durationNs.high >>> 0).toNumber() : m.durationNs;
                    }
                    return d;
                };

                /**
                 * Converts this BandStat to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidDvfsMetric.BandStat
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                BandStat.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return BandStat;
            })();

            AndroidDvfsMetric.FrequencyResidency = (function() {

                /**
                 * Properties of a FrequencyResidency.
                 * @memberof perfetto.protos.AndroidDvfsMetric
                 * @interface IFrequencyResidency
                 * @property {string|null} [freqName] FrequencyResidency freqName
                 * @property {Array.<perfetto.protos.AndroidDvfsMetric.IBandStat>|null} [bandStat] FrequencyResidency bandStat
                 */

                /**
                 * Constructs a new FrequencyResidency.
                 * @memberof perfetto.protos.AndroidDvfsMetric
                 * @classdesc Represents a FrequencyResidency.
                 * @implements IFrequencyResidency
                 * @constructor
                 * @param {perfetto.protos.AndroidDvfsMetric.IFrequencyResidency=} [p] Properties to set
                 */
                function FrequencyResidency(p) {
                    this.bandStat = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * FrequencyResidency freqName.
                 * @member {string} freqName
                 * @memberof perfetto.protos.AndroidDvfsMetric.FrequencyResidency
                 * @instance
                 */
                FrequencyResidency.prototype.freqName = "";

                /**
                 * FrequencyResidency bandStat.
                 * @member {Array.<perfetto.protos.AndroidDvfsMetric.IBandStat>} bandStat
                 * @memberof perfetto.protos.AndroidDvfsMetric.FrequencyResidency
                 * @instance
                 */
                FrequencyResidency.prototype.bandStat = $util.emptyArray;

                /**
                 * Creates a new FrequencyResidency instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidDvfsMetric.FrequencyResidency
                 * @static
                 * @param {perfetto.protos.AndroidDvfsMetric.IFrequencyResidency=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidDvfsMetric.FrequencyResidency} FrequencyResidency instance
                 */
                FrequencyResidency.create = function create(properties) {
                    return new FrequencyResidency(properties);
                };

                /**
                 * Encodes the specified FrequencyResidency message. Does not implicitly {@link perfetto.protos.AndroidDvfsMetric.FrequencyResidency.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidDvfsMetric.FrequencyResidency
                 * @static
                 * @param {perfetto.protos.AndroidDvfsMetric.IFrequencyResidency} m FrequencyResidency message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FrequencyResidency.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.freqName != null && Object.hasOwnProperty.call(m, "freqName"))
                        w.uint32(10).string(m.freqName);
                    if (m.bandStat != null && m.bandStat.length) {
                        for (var i = 0; i < m.bandStat.length; ++i)
                            $root.perfetto.protos.AndroidDvfsMetric.BandStat.encode(m.bandStat[i], w.uint32(18).fork()).ldelim();
                    }
                    return w;
                };

                /**
                 * Encodes the specified FrequencyResidency message, length delimited. Does not implicitly {@link perfetto.protos.AndroidDvfsMetric.FrequencyResidency.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidDvfsMetric.FrequencyResidency
                 * @static
                 * @param {perfetto.protos.AndroidDvfsMetric.IFrequencyResidency} message FrequencyResidency message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FrequencyResidency.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a FrequencyResidency message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidDvfsMetric.FrequencyResidency
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidDvfsMetric.FrequencyResidency} FrequencyResidency
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FrequencyResidency.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidDvfsMetric.FrequencyResidency();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.freqName = r.string();
                            break;
                        case 2:
                            if (!(m.bandStat && m.bandStat.length))
                                m.bandStat = [];
                            m.bandStat.push($root.perfetto.protos.AndroidDvfsMetric.BandStat.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a FrequencyResidency message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidDvfsMetric.FrequencyResidency
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidDvfsMetric.FrequencyResidency} FrequencyResidency
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FrequencyResidency.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a FrequencyResidency message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidDvfsMetric.FrequencyResidency
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                FrequencyResidency.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.freqName != null && m.hasOwnProperty("freqName")) {
                        if (!$util.isString(m.freqName))
                            return "freqName: string expected";
                    }
                    if (m.bandStat != null && m.hasOwnProperty("bandStat")) {
                        if (!Array.isArray(m.bandStat))
                            return "bandStat: array expected";
                        for (var i = 0; i < m.bandStat.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidDvfsMetric.BandStat.verify(m.bandStat[i]);
                                if (e)
                                    return "bandStat." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates a FrequencyResidency message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidDvfsMetric.FrequencyResidency
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidDvfsMetric.FrequencyResidency} FrequencyResidency
                 */
                FrequencyResidency.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidDvfsMetric.FrequencyResidency)
                        return d;
                    var m = new $root.perfetto.protos.AndroidDvfsMetric.FrequencyResidency();
                    if (d.freqName != null) {
                        m.freqName = String(d.freqName);
                    }
                    if (d.bandStat) {
                        if (!Array.isArray(d.bandStat))
                            throw TypeError(".perfetto.protos.AndroidDvfsMetric.FrequencyResidency.bandStat: array expected");
                        m.bandStat = [];
                        for (var i = 0; i < d.bandStat.length; ++i) {
                            if (typeof d.bandStat[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidDvfsMetric.FrequencyResidency.bandStat: object expected");
                            m.bandStat[i] = $root.perfetto.protos.AndroidDvfsMetric.BandStat.fromObject(d.bandStat[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a FrequencyResidency message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidDvfsMetric.FrequencyResidency
                 * @static
                 * @param {perfetto.protos.AndroidDvfsMetric.FrequencyResidency} m FrequencyResidency
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                FrequencyResidency.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.bandStat = [];
                    }
                    if (o.defaults) {
                        d.freqName = "";
                    }
                    if (m.freqName != null && m.hasOwnProperty("freqName")) {
                        d.freqName = m.freqName;
                    }
                    if (m.bandStat && m.bandStat.length) {
                        d.bandStat = [];
                        for (var j = 0; j < m.bandStat.length; ++j) {
                            d.bandStat[j] = $root.perfetto.protos.AndroidDvfsMetric.BandStat.toObject(m.bandStat[j], o);
                        }
                    }
                    return d;
                };

                /**
                 * Converts this FrequencyResidency to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidDvfsMetric.FrequencyResidency
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                FrequencyResidency.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return FrequencyResidency;
            })();

            return AndroidDvfsMetric;
        })();

        protos.AndroidFastrpcMetric = (function() {

            /**
             * Properties of an AndroidFastrpcMetric.
             * @memberof perfetto.protos
             * @interface IAndroidFastrpcMetric
             * @property {Array.<perfetto.protos.AndroidFastrpcMetric.ISubsystem>|null} [subsystem] AndroidFastrpcMetric subsystem
             */

            /**
             * Constructs a new AndroidFastrpcMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidFastrpcMetric.
             * @implements IAndroidFastrpcMetric
             * @constructor
             * @param {perfetto.protos.IAndroidFastrpcMetric=} [p] Properties to set
             */
            function AndroidFastrpcMetric(p) {
                this.subsystem = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidFastrpcMetric subsystem.
             * @member {Array.<perfetto.protos.AndroidFastrpcMetric.ISubsystem>} subsystem
             * @memberof perfetto.protos.AndroidFastrpcMetric
             * @instance
             */
            AndroidFastrpcMetric.prototype.subsystem = $util.emptyArray;

            /**
             * Creates a new AndroidFastrpcMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidFastrpcMetric
             * @static
             * @param {perfetto.protos.IAndroidFastrpcMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidFastrpcMetric} AndroidFastrpcMetric instance
             */
            AndroidFastrpcMetric.create = function create(properties) {
                return new AndroidFastrpcMetric(properties);
            };

            /**
             * Encodes the specified AndroidFastrpcMetric message. Does not implicitly {@link perfetto.protos.AndroidFastrpcMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidFastrpcMetric
             * @static
             * @param {perfetto.protos.IAndroidFastrpcMetric} m AndroidFastrpcMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidFastrpcMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.subsystem != null && m.subsystem.length) {
                    for (var i = 0; i < m.subsystem.length; ++i)
                        $root.perfetto.protos.AndroidFastrpcMetric.Subsystem.encode(m.subsystem[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified AndroidFastrpcMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidFastrpcMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidFastrpcMetric
             * @static
             * @param {perfetto.protos.IAndroidFastrpcMetric} message AndroidFastrpcMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidFastrpcMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidFastrpcMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidFastrpcMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidFastrpcMetric} AndroidFastrpcMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidFastrpcMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidFastrpcMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.subsystem && m.subsystem.length))
                            m.subsystem = [];
                        m.subsystem.push($root.perfetto.protos.AndroidFastrpcMetric.Subsystem.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidFastrpcMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidFastrpcMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidFastrpcMetric} AndroidFastrpcMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidFastrpcMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidFastrpcMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidFastrpcMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidFastrpcMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.subsystem != null && m.hasOwnProperty("subsystem")) {
                    if (!Array.isArray(m.subsystem))
                        return "subsystem: array expected";
                    for (var i = 0; i < m.subsystem.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidFastrpcMetric.Subsystem.verify(m.subsystem[i]);
                            if (e)
                                return "subsystem." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidFastrpcMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidFastrpcMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidFastrpcMetric} AndroidFastrpcMetric
             */
            AndroidFastrpcMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidFastrpcMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidFastrpcMetric();
                if (d.subsystem) {
                    if (!Array.isArray(d.subsystem))
                        throw TypeError(".perfetto.protos.AndroidFastrpcMetric.subsystem: array expected");
                    m.subsystem = [];
                    for (var i = 0; i < d.subsystem.length; ++i) {
                        if (typeof d.subsystem[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidFastrpcMetric.subsystem: object expected");
                        m.subsystem[i] = $root.perfetto.protos.AndroidFastrpcMetric.Subsystem.fromObject(d.subsystem[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidFastrpcMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidFastrpcMetric
             * @static
             * @param {perfetto.protos.AndroidFastrpcMetric} m AndroidFastrpcMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidFastrpcMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.subsystem = [];
                }
                if (m.subsystem && m.subsystem.length) {
                    d.subsystem = [];
                    for (var j = 0; j < m.subsystem.length; ++j) {
                        d.subsystem[j] = $root.perfetto.protos.AndroidFastrpcMetric.Subsystem.toObject(m.subsystem[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidFastrpcMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidFastrpcMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidFastrpcMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidFastrpcMetric.Subsystem = (function() {

                /**
                 * Properties of a Subsystem.
                 * @memberof perfetto.protos.AndroidFastrpcMetric
                 * @interface ISubsystem
                 * @property {string|null} [name] Subsystem name
                 * @property {number|null} [avgSizeBytes] Subsystem avgSizeBytes
                 * @property {number|null} [minSizeBytes] Subsystem minSizeBytes
                 * @property {number|null} [maxSizeBytes] Subsystem maxSizeBytes
                 * @property {number|null} [totalAllocSizeBytes] Subsystem totalAllocSizeBytes
                 */

                /**
                 * Constructs a new Subsystem.
                 * @memberof perfetto.protos.AndroidFastrpcMetric
                 * @classdesc Represents a Subsystem.
                 * @implements ISubsystem
                 * @constructor
                 * @param {perfetto.protos.AndroidFastrpcMetric.ISubsystem=} [p] Properties to set
                 */
                function Subsystem(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Subsystem name.
                 * @member {string} name
                 * @memberof perfetto.protos.AndroidFastrpcMetric.Subsystem
                 * @instance
                 */
                Subsystem.prototype.name = "";

                /**
                 * Subsystem avgSizeBytes.
                 * @member {number} avgSizeBytes
                 * @memberof perfetto.protos.AndroidFastrpcMetric.Subsystem
                 * @instance
                 */
                Subsystem.prototype.avgSizeBytes = 0;

                /**
                 * Subsystem minSizeBytes.
                 * @member {number} minSizeBytes
                 * @memberof perfetto.protos.AndroidFastrpcMetric.Subsystem
                 * @instance
                 */
                Subsystem.prototype.minSizeBytes = 0;

                /**
                 * Subsystem maxSizeBytes.
                 * @member {number} maxSizeBytes
                 * @memberof perfetto.protos.AndroidFastrpcMetric.Subsystem
                 * @instance
                 */
                Subsystem.prototype.maxSizeBytes = 0;

                /**
                 * Subsystem totalAllocSizeBytes.
                 * @member {number} totalAllocSizeBytes
                 * @memberof perfetto.protos.AndroidFastrpcMetric.Subsystem
                 * @instance
                 */
                Subsystem.prototype.totalAllocSizeBytes = 0;

                /**
                 * Creates a new Subsystem instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidFastrpcMetric.Subsystem
                 * @static
                 * @param {perfetto.protos.AndroidFastrpcMetric.ISubsystem=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidFastrpcMetric.Subsystem} Subsystem instance
                 */
                Subsystem.create = function create(properties) {
                    return new Subsystem(properties);
                };

                /**
                 * Encodes the specified Subsystem message. Does not implicitly {@link perfetto.protos.AndroidFastrpcMetric.Subsystem.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidFastrpcMetric.Subsystem
                 * @static
                 * @param {perfetto.protos.AndroidFastrpcMetric.ISubsystem} m Subsystem message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Subsystem.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(10).string(m.name);
                    if (m.avgSizeBytes != null && Object.hasOwnProperty.call(m, "avgSizeBytes"))
                        w.uint32(17).double(m.avgSizeBytes);
                    if (m.minSizeBytes != null && Object.hasOwnProperty.call(m, "minSizeBytes"))
                        w.uint32(25).double(m.minSizeBytes);
                    if (m.maxSizeBytes != null && Object.hasOwnProperty.call(m, "maxSizeBytes"))
                        w.uint32(33).double(m.maxSizeBytes);
                    if (m.totalAllocSizeBytes != null && Object.hasOwnProperty.call(m, "totalAllocSizeBytes"))
                        w.uint32(41).double(m.totalAllocSizeBytes);
                    return w;
                };

                /**
                 * Encodes the specified Subsystem message, length delimited. Does not implicitly {@link perfetto.protos.AndroidFastrpcMetric.Subsystem.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidFastrpcMetric.Subsystem
                 * @static
                 * @param {perfetto.protos.AndroidFastrpcMetric.ISubsystem} message Subsystem message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Subsystem.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Subsystem message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidFastrpcMetric.Subsystem
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidFastrpcMetric.Subsystem} Subsystem
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Subsystem.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidFastrpcMetric.Subsystem();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.name = r.string();
                            break;
                        case 2:
                            m.avgSizeBytes = r.double();
                            break;
                        case 3:
                            m.minSizeBytes = r.double();
                            break;
                        case 4:
                            m.maxSizeBytes = r.double();
                            break;
                        case 5:
                            m.totalAllocSizeBytes = r.double();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Subsystem message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidFastrpcMetric.Subsystem
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidFastrpcMetric.Subsystem} Subsystem
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Subsystem.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Subsystem message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidFastrpcMetric.Subsystem
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Subsystem.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    if (m.avgSizeBytes != null && m.hasOwnProperty("avgSizeBytes")) {
                        if (typeof m.avgSizeBytes !== "number")
                            return "avgSizeBytes: number expected";
                    }
                    if (m.minSizeBytes != null && m.hasOwnProperty("minSizeBytes")) {
                        if (typeof m.minSizeBytes !== "number")
                            return "minSizeBytes: number expected";
                    }
                    if (m.maxSizeBytes != null && m.hasOwnProperty("maxSizeBytes")) {
                        if (typeof m.maxSizeBytes !== "number")
                            return "maxSizeBytes: number expected";
                    }
                    if (m.totalAllocSizeBytes != null && m.hasOwnProperty("totalAllocSizeBytes")) {
                        if (typeof m.totalAllocSizeBytes !== "number")
                            return "totalAllocSizeBytes: number expected";
                    }
                    return null;
                };

                /**
                 * Creates a Subsystem message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidFastrpcMetric.Subsystem
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidFastrpcMetric.Subsystem} Subsystem
                 */
                Subsystem.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidFastrpcMetric.Subsystem)
                        return d;
                    var m = new $root.perfetto.protos.AndroidFastrpcMetric.Subsystem();
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    if (d.avgSizeBytes != null) {
                        m.avgSizeBytes = Number(d.avgSizeBytes);
                    }
                    if (d.minSizeBytes != null) {
                        m.minSizeBytes = Number(d.minSizeBytes);
                    }
                    if (d.maxSizeBytes != null) {
                        m.maxSizeBytes = Number(d.maxSizeBytes);
                    }
                    if (d.totalAllocSizeBytes != null) {
                        m.totalAllocSizeBytes = Number(d.totalAllocSizeBytes);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Subsystem message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidFastrpcMetric.Subsystem
                 * @static
                 * @param {perfetto.protos.AndroidFastrpcMetric.Subsystem} m Subsystem
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Subsystem.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.name = "";
                        d.avgSizeBytes = 0;
                        d.minSizeBytes = 0;
                        d.maxSizeBytes = 0;
                        d.totalAllocSizeBytes = 0;
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    if (m.avgSizeBytes != null && m.hasOwnProperty("avgSizeBytes")) {
                        d.avgSizeBytes = o.json && !isFinite(m.avgSizeBytes) ? String(m.avgSizeBytes) : m.avgSizeBytes;
                    }
                    if (m.minSizeBytes != null && m.hasOwnProperty("minSizeBytes")) {
                        d.minSizeBytes = o.json && !isFinite(m.minSizeBytes) ? String(m.minSizeBytes) : m.minSizeBytes;
                    }
                    if (m.maxSizeBytes != null && m.hasOwnProperty("maxSizeBytes")) {
                        d.maxSizeBytes = o.json && !isFinite(m.maxSizeBytes) ? String(m.maxSizeBytes) : m.maxSizeBytes;
                    }
                    if (m.totalAllocSizeBytes != null && m.hasOwnProperty("totalAllocSizeBytes")) {
                        d.totalAllocSizeBytes = o.json && !isFinite(m.totalAllocSizeBytes) ? String(m.totalAllocSizeBytes) : m.totalAllocSizeBytes;
                    }
                    return d;
                };

                /**
                 * Converts this Subsystem to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidFastrpcMetric.Subsystem
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Subsystem.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Subsystem;
            })();

            return AndroidFastrpcMetric;
        })();

        protos.G2dMetrics = (function() {

            /**
             * Properties of a G2dMetrics.
             * @memberof perfetto.protos
             * @interface IG2dMetrics
             * @property {perfetto.protos.G2dMetrics.IG2dMetric|null} [g2dHw] G2dMetrics g2dHw
             * @property {perfetto.protos.G2dMetrics.IG2dMetric|null} [g2dSw] G2dMetrics g2dSw
             */

            /**
             * Constructs a new G2dMetrics.
             * @memberof perfetto.protos
             * @classdesc Represents a G2dMetrics.
             * @implements IG2dMetrics
             * @constructor
             * @param {perfetto.protos.IG2dMetrics=} [p] Properties to set
             */
            function G2dMetrics(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * G2dMetrics g2dHw.
             * @member {perfetto.protos.G2dMetrics.IG2dMetric|null|undefined} g2dHw
             * @memberof perfetto.protos.G2dMetrics
             * @instance
             */
            G2dMetrics.prototype.g2dHw = null;

            /**
             * G2dMetrics g2dSw.
             * @member {perfetto.protos.G2dMetrics.IG2dMetric|null|undefined} g2dSw
             * @memberof perfetto.protos.G2dMetrics
             * @instance
             */
            G2dMetrics.prototype.g2dSw = null;

            /**
             * Creates a new G2dMetrics instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.G2dMetrics
             * @static
             * @param {perfetto.protos.IG2dMetrics=} [properties] Properties to set
             * @returns {perfetto.protos.G2dMetrics} G2dMetrics instance
             */
            G2dMetrics.create = function create(properties) {
                return new G2dMetrics(properties);
            };

            /**
             * Encodes the specified G2dMetrics message. Does not implicitly {@link perfetto.protos.G2dMetrics.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.G2dMetrics
             * @static
             * @param {perfetto.protos.IG2dMetrics} m G2dMetrics message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            G2dMetrics.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.g2dHw != null && Object.hasOwnProperty.call(m, "g2dHw"))
                    $root.perfetto.protos.G2dMetrics.G2dMetric.encode(m.g2dHw, w.uint32(10).fork()).ldelim();
                if (m.g2dSw != null && Object.hasOwnProperty.call(m, "g2dSw"))
                    $root.perfetto.protos.G2dMetrics.G2dMetric.encode(m.g2dSw, w.uint32(18).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified G2dMetrics message, length delimited. Does not implicitly {@link perfetto.protos.G2dMetrics.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.G2dMetrics
             * @static
             * @param {perfetto.protos.IG2dMetrics} message G2dMetrics message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            G2dMetrics.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a G2dMetrics message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.G2dMetrics
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.G2dMetrics} G2dMetrics
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            G2dMetrics.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.G2dMetrics();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.g2dHw = $root.perfetto.protos.G2dMetrics.G2dMetric.decode(r, r.uint32());
                        break;
                    case 2:
                        m.g2dSw = $root.perfetto.protos.G2dMetrics.G2dMetric.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a G2dMetrics message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.G2dMetrics
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.G2dMetrics} G2dMetrics
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            G2dMetrics.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a G2dMetrics message.
             * @function verify
             * @memberof perfetto.protos.G2dMetrics
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            G2dMetrics.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.g2dHw != null && m.hasOwnProperty("g2dHw")) {
                    {
                        var e = $root.perfetto.protos.G2dMetrics.G2dMetric.verify(m.g2dHw);
                        if (e)
                            return "g2dHw." + e;
                    }
                }
                if (m.g2dSw != null && m.hasOwnProperty("g2dSw")) {
                    {
                        var e = $root.perfetto.protos.G2dMetrics.G2dMetric.verify(m.g2dSw);
                        if (e)
                            return "g2dSw." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a G2dMetrics message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.G2dMetrics
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.G2dMetrics} G2dMetrics
             */
            G2dMetrics.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.G2dMetrics)
                    return d;
                var m = new $root.perfetto.protos.G2dMetrics();
                if (d.g2dHw != null) {
                    if (typeof d.g2dHw !== "object")
                        throw TypeError(".perfetto.protos.G2dMetrics.g2dHw: object expected");
                    m.g2dHw = $root.perfetto.protos.G2dMetrics.G2dMetric.fromObject(d.g2dHw);
                }
                if (d.g2dSw != null) {
                    if (typeof d.g2dSw !== "object")
                        throw TypeError(".perfetto.protos.G2dMetrics.g2dSw: object expected");
                    m.g2dSw = $root.perfetto.protos.G2dMetrics.G2dMetric.fromObject(d.g2dSw);
                }
                return m;
            };

            /**
             * Creates a plain object from a G2dMetrics message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.G2dMetrics
             * @static
             * @param {perfetto.protos.G2dMetrics} m G2dMetrics
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            G2dMetrics.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.g2dHw = null;
                    d.g2dSw = null;
                }
                if (m.g2dHw != null && m.hasOwnProperty("g2dHw")) {
                    d.g2dHw = $root.perfetto.protos.G2dMetrics.G2dMetric.toObject(m.g2dHw, o);
                }
                if (m.g2dSw != null && m.hasOwnProperty("g2dSw")) {
                    d.g2dSw = $root.perfetto.protos.G2dMetrics.G2dMetric.toObject(m.g2dSw, o);
                }
                return d;
            };

            /**
             * Converts this G2dMetrics to JSON.
             * @function toJSON
             * @memberof perfetto.protos.G2dMetrics
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            G2dMetrics.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            G2dMetrics.G2dInstance = (function() {

                /**
                 * Properties of a G2dInstance.
                 * @memberof perfetto.protos.G2dMetrics
                 * @interface IG2dInstance
                 * @property {string|null} [name] G2dInstance name
                 * @property {number|null} [frameCount] G2dInstance frameCount
                 * @property {number|null} [errorCount] G2dInstance errorCount
                 * @property {number|null} [maxDurMs] G2dInstance maxDurMs
                 * @property {number|null} [minDurMs] G2dInstance minDurMs
                 * @property {number|null} [avgDurMs] G2dInstance avgDurMs
                 */

                /**
                 * Constructs a new G2dInstance.
                 * @memberof perfetto.protos.G2dMetrics
                 * @classdesc Represents a G2dInstance.
                 * @implements IG2dInstance
                 * @constructor
                 * @param {perfetto.protos.G2dMetrics.IG2dInstance=} [p] Properties to set
                 */
                function G2dInstance(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * G2dInstance name.
                 * @member {string} name
                 * @memberof perfetto.protos.G2dMetrics.G2dInstance
                 * @instance
                 */
                G2dInstance.prototype.name = "";

                /**
                 * G2dInstance frameCount.
                 * @member {number} frameCount
                 * @memberof perfetto.protos.G2dMetrics.G2dInstance
                 * @instance
                 */
                G2dInstance.prototype.frameCount = 0;

                /**
                 * G2dInstance errorCount.
                 * @member {number} errorCount
                 * @memberof perfetto.protos.G2dMetrics.G2dInstance
                 * @instance
                 */
                G2dInstance.prototype.errorCount = 0;

                /**
                 * G2dInstance maxDurMs.
                 * @member {number} maxDurMs
                 * @memberof perfetto.protos.G2dMetrics.G2dInstance
                 * @instance
                 */
                G2dInstance.prototype.maxDurMs = 0;

                /**
                 * G2dInstance minDurMs.
                 * @member {number} minDurMs
                 * @memberof perfetto.protos.G2dMetrics.G2dInstance
                 * @instance
                 */
                G2dInstance.prototype.minDurMs = 0;

                /**
                 * G2dInstance avgDurMs.
                 * @member {number} avgDurMs
                 * @memberof perfetto.protos.G2dMetrics.G2dInstance
                 * @instance
                 */
                G2dInstance.prototype.avgDurMs = 0;

                /**
                 * Creates a new G2dInstance instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.G2dMetrics.G2dInstance
                 * @static
                 * @param {perfetto.protos.G2dMetrics.IG2dInstance=} [properties] Properties to set
                 * @returns {perfetto.protos.G2dMetrics.G2dInstance} G2dInstance instance
                 */
                G2dInstance.create = function create(properties) {
                    return new G2dInstance(properties);
                };

                /**
                 * Encodes the specified G2dInstance message. Does not implicitly {@link perfetto.protos.G2dMetrics.G2dInstance.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.G2dMetrics.G2dInstance
                 * @static
                 * @param {perfetto.protos.G2dMetrics.IG2dInstance} m G2dInstance message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                G2dInstance.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(10).string(m.name);
                    if (m.frameCount != null && Object.hasOwnProperty.call(m, "frameCount"))
                        w.uint32(40).uint32(m.frameCount);
                    if (m.errorCount != null && Object.hasOwnProperty.call(m, "errorCount"))
                        w.uint32(48).uint32(m.errorCount);
                    if (m.maxDurMs != null && Object.hasOwnProperty.call(m, "maxDurMs"))
                        w.uint32(57).double(m.maxDurMs);
                    if (m.minDurMs != null && Object.hasOwnProperty.call(m, "minDurMs"))
                        w.uint32(65).double(m.minDurMs);
                    if (m.avgDurMs != null && Object.hasOwnProperty.call(m, "avgDurMs"))
                        w.uint32(73).double(m.avgDurMs);
                    return w;
                };

                /**
                 * Encodes the specified G2dInstance message, length delimited. Does not implicitly {@link perfetto.protos.G2dMetrics.G2dInstance.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.G2dMetrics.G2dInstance
                 * @static
                 * @param {perfetto.protos.G2dMetrics.IG2dInstance} message G2dInstance message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                G2dInstance.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a G2dInstance message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.G2dMetrics.G2dInstance
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.G2dMetrics.G2dInstance} G2dInstance
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                G2dInstance.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.G2dMetrics.G2dInstance();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.name = r.string();
                            break;
                        case 5:
                            m.frameCount = r.uint32();
                            break;
                        case 6:
                            m.errorCount = r.uint32();
                            break;
                        case 7:
                            m.maxDurMs = r.double();
                            break;
                        case 8:
                            m.minDurMs = r.double();
                            break;
                        case 9:
                            m.avgDurMs = r.double();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a G2dInstance message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.G2dMetrics.G2dInstance
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.G2dMetrics.G2dInstance} G2dInstance
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                G2dInstance.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a G2dInstance message.
                 * @function verify
                 * @memberof perfetto.protos.G2dMetrics.G2dInstance
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                G2dInstance.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    if (m.frameCount != null && m.hasOwnProperty("frameCount")) {
                        if (!$util.isInteger(m.frameCount))
                            return "frameCount: integer expected";
                    }
                    if (m.errorCount != null && m.hasOwnProperty("errorCount")) {
                        if (!$util.isInteger(m.errorCount))
                            return "errorCount: integer expected";
                    }
                    if (m.maxDurMs != null && m.hasOwnProperty("maxDurMs")) {
                        if (typeof m.maxDurMs !== "number")
                            return "maxDurMs: number expected";
                    }
                    if (m.minDurMs != null && m.hasOwnProperty("minDurMs")) {
                        if (typeof m.minDurMs !== "number")
                            return "minDurMs: number expected";
                    }
                    if (m.avgDurMs != null && m.hasOwnProperty("avgDurMs")) {
                        if (typeof m.avgDurMs !== "number")
                            return "avgDurMs: number expected";
                    }
                    return null;
                };

                /**
                 * Creates a G2dInstance message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.G2dMetrics.G2dInstance
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.G2dMetrics.G2dInstance} G2dInstance
                 */
                G2dInstance.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.G2dMetrics.G2dInstance)
                        return d;
                    var m = new $root.perfetto.protos.G2dMetrics.G2dInstance();
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    if (d.frameCount != null) {
                        m.frameCount = d.frameCount >>> 0;
                    }
                    if (d.errorCount != null) {
                        m.errorCount = d.errorCount >>> 0;
                    }
                    if (d.maxDurMs != null) {
                        m.maxDurMs = Number(d.maxDurMs);
                    }
                    if (d.minDurMs != null) {
                        m.minDurMs = Number(d.minDurMs);
                    }
                    if (d.avgDurMs != null) {
                        m.avgDurMs = Number(d.avgDurMs);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a G2dInstance message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.G2dMetrics.G2dInstance
                 * @static
                 * @param {perfetto.protos.G2dMetrics.G2dInstance} m G2dInstance
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                G2dInstance.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.name = "";
                        d.frameCount = 0;
                        d.errorCount = 0;
                        d.maxDurMs = 0;
                        d.minDurMs = 0;
                        d.avgDurMs = 0;
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    if (m.frameCount != null && m.hasOwnProperty("frameCount")) {
                        d.frameCount = m.frameCount;
                    }
                    if (m.errorCount != null && m.hasOwnProperty("errorCount")) {
                        d.errorCount = m.errorCount;
                    }
                    if (m.maxDurMs != null && m.hasOwnProperty("maxDurMs")) {
                        d.maxDurMs = o.json && !isFinite(m.maxDurMs) ? String(m.maxDurMs) : m.maxDurMs;
                    }
                    if (m.minDurMs != null && m.hasOwnProperty("minDurMs")) {
                        d.minDurMs = o.json && !isFinite(m.minDurMs) ? String(m.minDurMs) : m.minDurMs;
                    }
                    if (m.avgDurMs != null && m.hasOwnProperty("avgDurMs")) {
                        d.avgDurMs = o.json && !isFinite(m.avgDurMs) ? String(m.avgDurMs) : m.avgDurMs;
                    }
                    return d;
                };

                /**
                 * Converts this G2dInstance to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.G2dMetrics.G2dInstance
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                G2dInstance.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return G2dInstance;
            })();

            G2dMetrics.G2dMetric = (function() {

                /**
                 * Properties of a G2dMetric.
                 * @memberof perfetto.protos.G2dMetrics
                 * @interface IG2dMetric
                 * @property {Array.<perfetto.protos.G2dMetrics.IG2dInstance>|null} [instances] G2dMetric instances
                 * @property {number|null} [frameCount] G2dMetric frameCount
                 * @property {number|null} [errorCount] G2dMetric errorCount
                 * @property {number|null} [maxDurMs] G2dMetric maxDurMs
                 * @property {number|null} [minDurMs] G2dMetric minDurMs
                 * @property {number|null} [avgDurMs] G2dMetric avgDurMs
                 */

                /**
                 * Constructs a new G2dMetric.
                 * @memberof perfetto.protos.G2dMetrics
                 * @classdesc Represents a G2dMetric.
                 * @implements IG2dMetric
                 * @constructor
                 * @param {perfetto.protos.G2dMetrics.IG2dMetric=} [p] Properties to set
                 */
                function G2dMetric(p) {
                    this.instances = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * G2dMetric instances.
                 * @member {Array.<perfetto.protos.G2dMetrics.IG2dInstance>} instances
                 * @memberof perfetto.protos.G2dMetrics.G2dMetric
                 * @instance
                 */
                G2dMetric.prototype.instances = $util.emptyArray;

                /**
                 * G2dMetric frameCount.
                 * @member {number} frameCount
                 * @memberof perfetto.protos.G2dMetrics.G2dMetric
                 * @instance
                 */
                G2dMetric.prototype.frameCount = 0;

                /**
                 * G2dMetric errorCount.
                 * @member {number} errorCount
                 * @memberof perfetto.protos.G2dMetrics.G2dMetric
                 * @instance
                 */
                G2dMetric.prototype.errorCount = 0;

                /**
                 * G2dMetric maxDurMs.
                 * @member {number} maxDurMs
                 * @memberof perfetto.protos.G2dMetrics.G2dMetric
                 * @instance
                 */
                G2dMetric.prototype.maxDurMs = 0;

                /**
                 * G2dMetric minDurMs.
                 * @member {number} minDurMs
                 * @memberof perfetto.protos.G2dMetrics.G2dMetric
                 * @instance
                 */
                G2dMetric.prototype.minDurMs = 0;

                /**
                 * G2dMetric avgDurMs.
                 * @member {number} avgDurMs
                 * @memberof perfetto.protos.G2dMetrics.G2dMetric
                 * @instance
                 */
                G2dMetric.prototype.avgDurMs = 0;

                /**
                 * Creates a new G2dMetric instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.G2dMetrics.G2dMetric
                 * @static
                 * @param {perfetto.protos.G2dMetrics.IG2dMetric=} [properties] Properties to set
                 * @returns {perfetto.protos.G2dMetrics.G2dMetric} G2dMetric instance
                 */
                G2dMetric.create = function create(properties) {
                    return new G2dMetric(properties);
                };

                /**
                 * Encodes the specified G2dMetric message. Does not implicitly {@link perfetto.protos.G2dMetrics.G2dMetric.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.G2dMetrics.G2dMetric
                 * @static
                 * @param {perfetto.protos.G2dMetrics.IG2dMetric} m G2dMetric message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                G2dMetric.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.instances != null && m.instances.length) {
                        for (var i = 0; i < m.instances.length; ++i)
                            $root.perfetto.protos.G2dMetrics.G2dInstance.encode(m.instances[i], w.uint32(10).fork()).ldelim();
                    }
                    if (m.frameCount != null && Object.hasOwnProperty.call(m, "frameCount"))
                        w.uint32(40).uint32(m.frameCount);
                    if (m.errorCount != null && Object.hasOwnProperty.call(m, "errorCount"))
                        w.uint32(48).uint32(m.errorCount);
                    if (m.maxDurMs != null && Object.hasOwnProperty.call(m, "maxDurMs"))
                        w.uint32(57).double(m.maxDurMs);
                    if (m.minDurMs != null && Object.hasOwnProperty.call(m, "minDurMs"))
                        w.uint32(65).double(m.minDurMs);
                    if (m.avgDurMs != null && Object.hasOwnProperty.call(m, "avgDurMs"))
                        w.uint32(73).double(m.avgDurMs);
                    return w;
                };

                /**
                 * Encodes the specified G2dMetric message, length delimited. Does not implicitly {@link perfetto.protos.G2dMetrics.G2dMetric.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.G2dMetrics.G2dMetric
                 * @static
                 * @param {perfetto.protos.G2dMetrics.IG2dMetric} message G2dMetric message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                G2dMetric.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a G2dMetric message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.G2dMetrics.G2dMetric
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.G2dMetrics.G2dMetric} G2dMetric
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                G2dMetric.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.G2dMetrics.G2dMetric();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            if (!(m.instances && m.instances.length))
                                m.instances = [];
                            m.instances.push($root.perfetto.protos.G2dMetrics.G2dInstance.decode(r, r.uint32()));
                            break;
                        case 5:
                            m.frameCount = r.uint32();
                            break;
                        case 6:
                            m.errorCount = r.uint32();
                            break;
                        case 7:
                            m.maxDurMs = r.double();
                            break;
                        case 8:
                            m.minDurMs = r.double();
                            break;
                        case 9:
                            m.avgDurMs = r.double();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a G2dMetric message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.G2dMetrics.G2dMetric
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.G2dMetrics.G2dMetric} G2dMetric
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                G2dMetric.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a G2dMetric message.
                 * @function verify
                 * @memberof perfetto.protos.G2dMetrics.G2dMetric
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                G2dMetric.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.instances != null && m.hasOwnProperty("instances")) {
                        if (!Array.isArray(m.instances))
                            return "instances: array expected";
                        for (var i = 0; i < m.instances.length; ++i) {
                            {
                                var e = $root.perfetto.protos.G2dMetrics.G2dInstance.verify(m.instances[i]);
                                if (e)
                                    return "instances." + e;
                            }
                        }
                    }
                    if (m.frameCount != null && m.hasOwnProperty("frameCount")) {
                        if (!$util.isInteger(m.frameCount))
                            return "frameCount: integer expected";
                    }
                    if (m.errorCount != null && m.hasOwnProperty("errorCount")) {
                        if (!$util.isInteger(m.errorCount))
                            return "errorCount: integer expected";
                    }
                    if (m.maxDurMs != null && m.hasOwnProperty("maxDurMs")) {
                        if (typeof m.maxDurMs !== "number")
                            return "maxDurMs: number expected";
                    }
                    if (m.minDurMs != null && m.hasOwnProperty("minDurMs")) {
                        if (typeof m.minDurMs !== "number")
                            return "minDurMs: number expected";
                    }
                    if (m.avgDurMs != null && m.hasOwnProperty("avgDurMs")) {
                        if (typeof m.avgDurMs !== "number")
                            return "avgDurMs: number expected";
                    }
                    return null;
                };

                /**
                 * Creates a G2dMetric message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.G2dMetrics.G2dMetric
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.G2dMetrics.G2dMetric} G2dMetric
                 */
                G2dMetric.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.G2dMetrics.G2dMetric)
                        return d;
                    var m = new $root.perfetto.protos.G2dMetrics.G2dMetric();
                    if (d.instances) {
                        if (!Array.isArray(d.instances))
                            throw TypeError(".perfetto.protos.G2dMetrics.G2dMetric.instances: array expected");
                        m.instances = [];
                        for (var i = 0; i < d.instances.length; ++i) {
                            if (typeof d.instances[i] !== "object")
                                throw TypeError(".perfetto.protos.G2dMetrics.G2dMetric.instances: object expected");
                            m.instances[i] = $root.perfetto.protos.G2dMetrics.G2dInstance.fromObject(d.instances[i]);
                        }
                    }
                    if (d.frameCount != null) {
                        m.frameCount = d.frameCount >>> 0;
                    }
                    if (d.errorCount != null) {
                        m.errorCount = d.errorCount >>> 0;
                    }
                    if (d.maxDurMs != null) {
                        m.maxDurMs = Number(d.maxDurMs);
                    }
                    if (d.minDurMs != null) {
                        m.minDurMs = Number(d.minDurMs);
                    }
                    if (d.avgDurMs != null) {
                        m.avgDurMs = Number(d.avgDurMs);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a G2dMetric message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.G2dMetrics.G2dMetric
                 * @static
                 * @param {perfetto.protos.G2dMetrics.G2dMetric} m G2dMetric
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                G2dMetric.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.instances = [];
                    }
                    if (o.defaults) {
                        d.frameCount = 0;
                        d.errorCount = 0;
                        d.maxDurMs = 0;
                        d.minDurMs = 0;
                        d.avgDurMs = 0;
                    }
                    if (m.instances && m.instances.length) {
                        d.instances = [];
                        for (var j = 0; j < m.instances.length; ++j) {
                            d.instances[j] = $root.perfetto.protos.G2dMetrics.G2dInstance.toObject(m.instances[j], o);
                        }
                    }
                    if (m.frameCount != null && m.hasOwnProperty("frameCount")) {
                        d.frameCount = m.frameCount;
                    }
                    if (m.errorCount != null && m.hasOwnProperty("errorCount")) {
                        d.errorCount = m.errorCount;
                    }
                    if (m.maxDurMs != null && m.hasOwnProperty("maxDurMs")) {
                        d.maxDurMs = o.json && !isFinite(m.maxDurMs) ? String(m.maxDurMs) : m.maxDurMs;
                    }
                    if (m.minDurMs != null && m.hasOwnProperty("minDurMs")) {
                        d.minDurMs = o.json && !isFinite(m.minDurMs) ? String(m.minDurMs) : m.minDurMs;
                    }
                    if (m.avgDurMs != null && m.hasOwnProperty("avgDurMs")) {
                        d.avgDurMs = o.json && !isFinite(m.avgDurMs) ? String(m.avgDurMs) : m.avgDurMs;
                    }
                    return d;
                };

                /**
                 * Converts this G2dMetric to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.G2dMetrics.G2dMetric
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                G2dMetric.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return G2dMetric;
            })();

            return G2dMetrics;
        })();

        protos.AndroidGpuMetric = (function() {

            /**
             * Properties of an AndroidGpuMetric.
             * @memberof perfetto.protos
             * @interface IAndroidGpuMetric
             * @property {Array.<perfetto.protos.AndroidGpuMetric.IProcess>|null} [processes] AndroidGpuMetric processes
             * @property {number|null} [memMax] AndroidGpuMetric memMax
             * @property {number|null} [memMin] AndroidGpuMetric memMin
             * @property {number|null} [memAvg] AndroidGpuMetric memAvg
             * @property {Array.<perfetto.protos.AndroidGpuMetric.IFrequencyMetric>|null} [freqMetrics] AndroidGpuMetric freqMetrics
             */

            /**
             * Constructs a new AndroidGpuMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidGpuMetric.
             * @implements IAndroidGpuMetric
             * @constructor
             * @param {perfetto.protos.IAndroidGpuMetric=} [p] Properties to set
             */
            function AndroidGpuMetric(p) {
                this.processes = [];
                this.freqMetrics = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidGpuMetric processes.
             * @member {Array.<perfetto.protos.AndroidGpuMetric.IProcess>} processes
             * @memberof perfetto.protos.AndroidGpuMetric
             * @instance
             */
            AndroidGpuMetric.prototype.processes = $util.emptyArray;

            /**
             * AndroidGpuMetric memMax.
             * @member {number} memMax
             * @memberof perfetto.protos.AndroidGpuMetric
             * @instance
             */
            AndroidGpuMetric.prototype.memMax = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * AndroidGpuMetric memMin.
             * @member {number} memMin
             * @memberof perfetto.protos.AndroidGpuMetric
             * @instance
             */
            AndroidGpuMetric.prototype.memMin = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * AndroidGpuMetric memAvg.
             * @member {number} memAvg
             * @memberof perfetto.protos.AndroidGpuMetric
             * @instance
             */
            AndroidGpuMetric.prototype.memAvg = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * AndroidGpuMetric freqMetrics.
             * @member {Array.<perfetto.protos.AndroidGpuMetric.IFrequencyMetric>} freqMetrics
             * @memberof perfetto.protos.AndroidGpuMetric
             * @instance
             */
            AndroidGpuMetric.prototype.freqMetrics = $util.emptyArray;

            /**
             * Creates a new AndroidGpuMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidGpuMetric
             * @static
             * @param {perfetto.protos.IAndroidGpuMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidGpuMetric} AndroidGpuMetric instance
             */
            AndroidGpuMetric.create = function create(properties) {
                return new AndroidGpuMetric(properties);
            };

            /**
             * Encodes the specified AndroidGpuMetric message. Does not implicitly {@link perfetto.protos.AndroidGpuMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidGpuMetric
             * @static
             * @param {perfetto.protos.IAndroidGpuMetric} m AndroidGpuMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidGpuMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.processes != null && m.processes.length) {
                    for (var i = 0; i < m.processes.length; ++i)
                        $root.perfetto.protos.AndroidGpuMetric.Process.encode(m.processes[i], w.uint32(10).fork()).ldelim();
                }
                if (m.memMax != null && Object.hasOwnProperty.call(m, "memMax"))
                    w.uint32(16).int64(m.memMax);
                if (m.memMin != null && Object.hasOwnProperty.call(m, "memMin"))
                    w.uint32(24).int64(m.memMin);
                if (m.memAvg != null && Object.hasOwnProperty.call(m, "memAvg"))
                    w.uint32(32).int64(m.memAvg);
                if (m.freqMetrics != null && m.freqMetrics.length) {
                    for (var i = 0; i < m.freqMetrics.length; ++i)
                        $root.perfetto.protos.AndroidGpuMetric.FrequencyMetric.encode(m.freqMetrics[i], w.uint32(42).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified AndroidGpuMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidGpuMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidGpuMetric
             * @static
             * @param {perfetto.protos.IAndroidGpuMetric} message AndroidGpuMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidGpuMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidGpuMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidGpuMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidGpuMetric} AndroidGpuMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidGpuMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidGpuMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.processes && m.processes.length))
                            m.processes = [];
                        m.processes.push($root.perfetto.protos.AndroidGpuMetric.Process.decode(r, r.uint32()));
                        break;
                    case 2:
                        m.memMax = r.int64();
                        break;
                    case 3:
                        m.memMin = r.int64();
                        break;
                    case 4:
                        m.memAvg = r.int64();
                        break;
                    case 5:
                        if (!(m.freqMetrics && m.freqMetrics.length))
                            m.freqMetrics = [];
                        m.freqMetrics.push($root.perfetto.protos.AndroidGpuMetric.FrequencyMetric.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidGpuMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidGpuMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidGpuMetric} AndroidGpuMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidGpuMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidGpuMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidGpuMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidGpuMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.processes != null && m.hasOwnProperty("processes")) {
                    if (!Array.isArray(m.processes))
                        return "processes: array expected";
                    for (var i = 0; i < m.processes.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidGpuMetric.Process.verify(m.processes[i]);
                            if (e)
                                return "processes." + e;
                        }
                    }
                }
                if (m.memMax != null && m.hasOwnProperty("memMax")) {
                    if (!$util.isInteger(m.memMax) && !(m.memMax && $util.isInteger(m.memMax.low) && $util.isInteger(m.memMax.high)))
                        return "memMax: integer|Long expected";
                }
                if (m.memMin != null && m.hasOwnProperty("memMin")) {
                    if (!$util.isInteger(m.memMin) && !(m.memMin && $util.isInteger(m.memMin.low) && $util.isInteger(m.memMin.high)))
                        return "memMin: integer|Long expected";
                }
                if (m.memAvg != null && m.hasOwnProperty("memAvg")) {
                    if (!$util.isInteger(m.memAvg) && !(m.memAvg && $util.isInteger(m.memAvg.low) && $util.isInteger(m.memAvg.high)))
                        return "memAvg: integer|Long expected";
                }
                if (m.freqMetrics != null && m.hasOwnProperty("freqMetrics")) {
                    if (!Array.isArray(m.freqMetrics))
                        return "freqMetrics: array expected";
                    for (var i = 0; i < m.freqMetrics.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidGpuMetric.FrequencyMetric.verify(m.freqMetrics[i]);
                            if (e)
                                return "freqMetrics." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidGpuMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidGpuMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidGpuMetric} AndroidGpuMetric
             */
            AndroidGpuMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidGpuMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidGpuMetric();
                if (d.processes) {
                    if (!Array.isArray(d.processes))
                        throw TypeError(".perfetto.protos.AndroidGpuMetric.processes: array expected");
                    m.processes = [];
                    for (var i = 0; i < d.processes.length; ++i) {
                        if (typeof d.processes[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidGpuMetric.processes: object expected");
                        m.processes[i] = $root.perfetto.protos.AndroidGpuMetric.Process.fromObject(d.processes[i]);
                    }
                }
                if (d.memMax != null) {
                    if ($util.Long)
                        (m.memMax = $util.Long.fromValue(d.memMax)).unsigned = false;
                    else if (typeof d.memMax === "string")
                        m.memMax = parseInt(d.memMax, 10);
                    else if (typeof d.memMax === "number")
                        m.memMax = d.memMax;
                    else if (typeof d.memMax === "object")
                        m.memMax = new $util.LongBits(d.memMax.low >>> 0, d.memMax.high >>> 0).toNumber();
                }
                if (d.memMin != null) {
                    if ($util.Long)
                        (m.memMin = $util.Long.fromValue(d.memMin)).unsigned = false;
                    else if (typeof d.memMin === "string")
                        m.memMin = parseInt(d.memMin, 10);
                    else if (typeof d.memMin === "number")
                        m.memMin = d.memMin;
                    else if (typeof d.memMin === "object")
                        m.memMin = new $util.LongBits(d.memMin.low >>> 0, d.memMin.high >>> 0).toNumber();
                }
                if (d.memAvg != null) {
                    if ($util.Long)
                        (m.memAvg = $util.Long.fromValue(d.memAvg)).unsigned = false;
                    else if (typeof d.memAvg === "string")
                        m.memAvg = parseInt(d.memAvg, 10);
                    else if (typeof d.memAvg === "number")
                        m.memAvg = d.memAvg;
                    else if (typeof d.memAvg === "object")
                        m.memAvg = new $util.LongBits(d.memAvg.low >>> 0, d.memAvg.high >>> 0).toNumber();
                }
                if (d.freqMetrics) {
                    if (!Array.isArray(d.freqMetrics))
                        throw TypeError(".perfetto.protos.AndroidGpuMetric.freqMetrics: array expected");
                    m.freqMetrics = [];
                    for (var i = 0; i < d.freqMetrics.length; ++i) {
                        if (typeof d.freqMetrics[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidGpuMetric.freqMetrics: object expected");
                        m.freqMetrics[i] = $root.perfetto.protos.AndroidGpuMetric.FrequencyMetric.fromObject(d.freqMetrics[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidGpuMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidGpuMetric
             * @static
             * @param {perfetto.protos.AndroidGpuMetric} m AndroidGpuMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidGpuMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.processes = [];
                    d.freqMetrics = [];
                }
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.memMax = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.memMax = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.memMin = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.memMin = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.memAvg = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.memAvg = o.longs === String ? "0" : 0;
                }
                if (m.processes && m.processes.length) {
                    d.processes = [];
                    for (var j = 0; j < m.processes.length; ++j) {
                        d.processes[j] = $root.perfetto.protos.AndroidGpuMetric.Process.toObject(m.processes[j], o);
                    }
                }
                if (m.memMax != null && m.hasOwnProperty("memMax")) {
                    if (typeof m.memMax === "number")
                        d.memMax = o.longs === String ? String(m.memMax) : m.memMax;
                    else
                        d.memMax = o.longs === String ? $util.Long.prototype.toString.call(m.memMax) : o.longs === Number ? new $util.LongBits(m.memMax.low >>> 0, m.memMax.high >>> 0).toNumber() : m.memMax;
                }
                if (m.memMin != null && m.hasOwnProperty("memMin")) {
                    if (typeof m.memMin === "number")
                        d.memMin = o.longs === String ? String(m.memMin) : m.memMin;
                    else
                        d.memMin = o.longs === String ? $util.Long.prototype.toString.call(m.memMin) : o.longs === Number ? new $util.LongBits(m.memMin.low >>> 0, m.memMin.high >>> 0).toNumber() : m.memMin;
                }
                if (m.memAvg != null && m.hasOwnProperty("memAvg")) {
                    if (typeof m.memAvg === "number")
                        d.memAvg = o.longs === String ? String(m.memAvg) : m.memAvg;
                    else
                        d.memAvg = o.longs === String ? $util.Long.prototype.toString.call(m.memAvg) : o.longs === Number ? new $util.LongBits(m.memAvg.low >>> 0, m.memAvg.high >>> 0).toNumber() : m.memAvg;
                }
                if (m.freqMetrics && m.freqMetrics.length) {
                    d.freqMetrics = [];
                    for (var j = 0; j < m.freqMetrics.length; ++j) {
                        d.freqMetrics[j] = $root.perfetto.protos.AndroidGpuMetric.FrequencyMetric.toObject(m.freqMetrics[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidGpuMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidGpuMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidGpuMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidGpuMetric.Process = (function() {

                /**
                 * Properties of a Process.
                 * @memberof perfetto.protos.AndroidGpuMetric
                 * @interface IProcess
                 * @property {string|null} [name] Process name
                 * @property {number|null} [memMax] Process memMax
                 * @property {number|null} [memMin] Process memMin
                 * @property {number|null} [memAvg] Process memAvg
                 */

                /**
                 * Constructs a new Process.
                 * @memberof perfetto.protos.AndroidGpuMetric
                 * @classdesc Represents a Process.
                 * @implements IProcess
                 * @constructor
                 * @param {perfetto.protos.AndroidGpuMetric.IProcess=} [p] Properties to set
                 */
                function Process(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Process name.
                 * @member {string} name
                 * @memberof perfetto.protos.AndroidGpuMetric.Process
                 * @instance
                 */
                Process.prototype.name = "";

                /**
                 * Process memMax.
                 * @member {number} memMax
                 * @memberof perfetto.protos.AndroidGpuMetric.Process
                 * @instance
                 */
                Process.prototype.memMax = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Process memMin.
                 * @member {number} memMin
                 * @memberof perfetto.protos.AndroidGpuMetric.Process
                 * @instance
                 */
                Process.prototype.memMin = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Process memAvg.
                 * @member {number} memAvg
                 * @memberof perfetto.protos.AndroidGpuMetric.Process
                 * @instance
                 */
                Process.prototype.memAvg = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new Process instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidGpuMetric.Process
                 * @static
                 * @param {perfetto.protos.AndroidGpuMetric.IProcess=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidGpuMetric.Process} Process instance
                 */
                Process.create = function create(properties) {
                    return new Process(properties);
                };

                /**
                 * Encodes the specified Process message. Does not implicitly {@link perfetto.protos.AndroidGpuMetric.Process.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidGpuMetric.Process
                 * @static
                 * @param {perfetto.protos.AndroidGpuMetric.IProcess} m Process message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Process.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(10).string(m.name);
                    if (m.memMax != null && Object.hasOwnProperty.call(m, "memMax"))
                        w.uint32(16).int64(m.memMax);
                    if (m.memMin != null && Object.hasOwnProperty.call(m, "memMin"))
                        w.uint32(24).int64(m.memMin);
                    if (m.memAvg != null && Object.hasOwnProperty.call(m, "memAvg"))
                        w.uint32(32).int64(m.memAvg);
                    return w;
                };

                /**
                 * Encodes the specified Process message, length delimited. Does not implicitly {@link perfetto.protos.AndroidGpuMetric.Process.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidGpuMetric.Process
                 * @static
                 * @param {perfetto.protos.AndroidGpuMetric.IProcess} message Process message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Process.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Process message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidGpuMetric.Process
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidGpuMetric.Process} Process
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Process.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidGpuMetric.Process();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.name = r.string();
                            break;
                        case 2:
                            m.memMax = r.int64();
                            break;
                        case 3:
                            m.memMin = r.int64();
                            break;
                        case 4:
                            m.memAvg = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Process message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidGpuMetric.Process
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidGpuMetric.Process} Process
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Process.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Process message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidGpuMetric.Process
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Process.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    if (m.memMax != null && m.hasOwnProperty("memMax")) {
                        if (!$util.isInteger(m.memMax) && !(m.memMax && $util.isInteger(m.memMax.low) && $util.isInteger(m.memMax.high)))
                            return "memMax: integer|Long expected";
                    }
                    if (m.memMin != null && m.hasOwnProperty("memMin")) {
                        if (!$util.isInteger(m.memMin) && !(m.memMin && $util.isInteger(m.memMin.low) && $util.isInteger(m.memMin.high)))
                            return "memMin: integer|Long expected";
                    }
                    if (m.memAvg != null && m.hasOwnProperty("memAvg")) {
                        if (!$util.isInteger(m.memAvg) && !(m.memAvg && $util.isInteger(m.memAvg.low) && $util.isInteger(m.memAvg.high)))
                            return "memAvg: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a Process message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidGpuMetric.Process
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidGpuMetric.Process} Process
                 */
                Process.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidGpuMetric.Process)
                        return d;
                    var m = new $root.perfetto.protos.AndroidGpuMetric.Process();
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    if (d.memMax != null) {
                        if ($util.Long)
                            (m.memMax = $util.Long.fromValue(d.memMax)).unsigned = false;
                        else if (typeof d.memMax === "string")
                            m.memMax = parseInt(d.memMax, 10);
                        else if (typeof d.memMax === "number")
                            m.memMax = d.memMax;
                        else if (typeof d.memMax === "object")
                            m.memMax = new $util.LongBits(d.memMax.low >>> 0, d.memMax.high >>> 0).toNumber();
                    }
                    if (d.memMin != null) {
                        if ($util.Long)
                            (m.memMin = $util.Long.fromValue(d.memMin)).unsigned = false;
                        else if (typeof d.memMin === "string")
                            m.memMin = parseInt(d.memMin, 10);
                        else if (typeof d.memMin === "number")
                            m.memMin = d.memMin;
                        else if (typeof d.memMin === "object")
                            m.memMin = new $util.LongBits(d.memMin.low >>> 0, d.memMin.high >>> 0).toNumber();
                    }
                    if (d.memAvg != null) {
                        if ($util.Long)
                            (m.memAvg = $util.Long.fromValue(d.memAvg)).unsigned = false;
                        else if (typeof d.memAvg === "string")
                            m.memAvg = parseInt(d.memAvg, 10);
                        else if (typeof d.memAvg === "number")
                            m.memAvg = d.memAvg;
                        else if (typeof d.memAvg === "object")
                            m.memAvg = new $util.LongBits(d.memAvg.low >>> 0, d.memAvg.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Process message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidGpuMetric.Process
                 * @static
                 * @param {perfetto.protos.AndroidGpuMetric.Process} m Process
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Process.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.name = "";
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.memMax = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.memMax = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.memMin = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.memMin = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.memAvg = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.memAvg = o.longs === String ? "0" : 0;
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    if (m.memMax != null && m.hasOwnProperty("memMax")) {
                        if (typeof m.memMax === "number")
                            d.memMax = o.longs === String ? String(m.memMax) : m.memMax;
                        else
                            d.memMax = o.longs === String ? $util.Long.prototype.toString.call(m.memMax) : o.longs === Number ? new $util.LongBits(m.memMax.low >>> 0, m.memMax.high >>> 0).toNumber() : m.memMax;
                    }
                    if (m.memMin != null && m.hasOwnProperty("memMin")) {
                        if (typeof m.memMin === "number")
                            d.memMin = o.longs === String ? String(m.memMin) : m.memMin;
                        else
                            d.memMin = o.longs === String ? $util.Long.prototype.toString.call(m.memMin) : o.longs === Number ? new $util.LongBits(m.memMin.low >>> 0, m.memMin.high >>> 0).toNumber() : m.memMin;
                    }
                    if (m.memAvg != null && m.hasOwnProperty("memAvg")) {
                        if (typeof m.memAvg === "number")
                            d.memAvg = o.longs === String ? String(m.memAvg) : m.memAvg;
                        else
                            d.memAvg = o.longs === String ? $util.Long.prototype.toString.call(m.memAvg) : o.longs === Number ? new $util.LongBits(m.memAvg.low >>> 0, m.memAvg.high >>> 0).toNumber() : m.memAvg;
                    }
                    return d;
                };

                /**
                 * Converts this Process to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidGpuMetric.Process
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Process.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Process;
            })();

            AndroidGpuMetric.FrequencyMetric = (function() {

                /**
                 * Properties of a FrequencyMetric.
                 * @memberof perfetto.protos.AndroidGpuMetric
                 * @interface IFrequencyMetric
                 * @property {number|null} [gpuId] FrequencyMetric gpuId
                 * @property {number|null} [freqMax] FrequencyMetric freqMax
                 * @property {number|null} [freqMin] FrequencyMetric freqMin
                 * @property {number|null} [freqAvg] FrequencyMetric freqAvg
                 * @property {Array.<perfetto.protos.AndroidGpuMetric.FrequencyMetric.IMetricsPerFrequency>|null} [usedFreqs] FrequencyMetric usedFreqs
                 */

                /**
                 * Constructs a new FrequencyMetric.
                 * @memberof perfetto.protos.AndroidGpuMetric
                 * @classdesc Represents a FrequencyMetric.
                 * @implements IFrequencyMetric
                 * @constructor
                 * @param {perfetto.protos.AndroidGpuMetric.IFrequencyMetric=} [p] Properties to set
                 */
                function FrequencyMetric(p) {
                    this.usedFreqs = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * FrequencyMetric gpuId.
                 * @member {number} gpuId
                 * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric
                 * @instance
                 */
                FrequencyMetric.prototype.gpuId = 0;

                /**
                 * FrequencyMetric freqMax.
                 * @member {number} freqMax
                 * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric
                 * @instance
                 */
                FrequencyMetric.prototype.freqMax = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * FrequencyMetric freqMin.
                 * @member {number} freqMin
                 * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric
                 * @instance
                 */
                FrequencyMetric.prototype.freqMin = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * FrequencyMetric freqAvg.
                 * @member {number} freqAvg
                 * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric
                 * @instance
                 */
                FrequencyMetric.prototype.freqAvg = 0;

                /**
                 * FrequencyMetric usedFreqs.
                 * @member {Array.<perfetto.protos.AndroidGpuMetric.FrequencyMetric.IMetricsPerFrequency>} usedFreqs
                 * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric
                 * @instance
                 */
                FrequencyMetric.prototype.usedFreqs = $util.emptyArray;

                /**
                 * Creates a new FrequencyMetric instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric
                 * @static
                 * @param {perfetto.protos.AndroidGpuMetric.IFrequencyMetric=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidGpuMetric.FrequencyMetric} FrequencyMetric instance
                 */
                FrequencyMetric.create = function create(properties) {
                    return new FrequencyMetric(properties);
                };

                /**
                 * Encodes the specified FrequencyMetric message. Does not implicitly {@link perfetto.protos.AndroidGpuMetric.FrequencyMetric.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric
                 * @static
                 * @param {perfetto.protos.AndroidGpuMetric.IFrequencyMetric} m FrequencyMetric message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FrequencyMetric.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.gpuId != null && Object.hasOwnProperty.call(m, "gpuId"))
                        w.uint32(8).uint32(m.gpuId);
                    if (m.freqMax != null && Object.hasOwnProperty.call(m, "freqMax"))
                        w.uint32(16).int64(m.freqMax);
                    if (m.freqMin != null && Object.hasOwnProperty.call(m, "freqMin"))
                        w.uint32(24).int64(m.freqMin);
                    if (m.freqAvg != null && Object.hasOwnProperty.call(m, "freqAvg"))
                        w.uint32(33).double(m.freqAvg);
                    if (m.usedFreqs != null && m.usedFreqs.length) {
                        for (var i = 0; i < m.usedFreqs.length; ++i)
                            $root.perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency.encode(m.usedFreqs[i], w.uint32(42).fork()).ldelim();
                    }
                    return w;
                };

                /**
                 * Encodes the specified FrequencyMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidGpuMetric.FrequencyMetric.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric
                 * @static
                 * @param {perfetto.protos.AndroidGpuMetric.IFrequencyMetric} message FrequencyMetric message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FrequencyMetric.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a FrequencyMetric message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidGpuMetric.FrequencyMetric} FrequencyMetric
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FrequencyMetric.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidGpuMetric.FrequencyMetric();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.gpuId = r.uint32();
                            break;
                        case 2:
                            m.freqMax = r.int64();
                            break;
                        case 3:
                            m.freqMin = r.int64();
                            break;
                        case 4:
                            m.freqAvg = r.double();
                            break;
                        case 5:
                            if (!(m.usedFreqs && m.usedFreqs.length))
                                m.usedFreqs = [];
                            m.usedFreqs.push($root.perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a FrequencyMetric message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidGpuMetric.FrequencyMetric} FrequencyMetric
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FrequencyMetric.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a FrequencyMetric message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                FrequencyMetric.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.gpuId != null && m.hasOwnProperty("gpuId")) {
                        if (!$util.isInteger(m.gpuId))
                            return "gpuId: integer expected";
                    }
                    if (m.freqMax != null && m.hasOwnProperty("freqMax")) {
                        if (!$util.isInteger(m.freqMax) && !(m.freqMax && $util.isInteger(m.freqMax.low) && $util.isInteger(m.freqMax.high)))
                            return "freqMax: integer|Long expected";
                    }
                    if (m.freqMin != null && m.hasOwnProperty("freqMin")) {
                        if (!$util.isInteger(m.freqMin) && !(m.freqMin && $util.isInteger(m.freqMin.low) && $util.isInteger(m.freqMin.high)))
                            return "freqMin: integer|Long expected";
                    }
                    if (m.freqAvg != null && m.hasOwnProperty("freqAvg")) {
                        if (typeof m.freqAvg !== "number")
                            return "freqAvg: number expected";
                    }
                    if (m.usedFreqs != null && m.hasOwnProperty("usedFreqs")) {
                        if (!Array.isArray(m.usedFreqs))
                            return "usedFreqs: array expected";
                        for (var i = 0; i < m.usedFreqs.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency.verify(m.usedFreqs[i]);
                                if (e)
                                    return "usedFreqs." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates a FrequencyMetric message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidGpuMetric.FrequencyMetric} FrequencyMetric
                 */
                FrequencyMetric.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidGpuMetric.FrequencyMetric)
                        return d;
                    var m = new $root.perfetto.protos.AndroidGpuMetric.FrequencyMetric();
                    if (d.gpuId != null) {
                        m.gpuId = d.gpuId >>> 0;
                    }
                    if (d.freqMax != null) {
                        if ($util.Long)
                            (m.freqMax = $util.Long.fromValue(d.freqMax)).unsigned = false;
                        else if (typeof d.freqMax === "string")
                            m.freqMax = parseInt(d.freqMax, 10);
                        else if (typeof d.freqMax === "number")
                            m.freqMax = d.freqMax;
                        else if (typeof d.freqMax === "object")
                            m.freqMax = new $util.LongBits(d.freqMax.low >>> 0, d.freqMax.high >>> 0).toNumber();
                    }
                    if (d.freqMin != null) {
                        if ($util.Long)
                            (m.freqMin = $util.Long.fromValue(d.freqMin)).unsigned = false;
                        else if (typeof d.freqMin === "string")
                            m.freqMin = parseInt(d.freqMin, 10);
                        else if (typeof d.freqMin === "number")
                            m.freqMin = d.freqMin;
                        else if (typeof d.freqMin === "object")
                            m.freqMin = new $util.LongBits(d.freqMin.low >>> 0, d.freqMin.high >>> 0).toNumber();
                    }
                    if (d.freqAvg != null) {
                        m.freqAvg = Number(d.freqAvg);
                    }
                    if (d.usedFreqs) {
                        if (!Array.isArray(d.usedFreqs))
                            throw TypeError(".perfetto.protos.AndroidGpuMetric.FrequencyMetric.usedFreqs: array expected");
                        m.usedFreqs = [];
                        for (var i = 0; i < d.usedFreqs.length; ++i) {
                            if (typeof d.usedFreqs[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidGpuMetric.FrequencyMetric.usedFreqs: object expected");
                            m.usedFreqs[i] = $root.perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency.fromObject(d.usedFreqs[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a FrequencyMetric message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric
                 * @static
                 * @param {perfetto.protos.AndroidGpuMetric.FrequencyMetric} m FrequencyMetric
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                FrequencyMetric.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.usedFreqs = [];
                    }
                    if (o.defaults) {
                        d.gpuId = 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.freqMax = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.freqMax = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.freqMin = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.freqMin = o.longs === String ? "0" : 0;
                        d.freqAvg = 0;
                    }
                    if (m.gpuId != null && m.hasOwnProperty("gpuId")) {
                        d.gpuId = m.gpuId;
                    }
                    if (m.freqMax != null && m.hasOwnProperty("freqMax")) {
                        if (typeof m.freqMax === "number")
                            d.freqMax = o.longs === String ? String(m.freqMax) : m.freqMax;
                        else
                            d.freqMax = o.longs === String ? $util.Long.prototype.toString.call(m.freqMax) : o.longs === Number ? new $util.LongBits(m.freqMax.low >>> 0, m.freqMax.high >>> 0).toNumber() : m.freqMax;
                    }
                    if (m.freqMin != null && m.hasOwnProperty("freqMin")) {
                        if (typeof m.freqMin === "number")
                            d.freqMin = o.longs === String ? String(m.freqMin) : m.freqMin;
                        else
                            d.freqMin = o.longs === String ? $util.Long.prototype.toString.call(m.freqMin) : o.longs === Number ? new $util.LongBits(m.freqMin.low >>> 0, m.freqMin.high >>> 0).toNumber() : m.freqMin;
                    }
                    if (m.freqAvg != null && m.hasOwnProperty("freqAvg")) {
                        d.freqAvg = o.json && !isFinite(m.freqAvg) ? String(m.freqAvg) : m.freqAvg;
                    }
                    if (m.usedFreqs && m.usedFreqs.length) {
                        d.usedFreqs = [];
                        for (var j = 0; j < m.usedFreqs.length; ++j) {
                            d.usedFreqs[j] = $root.perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency.toObject(m.usedFreqs[j], o);
                        }
                    }
                    return d;
                };

                /**
                 * Converts this FrequencyMetric to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                FrequencyMetric.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                FrequencyMetric.MetricsPerFrequency = (function() {

                    /**
                     * Properties of a MetricsPerFrequency.
                     * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric
                     * @interface IMetricsPerFrequency
                     * @property {number|null} [freq] MetricsPerFrequency freq
                     * @property {number|null} [durMs] MetricsPerFrequency durMs
                     * @property {number|null} [percentage] MetricsPerFrequency percentage
                     */

                    /**
                     * Constructs a new MetricsPerFrequency.
                     * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric
                     * @classdesc Represents a MetricsPerFrequency.
                     * @implements IMetricsPerFrequency
                     * @constructor
                     * @param {perfetto.protos.AndroidGpuMetric.FrequencyMetric.IMetricsPerFrequency=} [p] Properties to set
                     */
                    function MetricsPerFrequency(p) {
                        if (p)
                            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                                if (p[ks[i]] != null)
                                    this[ks[i]] = p[ks[i]];
                    }

                    /**
                     * MetricsPerFrequency freq.
                     * @member {number} freq
                     * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency
                     * @instance
                     */
                    MetricsPerFrequency.prototype.freq = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                    /**
                     * MetricsPerFrequency durMs.
                     * @member {number} durMs
                     * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency
                     * @instance
                     */
                    MetricsPerFrequency.prototype.durMs = 0;

                    /**
                     * MetricsPerFrequency percentage.
                     * @member {number} percentage
                     * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency
                     * @instance
                     */
                    MetricsPerFrequency.prototype.percentage = 0;

                    /**
                     * Creates a new MetricsPerFrequency instance using the specified properties.
                     * @function create
                     * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency
                     * @static
                     * @param {perfetto.protos.AndroidGpuMetric.FrequencyMetric.IMetricsPerFrequency=} [properties] Properties to set
                     * @returns {perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency} MetricsPerFrequency instance
                     */
                    MetricsPerFrequency.create = function create(properties) {
                        return new MetricsPerFrequency(properties);
                    };

                    /**
                     * Encodes the specified MetricsPerFrequency message. Does not implicitly {@link perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency.verify|verify} messages.
                     * @function encode
                     * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency
                     * @static
                     * @param {perfetto.protos.AndroidGpuMetric.FrequencyMetric.IMetricsPerFrequency} m MetricsPerFrequency message or plain object to encode
                     * @param {$protobuf.Writer} [w] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    MetricsPerFrequency.encode = function encode(m, w) {
                        if (!w)
                            w = $Writer.create();
                        if (m.freq != null && Object.hasOwnProperty.call(m, "freq"))
                            w.uint32(8).int64(m.freq);
                        if (m.durMs != null && Object.hasOwnProperty.call(m, "durMs"))
                            w.uint32(17).double(m.durMs);
                        if (m.percentage != null && Object.hasOwnProperty.call(m, "percentage"))
                            w.uint32(25).double(m.percentage);
                        return w;
                    };

                    /**
                     * Encodes the specified MetricsPerFrequency message, length delimited. Does not implicitly {@link perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency
                     * @static
                     * @param {perfetto.protos.AndroidGpuMetric.FrequencyMetric.IMetricsPerFrequency} message MetricsPerFrequency message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    MetricsPerFrequency.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a MetricsPerFrequency message from the specified reader or buffer.
                     * @function decode
                     * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                     * @param {number} [l] Message length if known beforehand
                     * @returns {perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency} MetricsPerFrequency
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    MetricsPerFrequency.decode = function decode(r, l) {
                        if (!(r instanceof $Reader))
                            r = $Reader.create(r);
                        var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency();
                        while (r.pos < c) {
                            var t = r.uint32();
                            switch (t >>> 3) {
                            case 1:
                                m.freq = r.int64();
                                break;
                            case 2:
                                m.durMs = r.double();
                                break;
                            case 3:
                                m.percentage = r.double();
                                break;
                            default:
                                r.skipType(t & 7);
                                break;
                            }
                        }
                        return m;
                    };

                    /**
                     * Decodes a MetricsPerFrequency message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency} MetricsPerFrequency
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    MetricsPerFrequency.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a MetricsPerFrequency message.
                     * @function verify
                     * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency
                     * @static
                     * @param {Object.<string,*>} m Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    MetricsPerFrequency.verify = function verify(m) {
                        if (typeof m !== "object" || m === null)
                            return "object expected";
                        if (m.freq != null && m.hasOwnProperty("freq")) {
                            if (!$util.isInteger(m.freq) && !(m.freq && $util.isInteger(m.freq.low) && $util.isInteger(m.freq.high)))
                                return "freq: integer|Long expected";
                        }
                        if (m.durMs != null && m.hasOwnProperty("durMs")) {
                            if (typeof m.durMs !== "number")
                                return "durMs: number expected";
                        }
                        if (m.percentage != null && m.hasOwnProperty("percentage")) {
                            if (typeof m.percentage !== "number")
                                return "percentage: number expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a MetricsPerFrequency message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency
                     * @static
                     * @param {Object.<string,*>} d Plain object
                     * @returns {perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency} MetricsPerFrequency
                     */
                    MetricsPerFrequency.fromObject = function fromObject(d) {
                        if (d instanceof $root.perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency)
                            return d;
                        var m = new $root.perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency();
                        if (d.freq != null) {
                            if ($util.Long)
                                (m.freq = $util.Long.fromValue(d.freq)).unsigned = false;
                            else if (typeof d.freq === "string")
                                m.freq = parseInt(d.freq, 10);
                            else if (typeof d.freq === "number")
                                m.freq = d.freq;
                            else if (typeof d.freq === "object")
                                m.freq = new $util.LongBits(d.freq.low >>> 0, d.freq.high >>> 0).toNumber();
                        }
                        if (d.durMs != null) {
                            m.durMs = Number(d.durMs);
                        }
                        if (d.percentage != null) {
                            m.percentage = Number(d.percentage);
                        }
                        return m;
                    };

                    /**
                     * Creates a plain object from a MetricsPerFrequency message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency
                     * @static
                     * @param {perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency} m MetricsPerFrequency
                     * @param {$protobuf.IConversionOptions} [o] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    MetricsPerFrequency.toObject = function toObject(m, o) {
                        if (!o)
                            o = {};
                        var d = {};
                        if (o.defaults) {
                            if ($util.Long) {
                                var n = new $util.Long(0, 0, false);
                                d.freq = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                            } else
                                d.freq = o.longs === String ? "0" : 0;
                            d.durMs = 0;
                            d.percentage = 0;
                        }
                        if (m.freq != null && m.hasOwnProperty("freq")) {
                            if (typeof m.freq === "number")
                                d.freq = o.longs === String ? String(m.freq) : m.freq;
                            else
                                d.freq = o.longs === String ? $util.Long.prototype.toString.call(m.freq) : o.longs === Number ? new $util.LongBits(m.freq.low >>> 0, m.freq.high >>> 0).toNumber() : m.freq;
                        }
                        if (m.durMs != null && m.hasOwnProperty("durMs")) {
                            d.durMs = o.json && !isFinite(m.durMs) ? String(m.durMs) : m.durMs;
                        }
                        if (m.percentage != null && m.hasOwnProperty("percentage")) {
                            d.percentage = o.json && !isFinite(m.percentage) ? String(m.percentage) : m.percentage;
                        }
                        return d;
                    };

                    /**
                     * Converts this MetricsPerFrequency to JSON.
                     * @function toJSON
                     * @memberof perfetto.protos.AndroidGpuMetric.FrequencyMetric.MetricsPerFrequency
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    MetricsPerFrequency.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                    };

                    return MetricsPerFrequency;
                })();

                return FrequencyMetric;
            })();

            return AndroidGpuMetric;
        })();

        protos.AndroidHwcomposerMetrics = (function() {

            /**
             * Properties of an AndroidHwcomposerMetrics.
             * @memberof perfetto.protos
             * @interface IAndroidHwcomposerMetrics
             * @property {number|null} [compositionTotalLayers] AndroidHwcomposerMetrics compositionTotalLayers
             * @property {number|null} [compositionDpuLayers] AndroidHwcomposerMetrics compositionDpuLayers
             * @property {number|null} [compositionGpuLayers] AndroidHwcomposerMetrics compositionGpuLayers
             * @property {number|null} [compositionDpuCachedLayers] AndroidHwcomposerMetrics compositionDpuCachedLayers
             * @property {number|null} [compositionSfCachedLayers] AndroidHwcomposerMetrics compositionSfCachedLayers
             * @property {number|null} [skippedValidationCount] AndroidHwcomposerMetrics skippedValidationCount
             * @property {number|null} [unskippedValidationCount] AndroidHwcomposerMetrics unskippedValidationCount
             * @property {number|null} [separatedValidationCount] AndroidHwcomposerMetrics separatedValidationCount
             * @property {number|null} [unknownValidationCount] AndroidHwcomposerMetrics unknownValidationCount
             * @property {number|null} [avgAllExecutionTimeMs] AndroidHwcomposerMetrics avgAllExecutionTimeMs
             * @property {number|null} [avgSkippedExecutionTimeMs] AndroidHwcomposerMetrics avgSkippedExecutionTimeMs
             * @property {number|null} [avgUnskippedExecutionTimeMs] AndroidHwcomposerMetrics avgUnskippedExecutionTimeMs
             * @property {number|null} [avgSeparatedExecutionTimeMs] AndroidHwcomposerMetrics avgSeparatedExecutionTimeMs
             * @property {Array.<perfetto.protos.AndroidHwcomposerMetrics.IDpuVoteMetrics>|null} [dpuVoteMetrics] AndroidHwcomposerMetrics dpuVoteMetrics
             */

            /**
             * Constructs a new AndroidHwcomposerMetrics.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidHwcomposerMetrics.
             * @implements IAndroidHwcomposerMetrics
             * @constructor
             * @param {perfetto.protos.IAndroidHwcomposerMetrics=} [p] Properties to set
             */
            function AndroidHwcomposerMetrics(p) {
                this.dpuVoteMetrics = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidHwcomposerMetrics compositionTotalLayers.
             * @member {number} compositionTotalLayers
             * @memberof perfetto.protos.AndroidHwcomposerMetrics
             * @instance
             */
            AndroidHwcomposerMetrics.prototype.compositionTotalLayers = 0;

            /**
             * AndroidHwcomposerMetrics compositionDpuLayers.
             * @member {number} compositionDpuLayers
             * @memberof perfetto.protos.AndroidHwcomposerMetrics
             * @instance
             */
            AndroidHwcomposerMetrics.prototype.compositionDpuLayers = 0;

            /**
             * AndroidHwcomposerMetrics compositionGpuLayers.
             * @member {number} compositionGpuLayers
             * @memberof perfetto.protos.AndroidHwcomposerMetrics
             * @instance
             */
            AndroidHwcomposerMetrics.prototype.compositionGpuLayers = 0;

            /**
             * AndroidHwcomposerMetrics compositionDpuCachedLayers.
             * @member {number} compositionDpuCachedLayers
             * @memberof perfetto.protos.AndroidHwcomposerMetrics
             * @instance
             */
            AndroidHwcomposerMetrics.prototype.compositionDpuCachedLayers = 0;

            /**
             * AndroidHwcomposerMetrics compositionSfCachedLayers.
             * @member {number} compositionSfCachedLayers
             * @memberof perfetto.protos.AndroidHwcomposerMetrics
             * @instance
             */
            AndroidHwcomposerMetrics.prototype.compositionSfCachedLayers = 0;

            /**
             * AndroidHwcomposerMetrics skippedValidationCount.
             * @member {number} skippedValidationCount
             * @memberof perfetto.protos.AndroidHwcomposerMetrics
             * @instance
             */
            AndroidHwcomposerMetrics.prototype.skippedValidationCount = 0;

            /**
             * AndroidHwcomposerMetrics unskippedValidationCount.
             * @member {number} unskippedValidationCount
             * @memberof perfetto.protos.AndroidHwcomposerMetrics
             * @instance
             */
            AndroidHwcomposerMetrics.prototype.unskippedValidationCount = 0;

            /**
             * AndroidHwcomposerMetrics separatedValidationCount.
             * @member {number} separatedValidationCount
             * @memberof perfetto.protos.AndroidHwcomposerMetrics
             * @instance
             */
            AndroidHwcomposerMetrics.prototype.separatedValidationCount = 0;

            /**
             * AndroidHwcomposerMetrics unknownValidationCount.
             * @member {number} unknownValidationCount
             * @memberof perfetto.protos.AndroidHwcomposerMetrics
             * @instance
             */
            AndroidHwcomposerMetrics.prototype.unknownValidationCount = 0;

            /**
             * AndroidHwcomposerMetrics avgAllExecutionTimeMs.
             * @member {number} avgAllExecutionTimeMs
             * @memberof perfetto.protos.AndroidHwcomposerMetrics
             * @instance
             */
            AndroidHwcomposerMetrics.prototype.avgAllExecutionTimeMs = 0;

            /**
             * AndroidHwcomposerMetrics avgSkippedExecutionTimeMs.
             * @member {number} avgSkippedExecutionTimeMs
             * @memberof perfetto.protos.AndroidHwcomposerMetrics
             * @instance
             */
            AndroidHwcomposerMetrics.prototype.avgSkippedExecutionTimeMs = 0;

            /**
             * AndroidHwcomposerMetrics avgUnskippedExecutionTimeMs.
             * @member {number} avgUnskippedExecutionTimeMs
             * @memberof perfetto.protos.AndroidHwcomposerMetrics
             * @instance
             */
            AndroidHwcomposerMetrics.prototype.avgUnskippedExecutionTimeMs = 0;

            /**
             * AndroidHwcomposerMetrics avgSeparatedExecutionTimeMs.
             * @member {number} avgSeparatedExecutionTimeMs
             * @memberof perfetto.protos.AndroidHwcomposerMetrics
             * @instance
             */
            AndroidHwcomposerMetrics.prototype.avgSeparatedExecutionTimeMs = 0;

            /**
             * AndroidHwcomposerMetrics dpuVoteMetrics.
             * @member {Array.<perfetto.protos.AndroidHwcomposerMetrics.IDpuVoteMetrics>} dpuVoteMetrics
             * @memberof perfetto.protos.AndroidHwcomposerMetrics
             * @instance
             */
            AndroidHwcomposerMetrics.prototype.dpuVoteMetrics = $util.emptyArray;

            /**
             * Creates a new AndroidHwcomposerMetrics instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidHwcomposerMetrics
             * @static
             * @param {perfetto.protos.IAndroidHwcomposerMetrics=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidHwcomposerMetrics} AndroidHwcomposerMetrics instance
             */
            AndroidHwcomposerMetrics.create = function create(properties) {
                return new AndroidHwcomposerMetrics(properties);
            };

            /**
             * Encodes the specified AndroidHwcomposerMetrics message. Does not implicitly {@link perfetto.protos.AndroidHwcomposerMetrics.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidHwcomposerMetrics
             * @static
             * @param {perfetto.protos.IAndroidHwcomposerMetrics} m AndroidHwcomposerMetrics message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidHwcomposerMetrics.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.compositionTotalLayers != null && Object.hasOwnProperty.call(m, "compositionTotalLayers"))
                    w.uint32(9).double(m.compositionTotalLayers);
                if (m.compositionDpuLayers != null && Object.hasOwnProperty.call(m, "compositionDpuLayers"))
                    w.uint32(17).double(m.compositionDpuLayers);
                if (m.compositionGpuLayers != null && Object.hasOwnProperty.call(m, "compositionGpuLayers"))
                    w.uint32(25).double(m.compositionGpuLayers);
                if (m.compositionDpuCachedLayers != null && Object.hasOwnProperty.call(m, "compositionDpuCachedLayers"))
                    w.uint32(33).double(m.compositionDpuCachedLayers);
                if (m.compositionSfCachedLayers != null && Object.hasOwnProperty.call(m, "compositionSfCachedLayers"))
                    w.uint32(41).double(m.compositionSfCachedLayers);
                if (m.skippedValidationCount != null && Object.hasOwnProperty.call(m, "skippedValidationCount"))
                    w.uint32(48).int32(m.skippedValidationCount);
                if (m.unskippedValidationCount != null && Object.hasOwnProperty.call(m, "unskippedValidationCount"))
                    w.uint32(56).int32(m.unskippedValidationCount);
                if (m.separatedValidationCount != null && Object.hasOwnProperty.call(m, "separatedValidationCount"))
                    w.uint32(64).int32(m.separatedValidationCount);
                if (m.unknownValidationCount != null && Object.hasOwnProperty.call(m, "unknownValidationCount"))
                    w.uint32(72).int32(m.unknownValidationCount);
                if (m.avgAllExecutionTimeMs != null && Object.hasOwnProperty.call(m, "avgAllExecutionTimeMs"))
                    w.uint32(81).double(m.avgAllExecutionTimeMs);
                if (m.avgSkippedExecutionTimeMs != null && Object.hasOwnProperty.call(m, "avgSkippedExecutionTimeMs"))
                    w.uint32(89).double(m.avgSkippedExecutionTimeMs);
                if (m.avgUnskippedExecutionTimeMs != null && Object.hasOwnProperty.call(m, "avgUnskippedExecutionTimeMs"))
                    w.uint32(97).double(m.avgUnskippedExecutionTimeMs);
                if (m.avgSeparatedExecutionTimeMs != null && Object.hasOwnProperty.call(m, "avgSeparatedExecutionTimeMs"))
                    w.uint32(105).double(m.avgSeparatedExecutionTimeMs);
                if (m.dpuVoteMetrics != null && m.dpuVoteMetrics.length) {
                    for (var i = 0; i < m.dpuVoteMetrics.length; ++i)
                        $root.perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics.encode(m.dpuVoteMetrics[i], w.uint32(114).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified AndroidHwcomposerMetrics message, length delimited. Does not implicitly {@link perfetto.protos.AndroidHwcomposerMetrics.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidHwcomposerMetrics
             * @static
             * @param {perfetto.protos.IAndroidHwcomposerMetrics} message AndroidHwcomposerMetrics message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidHwcomposerMetrics.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidHwcomposerMetrics message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidHwcomposerMetrics
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidHwcomposerMetrics} AndroidHwcomposerMetrics
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidHwcomposerMetrics.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidHwcomposerMetrics();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.compositionTotalLayers = r.double();
                        break;
                    case 2:
                        m.compositionDpuLayers = r.double();
                        break;
                    case 3:
                        m.compositionGpuLayers = r.double();
                        break;
                    case 4:
                        m.compositionDpuCachedLayers = r.double();
                        break;
                    case 5:
                        m.compositionSfCachedLayers = r.double();
                        break;
                    case 6:
                        m.skippedValidationCount = r.int32();
                        break;
                    case 7:
                        m.unskippedValidationCount = r.int32();
                        break;
                    case 8:
                        m.separatedValidationCount = r.int32();
                        break;
                    case 9:
                        m.unknownValidationCount = r.int32();
                        break;
                    case 10:
                        m.avgAllExecutionTimeMs = r.double();
                        break;
                    case 11:
                        m.avgSkippedExecutionTimeMs = r.double();
                        break;
                    case 12:
                        m.avgUnskippedExecutionTimeMs = r.double();
                        break;
                    case 13:
                        m.avgSeparatedExecutionTimeMs = r.double();
                        break;
                    case 14:
                        if (!(m.dpuVoteMetrics && m.dpuVoteMetrics.length))
                            m.dpuVoteMetrics = [];
                        m.dpuVoteMetrics.push($root.perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidHwcomposerMetrics message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidHwcomposerMetrics
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidHwcomposerMetrics} AndroidHwcomposerMetrics
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidHwcomposerMetrics.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidHwcomposerMetrics message.
             * @function verify
             * @memberof perfetto.protos.AndroidHwcomposerMetrics
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidHwcomposerMetrics.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.compositionTotalLayers != null && m.hasOwnProperty("compositionTotalLayers")) {
                    if (typeof m.compositionTotalLayers !== "number")
                        return "compositionTotalLayers: number expected";
                }
                if (m.compositionDpuLayers != null && m.hasOwnProperty("compositionDpuLayers")) {
                    if (typeof m.compositionDpuLayers !== "number")
                        return "compositionDpuLayers: number expected";
                }
                if (m.compositionGpuLayers != null && m.hasOwnProperty("compositionGpuLayers")) {
                    if (typeof m.compositionGpuLayers !== "number")
                        return "compositionGpuLayers: number expected";
                }
                if (m.compositionDpuCachedLayers != null && m.hasOwnProperty("compositionDpuCachedLayers")) {
                    if (typeof m.compositionDpuCachedLayers !== "number")
                        return "compositionDpuCachedLayers: number expected";
                }
                if (m.compositionSfCachedLayers != null && m.hasOwnProperty("compositionSfCachedLayers")) {
                    if (typeof m.compositionSfCachedLayers !== "number")
                        return "compositionSfCachedLayers: number expected";
                }
                if (m.skippedValidationCount != null && m.hasOwnProperty("skippedValidationCount")) {
                    if (!$util.isInteger(m.skippedValidationCount))
                        return "skippedValidationCount: integer expected";
                }
                if (m.unskippedValidationCount != null && m.hasOwnProperty("unskippedValidationCount")) {
                    if (!$util.isInteger(m.unskippedValidationCount))
                        return "unskippedValidationCount: integer expected";
                }
                if (m.separatedValidationCount != null && m.hasOwnProperty("separatedValidationCount")) {
                    if (!$util.isInteger(m.separatedValidationCount))
                        return "separatedValidationCount: integer expected";
                }
                if (m.unknownValidationCount != null && m.hasOwnProperty("unknownValidationCount")) {
                    if (!$util.isInteger(m.unknownValidationCount))
                        return "unknownValidationCount: integer expected";
                }
                if (m.avgAllExecutionTimeMs != null && m.hasOwnProperty("avgAllExecutionTimeMs")) {
                    if (typeof m.avgAllExecutionTimeMs !== "number")
                        return "avgAllExecutionTimeMs: number expected";
                }
                if (m.avgSkippedExecutionTimeMs != null && m.hasOwnProperty("avgSkippedExecutionTimeMs")) {
                    if (typeof m.avgSkippedExecutionTimeMs !== "number")
                        return "avgSkippedExecutionTimeMs: number expected";
                }
                if (m.avgUnskippedExecutionTimeMs != null && m.hasOwnProperty("avgUnskippedExecutionTimeMs")) {
                    if (typeof m.avgUnskippedExecutionTimeMs !== "number")
                        return "avgUnskippedExecutionTimeMs: number expected";
                }
                if (m.avgSeparatedExecutionTimeMs != null && m.hasOwnProperty("avgSeparatedExecutionTimeMs")) {
                    if (typeof m.avgSeparatedExecutionTimeMs !== "number")
                        return "avgSeparatedExecutionTimeMs: number expected";
                }
                if (m.dpuVoteMetrics != null && m.hasOwnProperty("dpuVoteMetrics")) {
                    if (!Array.isArray(m.dpuVoteMetrics))
                        return "dpuVoteMetrics: array expected";
                    for (var i = 0; i < m.dpuVoteMetrics.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics.verify(m.dpuVoteMetrics[i]);
                            if (e)
                                return "dpuVoteMetrics." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidHwcomposerMetrics message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidHwcomposerMetrics
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidHwcomposerMetrics} AndroidHwcomposerMetrics
             */
            AndroidHwcomposerMetrics.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidHwcomposerMetrics)
                    return d;
                var m = new $root.perfetto.protos.AndroidHwcomposerMetrics();
                if (d.compositionTotalLayers != null) {
                    m.compositionTotalLayers = Number(d.compositionTotalLayers);
                }
                if (d.compositionDpuLayers != null) {
                    m.compositionDpuLayers = Number(d.compositionDpuLayers);
                }
                if (d.compositionGpuLayers != null) {
                    m.compositionGpuLayers = Number(d.compositionGpuLayers);
                }
                if (d.compositionDpuCachedLayers != null) {
                    m.compositionDpuCachedLayers = Number(d.compositionDpuCachedLayers);
                }
                if (d.compositionSfCachedLayers != null) {
                    m.compositionSfCachedLayers = Number(d.compositionSfCachedLayers);
                }
                if (d.skippedValidationCount != null) {
                    m.skippedValidationCount = d.skippedValidationCount | 0;
                }
                if (d.unskippedValidationCount != null) {
                    m.unskippedValidationCount = d.unskippedValidationCount | 0;
                }
                if (d.separatedValidationCount != null) {
                    m.separatedValidationCount = d.separatedValidationCount | 0;
                }
                if (d.unknownValidationCount != null) {
                    m.unknownValidationCount = d.unknownValidationCount | 0;
                }
                if (d.avgAllExecutionTimeMs != null) {
                    m.avgAllExecutionTimeMs = Number(d.avgAllExecutionTimeMs);
                }
                if (d.avgSkippedExecutionTimeMs != null) {
                    m.avgSkippedExecutionTimeMs = Number(d.avgSkippedExecutionTimeMs);
                }
                if (d.avgUnskippedExecutionTimeMs != null) {
                    m.avgUnskippedExecutionTimeMs = Number(d.avgUnskippedExecutionTimeMs);
                }
                if (d.avgSeparatedExecutionTimeMs != null) {
                    m.avgSeparatedExecutionTimeMs = Number(d.avgSeparatedExecutionTimeMs);
                }
                if (d.dpuVoteMetrics) {
                    if (!Array.isArray(d.dpuVoteMetrics))
                        throw TypeError(".perfetto.protos.AndroidHwcomposerMetrics.dpuVoteMetrics: array expected");
                    m.dpuVoteMetrics = [];
                    for (var i = 0; i < d.dpuVoteMetrics.length; ++i) {
                        if (typeof d.dpuVoteMetrics[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidHwcomposerMetrics.dpuVoteMetrics: object expected");
                        m.dpuVoteMetrics[i] = $root.perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics.fromObject(d.dpuVoteMetrics[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidHwcomposerMetrics message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidHwcomposerMetrics
             * @static
             * @param {perfetto.protos.AndroidHwcomposerMetrics} m AndroidHwcomposerMetrics
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidHwcomposerMetrics.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.dpuVoteMetrics = [];
                }
                if (o.defaults) {
                    d.compositionTotalLayers = 0;
                    d.compositionDpuLayers = 0;
                    d.compositionGpuLayers = 0;
                    d.compositionDpuCachedLayers = 0;
                    d.compositionSfCachedLayers = 0;
                    d.skippedValidationCount = 0;
                    d.unskippedValidationCount = 0;
                    d.separatedValidationCount = 0;
                    d.unknownValidationCount = 0;
                    d.avgAllExecutionTimeMs = 0;
                    d.avgSkippedExecutionTimeMs = 0;
                    d.avgUnskippedExecutionTimeMs = 0;
                    d.avgSeparatedExecutionTimeMs = 0;
                }
                if (m.compositionTotalLayers != null && m.hasOwnProperty("compositionTotalLayers")) {
                    d.compositionTotalLayers = o.json && !isFinite(m.compositionTotalLayers) ? String(m.compositionTotalLayers) : m.compositionTotalLayers;
                }
                if (m.compositionDpuLayers != null && m.hasOwnProperty("compositionDpuLayers")) {
                    d.compositionDpuLayers = o.json && !isFinite(m.compositionDpuLayers) ? String(m.compositionDpuLayers) : m.compositionDpuLayers;
                }
                if (m.compositionGpuLayers != null && m.hasOwnProperty("compositionGpuLayers")) {
                    d.compositionGpuLayers = o.json && !isFinite(m.compositionGpuLayers) ? String(m.compositionGpuLayers) : m.compositionGpuLayers;
                }
                if (m.compositionDpuCachedLayers != null && m.hasOwnProperty("compositionDpuCachedLayers")) {
                    d.compositionDpuCachedLayers = o.json && !isFinite(m.compositionDpuCachedLayers) ? String(m.compositionDpuCachedLayers) : m.compositionDpuCachedLayers;
                }
                if (m.compositionSfCachedLayers != null && m.hasOwnProperty("compositionSfCachedLayers")) {
                    d.compositionSfCachedLayers = o.json && !isFinite(m.compositionSfCachedLayers) ? String(m.compositionSfCachedLayers) : m.compositionSfCachedLayers;
                }
                if (m.skippedValidationCount != null && m.hasOwnProperty("skippedValidationCount")) {
                    d.skippedValidationCount = m.skippedValidationCount;
                }
                if (m.unskippedValidationCount != null && m.hasOwnProperty("unskippedValidationCount")) {
                    d.unskippedValidationCount = m.unskippedValidationCount;
                }
                if (m.separatedValidationCount != null && m.hasOwnProperty("separatedValidationCount")) {
                    d.separatedValidationCount = m.separatedValidationCount;
                }
                if (m.unknownValidationCount != null && m.hasOwnProperty("unknownValidationCount")) {
                    d.unknownValidationCount = m.unknownValidationCount;
                }
                if (m.avgAllExecutionTimeMs != null && m.hasOwnProperty("avgAllExecutionTimeMs")) {
                    d.avgAllExecutionTimeMs = o.json && !isFinite(m.avgAllExecutionTimeMs) ? String(m.avgAllExecutionTimeMs) : m.avgAllExecutionTimeMs;
                }
                if (m.avgSkippedExecutionTimeMs != null && m.hasOwnProperty("avgSkippedExecutionTimeMs")) {
                    d.avgSkippedExecutionTimeMs = o.json && !isFinite(m.avgSkippedExecutionTimeMs) ? String(m.avgSkippedExecutionTimeMs) : m.avgSkippedExecutionTimeMs;
                }
                if (m.avgUnskippedExecutionTimeMs != null && m.hasOwnProperty("avgUnskippedExecutionTimeMs")) {
                    d.avgUnskippedExecutionTimeMs = o.json && !isFinite(m.avgUnskippedExecutionTimeMs) ? String(m.avgUnskippedExecutionTimeMs) : m.avgUnskippedExecutionTimeMs;
                }
                if (m.avgSeparatedExecutionTimeMs != null && m.hasOwnProperty("avgSeparatedExecutionTimeMs")) {
                    d.avgSeparatedExecutionTimeMs = o.json && !isFinite(m.avgSeparatedExecutionTimeMs) ? String(m.avgSeparatedExecutionTimeMs) : m.avgSeparatedExecutionTimeMs;
                }
                if (m.dpuVoteMetrics && m.dpuVoteMetrics.length) {
                    d.dpuVoteMetrics = [];
                    for (var j = 0; j < m.dpuVoteMetrics.length; ++j) {
                        d.dpuVoteMetrics[j] = $root.perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics.toObject(m.dpuVoteMetrics[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidHwcomposerMetrics to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidHwcomposerMetrics
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidHwcomposerMetrics.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidHwcomposerMetrics.DpuVoteMetrics = (function() {

                /**
                 * Properties of a DpuVoteMetrics.
                 * @memberof perfetto.protos.AndroidHwcomposerMetrics
                 * @interface IDpuVoteMetrics
                 * @property {number|null} [tid] DpuVoteMetrics tid
                 * @property {number|null} [avgDpuVoteClock] DpuVoteMetrics avgDpuVoteClock
                 * @property {number|null} [avgDpuVoteAvgBw] DpuVoteMetrics avgDpuVoteAvgBw
                 * @property {number|null} [avgDpuVotePeakBw] DpuVoteMetrics avgDpuVotePeakBw
                 * @property {number|null} [avgDpuVoteRtBw] DpuVoteMetrics avgDpuVoteRtBw
                 */

                /**
                 * Constructs a new DpuVoteMetrics.
                 * @memberof perfetto.protos.AndroidHwcomposerMetrics
                 * @classdesc Represents a DpuVoteMetrics.
                 * @implements IDpuVoteMetrics
                 * @constructor
                 * @param {perfetto.protos.AndroidHwcomposerMetrics.IDpuVoteMetrics=} [p] Properties to set
                 */
                function DpuVoteMetrics(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * DpuVoteMetrics tid.
                 * @member {number} tid
                 * @memberof perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics
                 * @instance
                 */
                DpuVoteMetrics.prototype.tid = 0;

                /**
                 * DpuVoteMetrics avgDpuVoteClock.
                 * @member {number} avgDpuVoteClock
                 * @memberof perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics
                 * @instance
                 */
                DpuVoteMetrics.prototype.avgDpuVoteClock = 0;

                /**
                 * DpuVoteMetrics avgDpuVoteAvgBw.
                 * @member {number} avgDpuVoteAvgBw
                 * @memberof perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics
                 * @instance
                 */
                DpuVoteMetrics.prototype.avgDpuVoteAvgBw = 0;

                /**
                 * DpuVoteMetrics avgDpuVotePeakBw.
                 * @member {number} avgDpuVotePeakBw
                 * @memberof perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics
                 * @instance
                 */
                DpuVoteMetrics.prototype.avgDpuVotePeakBw = 0;

                /**
                 * DpuVoteMetrics avgDpuVoteRtBw.
                 * @member {number} avgDpuVoteRtBw
                 * @memberof perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics
                 * @instance
                 */
                DpuVoteMetrics.prototype.avgDpuVoteRtBw = 0;

                /**
                 * Creates a new DpuVoteMetrics instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics
                 * @static
                 * @param {perfetto.protos.AndroidHwcomposerMetrics.IDpuVoteMetrics=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics} DpuVoteMetrics instance
                 */
                DpuVoteMetrics.create = function create(properties) {
                    return new DpuVoteMetrics(properties);
                };

                /**
                 * Encodes the specified DpuVoteMetrics message. Does not implicitly {@link perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics
                 * @static
                 * @param {perfetto.protos.AndroidHwcomposerMetrics.IDpuVoteMetrics} m DpuVoteMetrics message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                DpuVoteMetrics.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.tid != null && Object.hasOwnProperty.call(m, "tid"))
                        w.uint32(8).uint32(m.tid);
                    if (m.avgDpuVoteClock != null && Object.hasOwnProperty.call(m, "avgDpuVoteClock"))
                        w.uint32(17).double(m.avgDpuVoteClock);
                    if (m.avgDpuVoteAvgBw != null && Object.hasOwnProperty.call(m, "avgDpuVoteAvgBw"))
                        w.uint32(25).double(m.avgDpuVoteAvgBw);
                    if (m.avgDpuVotePeakBw != null && Object.hasOwnProperty.call(m, "avgDpuVotePeakBw"))
                        w.uint32(33).double(m.avgDpuVotePeakBw);
                    if (m.avgDpuVoteRtBw != null && Object.hasOwnProperty.call(m, "avgDpuVoteRtBw"))
                        w.uint32(41).double(m.avgDpuVoteRtBw);
                    return w;
                };

                /**
                 * Encodes the specified DpuVoteMetrics message, length delimited. Does not implicitly {@link perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics
                 * @static
                 * @param {perfetto.protos.AndroidHwcomposerMetrics.IDpuVoteMetrics} message DpuVoteMetrics message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                DpuVoteMetrics.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a DpuVoteMetrics message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics} DpuVoteMetrics
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                DpuVoteMetrics.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.tid = r.uint32();
                            break;
                        case 2:
                            m.avgDpuVoteClock = r.double();
                            break;
                        case 3:
                            m.avgDpuVoteAvgBw = r.double();
                            break;
                        case 4:
                            m.avgDpuVotePeakBw = r.double();
                            break;
                        case 5:
                            m.avgDpuVoteRtBw = r.double();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a DpuVoteMetrics message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics} DpuVoteMetrics
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                DpuVoteMetrics.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a DpuVoteMetrics message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                DpuVoteMetrics.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.tid != null && m.hasOwnProperty("tid")) {
                        if (!$util.isInteger(m.tid))
                            return "tid: integer expected";
                    }
                    if (m.avgDpuVoteClock != null && m.hasOwnProperty("avgDpuVoteClock")) {
                        if (typeof m.avgDpuVoteClock !== "number")
                            return "avgDpuVoteClock: number expected";
                    }
                    if (m.avgDpuVoteAvgBw != null && m.hasOwnProperty("avgDpuVoteAvgBw")) {
                        if (typeof m.avgDpuVoteAvgBw !== "number")
                            return "avgDpuVoteAvgBw: number expected";
                    }
                    if (m.avgDpuVotePeakBw != null && m.hasOwnProperty("avgDpuVotePeakBw")) {
                        if (typeof m.avgDpuVotePeakBw !== "number")
                            return "avgDpuVotePeakBw: number expected";
                    }
                    if (m.avgDpuVoteRtBw != null && m.hasOwnProperty("avgDpuVoteRtBw")) {
                        if (typeof m.avgDpuVoteRtBw !== "number")
                            return "avgDpuVoteRtBw: number expected";
                    }
                    return null;
                };

                /**
                 * Creates a DpuVoteMetrics message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics} DpuVoteMetrics
                 */
                DpuVoteMetrics.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics)
                        return d;
                    var m = new $root.perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics();
                    if (d.tid != null) {
                        m.tid = d.tid >>> 0;
                    }
                    if (d.avgDpuVoteClock != null) {
                        m.avgDpuVoteClock = Number(d.avgDpuVoteClock);
                    }
                    if (d.avgDpuVoteAvgBw != null) {
                        m.avgDpuVoteAvgBw = Number(d.avgDpuVoteAvgBw);
                    }
                    if (d.avgDpuVotePeakBw != null) {
                        m.avgDpuVotePeakBw = Number(d.avgDpuVotePeakBw);
                    }
                    if (d.avgDpuVoteRtBw != null) {
                        m.avgDpuVoteRtBw = Number(d.avgDpuVoteRtBw);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a DpuVoteMetrics message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics
                 * @static
                 * @param {perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics} m DpuVoteMetrics
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                DpuVoteMetrics.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.tid = 0;
                        d.avgDpuVoteClock = 0;
                        d.avgDpuVoteAvgBw = 0;
                        d.avgDpuVotePeakBw = 0;
                        d.avgDpuVoteRtBw = 0;
                    }
                    if (m.tid != null && m.hasOwnProperty("tid")) {
                        d.tid = m.tid;
                    }
                    if (m.avgDpuVoteClock != null && m.hasOwnProperty("avgDpuVoteClock")) {
                        d.avgDpuVoteClock = o.json && !isFinite(m.avgDpuVoteClock) ? String(m.avgDpuVoteClock) : m.avgDpuVoteClock;
                    }
                    if (m.avgDpuVoteAvgBw != null && m.hasOwnProperty("avgDpuVoteAvgBw")) {
                        d.avgDpuVoteAvgBw = o.json && !isFinite(m.avgDpuVoteAvgBw) ? String(m.avgDpuVoteAvgBw) : m.avgDpuVoteAvgBw;
                    }
                    if (m.avgDpuVotePeakBw != null && m.hasOwnProperty("avgDpuVotePeakBw")) {
                        d.avgDpuVotePeakBw = o.json && !isFinite(m.avgDpuVotePeakBw) ? String(m.avgDpuVotePeakBw) : m.avgDpuVotePeakBw;
                    }
                    if (m.avgDpuVoteRtBw != null && m.hasOwnProperty("avgDpuVoteRtBw")) {
                        d.avgDpuVoteRtBw = o.json && !isFinite(m.avgDpuVoteRtBw) ? String(m.avgDpuVoteRtBw) : m.avgDpuVoteRtBw;
                    }
                    return d;
                };

                /**
                 * Converts this DpuVoteMetrics to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidHwcomposerMetrics.DpuVoteMetrics
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                DpuVoteMetrics.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return DpuVoteMetrics;
            })();

            return AndroidHwcomposerMetrics;
        })();

        protos.ProcessRenderInfo = (function() {

            /**
             * Properties of a ProcessRenderInfo.
             * @memberof perfetto.protos
             * @interface IProcessRenderInfo
             * @property {string|null} [processName] ProcessRenderInfo processName
             * @property {number|null} [rtCpuTimeMs] ProcessRenderInfo rtCpuTimeMs
             * @property {number|null} [drawFrameCount] ProcessRenderInfo drawFrameCount
             * @property {number|null} [drawFrameMax] ProcessRenderInfo drawFrameMax
             * @property {number|null} [drawFrameMin] ProcessRenderInfo drawFrameMin
             * @property {number|null} [drawFrameAvg] ProcessRenderInfo drawFrameAvg
             * @property {number|null} [flushCount] ProcessRenderInfo flushCount
             * @property {number|null} [flushMax] ProcessRenderInfo flushMax
             * @property {number|null} [flushMin] ProcessRenderInfo flushMin
             * @property {number|null} [flushAvg] ProcessRenderInfo flushAvg
             * @property {number|null} [prepareTreeCount] ProcessRenderInfo prepareTreeCount
             * @property {number|null} [prepareTreeMax] ProcessRenderInfo prepareTreeMax
             * @property {number|null} [prepareTreeMin] ProcessRenderInfo prepareTreeMin
             * @property {number|null} [prepareTreeAvg] ProcessRenderInfo prepareTreeAvg
             * @property {number|null} [gpuCompletionCount] ProcessRenderInfo gpuCompletionCount
             * @property {number|null} [gpuCompletionMax] ProcessRenderInfo gpuCompletionMax
             * @property {number|null} [gpuCompletionMin] ProcessRenderInfo gpuCompletionMin
             * @property {number|null} [gpuCompletionAvg] ProcessRenderInfo gpuCompletionAvg
             * @property {number|null} [uiRecordCount] ProcessRenderInfo uiRecordCount
             * @property {number|null} [uiRecordMax] ProcessRenderInfo uiRecordMax
             * @property {number|null} [uiRecordMin] ProcessRenderInfo uiRecordMin
             * @property {number|null} [uiRecordAvg] ProcessRenderInfo uiRecordAvg
             * @property {number|null} [shaderCompileCount] ProcessRenderInfo shaderCompileCount
             * @property {number|null} [shaderCompileTime] ProcessRenderInfo shaderCompileTime
             * @property {number|null} [shaderCompileAvg] ProcessRenderInfo shaderCompileAvg
             * @property {number|null} [cacheHitCount] ProcessRenderInfo cacheHitCount
             * @property {number|null} [cacheHitTime] ProcessRenderInfo cacheHitTime
             * @property {number|null} [cacheHitAvg] ProcessRenderInfo cacheHitAvg
             * @property {number|null} [cacheMissCount] ProcessRenderInfo cacheMissCount
             * @property {number|null} [cacheMissTime] ProcessRenderInfo cacheMissTime
             * @property {number|null} [cacheMissAvg] ProcessRenderInfo cacheMissAvg
             * @property {number|null} [graphicsCpuMemMax] ProcessRenderInfo graphicsCpuMemMax
             * @property {number|null} [graphicsCpuMemMin] ProcessRenderInfo graphicsCpuMemMin
             * @property {number|null} [graphicsCpuMemAvg] ProcessRenderInfo graphicsCpuMemAvg
             * @property {number|null} [graphicsGpuMemMax] ProcessRenderInfo graphicsGpuMemMax
             * @property {number|null} [graphicsGpuMemMin] ProcessRenderInfo graphicsGpuMemMin
             * @property {number|null} [graphicsGpuMemAvg] ProcessRenderInfo graphicsGpuMemAvg
             * @property {number|null} [textureMemMax] ProcessRenderInfo textureMemMax
             * @property {number|null} [textureMemMin] ProcessRenderInfo textureMemMin
             * @property {number|null} [textureMemAvg] ProcessRenderInfo textureMemAvg
             * @property {number|null} [allMemMax] ProcessRenderInfo allMemMax
             * @property {number|null} [allMemMin] ProcessRenderInfo allMemMin
             * @property {number|null} [allMemAvg] ProcessRenderInfo allMemAvg
             */

            /**
             * Constructs a new ProcessRenderInfo.
             * @memberof perfetto.protos
             * @classdesc Represents a ProcessRenderInfo.
             * @implements IProcessRenderInfo
             * @constructor
             * @param {perfetto.protos.IProcessRenderInfo=} [p] Properties to set
             */
            function ProcessRenderInfo(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ProcessRenderInfo processName.
             * @member {string} processName
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.processName = "";

            /**
             * ProcessRenderInfo rtCpuTimeMs.
             * @member {number} rtCpuTimeMs
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.rtCpuTimeMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ProcessRenderInfo drawFrameCount.
             * @member {number} drawFrameCount
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.drawFrameCount = 0;

            /**
             * ProcessRenderInfo drawFrameMax.
             * @member {number} drawFrameMax
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.drawFrameMax = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ProcessRenderInfo drawFrameMin.
             * @member {number} drawFrameMin
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.drawFrameMin = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ProcessRenderInfo drawFrameAvg.
             * @member {number} drawFrameAvg
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.drawFrameAvg = 0;

            /**
             * ProcessRenderInfo flushCount.
             * @member {number} flushCount
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.flushCount = 0;

            /**
             * ProcessRenderInfo flushMax.
             * @member {number} flushMax
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.flushMax = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ProcessRenderInfo flushMin.
             * @member {number} flushMin
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.flushMin = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ProcessRenderInfo flushAvg.
             * @member {number} flushAvg
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.flushAvg = 0;

            /**
             * ProcessRenderInfo prepareTreeCount.
             * @member {number} prepareTreeCount
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.prepareTreeCount = 0;

            /**
             * ProcessRenderInfo prepareTreeMax.
             * @member {number} prepareTreeMax
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.prepareTreeMax = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ProcessRenderInfo prepareTreeMin.
             * @member {number} prepareTreeMin
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.prepareTreeMin = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ProcessRenderInfo prepareTreeAvg.
             * @member {number} prepareTreeAvg
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.prepareTreeAvg = 0;

            /**
             * ProcessRenderInfo gpuCompletionCount.
             * @member {number} gpuCompletionCount
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.gpuCompletionCount = 0;

            /**
             * ProcessRenderInfo gpuCompletionMax.
             * @member {number} gpuCompletionMax
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.gpuCompletionMax = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ProcessRenderInfo gpuCompletionMin.
             * @member {number} gpuCompletionMin
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.gpuCompletionMin = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ProcessRenderInfo gpuCompletionAvg.
             * @member {number} gpuCompletionAvg
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.gpuCompletionAvg = 0;

            /**
             * ProcessRenderInfo uiRecordCount.
             * @member {number} uiRecordCount
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.uiRecordCount = 0;

            /**
             * ProcessRenderInfo uiRecordMax.
             * @member {number} uiRecordMax
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.uiRecordMax = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ProcessRenderInfo uiRecordMin.
             * @member {number} uiRecordMin
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.uiRecordMin = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ProcessRenderInfo uiRecordAvg.
             * @member {number} uiRecordAvg
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.uiRecordAvg = 0;

            /**
             * ProcessRenderInfo shaderCompileCount.
             * @member {number} shaderCompileCount
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.shaderCompileCount = 0;

            /**
             * ProcessRenderInfo shaderCompileTime.
             * @member {number} shaderCompileTime
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.shaderCompileTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ProcessRenderInfo shaderCompileAvg.
             * @member {number} shaderCompileAvg
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.shaderCompileAvg = 0;

            /**
             * ProcessRenderInfo cacheHitCount.
             * @member {number} cacheHitCount
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.cacheHitCount = 0;

            /**
             * ProcessRenderInfo cacheHitTime.
             * @member {number} cacheHitTime
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.cacheHitTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ProcessRenderInfo cacheHitAvg.
             * @member {number} cacheHitAvg
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.cacheHitAvg = 0;

            /**
             * ProcessRenderInfo cacheMissCount.
             * @member {number} cacheMissCount
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.cacheMissCount = 0;

            /**
             * ProcessRenderInfo cacheMissTime.
             * @member {number} cacheMissTime
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.cacheMissTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ProcessRenderInfo cacheMissAvg.
             * @member {number} cacheMissAvg
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.cacheMissAvg = 0;

            /**
             * ProcessRenderInfo graphicsCpuMemMax.
             * @member {number} graphicsCpuMemMax
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.graphicsCpuMemMax = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ProcessRenderInfo graphicsCpuMemMin.
             * @member {number} graphicsCpuMemMin
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.graphicsCpuMemMin = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ProcessRenderInfo graphicsCpuMemAvg.
             * @member {number} graphicsCpuMemAvg
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.graphicsCpuMemAvg = 0;

            /**
             * ProcessRenderInfo graphicsGpuMemMax.
             * @member {number} graphicsGpuMemMax
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.graphicsGpuMemMax = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ProcessRenderInfo graphicsGpuMemMin.
             * @member {number} graphicsGpuMemMin
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.graphicsGpuMemMin = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ProcessRenderInfo graphicsGpuMemAvg.
             * @member {number} graphicsGpuMemAvg
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.graphicsGpuMemAvg = 0;

            /**
             * ProcessRenderInfo textureMemMax.
             * @member {number} textureMemMax
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.textureMemMax = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ProcessRenderInfo textureMemMin.
             * @member {number} textureMemMin
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.textureMemMin = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ProcessRenderInfo textureMemAvg.
             * @member {number} textureMemAvg
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.textureMemAvg = 0;

            /**
             * ProcessRenderInfo allMemMax.
             * @member {number} allMemMax
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.allMemMax = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ProcessRenderInfo allMemMin.
             * @member {number} allMemMin
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.allMemMin = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ProcessRenderInfo allMemAvg.
             * @member {number} allMemAvg
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             */
            ProcessRenderInfo.prototype.allMemAvg = 0;

            /**
             * Creates a new ProcessRenderInfo instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ProcessRenderInfo
             * @static
             * @param {perfetto.protos.IProcessRenderInfo=} [properties] Properties to set
             * @returns {perfetto.protos.ProcessRenderInfo} ProcessRenderInfo instance
             */
            ProcessRenderInfo.create = function create(properties) {
                return new ProcessRenderInfo(properties);
            };

            /**
             * Encodes the specified ProcessRenderInfo message. Does not implicitly {@link perfetto.protos.ProcessRenderInfo.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ProcessRenderInfo
             * @static
             * @param {perfetto.protos.IProcessRenderInfo} m ProcessRenderInfo message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ProcessRenderInfo.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.processName != null && Object.hasOwnProperty.call(m, "processName"))
                    w.uint32(10).string(m.processName);
                if (m.rtCpuTimeMs != null && Object.hasOwnProperty.call(m, "rtCpuTimeMs"))
                    w.uint32(16).int64(m.rtCpuTimeMs);
                if (m.drawFrameCount != null && Object.hasOwnProperty.call(m, "drawFrameCount"))
                    w.uint32(24).uint32(m.drawFrameCount);
                if (m.drawFrameMax != null && Object.hasOwnProperty.call(m, "drawFrameMax"))
                    w.uint32(32).int64(m.drawFrameMax);
                if (m.drawFrameMin != null && Object.hasOwnProperty.call(m, "drawFrameMin"))
                    w.uint32(40).int64(m.drawFrameMin);
                if (m.drawFrameAvg != null && Object.hasOwnProperty.call(m, "drawFrameAvg"))
                    w.uint32(49).double(m.drawFrameAvg);
                if (m.flushCount != null && Object.hasOwnProperty.call(m, "flushCount"))
                    w.uint32(56).uint32(m.flushCount);
                if (m.flushMax != null && Object.hasOwnProperty.call(m, "flushMax"))
                    w.uint32(64).int64(m.flushMax);
                if (m.flushMin != null && Object.hasOwnProperty.call(m, "flushMin"))
                    w.uint32(72).int64(m.flushMin);
                if (m.flushAvg != null && Object.hasOwnProperty.call(m, "flushAvg"))
                    w.uint32(81).double(m.flushAvg);
                if (m.prepareTreeCount != null && Object.hasOwnProperty.call(m, "prepareTreeCount"))
                    w.uint32(88).uint32(m.prepareTreeCount);
                if (m.prepareTreeMax != null && Object.hasOwnProperty.call(m, "prepareTreeMax"))
                    w.uint32(96).int64(m.prepareTreeMax);
                if (m.prepareTreeMin != null && Object.hasOwnProperty.call(m, "prepareTreeMin"))
                    w.uint32(104).int64(m.prepareTreeMin);
                if (m.prepareTreeAvg != null && Object.hasOwnProperty.call(m, "prepareTreeAvg"))
                    w.uint32(113).double(m.prepareTreeAvg);
                if (m.gpuCompletionCount != null && Object.hasOwnProperty.call(m, "gpuCompletionCount"))
                    w.uint32(120).uint32(m.gpuCompletionCount);
                if (m.gpuCompletionMax != null && Object.hasOwnProperty.call(m, "gpuCompletionMax"))
                    w.uint32(128).int64(m.gpuCompletionMax);
                if (m.gpuCompletionMin != null && Object.hasOwnProperty.call(m, "gpuCompletionMin"))
                    w.uint32(136).int64(m.gpuCompletionMin);
                if (m.gpuCompletionAvg != null && Object.hasOwnProperty.call(m, "gpuCompletionAvg"))
                    w.uint32(145).double(m.gpuCompletionAvg);
                if (m.uiRecordCount != null && Object.hasOwnProperty.call(m, "uiRecordCount"))
                    w.uint32(152).uint32(m.uiRecordCount);
                if (m.uiRecordMax != null && Object.hasOwnProperty.call(m, "uiRecordMax"))
                    w.uint32(160).int64(m.uiRecordMax);
                if (m.uiRecordMin != null && Object.hasOwnProperty.call(m, "uiRecordMin"))
                    w.uint32(168).int64(m.uiRecordMin);
                if (m.uiRecordAvg != null && Object.hasOwnProperty.call(m, "uiRecordAvg"))
                    w.uint32(177).double(m.uiRecordAvg);
                if (m.shaderCompileCount != null && Object.hasOwnProperty.call(m, "shaderCompileCount"))
                    w.uint32(184).uint32(m.shaderCompileCount);
                if (m.shaderCompileTime != null && Object.hasOwnProperty.call(m, "shaderCompileTime"))
                    w.uint32(192).int64(m.shaderCompileTime);
                if (m.shaderCompileAvg != null && Object.hasOwnProperty.call(m, "shaderCompileAvg"))
                    w.uint32(201).double(m.shaderCompileAvg);
                if (m.cacheHitCount != null && Object.hasOwnProperty.call(m, "cacheHitCount"))
                    w.uint32(208).uint32(m.cacheHitCount);
                if (m.cacheHitTime != null && Object.hasOwnProperty.call(m, "cacheHitTime"))
                    w.uint32(216).int64(m.cacheHitTime);
                if (m.cacheHitAvg != null && Object.hasOwnProperty.call(m, "cacheHitAvg"))
                    w.uint32(225).double(m.cacheHitAvg);
                if (m.cacheMissCount != null && Object.hasOwnProperty.call(m, "cacheMissCount"))
                    w.uint32(232).uint32(m.cacheMissCount);
                if (m.cacheMissTime != null && Object.hasOwnProperty.call(m, "cacheMissTime"))
                    w.uint32(240).int64(m.cacheMissTime);
                if (m.cacheMissAvg != null && Object.hasOwnProperty.call(m, "cacheMissAvg"))
                    w.uint32(249).double(m.cacheMissAvg);
                if (m.graphicsCpuMemMax != null && Object.hasOwnProperty.call(m, "graphicsCpuMemMax"))
                    w.uint32(256).int64(m.graphicsCpuMemMax);
                if (m.graphicsCpuMemMin != null && Object.hasOwnProperty.call(m, "graphicsCpuMemMin"))
                    w.uint32(264).int64(m.graphicsCpuMemMin);
                if (m.graphicsCpuMemAvg != null && Object.hasOwnProperty.call(m, "graphicsCpuMemAvg"))
                    w.uint32(273).double(m.graphicsCpuMemAvg);
                if (m.graphicsGpuMemMax != null && Object.hasOwnProperty.call(m, "graphicsGpuMemMax"))
                    w.uint32(280).int64(m.graphicsGpuMemMax);
                if (m.graphicsGpuMemMin != null && Object.hasOwnProperty.call(m, "graphicsGpuMemMin"))
                    w.uint32(288).int64(m.graphicsGpuMemMin);
                if (m.graphicsGpuMemAvg != null && Object.hasOwnProperty.call(m, "graphicsGpuMemAvg"))
                    w.uint32(297).double(m.graphicsGpuMemAvg);
                if (m.textureMemMax != null && Object.hasOwnProperty.call(m, "textureMemMax"))
                    w.uint32(304).int64(m.textureMemMax);
                if (m.textureMemMin != null && Object.hasOwnProperty.call(m, "textureMemMin"))
                    w.uint32(312).int64(m.textureMemMin);
                if (m.textureMemAvg != null && Object.hasOwnProperty.call(m, "textureMemAvg"))
                    w.uint32(321).double(m.textureMemAvg);
                if (m.allMemMax != null && Object.hasOwnProperty.call(m, "allMemMax"))
                    w.uint32(328).int64(m.allMemMax);
                if (m.allMemMin != null && Object.hasOwnProperty.call(m, "allMemMin"))
                    w.uint32(336).int64(m.allMemMin);
                if (m.allMemAvg != null && Object.hasOwnProperty.call(m, "allMemAvg"))
                    w.uint32(345).double(m.allMemAvg);
                return w;
            };

            /**
             * Encodes the specified ProcessRenderInfo message, length delimited. Does not implicitly {@link perfetto.protos.ProcessRenderInfo.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ProcessRenderInfo
             * @static
             * @param {perfetto.protos.IProcessRenderInfo} message ProcessRenderInfo message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ProcessRenderInfo.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ProcessRenderInfo message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ProcessRenderInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ProcessRenderInfo} ProcessRenderInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ProcessRenderInfo.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ProcessRenderInfo();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.processName = r.string();
                        break;
                    case 2:
                        m.rtCpuTimeMs = r.int64();
                        break;
                    case 3:
                        m.drawFrameCount = r.uint32();
                        break;
                    case 4:
                        m.drawFrameMax = r.int64();
                        break;
                    case 5:
                        m.drawFrameMin = r.int64();
                        break;
                    case 6:
                        m.drawFrameAvg = r.double();
                        break;
                    case 7:
                        m.flushCount = r.uint32();
                        break;
                    case 8:
                        m.flushMax = r.int64();
                        break;
                    case 9:
                        m.flushMin = r.int64();
                        break;
                    case 10:
                        m.flushAvg = r.double();
                        break;
                    case 11:
                        m.prepareTreeCount = r.uint32();
                        break;
                    case 12:
                        m.prepareTreeMax = r.int64();
                        break;
                    case 13:
                        m.prepareTreeMin = r.int64();
                        break;
                    case 14:
                        m.prepareTreeAvg = r.double();
                        break;
                    case 15:
                        m.gpuCompletionCount = r.uint32();
                        break;
                    case 16:
                        m.gpuCompletionMax = r.int64();
                        break;
                    case 17:
                        m.gpuCompletionMin = r.int64();
                        break;
                    case 18:
                        m.gpuCompletionAvg = r.double();
                        break;
                    case 19:
                        m.uiRecordCount = r.uint32();
                        break;
                    case 20:
                        m.uiRecordMax = r.int64();
                        break;
                    case 21:
                        m.uiRecordMin = r.int64();
                        break;
                    case 22:
                        m.uiRecordAvg = r.double();
                        break;
                    case 23:
                        m.shaderCompileCount = r.uint32();
                        break;
                    case 24:
                        m.shaderCompileTime = r.int64();
                        break;
                    case 25:
                        m.shaderCompileAvg = r.double();
                        break;
                    case 26:
                        m.cacheHitCount = r.uint32();
                        break;
                    case 27:
                        m.cacheHitTime = r.int64();
                        break;
                    case 28:
                        m.cacheHitAvg = r.double();
                        break;
                    case 29:
                        m.cacheMissCount = r.uint32();
                        break;
                    case 30:
                        m.cacheMissTime = r.int64();
                        break;
                    case 31:
                        m.cacheMissAvg = r.double();
                        break;
                    case 32:
                        m.graphicsCpuMemMax = r.int64();
                        break;
                    case 33:
                        m.graphicsCpuMemMin = r.int64();
                        break;
                    case 34:
                        m.graphicsCpuMemAvg = r.double();
                        break;
                    case 35:
                        m.graphicsGpuMemMax = r.int64();
                        break;
                    case 36:
                        m.graphicsGpuMemMin = r.int64();
                        break;
                    case 37:
                        m.graphicsGpuMemAvg = r.double();
                        break;
                    case 38:
                        m.textureMemMax = r.int64();
                        break;
                    case 39:
                        m.textureMemMin = r.int64();
                        break;
                    case 40:
                        m.textureMemAvg = r.double();
                        break;
                    case 41:
                        m.allMemMax = r.int64();
                        break;
                    case 42:
                        m.allMemMin = r.int64();
                        break;
                    case 43:
                        m.allMemAvg = r.double();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ProcessRenderInfo message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ProcessRenderInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ProcessRenderInfo} ProcessRenderInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ProcessRenderInfo.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ProcessRenderInfo message.
             * @function verify
             * @memberof perfetto.protos.ProcessRenderInfo
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ProcessRenderInfo.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.processName != null && m.hasOwnProperty("processName")) {
                    if (!$util.isString(m.processName))
                        return "processName: string expected";
                }
                if (m.rtCpuTimeMs != null && m.hasOwnProperty("rtCpuTimeMs")) {
                    if (!$util.isInteger(m.rtCpuTimeMs) && !(m.rtCpuTimeMs && $util.isInteger(m.rtCpuTimeMs.low) && $util.isInteger(m.rtCpuTimeMs.high)))
                        return "rtCpuTimeMs: integer|Long expected";
                }
                if (m.drawFrameCount != null && m.hasOwnProperty("drawFrameCount")) {
                    if (!$util.isInteger(m.drawFrameCount))
                        return "drawFrameCount: integer expected";
                }
                if (m.drawFrameMax != null && m.hasOwnProperty("drawFrameMax")) {
                    if (!$util.isInteger(m.drawFrameMax) && !(m.drawFrameMax && $util.isInteger(m.drawFrameMax.low) && $util.isInteger(m.drawFrameMax.high)))
                        return "drawFrameMax: integer|Long expected";
                }
                if (m.drawFrameMin != null && m.hasOwnProperty("drawFrameMin")) {
                    if (!$util.isInteger(m.drawFrameMin) && !(m.drawFrameMin && $util.isInteger(m.drawFrameMin.low) && $util.isInteger(m.drawFrameMin.high)))
                        return "drawFrameMin: integer|Long expected";
                }
                if (m.drawFrameAvg != null && m.hasOwnProperty("drawFrameAvg")) {
                    if (typeof m.drawFrameAvg !== "number")
                        return "drawFrameAvg: number expected";
                }
                if (m.flushCount != null && m.hasOwnProperty("flushCount")) {
                    if (!$util.isInteger(m.flushCount))
                        return "flushCount: integer expected";
                }
                if (m.flushMax != null && m.hasOwnProperty("flushMax")) {
                    if (!$util.isInteger(m.flushMax) && !(m.flushMax && $util.isInteger(m.flushMax.low) && $util.isInteger(m.flushMax.high)))
                        return "flushMax: integer|Long expected";
                }
                if (m.flushMin != null && m.hasOwnProperty("flushMin")) {
                    if (!$util.isInteger(m.flushMin) && !(m.flushMin && $util.isInteger(m.flushMin.low) && $util.isInteger(m.flushMin.high)))
                        return "flushMin: integer|Long expected";
                }
                if (m.flushAvg != null && m.hasOwnProperty("flushAvg")) {
                    if (typeof m.flushAvg !== "number")
                        return "flushAvg: number expected";
                }
                if (m.prepareTreeCount != null && m.hasOwnProperty("prepareTreeCount")) {
                    if (!$util.isInteger(m.prepareTreeCount))
                        return "prepareTreeCount: integer expected";
                }
                if (m.prepareTreeMax != null && m.hasOwnProperty("prepareTreeMax")) {
                    if (!$util.isInteger(m.prepareTreeMax) && !(m.prepareTreeMax && $util.isInteger(m.prepareTreeMax.low) && $util.isInteger(m.prepareTreeMax.high)))
                        return "prepareTreeMax: integer|Long expected";
                }
                if (m.prepareTreeMin != null && m.hasOwnProperty("prepareTreeMin")) {
                    if (!$util.isInteger(m.prepareTreeMin) && !(m.prepareTreeMin && $util.isInteger(m.prepareTreeMin.low) && $util.isInteger(m.prepareTreeMin.high)))
                        return "prepareTreeMin: integer|Long expected";
                }
                if (m.prepareTreeAvg != null && m.hasOwnProperty("prepareTreeAvg")) {
                    if (typeof m.prepareTreeAvg !== "number")
                        return "prepareTreeAvg: number expected";
                }
                if (m.gpuCompletionCount != null && m.hasOwnProperty("gpuCompletionCount")) {
                    if (!$util.isInteger(m.gpuCompletionCount))
                        return "gpuCompletionCount: integer expected";
                }
                if (m.gpuCompletionMax != null && m.hasOwnProperty("gpuCompletionMax")) {
                    if (!$util.isInteger(m.gpuCompletionMax) && !(m.gpuCompletionMax && $util.isInteger(m.gpuCompletionMax.low) && $util.isInteger(m.gpuCompletionMax.high)))
                        return "gpuCompletionMax: integer|Long expected";
                }
                if (m.gpuCompletionMin != null && m.hasOwnProperty("gpuCompletionMin")) {
                    if (!$util.isInteger(m.gpuCompletionMin) && !(m.gpuCompletionMin && $util.isInteger(m.gpuCompletionMin.low) && $util.isInteger(m.gpuCompletionMin.high)))
                        return "gpuCompletionMin: integer|Long expected";
                }
                if (m.gpuCompletionAvg != null && m.hasOwnProperty("gpuCompletionAvg")) {
                    if (typeof m.gpuCompletionAvg !== "number")
                        return "gpuCompletionAvg: number expected";
                }
                if (m.uiRecordCount != null && m.hasOwnProperty("uiRecordCount")) {
                    if (!$util.isInteger(m.uiRecordCount))
                        return "uiRecordCount: integer expected";
                }
                if (m.uiRecordMax != null && m.hasOwnProperty("uiRecordMax")) {
                    if (!$util.isInteger(m.uiRecordMax) && !(m.uiRecordMax && $util.isInteger(m.uiRecordMax.low) && $util.isInteger(m.uiRecordMax.high)))
                        return "uiRecordMax: integer|Long expected";
                }
                if (m.uiRecordMin != null && m.hasOwnProperty("uiRecordMin")) {
                    if (!$util.isInteger(m.uiRecordMin) && !(m.uiRecordMin && $util.isInteger(m.uiRecordMin.low) && $util.isInteger(m.uiRecordMin.high)))
                        return "uiRecordMin: integer|Long expected";
                }
                if (m.uiRecordAvg != null && m.hasOwnProperty("uiRecordAvg")) {
                    if (typeof m.uiRecordAvg !== "number")
                        return "uiRecordAvg: number expected";
                }
                if (m.shaderCompileCount != null && m.hasOwnProperty("shaderCompileCount")) {
                    if (!$util.isInteger(m.shaderCompileCount))
                        return "shaderCompileCount: integer expected";
                }
                if (m.shaderCompileTime != null && m.hasOwnProperty("shaderCompileTime")) {
                    if (!$util.isInteger(m.shaderCompileTime) && !(m.shaderCompileTime && $util.isInteger(m.shaderCompileTime.low) && $util.isInteger(m.shaderCompileTime.high)))
                        return "shaderCompileTime: integer|Long expected";
                }
                if (m.shaderCompileAvg != null && m.hasOwnProperty("shaderCompileAvg")) {
                    if (typeof m.shaderCompileAvg !== "number")
                        return "shaderCompileAvg: number expected";
                }
                if (m.cacheHitCount != null && m.hasOwnProperty("cacheHitCount")) {
                    if (!$util.isInteger(m.cacheHitCount))
                        return "cacheHitCount: integer expected";
                }
                if (m.cacheHitTime != null && m.hasOwnProperty("cacheHitTime")) {
                    if (!$util.isInteger(m.cacheHitTime) && !(m.cacheHitTime && $util.isInteger(m.cacheHitTime.low) && $util.isInteger(m.cacheHitTime.high)))
                        return "cacheHitTime: integer|Long expected";
                }
                if (m.cacheHitAvg != null && m.hasOwnProperty("cacheHitAvg")) {
                    if (typeof m.cacheHitAvg !== "number")
                        return "cacheHitAvg: number expected";
                }
                if (m.cacheMissCount != null && m.hasOwnProperty("cacheMissCount")) {
                    if (!$util.isInteger(m.cacheMissCount))
                        return "cacheMissCount: integer expected";
                }
                if (m.cacheMissTime != null && m.hasOwnProperty("cacheMissTime")) {
                    if (!$util.isInteger(m.cacheMissTime) && !(m.cacheMissTime && $util.isInteger(m.cacheMissTime.low) && $util.isInteger(m.cacheMissTime.high)))
                        return "cacheMissTime: integer|Long expected";
                }
                if (m.cacheMissAvg != null && m.hasOwnProperty("cacheMissAvg")) {
                    if (typeof m.cacheMissAvg !== "number")
                        return "cacheMissAvg: number expected";
                }
                if (m.graphicsCpuMemMax != null && m.hasOwnProperty("graphicsCpuMemMax")) {
                    if (!$util.isInteger(m.graphicsCpuMemMax) && !(m.graphicsCpuMemMax && $util.isInteger(m.graphicsCpuMemMax.low) && $util.isInteger(m.graphicsCpuMemMax.high)))
                        return "graphicsCpuMemMax: integer|Long expected";
                }
                if (m.graphicsCpuMemMin != null && m.hasOwnProperty("graphicsCpuMemMin")) {
                    if (!$util.isInteger(m.graphicsCpuMemMin) && !(m.graphicsCpuMemMin && $util.isInteger(m.graphicsCpuMemMin.low) && $util.isInteger(m.graphicsCpuMemMin.high)))
                        return "graphicsCpuMemMin: integer|Long expected";
                }
                if (m.graphicsCpuMemAvg != null && m.hasOwnProperty("graphicsCpuMemAvg")) {
                    if (typeof m.graphicsCpuMemAvg !== "number")
                        return "graphicsCpuMemAvg: number expected";
                }
                if (m.graphicsGpuMemMax != null && m.hasOwnProperty("graphicsGpuMemMax")) {
                    if (!$util.isInteger(m.graphicsGpuMemMax) && !(m.graphicsGpuMemMax && $util.isInteger(m.graphicsGpuMemMax.low) && $util.isInteger(m.graphicsGpuMemMax.high)))
                        return "graphicsGpuMemMax: integer|Long expected";
                }
                if (m.graphicsGpuMemMin != null && m.hasOwnProperty("graphicsGpuMemMin")) {
                    if (!$util.isInteger(m.graphicsGpuMemMin) && !(m.graphicsGpuMemMin && $util.isInteger(m.graphicsGpuMemMin.low) && $util.isInteger(m.graphicsGpuMemMin.high)))
                        return "graphicsGpuMemMin: integer|Long expected";
                }
                if (m.graphicsGpuMemAvg != null && m.hasOwnProperty("graphicsGpuMemAvg")) {
                    if (typeof m.graphicsGpuMemAvg !== "number")
                        return "graphicsGpuMemAvg: number expected";
                }
                if (m.textureMemMax != null && m.hasOwnProperty("textureMemMax")) {
                    if (!$util.isInteger(m.textureMemMax) && !(m.textureMemMax && $util.isInteger(m.textureMemMax.low) && $util.isInteger(m.textureMemMax.high)))
                        return "textureMemMax: integer|Long expected";
                }
                if (m.textureMemMin != null && m.hasOwnProperty("textureMemMin")) {
                    if (!$util.isInteger(m.textureMemMin) && !(m.textureMemMin && $util.isInteger(m.textureMemMin.low) && $util.isInteger(m.textureMemMin.high)))
                        return "textureMemMin: integer|Long expected";
                }
                if (m.textureMemAvg != null && m.hasOwnProperty("textureMemAvg")) {
                    if (typeof m.textureMemAvg !== "number")
                        return "textureMemAvg: number expected";
                }
                if (m.allMemMax != null && m.hasOwnProperty("allMemMax")) {
                    if (!$util.isInteger(m.allMemMax) && !(m.allMemMax && $util.isInteger(m.allMemMax.low) && $util.isInteger(m.allMemMax.high)))
                        return "allMemMax: integer|Long expected";
                }
                if (m.allMemMin != null && m.hasOwnProperty("allMemMin")) {
                    if (!$util.isInteger(m.allMemMin) && !(m.allMemMin && $util.isInteger(m.allMemMin.low) && $util.isInteger(m.allMemMin.high)))
                        return "allMemMin: integer|Long expected";
                }
                if (m.allMemAvg != null && m.hasOwnProperty("allMemAvg")) {
                    if (typeof m.allMemAvg !== "number")
                        return "allMemAvg: number expected";
                }
                return null;
            };

            /**
             * Creates a ProcessRenderInfo message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ProcessRenderInfo
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ProcessRenderInfo} ProcessRenderInfo
             */
            ProcessRenderInfo.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ProcessRenderInfo)
                    return d;
                var m = new $root.perfetto.protos.ProcessRenderInfo();
                if (d.processName != null) {
                    m.processName = String(d.processName);
                }
                if (d.rtCpuTimeMs != null) {
                    if ($util.Long)
                        (m.rtCpuTimeMs = $util.Long.fromValue(d.rtCpuTimeMs)).unsigned = false;
                    else if (typeof d.rtCpuTimeMs === "string")
                        m.rtCpuTimeMs = parseInt(d.rtCpuTimeMs, 10);
                    else if (typeof d.rtCpuTimeMs === "number")
                        m.rtCpuTimeMs = d.rtCpuTimeMs;
                    else if (typeof d.rtCpuTimeMs === "object")
                        m.rtCpuTimeMs = new $util.LongBits(d.rtCpuTimeMs.low >>> 0, d.rtCpuTimeMs.high >>> 0).toNumber();
                }
                if (d.drawFrameCount != null) {
                    m.drawFrameCount = d.drawFrameCount >>> 0;
                }
                if (d.drawFrameMax != null) {
                    if ($util.Long)
                        (m.drawFrameMax = $util.Long.fromValue(d.drawFrameMax)).unsigned = false;
                    else if (typeof d.drawFrameMax === "string")
                        m.drawFrameMax = parseInt(d.drawFrameMax, 10);
                    else if (typeof d.drawFrameMax === "number")
                        m.drawFrameMax = d.drawFrameMax;
                    else if (typeof d.drawFrameMax === "object")
                        m.drawFrameMax = new $util.LongBits(d.drawFrameMax.low >>> 0, d.drawFrameMax.high >>> 0).toNumber();
                }
                if (d.drawFrameMin != null) {
                    if ($util.Long)
                        (m.drawFrameMin = $util.Long.fromValue(d.drawFrameMin)).unsigned = false;
                    else if (typeof d.drawFrameMin === "string")
                        m.drawFrameMin = parseInt(d.drawFrameMin, 10);
                    else if (typeof d.drawFrameMin === "number")
                        m.drawFrameMin = d.drawFrameMin;
                    else if (typeof d.drawFrameMin === "object")
                        m.drawFrameMin = new $util.LongBits(d.drawFrameMin.low >>> 0, d.drawFrameMin.high >>> 0).toNumber();
                }
                if (d.drawFrameAvg != null) {
                    m.drawFrameAvg = Number(d.drawFrameAvg);
                }
                if (d.flushCount != null) {
                    m.flushCount = d.flushCount >>> 0;
                }
                if (d.flushMax != null) {
                    if ($util.Long)
                        (m.flushMax = $util.Long.fromValue(d.flushMax)).unsigned = false;
                    else if (typeof d.flushMax === "string")
                        m.flushMax = parseInt(d.flushMax, 10);
                    else if (typeof d.flushMax === "number")
                        m.flushMax = d.flushMax;
                    else if (typeof d.flushMax === "object")
                        m.flushMax = new $util.LongBits(d.flushMax.low >>> 0, d.flushMax.high >>> 0).toNumber();
                }
                if (d.flushMin != null) {
                    if ($util.Long)
                        (m.flushMin = $util.Long.fromValue(d.flushMin)).unsigned = false;
                    else if (typeof d.flushMin === "string")
                        m.flushMin = parseInt(d.flushMin, 10);
                    else if (typeof d.flushMin === "number")
                        m.flushMin = d.flushMin;
                    else if (typeof d.flushMin === "object")
                        m.flushMin = new $util.LongBits(d.flushMin.low >>> 0, d.flushMin.high >>> 0).toNumber();
                }
                if (d.flushAvg != null) {
                    m.flushAvg = Number(d.flushAvg);
                }
                if (d.prepareTreeCount != null) {
                    m.prepareTreeCount = d.prepareTreeCount >>> 0;
                }
                if (d.prepareTreeMax != null) {
                    if ($util.Long)
                        (m.prepareTreeMax = $util.Long.fromValue(d.prepareTreeMax)).unsigned = false;
                    else if (typeof d.prepareTreeMax === "string")
                        m.prepareTreeMax = parseInt(d.prepareTreeMax, 10);
                    else if (typeof d.prepareTreeMax === "number")
                        m.prepareTreeMax = d.prepareTreeMax;
                    else if (typeof d.prepareTreeMax === "object")
                        m.prepareTreeMax = new $util.LongBits(d.prepareTreeMax.low >>> 0, d.prepareTreeMax.high >>> 0).toNumber();
                }
                if (d.prepareTreeMin != null) {
                    if ($util.Long)
                        (m.prepareTreeMin = $util.Long.fromValue(d.prepareTreeMin)).unsigned = false;
                    else if (typeof d.prepareTreeMin === "string")
                        m.prepareTreeMin = parseInt(d.prepareTreeMin, 10);
                    else if (typeof d.prepareTreeMin === "number")
                        m.prepareTreeMin = d.prepareTreeMin;
                    else if (typeof d.prepareTreeMin === "object")
                        m.prepareTreeMin = new $util.LongBits(d.prepareTreeMin.low >>> 0, d.prepareTreeMin.high >>> 0).toNumber();
                }
                if (d.prepareTreeAvg != null) {
                    m.prepareTreeAvg = Number(d.prepareTreeAvg);
                }
                if (d.gpuCompletionCount != null) {
                    m.gpuCompletionCount = d.gpuCompletionCount >>> 0;
                }
                if (d.gpuCompletionMax != null) {
                    if ($util.Long)
                        (m.gpuCompletionMax = $util.Long.fromValue(d.gpuCompletionMax)).unsigned = false;
                    else if (typeof d.gpuCompletionMax === "string")
                        m.gpuCompletionMax = parseInt(d.gpuCompletionMax, 10);
                    else if (typeof d.gpuCompletionMax === "number")
                        m.gpuCompletionMax = d.gpuCompletionMax;
                    else if (typeof d.gpuCompletionMax === "object")
                        m.gpuCompletionMax = new $util.LongBits(d.gpuCompletionMax.low >>> 0, d.gpuCompletionMax.high >>> 0).toNumber();
                }
                if (d.gpuCompletionMin != null) {
                    if ($util.Long)
                        (m.gpuCompletionMin = $util.Long.fromValue(d.gpuCompletionMin)).unsigned = false;
                    else if (typeof d.gpuCompletionMin === "string")
                        m.gpuCompletionMin = parseInt(d.gpuCompletionMin, 10);
                    else if (typeof d.gpuCompletionMin === "number")
                        m.gpuCompletionMin = d.gpuCompletionMin;
                    else if (typeof d.gpuCompletionMin === "object")
                        m.gpuCompletionMin = new $util.LongBits(d.gpuCompletionMin.low >>> 0, d.gpuCompletionMin.high >>> 0).toNumber();
                }
                if (d.gpuCompletionAvg != null) {
                    m.gpuCompletionAvg = Number(d.gpuCompletionAvg);
                }
                if (d.uiRecordCount != null) {
                    m.uiRecordCount = d.uiRecordCount >>> 0;
                }
                if (d.uiRecordMax != null) {
                    if ($util.Long)
                        (m.uiRecordMax = $util.Long.fromValue(d.uiRecordMax)).unsigned = false;
                    else if (typeof d.uiRecordMax === "string")
                        m.uiRecordMax = parseInt(d.uiRecordMax, 10);
                    else if (typeof d.uiRecordMax === "number")
                        m.uiRecordMax = d.uiRecordMax;
                    else if (typeof d.uiRecordMax === "object")
                        m.uiRecordMax = new $util.LongBits(d.uiRecordMax.low >>> 0, d.uiRecordMax.high >>> 0).toNumber();
                }
                if (d.uiRecordMin != null) {
                    if ($util.Long)
                        (m.uiRecordMin = $util.Long.fromValue(d.uiRecordMin)).unsigned = false;
                    else if (typeof d.uiRecordMin === "string")
                        m.uiRecordMin = parseInt(d.uiRecordMin, 10);
                    else if (typeof d.uiRecordMin === "number")
                        m.uiRecordMin = d.uiRecordMin;
                    else if (typeof d.uiRecordMin === "object")
                        m.uiRecordMin = new $util.LongBits(d.uiRecordMin.low >>> 0, d.uiRecordMin.high >>> 0).toNumber();
                }
                if (d.uiRecordAvg != null) {
                    m.uiRecordAvg = Number(d.uiRecordAvg);
                }
                if (d.shaderCompileCount != null) {
                    m.shaderCompileCount = d.shaderCompileCount >>> 0;
                }
                if (d.shaderCompileTime != null) {
                    if ($util.Long)
                        (m.shaderCompileTime = $util.Long.fromValue(d.shaderCompileTime)).unsigned = false;
                    else if (typeof d.shaderCompileTime === "string")
                        m.shaderCompileTime = parseInt(d.shaderCompileTime, 10);
                    else if (typeof d.shaderCompileTime === "number")
                        m.shaderCompileTime = d.shaderCompileTime;
                    else if (typeof d.shaderCompileTime === "object")
                        m.shaderCompileTime = new $util.LongBits(d.shaderCompileTime.low >>> 0, d.shaderCompileTime.high >>> 0).toNumber();
                }
                if (d.shaderCompileAvg != null) {
                    m.shaderCompileAvg = Number(d.shaderCompileAvg);
                }
                if (d.cacheHitCount != null) {
                    m.cacheHitCount = d.cacheHitCount >>> 0;
                }
                if (d.cacheHitTime != null) {
                    if ($util.Long)
                        (m.cacheHitTime = $util.Long.fromValue(d.cacheHitTime)).unsigned = false;
                    else if (typeof d.cacheHitTime === "string")
                        m.cacheHitTime = parseInt(d.cacheHitTime, 10);
                    else if (typeof d.cacheHitTime === "number")
                        m.cacheHitTime = d.cacheHitTime;
                    else if (typeof d.cacheHitTime === "object")
                        m.cacheHitTime = new $util.LongBits(d.cacheHitTime.low >>> 0, d.cacheHitTime.high >>> 0).toNumber();
                }
                if (d.cacheHitAvg != null) {
                    m.cacheHitAvg = Number(d.cacheHitAvg);
                }
                if (d.cacheMissCount != null) {
                    m.cacheMissCount = d.cacheMissCount >>> 0;
                }
                if (d.cacheMissTime != null) {
                    if ($util.Long)
                        (m.cacheMissTime = $util.Long.fromValue(d.cacheMissTime)).unsigned = false;
                    else if (typeof d.cacheMissTime === "string")
                        m.cacheMissTime = parseInt(d.cacheMissTime, 10);
                    else if (typeof d.cacheMissTime === "number")
                        m.cacheMissTime = d.cacheMissTime;
                    else if (typeof d.cacheMissTime === "object")
                        m.cacheMissTime = new $util.LongBits(d.cacheMissTime.low >>> 0, d.cacheMissTime.high >>> 0).toNumber();
                }
                if (d.cacheMissAvg != null) {
                    m.cacheMissAvg = Number(d.cacheMissAvg);
                }
                if (d.graphicsCpuMemMax != null) {
                    if ($util.Long)
                        (m.graphicsCpuMemMax = $util.Long.fromValue(d.graphicsCpuMemMax)).unsigned = false;
                    else if (typeof d.graphicsCpuMemMax === "string")
                        m.graphicsCpuMemMax = parseInt(d.graphicsCpuMemMax, 10);
                    else if (typeof d.graphicsCpuMemMax === "number")
                        m.graphicsCpuMemMax = d.graphicsCpuMemMax;
                    else if (typeof d.graphicsCpuMemMax === "object")
                        m.graphicsCpuMemMax = new $util.LongBits(d.graphicsCpuMemMax.low >>> 0, d.graphicsCpuMemMax.high >>> 0).toNumber();
                }
                if (d.graphicsCpuMemMin != null) {
                    if ($util.Long)
                        (m.graphicsCpuMemMin = $util.Long.fromValue(d.graphicsCpuMemMin)).unsigned = false;
                    else if (typeof d.graphicsCpuMemMin === "string")
                        m.graphicsCpuMemMin = parseInt(d.graphicsCpuMemMin, 10);
                    else if (typeof d.graphicsCpuMemMin === "number")
                        m.graphicsCpuMemMin = d.graphicsCpuMemMin;
                    else if (typeof d.graphicsCpuMemMin === "object")
                        m.graphicsCpuMemMin = new $util.LongBits(d.graphicsCpuMemMin.low >>> 0, d.graphicsCpuMemMin.high >>> 0).toNumber();
                }
                if (d.graphicsCpuMemAvg != null) {
                    m.graphicsCpuMemAvg = Number(d.graphicsCpuMemAvg);
                }
                if (d.graphicsGpuMemMax != null) {
                    if ($util.Long)
                        (m.graphicsGpuMemMax = $util.Long.fromValue(d.graphicsGpuMemMax)).unsigned = false;
                    else if (typeof d.graphicsGpuMemMax === "string")
                        m.graphicsGpuMemMax = parseInt(d.graphicsGpuMemMax, 10);
                    else if (typeof d.graphicsGpuMemMax === "number")
                        m.graphicsGpuMemMax = d.graphicsGpuMemMax;
                    else if (typeof d.graphicsGpuMemMax === "object")
                        m.graphicsGpuMemMax = new $util.LongBits(d.graphicsGpuMemMax.low >>> 0, d.graphicsGpuMemMax.high >>> 0).toNumber();
                }
                if (d.graphicsGpuMemMin != null) {
                    if ($util.Long)
                        (m.graphicsGpuMemMin = $util.Long.fromValue(d.graphicsGpuMemMin)).unsigned = false;
                    else if (typeof d.graphicsGpuMemMin === "string")
                        m.graphicsGpuMemMin = parseInt(d.graphicsGpuMemMin, 10);
                    else if (typeof d.graphicsGpuMemMin === "number")
                        m.graphicsGpuMemMin = d.graphicsGpuMemMin;
                    else if (typeof d.graphicsGpuMemMin === "object")
                        m.graphicsGpuMemMin = new $util.LongBits(d.graphicsGpuMemMin.low >>> 0, d.graphicsGpuMemMin.high >>> 0).toNumber();
                }
                if (d.graphicsGpuMemAvg != null) {
                    m.graphicsGpuMemAvg = Number(d.graphicsGpuMemAvg);
                }
                if (d.textureMemMax != null) {
                    if ($util.Long)
                        (m.textureMemMax = $util.Long.fromValue(d.textureMemMax)).unsigned = false;
                    else if (typeof d.textureMemMax === "string")
                        m.textureMemMax = parseInt(d.textureMemMax, 10);
                    else if (typeof d.textureMemMax === "number")
                        m.textureMemMax = d.textureMemMax;
                    else if (typeof d.textureMemMax === "object")
                        m.textureMemMax = new $util.LongBits(d.textureMemMax.low >>> 0, d.textureMemMax.high >>> 0).toNumber();
                }
                if (d.textureMemMin != null) {
                    if ($util.Long)
                        (m.textureMemMin = $util.Long.fromValue(d.textureMemMin)).unsigned = false;
                    else if (typeof d.textureMemMin === "string")
                        m.textureMemMin = parseInt(d.textureMemMin, 10);
                    else if (typeof d.textureMemMin === "number")
                        m.textureMemMin = d.textureMemMin;
                    else if (typeof d.textureMemMin === "object")
                        m.textureMemMin = new $util.LongBits(d.textureMemMin.low >>> 0, d.textureMemMin.high >>> 0).toNumber();
                }
                if (d.textureMemAvg != null) {
                    m.textureMemAvg = Number(d.textureMemAvg);
                }
                if (d.allMemMax != null) {
                    if ($util.Long)
                        (m.allMemMax = $util.Long.fromValue(d.allMemMax)).unsigned = false;
                    else if (typeof d.allMemMax === "string")
                        m.allMemMax = parseInt(d.allMemMax, 10);
                    else if (typeof d.allMemMax === "number")
                        m.allMemMax = d.allMemMax;
                    else if (typeof d.allMemMax === "object")
                        m.allMemMax = new $util.LongBits(d.allMemMax.low >>> 0, d.allMemMax.high >>> 0).toNumber();
                }
                if (d.allMemMin != null) {
                    if ($util.Long)
                        (m.allMemMin = $util.Long.fromValue(d.allMemMin)).unsigned = false;
                    else if (typeof d.allMemMin === "string")
                        m.allMemMin = parseInt(d.allMemMin, 10);
                    else if (typeof d.allMemMin === "number")
                        m.allMemMin = d.allMemMin;
                    else if (typeof d.allMemMin === "object")
                        m.allMemMin = new $util.LongBits(d.allMemMin.low >>> 0, d.allMemMin.high >>> 0).toNumber();
                }
                if (d.allMemAvg != null) {
                    m.allMemAvg = Number(d.allMemAvg);
                }
                return m;
            };

            /**
             * Creates a plain object from a ProcessRenderInfo message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ProcessRenderInfo
             * @static
             * @param {perfetto.protos.ProcessRenderInfo} m ProcessRenderInfo
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ProcessRenderInfo.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.processName = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.rtCpuTimeMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.rtCpuTimeMs = o.longs === String ? "0" : 0;
                    d.drawFrameCount = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.drawFrameMax = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.drawFrameMax = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.drawFrameMin = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.drawFrameMin = o.longs === String ? "0" : 0;
                    d.drawFrameAvg = 0;
                    d.flushCount = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.flushMax = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.flushMax = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.flushMin = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.flushMin = o.longs === String ? "0" : 0;
                    d.flushAvg = 0;
                    d.prepareTreeCount = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.prepareTreeMax = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.prepareTreeMax = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.prepareTreeMin = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.prepareTreeMin = o.longs === String ? "0" : 0;
                    d.prepareTreeAvg = 0;
                    d.gpuCompletionCount = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.gpuCompletionMax = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.gpuCompletionMax = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.gpuCompletionMin = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.gpuCompletionMin = o.longs === String ? "0" : 0;
                    d.gpuCompletionAvg = 0;
                    d.uiRecordCount = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.uiRecordMax = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.uiRecordMax = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.uiRecordMin = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.uiRecordMin = o.longs === String ? "0" : 0;
                    d.uiRecordAvg = 0;
                    d.shaderCompileCount = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.shaderCompileTime = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.shaderCompileTime = o.longs === String ? "0" : 0;
                    d.shaderCompileAvg = 0;
                    d.cacheHitCount = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.cacheHitTime = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.cacheHitTime = o.longs === String ? "0" : 0;
                    d.cacheHitAvg = 0;
                    d.cacheMissCount = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.cacheMissTime = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.cacheMissTime = o.longs === String ? "0" : 0;
                    d.cacheMissAvg = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.graphicsCpuMemMax = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.graphicsCpuMemMax = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.graphicsCpuMemMin = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.graphicsCpuMemMin = o.longs === String ? "0" : 0;
                    d.graphicsCpuMemAvg = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.graphicsGpuMemMax = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.graphicsGpuMemMax = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.graphicsGpuMemMin = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.graphicsGpuMemMin = o.longs === String ? "0" : 0;
                    d.graphicsGpuMemAvg = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.textureMemMax = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.textureMemMax = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.textureMemMin = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.textureMemMin = o.longs === String ? "0" : 0;
                    d.textureMemAvg = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.allMemMax = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.allMemMax = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.allMemMin = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.allMemMin = o.longs === String ? "0" : 0;
                    d.allMemAvg = 0;
                }
                if (m.processName != null && m.hasOwnProperty("processName")) {
                    d.processName = m.processName;
                }
                if (m.rtCpuTimeMs != null && m.hasOwnProperty("rtCpuTimeMs")) {
                    if (typeof m.rtCpuTimeMs === "number")
                        d.rtCpuTimeMs = o.longs === String ? String(m.rtCpuTimeMs) : m.rtCpuTimeMs;
                    else
                        d.rtCpuTimeMs = o.longs === String ? $util.Long.prototype.toString.call(m.rtCpuTimeMs) : o.longs === Number ? new $util.LongBits(m.rtCpuTimeMs.low >>> 0, m.rtCpuTimeMs.high >>> 0).toNumber() : m.rtCpuTimeMs;
                }
                if (m.drawFrameCount != null && m.hasOwnProperty("drawFrameCount")) {
                    d.drawFrameCount = m.drawFrameCount;
                }
                if (m.drawFrameMax != null && m.hasOwnProperty("drawFrameMax")) {
                    if (typeof m.drawFrameMax === "number")
                        d.drawFrameMax = o.longs === String ? String(m.drawFrameMax) : m.drawFrameMax;
                    else
                        d.drawFrameMax = o.longs === String ? $util.Long.prototype.toString.call(m.drawFrameMax) : o.longs === Number ? new $util.LongBits(m.drawFrameMax.low >>> 0, m.drawFrameMax.high >>> 0).toNumber() : m.drawFrameMax;
                }
                if (m.drawFrameMin != null && m.hasOwnProperty("drawFrameMin")) {
                    if (typeof m.drawFrameMin === "number")
                        d.drawFrameMin = o.longs === String ? String(m.drawFrameMin) : m.drawFrameMin;
                    else
                        d.drawFrameMin = o.longs === String ? $util.Long.prototype.toString.call(m.drawFrameMin) : o.longs === Number ? new $util.LongBits(m.drawFrameMin.low >>> 0, m.drawFrameMin.high >>> 0).toNumber() : m.drawFrameMin;
                }
                if (m.drawFrameAvg != null && m.hasOwnProperty("drawFrameAvg")) {
                    d.drawFrameAvg = o.json && !isFinite(m.drawFrameAvg) ? String(m.drawFrameAvg) : m.drawFrameAvg;
                }
                if (m.flushCount != null && m.hasOwnProperty("flushCount")) {
                    d.flushCount = m.flushCount;
                }
                if (m.flushMax != null && m.hasOwnProperty("flushMax")) {
                    if (typeof m.flushMax === "number")
                        d.flushMax = o.longs === String ? String(m.flushMax) : m.flushMax;
                    else
                        d.flushMax = o.longs === String ? $util.Long.prototype.toString.call(m.flushMax) : o.longs === Number ? new $util.LongBits(m.flushMax.low >>> 0, m.flushMax.high >>> 0).toNumber() : m.flushMax;
                }
                if (m.flushMin != null && m.hasOwnProperty("flushMin")) {
                    if (typeof m.flushMin === "number")
                        d.flushMin = o.longs === String ? String(m.flushMin) : m.flushMin;
                    else
                        d.flushMin = o.longs === String ? $util.Long.prototype.toString.call(m.flushMin) : o.longs === Number ? new $util.LongBits(m.flushMin.low >>> 0, m.flushMin.high >>> 0).toNumber() : m.flushMin;
                }
                if (m.flushAvg != null && m.hasOwnProperty("flushAvg")) {
                    d.flushAvg = o.json && !isFinite(m.flushAvg) ? String(m.flushAvg) : m.flushAvg;
                }
                if (m.prepareTreeCount != null && m.hasOwnProperty("prepareTreeCount")) {
                    d.prepareTreeCount = m.prepareTreeCount;
                }
                if (m.prepareTreeMax != null && m.hasOwnProperty("prepareTreeMax")) {
                    if (typeof m.prepareTreeMax === "number")
                        d.prepareTreeMax = o.longs === String ? String(m.prepareTreeMax) : m.prepareTreeMax;
                    else
                        d.prepareTreeMax = o.longs === String ? $util.Long.prototype.toString.call(m.prepareTreeMax) : o.longs === Number ? new $util.LongBits(m.prepareTreeMax.low >>> 0, m.prepareTreeMax.high >>> 0).toNumber() : m.prepareTreeMax;
                }
                if (m.prepareTreeMin != null && m.hasOwnProperty("prepareTreeMin")) {
                    if (typeof m.prepareTreeMin === "number")
                        d.prepareTreeMin = o.longs === String ? String(m.prepareTreeMin) : m.prepareTreeMin;
                    else
                        d.prepareTreeMin = o.longs === String ? $util.Long.prototype.toString.call(m.prepareTreeMin) : o.longs === Number ? new $util.LongBits(m.prepareTreeMin.low >>> 0, m.prepareTreeMin.high >>> 0).toNumber() : m.prepareTreeMin;
                }
                if (m.prepareTreeAvg != null && m.hasOwnProperty("prepareTreeAvg")) {
                    d.prepareTreeAvg = o.json && !isFinite(m.prepareTreeAvg) ? String(m.prepareTreeAvg) : m.prepareTreeAvg;
                }
                if (m.gpuCompletionCount != null && m.hasOwnProperty("gpuCompletionCount")) {
                    d.gpuCompletionCount = m.gpuCompletionCount;
                }
                if (m.gpuCompletionMax != null && m.hasOwnProperty("gpuCompletionMax")) {
                    if (typeof m.gpuCompletionMax === "number")
                        d.gpuCompletionMax = o.longs === String ? String(m.gpuCompletionMax) : m.gpuCompletionMax;
                    else
                        d.gpuCompletionMax = o.longs === String ? $util.Long.prototype.toString.call(m.gpuCompletionMax) : o.longs === Number ? new $util.LongBits(m.gpuCompletionMax.low >>> 0, m.gpuCompletionMax.high >>> 0).toNumber() : m.gpuCompletionMax;
                }
                if (m.gpuCompletionMin != null && m.hasOwnProperty("gpuCompletionMin")) {
                    if (typeof m.gpuCompletionMin === "number")
                        d.gpuCompletionMin = o.longs === String ? String(m.gpuCompletionMin) : m.gpuCompletionMin;
                    else
                        d.gpuCompletionMin = o.longs === String ? $util.Long.prototype.toString.call(m.gpuCompletionMin) : o.longs === Number ? new $util.LongBits(m.gpuCompletionMin.low >>> 0, m.gpuCompletionMin.high >>> 0).toNumber() : m.gpuCompletionMin;
                }
                if (m.gpuCompletionAvg != null && m.hasOwnProperty("gpuCompletionAvg")) {
                    d.gpuCompletionAvg = o.json && !isFinite(m.gpuCompletionAvg) ? String(m.gpuCompletionAvg) : m.gpuCompletionAvg;
                }
                if (m.uiRecordCount != null && m.hasOwnProperty("uiRecordCount")) {
                    d.uiRecordCount = m.uiRecordCount;
                }
                if (m.uiRecordMax != null && m.hasOwnProperty("uiRecordMax")) {
                    if (typeof m.uiRecordMax === "number")
                        d.uiRecordMax = o.longs === String ? String(m.uiRecordMax) : m.uiRecordMax;
                    else
                        d.uiRecordMax = o.longs === String ? $util.Long.prototype.toString.call(m.uiRecordMax) : o.longs === Number ? new $util.LongBits(m.uiRecordMax.low >>> 0, m.uiRecordMax.high >>> 0).toNumber() : m.uiRecordMax;
                }
                if (m.uiRecordMin != null && m.hasOwnProperty("uiRecordMin")) {
                    if (typeof m.uiRecordMin === "number")
                        d.uiRecordMin = o.longs === String ? String(m.uiRecordMin) : m.uiRecordMin;
                    else
                        d.uiRecordMin = o.longs === String ? $util.Long.prototype.toString.call(m.uiRecordMin) : o.longs === Number ? new $util.LongBits(m.uiRecordMin.low >>> 0, m.uiRecordMin.high >>> 0).toNumber() : m.uiRecordMin;
                }
                if (m.uiRecordAvg != null && m.hasOwnProperty("uiRecordAvg")) {
                    d.uiRecordAvg = o.json && !isFinite(m.uiRecordAvg) ? String(m.uiRecordAvg) : m.uiRecordAvg;
                }
                if (m.shaderCompileCount != null && m.hasOwnProperty("shaderCompileCount")) {
                    d.shaderCompileCount = m.shaderCompileCount;
                }
                if (m.shaderCompileTime != null && m.hasOwnProperty("shaderCompileTime")) {
                    if (typeof m.shaderCompileTime === "number")
                        d.shaderCompileTime = o.longs === String ? String(m.shaderCompileTime) : m.shaderCompileTime;
                    else
                        d.shaderCompileTime = o.longs === String ? $util.Long.prototype.toString.call(m.shaderCompileTime) : o.longs === Number ? new $util.LongBits(m.shaderCompileTime.low >>> 0, m.shaderCompileTime.high >>> 0).toNumber() : m.shaderCompileTime;
                }
                if (m.shaderCompileAvg != null && m.hasOwnProperty("shaderCompileAvg")) {
                    d.shaderCompileAvg = o.json && !isFinite(m.shaderCompileAvg) ? String(m.shaderCompileAvg) : m.shaderCompileAvg;
                }
                if (m.cacheHitCount != null && m.hasOwnProperty("cacheHitCount")) {
                    d.cacheHitCount = m.cacheHitCount;
                }
                if (m.cacheHitTime != null && m.hasOwnProperty("cacheHitTime")) {
                    if (typeof m.cacheHitTime === "number")
                        d.cacheHitTime = o.longs === String ? String(m.cacheHitTime) : m.cacheHitTime;
                    else
                        d.cacheHitTime = o.longs === String ? $util.Long.prototype.toString.call(m.cacheHitTime) : o.longs === Number ? new $util.LongBits(m.cacheHitTime.low >>> 0, m.cacheHitTime.high >>> 0).toNumber() : m.cacheHitTime;
                }
                if (m.cacheHitAvg != null && m.hasOwnProperty("cacheHitAvg")) {
                    d.cacheHitAvg = o.json && !isFinite(m.cacheHitAvg) ? String(m.cacheHitAvg) : m.cacheHitAvg;
                }
                if (m.cacheMissCount != null && m.hasOwnProperty("cacheMissCount")) {
                    d.cacheMissCount = m.cacheMissCount;
                }
                if (m.cacheMissTime != null && m.hasOwnProperty("cacheMissTime")) {
                    if (typeof m.cacheMissTime === "number")
                        d.cacheMissTime = o.longs === String ? String(m.cacheMissTime) : m.cacheMissTime;
                    else
                        d.cacheMissTime = o.longs === String ? $util.Long.prototype.toString.call(m.cacheMissTime) : o.longs === Number ? new $util.LongBits(m.cacheMissTime.low >>> 0, m.cacheMissTime.high >>> 0).toNumber() : m.cacheMissTime;
                }
                if (m.cacheMissAvg != null && m.hasOwnProperty("cacheMissAvg")) {
                    d.cacheMissAvg = o.json && !isFinite(m.cacheMissAvg) ? String(m.cacheMissAvg) : m.cacheMissAvg;
                }
                if (m.graphicsCpuMemMax != null && m.hasOwnProperty("graphicsCpuMemMax")) {
                    if (typeof m.graphicsCpuMemMax === "number")
                        d.graphicsCpuMemMax = o.longs === String ? String(m.graphicsCpuMemMax) : m.graphicsCpuMemMax;
                    else
                        d.graphicsCpuMemMax = o.longs === String ? $util.Long.prototype.toString.call(m.graphicsCpuMemMax) : o.longs === Number ? new $util.LongBits(m.graphicsCpuMemMax.low >>> 0, m.graphicsCpuMemMax.high >>> 0).toNumber() : m.graphicsCpuMemMax;
                }
                if (m.graphicsCpuMemMin != null && m.hasOwnProperty("graphicsCpuMemMin")) {
                    if (typeof m.graphicsCpuMemMin === "number")
                        d.graphicsCpuMemMin = o.longs === String ? String(m.graphicsCpuMemMin) : m.graphicsCpuMemMin;
                    else
                        d.graphicsCpuMemMin = o.longs === String ? $util.Long.prototype.toString.call(m.graphicsCpuMemMin) : o.longs === Number ? new $util.LongBits(m.graphicsCpuMemMin.low >>> 0, m.graphicsCpuMemMin.high >>> 0).toNumber() : m.graphicsCpuMemMin;
                }
                if (m.graphicsCpuMemAvg != null && m.hasOwnProperty("graphicsCpuMemAvg")) {
                    d.graphicsCpuMemAvg = o.json && !isFinite(m.graphicsCpuMemAvg) ? String(m.graphicsCpuMemAvg) : m.graphicsCpuMemAvg;
                }
                if (m.graphicsGpuMemMax != null && m.hasOwnProperty("graphicsGpuMemMax")) {
                    if (typeof m.graphicsGpuMemMax === "number")
                        d.graphicsGpuMemMax = o.longs === String ? String(m.graphicsGpuMemMax) : m.graphicsGpuMemMax;
                    else
                        d.graphicsGpuMemMax = o.longs === String ? $util.Long.prototype.toString.call(m.graphicsGpuMemMax) : o.longs === Number ? new $util.LongBits(m.graphicsGpuMemMax.low >>> 0, m.graphicsGpuMemMax.high >>> 0).toNumber() : m.graphicsGpuMemMax;
                }
                if (m.graphicsGpuMemMin != null && m.hasOwnProperty("graphicsGpuMemMin")) {
                    if (typeof m.graphicsGpuMemMin === "number")
                        d.graphicsGpuMemMin = o.longs === String ? String(m.graphicsGpuMemMin) : m.graphicsGpuMemMin;
                    else
                        d.graphicsGpuMemMin = o.longs === String ? $util.Long.prototype.toString.call(m.graphicsGpuMemMin) : o.longs === Number ? new $util.LongBits(m.graphicsGpuMemMin.low >>> 0, m.graphicsGpuMemMin.high >>> 0).toNumber() : m.graphicsGpuMemMin;
                }
                if (m.graphicsGpuMemAvg != null && m.hasOwnProperty("graphicsGpuMemAvg")) {
                    d.graphicsGpuMemAvg = o.json && !isFinite(m.graphicsGpuMemAvg) ? String(m.graphicsGpuMemAvg) : m.graphicsGpuMemAvg;
                }
                if (m.textureMemMax != null && m.hasOwnProperty("textureMemMax")) {
                    if (typeof m.textureMemMax === "number")
                        d.textureMemMax = o.longs === String ? String(m.textureMemMax) : m.textureMemMax;
                    else
                        d.textureMemMax = o.longs === String ? $util.Long.prototype.toString.call(m.textureMemMax) : o.longs === Number ? new $util.LongBits(m.textureMemMax.low >>> 0, m.textureMemMax.high >>> 0).toNumber() : m.textureMemMax;
                }
                if (m.textureMemMin != null && m.hasOwnProperty("textureMemMin")) {
                    if (typeof m.textureMemMin === "number")
                        d.textureMemMin = o.longs === String ? String(m.textureMemMin) : m.textureMemMin;
                    else
                        d.textureMemMin = o.longs === String ? $util.Long.prototype.toString.call(m.textureMemMin) : o.longs === Number ? new $util.LongBits(m.textureMemMin.low >>> 0, m.textureMemMin.high >>> 0).toNumber() : m.textureMemMin;
                }
                if (m.textureMemAvg != null && m.hasOwnProperty("textureMemAvg")) {
                    d.textureMemAvg = o.json && !isFinite(m.textureMemAvg) ? String(m.textureMemAvg) : m.textureMemAvg;
                }
                if (m.allMemMax != null && m.hasOwnProperty("allMemMax")) {
                    if (typeof m.allMemMax === "number")
                        d.allMemMax = o.longs === String ? String(m.allMemMax) : m.allMemMax;
                    else
                        d.allMemMax = o.longs === String ? $util.Long.prototype.toString.call(m.allMemMax) : o.longs === Number ? new $util.LongBits(m.allMemMax.low >>> 0, m.allMemMax.high >>> 0).toNumber() : m.allMemMax;
                }
                if (m.allMemMin != null && m.hasOwnProperty("allMemMin")) {
                    if (typeof m.allMemMin === "number")
                        d.allMemMin = o.longs === String ? String(m.allMemMin) : m.allMemMin;
                    else
                        d.allMemMin = o.longs === String ? $util.Long.prototype.toString.call(m.allMemMin) : o.longs === Number ? new $util.LongBits(m.allMemMin.low >>> 0, m.allMemMin.high >>> 0).toNumber() : m.allMemMin;
                }
                if (m.allMemAvg != null && m.hasOwnProperty("allMemAvg")) {
                    d.allMemAvg = o.json && !isFinite(m.allMemAvg) ? String(m.allMemAvg) : m.allMemAvg;
                }
                return d;
            };

            /**
             * Converts this ProcessRenderInfo to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ProcessRenderInfo
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ProcessRenderInfo.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ProcessRenderInfo;
        })();

        protos.AndroidHwuiMetric = (function() {

            /**
             * Properties of an AndroidHwuiMetric.
             * @memberof perfetto.protos
             * @interface IAndroidHwuiMetric
             * @property {Array.<perfetto.protos.IProcessRenderInfo>|null} [processInfo] AndroidHwuiMetric processInfo
             */

            /**
             * Constructs a new AndroidHwuiMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidHwuiMetric.
             * @implements IAndroidHwuiMetric
             * @constructor
             * @param {perfetto.protos.IAndroidHwuiMetric=} [p] Properties to set
             */
            function AndroidHwuiMetric(p) {
                this.processInfo = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidHwuiMetric processInfo.
             * @member {Array.<perfetto.protos.IProcessRenderInfo>} processInfo
             * @memberof perfetto.protos.AndroidHwuiMetric
             * @instance
             */
            AndroidHwuiMetric.prototype.processInfo = $util.emptyArray;

            /**
             * Creates a new AndroidHwuiMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidHwuiMetric
             * @static
             * @param {perfetto.protos.IAndroidHwuiMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidHwuiMetric} AndroidHwuiMetric instance
             */
            AndroidHwuiMetric.create = function create(properties) {
                return new AndroidHwuiMetric(properties);
            };

            /**
             * Encodes the specified AndroidHwuiMetric message. Does not implicitly {@link perfetto.protos.AndroidHwuiMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidHwuiMetric
             * @static
             * @param {perfetto.protos.IAndroidHwuiMetric} m AndroidHwuiMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidHwuiMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.processInfo != null && m.processInfo.length) {
                    for (var i = 0; i < m.processInfo.length; ++i)
                        $root.perfetto.protos.ProcessRenderInfo.encode(m.processInfo[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified AndroidHwuiMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidHwuiMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidHwuiMetric
             * @static
             * @param {perfetto.protos.IAndroidHwuiMetric} message AndroidHwuiMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidHwuiMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidHwuiMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidHwuiMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidHwuiMetric} AndroidHwuiMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidHwuiMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidHwuiMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.processInfo && m.processInfo.length))
                            m.processInfo = [];
                        m.processInfo.push($root.perfetto.protos.ProcessRenderInfo.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidHwuiMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidHwuiMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidHwuiMetric} AndroidHwuiMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidHwuiMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidHwuiMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidHwuiMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidHwuiMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.processInfo != null && m.hasOwnProperty("processInfo")) {
                    if (!Array.isArray(m.processInfo))
                        return "processInfo: array expected";
                    for (var i = 0; i < m.processInfo.length; ++i) {
                        {
                            var e = $root.perfetto.protos.ProcessRenderInfo.verify(m.processInfo[i]);
                            if (e)
                                return "processInfo." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidHwuiMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidHwuiMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidHwuiMetric} AndroidHwuiMetric
             */
            AndroidHwuiMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidHwuiMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidHwuiMetric();
                if (d.processInfo) {
                    if (!Array.isArray(d.processInfo))
                        throw TypeError(".perfetto.protos.AndroidHwuiMetric.processInfo: array expected");
                    m.processInfo = [];
                    for (var i = 0; i < d.processInfo.length; ++i) {
                        if (typeof d.processInfo[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidHwuiMetric.processInfo: object expected");
                        m.processInfo[i] = $root.perfetto.protos.ProcessRenderInfo.fromObject(d.processInfo[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidHwuiMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidHwuiMetric
             * @static
             * @param {perfetto.protos.AndroidHwuiMetric} m AndroidHwuiMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidHwuiMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.processInfo = [];
                }
                if (m.processInfo && m.processInfo.length) {
                    d.processInfo = [];
                    for (var j = 0; j < m.processInfo.length; ++j) {
                        d.processInfo[j] = $root.perfetto.protos.ProcessRenderInfo.toObject(m.processInfo[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidHwuiMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidHwuiMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidHwuiMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AndroidHwuiMetric;
        })();

        protos.AndroidIonMetric = (function() {

            /**
             * Properties of an AndroidIonMetric.
             * @memberof perfetto.protos
             * @interface IAndroidIonMetric
             * @property {Array.<perfetto.protos.AndroidIonMetric.IBuffer>|null} [buffer] AndroidIonMetric buffer
             */

            /**
             * Constructs a new AndroidIonMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidIonMetric.
             * @implements IAndroidIonMetric
             * @constructor
             * @param {perfetto.protos.IAndroidIonMetric=} [p] Properties to set
             */
            function AndroidIonMetric(p) {
                this.buffer = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidIonMetric buffer.
             * @member {Array.<perfetto.protos.AndroidIonMetric.IBuffer>} buffer
             * @memberof perfetto.protos.AndroidIonMetric
             * @instance
             */
            AndroidIonMetric.prototype.buffer = $util.emptyArray;

            /**
             * Creates a new AndroidIonMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidIonMetric
             * @static
             * @param {perfetto.protos.IAndroidIonMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidIonMetric} AndroidIonMetric instance
             */
            AndroidIonMetric.create = function create(properties) {
                return new AndroidIonMetric(properties);
            };

            /**
             * Encodes the specified AndroidIonMetric message. Does not implicitly {@link perfetto.protos.AndroidIonMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidIonMetric
             * @static
             * @param {perfetto.protos.IAndroidIonMetric} m AndroidIonMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidIonMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.buffer != null && m.buffer.length) {
                    for (var i = 0; i < m.buffer.length; ++i)
                        $root.perfetto.protos.AndroidIonMetric.Buffer.encode(m.buffer[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified AndroidIonMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidIonMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidIonMetric
             * @static
             * @param {perfetto.protos.IAndroidIonMetric} message AndroidIonMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidIonMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidIonMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidIonMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidIonMetric} AndroidIonMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidIonMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidIonMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.buffer && m.buffer.length))
                            m.buffer = [];
                        m.buffer.push($root.perfetto.protos.AndroidIonMetric.Buffer.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidIonMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidIonMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidIonMetric} AndroidIonMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidIonMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidIonMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidIonMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidIonMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.buffer != null && m.hasOwnProperty("buffer")) {
                    if (!Array.isArray(m.buffer))
                        return "buffer: array expected";
                    for (var i = 0; i < m.buffer.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidIonMetric.Buffer.verify(m.buffer[i]);
                            if (e)
                                return "buffer." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidIonMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidIonMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidIonMetric} AndroidIonMetric
             */
            AndroidIonMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidIonMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidIonMetric();
                if (d.buffer) {
                    if (!Array.isArray(d.buffer))
                        throw TypeError(".perfetto.protos.AndroidIonMetric.buffer: array expected");
                    m.buffer = [];
                    for (var i = 0; i < d.buffer.length; ++i) {
                        if (typeof d.buffer[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidIonMetric.buffer: object expected");
                        m.buffer[i] = $root.perfetto.protos.AndroidIonMetric.Buffer.fromObject(d.buffer[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidIonMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidIonMetric
             * @static
             * @param {perfetto.protos.AndroidIonMetric} m AndroidIonMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidIonMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.buffer = [];
                }
                if (m.buffer && m.buffer.length) {
                    d.buffer = [];
                    for (var j = 0; j < m.buffer.length; ++j) {
                        d.buffer[j] = $root.perfetto.protos.AndroidIonMetric.Buffer.toObject(m.buffer[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidIonMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidIonMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidIonMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidIonMetric.Buffer = (function() {

                /**
                 * Properties of a Buffer.
                 * @memberof perfetto.protos.AndroidIonMetric
                 * @interface IBuffer
                 * @property {string|null} [name] Buffer name
                 * @property {number|null} [avgSizeBytes] Buffer avgSizeBytes
                 * @property {number|null} [minSizeBytes] Buffer minSizeBytes
                 * @property {number|null} [maxSizeBytes] Buffer maxSizeBytes
                 * @property {number|null} [totalAllocSizeBytes] Buffer totalAllocSizeBytes
                 */

                /**
                 * Constructs a new Buffer.
                 * @memberof perfetto.protos.AndroidIonMetric
                 * @classdesc Represents a Buffer.
                 * @implements IBuffer
                 * @constructor
                 * @param {perfetto.protos.AndroidIonMetric.IBuffer=} [p] Properties to set
                 */
                function Buffer(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Buffer name.
                 * @member {string} name
                 * @memberof perfetto.protos.AndroidIonMetric.Buffer
                 * @instance
                 */
                Buffer.prototype.name = "";

                /**
                 * Buffer avgSizeBytes.
                 * @member {number} avgSizeBytes
                 * @memberof perfetto.protos.AndroidIonMetric.Buffer
                 * @instance
                 */
                Buffer.prototype.avgSizeBytes = 0;

                /**
                 * Buffer minSizeBytes.
                 * @member {number} minSizeBytes
                 * @memberof perfetto.protos.AndroidIonMetric.Buffer
                 * @instance
                 */
                Buffer.prototype.minSizeBytes = 0;

                /**
                 * Buffer maxSizeBytes.
                 * @member {number} maxSizeBytes
                 * @memberof perfetto.protos.AndroidIonMetric.Buffer
                 * @instance
                 */
                Buffer.prototype.maxSizeBytes = 0;

                /**
                 * Buffer totalAllocSizeBytes.
                 * @member {number} totalAllocSizeBytes
                 * @memberof perfetto.protos.AndroidIonMetric.Buffer
                 * @instance
                 */
                Buffer.prototype.totalAllocSizeBytes = 0;

                /**
                 * Creates a new Buffer instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidIonMetric.Buffer
                 * @static
                 * @param {perfetto.protos.AndroidIonMetric.IBuffer=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidIonMetric.Buffer} Buffer instance
                 */
                Buffer.create = function create(properties) {
                    return new Buffer(properties);
                };

                /**
                 * Encodes the specified Buffer message. Does not implicitly {@link perfetto.protos.AndroidIonMetric.Buffer.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidIonMetric.Buffer
                 * @static
                 * @param {perfetto.protos.AndroidIonMetric.IBuffer} m Buffer message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Buffer.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(10).string(m.name);
                    if (m.avgSizeBytes != null && Object.hasOwnProperty.call(m, "avgSizeBytes"))
                        w.uint32(17).double(m.avgSizeBytes);
                    if (m.minSizeBytes != null && Object.hasOwnProperty.call(m, "minSizeBytes"))
                        w.uint32(25).double(m.minSizeBytes);
                    if (m.maxSizeBytes != null && Object.hasOwnProperty.call(m, "maxSizeBytes"))
                        w.uint32(33).double(m.maxSizeBytes);
                    if (m.totalAllocSizeBytes != null && Object.hasOwnProperty.call(m, "totalAllocSizeBytes"))
                        w.uint32(41).double(m.totalAllocSizeBytes);
                    return w;
                };

                /**
                 * Encodes the specified Buffer message, length delimited. Does not implicitly {@link perfetto.protos.AndroidIonMetric.Buffer.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidIonMetric.Buffer
                 * @static
                 * @param {perfetto.protos.AndroidIonMetric.IBuffer} message Buffer message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Buffer.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Buffer message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidIonMetric.Buffer
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidIonMetric.Buffer} Buffer
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Buffer.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidIonMetric.Buffer();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.name = r.string();
                            break;
                        case 2:
                            m.avgSizeBytes = r.double();
                            break;
                        case 3:
                            m.minSizeBytes = r.double();
                            break;
                        case 4:
                            m.maxSizeBytes = r.double();
                            break;
                        case 5:
                            m.totalAllocSizeBytes = r.double();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Buffer message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidIonMetric.Buffer
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidIonMetric.Buffer} Buffer
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Buffer.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Buffer message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidIonMetric.Buffer
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Buffer.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    if (m.avgSizeBytes != null && m.hasOwnProperty("avgSizeBytes")) {
                        if (typeof m.avgSizeBytes !== "number")
                            return "avgSizeBytes: number expected";
                    }
                    if (m.minSizeBytes != null && m.hasOwnProperty("minSizeBytes")) {
                        if (typeof m.minSizeBytes !== "number")
                            return "minSizeBytes: number expected";
                    }
                    if (m.maxSizeBytes != null && m.hasOwnProperty("maxSizeBytes")) {
                        if (typeof m.maxSizeBytes !== "number")
                            return "maxSizeBytes: number expected";
                    }
                    if (m.totalAllocSizeBytes != null && m.hasOwnProperty("totalAllocSizeBytes")) {
                        if (typeof m.totalAllocSizeBytes !== "number")
                            return "totalAllocSizeBytes: number expected";
                    }
                    return null;
                };

                /**
                 * Creates a Buffer message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidIonMetric.Buffer
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidIonMetric.Buffer} Buffer
                 */
                Buffer.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidIonMetric.Buffer)
                        return d;
                    var m = new $root.perfetto.protos.AndroidIonMetric.Buffer();
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    if (d.avgSizeBytes != null) {
                        m.avgSizeBytes = Number(d.avgSizeBytes);
                    }
                    if (d.minSizeBytes != null) {
                        m.minSizeBytes = Number(d.minSizeBytes);
                    }
                    if (d.maxSizeBytes != null) {
                        m.maxSizeBytes = Number(d.maxSizeBytes);
                    }
                    if (d.totalAllocSizeBytes != null) {
                        m.totalAllocSizeBytes = Number(d.totalAllocSizeBytes);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Buffer message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidIonMetric.Buffer
                 * @static
                 * @param {perfetto.protos.AndroidIonMetric.Buffer} m Buffer
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Buffer.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.name = "";
                        d.avgSizeBytes = 0;
                        d.minSizeBytes = 0;
                        d.maxSizeBytes = 0;
                        d.totalAllocSizeBytes = 0;
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    if (m.avgSizeBytes != null && m.hasOwnProperty("avgSizeBytes")) {
                        d.avgSizeBytes = o.json && !isFinite(m.avgSizeBytes) ? String(m.avgSizeBytes) : m.avgSizeBytes;
                    }
                    if (m.minSizeBytes != null && m.hasOwnProperty("minSizeBytes")) {
                        d.minSizeBytes = o.json && !isFinite(m.minSizeBytes) ? String(m.minSizeBytes) : m.minSizeBytes;
                    }
                    if (m.maxSizeBytes != null && m.hasOwnProperty("maxSizeBytes")) {
                        d.maxSizeBytes = o.json && !isFinite(m.maxSizeBytes) ? String(m.maxSizeBytes) : m.maxSizeBytes;
                    }
                    if (m.totalAllocSizeBytes != null && m.hasOwnProperty("totalAllocSizeBytes")) {
                        d.totalAllocSizeBytes = o.json && !isFinite(m.totalAllocSizeBytes) ? String(m.totalAllocSizeBytes) : m.totalAllocSizeBytes;
                    }
                    return d;
                };

                /**
                 * Converts this Buffer to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidIonMetric.Buffer
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Buffer.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Buffer;
            })();

            return AndroidIonMetric;
        })();

        protos.AndroidIrqRuntimeMetric = (function() {

            /**
             * Properties of an AndroidIrqRuntimeMetric.
             * @memberof perfetto.protos
             * @interface IAndroidIrqRuntimeMetric
             * @property {perfetto.protos.AndroidIrqRuntimeMetric.IIrqRuntimeMetric|null} [hwIrq] AndroidIrqRuntimeMetric hwIrq
             * @property {perfetto.protos.AndroidIrqRuntimeMetric.IIrqRuntimeMetric|null} [swIrq] AndroidIrqRuntimeMetric swIrq
             */

            /**
             * Constructs a new AndroidIrqRuntimeMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidIrqRuntimeMetric.
             * @implements IAndroidIrqRuntimeMetric
             * @constructor
             * @param {perfetto.protos.IAndroidIrqRuntimeMetric=} [p] Properties to set
             */
            function AndroidIrqRuntimeMetric(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidIrqRuntimeMetric hwIrq.
             * @member {perfetto.protos.AndroidIrqRuntimeMetric.IIrqRuntimeMetric|null|undefined} hwIrq
             * @memberof perfetto.protos.AndroidIrqRuntimeMetric
             * @instance
             */
            AndroidIrqRuntimeMetric.prototype.hwIrq = null;

            /**
             * AndroidIrqRuntimeMetric swIrq.
             * @member {perfetto.protos.AndroidIrqRuntimeMetric.IIrqRuntimeMetric|null|undefined} swIrq
             * @memberof perfetto.protos.AndroidIrqRuntimeMetric
             * @instance
             */
            AndroidIrqRuntimeMetric.prototype.swIrq = null;

            /**
             * Creates a new AndroidIrqRuntimeMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidIrqRuntimeMetric
             * @static
             * @param {perfetto.protos.IAndroidIrqRuntimeMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidIrqRuntimeMetric} AndroidIrqRuntimeMetric instance
             */
            AndroidIrqRuntimeMetric.create = function create(properties) {
                return new AndroidIrqRuntimeMetric(properties);
            };

            /**
             * Encodes the specified AndroidIrqRuntimeMetric message. Does not implicitly {@link perfetto.protos.AndroidIrqRuntimeMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidIrqRuntimeMetric
             * @static
             * @param {perfetto.protos.IAndroidIrqRuntimeMetric} m AndroidIrqRuntimeMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidIrqRuntimeMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.hwIrq != null && Object.hasOwnProperty.call(m, "hwIrq"))
                    $root.perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric.encode(m.hwIrq, w.uint32(10).fork()).ldelim();
                if (m.swIrq != null && Object.hasOwnProperty.call(m, "swIrq"))
                    $root.perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric.encode(m.swIrq, w.uint32(18).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified AndroidIrqRuntimeMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidIrqRuntimeMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidIrqRuntimeMetric
             * @static
             * @param {perfetto.protos.IAndroidIrqRuntimeMetric} message AndroidIrqRuntimeMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidIrqRuntimeMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidIrqRuntimeMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidIrqRuntimeMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidIrqRuntimeMetric} AndroidIrqRuntimeMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidIrqRuntimeMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidIrqRuntimeMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.hwIrq = $root.perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric.decode(r, r.uint32());
                        break;
                    case 2:
                        m.swIrq = $root.perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidIrqRuntimeMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidIrqRuntimeMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidIrqRuntimeMetric} AndroidIrqRuntimeMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidIrqRuntimeMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidIrqRuntimeMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidIrqRuntimeMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidIrqRuntimeMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.hwIrq != null && m.hasOwnProperty("hwIrq")) {
                    {
                        var e = $root.perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric.verify(m.hwIrq);
                        if (e)
                            return "hwIrq." + e;
                    }
                }
                if (m.swIrq != null && m.hasOwnProperty("swIrq")) {
                    {
                        var e = $root.perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric.verify(m.swIrq);
                        if (e)
                            return "swIrq." + e;
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidIrqRuntimeMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidIrqRuntimeMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidIrqRuntimeMetric} AndroidIrqRuntimeMetric
             */
            AndroidIrqRuntimeMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidIrqRuntimeMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidIrqRuntimeMetric();
                if (d.hwIrq != null) {
                    if (typeof d.hwIrq !== "object")
                        throw TypeError(".perfetto.protos.AndroidIrqRuntimeMetric.hwIrq: object expected");
                    m.hwIrq = $root.perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric.fromObject(d.hwIrq);
                }
                if (d.swIrq != null) {
                    if (typeof d.swIrq !== "object")
                        throw TypeError(".perfetto.protos.AndroidIrqRuntimeMetric.swIrq: object expected");
                    m.swIrq = $root.perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric.fromObject(d.swIrq);
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidIrqRuntimeMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidIrqRuntimeMetric
             * @static
             * @param {perfetto.protos.AndroidIrqRuntimeMetric} m AndroidIrqRuntimeMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidIrqRuntimeMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.hwIrq = null;
                    d.swIrq = null;
                }
                if (m.hwIrq != null && m.hasOwnProperty("hwIrq")) {
                    d.hwIrq = $root.perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric.toObject(m.hwIrq, o);
                }
                if (m.swIrq != null && m.hasOwnProperty("swIrq")) {
                    d.swIrq = $root.perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric.toObject(m.swIrq, o);
                }
                return d;
            };

            /**
             * Converts this AndroidIrqRuntimeMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidIrqRuntimeMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidIrqRuntimeMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidIrqRuntimeMetric.IrqSlice = (function() {

                /**
                 * Properties of an IrqSlice.
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric
                 * @interface IIrqSlice
                 * @property {string|null} [irqName] IrqSlice irqName
                 * @property {number|null} [ts] IrqSlice ts
                 * @property {number|null} [dur] IrqSlice dur
                 */

                /**
                 * Constructs a new IrqSlice.
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric
                 * @classdesc Represents an IrqSlice.
                 * @implements IIrqSlice
                 * @constructor
                 * @param {perfetto.protos.AndroidIrqRuntimeMetric.IIrqSlice=} [p] Properties to set
                 */
                function IrqSlice(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * IrqSlice irqName.
                 * @member {string} irqName
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice
                 * @instance
                 */
                IrqSlice.prototype.irqName = "";

                /**
                 * IrqSlice ts.
                 * @member {number} ts
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice
                 * @instance
                 */
                IrqSlice.prototype.ts = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * IrqSlice dur.
                 * @member {number} dur
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice
                 * @instance
                 */
                IrqSlice.prototype.dur = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new IrqSlice instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice
                 * @static
                 * @param {perfetto.protos.AndroidIrqRuntimeMetric.IIrqSlice=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice} IrqSlice instance
                 */
                IrqSlice.create = function create(properties) {
                    return new IrqSlice(properties);
                };

                /**
                 * Encodes the specified IrqSlice message. Does not implicitly {@link perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice
                 * @static
                 * @param {perfetto.protos.AndroidIrqRuntimeMetric.IIrqSlice} m IrqSlice message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                IrqSlice.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.irqName != null && Object.hasOwnProperty.call(m, "irqName"))
                        w.uint32(10).string(m.irqName);
                    if (m.ts != null && Object.hasOwnProperty.call(m, "ts"))
                        w.uint32(16).int64(m.ts);
                    if (m.dur != null && Object.hasOwnProperty.call(m, "dur"))
                        w.uint32(24).int64(m.dur);
                    return w;
                };

                /**
                 * Encodes the specified IrqSlice message, length delimited. Does not implicitly {@link perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice
                 * @static
                 * @param {perfetto.protos.AndroidIrqRuntimeMetric.IIrqSlice} message IrqSlice message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                IrqSlice.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an IrqSlice message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice} IrqSlice
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                IrqSlice.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.irqName = r.string();
                            break;
                        case 2:
                            m.ts = r.int64();
                            break;
                        case 3:
                            m.dur = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an IrqSlice message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice} IrqSlice
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                IrqSlice.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an IrqSlice message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                IrqSlice.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.irqName != null && m.hasOwnProperty("irqName")) {
                        if (!$util.isString(m.irqName))
                            return "irqName: string expected";
                    }
                    if (m.ts != null && m.hasOwnProperty("ts")) {
                        if (!$util.isInteger(m.ts) && !(m.ts && $util.isInteger(m.ts.low) && $util.isInteger(m.ts.high)))
                            return "ts: integer|Long expected";
                    }
                    if (m.dur != null && m.hasOwnProperty("dur")) {
                        if (!$util.isInteger(m.dur) && !(m.dur && $util.isInteger(m.dur.low) && $util.isInteger(m.dur.high)))
                            return "dur: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates an IrqSlice message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice} IrqSlice
                 */
                IrqSlice.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice)
                        return d;
                    var m = new $root.perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice();
                    if (d.irqName != null) {
                        m.irqName = String(d.irqName);
                    }
                    if (d.ts != null) {
                        if ($util.Long)
                            (m.ts = $util.Long.fromValue(d.ts)).unsigned = false;
                        else if (typeof d.ts === "string")
                            m.ts = parseInt(d.ts, 10);
                        else if (typeof d.ts === "number")
                            m.ts = d.ts;
                        else if (typeof d.ts === "object")
                            m.ts = new $util.LongBits(d.ts.low >>> 0, d.ts.high >>> 0).toNumber();
                    }
                    if (d.dur != null) {
                        if ($util.Long)
                            (m.dur = $util.Long.fromValue(d.dur)).unsigned = false;
                        else if (typeof d.dur === "string")
                            m.dur = parseInt(d.dur, 10);
                        else if (typeof d.dur === "number")
                            m.dur = d.dur;
                        else if (typeof d.dur === "object")
                            m.dur = new $util.LongBits(d.dur.low >>> 0, d.dur.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an IrqSlice message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice
                 * @static
                 * @param {perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice} m IrqSlice
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                IrqSlice.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.irqName = "";
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.ts = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.ts = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.dur = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.dur = o.longs === String ? "0" : 0;
                    }
                    if (m.irqName != null && m.hasOwnProperty("irqName")) {
                        d.irqName = m.irqName;
                    }
                    if (m.ts != null && m.hasOwnProperty("ts")) {
                        if (typeof m.ts === "number")
                            d.ts = o.longs === String ? String(m.ts) : m.ts;
                        else
                            d.ts = o.longs === String ? $util.Long.prototype.toString.call(m.ts) : o.longs === Number ? new $util.LongBits(m.ts.low >>> 0, m.ts.high >>> 0).toNumber() : m.ts;
                    }
                    if (m.dur != null && m.hasOwnProperty("dur")) {
                        if (typeof m.dur === "number")
                            d.dur = o.longs === String ? String(m.dur) : m.dur;
                        else
                            d.dur = o.longs === String ? $util.Long.prototype.toString.call(m.dur) : o.longs === Number ? new $util.LongBits(m.dur.low >>> 0, m.dur.high >>> 0).toNumber() : m.dur;
                    }
                    return d;
                };

                /**
                 * Converts this IrqSlice to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                IrqSlice.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return IrqSlice;
            })();

            AndroidIrqRuntimeMetric.ThresholdMetric = (function() {

                /**
                 * Properties of a ThresholdMetric.
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric
                 * @interface IThresholdMetric
                 * @property {string|null} [threshold] ThresholdMetric threshold
                 * @property {number|null} [overThresholdCount] ThresholdMetric overThresholdCount
                 * @property {number|null} [anomalyRatio] ThresholdMetric anomalyRatio
                 */

                /**
                 * Constructs a new ThresholdMetric.
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric
                 * @classdesc Represents a ThresholdMetric.
                 * @implements IThresholdMetric
                 * @constructor
                 * @param {perfetto.protos.AndroidIrqRuntimeMetric.IThresholdMetric=} [p] Properties to set
                 */
                function ThresholdMetric(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * ThresholdMetric threshold.
                 * @member {string} threshold
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric
                 * @instance
                 */
                ThresholdMetric.prototype.threshold = "";

                /**
                 * ThresholdMetric overThresholdCount.
                 * @member {number} overThresholdCount
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric
                 * @instance
                 */
                ThresholdMetric.prototype.overThresholdCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * ThresholdMetric anomalyRatio.
                 * @member {number} anomalyRatio
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric
                 * @instance
                 */
                ThresholdMetric.prototype.anomalyRatio = 0;

                /**
                 * Creates a new ThresholdMetric instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric
                 * @static
                 * @param {perfetto.protos.AndroidIrqRuntimeMetric.IThresholdMetric=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric} ThresholdMetric instance
                 */
                ThresholdMetric.create = function create(properties) {
                    return new ThresholdMetric(properties);
                };

                /**
                 * Encodes the specified ThresholdMetric message. Does not implicitly {@link perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric
                 * @static
                 * @param {perfetto.protos.AndroidIrqRuntimeMetric.IThresholdMetric} m ThresholdMetric message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ThresholdMetric.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.threshold != null && Object.hasOwnProperty.call(m, "threshold"))
                        w.uint32(10).string(m.threshold);
                    if (m.overThresholdCount != null && Object.hasOwnProperty.call(m, "overThresholdCount"))
                        w.uint32(16).int64(m.overThresholdCount);
                    if (m.anomalyRatio != null && Object.hasOwnProperty.call(m, "anomalyRatio"))
                        w.uint32(25).double(m.anomalyRatio);
                    return w;
                };

                /**
                 * Encodes the specified ThresholdMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric
                 * @static
                 * @param {perfetto.protos.AndroidIrqRuntimeMetric.IThresholdMetric} message ThresholdMetric message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ThresholdMetric.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a ThresholdMetric message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric} ThresholdMetric
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ThresholdMetric.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.threshold = r.string();
                            break;
                        case 2:
                            m.overThresholdCount = r.int64();
                            break;
                        case 3:
                            m.anomalyRatio = r.double();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a ThresholdMetric message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric} ThresholdMetric
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ThresholdMetric.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a ThresholdMetric message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ThresholdMetric.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.threshold != null && m.hasOwnProperty("threshold")) {
                        if (!$util.isString(m.threshold))
                            return "threshold: string expected";
                    }
                    if (m.overThresholdCount != null && m.hasOwnProperty("overThresholdCount")) {
                        if (!$util.isInteger(m.overThresholdCount) && !(m.overThresholdCount && $util.isInteger(m.overThresholdCount.low) && $util.isInteger(m.overThresholdCount.high)))
                            return "overThresholdCount: integer|Long expected";
                    }
                    if (m.anomalyRatio != null && m.hasOwnProperty("anomalyRatio")) {
                        if (typeof m.anomalyRatio !== "number")
                            return "anomalyRatio: number expected";
                    }
                    return null;
                };

                /**
                 * Creates a ThresholdMetric message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric} ThresholdMetric
                 */
                ThresholdMetric.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric)
                        return d;
                    var m = new $root.perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric();
                    if (d.threshold != null) {
                        m.threshold = String(d.threshold);
                    }
                    if (d.overThresholdCount != null) {
                        if ($util.Long)
                            (m.overThresholdCount = $util.Long.fromValue(d.overThresholdCount)).unsigned = false;
                        else if (typeof d.overThresholdCount === "string")
                            m.overThresholdCount = parseInt(d.overThresholdCount, 10);
                        else if (typeof d.overThresholdCount === "number")
                            m.overThresholdCount = d.overThresholdCount;
                        else if (typeof d.overThresholdCount === "object")
                            m.overThresholdCount = new $util.LongBits(d.overThresholdCount.low >>> 0, d.overThresholdCount.high >>> 0).toNumber();
                    }
                    if (d.anomalyRatio != null) {
                        m.anomalyRatio = Number(d.anomalyRatio);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a ThresholdMetric message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric
                 * @static
                 * @param {perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric} m ThresholdMetric
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ThresholdMetric.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.threshold = "";
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.overThresholdCount = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.overThresholdCount = o.longs === String ? "0" : 0;
                        d.anomalyRatio = 0;
                    }
                    if (m.threshold != null && m.hasOwnProperty("threshold")) {
                        d.threshold = m.threshold;
                    }
                    if (m.overThresholdCount != null && m.hasOwnProperty("overThresholdCount")) {
                        if (typeof m.overThresholdCount === "number")
                            d.overThresholdCount = o.longs === String ? String(m.overThresholdCount) : m.overThresholdCount;
                        else
                            d.overThresholdCount = o.longs === String ? $util.Long.prototype.toString.call(m.overThresholdCount) : o.longs === Number ? new $util.LongBits(m.overThresholdCount.low >>> 0, m.overThresholdCount.high >>> 0).toNumber() : m.overThresholdCount;
                    }
                    if (m.anomalyRatio != null && m.hasOwnProperty("anomalyRatio")) {
                        d.anomalyRatio = o.json && !isFinite(m.anomalyRatio) ? String(m.anomalyRatio) : m.anomalyRatio;
                    }
                    return d;
                };

                /**
                 * Converts this ThresholdMetric to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ThresholdMetric.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return ThresholdMetric;
            })();

            AndroidIrqRuntimeMetric.IrqRuntimeMetric = (function() {

                /**
                 * Properties of an IrqRuntimeMetric.
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric
                 * @interface IIrqRuntimeMetric
                 * @property {number|null} [maxRuntime] IrqRuntimeMetric maxRuntime
                 * @property {number|null} [totalCount] IrqRuntimeMetric totalCount
                 * @property {perfetto.protos.AndroidIrqRuntimeMetric.IThresholdMetric|null} [thresholdMetric] IrqRuntimeMetric thresholdMetric
                 * @property {Array.<perfetto.protos.AndroidIrqRuntimeMetric.IIrqSlice>|null} [longestIrqSlices] IrqRuntimeMetric longestIrqSlices
                 */

                /**
                 * Constructs a new IrqRuntimeMetric.
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric
                 * @classdesc Represents an IrqRuntimeMetric.
                 * @implements IIrqRuntimeMetric
                 * @constructor
                 * @param {perfetto.protos.AndroidIrqRuntimeMetric.IIrqRuntimeMetric=} [p] Properties to set
                 */
                function IrqRuntimeMetric(p) {
                    this.longestIrqSlices = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * IrqRuntimeMetric maxRuntime.
                 * @member {number} maxRuntime
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric
                 * @instance
                 */
                IrqRuntimeMetric.prototype.maxRuntime = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * IrqRuntimeMetric totalCount.
                 * @member {number} totalCount
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric
                 * @instance
                 */
                IrqRuntimeMetric.prototype.totalCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * IrqRuntimeMetric thresholdMetric.
                 * @member {perfetto.protos.AndroidIrqRuntimeMetric.IThresholdMetric|null|undefined} thresholdMetric
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric
                 * @instance
                 */
                IrqRuntimeMetric.prototype.thresholdMetric = null;

                /**
                 * IrqRuntimeMetric longestIrqSlices.
                 * @member {Array.<perfetto.protos.AndroidIrqRuntimeMetric.IIrqSlice>} longestIrqSlices
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric
                 * @instance
                 */
                IrqRuntimeMetric.prototype.longestIrqSlices = $util.emptyArray;

                /**
                 * Creates a new IrqRuntimeMetric instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric
                 * @static
                 * @param {perfetto.protos.AndroidIrqRuntimeMetric.IIrqRuntimeMetric=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric} IrqRuntimeMetric instance
                 */
                IrqRuntimeMetric.create = function create(properties) {
                    return new IrqRuntimeMetric(properties);
                };

                /**
                 * Encodes the specified IrqRuntimeMetric message. Does not implicitly {@link perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric
                 * @static
                 * @param {perfetto.protos.AndroidIrqRuntimeMetric.IIrqRuntimeMetric} m IrqRuntimeMetric message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                IrqRuntimeMetric.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.maxRuntime != null && Object.hasOwnProperty.call(m, "maxRuntime"))
                        w.uint32(8).int64(m.maxRuntime);
                    if (m.totalCount != null && Object.hasOwnProperty.call(m, "totalCount"))
                        w.uint32(16).int64(m.totalCount);
                    if (m.thresholdMetric != null && Object.hasOwnProperty.call(m, "thresholdMetric"))
                        $root.perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric.encode(m.thresholdMetric, w.uint32(26).fork()).ldelim();
                    if (m.longestIrqSlices != null && m.longestIrqSlices.length) {
                        for (var i = 0; i < m.longestIrqSlices.length; ++i)
                            $root.perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice.encode(m.longestIrqSlices[i], w.uint32(34).fork()).ldelim();
                    }
                    return w;
                };

                /**
                 * Encodes the specified IrqRuntimeMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric
                 * @static
                 * @param {perfetto.protos.AndroidIrqRuntimeMetric.IIrqRuntimeMetric} message IrqRuntimeMetric message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                IrqRuntimeMetric.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an IrqRuntimeMetric message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric} IrqRuntimeMetric
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                IrqRuntimeMetric.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.maxRuntime = r.int64();
                            break;
                        case 2:
                            m.totalCount = r.int64();
                            break;
                        case 3:
                            m.thresholdMetric = $root.perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric.decode(r, r.uint32());
                            break;
                        case 4:
                            if (!(m.longestIrqSlices && m.longestIrqSlices.length))
                                m.longestIrqSlices = [];
                            m.longestIrqSlices.push($root.perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an IrqRuntimeMetric message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric} IrqRuntimeMetric
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                IrqRuntimeMetric.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an IrqRuntimeMetric message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                IrqRuntimeMetric.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.maxRuntime != null && m.hasOwnProperty("maxRuntime")) {
                        if (!$util.isInteger(m.maxRuntime) && !(m.maxRuntime && $util.isInteger(m.maxRuntime.low) && $util.isInteger(m.maxRuntime.high)))
                            return "maxRuntime: integer|Long expected";
                    }
                    if (m.totalCount != null && m.hasOwnProperty("totalCount")) {
                        if (!$util.isInteger(m.totalCount) && !(m.totalCount && $util.isInteger(m.totalCount.low) && $util.isInteger(m.totalCount.high)))
                            return "totalCount: integer|Long expected";
                    }
                    if (m.thresholdMetric != null && m.hasOwnProperty("thresholdMetric")) {
                        {
                            var e = $root.perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric.verify(m.thresholdMetric);
                            if (e)
                                return "thresholdMetric." + e;
                        }
                    }
                    if (m.longestIrqSlices != null && m.hasOwnProperty("longestIrqSlices")) {
                        if (!Array.isArray(m.longestIrqSlices))
                            return "longestIrqSlices: array expected";
                        for (var i = 0; i < m.longestIrqSlices.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice.verify(m.longestIrqSlices[i]);
                                if (e)
                                    return "longestIrqSlices." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates an IrqRuntimeMetric message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric} IrqRuntimeMetric
                 */
                IrqRuntimeMetric.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric)
                        return d;
                    var m = new $root.perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric();
                    if (d.maxRuntime != null) {
                        if ($util.Long)
                            (m.maxRuntime = $util.Long.fromValue(d.maxRuntime)).unsigned = false;
                        else if (typeof d.maxRuntime === "string")
                            m.maxRuntime = parseInt(d.maxRuntime, 10);
                        else if (typeof d.maxRuntime === "number")
                            m.maxRuntime = d.maxRuntime;
                        else if (typeof d.maxRuntime === "object")
                            m.maxRuntime = new $util.LongBits(d.maxRuntime.low >>> 0, d.maxRuntime.high >>> 0).toNumber();
                    }
                    if (d.totalCount != null) {
                        if ($util.Long)
                            (m.totalCount = $util.Long.fromValue(d.totalCount)).unsigned = false;
                        else if (typeof d.totalCount === "string")
                            m.totalCount = parseInt(d.totalCount, 10);
                        else if (typeof d.totalCount === "number")
                            m.totalCount = d.totalCount;
                        else if (typeof d.totalCount === "object")
                            m.totalCount = new $util.LongBits(d.totalCount.low >>> 0, d.totalCount.high >>> 0).toNumber();
                    }
                    if (d.thresholdMetric != null) {
                        if (typeof d.thresholdMetric !== "object")
                            throw TypeError(".perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric.thresholdMetric: object expected");
                        m.thresholdMetric = $root.perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric.fromObject(d.thresholdMetric);
                    }
                    if (d.longestIrqSlices) {
                        if (!Array.isArray(d.longestIrqSlices))
                            throw TypeError(".perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric.longestIrqSlices: array expected");
                        m.longestIrqSlices = [];
                        for (var i = 0; i < d.longestIrqSlices.length; ++i) {
                            if (typeof d.longestIrqSlices[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric.longestIrqSlices: object expected");
                            m.longestIrqSlices[i] = $root.perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice.fromObject(d.longestIrqSlices[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an IrqRuntimeMetric message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric
                 * @static
                 * @param {perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric} m IrqRuntimeMetric
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                IrqRuntimeMetric.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.longestIrqSlices = [];
                    }
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.maxRuntime = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.maxRuntime = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.totalCount = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.totalCount = o.longs === String ? "0" : 0;
                        d.thresholdMetric = null;
                    }
                    if (m.maxRuntime != null && m.hasOwnProperty("maxRuntime")) {
                        if (typeof m.maxRuntime === "number")
                            d.maxRuntime = o.longs === String ? String(m.maxRuntime) : m.maxRuntime;
                        else
                            d.maxRuntime = o.longs === String ? $util.Long.prototype.toString.call(m.maxRuntime) : o.longs === Number ? new $util.LongBits(m.maxRuntime.low >>> 0, m.maxRuntime.high >>> 0).toNumber() : m.maxRuntime;
                    }
                    if (m.totalCount != null && m.hasOwnProperty("totalCount")) {
                        if (typeof m.totalCount === "number")
                            d.totalCount = o.longs === String ? String(m.totalCount) : m.totalCount;
                        else
                            d.totalCount = o.longs === String ? $util.Long.prototype.toString.call(m.totalCount) : o.longs === Number ? new $util.LongBits(m.totalCount.low >>> 0, m.totalCount.high >>> 0).toNumber() : m.totalCount;
                    }
                    if (m.thresholdMetric != null && m.hasOwnProperty("thresholdMetric")) {
                        d.thresholdMetric = $root.perfetto.protos.AndroidIrqRuntimeMetric.ThresholdMetric.toObject(m.thresholdMetric, o);
                    }
                    if (m.longestIrqSlices && m.longestIrqSlices.length) {
                        d.longestIrqSlices = [];
                        for (var j = 0; j < m.longestIrqSlices.length; ++j) {
                            d.longestIrqSlices[j] = $root.perfetto.protos.AndroidIrqRuntimeMetric.IrqSlice.toObject(m.longestIrqSlices[j], o);
                        }
                    }
                    return d;
                };

                /**
                 * Converts this IrqRuntimeMetric to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidIrqRuntimeMetric.IrqRuntimeMetric
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                IrqRuntimeMetric.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return IrqRuntimeMetric;
            })();

            return AndroidIrqRuntimeMetric;
        })();

        protos.AndroidJankCujMetric = (function() {

            /**
             * Properties of an AndroidJankCujMetric.
             * @memberof perfetto.protos
             * @interface IAndroidJankCujMetric
             * @property {Array.<perfetto.protos.AndroidJankCujMetric.ICuj>|null} [cuj] AndroidJankCujMetric cuj
             */

            /**
             * Constructs a new AndroidJankCujMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidJankCujMetric.
             * @implements IAndroidJankCujMetric
             * @constructor
             * @param {perfetto.protos.IAndroidJankCujMetric=} [p] Properties to set
             */
            function AndroidJankCujMetric(p) {
                this.cuj = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidJankCujMetric cuj.
             * @member {Array.<perfetto.protos.AndroidJankCujMetric.ICuj>} cuj
             * @memberof perfetto.protos.AndroidJankCujMetric
             * @instance
             */
            AndroidJankCujMetric.prototype.cuj = $util.emptyArray;

            /**
             * Creates a new AndroidJankCujMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidJankCujMetric
             * @static
             * @param {perfetto.protos.IAndroidJankCujMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidJankCujMetric} AndroidJankCujMetric instance
             */
            AndroidJankCujMetric.create = function create(properties) {
                return new AndroidJankCujMetric(properties);
            };

            /**
             * Encodes the specified AndroidJankCujMetric message. Does not implicitly {@link perfetto.protos.AndroidJankCujMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidJankCujMetric
             * @static
             * @param {perfetto.protos.IAndroidJankCujMetric} m AndroidJankCujMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidJankCujMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.cuj != null && m.cuj.length) {
                    for (var i = 0; i < m.cuj.length; ++i)
                        $root.perfetto.protos.AndroidJankCujMetric.Cuj.encode(m.cuj[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified AndroidJankCujMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidJankCujMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidJankCujMetric
             * @static
             * @param {perfetto.protos.IAndroidJankCujMetric} message AndroidJankCujMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidJankCujMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidJankCujMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidJankCujMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidJankCujMetric} AndroidJankCujMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidJankCujMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidJankCujMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.cuj && m.cuj.length))
                            m.cuj = [];
                        m.cuj.push($root.perfetto.protos.AndroidJankCujMetric.Cuj.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidJankCujMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidJankCujMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidJankCujMetric} AndroidJankCujMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidJankCujMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidJankCujMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidJankCujMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidJankCujMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.cuj != null && m.hasOwnProperty("cuj")) {
                    if (!Array.isArray(m.cuj))
                        return "cuj: array expected";
                    for (var i = 0; i < m.cuj.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidJankCujMetric.Cuj.verify(m.cuj[i]);
                            if (e)
                                return "cuj." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidJankCujMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidJankCujMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidJankCujMetric} AndroidJankCujMetric
             */
            AndroidJankCujMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidJankCujMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidJankCujMetric();
                if (d.cuj) {
                    if (!Array.isArray(d.cuj))
                        throw TypeError(".perfetto.protos.AndroidJankCujMetric.cuj: array expected");
                    m.cuj = [];
                    for (var i = 0; i < d.cuj.length; ++i) {
                        if (typeof d.cuj[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidJankCujMetric.cuj: object expected");
                        m.cuj[i] = $root.perfetto.protos.AndroidJankCujMetric.Cuj.fromObject(d.cuj[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidJankCujMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidJankCujMetric
             * @static
             * @param {perfetto.protos.AndroidJankCujMetric} m AndroidJankCujMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidJankCujMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.cuj = [];
                }
                if (m.cuj && m.cuj.length) {
                    d.cuj = [];
                    for (var j = 0; j < m.cuj.length; ++j) {
                        d.cuj[j] = $root.perfetto.protos.AndroidJankCujMetric.Cuj.toObject(m.cuj[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidJankCujMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidJankCujMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidJankCujMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidJankCujMetric.Cuj = (function() {

                /**
                 * Properties of a Cuj.
                 * @memberof perfetto.protos.AndroidJankCujMetric
                 * @interface ICuj
                 * @property {number|null} [id] Cuj id
                 * @property {string|null} [name] Cuj name
                 * @property {perfetto.protos.IAndroidProcessMetadata|null} [process] Cuj process
                 * @property {number|null} [ts] Cuj ts
                 * @property {number|null} [dur] Cuj dur
                 * @property {Array.<perfetto.protos.AndroidJankCujMetric.IFrame>|null} [frame] Cuj frame
                 * @property {Array.<perfetto.protos.AndroidJankCujMetric.IFrame>|null} [sfFrame] Cuj sfFrame
                 * @property {perfetto.protos.AndroidJankCujMetric.IMetrics|null} [counterMetrics] Cuj counterMetrics
                 * @property {perfetto.protos.AndroidJankCujMetric.IMetrics|null} [timelineMetrics] Cuj timelineMetrics
                 * @property {perfetto.protos.AndroidJankCujMetric.IMetrics|null} [traceMetrics] Cuj traceMetrics
                 */

                /**
                 * Constructs a new Cuj.
                 * @memberof perfetto.protos.AndroidJankCujMetric
                 * @classdesc Represents a Cuj.
                 * @implements ICuj
                 * @constructor
                 * @param {perfetto.protos.AndroidJankCujMetric.ICuj=} [p] Properties to set
                 */
                function Cuj(p) {
                    this.frame = [];
                    this.sfFrame = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Cuj id.
                 * @member {number} id
                 * @memberof perfetto.protos.AndroidJankCujMetric.Cuj
                 * @instance
                 */
                Cuj.prototype.id = 0;

                /**
                 * Cuj name.
                 * @member {string} name
                 * @memberof perfetto.protos.AndroidJankCujMetric.Cuj
                 * @instance
                 */
                Cuj.prototype.name = "";

                /**
                 * Cuj process.
                 * @member {perfetto.protos.IAndroidProcessMetadata|null|undefined} process
                 * @memberof perfetto.protos.AndroidJankCujMetric.Cuj
                 * @instance
                 */
                Cuj.prototype.process = null;

                /**
                 * Cuj ts.
                 * @member {number} ts
                 * @memberof perfetto.protos.AndroidJankCujMetric.Cuj
                 * @instance
                 */
                Cuj.prototype.ts = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Cuj dur.
                 * @member {number} dur
                 * @memberof perfetto.protos.AndroidJankCujMetric.Cuj
                 * @instance
                 */
                Cuj.prototype.dur = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Cuj frame.
                 * @member {Array.<perfetto.protos.AndroidJankCujMetric.IFrame>} frame
                 * @memberof perfetto.protos.AndroidJankCujMetric.Cuj
                 * @instance
                 */
                Cuj.prototype.frame = $util.emptyArray;

                /**
                 * Cuj sfFrame.
                 * @member {Array.<perfetto.protos.AndroidJankCujMetric.IFrame>} sfFrame
                 * @memberof perfetto.protos.AndroidJankCujMetric.Cuj
                 * @instance
                 */
                Cuj.prototype.sfFrame = $util.emptyArray;

                /**
                 * Cuj counterMetrics.
                 * @member {perfetto.protos.AndroidJankCujMetric.IMetrics|null|undefined} counterMetrics
                 * @memberof perfetto.protos.AndroidJankCujMetric.Cuj
                 * @instance
                 */
                Cuj.prototype.counterMetrics = null;

                /**
                 * Cuj timelineMetrics.
                 * @member {perfetto.protos.AndroidJankCujMetric.IMetrics|null|undefined} timelineMetrics
                 * @memberof perfetto.protos.AndroidJankCujMetric.Cuj
                 * @instance
                 */
                Cuj.prototype.timelineMetrics = null;

                /**
                 * Cuj traceMetrics.
                 * @member {perfetto.protos.AndroidJankCujMetric.IMetrics|null|undefined} traceMetrics
                 * @memberof perfetto.protos.AndroidJankCujMetric.Cuj
                 * @instance
                 */
                Cuj.prototype.traceMetrics = null;

                /**
                 * Creates a new Cuj instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidJankCujMetric.Cuj
                 * @static
                 * @param {perfetto.protos.AndroidJankCujMetric.ICuj=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidJankCujMetric.Cuj} Cuj instance
                 */
                Cuj.create = function create(properties) {
                    return new Cuj(properties);
                };

                /**
                 * Encodes the specified Cuj message. Does not implicitly {@link perfetto.protos.AndroidJankCujMetric.Cuj.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidJankCujMetric.Cuj
                 * @static
                 * @param {perfetto.protos.AndroidJankCujMetric.ICuj} m Cuj message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Cuj.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.id != null && Object.hasOwnProperty.call(m, "id"))
                        w.uint32(8).int32(m.id);
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(18).string(m.name);
                    if (m.process != null && Object.hasOwnProperty.call(m, "process"))
                        $root.perfetto.protos.AndroidProcessMetadata.encode(m.process, w.uint32(26).fork()).ldelim();
                    if (m.ts != null && Object.hasOwnProperty.call(m, "ts"))
                        w.uint32(32).int64(m.ts);
                    if (m.dur != null && Object.hasOwnProperty.call(m, "dur"))
                        w.uint32(40).int64(m.dur);
                    if (m.frame != null && m.frame.length) {
                        for (var i = 0; i < m.frame.length; ++i)
                            $root.perfetto.protos.AndroidJankCujMetric.Frame.encode(m.frame[i], w.uint32(50).fork()).ldelim();
                    }
                    if (m.counterMetrics != null && Object.hasOwnProperty.call(m, "counterMetrics"))
                        $root.perfetto.protos.AndroidJankCujMetric.Metrics.encode(m.counterMetrics, w.uint32(58).fork()).ldelim();
                    if (m.timelineMetrics != null && Object.hasOwnProperty.call(m, "timelineMetrics"))
                        $root.perfetto.protos.AndroidJankCujMetric.Metrics.encode(m.timelineMetrics, w.uint32(66).fork()).ldelim();
                    if (m.traceMetrics != null && Object.hasOwnProperty.call(m, "traceMetrics"))
                        $root.perfetto.protos.AndroidJankCujMetric.Metrics.encode(m.traceMetrics, w.uint32(74).fork()).ldelim();
                    if (m.sfFrame != null && m.sfFrame.length) {
                        for (var i = 0; i < m.sfFrame.length; ++i)
                            $root.perfetto.protos.AndroidJankCujMetric.Frame.encode(m.sfFrame[i], w.uint32(82).fork()).ldelim();
                    }
                    return w;
                };

                /**
                 * Encodes the specified Cuj message, length delimited. Does not implicitly {@link perfetto.protos.AndroidJankCujMetric.Cuj.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidJankCujMetric.Cuj
                 * @static
                 * @param {perfetto.protos.AndroidJankCujMetric.ICuj} message Cuj message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Cuj.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Cuj message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidJankCujMetric.Cuj
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidJankCujMetric.Cuj} Cuj
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Cuj.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidJankCujMetric.Cuj();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.id = r.int32();
                            break;
                        case 2:
                            m.name = r.string();
                            break;
                        case 3:
                            m.process = $root.perfetto.protos.AndroidProcessMetadata.decode(r, r.uint32());
                            break;
                        case 4:
                            m.ts = r.int64();
                            break;
                        case 5:
                            m.dur = r.int64();
                            break;
                        case 6:
                            if (!(m.frame && m.frame.length))
                                m.frame = [];
                            m.frame.push($root.perfetto.protos.AndroidJankCujMetric.Frame.decode(r, r.uint32()));
                            break;
                        case 10:
                            if (!(m.sfFrame && m.sfFrame.length))
                                m.sfFrame = [];
                            m.sfFrame.push($root.perfetto.protos.AndroidJankCujMetric.Frame.decode(r, r.uint32()));
                            break;
                        case 7:
                            m.counterMetrics = $root.perfetto.protos.AndroidJankCujMetric.Metrics.decode(r, r.uint32());
                            break;
                        case 8:
                            m.timelineMetrics = $root.perfetto.protos.AndroidJankCujMetric.Metrics.decode(r, r.uint32());
                            break;
                        case 9:
                            m.traceMetrics = $root.perfetto.protos.AndroidJankCujMetric.Metrics.decode(r, r.uint32());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Cuj message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidJankCujMetric.Cuj
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidJankCujMetric.Cuj} Cuj
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Cuj.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Cuj message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidJankCujMetric.Cuj
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Cuj.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.id != null && m.hasOwnProperty("id")) {
                        if (!$util.isInteger(m.id))
                            return "id: integer expected";
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    if (m.process != null && m.hasOwnProperty("process")) {
                        {
                            var e = $root.perfetto.protos.AndroidProcessMetadata.verify(m.process);
                            if (e)
                                return "process." + e;
                        }
                    }
                    if (m.ts != null && m.hasOwnProperty("ts")) {
                        if (!$util.isInteger(m.ts) && !(m.ts && $util.isInteger(m.ts.low) && $util.isInteger(m.ts.high)))
                            return "ts: integer|Long expected";
                    }
                    if (m.dur != null && m.hasOwnProperty("dur")) {
                        if (!$util.isInteger(m.dur) && !(m.dur && $util.isInteger(m.dur.low) && $util.isInteger(m.dur.high)))
                            return "dur: integer|Long expected";
                    }
                    if (m.frame != null && m.hasOwnProperty("frame")) {
                        if (!Array.isArray(m.frame))
                            return "frame: array expected";
                        for (var i = 0; i < m.frame.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidJankCujMetric.Frame.verify(m.frame[i]);
                                if (e)
                                    return "frame." + e;
                            }
                        }
                    }
                    if (m.sfFrame != null && m.hasOwnProperty("sfFrame")) {
                        if (!Array.isArray(m.sfFrame))
                            return "sfFrame: array expected";
                        for (var i = 0; i < m.sfFrame.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidJankCujMetric.Frame.verify(m.sfFrame[i]);
                                if (e)
                                    return "sfFrame." + e;
                            }
                        }
                    }
                    if (m.counterMetrics != null && m.hasOwnProperty("counterMetrics")) {
                        {
                            var e = $root.perfetto.protos.AndroidJankCujMetric.Metrics.verify(m.counterMetrics);
                            if (e)
                                return "counterMetrics." + e;
                        }
                    }
                    if (m.timelineMetrics != null && m.hasOwnProperty("timelineMetrics")) {
                        {
                            var e = $root.perfetto.protos.AndroidJankCujMetric.Metrics.verify(m.timelineMetrics);
                            if (e)
                                return "timelineMetrics." + e;
                        }
                    }
                    if (m.traceMetrics != null && m.hasOwnProperty("traceMetrics")) {
                        {
                            var e = $root.perfetto.protos.AndroidJankCujMetric.Metrics.verify(m.traceMetrics);
                            if (e)
                                return "traceMetrics." + e;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a Cuj message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidJankCujMetric.Cuj
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidJankCujMetric.Cuj} Cuj
                 */
                Cuj.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidJankCujMetric.Cuj)
                        return d;
                    var m = new $root.perfetto.protos.AndroidJankCujMetric.Cuj();
                    if (d.id != null) {
                        m.id = d.id | 0;
                    }
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    if (d.process != null) {
                        if (typeof d.process !== "object")
                            throw TypeError(".perfetto.protos.AndroidJankCujMetric.Cuj.process: object expected");
                        m.process = $root.perfetto.protos.AndroidProcessMetadata.fromObject(d.process);
                    }
                    if (d.ts != null) {
                        if ($util.Long)
                            (m.ts = $util.Long.fromValue(d.ts)).unsigned = false;
                        else if (typeof d.ts === "string")
                            m.ts = parseInt(d.ts, 10);
                        else if (typeof d.ts === "number")
                            m.ts = d.ts;
                        else if (typeof d.ts === "object")
                            m.ts = new $util.LongBits(d.ts.low >>> 0, d.ts.high >>> 0).toNumber();
                    }
                    if (d.dur != null) {
                        if ($util.Long)
                            (m.dur = $util.Long.fromValue(d.dur)).unsigned = false;
                        else if (typeof d.dur === "string")
                            m.dur = parseInt(d.dur, 10);
                        else if (typeof d.dur === "number")
                            m.dur = d.dur;
                        else if (typeof d.dur === "object")
                            m.dur = new $util.LongBits(d.dur.low >>> 0, d.dur.high >>> 0).toNumber();
                    }
                    if (d.frame) {
                        if (!Array.isArray(d.frame))
                            throw TypeError(".perfetto.protos.AndroidJankCujMetric.Cuj.frame: array expected");
                        m.frame = [];
                        for (var i = 0; i < d.frame.length; ++i) {
                            if (typeof d.frame[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidJankCujMetric.Cuj.frame: object expected");
                            m.frame[i] = $root.perfetto.protos.AndroidJankCujMetric.Frame.fromObject(d.frame[i]);
                        }
                    }
                    if (d.sfFrame) {
                        if (!Array.isArray(d.sfFrame))
                            throw TypeError(".perfetto.protos.AndroidJankCujMetric.Cuj.sfFrame: array expected");
                        m.sfFrame = [];
                        for (var i = 0; i < d.sfFrame.length; ++i) {
                            if (typeof d.sfFrame[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidJankCujMetric.Cuj.sfFrame: object expected");
                            m.sfFrame[i] = $root.perfetto.protos.AndroidJankCujMetric.Frame.fromObject(d.sfFrame[i]);
                        }
                    }
                    if (d.counterMetrics != null) {
                        if (typeof d.counterMetrics !== "object")
                            throw TypeError(".perfetto.protos.AndroidJankCujMetric.Cuj.counterMetrics: object expected");
                        m.counterMetrics = $root.perfetto.protos.AndroidJankCujMetric.Metrics.fromObject(d.counterMetrics);
                    }
                    if (d.timelineMetrics != null) {
                        if (typeof d.timelineMetrics !== "object")
                            throw TypeError(".perfetto.protos.AndroidJankCujMetric.Cuj.timelineMetrics: object expected");
                        m.timelineMetrics = $root.perfetto.protos.AndroidJankCujMetric.Metrics.fromObject(d.timelineMetrics);
                    }
                    if (d.traceMetrics != null) {
                        if (typeof d.traceMetrics !== "object")
                            throw TypeError(".perfetto.protos.AndroidJankCujMetric.Cuj.traceMetrics: object expected");
                        m.traceMetrics = $root.perfetto.protos.AndroidJankCujMetric.Metrics.fromObject(d.traceMetrics);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Cuj message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidJankCujMetric.Cuj
                 * @static
                 * @param {perfetto.protos.AndroidJankCujMetric.Cuj} m Cuj
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Cuj.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.frame = [];
                        d.sfFrame = [];
                    }
                    if (o.defaults) {
                        d.id = 0;
                        d.name = "";
                        d.process = null;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.ts = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.ts = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.dur = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.dur = o.longs === String ? "0" : 0;
                        d.counterMetrics = null;
                        d.timelineMetrics = null;
                        d.traceMetrics = null;
                    }
                    if (m.id != null && m.hasOwnProperty("id")) {
                        d.id = m.id;
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    if (m.process != null && m.hasOwnProperty("process")) {
                        d.process = $root.perfetto.protos.AndroidProcessMetadata.toObject(m.process, o);
                    }
                    if (m.ts != null && m.hasOwnProperty("ts")) {
                        if (typeof m.ts === "number")
                            d.ts = o.longs === String ? String(m.ts) : m.ts;
                        else
                            d.ts = o.longs === String ? $util.Long.prototype.toString.call(m.ts) : o.longs === Number ? new $util.LongBits(m.ts.low >>> 0, m.ts.high >>> 0).toNumber() : m.ts;
                    }
                    if (m.dur != null && m.hasOwnProperty("dur")) {
                        if (typeof m.dur === "number")
                            d.dur = o.longs === String ? String(m.dur) : m.dur;
                        else
                            d.dur = o.longs === String ? $util.Long.prototype.toString.call(m.dur) : o.longs === Number ? new $util.LongBits(m.dur.low >>> 0, m.dur.high >>> 0).toNumber() : m.dur;
                    }
                    if (m.frame && m.frame.length) {
                        d.frame = [];
                        for (var j = 0; j < m.frame.length; ++j) {
                            d.frame[j] = $root.perfetto.protos.AndroidJankCujMetric.Frame.toObject(m.frame[j], o);
                        }
                    }
                    if (m.counterMetrics != null && m.hasOwnProperty("counterMetrics")) {
                        d.counterMetrics = $root.perfetto.protos.AndroidJankCujMetric.Metrics.toObject(m.counterMetrics, o);
                    }
                    if (m.timelineMetrics != null && m.hasOwnProperty("timelineMetrics")) {
                        d.timelineMetrics = $root.perfetto.protos.AndroidJankCujMetric.Metrics.toObject(m.timelineMetrics, o);
                    }
                    if (m.traceMetrics != null && m.hasOwnProperty("traceMetrics")) {
                        d.traceMetrics = $root.perfetto.protos.AndroidJankCujMetric.Metrics.toObject(m.traceMetrics, o);
                    }
                    if (m.sfFrame && m.sfFrame.length) {
                        d.sfFrame = [];
                        for (var j = 0; j < m.sfFrame.length; ++j) {
                            d.sfFrame[j] = $root.perfetto.protos.AndroidJankCujMetric.Frame.toObject(m.sfFrame[j], o);
                        }
                    }
                    return d;
                };

                /**
                 * Converts this Cuj to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidJankCujMetric.Cuj
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Cuj.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Cuj;
            })();

            AndroidJankCujMetric.Frame = (function() {

                /**
                 * Properties of a Frame.
                 * @memberof perfetto.protos.AndroidJankCujMetric
                 * @interface IFrame
                 * @property {number|null} [frameNumber] Frame frameNumber
                 * @property {number|null} [vsync] Frame vsync
                 * @property {number|null} [ts] Frame ts
                 * @property {number|null} [dur] Frame dur
                 * @property {number|null} [durExpected] Frame durExpected
                 * @property {boolean|null} [appMissed] Frame appMissed
                 * @property {boolean|null} [sfMissed] Frame sfMissed
                 */

                /**
                 * Constructs a new Frame.
                 * @memberof perfetto.protos.AndroidJankCujMetric
                 * @classdesc Represents a Frame.
                 * @implements IFrame
                 * @constructor
                 * @param {perfetto.protos.AndroidJankCujMetric.IFrame=} [p] Properties to set
                 */
                function Frame(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Frame frameNumber.
                 * @member {number} frameNumber
                 * @memberof perfetto.protos.AndroidJankCujMetric.Frame
                 * @instance
                 */
                Frame.prototype.frameNumber = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Frame vsync.
                 * @member {number} vsync
                 * @memberof perfetto.protos.AndroidJankCujMetric.Frame
                 * @instance
                 */
                Frame.prototype.vsync = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Frame ts.
                 * @member {number} ts
                 * @memberof perfetto.protos.AndroidJankCujMetric.Frame
                 * @instance
                 */
                Frame.prototype.ts = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Frame dur.
                 * @member {number} dur
                 * @memberof perfetto.protos.AndroidJankCujMetric.Frame
                 * @instance
                 */
                Frame.prototype.dur = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Frame durExpected.
                 * @member {number} durExpected
                 * @memberof perfetto.protos.AndroidJankCujMetric.Frame
                 * @instance
                 */
                Frame.prototype.durExpected = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Frame appMissed.
                 * @member {boolean} appMissed
                 * @memberof perfetto.protos.AndroidJankCujMetric.Frame
                 * @instance
                 */
                Frame.prototype.appMissed = false;

                /**
                 * Frame sfMissed.
                 * @member {boolean} sfMissed
                 * @memberof perfetto.protos.AndroidJankCujMetric.Frame
                 * @instance
                 */
                Frame.prototype.sfMissed = false;

                /**
                 * Creates a new Frame instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidJankCujMetric.Frame
                 * @static
                 * @param {perfetto.protos.AndroidJankCujMetric.IFrame=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidJankCujMetric.Frame} Frame instance
                 */
                Frame.create = function create(properties) {
                    return new Frame(properties);
                };

                /**
                 * Encodes the specified Frame message. Does not implicitly {@link perfetto.protos.AndroidJankCujMetric.Frame.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidJankCujMetric.Frame
                 * @static
                 * @param {perfetto.protos.AndroidJankCujMetric.IFrame} m Frame message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Frame.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.frameNumber != null && Object.hasOwnProperty.call(m, "frameNumber"))
                        w.uint32(8).int64(m.frameNumber);
                    if (m.vsync != null && Object.hasOwnProperty.call(m, "vsync"))
                        w.uint32(16).int64(m.vsync);
                    if (m.ts != null && Object.hasOwnProperty.call(m, "ts"))
                        w.uint32(24).int64(m.ts);
                    if (m.dur != null && Object.hasOwnProperty.call(m, "dur"))
                        w.uint32(32).int64(m.dur);
                    if (m.appMissed != null && Object.hasOwnProperty.call(m, "appMissed"))
                        w.uint32(40).bool(m.appMissed);
                    if (m.sfMissed != null && Object.hasOwnProperty.call(m, "sfMissed"))
                        w.uint32(48).bool(m.sfMissed);
                    if (m.durExpected != null && Object.hasOwnProperty.call(m, "durExpected"))
                        w.uint32(56).int64(m.durExpected);
                    return w;
                };

                /**
                 * Encodes the specified Frame message, length delimited. Does not implicitly {@link perfetto.protos.AndroidJankCujMetric.Frame.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidJankCujMetric.Frame
                 * @static
                 * @param {perfetto.protos.AndroidJankCujMetric.IFrame} message Frame message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Frame.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Frame message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidJankCujMetric.Frame
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidJankCujMetric.Frame} Frame
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Frame.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidJankCujMetric.Frame();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.frameNumber = r.int64();
                            break;
                        case 2:
                            m.vsync = r.int64();
                            break;
                        case 3:
                            m.ts = r.int64();
                            break;
                        case 4:
                            m.dur = r.int64();
                            break;
                        case 7:
                            m.durExpected = r.int64();
                            break;
                        case 5:
                            m.appMissed = r.bool();
                            break;
                        case 6:
                            m.sfMissed = r.bool();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Frame message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidJankCujMetric.Frame
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidJankCujMetric.Frame} Frame
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Frame.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Frame message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidJankCujMetric.Frame
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Frame.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.frameNumber != null && m.hasOwnProperty("frameNumber")) {
                        if (!$util.isInteger(m.frameNumber) && !(m.frameNumber && $util.isInteger(m.frameNumber.low) && $util.isInteger(m.frameNumber.high)))
                            return "frameNumber: integer|Long expected";
                    }
                    if (m.vsync != null && m.hasOwnProperty("vsync")) {
                        if (!$util.isInteger(m.vsync) && !(m.vsync && $util.isInteger(m.vsync.low) && $util.isInteger(m.vsync.high)))
                            return "vsync: integer|Long expected";
                    }
                    if (m.ts != null && m.hasOwnProperty("ts")) {
                        if (!$util.isInteger(m.ts) && !(m.ts && $util.isInteger(m.ts.low) && $util.isInteger(m.ts.high)))
                            return "ts: integer|Long expected";
                    }
                    if (m.dur != null && m.hasOwnProperty("dur")) {
                        if (!$util.isInteger(m.dur) && !(m.dur && $util.isInteger(m.dur.low) && $util.isInteger(m.dur.high)))
                            return "dur: integer|Long expected";
                    }
                    if (m.durExpected != null && m.hasOwnProperty("durExpected")) {
                        if (!$util.isInteger(m.durExpected) && !(m.durExpected && $util.isInteger(m.durExpected.low) && $util.isInteger(m.durExpected.high)))
                            return "durExpected: integer|Long expected";
                    }
                    if (m.appMissed != null && m.hasOwnProperty("appMissed")) {
                        if (typeof m.appMissed !== "boolean")
                            return "appMissed: boolean expected";
                    }
                    if (m.sfMissed != null && m.hasOwnProperty("sfMissed")) {
                        if (typeof m.sfMissed !== "boolean")
                            return "sfMissed: boolean expected";
                    }
                    return null;
                };

                /**
                 * Creates a Frame message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidJankCujMetric.Frame
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidJankCujMetric.Frame} Frame
                 */
                Frame.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidJankCujMetric.Frame)
                        return d;
                    var m = new $root.perfetto.protos.AndroidJankCujMetric.Frame();
                    if (d.frameNumber != null) {
                        if ($util.Long)
                            (m.frameNumber = $util.Long.fromValue(d.frameNumber)).unsigned = false;
                        else if (typeof d.frameNumber === "string")
                            m.frameNumber = parseInt(d.frameNumber, 10);
                        else if (typeof d.frameNumber === "number")
                            m.frameNumber = d.frameNumber;
                        else if (typeof d.frameNumber === "object")
                            m.frameNumber = new $util.LongBits(d.frameNumber.low >>> 0, d.frameNumber.high >>> 0).toNumber();
                    }
                    if (d.vsync != null) {
                        if ($util.Long)
                            (m.vsync = $util.Long.fromValue(d.vsync)).unsigned = false;
                        else if (typeof d.vsync === "string")
                            m.vsync = parseInt(d.vsync, 10);
                        else if (typeof d.vsync === "number")
                            m.vsync = d.vsync;
                        else if (typeof d.vsync === "object")
                            m.vsync = new $util.LongBits(d.vsync.low >>> 0, d.vsync.high >>> 0).toNumber();
                    }
                    if (d.ts != null) {
                        if ($util.Long)
                            (m.ts = $util.Long.fromValue(d.ts)).unsigned = false;
                        else if (typeof d.ts === "string")
                            m.ts = parseInt(d.ts, 10);
                        else if (typeof d.ts === "number")
                            m.ts = d.ts;
                        else if (typeof d.ts === "object")
                            m.ts = new $util.LongBits(d.ts.low >>> 0, d.ts.high >>> 0).toNumber();
                    }
                    if (d.dur != null) {
                        if ($util.Long)
                            (m.dur = $util.Long.fromValue(d.dur)).unsigned = false;
                        else if (typeof d.dur === "string")
                            m.dur = parseInt(d.dur, 10);
                        else if (typeof d.dur === "number")
                            m.dur = d.dur;
                        else if (typeof d.dur === "object")
                            m.dur = new $util.LongBits(d.dur.low >>> 0, d.dur.high >>> 0).toNumber();
                    }
                    if (d.durExpected != null) {
                        if ($util.Long)
                            (m.durExpected = $util.Long.fromValue(d.durExpected)).unsigned = false;
                        else if (typeof d.durExpected === "string")
                            m.durExpected = parseInt(d.durExpected, 10);
                        else if (typeof d.durExpected === "number")
                            m.durExpected = d.durExpected;
                        else if (typeof d.durExpected === "object")
                            m.durExpected = new $util.LongBits(d.durExpected.low >>> 0, d.durExpected.high >>> 0).toNumber();
                    }
                    if (d.appMissed != null) {
                        m.appMissed = Boolean(d.appMissed);
                    }
                    if (d.sfMissed != null) {
                        m.sfMissed = Boolean(d.sfMissed);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Frame message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidJankCujMetric.Frame
                 * @static
                 * @param {perfetto.protos.AndroidJankCujMetric.Frame} m Frame
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Frame.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.frameNumber = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.frameNumber = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.vsync = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.vsync = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.ts = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.ts = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.dur = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.dur = o.longs === String ? "0" : 0;
                        d.appMissed = false;
                        d.sfMissed = false;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.durExpected = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.durExpected = o.longs === String ? "0" : 0;
                    }
                    if (m.frameNumber != null && m.hasOwnProperty("frameNumber")) {
                        if (typeof m.frameNumber === "number")
                            d.frameNumber = o.longs === String ? String(m.frameNumber) : m.frameNumber;
                        else
                            d.frameNumber = o.longs === String ? $util.Long.prototype.toString.call(m.frameNumber) : o.longs === Number ? new $util.LongBits(m.frameNumber.low >>> 0, m.frameNumber.high >>> 0).toNumber() : m.frameNumber;
                    }
                    if (m.vsync != null && m.hasOwnProperty("vsync")) {
                        if (typeof m.vsync === "number")
                            d.vsync = o.longs === String ? String(m.vsync) : m.vsync;
                        else
                            d.vsync = o.longs === String ? $util.Long.prototype.toString.call(m.vsync) : o.longs === Number ? new $util.LongBits(m.vsync.low >>> 0, m.vsync.high >>> 0).toNumber() : m.vsync;
                    }
                    if (m.ts != null && m.hasOwnProperty("ts")) {
                        if (typeof m.ts === "number")
                            d.ts = o.longs === String ? String(m.ts) : m.ts;
                        else
                            d.ts = o.longs === String ? $util.Long.prototype.toString.call(m.ts) : o.longs === Number ? new $util.LongBits(m.ts.low >>> 0, m.ts.high >>> 0).toNumber() : m.ts;
                    }
                    if (m.dur != null && m.hasOwnProperty("dur")) {
                        if (typeof m.dur === "number")
                            d.dur = o.longs === String ? String(m.dur) : m.dur;
                        else
                            d.dur = o.longs === String ? $util.Long.prototype.toString.call(m.dur) : o.longs === Number ? new $util.LongBits(m.dur.low >>> 0, m.dur.high >>> 0).toNumber() : m.dur;
                    }
                    if (m.appMissed != null && m.hasOwnProperty("appMissed")) {
                        d.appMissed = m.appMissed;
                    }
                    if (m.sfMissed != null && m.hasOwnProperty("sfMissed")) {
                        d.sfMissed = m.sfMissed;
                    }
                    if (m.durExpected != null && m.hasOwnProperty("durExpected")) {
                        if (typeof m.durExpected === "number")
                            d.durExpected = o.longs === String ? String(m.durExpected) : m.durExpected;
                        else
                            d.durExpected = o.longs === String ? $util.Long.prototype.toString.call(m.durExpected) : o.longs === Number ? new $util.LongBits(m.durExpected.low >>> 0, m.durExpected.high >>> 0).toNumber() : m.durExpected;
                    }
                    return d;
                };

                /**
                 * Converts this Frame to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidJankCujMetric.Frame
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Frame.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Frame;
            })();

            AndroidJankCujMetric.Metrics = (function() {

                /**
                 * Properties of a Metrics.
                 * @memberof perfetto.protos.AndroidJankCujMetric
                 * @interface IMetrics
                 * @property {number|null} [totalFrames] Metrics totalFrames
                 * @property {number|null} [missedFrames] Metrics missedFrames
                 * @property {number|null} [missedAppFrames] Metrics missedAppFrames
                 * @property {number|null} [missedSfFrames] Metrics missedSfFrames
                 * @property {number|null} [missedFramesMaxSuccessive] Metrics missedFramesMaxSuccessive
                 * @property {number|null} [frameDurMax] Metrics frameDurMax
                 * @property {number|null} [frameDurAvg] Metrics frameDurAvg
                 * @property {number|null} [frameDurP50] Metrics frameDurP50
                 * @property {number|null} [frameDurP90] Metrics frameDurP90
                 * @property {number|null} [frameDurP95] Metrics frameDurP95
                 * @property {number|null} [frameDurP99] Metrics frameDurP99
                 */

                /**
                 * Constructs a new Metrics.
                 * @memberof perfetto.protos.AndroidJankCujMetric
                 * @classdesc Represents a Metrics.
                 * @implements IMetrics
                 * @constructor
                 * @param {perfetto.protos.AndroidJankCujMetric.IMetrics=} [p] Properties to set
                 */
                function Metrics(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Metrics totalFrames.
                 * @member {number} totalFrames
                 * @memberof perfetto.protos.AndroidJankCujMetric.Metrics
                 * @instance
                 */
                Metrics.prototype.totalFrames = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Metrics missedFrames.
                 * @member {number} missedFrames
                 * @memberof perfetto.protos.AndroidJankCujMetric.Metrics
                 * @instance
                 */
                Metrics.prototype.missedFrames = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Metrics missedAppFrames.
                 * @member {number} missedAppFrames
                 * @memberof perfetto.protos.AndroidJankCujMetric.Metrics
                 * @instance
                 */
                Metrics.prototype.missedAppFrames = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Metrics missedSfFrames.
                 * @member {number} missedSfFrames
                 * @memberof perfetto.protos.AndroidJankCujMetric.Metrics
                 * @instance
                 */
                Metrics.prototype.missedSfFrames = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Metrics missedFramesMaxSuccessive.
                 * @member {number} missedFramesMaxSuccessive
                 * @memberof perfetto.protos.AndroidJankCujMetric.Metrics
                 * @instance
                 */
                Metrics.prototype.missedFramesMaxSuccessive = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Metrics frameDurMax.
                 * @member {number} frameDurMax
                 * @memberof perfetto.protos.AndroidJankCujMetric.Metrics
                 * @instance
                 */
                Metrics.prototype.frameDurMax = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Metrics frameDurAvg.
                 * @member {number} frameDurAvg
                 * @memberof perfetto.protos.AndroidJankCujMetric.Metrics
                 * @instance
                 */
                Metrics.prototype.frameDurAvg = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Metrics frameDurP50.
                 * @member {number} frameDurP50
                 * @memberof perfetto.protos.AndroidJankCujMetric.Metrics
                 * @instance
                 */
                Metrics.prototype.frameDurP50 = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Metrics frameDurP90.
                 * @member {number} frameDurP90
                 * @memberof perfetto.protos.AndroidJankCujMetric.Metrics
                 * @instance
                 */
                Metrics.prototype.frameDurP90 = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Metrics frameDurP95.
                 * @member {number} frameDurP95
                 * @memberof perfetto.protos.AndroidJankCujMetric.Metrics
                 * @instance
                 */
                Metrics.prototype.frameDurP95 = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Metrics frameDurP99.
                 * @member {number} frameDurP99
                 * @memberof perfetto.protos.AndroidJankCujMetric.Metrics
                 * @instance
                 */
                Metrics.prototype.frameDurP99 = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new Metrics instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidJankCujMetric.Metrics
                 * @static
                 * @param {perfetto.protos.AndroidJankCujMetric.IMetrics=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidJankCujMetric.Metrics} Metrics instance
                 */
                Metrics.create = function create(properties) {
                    return new Metrics(properties);
                };

                /**
                 * Encodes the specified Metrics message. Does not implicitly {@link perfetto.protos.AndroidJankCujMetric.Metrics.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidJankCujMetric.Metrics
                 * @static
                 * @param {perfetto.protos.AndroidJankCujMetric.IMetrics} m Metrics message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Metrics.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.totalFrames != null && Object.hasOwnProperty.call(m, "totalFrames"))
                        w.uint32(8).int64(m.totalFrames);
                    if (m.missedFrames != null && Object.hasOwnProperty.call(m, "missedFrames"))
                        w.uint32(16).int64(m.missedFrames);
                    if (m.missedAppFrames != null && Object.hasOwnProperty.call(m, "missedAppFrames"))
                        w.uint32(24).int64(m.missedAppFrames);
                    if (m.missedSfFrames != null && Object.hasOwnProperty.call(m, "missedSfFrames"))
                        w.uint32(32).int64(m.missedSfFrames);
                    if (m.missedFramesMaxSuccessive != null && Object.hasOwnProperty.call(m, "missedFramesMaxSuccessive"))
                        w.uint32(40).int64(m.missedFramesMaxSuccessive);
                    if (m.frameDurMax != null && Object.hasOwnProperty.call(m, "frameDurMax"))
                        w.uint32(48).int64(m.frameDurMax);
                    if (m.frameDurAvg != null && Object.hasOwnProperty.call(m, "frameDurAvg"))
                        w.uint32(56).int64(m.frameDurAvg);
                    if (m.frameDurP50 != null && Object.hasOwnProperty.call(m, "frameDurP50"))
                        w.uint32(64).int64(m.frameDurP50);
                    if (m.frameDurP90 != null && Object.hasOwnProperty.call(m, "frameDurP90"))
                        w.uint32(72).int64(m.frameDurP90);
                    if (m.frameDurP95 != null && Object.hasOwnProperty.call(m, "frameDurP95"))
                        w.uint32(80).int64(m.frameDurP95);
                    if (m.frameDurP99 != null && Object.hasOwnProperty.call(m, "frameDurP99"))
                        w.uint32(88).int64(m.frameDurP99);
                    return w;
                };

                /**
                 * Encodes the specified Metrics message, length delimited. Does not implicitly {@link perfetto.protos.AndroidJankCujMetric.Metrics.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidJankCujMetric.Metrics
                 * @static
                 * @param {perfetto.protos.AndroidJankCujMetric.IMetrics} message Metrics message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Metrics.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Metrics message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidJankCujMetric.Metrics
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidJankCujMetric.Metrics} Metrics
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Metrics.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidJankCujMetric.Metrics();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.totalFrames = r.int64();
                            break;
                        case 2:
                            m.missedFrames = r.int64();
                            break;
                        case 3:
                            m.missedAppFrames = r.int64();
                            break;
                        case 4:
                            m.missedSfFrames = r.int64();
                            break;
                        case 5:
                            m.missedFramesMaxSuccessive = r.int64();
                            break;
                        case 6:
                            m.frameDurMax = r.int64();
                            break;
                        case 7:
                            m.frameDurAvg = r.int64();
                            break;
                        case 8:
                            m.frameDurP50 = r.int64();
                            break;
                        case 9:
                            m.frameDurP90 = r.int64();
                            break;
                        case 10:
                            m.frameDurP95 = r.int64();
                            break;
                        case 11:
                            m.frameDurP99 = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Metrics message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidJankCujMetric.Metrics
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidJankCujMetric.Metrics} Metrics
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Metrics.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Metrics message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidJankCujMetric.Metrics
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Metrics.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.totalFrames != null && m.hasOwnProperty("totalFrames")) {
                        if (!$util.isInteger(m.totalFrames) && !(m.totalFrames && $util.isInteger(m.totalFrames.low) && $util.isInteger(m.totalFrames.high)))
                            return "totalFrames: integer|Long expected";
                    }
                    if (m.missedFrames != null && m.hasOwnProperty("missedFrames")) {
                        if (!$util.isInteger(m.missedFrames) && !(m.missedFrames && $util.isInteger(m.missedFrames.low) && $util.isInteger(m.missedFrames.high)))
                            return "missedFrames: integer|Long expected";
                    }
                    if (m.missedAppFrames != null && m.hasOwnProperty("missedAppFrames")) {
                        if (!$util.isInteger(m.missedAppFrames) && !(m.missedAppFrames && $util.isInteger(m.missedAppFrames.low) && $util.isInteger(m.missedAppFrames.high)))
                            return "missedAppFrames: integer|Long expected";
                    }
                    if (m.missedSfFrames != null && m.hasOwnProperty("missedSfFrames")) {
                        if (!$util.isInteger(m.missedSfFrames) && !(m.missedSfFrames && $util.isInteger(m.missedSfFrames.low) && $util.isInteger(m.missedSfFrames.high)))
                            return "missedSfFrames: integer|Long expected";
                    }
                    if (m.missedFramesMaxSuccessive != null && m.hasOwnProperty("missedFramesMaxSuccessive")) {
                        if (!$util.isInteger(m.missedFramesMaxSuccessive) && !(m.missedFramesMaxSuccessive && $util.isInteger(m.missedFramesMaxSuccessive.low) && $util.isInteger(m.missedFramesMaxSuccessive.high)))
                            return "missedFramesMaxSuccessive: integer|Long expected";
                    }
                    if (m.frameDurMax != null && m.hasOwnProperty("frameDurMax")) {
                        if (!$util.isInteger(m.frameDurMax) && !(m.frameDurMax && $util.isInteger(m.frameDurMax.low) && $util.isInteger(m.frameDurMax.high)))
                            return "frameDurMax: integer|Long expected";
                    }
                    if (m.frameDurAvg != null && m.hasOwnProperty("frameDurAvg")) {
                        if (!$util.isInteger(m.frameDurAvg) && !(m.frameDurAvg && $util.isInteger(m.frameDurAvg.low) && $util.isInteger(m.frameDurAvg.high)))
                            return "frameDurAvg: integer|Long expected";
                    }
                    if (m.frameDurP50 != null && m.hasOwnProperty("frameDurP50")) {
                        if (!$util.isInteger(m.frameDurP50) && !(m.frameDurP50 && $util.isInteger(m.frameDurP50.low) && $util.isInteger(m.frameDurP50.high)))
                            return "frameDurP50: integer|Long expected";
                    }
                    if (m.frameDurP90 != null && m.hasOwnProperty("frameDurP90")) {
                        if (!$util.isInteger(m.frameDurP90) && !(m.frameDurP90 && $util.isInteger(m.frameDurP90.low) && $util.isInteger(m.frameDurP90.high)))
                            return "frameDurP90: integer|Long expected";
                    }
                    if (m.frameDurP95 != null && m.hasOwnProperty("frameDurP95")) {
                        if (!$util.isInteger(m.frameDurP95) && !(m.frameDurP95 && $util.isInteger(m.frameDurP95.low) && $util.isInteger(m.frameDurP95.high)))
                            return "frameDurP95: integer|Long expected";
                    }
                    if (m.frameDurP99 != null && m.hasOwnProperty("frameDurP99")) {
                        if (!$util.isInteger(m.frameDurP99) && !(m.frameDurP99 && $util.isInteger(m.frameDurP99.low) && $util.isInteger(m.frameDurP99.high)))
                            return "frameDurP99: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a Metrics message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidJankCujMetric.Metrics
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidJankCujMetric.Metrics} Metrics
                 */
                Metrics.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidJankCujMetric.Metrics)
                        return d;
                    var m = new $root.perfetto.protos.AndroidJankCujMetric.Metrics();
                    if (d.totalFrames != null) {
                        if ($util.Long)
                            (m.totalFrames = $util.Long.fromValue(d.totalFrames)).unsigned = false;
                        else if (typeof d.totalFrames === "string")
                            m.totalFrames = parseInt(d.totalFrames, 10);
                        else if (typeof d.totalFrames === "number")
                            m.totalFrames = d.totalFrames;
                        else if (typeof d.totalFrames === "object")
                            m.totalFrames = new $util.LongBits(d.totalFrames.low >>> 0, d.totalFrames.high >>> 0).toNumber();
                    }
                    if (d.missedFrames != null) {
                        if ($util.Long)
                            (m.missedFrames = $util.Long.fromValue(d.missedFrames)).unsigned = false;
                        else if (typeof d.missedFrames === "string")
                            m.missedFrames = parseInt(d.missedFrames, 10);
                        else if (typeof d.missedFrames === "number")
                            m.missedFrames = d.missedFrames;
                        else if (typeof d.missedFrames === "object")
                            m.missedFrames = new $util.LongBits(d.missedFrames.low >>> 0, d.missedFrames.high >>> 0).toNumber();
                    }
                    if (d.missedAppFrames != null) {
                        if ($util.Long)
                            (m.missedAppFrames = $util.Long.fromValue(d.missedAppFrames)).unsigned = false;
                        else if (typeof d.missedAppFrames === "string")
                            m.missedAppFrames = parseInt(d.missedAppFrames, 10);
                        else if (typeof d.missedAppFrames === "number")
                            m.missedAppFrames = d.missedAppFrames;
                        else if (typeof d.missedAppFrames === "object")
                            m.missedAppFrames = new $util.LongBits(d.missedAppFrames.low >>> 0, d.missedAppFrames.high >>> 0).toNumber();
                    }
                    if (d.missedSfFrames != null) {
                        if ($util.Long)
                            (m.missedSfFrames = $util.Long.fromValue(d.missedSfFrames)).unsigned = false;
                        else if (typeof d.missedSfFrames === "string")
                            m.missedSfFrames = parseInt(d.missedSfFrames, 10);
                        else if (typeof d.missedSfFrames === "number")
                            m.missedSfFrames = d.missedSfFrames;
                        else if (typeof d.missedSfFrames === "object")
                            m.missedSfFrames = new $util.LongBits(d.missedSfFrames.low >>> 0, d.missedSfFrames.high >>> 0).toNumber();
                    }
                    if (d.missedFramesMaxSuccessive != null) {
                        if ($util.Long)
                            (m.missedFramesMaxSuccessive = $util.Long.fromValue(d.missedFramesMaxSuccessive)).unsigned = false;
                        else if (typeof d.missedFramesMaxSuccessive === "string")
                            m.missedFramesMaxSuccessive = parseInt(d.missedFramesMaxSuccessive, 10);
                        else if (typeof d.missedFramesMaxSuccessive === "number")
                            m.missedFramesMaxSuccessive = d.missedFramesMaxSuccessive;
                        else if (typeof d.missedFramesMaxSuccessive === "object")
                            m.missedFramesMaxSuccessive = new $util.LongBits(d.missedFramesMaxSuccessive.low >>> 0, d.missedFramesMaxSuccessive.high >>> 0).toNumber();
                    }
                    if (d.frameDurMax != null) {
                        if ($util.Long)
                            (m.frameDurMax = $util.Long.fromValue(d.frameDurMax)).unsigned = false;
                        else if (typeof d.frameDurMax === "string")
                            m.frameDurMax = parseInt(d.frameDurMax, 10);
                        else if (typeof d.frameDurMax === "number")
                            m.frameDurMax = d.frameDurMax;
                        else if (typeof d.frameDurMax === "object")
                            m.frameDurMax = new $util.LongBits(d.frameDurMax.low >>> 0, d.frameDurMax.high >>> 0).toNumber();
                    }
                    if (d.frameDurAvg != null) {
                        if ($util.Long)
                            (m.frameDurAvg = $util.Long.fromValue(d.frameDurAvg)).unsigned = false;
                        else if (typeof d.frameDurAvg === "string")
                            m.frameDurAvg = parseInt(d.frameDurAvg, 10);
                        else if (typeof d.frameDurAvg === "number")
                            m.frameDurAvg = d.frameDurAvg;
                        else if (typeof d.frameDurAvg === "object")
                            m.frameDurAvg = new $util.LongBits(d.frameDurAvg.low >>> 0, d.frameDurAvg.high >>> 0).toNumber();
                    }
                    if (d.frameDurP50 != null) {
                        if ($util.Long)
                            (m.frameDurP50 = $util.Long.fromValue(d.frameDurP50)).unsigned = false;
                        else if (typeof d.frameDurP50 === "string")
                            m.frameDurP50 = parseInt(d.frameDurP50, 10);
                        else if (typeof d.frameDurP50 === "number")
                            m.frameDurP50 = d.frameDurP50;
                        else if (typeof d.frameDurP50 === "object")
                            m.frameDurP50 = new $util.LongBits(d.frameDurP50.low >>> 0, d.frameDurP50.high >>> 0).toNumber();
                    }
                    if (d.frameDurP90 != null) {
                        if ($util.Long)
                            (m.frameDurP90 = $util.Long.fromValue(d.frameDurP90)).unsigned = false;
                        else if (typeof d.frameDurP90 === "string")
                            m.frameDurP90 = parseInt(d.frameDurP90, 10);
                        else if (typeof d.frameDurP90 === "number")
                            m.frameDurP90 = d.frameDurP90;
                        else if (typeof d.frameDurP90 === "object")
                            m.frameDurP90 = new $util.LongBits(d.frameDurP90.low >>> 0, d.frameDurP90.high >>> 0).toNumber();
                    }
                    if (d.frameDurP95 != null) {
                        if ($util.Long)
                            (m.frameDurP95 = $util.Long.fromValue(d.frameDurP95)).unsigned = false;
                        else if (typeof d.frameDurP95 === "string")
                            m.frameDurP95 = parseInt(d.frameDurP95, 10);
                        else if (typeof d.frameDurP95 === "number")
                            m.frameDurP95 = d.frameDurP95;
                        else if (typeof d.frameDurP95 === "object")
                            m.frameDurP95 = new $util.LongBits(d.frameDurP95.low >>> 0, d.frameDurP95.high >>> 0).toNumber();
                    }
                    if (d.frameDurP99 != null) {
                        if ($util.Long)
                            (m.frameDurP99 = $util.Long.fromValue(d.frameDurP99)).unsigned = false;
                        else if (typeof d.frameDurP99 === "string")
                            m.frameDurP99 = parseInt(d.frameDurP99, 10);
                        else if (typeof d.frameDurP99 === "number")
                            m.frameDurP99 = d.frameDurP99;
                        else if (typeof d.frameDurP99 === "object")
                            m.frameDurP99 = new $util.LongBits(d.frameDurP99.low >>> 0, d.frameDurP99.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Metrics message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidJankCujMetric.Metrics
                 * @static
                 * @param {perfetto.protos.AndroidJankCujMetric.Metrics} m Metrics
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Metrics.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.totalFrames = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.totalFrames = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.missedFrames = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.missedFrames = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.missedAppFrames = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.missedAppFrames = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.missedSfFrames = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.missedSfFrames = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.missedFramesMaxSuccessive = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.missedFramesMaxSuccessive = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.frameDurMax = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.frameDurMax = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.frameDurAvg = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.frameDurAvg = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.frameDurP50 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.frameDurP50 = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.frameDurP90 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.frameDurP90 = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.frameDurP95 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.frameDurP95 = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.frameDurP99 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.frameDurP99 = o.longs === String ? "0" : 0;
                    }
                    if (m.totalFrames != null && m.hasOwnProperty("totalFrames")) {
                        if (typeof m.totalFrames === "number")
                            d.totalFrames = o.longs === String ? String(m.totalFrames) : m.totalFrames;
                        else
                            d.totalFrames = o.longs === String ? $util.Long.prototype.toString.call(m.totalFrames) : o.longs === Number ? new $util.LongBits(m.totalFrames.low >>> 0, m.totalFrames.high >>> 0).toNumber() : m.totalFrames;
                    }
                    if (m.missedFrames != null && m.hasOwnProperty("missedFrames")) {
                        if (typeof m.missedFrames === "number")
                            d.missedFrames = o.longs === String ? String(m.missedFrames) : m.missedFrames;
                        else
                            d.missedFrames = o.longs === String ? $util.Long.prototype.toString.call(m.missedFrames) : o.longs === Number ? new $util.LongBits(m.missedFrames.low >>> 0, m.missedFrames.high >>> 0).toNumber() : m.missedFrames;
                    }
                    if (m.missedAppFrames != null && m.hasOwnProperty("missedAppFrames")) {
                        if (typeof m.missedAppFrames === "number")
                            d.missedAppFrames = o.longs === String ? String(m.missedAppFrames) : m.missedAppFrames;
                        else
                            d.missedAppFrames = o.longs === String ? $util.Long.prototype.toString.call(m.missedAppFrames) : o.longs === Number ? new $util.LongBits(m.missedAppFrames.low >>> 0, m.missedAppFrames.high >>> 0).toNumber() : m.missedAppFrames;
                    }
                    if (m.missedSfFrames != null && m.hasOwnProperty("missedSfFrames")) {
                        if (typeof m.missedSfFrames === "number")
                            d.missedSfFrames = o.longs === String ? String(m.missedSfFrames) : m.missedSfFrames;
                        else
                            d.missedSfFrames = o.longs === String ? $util.Long.prototype.toString.call(m.missedSfFrames) : o.longs === Number ? new $util.LongBits(m.missedSfFrames.low >>> 0, m.missedSfFrames.high >>> 0).toNumber() : m.missedSfFrames;
                    }
                    if (m.missedFramesMaxSuccessive != null && m.hasOwnProperty("missedFramesMaxSuccessive")) {
                        if (typeof m.missedFramesMaxSuccessive === "number")
                            d.missedFramesMaxSuccessive = o.longs === String ? String(m.missedFramesMaxSuccessive) : m.missedFramesMaxSuccessive;
                        else
                            d.missedFramesMaxSuccessive = o.longs === String ? $util.Long.prototype.toString.call(m.missedFramesMaxSuccessive) : o.longs === Number ? new $util.LongBits(m.missedFramesMaxSuccessive.low >>> 0, m.missedFramesMaxSuccessive.high >>> 0).toNumber() : m.missedFramesMaxSuccessive;
                    }
                    if (m.frameDurMax != null && m.hasOwnProperty("frameDurMax")) {
                        if (typeof m.frameDurMax === "number")
                            d.frameDurMax = o.longs === String ? String(m.frameDurMax) : m.frameDurMax;
                        else
                            d.frameDurMax = o.longs === String ? $util.Long.prototype.toString.call(m.frameDurMax) : o.longs === Number ? new $util.LongBits(m.frameDurMax.low >>> 0, m.frameDurMax.high >>> 0).toNumber() : m.frameDurMax;
                    }
                    if (m.frameDurAvg != null && m.hasOwnProperty("frameDurAvg")) {
                        if (typeof m.frameDurAvg === "number")
                            d.frameDurAvg = o.longs === String ? String(m.frameDurAvg) : m.frameDurAvg;
                        else
                            d.frameDurAvg = o.longs === String ? $util.Long.prototype.toString.call(m.frameDurAvg) : o.longs === Number ? new $util.LongBits(m.frameDurAvg.low >>> 0, m.frameDurAvg.high >>> 0).toNumber() : m.frameDurAvg;
                    }
                    if (m.frameDurP50 != null && m.hasOwnProperty("frameDurP50")) {
                        if (typeof m.frameDurP50 === "number")
                            d.frameDurP50 = o.longs === String ? String(m.frameDurP50) : m.frameDurP50;
                        else
                            d.frameDurP50 = o.longs === String ? $util.Long.prototype.toString.call(m.frameDurP50) : o.longs === Number ? new $util.LongBits(m.frameDurP50.low >>> 0, m.frameDurP50.high >>> 0).toNumber() : m.frameDurP50;
                    }
                    if (m.frameDurP90 != null && m.hasOwnProperty("frameDurP90")) {
                        if (typeof m.frameDurP90 === "number")
                            d.frameDurP90 = o.longs === String ? String(m.frameDurP90) : m.frameDurP90;
                        else
                            d.frameDurP90 = o.longs === String ? $util.Long.prototype.toString.call(m.frameDurP90) : o.longs === Number ? new $util.LongBits(m.frameDurP90.low >>> 0, m.frameDurP90.high >>> 0).toNumber() : m.frameDurP90;
                    }
                    if (m.frameDurP95 != null && m.hasOwnProperty("frameDurP95")) {
                        if (typeof m.frameDurP95 === "number")
                            d.frameDurP95 = o.longs === String ? String(m.frameDurP95) : m.frameDurP95;
                        else
                            d.frameDurP95 = o.longs === String ? $util.Long.prototype.toString.call(m.frameDurP95) : o.longs === Number ? new $util.LongBits(m.frameDurP95.low >>> 0, m.frameDurP95.high >>> 0).toNumber() : m.frameDurP95;
                    }
                    if (m.frameDurP99 != null && m.hasOwnProperty("frameDurP99")) {
                        if (typeof m.frameDurP99 === "number")
                            d.frameDurP99 = o.longs === String ? String(m.frameDurP99) : m.frameDurP99;
                        else
                            d.frameDurP99 = o.longs === String ? $util.Long.prototype.toString.call(m.frameDurP99) : o.longs === Number ? new $util.LongBits(m.frameDurP99.low >>> 0, m.frameDurP99.high >>> 0).toNumber() : m.frameDurP99;
                    }
                    return d;
                };

                /**
                 * Converts this Metrics to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidJankCujMetric.Metrics
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Metrics.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Metrics;
            })();

            return AndroidJankCujMetric;
        })();

        protos.JavaHeapHistogram = (function() {

            /**
             * Properties of a JavaHeapHistogram.
             * @memberof perfetto.protos
             * @interface IJavaHeapHistogram
             * @property {Array.<perfetto.protos.JavaHeapHistogram.IInstanceStats>|null} [instanceStats] JavaHeapHistogram instanceStats
             */

            /**
             * Constructs a new JavaHeapHistogram.
             * @memberof perfetto.protos
             * @classdesc Represents a JavaHeapHistogram.
             * @implements IJavaHeapHistogram
             * @constructor
             * @param {perfetto.protos.IJavaHeapHistogram=} [p] Properties to set
             */
            function JavaHeapHistogram(p) {
                this.instanceStats = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * JavaHeapHistogram instanceStats.
             * @member {Array.<perfetto.protos.JavaHeapHistogram.IInstanceStats>} instanceStats
             * @memberof perfetto.protos.JavaHeapHistogram
             * @instance
             */
            JavaHeapHistogram.prototype.instanceStats = $util.emptyArray;

            /**
             * Creates a new JavaHeapHistogram instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.JavaHeapHistogram
             * @static
             * @param {perfetto.protos.IJavaHeapHistogram=} [properties] Properties to set
             * @returns {perfetto.protos.JavaHeapHistogram} JavaHeapHistogram instance
             */
            JavaHeapHistogram.create = function create(properties) {
                return new JavaHeapHistogram(properties);
            };

            /**
             * Encodes the specified JavaHeapHistogram message. Does not implicitly {@link perfetto.protos.JavaHeapHistogram.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.JavaHeapHistogram
             * @static
             * @param {perfetto.protos.IJavaHeapHistogram} m JavaHeapHistogram message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            JavaHeapHistogram.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.instanceStats != null && m.instanceStats.length) {
                    for (var i = 0; i < m.instanceStats.length; ++i)
                        $root.perfetto.protos.JavaHeapHistogram.InstanceStats.encode(m.instanceStats[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified JavaHeapHistogram message, length delimited. Does not implicitly {@link perfetto.protos.JavaHeapHistogram.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.JavaHeapHistogram
             * @static
             * @param {perfetto.protos.IJavaHeapHistogram} message JavaHeapHistogram message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            JavaHeapHistogram.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a JavaHeapHistogram message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.JavaHeapHistogram
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.JavaHeapHistogram} JavaHeapHistogram
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            JavaHeapHistogram.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.JavaHeapHistogram();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.instanceStats && m.instanceStats.length))
                            m.instanceStats = [];
                        m.instanceStats.push($root.perfetto.protos.JavaHeapHistogram.InstanceStats.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a JavaHeapHistogram message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.JavaHeapHistogram
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.JavaHeapHistogram} JavaHeapHistogram
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            JavaHeapHistogram.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a JavaHeapHistogram message.
             * @function verify
             * @memberof perfetto.protos.JavaHeapHistogram
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            JavaHeapHistogram.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.instanceStats != null && m.hasOwnProperty("instanceStats")) {
                    if (!Array.isArray(m.instanceStats))
                        return "instanceStats: array expected";
                    for (var i = 0; i < m.instanceStats.length; ++i) {
                        {
                            var e = $root.perfetto.protos.JavaHeapHistogram.InstanceStats.verify(m.instanceStats[i]);
                            if (e)
                                return "instanceStats." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a JavaHeapHistogram message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.JavaHeapHistogram
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.JavaHeapHistogram} JavaHeapHistogram
             */
            JavaHeapHistogram.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.JavaHeapHistogram)
                    return d;
                var m = new $root.perfetto.protos.JavaHeapHistogram();
                if (d.instanceStats) {
                    if (!Array.isArray(d.instanceStats))
                        throw TypeError(".perfetto.protos.JavaHeapHistogram.instanceStats: array expected");
                    m.instanceStats = [];
                    for (var i = 0; i < d.instanceStats.length; ++i) {
                        if (typeof d.instanceStats[i] !== "object")
                            throw TypeError(".perfetto.protos.JavaHeapHistogram.instanceStats: object expected");
                        m.instanceStats[i] = $root.perfetto.protos.JavaHeapHistogram.InstanceStats.fromObject(d.instanceStats[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a JavaHeapHistogram message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.JavaHeapHistogram
             * @static
             * @param {perfetto.protos.JavaHeapHistogram} m JavaHeapHistogram
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            JavaHeapHistogram.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.instanceStats = [];
                }
                if (m.instanceStats && m.instanceStats.length) {
                    d.instanceStats = [];
                    for (var j = 0; j < m.instanceStats.length; ++j) {
                        d.instanceStats[j] = $root.perfetto.protos.JavaHeapHistogram.InstanceStats.toObject(m.instanceStats[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this JavaHeapHistogram to JSON.
             * @function toJSON
             * @memberof perfetto.protos.JavaHeapHistogram
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            JavaHeapHistogram.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            JavaHeapHistogram.TypeCount = (function() {

                /**
                 * Properties of a TypeCount.
                 * @memberof perfetto.protos.JavaHeapHistogram
                 * @interface ITypeCount
                 * @property {string|null} [typeName] TypeCount typeName
                 * @property {string|null} [category] TypeCount category
                 * @property {number|null} [objCount] TypeCount objCount
                 * @property {number|null} [reachableObjCount] TypeCount reachableObjCount
                 * @property {number|null} [sizeKb] TypeCount sizeKb
                 * @property {number|null} [reachableSizeKb] TypeCount reachableSizeKb
                 * @property {number|null} [nativeSizeKb] TypeCount nativeSizeKb
                 * @property {number|null} [reachableNativeSizeKb] TypeCount reachableNativeSizeKb
                 */

                /**
                 * Constructs a new TypeCount.
                 * @memberof perfetto.protos.JavaHeapHistogram
                 * @classdesc Represents a TypeCount.
                 * @implements ITypeCount
                 * @constructor
                 * @param {perfetto.protos.JavaHeapHistogram.ITypeCount=} [p] Properties to set
                 */
                function TypeCount(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * TypeCount typeName.
                 * @member {string} typeName
                 * @memberof perfetto.protos.JavaHeapHistogram.TypeCount
                 * @instance
                 */
                TypeCount.prototype.typeName = "";

                /**
                 * TypeCount category.
                 * @member {string} category
                 * @memberof perfetto.protos.JavaHeapHistogram.TypeCount
                 * @instance
                 */
                TypeCount.prototype.category = "";

                /**
                 * TypeCount objCount.
                 * @member {number} objCount
                 * @memberof perfetto.protos.JavaHeapHistogram.TypeCount
                 * @instance
                 */
                TypeCount.prototype.objCount = 0;

                /**
                 * TypeCount reachableObjCount.
                 * @member {number} reachableObjCount
                 * @memberof perfetto.protos.JavaHeapHistogram.TypeCount
                 * @instance
                 */
                TypeCount.prototype.reachableObjCount = 0;

                /**
                 * TypeCount sizeKb.
                 * @member {number} sizeKb
                 * @memberof perfetto.protos.JavaHeapHistogram.TypeCount
                 * @instance
                 */
                TypeCount.prototype.sizeKb = 0;

                /**
                 * TypeCount reachableSizeKb.
                 * @member {number} reachableSizeKb
                 * @memberof perfetto.protos.JavaHeapHistogram.TypeCount
                 * @instance
                 */
                TypeCount.prototype.reachableSizeKb = 0;

                /**
                 * TypeCount nativeSizeKb.
                 * @member {number} nativeSizeKb
                 * @memberof perfetto.protos.JavaHeapHistogram.TypeCount
                 * @instance
                 */
                TypeCount.prototype.nativeSizeKb = 0;

                /**
                 * TypeCount reachableNativeSizeKb.
                 * @member {number} reachableNativeSizeKb
                 * @memberof perfetto.protos.JavaHeapHistogram.TypeCount
                 * @instance
                 */
                TypeCount.prototype.reachableNativeSizeKb = 0;

                /**
                 * Creates a new TypeCount instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.JavaHeapHistogram.TypeCount
                 * @static
                 * @param {perfetto.protos.JavaHeapHistogram.ITypeCount=} [properties] Properties to set
                 * @returns {perfetto.protos.JavaHeapHistogram.TypeCount} TypeCount instance
                 */
                TypeCount.create = function create(properties) {
                    return new TypeCount(properties);
                };

                /**
                 * Encodes the specified TypeCount message. Does not implicitly {@link perfetto.protos.JavaHeapHistogram.TypeCount.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.JavaHeapHistogram.TypeCount
                 * @static
                 * @param {perfetto.protos.JavaHeapHistogram.ITypeCount} m TypeCount message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                TypeCount.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.typeName != null && Object.hasOwnProperty.call(m, "typeName"))
                        w.uint32(10).string(m.typeName);
                    if (m.objCount != null && Object.hasOwnProperty.call(m, "objCount"))
                        w.uint32(16).uint32(m.objCount);
                    if (m.reachableObjCount != null && Object.hasOwnProperty.call(m, "reachableObjCount"))
                        w.uint32(24).uint32(m.reachableObjCount);
                    if (m.category != null && Object.hasOwnProperty.call(m, "category"))
                        w.uint32(34).string(m.category);
                    if (m.sizeKb != null && Object.hasOwnProperty.call(m, "sizeKb"))
                        w.uint32(40).uint32(m.sizeKb);
                    if (m.reachableSizeKb != null && Object.hasOwnProperty.call(m, "reachableSizeKb"))
                        w.uint32(48).uint32(m.reachableSizeKb);
                    if (m.nativeSizeKb != null && Object.hasOwnProperty.call(m, "nativeSizeKb"))
                        w.uint32(56).uint32(m.nativeSizeKb);
                    if (m.reachableNativeSizeKb != null && Object.hasOwnProperty.call(m, "reachableNativeSizeKb"))
                        w.uint32(64).uint32(m.reachableNativeSizeKb);
                    return w;
                };

                /**
                 * Encodes the specified TypeCount message, length delimited. Does not implicitly {@link perfetto.protos.JavaHeapHistogram.TypeCount.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.JavaHeapHistogram.TypeCount
                 * @static
                 * @param {perfetto.protos.JavaHeapHistogram.ITypeCount} message TypeCount message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                TypeCount.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a TypeCount message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.JavaHeapHistogram.TypeCount
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.JavaHeapHistogram.TypeCount} TypeCount
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                TypeCount.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.JavaHeapHistogram.TypeCount();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.typeName = r.string();
                            break;
                        case 4:
                            m.category = r.string();
                            break;
                        case 2:
                            m.objCount = r.uint32();
                            break;
                        case 3:
                            m.reachableObjCount = r.uint32();
                            break;
                        case 5:
                            m.sizeKb = r.uint32();
                            break;
                        case 6:
                            m.reachableSizeKb = r.uint32();
                            break;
                        case 7:
                            m.nativeSizeKb = r.uint32();
                            break;
                        case 8:
                            m.reachableNativeSizeKb = r.uint32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a TypeCount message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.JavaHeapHistogram.TypeCount
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.JavaHeapHistogram.TypeCount} TypeCount
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                TypeCount.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a TypeCount message.
                 * @function verify
                 * @memberof perfetto.protos.JavaHeapHistogram.TypeCount
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                TypeCount.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.typeName != null && m.hasOwnProperty("typeName")) {
                        if (!$util.isString(m.typeName))
                            return "typeName: string expected";
                    }
                    if (m.category != null && m.hasOwnProperty("category")) {
                        if (!$util.isString(m.category))
                            return "category: string expected";
                    }
                    if (m.objCount != null && m.hasOwnProperty("objCount")) {
                        if (!$util.isInteger(m.objCount))
                            return "objCount: integer expected";
                    }
                    if (m.reachableObjCount != null && m.hasOwnProperty("reachableObjCount")) {
                        if (!$util.isInteger(m.reachableObjCount))
                            return "reachableObjCount: integer expected";
                    }
                    if (m.sizeKb != null && m.hasOwnProperty("sizeKb")) {
                        if (!$util.isInteger(m.sizeKb))
                            return "sizeKb: integer expected";
                    }
                    if (m.reachableSizeKb != null && m.hasOwnProperty("reachableSizeKb")) {
                        if (!$util.isInteger(m.reachableSizeKb))
                            return "reachableSizeKb: integer expected";
                    }
                    if (m.nativeSizeKb != null && m.hasOwnProperty("nativeSizeKb")) {
                        if (!$util.isInteger(m.nativeSizeKb))
                            return "nativeSizeKb: integer expected";
                    }
                    if (m.reachableNativeSizeKb != null && m.hasOwnProperty("reachableNativeSizeKb")) {
                        if (!$util.isInteger(m.reachableNativeSizeKb))
                            return "reachableNativeSizeKb: integer expected";
                    }
                    return null;
                };

                /**
                 * Creates a TypeCount message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.JavaHeapHistogram.TypeCount
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.JavaHeapHistogram.TypeCount} TypeCount
                 */
                TypeCount.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.JavaHeapHistogram.TypeCount)
                        return d;
                    var m = new $root.perfetto.protos.JavaHeapHistogram.TypeCount();
                    if (d.typeName != null) {
                        m.typeName = String(d.typeName);
                    }
                    if (d.category != null) {
                        m.category = String(d.category);
                    }
                    if (d.objCount != null) {
                        m.objCount = d.objCount >>> 0;
                    }
                    if (d.reachableObjCount != null) {
                        m.reachableObjCount = d.reachableObjCount >>> 0;
                    }
                    if (d.sizeKb != null) {
                        m.sizeKb = d.sizeKb >>> 0;
                    }
                    if (d.reachableSizeKb != null) {
                        m.reachableSizeKb = d.reachableSizeKb >>> 0;
                    }
                    if (d.nativeSizeKb != null) {
                        m.nativeSizeKb = d.nativeSizeKb >>> 0;
                    }
                    if (d.reachableNativeSizeKb != null) {
                        m.reachableNativeSizeKb = d.reachableNativeSizeKb >>> 0;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a TypeCount message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.JavaHeapHistogram.TypeCount
                 * @static
                 * @param {perfetto.protos.JavaHeapHistogram.TypeCount} m TypeCount
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                TypeCount.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.typeName = "";
                        d.objCount = 0;
                        d.reachableObjCount = 0;
                        d.category = "";
                        d.sizeKb = 0;
                        d.reachableSizeKb = 0;
                        d.nativeSizeKb = 0;
                        d.reachableNativeSizeKb = 0;
                    }
                    if (m.typeName != null && m.hasOwnProperty("typeName")) {
                        d.typeName = m.typeName;
                    }
                    if (m.objCount != null && m.hasOwnProperty("objCount")) {
                        d.objCount = m.objCount;
                    }
                    if (m.reachableObjCount != null && m.hasOwnProperty("reachableObjCount")) {
                        d.reachableObjCount = m.reachableObjCount;
                    }
                    if (m.category != null && m.hasOwnProperty("category")) {
                        d.category = m.category;
                    }
                    if (m.sizeKb != null && m.hasOwnProperty("sizeKb")) {
                        d.sizeKb = m.sizeKb;
                    }
                    if (m.reachableSizeKb != null && m.hasOwnProperty("reachableSizeKb")) {
                        d.reachableSizeKb = m.reachableSizeKb;
                    }
                    if (m.nativeSizeKb != null && m.hasOwnProperty("nativeSizeKb")) {
                        d.nativeSizeKb = m.nativeSizeKb;
                    }
                    if (m.reachableNativeSizeKb != null && m.hasOwnProperty("reachableNativeSizeKb")) {
                        d.reachableNativeSizeKb = m.reachableNativeSizeKb;
                    }
                    return d;
                };

                /**
                 * Converts this TypeCount to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.JavaHeapHistogram.TypeCount
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                TypeCount.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return TypeCount;
            })();

            JavaHeapHistogram.Sample = (function() {

                /**
                 * Properties of a Sample.
                 * @memberof perfetto.protos.JavaHeapHistogram
                 * @interface ISample
                 * @property {number|null} [ts] Sample ts
                 * @property {Array.<perfetto.protos.JavaHeapHistogram.ITypeCount>|null} [typeCount] Sample typeCount
                 */

                /**
                 * Constructs a new Sample.
                 * @memberof perfetto.protos.JavaHeapHistogram
                 * @classdesc Represents a Sample.
                 * @implements ISample
                 * @constructor
                 * @param {perfetto.protos.JavaHeapHistogram.ISample=} [p] Properties to set
                 */
                function Sample(p) {
                    this.typeCount = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Sample ts.
                 * @member {number} ts
                 * @memberof perfetto.protos.JavaHeapHistogram.Sample
                 * @instance
                 */
                Sample.prototype.ts = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Sample typeCount.
                 * @member {Array.<perfetto.protos.JavaHeapHistogram.ITypeCount>} typeCount
                 * @memberof perfetto.protos.JavaHeapHistogram.Sample
                 * @instance
                 */
                Sample.prototype.typeCount = $util.emptyArray;

                /**
                 * Creates a new Sample instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.JavaHeapHistogram.Sample
                 * @static
                 * @param {perfetto.protos.JavaHeapHistogram.ISample=} [properties] Properties to set
                 * @returns {perfetto.protos.JavaHeapHistogram.Sample} Sample instance
                 */
                Sample.create = function create(properties) {
                    return new Sample(properties);
                };

                /**
                 * Encodes the specified Sample message. Does not implicitly {@link perfetto.protos.JavaHeapHistogram.Sample.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.JavaHeapHistogram.Sample
                 * @static
                 * @param {perfetto.protos.JavaHeapHistogram.ISample} m Sample message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Sample.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.ts != null && Object.hasOwnProperty.call(m, "ts"))
                        w.uint32(8).int64(m.ts);
                    if (m.typeCount != null && m.typeCount.length) {
                        for (var i = 0; i < m.typeCount.length; ++i)
                            $root.perfetto.protos.JavaHeapHistogram.TypeCount.encode(m.typeCount[i], w.uint32(18).fork()).ldelim();
                    }
                    return w;
                };

                /**
                 * Encodes the specified Sample message, length delimited. Does not implicitly {@link perfetto.protos.JavaHeapHistogram.Sample.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.JavaHeapHistogram.Sample
                 * @static
                 * @param {perfetto.protos.JavaHeapHistogram.ISample} message Sample message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Sample.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Sample message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.JavaHeapHistogram.Sample
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.JavaHeapHistogram.Sample} Sample
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Sample.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.JavaHeapHistogram.Sample();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.ts = r.int64();
                            break;
                        case 2:
                            if (!(m.typeCount && m.typeCount.length))
                                m.typeCount = [];
                            m.typeCount.push($root.perfetto.protos.JavaHeapHistogram.TypeCount.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Sample message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.JavaHeapHistogram.Sample
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.JavaHeapHistogram.Sample} Sample
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Sample.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Sample message.
                 * @function verify
                 * @memberof perfetto.protos.JavaHeapHistogram.Sample
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Sample.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.ts != null && m.hasOwnProperty("ts")) {
                        if (!$util.isInteger(m.ts) && !(m.ts && $util.isInteger(m.ts.low) && $util.isInteger(m.ts.high)))
                            return "ts: integer|Long expected";
                    }
                    if (m.typeCount != null && m.hasOwnProperty("typeCount")) {
                        if (!Array.isArray(m.typeCount))
                            return "typeCount: array expected";
                        for (var i = 0; i < m.typeCount.length; ++i) {
                            {
                                var e = $root.perfetto.protos.JavaHeapHistogram.TypeCount.verify(m.typeCount[i]);
                                if (e)
                                    return "typeCount." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates a Sample message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.JavaHeapHistogram.Sample
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.JavaHeapHistogram.Sample} Sample
                 */
                Sample.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.JavaHeapHistogram.Sample)
                        return d;
                    var m = new $root.perfetto.protos.JavaHeapHistogram.Sample();
                    if (d.ts != null) {
                        if ($util.Long)
                            (m.ts = $util.Long.fromValue(d.ts)).unsigned = false;
                        else if (typeof d.ts === "string")
                            m.ts = parseInt(d.ts, 10);
                        else if (typeof d.ts === "number")
                            m.ts = d.ts;
                        else if (typeof d.ts === "object")
                            m.ts = new $util.LongBits(d.ts.low >>> 0, d.ts.high >>> 0).toNumber();
                    }
                    if (d.typeCount) {
                        if (!Array.isArray(d.typeCount))
                            throw TypeError(".perfetto.protos.JavaHeapHistogram.Sample.typeCount: array expected");
                        m.typeCount = [];
                        for (var i = 0; i < d.typeCount.length; ++i) {
                            if (typeof d.typeCount[i] !== "object")
                                throw TypeError(".perfetto.protos.JavaHeapHistogram.Sample.typeCount: object expected");
                            m.typeCount[i] = $root.perfetto.protos.JavaHeapHistogram.TypeCount.fromObject(d.typeCount[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Sample message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.JavaHeapHistogram.Sample
                 * @static
                 * @param {perfetto.protos.JavaHeapHistogram.Sample} m Sample
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Sample.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.typeCount = [];
                    }
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.ts = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.ts = o.longs === String ? "0" : 0;
                    }
                    if (m.ts != null && m.hasOwnProperty("ts")) {
                        if (typeof m.ts === "number")
                            d.ts = o.longs === String ? String(m.ts) : m.ts;
                        else
                            d.ts = o.longs === String ? $util.Long.prototype.toString.call(m.ts) : o.longs === Number ? new $util.LongBits(m.ts.low >>> 0, m.ts.high >>> 0).toNumber() : m.ts;
                    }
                    if (m.typeCount && m.typeCount.length) {
                        d.typeCount = [];
                        for (var j = 0; j < m.typeCount.length; ++j) {
                            d.typeCount[j] = $root.perfetto.protos.JavaHeapHistogram.TypeCount.toObject(m.typeCount[j], o);
                        }
                    }
                    return d;
                };

                /**
                 * Converts this Sample to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.JavaHeapHistogram.Sample
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Sample.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Sample;
            })();

            JavaHeapHistogram.InstanceStats = (function() {

                /**
                 * Properties of an InstanceStats.
                 * @memberof perfetto.protos.JavaHeapHistogram
                 * @interface IInstanceStats
                 * @property {number|null} [upid] InstanceStats upid
                 * @property {perfetto.protos.IAndroidProcessMetadata|null} [process] InstanceStats process
                 * @property {Array.<perfetto.protos.JavaHeapHistogram.ISample>|null} [samples] InstanceStats samples
                 */

                /**
                 * Constructs a new InstanceStats.
                 * @memberof perfetto.protos.JavaHeapHistogram
                 * @classdesc Represents an InstanceStats.
                 * @implements IInstanceStats
                 * @constructor
                 * @param {perfetto.protos.JavaHeapHistogram.IInstanceStats=} [p] Properties to set
                 */
                function InstanceStats(p) {
                    this.samples = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * InstanceStats upid.
                 * @member {number} upid
                 * @memberof perfetto.protos.JavaHeapHistogram.InstanceStats
                 * @instance
                 */
                InstanceStats.prototype.upid = 0;

                /**
                 * InstanceStats process.
                 * @member {perfetto.protos.IAndroidProcessMetadata|null|undefined} process
                 * @memberof perfetto.protos.JavaHeapHistogram.InstanceStats
                 * @instance
                 */
                InstanceStats.prototype.process = null;

                /**
                 * InstanceStats samples.
                 * @member {Array.<perfetto.protos.JavaHeapHistogram.ISample>} samples
                 * @memberof perfetto.protos.JavaHeapHistogram.InstanceStats
                 * @instance
                 */
                InstanceStats.prototype.samples = $util.emptyArray;

                /**
                 * Creates a new InstanceStats instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.JavaHeapHistogram.InstanceStats
                 * @static
                 * @param {perfetto.protos.JavaHeapHistogram.IInstanceStats=} [properties] Properties to set
                 * @returns {perfetto.protos.JavaHeapHistogram.InstanceStats} InstanceStats instance
                 */
                InstanceStats.create = function create(properties) {
                    return new InstanceStats(properties);
                };

                /**
                 * Encodes the specified InstanceStats message. Does not implicitly {@link perfetto.protos.JavaHeapHistogram.InstanceStats.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.JavaHeapHistogram.InstanceStats
                 * @static
                 * @param {perfetto.protos.JavaHeapHistogram.IInstanceStats} m InstanceStats message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                InstanceStats.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.upid != null && Object.hasOwnProperty.call(m, "upid"))
                        w.uint32(8).uint32(m.upid);
                    if (m.process != null && Object.hasOwnProperty.call(m, "process"))
                        $root.perfetto.protos.AndroidProcessMetadata.encode(m.process, w.uint32(18).fork()).ldelim();
                    if (m.samples != null && m.samples.length) {
                        for (var i = 0; i < m.samples.length; ++i)
                            $root.perfetto.protos.JavaHeapHistogram.Sample.encode(m.samples[i], w.uint32(26).fork()).ldelim();
                    }
                    return w;
                };

                /**
                 * Encodes the specified InstanceStats message, length delimited. Does not implicitly {@link perfetto.protos.JavaHeapHistogram.InstanceStats.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.JavaHeapHistogram.InstanceStats
                 * @static
                 * @param {perfetto.protos.JavaHeapHistogram.IInstanceStats} message InstanceStats message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                InstanceStats.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an InstanceStats message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.JavaHeapHistogram.InstanceStats
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.JavaHeapHistogram.InstanceStats} InstanceStats
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                InstanceStats.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.JavaHeapHistogram.InstanceStats();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.upid = r.uint32();
                            break;
                        case 2:
                            m.process = $root.perfetto.protos.AndroidProcessMetadata.decode(r, r.uint32());
                            break;
                        case 3:
                            if (!(m.samples && m.samples.length))
                                m.samples = [];
                            m.samples.push($root.perfetto.protos.JavaHeapHistogram.Sample.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an InstanceStats message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.JavaHeapHistogram.InstanceStats
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.JavaHeapHistogram.InstanceStats} InstanceStats
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                InstanceStats.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an InstanceStats message.
                 * @function verify
                 * @memberof perfetto.protos.JavaHeapHistogram.InstanceStats
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                InstanceStats.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.upid != null && m.hasOwnProperty("upid")) {
                        if (!$util.isInteger(m.upid))
                            return "upid: integer expected";
                    }
                    if (m.process != null && m.hasOwnProperty("process")) {
                        {
                            var e = $root.perfetto.protos.AndroidProcessMetadata.verify(m.process);
                            if (e)
                                return "process." + e;
                        }
                    }
                    if (m.samples != null && m.hasOwnProperty("samples")) {
                        if (!Array.isArray(m.samples))
                            return "samples: array expected";
                        for (var i = 0; i < m.samples.length; ++i) {
                            {
                                var e = $root.perfetto.protos.JavaHeapHistogram.Sample.verify(m.samples[i]);
                                if (e)
                                    return "samples." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates an InstanceStats message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.JavaHeapHistogram.InstanceStats
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.JavaHeapHistogram.InstanceStats} InstanceStats
                 */
                InstanceStats.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.JavaHeapHistogram.InstanceStats)
                        return d;
                    var m = new $root.perfetto.protos.JavaHeapHistogram.InstanceStats();
                    if (d.upid != null) {
                        m.upid = d.upid >>> 0;
                    }
                    if (d.process != null) {
                        if (typeof d.process !== "object")
                            throw TypeError(".perfetto.protos.JavaHeapHistogram.InstanceStats.process: object expected");
                        m.process = $root.perfetto.protos.AndroidProcessMetadata.fromObject(d.process);
                    }
                    if (d.samples) {
                        if (!Array.isArray(d.samples))
                            throw TypeError(".perfetto.protos.JavaHeapHistogram.InstanceStats.samples: array expected");
                        m.samples = [];
                        for (var i = 0; i < d.samples.length; ++i) {
                            if (typeof d.samples[i] !== "object")
                                throw TypeError(".perfetto.protos.JavaHeapHistogram.InstanceStats.samples: object expected");
                            m.samples[i] = $root.perfetto.protos.JavaHeapHistogram.Sample.fromObject(d.samples[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an InstanceStats message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.JavaHeapHistogram.InstanceStats
                 * @static
                 * @param {perfetto.protos.JavaHeapHistogram.InstanceStats} m InstanceStats
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                InstanceStats.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.samples = [];
                    }
                    if (o.defaults) {
                        d.upid = 0;
                        d.process = null;
                    }
                    if (m.upid != null && m.hasOwnProperty("upid")) {
                        d.upid = m.upid;
                    }
                    if (m.process != null && m.hasOwnProperty("process")) {
                        d.process = $root.perfetto.protos.AndroidProcessMetadata.toObject(m.process, o);
                    }
                    if (m.samples && m.samples.length) {
                        d.samples = [];
                        for (var j = 0; j < m.samples.length; ++j) {
                            d.samples[j] = $root.perfetto.protos.JavaHeapHistogram.Sample.toObject(m.samples[j], o);
                        }
                    }
                    return d;
                };

                /**
                 * Converts this InstanceStats to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.JavaHeapHistogram.InstanceStats
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                InstanceStats.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return InstanceStats;
            })();

            return JavaHeapHistogram;
        })();

        protos.JavaHeapStats = (function() {

            /**
             * Properties of a JavaHeapStats.
             * @memberof perfetto.protos
             * @interface IJavaHeapStats
             * @property {Array.<perfetto.protos.JavaHeapStats.IInstanceStats>|null} [instanceStats] JavaHeapStats instanceStats
             */

            /**
             * Constructs a new JavaHeapStats.
             * @memberof perfetto.protos
             * @classdesc Represents a JavaHeapStats.
             * @implements IJavaHeapStats
             * @constructor
             * @param {perfetto.protos.IJavaHeapStats=} [p] Properties to set
             */
            function JavaHeapStats(p) {
                this.instanceStats = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * JavaHeapStats instanceStats.
             * @member {Array.<perfetto.protos.JavaHeapStats.IInstanceStats>} instanceStats
             * @memberof perfetto.protos.JavaHeapStats
             * @instance
             */
            JavaHeapStats.prototype.instanceStats = $util.emptyArray;

            /**
             * Creates a new JavaHeapStats instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.JavaHeapStats
             * @static
             * @param {perfetto.protos.IJavaHeapStats=} [properties] Properties to set
             * @returns {perfetto.protos.JavaHeapStats} JavaHeapStats instance
             */
            JavaHeapStats.create = function create(properties) {
                return new JavaHeapStats(properties);
            };

            /**
             * Encodes the specified JavaHeapStats message. Does not implicitly {@link perfetto.protos.JavaHeapStats.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.JavaHeapStats
             * @static
             * @param {perfetto.protos.IJavaHeapStats} m JavaHeapStats message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            JavaHeapStats.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.instanceStats != null && m.instanceStats.length) {
                    for (var i = 0; i < m.instanceStats.length; ++i)
                        $root.perfetto.protos.JavaHeapStats.InstanceStats.encode(m.instanceStats[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified JavaHeapStats message, length delimited. Does not implicitly {@link perfetto.protos.JavaHeapStats.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.JavaHeapStats
             * @static
             * @param {perfetto.protos.IJavaHeapStats} message JavaHeapStats message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            JavaHeapStats.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a JavaHeapStats message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.JavaHeapStats
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.JavaHeapStats} JavaHeapStats
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            JavaHeapStats.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.JavaHeapStats();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.instanceStats && m.instanceStats.length))
                            m.instanceStats = [];
                        m.instanceStats.push($root.perfetto.protos.JavaHeapStats.InstanceStats.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a JavaHeapStats message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.JavaHeapStats
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.JavaHeapStats} JavaHeapStats
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            JavaHeapStats.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a JavaHeapStats message.
             * @function verify
             * @memberof perfetto.protos.JavaHeapStats
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            JavaHeapStats.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.instanceStats != null && m.hasOwnProperty("instanceStats")) {
                    if (!Array.isArray(m.instanceStats))
                        return "instanceStats: array expected";
                    for (var i = 0; i < m.instanceStats.length; ++i) {
                        {
                            var e = $root.perfetto.protos.JavaHeapStats.InstanceStats.verify(m.instanceStats[i]);
                            if (e)
                                return "instanceStats." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a JavaHeapStats message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.JavaHeapStats
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.JavaHeapStats} JavaHeapStats
             */
            JavaHeapStats.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.JavaHeapStats)
                    return d;
                var m = new $root.perfetto.protos.JavaHeapStats();
                if (d.instanceStats) {
                    if (!Array.isArray(d.instanceStats))
                        throw TypeError(".perfetto.protos.JavaHeapStats.instanceStats: array expected");
                    m.instanceStats = [];
                    for (var i = 0; i < d.instanceStats.length; ++i) {
                        if (typeof d.instanceStats[i] !== "object")
                            throw TypeError(".perfetto.protos.JavaHeapStats.instanceStats: object expected");
                        m.instanceStats[i] = $root.perfetto.protos.JavaHeapStats.InstanceStats.fromObject(d.instanceStats[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a JavaHeapStats message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.JavaHeapStats
             * @static
             * @param {perfetto.protos.JavaHeapStats} m JavaHeapStats
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            JavaHeapStats.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.instanceStats = [];
                }
                if (m.instanceStats && m.instanceStats.length) {
                    d.instanceStats = [];
                    for (var j = 0; j < m.instanceStats.length; ++j) {
                        d.instanceStats[j] = $root.perfetto.protos.JavaHeapStats.InstanceStats.toObject(m.instanceStats[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this JavaHeapStats to JSON.
             * @function toJSON
             * @memberof perfetto.protos.JavaHeapStats
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            JavaHeapStats.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            JavaHeapStats.HeapRoots = (function() {

                /**
                 * Properties of a HeapRoots.
                 * @memberof perfetto.protos.JavaHeapStats
                 * @interface IHeapRoots
                 * @property {string|null} [rootType] HeapRoots rootType
                 * @property {string|null} [typeName] HeapRoots typeName
                 * @property {number|null} [objCount] HeapRoots objCount
                 */

                /**
                 * Constructs a new HeapRoots.
                 * @memberof perfetto.protos.JavaHeapStats
                 * @classdesc Represents a HeapRoots.
                 * @implements IHeapRoots
                 * @constructor
                 * @param {perfetto.protos.JavaHeapStats.IHeapRoots=} [p] Properties to set
                 */
                function HeapRoots(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * HeapRoots rootType.
                 * @member {string} rootType
                 * @memberof perfetto.protos.JavaHeapStats.HeapRoots
                 * @instance
                 */
                HeapRoots.prototype.rootType = "";

                /**
                 * HeapRoots typeName.
                 * @member {string} typeName
                 * @memberof perfetto.protos.JavaHeapStats.HeapRoots
                 * @instance
                 */
                HeapRoots.prototype.typeName = "";

                /**
                 * HeapRoots objCount.
                 * @member {number} objCount
                 * @memberof perfetto.protos.JavaHeapStats.HeapRoots
                 * @instance
                 */
                HeapRoots.prototype.objCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new HeapRoots instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.JavaHeapStats.HeapRoots
                 * @static
                 * @param {perfetto.protos.JavaHeapStats.IHeapRoots=} [properties] Properties to set
                 * @returns {perfetto.protos.JavaHeapStats.HeapRoots} HeapRoots instance
                 */
                HeapRoots.create = function create(properties) {
                    return new HeapRoots(properties);
                };

                /**
                 * Encodes the specified HeapRoots message. Does not implicitly {@link perfetto.protos.JavaHeapStats.HeapRoots.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.JavaHeapStats.HeapRoots
                 * @static
                 * @param {perfetto.protos.JavaHeapStats.IHeapRoots} m HeapRoots message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                HeapRoots.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.rootType != null && Object.hasOwnProperty.call(m, "rootType"))
                        w.uint32(10).string(m.rootType);
                    if (m.typeName != null && Object.hasOwnProperty.call(m, "typeName"))
                        w.uint32(18).string(m.typeName);
                    if (m.objCount != null && Object.hasOwnProperty.call(m, "objCount"))
                        w.uint32(24).int64(m.objCount);
                    return w;
                };

                /**
                 * Encodes the specified HeapRoots message, length delimited. Does not implicitly {@link perfetto.protos.JavaHeapStats.HeapRoots.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.JavaHeapStats.HeapRoots
                 * @static
                 * @param {perfetto.protos.JavaHeapStats.IHeapRoots} message HeapRoots message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                HeapRoots.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a HeapRoots message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.JavaHeapStats.HeapRoots
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.JavaHeapStats.HeapRoots} HeapRoots
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                HeapRoots.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.JavaHeapStats.HeapRoots();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.rootType = r.string();
                            break;
                        case 2:
                            m.typeName = r.string();
                            break;
                        case 3:
                            m.objCount = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a HeapRoots message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.JavaHeapStats.HeapRoots
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.JavaHeapStats.HeapRoots} HeapRoots
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                HeapRoots.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a HeapRoots message.
                 * @function verify
                 * @memberof perfetto.protos.JavaHeapStats.HeapRoots
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                HeapRoots.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.rootType != null && m.hasOwnProperty("rootType")) {
                        if (!$util.isString(m.rootType))
                            return "rootType: string expected";
                    }
                    if (m.typeName != null && m.hasOwnProperty("typeName")) {
                        if (!$util.isString(m.typeName))
                            return "typeName: string expected";
                    }
                    if (m.objCount != null && m.hasOwnProperty("objCount")) {
                        if (!$util.isInteger(m.objCount) && !(m.objCount && $util.isInteger(m.objCount.low) && $util.isInteger(m.objCount.high)))
                            return "objCount: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a HeapRoots message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.JavaHeapStats.HeapRoots
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.JavaHeapStats.HeapRoots} HeapRoots
                 */
                HeapRoots.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.JavaHeapStats.HeapRoots)
                        return d;
                    var m = new $root.perfetto.protos.JavaHeapStats.HeapRoots();
                    if (d.rootType != null) {
                        m.rootType = String(d.rootType);
                    }
                    if (d.typeName != null) {
                        m.typeName = String(d.typeName);
                    }
                    if (d.objCount != null) {
                        if ($util.Long)
                            (m.objCount = $util.Long.fromValue(d.objCount)).unsigned = false;
                        else if (typeof d.objCount === "string")
                            m.objCount = parseInt(d.objCount, 10);
                        else if (typeof d.objCount === "number")
                            m.objCount = d.objCount;
                        else if (typeof d.objCount === "object")
                            m.objCount = new $util.LongBits(d.objCount.low >>> 0, d.objCount.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a HeapRoots message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.JavaHeapStats.HeapRoots
                 * @static
                 * @param {perfetto.protos.JavaHeapStats.HeapRoots} m HeapRoots
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                HeapRoots.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.rootType = "";
                        d.typeName = "";
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.objCount = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.objCount = o.longs === String ? "0" : 0;
                    }
                    if (m.rootType != null && m.hasOwnProperty("rootType")) {
                        d.rootType = m.rootType;
                    }
                    if (m.typeName != null && m.hasOwnProperty("typeName")) {
                        d.typeName = m.typeName;
                    }
                    if (m.objCount != null && m.hasOwnProperty("objCount")) {
                        if (typeof m.objCount === "number")
                            d.objCount = o.longs === String ? String(m.objCount) : m.objCount;
                        else
                            d.objCount = o.longs === String ? $util.Long.prototype.toString.call(m.objCount) : o.longs === Number ? new $util.LongBits(m.objCount.low >>> 0, m.objCount.high >>> 0).toNumber() : m.objCount;
                    }
                    return d;
                };

                /**
                 * Converts this HeapRoots to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.JavaHeapStats.HeapRoots
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                HeapRoots.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return HeapRoots;
            })();

            JavaHeapStats.Sample = (function() {

                /**
                 * Properties of a Sample.
                 * @memberof perfetto.protos.JavaHeapStats
                 * @interface ISample
                 * @property {number|null} [ts] Sample ts
                 * @property {number|null} [heapSize] Sample heapSize
                 * @property {number|null} [heapNativeSize] Sample heapNativeSize
                 * @property {number|null} [objCount] Sample objCount
                 * @property {number|null} [reachableHeapSize] Sample reachableHeapSize
                 * @property {number|null} [reachableHeapNativeSize] Sample reachableHeapNativeSize
                 * @property {number|null} [reachableObjCount] Sample reachableObjCount
                 * @property {number|null} [anonRssAndSwapSize] Sample anonRssAndSwapSize
                 * @property {Array.<perfetto.protos.JavaHeapStats.IHeapRoots>|null} [roots] Sample roots
                 */

                /**
                 * Constructs a new Sample.
                 * @memberof perfetto.protos.JavaHeapStats
                 * @classdesc Represents a Sample.
                 * @implements ISample
                 * @constructor
                 * @param {perfetto.protos.JavaHeapStats.ISample=} [p] Properties to set
                 */
                function Sample(p) {
                    this.roots = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Sample ts.
                 * @member {number} ts
                 * @memberof perfetto.protos.JavaHeapStats.Sample
                 * @instance
                 */
                Sample.prototype.ts = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Sample heapSize.
                 * @member {number} heapSize
                 * @memberof perfetto.protos.JavaHeapStats.Sample
                 * @instance
                 */
                Sample.prototype.heapSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Sample heapNativeSize.
                 * @member {number} heapNativeSize
                 * @memberof perfetto.protos.JavaHeapStats.Sample
                 * @instance
                 */
                Sample.prototype.heapNativeSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Sample objCount.
                 * @member {number} objCount
                 * @memberof perfetto.protos.JavaHeapStats.Sample
                 * @instance
                 */
                Sample.prototype.objCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Sample reachableHeapSize.
                 * @member {number} reachableHeapSize
                 * @memberof perfetto.protos.JavaHeapStats.Sample
                 * @instance
                 */
                Sample.prototype.reachableHeapSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Sample reachableHeapNativeSize.
                 * @member {number} reachableHeapNativeSize
                 * @memberof perfetto.protos.JavaHeapStats.Sample
                 * @instance
                 */
                Sample.prototype.reachableHeapNativeSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Sample reachableObjCount.
                 * @member {number} reachableObjCount
                 * @memberof perfetto.protos.JavaHeapStats.Sample
                 * @instance
                 */
                Sample.prototype.reachableObjCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Sample anonRssAndSwapSize.
                 * @member {number} anonRssAndSwapSize
                 * @memberof perfetto.protos.JavaHeapStats.Sample
                 * @instance
                 */
                Sample.prototype.anonRssAndSwapSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Sample roots.
                 * @member {Array.<perfetto.protos.JavaHeapStats.IHeapRoots>} roots
                 * @memberof perfetto.protos.JavaHeapStats.Sample
                 * @instance
                 */
                Sample.prototype.roots = $util.emptyArray;

                /**
                 * Creates a new Sample instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.JavaHeapStats.Sample
                 * @static
                 * @param {perfetto.protos.JavaHeapStats.ISample=} [properties] Properties to set
                 * @returns {perfetto.protos.JavaHeapStats.Sample} Sample instance
                 */
                Sample.create = function create(properties) {
                    return new Sample(properties);
                };

                /**
                 * Encodes the specified Sample message. Does not implicitly {@link perfetto.protos.JavaHeapStats.Sample.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.JavaHeapStats.Sample
                 * @static
                 * @param {perfetto.protos.JavaHeapStats.ISample} m Sample message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Sample.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.ts != null && Object.hasOwnProperty.call(m, "ts"))
                        w.uint32(8).int64(m.ts);
                    if (m.heapSize != null && Object.hasOwnProperty.call(m, "heapSize"))
                        w.uint32(16).int64(m.heapSize);
                    if (m.reachableHeapSize != null && Object.hasOwnProperty.call(m, "reachableHeapSize"))
                        w.uint32(24).int64(m.reachableHeapSize);
                    if (m.objCount != null && Object.hasOwnProperty.call(m, "objCount"))
                        w.uint32(32).int64(m.objCount);
                    if (m.reachableObjCount != null && Object.hasOwnProperty.call(m, "reachableObjCount"))
                        w.uint32(40).int64(m.reachableObjCount);
                    if (m.anonRssAndSwapSize != null && Object.hasOwnProperty.call(m, "anonRssAndSwapSize"))
                        w.uint32(48).int64(m.anonRssAndSwapSize);
                    if (m.roots != null && m.roots.length) {
                        for (var i = 0; i < m.roots.length; ++i)
                            $root.perfetto.protos.JavaHeapStats.HeapRoots.encode(m.roots[i], w.uint32(58).fork()).ldelim();
                    }
                    if (m.heapNativeSize != null && Object.hasOwnProperty.call(m, "heapNativeSize"))
                        w.uint32(64).int64(m.heapNativeSize);
                    if (m.reachableHeapNativeSize != null && Object.hasOwnProperty.call(m, "reachableHeapNativeSize"))
                        w.uint32(72).int64(m.reachableHeapNativeSize);
                    return w;
                };

                /**
                 * Encodes the specified Sample message, length delimited. Does not implicitly {@link perfetto.protos.JavaHeapStats.Sample.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.JavaHeapStats.Sample
                 * @static
                 * @param {perfetto.protos.JavaHeapStats.ISample} message Sample message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Sample.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Sample message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.JavaHeapStats.Sample
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.JavaHeapStats.Sample} Sample
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Sample.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.JavaHeapStats.Sample();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.ts = r.int64();
                            break;
                        case 2:
                            m.heapSize = r.int64();
                            break;
                        case 8:
                            m.heapNativeSize = r.int64();
                            break;
                        case 4:
                            m.objCount = r.int64();
                            break;
                        case 3:
                            m.reachableHeapSize = r.int64();
                            break;
                        case 9:
                            m.reachableHeapNativeSize = r.int64();
                            break;
                        case 5:
                            m.reachableObjCount = r.int64();
                            break;
                        case 6:
                            m.anonRssAndSwapSize = r.int64();
                            break;
                        case 7:
                            if (!(m.roots && m.roots.length))
                                m.roots = [];
                            m.roots.push($root.perfetto.protos.JavaHeapStats.HeapRoots.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Sample message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.JavaHeapStats.Sample
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.JavaHeapStats.Sample} Sample
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Sample.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Sample message.
                 * @function verify
                 * @memberof perfetto.protos.JavaHeapStats.Sample
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Sample.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.ts != null && m.hasOwnProperty("ts")) {
                        if (!$util.isInteger(m.ts) && !(m.ts && $util.isInteger(m.ts.low) && $util.isInteger(m.ts.high)))
                            return "ts: integer|Long expected";
                    }
                    if (m.heapSize != null && m.hasOwnProperty("heapSize")) {
                        if (!$util.isInteger(m.heapSize) && !(m.heapSize && $util.isInteger(m.heapSize.low) && $util.isInteger(m.heapSize.high)))
                            return "heapSize: integer|Long expected";
                    }
                    if (m.heapNativeSize != null && m.hasOwnProperty("heapNativeSize")) {
                        if (!$util.isInteger(m.heapNativeSize) && !(m.heapNativeSize && $util.isInteger(m.heapNativeSize.low) && $util.isInteger(m.heapNativeSize.high)))
                            return "heapNativeSize: integer|Long expected";
                    }
                    if (m.objCount != null && m.hasOwnProperty("objCount")) {
                        if (!$util.isInteger(m.objCount) && !(m.objCount && $util.isInteger(m.objCount.low) && $util.isInteger(m.objCount.high)))
                            return "objCount: integer|Long expected";
                    }
                    if (m.reachableHeapSize != null && m.hasOwnProperty("reachableHeapSize")) {
                        if (!$util.isInteger(m.reachableHeapSize) && !(m.reachableHeapSize && $util.isInteger(m.reachableHeapSize.low) && $util.isInteger(m.reachableHeapSize.high)))
                            return "reachableHeapSize: integer|Long expected";
                    }
                    if (m.reachableHeapNativeSize != null && m.hasOwnProperty("reachableHeapNativeSize")) {
                        if (!$util.isInteger(m.reachableHeapNativeSize) && !(m.reachableHeapNativeSize && $util.isInteger(m.reachableHeapNativeSize.low) && $util.isInteger(m.reachableHeapNativeSize.high)))
                            return "reachableHeapNativeSize: integer|Long expected";
                    }
                    if (m.reachableObjCount != null && m.hasOwnProperty("reachableObjCount")) {
                        if (!$util.isInteger(m.reachableObjCount) && !(m.reachableObjCount && $util.isInteger(m.reachableObjCount.low) && $util.isInteger(m.reachableObjCount.high)))
                            return "reachableObjCount: integer|Long expected";
                    }
                    if (m.anonRssAndSwapSize != null && m.hasOwnProperty("anonRssAndSwapSize")) {
                        if (!$util.isInteger(m.anonRssAndSwapSize) && !(m.anonRssAndSwapSize && $util.isInteger(m.anonRssAndSwapSize.low) && $util.isInteger(m.anonRssAndSwapSize.high)))
                            return "anonRssAndSwapSize: integer|Long expected";
                    }
                    if (m.roots != null && m.hasOwnProperty("roots")) {
                        if (!Array.isArray(m.roots))
                            return "roots: array expected";
                        for (var i = 0; i < m.roots.length; ++i) {
                            {
                                var e = $root.perfetto.protos.JavaHeapStats.HeapRoots.verify(m.roots[i]);
                                if (e)
                                    return "roots." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates a Sample message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.JavaHeapStats.Sample
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.JavaHeapStats.Sample} Sample
                 */
                Sample.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.JavaHeapStats.Sample)
                        return d;
                    var m = new $root.perfetto.protos.JavaHeapStats.Sample();
                    if (d.ts != null) {
                        if ($util.Long)
                            (m.ts = $util.Long.fromValue(d.ts)).unsigned = false;
                        else if (typeof d.ts === "string")
                            m.ts = parseInt(d.ts, 10);
                        else if (typeof d.ts === "number")
                            m.ts = d.ts;
                        else if (typeof d.ts === "object")
                            m.ts = new $util.LongBits(d.ts.low >>> 0, d.ts.high >>> 0).toNumber();
                    }
                    if (d.heapSize != null) {
                        if ($util.Long)
                            (m.heapSize = $util.Long.fromValue(d.heapSize)).unsigned = false;
                        else if (typeof d.heapSize === "string")
                            m.heapSize = parseInt(d.heapSize, 10);
                        else if (typeof d.heapSize === "number")
                            m.heapSize = d.heapSize;
                        else if (typeof d.heapSize === "object")
                            m.heapSize = new $util.LongBits(d.heapSize.low >>> 0, d.heapSize.high >>> 0).toNumber();
                    }
                    if (d.heapNativeSize != null) {
                        if ($util.Long)
                            (m.heapNativeSize = $util.Long.fromValue(d.heapNativeSize)).unsigned = false;
                        else if (typeof d.heapNativeSize === "string")
                            m.heapNativeSize = parseInt(d.heapNativeSize, 10);
                        else if (typeof d.heapNativeSize === "number")
                            m.heapNativeSize = d.heapNativeSize;
                        else if (typeof d.heapNativeSize === "object")
                            m.heapNativeSize = new $util.LongBits(d.heapNativeSize.low >>> 0, d.heapNativeSize.high >>> 0).toNumber();
                    }
                    if (d.objCount != null) {
                        if ($util.Long)
                            (m.objCount = $util.Long.fromValue(d.objCount)).unsigned = false;
                        else if (typeof d.objCount === "string")
                            m.objCount = parseInt(d.objCount, 10);
                        else if (typeof d.objCount === "number")
                            m.objCount = d.objCount;
                        else if (typeof d.objCount === "object")
                            m.objCount = new $util.LongBits(d.objCount.low >>> 0, d.objCount.high >>> 0).toNumber();
                    }
                    if (d.reachableHeapSize != null) {
                        if ($util.Long)
                            (m.reachableHeapSize = $util.Long.fromValue(d.reachableHeapSize)).unsigned = false;
                        else if (typeof d.reachableHeapSize === "string")
                            m.reachableHeapSize = parseInt(d.reachableHeapSize, 10);
                        else if (typeof d.reachableHeapSize === "number")
                            m.reachableHeapSize = d.reachableHeapSize;
                        else if (typeof d.reachableHeapSize === "object")
                            m.reachableHeapSize = new $util.LongBits(d.reachableHeapSize.low >>> 0, d.reachableHeapSize.high >>> 0).toNumber();
                    }
                    if (d.reachableHeapNativeSize != null) {
                        if ($util.Long)
                            (m.reachableHeapNativeSize = $util.Long.fromValue(d.reachableHeapNativeSize)).unsigned = false;
                        else if (typeof d.reachableHeapNativeSize === "string")
                            m.reachableHeapNativeSize = parseInt(d.reachableHeapNativeSize, 10);
                        else if (typeof d.reachableHeapNativeSize === "number")
                            m.reachableHeapNativeSize = d.reachableHeapNativeSize;
                        else if (typeof d.reachableHeapNativeSize === "object")
                            m.reachableHeapNativeSize = new $util.LongBits(d.reachableHeapNativeSize.low >>> 0, d.reachableHeapNativeSize.high >>> 0).toNumber();
                    }
                    if (d.reachableObjCount != null) {
                        if ($util.Long)
                            (m.reachableObjCount = $util.Long.fromValue(d.reachableObjCount)).unsigned = false;
                        else if (typeof d.reachableObjCount === "string")
                            m.reachableObjCount = parseInt(d.reachableObjCount, 10);
                        else if (typeof d.reachableObjCount === "number")
                            m.reachableObjCount = d.reachableObjCount;
                        else if (typeof d.reachableObjCount === "object")
                            m.reachableObjCount = new $util.LongBits(d.reachableObjCount.low >>> 0, d.reachableObjCount.high >>> 0).toNumber();
                    }
                    if (d.anonRssAndSwapSize != null) {
                        if ($util.Long)
                            (m.anonRssAndSwapSize = $util.Long.fromValue(d.anonRssAndSwapSize)).unsigned = false;
                        else if (typeof d.anonRssAndSwapSize === "string")
                            m.anonRssAndSwapSize = parseInt(d.anonRssAndSwapSize, 10);
                        else if (typeof d.anonRssAndSwapSize === "number")
                            m.anonRssAndSwapSize = d.anonRssAndSwapSize;
                        else if (typeof d.anonRssAndSwapSize === "object")
                            m.anonRssAndSwapSize = new $util.LongBits(d.anonRssAndSwapSize.low >>> 0, d.anonRssAndSwapSize.high >>> 0).toNumber();
                    }
                    if (d.roots) {
                        if (!Array.isArray(d.roots))
                            throw TypeError(".perfetto.protos.JavaHeapStats.Sample.roots: array expected");
                        m.roots = [];
                        for (var i = 0; i < d.roots.length; ++i) {
                            if (typeof d.roots[i] !== "object")
                                throw TypeError(".perfetto.protos.JavaHeapStats.Sample.roots: object expected");
                            m.roots[i] = $root.perfetto.protos.JavaHeapStats.HeapRoots.fromObject(d.roots[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Sample message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.JavaHeapStats.Sample
                 * @static
                 * @param {perfetto.protos.JavaHeapStats.Sample} m Sample
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Sample.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.roots = [];
                    }
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.ts = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.ts = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.heapSize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.heapSize = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.reachableHeapSize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.reachableHeapSize = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.objCount = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.objCount = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.reachableObjCount = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.reachableObjCount = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.anonRssAndSwapSize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.anonRssAndSwapSize = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.heapNativeSize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.heapNativeSize = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.reachableHeapNativeSize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.reachableHeapNativeSize = o.longs === String ? "0" : 0;
                    }
                    if (m.ts != null && m.hasOwnProperty("ts")) {
                        if (typeof m.ts === "number")
                            d.ts = o.longs === String ? String(m.ts) : m.ts;
                        else
                            d.ts = o.longs === String ? $util.Long.prototype.toString.call(m.ts) : o.longs === Number ? new $util.LongBits(m.ts.low >>> 0, m.ts.high >>> 0).toNumber() : m.ts;
                    }
                    if (m.heapSize != null && m.hasOwnProperty("heapSize")) {
                        if (typeof m.heapSize === "number")
                            d.heapSize = o.longs === String ? String(m.heapSize) : m.heapSize;
                        else
                            d.heapSize = o.longs === String ? $util.Long.prototype.toString.call(m.heapSize) : o.longs === Number ? new $util.LongBits(m.heapSize.low >>> 0, m.heapSize.high >>> 0).toNumber() : m.heapSize;
                    }
                    if (m.reachableHeapSize != null && m.hasOwnProperty("reachableHeapSize")) {
                        if (typeof m.reachableHeapSize === "number")
                            d.reachableHeapSize = o.longs === String ? String(m.reachableHeapSize) : m.reachableHeapSize;
                        else
                            d.reachableHeapSize = o.longs === String ? $util.Long.prototype.toString.call(m.reachableHeapSize) : o.longs === Number ? new $util.LongBits(m.reachableHeapSize.low >>> 0, m.reachableHeapSize.high >>> 0).toNumber() : m.reachableHeapSize;
                    }
                    if (m.objCount != null && m.hasOwnProperty("objCount")) {
                        if (typeof m.objCount === "number")
                            d.objCount = o.longs === String ? String(m.objCount) : m.objCount;
                        else
                            d.objCount = o.longs === String ? $util.Long.prototype.toString.call(m.objCount) : o.longs === Number ? new $util.LongBits(m.objCount.low >>> 0, m.objCount.high >>> 0).toNumber() : m.objCount;
                    }
                    if (m.reachableObjCount != null && m.hasOwnProperty("reachableObjCount")) {
                        if (typeof m.reachableObjCount === "number")
                            d.reachableObjCount = o.longs === String ? String(m.reachableObjCount) : m.reachableObjCount;
                        else
                            d.reachableObjCount = o.longs === String ? $util.Long.prototype.toString.call(m.reachableObjCount) : o.longs === Number ? new $util.LongBits(m.reachableObjCount.low >>> 0, m.reachableObjCount.high >>> 0).toNumber() : m.reachableObjCount;
                    }
                    if (m.anonRssAndSwapSize != null && m.hasOwnProperty("anonRssAndSwapSize")) {
                        if (typeof m.anonRssAndSwapSize === "number")
                            d.anonRssAndSwapSize = o.longs === String ? String(m.anonRssAndSwapSize) : m.anonRssAndSwapSize;
                        else
                            d.anonRssAndSwapSize = o.longs === String ? $util.Long.prototype.toString.call(m.anonRssAndSwapSize) : o.longs === Number ? new $util.LongBits(m.anonRssAndSwapSize.low >>> 0, m.anonRssAndSwapSize.high >>> 0).toNumber() : m.anonRssAndSwapSize;
                    }
                    if (m.roots && m.roots.length) {
                        d.roots = [];
                        for (var j = 0; j < m.roots.length; ++j) {
                            d.roots[j] = $root.perfetto.protos.JavaHeapStats.HeapRoots.toObject(m.roots[j], o);
                        }
                    }
                    if (m.heapNativeSize != null && m.hasOwnProperty("heapNativeSize")) {
                        if (typeof m.heapNativeSize === "number")
                            d.heapNativeSize = o.longs === String ? String(m.heapNativeSize) : m.heapNativeSize;
                        else
                            d.heapNativeSize = o.longs === String ? $util.Long.prototype.toString.call(m.heapNativeSize) : o.longs === Number ? new $util.LongBits(m.heapNativeSize.low >>> 0, m.heapNativeSize.high >>> 0).toNumber() : m.heapNativeSize;
                    }
                    if (m.reachableHeapNativeSize != null && m.hasOwnProperty("reachableHeapNativeSize")) {
                        if (typeof m.reachableHeapNativeSize === "number")
                            d.reachableHeapNativeSize = o.longs === String ? String(m.reachableHeapNativeSize) : m.reachableHeapNativeSize;
                        else
                            d.reachableHeapNativeSize = o.longs === String ? $util.Long.prototype.toString.call(m.reachableHeapNativeSize) : o.longs === Number ? new $util.LongBits(m.reachableHeapNativeSize.low >>> 0, m.reachableHeapNativeSize.high >>> 0).toNumber() : m.reachableHeapNativeSize;
                    }
                    return d;
                };

                /**
                 * Converts this Sample to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.JavaHeapStats.Sample
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Sample.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Sample;
            })();

            JavaHeapStats.InstanceStats = (function() {

                /**
                 * Properties of an InstanceStats.
                 * @memberof perfetto.protos.JavaHeapStats
                 * @interface IInstanceStats
                 * @property {number|null} [upid] InstanceStats upid
                 * @property {perfetto.protos.IAndroidProcessMetadata|null} [process] InstanceStats process
                 * @property {Array.<perfetto.protos.JavaHeapStats.ISample>|null} [samples] InstanceStats samples
                 */

                /**
                 * Constructs a new InstanceStats.
                 * @memberof perfetto.protos.JavaHeapStats
                 * @classdesc Represents an InstanceStats.
                 * @implements IInstanceStats
                 * @constructor
                 * @param {perfetto.protos.JavaHeapStats.IInstanceStats=} [p] Properties to set
                 */
                function InstanceStats(p) {
                    this.samples = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * InstanceStats upid.
                 * @member {number} upid
                 * @memberof perfetto.protos.JavaHeapStats.InstanceStats
                 * @instance
                 */
                InstanceStats.prototype.upid = 0;

                /**
                 * InstanceStats process.
                 * @member {perfetto.protos.IAndroidProcessMetadata|null|undefined} process
                 * @memberof perfetto.protos.JavaHeapStats.InstanceStats
                 * @instance
                 */
                InstanceStats.prototype.process = null;

                /**
                 * InstanceStats samples.
                 * @member {Array.<perfetto.protos.JavaHeapStats.ISample>} samples
                 * @memberof perfetto.protos.JavaHeapStats.InstanceStats
                 * @instance
                 */
                InstanceStats.prototype.samples = $util.emptyArray;

                /**
                 * Creates a new InstanceStats instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.JavaHeapStats.InstanceStats
                 * @static
                 * @param {perfetto.protos.JavaHeapStats.IInstanceStats=} [properties] Properties to set
                 * @returns {perfetto.protos.JavaHeapStats.InstanceStats} InstanceStats instance
                 */
                InstanceStats.create = function create(properties) {
                    return new InstanceStats(properties);
                };

                /**
                 * Encodes the specified InstanceStats message. Does not implicitly {@link perfetto.protos.JavaHeapStats.InstanceStats.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.JavaHeapStats.InstanceStats
                 * @static
                 * @param {perfetto.protos.JavaHeapStats.IInstanceStats} m InstanceStats message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                InstanceStats.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.upid != null && Object.hasOwnProperty.call(m, "upid"))
                        w.uint32(8).uint32(m.upid);
                    if (m.process != null && Object.hasOwnProperty.call(m, "process"))
                        $root.perfetto.protos.AndroidProcessMetadata.encode(m.process, w.uint32(18).fork()).ldelim();
                    if (m.samples != null && m.samples.length) {
                        for (var i = 0; i < m.samples.length; ++i)
                            $root.perfetto.protos.JavaHeapStats.Sample.encode(m.samples[i], w.uint32(26).fork()).ldelim();
                    }
                    return w;
                };

                /**
                 * Encodes the specified InstanceStats message, length delimited. Does not implicitly {@link perfetto.protos.JavaHeapStats.InstanceStats.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.JavaHeapStats.InstanceStats
                 * @static
                 * @param {perfetto.protos.JavaHeapStats.IInstanceStats} message InstanceStats message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                InstanceStats.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an InstanceStats message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.JavaHeapStats.InstanceStats
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.JavaHeapStats.InstanceStats} InstanceStats
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                InstanceStats.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.JavaHeapStats.InstanceStats();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.upid = r.uint32();
                            break;
                        case 2:
                            m.process = $root.perfetto.protos.AndroidProcessMetadata.decode(r, r.uint32());
                            break;
                        case 3:
                            if (!(m.samples && m.samples.length))
                                m.samples = [];
                            m.samples.push($root.perfetto.protos.JavaHeapStats.Sample.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an InstanceStats message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.JavaHeapStats.InstanceStats
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.JavaHeapStats.InstanceStats} InstanceStats
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                InstanceStats.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an InstanceStats message.
                 * @function verify
                 * @memberof perfetto.protos.JavaHeapStats.InstanceStats
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                InstanceStats.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.upid != null && m.hasOwnProperty("upid")) {
                        if (!$util.isInteger(m.upid))
                            return "upid: integer expected";
                    }
                    if (m.process != null && m.hasOwnProperty("process")) {
                        {
                            var e = $root.perfetto.protos.AndroidProcessMetadata.verify(m.process);
                            if (e)
                                return "process." + e;
                        }
                    }
                    if (m.samples != null && m.hasOwnProperty("samples")) {
                        if (!Array.isArray(m.samples))
                            return "samples: array expected";
                        for (var i = 0; i < m.samples.length; ++i) {
                            {
                                var e = $root.perfetto.protos.JavaHeapStats.Sample.verify(m.samples[i]);
                                if (e)
                                    return "samples." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates an InstanceStats message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.JavaHeapStats.InstanceStats
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.JavaHeapStats.InstanceStats} InstanceStats
                 */
                InstanceStats.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.JavaHeapStats.InstanceStats)
                        return d;
                    var m = new $root.perfetto.protos.JavaHeapStats.InstanceStats();
                    if (d.upid != null) {
                        m.upid = d.upid >>> 0;
                    }
                    if (d.process != null) {
                        if (typeof d.process !== "object")
                            throw TypeError(".perfetto.protos.JavaHeapStats.InstanceStats.process: object expected");
                        m.process = $root.perfetto.protos.AndroidProcessMetadata.fromObject(d.process);
                    }
                    if (d.samples) {
                        if (!Array.isArray(d.samples))
                            throw TypeError(".perfetto.protos.JavaHeapStats.InstanceStats.samples: array expected");
                        m.samples = [];
                        for (var i = 0; i < d.samples.length; ++i) {
                            if (typeof d.samples[i] !== "object")
                                throw TypeError(".perfetto.protos.JavaHeapStats.InstanceStats.samples: object expected");
                            m.samples[i] = $root.perfetto.protos.JavaHeapStats.Sample.fromObject(d.samples[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an InstanceStats message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.JavaHeapStats.InstanceStats
                 * @static
                 * @param {perfetto.protos.JavaHeapStats.InstanceStats} m InstanceStats
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                InstanceStats.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.samples = [];
                    }
                    if (o.defaults) {
                        d.upid = 0;
                        d.process = null;
                    }
                    if (m.upid != null && m.hasOwnProperty("upid")) {
                        d.upid = m.upid;
                    }
                    if (m.process != null && m.hasOwnProperty("process")) {
                        d.process = $root.perfetto.protos.AndroidProcessMetadata.toObject(m.process, o);
                    }
                    if (m.samples && m.samples.length) {
                        d.samples = [];
                        for (var j = 0; j < m.samples.length; ++j) {
                            d.samples[j] = $root.perfetto.protos.JavaHeapStats.Sample.toObject(m.samples[j], o);
                        }
                    }
                    return d;
                };

                /**
                 * Converts this InstanceStats to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.JavaHeapStats.InstanceStats
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                InstanceStats.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return InstanceStats;
            })();

            return JavaHeapStats;
        })();

        protos.AndroidLmkMetric = (function() {

            /**
             * Properties of an AndroidLmkMetric.
             * @memberof perfetto.protos
             * @interface IAndroidLmkMetric
             * @property {number|null} [totalCount] AndroidLmkMetric totalCount
             * @property {Array.<perfetto.protos.AndroidLmkMetric.IByOomScore>|null} [byOomScore] AndroidLmkMetric byOomScore
             * @property {number|null} [oomVictimCount] AndroidLmkMetric oomVictimCount
             */

            /**
             * Constructs a new AndroidLmkMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidLmkMetric.
             * @implements IAndroidLmkMetric
             * @constructor
             * @param {perfetto.protos.IAndroidLmkMetric=} [p] Properties to set
             */
            function AndroidLmkMetric(p) {
                this.byOomScore = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidLmkMetric totalCount.
             * @member {number} totalCount
             * @memberof perfetto.protos.AndroidLmkMetric
             * @instance
             */
            AndroidLmkMetric.prototype.totalCount = 0;

            /**
             * AndroidLmkMetric byOomScore.
             * @member {Array.<perfetto.protos.AndroidLmkMetric.IByOomScore>} byOomScore
             * @memberof perfetto.protos.AndroidLmkMetric
             * @instance
             */
            AndroidLmkMetric.prototype.byOomScore = $util.emptyArray;

            /**
             * AndroidLmkMetric oomVictimCount.
             * @member {number} oomVictimCount
             * @memberof perfetto.protos.AndroidLmkMetric
             * @instance
             */
            AndroidLmkMetric.prototype.oomVictimCount = 0;

            /**
             * Creates a new AndroidLmkMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidLmkMetric
             * @static
             * @param {perfetto.protos.IAndroidLmkMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidLmkMetric} AndroidLmkMetric instance
             */
            AndroidLmkMetric.create = function create(properties) {
                return new AndroidLmkMetric(properties);
            };

            /**
             * Encodes the specified AndroidLmkMetric message. Does not implicitly {@link perfetto.protos.AndroidLmkMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidLmkMetric
             * @static
             * @param {perfetto.protos.IAndroidLmkMetric} m AndroidLmkMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidLmkMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.totalCount != null && Object.hasOwnProperty.call(m, "totalCount"))
                    w.uint32(8).int32(m.totalCount);
                if (m.byOomScore != null && m.byOomScore.length) {
                    for (var i = 0; i < m.byOomScore.length; ++i)
                        $root.perfetto.protos.AndroidLmkMetric.ByOomScore.encode(m.byOomScore[i], w.uint32(18).fork()).ldelim();
                }
                if (m.oomVictimCount != null && Object.hasOwnProperty.call(m, "oomVictimCount"))
                    w.uint32(24).int32(m.oomVictimCount);
                return w;
            };

            /**
             * Encodes the specified AndroidLmkMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidLmkMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidLmkMetric
             * @static
             * @param {perfetto.protos.IAndroidLmkMetric} message AndroidLmkMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidLmkMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidLmkMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidLmkMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidLmkMetric} AndroidLmkMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidLmkMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidLmkMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.totalCount = r.int32();
                        break;
                    case 2:
                        if (!(m.byOomScore && m.byOomScore.length))
                            m.byOomScore = [];
                        m.byOomScore.push($root.perfetto.protos.AndroidLmkMetric.ByOomScore.decode(r, r.uint32()));
                        break;
                    case 3:
                        m.oomVictimCount = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidLmkMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidLmkMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidLmkMetric} AndroidLmkMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidLmkMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidLmkMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidLmkMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidLmkMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.totalCount != null && m.hasOwnProperty("totalCount")) {
                    if (!$util.isInteger(m.totalCount))
                        return "totalCount: integer expected";
                }
                if (m.byOomScore != null && m.hasOwnProperty("byOomScore")) {
                    if (!Array.isArray(m.byOomScore))
                        return "byOomScore: array expected";
                    for (var i = 0; i < m.byOomScore.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidLmkMetric.ByOomScore.verify(m.byOomScore[i]);
                            if (e)
                                return "byOomScore." + e;
                        }
                    }
                }
                if (m.oomVictimCount != null && m.hasOwnProperty("oomVictimCount")) {
                    if (!$util.isInteger(m.oomVictimCount))
                        return "oomVictimCount: integer expected";
                }
                return null;
            };

            /**
             * Creates an AndroidLmkMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidLmkMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidLmkMetric} AndroidLmkMetric
             */
            AndroidLmkMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidLmkMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidLmkMetric();
                if (d.totalCount != null) {
                    m.totalCount = d.totalCount | 0;
                }
                if (d.byOomScore) {
                    if (!Array.isArray(d.byOomScore))
                        throw TypeError(".perfetto.protos.AndroidLmkMetric.byOomScore: array expected");
                    m.byOomScore = [];
                    for (var i = 0; i < d.byOomScore.length; ++i) {
                        if (typeof d.byOomScore[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidLmkMetric.byOomScore: object expected");
                        m.byOomScore[i] = $root.perfetto.protos.AndroidLmkMetric.ByOomScore.fromObject(d.byOomScore[i]);
                    }
                }
                if (d.oomVictimCount != null) {
                    m.oomVictimCount = d.oomVictimCount | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidLmkMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidLmkMetric
             * @static
             * @param {perfetto.protos.AndroidLmkMetric} m AndroidLmkMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidLmkMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.byOomScore = [];
                }
                if (o.defaults) {
                    d.totalCount = 0;
                    d.oomVictimCount = 0;
                }
                if (m.totalCount != null && m.hasOwnProperty("totalCount")) {
                    d.totalCount = m.totalCount;
                }
                if (m.byOomScore && m.byOomScore.length) {
                    d.byOomScore = [];
                    for (var j = 0; j < m.byOomScore.length; ++j) {
                        d.byOomScore[j] = $root.perfetto.protos.AndroidLmkMetric.ByOomScore.toObject(m.byOomScore[j], o);
                    }
                }
                if (m.oomVictimCount != null && m.hasOwnProperty("oomVictimCount")) {
                    d.oomVictimCount = m.oomVictimCount;
                }
                return d;
            };

            /**
             * Converts this AndroidLmkMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidLmkMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidLmkMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidLmkMetric.ByOomScore = (function() {

                /**
                 * Properties of a ByOomScore.
                 * @memberof perfetto.protos.AndroidLmkMetric
                 * @interface IByOomScore
                 * @property {number|null} [oomScoreAdj] ByOomScore oomScoreAdj
                 * @property {number|null} [count] ByOomScore count
                 */

                /**
                 * Constructs a new ByOomScore.
                 * @memberof perfetto.protos.AndroidLmkMetric
                 * @classdesc Represents a ByOomScore.
                 * @implements IByOomScore
                 * @constructor
                 * @param {perfetto.protos.AndroidLmkMetric.IByOomScore=} [p] Properties to set
                 */
                function ByOomScore(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * ByOomScore oomScoreAdj.
                 * @member {number} oomScoreAdj
                 * @memberof perfetto.protos.AndroidLmkMetric.ByOomScore
                 * @instance
                 */
                ByOomScore.prototype.oomScoreAdj = 0;

                /**
                 * ByOomScore count.
                 * @member {number} count
                 * @memberof perfetto.protos.AndroidLmkMetric.ByOomScore
                 * @instance
                 */
                ByOomScore.prototype.count = 0;

                /**
                 * Creates a new ByOomScore instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidLmkMetric.ByOomScore
                 * @static
                 * @param {perfetto.protos.AndroidLmkMetric.IByOomScore=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidLmkMetric.ByOomScore} ByOomScore instance
                 */
                ByOomScore.create = function create(properties) {
                    return new ByOomScore(properties);
                };

                /**
                 * Encodes the specified ByOomScore message. Does not implicitly {@link perfetto.protos.AndroidLmkMetric.ByOomScore.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidLmkMetric.ByOomScore
                 * @static
                 * @param {perfetto.protos.AndroidLmkMetric.IByOomScore} m ByOomScore message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ByOomScore.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.oomScoreAdj != null && Object.hasOwnProperty.call(m, "oomScoreAdj"))
                        w.uint32(8).int32(m.oomScoreAdj);
                    if (m.count != null && Object.hasOwnProperty.call(m, "count"))
                        w.uint32(16).int32(m.count);
                    return w;
                };

                /**
                 * Encodes the specified ByOomScore message, length delimited. Does not implicitly {@link perfetto.protos.AndroidLmkMetric.ByOomScore.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidLmkMetric.ByOomScore
                 * @static
                 * @param {perfetto.protos.AndroidLmkMetric.IByOomScore} message ByOomScore message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ByOomScore.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a ByOomScore message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidLmkMetric.ByOomScore
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidLmkMetric.ByOomScore} ByOomScore
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ByOomScore.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidLmkMetric.ByOomScore();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.oomScoreAdj = r.int32();
                            break;
                        case 2:
                            m.count = r.int32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a ByOomScore message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidLmkMetric.ByOomScore
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidLmkMetric.ByOomScore} ByOomScore
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ByOomScore.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a ByOomScore message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidLmkMetric.ByOomScore
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ByOomScore.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.oomScoreAdj != null && m.hasOwnProperty("oomScoreAdj")) {
                        if (!$util.isInteger(m.oomScoreAdj))
                            return "oomScoreAdj: integer expected";
                    }
                    if (m.count != null && m.hasOwnProperty("count")) {
                        if (!$util.isInteger(m.count))
                            return "count: integer expected";
                    }
                    return null;
                };

                /**
                 * Creates a ByOomScore message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidLmkMetric.ByOomScore
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidLmkMetric.ByOomScore} ByOomScore
                 */
                ByOomScore.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidLmkMetric.ByOomScore)
                        return d;
                    var m = new $root.perfetto.protos.AndroidLmkMetric.ByOomScore();
                    if (d.oomScoreAdj != null) {
                        m.oomScoreAdj = d.oomScoreAdj | 0;
                    }
                    if (d.count != null) {
                        m.count = d.count | 0;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a ByOomScore message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidLmkMetric.ByOomScore
                 * @static
                 * @param {perfetto.protos.AndroidLmkMetric.ByOomScore} m ByOomScore
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ByOomScore.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.oomScoreAdj = 0;
                        d.count = 0;
                    }
                    if (m.oomScoreAdj != null && m.hasOwnProperty("oomScoreAdj")) {
                        d.oomScoreAdj = m.oomScoreAdj;
                    }
                    if (m.count != null && m.hasOwnProperty("count")) {
                        d.count = m.count;
                    }
                    return d;
                };

                /**
                 * Converts this ByOomScore to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidLmkMetric.ByOomScore
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ByOomScore.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return ByOomScore;
            })();

            return AndroidLmkMetric;
        })();

        protos.AndroidLmkReasonMetric = (function() {

            /**
             * Properties of an AndroidLmkReasonMetric.
             * @memberof perfetto.protos
             * @interface IAndroidLmkReasonMetric
             * @property {Array.<perfetto.protos.AndroidLmkReasonMetric.ILmk>|null} [lmks] AndroidLmkReasonMetric lmks
             */

            /**
             * Constructs a new AndroidLmkReasonMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidLmkReasonMetric.
             * @implements IAndroidLmkReasonMetric
             * @constructor
             * @param {perfetto.protos.IAndroidLmkReasonMetric=} [p] Properties to set
             */
            function AndroidLmkReasonMetric(p) {
                this.lmks = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidLmkReasonMetric lmks.
             * @member {Array.<perfetto.protos.AndroidLmkReasonMetric.ILmk>} lmks
             * @memberof perfetto.protos.AndroidLmkReasonMetric
             * @instance
             */
            AndroidLmkReasonMetric.prototype.lmks = $util.emptyArray;

            /**
             * Creates a new AndroidLmkReasonMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidLmkReasonMetric
             * @static
             * @param {perfetto.protos.IAndroidLmkReasonMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidLmkReasonMetric} AndroidLmkReasonMetric instance
             */
            AndroidLmkReasonMetric.create = function create(properties) {
                return new AndroidLmkReasonMetric(properties);
            };

            /**
             * Encodes the specified AndroidLmkReasonMetric message. Does not implicitly {@link perfetto.protos.AndroidLmkReasonMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidLmkReasonMetric
             * @static
             * @param {perfetto.protos.IAndroidLmkReasonMetric} m AndroidLmkReasonMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidLmkReasonMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.lmks != null && m.lmks.length) {
                    for (var i = 0; i < m.lmks.length; ++i)
                        $root.perfetto.protos.AndroidLmkReasonMetric.Lmk.encode(m.lmks[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified AndroidLmkReasonMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidLmkReasonMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidLmkReasonMetric
             * @static
             * @param {perfetto.protos.IAndroidLmkReasonMetric} message AndroidLmkReasonMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidLmkReasonMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidLmkReasonMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidLmkReasonMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidLmkReasonMetric} AndroidLmkReasonMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidLmkReasonMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidLmkReasonMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.lmks && m.lmks.length))
                            m.lmks = [];
                        m.lmks.push($root.perfetto.protos.AndroidLmkReasonMetric.Lmk.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidLmkReasonMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidLmkReasonMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidLmkReasonMetric} AndroidLmkReasonMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidLmkReasonMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidLmkReasonMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidLmkReasonMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidLmkReasonMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.lmks != null && m.hasOwnProperty("lmks")) {
                    if (!Array.isArray(m.lmks))
                        return "lmks: array expected";
                    for (var i = 0; i < m.lmks.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidLmkReasonMetric.Lmk.verify(m.lmks[i]);
                            if (e)
                                return "lmks." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidLmkReasonMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidLmkReasonMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidLmkReasonMetric} AndroidLmkReasonMetric
             */
            AndroidLmkReasonMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidLmkReasonMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidLmkReasonMetric();
                if (d.lmks) {
                    if (!Array.isArray(d.lmks))
                        throw TypeError(".perfetto.protos.AndroidLmkReasonMetric.lmks: array expected");
                    m.lmks = [];
                    for (var i = 0; i < d.lmks.length; ++i) {
                        if (typeof d.lmks[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidLmkReasonMetric.lmks: object expected");
                        m.lmks[i] = $root.perfetto.protos.AndroidLmkReasonMetric.Lmk.fromObject(d.lmks[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidLmkReasonMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidLmkReasonMetric
             * @static
             * @param {perfetto.protos.AndroidLmkReasonMetric} m AndroidLmkReasonMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidLmkReasonMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.lmks = [];
                }
                if (m.lmks && m.lmks.length) {
                    d.lmks = [];
                    for (var j = 0; j < m.lmks.length; ++j) {
                        d.lmks[j] = $root.perfetto.protos.AndroidLmkReasonMetric.Lmk.toObject(m.lmks[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidLmkReasonMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidLmkReasonMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidLmkReasonMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidLmkReasonMetric.Process = (function() {

                /**
                 * Properties of a Process.
                 * @memberof perfetto.protos.AndroidLmkReasonMetric
                 * @interface IProcess
                 * @property {perfetto.protos.IAndroidProcessMetadata|null} [process] Process process
                 * @property {number|null} [oomScoreAdj] Process oomScoreAdj
                 * @property {number|null} [size] Process size
                 * @property {number|null} [fileRssBytes] Process fileRssBytes
                 * @property {number|null} [anonRssBytes] Process anonRssBytes
                 * @property {number|null} [shmemRssBytes] Process shmemRssBytes
                 * @property {number|null} [swapBytes] Process swapBytes
                 */

                /**
                 * Constructs a new Process.
                 * @memberof perfetto.protos.AndroidLmkReasonMetric
                 * @classdesc Represents a Process.
                 * @implements IProcess
                 * @constructor
                 * @param {perfetto.protos.AndroidLmkReasonMetric.IProcess=} [p] Properties to set
                 */
                function Process(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Process process.
                 * @member {perfetto.protos.IAndroidProcessMetadata|null|undefined} process
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Process
                 * @instance
                 */
                Process.prototype.process = null;

                /**
                 * Process oomScoreAdj.
                 * @member {number} oomScoreAdj
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Process
                 * @instance
                 */
                Process.prototype.oomScoreAdj = 0;

                /**
                 * Process size.
                 * @member {number} size
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Process
                 * @instance
                 */
                Process.prototype.size = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Process fileRssBytes.
                 * @member {number} fileRssBytes
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Process
                 * @instance
                 */
                Process.prototype.fileRssBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Process anonRssBytes.
                 * @member {number} anonRssBytes
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Process
                 * @instance
                 */
                Process.prototype.anonRssBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Process shmemRssBytes.
                 * @member {number} shmemRssBytes
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Process
                 * @instance
                 */
                Process.prototype.shmemRssBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Process swapBytes.
                 * @member {number} swapBytes
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Process
                 * @instance
                 */
                Process.prototype.swapBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new Process instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Process
                 * @static
                 * @param {perfetto.protos.AndroidLmkReasonMetric.IProcess=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidLmkReasonMetric.Process} Process instance
                 */
                Process.create = function create(properties) {
                    return new Process(properties);
                };

                /**
                 * Encodes the specified Process message. Does not implicitly {@link perfetto.protos.AndroidLmkReasonMetric.Process.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Process
                 * @static
                 * @param {perfetto.protos.AndroidLmkReasonMetric.IProcess} m Process message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Process.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.process != null && Object.hasOwnProperty.call(m, "process"))
                        $root.perfetto.protos.AndroidProcessMetadata.encode(m.process, w.uint32(10).fork()).ldelim();
                    if (m.oomScoreAdj != null && Object.hasOwnProperty.call(m, "oomScoreAdj"))
                        w.uint32(16).int32(m.oomScoreAdj);
                    if (m.size != null && Object.hasOwnProperty.call(m, "size"))
                        w.uint32(24).int64(m.size);
                    if (m.fileRssBytes != null && Object.hasOwnProperty.call(m, "fileRssBytes"))
                        w.uint32(32).int64(m.fileRssBytes);
                    if (m.anonRssBytes != null && Object.hasOwnProperty.call(m, "anonRssBytes"))
                        w.uint32(40).int64(m.anonRssBytes);
                    if (m.shmemRssBytes != null && Object.hasOwnProperty.call(m, "shmemRssBytes"))
                        w.uint32(48).int64(m.shmemRssBytes);
                    if (m.swapBytes != null && Object.hasOwnProperty.call(m, "swapBytes"))
                        w.uint32(56).int64(m.swapBytes);
                    return w;
                };

                /**
                 * Encodes the specified Process message, length delimited. Does not implicitly {@link perfetto.protos.AndroidLmkReasonMetric.Process.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Process
                 * @static
                 * @param {perfetto.protos.AndroidLmkReasonMetric.IProcess} message Process message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Process.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Process message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Process
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidLmkReasonMetric.Process} Process
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Process.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidLmkReasonMetric.Process();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.process = $root.perfetto.protos.AndroidProcessMetadata.decode(r, r.uint32());
                            break;
                        case 2:
                            m.oomScoreAdj = r.int32();
                            break;
                        case 3:
                            m.size = r.int64();
                            break;
                        case 4:
                            m.fileRssBytes = r.int64();
                            break;
                        case 5:
                            m.anonRssBytes = r.int64();
                            break;
                        case 6:
                            m.shmemRssBytes = r.int64();
                            break;
                        case 7:
                            m.swapBytes = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Process message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Process
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidLmkReasonMetric.Process} Process
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Process.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Process message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Process
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Process.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.process != null && m.hasOwnProperty("process")) {
                        {
                            var e = $root.perfetto.protos.AndroidProcessMetadata.verify(m.process);
                            if (e)
                                return "process." + e;
                        }
                    }
                    if (m.oomScoreAdj != null && m.hasOwnProperty("oomScoreAdj")) {
                        if (!$util.isInteger(m.oomScoreAdj))
                            return "oomScoreAdj: integer expected";
                    }
                    if (m.size != null && m.hasOwnProperty("size")) {
                        if (!$util.isInteger(m.size) && !(m.size && $util.isInteger(m.size.low) && $util.isInteger(m.size.high)))
                            return "size: integer|Long expected";
                    }
                    if (m.fileRssBytes != null && m.hasOwnProperty("fileRssBytes")) {
                        if (!$util.isInteger(m.fileRssBytes) && !(m.fileRssBytes && $util.isInteger(m.fileRssBytes.low) && $util.isInteger(m.fileRssBytes.high)))
                            return "fileRssBytes: integer|Long expected";
                    }
                    if (m.anonRssBytes != null && m.hasOwnProperty("anonRssBytes")) {
                        if (!$util.isInteger(m.anonRssBytes) && !(m.anonRssBytes && $util.isInteger(m.anonRssBytes.low) && $util.isInteger(m.anonRssBytes.high)))
                            return "anonRssBytes: integer|Long expected";
                    }
                    if (m.shmemRssBytes != null && m.hasOwnProperty("shmemRssBytes")) {
                        if (!$util.isInteger(m.shmemRssBytes) && !(m.shmemRssBytes && $util.isInteger(m.shmemRssBytes.low) && $util.isInteger(m.shmemRssBytes.high)))
                            return "shmemRssBytes: integer|Long expected";
                    }
                    if (m.swapBytes != null && m.hasOwnProperty("swapBytes")) {
                        if (!$util.isInteger(m.swapBytes) && !(m.swapBytes && $util.isInteger(m.swapBytes.low) && $util.isInteger(m.swapBytes.high)))
                            return "swapBytes: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a Process message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Process
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidLmkReasonMetric.Process} Process
                 */
                Process.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidLmkReasonMetric.Process)
                        return d;
                    var m = new $root.perfetto.protos.AndroidLmkReasonMetric.Process();
                    if (d.process != null) {
                        if (typeof d.process !== "object")
                            throw TypeError(".perfetto.protos.AndroidLmkReasonMetric.Process.process: object expected");
                        m.process = $root.perfetto.protos.AndroidProcessMetadata.fromObject(d.process);
                    }
                    if (d.oomScoreAdj != null) {
                        m.oomScoreAdj = d.oomScoreAdj | 0;
                    }
                    if (d.size != null) {
                        if ($util.Long)
                            (m.size = $util.Long.fromValue(d.size)).unsigned = false;
                        else if (typeof d.size === "string")
                            m.size = parseInt(d.size, 10);
                        else if (typeof d.size === "number")
                            m.size = d.size;
                        else if (typeof d.size === "object")
                            m.size = new $util.LongBits(d.size.low >>> 0, d.size.high >>> 0).toNumber();
                    }
                    if (d.fileRssBytes != null) {
                        if ($util.Long)
                            (m.fileRssBytes = $util.Long.fromValue(d.fileRssBytes)).unsigned = false;
                        else if (typeof d.fileRssBytes === "string")
                            m.fileRssBytes = parseInt(d.fileRssBytes, 10);
                        else if (typeof d.fileRssBytes === "number")
                            m.fileRssBytes = d.fileRssBytes;
                        else if (typeof d.fileRssBytes === "object")
                            m.fileRssBytes = new $util.LongBits(d.fileRssBytes.low >>> 0, d.fileRssBytes.high >>> 0).toNumber();
                    }
                    if (d.anonRssBytes != null) {
                        if ($util.Long)
                            (m.anonRssBytes = $util.Long.fromValue(d.anonRssBytes)).unsigned = false;
                        else if (typeof d.anonRssBytes === "string")
                            m.anonRssBytes = parseInt(d.anonRssBytes, 10);
                        else if (typeof d.anonRssBytes === "number")
                            m.anonRssBytes = d.anonRssBytes;
                        else if (typeof d.anonRssBytes === "object")
                            m.anonRssBytes = new $util.LongBits(d.anonRssBytes.low >>> 0, d.anonRssBytes.high >>> 0).toNumber();
                    }
                    if (d.shmemRssBytes != null) {
                        if ($util.Long)
                            (m.shmemRssBytes = $util.Long.fromValue(d.shmemRssBytes)).unsigned = false;
                        else if (typeof d.shmemRssBytes === "string")
                            m.shmemRssBytes = parseInt(d.shmemRssBytes, 10);
                        else if (typeof d.shmemRssBytes === "number")
                            m.shmemRssBytes = d.shmemRssBytes;
                        else if (typeof d.shmemRssBytes === "object")
                            m.shmemRssBytes = new $util.LongBits(d.shmemRssBytes.low >>> 0, d.shmemRssBytes.high >>> 0).toNumber();
                    }
                    if (d.swapBytes != null) {
                        if ($util.Long)
                            (m.swapBytes = $util.Long.fromValue(d.swapBytes)).unsigned = false;
                        else if (typeof d.swapBytes === "string")
                            m.swapBytes = parseInt(d.swapBytes, 10);
                        else if (typeof d.swapBytes === "number")
                            m.swapBytes = d.swapBytes;
                        else if (typeof d.swapBytes === "object")
                            m.swapBytes = new $util.LongBits(d.swapBytes.low >>> 0, d.swapBytes.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Process message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Process
                 * @static
                 * @param {perfetto.protos.AndroidLmkReasonMetric.Process} m Process
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Process.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.process = null;
                        d.oomScoreAdj = 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.size = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.size = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.fileRssBytes = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.fileRssBytes = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.anonRssBytes = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.anonRssBytes = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.shmemRssBytes = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.shmemRssBytes = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.swapBytes = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.swapBytes = o.longs === String ? "0" : 0;
                    }
                    if (m.process != null && m.hasOwnProperty("process")) {
                        d.process = $root.perfetto.protos.AndroidProcessMetadata.toObject(m.process, o);
                    }
                    if (m.oomScoreAdj != null && m.hasOwnProperty("oomScoreAdj")) {
                        d.oomScoreAdj = m.oomScoreAdj;
                    }
                    if (m.size != null && m.hasOwnProperty("size")) {
                        if (typeof m.size === "number")
                            d.size = o.longs === String ? String(m.size) : m.size;
                        else
                            d.size = o.longs === String ? $util.Long.prototype.toString.call(m.size) : o.longs === Number ? new $util.LongBits(m.size.low >>> 0, m.size.high >>> 0).toNumber() : m.size;
                    }
                    if (m.fileRssBytes != null && m.hasOwnProperty("fileRssBytes")) {
                        if (typeof m.fileRssBytes === "number")
                            d.fileRssBytes = o.longs === String ? String(m.fileRssBytes) : m.fileRssBytes;
                        else
                            d.fileRssBytes = o.longs === String ? $util.Long.prototype.toString.call(m.fileRssBytes) : o.longs === Number ? new $util.LongBits(m.fileRssBytes.low >>> 0, m.fileRssBytes.high >>> 0).toNumber() : m.fileRssBytes;
                    }
                    if (m.anonRssBytes != null && m.hasOwnProperty("anonRssBytes")) {
                        if (typeof m.anonRssBytes === "number")
                            d.anonRssBytes = o.longs === String ? String(m.anonRssBytes) : m.anonRssBytes;
                        else
                            d.anonRssBytes = o.longs === String ? $util.Long.prototype.toString.call(m.anonRssBytes) : o.longs === Number ? new $util.LongBits(m.anonRssBytes.low >>> 0, m.anonRssBytes.high >>> 0).toNumber() : m.anonRssBytes;
                    }
                    if (m.shmemRssBytes != null && m.hasOwnProperty("shmemRssBytes")) {
                        if (typeof m.shmemRssBytes === "number")
                            d.shmemRssBytes = o.longs === String ? String(m.shmemRssBytes) : m.shmemRssBytes;
                        else
                            d.shmemRssBytes = o.longs === String ? $util.Long.prototype.toString.call(m.shmemRssBytes) : o.longs === Number ? new $util.LongBits(m.shmemRssBytes.low >>> 0, m.shmemRssBytes.high >>> 0).toNumber() : m.shmemRssBytes;
                    }
                    if (m.swapBytes != null && m.hasOwnProperty("swapBytes")) {
                        if (typeof m.swapBytes === "number")
                            d.swapBytes = o.longs === String ? String(m.swapBytes) : m.swapBytes;
                        else
                            d.swapBytes = o.longs === String ? $util.Long.prototype.toString.call(m.swapBytes) : o.longs === Number ? new $util.LongBits(m.swapBytes.low >>> 0, m.swapBytes.high >>> 0).toNumber() : m.swapBytes;
                    }
                    return d;
                };

                /**
                 * Converts this Process to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Process
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Process.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Process;
            })();

            AndroidLmkReasonMetric.Lmk = (function() {

                /**
                 * Properties of a Lmk.
                 * @memberof perfetto.protos.AndroidLmkReasonMetric
                 * @interface ILmk
                 * @property {number|null} [oomScoreAdj] Lmk oomScoreAdj
                 * @property {number|null} [ionHeapsBytes] Lmk ionHeapsBytes
                 * @property {number|null} [systemIonHeapSize] Lmk systemIonHeapSize
                 * @property {Array.<perfetto.protos.AndroidLmkReasonMetric.IProcess>|null} [processes] Lmk processes
                 */

                /**
                 * Constructs a new Lmk.
                 * @memberof perfetto.protos.AndroidLmkReasonMetric
                 * @classdesc Represents a Lmk.
                 * @implements ILmk
                 * @constructor
                 * @param {perfetto.protos.AndroidLmkReasonMetric.ILmk=} [p] Properties to set
                 */
                function Lmk(p) {
                    this.processes = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Lmk oomScoreAdj.
                 * @member {number} oomScoreAdj
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Lmk
                 * @instance
                 */
                Lmk.prototype.oomScoreAdj = 0;

                /**
                 * Lmk ionHeapsBytes.
                 * @member {number} ionHeapsBytes
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Lmk
                 * @instance
                 */
                Lmk.prototype.ionHeapsBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Lmk systemIonHeapSize.
                 * @member {number} systemIonHeapSize
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Lmk
                 * @instance
                 */
                Lmk.prototype.systemIonHeapSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Lmk processes.
                 * @member {Array.<perfetto.protos.AndroidLmkReasonMetric.IProcess>} processes
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Lmk
                 * @instance
                 */
                Lmk.prototype.processes = $util.emptyArray;

                /**
                 * Creates a new Lmk instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Lmk
                 * @static
                 * @param {perfetto.protos.AndroidLmkReasonMetric.ILmk=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidLmkReasonMetric.Lmk} Lmk instance
                 */
                Lmk.create = function create(properties) {
                    return new Lmk(properties);
                };

                /**
                 * Encodes the specified Lmk message. Does not implicitly {@link perfetto.protos.AndroidLmkReasonMetric.Lmk.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Lmk
                 * @static
                 * @param {perfetto.protos.AndroidLmkReasonMetric.ILmk} m Lmk message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Lmk.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.oomScoreAdj != null && Object.hasOwnProperty.call(m, "oomScoreAdj"))
                        w.uint32(8).int32(m.oomScoreAdj);
                    if (m.systemIonHeapSize != null && Object.hasOwnProperty.call(m, "systemIonHeapSize"))
                        w.uint32(16).int64(m.systemIonHeapSize);
                    if (m.processes != null && m.processes.length) {
                        for (var i = 0; i < m.processes.length; ++i)
                            $root.perfetto.protos.AndroidLmkReasonMetric.Process.encode(m.processes[i], w.uint32(26).fork()).ldelim();
                    }
                    if (m.ionHeapsBytes != null && Object.hasOwnProperty.call(m, "ionHeapsBytes"))
                        w.uint32(32).int64(m.ionHeapsBytes);
                    return w;
                };

                /**
                 * Encodes the specified Lmk message, length delimited. Does not implicitly {@link perfetto.protos.AndroidLmkReasonMetric.Lmk.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Lmk
                 * @static
                 * @param {perfetto.protos.AndroidLmkReasonMetric.ILmk} message Lmk message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Lmk.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Lmk message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Lmk
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidLmkReasonMetric.Lmk} Lmk
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Lmk.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidLmkReasonMetric.Lmk();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.oomScoreAdj = r.int32();
                            break;
                        case 4:
                            m.ionHeapsBytes = r.int64();
                            break;
                        case 2:
                            m.systemIonHeapSize = r.int64();
                            break;
                        case 3:
                            if (!(m.processes && m.processes.length))
                                m.processes = [];
                            m.processes.push($root.perfetto.protos.AndroidLmkReasonMetric.Process.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Lmk message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Lmk
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidLmkReasonMetric.Lmk} Lmk
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Lmk.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Lmk message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Lmk
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Lmk.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.oomScoreAdj != null && m.hasOwnProperty("oomScoreAdj")) {
                        if (!$util.isInteger(m.oomScoreAdj))
                            return "oomScoreAdj: integer expected";
                    }
                    if (m.ionHeapsBytes != null && m.hasOwnProperty("ionHeapsBytes")) {
                        if (!$util.isInteger(m.ionHeapsBytes) && !(m.ionHeapsBytes && $util.isInteger(m.ionHeapsBytes.low) && $util.isInteger(m.ionHeapsBytes.high)))
                            return "ionHeapsBytes: integer|Long expected";
                    }
                    if (m.systemIonHeapSize != null && m.hasOwnProperty("systemIonHeapSize")) {
                        if (!$util.isInteger(m.systemIonHeapSize) && !(m.systemIonHeapSize && $util.isInteger(m.systemIonHeapSize.low) && $util.isInteger(m.systemIonHeapSize.high)))
                            return "systemIonHeapSize: integer|Long expected";
                    }
                    if (m.processes != null && m.hasOwnProperty("processes")) {
                        if (!Array.isArray(m.processes))
                            return "processes: array expected";
                        for (var i = 0; i < m.processes.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidLmkReasonMetric.Process.verify(m.processes[i]);
                                if (e)
                                    return "processes." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates a Lmk message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Lmk
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidLmkReasonMetric.Lmk} Lmk
                 */
                Lmk.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidLmkReasonMetric.Lmk)
                        return d;
                    var m = new $root.perfetto.protos.AndroidLmkReasonMetric.Lmk();
                    if (d.oomScoreAdj != null) {
                        m.oomScoreAdj = d.oomScoreAdj | 0;
                    }
                    if (d.ionHeapsBytes != null) {
                        if ($util.Long)
                            (m.ionHeapsBytes = $util.Long.fromValue(d.ionHeapsBytes)).unsigned = false;
                        else if (typeof d.ionHeapsBytes === "string")
                            m.ionHeapsBytes = parseInt(d.ionHeapsBytes, 10);
                        else if (typeof d.ionHeapsBytes === "number")
                            m.ionHeapsBytes = d.ionHeapsBytes;
                        else if (typeof d.ionHeapsBytes === "object")
                            m.ionHeapsBytes = new $util.LongBits(d.ionHeapsBytes.low >>> 0, d.ionHeapsBytes.high >>> 0).toNumber();
                    }
                    if (d.systemIonHeapSize != null) {
                        if ($util.Long)
                            (m.systemIonHeapSize = $util.Long.fromValue(d.systemIonHeapSize)).unsigned = false;
                        else if (typeof d.systemIonHeapSize === "string")
                            m.systemIonHeapSize = parseInt(d.systemIonHeapSize, 10);
                        else if (typeof d.systemIonHeapSize === "number")
                            m.systemIonHeapSize = d.systemIonHeapSize;
                        else if (typeof d.systemIonHeapSize === "object")
                            m.systemIonHeapSize = new $util.LongBits(d.systemIonHeapSize.low >>> 0, d.systemIonHeapSize.high >>> 0).toNumber();
                    }
                    if (d.processes) {
                        if (!Array.isArray(d.processes))
                            throw TypeError(".perfetto.protos.AndroidLmkReasonMetric.Lmk.processes: array expected");
                        m.processes = [];
                        for (var i = 0; i < d.processes.length; ++i) {
                            if (typeof d.processes[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidLmkReasonMetric.Lmk.processes: object expected");
                            m.processes[i] = $root.perfetto.protos.AndroidLmkReasonMetric.Process.fromObject(d.processes[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Lmk message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Lmk
                 * @static
                 * @param {perfetto.protos.AndroidLmkReasonMetric.Lmk} m Lmk
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Lmk.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.processes = [];
                    }
                    if (o.defaults) {
                        d.oomScoreAdj = 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.systemIonHeapSize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.systemIonHeapSize = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.ionHeapsBytes = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.ionHeapsBytes = o.longs === String ? "0" : 0;
                    }
                    if (m.oomScoreAdj != null && m.hasOwnProperty("oomScoreAdj")) {
                        d.oomScoreAdj = m.oomScoreAdj;
                    }
                    if (m.systemIonHeapSize != null && m.hasOwnProperty("systemIonHeapSize")) {
                        if (typeof m.systemIonHeapSize === "number")
                            d.systemIonHeapSize = o.longs === String ? String(m.systemIonHeapSize) : m.systemIonHeapSize;
                        else
                            d.systemIonHeapSize = o.longs === String ? $util.Long.prototype.toString.call(m.systemIonHeapSize) : o.longs === Number ? new $util.LongBits(m.systemIonHeapSize.low >>> 0, m.systemIonHeapSize.high >>> 0).toNumber() : m.systemIonHeapSize;
                    }
                    if (m.processes && m.processes.length) {
                        d.processes = [];
                        for (var j = 0; j < m.processes.length; ++j) {
                            d.processes[j] = $root.perfetto.protos.AndroidLmkReasonMetric.Process.toObject(m.processes[j], o);
                        }
                    }
                    if (m.ionHeapsBytes != null && m.hasOwnProperty("ionHeapsBytes")) {
                        if (typeof m.ionHeapsBytes === "number")
                            d.ionHeapsBytes = o.longs === String ? String(m.ionHeapsBytes) : m.ionHeapsBytes;
                        else
                            d.ionHeapsBytes = o.longs === String ? $util.Long.prototype.toString.call(m.ionHeapsBytes) : o.longs === Number ? new $util.LongBits(m.ionHeapsBytes.low >>> 0, m.ionHeapsBytes.high >>> 0).toNumber() : m.ionHeapsBytes;
                    }
                    return d;
                };

                /**
                 * Converts this Lmk to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidLmkReasonMetric.Lmk
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Lmk.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Lmk;
            })();

            return AndroidLmkReasonMetric;
        })();

        protos.AndroidMemoryMetric = (function() {

            /**
             * Properties of an AndroidMemoryMetric.
             * @memberof perfetto.protos
             * @interface IAndroidMemoryMetric
             * @property {Array.<perfetto.protos.AndroidMemoryMetric.IProcessMetrics>|null} [processMetrics] AndroidMemoryMetric processMetrics
             */

            /**
             * Constructs a new AndroidMemoryMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidMemoryMetric.
             * @implements IAndroidMemoryMetric
             * @constructor
             * @param {perfetto.protos.IAndroidMemoryMetric=} [p] Properties to set
             */
            function AndroidMemoryMetric(p) {
                this.processMetrics = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidMemoryMetric processMetrics.
             * @member {Array.<perfetto.protos.AndroidMemoryMetric.IProcessMetrics>} processMetrics
             * @memberof perfetto.protos.AndroidMemoryMetric
             * @instance
             */
            AndroidMemoryMetric.prototype.processMetrics = $util.emptyArray;

            /**
             * Creates a new AndroidMemoryMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidMemoryMetric
             * @static
             * @param {perfetto.protos.IAndroidMemoryMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidMemoryMetric} AndroidMemoryMetric instance
             */
            AndroidMemoryMetric.create = function create(properties) {
                return new AndroidMemoryMetric(properties);
            };

            /**
             * Encodes the specified AndroidMemoryMetric message. Does not implicitly {@link perfetto.protos.AndroidMemoryMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidMemoryMetric
             * @static
             * @param {perfetto.protos.IAndroidMemoryMetric} m AndroidMemoryMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidMemoryMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.processMetrics != null && m.processMetrics.length) {
                    for (var i = 0; i < m.processMetrics.length; ++i)
                        $root.perfetto.protos.AndroidMemoryMetric.ProcessMetrics.encode(m.processMetrics[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified AndroidMemoryMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidMemoryMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidMemoryMetric
             * @static
             * @param {perfetto.protos.IAndroidMemoryMetric} message AndroidMemoryMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidMemoryMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidMemoryMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidMemoryMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidMemoryMetric} AndroidMemoryMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidMemoryMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidMemoryMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.processMetrics && m.processMetrics.length))
                            m.processMetrics = [];
                        m.processMetrics.push($root.perfetto.protos.AndroidMemoryMetric.ProcessMetrics.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidMemoryMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidMemoryMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidMemoryMetric} AndroidMemoryMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidMemoryMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidMemoryMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidMemoryMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidMemoryMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.processMetrics != null && m.hasOwnProperty("processMetrics")) {
                    if (!Array.isArray(m.processMetrics))
                        return "processMetrics: array expected";
                    for (var i = 0; i < m.processMetrics.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidMemoryMetric.ProcessMetrics.verify(m.processMetrics[i]);
                            if (e)
                                return "processMetrics." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidMemoryMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidMemoryMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidMemoryMetric} AndroidMemoryMetric
             */
            AndroidMemoryMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidMemoryMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidMemoryMetric();
                if (d.processMetrics) {
                    if (!Array.isArray(d.processMetrics))
                        throw TypeError(".perfetto.protos.AndroidMemoryMetric.processMetrics: array expected");
                    m.processMetrics = [];
                    for (var i = 0; i < d.processMetrics.length; ++i) {
                        if (typeof d.processMetrics[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidMemoryMetric.processMetrics: object expected");
                        m.processMetrics[i] = $root.perfetto.protos.AndroidMemoryMetric.ProcessMetrics.fromObject(d.processMetrics[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidMemoryMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidMemoryMetric
             * @static
             * @param {perfetto.protos.AndroidMemoryMetric} m AndroidMemoryMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidMemoryMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.processMetrics = [];
                }
                if (m.processMetrics && m.processMetrics.length) {
                    d.processMetrics = [];
                    for (var j = 0; j < m.processMetrics.length; ++j) {
                        d.processMetrics[j] = $root.perfetto.protos.AndroidMemoryMetric.ProcessMetrics.toObject(m.processMetrics[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidMemoryMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidMemoryMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidMemoryMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidMemoryMetric.ProcessMetrics = (function() {

                /**
                 * Properties of a ProcessMetrics.
                 * @memberof perfetto.protos.AndroidMemoryMetric
                 * @interface IProcessMetrics
                 * @property {string|null} [processName] ProcessMetrics processName
                 * @property {perfetto.protos.AndroidMemoryMetric.IProcessMemoryCounters|null} [totalCounters] ProcessMetrics totalCounters
                 * @property {Array.<perfetto.protos.AndroidMemoryMetric.IPriorityBreakdown>|null} [priorityBreakdown] ProcessMetrics priorityBreakdown
                 */

                /**
                 * Constructs a new ProcessMetrics.
                 * @memberof perfetto.protos.AndroidMemoryMetric
                 * @classdesc Represents a ProcessMetrics.
                 * @implements IProcessMetrics
                 * @constructor
                 * @param {perfetto.protos.AndroidMemoryMetric.IProcessMetrics=} [p] Properties to set
                 */
                function ProcessMetrics(p) {
                    this.priorityBreakdown = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * ProcessMetrics processName.
                 * @member {string} processName
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMetrics
                 * @instance
                 */
                ProcessMetrics.prototype.processName = "";

                /**
                 * ProcessMetrics totalCounters.
                 * @member {perfetto.protos.AndroidMemoryMetric.IProcessMemoryCounters|null|undefined} totalCounters
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMetrics
                 * @instance
                 */
                ProcessMetrics.prototype.totalCounters = null;

                /**
                 * ProcessMetrics priorityBreakdown.
                 * @member {Array.<perfetto.protos.AndroidMemoryMetric.IPriorityBreakdown>} priorityBreakdown
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMetrics
                 * @instance
                 */
                ProcessMetrics.prototype.priorityBreakdown = $util.emptyArray;

                /**
                 * Creates a new ProcessMetrics instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMetrics
                 * @static
                 * @param {perfetto.protos.AndroidMemoryMetric.IProcessMetrics=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidMemoryMetric.ProcessMetrics} ProcessMetrics instance
                 */
                ProcessMetrics.create = function create(properties) {
                    return new ProcessMetrics(properties);
                };

                /**
                 * Encodes the specified ProcessMetrics message. Does not implicitly {@link perfetto.protos.AndroidMemoryMetric.ProcessMetrics.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMetrics
                 * @static
                 * @param {perfetto.protos.AndroidMemoryMetric.IProcessMetrics} m ProcessMetrics message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProcessMetrics.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.processName != null && Object.hasOwnProperty.call(m, "processName"))
                        w.uint32(10).string(m.processName);
                    if (m.totalCounters != null && Object.hasOwnProperty.call(m, "totalCounters"))
                        $root.perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters.encode(m.totalCounters, w.uint32(18).fork()).ldelim();
                    if (m.priorityBreakdown != null && m.priorityBreakdown.length) {
                        for (var i = 0; i < m.priorityBreakdown.length; ++i)
                            $root.perfetto.protos.AndroidMemoryMetric.PriorityBreakdown.encode(m.priorityBreakdown[i], w.uint32(26).fork()).ldelim();
                    }
                    return w;
                };

                /**
                 * Encodes the specified ProcessMetrics message, length delimited. Does not implicitly {@link perfetto.protos.AndroidMemoryMetric.ProcessMetrics.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMetrics
                 * @static
                 * @param {perfetto.protos.AndroidMemoryMetric.IProcessMetrics} message ProcessMetrics message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProcessMetrics.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a ProcessMetrics message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMetrics
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidMemoryMetric.ProcessMetrics} ProcessMetrics
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProcessMetrics.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidMemoryMetric.ProcessMetrics();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.processName = r.string();
                            break;
                        case 2:
                            m.totalCounters = $root.perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters.decode(r, r.uint32());
                            break;
                        case 3:
                            if (!(m.priorityBreakdown && m.priorityBreakdown.length))
                                m.priorityBreakdown = [];
                            m.priorityBreakdown.push($root.perfetto.protos.AndroidMemoryMetric.PriorityBreakdown.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a ProcessMetrics message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMetrics
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidMemoryMetric.ProcessMetrics} ProcessMetrics
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProcessMetrics.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a ProcessMetrics message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMetrics
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ProcessMetrics.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.processName != null && m.hasOwnProperty("processName")) {
                        if (!$util.isString(m.processName))
                            return "processName: string expected";
                    }
                    if (m.totalCounters != null && m.hasOwnProperty("totalCounters")) {
                        {
                            var e = $root.perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters.verify(m.totalCounters);
                            if (e)
                                return "totalCounters." + e;
                        }
                    }
                    if (m.priorityBreakdown != null && m.hasOwnProperty("priorityBreakdown")) {
                        if (!Array.isArray(m.priorityBreakdown))
                            return "priorityBreakdown: array expected";
                        for (var i = 0; i < m.priorityBreakdown.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidMemoryMetric.PriorityBreakdown.verify(m.priorityBreakdown[i]);
                                if (e)
                                    return "priorityBreakdown." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates a ProcessMetrics message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMetrics
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidMemoryMetric.ProcessMetrics} ProcessMetrics
                 */
                ProcessMetrics.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidMemoryMetric.ProcessMetrics)
                        return d;
                    var m = new $root.perfetto.protos.AndroidMemoryMetric.ProcessMetrics();
                    if (d.processName != null) {
                        m.processName = String(d.processName);
                    }
                    if (d.totalCounters != null) {
                        if (typeof d.totalCounters !== "object")
                            throw TypeError(".perfetto.protos.AndroidMemoryMetric.ProcessMetrics.totalCounters: object expected");
                        m.totalCounters = $root.perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters.fromObject(d.totalCounters);
                    }
                    if (d.priorityBreakdown) {
                        if (!Array.isArray(d.priorityBreakdown))
                            throw TypeError(".perfetto.protos.AndroidMemoryMetric.ProcessMetrics.priorityBreakdown: array expected");
                        m.priorityBreakdown = [];
                        for (var i = 0; i < d.priorityBreakdown.length; ++i) {
                            if (typeof d.priorityBreakdown[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidMemoryMetric.ProcessMetrics.priorityBreakdown: object expected");
                            m.priorityBreakdown[i] = $root.perfetto.protos.AndroidMemoryMetric.PriorityBreakdown.fromObject(d.priorityBreakdown[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a ProcessMetrics message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMetrics
                 * @static
                 * @param {perfetto.protos.AndroidMemoryMetric.ProcessMetrics} m ProcessMetrics
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ProcessMetrics.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.priorityBreakdown = [];
                    }
                    if (o.defaults) {
                        d.processName = "";
                        d.totalCounters = null;
                    }
                    if (m.processName != null && m.hasOwnProperty("processName")) {
                        d.processName = m.processName;
                    }
                    if (m.totalCounters != null && m.hasOwnProperty("totalCounters")) {
                        d.totalCounters = $root.perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters.toObject(m.totalCounters, o);
                    }
                    if (m.priorityBreakdown && m.priorityBreakdown.length) {
                        d.priorityBreakdown = [];
                        for (var j = 0; j < m.priorityBreakdown.length; ++j) {
                            d.priorityBreakdown[j] = $root.perfetto.protos.AndroidMemoryMetric.PriorityBreakdown.toObject(m.priorityBreakdown[j], o);
                        }
                    }
                    return d;
                };

                /**
                 * Converts this ProcessMetrics to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMetrics
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ProcessMetrics.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return ProcessMetrics;
            })();

            AndroidMemoryMetric.PriorityBreakdown = (function() {

                /**
                 * Properties of a PriorityBreakdown.
                 * @memberof perfetto.protos.AndroidMemoryMetric
                 * @interface IPriorityBreakdown
                 * @property {string|null} [priority] PriorityBreakdown priority
                 * @property {perfetto.protos.AndroidMemoryMetric.IProcessMemoryCounters|null} [counters] PriorityBreakdown counters
                 */

                /**
                 * Constructs a new PriorityBreakdown.
                 * @memberof perfetto.protos.AndroidMemoryMetric
                 * @classdesc Represents a PriorityBreakdown.
                 * @implements IPriorityBreakdown
                 * @constructor
                 * @param {perfetto.protos.AndroidMemoryMetric.IPriorityBreakdown=} [p] Properties to set
                 */
                function PriorityBreakdown(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * PriorityBreakdown priority.
                 * @member {string} priority
                 * @memberof perfetto.protos.AndroidMemoryMetric.PriorityBreakdown
                 * @instance
                 */
                PriorityBreakdown.prototype.priority = "";

                /**
                 * PriorityBreakdown counters.
                 * @member {perfetto.protos.AndroidMemoryMetric.IProcessMemoryCounters|null|undefined} counters
                 * @memberof perfetto.protos.AndroidMemoryMetric.PriorityBreakdown
                 * @instance
                 */
                PriorityBreakdown.prototype.counters = null;

                /**
                 * Creates a new PriorityBreakdown instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidMemoryMetric.PriorityBreakdown
                 * @static
                 * @param {perfetto.protos.AndroidMemoryMetric.IPriorityBreakdown=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidMemoryMetric.PriorityBreakdown} PriorityBreakdown instance
                 */
                PriorityBreakdown.create = function create(properties) {
                    return new PriorityBreakdown(properties);
                };

                /**
                 * Encodes the specified PriorityBreakdown message. Does not implicitly {@link perfetto.protos.AndroidMemoryMetric.PriorityBreakdown.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidMemoryMetric.PriorityBreakdown
                 * @static
                 * @param {perfetto.protos.AndroidMemoryMetric.IPriorityBreakdown} m PriorityBreakdown message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PriorityBreakdown.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.priority != null && Object.hasOwnProperty.call(m, "priority"))
                        w.uint32(10).string(m.priority);
                    if (m.counters != null && Object.hasOwnProperty.call(m, "counters"))
                        $root.perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters.encode(m.counters, w.uint32(18).fork()).ldelim();
                    return w;
                };

                /**
                 * Encodes the specified PriorityBreakdown message, length delimited. Does not implicitly {@link perfetto.protos.AndroidMemoryMetric.PriorityBreakdown.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidMemoryMetric.PriorityBreakdown
                 * @static
                 * @param {perfetto.protos.AndroidMemoryMetric.IPriorityBreakdown} message PriorityBreakdown message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PriorityBreakdown.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a PriorityBreakdown message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidMemoryMetric.PriorityBreakdown
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidMemoryMetric.PriorityBreakdown} PriorityBreakdown
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PriorityBreakdown.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidMemoryMetric.PriorityBreakdown();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.priority = r.string();
                            break;
                        case 2:
                            m.counters = $root.perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters.decode(r, r.uint32());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a PriorityBreakdown message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidMemoryMetric.PriorityBreakdown
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidMemoryMetric.PriorityBreakdown} PriorityBreakdown
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PriorityBreakdown.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a PriorityBreakdown message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidMemoryMetric.PriorityBreakdown
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                PriorityBreakdown.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.priority != null && m.hasOwnProperty("priority")) {
                        if (!$util.isString(m.priority))
                            return "priority: string expected";
                    }
                    if (m.counters != null && m.hasOwnProperty("counters")) {
                        {
                            var e = $root.perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters.verify(m.counters);
                            if (e)
                                return "counters." + e;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a PriorityBreakdown message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidMemoryMetric.PriorityBreakdown
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidMemoryMetric.PriorityBreakdown} PriorityBreakdown
                 */
                PriorityBreakdown.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidMemoryMetric.PriorityBreakdown)
                        return d;
                    var m = new $root.perfetto.protos.AndroidMemoryMetric.PriorityBreakdown();
                    if (d.priority != null) {
                        m.priority = String(d.priority);
                    }
                    if (d.counters != null) {
                        if (typeof d.counters !== "object")
                            throw TypeError(".perfetto.protos.AndroidMemoryMetric.PriorityBreakdown.counters: object expected");
                        m.counters = $root.perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters.fromObject(d.counters);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a PriorityBreakdown message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidMemoryMetric.PriorityBreakdown
                 * @static
                 * @param {perfetto.protos.AndroidMemoryMetric.PriorityBreakdown} m PriorityBreakdown
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                PriorityBreakdown.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.priority = "";
                        d.counters = null;
                    }
                    if (m.priority != null && m.hasOwnProperty("priority")) {
                        d.priority = m.priority;
                    }
                    if (m.counters != null && m.hasOwnProperty("counters")) {
                        d.counters = $root.perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters.toObject(m.counters, o);
                    }
                    return d;
                };

                /**
                 * Converts this PriorityBreakdown to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidMemoryMetric.PriorityBreakdown
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                PriorityBreakdown.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return PriorityBreakdown;
            })();

            AndroidMemoryMetric.ProcessMemoryCounters = (function() {

                /**
                 * Properties of a ProcessMemoryCounters.
                 * @memberof perfetto.protos.AndroidMemoryMetric
                 * @interface IProcessMemoryCounters
                 * @property {perfetto.protos.AndroidMemoryMetric.ICounter|null} [anonRss] ProcessMemoryCounters anonRss
                 * @property {perfetto.protos.AndroidMemoryMetric.ICounter|null} [fileRss] ProcessMemoryCounters fileRss
                 * @property {perfetto.protos.AndroidMemoryMetric.ICounter|null} [swap] ProcessMemoryCounters swap
                 * @property {perfetto.protos.AndroidMemoryMetric.ICounter|null} [anonAndSwap] ProcessMemoryCounters anonAndSwap
                 * @property {perfetto.protos.AndroidMemoryMetric.ICounter|null} [javaHeap] ProcessMemoryCounters javaHeap
                 */

                /**
                 * Constructs a new ProcessMemoryCounters.
                 * @memberof perfetto.protos.AndroidMemoryMetric
                 * @classdesc Represents a ProcessMemoryCounters.
                 * @implements IProcessMemoryCounters
                 * @constructor
                 * @param {perfetto.protos.AndroidMemoryMetric.IProcessMemoryCounters=} [p] Properties to set
                 */
                function ProcessMemoryCounters(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * ProcessMemoryCounters anonRss.
                 * @member {perfetto.protos.AndroidMemoryMetric.ICounter|null|undefined} anonRss
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters
                 * @instance
                 */
                ProcessMemoryCounters.prototype.anonRss = null;

                /**
                 * ProcessMemoryCounters fileRss.
                 * @member {perfetto.protos.AndroidMemoryMetric.ICounter|null|undefined} fileRss
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters
                 * @instance
                 */
                ProcessMemoryCounters.prototype.fileRss = null;

                /**
                 * ProcessMemoryCounters swap.
                 * @member {perfetto.protos.AndroidMemoryMetric.ICounter|null|undefined} swap
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters
                 * @instance
                 */
                ProcessMemoryCounters.prototype.swap = null;

                /**
                 * ProcessMemoryCounters anonAndSwap.
                 * @member {perfetto.protos.AndroidMemoryMetric.ICounter|null|undefined} anonAndSwap
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters
                 * @instance
                 */
                ProcessMemoryCounters.prototype.anonAndSwap = null;

                /**
                 * ProcessMemoryCounters javaHeap.
                 * @member {perfetto.protos.AndroidMemoryMetric.ICounter|null|undefined} javaHeap
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters
                 * @instance
                 */
                ProcessMemoryCounters.prototype.javaHeap = null;

                /**
                 * Creates a new ProcessMemoryCounters instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters
                 * @static
                 * @param {perfetto.protos.AndroidMemoryMetric.IProcessMemoryCounters=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters} ProcessMemoryCounters instance
                 */
                ProcessMemoryCounters.create = function create(properties) {
                    return new ProcessMemoryCounters(properties);
                };

                /**
                 * Encodes the specified ProcessMemoryCounters message. Does not implicitly {@link perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters
                 * @static
                 * @param {perfetto.protos.AndroidMemoryMetric.IProcessMemoryCounters} m ProcessMemoryCounters message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProcessMemoryCounters.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.anonRss != null && Object.hasOwnProperty.call(m, "anonRss"))
                        $root.perfetto.protos.AndroidMemoryMetric.Counter.encode(m.anonRss, w.uint32(10).fork()).ldelim();
                    if (m.fileRss != null && Object.hasOwnProperty.call(m, "fileRss"))
                        $root.perfetto.protos.AndroidMemoryMetric.Counter.encode(m.fileRss, w.uint32(18).fork()).ldelim();
                    if (m.swap != null && Object.hasOwnProperty.call(m, "swap"))
                        $root.perfetto.protos.AndroidMemoryMetric.Counter.encode(m.swap, w.uint32(26).fork()).ldelim();
                    if (m.anonAndSwap != null && Object.hasOwnProperty.call(m, "anonAndSwap"))
                        $root.perfetto.protos.AndroidMemoryMetric.Counter.encode(m.anonAndSwap, w.uint32(34).fork()).ldelim();
                    if (m.javaHeap != null && Object.hasOwnProperty.call(m, "javaHeap"))
                        $root.perfetto.protos.AndroidMemoryMetric.Counter.encode(m.javaHeap, w.uint32(42).fork()).ldelim();
                    return w;
                };

                /**
                 * Encodes the specified ProcessMemoryCounters message, length delimited. Does not implicitly {@link perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters
                 * @static
                 * @param {perfetto.protos.AndroidMemoryMetric.IProcessMemoryCounters} message ProcessMemoryCounters message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProcessMemoryCounters.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a ProcessMemoryCounters message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters} ProcessMemoryCounters
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProcessMemoryCounters.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.anonRss = $root.perfetto.protos.AndroidMemoryMetric.Counter.decode(r, r.uint32());
                            break;
                        case 2:
                            m.fileRss = $root.perfetto.protos.AndroidMemoryMetric.Counter.decode(r, r.uint32());
                            break;
                        case 3:
                            m.swap = $root.perfetto.protos.AndroidMemoryMetric.Counter.decode(r, r.uint32());
                            break;
                        case 4:
                            m.anonAndSwap = $root.perfetto.protos.AndroidMemoryMetric.Counter.decode(r, r.uint32());
                            break;
                        case 5:
                            m.javaHeap = $root.perfetto.protos.AndroidMemoryMetric.Counter.decode(r, r.uint32());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a ProcessMemoryCounters message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters} ProcessMemoryCounters
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProcessMemoryCounters.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a ProcessMemoryCounters message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ProcessMemoryCounters.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.anonRss != null && m.hasOwnProperty("anonRss")) {
                        {
                            var e = $root.perfetto.protos.AndroidMemoryMetric.Counter.verify(m.anonRss);
                            if (e)
                                return "anonRss." + e;
                        }
                    }
                    if (m.fileRss != null && m.hasOwnProperty("fileRss")) {
                        {
                            var e = $root.perfetto.protos.AndroidMemoryMetric.Counter.verify(m.fileRss);
                            if (e)
                                return "fileRss." + e;
                        }
                    }
                    if (m.swap != null && m.hasOwnProperty("swap")) {
                        {
                            var e = $root.perfetto.protos.AndroidMemoryMetric.Counter.verify(m.swap);
                            if (e)
                                return "swap." + e;
                        }
                    }
                    if (m.anonAndSwap != null && m.hasOwnProperty("anonAndSwap")) {
                        {
                            var e = $root.perfetto.protos.AndroidMemoryMetric.Counter.verify(m.anonAndSwap);
                            if (e)
                                return "anonAndSwap." + e;
                        }
                    }
                    if (m.javaHeap != null && m.hasOwnProperty("javaHeap")) {
                        {
                            var e = $root.perfetto.protos.AndroidMemoryMetric.Counter.verify(m.javaHeap);
                            if (e)
                                return "javaHeap." + e;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a ProcessMemoryCounters message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters} ProcessMemoryCounters
                 */
                ProcessMemoryCounters.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters)
                        return d;
                    var m = new $root.perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters();
                    if (d.anonRss != null) {
                        if (typeof d.anonRss !== "object")
                            throw TypeError(".perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters.anonRss: object expected");
                        m.anonRss = $root.perfetto.protos.AndroidMemoryMetric.Counter.fromObject(d.anonRss);
                    }
                    if (d.fileRss != null) {
                        if (typeof d.fileRss !== "object")
                            throw TypeError(".perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters.fileRss: object expected");
                        m.fileRss = $root.perfetto.protos.AndroidMemoryMetric.Counter.fromObject(d.fileRss);
                    }
                    if (d.swap != null) {
                        if (typeof d.swap !== "object")
                            throw TypeError(".perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters.swap: object expected");
                        m.swap = $root.perfetto.protos.AndroidMemoryMetric.Counter.fromObject(d.swap);
                    }
                    if (d.anonAndSwap != null) {
                        if (typeof d.anonAndSwap !== "object")
                            throw TypeError(".perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters.anonAndSwap: object expected");
                        m.anonAndSwap = $root.perfetto.protos.AndroidMemoryMetric.Counter.fromObject(d.anonAndSwap);
                    }
                    if (d.javaHeap != null) {
                        if (typeof d.javaHeap !== "object")
                            throw TypeError(".perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters.javaHeap: object expected");
                        m.javaHeap = $root.perfetto.protos.AndroidMemoryMetric.Counter.fromObject(d.javaHeap);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a ProcessMemoryCounters message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters
                 * @static
                 * @param {perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters} m ProcessMemoryCounters
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ProcessMemoryCounters.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.anonRss = null;
                        d.fileRss = null;
                        d.swap = null;
                        d.anonAndSwap = null;
                        d.javaHeap = null;
                    }
                    if (m.anonRss != null && m.hasOwnProperty("anonRss")) {
                        d.anonRss = $root.perfetto.protos.AndroidMemoryMetric.Counter.toObject(m.anonRss, o);
                    }
                    if (m.fileRss != null && m.hasOwnProperty("fileRss")) {
                        d.fileRss = $root.perfetto.protos.AndroidMemoryMetric.Counter.toObject(m.fileRss, o);
                    }
                    if (m.swap != null && m.hasOwnProperty("swap")) {
                        d.swap = $root.perfetto.protos.AndroidMemoryMetric.Counter.toObject(m.swap, o);
                    }
                    if (m.anonAndSwap != null && m.hasOwnProperty("anonAndSwap")) {
                        d.anonAndSwap = $root.perfetto.protos.AndroidMemoryMetric.Counter.toObject(m.anonAndSwap, o);
                    }
                    if (m.javaHeap != null && m.hasOwnProperty("javaHeap")) {
                        d.javaHeap = $root.perfetto.protos.AndroidMemoryMetric.Counter.toObject(m.javaHeap, o);
                    }
                    return d;
                };

                /**
                 * Converts this ProcessMemoryCounters to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidMemoryMetric.ProcessMemoryCounters
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ProcessMemoryCounters.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return ProcessMemoryCounters;
            })();

            AndroidMemoryMetric.Counter = (function() {

                /**
                 * Properties of a Counter.
                 * @memberof perfetto.protos.AndroidMemoryMetric
                 * @interface ICounter
                 * @property {number|null} [min] Counter min
                 * @property {number|null} [max] Counter max
                 * @property {number|null} [avg] Counter avg
                 * @property {number|null} [delta] Counter delta
                 */

                /**
                 * Constructs a new Counter.
                 * @memberof perfetto.protos.AndroidMemoryMetric
                 * @classdesc Represents a Counter.
                 * @implements ICounter
                 * @constructor
                 * @param {perfetto.protos.AndroidMemoryMetric.ICounter=} [p] Properties to set
                 */
                function Counter(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Counter min.
                 * @member {number} min
                 * @memberof perfetto.protos.AndroidMemoryMetric.Counter
                 * @instance
                 */
                Counter.prototype.min = 0;

                /**
                 * Counter max.
                 * @member {number} max
                 * @memberof perfetto.protos.AndroidMemoryMetric.Counter
                 * @instance
                 */
                Counter.prototype.max = 0;

                /**
                 * Counter avg.
                 * @member {number} avg
                 * @memberof perfetto.protos.AndroidMemoryMetric.Counter
                 * @instance
                 */
                Counter.prototype.avg = 0;

                /**
                 * Counter delta.
                 * @member {number} delta
                 * @memberof perfetto.protos.AndroidMemoryMetric.Counter
                 * @instance
                 */
                Counter.prototype.delta = 0;

                /**
                 * Creates a new Counter instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidMemoryMetric.Counter
                 * @static
                 * @param {perfetto.protos.AndroidMemoryMetric.ICounter=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidMemoryMetric.Counter} Counter instance
                 */
                Counter.create = function create(properties) {
                    return new Counter(properties);
                };

                /**
                 * Encodes the specified Counter message. Does not implicitly {@link perfetto.protos.AndroidMemoryMetric.Counter.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidMemoryMetric.Counter
                 * @static
                 * @param {perfetto.protos.AndroidMemoryMetric.ICounter} m Counter message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Counter.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.min != null && Object.hasOwnProperty.call(m, "min"))
                        w.uint32(9).double(m.min);
                    if (m.max != null && Object.hasOwnProperty.call(m, "max"))
                        w.uint32(17).double(m.max);
                    if (m.avg != null && Object.hasOwnProperty.call(m, "avg"))
                        w.uint32(25).double(m.avg);
                    if (m.delta != null && Object.hasOwnProperty.call(m, "delta"))
                        w.uint32(33).double(m.delta);
                    return w;
                };

                /**
                 * Encodes the specified Counter message, length delimited. Does not implicitly {@link perfetto.protos.AndroidMemoryMetric.Counter.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidMemoryMetric.Counter
                 * @static
                 * @param {perfetto.protos.AndroidMemoryMetric.ICounter} message Counter message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Counter.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Counter message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidMemoryMetric.Counter
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidMemoryMetric.Counter} Counter
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Counter.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidMemoryMetric.Counter();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.min = r.double();
                            break;
                        case 2:
                            m.max = r.double();
                            break;
                        case 3:
                            m.avg = r.double();
                            break;
                        case 4:
                            m.delta = r.double();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Counter message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidMemoryMetric.Counter
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidMemoryMetric.Counter} Counter
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Counter.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Counter message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidMemoryMetric.Counter
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Counter.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.min != null && m.hasOwnProperty("min")) {
                        if (typeof m.min !== "number")
                            return "min: number expected";
                    }
                    if (m.max != null && m.hasOwnProperty("max")) {
                        if (typeof m.max !== "number")
                            return "max: number expected";
                    }
                    if (m.avg != null && m.hasOwnProperty("avg")) {
                        if (typeof m.avg !== "number")
                            return "avg: number expected";
                    }
                    if (m.delta != null && m.hasOwnProperty("delta")) {
                        if (typeof m.delta !== "number")
                            return "delta: number expected";
                    }
                    return null;
                };

                /**
                 * Creates a Counter message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidMemoryMetric.Counter
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidMemoryMetric.Counter} Counter
                 */
                Counter.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidMemoryMetric.Counter)
                        return d;
                    var m = new $root.perfetto.protos.AndroidMemoryMetric.Counter();
                    if (d.min != null) {
                        m.min = Number(d.min);
                    }
                    if (d.max != null) {
                        m.max = Number(d.max);
                    }
                    if (d.avg != null) {
                        m.avg = Number(d.avg);
                    }
                    if (d.delta != null) {
                        m.delta = Number(d.delta);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Counter message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidMemoryMetric.Counter
                 * @static
                 * @param {perfetto.protos.AndroidMemoryMetric.Counter} m Counter
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Counter.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.min = 0;
                        d.max = 0;
                        d.avg = 0;
                        d.delta = 0;
                    }
                    if (m.min != null && m.hasOwnProperty("min")) {
                        d.min = o.json && !isFinite(m.min) ? String(m.min) : m.min;
                    }
                    if (m.max != null && m.hasOwnProperty("max")) {
                        d.max = o.json && !isFinite(m.max) ? String(m.max) : m.max;
                    }
                    if (m.avg != null && m.hasOwnProperty("avg")) {
                        d.avg = o.json && !isFinite(m.avg) ? String(m.avg) : m.avg;
                    }
                    if (m.delta != null && m.hasOwnProperty("delta")) {
                        d.delta = o.json && !isFinite(m.delta) ? String(m.delta) : m.delta;
                    }
                    return d;
                };

                /**
                 * Converts this Counter to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidMemoryMetric.Counter
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Counter.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Counter;
            })();

            return AndroidMemoryMetric;
        })();

        protos.AndroidMemoryUnaggregatedMetric = (function() {

            /**
             * Properties of an AndroidMemoryUnaggregatedMetric.
             * @memberof perfetto.protos
             * @interface IAndroidMemoryUnaggregatedMetric
             * @property {Array.<perfetto.protos.AndroidMemoryUnaggregatedMetric.IProcessValues>|null} [processValues] AndroidMemoryUnaggregatedMetric processValues
             */

            /**
             * Constructs a new AndroidMemoryUnaggregatedMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidMemoryUnaggregatedMetric.
             * @implements IAndroidMemoryUnaggregatedMetric
             * @constructor
             * @param {perfetto.protos.IAndroidMemoryUnaggregatedMetric=} [p] Properties to set
             */
            function AndroidMemoryUnaggregatedMetric(p) {
                this.processValues = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidMemoryUnaggregatedMetric processValues.
             * @member {Array.<perfetto.protos.AndroidMemoryUnaggregatedMetric.IProcessValues>} processValues
             * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric
             * @instance
             */
            AndroidMemoryUnaggregatedMetric.prototype.processValues = $util.emptyArray;

            /**
             * Creates a new AndroidMemoryUnaggregatedMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric
             * @static
             * @param {perfetto.protos.IAndroidMemoryUnaggregatedMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidMemoryUnaggregatedMetric} AndroidMemoryUnaggregatedMetric instance
             */
            AndroidMemoryUnaggregatedMetric.create = function create(properties) {
                return new AndroidMemoryUnaggregatedMetric(properties);
            };

            /**
             * Encodes the specified AndroidMemoryUnaggregatedMetric message. Does not implicitly {@link perfetto.protos.AndroidMemoryUnaggregatedMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric
             * @static
             * @param {perfetto.protos.IAndroidMemoryUnaggregatedMetric} m AndroidMemoryUnaggregatedMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidMemoryUnaggregatedMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.processValues != null && m.processValues.length) {
                    for (var i = 0; i < m.processValues.length; ++i)
                        $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues.encode(m.processValues[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified AndroidMemoryUnaggregatedMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidMemoryUnaggregatedMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric
             * @static
             * @param {perfetto.protos.IAndroidMemoryUnaggregatedMetric} message AndroidMemoryUnaggregatedMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidMemoryUnaggregatedMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidMemoryUnaggregatedMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidMemoryUnaggregatedMetric} AndroidMemoryUnaggregatedMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidMemoryUnaggregatedMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidMemoryUnaggregatedMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.processValues && m.processValues.length))
                            m.processValues = [];
                        m.processValues.push($root.perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidMemoryUnaggregatedMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidMemoryUnaggregatedMetric} AndroidMemoryUnaggregatedMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidMemoryUnaggregatedMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidMemoryUnaggregatedMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidMemoryUnaggregatedMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.processValues != null && m.hasOwnProperty("processValues")) {
                    if (!Array.isArray(m.processValues))
                        return "processValues: array expected";
                    for (var i = 0; i < m.processValues.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues.verify(m.processValues[i]);
                            if (e)
                                return "processValues." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidMemoryUnaggregatedMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidMemoryUnaggregatedMetric} AndroidMemoryUnaggregatedMetric
             */
            AndroidMemoryUnaggregatedMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidMemoryUnaggregatedMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidMemoryUnaggregatedMetric();
                if (d.processValues) {
                    if (!Array.isArray(d.processValues))
                        throw TypeError(".perfetto.protos.AndroidMemoryUnaggregatedMetric.processValues: array expected");
                    m.processValues = [];
                    for (var i = 0; i < d.processValues.length; ++i) {
                        if (typeof d.processValues[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidMemoryUnaggregatedMetric.processValues: object expected");
                        m.processValues[i] = $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues.fromObject(d.processValues[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidMemoryUnaggregatedMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric
             * @static
             * @param {perfetto.protos.AndroidMemoryUnaggregatedMetric} m AndroidMemoryUnaggregatedMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidMemoryUnaggregatedMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.processValues = [];
                }
                if (m.processValues && m.processValues.length) {
                    d.processValues = [];
                    for (var j = 0; j < m.processValues.length; ++j) {
                        d.processValues[j] = $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues.toObject(m.processValues[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidMemoryUnaggregatedMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidMemoryUnaggregatedMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidMemoryUnaggregatedMetric.ProcessValues = (function() {

                /**
                 * Properties of a ProcessValues.
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric
                 * @interface IProcessValues
                 * @property {string|null} [processName] ProcessValues processName
                 * @property {perfetto.protos.AndroidMemoryUnaggregatedMetric.IProcessMemoryValues|null} [memValues] ProcessValues memValues
                 */

                /**
                 * Constructs a new ProcessValues.
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric
                 * @classdesc Represents a ProcessValues.
                 * @implements IProcessValues
                 * @constructor
                 * @param {perfetto.protos.AndroidMemoryUnaggregatedMetric.IProcessValues=} [p] Properties to set
                 */
                function ProcessValues(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * ProcessValues processName.
                 * @member {string} processName
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues
                 * @instance
                 */
                ProcessValues.prototype.processName = "";

                /**
                 * ProcessValues memValues.
                 * @member {perfetto.protos.AndroidMemoryUnaggregatedMetric.IProcessMemoryValues|null|undefined} memValues
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues
                 * @instance
                 */
                ProcessValues.prototype.memValues = null;

                /**
                 * Creates a new ProcessValues instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues
                 * @static
                 * @param {perfetto.protos.AndroidMemoryUnaggregatedMetric.IProcessValues=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues} ProcessValues instance
                 */
                ProcessValues.create = function create(properties) {
                    return new ProcessValues(properties);
                };

                /**
                 * Encodes the specified ProcessValues message. Does not implicitly {@link perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues
                 * @static
                 * @param {perfetto.protos.AndroidMemoryUnaggregatedMetric.IProcessValues} m ProcessValues message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProcessValues.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.processName != null && Object.hasOwnProperty.call(m, "processName"))
                        w.uint32(10).string(m.processName);
                    if (m.memValues != null && Object.hasOwnProperty.call(m, "memValues"))
                        $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues.encode(m.memValues, w.uint32(18).fork()).ldelim();
                    return w;
                };

                /**
                 * Encodes the specified ProcessValues message, length delimited. Does not implicitly {@link perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues
                 * @static
                 * @param {perfetto.protos.AndroidMemoryUnaggregatedMetric.IProcessValues} message ProcessValues message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProcessValues.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a ProcessValues message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues} ProcessValues
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProcessValues.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.processName = r.string();
                            break;
                        case 2:
                            m.memValues = $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues.decode(r, r.uint32());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a ProcessValues message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues} ProcessValues
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProcessValues.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a ProcessValues message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ProcessValues.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.processName != null && m.hasOwnProperty("processName")) {
                        if (!$util.isString(m.processName))
                            return "processName: string expected";
                    }
                    if (m.memValues != null && m.hasOwnProperty("memValues")) {
                        {
                            var e = $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues.verify(m.memValues);
                            if (e)
                                return "memValues." + e;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a ProcessValues message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues} ProcessValues
                 */
                ProcessValues.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues)
                        return d;
                    var m = new $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues();
                    if (d.processName != null) {
                        m.processName = String(d.processName);
                    }
                    if (d.memValues != null) {
                        if (typeof d.memValues !== "object")
                            throw TypeError(".perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues.memValues: object expected");
                        m.memValues = $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues.fromObject(d.memValues);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a ProcessValues message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues
                 * @static
                 * @param {perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues} m ProcessValues
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ProcessValues.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.processName = "";
                        d.memValues = null;
                    }
                    if (m.processName != null && m.hasOwnProperty("processName")) {
                        d.processName = m.processName;
                    }
                    if (m.memValues != null && m.hasOwnProperty("memValues")) {
                        d.memValues = $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues.toObject(m.memValues, o);
                    }
                    return d;
                };

                /**
                 * Converts this ProcessValues to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessValues
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ProcessValues.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return ProcessValues;
            })();

            AndroidMemoryUnaggregatedMetric.ProcessMemoryValues = (function() {

                /**
                 * Properties of a ProcessMemoryValues.
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric
                 * @interface IProcessMemoryValues
                 * @property {Array.<perfetto.protos.AndroidMemoryUnaggregatedMetric.IValue>|null} [anonRss] ProcessMemoryValues anonRss
                 * @property {Array.<perfetto.protos.AndroidMemoryUnaggregatedMetric.IValue>|null} [fileRss] ProcessMemoryValues fileRss
                 * @property {Array.<perfetto.protos.AndroidMemoryUnaggregatedMetric.IValue>|null} [swap] ProcessMemoryValues swap
                 * @property {Array.<perfetto.protos.AndroidMemoryUnaggregatedMetric.IValue>|null} [anonAndSwap] ProcessMemoryValues anonAndSwap
                 */

                /**
                 * Constructs a new ProcessMemoryValues.
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric
                 * @classdesc Represents a ProcessMemoryValues.
                 * @implements IProcessMemoryValues
                 * @constructor
                 * @param {perfetto.protos.AndroidMemoryUnaggregatedMetric.IProcessMemoryValues=} [p] Properties to set
                 */
                function ProcessMemoryValues(p) {
                    this.anonRss = [];
                    this.fileRss = [];
                    this.swap = [];
                    this.anonAndSwap = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * ProcessMemoryValues anonRss.
                 * @member {Array.<perfetto.protos.AndroidMemoryUnaggregatedMetric.IValue>} anonRss
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues
                 * @instance
                 */
                ProcessMemoryValues.prototype.anonRss = $util.emptyArray;

                /**
                 * ProcessMemoryValues fileRss.
                 * @member {Array.<perfetto.protos.AndroidMemoryUnaggregatedMetric.IValue>} fileRss
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues
                 * @instance
                 */
                ProcessMemoryValues.prototype.fileRss = $util.emptyArray;

                /**
                 * ProcessMemoryValues swap.
                 * @member {Array.<perfetto.protos.AndroidMemoryUnaggregatedMetric.IValue>} swap
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues
                 * @instance
                 */
                ProcessMemoryValues.prototype.swap = $util.emptyArray;

                /**
                 * ProcessMemoryValues anonAndSwap.
                 * @member {Array.<perfetto.protos.AndroidMemoryUnaggregatedMetric.IValue>} anonAndSwap
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues
                 * @instance
                 */
                ProcessMemoryValues.prototype.anonAndSwap = $util.emptyArray;

                /**
                 * Creates a new ProcessMemoryValues instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues
                 * @static
                 * @param {perfetto.protos.AndroidMemoryUnaggregatedMetric.IProcessMemoryValues=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues} ProcessMemoryValues instance
                 */
                ProcessMemoryValues.create = function create(properties) {
                    return new ProcessMemoryValues(properties);
                };

                /**
                 * Encodes the specified ProcessMemoryValues message. Does not implicitly {@link perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues
                 * @static
                 * @param {perfetto.protos.AndroidMemoryUnaggregatedMetric.IProcessMemoryValues} m ProcessMemoryValues message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProcessMemoryValues.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.anonRss != null && m.anonRss.length) {
                        for (var i = 0; i < m.anonRss.length; ++i)
                            $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.Value.encode(m.anonRss[i], w.uint32(10).fork()).ldelim();
                    }
                    if (m.fileRss != null && m.fileRss.length) {
                        for (var i = 0; i < m.fileRss.length; ++i)
                            $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.Value.encode(m.fileRss[i], w.uint32(18).fork()).ldelim();
                    }
                    if (m.swap != null && m.swap.length) {
                        for (var i = 0; i < m.swap.length; ++i)
                            $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.Value.encode(m.swap[i], w.uint32(26).fork()).ldelim();
                    }
                    if (m.anonAndSwap != null && m.anonAndSwap.length) {
                        for (var i = 0; i < m.anonAndSwap.length; ++i)
                            $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.Value.encode(m.anonAndSwap[i], w.uint32(34).fork()).ldelim();
                    }
                    return w;
                };

                /**
                 * Encodes the specified ProcessMemoryValues message, length delimited. Does not implicitly {@link perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues
                 * @static
                 * @param {perfetto.protos.AndroidMemoryUnaggregatedMetric.IProcessMemoryValues} message ProcessMemoryValues message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProcessMemoryValues.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a ProcessMemoryValues message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues} ProcessMemoryValues
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProcessMemoryValues.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            if (!(m.anonRss && m.anonRss.length))
                                m.anonRss = [];
                            m.anonRss.push($root.perfetto.protos.AndroidMemoryUnaggregatedMetric.Value.decode(r, r.uint32()));
                            break;
                        case 2:
                            if (!(m.fileRss && m.fileRss.length))
                                m.fileRss = [];
                            m.fileRss.push($root.perfetto.protos.AndroidMemoryUnaggregatedMetric.Value.decode(r, r.uint32()));
                            break;
                        case 3:
                            if (!(m.swap && m.swap.length))
                                m.swap = [];
                            m.swap.push($root.perfetto.protos.AndroidMemoryUnaggregatedMetric.Value.decode(r, r.uint32()));
                            break;
                        case 4:
                            if (!(m.anonAndSwap && m.anonAndSwap.length))
                                m.anonAndSwap = [];
                            m.anonAndSwap.push($root.perfetto.protos.AndroidMemoryUnaggregatedMetric.Value.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a ProcessMemoryValues message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues} ProcessMemoryValues
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProcessMemoryValues.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a ProcessMemoryValues message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ProcessMemoryValues.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.anonRss != null && m.hasOwnProperty("anonRss")) {
                        if (!Array.isArray(m.anonRss))
                            return "anonRss: array expected";
                        for (var i = 0; i < m.anonRss.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.Value.verify(m.anonRss[i]);
                                if (e)
                                    return "anonRss." + e;
                            }
                        }
                    }
                    if (m.fileRss != null && m.hasOwnProperty("fileRss")) {
                        if (!Array.isArray(m.fileRss))
                            return "fileRss: array expected";
                        for (var i = 0; i < m.fileRss.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.Value.verify(m.fileRss[i]);
                                if (e)
                                    return "fileRss." + e;
                            }
                        }
                    }
                    if (m.swap != null && m.hasOwnProperty("swap")) {
                        if (!Array.isArray(m.swap))
                            return "swap: array expected";
                        for (var i = 0; i < m.swap.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.Value.verify(m.swap[i]);
                                if (e)
                                    return "swap." + e;
                            }
                        }
                    }
                    if (m.anonAndSwap != null && m.hasOwnProperty("anonAndSwap")) {
                        if (!Array.isArray(m.anonAndSwap))
                            return "anonAndSwap: array expected";
                        for (var i = 0; i < m.anonAndSwap.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.Value.verify(m.anonAndSwap[i]);
                                if (e)
                                    return "anonAndSwap." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates a ProcessMemoryValues message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues} ProcessMemoryValues
                 */
                ProcessMemoryValues.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues)
                        return d;
                    var m = new $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues();
                    if (d.anonRss) {
                        if (!Array.isArray(d.anonRss))
                            throw TypeError(".perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues.anonRss: array expected");
                        m.anonRss = [];
                        for (var i = 0; i < d.anonRss.length; ++i) {
                            if (typeof d.anonRss[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues.anonRss: object expected");
                            m.anonRss[i] = $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.Value.fromObject(d.anonRss[i]);
                        }
                    }
                    if (d.fileRss) {
                        if (!Array.isArray(d.fileRss))
                            throw TypeError(".perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues.fileRss: array expected");
                        m.fileRss = [];
                        for (var i = 0; i < d.fileRss.length; ++i) {
                            if (typeof d.fileRss[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues.fileRss: object expected");
                            m.fileRss[i] = $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.Value.fromObject(d.fileRss[i]);
                        }
                    }
                    if (d.swap) {
                        if (!Array.isArray(d.swap))
                            throw TypeError(".perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues.swap: array expected");
                        m.swap = [];
                        for (var i = 0; i < d.swap.length; ++i) {
                            if (typeof d.swap[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues.swap: object expected");
                            m.swap[i] = $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.Value.fromObject(d.swap[i]);
                        }
                    }
                    if (d.anonAndSwap) {
                        if (!Array.isArray(d.anonAndSwap))
                            throw TypeError(".perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues.anonAndSwap: array expected");
                        m.anonAndSwap = [];
                        for (var i = 0; i < d.anonAndSwap.length; ++i) {
                            if (typeof d.anonAndSwap[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues.anonAndSwap: object expected");
                            m.anonAndSwap[i] = $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.Value.fromObject(d.anonAndSwap[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a ProcessMemoryValues message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues
                 * @static
                 * @param {perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues} m ProcessMemoryValues
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ProcessMemoryValues.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.anonRss = [];
                        d.fileRss = [];
                        d.swap = [];
                        d.anonAndSwap = [];
                    }
                    if (m.anonRss && m.anonRss.length) {
                        d.anonRss = [];
                        for (var j = 0; j < m.anonRss.length; ++j) {
                            d.anonRss[j] = $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.Value.toObject(m.anonRss[j], o);
                        }
                    }
                    if (m.fileRss && m.fileRss.length) {
                        d.fileRss = [];
                        for (var j = 0; j < m.fileRss.length; ++j) {
                            d.fileRss[j] = $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.Value.toObject(m.fileRss[j], o);
                        }
                    }
                    if (m.swap && m.swap.length) {
                        d.swap = [];
                        for (var j = 0; j < m.swap.length; ++j) {
                            d.swap[j] = $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.Value.toObject(m.swap[j], o);
                        }
                    }
                    if (m.anonAndSwap && m.anonAndSwap.length) {
                        d.anonAndSwap = [];
                        for (var j = 0; j < m.anonAndSwap.length; ++j) {
                            d.anonAndSwap[j] = $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.Value.toObject(m.anonAndSwap[j], o);
                        }
                    }
                    return d;
                };

                /**
                 * Converts this ProcessMemoryValues to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.ProcessMemoryValues
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ProcessMemoryValues.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return ProcessMemoryValues;
            })();

            AndroidMemoryUnaggregatedMetric.Value = (function() {

                /**
                 * Properties of a Value.
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric
                 * @interface IValue
                 * @property {number|null} [ts] Value ts
                 * @property {number|null} [oomScore] Value oomScore
                 * @property {number|null} [value] Value value
                 */

                /**
                 * Constructs a new Value.
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric
                 * @classdesc Represents a Value.
                 * @implements IValue
                 * @constructor
                 * @param {perfetto.protos.AndroidMemoryUnaggregatedMetric.IValue=} [p] Properties to set
                 */
                function Value(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Value ts.
                 * @member {number} ts
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.Value
                 * @instance
                 */
                Value.prototype.ts = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Value oomScore.
                 * @member {number} oomScore
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.Value
                 * @instance
                 */
                Value.prototype.oomScore = 0;

                /**
                 * Value value.
                 * @member {number} value
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.Value
                 * @instance
                 */
                Value.prototype.value = 0;

                /**
                 * Creates a new Value instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.Value
                 * @static
                 * @param {perfetto.protos.AndroidMemoryUnaggregatedMetric.IValue=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidMemoryUnaggregatedMetric.Value} Value instance
                 */
                Value.create = function create(properties) {
                    return new Value(properties);
                };

                /**
                 * Encodes the specified Value message. Does not implicitly {@link perfetto.protos.AndroidMemoryUnaggregatedMetric.Value.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.Value
                 * @static
                 * @param {perfetto.protos.AndroidMemoryUnaggregatedMetric.IValue} m Value message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Value.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.ts != null && Object.hasOwnProperty.call(m, "ts"))
                        w.uint32(8).int64(m.ts);
                    if (m.oomScore != null && Object.hasOwnProperty.call(m, "oomScore"))
                        w.uint32(16).int32(m.oomScore);
                    if (m.value != null && Object.hasOwnProperty.call(m, "value"))
                        w.uint32(25).double(m.value);
                    return w;
                };

                /**
                 * Encodes the specified Value message, length delimited. Does not implicitly {@link perfetto.protos.AndroidMemoryUnaggregatedMetric.Value.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.Value
                 * @static
                 * @param {perfetto.protos.AndroidMemoryUnaggregatedMetric.IValue} message Value message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Value.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Value message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.Value
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidMemoryUnaggregatedMetric.Value} Value
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Value.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.Value();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.ts = r.int64();
                            break;
                        case 2:
                            m.oomScore = r.int32();
                            break;
                        case 3:
                            m.value = r.double();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Value message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.Value
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidMemoryUnaggregatedMetric.Value} Value
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Value.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Value message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.Value
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Value.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.ts != null && m.hasOwnProperty("ts")) {
                        if (!$util.isInteger(m.ts) && !(m.ts && $util.isInteger(m.ts.low) && $util.isInteger(m.ts.high)))
                            return "ts: integer|Long expected";
                    }
                    if (m.oomScore != null && m.hasOwnProperty("oomScore")) {
                        if (!$util.isInteger(m.oomScore))
                            return "oomScore: integer expected";
                    }
                    if (m.value != null && m.hasOwnProperty("value")) {
                        if (typeof m.value !== "number")
                            return "value: number expected";
                    }
                    return null;
                };

                /**
                 * Creates a Value message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.Value
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidMemoryUnaggregatedMetric.Value} Value
                 */
                Value.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.Value)
                        return d;
                    var m = new $root.perfetto.protos.AndroidMemoryUnaggregatedMetric.Value();
                    if (d.ts != null) {
                        if ($util.Long)
                            (m.ts = $util.Long.fromValue(d.ts)).unsigned = false;
                        else if (typeof d.ts === "string")
                            m.ts = parseInt(d.ts, 10);
                        else if (typeof d.ts === "number")
                            m.ts = d.ts;
                        else if (typeof d.ts === "object")
                            m.ts = new $util.LongBits(d.ts.low >>> 0, d.ts.high >>> 0).toNumber();
                    }
                    if (d.oomScore != null) {
                        m.oomScore = d.oomScore | 0;
                    }
                    if (d.value != null) {
                        m.value = Number(d.value);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Value message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.Value
                 * @static
                 * @param {perfetto.protos.AndroidMemoryUnaggregatedMetric.Value} m Value
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Value.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.ts = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.ts = o.longs === String ? "0" : 0;
                        d.oomScore = 0;
                        d.value = 0;
                    }
                    if (m.ts != null && m.hasOwnProperty("ts")) {
                        if (typeof m.ts === "number")
                            d.ts = o.longs === String ? String(m.ts) : m.ts;
                        else
                            d.ts = o.longs === String ? $util.Long.prototype.toString.call(m.ts) : o.longs === Number ? new $util.LongBits(m.ts.low >>> 0, m.ts.high >>> 0).toNumber() : m.ts;
                    }
                    if (m.oomScore != null && m.hasOwnProperty("oomScore")) {
                        d.oomScore = m.oomScore;
                    }
                    if (m.value != null && m.hasOwnProperty("value")) {
                        d.value = o.json && !isFinite(m.value) ? String(m.value) : m.value;
                    }
                    return d;
                };

                /**
                 * Converts this Value to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidMemoryUnaggregatedMetric.Value
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Value.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Value;
            })();

            return AndroidMemoryUnaggregatedMetric;
        })();

        protos.AndroidMultiuserMetric = (function() {

            /**
             * Properties of an AndroidMultiuserMetric.
             * @memberof perfetto.protos
             * @interface IAndroidMultiuserMetric
             * @property {perfetto.protos.AndroidMultiuserMetric.IEventData|null} [userSwitch] AndroidMultiuserMetric userSwitch
             */

            /**
             * Constructs a new AndroidMultiuserMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidMultiuserMetric.
             * @implements IAndroidMultiuserMetric
             * @constructor
             * @param {perfetto.protos.IAndroidMultiuserMetric=} [p] Properties to set
             */
            function AndroidMultiuserMetric(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidMultiuserMetric userSwitch.
             * @member {perfetto.protos.AndroidMultiuserMetric.IEventData|null|undefined} userSwitch
             * @memberof perfetto.protos.AndroidMultiuserMetric
             * @instance
             */
            AndroidMultiuserMetric.prototype.userSwitch = null;

            /**
             * Creates a new AndroidMultiuserMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidMultiuserMetric
             * @static
             * @param {perfetto.protos.IAndroidMultiuserMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidMultiuserMetric} AndroidMultiuserMetric instance
             */
            AndroidMultiuserMetric.create = function create(properties) {
                return new AndroidMultiuserMetric(properties);
            };

            /**
             * Encodes the specified AndroidMultiuserMetric message. Does not implicitly {@link perfetto.protos.AndroidMultiuserMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidMultiuserMetric
             * @static
             * @param {perfetto.protos.IAndroidMultiuserMetric} m AndroidMultiuserMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidMultiuserMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.userSwitch != null && Object.hasOwnProperty.call(m, "userSwitch"))
                    $root.perfetto.protos.AndroidMultiuserMetric.EventData.encode(m.userSwitch, w.uint32(10).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified AndroidMultiuserMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidMultiuserMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidMultiuserMetric
             * @static
             * @param {perfetto.protos.IAndroidMultiuserMetric} message AndroidMultiuserMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidMultiuserMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidMultiuserMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidMultiuserMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidMultiuserMetric} AndroidMultiuserMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidMultiuserMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidMultiuserMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.userSwitch = $root.perfetto.protos.AndroidMultiuserMetric.EventData.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidMultiuserMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidMultiuserMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidMultiuserMetric} AndroidMultiuserMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidMultiuserMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidMultiuserMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidMultiuserMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidMultiuserMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.userSwitch != null && m.hasOwnProperty("userSwitch")) {
                    {
                        var e = $root.perfetto.protos.AndroidMultiuserMetric.EventData.verify(m.userSwitch);
                        if (e)
                            return "userSwitch." + e;
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidMultiuserMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidMultiuserMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidMultiuserMetric} AndroidMultiuserMetric
             */
            AndroidMultiuserMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidMultiuserMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidMultiuserMetric();
                if (d.userSwitch != null) {
                    if (typeof d.userSwitch !== "object")
                        throw TypeError(".perfetto.protos.AndroidMultiuserMetric.userSwitch: object expected");
                    m.userSwitch = $root.perfetto.protos.AndroidMultiuserMetric.EventData.fromObject(d.userSwitch);
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidMultiuserMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidMultiuserMetric
             * @static
             * @param {perfetto.protos.AndroidMultiuserMetric} m AndroidMultiuserMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidMultiuserMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.userSwitch = null;
                }
                if (m.userSwitch != null && m.hasOwnProperty("userSwitch")) {
                    d.userSwitch = $root.perfetto.protos.AndroidMultiuserMetric.EventData.toObject(m.userSwitch, o);
                }
                return d;
            };

            /**
             * Converts this AndroidMultiuserMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidMultiuserMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidMultiuserMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidMultiuserMetric.EventData = (function() {

                /**
                 * Properties of an EventData.
                 * @memberof perfetto.protos.AndroidMultiuserMetric
                 * @interface IEventData
                 * @property {number|null} [durationMs] EventData durationMs
                 * @property {Array.<perfetto.protos.AndroidMultiuserMetric.EventData.ICpuUsage>|null} [cpuUsage] EventData cpuUsage
                 */

                /**
                 * Constructs a new EventData.
                 * @memberof perfetto.protos.AndroidMultiuserMetric
                 * @classdesc Represents an EventData.
                 * @implements IEventData
                 * @constructor
                 * @param {perfetto.protos.AndroidMultiuserMetric.IEventData=} [p] Properties to set
                 */
                function EventData(p) {
                    this.cpuUsage = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * EventData durationMs.
                 * @member {number} durationMs
                 * @memberof perfetto.protos.AndroidMultiuserMetric.EventData
                 * @instance
                 */
                EventData.prototype.durationMs = 0;

                /**
                 * EventData cpuUsage.
                 * @member {Array.<perfetto.protos.AndroidMultiuserMetric.EventData.ICpuUsage>} cpuUsage
                 * @memberof perfetto.protos.AndroidMultiuserMetric.EventData
                 * @instance
                 */
                EventData.prototype.cpuUsage = $util.emptyArray;

                /**
                 * Creates a new EventData instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidMultiuserMetric.EventData
                 * @static
                 * @param {perfetto.protos.AndroidMultiuserMetric.IEventData=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidMultiuserMetric.EventData} EventData instance
                 */
                EventData.create = function create(properties) {
                    return new EventData(properties);
                };

                /**
                 * Encodes the specified EventData message. Does not implicitly {@link perfetto.protos.AndroidMultiuserMetric.EventData.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidMultiuserMetric.EventData
                 * @static
                 * @param {perfetto.protos.AndroidMultiuserMetric.IEventData} m EventData message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                EventData.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.durationMs != null && Object.hasOwnProperty.call(m, "durationMs"))
                        w.uint32(8).int32(m.durationMs);
                    if (m.cpuUsage != null && m.cpuUsage.length) {
                        for (var i = 0; i < m.cpuUsage.length; ++i)
                            $root.perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage.encode(m.cpuUsage[i], w.uint32(18).fork()).ldelim();
                    }
                    return w;
                };

                /**
                 * Encodes the specified EventData message, length delimited. Does not implicitly {@link perfetto.protos.AndroidMultiuserMetric.EventData.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidMultiuserMetric.EventData
                 * @static
                 * @param {perfetto.protos.AndroidMultiuserMetric.IEventData} message EventData message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                EventData.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an EventData message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidMultiuserMetric.EventData
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidMultiuserMetric.EventData} EventData
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                EventData.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidMultiuserMetric.EventData();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.durationMs = r.int32();
                            break;
                        case 2:
                            if (!(m.cpuUsage && m.cpuUsage.length))
                                m.cpuUsage = [];
                            m.cpuUsage.push($root.perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an EventData message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidMultiuserMetric.EventData
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidMultiuserMetric.EventData} EventData
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                EventData.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an EventData message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidMultiuserMetric.EventData
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                EventData.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.durationMs != null && m.hasOwnProperty("durationMs")) {
                        if (!$util.isInteger(m.durationMs))
                            return "durationMs: integer expected";
                    }
                    if (m.cpuUsage != null && m.hasOwnProperty("cpuUsage")) {
                        if (!Array.isArray(m.cpuUsage))
                            return "cpuUsage: array expected";
                        for (var i = 0; i < m.cpuUsage.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage.verify(m.cpuUsage[i]);
                                if (e)
                                    return "cpuUsage." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates an EventData message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidMultiuserMetric.EventData
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidMultiuserMetric.EventData} EventData
                 */
                EventData.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidMultiuserMetric.EventData)
                        return d;
                    var m = new $root.perfetto.protos.AndroidMultiuserMetric.EventData();
                    if (d.durationMs != null) {
                        m.durationMs = d.durationMs | 0;
                    }
                    if (d.cpuUsage) {
                        if (!Array.isArray(d.cpuUsage))
                            throw TypeError(".perfetto.protos.AndroidMultiuserMetric.EventData.cpuUsage: array expected");
                        m.cpuUsage = [];
                        for (var i = 0; i < d.cpuUsage.length; ++i) {
                            if (typeof d.cpuUsage[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidMultiuserMetric.EventData.cpuUsage: object expected");
                            m.cpuUsage[i] = $root.perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage.fromObject(d.cpuUsage[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an EventData message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidMultiuserMetric.EventData
                 * @static
                 * @param {perfetto.protos.AndroidMultiuserMetric.EventData} m EventData
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                EventData.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.cpuUsage = [];
                    }
                    if (o.defaults) {
                        d.durationMs = 0;
                    }
                    if (m.durationMs != null && m.hasOwnProperty("durationMs")) {
                        d.durationMs = m.durationMs;
                    }
                    if (m.cpuUsage && m.cpuUsage.length) {
                        d.cpuUsage = [];
                        for (var j = 0; j < m.cpuUsage.length; ++j) {
                            d.cpuUsage[j] = $root.perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage.toObject(m.cpuUsage[j], o);
                        }
                    }
                    return d;
                };

                /**
                 * Converts this EventData to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidMultiuserMetric.EventData
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                EventData.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                EventData.CpuUsage = (function() {

                    /**
                     * Properties of a CpuUsage.
                     * @memberof perfetto.protos.AndroidMultiuserMetric.EventData
                     * @interface ICpuUsage
                     * @property {number|null} [userId] CpuUsage userId
                     * @property {string|null} [processName] CpuUsage processName
                     * @property {number|null} [cpuMcycles] CpuUsage cpuMcycles
                     * @property {number|null} [cpuPercentage] CpuUsage cpuPercentage
                     * @property {string|null} [identifier] CpuUsage identifier
                     */

                    /**
                     * Constructs a new CpuUsage.
                     * @memberof perfetto.protos.AndroidMultiuserMetric.EventData
                     * @classdesc Represents a CpuUsage.
                     * @implements ICpuUsage
                     * @constructor
                     * @param {perfetto.protos.AndroidMultiuserMetric.EventData.ICpuUsage=} [p] Properties to set
                     */
                    function CpuUsage(p) {
                        if (p)
                            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                                if (p[ks[i]] != null)
                                    this[ks[i]] = p[ks[i]];
                    }

                    /**
                     * CpuUsage userId.
                     * @member {number} userId
                     * @memberof perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage
                     * @instance
                     */
                    CpuUsage.prototype.userId = 0;

                    /**
                     * CpuUsage processName.
                     * @member {string} processName
                     * @memberof perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage
                     * @instance
                     */
                    CpuUsage.prototype.processName = "";

                    /**
                     * CpuUsage cpuMcycles.
                     * @member {number} cpuMcycles
                     * @memberof perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage
                     * @instance
                     */
                    CpuUsage.prototype.cpuMcycles = 0;

                    /**
                     * CpuUsage cpuPercentage.
                     * @member {number} cpuPercentage
                     * @memberof perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage
                     * @instance
                     */
                    CpuUsage.prototype.cpuPercentage = 0;

                    /**
                     * CpuUsage identifier.
                     * @member {string} identifier
                     * @memberof perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage
                     * @instance
                     */
                    CpuUsage.prototype.identifier = "";

                    /**
                     * Creates a new CpuUsage instance using the specified properties.
                     * @function create
                     * @memberof perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage
                     * @static
                     * @param {perfetto.protos.AndroidMultiuserMetric.EventData.ICpuUsage=} [properties] Properties to set
                     * @returns {perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage} CpuUsage instance
                     */
                    CpuUsage.create = function create(properties) {
                        return new CpuUsage(properties);
                    };

                    /**
                     * Encodes the specified CpuUsage message. Does not implicitly {@link perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage.verify|verify} messages.
                     * @function encode
                     * @memberof perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage
                     * @static
                     * @param {perfetto.protos.AndroidMultiuserMetric.EventData.ICpuUsage} m CpuUsage message or plain object to encode
                     * @param {$protobuf.Writer} [w] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    CpuUsage.encode = function encode(m, w) {
                        if (!w)
                            w = $Writer.create();
                        if (m.userId != null && Object.hasOwnProperty.call(m, "userId"))
                            w.uint32(8).int32(m.userId);
                        if (m.processName != null && Object.hasOwnProperty.call(m, "processName"))
                            w.uint32(18).string(m.processName);
                        if (m.cpuMcycles != null && Object.hasOwnProperty.call(m, "cpuMcycles"))
                            w.uint32(24).int32(m.cpuMcycles);
                        if (m.cpuPercentage != null && Object.hasOwnProperty.call(m, "cpuPercentage"))
                            w.uint32(37).float(m.cpuPercentage);
                        if (m.identifier != null && Object.hasOwnProperty.call(m, "identifier"))
                            w.uint32(42).string(m.identifier);
                        return w;
                    };

                    /**
                     * Encodes the specified CpuUsage message, length delimited. Does not implicitly {@link perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage
                     * @static
                     * @param {perfetto.protos.AndroidMultiuserMetric.EventData.ICpuUsage} message CpuUsage message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    CpuUsage.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a CpuUsage message from the specified reader or buffer.
                     * @function decode
                     * @memberof perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                     * @param {number} [l] Message length if known beforehand
                     * @returns {perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage} CpuUsage
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    CpuUsage.decode = function decode(r, l) {
                        if (!(r instanceof $Reader))
                            r = $Reader.create(r);
                        var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage();
                        while (r.pos < c) {
                            var t = r.uint32();
                            switch (t >>> 3) {
                            case 1:
                                m.userId = r.int32();
                                break;
                            case 2:
                                m.processName = r.string();
                                break;
                            case 3:
                                m.cpuMcycles = r.int32();
                                break;
                            case 4:
                                m.cpuPercentage = r.float();
                                break;
                            case 5:
                                m.identifier = r.string();
                                break;
                            default:
                                r.skipType(t & 7);
                                break;
                            }
                        }
                        return m;
                    };

                    /**
                     * Decodes a CpuUsage message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage} CpuUsage
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    CpuUsage.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a CpuUsage message.
                     * @function verify
                     * @memberof perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage
                     * @static
                     * @param {Object.<string,*>} m Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    CpuUsage.verify = function verify(m) {
                        if (typeof m !== "object" || m === null)
                            return "object expected";
                        if (m.userId != null && m.hasOwnProperty("userId")) {
                            if (!$util.isInteger(m.userId))
                                return "userId: integer expected";
                        }
                        if (m.processName != null && m.hasOwnProperty("processName")) {
                            if (!$util.isString(m.processName))
                                return "processName: string expected";
                        }
                        if (m.cpuMcycles != null && m.hasOwnProperty("cpuMcycles")) {
                            if (!$util.isInteger(m.cpuMcycles))
                                return "cpuMcycles: integer expected";
                        }
                        if (m.cpuPercentage != null && m.hasOwnProperty("cpuPercentage")) {
                            if (typeof m.cpuPercentage !== "number")
                                return "cpuPercentage: number expected";
                        }
                        if (m.identifier != null && m.hasOwnProperty("identifier")) {
                            if (!$util.isString(m.identifier))
                                return "identifier: string expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a CpuUsage message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage
                     * @static
                     * @param {Object.<string,*>} d Plain object
                     * @returns {perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage} CpuUsage
                     */
                    CpuUsage.fromObject = function fromObject(d) {
                        if (d instanceof $root.perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage)
                            return d;
                        var m = new $root.perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage();
                        if (d.userId != null) {
                            m.userId = d.userId | 0;
                        }
                        if (d.processName != null) {
                            m.processName = String(d.processName);
                        }
                        if (d.cpuMcycles != null) {
                            m.cpuMcycles = d.cpuMcycles | 0;
                        }
                        if (d.cpuPercentage != null) {
                            m.cpuPercentage = Number(d.cpuPercentage);
                        }
                        if (d.identifier != null) {
                            m.identifier = String(d.identifier);
                        }
                        return m;
                    };

                    /**
                     * Creates a plain object from a CpuUsage message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage
                     * @static
                     * @param {perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage} m CpuUsage
                     * @param {$protobuf.IConversionOptions} [o] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    CpuUsage.toObject = function toObject(m, o) {
                        if (!o)
                            o = {};
                        var d = {};
                        if (o.defaults) {
                            d.userId = 0;
                            d.processName = "";
                            d.cpuMcycles = 0;
                            d.cpuPercentage = 0;
                            d.identifier = "";
                        }
                        if (m.userId != null && m.hasOwnProperty("userId")) {
                            d.userId = m.userId;
                        }
                        if (m.processName != null && m.hasOwnProperty("processName")) {
                            d.processName = m.processName;
                        }
                        if (m.cpuMcycles != null && m.hasOwnProperty("cpuMcycles")) {
                            d.cpuMcycles = m.cpuMcycles;
                        }
                        if (m.cpuPercentage != null && m.hasOwnProperty("cpuPercentage")) {
                            d.cpuPercentage = o.json && !isFinite(m.cpuPercentage) ? String(m.cpuPercentage) : m.cpuPercentage;
                        }
                        if (m.identifier != null && m.hasOwnProperty("identifier")) {
                            d.identifier = m.identifier;
                        }
                        return d;
                    };

                    /**
                     * Converts this CpuUsage to JSON.
                     * @function toJSON
                     * @memberof perfetto.protos.AndroidMultiuserMetric.EventData.CpuUsage
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    CpuUsage.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                    };

                    return CpuUsage;
                })();

                return EventData;
            })();

            return AndroidMultiuserMetric;
        })();

        protos.AndroidNetworkMetric = (function() {

            /**
             * Properties of an AndroidNetworkMetric.
             * @memberof perfetto.protos
             * @interface IAndroidNetworkMetric
             * @property {Array.<perfetto.protos.AndroidNetworkMetric.INetDevice>|null} [netDevices] AndroidNetworkMetric netDevices
             * @property {perfetto.protos.AndroidNetworkMetric.INetRxAction|null} [netRxAction] AndroidNetworkMetric netRxAction
             * @property {number|null} [retransmissionRate] AndroidNetworkMetric retransmissionRate
             * @property {number|null} [kfreeSkbRate] AndroidNetworkMetric kfreeSkbRate
             * @property {perfetto.protos.AndroidNetworkMetric.INetTxAction|null} [netTxAction] AndroidNetworkMetric netTxAction
             * @property {perfetto.protos.AndroidNetworkMetric.IIpiAction|null} [ipiAction] AndroidNetworkMetric ipiAction
             */

            /**
             * Constructs a new AndroidNetworkMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidNetworkMetric.
             * @implements IAndroidNetworkMetric
             * @constructor
             * @param {perfetto.protos.IAndroidNetworkMetric=} [p] Properties to set
             */
            function AndroidNetworkMetric(p) {
                this.netDevices = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidNetworkMetric netDevices.
             * @member {Array.<perfetto.protos.AndroidNetworkMetric.INetDevice>} netDevices
             * @memberof perfetto.protos.AndroidNetworkMetric
             * @instance
             */
            AndroidNetworkMetric.prototype.netDevices = $util.emptyArray;

            /**
             * AndroidNetworkMetric netRxAction.
             * @member {perfetto.protos.AndroidNetworkMetric.INetRxAction|null|undefined} netRxAction
             * @memberof perfetto.protos.AndroidNetworkMetric
             * @instance
             */
            AndroidNetworkMetric.prototype.netRxAction = null;

            /**
             * AndroidNetworkMetric retransmissionRate.
             * @member {number} retransmissionRate
             * @memberof perfetto.protos.AndroidNetworkMetric
             * @instance
             */
            AndroidNetworkMetric.prototype.retransmissionRate = 0;

            /**
             * AndroidNetworkMetric kfreeSkbRate.
             * @member {number} kfreeSkbRate
             * @memberof perfetto.protos.AndroidNetworkMetric
             * @instance
             */
            AndroidNetworkMetric.prototype.kfreeSkbRate = 0;

            /**
             * AndroidNetworkMetric netTxAction.
             * @member {perfetto.protos.AndroidNetworkMetric.INetTxAction|null|undefined} netTxAction
             * @memberof perfetto.protos.AndroidNetworkMetric
             * @instance
             */
            AndroidNetworkMetric.prototype.netTxAction = null;

            /**
             * AndroidNetworkMetric ipiAction.
             * @member {perfetto.protos.AndroidNetworkMetric.IIpiAction|null|undefined} ipiAction
             * @memberof perfetto.protos.AndroidNetworkMetric
             * @instance
             */
            AndroidNetworkMetric.prototype.ipiAction = null;

            /**
             * Creates a new AndroidNetworkMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidNetworkMetric
             * @static
             * @param {perfetto.protos.IAndroidNetworkMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidNetworkMetric} AndroidNetworkMetric instance
             */
            AndroidNetworkMetric.create = function create(properties) {
                return new AndroidNetworkMetric(properties);
            };

            /**
             * Encodes the specified AndroidNetworkMetric message. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidNetworkMetric
             * @static
             * @param {perfetto.protos.IAndroidNetworkMetric} m AndroidNetworkMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidNetworkMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.netDevices != null && m.netDevices.length) {
                    for (var i = 0; i < m.netDevices.length; ++i)
                        $root.perfetto.protos.AndroidNetworkMetric.NetDevice.encode(m.netDevices[i], w.uint32(10).fork()).ldelim();
                }
                if (m.netRxAction != null && Object.hasOwnProperty.call(m, "netRxAction"))
                    $root.perfetto.protos.AndroidNetworkMetric.NetRxAction.encode(m.netRxAction, w.uint32(18).fork()).ldelim();
                if (m.retransmissionRate != null && Object.hasOwnProperty.call(m, "retransmissionRate"))
                    w.uint32(25).double(m.retransmissionRate);
                if (m.kfreeSkbRate != null && Object.hasOwnProperty.call(m, "kfreeSkbRate"))
                    w.uint32(33).double(m.kfreeSkbRate);
                if (m.netTxAction != null && Object.hasOwnProperty.call(m, "netTxAction"))
                    $root.perfetto.protos.AndroidNetworkMetric.NetTxAction.encode(m.netTxAction, w.uint32(42).fork()).ldelim();
                if (m.ipiAction != null && Object.hasOwnProperty.call(m, "ipiAction"))
                    $root.perfetto.protos.AndroidNetworkMetric.IpiAction.encode(m.ipiAction, w.uint32(50).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified AndroidNetworkMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidNetworkMetric
             * @static
             * @param {perfetto.protos.IAndroidNetworkMetric} message AndroidNetworkMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidNetworkMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidNetworkMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidNetworkMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidNetworkMetric} AndroidNetworkMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidNetworkMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidNetworkMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.netDevices && m.netDevices.length))
                            m.netDevices = [];
                        m.netDevices.push($root.perfetto.protos.AndroidNetworkMetric.NetDevice.decode(r, r.uint32()));
                        break;
                    case 2:
                        m.netRxAction = $root.perfetto.protos.AndroidNetworkMetric.NetRxAction.decode(r, r.uint32());
                        break;
                    case 3:
                        m.retransmissionRate = r.double();
                        break;
                    case 4:
                        m.kfreeSkbRate = r.double();
                        break;
                    case 5:
                        m.netTxAction = $root.perfetto.protos.AndroidNetworkMetric.NetTxAction.decode(r, r.uint32());
                        break;
                    case 6:
                        m.ipiAction = $root.perfetto.protos.AndroidNetworkMetric.IpiAction.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidNetworkMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidNetworkMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidNetworkMetric} AndroidNetworkMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidNetworkMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidNetworkMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidNetworkMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidNetworkMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.netDevices != null && m.hasOwnProperty("netDevices")) {
                    if (!Array.isArray(m.netDevices))
                        return "netDevices: array expected";
                    for (var i = 0; i < m.netDevices.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidNetworkMetric.NetDevice.verify(m.netDevices[i]);
                            if (e)
                                return "netDevices." + e;
                        }
                    }
                }
                if (m.netRxAction != null && m.hasOwnProperty("netRxAction")) {
                    {
                        var e = $root.perfetto.protos.AndroidNetworkMetric.NetRxAction.verify(m.netRxAction);
                        if (e)
                            return "netRxAction." + e;
                    }
                }
                if (m.retransmissionRate != null && m.hasOwnProperty("retransmissionRate")) {
                    if (typeof m.retransmissionRate !== "number")
                        return "retransmissionRate: number expected";
                }
                if (m.kfreeSkbRate != null && m.hasOwnProperty("kfreeSkbRate")) {
                    if (typeof m.kfreeSkbRate !== "number")
                        return "kfreeSkbRate: number expected";
                }
                if (m.netTxAction != null && m.hasOwnProperty("netTxAction")) {
                    {
                        var e = $root.perfetto.protos.AndroidNetworkMetric.NetTxAction.verify(m.netTxAction);
                        if (e)
                            return "netTxAction." + e;
                    }
                }
                if (m.ipiAction != null && m.hasOwnProperty("ipiAction")) {
                    {
                        var e = $root.perfetto.protos.AndroidNetworkMetric.IpiAction.verify(m.ipiAction);
                        if (e)
                            return "ipiAction." + e;
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidNetworkMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidNetworkMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidNetworkMetric} AndroidNetworkMetric
             */
            AndroidNetworkMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidNetworkMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidNetworkMetric();
                if (d.netDevices) {
                    if (!Array.isArray(d.netDevices))
                        throw TypeError(".perfetto.protos.AndroidNetworkMetric.netDevices: array expected");
                    m.netDevices = [];
                    for (var i = 0; i < d.netDevices.length; ++i) {
                        if (typeof d.netDevices[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidNetworkMetric.netDevices: object expected");
                        m.netDevices[i] = $root.perfetto.protos.AndroidNetworkMetric.NetDevice.fromObject(d.netDevices[i]);
                    }
                }
                if (d.netRxAction != null) {
                    if (typeof d.netRxAction !== "object")
                        throw TypeError(".perfetto.protos.AndroidNetworkMetric.netRxAction: object expected");
                    m.netRxAction = $root.perfetto.protos.AndroidNetworkMetric.NetRxAction.fromObject(d.netRxAction);
                }
                if (d.retransmissionRate != null) {
                    m.retransmissionRate = Number(d.retransmissionRate);
                }
                if (d.kfreeSkbRate != null) {
                    m.kfreeSkbRate = Number(d.kfreeSkbRate);
                }
                if (d.netTxAction != null) {
                    if (typeof d.netTxAction !== "object")
                        throw TypeError(".perfetto.protos.AndroidNetworkMetric.netTxAction: object expected");
                    m.netTxAction = $root.perfetto.protos.AndroidNetworkMetric.NetTxAction.fromObject(d.netTxAction);
                }
                if (d.ipiAction != null) {
                    if (typeof d.ipiAction !== "object")
                        throw TypeError(".perfetto.protos.AndroidNetworkMetric.ipiAction: object expected");
                    m.ipiAction = $root.perfetto.protos.AndroidNetworkMetric.IpiAction.fromObject(d.ipiAction);
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidNetworkMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidNetworkMetric
             * @static
             * @param {perfetto.protos.AndroidNetworkMetric} m AndroidNetworkMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidNetworkMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.netDevices = [];
                }
                if (o.defaults) {
                    d.netRxAction = null;
                    d.retransmissionRate = 0;
                    d.kfreeSkbRate = 0;
                    d.netTxAction = null;
                    d.ipiAction = null;
                }
                if (m.netDevices && m.netDevices.length) {
                    d.netDevices = [];
                    for (var j = 0; j < m.netDevices.length; ++j) {
                        d.netDevices[j] = $root.perfetto.protos.AndroidNetworkMetric.NetDevice.toObject(m.netDevices[j], o);
                    }
                }
                if (m.netRxAction != null && m.hasOwnProperty("netRxAction")) {
                    d.netRxAction = $root.perfetto.protos.AndroidNetworkMetric.NetRxAction.toObject(m.netRxAction, o);
                }
                if (m.retransmissionRate != null && m.hasOwnProperty("retransmissionRate")) {
                    d.retransmissionRate = o.json && !isFinite(m.retransmissionRate) ? String(m.retransmissionRate) : m.retransmissionRate;
                }
                if (m.kfreeSkbRate != null && m.hasOwnProperty("kfreeSkbRate")) {
                    d.kfreeSkbRate = o.json && !isFinite(m.kfreeSkbRate) ? String(m.kfreeSkbRate) : m.kfreeSkbRate;
                }
                if (m.netTxAction != null && m.hasOwnProperty("netTxAction")) {
                    d.netTxAction = $root.perfetto.protos.AndroidNetworkMetric.NetTxAction.toObject(m.netTxAction, o);
                }
                if (m.ipiAction != null && m.hasOwnProperty("ipiAction")) {
                    d.ipiAction = $root.perfetto.protos.AndroidNetworkMetric.IpiAction.toObject(m.ipiAction, o);
                }
                return d;
            };

            /**
             * Converts this AndroidNetworkMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidNetworkMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidNetworkMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidNetworkMetric.PacketStatistic = (function() {

                /**
                 * Properties of a PacketStatistic.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @interface IPacketStatistic
                 * @property {number|null} [packets] PacketStatistic packets
                 * @property {number|null} [bytes] PacketStatistic bytes
                 * @property {number|null} [firstPacketTimestampNs] PacketStatistic firstPacketTimestampNs
                 * @property {number|null} [lastPacketTimestampNs] PacketStatistic lastPacketTimestampNs
                 * @property {number|null} [intervalNs] PacketStatistic intervalNs
                 * @property {number|null} [dataRateKbps] PacketStatistic dataRateKbps
                 */

                /**
                 * Constructs a new PacketStatistic.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @classdesc Represents a PacketStatistic.
                 * @implements IPacketStatistic
                 * @constructor
                 * @param {perfetto.protos.AndroidNetworkMetric.IPacketStatistic=} [p] Properties to set
                 */
                function PacketStatistic(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * PacketStatistic packets.
                 * @member {number} packets
                 * @memberof perfetto.protos.AndroidNetworkMetric.PacketStatistic
                 * @instance
                 */
                PacketStatistic.prototype.packets = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * PacketStatistic bytes.
                 * @member {number} bytes
                 * @memberof perfetto.protos.AndroidNetworkMetric.PacketStatistic
                 * @instance
                 */
                PacketStatistic.prototype.bytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * PacketStatistic firstPacketTimestampNs.
                 * @member {number} firstPacketTimestampNs
                 * @memberof perfetto.protos.AndroidNetworkMetric.PacketStatistic
                 * @instance
                 */
                PacketStatistic.prototype.firstPacketTimestampNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * PacketStatistic lastPacketTimestampNs.
                 * @member {number} lastPacketTimestampNs
                 * @memberof perfetto.protos.AndroidNetworkMetric.PacketStatistic
                 * @instance
                 */
                PacketStatistic.prototype.lastPacketTimestampNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * PacketStatistic intervalNs.
                 * @member {number} intervalNs
                 * @memberof perfetto.protos.AndroidNetworkMetric.PacketStatistic
                 * @instance
                 */
                PacketStatistic.prototype.intervalNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * PacketStatistic dataRateKbps.
                 * @member {number} dataRateKbps
                 * @memberof perfetto.protos.AndroidNetworkMetric.PacketStatistic
                 * @instance
                 */
                PacketStatistic.prototype.dataRateKbps = 0;

                /**
                 * Creates a new PacketStatistic instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidNetworkMetric.PacketStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.IPacketStatistic=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidNetworkMetric.PacketStatistic} PacketStatistic instance
                 */
                PacketStatistic.create = function create(properties) {
                    return new PacketStatistic(properties);
                };

                /**
                 * Encodes the specified PacketStatistic message. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.PacketStatistic.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidNetworkMetric.PacketStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.IPacketStatistic} m PacketStatistic message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PacketStatistic.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.packets != null && Object.hasOwnProperty.call(m, "packets"))
                        w.uint32(8).int64(m.packets);
                    if (m.bytes != null && Object.hasOwnProperty.call(m, "bytes"))
                        w.uint32(16).int64(m.bytes);
                    if (m.firstPacketTimestampNs != null && Object.hasOwnProperty.call(m, "firstPacketTimestampNs"))
                        w.uint32(24).int64(m.firstPacketTimestampNs);
                    if (m.lastPacketTimestampNs != null && Object.hasOwnProperty.call(m, "lastPacketTimestampNs"))
                        w.uint32(32).int64(m.lastPacketTimestampNs);
                    if (m.intervalNs != null && Object.hasOwnProperty.call(m, "intervalNs"))
                        w.uint32(40).int64(m.intervalNs);
                    if (m.dataRateKbps != null && Object.hasOwnProperty.call(m, "dataRateKbps"))
                        w.uint32(49).double(m.dataRateKbps);
                    return w;
                };

                /**
                 * Encodes the specified PacketStatistic message, length delimited. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.PacketStatistic.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.PacketStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.IPacketStatistic} message PacketStatistic message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PacketStatistic.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a PacketStatistic message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidNetworkMetric.PacketStatistic
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidNetworkMetric.PacketStatistic} PacketStatistic
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PacketStatistic.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidNetworkMetric.PacketStatistic();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.packets = r.int64();
                            break;
                        case 2:
                            m.bytes = r.int64();
                            break;
                        case 3:
                            m.firstPacketTimestampNs = r.int64();
                            break;
                        case 4:
                            m.lastPacketTimestampNs = r.int64();
                            break;
                        case 5:
                            m.intervalNs = r.int64();
                            break;
                        case 6:
                            m.dataRateKbps = r.double();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a PacketStatistic message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.PacketStatistic
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidNetworkMetric.PacketStatistic} PacketStatistic
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PacketStatistic.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a PacketStatistic message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidNetworkMetric.PacketStatistic
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                PacketStatistic.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.packets != null && m.hasOwnProperty("packets")) {
                        if (!$util.isInteger(m.packets) && !(m.packets && $util.isInteger(m.packets.low) && $util.isInteger(m.packets.high)))
                            return "packets: integer|Long expected";
                    }
                    if (m.bytes != null && m.hasOwnProperty("bytes")) {
                        if (!$util.isInteger(m.bytes) && !(m.bytes && $util.isInteger(m.bytes.low) && $util.isInteger(m.bytes.high)))
                            return "bytes: integer|Long expected";
                    }
                    if (m.firstPacketTimestampNs != null && m.hasOwnProperty("firstPacketTimestampNs")) {
                        if (!$util.isInteger(m.firstPacketTimestampNs) && !(m.firstPacketTimestampNs && $util.isInteger(m.firstPacketTimestampNs.low) && $util.isInteger(m.firstPacketTimestampNs.high)))
                            return "firstPacketTimestampNs: integer|Long expected";
                    }
                    if (m.lastPacketTimestampNs != null && m.hasOwnProperty("lastPacketTimestampNs")) {
                        if (!$util.isInteger(m.lastPacketTimestampNs) && !(m.lastPacketTimestampNs && $util.isInteger(m.lastPacketTimestampNs.low) && $util.isInteger(m.lastPacketTimestampNs.high)))
                            return "lastPacketTimestampNs: integer|Long expected";
                    }
                    if (m.intervalNs != null && m.hasOwnProperty("intervalNs")) {
                        if (!$util.isInteger(m.intervalNs) && !(m.intervalNs && $util.isInteger(m.intervalNs.low) && $util.isInteger(m.intervalNs.high)))
                            return "intervalNs: integer|Long expected";
                    }
                    if (m.dataRateKbps != null && m.hasOwnProperty("dataRateKbps")) {
                        if (typeof m.dataRateKbps !== "number")
                            return "dataRateKbps: number expected";
                    }
                    return null;
                };

                /**
                 * Creates a PacketStatistic message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.PacketStatistic
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidNetworkMetric.PacketStatistic} PacketStatistic
                 */
                PacketStatistic.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidNetworkMetric.PacketStatistic)
                        return d;
                    var m = new $root.perfetto.protos.AndroidNetworkMetric.PacketStatistic();
                    if (d.packets != null) {
                        if ($util.Long)
                            (m.packets = $util.Long.fromValue(d.packets)).unsigned = false;
                        else if (typeof d.packets === "string")
                            m.packets = parseInt(d.packets, 10);
                        else if (typeof d.packets === "number")
                            m.packets = d.packets;
                        else if (typeof d.packets === "object")
                            m.packets = new $util.LongBits(d.packets.low >>> 0, d.packets.high >>> 0).toNumber();
                    }
                    if (d.bytes != null) {
                        if ($util.Long)
                            (m.bytes = $util.Long.fromValue(d.bytes)).unsigned = false;
                        else if (typeof d.bytes === "string")
                            m.bytes = parseInt(d.bytes, 10);
                        else if (typeof d.bytes === "number")
                            m.bytes = d.bytes;
                        else if (typeof d.bytes === "object")
                            m.bytes = new $util.LongBits(d.bytes.low >>> 0, d.bytes.high >>> 0).toNumber();
                    }
                    if (d.firstPacketTimestampNs != null) {
                        if ($util.Long)
                            (m.firstPacketTimestampNs = $util.Long.fromValue(d.firstPacketTimestampNs)).unsigned = false;
                        else if (typeof d.firstPacketTimestampNs === "string")
                            m.firstPacketTimestampNs = parseInt(d.firstPacketTimestampNs, 10);
                        else if (typeof d.firstPacketTimestampNs === "number")
                            m.firstPacketTimestampNs = d.firstPacketTimestampNs;
                        else if (typeof d.firstPacketTimestampNs === "object")
                            m.firstPacketTimestampNs = new $util.LongBits(d.firstPacketTimestampNs.low >>> 0, d.firstPacketTimestampNs.high >>> 0).toNumber();
                    }
                    if (d.lastPacketTimestampNs != null) {
                        if ($util.Long)
                            (m.lastPacketTimestampNs = $util.Long.fromValue(d.lastPacketTimestampNs)).unsigned = false;
                        else if (typeof d.lastPacketTimestampNs === "string")
                            m.lastPacketTimestampNs = parseInt(d.lastPacketTimestampNs, 10);
                        else if (typeof d.lastPacketTimestampNs === "number")
                            m.lastPacketTimestampNs = d.lastPacketTimestampNs;
                        else if (typeof d.lastPacketTimestampNs === "object")
                            m.lastPacketTimestampNs = new $util.LongBits(d.lastPacketTimestampNs.low >>> 0, d.lastPacketTimestampNs.high >>> 0).toNumber();
                    }
                    if (d.intervalNs != null) {
                        if ($util.Long)
                            (m.intervalNs = $util.Long.fromValue(d.intervalNs)).unsigned = false;
                        else if (typeof d.intervalNs === "string")
                            m.intervalNs = parseInt(d.intervalNs, 10);
                        else if (typeof d.intervalNs === "number")
                            m.intervalNs = d.intervalNs;
                        else if (typeof d.intervalNs === "object")
                            m.intervalNs = new $util.LongBits(d.intervalNs.low >>> 0, d.intervalNs.high >>> 0).toNumber();
                    }
                    if (d.dataRateKbps != null) {
                        m.dataRateKbps = Number(d.dataRateKbps);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a PacketStatistic message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.PacketStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.PacketStatistic} m PacketStatistic
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                PacketStatistic.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.packets = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.packets = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.bytes = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.bytes = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.firstPacketTimestampNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.firstPacketTimestampNs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.lastPacketTimestampNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.lastPacketTimestampNs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.intervalNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.intervalNs = o.longs === String ? "0" : 0;
                        d.dataRateKbps = 0;
                    }
                    if (m.packets != null && m.hasOwnProperty("packets")) {
                        if (typeof m.packets === "number")
                            d.packets = o.longs === String ? String(m.packets) : m.packets;
                        else
                            d.packets = o.longs === String ? $util.Long.prototype.toString.call(m.packets) : o.longs === Number ? new $util.LongBits(m.packets.low >>> 0, m.packets.high >>> 0).toNumber() : m.packets;
                    }
                    if (m.bytes != null && m.hasOwnProperty("bytes")) {
                        if (typeof m.bytes === "number")
                            d.bytes = o.longs === String ? String(m.bytes) : m.bytes;
                        else
                            d.bytes = o.longs === String ? $util.Long.prototype.toString.call(m.bytes) : o.longs === Number ? new $util.LongBits(m.bytes.low >>> 0, m.bytes.high >>> 0).toNumber() : m.bytes;
                    }
                    if (m.firstPacketTimestampNs != null && m.hasOwnProperty("firstPacketTimestampNs")) {
                        if (typeof m.firstPacketTimestampNs === "number")
                            d.firstPacketTimestampNs = o.longs === String ? String(m.firstPacketTimestampNs) : m.firstPacketTimestampNs;
                        else
                            d.firstPacketTimestampNs = o.longs === String ? $util.Long.prototype.toString.call(m.firstPacketTimestampNs) : o.longs === Number ? new $util.LongBits(m.firstPacketTimestampNs.low >>> 0, m.firstPacketTimestampNs.high >>> 0).toNumber() : m.firstPacketTimestampNs;
                    }
                    if (m.lastPacketTimestampNs != null && m.hasOwnProperty("lastPacketTimestampNs")) {
                        if (typeof m.lastPacketTimestampNs === "number")
                            d.lastPacketTimestampNs = o.longs === String ? String(m.lastPacketTimestampNs) : m.lastPacketTimestampNs;
                        else
                            d.lastPacketTimestampNs = o.longs === String ? $util.Long.prototype.toString.call(m.lastPacketTimestampNs) : o.longs === Number ? new $util.LongBits(m.lastPacketTimestampNs.low >>> 0, m.lastPacketTimestampNs.high >>> 0).toNumber() : m.lastPacketTimestampNs;
                    }
                    if (m.intervalNs != null && m.hasOwnProperty("intervalNs")) {
                        if (typeof m.intervalNs === "number")
                            d.intervalNs = o.longs === String ? String(m.intervalNs) : m.intervalNs;
                        else
                            d.intervalNs = o.longs === String ? $util.Long.prototype.toString.call(m.intervalNs) : o.longs === Number ? new $util.LongBits(m.intervalNs.low >>> 0, m.intervalNs.high >>> 0).toNumber() : m.intervalNs;
                    }
                    if (m.dataRateKbps != null && m.hasOwnProperty("dataRateKbps")) {
                        d.dataRateKbps = o.json && !isFinite(m.dataRateKbps) ? String(m.dataRateKbps) : m.dataRateKbps;
                    }
                    return d;
                };

                /**
                 * Converts this PacketStatistic to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidNetworkMetric.PacketStatistic
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                PacketStatistic.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return PacketStatistic;
            })();

            AndroidNetworkMetric.CorePacketStatistic = (function() {

                /**
                 * Properties of a CorePacketStatistic.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @interface ICorePacketStatistic
                 * @property {number|null} [id] CorePacketStatistic id
                 * @property {perfetto.protos.AndroidNetworkMetric.IPacketStatistic|null} [packetStatistic] CorePacketStatistic packetStatistic
                 */

                /**
                 * Constructs a new CorePacketStatistic.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @classdesc Represents a CorePacketStatistic.
                 * @implements ICorePacketStatistic
                 * @constructor
                 * @param {perfetto.protos.AndroidNetworkMetric.ICorePacketStatistic=} [p] Properties to set
                 */
                function CorePacketStatistic(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * CorePacketStatistic id.
                 * @member {number} id
                 * @memberof perfetto.protos.AndroidNetworkMetric.CorePacketStatistic
                 * @instance
                 */
                CorePacketStatistic.prototype.id = 0;

                /**
                 * CorePacketStatistic packetStatistic.
                 * @member {perfetto.protos.AndroidNetworkMetric.IPacketStatistic|null|undefined} packetStatistic
                 * @memberof perfetto.protos.AndroidNetworkMetric.CorePacketStatistic
                 * @instance
                 */
                CorePacketStatistic.prototype.packetStatistic = null;

                /**
                 * Creates a new CorePacketStatistic instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidNetworkMetric.CorePacketStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.ICorePacketStatistic=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidNetworkMetric.CorePacketStatistic} CorePacketStatistic instance
                 */
                CorePacketStatistic.create = function create(properties) {
                    return new CorePacketStatistic(properties);
                };

                /**
                 * Encodes the specified CorePacketStatistic message. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.CorePacketStatistic.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidNetworkMetric.CorePacketStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.ICorePacketStatistic} m CorePacketStatistic message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CorePacketStatistic.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.id != null && Object.hasOwnProperty.call(m, "id"))
                        w.uint32(8).uint32(m.id);
                    if (m.packetStatistic != null && Object.hasOwnProperty.call(m, "packetStatistic"))
                        $root.perfetto.protos.AndroidNetworkMetric.PacketStatistic.encode(m.packetStatistic, w.uint32(18).fork()).ldelim();
                    return w;
                };

                /**
                 * Encodes the specified CorePacketStatistic message, length delimited. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.CorePacketStatistic.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.CorePacketStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.ICorePacketStatistic} message CorePacketStatistic message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CorePacketStatistic.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a CorePacketStatistic message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidNetworkMetric.CorePacketStatistic
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidNetworkMetric.CorePacketStatistic} CorePacketStatistic
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CorePacketStatistic.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidNetworkMetric.CorePacketStatistic();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.id = r.uint32();
                            break;
                        case 2:
                            m.packetStatistic = $root.perfetto.protos.AndroidNetworkMetric.PacketStatistic.decode(r, r.uint32());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a CorePacketStatistic message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.CorePacketStatistic
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidNetworkMetric.CorePacketStatistic} CorePacketStatistic
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CorePacketStatistic.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a CorePacketStatistic message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidNetworkMetric.CorePacketStatistic
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                CorePacketStatistic.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.id != null && m.hasOwnProperty("id")) {
                        if (!$util.isInteger(m.id))
                            return "id: integer expected";
                    }
                    if (m.packetStatistic != null && m.hasOwnProperty("packetStatistic")) {
                        {
                            var e = $root.perfetto.protos.AndroidNetworkMetric.PacketStatistic.verify(m.packetStatistic);
                            if (e)
                                return "packetStatistic." + e;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a CorePacketStatistic message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.CorePacketStatistic
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidNetworkMetric.CorePacketStatistic} CorePacketStatistic
                 */
                CorePacketStatistic.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidNetworkMetric.CorePacketStatistic)
                        return d;
                    var m = new $root.perfetto.protos.AndroidNetworkMetric.CorePacketStatistic();
                    if (d.id != null) {
                        m.id = d.id >>> 0;
                    }
                    if (d.packetStatistic != null) {
                        if (typeof d.packetStatistic !== "object")
                            throw TypeError(".perfetto.protos.AndroidNetworkMetric.CorePacketStatistic.packetStatistic: object expected");
                        m.packetStatistic = $root.perfetto.protos.AndroidNetworkMetric.PacketStatistic.fromObject(d.packetStatistic);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a CorePacketStatistic message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.CorePacketStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.CorePacketStatistic} m CorePacketStatistic
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                CorePacketStatistic.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.id = 0;
                        d.packetStatistic = null;
                    }
                    if (m.id != null && m.hasOwnProperty("id")) {
                        d.id = m.id;
                    }
                    if (m.packetStatistic != null && m.hasOwnProperty("packetStatistic")) {
                        d.packetStatistic = $root.perfetto.protos.AndroidNetworkMetric.PacketStatistic.toObject(m.packetStatistic, o);
                    }
                    return d;
                };

                /**
                 * Converts this CorePacketStatistic to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidNetworkMetric.CorePacketStatistic
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                CorePacketStatistic.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return CorePacketStatistic;
            })();

            AndroidNetworkMetric.Rx = (function() {

                /**
                 * Properties of a Rx.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @interface IRx
                 * @property {perfetto.protos.AndroidNetworkMetric.IPacketStatistic|null} [total] Rx total
                 * @property {Array.<perfetto.protos.AndroidNetworkMetric.ICorePacketStatistic>|null} [core] Rx core
                 * @property {string|null} [groAggregationRatio] Rx groAggregationRatio
                 */

                /**
                 * Constructs a new Rx.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @classdesc Represents a Rx.
                 * @implements IRx
                 * @constructor
                 * @param {perfetto.protos.AndroidNetworkMetric.IRx=} [p] Properties to set
                 */
                function Rx(p) {
                    this.core = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Rx total.
                 * @member {perfetto.protos.AndroidNetworkMetric.IPacketStatistic|null|undefined} total
                 * @memberof perfetto.protos.AndroidNetworkMetric.Rx
                 * @instance
                 */
                Rx.prototype.total = null;

                /**
                 * Rx core.
                 * @member {Array.<perfetto.protos.AndroidNetworkMetric.ICorePacketStatistic>} core
                 * @memberof perfetto.protos.AndroidNetworkMetric.Rx
                 * @instance
                 */
                Rx.prototype.core = $util.emptyArray;

                /**
                 * Rx groAggregationRatio.
                 * @member {string} groAggregationRatio
                 * @memberof perfetto.protos.AndroidNetworkMetric.Rx
                 * @instance
                 */
                Rx.prototype.groAggregationRatio = "";

                /**
                 * Creates a new Rx instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidNetworkMetric.Rx
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.IRx=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidNetworkMetric.Rx} Rx instance
                 */
                Rx.create = function create(properties) {
                    return new Rx(properties);
                };

                /**
                 * Encodes the specified Rx message. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.Rx.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidNetworkMetric.Rx
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.IRx} m Rx message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Rx.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.total != null && Object.hasOwnProperty.call(m, "total"))
                        $root.perfetto.protos.AndroidNetworkMetric.PacketStatistic.encode(m.total, w.uint32(10).fork()).ldelim();
                    if (m.core != null && m.core.length) {
                        for (var i = 0; i < m.core.length; ++i)
                            $root.perfetto.protos.AndroidNetworkMetric.CorePacketStatistic.encode(m.core[i], w.uint32(18).fork()).ldelim();
                    }
                    if (m.groAggregationRatio != null && Object.hasOwnProperty.call(m, "groAggregationRatio"))
                        w.uint32(26).string(m.groAggregationRatio);
                    return w;
                };

                /**
                 * Encodes the specified Rx message, length delimited. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.Rx.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.Rx
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.IRx} message Rx message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Rx.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Rx message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidNetworkMetric.Rx
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidNetworkMetric.Rx} Rx
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Rx.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidNetworkMetric.Rx();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.total = $root.perfetto.protos.AndroidNetworkMetric.PacketStatistic.decode(r, r.uint32());
                            break;
                        case 2:
                            if (!(m.core && m.core.length))
                                m.core = [];
                            m.core.push($root.perfetto.protos.AndroidNetworkMetric.CorePacketStatistic.decode(r, r.uint32()));
                            break;
                        case 3:
                            m.groAggregationRatio = r.string();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Rx message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.Rx
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidNetworkMetric.Rx} Rx
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Rx.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Rx message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidNetworkMetric.Rx
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Rx.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.total != null && m.hasOwnProperty("total")) {
                        {
                            var e = $root.perfetto.protos.AndroidNetworkMetric.PacketStatistic.verify(m.total);
                            if (e)
                                return "total." + e;
                        }
                    }
                    if (m.core != null && m.hasOwnProperty("core")) {
                        if (!Array.isArray(m.core))
                            return "core: array expected";
                        for (var i = 0; i < m.core.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidNetworkMetric.CorePacketStatistic.verify(m.core[i]);
                                if (e)
                                    return "core." + e;
                            }
                        }
                    }
                    if (m.groAggregationRatio != null && m.hasOwnProperty("groAggregationRatio")) {
                        if (!$util.isString(m.groAggregationRatio))
                            return "groAggregationRatio: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a Rx message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.Rx
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidNetworkMetric.Rx} Rx
                 */
                Rx.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidNetworkMetric.Rx)
                        return d;
                    var m = new $root.perfetto.protos.AndroidNetworkMetric.Rx();
                    if (d.total != null) {
                        if (typeof d.total !== "object")
                            throw TypeError(".perfetto.protos.AndroidNetworkMetric.Rx.total: object expected");
                        m.total = $root.perfetto.protos.AndroidNetworkMetric.PacketStatistic.fromObject(d.total);
                    }
                    if (d.core) {
                        if (!Array.isArray(d.core))
                            throw TypeError(".perfetto.protos.AndroidNetworkMetric.Rx.core: array expected");
                        m.core = [];
                        for (var i = 0; i < d.core.length; ++i) {
                            if (typeof d.core[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidNetworkMetric.Rx.core: object expected");
                            m.core[i] = $root.perfetto.protos.AndroidNetworkMetric.CorePacketStatistic.fromObject(d.core[i]);
                        }
                    }
                    if (d.groAggregationRatio != null) {
                        m.groAggregationRatio = String(d.groAggregationRatio);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Rx message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.Rx
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.Rx} m Rx
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Rx.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.core = [];
                    }
                    if (o.defaults) {
                        d.total = null;
                        d.groAggregationRatio = "";
                    }
                    if (m.total != null && m.hasOwnProperty("total")) {
                        d.total = $root.perfetto.protos.AndroidNetworkMetric.PacketStatistic.toObject(m.total, o);
                    }
                    if (m.core && m.core.length) {
                        d.core = [];
                        for (var j = 0; j < m.core.length; ++j) {
                            d.core[j] = $root.perfetto.protos.AndroidNetworkMetric.CorePacketStatistic.toObject(m.core[j], o);
                        }
                    }
                    if (m.groAggregationRatio != null && m.hasOwnProperty("groAggregationRatio")) {
                        d.groAggregationRatio = m.groAggregationRatio;
                    }
                    return d;
                };

                /**
                 * Converts this Rx to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidNetworkMetric.Rx
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Rx.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Rx;
            })();

            AndroidNetworkMetric.Tx = (function() {

                /**
                 * Properties of a Tx.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @interface ITx
                 * @property {perfetto.protos.AndroidNetworkMetric.IPacketStatistic|null} [total] Tx total
                 * @property {Array.<perfetto.protos.AndroidNetworkMetric.ICorePacketStatistic>|null} [core] Tx core
                 */

                /**
                 * Constructs a new Tx.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @classdesc Represents a Tx.
                 * @implements ITx
                 * @constructor
                 * @param {perfetto.protos.AndroidNetworkMetric.ITx=} [p] Properties to set
                 */
                function Tx(p) {
                    this.core = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Tx total.
                 * @member {perfetto.protos.AndroidNetworkMetric.IPacketStatistic|null|undefined} total
                 * @memberof perfetto.protos.AndroidNetworkMetric.Tx
                 * @instance
                 */
                Tx.prototype.total = null;

                /**
                 * Tx core.
                 * @member {Array.<perfetto.protos.AndroidNetworkMetric.ICorePacketStatistic>} core
                 * @memberof perfetto.protos.AndroidNetworkMetric.Tx
                 * @instance
                 */
                Tx.prototype.core = $util.emptyArray;

                /**
                 * Creates a new Tx instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidNetworkMetric.Tx
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.ITx=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidNetworkMetric.Tx} Tx instance
                 */
                Tx.create = function create(properties) {
                    return new Tx(properties);
                };

                /**
                 * Encodes the specified Tx message. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.Tx.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidNetworkMetric.Tx
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.ITx} m Tx message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Tx.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.total != null && Object.hasOwnProperty.call(m, "total"))
                        $root.perfetto.protos.AndroidNetworkMetric.PacketStatistic.encode(m.total, w.uint32(10).fork()).ldelim();
                    if (m.core != null && m.core.length) {
                        for (var i = 0; i < m.core.length; ++i)
                            $root.perfetto.protos.AndroidNetworkMetric.CorePacketStatistic.encode(m.core[i], w.uint32(18).fork()).ldelim();
                    }
                    return w;
                };

                /**
                 * Encodes the specified Tx message, length delimited. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.Tx.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.Tx
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.ITx} message Tx message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Tx.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Tx message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidNetworkMetric.Tx
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidNetworkMetric.Tx} Tx
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Tx.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidNetworkMetric.Tx();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.total = $root.perfetto.protos.AndroidNetworkMetric.PacketStatistic.decode(r, r.uint32());
                            break;
                        case 2:
                            if (!(m.core && m.core.length))
                                m.core = [];
                            m.core.push($root.perfetto.protos.AndroidNetworkMetric.CorePacketStatistic.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Tx message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.Tx
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidNetworkMetric.Tx} Tx
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Tx.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Tx message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidNetworkMetric.Tx
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Tx.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.total != null && m.hasOwnProperty("total")) {
                        {
                            var e = $root.perfetto.protos.AndroidNetworkMetric.PacketStatistic.verify(m.total);
                            if (e)
                                return "total." + e;
                        }
                    }
                    if (m.core != null && m.hasOwnProperty("core")) {
                        if (!Array.isArray(m.core))
                            return "core: array expected";
                        for (var i = 0; i < m.core.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidNetworkMetric.CorePacketStatistic.verify(m.core[i]);
                                if (e)
                                    return "core." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates a Tx message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.Tx
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidNetworkMetric.Tx} Tx
                 */
                Tx.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidNetworkMetric.Tx)
                        return d;
                    var m = new $root.perfetto.protos.AndroidNetworkMetric.Tx();
                    if (d.total != null) {
                        if (typeof d.total !== "object")
                            throw TypeError(".perfetto.protos.AndroidNetworkMetric.Tx.total: object expected");
                        m.total = $root.perfetto.protos.AndroidNetworkMetric.PacketStatistic.fromObject(d.total);
                    }
                    if (d.core) {
                        if (!Array.isArray(d.core))
                            throw TypeError(".perfetto.protos.AndroidNetworkMetric.Tx.core: array expected");
                        m.core = [];
                        for (var i = 0; i < d.core.length; ++i) {
                            if (typeof d.core[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidNetworkMetric.Tx.core: object expected");
                            m.core[i] = $root.perfetto.protos.AndroidNetworkMetric.CorePacketStatistic.fromObject(d.core[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Tx message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.Tx
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.Tx} m Tx
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Tx.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.core = [];
                    }
                    if (o.defaults) {
                        d.total = null;
                    }
                    if (m.total != null && m.hasOwnProperty("total")) {
                        d.total = $root.perfetto.protos.AndroidNetworkMetric.PacketStatistic.toObject(m.total, o);
                    }
                    if (m.core && m.core.length) {
                        d.core = [];
                        for (var j = 0; j < m.core.length; ++j) {
                            d.core[j] = $root.perfetto.protos.AndroidNetworkMetric.CorePacketStatistic.toObject(m.core[j], o);
                        }
                    }
                    return d;
                };

                /**
                 * Converts this Tx to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidNetworkMetric.Tx
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Tx.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Tx;
            })();

            AndroidNetworkMetric.NetDevice = (function() {

                /**
                 * Properties of a NetDevice.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @interface INetDevice
                 * @property {string|null} [name] NetDevice name
                 * @property {perfetto.protos.AndroidNetworkMetric.IRx|null} [rx] NetDevice rx
                 * @property {perfetto.protos.AndroidNetworkMetric.ITx|null} [tx] NetDevice tx
                 */

                /**
                 * Constructs a new NetDevice.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @classdesc Represents a NetDevice.
                 * @implements INetDevice
                 * @constructor
                 * @param {perfetto.protos.AndroidNetworkMetric.INetDevice=} [p] Properties to set
                 */
                function NetDevice(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * NetDevice name.
                 * @member {string} name
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetDevice
                 * @instance
                 */
                NetDevice.prototype.name = "";

                /**
                 * NetDevice rx.
                 * @member {perfetto.protos.AndroidNetworkMetric.IRx|null|undefined} rx
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetDevice
                 * @instance
                 */
                NetDevice.prototype.rx = null;

                /**
                 * NetDevice tx.
                 * @member {perfetto.protos.AndroidNetworkMetric.ITx|null|undefined} tx
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetDevice
                 * @instance
                 */
                NetDevice.prototype.tx = null;

                /**
                 * Creates a new NetDevice instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetDevice
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.INetDevice=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidNetworkMetric.NetDevice} NetDevice instance
                 */
                NetDevice.create = function create(properties) {
                    return new NetDevice(properties);
                };

                /**
                 * Encodes the specified NetDevice message. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.NetDevice.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetDevice
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.INetDevice} m NetDevice message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                NetDevice.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(10).string(m.name);
                    if (m.rx != null && Object.hasOwnProperty.call(m, "rx"))
                        $root.perfetto.protos.AndroidNetworkMetric.Rx.encode(m.rx, w.uint32(18).fork()).ldelim();
                    if (m.tx != null && Object.hasOwnProperty.call(m, "tx"))
                        $root.perfetto.protos.AndroidNetworkMetric.Tx.encode(m.tx, w.uint32(26).fork()).ldelim();
                    return w;
                };

                /**
                 * Encodes the specified NetDevice message, length delimited. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.NetDevice.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetDevice
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.INetDevice} message NetDevice message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                NetDevice.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a NetDevice message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetDevice
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidNetworkMetric.NetDevice} NetDevice
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                NetDevice.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidNetworkMetric.NetDevice();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.name = r.string();
                            break;
                        case 2:
                            m.rx = $root.perfetto.protos.AndroidNetworkMetric.Rx.decode(r, r.uint32());
                            break;
                        case 3:
                            m.tx = $root.perfetto.protos.AndroidNetworkMetric.Tx.decode(r, r.uint32());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a NetDevice message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetDevice
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidNetworkMetric.NetDevice} NetDevice
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                NetDevice.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a NetDevice message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetDevice
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                NetDevice.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    if (m.rx != null && m.hasOwnProperty("rx")) {
                        {
                            var e = $root.perfetto.protos.AndroidNetworkMetric.Rx.verify(m.rx);
                            if (e)
                                return "rx." + e;
                        }
                    }
                    if (m.tx != null && m.hasOwnProperty("tx")) {
                        {
                            var e = $root.perfetto.protos.AndroidNetworkMetric.Tx.verify(m.tx);
                            if (e)
                                return "tx." + e;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a NetDevice message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetDevice
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidNetworkMetric.NetDevice} NetDevice
                 */
                NetDevice.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidNetworkMetric.NetDevice)
                        return d;
                    var m = new $root.perfetto.protos.AndroidNetworkMetric.NetDevice();
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    if (d.rx != null) {
                        if (typeof d.rx !== "object")
                            throw TypeError(".perfetto.protos.AndroidNetworkMetric.NetDevice.rx: object expected");
                        m.rx = $root.perfetto.protos.AndroidNetworkMetric.Rx.fromObject(d.rx);
                    }
                    if (d.tx != null) {
                        if (typeof d.tx !== "object")
                            throw TypeError(".perfetto.protos.AndroidNetworkMetric.NetDevice.tx: object expected");
                        m.tx = $root.perfetto.protos.AndroidNetworkMetric.Tx.fromObject(d.tx);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a NetDevice message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetDevice
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.NetDevice} m NetDevice
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                NetDevice.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.name = "";
                        d.rx = null;
                        d.tx = null;
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    if (m.rx != null && m.hasOwnProperty("rx")) {
                        d.rx = $root.perfetto.protos.AndroidNetworkMetric.Rx.toObject(m.rx, o);
                    }
                    if (m.tx != null && m.hasOwnProperty("tx")) {
                        d.tx = $root.perfetto.protos.AndroidNetworkMetric.Tx.toObject(m.tx, o);
                    }
                    return d;
                };

                /**
                 * Converts this NetDevice to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetDevice
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                NetDevice.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return NetDevice;
            })();

            AndroidNetworkMetric.NetRxActionStatistic = (function() {

                /**
                 * Properties of a NetRxActionStatistic.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @interface INetRxActionStatistic
                 * @property {number|null} [count] NetRxActionStatistic count
                 * @property {number|null} [runtimeMs] NetRxActionStatistic runtimeMs
                 * @property {number|null} [avgRuntimeMs] NetRxActionStatistic avgRuntimeMs
                 * @property {number|null} [mcycles] NetRxActionStatistic mcycles
                 * @property {number|null} [avgFreqKhz] NetRxActionStatistic avgFreqKhz
                 */

                /**
                 * Constructs a new NetRxActionStatistic.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @classdesc Represents a NetRxActionStatistic.
                 * @implements INetRxActionStatistic
                 * @constructor
                 * @param {perfetto.protos.AndroidNetworkMetric.INetRxActionStatistic=} [p] Properties to set
                 */
                function NetRxActionStatistic(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * NetRxActionStatistic count.
                 * @member {number} count
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic
                 * @instance
                 */
                NetRxActionStatistic.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * NetRxActionStatistic runtimeMs.
                 * @member {number} runtimeMs
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic
                 * @instance
                 */
                NetRxActionStatistic.prototype.runtimeMs = 0;

                /**
                 * NetRxActionStatistic avgRuntimeMs.
                 * @member {number} avgRuntimeMs
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic
                 * @instance
                 */
                NetRxActionStatistic.prototype.avgRuntimeMs = 0;

                /**
                 * NetRxActionStatistic mcycles.
                 * @member {number} mcycles
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic
                 * @instance
                 */
                NetRxActionStatistic.prototype.mcycles = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * NetRxActionStatistic avgFreqKhz.
                 * @member {number} avgFreqKhz
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic
                 * @instance
                 */
                NetRxActionStatistic.prototype.avgFreqKhz = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new NetRxActionStatistic instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.INetRxActionStatistic=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic} NetRxActionStatistic instance
                 */
                NetRxActionStatistic.create = function create(properties) {
                    return new NetRxActionStatistic(properties);
                };

                /**
                 * Encodes the specified NetRxActionStatistic message. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.INetRxActionStatistic} m NetRxActionStatistic message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                NetRxActionStatistic.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.count != null && Object.hasOwnProperty.call(m, "count"))
                        w.uint32(8).int64(m.count);
                    if (m.runtimeMs != null && Object.hasOwnProperty.call(m, "runtimeMs"))
                        w.uint32(17).double(m.runtimeMs);
                    if (m.avgRuntimeMs != null && Object.hasOwnProperty.call(m, "avgRuntimeMs"))
                        w.uint32(25).double(m.avgRuntimeMs);
                    if (m.mcycles != null && Object.hasOwnProperty.call(m, "mcycles"))
                        w.uint32(32).int64(m.mcycles);
                    if (m.avgFreqKhz != null && Object.hasOwnProperty.call(m, "avgFreqKhz"))
                        w.uint32(40).int64(m.avgFreqKhz);
                    return w;
                };

                /**
                 * Encodes the specified NetRxActionStatistic message, length delimited. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.INetRxActionStatistic} message NetRxActionStatistic message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                NetRxActionStatistic.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a NetRxActionStatistic message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic} NetRxActionStatistic
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                NetRxActionStatistic.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.count = r.int64();
                            break;
                        case 2:
                            m.runtimeMs = r.double();
                            break;
                        case 3:
                            m.avgRuntimeMs = r.double();
                            break;
                        case 4:
                            m.mcycles = r.int64();
                            break;
                        case 5:
                            m.avgFreqKhz = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a NetRxActionStatistic message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic} NetRxActionStatistic
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                NetRxActionStatistic.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a NetRxActionStatistic message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                NetRxActionStatistic.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.count != null && m.hasOwnProperty("count")) {
                        if (!$util.isInteger(m.count) && !(m.count && $util.isInteger(m.count.low) && $util.isInteger(m.count.high)))
                            return "count: integer|Long expected";
                    }
                    if (m.runtimeMs != null && m.hasOwnProperty("runtimeMs")) {
                        if (typeof m.runtimeMs !== "number")
                            return "runtimeMs: number expected";
                    }
                    if (m.avgRuntimeMs != null && m.hasOwnProperty("avgRuntimeMs")) {
                        if (typeof m.avgRuntimeMs !== "number")
                            return "avgRuntimeMs: number expected";
                    }
                    if (m.mcycles != null && m.hasOwnProperty("mcycles")) {
                        if (!$util.isInteger(m.mcycles) && !(m.mcycles && $util.isInteger(m.mcycles.low) && $util.isInteger(m.mcycles.high)))
                            return "mcycles: integer|Long expected";
                    }
                    if (m.avgFreqKhz != null && m.hasOwnProperty("avgFreqKhz")) {
                        if (!$util.isInteger(m.avgFreqKhz) && !(m.avgFreqKhz && $util.isInteger(m.avgFreqKhz.low) && $util.isInteger(m.avgFreqKhz.high)))
                            return "avgFreqKhz: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a NetRxActionStatistic message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic} NetRxActionStatistic
                 */
                NetRxActionStatistic.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic)
                        return d;
                    var m = new $root.perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic();
                    if (d.count != null) {
                        if ($util.Long)
                            (m.count = $util.Long.fromValue(d.count)).unsigned = false;
                        else if (typeof d.count === "string")
                            m.count = parseInt(d.count, 10);
                        else if (typeof d.count === "number")
                            m.count = d.count;
                        else if (typeof d.count === "object")
                            m.count = new $util.LongBits(d.count.low >>> 0, d.count.high >>> 0).toNumber();
                    }
                    if (d.runtimeMs != null) {
                        m.runtimeMs = Number(d.runtimeMs);
                    }
                    if (d.avgRuntimeMs != null) {
                        m.avgRuntimeMs = Number(d.avgRuntimeMs);
                    }
                    if (d.mcycles != null) {
                        if ($util.Long)
                            (m.mcycles = $util.Long.fromValue(d.mcycles)).unsigned = false;
                        else if (typeof d.mcycles === "string")
                            m.mcycles = parseInt(d.mcycles, 10);
                        else if (typeof d.mcycles === "number")
                            m.mcycles = d.mcycles;
                        else if (typeof d.mcycles === "object")
                            m.mcycles = new $util.LongBits(d.mcycles.low >>> 0, d.mcycles.high >>> 0).toNumber();
                    }
                    if (d.avgFreqKhz != null) {
                        if ($util.Long)
                            (m.avgFreqKhz = $util.Long.fromValue(d.avgFreqKhz)).unsigned = false;
                        else if (typeof d.avgFreqKhz === "string")
                            m.avgFreqKhz = parseInt(d.avgFreqKhz, 10);
                        else if (typeof d.avgFreqKhz === "number")
                            m.avgFreqKhz = d.avgFreqKhz;
                        else if (typeof d.avgFreqKhz === "object")
                            m.avgFreqKhz = new $util.LongBits(d.avgFreqKhz.low >>> 0, d.avgFreqKhz.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a NetRxActionStatistic message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic} m NetRxActionStatistic
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                NetRxActionStatistic.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.count = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.count = o.longs === String ? "0" : 0;
                        d.runtimeMs = 0;
                        d.avgRuntimeMs = 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.mcycles = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.mcycles = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.avgFreqKhz = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.avgFreqKhz = o.longs === String ? "0" : 0;
                    }
                    if (m.count != null && m.hasOwnProperty("count")) {
                        if (typeof m.count === "number")
                            d.count = o.longs === String ? String(m.count) : m.count;
                        else
                            d.count = o.longs === String ? $util.Long.prototype.toString.call(m.count) : o.longs === Number ? new $util.LongBits(m.count.low >>> 0, m.count.high >>> 0).toNumber() : m.count;
                    }
                    if (m.runtimeMs != null && m.hasOwnProperty("runtimeMs")) {
                        d.runtimeMs = o.json && !isFinite(m.runtimeMs) ? String(m.runtimeMs) : m.runtimeMs;
                    }
                    if (m.avgRuntimeMs != null && m.hasOwnProperty("avgRuntimeMs")) {
                        d.avgRuntimeMs = o.json && !isFinite(m.avgRuntimeMs) ? String(m.avgRuntimeMs) : m.avgRuntimeMs;
                    }
                    if (m.mcycles != null && m.hasOwnProperty("mcycles")) {
                        if (typeof m.mcycles === "number")
                            d.mcycles = o.longs === String ? String(m.mcycles) : m.mcycles;
                        else
                            d.mcycles = o.longs === String ? $util.Long.prototype.toString.call(m.mcycles) : o.longs === Number ? new $util.LongBits(m.mcycles.low >>> 0, m.mcycles.high >>> 0).toNumber() : m.mcycles;
                    }
                    if (m.avgFreqKhz != null && m.hasOwnProperty("avgFreqKhz")) {
                        if (typeof m.avgFreqKhz === "number")
                            d.avgFreqKhz = o.longs === String ? String(m.avgFreqKhz) : m.avgFreqKhz;
                        else
                            d.avgFreqKhz = o.longs === String ? $util.Long.prototype.toString.call(m.avgFreqKhz) : o.longs === Number ? new $util.LongBits(m.avgFreqKhz.low >>> 0, m.avgFreqKhz.high >>> 0).toNumber() : m.avgFreqKhz;
                    }
                    return d;
                };

                /**
                 * Converts this NetRxActionStatistic to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                NetRxActionStatistic.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return NetRxActionStatistic;
            })();

            AndroidNetworkMetric.NetTxActionStatistic = (function() {

                /**
                 * Properties of a NetTxActionStatistic.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @interface INetTxActionStatistic
                 * @property {number|null} [count] NetTxActionStatistic count
                 * @property {number|null} [runtimeMs] NetTxActionStatistic runtimeMs
                 * @property {number|null} [avgRuntimeMs] NetTxActionStatistic avgRuntimeMs
                 * @property {number|null} [mcycles] NetTxActionStatistic mcycles
                 * @property {number|null} [avgFreqKhz] NetTxActionStatistic avgFreqKhz
                 */

                /**
                 * Constructs a new NetTxActionStatistic.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @classdesc Represents a NetTxActionStatistic.
                 * @implements INetTxActionStatistic
                 * @constructor
                 * @param {perfetto.protos.AndroidNetworkMetric.INetTxActionStatistic=} [p] Properties to set
                 */
                function NetTxActionStatistic(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * NetTxActionStatistic count.
                 * @member {number} count
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic
                 * @instance
                 */
                NetTxActionStatistic.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * NetTxActionStatistic runtimeMs.
                 * @member {number} runtimeMs
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic
                 * @instance
                 */
                NetTxActionStatistic.prototype.runtimeMs = 0;

                /**
                 * NetTxActionStatistic avgRuntimeMs.
                 * @member {number} avgRuntimeMs
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic
                 * @instance
                 */
                NetTxActionStatistic.prototype.avgRuntimeMs = 0;

                /**
                 * NetTxActionStatistic mcycles.
                 * @member {number} mcycles
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic
                 * @instance
                 */
                NetTxActionStatistic.prototype.mcycles = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * NetTxActionStatistic avgFreqKhz.
                 * @member {number} avgFreqKhz
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic
                 * @instance
                 */
                NetTxActionStatistic.prototype.avgFreqKhz = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new NetTxActionStatistic instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.INetTxActionStatistic=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic} NetTxActionStatistic instance
                 */
                NetTxActionStatistic.create = function create(properties) {
                    return new NetTxActionStatistic(properties);
                };

                /**
                 * Encodes the specified NetTxActionStatistic message. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.INetTxActionStatistic} m NetTxActionStatistic message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                NetTxActionStatistic.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.count != null && Object.hasOwnProperty.call(m, "count"))
                        w.uint32(8).int64(m.count);
                    if (m.runtimeMs != null && Object.hasOwnProperty.call(m, "runtimeMs"))
                        w.uint32(17).double(m.runtimeMs);
                    if (m.avgRuntimeMs != null && Object.hasOwnProperty.call(m, "avgRuntimeMs"))
                        w.uint32(25).double(m.avgRuntimeMs);
                    if (m.mcycles != null && Object.hasOwnProperty.call(m, "mcycles"))
                        w.uint32(32).int64(m.mcycles);
                    if (m.avgFreqKhz != null && Object.hasOwnProperty.call(m, "avgFreqKhz"))
                        w.uint32(40).int64(m.avgFreqKhz);
                    return w;
                };

                /**
                 * Encodes the specified NetTxActionStatistic message, length delimited. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.INetTxActionStatistic} message NetTxActionStatistic message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                NetTxActionStatistic.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a NetTxActionStatistic message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic} NetTxActionStatistic
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                NetTxActionStatistic.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.count = r.int64();
                            break;
                        case 2:
                            m.runtimeMs = r.double();
                            break;
                        case 3:
                            m.avgRuntimeMs = r.double();
                            break;
                        case 4:
                            m.mcycles = r.int64();
                            break;
                        case 5:
                            m.avgFreqKhz = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a NetTxActionStatistic message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic} NetTxActionStatistic
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                NetTxActionStatistic.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a NetTxActionStatistic message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                NetTxActionStatistic.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.count != null && m.hasOwnProperty("count")) {
                        if (!$util.isInteger(m.count) && !(m.count && $util.isInteger(m.count.low) && $util.isInteger(m.count.high)))
                            return "count: integer|Long expected";
                    }
                    if (m.runtimeMs != null && m.hasOwnProperty("runtimeMs")) {
                        if (typeof m.runtimeMs !== "number")
                            return "runtimeMs: number expected";
                    }
                    if (m.avgRuntimeMs != null && m.hasOwnProperty("avgRuntimeMs")) {
                        if (typeof m.avgRuntimeMs !== "number")
                            return "avgRuntimeMs: number expected";
                    }
                    if (m.mcycles != null && m.hasOwnProperty("mcycles")) {
                        if (!$util.isInteger(m.mcycles) && !(m.mcycles && $util.isInteger(m.mcycles.low) && $util.isInteger(m.mcycles.high)))
                            return "mcycles: integer|Long expected";
                    }
                    if (m.avgFreqKhz != null && m.hasOwnProperty("avgFreqKhz")) {
                        if (!$util.isInteger(m.avgFreqKhz) && !(m.avgFreqKhz && $util.isInteger(m.avgFreqKhz.low) && $util.isInteger(m.avgFreqKhz.high)))
                            return "avgFreqKhz: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a NetTxActionStatistic message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic} NetTxActionStatistic
                 */
                NetTxActionStatistic.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic)
                        return d;
                    var m = new $root.perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic();
                    if (d.count != null) {
                        if ($util.Long)
                            (m.count = $util.Long.fromValue(d.count)).unsigned = false;
                        else if (typeof d.count === "string")
                            m.count = parseInt(d.count, 10);
                        else if (typeof d.count === "number")
                            m.count = d.count;
                        else if (typeof d.count === "object")
                            m.count = new $util.LongBits(d.count.low >>> 0, d.count.high >>> 0).toNumber();
                    }
                    if (d.runtimeMs != null) {
                        m.runtimeMs = Number(d.runtimeMs);
                    }
                    if (d.avgRuntimeMs != null) {
                        m.avgRuntimeMs = Number(d.avgRuntimeMs);
                    }
                    if (d.mcycles != null) {
                        if ($util.Long)
                            (m.mcycles = $util.Long.fromValue(d.mcycles)).unsigned = false;
                        else if (typeof d.mcycles === "string")
                            m.mcycles = parseInt(d.mcycles, 10);
                        else if (typeof d.mcycles === "number")
                            m.mcycles = d.mcycles;
                        else if (typeof d.mcycles === "object")
                            m.mcycles = new $util.LongBits(d.mcycles.low >>> 0, d.mcycles.high >>> 0).toNumber();
                    }
                    if (d.avgFreqKhz != null) {
                        if ($util.Long)
                            (m.avgFreqKhz = $util.Long.fromValue(d.avgFreqKhz)).unsigned = false;
                        else if (typeof d.avgFreqKhz === "string")
                            m.avgFreqKhz = parseInt(d.avgFreqKhz, 10);
                        else if (typeof d.avgFreqKhz === "number")
                            m.avgFreqKhz = d.avgFreqKhz;
                        else if (typeof d.avgFreqKhz === "object")
                            m.avgFreqKhz = new $util.LongBits(d.avgFreqKhz.low >>> 0, d.avgFreqKhz.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a NetTxActionStatistic message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic} m NetTxActionStatistic
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                NetTxActionStatistic.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.count = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.count = o.longs === String ? "0" : 0;
                        d.runtimeMs = 0;
                        d.avgRuntimeMs = 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.mcycles = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.mcycles = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.avgFreqKhz = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.avgFreqKhz = o.longs === String ? "0" : 0;
                    }
                    if (m.count != null && m.hasOwnProperty("count")) {
                        if (typeof m.count === "number")
                            d.count = o.longs === String ? String(m.count) : m.count;
                        else
                            d.count = o.longs === String ? $util.Long.prototype.toString.call(m.count) : o.longs === Number ? new $util.LongBits(m.count.low >>> 0, m.count.high >>> 0).toNumber() : m.count;
                    }
                    if (m.runtimeMs != null && m.hasOwnProperty("runtimeMs")) {
                        d.runtimeMs = o.json && !isFinite(m.runtimeMs) ? String(m.runtimeMs) : m.runtimeMs;
                    }
                    if (m.avgRuntimeMs != null && m.hasOwnProperty("avgRuntimeMs")) {
                        d.avgRuntimeMs = o.json && !isFinite(m.avgRuntimeMs) ? String(m.avgRuntimeMs) : m.avgRuntimeMs;
                    }
                    if (m.mcycles != null && m.hasOwnProperty("mcycles")) {
                        if (typeof m.mcycles === "number")
                            d.mcycles = o.longs === String ? String(m.mcycles) : m.mcycles;
                        else
                            d.mcycles = o.longs === String ? $util.Long.prototype.toString.call(m.mcycles) : o.longs === Number ? new $util.LongBits(m.mcycles.low >>> 0, m.mcycles.high >>> 0).toNumber() : m.mcycles;
                    }
                    if (m.avgFreqKhz != null && m.hasOwnProperty("avgFreqKhz")) {
                        if (typeof m.avgFreqKhz === "number")
                            d.avgFreqKhz = o.longs === String ? String(m.avgFreqKhz) : m.avgFreqKhz;
                        else
                            d.avgFreqKhz = o.longs === String ? $util.Long.prototype.toString.call(m.avgFreqKhz) : o.longs === Number ? new $util.LongBits(m.avgFreqKhz.low >>> 0, m.avgFreqKhz.high >>> 0).toNumber() : m.avgFreqKhz;
                    }
                    return d;
                };

                /**
                 * Converts this NetTxActionStatistic to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                NetTxActionStatistic.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return NetTxActionStatistic;
            })();

            AndroidNetworkMetric.IpiActionStatistic = (function() {

                /**
                 * Properties of an IpiActionStatistic.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @interface IIpiActionStatistic
                 * @property {number|null} [count] IpiActionStatistic count
                 * @property {number|null} [runtimeMs] IpiActionStatistic runtimeMs
                 * @property {number|null} [avgRuntimeMs] IpiActionStatistic avgRuntimeMs
                 */

                /**
                 * Constructs a new IpiActionStatistic.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @classdesc Represents an IpiActionStatistic.
                 * @implements IIpiActionStatistic
                 * @constructor
                 * @param {perfetto.protos.AndroidNetworkMetric.IIpiActionStatistic=} [p] Properties to set
                 */
                function IpiActionStatistic(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * IpiActionStatistic count.
                 * @member {number} count
                 * @memberof perfetto.protos.AndroidNetworkMetric.IpiActionStatistic
                 * @instance
                 */
                IpiActionStatistic.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * IpiActionStatistic runtimeMs.
                 * @member {number} runtimeMs
                 * @memberof perfetto.protos.AndroidNetworkMetric.IpiActionStatistic
                 * @instance
                 */
                IpiActionStatistic.prototype.runtimeMs = 0;

                /**
                 * IpiActionStatistic avgRuntimeMs.
                 * @member {number} avgRuntimeMs
                 * @memberof perfetto.protos.AndroidNetworkMetric.IpiActionStatistic
                 * @instance
                 */
                IpiActionStatistic.prototype.avgRuntimeMs = 0;

                /**
                 * Creates a new IpiActionStatistic instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidNetworkMetric.IpiActionStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.IIpiActionStatistic=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidNetworkMetric.IpiActionStatistic} IpiActionStatistic instance
                 */
                IpiActionStatistic.create = function create(properties) {
                    return new IpiActionStatistic(properties);
                };

                /**
                 * Encodes the specified IpiActionStatistic message. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.IpiActionStatistic.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidNetworkMetric.IpiActionStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.IIpiActionStatistic} m IpiActionStatistic message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                IpiActionStatistic.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.count != null && Object.hasOwnProperty.call(m, "count"))
                        w.uint32(8).int64(m.count);
                    if (m.runtimeMs != null && Object.hasOwnProperty.call(m, "runtimeMs"))
                        w.uint32(17).double(m.runtimeMs);
                    if (m.avgRuntimeMs != null && Object.hasOwnProperty.call(m, "avgRuntimeMs"))
                        w.uint32(25).double(m.avgRuntimeMs);
                    return w;
                };

                /**
                 * Encodes the specified IpiActionStatistic message, length delimited. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.IpiActionStatistic.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.IpiActionStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.IIpiActionStatistic} message IpiActionStatistic message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                IpiActionStatistic.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an IpiActionStatistic message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidNetworkMetric.IpiActionStatistic
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidNetworkMetric.IpiActionStatistic} IpiActionStatistic
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                IpiActionStatistic.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidNetworkMetric.IpiActionStatistic();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.count = r.int64();
                            break;
                        case 2:
                            m.runtimeMs = r.double();
                            break;
                        case 3:
                            m.avgRuntimeMs = r.double();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an IpiActionStatistic message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.IpiActionStatistic
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidNetworkMetric.IpiActionStatistic} IpiActionStatistic
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                IpiActionStatistic.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an IpiActionStatistic message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidNetworkMetric.IpiActionStatistic
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                IpiActionStatistic.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.count != null && m.hasOwnProperty("count")) {
                        if (!$util.isInteger(m.count) && !(m.count && $util.isInteger(m.count.low) && $util.isInteger(m.count.high)))
                            return "count: integer|Long expected";
                    }
                    if (m.runtimeMs != null && m.hasOwnProperty("runtimeMs")) {
                        if (typeof m.runtimeMs !== "number")
                            return "runtimeMs: number expected";
                    }
                    if (m.avgRuntimeMs != null && m.hasOwnProperty("avgRuntimeMs")) {
                        if (typeof m.avgRuntimeMs !== "number")
                            return "avgRuntimeMs: number expected";
                    }
                    return null;
                };

                /**
                 * Creates an IpiActionStatistic message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.IpiActionStatistic
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidNetworkMetric.IpiActionStatistic} IpiActionStatistic
                 */
                IpiActionStatistic.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidNetworkMetric.IpiActionStatistic)
                        return d;
                    var m = new $root.perfetto.protos.AndroidNetworkMetric.IpiActionStatistic();
                    if (d.count != null) {
                        if ($util.Long)
                            (m.count = $util.Long.fromValue(d.count)).unsigned = false;
                        else if (typeof d.count === "string")
                            m.count = parseInt(d.count, 10);
                        else if (typeof d.count === "number")
                            m.count = d.count;
                        else if (typeof d.count === "object")
                            m.count = new $util.LongBits(d.count.low >>> 0, d.count.high >>> 0).toNumber();
                    }
                    if (d.runtimeMs != null) {
                        m.runtimeMs = Number(d.runtimeMs);
                    }
                    if (d.avgRuntimeMs != null) {
                        m.avgRuntimeMs = Number(d.avgRuntimeMs);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an IpiActionStatistic message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.IpiActionStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.IpiActionStatistic} m IpiActionStatistic
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                IpiActionStatistic.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.count = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.count = o.longs === String ? "0" : 0;
                        d.runtimeMs = 0;
                        d.avgRuntimeMs = 0;
                    }
                    if (m.count != null && m.hasOwnProperty("count")) {
                        if (typeof m.count === "number")
                            d.count = o.longs === String ? String(m.count) : m.count;
                        else
                            d.count = o.longs === String ? $util.Long.prototype.toString.call(m.count) : o.longs === Number ? new $util.LongBits(m.count.low >>> 0, m.count.high >>> 0).toNumber() : m.count;
                    }
                    if (m.runtimeMs != null && m.hasOwnProperty("runtimeMs")) {
                        d.runtimeMs = o.json && !isFinite(m.runtimeMs) ? String(m.runtimeMs) : m.runtimeMs;
                    }
                    if (m.avgRuntimeMs != null && m.hasOwnProperty("avgRuntimeMs")) {
                        d.avgRuntimeMs = o.json && !isFinite(m.avgRuntimeMs) ? String(m.avgRuntimeMs) : m.avgRuntimeMs;
                    }
                    return d;
                };

                /**
                 * Converts this IpiActionStatistic to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidNetworkMetric.IpiActionStatistic
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                IpiActionStatistic.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return IpiActionStatistic;
            })();

            AndroidNetworkMetric.CoreNetRxActionStatistic = (function() {

                /**
                 * Properties of a CoreNetRxActionStatistic.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @interface ICoreNetRxActionStatistic
                 * @property {number|null} [id] CoreNetRxActionStatistic id
                 * @property {perfetto.protos.AndroidNetworkMetric.INetRxActionStatistic|null} [netRxActionStatistic] CoreNetRxActionStatistic netRxActionStatistic
                 */

                /**
                 * Constructs a new CoreNetRxActionStatistic.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @classdesc Represents a CoreNetRxActionStatistic.
                 * @implements ICoreNetRxActionStatistic
                 * @constructor
                 * @param {perfetto.protos.AndroidNetworkMetric.ICoreNetRxActionStatistic=} [p] Properties to set
                 */
                function CoreNetRxActionStatistic(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * CoreNetRxActionStatistic id.
                 * @member {number} id
                 * @memberof perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic
                 * @instance
                 */
                CoreNetRxActionStatistic.prototype.id = 0;

                /**
                 * CoreNetRxActionStatistic netRxActionStatistic.
                 * @member {perfetto.protos.AndroidNetworkMetric.INetRxActionStatistic|null|undefined} netRxActionStatistic
                 * @memberof perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic
                 * @instance
                 */
                CoreNetRxActionStatistic.prototype.netRxActionStatistic = null;

                /**
                 * Creates a new CoreNetRxActionStatistic instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.ICoreNetRxActionStatistic=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic} CoreNetRxActionStatistic instance
                 */
                CoreNetRxActionStatistic.create = function create(properties) {
                    return new CoreNetRxActionStatistic(properties);
                };

                /**
                 * Encodes the specified CoreNetRxActionStatistic message. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.ICoreNetRxActionStatistic} m CoreNetRxActionStatistic message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CoreNetRxActionStatistic.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.id != null && Object.hasOwnProperty.call(m, "id"))
                        w.uint32(8).uint32(m.id);
                    if (m.netRxActionStatistic != null && Object.hasOwnProperty.call(m, "netRxActionStatistic"))
                        $root.perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic.encode(m.netRxActionStatistic, w.uint32(18).fork()).ldelim();
                    return w;
                };

                /**
                 * Encodes the specified CoreNetRxActionStatistic message, length delimited. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.ICoreNetRxActionStatistic} message CoreNetRxActionStatistic message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CoreNetRxActionStatistic.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a CoreNetRxActionStatistic message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic} CoreNetRxActionStatistic
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CoreNetRxActionStatistic.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.id = r.uint32();
                            break;
                        case 2:
                            m.netRxActionStatistic = $root.perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic.decode(r, r.uint32());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a CoreNetRxActionStatistic message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic} CoreNetRxActionStatistic
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CoreNetRxActionStatistic.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a CoreNetRxActionStatistic message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                CoreNetRxActionStatistic.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.id != null && m.hasOwnProperty("id")) {
                        if (!$util.isInteger(m.id))
                            return "id: integer expected";
                    }
                    if (m.netRxActionStatistic != null && m.hasOwnProperty("netRxActionStatistic")) {
                        {
                            var e = $root.perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic.verify(m.netRxActionStatistic);
                            if (e)
                                return "netRxActionStatistic." + e;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a CoreNetRxActionStatistic message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic} CoreNetRxActionStatistic
                 */
                CoreNetRxActionStatistic.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic)
                        return d;
                    var m = new $root.perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic();
                    if (d.id != null) {
                        m.id = d.id >>> 0;
                    }
                    if (d.netRxActionStatistic != null) {
                        if (typeof d.netRxActionStatistic !== "object")
                            throw TypeError(".perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic.netRxActionStatistic: object expected");
                        m.netRxActionStatistic = $root.perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic.fromObject(d.netRxActionStatistic);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a CoreNetRxActionStatistic message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic} m CoreNetRxActionStatistic
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                CoreNetRxActionStatistic.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.id = 0;
                        d.netRxActionStatistic = null;
                    }
                    if (m.id != null && m.hasOwnProperty("id")) {
                        d.id = m.id;
                    }
                    if (m.netRxActionStatistic != null && m.hasOwnProperty("netRxActionStatistic")) {
                        d.netRxActionStatistic = $root.perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic.toObject(m.netRxActionStatistic, o);
                    }
                    return d;
                };

                /**
                 * Converts this CoreNetRxActionStatistic to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                CoreNetRxActionStatistic.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return CoreNetRxActionStatistic;
            })();

            AndroidNetworkMetric.CoreNetTxActionStatistic = (function() {

                /**
                 * Properties of a CoreNetTxActionStatistic.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @interface ICoreNetTxActionStatistic
                 * @property {number|null} [id] CoreNetTxActionStatistic id
                 * @property {perfetto.protos.AndroidNetworkMetric.INetTxActionStatistic|null} [netTxActionStatistic] CoreNetTxActionStatistic netTxActionStatistic
                 */

                /**
                 * Constructs a new CoreNetTxActionStatistic.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @classdesc Represents a CoreNetTxActionStatistic.
                 * @implements ICoreNetTxActionStatistic
                 * @constructor
                 * @param {perfetto.protos.AndroidNetworkMetric.ICoreNetTxActionStatistic=} [p] Properties to set
                 */
                function CoreNetTxActionStatistic(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * CoreNetTxActionStatistic id.
                 * @member {number} id
                 * @memberof perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic
                 * @instance
                 */
                CoreNetTxActionStatistic.prototype.id = 0;

                /**
                 * CoreNetTxActionStatistic netTxActionStatistic.
                 * @member {perfetto.protos.AndroidNetworkMetric.INetTxActionStatistic|null|undefined} netTxActionStatistic
                 * @memberof perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic
                 * @instance
                 */
                CoreNetTxActionStatistic.prototype.netTxActionStatistic = null;

                /**
                 * Creates a new CoreNetTxActionStatistic instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.ICoreNetTxActionStatistic=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic} CoreNetTxActionStatistic instance
                 */
                CoreNetTxActionStatistic.create = function create(properties) {
                    return new CoreNetTxActionStatistic(properties);
                };

                /**
                 * Encodes the specified CoreNetTxActionStatistic message. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.ICoreNetTxActionStatistic} m CoreNetTxActionStatistic message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CoreNetTxActionStatistic.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.id != null && Object.hasOwnProperty.call(m, "id"))
                        w.uint32(8).uint32(m.id);
                    if (m.netTxActionStatistic != null && Object.hasOwnProperty.call(m, "netTxActionStatistic"))
                        $root.perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic.encode(m.netTxActionStatistic, w.uint32(18).fork()).ldelim();
                    return w;
                };

                /**
                 * Encodes the specified CoreNetTxActionStatistic message, length delimited. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.ICoreNetTxActionStatistic} message CoreNetTxActionStatistic message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CoreNetTxActionStatistic.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a CoreNetTxActionStatistic message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic} CoreNetTxActionStatistic
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CoreNetTxActionStatistic.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.id = r.uint32();
                            break;
                        case 2:
                            m.netTxActionStatistic = $root.perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic.decode(r, r.uint32());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a CoreNetTxActionStatistic message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic} CoreNetTxActionStatistic
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CoreNetTxActionStatistic.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a CoreNetTxActionStatistic message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                CoreNetTxActionStatistic.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.id != null && m.hasOwnProperty("id")) {
                        if (!$util.isInteger(m.id))
                            return "id: integer expected";
                    }
                    if (m.netTxActionStatistic != null && m.hasOwnProperty("netTxActionStatistic")) {
                        {
                            var e = $root.perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic.verify(m.netTxActionStatistic);
                            if (e)
                                return "netTxActionStatistic." + e;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a CoreNetTxActionStatistic message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic} CoreNetTxActionStatistic
                 */
                CoreNetTxActionStatistic.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic)
                        return d;
                    var m = new $root.perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic();
                    if (d.id != null) {
                        m.id = d.id >>> 0;
                    }
                    if (d.netTxActionStatistic != null) {
                        if (typeof d.netTxActionStatistic !== "object")
                            throw TypeError(".perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic.netTxActionStatistic: object expected");
                        m.netTxActionStatistic = $root.perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic.fromObject(d.netTxActionStatistic);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a CoreNetTxActionStatistic message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic} m CoreNetTxActionStatistic
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                CoreNetTxActionStatistic.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.id = 0;
                        d.netTxActionStatistic = null;
                    }
                    if (m.id != null && m.hasOwnProperty("id")) {
                        d.id = m.id;
                    }
                    if (m.netTxActionStatistic != null && m.hasOwnProperty("netTxActionStatistic")) {
                        d.netTxActionStatistic = $root.perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic.toObject(m.netTxActionStatistic, o);
                    }
                    return d;
                };

                /**
                 * Converts this CoreNetTxActionStatistic to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                CoreNetTxActionStatistic.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return CoreNetTxActionStatistic;
            })();

            AndroidNetworkMetric.NetRxAction = (function() {

                /**
                 * Properties of a NetRxAction.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @interface INetRxAction
                 * @property {perfetto.protos.AndroidNetworkMetric.INetRxActionStatistic|null} [total] NetRxAction total
                 * @property {Array.<perfetto.protos.AndroidNetworkMetric.ICoreNetRxActionStatistic>|null} [core] NetRxAction core
                 * @property {number|null} [avgInterstackLatencyMs] NetRxAction avgInterstackLatencyMs
                 */

                /**
                 * Constructs a new NetRxAction.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @classdesc Represents a NetRxAction.
                 * @implements INetRxAction
                 * @constructor
                 * @param {perfetto.protos.AndroidNetworkMetric.INetRxAction=} [p] Properties to set
                 */
                function NetRxAction(p) {
                    this.core = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * NetRxAction total.
                 * @member {perfetto.protos.AndroidNetworkMetric.INetRxActionStatistic|null|undefined} total
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxAction
                 * @instance
                 */
                NetRxAction.prototype.total = null;

                /**
                 * NetRxAction core.
                 * @member {Array.<perfetto.protos.AndroidNetworkMetric.ICoreNetRxActionStatistic>} core
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxAction
                 * @instance
                 */
                NetRxAction.prototype.core = $util.emptyArray;

                /**
                 * NetRxAction avgInterstackLatencyMs.
                 * @member {number} avgInterstackLatencyMs
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxAction
                 * @instance
                 */
                NetRxAction.prototype.avgInterstackLatencyMs = 0;

                /**
                 * Creates a new NetRxAction instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxAction
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.INetRxAction=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidNetworkMetric.NetRxAction} NetRxAction instance
                 */
                NetRxAction.create = function create(properties) {
                    return new NetRxAction(properties);
                };

                /**
                 * Encodes the specified NetRxAction message. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.NetRxAction.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxAction
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.INetRxAction} m NetRxAction message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                NetRxAction.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.total != null && Object.hasOwnProperty.call(m, "total"))
                        $root.perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic.encode(m.total, w.uint32(10).fork()).ldelim();
                    if (m.core != null && m.core.length) {
                        for (var i = 0; i < m.core.length; ++i)
                            $root.perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic.encode(m.core[i], w.uint32(18).fork()).ldelim();
                    }
                    if (m.avgInterstackLatencyMs != null && Object.hasOwnProperty.call(m, "avgInterstackLatencyMs"))
                        w.uint32(25).double(m.avgInterstackLatencyMs);
                    return w;
                };

                /**
                 * Encodes the specified NetRxAction message, length delimited. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.NetRxAction.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxAction
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.INetRxAction} message NetRxAction message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                NetRxAction.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a NetRxAction message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxAction
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidNetworkMetric.NetRxAction} NetRxAction
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                NetRxAction.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidNetworkMetric.NetRxAction();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.total = $root.perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic.decode(r, r.uint32());
                            break;
                        case 2:
                            if (!(m.core && m.core.length))
                                m.core = [];
                            m.core.push($root.perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic.decode(r, r.uint32()));
                            break;
                        case 3:
                            m.avgInterstackLatencyMs = r.double();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a NetRxAction message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxAction
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidNetworkMetric.NetRxAction} NetRxAction
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                NetRxAction.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a NetRxAction message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxAction
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                NetRxAction.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.total != null && m.hasOwnProperty("total")) {
                        {
                            var e = $root.perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic.verify(m.total);
                            if (e)
                                return "total." + e;
                        }
                    }
                    if (m.core != null && m.hasOwnProperty("core")) {
                        if (!Array.isArray(m.core))
                            return "core: array expected";
                        for (var i = 0; i < m.core.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic.verify(m.core[i]);
                                if (e)
                                    return "core." + e;
                            }
                        }
                    }
                    if (m.avgInterstackLatencyMs != null && m.hasOwnProperty("avgInterstackLatencyMs")) {
                        if (typeof m.avgInterstackLatencyMs !== "number")
                            return "avgInterstackLatencyMs: number expected";
                    }
                    return null;
                };

                /**
                 * Creates a NetRxAction message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxAction
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidNetworkMetric.NetRxAction} NetRxAction
                 */
                NetRxAction.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidNetworkMetric.NetRxAction)
                        return d;
                    var m = new $root.perfetto.protos.AndroidNetworkMetric.NetRxAction();
                    if (d.total != null) {
                        if (typeof d.total !== "object")
                            throw TypeError(".perfetto.protos.AndroidNetworkMetric.NetRxAction.total: object expected");
                        m.total = $root.perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic.fromObject(d.total);
                    }
                    if (d.core) {
                        if (!Array.isArray(d.core))
                            throw TypeError(".perfetto.protos.AndroidNetworkMetric.NetRxAction.core: array expected");
                        m.core = [];
                        for (var i = 0; i < d.core.length; ++i) {
                            if (typeof d.core[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidNetworkMetric.NetRxAction.core: object expected");
                            m.core[i] = $root.perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic.fromObject(d.core[i]);
                        }
                    }
                    if (d.avgInterstackLatencyMs != null) {
                        m.avgInterstackLatencyMs = Number(d.avgInterstackLatencyMs);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a NetRxAction message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxAction
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.NetRxAction} m NetRxAction
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                NetRxAction.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.core = [];
                    }
                    if (o.defaults) {
                        d.total = null;
                        d.avgInterstackLatencyMs = 0;
                    }
                    if (m.total != null && m.hasOwnProperty("total")) {
                        d.total = $root.perfetto.protos.AndroidNetworkMetric.NetRxActionStatistic.toObject(m.total, o);
                    }
                    if (m.core && m.core.length) {
                        d.core = [];
                        for (var j = 0; j < m.core.length; ++j) {
                            d.core[j] = $root.perfetto.protos.AndroidNetworkMetric.CoreNetRxActionStatistic.toObject(m.core[j], o);
                        }
                    }
                    if (m.avgInterstackLatencyMs != null && m.hasOwnProperty("avgInterstackLatencyMs")) {
                        d.avgInterstackLatencyMs = o.json && !isFinite(m.avgInterstackLatencyMs) ? String(m.avgInterstackLatencyMs) : m.avgInterstackLatencyMs;
                    }
                    return d;
                };

                /**
                 * Converts this NetRxAction to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetRxAction
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                NetRxAction.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return NetRxAction;
            })();

            AndroidNetworkMetric.NetTxAction = (function() {

                /**
                 * Properties of a NetTxAction.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @interface INetTxAction
                 * @property {perfetto.protos.AndroidNetworkMetric.INetTxActionStatistic|null} [total] NetTxAction total
                 * @property {Array.<perfetto.protos.AndroidNetworkMetric.ICoreNetTxActionStatistic>|null} [core] NetTxAction core
                 */

                /**
                 * Constructs a new NetTxAction.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @classdesc Represents a NetTxAction.
                 * @implements INetTxAction
                 * @constructor
                 * @param {perfetto.protos.AndroidNetworkMetric.INetTxAction=} [p] Properties to set
                 */
                function NetTxAction(p) {
                    this.core = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * NetTxAction total.
                 * @member {perfetto.protos.AndroidNetworkMetric.INetTxActionStatistic|null|undefined} total
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetTxAction
                 * @instance
                 */
                NetTxAction.prototype.total = null;

                /**
                 * NetTxAction core.
                 * @member {Array.<perfetto.protos.AndroidNetworkMetric.ICoreNetTxActionStatistic>} core
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetTxAction
                 * @instance
                 */
                NetTxAction.prototype.core = $util.emptyArray;

                /**
                 * Creates a new NetTxAction instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetTxAction
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.INetTxAction=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidNetworkMetric.NetTxAction} NetTxAction instance
                 */
                NetTxAction.create = function create(properties) {
                    return new NetTxAction(properties);
                };

                /**
                 * Encodes the specified NetTxAction message. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.NetTxAction.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetTxAction
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.INetTxAction} m NetTxAction message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                NetTxAction.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.total != null && Object.hasOwnProperty.call(m, "total"))
                        $root.perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic.encode(m.total, w.uint32(10).fork()).ldelim();
                    if (m.core != null && m.core.length) {
                        for (var i = 0; i < m.core.length; ++i)
                            $root.perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic.encode(m.core[i], w.uint32(18).fork()).ldelim();
                    }
                    return w;
                };

                /**
                 * Encodes the specified NetTxAction message, length delimited. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.NetTxAction.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetTxAction
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.INetTxAction} message NetTxAction message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                NetTxAction.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a NetTxAction message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetTxAction
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidNetworkMetric.NetTxAction} NetTxAction
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                NetTxAction.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidNetworkMetric.NetTxAction();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.total = $root.perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic.decode(r, r.uint32());
                            break;
                        case 2:
                            if (!(m.core && m.core.length))
                                m.core = [];
                            m.core.push($root.perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a NetTxAction message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetTxAction
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidNetworkMetric.NetTxAction} NetTxAction
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                NetTxAction.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a NetTxAction message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetTxAction
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                NetTxAction.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.total != null && m.hasOwnProperty("total")) {
                        {
                            var e = $root.perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic.verify(m.total);
                            if (e)
                                return "total." + e;
                        }
                    }
                    if (m.core != null && m.hasOwnProperty("core")) {
                        if (!Array.isArray(m.core))
                            return "core: array expected";
                        for (var i = 0; i < m.core.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic.verify(m.core[i]);
                                if (e)
                                    return "core." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates a NetTxAction message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetTxAction
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidNetworkMetric.NetTxAction} NetTxAction
                 */
                NetTxAction.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidNetworkMetric.NetTxAction)
                        return d;
                    var m = new $root.perfetto.protos.AndroidNetworkMetric.NetTxAction();
                    if (d.total != null) {
                        if (typeof d.total !== "object")
                            throw TypeError(".perfetto.protos.AndroidNetworkMetric.NetTxAction.total: object expected");
                        m.total = $root.perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic.fromObject(d.total);
                    }
                    if (d.core) {
                        if (!Array.isArray(d.core))
                            throw TypeError(".perfetto.protos.AndroidNetworkMetric.NetTxAction.core: array expected");
                        m.core = [];
                        for (var i = 0; i < d.core.length; ++i) {
                            if (typeof d.core[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidNetworkMetric.NetTxAction.core: object expected");
                            m.core[i] = $root.perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic.fromObject(d.core[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a NetTxAction message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetTxAction
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.NetTxAction} m NetTxAction
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                NetTxAction.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.core = [];
                    }
                    if (o.defaults) {
                        d.total = null;
                    }
                    if (m.total != null && m.hasOwnProperty("total")) {
                        d.total = $root.perfetto.protos.AndroidNetworkMetric.NetTxActionStatistic.toObject(m.total, o);
                    }
                    if (m.core && m.core.length) {
                        d.core = [];
                        for (var j = 0; j < m.core.length; ++j) {
                            d.core[j] = $root.perfetto.protos.AndroidNetworkMetric.CoreNetTxActionStatistic.toObject(m.core[j], o);
                        }
                    }
                    return d;
                };

                /**
                 * Converts this NetTxAction to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidNetworkMetric.NetTxAction
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                NetTxAction.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return NetTxAction;
            })();

            AndroidNetworkMetric.IpiAction = (function() {

                /**
                 * Properties of an IpiAction.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @interface IIpiAction
                 * @property {perfetto.protos.AndroidNetworkMetric.IIpiActionStatistic|null} [total] IpiAction total
                 */

                /**
                 * Constructs a new IpiAction.
                 * @memberof perfetto.protos.AndroidNetworkMetric
                 * @classdesc Represents an IpiAction.
                 * @implements IIpiAction
                 * @constructor
                 * @param {perfetto.protos.AndroidNetworkMetric.IIpiAction=} [p] Properties to set
                 */
                function IpiAction(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * IpiAction total.
                 * @member {perfetto.protos.AndroidNetworkMetric.IIpiActionStatistic|null|undefined} total
                 * @memberof perfetto.protos.AndroidNetworkMetric.IpiAction
                 * @instance
                 */
                IpiAction.prototype.total = null;

                /**
                 * Creates a new IpiAction instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidNetworkMetric.IpiAction
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.IIpiAction=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidNetworkMetric.IpiAction} IpiAction instance
                 */
                IpiAction.create = function create(properties) {
                    return new IpiAction(properties);
                };

                /**
                 * Encodes the specified IpiAction message. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.IpiAction.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidNetworkMetric.IpiAction
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.IIpiAction} m IpiAction message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                IpiAction.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.total != null && Object.hasOwnProperty.call(m, "total"))
                        $root.perfetto.protos.AndroidNetworkMetric.IpiActionStatistic.encode(m.total, w.uint32(10).fork()).ldelim();
                    return w;
                };

                /**
                 * Encodes the specified IpiAction message, length delimited. Does not implicitly {@link perfetto.protos.AndroidNetworkMetric.IpiAction.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.IpiAction
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.IIpiAction} message IpiAction message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                IpiAction.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an IpiAction message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidNetworkMetric.IpiAction
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidNetworkMetric.IpiAction} IpiAction
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                IpiAction.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidNetworkMetric.IpiAction();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.total = $root.perfetto.protos.AndroidNetworkMetric.IpiActionStatistic.decode(r, r.uint32());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an IpiAction message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidNetworkMetric.IpiAction
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidNetworkMetric.IpiAction} IpiAction
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                IpiAction.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an IpiAction message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidNetworkMetric.IpiAction
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                IpiAction.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.total != null && m.hasOwnProperty("total")) {
                        {
                            var e = $root.perfetto.protos.AndroidNetworkMetric.IpiActionStatistic.verify(m.total);
                            if (e)
                                return "total." + e;
                        }
                    }
                    return null;
                };

                /**
                 * Creates an IpiAction message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.IpiAction
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidNetworkMetric.IpiAction} IpiAction
                 */
                IpiAction.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidNetworkMetric.IpiAction)
                        return d;
                    var m = new $root.perfetto.protos.AndroidNetworkMetric.IpiAction();
                    if (d.total != null) {
                        if (typeof d.total !== "object")
                            throw TypeError(".perfetto.protos.AndroidNetworkMetric.IpiAction.total: object expected");
                        m.total = $root.perfetto.protos.AndroidNetworkMetric.IpiActionStatistic.fromObject(d.total);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an IpiAction message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidNetworkMetric.IpiAction
                 * @static
                 * @param {perfetto.protos.AndroidNetworkMetric.IpiAction} m IpiAction
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                IpiAction.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.total = null;
                    }
                    if (m.total != null && m.hasOwnProperty("total")) {
                        d.total = $root.perfetto.protos.AndroidNetworkMetric.IpiActionStatistic.toObject(m.total, o);
                    }
                    return d;
                };

                /**
                 * Converts this IpiAction to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidNetworkMetric.IpiAction
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                IpiAction.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return IpiAction;
            })();

            return AndroidNetworkMetric;
        })();

        protos.AndroidOtherTracesMetric = (function() {

            /**
             * Properties of an AndroidOtherTracesMetric.
             * @memberof perfetto.protos
             * @interface IAndroidOtherTracesMetric
             * @property {Array.<string>|null} [finalizedTracesUuid] AndroidOtherTracesMetric finalizedTracesUuid
             */

            /**
             * Constructs a new AndroidOtherTracesMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidOtherTracesMetric.
             * @implements IAndroidOtherTracesMetric
             * @constructor
             * @param {perfetto.protos.IAndroidOtherTracesMetric=} [p] Properties to set
             */
            function AndroidOtherTracesMetric(p) {
                this.finalizedTracesUuid = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidOtherTracesMetric finalizedTracesUuid.
             * @member {Array.<string>} finalizedTracesUuid
             * @memberof perfetto.protos.AndroidOtherTracesMetric
             * @instance
             */
            AndroidOtherTracesMetric.prototype.finalizedTracesUuid = $util.emptyArray;

            /**
             * Creates a new AndroidOtherTracesMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidOtherTracesMetric
             * @static
             * @param {perfetto.protos.IAndroidOtherTracesMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidOtherTracesMetric} AndroidOtherTracesMetric instance
             */
            AndroidOtherTracesMetric.create = function create(properties) {
                return new AndroidOtherTracesMetric(properties);
            };

            /**
             * Encodes the specified AndroidOtherTracesMetric message. Does not implicitly {@link perfetto.protos.AndroidOtherTracesMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidOtherTracesMetric
             * @static
             * @param {perfetto.protos.IAndroidOtherTracesMetric} m AndroidOtherTracesMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidOtherTracesMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.finalizedTracesUuid != null && m.finalizedTracesUuid.length) {
                    for (var i = 0; i < m.finalizedTracesUuid.length; ++i)
                        w.uint32(10).string(m.finalizedTracesUuid[i]);
                }
                return w;
            };

            /**
             * Encodes the specified AndroidOtherTracesMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidOtherTracesMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidOtherTracesMetric
             * @static
             * @param {perfetto.protos.IAndroidOtherTracesMetric} message AndroidOtherTracesMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidOtherTracesMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidOtherTracesMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidOtherTracesMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidOtherTracesMetric} AndroidOtherTracesMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidOtherTracesMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidOtherTracesMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.finalizedTracesUuid && m.finalizedTracesUuid.length))
                            m.finalizedTracesUuid = [];
                        m.finalizedTracesUuid.push(r.string());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidOtherTracesMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidOtherTracesMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidOtherTracesMetric} AndroidOtherTracesMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidOtherTracesMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidOtherTracesMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidOtherTracesMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidOtherTracesMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.finalizedTracesUuid != null && m.hasOwnProperty("finalizedTracesUuid")) {
                    if (!Array.isArray(m.finalizedTracesUuid))
                        return "finalizedTracesUuid: array expected";
                    for (var i = 0; i < m.finalizedTracesUuid.length; ++i) {
                        if (!$util.isString(m.finalizedTracesUuid[i]))
                            return "finalizedTracesUuid: string[] expected";
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidOtherTracesMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidOtherTracesMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidOtherTracesMetric} AndroidOtherTracesMetric
             */
            AndroidOtherTracesMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidOtherTracesMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidOtherTracesMetric();
                if (d.finalizedTracesUuid) {
                    if (!Array.isArray(d.finalizedTracesUuid))
                        throw TypeError(".perfetto.protos.AndroidOtherTracesMetric.finalizedTracesUuid: array expected");
                    m.finalizedTracesUuid = [];
                    for (var i = 0; i < d.finalizedTracesUuid.length; ++i) {
                        m.finalizedTracesUuid[i] = String(d.finalizedTracesUuid[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidOtherTracesMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidOtherTracesMetric
             * @static
             * @param {perfetto.protos.AndroidOtherTracesMetric} m AndroidOtherTracesMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidOtherTracesMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.finalizedTracesUuid = [];
                }
                if (m.finalizedTracesUuid && m.finalizedTracesUuid.length) {
                    d.finalizedTracesUuid = [];
                    for (var j = 0; j < m.finalizedTracesUuid.length; ++j) {
                        d.finalizedTracesUuid[j] = m.finalizedTracesUuid[j];
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidOtherTracesMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidOtherTracesMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidOtherTracesMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AndroidOtherTracesMetric;
        })();

        protos.AndroidPackageList = (function() {

            /**
             * Properties of an AndroidPackageList.
             * @memberof perfetto.protos
             * @interface IAndroidPackageList
             * @property {Array.<perfetto.protos.AndroidPackageList.IPackage>|null} [packages] AndroidPackageList packages
             */

            /**
             * Constructs a new AndroidPackageList.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidPackageList.
             * @implements IAndroidPackageList
             * @constructor
             * @param {perfetto.protos.IAndroidPackageList=} [p] Properties to set
             */
            function AndroidPackageList(p) {
                this.packages = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidPackageList packages.
             * @member {Array.<perfetto.protos.AndroidPackageList.IPackage>} packages
             * @memberof perfetto.protos.AndroidPackageList
             * @instance
             */
            AndroidPackageList.prototype.packages = $util.emptyArray;

            /**
             * Creates a new AndroidPackageList instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidPackageList
             * @static
             * @param {perfetto.protos.IAndroidPackageList=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidPackageList} AndroidPackageList instance
             */
            AndroidPackageList.create = function create(properties) {
                return new AndroidPackageList(properties);
            };

            /**
             * Encodes the specified AndroidPackageList message. Does not implicitly {@link perfetto.protos.AndroidPackageList.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidPackageList
             * @static
             * @param {perfetto.protos.IAndroidPackageList} m AndroidPackageList message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidPackageList.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.packages != null && m.packages.length) {
                    for (var i = 0; i < m.packages.length; ++i)
                        $root.perfetto.protos.AndroidPackageList.Package.encode(m.packages[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified AndroidPackageList message, length delimited. Does not implicitly {@link perfetto.protos.AndroidPackageList.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidPackageList
             * @static
             * @param {perfetto.protos.IAndroidPackageList} message AndroidPackageList message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidPackageList.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidPackageList message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidPackageList
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidPackageList} AndroidPackageList
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidPackageList.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidPackageList();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.packages && m.packages.length))
                            m.packages = [];
                        m.packages.push($root.perfetto.protos.AndroidPackageList.Package.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidPackageList message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidPackageList
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidPackageList} AndroidPackageList
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidPackageList.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidPackageList message.
             * @function verify
             * @memberof perfetto.protos.AndroidPackageList
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidPackageList.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.packages != null && m.hasOwnProperty("packages")) {
                    if (!Array.isArray(m.packages))
                        return "packages: array expected";
                    for (var i = 0; i < m.packages.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidPackageList.Package.verify(m.packages[i]);
                            if (e)
                                return "packages." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidPackageList message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidPackageList
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidPackageList} AndroidPackageList
             */
            AndroidPackageList.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidPackageList)
                    return d;
                var m = new $root.perfetto.protos.AndroidPackageList();
                if (d.packages) {
                    if (!Array.isArray(d.packages))
                        throw TypeError(".perfetto.protos.AndroidPackageList.packages: array expected");
                    m.packages = [];
                    for (var i = 0; i < d.packages.length; ++i) {
                        if (typeof d.packages[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidPackageList.packages: object expected");
                        m.packages[i] = $root.perfetto.protos.AndroidPackageList.Package.fromObject(d.packages[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidPackageList message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidPackageList
             * @static
             * @param {perfetto.protos.AndroidPackageList} m AndroidPackageList
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidPackageList.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.packages = [];
                }
                if (m.packages && m.packages.length) {
                    d.packages = [];
                    for (var j = 0; j < m.packages.length; ++j) {
                        d.packages[j] = $root.perfetto.protos.AndroidPackageList.Package.toObject(m.packages[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidPackageList to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidPackageList
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidPackageList.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidPackageList.Package = (function() {

                /**
                 * Properties of a Package.
                 * @memberof perfetto.protos.AndroidPackageList
                 * @interface IPackage
                 * @property {string|null} [packageName] Package packageName
                 * @property {number|null} [uid] Package uid
                 * @property {number|null} [versionCode] Package versionCode
                 */

                /**
                 * Constructs a new Package.
                 * @memberof perfetto.protos.AndroidPackageList
                 * @classdesc Represents a Package.
                 * @implements IPackage
                 * @constructor
                 * @param {perfetto.protos.AndroidPackageList.IPackage=} [p] Properties to set
                 */
                function Package(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Package packageName.
                 * @member {string} packageName
                 * @memberof perfetto.protos.AndroidPackageList.Package
                 * @instance
                 */
                Package.prototype.packageName = "";

                /**
                 * Package uid.
                 * @member {number} uid
                 * @memberof perfetto.protos.AndroidPackageList.Package
                 * @instance
                 */
                Package.prototype.uid = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Package versionCode.
                 * @member {number} versionCode
                 * @memberof perfetto.protos.AndroidPackageList.Package
                 * @instance
                 */
                Package.prototype.versionCode = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new Package instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidPackageList.Package
                 * @static
                 * @param {perfetto.protos.AndroidPackageList.IPackage=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidPackageList.Package} Package instance
                 */
                Package.create = function create(properties) {
                    return new Package(properties);
                };

                /**
                 * Encodes the specified Package message. Does not implicitly {@link perfetto.protos.AndroidPackageList.Package.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidPackageList.Package
                 * @static
                 * @param {perfetto.protos.AndroidPackageList.IPackage} m Package message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Package.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.packageName != null && Object.hasOwnProperty.call(m, "packageName"))
                        w.uint32(10).string(m.packageName);
                    if (m.uid != null && Object.hasOwnProperty.call(m, "uid"))
                        w.uint32(16).int64(m.uid);
                    if (m.versionCode != null && Object.hasOwnProperty.call(m, "versionCode"))
                        w.uint32(24).int64(m.versionCode);
                    return w;
                };

                /**
                 * Encodes the specified Package message, length delimited. Does not implicitly {@link perfetto.protos.AndroidPackageList.Package.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidPackageList.Package
                 * @static
                 * @param {perfetto.protos.AndroidPackageList.IPackage} message Package message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Package.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Package message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidPackageList.Package
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidPackageList.Package} Package
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Package.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidPackageList.Package();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.packageName = r.string();
                            break;
                        case 2:
                            m.uid = r.int64();
                            break;
                        case 3:
                            m.versionCode = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Package message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidPackageList.Package
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidPackageList.Package} Package
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Package.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Package message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidPackageList.Package
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Package.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.packageName != null && m.hasOwnProperty("packageName")) {
                        if (!$util.isString(m.packageName))
                            return "packageName: string expected";
                    }
                    if (m.uid != null && m.hasOwnProperty("uid")) {
                        if (!$util.isInteger(m.uid) && !(m.uid && $util.isInteger(m.uid.low) && $util.isInteger(m.uid.high)))
                            return "uid: integer|Long expected";
                    }
                    if (m.versionCode != null && m.hasOwnProperty("versionCode")) {
                        if (!$util.isInteger(m.versionCode) && !(m.versionCode && $util.isInteger(m.versionCode.low) && $util.isInteger(m.versionCode.high)))
                            return "versionCode: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a Package message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidPackageList.Package
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidPackageList.Package} Package
                 */
                Package.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidPackageList.Package)
                        return d;
                    var m = new $root.perfetto.protos.AndroidPackageList.Package();
                    if (d.packageName != null) {
                        m.packageName = String(d.packageName);
                    }
                    if (d.uid != null) {
                        if ($util.Long)
                            (m.uid = $util.Long.fromValue(d.uid)).unsigned = false;
                        else if (typeof d.uid === "string")
                            m.uid = parseInt(d.uid, 10);
                        else if (typeof d.uid === "number")
                            m.uid = d.uid;
                        else if (typeof d.uid === "object")
                            m.uid = new $util.LongBits(d.uid.low >>> 0, d.uid.high >>> 0).toNumber();
                    }
                    if (d.versionCode != null) {
                        if ($util.Long)
                            (m.versionCode = $util.Long.fromValue(d.versionCode)).unsigned = false;
                        else if (typeof d.versionCode === "string")
                            m.versionCode = parseInt(d.versionCode, 10);
                        else if (typeof d.versionCode === "number")
                            m.versionCode = d.versionCode;
                        else if (typeof d.versionCode === "object")
                            m.versionCode = new $util.LongBits(d.versionCode.low >>> 0, d.versionCode.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Package message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidPackageList.Package
                 * @static
                 * @param {perfetto.protos.AndroidPackageList.Package} m Package
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Package.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.packageName = "";
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.uid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.uid = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.versionCode = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.versionCode = o.longs === String ? "0" : 0;
                    }
                    if (m.packageName != null && m.hasOwnProperty("packageName")) {
                        d.packageName = m.packageName;
                    }
                    if (m.uid != null && m.hasOwnProperty("uid")) {
                        if (typeof m.uid === "number")
                            d.uid = o.longs === String ? String(m.uid) : m.uid;
                        else
                            d.uid = o.longs === String ? $util.Long.prototype.toString.call(m.uid) : o.longs === Number ? new $util.LongBits(m.uid.low >>> 0, m.uid.high >>> 0).toNumber() : m.uid;
                    }
                    if (m.versionCode != null && m.hasOwnProperty("versionCode")) {
                        if (typeof m.versionCode === "number")
                            d.versionCode = o.longs === String ? String(m.versionCode) : m.versionCode;
                        else
                            d.versionCode = o.longs === String ? $util.Long.prototype.toString.call(m.versionCode) : o.longs === Number ? new $util.LongBits(m.versionCode.low >>> 0, m.versionCode.high >>> 0).toNumber() : m.versionCode;
                    }
                    return d;
                };

                /**
                 * Converts this Package to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidPackageList.Package
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Package.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Package;
            })();

            return AndroidPackageList;
        })();

        protos.AndroidPowerRails = (function() {

            /**
             * Properties of an AndroidPowerRails.
             * @memberof perfetto.protos
             * @interface IAndroidPowerRails
             * @property {Array.<perfetto.protos.AndroidPowerRails.IPowerRails>|null} [powerRails] AndroidPowerRails powerRails
             * @property {number|null} [avgTotalUsedPowerMw] AndroidPowerRails avgTotalUsedPowerMw
             */

            /**
             * Constructs a new AndroidPowerRails.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidPowerRails.
             * @implements IAndroidPowerRails
             * @constructor
             * @param {perfetto.protos.IAndroidPowerRails=} [p] Properties to set
             */
            function AndroidPowerRails(p) {
                this.powerRails = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidPowerRails powerRails.
             * @member {Array.<perfetto.protos.AndroidPowerRails.IPowerRails>} powerRails
             * @memberof perfetto.protos.AndroidPowerRails
             * @instance
             */
            AndroidPowerRails.prototype.powerRails = $util.emptyArray;

            /**
             * AndroidPowerRails avgTotalUsedPowerMw.
             * @member {number} avgTotalUsedPowerMw
             * @memberof perfetto.protos.AndroidPowerRails
             * @instance
             */
            AndroidPowerRails.prototype.avgTotalUsedPowerMw = 0;

            /**
             * Creates a new AndroidPowerRails instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidPowerRails
             * @static
             * @param {perfetto.protos.IAndroidPowerRails=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidPowerRails} AndroidPowerRails instance
             */
            AndroidPowerRails.create = function create(properties) {
                return new AndroidPowerRails(properties);
            };

            /**
             * Encodes the specified AndroidPowerRails message. Does not implicitly {@link perfetto.protos.AndroidPowerRails.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidPowerRails
             * @static
             * @param {perfetto.protos.IAndroidPowerRails} m AndroidPowerRails message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidPowerRails.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.powerRails != null && m.powerRails.length) {
                    for (var i = 0; i < m.powerRails.length; ++i)
                        $root.perfetto.protos.AndroidPowerRails.PowerRails.encode(m.powerRails[i], w.uint32(10).fork()).ldelim();
                }
                if (m.avgTotalUsedPowerMw != null && Object.hasOwnProperty.call(m, "avgTotalUsedPowerMw"))
                    w.uint32(17).double(m.avgTotalUsedPowerMw);
                return w;
            };

            /**
             * Encodes the specified AndroidPowerRails message, length delimited. Does not implicitly {@link perfetto.protos.AndroidPowerRails.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidPowerRails
             * @static
             * @param {perfetto.protos.IAndroidPowerRails} message AndroidPowerRails message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidPowerRails.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidPowerRails message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidPowerRails
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidPowerRails} AndroidPowerRails
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidPowerRails.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidPowerRails();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.powerRails && m.powerRails.length))
                            m.powerRails = [];
                        m.powerRails.push($root.perfetto.protos.AndroidPowerRails.PowerRails.decode(r, r.uint32()));
                        break;
                    case 2:
                        m.avgTotalUsedPowerMw = r.double();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidPowerRails message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidPowerRails
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidPowerRails} AndroidPowerRails
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidPowerRails.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidPowerRails message.
             * @function verify
             * @memberof perfetto.protos.AndroidPowerRails
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidPowerRails.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.powerRails != null && m.hasOwnProperty("powerRails")) {
                    if (!Array.isArray(m.powerRails))
                        return "powerRails: array expected";
                    for (var i = 0; i < m.powerRails.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidPowerRails.PowerRails.verify(m.powerRails[i]);
                            if (e)
                                return "powerRails." + e;
                        }
                    }
                }
                if (m.avgTotalUsedPowerMw != null && m.hasOwnProperty("avgTotalUsedPowerMw")) {
                    if (typeof m.avgTotalUsedPowerMw !== "number")
                        return "avgTotalUsedPowerMw: number expected";
                }
                return null;
            };

            /**
             * Creates an AndroidPowerRails message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidPowerRails
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidPowerRails} AndroidPowerRails
             */
            AndroidPowerRails.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidPowerRails)
                    return d;
                var m = new $root.perfetto.protos.AndroidPowerRails();
                if (d.powerRails) {
                    if (!Array.isArray(d.powerRails))
                        throw TypeError(".perfetto.protos.AndroidPowerRails.powerRails: array expected");
                    m.powerRails = [];
                    for (var i = 0; i < d.powerRails.length; ++i) {
                        if (typeof d.powerRails[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidPowerRails.powerRails: object expected");
                        m.powerRails[i] = $root.perfetto.protos.AndroidPowerRails.PowerRails.fromObject(d.powerRails[i]);
                    }
                }
                if (d.avgTotalUsedPowerMw != null) {
                    m.avgTotalUsedPowerMw = Number(d.avgTotalUsedPowerMw);
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidPowerRails message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidPowerRails
             * @static
             * @param {perfetto.protos.AndroidPowerRails} m AndroidPowerRails
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidPowerRails.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.powerRails = [];
                }
                if (o.defaults) {
                    d.avgTotalUsedPowerMw = 0;
                }
                if (m.powerRails && m.powerRails.length) {
                    d.powerRails = [];
                    for (var j = 0; j < m.powerRails.length; ++j) {
                        d.powerRails[j] = $root.perfetto.protos.AndroidPowerRails.PowerRails.toObject(m.powerRails[j], o);
                    }
                }
                if (m.avgTotalUsedPowerMw != null && m.hasOwnProperty("avgTotalUsedPowerMw")) {
                    d.avgTotalUsedPowerMw = o.json && !isFinite(m.avgTotalUsedPowerMw) ? String(m.avgTotalUsedPowerMw) : m.avgTotalUsedPowerMw;
                }
                return d;
            };

            /**
             * Converts this AndroidPowerRails to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidPowerRails
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidPowerRails.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidPowerRails.EnergyData = (function() {

                /**
                 * Properties of an EnergyData.
                 * @memberof perfetto.protos.AndroidPowerRails
                 * @interface IEnergyData
                 * @property {number|null} [timestampMs] EnergyData timestampMs
                 * @property {number|null} [energyUws] EnergyData energyUws
                 */

                /**
                 * Constructs a new EnergyData.
                 * @memberof perfetto.protos.AndroidPowerRails
                 * @classdesc Represents an EnergyData.
                 * @implements IEnergyData
                 * @constructor
                 * @param {perfetto.protos.AndroidPowerRails.IEnergyData=} [p] Properties to set
                 */
                function EnergyData(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * EnergyData timestampMs.
                 * @member {number} timestampMs
                 * @memberof perfetto.protos.AndroidPowerRails.EnergyData
                 * @instance
                 */
                EnergyData.prototype.timestampMs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * EnergyData energyUws.
                 * @member {number} energyUws
                 * @memberof perfetto.protos.AndroidPowerRails.EnergyData
                 * @instance
                 */
                EnergyData.prototype.energyUws = 0;

                /**
                 * Creates a new EnergyData instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidPowerRails.EnergyData
                 * @static
                 * @param {perfetto.protos.AndroidPowerRails.IEnergyData=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidPowerRails.EnergyData} EnergyData instance
                 */
                EnergyData.create = function create(properties) {
                    return new EnergyData(properties);
                };

                /**
                 * Encodes the specified EnergyData message. Does not implicitly {@link perfetto.protos.AndroidPowerRails.EnergyData.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidPowerRails.EnergyData
                 * @static
                 * @param {perfetto.protos.AndroidPowerRails.IEnergyData} m EnergyData message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                EnergyData.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.timestampMs != null && Object.hasOwnProperty.call(m, "timestampMs"))
                        w.uint32(8).int64(m.timestampMs);
                    if (m.energyUws != null && Object.hasOwnProperty.call(m, "energyUws"))
                        w.uint32(17).double(m.energyUws);
                    return w;
                };

                /**
                 * Encodes the specified EnergyData message, length delimited. Does not implicitly {@link perfetto.protos.AndroidPowerRails.EnergyData.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidPowerRails.EnergyData
                 * @static
                 * @param {perfetto.protos.AndroidPowerRails.IEnergyData} message EnergyData message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                EnergyData.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an EnergyData message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidPowerRails.EnergyData
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidPowerRails.EnergyData} EnergyData
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                EnergyData.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidPowerRails.EnergyData();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.timestampMs = r.int64();
                            break;
                        case 2:
                            m.energyUws = r.double();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an EnergyData message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidPowerRails.EnergyData
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidPowerRails.EnergyData} EnergyData
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                EnergyData.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an EnergyData message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidPowerRails.EnergyData
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                EnergyData.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.timestampMs != null && m.hasOwnProperty("timestampMs")) {
                        if (!$util.isInteger(m.timestampMs) && !(m.timestampMs && $util.isInteger(m.timestampMs.low) && $util.isInteger(m.timestampMs.high)))
                            return "timestampMs: integer|Long expected";
                    }
                    if (m.energyUws != null && m.hasOwnProperty("energyUws")) {
                        if (typeof m.energyUws !== "number")
                            return "energyUws: number expected";
                    }
                    return null;
                };

                /**
                 * Creates an EnergyData message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidPowerRails.EnergyData
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidPowerRails.EnergyData} EnergyData
                 */
                EnergyData.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidPowerRails.EnergyData)
                        return d;
                    var m = new $root.perfetto.protos.AndroidPowerRails.EnergyData();
                    if (d.timestampMs != null) {
                        if ($util.Long)
                            (m.timestampMs = $util.Long.fromValue(d.timestampMs)).unsigned = false;
                        else if (typeof d.timestampMs === "string")
                            m.timestampMs = parseInt(d.timestampMs, 10);
                        else if (typeof d.timestampMs === "number")
                            m.timestampMs = d.timestampMs;
                        else if (typeof d.timestampMs === "object")
                            m.timestampMs = new $util.LongBits(d.timestampMs.low >>> 0, d.timestampMs.high >>> 0).toNumber();
                    }
                    if (d.energyUws != null) {
                        m.energyUws = Number(d.energyUws);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an EnergyData message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidPowerRails.EnergyData
                 * @static
                 * @param {perfetto.protos.AndroidPowerRails.EnergyData} m EnergyData
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                EnergyData.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.timestampMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.timestampMs = o.longs === String ? "0" : 0;
                        d.energyUws = 0;
                    }
                    if (m.timestampMs != null && m.hasOwnProperty("timestampMs")) {
                        if (typeof m.timestampMs === "number")
                            d.timestampMs = o.longs === String ? String(m.timestampMs) : m.timestampMs;
                        else
                            d.timestampMs = o.longs === String ? $util.Long.prototype.toString.call(m.timestampMs) : o.longs === Number ? new $util.LongBits(m.timestampMs.low >>> 0, m.timestampMs.high >>> 0).toNumber() : m.timestampMs;
                    }
                    if (m.energyUws != null && m.hasOwnProperty("energyUws")) {
                        d.energyUws = o.json && !isFinite(m.energyUws) ? String(m.energyUws) : m.energyUws;
                    }
                    return d;
                };

                /**
                 * Converts this EnergyData to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidPowerRails.EnergyData
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                EnergyData.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return EnergyData;
            })();

            AndroidPowerRails.PowerRails = (function() {

                /**
                 * Properties of a PowerRails.
                 * @memberof perfetto.protos.AndroidPowerRails
                 * @interface IPowerRails
                 * @property {string|null} [name] PowerRails name
                 * @property {Array.<perfetto.protos.AndroidPowerRails.IEnergyData>|null} [energyData] PowerRails energyData
                 * @property {number|null} [avgUsedPowerMw] PowerRails avgUsedPowerMw
                 */

                /**
                 * Constructs a new PowerRails.
                 * @memberof perfetto.protos.AndroidPowerRails
                 * @classdesc Represents a PowerRails.
                 * @implements IPowerRails
                 * @constructor
                 * @param {perfetto.protos.AndroidPowerRails.IPowerRails=} [p] Properties to set
                 */
                function PowerRails(p) {
                    this.energyData = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * PowerRails name.
                 * @member {string} name
                 * @memberof perfetto.protos.AndroidPowerRails.PowerRails
                 * @instance
                 */
                PowerRails.prototype.name = "";

                /**
                 * PowerRails energyData.
                 * @member {Array.<perfetto.protos.AndroidPowerRails.IEnergyData>} energyData
                 * @memberof perfetto.protos.AndroidPowerRails.PowerRails
                 * @instance
                 */
                PowerRails.prototype.energyData = $util.emptyArray;

                /**
                 * PowerRails avgUsedPowerMw.
                 * @member {number} avgUsedPowerMw
                 * @memberof perfetto.protos.AndroidPowerRails.PowerRails
                 * @instance
                 */
                PowerRails.prototype.avgUsedPowerMw = 0;

                /**
                 * Creates a new PowerRails instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidPowerRails.PowerRails
                 * @static
                 * @param {perfetto.protos.AndroidPowerRails.IPowerRails=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidPowerRails.PowerRails} PowerRails instance
                 */
                PowerRails.create = function create(properties) {
                    return new PowerRails(properties);
                };

                /**
                 * Encodes the specified PowerRails message. Does not implicitly {@link perfetto.protos.AndroidPowerRails.PowerRails.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidPowerRails.PowerRails
                 * @static
                 * @param {perfetto.protos.AndroidPowerRails.IPowerRails} m PowerRails message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PowerRails.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(10).string(m.name);
                    if (m.energyData != null && m.energyData.length) {
                        for (var i = 0; i < m.energyData.length; ++i)
                            $root.perfetto.protos.AndroidPowerRails.EnergyData.encode(m.energyData[i], w.uint32(18).fork()).ldelim();
                    }
                    if (m.avgUsedPowerMw != null && Object.hasOwnProperty.call(m, "avgUsedPowerMw"))
                        w.uint32(25).double(m.avgUsedPowerMw);
                    return w;
                };

                /**
                 * Encodes the specified PowerRails message, length delimited. Does not implicitly {@link perfetto.protos.AndroidPowerRails.PowerRails.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidPowerRails.PowerRails
                 * @static
                 * @param {perfetto.protos.AndroidPowerRails.IPowerRails} message PowerRails message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PowerRails.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a PowerRails message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidPowerRails.PowerRails
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidPowerRails.PowerRails} PowerRails
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PowerRails.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidPowerRails.PowerRails();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.name = r.string();
                            break;
                        case 2:
                            if (!(m.energyData && m.energyData.length))
                                m.energyData = [];
                            m.energyData.push($root.perfetto.protos.AndroidPowerRails.EnergyData.decode(r, r.uint32()));
                            break;
                        case 3:
                            m.avgUsedPowerMw = r.double();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a PowerRails message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidPowerRails.PowerRails
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidPowerRails.PowerRails} PowerRails
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PowerRails.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a PowerRails message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidPowerRails.PowerRails
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                PowerRails.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    if (m.energyData != null && m.hasOwnProperty("energyData")) {
                        if (!Array.isArray(m.energyData))
                            return "energyData: array expected";
                        for (var i = 0; i < m.energyData.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidPowerRails.EnergyData.verify(m.energyData[i]);
                                if (e)
                                    return "energyData." + e;
                            }
                        }
                    }
                    if (m.avgUsedPowerMw != null && m.hasOwnProperty("avgUsedPowerMw")) {
                        if (typeof m.avgUsedPowerMw !== "number")
                            return "avgUsedPowerMw: number expected";
                    }
                    return null;
                };

                /**
                 * Creates a PowerRails message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidPowerRails.PowerRails
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidPowerRails.PowerRails} PowerRails
                 */
                PowerRails.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidPowerRails.PowerRails)
                        return d;
                    var m = new $root.perfetto.protos.AndroidPowerRails.PowerRails();
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    if (d.energyData) {
                        if (!Array.isArray(d.energyData))
                            throw TypeError(".perfetto.protos.AndroidPowerRails.PowerRails.energyData: array expected");
                        m.energyData = [];
                        for (var i = 0; i < d.energyData.length; ++i) {
                            if (typeof d.energyData[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidPowerRails.PowerRails.energyData: object expected");
                            m.energyData[i] = $root.perfetto.protos.AndroidPowerRails.EnergyData.fromObject(d.energyData[i]);
                        }
                    }
                    if (d.avgUsedPowerMw != null) {
                        m.avgUsedPowerMw = Number(d.avgUsedPowerMw);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a PowerRails message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidPowerRails.PowerRails
                 * @static
                 * @param {perfetto.protos.AndroidPowerRails.PowerRails} m PowerRails
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                PowerRails.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.energyData = [];
                    }
                    if (o.defaults) {
                        d.name = "";
                        d.avgUsedPowerMw = 0;
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    if (m.energyData && m.energyData.length) {
                        d.energyData = [];
                        for (var j = 0; j < m.energyData.length; ++j) {
                            d.energyData[j] = $root.perfetto.protos.AndroidPowerRails.EnergyData.toObject(m.energyData[j], o);
                        }
                    }
                    if (m.avgUsedPowerMw != null && m.hasOwnProperty("avgUsedPowerMw")) {
                        d.avgUsedPowerMw = o.json && !isFinite(m.avgUsedPowerMw) ? String(m.avgUsedPowerMw) : m.avgUsedPowerMw;
                    }
                    return d;
                };

                /**
                 * Converts this PowerRails to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidPowerRails.PowerRails
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                PowerRails.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return PowerRails;
            })();

            return AndroidPowerRails;
        })();

        protos.ProfilerSmaps = (function() {

            /**
             * Properties of a ProfilerSmaps.
             * @memberof perfetto.protos
             * @interface IProfilerSmaps
             * @property {Array.<perfetto.protos.ProfilerSmaps.IInstance>|null} [instance] ProfilerSmaps instance
             */

            /**
             * Constructs a new ProfilerSmaps.
             * @memberof perfetto.protos
             * @classdesc Represents a ProfilerSmaps.
             * @implements IProfilerSmaps
             * @constructor
             * @param {perfetto.protos.IProfilerSmaps=} [p] Properties to set
             */
            function ProfilerSmaps(p) {
                this.instance = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ProfilerSmaps instance.
             * @member {Array.<perfetto.protos.ProfilerSmaps.IInstance>} instance
             * @memberof perfetto.protos.ProfilerSmaps
             * @instance
             */
            ProfilerSmaps.prototype.instance = $util.emptyArray;

            /**
             * Creates a new ProfilerSmaps instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ProfilerSmaps
             * @static
             * @param {perfetto.protos.IProfilerSmaps=} [properties] Properties to set
             * @returns {perfetto.protos.ProfilerSmaps} ProfilerSmaps instance
             */
            ProfilerSmaps.create = function create(properties) {
                return new ProfilerSmaps(properties);
            };

            /**
             * Encodes the specified ProfilerSmaps message. Does not implicitly {@link perfetto.protos.ProfilerSmaps.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ProfilerSmaps
             * @static
             * @param {perfetto.protos.IProfilerSmaps} m ProfilerSmaps message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ProfilerSmaps.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.instance != null && m.instance.length) {
                    for (var i = 0; i < m.instance.length; ++i)
                        $root.perfetto.protos.ProfilerSmaps.Instance.encode(m.instance[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified ProfilerSmaps message, length delimited. Does not implicitly {@link perfetto.protos.ProfilerSmaps.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ProfilerSmaps
             * @static
             * @param {perfetto.protos.IProfilerSmaps} message ProfilerSmaps message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ProfilerSmaps.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ProfilerSmaps message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ProfilerSmaps
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ProfilerSmaps} ProfilerSmaps
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ProfilerSmaps.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ProfilerSmaps();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.instance && m.instance.length))
                            m.instance = [];
                        m.instance.push($root.perfetto.protos.ProfilerSmaps.Instance.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ProfilerSmaps message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ProfilerSmaps
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ProfilerSmaps} ProfilerSmaps
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ProfilerSmaps.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ProfilerSmaps message.
             * @function verify
             * @memberof perfetto.protos.ProfilerSmaps
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ProfilerSmaps.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.instance != null && m.hasOwnProperty("instance")) {
                    if (!Array.isArray(m.instance))
                        return "instance: array expected";
                    for (var i = 0; i < m.instance.length; ++i) {
                        {
                            var e = $root.perfetto.protos.ProfilerSmaps.Instance.verify(m.instance[i]);
                            if (e)
                                return "instance." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a ProfilerSmaps message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ProfilerSmaps
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ProfilerSmaps} ProfilerSmaps
             */
            ProfilerSmaps.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ProfilerSmaps)
                    return d;
                var m = new $root.perfetto.protos.ProfilerSmaps();
                if (d.instance) {
                    if (!Array.isArray(d.instance))
                        throw TypeError(".perfetto.protos.ProfilerSmaps.instance: array expected");
                    m.instance = [];
                    for (var i = 0; i < d.instance.length; ++i) {
                        if (typeof d.instance[i] !== "object")
                            throw TypeError(".perfetto.protos.ProfilerSmaps.instance: object expected");
                        m.instance[i] = $root.perfetto.protos.ProfilerSmaps.Instance.fromObject(d.instance[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a ProfilerSmaps message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ProfilerSmaps
             * @static
             * @param {perfetto.protos.ProfilerSmaps} m ProfilerSmaps
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ProfilerSmaps.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.instance = [];
                }
                if (m.instance && m.instance.length) {
                    d.instance = [];
                    for (var j = 0; j < m.instance.length; ++j) {
                        d.instance[j] = $root.perfetto.protos.ProfilerSmaps.Instance.toObject(m.instance[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this ProfilerSmaps to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ProfilerSmaps
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ProfilerSmaps.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            ProfilerSmaps.Mapping = (function() {

                /**
                 * Properties of a Mapping.
                 * @memberof perfetto.protos.ProfilerSmaps
                 * @interface IMapping
                 * @property {string|null} [path] Mapping path
                 * @property {number|null} [sizeKb] Mapping sizeKb
                 * @property {number|null} [privateDirtyKb] Mapping privateDirtyKb
                 * @property {number|null} [swapKb] Mapping swapKb
                 */

                /**
                 * Constructs a new Mapping.
                 * @memberof perfetto.protos.ProfilerSmaps
                 * @classdesc Represents a Mapping.
                 * @implements IMapping
                 * @constructor
                 * @param {perfetto.protos.ProfilerSmaps.IMapping=} [p] Properties to set
                 */
                function Mapping(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Mapping path.
                 * @member {string} path
                 * @memberof perfetto.protos.ProfilerSmaps.Mapping
                 * @instance
                 */
                Mapping.prototype.path = "";

                /**
                 * Mapping sizeKb.
                 * @member {number} sizeKb
                 * @memberof perfetto.protos.ProfilerSmaps.Mapping
                 * @instance
                 */
                Mapping.prototype.sizeKb = 0;

                /**
                 * Mapping privateDirtyKb.
                 * @member {number} privateDirtyKb
                 * @memberof perfetto.protos.ProfilerSmaps.Mapping
                 * @instance
                 */
                Mapping.prototype.privateDirtyKb = 0;

                /**
                 * Mapping swapKb.
                 * @member {number} swapKb
                 * @memberof perfetto.protos.ProfilerSmaps.Mapping
                 * @instance
                 */
                Mapping.prototype.swapKb = 0;

                /**
                 * Creates a new Mapping instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.ProfilerSmaps.Mapping
                 * @static
                 * @param {perfetto.protos.ProfilerSmaps.IMapping=} [properties] Properties to set
                 * @returns {perfetto.protos.ProfilerSmaps.Mapping} Mapping instance
                 */
                Mapping.create = function create(properties) {
                    return new Mapping(properties);
                };

                /**
                 * Encodes the specified Mapping message. Does not implicitly {@link perfetto.protos.ProfilerSmaps.Mapping.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.ProfilerSmaps.Mapping
                 * @static
                 * @param {perfetto.protos.ProfilerSmaps.IMapping} m Mapping message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Mapping.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.path != null && Object.hasOwnProperty.call(m, "path"))
                        w.uint32(10).string(m.path);
                    if (m.sizeKb != null && Object.hasOwnProperty.call(m, "sizeKb"))
                        w.uint32(16).int32(m.sizeKb);
                    if (m.privateDirtyKb != null && Object.hasOwnProperty.call(m, "privateDirtyKb"))
                        w.uint32(24).int32(m.privateDirtyKb);
                    if (m.swapKb != null && Object.hasOwnProperty.call(m, "swapKb"))
                        w.uint32(32).int32(m.swapKb);
                    return w;
                };

                /**
                 * Encodes the specified Mapping message, length delimited. Does not implicitly {@link perfetto.protos.ProfilerSmaps.Mapping.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.ProfilerSmaps.Mapping
                 * @static
                 * @param {perfetto.protos.ProfilerSmaps.IMapping} message Mapping message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Mapping.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Mapping message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.ProfilerSmaps.Mapping
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.ProfilerSmaps.Mapping} Mapping
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Mapping.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ProfilerSmaps.Mapping();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.path = r.string();
                            break;
                        case 2:
                            m.sizeKb = r.int32();
                            break;
                        case 3:
                            m.privateDirtyKb = r.int32();
                            break;
                        case 4:
                            m.swapKb = r.int32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Mapping message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.ProfilerSmaps.Mapping
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.ProfilerSmaps.Mapping} Mapping
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Mapping.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Mapping message.
                 * @function verify
                 * @memberof perfetto.protos.ProfilerSmaps.Mapping
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Mapping.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.path != null && m.hasOwnProperty("path")) {
                        if (!$util.isString(m.path))
                            return "path: string expected";
                    }
                    if (m.sizeKb != null && m.hasOwnProperty("sizeKb")) {
                        if (!$util.isInteger(m.sizeKb))
                            return "sizeKb: integer expected";
                    }
                    if (m.privateDirtyKb != null && m.hasOwnProperty("privateDirtyKb")) {
                        if (!$util.isInteger(m.privateDirtyKb))
                            return "privateDirtyKb: integer expected";
                    }
                    if (m.swapKb != null && m.hasOwnProperty("swapKb")) {
                        if (!$util.isInteger(m.swapKb))
                            return "swapKb: integer expected";
                    }
                    return null;
                };

                /**
                 * Creates a Mapping message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.ProfilerSmaps.Mapping
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.ProfilerSmaps.Mapping} Mapping
                 */
                Mapping.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.ProfilerSmaps.Mapping)
                        return d;
                    var m = new $root.perfetto.protos.ProfilerSmaps.Mapping();
                    if (d.path != null) {
                        m.path = String(d.path);
                    }
                    if (d.sizeKb != null) {
                        m.sizeKb = d.sizeKb | 0;
                    }
                    if (d.privateDirtyKb != null) {
                        m.privateDirtyKb = d.privateDirtyKb | 0;
                    }
                    if (d.swapKb != null) {
                        m.swapKb = d.swapKb | 0;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Mapping message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.ProfilerSmaps.Mapping
                 * @static
                 * @param {perfetto.protos.ProfilerSmaps.Mapping} m Mapping
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Mapping.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.path = "";
                        d.sizeKb = 0;
                        d.privateDirtyKb = 0;
                        d.swapKb = 0;
                    }
                    if (m.path != null && m.hasOwnProperty("path")) {
                        d.path = m.path;
                    }
                    if (m.sizeKb != null && m.hasOwnProperty("sizeKb")) {
                        d.sizeKb = m.sizeKb;
                    }
                    if (m.privateDirtyKb != null && m.hasOwnProperty("privateDirtyKb")) {
                        d.privateDirtyKb = m.privateDirtyKb;
                    }
                    if (m.swapKb != null && m.hasOwnProperty("swapKb")) {
                        d.swapKb = m.swapKb;
                    }
                    return d;
                };

                /**
                 * Converts this Mapping to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.ProfilerSmaps.Mapping
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Mapping.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Mapping;
            })();

            ProfilerSmaps.Instance = (function() {

                /**
                 * Properties of an Instance.
                 * @memberof perfetto.protos.ProfilerSmaps
                 * @interface IInstance
                 * @property {perfetto.protos.IAndroidProcessMetadata|null} [process] Instance process
                 * @property {Array.<perfetto.protos.ProfilerSmaps.IMapping>|null} [mappings] Instance mappings
                 */

                /**
                 * Constructs a new Instance.
                 * @memberof perfetto.protos.ProfilerSmaps
                 * @classdesc Represents an Instance.
                 * @implements IInstance
                 * @constructor
                 * @param {perfetto.protos.ProfilerSmaps.IInstance=} [p] Properties to set
                 */
                function Instance(p) {
                    this.mappings = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Instance process.
                 * @member {perfetto.protos.IAndroidProcessMetadata|null|undefined} process
                 * @memberof perfetto.protos.ProfilerSmaps.Instance
                 * @instance
                 */
                Instance.prototype.process = null;

                /**
                 * Instance mappings.
                 * @member {Array.<perfetto.protos.ProfilerSmaps.IMapping>} mappings
                 * @memberof perfetto.protos.ProfilerSmaps.Instance
                 * @instance
                 */
                Instance.prototype.mappings = $util.emptyArray;

                /**
                 * Creates a new Instance instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.ProfilerSmaps.Instance
                 * @static
                 * @param {perfetto.protos.ProfilerSmaps.IInstance=} [properties] Properties to set
                 * @returns {perfetto.protos.ProfilerSmaps.Instance} Instance instance
                 */
                Instance.create = function create(properties) {
                    return new Instance(properties);
                };

                /**
                 * Encodes the specified Instance message. Does not implicitly {@link perfetto.protos.ProfilerSmaps.Instance.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.ProfilerSmaps.Instance
                 * @static
                 * @param {perfetto.protos.ProfilerSmaps.IInstance} m Instance message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Instance.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.process != null && Object.hasOwnProperty.call(m, "process"))
                        $root.perfetto.protos.AndroidProcessMetadata.encode(m.process, w.uint32(10).fork()).ldelim();
                    if (m.mappings != null && m.mappings.length) {
                        for (var i = 0; i < m.mappings.length; ++i)
                            $root.perfetto.protos.ProfilerSmaps.Mapping.encode(m.mappings[i], w.uint32(18).fork()).ldelim();
                    }
                    return w;
                };

                /**
                 * Encodes the specified Instance message, length delimited. Does not implicitly {@link perfetto.protos.ProfilerSmaps.Instance.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.ProfilerSmaps.Instance
                 * @static
                 * @param {perfetto.protos.ProfilerSmaps.IInstance} message Instance message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Instance.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an Instance message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.ProfilerSmaps.Instance
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.ProfilerSmaps.Instance} Instance
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Instance.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ProfilerSmaps.Instance();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.process = $root.perfetto.protos.AndroidProcessMetadata.decode(r, r.uint32());
                            break;
                        case 2:
                            if (!(m.mappings && m.mappings.length))
                                m.mappings = [];
                            m.mappings.push($root.perfetto.protos.ProfilerSmaps.Mapping.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an Instance message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.ProfilerSmaps.Instance
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.ProfilerSmaps.Instance} Instance
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Instance.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an Instance message.
                 * @function verify
                 * @memberof perfetto.protos.ProfilerSmaps.Instance
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Instance.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.process != null && m.hasOwnProperty("process")) {
                        {
                            var e = $root.perfetto.protos.AndroidProcessMetadata.verify(m.process);
                            if (e)
                                return "process." + e;
                        }
                    }
                    if (m.mappings != null && m.hasOwnProperty("mappings")) {
                        if (!Array.isArray(m.mappings))
                            return "mappings: array expected";
                        for (var i = 0; i < m.mappings.length; ++i) {
                            {
                                var e = $root.perfetto.protos.ProfilerSmaps.Mapping.verify(m.mappings[i]);
                                if (e)
                                    return "mappings." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates an Instance message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.ProfilerSmaps.Instance
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.ProfilerSmaps.Instance} Instance
                 */
                Instance.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.ProfilerSmaps.Instance)
                        return d;
                    var m = new $root.perfetto.protos.ProfilerSmaps.Instance();
                    if (d.process != null) {
                        if (typeof d.process !== "object")
                            throw TypeError(".perfetto.protos.ProfilerSmaps.Instance.process: object expected");
                        m.process = $root.perfetto.protos.AndroidProcessMetadata.fromObject(d.process);
                    }
                    if (d.mappings) {
                        if (!Array.isArray(d.mappings))
                            throw TypeError(".perfetto.protos.ProfilerSmaps.Instance.mappings: array expected");
                        m.mappings = [];
                        for (var i = 0; i < d.mappings.length; ++i) {
                            if (typeof d.mappings[i] !== "object")
                                throw TypeError(".perfetto.protos.ProfilerSmaps.Instance.mappings: object expected");
                            m.mappings[i] = $root.perfetto.protos.ProfilerSmaps.Mapping.fromObject(d.mappings[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an Instance message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.ProfilerSmaps.Instance
                 * @static
                 * @param {perfetto.protos.ProfilerSmaps.Instance} m Instance
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Instance.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.mappings = [];
                    }
                    if (o.defaults) {
                        d.process = null;
                    }
                    if (m.process != null && m.hasOwnProperty("process")) {
                        d.process = $root.perfetto.protos.AndroidProcessMetadata.toObject(m.process, o);
                    }
                    if (m.mappings && m.mappings.length) {
                        d.mappings = [];
                        for (var j = 0; j < m.mappings.length; ++j) {
                            d.mappings[j] = $root.perfetto.protos.ProfilerSmaps.Mapping.toObject(m.mappings[j], o);
                        }
                    }
                    return d;
                };

                /**
                 * Converts this Instance to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.ProfilerSmaps.Instance
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Instance.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Instance;
            })();

            return ProfilerSmaps;
        })();

        protos.AndroidRtRuntimeMetric = (function() {

            /**
             * Properties of an AndroidRtRuntimeMetric.
             * @memberof perfetto.protos
             * @interface IAndroidRtRuntimeMetric
             * @property {number|null} [maxRuntime] AndroidRtRuntimeMetric maxRuntime
             * @property {number|null} [over_5msCount] AndroidRtRuntimeMetric over_5msCount
             * @property {Array.<perfetto.protos.AndroidRtRuntimeMetric.IRtSlice>|null} [longestRtSlices] AndroidRtRuntimeMetric longestRtSlices
             */

            /**
             * Constructs a new AndroidRtRuntimeMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidRtRuntimeMetric.
             * @implements IAndroidRtRuntimeMetric
             * @constructor
             * @param {perfetto.protos.IAndroidRtRuntimeMetric=} [p] Properties to set
             */
            function AndroidRtRuntimeMetric(p) {
                this.longestRtSlices = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidRtRuntimeMetric maxRuntime.
             * @member {number} maxRuntime
             * @memberof perfetto.protos.AndroidRtRuntimeMetric
             * @instance
             */
            AndroidRtRuntimeMetric.prototype.maxRuntime = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * AndroidRtRuntimeMetric over_5msCount.
             * @member {number} over_5msCount
             * @memberof perfetto.protos.AndroidRtRuntimeMetric
             * @instance
             */
            AndroidRtRuntimeMetric.prototype.over_5msCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * AndroidRtRuntimeMetric longestRtSlices.
             * @member {Array.<perfetto.protos.AndroidRtRuntimeMetric.IRtSlice>} longestRtSlices
             * @memberof perfetto.protos.AndroidRtRuntimeMetric
             * @instance
             */
            AndroidRtRuntimeMetric.prototype.longestRtSlices = $util.emptyArray;

            /**
             * Creates a new AndroidRtRuntimeMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidRtRuntimeMetric
             * @static
             * @param {perfetto.protos.IAndroidRtRuntimeMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidRtRuntimeMetric} AndroidRtRuntimeMetric instance
             */
            AndroidRtRuntimeMetric.create = function create(properties) {
                return new AndroidRtRuntimeMetric(properties);
            };

            /**
             * Encodes the specified AndroidRtRuntimeMetric message. Does not implicitly {@link perfetto.protos.AndroidRtRuntimeMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidRtRuntimeMetric
             * @static
             * @param {perfetto.protos.IAndroidRtRuntimeMetric} m AndroidRtRuntimeMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidRtRuntimeMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.maxRuntime != null && Object.hasOwnProperty.call(m, "maxRuntime"))
                    w.uint32(8).int64(m.maxRuntime);
                if (m.over_5msCount != null && Object.hasOwnProperty.call(m, "over_5msCount"))
                    w.uint32(16).int64(m.over_5msCount);
                if (m.longestRtSlices != null && m.longestRtSlices.length) {
                    for (var i = 0; i < m.longestRtSlices.length; ++i)
                        $root.perfetto.protos.AndroidRtRuntimeMetric.RtSlice.encode(m.longestRtSlices[i], w.uint32(26).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified AndroidRtRuntimeMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidRtRuntimeMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidRtRuntimeMetric
             * @static
             * @param {perfetto.protos.IAndroidRtRuntimeMetric} message AndroidRtRuntimeMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidRtRuntimeMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidRtRuntimeMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidRtRuntimeMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidRtRuntimeMetric} AndroidRtRuntimeMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidRtRuntimeMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidRtRuntimeMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.maxRuntime = r.int64();
                        break;
                    case 2:
                        m.over_5msCount = r.int64();
                        break;
                    case 3:
                        if (!(m.longestRtSlices && m.longestRtSlices.length))
                            m.longestRtSlices = [];
                        m.longestRtSlices.push($root.perfetto.protos.AndroidRtRuntimeMetric.RtSlice.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidRtRuntimeMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidRtRuntimeMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidRtRuntimeMetric} AndroidRtRuntimeMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidRtRuntimeMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidRtRuntimeMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidRtRuntimeMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidRtRuntimeMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.maxRuntime != null && m.hasOwnProperty("maxRuntime")) {
                    if (!$util.isInteger(m.maxRuntime) && !(m.maxRuntime && $util.isInteger(m.maxRuntime.low) && $util.isInteger(m.maxRuntime.high)))
                        return "maxRuntime: integer|Long expected";
                }
                if (m.over_5msCount != null && m.hasOwnProperty("over_5msCount")) {
                    if (!$util.isInteger(m.over_5msCount) && !(m.over_5msCount && $util.isInteger(m.over_5msCount.low) && $util.isInteger(m.over_5msCount.high)))
                        return "over_5msCount: integer|Long expected";
                }
                if (m.longestRtSlices != null && m.hasOwnProperty("longestRtSlices")) {
                    if (!Array.isArray(m.longestRtSlices))
                        return "longestRtSlices: array expected";
                    for (var i = 0; i < m.longestRtSlices.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidRtRuntimeMetric.RtSlice.verify(m.longestRtSlices[i]);
                            if (e)
                                return "longestRtSlices." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidRtRuntimeMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidRtRuntimeMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidRtRuntimeMetric} AndroidRtRuntimeMetric
             */
            AndroidRtRuntimeMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidRtRuntimeMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidRtRuntimeMetric();
                if (d.maxRuntime != null) {
                    if ($util.Long)
                        (m.maxRuntime = $util.Long.fromValue(d.maxRuntime)).unsigned = false;
                    else if (typeof d.maxRuntime === "string")
                        m.maxRuntime = parseInt(d.maxRuntime, 10);
                    else if (typeof d.maxRuntime === "number")
                        m.maxRuntime = d.maxRuntime;
                    else if (typeof d.maxRuntime === "object")
                        m.maxRuntime = new $util.LongBits(d.maxRuntime.low >>> 0, d.maxRuntime.high >>> 0).toNumber();
                }
                if (d.over_5msCount != null) {
                    if ($util.Long)
                        (m.over_5msCount = $util.Long.fromValue(d.over_5msCount)).unsigned = false;
                    else if (typeof d.over_5msCount === "string")
                        m.over_5msCount = parseInt(d.over_5msCount, 10);
                    else if (typeof d.over_5msCount === "number")
                        m.over_5msCount = d.over_5msCount;
                    else if (typeof d.over_5msCount === "object")
                        m.over_5msCount = new $util.LongBits(d.over_5msCount.low >>> 0, d.over_5msCount.high >>> 0).toNumber();
                }
                if (d.longestRtSlices) {
                    if (!Array.isArray(d.longestRtSlices))
                        throw TypeError(".perfetto.protos.AndroidRtRuntimeMetric.longestRtSlices: array expected");
                    m.longestRtSlices = [];
                    for (var i = 0; i < d.longestRtSlices.length; ++i) {
                        if (typeof d.longestRtSlices[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidRtRuntimeMetric.longestRtSlices: object expected");
                        m.longestRtSlices[i] = $root.perfetto.protos.AndroidRtRuntimeMetric.RtSlice.fromObject(d.longestRtSlices[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidRtRuntimeMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidRtRuntimeMetric
             * @static
             * @param {perfetto.protos.AndroidRtRuntimeMetric} m AndroidRtRuntimeMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidRtRuntimeMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.longestRtSlices = [];
                }
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.maxRuntime = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.maxRuntime = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.over_5msCount = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.over_5msCount = o.longs === String ? "0" : 0;
                }
                if (m.maxRuntime != null && m.hasOwnProperty("maxRuntime")) {
                    if (typeof m.maxRuntime === "number")
                        d.maxRuntime = o.longs === String ? String(m.maxRuntime) : m.maxRuntime;
                    else
                        d.maxRuntime = o.longs === String ? $util.Long.prototype.toString.call(m.maxRuntime) : o.longs === Number ? new $util.LongBits(m.maxRuntime.low >>> 0, m.maxRuntime.high >>> 0).toNumber() : m.maxRuntime;
                }
                if (m.over_5msCount != null && m.hasOwnProperty("over_5msCount")) {
                    if (typeof m.over_5msCount === "number")
                        d.over_5msCount = o.longs === String ? String(m.over_5msCount) : m.over_5msCount;
                    else
                        d.over_5msCount = o.longs === String ? $util.Long.prototype.toString.call(m.over_5msCount) : o.longs === Number ? new $util.LongBits(m.over_5msCount.low >>> 0, m.over_5msCount.high >>> 0).toNumber() : m.over_5msCount;
                }
                if (m.longestRtSlices && m.longestRtSlices.length) {
                    d.longestRtSlices = [];
                    for (var j = 0; j < m.longestRtSlices.length; ++j) {
                        d.longestRtSlices[j] = $root.perfetto.protos.AndroidRtRuntimeMetric.RtSlice.toObject(m.longestRtSlices[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidRtRuntimeMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidRtRuntimeMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidRtRuntimeMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidRtRuntimeMetric.RtSlice = (function() {

                /**
                 * Properties of a RtSlice.
                 * @memberof perfetto.protos.AndroidRtRuntimeMetric
                 * @interface IRtSlice
                 * @property {string|null} [tname] RtSlice tname
                 * @property {number|null} [ts] RtSlice ts
                 * @property {number|null} [dur] RtSlice dur
                 */

                /**
                 * Constructs a new RtSlice.
                 * @memberof perfetto.protos.AndroidRtRuntimeMetric
                 * @classdesc Represents a RtSlice.
                 * @implements IRtSlice
                 * @constructor
                 * @param {perfetto.protos.AndroidRtRuntimeMetric.IRtSlice=} [p] Properties to set
                 */
                function RtSlice(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * RtSlice tname.
                 * @member {string} tname
                 * @memberof perfetto.protos.AndroidRtRuntimeMetric.RtSlice
                 * @instance
                 */
                RtSlice.prototype.tname = "";

                /**
                 * RtSlice ts.
                 * @member {number} ts
                 * @memberof perfetto.protos.AndroidRtRuntimeMetric.RtSlice
                 * @instance
                 */
                RtSlice.prototype.ts = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * RtSlice dur.
                 * @member {number} dur
                 * @memberof perfetto.protos.AndroidRtRuntimeMetric.RtSlice
                 * @instance
                 */
                RtSlice.prototype.dur = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new RtSlice instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidRtRuntimeMetric.RtSlice
                 * @static
                 * @param {perfetto.protos.AndroidRtRuntimeMetric.IRtSlice=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidRtRuntimeMetric.RtSlice} RtSlice instance
                 */
                RtSlice.create = function create(properties) {
                    return new RtSlice(properties);
                };

                /**
                 * Encodes the specified RtSlice message. Does not implicitly {@link perfetto.protos.AndroidRtRuntimeMetric.RtSlice.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidRtRuntimeMetric.RtSlice
                 * @static
                 * @param {perfetto.protos.AndroidRtRuntimeMetric.IRtSlice} m RtSlice message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                RtSlice.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.tname != null && Object.hasOwnProperty.call(m, "tname"))
                        w.uint32(10).string(m.tname);
                    if (m.ts != null && Object.hasOwnProperty.call(m, "ts"))
                        w.uint32(16).int64(m.ts);
                    if (m.dur != null && Object.hasOwnProperty.call(m, "dur"))
                        w.uint32(24).int64(m.dur);
                    return w;
                };

                /**
                 * Encodes the specified RtSlice message, length delimited. Does not implicitly {@link perfetto.protos.AndroidRtRuntimeMetric.RtSlice.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidRtRuntimeMetric.RtSlice
                 * @static
                 * @param {perfetto.protos.AndroidRtRuntimeMetric.IRtSlice} message RtSlice message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                RtSlice.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a RtSlice message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidRtRuntimeMetric.RtSlice
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidRtRuntimeMetric.RtSlice} RtSlice
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                RtSlice.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidRtRuntimeMetric.RtSlice();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.tname = r.string();
                            break;
                        case 2:
                            m.ts = r.int64();
                            break;
                        case 3:
                            m.dur = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a RtSlice message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidRtRuntimeMetric.RtSlice
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidRtRuntimeMetric.RtSlice} RtSlice
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                RtSlice.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a RtSlice message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidRtRuntimeMetric.RtSlice
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                RtSlice.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.tname != null && m.hasOwnProperty("tname")) {
                        if (!$util.isString(m.tname))
                            return "tname: string expected";
                    }
                    if (m.ts != null && m.hasOwnProperty("ts")) {
                        if (!$util.isInteger(m.ts) && !(m.ts && $util.isInteger(m.ts.low) && $util.isInteger(m.ts.high)))
                            return "ts: integer|Long expected";
                    }
                    if (m.dur != null && m.hasOwnProperty("dur")) {
                        if (!$util.isInteger(m.dur) && !(m.dur && $util.isInteger(m.dur.low) && $util.isInteger(m.dur.high)))
                            return "dur: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a RtSlice message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidRtRuntimeMetric.RtSlice
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidRtRuntimeMetric.RtSlice} RtSlice
                 */
                RtSlice.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidRtRuntimeMetric.RtSlice)
                        return d;
                    var m = new $root.perfetto.protos.AndroidRtRuntimeMetric.RtSlice();
                    if (d.tname != null) {
                        m.tname = String(d.tname);
                    }
                    if (d.ts != null) {
                        if ($util.Long)
                            (m.ts = $util.Long.fromValue(d.ts)).unsigned = false;
                        else if (typeof d.ts === "string")
                            m.ts = parseInt(d.ts, 10);
                        else if (typeof d.ts === "number")
                            m.ts = d.ts;
                        else if (typeof d.ts === "object")
                            m.ts = new $util.LongBits(d.ts.low >>> 0, d.ts.high >>> 0).toNumber();
                    }
                    if (d.dur != null) {
                        if ($util.Long)
                            (m.dur = $util.Long.fromValue(d.dur)).unsigned = false;
                        else if (typeof d.dur === "string")
                            m.dur = parseInt(d.dur, 10);
                        else if (typeof d.dur === "number")
                            m.dur = d.dur;
                        else if (typeof d.dur === "object")
                            m.dur = new $util.LongBits(d.dur.low >>> 0, d.dur.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a RtSlice message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidRtRuntimeMetric.RtSlice
                 * @static
                 * @param {perfetto.protos.AndroidRtRuntimeMetric.RtSlice} m RtSlice
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                RtSlice.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.tname = "";
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.ts = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.ts = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.dur = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.dur = o.longs === String ? "0" : 0;
                    }
                    if (m.tname != null && m.hasOwnProperty("tname")) {
                        d.tname = m.tname;
                    }
                    if (m.ts != null && m.hasOwnProperty("ts")) {
                        if (typeof m.ts === "number")
                            d.ts = o.longs === String ? String(m.ts) : m.ts;
                        else
                            d.ts = o.longs === String ? $util.Long.prototype.toString.call(m.ts) : o.longs === Number ? new $util.LongBits(m.ts.low >>> 0, m.ts.high >>> 0).toNumber() : m.ts;
                    }
                    if (m.dur != null && m.hasOwnProperty("dur")) {
                        if (typeof m.dur === "number")
                            d.dur = o.longs === String ? String(m.dur) : m.dur;
                        else
                            d.dur = o.longs === String ? $util.Long.prototype.toString.call(m.dur) : o.longs === Number ? new $util.LongBits(m.dur.low >>> 0, m.dur.high >>> 0).toNumber() : m.dur;
                    }
                    return d;
                };

                /**
                 * Converts this RtSlice to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidRtRuntimeMetric.RtSlice
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                RtSlice.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return RtSlice;
            })();

            return AndroidRtRuntimeMetric;
        })();

        protos.AndroidSimpleperfMetric = (function() {

            /**
             * Properties of an AndroidSimpleperfMetric.
             * @memberof perfetto.protos
             * @interface IAndroidSimpleperfMetric
             * @property {number|null} [urgentRatio] AndroidSimpleperfMetric urgentRatio
             * @property {Array.<perfetto.protos.AndroidSimpleperfMetric.IPerfEventMetric>|null} [events] AndroidSimpleperfMetric events
             */

            /**
             * Constructs a new AndroidSimpleperfMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidSimpleperfMetric.
             * @implements IAndroidSimpleperfMetric
             * @constructor
             * @param {perfetto.protos.IAndroidSimpleperfMetric=} [p] Properties to set
             */
            function AndroidSimpleperfMetric(p) {
                this.events = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidSimpleperfMetric urgentRatio.
             * @member {number} urgentRatio
             * @memberof perfetto.protos.AndroidSimpleperfMetric
             * @instance
             */
            AndroidSimpleperfMetric.prototype.urgentRatio = 0;

            /**
             * AndroidSimpleperfMetric events.
             * @member {Array.<perfetto.protos.AndroidSimpleperfMetric.IPerfEventMetric>} events
             * @memberof perfetto.protos.AndroidSimpleperfMetric
             * @instance
             */
            AndroidSimpleperfMetric.prototype.events = $util.emptyArray;

            /**
             * Creates a new AndroidSimpleperfMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidSimpleperfMetric
             * @static
             * @param {perfetto.protos.IAndroidSimpleperfMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidSimpleperfMetric} AndroidSimpleperfMetric instance
             */
            AndroidSimpleperfMetric.create = function create(properties) {
                return new AndroidSimpleperfMetric(properties);
            };

            /**
             * Encodes the specified AndroidSimpleperfMetric message. Does not implicitly {@link perfetto.protos.AndroidSimpleperfMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidSimpleperfMetric
             * @static
             * @param {perfetto.protos.IAndroidSimpleperfMetric} m AndroidSimpleperfMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidSimpleperfMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.urgentRatio != null && Object.hasOwnProperty.call(m, "urgentRatio"))
                    w.uint32(9).double(m.urgentRatio);
                if (m.events != null && m.events.length) {
                    for (var i = 0; i < m.events.length; ++i)
                        $root.perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.encode(m.events[i], w.uint32(18).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified AndroidSimpleperfMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidSimpleperfMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidSimpleperfMetric
             * @static
             * @param {perfetto.protos.IAndroidSimpleperfMetric} message AndroidSimpleperfMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidSimpleperfMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidSimpleperfMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidSimpleperfMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidSimpleperfMetric} AndroidSimpleperfMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidSimpleperfMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidSimpleperfMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.urgentRatio = r.double();
                        break;
                    case 2:
                        if (!(m.events && m.events.length))
                            m.events = [];
                        m.events.push($root.perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidSimpleperfMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidSimpleperfMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidSimpleperfMetric} AndroidSimpleperfMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidSimpleperfMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidSimpleperfMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidSimpleperfMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidSimpleperfMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.urgentRatio != null && m.hasOwnProperty("urgentRatio")) {
                    if (typeof m.urgentRatio !== "number")
                        return "urgentRatio: number expected";
                }
                if (m.events != null && m.hasOwnProperty("events")) {
                    if (!Array.isArray(m.events))
                        return "events: array expected";
                    for (var i = 0; i < m.events.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.verify(m.events[i]);
                            if (e)
                                return "events." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidSimpleperfMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidSimpleperfMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidSimpleperfMetric} AndroidSimpleperfMetric
             */
            AndroidSimpleperfMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidSimpleperfMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidSimpleperfMetric();
                if (d.urgentRatio != null) {
                    m.urgentRatio = Number(d.urgentRatio);
                }
                if (d.events) {
                    if (!Array.isArray(d.events))
                        throw TypeError(".perfetto.protos.AndroidSimpleperfMetric.events: array expected");
                    m.events = [];
                    for (var i = 0; i < d.events.length; ++i) {
                        if (typeof d.events[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidSimpleperfMetric.events: object expected");
                        m.events[i] = $root.perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.fromObject(d.events[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidSimpleperfMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidSimpleperfMetric
             * @static
             * @param {perfetto.protos.AndroidSimpleperfMetric} m AndroidSimpleperfMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidSimpleperfMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.events = [];
                }
                if (o.defaults) {
                    d.urgentRatio = 0;
                }
                if (m.urgentRatio != null && m.hasOwnProperty("urgentRatio")) {
                    d.urgentRatio = o.json && !isFinite(m.urgentRatio) ? String(m.urgentRatio) : m.urgentRatio;
                }
                if (m.events && m.events.length) {
                    d.events = [];
                    for (var j = 0; j < m.events.length; ++j) {
                        d.events[j] = $root.perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.toObject(m.events[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidSimpleperfMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidSimpleperfMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidSimpleperfMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidSimpleperfMetric.PerfEventMetric = (function() {

                /**
                 * Properties of a PerfEventMetric.
                 * @memberof perfetto.protos.AndroidSimpleperfMetric
                 * @interface IPerfEventMetric
                 * @property {string|null} [name] PerfEventMetric name
                 * @property {Array.<perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.IProcess>|null} [processes] PerfEventMetric processes
                 * @property {number|null} [total] PerfEventMetric total
                 */

                /**
                 * Constructs a new PerfEventMetric.
                 * @memberof perfetto.protos.AndroidSimpleperfMetric
                 * @classdesc Represents a PerfEventMetric.
                 * @implements IPerfEventMetric
                 * @constructor
                 * @param {perfetto.protos.AndroidSimpleperfMetric.IPerfEventMetric=} [p] Properties to set
                 */
                function PerfEventMetric(p) {
                    this.processes = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * PerfEventMetric name.
                 * @member {string} name
                 * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric
                 * @instance
                 */
                PerfEventMetric.prototype.name = "";

                /**
                 * PerfEventMetric processes.
                 * @member {Array.<perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.IProcess>} processes
                 * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric
                 * @instance
                 */
                PerfEventMetric.prototype.processes = $util.emptyArray;

                /**
                 * PerfEventMetric total.
                 * @member {number} total
                 * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric
                 * @instance
                 */
                PerfEventMetric.prototype.total = 0;

                /**
                 * Creates a new PerfEventMetric instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric
                 * @static
                 * @param {perfetto.protos.AndroidSimpleperfMetric.IPerfEventMetric=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric} PerfEventMetric instance
                 */
                PerfEventMetric.create = function create(properties) {
                    return new PerfEventMetric(properties);
                };

                /**
                 * Encodes the specified PerfEventMetric message. Does not implicitly {@link perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric
                 * @static
                 * @param {perfetto.protos.AndroidSimpleperfMetric.IPerfEventMetric} m PerfEventMetric message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PerfEventMetric.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(10).string(m.name);
                    if (m.processes != null && m.processes.length) {
                        for (var i = 0; i < m.processes.length; ++i)
                            $root.perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process.encode(m.processes[i], w.uint32(18).fork()).ldelim();
                    }
                    if (m.total != null && Object.hasOwnProperty.call(m, "total"))
                        w.uint32(25).double(m.total);
                    return w;
                };

                /**
                 * Encodes the specified PerfEventMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric
                 * @static
                 * @param {perfetto.protos.AndroidSimpleperfMetric.IPerfEventMetric} message PerfEventMetric message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PerfEventMetric.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a PerfEventMetric message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric} PerfEventMetric
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PerfEventMetric.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.name = r.string();
                            break;
                        case 2:
                            if (!(m.processes && m.processes.length))
                                m.processes = [];
                            m.processes.push($root.perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process.decode(r, r.uint32()));
                            break;
                        case 3:
                            m.total = r.double();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a PerfEventMetric message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric} PerfEventMetric
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PerfEventMetric.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a PerfEventMetric message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                PerfEventMetric.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    if (m.processes != null && m.hasOwnProperty("processes")) {
                        if (!Array.isArray(m.processes))
                            return "processes: array expected";
                        for (var i = 0; i < m.processes.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process.verify(m.processes[i]);
                                if (e)
                                    return "processes." + e;
                            }
                        }
                    }
                    if (m.total != null && m.hasOwnProperty("total")) {
                        if (typeof m.total !== "number")
                            return "total: number expected";
                    }
                    return null;
                };

                /**
                 * Creates a PerfEventMetric message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric} PerfEventMetric
                 */
                PerfEventMetric.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric)
                        return d;
                    var m = new $root.perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric();
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    if (d.processes) {
                        if (!Array.isArray(d.processes))
                            throw TypeError(".perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.processes: array expected");
                        m.processes = [];
                        for (var i = 0; i < d.processes.length; ++i) {
                            if (typeof d.processes[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.processes: object expected");
                            m.processes[i] = $root.perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process.fromObject(d.processes[i]);
                        }
                    }
                    if (d.total != null) {
                        m.total = Number(d.total);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a PerfEventMetric message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric
                 * @static
                 * @param {perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric} m PerfEventMetric
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                PerfEventMetric.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.processes = [];
                    }
                    if (o.defaults) {
                        d.name = "";
                        d.total = 0;
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    if (m.processes && m.processes.length) {
                        d.processes = [];
                        for (var j = 0; j < m.processes.length; ++j) {
                            d.processes[j] = $root.perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process.toObject(m.processes[j], o);
                        }
                    }
                    if (m.total != null && m.hasOwnProperty("total")) {
                        d.total = o.json && !isFinite(m.total) ? String(m.total) : m.total;
                    }
                    return d;
                };

                /**
                 * Converts this PerfEventMetric to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                PerfEventMetric.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                PerfEventMetric.Thread = (function() {

                    /**
                     * Properties of a Thread.
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric
                     * @interface IThread
                     * @property {number|null} [tid] Thread tid
                     * @property {string|null} [name] Thread name
                     * @property {number|null} [cpu] Thread cpu
                     * @property {number|null} [total] Thread total
                     */

                    /**
                     * Constructs a new Thread.
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric
                     * @classdesc Represents a Thread.
                     * @implements IThread
                     * @constructor
                     * @param {perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.IThread=} [p] Properties to set
                     */
                    function Thread(p) {
                        if (p)
                            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                                if (p[ks[i]] != null)
                                    this[ks[i]] = p[ks[i]];
                    }

                    /**
                     * Thread tid.
                     * @member {number} tid
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread
                     * @instance
                     */
                    Thread.prototype.tid = 0;

                    /**
                     * Thread name.
                     * @member {string} name
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread
                     * @instance
                     */
                    Thread.prototype.name = "";

                    /**
                     * Thread cpu.
                     * @member {number} cpu
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread
                     * @instance
                     */
                    Thread.prototype.cpu = 0;

                    /**
                     * Thread total.
                     * @member {number} total
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread
                     * @instance
                     */
                    Thread.prototype.total = 0;

                    /**
                     * Creates a new Thread instance using the specified properties.
                     * @function create
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread
                     * @static
                     * @param {perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.IThread=} [properties] Properties to set
                     * @returns {perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread} Thread instance
                     */
                    Thread.create = function create(properties) {
                        return new Thread(properties);
                    };

                    /**
                     * Encodes the specified Thread message. Does not implicitly {@link perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread.verify|verify} messages.
                     * @function encode
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread
                     * @static
                     * @param {perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.IThread} m Thread message or plain object to encode
                     * @param {$protobuf.Writer} [w] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Thread.encode = function encode(m, w) {
                        if (!w)
                            w = $Writer.create();
                        if (m.tid != null && Object.hasOwnProperty.call(m, "tid"))
                            w.uint32(8).int32(m.tid);
                        if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                            w.uint32(18).string(m.name);
                        if (m.cpu != null && Object.hasOwnProperty.call(m, "cpu"))
                            w.uint32(24).int32(m.cpu);
                        if (m.total != null && Object.hasOwnProperty.call(m, "total"))
                            w.uint32(33).double(m.total);
                        return w;
                    };

                    /**
                     * Encodes the specified Thread message, length delimited. Does not implicitly {@link perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread
                     * @static
                     * @param {perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.IThread} message Thread message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Thread.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a Thread message from the specified reader or buffer.
                     * @function decode
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                     * @param {number} [l] Message length if known beforehand
                     * @returns {perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread} Thread
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Thread.decode = function decode(r, l) {
                        if (!(r instanceof $Reader))
                            r = $Reader.create(r);
                        var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread();
                        while (r.pos < c) {
                            var t = r.uint32();
                            switch (t >>> 3) {
                            case 1:
                                m.tid = r.int32();
                                break;
                            case 2:
                                m.name = r.string();
                                break;
                            case 3:
                                m.cpu = r.int32();
                                break;
                            case 4:
                                m.total = r.double();
                                break;
                            default:
                                r.skipType(t & 7);
                                break;
                            }
                        }
                        return m;
                    };

                    /**
                     * Decodes a Thread message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread} Thread
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Thread.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a Thread message.
                     * @function verify
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread
                     * @static
                     * @param {Object.<string,*>} m Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    Thread.verify = function verify(m) {
                        if (typeof m !== "object" || m === null)
                            return "object expected";
                        if (m.tid != null && m.hasOwnProperty("tid")) {
                            if (!$util.isInteger(m.tid))
                                return "tid: integer expected";
                        }
                        if (m.name != null && m.hasOwnProperty("name")) {
                            if (!$util.isString(m.name))
                                return "name: string expected";
                        }
                        if (m.cpu != null && m.hasOwnProperty("cpu")) {
                            if (!$util.isInteger(m.cpu))
                                return "cpu: integer expected";
                        }
                        if (m.total != null && m.hasOwnProperty("total")) {
                            if (typeof m.total !== "number")
                                return "total: number expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a Thread message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread
                     * @static
                     * @param {Object.<string,*>} d Plain object
                     * @returns {perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread} Thread
                     */
                    Thread.fromObject = function fromObject(d) {
                        if (d instanceof $root.perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread)
                            return d;
                        var m = new $root.perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread();
                        if (d.tid != null) {
                            m.tid = d.tid | 0;
                        }
                        if (d.name != null) {
                            m.name = String(d.name);
                        }
                        if (d.cpu != null) {
                            m.cpu = d.cpu | 0;
                        }
                        if (d.total != null) {
                            m.total = Number(d.total);
                        }
                        return m;
                    };

                    /**
                     * Creates a plain object from a Thread message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread
                     * @static
                     * @param {perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread} m Thread
                     * @param {$protobuf.IConversionOptions} [o] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    Thread.toObject = function toObject(m, o) {
                        if (!o)
                            o = {};
                        var d = {};
                        if (o.defaults) {
                            d.tid = 0;
                            d.name = "";
                            d.cpu = 0;
                            d.total = 0;
                        }
                        if (m.tid != null && m.hasOwnProperty("tid")) {
                            d.tid = m.tid;
                        }
                        if (m.name != null && m.hasOwnProperty("name")) {
                            d.name = m.name;
                        }
                        if (m.cpu != null && m.hasOwnProperty("cpu")) {
                            d.cpu = m.cpu;
                        }
                        if (m.total != null && m.hasOwnProperty("total")) {
                            d.total = o.json && !isFinite(m.total) ? String(m.total) : m.total;
                        }
                        return d;
                    };

                    /**
                     * Converts this Thread to JSON.
                     * @function toJSON
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    Thread.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                    };

                    return Thread;
                })();

                PerfEventMetric.Process = (function() {

                    /**
                     * Properties of a Process.
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric
                     * @interface IProcess
                     * @property {number|null} [pid] Process pid
                     * @property {string|null} [name] Process name
                     * @property {Array.<perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.IThread>|null} [threads] Process threads
                     * @property {number|null} [total] Process total
                     */

                    /**
                     * Constructs a new Process.
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric
                     * @classdesc Represents a Process.
                     * @implements IProcess
                     * @constructor
                     * @param {perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.IProcess=} [p] Properties to set
                     */
                    function Process(p) {
                        this.threads = [];
                        if (p)
                            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                                if (p[ks[i]] != null)
                                    this[ks[i]] = p[ks[i]];
                    }

                    /**
                     * Process pid.
                     * @member {number} pid
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process
                     * @instance
                     */
                    Process.prototype.pid = 0;

                    /**
                     * Process name.
                     * @member {string} name
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process
                     * @instance
                     */
                    Process.prototype.name = "";

                    /**
                     * Process threads.
                     * @member {Array.<perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.IThread>} threads
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process
                     * @instance
                     */
                    Process.prototype.threads = $util.emptyArray;

                    /**
                     * Process total.
                     * @member {number} total
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process
                     * @instance
                     */
                    Process.prototype.total = 0;

                    /**
                     * Creates a new Process instance using the specified properties.
                     * @function create
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process
                     * @static
                     * @param {perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.IProcess=} [properties] Properties to set
                     * @returns {perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process} Process instance
                     */
                    Process.create = function create(properties) {
                        return new Process(properties);
                    };

                    /**
                     * Encodes the specified Process message. Does not implicitly {@link perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process.verify|verify} messages.
                     * @function encode
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process
                     * @static
                     * @param {perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.IProcess} m Process message or plain object to encode
                     * @param {$protobuf.Writer} [w] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Process.encode = function encode(m, w) {
                        if (!w)
                            w = $Writer.create();
                        if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                            w.uint32(8).int32(m.pid);
                        if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                            w.uint32(18).string(m.name);
                        if (m.threads != null && m.threads.length) {
                            for (var i = 0; i < m.threads.length; ++i)
                                $root.perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread.encode(m.threads[i], w.uint32(26).fork()).ldelim();
                        }
                        if (m.total != null && Object.hasOwnProperty.call(m, "total"))
                            w.uint32(33).double(m.total);
                        return w;
                    };

                    /**
                     * Encodes the specified Process message, length delimited. Does not implicitly {@link perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process
                     * @static
                     * @param {perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.IProcess} message Process message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Process.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a Process message from the specified reader or buffer.
                     * @function decode
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                     * @param {number} [l] Message length if known beforehand
                     * @returns {perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process} Process
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Process.decode = function decode(r, l) {
                        if (!(r instanceof $Reader))
                            r = $Reader.create(r);
                        var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process();
                        while (r.pos < c) {
                            var t = r.uint32();
                            switch (t >>> 3) {
                            case 1:
                                m.pid = r.int32();
                                break;
                            case 2:
                                m.name = r.string();
                                break;
                            case 3:
                                if (!(m.threads && m.threads.length))
                                    m.threads = [];
                                m.threads.push($root.perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread.decode(r, r.uint32()));
                                break;
                            case 4:
                                m.total = r.double();
                                break;
                            default:
                                r.skipType(t & 7);
                                break;
                            }
                        }
                        return m;
                    };

                    /**
                     * Decodes a Process message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process} Process
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Process.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a Process message.
                     * @function verify
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process
                     * @static
                     * @param {Object.<string,*>} m Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    Process.verify = function verify(m) {
                        if (typeof m !== "object" || m === null)
                            return "object expected";
                        if (m.pid != null && m.hasOwnProperty("pid")) {
                            if (!$util.isInteger(m.pid))
                                return "pid: integer expected";
                        }
                        if (m.name != null && m.hasOwnProperty("name")) {
                            if (!$util.isString(m.name))
                                return "name: string expected";
                        }
                        if (m.threads != null && m.hasOwnProperty("threads")) {
                            if (!Array.isArray(m.threads))
                                return "threads: array expected";
                            for (var i = 0; i < m.threads.length; ++i) {
                                {
                                    var e = $root.perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread.verify(m.threads[i]);
                                    if (e)
                                        return "threads." + e;
                                }
                            }
                        }
                        if (m.total != null && m.hasOwnProperty("total")) {
                            if (typeof m.total !== "number")
                                return "total: number expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a Process message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process
                     * @static
                     * @param {Object.<string,*>} d Plain object
                     * @returns {perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process} Process
                     */
                    Process.fromObject = function fromObject(d) {
                        if (d instanceof $root.perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process)
                            return d;
                        var m = new $root.perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process();
                        if (d.pid != null) {
                            m.pid = d.pid | 0;
                        }
                        if (d.name != null) {
                            m.name = String(d.name);
                        }
                        if (d.threads) {
                            if (!Array.isArray(d.threads))
                                throw TypeError(".perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process.threads: array expected");
                            m.threads = [];
                            for (var i = 0; i < d.threads.length; ++i) {
                                if (typeof d.threads[i] !== "object")
                                    throw TypeError(".perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process.threads: object expected");
                                m.threads[i] = $root.perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread.fromObject(d.threads[i]);
                            }
                        }
                        if (d.total != null) {
                            m.total = Number(d.total);
                        }
                        return m;
                    };

                    /**
                     * Creates a plain object from a Process message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process
                     * @static
                     * @param {perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process} m Process
                     * @param {$protobuf.IConversionOptions} [o] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    Process.toObject = function toObject(m, o) {
                        if (!o)
                            o = {};
                        var d = {};
                        if (o.arrays || o.defaults) {
                            d.threads = [];
                        }
                        if (o.defaults) {
                            d.pid = 0;
                            d.name = "";
                            d.total = 0;
                        }
                        if (m.pid != null && m.hasOwnProperty("pid")) {
                            d.pid = m.pid;
                        }
                        if (m.name != null && m.hasOwnProperty("name")) {
                            d.name = m.name;
                        }
                        if (m.threads && m.threads.length) {
                            d.threads = [];
                            for (var j = 0; j < m.threads.length; ++j) {
                                d.threads[j] = $root.perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Thread.toObject(m.threads[j], o);
                            }
                        }
                        if (m.total != null && m.hasOwnProperty("total")) {
                            d.total = o.json && !isFinite(m.total) ? String(m.total) : m.total;
                        }
                        return d;
                    };

                    /**
                     * Converts this Process to JSON.
                     * @function toJSON
                     * @memberof perfetto.protos.AndroidSimpleperfMetric.PerfEventMetric.Process
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    Process.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                    };

                    return Process;
                })();

                return PerfEventMetric;
            })();

            return AndroidSimpleperfMetric;
        })();

        protos.AndroidStartupMetric = (function() {

            /**
             * Properties of an AndroidStartupMetric.
             * @memberof perfetto.protos
             * @interface IAndroidStartupMetric
             * @property {Array.<perfetto.protos.AndroidStartupMetric.IStartup>|null} [startup] AndroidStartupMetric startup
             */

            /**
             * Constructs a new AndroidStartupMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidStartupMetric.
             * @implements IAndroidStartupMetric
             * @constructor
             * @param {perfetto.protos.IAndroidStartupMetric=} [p] Properties to set
             */
            function AndroidStartupMetric(p) {
                this.startup = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidStartupMetric startup.
             * @member {Array.<perfetto.protos.AndroidStartupMetric.IStartup>} startup
             * @memberof perfetto.protos.AndroidStartupMetric
             * @instance
             */
            AndroidStartupMetric.prototype.startup = $util.emptyArray;

            /**
             * Creates a new AndroidStartupMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidStartupMetric
             * @static
             * @param {perfetto.protos.IAndroidStartupMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidStartupMetric} AndroidStartupMetric instance
             */
            AndroidStartupMetric.create = function create(properties) {
                return new AndroidStartupMetric(properties);
            };

            /**
             * Encodes the specified AndroidStartupMetric message. Does not implicitly {@link perfetto.protos.AndroidStartupMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidStartupMetric
             * @static
             * @param {perfetto.protos.IAndroidStartupMetric} m AndroidStartupMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidStartupMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.startup != null && m.startup.length) {
                    for (var i = 0; i < m.startup.length; ++i)
                        $root.perfetto.protos.AndroidStartupMetric.Startup.encode(m.startup[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified AndroidStartupMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidStartupMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidStartupMetric
             * @static
             * @param {perfetto.protos.IAndroidStartupMetric} message AndroidStartupMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidStartupMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidStartupMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidStartupMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidStartupMetric} AndroidStartupMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidStartupMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidStartupMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.startup && m.startup.length))
                            m.startup = [];
                        m.startup.push($root.perfetto.protos.AndroidStartupMetric.Startup.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidStartupMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidStartupMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidStartupMetric} AndroidStartupMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidStartupMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidStartupMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidStartupMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidStartupMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.startup != null && m.hasOwnProperty("startup")) {
                    if (!Array.isArray(m.startup))
                        return "startup: array expected";
                    for (var i = 0; i < m.startup.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Startup.verify(m.startup[i]);
                            if (e)
                                return "startup." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidStartupMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidStartupMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidStartupMetric} AndroidStartupMetric
             */
            AndroidStartupMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidStartupMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidStartupMetric();
                if (d.startup) {
                    if (!Array.isArray(d.startup))
                        throw TypeError(".perfetto.protos.AndroidStartupMetric.startup: array expected");
                    m.startup = [];
                    for (var i = 0; i < d.startup.length; ++i) {
                        if (typeof d.startup[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.startup: object expected");
                        m.startup[i] = $root.perfetto.protos.AndroidStartupMetric.Startup.fromObject(d.startup[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidStartupMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidStartupMetric
             * @static
             * @param {perfetto.protos.AndroidStartupMetric} m AndroidStartupMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidStartupMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.startup = [];
                }
                if (m.startup && m.startup.length) {
                    d.startup = [];
                    for (var j = 0; j < m.startup.length; ++j) {
                        d.startup[j] = $root.perfetto.protos.AndroidStartupMetric.Startup.toObject(m.startup[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidStartupMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidStartupMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidStartupMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidStartupMetric.TaskStateBreakdown = (function() {

                /**
                 * Properties of a TaskStateBreakdown.
                 * @memberof perfetto.protos.AndroidStartupMetric
                 * @interface ITaskStateBreakdown
                 * @property {number|null} [runningDurNs] TaskStateBreakdown runningDurNs
                 * @property {number|null} [runnableDurNs] TaskStateBreakdown runnableDurNs
                 * @property {number|null} [uninterruptibleSleepDurNs] TaskStateBreakdown uninterruptibleSleepDurNs
                 * @property {number|null} [interruptibleSleepDurNs] TaskStateBreakdown interruptibleSleepDurNs
                 * @property {number|null} [uninterruptibleIoSleepDurNs] TaskStateBreakdown uninterruptibleIoSleepDurNs
                 * @property {number|null} [uninterruptibleNonIoSleepDurNs] TaskStateBreakdown uninterruptibleNonIoSleepDurNs
                 */

                /**
                 * Constructs a new TaskStateBreakdown.
                 * @memberof perfetto.protos.AndroidStartupMetric
                 * @classdesc Represents a TaskStateBreakdown.
                 * @implements ITaskStateBreakdown
                 * @constructor
                 * @param {perfetto.protos.AndroidStartupMetric.ITaskStateBreakdown=} [p] Properties to set
                 */
                function TaskStateBreakdown(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * TaskStateBreakdown runningDurNs.
                 * @member {number} runningDurNs
                 * @memberof perfetto.protos.AndroidStartupMetric.TaskStateBreakdown
                 * @instance
                 */
                TaskStateBreakdown.prototype.runningDurNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * TaskStateBreakdown runnableDurNs.
                 * @member {number} runnableDurNs
                 * @memberof perfetto.protos.AndroidStartupMetric.TaskStateBreakdown
                 * @instance
                 */
                TaskStateBreakdown.prototype.runnableDurNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * TaskStateBreakdown uninterruptibleSleepDurNs.
                 * @member {number} uninterruptibleSleepDurNs
                 * @memberof perfetto.protos.AndroidStartupMetric.TaskStateBreakdown
                 * @instance
                 */
                TaskStateBreakdown.prototype.uninterruptibleSleepDurNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * TaskStateBreakdown interruptibleSleepDurNs.
                 * @member {number} interruptibleSleepDurNs
                 * @memberof perfetto.protos.AndroidStartupMetric.TaskStateBreakdown
                 * @instance
                 */
                TaskStateBreakdown.prototype.interruptibleSleepDurNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * TaskStateBreakdown uninterruptibleIoSleepDurNs.
                 * @member {number} uninterruptibleIoSleepDurNs
                 * @memberof perfetto.protos.AndroidStartupMetric.TaskStateBreakdown
                 * @instance
                 */
                TaskStateBreakdown.prototype.uninterruptibleIoSleepDurNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * TaskStateBreakdown uninterruptibleNonIoSleepDurNs.
                 * @member {number} uninterruptibleNonIoSleepDurNs
                 * @memberof perfetto.protos.AndroidStartupMetric.TaskStateBreakdown
                 * @instance
                 */
                TaskStateBreakdown.prototype.uninterruptibleNonIoSleepDurNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new TaskStateBreakdown instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidStartupMetric.TaskStateBreakdown
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.ITaskStateBreakdown=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidStartupMetric.TaskStateBreakdown} TaskStateBreakdown instance
                 */
                TaskStateBreakdown.create = function create(properties) {
                    return new TaskStateBreakdown(properties);
                };

                /**
                 * Encodes the specified TaskStateBreakdown message. Does not implicitly {@link perfetto.protos.AndroidStartupMetric.TaskStateBreakdown.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidStartupMetric.TaskStateBreakdown
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.ITaskStateBreakdown} m TaskStateBreakdown message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                TaskStateBreakdown.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.runningDurNs != null && Object.hasOwnProperty.call(m, "runningDurNs"))
                        w.uint32(8).int64(m.runningDurNs);
                    if (m.runnableDurNs != null && Object.hasOwnProperty.call(m, "runnableDurNs"))
                        w.uint32(16).int64(m.runnableDurNs);
                    if (m.uninterruptibleSleepDurNs != null && Object.hasOwnProperty.call(m, "uninterruptibleSleepDurNs"))
                        w.uint32(24).int64(m.uninterruptibleSleepDurNs);
                    if (m.interruptibleSleepDurNs != null && Object.hasOwnProperty.call(m, "interruptibleSleepDurNs"))
                        w.uint32(32).int64(m.interruptibleSleepDurNs);
                    if (m.uninterruptibleIoSleepDurNs != null && Object.hasOwnProperty.call(m, "uninterruptibleIoSleepDurNs"))
                        w.uint32(40).int64(m.uninterruptibleIoSleepDurNs);
                    if (m.uninterruptibleNonIoSleepDurNs != null && Object.hasOwnProperty.call(m, "uninterruptibleNonIoSleepDurNs"))
                        w.uint32(48).int64(m.uninterruptibleNonIoSleepDurNs);
                    return w;
                };

                /**
                 * Encodes the specified TaskStateBreakdown message, length delimited. Does not implicitly {@link perfetto.protos.AndroidStartupMetric.TaskStateBreakdown.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidStartupMetric.TaskStateBreakdown
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.ITaskStateBreakdown} message TaskStateBreakdown message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                TaskStateBreakdown.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a TaskStateBreakdown message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidStartupMetric.TaskStateBreakdown
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidStartupMetric.TaskStateBreakdown} TaskStateBreakdown
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                TaskStateBreakdown.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidStartupMetric.TaskStateBreakdown();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.runningDurNs = r.int64();
                            break;
                        case 2:
                            m.runnableDurNs = r.int64();
                            break;
                        case 3:
                            m.uninterruptibleSleepDurNs = r.int64();
                            break;
                        case 4:
                            m.interruptibleSleepDurNs = r.int64();
                            break;
                        case 5:
                            m.uninterruptibleIoSleepDurNs = r.int64();
                            break;
                        case 6:
                            m.uninterruptibleNonIoSleepDurNs = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a TaskStateBreakdown message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidStartupMetric.TaskStateBreakdown
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidStartupMetric.TaskStateBreakdown} TaskStateBreakdown
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                TaskStateBreakdown.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a TaskStateBreakdown message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidStartupMetric.TaskStateBreakdown
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                TaskStateBreakdown.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.runningDurNs != null && m.hasOwnProperty("runningDurNs")) {
                        if (!$util.isInteger(m.runningDurNs) && !(m.runningDurNs && $util.isInteger(m.runningDurNs.low) && $util.isInteger(m.runningDurNs.high)))
                            return "runningDurNs: integer|Long expected";
                    }
                    if (m.runnableDurNs != null && m.hasOwnProperty("runnableDurNs")) {
                        if (!$util.isInteger(m.runnableDurNs) && !(m.runnableDurNs && $util.isInteger(m.runnableDurNs.low) && $util.isInteger(m.runnableDurNs.high)))
                            return "runnableDurNs: integer|Long expected";
                    }
                    if (m.uninterruptibleSleepDurNs != null && m.hasOwnProperty("uninterruptibleSleepDurNs")) {
                        if (!$util.isInteger(m.uninterruptibleSleepDurNs) && !(m.uninterruptibleSleepDurNs && $util.isInteger(m.uninterruptibleSleepDurNs.low) && $util.isInteger(m.uninterruptibleSleepDurNs.high)))
                            return "uninterruptibleSleepDurNs: integer|Long expected";
                    }
                    if (m.interruptibleSleepDurNs != null && m.hasOwnProperty("interruptibleSleepDurNs")) {
                        if (!$util.isInteger(m.interruptibleSleepDurNs) && !(m.interruptibleSleepDurNs && $util.isInteger(m.interruptibleSleepDurNs.low) && $util.isInteger(m.interruptibleSleepDurNs.high)))
                            return "interruptibleSleepDurNs: integer|Long expected";
                    }
                    if (m.uninterruptibleIoSleepDurNs != null && m.hasOwnProperty("uninterruptibleIoSleepDurNs")) {
                        if (!$util.isInteger(m.uninterruptibleIoSleepDurNs) && !(m.uninterruptibleIoSleepDurNs && $util.isInteger(m.uninterruptibleIoSleepDurNs.low) && $util.isInteger(m.uninterruptibleIoSleepDurNs.high)))
                            return "uninterruptibleIoSleepDurNs: integer|Long expected";
                    }
                    if (m.uninterruptibleNonIoSleepDurNs != null && m.hasOwnProperty("uninterruptibleNonIoSleepDurNs")) {
                        if (!$util.isInteger(m.uninterruptibleNonIoSleepDurNs) && !(m.uninterruptibleNonIoSleepDurNs && $util.isInteger(m.uninterruptibleNonIoSleepDurNs.low) && $util.isInteger(m.uninterruptibleNonIoSleepDurNs.high)))
                            return "uninterruptibleNonIoSleepDurNs: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a TaskStateBreakdown message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidStartupMetric.TaskStateBreakdown
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidStartupMetric.TaskStateBreakdown} TaskStateBreakdown
                 */
                TaskStateBreakdown.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidStartupMetric.TaskStateBreakdown)
                        return d;
                    var m = new $root.perfetto.protos.AndroidStartupMetric.TaskStateBreakdown();
                    if (d.runningDurNs != null) {
                        if ($util.Long)
                            (m.runningDurNs = $util.Long.fromValue(d.runningDurNs)).unsigned = false;
                        else if (typeof d.runningDurNs === "string")
                            m.runningDurNs = parseInt(d.runningDurNs, 10);
                        else if (typeof d.runningDurNs === "number")
                            m.runningDurNs = d.runningDurNs;
                        else if (typeof d.runningDurNs === "object")
                            m.runningDurNs = new $util.LongBits(d.runningDurNs.low >>> 0, d.runningDurNs.high >>> 0).toNumber();
                    }
                    if (d.runnableDurNs != null) {
                        if ($util.Long)
                            (m.runnableDurNs = $util.Long.fromValue(d.runnableDurNs)).unsigned = false;
                        else if (typeof d.runnableDurNs === "string")
                            m.runnableDurNs = parseInt(d.runnableDurNs, 10);
                        else if (typeof d.runnableDurNs === "number")
                            m.runnableDurNs = d.runnableDurNs;
                        else if (typeof d.runnableDurNs === "object")
                            m.runnableDurNs = new $util.LongBits(d.runnableDurNs.low >>> 0, d.runnableDurNs.high >>> 0).toNumber();
                    }
                    if (d.uninterruptibleSleepDurNs != null) {
                        if ($util.Long)
                            (m.uninterruptibleSleepDurNs = $util.Long.fromValue(d.uninterruptibleSleepDurNs)).unsigned = false;
                        else if (typeof d.uninterruptibleSleepDurNs === "string")
                            m.uninterruptibleSleepDurNs = parseInt(d.uninterruptibleSleepDurNs, 10);
                        else if (typeof d.uninterruptibleSleepDurNs === "number")
                            m.uninterruptibleSleepDurNs = d.uninterruptibleSleepDurNs;
                        else if (typeof d.uninterruptibleSleepDurNs === "object")
                            m.uninterruptibleSleepDurNs = new $util.LongBits(d.uninterruptibleSleepDurNs.low >>> 0, d.uninterruptibleSleepDurNs.high >>> 0).toNumber();
                    }
                    if (d.interruptibleSleepDurNs != null) {
                        if ($util.Long)
                            (m.interruptibleSleepDurNs = $util.Long.fromValue(d.interruptibleSleepDurNs)).unsigned = false;
                        else if (typeof d.interruptibleSleepDurNs === "string")
                            m.interruptibleSleepDurNs = parseInt(d.interruptibleSleepDurNs, 10);
                        else if (typeof d.interruptibleSleepDurNs === "number")
                            m.interruptibleSleepDurNs = d.interruptibleSleepDurNs;
                        else if (typeof d.interruptibleSleepDurNs === "object")
                            m.interruptibleSleepDurNs = new $util.LongBits(d.interruptibleSleepDurNs.low >>> 0, d.interruptibleSleepDurNs.high >>> 0).toNumber();
                    }
                    if (d.uninterruptibleIoSleepDurNs != null) {
                        if ($util.Long)
                            (m.uninterruptibleIoSleepDurNs = $util.Long.fromValue(d.uninterruptibleIoSleepDurNs)).unsigned = false;
                        else if (typeof d.uninterruptibleIoSleepDurNs === "string")
                            m.uninterruptibleIoSleepDurNs = parseInt(d.uninterruptibleIoSleepDurNs, 10);
                        else if (typeof d.uninterruptibleIoSleepDurNs === "number")
                            m.uninterruptibleIoSleepDurNs = d.uninterruptibleIoSleepDurNs;
                        else if (typeof d.uninterruptibleIoSleepDurNs === "object")
                            m.uninterruptibleIoSleepDurNs = new $util.LongBits(d.uninterruptibleIoSleepDurNs.low >>> 0, d.uninterruptibleIoSleepDurNs.high >>> 0).toNumber();
                    }
                    if (d.uninterruptibleNonIoSleepDurNs != null) {
                        if ($util.Long)
                            (m.uninterruptibleNonIoSleepDurNs = $util.Long.fromValue(d.uninterruptibleNonIoSleepDurNs)).unsigned = false;
                        else if (typeof d.uninterruptibleNonIoSleepDurNs === "string")
                            m.uninterruptibleNonIoSleepDurNs = parseInt(d.uninterruptibleNonIoSleepDurNs, 10);
                        else if (typeof d.uninterruptibleNonIoSleepDurNs === "number")
                            m.uninterruptibleNonIoSleepDurNs = d.uninterruptibleNonIoSleepDurNs;
                        else if (typeof d.uninterruptibleNonIoSleepDurNs === "object")
                            m.uninterruptibleNonIoSleepDurNs = new $util.LongBits(d.uninterruptibleNonIoSleepDurNs.low >>> 0, d.uninterruptibleNonIoSleepDurNs.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a TaskStateBreakdown message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidStartupMetric.TaskStateBreakdown
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.TaskStateBreakdown} m TaskStateBreakdown
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                TaskStateBreakdown.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.runningDurNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.runningDurNs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.runnableDurNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.runnableDurNs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.uninterruptibleSleepDurNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.uninterruptibleSleepDurNs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.interruptibleSleepDurNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.interruptibleSleepDurNs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.uninterruptibleIoSleepDurNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.uninterruptibleIoSleepDurNs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.uninterruptibleNonIoSleepDurNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.uninterruptibleNonIoSleepDurNs = o.longs === String ? "0" : 0;
                    }
                    if (m.runningDurNs != null && m.hasOwnProperty("runningDurNs")) {
                        if (typeof m.runningDurNs === "number")
                            d.runningDurNs = o.longs === String ? String(m.runningDurNs) : m.runningDurNs;
                        else
                            d.runningDurNs = o.longs === String ? $util.Long.prototype.toString.call(m.runningDurNs) : o.longs === Number ? new $util.LongBits(m.runningDurNs.low >>> 0, m.runningDurNs.high >>> 0).toNumber() : m.runningDurNs;
                    }
                    if (m.runnableDurNs != null && m.hasOwnProperty("runnableDurNs")) {
                        if (typeof m.runnableDurNs === "number")
                            d.runnableDurNs = o.longs === String ? String(m.runnableDurNs) : m.runnableDurNs;
                        else
                            d.runnableDurNs = o.longs === String ? $util.Long.prototype.toString.call(m.runnableDurNs) : o.longs === Number ? new $util.LongBits(m.runnableDurNs.low >>> 0, m.runnableDurNs.high >>> 0).toNumber() : m.runnableDurNs;
                    }
                    if (m.uninterruptibleSleepDurNs != null && m.hasOwnProperty("uninterruptibleSleepDurNs")) {
                        if (typeof m.uninterruptibleSleepDurNs === "number")
                            d.uninterruptibleSleepDurNs = o.longs === String ? String(m.uninterruptibleSleepDurNs) : m.uninterruptibleSleepDurNs;
                        else
                            d.uninterruptibleSleepDurNs = o.longs === String ? $util.Long.prototype.toString.call(m.uninterruptibleSleepDurNs) : o.longs === Number ? new $util.LongBits(m.uninterruptibleSleepDurNs.low >>> 0, m.uninterruptibleSleepDurNs.high >>> 0).toNumber() : m.uninterruptibleSleepDurNs;
                    }
                    if (m.interruptibleSleepDurNs != null && m.hasOwnProperty("interruptibleSleepDurNs")) {
                        if (typeof m.interruptibleSleepDurNs === "number")
                            d.interruptibleSleepDurNs = o.longs === String ? String(m.interruptibleSleepDurNs) : m.interruptibleSleepDurNs;
                        else
                            d.interruptibleSleepDurNs = o.longs === String ? $util.Long.prototype.toString.call(m.interruptibleSleepDurNs) : o.longs === Number ? new $util.LongBits(m.interruptibleSleepDurNs.low >>> 0, m.interruptibleSleepDurNs.high >>> 0).toNumber() : m.interruptibleSleepDurNs;
                    }
                    if (m.uninterruptibleIoSleepDurNs != null && m.hasOwnProperty("uninterruptibleIoSleepDurNs")) {
                        if (typeof m.uninterruptibleIoSleepDurNs === "number")
                            d.uninterruptibleIoSleepDurNs = o.longs === String ? String(m.uninterruptibleIoSleepDurNs) : m.uninterruptibleIoSleepDurNs;
                        else
                            d.uninterruptibleIoSleepDurNs = o.longs === String ? $util.Long.prototype.toString.call(m.uninterruptibleIoSleepDurNs) : o.longs === Number ? new $util.LongBits(m.uninterruptibleIoSleepDurNs.low >>> 0, m.uninterruptibleIoSleepDurNs.high >>> 0).toNumber() : m.uninterruptibleIoSleepDurNs;
                    }
                    if (m.uninterruptibleNonIoSleepDurNs != null && m.hasOwnProperty("uninterruptibleNonIoSleepDurNs")) {
                        if (typeof m.uninterruptibleNonIoSleepDurNs === "number")
                            d.uninterruptibleNonIoSleepDurNs = o.longs === String ? String(m.uninterruptibleNonIoSleepDurNs) : m.uninterruptibleNonIoSleepDurNs;
                        else
                            d.uninterruptibleNonIoSleepDurNs = o.longs === String ? $util.Long.prototype.toString.call(m.uninterruptibleNonIoSleepDurNs) : o.longs === Number ? new $util.LongBits(m.uninterruptibleNonIoSleepDurNs.low >>> 0, m.uninterruptibleNonIoSleepDurNs.high >>> 0).toNumber() : m.uninterruptibleNonIoSleepDurNs;
                    }
                    return d;
                };

                /**
                 * Converts this TaskStateBreakdown to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidStartupMetric.TaskStateBreakdown
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                TaskStateBreakdown.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return TaskStateBreakdown;
            })();

            AndroidStartupMetric.McyclesByCoreType = (function() {

                /**
                 * Properties of a McyclesByCoreType.
                 * @memberof perfetto.protos.AndroidStartupMetric
                 * @interface IMcyclesByCoreType
                 * @property {number|null} [little] McyclesByCoreType little
                 * @property {number|null} [big] McyclesByCoreType big
                 * @property {number|null} [bigger] McyclesByCoreType bigger
                 * @property {number|null} [unknown] McyclesByCoreType unknown
                 */

                /**
                 * Constructs a new McyclesByCoreType.
                 * @memberof perfetto.protos.AndroidStartupMetric
                 * @classdesc Represents a McyclesByCoreType.
                 * @implements IMcyclesByCoreType
                 * @constructor
                 * @param {perfetto.protos.AndroidStartupMetric.IMcyclesByCoreType=} [p] Properties to set
                 */
                function McyclesByCoreType(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * McyclesByCoreType little.
                 * @member {number} little
                 * @memberof perfetto.protos.AndroidStartupMetric.McyclesByCoreType
                 * @instance
                 */
                McyclesByCoreType.prototype.little = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * McyclesByCoreType big.
                 * @member {number} big
                 * @memberof perfetto.protos.AndroidStartupMetric.McyclesByCoreType
                 * @instance
                 */
                McyclesByCoreType.prototype.big = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * McyclesByCoreType bigger.
                 * @member {number} bigger
                 * @memberof perfetto.protos.AndroidStartupMetric.McyclesByCoreType
                 * @instance
                 */
                McyclesByCoreType.prototype.bigger = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * McyclesByCoreType unknown.
                 * @member {number} unknown
                 * @memberof perfetto.protos.AndroidStartupMetric.McyclesByCoreType
                 * @instance
                 */
                McyclesByCoreType.prototype.unknown = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new McyclesByCoreType instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidStartupMetric.McyclesByCoreType
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.IMcyclesByCoreType=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidStartupMetric.McyclesByCoreType} McyclesByCoreType instance
                 */
                McyclesByCoreType.create = function create(properties) {
                    return new McyclesByCoreType(properties);
                };

                /**
                 * Encodes the specified McyclesByCoreType message. Does not implicitly {@link perfetto.protos.AndroidStartupMetric.McyclesByCoreType.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidStartupMetric.McyclesByCoreType
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.IMcyclesByCoreType} m McyclesByCoreType message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                McyclesByCoreType.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.little != null && Object.hasOwnProperty.call(m, "little"))
                        w.uint32(8).int64(m.little);
                    if (m.big != null && Object.hasOwnProperty.call(m, "big"))
                        w.uint32(16).int64(m.big);
                    if (m.bigger != null && Object.hasOwnProperty.call(m, "bigger"))
                        w.uint32(24).int64(m.bigger);
                    if (m.unknown != null && Object.hasOwnProperty.call(m, "unknown"))
                        w.uint32(32).int64(m.unknown);
                    return w;
                };

                /**
                 * Encodes the specified McyclesByCoreType message, length delimited. Does not implicitly {@link perfetto.protos.AndroidStartupMetric.McyclesByCoreType.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidStartupMetric.McyclesByCoreType
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.IMcyclesByCoreType} message McyclesByCoreType message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                McyclesByCoreType.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a McyclesByCoreType message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidStartupMetric.McyclesByCoreType
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidStartupMetric.McyclesByCoreType} McyclesByCoreType
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                McyclesByCoreType.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidStartupMetric.McyclesByCoreType();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.little = r.int64();
                            break;
                        case 2:
                            m.big = r.int64();
                            break;
                        case 3:
                            m.bigger = r.int64();
                            break;
                        case 4:
                            m.unknown = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a McyclesByCoreType message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidStartupMetric.McyclesByCoreType
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidStartupMetric.McyclesByCoreType} McyclesByCoreType
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                McyclesByCoreType.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a McyclesByCoreType message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidStartupMetric.McyclesByCoreType
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                McyclesByCoreType.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.little != null && m.hasOwnProperty("little")) {
                        if (!$util.isInteger(m.little) && !(m.little && $util.isInteger(m.little.low) && $util.isInteger(m.little.high)))
                            return "little: integer|Long expected";
                    }
                    if (m.big != null && m.hasOwnProperty("big")) {
                        if (!$util.isInteger(m.big) && !(m.big && $util.isInteger(m.big.low) && $util.isInteger(m.big.high)))
                            return "big: integer|Long expected";
                    }
                    if (m.bigger != null && m.hasOwnProperty("bigger")) {
                        if (!$util.isInteger(m.bigger) && !(m.bigger && $util.isInteger(m.bigger.low) && $util.isInteger(m.bigger.high)))
                            return "bigger: integer|Long expected";
                    }
                    if (m.unknown != null && m.hasOwnProperty("unknown")) {
                        if (!$util.isInteger(m.unknown) && !(m.unknown && $util.isInteger(m.unknown.low) && $util.isInteger(m.unknown.high)))
                            return "unknown: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a McyclesByCoreType message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidStartupMetric.McyclesByCoreType
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidStartupMetric.McyclesByCoreType} McyclesByCoreType
                 */
                McyclesByCoreType.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidStartupMetric.McyclesByCoreType)
                        return d;
                    var m = new $root.perfetto.protos.AndroidStartupMetric.McyclesByCoreType();
                    if (d.little != null) {
                        if ($util.Long)
                            (m.little = $util.Long.fromValue(d.little)).unsigned = false;
                        else if (typeof d.little === "string")
                            m.little = parseInt(d.little, 10);
                        else if (typeof d.little === "number")
                            m.little = d.little;
                        else if (typeof d.little === "object")
                            m.little = new $util.LongBits(d.little.low >>> 0, d.little.high >>> 0).toNumber();
                    }
                    if (d.big != null) {
                        if ($util.Long)
                            (m.big = $util.Long.fromValue(d.big)).unsigned = false;
                        else if (typeof d.big === "string")
                            m.big = parseInt(d.big, 10);
                        else if (typeof d.big === "number")
                            m.big = d.big;
                        else if (typeof d.big === "object")
                            m.big = new $util.LongBits(d.big.low >>> 0, d.big.high >>> 0).toNumber();
                    }
                    if (d.bigger != null) {
                        if ($util.Long)
                            (m.bigger = $util.Long.fromValue(d.bigger)).unsigned = false;
                        else if (typeof d.bigger === "string")
                            m.bigger = parseInt(d.bigger, 10);
                        else if (typeof d.bigger === "number")
                            m.bigger = d.bigger;
                        else if (typeof d.bigger === "object")
                            m.bigger = new $util.LongBits(d.bigger.low >>> 0, d.bigger.high >>> 0).toNumber();
                    }
                    if (d.unknown != null) {
                        if ($util.Long)
                            (m.unknown = $util.Long.fromValue(d.unknown)).unsigned = false;
                        else if (typeof d.unknown === "string")
                            m.unknown = parseInt(d.unknown, 10);
                        else if (typeof d.unknown === "number")
                            m.unknown = d.unknown;
                        else if (typeof d.unknown === "object")
                            m.unknown = new $util.LongBits(d.unknown.low >>> 0, d.unknown.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a McyclesByCoreType message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidStartupMetric.McyclesByCoreType
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.McyclesByCoreType} m McyclesByCoreType
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                McyclesByCoreType.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.little = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.little = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.big = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.big = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.bigger = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.bigger = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.unknown = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.unknown = o.longs === String ? "0" : 0;
                    }
                    if (m.little != null && m.hasOwnProperty("little")) {
                        if (typeof m.little === "number")
                            d.little = o.longs === String ? String(m.little) : m.little;
                        else
                            d.little = o.longs === String ? $util.Long.prototype.toString.call(m.little) : o.longs === Number ? new $util.LongBits(m.little.low >>> 0, m.little.high >>> 0).toNumber() : m.little;
                    }
                    if (m.big != null && m.hasOwnProperty("big")) {
                        if (typeof m.big === "number")
                            d.big = o.longs === String ? String(m.big) : m.big;
                        else
                            d.big = o.longs === String ? $util.Long.prototype.toString.call(m.big) : o.longs === Number ? new $util.LongBits(m.big.low >>> 0, m.big.high >>> 0).toNumber() : m.big;
                    }
                    if (m.bigger != null && m.hasOwnProperty("bigger")) {
                        if (typeof m.bigger === "number")
                            d.bigger = o.longs === String ? String(m.bigger) : m.bigger;
                        else
                            d.bigger = o.longs === String ? $util.Long.prototype.toString.call(m.bigger) : o.longs === Number ? new $util.LongBits(m.bigger.low >>> 0, m.bigger.high >>> 0).toNumber() : m.bigger;
                    }
                    if (m.unknown != null && m.hasOwnProperty("unknown")) {
                        if (typeof m.unknown === "number")
                            d.unknown = o.longs === String ? String(m.unknown) : m.unknown;
                        else
                            d.unknown = o.longs === String ? $util.Long.prototype.toString.call(m.unknown) : o.longs === Number ? new $util.LongBits(m.unknown.low >>> 0, m.unknown.high >>> 0).toNumber() : m.unknown;
                    }
                    return d;
                };

                /**
                 * Converts this McyclesByCoreType to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidStartupMetric.McyclesByCoreType
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                McyclesByCoreType.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return McyclesByCoreType;
            })();

            AndroidStartupMetric.Slice = (function() {

                /**
                 * Properties of a Slice.
                 * @memberof perfetto.protos.AndroidStartupMetric
                 * @interface ISlice
                 * @property {number|null} [durNs] Slice durNs
                 * @property {number|null} [durMs] Slice durMs
                 */

                /**
                 * Constructs a new Slice.
                 * @memberof perfetto.protos.AndroidStartupMetric
                 * @classdesc Represents a Slice.
                 * @implements ISlice
                 * @constructor
                 * @param {perfetto.protos.AndroidStartupMetric.ISlice=} [p] Properties to set
                 */
                function Slice(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Slice durNs.
                 * @member {number} durNs
                 * @memberof perfetto.protos.AndroidStartupMetric.Slice
                 * @instance
                 */
                Slice.prototype.durNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Slice durMs.
                 * @member {number} durMs
                 * @memberof perfetto.protos.AndroidStartupMetric.Slice
                 * @instance
                 */
                Slice.prototype.durMs = 0;

                /**
                 * Creates a new Slice instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidStartupMetric.Slice
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.ISlice=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidStartupMetric.Slice} Slice instance
                 */
                Slice.create = function create(properties) {
                    return new Slice(properties);
                };

                /**
                 * Encodes the specified Slice message. Does not implicitly {@link perfetto.protos.AndroidStartupMetric.Slice.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidStartupMetric.Slice
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.ISlice} m Slice message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Slice.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.durNs != null && Object.hasOwnProperty.call(m, "durNs"))
                        w.uint32(8).int64(m.durNs);
                    if (m.durMs != null && Object.hasOwnProperty.call(m, "durMs"))
                        w.uint32(17).double(m.durMs);
                    return w;
                };

                /**
                 * Encodes the specified Slice message, length delimited. Does not implicitly {@link perfetto.protos.AndroidStartupMetric.Slice.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidStartupMetric.Slice
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.ISlice} message Slice message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Slice.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Slice message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidStartupMetric.Slice
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidStartupMetric.Slice} Slice
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Slice.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidStartupMetric.Slice();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.durNs = r.int64();
                            break;
                        case 2:
                            m.durMs = r.double();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Slice message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidStartupMetric.Slice
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidStartupMetric.Slice} Slice
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Slice.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Slice message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidStartupMetric.Slice
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Slice.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.durNs != null && m.hasOwnProperty("durNs")) {
                        if (!$util.isInteger(m.durNs) && !(m.durNs && $util.isInteger(m.durNs.low) && $util.isInteger(m.durNs.high)))
                            return "durNs: integer|Long expected";
                    }
                    if (m.durMs != null && m.hasOwnProperty("durMs")) {
                        if (typeof m.durMs !== "number")
                            return "durMs: number expected";
                    }
                    return null;
                };

                /**
                 * Creates a Slice message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidStartupMetric.Slice
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidStartupMetric.Slice} Slice
                 */
                Slice.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidStartupMetric.Slice)
                        return d;
                    var m = new $root.perfetto.protos.AndroidStartupMetric.Slice();
                    if (d.durNs != null) {
                        if ($util.Long)
                            (m.durNs = $util.Long.fromValue(d.durNs)).unsigned = false;
                        else if (typeof d.durNs === "string")
                            m.durNs = parseInt(d.durNs, 10);
                        else if (typeof d.durNs === "number")
                            m.durNs = d.durNs;
                        else if (typeof d.durNs === "object")
                            m.durNs = new $util.LongBits(d.durNs.low >>> 0, d.durNs.high >>> 0).toNumber();
                    }
                    if (d.durMs != null) {
                        m.durMs = Number(d.durMs);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Slice message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidStartupMetric.Slice
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.Slice} m Slice
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Slice.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.durNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.durNs = o.longs === String ? "0" : 0;
                        d.durMs = 0;
                    }
                    if (m.durNs != null && m.hasOwnProperty("durNs")) {
                        if (typeof m.durNs === "number")
                            d.durNs = o.longs === String ? String(m.durNs) : m.durNs;
                        else
                            d.durNs = o.longs === String ? $util.Long.prototype.toString.call(m.durNs) : o.longs === Number ? new $util.LongBits(m.durNs.low >>> 0, m.durNs.high >>> 0).toNumber() : m.durNs;
                    }
                    if (m.durMs != null && m.hasOwnProperty("durMs")) {
                        d.durMs = o.json && !isFinite(m.durMs) ? String(m.durMs) : m.durMs;
                    }
                    return d;
                };

                /**
                 * Converts this Slice to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidStartupMetric.Slice
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Slice.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Slice;
            })();

            AndroidStartupMetric.ToFirstFrame = (function() {

                /**
                 * Properties of a ToFirstFrame.
                 * @memberof perfetto.protos.AndroidStartupMetric
                 * @interface IToFirstFrame
                 * @property {number|null} [durNs] ToFirstFrame durNs
                 * @property {number|null} [durMs] ToFirstFrame durMs
                 * @property {perfetto.protos.AndroidStartupMetric.ITaskStateBreakdown|null} [mainThreadByTaskState] ToFirstFrame mainThreadByTaskState
                 * @property {perfetto.protos.AndroidStartupMetric.IMcyclesByCoreType|null} [mcyclesByCoreType] ToFirstFrame mcyclesByCoreType
                 * @property {number|null} [otherProcessesSpawnedCount] ToFirstFrame otherProcessesSpawnedCount
                 * @property {perfetto.protos.AndroidStartupMetric.ISlice|null} [timeActivityManager] ToFirstFrame timeActivityManager
                 * @property {perfetto.protos.AndroidStartupMetric.ISlice|null} [timeActivityThreadMain] ToFirstFrame timeActivityThreadMain
                 * @property {perfetto.protos.AndroidStartupMetric.ISlice|null} [timeBindApplication] ToFirstFrame timeBindApplication
                 * @property {perfetto.protos.AndroidStartupMetric.ISlice|null} [timeActivityStart] ToFirstFrame timeActivityStart
                 * @property {perfetto.protos.AndroidStartupMetric.ISlice|null} [timeActivityResume] ToFirstFrame timeActivityResume
                 * @property {perfetto.protos.AndroidStartupMetric.ISlice|null} [timeActivityRestart] ToFirstFrame timeActivityRestart
                 * @property {perfetto.protos.AndroidStartupMetric.ISlice|null} [timeChoreographer] ToFirstFrame timeChoreographer
                 * @property {perfetto.protos.AndroidStartupMetric.ISlice|null} [timeInflate] ToFirstFrame timeInflate
                 * @property {perfetto.protos.AndroidStartupMetric.ISlice|null} [timeGetResources] ToFirstFrame timeGetResources
                 * @property {perfetto.protos.AndroidStartupMetric.ISlice|null} [timeBeforeStartProcess] ToFirstFrame timeBeforeStartProcess
                 * @property {perfetto.protos.AndroidStartupMetric.ISlice|null} [timeDuringStartProcess] ToFirstFrame timeDuringStartProcess
                 * @property {perfetto.protos.AndroidStartupMetric.ISlice|null} [toPostFork] ToFirstFrame toPostFork
                 * @property {perfetto.protos.AndroidStartupMetric.ISlice|null} [toActivityThreadMain] ToFirstFrame toActivityThreadMain
                 * @property {perfetto.protos.AndroidStartupMetric.ISlice|null} [toBindApplication] ToFirstFrame toBindApplication
                 * @property {perfetto.protos.AndroidStartupMetric.ISlice|null} [timePostFork] ToFirstFrame timePostFork
                 * @property {perfetto.protos.AndroidStartupMetric.ISlice|null} [timeDexOpen] ToFirstFrame timeDexOpen
                 * @property {perfetto.protos.AndroidStartupMetric.ISlice|null} [timeVerifyClass] ToFirstFrame timeVerifyClass
                 * @property {number|null} [jitCompiledMethods] ToFirstFrame jitCompiledMethods
                 * @property {perfetto.protos.AndroidStartupMetric.ISlice|null} [timeJitThreadPoolOnCpu] ToFirstFrame timeJitThreadPoolOnCpu
                 * @property {perfetto.protos.AndroidStartupMetric.ISlice|null} [timeGcTotal] ToFirstFrame timeGcTotal
                 * @property {perfetto.protos.AndroidStartupMetric.ISlice|null} [timeGcOnCpu] ToFirstFrame timeGcOnCpu
                 * @property {perfetto.protos.AndroidStartupMetric.ISlice|null} [timeLockContentionThreadMain] ToFirstFrame timeLockContentionThreadMain
                 * @property {perfetto.protos.AndroidStartupMetric.ISlice|null} [timeMonitorContentionThreadMain] ToFirstFrame timeMonitorContentionThreadMain
                 */

                /**
                 * Constructs a new ToFirstFrame.
                 * @memberof perfetto.protos.AndroidStartupMetric
                 * @classdesc Represents a ToFirstFrame.
                 * @implements IToFirstFrame
                 * @constructor
                 * @param {perfetto.protos.AndroidStartupMetric.IToFirstFrame=} [p] Properties to set
                 */
                function ToFirstFrame(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * ToFirstFrame durNs.
                 * @member {number} durNs
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.durNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * ToFirstFrame durMs.
                 * @member {number} durMs
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.durMs = 0;

                /**
                 * ToFirstFrame mainThreadByTaskState.
                 * @member {perfetto.protos.AndroidStartupMetric.ITaskStateBreakdown|null|undefined} mainThreadByTaskState
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.mainThreadByTaskState = null;

                /**
                 * ToFirstFrame mcyclesByCoreType.
                 * @member {perfetto.protos.AndroidStartupMetric.IMcyclesByCoreType|null|undefined} mcyclesByCoreType
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.mcyclesByCoreType = null;

                /**
                 * ToFirstFrame otherProcessesSpawnedCount.
                 * @member {number} otherProcessesSpawnedCount
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.otherProcessesSpawnedCount = 0;

                /**
                 * ToFirstFrame timeActivityManager.
                 * @member {perfetto.protos.AndroidStartupMetric.ISlice|null|undefined} timeActivityManager
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.timeActivityManager = null;

                /**
                 * ToFirstFrame timeActivityThreadMain.
                 * @member {perfetto.protos.AndroidStartupMetric.ISlice|null|undefined} timeActivityThreadMain
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.timeActivityThreadMain = null;

                /**
                 * ToFirstFrame timeBindApplication.
                 * @member {perfetto.protos.AndroidStartupMetric.ISlice|null|undefined} timeBindApplication
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.timeBindApplication = null;

                /**
                 * ToFirstFrame timeActivityStart.
                 * @member {perfetto.protos.AndroidStartupMetric.ISlice|null|undefined} timeActivityStart
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.timeActivityStart = null;

                /**
                 * ToFirstFrame timeActivityResume.
                 * @member {perfetto.protos.AndroidStartupMetric.ISlice|null|undefined} timeActivityResume
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.timeActivityResume = null;

                /**
                 * ToFirstFrame timeActivityRestart.
                 * @member {perfetto.protos.AndroidStartupMetric.ISlice|null|undefined} timeActivityRestart
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.timeActivityRestart = null;

                /**
                 * ToFirstFrame timeChoreographer.
                 * @member {perfetto.protos.AndroidStartupMetric.ISlice|null|undefined} timeChoreographer
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.timeChoreographer = null;

                /**
                 * ToFirstFrame timeInflate.
                 * @member {perfetto.protos.AndroidStartupMetric.ISlice|null|undefined} timeInflate
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.timeInflate = null;

                /**
                 * ToFirstFrame timeGetResources.
                 * @member {perfetto.protos.AndroidStartupMetric.ISlice|null|undefined} timeGetResources
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.timeGetResources = null;

                /**
                 * ToFirstFrame timeBeforeStartProcess.
                 * @member {perfetto.protos.AndroidStartupMetric.ISlice|null|undefined} timeBeforeStartProcess
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.timeBeforeStartProcess = null;

                /**
                 * ToFirstFrame timeDuringStartProcess.
                 * @member {perfetto.protos.AndroidStartupMetric.ISlice|null|undefined} timeDuringStartProcess
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.timeDuringStartProcess = null;

                /**
                 * ToFirstFrame toPostFork.
                 * @member {perfetto.protos.AndroidStartupMetric.ISlice|null|undefined} toPostFork
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.toPostFork = null;

                /**
                 * ToFirstFrame toActivityThreadMain.
                 * @member {perfetto.protos.AndroidStartupMetric.ISlice|null|undefined} toActivityThreadMain
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.toActivityThreadMain = null;

                /**
                 * ToFirstFrame toBindApplication.
                 * @member {perfetto.protos.AndroidStartupMetric.ISlice|null|undefined} toBindApplication
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.toBindApplication = null;

                /**
                 * ToFirstFrame timePostFork.
                 * @member {perfetto.protos.AndroidStartupMetric.ISlice|null|undefined} timePostFork
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.timePostFork = null;

                /**
                 * ToFirstFrame timeDexOpen.
                 * @member {perfetto.protos.AndroidStartupMetric.ISlice|null|undefined} timeDexOpen
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.timeDexOpen = null;

                /**
                 * ToFirstFrame timeVerifyClass.
                 * @member {perfetto.protos.AndroidStartupMetric.ISlice|null|undefined} timeVerifyClass
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.timeVerifyClass = null;

                /**
                 * ToFirstFrame jitCompiledMethods.
                 * @member {number} jitCompiledMethods
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.jitCompiledMethods = 0;

                /**
                 * ToFirstFrame timeJitThreadPoolOnCpu.
                 * @member {perfetto.protos.AndroidStartupMetric.ISlice|null|undefined} timeJitThreadPoolOnCpu
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.timeJitThreadPoolOnCpu = null;

                /**
                 * ToFirstFrame timeGcTotal.
                 * @member {perfetto.protos.AndroidStartupMetric.ISlice|null|undefined} timeGcTotal
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.timeGcTotal = null;

                /**
                 * ToFirstFrame timeGcOnCpu.
                 * @member {perfetto.protos.AndroidStartupMetric.ISlice|null|undefined} timeGcOnCpu
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.timeGcOnCpu = null;

                /**
                 * ToFirstFrame timeLockContentionThreadMain.
                 * @member {perfetto.protos.AndroidStartupMetric.ISlice|null|undefined} timeLockContentionThreadMain
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.timeLockContentionThreadMain = null;

                /**
                 * ToFirstFrame timeMonitorContentionThreadMain.
                 * @member {perfetto.protos.AndroidStartupMetric.ISlice|null|undefined} timeMonitorContentionThreadMain
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 */
                ToFirstFrame.prototype.timeMonitorContentionThreadMain = null;

                /**
                 * Creates a new ToFirstFrame instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.IToFirstFrame=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidStartupMetric.ToFirstFrame} ToFirstFrame instance
                 */
                ToFirstFrame.create = function create(properties) {
                    return new ToFirstFrame(properties);
                };

                /**
                 * Encodes the specified ToFirstFrame message. Does not implicitly {@link perfetto.protos.AndroidStartupMetric.ToFirstFrame.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.IToFirstFrame} m ToFirstFrame message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ToFirstFrame.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.durNs != null && Object.hasOwnProperty.call(m, "durNs"))
                        w.uint32(8).int64(m.durNs);
                    if (m.mainThreadByTaskState != null && Object.hasOwnProperty.call(m, "mainThreadByTaskState"))
                        $root.perfetto.protos.AndroidStartupMetric.TaskStateBreakdown.encode(m.mainThreadByTaskState, w.uint32(18).fork()).ldelim();
                    if (m.otherProcessesSpawnedCount != null && Object.hasOwnProperty.call(m, "otherProcessesSpawnedCount"))
                        w.uint32(24).uint32(m.otherProcessesSpawnedCount);
                    if (m.timeActivityManager != null && Object.hasOwnProperty.call(m, "timeActivityManager"))
                        $root.perfetto.protos.AndroidStartupMetric.Slice.encode(m.timeActivityManager, w.uint32(34).fork()).ldelim();
                    if (m.timeActivityThreadMain != null && Object.hasOwnProperty.call(m, "timeActivityThreadMain"))
                        $root.perfetto.protos.AndroidStartupMetric.Slice.encode(m.timeActivityThreadMain, w.uint32(42).fork()).ldelim();
                    if (m.timeBindApplication != null && Object.hasOwnProperty.call(m, "timeBindApplication"))
                        $root.perfetto.protos.AndroidStartupMetric.Slice.encode(m.timeBindApplication, w.uint32(50).fork()).ldelim();
                    if (m.timeActivityStart != null && Object.hasOwnProperty.call(m, "timeActivityStart"))
                        $root.perfetto.protos.AndroidStartupMetric.Slice.encode(m.timeActivityStart, w.uint32(58).fork()).ldelim();
                    if (m.timeActivityResume != null && Object.hasOwnProperty.call(m, "timeActivityResume"))
                        $root.perfetto.protos.AndroidStartupMetric.Slice.encode(m.timeActivityResume, w.uint32(66).fork()).ldelim();
                    if (m.timeChoreographer != null && Object.hasOwnProperty.call(m, "timeChoreographer"))
                        $root.perfetto.protos.AndroidStartupMetric.Slice.encode(m.timeChoreographer, w.uint32(74).fork()).ldelim();
                    if (m.timeBeforeStartProcess != null && Object.hasOwnProperty.call(m, "timeBeforeStartProcess"))
                        $root.perfetto.protos.AndroidStartupMetric.Slice.encode(m.timeBeforeStartProcess, w.uint32(82).fork()).ldelim();
                    if (m.timeDuringStartProcess != null && Object.hasOwnProperty.call(m, "timeDuringStartProcess"))
                        $root.perfetto.protos.AndroidStartupMetric.Slice.encode(m.timeDuringStartProcess, w.uint32(90).fork()).ldelim();
                    if (m.timePostFork != null && Object.hasOwnProperty.call(m, "timePostFork"))
                        $root.perfetto.protos.AndroidStartupMetric.Slice.encode(m.timePostFork, w.uint32(130).fork()).ldelim();
                    if (m.durMs != null && Object.hasOwnProperty.call(m, "durMs"))
                        w.uint32(137).double(m.durMs);
                    if (m.toPostFork != null && Object.hasOwnProperty.call(m, "toPostFork"))
                        $root.perfetto.protos.AndroidStartupMetric.Slice.encode(m.toPostFork, w.uint32(146).fork()).ldelim();
                    if (m.toActivityThreadMain != null && Object.hasOwnProperty.call(m, "toActivityThreadMain"))
                        $root.perfetto.protos.AndroidStartupMetric.Slice.encode(m.toActivityThreadMain, w.uint32(154).fork()).ldelim();
                    if (m.toBindApplication != null && Object.hasOwnProperty.call(m, "toBindApplication"))
                        $root.perfetto.protos.AndroidStartupMetric.Slice.encode(m.toBindApplication, w.uint32(162).fork()).ldelim();
                    if (m.timeActivityRestart != null && Object.hasOwnProperty.call(m, "timeActivityRestart"))
                        $root.perfetto.protos.AndroidStartupMetric.Slice.encode(m.timeActivityRestart, w.uint32(170).fork()).ldelim();
                    if (m.timeInflate != null && Object.hasOwnProperty.call(m, "timeInflate"))
                        $root.perfetto.protos.AndroidStartupMetric.Slice.encode(m.timeInflate, w.uint32(178).fork()).ldelim();
                    if (m.timeGetResources != null && Object.hasOwnProperty.call(m, "timeGetResources"))
                        $root.perfetto.protos.AndroidStartupMetric.Slice.encode(m.timeGetResources, w.uint32(186).fork()).ldelim();
                    if (m.timeDexOpen != null && Object.hasOwnProperty.call(m, "timeDexOpen"))
                        $root.perfetto.protos.AndroidStartupMetric.Slice.encode(m.timeDexOpen, w.uint32(194).fork()).ldelim();
                    if (m.timeVerifyClass != null && Object.hasOwnProperty.call(m, "timeVerifyClass"))
                        $root.perfetto.protos.AndroidStartupMetric.Slice.encode(m.timeVerifyClass, w.uint32(202).fork()).ldelim();
                    if (m.mcyclesByCoreType != null && Object.hasOwnProperty.call(m, "mcyclesByCoreType"))
                        $root.perfetto.protos.AndroidStartupMetric.McyclesByCoreType.encode(m.mcyclesByCoreType, w.uint32(210).fork()).ldelim();
                    if (m.jitCompiledMethods != null && Object.hasOwnProperty.call(m, "jitCompiledMethods"))
                        w.uint32(216).uint32(m.jitCompiledMethods);
                    if (m.timeJitThreadPoolOnCpu != null && Object.hasOwnProperty.call(m, "timeJitThreadPoolOnCpu"))
                        $root.perfetto.protos.AndroidStartupMetric.Slice.encode(m.timeJitThreadPoolOnCpu, w.uint32(226).fork()).ldelim();
                    if (m.timeGcTotal != null && Object.hasOwnProperty.call(m, "timeGcTotal"))
                        $root.perfetto.protos.AndroidStartupMetric.Slice.encode(m.timeGcTotal, w.uint32(234).fork()).ldelim();
                    if (m.timeGcOnCpu != null && Object.hasOwnProperty.call(m, "timeGcOnCpu"))
                        $root.perfetto.protos.AndroidStartupMetric.Slice.encode(m.timeGcOnCpu, w.uint32(242).fork()).ldelim();
                    if (m.timeLockContentionThreadMain != null && Object.hasOwnProperty.call(m, "timeLockContentionThreadMain"))
                        $root.perfetto.protos.AndroidStartupMetric.Slice.encode(m.timeLockContentionThreadMain, w.uint32(250).fork()).ldelim();
                    if (m.timeMonitorContentionThreadMain != null && Object.hasOwnProperty.call(m, "timeMonitorContentionThreadMain"))
                        $root.perfetto.protos.AndroidStartupMetric.Slice.encode(m.timeMonitorContentionThreadMain, w.uint32(258).fork()).ldelim();
                    return w;
                };

                /**
                 * Encodes the specified ToFirstFrame message, length delimited. Does not implicitly {@link perfetto.protos.AndroidStartupMetric.ToFirstFrame.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.IToFirstFrame} message ToFirstFrame message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ToFirstFrame.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a ToFirstFrame message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidStartupMetric.ToFirstFrame} ToFirstFrame
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ToFirstFrame.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidStartupMetric.ToFirstFrame();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.durNs = r.int64();
                            break;
                        case 17:
                            m.durMs = r.double();
                            break;
                        case 2:
                            m.mainThreadByTaskState = $root.perfetto.protos.AndroidStartupMetric.TaskStateBreakdown.decode(r, r.uint32());
                            break;
                        case 26:
                            m.mcyclesByCoreType = $root.perfetto.protos.AndroidStartupMetric.McyclesByCoreType.decode(r, r.uint32());
                            break;
                        case 3:
                            m.otherProcessesSpawnedCount = r.uint32();
                            break;
                        case 4:
                            m.timeActivityManager = $root.perfetto.protos.AndroidStartupMetric.Slice.decode(r, r.uint32());
                            break;
                        case 5:
                            m.timeActivityThreadMain = $root.perfetto.protos.AndroidStartupMetric.Slice.decode(r, r.uint32());
                            break;
                        case 6:
                            m.timeBindApplication = $root.perfetto.protos.AndroidStartupMetric.Slice.decode(r, r.uint32());
                            break;
                        case 7:
                            m.timeActivityStart = $root.perfetto.protos.AndroidStartupMetric.Slice.decode(r, r.uint32());
                            break;
                        case 8:
                            m.timeActivityResume = $root.perfetto.protos.AndroidStartupMetric.Slice.decode(r, r.uint32());
                            break;
                        case 21:
                            m.timeActivityRestart = $root.perfetto.protos.AndroidStartupMetric.Slice.decode(r, r.uint32());
                            break;
                        case 9:
                            m.timeChoreographer = $root.perfetto.protos.AndroidStartupMetric.Slice.decode(r, r.uint32());
                            break;
                        case 22:
                            m.timeInflate = $root.perfetto.protos.AndroidStartupMetric.Slice.decode(r, r.uint32());
                            break;
                        case 23:
                            m.timeGetResources = $root.perfetto.protos.AndroidStartupMetric.Slice.decode(r, r.uint32());
                            break;
                        case 10:
                            m.timeBeforeStartProcess = $root.perfetto.protos.AndroidStartupMetric.Slice.decode(r, r.uint32());
                            break;
                        case 11:
                            m.timeDuringStartProcess = $root.perfetto.protos.AndroidStartupMetric.Slice.decode(r, r.uint32());
                            break;
                        case 18:
                            m.toPostFork = $root.perfetto.protos.AndroidStartupMetric.Slice.decode(r, r.uint32());
                            break;
                        case 19:
                            m.toActivityThreadMain = $root.perfetto.protos.AndroidStartupMetric.Slice.decode(r, r.uint32());
                            break;
                        case 20:
                            m.toBindApplication = $root.perfetto.protos.AndroidStartupMetric.Slice.decode(r, r.uint32());
                            break;
                        case 16:
                            m.timePostFork = $root.perfetto.protos.AndroidStartupMetric.Slice.decode(r, r.uint32());
                            break;
                        case 24:
                            m.timeDexOpen = $root.perfetto.protos.AndroidStartupMetric.Slice.decode(r, r.uint32());
                            break;
                        case 25:
                            m.timeVerifyClass = $root.perfetto.protos.AndroidStartupMetric.Slice.decode(r, r.uint32());
                            break;
                        case 27:
                            m.jitCompiledMethods = r.uint32();
                            break;
                        case 28:
                            m.timeJitThreadPoolOnCpu = $root.perfetto.protos.AndroidStartupMetric.Slice.decode(r, r.uint32());
                            break;
                        case 29:
                            m.timeGcTotal = $root.perfetto.protos.AndroidStartupMetric.Slice.decode(r, r.uint32());
                            break;
                        case 30:
                            m.timeGcOnCpu = $root.perfetto.protos.AndroidStartupMetric.Slice.decode(r, r.uint32());
                            break;
                        case 31:
                            m.timeLockContentionThreadMain = $root.perfetto.protos.AndroidStartupMetric.Slice.decode(r, r.uint32());
                            break;
                        case 32:
                            m.timeMonitorContentionThreadMain = $root.perfetto.protos.AndroidStartupMetric.Slice.decode(r, r.uint32());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a ToFirstFrame message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidStartupMetric.ToFirstFrame} ToFirstFrame
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ToFirstFrame.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a ToFirstFrame message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ToFirstFrame.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.durNs != null && m.hasOwnProperty("durNs")) {
                        if (!$util.isInteger(m.durNs) && !(m.durNs && $util.isInteger(m.durNs.low) && $util.isInteger(m.durNs.high)))
                            return "durNs: integer|Long expected";
                    }
                    if (m.durMs != null && m.hasOwnProperty("durMs")) {
                        if (typeof m.durMs !== "number")
                            return "durMs: number expected";
                    }
                    if (m.mainThreadByTaskState != null && m.hasOwnProperty("mainThreadByTaskState")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.TaskStateBreakdown.verify(m.mainThreadByTaskState);
                            if (e)
                                return "mainThreadByTaskState." + e;
                        }
                    }
                    if (m.mcyclesByCoreType != null && m.hasOwnProperty("mcyclesByCoreType")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.McyclesByCoreType.verify(m.mcyclesByCoreType);
                            if (e)
                                return "mcyclesByCoreType." + e;
                        }
                    }
                    if (m.otherProcessesSpawnedCount != null && m.hasOwnProperty("otherProcessesSpawnedCount")) {
                        if (!$util.isInteger(m.otherProcessesSpawnedCount))
                            return "otherProcessesSpawnedCount: integer expected";
                    }
                    if (m.timeActivityManager != null && m.hasOwnProperty("timeActivityManager")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Slice.verify(m.timeActivityManager);
                            if (e)
                                return "timeActivityManager." + e;
                        }
                    }
                    if (m.timeActivityThreadMain != null && m.hasOwnProperty("timeActivityThreadMain")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Slice.verify(m.timeActivityThreadMain);
                            if (e)
                                return "timeActivityThreadMain." + e;
                        }
                    }
                    if (m.timeBindApplication != null && m.hasOwnProperty("timeBindApplication")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Slice.verify(m.timeBindApplication);
                            if (e)
                                return "timeBindApplication." + e;
                        }
                    }
                    if (m.timeActivityStart != null && m.hasOwnProperty("timeActivityStart")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Slice.verify(m.timeActivityStart);
                            if (e)
                                return "timeActivityStart." + e;
                        }
                    }
                    if (m.timeActivityResume != null && m.hasOwnProperty("timeActivityResume")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Slice.verify(m.timeActivityResume);
                            if (e)
                                return "timeActivityResume." + e;
                        }
                    }
                    if (m.timeActivityRestart != null && m.hasOwnProperty("timeActivityRestart")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Slice.verify(m.timeActivityRestart);
                            if (e)
                                return "timeActivityRestart." + e;
                        }
                    }
                    if (m.timeChoreographer != null && m.hasOwnProperty("timeChoreographer")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Slice.verify(m.timeChoreographer);
                            if (e)
                                return "timeChoreographer." + e;
                        }
                    }
                    if (m.timeInflate != null && m.hasOwnProperty("timeInflate")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Slice.verify(m.timeInflate);
                            if (e)
                                return "timeInflate." + e;
                        }
                    }
                    if (m.timeGetResources != null && m.hasOwnProperty("timeGetResources")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Slice.verify(m.timeGetResources);
                            if (e)
                                return "timeGetResources." + e;
                        }
                    }
                    if (m.timeBeforeStartProcess != null && m.hasOwnProperty("timeBeforeStartProcess")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Slice.verify(m.timeBeforeStartProcess);
                            if (e)
                                return "timeBeforeStartProcess." + e;
                        }
                    }
                    if (m.timeDuringStartProcess != null && m.hasOwnProperty("timeDuringStartProcess")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Slice.verify(m.timeDuringStartProcess);
                            if (e)
                                return "timeDuringStartProcess." + e;
                        }
                    }
                    if (m.toPostFork != null && m.hasOwnProperty("toPostFork")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Slice.verify(m.toPostFork);
                            if (e)
                                return "toPostFork." + e;
                        }
                    }
                    if (m.toActivityThreadMain != null && m.hasOwnProperty("toActivityThreadMain")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Slice.verify(m.toActivityThreadMain);
                            if (e)
                                return "toActivityThreadMain." + e;
                        }
                    }
                    if (m.toBindApplication != null && m.hasOwnProperty("toBindApplication")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Slice.verify(m.toBindApplication);
                            if (e)
                                return "toBindApplication." + e;
                        }
                    }
                    if (m.timePostFork != null && m.hasOwnProperty("timePostFork")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Slice.verify(m.timePostFork);
                            if (e)
                                return "timePostFork." + e;
                        }
                    }
                    if (m.timeDexOpen != null && m.hasOwnProperty("timeDexOpen")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Slice.verify(m.timeDexOpen);
                            if (e)
                                return "timeDexOpen." + e;
                        }
                    }
                    if (m.timeVerifyClass != null && m.hasOwnProperty("timeVerifyClass")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Slice.verify(m.timeVerifyClass);
                            if (e)
                                return "timeVerifyClass." + e;
                        }
                    }
                    if (m.jitCompiledMethods != null && m.hasOwnProperty("jitCompiledMethods")) {
                        if (!$util.isInteger(m.jitCompiledMethods))
                            return "jitCompiledMethods: integer expected";
                    }
                    if (m.timeJitThreadPoolOnCpu != null && m.hasOwnProperty("timeJitThreadPoolOnCpu")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Slice.verify(m.timeJitThreadPoolOnCpu);
                            if (e)
                                return "timeJitThreadPoolOnCpu." + e;
                        }
                    }
                    if (m.timeGcTotal != null && m.hasOwnProperty("timeGcTotal")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Slice.verify(m.timeGcTotal);
                            if (e)
                                return "timeGcTotal." + e;
                        }
                    }
                    if (m.timeGcOnCpu != null && m.hasOwnProperty("timeGcOnCpu")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Slice.verify(m.timeGcOnCpu);
                            if (e)
                                return "timeGcOnCpu." + e;
                        }
                    }
                    if (m.timeLockContentionThreadMain != null && m.hasOwnProperty("timeLockContentionThreadMain")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Slice.verify(m.timeLockContentionThreadMain);
                            if (e)
                                return "timeLockContentionThreadMain." + e;
                        }
                    }
                    if (m.timeMonitorContentionThreadMain != null && m.hasOwnProperty("timeMonitorContentionThreadMain")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Slice.verify(m.timeMonitorContentionThreadMain);
                            if (e)
                                return "timeMonitorContentionThreadMain." + e;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a ToFirstFrame message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidStartupMetric.ToFirstFrame} ToFirstFrame
                 */
                ToFirstFrame.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidStartupMetric.ToFirstFrame)
                        return d;
                    var m = new $root.perfetto.protos.AndroidStartupMetric.ToFirstFrame();
                    if (d.durNs != null) {
                        if ($util.Long)
                            (m.durNs = $util.Long.fromValue(d.durNs)).unsigned = false;
                        else if (typeof d.durNs === "string")
                            m.durNs = parseInt(d.durNs, 10);
                        else if (typeof d.durNs === "number")
                            m.durNs = d.durNs;
                        else if (typeof d.durNs === "object")
                            m.durNs = new $util.LongBits(d.durNs.low >>> 0, d.durNs.high >>> 0).toNumber();
                    }
                    if (d.durMs != null) {
                        m.durMs = Number(d.durMs);
                    }
                    if (d.mainThreadByTaskState != null) {
                        if (typeof d.mainThreadByTaskState !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.ToFirstFrame.mainThreadByTaskState: object expected");
                        m.mainThreadByTaskState = $root.perfetto.protos.AndroidStartupMetric.TaskStateBreakdown.fromObject(d.mainThreadByTaskState);
                    }
                    if (d.mcyclesByCoreType != null) {
                        if (typeof d.mcyclesByCoreType !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.ToFirstFrame.mcyclesByCoreType: object expected");
                        m.mcyclesByCoreType = $root.perfetto.protos.AndroidStartupMetric.McyclesByCoreType.fromObject(d.mcyclesByCoreType);
                    }
                    if (d.otherProcessesSpawnedCount != null) {
                        m.otherProcessesSpawnedCount = d.otherProcessesSpawnedCount >>> 0;
                    }
                    if (d.timeActivityManager != null) {
                        if (typeof d.timeActivityManager !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.ToFirstFrame.timeActivityManager: object expected");
                        m.timeActivityManager = $root.perfetto.protos.AndroidStartupMetric.Slice.fromObject(d.timeActivityManager);
                    }
                    if (d.timeActivityThreadMain != null) {
                        if (typeof d.timeActivityThreadMain !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.ToFirstFrame.timeActivityThreadMain: object expected");
                        m.timeActivityThreadMain = $root.perfetto.protos.AndroidStartupMetric.Slice.fromObject(d.timeActivityThreadMain);
                    }
                    if (d.timeBindApplication != null) {
                        if (typeof d.timeBindApplication !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.ToFirstFrame.timeBindApplication: object expected");
                        m.timeBindApplication = $root.perfetto.protos.AndroidStartupMetric.Slice.fromObject(d.timeBindApplication);
                    }
                    if (d.timeActivityStart != null) {
                        if (typeof d.timeActivityStart !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.ToFirstFrame.timeActivityStart: object expected");
                        m.timeActivityStart = $root.perfetto.protos.AndroidStartupMetric.Slice.fromObject(d.timeActivityStart);
                    }
                    if (d.timeActivityResume != null) {
                        if (typeof d.timeActivityResume !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.ToFirstFrame.timeActivityResume: object expected");
                        m.timeActivityResume = $root.perfetto.protos.AndroidStartupMetric.Slice.fromObject(d.timeActivityResume);
                    }
                    if (d.timeActivityRestart != null) {
                        if (typeof d.timeActivityRestart !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.ToFirstFrame.timeActivityRestart: object expected");
                        m.timeActivityRestart = $root.perfetto.protos.AndroidStartupMetric.Slice.fromObject(d.timeActivityRestart);
                    }
                    if (d.timeChoreographer != null) {
                        if (typeof d.timeChoreographer !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.ToFirstFrame.timeChoreographer: object expected");
                        m.timeChoreographer = $root.perfetto.protos.AndroidStartupMetric.Slice.fromObject(d.timeChoreographer);
                    }
                    if (d.timeInflate != null) {
                        if (typeof d.timeInflate !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.ToFirstFrame.timeInflate: object expected");
                        m.timeInflate = $root.perfetto.protos.AndroidStartupMetric.Slice.fromObject(d.timeInflate);
                    }
                    if (d.timeGetResources != null) {
                        if (typeof d.timeGetResources !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.ToFirstFrame.timeGetResources: object expected");
                        m.timeGetResources = $root.perfetto.protos.AndroidStartupMetric.Slice.fromObject(d.timeGetResources);
                    }
                    if (d.timeBeforeStartProcess != null) {
                        if (typeof d.timeBeforeStartProcess !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.ToFirstFrame.timeBeforeStartProcess: object expected");
                        m.timeBeforeStartProcess = $root.perfetto.protos.AndroidStartupMetric.Slice.fromObject(d.timeBeforeStartProcess);
                    }
                    if (d.timeDuringStartProcess != null) {
                        if (typeof d.timeDuringStartProcess !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.ToFirstFrame.timeDuringStartProcess: object expected");
                        m.timeDuringStartProcess = $root.perfetto.protos.AndroidStartupMetric.Slice.fromObject(d.timeDuringStartProcess);
                    }
                    if (d.toPostFork != null) {
                        if (typeof d.toPostFork !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.ToFirstFrame.toPostFork: object expected");
                        m.toPostFork = $root.perfetto.protos.AndroidStartupMetric.Slice.fromObject(d.toPostFork);
                    }
                    if (d.toActivityThreadMain != null) {
                        if (typeof d.toActivityThreadMain !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.ToFirstFrame.toActivityThreadMain: object expected");
                        m.toActivityThreadMain = $root.perfetto.protos.AndroidStartupMetric.Slice.fromObject(d.toActivityThreadMain);
                    }
                    if (d.toBindApplication != null) {
                        if (typeof d.toBindApplication !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.ToFirstFrame.toBindApplication: object expected");
                        m.toBindApplication = $root.perfetto.protos.AndroidStartupMetric.Slice.fromObject(d.toBindApplication);
                    }
                    if (d.timePostFork != null) {
                        if (typeof d.timePostFork !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.ToFirstFrame.timePostFork: object expected");
                        m.timePostFork = $root.perfetto.protos.AndroidStartupMetric.Slice.fromObject(d.timePostFork);
                    }
                    if (d.timeDexOpen != null) {
                        if (typeof d.timeDexOpen !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.ToFirstFrame.timeDexOpen: object expected");
                        m.timeDexOpen = $root.perfetto.protos.AndroidStartupMetric.Slice.fromObject(d.timeDexOpen);
                    }
                    if (d.timeVerifyClass != null) {
                        if (typeof d.timeVerifyClass !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.ToFirstFrame.timeVerifyClass: object expected");
                        m.timeVerifyClass = $root.perfetto.protos.AndroidStartupMetric.Slice.fromObject(d.timeVerifyClass);
                    }
                    if (d.jitCompiledMethods != null) {
                        m.jitCompiledMethods = d.jitCompiledMethods >>> 0;
                    }
                    if (d.timeJitThreadPoolOnCpu != null) {
                        if (typeof d.timeJitThreadPoolOnCpu !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.ToFirstFrame.timeJitThreadPoolOnCpu: object expected");
                        m.timeJitThreadPoolOnCpu = $root.perfetto.protos.AndroidStartupMetric.Slice.fromObject(d.timeJitThreadPoolOnCpu);
                    }
                    if (d.timeGcTotal != null) {
                        if (typeof d.timeGcTotal !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.ToFirstFrame.timeGcTotal: object expected");
                        m.timeGcTotal = $root.perfetto.protos.AndroidStartupMetric.Slice.fromObject(d.timeGcTotal);
                    }
                    if (d.timeGcOnCpu != null) {
                        if (typeof d.timeGcOnCpu !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.ToFirstFrame.timeGcOnCpu: object expected");
                        m.timeGcOnCpu = $root.perfetto.protos.AndroidStartupMetric.Slice.fromObject(d.timeGcOnCpu);
                    }
                    if (d.timeLockContentionThreadMain != null) {
                        if (typeof d.timeLockContentionThreadMain !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.ToFirstFrame.timeLockContentionThreadMain: object expected");
                        m.timeLockContentionThreadMain = $root.perfetto.protos.AndroidStartupMetric.Slice.fromObject(d.timeLockContentionThreadMain);
                    }
                    if (d.timeMonitorContentionThreadMain != null) {
                        if (typeof d.timeMonitorContentionThreadMain !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.ToFirstFrame.timeMonitorContentionThreadMain: object expected");
                        m.timeMonitorContentionThreadMain = $root.perfetto.protos.AndroidStartupMetric.Slice.fromObject(d.timeMonitorContentionThreadMain);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a ToFirstFrame message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.ToFirstFrame} m ToFirstFrame
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ToFirstFrame.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.durNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.durNs = o.longs === String ? "0" : 0;
                        d.mainThreadByTaskState = null;
                        d.otherProcessesSpawnedCount = 0;
                        d.timeActivityManager = null;
                        d.timeActivityThreadMain = null;
                        d.timeBindApplication = null;
                        d.timeActivityStart = null;
                        d.timeActivityResume = null;
                        d.timeChoreographer = null;
                        d.timeBeforeStartProcess = null;
                        d.timeDuringStartProcess = null;
                        d.timePostFork = null;
                        d.durMs = 0;
                        d.toPostFork = null;
                        d.toActivityThreadMain = null;
                        d.toBindApplication = null;
                        d.timeActivityRestart = null;
                        d.timeInflate = null;
                        d.timeGetResources = null;
                        d.timeDexOpen = null;
                        d.timeVerifyClass = null;
                        d.mcyclesByCoreType = null;
                        d.jitCompiledMethods = 0;
                        d.timeJitThreadPoolOnCpu = null;
                        d.timeGcTotal = null;
                        d.timeGcOnCpu = null;
                        d.timeLockContentionThreadMain = null;
                        d.timeMonitorContentionThreadMain = null;
                    }
                    if (m.durNs != null && m.hasOwnProperty("durNs")) {
                        if (typeof m.durNs === "number")
                            d.durNs = o.longs === String ? String(m.durNs) : m.durNs;
                        else
                            d.durNs = o.longs === String ? $util.Long.prototype.toString.call(m.durNs) : o.longs === Number ? new $util.LongBits(m.durNs.low >>> 0, m.durNs.high >>> 0).toNumber() : m.durNs;
                    }
                    if (m.mainThreadByTaskState != null && m.hasOwnProperty("mainThreadByTaskState")) {
                        d.mainThreadByTaskState = $root.perfetto.protos.AndroidStartupMetric.TaskStateBreakdown.toObject(m.mainThreadByTaskState, o);
                    }
                    if (m.otherProcessesSpawnedCount != null && m.hasOwnProperty("otherProcessesSpawnedCount")) {
                        d.otherProcessesSpawnedCount = m.otherProcessesSpawnedCount;
                    }
                    if (m.timeActivityManager != null && m.hasOwnProperty("timeActivityManager")) {
                        d.timeActivityManager = $root.perfetto.protos.AndroidStartupMetric.Slice.toObject(m.timeActivityManager, o);
                    }
                    if (m.timeActivityThreadMain != null && m.hasOwnProperty("timeActivityThreadMain")) {
                        d.timeActivityThreadMain = $root.perfetto.protos.AndroidStartupMetric.Slice.toObject(m.timeActivityThreadMain, o);
                    }
                    if (m.timeBindApplication != null && m.hasOwnProperty("timeBindApplication")) {
                        d.timeBindApplication = $root.perfetto.protos.AndroidStartupMetric.Slice.toObject(m.timeBindApplication, o);
                    }
                    if (m.timeActivityStart != null && m.hasOwnProperty("timeActivityStart")) {
                        d.timeActivityStart = $root.perfetto.protos.AndroidStartupMetric.Slice.toObject(m.timeActivityStart, o);
                    }
                    if (m.timeActivityResume != null && m.hasOwnProperty("timeActivityResume")) {
                        d.timeActivityResume = $root.perfetto.protos.AndroidStartupMetric.Slice.toObject(m.timeActivityResume, o);
                    }
                    if (m.timeChoreographer != null && m.hasOwnProperty("timeChoreographer")) {
                        d.timeChoreographer = $root.perfetto.protos.AndroidStartupMetric.Slice.toObject(m.timeChoreographer, o);
                    }
                    if (m.timeBeforeStartProcess != null && m.hasOwnProperty("timeBeforeStartProcess")) {
                        d.timeBeforeStartProcess = $root.perfetto.protos.AndroidStartupMetric.Slice.toObject(m.timeBeforeStartProcess, o);
                    }
                    if (m.timeDuringStartProcess != null && m.hasOwnProperty("timeDuringStartProcess")) {
                        d.timeDuringStartProcess = $root.perfetto.protos.AndroidStartupMetric.Slice.toObject(m.timeDuringStartProcess, o);
                    }
                    if (m.timePostFork != null && m.hasOwnProperty("timePostFork")) {
                        d.timePostFork = $root.perfetto.protos.AndroidStartupMetric.Slice.toObject(m.timePostFork, o);
                    }
                    if (m.durMs != null && m.hasOwnProperty("durMs")) {
                        d.durMs = o.json && !isFinite(m.durMs) ? String(m.durMs) : m.durMs;
                    }
                    if (m.toPostFork != null && m.hasOwnProperty("toPostFork")) {
                        d.toPostFork = $root.perfetto.protos.AndroidStartupMetric.Slice.toObject(m.toPostFork, o);
                    }
                    if (m.toActivityThreadMain != null && m.hasOwnProperty("toActivityThreadMain")) {
                        d.toActivityThreadMain = $root.perfetto.protos.AndroidStartupMetric.Slice.toObject(m.toActivityThreadMain, o);
                    }
                    if (m.toBindApplication != null && m.hasOwnProperty("toBindApplication")) {
                        d.toBindApplication = $root.perfetto.protos.AndroidStartupMetric.Slice.toObject(m.toBindApplication, o);
                    }
                    if (m.timeActivityRestart != null && m.hasOwnProperty("timeActivityRestart")) {
                        d.timeActivityRestart = $root.perfetto.protos.AndroidStartupMetric.Slice.toObject(m.timeActivityRestart, o);
                    }
                    if (m.timeInflate != null && m.hasOwnProperty("timeInflate")) {
                        d.timeInflate = $root.perfetto.protos.AndroidStartupMetric.Slice.toObject(m.timeInflate, o);
                    }
                    if (m.timeGetResources != null && m.hasOwnProperty("timeGetResources")) {
                        d.timeGetResources = $root.perfetto.protos.AndroidStartupMetric.Slice.toObject(m.timeGetResources, o);
                    }
                    if (m.timeDexOpen != null && m.hasOwnProperty("timeDexOpen")) {
                        d.timeDexOpen = $root.perfetto.protos.AndroidStartupMetric.Slice.toObject(m.timeDexOpen, o);
                    }
                    if (m.timeVerifyClass != null && m.hasOwnProperty("timeVerifyClass")) {
                        d.timeVerifyClass = $root.perfetto.protos.AndroidStartupMetric.Slice.toObject(m.timeVerifyClass, o);
                    }
                    if (m.mcyclesByCoreType != null && m.hasOwnProperty("mcyclesByCoreType")) {
                        d.mcyclesByCoreType = $root.perfetto.protos.AndroidStartupMetric.McyclesByCoreType.toObject(m.mcyclesByCoreType, o);
                    }
                    if (m.jitCompiledMethods != null && m.hasOwnProperty("jitCompiledMethods")) {
                        d.jitCompiledMethods = m.jitCompiledMethods;
                    }
                    if (m.timeJitThreadPoolOnCpu != null && m.hasOwnProperty("timeJitThreadPoolOnCpu")) {
                        d.timeJitThreadPoolOnCpu = $root.perfetto.protos.AndroidStartupMetric.Slice.toObject(m.timeJitThreadPoolOnCpu, o);
                    }
                    if (m.timeGcTotal != null && m.hasOwnProperty("timeGcTotal")) {
                        d.timeGcTotal = $root.perfetto.protos.AndroidStartupMetric.Slice.toObject(m.timeGcTotal, o);
                    }
                    if (m.timeGcOnCpu != null && m.hasOwnProperty("timeGcOnCpu")) {
                        d.timeGcOnCpu = $root.perfetto.protos.AndroidStartupMetric.Slice.toObject(m.timeGcOnCpu, o);
                    }
                    if (m.timeLockContentionThreadMain != null && m.hasOwnProperty("timeLockContentionThreadMain")) {
                        d.timeLockContentionThreadMain = $root.perfetto.protos.AndroidStartupMetric.Slice.toObject(m.timeLockContentionThreadMain, o);
                    }
                    if (m.timeMonitorContentionThreadMain != null && m.hasOwnProperty("timeMonitorContentionThreadMain")) {
                        d.timeMonitorContentionThreadMain = $root.perfetto.protos.AndroidStartupMetric.Slice.toObject(m.timeMonitorContentionThreadMain, o);
                    }
                    return d;
                };

                /**
                 * Converts this ToFirstFrame to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidStartupMetric.ToFirstFrame
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ToFirstFrame.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return ToFirstFrame;
            })();

            AndroidStartupMetric.HscMetrics = (function() {

                /**
                 * Properties of a HscMetrics.
                 * @memberof perfetto.protos.AndroidStartupMetric
                 * @interface IHscMetrics
                 * @property {perfetto.protos.AndroidStartupMetric.ISlice|null} [fullStartup] HscMetrics fullStartup
                 */

                /**
                 * Constructs a new HscMetrics.
                 * @memberof perfetto.protos.AndroidStartupMetric
                 * @classdesc Represents a HscMetrics.
                 * @implements IHscMetrics
                 * @constructor
                 * @param {perfetto.protos.AndroidStartupMetric.IHscMetrics=} [p] Properties to set
                 */
                function HscMetrics(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * HscMetrics fullStartup.
                 * @member {perfetto.protos.AndroidStartupMetric.ISlice|null|undefined} fullStartup
                 * @memberof perfetto.protos.AndroidStartupMetric.HscMetrics
                 * @instance
                 */
                HscMetrics.prototype.fullStartup = null;

                /**
                 * Creates a new HscMetrics instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidStartupMetric.HscMetrics
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.IHscMetrics=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidStartupMetric.HscMetrics} HscMetrics instance
                 */
                HscMetrics.create = function create(properties) {
                    return new HscMetrics(properties);
                };

                /**
                 * Encodes the specified HscMetrics message. Does not implicitly {@link perfetto.protos.AndroidStartupMetric.HscMetrics.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidStartupMetric.HscMetrics
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.IHscMetrics} m HscMetrics message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                HscMetrics.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.fullStartup != null && Object.hasOwnProperty.call(m, "fullStartup"))
                        $root.perfetto.protos.AndroidStartupMetric.Slice.encode(m.fullStartup, w.uint32(10).fork()).ldelim();
                    return w;
                };

                /**
                 * Encodes the specified HscMetrics message, length delimited. Does not implicitly {@link perfetto.protos.AndroidStartupMetric.HscMetrics.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidStartupMetric.HscMetrics
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.IHscMetrics} message HscMetrics message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                HscMetrics.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a HscMetrics message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidStartupMetric.HscMetrics
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidStartupMetric.HscMetrics} HscMetrics
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                HscMetrics.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidStartupMetric.HscMetrics();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.fullStartup = $root.perfetto.protos.AndroidStartupMetric.Slice.decode(r, r.uint32());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a HscMetrics message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidStartupMetric.HscMetrics
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidStartupMetric.HscMetrics} HscMetrics
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                HscMetrics.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a HscMetrics message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidStartupMetric.HscMetrics
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                HscMetrics.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.fullStartup != null && m.hasOwnProperty("fullStartup")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Slice.verify(m.fullStartup);
                            if (e)
                                return "fullStartup." + e;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a HscMetrics message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidStartupMetric.HscMetrics
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidStartupMetric.HscMetrics} HscMetrics
                 */
                HscMetrics.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidStartupMetric.HscMetrics)
                        return d;
                    var m = new $root.perfetto.protos.AndroidStartupMetric.HscMetrics();
                    if (d.fullStartup != null) {
                        if (typeof d.fullStartup !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.HscMetrics.fullStartup: object expected");
                        m.fullStartup = $root.perfetto.protos.AndroidStartupMetric.Slice.fromObject(d.fullStartup);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a HscMetrics message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidStartupMetric.HscMetrics
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.HscMetrics} m HscMetrics
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                HscMetrics.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.fullStartup = null;
                    }
                    if (m.fullStartup != null && m.hasOwnProperty("fullStartup")) {
                        d.fullStartup = $root.perfetto.protos.AndroidStartupMetric.Slice.toObject(m.fullStartup, o);
                    }
                    return d;
                };

                /**
                 * Converts this HscMetrics to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidStartupMetric.HscMetrics
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                HscMetrics.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return HscMetrics;
            })();

            AndroidStartupMetric.Activity = (function() {

                /**
                 * Properties of an Activity.
                 * @memberof perfetto.protos.AndroidStartupMetric
                 * @interface IActivity
                 * @property {string|null} [name] Activity name
                 * @property {string|null} [method] Activity method
                 * @property {number|null} [tsMethodStart] Activity tsMethodStart
                 */

                /**
                 * Constructs a new Activity.
                 * @memberof perfetto.protos.AndroidStartupMetric
                 * @classdesc Represents an Activity.
                 * @implements IActivity
                 * @constructor
                 * @param {perfetto.protos.AndroidStartupMetric.IActivity=} [p] Properties to set
                 */
                function Activity(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Activity name.
                 * @member {string} name
                 * @memberof perfetto.protos.AndroidStartupMetric.Activity
                 * @instance
                 */
                Activity.prototype.name = "";

                /**
                 * Activity method.
                 * @member {string} method
                 * @memberof perfetto.protos.AndroidStartupMetric.Activity
                 * @instance
                 */
                Activity.prototype.method = "";

                /**
                 * Activity tsMethodStart.
                 * @member {number} tsMethodStart
                 * @memberof perfetto.protos.AndroidStartupMetric.Activity
                 * @instance
                 */
                Activity.prototype.tsMethodStart = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new Activity instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidStartupMetric.Activity
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.IActivity=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidStartupMetric.Activity} Activity instance
                 */
                Activity.create = function create(properties) {
                    return new Activity(properties);
                };

                /**
                 * Encodes the specified Activity message. Does not implicitly {@link perfetto.protos.AndroidStartupMetric.Activity.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidStartupMetric.Activity
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.IActivity} m Activity message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Activity.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(10).string(m.name);
                    if (m.method != null && Object.hasOwnProperty.call(m, "method"))
                        w.uint32(18).string(m.method);
                    if (m.tsMethodStart != null && Object.hasOwnProperty.call(m, "tsMethodStart"))
                        w.uint32(32).int64(m.tsMethodStart);
                    return w;
                };

                /**
                 * Encodes the specified Activity message, length delimited. Does not implicitly {@link perfetto.protos.AndroidStartupMetric.Activity.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidStartupMetric.Activity
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.IActivity} message Activity message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Activity.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an Activity message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidStartupMetric.Activity
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidStartupMetric.Activity} Activity
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Activity.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidStartupMetric.Activity();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.name = r.string();
                            break;
                        case 2:
                            m.method = r.string();
                            break;
                        case 4:
                            m.tsMethodStart = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an Activity message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidStartupMetric.Activity
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidStartupMetric.Activity} Activity
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Activity.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an Activity message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidStartupMetric.Activity
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Activity.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    if (m.method != null && m.hasOwnProperty("method")) {
                        if (!$util.isString(m.method))
                            return "method: string expected";
                    }
                    if (m.tsMethodStart != null && m.hasOwnProperty("tsMethodStart")) {
                        if (!$util.isInteger(m.tsMethodStart) && !(m.tsMethodStart && $util.isInteger(m.tsMethodStart.low) && $util.isInteger(m.tsMethodStart.high)))
                            return "tsMethodStart: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates an Activity message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidStartupMetric.Activity
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidStartupMetric.Activity} Activity
                 */
                Activity.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidStartupMetric.Activity)
                        return d;
                    var m = new $root.perfetto.protos.AndroidStartupMetric.Activity();
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    if (d.method != null) {
                        m.method = String(d.method);
                    }
                    if (d.tsMethodStart != null) {
                        if ($util.Long)
                            (m.tsMethodStart = $util.Long.fromValue(d.tsMethodStart)).unsigned = false;
                        else if (typeof d.tsMethodStart === "string")
                            m.tsMethodStart = parseInt(d.tsMethodStart, 10);
                        else if (typeof d.tsMethodStart === "number")
                            m.tsMethodStart = d.tsMethodStart;
                        else if (typeof d.tsMethodStart === "object")
                            m.tsMethodStart = new $util.LongBits(d.tsMethodStart.low >>> 0, d.tsMethodStart.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an Activity message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidStartupMetric.Activity
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.Activity} m Activity
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Activity.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.name = "";
                        d.method = "";
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.tsMethodStart = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.tsMethodStart = o.longs === String ? "0" : 0;
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    if (m.method != null && m.hasOwnProperty("method")) {
                        d.method = m.method;
                    }
                    if (m.tsMethodStart != null && m.hasOwnProperty("tsMethodStart")) {
                        if (typeof m.tsMethodStart === "number")
                            d.tsMethodStart = o.longs === String ? String(m.tsMethodStart) : m.tsMethodStart;
                        else
                            d.tsMethodStart = o.longs === String ? $util.Long.prototype.toString.call(m.tsMethodStart) : o.longs === Number ? new $util.LongBits(m.tsMethodStart.low >>> 0, m.tsMethodStart.high >>> 0).toNumber() : m.tsMethodStart;
                    }
                    return d;
                };

                /**
                 * Converts this Activity to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidStartupMetric.Activity
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Activity.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Activity;
            })();

            AndroidStartupMetric.BinderTransaction = (function() {

                /**
                 * Properties of a BinderTransaction.
                 * @memberof perfetto.protos.AndroidStartupMetric
                 * @interface IBinderTransaction
                 * @property {perfetto.protos.AndroidStartupMetric.ISlice|null} [duration] BinderTransaction duration
                 * @property {string|null} [thread] BinderTransaction thread
                 * @property {string|null} [destinationThread] BinderTransaction destinationThread
                 * @property {string|null} [destinationProcess] BinderTransaction destinationProcess
                 * @property {string|null} [flags] BinderTransaction flags
                 * @property {string|null} [code] BinderTransaction code
                 * @property {number|null} [dataSize] BinderTransaction dataSize
                 */

                /**
                 * Constructs a new BinderTransaction.
                 * @memberof perfetto.protos.AndroidStartupMetric
                 * @classdesc Represents a BinderTransaction.
                 * @implements IBinderTransaction
                 * @constructor
                 * @param {perfetto.protos.AndroidStartupMetric.IBinderTransaction=} [p] Properties to set
                 */
                function BinderTransaction(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * BinderTransaction duration.
                 * @member {perfetto.protos.AndroidStartupMetric.ISlice|null|undefined} duration
                 * @memberof perfetto.protos.AndroidStartupMetric.BinderTransaction
                 * @instance
                 */
                BinderTransaction.prototype.duration = null;

                /**
                 * BinderTransaction thread.
                 * @member {string} thread
                 * @memberof perfetto.protos.AndroidStartupMetric.BinderTransaction
                 * @instance
                 */
                BinderTransaction.prototype.thread = "";

                /**
                 * BinderTransaction destinationThread.
                 * @member {string} destinationThread
                 * @memberof perfetto.protos.AndroidStartupMetric.BinderTransaction
                 * @instance
                 */
                BinderTransaction.prototype.destinationThread = "";

                /**
                 * BinderTransaction destinationProcess.
                 * @member {string} destinationProcess
                 * @memberof perfetto.protos.AndroidStartupMetric.BinderTransaction
                 * @instance
                 */
                BinderTransaction.prototype.destinationProcess = "";

                /**
                 * BinderTransaction flags.
                 * @member {string} flags
                 * @memberof perfetto.protos.AndroidStartupMetric.BinderTransaction
                 * @instance
                 */
                BinderTransaction.prototype.flags = "";

                /**
                 * BinderTransaction code.
                 * @member {string} code
                 * @memberof perfetto.protos.AndroidStartupMetric.BinderTransaction
                 * @instance
                 */
                BinderTransaction.prototype.code = "";

                /**
                 * BinderTransaction dataSize.
                 * @member {number} dataSize
                 * @memberof perfetto.protos.AndroidStartupMetric.BinderTransaction
                 * @instance
                 */
                BinderTransaction.prototype.dataSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new BinderTransaction instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidStartupMetric.BinderTransaction
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.IBinderTransaction=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidStartupMetric.BinderTransaction} BinderTransaction instance
                 */
                BinderTransaction.create = function create(properties) {
                    return new BinderTransaction(properties);
                };

                /**
                 * Encodes the specified BinderTransaction message. Does not implicitly {@link perfetto.protos.AndroidStartupMetric.BinderTransaction.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidStartupMetric.BinderTransaction
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.IBinderTransaction} m BinderTransaction message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BinderTransaction.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.duration != null && Object.hasOwnProperty.call(m, "duration"))
                        $root.perfetto.protos.AndroidStartupMetric.Slice.encode(m.duration, w.uint32(10).fork()).ldelim();
                    if (m.thread != null && Object.hasOwnProperty.call(m, "thread"))
                        w.uint32(18).string(m.thread);
                    if (m.destinationThread != null && Object.hasOwnProperty.call(m, "destinationThread"))
                        w.uint32(26).string(m.destinationThread);
                    if (m.destinationProcess != null && Object.hasOwnProperty.call(m, "destinationProcess"))
                        w.uint32(34).string(m.destinationProcess);
                    if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                        w.uint32(42).string(m.flags);
                    if (m.code != null && Object.hasOwnProperty.call(m, "code"))
                        w.uint32(50).string(m.code);
                    if (m.dataSize != null && Object.hasOwnProperty.call(m, "dataSize"))
                        w.uint32(56).int64(m.dataSize);
                    return w;
                };

                /**
                 * Encodes the specified BinderTransaction message, length delimited. Does not implicitly {@link perfetto.protos.AndroidStartupMetric.BinderTransaction.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidStartupMetric.BinderTransaction
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.IBinderTransaction} message BinderTransaction message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BinderTransaction.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a BinderTransaction message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidStartupMetric.BinderTransaction
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidStartupMetric.BinderTransaction} BinderTransaction
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BinderTransaction.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidStartupMetric.BinderTransaction();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.duration = $root.perfetto.protos.AndroidStartupMetric.Slice.decode(r, r.uint32());
                            break;
                        case 2:
                            m.thread = r.string();
                            break;
                        case 3:
                            m.destinationThread = r.string();
                            break;
                        case 4:
                            m.destinationProcess = r.string();
                            break;
                        case 5:
                            m.flags = r.string();
                            break;
                        case 6:
                            m.code = r.string();
                            break;
                        case 7:
                            m.dataSize = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a BinderTransaction message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidStartupMetric.BinderTransaction
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidStartupMetric.BinderTransaction} BinderTransaction
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BinderTransaction.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a BinderTransaction message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidStartupMetric.BinderTransaction
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                BinderTransaction.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.duration != null && m.hasOwnProperty("duration")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Slice.verify(m.duration);
                            if (e)
                                return "duration." + e;
                        }
                    }
                    if (m.thread != null && m.hasOwnProperty("thread")) {
                        if (!$util.isString(m.thread))
                            return "thread: string expected";
                    }
                    if (m.destinationThread != null && m.hasOwnProperty("destinationThread")) {
                        if (!$util.isString(m.destinationThread))
                            return "destinationThread: string expected";
                    }
                    if (m.destinationProcess != null && m.hasOwnProperty("destinationProcess")) {
                        if (!$util.isString(m.destinationProcess))
                            return "destinationProcess: string expected";
                    }
                    if (m.flags != null && m.hasOwnProperty("flags")) {
                        if (!$util.isString(m.flags))
                            return "flags: string expected";
                    }
                    if (m.code != null && m.hasOwnProperty("code")) {
                        if (!$util.isString(m.code))
                            return "code: string expected";
                    }
                    if (m.dataSize != null && m.hasOwnProperty("dataSize")) {
                        if (!$util.isInteger(m.dataSize) && !(m.dataSize && $util.isInteger(m.dataSize.low) && $util.isInteger(m.dataSize.high)))
                            return "dataSize: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a BinderTransaction message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidStartupMetric.BinderTransaction
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidStartupMetric.BinderTransaction} BinderTransaction
                 */
                BinderTransaction.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidStartupMetric.BinderTransaction)
                        return d;
                    var m = new $root.perfetto.protos.AndroidStartupMetric.BinderTransaction();
                    if (d.duration != null) {
                        if (typeof d.duration !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.BinderTransaction.duration: object expected");
                        m.duration = $root.perfetto.protos.AndroidStartupMetric.Slice.fromObject(d.duration);
                    }
                    if (d.thread != null) {
                        m.thread = String(d.thread);
                    }
                    if (d.destinationThread != null) {
                        m.destinationThread = String(d.destinationThread);
                    }
                    if (d.destinationProcess != null) {
                        m.destinationProcess = String(d.destinationProcess);
                    }
                    if (d.flags != null) {
                        m.flags = String(d.flags);
                    }
                    if (d.code != null) {
                        m.code = String(d.code);
                    }
                    if (d.dataSize != null) {
                        if ($util.Long)
                            (m.dataSize = $util.Long.fromValue(d.dataSize)).unsigned = false;
                        else if (typeof d.dataSize === "string")
                            m.dataSize = parseInt(d.dataSize, 10);
                        else if (typeof d.dataSize === "number")
                            m.dataSize = d.dataSize;
                        else if (typeof d.dataSize === "object")
                            m.dataSize = new $util.LongBits(d.dataSize.low >>> 0, d.dataSize.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a BinderTransaction message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidStartupMetric.BinderTransaction
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.BinderTransaction} m BinderTransaction
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                BinderTransaction.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.duration = null;
                        d.thread = "";
                        d.destinationThread = "";
                        d.destinationProcess = "";
                        d.flags = "";
                        d.code = "";
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.dataSize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.dataSize = o.longs === String ? "0" : 0;
                    }
                    if (m.duration != null && m.hasOwnProperty("duration")) {
                        d.duration = $root.perfetto.protos.AndroidStartupMetric.Slice.toObject(m.duration, o);
                    }
                    if (m.thread != null && m.hasOwnProperty("thread")) {
                        d.thread = m.thread;
                    }
                    if (m.destinationThread != null && m.hasOwnProperty("destinationThread")) {
                        d.destinationThread = m.destinationThread;
                    }
                    if (m.destinationProcess != null && m.hasOwnProperty("destinationProcess")) {
                        d.destinationProcess = m.destinationProcess;
                    }
                    if (m.flags != null && m.hasOwnProperty("flags")) {
                        d.flags = m.flags;
                    }
                    if (m.code != null && m.hasOwnProperty("code")) {
                        d.code = m.code;
                    }
                    if (m.dataSize != null && m.hasOwnProperty("dataSize")) {
                        if (typeof m.dataSize === "number")
                            d.dataSize = o.longs === String ? String(m.dataSize) : m.dataSize;
                        else
                            d.dataSize = o.longs === String ? $util.Long.prototype.toString.call(m.dataSize) : o.longs === Number ? new $util.LongBits(m.dataSize.low >>> 0, m.dataSize.high >>> 0).toNumber() : m.dataSize;
                    }
                    return d;
                };

                /**
                 * Converts this BinderTransaction to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidStartupMetric.BinderTransaction
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                BinderTransaction.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return BinderTransaction;
            })();

            AndroidStartupMetric.OptimizationStatus = (function() {

                /**
                 * Properties of an OptimizationStatus.
                 * @memberof perfetto.protos.AndroidStartupMetric
                 * @interface IOptimizationStatus
                 * @property {string|null} [odexStatus] OptimizationStatus odexStatus
                 * @property {string|null} [compilationFilter] OptimizationStatus compilationFilter
                 * @property {string|null} [compilationReason] OptimizationStatus compilationReason
                 * @property {string|null} [location] OptimizationStatus location
                 */

                /**
                 * Constructs a new OptimizationStatus.
                 * @memberof perfetto.protos.AndroidStartupMetric
                 * @classdesc Represents an OptimizationStatus.
                 * @implements IOptimizationStatus
                 * @constructor
                 * @param {perfetto.protos.AndroidStartupMetric.IOptimizationStatus=} [p] Properties to set
                 */
                function OptimizationStatus(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * OptimizationStatus odexStatus.
                 * @member {string} odexStatus
                 * @memberof perfetto.protos.AndroidStartupMetric.OptimizationStatus
                 * @instance
                 */
                OptimizationStatus.prototype.odexStatus = "";

                /**
                 * OptimizationStatus compilationFilter.
                 * @member {string} compilationFilter
                 * @memberof perfetto.protos.AndroidStartupMetric.OptimizationStatus
                 * @instance
                 */
                OptimizationStatus.prototype.compilationFilter = "";

                /**
                 * OptimizationStatus compilationReason.
                 * @member {string} compilationReason
                 * @memberof perfetto.protos.AndroidStartupMetric.OptimizationStatus
                 * @instance
                 */
                OptimizationStatus.prototype.compilationReason = "";

                /**
                 * OptimizationStatus location.
                 * @member {string} location
                 * @memberof perfetto.protos.AndroidStartupMetric.OptimizationStatus
                 * @instance
                 */
                OptimizationStatus.prototype.location = "";

                /**
                 * Creates a new OptimizationStatus instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidStartupMetric.OptimizationStatus
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.IOptimizationStatus=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidStartupMetric.OptimizationStatus} OptimizationStatus instance
                 */
                OptimizationStatus.create = function create(properties) {
                    return new OptimizationStatus(properties);
                };

                /**
                 * Encodes the specified OptimizationStatus message. Does not implicitly {@link perfetto.protos.AndroidStartupMetric.OptimizationStatus.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidStartupMetric.OptimizationStatus
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.IOptimizationStatus} m OptimizationStatus message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                OptimizationStatus.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.odexStatus != null && Object.hasOwnProperty.call(m, "odexStatus"))
                        w.uint32(10).string(m.odexStatus);
                    if (m.compilationFilter != null && Object.hasOwnProperty.call(m, "compilationFilter"))
                        w.uint32(18).string(m.compilationFilter);
                    if (m.compilationReason != null && Object.hasOwnProperty.call(m, "compilationReason"))
                        w.uint32(26).string(m.compilationReason);
                    if (m.location != null && Object.hasOwnProperty.call(m, "location"))
                        w.uint32(34).string(m.location);
                    return w;
                };

                /**
                 * Encodes the specified OptimizationStatus message, length delimited. Does not implicitly {@link perfetto.protos.AndroidStartupMetric.OptimizationStatus.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidStartupMetric.OptimizationStatus
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.IOptimizationStatus} message OptimizationStatus message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                OptimizationStatus.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an OptimizationStatus message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidStartupMetric.OptimizationStatus
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidStartupMetric.OptimizationStatus} OptimizationStatus
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                OptimizationStatus.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidStartupMetric.OptimizationStatus();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.odexStatus = r.string();
                            break;
                        case 2:
                            m.compilationFilter = r.string();
                            break;
                        case 3:
                            m.compilationReason = r.string();
                            break;
                        case 4:
                            m.location = r.string();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an OptimizationStatus message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidStartupMetric.OptimizationStatus
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidStartupMetric.OptimizationStatus} OptimizationStatus
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                OptimizationStatus.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an OptimizationStatus message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidStartupMetric.OptimizationStatus
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                OptimizationStatus.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.odexStatus != null && m.hasOwnProperty("odexStatus")) {
                        if (!$util.isString(m.odexStatus))
                            return "odexStatus: string expected";
                    }
                    if (m.compilationFilter != null && m.hasOwnProperty("compilationFilter")) {
                        if (!$util.isString(m.compilationFilter))
                            return "compilationFilter: string expected";
                    }
                    if (m.compilationReason != null && m.hasOwnProperty("compilationReason")) {
                        if (!$util.isString(m.compilationReason))
                            return "compilationReason: string expected";
                    }
                    if (m.location != null && m.hasOwnProperty("location")) {
                        if (!$util.isString(m.location))
                            return "location: string expected";
                    }
                    return null;
                };

                /**
                 * Creates an OptimizationStatus message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidStartupMetric.OptimizationStatus
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidStartupMetric.OptimizationStatus} OptimizationStatus
                 */
                OptimizationStatus.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidStartupMetric.OptimizationStatus)
                        return d;
                    var m = new $root.perfetto.protos.AndroidStartupMetric.OptimizationStatus();
                    if (d.odexStatus != null) {
                        m.odexStatus = String(d.odexStatus);
                    }
                    if (d.compilationFilter != null) {
                        m.compilationFilter = String(d.compilationFilter);
                    }
                    if (d.compilationReason != null) {
                        m.compilationReason = String(d.compilationReason);
                    }
                    if (d.location != null) {
                        m.location = String(d.location);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an OptimizationStatus message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidStartupMetric.OptimizationStatus
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.OptimizationStatus} m OptimizationStatus
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                OptimizationStatus.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.odexStatus = "";
                        d.compilationFilter = "";
                        d.compilationReason = "";
                        d.location = "";
                    }
                    if (m.odexStatus != null && m.hasOwnProperty("odexStatus")) {
                        d.odexStatus = m.odexStatus;
                    }
                    if (m.compilationFilter != null && m.hasOwnProperty("compilationFilter")) {
                        d.compilationFilter = m.compilationFilter;
                    }
                    if (m.compilationReason != null && m.hasOwnProperty("compilationReason")) {
                        d.compilationReason = m.compilationReason;
                    }
                    if (m.location != null && m.hasOwnProperty("location")) {
                        d.location = m.location;
                    }
                    return d;
                };

                /**
                 * Converts this OptimizationStatus to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidStartupMetric.OptimizationStatus
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                OptimizationStatus.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return OptimizationStatus;
            })();

            AndroidStartupMetric.EventTimestamps = (function() {

                /**
                 * Properties of an EventTimestamps.
                 * @memberof perfetto.protos.AndroidStartupMetric
                 * @interface IEventTimestamps
                 * @property {number|null} [intentReceived] EventTimestamps intentReceived
                 * @property {number|null} [firstFrame] EventTimestamps firstFrame
                 */

                /**
                 * Constructs a new EventTimestamps.
                 * @memberof perfetto.protos.AndroidStartupMetric
                 * @classdesc Represents an EventTimestamps.
                 * @implements IEventTimestamps
                 * @constructor
                 * @param {perfetto.protos.AndroidStartupMetric.IEventTimestamps=} [p] Properties to set
                 */
                function EventTimestamps(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * EventTimestamps intentReceived.
                 * @member {number} intentReceived
                 * @memberof perfetto.protos.AndroidStartupMetric.EventTimestamps
                 * @instance
                 */
                EventTimestamps.prototype.intentReceived = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * EventTimestamps firstFrame.
                 * @member {number} firstFrame
                 * @memberof perfetto.protos.AndroidStartupMetric.EventTimestamps
                 * @instance
                 */
                EventTimestamps.prototype.firstFrame = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new EventTimestamps instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidStartupMetric.EventTimestamps
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.IEventTimestamps=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidStartupMetric.EventTimestamps} EventTimestamps instance
                 */
                EventTimestamps.create = function create(properties) {
                    return new EventTimestamps(properties);
                };

                /**
                 * Encodes the specified EventTimestamps message. Does not implicitly {@link perfetto.protos.AndroidStartupMetric.EventTimestamps.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidStartupMetric.EventTimestamps
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.IEventTimestamps} m EventTimestamps message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                EventTimestamps.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.intentReceived != null && Object.hasOwnProperty.call(m, "intentReceived"))
                        w.uint32(8).int64(m.intentReceived);
                    if (m.firstFrame != null && Object.hasOwnProperty.call(m, "firstFrame"))
                        w.uint32(16).int64(m.firstFrame);
                    return w;
                };

                /**
                 * Encodes the specified EventTimestamps message, length delimited. Does not implicitly {@link perfetto.protos.AndroidStartupMetric.EventTimestamps.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidStartupMetric.EventTimestamps
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.IEventTimestamps} message EventTimestamps message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                EventTimestamps.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an EventTimestamps message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidStartupMetric.EventTimestamps
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidStartupMetric.EventTimestamps} EventTimestamps
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                EventTimestamps.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidStartupMetric.EventTimestamps();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.intentReceived = r.int64();
                            break;
                        case 2:
                            m.firstFrame = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an EventTimestamps message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidStartupMetric.EventTimestamps
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidStartupMetric.EventTimestamps} EventTimestamps
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                EventTimestamps.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an EventTimestamps message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidStartupMetric.EventTimestamps
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                EventTimestamps.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.intentReceived != null && m.hasOwnProperty("intentReceived")) {
                        if (!$util.isInteger(m.intentReceived) && !(m.intentReceived && $util.isInteger(m.intentReceived.low) && $util.isInteger(m.intentReceived.high)))
                            return "intentReceived: integer|Long expected";
                    }
                    if (m.firstFrame != null && m.hasOwnProperty("firstFrame")) {
                        if (!$util.isInteger(m.firstFrame) && !(m.firstFrame && $util.isInteger(m.firstFrame.low) && $util.isInteger(m.firstFrame.high)))
                            return "firstFrame: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates an EventTimestamps message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidStartupMetric.EventTimestamps
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidStartupMetric.EventTimestamps} EventTimestamps
                 */
                EventTimestamps.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidStartupMetric.EventTimestamps)
                        return d;
                    var m = new $root.perfetto.protos.AndroidStartupMetric.EventTimestamps();
                    if (d.intentReceived != null) {
                        if ($util.Long)
                            (m.intentReceived = $util.Long.fromValue(d.intentReceived)).unsigned = false;
                        else if (typeof d.intentReceived === "string")
                            m.intentReceived = parseInt(d.intentReceived, 10);
                        else if (typeof d.intentReceived === "number")
                            m.intentReceived = d.intentReceived;
                        else if (typeof d.intentReceived === "object")
                            m.intentReceived = new $util.LongBits(d.intentReceived.low >>> 0, d.intentReceived.high >>> 0).toNumber();
                    }
                    if (d.firstFrame != null) {
                        if ($util.Long)
                            (m.firstFrame = $util.Long.fromValue(d.firstFrame)).unsigned = false;
                        else if (typeof d.firstFrame === "string")
                            m.firstFrame = parseInt(d.firstFrame, 10);
                        else if (typeof d.firstFrame === "number")
                            m.firstFrame = d.firstFrame;
                        else if (typeof d.firstFrame === "object")
                            m.firstFrame = new $util.LongBits(d.firstFrame.low >>> 0, d.firstFrame.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an EventTimestamps message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidStartupMetric.EventTimestamps
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.EventTimestamps} m EventTimestamps
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                EventTimestamps.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.intentReceived = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.intentReceived = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.firstFrame = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.firstFrame = o.longs === String ? "0" : 0;
                    }
                    if (m.intentReceived != null && m.hasOwnProperty("intentReceived")) {
                        if (typeof m.intentReceived === "number")
                            d.intentReceived = o.longs === String ? String(m.intentReceived) : m.intentReceived;
                        else
                            d.intentReceived = o.longs === String ? $util.Long.prototype.toString.call(m.intentReceived) : o.longs === Number ? new $util.LongBits(m.intentReceived.low >>> 0, m.intentReceived.high >>> 0).toNumber() : m.intentReceived;
                    }
                    if (m.firstFrame != null && m.hasOwnProperty("firstFrame")) {
                        if (typeof m.firstFrame === "number")
                            d.firstFrame = o.longs === String ? String(m.firstFrame) : m.firstFrame;
                        else
                            d.firstFrame = o.longs === String ? $util.Long.prototype.toString.call(m.firstFrame) : o.longs === Number ? new $util.LongBits(m.firstFrame.low >>> 0, m.firstFrame.high >>> 0).toNumber() : m.firstFrame;
                    }
                    return d;
                };

                /**
                 * Converts this EventTimestamps to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidStartupMetric.EventTimestamps
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                EventTimestamps.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return EventTimestamps;
            })();

            AndroidStartupMetric.SystemState = (function() {

                /**
                 * Properties of a SystemState.
                 * @memberof perfetto.protos.AndroidStartupMetric
                 * @interface ISystemState
                 * @property {boolean|null} [dex2oatRunning] SystemState dex2oatRunning
                 * @property {boolean|null} [installdRunning] SystemState installdRunning
                 * @property {number|null} [broadcastDispatchedCount] SystemState broadcastDispatchedCount
                 * @property {number|null} [broadcastReceivedCount] SystemState broadcastReceivedCount
                 * @property {Array.<string>|null} [mostActiveNonLaunchProcesses] SystemState mostActiveNonLaunchProcesses
                 * @property {number|null} [installdDurNs] SystemState installdDurNs
                 * @property {number|null} [dex2oatDurNs] SystemState dex2oatDurNs
                 */

                /**
                 * Constructs a new SystemState.
                 * @memberof perfetto.protos.AndroidStartupMetric
                 * @classdesc Represents a SystemState.
                 * @implements ISystemState
                 * @constructor
                 * @param {perfetto.protos.AndroidStartupMetric.ISystemState=} [p] Properties to set
                 */
                function SystemState(p) {
                    this.mostActiveNonLaunchProcesses = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * SystemState dex2oatRunning.
                 * @member {boolean} dex2oatRunning
                 * @memberof perfetto.protos.AndroidStartupMetric.SystemState
                 * @instance
                 */
                SystemState.prototype.dex2oatRunning = false;

                /**
                 * SystemState installdRunning.
                 * @member {boolean} installdRunning
                 * @memberof perfetto.protos.AndroidStartupMetric.SystemState
                 * @instance
                 */
                SystemState.prototype.installdRunning = false;

                /**
                 * SystemState broadcastDispatchedCount.
                 * @member {number} broadcastDispatchedCount
                 * @memberof perfetto.protos.AndroidStartupMetric.SystemState
                 * @instance
                 */
                SystemState.prototype.broadcastDispatchedCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * SystemState broadcastReceivedCount.
                 * @member {number} broadcastReceivedCount
                 * @memberof perfetto.protos.AndroidStartupMetric.SystemState
                 * @instance
                 */
                SystemState.prototype.broadcastReceivedCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * SystemState mostActiveNonLaunchProcesses.
                 * @member {Array.<string>} mostActiveNonLaunchProcesses
                 * @memberof perfetto.protos.AndroidStartupMetric.SystemState
                 * @instance
                 */
                SystemState.prototype.mostActiveNonLaunchProcesses = $util.emptyArray;

                /**
                 * SystemState installdDurNs.
                 * @member {number} installdDurNs
                 * @memberof perfetto.protos.AndroidStartupMetric.SystemState
                 * @instance
                 */
                SystemState.prototype.installdDurNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * SystemState dex2oatDurNs.
                 * @member {number} dex2oatDurNs
                 * @memberof perfetto.protos.AndroidStartupMetric.SystemState
                 * @instance
                 */
                SystemState.prototype.dex2oatDurNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new SystemState instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidStartupMetric.SystemState
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.ISystemState=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidStartupMetric.SystemState} SystemState instance
                 */
                SystemState.create = function create(properties) {
                    return new SystemState(properties);
                };

                /**
                 * Encodes the specified SystemState message. Does not implicitly {@link perfetto.protos.AndroidStartupMetric.SystemState.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidStartupMetric.SystemState
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.ISystemState} m SystemState message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                SystemState.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.dex2oatRunning != null && Object.hasOwnProperty.call(m, "dex2oatRunning"))
                        w.uint32(8).bool(m.dex2oatRunning);
                    if (m.installdRunning != null && Object.hasOwnProperty.call(m, "installdRunning"))
                        w.uint32(16).bool(m.installdRunning);
                    if (m.broadcastDispatchedCount != null && Object.hasOwnProperty.call(m, "broadcastDispatchedCount"))
                        w.uint32(24).int64(m.broadcastDispatchedCount);
                    if (m.broadcastReceivedCount != null && Object.hasOwnProperty.call(m, "broadcastReceivedCount"))
                        w.uint32(32).int64(m.broadcastReceivedCount);
                    if (m.mostActiveNonLaunchProcesses != null && m.mostActiveNonLaunchProcesses.length) {
                        for (var i = 0; i < m.mostActiveNonLaunchProcesses.length; ++i)
                            w.uint32(42).string(m.mostActiveNonLaunchProcesses[i]);
                    }
                    if (m.installdDurNs != null && Object.hasOwnProperty.call(m, "installdDurNs"))
                        w.uint32(48).int64(m.installdDurNs);
                    if (m.dex2oatDurNs != null && Object.hasOwnProperty.call(m, "dex2oatDurNs"))
                        w.uint32(56).int64(m.dex2oatDurNs);
                    return w;
                };

                /**
                 * Encodes the specified SystemState message, length delimited. Does not implicitly {@link perfetto.protos.AndroidStartupMetric.SystemState.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidStartupMetric.SystemState
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.ISystemState} message SystemState message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                SystemState.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a SystemState message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidStartupMetric.SystemState
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidStartupMetric.SystemState} SystemState
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                SystemState.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidStartupMetric.SystemState();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.dex2oatRunning = r.bool();
                            break;
                        case 2:
                            m.installdRunning = r.bool();
                            break;
                        case 3:
                            m.broadcastDispatchedCount = r.int64();
                            break;
                        case 4:
                            m.broadcastReceivedCount = r.int64();
                            break;
                        case 5:
                            if (!(m.mostActiveNonLaunchProcesses && m.mostActiveNonLaunchProcesses.length))
                                m.mostActiveNonLaunchProcesses = [];
                            m.mostActiveNonLaunchProcesses.push(r.string());
                            break;
                        case 6:
                            m.installdDurNs = r.int64();
                            break;
                        case 7:
                            m.dex2oatDurNs = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a SystemState message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidStartupMetric.SystemState
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidStartupMetric.SystemState} SystemState
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                SystemState.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a SystemState message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidStartupMetric.SystemState
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                SystemState.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.dex2oatRunning != null && m.hasOwnProperty("dex2oatRunning")) {
                        if (typeof m.dex2oatRunning !== "boolean")
                            return "dex2oatRunning: boolean expected";
                    }
                    if (m.installdRunning != null && m.hasOwnProperty("installdRunning")) {
                        if (typeof m.installdRunning !== "boolean")
                            return "installdRunning: boolean expected";
                    }
                    if (m.broadcastDispatchedCount != null && m.hasOwnProperty("broadcastDispatchedCount")) {
                        if (!$util.isInteger(m.broadcastDispatchedCount) && !(m.broadcastDispatchedCount && $util.isInteger(m.broadcastDispatchedCount.low) && $util.isInteger(m.broadcastDispatchedCount.high)))
                            return "broadcastDispatchedCount: integer|Long expected";
                    }
                    if (m.broadcastReceivedCount != null && m.hasOwnProperty("broadcastReceivedCount")) {
                        if (!$util.isInteger(m.broadcastReceivedCount) && !(m.broadcastReceivedCount && $util.isInteger(m.broadcastReceivedCount.low) && $util.isInteger(m.broadcastReceivedCount.high)))
                            return "broadcastReceivedCount: integer|Long expected";
                    }
                    if (m.mostActiveNonLaunchProcesses != null && m.hasOwnProperty("mostActiveNonLaunchProcesses")) {
                        if (!Array.isArray(m.mostActiveNonLaunchProcesses))
                            return "mostActiveNonLaunchProcesses: array expected";
                        for (var i = 0; i < m.mostActiveNonLaunchProcesses.length; ++i) {
                            if (!$util.isString(m.mostActiveNonLaunchProcesses[i]))
                                return "mostActiveNonLaunchProcesses: string[] expected";
                        }
                    }
                    if (m.installdDurNs != null && m.hasOwnProperty("installdDurNs")) {
                        if (!$util.isInteger(m.installdDurNs) && !(m.installdDurNs && $util.isInteger(m.installdDurNs.low) && $util.isInteger(m.installdDurNs.high)))
                            return "installdDurNs: integer|Long expected";
                    }
                    if (m.dex2oatDurNs != null && m.hasOwnProperty("dex2oatDurNs")) {
                        if (!$util.isInteger(m.dex2oatDurNs) && !(m.dex2oatDurNs && $util.isInteger(m.dex2oatDurNs.low) && $util.isInteger(m.dex2oatDurNs.high)))
                            return "dex2oatDurNs: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a SystemState message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidStartupMetric.SystemState
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidStartupMetric.SystemState} SystemState
                 */
                SystemState.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidStartupMetric.SystemState)
                        return d;
                    var m = new $root.perfetto.protos.AndroidStartupMetric.SystemState();
                    if (d.dex2oatRunning != null) {
                        m.dex2oatRunning = Boolean(d.dex2oatRunning);
                    }
                    if (d.installdRunning != null) {
                        m.installdRunning = Boolean(d.installdRunning);
                    }
                    if (d.broadcastDispatchedCount != null) {
                        if ($util.Long)
                            (m.broadcastDispatchedCount = $util.Long.fromValue(d.broadcastDispatchedCount)).unsigned = false;
                        else if (typeof d.broadcastDispatchedCount === "string")
                            m.broadcastDispatchedCount = parseInt(d.broadcastDispatchedCount, 10);
                        else if (typeof d.broadcastDispatchedCount === "number")
                            m.broadcastDispatchedCount = d.broadcastDispatchedCount;
                        else if (typeof d.broadcastDispatchedCount === "object")
                            m.broadcastDispatchedCount = new $util.LongBits(d.broadcastDispatchedCount.low >>> 0, d.broadcastDispatchedCount.high >>> 0).toNumber();
                    }
                    if (d.broadcastReceivedCount != null) {
                        if ($util.Long)
                            (m.broadcastReceivedCount = $util.Long.fromValue(d.broadcastReceivedCount)).unsigned = false;
                        else if (typeof d.broadcastReceivedCount === "string")
                            m.broadcastReceivedCount = parseInt(d.broadcastReceivedCount, 10);
                        else if (typeof d.broadcastReceivedCount === "number")
                            m.broadcastReceivedCount = d.broadcastReceivedCount;
                        else if (typeof d.broadcastReceivedCount === "object")
                            m.broadcastReceivedCount = new $util.LongBits(d.broadcastReceivedCount.low >>> 0, d.broadcastReceivedCount.high >>> 0).toNumber();
                    }
                    if (d.mostActiveNonLaunchProcesses) {
                        if (!Array.isArray(d.mostActiveNonLaunchProcesses))
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.SystemState.mostActiveNonLaunchProcesses: array expected");
                        m.mostActiveNonLaunchProcesses = [];
                        for (var i = 0; i < d.mostActiveNonLaunchProcesses.length; ++i) {
                            m.mostActiveNonLaunchProcesses[i] = String(d.mostActiveNonLaunchProcesses[i]);
                        }
                    }
                    if (d.installdDurNs != null) {
                        if ($util.Long)
                            (m.installdDurNs = $util.Long.fromValue(d.installdDurNs)).unsigned = false;
                        else if (typeof d.installdDurNs === "string")
                            m.installdDurNs = parseInt(d.installdDurNs, 10);
                        else if (typeof d.installdDurNs === "number")
                            m.installdDurNs = d.installdDurNs;
                        else if (typeof d.installdDurNs === "object")
                            m.installdDurNs = new $util.LongBits(d.installdDurNs.low >>> 0, d.installdDurNs.high >>> 0).toNumber();
                    }
                    if (d.dex2oatDurNs != null) {
                        if ($util.Long)
                            (m.dex2oatDurNs = $util.Long.fromValue(d.dex2oatDurNs)).unsigned = false;
                        else if (typeof d.dex2oatDurNs === "string")
                            m.dex2oatDurNs = parseInt(d.dex2oatDurNs, 10);
                        else if (typeof d.dex2oatDurNs === "number")
                            m.dex2oatDurNs = d.dex2oatDurNs;
                        else if (typeof d.dex2oatDurNs === "object")
                            m.dex2oatDurNs = new $util.LongBits(d.dex2oatDurNs.low >>> 0, d.dex2oatDurNs.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a SystemState message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidStartupMetric.SystemState
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.SystemState} m SystemState
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                SystemState.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.mostActiveNonLaunchProcesses = [];
                    }
                    if (o.defaults) {
                        d.dex2oatRunning = false;
                        d.installdRunning = false;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.broadcastDispatchedCount = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.broadcastDispatchedCount = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.broadcastReceivedCount = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.broadcastReceivedCount = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.installdDurNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.installdDurNs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.dex2oatDurNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.dex2oatDurNs = o.longs === String ? "0" : 0;
                    }
                    if (m.dex2oatRunning != null && m.hasOwnProperty("dex2oatRunning")) {
                        d.dex2oatRunning = m.dex2oatRunning;
                    }
                    if (m.installdRunning != null && m.hasOwnProperty("installdRunning")) {
                        d.installdRunning = m.installdRunning;
                    }
                    if (m.broadcastDispatchedCount != null && m.hasOwnProperty("broadcastDispatchedCount")) {
                        if (typeof m.broadcastDispatchedCount === "number")
                            d.broadcastDispatchedCount = o.longs === String ? String(m.broadcastDispatchedCount) : m.broadcastDispatchedCount;
                        else
                            d.broadcastDispatchedCount = o.longs === String ? $util.Long.prototype.toString.call(m.broadcastDispatchedCount) : o.longs === Number ? new $util.LongBits(m.broadcastDispatchedCount.low >>> 0, m.broadcastDispatchedCount.high >>> 0).toNumber() : m.broadcastDispatchedCount;
                    }
                    if (m.broadcastReceivedCount != null && m.hasOwnProperty("broadcastReceivedCount")) {
                        if (typeof m.broadcastReceivedCount === "number")
                            d.broadcastReceivedCount = o.longs === String ? String(m.broadcastReceivedCount) : m.broadcastReceivedCount;
                        else
                            d.broadcastReceivedCount = o.longs === String ? $util.Long.prototype.toString.call(m.broadcastReceivedCount) : o.longs === Number ? new $util.LongBits(m.broadcastReceivedCount.low >>> 0, m.broadcastReceivedCount.high >>> 0).toNumber() : m.broadcastReceivedCount;
                    }
                    if (m.mostActiveNonLaunchProcesses && m.mostActiveNonLaunchProcesses.length) {
                        d.mostActiveNonLaunchProcesses = [];
                        for (var j = 0; j < m.mostActiveNonLaunchProcesses.length; ++j) {
                            d.mostActiveNonLaunchProcesses[j] = m.mostActiveNonLaunchProcesses[j];
                        }
                    }
                    if (m.installdDurNs != null && m.hasOwnProperty("installdDurNs")) {
                        if (typeof m.installdDurNs === "number")
                            d.installdDurNs = o.longs === String ? String(m.installdDurNs) : m.installdDurNs;
                        else
                            d.installdDurNs = o.longs === String ? $util.Long.prototype.toString.call(m.installdDurNs) : o.longs === Number ? new $util.LongBits(m.installdDurNs.low >>> 0, m.installdDurNs.high >>> 0).toNumber() : m.installdDurNs;
                    }
                    if (m.dex2oatDurNs != null && m.hasOwnProperty("dex2oatDurNs")) {
                        if (typeof m.dex2oatDurNs === "number")
                            d.dex2oatDurNs = o.longs === String ? String(m.dex2oatDurNs) : m.dex2oatDurNs;
                        else
                            d.dex2oatDurNs = o.longs === String ? $util.Long.prototype.toString.call(m.dex2oatDurNs) : o.longs === Number ? new $util.LongBits(m.dex2oatDurNs.low >>> 0, m.dex2oatDurNs.high >>> 0).toNumber() : m.dex2oatDurNs;
                    }
                    return d;
                };

                /**
                 * Converts this SystemState to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidStartupMetric.SystemState
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                SystemState.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return SystemState;
            })();

            AndroidStartupMetric.Startup = (function() {

                /**
                 * Properties of a Startup.
                 * @memberof perfetto.protos.AndroidStartupMetric
                 * @interface IStartup
                 * @property {number|null} [startupId] Startup startupId
                 * @property {string|null} [startupType] Startup startupType
                 * @property {string|null} [packageName] Startup packageName
                 * @property {string|null} [processName] Startup processName
                 * @property {Array.<perfetto.protos.AndroidStartupMetric.IActivity>|null} [activities] Startup activities
                 * @property {Array.<perfetto.protos.AndroidStartupMetric.IBinderTransaction>|null} [longBinderTransactions] Startup longBinderTransactions
                 * @property {boolean|null} [zygoteNewProcess] Startup zygoteNewProcess
                 * @property {number|null} [activityHostingProcessCount] Startup activityHostingProcessCount
                 * @property {perfetto.protos.AndroidStartupMetric.IEventTimestamps|null} [eventTimestamps] Startup eventTimestamps
                 * @property {perfetto.protos.AndroidStartupMetric.IToFirstFrame|null} [toFirstFrame] Startup toFirstFrame
                 * @property {perfetto.protos.IAndroidProcessMetadata|null} [process] Startup process
                 * @property {perfetto.protos.AndroidStartupMetric.IHscMetrics|null} [hsc] Startup hsc
                 * @property {perfetto.protos.AndroidStartupMetric.ISlice|null} [reportFullyDrawn] Startup reportFullyDrawn
                 * @property {Array.<perfetto.protos.AndroidStartupMetric.IOptimizationStatus>|null} [optimizationStatus] Startup optimizationStatus
                 * @property {perfetto.protos.AndroidStartupMetric.ISystemState|null} [systemState] Startup systemState
                 * @property {Array.<string>|null} [slowStartReason] Startup slowStartReason
                 */

                /**
                 * Constructs a new Startup.
                 * @memberof perfetto.protos.AndroidStartupMetric
                 * @classdesc Represents a Startup.
                 * @implements IStartup
                 * @constructor
                 * @param {perfetto.protos.AndroidStartupMetric.IStartup=} [p] Properties to set
                 */
                function Startup(p) {
                    this.activities = [];
                    this.longBinderTransactions = [];
                    this.optimizationStatus = [];
                    this.slowStartReason = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Startup startupId.
                 * @member {number} startupId
                 * @memberof perfetto.protos.AndroidStartupMetric.Startup
                 * @instance
                 */
                Startup.prototype.startupId = 0;

                /**
                 * Startup startupType.
                 * @member {string} startupType
                 * @memberof perfetto.protos.AndroidStartupMetric.Startup
                 * @instance
                 */
                Startup.prototype.startupType = "";

                /**
                 * Startup packageName.
                 * @member {string} packageName
                 * @memberof perfetto.protos.AndroidStartupMetric.Startup
                 * @instance
                 */
                Startup.prototype.packageName = "";

                /**
                 * Startup processName.
                 * @member {string} processName
                 * @memberof perfetto.protos.AndroidStartupMetric.Startup
                 * @instance
                 */
                Startup.prototype.processName = "";

                /**
                 * Startup activities.
                 * @member {Array.<perfetto.protos.AndroidStartupMetric.IActivity>} activities
                 * @memberof perfetto.protos.AndroidStartupMetric.Startup
                 * @instance
                 */
                Startup.prototype.activities = $util.emptyArray;

                /**
                 * Startup longBinderTransactions.
                 * @member {Array.<perfetto.protos.AndroidStartupMetric.IBinderTransaction>} longBinderTransactions
                 * @memberof perfetto.protos.AndroidStartupMetric.Startup
                 * @instance
                 */
                Startup.prototype.longBinderTransactions = $util.emptyArray;

                /**
                 * Startup zygoteNewProcess.
                 * @member {boolean} zygoteNewProcess
                 * @memberof perfetto.protos.AndroidStartupMetric.Startup
                 * @instance
                 */
                Startup.prototype.zygoteNewProcess = false;

                /**
                 * Startup activityHostingProcessCount.
                 * @member {number} activityHostingProcessCount
                 * @memberof perfetto.protos.AndroidStartupMetric.Startup
                 * @instance
                 */
                Startup.prototype.activityHostingProcessCount = 0;

                /**
                 * Startup eventTimestamps.
                 * @member {perfetto.protos.AndroidStartupMetric.IEventTimestamps|null|undefined} eventTimestamps
                 * @memberof perfetto.protos.AndroidStartupMetric.Startup
                 * @instance
                 */
                Startup.prototype.eventTimestamps = null;

                /**
                 * Startup toFirstFrame.
                 * @member {perfetto.protos.AndroidStartupMetric.IToFirstFrame|null|undefined} toFirstFrame
                 * @memberof perfetto.protos.AndroidStartupMetric.Startup
                 * @instance
                 */
                Startup.prototype.toFirstFrame = null;

                /**
                 * Startup process.
                 * @member {perfetto.protos.IAndroidProcessMetadata|null|undefined} process
                 * @memberof perfetto.protos.AndroidStartupMetric.Startup
                 * @instance
                 */
                Startup.prototype.process = null;

                /**
                 * Startup hsc.
                 * @member {perfetto.protos.AndroidStartupMetric.IHscMetrics|null|undefined} hsc
                 * @memberof perfetto.protos.AndroidStartupMetric.Startup
                 * @instance
                 */
                Startup.prototype.hsc = null;

                /**
                 * Startup reportFullyDrawn.
                 * @member {perfetto.protos.AndroidStartupMetric.ISlice|null|undefined} reportFullyDrawn
                 * @memberof perfetto.protos.AndroidStartupMetric.Startup
                 * @instance
                 */
                Startup.prototype.reportFullyDrawn = null;

                /**
                 * Startup optimizationStatus.
                 * @member {Array.<perfetto.protos.AndroidStartupMetric.IOptimizationStatus>} optimizationStatus
                 * @memberof perfetto.protos.AndroidStartupMetric.Startup
                 * @instance
                 */
                Startup.prototype.optimizationStatus = $util.emptyArray;

                /**
                 * Startup systemState.
                 * @member {perfetto.protos.AndroidStartupMetric.ISystemState|null|undefined} systemState
                 * @memberof perfetto.protos.AndroidStartupMetric.Startup
                 * @instance
                 */
                Startup.prototype.systemState = null;

                /**
                 * Startup slowStartReason.
                 * @member {Array.<string>} slowStartReason
                 * @memberof perfetto.protos.AndroidStartupMetric.Startup
                 * @instance
                 */
                Startup.prototype.slowStartReason = $util.emptyArray;

                /**
                 * Creates a new Startup instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidStartupMetric.Startup
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.IStartup=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidStartupMetric.Startup} Startup instance
                 */
                Startup.create = function create(properties) {
                    return new Startup(properties);
                };

                /**
                 * Encodes the specified Startup message. Does not implicitly {@link perfetto.protos.AndroidStartupMetric.Startup.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidStartupMetric.Startup
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.IStartup} m Startup message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Startup.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.startupId != null && Object.hasOwnProperty.call(m, "startupId"))
                        w.uint32(8).uint32(m.startupId);
                    if (m.packageName != null && Object.hasOwnProperty.call(m, "packageName"))
                        w.uint32(18).string(m.packageName);
                    if (m.processName != null && Object.hasOwnProperty.call(m, "processName"))
                        w.uint32(26).string(m.processName);
                    if (m.zygoteNewProcess != null && Object.hasOwnProperty.call(m, "zygoteNewProcess"))
                        w.uint32(32).bool(m.zygoteNewProcess);
                    if (m.toFirstFrame != null && Object.hasOwnProperty.call(m, "toFirstFrame"))
                        $root.perfetto.protos.AndroidStartupMetric.ToFirstFrame.encode(m.toFirstFrame, w.uint32(42).fork()).ldelim();
                    if (m.activityHostingProcessCount != null && Object.hasOwnProperty.call(m, "activityHostingProcessCount"))
                        w.uint32(48).uint32(m.activityHostingProcessCount);
                    if (m.process != null && Object.hasOwnProperty.call(m, "process"))
                        $root.perfetto.protos.AndroidProcessMetadata.encode(m.process, w.uint32(58).fork()).ldelim();
                    if (m.hsc != null && Object.hasOwnProperty.call(m, "hsc"))
                        $root.perfetto.protos.AndroidStartupMetric.HscMetrics.encode(m.hsc, w.uint32(66).fork()).ldelim();
                    if (m.reportFullyDrawn != null && Object.hasOwnProperty.call(m, "reportFullyDrawn"))
                        $root.perfetto.protos.AndroidStartupMetric.Slice.encode(m.reportFullyDrawn, w.uint32(74).fork()).ldelim();
                    if (m.activities != null && m.activities.length) {
                        for (var i = 0; i < m.activities.length; ++i)
                            $root.perfetto.protos.AndroidStartupMetric.Activity.encode(m.activities[i], w.uint32(90).fork()).ldelim();
                    }
                    if (m.optimizationStatus != null && m.optimizationStatus.length) {
                        for (var i = 0; i < m.optimizationStatus.length; ++i)
                            $root.perfetto.protos.AndroidStartupMetric.OptimizationStatus.encode(m.optimizationStatus[i], w.uint32(98).fork()).ldelim();
                    }
                    if (m.eventTimestamps != null && Object.hasOwnProperty.call(m, "eventTimestamps"))
                        $root.perfetto.protos.AndroidStartupMetric.EventTimestamps.encode(m.eventTimestamps, w.uint32(106).fork()).ldelim();
                    if (m.longBinderTransactions != null && m.longBinderTransactions.length) {
                        for (var i = 0; i < m.longBinderTransactions.length; ++i)
                            $root.perfetto.protos.AndroidStartupMetric.BinderTransaction.encode(m.longBinderTransactions[i], w.uint32(114).fork()).ldelim();
                    }
                    if (m.systemState != null && Object.hasOwnProperty.call(m, "systemState"))
                        $root.perfetto.protos.AndroidStartupMetric.SystemState.encode(m.systemState, w.uint32(122).fork()).ldelim();
                    if (m.startupType != null && Object.hasOwnProperty.call(m, "startupType"))
                        w.uint32(130).string(m.startupType);
                    if (m.slowStartReason != null && m.slowStartReason.length) {
                        for (var i = 0; i < m.slowStartReason.length; ++i)
                            w.uint32(138).string(m.slowStartReason[i]);
                    }
                    return w;
                };

                /**
                 * Encodes the specified Startup message, length delimited. Does not implicitly {@link perfetto.protos.AndroidStartupMetric.Startup.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidStartupMetric.Startup
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.IStartup} message Startup message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Startup.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Startup message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidStartupMetric.Startup
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidStartupMetric.Startup} Startup
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Startup.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidStartupMetric.Startup();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.startupId = r.uint32();
                            break;
                        case 16:
                            m.startupType = r.string();
                            break;
                        case 2:
                            m.packageName = r.string();
                            break;
                        case 3:
                            m.processName = r.string();
                            break;
                        case 11:
                            if (!(m.activities && m.activities.length))
                                m.activities = [];
                            m.activities.push($root.perfetto.protos.AndroidStartupMetric.Activity.decode(r, r.uint32()));
                            break;
                        case 14:
                            if (!(m.longBinderTransactions && m.longBinderTransactions.length))
                                m.longBinderTransactions = [];
                            m.longBinderTransactions.push($root.perfetto.protos.AndroidStartupMetric.BinderTransaction.decode(r, r.uint32()));
                            break;
                        case 4:
                            m.zygoteNewProcess = r.bool();
                            break;
                        case 6:
                            m.activityHostingProcessCount = r.uint32();
                            break;
                        case 13:
                            m.eventTimestamps = $root.perfetto.protos.AndroidStartupMetric.EventTimestamps.decode(r, r.uint32());
                            break;
                        case 5:
                            m.toFirstFrame = $root.perfetto.protos.AndroidStartupMetric.ToFirstFrame.decode(r, r.uint32());
                            break;
                        case 7:
                            m.process = $root.perfetto.protos.AndroidProcessMetadata.decode(r, r.uint32());
                            break;
                        case 8:
                            m.hsc = $root.perfetto.protos.AndroidStartupMetric.HscMetrics.decode(r, r.uint32());
                            break;
                        case 9:
                            m.reportFullyDrawn = $root.perfetto.protos.AndroidStartupMetric.Slice.decode(r, r.uint32());
                            break;
                        case 12:
                            if (!(m.optimizationStatus && m.optimizationStatus.length))
                                m.optimizationStatus = [];
                            m.optimizationStatus.push($root.perfetto.protos.AndroidStartupMetric.OptimizationStatus.decode(r, r.uint32()));
                            break;
                        case 15:
                            m.systemState = $root.perfetto.protos.AndroidStartupMetric.SystemState.decode(r, r.uint32());
                            break;
                        case 17:
                            if (!(m.slowStartReason && m.slowStartReason.length))
                                m.slowStartReason = [];
                            m.slowStartReason.push(r.string());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Startup message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidStartupMetric.Startup
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidStartupMetric.Startup} Startup
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Startup.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Startup message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidStartupMetric.Startup
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Startup.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.startupId != null && m.hasOwnProperty("startupId")) {
                        if (!$util.isInteger(m.startupId))
                            return "startupId: integer expected";
                    }
                    if (m.startupType != null && m.hasOwnProperty("startupType")) {
                        if (!$util.isString(m.startupType))
                            return "startupType: string expected";
                    }
                    if (m.packageName != null && m.hasOwnProperty("packageName")) {
                        if (!$util.isString(m.packageName))
                            return "packageName: string expected";
                    }
                    if (m.processName != null && m.hasOwnProperty("processName")) {
                        if (!$util.isString(m.processName))
                            return "processName: string expected";
                    }
                    if (m.activities != null && m.hasOwnProperty("activities")) {
                        if (!Array.isArray(m.activities))
                            return "activities: array expected";
                        for (var i = 0; i < m.activities.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidStartupMetric.Activity.verify(m.activities[i]);
                                if (e)
                                    return "activities." + e;
                            }
                        }
                    }
                    if (m.longBinderTransactions != null && m.hasOwnProperty("longBinderTransactions")) {
                        if (!Array.isArray(m.longBinderTransactions))
                            return "longBinderTransactions: array expected";
                        for (var i = 0; i < m.longBinderTransactions.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidStartupMetric.BinderTransaction.verify(m.longBinderTransactions[i]);
                                if (e)
                                    return "longBinderTransactions." + e;
                            }
                        }
                    }
                    if (m.zygoteNewProcess != null && m.hasOwnProperty("zygoteNewProcess")) {
                        if (typeof m.zygoteNewProcess !== "boolean")
                            return "zygoteNewProcess: boolean expected";
                    }
                    if (m.activityHostingProcessCount != null && m.hasOwnProperty("activityHostingProcessCount")) {
                        if (!$util.isInteger(m.activityHostingProcessCount))
                            return "activityHostingProcessCount: integer expected";
                    }
                    if (m.eventTimestamps != null && m.hasOwnProperty("eventTimestamps")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.EventTimestamps.verify(m.eventTimestamps);
                            if (e)
                                return "eventTimestamps." + e;
                        }
                    }
                    if (m.toFirstFrame != null && m.hasOwnProperty("toFirstFrame")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.ToFirstFrame.verify(m.toFirstFrame);
                            if (e)
                                return "toFirstFrame." + e;
                        }
                    }
                    if (m.process != null && m.hasOwnProperty("process")) {
                        {
                            var e = $root.perfetto.protos.AndroidProcessMetadata.verify(m.process);
                            if (e)
                                return "process." + e;
                        }
                    }
                    if (m.hsc != null && m.hasOwnProperty("hsc")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.HscMetrics.verify(m.hsc);
                            if (e)
                                return "hsc." + e;
                        }
                    }
                    if (m.reportFullyDrawn != null && m.hasOwnProperty("reportFullyDrawn")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.Slice.verify(m.reportFullyDrawn);
                            if (e)
                                return "reportFullyDrawn." + e;
                        }
                    }
                    if (m.optimizationStatus != null && m.hasOwnProperty("optimizationStatus")) {
                        if (!Array.isArray(m.optimizationStatus))
                            return "optimizationStatus: array expected";
                        for (var i = 0; i < m.optimizationStatus.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidStartupMetric.OptimizationStatus.verify(m.optimizationStatus[i]);
                                if (e)
                                    return "optimizationStatus." + e;
                            }
                        }
                    }
                    if (m.systemState != null && m.hasOwnProperty("systemState")) {
                        {
                            var e = $root.perfetto.protos.AndroidStartupMetric.SystemState.verify(m.systemState);
                            if (e)
                                return "systemState." + e;
                        }
                    }
                    if (m.slowStartReason != null && m.hasOwnProperty("slowStartReason")) {
                        if (!Array.isArray(m.slowStartReason))
                            return "slowStartReason: array expected";
                        for (var i = 0; i < m.slowStartReason.length; ++i) {
                            if (!$util.isString(m.slowStartReason[i]))
                                return "slowStartReason: string[] expected";
                        }
                    }
                    return null;
                };

                /**
                 * Creates a Startup message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidStartupMetric.Startup
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidStartupMetric.Startup} Startup
                 */
                Startup.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidStartupMetric.Startup)
                        return d;
                    var m = new $root.perfetto.protos.AndroidStartupMetric.Startup();
                    if (d.startupId != null) {
                        m.startupId = d.startupId >>> 0;
                    }
                    if (d.startupType != null) {
                        m.startupType = String(d.startupType);
                    }
                    if (d.packageName != null) {
                        m.packageName = String(d.packageName);
                    }
                    if (d.processName != null) {
                        m.processName = String(d.processName);
                    }
                    if (d.activities) {
                        if (!Array.isArray(d.activities))
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.Startup.activities: array expected");
                        m.activities = [];
                        for (var i = 0; i < d.activities.length; ++i) {
                            if (typeof d.activities[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidStartupMetric.Startup.activities: object expected");
                            m.activities[i] = $root.perfetto.protos.AndroidStartupMetric.Activity.fromObject(d.activities[i]);
                        }
                    }
                    if (d.longBinderTransactions) {
                        if (!Array.isArray(d.longBinderTransactions))
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.Startup.longBinderTransactions: array expected");
                        m.longBinderTransactions = [];
                        for (var i = 0; i < d.longBinderTransactions.length; ++i) {
                            if (typeof d.longBinderTransactions[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidStartupMetric.Startup.longBinderTransactions: object expected");
                            m.longBinderTransactions[i] = $root.perfetto.protos.AndroidStartupMetric.BinderTransaction.fromObject(d.longBinderTransactions[i]);
                        }
                    }
                    if (d.zygoteNewProcess != null) {
                        m.zygoteNewProcess = Boolean(d.zygoteNewProcess);
                    }
                    if (d.activityHostingProcessCount != null) {
                        m.activityHostingProcessCount = d.activityHostingProcessCount >>> 0;
                    }
                    if (d.eventTimestamps != null) {
                        if (typeof d.eventTimestamps !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.Startup.eventTimestamps: object expected");
                        m.eventTimestamps = $root.perfetto.protos.AndroidStartupMetric.EventTimestamps.fromObject(d.eventTimestamps);
                    }
                    if (d.toFirstFrame != null) {
                        if (typeof d.toFirstFrame !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.Startup.toFirstFrame: object expected");
                        m.toFirstFrame = $root.perfetto.protos.AndroidStartupMetric.ToFirstFrame.fromObject(d.toFirstFrame);
                    }
                    if (d.process != null) {
                        if (typeof d.process !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.Startup.process: object expected");
                        m.process = $root.perfetto.protos.AndroidProcessMetadata.fromObject(d.process);
                    }
                    if (d.hsc != null) {
                        if (typeof d.hsc !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.Startup.hsc: object expected");
                        m.hsc = $root.perfetto.protos.AndroidStartupMetric.HscMetrics.fromObject(d.hsc);
                    }
                    if (d.reportFullyDrawn != null) {
                        if (typeof d.reportFullyDrawn !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.Startup.reportFullyDrawn: object expected");
                        m.reportFullyDrawn = $root.perfetto.protos.AndroidStartupMetric.Slice.fromObject(d.reportFullyDrawn);
                    }
                    if (d.optimizationStatus) {
                        if (!Array.isArray(d.optimizationStatus))
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.Startup.optimizationStatus: array expected");
                        m.optimizationStatus = [];
                        for (var i = 0; i < d.optimizationStatus.length; ++i) {
                            if (typeof d.optimizationStatus[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidStartupMetric.Startup.optimizationStatus: object expected");
                            m.optimizationStatus[i] = $root.perfetto.protos.AndroidStartupMetric.OptimizationStatus.fromObject(d.optimizationStatus[i]);
                        }
                    }
                    if (d.systemState != null) {
                        if (typeof d.systemState !== "object")
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.Startup.systemState: object expected");
                        m.systemState = $root.perfetto.protos.AndroidStartupMetric.SystemState.fromObject(d.systemState);
                    }
                    if (d.slowStartReason) {
                        if (!Array.isArray(d.slowStartReason))
                            throw TypeError(".perfetto.protos.AndroidStartupMetric.Startup.slowStartReason: array expected");
                        m.slowStartReason = [];
                        for (var i = 0; i < d.slowStartReason.length; ++i) {
                            m.slowStartReason[i] = String(d.slowStartReason[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Startup message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidStartupMetric.Startup
                 * @static
                 * @param {perfetto.protos.AndroidStartupMetric.Startup} m Startup
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Startup.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.activities = [];
                        d.optimizationStatus = [];
                        d.longBinderTransactions = [];
                        d.slowStartReason = [];
                    }
                    if (o.defaults) {
                        d.startupId = 0;
                        d.packageName = "";
                        d.processName = "";
                        d.zygoteNewProcess = false;
                        d.toFirstFrame = null;
                        d.activityHostingProcessCount = 0;
                        d.process = null;
                        d.hsc = null;
                        d.reportFullyDrawn = null;
                        d.eventTimestamps = null;
                        d.systemState = null;
                        d.startupType = "";
                    }
                    if (m.startupId != null && m.hasOwnProperty("startupId")) {
                        d.startupId = m.startupId;
                    }
                    if (m.packageName != null && m.hasOwnProperty("packageName")) {
                        d.packageName = m.packageName;
                    }
                    if (m.processName != null && m.hasOwnProperty("processName")) {
                        d.processName = m.processName;
                    }
                    if (m.zygoteNewProcess != null && m.hasOwnProperty("zygoteNewProcess")) {
                        d.zygoteNewProcess = m.zygoteNewProcess;
                    }
                    if (m.toFirstFrame != null && m.hasOwnProperty("toFirstFrame")) {
                        d.toFirstFrame = $root.perfetto.protos.AndroidStartupMetric.ToFirstFrame.toObject(m.toFirstFrame, o);
                    }
                    if (m.activityHostingProcessCount != null && m.hasOwnProperty("activityHostingProcessCount")) {
                        d.activityHostingProcessCount = m.activityHostingProcessCount;
                    }
                    if (m.process != null && m.hasOwnProperty("process")) {
                        d.process = $root.perfetto.protos.AndroidProcessMetadata.toObject(m.process, o);
                    }
                    if (m.hsc != null && m.hasOwnProperty("hsc")) {
                        d.hsc = $root.perfetto.protos.AndroidStartupMetric.HscMetrics.toObject(m.hsc, o);
                    }
                    if (m.reportFullyDrawn != null && m.hasOwnProperty("reportFullyDrawn")) {
                        d.reportFullyDrawn = $root.perfetto.protos.AndroidStartupMetric.Slice.toObject(m.reportFullyDrawn, o);
                    }
                    if (m.activities && m.activities.length) {
                        d.activities = [];
                        for (var j = 0; j < m.activities.length; ++j) {
                            d.activities[j] = $root.perfetto.protos.AndroidStartupMetric.Activity.toObject(m.activities[j], o);
                        }
                    }
                    if (m.optimizationStatus && m.optimizationStatus.length) {
                        d.optimizationStatus = [];
                        for (var j = 0; j < m.optimizationStatus.length; ++j) {
                            d.optimizationStatus[j] = $root.perfetto.protos.AndroidStartupMetric.OptimizationStatus.toObject(m.optimizationStatus[j], o);
                        }
                    }
                    if (m.eventTimestamps != null && m.hasOwnProperty("eventTimestamps")) {
                        d.eventTimestamps = $root.perfetto.protos.AndroidStartupMetric.EventTimestamps.toObject(m.eventTimestamps, o);
                    }
                    if (m.longBinderTransactions && m.longBinderTransactions.length) {
                        d.longBinderTransactions = [];
                        for (var j = 0; j < m.longBinderTransactions.length; ++j) {
                            d.longBinderTransactions[j] = $root.perfetto.protos.AndroidStartupMetric.BinderTransaction.toObject(m.longBinderTransactions[j], o);
                        }
                    }
                    if (m.systemState != null && m.hasOwnProperty("systemState")) {
                        d.systemState = $root.perfetto.protos.AndroidStartupMetric.SystemState.toObject(m.systemState, o);
                    }
                    if (m.startupType != null && m.hasOwnProperty("startupType")) {
                        d.startupType = m.startupType;
                    }
                    if (m.slowStartReason && m.slowStartReason.length) {
                        d.slowStartReason = [];
                        for (var j = 0; j < m.slowStartReason.length; ++j) {
                            d.slowStartReason[j] = m.slowStartReason[j];
                        }
                    }
                    return d;
                };

                /**
                 * Converts this Startup to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidStartupMetric.Startup
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Startup.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Startup;
            })();

            return AndroidStartupMetric;
        })();

        protos.AndroidSurfaceflingerMetric = (function() {

            /**
             * Properties of an AndroidSurfaceflingerMetric.
             * @memberof perfetto.protos
             * @interface IAndroidSurfaceflingerMetric
             * @property {number|null} [missedFrames] AndroidSurfaceflingerMetric missedFrames
             * @property {number|null} [missedHwcFrames] AndroidSurfaceflingerMetric missedHwcFrames
             * @property {number|null} [missedGpuFrames] AndroidSurfaceflingerMetric missedGpuFrames
             * @property {number|null} [missedFrameRate] AndroidSurfaceflingerMetric missedFrameRate
             * @property {number|null} [missedHwcFrameRate] AndroidSurfaceflingerMetric missedHwcFrameRate
             * @property {number|null} [missedGpuFrameRate] AndroidSurfaceflingerMetric missedGpuFrameRate
             * @property {number|null} [gpuInvocations] AndroidSurfaceflingerMetric gpuInvocations
             * @property {number|null} [avgGpuWaitingDurMs] AndroidSurfaceflingerMetric avgGpuWaitingDurMs
             * @property {number|null} [totalNonEmptyGpuWaitingDurMs] AndroidSurfaceflingerMetric totalNonEmptyGpuWaitingDurMs
             */

            /**
             * Constructs a new AndroidSurfaceflingerMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidSurfaceflingerMetric.
             * @implements IAndroidSurfaceflingerMetric
             * @constructor
             * @param {perfetto.protos.IAndroidSurfaceflingerMetric=} [p] Properties to set
             */
            function AndroidSurfaceflingerMetric(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidSurfaceflingerMetric missedFrames.
             * @member {number} missedFrames
             * @memberof perfetto.protos.AndroidSurfaceflingerMetric
             * @instance
             */
            AndroidSurfaceflingerMetric.prototype.missedFrames = 0;

            /**
             * AndroidSurfaceflingerMetric missedHwcFrames.
             * @member {number} missedHwcFrames
             * @memberof perfetto.protos.AndroidSurfaceflingerMetric
             * @instance
             */
            AndroidSurfaceflingerMetric.prototype.missedHwcFrames = 0;

            /**
             * AndroidSurfaceflingerMetric missedGpuFrames.
             * @member {number} missedGpuFrames
             * @memberof perfetto.protos.AndroidSurfaceflingerMetric
             * @instance
             */
            AndroidSurfaceflingerMetric.prototype.missedGpuFrames = 0;

            /**
             * AndroidSurfaceflingerMetric missedFrameRate.
             * @member {number} missedFrameRate
             * @memberof perfetto.protos.AndroidSurfaceflingerMetric
             * @instance
             */
            AndroidSurfaceflingerMetric.prototype.missedFrameRate = 0;

            /**
             * AndroidSurfaceflingerMetric missedHwcFrameRate.
             * @member {number} missedHwcFrameRate
             * @memberof perfetto.protos.AndroidSurfaceflingerMetric
             * @instance
             */
            AndroidSurfaceflingerMetric.prototype.missedHwcFrameRate = 0;

            /**
             * AndroidSurfaceflingerMetric missedGpuFrameRate.
             * @member {number} missedGpuFrameRate
             * @memberof perfetto.protos.AndroidSurfaceflingerMetric
             * @instance
             */
            AndroidSurfaceflingerMetric.prototype.missedGpuFrameRate = 0;

            /**
             * AndroidSurfaceflingerMetric gpuInvocations.
             * @member {number} gpuInvocations
             * @memberof perfetto.protos.AndroidSurfaceflingerMetric
             * @instance
             */
            AndroidSurfaceflingerMetric.prototype.gpuInvocations = 0;

            /**
             * AndroidSurfaceflingerMetric avgGpuWaitingDurMs.
             * @member {number} avgGpuWaitingDurMs
             * @memberof perfetto.protos.AndroidSurfaceflingerMetric
             * @instance
             */
            AndroidSurfaceflingerMetric.prototype.avgGpuWaitingDurMs = 0;

            /**
             * AndroidSurfaceflingerMetric totalNonEmptyGpuWaitingDurMs.
             * @member {number} totalNonEmptyGpuWaitingDurMs
             * @memberof perfetto.protos.AndroidSurfaceflingerMetric
             * @instance
             */
            AndroidSurfaceflingerMetric.prototype.totalNonEmptyGpuWaitingDurMs = 0;

            /**
             * Creates a new AndroidSurfaceflingerMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidSurfaceflingerMetric
             * @static
             * @param {perfetto.protos.IAndroidSurfaceflingerMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidSurfaceflingerMetric} AndroidSurfaceflingerMetric instance
             */
            AndroidSurfaceflingerMetric.create = function create(properties) {
                return new AndroidSurfaceflingerMetric(properties);
            };

            /**
             * Encodes the specified AndroidSurfaceflingerMetric message. Does not implicitly {@link perfetto.protos.AndroidSurfaceflingerMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidSurfaceflingerMetric
             * @static
             * @param {perfetto.protos.IAndroidSurfaceflingerMetric} m AndroidSurfaceflingerMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidSurfaceflingerMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.missedFrames != null && Object.hasOwnProperty.call(m, "missedFrames"))
                    w.uint32(8).uint32(m.missedFrames);
                if (m.missedHwcFrames != null && Object.hasOwnProperty.call(m, "missedHwcFrames"))
                    w.uint32(16).uint32(m.missedHwcFrames);
                if (m.missedGpuFrames != null && Object.hasOwnProperty.call(m, "missedGpuFrames"))
                    w.uint32(24).uint32(m.missedGpuFrames);
                if (m.missedFrameRate != null && Object.hasOwnProperty.call(m, "missedFrameRate"))
                    w.uint32(33).double(m.missedFrameRate);
                if (m.missedHwcFrameRate != null && Object.hasOwnProperty.call(m, "missedHwcFrameRate"))
                    w.uint32(41).double(m.missedHwcFrameRate);
                if (m.missedGpuFrameRate != null && Object.hasOwnProperty.call(m, "missedGpuFrameRate"))
                    w.uint32(49).double(m.missedGpuFrameRate);
                if (m.gpuInvocations != null && Object.hasOwnProperty.call(m, "gpuInvocations"))
                    w.uint32(56).uint32(m.gpuInvocations);
                if (m.avgGpuWaitingDurMs != null && Object.hasOwnProperty.call(m, "avgGpuWaitingDurMs"))
                    w.uint32(65).double(m.avgGpuWaitingDurMs);
                if (m.totalNonEmptyGpuWaitingDurMs != null && Object.hasOwnProperty.call(m, "totalNonEmptyGpuWaitingDurMs"))
                    w.uint32(73).double(m.totalNonEmptyGpuWaitingDurMs);
                return w;
            };

            /**
             * Encodes the specified AndroidSurfaceflingerMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidSurfaceflingerMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidSurfaceflingerMetric
             * @static
             * @param {perfetto.protos.IAndroidSurfaceflingerMetric} message AndroidSurfaceflingerMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidSurfaceflingerMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidSurfaceflingerMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidSurfaceflingerMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidSurfaceflingerMetric} AndroidSurfaceflingerMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidSurfaceflingerMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidSurfaceflingerMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.missedFrames = r.uint32();
                        break;
                    case 2:
                        m.missedHwcFrames = r.uint32();
                        break;
                    case 3:
                        m.missedGpuFrames = r.uint32();
                        break;
                    case 4:
                        m.missedFrameRate = r.double();
                        break;
                    case 5:
                        m.missedHwcFrameRate = r.double();
                        break;
                    case 6:
                        m.missedGpuFrameRate = r.double();
                        break;
                    case 7:
                        m.gpuInvocations = r.uint32();
                        break;
                    case 8:
                        m.avgGpuWaitingDurMs = r.double();
                        break;
                    case 9:
                        m.totalNonEmptyGpuWaitingDurMs = r.double();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidSurfaceflingerMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidSurfaceflingerMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidSurfaceflingerMetric} AndroidSurfaceflingerMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidSurfaceflingerMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidSurfaceflingerMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidSurfaceflingerMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidSurfaceflingerMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.missedFrames != null && m.hasOwnProperty("missedFrames")) {
                    if (!$util.isInteger(m.missedFrames))
                        return "missedFrames: integer expected";
                }
                if (m.missedHwcFrames != null && m.hasOwnProperty("missedHwcFrames")) {
                    if (!$util.isInteger(m.missedHwcFrames))
                        return "missedHwcFrames: integer expected";
                }
                if (m.missedGpuFrames != null && m.hasOwnProperty("missedGpuFrames")) {
                    if (!$util.isInteger(m.missedGpuFrames))
                        return "missedGpuFrames: integer expected";
                }
                if (m.missedFrameRate != null && m.hasOwnProperty("missedFrameRate")) {
                    if (typeof m.missedFrameRate !== "number")
                        return "missedFrameRate: number expected";
                }
                if (m.missedHwcFrameRate != null && m.hasOwnProperty("missedHwcFrameRate")) {
                    if (typeof m.missedHwcFrameRate !== "number")
                        return "missedHwcFrameRate: number expected";
                }
                if (m.missedGpuFrameRate != null && m.hasOwnProperty("missedGpuFrameRate")) {
                    if (typeof m.missedGpuFrameRate !== "number")
                        return "missedGpuFrameRate: number expected";
                }
                if (m.gpuInvocations != null && m.hasOwnProperty("gpuInvocations")) {
                    if (!$util.isInteger(m.gpuInvocations))
                        return "gpuInvocations: integer expected";
                }
                if (m.avgGpuWaitingDurMs != null && m.hasOwnProperty("avgGpuWaitingDurMs")) {
                    if (typeof m.avgGpuWaitingDurMs !== "number")
                        return "avgGpuWaitingDurMs: number expected";
                }
                if (m.totalNonEmptyGpuWaitingDurMs != null && m.hasOwnProperty("totalNonEmptyGpuWaitingDurMs")) {
                    if (typeof m.totalNonEmptyGpuWaitingDurMs !== "number")
                        return "totalNonEmptyGpuWaitingDurMs: number expected";
                }
                return null;
            };

            /**
             * Creates an AndroidSurfaceflingerMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidSurfaceflingerMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidSurfaceflingerMetric} AndroidSurfaceflingerMetric
             */
            AndroidSurfaceflingerMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidSurfaceflingerMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidSurfaceflingerMetric();
                if (d.missedFrames != null) {
                    m.missedFrames = d.missedFrames >>> 0;
                }
                if (d.missedHwcFrames != null) {
                    m.missedHwcFrames = d.missedHwcFrames >>> 0;
                }
                if (d.missedGpuFrames != null) {
                    m.missedGpuFrames = d.missedGpuFrames >>> 0;
                }
                if (d.missedFrameRate != null) {
                    m.missedFrameRate = Number(d.missedFrameRate);
                }
                if (d.missedHwcFrameRate != null) {
                    m.missedHwcFrameRate = Number(d.missedHwcFrameRate);
                }
                if (d.missedGpuFrameRate != null) {
                    m.missedGpuFrameRate = Number(d.missedGpuFrameRate);
                }
                if (d.gpuInvocations != null) {
                    m.gpuInvocations = d.gpuInvocations >>> 0;
                }
                if (d.avgGpuWaitingDurMs != null) {
                    m.avgGpuWaitingDurMs = Number(d.avgGpuWaitingDurMs);
                }
                if (d.totalNonEmptyGpuWaitingDurMs != null) {
                    m.totalNonEmptyGpuWaitingDurMs = Number(d.totalNonEmptyGpuWaitingDurMs);
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidSurfaceflingerMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidSurfaceflingerMetric
             * @static
             * @param {perfetto.protos.AndroidSurfaceflingerMetric} m AndroidSurfaceflingerMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidSurfaceflingerMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.missedFrames = 0;
                    d.missedHwcFrames = 0;
                    d.missedGpuFrames = 0;
                    d.missedFrameRate = 0;
                    d.missedHwcFrameRate = 0;
                    d.missedGpuFrameRate = 0;
                    d.gpuInvocations = 0;
                    d.avgGpuWaitingDurMs = 0;
                    d.totalNonEmptyGpuWaitingDurMs = 0;
                }
                if (m.missedFrames != null && m.hasOwnProperty("missedFrames")) {
                    d.missedFrames = m.missedFrames;
                }
                if (m.missedHwcFrames != null && m.hasOwnProperty("missedHwcFrames")) {
                    d.missedHwcFrames = m.missedHwcFrames;
                }
                if (m.missedGpuFrames != null && m.hasOwnProperty("missedGpuFrames")) {
                    d.missedGpuFrames = m.missedGpuFrames;
                }
                if (m.missedFrameRate != null && m.hasOwnProperty("missedFrameRate")) {
                    d.missedFrameRate = o.json && !isFinite(m.missedFrameRate) ? String(m.missedFrameRate) : m.missedFrameRate;
                }
                if (m.missedHwcFrameRate != null && m.hasOwnProperty("missedHwcFrameRate")) {
                    d.missedHwcFrameRate = o.json && !isFinite(m.missedHwcFrameRate) ? String(m.missedHwcFrameRate) : m.missedHwcFrameRate;
                }
                if (m.missedGpuFrameRate != null && m.hasOwnProperty("missedGpuFrameRate")) {
                    d.missedGpuFrameRate = o.json && !isFinite(m.missedGpuFrameRate) ? String(m.missedGpuFrameRate) : m.missedGpuFrameRate;
                }
                if (m.gpuInvocations != null && m.hasOwnProperty("gpuInvocations")) {
                    d.gpuInvocations = m.gpuInvocations;
                }
                if (m.avgGpuWaitingDurMs != null && m.hasOwnProperty("avgGpuWaitingDurMs")) {
                    d.avgGpuWaitingDurMs = o.json && !isFinite(m.avgGpuWaitingDurMs) ? String(m.avgGpuWaitingDurMs) : m.avgGpuWaitingDurMs;
                }
                if (m.totalNonEmptyGpuWaitingDurMs != null && m.hasOwnProperty("totalNonEmptyGpuWaitingDurMs")) {
                    d.totalNonEmptyGpuWaitingDurMs = o.json && !isFinite(m.totalNonEmptyGpuWaitingDurMs) ? String(m.totalNonEmptyGpuWaitingDurMs) : m.totalNonEmptyGpuWaitingDurMs;
                }
                return d;
            };

            /**
             * Converts this AndroidSurfaceflingerMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidSurfaceflingerMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidSurfaceflingerMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AndroidSurfaceflingerMetric;
        })();

        protos.AndroidSysUiCujMetrics = (function() {

            /**
             * Properties of an AndroidSysUiCujMetrics.
             * @memberof perfetto.protos
             * @interface IAndroidSysUiCujMetrics
             * @property {Array.<perfetto.protos.AndroidSysUiCujMetrics.IFrame>|null} [frames] AndroidSysUiCujMetrics frames
             * @property {string|null} [cujName] AndroidSysUiCujMetrics cujName
             * @property {number|null} [cujStart] AndroidSysUiCujMetrics cujStart
             * @property {number|null} [cujDur] AndroidSysUiCujMetrics cujDur
             * @property {perfetto.protos.IAndroidProcessMetadata|null} [process] AndroidSysUiCujMetrics process
             */

            /**
             * Constructs a new AndroidSysUiCujMetrics.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidSysUiCujMetrics.
             * @implements IAndroidSysUiCujMetrics
             * @constructor
             * @param {perfetto.protos.IAndroidSysUiCujMetrics=} [p] Properties to set
             */
            function AndroidSysUiCujMetrics(p) {
                this.frames = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidSysUiCujMetrics frames.
             * @member {Array.<perfetto.protos.AndroidSysUiCujMetrics.IFrame>} frames
             * @memberof perfetto.protos.AndroidSysUiCujMetrics
             * @instance
             */
            AndroidSysUiCujMetrics.prototype.frames = $util.emptyArray;

            /**
             * AndroidSysUiCujMetrics cujName.
             * @member {string} cujName
             * @memberof perfetto.protos.AndroidSysUiCujMetrics
             * @instance
             */
            AndroidSysUiCujMetrics.prototype.cujName = "";

            /**
             * AndroidSysUiCujMetrics cujStart.
             * @member {number} cujStart
             * @memberof perfetto.protos.AndroidSysUiCujMetrics
             * @instance
             */
            AndroidSysUiCujMetrics.prototype.cujStart = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * AndroidSysUiCujMetrics cujDur.
             * @member {number} cujDur
             * @memberof perfetto.protos.AndroidSysUiCujMetrics
             * @instance
             */
            AndroidSysUiCujMetrics.prototype.cujDur = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * AndroidSysUiCujMetrics process.
             * @member {perfetto.protos.IAndroidProcessMetadata|null|undefined} process
             * @memberof perfetto.protos.AndroidSysUiCujMetrics
             * @instance
             */
            AndroidSysUiCujMetrics.prototype.process = null;

            /**
             * Creates a new AndroidSysUiCujMetrics instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidSysUiCujMetrics
             * @static
             * @param {perfetto.protos.IAndroidSysUiCujMetrics=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidSysUiCujMetrics} AndroidSysUiCujMetrics instance
             */
            AndroidSysUiCujMetrics.create = function create(properties) {
                return new AndroidSysUiCujMetrics(properties);
            };

            /**
             * Encodes the specified AndroidSysUiCujMetrics message. Does not implicitly {@link perfetto.protos.AndroidSysUiCujMetrics.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidSysUiCujMetrics
             * @static
             * @param {perfetto.protos.IAndroidSysUiCujMetrics} m AndroidSysUiCujMetrics message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidSysUiCujMetrics.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.frames != null && m.frames.length) {
                    for (var i = 0; i < m.frames.length; ++i)
                        $root.perfetto.protos.AndroidSysUiCujMetrics.Frame.encode(m.frames[i], w.uint32(10).fork()).ldelim();
                }
                if (m.cujName != null && Object.hasOwnProperty.call(m, "cujName"))
                    w.uint32(18).string(m.cujName);
                if (m.cujStart != null && Object.hasOwnProperty.call(m, "cujStart"))
                    w.uint32(24).int64(m.cujStart);
                if (m.cujDur != null && Object.hasOwnProperty.call(m, "cujDur"))
                    w.uint32(32).int64(m.cujDur);
                if (m.process != null && Object.hasOwnProperty.call(m, "process"))
                    $root.perfetto.protos.AndroidProcessMetadata.encode(m.process, w.uint32(42).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified AndroidSysUiCujMetrics message, length delimited. Does not implicitly {@link perfetto.protos.AndroidSysUiCujMetrics.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidSysUiCujMetrics
             * @static
             * @param {perfetto.protos.IAndroidSysUiCujMetrics} message AndroidSysUiCujMetrics message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidSysUiCujMetrics.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidSysUiCujMetrics message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidSysUiCujMetrics
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidSysUiCujMetrics} AndroidSysUiCujMetrics
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidSysUiCujMetrics.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidSysUiCujMetrics();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.frames && m.frames.length))
                            m.frames = [];
                        m.frames.push($root.perfetto.protos.AndroidSysUiCujMetrics.Frame.decode(r, r.uint32()));
                        break;
                    case 2:
                        m.cujName = r.string();
                        break;
                    case 3:
                        m.cujStart = r.int64();
                        break;
                    case 4:
                        m.cujDur = r.int64();
                        break;
                    case 5:
                        m.process = $root.perfetto.protos.AndroidProcessMetadata.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidSysUiCujMetrics message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidSysUiCujMetrics
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidSysUiCujMetrics} AndroidSysUiCujMetrics
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidSysUiCujMetrics.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidSysUiCujMetrics message.
             * @function verify
             * @memberof perfetto.protos.AndroidSysUiCujMetrics
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidSysUiCujMetrics.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.frames != null && m.hasOwnProperty("frames")) {
                    if (!Array.isArray(m.frames))
                        return "frames: array expected";
                    for (var i = 0; i < m.frames.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidSysUiCujMetrics.Frame.verify(m.frames[i]);
                            if (e)
                                return "frames." + e;
                        }
                    }
                }
                if (m.cujName != null && m.hasOwnProperty("cujName")) {
                    if (!$util.isString(m.cujName))
                        return "cujName: string expected";
                }
                if (m.cujStart != null && m.hasOwnProperty("cujStart")) {
                    if (!$util.isInteger(m.cujStart) && !(m.cujStart && $util.isInteger(m.cujStart.low) && $util.isInteger(m.cujStart.high)))
                        return "cujStart: integer|Long expected";
                }
                if (m.cujDur != null && m.hasOwnProperty("cujDur")) {
                    if (!$util.isInteger(m.cujDur) && !(m.cujDur && $util.isInteger(m.cujDur.low) && $util.isInteger(m.cujDur.high)))
                        return "cujDur: integer|Long expected";
                }
                if (m.process != null && m.hasOwnProperty("process")) {
                    {
                        var e = $root.perfetto.protos.AndroidProcessMetadata.verify(m.process);
                        if (e)
                            return "process." + e;
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidSysUiCujMetrics message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidSysUiCujMetrics
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidSysUiCujMetrics} AndroidSysUiCujMetrics
             */
            AndroidSysUiCujMetrics.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidSysUiCujMetrics)
                    return d;
                var m = new $root.perfetto.protos.AndroidSysUiCujMetrics();
                if (d.frames) {
                    if (!Array.isArray(d.frames))
                        throw TypeError(".perfetto.protos.AndroidSysUiCujMetrics.frames: array expected");
                    m.frames = [];
                    for (var i = 0; i < d.frames.length; ++i) {
                        if (typeof d.frames[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidSysUiCujMetrics.frames: object expected");
                        m.frames[i] = $root.perfetto.protos.AndroidSysUiCujMetrics.Frame.fromObject(d.frames[i]);
                    }
                }
                if (d.cujName != null) {
                    m.cujName = String(d.cujName);
                }
                if (d.cujStart != null) {
                    if ($util.Long)
                        (m.cujStart = $util.Long.fromValue(d.cujStart)).unsigned = false;
                    else if (typeof d.cujStart === "string")
                        m.cujStart = parseInt(d.cujStart, 10);
                    else if (typeof d.cujStart === "number")
                        m.cujStart = d.cujStart;
                    else if (typeof d.cujStart === "object")
                        m.cujStart = new $util.LongBits(d.cujStart.low >>> 0, d.cujStart.high >>> 0).toNumber();
                }
                if (d.cujDur != null) {
                    if ($util.Long)
                        (m.cujDur = $util.Long.fromValue(d.cujDur)).unsigned = false;
                    else if (typeof d.cujDur === "string")
                        m.cujDur = parseInt(d.cujDur, 10);
                    else if (typeof d.cujDur === "number")
                        m.cujDur = d.cujDur;
                    else if (typeof d.cujDur === "object")
                        m.cujDur = new $util.LongBits(d.cujDur.low >>> 0, d.cujDur.high >>> 0).toNumber();
                }
                if (d.process != null) {
                    if (typeof d.process !== "object")
                        throw TypeError(".perfetto.protos.AndroidSysUiCujMetrics.process: object expected");
                    m.process = $root.perfetto.protos.AndroidProcessMetadata.fromObject(d.process);
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidSysUiCujMetrics message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidSysUiCujMetrics
             * @static
             * @param {perfetto.protos.AndroidSysUiCujMetrics} m AndroidSysUiCujMetrics
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidSysUiCujMetrics.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.frames = [];
                }
                if (o.defaults) {
                    d.cujName = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.cujStart = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.cujStart = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.cujDur = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.cujDur = o.longs === String ? "0" : 0;
                    d.process = null;
                }
                if (m.frames && m.frames.length) {
                    d.frames = [];
                    for (var j = 0; j < m.frames.length; ++j) {
                        d.frames[j] = $root.perfetto.protos.AndroidSysUiCujMetrics.Frame.toObject(m.frames[j], o);
                    }
                }
                if (m.cujName != null && m.hasOwnProperty("cujName")) {
                    d.cujName = m.cujName;
                }
                if (m.cujStart != null && m.hasOwnProperty("cujStart")) {
                    if (typeof m.cujStart === "number")
                        d.cujStart = o.longs === String ? String(m.cujStart) : m.cujStart;
                    else
                        d.cujStart = o.longs === String ? $util.Long.prototype.toString.call(m.cujStart) : o.longs === Number ? new $util.LongBits(m.cujStart.low >>> 0, m.cujStart.high >>> 0).toNumber() : m.cujStart;
                }
                if (m.cujDur != null && m.hasOwnProperty("cujDur")) {
                    if (typeof m.cujDur === "number")
                        d.cujDur = o.longs === String ? String(m.cujDur) : m.cujDur;
                    else
                        d.cujDur = o.longs === String ? $util.Long.prototype.toString.call(m.cujDur) : o.longs === Number ? new $util.LongBits(m.cujDur.low >>> 0, m.cujDur.high >>> 0).toNumber() : m.cujDur;
                }
                if (m.process != null && m.hasOwnProperty("process")) {
                    d.process = $root.perfetto.protos.AndroidProcessMetadata.toObject(m.process, o);
                }
                return d;
            };

            /**
             * Converts this AndroidSysUiCujMetrics to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidSysUiCujMetrics
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidSysUiCujMetrics.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidSysUiCujMetrics.Frame = (function() {

                /**
                 * Properties of a Frame.
                 * @memberof perfetto.protos.AndroidSysUiCujMetrics
                 * @interface IFrame
                 * @property {number|null} [number] Frame number
                 * @property {number|null} [vsync] Frame vsync
                 * @property {number|null} [ts] Frame ts
                 * @property {number|null} [dur] Frame dur
                 * @property {Array.<string>|null} [jankCause] Frame jankCause
                 */

                /**
                 * Constructs a new Frame.
                 * @memberof perfetto.protos.AndroidSysUiCujMetrics
                 * @classdesc Represents a Frame.
                 * @implements IFrame
                 * @constructor
                 * @param {perfetto.protos.AndroidSysUiCujMetrics.IFrame=} [p] Properties to set
                 */
                function Frame(p) {
                    this.jankCause = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Frame number.
                 * @member {number} number
                 * @memberof perfetto.protos.AndroidSysUiCujMetrics.Frame
                 * @instance
                 */
                Frame.prototype.number = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Frame vsync.
                 * @member {number} vsync
                 * @memberof perfetto.protos.AndroidSysUiCujMetrics.Frame
                 * @instance
                 */
                Frame.prototype.vsync = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Frame ts.
                 * @member {number} ts
                 * @memberof perfetto.protos.AndroidSysUiCujMetrics.Frame
                 * @instance
                 */
                Frame.prototype.ts = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Frame dur.
                 * @member {number} dur
                 * @memberof perfetto.protos.AndroidSysUiCujMetrics.Frame
                 * @instance
                 */
                Frame.prototype.dur = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Frame jankCause.
                 * @member {Array.<string>} jankCause
                 * @memberof perfetto.protos.AndroidSysUiCujMetrics.Frame
                 * @instance
                 */
                Frame.prototype.jankCause = $util.emptyArray;

                /**
                 * Creates a new Frame instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidSysUiCujMetrics.Frame
                 * @static
                 * @param {perfetto.protos.AndroidSysUiCujMetrics.IFrame=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidSysUiCujMetrics.Frame} Frame instance
                 */
                Frame.create = function create(properties) {
                    return new Frame(properties);
                };

                /**
                 * Encodes the specified Frame message. Does not implicitly {@link perfetto.protos.AndroidSysUiCujMetrics.Frame.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidSysUiCujMetrics.Frame
                 * @static
                 * @param {perfetto.protos.AndroidSysUiCujMetrics.IFrame} m Frame message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Frame.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.number != null && Object.hasOwnProperty.call(m, "number"))
                        w.uint32(8).int64(m.number);
                    if (m.ts != null && Object.hasOwnProperty.call(m, "ts"))
                        w.uint32(16).int64(m.ts);
                    if (m.dur != null && Object.hasOwnProperty.call(m, "dur"))
                        w.uint32(24).int64(m.dur);
                    if (m.jankCause != null && m.jankCause.length) {
                        for (var i = 0; i < m.jankCause.length; ++i)
                            w.uint32(34).string(m.jankCause[i]);
                    }
                    if (m.vsync != null && Object.hasOwnProperty.call(m, "vsync"))
                        w.uint32(40).int64(m.vsync);
                    return w;
                };

                /**
                 * Encodes the specified Frame message, length delimited. Does not implicitly {@link perfetto.protos.AndroidSysUiCujMetrics.Frame.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidSysUiCujMetrics.Frame
                 * @static
                 * @param {perfetto.protos.AndroidSysUiCujMetrics.IFrame} message Frame message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Frame.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Frame message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidSysUiCujMetrics.Frame
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidSysUiCujMetrics.Frame} Frame
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Frame.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidSysUiCujMetrics.Frame();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.number = r.int64();
                            break;
                        case 5:
                            m.vsync = r.int64();
                            break;
                        case 2:
                            m.ts = r.int64();
                            break;
                        case 3:
                            m.dur = r.int64();
                            break;
                        case 4:
                            if (!(m.jankCause && m.jankCause.length))
                                m.jankCause = [];
                            m.jankCause.push(r.string());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Frame message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidSysUiCujMetrics.Frame
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidSysUiCujMetrics.Frame} Frame
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Frame.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Frame message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidSysUiCujMetrics.Frame
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Frame.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.number != null && m.hasOwnProperty("number")) {
                        if (!$util.isInteger(m.number) && !(m.number && $util.isInteger(m.number.low) && $util.isInteger(m.number.high)))
                            return "number: integer|Long expected";
                    }
                    if (m.vsync != null && m.hasOwnProperty("vsync")) {
                        if (!$util.isInteger(m.vsync) && !(m.vsync && $util.isInteger(m.vsync.low) && $util.isInteger(m.vsync.high)))
                            return "vsync: integer|Long expected";
                    }
                    if (m.ts != null && m.hasOwnProperty("ts")) {
                        if (!$util.isInteger(m.ts) && !(m.ts && $util.isInteger(m.ts.low) && $util.isInteger(m.ts.high)))
                            return "ts: integer|Long expected";
                    }
                    if (m.dur != null && m.hasOwnProperty("dur")) {
                        if (!$util.isInteger(m.dur) && !(m.dur && $util.isInteger(m.dur.low) && $util.isInteger(m.dur.high)))
                            return "dur: integer|Long expected";
                    }
                    if (m.jankCause != null && m.hasOwnProperty("jankCause")) {
                        if (!Array.isArray(m.jankCause))
                            return "jankCause: array expected";
                        for (var i = 0; i < m.jankCause.length; ++i) {
                            if (!$util.isString(m.jankCause[i]))
                                return "jankCause: string[] expected";
                        }
                    }
                    return null;
                };

                /**
                 * Creates a Frame message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidSysUiCujMetrics.Frame
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidSysUiCujMetrics.Frame} Frame
                 */
                Frame.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidSysUiCujMetrics.Frame)
                        return d;
                    var m = new $root.perfetto.protos.AndroidSysUiCujMetrics.Frame();
                    if (d.number != null) {
                        if ($util.Long)
                            (m.number = $util.Long.fromValue(d.number)).unsigned = false;
                        else if (typeof d.number === "string")
                            m.number = parseInt(d.number, 10);
                        else if (typeof d.number === "number")
                            m.number = d.number;
                        else if (typeof d.number === "object")
                            m.number = new $util.LongBits(d.number.low >>> 0, d.number.high >>> 0).toNumber();
                    }
                    if (d.vsync != null) {
                        if ($util.Long)
                            (m.vsync = $util.Long.fromValue(d.vsync)).unsigned = false;
                        else if (typeof d.vsync === "string")
                            m.vsync = parseInt(d.vsync, 10);
                        else if (typeof d.vsync === "number")
                            m.vsync = d.vsync;
                        else if (typeof d.vsync === "object")
                            m.vsync = new $util.LongBits(d.vsync.low >>> 0, d.vsync.high >>> 0).toNumber();
                    }
                    if (d.ts != null) {
                        if ($util.Long)
                            (m.ts = $util.Long.fromValue(d.ts)).unsigned = false;
                        else if (typeof d.ts === "string")
                            m.ts = parseInt(d.ts, 10);
                        else if (typeof d.ts === "number")
                            m.ts = d.ts;
                        else if (typeof d.ts === "object")
                            m.ts = new $util.LongBits(d.ts.low >>> 0, d.ts.high >>> 0).toNumber();
                    }
                    if (d.dur != null) {
                        if ($util.Long)
                            (m.dur = $util.Long.fromValue(d.dur)).unsigned = false;
                        else if (typeof d.dur === "string")
                            m.dur = parseInt(d.dur, 10);
                        else if (typeof d.dur === "number")
                            m.dur = d.dur;
                        else if (typeof d.dur === "object")
                            m.dur = new $util.LongBits(d.dur.low >>> 0, d.dur.high >>> 0).toNumber();
                    }
                    if (d.jankCause) {
                        if (!Array.isArray(d.jankCause))
                            throw TypeError(".perfetto.protos.AndroidSysUiCujMetrics.Frame.jankCause: array expected");
                        m.jankCause = [];
                        for (var i = 0; i < d.jankCause.length; ++i) {
                            m.jankCause[i] = String(d.jankCause[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Frame message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidSysUiCujMetrics.Frame
                 * @static
                 * @param {perfetto.protos.AndroidSysUiCujMetrics.Frame} m Frame
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Frame.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.jankCause = [];
                    }
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.number = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.number = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.ts = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.ts = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.dur = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.dur = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.vsync = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.vsync = o.longs === String ? "0" : 0;
                    }
                    if (m.number != null && m.hasOwnProperty("number")) {
                        if (typeof m.number === "number")
                            d.number = o.longs === String ? String(m.number) : m.number;
                        else
                            d.number = o.longs === String ? $util.Long.prototype.toString.call(m.number) : o.longs === Number ? new $util.LongBits(m.number.low >>> 0, m.number.high >>> 0).toNumber() : m.number;
                    }
                    if (m.ts != null && m.hasOwnProperty("ts")) {
                        if (typeof m.ts === "number")
                            d.ts = o.longs === String ? String(m.ts) : m.ts;
                        else
                            d.ts = o.longs === String ? $util.Long.prototype.toString.call(m.ts) : o.longs === Number ? new $util.LongBits(m.ts.low >>> 0, m.ts.high >>> 0).toNumber() : m.ts;
                    }
                    if (m.dur != null && m.hasOwnProperty("dur")) {
                        if (typeof m.dur === "number")
                            d.dur = o.longs === String ? String(m.dur) : m.dur;
                        else
                            d.dur = o.longs === String ? $util.Long.prototype.toString.call(m.dur) : o.longs === Number ? new $util.LongBits(m.dur.low >>> 0, m.dur.high >>> 0).toNumber() : m.dur;
                    }
                    if (m.jankCause && m.jankCause.length) {
                        d.jankCause = [];
                        for (var j = 0; j < m.jankCause.length; ++j) {
                            d.jankCause[j] = m.jankCause[j];
                        }
                    }
                    if (m.vsync != null && m.hasOwnProperty("vsync")) {
                        if (typeof m.vsync === "number")
                            d.vsync = o.longs === String ? String(m.vsync) : m.vsync;
                        else
                            d.vsync = o.longs === String ? $util.Long.prototype.toString.call(m.vsync) : o.longs === Number ? new $util.LongBits(m.vsync.low >>> 0, m.vsync.high >>> 0).toNumber() : m.vsync;
                    }
                    return d;
                };

                /**
                 * Converts this Frame to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidSysUiCujMetrics.Frame
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Frame.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Frame;
            })();

            return AndroidSysUiCujMetrics;
        })();

        protos.AndroidTaskNames = (function() {

            /**
             * Properties of an AndroidTaskNames.
             * @memberof perfetto.protos
             * @interface IAndroidTaskNames
             * @property {Array.<perfetto.protos.AndroidTaskNames.IProcess>|null} [process] AndroidTaskNames process
             */

            /**
             * Constructs a new AndroidTaskNames.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidTaskNames.
             * @implements IAndroidTaskNames
             * @constructor
             * @param {perfetto.protos.IAndroidTaskNames=} [p] Properties to set
             */
            function AndroidTaskNames(p) {
                this.process = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidTaskNames process.
             * @member {Array.<perfetto.protos.AndroidTaskNames.IProcess>} process
             * @memberof perfetto.protos.AndroidTaskNames
             * @instance
             */
            AndroidTaskNames.prototype.process = $util.emptyArray;

            /**
             * Creates a new AndroidTaskNames instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidTaskNames
             * @static
             * @param {perfetto.protos.IAndroidTaskNames=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidTaskNames} AndroidTaskNames instance
             */
            AndroidTaskNames.create = function create(properties) {
                return new AndroidTaskNames(properties);
            };

            /**
             * Encodes the specified AndroidTaskNames message. Does not implicitly {@link perfetto.protos.AndroidTaskNames.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidTaskNames
             * @static
             * @param {perfetto.protos.IAndroidTaskNames} m AndroidTaskNames message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidTaskNames.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.process != null && m.process.length) {
                    for (var i = 0; i < m.process.length; ++i)
                        $root.perfetto.protos.AndroidTaskNames.Process.encode(m.process[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified AndroidTaskNames message, length delimited. Does not implicitly {@link perfetto.protos.AndroidTaskNames.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidTaskNames
             * @static
             * @param {perfetto.protos.IAndroidTaskNames} message AndroidTaskNames message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidTaskNames.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidTaskNames message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidTaskNames
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidTaskNames} AndroidTaskNames
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidTaskNames.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidTaskNames();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.process && m.process.length))
                            m.process = [];
                        m.process.push($root.perfetto.protos.AndroidTaskNames.Process.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidTaskNames message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidTaskNames
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidTaskNames} AndroidTaskNames
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidTaskNames.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidTaskNames message.
             * @function verify
             * @memberof perfetto.protos.AndroidTaskNames
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidTaskNames.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.process != null && m.hasOwnProperty("process")) {
                    if (!Array.isArray(m.process))
                        return "process: array expected";
                    for (var i = 0; i < m.process.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidTaskNames.Process.verify(m.process[i]);
                            if (e)
                                return "process." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidTaskNames message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidTaskNames
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidTaskNames} AndroidTaskNames
             */
            AndroidTaskNames.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidTaskNames)
                    return d;
                var m = new $root.perfetto.protos.AndroidTaskNames();
                if (d.process) {
                    if (!Array.isArray(d.process))
                        throw TypeError(".perfetto.protos.AndroidTaskNames.process: array expected");
                    m.process = [];
                    for (var i = 0; i < d.process.length; ++i) {
                        if (typeof d.process[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidTaskNames.process: object expected");
                        m.process[i] = $root.perfetto.protos.AndroidTaskNames.Process.fromObject(d.process[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidTaskNames message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidTaskNames
             * @static
             * @param {perfetto.protos.AndroidTaskNames} m AndroidTaskNames
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidTaskNames.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.process = [];
                }
                if (m.process && m.process.length) {
                    d.process = [];
                    for (var j = 0; j < m.process.length; ++j) {
                        d.process[j] = $root.perfetto.protos.AndroidTaskNames.Process.toObject(m.process[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidTaskNames to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidTaskNames
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidTaskNames.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidTaskNames.Process = (function() {

                /**
                 * Properties of a Process.
                 * @memberof perfetto.protos.AndroidTaskNames
                 * @interface IProcess
                 * @property {number|null} [pid] Process pid
                 * @property {string|null} [processName] Process processName
                 * @property {Array.<string>|null} [threadName] Process threadName
                 * @property {number|null} [uid] Process uid
                 * @property {Array.<string>|null} [uidPackageName] Process uidPackageName
                 */

                /**
                 * Constructs a new Process.
                 * @memberof perfetto.protos.AndroidTaskNames
                 * @classdesc Represents a Process.
                 * @implements IProcess
                 * @constructor
                 * @param {perfetto.protos.AndroidTaskNames.IProcess=} [p] Properties to set
                 */
                function Process(p) {
                    this.threadName = [];
                    this.uidPackageName = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Process pid.
                 * @member {number} pid
                 * @memberof perfetto.protos.AndroidTaskNames.Process
                 * @instance
                 */
                Process.prototype.pid = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Process processName.
                 * @member {string} processName
                 * @memberof perfetto.protos.AndroidTaskNames.Process
                 * @instance
                 */
                Process.prototype.processName = "";

                /**
                 * Process threadName.
                 * @member {Array.<string>} threadName
                 * @memberof perfetto.protos.AndroidTaskNames.Process
                 * @instance
                 */
                Process.prototype.threadName = $util.emptyArray;

                /**
                 * Process uid.
                 * @member {number} uid
                 * @memberof perfetto.protos.AndroidTaskNames.Process
                 * @instance
                 */
                Process.prototype.uid = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Process uidPackageName.
                 * @member {Array.<string>} uidPackageName
                 * @memberof perfetto.protos.AndroidTaskNames.Process
                 * @instance
                 */
                Process.prototype.uidPackageName = $util.emptyArray;

                /**
                 * Creates a new Process instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidTaskNames.Process
                 * @static
                 * @param {perfetto.protos.AndroidTaskNames.IProcess=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidTaskNames.Process} Process instance
                 */
                Process.create = function create(properties) {
                    return new Process(properties);
                };

                /**
                 * Encodes the specified Process message. Does not implicitly {@link perfetto.protos.AndroidTaskNames.Process.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidTaskNames.Process
                 * @static
                 * @param {perfetto.protos.AndroidTaskNames.IProcess} m Process message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Process.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                        w.uint32(8).int64(m.pid);
                    if (m.processName != null && Object.hasOwnProperty.call(m, "processName"))
                        w.uint32(18).string(m.processName);
                    if (m.threadName != null && m.threadName.length) {
                        for (var i = 0; i < m.threadName.length; ++i)
                            w.uint32(26).string(m.threadName[i]);
                    }
                    if (m.uid != null && Object.hasOwnProperty.call(m, "uid"))
                        w.uint32(32).int64(m.uid);
                    if (m.uidPackageName != null && m.uidPackageName.length) {
                        for (var i = 0; i < m.uidPackageName.length; ++i)
                            w.uint32(42).string(m.uidPackageName[i]);
                    }
                    return w;
                };

                /**
                 * Encodes the specified Process message, length delimited. Does not implicitly {@link perfetto.protos.AndroidTaskNames.Process.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidTaskNames.Process
                 * @static
                 * @param {perfetto.protos.AndroidTaskNames.IProcess} message Process message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Process.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Process message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidTaskNames.Process
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidTaskNames.Process} Process
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Process.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidTaskNames.Process();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.pid = r.int64();
                            break;
                        case 2:
                            m.processName = r.string();
                            break;
                        case 3:
                            if (!(m.threadName && m.threadName.length))
                                m.threadName = [];
                            m.threadName.push(r.string());
                            break;
                        case 4:
                            m.uid = r.int64();
                            break;
                        case 5:
                            if (!(m.uidPackageName && m.uidPackageName.length))
                                m.uidPackageName = [];
                            m.uidPackageName.push(r.string());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Process message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidTaskNames.Process
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidTaskNames.Process} Process
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Process.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Process message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidTaskNames.Process
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Process.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        if (!$util.isInteger(m.pid) && !(m.pid && $util.isInteger(m.pid.low) && $util.isInteger(m.pid.high)))
                            return "pid: integer|Long expected";
                    }
                    if (m.processName != null && m.hasOwnProperty("processName")) {
                        if (!$util.isString(m.processName))
                            return "processName: string expected";
                    }
                    if (m.threadName != null && m.hasOwnProperty("threadName")) {
                        if (!Array.isArray(m.threadName))
                            return "threadName: array expected";
                        for (var i = 0; i < m.threadName.length; ++i) {
                            if (!$util.isString(m.threadName[i]))
                                return "threadName: string[] expected";
                        }
                    }
                    if (m.uid != null && m.hasOwnProperty("uid")) {
                        if (!$util.isInteger(m.uid) && !(m.uid && $util.isInteger(m.uid.low) && $util.isInteger(m.uid.high)))
                            return "uid: integer|Long expected";
                    }
                    if (m.uidPackageName != null && m.hasOwnProperty("uidPackageName")) {
                        if (!Array.isArray(m.uidPackageName))
                            return "uidPackageName: array expected";
                        for (var i = 0; i < m.uidPackageName.length; ++i) {
                            if (!$util.isString(m.uidPackageName[i]))
                                return "uidPackageName: string[] expected";
                        }
                    }
                    return null;
                };

                /**
                 * Creates a Process message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidTaskNames.Process
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidTaskNames.Process} Process
                 */
                Process.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidTaskNames.Process)
                        return d;
                    var m = new $root.perfetto.protos.AndroidTaskNames.Process();
                    if (d.pid != null) {
                        if ($util.Long)
                            (m.pid = $util.Long.fromValue(d.pid)).unsigned = false;
                        else if (typeof d.pid === "string")
                            m.pid = parseInt(d.pid, 10);
                        else if (typeof d.pid === "number")
                            m.pid = d.pid;
                        else if (typeof d.pid === "object")
                            m.pid = new $util.LongBits(d.pid.low >>> 0, d.pid.high >>> 0).toNumber();
                    }
                    if (d.processName != null) {
                        m.processName = String(d.processName);
                    }
                    if (d.threadName) {
                        if (!Array.isArray(d.threadName))
                            throw TypeError(".perfetto.protos.AndroidTaskNames.Process.threadName: array expected");
                        m.threadName = [];
                        for (var i = 0; i < d.threadName.length; ++i) {
                            m.threadName[i] = String(d.threadName[i]);
                        }
                    }
                    if (d.uid != null) {
                        if ($util.Long)
                            (m.uid = $util.Long.fromValue(d.uid)).unsigned = false;
                        else if (typeof d.uid === "string")
                            m.uid = parseInt(d.uid, 10);
                        else if (typeof d.uid === "number")
                            m.uid = d.uid;
                        else if (typeof d.uid === "object")
                            m.uid = new $util.LongBits(d.uid.low >>> 0, d.uid.high >>> 0).toNumber();
                    }
                    if (d.uidPackageName) {
                        if (!Array.isArray(d.uidPackageName))
                            throw TypeError(".perfetto.protos.AndroidTaskNames.Process.uidPackageName: array expected");
                        m.uidPackageName = [];
                        for (var i = 0; i < d.uidPackageName.length; ++i) {
                            m.uidPackageName[i] = String(d.uidPackageName[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Process message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidTaskNames.Process
                 * @static
                 * @param {perfetto.protos.AndroidTaskNames.Process} m Process
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Process.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.threadName = [];
                        d.uidPackageName = [];
                    }
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.pid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.pid = o.longs === String ? "0" : 0;
                        d.processName = "";
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.uid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.uid = o.longs === String ? "0" : 0;
                    }
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        if (typeof m.pid === "number")
                            d.pid = o.longs === String ? String(m.pid) : m.pid;
                        else
                            d.pid = o.longs === String ? $util.Long.prototype.toString.call(m.pid) : o.longs === Number ? new $util.LongBits(m.pid.low >>> 0, m.pid.high >>> 0).toNumber() : m.pid;
                    }
                    if (m.processName != null && m.hasOwnProperty("processName")) {
                        d.processName = m.processName;
                    }
                    if (m.threadName && m.threadName.length) {
                        d.threadName = [];
                        for (var j = 0; j < m.threadName.length; ++j) {
                            d.threadName[j] = m.threadName[j];
                        }
                    }
                    if (m.uid != null && m.hasOwnProperty("uid")) {
                        if (typeof m.uid === "number")
                            d.uid = o.longs === String ? String(m.uid) : m.uid;
                        else
                            d.uid = o.longs === String ? $util.Long.prototype.toString.call(m.uid) : o.longs === Number ? new $util.LongBits(m.uid.low >>> 0, m.uid.high >>> 0).toNumber() : m.uid;
                    }
                    if (m.uidPackageName && m.uidPackageName.length) {
                        d.uidPackageName = [];
                        for (var j = 0; j < m.uidPackageName.length; ++j) {
                            d.uidPackageName[j] = m.uidPackageName[j];
                        }
                    }
                    return d;
                };

                /**
                 * Converts this Process to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidTaskNames.Process
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Process.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Process;
            })();

            return AndroidTaskNames;
        })();

        protos.AndroidTraceQualityMetric = (function() {

            /**
             * Properties of an AndroidTraceQualityMetric.
             * @memberof perfetto.protos
             * @interface IAndroidTraceQualityMetric
             * @property {Array.<perfetto.protos.AndroidTraceQualityMetric.IFailure>|null} [failures] AndroidTraceQualityMetric failures
             */

            /**
             * Constructs a new AndroidTraceQualityMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidTraceQualityMetric.
             * @implements IAndroidTraceQualityMetric
             * @constructor
             * @param {perfetto.protos.IAndroidTraceQualityMetric=} [p] Properties to set
             */
            function AndroidTraceQualityMetric(p) {
                this.failures = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidTraceQualityMetric failures.
             * @member {Array.<perfetto.protos.AndroidTraceQualityMetric.IFailure>} failures
             * @memberof perfetto.protos.AndroidTraceQualityMetric
             * @instance
             */
            AndroidTraceQualityMetric.prototype.failures = $util.emptyArray;

            /**
             * Creates a new AndroidTraceQualityMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidTraceQualityMetric
             * @static
             * @param {perfetto.protos.IAndroidTraceQualityMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidTraceQualityMetric} AndroidTraceQualityMetric instance
             */
            AndroidTraceQualityMetric.create = function create(properties) {
                return new AndroidTraceQualityMetric(properties);
            };

            /**
             * Encodes the specified AndroidTraceQualityMetric message. Does not implicitly {@link perfetto.protos.AndroidTraceQualityMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidTraceQualityMetric
             * @static
             * @param {perfetto.protos.IAndroidTraceQualityMetric} m AndroidTraceQualityMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidTraceQualityMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.failures != null && m.failures.length) {
                    for (var i = 0; i < m.failures.length; ++i)
                        $root.perfetto.protos.AndroidTraceQualityMetric.Failure.encode(m.failures[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified AndroidTraceQualityMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidTraceQualityMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidTraceQualityMetric
             * @static
             * @param {perfetto.protos.IAndroidTraceQualityMetric} message AndroidTraceQualityMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidTraceQualityMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidTraceQualityMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidTraceQualityMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidTraceQualityMetric} AndroidTraceQualityMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidTraceQualityMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidTraceQualityMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.failures && m.failures.length))
                            m.failures = [];
                        m.failures.push($root.perfetto.protos.AndroidTraceQualityMetric.Failure.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidTraceQualityMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidTraceQualityMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidTraceQualityMetric} AndroidTraceQualityMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidTraceQualityMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidTraceQualityMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidTraceQualityMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidTraceQualityMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.failures != null && m.hasOwnProperty("failures")) {
                    if (!Array.isArray(m.failures))
                        return "failures: array expected";
                    for (var i = 0; i < m.failures.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidTraceQualityMetric.Failure.verify(m.failures[i]);
                            if (e)
                                return "failures." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidTraceQualityMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidTraceQualityMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidTraceQualityMetric} AndroidTraceQualityMetric
             */
            AndroidTraceQualityMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidTraceQualityMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidTraceQualityMetric();
                if (d.failures) {
                    if (!Array.isArray(d.failures))
                        throw TypeError(".perfetto.protos.AndroidTraceQualityMetric.failures: array expected");
                    m.failures = [];
                    for (var i = 0; i < d.failures.length; ++i) {
                        if (typeof d.failures[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidTraceQualityMetric.failures: object expected");
                        m.failures[i] = $root.perfetto.protos.AndroidTraceQualityMetric.Failure.fromObject(d.failures[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidTraceQualityMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidTraceQualityMetric
             * @static
             * @param {perfetto.protos.AndroidTraceQualityMetric} m AndroidTraceQualityMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidTraceQualityMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.failures = [];
                }
                if (m.failures && m.failures.length) {
                    d.failures = [];
                    for (var j = 0; j < m.failures.length; ++j) {
                        d.failures[j] = $root.perfetto.protos.AndroidTraceQualityMetric.Failure.toObject(m.failures[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidTraceQualityMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidTraceQualityMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidTraceQualityMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidTraceQualityMetric.Failure = (function() {

                /**
                 * Properties of a Failure.
                 * @memberof perfetto.protos.AndroidTraceQualityMetric
                 * @interface IFailure
                 * @property {string|null} [name] Failure name
                 */

                /**
                 * Constructs a new Failure.
                 * @memberof perfetto.protos.AndroidTraceQualityMetric
                 * @classdesc Represents a Failure.
                 * @implements IFailure
                 * @constructor
                 * @param {perfetto.protos.AndroidTraceQualityMetric.IFailure=} [p] Properties to set
                 */
                function Failure(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Failure name.
                 * @member {string} name
                 * @memberof perfetto.protos.AndroidTraceQualityMetric.Failure
                 * @instance
                 */
                Failure.prototype.name = "";

                /**
                 * Creates a new Failure instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidTraceQualityMetric.Failure
                 * @static
                 * @param {perfetto.protos.AndroidTraceQualityMetric.IFailure=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidTraceQualityMetric.Failure} Failure instance
                 */
                Failure.create = function create(properties) {
                    return new Failure(properties);
                };

                /**
                 * Encodes the specified Failure message. Does not implicitly {@link perfetto.protos.AndroidTraceQualityMetric.Failure.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidTraceQualityMetric.Failure
                 * @static
                 * @param {perfetto.protos.AndroidTraceQualityMetric.IFailure} m Failure message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Failure.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(10).string(m.name);
                    return w;
                };

                /**
                 * Encodes the specified Failure message, length delimited. Does not implicitly {@link perfetto.protos.AndroidTraceQualityMetric.Failure.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidTraceQualityMetric.Failure
                 * @static
                 * @param {perfetto.protos.AndroidTraceQualityMetric.IFailure} message Failure message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Failure.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Failure message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidTraceQualityMetric.Failure
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidTraceQualityMetric.Failure} Failure
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Failure.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidTraceQualityMetric.Failure();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.name = r.string();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Failure message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidTraceQualityMetric.Failure
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidTraceQualityMetric.Failure} Failure
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Failure.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Failure message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidTraceQualityMetric.Failure
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Failure.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a Failure message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidTraceQualityMetric.Failure
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidTraceQualityMetric.Failure} Failure
                 */
                Failure.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidTraceQualityMetric.Failure)
                        return d;
                    var m = new $root.perfetto.protos.AndroidTraceQualityMetric.Failure();
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Failure message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidTraceQualityMetric.Failure
                 * @static
                 * @param {perfetto.protos.AndroidTraceQualityMetric.Failure} m Failure
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Failure.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.name = "";
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    return d;
                };

                /**
                 * Converts this Failure to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidTraceQualityMetric.Failure
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Failure.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Failure;
            })();

            return AndroidTraceQualityMetric;
        })();

        protos.AndroidTrustyWorkqueues = (function() {

            /**
             * Properties of an AndroidTrustyWorkqueues.
             * @memberof perfetto.protos
             * @interface IAndroidTrustyWorkqueues
             */

            /**
             * Constructs a new AndroidTrustyWorkqueues.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidTrustyWorkqueues.
             * @implements IAndroidTrustyWorkqueues
             * @constructor
             * @param {perfetto.protos.IAndroidTrustyWorkqueues=} [p] Properties to set
             */
            function AndroidTrustyWorkqueues(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Creates a new AndroidTrustyWorkqueues instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidTrustyWorkqueues
             * @static
             * @param {perfetto.protos.IAndroidTrustyWorkqueues=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidTrustyWorkqueues} AndroidTrustyWorkqueues instance
             */
            AndroidTrustyWorkqueues.create = function create(properties) {
                return new AndroidTrustyWorkqueues(properties);
            };

            /**
             * Encodes the specified AndroidTrustyWorkqueues message. Does not implicitly {@link perfetto.protos.AndroidTrustyWorkqueues.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidTrustyWorkqueues
             * @static
             * @param {perfetto.protos.IAndroidTrustyWorkqueues} m AndroidTrustyWorkqueues message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidTrustyWorkqueues.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                return w;
            };

            /**
             * Encodes the specified AndroidTrustyWorkqueues message, length delimited. Does not implicitly {@link perfetto.protos.AndroidTrustyWorkqueues.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidTrustyWorkqueues
             * @static
             * @param {perfetto.protos.IAndroidTrustyWorkqueues} message AndroidTrustyWorkqueues message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidTrustyWorkqueues.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidTrustyWorkqueues message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidTrustyWorkqueues
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidTrustyWorkqueues} AndroidTrustyWorkqueues
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidTrustyWorkqueues.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidTrustyWorkqueues();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidTrustyWorkqueues message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidTrustyWorkqueues
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidTrustyWorkqueues} AndroidTrustyWorkqueues
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidTrustyWorkqueues.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidTrustyWorkqueues message.
             * @function verify
             * @memberof perfetto.protos.AndroidTrustyWorkqueues
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidTrustyWorkqueues.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates an AndroidTrustyWorkqueues message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidTrustyWorkqueues
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidTrustyWorkqueues} AndroidTrustyWorkqueues
             */
            AndroidTrustyWorkqueues.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidTrustyWorkqueues)
                    return d;
                return new $root.perfetto.protos.AndroidTrustyWorkqueues();
            };

            /**
             * Creates a plain object from an AndroidTrustyWorkqueues message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidTrustyWorkqueues
             * @static
             * @param {perfetto.protos.AndroidTrustyWorkqueues} m AndroidTrustyWorkqueues
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidTrustyWorkqueues.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this AndroidTrustyWorkqueues to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidTrustyWorkqueues
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidTrustyWorkqueues.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AndroidTrustyWorkqueues;
        })();

        protos.UnsymbolizedFrames = (function() {

            /**
             * Properties of an UnsymbolizedFrames.
             * @memberof perfetto.protos
             * @interface IUnsymbolizedFrames
             * @property {Array.<perfetto.protos.UnsymbolizedFrames.IFrame>|null} [frames] UnsymbolizedFrames frames
             */

            /**
             * Constructs a new UnsymbolizedFrames.
             * @memberof perfetto.protos
             * @classdesc Represents an UnsymbolizedFrames.
             * @implements IUnsymbolizedFrames
             * @constructor
             * @param {perfetto.protos.IUnsymbolizedFrames=} [p] Properties to set
             */
            function UnsymbolizedFrames(p) {
                this.frames = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * UnsymbolizedFrames frames.
             * @member {Array.<perfetto.protos.UnsymbolizedFrames.IFrame>} frames
             * @memberof perfetto.protos.UnsymbolizedFrames
             * @instance
             */
            UnsymbolizedFrames.prototype.frames = $util.emptyArray;

            /**
             * Creates a new UnsymbolizedFrames instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.UnsymbolizedFrames
             * @static
             * @param {perfetto.protos.IUnsymbolizedFrames=} [properties] Properties to set
             * @returns {perfetto.protos.UnsymbolizedFrames} UnsymbolizedFrames instance
             */
            UnsymbolizedFrames.create = function create(properties) {
                return new UnsymbolizedFrames(properties);
            };

            /**
             * Encodes the specified UnsymbolizedFrames message. Does not implicitly {@link perfetto.protos.UnsymbolizedFrames.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.UnsymbolizedFrames
             * @static
             * @param {perfetto.protos.IUnsymbolizedFrames} m UnsymbolizedFrames message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            UnsymbolizedFrames.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.frames != null && m.frames.length) {
                    for (var i = 0; i < m.frames.length; ++i)
                        $root.perfetto.protos.UnsymbolizedFrames.Frame.encode(m.frames[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified UnsymbolizedFrames message, length delimited. Does not implicitly {@link perfetto.protos.UnsymbolizedFrames.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.UnsymbolizedFrames
             * @static
             * @param {perfetto.protos.IUnsymbolizedFrames} message UnsymbolizedFrames message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            UnsymbolizedFrames.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an UnsymbolizedFrames message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.UnsymbolizedFrames
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.UnsymbolizedFrames} UnsymbolizedFrames
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            UnsymbolizedFrames.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.UnsymbolizedFrames();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.frames && m.frames.length))
                            m.frames = [];
                        m.frames.push($root.perfetto.protos.UnsymbolizedFrames.Frame.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an UnsymbolizedFrames message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.UnsymbolizedFrames
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.UnsymbolizedFrames} UnsymbolizedFrames
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            UnsymbolizedFrames.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an UnsymbolizedFrames message.
             * @function verify
             * @memberof perfetto.protos.UnsymbolizedFrames
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            UnsymbolizedFrames.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.frames != null && m.hasOwnProperty("frames")) {
                    if (!Array.isArray(m.frames))
                        return "frames: array expected";
                    for (var i = 0; i < m.frames.length; ++i) {
                        {
                            var e = $root.perfetto.protos.UnsymbolizedFrames.Frame.verify(m.frames[i]);
                            if (e)
                                return "frames." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an UnsymbolizedFrames message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.UnsymbolizedFrames
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.UnsymbolizedFrames} UnsymbolizedFrames
             */
            UnsymbolizedFrames.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.UnsymbolizedFrames)
                    return d;
                var m = new $root.perfetto.protos.UnsymbolizedFrames();
                if (d.frames) {
                    if (!Array.isArray(d.frames))
                        throw TypeError(".perfetto.protos.UnsymbolizedFrames.frames: array expected");
                    m.frames = [];
                    for (var i = 0; i < d.frames.length; ++i) {
                        if (typeof d.frames[i] !== "object")
                            throw TypeError(".perfetto.protos.UnsymbolizedFrames.frames: object expected");
                        m.frames[i] = $root.perfetto.protos.UnsymbolizedFrames.Frame.fromObject(d.frames[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an UnsymbolizedFrames message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.UnsymbolizedFrames
             * @static
             * @param {perfetto.protos.UnsymbolizedFrames} m UnsymbolizedFrames
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            UnsymbolizedFrames.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.frames = [];
                }
                if (m.frames && m.frames.length) {
                    d.frames = [];
                    for (var j = 0; j < m.frames.length; ++j) {
                        d.frames[j] = $root.perfetto.protos.UnsymbolizedFrames.Frame.toObject(m.frames[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this UnsymbolizedFrames to JSON.
             * @function toJSON
             * @memberof perfetto.protos.UnsymbolizedFrames
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            UnsymbolizedFrames.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            UnsymbolizedFrames.Frame = (function() {

                /**
                 * Properties of a Frame.
                 * @memberof perfetto.protos.UnsymbolizedFrames
                 * @interface IFrame
                 * @property {string|null} [module] Frame module
                 * @property {string|null} [buildId] Frame buildId
                 * @property {number|null} [address] Frame address
                 * @property {string|null} [googleLookupId] Frame googleLookupId
                 */

                /**
                 * Constructs a new Frame.
                 * @memberof perfetto.protos.UnsymbolizedFrames
                 * @classdesc Represents a Frame.
                 * @implements IFrame
                 * @constructor
                 * @param {perfetto.protos.UnsymbolizedFrames.IFrame=} [p] Properties to set
                 */
                function Frame(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Frame module.
                 * @member {string} module
                 * @memberof perfetto.protos.UnsymbolizedFrames.Frame
                 * @instance
                 */
                Frame.prototype.module = "";

                /**
                 * Frame buildId.
                 * @member {string} buildId
                 * @memberof perfetto.protos.UnsymbolizedFrames.Frame
                 * @instance
                 */
                Frame.prototype.buildId = "";

                /**
                 * Frame address.
                 * @member {number} address
                 * @memberof perfetto.protos.UnsymbolizedFrames.Frame
                 * @instance
                 */
                Frame.prototype.address = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Frame googleLookupId.
                 * @member {string} googleLookupId
                 * @memberof perfetto.protos.UnsymbolizedFrames.Frame
                 * @instance
                 */
                Frame.prototype.googleLookupId = "";

                /**
                 * Creates a new Frame instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.UnsymbolizedFrames.Frame
                 * @static
                 * @param {perfetto.protos.UnsymbolizedFrames.IFrame=} [properties] Properties to set
                 * @returns {perfetto.protos.UnsymbolizedFrames.Frame} Frame instance
                 */
                Frame.create = function create(properties) {
                    return new Frame(properties);
                };

                /**
                 * Encodes the specified Frame message. Does not implicitly {@link perfetto.protos.UnsymbolizedFrames.Frame.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.UnsymbolizedFrames.Frame
                 * @static
                 * @param {perfetto.protos.UnsymbolizedFrames.IFrame} m Frame message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Frame.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.module != null && Object.hasOwnProperty.call(m, "module"))
                        w.uint32(10).string(m.module);
                    if (m.buildId != null && Object.hasOwnProperty.call(m, "buildId"))
                        w.uint32(18).string(m.buildId);
                    if (m.address != null && Object.hasOwnProperty.call(m, "address"))
                        w.uint32(24).int64(m.address);
                    if (m.googleLookupId != null && Object.hasOwnProperty.call(m, "googleLookupId"))
                        w.uint32(34).string(m.googleLookupId);
                    return w;
                };

                /**
                 * Encodes the specified Frame message, length delimited. Does not implicitly {@link perfetto.protos.UnsymbolizedFrames.Frame.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.UnsymbolizedFrames.Frame
                 * @static
                 * @param {perfetto.protos.UnsymbolizedFrames.IFrame} message Frame message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Frame.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Frame message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.UnsymbolizedFrames.Frame
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.UnsymbolizedFrames.Frame} Frame
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Frame.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.UnsymbolizedFrames.Frame();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.module = r.string();
                            break;
                        case 2:
                            m.buildId = r.string();
                            break;
                        case 3:
                            m.address = r.int64();
                            break;
                        case 4:
                            m.googleLookupId = r.string();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Frame message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.UnsymbolizedFrames.Frame
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.UnsymbolizedFrames.Frame} Frame
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Frame.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Frame message.
                 * @function verify
                 * @memberof perfetto.protos.UnsymbolizedFrames.Frame
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Frame.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.module != null && m.hasOwnProperty("module")) {
                        if (!$util.isString(m.module))
                            return "module: string expected";
                    }
                    if (m.buildId != null && m.hasOwnProperty("buildId")) {
                        if (!$util.isString(m.buildId))
                            return "buildId: string expected";
                    }
                    if (m.address != null && m.hasOwnProperty("address")) {
                        if (!$util.isInteger(m.address) && !(m.address && $util.isInteger(m.address.low) && $util.isInteger(m.address.high)))
                            return "address: integer|Long expected";
                    }
                    if (m.googleLookupId != null && m.hasOwnProperty("googleLookupId")) {
                        if (!$util.isString(m.googleLookupId))
                            return "googleLookupId: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a Frame message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.UnsymbolizedFrames.Frame
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.UnsymbolizedFrames.Frame} Frame
                 */
                Frame.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.UnsymbolizedFrames.Frame)
                        return d;
                    var m = new $root.perfetto.protos.UnsymbolizedFrames.Frame();
                    if (d.module != null) {
                        m.module = String(d.module);
                    }
                    if (d.buildId != null) {
                        m.buildId = String(d.buildId);
                    }
                    if (d.address != null) {
                        if ($util.Long)
                            (m.address = $util.Long.fromValue(d.address)).unsigned = false;
                        else if (typeof d.address === "string")
                            m.address = parseInt(d.address, 10);
                        else if (typeof d.address === "number")
                            m.address = d.address;
                        else if (typeof d.address === "object")
                            m.address = new $util.LongBits(d.address.low >>> 0, d.address.high >>> 0).toNumber();
                    }
                    if (d.googleLookupId != null) {
                        m.googleLookupId = String(d.googleLookupId);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Frame message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.UnsymbolizedFrames.Frame
                 * @static
                 * @param {perfetto.protos.UnsymbolizedFrames.Frame} m Frame
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Frame.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.module = "";
                        d.buildId = "";
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.address = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.address = o.longs === String ? "0" : 0;
                        d.googleLookupId = "";
                    }
                    if (m.module != null && m.hasOwnProperty("module")) {
                        d.module = m.module;
                    }
                    if (m.buildId != null && m.hasOwnProperty("buildId")) {
                        d.buildId = m.buildId;
                    }
                    if (m.address != null && m.hasOwnProperty("address")) {
                        if (typeof m.address === "number")
                            d.address = o.longs === String ? String(m.address) : m.address;
                        else
                            d.address = o.longs === String ? $util.Long.prototype.toString.call(m.address) : o.longs === Number ? new $util.LongBits(m.address.low >>> 0, m.address.high >>> 0).toNumber() : m.address;
                    }
                    if (m.googleLookupId != null && m.hasOwnProperty("googleLookupId")) {
                        d.googleLookupId = m.googleLookupId;
                    }
                    return d;
                };

                /**
                 * Converts this Frame to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.UnsymbolizedFrames.Frame
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Frame.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Frame;
            })();

            return UnsymbolizedFrames;
        })();

        protos.AndroidBinderMetric = (function() {

            /**
             * Properties of an AndroidBinderMetric.
             * @memberof perfetto.protos
             * @interface IAndroidBinderMetric
             * @property {Array.<perfetto.protos.AndroidBinderMetric.IPerProcessBreakdown>|null} [processBreakdown] AndroidBinderMetric processBreakdown
             */

            /**
             * Constructs a new AndroidBinderMetric.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidBinderMetric.
             * @implements IAndroidBinderMetric
             * @constructor
             * @param {perfetto.protos.IAndroidBinderMetric=} [p] Properties to set
             */
            function AndroidBinderMetric(p) {
                this.processBreakdown = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidBinderMetric processBreakdown.
             * @member {Array.<perfetto.protos.AndroidBinderMetric.IPerProcessBreakdown>} processBreakdown
             * @memberof perfetto.protos.AndroidBinderMetric
             * @instance
             */
            AndroidBinderMetric.prototype.processBreakdown = $util.emptyArray;

            /**
             * Creates a new AndroidBinderMetric instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidBinderMetric
             * @static
             * @param {perfetto.protos.IAndroidBinderMetric=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidBinderMetric} AndroidBinderMetric instance
             */
            AndroidBinderMetric.create = function create(properties) {
                return new AndroidBinderMetric(properties);
            };

            /**
             * Encodes the specified AndroidBinderMetric message. Does not implicitly {@link perfetto.protos.AndroidBinderMetric.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidBinderMetric
             * @static
             * @param {perfetto.protos.IAndroidBinderMetric} m AndroidBinderMetric message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidBinderMetric.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.processBreakdown != null && m.processBreakdown.length) {
                    for (var i = 0; i < m.processBreakdown.length; ++i)
                        $root.perfetto.protos.AndroidBinderMetric.PerProcessBreakdown.encode(m.processBreakdown[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified AndroidBinderMetric message, length delimited. Does not implicitly {@link perfetto.protos.AndroidBinderMetric.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidBinderMetric
             * @static
             * @param {perfetto.protos.IAndroidBinderMetric} message AndroidBinderMetric message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidBinderMetric.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidBinderMetric message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidBinderMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidBinderMetric} AndroidBinderMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidBinderMetric.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidBinderMetric();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.processBreakdown && m.processBreakdown.length))
                            m.processBreakdown = [];
                        m.processBreakdown.push($root.perfetto.protos.AndroidBinderMetric.PerProcessBreakdown.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidBinderMetric message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidBinderMetric
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidBinderMetric} AndroidBinderMetric
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidBinderMetric.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidBinderMetric message.
             * @function verify
             * @memberof perfetto.protos.AndroidBinderMetric
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidBinderMetric.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.processBreakdown != null && m.hasOwnProperty("processBreakdown")) {
                    if (!Array.isArray(m.processBreakdown))
                        return "processBreakdown: array expected";
                    for (var i = 0; i < m.processBreakdown.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidBinderMetric.PerProcessBreakdown.verify(m.processBreakdown[i]);
                            if (e)
                                return "processBreakdown." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidBinderMetric message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidBinderMetric
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidBinderMetric} AndroidBinderMetric
             */
            AndroidBinderMetric.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidBinderMetric)
                    return d;
                var m = new $root.perfetto.protos.AndroidBinderMetric();
                if (d.processBreakdown) {
                    if (!Array.isArray(d.processBreakdown))
                        throw TypeError(".perfetto.protos.AndroidBinderMetric.processBreakdown: array expected");
                    m.processBreakdown = [];
                    for (var i = 0; i < d.processBreakdown.length; ++i) {
                        if (typeof d.processBreakdown[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidBinderMetric.processBreakdown: object expected");
                        m.processBreakdown[i] = $root.perfetto.protos.AndroidBinderMetric.PerProcessBreakdown.fromObject(d.processBreakdown[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidBinderMetric message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidBinderMetric
             * @static
             * @param {perfetto.protos.AndroidBinderMetric} m AndroidBinderMetric
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidBinderMetric.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.processBreakdown = [];
                }
                if (m.processBreakdown && m.processBreakdown.length) {
                    d.processBreakdown = [];
                    for (var j = 0; j < m.processBreakdown.length; ++j) {
                        d.processBreakdown[j] = $root.perfetto.protos.AndroidBinderMetric.PerProcessBreakdown.toObject(m.processBreakdown[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidBinderMetric to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidBinderMetric
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidBinderMetric.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidBinderMetric.PerProcessBreakdown = (function() {

                /**
                 * Properties of a PerProcessBreakdown.
                 * @memberof perfetto.protos.AndroidBinderMetric
                 * @interface IPerProcessBreakdown
                 * @property {string|null} [processName] PerProcessBreakdown processName
                 * @property {number|null} [pid] PerProcessBreakdown pid
                 * @property {string|null} [sliceName] PerProcessBreakdown sliceName
                 * @property {number|null} [count] PerProcessBreakdown count
                 */

                /**
                 * Constructs a new PerProcessBreakdown.
                 * @memberof perfetto.protos.AndroidBinderMetric
                 * @classdesc Represents a PerProcessBreakdown.
                 * @implements IPerProcessBreakdown
                 * @constructor
                 * @param {perfetto.protos.AndroidBinderMetric.IPerProcessBreakdown=} [p] Properties to set
                 */
                function PerProcessBreakdown(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * PerProcessBreakdown processName.
                 * @member {string} processName
                 * @memberof perfetto.protos.AndroidBinderMetric.PerProcessBreakdown
                 * @instance
                 */
                PerProcessBreakdown.prototype.processName = "";

                /**
                 * PerProcessBreakdown pid.
                 * @member {number} pid
                 * @memberof perfetto.protos.AndroidBinderMetric.PerProcessBreakdown
                 * @instance
                 */
                PerProcessBreakdown.prototype.pid = 0;

                /**
                 * PerProcessBreakdown sliceName.
                 * @member {string} sliceName
                 * @memberof perfetto.protos.AndroidBinderMetric.PerProcessBreakdown
                 * @instance
                 */
                PerProcessBreakdown.prototype.sliceName = "";

                /**
                 * PerProcessBreakdown count.
                 * @member {number} count
                 * @memberof perfetto.protos.AndroidBinderMetric.PerProcessBreakdown
                 * @instance
                 */
                PerProcessBreakdown.prototype.count = 0;

                /**
                 * Creates a new PerProcessBreakdown instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidBinderMetric.PerProcessBreakdown
                 * @static
                 * @param {perfetto.protos.AndroidBinderMetric.IPerProcessBreakdown=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidBinderMetric.PerProcessBreakdown} PerProcessBreakdown instance
                 */
                PerProcessBreakdown.create = function create(properties) {
                    return new PerProcessBreakdown(properties);
                };

                /**
                 * Encodes the specified PerProcessBreakdown message. Does not implicitly {@link perfetto.protos.AndroidBinderMetric.PerProcessBreakdown.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidBinderMetric.PerProcessBreakdown
                 * @static
                 * @param {perfetto.protos.AndroidBinderMetric.IPerProcessBreakdown} m PerProcessBreakdown message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PerProcessBreakdown.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.processName != null && Object.hasOwnProperty.call(m, "processName"))
                        w.uint32(10).string(m.processName);
                    if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                        w.uint32(16).uint32(m.pid);
                    if (m.sliceName != null && Object.hasOwnProperty.call(m, "sliceName"))
                        w.uint32(26).string(m.sliceName);
                    if (m.count != null && Object.hasOwnProperty.call(m, "count"))
                        w.uint32(32).uint32(m.count);
                    return w;
                };

                /**
                 * Encodes the specified PerProcessBreakdown message, length delimited. Does not implicitly {@link perfetto.protos.AndroidBinderMetric.PerProcessBreakdown.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidBinderMetric.PerProcessBreakdown
                 * @static
                 * @param {perfetto.protos.AndroidBinderMetric.IPerProcessBreakdown} message PerProcessBreakdown message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PerProcessBreakdown.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a PerProcessBreakdown message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidBinderMetric.PerProcessBreakdown
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidBinderMetric.PerProcessBreakdown} PerProcessBreakdown
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PerProcessBreakdown.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidBinderMetric.PerProcessBreakdown();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.processName = r.string();
                            break;
                        case 2:
                            m.pid = r.uint32();
                            break;
                        case 3:
                            m.sliceName = r.string();
                            break;
                        case 4:
                            m.count = r.uint32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a PerProcessBreakdown message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidBinderMetric.PerProcessBreakdown
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidBinderMetric.PerProcessBreakdown} PerProcessBreakdown
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PerProcessBreakdown.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a PerProcessBreakdown message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidBinderMetric.PerProcessBreakdown
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                PerProcessBreakdown.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.processName != null && m.hasOwnProperty("processName")) {
                        if (!$util.isString(m.processName))
                            return "processName: string expected";
                    }
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        if (!$util.isInteger(m.pid))
                            return "pid: integer expected";
                    }
                    if (m.sliceName != null && m.hasOwnProperty("sliceName")) {
                        if (!$util.isString(m.sliceName))
                            return "sliceName: string expected";
                    }
                    if (m.count != null && m.hasOwnProperty("count")) {
                        if (!$util.isInteger(m.count))
                            return "count: integer expected";
                    }
                    return null;
                };

                /**
                 * Creates a PerProcessBreakdown message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidBinderMetric.PerProcessBreakdown
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidBinderMetric.PerProcessBreakdown} PerProcessBreakdown
                 */
                PerProcessBreakdown.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidBinderMetric.PerProcessBreakdown)
                        return d;
                    var m = new $root.perfetto.protos.AndroidBinderMetric.PerProcessBreakdown();
                    if (d.processName != null) {
                        m.processName = String(d.processName);
                    }
                    if (d.pid != null) {
                        m.pid = d.pid >>> 0;
                    }
                    if (d.sliceName != null) {
                        m.sliceName = String(d.sliceName);
                    }
                    if (d.count != null) {
                        m.count = d.count >>> 0;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a PerProcessBreakdown message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidBinderMetric.PerProcessBreakdown
                 * @static
                 * @param {perfetto.protos.AndroidBinderMetric.PerProcessBreakdown} m PerProcessBreakdown
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                PerProcessBreakdown.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.processName = "";
                        d.pid = 0;
                        d.sliceName = "";
                        d.count = 0;
                    }
                    if (m.processName != null && m.hasOwnProperty("processName")) {
                        d.processName = m.processName;
                    }
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        d.pid = m.pid;
                    }
                    if (m.sliceName != null && m.hasOwnProperty("sliceName")) {
                        d.sliceName = m.sliceName;
                    }
                    if (m.count != null && m.hasOwnProperty("count")) {
                        d.count = m.count;
                    }
                    return d;
                };

                /**
                 * Converts this PerProcessBreakdown to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidBinderMetric.PerProcessBreakdown
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                PerProcessBreakdown.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return PerProcessBreakdown;
            })();

            return AndroidBinderMetric;
        })();

        protos.PerfettoMetatrace = (function() {

            /**
             * Properties of a PerfettoMetatrace.
             * @memberof perfetto.protos
             * @interface IPerfettoMetatrace
             * @property {number|null} [eventId] PerfettoMetatrace eventId
             * @property {number|null} [counterId] PerfettoMetatrace counterId
             * @property {string|null} [eventName] PerfettoMetatrace eventName
             * @property {string|null} [counterName] PerfettoMetatrace counterName
             * @property {number|null} [eventDurationNs] PerfettoMetatrace eventDurationNs
             * @property {number|null} [counterValue] PerfettoMetatrace counterValue
             * @property {number|null} [threadId] PerfettoMetatrace threadId
             * @property {boolean|null} [hasOverruns] PerfettoMetatrace hasOverruns
             * @property {Array.<perfetto.protos.PerfettoMetatrace.IArg>|null} [args] PerfettoMetatrace args
             */

            /**
             * Constructs a new PerfettoMetatrace.
             * @memberof perfetto.protos
             * @classdesc Represents a PerfettoMetatrace.
             * @implements IPerfettoMetatrace
             * @constructor
             * @param {perfetto.protos.IPerfettoMetatrace=} [p] Properties to set
             */
            function PerfettoMetatrace(p) {
                this.args = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * PerfettoMetatrace eventId.
             * @member {number} eventId
             * @memberof perfetto.protos.PerfettoMetatrace
             * @instance
             */
            PerfettoMetatrace.prototype.eventId = 0;

            /**
             * PerfettoMetatrace counterId.
             * @member {number} counterId
             * @memberof perfetto.protos.PerfettoMetatrace
             * @instance
             */
            PerfettoMetatrace.prototype.counterId = 0;

            /**
             * PerfettoMetatrace eventName.
             * @member {string} eventName
             * @memberof perfetto.protos.PerfettoMetatrace
             * @instance
             */
            PerfettoMetatrace.prototype.eventName = "";

            /**
             * PerfettoMetatrace counterName.
             * @member {string} counterName
             * @memberof perfetto.protos.PerfettoMetatrace
             * @instance
             */
            PerfettoMetatrace.prototype.counterName = "";

            /**
             * PerfettoMetatrace eventDurationNs.
             * @member {number} eventDurationNs
             * @memberof perfetto.protos.PerfettoMetatrace
             * @instance
             */
            PerfettoMetatrace.prototype.eventDurationNs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * PerfettoMetatrace counterValue.
             * @member {number} counterValue
             * @memberof perfetto.protos.PerfettoMetatrace
             * @instance
             */
            PerfettoMetatrace.prototype.counterValue = 0;

            /**
             * PerfettoMetatrace threadId.
             * @member {number} threadId
             * @memberof perfetto.protos.PerfettoMetatrace
             * @instance
             */
            PerfettoMetatrace.prototype.threadId = 0;

            /**
             * PerfettoMetatrace hasOverruns.
             * @member {boolean} hasOverruns
             * @memberof perfetto.protos.PerfettoMetatrace
             * @instance
             */
            PerfettoMetatrace.prototype.hasOverruns = false;

            /**
             * PerfettoMetatrace args.
             * @member {Array.<perfetto.protos.PerfettoMetatrace.IArg>} args
             * @memberof perfetto.protos.PerfettoMetatrace
             * @instance
             */
            PerfettoMetatrace.prototype.args = $util.emptyArray;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * PerfettoMetatrace recordType.
             * @member {"eventId"|"counterId"|"eventName"|"counterName"|undefined} recordType
             * @memberof perfetto.protos.PerfettoMetatrace
             * @instance
             */
            Object.defineProperty(PerfettoMetatrace.prototype, "recordType", {
                get: $util.oneOfGetter($oneOfFields = ["eventId", "counterId", "eventName", "counterName"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new PerfettoMetatrace instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.PerfettoMetatrace
             * @static
             * @param {perfetto.protos.IPerfettoMetatrace=} [properties] Properties to set
             * @returns {perfetto.protos.PerfettoMetatrace} PerfettoMetatrace instance
             */
            PerfettoMetatrace.create = function create(properties) {
                return new PerfettoMetatrace(properties);
            };

            /**
             * Encodes the specified PerfettoMetatrace message. Does not implicitly {@link perfetto.protos.PerfettoMetatrace.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.PerfettoMetatrace
             * @static
             * @param {perfetto.protos.IPerfettoMetatrace} m PerfettoMetatrace message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PerfettoMetatrace.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.eventId != null && Object.hasOwnProperty.call(m, "eventId"))
                    w.uint32(8).uint32(m.eventId);
                if (m.counterId != null && Object.hasOwnProperty.call(m, "counterId"))
                    w.uint32(16).uint32(m.counterId);
                if (m.eventDurationNs != null && Object.hasOwnProperty.call(m, "eventDurationNs"))
                    w.uint32(24).uint64(m.eventDurationNs);
                if (m.counterValue != null && Object.hasOwnProperty.call(m, "counterValue"))
                    w.uint32(32).int32(m.counterValue);
                if (m.threadId != null && Object.hasOwnProperty.call(m, "threadId"))
                    w.uint32(40).uint32(m.threadId);
                if (m.hasOverruns != null && Object.hasOwnProperty.call(m, "hasOverruns"))
                    w.uint32(48).bool(m.hasOverruns);
                if (m.args != null && m.args.length) {
                    for (var i = 0; i < m.args.length; ++i)
                        $root.perfetto.protos.PerfettoMetatrace.Arg.encode(m.args[i], w.uint32(58).fork()).ldelim();
                }
                if (m.eventName != null && Object.hasOwnProperty.call(m, "eventName"))
                    w.uint32(66).string(m.eventName);
                if (m.counterName != null && Object.hasOwnProperty.call(m, "counterName"))
                    w.uint32(74).string(m.counterName);
                return w;
            };

            /**
             * Encodes the specified PerfettoMetatrace message, length delimited. Does not implicitly {@link perfetto.protos.PerfettoMetatrace.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.PerfettoMetatrace
             * @static
             * @param {perfetto.protos.IPerfettoMetatrace} message PerfettoMetatrace message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PerfettoMetatrace.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a PerfettoMetatrace message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.PerfettoMetatrace
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.PerfettoMetatrace} PerfettoMetatrace
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PerfettoMetatrace.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.PerfettoMetatrace();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.eventId = r.uint32();
                        break;
                    case 2:
                        m.counterId = r.uint32();
                        break;
                    case 8:
                        m.eventName = r.string();
                        break;
                    case 9:
                        m.counterName = r.string();
                        break;
                    case 3:
                        m.eventDurationNs = r.uint64();
                        break;
                    case 4:
                        m.counterValue = r.int32();
                        break;
                    case 5:
                        m.threadId = r.uint32();
                        break;
                    case 6:
                        m.hasOverruns = r.bool();
                        break;
                    case 7:
                        if (!(m.args && m.args.length))
                            m.args = [];
                        m.args.push($root.perfetto.protos.PerfettoMetatrace.Arg.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a PerfettoMetatrace message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.PerfettoMetatrace
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.PerfettoMetatrace} PerfettoMetatrace
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PerfettoMetatrace.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a PerfettoMetatrace message.
             * @function verify
             * @memberof perfetto.protos.PerfettoMetatrace
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            PerfettoMetatrace.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                var p = {};
                if (m.eventId != null && m.hasOwnProperty("eventId")) {
                    p.recordType = 1;
                    if (!$util.isInteger(m.eventId))
                        return "eventId: integer expected";
                }
                if (m.counterId != null && m.hasOwnProperty("counterId")) {
                    if (p.recordType === 1)
                        return "recordType: multiple values";
                    p.recordType = 1;
                    if (!$util.isInteger(m.counterId))
                        return "counterId: integer expected";
                }
                if (m.eventName != null && m.hasOwnProperty("eventName")) {
                    if (p.recordType === 1)
                        return "recordType: multiple values";
                    p.recordType = 1;
                    if (!$util.isString(m.eventName))
                        return "eventName: string expected";
                }
                if (m.counterName != null && m.hasOwnProperty("counterName")) {
                    if (p.recordType === 1)
                        return "recordType: multiple values";
                    p.recordType = 1;
                    if (!$util.isString(m.counterName))
                        return "counterName: string expected";
                }
                if (m.eventDurationNs != null && m.hasOwnProperty("eventDurationNs")) {
                    if (!$util.isInteger(m.eventDurationNs) && !(m.eventDurationNs && $util.isInteger(m.eventDurationNs.low) && $util.isInteger(m.eventDurationNs.high)))
                        return "eventDurationNs: integer|Long expected";
                }
                if (m.counterValue != null && m.hasOwnProperty("counterValue")) {
                    if (!$util.isInteger(m.counterValue))
                        return "counterValue: integer expected";
                }
                if (m.threadId != null && m.hasOwnProperty("threadId")) {
                    if (!$util.isInteger(m.threadId))
                        return "threadId: integer expected";
                }
                if (m.hasOverruns != null && m.hasOwnProperty("hasOverruns")) {
                    if (typeof m.hasOverruns !== "boolean")
                        return "hasOverruns: boolean expected";
                }
                if (m.args != null && m.hasOwnProperty("args")) {
                    if (!Array.isArray(m.args))
                        return "args: array expected";
                    for (var i = 0; i < m.args.length; ++i) {
                        {
                            var e = $root.perfetto.protos.PerfettoMetatrace.Arg.verify(m.args[i]);
                            if (e)
                                return "args." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a PerfettoMetatrace message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.PerfettoMetatrace
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.PerfettoMetatrace} PerfettoMetatrace
             */
            PerfettoMetatrace.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.PerfettoMetatrace)
                    return d;
                var m = new $root.perfetto.protos.PerfettoMetatrace();
                if (d.eventId != null) {
                    m.eventId = d.eventId >>> 0;
                }
                if (d.counterId != null) {
                    m.counterId = d.counterId >>> 0;
                }
                if (d.eventName != null) {
                    m.eventName = String(d.eventName);
                }
                if (d.counterName != null) {
                    m.counterName = String(d.counterName);
                }
                if (d.eventDurationNs != null) {
                    if ($util.Long)
                        (m.eventDurationNs = $util.Long.fromValue(d.eventDurationNs)).unsigned = true;
                    else if (typeof d.eventDurationNs === "string")
                        m.eventDurationNs = parseInt(d.eventDurationNs, 10);
                    else if (typeof d.eventDurationNs === "number")
                        m.eventDurationNs = d.eventDurationNs;
                    else if (typeof d.eventDurationNs === "object")
                        m.eventDurationNs = new $util.LongBits(d.eventDurationNs.low >>> 0, d.eventDurationNs.high >>> 0).toNumber(true);
                }
                if (d.counterValue != null) {
                    m.counterValue = d.counterValue | 0;
                }
                if (d.threadId != null) {
                    m.threadId = d.threadId >>> 0;
                }
                if (d.hasOverruns != null) {
                    m.hasOverruns = Boolean(d.hasOverruns);
                }
                if (d.args) {
                    if (!Array.isArray(d.args))
                        throw TypeError(".perfetto.protos.PerfettoMetatrace.args: array expected");
                    m.args = [];
                    for (var i = 0; i < d.args.length; ++i) {
                        if (typeof d.args[i] !== "object")
                            throw TypeError(".perfetto.protos.PerfettoMetatrace.args: object expected");
                        m.args[i] = $root.perfetto.protos.PerfettoMetatrace.Arg.fromObject(d.args[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a PerfettoMetatrace message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.PerfettoMetatrace
             * @static
             * @param {perfetto.protos.PerfettoMetatrace} m PerfettoMetatrace
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            PerfettoMetatrace.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.args = [];
                }
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.eventDurationNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.eventDurationNs = o.longs === String ? "0" : 0;
                    d.counterValue = 0;
                    d.threadId = 0;
                    d.hasOverruns = false;
                }
                if (m.eventId != null && m.hasOwnProperty("eventId")) {
                    d.eventId = m.eventId;
                    if (o.oneofs)
                        d.recordType = "eventId";
                }
                if (m.counterId != null && m.hasOwnProperty("counterId")) {
                    d.counterId = m.counterId;
                    if (o.oneofs)
                        d.recordType = "counterId";
                }
                if (m.eventDurationNs != null && m.hasOwnProperty("eventDurationNs")) {
                    if (typeof m.eventDurationNs === "number")
                        d.eventDurationNs = o.longs === String ? String(m.eventDurationNs) : m.eventDurationNs;
                    else
                        d.eventDurationNs = o.longs === String ? $util.Long.prototype.toString.call(m.eventDurationNs) : o.longs === Number ? new $util.LongBits(m.eventDurationNs.low >>> 0, m.eventDurationNs.high >>> 0).toNumber(true) : m.eventDurationNs;
                }
                if (m.counterValue != null && m.hasOwnProperty("counterValue")) {
                    d.counterValue = m.counterValue;
                }
                if (m.threadId != null && m.hasOwnProperty("threadId")) {
                    d.threadId = m.threadId;
                }
                if (m.hasOverruns != null && m.hasOwnProperty("hasOverruns")) {
                    d.hasOverruns = m.hasOverruns;
                }
                if (m.args && m.args.length) {
                    d.args = [];
                    for (var j = 0; j < m.args.length; ++j) {
                        d.args[j] = $root.perfetto.protos.PerfettoMetatrace.Arg.toObject(m.args[j], o);
                    }
                }
                if (m.eventName != null && m.hasOwnProperty("eventName")) {
                    d.eventName = m.eventName;
                    if (o.oneofs)
                        d.recordType = "eventName";
                }
                if (m.counterName != null && m.hasOwnProperty("counterName")) {
                    d.counterName = m.counterName;
                    if (o.oneofs)
                        d.recordType = "counterName";
                }
                return d;
            };

            /**
             * Converts this PerfettoMetatrace to JSON.
             * @function toJSON
             * @memberof perfetto.protos.PerfettoMetatrace
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            PerfettoMetatrace.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            PerfettoMetatrace.Arg = (function() {

                /**
                 * Properties of an Arg.
                 * @memberof perfetto.protos.PerfettoMetatrace
                 * @interface IArg
                 * @property {string|null} [key] Arg key
                 * @property {string|null} [value] Arg value
                 */

                /**
                 * Constructs a new Arg.
                 * @memberof perfetto.protos.PerfettoMetatrace
                 * @classdesc Represents an Arg.
                 * @implements IArg
                 * @constructor
                 * @param {perfetto.protos.PerfettoMetatrace.IArg=} [p] Properties to set
                 */
                function Arg(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Arg key.
                 * @member {string} key
                 * @memberof perfetto.protos.PerfettoMetatrace.Arg
                 * @instance
                 */
                Arg.prototype.key = "";

                /**
                 * Arg value.
                 * @member {string} value
                 * @memberof perfetto.protos.PerfettoMetatrace.Arg
                 * @instance
                 */
                Arg.prototype.value = "";

                /**
                 * Creates a new Arg instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.PerfettoMetatrace.Arg
                 * @static
                 * @param {perfetto.protos.PerfettoMetatrace.IArg=} [properties] Properties to set
                 * @returns {perfetto.protos.PerfettoMetatrace.Arg} Arg instance
                 */
                Arg.create = function create(properties) {
                    return new Arg(properties);
                };

                /**
                 * Encodes the specified Arg message. Does not implicitly {@link perfetto.protos.PerfettoMetatrace.Arg.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.PerfettoMetatrace.Arg
                 * @static
                 * @param {perfetto.protos.PerfettoMetatrace.IArg} m Arg message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Arg.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.key != null && Object.hasOwnProperty.call(m, "key"))
                        w.uint32(10).string(m.key);
                    if (m.value != null && Object.hasOwnProperty.call(m, "value"))
                        w.uint32(18).string(m.value);
                    return w;
                };

                /**
                 * Encodes the specified Arg message, length delimited. Does not implicitly {@link perfetto.protos.PerfettoMetatrace.Arg.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.PerfettoMetatrace.Arg
                 * @static
                 * @param {perfetto.protos.PerfettoMetatrace.IArg} message Arg message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Arg.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an Arg message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.PerfettoMetatrace.Arg
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.PerfettoMetatrace.Arg} Arg
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Arg.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.PerfettoMetatrace.Arg();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.key = r.string();
                            break;
                        case 2:
                            m.value = r.string();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an Arg message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.PerfettoMetatrace.Arg
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.PerfettoMetatrace.Arg} Arg
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Arg.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an Arg message.
                 * @function verify
                 * @memberof perfetto.protos.PerfettoMetatrace.Arg
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Arg.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.key != null && m.hasOwnProperty("key")) {
                        if (!$util.isString(m.key))
                            return "key: string expected";
                    }
                    if (m.value != null && m.hasOwnProperty("value")) {
                        if (!$util.isString(m.value))
                            return "value: string expected";
                    }
                    return null;
                };

                /**
                 * Creates an Arg message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.PerfettoMetatrace.Arg
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.PerfettoMetatrace.Arg} Arg
                 */
                Arg.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.PerfettoMetatrace.Arg)
                        return d;
                    var m = new $root.perfetto.protos.PerfettoMetatrace.Arg();
                    if (d.key != null) {
                        m.key = String(d.key);
                    }
                    if (d.value != null) {
                        m.value = String(d.value);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an Arg message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.PerfettoMetatrace.Arg
                 * @static
                 * @param {perfetto.protos.PerfettoMetatrace.Arg} m Arg
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Arg.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.key = "";
                        d.value = "";
                    }
                    if (m.key != null && m.hasOwnProperty("key")) {
                        d.key = m.key;
                    }
                    if (m.value != null && m.hasOwnProperty("value")) {
                        d.value = m.value;
                    }
                    return d;
                };

                /**
                 * Converts this Arg to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.PerfettoMetatrace.Arg
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Arg.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Arg;
            })();

            return PerfettoMetatrace;
        })();

        protos.Trace = (function() {

            /**
             * Properties of a Trace.
             * @memberof perfetto.protos
             * @interface ITrace
             * @property {Array.<perfetto.protos.ITracePacket>|null} [packet] Trace packet
             */

            /**
             * Constructs a new Trace.
             * @memberof perfetto.protos
             * @classdesc Represents a Trace.
             * @implements ITrace
             * @constructor
             * @param {perfetto.protos.ITrace=} [p] Properties to set
             */
            function Trace(p) {
                this.packet = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Trace packet.
             * @member {Array.<perfetto.protos.ITracePacket>} packet
             * @memberof perfetto.protos.Trace
             * @instance
             */
            Trace.prototype.packet = $util.emptyArray;

            /**
             * Creates a new Trace instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Trace
             * @static
             * @param {perfetto.protos.ITrace=} [properties] Properties to set
             * @returns {perfetto.protos.Trace} Trace instance
             */
            Trace.create = function create(properties) {
                return new Trace(properties);
            };

            /**
             * Encodes the specified Trace message. Does not implicitly {@link perfetto.protos.Trace.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Trace
             * @static
             * @param {perfetto.protos.ITrace} m Trace message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Trace.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.packet != null && m.packet.length) {
                    for (var i = 0; i < m.packet.length; ++i)
                        $root.perfetto.protos.TracePacket.encode(m.packet[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified Trace message, length delimited. Does not implicitly {@link perfetto.protos.Trace.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Trace
             * @static
             * @param {perfetto.protos.ITrace} message Trace message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Trace.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a Trace message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Trace
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Trace} Trace
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Trace.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Trace();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.packet && m.packet.length))
                            m.packet = [];
                        m.packet.push($root.perfetto.protos.TracePacket.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a Trace message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Trace
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Trace} Trace
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Trace.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a Trace message.
             * @function verify
             * @memberof perfetto.protos.Trace
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Trace.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.packet != null && m.hasOwnProperty("packet")) {
                    if (!Array.isArray(m.packet))
                        return "packet: array expected";
                    for (var i = 0; i < m.packet.length; ++i) {
                        {
                            var e = $root.perfetto.protos.TracePacket.verify(m.packet[i]);
                            if (e)
                                return "packet." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a Trace message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Trace
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Trace} Trace
             */
            Trace.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Trace)
                    return d;
                var m = new $root.perfetto.protos.Trace();
                if (d.packet) {
                    if (!Array.isArray(d.packet))
                        throw TypeError(".perfetto.protos.Trace.packet: array expected");
                    m.packet = [];
                    for (var i = 0; i < d.packet.length; ++i) {
                        if (typeof d.packet[i] !== "object")
                            throw TypeError(".perfetto.protos.Trace.packet: object expected");
                        m.packet[i] = $root.perfetto.protos.TracePacket.fromObject(d.packet[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a Trace message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Trace
             * @static
             * @param {perfetto.protos.Trace} m Trace
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Trace.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.packet = [];
                }
                if (m.packet && m.packet.length) {
                    d.packet = [];
                    for (var j = 0; j < m.packet.length; ++j) {
                        d.packet[j] = $root.perfetto.protos.TracePacket.toObject(m.packet[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this Trace to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Trace
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Trace.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Trace;
        })();

        protos.TracePacket = (function() {

            /**
             * Properties of a TracePacket.
             * @memberof perfetto.protos
             * @interface ITracePacket
             * @property {number|null} [timestamp] TracePacket timestamp
             * @property {number|null} [timestampClockId] TracePacket timestampClockId
             * @property {perfetto.protos.IProcessTree|null} [processTree] TracePacket processTree
             * @property {perfetto.protos.IProcessStats|null} [processStats] TracePacket processStats
             * @property {perfetto.protos.IInodeFileMap|null} [inodeFileMap] TracePacket inodeFileMap
             * @property {perfetto.protos.IChromeEventBundle|null} [chromeEvents] TracePacket chromeEvents
             * @property {perfetto.protos.IClockSnapshot|null} [clockSnapshot] TracePacket clockSnapshot
             * @property {perfetto.protos.ISysStats|null} [sysStats] TracePacket sysStats
             * @property {perfetto.protos.ITrackEvent|null} [trackEvent] TracePacket trackEvent
             * @property {perfetto.protos.ITraceConfig|null} [traceConfig] TracePacket traceConfig
             * @property {perfetto.protos.IFtraceStats|null} [ftraceStats] TracePacket ftraceStats
             * @property {perfetto.protos.ITraceStats|null} [traceStats] TracePacket traceStats
             * @property {perfetto.protos.IProfilePacket|null} [profilePacket] TracePacket profilePacket
             * @property {perfetto.protos.IStreamingAllocation|null} [streamingAllocation] TracePacket streamingAllocation
             * @property {perfetto.protos.IStreamingFree|null} [streamingFree] TracePacket streamingFree
             * @property {perfetto.protos.IBatteryCounters|null} [battery] TracePacket battery
             * @property {perfetto.protos.IPowerRails|null} [powerRails] TracePacket powerRails
             * @property {perfetto.protos.IAndroidLogPacket|null} [androidLog] TracePacket androidLog
             * @property {perfetto.protos.ISystemInfo|null} [systemInfo] TracePacket systemInfo
             * @property {perfetto.protos.ITrigger|null} [trigger] TracePacket trigger
             * @property {perfetto.protos.IPackagesList|null} [packagesList] TracePacket packagesList
             * @property {perfetto.protos.IChromeBenchmarkMetadata|null} [chromeBenchmarkMetadata] TracePacket chromeBenchmarkMetadata
             * @property {perfetto.protos.IPerfettoMetatrace|null} [perfettoMetatrace] TracePacket perfettoMetatrace
             * @property {perfetto.protos.IChromeMetadataPacket|null} [chromeMetadata] TracePacket chromeMetadata
             * @property {perfetto.protos.IGpuCounterEvent|null} [gpuCounterEvent] TracePacket gpuCounterEvent
             * @property {perfetto.protos.IGpuRenderStageEvent|null} [gpuRenderStageEvent] TracePacket gpuRenderStageEvent
             * @property {perfetto.protos.IStreamingProfilePacket|null} [streamingProfilePacket] TracePacket streamingProfilePacket
             * @property {perfetto.protos.IHeapGraph|null} [heapGraph] TracePacket heapGraph
             * @property {perfetto.protos.IGraphicsFrameEvent|null} [graphicsFrameEvent] TracePacket graphicsFrameEvent
             * @property {perfetto.protos.IVulkanMemoryEvent|null} [vulkanMemoryEvent] TracePacket vulkanMemoryEvent
             * @property {perfetto.protos.IGpuLog|null} [gpuLog] TracePacket gpuLog
             * @property {perfetto.protos.IVulkanApiEvent|null} [vulkanApiEvent] TracePacket vulkanApiEvent
             * @property {perfetto.protos.IPerfSample|null} [perfSample] TracePacket perfSample
             * @property {perfetto.protos.ICpuInfo|null} [cpuInfo] TracePacket cpuInfo
             * @property {perfetto.protos.ISmapsPacket|null} [smapsPacket] TracePacket smapsPacket
             * @property {perfetto.protos.ITracingServiceEvent|null} [serviceEvent] TracePacket serviceEvent
             * @property {perfetto.protos.IInitialDisplayState|null} [initialDisplayState] TracePacket initialDisplayState
             * @property {perfetto.protos.IGpuMemTotalEvent|null} [gpuMemTotalEvent] TracePacket gpuMemTotalEvent
             * @property {perfetto.protos.IMemoryTrackerSnapshot|null} [memoryTrackerSnapshot] TracePacket memoryTrackerSnapshot
             * @property {perfetto.protos.IFrameTimelineEvent|null} [frameTimelineEvent] TracePacket frameTimelineEvent
             * @property {perfetto.protos.IAndroidEnergyEstimationBreakdown|null} [androidEnergyEstimationBreakdown] TracePacket androidEnergyEstimationBreakdown
             * @property {perfetto.protos.IUiState|null} [uiState] TracePacket uiState
             * @property {perfetto.protos.IAndroidCameraFrameEvent|null} [androidCameraFrameEvent] TracePacket androidCameraFrameEvent
             * @property {perfetto.protos.IAndroidCameraSessionStats|null} [androidCameraSessionStats] TracePacket androidCameraSessionStats
             * @property {perfetto.protos.ITranslationTable|null} [translationTable] TracePacket translationTable
             * @property {perfetto.protos.IAndroidGameInterventionList|null} [androidGameInterventionList] TracePacket androidGameInterventionList
             * @property {perfetto.protos.IStatsdAtom|null} [statsdAtom] TracePacket statsdAtom
             * @property {perfetto.protos.IAndroidSystemProperty|null} [androidSystemProperty] TracePacket androidSystemProperty
             * @property {perfetto.protos.IProfiledFrameSymbols|null} [profiledFrameSymbols] TracePacket profiledFrameSymbols
             * @property {perfetto.protos.IModuleSymbols|null} [moduleSymbols] TracePacket moduleSymbols
             * @property {perfetto.protos.IDeobfuscationMapping|null} [deobfuscationMapping] TracePacket deobfuscationMapping
             * @property {perfetto.protos.ITrackDescriptor|null} [trackDescriptor] TracePacket trackDescriptor
             * @property {perfetto.protos.IProcessDescriptor|null} [processDescriptor] TracePacket processDescriptor
             * @property {perfetto.protos.IThreadDescriptor|null} [threadDescriptor] TracePacket threadDescriptor
             * @property {perfetto.protos.IFtraceEventBundle|null} [ftraceEvents] TracePacket ftraceEvents
             * @property {Uint8Array|null} [synchronizationMarker] TracePacket synchronizationMarker
             * @property {Uint8Array|null} [compressedPackets] TracePacket compressedPackets
             * @property {perfetto.protos.IExtensionDescriptor|null} [extensionDescriptor] TracePacket extensionDescriptor
             * @property {perfetto.protos.ITestEvent|null} [forTesting] TracePacket forTesting
             * @property {number|null} [trustedUid] TracePacket trustedUid
             * @property {number|null} [trustedPacketSequenceId] TracePacket trustedPacketSequenceId
             * @property {number|null} [trustedPid] TracePacket trustedPid
             * @property {perfetto.protos.IInternedData|null} [internedData] TracePacket internedData
             * @property {number|null} [sequenceFlags] TracePacket sequenceFlags
             * @property {boolean|null} [incrementalStateCleared] TracePacket incrementalStateCleared
             * @property {perfetto.protos.ITracePacketDefaults|null} [tracePacketDefaults] TracePacket tracePacketDefaults
             * @property {boolean|null} [previousPacketDropped] TracePacket previousPacketDropped
             * @property {boolean|null} [firstPacketOnSequence] TracePacket firstPacketOnSequence
             */

            /**
             * Constructs a new TracePacket.
             * @memberof perfetto.protos
             * @classdesc Represents a TracePacket.
             * @implements ITracePacket
             * @constructor
             * @param {perfetto.protos.ITracePacket=} [p] Properties to set
             */
            function TracePacket(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TracePacket timestamp.
             * @member {number} timestamp
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TracePacket timestampClockId.
             * @member {number} timestampClockId
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.timestampClockId = 0;

            /**
             * TracePacket processTree.
             * @member {perfetto.protos.IProcessTree|null|undefined} processTree
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.processTree = null;

            /**
             * TracePacket processStats.
             * @member {perfetto.protos.IProcessStats|null|undefined} processStats
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.processStats = null;

            /**
             * TracePacket inodeFileMap.
             * @member {perfetto.protos.IInodeFileMap|null|undefined} inodeFileMap
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.inodeFileMap = null;

            /**
             * TracePacket chromeEvents.
             * @member {perfetto.protos.IChromeEventBundle|null|undefined} chromeEvents
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.chromeEvents = null;

            /**
             * TracePacket clockSnapshot.
             * @member {perfetto.protos.IClockSnapshot|null|undefined} clockSnapshot
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.clockSnapshot = null;

            /**
             * TracePacket sysStats.
             * @member {perfetto.protos.ISysStats|null|undefined} sysStats
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.sysStats = null;

            /**
             * TracePacket trackEvent.
             * @member {perfetto.protos.ITrackEvent|null|undefined} trackEvent
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.trackEvent = null;

            /**
             * TracePacket traceConfig.
             * @member {perfetto.protos.ITraceConfig|null|undefined} traceConfig
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.traceConfig = null;

            /**
             * TracePacket ftraceStats.
             * @member {perfetto.protos.IFtraceStats|null|undefined} ftraceStats
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.ftraceStats = null;

            /**
             * TracePacket traceStats.
             * @member {perfetto.protos.ITraceStats|null|undefined} traceStats
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.traceStats = null;

            /**
             * TracePacket profilePacket.
             * @member {perfetto.protos.IProfilePacket|null|undefined} profilePacket
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.profilePacket = null;

            /**
             * TracePacket streamingAllocation.
             * @member {perfetto.protos.IStreamingAllocation|null|undefined} streamingAllocation
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.streamingAllocation = null;

            /**
             * TracePacket streamingFree.
             * @member {perfetto.protos.IStreamingFree|null|undefined} streamingFree
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.streamingFree = null;

            /**
             * TracePacket battery.
             * @member {perfetto.protos.IBatteryCounters|null|undefined} battery
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.battery = null;

            /**
             * TracePacket powerRails.
             * @member {perfetto.protos.IPowerRails|null|undefined} powerRails
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.powerRails = null;

            /**
             * TracePacket androidLog.
             * @member {perfetto.protos.IAndroidLogPacket|null|undefined} androidLog
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.androidLog = null;

            /**
             * TracePacket systemInfo.
             * @member {perfetto.protos.ISystemInfo|null|undefined} systemInfo
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.systemInfo = null;

            /**
             * TracePacket trigger.
             * @member {perfetto.protos.ITrigger|null|undefined} trigger
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.trigger = null;

            /**
             * TracePacket packagesList.
             * @member {perfetto.protos.IPackagesList|null|undefined} packagesList
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.packagesList = null;

            /**
             * TracePacket chromeBenchmarkMetadata.
             * @member {perfetto.protos.IChromeBenchmarkMetadata|null|undefined} chromeBenchmarkMetadata
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.chromeBenchmarkMetadata = null;

            /**
             * TracePacket perfettoMetatrace.
             * @member {perfetto.protos.IPerfettoMetatrace|null|undefined} perfettoMetatrace
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.perfettoMetatrace = null;

            /**
             * TracePacket chromeMetadata.
             * @member {perfetto.protos.IChromeMetadataPacket|null|undefined} chromeMetadata
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.chromeMetadata = null;

            /**
             * TracePacket gpuCounterEvent.
             * @member {perfetto.protos.IGpuCounterEvent|null|undefined} gpuCounterEvent
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.gpuCounterEvent = null;

            /**
             * TracePacket gpuRenderStageEvent.
             * @member {perfetto.protos.IGpuRenderStageEvent|null|undefined} gpuRenderStageEvent
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.gpuRenderStageEvent = null;

            /**
             * TracePacket streamingProfilePacket.
             * @member {perfetto.protos.IStreamingProfilePacket|null|undefined} streamingProfilePacket
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.streamingProfilePacket = null;

            /**
             * TracePacket heapGraph.
             * @member {perfetto.protos.IHeapGraph|null|undefined} heapGraph
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.heapGraph = null;

            /**
             * TracePacket graphicsFrameEvent.
             * @member {perfetto.protos.IGraphicsFrameEvent|null|undefined} graphicsFrameEvent
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.graphicsFrameEvent = null;

            /**
             * TracePacket vulkanMemoryEvent.
             * @member {perfetto.protos.IVulkanMemoryEvent|null|undefined} vulkanMemoryEvent
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.vulkanMemoryEvent = null;

            /**
             * TracePacket gpuLog.
             * @member {perfetto.protos.IGpuLog|null|undefined} gpuLog
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.gpuLog = null;

            /**
             * TracePacket vulkanApiEvent.
             * @member {perfetto.protos.IVulkanApiEvent|null|undefined} vulkanApiEvent
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.vulkanApiEvent = null;

            /**
             * TracePacket perfSample.
             * @member {perfetto.protos.IPerfSample|null|undefined} perfSample
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.perfSample = null;

            /**
             * TracePacket cpuInfo.
             * @member {perfetto.protos.ICpuInfo|null|undefined} cpuInfo
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.cpuInfo = null;

            /**
             * TracePacket smapsPacket.
             * @member {perfetto.protos.ISmapsPacket|null|undefined} smapsPacket
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.smapsPacket = null;

            /**
             * TracePacket serviceEvent.
             * @member {perfetto.protos.ITracingServiceEvent|null|undefined} serviceEvent
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.serviceEvent = null;

            /**
             * TracePacket initialDisplayState.
             * @member {perfetto.protos.IInitialDisplayState|null|undefined} initialDisplayState
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.initialDisplayState = null;

            /**
             * TracePacket gpuMemTotalEvent.
             * @member {perfetto.protos.IGpuMemTotalEvent|null|undefined} gpuMemTotalEvent
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.gpuMemTotalEvent = null;

            /**
             * TracePacket memoryTrackerSnapshot.
             * @member {perfetto.protos.IMemoryTrackerSnapshot|null|undefined} memoryTrackerSnapshot
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.memoryTrackerSnapshot = null;

            /**
             * TracePacket frameTimelineEvent.
             * @member {perfetto.protos.IFrameTimelineEvent|null|undefined} frameTimelineEvent
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.frameTimelineEvent = null;

            /**
             * TracePacket androidEnergyEstimationBreakdown.
             * @member {perfetto.protos.IAndroidEnergyEstimationBreakdown|null|undefined} androidEnergyEstimationBreakdown
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.androidEnergyEstimationBreakdown = null;

            /**
             * TracePacket uiState.
             * @member {perfetto.protos.IUiState|null|undefined} uiState
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.uiState = null;

            /**
             * TracePacket androidCameraFrameEvent.
             * @member {perfetto.protos.IAndroidCameraFrameEvent|null|undefined} androidCameraFrameEvent
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.androidCameraFrameEvent = null;

            /**
             * TracePacket androidCameraSessionStats.
             * @member {perfetto.protos.IAndroidCameraSessionStats|null|undefined} androidCameraSessionStats
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.androidCameraSessionStats = null;

            /**
             * TracePacket translationTable.
             * @member {perfetto.protos.ITranslationTable|null|undefined} translationTable
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.translationTable = null;

            /**
             * TracePacket androidGameInterventionList.
             * @member {perfetto.protos.IAndroidGameInterventionList|null|undefined} androidGameInterventionList
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.androidGameInterventionList = null;

            /**
             * TracePacket statsdAtom.
             * @member {perfetto.protos.IStatsdAtom|null|undefined} statsdAtom
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.statsdAtom = null;

            /**
             * TracePacket androidSystemProperty.
             * @member {perfetto.protos.IAndroidSystemProperty|null|undefined} androidSystemProperty
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.androidSystemProperty = null;

            /**
             * TracePacket profiledFrameSymbols.
             * @member {perfetto.protos.IProfiledFrameSymbols|null|undefined} profiledFrameSymbols
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.profiledFrameSymbols = null;

            /**
             * TracePacket moduleSymbols.
             * @member {perfetto.protos.IModuleSymbols|null|undefined} moduleSymbols
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.moduleSymbols = null;

            /**
             * TracePacket deobfuscationMapping.
             * @member {perfetto.protos.IDeobfuscationMapping|null|undefined} deobfuscationMapping
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.deobfuscationMapping = null;

            /**
             * TracePacket trackDescriptor.
             * @member {perfetto.protos.ITrackDescriptor|null|undefined} trackDescriptor
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.trackDescriptor = null;

            /**
             * TracePacket processDescriptor.
             * @member {perfetto.protos.IProcessDescriptor|null|undefined} processDescriptor
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.processDescriptor = null;

            /**
             * TracePacket threadDescriptor.
             * @member {perfetto.protos.IThreadDescriptor|null|undefined} threadDescriptor
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.threadDescriptor = null;

            /**
             * TracePacket ftraceEvents.
             * @member {perfetto.protos.IFtraceEventBundle|null|undefined} ftraceEvents
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.ftraceEvents = null;

            /**
             * TracePacket synchronizationMarker.
             * @member {Uint8Array} synchronizationMarker
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.synchronizationMarker = $util.newBuffer([]);

            /**
             * TracePacket compressedPackets.
             * @member {Uint8Array} compressedPackets
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.compressedPackets = $util.newBuffer([]);

            /**
             * TracePacket extensionDescriptor.
             * @member {perfetto.protos.IExtensionDescriptor|null|undefined} extensionDescriptor
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.extensionDescriptor = null;

            /**
             * TracePacket forTesting.
             * @member {perfetto.protos.ITestEvent|null|undefined} forTesting
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.forTesting = null;

            /**
             * TracePacket trustedUid.
             * @member {number} trustedUid
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.trustedUid = 0;

            /**
             * TracePacket trustedPacketSequenceId.
             * @member {number} trustedPacketSequenceId
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.trustedPacketSequenceId = 0;

            /**
             * TracePacket trustedPid.
             * @member {number} trustedPid
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.trustedPid = 0;

            /**
             * TracePacket internedData.
             * @member {perfetto.protos.IInternedData|null|undefined} internedData
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.internedData = null;

            /**
             * TracePacket sequenceFlags.
             * @member {number} sequenceFlags
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.sequenceFlags = 0;

            /**
             * TracePacket incrementalStateCleared.
             * @member {boolean} incrementalStateCleared
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.incrementalStateCleared = false;

            /**
             * TracePacket tracePacketDefaults.
             * @member {perfetto.protos.ITracePacketDefaults|null|undefined} tracePacketDefaults
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.tracePacketDefaults = null;

            /**
             * TracePacket previousPacketDropped.
             * @member {boolean} previousPacketDropped
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.previousPacketDropped = false;

            /**
             * TracePacket firstPacketOnSequence.
             * @member {boolean} firstPacketOnSequence
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            TracePacket.prototype.firstPacketOnSequence = false;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * TracePacket data.
             * @member {"processTree"|"processStats"|"inodeFileMap"|"chromeEvents"|"clockSnapshot"|"sysStats"|"trackEvent"|"traceConfig"|"ftraceStats"|"traceStats"|"profilePacket"|"streamingAllocation"|"streamingFree"|"battery"|"powerRails"|"androidLog"|"systemInfo"|"trigger"|"packagesList"|"chromeBenchmarkMetadata"|"perfettoMetatrace"|"chromeMetadata"|"gpuCounterEvent"|"gpuRenderStageEvent"|"streamingProfilePacket"|"heapGraph"|"graphicsFrameEvent"|"vulkanMemoryEvent"|"gpuLog"|"vulkanApiEvent"|"perfSample"|"cpuInfo"|"smapsPacket"|"serviceEvent"|"initialDisplayState"|"gpuMemTotalEvent"|"memoryTrackerSnapshot"|"frameTimelineEvent"|"androidEnergyEstimationBreakdown"|"uiState"|"androidCameraFrameEvent"|"androidCameraSessionStats"|"translationTable"|"androidGameInterventionList"|"statsdAtom"|"androidSystemProperty"|"profiledFrameSymbols"|"moduleSymbols"|"deobfuscationMapping"|"trackDescriptor"|"processDescriptor"|"threadDescriptor"|"ftraceEvents"|"synchronizationMarker"|"compressedPackets"|"extensionDescriptor"|"forTesting"|undefined} data
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            Object.defineProperty(TracePacket.prototype, "data", {
                get: $util.oneOfGetter($oneOfFields = ["processTree", "processStats", "inodeFileMap", "chromeEvents", "clockSnapshot", "sysStats", "trackEvent", "traceConfig", "ftraceStats", "traceStats", "profilePacket", "streamingAllocation", "streamingFree", "battery", "powerRails", "androidLog", "systemInfo", "trigger", "packagesList", "chromeBenchmarkMetadata", "perfettoMetatrace", "chromeMetadata", "gpuCounterEvent", "gpuRenderStageEvent", "streamingProfilePacket", "heapGraph", "graphicsFrameEvent", "vulkanMemoryEvent", "gpuLog", "vulkanApiEvent", "perfSample", "cpuInfo", "smapsPacket", "serviceEvent", "initialDisplayState", "gpuMemTotalEvent", "memoryTrackerSnapshot", "frameTimelineEvent", "androidEnergyEstimationBreakdown", "uiState", "androidCameraFrameEvent", "androidCameraSessionStats", "translationTable", "androidGameInterventionList", "statsdAtom", "androidSystemProperty", "profiledFrameSymbols", "moduleSymbols", "deobfuscationMapping", "trackDescriptor", "processDescriptor", "threadDescriptor", "ftraceEvents", "synchronizationMarker", "compressedPackets", "extensionDescriptor", "forTesting"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * TracePacket optionalTrustedUid.
             * @member {"trustedUid"|undefined} optionalTrustedUid
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            Object.defineProperty(TracePacket.prototype, "optionalTrustedUid", {
                get: $util.oneOfGetter($oneOfFields = ["trustedUid"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * TracePacket optionalTrustedPacketSequenceId.
             * @member {"trustedPacketSequenceId"|undefined} optionalTrustedPacketSequenceId
             * @memberof perfetto.protos.TracePacket
             * @instance
             */
            Object.defineProperty(TracePacket.prototype, "optionalTrustedPacketSequenceId", {
                get: $util.oneOfGetter($oneOfFields = ["trustedPacketSequenceId"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new TracePacket instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TracePacket
             * @static
             * @param {perfetto.protos.ITracePacket=} [properties] Properties to set
             * @returns {perfetto.protos.TracePacket} TracePacket instance
             */
            TracePacket.create = function create(properties) {
                return new TracePacket(properties);
            };

            /**
             * Encodes the specified TracePacket message. Does not implicitly {@link perfetto.protos.TracePacket.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TracePacket
             * @static
             * @param {perfetto.protos.ITracePacket} m TracePacket message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TracePacket.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.ftraceEvents != null && Object.hasOwnProperty.call(m, "ftraceEvents"))
                    $root.perfetto.protos.FtraceEventBundle.encode(m.ftraceEvents, w.uint32(10).fork()).ldelim();
                if (m.processTree != null && Object.hasOwnProperty.call(m, "processTree"))
                    $root.perfetto.protos.ProcessTree.encode(m.processTree, w.uint32(18).fork()).ldelim();
                if (m.trustedUid != null && Object.hasOwnProperty.call(m, "trustedUid"))
                    w.uint32(24).int32(m.trustedUid);
                if (m.inodeFileMap != null && Object.hasOwnProperty.call(m, "inodeFileMap"))
                    $root.perfetto.protos.InodeFileMap.encode(m.inodeFileMap, w.uint32(34).fork()).ldelim();
                if (m.chromeEvents != null && Object.hasOwnProperty.call(m, "chromeEvents"))
                    $root.perfetto.protos.ChromeEventBundle.encode(m.chromeEvents, w.uint32(42).fork()).ldelim();
                if (m.clockSnapshot != null && Object.hasOwnProperty.call(m, "clockSnapshot"))
                    $root.perfetto.protos.ClockSnapshot.encode(m.clockSnapshot, w.uint32(50).fork()).ldelim();
                if (m.sysStats != null && Object.hasOwnProperty.call(m, "sysStats"))
                    $root.perfetto.protos.SysStats.encode(m.sysStats, w.uint32(58).fork()).ldelim();
                if (m.timestamp != null && Object.hasOwnProperty.call(m, "timestamp"))
                    w.uint32(64).uint64(m.timestamp);
                if (m.processStats != null && Object.hasOwnProperty.call(m, "processStats"))
                    $root.perfetto.protos.ProcessStats.encode(m.processStats, w.uint32(74).fork()).ldelim();
                if (m.trustedPacketSequenceId != null && Object.hasOwnProperty.call(m, "trustedPacketSequenceId"))
                    w.uint32(80).uint32(m.trustedPacketSequenceId);
                if (m.trackEvent != null && Object.hasOwnProperty.call(m, "trackEvent"))
                    $root.perfetto.protos.TrackEvent.encode(m.trackEvent, w.uint32(90).fork()).ldelim();
                if (m.internedData != null && Object.hasOwnProperty.call(m, "internedData"))
                    $root.perfetto.protos.InternedData.encode(m.internedData, w.uint32(98).fork()).ldelim();
                if (m.sequenceFlags != null && Object.hasOwnProperty.call(m, "sequenceFlags"))
                    w.uint32(104).uint32(m.sequenceFlags);
                if (m.traceConfig != null && Object.hasOwnProperty.call(m, "traceConfig"))
                    $root.perfetto.protos.TraceConfig.encode(m.traceConfig, w.uint32(266).fork()).ldelim();
                if (m.ftraceStats != null && Object.hasOwnProperty.call(m, "ftraceStats"))
                    $root.perfetto.protos.FtraceStats.encode(m.ftraceStats, w.uint32(274).fork()).ldelim();
                if (m.traceStats != null && Object.hasOwnProperty.call(m, "traceStats"))
                    $root.perfetto.protos.TraceStats.encode(m.traceStats, w.uint32(282).fork()).ldelim();
                if (m.synchronizationMarker != null && Object.hasOwnProperty.call(m, "synchronizationMarker"))
                    w.uint32(290).bytes(m.synchronizationMarker);
                if (m.profilePacket != null && Object.hasOwnProperty.call(m, "profilePacket"))
                    $root.perfetto.protos.ProfilePacket.encode(m.profilePacket, w.uint32(298).fork()).ldelim();
                if (m.battery != null && Object.hasOwnProperty.call(m, "battery"))
                    $root.perfetto.protos.BatteryCounters.encode(m.battery, w.uint32(306).fork()).ldelim();
                if (m.androidLog != null && Object.hasOwnProperty.call(m, "androidLog"))
                    $root.perfetto.protos.AndroidLogPacket.encode(m.androidLog, w.uint32(314).fork()).ldelim();
                if (m.powerRails != null && Object.hasOwnProperty.call(m, "powerRails"))
                    $root.perfetto.protos.PowerRails.encode(m.powerRails, w.uint32(322).fork()).ldelim();
                if (m.incrementalStateCleared != null && Object.hasOwnProperty.call(m, "incrementalStateCleared"))
                    w.uint32(328).bool(m.incrementalStateCleared);
                if (m.previousPacketDropped != null && Object.hasOwnProperty.call(m, "previousPacketDropped"))
                    w.uint32(336).bool(m.previousPacketDropped);
                if (m.processDescriptor != null && Object.hasOwnProperty.call(m, "processDescriptor"))
                    $root.perfetto.protos.ProcessDescriptor.encode(m.processDescriptor, w.uint32(346).fork()).ldelim();
                if (m.threadDescriptor != null && Object.hasOwnProperty.call(m, "threadDescriptor"))
                    $root.perfetto.protos.ThreadDescriptor.encode(m.threadDescriptor, w.uint32(354).fork()).ldelim();
                if (m.systemInfo != null && Object.hasOwnProperty.call(m, "systemInfo"))
                    $root.perfetto.protos.SystemInfo.encode(m.systemInfo, w.uint32(362).fork()).ldelim();
                if (m.trigger != null && Object.hasOwnProperty.call(m, "trigger"))
                    $root.perfetto.protos.Trigger.encode(m.trigger, w.uint32(370).fork()).ldelim();
                if (m.packagesList != null && Object.hasOwnProperty.call(m, "packagesList"))
                    $root.perfetto.protos.PackagesList.encode(m.packagesList, w.uint32(378).fork()).ldelim();
                if (m.chromeBenchmarkMetadata != null && Object.hasOwnProperty.call(m, "chromeBenchmarkMetadata"))
                    $root.perfetto.protos.ChromeBenchmarkMetadata.encode(m.chromeBenchmarkMetadata, w.uint32(386).fork()).ldelim();
                if (m.perfettoMetatrace != null && Object.hasOwnProperty.call(m, "perfettoMetatrace"))
                    $root.perfetto.protos.PerfettoMetatrace.encode(m.perfettoMetatrace, w.uint32(394).fork()).ldelim();
                if (m.compressedPackets != null && Object.hasOwnProperty.call(m, "compressedPackets"))
                    w.uint32(402).bytes(m.compressedPackets);
                if (m.chromeMetadata != null && Object.hasOwnProperty.call(m, "chromeMetadata"))
                    $root.perfetto.protos.ChromeMetadataPacket.encode(m.chromeMetadata, w.uint32(410).fork()).ldelim();
                if (m.gpuCounterEvent != null && Object.hasOwnProperty.call(m, "gpuCounterEvent"))
                    $root.perfetto.protos.GpuCounterEvent.encode(m.gpuCounterEvent, w.uint32(418).fork()).ldelim();
                if (m.gpuRenderStageEvent != null && Object.hasOwnProperty.call(m, "gpuRenderStageEvent"))
                    $root.perfetto.protos.GpuRenderStageEvent.encode(m.gpuRenderStageEvent, w.uint32(426).fork()).ldelim();
                if (m.streamingProfilePacket != null && Object.hasOwnProperty.call(m, "streamingProfilePacket"))
                    $root.perfetto.protos.StreamingProfilePacket.encode(m.streamingProfilePacket, w.uint32(434).fork()).ldelim();
                if (m.profiledFrameSymbols != null && Object.hasOwnProperty.call(m, "profiledFrameSymbols"))
                    $root.perfetto.protos.ProfiledFrameSymbols.encode(m.profiledFrameSymbols, w.uint32(442).fork()).ldelim();
                if (m.heapGraph != null && Object.hasOwnProperty.call(m, "heapGraph"))
                    $root.perfetto.protos.HeapGraph.encode(m.heapGraph, w.uint32(450).fork()).ldelim();
                if (m.graphicsFrameEvent != null && Object.hasOwnProperty.call(m, "graphicsFrameEvent"))
                    $root.perfetto.protos.GraphicsFrameEvent.encode(m.graphicsFrameEvent, w.uint32(458).fork()).ldelim();
                if (m.timestampClockId != null && Object.hasOwnProperty.call(m, "timestampClockId"))
                    w.uint32(464).uint32(m.timestampClockId);
                if (m.tracePacketDefaults != null && Object.hasOwnProperty.call(m, "tracePacketDefaults"))
                    $root.perfetto.protos.TracePacketDefaults.encode(m.tracePacketDefaults, w.uint32(474).fork()).ldelim();
                if (m.trackDescriptor != null && Object.hasOwnProperty.call(m, "trackDescriptor"))
                    $root.perfetto.protos.TrackDescriptor.encode(m.trackDescriptor, w.uint32(482).fork()).ldelim();
                if (m.moduleSymbols != null && Object.hasOwnProperty.call(m, "moduleSymbols"))
                    $root.perfetto.protos.ModuleSymbols.encode(m.moduleSymbols, w.uint32(490).fork()).ldelim();
                if (m.vulkanMemoryEvent != null && Object.hasOwnProperty.call(m, "vulkanMemoryEvent"))
                    $root.perfetto.protos.VulkanMemoryEvent.encode(m.vulkanMemoryEvent, w.uint32(498).fork()).ldelim();
                if (m.gpuLog != null && Object.hasOwnProperty.call(m, "gpuLog"))
                    $root.perfetto.protos.GpuLog.encode(m.gpuLog, w.uint32(506).fork()).ldelim();
                if (m.deobfuscationMapping != null && Object.hasOwnProperty.call(m, "deobfuscationMapping"))
                    $root.perfetto.protos.DeobfuscationMapping.encode(m.deobfuscationMapping, w.uint32(514).fork()).ldelim();
                if (m.vulkanApiEvent != null && Object.hasOwnProperty.call(m, "vulkanApiEvent"))
                    $root.perfetto.protos.VulkanApiEvent.encode(m.vulkanApiEvent, w.uint32(522).fork()).ldelim();
                if (m.perfSample != null && Object.hasOwnProperty.call(m, "perfSample"))
                    $root.perfetto.protos.PerfSample.encode(m.perfSample, w.uint32(530).fork()).ldelim();
                if (m.cpuInfo != null && Object.hasOwnProperty.call(m, "cpuInfo"))
                    $root.perfetto.protos.CpuInfo.encode(m.cpuInfo, w.uint32(538).fork()).ldelim();
                if (m.smapsPacket != null && Object.hasOwnProperty.call(m, "smapsPacket"))
                    $root.perfetto.protos.SmapsPacket.encode(m.smapsPacket, w.uint32(546).fork()).ldelim();
                if (m.serviceEvent != null && Object.hasOwnProperty.call(m, "serviceEvent"))
                    $root.perfetto.protos.TracingServiceEvent.encode(m.serviceEvent, w.uint32(554).fork()).ldelim();
                if (m.initialDisplayState != null && Object.hasOwnProperty.call(m, "initialDisplayState"))
                    $root.perfetto.protos.InitialDisplayState.encode(m.initialDisplayState, w.uint32(562).fork()).ldelim();
                if (m.gpuMemTotalEvent != null && Object.hasOwnProperty.call(m, "gpuMemTotalEvent"))
                    $root.perfetto.protos.GpuMemTotalEvent.encode(m.gpuMemTotalEvent, w.uint32(570).fork()).ldelim();
                if (m.extensionDescriptor != null && Object.hasOwnProperty.call(m, "extensionDescriptor"))
                    $root.perfetto.protos.ExtensionDescriptor.encode(m.extensionDescriptor, w.uint32(578).fork()).ldelim();
                if (m.memoryTrackerSnapshot != null && Object.hasOwnProperty.call(m, "memoryTrackerSnapshot"))
                    $root.perfetto.protos.MemoryTrackerSnapshot.encode(m.memoryTrackerSnapshot, w.uint32(586).fork()).ldelim();
                if (m.streamingAllocation != null && Object.hasOwnProperty.call(m, "streamingAllocation"))
                    $root.perfetto.protos.StreamingAllocation.encode(m.streamingAllocation, w.uint32(594).fork()).ldelim();
                if (m.streamingFree != null && Object.hasOwnProperty.call(m, "streamingFree"))
                    $root.perfetto.protos.StreamingFree.encode(m.streamingFree, w.uint32(602).fork()).ldelim();
                if (m.frameTimelineEvent != null && Object.hasOwnProperty.call(m, "frameTimelineEvent"))
                    $root.perfetto.protos.FrameTimelineEvent.encode(m.frameTimelineEvent, w.uint32(610).fork()).ldelim();
                if (m.androidEnergyEstimationBreakdown != null && Object.hasOwnProperty.call(m, "androidEnergyEstimationBreakdown"))
                    $root.perfetto.protos.AndroidEnergyEstimationBreakdown.encode(m.androidEnergyEstimationBreakdown, w.uint32(618).fork()).ldelim();
                if (m.uiState != null && Object.hasOwnProperty.call(m, "uiState"))
                    $root.perfetto.protos.UiState.encode(m.uiState, w.uint32(626).fork()).ldelim();
                if (m.trustedPid != null && Object.hasOwnProperty.call(m, "trustedPid"))
                    w.uint32(632).int32(m.trustedPid);
                if (m.androidCameraFrameEvent != null && Object.hasOwnProperty.call(m, "androidCameraFrameEvent"))
                    $root.perfetto.protos.AndroidCameraFrameEvent.encode(m.androidCameraFrameEvent, w.uint32(642).fork()).ldelim();
                if (m.androidCameraSessionStats != null && Object.hasOwnProperty.call(m, "androidCameraSessionStats"))
                    $root.perfetto.protos.AndroidCameraSessionStats.encode(m.androidCameraSessionStats, w.uint32(650).fork()).ldelim();
                if (m.translationTable != null && Object.hasOwnProperty.call(m, "translationTable"))
                    $root.perfetto.protos.TranslationTable.encode(m.translationTable, w.uint32(658).fork()).ldelim();
                if (m.androidGameInterventionList != null && Object.hasOwnProperty.call(m, "androidGameInterventionList"))
                    $root.perfetto.protos.AndroidGameInterventionList.encode(m.androidGameInterventionList, w.uint32(666).fork()).ldelim();
                if (m.statsdAtom != null && Object.hasOwnProperty.call(m, "statsdAtom"))
                    $root.perfetto.protos.StatsdAtom.encode(m.statsdAtom, w.uint32(674).fork()).ldelim();
                if (m.androidSystemProperty != null && Object.hasOwnProperty.call(m, "androidSystemProperty"))
                    $root.perfetto.protos.AndroidSystemProperty.encode(m.androidSystemProperty, w.uint32(690).fork()).ldelim();
                if (m.firstPacketOnSequence != null && Object.hasOwnProperty.call(m, "firstPacketOnSequence"))
                    w.uint32(696).bool(m.firstPacketOnSequence);
                if (m.forTesting != null && Object.hasOwnProperty.call(m, "forTesting"))
                    $root.perfetto.protos.TestEvent.encode(m.forTesting, w.uint32(7202).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified TracePacket message, length delimited. Does not implicitly {@link perfetto.protos.TracePacket.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TracePacket
             * @static
             * @param {perfetto.protos.ITracePacket} message TracePacket message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TracePacket.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TracePacket message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TracePacket
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TracePacket} TracePacket
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TracePacket.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TracePacket();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 8:
                        m.timestamp = r.uint64();
                        break;
                    case 58:
                        m.timestampClockId = r.uint32();
                        break;
                    case 2:
                        m.processTree = $root.perfetto.protos.ProcessTree.decode(r, r.uint32());
                        break;
                    case 9:
                        m.processStats = $root.perfetto.protos.ProcessStats.decode(r, r.uint32());
                        break;
                    case 4:
                        m.inodeFileMap = $root.perfetto.protos.InodeFileMap.decode(r, r.uint32());
                        break;
                    case 5:
                        m.chromeEvents = $root.perfetto.protos.ChromeEventBundle.decode(r, r.uint32());
                        break;
                    case 6:
                        m.clockSnapshot = $root.perfetto.protos.ClockSnapshot.decode(r, r.uint32());
                        break;
                    case 7:
                        m.sysStats = $root.perfetto.protos.SysStats.decode(r, r.uint32());
                        break;
                    case 11:
                        m.trackEvent = $root.perfetto.protos.TrackEvent.decode(r, r.uint32());
                        break;
                    case 33:
                        m.traceConfig = $root.perfetto.protos.TraceConfig.decode(r, r.uint32());
                        break;
                    case 34:
                        m.ftraceStats = $root.perfetto.protos.FtraceStats.decode(r, r.uint32());
                        break;
                    case 35:
                        m.traceStats = $root.perfetto.protos.TraceStats.decode(r, r.uint32());
                        break;
                    case 37:
                        m.profilePacket = $root.perfetto.protos.ProfilePacket.decode(r, r.uint32());
                        break;
                    case 74:
                        m.streamingAllocation = $root.perfetto.protos.StreamingAllocation.decode(r, r.uint32());
                        break;
                    case 75:
                        m.streamingFree = $root.perfetto.protos.StreamingFree.decode(r, r.uint32());
                        break;
                    case 38:
                        m.battery = $root.perfetto.protos.BatteryCounters.decode(r, r.uint32());
                        break;
                    case 40:
                        m.powerRails = $root.perfetto.protos.PowerRails.decode(r, r.uint32());
                        break;
                    case 39:
                        m.androidLog = $root.perfetto.protos.AndroidLogPacket.decode(r, r.uint32());
                        break;
                    case 45:
                        m.systemInfo = $root.perfetto.protos.SystemInfo.decode(r, r.uint32());
                        break;
                    case 46:
                        m.trigger = $root.perfetto.protos.Trigger.decode(r, r.uint32());
                        break;
                    case 47:
                        m.packagesList = $root.perfetto.protos.PackagesList.decode(r, r.uint32());
                        break;
                    case 48:
                        m.chromeBenchmarkMetadata = $root.perfetto.protos.ChromeBenchmarkMetadata.decode(r, r.uint32());
                        break;
                    case 49:
                        m.perfettoMetatrace = $root.perfetto.protos.PerfettoMetatrace.decode(r, r.uint32());
                        break;
                    case 51:
                        m.chromeMetadata = $root.perfetto.protos.ChromeMetadataPacket.decode(r, r.uint32());
                        break;
                    case 52:
                        m.gpuCounterEvent = $root.perfetto.protos.GpuCounterEvent.decode(r, r.uint32());
                        break;
                    case 53:
                        m.gpuRenderStageEvent = $root.perfetto.protos.GpuRenderStageEvent.decode(r, r.uint32());
                        break;
                    case 54:
                        m.streamingProfilePacket = $root.perfetto.protos.StreamingProfilePacket.decode(r, r.uint32());
                        break;
                    case 56:
                        m.heapGraph = $root.perfetto.protos.HeapGraph.decode(r, r.uint32());
                        break;
                    case 57:
                        m.graphicsFrameEvent = $root.perfetto.protos.GraphicsFrameEvent.decode(r, r.uint32());
                        break;
                    case 62:
                        m.vulkanMemoryEvent = $root.perfetto.protos.VulkanMemoryEvent.decode(r, r.uint32());
                        break;
                    case 63:
                        m.gpuLog = $root.perfetto.protos.GpuLog.decode(r, r.uint32());
                        break;
                    case 65:
                        m.vulkanApiEvent = $root.perfetto.protos.VulkanApiEvent.decode(r, r.uint32());
                        break;
                    case 66:
                        m.perfSample = $root.perfetto.protos.PerfSample.decode(r, r.uint32());
                        break;
                    case 67:
                        m.cpuInfo = $root.perfetto.protos.CpuInfo.decode(r, r.uint32());
                        break;
                    case 68:
                        m.smapsPacket = $root.perfetto.protos.SmapsPacket.decode(r, r.uint32());
                        break;
                    case 69:
                        m.serviceEvent = $root.perfetto.protos.TracingServiceEvent.decode(r, r.uint32());
                        break;
                    case 70:
                        m.initialDisplayState = $root.perfetto.protos.InitialDisplayState.decode(r, r.uint32());
                        break;
                    case 71:
                        m.gpuMemTotalEvent = $root.perfetto.protos.GpuMemTotalEvent.decode(r, r.uint32());
                        break;
                    case 73:
                        m.memoryTrackerSnapshot = $root.perfetto.protos.MemoryTrackerSnapshot.decode(r, r.uint32());
                        break;
                    case 76:
                        m.frameTimelineEvent = $root.perfetto.protos.FrameTimelineEvent.decode(r, r.uint32());
                        break;
                    case 77:
                        m.androidEnergyEstimationBreakdown = $root.perfetto.protos.AndroidEnergyEstimationBreakdown.decode(r, r.uint32());
                        break;
                    case 78:
                        m.uiState = $root.perfetto.protos.UiState.decode(r, r.uint32());
                        break;
                    case 80:
                        m.androidCameraFrameEvent = $root.perfetto.protos.AndroidCameraFrameEvent.decode(r, r.uint32());
                        break;
                    case 81:
                        m.androidCameraSessionStats = $root.perfetto.protos.AndroidCameraSessionStats.decode(r, r.uint32());
                        break;
                    case 82:
                        m.translationTable = $root.perfetto.protos.TranslationTable.decode(r, r.uint32());
                        break;
                    case 83:
                        m.androidGameInterventionList = $root.perfetto.protos.AndroidGameInterventionList.decode(r, r.uint32());
                        break;
                    case 84:
                        m.statsdAtom = $root.perfetto.protos.StatsdAtom.decode(r, r.uint32());
                        break;
                    case 86:
                        m.androidSystemProperty = $root.perfetto.protos.AndroidSystemProperty.decode(r, r.uint32());
                        break;
                    case 55:
                        m.profiledFrameSymbols = $root.perfetto.protos.ProfiledFrameSymbols.decode(r, r.uint32());
                        break;
                    case 61:
                        m.moduleSymbols = $root.perfetto.protos.ModuleSymbols.decode(r, r.uint32());
                        break;
                    case 64:
                        m.deobfuscationMapping = $root.perfetto.protos.DeobfuscationMapping.decode(r, r.uint32());
                        break;
                    case 60:
                        m.trackDescriptor = $root.perfetto.protos.TrackDescriptor.decode(r, r.uint32());
                        break;
                    case 43:
                        m.processDescriptor = $root.perfetto.protos.ProcessDescriptor.decode(r, r.uint32());
                        break;
                    case 44:
                        m.threadDescriptor = $root.perfetto.protos.ThreadDescriptor.decode(r, r.uint32());
                        break;
                    case 1:
                        m.ftraceEvents = $root.perfetto.protos.FtraceEventBundle.decode(r, r.uint32());
                        break;
                    case 36:
                        m.synchronizationMarker = r.bytes();
                        break;
                    case 50:
                        m.compressedPackets = r.bytes();
                        break;
                    case 72:
                        m.extensionDescriptor = $root.perfetto.protos.ExtensionDescriptor.decode(r, r.uint32());
                        break;
                    case 900:
                        m.forTesting = $root.perfetto.protos.TestEvent.decode(r, r.uint32());
                        break;
                    case 3:
                        m.trustedUid = r.int32();
                        break;
                    case 10:
                        m.trustedPacketSequenceId = r.uint32();
                        break;
                    case 79:
                        m.trustedPid = r.int32();
                        break;
                    case 12:
                        m.internedData = $root.perfetto.protos.InternedData.decode(r, r.uint32());
                        break;
                    case 13:
                        m.sequenceFlags = r.uint32();
                        break;
                    case 41:
                        m.incrementalStateCleared = r.bool();
                        break;
                    case 59:
                        m.tracePacketDefaults = $root.perfetto.protos.TracePacketDefaults.decode(r, r.uint32());
                        break;
                    case 42:
                        m.previousPacketDropped = r.bool();
                        break;
                    case 87:
                        m.firstPacketOnSequence = r.bool();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TracePacket message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TracePacket
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TracePacket} TracePacket
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TracePacket.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TracePacket message.
             * @function verify
             * @memberof perfetto.protos.TracePacket
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TracePacket.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                var p = {};
                if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                    if (!$util.isInteger(m.timestamp) && !(m.timestamp && $util.isInteger(m.timestamp.low) && $util.isInteger(m.timestamp.high)))
                        return "timestamp: integer|Long expected";
                }
                if (m.timestampClockId != null && m.hasOwnProperty("timestampClockId")) {
                    if (!$util.isInteger(m.timestampClockId))
                        return "timestampClockId: integer expected";
                }
                if (m.processTree != null && m.hasOwnProperty("processTree")) {
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.ProcessTree.verify(m.processTree);
                        if (e)
                            return "processTree." + e;
                    }
                }
                if (m.processStats != null && m.hasOwnProperty("processStats")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.ProcessStats.verify(m.processStats);
                        if (e)
                            return "processStats." + e;
                    }
                }
                if (m.inodeFileMap != null && m.hasOwnProperty("inodeFileMap")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.InodeFileMap.verify(m.inodeFileMap);
                        if (e)
                            return "inodeFileMap." + e;
                    }
                }
                if (m.chromeEvents != null && m.hasOwnProperty("chromeEvents")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.ChromeEventBundle.verify(m.chromeEvents);
                        if (e)
                            return "chromeEvents." + e;
                    }
                }
                if (m.clockSnapshot != null && m.hasOwnProperty("clockSnapshot")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.ClockSnapshot.verify(m.clockSnapshot);
                        if (e)
                            return "clockSnapshot." + e;
                    }
                }
                if (m.sysStats != null && m.hasOwnProperty("sysStats")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.SysStats.verify(m.sysStats);
                        if (e)
                            return "sysStats." + e;
                    }
                }
                if (m.trackEvent != null && m.hasOwnProperty("trackEvent")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.TrackEvent.verify(m.trackEvent);
                        if (e)
                            return "trackEvent." + e;
                    }
                }
                if (m.traceConfig != null && m.hasOwnProperty("traceConfig")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.TraceConfig.verify(m.traceConfig);
                        if (e)
                            return "traceConfig." + e;
                    }
                }
                if (m.ftraceStats != null && m.hasOwnProperty("ftraceStats")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.FtraceStats.verify(m.ftraceStats);
                        if (e)
                            return "ftraceStats." + e;
                    }
                }
                if (m.traceStats != null && m.hasOwnProperty("traceStats")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.TraceStats.verify(m.traceStats);
                        if (e)
                            return "traceStats." + e;
                    }
                }
                if (m.profilePacket != null && m.hasOwnProperty("profilePacket")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.ProfilePacket.verify(m.profilePacket);
                        if (e)
                            return "profilePacket." + e;
                    }
                }
                if (m.streamingAllocation != null && m.hasOwnProperty("streamingAllocation")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.StreamingAllocation.verify(m.streamingAllocation);
                        if (e)
                            return "streamingAllocation." + e;
                    }
                }
                if (m.streamingFree != null && m.hasOwnProperty("streamingFree")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.StreamingFree.verify(m.streamingFree);
                        if (e)
                            return "streamingFree." + e;
                    }
                }
                if (m.battery != null && m.hasOwnProperty("battery")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.BatteryCounters.verify(m.battery);
                        if (e)
                            return "battery." + e;
                    }
                }
                if (m.powerRails != null && m.hasOwnProperty("powerRails")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.PowerRails.verify(m.powerRails);
                        if (e)
                            return "powerRails." + e;
                    }
                }
                if (m.androidLog != null && m.hasOwnProperty("androidLog")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.AndroidLogPacket.verify(m.androidLog);
                        if (e)
                            return "androidLog." + e;
                    }
                }
                if (m.systemInfo != null && m.hasOwnProperty("systemInfo")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.SystemInfo.verify(m.systemInfo);
                        if (e)
                            return "systemInfo." + e;
                    }
                }
                if (m.trigger != null && m.hasOwnProperty("trigger")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.Trigger.verify(m.trigger);
                        if (e)
                            return "trigger." + e;
                    }
                }
                if (m.packagesList != null && m.hasOwnProperty("packagesList")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.PackagesList.verify(m.packagesList);
                        if (e)
                            return "packagesList." + e;
                    }
                }
                if (m.chromeBenchmarkMetadata != null && m.hasOwnProperty("chromeBenchmarkMetadata")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.ChromeBenchmarkMetadata.verify(m.chromeBenchmarkMetadata);
                        if (e)
                            return "chromeBenchmarkMetadata." + e;
                    }
                }
                if (m.perfettoMetatrace != null && m.hasOwnProperty("perfettoMetatrace")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.PerfettoMetatrace.verify(m.perfettoMetatrace);
                        if (e)
                            return "perfettoMetatrace." + e;
                    }
                }
                if (m.chromeMetadata != null && m.hasOwnProperty("chromeMetadata")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.ChromeMetadataPacket.verify(m.chromeMetadata);
                        if (e)
                            return "chromeMetadata." + e;
                    }
                }
                if (m.gpuCounterEvent != null && m.hasOwnProperty("gpuCounterEvent")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.GpuCounterEvent.verify(m.gpuCounterEvent);
                        if (e)
                            return "gpuCounterEvent." + e;
                    }
                }
                if (m.gpuRenderStageEvent != null && m.hasOwnProperty("gpuRenderStageEvent")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.GpuRenderStageEvent.verify(m.gpuRenderStageEvent);
                        if (e)
                            return "gpuRenderStageEvent." + e;
                    }
                }
                if (m.streamingProfilePacket != null && m.hasOwnProperty("streamingProfilePacket")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.StreamingProfilePacket.verify(m.streamingProfilePacket);
                        if (e)
                            return "streamingProfilePacket." + e;
                    }
                }
                if (m.heapGraph != null && m.hasOwnProperty("heapGraph")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.HeapGraph.verify(m.heapGraph);
                        if (e)
                            return "heapGraph." + e;
                    }
                }
                if (m.graphicsFrameEvent != null && m.hasOwnProperty("graphicsFrameEvent")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.GraphicsFrameEvent.verify(m.graphicsFrameEvent);
                        if (e)
                            return "graphicsFrameEvent." + e;
                    }
                }
                if (m.vulkanMemoryEvent != null && m.hasOwnProperty("vulkanMemoryEvent")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.VulkanMemoryEvent.verify(m.vulkanMemoryEvent);
                        if (e)
                            return "vulkanMemoryEvent." + e;
                    }
                }
                if (m.gpuLog != null && m.hasOwnProperty("gpuLog")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.GpuLog.verify(m.gpuLog);
                        if (e)
                            return "gpuLog." + e;
                    }
                }
                if (m.vulkanApiEvent != null && m.hasOwnProperty("vulkanApiEvent")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.VulkanApiEvent.verify(m.vulkanApiEvent);
                        if (e)
                            return "vulkanApiEvent." + e;
                    }
                }
                if (m.perfSample != null && m.hasOwnProperty("perfSample")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.PerfSample.verify(m.perfSample);
                        if (e)
                            return "perfSample." + e;
                    }
                }
                if (m.cpuInfo != null && m.hasOwnProperty("cpuInfo")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.CpuInfo.verify(m.cpuInfo);
                        if (e)
                            return "cpuInfo." + e;
                    }
                }
                if (m.smapsPacket != null && m.hasOwnProperty("smapsPacket")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.SmapsPacket.verify(m.smapsPacket);
                        if (e)
                            return "smapsPacket." + e;
                    }
                }
                if (m.serviceEvent != null && m.hasOwnProperty("serviceEvent")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.TracingServiceEvent.verify(m.serviceEvent);
                        if (e)
                            return "serviceEvent." + e;
                    }
                }
                if (m.initialDisplayState != null && m.hasOwnProperty("initialDisplayState")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.InitialDisplayState.verify(m.initialDisplayState);
                        if (e)
                            return "initialDisplayState." + e;
                    }
                }
                if (m.gpuMemTotalEvent != null && m.hasOwnProperty("gpuMemTotalEvent")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.GpuMemTotalEvent.verify(m.gpuMemTotalEvent);
                        if (e)
                            return "gpuMemTotalEvent." + e;
                    }
                }
                if (m.memoryTrackerSnapshot != null && m.hasOwnProperty("memoryTrackerSnapshot")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.MemoryTrackerSnapshot.verify(m.memoryTrackerSnapshot);
                        if (e)
                            return "memoryTrackerSnapshot." + e;
                    }
                }
                if (m.frameTimelineEvent != null && m.hasOwnProperty("frameTimelineEvent")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.FrameTimelineEvent.verify(m.frameTimelineEvent);
                        if (e)
                            return "frameTimelineEvent." + e;
                    }
                }
                if (m.androidEnergyEstimationBreakdown != null && m.hasOwnProperty("androidEnergyEstimationBreakdown")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.AndroidEnergyEstimationBreakdown.verify(m.androidEnergyEstimationBreakdown);
                        if (e)
                            return "androidEnergyEstimationBreakdown." + e;
                    }
                }
                if (m.uiState != null && m.hasOwnProperty("uiState")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.UiState.verify(m.uiState);
                        if (e)
                            return "uiState." + e;
                    }
                }
                if (m.androidCameraFrameEvent != null && m.hasOwnProperty("androidCameraFrameEvent")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.AndroidCameraFrameEvent.verify(m.androidCameraFrameEvent);
                        if (e)
                            return "androidCameraFrameEvent." + e;
                    }
                }
                if (m.androidCameraSessionStats != null && m.hasOwnProperty("androidCameraSessionStats")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.AndroidCameraSessionStats.verify(m.androidCameraSessionStats);
                        if (e)
                            return "androidCameraSessionStats." + e;
                    }
                }
                if (m.translationTable != null && m.hasOwnProperty("translationTable")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.TranslationTable.verify(m.translationTable);
                        if (e)
                            return "translationTable." + e;
                    }
                }
                if (m.androidGameInterventionList != null && m.hasOwnProperty("androidGameInterventionList")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.AndroidGameInterventionList.verify(m.androidGameInterventionList);
                        if (e)
                            return "androidGameInterventionList." + e;
                    }
                }
                if (m.statsdAtom != null && m.hasOwnProperty("statsdAtom")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.StatsdAtom.verify(m.statsdAtom);
                        if (e)
                            return "statsdAtom." + e;
                    }
                }
                if (m.androidSystemProperty != null && m.hasOwnProperty("androidSystemProperty")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.AndroidSystemProperty.verify(m.androidSystemProperty);
                        if (e)
                            return "androidSystemProperty." + e;
                    }
                }
                if (m.profiledFrameSymbols != null && m.hasOwnProperty("profiledFrameSymbols")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.ProfiledFrameSymbols.verify(m.profiledFrameSymbols);
                        if (e)
                            return "profiledFrameSymbols." + e;
                    }
                }
                if (m.moduleSymbols != null && m.hasOwnProperty("moduleSymbols")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.ModuleSymbols.verify(m.moduleSymbols);
                        if (e)
                            return "moduleSymbols." + e;
                    }
                }
                if (m.deobfuscationMapping != null && m.hasOwnProperty("deobfuscationMapping")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.DeobfuscationMapping.verify(m.deobfuscationMapping);
                        if (e)
                            return "deobfuscationMapping." + e;
                    }
                }
                if (m.trackDescriptor != null && m.hasOwnProperty("trackDescriptor")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.TrackDescriptor.verify(m.trackDescriptor);
                        if (e)
                            return "trackDescriptor." + e;
                    }
                }
                if (m.processDescriptor != null && m.hasOwnProperty("processDescriptor")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.ProcessDescriptor.verify(m.processDescriptor);
                        if (e)
                            return "processDescriptor." + e;
                    }
                }
                if (m.threadDescriptor != null && m.hasOwnProperty("threadDescriptor")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.ThreadDescriptor.verify(m.threadDescriptor);
                        if (e)
                            return "threadDescriptor." + e;
                    }
                }
                if (m.ftraceEvents != null && m.hasOwnProperty("ftraceEvents")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.FtraceEventBundle.verify(m.ftraceEvents);
                        if (e)
                            return "ftraceEvents." + e;
                    }
                }
                if (m.synchronizationMarker != null && m.hasOwnProperty("synchronizationMarker")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    if (!(m.synchronizationMarker && typeof m.synchronizationMarker.length === "number" || $util.isString(m.synchronizationMarker)))
                        return "synchronizationMarker: buffer expected";
                }
                if (m.compressedPackets != null && m.hasOwnProperty("compressedPackets")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    if (!(m.compressedPackets && typeof m.compressedPackets.length === "number" || $util.isString(m.compressedPackets)))
                        return "compressedPackets: buffer expected";
                }
                if (m.extensionDescriptor != null && m.hasOwnProperty("extensionDescriptor")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.ExtensionDescriptor.verify(m.extensionDescriptor);
                        if (e)
                            return "extensionDescriptor." + e;
                    }
                }
                if (m.forTesting != null && m.hasOwnProperty("forTesting")) {
                    if (p.data === 1)
                        return "data: multiple values";
                    p.data = 1;
                    {
                        var e = $root.perfetto.protos.TestEvent.verify(m.forTesting);
                        if (e)
                            return "forTesting." + e;
                    }
                }
                if (m.trustedUid != null && m.hasOwnProperty("trustedUid")) {
                    p.optionalTrustedUid = 1;
                    if (!$util.isInteger(m.trustedUid))
                        return "trustedUid: integer expected";
                }
                if (m.trustedPacketSequenceId != null && m.hasOwnProperty("trustedPacketSequenceId")) {
                    p.optionalTrustedPacketSequenceId = 1;
                    if (!$util.isInteger(m.trustedPacketSequenceId))
                        return "trustedPacketSequenceId: integer expected";
                }
                if (m.trustedPid != null && m.hasOwnProperty("trustedPid")) {
                    if (!$util.isInteger(m.trustedPid))
                        return "trustedPid: integer expected";
                }
                if (m.internedData != null && m.hasOwnProperty("internedData")) {
                    {
                        var e = $root.perfetto.protos.InternedData.verify(m.internedData);
                        if (e)
                            return "internedData." + e;
                    }
                }
                if (m.sequenceFlags != null && m.hasOwnProperty("sequenceFlags")) {
                    if (!$util.isInteger(m.sequenceFlags))
                        return "sequenceFlags: integer expected";
                }
                if (m.incrementalStateCleared != null && m.hasOwnProperty("incrementalStateCleared")) {
                    if (typeof m.incrementalStateCleared !== "boolean")
                        return "incrementalStateCleared: boolean expected";
                }
                if (m.tracePacketDefaults != null && m.hasOwnProperty("tracePacketDefaults")) {
                    {
                        var e = $root.perfetto.protos.TracePacketDefaults.verify(m.tracePacketDefaults);
                        if (e)
                            return "tracePacketDefaults." + e;
                    }
                }
                if (m.previousPacketDropped != null && m.hasOwnProperty("previousPacketDropped")) {
                    if (typeof m.previousPacketDropped !== "boolean")
                        return "previousPacketDropped: boolean expected";
                }
                if (m.firstPacketOnSequence != null && m.hasOwnProperty("firstPacketOnSequence")) {
                    if (typeof m.firstPacketOnSequence !== "boolean")
                        return "firstPacketOnSequence: boolean expected";
                }
                return null;
            };

            /**
             * Creates a TracePacket message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TracePacket
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TracePacket} TracePacket
             */
            TracePacket.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TracePacket)
                    return d;
                var m = new $root.perfetto.protos.TracePacket();
                if (d.timestamp != null) {
                    if ($util.Long)
                        (m.timestamp = $util.Long.fromValue(d.timestamp)).unsigned = true;
                    else if (typeof d.timestamp === "string")
                        m.timestamp = parseInt(d.timestamp, 10);
                    else if (typeof d.timestamp === "number")
                        m.timestamp = d.timestamp;
                    else if (typeof d.timestamp === "object")
                        m.timestamp = new $util.LongBits(d.timestamp.low >>> 0, d.timestamp.high >>> 0).toNumber(true);
                }
                if (d.timestampClockId != null) {
                    m.timestampClockId = d.timestampClockId >>> 0;
                }
                if (d.processTree != null) {
                    if (typeof d.processTree !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.processTree: object expected");
                    m.processTree = $root.perfetto.protos.ProcessTree.fromObject(d.processTree);
                }
                if (d.processStats != null) {
                    if (typeof d.processStats !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.processStats: object expected");
                    m.processStats = $root.perfetto.protos.ProcessStats.fromObject(d.processStats);
                }
                if (d.inodeFileMap != null) {
                    if (typeof d.inodeFileMap !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.inodeFileMap: object expected");
                    m.inodeFileMap = $root.perfetto.protos.InodeFileMap.fromObject(d.inodeFileMap);
                }
                if (d.chromeEvents != null) {
                    if (typeof d.chromeEvents !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.chromeEvents: object expected");
                    m.chromeEvents = $root.perfetto.protos.ChromeEventBundle.fromObject(d.chromeEvents);
                }
                if (d.clockSnapshot != null) {
                    if (typeof d.clockSnapshot !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.clockSnapshot: object expected");
                    m.clockSnapshot = $root.perfetto.protos.ClockSnapshot.fromObject(d.clockSnapshot);
                }
                if (d.sysStats != null) {
                    if (typeof d.sysStats !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.sysStats: object expected");
                    m.sysStats = $root.perfetto.protos.SysStats.fromObject(d.sysStats);
                }
                if (d.trackEvent != null) {
                    if (typeof d.trackEvent !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.trackEvent: object expected");
                    m.trackEvent = $root.perfetto.protos.TrackEvent.fromObject(d.trackEvent);
                }
                if (d.traceConfig != null) {
                    if (typeof d.traceConfig !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.traceConfig: object expected");
                    m.traceConfig = $root.perfetto.protos.TraceConfig.fromObject(d.traceConfig);
                }
                if (d.ftraceStats != null) {
                    if (typeof d.ftraceStats !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.ftraceStats: object expected");
                    m.ftraceStats = $root.perfetto.protos.FtraceStats.fromObject(d.ftraceStats);
                }
                if (d.traceStats != null) {
                    if (typeof d.traceStats !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.traceStats: object expected");
                    m.traceStats = $root.perfetto.protos.TraceStats.fromObject(d.traceStats);
                }
                if (d.profilePacket != null) {
                    if (typeof d.profilePacket !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.profilePacket: object expected");
                    m.profilePacket = $root.perfetto.protos.ProfilePacket.fromObject(d.profilePacket);
                }
                if (d.streamingAllocation != null) {
                    if (typeof d.streamingAllocation !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.streamingAllocation: object expected");
                    m.streamingAllocation = $root.perfetto.protos.StreamingAllocation.fromObject(d.streamingAllocation);
                }
                if (d.streamingFree != null) {
                    if (typeof d.streamingFree !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.streamingFree: object expected");
                    m.streamingFree = $root.perfetto.protos.StreamingFree.fromObject(d.streamingFree);
                }
                if (d.battery != null) {
                    if (typeof d.battery !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.battery: object expected");
                    m.battery = $root.perfetto.protos.BatteryCounters.fromObject(d.battery);
                }
                if (d.powerRails != null) {
                    if (typeof d.powerRails !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.powerRails: object expected");
                    m.powerRails = $root.perfetto.protos.PowerRails.fromObject(d.powerRails);
                }
                if (d.androidLog != null) {
                    if (typeof d.androidLog !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.androidLog: object expected");
                    m.androidLog = $root.perfetto.protos.AndroidLogPacket.fromObject(d.androidLog);
                }
                if (d.systemInfo != null) {
                    if (typeof d.systemInfo !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.systemInfo: object expected");
                    m.systemInfo = $root.perfetto.protos.SystemInfo.fromObject(d.systemInfo);
                }
                if (d.trigger != null) {
                    if (typeof d.trigger !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.trigger: object expected");
                    m.trigger = $root.perfetto.protos.Trigger.fromObject(d.trigger);
                }
                if (d.packagesList != null) {
                    if (typeof d.packagesList !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.packagesList: object expected");
                    m.packagesList = $root.perfetto.protos.PackagesList.fromObject(d.packagesList);
                }
                if (d.chromeBenchmarkMetadata != null) {
                    if (typeof d.chromeBenchmarkMetadata !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.chromeBenchmarkMetadata: object expected");
                    m.chromeBenchmarkMetadata = $root.perfetto.protos.ChromeBenchmarkMetadata.fromObject(d.chromeBenchmarkMetadata);
                }
                if (d.perfettoMetatrace != null) {
                    if (typeof d.perfettoMetatrace !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.perfettoMetatrace: object expected");
                    m.perfettoMetatrace = $root.perfetto.protos.PerfettoMetatrace.fromObject(d.perfettoMetatrace);
                }
                if (d.chromeMetadata != null) {
                    if (typeof d.chromeMetadata !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.chromeMetadata: object expected");
                    m.chromeMetadata = $root.perfetto.protos.ChromeMetadataPacket.fromObject(d.chromeMetadata);
                }
                if (d.gpuCounterEvent != null) {
                    if (typeof d.gpuCounterEvent !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.gpuCounterEvent: object expected");
                    m.gpuCounterEvent = $root.perfetto.protos.GpuCounterEvent.fromObject(d.gpuCounterEvent);
                }
                if (d.gpuRenderStageEvent != null) {
                    if (typeof d.gpuRenderStageEvent !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.gpuRenderStageEvent: object expected");
                    m.gpuRenderStageEvent = $root.perfetto.protos.GpuRenderStageEvent.fromObject(d.gpuRenderStageEvent);
                }
                if (d.streamingProfilePacket != null) {
                    if (typeof d.streamingProfilePacket !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.streamingProfilePacket: object expected");
                    m.streamingProfilePacket = $root.perfetto.protos.StreamingProfilePacket.fromObject(d.streamingProfilePacket);
                }
                if (d.heapGraph != null) {
                    if (typeof d.heapGraph !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.heapGraph: object expected");
                    m.heapGraph = $root.perfetto.protos.HeapGraph.fromObject(d.heapGraph);
                }
                if (d.graphicsFrameEvent != null) {
                    if (typeof d.graphicsFrameEvent !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.graphicsFrameEvent: object expected");
                    m.graphicsFrameEvent = $root.perfetto.protos.GraphicsFrameEvent.fromObject(d.graphicsFrameEvent);
                }
                if (d.vulkanMemoryEvent != null) {
                    if (typeof d.vulkanMemoryEvent !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.vulkanMemoryEvent: object expected");
                    m.vulkanMemoryEvent = $root.perfetto.protos.VulkanMemoryEvent.fromObject(d.vulkanMemoryEvent);
                }
                if (d.gpuLog != null) {
                    if (typeof d.gpuLog !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.gpuLog: object expected");
                    m.gpuLog = $root.perfetto.protos.GpuLog.fromObject(d.gpuLog);
                }
                if (d.vulkanApiEvent != null) {
                    if (typeof d.vulkanApiEvent !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.vulkanApiEvent: object expected");
                    m.vulkanApiEvent = $root.perfetto.protos.VulkanApiEvent.fromObject(d.vulkanApiEvent);
                }
                if (d.perfSample != null) {
                    if (typeof d.perfSample !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.perfSample: object expected");
                    m.perfSample = $root.perfetto.protos.PerfSample.fromObject(d.perfSample);
                }
                if (d.cpuInfo != null) {
                    if (typeof d.cpuInfo !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.cpuInfo: object expected");
                    m.cpuInfo = $root.perfetto.protos.CpuInfo.fromObject(d.cpuInfo);
                }
                if (d.smapsPacket != null) {
                    if (typeof d.smapsPacket !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.smapsPacket: object expected");
                    m.smapsPacket = $root.perfetto.protos.SmapsPacket.fromObject(d.smapsPacket);
                }
                if (d.serviceEvent != null) {
                    if (typeof d.serviceEvent !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.serviceEvent: object expected");
                    m.serviceEvent = $root.perfetto.protos.TracingServiceEvent.fromObject(d.serviceEvent);
                }
                if (d.initialDisplayState != null) {
                    if (typeof d.initialDisplayState !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.initialDisplayState: object expected");
                    m.initialDisplayState = $root.perfetto.protos.InitialDisplayState.fromObject(d.initialDisplayState);
                }
                if (d.gpuMemTotalEvent != null) {
                    if (typeof d.gpuMemTotalEvent !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.gpuMemTotalEvent: object expected");
                    m.gpuMemTotalEvent = $root.perfetto.protos.GpuMemTotalEvent.fromObject(d.gpuMemTotalEvent);
                }
                if (d.memoryTrackerSnapshot != null) {
                    if (typeof d.memoryTrackerSnapshot !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.memoryTrackerSnapshot: object expected");
                    m.memoryTrackerSnapshot = $root.perfetto.protos.MemoryTrackerSnapshot.fromObject(d.memoryTrackerSnapshot);
                }
                if (d.frameTimelineEvent != null) {
                    if (typeof d.frameTimelineEvent !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.frameTimelineEvent: object expected");
                    m.frameTimelineEvent = $root.perfetto.protos.FrameTimelineEvent.fromObject(d.frameTimelineEvent);
                }
                if (d.androidEnergyEstimationBreakdown != null) {
                    if (typeof d.androidEnergyEstimationBreakdown !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.androidEnergyEstimationBreakdown: object expected");
                    m.androidEnergyEstimationBreakdown = $root.perfetto.protos.AndroidEnergyEstimationBreakdown.fromObject(d.androidEnergyEstimationBreakdown);
                }
                if (d.uiState != null) {
                    if (typeof d.uiState !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.uiState: object expected");
                    m.uiState = $root.perfetto.protos.UiState.fromObject(d.uiState);
                }
                if (d.androidCameraFrameEvent != null) {
                    if (typeof d.androidCameraFrameEvent !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.androidCameraFrameEvent: object expected");
                    m.androidCameraFrameEvent = $root.perfetto.protos.AndroidCameraFrameEvent.fromObject(d.androidCameraFrameEvent);
                }
                if (d.androidCameraSessionStats != null) {
                    if (typeof d.androidCameraSessionStats !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.androidCameraSessionStats: object expected");
                    m.androidCameraSessionStats = $root.perfetto.protos.AndroidCameraSessionStats.fromObject(d.androidCameraSessionStats);
                }
                if (d.translationTable != null) {
                    if (typeof d.translationTable !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.translationTable: object expected");
                    m.translationTable = $root.perfetto.protos.TranslationTable.fromObject(d.translationTable);
                }
                if (d.androidGameInterventionList != null) {
                    if (typeof d.androidGameInterventionList !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.androidGameInterventionList: object expected");
                    m.androidGameInterventionList = $root.perfetto.protos.AndroidGameInterventionList.fromObject(d.androidGameInterventionList);
                }
                if (d.statsdAtom != null) {
                    if (typeof d.statsdAtom !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.statsdAtom: object expected");
                    m.statsdAtom = $root.perfetto.protos.StatsdAtom.fromObject(d.statsdAtom);
                }
                if (d.androidSystemProperty != null) {
                    if (typeof d.androidSystemProperty !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.androidSystemProperty: object expected");
                    m.androidSystemProperty = $root.perfetto.protos.AndroidSystemProperty.fromObject(d.androidSystemProperty);
                }
                if (d.profiledFrameSymbols != null) {
                    if (typeof d.profiledFrameSymbols !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.profiledFrameSymbols: object expected");
                    m.profiledFrameSymbols = $root.perfetto.protos.ProfiledFrameSymbols.fromObject(d.profiledFrameSymbols);
                }
                if (d.moduleSymbols != null) {
                    if (typeof d.moduleSymbols !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.moduleSymbols: object expected");
                    m.moduleSymbols = $root.perfetto.protos.ModuleSymbols.fromObject(d.moduleSymbols);
                }
                if (d.deobfuscationMapping != null) {
                    if (typeof d.deobfuscationMapping !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.deobfuscationMapping: object expected");
                    m.deobfuscationMapping = $root.perfetto.protos.DeobfuscationMapping.fromObject(d.deobfuscationMapping);
                }
                if (d.trackDescriptor != null) {
                    if (typeof d.trackDescriptor !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.trackDescriptor: object expected");
                    m.trackDescriptor = $root.perfetto.protos.TrackDescriptor.fromObject(d.trackDescriptor);
                }
                if (d.processDescriptor != null) {
                    if (typeof d.processDescriptor !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.processDescriptor: object expected");
                    m.processDescriptor = $root.perfetto.protos.ProcessDescriptor.fromObject(d.processDescriptor);
                }
                if (d.threadDescriptor != null) {
                    if (typeof d.threadDescriptor !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.threadDescriptor: object expected");
                    m.threadDescriptor = $root.perfetto.protos.ThreadDescriptor.fromObject(d.threadDescriptor);
                }
                if (d.ftraceEvents != null) {
                    if (typeof d.ftraceEvents !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.ftraceEvents: object expected");
                    m.ftraceEvents = $root.perfetto.protos.FtraceEventBundle.fromObject(d.ftraceEvents);
                }
                if (d.synchronizationMarker != null) {
                    if (typeof d.synchronizationMarker === "string")
                        $util.base64.decode(d.synchronizationMarker, m.synchronizationMarker = $util.newBuffer($util.base64.length(d.synchronizationMarker)), 0);
                    else if (d.synchronizationMarker.length)
                        m.synchronizationMarker = d.synchronizationMarker;
                }
                if (d.compressedPackets != null) {
                    if (typeof d.compressedPackets === "string")
                        $util.base64.decode(d.compressedPackets, m.compressedPackets = $util.newBuffer($util.base64.length(d.compressedPackets)), 0);
                    else if (d.compressedPackets.length)
                        m.compressedPackets = d.compressedPackets;
                }
                if (d.extensionDescriptor != null) {
                    if (typeof d.extensionDescriptor !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.extensionDescriptor: object expected");
                    m.extensionDescriptor = $root.perfetto.protos.ExtensionDescriptor.fromObject(d.extensionDescriptor);
                }
                if (d.forTesting != null) {
                    if (typeof d.forTesting !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.forTesting: object expected");
                    m.forTesting = $root.perfetto.protos.TestEvent.fromObject(d.forTesting);
                }
                if (d.trustedUid != null) {
                    m.trustedUid = d.trustedUid | 0;
                }
                if (d.trustedPacketSequenceId != null) {
                    m.trustedPacketSequenceId = d.trustedPacketSequenceId >>> 0;
                }
                if (d.trustedPid != null) {
                    m.trustedPid = d.trustedPid | 0;
                }
                if (d.internedData != null) {
                    if (typeof d.internedData !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.internedData: object expected");
                    m.internedData = $root.perfetto.protos.InternedData.fromObject(d.internedData);
                }
                if (d.sequenceFlags != null) {
                    m.sequenceFlags = d.sequenceFlags >>> 0;
                }
                if (d.incrementalStateCleared != null) {
                    m.incrementalStateCleared = Boolean(d.incrementalStateCleared);
                }
                if (d.tracePacketDefaults != null) {
                    if (typeof d.tracePacketDefaults !== "object")
                        throw TypeError(".perfetto.protos.TracePacket.tracePacketDefaults: object expected");
                    m.tracePacketDefaults = $root.perfetto.protos.TracePacketDefaults.fromObject(d.tracePacketDefaults);
                }
                if (d.previousPacketDropped != null) {
                    m.previousPacketDropped = Boolean(d.previousPacketDropped);
                }
                if (d.firstPacketOnSequence != null) {
                    m.firstPacketOnSequence = Boolean(d.firstPacketOnSequence);
                }
                return m;
            };

            /**
             * Creates a plain object from a TracePacket message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TracePacket
             * @static
             * @param {perfetto.protos.TracePacket} m TracePacket
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TracePacket.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.timestamp = o.longs === String ? "0" : 0;
                    d.internedData = null;
                    d.sequenceFlags = 0;
                    d.incrementalStateCleared = false;
                    d.previousPacketDropped = false;
                    d.timestampClockId = 0;
                    d.tracePacketDefaults = null;
                    d.trustedPid = 0;
                    d.firstPacketOnSequence = false;
                }
                if (m.ftraceEvents != null && m.hasOwnProperty("ftraceEvents")) {
                    d.ftraceEvents = $root.perfetto.protos.FtraceEventBundle.toObject(m.ftraceEvents, o);
                    if (o.oneofs)
                        d.data = "ftraceEvents";
                }
                if (m.processTree != null && m.hasOwnProperty("processTree")) {
                    d.processTree = $root.perfetto.protos.ProcessTree.toObject(m.processTree, o);
                    if (o.oneofs)
                        d.data = "processTree";
                }
                if (m.trustedUid != null && m.hasOwnProperty("trustedUid")) {
                    d.trustedUid = m.trustedUid;
                    if (o.oneofs)
                        d.optionalTrustedUid = "trustedUid";
                }
                if (m.inodeFileMap != null && m.hasOwnProperty("inodeFileMap")) {
                    d.inodeFileMap = $root.perfetto.protos.InodeFileMap.toObject(m.inodeFileMap, o);
                    if (o.oneofs)
                        d.data = "inodeFileMap";
                }
                if (m.chromeEvents != null && m.hasOwnProperty("chromeEvents")) {
                    d.chromeEvents = $root.perfetto.protos.ChromeEventBundle.toObject(m.chromeEvents, o);
                    if (o.oneofs)
                        d.data = "chromeEvents";
                }
                if (m.clockSnapshot != null && m.hasOwnProperty("clockSnapshot")) {
                    d.clockSnapshot = $root.perfetto.protos.ClockSnapshot.toObject(m.clockSnapshot, o);
                    if (o.oneofs)
                        d.data = "clockSnapshot";
                }
                if (m.sysStats != null && m.hasOwnProperty("sysStats")) {
                    d.sysStats = $root.perfetto.protos.SysStats.toObject(m.sysStats, o);
                    if (o.oneofs)
                        d.data = "sysStats";
                }
                if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                    if (typeof m.timestamp === "number")
                        d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp;
                    else
                        d.timestamp = o.longs === String ? $util.Long.prototype.toString.call(m.timestamp) : o.longs === Number ? new $util.LongBits(m.timestamp.low >>> 0, m.timestamp.high >>> 0).toNumber(true) : m.timestamp;
                }
                if (m.processStats != null && m.hasOwnProperty("processStats")) {
                    d.processStats = $root.perfetto.protos.ProcessStats.toObject(m.processStats, o);
                    if (o.oneofs)
                        d.data = "processStats";
                }
                if (m.trustedPacketSequenceId != null && m.hasOwnProperty("trustedPacketSequenceId")) {
                    d.trustedPacketSequenceId = m.trustedPacketSequenceId;
                    if (o.oneofs)
                        d.optionalTrustedPacketSequenceId = "trustedPacketSequenceId";
                }
                if (m.trackEvent != null && m.hasOwnProperty("trackEvent")) {
                    d.trackEvent = $root.perfetto.protos.TrackEvent.toObject(m.trackEvent, o);
                    if (o.oneofs)
                        d.data = "trackEvent";
                }
                if (m.internedData != null && m.hasOwnProperty("internedData")) {
                    d.internedData = $root.perfetto.protos.InternedData.toObject(m.internedData, o);
                }
                if (m.sequenceFlags != null && m.hasOwnProperty("sequenceFlags")) {
                    d.sequenceFlags = m.sequenceFlags;
                }
                if (m.traceConfig != null && m.hasOwnProperty("traceConfig")) {
                    d.traceConfig = $root.perfetto.protos.TraceConfig.toObject(m.traceConfig, o);
                    if (o.oneofs)
                        d.data = "traceConfig";
                }
                if (m.ftraceStats != null && m.hasOwnProperty("ftraceStats")) {
                    d.ftraceStats = $root.perfetto.protos.FtraceStats.toObject(m.ftraceStats, o);
                    if (o.oneofs)
                        d.data = "ftraceStats";
                }
                if (m.traceStats != null && m.hasOwnProperty("traceStats")) {
                    d.traceStats = $root.perfetto.protos.TraceStats.toObject(m.traceStats, o);
                    if (o.oneofs)
                        d.data = "traceStats";
                }
                if (m.synchronizationMarker != null && m.hasOwnProperty("synchronizationMarker")) {
                    d.synchronizationMarker = o.bytes === String ? $util.base64.encode(m.synchronizationMarker, 0, m.synchronizationMarker.length) : o.bytes === Array ? Array.prototype.slice.call(m.synchronizationMarker) : m.synchronizationMarker;
                    if (o.oneofs)
                        d.data = "synchronizationMarker";
                }
                if (m.profilePacket != null && m.hasOwnProperty("profilePacket")) {
                    d.profilePacket = $root.perfetto.protos.ProfilePacket.toObject(m.profilePacket, o);
                    if (o.oneofs)
                        d.data = "profilePacket";
                }
                if (m.battery != null && m.hasOwnProperty("battery")) {
                    d.battery = $root.perfetto.protos.BatteryCounters.toObject(m.battery, o);
                    if (o.oneofs)
                        d.data = "battery";
                }
                if (m.androidLog != null && m.hasOwnProperty("androidLog")) {
                    d.androidLog = $root.perfetto.protos.AndroidLogPacket.toObject(m.androidLog, o);
                    if (o.oneofs)
                        d.data = "androidLog";
                }
                if (m.powerRails != null && m.hasOwnProperty("powerRails")) {
                    d.powerRails = $root.perfetto.protos.PowerRails.toObject(m.powerRails, o);
                    if (o.oneofs)
                        d.data = "powerRails";
                }
                if (m.incrementalStateCleared != null && m.hasOwnProperty("incrementalStateCleared")) {
                    d.incrementalStateCleared = m.incrementalStateCleared;
                }
                if (m.previousPacketDropped != null && m.hasOwnProperty("previousPacketDropped")) {
                    d.previousPacketDropped = m.previousPacketDropped;
                }
                if (m.processDescriptor != null && m.hasOwnProperty("processDescriptor")) {
                    d.processDescriptor = $root.perfetto.protos.ProcessDescriptor.toObject(m.processDescriptor, o);
                    if (o.oneofs)
                        d.data = "processDescriptor";
                }
                if (m.threadDescriptor != null && m.hasOwnProperty("threadDescriptor")) {
                    d.threadDescriptor = $root.perfetto.protos.ThreadDescriptor.toObject(m.threadDescriptor, o);
                    if (o.oneofs)
                        d.data = "threadDescriptor";
                }
                if (m.systemInfo != null && m.hasOwnProperty("systemInfo")) {
                    d.systemInfo = $root.perfetto.protos.SystemInfo.toObject(m.systemInfo, o);
                    if (o.oneofs)
                        d.data = "systemInfo";
                }
                if (m.trigger != null && m.hasOwnProperty("trigger")) {
                    d.trigger = $root.perfetto.protos.Trigger.toObject(m.trigger, o);
                    if (o.oneofs)
                        d.data = "trigger";
                }
                if (m.packagesList != null && m.hasOwnProperty("packagesList")) {
                    d.packagesList = $root.perfetto.protos.PackagesList.toObject(m.packagesList, o);
                    if (o.oneofs)
                        d.data = "packagesList";
                }
                if (m.chromeBenchmarkMetadata != null && m.hasOwnProperty("chromeBenchmarkMetadata")) {
                    d.chromeBenchmarkMetadata = $root.perfetto.protos.ChromeBenchmarkMetadata.toObject(m.chromeBenchmarkMetadata, o);
                    if (o.oneofs)
                        d.data = "chromeBenchmarkMetadata";
                }
                if (m.perfettoMetatrace != null && m.hasOwnProperty("perfettoMetatrace")) {
                    d.perfettoMetatrace = $root.perfetto.protos.PerfettoMetatrace.toObject(m.perfettoMetatrace, o);
                    if (o.oneofs)
                        d.data = "perfettoMetatrace";
                }
                if (m.compressedPackets != null && m.hasOwnProperty("compressedPackets")) {
                    d.compressedPackets = o.bytes === String ? $util.base64.encode(m.compressedPackets, 0, m.compressedPackets.length) : o.bytes === Array ? Array.prototype.slice.call(m.compressedPackets) : m.compressedPackets;
                    if (o.oneofs)
                        d.data = "compressedPackets";
                }
                if (m.chromeMetadata != null && m.hasOwnProperty("chromeMetadata")) {
                    d.chromeMetadata = $root.perfetto.protos.ChromeMetadataPacket.toObject(m.chromeMetadata, o);
                    if (o.oneofs)
                        d.data = "chromeMetadata";
                }
                if (m.gpuCounterEvent != null && m.hasOwnProperty("gpuCounterEvent")) {
                    d.gpuCounterEvent = $root.perfetto.protos.GpuCounterEvent.toObject(m.gpuCounterEvent, o);
                    if (o.oneofs)
                        d.data = "gpuCounterEvent";
                }
                if (m.gpuRenderStageEvent != null && m.hasOwnProperty("gpuRenderStageEvent")) {
                    d.gpuRenderStageEvent = $root.perfetto.protos.GpuRenderStageEvent.toObject(m.gpuRenderStageEvent, o);
                    if (o.oneofs)
                        d.data = "gpuRenderStageEvent";
                }
                if (m.streamingProfilePacket != null && m.hasOwnProperty("streamingProfilePacket")) {
                    d.streamingProfilePacket = $root.perfetto.protos.StreamingProfilePacket.toObject(m.streamingProfilePacket, o);
                    if (o.oneofs)
                        d.data = "streamingProfilePacket";
                }
                if (m.profiledFrameSymbols != null && m.hasOwnProperty("profiledFrameSymbols")) {
                    d.profiledFrameSymbols = $root.perfetto.protos.ProfiledFrameSymbols.toObject(m.profiledFrameSymbols, o);
                    if (o.oneofs)
                        d.data = "profiledFrameSymbols";
                }
                if (m.heapGraph != null && m.hasOwnProperty("heapGraph")) {
                    d.heapGraph = $root.perfetto.protos.HeapGraph.toObject(m.heapGraph, o);
                    if (o.oneofs)
                        d.data = "heapGraph";
                }
                if (m.graphicsFrameEvent != null && m.hasOwnProperty("graphicsFrameEvent")) {
                    d.graphicsFrameEvent = $root.perfetto.protos.GraphicsFrameEvent.toObject(m.graphicsFrameEvent, o);
                    if (o.oneofs)
                        d.data = "graphicsFrameEvent";
                }
                if (m.timestampClockId != null && m.hasOwnProperty("timestampClockId")) {
                    d.timestampClockId = m.timestampClockId;
                }
                if (m.tracePacketDefaults != null && m.hasOwnProperty("tracePacketDefaults")) {
                    d.tracePacketDefaults = $root.perfetto.protos.TracePacketDefaults.toObject(m.tracePacketDefaults, o);
                }
                if (m.trackDescriptor != null && m.hasOwnProperty("trackDescriptor")) {
                    d.trackDescriptor = $root.perfetto.protos.TrackDescriptor.toObject(m.trackDescriptor, o);
                    if (o.oneofs)
                        d.data = "trackDescriptor";
                }
                if (m.moduleSymbols != null && m.hasOwnProperty("moduleSymbols")) {
                    d.moduleSymbols = $root.perfetto.protos.ModuleSymbols.toObject(m.moduleSymbols, o);
                    if (o.oneofs)
                        d.data = "moduleSymbols";
                }
                if (m.vulkanMemoryEvent != null && m.hasOwnProperty("vulkanMemoryEvent")) {
                    d.vulkanMemoryEvent = $root.perfetto.protos.VulkanMemoryEvent.toObject(m.vulkanMemoryEvent, o);
                    if (o.oneofs)
                        d.data = "vulkanMemoryEvent";
                }
                if (m.gpuLog != null && m.hasOwnProperty("gpuLog")) {
                    d.gpuLog = $root.perfetto.protos.GpuLog.toObject(m.gpuLog, o);
                    if (o.oneofs)
                        d.data = "gpuLog";
                }
                if (m.deobfuscationMapping != null && m.hasOwnProperty("deobfuscationMapping")) {
                    d.deobfuscationMapping = $root.perfetto.protos.DeobfuscationMapping.toObject(m.deobfuscationMapping, o);
                    if (o.oneofs)
                        d.data = "deobfuscationMapping";
                }
                if (m.vulkanApiEvent != null && m.hasOwnProperty("vulkanApiEvent")) {
                    d.vulkanApiEvent = $root.perfetto.protos.VulkanApiEvent.toObject(m.vulkanApiEvent, o);
                    if (o.oneofs)
                        d.data = "vulkanApiEvent";
                }
                if (m.perfSample != null && m.hasOwnProperty("perfSample")) {
                    d.perfSample = $root.perfetto.protos.PerfSample.toObject(m.perfSample, o);
                    if (o.oneofs)
                        d.data = "perfSample";
                }
                if (m.cpuInfo != null && m.hasOwnProperty("cpuInfo")) {
                    d.cpuInfo = $root.perfetto.protos.CpuInfo.toObject(m.cpuInfo, o);
                    if (o.oneofs)
                        d.data = "cpuInfo";
                }
                if (m.smapsPacket != null && m.hasOwnProperty("smapsPacket")) {
                    d.smapsPacket = $root.perfetto.protos.SmapsPacket.toObject(m.smapsPacket, o);
                    if (o.oneofs)
                        d.data = "smapsPacket";
                }
                if (m.serviceEvent != null && m.hasOwnProperty("serviceEvent")) {
                    d.serviceEvent = $root.perfetto.protos.TracingServiceEvent.toObject(m.serviceEvent, o);
                    if (o.oneofs)
                        d.data = "serviceEvent";
                }
                if (m.initialDisplayState != null && m.hasOwnProperty("initialDisplayState")) {
                    d.initialDisplayState = $root.perfetto.protos.InitialDisplayState.toObject(m.initialDisplayState, o);
                    if (o.oneofs)
                        d.data = "initialDisplayState";
                }
                if (m.gpuMemTotalEvent != null && m.hasOwnProperty("gpuMemTotalEvent")) {
                    d.gpuMemTotalEvent = $root.perfetto.protos.GpuMemTotalEvent.toObject(m.gpuMemTotalEvent, o);
                    if (o.oneofs)
                        d.data = "gpuMemTotalEvent";
                }
                if (m.extensionDescriptor != null && m.hasOwnProperty("extensionDescriptor")) {
                    d.extensionDescriptor = $root.perfetto.protos.ExtensionDescriptor.toObject(m.extensionDescriptor, o);
                    if (o.oneofs)
                        d.data = "extensionDescriptor";
                }
                if (m.memoryTrackerSnapshot != null && m.hasOwnProperty("memoryTrackerSnapshot")) {
                    d.memoryTrackerSnapshot = $root.perfetto.protos.MemoryTrackerSnapshot.toObject(m.memoryTrackerSnapshot, o);
                    if (o.oneofs)
                        d.data = "memoryTrackerSnapshot";
                }
                if (m.streamingAllocation != null && m.hasOwnProperty("streamingAllocation")) {
                    d.streamingAllocation = $root.perfetto.protos.StreamingAllocation.toObject(m.streamingAllocation, o);
                    if (o.oneofs)
                        d.data = "streamingAllocation";
                }
                if (m.streamingFree != null && m.hasOwnProperty("streamingFree")) {
                    d.streamingFree = $root.perfetto.protos.StreamingFree.toObject(m.streamingFree, o);
                    if (o.oneofs)
                        d.data = "streamingFree";
                }
                if (m.frameTimelineEvent != null && m.hasOwnProperty("frameTimelineEvent")) {
                    d.frameTimelineEvent = $root.perfetto.protos.FrameTimelineEvent.toObject(m.frameTimelineEvent, o);
                    if (o.oneofs)
                        d.data = "frameTimelineEvent";
                }
                if (m.androidEnergyEstimationBreakdown != null && m.hasOwnProperty("androidEnergyEstimationBreakdown")) {
                    d.androidEnergyEstimationBreakdown = $root.perfetto.protos.AndroidEnergyEstimationBreakdown.toObject(m.androidEnergyEstimationBreakdown, o);
                    if (o.oneofs)
                        d.data = "androidEnergyEstimationBreakdown";
                }
                if (m.uiState != null && m.hasOwnProperty("uiState")) {
                    d.uiState = $root.perfetto.protos.UiState.toObject(m.uiState, o);
                    if (o.oneofs)
                        d.data = "uiState";
                }
                if (m.trustedPid != null && m.hasOwnProperty("trustedPid")) {
                    d.trustedPid = m.trustedPid;
                }
                if (m.androidCameraFrameEvent != null && m.hasOwnProperty("androidCameraFrameEvent")) {
                    d.androidCameraFrameEvent = $root.perfetto.protos.AndroidCameraFrameEvent.toObject(m.androidCameraFrameEvent, o);
                    if (o.oneofs)
                        d.data = "androidCameraFrameEvent";
                }
                if (m.androidCameraSessionStats != null && m.hasOwnProperty("androidCameraSessionStats")) {
                    d.androidCameraSessionStats = $root.perfetto.protos.AndroidCameraSessionStats.toObject(m.androidCameraSessionStats, o);
                    if (o.oneofs)
                        d.data = "androidCameraSessionStats";
                }
                if (m.translationTable != null && m.hasOwnProperty("translationTable")) {
                    d.translationTable = $root.perfetto.protos.TranslationTable.toObject(m.translationTable, o);
                    if (o.oneofs)
                        d.data = "translationTable";
                }
                if (m.androidGameInterventionList != null && m.hasOwnProperty("androidGameInterventionList")) {
                    d.androidGameInterventionList = $root.perfetto.protos.AndroidGameInterventionList.toObject(m.androidGameInterventionList, o);
                    if (o.oneofs)
                        d.data = "androidGameInterventionList";
                }
                if (m.statsdAtom != null && m.hasOwnProperty("statsdAtom")) {
                    d.statsdAtom = $root.perfetto.protos.StatsdAtom.toObject(m.statsdAtom, o);
                    if (o.oneofs)
                        d.data = "statsdAtom";
                }
                if (m.androidSystemProperty != null && m.hasOwnProperty("androidSystemProperty")) {
                    d.androidSystemProperty = $root.perfetto.protos.AndroidSystemProperty.toObject(m.androidSystemProperty, o);
                    if (o.oneofs)
                        d.data = "androidSystemProperty";
                }
                if (m.firstPacketOnSequence != null && m.hasOwnProperty("firstPacketOnSequence")) {
                    d.firstPacketOnSequence = m.firstPacketOnSequence;
                }
                if (m.forTesting != null && m.hasOwnProperty("forTesting")) {
                    d.forTesting = $root.perfetto.protos.TestEvent.toObject(m.forTesting, o);
                    if (o.oneofs)
                        d.data = "forTesting";
                }
                return d;
            };

            /**
             * Converts this TracePacket to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TracePacket
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TracePacket.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * SequenceFlags enum.
             * @name perfetto.protos.TracePacket.SequenceFlags
             * @enum {number}
             * @property {number} SEQ_UNSPECIFIED=0 SEQ_UNSPECIFIED value
             * @property {number} SEQ_INCREMENTAL_STATE_CLEARED=1 SEQ_INCREMENTAL_STATE_CLEARED value
             * @property {number} SEQ_NEEDS_INCREMENTAL_STATE=2 SEQ_NEEDS_INCREMENTAL_STATE value
             */
            TracePacket.SequenceFlags = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "SEQ_UNSPECIFIED"] = 0;
                values[valuesById[1] = "SEQ_INCREMENTAL_STATE_CLEARED"] = 1;
                values[valuesById[2] = "SEQ_NEEDS_INCREMENTAL_STATE"] = 2;
                return values;
            })();

            return TracePacket;
        })();

        protos.ExtensionDescriptor = (function() {

            /**
             * Properties of an ExtensionDescriptor.
             * @memberof perfetto.protos
             * @interface IExtensionDescriptor
             * @property {perfetto.protos.IFileDescriptorSet|null} [extensionSet] ExtensionDescriptor extensionSet
             */

            /**
             * Constructs a new ExtensionDescriptor.
             * @memberof perfetto.protos
             * @classdesc Represents an ExtensionDescriptor.
             * @implements IExtensionDescriptor
             * @constructor
             * @param {perfetto.protos.IExtensionDescriptor=} [p] Properties to set
             */
            function ExtensionDescriptor(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ExtensionDescriptor extensionSet.
             * @member {perfetto.protos.IFileDescriptorSet|null|undefined} extensionSet
             * @memberof perfetto.protos.ExtensionDescriptor
             * @instance
             */
            ExtensionDescriptor.prototype.extensionSet = null;

            /**
             * Creates a new ExtensionDescriptor instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ExtensionDescriptor
             * @static
             * @param {perfetto.protos.IExtensionDescriptor=} [properties] Properties to set
             * @returns {perfetto.protos.ExtensionDescriptor} ExtensionDescriptor instance
             */
            ExtensionDescriptor.create = function create(properties) {
                return new ExtensionDescriptor(properties);
            };

            /**
             * Encodes the specified ExtensionDescriptor message. Does not implicitly {@link perfetto.protos.ExtensionDescriptor.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ExtensionDescriptor
             * @static
             * @param {perfetto.protos.IExtensionDescriptor} m ExtensionDescriptor message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ExtensionDescriptor.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.extensionSet != null && Object.hasOwnProperty.call(m, "extensionSet"))
                    $root.perfetto.protos.FileDescriptorSet.encode(m.extensionSet, w.uint32(10).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified ExtensionDescriptor message, length delimited. Does not implicitly {@link perfetto.protos.ExtensionDescriptor.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ExtensionDescriptor
             * @static
             * @param {perfetto.protos.IExtensionDescriptor} message ExtensionDescriptor message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ExtensionDescriptor.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an ExtensionDescriptor message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ExtensionDescriptor
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ExtensionDescriptor} ExtensionDescriptor
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ExtensionDescriptor.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ExtensionDescriptor();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.extensionSet = $root.perfetto.protos.FileDescriptorSet.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an ExtensionDescriptor message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ExtensionDescriptor
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ExtensionDescriptor} ExtensionDescriptor
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ExtensionDescriptor.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an ExtensionDescriptor message.
             * @function verify
             * @memberof perfetto.protos.ExtensionDescriptor
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ExtensionDescriptor.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.extensionSet != null && m.hasOwnProperty("extensionSet")) {
                    {
                        var e = $root.perfetto.protos.FileDescriptorSet.verify(m.extensionSet);
                        if (e)
                            return "extensionSet." + e;
                    }
                }
                return null;
            };

            /**
             * Creates an ExtensionDescriptor message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ExtensionDescriptor
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ExtensionDescriptor} ExtensionDescriptor
             */
            ExtensionDescriptor.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ExtensionDescriptor)
                    return d;
                var m = new $root.perfetto.protos.ExtensionDescriptor();
                if (d.extensionSet != null) {
                    if (typeof d.extensionSet !== "object")
                        throw TypeError(".perfetto.protos.ExtensionDescriptor.extensionSet: object expected");
                    m.extensionSet = $root.perfetto.protos.FileDescriptorSet.fromObject(d.extensionSet);
                }
                return m;
            };

            /**
             * Creates a plain object from an ExtensionDescriptor message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ExtensionDescriptor
             * @static
             * @param {perfetto.protos.ExtensionDescriptor} m ExtensionDescriptor
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ExtensionDescriptor.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.extensionSet = null;
                }
                if (m.extensionSet != null && m.hasOwnProperty("extensionSet")) {
                    d.extensionSet = $root.perfetto.protos.FileDescriptorSet.toObject(m.extensionSet, o);
                }
                return d;
            };

            /**
             * Converts this ExtensionDescriptor to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ExtensionDescriptor
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ExtensionDescriptor.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ExtensionDescriptor;
        })();

        protos.FileDescriptorSet = (function() {

            /**
             * Properties of a FileDescriptorSet.
             * @memberof perfetto.protos
             * @interface IFileDescriptorSet
             * @property {Array.<perfetto.protos.IFileDescriptorProto>|null} [file] FileDescriptorSet file
             */

            /**
             * Constructs a new FileDescriptorSet.
             * @memberof perfetto.protos
             * @classdesc Represents a FileDescriptorSet.
             * @implements IFileDescriptorSet
             * @constructor
             * @param {perfetto.protos.IFileDescriptorSet=} [p] Properties to set
             */
            function FileDescriptorSet(p) {
                this.file = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * FileDescriptorSet file.
             * @member {Array.<perfetto.protos.IFileDescriptorProto>} file
             * @memberof perfetto.protos.FileDescriptorSet
             * @instance
             */
            FileDescriptorSet.prototype.file = $util.emptyArray;

            /**
             * Creates a new FileDescriptorSet instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.FileDescriptorSet
             * @static
             * @param {perfetto.protos.IFileDescriptorSet=} [properties] Properties to set
             * @returns {perfetto.protos.FileDescriptorSet} FileDescriptorSet instance
             */
            FileDescriptorSet.create = function create(properties) {
                return new FileDescriptorSet(properties);
            };

            /**
             * Encodes the specified FileDescriptorSet message. Does not implicitly {@link perfetto.protos.FileDescriptorSet.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.FileDescriptorSet
             * @static
             * @param {perfetto.protos.IFileDescriptorSet} m FileDescriptorSet message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FileDescriptorSet.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.file != null && m.file.length) {
                    for (var i = 0; i < m.file.length; ++i)
                        $root.perfetto.protos.FileDescriptorProto.encode(m.file[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link perfetto.protos.FileDescriptorSet.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.FileDescriptorSet
             * @static
             * @param {perfetto.protos.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a FileDescriptorSet message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.FileDescriptorSet
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.FileDescriptorSet} FileDescriptorSet
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FileDescriptorSet.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FileDescriptorSet();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.file && m.file.length))
                            m.file = [];
                        m.file.push($root.perfetto.protos.FileDescriptorProto.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.FileDescriptorSet
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.FileDescriptorSet} FileDescriptorSet
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a FileDescriptorSet message.
             * @function verify
             * @memberof perfetto.protos.FileDescriptorSet
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            FileDescriptorSet.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.file != null && m.hasOwnProperty("file")) {
                    if (!Array.isArray(m.file))
                        return "file: array expected";
                    for (var i = 0; i < m.file.length; ++i) {
                        {
                            var e = $root.perfetto.protos.FileDescriptorProto.verify(m.file[i]);
                            if (e)
                                return "file." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.FileDescriptorSet
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.FileDescriptorSet} FileDescriptorSet
             */
            FileDescriptorSet.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.FileDescriptorSet)
                    return d;
                var m = new $root.perfetto.protos.FileDescriptorSet();
                if (d.file) {
                    if (!Array.isArray(d.file))
                        throw TypeError(".perfetto.protos.FileDescriptorSet.file: array expected");
                    m.file = [];
                    for (var i = 0; i < d.file.length; ++i) {
                        if (typeof d.file[i] !== "object")
                            throw TypeError(".perfetto.protos.FileDescriptorSet.file: object expected");
                        m.file[i] = $root.perfetto.protos.FileDescriptorProto.fromObject(d.file[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.FileDescriptorSet
             * @static
             * @param {perfetto.protos.FileDescriptorSet} m FileDescriptorSet
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            FileDescriptorSet.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.file = [];
                }
                if (m.file && m.file.length) {
                    d.file = [];
                    for (var j = 0; j < m.file.length; ++j) {
                        d.file[j] = $root.perfetto.protos.FileDescriptorProto.toObject(m.file[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this FileDescriptorSet to JSON.
             * @function toJSON
             * @memberof perfetto.protos.FileDescriptorSet
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            FileDescriptorSet.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return FileDescriptorSet;
        })();

        protos.FileDescriptorProto = (function() {

            /**
             * Properties of a FileDescriptorProto.
             * @memberof perfetto.protos
             * @interface IFileDescriptorProto
             * @property {string|null} [name] FileDescriptorProto name
             * @property {string|null} ["package"] FileDescriptorProto package
             * @property {Array.<string>|null} [dependency] FileDescriptorProto dependency
             * @property {Array.<number>|null} [publicDependency] FileDescriptorProto publicDependency
             * @property {Array.<number>|null} [weakDependency] FileDescriptorProto weakDependency
             * @property {Array.<perfetto.protos.IDescriptorProto>|null} [messageType] FileDescriptorProto messageType
             * @property {Array.<perfetto.protos.IEnumDescriptorProto>|null} [enumType] FileDescriptorProto enumType
             * @property {Array.<perfetto.protos.IFieldDescriptorProto>|null} [extension] FileDescriptorProto extension
             */

            /**
             * Constructs a new FileDescriptorProto.
             * @memberof perfetto.protos
             * @classdesc Represents a FileDescriptorProto.
             * @implements IFileDescriptorProto
             * @constructor
             * @param {perfetto.protos.IFileDescriptorProto=} [p] Properties to set
             */
            function FileDescriptorProto(p) {
                this.dependency = [];
                this.publicDependency = [];
                this.weakDependency = [];
                this.messageType = [];
                this.enumType = [];
                this.extension = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * FileDescriptorProto name.
             * @member {string} name
             * @memberof perfetto.protos.FileDescriptorProto
             * @instance
             */
            FileDescriptorProto.prototype.name = "";

            /**
             * FileDescriptorProto package.
             * @member {string} package
             * @memberof perfetto.protos.FileDescriptorProto
             * @instance
             */
            FileDescriptorProto.prototype["package"] = "";

            /**
             * FileDescriptorProto dependency.
             * @member {Array.<string>} dependency
             * @memberof perfetto.protos.FileDescriptorProto
             * @instance
             */
            FileDescriptorProto.prototype.dependency = $util.emptyArray;

            /**
             * FileDescriptorProto publicDependency.
             * @member {Array.<number>} publicDependency
             * @memberof perfetto.protos.FileDescriptorProto
             * @instance
             */
            FileDescriptorProto.prototype.publicDependency = $util.emptyArray;

            /**
             * FileDescriptorProto weakDependency.
             * @member {Array.<number>} weakDependency
             * @memberof perfetto.protos.FileDescriptorProto
             * @instance
             */
            FileDescriptorProto.prototype.weakDependency = $util.emptyArray;

            /**
             * FileDescriptorProto messageType.
             * @member {Array.<perfetto.protos.IDescriptorProto>} messageType
             * @memberof perfetto.protos.FileDescriptorProto
             * @instance
             */
            FileDescriptorProto.prototype.messageType = $util.emptyArray;

            /**
             * FileDescriptorProto enumType.
             * @member {Array.<perfetto.protos.IEnumDescriptorProto>} enumType
             * @memberof perfetto.protos.FileDescriptorProto
             * @instance
             */
            FileDescriptorProto.prototype.enumType = $util.emptyArray;

            /**
             * FileDescriptorProto extension.
             * @member {Array.<perfetto.protos.IFieldDescriptorProto>} extension
             * @memberof perfetto.protos.FileDescriptorProto
             * @instance
             */
            FileDescriptorProto.prototype.extension = $util.emptyArray;

            /**
             * Creates a new FileDescriptorProto instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.FileDescriptorProto
             * @static
             * @param {perfetto.protos.IFileDescriptorProto=} [properties] Properties to set
             * @returns {perfetto.protos.FileDescriptorProto} FileDescriptorProto instance
             */
            FileDescriptorProto.create = function create(properties) {
                return new FileDescriptorProto(properties);
            };

            /**
             * Encodes the specified FileDescriptorProto message. Does not implicitly {@link perfetto.protos.FileDescriptorProto.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.FileDescriptorProto
             * @static
             * @param {perfetto.protos.IFileDescriptorProto} m FileDescriptorProto message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FileDescriptorProto.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                if (m["package"] != null && Object.hasOwnProperty.call(m, "package"))
                    w.uint32(18).string(m["package"]);
                if (m.dependency != null && m.dependency.length) {
                    for (var i = 0; i < m.dependency.length; ++i)
                        w.uint32(26).string(m.dependency[i]);
                }
                if (m.messageType != null && m.messageType.length) {
                    for (var i = 0; i < m.messageType.length; ++i)
                        $root.perfetto.protos.DescriptorProto.encode(m.messageType[i], w.uint32(34).fork()).ldelim();
                }
                if (m.enumType != null && m.enumType.length) {
                    for (var i = 0; i < m.enumType.length; ++i)
                        $root.perfetto.protos.EnumDescriptorProto.encode(m.enumType[i], w.uint32(42).fork()).ldelim();
                }
                if (m.extension != null && m.extension.length) {
                    for (var i = 0; i < m.extension.length; ++i)
                        $root.perfetto.protos.FieldDescriptorProto.encode(m.extension[i], w.uint32(58).fork()).ldelim();
                }
                if (m.publicDependency != null && m.publicDependency.length) {
                    for (var i = 0; i < m.publicDependency.length; ++i)
                        w.uint32(80).int32(m.publicDependency[i]);
                }
                if (m.weakDependency != null && m.weakDependency.length) {
                    for (var i = 0; i < m.weakDependency.length; ++i)
                        w.uint32(88).int32(m.weakDependency[i]);
                }
                return w;
            };

            /**
             * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link perfetto.protos.FileDescriptorProto.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.FileDescriptorProto
             * @static
             * @param {perfetto.protos.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a FileDescriptorProto message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.FileDescriptorProto
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.FileDescriptorProto} FileDescriptorProto
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FileDescriptorProto.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FileDescriptorProto();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    case 2:
                        m["package"] = r.string();
                        break;
                    case 3:
                        if (!(m.dependency && m.dependency.length))
                            m.dependency = [];
                        m.dependency.push(r.string());
                        break;
                    case 10:
                        if (!(m.publicDependency && m.publicDependency.length))
                            m.publicDependency = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.publicDependency.push(r.int32());
                        } else
                            m.publicDependency.push(r.int32());
                        break;
                    case 11:
                        if (!(m.weakDependency && m.weakDependency.length))
                            m.weakDependency = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.weakDependency.push(r.int32());
                        } else
                            m.weakDependency.push(r.int32());
                        break;
                    case 4:
                        if (!(m.messageType && m.messageType.length))
                            m.messageType = [];
                        m.messageType.push($root.perfetto.protos.DescriptorProto.decode(r, r.uint32()));
                        break;
                    case 5:
                        if (!(m.enumType && m.enumType.length))
                            m.enumType = [];
                        m.enumType.push($root.perfetto.protos.EnumDescriptorProto.decode(r, r.uint32()));
                        break;
                    case 7:
                        if (!(m.extension && m.extension.length))
                            m.extension = [];
                        m.extension.push($root.perfetto.protos.FieldDescriptorProto.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.FileDescriptorProto
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.FileDescriptorProto} FileDescriptorProto
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a FileDescriptorProto message.
             * @function verify
             * @memberof perfetto.protos.FileDescriptorProto
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            FileDescriptorProto.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m["package"] != null && m.hasOwnProperty("package")) {
                    if (!$util.isString(m["package"]))
                        return "package: string expected";
                }
                if (m.dependency != null && m.hasOwnProperty("dependency")) {
                    if (!Array.isArray(m.dependency))
                        return "dependency: array expected";
                    for (var i = 0; i < m.dependency.length; ++i) {
                        if (!$util.isString(m.dependency[i]))
                            return "dependency: string[] expected";
                    }
                }
                if (m.publicDependency != null && m.hasOwnProperty("publicDependency")) {
                    if (!Array.isArray(m.publicDependency))
                        return "publicDependency: array expected";
                    for (var i = 0; i < m.publicDependency.length; ++i) {
                        if (!$util.isInteger(m.publicDependency[i]))
                            return "publicDependency: integer[] expected";
                    }
                }
                if (m.weakDependency != null && m.hasOwnProperty("weakDependency")) {
                    if (!Array.isArray(m.weakDependency))
                        return "weakDependency: array expected";
                    for (var i = 0; i < m.weakDependency.length; ++i) {
                        if (!$util.isInteger(m.weakDependency[i]))
                            return "weakDependency: integer[] expected";
                    }
                }
                if (m.messageType != null && m.hasOwnProperty("messageType")) {
                    if (!Array.isArray(m.messageType))
                        return "messageType: array expected";
                    for (var i = 0; i < m.messageType.length; ++i) {
                        {
                            var e = $root.perfetto.protos.DescriptorProto.verify(m.messageType[i]);
                            if (e)
                                return "messageType." + e;
                        }
                    }
                }
                if (m.enumType != null && m.hasOwnProperty("enumType")) {
                    if (!Array.isArray(m.enumType))
                        return "enumType: array expected";
                    for (var i = 0; i < m.enumType.length; ++i) {
                        {
                            var e = $root.perfetto.protos.EnumDescriptorProto.verify(m.enumType[i]);
                            if (e)
                                return "enumType." + e;
                        }
                    }
                }
                if (m.extension != null && m.hasOwnProperty("extension")) {
                    if (!Array.isArray(m.extension))
                        return "extension: array expected";
                    for (var i = 0; i < m.extension.length; ++i) {
                        {
                            var e = $root.perfetto.protos.FieldDescriptorProto.verify(m.extension[i]);
                            if (e)
                                return "extension." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.FileDescriptorProto
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.FileDescriptorProto} FileDescriptorProto
             */
            FileDescriptorProto.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.FileDescriptorProto)
                    return d;
                var m = new $root.perfetto.protos.FileDescriptorProto();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d["package"] != null) {
                    m["package"] = String(d["package"]);
                }
                if (d.dependency) {
                    if (!Array.isArray(d.dependency))
                        throw TypeError(".perfetto.protos.FileDescriptorProto.dependency: array expected");
                    m.dependency = [];
                    for (var i = 0; i < d.dependency.length; ++i) {
                        m.dependency[i] = String(d.dependency[i]);
                    }
                }
                if (d.publicDependency) {
                    if (!Array.isArray(d.publicDependency))
                        throw TypeError(".perfetto.protos.FileDescriptorProto.publicDependency: array expected");
                    m.publicDependency = [];
                    for (var i = 0; i < d.publicDependency.length; ++i) {
                        m.publicDependency[i] = d.publicDependency[i] | 0;
                    }
                }
                if (d.weakDependency) {
                    if (!Array.isArray(d.weakDependency))
                        throw TypeError(".perfetto.protos.FileDescriptorProto.weakDependency: array expected");
                    m.weakDependency = [];
                    for (var i = 0; i < d.weakDependency.length; ++i) {
                        m.weakDependency[i] = d.weakDependency[i] | 0;
                    }
                }
                if (d.messageType) {
                    if (!Array.isArray(d.messageType))
                        throw TypeError(".perfetto.protos.FileDescriptorProto.messageType: array expected");
                    m.messageType = [];
                    for (var i = 0; i < d.messageType.length; ++i) {
                        if (typeof d.messageType[i] !== "object")
                            throw TypeError(".perfetto.protos.FileDescriptorProto.messageType: object expected");
                        m.messageType[i] = $root.perfetto.protos.DescriptorProto.fromObject(d.messageType[i]);
                    }
                }
                if (d.enumType) {
                    if (!Array.isArray(d.enumType))
                        throw TypeError(".perfetto.protos.FileDescriptorProto.enumType: array expected");
                    m.enumType = [];
                    for (var i = 0; i < d.enumType.length; ++i) {
                        if (typeof d.enumType[i] !== "object")
                            throw TypeError(".perfetto.protos.FileDescriptorProto.enumType: object expected");
                        m.enumType[i] = $root.perfetto.protos.EnumDescriptorProto.fromObject(d.enumType[i]);
                    }
                }
                if (d.extension) {
                    if (!Array.isArray(d.extension))
                        throw TypeError(".perfetto.protos.FileDescriptorProto.extension: array expected");
                    m.extension = [];
                    for (var i = 0; i < d.extension.length; ++i) {
                        if (typeof d.extension[i] !== "object")
                            throw TypeError(".perfetto.protos.FileDescriptorProto.extension: object expected");
                        m.extension[i] = $root.perfetto.protos.FieldDescriptorProto.fromObject(d.extension[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.FileDescriptorProto
             * @static
             * @param {perfetto.protos.FileDescriptorProto} m FileDescriptorProto
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            FileDescriptorProto.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.dependency = [];
                    d.messageType = [];
                    d.enumType = [];
                    d.extension = [];
                    d.publicDependency = [];
                    d.weakDependency = [];
                }
                if (o.defaults) {
                    d.name = "";
                    d["package"] = "";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m["package"] != null && m.hasOwnProperty("package")) {
                    d["package"] = m["package"];
                }
                if (m.dependency && m.dependency.length) {
                    d.dependency = [];
                    for (var j = 0; j < m.dependency.length; ++j) {
                        d.dependency[j] = m.dependency[j];
                    }
                }
                if (m.messageType && m.messageType.length) {
                    d.messageType = [];
                    for (var j = 0; j < m.messageType.length; ++j) {
                        d.messageType[j] = $root.perfetto.protos.DescriptorProto.toObject(m.messageType[j], o);
                    }
                }
                if (m.enumType && m.enumType.length) {
                    d.enumType = [];
                    for (var j = 0; j < m.enumType.length; ++j) {
                        d.enumType[j] = $root.perfetto.protos.EnumDescriptorProto.toObject(m.enumType[j], o);
                    }
                }
                if (m.extension && m.extension.length) {
                    d.extension = [];
                    for (var j = 0; j < m.extension.length; ++j) {
                        d.extension[j] = $root.perfetto.protos.FieldDescriptorProto.toObject(m.extension[j], o);
                    }
                }
                if (m.publicDependency && m.publicDependency.length) {
                    d.publicDependency = [];
                    for (var j = 0; j < m.publicDependency.length; ++j) {
                        d.publicDependency[j] = m.publicDependency[j];
                    }
                }
                if (m.weakDependency && m.weakDependency.length) {
                    d.weakDependency = [];
                    for (var j = 0; j < m.weakDependency.length; ++j) {
                        d.weakDependency[j] = m.weakDependency[j];
                    }
                }
                return d;
            };

            /**
             * Converts this FileDescriptorProto to JSON.
             * @function toJSON
             * @memberof perfetto.protos.FileDescriptorProto
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            FileDescriptorProto.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return FileDescriptorProto;
        })();

        protos.DescriptorProto = (function() {

            /**
             * Properties of a DescriptorProto.
             * @memberof perfetto.protos
             * @interface IDescriptorProto
             * @property {string|null} [name] DescriptorProto name
             * @property {Array.<perfetto.protos.IFieldDescriptorProto>|null} [field] DescriptorProto field
             * @property {Array.<perfetto.protos.IFieldDescriptorProto>|null} [extension] DescriptorProto extension
             * @property {Array.<perfetto.protos.IDescriptorProto>|null} [nestedType] DescriptorProto nestedType
             * @property {Array.<perfetto.protos.IEnumDescriptorProto>|null} [enumType] DescriptorProto enumType
             * @property {Array.<perfetto.protos.IOneofDescriptorProto>|null} [oneofDecl] DescriptorProto oneofDecl
             * @property {Array.<perfetto.protos.DescriptorProto.IReservedRange>|null} [reservedRange] DescriptorProto reservedRange
             * @property {Array.<string>|null} [reservedName] DescriptorProto reservedName
             */

            /**
             * Constructs a new DescriptorProto.
             * @memberof perfetto.protos
             * @classdesc Represents a DescriptorProto.
             * @implements IDescriptorProto
             * @constructor
             * @param {perfetto.protos.IDescriptorProto=} [p] Properties to set
             */
            function DescriptorProto(p) {
                this.field = [];
                this.extension = [];
                this.nestedType = [];
                this.enumType = [];
                this.oneofDecl = [];
                this.reservedRange = [];
                this.reservedName = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DescriptorProto name.
             * @member {string} name
             * @memberof perfetto.protos.DescriptorProto
             * @instance
             */
            DescriptorProto.prototype.name = "";

            /**
             * DescriptorProto field.
             * @member {Array.<perfetto.protos.IFieldDescriptorProto>} field
             * @memberof perfetto.protos.DescriptorProto
             * @instance
             */
            DescriptorProto.prototype.field = $util.emptyArray;

            /**
             * DescriptorProto extension.
             * @member {Array.<perfetto.protos.IFieldDescriptorProto>} extension
             * @memberof perfetto.protos.DescriptorProto
             * @instance
             */
            DescriptorProto.prototype.extension = $util.emptyArray;

            /**
             * DescriptorProto nestedType.
             * @member {Array.<perfetto.protos.IDescriptorProto>} nestedType
             * @memberof perfetto.protos.DescriptorProto
             * @instance
             */
            DescriptorProto.prototype.nestedType = $util.emptyArray;

            /**
             * DescriptorProto enumType.
             * @member {Array.<perfetto.protos.IEnumDescriptorProto>} enumType
             * @memberof perfetto.protos.DescriptorProto
             * @instance
             */
            DescriptorProto.prototype.enumType = $util.emptyArray;

            /**
             * DescriptorProto oneofDecl.
             * @member {Array.<perfetto.protos.IOneofDescriptorProto>} oneofDecl
             * @memberof perfetto.protos.DescriptorProto
             * @instance
             */
            DescriptorProto.prototype.oneofDecl = $util.emptyArray;

            /**
             * DescriptorProto reservedRange.
             * @member {Array.<perfetto.protos.DescriptorProto.IReservedRange>} reservedRange
             * @memberof perfetto.protos.DescriptorProto
             * @instance
             */
            DescriptorProto.prototype.reservedRange = $util.emptyArray;

            /**
             * DescriptorProto reservedName.
             * @member {Array.<string>} reservedName
             * @memberof perfetto.protos.DescriptorProto
             * @instance
             */
            DescriptorProto.prototype.reservedName = $util.emptyArray;

            /**
             * Creates a new DescriptorProto instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DescriptorProto
             * @static
             * @param {perfetto.protos.IDescriptorProto=} [properties] Properties to set
             * @returns {perfetto.protos.DescriptorProto} DescriptorProto instance
             */
            DescriptorProto.create = function create(properties) {
                return new DescriptorProto(properties);
            };

            /**
             * Encodes the specified DescriptorProto message. Does not implicitly {@link perfetto.protos.DescriptorProto.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DescriptorProto
             * @static
             * @param {perfetto.protos.IDescriptorProto} m DescriptorProto message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DescriptorProto.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                if (m.field != null && m.field.length) {
                    for (var i = 0; i < m.field.length; ++i)
                        $root.perfetto.protos.FieldDescriptorProto.encode(m.field[i], w.uint32(18).fork()).ldelim();
                }
                if (m.nestedType != null && m.nestedType.length) {
                    for (var i = 0; i < m.nestedType.length; ++i)
                        $root.perfetto.protos.DescriptorProto.encode(m.nestedType[i], w.uint32(26).fork()).ldelim();
                }
                if (m.enumType != null && m.enumType.length) {
                    for (var i = 0; i < m.enumType.length; ++i)
                        $root.perfetto.protos.EnumDescriptorProto.encode(m.enumType[i], w.uint32(34).fork()).ldelim();
                }
                if (m.extension != null && m.extension.length) {
                    for (var i = 0; i < m.extension.length; ++i)
                        $root.perfetto.protos.FieldDescriptorProto.encode(m.extension[i], w.uint32(50).fork()).ldelim();
                }
                if (m.oneofDecl != null && m.oneofDecl.length) {
                    for (var i = 0; i < m.oneofDecl.length; ++i)
                        $root.perfetto.protos.OneofDescriptorProto.encode(m.oneofDecl[i], w.uint32(66).fork()).ldelim();
                }
                if (m.reservedRange != null && m.reservedRange.length) {
                    for (var i = 0; i < m.reservedRange.length; ++i)
                        $root.perfetto.protos.DescriptorProto.ReservedRange.encode(m.reservedRange[i], w.uint32(74).fork()).ldelim();
                }
                if (m.reservedName != null && m.reservedName.length) {
                    for (var i = 0; i < m.reservedName.length; ++i)
                        w.uint32(82).string(m.reservedName[i]);
                }
                return w;
            };

            /**
             * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link perfetto.protos.DescriptorProto.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DescriptorProto
             * @static
             * @param {perfetto.protos.IDescriptorProto} message DescriptorProto message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DescriptorProto message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DescriptorProto
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DescriptorProto} DescriptorProto
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DescriptorProto.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DescriptorProto();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    case 2:
                        if (!(m.field && m.field.length))
                            m.field = [];
                        m.field.push($root.perfetto.protos.FieldDescriptorProto.decode(r, r.uint32()));
                        break;
                    case 6:
                        if (!(m.extension && m.extension.length))
                            m.extension = [];
                        m.extension.push($root.perfetto.protos.FieldDescriptorProto.decode(r, r.uint32()));
                        break;
                    case 3:
                        if (!(m.nestedType && m.nestedType.length))
                            m.nestedType = [];
                        m.nestedType.push($root.perfetto.protos.DescriptorProto.decode(r, r.uint32()));
                        break;
                    case 4:
                        if (!(m.enumType && m.enumType.length))
                            m.enumType = [];
                        m.enumType.push($root.perfetto.protos.EnumDescriptorProto.decode(r, r.uint32()));
                        break;
                    case 8:
                        if (!(m.oneofDecl && m.oneofDecl.length))
                            m.oneofDecl = [];
                        m.oneofDecl.push($root.perfetto.protos.OneofDescriptorProto.decode(r, r.uint32()));
                        break;
                    case 9:
                        if (!(m.reservedRange && m.reservedRange.length))
                            m.reservedRange = [];
                        m.reservedRange.push($root.perfetto.protos.DescriptorProto.ReservedRange.decode(r, r.uint32()));
                        break;
                    case 10:
                        if (!(m.reservedName && m.reservedName.length))
                            m.reservedName = [];
                        m.reservedName.push(r.string());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DescriptorProto message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DescriptorProto
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DescriptorProto} DescriptorProto
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DescriptorProto.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DescriptorProto message.
             * @function verify
             * @memberof perfetto.protos.DescriptorProto
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DescriptorProto.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.field != null && m.hasOwnProperty("field")) {
                    if (!Array.isArray(m.field))
                        return "field: array expected";
                    for (var i = 0; i < m.field.length; ++i) {
                        {
                            var e = $root.perfetto.protos.FieldDescriptorProto.verify(m.field[i]);
                            if (e)
                                return "field." + e;
                        }
                    }
                }
                if (m.extension != null && m.hasOwnProperty("extension")) {
                    if (!Array.isArray(m.extension))
                        return "extension: array expected";
                    for (var i = 0; i < m.extension.length; ++i) {
                        {
                            var e = $root.perfetto.protos.FieldDescriptorProto.verify(m.extension[i]);
                            if (e)
                                return "extension." + e;
                        }
                    }
                }
                if (m.nestedType != null && m.hasOwnProperty("nestedType")) {
                    if (!Array.isArray(m.nestedType))
                        return "nestedType: array expected";
                    for (var i = 0; i < m.nestedType.length; ++i) {
                        {
                            var e = $root.perfetto.protos.DescriptorProto.verify(m.nestedType[i]);
                            if (e)
                                return "nestedType." + e;
                        }
                    }
                }
                if (m.enumType != null && m.hasOwnProperty("enumType")) {
                    if (!Array.isArray(m.enumType))
                        return "enumType: array expected";
                    for (var i = 0; i < m.enumType.length; ++i) {
                        {
                            var e = $root.perfetto.protos.EnumDescriptorProto.verify(m.enumType[i]);
                            if (e)
                                return "enumType." + e;
                        }
                    }
                }
                if (m.oneofDecl != null && m.hasOwnProperty("oneofDecl")) {
                    if (!Array.isArray(m.oneofDecl))
                        return "oneofDecl: array expected";
                    for (var i = 0; i < m.oneofDecl.length; ++i) {
                        {
                            var e = $root.perfetto.protos.OneofDescriptorProto.verify(m.oneofDecl[i]);
                            if (e)
                                return "oneofDecl." + e;
                        }
                    }
                }
                if (m.reservedRange != null && m.hasOwnProperty("reservedRange")) {
                    if (!Array.isArray(m.reservedRange))
                        return "reservedRange: array expected";
                    for (var i = 0; i < m.reservedRange.length; ++i) {
                        {
                            var e = $root.perfetto.protos.DescriptorProto.ReservedRange.verify(m.reservedRange[i]);
                            if (e)
                                return "reservedRange." + e;
                        }
                    }
                }
                if (m.reservedName != null && m.hasOwnProperty("reservedName")) {
                    if (!Array.isArray(m.reservedName))
                        return "reservedName: array expected";
                    for (var i = 0; i < m.reservedName.length; ++i) {
                        if (!$util.isString(m.reservedName[i]))
                            return "reservedName: string[] expected";
                    }
                }
                return null;
            };

            /**
             * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DescriptorProto
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DescriptorProto} DescriptorProto
             */
            DescriptorProto.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DescriptorProto)
                    return d;
                var m = new $root.perfetto.protos.DescriptorProto();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.field) {
                    if (!Array.isArray(d.field))
                        throw TypeError(".perfetto.protos.DescriptorProto.field: array expected");
                    m.field = [];
                    for (var i = 0; i < d.field.length; ++i) {
                        if (typeof d.field[i] !== "object")
                            throw TypeError(".perfetto.protos.DescriptorProto.field: object expected");
                        m.field[i] = $root.perfetto.protos.FieldDescriptorProto.fromObject(d.field[i]);
                    }
                }
                if (d.extension) {
                    if (!Array.isArray(d.extension))
                        throw TypeError(".perfetto.protos.DescriptorProto.extension: array expected");
                    m.extension = [];
                    for (var i = 0; i < d.extension.length; ++i) {
                        if (typeof d.extension[i] !== "object")
                            throw TypeError(".perfetto.protos.DescriptorProto.extension: object expected");
                        m.extension[i] = $root.perfetto.protos.FieldDescriptorProto.fromObject(d.extension[i]);
                    }
                }
                if (d.nestedType) {
                    if (!Array.isArray(d.nestedType))
                        throw TypeError(".perfetto.protos.DescriptorProto.nestedType: array expected");
                    m.nestedType = [];
                    for (var i = 0; i < d.nestedType.length; ++i) {
                        if (typeof d.nestedType[i] !== "object")
                            throw TypeError(".perfetto.protos.DescriptorProto.nestedType: object expected");
                        m.nestedType[i] = $root.perfetto.protos.DescriptorProto.fromObject(d.nestedType[i]);
                    }
                }
                if (d.enumType) {
                    if (!Array.isArray(d.enumType))
                        throw TypeError(".perfetto.protos.DescriptorProto.enumType: array expected");
                    m.enumType = [];
                    for (var i = 0; i < d.enumType.length; ++i) {
                        if (typeof d.enumType[i] !== "object")
                            throw TypeError(".perfetto.protos.DescriptorProto.enumType: object expected");
                        m.enumType[i] = $root.perfetto.protos.EnumDescriptorProto.fromObject(d.enumType[i]);
                    }
                }
                if (d.oneofDecl) {
                    if (!Array.isArray(d.oneofDecl))
                        throw TypeError(".perfetto.protos.DescriptorProto.oneofDecl: array expected");
                    m.oneofDecl = [];
                    for (var i = 0; i < d.oneofDecl.length; ++i) {
                        if (typeof d.oneofDecl[i] !== "object")
                            throw TypeError(".perfetto.protos.DescriptorProto.oneofDecl: object expected");
                        m.oneofDecl[i] = $root.perfetto.protos.OneofDescriptorProto.fromObject(d.oneofDecl[i]);
                    }
                }
                if (d.reservedRange) {
                    if (!Array.isArray(d.reservedRange))
                        throw TypeError(".perfetto.protos.DescriptorProto.reservedRange: array expected");
                    m.reservedRange = [];
                    for (var i = 0; i < d.reservedRange.length; ++i) {
                        if (typeof d.reservedRange[i] !== "object")
                            throw TypeError(".perfetto.protos.DescriptorProto.reservedRange: object expected");
                        m.reservedRange[i] = $root.perfetto.protos.DescriptorProto.ReservedRange.fromObject(d.reservedRange[i]);
                    }
                }
                if (d.reservedName) {
                    if (!Array.isArray(d.reservedName))
                        throw TypeError(".perfetto.protos.DescriptorProto.reservedName: array expected");
                    m.reservedName = [];
                    for (var i = 0; i < d.reservedName.length; ++i) {
                        m.reservedName[i] = String(d.reservedName[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DescriptorProto
             * @static
             * @param {perfetto.protos.DescriptorProto} m DescriptorProto
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DescriptorProto.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.field = [];
                    d.nestedType = [];
                    d.enumType = [];
                    d.extension = [];
                    d.oneofDecl = [];
                    d.reservedRange = [];
                    d.reservedName = [];
                }
                if (o.defaults) {
                    d.name = "";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.field && m.field.length) {
                    d.field = [];
                    for (var j = 0; j < m.field.length; ++j) {
                        d.field[j] = $root.perfetto.protos.FieldDescriptorProto.toObject(m.field[j], o);
                    }
                }
                if (m.nestedType && m.nestedType.length) {
                    d.nestedType = [];
                    for (var j = 0; j < m.nestedType.length; ++j) {
                        d.nestedType[j] = $root.perfetto.protos.DescriptorProto.toObject(m.nestedType[j], o);
                    }
                }
                if (m.enumType && m.enumType.length) {
                    d.enumType = [];
                    for (var j = 0; j < m.enumType.length; ++j) {
                        d.enumType[j] = $root.perfetto.protos.EnumDescriptorProto.toObject(m.enumType[j], o);
                    }
                }
                if (m.extension && m.extension.length) {
                    d.extension = [];
                    for (var j = 0; j < m.extension.length; ++j) {
                        d.extension[j] = $root.perfetto.protos.FieldDescriptorProto.toObject(m.extension[j], o);
                    }
                }
                if (m.oneofDecl && m.oneofDecl.length) {
                    d.oneofDecl = [];
                    for (var j = 0; j < m.oneofDecl.length; ++j) {
                        d.oneofDecl[j] = $root.perfetto.protos.OneofDescriptorProto.toObject(m.oneofDecl[j], o);
                    }
                }
                if (m.reservedRange && m.reservedRange.length) {
                    d.reservedRange = [];
                    for (var j = 0; j < m.reservedRange.length; ++j) {
                        d.reservedRange[j] = $root.perfetto.protos.DescriptorProto.ReservedRange.toObject(m.reservedRange[j], o);
                    }
                }
                if (m.reservedName && m.reservedName.length) {
                    d.reservedName = [];
                    for (var j = 0; j < m.reservedName.length; ++j) {
                        d.reservedName[j] = m.reservedName[j];
                    }
                }
                return d;
            };

            /**
             * Converts this DescriptorProto to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DescriptorProto
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DescriptorProto.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            DescriptorProto.ReservedRange = (function() {

                /**
                 * Properties of a ReservedRange.
                 * @memberof perfetto.protos.DescriptorProto
                 * @interface IReservedRange
                 * @property {number|null} [start] ReservedRange start
                 * @property {number|null} [end] ReservedRange end
                 */

                /**
                 * Constructs a new ReservedRange.
                 * @memberof perfetto.protos.DescriptorProto
                 * @classdesc Represents a ReservedRange.
                 * @implements IReservedRange
                 * @constructor
                 * @param {perfetto.protos.DescriptorProto.IReservedRange=} [p] Properties to set
                 */
                function ReservedRange(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * ReservedRange start.
                 * @member {number} start
                 * @memberof perfetto.protos.DescriptorProto.ReservedRange
                 * @instance
                 */
                ReservedRange.prototype.start = 0;

                /**
                 * ReservedRange end.
                 * @member {number} end
                 * @memberof perfetto.protos.DescriptorProto.ReservedRange
                 * @instance
                 */
                ReservedRange.prototype.end = 0;

                /**
                 * Creates a new ReservedRange instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.DescriptorProto.ReservedRange
                 * @static
                 * @param {perfetto.protos.DescriptorProto.IReservedRange=} [properties] Properties to set
                 * @returns {perfetto.protos.DescriptorProto.ReservedRange} ReservedRange instance
                 */
                ReservedRange.create = function create(properties) {
                    return new ReservedRange(properties);
                };

                /**
                 * Encodes the specified ReservedRange message. Does not implicitly {@link perfetto.protos.DescriptorProto.ReservedRange.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.DescriptorProto.ReservedRange
                 * @static
                 * @param {perfetto.protos.DescriptorProto.IReservedRange} m ReservedRange message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ReservedRange.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.start != null && Object.hasOwnProperty.call(m, "start"))
                        w.uint32(8).int32(m.start);
                    if (m.end != null && Object.hasOwnProperty.call(m, "end"))
                        w.uint32(16).int32(m.end);
                    return w;
                };

                /**
                 * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link perfetto.protos.DescriptorProto.ReservedRange.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.DescriptorProto.ReservedRange
                 * @static
                 * @param {perfetto.protos.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ReservedRange.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a ReservedRange message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.DescriptorProto.ReservedRange
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.DescriptorProto.ReservedRange} ReservedRange
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ReservedRange.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DescriptorProto.ReservedRange();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.start = r.int32();
                            break;
                        case 2:
                            m.end = r.int32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a ReservedRange message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.DescriptorProto.ReservedRange
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.DescriptorProto.ReservedRange} ReservedRange
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ReservedRange.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a ReservedRange message.
                 * @function verify
                 * @memberof perfetto.protos.DescriptorProto.ReservedRange
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ReservedRange.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.start != null && m.hasOwnProperty("start")) {
                        if (!$util.isInteger(m.start))
                            return "start: integer expected";
                    }
                    if (m.end != null && m.hasOwnProperty("end")) {
                        if (!$util.isInteger(m.end))
                            return "end: integer expected";
                    }
                    return null;
                };

                /**
                 * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.DescriptorProto.ReservedRange
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.DescriptorProto.ReservedRange} ReservedRange
                 */
                ReservedRange.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.DescriptorProto.ReservedRange)
                        return d;
                    var m = new $root.perfetto.protos.DescriptorProto.ReservedRange();
                    if (d.start != null) {
                        m.start = d.start | 0;
                    }
                    if (d.end != null) {
                        m.end = d.end | 0;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a ReservedRange message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.DescriptorProto.ReservedRange
                 * @static
                 * @param {perfetto.protos.DescriptorProto.ReservedRange} m ReservedRange
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ReservedRange.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.start = 0;
                        d.end = 0;
                    }
                    if (m.start != null && m.hasOwnProperty("start")) {
                        d.start = m.start;
                    }
                    if (m.end != null && m.hasOwnProperty("end")) {
                        d.end = m.end;
                    }
                    return d;
                };

                /**
                 * Converts this ReservedRange to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.DescriptorProto.ReservedRange
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ReservedRange.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return ReservedRange;
            })();

            return DescriptorProto;
        })();

        protos.FieldDescriptorProto = (function() {

            /**
             * Properties of a FieldDescriptorProto.
             * @memberof perfetto.protos
             * @interface IFieldDescriptorProto
             * @property {string|null} [name] FieldDescriptorProto name
             * @property {number|null} [number] FieldDescriptorProto number
             * @property {perfetto.protos.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label
             * @property {perfetto.protos.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type
             * @property {string|null} [typeName] FieldDescriptorProto typeName
             * @property {string|null} [extendee] FieldDescriptorProto extendee
             * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue
             * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex
             */

            /**
             * Constructs a new FieldDescriptorProto.
             * @memberof perfetto.protos
             * @classdesc Represents a FieldDescriptorProto.
             * @implements IFieldDescriptorProto
             * @constructor
             * @param {perfetto.protos.IFieldDescriptorProto=} [p] Properties to set
             */
            function FieldDescriptorProto(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * FieldDescriptorProto name.
             * @member {string} name
             * @memberof perfetto.protos.FieldDescriptorProto
             * @instance
             */
            FieldDescriptorProto.prototype.name = "";

            /**
             * FieldDescriptorProto number.
             * @member {number} number
             * @memberof perfetto.protos.FieldDescriptorProto
             * @instance
             */
            FieldDescriptorProto.prototype.number = 0;

            /**
             * FieldDescriptorProto label.
             * @member {perfetto.protos.FieldDescriptorProto.Label} label
             * @memberof perfetto.protos.FieldDescriptorProto
             * @instance
             */
            FieldDescriptorProto.prototype.label = 1;

            /**
             * FieldDescriptorProto type.
             * @member {perfetto.protos.FieldDescriptorProto.Type} type
             * @memberof perfetto.protos.FieldDescriptorProto
             * @instance
             */
            FieldDescriptorProto.prototype.type = 1;

            /**
             * FieldDescriptorProto typeName.
             * @member {string} typeName
             * @memberof perfetto.protos.FieldDescriptorProto
             * @instance
             */
            FieldDescriptorProto.prototype.typeName = "";

            /**
             * FieldDescriptorProto extendee.
             * @member {string} extendee
             * @memberof perfetto.protos.FieldDescriptorProto
             * @instance
             */
            FieldDescriptorProto.prototype.extendee = "";

            /**
             * FieldDescriptorProto defaultValue.
             * @member {string} defaultValue
             * @memberof perfetto.protos.FieldDescriptorProto
             * @instance
             */
            FieldDescriptorProto.prototype.defaultValue = "";

            /**
             * FieldDescriptorProto oneofIndex.
             * @member {number} oneofIndex
             * @memberof perfetto.protos.FieldDescriptorProto
             * @instance
             */
            FieldDescriptorProto.prototype.oneofIndex = 0;

            /**
             * Creates a new FieldDescriptorProto instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.FieldDescriptorProto
             * @static
             * @param {perfetto.protos.IFieldDescriptorProto=} [properties] Properties to set
             * @returns {perfetto.protos.FieldDescriptorProto} FieldDescriptorProto instance
             */
            FieldDescriptorProto.create = function create(properties) {
                return new FieldDescriptorProto(properties);
            };

            /**
             * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link perfetto.protos.FieldDescriptorProto.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.FieldDescriptorProto
             * @static
             * @param {perfetto.protos.IFieldDescriptorProto} m FieldDescriptorProto message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FieldDescriptorProto.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                if (m.extendee != null && Object.hasOwnProperty.call(m, "extendee"))
                    w.uint32(18).string(m.extendee);
                if (m.number != null && Object.hasOwnProperty.call(m, "number"))
                    w.uint32(24).int32(m.number);
                if (m.label != null && Object.hasOwnProperty.call(m, "label"))
                    w.uint32(32).int32(m.label);
                if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                    w.uint32(40).int32(m.type);
                if (m.typeName != null && Object.hasOwnProperty.call(m, "typeName"))
                    w.uint32(50).string(m.typeName);
                if (m.defaultValue != null && Object.hasOwnProperty.call(m, "defaultValue"))
                    w.uint32(58).string(m.defaultValue);
                if (m.oneofIndex != null && Object.hasOwnProperty.call(m, "oneofIndex"))
                    w.uint32(72).int32(m.oneofIndex);
                return w;
            };

            /**
             * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link perfetto.protos.FieldDescriptorProto.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.FieldDescriptorProto
             * @static
             * @param {perfetto.protos.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a FieldDescriptorProto message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.FieldDescriptorProto
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.FieldDescriptorProto} FieldDescriptorProto
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FieldDescriptorProto.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FieldDescriptorProto();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    case 3:
                        m.number = r.int32();
                        break;
                    case 4:
                        m.label = r.int32();
                        break;
                    case 5:
                        m.type = r.int32();
                        break;
                    case 6:
                        m.typeName = r.string();
                        break;
                    case 2:
                        m.extendee = r.string();
                        break;
                    case 7:
                        m.defaultValue = r.string();
                        break;
                    case 9:
                        m.oneofIndex = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.FieldDescriptorProto
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.FieldDescriptorProto} FieldDescriptorProto
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a FieldDescriptorProto message.
             * @function verify
             * @memberof perfetto.protos.FieldDescriptorProto
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            FieldDescriptorProto.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.number != null && m.hasOwnProperty("number")) {
                    if (!$util.isInteger(m.number))
                        return "number: integer expected";
                }
                if (m.label != null && m.hasOwnProperty("label")) {
                    switch (m.label) {
                    default:
                        return "label: enum value expected";
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    switch (m.type) {
                    default:
                        return "type: enum value expected";
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                    case 6:
                    case 7:
                    case 8:
                    case 9:
                    case 10:
                    case 11:
                    case 12:
                    case 13:
                    case 14:
                    case 15:
                    case 16:
                    case 17:
                    case 18:
                        break;
                    }
                }
                if (m.typeName != null && m.hasOwnProperty("typeName")) {
                    if (!$util.isString(m.typeName))
                        return "typeName: string expected";
                }
                if (m.extendee != null && m.hasOwnProperty("extendee")) {
                    if (!$util.isString(m.extendee))
                        return "extendee: string expected";
                }
                if (m.defaultValue != null && m.hasOwnProperty("defaultValue")) {
                    if (!$util.isString(m.defaultValue))
                        return "defaultValue: string expected";
                }
                if (m.oneofIndex != null && m.hasOwnProperty("oneofIndex")) {
                    if (!$util.isInteger(m.oneofIndex))
                        return "oneofIndex: integer expected";
                }
                return null;
            };

            /**
             * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.FieldDescriptorProto
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.FieldDescriptorProto} FieldDescriptorProto
             */
            FieldDescriptorProto.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.FieldDescriptorProto)
                    return d;
                var m = new $root.perfetto.protos.FieldDescriptorProto();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.number != null) {
                    m.number = d.number | 0;
                }
                switch (d.label) {
                case "LABEL_OPTIONAL":
                case 1:
                    m.label = 1;
                    break;
                case "LABEL_REQUIRED":
                case 2:
                    m.label = 2;
                    break;
                case "LABEL_REPEATED":
                case 3:
                    m.label = 3;
                    break;
                }
                switch (d.type) {
                case "TYPE_DOUBLE":
                case 1:
                    m.type = 1;
                    break;
                case "TYPE_FLOAT":
                case 2:
                    m.type = 2;
                    break;
                case "TYPE_INT64":
                case 3:
                    m.type = 3;
                    break;
                case "TYPE_UINT64":
                case 4:
                    m.type = 4;
                    break;
                case "TYPE_INT32":
                case 5:
                    m.type = 5;
                    break;
                case "TYPE_FIXED64":
                case 6:
                    m.type = 6;
                    break;
                case "TYPE_FIXED32":
                case 7:
                    m.type = 7;
                    break;
                case "TYPE_BOOL":
                case 8:
                    m.type = 8;
                    break;
                case "TYPE_STRING":
                case 9:
                    m.type = 9;
                    break;
                case "TYPE_GROUP":
                case 10:
                    m.type = 10;
                    break;
                case "TYPE_MESSAGE":
                case 11:
                    m.type = 11;
                    break;
                case "TYPE_BYTES":
                case 12:
                    m.type = 12;
                    break;
                case "TYPE_UINT32":
                case 13:
                    m.type = 13;
                    break;
                case "TYPE_ENUM":
                case 14:
                    m.type = 14;
                    break;
                case "TYPE_SFIXED32":
                case 15:
                    m.type = 15;
                    break;
                case "TYPE_SFIXED64":
                case 16:
                    m.type = 16;
                    break;
                case "TYPE_SINT32":
                case 17:
                    m.type = 17;
                    break;
                case "TYPE_SINT64":
                case 18:
                    m.type = 18;
                    break;
                }
                if (d.typeName != null) {
                    m.typeName = String(d.typeName);
                }
                if (d.extendee != null) {
                    m.extendee = String(d.extendee);
                }
                if (d.defaultValue != null) {
                    m.defaultValue = String(d.defaultValue);
                }
                if (d.oneofIndex != null) {
                    m.oneofIndex = d.oneofIndex | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.FieldDescriptorProto
             * @static
             * @param {perfetto.protos.FieldDescriptorProto} m FieldDescriptorProto
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            FieldDescriptorProto.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                    d.extendee = "";
                    d.number = 0;
                    d.label = o.enums === String ? "LABEL_OPTIONAL" : 1;
                    d.type = o.enums === String ? "TYPE_DOUBLE" : 1;
                    d.typeName = "";
                    d.defaultValue = "";
                    d.oneofIndex = 0;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.extendee != null && m.hasOwnProperty("extendee")) {
                    d.extendee = m.extendee;
                }
                if (m.number != null && m.hasOwnProperty("number")) {
                    d.number = m.number;
                }
                if (m.label != null && m.hasOwnProperty("label")) {
                    d.label = o.enums === String ? $root.perfetto.protos.FieldDescriptorProto.Label[m.label] : m.label;
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    d.type = o.enums === String ? $root.perfetto.protos.FieldDescriptorProto.Type[m.type] : m.type;
                }
                if (m.typeName != null && m.hasOwnProperty("typeName")) {
                    d.typeName = m.typeName;
                }
                if (m.defaultValue != null && m.hasOwnProperty("defaultValue")) {
                    d.defaultValue = m.defaultValue;
                }
                if (m.oneofIndex != null && m.hasOwnProperty("oneofIndex")) {
                    d.oneofIndex = m.oneofIndex;
                }
                return d;
            };

            /**
             * Converts this FieldDescriptorProto to JSON.
             * @function toJSON
             * @memberof perfetto.protos.FieldDescriptorProto
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            FieldDescriptorProto.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * Type enum.
             * @name perfetto.protos.FieldDescriptorProto.Type
             * @enum {number}
             * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value
             * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value
             * @property {number} TYPE_INT64=3 TYPE_INT64 value
             * @property {number} TYPE_UINT64=4 TYPE_UINT64 value
             * @property {number} TYPE_INT32=5 TYPE_INT32 value
             * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value
             * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value
             * @property {number} TYPE_BOOL=8 TYPE_BOOL value
             * @property {number} TYPE_STRING=9 TYPE_STRING value
             * @property {number} TYPE_GROUP=10 TYPE_GROUP value
             * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value
             * @property {number} TYPE_BYTES=12 TYPE_BYTES value
             * @property {number} TYPE_UINT32=13 TYPE_UINT32 value
             * @property {number} TYPE_ENUM=14 TYPE_ENUM value
             * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value
             * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value
             * @property {number} TYPE_SINT32=17 TYPE_SINT32 value
             * @property {number} TYPE_SINT64=18 TYPE_SINT64 value
             */
            FieldDescriptorProto.Type = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[1] = "TYPE_DOUBLE"] = 1;
                values[valuesById[2] = "TYPE_FLOAT"] = 2;
                values[valuesById[3] = "TYPE_INT64"] = 3;
                values[valuesById[4] = "TYPE_UINT64"] = 4;
                values[valuesById[5] = "TYPE_INT32"] = 5;
                values[valuesById[6] = "TYPE_FIXED64"] = 6;
                values[valuesById[7] = "TYPE_FIXED32"] = 7;
                values[valuesById[8] = "TYPE_BOOL"] = 8;
                values[valuesById[9] = "TYPE_STRING"] = 9;
                values[valuesById[10] = "TYPE_GROUP"] = 10;
                values[valuesById[11] = "TYPE_MESSAGE"] = 11;
                values[valuesById[12] = "TYPE_BYTES"] = 12;
                values[valuesById[13] = "TYPE_UINT32"] = 13;
                values[valuesById[14] = "TYPE_ENUM"] = 14;
                values[valuesById[15] = "TYPE_SFIXED32"] = 15;
                values[valuesById[16] = "TYPE_SFIXED64"] = 16;
                values[valuesById[17] = "TYPE_SINT32"] = 17;
                values[valuesById[18] = "TYPE_SINT64"] = 18;
                return values;
            })();

            /**
             * Label enum.
             * @name perfetto.protos.FieldDescriptorProto.Label
             * @enum {number}
             * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value
             * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value
             * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value
             */
            FieldDescriptorProto.Label = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[1] = "LABEL_OPTIONAL"] = 1;
                values[valuesById[2] = "LABEL_REQUIRED"] = 2;
                values[valuesById[3] = "LABEL_REPEATED"] = 3;
                return values;
            })();

            return FieldDescriptorProto;
        })();

        protos.OneofDescriptorProto = (function() {

            /**
             * Properties of an OneofDescriptorProto.
             * @memberof perfetto.protos
             * @interface IOneofDescriptorProto
             * @property {string|null} [name] OneofDescriptorProto name
             * @property {perfetto.protos.IOneofOptions|null} [options] OneofDescriptorProto options
             */

            /**
             * Constructs a new OneofDescriptorProto.
             * @memberof perfetto.protos
             * @classdesc Represents an OneofDescriptorProto.
             * @implements IOneofDescriptorProto
             * @constructor
             * @param {perfetto.protos.IOneofDescriptorProto=} [p] Properties to set
             */
            function OneofDescriptorProto(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * OneofDescriptorProto name.
             * @member {string} name
             * @memberof perfetto.protos.OneofDescriptorProto
             * @instance
             */
            OneofDescriptorProto.prototype.name = "";

            /**
             * OneofDescriptorProto options.
             * @member {perfetto.protos.IOneofOptions|null|undefined} options
             * @memberof perfetto.protos.OneofDescriptorProto
             * @instance
             */
            OneofDescriptorProto.prototype.options = null;

            /**
             * Creates a new OneofDescriptorProto instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.OneofDescriptorProto
             * @static
             * @param {perfetto.protos.IOneofDescriptorProto=} [properties] Properties to set
             * @returns {perfetto.protos.OneofDescriptorProto} OneofDescriptorProto instance
             */
            OneofDescriptorProto.create = function create(properties) {
                return new OneofDescriptorProto(properties);
            };

            /**
             * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link perfetto.protos.OneofDescriptorProto.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.OneofDescriptorProto
             * @static
             * @param {perfetto.protos.IOneofDescriptorProto} m OneofDescriptorProto message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            OneofDescriptorProto.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                if (m.options != null && Object.hasOwnProperty.call(m, "options"))
                    $root.perfetto.protos.OneofOptions.encode(m.options, w.uint32(18).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link perfetto.protos.OneofDescriptorProto.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.OneofDescriptorProto
             * @static
             * @param {perfetto.protos.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an OneofDescriptorProto message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.OneofDescriptorProto
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.OneofDescriptorProto} OneofDescriptorProto
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            OneofDescriptorProto.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.OneofDescriptorProto();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    case 2:
                        m.options = $root.perfetto.protos.OneofOptions.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.OneofDescriptorProto
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.OneofDescriptorProto} OneofDescriptorProto
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an OneofDescriptorProto message.
             * @function verify
             * @memberof perfetto.protos.OneofDescriptorProto
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            OneofDescriptorProto.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.options != null && m.hasOwnProperty("options")) {
                    {
                        var e = $root.perfetto.protos.OneofOptions.verify(m.options);
                        if (e)
                            return "options." + e;
                    }
                }
                return null;
            };

            /**
             * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.OneofDescriptorProto
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.OneofDescriptorProto} OneofDescriptorProto
             */
            OneofDescriptorProto.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.OneofDescriptorProto)
                    return d;
                var m = new $root.perfetto.protos.OneofDescriptorProto();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.options != null) {
                    if (typeof d.options !== "object")
                        throw TypeError(".perfetto.protos.OneofDescriptorProto.options: object expected");
                    m.options = $root.perfetto.protos.OneofOptions.fromObject(d.options);
                }
                return m;
            };

            /**
             * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.OneofDescriptorProto
             * @static
             * @param {perfetto.protos.OneofDescriptorProto} m OneofDescriptorProto
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            OneofDescriptorProto.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                    d.options = null;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.options != null && m.hasOwnProperty("options")) {
                    d.options = $root.perfetto.protos.OneofOptions.toObject(m.options, o);
                }
                return d;
            };

            /**
             * Converts this OneofDescriptorProto to JSON.
             * @function toJSON
             * @memberof perfetto.protos.OneofDescriptorProto
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            OneofDescriptorProto.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return OneofDescriptorProto;
        })();

        protos.EnumDescriptorProto = (function() {

            /**
             * Properties of an EnumDescriptorProto.
             * @memberof perfetto.protos
             * @interface IEnumDescriptorProto
             * @property {string|null} [name] EnumDescriptorProto name
             * @property {Array.<perfetto.protos.IEnumValueDescriptorProto>|null} [value] EnumDescriptorProto value
             * @property {Array.<string>|null} [reservedName] EnumDescriptorProto reservedName
             */

            /**
             * Constructs a new EnumDescriptorProto.
             * @memberof perfetto.protos
             * @classdesc Represents an EnumDescriptorProto.
             * @implements IEnumDescriptorProto
             * @constructor
             * @param {perfetto.protos.IEnumDescriptorProto=} [p] Properties to set
             */
            function EnumDescriptorProto(p) {
                this.value = [];
                this.reservedName = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * EnumDescriptorProto name.
             * @member {string} name
             * @memberof perfetto.protos.EnumDescriptorProto
             * @instance
             */
            EnumDescriptorProto.prototype.name = "";

            /**
             * EnumDescriptorProto value.
             * @member {Array.<perfetto.protos.IEnumValueDescriptorProto>} value
             * @memberof perfetto.protos.EnumDescriptorProto
             * @instance
             */
            EnumDescriptorProto.prototype.value = $util.emptyArray;

            /**
             * EnumDescriptorProto reservedName.
             * @member {Array.<string>} reservedName
             * @memberof perfetto.protos.EnumDescriptorProto
             * @instance
             */
            EnumDescriptorProto.prototype.reservedName = $util.emptyArray;

            /**
             * Creates a new EnumDescriptorProto instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.EnumDescriptorProto
             * @static
             * @param {perfetto.protos.IEnumDescriptorProto=} [properties] Properties to set
             * @returns {perfetto.protos.EnumDescriptorProto} EnumDescriptorProto instance
             */
            EnumDescriptorProto.create = function create(properties) {
                return new EnumDescriptorProto(properties);
            };

            /**
             * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link perfetto.protos.EnumDescriptorProto.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.EnumDescriptorProto
             * @static
             * @param {perfetto.protos.IEnumDescriptorProto} m EnumDescriptorProto message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EnumDescriptorProto.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                if (m.value != null && m.value.length) {
                    for (var i = 0; i < m.value.length; ++i)
                        $root.perfetto.protos.EnumValueDescriptorProto.encode(m.value[i], w.uint32(18).fork()).ldelim();
                }
                if (m.reservedName != null && m.reservedName.length) {
                    for (var i = 0; i < m.reservedName.length; ++i)
                        w.uint32(42).string(m.reservedName[i]);
                }
                return w;
            };

            /**
             * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link perfetto.protos.EnumDescriptorProto.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.EnumDescriptorProto
             * @static
             * @param {perfetto.protos.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an EnumDescriptorProto message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.EnumDescriptorProto
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.EnumDescriptorProto} EnumDescriptorProto
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EnumDescriptorProto.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.EnumDescriptorProto();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    case 2:
                        if (!(m.value && m.value.length))
                            m.value = [];
                        m.value.push($root.perfetto.protos.EnumValueDescriptorProto.decode(r, r.uint32()));
                        break;
                    case 5:
                        if (!(m.reservedName && m.reservedName.length))
                            m.reservedName = [];
                        m.reservedName.push(r.string());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.EnumDescriptorProto
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.EnumDescriptorProto} EnumDescriptorProto
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an EnumDescriptorProto message.
             * @function verify
             * @memberof perfetto.protos.EnumDescriptorProto
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            EnumDescriptorProto.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.value != null && m.hasOwnProperty("value")) {
                    if (!Array.isArray(m.value))
                        return "value: array expected";
                    for (var i = 0; i < m.value.length; ++i) {
                        {
                            var e = $root.perfetto.protos.EnumValueDescriptorProto.verify(m.value[i]);
                            if (e)
                                return "value." + e;
                        }
                    }
                }
                if (m.reservedName != null && m.hasOwnProperty("reservedName")) {
                    if (!Array.isArray(m.reservedName))
                        return "reservedName: array expected";
                    for (var i = 0; i < m.reservedName.length; ++i) {
                        if (!$util.isString(m.reservedName[i]))
                            return "reservedName: string[] expected";
                    }
                }
                return null;
            };

            /**
             * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.EnumDescriptorProto
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.EnumDescriptorProto} EnumDescriptorProto
             */
            EnumDescriptorProto.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.EnumDescriptorProto)
                    return d;
                var m = new $root.perfetto.protos.EnumDescriptorProto();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.value) {
                    if (!Array.isArray(d.value))
                        throw TypeError(".perfetto.protos.EnumDescriptorProto.value: array expected");
                    m.value = [];
                    for (var i = 0; i < d.value.length; ++i) {
                        if (typeof d.value[i] !== "object")
                            throw TypeError(".perfetto.protos.EnumDescriptorProto.value: object expected");
                        m.value[i] = $root.perfetto.protos.EnumValueDescriptorProto.fromObject(d.value[i]);
                    }
                }
                if (d.reservedName) {
                    if (!Array.isArray(d.reservedName))
                        throw TypeError(".perfetto.protos.EnumDescriptorProto.reservedName: array expected");
                    m.reservedName = [];
                    for (var i = 0; i < d.reservedName.length; ++i) {
                        m.reservedName[i] = String(d.reservedName[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.EnumDescriptorProto
             * @static
             * @param {perfetto.protos.EnumDescriptorProto} m EnumDescriptorProto
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            EnumDescriptorProto.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.value = [];
                    d.reservedName = [];
                }
                if (o.defaults) {
                    d.name = "";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.value && m.value.length) {
                    d.value = [];
                    for (var j = 0; j < m.value.length; ++j) {
                        d.value[j] = $root.perfetto.protos.EnumValueDescriptorProto.toObject(m.value[j], o);
                    }
                }
                if (m.reservedName && m.reservedName.length) {
                    d.reservedName = [];
                    for (var j = 0; j < m.reservedName.length; ++j) {
                        d.reservedName[j] = m.reservedName[j];
                    }
                }
                return d;
            };

            /**
             * Converts this EnumDescriptorProto to JSON.
             * @function toJSON
             * @memberof perfetto.protos.EnumDescriptorProto
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            EnumDescriptorProto.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return EnumDescriptorProto;
        })();

        protos.EnumValueDescriptorProto = (function() {

            /**
             * Properties of an EnumValueDescriptorProto.
             * @memberof perfetto.protos
             * @interface IEnumValueDescriptorProto
             * @property {string|null} [name] EnumValueDescriptorProto name
             * @property {number|null} [number] EnumValueDescriptorProto number
             */

            /**
             * Constructs a new EnumValueDescriptorProto.
             * @memberof perfetto.protos
             * @classdesc Represents an EnumValueDescriptorProto.
             * @implements IEnumValueDescriptorProto
             * @constructor
             * @param {perfetto.protos.IEnumValueDescriptorProto=} [p] Properties to set
             */
            function EnumValueDescriptorProto(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * EnumValueDescriptorProto name.
             * @member {string} name
             * @memberof perfetto.protos.EnumValueDescriptorProto
             * @instance
             */
            EnumValueDescriptorProto.prototype.name = "";

            /**
             * EnumValueDescriptorProto number.
             * @member {number} number
             * @memberof perfetto.protos.EnumValueDescriptorProto
             * @instance
             */
            EnumValueDescriptorProto.prototype.number = 0;

            /**
             * Creates a new EnumValueDescriptorProto instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.EnumValueDescriptorProto
             * @static
             * @param {perfetto.protos.IEnumValueDescriptorProto=} [properties] Properties to set
             * @returns {perfetto.protos.EnumValueDescriptorProto} EnumValueDescriptorProto instance
             */
            EnumValueDescriptorProto.create = function create(properties) {
                return new EnumValueDescriptorProto(properties);
            };

            /**
             * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link perfetto.protos.EnumValueDescriptorProto.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.EnumValueDescriptorProto
             * @static
             * @param {perfetto.protos.IEnumValueDescriptorProto} m EnumValueDescriptorProto message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EnumValueDescriptorProto.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                if (m.number != null && Object.hasOwnProperty.call(m, "number"))
                    w.uint32(16).int32(m.number);
                return w;
            };

            /**
             * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link perfetto.protos.EnumValueDescriptorProto.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.EnumValueDescriptorProto
             * @static
             * @param {perfetto.protos.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an EnumValueDescriptorProto message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.EnumValueDescriptorProto
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.EnumValueDescriptorProto} EnumValueDescriptorProto
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EnumValueDescriptorProto.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.EnumValueDescriptorProto();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    case 2:
                        m.number = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.EnumValueDescriptorProto
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.EnumValueDescriptorProto} EnumValueDescriptorProto
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an EnumValueDescriptorProto message.
             * @function verify
             * @memberof perfetto.protos.EnumValueDescriptorProto
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            EnumValueDescriptorProto.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.number != null && m.hasOwnProperty("number")) {
                    if (!$util.isInteger(m.number))
                        return "number: integer expected";
                }
                return null;
            };

            /**
             * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.EnumValueDescriptorProto
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.EnumValueDescriptorProto} EnumValueDescriptorProto
             */
            EnumValueDescriptorProto.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.EnumValueDescriptorProto)
                    return d;
                var m = new $root.perfetto.protos.EnumValueDescriptorProto();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.number != null) {
                    m.number = d.number | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.EnumValueDescriptorProto
             * @static
             * @param {perfetto.protos.EnumValueDescriptorProto} m EnumValueDescriptorProto
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            EnumValueDescriptorProto.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                    d.number = 0;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.number != null && m.hasOwnProperty("number")) {
                    d.number = m.number;
                }
                return d;
            };

            /**
             * Converts this EnumValueDescriptorProto to JSON.
             * @function toJSON
             * @memberof perfetto.protos.EnumValueDescriptorProto
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            EnumValueDescriptorProto.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return EnumValueDescriptorProto;
        })();

        protos.OneofOptions = (function() {

            /**
             * Properties of an OneofOptions.
             * @memberof perfetto.protos
             * @interface IOneofOptions
             */

            /**
             * Constructs a new OneofOptions.
             * @memberof perfetto.protos
             * @classdesc Represents an OneofOptions.
             * @implements IOneofOptions
             * @constructor
             * @param {perfetto.protos.IOneofOptions=} [p] Properties to set
             */
            function OneofOptions(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Creates a new OneofOptions instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.OneofOptions
             * @static
             * @param {perfetto.protos.IOneofOptions=} [properties] Properties to set
             * @returns {perfetto.protos.OneofOptions} OneofOptions instance
             */
            OneofOptions.create = function create(properties) {
                return new OneofOptions(properties);
            };

            /**
             * Encodes the specified OneofOptions message. Does not implicitly {@link perfetto.protos.OneofOptions.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.OneofOptions
             * @static
             * @param {perfetto.protos.IOneofOptions} m OneofOptions message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            OneofOptions.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                return w;
            };

            /**
             * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link perfetto.protos.OneofOptions.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.OneofOptions
             * @static
             * @param {perfetto.protos.IOneofOptions} message OneofOptions message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            OneofOptions.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an OneofOptions message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.OneofOptions
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.OneofOptions} OneofOptions
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            OneofOptions.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.OneofOptions();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an OneofOptions message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.OneofOptions
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.OneofOptions} OneofOptions
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            OneofOptions.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an OneofOptions message.
             * @function verify
             * @memberof perfetto.protos.OneofOptions
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            OneofOptions.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.OneofOptions
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.OneofOptions} OneofOptions
             */
            OneofOptions.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.OneofOptions)
                    return d;
                return new $root.perfetto.protos.OneofOptions();
            };

            /**
             * Creates a plain object from an OneofOptions message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.OneofOptions
             * @static
             * @param {perfetto.protos.OneofOptions} m OneofOptions
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            OneofOptions.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this OneofOptions to JSON.
             * @function toJSON
             * @memberof perfetto.protos.OneofOptions
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            OneofOptions.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return OneofOptions;
        })();

        protos.AndroidGameInterventionList = (function() {

            /**
             * Properties of an AndroidGameInterventionList.
             * @memberof perfetto.protos
             * @interface IAndroidGameInterventionList
             * @property {Array.<perfetto.protos.AndroidGameInterventionList.IGamePackageInfo>|null} [gamePackages] AndroidGameInterventionList gamePackages
             * @property {boolean|null} [parseError] AndroidGameInterventionList parseError
             * @property {boolean|null} [readError] AndroidGameInterventionList readError
             */

            /**
             * Constructs a new AndroidGameInterventionList.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidGameInterventionList.
             * @implements IAndroidGameInterventionList
             * @constructor
             * @param {perfetto.protos.IAndroidGameInterventionList=} [p] Properties to set
             */
            function AndroidGameInterventionList(p) {
                this.gamePackages = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidGameInterventionList gamePackages.
             * @member {Array.<perfetto.protos.AndroidGameInterventionList.IGamePackageInfo>} gamePackages
             * @memberof perfetto.protos.AndroidGameInterventionList
             * @instance
             */
            AndroidGameInterventionList.prototype.gamePackages = $util.emptyArray;

            /**
             * AndroidGameInterventionList parseError.
             * @member {boolean} parseError
             * @memberof perfetto.protos.AndroidGameInterventionList
             * @instance
             */
            AndroidGameInterventionList.prototype.parseError = false;

            /**
             * AndroidGameInterventionList readError.
             * @member {boolean} readError
             * @memberof perfetto.protos.AndroidGameInterventionList
             * @instance
             */
            AndroidGameInterventionList.prototype.readError = false;

            /**
             * Creates a new AndroidGameInterventionList instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidGameInterventionList
             * @static
             * @param {perfetto.protos.IAndroidGameInterventionList=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidGameInterventionList} AndroidGameInterventionList instance
             */
            AndroidGameInterventionList.create = function create(properties) {
                return new AndroidGameInterventionList(properties);
            };

            /**
             * Encodes the specified AndroidGameInterventionList message. Does not implicitly {@link perfetto.protos.AndroidGameInterventionList.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidGameInterventionList
             * @static
             * @param {perfetto.protos.IAndroidGameInterventionList} m AndroidGameInterventionList message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidGameInterventionList.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.gamePackages != null && m.gamePackages.length) {
                    for (var i = 0; i < m.gamePackages.length; ++i)
                        $root.perfetto.protos.AndroidGameInterventionList.GamePackageInfo.encode(m.gamePackages[i], w.uint32(10).fork()).ldelim();
                }
                if (m.parseError != null && Object.hasOwnProperty.call(m, "parseError"))
                    w.uint32(16).bool(m.parseError);
                if (m.readError != null && Object.hasOwnProperty.call(m, "readError"))
                    w.uint32(24).bool(m.readError);
                return w;
            };

            /**
             * Encodes the specified AndroidGameInterventionList message, length delimited. Does not implicitly {@link perfetto.protos.AndroidGameInterventionList.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidGameInterventionList
             * @static
             * @param {perfetto.protos.IAndroidGameInterventionList} message AndroidGameInterventionList message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidGameInterventionList.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidGameInterventionList message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidGameInterventionList
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidGameInterventionList} AndroidGameInterventionList
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidGameInterventionList.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidGameInterventionList();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.gamePackages && m.gamePackages.length))
                            m.gamePackages = [];
                        m.gamePackages.push($root.perfetto.protos.AndroidGameInterventionList.GamePackageInfo.decode(r, r.uint32()));
                        break;
                    case 2:
                        m.parseError = r.bool();
                        break;
                    case 3:
                        m.readError = r.bool();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidGameInterventionList message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidGameInterventionList
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidGameInterventionList} AndroidGameInterventionList
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidGameInterventionList.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidGameInterventionList message.
             * @function verify
             * @memberof perfetto.protos.AndroidGameInterventionList
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidGameInterventionList.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.gamePackages != null && m.hasOwnProperty("gamePackages")) {
                    if (!Array.isArray(m.gamePackages))
                        return "gamePackages: array expected";
                    for (var i = 0; i < m.gamePackages.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidGameInterventionList.GamePackageInfo.verify(m.gamePackages[i]);
                            if (e)
                                return "gamePackages." + e;
                        }
                    }
                }
                if (m.parseError != null && m.hasOwnProperty("parseError")) {
                    if (typeof m.parseError !== "boolean")
                        return "parseError: boolean expected";
                }
                if (m.readError != null && m.hasOwnProperty("readError")) {
                    if (typeof m.readError !== "boolean")
                        return "readError: boolean expected";
                }
                return null;
            };

            /**
             * Creates an AndroidGameInterventionList message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidGameInterventionList
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidGameInterventionList} AndroidGameInterventionList
             */
            AndroidGameInterventionList.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidGameInterventionList)
                    return d;
                var m = new $root.perfetto.protos.AndroidGameInterventionList();
                if (d.gamePackages) {
                    if (!Array.isArray(d.gamePackages))
                        throw TypeError(".perfetto.protos.AndroidGameInterventionList.gamePackages: array expected");
                    m.gamePackages = [];
                    for (var i = 0; i < d.gamePackages.length; ++i) {
                        if (typeof d.gamePackages[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidGameInterventionList.gamePackages: object expected");
                        m.gamePackages[i] = $root.perfetto.protos.AndroidGameInterventionList.GamePackageInfo.fromObject(d.gamePackages[i]);
                    }
                }
                if (d.parseError != null) {
                    m.parseError = Boolean(d.parseError);
                }
                if (d.readError != null) {
                    m.readError = Boolean(d.readError);
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidGameInterventionList message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidGameInterventionList
             * @static
             * @param {perfetto.protos.AndroidGameInterventionList} m AndroidGameInterventionList
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidGameInterventionList.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.gamePackages = [];
                }
                if (o.defaults) {
                    d.parseError = false;
                    d.readError = false;
                }
                if (m.gamePackages && m.gamePackages.length) {
                    d.gamePackages = [];
                    for (var j = 0; j < m.gamePackages.length; ++j) {
                        d.gamePackages[j] = $root.perfetto.protos.AndroidGameInterventionList.GamePackageInfo.toObject(m.gamePackages[j], o);
                    }
                }
                if (m.parseError != null && m.hasOwnProperty("parseError")) {
                    d.parseError = m.parseError;
                }
                if (m.readError != null && m.hasOwnProperty("readError")) {
                    d.readError = m.readError;
                }
                return d;
            };

            /**
             * Converts this AndroidGameInterventionList to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidGameInterventionList
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidGameInterventionList.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidGameInterventionList.GameModeInfo = (function() {

                /**
                 * Properties of a GameModeInfo.
                 * @memberof perfetto.protos.AndroidGameInterventionList
                 * @interface IGameModeInfo
                 * @property {number|null} [mode] GameModeInfo mode
                 * @property {boolean|null} [useAngle] GameModeInfo useAngle
                 * @property {number|null} [resolutionDownscale] GameModeInfo resolutionDownscale
                 * @property {number|null} [fps] GameModeInfo fps
                 */

                /**
                 * Constructs a new GameModeInfo.
                 * @memberof perfetto.protos.AndroidGameInterventionList
                 * @classdesc Represents a GameModeInfo.
                 * @implements IGameModeInfo
                 * @constructor
                 * @param {perfetto.protos.AndroidGameInterventionList.IGameModeInfo=} [p] Properties to set
                 */
                function GameModeInfo(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * GameModeInfo mode.
                 * @member {number} mode
                 * @memberof perfetto.protos.AndroidGameInterventionList.GameModeInfo
                 * @instance
                 */
                GameModeInfo.prototype.mode = 0;

                /**
                 * GameModeInfo useAngle.
                 * @member {boolean} useAngle
                 * @memberof perfetto.protos.AndroidGameInterventionList.GameModeInfo
                 * @instance
                 */
                GameModeInfo.prototype.useAngle = false;

                /**
                 * GameModeInfo resolutionDownscale.
                 * @member {number} resolutionDownscale
                 * @memberof perfetto.protos.AndroidGameInterventionList.GameModeInfo
                 * @instance
                 */
                GameModeInfo.prototype.resolutionDownscale = 0;

                /**
                 * GameModeInfo fps.
                 * @member {number} fps
                 * @memberof perfetto.protos.AndroidGameInterventionList.GameModeInfo
                 * @instance
                 */
                GameModeInfo.prototype.fps = 0;

                /**
                 * Creates a new GameModeInfo instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidGameInterventionList.GameModeInfo
                 * @static
                 * @param {perfetto.protos.AndroidGameInterventionList.IGameModeInfo=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidGameInterventionList.GameModeInfo} GameModeInfo instance
                 */
                GameModeInfo.create = function create(properties) {
                    return new GameModeInfo(properties);
                };

                /**
                 * Encodes the specified GameModeInfo message. Does not implicitly {@link perfetto.protos.AndroidGameInterventionList.GameModeInfo.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidGameInterventionList.GameModeInfo
                 * @static
                 * @param {perfetto.protos.AndroidGameInterventionList.IGameModeInfo} m GameModeInfo message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                GameModeInfo.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.mode != null && Object.hasOwnProperty.call(m, "mode"))
                        w.uint32(8).uint32(m.mode);
                    if (m.useAngle != null && Object.hasOwnProperty.call(m, "useAngle"))
                        w.uint32(16).bool(m.useAngle);
                    if (m.resolutionDownscale != null && Object.hasOwnProperty.call(m, "resolutionDownscale"))
                        w.uint32(29).float(m.resolutionDownscale);
                    if (m.fps != null && Object.hasOwnProperty.call(m, "fps"))
                        w.uint32(37).float(m.fps);
                    return w;
                };

                /**
                 * Encodes the specified GameModeInfo message, length delimited. Does not implicitly {@link perfetto.protos.AndroidGameInterventionList.GameModeInfo.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidGameInterventionList.GameModeInfo
                 * @static
                 * @param {perfetto.protos.AndroidGameInterventionList.IGameModeInfo} message GameModeInfo message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                GameModeInfo.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a GameModeInfo message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidGameInterventionList.GameModeInfo
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidGameInterventionList.GameModeInfo} GameModeInfo
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                GameModeInfo.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidGameInterventionList.GameModeInfo();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.mode = r.uint32();
                            break;
                        case 2:
                            m.useAngle = r.bool();
                            break;
                        case 3:
                            m.resolutionDownscale = r.float();
                            break;
                        case 4:
                            m.fps = r.float();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a GameModeInfo message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidGameInterventionList.GameModeInfo
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidGameInterventionList.GameModeInfo} GameModeInfo
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                GameModeInfo.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a GameModeInfo message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidGameInterventionList.GameModeInfo
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                GameModeInfo.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.mode != null && m.hasOwnProperty("mode")) {
                        if (!$util.isInteger(m.mode))
                            return "mode: integer expected";
                    }
                    if (m.useAngle != null && m.hasOwnProperty("useAngle")) {
                        if (typeof m.useAngle !== "boolean")
                            return "useAngle: boolean expected";
                    }
                    if (m.resolutionDownscale != null && m.hasOwnProperty("resolutionDownscale")) {
                        if (typeof m.resolutionDownscale !== "number")
                            return "resolutionDownscale: number expected";
                    }
                    if (m.fps != null && m.hasOwnProperty("fps")) {
                        if (typeof m.fps !== "number")
                            return "fps: number expected";
                    }
                    return null;
                };

                /**
                 * Creates a GameModeInfo message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidGameInterventionList.GameModeInfo
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidGameInterventionList.GameModeInfo} GameModeInfo
                 */
                GameModeInfo.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidGameInterventionList.GameModeInfo)
                        return d;
                    var m = new $root.perfetto.protos.AndroidGameInterventionList.GameModeInfo();
                    if (d.mode != null) {
                        m.mode = d.mode >>> 0;
                    }
                    if (d.useAngle != null) {
                        m.useAngle = Boolean(d.useAngle);
                    }
                    if (d.resolutionDownscale != null) {
                        m.resolutionDownscale = Number(d.resolutionDownscale);
                    }
                    if (d.fps != null) {
                        m.fps = Number(d.fps);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a GameModeInfo message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidGameInterventionList.GameModeInfo
                 * @static
                 * @param {perfetto.protos.AndroidGameInterventionList.GameModeInfo} m GameModeInfo
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                GameModeInfo.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.mode = 0;
                        d.useAngle = false;
                        d.resolutionDownscale = 0;
                        d.fps = 0;
                    }
                    if (m.mode != null && m.hasOwnProperty("mode")) {
                        d.mode = m.mode;
                    }
                    if (m.useAngle != null && m.hasOwnProperty("useAngle")) {
                        d.useAngle = m.useAngle;
                    }
                    if (m.resolutionDownscale != null && m.hasOwnProperty("resolutionDownscale")) {
                        d.resolutionDownscale = o.json && !isFinite(m.resolutionDownscale) ? String(m.resolutionDownscale) : m.resolutionDownscale;
                    }
                    if (m.fps != null && m.hasOwnProperty("fps")) {
                        d.fps = o.json && !isFinite(m.fps) ? String(m.fps) : m.fps;
                    }
                    return d;
                };

                /**
                 * Converts this GameModeInfo to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidGameInterventionList.GameModeInfo
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                GameModeInfo.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return GameModeInfo;
            })();

            AndroidGameInterventionList.GamePackageInfo = (function() {

                /**
                 * Properties of a GamePackageInfo.
                 * @memberof perfetto.protos.AndroidGameInterventionList
                 * @interface IGamePackageInfo
                 * @property {string|null} [name] GamePackageInfo name
                 * @property {number|null} [uid] GamePackageInfo uid
                 * @property {number|null} [currentMode] GamePackageInfo currentMode
                 * @property {Array.<perfetto.protos.AndroidGameInterventionList.IGameModeInfo>|null} [gameModeInfo] GamePackageInfo gameModeInfo
                 */

                /**
                 * Constructs a new GamePackageInfo.
                 * @memberof perfetto.protos.AndroidGameInterventionList
                 * @classdesc Represents a GamePackageInfo.
                 * @implements IGamePackageInfo
                 * @constructor
                 * @param {perfetto.protos.AndroidGameInterventionList.IGamePackageInfo=} [p] Properties to set
                 */
                function GamePackageInfo(p) {
                    this.gameModeInfo = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * GamePackageInfo name.
                 * @member {string} name
                 * @memberof perfetto.protos.AndroidGameInterventionList.GamePackageInfo
                 * @instance
                 */
                GamePackageInfo.prototype.name = "";

                /**
                 * GamePackageInfo uid.
                 * @member {number} uid
                 * @memberof perfetto.protos.AndroidGameInterventionList.GamePackageInfo
                 * @instance
                 */
                GamePackageInfo.prototype.uid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * GamePackageInfo currentMode.
                 * @member {number} currentMode
                 * @memberof perfetto.protos.AndroidGameInterventionList.GamePackageInfo
                 * @instance
                 */
                GamePackageInfo.prototype.currentMode = 0;

                /**
                 * GamePackageInfo gameModeInfo.
                 * @member {Array.<perfetto.protos.AndroidGameInterventionList.IGameModeInfo>} gameModeInfo
                 * @memberof perfetto.protos.AndroidGameInterventionList.GamePackageInfo
                 * @instance
                 */
                GamePackageInfo.prototype.gameModeInfo = $util.emptyArray;

                /**
                 * Creates a new GamePackageInfo instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidGameInterventionList.GamePackageInfo
                 * @static
                 * @param {perfetto.protos.AndroidGameInterventionList.IGamePackageInfo=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidGameInterventionList.GamePackageInfo} GamePackageInfo instance
                 */
                GamePackageInfo.create = function create(properties) {
                    return new GamePackageInfo(properties);
                };

                /**
                 * Encodes the specified GamePackageInfo message. Does not implicitly {@link perfetto.protos.AndroidGameInterventionList.GamePackageInfo.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidGameInterventionList.GamePackageInfo
                 * @static
                 * @param {perfetto.protos.AndroidGameInterventionList.IGamePackageInfo} m GamePackageInfo message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                GamePackageInfo.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(10).string(m.name);
                    if (m.uid != null && Object.hasOwnProperty.call(m, "uid"))
                        w.uint32(16).uint64(m.uid);
                    if (m.currentMode != null && Object.hasOwnProperty.call(m, "currentMode"))
                        w.uint32(24).uint32(m.currentMode);
                    if (m.gameModeInfo != null && m.gameModeInfo.length) {
                        for (var i = 0; i < m.gameModeInfo.length; ++i)
                            $root.perfetto.protos.AndroidGameInterventionList.GameModeInfo.encode(m.gameModeInfo[i], w.uint32(34).fork()).ldelim();
                    }
                    return w;
                };

                /**
                 * Encodes the specified GamePackageInfo message, length delimited. Does not implicitly {@link perfetto.protos.AndroidGameInterventionList.GamePackageInfo.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidGameInterventionList.GamePackageInfo
                 * @static
                 * @param {perfetto.protos.AndroidGameInterventionList.IGamePackageInfo} message GamePackageInfo message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                GamePackageInfo.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a GamePackageInfo message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidGameInterventionList.GamePackageInfo
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidGameInterventionList.GamePackageInfo} GamePackageInfo
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                GamePackageInfo.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidGameInterventionList.GamePackageInfo();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.name = r.string();
                            break;
                        case 2:
                            m.uid = r.uint64();
                            break;
                        case 3:
                            m.currentMode = r.uint32();
                            break;
                        case 4:
                            if (!(m.gameModeInfo && m.gameModeInfo.length))
                                m.gameModeInfo = [];
                            m.gameModeInfo.push($root.perfetto.protos.AndroidGameInterventionList.GameModeInfo.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a GamePackageInfo message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidGameInterventionList.GamePackageInfo
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidGameInterventionList.GamePackageInfo} GamePackageInfo
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                GamePackageInfo.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a GamePackageInfo message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidGameInterventionList.GamePackageInfo
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                GamePackageInfo.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    if (m.uid != null && m.hasOwnProperty("uid")) {
                        if (!$util.isInteger(m.uid) && !(m.uid && $util.isInteger(m.uid.low) && $util.isInteger(m.uid.high)))
                            return "uid: integer|Long expected";
                    }
                    if (m.currentMode != null && m.hasOwnProperty("currentMode")) {
                        if (!$util.isInteger(m.currentMode))
                            return "currentMode: integer expected";
                    }
                    if (m.gameModeInfo != null && m.hasOwnProperty("gameModeInfo")) {
                        if (!Array.isArray(m.gameModeInfo))
                            return "gameModeInfo: array expected";
                        for (var i = 0; i < m.gameModeInfo.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidGameInterventionList.GameModeInfo.verify(m.gameModeInfo[i]);
                                if (e)
                                    return "gameModeInfo." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates a GamePackageInfo message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidGameInterventionList.GamePackageInfo
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidGameInterventionList.GamePackageInfo} GamePackageInfo
                 */
                GamePackageInfo.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidGameInterventionList.GamePackageInfo)
                        return d;
                    var m = new $root.perfetto.protos.AndroidGameInterventionList.GamePackageInfo();
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    if (d.uid != null) {
                        if ($util.Long)
                            (m.uid = $util.Long.fromValue(d.uid)).unsigned = true;
                        else if (typeof d.uid === "string")
                            m.uid = parseInt(d.uid, 10);
                        else if (typeof d.uid === "number")
                            m.uid = d.uid;
                        else if (typeof d.uid === "object")
                            m.uid = new $util.LongBits(d.uid.low >>> 0, d.uid.high >>> 0).toNumber(true);
                    }
                    if (d.currentMode != null) {
                        m.currentMode = d.currentMode >>> 0;
                    }
                    if (d.gameModeInfo) {
                        if (!Array.isArray(d.gameModeInfo))
                            throw TypeError(".perfetto.protos.AndroidGameInterventionList.GamePackageInfo.gameModeInfo: array expected");
                        m.gameModeInfo = [];
                        for (var i = 0; i < d.gameModeInfo.length; ++i) {
                            if (typeof d.gameModeInfo[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidGameInterventionList.GamePackageInfo.gameModeInfo: object expected");
                            m.gameModeInfo[i] = $root.perfetto.protos.AndroidGameInterventionList.GameModeInfo.fromObject(d.gameModeInfo[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a GamePackageInfo message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidGameInterventionList.GamePackageInfo
                 * @static
                 * @param {perfetto.protos.AndroidGameInterventionList.GamePackageInfo} m GamePackageInfo
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                GamePackageInfo.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.gameModeInfo = [];
                    }
                    if (o.defaults) {
                        d.name = "";
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.uid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.uid = o.longs === String ? "0" : 0;
                        d.currentMode = 0;
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    if (m.uid != null && m.hasOwnProperty("uid")) {
                        if (typeof m.uid === "number")
                            d.uid = o.longs === String ? String(m.uid) : m.uid;
                        else
                            d.uid = o.longs === String ? $util.Long.prototype.toString.call(m.uid) : o.longs === Number ? new $util.LongBits(m.uid.low >>> 0, m.uid.high >>> 0).toNumber(true) : m.uid;
                    }
                    if (m.currentMode != null && m.hasOwnProperty("currentMode")) {
                        d.currentMode = m.currentMode;
                    }
                    if (m.gameModeInfo && m.gameModeInfo.length) {
                        d.gameModeInfo = [];
                        for (var j = 0; j < m.gameModeInfo.length; ++j) {
                            d.gameModeInfo[j] = $root.perfetto.protos.AndroidGameInterventionList.GameModeInfo.toObject(m.gameModeInfo[j], o);
                        }
                    }
                    return d;
                };

                /**
                 * Converts this GamePackageInfo to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidGameInterventionList.GamePackageInfo
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                GamePackageInfo.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return GamePackageInfo;
            })();

            return AndroidGameInterventionList;
        })();

        protos.AndroidLogPacket = (function() {

            /**
             * Properties of an AndroidLogPacket.
             * @memberof perfetto.protos
             * @interface IAndroidLogPacket
             * @property {Array.<perfetto.protos.AndroidLogPacket.ILogEvent>|null} [events] AndroidLogPacket events
             * @property {perfetto.protos.AndroidLogPacket.IStats|null} [stats] AndroidLogPacket stats
             */

            /**
             * Constructs a new AndroidLogPacket.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidLogPacket.
             * @implements IAndroidLogPacket
             * @constructor
             * @param {perfetto.protos.IAndroidLogPacket=} [p] Properties to set
             */
            function AndroidLogPacket(p) {
                this.events = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidLogPacket events.
             * @member {Array.<perfetto.protos.AndroidLogPacket.ILogEvent>} events
             * @memberof perfetto.protos.AndroidLogPacket
             * @instance
             */
            AndroidLogPacket.prototype.events = $util.emptyArray;

            /**
             * AndroidLogPacket stats.
             * @member {perfetto.protos.AndroidLogPacket.IStats|null|undefined} stats
             * @memberof perfetto.protos.AndroidLogPacket
             * @instance
             */
            AndroidLogPacket.prototype.stats = null;

            /**
             * Creates a new AndroidLogPacket instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidLogPacket
             * @static
             * @param {perfetto.protos.IAndroidLogPacket=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidLogPacket} AndroidLogPacket instance
             */
            AndroidLogPacket.create = function create(properties) {
                return new AndroidLogPacket(properties);
            };

            /**
             * Encodes the specified AndroidLogPacket message. Does not implicitly {@link perfetto.protos.AndroidLogPacket.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidLogPacket
             * @static
             * @param {perfetto.protos.IAndroidLogPacket} m AndroidLogPacket message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidLogPacket.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.events != null && m.events.length) {
                    for (var i = 0; i < m.events.length; ++i)
                        $root.perfetto.protos.AndroidLogPacket.LogEvent.encode(m.events[i], w.uint32(10).fork()).ldelim();
                }
                if (m.stats != null && Object.hasOwnProperty.call(m, "stats"))
                    $root.perfetto.protos.AndroidLogPacket.Stats.encode(m.stats, w.uint32(18).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified AndroidLogPacket message, length delimited. Does not implicitly {@link perfetto.protos.AndroidLogPacket.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidLogPacket
             * @static
             * @param {perfetto.protos.IAndroidLogPacket} message AndroidLogPacket message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidLogPacket.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidLogPacket message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidLogPacket
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidLogPacket} AndroidLogPacket
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidLogPacket.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidLogPacket();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.events && m.events.length))
                            m.events = [];
                        m.events.push($root.perfetto.protos.AndroidLogPacket.LogEvent.decode(r, r.uint32()));
                        break;
                    case 2:
                        m.stats = $root.perfetto.protos.AndroidLogPacket.Stats.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidLogPacket message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidLogPacket
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidLogPacket} AndroidLogPacket
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidLogPacket.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidLogPacket message.
             * @function verify
             * @memberof perfetto.protos.AndroidLogPacket
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidLogPacket.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.events != null && m.hasOwnProperty("events")) {
                    if (!Array.isArray(m.events))
                        return "events: array expected";
                    for (var i = 0; i < m.events.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidLogPacket.LogEvent.verify(m.events[i]);
                            if (e)
                                return "events." + e;
                        }
                    }
                }
                if (m.stats != null && m.hasOwnProperty("stats")) {
                    {
                        var e = $root.perfetto.protos.AndroidLogPacket.Stats.verify(m.stats);
                        if (e)
                            return "stats." + e;
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidLogPacket message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidLogPacket
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidLogPacket} AndroidLogPacket
             */
            AndroidLogPacket.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidLogPacket)
                    return d;
                var m = new $root.perfetto.protos.AndroidLogPacket();
                if (d.events) {
                    if (!Array.isArray(d.events))
                        throw TypeError(".perfetto.protos.AndroidLogPacket.events: array expected");
                    m.events = [];
                    for (var i = 0; i < d.events.length; ++i) {
                        if (typeof d.events[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidLogPacket.events: object expected");
                        m.events[i] = $root.perfetto.protos.AndroidLogPacket.LogEvent.fromObject(d.events[i]);
                    }
                }
                if (d.stats != null) {
                    if (typeof d.stats !== "object")
                        throw TypeError(".perfetto.protos.AndroidLogPacket.stats: object expected");
                    m.stats = $root.perfetto.protos.AndroidLogPacket.Stats.fromObject(d.stats);
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidLogPacket message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidLogPacket
             * @static
             * @param {perfetto.protos.AndroidLogPacket} m AndroidLogPacket
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidLogPacket.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.events = [];
                }
                if (o.defaults) {
                    d.stats = null;
                }
                if (m.events && m.events.length) {
                    d.events = [];
                    for (var j = 0; j < m.events.length; ++j) {
                        d.events[j] = $root.perfetto.protos.AndroidLogPacket.LogEvent.toObject(m.events[j], o);
                    }
                }
                if (m.stats != null && m.hasOwnProperty("stats")) {
                    d.stats = $root.perfetto.protos.AndroidLogPacket.Stats.toObject(m.stats, o);
                }
                return d;
            };

            /**
             * Converts this AndroidLogPacket to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidLogPacket
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidLogPacket.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidLogPacket.LogEvent = (function() {

                /**
                 * Properties of a LogEvent.
                 * @memberof perfetto.protos.AndroidLogPacket
                 * @interface ILogEvent
                 * @property {perfetto.protos.AndroidLogId|null} [logId] LogEvent logId
                 * @property {number|null} [pid] LogEvent pid
                 * @property {number|null} [tid] LogEvent tid
                 * @property {number|null} [uid] LogEvent uid
                 * @property {number|null} [timestamp] LogEvent timestamp
                 * @property {string|null} [tag] LogEvent tag
                 * @property {perfetto.protos.AndroidLogPriority|null} [prio] LogEvent prio
                 * @property {string|null} [message] LogEvent message
                 * @property {Array.<perfetto.protos.AndroidLogPacket.LogEvent.IArg>|null} [args] LogEvent args
                 */

                /**
                 * Constructs a new LogEvent.
                 * @memberof perfetto.protos.AndroidLogPacket
                 * @classdesc Represents a LogEvent.
                 * @implements ILogEvent
                 * @constructor
                 * @param {perfetto.protos.AndroidLogPacket.ILogEvent=} [p] Properties to set
                 */
                function LogEvent(p) {
                    this.args = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * LogEvent logId.
                 * @member {perfetto.protos.AndroidLogId} logId
                 * @memberof perfetto.protos.AndroidLogPacket.LogEvent
                 * @instance
                 */
                LogEvent.prototype.logId = 0;

                /**
                 * LogEvent pid.
                 * @member {number} pid
                 * @memberof perfetto.protos.AndroidLogPacket.LogEvent
                 * @instance
                 */
                LogEvent.prototype.pid = 0;

                /**
                 * LogEvent tid.
                 * @member {number} tid
                 * @memberof perfetto.protos.AndroidLogPacket.LogEvent
                 * @instance
                 */
                LogEvent.prototype.tid = 0;

                /**
                 * LogEvent uid.
                 * @member {number} uid
                 * @memberof perfetto.protos.AndroidLogPacket.LogEvent
                 * @instance
                 */
                LogEvent.prototype.uid = 0;

                /**
                 * LogEvent timestamp.
                 * @member {number} timestamp
                 * @memberof perfetto.protos.AndroidLogPacket.LogEvent
                 * @instance
                 */
                LogEvent.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * LogEvent tag.
                 * @member {string} tag
                 * @memberof perfetto.protos.AndroidLogPacket.LogEvent
                 * @instance
                 */
                LogEvent.prototype.tag = "";

                /**
                 * LogEvent prio.
                 * @member {perfetto.protos.AndroidLogPriority} prio
                 * @memberof perfetto.protos.AndroidLogPacket.LogEvent
                 * @instance
                 */
                LogEvent.prototype.prio = 0;

                /**
                 * LogEvent message.
                 * @member {string} message
                 * @memberof perfetto.protos.AndroidLogPacket.LogEvent
                 * @instance
                 */
                LogEvent.prototype.message = "";

                /**
                 * LogEvent args.
                 * @member {Array.<perfetto.protos.AndroidLogPacket.LogEvent.IArg>} args
                 * @memberof perfetto.protos.AndroidLogPacket.LogEvent
                 * @instance
                 */
                LogEvent.prototype.args = $util.emptyArray;

                /**
                 * Creates a new LogEvent instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidLogPacket.LogEvent
                 * @static
                 * @param {perfetto.protos.AndroidLogPacket.ILogEvent=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidLogPacket.LogEvent} LogEvent instance
                 */
                LogEvent.create = function create(properties) {
                    return new LogEvent(properties);
                };

                /**
                 * Encodes the specified LogEvent message. Does not implicitly {@link perfetto.protos.AndroidLogPacket.LogEvent.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidLogPacket.LogEvent
                 * @static
                 * @param {perfetto.protos.AndroidLogPacket.ILogEvent} m LogEvent message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                LogEvent.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.logId != null && Object.hasOwnProperty.call(m, "logId"))
                        w.uint32(8).int32(m.logId);
                    if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                        w.uint32(16).int32(m.pid);
                    if (m.tid != null && Object.hasOwnProperty.call(m, "tid"))
                        w.uint32(24).int32(m.tid);
                    if (m.uid != null && Object.hasOwnProperty.call(m, "uid"))
                        w.uint32(32).int32(m.uid);
                    if (m.timestamp != null && Object.hasOwnProperty.call(m, "timestamp"))
                        w.uint32(40).uint64(m.timestamp);
                    if (m.tag != null && Object.hasOwnProperty.call(m, "tag"))
                        w.uint32(50).string(m.tag);
                    if (m.prio != null && Object.hasOwnProperty.call(m, "prio"))
                        w.uint32(56).int32(m.prio);
                    if (m.message != null && Object.hasOwnProperty.call(m, "message"))
                        w.uint32(66).string(m.message);
                    if (m.args != null && m.args.length) {
                        for (var i = 0; i < m.args.length; ++i)
                            $root.perfetto.protos.AndroidLogPacket.LogEvent.Arg.encode(m.args[i], w.uint32(74).fork()).ldelim();
                    }
                    return w;
                };

                /**
                 * Encodes the specified LogEvent message, length delimited. Does not implicitly {@link perfetto.protos.AndroidLogPacket.LogEvent.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidLogPacket.LogEvent
                 * @static
                 * @param {perfetto.protos.AndroidLogPacket.ILogEvent} message LogEvent message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                LogEvent.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a LogEvent message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidLogPacket.LogEvent
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidLogPacket.LogEvent} LogEvent
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                LogEvent.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidLogPacket.LogEvent();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.logId = r.int32();
                            break;
                        case 2:
                            m.pid = r.int32();
                            break;
                        case 3:
                            m.tid = r.int32();
                            break;
                        case 4:
                            m.uid = r.int32();
                            break;
                        case 5:
                            m.timestamp = r.uint64();
                            break;
                        case 6:
                            m.tag = r.string();
                            break;
                        case 7:
                            m.prio = r.int32();
                            break;
                        case 8:
                            m.message = r.string();
                            break;
                        case 9:
                            if (!(m.args && m.args.length))
                                m.args = [];
                            m.args.push($root.perfetto.protos.AndroidLogPacket.LogEvent.Arg.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a LogEvent message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidLogPacket.LogEvent
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidLogPacket.LogEvent} LogEvent
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                LogEvent.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a LogEvent message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidLogPacket.LogEvent
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                LogEvent.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.logId != null && m.hasOwnProperty("logId")) {
                        switch (m.logId) {
                        default:
                            return "logId: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                        case 6:
                        case 7:
                            break;
                        }
                    }
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        if (!$util.isInteger(m.pid))
                            return "pid: integer expected";
                    }
                    if (m.tid != null && m.hasOwnProperty("tid")) {
                        if (!$util.isInteger(m.tid))
                            return "tid: integer expected";
                    }
                    if (m.uid != null && m.hasOwnProperty("uid")) {
                        if (!$util.isInteger(m.uid))
                            return "uid: integer expected";
                    }
                    if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                        if (!$util.isInteger(m.timestamp) && !(m.timestamp && $util.isInteger(m.timestamp.low) && $util.isInteger(m.timestamp.high)))
                            return "timestamp: integer|Long expected";
                    }
                    if (m.tag != null && m.hasOwnProperty("tag")) {
                        if (!$util.isString(m.tag))
                            return "tag: string expected";
                    }
                    if (m.prio != null && m.hasOwnProperty("prio")) {
                        switch (m.prio) {
                        default:
                            return "prio: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                        case 6:
                        case 7:
                            break;
                        }
                    }
                    if (m.message != null && m.hasOwnProperty("message")) {
                        if (!$util.isString(m.message))
                            return "message: string expected";
                    }
                    if (m.args != null && m.hasOwnProperty("args")) {
                        if (!Array.isArray(m.args))
                            return "args: array expected";
                        for (var i = 0; i < m.args.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidLogPacket.LogEvent.Arg.verify(m.args[i]);
                                if (e)
                                    return "args." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates a LogEvent message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidLogPacket.LogEvent
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidLogPacket.LogEvent} LogEvent
                 */
                LogEvent.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidLogPacket.LogEvent)
                        return d;
                    var m = new $root.perfetto.protos.AndroidLogPacket.LogEvent();
                    switch (d.logId) {
                    case "LID_DEFAULT":
                    case 0:
                        m.logId = 0;
                        break;
                    case "LID_RADIO":
                    case 1:
                        m.logId = 1;
                        break;
                    case "LID_EVENTS":
                    case 2:
                        m.logId = 2;
                        break;
                    case "LID_SYSTEM":
                    case 3:
                        m.logId = 3;
                        break;
                    case "LID_CRASH":
                    case 4:
                        m.logId = 4;
                        break;
                    case "LID_STATS":
                    case 5:
                        m.logId = 5;
                        break;
                    case "LID_SECURITY":
                    case 6:
                        m.logId = 6;
                        break;
                    case "LID_KERNEL":
                    case 7:
                        m.logId = 7;
                        break;
                    }
                    if (d.pid != null) {
                        m.pid = d.pid | 0;
                    }
                    if (d.tid != null) {
                        m.tid = d.tid | 0;
                    }
                    if (d.uid != null) {
                        m.uid = d.uid | 0;
                    }
                    if (d.timestamp != null) {
                        if ($util.Long)
                            (m.timestamp = $util.Long.fromValue(d.timestamp)).unsigned = true;
                        else if (typeof d.timestamp === "string")
                            m.timestamp = parseInt(d.timestamp, 10);
                        else if (typeof d.timestamp === "number")
                            m.timestamp = d.timestamp;
                        else if (typeof d.timestamp === "object")
                            m.timestamp = new $util.LongBits(d.timestamp.low >>> 0, d.timestamp.high >>> 0).toNumber(true);
                    }
                    if (d.tag != null) {
                        m.tag = String(d.tag);
                    }
                    switch (d.prio) {
                    case "PRIO_UNSPECIFIED":
                    case 0:
                        m.prio = 0;
                        break;
                    case "PRIO_UNUSED":
                    case 1:
                        m.prio = 1;
                        break;
                    case "PRIO_VERBOSE":
                    case 2:
                        m.prio = 2;
                        break;
                    case "PRIO_DEBUG":
                    case 3:
                        m.prio = 3;
                        break;
                    case "PRIO_INFO":
                    case 4:
                        m.prio = 4;
                        break;
                    case "PRIO_WARN":
                    case 5:
                        m.prio = 5;
                        break;
                    case "PRIO_ERROR":
                    case 6:
                        m.prio = 6;
                        break;
                    case "PRIO_FATAL":
                    case 7:
                        m.prio = 7;
                        break;
                    }
                    if (d.message != null) {
                        m.message = String(d.message);
                    }
                    if (d.args) {
                        if (!Array.isArray(d.args))
                            throw TypeError(".perfetto.protos.AndroidLogPacket.LogEvent.args: array expected");
                        m.args = [];
                        for (var i = 0; i < d.args.length; ++i) {
                            if (typeof d.args[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidLogPacket.LogEvent.args: object expected");
                            m.args[i] = $root.perfetto.protos.AndroidLogPacket.LogEvent.Arg.fromObject(d.args[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a LogEvent message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidLogPacket.LogEvent
                 * @static
                 * @param {perfetto.protos.AndroidLogPacket.LogEvent} m LogEvent
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                LogEvent.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.args = [];
                    }
                    if (o.defaults) {
                        d.logId = o.enums === String ? "LID_DEFAULT" : 0;
                        d.pid = 0;
                        d.tid = 0;
                        d.uid = 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.timestamp = o.longs === String ? "0" : 0;
                        d.tag = "";
                        d.prio = o.enums === String ? "PRIO_UNSPECIFIED" : 0;
                        d.message = "";
                    }
                    if (m.logId != null && m.hasOwnProperty("logId")) {
                        d.logId = o.enums === String ? $root.perfetto.protos.AndroidLogId[m.logId] : m.logId;
                    }
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        d.pid = m.pid;
                    }
                    if (m.tid != null && m.hasOwnProperty("tid")) {
                        d.tid = m.tid;
                    }
                    if (m.uid != null && m.hasOwnProperty("uid")) {
                        d.uid = m.uid;
                    }
                    if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                        if (typeof m.timestamp === "number")
                            d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp;
                        else
                            d.timestamp = o.longs === String ? $util.Long.prototype.toString.call(m.timestamp) : o.longs === Number ? new $util.LongBits(m.timestamp.low >>> 0, m.timestamp.high >>> 0).toNumber(true) : m.timestamp;
                    }
                    if (m.tag != null && m.hasOwnProperty("tag")) {
                        d.tag = m.tag;
                    }
                    if (m.prio != null && m.hasOwnProperty("prio")) {
                        d.prio = o.enums === String ? $root.perfetto.protos.AndroidLogPriority[m.prio] : m.prio;
                    }
                    if (m.message != null && m.hasOwnProperty("message")) {
                        d.message = m.message;
                    }
                    if (m.args && m.args.length) {
                        d.args = [];
                        for (var j = 0; j < m.args.length; ++j) {
                            d.args[j] = $root.perfetto.protos.AndroidLogPacket.LogEvent.Arg.toObject(m.args[j], o);
                        }
                    }
                    return d;
                };

                /**
                 * Converts this LogEvent to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidLogPacket.LogEvent
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                LogEvent.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                LogEvent.Arg = (function() {

                    /**
                     * Properties of an Arg.
                     * @memberof perfetto.protos.AndroidLogPacket.LogEvent
                     * @interface IArg
                     * @property {string|null} [name] Arg name
                     * @property {number|null} [intValue] Arg intValue
                     * @property {number|null} [floatValue] Arg floatValue
                     * @property {string|null} [stringValue] Arg stringValue
                     */

                    /**
                     * Constructs a new Arg.
                     * @memberof perfetto.protos.AndroidLogPacket.LogEvent
                     * @classdesc Represents an Arg.
                     * @implements IArg
                     * @constructor
                     * @param {perfetto.protos.AndroidLogPacket.LogEvent.IArg=} [p] Properties to set
                     */
                    function Arg(p) {
                        if (p)
                            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                                if (p[ks[i]] != null)
                                    this[ks[i]] = p[ks[i]];
                    }

                    /**
                     * Arg name.
                     * @member {string} name
                     * @memberof perfetto.protos.AndroidLogPacket.LogEvent.Arg
                     * @instance
                     */
                    Arg.prototype.name = "";

                    /**
                     * Arg intValue.
                     * @member {number} intValue
                     * @memberof perfetto.protos.AndroidLogPacket.LogEvent.Arg
                     * @instance
                     */
                    Arg.prototype.intValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                    /**
                     * Arg floatValue.
                     * @member {number} floatValue
                     * @memberof perfetto.protos.AndroidLogPacket.LogEvent.Arg
                     * @instance
                     */
                    Arg.prototype.floatValue = 0;

                    /**
                     * Arg stringValue.
                     * @member {string} stringValue
                     * @memberof perfetto.protos.AndroidLogPacket.LogEvent.Arg
                     * @instance
                     */
                    Arg.prototype.stringValue = "";

                    // OneOf field names bound to virtual getters and setters
                    var $oneOfFields;

                    /**
                     * Arg value.
                     * @member {"intValue"|"floatValue"|"stringValue"|undefined} value
                     * @memberof perfetto.protos.AndroidLogPacket.LogEvent.Arg
                     * @instance
                     */
                    Object.defineProperty(Arg.prototype, "value", {
                        get: $util.oneOfGetter($oneOfFields = ["intValue", "floatValue", "stringValue"]),
                        set: $util.oneOfSetter($oneOfFields)
                    });

                    /**
                     * Creates a new Arg instance using the specified properties.
                     * @function create
                     * @memberof perfetto.protos.AndroidLogPacket.LogEvent.Arg
                     * @static
                     * @param {perfetto.protos.AndroidLogPacket.LogEvent.IArg=} [properties] Properties to set
                     * @returns {perfetto.protos.AndroidLogPacket.LogEvent.Arg} Arg instance
                     */
                    Arg.create = function create(properties) {
                        return new Arg(properties);
                    };

                    /**
                     * Encodes the specified Arg message. Does not implicitly {@link perfetto.protos.AndroidLogPacket.LogEvent.Arg.verify|verify} messages.
                     * @function encode
                     * @memberof perfetto.protos.AndroidLogPacket.LogEvent.Arg
                     * @static
                     * @param {perfetto.protos.AndroidLogPacket.LogEvent.IArg} m Arg message or plain object to encode
                     * @param {$protobuf.Writer} [w] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Arg.encode = function encode(m, w) {
                        if (!w)
                            w = $Writer.create();
                        if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                            w.uint32(10).string(m.name);
                        if (m.intValue != null && Object.hasOwnProperty.call(m, "intValue"))
                            w.uint32(16).int64(m.intValue);
                        if (m.floatValue != null && Object.hasOwnProperty.call(m, "floatValue"))
                            w.uint32(29).float(m.floatValue);
                        if (m.stringValue != null && Object.hasOwnProperty.call(m, "stringValue"))
                            w.uint32(34).string(m.stringValue);
                        return w;
                    };

                    /**
                     * Encodes the specified Arg message, length delimited. Does not implicitly {@link perfetto.protos.AndroidLogPacket.LogEvent.Arg.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof perfetto.protos.AndroidLogPacket.LogEvent.Arg
                     * @static
                     * @param {perfetto.protos.AndroidLogPacket.LogEvent.IArg} message Arg message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Arg.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes an Arg message from the specified reader or buffer.
                     * @function decode
                     * @memberof perfetto.protos.AndroidLogPacket.LogEvent.Arg
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                     * @param {number} [l] Message length if known beforehand
                     * @returns {perfetto.protos.AndroidLogPacket.LogEvent.Arg} Arg
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Arg.decode = function decode(r, l) {
                        if (!(r instanceof $Reader))
                            r = $Reader.create(r);
                        var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidLogPacket.LogEvent.Arg();
                        while (r.pos < c) {
                            var t = r.uint32();
                            switch (t >>> 3) {
                            case 1:
                                m.name = r.string();
                                break;
                            case 2:
                                m.intValue = r.int64();
                                break;
                            case 3:
                                m.floatValue = r.float();
                                break;
                            case 4:
                                m.stringValue = r.string();
                                break;
                            default:
                                r.skipType(t & 7);
                                break;
                            }
                        }
                        return m;
                    };

                    /**
                     * Decodes an Arg message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof perfetto.protos.AndroidLogPacket.LogEvent.Arg
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {perfetto.protos.AndroidLogPacket.LogEvent.Arg} Arg
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Arg.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies an Arg message.
                     * @function verify
                     * @memberof perfetto.protos.AndroidLogPacket.LogEvent.Arg
                     * @static
                     * @param {Object.<string,*>} m Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    Arg.verify = function verify(m) {
                        if (typeof m !== "object" || m === null)
                            return "object expected";
                        var p = {};
                        if (m.name != null && m.hasOwnProperty("name")) {
                            if (!$util.isString(m.name))
                                return "name: string expected";
                        }
                        if (m.intValue != null && m.hasOwnProperty("intValue")) {
                            p.value = 1;
                            if (!$util.isInteger(m.intValue) && !(m.intValue && $util.isInteger(m.intValue.low) && $util.isInteger(m.intValue.high)))
                                return "intValue: integer|Long expected";
                        }
                        if (m.floatValue != null && m.hasOwnProperty("floatValue")) {
                            if (p.value === 1)
                                return "value: multiple values";
                            p.value = 1;
                            if (typeof m.floatValue !== "number")
                                return "floatValue: number expected";
                        }
                        if (m.stringValue != null && m.hasOwnProperty("stringValue")) {
                            if (p.value === 1)
                                return "value: multiple values";
                            p.value = 1;
                            if (!$util.isString(m.stringValue))
                                return "stringValue: string expected";
                        }
                        return null;
                    };

                    /**
                     * Creates an Arg message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof perfetto.protos.AndroidLogPacket.LogEvent.Arg
                     * @static
                     * @param {Object.<string,*>} d Plain object
                     * @returns {perfetto.protos.AndroidLogPacket.LogEvent.Arg} Arg
                     */
                    Arg.fromObject = function fromObject(d) {
                        if (d instanceof $root.perfetto.protos.AndroidLogPacket.LogEvent.Arg)
                            return d;
                        var m = new $root.perfetto.protos.AndroidLogPacket.LogEvent.Arg();
                        if (d.name != null) {
                            m.name = String(d.name);
                        }
                        if (d.intValue != null) {
                            if ($util.Long)
                                (m.intValue = $util.Long.fromValue(d.intValue)).unsigned = false;
                            else if (typeof d.intValue === "string")
                                m.intValue = parseInt(d.intValue, 10);
                            else if (typeof d.intValue === "number")
                                m.intValue = d.intValue;
                            else if (typeof d.intValue === "object")
                                m.intValue = new $util.LongBits(d.intValue.low >>> 0, d.intValue.high >>> 0).toNumber();
                        }
                        if (d.floatValue != null) {
                            m.floatValue = Number(d.floatValue);
                        }
                        if (d.stringValue != null) {
                            m.stringValue = String(d.stringValue);
                        }
                        return m;
                    };

                    /**
                     * Creates a plain object from an Arg message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof perfetto.protos.AndroidLogPacket.LogEvent.Arg
                     * @static
                     * @param {perfetto.protos.AndroidLogPacket.LogEvent.Arg} m Arg
                     * @param {$protobuf.IConversionOptions} [o] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    Arg.toObject = function toObject(m, o) {
                        if (!o)
                            o = {};
                        var d = {};
                        if (o.defaults) {
                            d.name = "";
                        }
                        if (m.name != null && m.hasOwnProperty("name")) {
                            d.name = m.name;
                        }
                        if (m.intValue != null && m.hasOwnProperty("intValue")) {
                            if (typeof m.intValue === "number")
                                d.intValue = o.longs === String ? String(m.intValue) : m.intValue;
                            else
                                d.intValue = o.longs === String ? $util.Long.prototype.toString.call(m.intValue) : o.longs === Number ? new $util.LongBits(m.intValue.low >>> 0, m.intValue.high >>> 0).toNumber() : m.intValue;
                            if (o.oneofs)
                                d.value = "intValue";
                        }
                        if (m.floatValue != null && m.hasOwnProperty("floatValue")) {
                            d.floatValue = o.json && !isFinite(m.floatValue) ? String(m.floatValue) : m.floatValue;
                            if (o.oneofs)
                                d.value = "floatValue";
                        }
                        if (m.stringValue != null && m.hasOwnProperty("stringValue")) {
                            d.stringValue = m.stringValue;
                            if (o.oneofs)
                                d.value = "stringValue";
                        }
                        return d;
                    };

                    /**
                     * Converts this Arg to JSON.
                     * @function toJSON
                     * @memberof perfetto.protos.AndroidLogPacket.LogEvent.Arg
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    Arg.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                    };

                    return Arg;
                })();

                return LogEvent;
            })();

            AndroidLogPacket.Stats = (function() {

                /**
                 * Properties of a Stats.
                 * @memberof perfetto.protos.AndroidLogPacket
                 * @interface IStats
                 * @property {number|null} [numTotal] Stats numTotal
                 * @property {number|null} [numFailed] Stats numFailed
                 * @property {number|null} [numSkipped] Stats numSkipped
                 */

                /**
                 * Constructs a new Stats.
                 * @memberof perfetto.protos.AndroidLogPacket
                 * @classdesc Represents a Stats.
                 * @implements IStats
                 * @constructor
                 * @param {perfetto.protos.AndroidLogPacket.IStats=} [p] Properties to set
                 */
                function Stats(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Stats numTotal.
                 * @member {number} numTotal
                 * @memberof perfetto.protos.AndroidLogPacket.Stats
                 * @instance
                 */
                Stats.prototype.numTotal = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Stats numFailed.
                 * @member {number} numFailed
                 * @memberof perfetto.protos.AndroidLogPacket.Stats
                 * @instance
                 */
                Stats.prototype.numFailed = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Stats numSkipped.
                 * @member {number} numSkipped
                 * @memberof perfetto.protos.AndroidLogPacket.Stats
                 * @instance
                 */
                Stats.prototype.numSkipped = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Creates a new Stats instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidLogPacket.Stats
                 * @static
                 * @param {perfetto.protos.AndroidLogPacket.IStats=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidLogPacket.Stats} Stats instance
                 */
                Stats.create = function create(properties) {
                    return new Stats(properties);
                };

                /**
                 * Encodes the specified Stats message. Does not implicitly {@link perfetto.protos.AndroidLogPacket.Stats.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidLogPacket.Stats
                 * @static
                 * @param {perfetto.protos.AndroidLogPacket.IStats} m Stats message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Stats.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.numTotal != null && Object.hasOwnProperty.call(m, "numTotal"))
                        w.uint32(8).uint64(m.numTotal);
                    if (m.numFailed != null && Object.hasOwnProperty.call(m, "numFailed"))
                        w.uint32(16).uint64(m.numFailed);
                    if (m.numSkipped != null && Object.hasOwnProperty.call(m, "numSkipped"))
                        w.uint32(24).uint64(m.numSkipped);
                    return w;
                };

                /**
                 * Encodes the specified Stats message, length delimited. Does not implicitly {@link perfetto.protos.AndroidLogPacket.Stats.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidLogPacket.Stats
                 * @static
                 * @param {perfetto.protos.AndroidLogPacket.IStats} message Stats message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Stats.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Stats message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidLogPacket.Stats
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidLogPacket.Stats} Stats
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Stats.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidLogPacket.Stats();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.numTotal = r.uint64();
                            break;
                        case 2:
                            m.numFailed = r.uint64();
                            break;
                        case 3:
                            m.numSkipped = r.uint64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Stats message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidLogPacket.Stats
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidLogPacket.Stats} Stats
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Stats.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Stats message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidLogPacket.Stats
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Stats.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.numTotal != null && m.hasOwnProperty("numTotal")) {
                        if (!$util.isInteger(m.numTotal) && !(m.numTotal && $util.isInteger(m.numTotal.low) && $util.isInteger(m.numTotal.high)))
                            return "numTotal: integer|Long expected";
                    }
                    if (m.numFailed != null && m.hasOwnProperty("numFailed")) {
                        if (!$util.isInteger(m.numFailed) && !(m.numFailed && $util.isInteger(m.numFailed.low) && $util.isInteger(m.numFailed.high)))
                            return "numFailed: integer|Long expected";
                    }
                    if (m.numSkipped != null && m.hasOwnProperty("numSkipped")) {
                        if (!$util.isInteger(m.numSkipped) && !(m.numSkipped && $util.isInteger(m.numSkipped.low) && $util.isInteger(m.numSkipped.high)))
                            return "numSkipped: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a Stats message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidLogPacket.Stats
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidLogPacket.Stats} Stats
                 */
                Stats.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidLogPacket.Stats)
                        return d;
                    var m = new $root.perfetto.protos.AndroidLogPacket.Stats();
                    if (d.numTotal != null) {
                        if ($util.Long)
                            (m.numTotal = $util.Long.fromValue(d.numTotal)).unsigned = true;
                        else if (typeof d.numTotal === "string")
                            m.numTotal = parseInt(d.numTotal, 10);
                        else if (typeof d.numTotal === "number")
                            m.numTotal = d.numTotal;
                        else if (typeof d.numTotal === "object")
                            m.numTotal = new $util.LongBits(d.numTotal.low >>> 0, d.numTotal.high >>> 0).toNumber(true);
                    }
                    if (d.numFailed != null) {
                        if ($util.Long)
                            (m.numFailed = $util.Long.fromValue(d.numFailed)).unsigned = true;
                        else if (typeof d.numFailed === "string")
                            m.numFailed = parseInt(d.numFailed, 10);
                        else if (typeof d.numFailed === "number")
                            m.numFailed = d.numFailed;
                        else if (typeof d.numFailed === "object")
                            m.numFailed = new $util.LongBits(d.numFailed.low >>> 0, d.numFailed.high >>> 0).toNumber(true);
                    }
                    if (d.numSkipped != null) {
                        if ($util.Long)
                            (m.numSkipped = $util.Long.fromValue(d.numSkipped)).unsigned = true;
                        else if (typeof d.numSkipped === "string")
                            m.numSkipped = parseInt(d.numSkipped, 10);
                        else if (typeof d.numSkipped === "number")
                            m.numSkipped = d.numSkipped;
                        else if (typeof d.numSkipped === "object")
                            m.numSkipped = new $util.LongBits(d.numSkipped.low >>> 0, d.numSkipped.high >>> 0).toNumber(true);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Stats message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidLogPacket.Stats
                 * @static
                 * @param {perfetto.protos.AndroidLogPacket.Stats} m Stats
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Stats.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.numTotal = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.numTotal = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.numFailed = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.numFailed = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.numSkipped = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.numSkipped = o.longs === String ? "0" : 0;
                    }
                    if (m.numTotal != null && m.hasOwnProperty("numTotal")) {
                        if (typeof m.numTotal === "number")
                            d.numTotal = o.longs === String ? String(m.numTotal) : m.numTotal;
                        else
                            d.numTotal = o.longs === String ? $util.Long.prototype.toString.call(m.numTotal) : o.longs === Number ? new $util.LongBits(m.numTotal.low >>> 0, m.numTotal.high >>> 0).toNumber(true) : m.numTotal;
                    }
                    if (m.numFailed != null && m.hasOwnProperty("numFailed")) {
                        if (typeof m.numFailed === "number")
                            d.numFailed = o.longs === String ? String(m.numFailed) : m.numFailed;
                        else
                            d.numFailed = o.longs === String ? $util.Long.prototype.toString.call(m.numFailed) : o.longs === Number ? new $util.LongBits(m.numFailed.low >>> 0, m.numFailed.high >>> 0).toNumber(true) : m.numFailed;
                    }
                    if (m.numSkipped != null && m.hasOwnProperty("numSkipped")) {
                        if (typeof m.numSkipped === "number")
                            d.numSkipped = o.longs === String ? String(m.numSkipped) : m.numSkipped;
                        else
                            d.numSkipped = o.longs === String ? $util.Long.prototype.toString.call(m.numSkipped) : o.longs === Number ? new $util.LongBits(m.numSkipped.low >>> 0, m.numSkipped.high >>> 0).toNumber(true) : m.numSkipped;
                    }
                    return d;
                };

                /**
                 * Converts this Stats to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidLogPacket.Stats
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Stats.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Stats;
            })();

            return AndroidLogPacket;
        })();

        protos.AndroidSystemProperty = (function() {

            /**
             * Properties of an AndroidSystemProperty.
             * @memberof perfetto.protos
             * @interface IAndroidSystemProperty
             * @property {Array.<perfetto.protos.AndroidSystemProperty.IPropertyValue>|null} [values] AndroidSystemProperty values
             */

            /**
             * Constructs a new AndroidSystemProperty.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidSystemProperty.
             * @implements IAndroidSystemProperty
             * @constructor
             * @param {perfetto.protos.IAndroidSystemProperty=} [p] Properties to set
             */
            function AndroidSystemProperty(p) {
                this.values = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidSystemProperty values.
             * @member {Array.<perfetto.protos.AndroidSystemProperty.IPropertyValue>} values
             * @memberof perfetto.protos.AndroidSystemProperty
             * @instance
             */
            AndroidSystemProperty.prototype.values = $util.emptyArray;

            /**
             * Creates a new AndroidSystemProperty instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidSystemProperty
             * @static
             * @param {perfetto.protos.IAndroidSystemProperty=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidSystemProperty} AndroidSystemProperty instance
             */
            AndroidSystemProperty.create = function create(properties) {
                return new AndroidSystemProperty(properties);
            };

            /**
             * Encodes the specified AndroidSystemProperty message. Does not implicitly {@link perfetto.protos.AndroidSystemProperty.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidSystemProperty
             * @static
             * @param {perfetto.protos.IAndroidSystemProperty} m AndroidSystemProperty message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidSystemProperty.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.values != null && m.values.length) {
                    for (var i = 0; i < m.values.length; ++i)
                        $root.perfetto.protos.AndroidSystemProperty.PropertyValue.encode(m.values[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified AndroidSystemProperty message, length delimited. Does not implicitly {@link perfetto.protos.AndroidSystemProperty.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidSystemProperty
             * @static
             * @param {perfetto.protos.IAndroidSystemProperty} message AndroidSystemProperty message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidSystemProperty.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidSystemProperty message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidSystemProperty
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidSystemProperty} AndroidSystemProperty
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidSystemProperty.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidSystemProperty();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.values && m.values.length))
                            m.values = [];
                        m.values.push($root.perfetto.protos.AndroidSystemProperty.PropertyValue.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidSystemProperty message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidSystemProperty
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidSystemProperty} AndroidSystemProperty
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidSystemProperty.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidSystemProperty message.
             * @function verify
             * @memberof perfetto.protos.AndroidSystemProperty
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidSystemProperty.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.values != null && m.hasOwnProperty("values")) {
                    if (!Array.isArray(m.values))
                        return "values: array expected";
                    for (var i = 0; i < m.values.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidSystemProperty.PropertyValue.verify(m.values[i]);
                            if (e)
                                return "values." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidSystemProperty message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidSystemProperty
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidSystemProperty} AndroidSystemProperty
             */
            AndroidSystemProperty.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidSystemProperty)
                    return d;
                var m = new $root.perfetto.protos.AndroidSystemProperty();
                if (d.values) {
                    if (!Array.isArray(d.values))
                        throw TypeError(".perfetto.protos.AndroidSystemProperty.values: array expected");
                    m.values = [];
                    for (var i = 0; i < d.values.length; ++i) {
                        if (typeof d.values[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidSystemProperty.values: object expected");
                        m.values[i] = $root.perfetto.protos.AndroidSystemProperty.PropertyValue.fromObject(d.values[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidSystemProperty message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidSystemProperty
             * @static
             * @param {perfetto.protos.AndroidSystemProperty} m AndroidSystemProperty
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidSystemProperty.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.values = [];
                }
                if (m.values && m.values.length) {
                    d.values = [];
                    for (var j = 0; j < m.values.length; ++j) {
                        d.values[j] = $root.perfetto.protos.AndroidSystemProperty.PropertyValue.toObject(m.values[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidSystemProperty to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidSystemProperty
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidSystemProperty.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidSystemProperty.PropertyValue = (function() {

                /**
                 * Properties of a PropertyValue.
                 * @memberof perfetto.protos.AndroidSystemProperty
                 * @interface IPropertyValue
                 * @property {string|null} [name] PropertyValue name
                 * @property {string|null} [value] PropertyValue value
                 */

                /**
                 * Constructs a new PropertyValue.
                 * @memberof perfetto.protos.AndroidSystemProperty
                 * @classdesc Represents a PropertyValue.
                 * @implements IPropertyValue
                 * @constructor
                 * @param {perfetto.protos.AndroidSystemProperty.IPropertyValue=} [p] Properties to set
                 */
                function PropertyValue(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * PropertyValue name.
                 * @member {string} name
                 * @memberof perfetto.protos.AndroidSystemProperty.PropertyValue
                 * @instance
                 */
                PropertyValue.prototype.name = "";

                /**
                 * PropertyValue value.
                 * @member {string} value
                 * @memberof perfetto.protos.AndroidSystemProperty.PropertyValue
                 * @instance
                 */
                PropertyValue.prototype.value = "";

                /**
                 * Creates a new PropertyValue instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidSystemProperty.PropertyValue
                 * @static
                 * @param {perfetto.protos.AndroidSystemProperty.IPropertyValue=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidSystemProperty.PropertyValue} PropertyValue instance
                 */
                PropertyValue.create = function create(properties) {
                    return new PropertyValue(properties);
                };

                /**
                 * Encodes the specified PropertyValue message. Does not implicitly {@link perfetto.protos.AndroidSystemProperty.PropertyValue.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidSystemProperty.PropertyValue
                 * @static
                 * @param {perfetto.protos.AndroidSystemProperty.IPropertyValue} m PropertyValue message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PropertyValue.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(10).string(m.name);
                    if (m.value != null && Object.hasOwnProperty.call(m, "value"))
                        w.uint32(18).string(m.value);
                    return w;
                };

                /**
                 * Encodes the specified PropertyValue message, length delimited. Does not implicitly {@link perfetto.protos.AndroidSystemProperty.PropertyValue.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidSystemProperty.PropertyValue
                 * @static
                 * @param {perfetto.protos.AndroidSystemProperty.IPropertyValue} message PropertyValue message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PropertyValue.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a PropertyValue message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidSystemProperty.PropertyValue
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidSystemProperty.PropertyValue} PropertyValue
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PropertyValue.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidSystemProperty.PropertyValue();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.name = r.string();
                            break;
                        case 2:
                            m.value = r.string();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a PropertyValue message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidSystemProperty.PropertyValue
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidSystemProperty.PropertyValue} PropertyValue
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PropertyValue.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a PropertyValue message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidSystemProperty.PropertyValue
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                PropertyValue.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    if (m.value != null && m.hasOwnProperty("value")) {
                        if (!$util.isString(m.value))
                            return "value: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a PropertyValue message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidSystemProperty.PropertyValue
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidSystemProperty.PropertyValue} PropertyValue
                 */
                PropertyValue.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidSystemProperty.PropertyValue)
                        return d;
                    var m = new $root.perfetto.protos.AndroidSystemProperty.PropertyValue();
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    if (d.value != null) {
                        m.value = String(d.value);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a PropertyValue message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidSystemProperty.PropertyValue
                 * @static
                 * @param {perfetto.protos.AndroidSystemProperty.PropertyValue} m PropertyValue
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                PropertyValue.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.name = "";
                        d.value = "";
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    if (m.value != null && m.hasOwnProperty("value")) {
                        d.value = m.value;
                    }
                    return d;
                };

                /**
                 * Converts this PropertyValue to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidSystemProperty.PropertyValue
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                PropertyValue.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return PropertyValue;
            })();

            return AndroidSystemProperty;
        })();

        protos.AndroidCameraFrameEvent = (function() {

            /**
             * Properties of an AndroidCameraFrameEvent.
             * @memberof perfetto.protos
             * @interface IAndroidCameraFrameEvent
             * @property {number|null} [sessionId] AndroidCameraFrameEvent sessionId
             * @property {number|null} [cameraId] AndroidCameraFrameEvent cameraId
             * @property {number|null} [frameNumber] AndroidCameraFrameEvent frameNumber
             * @property {number|null} [requestId] AndroidCameraFrameEvent requestId
             * @property {number|null} [requestReceivedNs] AndroidCameraFrameEvent requestReceivedNs
             * @property {number|null} [requestProcessingStartedNs] AndroidCameraFrameEvent requestProcessingStartedNs
             * @property {number|null} [startOfExposureNs] AndroidCameraFrameEvent startOfExposureNs
             * @property {number|null} [startOfFrameNs] AndroidCameraFrameEvent startOfFrameNs
             * @property {number|null} [responsesAllSentNs] AndroidCameraFrameEvent responsesAllSentNs
             * @property {perfetto.protos.AndroidCameraFrameEvent.CaptureResultStatus|null} [captureResultStatus] AndroidCameraFrameEvent captureResultStatus
             * @property {number|null} [skippedSensorFrames] AndroidCameraFrameEvent skippedSensorFrames
             * @property {number|null} [captureIntent] AndroidCameraFrameEvent captureIntent
             * @property {number|null} [numStreams] AndroidCameraFrameEvent numStreams
             * @property {Array.<perfetto.protos.AndroidCameraFrameEvent.ICameraNodeProcessingDetails>|null} [nodeProcessingDetails] AndroidCameraFrameEvent nodeProcessingDetails
             * @property {number|null} [vendorDataVersion] AndroidCameraFrameEvent vendorDataVersion
             * @property {Uint8Array|null} [vendorData] AndroidCameraFrameEvent vendorData
             */

            /**
             * Constructs a new AndroidCameraFrameEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidCameraFrameEvent.
             * @implements IAndroidCameraFrameEvent
             * @constructor
             * @param {perfetto.protos.IAndroidCameraFrameEvent=} [p] Properties to set
             */
            function AndroidCameraFrameEvent(p) {
                this.nodeProcessingDetails = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidCameraFrameEvent sessionId.
             * @member {number} sessionId
             * @memberof perfetto.protos.AndroidCameraFrameEvent
             * @instance
             */
            AndroidCameraFrameEvent.prototype.sessionId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * AndroidCameraFrameEvent cameraId.
             * @member {number} cameraId
             * @memberof perfetto.protos.AndroidCameraFrameEvent
             * @instance
             */
            AndroidCameraFrameEvent.prototype.cameraId = 0;

            /**
             * AndroidCameraFrameEvent frameNumber.
             * @member {number} frameNumber
             * @memberof perfetto.protos.AndroidCameraFrameEvent
             * @instance
             */
            AndroidCameraFrameEvent.prototype.frameNumber = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * AndroidCameraFrameEvent requestId.
             * @member {number} requestId
             * @memberof perfetto.protos.AndroidCameraFrameEvent
             * @instance
             */
            AndroidCameraFrameEvent.prototype.requestId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * AndroidCameraFrameEvent requestReceivedNs.
             * @member {number} requestReceivedNs
             * @memberof perfetto.protos.AndroidCameraFrameEvent
             * @instance
             */
            AndroidCameraFrameEvent.prototype.requestReceivedNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * AndroidCameraFrameEvent requestProcessingStartedNs.
             * @member {number} requestProcessingStartedNs
             * @memberof perfetto.protos.AndroidCameraFrameEvent
             * @instance
             */
            AndroidCameraFrameEvent.prototype.requestProcessingStartedNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * AndroidCameraFrameEvent startOfExposureNs.
             * @member {number} startOfExposureNs
             * @memberof perfetto.protos.AndroidCameraFrameEvent
             * @instance
             */
            AndroidCameraFrameEvent.prototype.startOfExposureNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * AndroidCameraFrameEvent startOfFrameNs.
             * @member {number} startOfFrameNs
             * @memberof perfetto.protos.AndroidCameraFrameEvent
             * @instance
             */
            AndroidCameraFrameEvent.prototype.startOfFrameNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * AndroidCameraFrameEvent responsesAllSentNs.
             * @member {number} responsesAllSentNs
             * @memberof perfetto.protos.AndroidCameraFrameEvent
             * @instance
             */
            AndroidCameraFrameEvent.prototype.responsesAllSentNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * AndroidCameraFrameEvent captureResultStatus.
             * @member {perfetto.protos.AndroidCameraFrameEvent.CaptureResultStatus} captureResultStatus
             * @memberof perfetto.protos.AndroidCameraFrameEvent
             * @instance
             */
            AndroidCameraFrameEvent.prototype.captureResultStatus = 0;

            /**
             * AndroidCameraFrameEvent skippedSensorFrames.
             * @member {number} skippedSensorFrames
             * @memberof perfetto.protos.AndroidCameraFrameEvent
             * @instance
             */
            AndroidCameraFrameEvent.prototype.skippedSensorFrames = 0;

            /**
             * AndroidCameraFrameEvent captureIntent.
             * @member {number} captureIntent
             * @memberof perfetto.protos.AndroidCameraFrameEvent
             * @instance
             */
            AndroidCameraFrameEvent.prototype.captureIntent = 0;

            /**
             * AndroidCameraFrameEvent numStreams.
             * @member {number} numStreams
             * @memberof perfetto.protos.AndroidCameraFrameEvent
             * @instance
             */
            AndroidCameraFrameEvent.prototype.numStreams = 0;

            /**
             * AndroidCameraFrameEvent nodeProcessingDetails.
             * @member {Array.<perfetto.protos.AndroidCameraFrameEvent.ICameraNodeProcessingDetails>} nodeProcessingDetails
             * @memberof perfetto.protos.AndroidCameraFrameEvent
             * @instance
             */
            AndroidCameraFrameEvent.prototype.nodeProcessingDetails = $util.emptyArray;

            /**
             * AndroidCameraFrameEvent vendorDataVersion.
             * @member {number} vendorDataVersion
             * @memberof perfetto.protos.AndroidCameraFrameEvent
             * @instance
             */
            AndroidCameraFrameEvent.prototype.vendorDataVersion = 0;

            /**
             * AndroidCameraFrameEvent vendorData.
             * @member {Uint8Array} vendorData
             * @memberof perfetto.protos.AndroidCameraFrameEvent
             * @instance
             */
            AndroidCameraFrameEvent.prototype.vendorData = $util.newBuffer([]);

            /**
             * Creates a new AndroidCameraFrameEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidCameraFrameEvent
             * @static
             * @param {perfetto.protos.IAndroidCameraFrameEvent=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidCameraFrameEvent} AndroidCameraFrameEvent instance
             */
            AndroidCameraFrameEvent.create = function create(properties) {
                return new AndroidCameraFrameEvent(properties);
            };

            /**
             * Encodes the specified AndroidCameraFrameEvent message. Does not implicitly {@link perfetto.protos.AndroidCameraFrameEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidCameraFrameEvent
             * @static
             * @param {perfetto.protos.IAndroidCameraFrameEvent} m AndroidCameraFrameEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidCameraFrameEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.sessionId != null && Object.hasOwnProperty.call(m, "sessionId"))
                    w.uint32(8).uint64(m.sessionId);
                if (m.cameraId != null && Object.hasOwnProperty.call(m, "cameraId"))
                    w.uint32(16).uint32(m.cameraId);
                if (m.frameNumber != null && Object.hasOwnProperty.call(m, "frameNumber"))
                    w.uint32(24).int64(m.frameNumber);
                if (m.requestId != null && Object.hasOwnProperty.call(m, "requestId"))
                    w.uint32(32).int64(m.requestId);
                if (m.requestReceivedNs != null && Object.hasOwnProperty.call(m, "requestReceivedNs"))
                    w.uint32(40).int64(m.requestReceivedNs);
                if (m.requestProcessingStartedNs != null && Object.hasOwnProperty.call(m, "requestProcessingStartedNs"))
                    w.uint32(48).int64(m.requestProcessingStartedNs);
                if (m.startOfExposureNs != null && Object.hasOwnProperty.call(m, "startOfExposureNs"))
                    w.uint32(56).int64(m.startOfExposureNs);
                if (m.startOfFrameNs != null && Object.hasOwnProperty.call(m, "startOfFrameNs"))
                    w.uint32(64).int64(m.startOfFrameNs);
                if (m.responsesAllSentNs != null && Object.hasOwnProperty.call(m, "responsesAllSentNs"))
                    w.uint32(72).int64(m.responsesAllSentNs);
                if (m.captureResultStatus != null && Object.hasOwnProperty.call(m, "captureResultStatus"))
                    w.uint32(80).int32(m.captureResultStatus);
                if (m.skippedSensorFrames != null && Object.hasOwnProperty.call(m, "skippedSensorFrames"))
                    w.uint32(88).int32(m.skippedSensorFrames);
                if (m.captureIntent != null && Object.hasOwnProperty.call(m, "captureIntent"))
                    w.uint32(96).int32(m.captureIntent);
                if (m.numStreams != null && Object.hasOwnProperty.call(m, "numStreams"))
                    w.uint32(104).int32(m.numStreams);
                if (m.nodeProcessingDetails != null && m.nodeProcessingDetails.length) {
                    for (var i = 0; i < m.nodeProcessingDetails.length; ++i)
                        $root.perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails.encode(m.nodeProcessingDetails[i], w.uint32(114).fork()).ldelim();
                }
                if (m.vendorDataVersion != null && Object.hasOwnProperty.call(m, "vendorDataVersion"))
                    w.uint32(120).int32(m.vendorDataVersion);
                if (m.vendorData != null && Object.hasOwnProperty.call(m, "vendorData"))
                    w.uint32(130).bytes(m.vendorData);
                return w;
            };

            /**
             * Encodes the specified AndroidCameraFrameEvent message, length delimited. Does not implicitly {@link perfetto.protos.AndroidCameraFrameEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidCameraFrameEvent
             * @static
             * @param {perfetto.protos.IAndroidCameraFrameEvent} message AndroidCameraFrameEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidCameraFrameEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidCameraFrameEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidCameraFrameEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidCameraFrameEvent} AndroidCameraFrameEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidCameraFrameEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidCameraFrameEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.sessionId = r.uint64();
                        break;
                    case 2:
                        m.cameraId = r.uint32();
                        break;
                    case 3:
                        m.frameNumber = r.int64();
                        break;
                    case 4:
                        m.requestId = r.int64();
                        break;
                    case 5:
                        m.requestReceivedNs = r.int64();
                        break;
                    case 6:
                        m.requestProcessingStartedNs = r.int64();
                        break;
                    case 7:
                        m.startOfExposureNs = r.int64();
                        break;
                    case 8:
                        m.startOfFrameNs = r.int64();
                        break;
                    case 9:
                        m.responsesAllSentNs = r.int64();
                        break;
                    case 10:
                        m.captureResultStatus = r.int32();
                        break;
                    case 11:
                        m.skippedSensorFrames = r.int32();
                        break;
                    case 12:
                        m.captureIntent = r.int32();
                        break;
                    case 13:
                        m.numStreams = r.int32();
                        break;
                    case 14:
                        if (!(m.nodeProcessingDetails && m.nodeProcessingDetails.length))
                            m.nodeProcessingDetails = [];
                        m.nodeProcessingDetails.push($root.perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails.decode(r, r.uint32()));
                        break;
                    case 15:
                        m.vendorDataVersion = r.int32();
                        break;
                    case 16:
                        m.vendorData = r.bytes();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidCameraFrameEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidCameraFrameEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidCameraFrameEvent} AndroidCameraFrameEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidCameraFrameEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidCameraFrameEvent message.
             * @function verify
             * @memberof perfetto.protos.AndroidCameraFrameEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidCameraFrameEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.sessionId != null && m.hasOwnProperty("sessionId")) {
                    if (!$util.isInteger(m.sessionId) && !(m.sessionId && $util.isInteger(m.sessionId.low) && $util.isInteger(m.sessionId.high)))
                        return "sessionId: integer|Long expected";
                }
                if (m.cameraId != null && m.hasOwnProperty("cameraId")) {
                    if (!$util.isInteger(m.cameraId))
                        return "cameraId: integer expected";
                }
                if (m.frameNumber != null && m.hasOwnProperty("frameNumber")) {
                    if (!$util.isInteger(m.frameNumber) && !(m.frameNumber && $util.isInteger(m.frameNumber.low) && $util.isInteger(m.frameNumber.high)))
                        return "frameNumber: integer|Long expected";
                }
                if (m.requestId != null && m.hasOwnProperty("requestId")) {
                    if (!$util.isInteger(m.requestId) && !(m.requestId && $util.isInteger(m.requestId.low) && $util.isInteger(m.requestId.high)))
                        return "requestId: integer|Long expected";
                }
                if (m.requestReceivedNs != null && m.hasOwnProperty("requestReceivedNs")) {
                    if (!$util.isInteger(m.requestReceivedNs) && !(m.requestReceivedNs && $util.isInteger(m.requestReceivedNs.low) && $util.isInteger(m.requestReceivedNs.high)))
                        return "requestReceivedNs: integer|Long expected";
                }
                if (m.requestProcessingStartedNs != null && m.hasOwnProperty("requestProcessingStartedNs")) {
                    if (!$util.isInteger(m.requestProcessingStartedNs) && !(m.requestProcessingStartedNs && $util.isInteger(m.requestProcessingStartedNs.low) && $util.isInteger(m.requestProcessingStartedNs.high)))
                        return "requestProcessingStartedNs: integer|Long expected";
                }
                if (m.startOfExposureNs != null && m.hasOwnProperty("startOfExposureNs")) {
                    if (!$util.isInteger(m.startOfExposureNs) && !(m.startOfExposureNs && $util.isInteger(m.startOfExposureNs.low) && $util.isInteger(m.startOfExposureNs.high)))
                        return "startOfExposureNs: integer|Long expected";
                }
                if (m.startOfFrameNs != null && m.hasOwnProperty("startOfFrameNs")) {
                    if (!$util.isInteger(m.startOfFrameNs) && !(m.startOfFrameNs && $util.isInteger(m.startOfFrameNs.low) && $util.isInteger(m.startOfFrameNs.high)))
                        return "startOfFrameNs: integer|Long expected";
                }
                if (m.responsesAllSentNs != null && m.hasOwnProperty("responsesAllSentNs")) {
                    if (!$util.isInteger(m.responsesAllSentNs) && !(m.responsesAllSentNs && $util.isInteger(m.responsesAllSentNs.low) && $util.isInteger(m.responsesAllSentNs.high)))
                        return "responsesAllSentNs: integer|Long expected";
                }
                if (m.captureResultStatus != null && m.hasOwnProperty("captureResultStatus")) {
                    switch (m.captureResultStatus) {
                    default:
                        return "captureResultStatus: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                        break;
                    }
                }
                if (m.skippedSensorFrames != null && m.hasOwnProperty("skippedSensorFrames")) {
                    if (!$util.isInteger(m.skippedSensorFrames))
                        return "skippedSensorFrames: integer expected";
                }
                if (m.captureIntent != null && m.hasOwnProperty("captureIntent")) {
                    if (!$util.isInteger(m.captureIntent))
                        return "captureIntent: integer expected";
                }
                if (m.numStreams != null && m.hasOwnProperty("numStreams")) {
                    if (!$util.isInteger(m.numStreams))
                        return "numStreams: integer expected";
                }
                if (m.nodeProcessingDetails != null && m.hasOwnProperty("nodeProcessingDetails")) {
                    if (!Array.isArray(m.nodeProcessingDetails))
                        return "nodeProcessingDetails: array expected";
                    for (var i = 0; i < m.nodeProcessingDetails.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails.verify(m.nodeProcessingDetails[i]);
                            if (e)
                                return "nodeProcessingDetails." + e;
                        }
                    }
                }
                if (m.vendorDataVersion != null && m.hasOwnProperty("vendorDataVersion")) {
                    if (!$util.isInteger(m.vendorDataVersion))
                        return "vendorDataVersion: integer expected";
                }
                if (m.vendorData != null && m.hasOwnProperty("vendorData")) {
                    if (!(m.vendorData && typeof m.vendorData.length === "number" || $util.isString(m.vendorData)))
                        return "vendorData: buffer expected";
                }
                return null;
            };

            /**
             * Creates an AndroidCameraFrameEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidCameraFrameEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidCameraFrameEvent} AndroidCameraFrameEvent
             */
            AndroidCameraFrameEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidCameraFrameEvent)
                    return d;
                var m = new $root.perfetto.protos.AndroidCameraFrameEvent();
                if (d.sessionId != null) {
                    if ($util.Long)
                        (m.sessionId = $util.Long.fromValue(d.sessionId)).unsigned = true;
                    else if (typeof d.sessionId === "string")
                        m.sessionId = parseInt(d.sessionId, 10);
                    else if (typeof d.sessionId === "number")
                        m.sessionId = d.sessionId;
                    else if (typeof d.sessionId === "object")
                        m.sessionId = new $util.LongBits(d.sessionId.low >>> 0, d.sessionId.high >>> 0).toNumber(true);
                }
                if (d.cameraId != null) {
                    m.cameraId = d.cameraId >>> 0;
                }
                if (d.frameNumber != null) {
                    if ($util.Long)
                        (m.frameNumber = $util.Long.fromValue(d.frameNumber)).unsigned = false;
                    else if (typeof d.frameNumber === "string")
                        m.frameNumber = parseInt(d.frameNumber, 10);
                    else if (typeof d.frameNumber === "number")
                        m.frameNumber = d.frameNumber;
                    else if (typeof d.frameNumber === "object")
                        m.frameNumber = new $util.LongBits(d.frameNumber.low >>> 0, d.frameNumber.high >>> 0).toNumber();
                }
                if (d.requestId != null) {
                    if ($util.Long)
                        (m.requestId = $util.Long.fromValue(d.requestId)).unsigned = false;
                    else if (typeof d.requestId === "string")
                        m.requestId = parseInt(d.requestId, 10);
                    else if (typeof d.requestId === "number")
                        m.requestId = d.requestId;
                    else if (typeof d.requestId === "object")
                        m.requestId = new $util.LongBits(d.requestId.low >>> 0, d.requestId.high >>> 0).toNumber();
                }
                if (d.requestReceivedNs != null) {
                    if ($util.Long)
                        (m.requestReceivedNs = $util.Long.fromValue(d.requestReceivedNs)).unsigned = false;
                    else if (typeof d.requestReceivedNs === "string")
                        m.requestReceivedNs = parseInt(d.requestReceivedNs, 10);
                    else if (typeof d.requestReceivedNs === "number")
                        m.requestReceivedNs = d.requestReceivedNs;
                    else if (typeof d.requestReceivedNs === "object")
                        m.requestReceivedNs = new $util.LongBits(d.requestReceivedNs.low >>> 0, d.requestReceivedNs.high >>> 0).toNumber();
                }
                if (d.requestProcessingStartedNs != null) {
                    if ($util.Long)
                        (m.requestProcessingStartedNs = $util.Long.fromValue(d.requestProcessingStartedNs)).unsigned = false;
                    else if (typeof d.requestProcessingStartedNs === "string")
                        m.requestProcessingStartedNs = parseInt(d.requestProcessingStartedNs, 10);
                    else if (typeof d.requestProcessingStartedNs === "number")
                        m.requestProcessingStartedNs = d.requestProcessingStartedNs;
                    else if (typeof d.requestProcessingStartedNs === "object")
                        m.requestProcessingStartedNs = new $util.LongBits(d.requestProcessingStartedNs.low >>> 0, d.requestProcessingStartedNs.high >>> 0).toNumber();
                }
                if (d.startOfExposureNs != null) {
                    if ($util.Long)
                        (m.startOfExposureNs = $util.Long.fromValue(d.startOfExposureNs)).unsigned = false;
                    else if (typeof d.startOfExposureNs === "string")
                        m.startOfExposureNs = parseInt(d.startOfExposureNs, 10);
                    else if (typeof d.startOfExposureNs === "number")
                        m.startOfExposureNs = d.startOfExposureNs;
                    else if (typeof d.startOfExposureNs === "object")
                        m.startOfExposureNs = new $util.LongBits(d.startOfExposureNs.low >>> 0, d.startOfExposureNs.high >>> 0).toNumber();
                }
                if (d.startOfFrameNs != null) {
                    if ($util.Long)
                        (m.startOfFrameNs = $util.Long.fromValue(d.startOfFrameNs)).unsigned = false;
                    else if (typeof d.startOfFrameNs === "string")
                        m.startOfFrameNs = parseInt(d.startOfFrameNs, 10);
                    else if (typeof d.startOfFrameNs === "number")
                        m.startOfFrameNs = d.startOfFrameNs;
                    else if (typeof d.startOfFrameNs === "object")
                        m.startOfFrameNs = new $util.LongBits(d.startOfFrameNs.low >>> 0, d.startOfFrameNs.high >>> 0).toNumber();
                }
                if (d.responsesAllSentNs != null) {
                    if ($util.Long)
                        (m.responsesAllSentNs = $util.Long.fromValue(d.responsesAllSentNs)).unsigned = false;
                    else if (typeof d.responsesAllSentNs === "string")
                        m.responsesAllSentNs = parseInt(d.responsesAllSentNs, 10);
                    else if (typeof d.responsesAllSentNs === "number")
                        m.responsesAllSentNs = d.responsesAllSentNs;
                    else if (typeof d.responsesAllSentNs === "object")
                        m.responsesAllSentNs = new $util.LongBits(d.responsesAllSentNs.low >>> 0, d.responsesAllSentNs.high >>> 0).toNumber();
                }
                switch (d.captureResultStatus) {
                case "STATUS_UNSPECIFIED":
                case 0:
                    m.captureResultStatus = 0;
                    break;
                case "STATUS_OK":
                case 1:
                    m.captureResultStatus = 1;
                    break;
                case "STATUS_EARLY_METADATA_ERROR":
                case 2:
                    m.captureResultStatus = 2;
                    break;
                case "STATUS_FINAL_METADATA_ERROR":
                case 3:
                    m.captureResultStatus = 3;
                    break;
                case "STATUS_BUFFER_ERROR":
                case 4:
                    m.captureResultStatus = 4;
                    break;
                case "STATUS_FLUSH_ERROR":
                case 5:
                    m.captureResultStatus = 5;
                    break;
                }
                if (d.skippedSensorFrames != null) {
                    m.skippedSensorFrames = d.skippedSensorFrames | 0;
                }
                if (d.captureIntent != null) {
                    m.captureIntent = d.captureIntent | 0;
                }
                if (d.numStreams != null) {
                    m.numStreams = d.numStreams | 0;
                }
                if (d.nodeProcessingDetails) {
                    if (!Array.isArray(d.nodeProcessingDetails))
                        throw TypeError(".perfetto.protos.AndroidCameraFrameEvent.nodeProcessingDetails: array expected");
                    m.nodeProcessingDetails = [];
                    for (var i = 0; i < d.nodeProcessingDetails.length; ++i) {
                        if (typeof d.nodeProcessingDetails[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidCameraFrameEvent.nodeProcessingDetails: object expected");
                        m.nodeProcessingDetails[i] = $root.perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails.fromObject(d.nodeProcessingDetails[i]);
                    }
                }
                if (d.vendorDataVersion != null) {
                    m.vendorDataVersion = d.vendorDataVersion | 0;
                }
                if (d.vendorData != null) {
                    if (typeof d.vendorData === "string")
                        $util.base64.decode(d.vendorData, m.vendorData = $util.newBuffer($util.base64.length(d.vendorData)), 0);
                    else if (d.vendorData.length)
                        m.vendorData = d.vendorData;
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidCameraFrameEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidCameraFrameEvent
             * @static
             * @param {perfetto.protos.AndroidCameraFrameEvent} m AndroidCameraFrameEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidCameraFrameEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.nodeProcessingDetails = [];
                }
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sessionId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sessionId = o.longs === String ? "0" : 0;
                    d.cameraId = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.frameNumber = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.frameNumber = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.requestId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.requestId = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.requestReceivedNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.requestReceivedNs = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.requestProcessingStartedNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.requestProcessingStartedNs = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.startOfExposureNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.startOfExposureNs = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.startOfFrameNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.startOfFrameNs = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.responsesAllSentNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.responsesAllSentNs = o.longs === String ? "0" : 0;
                    d.captureResultStatus = o.enums === String ? "STATUS_UNSPECIFIED" : 0;
                    d.skippedSensorFrames = 0;
                    d.captureIntent = 0;
                    d.numStreams = 0;
                    d.vendorDataVersion = 0;
                    if (o.bytes === String)
                        d.vendorData = "";
                    else {
                        d.vendorData = [];
                        if (o.bytes !== Array)
                            d.vendorData = $util.newBuffer(d.vendorData);
                    }
                }
                if (m.sessionId != null && m.hasOwnProperty("sessionId")) {
                    if (typeof m.sessionId === "number")
                        d.sessionId = o.longs === String ? String(m.sessionId) : m.sessionId;
                    else
                        d.sessionId = o.longs === String ? $util.Long.prototype.toString.call(m.sessionId) : o.longs === Number ? new $util.LongBits(m.sessionId.low >>> 0, m.sessionId.high >>> 0).toNumber(true) : m.sessionId;
                }
                if (m.cameraId != null && m.hasOwnProperty("cameraId")) {
                    d.cameraId = m.cameraId;
                }
                if (m.frameNumber != null && m.hasOwnProperty("frameNumber")) {
                    if (typeof m.frameNumber === "number")
                        d.frameNumber = o.longs === String ? String(m.frameNumber) : m.frameNumber;
                    else
                        d.frameNumber = o.longs === String ? $util.Long.prototype.toString.call(m.frameNumber) : o.longs === Number ? new $util.LongBits(m.frameNumber.low >>> 0, m.frameNumber.high >>> 0).toNumber() : m.frameNumber;
                }
                if (m.requestId != null && m.hasOwnProperty("requestId")) {
                    if (typeof m.requestId === "number")
                        d.requestId = o.longs === String ? String(m.requestId) : m.requestId;
                    else
                        d.requestId = o.longs === String ? $util.Long.prototype.toString.call(m.requestId) : o.longs === Number ? new $util.LongBits(m.requestId.low >>> 0, m.requestId.high >>> 0).toNumber() : m.requestId;
                }
                if (m.requestReceivedNs != null && m.hasOwnProperty("requestReceivedNs")) {
                    if (typeof m.requestReceivedNs === "number")
                        d.requestReceivedNs = o.longs === String ? String(m.requestReceivedNs) : m.requestReceivedNs;
                    else
                        d.requestReceivedNs = o.longs === String ? $util.Long.prototype.toString.call(m.requestReceivedNs) : o.longs === Number ? new $util.LongBits(m.requestReceivedNs.low >>> 0, m.requestReceivedNs.high >>> 0).toNumber() : m.requestReceivedNs;
                }
                if (m.requestProcessingStartedNs != null && m.hasOwnProperty("requestProcessingStartedNs")) {
                    if (typeof m.requestProcessingStartedNs === "number")
                        d.requestProcessingStartedNs = o.longs === String ? String(m.requestProcessingStartedNs) : m.requestProcessingStartedNs;
                    else
                        d.requestProcessingStartedNs = o.longs === String ? $util.Long.prototype.toString.call(m.requestProcessingStartedNs) : o.longs === Number ? new $util.LongBits(m.requestProcessingStartedNs.low >>> 0, m.requestProcessingStartedNs.high >>> 0).toNumber() : m.requestProcessingStartedNs;
                }
                if (m.startOfExposureNs != null && m.hasOwnProperty("startOfExposureNs")) {
                    if (typeof m.startOfExposureNs === "number")
                        d.startOfExposureNs = o.longs === String ? String(m.startOfExposureNs) : m.startOfExposureNs;
                    else
                        d.startOfExposureNs = o.longs === String ? $util.Long.prototype.toString.call(m.startOfExposureNs) : o.longs === Number ? new $util.LongBits(m.startOfExposureNs.low >>> 0, m.startOfExposureNs.high >>> 0).toNumber() : m.startOfExposureNs;
                }
                if (m.startOfFrameNs != null && m.hasOwnProperty("startOfFrameNs")) {
                    if (typeof m.startOfFrameNs === "number")
                        d.startOfFrameNs = o.longs === String ? String(m.startOfFrameNs) : m.startOfFrameNs;
                    else
                        d.startOfFrameNs = o.longs === String ? $util.Long.prototype.toString.call(m.startOfFrameNs) : o.longs === Number ? new $util.LongBits(m.startOfFrameNs.low >>> 0, m.startOfFrameNs.high >>> 0).toNumber() : m.startOfFrameNs;
                }
                if (m.responsesAllSentNs != null && m.hasOwnProperty("responsesAllSentNs")) {
                    if (typeof m.responsesAllSentNs === "number")
                        d.responsesAllSentNs = o.longs === String ? String(m.responsesAllSentNs) : m.responsesAllSentNs;
                    else
                        d.responsesAllSentNs = o.longs === String ? $util.Long.prototype.toString.call(m.responsesAllSentNs) : o.longs === Number ? new $util.LongBits(m.responsesAllSentNs.low >>> 0, m.responsesAllSentNs.high >>> 0).toNumber() : m.responsesAllSentNs;
                }
                if (m.captureResultStatus != null && m.hasOwnProperty("captureResultStatus")) {
                    d.captureResultStatus = o.enums === String ? $root.perfetto.protos.AndroidCameraFrameEvent.CaptureResultStatus[m.captureResultStatus] : m.captureResultStatus;
                }
                if (m.skippedSensorFrames != null && m.hasOwnProperty("skippedSensorFrames")) {
                    d.skippedSensorFrames = m.skippedSensorFrames;
                }
                if (m.captureIntent != null && m.hasOwnProperty("captureIntent")) {
                    d.captureIntent = m.captureIntent;
                }
                if (m.numStreams != null && m.hasOwnProperty("numStreams")) {
                    d.numStreams = m.numStreams;
                }
                if (m.nodeProcessingDetails && m.nodeProcessingDetails.length) {
                    d.nodeProcessingDetails = [];
                    for (var j = 0; j < m.nodeProcessingDetails.length; ++j) {
                        d.nodeProcessingDetails[j] = $root.perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails.toObject(m.nodeProcessingDetails[j], o);
                    }
                }
                if (m.vendorDataVersion != null && m.hasOwnProperty("vendorDataVersion")) {
                    d.vendorDataVersion = m.vendorDataVersion;
                }
                if (m.vendorData != null && m.hasOwnProperty("vendorData")) {
                    d.vendorData = o.bytes === String ? $util.base64.encode(m.vendorData, 0, m.vendorData.length) : o.bytes === Array ? Array.prototype.slice.call(m.vendorData) : m.vendorData;
                }
                return d;
            };

            /**
             * Converts this AndroidCameraFrameEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidCameraFrameEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidCameraFrameEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * CaptureResultStatus enum.
             * @name perfetto.protos.AndroidCameraFrameEvent.CaptureResultStatus
             * @enum {number}
             * @property {number} STATUS_UNSPECIFIED=0 STATUS_UNSPECIFIED value
             * @property {number} STATUS_OK=1 STATUS_OK value
             * @property {number} STATUS_EARLY_METADATA_ERROR=2 STATUS_EARLY_METADATA_ERROR value
             * @property {number} STATUS_FINAL_METADATA_ERROR=3 STATUS_FINAL_METADATA_ERROR value
             * @property {number} STATUS_BUFFER_ERROR=4 STATUS_BUFFER_ERROR value
             * @property {number} STATUS_FLUSH_ERROR=5 STATUS_FLUSH_ERROR value
             */
            AndroidCameraFrameEvent.CaptureResultStatus = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "STATUS_UNSPECIFIED"] = 0;
                values[valuesById[1] = "STATUS_OK"] = 1;
                values[valuesById[2] = "STATUS_EARLY_METADATA_ERROR"] = 2;
                values[valuesById[3] = "STATUS_FINAL_METADATA_ERROR"] = 3;
                values[valuesById[4] = "STATUS_BUFFER_ERROR"] = 4;
                values[valuesById[5] = "STATUS_FLUSH_ERROR"] = 5;
                return values;
            })();

            AndroidCameraFrameEvent.CameraNodeProcessingDetails = (function() {

                /**
                 * Properties of a CameraNodeProcessingDetails.
                 * @memberof perfetto.protos.AndroidCameraFrameEvent
                 * @interface ICameraNodeProcessingDetails
                 * @property {number|null} [nodeId] CameraNodeProcessingDetails nodeId
                 * @property {number|null} [startProcessingNs] CameraNodeProcessingDetails startProcessingNs
                 * @property {number|null} [endProcessingNs] CameraNodeProcessingDetails endProcessingNs
                 * @property {number|null} [schedulingLatencyNs] CameraNodeProcessingDetails schedulingLatencyNs
                 */

                /**
                 * Constructs a new CameraNodeProcessingDetails.
                 * @memberof perfetto.protos.AndroidCameraFrameEvent
                 * @classdesc Represents a CameraNodeProcessingDetails.
                 * @implements ICameraNodeProcessingDetails
                 * @constructor
                 * @param {perfetto.protos.AndroidCameraFrameEvent.ICameraNodeProcessingDetails=} [p] Properties to set
                 */
                function CameraNodeProcessingDetails(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * CameraNodeProcessingDetails nodeId.
                 * @member {number} nodeId
                 * @memberof perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails
                 * @instance
                 */
                CameraNodeProcessingDetails.prototype.nodeId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * CameraNodeProcessingDetails startProcessingNs.
                 * @member {number} startProcessingNs
                 * @memberof perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails
                 * @instance
                 */
                CameraNodeProcessingDetails.prototype.startProcessingNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * CameraNodeProcessingDetails endProcessingNs.
                 * @member {number} endProcessingNs
                 * @memberof perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails
                 * @instance
                 */
                CameraNodeProcessingDetails.prototype.endProcessingNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * CameraNodeProcessingDetails schedulingLatencyNs.
                 * @member {number} schedulingLatencyNs
                 * @memberof perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails
                 * @instance
                 */
                CameraNodeProcessingDetails.prototype.schedulingLatencyNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new CameraNodeProcessingDetails instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails
                 * @static
                 * @param {perfetto.protos.AndroidCameraFrameEvent.ICameraNodeProcessingDetails=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails} CameraNodeProcessingDetails instance
                 */
                CameraNodeProcessingDetails.create = function create(properties) {
                    return new CameraNodeProcessingDetails(properties);
                };

                /**
                 * Encodes the specified CameraNodeProcessingDetails message. Does not implicitly {@link perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails
                 * @static
                 * @param {perfetto.protos.AndroidCameraFrameEvent.ICameraNodeProcessingDetails} m CameraNodeProcessingDetails message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CameraNodeProcessingDetails.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.nodeId != null && Object.hasOwnProperty.call(m, "nodeId"))
                        w.uint32(8).int64(m.nodeId);
                    if (m.startProcessingNs != null && Object.hasOwnProperty.call(m, "startProcessingNs"))
                        w.uint32(16).int64(m.startProcessingNs);
                    if (m.endProcessingNs != null && Object.hasOwnProperty.call(m, "endProcessingNs"))
                        w.uint32(24).int64(m.endProcessingNs);
                    if (m.schedulingLatencyNs != null && Object.hasOwnProperty.call(m, "schedulingLatencyNs"))
                        w.uint32(32).int64(m.schedulingLatencyNs);
                    return w;
                };

                /**
                 * Encodes the specified CameraNodeProcessingDetails message, length delimited. Does not implicitly {@link perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails
                 * @static
                 * @param {perfetto.protos.AndroidCameraFrameEvent.ICameraNodeProcessingDetails} message CameraNodeProcessingDetails message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CameraNodeProcessingDetails.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a CameraNodeProcessingDetails message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails} CameraNodeProcessingDetails
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CameraNodeProcessingDetails.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.nodeId = r.int64();
                            break;
                        case 2:
                            m.startProcessingNs = r.int64();
                            break;
                        case 3:
                            m.endProcessingNs = r.int64();
                            break;
                        case 4:
                            m.schedulingLatencyNs = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a CameraNodeProcessingDetails message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails} CameraNodeProcessingDetails
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CameraNodeProcessingDetails.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a CameraNodeProcessingDetails message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                CameraNodeProcessingDetails.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.nodeId != null && m.hasOwnProperty("nodeId")) {
                        if (!$util.isInteger(m.nodeId) && !(m.nodeId && $util.isInteger(m.nodeId.low) && $util.isInteger(m.nodeId.high)))
                            return "nodeId: integer|Long expected";
                    }
                    if (m.startProcessingNs != null && m.hasOwnProperty("startProcessingNs")) {
                        if (!$util.isInteger(m.startProcessingNs) && !(m.startProcessingNs && $util.isInteger(m.startProcessingNs.low) && $util.isInteger(m.startProcessingNs.high)))
                            return "startProcessingNs: integer|Long expected";
                    }
                    if (m.endProcessingNs != null && m.hasOwnProperty("endProcessingNs")) {
                        if (!$util.isInteger(m.endProcessingNs) && !(m.endProcessingNs && $util.isInteger(m.endProcessingNs.low) && $util.isInteger(m.endProcessingNs.high)))
                            return "endProcessingNs: integer|Long expected";
                    }
                    if (m.schedulingLatencyNs != null && m.hasOwnProperty("schedulingLatencyNs")) {
                        if (!$util.isInteger(m.schedulingLatencyNs) && !(m.schedulingLatencyNs && $util.isInteger(m.schedulingLatencyNs.low) && $util.isInteger(m.schedulingLatencyNs.high)))
                            return "schedulingLatencyNs: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a CameraNodeProcessingDetails message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails} CameraNodeProcessingDetails
                 */
                CameraNodeProcessingDetails.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails)
                        return d;
                    var m = new $root.perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails();
                    if (d.nodeId != null) {
                        if ($util.Long)
                            (m.nodeId = $util.Long.fromValue(d.nodeId)).unsigned = false;
                        else if (typeof d.nodeId === "string")
                            m.nodeId = parseInt(d.nodeId, 10);
                        else if (typeof d.nodeId === "number")
                            m.nodeId = d.nodeId;
                        else if (typeof d.nodeId === "object")
                            m.nodeId = new $util.LongBits(d.nodeId.low >>> 0, d.nodeId.high >>> 0).toNumber();
                    }
                    if (d.startProcessingNs != null) {
                        if ($util.Long)
                            (m.startProcessingNs = $util.Long.fromValue(d.startProcessingNs)).unsigned = false;
                        else if (typeof d.startProcessingNs === "string")
                            m.startProcessingNs = parseInt(d.startProcessingNs, 10);
                        else if (typeof d.startProcessingNs === "number")
                            m.startProcessingNs = d.startProcessingNs;
                        else if (typeof d.startProcessingNs === "object")
                            m.startProcessingNs = new $util.LongBits(d.startProcessingNs.low >>> 0, d.startProcessingNs.high >>> 0).toNumber();
                    }
                    if (d.endProcessingNs != null) {
                        if ($util.Long)
                            (m.endProcessingNs = $util.Long.fromValue(d.endProcessingNs)).unsigned = false;
                        else if (typeof d.endProcessingNs === "string")
                            m.endProcessingNs = parseInt(d.endProcessingNs, 10);
                        else if (typeof d.endProcessingNs === "number")
                            m.endProcessingNs = d.endProcessingNs;
                        else if (typeof d.endProcessingNs === "object")
                            m.endProcessingNs = new $util.LongBits(d.endProcessingNs.low >>> 0, d.endProcessingNs.high >>> 0).toNumber();
                    }
                    if (d.schedulingLatencyNs != null) {
                        if ($util.Long)
                            (m.schedulingLatencyNs = $util.Long.fromValue(d.schedulingLatencyNs)).unsigned = false;
                        else if (typeof d.schedulingLatencyNs === "string")
                            m.schedulingLatencyNs = parseInt(d.schedulingLatencyNs, 10);
                        else if (typeof d.schedulingLatencyNs === "number")
                            m.schedulingLatencyNs = d.schedulingLatencyNs;
                        else if (typeof d.schedulingLatencyNs === "object")
                            m.schedulingLatencyNs = new $util.LongBits(d.schedulingLatencyNs.low >>> 0, d.schedulingLatencyNs.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a CameraNodeProcessingDetails message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails
                 * @static
                 * @param {perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails} m CameraNodeProcessingDetails
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                CameraNodeProcessingDetails.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.nodeId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.nodeId = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.startProcessingNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.startProcessingNs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.endProcessingNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.endProcessingNs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.schedulingLatencyNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.schedulingLatencyNs = o.longs === String ? "0" : 0;
                    }
                    if (m.nodeId != null && m.hasOwnProperty("nodeId")) {
                        if (typeof m.nodeId === "number")
                            d.nodeId = o.longs === String ? String(m.nodeId) : m.nodeId;
                        else
                            d.nodeId = o.longs === String ? $util.Long.prototype.toString.call(m.nodeId) : o.longs === Number ? new $util.LongBits(m.nodeId.low >>> 0, m.nodeId.high >>> 0).toNumber() : m.nodeId;
                    }
                    if (m.startProcessingNs != null && m.hasOwnProperty("startProcessingNs")) {
                        if (typeof m.startProcessingNs === "number")
                            d.startProcessingNs = o.longs === String ? String(m.startProcessingNs) : m.startProcessingNs;
                        else
                            d.startProcessingNs = o.longs === String ? $util.Long.prototype.toString.call(m.startProcessingNs) : o.longs === Number ? new $util.LongBits(m.startProcessingNs.low >>> 0, m.startProcessingNs.high >>> 0).toNumber() : m.startProcessingNs;
                    }
                    if (m.endProcessingNs != null && m.hasOwnProperty("endProcessingNs")) {
                        if (typeof m.endProcessingNs === "number")
                            d.endProcessingNs = o.longs === String ? String(m.endProcessingNs) : m.endProcessingNs;
                        else
                            d.endProcessingNs = o.longs === String ? $util.Long.prototype.toString.call(m.endProcessingNs) : o.longs === Number ? new $util.LongBits(m.endProcessingNs.low >>> 0, m.endProcessingNs.high >>> 0).toNumber() : m.endProcessingNs;
                    }
                    if (m.schedulingLatencyNs != null && m.hasOwnProperty("schedulingLatencyNs")) {
                        if (typeof m.schedulingLatencyNs === "number")
                            d.schedulingLatencyNs = o.longs === String ? String(m.schedulingLatencyNs) : m.schedulingLatencyNs;
                        else
                            d.schedulingLatencyNs = o.longs === String ? $util.Long.prototype.toString.call(m.schedulingLatencyNs) : o.longs === Number ? new $util.LongBits(m.schedulingLatencyNs.low >>> 0, m.schedulingLatencyNs.high >>> 0).toNumber() : m.schedulingLatencyNs;
                    }
                    return d;
                };

                /**
                 * Converts this CameraNodeProcessingDetails to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidCameraFrameEvent.CameraNodeProcessingDetails
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                CameraNodeProcessingDetails.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return CameraNodeProcessingDetails;
            })();

            return AndroidCameraFrameEvent;
        })();

        protos.AndroidCameraSessionStats = (function() {

            /**
             * Properties of an AndroidCameraSessionStats.
             * @memberof perfetto.protos
             * @interface IAndroidCameraSessionStats
             * @property {number|null} [sessionId] AndroidCameraSessionStats sessionId
             * @property {perfetto.protos.AndroidCameraSessionStats.ICameraGraph|null} [graph] AndroidCameraSessionStats graph
             */

            /**
             * Constructs a new AndroidCameraSessionStats.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidCameraSessionStats.
             * @implements IAndroidCameraSessionStats
             * @constructor
             * @param {perfetto.protos.IAndroidCameraSessionStats=} [p] Properties to set
             */
            function AndroidCameraSessionStats(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidCameraSessionStats sessionId.
             * @member {number} sessionId
             * @memberof perfetto.protos.AndroidCameraSessionStats
             * @instance
             */
            AndroidCameraSessionStats.prototype.sessionId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * AndroidCameraSessionStats graph.
             * @member {perfetto.protos.AndroidCameraSessionStats.ICameraGraph|null|undefined} graph
             * @memberof perfetto.protos.AndroidCameraSessionStats
             * @instance
             */
            AndroidCameraSessionStats.prototype.graph = null;

            /**
             * Creates a new AndroidCameraSessionStats instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidCameraSessionStats
             * @static
             * @param {perfetto.protos.IAndroidCameraSessionStats=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidCameraSessionStats} AndroidCameraSessionStats instance
             */
            AndroidCameraSessionStats.create = function create(properties) {
                return new AndroidCameraSessionStats(properties);
            };

            /**
             * Encodes the specified AndroidCameraSessionStats message. Does not implicitly {@link perfetto.protos.AndroidCameraSessionStats.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidCameraSessionStats
             * @static
             * @param {perfetto.protos.IAndroidCameraSessionStats} m AndroidCameraSessionStats message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidCameraSessionStats.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.sessionId != null && Object.hasOwnProperty.call(m, "sessionId"))
                    w.uint32(8).uint64(m.sessionId);
                if (m.graph != null && Object.hasOwnProperty.call(m, "graph"))
                    $root.perfetto.protos.AndroidCameraSessionStats.CameraGraph.encode(m.graph, w.uint32(18).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified AndroidCameraSessionStats message, length delimited. Does not implicitly {@link perfetto.protos.AndroidCameraSessionStats.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidCameraSessionStats
             * @static
             * @param {perfetto.protos.IAndroidCameraSessionStats} message AndroidCameraSessionStats message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidCameraSessionStats.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidCameraSessionStats message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidCameraSessionStats
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidCameraSessionStats} AndroidCameraSessionStats
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidCameraSessionStats.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidCameraSessionStats();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.sessionId = r.uint64();
                        break;
                    case 2:
                        m.graph = $root.perfetto.protos.AndroidCameraSessionStats.CameraGraph.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidCameraSessionStats message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidCameraSessionStats
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidCameraSessionStats} AndroidCameraSessionStats
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidCameraSessionStats.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidCameraSessionStats message.
             * @function verify
             * @memberof perfetto.protos.AndroidCameraSessionStats
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidCameraSessionStats.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.sessionId != null && m.hasOwnProperty("sessionId")) {
                    if (!$util.isInteger(m.sessionId) && !(m.sessionId && $util.isInteger(m.sessionId.low) && $util.isInteger(m.sessionId.high)))
                        return "sessionId: integer|Long expected";
                }
                if (m.graph != null && m.hasOwnProperty("graph")) {
                    {
                        var e = $root.perfetto.protos.AndroidCameraSessionStats.CameraGraph.verify(m.graph);
                        if (e)
                            return "graph." + e;
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidCameraSessionStats message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidCameraSessionStats
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidCameraSessionStats} AndroidCameraSessionStats
             */
            AndroidCameraSessionStats.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidCameraSessionStats)
                    return d;
                var m = new $root.perfetto.protos.AndroidCameraSessionStats();
                if (d.sessionId != null) {
                    if ($util.Long)
                        (m.sessionId = $util.Long.fromValue(d.sessionId)).unsigned = true;
                    else if (typeof d.sessionId === "string")
                        m.sessionId = parseInt(d.sessionId, 10);
                    else if (typeof d.sessionId === "number")
                        m.sessionId = d.sessionId;
                    else if (typeof d.sessionId === "object")
                        m.sessionId = new $util.LongBits(d.sessionId.low >>> 0, d.sessionId.high >>> 0).toNumber(true);
                }
                if (d.graph != null) {
                    if (typeof d.graph !== "object")
                        throw TypeError(".perfetto.protos.AndroidCameraSessionStats.graph: object expected");
                    m.graph = $root.perfetto.protos.AndroidCameraSessionStats.CameraGraph.fromObject(d.graph);
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidCameraSessionStats message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidCameraSessionStats
             * @static
             * @param {perfetto.protos.AndroidCameraSessionStats} m AndroidCameraSessionStats
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidCameraSessionStats.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sessionId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sessionId = o.longs === String ? "0" : 0;
                    d.graph = null;
                }
                if (m.sessionId != null && m.hasOwnProperty("sessionId")) {
                    if (typeof m.sessionId === "number")
                        d.sessionId = o.longs === String ? String(m.sessionId) : m.sessionId;
                    else
                        d.sessionId = o.longs === String ? $util.Long.prototype.toString.call(m.sessionId) : o.longs === Number ? new $util.LongBits(m.sessionId.low >>> 0, m.sessionId.high >>> 0).toNumber(true) : m.sessionId;
                }
                if (m.graph != null && m.hasOwnProperty("graph")) {
                    d.graph = $root.perfetto.protos.AndroidCameraSessionStats.CameraGraph.toObject(m.graph, o);
                }
                return d;
            };

            /**
             * Converts this AndroidCameraSessionStats to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidCameraSessionStats
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidCameraSessionStats.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidCameraSessionStats.CameraGraph = (function() {

                /**
                 * Properties of a CameraGraph.
                 * @memberof perfetto.protos.AndroidCameraSessionStats
                 * @interface ICameraGraph
                 * @property {Array.<perfetto.protos.AndroidCameraSessionStats.CameraGraph.ICameraNode>|null} [nodes] CameraGraph nodes
                 * @property {Array.<perfetto.protos.AndroidCameraSessionStats.CameraGraph.ICameraEdge>|null} [edges] CameraGraph edges
                 */

                /**
                 * Constructs a new CameraGraph.
                 * @memberof perfetto.protos.AndroidCameraSessionStats
                 * @classdesc Represents a CameraGraph.
                 * @implements ICameraGraph
                 * @constructor
                 * @param {perfetto.protos.AndroidCameraSessionStats.ICameraGraph=} [p] Properties to set
                 */
                function CameraGraph(p) {
                    this.nodes = [];
                    this.edges = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * CameraGraph nodes.
                 * @member {Array.<perfetto.protos.AndroidCameraSessionStats.CameraGraph.ICameraNode>} nodes
                 * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph
                 * @instance
                 */
                CameraGraph.prototype.nodes = $util.emptyArray;

                /**
                 * CameraGraph edges.
                 * @member {Array.<perfetto.protos.AndroidCameraSessionStats.CameraGraph.ICameraEdge>} edges
                 * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph
                 * @instance
                 */
                CameraGraph.prototype.edges = $util.emptyArray;

                /**
                 * Creates a new CameraGraph instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph
                 * @static
                 * @param {perfetto.protos.AndroidCameraSessionStats.ICameraGraph=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidCameraSessionStats.CameraGraph} CameraGraph instance
                 */
                CameraGraph.create = function create(properties) {
                    return new CameraGraph(properties);
                };

                /**
                 * Encodes the specified CameraGraph message. Does not implicitly {@link perfetto.protos.AndroidCameraSessionStats.CameraGraph.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph
                 * @static
                 * @param {perfetto.protos.AndroidCameraSessionStats.ICameraGraph} m CameraGraph message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CameraGraph.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.nodes != null && m.nodes.length) {
                        for (var i = 0; i < m.nodes.length; ++i)
                            $root.perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode.encode(m.nodes[i], w.uint32(10).fork()).ldelim();
                    }
                    if (m.edges != null && m.edges.length) {
                        for (var i = 0; i < m.edges.length; ++i)
                            $root.perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge.encode(m.edges[i], w.uint32(18).fork()).ldelim();
                    }
                    return w;
                };

                /**
                 * Encodes the specified CameraGraph message, length delimited. Does not implicitly {@link perfetto.protos.AndroidCameraSessionStats.CameraGraph.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph
                 * @static
                 * @param {perfetto.protos.AndroidCameraSessionStats.ICameraGraph} message CameraGraph message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CameraGraph.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a CameraGraph message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidCameraSessionStats.CameraGraph} CameraGraph
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CameraGraph.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidCameraSessionStats.CameraGraph();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            if (!(m.nodes && m.nodes.length))
                                m.nodes = [];
                            m.nodes.push($root.perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode.decode(r, r.uint32()));
                            break;
                        case 2:
                            if (!(m.edges && m.edges.length))
                                m.edges = [];
                            m.edges.push($root.perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a CameraGraph message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidCameraSessionStats.CameraGraph} CameraGraph
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CameraGraph.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a CameraGraph message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                CameraGraph.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.nodes != null && m.hasOwnProperty("nodes")) {
                        if (!Array.isArray(m.nodes))
                            return "nodes: array expected";
                        for (var i = 0; i < m.nodes.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode.verify(m.nodes[i]);
                                if (e)
                                    return "nodes." + e;
                            }
                        }
                    }
                    if (m.edges != null && m.hasOwnProperty("edges")) {
                        if (!Array.isArray(m.edges))
                            return "edges: array expected";
                        for (var i = 0; i < m.edges.length; ++i) {
                            {
                                var e = $root.perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge.verify(m.edges[i]);
                                if (e)
                                    return "edges." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates a CameraGraph message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidCameraSessionStats.CameraGraph} CameraGraph
                 */
                CameraGraph.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidCameraSessionStats.CameraGraph)
                        return d;
                    var m = new $root.perfetto.protos.AndroidCameraSessionStats.CameraGraph();
                    if (d.nodes) {
                        if (!Array.isArray(d.nodes))
                            throw TypeError(".perfetto.protos.AndroidCameraSessionStats.CameraGraph.nodes: array expected");
                        m.nodes = [];
                        for (var i = 0; i < d.nodes.length; ++i) {
                            if (typeof d.nodes[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidCameraSessionStats.CameraGraph.nodes: object expected");
                            m.nodes[i] = $root.perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode.fromObject(d.nodes[i]);
                        }
                    }
                    if (d.edges) {
                        if (!Array.isArray(d.edges))
                            throw TypeError(".perfetto.protos.AndroidCameraSessionStats.CameraGraph.edges: array expected");
                        m.edges = [];
                        for (var i = 0; i < d.edges.length; ++i) {
                            if (typeof d.edges[i] !== "object")
                                throw TypeError(".perfetto.protos.AndroidCameraSessionStats.CameraGraph.edges: object expected");
                            m.edges[i] = $root.perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge.fromObject(d.edges[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a CameraGraph message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph
                 * @static
                 * @param {perfetto.protos.AndroidCameraSessionStats.CameraGraph} m CameraGraph
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                CameraGraph.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.nodes = [];
                        d.edges = [];
                    }
                    if (m.nodes && m.nodes.length) {
                        d.nodes = [];
                        for (var j = 0; j < m.nodes.length; ++j) {
                            d.nodes[j] = $root.perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode.toObject(m.nodes[j], o);
                        }
                    }
                    if (m.edges && m.edges.length) {
                        d.edges = [];
                        for (var j = 0; j < m.edges.length; ++j) {
                            d.edges[j] = $root.perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge.toObject(m.edges[j], o);
                        }
                    }
                    return d;
                };

                /**
                 * Converts this CameraGraph to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                CameraGraph.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                CameraGraph.CameraNode = (function() {

                    /**
                     * Properties of a CameraNode.
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph
                     * @interface ICameraNode
                     * @property {number|null} [nodeId] CameraNode nodeId
                     * @property {Array.<number>|null} [inputIds] CameraNode inputIds
                     * @property {Array.<number>|null} [outputIds] CameraNode outputIds
                     * @property {number|null} [vendorDataVersion] CameraNode vendorDataVersion
                     * @property {Uint8Array|null} [vendorData] CameraNode vendorData
                     */

                    /**
                     * Constructs a new CameraNode.
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph
                     * @classdesc Represents a CameraNode.
                     * @implements ICameraNode
                     * @constructor
                     * @param {perfetto.protos.AndroidCameraSessionStats.CameraGraph.ICameraNode=} [p] Properties to set
                     */
                    function CameraNode(p) {
                        this.inputIds = [];
                        this.outputIds = [];
                        if (p)
                            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                                if (p[ks[i]] != null)
                                    this[ks[i]] = p[ks[i]];
                    }

                    /**
                     * CameraNode nodeId.
                     * @member {number} nodeId
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode
                     * @instance
                     */
                    CameraNode.prototype.nodeId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                    /**
                     * CameraNode inputIds.
                     * @member {Array.<number>} inputIds
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode
                     * @instance
                     */
                    CameraNode.prototype.inputIds = $util.emptyArray;

                    /**
                     * CameraNode outputIds.
                     * @member {Array.<number>} outputIds
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode
                     * @instance
                     */
                    CameraNode.prototype.outputIds = $util.emptyArray;

                    /**
                     * CameraNode vendorDataVersion.
                     * @member {number} vendorDataVersion
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode
                     * @instance
                     */
                    CameraNode.prototype.vendorDataVersion = 0;

                    /**
                     * CameraNode vendorData.
                     * @member {Uint8Array} vendorData
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode
                     * @instance
                     */
                    CameraNode.prototype.vendorData = $util.newBuffer([]);

                    /**
                     * Creates a new CameraNode instance using the specified properties.
                     * @function create
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode
                     * @static
                     * @param {perfetto.protos.AndroidCameraSessionStats.CameraGraph.ICameraNode=} [properties] Properties to set
                     * @returns {perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode} CameraNode instance
                     */
                    CameraNode.create = function create(properties) {
                        return new CameraNode(properties);
                    };

                    /**
                     * Encodes the specified CameraNode message. Does not implicitly {@link perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode.verify|verify} messages.
                     * @function encode
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode
                     * @static
                     * @param {perfetto.protos.AndroidCameraSessionStats.CameraGraph.ICameraNode} m CameraNode message or plain object to encode
                     * @param {$protobuf.Writer} [w] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    CameraNode.encode = function encode(m, w) {
                        if (!w)
                            w = $Writer.create();
                        if (m.nodeId != null && Object.hasOwnProperty.call(m, "nodeId"))
                            w.uint32(8).int64(m.nodeId);
                        if (m.inputIds != null && m.inputIds.length) {
                            for (var i = 0; i < m.inputIds.length; ++i)
                                w.uint32(16).int64(m.inputIds[i]);
                        }
                        if (m.outputIds != null && m.outputIds.length) {
                            for (var i = 0; i < m.outputIds.length; ++i)
                                w.uint32(24).int64(m.outputIds[i]);
                        }
                        if (m.vendorDataVersion != null && Object.hasOwnProperty.call(m, "vendorDataVersion"))
                            w.uint32(32).int32(m.vendorDataVersion);
                        if (m.vendorData != null && Object.hasOwnProperty.call(m, "vendorData"))
                            w.uint32(42).bytes(m.vendorData);
                        return w;
                    };

                    /**
                     * Encodes the specified CameraNode message, length delimited. Does not implicitly {@link perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode
                     * @static
                     * @param {perfetto.protos.AndroidCameraSessionStats.CameraGraph.ICameraNode} message CameraNode message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    CameraNode.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a CameraNode message from the specified reader or buffer.
                     * @function decode
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                     * @param {number} [l] Message length if known beforehand
                     * @returns {perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode} CameraNode
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    CameraNode.decode = function decode(r, l) {
                        if (!(r instanceof $Reader))
                            r = $Reader.create(r);
                        var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode();
                        while (r.pos < c) {
                            var t = r.uint32();
                            switch (t >>> 3) {
                            case 1:
                                m.nodeId = r.int64();
                                break;
                            case 2:
                                if (!(m.inputIds && m.inputIds.length))
                                    m.inputIds = [];
                                if ((t & 7) === 2) {
                                    var c2 = r.uint32() + r.pos;
                                    while (r.pos < c2)
                                        m.inputIds.push(r.int64());
                                } else
                                    m.inputIds.push(r.int64());
                                break;
                            case 3:
                                if (!(m.outputIds && m.outputIds.length))
                                    m.outputIds = [];
                                if ((t & 7) === 2) {
                                    var c2 = r.uint32() + r.pos;
                                    while (r.pos < c2)
                                        m.outputIds.push(r.int64());
                                } else
                                    m.outputIds.push(r.int64());
                                break;
                            case 4:
                                m.vendorDataVersion = r.int32();
                                break;
                            case 5:
                                m.vendorData = r.bytes();
                                break;
                            default:
                                r.skipType(t & 7);
                                break;
                            }
                        }
                        return m;
                    };

                    /**
                     * Decodes a CameraNode message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode} CameraNode
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    CameraNode.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a CameraNode message.
                     * @function verify
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode
                     * @static
                     * @param {Object.<string,*>} m Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    CameraNode.verify = function verify(m) {
                        if (typeof m !== "object" || m === null)
                            return "object expected";
                        if (m.nodeId != null && m.hasOwnProperty("nodeId")) {
                            if (!$util.isInteger(m.nodeId) && !(m.nodeId && $util.isInteger(m.nodeId.low) && $util.isInteger(m.nodeId.high)))
                                return "nodeId: integer|Long expected";
                        }
                        if (m.inputIds != null && m.hasOwnProperty("inputIds")) {
                            if (!Array.isArray(m.inputIds))
                                return "inputIds: array expected";
                            for (var i = 0; i < m.inputIds.length; ++i) {
                                if (!$util.isInteger(m.inputIds[i]) && !(m.inputIds[i] && $util.isInteger(m.inputIds[i].low) && $util.isInteger(m.inputIds[i].high)))
                                    return "inputIds: integer|Long[] expected";
                            }
                        }
                        if (m.outputIds != null && m.hasOwnProperty("outputIds")) {
                            if (!Array.isArray(m.outputIds))
                                return "outputIds: array expected";
                            for (var i = 0; i < m.outputIds.length; ++i) {
                                if (!$util.isInteger(m.outputIds[i]) && !(m.outputIds[i] && $util.isInteger(m.outputIds[i].low) && $util.isInteger(m.outputIds[i].high)))
                                    return "outputIds: integer|Long[] expected";
                            }
                        }
                        if (m.vendorDataVersion != null && m.hasOwnProperty("vendorDataVersion")) {
                            if (!$util.isInteger(m.vendorDataVersion))
                                return "vendorDataVersion: integer expected";
                        }
                        if (m.vendorData != null && m.hasOwnProperty("vendorData")) {
                            if (!(m.vendorData && typeof m.vendorData.length === "number" || $util.isString(m.vendorData)))
                                return "vendorData: buffer expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a CameraNode message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode
                     * @static
                     * @param {Object.<string,*>} d Plain object
                     * @returns {perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode} CameraNode
                     */
                    CameraNode.fromObject = function fromObject(d) {
                        if (d instanceof $root.perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode)
                            return d;
                        var m = new $root.perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode();
                        if (d.nodeId != null) {
                            if ($util.Long)
                                (m.nodeId = $util.Long.fromValue(d.nodeId)).unsigned = false;
                            else if (typeof d.nodeId === "string")
                                m.nodeId = parseInt(d.nodeId, 10);
                            else if (typeof d.nodeId === "number")
                                m.nodeId = d.nodeId;
                            else if (typeof d.nodeId === "object")
                                m.nodeId = new $util.LongBits(d.nodeId.low >>> 0, d.nodeId.high >>> 0).toNumber();
                        }
                        if (d.inputIds) {
                            if (!Array.isArray(d.inputIds))
                                throw TypeError(".perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode.inputIds: array expected");
                            m.inputIds = [];
                            for (var i = 0; i < d.inputIds.length; ++i) {
                                if ($util.Long)
                                    (m.inputIds[i] = $util.Long.fromValue(d.inputIds[i])).unsigned = false;
                                else if (typeof d.inputIds[i] === "string")
                                    m.inputIds[i] = parseInt(d.inputIds[i], 10);
                                else if (typeof d.inputIds[i] === "number")
                                    m.inputIds[i] = d.inputIds[i];
                                else if (typeof d.inputIds[i] === "object")
                                    m.inputIds[i] = new $util.LongBits(d.inputIds[i].low >>> 0, d.inputIds[i].high >>> 0).toNumber();
                            }
                        }
                        if (d.outputIds) {
                            if (!Array.isArray(d.outputIds))
                                throw TypeError(".perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode.outputIds: array expected");
                            m.outputIds = [];
                            for (var i = 0; i < d.outputIds.length; ++i) {
                                if ($util.Long)
                                    (m.outputIds[i] = $util.Long.fromValue(d.outputIds[i])).unsigned = false;
                                else if (typeof d.outputIds[i] === "string")
                                    m.outputIds[i] = parseInt(d.outputIds[i], 10);
                                else if (typeof d.outputIds[i] === "number")
                                    m.outputIds[i] = d.outputIds[i];
                                else if (typeof d.outputIds[i] === "object")
                                    m.outputIds[i] = new $util.LongBits(d.outputIds[i].low >>> 0, d.outputIds[i].high >>> 0).toNumber();
                            }
                        }
                        if (d.vendorDataVersion != null) {
                            m.vendorDataVersion = d.vendorDataVersion | 0;
                        }
                        if (d.vendorData != null) {
                            if (typeof d.vendorData === "string")
                                $util.base64.decode(d.vendorData, m.vendorData = $util.newBuffer($util.base64.length(d.vendorData)), 0);
                            else if (d.vendorData.length)
                                m.vendorData = d.vendorData;
                        }
                        return m;
                    };

                    /**
                     * Creates a plain object from a CameraNode message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode
                     * @static
                     * @param {perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode} m CameraNode
                     * @param {$protobuf.IConversionOptions} [o] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    CameraNode.toObject = function toObject(m, o) {
                        if (!o)
                            o = {};
                        var d = {};
                        if (o.arrays || o.defaults) {
                            d.inputIds = [];
                            d.outputIds = [];
                        }
                        if (o.defaults) {
                            if ($util.Long) {
                                var n = new $util.Long(0, 0, false);
                                d.nodeId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                            } else
                                d.nodeId = o.longs === String ? "0" : 0;
                            d.vendorDataVersion = 0;
                            if (o.bytes === String)
                                d.vendorData = "";
                            else {
                                d.vendorData = [];
                                if (o.bytes !== Array)
                                    d.vendorData = $util.newBuffer(d.vendorData);
                            }
                        }
                        if (m.nodeId != null && m.hasOwnProperty("nodeId")) {
                            if (typeof m.nodeId === "number")
                                d.nodeId = o.longs === String ? String(m.nodeId) : m.nodeId;
                            else
                                d.nodeId = o.longs === String ? $util.Long.prototype.toString.call(m.nodeId) : o.longs === Number ? new $util.LongBits(m.nodeId.low >>> 0, m.nodeId.high >>> 0).toNumber() : m.nodeId;
                        }
                        if (m.inputIds && m.inputIds.length) {
                            d.inputIds = [];
                            for (var j = 0; j < m.inputIds.length; ++j) {
                                if (typeof m.inputIds[j] === "number")
                                    d.inputIds[j] = o.longs === String ? String(m.inputIds[j]) : m.inputIds[j];
                                else
                                    d.inputIds[j] = o.longs === String ? $util.Long.prototype.toString.call(m.inputIds[j]) : o.longs === Number ? new $util.LongBits(m.inputIds[j].low >>> 0, m.inputIds[j].high >>> 0).toNumber() : m.inputIds[j];
                            }
                        }
                        if (m.outputIds && m.outputIds.length) {
                            d.outputIds = [];
                            for (var j = 0; j < m.outputIds.length; ++j) {
                                if (typeof m.outputIds[j] === "number")
                                    d.outputIds[j] = o.longs === String ? String(m.outputIds[j]) : m.outputIds[j];
                                else
                                    d.outputIds[j] = o.longs === String ? $util.Long.prototype.toString.call(m.outputIds[j]) : o.longs === Number ? new $util.LongBits(m.outputIds[j].low >>> 0, m.outputIds[j].high >>> 0).toNumber() : m.outputIds[j];
                            }
                        }
                        if (m.vendorDataVersion != null && m.hasOwnProperty("vendorDataVersion")) {
                            d.vendorDataVersion = m.vendorDataVersion;
                        }
                        if (m.vendorData != null && m.hasOwnProperty("vendorData")) {
                            d.vendorData = o.bytes === String ? $util.base64.encode(m.vendorData, 0, m.vendorData.length) : o.bytes === Array ? Array.prototype.slice.call(m.vendorData) : m.vendorData;
                        }
                        return d;
                    };

                    /**
                     * Converts this CameraNode to JSON.
                     * @function toJSON
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraNode
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    CameraNode.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                    };

                    return CameraNode;
                })();

                CameraGraph.CameraEdge = (function() {

                    /**
                     * Properties of a CameraEdge.
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph
                     * @interface ICameraEdge
                     * @property {number|null} [outputNodeId] CameraEdge outputNodeId
                     * @property {number|null} [outputId] CameraEdge outputId
                     * @property {number|null} [inputNodeId] CameraEdge inputNodeId
                     * @property {number|null} [inputId] CameraEdge inputId
                     * @property {number|null} [vendorDataVersion] CameraEdge vendorDataVersion
                     * @property {Uint8Array|null} [vendorData] CameraEdge vendorData
                     */

                    /**
                     * Constructs a new CameraEdge.
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph
                     * @classdesc Represents a CameraEdge.
                     * @implements ICameraEdge
                     * @constructor
                     * @param {perfetto.protos.AndroidCameraSessionStats.CameraGraph.ICameraEdge=} [p] Properties to set
                     */
                    function CameraEdge(p) {
                        if (p)
                            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                                if (p[ks[i]] != null)
                                    this[ks[i]] = p[ks[i]];
                    }

                    /**
                     * CameraEdge outputNodeId.
                     * @member {number} outputNodeId
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge
                     * @instance
                     */
                    CameraEdge.prototype.outputNodeId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                    /**
                     * CameraEdge outputId.
                     * @member {number} outputId
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge
                     * @instance
                     */
                    CameraEdge.prototype.outputId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                    /**
                     * CameraEdge inputNodeId.
                     * @member {number} inputNodeId
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge
                     * @instance
                     */
                    CameraEdge.prototype.inputNodeId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                    /**
                     * CameraEdge inputId.
                     * @member {number} inputId
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge
                     * @instance
                     */
                    CameraEdge.prototype.inputId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                    /**
                     * CameraEdge vendorDataVersion.
                     * @member {number} vendorDataVersion
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge
                     * @instance
                     */
                    CameraEdge.prototype.vendorDataVersion = 0;

                    /**
                     * CameraEdge vendorData.
                     * @member {Uint8Array} vendorData
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge
                     * @instance
                     */
                    CameraEdge.prototype.vendorData = $util.newBuffer([]);

                    /**
                     * Creates a new CameraEdge instance using the specified properties.
                     * @function create
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge
                     * @static
                     * @param {perfetto.protos.AndroidCameraSessionStats.CameraGraph.ICameraEdge=} [properties] Properties to set
                     * @returns {perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge} CameraEdge instance
                     */
                    CameraEdge.create = function create(properties) {
                        return new CameraEdge(properties);
                    };

                    /**
                     * Encodes the specified CameraEdge message. Does not implicitly {@link perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge.verify|verify} messages.
                     * @function encode
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge
                     * @static
                     * @param {perfetto.protos.AndroidCameraSessionStats.CameraGraph.ICameraEdge} m CameraEdge message or plain object to encode
                     * @param {$protobuf.Writer} [w] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    CameraEdge.encode = function encode(m, w) {
                        if (!w)
                            w = $Writer.create();
                        if (m.outputNodeId != null && Object.hasOwnProperty.call(m, "outputNodeId"))
                            w.uint32(8).int64(m.outputNodeId);
                        if (m.outputId != null && Object.hasOwnProperty.call(m, "outputId"))
                            w.uint32(16).int64(m.outputId);
                        if (m.inputNodeId != null && Object.hasOwnProperty.call(m, "inputNodeId"))
                            w.uint32(24).int64(m.inputNodeId);
                        if (m.inputId != null && Object.hasOwnProperty.call(m, "inputId"))
                            w.uint32(32).int64(m.inputId);
                        if (m.vendorDataVersion != null && Object.hasOwnProperty.call(m, "vendorDataVersion"))
                            w.uint32(40).int32(m.vendorDataVersion);
                        if (m.vendorData != null && Object.hasOwnProperty.call(m, "vendorData"))
                            w.uint32(50).bytes(m.vendorData);
                        return w;
                    };

                    /**
                     * Encodes the specified CameraEdge message, length delimited. Does not implicitly {@link perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge
                     * @static
                     * @param {perfetto.protos.AndroidCameraSessionStats.CameraGraph.ICameraEdge} message CameraEdge message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    CameraEdge.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a CameraEdge message from the specified reader or buffer.
                     * @function decode
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                     * @param {number} [l] Message length if known beforehand
                     * @returns {perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge} CameraEdge
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    CameraEdge.decode = function decode(r, l) {
                        if (!(r instanceof $Reader))
                            r = $Reader.create(r);
                        var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge();
                        while (r.pos < c) {
                            var t = r.uint32();
                            switch (t >>> 3) {
                            case 1:
                                m.outputNodeId = r.int64();
                                break;
                            case 2:
                                m.outputId = r.int64();
                                break;
                            case 3:
                                m.inputNodeId = r.int64();
                                break;
                            case 4:
                                m.inputId = r.int64();
                                break;
                            case 5:
                                m.vendorDataVersion = r.int32();
                                break;
                            case 6:
                                m.vendorData = r.bytes();
                                break;
                            default:
                                r.skipType(t & 7);
                                break;
                            }
                        }
                        return m;
                    };

                    /**
                     * Decodes a CameraEdge message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge} CameraEdge
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    CameraEdge.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a CameraEdge message.
                     * @function verify
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge
                     * @static
                     * @param {Object.<string,*>} m Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    CameraEdge.verify = function verify(m) {
                        if (typeof m !== "object" || m === null)
                            return "object expected";
                        if (m.outputNodeId != null && m.hasOwnProperty("outputNodeId")) {
                            if (!$util.isInteger(m.outputNodeId) && !(m.outputNodeId && $util.isInteger(m.outputNodeId.low) && $util.isInteger(m.outputNodeId.high)))
                                return "outputNodeId: integer|Long expected";
                        }
                        if (m.outputId != null && m.hasOwnProperty("outputId")) {
                            if (!$util.isInteger(m.outputId) && !(m.outputId && $util.isInteger(m.outputId.low) && $util.isInteger(m.outputId.high)))
                                return "outputId: integer|Long expected";
                        }
                        if (m.inputNodeId != null && m.hasOwnProperty("inputNodeId")) {
                            if (!$util.isInteger(m.inputNodeId) && !(m.inputNodeId && $util.isInteger(m.inputNodeId.low) && $util.isInteger(m.inputNodeId.high)))
                                return "inputNodeId: integer|Long expected";
                        }
                        if (m.inputId != null && m.hasOwnProperty("inputId")) {
                            if (!$util.isInteger(m.inputId) && !(m.inputId && $util.isInteger(m.inputId.low) && $util.isInteger(m.inputId.high)))
                                return "inputId: integer|Long expected";
                        }
                        if (m.vendorDataVersion != null && m.hasOwnProperty("vendorDataVersion")) {
                            if (!$util.isInteger(m.vendorDataVersion))
                                return "vendorDataVersion: integer expected";
                        }
                        if (m.vendorData != null && m.hasOwnProperty("vendorData")) {
                            if (!(m.vendorData && typeof m.vendorData.length === "number" || $util.isString(m.vendorData)))
                                return "vendorData: buffer expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a CameraEdge message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge
                     * @static
                     * @param {Object.<string,*>} d Plain object
                     * @returns {perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge} CameraEdge
                     */
                    CameraEdge.fromObject = function fromObject(d) {
                        if (d instanceof $root.perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge)
                            return d;
                        var m = new $root.perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge();
                        if (d.outputNodeId != null) {
                            if ($util.Long)
                                (m.outputNodeId = $util.Long.fromValue(d.outputNodeId)).unsigned = false;
                            else if (typeof d.outputNodeId === "string")
                                m.outputNodeId = parseInt(d.outputNodeId, 10);
                            else if (typeof d.outputNodeId === "number")
                                m.outputNodeId = d.outputNodeId;
                            else if (typeof d.outputNodeId === "object")
                                m.outputNodeId = new $util.LongBits(d.outputNodeId.low >>> 0, d.outputNodeId.high >>> 0).toNumber();
                        }
                        if (d.outputId != null) {
                            if ($util.Long)
                                (m.outputId = $util.Long.fromValue(d.outputId)).unsigned = false;
                            else if (typeof d.outputId === "string")
                                m.outputId = parseInt(d.outputId, 10);
                            else if (typeof d.outputId === "number")
                                m.outputId = d.outputId;
                            else if (typeof d.outputId === "object")
                                m.outputId = new $util.LongBits(d.outputId.low >>> 0, d.outputId.high >>> 0).toNumber();
                        }
                        if (d.inputNodeId != null) {
                            if ($util.Long)
                                (m.inputNodeId = $util.Long.fromValue(d.inputNodeId)).unsigned = false;
                            else if (typeof d.inputNodeId === "string")
                                m.inputNodeId = parseInt(d.inputNodeId, 10);
                            else if (typeof d.inputNodeId === "number")
                                m.inputNodeId = d.inputNodeId;
                            else if (typeof d.inputNodeId === "object")
                                m.inputNodeId = new $util.LongBits(d.inputNodeId.low >>> 0, d.inputNodeId.high >>> 0).toNumber();
                        }
                        if (d.inputId != null) {
                            if ($util.Long)
                                (m.inputId = $util.Long.fromValue(d.inputId)).unsigned = false;
                            else if (typeof d.inputId === "string")
                                m.inputId = parseInt(d.inputId, 10);
                            else if (typeof d.inputId === "number")
                                m.inputId = d.inputId;
                            else if (typeof d.inputId === "object")
                                m.inputId = new $util.LongBits(d.inputId.low >>> 0, d.inputId.high >>> 0).toNumber();
                        }
                        if (d.vendorDataVersion != null) {
                            m.vendorDataVersion = d.vendorDataVersion | 0;
                        }
                        if (d.vendorData != null) {
                            if (typeof d.vendorData === "string")
                                $util.base64.decode(d.vendorData, m.vendorData = $util.newBuffer($util.base64.length(d.vendorData)), 0);
                            else if (d.vendorData.length)
                                m.vendorData = d.vendorData;
                        }
                        return m;
                    };

                    /**
                     * Creates a plain object from a CameraEdge message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge
                     * @static
                     * @param {perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge} m CameraEdge
                     * @param {$protobuf.IConversionOptions} [o] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    CameraEdge.toObject = function toObject(m, o) {
                        if (!o)
                            o = {};
                        var d = {};
                        if (o.defaults) {
                            if ($util.Long) {
                                var n = new $util.Long(0, 0, false);
                                d.outputNodeId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                            } else
                                d.outputNodeId = o.longs === String ? "0" : 0;
                            if ($util.Long) {
                                var n = new $util.Long(0, 0, false);
                                d.outputId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                            } else
                                d.outputId = o.longs === String ? "0" : 0;
                            if ($util.Long) {
                                var n = new $util.Long(0, 0, false);
                                d.inputNodeId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                            } else
                                d.inputNodeId = o.longs === String ? "0" : 0;
                            if ($util.Long) {
                                var n = new $util.Long(0, 0, false);
                                d.inputId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                            } else
                                d.inputId = o.longs === String ? "0" : 0;
                            d.vendorDataVersion = 0;
                            if (o.bytes === String)
                                d.vendorData = "";
                            else {
                                d.vendorData = [];
                                if (o.bytes !== Array)
                                    d.vendorData = $util.newBuffer(d.vendorData);
                            }
                        }
                        if (m.outputNodeId != null && m.hasOwnProperty("outputNodeId")) {
                            if (typeof m.outputNodeId === "number")
                                d.outputNodeId = o.longs === String ? String(m.outputNodeId) : m.outputNodeId;
                            else
                                d.outputNodeId = o.longs === String ? $util.Long.prototype.toString.call(m.outputNodeId) : o.longs === Number ? new $util.LongBits(m.outputNodeId.low >>> 0, m.outputNodeId.high >>> 0).toNumber() : m.outputNodeId;
                        }
                        if (m.outputId != null && m.hasOwnProperty("outputId")) {
                            if (typeof m.outputId === "number")
                                d.outputId = o.longs === String ? String(m.outputId) : m.outputId;
                            else
                                d.outputId = o.longs === String ? $util.Long.prototype.toString.call(m.outputId) : o.longs === Number ? new $util.LongBits(m.outputId.low >>> 0, m.outputId.high >>> 0).toNumber() : m.outputId;
                        }
                        if (m.inputNodeId != null && m.hasOwnProperty("inputNodeId")) {
                            if (typeof m.inputNodeId === "number")
                                d.inputNodeId = o.longs === String ? String(m.inputNodeId) : m.inputNodeId;
                            else
                                d.inputNodeId = o.longs === String ? $util.Long.prototype.toString.call(m.inputNodeId) : o.longs === Number ? new $util.LongBits(m.inputNodeId.low >>> 0, m.inputNodeId.high >>> 0).toNumber() : m.inputNodeId;
                        }
                        if (m.inputId != null && m.hasOwnProperty("inputId")) {
                            if (typeof m.inputId === "number")
                                d.inputId = o.longs === String ? String(m.inputId) : m.inputId;
                            else
                                d.inputId = o.longs === String ? $util.Long.prototype.toString.call(m.inputId) : o.longs === Number ? new $util.LongBits(m.inputId.low >>> 0, m.inputId.high >>> 0).toNumber() : m.inputId;
                        }
                        if (m.vendorDataVersion != null && m.hasOwnProperty("vendorDataVersion")) {
                            d.vendorDataVersion = m.vendorDataVersion;
                        }
                        if (m.vendorData != null && m.hasOwnProperty("vendorData")) {
                            d.vendorData = o.bytes === String ? $util.base64.encode(m.vendorData, 0, m.vendorData.length) : o.bytes === Array ? Array.prototype.slice.call(m.vendorData) : m.vendorData;
                        }
                        return d;
                    };

                    /**
                     * Converts this CameraEdge to JSON.
                     * @function toJSON
                     * @memberof perfetto.protos.AndroidCameraSessionStats.CameraGraph.CameraEdge
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    CameraEdge.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                    };

                    return CameraEdge;
                })();

                return CameraGraph;
            })();

            return AndroidCameraSessionStats;
        })();

        protos.FrameTimelineEvent = (function() {

            /**
             * Properties of a FrameTimelineEvent.
             * @memberof perfetto.protos
             * @interface IFrameTimelineEvent
             * @property {perfetto.protos.FrameTimelineEvent.IExpectedDisplayFrameStart|null} [expectedDisplayFrameStart] FrameTimelineEvent expectedDisplayFrameStart
             * @property {perfetto.protos.FrameTimelineEvent.IActualDisplayFrameStart|null} [actualDisplayFrameStart] FrameTimelineEvent actualDisplayFrameStart
             * @property {perfetto.protos.FrameTimelineEvent.IExpectedSurfaceFrameStart|null} [expectedSurfaceFrameStart] FrameTimelineEvent expectedSurfaceFrameStart
             * @property {perfetto.protos.FrameTimelineEvent.IActualSurfaceFrameStart|null} [actualSurfaceFrameStart] FrameTimelineEvent actualSurfaceFrameStart
             * @property {perfetto.protos.FrameTimelineEvent.IFrameEnd|null} [frameEnd] FrameTimelineEvent frameEnd
             */

            /**
             * Constructs a new FrameTimelineEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a FrameTimelineEvent.
             * @implements IFrameTimelineEvent
             * @constructor
             * @param {perfetto.protos.IFrameTimelineEvent=} [p] Properties to set
             */
            function FrameTimelineEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * FrameTimelineEvent expectedDisplayFrameStart.
             * @member {perfetto.protos.FrameTimelineEvent.IExpectedDisplayFrameStart|null|undefined} expectedDisplayFrameStart
             * @memberof perfetto.protos.FrameTimelineEvent
             * @instance
             */
            FrameTimelineEvent.prototype.expectedDisplayFrameStart = null;

            /**
             * FrameTimelineEvent actualDisplayFrameStart.
             * @member {perfetto.protos.FrameTimelineEvent.IActualDisplayFrameStart|null|undefined} actualDisplayFrameStart
             * @memberof perfetto.protos.FrameTimelineEvent
             * @instance
             */
            FrameTimelineEvent.prototype.actualDisplayFrameStart = null;

            /**
             * FrameTimelineEvent expectedSurfaceFrameStart.
             * @member {perfetto.protos.FrameTimelineEvent.IExpectedSurfaceFrameStart|null|undefined} expectedSurfaceFrameStart
             * @memberof perfetto.protos.FrameTimelineEvent
             * @instance
             */
            FrameTimelineEvent.prototype.expectedSurfaceFrameStart = null;

            /**
             * FrameTimelineEvent actualSurfaceFrameStart.
             * @member {perfetto.protos.FrameTimelineEvent.IActualSurfaceFrameStart|null|undefined} actualSurfaceFrameStart
             * @memberof perfetto.protos.FrameTimelineEvent
             * @instance
             */
            FrameTimelineEvent.prototype.actualSurfaceFrameStart = null;

            /**
             * FrameTimelineEvent frameEnd.
             * @member {perfetto.protos.FrameTimelineEvent.IFrameEnd|null|undefined} frameEnd
             * @memberof perfetto.protos.FrameTimelineEvent
             * @instance
             */
            FrameTimelineEvent.prototype.frameEnd = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * FrameTimelineEvent event.
             * @member {"expectedDisplayFrameStart"|"actualDisplayFrameStart"|"expectedSurfaceFrameStart"|"actualSurfaceFrameStart"|"frameEnd"|undefined} event
             * @memberof perfetto.protos.FrameTimelineEvent
             * @instance
             */
            Object.defineProperty(FrameTimelineEvent.prototype, "event", {
                get: $util.oneOfGetter($oneOfFields = ["expectedDisplayFrameStart", "actualDisplayFrameStart", "expectedSurfaceFrameStart", "actualSurfaceFrameStart", "frameEnd"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new FrameTimelineEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.FrameTimelineEvent
             * @static
             * @param {perfetto.protos.IFrameTimelineEvent=} [properties] Properties to set
             * @returns {perfetto.protos.FrameTimelineEvent} FrameTimelineEvent instance
             */
            FrameTimelineEvent.create = function create(properties) {
                return new FrameTimelineEvent(properties);
            };

            /**
             * Encodes the specified FrameTimelineEvent message. Does not implicitly {@link perfetto.protos.FrameTimelineEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.FrameTimelineEvent
             * @static
             * @param {perfetto.protos.IFrameTimelineEvent} m FrameTimelineEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FrameTimelineEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.expectedDisplayFrameStart != null && Object.hasOwnProperty.call(m, "expectedDisplayFrameStart"))
                    $root.perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart.encode(m.expectedDisplayFrameStart, w.uint32(10).fork()).ldelim();
                if (m.actualDisplayFrameStart != null && Object.hasOwnProperty.call(m, "actualDisplayFrameStart"))
                    $root.perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart.encode(m.actualDisplayFrameStart, w.uint32(18).fork()).ldelim();
                if (m.expectedSurfaceFrameStart != null && Object.hasOwnProperty.call(m, "expectedSurfaceFrameStart"))
                    $root.perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart.encode(m.expectedSurfaceFrameStart, w.uint32(26).fork()).ldelim();
                if (m.actualSurfaceFrameStart != null && Object.hasOwnProperty.call(m, "actualSurfaceFrameStart"))
                    $root.perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart.encode(m.actualSurfaceFrameStart, w.uint32(34).fork()).ldelim();
                if (m.frameEnd != null && Object.hasOwnProperty.call(m, "frameEnd"))
                    $root.perfetto.protos.FrameTimelineEvent.FrameEnd.encode(m.frameEnd, w.uint32(42).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified FrameTimelineEvent message, length delimited. Does not implicitly {@link perfetto.protos.FrameTimelineEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.FrameTimelineEvent
             * @static
             * @param {perfetto.protos.IFrameTimelineEvent} message FrameTimelineEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FrameTimelineEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a FrameTimelineEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.FrameTimelineEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.FrameTimelineEvent} FrameTimelineEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FrameTimelineEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FrameTimelineEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.expectedDisplayFrameStart = $root.perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart.decode(r, r.uint32());
                        break;
                    case 2:
                        m.actualDisplayFrameStart = $root.perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart.decode(r, r.uint32());
                        break;
                    case 3:
                        m.expectedSurfaceFrameStart = $root.perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart.decode(r, r.uint32());
                        break;
                    case 4:
                        m.actualSurfaceFrameStart = $root.perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart.decode(r, r.uint32());
                        break;
                    case 5:
                        m.frameEnd = $root.perfetto.protos.FrameTimelineEvent.FrameEnd.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a FrameTimelineEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.FrameTimelineEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.FrameTimelineEvent} FrameTimelineEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FrameTimelineEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a FrameTimelineEvent message.
             * @function verify
             * @memberof perfetto.protos.FrameTimelineEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            FrameTimelineEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                var p = {};
                if (m.expectedDisplayFrameStart != null && m.hasOwnProperty("expectedDisplayFrameStart")) {
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart.verify(m.expectedDisplayFrameStart);
                        if (e)
                            return "expectedDisplayFrameStart." + e;
                    }
                }
                if (m.actualDisplayFrameStart != null && m.hasOwnProperty("actualDisplayFrameStart")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart.verify(m.actualDisplayFrameStart);
                        if (e)
                            return "actualDisplayFrameStart." + e;
                    }
                }
                if (m.expectedSurfaceFrameStart != null && m.hasOwnProperty("expectedSurfaceFrameStart")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart.verify(m.expectedSurfaceFrameStart);
                        if (e)
                            return "expectedSurfaceFrameStart." + e;
                    }
                }
                if (m.actualSurfaceFrameStart != null && m.hasOwnProperty("actualSurfaceFrameStart")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart.verify(m.actualSurfaceFrameStart);
                        if (e)
                            return "actualSurfaceFrameStart." + e;
                    }
                }
                if (m.frameEnd != null && m.hasOwnProperty("frameEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.FrameTimelineEvent.FrameEnd.verify(m.frameEnd);
                        if (e)
                            return "frameEnd." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a FrameTimelineEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.FrameTimelineEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.FrameTimelineEvent} FrameTimelineEvent
             */
            FrameTimelineEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.FrameTimelineEvent)
                    return d;
                var m = new $root.perfetto.protos.FrameTimelineEvent();
                if (d.expectedDisplayFrameStart != null) {
                    if (typeof d.expectedDisplayFrameStart !== "object")
                        throw TypeError(".perfetto.protos.FrameTimelineEvent.expectedDisplayFrameStart: object expected");
                    m.expectedDisplayFrameStart = $root.perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart.fromObject(d.expectedDisplayFrameStart);
                }
                if (d.actualDisplayFrameStart != null) {
                    if (typeof d.actualDisplayFrameStart !== "object")
                        throw TypeError(".perfetto.protos.FrameTimelineEvent.actualDisplayFrameStart: object expected");
                    m.actualDisplayFrameStart = $root.perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart.fromObject(d.actualDisplayFrameStart);
                }
                if (d.expectedSurfaceFrameStart != null) {
                    if (typeof d.expectedSurfaceFrameStart !== "object")
                        throw TypeError(".perfetto.protos.FrameTimelineEvent.expectedSurfaceFrameStart: object expected");
                    m.expectedSurfaceFrameStart = $root.perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart.fromObject(d.expectedSurfaceFrameStart);
                }
                if (d.actualSurfaceFrameStart != null) {
                    if (typeof d.actualSurfaceFrameStart !== "object")
                        throw TypeError(".perfetto.protos.FrameTimelineEvent.actualSurfaceFrameStart: object expected");
                    m.actualSurfaceFrameStart = $root.perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart.fromObject(d.actualSurfaceFrameStart);
                }
                if (d.frameEnd != null) {
                    if (typeof d.frameEnd !== "object")
                        throw TypeError(".perfetto.protos.FrameTimelineEvent.frameEnd: object expected");
                    m.frameEnd = $root.perfetto.protos.FrameTimelineEvent.FrameEnd.fromObject(d.frameEnd);
                }
                return m;
            };

            /**
             * Creates a plain object from a FrameTimelineEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.FrameTimelineEvent
             * @static
             * @param {perfetto.protos.FrameTimelineEvent} m FrameTimelineEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            FrameTimelineEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (m.expectedDisplayFrameStart != null && m.hasOwnProperty("expectedDisplayFrameStart")) {
                    d.expectedDisplayFrameStart = $root.perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart.toObject(m.expectedDisplayFrameStart, o);
                    if (o.oneofs)
                        d.event = "expectedDisplayFrameStart";
                }
                if (m.actualDisplayFrameStart != null && m.hasOwnProperty("actualDisplayFrameStart")) {
                    d.actualDisplayFrameStart = $root.perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart.toObject(m.actualDisplayFrameStart, o);
                    if (o.oneofs)
                        d.event = "actualDisplayFrameStart";
                }
                if (m.expectedSurfaceFrameStart != null && m.hasOwnProperty("expectedSurfaceFrameStart")) {
                    d.expectedSurfaceFrameStart = $root.perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart.toObject(m.expectedSurfaceFrameStart, o);
                    if (o.oneofs)
                        d.event = "expectedSurfaceFrameStart";
                }
                if (m.actualSurfaceFrameStart != null && m.hasOwnProperty("actualSurfaceFrameStart")) {
                    d.actualSurfaceFrameStart = $root.perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart.toObject(m.actualSurfaceFrameStart, o);
                    if (o.oneofs)
                        d.event = "actualSurfaceFrameStart";
                }
                if (m.frameEnd != null && m.hasOwnProperty("frameEnd")) {
                    d.frameEnd = $root.perfetto.protos.FrameTimelineEvent.FrameEnd.toObject(m.frameEnd, o);
                    if (o.oneofs)
                        d.event = "frameEnd";
                }
                return d;
            };

            /**
             * Converts this FrameTimelineEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.FrameTimelineEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            FrameTimelineEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * JankType enum.
             * @name perfetto.protos.FrameTimelineEvent.JankType
             * @enum {number}
             * @property {number} JANK_UNSPECIFIED=0 JANK_UNSPECIFIED value
             * @property {number} JANK_NONE=1 JANK_NONE value
             * @property {number} JANK_SF_SCHEDULING=2 JANK_SF_SCHEDULING value
             * @property {number} JANK_PREDICTION_ERROR=4 JANK_PREDICTION_ERROR value
             * @property {number} JANK_DISPLAY_HAL=8 JANK_DISPLAY_HAL value
             * @property {number} JANK_SF_CPU_DEADLINE_MISSED=16 JANK_SF_CPU_DEADLINE_MISSED value
             * @property {number} JANK_SF_GPU_DEADLINE_MISSED=32 JANK_SF_GPU_DEADLINE_MISSED value
             * @property {number} JANK_APP_DEADLINE_MISSED=64 JANK_APP_DEADLINE_MISSED value
             * @property {number} JANK_BUFFER_STUFFING=128 JANK_BUFFER_STUFFING value
             * @property {number} JANK_UNKNOWN=256 JANK_UNKNOWN value
             * @property {number} JANK_SF_STUFFING=512 JANK_SF_STUFFING value
             */
            FrameTimelineEvent.JankType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "JANK_UNSPECIFIED"] = 0;
                values[valuesById[1] = "JANK_NONE"] = 1;
                values[valuesById[2] = "JANK_SF_SCHEDULING"] = 2;
                values[valuesById[4] = "JANK_PREDICTION_ERROR"] = 4;
                values[valuesById[8] = "JANK_DISPLAY_HAL"] = 8;
                values[valuesById[16] = "JANK_SF_CPU_DEADLINE_MISSED"] = 16;
                values[valuesById[32] = "JANK_SF_GPU_DEADLINE_MISSED"] = 32;
                values[valuesById[64] = "JANK_APP_DEADLINE_MISSED"] = 64;
                values[valuesById[128] = "JANK_BUFFER_STUFFING"] = 128;
                values[valuesById[256] = "JANK_UNKNOWN"] = 256;
                values[valuesById[512] = "JANK_SF_STUFFING"] = 512;
                return values;
            })();

            /**
             * PresentType enum.
             * @name perfetto.protos.FrameTimelineEvent.PresentType
             * @enum {number}
             * @property {number} PRESENT_UNSPECIFIED=0 PRESENT_UNSPECIFIED value
             * @property {number} PRESENT_ON_TIME=1 PRESENT_ON_TIME value
             * @property {number} PRESENT_LATE=2 PRESENT_LATE value
             * @property {number} PRESENT_EARLY=3 PRESENT_EARLY value
             * @property {number} PRESENT_DROPPED=4 PRESENT_DROPPED value
             * @property {number} PRESENT_UNKNOWN=5 PRESENT_UNKNOWN value
             */
            FrameTimelineEvent.PresentType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "PRESENT_UNSPECIFIED"] = 0;
                values[valuesById[1] = "PRESENT_ON_TIME"] = 1;
                values[valuesById[2] = "PRESENT_LATE"] = 2;
                values[valuesById[3] = "PRESENT_EARLY"] = 3;
                values[valuesById[4] = "PRESENT_DROPPED"] = 4;
                values[valuesById[5] = "PRESENT_UNKNOWN"] = 5;
                return values;
            })();

            /**
             * PredictionType enum.
             * @name perfetto.protos.FrameTimelineEvent.PredictionType
             * @enum {number}
             * @property {number} PREDICTION_UNSPECIFIED=0 PREDICTION_UNSPECIFIED value
             * @property {number} PREDICTION_VALID=1 PREDICTION_VALID value
             * @property {number} PREDICTION_EXPIRED=2 PREDICTION_EXPIRED value
             * @property {number} PREDICTION_UNKNOWN=3 PREDICTION_UNKNOWN value
             */
            FrameTimelineEvent.PredictionType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "PREDICTION_UNSPECIFIED"] = 0;
                values[valuesById[1] = "PREDICTION_VALID"] = 1;
                values[valuesById[2] = "PREDICTION_EXPIRED"] = 2;
                values[valuesById[3] = "PREDICTION_UNKNOWN"] = 3;
                return values;
            })();

            FrameTimelineEvent.ExpectedSurfaceFrameStart = (function() {

                /**
                 * Properties of an ExpectedSurfaceFrameStart.
                 * @memberof perfetto.protos.FrameTimelineEvent
                 * @interface IExpectedSurfaceFrameStart
                 * @property {number|null} [cookie] ExpectedSurfaceFrameStart cookie
                 * @property {number|null} [token] ExpectedSurfaceFrameStart token
                 * @property {number|null} [displayFrameToken] ExpectedSurfaceFrameStart displayFrameToken
                 * @property {number|null} [pid] ExpectedSurfaceFrameStart pid
                 * @property {string|null} [layerName] ExpectedSurfaceFrameStart layerName
                 */

                /**
                 * Constructs a new ExpectedSurfaceFrameStart.
                 * @memberof perfetto.protos.FrameTimelineEvent
                 * @classdesc Represents an ExpectedSurfaceFrameStart.
                 * @implements IExpectedSurfaceFrameStart
                 * @constructor
                 * @param {perfetto.protos.FrameTimelineEvent.IExpectedSurfaceFrameStart=} [p] Properties to set
                 */
                function ExpectedSurfaceFrameStart(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * ExpectedSurfaceFrameStart cookie.
                 * @member {number} cookie
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart
                 * @instance
                 */
                ExpectedSurfaceFrameStart.prototype.cookie = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * ExpectedSurfaceFrameStart token.
                 * @member {number} token
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart
                 * @instance
                 */
                ExpectedSurfaceFrameStart.prototype.token = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * ExpectedSurfaceFrameStart displayFrameToken.
                 * @member {number} displayFrameToken
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart
                 * @instance
                 */
                ExpectedSurfaceFrameStart.prototype.displayFrameToken = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * ExpectedSurfaceFrameStart pid.
                 * @member {number} pid
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart
                 * @instance
                 */
                ExpectedSurfaceFrameStart.prototype.pid = 0;

                /**
                 * ExpectedSurfaceFrameStart layerName.
                 * @member {string} layerName
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart
                 * @instance
                 */
                ExpectedSurfaceFrameStart.prototype.layerName = "";

                /**
                 * Creates a new ExpectedSurfaceFrameStart instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart
                 * @static
                 * @param {perfetto.protos.FrameTimelineEvent.IExpectedSurfaceFrameStart=} [properties] Properties to set
                 * @returns {perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart} ExpectedSurfaceFrameStart instance
                 */
                ExpectedSurfaceFrameStart.create = function create(properties) {
                    return new ExpectedSurfaceFrameStart(properties);
                };

                /**
                 * Encodes the specified ExpectedSurfaceFrameStart message. Does not implicitly {@link perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart
                 * @static
                 * @param {perfetto.protos.FrameTimelineEvent.IExpectedSurfaceFrameStart} m ExpectedSurfaceFrameStart message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ExpectedSurfaceFrameStart.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.cookie != null && Object.hasOwnProperty.call(m, "cookie"))
                        w.uint32(8).int64(m.cookie);
                    if (m.token != null && Object.hasOwnProperty.call(m, "token"))
                        w.uint32(16).int64(m.token);
                    if (m.displayFrameToken != null && Object.hasOwnProperty.call(m, "displayFrameToken"))
                        w.uint32(24).int64(m.displayFrameToken);
                    if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                        w.uint32(32).int32(m.pid);
                    if (m.layerName != null && Object.hasOwnProperty.call(m, "layerName"))
                        w.uint32(42).string(m.layerName);
                    return w;
                };

                /**
                 * Encodes the specified ExpectedSurfaceFrameStart message, length delimited. Does not implicitly {@link perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart
                 * @static
                 * @param {perfetto.protos.FrameTimelineEvent.IExpectedSurfaceFrameStart} message ExpectedSurfaceFrameStart message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ExpectedSurfaceFrameStart.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an ExpectedSurfaceFrameStart message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart} ExpectedSurfaceFrameStart
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ExpectedSurfaceFrameStart.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.cookie = r.int64();
                            break;
                        case 2:
                            m.token = r.int64();
                            break;
                        case 3:
                            m.displayFrameToken = r.int64();
                            break;
                        case 4:
                            m.pid = r.int32();
                            break;
                        case 5:
                            m.layerName = r.string();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an ExpectedSurfaceFrameStart message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart} ExpectedSurfaceFrameStart
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ExpectedSurfaceFrameStart.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an ExpectedSurfaceFrameStart message.
                 * @function verify
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ExpectedSurfaceFrameStart.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.cookie != null && m.hasOwnProperty("cookie")) {
                        if (!$util.isInteger(m.cookie) && !(m.cookie && $util.isInteger(m.cookie.low) && $util.isInteger(m.cookie.high)))
                            return "cookie: integer|Long expected";
                    }
                    if (m.token != null && m.hasOwnProperty("token")) {
                        if (!$util.isInteger(m.token) && !(m.token && $util.isInteger(m.token.low) && $util.isInteger(m.token.high)))
                            return "token: integer|Long expected";
                    }
                    if (m.displayFrameToken != null && m.hasOwnProperty("displayFrameToken")) {
                        if (!$util.isInteger(m.displayFrameToken) && !(m.displayFrameToken && $util.isInteger(m.displayFrameToken.low) && $util.isInteger(m.displayFrameToken.high)))
                            return "displayFrameToken: integer|Long expected";
                    }
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        if (!$util.isInteger(m.pid))
                            return "pid: integer expected";
                    }
                    if (m.layerName != null && m.hasOwnProperty("layerName")) {
                        if (!$util.isString(m.layerName))
                            return "layerName: string expected";
                    }
                    return null;
                };

                /**
                 * Creates an ExpectedSurfaceFrameStart message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart} ExpectedSurfaceFrameStart
                 */
                ExpectedSurfaceFrameStart.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart)
                        return d;
                    var m = new $root.perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart();
                    if (d.cookie != null) {
                        if ($util.Long)
                            (m.cookie = $util.Long.fromValue(d.cookie)).unsigned = false;
                        else if (typeof d.cookie === "string")
                            m.cookie = parseInt(d.cookie, 10);
                        else if (typeof d.cookie === "number")
                            m.cookie = d.cookie;
                        else if (typeof d.cookie === "object")
                            m.cookie = new $util.LongBits(d.cookie.low >>> 0, d.cookie.high >>> 0).toNumber();
                    }
                    if (d.token != null) {
                        if ($util.Long)
                            (m.token = $util.Long.fromValue(d.token)).unsigned = false;
                        else if (typeof d.token === "string")
                            m.token = parseInt(d.token, 10);
                        else if (typeof d.token === "number")
                            m.token = d.token;
                        else if (typeof d.token === "object")
                            m.token = new $util.LongBits(d.token.low >>> 0, d.token.high >>> 0).toNumber();
                    }
                    if (d.displayFrameToken != null) {
                        if ($util.Long)
                            (m.displayFrameToken = $util.Long.fromValue(d.displayFrameToken)).unsigned = false;
                        else if (typeof d.displayFrameToken === "string")
                            m.displayFrameToken = parseInt(d.displayFrameToken, 10);
                        else if (typeof d.displayFrameToken === "number")
                            m.displayFrameToken = d.displayFrameToken;
                        else if (typeof d.displayFrameToken === "object")
                            m.displayFrameToken = new $util.LongBits(d.displayFrameToken.low >>> 0, d.displayFrameToken.high >>> 0).toNumber();
                    }
                    if (d.pid != null) {
                        m.pid = d.pid | 0;
                    }
                    if (d.layerName != null) {
                        m.layerName = String(d.layerName);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an ExpectedSurfaceFrameStart message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart
                 * @static
                 * @param {perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart} m ExpectedSurfaceFrameStart
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ExpectedSurfaceFrameStart.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.cookie = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.cookie = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.token = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.token = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.displayFrameToken = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.displayFrameToken = o.longs === String ? "0" : 0;
                        d.pid = 0;
                        d.layerName = "";
                    }
                    if (m.cookie != null && m.hasOwnProperty("cookie")) {
                        if (typeof m.cookie === "number")
                            d.cookie = o.longs === String ? String(m.cookie) : m.cookie;
                        else
                            d.cookie = o.longs === String ? $util.Long.prototype.toString.call(m.cookie) : o.longs === Number ? new $util.LongBits(m.cookie.low >>> 0, m.cookie.high >>> 0).toNumber() : m.cookie;
                    }
                    if (m.token != null && m.hasOwnProperty("token")) {
                        if (typeof m.token === "number")
                            d.token = o.longs === String ? String(m.token) : m.token;
                        else
                            d.token = o.longs === String ? $util.Long.prototype.toString.call(m.token) : o.longs === Number ? new $util.LongBits(m.token.low >>> 0, m.token.high >>> 0).toNumber() : m.token;
                    }
                    if (m.displayFrameToken != null && m.hasOwnProperty("displayFrameToken")) {
                        if (typeof m.displayFrameToken === "number")
                            d.displayFrameToken = o.longs === String ? String(m.displayFrameToken) : m.displayFrameToken;
                        else
                            d.displayFrameToken = o.longs === String ? $util.Long.prototype.toString.call(m.displayFrameToken) : o.longs === Number ? new $util.LongBits(m.displayFrameToken.low >>> 0, m.displayFrameToken.high >>> 0).toNumber() : m.displayFrameToken;
                    }
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        d.pid = m.pid;
                    }
                    if (m.layerName != null && m.hasOwnProperty("layerName")) {
                        d.layerName = m.layerName;
                    }
                    return d;
                };

                /**
                 * Converts this ExpectedSurfaceFrameStart to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedSurfaceFrameStart
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ExpectedSurfaceFrameStart.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return ExpectedSurfaceFrameStart;
            })();

            FrameTimelineEvent.ActualSurfaceFrameStart = (function() {

                /**
                 * Properties of an ActualSurfaceFrameStart.
                 * @memberof perfetto.protos.FrameTimelineEvent
                 * @interface IActualSurfaceFrameStart
                 * @property {number|null} [cookie] ActualSurfaceFrameStart cookie
                 * @property {number|null} [token] ActualSurfaceFrameStart token
                 * @property {number|null} [displayFrameToken] ActualSurfaceFrameStart displayFrameToken
                 * @property {number|null} [pid] ActualSurfaceFrameStart pid
                 * @property {string|null} [layerName] ActualSurfaceFrameStart layerName
                 * @property {perfetto.protos.FrameTimelineEvent.PresentType|null} [presentType] ActualSurfaceFrameStart presentType
                 * @property {boolean|null} [onTimeFinish] ActualSurfaceFrameStart onTimeFinish
                 * @property {boolean|null} [gpuComposition] ActualSurfaceFrameStart gpuComposition
                 * @property {number|null} [jankType] ActualSurfaceFrameStart jankType
                 * @property {perfetto.protos.FrameTimelineEvent.PredictionType|null} [predictionType] ActualSurfaceFrameStart predictionType
                 * @property {boolean|null} [isBuffer] ActualSurfaceFrameStart isBuffer
                 */

                /**
                 * Constructs a new ActualSurfaceFrameStart.
                 * @memberof perfetto.protos.FrameTimelineEvent
                 * @classdesc Represents an ActualSurfaceFrameStart.
                 * @implements IActualSurfaceFrameStart
                 * @constructor
                 * @param {perfetto.protos.FrameTimelineEvent.IActualSurfaceFrameStart=} [p] Properties to set
                 */
                function ActualSurfaceFrameStart(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * ActualSurfaceFrameStart cookie.
                 * @member {number} cookie
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart
                 * @instance
                 */
                ActualSurfaceFrameStart.prototype.cookie = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * ActualSurfaceFrameStart token.
                 * @member {number} token
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart
                 * @instance
                 */
                ActualSurfaceFrameStart.prototype.token = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * ActualSurfaceFrameStart displayFrameToken.
                 * @member {number} displayFrameToken
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart
                 * @instance
                 */
                ActualSurfaceFrameStart.prototype.displayFrameToken = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * ActualSurfaceFrameStart pid.
                 * @member {number} pid
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart
                 * @instance
                 */
                ActualSurfaceFrameStart.prototype.pid = 0;

                /**
                 * ActualSurfaceFrameStart layerName.
                 * @member {string} layerName
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart
                 * @instance
                 */
                ActualSurfaceFrameStart.prototype.layerName = "";

                /**
                 * ActualSurfaceFrameStart presentType.
                 * @member {perfetto.protos.FrameTimelineEvent.PresentType} presentType
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart
                 * @instance
                 */
                ActualSurfaceFrameStart.prototype.presentType = 0;

                /**
                 * ActualSurfaceFrameStart onTimeFinish.
                 * @member {boolean} onTimeFinish
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart
                 * @instance
                 */
                ActualSurfaceFrameStart.prototype.onTimeFinish = false;

                /**
                 * ActualSurfaceFrameStart gpuComposition.
                 * @member {boolean} gpuComposition
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart
                 * @instance
                 */
                ActualSurfaceFrameStart.prototype.gpuComposition = false;

                /**
                 * ActualSurfaceFrameStart jankType.
                 * @member {number} jankType
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart
                 * @instance
                 */
                ActualSurfaceFrameStart.prototype.jankType = 0;

                /**
                 * ActualSurfaceFrameStart predictionType.
                 * @member {perfetto.protos.FrameTimelineEvent.PredictionType} predictionType
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart
                 * @instance
                 */
                ActualSurfaceFrameStart.prototype.predictionType = 0;

                /**
                 * ActualSurfaceFrameStart isBuffer.
                 * @member {boolean} isBuffer
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart
                 * @instance
                 */
                ActualSurfaceFrameStart.prototype.isBuffer = false;

                /**
                 * Creates a new ActualSurfaceFrameStart instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart
                 * @static
                 * @param {perfetto.protos.FrameTimelineEvent.IActualSurfaceFrameStart=} [properties] Properties to set
                 * @returns {perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart} ActualSurfaceFrameStart instance
                 */
                ActualSurfaceFrameStart.create = function create(properties) {
                    return new ActualSurfaceFrameStart(properties);
                };

                /**
                 * Encodes the specified ActualSurfaceFrameStart message. Does not implicitly {@link perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart
                 * @static
                 * @param {perfetto.protos.FrameTimelineEvent.IActualSurfaceFrameStart} m ActualSurfaceFrameStart message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ActualSurfaceFrameStart.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.cookie != null && Object.hasOwnProperty.call(m, "cookie"))
                        w.uint32(8).int64(m.cookie);
                    if (m.token != null && Object.hasOwnProperty.call(m, "token"))
                        w.uint32(16).int64(m.token);
                    if (m.displayFrameToken != null && Object.hasOwnProperty.call(m, "displayFrameToken"))
                        w.uint32(24).int64(m.displayFrameToken);
                    if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                        w.uint32(32).int32(m.pid);
                    if (m.layerName != null && Object.hasOwnProperty.call(m, "layerName"))
                        w.uint32(42).string(m.layerName);
                    if (m.presentType != null && Object.hasOwnProperty.call(m, "presentType"))
                        w.uint32(48).int32(m.presentType);
                    if (m.onTimeFinish != null && Object.hasOwnProperty.call(m, "onTimeFinish"))
                        w.uint32(56).bool(m.onTimeFinish);
                    if (m.gpuComposition != null && Object.hasOwnProperty.call(m, "gpuComposition"))
                        w.uint32(64).bool(m.gpuComposition);
                    if (m.jankType != null && Object.hasOwnProperty.call(m, "jankType"))
                        w.uint32(72).int32(m.jankType);
                    if (m.predictionType != null && Object.hasOwnProperty.call(m, "predictionType"))
                        w.uint32(80).int32(m.predictionType);
                    if (m.isBuffer != null && Object.hasOwnProperty.call(m, "isBuffer"))
                        w.uint32(88).bool(m.isBuffer);
                    return w;
                };

                /**
                 * Encodes the specified ActualSurfaceFrameStart message, length delimited. Does not implicitly {@link perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart
                 * @static
                 * @param {perfetto.protos.FrameTimelineEvent.IActualSurfaceFrameStart} message ActualSurfaceFrameStart message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ActualSurfaceFrameStart.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an ActualSurfaceFrameStart message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart} ActualSurfaceFrameStart
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ActualSurfaceFrameStart.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.cookie = r.int64();
                            break;
                        case 2:
                            m.token = r.int64();
                            break;
                        case 3:
                            m.displayFrameToken = r.int64();
                            break;
                        case 4:
                            m.pid = r.int32();
                            break;
                        case 5:
                            m.layerName = r.string();
                            break;
                        case 6:
                            m.presentType = r.int32();
                            break;
                        case 7:
                            m.onTimeFinish = r.bool();
                            break;
                        case 8:
                            m.gpuComposition = r.bool();
                            break;
                        case 9:
                            m.jankType = r.int32();
                            break;
                        case 10:
                            m.predictionType = r.int32();
                            break;
                        case 11:
                            m.isBuffer = r.bool();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an ActualSurfaceFrameStart message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart} ActualSurfaceFrameStart
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ActualSurfaceFrameStart.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an ActualSurfaceFrameStart message.
                 * @function verify
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ActualSurfaceFrameStart.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.cookie != null && m.hasOwnProperty("cookie")) {
                        if (!$util.isInteger(m.cookie) && !(m.cookie && $util.isInteger(m.cookie.low) && $util.isInteger(m.cookie.high)))
                            return "cookie: integer|Long expected";
                    }
                    if (m.token != null && m.hasOwnProperty("token")) {
                        if (!$util.isInteger(m.token) && !(m.token && $util.isInteger(m.token.low) && $util.isInteger(m.token.high)))
                            return "token: integer|Long expected";
                    }
                    if (m.displayFrameToken != null && m.hasOwnProperty("displayFrameToken")) {
                        if (!$util.isInteger(m.displayFrameToken) && !(m.displayFrameToken && $util.isInteger(m.displayFrameToken.low) && $util.isInteger(m.displayFrameToken.high)))
                            return "displayFrameToken: integer|Long expected";
                    }
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        if (!$util.isInteger(m.pid))
                            return "pid: integer expected";
                    }
                    if (m.layerName != null && m.hasOwnProperty("layerName")) {
                        if (!$util.isString(m.layerName))
                            return "layerName: string expected";
                    }
                    if (m.presentType != null && m.hasOwnProperty("presentType")) {
                        switch (m.presentType) {
                        default:
                            return "presentType: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                            break;
                        }
                    }
                    if (m.onTimeFinish != null && m.hasOwnProperty("onTimeFinish")) {
                        if (typeof m.onTimeFinish !== "boolean")
                            return "onTimeFinish: boolean expected";
                    }
                    if (m.gpuComposition != null && m.hasOwnProperty("gpuComposition")) {
                        if (typeof m.gpuComposition !== "boolean")
                            return "gpuComposition: boolean expected";
                    }
                    if (m.jankType != null && m.hasOwnProperty("jankType")) {
                        if (!$util.isInteger(m.jankType))
                            return "jankType: integer expected";
                    }
                    if (m.predictionType != null && m.hasOwnProperty("predictionType")) {
                        switch (m.predictionType) {
                        default:
                            return "predictionType: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                            break;
                        }
                    }
                    if (m.isBuffer != null && m.hasOwnProperty("isBuffer")) {
                        if (typeof m.isBuffer !== "boolean")
                            return "isBuffer: boolean expected";
                    }
                    return null;
                };

                /**
                 * Creates an ActualSurfaceFrameStart message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart} ActualSurfaceFrameStart
                 */
                ActualSurfaceFrameStart.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart)
                        return d;
                    var m = new $root.perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart();
                    if (d.cookie != null) {
                        if ($util.Long)
                            (m.cookie = $util.Long.fromValue(d.cookie)).unsigned = false;
                        else if (typeof d.cookie === "string")
                            m.cookie = parseInt(d.cookie, 10);
                        else if (typeof d.cookie === "number")
                            m.cookie = d.cookie;
                        else if (typeof d.cookie === "object")
                            m.cookie = new $util.LongBits(d.cookie.low >>> 0, d.cookie.high >>> 0).toNumber();
                    }
                    if (d.token != null) {
                        if ($util.Long)
                            (m.token = $util.Long.fromValue(d.token)).unsigned = false;
                        else if (typeof d.token === "string")
                            m.token = parseInt(d.token, 10);
                        else if (typeof d.token === "number")
                            m.token = d.token;
                        else if (typeof d.token === "object")
                            m.token = new $util.LongBits(d.token.low >>> 0, d.token.high >>> 0).toNumber();
                    }
                    if (d.displayFrameToken != null) {
                        if ($util.Long)
                            (m.displayFrameToken = $util.Long.fromValue(d.displayFrameToken)).unsigned = false;
                        else if (typeof d.displayFrameToken === "string")
                            m.displayFrameToken = parseInt(d.displayFrameToken, 10);
                        else if (typeof d.displayFrameToken === "number")
                            m.displayFrameToken = d.displayFrameToken;
                        else if (typeof d.displayFrameToken === "object")
                            m.displayFrameToken = new $util.LongBits(d.displayFrameToken.low >>> 0, d.displayFrameToken.high >>> 0).toNumber();
                    }
                    if (d.pid != null) {
                        m.pid = d.pid | 0;
                    }
                    if (d.layerName != null) {
                        m.layerName = String(d.layerName);
                    }
                    switch (d.presentType) {
                    case "PRESENT_UNSPECIFIED":
                    case 0:
                        m.presentType = 0;
                        break;
                    case "PRESENT_ON_TIME":
                    case 1:
                        m.presentType = 1;
                        break;
                    case "PRESENT_LATE":
                    case 2:
                        m.presentType = 2;
                        break;
                    case "PRESENT_EARLY":
                    case 3:
                        m.presentType = 3;
                        break;
                    case "PRESENT_DROPPED":
                    case 4:
                        m.presentType = 4;
                        break;
                    case "PRESENT_UNKNOWN":
                    case 5:
                        m.presentType = 5;
                        break;
                    }
                    if (d.onTimeFinish != null) {
                        m.onTimeFinish = Boolean(d.onTimeFinish);
                    }
                    if (d.gpuComposition != null) {
                        m.gpuComposition = Boolean(d.gpuComposition);
                    }
                    if (d.jankType != null) {
                        m.jankType = d.jankType | 0;
                    }
                    switch (d.predictionType) {
                    case "PREDICTION_UNSPECIFIED":
                    case 0:
                        m.predictionType = 0;
                        break;
                    case "PREDICTION_VALID":
                    case 1:
                        m.predictionType = 1;
                        break;
                    case "PREDICTION_EXPIRED":
                    case 2:
                        m.predictionType = 2;
                        break;
                    case "PREDICTION_UNKNOWN":
                    case 3:
                        m.predictionType = 3;
                        break;
                    }
                    if (d.isBuffer != null) {
                        m.isBuffer = Boolean(d.isBuffer);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an ActualSurfaceFrameStart message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart
                 * @static
                 * @param {perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart} m ActualSurfaceFrameStart
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ActualSurfaceFrameStart.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.cookie = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.cookie = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.token = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.token = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.displayFrameToken = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.displayFrameToken = o.longs === String ? "0" : 0;
                        d.pid = 0;
                        d.layerName = "";
                        d.presentType = o.enums === String ? "PRESENT_UNSPECIFIED" : 0;
                        d.onTimeFinish = false;
                        d.gpuComposition = false;
                        d.jankType = 0;
                        d.predictionType = o.enums === String ? "PREDICTION_UNSPECIFIED" : 0;
                        d.isBuffer = false;
                    }
                    if (m.cookie != null && m.hasOwnProperty("cookie")) {
                        if (typeof m.cookie === "number")
                            d.cookie = o.longs === String ? String(m.cookie) : m.cookie;
                        else
                            d.cookie = o.longs === String ? $util.Long.prototype.toString.call(m.cookie) : o.longs === Number ? new $util.LongBits(m.cookie.low >>> 0, m.cookie.high >>> 0).toNumber() : m.cookie;
                    }
                    if (m.token != null && m.hasOwnProperty("token")) {
                        if (typeof m.token === "number")
                            d.token = o.longs === String ? String(m.token) : m.token;
                        else
                            d.token = o.longs === String ? $util.Long.prototype.toString.call(m.token) : o.longs === Number ? new $util.LongBits(m.token.low >>> 0, m.token.high >>> 0).toNumber() : m.token;
                    }
                    if (m.displayFrameToken != null && m.hasOwnProperty("displayFrameToken")) {
                        if (typeof m.displayFrameToken === "number")
                            d.displayFrameToken = o.longs === String ? String(m.displayFrameToken) : m.displayFrameToken;
                        else
                            d.displayFrameToken = o.longs === String ? $util.Long.prototype.toString.call(m.displayFrameToken) : o.longs === Number ? new $util.LongBits(m.displayFrameToken.low >>> 0, m.displayFrameToken.high >>> 0).toNumber() : m.displayFrameToken;
                    }
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        d.pid = m.pid;
                    }
                    if (m.layerName != null && m.hasOwnProperty("layerName")) {
                        d.layerName = m.layerName;
                    }
                    if (m.presentType != null && m.hasOwnProperty("presentType")) {
                        d.presentType = o.enums === String ? $root.perfetto.protos.FrameTimelineEvent.PresentType[m.presentType] : m.presentType;
                    }
                    if (m.onTimeFinish != null && m.hasOwnProperty("onTimeFinish")) {
                        d.onTimeFinish = m.onTimeFinish;
                    }
                    if (m.gpuComposition != null && m.hasOwnProperty("gpuComposition")) {
                        d.gpuComposition = m.gpuComposition;
                    }
                    if (m.jankType != null && m.hasOwnProperty("jankType")) {
                        d.jankType = m.jankType;
                    }
                    if (m.predictionType != null && m.hasOwnProperty("predictionType")) {
                        d.predictionType = o.enums === String ? $root.perfetto.protos.FrameTimelineEvent.PredictionType[m.predictionType] : m.predictionType;
                    }
                    if (m.isBuffer != null && m.hasOwnProperty("isBuffer")) {
                        d.isBuffer = m.isBuffer;
                    }
                    return d;
                };

                /**
                 * Converts this ActualSurfaceFrameStart to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualSurfaceFrameStart
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ActualSurfaceFrameStart.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return ActualSurfaceFrameStart;
            })();

            FrameTimelineEvent.ExpectedDisplayFrameStart = (function() {

                /**
                 * Properties of an ExpectedDisplayFrameStart.
                 * @memberof perfetto.protos.FrameTimelineEvent
                 * @interface IExpectedDisplayFrameStart
                 * @property {number|null} [cookie] ExpectedDisplayFrameStart cookie
                 * @property {number|null} [token] ExpectedDisplayFrameStart token
                 * @property {number|null} [pid] ExpectedDisplayFrameStart pid
                 */

                /**
                 * Constructs a new ExpectedDisplayFrameStart.
                 * @memberof perfetto.protos.FrameTimelineEvent
                 * @classdesc Represents an ExpectedDisplayFrameStart.
                 * @implements IExpectedDisplayFrameStart
                 * @constructor
                 * @param {perfetto.protos.FrameTimelineEvent.IExpectedDisplayFrameStart=} [p] Properties to set
                 */
                function ExpectedDisplayFrameStart(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * ExpectedDisplayFrameStart cookie.
                 * @member {number} cookie
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart
                 * @instance
                 */
                ExpectedDisplayFrameStart.prototype.cookie = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * ExpectedDisplayFrameStart token.
                 * @member {number} token
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart
                 * @instance
                 */
                ExpectedDisplayFrameStart.prototype.token = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * ExpectedDisplayFrameStart pid.
                 * @member {number} pid
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart
                 * @instance
                 */
                ExpectedDisplayFrameStart.prototype.pid = 0;

                /**
                 * Creates a new ExpectedDisplayFrameStart instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart
                 * @static
                 * @param {perfetto.protos.FrameTimelineEvent.IExpectedDisplayFrameStart=} [properties] Properties to set
                 * @returns {perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart} ExpectedDisplayFrameStart instance
                 */
                ExpectedDisplayFrameStart.create = function create(properties) {
                    return new ExpectedDisplayFrameStart(properties);
                };

                /**
                 * Encodes the specified ExpectedDisplayFrameStart message. Does not implicitly {@link perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart
                 * @static
                 * @param {perfetto.protos.FrameTimelineEvent.IExpectedDisplayFrameStart} m ExpectedDisplayFrameStart message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ExpectedDisplayFrameStart.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.cookie != null && Object.hasOwnProperty.call(m, "cookie"))
                        w.uint32(8).int64(m.cookie);
                    if (m.token != null && Object.hasOwnProperty.call(m, "token"))
                        w.uint32(16).int64(m.token);
                    if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                        w.uint32(24).int32(m.pid);
                    return w;
                };

                /**
                 * Encodes the specified ExpectedDisplayFrameStart message, length delimited. Does not implicitly {@link perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart
                 * @static
                 * @param {perfetto.protos.FrameTimelineEvent.IExpectedDisplayFrameStart} message ExpectedDisplayFrameStart message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ExpectedDisplayFrameStart.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an ExpectedDisplayFrameStart message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart} ExpectedDisplayFrameStart
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ExpectedDisplayFrameStart.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.cookie = r.int64();
                            break;
                        case 2:
                            m.token = r.int64();
                            break;
                        case 3:
                            m.pid = r.int32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an ExpectedDisplayFrameStart message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart} ExpectedDisplayFrameStart
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ExpectedDisplayFrameStart.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an ExpectedDisplayFrameStart message.
                 * @function verify
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ExpectedDisplayFrameStart.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.cookie != null && m.hasOwnProperty("cookie")) {
                        if (!$util.isInteger(m.cookie) && !(m.cookie && $util.isInteger(m.cookie.low) && $util.isInteger(m.cookie.high)))
                            return "cookie: integer|Long expected";
                    }
                    if (m.token != null && m.hasOwnProperty("token")) {
                        if (!$util.isInteger(m.token) && !(m.token && $util.isInteger(m.token.low) && $util.isInteger(m.token.high)))
                            return "token: integer|Long expected";
                    }
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        if (!$util.isInteger(m.pid))
                            return "pid: integer expected";
                    }
                    return null;
                };

                /**
                 * Creates an ExpectedDisplayFrameStart message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart} ExpectedDisplayFrameStart
                 */
                ExpectedDisplayFrameStart.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart)
                        return d;
                    var m = new $root.perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart();
                    if (d.cookie != null) {
                        if ($util.Long)
                            (m.cookie = $util.Long.fromValue(d.cookie)).unsigned = false;
                        else if (typeof d.cookie === "string")
                            m.cookie = parseInt(d.cookie, 10);
                        else if (typeof d.cookie === "number")
                            m.cookie = d.cookie;
                        else if (typeof d.cookie === "object")
                            m.cookie = new $util.LongBits(d.cookie.low >>> 0, d.cookie.high >>> 0).toNumber();
                    }
                    if (d.token != null) {
                        if ($util.Long)
                            (m.token = $util.Long.fromValue(d.token)).unsigned = false;
                        else if (typeof d.token === "string")
                            m.token = parseInt(d.token, 10);
                        else if (typeof d.token === "number")
                            m.token = d.token;
                        else if (typeof d.token === "object")
                            m.token = new $util.LongBits(d.token.low >>> 0, d.token.high >>> 0).toNumber();
                    }
                    if (d.pid != null) {
                        m.pid = d.pid | 0;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an ExpectedDisplayFrameStart message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart
                 * @static
                 * @param {perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart} m ExpectedDisplayFrameStart
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ExpectedDisplayFrameStart.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.cookie = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.cookie = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.token = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.token = o.longs === String ? "0" : 0;
                        d.pid = 0;
                    }
                    if (m.cookie != null && m.hasOwnProperty("cookie")) {
                        if (typeof m.cookie === "number")
                            d.cookie = o.longs === String ? String(m.cookie) : m.cookie;
                        else
                            d.cookie = o.longs === String ? $util.Long.prototype.toString.call(m.cookie) : o.longs === Number ? new $util.LongBits(m.cookie.low >>> 0, m.cookie.high >>> 0).toNumber() : m.cookie;
                    }
                    if (m.token != null && m.hasOwnProperty("token")) {
                        if (typeof m.token === "number")
                            d.token = o.longs === String ? String(m.token) : m.token;
                        else
                            d.token = o.longs === String ? $util.Long.prototype.toString.call(m.token) : o.longs === Number ? new $util.LongBits(m.token.low >>> 0, m.token.high >>> 0).toNumber() : m.token;
                    }
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        d.pid = m.pid;
                    }
                    return d;
                };

                /**
                 * Converts this ExpectedDisplayFrameStart to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.FrameTimelineEvent.ExpectedDisplayFrameStart
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ExpectedDisplayFrameStart.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return ExpectedDisplayFrameStart;
            })();

            FrameTimelineEvent.ActualDisplayFrameStart = (function() {

                /**
                 * Properties of an ActualDisplayFrameStart.
                 * @memberof perfetto.protos.FrameTimelineEvent
                 * @interface IActualDisplayFrameStart
                 * @property {number|null} [cookie] ActualDisplayFrameStart cookie
                 * @property {number|null} [token] ActualDisplayFrameStart token
                 * @property {number|null} [pid] ActualDisplayFrameStart pid
                 * @property {perfetto.protos.FrameTimelineEvent.PresentType|null} [presentType] ActualDisplayFrameStart presentType
                 * @property {boolean|null} [onTimeFinish] ActualDisplayFrameStart onTimeFinish
                 * @property {boolean|null} [gpuComposition] ActualDisplayFrameStart gpuComposition
                 * @property {number|null} [jankType] ActualDisplayFrameStart jankType
                 * @property {perfetto.protos.FrameTimelineEvent.PredictionType|null} [predictionType] ActualDisplayFrameStart predictionType
                 */

                /**
                 * Constructs a new ActualDisplayFrameStart.
                 * @memberof perfetto.protos.FrameTimelineEvent
                 * @classdesc Represents an ActualDisplayFrameStart.
                 * @implements IActualDisplayFrameStart
                 * @constructor
                 * @param {perfetto.protos.FrameTimelineEvent.IActualDisplayFrameStart=} [p] Properties to set
                 */
                function ActualDisplayFrameStart(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * ActualDisplayFrameStart cookie.
                 * @member {number} cookie
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart
                 * @instance
                 */
                ActualDisplayFrameStart.prototype.cookie = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * ActualDisplayFrameStart token.
                 * @member {number} token
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart
                 * @instance
                 */
                ActualDisplayFrameStart.prototype.token = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * ActualDisplayFrameStart pid.
                 * @member {number} pid
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart
                 * @instance
                 */
                ActualDisplayFrameStart.prototype.pid = 0;

                /**
                 * ActualDisplayFrameStart presentType.
                 * @member {perfetto.protos.FrameTimelineEvent.PresentType} presentType
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart
                 * @instance
                 */
                ActualDisplayFrameStart.prototype.presentType = 0;

                /**
                 * ActualDisplayFrameStart onTimeFinish.
                 * @member {boolean} onTimeFinish
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart
                 * @instance
                 */
                ActualDisplayFrameStart.prototype.onTimeFinish = false;

                /**
                 * ActualDisplayFrameStart gpuComposition.
                 * @member {boolean} gpuComposition
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart
                 * @instance
                 */
                ActualDisplayFrameStart.prototype.gpuComposition = false;

                /**
                 * ActualDisplayFrameStart jankType.
                 * @member {number} jankType
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart
                 * @instance
                 */
                ActualDisplayFrameStart.prototype.jankType = 0;

                /**
                 * ActualDisplayFrameStart predictionType.
                 * @member {perfetto.protos.FrameTimelineEvent.PredictionType} predictionType
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart
                 * @instance
                 */
                ActualDisplayFrameStart.prototype.predictionType = 0;

                /**
                 * Creates a new ActualDisplayFrameStart instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart
                 * @static
                 * @param {perfetto.protos.FrameTimelineEvent.IActualDisplayFrameStart=} [properties] Properties to set
                 * @returns {perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart} ActualDisplayFrameStart instance
                 */
                ActualDisplayFrameStart.create = function create(properties) {
                    return new ActualDisplayFrameStart(properties);
                };

                /**
                 * Encodes the specified ActualDisplayFrameStart message. Does not implicitly {@link perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart
                 * @static
                 * @param {perfetto.protos.FrameTimelineEvent.IActualDisplayFrameStart} m ActualDisplayFrameStart message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ActualDisplayFrameStart.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.cookie != null && Object.hasOwnProperty.call(m, "cookie"))
                        w.uint32(8).int64(m.cookie);
                    if (m.token != null && Object.hasOwnProperty.call(m, "token"))
                        w.uint32(16).int64(m.token);
                    if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                        w.uint32(24).int32(m.pid);
                    if (m.presentType != null && Object.hasOwnProperty.call(m, "presentType"))
                        w.uint32(32).int32(m.presentType);
                    if (m.onTimeFinish != null && Object.hasOwnProperty.call(m, "onTimeFinish"))
                        w.uint32(40).bool(m.onTimeFinish);
                    if (m.gpuComposition != null && Object.hasOwnProperty.call(m, "gpuComposition"))
                        w.uint32(48).bool(m.gpuComposition);
                    if (m.jankType != null && Object.hasOwnProperty.call(m, "jankType"))
                        w.uint32(56).int32(m.jankType);
                    if (m.predictionType != null && Object.hasOwnProperty.call(m, "predictionType"))
                        w.uint32(64).int32(m.predictionType);
                    return w;
                };

                /**
                 * Encodes the specified ActualDisplayFrameStart message, length delimited. Does not implicitly {@link perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart
                 * @static
                 * @param {perfetto.protos.FrameTimelineEvent.IActualDisplayFrameStart} message ActualDisplayFrameStart message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ActualDisplayFrameStart.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an ActualDisplayFrameStart message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart} ActualDisplayFrameStart
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ActualDisplayFrameStart.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.cookie = r.int64();
                            break;
                        case 2:
                            m.token = r.int64();
                            break;
                        case 3:
                            m.pid = r.int32();
                            break;
                        case 4:
                            m.presentType = r.int32();
                            break;
                        case 5:
                            m.onTimeFinish = r.bool();
                            break;
                        case 6:
                            m.gpuComposition = r.bool();
                            break;
                        case 7:
                            m.jankType = r.int32();
                            break;
                        case 8:
                            m.predictionType = r.int32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an ActualDisplayFrameStart message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart} ActualDisplayFrameStart
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ActualDisplayFrameStart.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an ActualDisplayFrameStart message.
                 * @function verify
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ActualDisplayFrameStart.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.cookie != null && m.hasOwnProperty("cookie")) {
                        if (!$util.isInteger(m.cookie) && !(m.cookie && $util.isInteger(m.cookie.low) && $util.isInteger(m.cookie.high)))
                            return "cookie: integer|Long expected";
                    }
                    if (m.token != null && m.hasOwnProperty("token")) {
                        if (!$util.isInteger(m.token) && !(m.token && $util.isInteger(m.token.low) && $util.isInteger(m.token.high)))
                            return "token: integer|Long expected";
                    }
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        if (!$util.isInteger(m.pid))
                            return "pid: integer expected";
                    }
                    if (m.presentType != null && m.hasOwnProperty("presentType")) {
                        switch (m.presentType) {
                        default:
                            return "presentType: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                            break;
                        }
                    }
                    if (m.onTimeFinish != null && m.hasOwnProperty("onTimeFinish")) {
                        if (typeof m.onTimeFinish !== "boolean")
                            return "onTimeFinish: boolean expected";
                    }
                    if (m.gpuComposition != null && m.hasOwnProperty("gpuComposition")) {
                        if (typeof m.gpuComposition !== "boolean")
                            return "gpuComposition: boolean expected";
                    }
                    if (m.jankType != null && m.hasOwnProperty("jankType")) {
                        if (!$util.isInteger(m.jankType))
                            return "jankType: integer expected";
                    }
                    if (m.predictionType != null && m.hasOwnProperty("predictionType")) {
                        switch (m.predictionType) {
                        default:
                            return "predictionType: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                            break;
                        }
                    }
                    return null;
                };

                /**
                 * Creates an ActualDisplayFrameStart message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart} ActualDisplayFrameStart
                 */
                ActualDisplayFrameStart.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart)
                        return d;
                    var m = new $root.perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart();
                    if (d.cookie != null) {
                        if ($util.Long)
                            (m.cookie = $util.Long.fromValue(d.cookie)).unsigned = false;
                        else if (typeof d.cookie === "string")
                            m.cookie = parseInt(d.cookie, 10);
                        else if (typeof d.cookie === "number")
                            m.cookie = d.cookie;
                        else if (typeof d.cookie === "object")
                            m.cookie = new $util.LongBits(d.cookie.low >>> 0, d.cookie.high >>> 0).toNumber();
                    }
                    if (d.token != null) {
                        if ($util.Long)
                            (m.token = $util.Long.fromValue(d.token)).unsigned = false;
                        else if (typeof d.token === "string")
                            m.token = parseInt(d.token, 10);
                        else if (typeof d.token === "number")
                            m.token = d.token;
                        else if (typeof d.token === "object")
                            m.token = new $util.LongBits(d.token.low >>> 0, d.token.high >>> 0).toNumber();
                    }
                    if (d.pid != null) {
                        m.pid = d.pid | 0;
                    }
                    switch (d.presentType) {
                    case "PRESENT_UNSPECIFIED":
                    case 0:
                        m.presentType = 0;
                        break;
                    case "PRESENT_ON_TIME":
                    case 1:
                        m.presentType = 1;
                        break;
                    case "PRESENT_LATE":
                    case 2:
                        m.presentType = 2;
                        break;
                    case "PRESENT_EARLY":
                    case 3:
                        m.presentType = 3;
                        break;
                    case "PRESENT_DROPPED":
                    case 4:
                        m.presentType = 4;
                        break;
                    case "PRESENT_UNKNOWN":
                    case 5:
                        m.presentType = 5;
                        break;
                    }
                    if (d.onTimeFinish != null) {
                        m.onTimeFinish = Boolean(d.onTimeFinish);
                    }
                    if (d.gpuComposition != null) {
                        m.gpuComposition = Boolean(d.gpuComposition);
                    }
                    if (d.jankType != null) {
                        m.jankType = d.jankType | 0;
                    }
                    switch (d.predictionType) {
                    case "PREDICTION_UNSPECIFIED":
                    case 0:
                        m.predictionType = 0;
                        break;
                    case "PREDICTION_VALID":
                    case 1:
                        m.predictionType = 1;
                        break;
                    case "PREDICTION_EXPIRED":
                    case 2:
                        m.predictionType = 2;
                        break;
                    case "PREDICTION_UNKNOWN":
                    case 3:
                        m.predictionType = 3;
                        break;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an ActualDisplayFrameStart message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart
                 * @static
                 * @param {perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart} m ActualDisplayFrameStart
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ActualDisplayFrameStart.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.cookie = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.cookie = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.token = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.token = o.longs === String ? "0" : 0;
                        d.pid = 0;
                        d.presentType = o.enums === String ? "PRESENT_UNSPECIFIED" : 0;
                        d.onTimeFinish = false;
                        d.gpuComposition = false;
                        d.jankType = 0;
                        d.predictionType = o.enums === String ? "PREDICTION_UNSPECIFIED" : 0;
                    }
                    if (m.cookie != null && m.hasOwnProperty("cookie")) {
                        if (typeof m.cookie === "number")
                            d.cookie = o.longs === String ? String(m.cookie) : m.cookie;
                        else
                            d.cookie = o.longs === String ? $util.Long.prototype.toString.call(m.cookie) : o.longs === Number ? new $util.LongBits(m.cookie.low >>> 0, m.cookie.high >>> 0).toNumber() : m.cookie;
                    }
                    if (m.token != null && m.hasOwnProperty("token")) {
                        if (typeof m.token === "number")
                            d.token = o.longs === String ? String(m.token) : m.token;
                        else
                            d.token = o.longs === String ? $util.Long.prototype.toString.call(m.token) : o.longs === Number ? new $util.LongBits(m.token.low >>> 0, m.token.high >>> 0).toNumber() : m.token;
                    }
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        d.pid = m.pid;
                    }
                    if (m.presentType != null && m.hasOwnProperty("presentType")) {
                        d.presentType = o.enums === String ? $root.perfetto.protos.FrameTimelineEvent.PresentType[m.presentType] : m.presentType;
                    }
                    if (m.onTimeFinish != null && m.hasOwnProperty("onTimeFinish")) {
                        d.onTimeFinish = m.onTimeFinish;
                    }
                    if (m.gpuComposition != null && m.hasOwnProperty("gpuComposition")) {
                        d.gpuComposition = m.gpuComposition;
                    }
                    if (m.jankType != null && m.hasOwnProperty("jankType")) {
                        d.jankType = m.jankType;
                    }
                    if (m.predictionType != null && m.hasOwnProperty("predictionType")) {
                        d.predictionType = o.enums === String ? $root.perfetto.protos.FrameTimelineEvent.PredictionType[m.predictionType] : m.predictionType;
                    }
                    return d;
                };

                /**
                 * Converts this ActualDisplayFrameStart to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.FrameTimelineEvent.ActualDisplayFrameStart
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ActualDisplayFrameStart.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return ActualDisplayFrameStart;
            })();

            FrameTimelineEvent.FrameEnd = (function() {

                /**
                 * Properties of a FrameEnd.
                 * @memberof perfetto.protos.FrameTimelineEvent
                 * @interface IFrameEnd
                 * @property {number|null} [cookie] FrameEnd cookie
                 */

                /**
                 * Constructs a new FrameEnd.
                 * @memberof perfetto.protos.FrameTimelineEvent
                 * @classdesc Represents a FrameEnd.
                 * @implements IFrameEnd
                 * @constructor
                 * @param {perfetto.protos.FrameTimelineEvent.IFrameEnd=} [p] Properties to set
                 */
                function FrameEnd(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * FrameEnd cookie.
                 * @member {number} cookie
                 * @memberof perfetto.protos.FrameTimelineEvent.FrameEnd
                 * @instance
                 */
                FrameEnd.prototype.cookie = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new FrameEnd instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.FrameTimelineEvent.FrameEnd
                 * @static
                 * @param {perfetto.protos.FrameTimelineEvent.IFrameEnd=} [properties] Properties to set
                 * @returns {perfetto.protos.FrameTimelineEvent.FrameEnd} FrameEnd instance
                 */
                FrameEnd.create = function create(properties) {
                    return new FrameEnd(properties);
                };

                /**
                 * Encodes the specified FrameEnd message. Does not implicitly {@link perfetto.protos.FrameTimelineEvent.FrameEnd.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.FrameTimelineEvent.FrameEnd
                 * @static
                 * @param {perfetto.protos.FrameTimelineEvent.IFrameEnd} m FrameEnd message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FrameEnd.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.cookie != null && Object.hasOwnProperty.call(m, "cookie"))
                        w.uint32(8).int64(m.cookie);
                    return w;
                };

                /**
                 * Encodes the specified FrameEnd message, length delimited. Does not implicitly {@link perfetto.protos.FrameTimelineEvent.FrameEnd.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.FrameTimelineEvent.FrameEnd
                 * @static
                 * @param {perfetto.protos.FrameTimelineEvent.IFrameEnd} message FrameEnd message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FrameEnd.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a FrameEnd message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.FrameTimelineEvent.FrameEnd
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.FrameTimelineEvent.FrameEnd} FrameEnd
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FrameEnd.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FrameTimelineEvent.FrameEnd();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.cookie = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a FrameEnd message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.FrameTimelineEvent.FrameEnd
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.FrameTimelineEvent.FrameEnd} FrameEnd
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FrameEnd.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a FrameEnd message.
                 * @function verify
                 * @memberof perfetto.protos.FrameTimelineEvent.FrameEnd
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                FrameEnd.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.cookie != null && m.hasOwnProperty("cookie")) {
                        if (!$util.isInteger(m.cookie) && !(m.cookie && $util.isInteger(m.cookie.low) && $util.isInteger(m.cookie.high)))
                            return "cookie: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a FrameEnd message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.FrameTimelineEvent.FrameEnd
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.FrameTimelineEvent.FrameEnd} FrameEnd
                 */
                FrameEnd.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.FrameTimelineEvent.FrameEnd)
                        return d;
                    var m = new $root.perfetto.protos.FrameTimelineEvent.FrameEnd();
                    if (d.cookie != null) {
                        if ($util.Long)
                            (m.cookie = $util.Long.fromValue(d.cookie)).unsigned = false;
                        else if (typeof d.cookie === "string")
                            m.cookie = parseInt(d.cookie, 10);
                        else if (typeof d.cookie === "number")
                            m.cookie = d.cookie;
                        else if (typeof d.cookie === "object")
                            m.cookie = new $util.LongBits(d.cookie.low >>> 0, d.cookie.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a FrameEnd message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.FrameTimelineEvent.FrameEnd
                 * @static
                 * @param {perfetto.protos.FrameTimelineEvent.FrameEnd} m FrameEnd
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                FrameEnd.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.cookie = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.cookie = o.longs === String ? "0" : 0;
                    }
                    if (m.cookie != null && m.hasOwnProperty("cookie")) {
                        if (typeof m.cookie === "number")
                            d.cookie = o.longs === String ? String(m.cookie) : m.cookie;
                        else
                            d.cookie = o.longs === String ? $util.Long.prototype.toString.call(m.cookie) : o.longs === Number ? new $util.LongBits(m.cookie.low >>> 0, m.cookie.high >>> 0).toNumber() : m.cookie;
                    }
                    return d;
                };

                /**
                 * Converts this FrameEnd to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.FrameTimelineEvent.FrameEnd
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                FrameEnd.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return FrameEnd;
            })();

            return FrameTimelineEvent;
        })();

        protos.GpuMemTotalEvent = (function() {

            /**
             * Properties of a GpuMemTotalEvent.
             * @memberof perfetto.protos
             * @interface IGpuMemTotalEvent
             * @property {number|null} [gpuId] GpuMemTotalEvent gpuId
             * @property {number|null} [pid] GpuMemTotalEvent pid
             * @property {number|null} [size] GpuMemTotalEvent size
             */

            /**
             * Constructs a new GpuMemTotalEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a GpuMemTotalEvent.
             * @implements IGpuMemTotalEvent
             * @constructor
             * @param {perfetto.protos.IGpuMemTotalEvent=} [p] Properties to set
             */
            function GpuMemTotalEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * GpuMemTotalEvent gpuId.
             * @member {number} gpuId
             * @memberof perfetto.protos.GpuMemTotalEvent
             * @instance
             */
            GpuMemTotalEvent.prototype.gpuId = 0;

            /**
             * GpuMemTotalEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.GpuMemTotalEvent
             * @instance
             */
            GpuMemTotalEvent.prototype.pid = 0;

            /**
             * GpuMemTotalEvent size.
             * @member {number} size
             * @memberof perfetto.protos.GpuMemTotalEvent
             * @instance
             */
            GpuMemTotalEvent.prototype.size = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new GpuMemTotalEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.GpuMemTotalEvent
             * @static
             * @param {perfetto.protos.IGpuMemTotalEvent=} [properties] Properties to set
             * @returns {perfetto.protos.GpuMemTotalEvent} GpuMemTotalEvent instance
             */
            GpuMemTotalEvent.create = function create(properties) {
                return new GpuMemTotalEvent(properties);
            };

            /**
             * Encodes the specified GpuMemTotalEvent message. Does not implicitly {@link perfetto.protos.GpuMemTotalEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.GpuMemTotalEvent
             * @static
             * @param {perfetto.protos.IGpuMemTotalEvent} m GpuMemTotalEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GpuMemTotalEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.gpuId != null && Object.hasOwnProperty.call(m, "gpuId"))
                    w.uint32(8).uint32(m.gpuId);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(16).uint32(m.pid);
                if (m.size != null && Object.hasOwnProperty.call(m, "size"))
                    w.uint32(24).uint64(m.size);
                return w;
            };

            /**
             * Encodes the specified GpuMemTotalEvent message, length delimited. Does not implicitly {@link perfetto.protos.GpuMemTotalEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.GpuMemTotalEvent
             * @static
             * @param {perfetto.protos.IGpuMemTotalEvent} message GpuMemTotalEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GpuMemTotalEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a GpuMemTotalEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.GpuMemTotalEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.GpuMemTotalEvent} GpuMemTotalEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GpuMemTotalEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.GpuMemTotalEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.gpuId = r.uint32();
                        break;
                    case 2:
                        m.pid = r.uint32();
                        break;
                    case 3:
                        m.size = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a GpuMemTotalEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.GpuMemTotalEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.GpuMemTotalEvent} GpuMemTotalEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GpuMemTotalEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a GpuMemTotalEvent message.
             * @function verify
             * @memberof perfetto.protos.GpuMemTotalEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            GpuMemTotalEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.gpuId != null && m.hasOwnProperty("gpuId")) {
                    if (!$util.isInteger(m.gpuId))
                        return "gpuId: integer expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (!$util.isInteger(m.size) && !(m.size && $util.isInteger(m.size.low) && $util.isInteger(m.size.high)))
                        return "size: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a GpuMemTotalEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.GpuMemTotalEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.GpuMemTotalEvent} GpuMemTotalEvent
             */
            GpuMemTotalEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.GpuMemTotalEvent)
                    return d;
                var m = new $root.perfetto.protos.GpuMemTotalEvent();
                if (d.gpuId != null) {
                    m.gpuId = d.gpuId >>> 0;
                }
                if (d.pid != null) {
                    m.pid = d.pid >>> 0;
                }
                if (d.size != null) {
                    if ($util.Long)
                        (m.size = $util.Long.fromValue(d.size)).unsigned = true;
                    else if (typeof d.size === "string")
                        m.size = parseInt(d.size, 10);
                    else if (typeof d.size === "number")
                        m.size = d.size;
                    else if (typeof d.size === "object")
                        m.size = new $util.LongBits(d.size.low >>> 0, d.size.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a GpuMemTotalEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.GpuMemTotalEvent
             * @static
             * @param {perfetto.protos.GpuMemTotalEvent} m GpuMemTotalEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            GpuMemTotalEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.gpuId = 0;
                    d.pid = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.size = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.size = o.longs === String ? "0" : 0;
                }
                if (m.gpuId != null && m.hasOwnProperty("gpuId")) {
                    d.gpuId = m.gpuId;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (typeof m.size === "number")
                        d.size = o.longs === String ? String(m.size) : m.size;
                    else
                        d.size = o.longs === String ? $util.Long.prototype.toString.call(m.size) : o.longs === Number ? new $util.LongBits(m.size.low >>> 0, m.size.high >>> 0).toNumber(true) : m.size;
                }
                return d;
            };

            /**
             * Converts this GpuMemTotalEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.GpuMemTotalEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            GpuMemTotalEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return GpuMemTotalEvent;
        })();

        protos.GraphicsFrameEvent = (function() {

            /**
             * Properties of a GraphicsFrameEvent.
             * @memberof perfetto.protos
             * @interface IGraphicsFrameEvent
             * @property {perfetto.protos.GraphicsFrameEvent.IBufferEvent|null} [bufferEvent] GraphicsFrameEvent bufferEvent
             */

            /**
             * Constructs a new GraphicsFrameEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a GraphicsFrameEvent.
             * @implements IGraphicsFrameEvent
             * @constructor
             * @param {perfetto.protos.IGraphicsFrameEvent=} [p] Properties to set
             */
            function GraphicsFrameEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * GraphicsFrameEvent bufferEvent.
             * @member {perfetto.protos.GraphicsFrameEvent.IBufferEvent|null|undefined} bufferEvent
             * @memberof perfetto.protos.GraphicsFrameEvent
             * @instance
             */
            GraphicsFrameEvent.prototype.bufferEvent = null;

            /**
             * Creates a new GraphicsFrameEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.GraphicsFrameEvent
             * @static
             * @param {perfetto.protos.IGraphicsFrameEvent=} [properties] Properties to set
             * @returns {perfetto.protos.GraphicsFrameEvent} GraphicsFrameEvent instance
             */
            GraphicsFrameEvent.create = function create(properties) {
                return new GraphicsFrameEvent(properties);
            };

            /**
             * Encodes the specified GraphicsFrameEvent message. Does not implicitly {@link perfetto.protos.GraphicsFrameEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.GraphicsFrameEvent
             * @static
             * @param {perfetto.protos.IGraphicsFrameEvent} m GraphicsFrameEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GraphicsFrameEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.bufferEvent != null && Object.hasOwnProperty.call(m, "bufferEvent"))
                    $root.perfetto.protos.GraphicsFrameEvent.BufferEvent.encode(m.bufferEvent, w.uint32(10).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified GraphicsFrameEvent message, length delimited. Does not implicitly {@link perfetto.protos.GraphicsFrameEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.GraphicsFrameEvent
             * @static
             * @param {perfetto.protos.IGraphicsFrameEvent} message GraphicsFrameEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GraphicsFrameEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a GraphicsFrameEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.GraphicsFrameEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.GraphicsFrameEvent} GraphicsFrameEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GraphicsFrameEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.GraphicsFrameEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.bufferEvent = $root.perfetto.protos.GraphicsFrameEvent.BufferEvent.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a GraphicsFrameEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.GraphicsFrameEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.GraphicsFrameEvent} GraphicsFrameEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GraphicsFrameEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a GraphicsFrameEvent message.
             * @function verify
             * @memberof perfetto.protos.GraphicsFrameEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            GraphicsFrameEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.bufferEvent != null && m.hasOwnProperty("bufferEvent")) {
                    {
                        var e = $root.perfetto.protos.GraphicsFrameEvent.BufferEvent.verify(m.bufferEvent);
                        if (e)
                            return "bufferEvent." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a GraphicsFrameEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.GraphicsFrameEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.GraphicsFrameEvent} GraphicsFrameEvent
             */
            GraphicsFrameEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.GraphicsFrameEvent)
                    return d;
                var m = new $root.perfetto.protos.GraphicsFrameEvent();
                if (d.bufferEvent != null) {
                    if (typeof d.bufferEvent !== "object")
                        throw TypeError(".perfetto.protos.GraphicsFrameEvent.bufferEvent: object expected");
                    m.bufferEvent = $root.perfetto.protos.GraphicsFrameEvent.BufferEvent.fromObject(d.bufferEvent);
                }
                return m;
            };

            /**
             * Creates a plain object from a GraphicsFrameEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.GraphicsFrameEvent
             * @static
             * @param {perfetto.protos.GraphicsFrameEvent} m GraphicsFrameEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            GraphicsFrameEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.bufferEvent = null;
                }
                if (m.bufferEvent != null && m.hasOwnProperty("bufferEvent")) {
                    d.bufferEvent = $root.perfetto.protos.GraphicsFrameEvent.BufferEvent.toObject(m.bufferEvent, o);
                }
                return d;
            };

            /**
             * Converts this GraphicsFrameEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.GraphicsFrameEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            GraphicsFrameEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * BufferEventType enum.
             * @name perfetto.protos.GraphicsFrameEvent.BufferEventType
             * @enum {number}
             * @property {number} UNSPECIFIED=0 UNSPECIFIED value
             * @property {number} DEQUEUE=1 DEQUEUE value
             * @property {number} QUEUE=2 QUEUE value
             * @property {number} POST=3 POST value
             * @property {number} ACQUIRE_FENCE=4 ACQUIRE_FENCE value
             * @property {number} LATCH=5 LATCH value
             * @property {number} HWC_COMPOSITION_QUEUED=6 HWC_COMPOSITION_QUEUED value
             * @property {number} FALLBACK_COMPOSITION=7 FALLBACK_COMPOSITION value
             * @property {number} PRESENT_FENCE=8 PRESENT_FENCE value
             * @property {number} RELEASE_FENCE=9 RELEASE_FENCE value
             * @property {number} MODIFY=10 MODIFY value
             * @property {number} DETACH=11 DETACH value
             * @property {number} ATTACH=12 ATTACH value
             * @property {number} CANCEL=13 CANCEL value
             */
            GraphicsFrameEvent.BufferEventType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNSPECIFIED"] = 0;
                values[valuesById[1] = "DEQUEUE"] = 1;
                values[valuesById[2] = "QUEUE"] = 2;
                values[valuesById[3] = "POST"] = 3;
                values[valuesById[4] = "ACQUIRE_FENCE"] = 4;
                values[valuesById[5] = "LATCH"] = 5;
                values[valuesById[6] = "HWC_COMPOSITION_QUEUED"] = 6;
                values[valuesById[7] = "FALLBACK_COMPOSITION"] = 7;
                values[valuesById[8] = "PRESENT_FENCE"] = 8;
                values[valuesById[9] = "RELEASE_FENCE"] = 9;
                values[valuesById[10] = "MODIFY"] = 10;
                values[valuesById[11] = "DETACH"] = 11;
                values[valuesById[12] = "ATTACH"] = 12;
                values[valuesById[13] = "CANCEL"] = 13;
                return values;
            })();

            GraphicsFrameEvent.BufferEvent = (function() {

                /**
                 * Properties of a BufferEvent.
                 * @memberof perfetto.protos.GraphicsFrameEvent
                 * @interface IBufferEvent
                 * @property {number|null} [frameNumber] BufferEvent frameNumber
                 * @property {perfetto.protos.GraphicsFrameEvent.BufferEventType|null} [type] BufferEvent type
                 * @property {string|null} [layerName] BufferEvent layerName
                 * @property {number|null} [durationNs] BufferEvent durationNs
                 * @property {number|null} [bufferId] BufferEvent bufferId
                 */

                /**
                 * Constructs a new BufferEvent.
                 * @memberof perfetto.protos.GraphicsFrameEvent
                 * @classdesc Represents a BufferEvent.
                 * @implements IBufferEvent
                 * @constructor
                 * @param {perfetto.protos.GraphicsFrameEvent.IBufferEvent=} [p] Properties to set
                 */
                function BufferEvent(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * BufferEvent frameNumber.
                 * @member {number} frameNumber
                 * @memberof perfetto.protos.GraphicsFrameEvent.BufferEvent
                 * @instance
                 */
                BufferEvent.prototype.frameNumber = 0;

                /**
                 * BufferEvent type.
                 * @member {perfetto.protos.GraphicsFrameEvent.BufferEventType} type
                 * @memberof perfetto.protos.GraphicsFrameEvent.BufferEvent
                 * @instance
                 */
                BufferEvent.prototype.type = 0;

                /**
                 * BufferEvent layerName.
                 * @member {string} layerName
                 * @memberof perfetto.protos.GraphicsFrameEvent.BufferEvent
                 * @instance
                 */
                BufferEvent.prototype.layerName = "";

                /**
                 * BufferEvent durationNs.
                 * @member {number} durationNs
                 * @memberof perfetto.protos.GraphicsFrameEvent.BufferEvent
                 * @instance
                 */
                BufferEvent.prototype.durationNs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * BufferEvent bufferId.
                 * @member {number} bufferId
                 * @memberof perfetto.protos.GraphicsFrameEvent.BufferEvent
                 * @instance
                 */
                BufferEvent.prototype.bufferId = 0;

                /**
                 * Creates a new BufferEvent instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.GraphicsFrameEvent.BufferEvent
                 * @static
                 * @param {perfetto.protos.GraphicsFrameEvent.IBufferEvent=} [properties] Properties to set
                 * @returns {perfetto.protos.GraphicsFrameEvent.BufferEvent} BufferEvent instance
                 */
                BufferEvent.create = function create(properties) {
                    return new BufferEvent(properties);
                };

                /**
                 * Encodes the specified BufferEvent message. Does not implicitly {@link perfetto.protos.GraphicsFrameEvent.BufferEvent.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.GraphicsFrameEvent.BufferEvent
                 * @static
                 * @param {perfetto.protos.GraphicsFrameEvent.IBufferEvent} m BufferEvent message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BufferEvent.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.frameNumber != null && Object.hasOwnProperty.call(m, "frameNumber"))
                        w.uint32(8).uint32(m.frameNumber);
                    if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                        w.uint32(16).int32(m.type);
                    if (m.layerName != null && Object.hasOwnProperty.call(m, "layerName"))
                        w.uint32(26).string(m.layerName);
                    if (m.durationNs != null && Object.hasOwnProperty.call(m, "durationNs"))
                        w.uint32(32).uint64(m.durationNs);
                    if (m.bufferId != null && Object.hasOwnProperty.call(m, "bufferId"))
                        w.uint32(40).uint32(m.bufferId);
                    return w;
                };

                /**
                 * Encodes the specified BufferEvent message, length delimited. Does not implicitly {@link perfetto.protos.GraphicsFrameEvent.BufferEvent.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.GraphicsFrameEvent.BufferEvent
                 * @static
                 * @param {perfetto.protos.GraphicsFrameEvent.IBufferEvent} message BufferEvent message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BufferEvent.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a BufferEvent message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.GraphicsFrameEvent.BufferEvent
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.GraphicsFrameEvent.BufferEvent} BufferEvent
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BufferEvent.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.GraphicsFrameEvent.BufferEvent();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.frameNumber = r.uint32();
                            break;
                        case 2:
                            m.type = r.int32();
                            break;
                        case 3:
                            m.layerName = r.string();
                            break;
                        case 4:
                            m.durationNs = r.uint64();
                            break;
                        case 5:
                            m.bufferId = r.uint32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a BufferEvent message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.GraphicsFrameEvent.BufferEvent
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.GraphicsFrameEvent.BufferEvent} BufferEvent
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BufferEvent.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a BufferEvent message.
                 * @function verify
                 * @memberof perfetto.protos.GraphicsFrameEvent.BufferEvent
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                BufferEvent.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.frameNumber != null && m.hasOwnProperty("frameNumber")) {
                        if (!$util.isInteger(m.frameNumber))
                            return "frameNumber: integer expected";
                    }
                    if (m.type != null && m.hasOwnProperty("type")) {
                        switch (m.type) {
                        default:
                            return "type: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                        case 6:
                        case 7:
                        case 8:
                        case 9:
                        case 10:
                        case 11:
                        case 12:
                        case 13:
                            break;
                        }
                    }
                    if (m.layerName != null && m.hasOwnProperty("layerName")) {
                        if (!$util.isString(m.layerName))
                            return "layerName: string expected";
                    }
                    if (m.durationNs != null && m.hasOwnProperty("durationNs")) {
                        if (!$util.isInteger(m.durationNs) && !(m.durationNs && $util.isInteger(m.durationNs.low) && $util.isInteger(m.durationNs.high)))
                            return "durationNs: integer|Long expected";
                    }
                    if (m.bufferId != null && m.hasOwnProperty("bufferId")) {
                        if (!$util.isInteger(m.bufferId))
                            return "bufferId: integer expected";
                    }
                    return null;
                };

                /**
                 * Creates a BufferEvent message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.GraphicsFrameEvent.BufferEvent
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.GraphicsFrameEvent.BufferEvent} BufferEvent
                 */
                BufferEvent.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.GraphicsFrameEvent.BufferEvent)
                        return d;
                    var m = new $root.perfetto.protos.GraphicsFrameEvent.BufferEvent();
                    if (d.frameNumber != null) {
                        m.frameNumber = d.frameNumber >>> 0;
                    }
                    switch (d.type) {
                    case "UNSPECIFIED":
                    case 0:
                        m.type = 0;
                        break;
                    case "DEQUEUE":
                    case 1:
                        m.type = 1;
                        break;
                    case "QUEUE":
                    case 2:
                        m.type = 2;
                        break;
                    case "POST":
                    case 3:
                        m.type = 3;
                        break;
                    case "ACQUIRE_FENCE":
                    case 4:
                        m.type = 4;
                        break;
                    case "LATCH":
                    case 5:
                        m.type = 5;
                        break;
                    case "HWC_COMPOSITION_QUEUED":
                    case 6:
                        m.type = 6;
                        break;
                    case "FALLBACK_COMPOSITION":
                    case 7:
                        m.type = 7;
                        break;
                    case "PRESENT_FENCE":
                    case 8:
                        m.type = 8;
                        break;
                    case "RELEASE_FENCE":
                    case 9:
                        m.type = 9;
                        break;
                    case "MODIFY":
                    case 10:
                        m.type = 10;
                        break;
                    case "DETACH":
                    case 11:
                        m.type = 11;
                        break;
                    case "ATTACH":
                    case 12:
                        m.type = 12;
                        break;
                    case "CANCEL":
                    case 13:
                        m.type = 13;
                        break;
                    }
                    if (d.layerName != null) {
                        m.layerName = String(d.layerName);
                    }
                    if (d.durationNs != null) {
                        if ($util.Long)
                            (m.durationNs = $util.Long.fromValue(d.durationNs)).unsigned = true;
                        else if (typeof d.durationNs === "string")
                            m.durationNs = parseInt(d.durationNs, 10);
                        else if (typeof d.durationNs === "number")
                            m.durationNs = d.durationNs;
                        else if (typeof d.durationNs === "object")
                            m.durationNs = new $util.LongBits(d.durationNs.low >>> 0, d.durationNs.high >>> 0).toNumber(true);
                    }
                    if (d.bufferId != null) {
                        m.bufferId = d.bufferId >>> 0;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a BufferEvent message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.GraphicsFrameEvent.BufferEvent
                 * @static
                 * @param {perfetto.protos.GraphicsFrameEvent.BufferEvent} m BufferEvent
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                BufferEvent.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.frameNumber = 0;
                        d.type = o.enums === String ? "UNSPECIFIED" : 0;
                        d.layerName = "";
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.durationNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.durationNs = o.longs === String ? "0" : 0;
                        d.bufferId = 0;
                    }
                    if (m.frameNumber != null && m.hasOwnProperty("frameNumber")) {
                        d.frameNumber = m.frameNumber;
                    }
                    if (m.type != null && m.hasOwnProperty("type")) {
                        d.type = o.enums === String ? $root.perfetto.protos.GraphicsFrameEvent.BufferEventType[m.type] : m.type;
                    }
                    if (m.layerName != null && m.hasOwnProperty("layerName")) {
                        d.layerName = m.layerName;
                    }
                    if (m.durationNs != null && m.hasOwnProperty("durationNs")) {
                        if (typeof m.durationNs === "number")
                            d.durationNs = o.longs === String ? String(m.durationNs) : m.durationNs;
                        else
                            d.durationNs = o.longs === String ? $util.Long.prototype.toString.call(m.durationNs) : o.longs === Number ? new $util.LongBits(m.durationNs.low >>> 0, m.durationNs.high >>> 0).toNumber(true) : m.durationNs;
                    }
                    if (m.bufferId != null && m.hasOwnProperty("bufferId")) {
                        d.bufferId = m.bufferId;
                    }
                    return d;
                };

                /**
                 * Converts this BufferEvent to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.GraphicsFrameEvent.BufferEvent
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                BufferEvent.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return BufferEvent;
            })();

            return GraphicsFrameEvent;
        })();

        protos.InitialDisplayState = (function() {

            /**
             * Properties of an InitialDisplayState.
             * @memberof perfetto.protos
             * @interface IInitialDisplayState
             * @property {number|null} [displayState] InitialDisplayState displayState
             * @property {number|null} [brightness] InitialDisplayState brightness
             */

            /**
             * Constructs a new InitialDisplayState.
             * @memberof perfetto.protos
             * @classdesc Represents an InitialDisplayState.
             * @implements IInitialDisplayState
             * @constructor
             * @param {perfetto.protos.IInitialDisplayState=} [p] Properties to set
             */
            function InitialDisplayState(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * InitialDisplayState displayState.
             * @member {number} displayState
             * @memberof perfetto.protos.InitialDisplayState
             * @instance
             */
            InitialDisplayState.prototype.displayState = 0;

            /**
             * InitialDisplayState brightness.
             * @member {number} brightness
             * @memberof perfetto.protos.InitialDisplayState
             * @instance
             */
            InitialDisplayState.prototype.brightness = 0;

            /**
             * Creates a new InitialDisplayState instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.InitialDisplayState
             * @static
             * @param {perfetto.protos.IInitialDisplayState=} [properties] Properties to set
             * @returns {perfetto.protos.InitialDisplayState} InitialDisplayState instance
             */
            InitialDisplayState.create = function create(properties) {
                return new InitialDisplayState(properties);
            };

            /**
             * Encodes the specified InitialDisplayState message. Does not implicitly {@link perfetto.protos.InitialDisplayState.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.InitialDisplayState
             * @static
             * @param {perfetto.protos.IInitialDisplayState} m InitialDisplayState message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InitialDisplayState.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.displayState != null && Object.hasOwnProperty.call(m, "displayState"))
                    w.uint32(8).int32(m.displayState);
                if (m.brightness != null && Object.hasOwnProperty.call(m, "brightness"))
                    w.uint32(17).double(m.brightness);
                return w;
            };

            /**
             * Encodes the specified InitialDisplayState message, length delimited. Does not implicitly {@link perfetto.protos.InitialDisplayState.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.InitialDisplayState
             * @static
             * @param {perfetto.protos.IInitialDisplayState} message InitialDisplayState message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InitialDisplayState.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an InitialDisplayState message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.InitialDisplayState
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.InitialDisplayState} InitialDisplayState
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InitialDisplayState.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.InitialDisplayState();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.displayState = r.int32();
                        break;
                    case 2:
                        m.brightness = r.double();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an InitialDisplayState message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.InitialDisplayState
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.InitialDisplayState} InitialDisplayState
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InitialDisplayState.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an InitialDisplayState message.
             * @function verify
             * @memberof perfetto.protos.InitialDisplayState
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            InitialDisplayState.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.displayState != null && m.hasOwnProperty("displayState")) {
                    if (!$util.isInteger(m.displayState))
                        return "displayState: integer expected";
                }
                if (m.brightness != null && m.hasOwnProperty("brightness")) {
                    if (typeof m.brightness !== "number")
                        return "brightness: number expected";
                }
                return null;
            };

            /**
             * Creates an InitialDisplayState message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.InitialDisplayState
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.InitialDisplayState} InitialDisplayState
             */
            InitialDisplayState.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.InitialDisplayState)
                    return d;
                var m = new $root.perfetto.protos.InitialDisplayState();
                if (d.displayState != null) {
                    m.displayState = d.displayState | 0;
                }
                if (d.brightness != null) {
                    m.brightness = Number(d.brightness);
                }
                return m;
            };

            /**
             * Creates a plain object from an InitialDisplayState message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.InitialDisplayState
             * @static
             * @param {perfetto.protos.InitialDisplayState} m InitialDisplayState
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            InitialDisplayState.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.displayState = 0;
                    d.brightness = 0;
                }
                if (m.displayState != null && m.hasOwnProperty("displayState")) {
                    d.displayState = m.displayState;
                }
                if (m.brightness != null && m.hasOwnProperty("brightness")) {
                    d.brightness = o.json && !isFinite(m.brightness) ? String(m.brightness) : m.brightness;
                }
                return d;
            };

            /**
             * Converts this InitialDisplayState to JSON.
             * @function toJSON
             * @memberof perfetto.protos.InitialDisplayState
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            InitialDisplayState.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return InitialDisplayState;
        })();

        protos.PackagesList = (function() {

            /**
             * Properties of a PackagesList.
             * @memberof perfetto.protos
             * @interface IPackagesList
             * @property {Array.<perfetto.protos.PackagesList.IPackageInfo>|null} [packages] PackagesList packages
             * @property {boolean|null} [parseError] PackagesList parseError
             * @property {boolean|null} [readError] PackagesList readError
             */

            /**
             * Constructs a new PackagesList.
             * @memberof perfetto.protos
             * @classdesc Represents a PackagesList.
             * @implements IPackagesList
             * @constructor
             * @param {perfetto.protos.IPackagesList=} [p] Properties to set
             */
            function PackagesList(p) {
                this.packages = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * PackagesList packages.
             * @member {Array.<perfetto.protos.PackagesList.IPackageInfo>} packages
             * @memberof perfetto.protos.PackagesList
             * @instance
             */
            PackagesList.prototype.packages = $util.emptyArray;

            /**
             * PackagesList parseError.
             * @member {boolean} parseError
             * @memberof perfetto.protos.PackagesList
             * @instance
             */
            PackagesList.prototype.parseError = false;

            /**
             * PackagesList readError.
             * @member {boolean} readError
             * @memberof perfetto.protos.PackagesList
             * @instance
             */
            PackagesList.prototype.readError = false;

            /**
             * Creates a new PackagesList instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.PackagesList
             * @static
             * @param {perfetto.protos.IPackagesList=} [properties] Properties to set
             * @returns {perfetto.protos.PackagesList} PackagesList instance
             */
            PackagesList.create = function create(properties) {
                return new PackagesList(properties);
            };

            /**
             * Encodes the specified PackagesList message. Does not implicitly {@link perfetto.protos.PackagesList.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.PackagesList
             * @static
             * @param {perfetto.protos.IPackagesList} m PackagesList message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PackagesList.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.packages != null && m.packages.length) {
                    for (var i = 0; i < m.packages.length; ++i)
                        $root.perfetto.protos.PackagesList.PackageInfo.encode(m.packages[i], w.uint32(10).fork()).ldelim();
                }
                if (m.parseError != null && Object.hasOwnProperty.call(m, "parseError"))
                    w.uint32(16).bool(m.parseError);
                if (m.readError != null && Object.hasOwnProperty.call(m, "readError"))
                    w.uint32(24).bool(m.readError);
                return w;
            };

            /**
             * Encodes the specified PackagesList message, length delimited. Does not implicitly {@link perfetto.protos.PackagesList.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.PackagesList
             * @static
             * @param {perfetto.protos.IPackagesList} message PackagesList message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PackagesList.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a PackagesList message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.PackagesList
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.PackagesList} PackagesList
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PackagesList.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.PackagesList();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.packages && m.packages.length))
                            m.packages = [];
                        m.packages.push($root.perfetto.protos.PackagesList.PackageInfo.decode(r, r.uint32()));
                        break;
                    case 2:
                        m.parseError = r.bool();
                        break;
                    case 3:
                        m.readError = r.bool();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a PackagesList message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.PackagesList
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.PackagesList} PackagesList
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PackagesList.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a PackagesList message.
             * @function verify
             * @memberof perfetto.protos.PackagesList
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            PackagesList.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.packages != null && m.hasOwnProperty("packages")) {
                    if (!Array.isArray(m.packages))
                        return "packages: array expected";
                    for (var i = 0; i < m.packages.length; ++i) {
                        {
                            var e = $root.perfetto.protos.PackagesList.PackageInfo.verify(m.packages[i]);
                            if (e)
                                return "packages." + e;
                        }
                    }
                }
                if (m.parseError != null && m.hasOwnProperty("parseError")) {
                    if (typeof m.parseError !== "boolean")
                        return "parseError: boolean expected";
                }
                if (m.readError != null && m.hasOwnProperty("readError")) {
                    if (typeof m.readError !== "boolean")
                        return "readError: boolean expected";
                }
                return null;
            };

            /**
             * Creates a PackagesList message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.PackagesList
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.PackagesList} PackagesList
             */
            PackagesList.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.PackagesList)
                    return d;
                var m = new $root.perfetto.protos.PackagesList();
                if (d.packages) {
                    if (!Array.isArray(d.packages))
                        throw TypeError(".perfetto.protos.PackagesList.packages: array expected");
                    m.packages = [];
                    for (var i = 0; i < d.packages.length; ++i) {
                        if (typeof d.packages[i] !== "object")
                            throw TypeError(".perfetto.protos.PackagesList.packages: object expected");
                        m.packages[i] = $root.perfetto.protos.PackagesList.PackageInfo.fromObject(d.packages[i]);
                    }
                }
                if (d.parseError != null) {
                    m.parseError = Boolean(d.parseError);
                }
                if (d.readError != null) {
                    m.readError = Boolean(d.readError);
                }
                return m;
            };

            /**
             * Creates a plain object from a PackagesList message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.PackagesList
             * @static
             * @param {perfetto.protos.PackagesList} m PackagesList
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            PackagesList.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.packages = [];
                }
                if (o.defaults) {
                    d.parseError = false;
                    d.readError = false;
                }
                if (m.packages && m.packages.length) {
                    d.packages = [];
                    for (var j = 0; j < m.packages.length; ++j) {
                        d.packages[j] = $root.perfetto.protos.PackagesList.PackageInfo.toObject(m.packages[j], o);
                    }
                }
                if (m.parseError != null && m.hasOwnProperty("parseError")) {
                    d.parseError = m.parseError;
                }
                if (m.readError != null && m.hasOwnProperty("readError")) {
                    d.readError = m.readError;
                }
                return d;
            };

            /**
             * Converts this PackagesList to JSON.
             * @function toJSON
             * @memberof perfetto.protos.PackagesList
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            PackagesList.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            PackagesList.PackageInfo = (function() {

                /**
                 * Properties of a PackageInfo.
                 * @memberof perfetto.protos.PackagesList
                 * @interface IPackageInfo
                 * @property {string|null} [name] PackageInfo name
                 * @property {number|null} [uid] PackageInfo uid
                 * @property {boolean|null} [debuggable] PackageInfo debuggable
                 * @property {boolean|null} [profileableFromShell] PackageInfo profileableFromShell
                 * @property {number|null} [versionCode] PackageInfo versionCode
                 */

                /**
                 * Constructs a new PackageInfo.
                 * @memberof perfetto.protos.PackagesList
                 * @classdesc Represents a PackageInfo.
                 * @implements IPackageInfo
                 * @constructor
                 * @param {perfetto.protos.PackagesList.IPackageInfo=} [p] Properties to set
                 */
                function PackageInfo(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * PackageInfo name.
                 * @member {string} name
                 * @memberof perfetto.protos.PackagesList.PackageInfo
                 * @instance
                 */
                PackageInfo.prototype.name = "";

                /**
                 * PackageInfo uid.
                 * @member {number} uid
                 * @memberof perfetto.protos.PackagesList.PackageInfo
                 * @instance
                 */
                PackageInfo.prototype.uid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * PackageInfo debuggable.
                 * @member {boolean} debuggable
                 * @memberof perfetto.protos.PackagesList.PackageInfo
                 * @instance
                 */
                PackageInfo.prototype.debuggable = false;

                /**
                 * PackageInfo profileableFromShell.
                 * @member {boolean} profileableFromShell
                 * @memberof perfetto.protos.PackagesList.PackageInfo
                 * @instance
                 */
                PackageInfo.prototype.profileableFromShell = false;

                /**
                 * PackageInfo versionCode.
                 * @member {number} versionCode
                 * @memberof perfetto.protos.PackagesList.PackageInfo
                 * @instance
                 */
                PackageInfo.prototype.versionCode = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new PackageInfo instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.PackagesList.PackageInfo
                 * @static
                 * @param {perfetto.protos.PackagesList.IPackageInfo=} [properties] Properties to set
                 * @returns {perfetto.protos.PackagesList.PackageInfo} PackageInfo instance
                 */
                PackageInfo.create = function create(properties) {
                    return new PackageInfo(properties);
                };

                /**
                 * Encodes the specified PackageInfo message. Does not implicitly {@link perfetto.protos.PackagesList.PackageInfo.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.PackagesList.PackageInfo
                 * @static
                 * @param {perfetto.protos.PackagesList.IPackageInfo} m PackageInfo message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PackageInfo.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(10).string(m.name);
                    if (m.uid != null && Object.hasOwnProperty.call(m, "uid"))
                        w.uint32(16).uint64(m.uid);
                    if (m.debuggable != null && Object.hasOwnProperty.call(m, "debuggable"))
                        w.uint32(24).bool(m.debuggable);
                    if (m.profileableFromShell != null && Object.hasOwnProperty.call(m, "profileableFromShell"))
                        w.uint32(32).bool(m.profileableFromShell);
                    if (m.versionCode != null && Object.hasOwnProperty.call(m, "versionCode"))
                        w.uint32(40).int64(m.versionCode);
                    return w;
                };

                /**
                 * Encodes the specified PackageInfo message, length delimited. Does not implicitly {@link perfetto.protos.PackagesList.PackageInfo.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.PackagesList.PackageInfo
                 * @static
                 * @param {perfetto.protos.PackagesList.IPackageInfo} message PackageInfo message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PackageInfo.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a PackageInfo message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.PackagesList.PackageInfo
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.PackagesList.PackageInfo} PackageInfo
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PackageInfo.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.PackagesList.PackageInfo();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.name = r.string();
                            break;
                        case 2:
                            m.uid = r.uint64();
                            break;
                        case 3:
                            m.debuggable = r.bool();
                            break;
                        case 4:
                            m.profileableFromShell = r.bool();
                            break;
                        case 5:
                            m.versionCode = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a PackageInfo message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.PackagesList.PackageInfo
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.PackagesList.PackageInfo} PackageInfo
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PackageInfo.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a PackageInfo message.
                 * @function verify
                 * @memberof perfetto.protos.PackagesList.PackageInfo
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                PackageInfo.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    if (m.uid != null && m.hasOwnProperty("uid")) {
                        if (!$util.isInteger(m.uid) && !(m.uid && $util.isInteger(m.uid.low) && $util.isInteger(m.uid.high)))
                            return "uid: integer|Long expected";
                    }
                    if (m.debuggable != null && m.hasOwnProperty("debuggable")) {
                        if (typeof m.debuggable !== "boolean")
                            return "debuggable: boolean expected";
                    }
                    if (m.profileableFromShell != null && m.hasOwnProperty("profileableFromShell")) {
                        if (typeof m.profileableFromShell !== "boolean")
                            return "profileableFromShell: boolean expected";
                    }
                    if (m.versionCode != null && m.hasOwnProperty("versionCode")) {
                        if (!$util.isInteger(m.versionCode) && !(m.versionCode && $util.isInteger(m.versionCode.low) && $util.isInteger(m.versionCode.high)))
                            return "versionCode: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a PackageInfo message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.PackagesList.PackageInfo
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.PackagesList.PackageInfo} PackageInfo
                 */
                PackageInfo.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.PackagesList.PackageInfo)
                        return d;
                    var m = new $root.perfetto.protos.PackagesList.PackageInfo();
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    if (d.uid != null) {
                        if ($util.Long)
                            (m.uid = $util.Long.fromValue(d.uid)).unsigned = true;
                        else if (typeof d.uid === "string")
                            m.uid = parseInt(d.uid, 10);
                        else if (typeof d.uid === "number")
                            m.uid = d.uid;
                        else if (typeof d.uid === "object")
                            m.uid = new $util.LongBits(d.uid.low >>> 0, d.uid.high >>> 0).toNumber(true);
                    }
                    if (d.debuggable != null) {
                        m.debuggable = Boolean(d.debuggable);
                    }
                    if (d.profileableFromShell != null) {
                        m.profileableFromShell = Boolean(d.profileableFromShell);
                    }
                    if (d.versionCode != null) {
                        if ($util.Long)
                            (m.versionCode = $util.Long.fromValue(d.versionCode)).unsigned = false;
                        else if (typeof d.versionCode === "string")
                            m.versionCode = parseInt(d.versionCode, 10);
                        else if (typeof d.versionCode === "number")
                            m.versionCode = d.versionCode;
                        else if (typeof d.versionCode === "object")
                            m.versionCode = new $util.LongBits(d.versionCode.low >>> 0, d.versionCode.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a PackageInfo message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.PackagesList.PackageInfo
                 * @static
                 * @param {perfetto.protos.PackagesList.PackageInfo} m PackageInfo
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                PackageInfo.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.name = "";
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.uid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.uid = o.longs === String ? "0" : 0;
                        d.debuggable = false;
                        d.profileableFromShell = false;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.versionCode = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.versionCode = o.longs === String ? "0" : 0;
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    if (m.uid != null && m.hasOwnProperty("uid")) {
                        if (typeof m.uid === "number")
                            d.uid = o.longs === String ? String(m.uid) : m.uid;
                        else
                            d.uid = o.longs === String ? $util.Long.prototype.toString.call(m.uid) : o.longs === Number ? new $util.LongBits(m.uid.low >>> 0, m.uid.high >>> 0).toNumber(true) : m.uid;
                    }
                    if (m.debuggable != null && m.hasOwnProperty("debuggable")) {
                        d.debuggable = m.debuggable;
                    }
                    if (m.profileableFromShell != null && m.hasOwnProperty("profileableFromShell")) {
                        d.profileableFromShell = m.profileableFromShell;
                    }
                    if (m.versionCode != null && m.hasOwnProperty("versionCode")) {
                        if (typeof m.versionCode === "number")
                            d.versionCode = o.longs === String ? String(m.versionCode) : m.versionCode;
                        else
                            d.versionCode = o.longs === String ? $util.Long.prototype.toString.call(m.versionCode) : o.longs === Number ? new $util.LongBits(m.versionCode.low >>> 0, m.versionCode.high >>> 0).toNumber() : m.versionCode;
                    }
                    return d;
                };

                /**
                 * Converts this PackageInfo to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.PackagesList.PackageInfo
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                PackageInfo.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return PackageInfo;
            })();

            return PackagesList;
        })();

        protos.ChromeBenchmarkMetadata = (function() {

            /**
             * Properties of a ChromeBenchmarkMetadata.
             * @memberof perfetto.protos
             * @interface IChromeBenchmarkMetadata
             * @property {number|null} [benchmarkStartTimeUs] ChromeBenchmarkMetadata benchmarkStartTimeUs
             * @property {number|null} [storyRunTimeUs] ChromeBenchmarkMetadata storyRunTimeUs
             * @property {string|null} [benchmarkName] ChromeBenchmarkMetadata benchmarkName
             * @property {string|null} [benchmarkDescription] ChromeBenchmarkMetadata benchmarkDescription
             * @property {string|null} [label] ChromeBenchmarkMetadata label
             * @property {string|null} [storyName] ChromeBenchmarkMetadata storyName
             * @property {Array.<string>|null} [storyTags] ChromeBenchmarkMetadata storyTags
             * @property {number|null} [storyRunIndex] ChromeBenchmarkMetadata storyRunIndex
             * @property {boolean|null} [hadFailures] ChromeBenchmarkMetadata hadFailures
             */

            /**
             * Constructs a new ChromeBenchmarkMetadata.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeBenchmarkMetadata.
             * @implements IChromeBenchmarkMetadata
             * @constructor
             * @param {perfetto.protos.IChromeBenchmarkMetadata=} [p] Properties to set
             */
            function ChromeBenchmarkMetadata(p) {
                this.storyTags = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeBenchmarkMetadata benchmarkStartTimeUs.
             * @member {number} benchmarkStartTimeUs
             * @memberof perfetto.protos.ChromeBenchmarkMetadata
             * @instance
             */
            ChromeBenchmarkMetadata.prototype.benchmarkStartTimeUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ChromeBenchmarkMetadata storyRunTimeUs.
             * @member {number} storyRunTimeUs
             * @memberof perfetto.protos.ChromeBenchmarkMetadata
             * @instance
             */
            ChromeBenchmarkMetadata.prototype.storyRunTimeUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ChromeBenchmarkMetadata benchmarkName.
             * @member {string} benchmarkName
             * @memberof perfetto.protos.ChromeBenchmarkMetadata
             * @instance
             */
            ChromeBenchmarkMetadata.prototype.benchmarkName = "";

            /**
             * ChromeBenchmarkMetadata benchmarkDescription.
             * @member {string} benchmarkDescription
             * @memberof perfetto.protos.ChromeBenchmarkMetadata
             * @instance
             */
            ChromeBenchmarkMetadata.prototype.benchmarkDescription = "";

            /**
             * ChromeBenchmarkMetadata label.
             * @member {string} label
             * @memberof perfetto.protos.ChromeBenchmarkMetadata
             * @instance
             */
            ChromeBenchmarkMetadata.prototype.label = "";

            /**
             * ChromeBenchmarkMetadata storyName.
             * @member {string} storyName
             * @memberof perfetto.protos.ChromeBenchmarkMetadata
             * @instance
             */
            ChromeBenchmarkMetadata.prototype.storyName = "";

            /**
             * ChromeBenchmarkMetadata storyTags.
             * @member {Array.<string>} storyTags
             * @memberof perfetto.protos.ChromeBenchmarkMetadata
             * @instance
             */
            ChromeBenchmarkMetadata.prototype.storyTags = $util.emptyArray;

            /**
             * ChromeBenchmarkMetadata storyRunIndex.
             * @member {number} storyRunIndex
             * @memberof perfetto.protos.ChromeBenchmarkMetadata
             * @instance
             */
            ChromeBenchmarkMetadata.prototype.storyRunIndex = 0;

            /**
             * ChromeBenchmarkMetadata hadFailures.
             * @member {boolean} hadFailures
             * @memberof perfetto.protos.ChromeBenchmarkMetadata
             * @instance
             */
            ChromeBenchmarkMetadata.prototype.hadFailures = false;

            /**
             * Creates a new ChromeBenchmarkMetadata instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeBenchmarkMetadata
             * @static
             * @param {perfetto.protos.IChromeBenchmarkMetadata=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeBenchmarkMetadata} ChromeBenchmarkMetadata instance
             */
            ChromeBenchmarkMetadata.create = function create(properties) {
                return new ChromeBenchmarkMetadata(properties);
            };

            /**
             * Encodes the specified ChromeBenchmarkMetadata message. Does not implicitly {@link perfetto.protos.ChromeBenchmarkMetadata.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeBenchmarkMetadata
             * @static
             * @param {perfetto.protos.IChromeBenchmarkMetadata} m ChromeBenchmarkMetadata message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeBenchmarkMetadata.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.benchmarkStartTimeUs != null && Object.hasOwnProperty.call(m, "benchmarkStartTimeUs"))
                    w.uint32(8).int64(m.benchmarkStartTimeUs);
                if (m.storyRunTimeUs != null && Object.hasOwnProperty.call(m, "storyRunTimeUs"))
                    w.uint32(16).int64(m.storyRunTimeUs);
                if (m.benchmarkName != null && Object.hasOwnProperty.call(m, "benchmarkName"))
                    w.uint32(26).string(m.benchmarkName);
                if (m.benchmarkDescription != null && Object.hasOwnProperty.call(m, "benchmarkDescription"))
                    w.uint32(34).string(m.benchmarkDescription);
                if (m.label != null && Object.hasOwnProperty.call(m, "label"))
                    w.uint32(42).string(m.label);
                if (m.storyName != null && Object.hasOwnProperty.call(m, "storyName"))
                    w.uint32(50).string(m.storyName);
                if (m.storyTags != null && m.storyTags.length) {
                    for (var i = 0; i < m.storyTags.length; ++i)
                        w.uint32(58).string(m.storyTags[i]);
                }
                if (m.storyRunIndex != null && Object.hasOwnProperty.call(m, "storyRunIndex"))
                    w.uint32(64).int32(m.storyRunIndex);
                if (m.hadFailures != null && Object.hasOwnProperty.call(m, "hadFailures"))
                    w.uint32(72).bool(m.hadFailures);
                return w;
            };

            /**
             * Encodes the specified ChromeBenchmarkMetadata message, length delimited. Does not implicitly {@link perfetto.protos.ChromeBenchmarkMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeBenchmarkMetadata
             * @static
             * @param {perfetto.protos.IChromeBenchmarkMetadata} message ChromeBenchmarkMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeBenchmarkMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeBenchmarkMetadata message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeBenchmarkMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeBenchmarkMetadata} ChromeBenchmarkMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeBenchmarkMetadata.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeBenchmarkMetadata();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.benchmarkStartTimeUs = r.int64();
                        break;
                    case 2:
                        m.storyRunTimeUs = r.int64();
                        break;
                    case 3:
                        m.benchmarkName = r.string();
                        break;
                    case 4:
                        m.benchmarkDescription = r.string();
                        break;
                    case 5:
                        m.label = r.string();
                        break;
                    case 6:
                        m.storyName = r.string();
                        break;
                    case 7:
                        if (!(m.storyTags && m.storyTags.length))
                            m.storyTags = [];
                        m.storyTags.push(r.string());
                        break;
                    case 8:
                        m.storyRunIndex = r.int32();
                        break;
                    case 9:
                        m.hadFailures = r.bool();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeBenchmarkMetadata message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeBenchmarkMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeBenchmarkMetadata} ChromeBenchmarkMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeBenchmarkMetadata.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeBenchmarkMetadata message.
             * @function verify
             * @memberof perfetto.protos.ChromeBenchmarkMetadata
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeBenchmarkMetadata.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.benchmarkStartTimeUs != null && m.hasOwnProperty("benchmarkStartTimeUs")) {
                    if (!$util.isInteger(m.benchmarkStartTimeUs) && !(m.benchmarkStartTimeUs && $util.isInteger(m.benchmarkStartTimeUs.low) && $util.isInteger(m.benchmarkStartTimeUs.high)))
                        return "benchmarkStartTimeUs: integer|Long expected";
                }
                if (m.storyRunTimeUs != null && m.hasOwnProperty("storyRunTimeUs")) {
                    if (!$util.isInteger(m.storyRunTimeUs) && !(m.storyRunTimeUs && $util.isInteger(m.storyRunTimeUs.low) && $util.isInteger(m.storyRunTimeUs.high)))
                        return "storyRunTimeUs: integer|Long expected";
                }
                if (m.benchmarkName != null && m.hasOwnProperty("benchmarkName")) {
                    if (!$util.isString(m.benchmarkName))
                        return "benchmarkName: string expected";
                }
                if (m.benchmarkDescription != null && m.hasOwnProperty("benchmarkDescription")) {
                    if (!$util.isString(m.benchmarkDescription))
                        return "benchmarkDescription: string expected";
                }
                if (m.label != null && m.hasOwnProperty("label")) {
                    if (!$util.isString(m.label))
                        return "label: string expected";
                }
                if (m.storyName != null && m.hasOwnProperty("storyName")) {
                    if (!$util.isString(m.storyName))
                        return "storyName: string expected";
                }
                if (m.storyTags != null && m.hasOwnProperty("storyTags")) {
                    if (!Array.isArray(m.storyTags))
                        return "storyTags: array expected";
                    for (var i = 0; i < m.storyTags.length; ++i) {
                        if (!$util.isString(m.storyTags[i]))
                            return "storyTags: string[] expected";
                    }
                }
                if (m.storyRunIndex != null && m.hasOwnProperty("storyRunIndex")) {
                    if (!$util.isInteger(m.storyRunIndex))
                        return "storyRunIndex: integer expected";
                }
                if (m.hadFailures != null && m.hasOwnProperty("hadFailures")) {
                    if (typeof m.hadFailures !== "boolean")
                        return "hadFailures: boolean expected";
                }
                return null;
            };

            /**
             * Creates a ChromeBenchmarkMetadata message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeBenchmarkMetadata
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeBenchmarkMetadata} ChromeBenchmarkMetadata
             */
            ChromeBenchmarkMetadata.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeBenchmarkMetadata)
                    return d;
                var m = new $root.perfetto.protos.ChromeBenchmarkMetadata();
                if (d.benchmarkStartTimeUs != null) {
                    if ($util.Long)
                        (m.benchmarkStartTimeUs = $util.Long.fromValue(d.benchmarkStartTimeUs)).unsigned = false;
                    else if (typeof d.benchmarkStartTimeUs === "string")
                        m.benchmarkStartTimeUs = parseInt(d.benchmarkStartTimeUs, 10);
                    else if (typeof d.benchmarkStartTimeUs === "number")
                        m.benchmarkStartTimeUs = d.benchmarkStartTimeUs;
                    else if (typeof d.benchmarkStartTimeUs === "object")
                        m.benchmarkStartTimeUs = new $util.LongBits(d.benchmarkStartTimeUs.low >>> 0, d.benchmarkStartTimeUs.high >>> 0).toNumber();
                }
                if (d.storyRunTimeUs != null) {
                    if ($util.Long)
                        (m.storyRunTimeUs = $util.Long.fromValue(d.storyRunTimeUs)).unsigned = false;
                    else if (typeof d.storyRunTimeUs === "string")
                        m.storyRunTimeUs = parseInt(d.storyRunTimeUs, 10);
                    else if (typeof d.storyRunTimeUs === "number")
                        m.storyRunTimeUs = d.storyRunTimeUs;
                    else if (typeof d.storyRunTimeUs === "object")
                        m.storyRunTimeUs = new $util.LongBits(d.storyRunTimeUs.low >>> 0, d.storyRunTimeUs.high >>> 0).toNumber();
                }
                if (d.benchmarkName != null) {
                    m.benchmarkName = String(d.benchmarkName);
                }
                if (d.benchmarkDescription != null) {
                    m.benchmarkDescription = String(d.benchmarkDescription);
                }
                if (d.label != null) {
                    m.label = String(d.label);
                }
                if (d.storyName != null) {
                    m.storyName = String(d.storyName);
                }
                if (d.storyTags) {
                    if (!Array.isArray(d.storyTags))
                        throw TypeError(".perfetto.protos.ChromeBenchmarkMetadata.storyTags: array expected");
                    m.storyTags = [];
                    for (var i = 0; i < d.storyTags.length; ++i) {
                        m.storyTags[i] = String(d.storyTags[i]);
                    }
                }
                if (d.storyRunIndex != null) {
                    m.storyRunIndex = d.storyRunIndex | 0;
                }
                if (d.hadFailures != null) {
                    m.hadFailures = Boolean(d.hadFailures);
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeBenchmarkMetadata message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeBenchmarkMetadata
             * @static
             * @param {perfetto.protos.ChromeBenchmarkMetadata} m ChromeBenchmarkMetadata
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeBenchmarkMetadata.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.storyTags = [];
                }
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.benchmarkStartTimeUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.benchmarkStartTimeUs = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.storyRunTimeUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.storyRunTimeUs = o.longs === String ? "0" : 0;
                    d.benchmarkName = "";
                    d.benchmarkDescription = "";
                    d.label = "";
                    d.storyName = "";
                    d.storyRunIndex = 0;
                    d.hadFailures = false;
                }
                if (m.benchmarkStartTimeUs != null && m.hasOwnProperty("benchmarkStartTimeUs")) {
                    if (typeof m.benchmarkStartTimeUs === "number")
                        d.benchmarkStartTimeUs = o.longs === String ? String(m.benchmarkStartTimeUs) : m.benchmarkStartTimeUs;
                    else
                        d.benchmarkStartTimeUs = o.longs === String ? $util.Long.prototype.toString.call(m.benchmarkStartTimeUs) : o.longs === Number ? new $util.LongBits(m.benchmarkStartTimeUs.low >>> 0, m.benchmarkStartTimeUs.high >>> 0).toNumber() : m.benchmarkStartTimeUs;
                }
                if (m.storyRunTimeUs != null && m.hasOwnProperty("storyRunTimeUs")) {
                    if (typeof m.storyRunTimeUs === "number")
                        d.storyRunTimeUs = o.longs === String ? String(m.storyRunTimeUs) : m.storyRunTimeUs;
                    else
                        d.storyRunTimeUs = o.longs === String ? $util.Long.prototype.toString.call(m.storyRunTimeUs) : o.longs === Number ? new $util.LongBits(m.storyRunTimeUs.low >>> 0, m.storyRunTimeUs.high >>> 0).toNumber() : m.storyRunTimeUs;
                }
                if (m.benchmarkName != null && m.hasOwnProperty("benchmarkName")) {
                    d.benchmarkName = m.benchmarkName;
                }
                if (m.benchmarkDescription != null && m.hasOwnProperty("benchmarkDescription")) {
                    d.benchmarkDescription = m.benchmarkDescription;
                }
                if (m.label != null && m.hasOwnProperty("label")) {
                    d.label = m.label;
                }
                if (m.storyName != null && m.hasOwnProperty("storyName")) {
                    d.storyName = m.storyName;
                }
                if (m.storyTags && m.storyTags.length) {
                    d.storyTags = [];
                    for (var j = 0; j < m.storyTags.length; ++j) {
                        d.storyTags[j] = m.storyTags[j];
                    }
                }
                if (m.storyRunIndex != null && m.hasOwnProperty("storyRunIndex")) {
                    d.storyRunIndex = m.storyRunIndex;
                }
                if (m.hadFailures != null && m.hasOwnProperty("hadFailures")) {
                    d.hadFailures = m.hadFailures;
                }
                return d;
            };

            /**
             * Converts this ChromeBenchmarkMetadata to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeBenchmarkMetadata
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeBenchmarkMetadata.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ChromeBenchmarkMetadata;
        })();

        protos.ChromeMetadataPacket = (function() {

            /**
             * Properties of a ChromeMetadataPacket.
             * @memberof perfetto.protos
             * @interface IChromeMetadataPacket
             * @property {perfetto.protos.IBackgroundTracingMetadata|null} [backgroundTracingMetadata] ChromeMetadataPacket backgroundTracingMetadata
             * @property {number|null} [chromeVersionCode] ChromeMetadataPacket chromeVersionCode
             * @property {string|null} [enabledCategories] ChromeMetadataPacket enabledCategories
             */

            /**
             * Constructs a new ChromeMetadataPacket.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeMetadataPacket.
             * @implements IChromeMetadataPacket
             * @constructor
             * @param {perfetto.protos.IChromeMetadataPacket=} [p] Properties to set
             */
            function ChromeMetadataPacket(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeMetadataPacket backgroundTracingMetadata.
             * @member {perfetto.protos.IBackgroundTracingMetadata|null|undefined} backgroundTracingMetadata
             * @memberof perfetto.protos.ChromeMetadataPacket
             * @instance
             */
            ChromeMetadataPacket.prototype.backgroundTracingMetadata = null;

            /**
             * ChromeMetadataPacket chromeVersionCode.
             * @member {number} chromeVersionCode
             * @memberof perfetto.protos.ChromeMetadataPacket
             * @instance
             */
            ChromeMetadataPacket.prototype.chromeVersionCode = 0;

            /**
             * ChromeMetadataPacket enabledCategories.
             * @member {string} enabledCategories
             * @memberof perfetto.protos.ChromeMetadataPacket
             * @instance
             */
            ChromeMetadataPacket.prototype.enabledCategories = "";

            /**
             * Creates a new ChromeMetadataPacket instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeMetadataPacket
             * @static
             * @param {perfetto.protos.IChromeMetadataPacket=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeMetadataPacket} ChromeMetadataPacket instance
             */
            ChromeMetadataPacket.create = function create(properties) {
                return new ChromeMetadataPacket(properties);
            };

            /**
             * Encodes the specified ChromeMetadataPacket message. Does not implicitly {@link perfetto.protos.ChromeMetadataPacket.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeMetadataPacket
             * @static
             * @param {perfetto.protos.IChromeMetadataPacket} m ChromeMetadataPacket message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeMetadataPacket.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.backgroundTracingMetadata != null && Object.hasOwnProperty.call(m, "backgroundTracingMetadata"))
                    $root.perfetto.protos.BackgroundTracingMetadata.encode(m.backgroundTracingMetadata, w.uint32(10).fork()).ldelim();
                if (m.chromeVersionCode != null && Object.hasOwnProperty.call(m, "chromeVersionCode"))
                    w.uint32(16).int32(m.chromeVersionCode);
                if (m.enabledCategories != null && Object.hasOwnProperty.call(m, "enabledCategories"))
                    w.uint32(26).string(m.enabledCategories);
                return w;
            };

            /**
             * Encodes the specified ChromeMetadataPacket message, length delimited. Does not implicitly {@link perfetto.protos.ChromeMetadataPacket.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeMetadataPacket
             * @static
             * @param {perfetto.protos.IChromeMetadataPacket} message ChromeMetadataPacket message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeMetadataPacket.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeMetadataPacket message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeMetadataPacket
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeMetadataPacket} ChromeMetadataPacket
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeMetadataPacket.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeMetadataPacket();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.backgroundTracingMetadata = $root.perfetto.protos.BackgroundTracingMetadata.decode(r, r.uint32());
                        break;
                    case 2:
                        m.chromeVersionCode = r.int32();
                        break;
                    case 3:
                        m.enabledCategories = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeMetadataPacket message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeMetadataPacket
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeMetadataPacket} ChromeMetadataPacket
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeMetadataPacket.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeMetadataPacket message.
             * @function verify
             * @memberof perfetto.protos.ChromeMetadataPacket
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeMetadataPacket.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.backgroundTracingMetadata != null && m.hasOwnProperty("backgroundTracingMetadata")) {
                    {
                        var e = $root.perfetto.protos.BackgroundTracingMetadata.verify(m.backgroundTracingMetadata);
                        if (e)
                            return "backgroundTracingMetadata." + e;
                    }
                }
                if (m.chromeVersionCode != null && m.hasOwnProperty("chromeVersionCode")) {
                    if (!$util.isInteger(m.chromeVersionCode))
                        return "chromeVersionCode: integer expected";
                }
                if (m.enabledCategories != null && m.hasOwnProperty("enabledCategories")) {
                    if (!$util.isString(m.enabledCategories))
                        return "enabledCategories: string expected";
                }
                return null;
            };

            /**
             * Creates a ChromeMetadataPacket message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeMetadataPacket
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeMetadataPacket} ChromeMetadataPacket
             */
            ChromeMetadataPacket.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeMetadataPacket)
                    return d;
                var m = new $root.perfetto.protos.ChromeMetadataPacket();
                if (d.backgroundTracingMetadata != null) {
                    if (typeof d.backgroundTracingMetadata !== "object")
                        throw TypeError(".perfetto.protos.ChromeMetadataPacket.backgroundTracingMetadata: object expected");
                    m.backgroundTracingMetadata = $root.perfetto.protos.BackgroundTracingMetadata.fromObject(d.backgroundTracingMetadata);
                }
                if (d.chromeVersionCode != null) {
                    m.chromeVersionCode = d.chromeVersionCode | 0;
                }
                if (d.enabledCategories != null) {
                    m.enabledCategories = String(d.enabledCategories);
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeMetadataPacket message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeMetadataPacket
             * @static
             * @param {perfetto.protos.ChromeMetadataPacket} m ChromeMetadataPacket
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeMetadataPacket.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.backgroundTracingMetadata = null;
                    d.chromeVersionCode = 0;
                    d.enabledCategories = "";
                }
                if (m.backgroundTracingMetadata != null && m.hasOwnProperty("backgroundTracingMetadata")) {
                    d.backgroundTracingMetadata = $root.perfetto.protos.BackgroundTracingMetadata.toObject(m.backgroundTracingMetadata, o);
                }
                if (m.chromeVersionCode != null && m.hasOwnProperty("chromeVersionCode")) {
                    d.chromeVersionCode = m.chromeVersionCode;
                }
                if (m.enabledCategories != null && m.hasOwnProperty("enabledCategories")) {
                    d.enabledCategories = m.enabledCategories;
                }
                return d;
            };

            /**
             * Converts this ChromeMetadataPacket to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeMetadataPacket
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeMetadataPacket.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ChromeMetadataPacket;
        })();

        protos.BackgroundTracingMetadata = (function() {

            /**
             * Properties of a BackgroundTracingMetadata.
             * @memberof perfetto.protos
             * @interface IBackgroundTracingMetadata
             * @property {perfetto.protos.BackgroundTracingMetadata.ITriggerRule|null} [triggeredRule] BackgroundTracingMetadata triggeredRule
             * @property {Array.<perfetto.protos.BackgroundTracingMetadata.ITriggerRule>|null} [activeRules] BackgroundTracingMetadata activeRules
             */

            /**
             * Constructs a new BackgroundTracingMetadata.
             * @memberof perfetto.protos
             * @classdesc Represents a BackgroundTracingMetadata.
             * @implements IBackgroundTracingMetadata
             * @constructor
             * @param {perfetto.protos.IBackgroundTracingMetadata=} [p] Properties to set
             */
            function BackgroundTracingMetadata(p) {
                this.activeRules = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BackgroundTracingMetadata triggeredRule.
             * @member {perfetto.protos.BackgroundTracingMetadata.ITriggerRule|null|undefined} triggeredRule
             * @memberof perfetto.protos.BackgroundTracingMetadata
             * @instance
             */
            BackgroundTracingMetadata.prototype.triggeredRule = null;

            /**
             * BackgroundTracingMetadata activeRules.
             * @member {Array.<perfetto.protos.BackgroundTracingMetadata.ITriggerRule>} activeRules
             * @memberof perfetto.protos.BackgroundTracingMetadata
             * @instance
             */
            BackgroundTracingMetadata.prototype.activeRules = $util.emptyArray;

            /**
             * Creates a new BackgroundTracingMetadata instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BackgroundTracingMetadata
             * @static
             * @param {perfetto.protos.IBackgroundTracingMetadata=} [properties] Properties to set
             * @returns {perfetto.protos.BackgroundTracingMetadata} BackgroundTracingMetadata instance
             */
            BackgroundTracingMetadata.create = function create(properties) {
                return new BackgroundTracingMetadata(properties);
            };

            /**
             * Encodes the specified BackgroundTracingMetadata message. Does not implicitly {@link perfetto.protos.BackgroundTracingMetadata.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BackgroundTracingMetadata
             * @static
             * @param {perfetto.protos.IBackgroundTracingMetadata} m BackgroundTracingMetadata message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BackgroundTracingMetadata.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.triggeredRule != null && Object.hasOwnProperty.call(m, "triggeredRule"))
                    $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.encode(m.triggeredRule, w.uint32(10).fork()).ldelim();
                if (m.activeRules != null && m.activeRules.length) {
                    for (var i = 0; i < m.activeRules.length; ++i)
                        $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.encode(m.activeRules[i], w.uint32(18).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified BackgroundTracingMetadata message, length delimited. Does not implicitly {@link perfetto.protos.BackgroundTracingMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BackgroundTracingMetadata
             * @static
             * @param {perfetto.protos.IBackgroundTracingMetadata} message BackgroundTracingMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BackgroundTracingMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BackgroundTracingMetadata message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BackgroundTracingMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BackgroundTracingMetadata} BackgroundTracingMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BackgroundTracingMetadata.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BackgroundTracingMetadata();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.triggeredRule = $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.decode(r, r.uint32());
                        break;
                    case 2:
                        if (!(m.activeRules && m.activeRules.length))
                            m.activeRules = [];
                        m.activeRules.push($root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BackgroundTracingMetadata message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BackgroundTracingMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BackgroundTracingMetadata} BackgroundTracingMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BackgroundTracingMetadata.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BackgroundTracingMetadata message.
             * @function verify
             * @memberof perfetto.protos.BackgroundTracingMetadata
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BackgroundTracingMetadata.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.triggeredRule != null && m.hasOwnProperty("triggeredRule")) {
                    {
                        var e = $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.verify(m.triggeredRule);
                        if (e)
                            return "triggeredRule." + e;
                    }
                }
                if (m.activeRules != null && m.hasOwnProperty("activeRules")) {
                    if (!Array.isArray(m.activeRules))
                        return "activeRules: array expected";
                    for (var i = 0; i < m.activeRules.length; ++i) {
                        {
                            var e = $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.verify(m.activeRules[i]);
                            if (e)
                                return "activeRules." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a BackgroundTracingMetadata message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BackgroundTracingMetadata
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BackgroundTracingMetadata} BackgroundTracingMetadata
             */
            BackgroundTracingMetadata.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BackgroundTracingMetadata)
                    return d;
                var m = new $root.perfetto.protos.BackgroundTracingMetadata();
                if (d.triggeredRule != null) {
                    if (typeof d.triggeredRule !== "object")
                        throw TypeError(".perfetto.protos.BackgroundTracingMetadata.triggeredRule: object expected");
                    m.triggeredRule = $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.fromObject(d.triggeredRule);
                }
                if (d.activeRules) {
                    if (!Array.isArray(d.activeRules))
                        throw TypeError(".perfetto.protos.BackgroundTracingMetadata.activeRules: array expected");
                    m.activeRules = [];
                    for (var i = 0; i < d.activeRules.length; ++i) {
                        if (typeof d.activeRules[i] !== "object")
                            throw TypeError(".perfetto.protos.BackgroundTracingMetadata.activeRules: object expected");
                        m.activeRules[i] = $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.fromObject(d.activeRules[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a BackgroundTracingMetadata message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BackgroundTracingMetadata
             * @static
             * @param {perfetto.protos.BackgroundTracingMetadata} m BackgroundTracingMetadata
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BackgroundTracingMetadata.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.activeRules = [];
                }
                if (o.defaults) {
                    d.triggeredRule = null;
                }
                if (m.triggeredRule != null && m.hasOwnProperty("triggeredRule")) {
                    d.triggeredRule = $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.toObject(m.triggeredRule, o);
                }
                if (m.activeRules && m.activeRules.length) {
                    d.activeRules = [];
                    for (var j = 0; j < m.activeRules.length; ++j) {
                        d.activeRules[j] = $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.toObject(m.activeRules[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this BackgroundTracingMetadata to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BackgroundTracingMetadata
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BackgroundTracingMetadata.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            BackgroundTracingMetadata.TriggerRule = (function() {

                /**
                 * Properties of a TriggerRule.
                 * @memberof perfetto.protos.BackgroundTracingMetadata
                 * @interface ITriggerRule
                 * @property {perfetto.protos.BackgroundTracingMetadata.TriggerRule.TriggerType|null} [triggerType] TriggerRule triggerType
                 * @property {perfetto.protos.BackgroundTracingMetadata.TriggerRule.IHistogramRule|null} [histogramRule] TriggerRule histogramRule
                 * @property {perfetto.protos.BackgroundTracingMetadata.TriggerRule.INamedRule|null} [namedRule] TriggerRule namedRule
                 */

                /**
                 * Constructs a new TriggerRule.
                 * @memberof perfetto.protos.BackgroundTracingMetadata
                 * @classdesc Represents a TriggerRule.
                 * @implements ITriggerRule
                 * @constructor
                 * @param {perfetto.protos.BackgroundTracingMetadata.ITriggerRule=} [p] Properties to set
                 */
                function TriggerRule(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * TriggerRule triggerType.
                 * @member {perfetto.protos.BackgroundTracingMetadata.TriggerRule.TriggerType} triggerType
                 * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule
                 * @instance
                 */
                TriggerRule.prototype.triggerType = 0;

                /**
                 * TriggerRule histogramRule.
                 * @member {perfetto.protos.BackgroundTracingMetadata.TriggerRule.IHistogramRule|null|undefined} histogramRule
                 * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule
                 * @instance
                 */
                TriggerRule.prototype.histogramRule = null;

                /**
                 * TriggerRule namedRule.
                 * @member {perfetto.protos.BackgroundTracingMetadata.TriggerRule.INamedRule|null|undefined} namedRule
                 * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule
                 * @instance
                 */
                TriggerRule.prototype.namedRule = null;

                /**
                 * Creates a new TriggerRule instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule
                 * @static
                 * @param {perfetto.protos.BackgroundTracingMetadata.ITriggerRule=} [properties] Properties to set
                 * @returns {perfetto.protos.BackgroundTracingMetadata.TriggerRule} TriggerRule instance
                 */
                TriggerRule.create = function create(properties) {
                    return new TriggerRule(properties);
                };

                /**
                 * Encodes the specified TriggerRule message. Does not implicitly {@link perfetto.protos.BackgroundTracingMetadata.TriggerRule.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule
                 * @static
                 * @param {perfetto.protos.BackgroundTracingMetadata.ITriggerRule} m TriggerRule message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                TriggerRule.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.triggerType != null && Object.hasOwnProperty.call(m, "triggerType"))
                        w.uint32(8).int32(m.triggerType);
                    if (m.histogramRule != null && Object.hasOwnProperty.call(m, "histogramRule"))
                        $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule.encode(m.histogramRule, w.uint32(18).fork()).ldelim();
                    if (m.namedRule != null && Object.hasOwnProperty.call(m, "namedRule"))
                        $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule.encode(m.namedRule, w.uint32(26).fork()).ldelim();
                    return w;
                };

                /**
                 * Encodes the specified TriggerRule message, length delimited. Does not implicitly {@link perfetto.protos.BackgroundTracingMetadata.TriggerRule.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule
                 * @static
                 * @param {perfetto.protos.BackgroundTracingMetadata.ITriggerRule} message TriggerRule message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                TriggerRule.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a TriggerRule message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.BackgroundTracingMetadata.TriggerRule} TriggerRule
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                TriggerRule.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.triggerType = r.int32();
                            break;
                        case 2:
                            m.histogramRule = $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule.decode(r, r.uint32());
                            break;
                        case 3:
                            m.namedRule = $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule.decode(r, r.uint32());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a TriggerRule message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.BackgroundTracingMetadata.TriggerRule} TriggerRule
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                TriggerRule.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a TriggerRule message.
                 * @function verify
                 * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                TriggerRule.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.triggerType != null && m.hasOwnProperty("triggerType")) {
                        switch (m.triggerType) {
                        default:
                            return "triggerType: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                            break;
                        }
                    }
                    if (m.histogramRule != null && m.hasOwnProperty("histogramRule")) {
                        {
                            var e = $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule.verify(m.histogramRule);
                            if (e)
                                return "histogramRule." + e;
                        }
                    }
                    if (m.namedRule != null && m.hasOwnProperty("namedRule")) {
                        {
                            var e = $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule.verify(m.namedRule);
                            if (e)
                                return "namedRule." + e;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a TriggerRule message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.BackgroundTracingMetadata.TriggerRule} TriggerRule
                 */
                TriggerRule.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule)
                        return d;
                    var m = new $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule();
                    switch (d.triggerType) {
                    case "TRIGGER_UNSPECIFIED":
                    case 0:
                        m.triggerType = 0;
                        break;
                    case "MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE":
                    case 1:
                        m.triggerType = 1;
                        break;
                    case "MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED":
                    case 2:
                        m.triggerType = 2;
                        break;
                    }
                    if (d.histogramRule != null) {
                        if (typeof d.histogramRule !== "object")
                            throw TypeError(".perfetto.protos.BackgroundTracingMetadata.TriggerRule.histogramRule: object expected");
                        m.histogramRule = $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule.fromObject(d.histogramRule);
                    }
                    if (d.namedRule != null) {
                        if (typeof d.namedRule !== "object")
                            throw TypeError(".perfetto.protos.BackgroundTracingMetadata.TriggerRule.namedRule: object expected");
                        m.namedRule = $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule.fromObject(d.namedRule);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a TriggerRule message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule
                 * @static
                 * @param {perfetto.protos.BackgroundTracingMetadata.TriggerRule} m TriggerRule
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                TriggerRule.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.triggerType = o.enums === String ? "TRIGGER_UNSPECIFIED" : 0;
                        d.histogramRule = null;
                        d.namedRule = null;
                    }
                    if (m.triggerType != null && m.hasOwnProperty("triggerType")) {
                        d.triggerType = o.enums === String ? $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.TriggerType[m.triggerType] : m.triggerType;
                    }
                    if (m.histogramRule != null && m.hasOwnProperty("histogramRule")) {
                        d.histogramRule = $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule.toObject(m.histogramRule, o);
                    }
                    if (m.namedRule != null && m.hasOwnProperty("namedRule")) {
                        d.namedRule = $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule.toObject(m.namedRule, o);
                    }
                    return d;
                };

                /**
                 * Converts this TriggerRule to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                TriggerRule.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                /**
                 * TriggerType enum.
                 * @name perfetto.protos.BackgroundTracingMetadata.TriggerRule.TriggerType
                 * @enum {number}
                 * @property {number} TRIGGER_UNSPECIFIED=0 TRIGGER_UNSPECIFIED value
                 * @property {number} MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE=1 MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE value
                 * @property {number} MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED=2 MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED value
                 */
                TriggerRule.TriggerType = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "TRIGGER_UNSPECIFIED"] = 0;
                    values[valuesById[1] = "MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE"] = 1;
                    values[valuesById[2] = "MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED"] = 2;
                    return values;
                })();

                TriggerRule.HistogramRule = (function() {

                    /**
                     * Properties of a HistogramRule.
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule
                     * @interface IHistogramRule
                     * @property {number|null} [histogramNameHash] HistogramRule histogramNameHash
                     * @property {number|null} [histogramMinTrigger] HistogramRule histogramMinTrigger
                     * @property {number|null} [histogramMaxTrigger] HistogramRule histogramMaxTrigger
                     */

                    /**
                     * Constructs a new HistogramRule.
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule
                     * @classdesc Represents a HistogramRule.
                     * @implements IHistogramRule
                     * @constructor
                     * @param {perfetto.protos.BackgroundTracingMetadata.TriggerRule.IHistogramRule=} [p] Properties to set
                     */
                    function HistogramRule(p) {
                        if (p)
                            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                                if (p[ks[i]] != null)
                                    this[ks[i]] = p[ks[i]];
                    }

                    /**
                     * HistogramRule histogramNameHash.
                     * @member {number} histogramNameHash
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule
                     * @instance
                     */
                    HistogramRule.prototype.histogramNameHash = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                    /**
                     * HistogramRule histogramMinTrigger.
                     * @member {number} histogramMinTrigger
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule
                     * @instance
                     */
                    HistogramRule.prototype.histogramMinTrigger = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                    /**
                     * HistogramRule histogramMaxTrigger.
                     * @member {number} histogramMaxTrigger
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule
                     * @instance
                     */
                    HistogramRule.prototype.histogramMaxTrigger = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                    /**
                     * Creates a new HistogramRule instance using the specified properties.
                     * @function create
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule
                     * @static
                     * @param {perfetto.protos.BackgroundTracingMetadata.TriggerRule.IHistogramRule=} [properties] Properties to set
                     * @returns {perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule} HistogramRule instance
                     */
                    HistogramRule.create = function create(properties) {
                        return new HistogramRule(properties);
                    };

                    /**
                     * Encodes the specified HistogramRule message. Does not implicitly {@link perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule.verify|verify} messages.
                     * @function encode
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule
                     * @static
                     * @param {perfetto.protos.BackgroundTracingMetadata.TriggerRule.IHistogramRule} m HistogramRule message or plain object to encode
                     * @param {$protobuf.Writer} [w] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    HistogramRule.encode = function encode(m, w) {
                        if (!w)
                            w = $Writer.create();
                        if (m.histogramNameHash != null && Object.hasOwnProperty.call(m, "histogramNameHash"))
                            w.uint32(9).fixed64(m.histogramNameHash);
                        if (m.histogramMinTrigger != null && Object.hasOwnProperty.call(m, "histogramMinTrigger"))
                            w.uint32(16).int64(m.histogramMinTrigger);
                        if (m.histogramMaxTrigger != null && Object.hasOwnProperty.call(m, "histogramMaxTrigger"))
                            w.uint32(24).int64(m.histogramMaxTrigger);
                        return w;
                    };

                    /**
                     * Encodes the specified HistogramRule message, length delimited. Does not implicitly {@link perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule
                     * @static
                     * @param {perfetto.protos.BackgroundTracingMetadata.TriggerRule.IHistogramRule} message HistogramRule message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    HistogramRule.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a HistogramRule message from the specified reader or buffer.
                     * @function decode
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                     * @param {number} [l] Message length if known beforehand
                     * @returns {perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule} HistogramRule
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    HistogramRule.decode = function decode(r, l) {
                        if (!(r instanceof $Reader))
                            r = $Reader.create(r);
                        var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule();
                        while (r.pos < c) {
                            var t = r.uint32();
                            switch (t >>> 3) {
                            case 1:
                                m.histogramNameHash = r.fixed64();
                                break;
                            case 2:
                                m.histogramMinTrigger = r.int64();
                                break;
                            case 3:
                                m.histogramMaxTrigger = r.int64();
                                break;
                            default:
                                r.skipType(t & 7);
                                break;
                            }
                        }
                        return m;
                    };

                    /**
                     * Decodes a HistogramRule message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule} HistogramRule
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    HistogramRule.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a HistogramRule message.
                     * @function verify
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule
                     * @static
                     * @param {Object.<string,*>} m Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    HistogramRule.verify = function verify(m) {
                        if (typeof m !== "object" || m === null)
                            return "object expected";
                        if (m.histogramNameHash != null && m.hasOwnProperty("histogramNameHash")) {
                            if (!$util.isInteger(m.histogramNameHash) && !(m.histogramNameHash && $util.isInteger(m.histogramNameHash.low) && $util.isInteger(m.histogramNameHash.high)))
                                return "histogramNameHash: integer|Long expected";
                        }
                        if (m.histogramMinTrigger != null && m.hasOwnProperty("histogramMinTrigger")) {
                            if (!$util.isInteger(m.histogramMinTrigger) && !(m.histogramMinTrigger && $util.isInteger(m.histogramMinTrigger.low) && $util.isInteger(m.histogramMinTrigger.high)))
                                return "histogramMinTrigger: integer|Long expected";
                        }
                        if (m.histogramMaxTrigger != null && m.hasOwnProperty("histogramMaxTrigger")) {
                            if (!$util.isInteger(m.histogramMaxTrigger) && !(m.histogramMaxTrigger && $util.isInteger(m.histogramMaxTrigger.low) && $util.isInteger(m.histogramMaxTrigger.high)))
                                return "histogramMaxTrigger: integer|Long expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a HistogramRule message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule
                     * @static
                     * @param {Object.<string,*>} d Plain object
                     * @returns {perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule} HistogramRule
                     */
                    HistogramRule.fromObject = function fromObject(d) {
                        if (d instanceof $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule)
                            return d;
                        var m = new $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule();
                        if (d.histogramNameHash != null) {
                            if ($util.Long)
                                (m.histogramNameHash = $util.Long.fromValue(d.histogramNameHash)).unsigned = false;
                            else if (typeof d.histogramNameHash === "string")
                                m.histogramNameHash = parseInt(d.histogramNameHash, 10);
                            else if (typeof d.histogramNameHash === "number")
                                m.histogramNameHash = d.histogramNameHash;
                            else if (typeof d.histogramNameHash === "object")
                                m.histogramNameHash = new $util.LongBits(d.histogramNameHash.low >>> 0, d.histogramNameHash.high >>> 0).toNumber();
                        }
                        if (d.histogramMinTrigger != null) {
                            if ($util.Long)
                                (m.histogramMinTrigger = $util.Long.fromValue(d.histogramMinTrigger)).unsigned = false;
                            else if (typeof d.histogramMinTrigger === "string")
                                m.histogramMinTrigger = parseInt(d.histogramMinTrigger, 10);
                            else if (typeof d.histogramMinTrigger === "number")
                                m.histogramMinTrigger = d.histogramMinTrigger;
                            else if (typeof d.histogramMinTrigger === "object")
                                m.histogramMinTrigger = new $util.LongBits(d.histogramMinTrigger.low >>> 0, d.histogramMinTrigger.high >>> 0).toNumber();
                        }
                        if (d.histogramMaxTrigger != null) {
                            if ($util.Long)
                                (m.histogramMaxTrigger = $util.Long.fromValue(d.histogramMaxTrigger)).unsigned = false;
                            else if (typeof d.histogramMaxTrigger === "string")
                                m.histogramMaxTrigger = parseInt(d.histogramMaxTrigger, 10);
                            else if (typeof d.histogramMaxTrigger === "number")
                                m.histogramMaxTrigger = d.histogramMaxTrigger;
                            else if (typeof d.histogramMaxTrigger === "object")
                                m.histogramMaxTrigger = new $util.LongBits(d.histogramMaxTrigger.low >>> 0, d.histogramMaxTrigger.high >>> 0).toNumber();
                        }
                        return m;
                    };

                    /**
                     * Creates a plain object from a HistogramRule message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule
                     * @static
                     * @param {perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule} m HistogramRule
                     * @param {$protobuf.IConversionOptions} [o] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    HistogramRule.toObject = function toObject(m, o) {
                        if (!o)
                            o = {};
                        var d = {};
                        if (o.defaults) {
                            if ($util.Long) {
                                var n = new $util.Long(0, 0, false);
                                d.histogramNameHash = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                            } else
                                d.histogramNameHash = o.longs === String ? "0" : 0;
                            if ($util.Long) {
                                var n = new $util.Long(0, 0, false);
                                d.histogramMinTrigger = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                            } else
                                d.histogramMinTrigger = o.longs === String ? "0" : 0;
                            if ($util.Long) {
                                var n = new $util.Long(0, 0, false);
                                d.histogramMaxTrigger = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                            } else
                                d.histogramMaxTrigger = o.longs === String ? "0" : 0;
                        }
                        if (m.histogramNameHash != null && m.hasOwnProperty("histogramNameHash")) {
                            if (typeof m.histogramNameHash === "number")
                                d.histogramNameHash = o.longs === String ? String(m.histogramNameHash) : m.histogramNameHash;
                            else
                                d.histogramNameHash = o.longs === String ? $util.Long.prototype.toString.call(m.histogramNameHash) : o.longs === Number ? new $util.LongBits(m.histogramNameHash.low >>> 0, m.histogramNameHash.high >>> 0).toNumber() : m.histogramNameHash;
                        }
                        if (m.histogramMinTrigger != null && m.hasOwnProperty("histogramMinTrigger")) {
                            if (typeof m.histogramMinTrigger === "number")
                                d.histogramMinTrigger = o.longs === String ? String(m.histogramMinTrigger) : m.histogramMinTrigger;
                            else
                                d.histogramMinTrigger = o.longs === String ? $util.Long.prototype.toString.call(m.histogramMinTrigger) : o.longs === Number ? new $util.LongBits(m.histogramMinTrigger.low >>> 0, m.histogramMinTrigger.high >>> 0).toNumber() : m.histogramMinTrigger;
                        }
                        if (m.histogramMaxTrigger != null && m.hasOwnProperty("histogramMaxTrigger")) {
                            if (typeof m.histogramMaxTrigger === "number")
                                d.histogramMaxTrigger = o.longs === String ? String(m.histogramMaxTrigger) : m.histogramMaxTrigger;
                            else
                                d.histogramMaxTrigger = o.longs === String ? $util.Long.prototype.toString.call(m.histogramMaxTrigger) : o.longs === Number ? new $util.LongBits(m.histogramMaxTrigger.low >>> 0, m.histogramMaxTrigger.high >>> 0).toNumber() : m.histogramMaxTrigger;
                        }
                        return d;
                    };

                    /**
                     * Converts this HistogramRule to JSON.
                     * @function toJSON
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule.HistogramRule
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    HistogramRule.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                    };

                    return HistogramRule;
                })();

                TriggerRule.NamedRule = (function() {

                    /**
                     * Properties of a NamedRule.
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule
                     * @interface INamedRule
                     * @property {perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule.EventType|null} [eventType] NamedRule eventType
                     * @property {number|null} [contentTriggerNameHash] NamedRule contentTriggerNameHash
                     */

                    /**
                     * Constructs a new NamedRule.
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule
                     * @classdesc Represents a NamedRule.
                     * @implements INamedRule
                     * @constructor
                     * @param {perfetto.protos.BackgroundTracingMetadata.TriggerRule.INamedRule=} [p] Properties to set
                     */
                    function NamedRule(p) {
                        if (p)
                            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                                if (p[ks[i]] != null)
                                    this[ks[i]] = p[ks[i]];
                    }

                    /**
                     * NamedRule eventType.
                     * @member {perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule.EventType} eventType
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule
                     * @instance
                     */
                    NamedRule.prototype.eventType = 0;

                    /**
                     * NamedRule contentTriggerNameHash.
                     * @member {number} contentTriggerNameHash
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule
                     * @instance
                     */
                    NamedRule.prototype.contentTriggerNameHash = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                    /**
                     * Creates a new NamedRule instance using the specified properties.
                     * @function create
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule
                     * @static
                     * @param {perfetto.protos.BackgroundTracingMetadata.TriggerRule.INamedRule=} [properties] Properties to set
                     * @returns {perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule} NamedRule instance
                     */
                    NamedRule.create = function create(properties) {
                        return new NamedRule(properties);
                    };

                    /**
                     * Encodes the specified NamedRule message. Does not implicitly {@link perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule.verify|verify} messages.
                     * @function encode
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule
                     * @static
                     * @param {perfetto.protos.BackgroundTracingMetadata.TriggerRule.INamedRule} m NamedRule message or plain object to encode
                     * @param {$protobuf.Writer} [w] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    NamedRule.encode = function encode(m, w) {
                        if (!w)
                            w = $Writer.create();
                        if (m.eventType != null && Object.hasOwnProperty.call(m, "eventType"))
                            w.uint32(8).int32(m.eventType);
                        if (m.contentTriggerNameHash != null && Object.hasOwnProperty.call(m, "contentTriggerNameHash"))
                            w.uint32(17).fixed64(m.contentTriggerNameHash);
                        return w;
                    };

                    /**
                     * Encodes the specified NamedRule message, length delimited. Does not implicitly {@link perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule
                     * @static
                     * @param {perfetto.protos.BackgroundTracingMetadata.TriggerRule.INamedRule} message NamedRule message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    NamedRule.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a NamedRule message from the specified reader or buffer.
                     * @function decode
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                     * @param {number} [l] Message length if known beforehand
                     * @returns {perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule} NamedRule
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    NamedRule.decode = function decode(r, l) {
                        if (!(r instanceof $Reader))
                            r = $Reader.create(r);
                        var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule();
                        while (r.pos < c) {
                            var t = r.uint32();
                            switch (t >>> 3) {
                            case 1:
                                m.eventType = r.int32();
                                break;
                            case 2:
                                m.contentTriggerNameHash = r.fixed64();
                                break;
                            default:
                                r.skipType(t & 7);
                                break;
                            }
                        }
                        return m;
                    };

                    /**
                     * Decodes a NamedRule message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule} NamedRule
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    NamedRule.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a NamedRule message.
                     * @function verify
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule
                     * @static
                     * @param {Object.<string,*>} m Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    NamedRule.verify = function verify(m) {
                        if (typeof m !== "object" || m === null)
                            return "object expected";
                        if (m.eventType != null && m.hasOwnProperty("eventType")) {
                            switch (m.eventType) {
                            default:
                                return "eventType: enum value expected";
                            case 0:
                            case 1:
                            case 2:
                            case 3:
                            case 4:
                            case 5:
                            case 1000:
                                break;
                            }
                        }
                        if (m.contentTriggerNameHash != null && m.hasOwnProperty("contentTriggerNameHash")) {
                            if (!$util.isInteger(m.contentTriggerNameHash) && !(m.contentTriggerNameHash && $util.isInteger(m.contentTriggerNameHash.low) && $util.isInteger(m.contentTriggerNameHash.high)))
                                return "contentTriggerNameHash: integer|Long expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a NamedRule message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule
                     * @static
                     * @param {Object.<string,*>} d Plain object
                     * @returns {perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule} NamedRule
                     */
                    NamedRule.fromObject = function fromObject(d) {
                        if (d instanceof $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule)
                            return d;
                        var m = new $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule();
                        switch (d.eventType) {
                        case "UNSPECIFIED":
                        case 0:
                            m.eventType = 0;
                            break;
                        case "SESSION_RESTORE":
                        case 1:
                            m.eventType = 1;
                            break;
                        case "NAVIGATION":
                        case 2:
                            m.eventType = 2;
                            break;
                        case "STARTUP":
                        case 3:
                            m.eventType = 3;
                            break;
                        case "REACHED_CODE":
                        case 4:
                            m.eventType = 4;
                            break;
                        case "CONTENT_TRIGGER":
                        case 5:
                            m.eventType = 5;
                            break;
                        case "TEST_RULE":
                        case 1000:
                            m.eventType = 1000;
                            break;
                        }
                        if (d.contentTriggerNameHash != null) {
                            if ($util.Long)
                                (m.contentTriggerNameHash = $util.Long.fromValue(d.contentTriggerNameHash)).unsigned = false;
                            else if (typeof d.contentTriggerNameHash === "string")
                                m.contentTriggerNameHash = parseInt(d.contentTriggerNameHash, 10);
                            else if (typeof d.contentTriggerNameHash === "number")
                                m.contentTriggerNameHash = d.contentTriggerNameHash;
                            else if (typeof d.contentTriggerNameHash === "object")
                                m.contentTriggerNameHash = new $util.LongBits(d.contentTriggerNameHash.low >>> 0, d.contentTriggerNameHash.high >>> 0).toNumber();
                        }
                        return m;
                    };

                    /**
                     * Creates a plain object from a NamedRule message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule
                     * @static
                     * @param {perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule} m NamedRule
                     * @param {$protobuf.IConversionOptions} [o] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    NamedRule.toObject = function toObject(m, o) {
                        if (!o)
                            o = {};
                        var d = {};
                        if (o.defaults) {
                            d.eventType = o.enums === String ? "UNSPECIFIED" : 0;
                            if ($util.Long) {
                                var n = new $util.Long(0, 0, false);
                                d.contentTriggerNameHash = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                            } else
                                d.contentTriggerNameHash = o.longs === String ? "0" : 0;
                        }
                        if (m.eventType != null && m.hasOwnProperty("eventType")) {
                            d.eventType = o.enums === String ? $root.perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule.EventType[m.eventType] : m.eventType;
                        }
                        if (m.contentTriggerNameHash != null && m.hasOwnProperty("contentTriggerNameHash")) {
                            if (typeof m.contentTriggerNameHash === "number")
                                d.contentTriggerNameHash = o.longs === String ? String(m.contentTriggerNameHash) : m.contentTriggerNameHash;
                            else
                                d.contentTriggerNameHash = o.longs === String ? $util.Long.prototype.toString.call(m.contentTriggerNameHash) : o.longs === Number ? new $util.LongBits(m.contentTriggerNameHash.low >>> 0, m.contentTriggerNameHash.high >>> 0).toNumber() : m.contentTriggerNameHash;
                        }
                        return d;
                    };

                    /**
                     * Converts this NamedRule to JSON.
                     * @function toJSON
                     * @memberof perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    NamedRule.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                    };

                    /**
                     * EventType enum.
                     * @name perfetto.protos.BackgroundTracingMetadata.TriggerRule.NamedRule.EventType
                     * @enum {number}
                     * @property {number} UNSPECIFIED=0 UNSPECIFIED value
                     * @property {number} SESSION_RESTORE=1 SESSION_RESTORE value
                     * @property {number} NAVIGATION=2 NAVIGATION value
                     * @property {number} STARTUP=3 STARTUP value
                     * @property {number} REACHED_CODE=4 REACHED_CODE value
                     * @property {number} CONTENT_TRIGGER=5 CONTENT_TRIGGER value
                     * @property {number} TEST_RULE=1000 TEST_RULE value
                     */
                    NamedRule.EventType = (function() {
                        var valuesById = {}, values = Object.create(valuesById);
                        values[valuesById[0] = "UNSPECIFIED"] = 0;
                        values[valuesById[1] = "SESSION_RESTORE"] = 1;
                        values[valuesById[2] = "NAVIGATION"] = 2;
                        values[valuesById[3] = "STARTUP"] = 3;
                        values[valuesById[4] = "REACHED_CODE"] = 4;
                        values[valuesById[5] = "CONTENT_TRIGGER"] = 5;
                        values[valuesById[1000] = "TEST_RULE"] = 1000;
                        return values;
                    })();

                    return NamedRule;
                })();

                return TriggerRule;
            })();

            return BackgroundTracingMetadata;
        })();

        protos.ChromeTracedValue = (function() {

            /**
             * Properties of a ChromeTracedValue.
             * @memberof perfetto.protos
             * @interface IChromeTracedValue
             * @property {perfetto.protos.ChromeTracedValue.NestedType|null} [nestedType] ChromeTracedValue nestedType
             * @property {Array.<string>|null} [dictKeys] ChromeTracedValue dictKeys
             * @property {Array.<perfetto.protos.IChromeTracedValue>|null} [dictValues] ChromeTracedValue dictValues
             * @property {Array.<perfetto.protos.IChromeTracedValue>|null} [arrayValues] ChromeTracedValue arrayValues
             * @property {number|null} [intValue] ChromeTracedValue intValue
             * @property {number|null} [doubleValue] ChromeTracedValue doubleValue
             * @property {boolean|null} [boolValue] ChromeTracedValue boolValue
             * @property {string|null} [stringValue] ChromeTracedValue stringValue
             */

            /**
             * Constructs a new ChromeTracedValue.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeTracedValue.
             * @implements IChromeTracedValue
             * @constructor
             * @param {perfetto.protos.IChromeTracedValue=} [p] Properties to set
             */
            function ChromeTracedValue(p) {
                this.dictKeys = [];
                this.dictValues = [];
                this.arrayValues = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeTracedValue nestedType.
             * @member {perfetto.protos.ChromeTracedValue.NestedType} nestedType
             * @memberof perfetto.protos.ChromeTracedValue
             * @instance
             */
            ChromeTracedValue.prototype.nestedType = 0;

            /**
             * ChromeTracedValue dictKeys.
             * @member {Array.<string>} dictKeys
             * @memberof perfetto.protos.ChromeTracedValue
             * @instance
             */
            ChromeTracedValue.prototype.dictKeys = $util.emptyArray;

            /**
             * ChromeTracedValue dictValues.
             * @member {Array.<perfetto.protos.IChromeTracedValue>} dictValues
             * @memberof perfetto.protos.ChromeTracedValue
             * @instance
             */
            ChromeTracedValue.prototype.dictValues = $util.emptyArray;

            /**
             * ChromeTracedValue arrayValues.
             * @member {Array.<perfetto.protos.IChromeTracedValue>} arrayValues
             * @memberof perfetto.protos.ChromeTracedValue
             * @instance
             */
            ChromeTracedValue.prototype.arrayValues = $util.emptyArray;

            /**
             * ChromeTracedValue intValue.
             * @member {number} intValue
             * @memberof perfetto.protos.ChromeTracedValue
             * @instance
             */
            ChromeTracedValue.prototype.intValue = 0;

            /**
             * ChromeTracedValue doubleValue.
             * @member {number} doubleValue
             * @memberof perfetto.protos.ChromeTracedValue
             * @instance
             */
            ChromeTracedValue.prototype.doubleValue = 0;

            /**
             * ChromeTracedValue boolValue.
             * @member {boolean} boolValue
             * @memberof perfetto.protos.ChromeTracedValue
             * @instance
             */
            ChromeTracedValue.prototype.boolValue = false;

            /**
             * ChromeTracedValue stringValue.
             * @member {string} stringValue
             * @memberof perfetto.protos.ChromeTracedValue
             * @instance
             */
            ChromeTracedValue.prototype.stringValue = "";

            /**
             * Creates a new ChromeTracedValue instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeTracedValue
             * @static
             * @param {perfetto.protos.IChromeTracedValue=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeTracedValue} ChromeTracedValue instance
             */
            ChromeTracedValue.create = function create(properties) {
                return new ChromeTracedValue(properties);
            };

            /**
             * Encodes the specified ChromeTracedValue message. Does not implicitly {@link perfetto.protos.ChromeTracedValue.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeTracedValue
             * @static
             * @param {perfetto.protos.IChromeTracedValue} m ChromeTracedValue message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeTracedValue.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.nestedType != null && Object.hasOwnProperty.call(m, "nestedType"))
                    w.uint32(8).int32(m.nestedType);
                if (m.dictKeys != null && m.dictKeys.length) {
                    for (var i = 0; i < m.dictKeys.length; ++i)
                        w.uint32(18).string(m.dictKeys[i]);
                }
                if (m.dictValues != null && m.dictValues.length) {
                    for (var i = 0; i < m.dictValues.length; ++i)
                        $root.perfetto.protos.ChromeTracedValue.encode(m.dictValues[i], w.uint32(26).fork()).ldelim();
                }
                if (m.arrayValues != null && m.arrayValues.length) {
                    for (var i = 0; i < m.arrayValues.length; ++i)
                        $root.perfetto.protos.ChromeTracedValue.encode(m.arrayValues[i], w.uint32(34).fork()).ldelim();
                }
                if (m.intValue != null && Object.hasOwnProperty.call(m, "intValue"))
                    w.uint32(40).int32(m.intValue);
                if (m.doubleValue != null && Object.hasOwnProperty.call(m, "doubleValue"))
                    w.uint32(49).double(m.doubleValue);
                if (m.boolValue != null && Object.hasOwnProperty.call(m, "boolValue"))
                    w.uint32(56).bool(m.boolValue);
                if (m.stringValue != null && Object.hasOwnProperty.call(m, "stringValue"))
                    w.uint32(66).string(m.stringValue);
                return w;
            };

            /**
             * Encodes the specified ChromeTracedValue message, length delimited. Does not implicitly {@link perfetto.protos.ChromeTracedValue.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeTracedValue
             * @static
             * @param {perfetto.protos.IChromeTracedValue} message ChromeTracedValue message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeTracedValue.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeTracedValue message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeTracedValue
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeTracedValue} ChromeTracedValue
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeTracedValue.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeTracedValue();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.nestedType = r.int32();
                        break;
                    case 2:
                        if (!(m.dictKeys && m.dictKeys.length))
                            m.dictKeys = [];
                        m.dictKeys.push(r.string());
                        break;
                    case 3:
                        if (!(m.dictValues && m.dictValues.length))
                            m.dictValues = [];
                        m.dictValues.push($root.perfetto.protos.ChromeTracedValue.decode(r, r.uint32()));
                        break;
                    case 4:
                        if (!(m.arrayValues && m.arrayValues.length))
                            m.arrayValues = [];
                        m.arrayValues.push($root.perfetto.protos.ChromeTracedValue.decode(r, r.uint32()));
                        break;
                    case 5:
                        m.intValue = r.int32();
                        break;
                    case 6:
                        m.doubleValue = r.double();
                        break;
                    case 7:
                        m.boolValue = r.bool();
                        break;
                    case 8:
                        m.stringValue = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeTracedValue message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeTracedValue
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeTracedValue} ChromeTracedValue
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeTracedValue.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeTracedValue message.
             * @function verify
             * @memberof perfetto.protos.ChromeTracedValue
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeTracedValue.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.nestedType != null && m.hasOwnProperty("nestedType")) {
                    switch (m.nestedType) {
                    default:
                        return "nestedType: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                }
                if (m.dictKeys != null && m.hasOwnProperty("dictKeys")) {
                    if (!Array.isArray(m.dictKeys))
                        return "dictKeys: array expected";
                    for (var i = 0; i < m.dictKeys.length; ++i) {
                        if (!$util.isString(m.dictKeys[i]))
                            return "dictKeys: string[] expected";
                    }
                }
                if (m.dictValues != null && m.hasOwnProperty("dictValues")) {
                    if (!Array.isArray(m.dictValues))
                        return "dictValues: array expected";
                    for (var i = 0; i < m.dictValues.length; ++i) {
                        {
                            var e = $root.perfetto.protos.ChromeTracedValue.verify(m.dictValues[i]);
                            if (e)
                                return "dictValues." + e;
                        }
                    }
                }
                if (m.arrayValues != null && m.hasOwnProperty("arrayValues")) {
                    if (!Array.isArray(m.arrayValues))
                        return "arrayValues: array expected";
                    for (var i = 0; i < m.arrayValues.length; ++i) {
                        {
                            var e = $root.perfetto.protos.ChromeTracedValue.verify(m.arrayValues[i]);
                            if (e)
                                return "arrayValues." + e;
                        }
                    }
                }
                if (m.intValue != null && m.hasOwnProperty("intValue")) {
                    if (!$util.isInteger(m.intValue))
                        return "intValue: integer expected";
                }
                if (m.doubleValue != null && m.hasOwnProperty("doubleValue")) {
                    if (typeof m.doubleValue !== "number")
                        return "doubleValue: number expected";
                }
                if (m.boolValue != null && m.hasOwnProperty("boolValue")) {
                    if (typeof m.boolValue !== "boolean")
                        return "boolValue: boolean expected";
                }
                if (m.stringValue != null && m.hasOwnProperty("stringValue")) {
                    if (!$util.isString(m.stringValue))
                        return "stringValue: string expected";
                }
                return null;
            };

            /**
             * Creates a ChromeTracedValue message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeTracedValue
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeTracedValue} ChromeTracedValue
             */
            ChromeTracedValue.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeTracedValue)
                    return d;
                var m = new $root.perfetto.protos.ChromeTracedValue();
                switch (d.nestedType) {
                case "DICT":
                case 0:
                    m.nestedType = 0;
                    break;
                case "ARRAY":
                case 1:
                    m.nestedType = 1;
                    break;
                }
                if (d.dictKeys) {
                    if (!Array.isArray(d.dictKeys))
                        throw TypeError(".perfetto.protos.ChromeTracedValue.dictKeys: array expected");
                    m.dictKeys = [];
                    for (var i = 0; i < d.dictKeys.length; ++i) {
                        m.dictKeys[i] = String(d.dictKeys[i]);
                    }
                }
                if (d.dictValues) {
                    if (!Array.isArray(d.dictValues))
                        throw TypeError(".perfetto.protos.ChromeTracedValue.dictValues: array expected");
                    m.dictValues = [];
                    for (var i = 0; i < d.dictValues.length; ++i) {
                        if (typeof d.dictValues[i] !== "object")
                            throw TypeError(".perfetto.protos.ChromeTracedValue.dictValues: object expected");
                        m.dictValues[i] = $root.perfetto.protos.ChromeTracedValue.fromObject(d.dictValues[i]);
                    }
                }
                if (d.arrayValues) {
                    if (!Array.isArray(d.arrayValues))
                        throw TypeError(".perfetto.protos.ChromeTracedValue.arrayValues: array expected");
                    m.arrayValues = [];
                    for (var i = 0; i < d.arrayValues.length; ++i) {
                        if (typeof d.arrayValues[i] !== "object")
                            throw TypeError(".perfetto.protos.ChromeTracedValue.arrayValues: object expected");
                        m.arrayValues[i] = $root.perfetto.protos.ChromeTracedValue.fromObject(d.arrayValues[i]);
                    }
                }
                if (d.intValue != null) {
                    m.intValue = d.intValue | 0;
                }
                if (d.doubleValue != null) {
                    m.doubleValue = Number(d.doubleValue);
                }
                if (d.boolValue != null) {
                    m.boolValue = Boolean(d.boolValue);
                }
                if (d.stringValue != null) {
                    m.stringValue = String(d.stringValue);
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeTracedValue message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeTracedValue
             * @static
             * @param {perfetto.protos.ChromeTracedValue} m ChromeTracedValue
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeTracedValue.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.dictKeys = [];
                    d.dictValues = [];
                    d.arrayValues = [];
                }
                if (o.defaults) {
                    d.nestedType = o.enums === String ? "DICT" : 0;
                    d.intValue = 0;
                    d.doubleValue = 0;
                    d.boolValue = false;
                    d.stringValue = "";
                }
                if (m.nestedType != null && m.hasOwnProperty("nestedType")) {
                    d.nestedType = o.enums === String ? $root.perfetto.protos.ChromeTracedValue.NestedType[m.nestedType] : m.nestedType;
                }
                if (m.dictKeys && m.dictKeys.length) {
                    d.dictKeys = [];
                    for (var j = 0; j < m.dictKeys.length; ++j) {
                        d.dictKeys[j] = m.dictKeys[j];
                    }
                }
                if (m.dictValues && m.dictValues.length) {
                    d.dictValues = [];
                    for (var j = 0; j < m.dictValues.length; ++j) {
                        d.dictValues[j] = $root.perfetto.protos.ChromeTracedValue.toObject(m.dictValues[j], o);
                    }
                }
                if (m.arrayValues && m.arrayValues.length) {
                    d.arrayValues = [];
                    for (var j = 0; j < m.arrayValues.length; ++j) {
                        d.arrayValues[j] = $root.perfetto.protos.ChromeTracedValue.toObject(m.arrayValues[j], o);
                    }
                }
                if (m.intValue != null && m.hasOwnProperty("intValue")) {
                    d.intValue = m.intValue;
                }
                if (m.doubleValue != null && m.hasOwnProperty("doubleValue")) {
                    d.doubleValue = o.json && !isFinite(m.doubleValue) ? String(m.doubleValue) : m.doubleValue;
                }
                if (m.boolValue != null && m.hasOwnProperty("boolValue")) {
                    d.boolValue = m.boolValue;
                }
                if (m.stringValue != null && m.hasOwnProperty("stringValue")) {
                    d.stringValue = m.stringValue;
                }
                return d;
            };

            /**
             * Converts this ChromeTracedValue to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeTracedValue
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeTracedValue.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * NestedType enum.
             * @name perfetto.protos.ChromeTracedValue.NestedType
             * @enum {number}
             * @property {number} DICT=0 DICT value
             * @property {number} ARRAY=1 ARRAY value
             */
            ChromeTracedValue.NestedType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "DICT"] = 0;
                values[valuesById[1] = "ARRAY"] = 1;
                return values;
            })();

            return ChromeTracedValue;
        })();

        protos.ChromeStringTableEntry = (function() {

            /**
             * Properties of a ChromeStringTableEntry.
             * @memberof perfetto.protos
             * @interface IChromeStringTableEntry
             * @property {string|null} [value] ChromeStringTableEntry value
             * @property {number|null} [index] ChromeStringTableEntry index
             */

            /**
             * Constructs a new ChromeStringTableEntry.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeStringTableEntry.
             * @implements IChromeStringTableEntry
             * @constructor
             * @param {perfetto.protos.IChromeStringTableEntry=} [p] Properties to set
             */
            function ChromeStringTableEntry(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeStringTableEntry value.
             * @member {string} value
             * @memberof perfetto.protos.ChromeStringTableEntry
             * @instance
             */
            ChromeStringTableEntry.prototype.value = "";

            /**
             * ChromeStringTableEntry index.
             * @member {number} index
             * @memberof perfetto.protos.ChromeStringTableEntry
             * @instance
             */
            ChromeStringTableEntry.prototype.index = 0;

            /**
             * Creates a new ChromeStringTableEntry instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeStringTableEntry
             * @static
             * @param {perfetto.protos.IChromeStringTableEntry=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeStringTableEntry} ChromeStringTableEntry instance
             */
            ChromeStringTableEntry.create = function create(properties) {
                return new ChromeStringTableEntry(properties);
            };

            /**
             * Encodes the specified ChromeStringTableEntry message. Does not implicitly {@link perfetto.protos.ChromeStringTableEntry.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeStringTableEntry
             * @static
             * @param {perfetto.protos.IChromeStringTableEntry} m ChromeStringTableEntry message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeStringTableEntry.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.value != null && Object.hasOwnProperty.call(m, "value"))
                    w.uint32(10).string(m.value);
                if (m.index != null && Object.hasOwnProperty.call(m, "index"))
                    w.uint32(16).int32(m.index);
                return w;
            };

            /**
             * Encodes the specified ChromeStringTableEntry message, length delimited. Does not implicitly {@link perfetto.protos.ChromeStringTableEntry.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeStringTableEntry
             * @static
             * @param {perfetto.protos.IChromeStringTableEntry} message ChromeStringTableEntry message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeStringTableEntry.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeStringTableEntry message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeStringTableEntry
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeStringTableEntry} ChromeStringTableEntry
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeStringTableEntry.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeStringTableEntry();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.value = r.string();
                        break;
                    case 2:
                        m.index = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeStringTableEntry message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeStringTableEntry
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeStringTableEntry} ChromeStringTableEntry
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeStringTableEntry.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeStringTableEntry message.
             * @function verify
             * @memberof perfetto.protos.ChromeStringTableEntry
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeStringTableEntry.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.value != null && m.hasOwnProperty("value")) {
                    if (!$util.isString(m.value))
                        return "value: string expected";
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (!$util.isInteger(m.index))
                        return "index: integer expected";
                }
                return null;
            };

            /**
             * Creates a ChromeStringTableEntry message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeStringTableEntry
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeStringTableEntry} ChromeStringTableEntry
             */
            ChromeStringTableEntry.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeStringTableEntry)
                    return d;
                var m = new $root.perfetto.protos.ChromeStringTableEntry();
                if (d.value != null) {
                    m.value = String(d.value);
                }
                if (d.index != null) {
                    m.index = d.index | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeStringTableEntry message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeStringTableEntry
             * @static
             * @param {perfetto.protos.ChromeStringTableEntry} m ChromeStringTableEntry
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeStringTableEntry.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.value = "";
                    d.index = 0;
                }
                if (m.value != null && m.hasOwnProperty("value")) {
                    d.value = m.value;
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    d.index = m.index;
                }
                return d;
            };

            /**
             * Converts this ChromeStringTableEntry to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeStringTableEntry
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeStringTableEntry.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ChromeStringTableEntry;
        })();

        protos.ChromeTraceEvent = (function() {

            /**
             * Properties of a ChromeTraceEvent.
             * @memberof perfetto.protos
             * @interface IChromeTraceEvent
             * @property {string|null} [name] ChromeTraceEvent name
             * @property {number|null} [timestamp] ChromeTraceEvent timestamp
             * @property {number|null} [phase] ChromeTraceEvent phase
             * @property {number|null} [threadId] ChromeTraceEvent threadId
             * @property {number|null} [duration] ChromeTraceEvent duration
             * @property {number|null} [threadDuration] ChromeTraceEvent threadDuration
             * @property {string|null} [scope] ChromeTraceEvent scope
             * @property {number|null} [id] ChromeTraceEvent id
             * @property {number|null} [flags] ChromeTraceEvent flags
             * @property {string|null} [categoryGroupName] ChromeTraceEvent categoryGroupName
             * @property {number|null} [processId] ChromeTraceEvent processId
             * @property {number|null} [threadTimestamp] ChromeTraceEvent threadTimestamp
             * @property {number|null} [bindId] ChromeTraceEvent bindId
             * @property {Array.<perfetto.protos.ChromeTraceEvent.IArg>|null} [args] ChromeTraceEvent args
             * @property {number|null} [nameIndex] ChromeTraceEvent nameIndex
             * @property {number|null} [categoryGroupNameIndex] ChromeTraceEvent categoryGroupNameIndex
             */

            /**
             * Constructs a new ChromeTraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeTraceEvent.
             * @implements IChromeTraceEvent
             * @constructor
             * @param {perfetto.protos.IChromeTraceEvent=} [p] Properties to set
             */
            function ChromeTraceEvent(p) {
                this.args = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeTraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.ChromeTraceEvent
             * @instance
             */
            ChromeTraceEvent.prototype.name = "";

            /**
             * ChromeTraceEvent timestamp.
             * @member {number} timestamp
             * @memberof perfetto.protos.ChromeTraceEvent
             * @instance
             */
            ChromeTraceEvent.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ChromeTraceEvent phase.
             * @member {number} phase
             * @memberof perfetto.protos.ChromeTraceEvent
             * @instance
             */
            ChromeTraceEvent.prototype.phase = 0;

            /**
             * ChromeTraceEvent threadId.
             * @member {number} threadId
             * @memberof perfetto.protos.ChromeTraceEvent
             * @instance
             */
            ChromeTraceEvent.prototype.threadId = 0;

            /**
             * ChromeTraceEvent duration.
             * @member {number} duration
             * @memberof perfetto.protos.ChromeTraceEvent
             * @instance
             */
            ChromeTraceEvent.prototype.duration = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ChromeTraceEvent threadDuration.
             * @member {number} threadDuration
             * @memberof perfetto.protos.ChromeTraceEvent
             * @instance
             */
            ChromeTraceEvent.prototype.threadDuration = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ChromeTraceEvent scope.
             * @member {string} scope
             * @memberof perfetto.protos.ChromeTraceEvent
             * @instance
             */
            ChromeTraceEvent.prototype.scope = "";

            /**
             * ChromeTraceEvent id.
             * @member {number} id
             * @memberof perfetto.protos.ChromeTraceEvent
             * @instance
             */
            ChromeTraceEvent.prototype.id = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * ChromeTraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.ChromeTraceEvent
             * @instance
             */
            ChromeTraceEvent.prototype.flags = 0;

            /**
             * ChromeTraceEvent categoryGroupName.
             * @member {string} categoryGroupName
             * @memberof perfetto.protos.ChromeTraceEvent
             * @instance
             */
            ChromeTraceEvent.prototype.categoryGroupName = "";

            /**
             * ChromeTraceEvent processId.
             * @member {number} processId
             * @memberof perfetto.protos.ChromeTraceEvent
             * @instance
             */
            ChromeTraceEvent.prototype.processId = 0;

            /**
             * ChromeTraceEvent threadTimestamp.
             * @member {number} threadTimestamp
             * @memberof perfetto.protos.ChromeTraceEvent
             * @instance
             */
            ChromeTraceEvent.prototype.threadTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ChromeTraceEvent bindId.
             * @member {number} bindId
             * @memberof perfetto.protos.ChromeTraceEvent
             * @instance
             */
            ChromeTraceEvent.prototype.bindId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * ChromeTraceEvent args.
             * @member {Array.<perfetto.protos.ChromeTraceEvent.IArg>} args
             * @memberof perfetto.protos.ChromeTraceEvent
             * @instance
             */
            ChromeTraceEvent.prototype.args = $util.emptyArray;

            /**
             * ChromeTraceEvent nameIndex.
             * @member {number} nameIndex
             * @memberof perfetto.protos.ChromeTraceEvent
             * @instance
             */
            ChromeTraceEvent.prototype.nameIndex = 0;

            /**
             * ChromeTraceEvent categoryGroupNameIndex.
             * @member {number} categoryGroupNameIndex
             * @memberof perfetto.protos.ChromeTraceEvent
             * @instance
             */
            ChromeTraceEvent.prototype.categoryGroupNameIndex = 0;

            /**
             * Creates a new ChromeTraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeTraceEvent
             * @static
             * @param {perfetto.protos.IChromeTraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeTraceEvent} ChromeTraceEvent instance
             */
            ChromeTraceEvent.create = function create(properties) {
                return new ChromeTraceEvent(properties);
            };

            /**
             * Encodes the specified ChromeTraceEvent message. Does not implicitly {@link perfetto.protos.ChromeTraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeTraceEvent
             * @static
             * @param {perfetto.protos.IChromeTraceEvent} m ChromeTraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeTraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                if (m.timestamp != null && Object.hasOwnProperty.call(m, "timestamp"))
                    w.uint32(16).int64(m.timestamp);
                if (m.phase != null && Object.hasOwnProperty.call(m, "phase"))
                    w.uint32(24).int32(m.phase);
                if (m.threadId != null && Object.hasOwnProperty.call(m, "threadId"))
                    w.uint32(32).int32(m.threadId);
                if (m.duration != null && Object.hasOwnProperty.call(m, "duration"))
                    w.uint32(40).int64(m.duration);
                if (m.threadDuration != null && Object.hasOwnProperty.call(m, "threadDuration"))
                    w.uint32(48).int64(m.threadDuration);
                if (m.scope != null && Object.hasOwnProperty.call(m, "scope"))
                    w.uint32(58).string(m.scope);
                if (m.id != null && Object.hasOwnProperty.call(m, "id"))
                    w.uint32(64).uint64(m.id);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(72).uint32(m.flags);
                if (m.categoryGroupName != null && Object.hasOwnProperty.call(m, "categoryGroupName"))
                    w.uint32(82).string(m.categoryGroupName);
                if (m.processId != null && Object.hasOwnProperty.call(m, "processId"))
                    w.uint32(88).int32(m.processId);
                if (m.threadTimestamp != null && Object.hasOwnProperty.call(m, "threadTimestamp"))
                    w.uint32(96).int64(m.threadTimestamp);
                if (m.bindId != null && Object.hasOwnProperty.call(m, "bindId"))
                    w.uint32(104).uint64(m.bindId);
                if (m.args != null && m.args.length) {
                    for (var i = 0; i < m.args.length; ++i)
                        $root.perfetto.protos.ChromeTraceEvent.Arg.encode(m.args[i], w.uint32(114).fork()).ldelim();
                }
                if (m.nameIndex != null && Object.hasOwnProperty.call(m, "nameIndex"))
                    w.uint32(120).uint32(m.nameIndex);
                if (m.categoryGroupNameIndex != null && Object.hasOwnProperty.call(m, "categoryGroupNameIndex"))
                    w.uint32(128).uint32(m.categoryGroupNameIndex);
                return w;
            };

            /**
             * Encodes the specified ChromeTraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.ChromeTraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeTraceEvent
             * @static
             * @param {perfetto.protos.IChromeTraceEvent} message ChromeTraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeTraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeTraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeTraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeTraceEvent} ChromeTraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeTraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeTraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    case 2:
                        m.timestamp = r.int64();
                        break;
                    case 3:
                        m.phase = r.int32();
                        break;
                    case 4:
                        m.threadId = r.int32();
                        break;
                    case 5:
                        m.duration = r.int64();
                        break;
                    case 6:
                        m.threadDuration = r.int64();
                        break;
                    case 7:
                        m.scope = r.string();
                        break;
                    case 8:
                        m.id = r.uint64();
                        break;
                    case 9:
                        m.flags = r.uint32();
                        break;
                    case 10:
                        m.categoryGroupName = r.string();
                        break;
                    case 11:
                        m.processId = r.int32();
                        break;
                    case 12:
                        m.threadTimestamp = r.int64();
                        break;
                    case 13:
                        m.bindId = r.uint64();
                        break;
                    case 14:
                        if (!(m.args && m.args.length))
                            m.args = [];
                        m.args.push($root.perfetto.protos.ChromeTraceEvent.Arg.decode(r, r.uint32()));
                        break;
                    case 15:
                        m.nameIndex = r.uint32();
                        break;
                    case 16:
                        m.categoryGroupNameIndex = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeTraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeTraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeTraceEvent} ChromeTraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeTraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeTraceEvent message.
             * @function verify
             * @memberof perfetto.protos.ChromeTraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeTraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                    if (!$util.isInteger(m.timestamp) && !(m.timestamp && $util.isInteger(m.timestamp.low) && $util.isInteger(m.timestamp.high)))
                        return "timestamp: integer|Long expected";
                }
                if (m.phase != null && m.hasOwnProperty("phase")) {
                    if (!$util.isInteger(m.phase))
                        return "phase: integer expected";
                }
                if (m.threadId != null && m.hasOwnProperty("threadId")) {
                    if (!$util.isInteger(m.threadId))
                        return "threadId: integer expected";
                }
                if (m.duration != null && m.hasOwnProperty("duration")) {
                    if (!$util.isInteger(m.duration) && !(m.duration && $util.isInteger(m.duration.low) && $util.isInteger(m.duration.high)))
                        return "duration: integer|Long expected";
                }
                if (m.threadDuration != null && m.hasOwnProperty("threadDuration")) {
                    if (!$util.isInteger(m.threadDuration) && !(m.threadDuration && $util.isInteger(m.threadDuration.low) && $util.isInteger(m.threadDuration.high)))
                        return "threadDuration: integer|Long expected";
                }
                if (m.scope != null && m.hasOwnProperty("scope")) {
                    if (!$util.isString(m.scope))
                        return "scope: string expected";
                }
                if (m.id != null && m.hasOwnProperty("id")) {
                    if (!$util.isInteger(m.id) && !(m.id && $util.isInteger(m.id.low) && $util.isInteger(m.id.high)))
                        return "id: integer|Long expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.categoryGroupName != null && m.hasOwnProperty("categoryGroupName")) {
                    if (!$util.isString(m.categoryGroupName))
                        return "categoryGroupName: string expected";
                }
                if (m.processId != null && m.hasOwnProperty("processId")) {
                    if (!$util.isInteger(m.processId))
                        return "processId: integer expected";
                }
                if (m.threadTimestamp != null && m.hasOwnProperty("threadTimestamp")) {
                    if (!$util.isInteger(m.threadTimestamp) && !(m.threadTimestamp && $util.isInteger(m.threadTimestamp.low) && $util.isInteger(m.threadTimestamp.high)))
                        return "threadTimestamp: integer|Long expected";
                }
                if (m.bindId != null && m.hasOwnProperty("bindId")) {
                    if (!$util.isInteger(m.bindId) && !(m.bindId && $util.isInteger(m.bindId.low) && $util.isInteger(m.bindId.high)))
                        return "bindId: integer|Long expected";
                }
                if (m.args != null && m.hasOwnProperty("args")) {
                    if (!Array.isArray(m.args))
                        return "args: array expected";
                    for (var i = 0; i < m.args.length; ++i) {
                        {
                            var e = $root.perfetto.protos.ChromeTraceEvent.Arg.verify(m.args[i]);
                            if (e)
                                return "args." + e;
                        }
                    }
                }
                if (m.nameIndex != null && m.hasOwnProperty("nameIndex")) {
                    if (!$util.isInteger(m.nameIndex))
                        return "nameIndex: integer expected";
                }
                if (m.categoryGroupNameIndex != null && m.hasOwnProperty("categoryGroupNameIndex")) {
                    if (!$util.isInteger(m.categoryGroupNameIndex))
                        return "categoryGroupNameIndex: integer expected";
                }
                return null;
            };

            /**
             * Creates a ChromeTraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeTraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeTraceEvent} ChromeTraceEvent
             */
            ChromeTraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeTraceEvent)
                    return d;
                var m = new $root.perfetto.protos.ChromeTraceEvent();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.timestamp != null) {
                    if ($util.Long)
                        (m.timestamp = $util.Long.fromValue(d.timestamp)).unsigned = false;
                    else if (typeof d.timestamp === "string")
                        m.timestamp = parseInt(d.timestamp, 10);
                    else if (typeof d.timestamp === "number")
                        m.timestamp = d.timestamp;
                    else if (typeof d.timestamp === "object")
                        m.timestamp = new $util.LongBits(d.timestamp.low >>> 0, d.timestamp.high >>> 0).toNumber();
                }
                if (d.phase != null) {
                    m.phase = d.phase | 0;
                }
                if (d.threadId != null) {
                    m.threadId = d.threadId | 0;
                }
                if (d.duration != null) {
                    if ($util.Long)
                        (m.duration = $util.Long.fromValue(d.duration)).unsigned = false;
                    else if (typeof d.duration === "string")
                        m.duration = parseInt(d.duration, 10);
                    else if (typeof d.duration === "number")
                        m.duration = d.duration;
                    else if (typeof d.duration === "object")
                        m.duration = new $util.LongBits(d.duration.low >>> 0, d.duration.high >>> 0).toNumber();
                }
                if (d.threadDuration != null) {
                    if ($util.Long)
                        (m.threadDuration = $util.Long.fromValue(d.threadDuration)).unsigned = false;
                    else if (typeof d.threadDuration === "string")
                        m.threadDuration = parseInt(d.threadDuration, 10);
                    else if (typeof d.threadDuration === "number")
                        m.threadDuration = d.threadDuration;
                    else if (typeof d.threadDuration === "object")
                        m.threadDuration = new $util.LongBits(d.threadDuration.low >>> 0, d.threadDuration.high >>> 0).toNumber();
                }
                if (d.scope != null) {
                    m.scope = String(d.scope);
                }
                if (d.id != null) {
                    if ($util.Long)
                        (m.id = $util.Long.fromValue(d.id)).unsigned = true;
                    else if (typeof d.id === "string")
                        m.id = parseInt(d.id, 10);
                    else if (typeof d.id === "number")
                        m.id = d.id;
                    else if (typeof d.id === "object")
                        m.id = new $util.LongBits(d.id.low >>> 0, d.id.high >>> 0).toNumber(true);
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                if (d.categoryGroupName != null) {
                    m.categoryGroupName = String(d.categoryGroupName);
                }
                if (d.processId != null) {
                    m.processId = d.processId | 0;
                }
                if (d.threadTimestamp != null) {
                    if ($util.Long)
                        (m.threadTimestamp = $util.Long.fromValue(d.threadTimestamp)).unsigned = false;
                    else if (typeof d.threadTimestamp === "string")
                        m.threadTimestamp = parseInt(d.threadTimestamp, 10);
                    else if (typeof d.threadTimestamp === "number")
                        m.threadTimestamp = d.threadTimestamp;
                    else if (typeof d.threadTimestamp === "object")
                        m.threadTimestamp = new $util.LongBits(d.threadTimestamp.low >>> 0, d.threadTimestamp.high >>> 0).toNumber();
                }
                if (d.bindId != null) {
                    if ($util.Long)
                        (m.bindId = $util.Long.fromValue(d.bindId)).unsigned = true;
                    else if (typeof d.bindId === "string")
                        m.bindId = parseInt(d.bindId, 10);
                    else if (typeof d.bindId === "number")
                        m.bindId = d.bindId;
                    else if (typeof d.bindId === "object")
                        m.bindId = new $util.LongBits(d.bindId.low >>> 0, d.bindId.high >>> 0).toNumber(true);
                }
                if (d.args) {
                    if (!Array.isArray(d.args))
                        throw TypeError(".perfetto.protos.ChromeTraceEvent.args: array expected");
                    m.args = [];
                    for (var i = 0; i < d.args.length; ++i) {
                        if (typeof d.args[i] !== "object")
                            throw TypeError(".perfetto.protos.ChromeTraceEvent.args: object expected");
                        m.args[i] = $root.perfetto.protos.ChromeTraceEvent.Arg.fromObject(d.args[i]);
                    }
                }
                if (d.nameIndex != null) {
                    m.nameIndex = d.nameIndex >>> 0;
                }
                if (d.categoryGroupNameIndex != null) {
                    m.categoryGroupNameIndex = d.categoryGroupNameIndex >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeTraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeTraceEvent
             * @static
             * @param {perfetto.protos.ChromeTraceEvent} m ChromeTraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeTraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.args = [];
                }
                if (o.defaults) {
                    d.name = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.timestamp = o.longs === String ? "0" : 0;
                    d.phase = 0;
                    d.threadId = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.duration = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.duration = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.threadDuration = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.threadDuration = o.longs === String ? "0" : 0;
                    d.scope = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.id = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.id = o.longs === String ? "0" : 0;
                    d.flags = 0;
                    d.categoryGroupName = "";
                    d.processId = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.threadTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.threadTimestamp = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.bindId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.bindId = o.longs === String ? "0" : 0;
                    d.nameIndex = 0;
                    d.categoryGroupNameIndex = 0;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                    if (typeof m.timestamp === "number")
                        d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp;
                    else
                        d.timestamp = o.longs === String ? $util.Long.prototype.toString.call(m.timestamp) : o.longs === Number ? new $util.LongBits(m.timestamp.low >>> 0, m.timestamp.high >>> 0).toNumber() : m.timestamp;
                }
                if (m.phase != null && m.hasOwnProperty("phase")) {
                    d.phase = m.phase;
                }
                if (m.threadId != null && m.hasOwnProperty("threadId")) {
                    d.threadId = m.threadId;
                }
                if (m.duration != null && m.hasOwnProperty("duration")) {
                    if (typeof m.duration === "number")
                        d.duration = o.longs === String ? String(m.duration) : m.duration;
                    else
                        d.duration = o.longs === String ? $util.Long.prototype.toString.call(m.duration) : o.longs === Number ? new $util.LongBits(m.duration.low >>> 0, m.duration.high >>> 0).toNumber() : m.duration;
                }
                if (m.threadDuration != null && m.hasOwnProperty("threadDuration")) {
                    if (typeof m.threadDuration === "number")
                        d.threadDuration = o.longs === String ? String(m.threadDuration) : m.threadDuration;
                    else
                        d.threadDuration = o.longs === String ? $util.Long.prototype.toString.call(m.threadDuration) : o.longs === Number ? new $util.LongBits(m.threadDuration.low >>> 0, m.threadDuration.high >>> 0).toNumber() : m.threadDuration;
                }
                if (m.scope != null && m.hasOwnProperty("scope")) {
                    d.scope = m.scope;
                }
                if (m.id != null && m.hasOwnProperty("id")) {
                    if (typeof m.id === "number")
                        d.id = o.longs === String ? String(m.id) : m.id;
                    else
                        d.id = o.longs === String ? $util.Long.prototype.toString.call(m.id) : o.longs === Number ? new $util.LongBits(m.id.low >>> 0, m.id.high >>> 0).toNumber(true) : m.id;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.categoryGroupName != null && m.hasOwnProperty("categoryGroupName")) {
                    d.categoryGroupName = m.categoryGroupName;
                }
                if (m.processId != null && m.hasOwnProperty("processId")) {
                    d.processId = m.processId;
                }
                if (m.threadTimestamp != null && m.hasOwnProperty("threadTimestamp")) {
                    if (typeof m.threadTimestamp === "number")
                        d.threadTimestamp = o.longs === String ? String(m.threadTimestamp) : m.threadTimestamp;
                    else
                        d.threadTimestamp = o.longs === String ? $util.Long.prototype.toString.call(m.threadTimestamp) : o.longs === Number ? new $util.LongBits(m.threadTimestamp.low >>> 0, m.threadTimestamp.high >>> 0).toNumber() : m.threadTimestamp;
                }
                if (m.bindId != null && m.hasOwnProperty("bindId")) {
                    if (typeof m.bindId === "number")
                        d.bindId = o.longs === String ? String(m.bindId) : m.bindId;
                    else
                        d.bindId = o.longs === String ? $util.Long.prototype.toString.call(m.bindId) : o.longs === Number ? new $util.LongBits(m.bindId.low >>> 0, m.bindId.high >>> 0).toNumber(true) : m.bindId;
                }
                if (m.args && m.args.length) {
                    d.args = [];
                    for (var j = 0; j < m.args.length; ++j) {
                        d.args[j] = $root.perfetto.protos.ChromeTraceEvent.Arg.toObject(m.args[j], o);
                    }
                }
                if (m.nameIndex != null && m.hasOwnProperty("nameIndex")) {
                    d.nameIndex = m.nameIndex;
                }
                if (m.categoryGroupNameIndex != null && m.hasOwnProperty("categoryGroupNameIndex")) {
                    d.categoryGroupNameIndex = m.categoryGroupNameIndex;
                }
                return d;
            };

            /**
             * Converts this ChromeTraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeTraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeTraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            ChromeTraceEvent.Arg = (function() {

                /**
                 * Properties of an Arg.
                 * @memberof perfetto.protos.ChromeTraceEvent
                 * @interface IArg
                 * @property {string|null} [name] Arg name
                 * @property {boolean|null} [boolValue] Arg boolValue
                 * @property {number|null} [uintValue] Arg uintValue
                 * @property {number|null} [intValue] Arg intValue
                 * @property {number|null} [doubleValue] Arg doubleValue
                 * @property {string|null} [stringValue] Arg stringValue
                 * @property {number|null} [pointerValue] Arg pointerValue
                 * @property {string|null} [jsonValue] Arg jsonValue
                 * @property {perfetto.protos.IChromeTracedValue|null} [tracedValue] Arg tracedValue
                 * @property {number|null} [nameIndex] Arg nameIndex
                 */

                /**
                 * Constructs a new Arg.
                 * @memberof perfetto.protos.ChromeTraceEvent
                 * @classdesc Represents an Arg.
                 * @implements IArg
                 * @constructor
                 * @param {perfetto.protos.ChromeTraceEvent.IArg=} [p] Properties to set
                 */
                function Arg(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Arg name.
                 * @member {string} name
                 * @memberof perfetto.protos.ChromeTraceEvent.Arg
                 * @instance
                 */
                Arg.prototype.name = "";

                /**
                 * Arg boolValue.
                 * @member {boolean} boolValue
                 * @memberof perfetto.protos.ChromeTraceEvent.Arg
                 * @instance
                 */
                Arg.prototype.boolValue = false;

                /**
                 * Arg uintValue.
                 * @member {number} uintValue
                 * @memberof perfetto.protos.ChromeTraceEvent.Arg
                 * @instance
                 */
                Arg.prototype.uintValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Arg intValue.
                 * @member {number} intValue
                 * @memberof perfetto.protos.ChromeTraceEvent.Arg
                 * @instance
                 */
                Arg.prototype.intValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Arg doubleValue.
                 * @member {number} doubleValue
                 * @memberof perfetto.protos.ChromeTraceEvent.Arg
                 * @instance
                 */
                Arg.prototype.doubleValue = 0;

                /**
                 * Arg stringValue.
                 * @member {string} stringValue
                 * @memberof perfetto.protos.ChromeTraceEvent.Arg
                 * @instance
                 */
                Arg.prototype.stringValue = "";

                /**
                 * Arg pointerValue.
                 * @member {number} pointerValue
                 * @memberof perfetto.protos.ChromeTraceEvent.Arg
                 * @instance
                 */
                Arg.prototype.pointerValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Arg jsonValue.
                 * @member {string} jsonValue
                 * @memberof perfetto.protos.ChromeTraceEvent.Arg
                 * @instance
                 */
                Arg.prototype.jsonValue = "";

                /**
                 * Arg tracedValue.
                 * @member {perfetto.protos.IChromeTracedValue|null|undefined} tracedValue
                 * @memberof perfetto.protos.ChromeTraceEvent.Arg
                 * @instance
                 */
                Arg.prototype.tracedValue = null;

                /**
                 * Arg nameIndex.
                 * @member {number} nameIndex
                 * @memberof perfetto.protos.ChromeTraceEvent.Arg
                 * @instance
                 */
                Arg.prototype.nameIndex = 0;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * Arg value.
                 * @member {"boolValue"|"uintValue"|"intValue"|"doubleValue"|"stringValue"|"pointerValue"|"jsonValue"|"tracedValue"|undefined} value
                 * @memberof perfetto.protos.ChromeTraceEvent.Arg
                 * @instance
                 */
                Object.defineProperty(Arg.prototype, "value", {
                    get: $util.oneOfGetter($oneOfFields = ["boolValue", "uintValue", "intValue", "doubleValue", "stringValue", "pointerValue", "jsonValue", "tracedValue"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new Arg instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.ChromeTraceEvent.Arg
                 * @static
                 * @param {perfetto.protos.ChromeTraceEvent.IArg=} [properties] Properties to set
                 * @returns {perfetto.protos.ChromeTraceEvent.Arg} Arg instance
                 */
                Arg.create = function create(properties) {
                    return new Arg(properties);
                };

                /**
                 * Encodes the specified Arg message. Does not implicitly {@link perfetto.protos.ChromeTraceEvent.Arg.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.ChromeTraceEvent.Arg
                 * @static
                 * @param {perfetto.protos.ChromeTraceEvent.IArg} m Arg message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Arg.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(10).string(m.name);
                    if (m.boolValue != null && Object.hasOwnProperty.call(m, "boolValue"))
                        w.uint32(16).bool(m.boolValue);
                    if (m.uintValue != null && Object.hasOwnProperty.call(m, "uintValue"))
                        w.uint32(24).uint64(m.uintValue);
                    if (m.intValue != null && Object.hasOwnProperty.call(m, "intValue"))
                        w.uint32(32).int64(m.intValue);
                    if (m.doubleValue != null && Object.hasOwnProperty.call(m, "doubleValue"))
                        w.uint32(41).double(m.doubleValue);
                    if (m.stringValue != null && Object.hasOwnProperty.call(m, "stringValue"))
                        w.uint32(50).string(m.stringValue);
                    if (m.pointerValue != null && Object.hasOwnProperty.call(m, "pointerValue"))
                        w.uint32(56).uint64(m.pointerValue);
                    if (m.jsonValue != null && Object.hasOwnProperty.call(m, "jsonValue"))
                        w.uint32(66).string(m.jsonValue);
                    if (m.nameIndex != null && Object.hasOwnProperty.call(m, "nameIndex"))
                        w.uint32(72).uint32(m.nameIndex);
                    if (m.tracedValue != null && Object.hasOwnProperty.call(m, "tracedValue"))
                        $root.perfetto.protos.ChromeTracedValue.encode(m.tracedValue, w.uint32(82).fork()).ldelim();
                    return w;
                };

                /**
                 * Encodes the specified Arg message, length delimited. Does not implicitly {@link perfetto.protos.ChromeTraceEvent.Arg.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.ChromeTraceEvent.Arg
                 * @static
                 * @param {perfetto.protos.ChromeTraceEvent.IArg} message Arg message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Arg.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an Arg message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.ChromeTraceEvent.Arg
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.ChromeTraceEvent.Arg} Arg
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Arg.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeTraceEvent.Arg();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.name = r.string();
                            break;
                        case 2:
                            m.boolValue = r.bool();
                            break;
                        case 3:
                            m.uintValue = r.uint64();
                            break;
                        case 4:
                            m.intValue = r.int64();
                            break;
                        case 5:
                            m.doubleValue = r.double();
                            break;
                        case 6:
                            m.stringValue = r.string();
                            break;
                        case 7:
                            m.pointerValue = r.uint64();
                            break;
                        case 8:
                            m.jsonValue = r.string();
                            break;
                        case 10:
                            m.tracedValue = $root.perfetto.protos.ChromeTracedValue.decode(r, r.uint32());
                            break;
                        case 9:
                            m.nameIndex = r.uint32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an Arg message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.ChromeTraceEvent.Arg
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.ChromeTraceEvent.Arg} Arg
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Arg.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an Arg message.
                 * @function verify
                 * @memberof perfetto.protos.ChromeTraceEvent.Arg
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Arg.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    var p = {};
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    if (m.boolValue != null && m.hasOwnProperty("boolValue")) {
                        p.value = 1;
                        if (typeof m.boolValue !== "boolean")
                            return "boolValue: boolean expected";
                    }
                    if (m.uintValue != null && m.hasOwnProperty("uintValue")) {
                        if (p.value === 1)
                            return "value: multiple values";
                        p.value = 1;
                        if (!$util.isInteger(m.uintValue) && !(m.uintValue && $util.isInteger(m.uintValue.low) && $util.isInteger(m.uintValue.high)))
                            return "uintValue: integer|Long expected";
                    }
                    if (m.intValue != null && m.hasOwnProperty("intValue")) {
                        if (p.value === 1)
                            return "value: multiple values";
                        p.value = 1;
                        if (!$util.isInteger(m.intValue) && !(m.intValue && $util.isInteger(m.intValue.low) && $util.isInteger(m.intValue.high)))
                            return "intValue: integer|Long expected";
                    }
                    if (m.doubleValue != null && m.hasOwnProperty("doubleValue")) {
                        if (p.value === 1)
                            return "value: multiple values";
                        p.value = 1;
                        if (typeof m.doubleValue !== "number")
                            return "doubleValue: number expected";
                    }
                    if (m.stringValue != null && m.hasOwnProperty("stringValue")) {
                        if (p.value === 1)
                            return "value: multiple values";
                        p.value = 1;
                        if (!$util.isString(m.stringValue))
                            return "stringValue: string expected";
                    }
                    if (m.pointerValue != null && m.hasOwnProperty("pointerValue")) {
                        if (p.value === 1)
                            return "value: multiple values";
                        p.value = 1;
                        if (!$util.isInteger(m.pointerValue) && !(m.pointerValue && $util.isInteger(m.pointerValue.low) && $util.isInteger(m.pointerValue.high)))
                            return "pointerValue: integer|Long expected";
                    }
                    if (m.jsonValue != null && m.hasOwnProperty("jsonValue")) {
                        if (p.value === 1)
                            return "value: multiple values";
                        p.value = 1;
                        if (!$util.isString(m.jsonValue))
                            return "jsonValue: string expected";
                    }
                    if (m.tracedValue != null && m.hasOwnProperty("tracedValue")) {
                        if (p.value === 1)
                            return "value: multiple values";
                        p.value = 1;
                        {
                            var e = $root.perfetto.protos.ChromeTracedValue.verify(m.tracedValue);
                            if (e)
                                return "tracedValue." + e;
                        }
                    }
                    if (m.nameIndex != null && m.hasOwnProperty("nameIndex")) {
                        if (!$util.isInteger(m.nameIndex))
                            return "nameIndex: integer expected";
                    }
                    return null;
                };

                /**
                 * Creates an Arg message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.ChromeTraceEvent.Arg
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.ChromeTraceEvent.Arg} Arg
                 */
                Arg.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.ChromeTraceEvent.Arg)
                        return d;
                    var m = new $root.perfetto.protos.ChromeTraceEvent.Arg();
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    if (d.boolValue != null) {
                        m.boolValue = Boolean(d.boolValue);
                    }
                    if (d.uintValue != null) {
                        if ($util.Long)
                            (m.uintValue = $util.Long.fromValue(d.uintValue)).unsigned = true;
                        else if (typeof d.uintValue === "string")
                            m.uintValue = parseInt(d.uintValue, 10);
                        else if (typeof d.uintValue === "number")
                            m.uintValue = d.uintValue;
                        else if (typeof d.uintValue === "object")
                            m.uintValue = new $util.LongBits(d.uintValue.low >>> 0, d.uintValue.high >>> 0).toNumber(true);
                    }
                    if (d.intValue != null) {
                        if ($util.Long)
                            (m.intValue = $util.Long.fromValue(d.intValue)).unsigned = false;
                        else if (typeof d.intValue === "string")
                            m.intValue = parseInt(d.intValue, 10);
                        else if (typeof d.intValue === "number")
                            m.intValue = d.intValue;
                        else if (typeof d.intValue === "object")
                            m.intValue = new $util.LongBits(d.intValue.low >>> 0, d.intValue.high >>> 0).toNumber();
                    }
                    if (d.doubleValue != null) {
                        m.doubleValue = Number(d.doubleValue);
                    }
                    if (d.stringValue != null) {
                        m.stringValue = String(d.stringValue);
                    }
                    if (d.pointerValue != null) {
                        if ($util.Long)
                            (m.pointerValue = $util.Long.fromValue(d.pointerValue)).unsigned = true;
                        else if (typeof d.pointerValue === "string")
                            m.pointerValue = parseInt(d.pointerValue, 10);
                        else if (typeof d.pointerValue === "number")
                            m.pointerValue = d.pointerValue;
                        else if (typeof d.pointerValue === "object")
                            m.pointerValue = new $util.LongBits(d.pointerValue.low >>> 0, d.pointerValue.high >>> 0).toNumber(true);
                    }
                    if (d.jsonValue != null) {
                        m.jsonValue = String(d.jsonValue);
                    }
                    if (d.tracedValue != null) {
                        if (typeof d.tracedValue !== "object")
                            throw TypeError(".perfetto.protos.ChromeTraceEvent.Arg.tracedValue: object expected");
                        m.tracedValue = $root.perfetto.protos.ChromeTracedValue.fromObject(d.tracedValue);
                    }
                    if (d.nameIndex != null) {
                        m.nameIndex = d.nameIndex >>> 0;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an Arg message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.ChromeTraceEvent.Arg
                 * @static
                 * @param {perfetto.protos.ChromeTraceEvent.Arg} m Arg
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Arg.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.name = "";
                        d.nameIndex = 0;
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    if (m.boolValue != null && m.hasOwnProperty("boolValue")) {
                        d.boolValue = m.boolValue;
                        if (o.oneofs)
                            d.value = "boolValue";
                    }
                    if (m.uintValue != null && m.hasOwnProperty("uintValue")) {
                        if (typeof m.uintValue === "number")
                            d.uintValue = o.longs === String ? String(m.uintValue) : m.uintValue;
                        else
                            d.uintValue = o.longs === String ? $util.Long.prototype.toString.call(m.uintValue) : o.longs === Number ? new $util.LongBits(m.uintValue.low >>> 0, m.uintValue.high >>> 0).toNumber(true) : m.uintValue;
                        if (o.oneofs)
                            d.value = "uintValue";
                    }
                    if (m.intValue != null && m.hasOwnProperty("intValue")) {
                        if (typeof m.intValue === "number")
                            d.intValue = o.longs === String ? String(m.intValue) : m.intValue;
                        else
                            d.intValue = o.longs === String ? $util.Long.prototype.toString.call(m.intValue) : o.longs === Number ? new $util.LongBits(m.intValue.low >>> 0, m.intValue.high >>> 0).toNumber() : m.intValue;
                        if (o.oneofs)
                            d.value = "intValue";
                    }
                    if (m.doubleValue != null && m.hasOwnProperty("doubleValue")) {
                        d.doubleValue = o.json && !isFinite(m.doubleValue) ? String(m.doubleValue) : m.doubleValue;
                        if (o.oneofs)
                            d.value = "doubleValue";
                    }
                    if (m.stringValue != null && m.hasOwnProperty("stringValue")) {
                        d.stringValue = m.stringValue;
                        if (o.oneofs)
                            d.value = "stringValue";
                    }
                    if (m.pointerValue != null && m.hasOwnProperty("pointerValue")) {
                        if (typeof m.pointerValue === "number")
                            d.pointerValue = o.longs === String ? String(m.pointerValue) : m.pointerValue;
                        else
                            d.pointerValue = o.longs === String ? $util.Long.prototype.toString.call(m.pointerValue) : o.longs === Number ? new $util.LongBits(m.pointerValue.low >>> 0, m.pointerValue.high >>> 0).toNumber(true) : m.pointerValue;
                        if (o.oneofs)
                            d.value = "pointerValue";
                    }
                    if (m.jsonValue != null && m.hasOwnProperty("jsonValue")) {
                        d.jsonValue = m.jsonValue;
                        if (o.oneofs)
                            d.value = "jsonValue";
                    }
                    if (m.nameIndex != null && m.hasOwnProperty("nameIndex")) {
                        d.nameIndex = m.nameIndex;
                    }
                    if (m.tracedValue != null && m.hasOwnProperty("tracedValue")) {
                        d.tracedValue = $root.perfetto.protos.ChromeTracedValue.toObject(m.tracedValue, o);
                        if (o.oneofs)
                            d.value = "tracedValue";
                    }
                    return d;
                };

                /**
                 * Converts this Arg to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.ChromeTraceEvent.Arg
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Arg.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Arg;
            })();

            return ChromeTraceEvent;
        })();

        protos.ChromeMetadata = (function() {

            /**
             * Properties of a ChromeMetadata.
             * @memberof perfetto.protos
             * @interface IChromeMetadata
             * @property {string|null} [name] ChromeMetadata name
             * @property {string|null} [stringValue] ChromeMetadata stringValue
             * @property {boolean|null} [boolValue] ChromeMetadata boolValue
             * @property {number|null} [intValue] ChromeMetadata intValue
             * @property {string|null} [jsonValue] ChromeMetadata jsonValue
             */

            /**
             * Constructs a new ChromeMetadata.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeMetadata.
             * @implements IChromeMetadata
             * @constructor
             * @param {perfetto.protos.IChromeMetadata=} [p] Properties to set
             */
            function ChromeMetadata(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeMetadata name.
             * @member {string} name
             * @memberof perfetto.protos.ChromeMetadata
             * @instance
             */
            ChromeMetadata.prototype.name = "";

            /**
             * ChromeMetadata stringValue.
             * @member {string} stringValue
             * @memberof perfetto.protos.ChromeMetadata
             * @instance
             */
            ChromeMetadata.prototype.stringValue = "";

            /**
             * ChromeMetadata boolValue.
             * @member {boolean} boolValue
             * @memberof perfetto.protos.ChromeMetadata
             * @instance
             */
            ChromeMetadata.prototype.boolValue = false;

            /**
             * ChromeMetadata intValue.
             * @member {number} intValue
             * @memberof perfetto.protos.ChromeMetadata
             * @instance
             */
            ChromeMetadata.prototype.intValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ChromeMetadata jsonValue.
             * @member {string} jsonValue
             * @memberof perfetto.protos.ChromeMetadata
             * @instance
             */
            ChromeMetadata.prototype.jsonValue = "";

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * ChromeMetadata value.
             * @member {"stringValue"|"boolValue"|"intValue"|"jsonValue"|undefined} value
             * @memberof perfetto.protos.ChromeMetadata
             * @instance
             */
            Object.defineProperty(ChromeMetadata.prototype, "value", {
                get: $util.oneOfGetter($oneOfFields = ["stringValue", "boolValue", "intValue", "jsonValue"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new ChromeMetadata instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeMetadata
             * @static
             * @param {perfetto.protos.IChromeMetadata=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeMetadata} ChromeMetadata instance
             */
            ChromeMetadata.create = function create(properties) {
                return new ChromeMetadata(properties);
            };

            /**
             * Encodes the specified ChromeMetadata message. Does not implicitly {@link perfetto.protos.ChromeMetadata.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeMetadata
             * @static
             * @param {perfetto.protos.IChromeMetadata} m ChromeMetadata message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeMetadata.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                if (m.stringValue != null && Object.hasOwnProperty.call(m, "stringValue"))
                    w.uint32(18).string(m.stringValue);
                if (m.boolValue != null && Object.hasOwnProperty.call(m, "boolValue"))
                    w.uint32(24).bool(m.boolValue);
                if (m.intValue != null && Object.hasOwnProperty.call(m, "intValue"))
                    w.uint32(32).int64(m.intValue);
                if (m.jsonValue != null && Object.hasOwnProperty.call(m, "jsonValue"))
                    w.uint32(42).string(m.jsonValue);
                return w;
            };

            /**
             * Encodes the specified ChromeMetadata message, length delimited. Does not implicitly {@link perfetto.protos.ChromeMetadata.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeMetadata
             * @static
             * @param {perfetto.protos.IChromeMetadata} message ChromeMetadata message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeMetadata message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeMetadata} ChromeMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeMetadata.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeMetadata();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    case 2:
                        m.stringValue = r.string();
                        break;
                    case 3:
                        m.boolValue = r.bool();
                        break;
                    case 4:
                        m.intValue = r.int64();
                        break;
                    case 5:
                        m.jsonValue = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeMetadata message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeMetadata
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeMetadata} ChromeMetadata
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeMetadata.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeMetadata message.
             * @function verify
             * @memberof perfetto.protos.ChromeMetadata
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeMetadata.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                var p = {};
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.stringValue != null && m.hasOwnProperty("stringValue")) {
                    p.value = 1;
                    if (!$util.isString(m.stringValue))
                        return "stringValue: string expected";
                }
                if (m.boolValue != null && m.hasOwnProperty("boolValue")) {
                    if (p.value === 1)
                        return "value: multiple values";
                    p.value = 1;
                    if (typeof m.boolValue !== "boolean")
                        return "boolValue: boolean expected";
                }
                if (m.intValue != null && m.hasOwnProperty("intValue")) {
                    if (p.value === 1)
                        return "value: multiple values";
                    p.value = 1;
                    if (!$util.isInteger(m.intValue) && !(m.intValue && $util.isInteger(m.intValue.low) && $util.isInteger(m.intValue.high)))
                        return "intValue: integer|Long expected";
                }
                if (m.jsonValue != null && m.hasOwnProperty("jsonValue")) {
                    if (p.value === 1)
                        return "value: multiple values";
                    p.value = 1;
                    if (!$util.isString(m.jsonValue))
                        return "jsonValue: string expected";
                }
                return null;
            };

            /**
             * Creates a ChromeMetadata message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeMetadata
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeMetadata} ChromeMetadata
             */
            ChromeMetadata.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeMetadata)
                    return d;
                var m = new $root.perfetto.protos.ChromeMetadata();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.stringValue != null) {
                    m.stringValue = String(d.stringValue);
                }
                if (d.boolValue != null) {
                    m.boolValue = Boolean(d.boolValue);
                }
                if (d.intValue != null) {
                    if ($util.Long)
                        (m.intValue = $util.Long.fromValue(d.intValue)).unsigned = false;
                    else if (typeof d.intValue === "string")
                        m.intValue = parseInt(d.intValue, 10);
                    else if (typeof d.intValue === "number")
                        m.intValue = d.intValue;
                    else if (typeof d.intValue === "object")
                        m.intValue = new $util.LongBits(d.intValue.low >>> 0, d.intValue.high >>> 0).toNumber();
                }
                if (d.jsonValue != null) {
                    m.jsonValue = String(d.jsonValue);
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeMetadata message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeMetadata
             * @static
             * @param {perfetto.protos.ChromeMetadata} m ChromeMetadata
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeMetadata.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.stringValue != null && m.hasOwnProperty("stringValue")) {
                    d.stringValue = m.stringValue;
                    if (o.oneofs)
                        d.value = "stringValue";
                }
                if (m.boolValue != null && m.hasOwnProperty("boolValue")) {
                    d.boolValue = m.boolValue;
                    if (o.oneofs)
                        d.value = "boolValue";
                }
                if (m.intValue != null && m.hasOwnProperty("intValue")) {
                    if (typeof m.intValue === "number")
                        d.intValue = o.longs === String ? String(m.intValue) : m.intValue;
                    else
                        d.intValue = o.longs === String ? $util.Long.prototype.toString.call(m.intValue) : o.longs === Number ? new $util.LongBits(m.intValue.low >>> 0, m.intValue.high >>> 0).toNumber() : m.intValue;
                    if (o.oneofs)
                        d.value = "intValue";
                }
                if (m.jsonValue != null && m.hasOwnProperty("jsonValue")) {
                    d.jsonValue = m.jsonValue;
                    if (o.oneofs)
                        d.value = "jsonValue";
                }
                return d;
            };

            /**
             * Converts this ChromeMetadata to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeMetadata
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeMetadata.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ChromeMetadata;
        })();

        protos.ChromeLegacyJsonTrace = (function() {

            /**
             * Properties of a ChromeLegacyJsonTrace.
             * @memberof perfetto.protos
             * @interface IChromeLegacyJsonTrace
             * @property {perfetto.protos.ChromeLegacyJsonTrace.TraceType|null} [type] ChromeLegacyJsonTrace type
             * @property {string|null} [data] ChromeLegacyJsonTrace data
             */

            /**
             * Constructs a new ChromeLegacyJsonTrace.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeLegacyJsonTrace.
             * @implements IChromeLegacyJsonTrace
             * @constructor
             * @param {perfetto.protos.IChromeLegacyJsonTrace=} [p] Properties to set
             */
            function ChromeLegacyJsonTrace(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeLegacyJsonTrace type.
             * @member {perfetto.protos.ChromeLegacyJsonTrace.TraceType} type
             * @memberof perfetto.protos.ChromeLegacyJsonTrace
             * @instance
             */
            ChromeLegacyJsonTrace.prototype.type = 0;

            /**
             * ChromeLegacyJsonTrace data.
             * @member {string} data
             * @memberof perfetto.protos.ChromeLegacyJsonTrace
             * @instance
             */
            ChromeLegacyJsonTrace.prototype.data = "";

            /**
             * Creates a new ChromeLegacyJsonTrace instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeLegacyJsonTrace
             * @static
             * @param {perfetto.protos.IChromeLegacyJsonTrace=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeLegacyJsonTrace} ChromeLegacyJsonTrace instance
             */
            ChromeLegacyJsonTrace.create = function create(properties) {
                return new ChromeLegacyJsonTrace(properties);
            };

            /**
             * Encodes the specified ChromeLegacyJsonTrace message. Does not implicitly {@link perfetto.protos.ChromeLegacyJsonTrace.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeLegacyJsonTrace
             * @static
             * @param {perfetto.protos.IChromeLegacyJsonTrace} m ChromeLegacyJsonTrace message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeLegacyJsonTrace.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                    w.uint32(8).int32(m.type);
                if (m.data != null && Object.hasOwnProperty.call(m, "data"))
                    w.uint32(18).string(m.data);
                return w;
            };

            /**
             * Encodes the specified ChromeLegacyJsonTrace message, length delimited. Does not implicitly {@link perfetto.protos.ChromeLegacyJsonTrace.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeLegacyJsonTrace
             * @static
             * @param {perfetto.protos.IChromeLegacyJsonTrace} message ChromeLegacyJsonTrace message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeLegacyJsonTrace.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeLegacyJsonTrace message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeLegacyJsonTrace
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeLegacyJsonTrace} ChromeLegacyJsonTrace
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeLegacyJsonTrace.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeLegacyJsonTrace();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.type = r.int32();
                        break;
                    case 2:
                        m.data = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeLegacyJsonTrace message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeLegacyJsonTrace
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeLegacyJsonTrace} ChromeLegacyJsonTrace
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeLegacyJsonTrace.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeLegacyJsonTrace message.
             * @function verify
             * @memberof perfetto.protos.ChromeLegacyJsonTrace
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeLegacyJsonTrace.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.type != null && m.hasOwnProperty("type")) {
                    switch (m.type) {
                    default:
                        return "type: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                }
                if (m.data != null && m.hasOwnProperty("data")) {
                    if (!$util.isString(m.data))
                        return "data: string expected";
                }
                return null;
            };

            /**
             * Creates a ChromeLegacyJsonTrace message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeLegacyJsonTrace
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeLegacyJsonTrace} ChromeLegacyJsonTrace
             */
            ChromeLegacyJsonTrace.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeLegacyJsonTrace)
                    return d;
                var m = new $root.perfetto.protos.ChromeLegacyJsonTrace();
                switch (d.type) {
                case "USER_TRACE":
                case 0:
                    m.type = 0;
                    break;
                case "SYSTEM_TRACE":
                case 1:
                    m.type = 1;
                    break;
                }
                if (d.data != null) {
                    m.data = String(d.data);
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeLegacyJsonTrace message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeLegacyJsonTrace
             * @static
             * @param {perfetto.protos.ChromeLegacyJsonTrace} m ChromeLegacyJsonTrace
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeLegacyJsonTrace.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.type = o.enums === String ? "USER_TRACE" : 0;
                    d.data = "";
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    d.type = o.enums === String ? $root.perfetto.protos.ChromeLegacyJsonTrace.TraceType[m.type] : m.type;
                }
                if (m.data != null && m.hasOwnProperty("data")) {
                    d.data = m.data;
                }
                return d;
            };

            /**
             * Converts this ChromeLegacyJsonTrace to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeLegacyJsonTrace
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeLegacyJsonTrace.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * TraceType enum.
             * @name perfetto.protos.ChromeLegacyJsonTrace.TraceType
             * @enum {number}
             * @property {number} USER_TRACE=0 USER_TRACE value
             * @property {number} SYSTEM_TRACE=1 SYSTEM_TRACE value
             */
            ChromeLegacyJsonTrace.TraceType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "USER_TRACE"] = 0;
                values[valuesById[1] = "SYSTEM_TRACE"] = 1;
                return values;
            })();

            return ChromeLegacyJsonTrace;
        })();

        protos.ChromeEventBundle = (function() {

            /**
             * Properties of a ChromeEventBundle.
             * @memberof perfetto.protos
             * @interface IChromeEventBundle
             * @property {Array.<perfetto.protos.IChromeTraceEvent>|null} [traceEvents] ChromeEventBundle traceEvents
             * @property {Array.<perfetto.protos.IChromeMetadata>|null} [metadata] ChromeEventBundle metadata
             * @property {Array.<string>|null} [legacyFtraceOutput] ChromeEventBundle legacyFtraceOutput
             * @property {Array.<perfetto.protos.IChromeLegacyJsonTrace>|null} [legacyJsonTrace] ChromeEventBundle legacyJsonTrace
             * @property {Array.<perfetto.protos.IChromeStringTableEntry>|null} [stringTable] ChromeEventBundle stringTable
             */

            /**
             * Constructs a new ChromeEventBundle.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeEventBundle.
             * @implements IChromeEventBundle
             * @constructor
             * @param {perfetto.protos.IChromeEventBundle=} [p] Properties to set
             */
            function ChromeEventBundle(p) {
                this.traceEvents = [];
                this.metadata = [];
                this.legacyFtraceOutput = [];
                this.legacyJsonTrace = [];
                this.stringTable = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeEventBundle traceEvents.
             * @member {Array.<perfetto.protos.IChromeTraceEvent>} traceEvents
             * @memberof perfetto.protos.ChromeEventBundle
             * @instance
             */
            ChromeEventBundle.prototype.traceEvents = $util.emptyArray;

            /**
             * ChromeEventBundle metadata.
             * @member {Array.<perfetto.protos.IChromeMetadata>} metadata
             * @memberof perfetto.protos.ChromeEventBundle
             * @instance
             */
            ChromeEventBundle.prototype.metadata = $util.emptyArray;

            /**
             * ChromeEventBundle legacyFtraceOutput.
             * @member {Array.<string>} legacyFtraceOutput
             * @memberof perfetto.protos.ChromeEventBundle
             * @instance
             */
            ChromeEventBundle.prototype.legacyFtraceOutput = $util.emptyArray;

            /**
             * ChromeEventBundle legacyJsonTrace.
             * @member {Array.<perfetto.protos.IChromeLegacyJsonTrace>} legacyJsonTrace
             * @memberof perfetto.protos.ChromeEventBundle
             * @instance
             */
            ChromeEventBundle.prototype.legacyJsonTrace = $util.emptyArray;

            /**
             * ChromeEventBundle stringTable.
             * @member {Array.<perfetto.protos.IChromeStringTableEntry>} stringTable
             * @memberof perfetto.protos.ChromeEventBundle
             * @instance
             */
            ChromeEventBundle.prototype.stringTable = $util.emptyArray;

            /**
             * Creates a new ChromeEventBundle instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeEventBundle
             * @static
             * @param {perfetto.protos.IChromeEventBundle=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeEventBundle} ChromeEventBundle instance
             */
            ChromeEventBundle.create = function create(properties) {
                return new ChromeEventBundle(properties);
            };

            /**
             * Encodes the specified ChromeEventBundle message. Does not implicitly {@link perfetto.protos.ChromeEventBundle.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeEventBundle
             * @static
             * @param {perfetto.protos.IChromeEventBundle} m ChromeEventBundle message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeEventBundle.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.traceEvents != null && m.traceEvents.length) {
                    for (var i = 0; i < m.traceEvents.length; ++i)
                        $root.perfetto.protos.ChromeTraceEvent.encode(m.traceEvents[i], w.uint32(10).fork()).ldelim();
                }
                if (m.metadata != null && m.metadata.length) {
                    for (var i = 0; i < m.metadata.length; ++i)
                        $root.perfetto.protos.ChromeMetadata.encode(m.metadata[i], w.uint32(18).fork()).ldelim();
                }
                if (m.stringTable != null && m.stringTable.length) {
                    for (var i = 0; i < m.stringTable.length; ++i)
                        $root.perfetto.protos.ChromeStringTableEntry.encode(m.stringTable[i], w.uint32(26).fork()).ldelim();
                }
                if (m.legacyFtraceOutput != null && m.legacyFtraceOutput.length) {
                    for (var i = 0; i < m.legacyFtraceOutput.length; ++i)
                        w.uint32(34).string(m.legacyFtraceOutput[i]);
                }
                if (m.legacyJsonTrace != null && m.legacyJsonTrace.length) {
                    for (var i = 0; i < m.legacyJsonTrace.length; ++i)
                        $root.perfetto.protos.ChromeLegacyJsonTrace.encode(m.legacyJsonTrace[i], w.uint32(42).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified ChromeEventBundle message, length delimited. Does not implicitly {@link perfetto.protos.ChromeEventBundle.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeEventBundle
             * @static
             * @param {perfetto.protos.IChromeEventBundle} message ChromeEventBundle message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeEventBundle.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeEventBundle message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeEventBundle
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeEventBundle} ChromeEventBundle
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeEventBundle.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeEventBundle();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.traceEvents && m.traceEvents.length))
                            m.traceEvents = [];
                        m.traceEvents.push($root.perfetto.protos.ChromeTraceEvent.decode(r, r.uint32()));
                        break;
                    case 2:
                        if (!(m.metadata && m.metadata.length))
                            m.metadata = [];
                        m.metadata.push($root.perfetto.protos.ChromeMetadata.decode(r, r.uint32()));
                        break;
                    case 4:
                        if (!(m.legacyFtraceOutput && m.legacyFtraceOutput.length))
                            m.legacyFtraceOutput = [];
                        m.legacyFtraceOutput.push(r.string());
                        break;
                    case 5:
                        if (!(m.legacyJsonTrace && m.legacyJsonTrace.length))
                            m.legacyJsonTrace = [];
                        m.legacyJsonTrace.push($root.perfetto.protos.ChromeLegacyJsonTrace.decode(r, r.uint32()));
                        break;
                    case 3:
                        if (!(m.stringTable && m.stringTable.length))
                            m.stringTable = [];
                        m.stringTable.push($root.perfetto.protos.ChromeStringTableEntry.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeEventBundle message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeEventBundle
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeEventBundle} ChromeEventBundle
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeEventBundle.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeEventBundle message.
             * @function verify
             * @memberof perfetto.protos.ChromeEventBundle
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeEventBundle.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.traceEvents != null && m.hasOwnProperty("traceEvents")) {
                    if (!Array.isArray(m.traceEvents))
                        return "traceEvents: array expected";
                    for (var i = 0; i < m.traceEvents.length; ++i) {
                        {
                            var e = $root.perfetto.protos.ChromeTraceEvent.verify(m.traceEvents[i]);
                            if (e)
                                return "traceEvents." + e;
                        }
                    }
                }
                if (m.metadata != null && m.hasOwnProperty("metadata")) {
                    if (!Array.isArray(m.metadata))
                        return "metadata: array expected";
                    for (var i = 0; i < m.metadata.length; ++i) {
                        {
                            var e = $root.perfetto.protos.ChromeMetadata.verify(m.metadata[i]);
                            if (e)
                                return "metadata." + e;
                        }
                    }
                }
                if (m.legacyFtraceOutput != null && m.hasOwnProperty("legacyFtraceOutput")) {
                    if (!Array.isArray(m.legacyFtraceOutput))
                        return "legacyFtraceOutput: array expected";
                    for (var i = 0; i < m.legacyFtraceOutput.length; ++i) {
                        if (!$util.isString(m.legacyFtraceOutput[i]))
                            return "legacyFtraceOutput: string[] expected";
                    }
                }
                if (m.legacyJsonTrace != null && m.hasOwnProperty("legacyJsonTrace")) {
                    if (!Array.isArray(m.legacyJsonTrace))
                        return "legacyJsonTrace: array expected";
                    for (var i = 0; i < m.legacyJsonTrace.length; ++i) {
                        {
                            var e = $root.perfetto.protos.ChromeLegacyJsonTrace.verify(m.legacyJsonTrace[i]);
                            if (e)
                                return "legacyJsonTrace." + e;
                        }
                    }
                }
                if (m.stringTable != null && m.hasOwnProperty("stringTable")) {
                    if (!Array.isArray(m.stringTable))
                        return "stringTable: array expected";
                    for (var i = 0; i < m.stringTable.length; ++i) {
                        {
                            var e = $root.perfetto.protos.ChromeStringTableEntry.verify(m.stringTable[i]);
                            if (e)
                                return "stringTable." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a ChromeEventBundle message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeEventBundle
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeEventBundle} ChromeEventBundle
             */
            ChromeEventBundle.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeEventBundle)
                    return d;
                var m = new $root.perfetto.protos.ChromeEventBundle();
                if (d.traceEvents) {
                    if (!Array.isArray(d.traceEvents))
                        throw TypeError(".perfetto.protos.ChromeEventBundle.traceEvents: array expected");
                    m.traceEvents = [];
                    for (var i = 0; i < d.traceEvents.length; ++i) {
                        if (typeof d.traceEvents[i] !== "object")
                            throw TypeError(".perfetto.protos.ChromeEventBundle.traceEvents: object expected");
                        m.traceEvents[i] = $root.perfetto.protos.ChromeTraceEvent.fromObject(d.traceEvents[i]);
                    }
                }
                if (d.metadata) {
                    if (!Array.isArray(d.metadata))
                        throw TypeError(".perfetto.protos.ChromeEventBundle.metadata: array expected");
                    m.metadata = [];
                    for (var i = 0; i < d.metadata.length; ++i) {
                        if (typeof d.metadata[i] !== "object")
                            throw TypeError(".perfetto.protos.ChromeEventBundle.metadata: object expected");
                        m.metadata[i] = $root.perfetto.protos.ChromeMetadata.fromObject(d.metadata[i]);
                    }
                }
                if (d.legacyFtraceOutput) {
                    if (!Array.isArray(d.legacyFtraceOutput))
                        throw TypeError(".perfetto.protos.ChromeEventBundle.legacyFtraceOutput: array expected");
                    m.legacyFtraceOutput = [];
                    for (var i = 0; i < d.legacyFtraceOutput.length; ++i) {
                        m.legacyFtraceOutput[i] = String(d.legacyFtraceOutput[i]);
                    }
                }
                if (d.legacyJsonTrace) {
                    if (!Array.isArray(d.legacyJsonTrace))
                        throw TypeError(".perfetto.protos.ChromeEventBundle.legacyJsonTrace: array expected");
                    m.legacyJsonTrace = [];
                    for (var i = 0; i < d.legacyJsonTrace.length; ++i) {
                        if (typeof d.legacyJsonTrace[i] !== "object")
                            throw TypeError(".perfetto.protos.ChromeEventBundle.legacyJsonTrace: object expected");
                        m.legacyJsonTrace[i] = $root.perfetto.protos.ChromeLegacyJsonTrace.fromObject(d.legacyJsonTrace[i]);
                    }
                }
                if (d.stringTable) {
                    if (!Array.isArray(d.stringTable))
                        throw TypeError(".perfetto.protos.ChromeEventBundle.stringTable: array expected");
                    m.stringTable = [];
                    for (var i = 0; i < d.stringTable.length; ++i) {
                        if (typeof d.stringTable[i] !== "object")
                            throw TypeError(".perfetto.protos.ChromeEventBundle.stringTable: object expected");
                        m.stringTable[i] = $root.perfetto.protos.ChromeStringTableEntry.fromObject(d.stringTable[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeEventBundle message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeEventBundle
             * @static
             * @param {perfetto.protos.ChromeEventBundle} m ChromeEventBundle
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeEventBundle.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.traceEvents = [];
                    d.metadata = [];
                    d.stringTable = [];
                    d.legacyFtraceOutput = [];
                    d.legacyJsonTrace = [];
                }
                if (m.traceEvents && m.traceEvents.length) {
                    d.traceEvents = [];
                    for (var j = 0; j < m.traceEvents.length; ++j) {
                        d.traceEvents[j] = $root.perfetto.protos.ChromeTraceEvent.toObject(m.traceEvents[j], o);
                    }
                }
                if (m.metadata && m.metadata.length) {
                    d.metadata = [];
                    for (var j = 0; j < m.metadata.length; ++j) {
                        d.metadata[j] = $root.perfetto.protos.ChromeMetadata.toObject(m.metadata[j], o);
                    }
                }
                if (m.stringTable && m.stringTable.length) {
                    d.stringTable = [];
                    for (var j = 0; j < m.stringTable.length; ++j) {
                        d.stringTable[j] = $root.perfetto.protos.ChromeStringTableEntry.toObject(m.stringTable[j], o);
                    }
                }
                if (m.legacyFtraceOutput && m.legacyFtraceOutput.length) {
                    d.legacyFtraceOutput = [];
                    for (var j = 0; j < m.legacyFtraceOutput.length; ++j) {
                        d.legacyFtraceOutput[j] = m.legacyFtraceOutput[j];
                    }
                }
                if (m.legacyJsonTrace && m.legacyJsonTrace.length) {
                    d.legacyJsonTrace = [];
                    for (var j = 0; j < m.legacyJsonTrace.length; ++j) {
                        d.legacyJsonTrace[j] = $root.perfetto.protos.ChromeLegacyJsonTrace.toObject(m.legacyJsonTrace[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this ChromeEventBundle to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeEventBundle
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeEventBundle.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ChromeEventBundle;
        })();

        protos.ClockSnapshot = (function() {

            /**
             * Properties of a ClockSnapshot.
             * @memberof perfetto.protos
             * @interface IClockSnapshot
             * @property {Array.<perfetto.protos.ClockSnapshot.IClock>|null} [clocks] ClockSnapshot clocks
             * @property {perfetto.protos.BuiltinClock|null} [primaryTraceClock] ClockSnapshot primaryTraceClock
             */

            /**
             * Constructs a new ClockSnapshot.
             * @memberof perfetto.protos
             * @classdesc Represents a ClockSnapshot.
             * @implements IClockSnapshot
             * @constructor
             * @param {perfetto.protos.IClockSnapshot=} [p] Properties to set
             */
            function ClockSnapshot(p) {
                this.clocks = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ClockSnapshot clocks.
             * @member {Array.<perfetto.protos.ClockSnapshot.IClock>} clocks
             * @memberof perfetto.protos.ClockSnapshot
             * @instance
             */
            ClockSnapshot.prototype.clocks = $util.emptyArray;

            /**
             * ClockSnapshot primaryTraceClock.
             * @member {perfetto.protos.BuiltinClock} primaryTraceClock
             * @memberof perfetto.protos.ClockSnapshot
             * @instance
             */
            ClockSnapshot.prototype.primaryTraceClock = 0;

            /**
             * Creates a new ClockSnapshot instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ClockSnapshot
             * @static
             * @param {perfetto.protos.IClockSnapshot=} [properties] Properties to set
             * @returns {perfetto.protos.ClockSnapshot} ClockSnapshot instance
             */
            ClockSnapshot.create = function create(properties) {
                return new ClockSnapshot(properties);
            };

            /**
             * Encodes the specified ClockSnapshot message. Does not implicitly {@link perfetto.protos.ClockSnapshot.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ClockSnapshot
             * @static
             * @param {perfetto.protos.IClockSnapshot} m ClockSnapshot message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ClockSnapshot.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.clocks != null && m.clocks.length) {
                    for (var i = 0; i < m.clocks.length; ++i)
                        $root.perfetto.protos.ClockSnapshot.Clock.encode(m.clocks[i], w.uint32(10).fork()).ldelim();
                }
                if (m.primaryTraceClock != null && Object.hasOwnProperty.call(m, "primaryTraceClock"))
                    w.uint32(16).int32(m.primaryTraceClock);
                return w;
            };

            /**
             * Encodes the specified ClockSnapshot message, length delimited. Does not implicitly {@link perfetto.protos.ClockSnapshot.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ClockSnapshot
             * @static
             * @param {perfetto.protos.IClockSnapshot} message ClockSnapshot message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ClockSnapshot.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ClockSnapshot message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ClockSnapshot
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ClockSnapshot} ClockSnapshot
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ClockSnapshot.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ClockSnapshot();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.clocks && m.clocks.length))
                            m.clocks = [];
                        m.clocks.push($root.perfetto.protos.ClockSnapshot.Clock.decode(r, r.uint32()));
                        break;
                    case 2:
                        m.primaryTraceClock = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ClockSnapshot message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ClockSnapshot
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ClockSnapshot} ClockSnapshot
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ClockSnapshot.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ClockSnapshot message.
             * @function verify
             * @memberof perfetto.protos.ClockSnapshot
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ClockSnapshot.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.clocks != null && m.hasOwnProperty("clocks")) {
                    if (!Array.isArray(m.clocks))
                        return "clocks: array expected";
                    for (var i = 0; i < m.clocks.length; ++i) {
                        {
                            var e = $root.perfetto.protos.ClockSnapshot.Clock.verify(m.clocks[i]);
                            if (e)
                                return "clocks." + e;
                        }
                    }
                }
                if (m.primaryTraceClock != null && m.hasOwnProperty("primaryTraceClock")) {
                    switch (m.primaryTraceClock) {
                    default:
                        return "primaryTraceClock: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                    case 6:
                    case 63:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates a ClockSnapshot message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ClockSnapshot
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ClockSnapshot} ClockSnapshot
             */
            ClockSnapshot.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ClockSnapshot)
                    return d;
                var m = new $root.perfetto.protos.ClockSnapshot();
                if (d.clocks) {
                    if (!Array.isArray(d.clocks))
                        throw TypeError(".perfetto.protos.ClockSnapshot.clocks: array expected");
                    m.clocks = [];
                    for (var i = 0; i < d.clocks.length; ++i) {
                        if (typeof d.clocks[i] !== "object")
                            throw TypeError(".perfetto.protos.ClockSnapshot.clocks: object expected");
                        m.clocks[i] = $root.perfetto.protos.ClockSnapshot.Clock.fromObject(d.clocks[i]);
                    }
                }
                switch (d.primaryTraceClock) {
                case "BUILTIN_CLOCK_UNKNOWN":
                case 0:
                    m.primaryTraceClock = 0;
                    break;
                case "BUILTIN_CLOCK_REALTIME":
                case 1:
                    m.primaryTraceClock = 1;
                    break;
                case "BUILTIN_CLOCK_REALTIME_COARSE":
                case 2:
                    m.primaryTraceClock = 2;
                    break;
                case "BUILTIN_CLOCK_MONOTONIC":
                case 3:
                    m.primaryTraceClock = 3;
                    break;
                case "BUILTIN_CLOCK_MONOTONIC_COARSE":
                case 4:
                    m.primaryTraceClock = 4;
                    break;
                case "BUILTIN_CLOCK_MONOTONIC_RAW":
                case 5:
                    m.primaryTraceClock = 5;
                    break;
                case "BUILTIN_CLOCK_BOOTTIME":
                case 6:
                    m.primaryTraceClock = 6;
                    break;
                case "BUILTIN_CLOCK_MAX_ID":
                case 63:
                    m.primaryTraceClock = 63;
                    break;
                }
                return m;
            };

            /**
             * Creates a plain object from a ClockSnapshot message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ClockSnapshot
             * @static
             * @param {perfetto.protos.ClockSnapshot} m ClockSnapshot
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ClockSnapshot.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.clocks = [];
                }
                if (o.defaults) {
                    d.primaryTraceClock = o.enums === String ? "BUILTIN_CLOCK_UNKNOWN" : 0;
                }
                if (m.clocks && m.clocks.length) {
                    d.clocks = [];
                    for (var j = 0; j < m.clocks.length; ++j) {
                        d.clocks[j] = $root.perfetto.protos.ClockSnapshot.Clock.toObject(m.clocks[j], o);
                    }
                }
                if (m.primaryTraceClock != null && m.hasOwnProperty("primaryTraceClock")) {
                    d.primaryTraceClock = o.enums === String ? $root.perfetto.protos.BuiltinClock[m.primaryTraceClock] : m.primaryTraceClock;
                }
                return d;
            };

            /**
             * Converts this ClockSnapshot to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ClockSnapshot
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ClockSnapshot.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            ClockSnapshot.Clock = (function() {

                /**
                 * Properties of a Clock.
                 * @memberof perfetto.protos.ClockSnapshot
                 * @interface IClock
                 * @property {number|null} [clockId] Clock clockId
                 * @property {number|null} [timestamp] Clock timestamp
                 * @property {boolean|null} [isIncremental] Clock isIncremental
                 * @property {number|null} [unitMultiplierNs] Clock unitMultiplierNs
                 */

                /**
                 * Constructs a new Clock.
                 * @memberof perfetto.protos.ClockSnapshot
                 * @classdesc Represents a Clock.
                 * @implements IClock
                 * @constructor
                 * @param {perfetto.protos.ClockSnapshot.IClock=} [p] Properties to set
                 */
                function Clock(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Clock clockId.
                 * @member {number} clockId
                 * @memberof perfetto.protos.ClockSnapshot.Clock
                 * @instance
                 */
                Clock.prototype.clockId = 0;

                /**
                 * Clock timestamp.
                 * @member {number} timestamp
                 * @memberof perfetto.protos.ClockSnapshot.Clock
                 * @instance
                 */
                Clock.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Clock isIncremental.
                 * @member {boolean} isIncremental
                 * @memberof perfetto.protos.ClockSnapshot.Clock
                 * @instance
                 */
                Clock.prototype.isIncremental = false;

                /**
                 * Clock unitMultiplierNs.
                 * @member {number} unitMultiplierNs
                 * @memberof perfetto.protos.ClockSnapshot.Clock
                 * @instance
                 */
                Clock.prototype.unitMultiplierNs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Creates a new Clock instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.ClockSnapshot.Clock
                 * @static
                 * @param {perfetto.protos.ClockSnapshot.IClock=} [properties] Properties to set
                 * @returns {perfetto.protos.ClockSnapshot.Clock} Clock instance
                 */
                Clock.create = function create(properties) {
                    return new Clock(properties);
                };

                /**
                 * Encodes the specified Clock message. Does not implicitly {@link perfetto.protos.ClockSnapshot.Clock.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.ClockSnapshot.Clock
                 * @static
                 * @param {perfetto.protos.ClockSnapshot.IClock} m Clock message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Clock.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.clockId != null && Object.hasOwnProperty.call(m, "clockId"))
                        w.uint32(8).uint32(m.clockId);
                    if (m.timestamp != null && Object.hasOwnProperty.call(m, "timestamp"))
                        w.uint32(16).uint64(m.timestamp);
                    if (m.isIncremental != null && Object.hasOwnProperty.call(m, "isIncremental"))
                        w.uint32(24).bool(m.isIncremental);
                    if (m.unitMultiplierNs != null && Object.hasOwnProperty.call(m, "unitMultiplierNs"))
                        w.uint32(32).uint64(m.unitMultiplierNs);
                    return w;
                };

                /**
                 * Encodes the specified Clock message, length delimited. Does not implicitly {@link perfetto.protos.ClockSnapshot.Clock.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.ClockSnapshot.Clock
                 * @static
                 * @param {perfetto.protos.ClockSnapshot.IClock} message Clock message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Clock.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Clock message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.ClockSnapshot.Clock
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.ClockSnapshot.Clock} Clock
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Clock.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ClockSnapshot.Clock();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.clockId = r.uint32();
                            break;
                        case 2:
                            m.timestamp = r.uint64();
                            break;
                        case 3:
                            m.isIncremental = r.bool();
                            break;
                        case 4:
                            m.unitMultiplierNs = r.uint64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Clock message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.ClockSnapshot.Clock
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.ClockSnapshot.Clock} Clock
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Clock.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Clock message.
                 * @function verify
                 * @memberof perfetto.protos.ClockSnapshot.Clock
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Clock.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.clockId != null && m.hasOwnProperty("clockId")) {
                        if (!$util.isInteger(m.clockId))
                            return "clockId: integer expected";
                    }
                    if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                        if (!$util.isInteger(m.timestamp) && !(m.timestamp && $util.isInteger(m.timestamp.low) && $util.isInteger(m.timestamp.high)))
                            return "timestamp: integer|Long expected";
                    }
                    if (m.isIncremental != null && m.hasOwnProperty("isIncremental")) {
                        if (typeof m.isIncremental !== "boolean")
                            return "isIncremental: boolean expected";
                    }
                    if (m.unitMultiplierNs != null && m.hasOwnProperty("unitMultiplierNs")) {
                        if (!$util.isInteger(m.unitMultiplierNs) && !(m.unitMultiplierNs && $util.isInteger(m.unitMultiplierNs.low) && $util.isInteger(m.unitMultiplierNs.high)))
                            return "unitMultiplierNs: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a Clock message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.ClockSnapshot.Clock
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.ClockSnapshot.Clock} Clock
                 */
                Clock.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.ClockSnapshot.Clock)
                        return d;
                    var m = new $root.perfetto.protos.ClockSnapshot.Clock();
                    if (d.clockId != null) {
                        m.clockId = d.clockId >>> 0;
                    }
                    if (d.timestamp != null) {
                        if ($util.Long)
                            (m.timestamp = $util.Long.fromValue(d.timestamp)).unsigned = true;
                        else if (typeof d.timestamp === "string")
                            m.timestamp = parseInt(d.timestamp, 10);
                        else if (typeof d.timestamp === "number")
                            m.timestamp = d.timestamp;
                        else if (typeof d.timestamp === "object")
                            m.timestamp = new $util.LongBits(d.timestamp.low >>> 0, d.timestamp.high >>> 0).toNumber(true);
                    }
                    if (d.isIncremental != null) {
                        m.isIncremental = Boolean(d.isIncremental);
                    }
                    if (d.unitMultiplierNs != null) {
                        if ($util.Long)
                            (m.unitMultiplierNs = $util.Long.fromValue(d.unitMultiplierNs)).unsigned = true;
                        else if (typeof d.unitMultiplierNs === "string")
                            m.unitMultiplierNs = parseInt(d.unitMultiplierNs, 10);
                        else if (typeof d.unitMultiplierNs === "number")
                            m.unitMultiplierNs = d.unitMultiplierNs;
                        else if (typeof d.unitMultiplierNs === "object")
                            m.unitMultiplierNs = new $util.LongBits(d.unitMultiplierNs.low >>> 0, d.unitMultiplierNs.high >>> 0).toNumber(true);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Clock message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.ClockSnapshot.Clock
                 * @static
                 * @param {perfetto.protos.ClockSnapshot.Clock} m Clock
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Clock.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.clockId = 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.timestamp = o.longs === String ? "0" : 0;
                        d.isIncremental = false;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.unitMultiplierNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.unitMultiplierNs = o.longs === String ? "0" : 0;
                    }
                    if (m.clockId != null && m.hasOwnProperty("clockId")) {
                        d.clockId = m.clockId;
                    }
                    if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                        if (typeof m.timestamp === "number")
                            d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp;
                        else
                            d.timestamp = o.longs === String ? $util.Long.prototype.toString.call(m.timestamp) : o.longs === Number ? new $util.LongBits(m.timestamp.low >>> 0, m.timestamp.high >>> 0).toNumber(true) : m.timestamp;
                    }
                    if (m.isIncremental != null && m.hasOwnProperty("isIncremental")) {
                        d.isIncremental = m.isIncremental;
                    }
                    if (m.unitMultiplierNs != null && m.hasOwnProperty("unitMultiplierNs")) {
                        if (typeof m.unitMultiplierNs === "number")
                            d.unitMultiplierNs = o.longs === String ? String(m.unitMultiplierNs) : m.unitMultiplierNs;
                        else
                            d.unitMultiplierNs = o.longs === String ? $util.Long.prototype.toString.call(m.unitMultiplierNs) : o.longs === Number ? new $util.LongBits(m.unitMultiplierNs.low >>> 0, m.unitMultiplierNs.high >>> 0).toNumber(true) : m.unitMultiplierNs;
                    }
                    return d;
                };

                /**
                 * Converts this Clock to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.ClockSnapshot.Clock
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Clock.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                /**
                 * BuiltinClocks enum.
                 * @name perfetto.protos.ClockSnapshot.Clock.BuiltinClocks
                 * @enum {number}
                 * @property {number} UNKNOWN=0 UNKNOWN value
                 * @property {number} REALTIME=1 REALTIME value
                 * @property {number} REALTIME_COARSE=2 REALTIME_COARSE value
                 * @property {number} MONOTONIC=3 MONOTONIC value
                 * @property {number} MONOTONIC_COARSE=4 MONOTONIC_COARSE value
                 * @property {number} MONOTONIC_RAW=5 MONOTONIC_RAW value
                 * @property {number} BOOTTIME=6 BOOTTIME value
                 * @property {number} BUILTIN_CLOCK_MAX_ID=63 BUILTIN_CLOCK_MAX_ID value
                 */
                Clock.BuiltinClocks = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "UNKNOWN"] = 0;
                    values[valuesById[1] = "REALTIME"] = 1;
                    values[valuesById[2] = "REALTIME_COARSE"] = 2;
                    values[valuesById[3] = "MONOTONIC"] = 3;
                    values[valuesById[4] = "MONOTONIC_COARSE"] = 4;
                    values[valuesById[5] = "MONOTONIC_RAW"] = 5;
                    values[valuesById[6] = "BOOTTIME"] = 6;
                    values[valuesById[63] = "BUILTIN_CLOCK_MAX_ID"] = 63;
                    return values;
                })();

                return Clock;
            })();

            return ClockSnapshot;
        })();

        protos.InodeFileMap = (function() {

            /**
             * Properties of an InodeFileMap.
             * @memberof perfetto.protos
             * @interface IInodeFileMap
             * @property {number|null} [blockDeviceId] InodeFileMap blockDeviceId
             * @property {Array.<string>|null} [mountPoints] InodeFileMap mountPoints
             * @property {Array.<perfetto.protos.InodeFileMap.IEntry>|null} [entries] InodeFileMap entries
             */

            /**
             * Constructs a new InodeFileMap.
             * @memberof perfetto.protos
             * @classdesc Represents an InodeFileMap.
             * @implements IInodeFileMap
             * @constructor
             * @param {perfetto.protos.IInodeFileMap=} [p] Properties to set
             */
            function InodeFileMap(p) {
                this.mountPoints = [];
                this.entries = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * InodeFileMap blockDeviceId.
             * @member {number} blockDeviceId
             * @memberof perfetto.protos.InodeFileMap
             * @instance
             */
            InodeFileMap.prototype.blockDeviceId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * InodeFileMap mountPoints.
             * @member {Array.<string>} mountPoints
             * @memberof perfetto.protos.InodeFileMap
             * @instance
             */
            InodeFileMap.prototype.mountPoints = $util.emptyArray;

            /**
             * InodeFileMap entries.
             * @member {Array.<perfetto.protos.InodeFileMap.IEntry>} entries
             * @memberof perfetto.protos.InodeFileMap
             * @instance
             */
            InodeFileMap.prototype.entries = $util.emptyArray;

            /**
             * Creates a new InodeFileMap instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.InodeFileMap
             * @static
             * @param {perfetto.protos.IInodeFileMap=} [properties] Properties to set
             * @returns {perfetto.protos.InodeFileMap} InodeFileMap instance
             */
            InodeFileMap.create = function create(properties) {
                return new InodeFileMap(properties);
            };

            /**
             * Encodes the specified InodeFileMap message. Does not implicitly {@link perfetto.protos.InodeFileMap.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.InodeFileMap
             * @static
             * @param {perfetto.protos.IInodeFileMap} m InodeFileMap message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InodeFileMap.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.blockDeviceId != null && Object.hasOwnProperty.call(m, "blockDeviceId"))
                    w.uint32(8).uint64(m.blockDeviceId);
                if (m.mountPoints != null && m.mountPoints.length) {
                    for (var i = 0; i < m.mountPoints.length; ++i)
                        w.uint32(18).string(m.mountPoints[i]);
                }
                if (m.entries != null && m.entries.length) {
                    for (var i = 0; i < m.entries.length; ++i)
                        $root.perfetto.protos.InodeFileMap.Entry.encode(m.entries[i], w.uint32(26).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified InodeFileMap message, length delimited. Does not implicitly {@link perfetto.protos.InodeFileMap.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.InodeFileMap
             * @static
             * @param {perfetto.protos.IInodeFileMap} message InodeFileMap message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InodeFileMap.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an InodeFileMap message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.InodeFileMap
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.InodeFileMap} InodeFileMap
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InodeFileMap.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.InodeFileMap();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.blockDeviceId = r.uint64();
                        break;
                    case 2:
                        if (!(m.mountPoints && m.mountPoints.length))
                            m.mountPoints = [];
                        m.mountPoints.push(r.string());
                        break;
                    case 3:
                        if (!(m.entries && m.entries.length))
                            m.entries = [];
                        m.entries.push($root.perfetto.protos.InodeFileMap.Entry.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an InodeFileMap message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.InodeFileMap
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.InodeFileMap} InodeFileMap
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InodeFileMap.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an InodeFileMap message.
             * @function verify
             * @memberof perfetto.protos.InodeFileMap
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            InodeFileMap.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.blockDeviceId != null && m.hasOwnProperty("blockDeviceId")) {
                    if (!$util.isInteger(m.blockDeviceId) && !(m.blockDeviceId && $util.isInteger(m.blockDeviceId.low) && $util.isInteger(m.blockDeviceId.high)))
                        return "blockDeviceId: integer|Long expected";
                }
                if (m.mountPoints != null && m.hasOwnProperty("mountPoints")) {
                    if (!Array.isArray(m.mountPoints))
                        return "mountPoints: array expected";
                    for (var i = 0; i < m.mountPoints.length; ++i) {
                        if (!$util.isString(m.mountPoints[i]))
                            return "mountPoints: string[] expected";
                    }
                }
                if (m.entries != null && m.hasOwnProperty("entries")) {
                    if (!Array.isArray(m.entries))
                        return "entries: array expected";
                    for (var i = 0; i < m.entries.length; ++i) {
                        {
                            var e = $root.perfetto.protos.InodeFileMap.Entry.verify(m.entries[i]);
                            if (e)
                                return "entries." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an InodeFileMap message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.InodeFileMap
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.InodeFileMap} InodeFileMap
             */
            InodeFileMap.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.InodeFileMap)
                    return d;
                var m = new $root.perfetto.protos.InodeFileMap();
                if (d.blockDeviceId != null) {
                    if ($util.Long)
                        (m.blockDeviceId = $util.Long.fromValue(d.blockDeviceId)).unsigned = true;
                    else if (typeof d.blockDeviceId === "string")
                        m.blockDeviceId = parseInt(d.blockDeviceId, 10);
                    else if (typeof d.blockDeviceId === "number")
                        m.blockDeviceId = d.blockDeviceId;
                    else if (typeof d.blockDeviceId === "object")
                        m.blockDeviceId = new $util.LongBits(d.blockDeviceId.low >>> 0, d.blockDeviceId.high >>> 0).toNumber(true);
                }
                if (d.mountPoints) {
                    if (!Array.isArray(d.mountPoints))
                        throw TypeError(".perfetto.protos.InodeFileMap.mountPoints: array expected");
                    m.mountPoints = [];
                    for (var i = 0; i < d.mountPoints.length; ++i) {
                        m.mountPoints[i] = String(d.mountPoints[i]);
                    }
                }
                if (d.entries) {
                    if (!Array.isArray(d.entries))
                        throw TypeError(".perfetto.protos.InodeFileMap.entries: array expected");
                    m.entries = [];
                    for (var i = 0; i < d.entries.length; ++i) {
                        if (typeof d.entries[i] !== "object")
                            throw TypeError(".perfetto.protos.InodeFileMap.entries: object expected");
                        m.entries[i] = $root.perfetto.protos.InodeFileMap.Entry.fromObject(d.entries[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an InodeFileMap message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.InodeFileMap
             * @static
             * @param {perfetto.protos.InodeFileMap} m InodeFileMap
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            InodeFileMap.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.mountPoints = [];
                    d.entries = [];
                }
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.blockDeviceId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.blockDeviceId = o.longs === String ? "0" : 0;
                }
                if (m.blockDeviceId != null && m.hasOwnProperty("blockDeviceId")) {
                    if (typeof m.blockDeviceId === "number")
                        d.blockDeviceId = o.longs === String ? String(m.blockDeviceId) : m.blockDeviceId;
                    else
                        d.blockDeviceId = o.longs === String ? $util.Long.prototype.toString.call(m.blockDeviceId) : o.longs === Number ? new $util.LongBits(m.blockDeviceId.low >>> 0, m.blockDeviceId.high >>> 0).toNumber(true) : m.blockDeviceId;
                }
                if (m.mountPoints && m.mountPoints.length) {
                    d.mountPoints = [];
                    for (var j = 0; j < m.mountPoints.length; ++j) {
                        d.mountPoints[j] = m.mountPoints[j];
                    }
                }
                if (m.entries && m.entries.length) {
                    d.entries = [];
                    for (var j = 0; j < m.entries.length; ++j) {
                        d.entries[j] = $root.perfetto.protos.InodeFileMap.Entry.toObject(m.entries[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this InodeFileMap to JSON.
             * @function toJSON
             * @memberof perfetto.protos.InodeFileMap
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            InodeFileMap.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            InodeFileMap.Entry = (function() {

                /**
                 * Properties of an Entry.
                 * @memberof perfetto.protos.InodeFileMap
                 * @interface IEntry
                 * @property {number|null} [inodeNumber] Entry inodeNumber
                 * @property {Array.<string>|null} [paths] Entry paths
                 * @property {perfetto.protos.InodeFileMap.Entry.Type|null} [type] Entry type
                 */

                /**
                 * Constructs a new Entry.
                 * @memberof perfetto.protos.InodeFileMap
                 * @classdesc Represents an Entry.
                 * @implements IEntry
                 * @constructor
                 * @param {perfetto.protos.InodeFileMap.IEntry=} [p] Properties to set
                 */
                function Entry(p) {
                    this.paths = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Entry inodeNumber.
                 * @member {number} inodeNumber
                 * @memberof perfetto.protos.InodeFileMap.Entry
                 * @instance
                 */
                Entry.prototype.inodeNumber = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Entry paths.
                 * @member {Array.<string>} paths
                 * @memberof perfetto.protos.InodeFileMap.Entry
                 * @instance
                 */
                Entry.prototype.paths = $util.emptyArray;

                /**
                 * Entry type.
                 * @member {perfetto.protos.InodeFileMap.Entry.Type} type
                 * @memberof perfetto.protos.InodeFileMap.Entry
                 * @instance
                 */
                Entry.prototype.type = 0;

                /**
                 * Creates a new Entry instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.InodeFileMap.Entry
                 * @static
                 * @param {perfetto.protos.InodeFileMap.IEntry=} [properties] Properties to set
                 * @returns {perfetto.protos.InodeFileMap.Entry} Entry instance
                 */
                Entry.create = function create(properties) {
                    return new Entry(properties);
                };

                /**
                 * Encodes the specified Entry message. Does not implicitly {@link perfetto.protos.InodeFileMap.Entry.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.InodeFileMap.Entry
                 * @static
                 * @param {perfetto.protos.InodeFileMap.IEntry} m Entry message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Entry.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.inodeNumber != null && Object.hasOwnProperty.call(m, "inodeNumber"))
                        w.uint32(8).uint64(m.inodeNumber);
                    if (m.paths != null && m.paths.length) {
                        for (var i = 0; i < m.paths.length; ++i)
                            w.uint32(18).string(m.paths[i]);
                    }
                    if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                        w.uint32(24).int32(m.type);
                    return w;
                };

                /**
                 * Encodes the specified Entry message, length delimited. Does not implicitly {@link perfetto.protos.InodeFileMap.Entry.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.InodeFileMap.Entry
                 * @static
                 * @param {perfetto.protos.InodeFileMap.IEntry} message Entry message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Entry.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an Entry message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.InodeFileMap.Entry
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.InodeFileMap.Entry} Entry
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Entry.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.InodeFileMap.Entry();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.inodeNumber = r.uint64();
                            break;
                        case 2:
                            if (!(m.paths && m.paths.length))
                                m.paths = [];
                            m.paths.push(r.string());
                            break;
                        case 3:
                            m.type = r.int32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an Entry message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.InodeFileMap.Entry
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.InodeFileMap.Entry} Entry
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Entry.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an Entry message.
                 * @function verify
                 * @memberof perfetto.protos.InodeFileMap.Entry
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Entry.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.inodeNumber != null && m.hasOwnProperty("inodeNumber")) {
                        if (!$util.isInteger(m.inodeNumber) && !(m.inodeNumber && $util.isInteger(m.inodeNumber.low) && $util.isInteger(m.inodeNumber.high)))
                            return "inodeNumber: integer|Long expected";
                    }
                    if (m.paths != null && m.hasOwnProperty("paths")) {
                        if (!Array.isArray(m.paths))
                            return "paths: array expected";
                        for (var i = 0; i < m.paths.length; ++i) {
                            if (!$util.isString(m.paths[i]))
                                return "paths: string[] expected";
                        }
                    }
                    if (m.type != null && m.hasOwnProperty("type")) {
                        switch (m.type) {
                        default:
                            return "type: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                            break;
                        }
                    }
                    return null;
                };

                /**
                 * Creates an Entry message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.InodeFileMap.Entry
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.InodeFileMap.Entry} Entry
                 */
                Entry.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.InodeFileMap.Entry)
                        return d;
                    var m = new $root.perfetto.protos.InodeFileMap.Entry();
                    if (d.inodeNumber != null) {
                        if ($util.Long)
                            (m.inodeNumber = $util.Long.fromValue(d.inodeNumber)).unsigned = true;
                        else if (typeof d.inodeNumber === "string")
                            m.inodeNumber = parseInt(d.inodeNumber, 10);
                        else if (typeof d.inodeNumber === "number")
                            m.inodeNumber = d.inodeNumber;
                        else if (typeof d.inodeNumber === "object")
                            m.inodeNumber = new $util.LongBits(d.inodeNumber.low >>> 0, d.inodeNumber.high >>> 0).toNumber(true);
                    }
                    if (d.paths) {
                        if (!Array.isArray(d.paths))
                            throw TypeError(".perfetto.protos.InodeFileMap.Entry.paths: array expected");
                        m.paths = [];
                        for (var i = 0; i < d.paths.length; ++i) {
                            m.paths[i] = String(d.paths[i]);
                        }
                    }
                    switch (d.type) {
                    case "UNKNOWN":
                    case 0:
                        m.type = 0;
                        break;
                    case "FILE":
                    case 1:
                        m.type = 1;
                        break;
                    case "DIRECTORY":
                    case 2:
                        m.type = 2;
                        break;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an Entry message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.InodeFileMap.Entry
                 * @static
                 * @param {perfetto.protos.InodeFileMap.Entry} m Entry
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Entry.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.paths = [];
                    }
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.inodeNumber = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.inodeNumber = o.longs === String ? "0" : 0;
                        d.type = o.enums === String ? "UNKNOWN" : 0;
                    }
                    if (m.inodeNumber != null && m.hasOwnProperty("inodeNumber")) {
                        if (typeof m.inodeNumber === "number")
                            d.inodeNumber = o.longs === String ? String(m.inodeNumber) : m.inodeNumber;
                        else
                            d.inodeNumber = o.longs === String ? $util.Long.prototype.toString.call(m.inodeNumber) : o.longs === Number ? new $util.LongBits(m.inodeNumber.low >>> 0, m.inodeNumber.high >>> 0).toNumber(true) : m.inodeNumber;
                    }
                    if (m.paths && m.paths.length) {
                        d.paths = [];
                        for (var j = 0; j < m.paths.length; ++j) {
                            d.paths[j] = m.paths[j];
                        }
                    }
                    if (m.type != null && m.hasOwnProperty("type")) {
                        d.type = o.enums === String ? $root.perfetto.protos.InodeFileMap.Entry.Type[m.type] : m.type;
                    }
                    return d;
                };

                /**
                 * Converts this Entry to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.InodeFileMap.Entry
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Entry.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                /**
                 * Type enum.
                 * @name perfetto.protos.InodeFileMap.Entry.Type
                 * @enum {number}
                 * @property {number} UNKNOWN=0 UNKNOWN value
                 * @property {number} FILE=1 FILE value
                 * @property {number} DIRECTORY=2 DIRECTORY value
                 */
                Entry.Type = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "UNKNOWN"] = 0;
                    values[valuesById[1] = "FILE"] = 1;
                    values[valuesById[2] = "DIRECTORY"] = 2;
                    return values;
                })();

                return Entry;
            })();

            return InodeFileMap;
        })();

        protos.FtraceEventBundle = (function() {

            /**
             * Properties of a FtraceEventBundle.
             * @memberof perfetto.protos
             * @interface IFtraceEventBundle
             * @property {number|null} [cpu] FtraceEventBundle cpu
             * @property {Array.<perfetto.protos.IFtraceEvent>|null} [event] FtraceEventBundle event
             * @property {boolean|null} [lostEvents] FtraceEventBundle lostEvents
             * @property {perfetto.protos.FtraceEventBundle.ICompactSched|null} [compactSched] FtraceEventBundle compactSched
             * @property {perfetto.protos.FtraceClock|null} [ftraceClock] FtraceEventBundle ftraceClock
             * @property {number|null} [ftraceTimestamp] FtraceEventBundle ftraceTimestamp
             * @property {number|null} [bootTimestamp] FtraceEventBundle bootTimestamp
             */

            /**
             * Constructs a new FtraceEventBundle.
             * @memberof perfetto.protos
             * @classdesc Represents a FtraceEventBundle.
             * @implements IFtraceEventBundle
             * @constructor
             * @param {perfetto.protos.IFtraceEventBundle=} [p] Properties to set
             */
            function FtraceEventBundle(p) {
                this.event = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * FtraceEventBundle cpu.
             * @member {number} cpu
             * @memberof perfetto.protos.FtraceEventBundle
             * @instance
             */
            FtraceEventBundle.prototype.cpu = 0;

            /**
             * FtraceEventBundle event.
             * @member {Array.<perfetto.protos.IFtraceEvent>} event
             * @memberof perfetto.protos.FtraceEventBundle
             * @instance
             */
            FtraceEventBundle.prototype.event = $util.emptyArray;

            /**
             * FtraceEventBundle lostEvents.
             * @member {boolean} lostEvents
             * @memberof perfetto.protos.FtraceEventBundle
             * @instance
             */
            FtraceEventBundle.prototype.lostEvents = false;

            /**
             * FtraceEventBundle compactSched.
             * @member {perfetto.protos.FtraceEventBundle.ICompactSched|null|undefined} compactSched
             * @memberof perfetto.protos.FtraceEventBundle
             * @instance
             */
            FtraceEventBundle.prototype.compactSched = null;

            /**
             * FtraceEventBundle ftraceClock.
             * @member {perfetto.protos.FtraceClock} ftraceClock
             * @memberof perfetto.protos.FtraceEventBundle
             * @instance
             */
            FtraceEventBundle.prototype.ftraceClock = 0;

            /**
             * FtraceEventBundle ftraceTimestamp.
             * @member {number} ftraceTimestamp
             * @memberof perfetto.protos.FtraceEventBundle
             * @instance
             */
            FtraceEventBundle.prototype.ftraceTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * FtraceEventBundle bootTimestamp.
             * @member {number} bootTimestamp
             * @memberof perfetto.protos.FtraceEventBundle
             * @instance
             */
            FtraceEventBundle.prototype.bootTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new FtraceEventBundle instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.FtraceEventBundle
             * @static
             * @param {perfetto.protos.IFtraceEventBundle=} [properties] Properties to set
             * @returns {perfetto.protos.FtraceEventBundle} FtraceEventBundle instance
             */
            FtraceEventBundle.create = function create(properties) {
                return new FtraceEventBundle(properties);
            };

            /**
             * Encodes the specified FtraceEventBundle message. Does not implicitly {@link perfetto.protos.FtraceEventBundle.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.FtraceEventBundle
             * @static
             * @param {perfetto.protos.IFtraceEventBundle} m FtraceEventBundle message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FtraceEventBundle.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.cpu != null && Object.hasOwnProperty.call(m, "cpu"))
                    w.uint32(8).uint32(m.cpu);
                if (m.event != null && m.event.length) {
                    for (var i = 0; i < m.event.length; ++i)
                        $root.perfetto.protos.FtraceEvent.encode(m.event[i], w.uint32(18).fork()).ldelim();
                }
                if (m.lostEvents != null && Object.hasOwnProperty.call(m, "lostEvents"))
                    w.uint32(24).bool(m.lostEvents);
                if (m.compactSched != null && Object.hasOwnProperty.call(m, "compactSched"))
                    $root.perfetto.protos.FtraceEventBundle.CompactSched.encode(m.compactSched, w.uint32(34).fork()).ldelim();
                if (m.ftraceClock != null && Object.hasOwnProperty.call(m, "ftraceClock"))
                    w.uint32(40).int32(m.ftraceClock);
                if (m.ftraceTimestamp != null && Object.hasOwnProperty.call(m, "ftraceTimestamp"))
                    w.uint32(48).int64(m.ftraceTimestamp);
                if (m.bootTimestamp != null && Object.hasOwnProperty.call(m, "bootTimestamp"))
                    w.uint32(56).int64(m.bootTimestamp);
                return w;
            };

            /**
             * Encodes the specified FtraceEventBundle message, length delimited. Does not implicitly {@link perfetto.protos.FtraceEventBundle.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.FtraceEventBundle
             * @static
             * @param {perfetto.protos.IFtraceEventBundle} message FtraceEventBundle message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FtraceEventBundle.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a FtraceEventBundle message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.FtraceEventBundle
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.FtraceEventBundle} FtraceEventBundle
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FtraceEventBundle.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FtraceEventBundle();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.cpu = r.uint32();
                        break;
                    case 2:
                        if (!(m.event && m.event.length))
                            m.event = [];
                        m.event.push($root.perfetto.protos.FtraceEvent.decode(r, r.uint32()));
                        break;
                    case 3:
                        m.lostEvents = r.bool();
                        break;
                    case 4:
                        m.compactSched = $root.perfetto.protos.FtraceEventBundle.CompactSched.decode(r, r.uint32());
                        break;
                    case 5:
                        m.ftraceClock = r.int32();
                        break;
                    case 6:
                        m.ftraceTimestamp = r.int64();
                        break;
                    case 7:
                        m.bootTimestamp = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a FtraceEventBundle message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.FtraceEventBundle
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.FtraceEventBundle} FtraceEventBundle
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FtraceEventBundle.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a FtraceEventBundle message.
             * @function verify
             * @memberof perfetto.protos.FtraceEventBundle
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            FtraceEventBundle.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.cpu != null && m.hasOwnProperty("cpu")) {
                    if (!$util.isInteger(m.cpu))
                        return "cpu: integer expected";
                }
                if (m.event != null && m.hasOwnProperty("event")) {
                    if (!Array.isArray(m.event))
                        return "event: array expected";
                    for (var i = 0; i < m.event.length; ++i) {
                        {
                            var e = $root.perfetto.protos.FtraceEvent.verify(m.event[i]);
                            if (e)
                                return "event." + e;
                        }
                    }
                }
                if (m.lostEvents != null && m.hasOwnProperty("lostEvents")) {
                    if (typeof m.lostEvents !== "boolean")
                        return "lostEvents: boolean expected";
                }
                if (m.compactSched != null && m.hasOwnProperty("compactSched")) {
                    {
                        var e = $root.perfetto.protos.FtraceEventBundle.CompactSched.verify(m.compactSched);
                        if (e)
                            return "compactSched." + e;
                    }
                }
                if (m.ftraceClock != null && m.hasOwnProperty("ftraceClock")) {
                    switch (m.ftraceClock) {
                    default:
                        return "ftraceClock: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                }
                if (m.ftraceTimestamp != null && m.hasOwnProperty("ftraceTimestamp")) {
                    if (!$util.isInteger(m.ftraceTimestamp) && !(m.ftraceTimestamp && $util.isInteger(m.ftraceTimestamp.low) && $util.isInteger(m.ftraceTimestamp.high)))
                        return "ftraceTimestamp: integer|Long expected";
                }
                if (m.bootTimestamp != null && m.hasOwnProperty("bootTimestamp")) {
                    if (!$util.isInteger(m.bootTimestamp) && !(m.bootTimestamp && $util.isInteger(m.bootTimestamp.low) && $util.isInteger(m.bootTimestamp.high)))
                        return "bootTimestamp: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a FtraceEventBundle message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.FtraceEventBundle
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.FtraceEventBundle} FtraceEventBundle
             */
            FtraceEventBundle.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.FtraceEventBundle)
                    return d;
                var m = new $root.perfetto.protos.FtraceEventBundle();
                if (d.cpu != null) {
                    m.cpu = d.cpu >>> 0;
                }
                if (d.event) {
                    if (!Array.isArray(d.event))
                        throw TypeError(".perfetto.protos.FtraceEventBundle.event: array expected");
                    m.event = [];
                    for (var i = 0; i < d.event.length; ++i) {
                        if (typeof d.event[i] !== "object")
                            throw TypeError(".perfetto.protos.FtraceEventBundle.event: object expected");
                        m.event[i] = $root.perfetto.protos.FtraceEvent.fromObject(d.event[i]);
                    }
                }
                if (d.lostEvents != null) {
                    m.lostEvents = Boolean(d.lostEvents);
                }
                if (d.compactSched != null) {
                    if (typeof d.compactSched !== "object")
                        throw TypeError(".perfetto.protos.FtraceEventBundle.compactSched: object expected");
                    m.compactSched = $root.perfetto.protos.FtraceEventBundle.CompactSched.fromObject(d.compactSched);
                }
                switch (d.ftraceClock) {
                case "FTRACE_CLOCK_UNSPECIFIED":
                case 0:
                    m.ftraceClock = 0;
                    break;
                case "FTRACE_CLOCK_UNKNOWN":
                case 1:
                    m.ftraceClock = 1;
                    break;
                case "FTRACE_CLOCK_GLOBAL":
                case 2:
                    m.ftraceClock = 2;
                    break;
                case "FTRACE_CLOCK_LOCAL":
                case 3:
                    m.ftraceClock = 3;
                    break;
                }
                if (d.ftraceTimestamp != null) {
                    if ($util.Long)
                        (m.ftraceTimestamp = $util.Long.fromValue(d.ftraceTimestamp)).unsigned = false;
                    else if (typeof d.ftraceTimestamp === "string")
                        m.ftraceTimestamp = parseInt(d.ftraceTimestamp, 10);
                    else if (typeof d.ftraceTimestamp === "number")
                        m.ftraceTimestamp = d.ftraceTimestamp;
                    else if (typeof d.ftraceTimestamp === "object")
                        m.ftraceTimestamp = new $util.LongBits(d.ftraceTimestamp.low >>> 0, d.ftraceTimestamp.high >>> 0).toNumber();
                }
                if (d.bootTimestamp != null) {
                    if ($util.Long)
                        (m.bootTimestamp = $util.Long.fromValue(d.bootTimestamp)).unsigned = false;
                    else if (typeof d.bootTimestamp === "string")
                        m.bootTimestamp = parseInt(d.bootTimestamp, 10);
                    else if (typeof d.bootTimestamp === "number")
                        m.bootTimestamp = d.bootTimestamp;
                    else if (typeof d.bootTimestamp === "object")
                        m.bootTimestamp = new $util.LongBits(d.bootTimestamp.low >>> 0, d.bootTimestamp.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from a FtraceEventBundle message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.FtraceEventBundle
             * @static
             * @param {perfetto.protos.FtraceEventBundle} m FtraceEventBundle
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            FtraceEventBundle.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.event = [];
                }
                if (o.defaults) {
                    d.cpu = 0;
                    d.lostEvents = false;
                    d.compactSched = null;
                    d.ftraceClock = o.enums === String ? "FTRACE_CLOCK_UNSPECIFIED" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.ftraceTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ftraceTimestamp = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.bootTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.bootTimestamp = o.longs === String ? "0" : 0;
                }
                if (m.cpu != null && m.hasOwnProperty("cpu")) {
                    d.cpu = m.cpu;
                }
                if (m.event && m.event.length) {
                    d.event = [];
                    for (var j = 0; j < m.event.length; ++j) {
                        d.event[j] = $root.perfetto.protos.FtraceEvent.toObject(m.event[j], o);
                    }
                }
                if (m.lostEvents != null && m.hasOwnProperty("lostEvents")) {
                    d.lostEvents = m.lostEvents;
                }
                if (m.compactSched != null && m.hasOwnProperty("compactSched")) {
                    d.compactSched = $root.perfetto.protos.FtraceEventBundle.CompactSched.toObject(m.compactSched, o);
                }
                if (m.ftraceClock != null && m.hasOwnProperty("ftraceClock")) {
                    d.ftraceClock = o.enums === String ? $root.perfetto.protos.FtraceClock[m.ftraceClock] : m.ftraceClock;
                }
                if (m.ftraceTimestamp != null && m.hasOwnProperty("ftraceTimestamp")) {
                    if (typeof m.ftraceTimestamp === "number")
                        d.ftraceTimestamp = o.longs === String ? String(m.ftraceTimestamp) : m.ftraceTimestamp;
                    else
                        d.ftraceTimestamp = o.longs === String ? $util.Long.prototype.toString.call(m.ftraceTimestamp) : o.longs === Number ? new $util.LongBits(m.ftraceTimestamp.low >>> 0, m.ftraceTimestamp.high >>> 0).toNumber() : m.ftraceTimestamp;
                }
                if (m.bootTimestamp != null && m.hasOwnProperty("bootTimestamp")) {
                    if (typeof m.bootTimestamp === "number")
                        d.bootTimestamp = o.longs === String ? String(m.bootTimestamp) : m.bootTimestamp;
                    else
                        d.bootTimestamp = o.longs === String ? $util.Long.prototype.toString.call(m.bootTimestamp) : o.longs === Number ? new $util.LongBits(m.bootTimestamp.low >>> 0, m.bootTimestamp.high >>> 0).toNumber() : m.bootTimestamp;
                }
                return d;
            };

            /**
             * Converts this FtraceEventBundle to JSON.
             * @function toJSON
             * @memberof perfetto.protos.FtraceEventBundle
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            FtraceEventBundle.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            FtraceEventBundle.CompactSched = (function() {

                /**
                 * Properties of a CompactSched.
                 * @memberof perfetto.protos.FtraceEventBundle
                 * @interface ICompactSched
                 * @property {Array.<string>|null} [internTable] CompactSched internTable
                 * @property {Array.<number>|null} [switchTimestamp] CompactSched switchTimestamp
                 * @property {Array.<number>|null} [switchPrevState] CompactSched switchPrevState
                 * @property {Array.<number>|null} [switchNextPid] CompactSched switchNextPid
                 * @property {Array.<number>|null} [switchNextPrio] CompactSched switchNextPrio
                 * @property {Array.<number>|null} [switchNextCommIndex] CompactSched switchNextCommIndex
                 * @property {Array.<number>|null} [wakingTimestamp] CompactSched wakingTimestamp
                 * @property {Array.<number>|null} [wakingPid] CompactSched wakingPid
                 * @property {Array.<number>|null} [wakingTargetCpu] CompactSched wakingTargetCpu
                 * @property {Array.<number>|null} [wakingPrio] CompactSched wakingPrio
                 * @property {Array.<number>|null} [wakingCommIndex] CompactSched wakingCommIndex
                 */

                /**
                 * Constructs a new CompactSched.
                 * @memberof perfetto.protos.FtraceEventBundle
                 * @classdesc Represents a CompactSched.
                 * @implements ICompactSched
                 * @constructor
                 * @param {perfetto.protos.FtraceEventBundle.ICompactSched=} [p] Properties to set
                 */
                function CompactSched(p) {
                    this.internTable = [];
                    this.switchTimestamp = [];
                    this.switchPrevState = [];
                    this.switchNextPid = [];
                    this.switchNextPrio = [];
                    this.switchNextCommIndex = [];
                    this.wakingTimestamp = [];
                    this.wakingPid = [];
                    this.wakingTargetCpu = [];
                    this.wakingPrio = [];
                    this.wakingCommIndex = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * CompactSched internTable.
                 * @member {Array.<string>} internTable
                 * @memberof perfetto.protos.FtraceEventBundle.CompactSched
                 * @instance
                 */
                CompactSched.prototype.internTable = $util.emptyArray;

                /**
                 * CompactSched switchTimestamp.
                 * @member {Array.<number>} switchTimestamp
                 * @memberof perfetto.protos.FtraceEventBundle.CompactSched
                 * @instance
                 */
                CompactSched.prototype.switchTimestamp = $util.emptyArray;

                /**
                 * CompactSched switchPrevState.
                 * @member {Array.<number>} switchPrevState
                 * @memberof perfetto.protos.FtraceEventBundle.CompactSched
                 * @instance
                 */
                CompactSched.prototype.switchPrevState = $util.emptyArray;

                /**
                 * CompactSched switchNextPid.
                 * @member {Array.<number>} switchNextPid
                 * @memberof perfetto.protos.FtraceEventBundle.CompactSched
                 * @instance
                 */
                CompactSched.prototype.switchNextPid = $util.emptyArray;

                /**
                 * CompactSched switchNextPrio.
                 * @member {Array.<number>} switchNextPrio
                 * @memberof perfetto.protos.FtraceEventBundle.CompactSched
                 * @instance
                 */
                CompactSched.prototype.switchNextPrio = $util.emptyArray;

                /**
                 * CompactSched switchNextCommIndex.
                 * @member {Array.<number>} switchNextCommIndex
                 * @memberof perfetto.protos.FtraceEventBundle.CompactSched
                 * @instance
                 */
                CompactSched.prototype.switchNextCommIndex = $util.emptyArray;

                /**
                 * CompactSched wakingTimestamp.
                 * @member {Array.<number>} wakingTimestamp
                 * @memberof perfetto.protos.FtraceEventBundle.CompactSched
                 * @instance
                 */
                CompactSched.prototype.wakingTimestamp = $util.emptyArray;

                /**
                 * CompactSched wakingPid.
                 * @member {Array.<number>} wakingPid
                 * @memberof perfetto.protos.FtraceEventBundle.CompactSched
                 * @instance
                 */
                CompactSched.prototype.wakingPid = $util.emptyArray;

                /**
                 * CompactSched wakingTargetCpu.
                 * @member {Array.<number>} wakingTargetCpu
                 * @memberof perfetto.protos.FtraceEventBundle.CompactSched
                 * @instance
                 */
                CompactSched.prototype.wakingTargetCpu = $util.emptyArray;

                /**
                 * CompactSched wakingPrio.
                 * @member {Array.<number>} wakingPrio
                 * @memberof perfetto.protos.FtraceEventBundle.CompactSched
                 * @instance
                 */
                CompactSched.prototype.wakingPrio = $util.emptyArray;

                /**
                 * CompactSched wakingCommIndex.
                 * @member {Array.<number>} wakingCommIndex
                 * @memberof perfetto.protos.FtraceEventBundle.CompactSched
                 * @instance
                 */
                CompactSched.prototype.wakingCommIndex = $util.emptyArray;

                /**
                 * Creates a new CompactSched instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.FtraceEventBundle.CompactSched
                 * @static
                 * @param {perfetto.protos.FtraceEventBundle.ICompactSched=} [properties] Properties to set
                 * @returns {perfetto.protos.FtraceEventBundle.CompactSched} CompactSched instance
                 */
                CompactSched.create = function create(properties) {
                    return new CompactSched(properties);
                };

                /**
                 * Encodes the specified CompactSched message. Does not implicitly {@link perfetto.protos.FtraceEventBundle.CompactSched.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.FtraceEventBundle.CompactSched
                 * @static
                 * @param {perfetto.protos.FtraceEventBundle.ICompactSched} m CompactSched message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CompactSched.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.switchTimestamp != null && m.switchTimestamp.length) {
                        w.uint32(10).fork();
                        for (var i = 0; i < m.switchTimestamp.length; ++i)
                            w.uint64(m.switchTimestamp[i]);
                        w.ldelim();
                    }
                    if (m.switchPrevState != null && m.switchPrevState.length) {
                        w.uint32(18).fork();
                        for (var i = 0; i < m.switchPrevState.length; ++i)
                            w.int64(m.switchPrevState[i]);
                        w.ldelim();
                    }
                    if (m.switchNextPid != null && m.switchNextPid.length) {
                        w.uint32(26).fork();
                        for (var i = 0; i < m.switchNextPid.length; ++i)
                            w.int32(m.switchNextPid[i]);
                        w.ldelim();
                    }
                    if (m.switchNextPrio != null && m.switchNextPrio.length) {
                        w.uint32(34).fork();
                        for (var i = 0; i < m.switchNextPrio.length; ++i)
                            w.int32(m.switchNextPrio[i]);
                        w.ldelim();
                    }
                    if (m.internTable != null && m.internTable.length) {
                        for (var i = 0; i < m.internTable.length; ++i)
                            w.uint32(42).string(m.internTable[i]);
                    }
                    if (m.switchNextCommIndex != null && m.switchNextCommIndex.length) {
                        w.uint32(50).fork();
                        for (var i = 0; i < m.switchNextCommIndex.length; ++i)
                            w.uint32(m.switchNextCommIndex[i]);
                        w.ldelim();
                    }
                    if (m.wakingTimestamp != null && m.wakingTimestamp.length) {
                        w.uint32(58).fork();
                        for (var i = 0; i < m.wakingTimestamp.length; ++i)
                            w.uint64(m.wakingTimestamp[i]);
                        w.ldelim();
                    }
                    if (m.wakingPid != null && m.wakingPid.length) {
                        w.uint32(66).fork();
                        for (var i = 0; i < m.wakingPid.length; ++i)
                            w.int32(m.wakingPid[i]);
                        w.ldelim();
                    }
                    if (m.wakingTargetCpu != null && m.wakingTargetCpu.length) {
                        w.uint32(74).fork();
                        for (var i = 0; i < m.wakingTargetCpu.length; ++i)
                            w.int32(m.wakingTargetCpu[i]);
                        w.ldelim();
                    }
                    if (m.wakingPrio != null && m.wakingPrio.length) {
                        w.uint32(82).fork();
                        for (var i = 0; i < m.wakingPrio.length; ++i)
                            w.int32(m.wakingPrio[i]);
                        w.ldelim();
                    }
                    if (m.wakingCommIndex != null && m.wakingCommIndex.length) {
                        w.uint32(90).fork();
                        for (var i = 0; i < m.wakingCommIndex.length; ++i)
                            w.uint32(m.wakingCommIndex[i]);
                        w.ldelim();
                    }
                    return w;
                };

                /**
                 * Encodes the specified CompactSched message, length delimited. Does not implicitly {@link perfetto.protos.FtraceEventBundle.CompactSched.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.FtraceEventBundle.CompactSched
                 * @static
                 * @param {perfetto.protos.FtraceEventBundle.ICompactSched} message CompactSched message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CompactSched.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a CompactSched message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.FtraceEventBundle.CompactSched
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.FtraceEventBundle.CompactSched} CompactSched
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CompactSched.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FtraceEventBundle.CompactSched();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 5:
                            if (!(m.internTable && m.internTable.length))
                                m.internTable = [];
                            m.internTable.push(r.string());
                            break;
                        case 1:
                            if (!(m.switchTimestamp && m.switchTimestamp.length))
                                m.switchTimestamp = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.switchTimestamp.push(r.uint64());
                            } else
                                m.switchTimestamp.push(r.uint64());
                            break;
                        case 2:
                            if (!(m.switchPrevState && m.switchPrevState.length))
                                m.switchPrevState = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.switchPrevState.push(r.int64());
                            } else
                                m.switchPrevState.push(r.int64());
                            break;
                        case 3:
                            if (!(m.switchNextPid && m.switchNextPid.length))
                                m.switchNextPid = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.switchNextPid.push(r.int32());
                            } else
                                m.switchNextPid.push(r.int32());
                            break;
                        case 4:
                            if (!(m.switchNextPrio && m.switchNextPrio.length))
                                m.switchNextPrio = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.switchNextPrio.push(r.int32());
                            } else
                                m.switchNextPrio.push(r.int32());
                            break;
                        case 6:
                            if (!(m.switchNextCommIndex && m.switchNextCommIndex.length))
                                m.switchNextCommIndex = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.switchNextCommIndex.push(r.uint32());
                            } else
                                m.switchNextCommIndex.push(r.uint32());
                            break;
                        case 7:
                            if (!(m.wakingTimestamp && m.wakingTimestamp.length))
                                m.wakingTimestamp = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.wakingTimestamp.push(r.uint64());
                            } else
                                m.wakingTimestamp.push(r.uint64());
                            break;
                        case 8:
                            if (!(m.wakingPid && m.wakingPid.length))
                                m.wakingPid = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.wakingPid.push(r.int32());
                            } else
                                m.wakingPid.push(r.int32());
                            break;
                        case 9:
                            if (!(m.wakingTargetCpu && m.wakingTargetCpu.length))
                                m.wakingTargetCpu = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.wakingTargetCpu.push(r.int32());
                            } else
                                m.wakingTargetCpu.push(r.int32());
                            break;
                        case 10:
                            if (!(m.wakingPrio && m.wakingPrio.length))
                                m.wakingPrio = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.wakingPrio.push(r.int32());
                            } else
                                m.wakingPrio.push(r.int32());
                            break;
                        case 11:
                            if (!(m.wakingCommIndex && m.wakingCommIndex.length))
                                m.wakingCommIndex = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.wakingCommIndex.push(r.uint32());
                            } else
                                m.wakingCommIndex.push(r.uint32());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a CompactSched message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.FtraceEventBundle.CompactSched
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.FtraceEventBundle.CompactSched} CompactSched
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CompactSched.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a CompactSched message.
                 * @function verify
                 * @memberof perfetto.protos.FtraceEventBundle.CompactSched
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                CompactSched.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.internTable != null && m.hasOwnProperty("internTable")) {
                        if (!Array.isArray(m.internTable))
                            return "internTable: array expected";
                        for (var i = 0; i < m.internTable.length; ++i) {
                            if (!$util.isString(m.internTable[i]))
                                return "internTable: string[] expected";
                        }
                    }
                    if (m.switchTimestamp != null && m.hasOwnProperty("switchTimestamp")) {
                        if (!Array.isArray(m.switchTimestamp))
                            return "switchTimestamp: array expected";
                        for (var i = 0; i < m.switchTimestamp.length; ++i) {
                            if (!$util.isInteger(m.switchTimestamp[i]) && !(m.switchTimestamp[i] && $util.isInteger(m.switchTimestamp[i].low) && $util.isInteger(m.switchTimestamp[i].high)))
                                return "switchTimestamp: integer|Long[] expected";
                        }
                    }
                    if (m.switchPrevState != null && m.hasOwnProperty("switchPrevState")) {
                        if (!Array.isArray(m.switchPrevState))
                            return "switchPrevState: array expected";
                        for (var i = 0; i < m.switchPrevState.length; ++i) {
                            if (!$util.isInteger(m.switchPrevState[i]) && !(m.switchPrevState[i] && $util.isInteger(m.switchPrevState[i].low) && $util.isInteger(m.switchPrevState[i].high)))
                                return "switchPrevState: integer|Long[] expected";
                        }
                    }
                    if (m.switchNextPid != null && m.hasOwnProperty("switchNextPid")) {
                        if (!Array.isArray(m.switchNextPid))
                            return "switchNextPid: array expected";
                        for (var i = 0; i < m.switchNextPid.length; ++i) {
                            if (!$util.isInteger(m.switchNextPid[i]))
                                return "switchNextPid: integer[] expected";
                        }
                    }
                    if (m.switchNextPrio != null && m.hasOwnProperty("switchNextPrio")) {
                        if (!Array.isArray(m.switchNextPrio))
                            return "switchNextPrio: array expected";
                        for (var i = 0; i < m.switchNextPrio.length; ++i) {
                            if (!$util.isInteger(m.switchNextPrio[i]))
                                return "switchNextPrio: integer[] expected";
                        }
                    }
                    if (m.switchNextCommIndex != null && m.hasOwnProperty("switchNextCommIndex")) {
                        if (!Array.isArray(m.switchNextCommIndex))
                            return "switchNextCommIndex: array expected";
                        for (var i = 0; i < m.switchNextCommIndex.length; ++i) {
                            if (!$util.isInteger(m.switchNextCommIndex[i]))
                                return "switchNextCommIndex: integer[] expected";
                        }
                    }
                    if (m.wakingTimestamp != null && m.hasOwnProperty("wakingTimestamp")) {
                        if (!Array.isArray(m.wakingTimestamp))
                            return "wakingTimestamp: array expected";
                        for (var i = 0; i < m.wakingTimestamp.length; ++i) {
                            if (!$util.isInteger(m.wakingTimestamp[i]) && !(m.wakingTimestamp[i] && $util.isInteger(m.wakingTimestamp[i].low) && $util.isInteger(m.wakingTimestamp[i].high)))
                                return "wakingTimestamp: integer|Long[] expected";
                        }
                    }
                    if (m.wakingPid != null && m.hasOwnProperty("wakingPid")) {
                        if (!Array.isArray(m.wakingPid))
                            return "wakingPid: array expected";
                        for (var i = 0; i < m.wakingPid.length; ++i) {
                            if (!$util.isInteger(m.wakingPid[i]))
                                return "wakingPid: integer[] expected";
                        }
                    }
                    if (m.wakingTargetCpu != null && m.hasOwnProperty("wakingTargetCpu")) {
                        if (!Array.isArray(m.wakingTargetCpu))
                            return "wakingTargetCpu: array expected";
                        for (var i = 0; i < m.wakingTargetCpu.length; ++i) {
                            if (!$util.isInteger(m.wakingTargetCpu[i]))
                                return "wakingTargetCpu: integer[] expected";
                        }
                    }
                    if (m.wakingPrio != null && m.hasOwnProperty("wakingPrio")) {
                        if (!Array.isArray(m.wakingPrio))
                            return "wakingPrio: array expected";
                        for (var i = 0; i < m.wakingPrio.length; ++i) {
                            if (!$util.isInteger(m.wakingPrio[i]))
                                return "wakingPrio: integer[] expected";
                        }
                    }
                    if (m.wakingCommIndex != null && m.hasOwnProperty("wakingCommIndex")) {
                        if (!Array.isArray(m.wakingCommIndex))
                            return "wakingCommIndex: array expected";
                        for (var i = 0; i < m.wakingCommIndex.length; ++i) {
                            if (!$util.isInteger(m.wakingCommIndex[i]))
                                return "wakingCommIndex: integer[] expected";
                        }
                    }
                    return null;
                };

                /**
                 * Creates a CompactSched message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.FtraceEventBundle.CompactSched
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.FtraceEventBundle.CompactSched} CompactSched
                 */
                CompactSched.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.FtraceEventBundle.CompactSched)
                        return d;
                    var m = new $root.perfetto.protos.FtraceEventBundle.CompactSched();
                    if (d.internTable) {
                        if (!Array.isArray(d.internTable))
                            throw TypeError(".perfetto.protos.FtraceEventBundle.CompactSched.internTable: array expected");
                        m.internTable = [];
                        for (var i = 0; i < d.internTable.length; ++i) {
                            m.internTable[i] = String(d.internTable[i]);
                        }
                    }
                    if (d.switchTimestamp) {
                        if (!Array.isArray(d.switchTimestamp))
                            throw TypeError(".perfetto.protos.FtraceEventBundle.CompactSched.switchTimestamp: array expected");
                        m.switchTimestamp = [];
                        for (var i = 0; i < d.switchTimestamp.length; ++i) {
                            if ($util.Long)
                                (m.switchTimestamp[i] = $util.Long.fromValue(d.switchTimestamp[i])).unsigned = true;
                            else if (typeof d.switchTimestamp[i] === "string")
                                m.switchTimestamp[i] = parseInt(d.switchTimestamp[i], 10);
                            else if (typeof d.switchTimestamp[i] === "number")
                                m.switchTimestamp[i] = d.switchTimestamp[i];
                            else if (typeof d.switchTimestamp[i] === "object")
                                m.switchTimestamp[i] = new $util.LongBits(d.switchTimestamp[i].low >>> 0, d.switchTimestamp[i].high >>> 0).toNumber(true);
                        }
                    }
                    if (d.switchPrevState) {
                        if (!Array.isArray(d.switchPrevState))
                            throw TypeError(".perfetto.protos.FtraceEventBundle.CompactSched.switchPrevState: array expected");
                        m.switchPrevState = [];
                        for (var i = 0; i < d.switchPrevState.length; ++i) {
                            if ($util.Long)
                                (m.switchPrevState[i] = $util.Long.fromValue(d.switchPrevState[i])).unsigned = false;
                            else if (typeof d.switchPrevState[i] === "string")
                                m.switchPrevState[i] = parseInt(d.switchPrevState[i], 10);
                            else if (typeof d.switchPrevState[i] === "number")
                                m.switchPrevState[i] = d.switchPrevState[i];
                            else if (typeof d.switchPrevState[i] === "object")
                                m.switchPrevState[i] = new $util.LongBits(d.switchPrevState[i].low >>> 0, d.switchPrevState[i].high >>> 0).toNumber();
                        }
                    }
                    if (d.switchNextPid) {
                        if (!Array.isArray(d.switchNextPid))
                            throw TypeError(".perfetto.protos.FtraceEventBundle.CompactSched.switchNextPid: array expected");
                        m.switchNextPid = [];
                        for (var i = 0; i < d.switchNextPid.length; ++i) {
                            m.switchNextPid[i] = d.switchNextPid[i] | 0;
                        }
                    }
                    if (d.switchNextPrio) {
                        if (!Array.isArray(d.switchNextPrio))
                            throw TypeError(".perfetto.protos.FtraceEventBundle.CompactSched.switchNextPrio: array expected");
                        m.switchNextPrio = [];
                        for (var i = 0; i < d.switchNextPrio.length; ++i) {
                            m.switchNextPrio[i] = d.switchNextPrio[i] | 0;
                        }
                    }
                    if (d.switchNextCommIndex) {
                        if (!Array.isArray(d.switchNextCommIndex))
                            throw TypeError(".perfetto.protos.FtraceEventBundle.CompactSched.switchNextCommIndex: array expected");
                        m.switchNextCommIndex = [];
                        for (var i = 0; i < d.switchNextCommIndex.length; ++i) {
                            m.switchNextCommIndex[i] = d.switchNextCommIndex[i] >>> 0;
                        }
                    }
                    if (d.wakingTimestamp) {
                        if (!Array.isArray(d.wakingTimestamp))
                            throw TypeError(".perfetto.protos.FtraceEventBundle.CompactSched.wakingTimestamp: array expected");
                        m.wakingTimestamp = [];
                        for (var i = 0; i < d.wakingTimestamp.length; ++i) {
                            if ($util.Long)
                                (m.wakingTimestamp[i] = $util.Long.fromValue(d.wakingTimestamp[i])).unsigned = true;
                            else if (typeof d.wakingTimestamp[i] === "string")
                                m.wakingTimestamp[i] = parseInt(d.wakingTimestamp[i], 10);
                            else if (typeof d.wakingTimestamp[i] === "number")
                                m.wakingTimestamp[i] = d.wakingTimestamp[i];
                            else if (typeof d.wakingTimestamp[i] === "object")
                                m.wakingTimestamp[i] = new $util.LongBits(d.wakingTimestamp[i].low >>> 0, d.wakingTimestamp[i].high >>> 0).toNumber(true);
                        }
                    }
                    if (d.wakingPid) {
                        if (!Array.isArray(d.wakingPid))
                            throw TypeError(".perfetto.protos.FtraceEventBundle.CompactSched.wakingPid: array expected");
                        m.wakingPid = [];
                        for (var i = 0; i < d.wakingPid.length; ++i) {
                            m.wakingPid[i] = d.wakingPid[i] | 0;
                        }
                    }
                    if (d.wakingTargetCpu) {
                        if (!Array.isArray(d.wakingTargetCpu))
                            throw TypeError(".perfetto.protos.FtraceEventBundle.CompactSched.wakingTargetCpu: array expected");
                        m.wakingTargetCpu = [];
                        for (var i = 0; i < d.wakingTargetCpu.length; ++i) {
                            m.wakingTargetCpu[i] = d.wakingTargetCpu[i] | 0;
                        }
                    }
                    if (d.wakingPrio) {
                        if (!Array.isArray(d.wakingPrio))
                            throw TypeError(".perfetto.protos.FtraceEventBundle.CompactSched.wakingPrio: array expected");
                        m.wakingPrio = [];
                        for (var i = 0; i < d.wakingPrio.length; ++i) {
                            m.wakingPrio[i] = d.wakingPrio[i] | 0;
                        }
                    }
                    if (d.wakingCommIndex) {
                        if (!Array.isArray(d.wakingCommIndex))
                            throw TypeError(".perfetto.protos.FtraceEventBundle.CompactSched.wakingCommIndex: array expected");
                        m.wakingCommIndex = [];
                        for (var i = 0; i < d.wakingCommIndex.length; ++i) {
                            m.wakingCommIndex[i] = d.wakingCommIndex[i] >>> 0;
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a CompactSched message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.FtraceEventBundle.CompactSched
                 * @static
                 * @param {perfetto.protos.FtraceEventBundle.CompactSched} m CompactSched
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                CompactSched.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.switchTimestamp = [];
                        d.switchPrevState = [];
                        d.switchNextPid = [];
                        d.switchNextPrio = [];
                        d.internTable = [];
                        d.switchNextCommIndex = [];
                        d.wakingTimestamp = [];
                        d.wakingPid = [];
                        d.wakingTargetCpu = [];
                        d.wakingPrio = [];
                        d.wakingCommIndex = [];
                    }
                    if (m.switchTimestamp && m.switchTimestamp.length) {
                        d.switchTimestamp = [];
                        for (var j = 0; j < m.switchTimestamp.length; ++j) {
                            if (typeof m.switchTimestamp[j] === "number")
                                d.switchTimestamp[j] = o.longs === String ? String(m.switchTimestamp[j]) : m.switchTimestamp[j];
                            else
                                d.switchTimestamp[j] = o.longs === String ? $util.Long.prototype.toString.call(m.switchTimestamp[j]) : o.longs === Number ? new $util.LongBits(m.switchTimestamp[j].low >>> 0, m.switchTimestamp[j].high >>> 0).toNumber(true) : m.switchTimestamp[j];
                        }
                    }
                    if (m.switchPrevState && m.switchPrevState.length) {
                        d.switchPrevState = [];
                        for (var j = 0; j < m.switchPrevState.length; ++j) {
                            if (typeof m.switchPrevState[j] === "number")
                                d.switchPrevState[j] = o.longs === String ? String(m.switchPrevState[j]) : m.switchPrevState[j];
                            else
                                d.switchPrevState[j] = o.longs === String ? $util.Long.prototype.toString.call(m.switchPrevState[j]) : o.longs === Number ? new $util.LongBits(m.switchPrevState[j].low >>> 0, m.switchPrevState[j].high >>> 0).toNumber() : m.switchPrevState[j];
                        }
                    }
                    if (m.switchNextPid && m.switchNextPid.length) {
                        d.switchNextPid = [];
                        for (var j = 0; j < m.switchNextPid.length; ++j) {
                            d.switchNextPid[j] = m.switchNextPid[j];
                        }
                    }
                    if (m.switchNextPrio && m.switchNextPrio.length) {
                        d.switchNextPrio = [];
                        for (var j = 0; j < m.switchNextPrio.length; ++j) {
                            d.switchNextPrio[j] = m.switchNextPrio[j];
                        }
                    }
                    if (m.internTable && m.internTable.length) {
                        d.internTable = [];
                        for (var j = 0; j < m.internTable.length; ++j) {
                            d.internTable[j] = m.internTable[j];
                        }
                    }
                    if (m.switchNextCommIndex && m.switchNextCommIndex.length) {
                        d.switchNextCommIndex = [];
                        for (var j = 0; j < m.switchNextCommIndex.length; ++j) {
                            d.switchNextCommIndex[j] = m.switchNextCommIndex[j];
                        }
                    }
                    if (m.wakingTimestamp && m.wakingTimestamp.length) {
                        d.wakingTimestamp = [];
                        for (var j = 0; j < m.wakingTimestamp.length; ++j) {
                            if (typeof m.wakingTimestamp[j] === "number")
                                d.wakingTimestamp[j] = o.longs === String ? String(m.wakingTimestamp[j]) : m.wakingTimestamp[j];
                            else
                                d.wakingTimestamp[j] = o.longs === String ? $util.Long.prototype.toString.call(m.wakingTimestamp[j]) : o.longs === Number ? new $util.LongBits(m.wakingTimestamp[j].low >>> 0, m.wakingTimestamp[j].high >>> 0).toNumber(true) : m.wakingTimestamp[j];
                        }
                    }
                    if (m.wakingPid && m.wakingPid.length) {
                        d.wakingPid = [];
                        for (var j = 0; j < m.wakingPid.length; ++j) {
                            d.wakingPid[j] = m.wakingPid[j];
                        }
                    }
                    if (m.wakingTargetCpu && m.wakingTargetCpu.length) {
                        d.wakingTargetCpu = [];
                        for (var j = 0; j < m.wakingTargetCpu.length; ++j) {
                            d.wakingTargetCpu[j] = m.wakingTargetCpu[j];
                        }
                    }
                    if (m.wakingPrio && m.wakingPrio.length) {
                        d.wakingPrio = [];
                        for (var j = 0; j < m.wakingPrio.length; ++j) {
                            d.wakingPrio[j] = m.wakingPrio[j];
                        }
                    }
                    if (m.wakingCommIndex && m.wakingCommIndex.length) {
                        d.wakingCommIndex = [];
                        for (var j = 0; j < m.wakingCommIndex.length; ++j) {
                            d.wakingCommIndex[j] = m.wakingCommIndex[j];
                        }
                    }
                    return d;
                };

                /**
                 * Converts this CompactSched to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.FtraceEventBundle.CompactSched
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                CompactSched.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return CompactSched;
            })();

            return FtraceEventBundle;
        })();

        /**
         * FtraceClock enum.
         * @name perfetto.protos.FtraceClock
         * @enum {number}
         * @property {number} FTRACE_CLOCK_UNSPECIFIED=0 FTRACE_CLOCK_UNSPECIFIED value
         * @property {number} FTRACE_CLOCK_UNKNOWN=1 FTRACE_CLOCK_UNKNOWN value
         * @property {number} FTRACE_CLOCK_GLOBAL=2 FTRACE_CLOCK_GLOBAL value
         * @property {number} FTRACE_CLOCK_LOCAL=3 FTRACE_CLOCK_LOCAL value
         */
        protos.FtraceClock = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "FTRACE_CLOCK_UNSPECIFIED"] = 0;
            values[valuesById[1] = "FTRACE_CLOCK_UNKNOWN"] = 1;
            values[valuesById[2] = "FTRACE_CLOCK_GLOBAL"] = 2;
            values[valuesById[3] = "FTRACE_CLOCK_LOCAL"] = 3;
            return values;
        })();

        protos.FtraceEvent = (function() {

            /**
             * Properties of a FtraceEvent.
             * @memberof perfetto.protos
             * @interface IFtraceEvent
             * @property {number|null} [timestamp] FtraceEvent timestamp
             * @property {number|null} [pid] FtraceEvent pid
             * @property {perfetto.protos.IPrintFtraceEvent|null} [print] FtraceEvent print
             * @property {perfetto.protos.ISchedSwitchFtraceEvent|null} [schedSwitch] FtraceEvent schedSwitch
             * @property {perfetto.protos.ICpuFrequencyFtraceEvent|null} [cpuFrequency] FtraceEvent cpuFrequency
             * @property {perfetto.protos.ICpuFrequencyLimitsFtraceEvent|null} [cpuFrequencyLimits] FtraceEvent cpuFrequencyLimits
             * @property {perfetto.protos.ICpuIdleFtraceEvent|null} [cpuIdle] FtraceEvent cpuIdle
             * @property {perfetto.protos.IClockEnableFtraceEvent|null} [clockEnable] FtraceEvent clockEnable
             * @property {perfetto.protos.IClockDisableFtraceEvent|null} [clockDisable] FtraceEvent clockDisable
             * @property {perfetto.protos.IClockSetRateFtraceEvent|null} [clockSetRate] FtraceEvent clockSetRate
             * @property {perfetto.protos.ISchedWakeupFtraceEvent|null} [schedWakeup] FtraceEvent schedWakeup
             * @property {perfetto.protos.ISchedBlockedReasonFtraceEvent|null} [schedBlockedReason] FtraceEvent schedBlockedReason
             * @property {perfetto.protos.ISchedCpuHotplugFtraceEvent|null} [schedCpuHotplug] FtraceEvent schedCpuHotplug
             * @property {perfetto.protos.ISchedWakingFtraceEvent|null} [schedWaking] FtraceEvent schedWaking
             * @property {perfetto.protos.IIpiEntryFtraceEvent|null} [ipiEntry] FtraceEvent ipiEntry
             * @property {perfetto.protos.IIpiExitFtraceEvent|null} [ipiExit] FtraceEvent ipiExit
             * @property {perfetto.protos.IIpiRaiseFtraceEvent|null} [ipiRaise] FtraceEvent ipiRaise
             * @property {perfetto.protos.ISoftirqEntryFtraceEvent|null} [softirqEntry] FtraceEvent softirqEntry
             * @property {perfetto.protos.ISoftirqExitFtraceEvent|null} [softirqExit] FtraceEvent softirqExit
             * @property {perfetto.protos.ISoftirqRaiseFtraceEvent|null} [softirqRaise] FtraceEvent softirqRaise
             * @property {perfetto.protos.II2cReadFtraceEvent|null} [i2cRead] FtraceEvent i2cRead
             * @property {perfetto.protos.II2cWriteFtraceEvent|null} [i2cWrite] FtraceEvent i2cWrite
             * @property {perfetto.protos.II2cResultFtraceEvent|null} [i2cResult] FtraceEvent i2cResult
             * @property {perfetto.protos.II2cReplyFtraceEvent|null} [i2cReply] FtraceEvent i2cReply
             * @property {perfetto.protos.ISmbusReadFtraceEvent|null} [smbusRead] FtraceEvent smbusRead
             * @property {perfetto.protos.ISmbusWriteFtraceEvent|null} [smbusWrite] FtraceEvent smbusWrite
             * @property {perfetto.protos.ISmbusResultFtraceEvent|null} [smbusResult] FtraceEvent smbusResult
             * @property {perfetto.protos.ISmbusReplyFtraceEvent|null} [smbusReply] FtraceEvent smbusReply
             * @property {perfetto.protos.ILowmemoryKillFtraceEvent|null} [lowmemoryKill] FtraceEvent lowmemoryKill
             * @property {perfetto.protos.IIrqHandlerEntryFtraceEvent|null} [irqHandlerEntry] FtraceEvent irqHandlerEntry
             * @property {perfetto.protos.IIrqHandlerExitFtraceEvent|null} [irqHandlerExit] FtraceEvent irqHandlerExit
             * @property {perfetto.protos.ISyncPtFtraceEvent|null} [syncPt] FtraceEvent syncPt
             * @property {perfetto.protos.ISyncTimelineFtraceEvent|null} [syncTimeline] FtraceEvent syncTimeline
             * @property {perfetto.protos.ISyncWaitFtraceEvent|null} [syncWait] FtraceEvent syncWait
             * @property {perfetto.protos.IExt4DaWriteBeginFtraceEvent|null} [ext4DaWriteBegin] FtraceEvent ext4DaWriteBegin
             * @property {perfetto.protos.IExt4DaWriteEndFtraceEvent|null} [ext4DaWriteEnd] FtraceEvent ext4DaWriteEnd
             * @property {perfetto.protos.IExt4SyncFileEnterFtraceEvent|null} [ext4SyncFileEnter] FtraceEvent ext4SyncFileEnter
             * @property {perfetto.protos.IExt4SyncFileExitFtraceEvent|null} [ext4SyncFileExit] FtraceEvent ext4SyncFileExit
             * @property {perfetto.protos.IBlockRqIssueFtraceEvent|null} [blockRqIssue] FtraceEvent blockRqIssue
             * @property {perfetto.protos.IMmVmscanDirectReclaimBeginFtraceEvent|null} [mmVmscanDirectReclaimBegin] FtraceEvent mmVmscanDirectReclaimBegin
             * @property {perfetto.protos.IMmVmscanDirectReclaimEndFtraceEvent|null} [mmVmscanDirectReclaimEnd] FtraceEvent mmVmscanDirectReclaimEnd
             * @property {perfetto.protos.IMmVmscanKswapdWakeFtraceEvent|null} [mmVmscanKswapdWake] FtraceEvent mmVmscanKswapdWake
             * @property {perfetto.protos.IMmVmscanKswapdSleepFtraceEvent|null} [mmVmscanKswapdSleep] FtraceEvent mmVmscanKswapdSleep
             * @property {perfetto.protos.IBinderTransactionFtraceEvent|null} [binderTransaction] FtraceEvent binderTransaction
             * @property {perfetto.protos.IBinderTransactionReceivedFtraceEvent|null} [binderTransactionReceived] FtraceEvent binderTransactionReceived
             * @property {perfetto.protos.IBinderSetPriorityFtraceEvent|null} [binderSetPriority] FtraceEvent binderSetPriority
             * @property {perfetto.protos.IBinderLockFtraceEvent|null} [binderLock] FtraceEvent binderLock
             * @property {perfetto.protos.IBinderLockedFtraceEvent|null} [binderLocked] FtraceEvent binderLocked
             * @property {perfetto.protos.IBinderUnlockFtraceEvent|null} [binderUnlock] FtraceEvent binderUnlock
             * @property {perfetto.protos.IWorkqueueActivateWorkFtraceEvent|null} [workqueueActivateWork] FtraceEvent workqueueActivateWork
             * @property {perfetto.protos.IWorkqueueExecuteEndFtraceEvent|null} [workqueueExecuteEnd] FtraceEvent workqueueExecuteEnd
             * @property {perfetto.protos.IWorkqueueExecuteStartFtraceEvent|null} [workqueueExecuteStart] FtraceEvent workqueueExecuteStart
             * @property {perfetto.protos.IWorkqueueQueueWorkFtraceEvent|null} [workqueueQueueWork] FtraceEvent workqueueQueueWork
             * @property {perfetto.protos.IRegulatorDisableFtraceEvent|null} [regulatorDisable] FtraceEvent regulatorDisable
             * @property {perfetto.protos.IRegulatorDisableCompleteFtraceEvent|null} [regulatorDisableComplete] FtraceEvent regulatorDisableComplete
             * @property {perfetto.protos.IRegulatorEnableFtraceEvent|null} [regulatorEnable] FtraceEvent regulatorEnable
             * @property {perfetto.protos.IRegulatorEnableCompleteFtraceEvent|null} [regulatorEnableComplete] FtraceEvent regulatorEnableComplete
             * @property {perfetto.protos.IRegulatorEnableDelayFtraceEvent|null} [regulatorEnableDelay] FtraceEvent regulatorEnableDelay
             * @property {perfetto.protos.IRegulatorSetVoltageFtraceEvent|null} [regulatorSetVoltage] FtraceEvent regulatorSetVoltage
             * @property {perfetto.protos.IRegulatorSetVoltageCompleteFtraceEvent|null} [regulatorSetVoltageComplete] FtraceEvent regulatorSetVoltageComplete
             * @property {perfetto.protos.ICgroupAttachTaskFtraceEvent|null} [cgroupAttachTask] FtraceEvent cgroupAttachTask
             * @property {perfetto.protos.ICgroupMkdirFtraceEvent|null} [cgroupMkdir] FtraceEvent cgroupMkdir
             * @property {perfetto.protos.ICgroupRemountFtraceEvent|null} [cgroupRemount] FtraceEvent cgroupRemount
             * @property {perfetto.protos.ICgroupRmdirFtraceEvent|null} [cgroupRmdir] FtraceEvent cgroupRmdir
             * @property {perfetto.protos.ICgroupTransferTasksFtraceEvent|null} [cgroupTransferTasks] FtraceEvent cgroupTransferTasks
             * @property {perfetto.protos.ICgroupDestroyRootFtraceEvent|null} [cgroupDestroyRoot] FtraceEvent cgroupDestroyRoot
             * @property {perfetto.protos.ICgroupReleaseFtraceEvent|null} [cgroupRelease] FtraceEvent cgroupRelease
             * @property {perfetto.protos.ICgroupRenameFtraceEvent|null} [cgroupRename] FtraceEvent cgroupRename
             * @property {perfetto.protos.ICgroupSetupRootFtraceEvent|null} [cgroupSetupRoot] FtraceEvent cgroupSetupRoot
             * @property {perfetto.protos.IMdpCmdKickoffFtraceEvent|null} [mdpCmdKickoff] FtraceEvent mdpCmdKickoff
             * @property {perfetto.protos.IMdpCommitFtraceEvent|null} [mdpCommit] FtraceEvent mdpCommit
             * @property {perfetto.protos.IMdpPerfSetOtFtraceEvent|null} [mdpPerfSetOt] FtraceEvent mdpPerfSetOt
             * @property {perfetto.protos.IMdpSsppChangeFtraceEvent|null} [mdpSsppChange] FtraceEvent mdpSsppChange
             * @property {perfetto.protos.ITracingMarkWriteFtraceEvent|null} [tracingMarkWrite] FtraceEvent tracingMarkWrite
             * @property {perfetto.protos.IMdpCmdPingpongDoneFtraceEvent|null} [mdpCmdPingpongDone] FtraceEvent mdpCmdPingpongDone
             * @property {perfetto.protos.IMdpCompareBwFtraceEvent|null} [mdpCompareBw] FtraceEvent mdpCompareBw
             * @property {perfetto.protos.IMdpPerfSetPanicLutsFtraceEvent|null} [mdpPerfSetPanicLuts] FtraceEvent mdpPerfSetPanicLuts
             * @property {perfetto.protos.IMdpSsppSetFtraceEvent|null} [mdpSsppSet] FtraceEvent mdpSsppSet
             * @property {perfetto.protos.IMdpCmdReadptrDoneFtraceEvent|null} [mdpCmdReadptrDone] FtraceEvent mdpCmdReadptrDone
             * @property {perfetto.protos.IMdpMisrCrcFtraceEvent|null} [mdpMisrCrc] FtraceEvent mdpMisrCrc
             * @property {perfetto.protos.IMdpPerfSetQosLutsFtraceEvent|null} [mdpPerfSetQosLuts] FtraceEvent mdpPerfSetQosLuts
             * @property {perfetto.protos.IMdpTraceCounterFtraceEvent|null} [mdpTraceCounter] FtraceEvent mdpTraceCounter
             * @property {perfetto.protos.IMdpCmdReleaseBwFtraceEvent|null} [mdpCmdReleaseBw] FtraceEvent mdpCmdReleaseBw
             * @property {perfetto.protos.IMdpMixerUpdateFtraceEvent|null} [mdpMixerUpdate] FtraceEvent mdpMixerUpdate
             * @property {perfetto.protos.IMdpPerfSetWmLevelsFtraceEvent|null} [mdpPerfSetWmLevels] FtraceEvent mdpPerfSetWmLevels
             * @property {perfetto.protos.IMdpVideoUnderrunDoneFtraceEvent|null} [mdpVideoUnderrunDone] FtraceEvent mdpVideoUnderrunDone
             * @property {perfetto.protos.IMdpCmdWaitPingpongFtraceEvent|null} [mdpCmdWaitPingpong] FtraceEvent mdpCmdWaitPingpong
             * @property {perfetto.protos.IMdpPerfPrefillCalcFtraceEvent|null} [mdpPerfPrefillCalc] FtraceEvent mdpPerfPrefillCalc
             * @property {perfetto.protos.IMdpPerfUpdateBusFtraceEvent|null} [mdpPerfUpdateBus] FtraceEvent mdpPerfUpdateBus
             * @property {perfetto.protos.IRotatorBwAoAsContextFtraceEvent|null} [rotatorBwAoAsContext] FtraceEvent rotatorBwAoAsContext
             * @property {perfetto.protos.IMmFilemapAddToPageCacheFtraceEvent|null} [mmFilemapAddToPageCache] FtraceEvent mmFilemapAddToPageCache
             * @property {perfetto.protos.IMmFilemapDeleteFromPageCacheFtraceEvent|null} [mmFilemapDeleteFromPageCache] FtraceEvent mmFilemapDeleteFromPageCache
             * @property {perfetto.protos.IMmCompactionBeginFtraceEvent|null} [mmCompactionBegin] FtraceEvent mmCompactionBegin
             * @property {perfetto.protos.IMmCompactionDeferCompactionFtraceEvent|null} [mmCompactionDeferCompaction] FtraceEvent mmCompactionDeferCompaction
             * @property {perfetto.protos.IMmCompactionDeferredFtraceEvent|null} [mmCompactionDeferred] FtraceEvent mmCompactionDeferred
             * @property {perfetto.protos.IMmCompactionDeferResetFtraceEvent|null} [mmCompactionDeferReset] FtraceEvent mmCompactionDeferReset
             * @property {perfetto.protos.IMmCompactionEndFtraceEvent|null} [mmCompactionEnd] FtraceEvent mmCompactionEnd
             * @property {perfetto.protos.IMmCompactionFinishedFtraceEvent|null} [mmCompactionFinished] FtraceEvent mmCompactionFinished
             * @property {perfetto.protos.IMmCompactionIsolateFreepagesFtraceEvent|null} [mmCompactionIsolateFreepages] FtraceEvent mmCompactionIsolateFreepages
             * @property {perfetto.protos.IMmCompactionIsolateMigratepagesFtraceEvent|null} [mmCompactionIsolateMigratepages] FtraceEvent mmCompactionIsolateMigratepages
             * @property {perfetto.protos.IMmCompactionKcompactdSleepFtraceEvent|null} [mmCompactionKcompactdSleep] FtraceEvent mmCompactionKcompactdSleep
             * @property {perfetto.protos.IMmCompactionKcompactdWakeFtraceEvent|null} [mmCompactionKcompactdWake] FtraceEvent mmCompactionKcompactdWake
             * @property {perfetto.protos.IMmCompactionMigratepagesFtraceEvent|null} [mmCompactionMigratepages] FtraceEvent mmCompactionMigratepages
             * @property {perfetto.protos.IMmCompactionSuitableFtraceEvent|null} [mmCompactionSuitable] FtraceEvent mmCompactionSuitable
             * @property {perfetto.protos.IMmCompactionTryToCompactPagesFtraceEvent|null} [mmCompactionTryToCompactPages] FtraceEvent mmCompactionTryToCompactPages
             * @property {perfetto.protos.IMmCompactionWakeupKcompactdFtraceEvent|null} [mmCompactionWakeupKcompactd] FtraceEvent mmCompactionWakeupKcompactd
             * @property {perfetto.protos.ISuspendResumeFtraceEvent|null} [suspendResume] FtraceEvent suspendResume
             * @property {perfetto.protos.ISchedWakeupNewFtraceEvent|null} [schedWakeupNew] FtraceEvent schedWakeupNew
             * @property {perfetto.protos.IBlockBioBackmergeFtraceEvent|null} [blockBioBackmerge] FtraceEvent blockBioBackmerge
             * @property {perfetto.protos.IBlockBioBounceFtraceEvent|null} [blockBioBounce] FtraceEvent blockBioBounce
             * @property {perfetto.protos.IBlockBioCompleteFtraceEvent|null} [blockBioComplete] FtraceEvent blockBioComplete
             * @property {perfetto.protos.IBlockBioFrontmergeFtraceEvent|null} [blockBioFrontmerge] FtraceEvent blockBioFrontmerge
             * @property {perfetto.protos.IBlockBioQueueFtraceEvent|null} [blockBioQueue] FtraceEvent blockBioQueue
             * @property {perfetto.protos.IBlockBioRemapFtraceEvent|null} [blockBioRemap] FtraceEvent blockBioRemap
             * @property {perfetto.protos.IBlockDirtyBufferFtraceEvent|null} [blockDirtyBuffer] FtraceEvent blockDirtyBuffer
             * @property {perfetto.protos.IBlockGetrqFtraceEvent|null} [blockGetrq] FtraceEvent blockGetrq
             * @property {perfetto.protos.IBlockPlugFtraceEvent|null} [blockPlug] FtraceEvent blockPlug
             * @property {perfetto.protos.IBlockRqAbortFtraceEvent|null} [blockRqAbort] FtraceEvent blockRqAbort
             * @property {perfetto.protos.IBlockRqCompleteFtraceEvent|null} [blockRqComplete] FtraceEvent blockRqComplete
             * @property {perfetto.protos.IBlockRqInsertFtraceEvent|null} [blockRqInsert] FtraceEvent blockRqInsert
             * @property {perfetto.protos.IBlockRqRemapFtraceEvent|null} [blockRqRemap] FtraceEvent blockRqRemap
             * @property {perfetto.protos.IBlockRqRequeueFtraceEvent|null} [blockRqRequeue] FtraceEvent blockRqRequeue
             * @property {perfetto.protos.IBlockSleeprqFtraceEvent|null} [blockSleeprq] FtraceEvent blockSleeprq
             * @property {perfetto.protos.IBlockSplitFtraceEvent|null} [blockSplit] FtraceEvent blockSplit
             * @property {perfetto.protos.IBlockTouchBufferFtraceEvent|null} [blockTouchBuffer] FtraceEvent blockTouchBuffer
             * @property {perfetto.protos.IBlockUnplugFtraceEvent|null} [blockUnplug] FtraceEvent blockUnplug
             * @property {perfetto.protos.IExt4AllocDaBlocksFtraceEvent|null} [ext4AllocDaBlocks] FtraceEvent ext4AllocDaBlocks
             * @property {perfetto.protos.IExt4AllocateBlocksFtraceEvent|null} [ext4AllocateBlocks] FtraceEvent ext4AllocateBlocks
             * @property {perfetto.protos.IExt4AllocateInodeFtraceEvent|null} [ext4AllocateInode] FtraceEvent ext4AllocateInode
             * @property {perfetto.protos.IExt4BeginOrderedTruncateFtraceEvent|null} [ext4BeginOrderedTruncate] FtraceEvent ext4BeginOrderedTruncate
             * @property {perfetto.protos.IExt4CollapseRangeFtraceEvent|null} [ext4CollapseRange] FtraceEvent ext4CollapseRange
             * @property {perfetto.protos.IExt4DaReleaseSpaceFtraceEvent|null} [ext4DaReleaseSpace] FtraceEvent ext4DaReleaseSpace
             * @property {perfetto.protos.IExt4DaReserveSpaceFtraceEvent|null} [ext4DaReserveSpace] FtraceEvent ext4DaReserveSpace
             * @property {perfetto.protos.IExt4DaUpdateReserveSpaceFtraceEvent|null} [ext4DaUpdateReserveSpace] FtraceEvent ext4DaUpdateReserveSpace
             * @property {perfetto.protos.IExt4DaWritePagesFtraceEvent|null} [ext4DaWritePages] FtraceEvent ext4DaWritePages
             * @property {perfetto.protos.IExt4DaWritePagesExtentFtraceEvent|null} [ext4DaWritePagesExtent] FtraceEvent ext4DaWritePagesExtent
             * @property {perfetto.protos.IExt4DirectIOEnterFtraceEvent|null} [ext4Direct_IOEnter] FtraceEvent ext4Direct_IOEnter
             * @property {perfetto.protos.IExt4DirectIOExitFtraceEvent|null} [ext4Direct_IOExit] FtraceEvent ext4Direct_IOExit
             * @property {perfetto.protos.IExt4DiscardBlocksFtraceEvent|null} [ext4DiscardBlocks] FtraceEvent ext4DiscardBlocks
             * @property {perfetto.protos.IExt4DiscardPreallocationsFtraceEvent|null} [ext4DiscardPreallocations] FtraceEvent ext4DiscardPreallocations
             * @property {perfetto.protos.IExt4DropInodeFtraceEvent|null} [ext4DropInode] FtraceEvent ext4DropInode
             * @property {perfetto.protos.IExt4EsCacheExtentFtraceEvent|null} [ext4EsCacheExtent] FtraceEvent ext4EsCacheExtent
             * @property {perfetto.protos.IExt4EsFindDelayedExtentRangeEnterFtraceEvent|null} [ext4EsFindDelayedExtentRangeEnter] FtraceEvent ext4EsFindDelayedExtentRangeEnter
             * @property {perfetto.protos.IExt4EsFindDelayedExtentRangeExitFtraceEvent|null} [ext4EsFindDelayedExtentRangeExit] FtraceEvent ext4EsFindDelayedExtentRangeExit
             * @property {perfetto.protos.IExt4EsInsertExtentFtraceEvent|null} [ext4EsInsertExtent] FtraceEvent ext4EsInsertExtent
             * @property {perfetto.protos.IExt4EsLookupExtentEnterFtraceEvent|null} [ext4EsLookupExtentEnter] FtraceEvent ext4EsLookupExtentEnter
             * @property {perfetto.protos.IExt4EsLookupExtentExitFtraceEvent|null} [ext4EsLookupExtentExit] FtraceEvent ext4EsLookupExtentExit
             * @property {perfetto.protos.IExt4EsRemoveExtentFtraceEvent|null} [ext4EsRemoveExtent] FtraceEvent ext4EsRemoveExtent
             * @property {perfetto.protos.IExt4EsShrinkFtraceEvent|null} [ext4EsShrink] FtraceEvent ext4EsShrink
             * @property {perfetto.protos.IExt4EsShrinkCountFtraceEvent|null} [ext4EsShrinkCount] FtraceEvent ext4EsShrinkCount
             * @property {perfetto.protos.IExt4EsShrinkScanEnterFtraceEvent|null} [ext4EsShrinkScanEnter] FtraceEvent ext4EsShrinkScanEnter
             * @property {perfetto.protos.IExt4EsShrinkScanExitFtraceEvent|null} [ext4EsShrinkScanExit] FtraceEvent ext4EsShrinkScanExit
             * @property {perfetto.protos.IExt4EvictInodeFtraceEvent|null} [ext4EvictInode] FtraceEvent ext4EvictInode
             * @property {perfetto.protos.IExt4ExtConvertToInitializedEnterFtraceEvent|null} [ext4ExtConvertToInitializedEnter] FtraceEvent ext4ExtConvertToInitializedEnter
             * @property {perfetto.protos.IExt4ExtConvertToInitializedFastpathFtraceEvent|null} [ext4ExtConvertToInitializedFastpath] FtraceEvent ext4ExtConvertToInitializedFastpath
             * @property {perfetto.protos.IExt4ExtHandleUnwrittenExtentsFtraceEvent|null} [ext4ExtHandleUnwrittenExtents] FtraceEvent ext4ExtHandleUnwrittenExtents
             * @property {perfetto.protos.IExt4ExtInCacheFtraceEvent|null} [ext4ExtInCache] FtraceEvent ext4ExtInCache
             * @property {perfetto.protos.IExt4ExtLoadExtentFtraceEvent|null} [ext4ExtLoadExtent] FtraceEvent ext4ExtLoadExtent
             * @property {perfetto.protos.IExt4ExtMapBlocksEnterFtraceEvent|null} [ext4ExtMapBlocksEnter] FtraceEvent ext4ExtMapBlocksEnter
             * @property {perfetto.protos.IExt4ExtMapBlocksExitFtraceEvent|null} [ext4ExtMapBlocksExit] FtraceEvent ext4ExtMapBlocksExit
             * @property {perfetto.protos.IExt4ExtPutInCacheFtraceEvent|null} [ext4ExtPutInCache] FtraceEvent ext4ExtPutInCache
             * @property {perfetto.protos.IExt4ExtRemoveSpaceFtraceEvent|null} [ext4ExtRemoveSpace] FtraceEvent ext4ExtRemoveSpace
             * @property {perfetto.protos.IExt4ExtRemoveSpaceDoneFtraceEvent|null} [ext4ExtRemoveSpaceDone] FtraceEvent ext4ExtRemoveSpaceDone
             * @property {perfetto.protos.IExt4ExtRmIdxFtraceEvent|null} [ext4ExtRmIdx] FtraceEvent ext4ExtRmIdx
             * @property {perfetto.protos.IExt4ExtRmLeafFtraceEvent|null} [ext4ExtRmLeaf] FtraceEvent ext4ExtRmLeaf
             * @property {perfetto.protos.IExt4ExtShowExtentFtraceEvent|null} [ext4ExtShowExtent] FtraceEvent ext4ExtShowExtent
             * @property {perfetto.protos.IExt4FallocateEnterFtraceEvent|null} [ext4FallocateEnter] FtraceEvent ext4FallocateEnter
             * @property {perfetto.protos.IExt4FallocateExitFtraceEvent|null} [ext4FallocateExit] FtraceEvent ext4FallocateExit
             * @property {perfetto.protos.IExt4FindDelallocRangeFtraceEvent|null} [ext4FindDelallocRange] FtraceEvent ext4FindDelallocRange
             * @property {perfetto.protos.IExt4ForgetFtraceEvent|null} [ext4Forget] FtraceEvent ext4Forget
             * @property {perfetto.protos.IExt4FreeBlocksFtraceEvent|null} [ext4FreeBlocks] FtraceEvent ext4FreeBlocks
             * @property {perfetto.protos.IExt4FreeInodeFtraceEvent|null} [ext4FreeInode] FtraceEvent ext4FreeInode
             * @property {perfetto.protos.IExt4GetImpliedClusterAllocExitFtraceEvent|null} [ext4GetImpliedClusterAllocExit] FtraceEvent ext4GetImpliedClusterAllocExit
             * @property {perfetto.protos.IExt4GetReservedClusterAllocFtraceEvent|null} [ext4GetReservedClusterAlloc] FtraceEvent ext4GetReservedClusterAlloc
             * @property {perfetto.protos.IExt4IndMapBlocksEnterFtraceEvent|null} [ext4IndMapBlocksEnter] FtraceEvent ext4IndMapBlocksEnter
             * @property {perfetto.protos.IExt4IndMapBlocksExitFtraceEvent|null} [ext4IndMapBlocksExit] FtraceEvent ext4IndMapBlocksExit
             * @property {perfetto.protos.IExt4InsertRangeFtraceEvent|null} [ext4InsertRange] FtraceEvent ext4InsertRange
             * @property {perfetto.protos.IExt4InvalidatepageFtraceEvent|null} [ext4Invalidatepage] FtraceEvent ext4Invalidatepage
             * @property {perfetto.protos.IExt4JournalStartFtraceEvent|null} [ext4JournalStart] FtraceEvent ext4JournalStart
             * @property {perfetto.protos.IExt4JournalStartReservedFtraceEvent|null} [ext4JournalStartReserved] FtraceEvent ext4JournalStartReserved
             * @property {perfetto.protos.IExt4JournalledInvalidatepageFtraceEvent|null} [ext4JournalledInvalidatepage] FtraceEvent ext4JournalledInvalidatepage
             * @property {perfetto.protos.IExt4JournalledWriteEndFtraceEvent|null} [ext4JournalledWriteEnd] FtraceEvent ext4JournalledWriteEnd
             * @property {perfetto.protos.IExt4LoadInodeFtraceEvent|null} [ext4LoadInode] FtraceEvent ext4LoadInode
             * @property {perfetto.protos.IExt4LoadInodeBitmapFtraceEvent|null} [ext4LoadInodeBitmap] FtraceEvent ext4LoadInodeBitmap
             * @property {perfetto.protos.IExt4MarkInodeDirtyFtraceEvent|null} [ext4MarkInodeDirty] FtraceEvent ext4MarkInodeDirty
             * @property {perfetto.protos.IExt4MbBitmapLoadFtraceEvent|null} [ext4MbBitmapLoad] FtraceEvent ext4MbBitmapLoad
             * @property {perfetto.protos.IExt4MbBuddyBitmapLoadFtraceEvent|null} [ext4MbBuddyBitmapLoad] FtraceEvent ext4MbBuddyBitmapLoad
             * @property {perfetto.protos.IExt4MbDiscardPreallocationsFtraceEvent|null} [ext4MbDiscardPreallocations] FtraceEvent ext4MbDiscardPreallocations
             * @property {perfetto.protos.IExt4MbNewGroupPaFtraceEvent|null} [ext4MbNewGroupPa] FtraceEvent ext4MbNewGroupPa
             * @property {perfetto.protos.IExt4MbNewInodePaFtraceEvent|null} [ext4MbNewInodePa] FtraceEvent ext4MbNewInodePa
             * @property {perfetto.protos.IExt4MbReleaseGroupPaFtraceEvent|null} [ext4MbReleaseGroupPa] FtraceEvent ext4MbReleaseGroupPa
             * @property {perfetto.protos.IExt4MbReleaseInodePaFtraceEvent|null} [ext4MbReleaseInodePa] FtraceEvent ext4MbReleaseInodePa
             * @property {perfetto.protos.IExt4MballocAllocFtraceEvent|null} [ext4MballocAlloc] FtraceEvent ext4MballocAlloc
             * @property {perfetto.protos.IExt4MballocDiscardFtraceEvent|null} [ext4MballocDiscard] FtraceEvent ext4MballocDiscard
             * @property {perfetto.protos.IExt4MballocFreeFtraceEvent|null} [ext4MballocFree] FtraceEvent ext4MballocFree
             * @property {perfetto.protos.IExt4MballocPreallocFtraceEvent|null} [ext4MballocPrealloc] FtraceEvent ext4MballocPrealloc
             * @property {perfetto.protos.IExt4OtherInodeUpdateTimeFtraceEvent|null} [ext4OtherInodeUpdateTime] FtraceEvent ext4OtherInodeUpdateTime
             * @property {perfetto.protos.IExt4PunchHoleFtraceEvent|null} [ext4PunchHole] FtraceEvent ext4PunchHole
             * @property {perfetto.protos.IExt4ReadBlockBitmapLoadFtraceEvent|null} [ext4ReadBlockBitmapLoad] FtraceEvent ext4ReadBlockBitmapLoad
             * @property {perfetto.protos.IExt4ReadpageFtraceEvent|null} [ext4Readpage] FtraceEvent ext4Readpage
             * @property {perfetto.protos.IExt4ReleasepageFtraceEvent|null} [ext4Releasepage] FtraceEvent ext4Releasepage
             * @property {perfetto.protos.IExt4RemoveBlocksFtraceEvent|null} [ext4RemoveBlocks] FtraceEvent ext4RemoveBlocks
             * @property {perfetto.protos.IExt4RequestBlocksFtraceEvent|null} [ext4RequestBlocks] FtraceEvent ext4RequestBlocks
             * @property {perfetto.protos.IExt4RequestInodeFtraceEvent|null} [ext4RequestInode] FtraceEvent ext4RequestInode
             * @property {perfetto.protos.IExt4SyncFsFtraceEvent|null} [ext4SyncFs] FtraceEvent ext4SyncFs
             * @property {perfetto.protos.IExt4TrimAllFreeFtraceEvent|null} [ext4TrimAllFree] FtraceEvent ext4TrimAllFree
             * @property {perfetto.protos.IExt4TrimExtentFtraceEvent|null} [ext4TrimExtent] FtraceEvent ext4TrimExtent
             * @property {perfetto.protos.IExt4TruncateEnterFtraceEvent|null} [ext4TruncateEnter] FtraceEvent ext4TruncateEnter
             * @property {perfetto.protos.IExt4TruncateExitFtraceEvent|null} [ext4TruncateExit] FtraceEvent ext4TruncateExit
             * @property {perfetto.protos.IExt4UnlinkEnterFtraceEvent|null} [ext4UnlinkEnter] FtraceEvent ext4UnlinkEnter
             * @property {perfetto.protos.IExt4UnlinkExitFtraceEvent|null} [ext4UnlinkExit] FtraceEvent ext4UnlinkExit
             * @property {perfetto.protos.IExt4WriteBeginFtraceEvent|null} [ext4WriteBegin] FtraceEvent ext4WriteBegin
             * @property {perfetto.protos.IExt4WriteEndFtraceEvent|null} [ext4WriteEnd] FtraceEvent ext4WriteEnd
             * @property {perfetto.protos.IExt4WritepageFtraceEvent|null} [ext4Writepage] FtraceEvent ext4Writepage
             * @property {perfetto.protos.IExt4WritepagesFtraceEvent|null} [ext4Writepages] FtraceEvent ext4Writepages
             * @property {perfetto.protos.IExt4WritepagesResultFtraceEvent|null} [ext4WritepagesResult] FtraceEvent ext4WritepagesResult
             * @property {perfetto.protos.IExt4ZeroRangeFtraceEvent|null} [ext4ZeroRange] FtraceEvent ext4ZeroRange
             * @property {perfetto.protos.ITaskNewtaskFtraceEvent|null} [taskNewtask] FtraceEvent taskNewtask
             * @property {perfetto.protos.ITaskRenameFtraceEvent|null} [taskRename] FtraceEvent taskRename
             * @property {perfetto.protos.ISchedProcessExecFtraceEvent|null} [schedProcessExec] FtraceEvent schedProcessExec
             * @property {perfetto.protos.ISchedProcessExitFtraceEvent|null} [schedProcessExit] FtraceEvent schedProcessExit
             * @property {perfetto.protos.ISchedProcessForkFtraceEvent|null} [schedProcessFork] FtraceEvent schedProcessFork
             * @property {perfetto.protos.ISchedProcessFreeFtraceEvent|null} [schedProcessFree] FtraceEvent schedProcessFree
             * @property {perfetto.protos.ISchedProcessHangFtraceEvent|null} [schedProcessHang] FtraceEvent schedProcessHang
             * @property {perfetto.protos.ISchedProcessWaitFtraceEvent|null} [schedProcessWait] FtraceEvent schedProcessWait
             * @property {perfetto.protos.IF2fsDoSubmitBioFtraceEvent|null} [f2fsDoSubmitBio] FtraceEvent f2fsDoSubmitBio
             * @property {perfetto.protos.IF2fsEvictInodeFtraceEvent|null} [f2fsEvictInode] FtraceEvent f2fsEvictInode
             * @property {perfetto.protos.IF2fsFallocateFtraceEvent|null} [f2fsFallocate] FtraceEvent f2fsFallocate
             * @property {perfetto.protos.IF2fsGetDataBlockFtraceEvent|null} [f2fsGetDataBlock] FtraceEvent f2fsGetDataBlock
             * @property {perfetto.protos.IF2fsGetVictimFtraceEvent|null} [f2fsGetVictim] FtraceEvent f2fsGetVictim
             * @property {perfetto.protos.IF2fsIgetFtraceEvent|null} [f2fsIget] FtraceEvent f2fsIget
             * @property {perfetto.protos.IF2fsIgetExitFtraceEvent|null} [f2fsIgetExit] FtraceEvent f2fsIgetExit
             * @property {perfetto.protos.IF2fsNewInodeFtraceEvent|null} [f2fsNewInode] FtraceEvent f2fsNewInode
             * @property {perfetto.protos.IF2fsReadpageFtraceEvent|null} [f2fsReadpage] FtraceEvent f2fsReadpage
             * @property {perfetto.protos.IF2fsReserveNewBlockFtraceEvent|null} [f2fsReserveNewBlock] FtraceEvent f2fsReserveNewBlock
             * @property {perfetto.protos.IF2fsSetPageDirtyFtraceEvent|null} [f2fsSetPageDirty] FtraceEvent f2fsSetPageDirty
             * @property {perfetto.protos.IF2fsSubmitWritePageFtraceEvent|null} [f2fsSubmitWritePage] FtraceEvent f2fsSubmitWritePage
             * @property {perfetto.protos.IF2fsSyncFileEnterFtraceEvent|null} [f2fsSyncFileEnter] FtraceEvent f2fsSyncFileEnter
             * @property {perfetto.protos.IF2fsSyncFileExitFtraceEvent|null} [f2fsSyncFileExit] FtraceEvent f2fsSyncFileExit
             * @property {perfetto.protos.IF2fsSyncFsFtraceEvent|null} [f2fsSyncFs] FtraceEvent f2fsSyncFs
             * @property {perfetto.protos.IF2fsTruncateFtraceEvent|null} [f2fsTruncate] FtraceEvent f2fsTruncate
             * @property {perfetto.protos.IF2fsTruncateBlocksEnterFtraceEvent|null} [f2fsTruncateBlocksEnter] FtraceEvent f2fsTruncateBlocksEnter
             * @property {perfetto.protos.IF2fsTruncateBlocksExitFtraceEvent|null} [f2fsTruncateBlocksExit] FtraceEvent f2fsTruncateBlocksExit
             * @property {perfetto.protos.IF2fsTruncateDataBlocksRangeFtraceEvent|null} [f2fsTruncateDataBlocksRange] FtraceEvent f2fsTruncateDataBlocksRange
             * @property {perfetto.protos.IF2fsTruncateInodeBlocksEnterFtraceEvent|null} [f2fsTruncateInodeBlocksEnter] FtraceEvent f2fsTruncateInodeBlocksEnter
             * @property {perfetto.protos.IF2fsTruncateInodeBlocksExitFtraceEvent|null} [f2fsTruncateInodeBlocksExit] FtraceEvent f2fsTruncateInodeBlocksExit
             * @property {perfetto.protos.IF2fsTruncateNodeFtraceEvent|null} [f2fsTruncateNode] FtraceEvent f2fsTruncateNode
             * @property {perfetto.protos.IF2fsTruncateNodesEnterFtraceEvent|null} [f2fsTruncateNodesEnter] FtraceEvent f2fsTruncateNodesEnter
             * @property {perfetto.protos.IF2fsTruncateNodesExitFtraceEvent|null} [f2fsTruncateNodesExit] FtraceEvent f2fsTruncateNodesExit
             * @property {perfetto.protos.IF2fsTruncatePartialNodesFtraceEvent|null} [f2fsTruncatePartialNodes] FtraceEvent f2fsTruncatePartialNodes
             * @property {perfetto.protos.IF2fsUnlinkEnterFtraceEvent|null} [f2fsUnlinkEnter] FtraceEvent f2fsUnlinkEnter
             * @property {perfetto.protos.IF2fsUnlinkExitFtraceEvent|null} [f2fsUnlinkExit] FtraceEvent f2fsUnlinkExit
             * @property {perfetto.protos.IF2fsVmPageMkwriteFtraceEvent|null} [f2fsVmPageMkwrite] FtraceEvent f2fsVmPageMkwrite
             * @property {perfetto.protos.IF2fsWriteBeginFtraceEvent|null} [f2fsWriteBegin] FtraceEvent f2fsWriteBegin
             * @property {perfetto.protos.IF2fsWriteCheckpointFtraceEvent|null} [f2fsWriteCheckpoint] FtraceEvent f2fsWriteCheckpoint
             * @property {perfetto.protos.IF2fsWriteEndFtraceEvent|null} [f2fsWriteEnd] FtraceEvent f2fsWriteEnd
             * @property {perfetto.protos.IAllocPagesIommuEndFtraceEvent|null} [allocPagesIommuEnd] FtraceEvent allocPagesIommuEnd
             * @property {perfetto.protos.IAllocPagesIommuFailFtraceEvent|null} [allocPagesIommuFail] FtraceEvent allocPagesIommuFail
             * @property {perfetto.protos.IAllocPagesIommuStartFtraceEvent|null} [allocPagesIommuStart] FtraceEvent allocPagesIommuStart
             * @property {perfetto.protos.IAllocPagesSysEndFtraceEvent|null} [allocPagesSysEnd] FtraceEvent allocPagesSysEnd
             * @property {perfetto.protos.IAllocPagesSysFailFtraceEvent|null} [allocPagesSysFail] FtraceEvent allocPagesSysFail
             * @property {perfetto.protos.IAllocPagesSysStartFtraceEvent|null} [allocPagesSysStart] FtraceEvent allocPagesSysStart
             * @property {perfetto.protos.IDmaAllocContiguousRetryFtraceEvent|null} [dmaAllocContiguousRetry] FtraceEvent dmaAllocContiguousRetry
             * @property {perfetto.protos.IIommuMapRangeFtraceEvent|null} [iommuMapRange] FtraceEvent iommuMapRange
             * @property {perfetto.protos.IIommuSecPtblMapRangeEndFtraceEvent|null} [iommuSecPtblMapRangeEnd] FtraceEvent iommuSecPtblMapRangeEnd
             * @property {perfetto.protos.IIommuSecPtblMapRangeStartFtraceEvent|null} [iommuSecPtblMapRangeStart] FtraceEvent iommuSecPtblMapRangeStart
             * @property {perfetto.protos.IIonAllocBufferEndFtraceEvent|null} [ionAllocBufferEnd] FtraceEvent ionAllocBufferEnd
             * @property {perfetto.protos.IIonAllocBufferFailFtraceEvent|null} [ionAllocBufferFail] FtraceEvent ionAllocBufferFail
             * @property {perfetto.protos.IIonAllocBufferFallbackFtraceEvent|null} [ionAllocBufferFallback] FtraceEvent ionAllocBufferFallback
             * @property {perfetto.protos.IIonAllocBufferStartFtraceEvent|null} [ionAllocBufferStart] FtraceEvent ionAllocBufferStart
             * @property {perfetto.protos.IIonCpAllocRetryFtraceEvent|null} [ionCpAllocRetry] FtraceEvent ionCpAllocRetry
             * @property {perfetto.protos.IIonCpSecureBufferEndFtraceEvent|null} [ionCpSecureBufferEnd] FtraceEvent ionCpSecureBufferEnd
             * @property {perfetto.protos.IIonCpSecureBufferStartFtraceEvent|null} [ionCpSecureBufferStart] FtraceEvent ionCpSecureBufferStart
             * @property {perfetto.protos.IIonPrefetchingFtraceEvent|null} [ionPrefetching] FtraceEvent ionPrefetching
             * @property {perfetto.protos.IIonSecureCmaAddToPoolEndFtraceEvent|null} [ionSecureCmaAddToPoolEnd] FtraceEvent ionSecureCmaAddToPoolEnd
             * @property {perfetto.protos.IIonSecureCmaAddToPoolStartFtraceEvent|null} [ionSecureCmaAddToPoolStart] FtraceEvent ionSecureCmaAddToPoolStart
             * @property {perfetto.protos.IIonSecureCmaAllocateEndFtraceEvent|null} [ionSecureCmaAllocateEnd] FtraceEvent ionSecureCmaAllocateEnd
             * @property {perfetto.protos.IIonSecureCmaAllocateStartFtraceEvent|null} [ionSecureCmaAllocateStart] FtraceEvent ionSecureCmaAllocateStart
             * @property {perfetto.protos.IIonSecureCmaShrinkPoolEndFtraceEvent|null} [ionSecureCmaShrinkPoolEnd] FtraceEvent ionSecureCmaShrinkPoolEnd
             * @property {perfetto.protos.IIonSecureCmaShrinkPoolStartFtraceEvent|null} [ionSecureCmaShrinkPoolStart] FtraceEvent ionSecureCmaShrinkPoolStart
             * @property {perfetto.protos.IKfreeFtraceEvent|null} [kfree] FtraceEvent kfree
             * @property {perfetto.protos.IKmallocFtraceEvent|null} [kmalloc] FtraceEvent kmalloc
             * @property {perfetto.protos.IKmallocNodeFtraceEvent|null} [kmallocNode] FtraceEvent kmallocNode
             * @property {perfetto.protos.IKmemCacheAllocFtraceEvent|null} [kmemCacheAlloc] FtraceEvent kmemCacheAlloc
             * @property {perfetto.protos.IKmemCacheAllocNodeFtraceEvent|null} [kmemCacheAllocNode] FtraceEvent kmemCacheAllocNode
             * @property {perfetto.protos.IKmemCacheFreeFtraceEvent|null} [kmemCacheFree] FtraceEvent kmemCacheFree
             * @property {perfetto.protos.IMigratePagesEndFtraceEvent|null} [migratePagesEnd] FtraceEvent migratePagesEnd
             * @property {perfetto.protos.IMigratePagesStartFtraceEvent|null} [migratePagesStart] FtraceEvent migratePagesStart
             * @property {perfetto.protos.IMigrateRetryFtraceEvent|null} [migrateRetry] FtraceEvent migrateRetry
             * @property {perfetto.protos.IMmPageAllocFtraceEvent|null} [mmPageAlloc] FtraceEvent mmPageAlloc
             * @property {perfetto.protos.IMmPageAllocExtfragFtraceEvent|null} [mmPageAllocExtfrag] FtraceEvent mmPageAllocExtfrag
             * @property {perfetto.protos.IMmPageAllocZoneLockedFtraceEvent|null} [mmPageAllocZoneLocked] FtraceEvent mmPageAllocZoneLocked
             * @property {perfetto.protos.IMmPageFreeFtraceEvent|null} [mmPageFree] FtraceEvent mmPageFree
             * @property {perfetto.protos.IMmPageFreeBatchedFtraceEvent|null} [mmPageFreeBatched] FtraceEvent mmPageFreeBatched
             * @property {perfetto.protos.IMmPagePcpuDrainFtraceEvent|null} [mmPagePcpuDrain] FtraceEvent mmPagePcpuDrain
             * @property {perfetto.protos.IRssStatFtraceEvent|null} [rssStat] FtraceEvent rssStat
             * @property {perfetto.protos.IIonHeapShrinkFtraceEvent|null} [ionHeapShrink] FtraceEvent ionHeapShrink
             * @property {perfetto.protos.IIonHeapGrowFtraceEvent|null} [ionHeapGrow] FtraceEvent ionHeapGrow
             * @property {perfetto.protos.IFenceInitFtraceEvent|null} [fenceInit] FtraceEvent fenceInit
             * @property {perfetto.protos.IFenceDestroyFtraceEvent|null} [fenceDestroy] FtraceEvent fenceDestroy
             * @property {perfetto.protos.IFenceEnableSignalFtraceEvent|null} [fenceEnableSignal] FtraceEvent fenceEnableSignal
             * @property {perfetto.protos.IFenceSignaledFtraceEvent|null} [fenceSignaled] FtraceEvent fenceSignaled
             * @property {perfetto.protos.IClkEnableFtraceEvent|null} [clkEnable] FtraceEvent clkEnable
             * @property {perfetto.protos.IClkDisableFtraceEvent|null} [clkDisable] FtraceEvent clkDisable
             * @property {perfetto.protos.IClkSetRateFtraceEvent|null} [clkSetRate] FtraceEvent clkSetRate
             * @property {perfetto.protos.IBinderTransactionAllocBufFtraceEvent|null} [binderTransactionAllocBuf] FtraceEvent binderTransactionAllocBuf
             * @property {perfetto.protos.ISignalDeliverFtraceEvent|null} [signalDeliver] FtraceEvent signalDeliver
             * @property {perfetto.protos.ISignalGenerateFtraceEvent|null} [signalGenerate] FtraceEvent signalGenerate
             * @property {perfetto.protos.IOomScoreAdjUpdateFtraceEvent|null} [oomScoreAdjUpdate] FtraceEvent oomScoreAdjUpdate
             * @property {perfetto.protos.IGenericFtraceEvent|null} [generic] FtraceEvent generic
             * @property {perfetto.protos.IMmEventRecordFtraceEvent|null} [mmEventRecord] FtraceEvent mmEventRecord
             * @property {perfetto.protos.ISysEnterFtraceEvent|null} [sysEnter] FtraceEvent sysEnter
             * @property {perfetto.protos.ISysExitFtraceEvent|null} [sysExit] FtraceEvent sysExit
             * @property {perfetto.protos.IZeroFtraceEvent|null} [zero] FtraceEvent zero
             * @property {perfetto.protos.IGpuFrequencyFtraceEvent|null} [gpuFrequency] FtraceEvent gpuFrequency
             * @property {perfetto.protos.ISdeTracingMarkWriteFtraceEvent|null} [sdeTracingMarkWrite] FtraceEvent sdeTracingMarkWrite
             * @property {perfetto.protos.IMarkVictimFtraceEvent|null} [markVictim] FtraceEvent markVictim
             * @property {perfetto.protos.IIonStatFtraceEvent|null} [ionStat] FtraceEvent ionStat
             * @property {perfetto.protos.IIonBufferCreateFtraceEvent|null} [ionBufferCreate] FtraceEvent ionBufferCreate
             * @property {perfetto.protos.IIonBufferDestroyFtraceEvent|null} [ionBufferDestroy] FtraceEvent ionBufferDestroy
             * @property {perfetto.protos.IScmCallStartFtraceEvent|null} [scmCallStart] FtraceEvent scmCallStart
             * @property {perfetto.protos.IScmCallEndFtraceEvent|null} [scmCallEnd] FtraceEvent scmCallEnd
             * @property {perfetto.protos.IGpuMemTotalFtraceEvent|null} [gpuMemTotal] FtraceEvent gpuMemTotal
             * @property {perfetto.protos.IThermalTemperatureFtraceEvent|null} [thermalTemperature] FtraceEvent thermalTemperature
             * @property {perfetto.protos.ICdevUpdateFtraceEvent|null} [cdevUpdate] FtraceEvent cdevUpdate
             * @property {perfetto.protos.ICpuhpExitFtraceEvent|null} [cpuhpExit] FtraceEvent cpuhpExit
             * @property {perfetto.protos.ICpuhpMultiEnterFtraceEvent|null} [cpuhpMultiEnter] FtraceEvent cpuhpMultiEnter
             * @property {perfetto.protos.ICpuhpEnterFtraceEvent|null} [cpuhpEnter] FtraceEvent cpuhpEnter
             * @property {perfetto.protos.ICpuhpLatencyFtraceEvent|null} [cpuhpLatency] FtraceEvent cpuhpLatency
             * @property {perfetto.protos.IFastrpcDmaStatFtraceEvent|null} [fastrpcDmaStat] FtraceEvent fastrpcDmaStat
             * @property {perfetto.protos.IDpuTracingMarkWriteFtraceEvent|null} [dpuTracingMarkWrite] FtraceEvent dpuTracingMarkWrite
             * @property {perfetto.protos.IG2dTracingMarkWriteFtraceEvent|null} [g2dTracingMarkWrite] FtraceEvent g2dTracingMarkWrite
             * @property {perfetto.protos.IMaliTracingMarkWriteFtraceEvent|null} [maliTracingMarkWrite] FtraceEvent maliTracingMarkWrite
             * @property {perfetto.protos.IDmaHeapStatFtraceEvent|null} [dmaHeapStat] FtraceEvent dmaHeapStat
             * @property {perfetto.protos.ICpuhpPauseFtraceEvent|null} [cpuhpPause] FtraceEvent cpuhpPause
             * @property {perfetto.protos.ISchedPiSetprioFtraceEvent|null} [schedPiSetprio] FtraceEvent schedPiSetprio
             * @property {perfetto.protos.ISdeSdeEvtlogFtraceEvent|null} [sdeSdeEvtlog] FtraceEvent sdeSdeEvtlog
             * @property {perfetto.protos.ISdeSdePerfCalcCrtcFtraceEvent|null} [sdeSdePerfCalcCrtc] FtraceEvent sdeSdePerfCalcCrtc
             * @property {perfetto.protos.ISdeSdePerfCrtcUpdateFtraceEvent|null} [sdeSdePerfCrtcUpdate] FtraceEvent sdeSdePerfCrtcUpdate
             * @property {perfetto.protos.ISdeSdePerfSetQosLutsFtraceEvent|null} [sdeSdePerfSetQosLuts] FtraceEvent sdeSdePerfSetQosLuts
             * @property {perfetto.protos.ISdeSdePerfUpdateBusFtraceEvent|null} [sdeSdePerfUpdateBus] FtraceEvent sdeSdePerfUpdateBus
             * @property {perfetto.protos.IRssStatThrottledFtraceEvent|null} [rssStatThrottled] FtraceEvent rssStatThrottled
             * @property {perfetto.protos.INetifReceiveSkbFtraceEvent|null} [netifReceiveSkb] FtraceEvent netifReceiveSkb
             * @property {perfetto.protos.INetDevXmitFtraceEvent|null} [netDevXmit] FtraceEvent netDevXmit
             * @property {perfetto.protos.IInetSockSetStateFtraceEvent|null} [inetSockSetState] FtraceEvent inetSockSetState
             * @property {perfetto.protos.ITcpRetransmitSkbFtraceEvent|null} [tcpRetransmitSkb] FtraceEvent tcpRetransmitSkb
             * @property {perfetto.protos.ICrosEcSensorhubDataFtraceEvent|null} [crosEcSensorhubData] FtraceEvent crosEcSensorhubData
             * @property {perfetto.protos.INapiGroReceiveEntryFtraceEvent|null} [napiGroReceiveEntry] FtraceEvent napiGroReceiveEntry
             * @property {perfetto.protos.INapiGroReceiveExitFtraceEvent|null} [napiGroReceiveExit] FtraceEvent napiGroReceiveExit
             * @property {perfetto.protos.IKfreeSkbFtraceEvent|null} [kfreeSkb] FtraceEvent kfreeSkb
             * @property {perfetto.protos.IKvmAccessFaultFtraceEvent|null} [kvmAccessFault] FtraceEvent kvmAccessFault
             * @property {perfetto.protos.IKvmAckIrqFtraceEvent|null} [kvmAckIrq] FtraceEvent kvmAckIrq
             * @property {perfetto.protos.IKvmAgeHvaFtraceEvent|null} [kvmAgeHva] FtraceEvent kvmAgeHva
             * @property {perfetto.protos.IKvmAgePageFtraceEvent|null} [kvmAgePage] FtraceEvent kvmAgePage
             * @property {perfetto.protos.IKvmArmClearDebugFtraceEvent|null} [kvmArmClearDebug] FtraceEvent kvmArmClearDebug
             * @property {perfetto.protos.IKvmArmSetDreg32FtraceEvent|null} [kvmArmSetDreg32] FtraceEvent kvmArmSetDreg32
             * @property {perfetto.protos.IKvmArmSetRegsetFtraceEvent|null} [kvmArmSetRegset] FtraceEvent kvmArmSetRegset
             * @property {perfetto.protos.IKvmArmSetupDebugFtraceEvent|null} [kvmArmSetupDebug] FtraceEvent kvmArmSetupDebug
             * @property {perfetto.protos.IKvmEntryFtraceEvent|null} [kvmEntry] FtraceEvent kvmEntry
             * @property {perfetto.protos.IKvmExitFtraceEvent|null} [kvmExit] FtraceEvent kvmExit
             * @property {perfetto.protos.IKvmFpuFtraceEvent|null} [kvmFpu] FtraceEvent kvmFpu
             * @property {perfetto.protos.IKvmGetTimerMapFtraceEvent|null} [kvmGetTimerMap] FtraceEvent kvmGetTimerMap
             * @property {perfetto.protos.IKvmGuestFaultFtraceEvent|null} [kvmGuestFault] FtraceEvent kvmGuestFault
             * @property {perfetto.protos.IKvmHandleSysRegFtraceEvent|null} [kvmHandleSysReg] FtraceEvent kvmHandleSysReg
             * @property {perfetto.protos.IKvmHvcArm64FtraceEvent|null} [kvmHvcArm64] FtraceEvent kvmHvcArm64
             * @property {perfetto.protos.IKvmIrqLineFtraceEvent|null} [kvmIrqLine] FtraceEvent kvmIrqLine
             * @property {perfetto.protos.IKvmMmioFtraceEvent|null} [kvmMmio] FtraceEvent kvmMmio
             * @property {perfetto.protos.IKvmMmioEmulateFtraceEvent|null} [kvmMmioEmulate] FtraceEvent kvmMmioEmulate
             * @property {perfetto.protos.IKvmSetGuestDebugFtraceEvent|null} [kvmSetGuestDebug] FtraceEvent kvmSetGuestDebug
             * @property {perfetto.protos.IKvmSetIrqFtraceEvent|null} [kvmSetIrq] FtraceEvent kvmSetIrq
             * @property {perfetto.protos.IKvmSetSpteHvaFtraceEvent|null} [kvmSetSpteHva] FtraceEvent kvmSetSpteHva
             * @property {perfetto.protos.IKvmSetWayFlushFtraceEvent|null} [kvmSetWayFlush] FtraceEvent kvmSetWayFlush
             * @property {perfetto.protos.IKvmSysAccessFtraceEvent|null} [kvmSysAccess] FtraceEvent kvmSysAccess
             * @property {perfetto.protos.IKvmTestAgeHvaFtraceEvent|null} [kvmTestAgeHva] FtraceEvent kvmTestAgeHva
             * @property {perfetto.protos.IKvmTimerEmulateFtraceEvent|null} [kvmTimerEmulate] FtraceEvent kvmTimerEmulate
             * @property {perfetto.protos.IKvmTimerHrtimerExpireFtraceEvent|null} [kvmTimerHrtimerExpire] FtraceEvent kvmTimerHrtimerExpire
             * @property {perfetto.protos.IKvmTimerRestoreStateFtraceEvent|null} [kvmTimerRestoreState] FtraceEvent kvmTimerRestoreState
             * @property {perfetto.protos.IKvmTimerSaveStateFtraceEvent|null} [kvmTimerSaveState] FtraceEvent kvmTimerSaveState
             * @property {perfetto.protos.IKvmTimerUpdateIrqFtraceEvent|null} [kvmTimerUpdateIrq] FtraceEvent kvmTimerUpdateIrq
             * @property {perfetto.protos.IKvmToggleCacheFtraceEvent|null} [kvmToggleCache] FtraceEvent kvmToggleCache
             * @property {perfetto.protos.IKvmUnmapHvaRangeFtraceEvent|null} [kvmUnmapHvaRange] FtraceEvent kvmUnmapHvaRange
             * @property {perfetto.protos.IKvmUserspaceExitFtraceEvent|null} [kvmUserspaceExit] FtraceEvent kvmUserspaceExit
             * @property {perfetto.protos.IKvmVcpuWakeupFtraceEvent|null} [kvmVcpuWakeup] FtraceEvent kvmVcpuWakeup
             * @property {perfetto.protos.IKvmWfxArm64FtraceEvent|null} [kvmWfxArm64] FtraceEvent kvmWfxArm64
             * @property {perfetto.protos.ITrapRegFtraceEvent|null} [trapReg] FtraceEvent trapReg
             * @property {perfetto.protos.IVgicUpdateIrqPendingFtraceEvent|null} [vgicUpdateIrqPending] FtraceEvent vgicUpdateIrqPending
             * @property {perfetto.protos.IWakeupSourceActivateFtraceEvent|null} [wakeupSourceActivate] FtraceEvent wakeupSourceActivate
             * @property {perfetto.protos.IWakeupSourceDeactivateFtraceEvent|null} [wakeupSourceDeactivate] FtraceEvent wakeupSourceDeactivate
             * @property {perfetto.protos.IUfshcdCommandFtraceEvent|null} [ufshcdCommand] FtraceEvent ufshcdCommand
             * @property {perfetto.protos.IUfshcdClkGatingFtraceEvent|null} [ufshcdClkGating] FtraceEvent ufshcdClkGating
             * @property {perfetto.protos.IConsoleFtraceEvent|null} [console] FtraceEvent console
             * @property {perfetto.protos.IDrmVblankEventFtraceEvent|null} [drmVblankEvent] FtraceEvent drmVblankEvent
             * @property {perfetto.protos.IDrmVblankEventDeliveredFtraceEvent|null} [drmVblankEventDelivered] FtraceEvent drmVblankEventDelivered
             * @property {perfetto.protos.IDrmSchedJobFtraceEvent|null} [drmSchedJob] FtraceEvent drmSchedJob
             * @property {perfetto.protos.IDrmRunJobFtraceEvent|null} [drmRunJob] FtraceEvent drmRunJob
             * @property {perfetto.protos.IDrmSchedProcessJobFtraceEvent|null} [drmSchedProcessJob] FtraceEvent drmSchedProcessJob
             * @property {perfetto.protos.IDmaFenceInitFtraceEvent|null} [dmaFenceInit] FtraceEvent dmaFenceInit
             * @property {perfetto.protos.IDmaFenceEmitFtraceEvent|null} [dmaFenceEmit] FtraceEvent dmaFenceEmit
             * @property {perfetto.protos.IDmaFenceSignaledFtraceEvent|null} [dmaFenceSignaled] FtraceEvent dmaFenceSignaled
             * @property {perfetto.protos.IDmaFenceWaitStartFtraceEvent|null} [dmaFenceWaitStart] FtraceEvent dmaFenceWaitStart
             * @property {perfetto.protos.IDmaFenceWaitEndFtraceEvent|null} [dmaFenceWaitEnd] FtraceEvent dmaFenceWaitEnd
             * @property {perfetto.protos.IF2fsIostatFtraceEvent|null} [f2fsIostat] FtraceEvent f2fsIostat
             * @property {perfetto.protos.IF2fsIostatLatencyFtraceEvent|null} [f2fsIostatLatency] FtraceEvent f2fsIostatLatency
             * @property {perfetto.protos.ISchedCpuUtilCfsFtraceEvent|null} [schedCpuUtilCfs] FtraceEvent schedCpuUtilCfs
             * @property {perfetto.protos.IV4l2QbufFtraceEvent|null} [v4l2Qbuf] FtraceEvent v4l2Qbuf
             * @property {perfetto.protos.IV4l2DqbufFtraceEvent|null} [v4l2Dqbuf] FtraceEvent v4l2Dqbuf
             * @property {perfetto.protos.IVb2V4l2BufQueueFtraceEvent|null} [vb2V4l2BufQueue] FtraceEvent vb2V4l2BufQueue
             * @property {perfetto.protos.IVb2V4l2BufDoneFtraceEvent|null} [vb2V4l2BufDone] FtraceEvent vb2V4l2BufDone
             * @property {perfetto.protos.IVb2V4l2QbufFtraceEvent|null} [vb2V4l2Qbuf] FtraceEvent vb2V4l2Qbuf
             * @property {perfetto.protos.IVb2V4l2DqbufFtraceEvent|null} [vb2V4l2Dqbuf] FtraceEvent vb2V4l2Dqbuf
             * @property {perfetto.protos.IDsiCmdFifoStatusFtraceEvent|null} [dsiCmdFifoStatus] FtraceEvent dsiCmdFifoStatus
             * @property {perfetto.protos.IDsiRxFtraceEvent|null} [dsiRx] FtraceEvent dsiRx
             * @property {perfetto.protos.IDsiTxFtraceEvent|null} [dsiTx] FtraceEvent dsiTx
             * @property {perfetto.protos.IAndroidFsDatareadEndFtraceEvent|null} [androidFsDatareadEnd] FtraceEvent androidFsDatareadEnd
             * @property {perfetto.protos.IAndroidFsDatareadStartFtraceEvent|null} [androidFsDatareadStart] FtraceEvent androidFsDatareadStart
             * @property {perfetto.protos.IAndroidFsDatawriteEndFtraceEvent|null} [androidFsDatawriteEnd] FtraceEvent androidFsDatawriteEnd
             * @property {perfetto.protos.IAndroidFsDatawriteStartFtraceEvent|null} [androidFsDatawriteStart] FtraceEvent androidFsDatawriteStart
             * @property {perfetto.protos.IAndroidFsFsyncEndFtraceEvent|null} [androidFsFsyncEnd] FtraceEvent androidFsFsyncEnd
             * @property {perfetto.protos.IAndroidFsFsyncStartFtraceEvent|null} [androidFsFsyncStart] FtraceEvent androidFsFsyncStart
             * @property {perfetto.protos.IFuncgraphEntryFtraceEvent|null} [funcgraphEntry] FtraceEvent funcgraphEntry
             * @property {perfetto.protos.IFuncgraphExitFtraceEvent|null} [funcgraphExit] FtraceEvent funcgraphExit
             * @property {perfetto.protos.IVirtioVideoCmdFtraceEvent|null} [virtioVideoCmd] FtraceEvent virtioVideoCmd
             * @property {perfetto.protos.IVirtioVideoCmdDoneFtraceEvent|null} [virtioVideoCmdDone] FtraceEvent virtioVideoCmdDone
             * @property {perfetto.protos.IVirtioVideoResourceQueueFtraceEvent|null} [virtioVideoResourceQueue] FtraceEvent virtioVideoResourceQueue
             * @property {perfetto.protos.IVirtioVideoResourceQueueDoneFtraceEvent|null} [virtioVideoResourceQueueDone] FtraceEvent virtioVideoResourceQueueDone
             * @property {perfetto.protos.IMmShrinkSlabStartFtraceEvent|null} [mmShrinkSlabStart] FtraceEvent mmShrinkSlabStart
             * @property {perfetto.protos.IMmShrinkSlabEndFtraceEvent|null} [mmShrinkSlabEnd] FtraceEvent mmShrinkSlabEnd
             * @property {perfetto.protos.ITrustySmcFtraceEvent|null} [trustySmc] FtraceEvent trustySmc
             * @property {perfetto.protos.ITrustySmcDoneFtraceEvent|null} [trustySmcDone] FtraceEvent trustySmcDone
             * @property {perfetto.protos.ITrustyStdCall32FtraceEvent|null} [trustyStdCall32] FtraceEvent trustyStdCall32
             * @property {perfetto.protos.ITrustyStdCall32DoneFtraceEvent|null} [trustyStdCall32Done] FtraceEvent trustyStdCall32Done
             * @property {perfetto.protos.ITrustyShareMemoryFtraceEvent|null} [trustyShareMemory] FtraceEvent trustyShareMemory
             * @property {perfetto.protos.ITrustyShareMemoryDoneFtraceEvent|null} [trustyShareMemoryDone] FtraceEvent trustyShareMemoryDone
             * @property {perfetto.protos.ITrustyReclaimMemoryFtraceEvent|null} [trustyReclaimMemory] FtraceEvent trustyReclaimMemory
             * @property {perfetto.protos.ITrustyReclaimMemoryDoneFtraceEvent|null} [trustyReclaimMemoryDone] FtraceEvent trustyReclaimMemoryDone
             * @property {perfetto.protos.ITrustyIrqFtraceEvent|null} [trustyIrq] FtraceEvent trustyIrq
             * @property {perfetto.protos.ITrustyIpcHandleEventFtraceEvent|null} [trustyIpcHandleEvent] FtraceEvent trustyIpcHandleEvent
             * @property {perfetto.protos.ITrustyIpcConnectFtraceEvent|null} [trustyIpcConnect] FtraceEvent trustyIpcConnect
             * @property {perfetto.protos.ITrustyIpcConnectEndFtraceEvent|null} [trustyIpcConnectEnd] FtraceEvent trustyIpcConnectEnd
             * @property {perfetto.protos.ITrustyIpcWriteFtraceEvent|null} [trustyIpcWrite] FtraceEvent trustyIpcWrite
             * @property {perfetto.protos.ITrustyIpcPollFtraceEvent|null} [trustyIpcPoll] FtraceEvent trustyIpcPoll
             * @property {perfetto.protos.ITrustyIpcPollEndFtraceEvent|null} [trustyIpcPollEnd] FtraceEvent trustyIpcPollEnd
             * @property {perfetto.protos.ITrustyIpcReadFtraceEvent|null} [trustyIpcRead] FtraceEvent trustyIpcRead
             * @property {perfetto.protos.ITrustyIpcReadEndFtraceEvent|null} [trustyIpcReadEnd] FtraceEvent trustyIpcReadEnd
             * @property {perfetto.protos.ITrustyIpcRxFtraceEvent|null} [trustyIpcRx] FtraceEvent trustyIpcRx
             * @property {perfetto.protos.ITrustyIpcTxFtraceEvent|null} [trustyIpcTx] FtraceEvent trustyIpcTx
             * @property {perfetto.protos.ITrustyEnqueueNopFtraceEvent|null} [trustyEnqueueNop] FtraceEvent trustyEnqueueNop
             */

            /**
             * Constructs a new FtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a FtraceEvent.
             * @implements IFtraceEvent
             * @constructor
             * @param {perfetto.protos.IFtraceEvent=} [p] Properties to set
             */
            function FtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * FtraceEvent timestamp.
             * @member {number} timestamp
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * FtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.pid = 0;

            /**
             * FtraceEvent print.
             * @member {perfetto.protos.IPrintFtraceEvent|null|undefined} print
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.print = null;

            /**
             * FtraceEvent schedSwitch.
             * @member {perfetto.protos.ISchedSwitchFtraceEvent|null|undefined} schedSwitch
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.schedSwitch = null;

            /**
             * FtraceEvent cpuFrequency.
             * @member {perfetto.protos.ICpuFrequencyFtraceEvent|null|undefined} cpuFrequency
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.cpuFrequency = null;

            /**
             * FtraceEvent cpuFrequencyLimits.
             * @member {perfetto.protos.ICpuFrequencyLimitsFtraceEvent|null|undefined} cpuFrequencyLimits
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.cpuFrequencyLimits = null;

            /**
             * FtraceEvent cpuIdle.
             * @member {perfetto.protos.ICpuIdleFtraceEvent|null|undefined} cpuIdle
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.cpuIdle = null;

            /**
             * FtraceEvent clockEnable.
             * @member {perfetto.protos.IClockEnableFtraceEvent|null|undefined} clockEnable
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.clockEnable = null;

            /**
             * FtraceEvent clockDisable.
             * @member {perfetto.protos.IClockDisableFtraceEvent|null|undefined} clockDisable
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.clockDisable = null;

            /**
             * FtraceEvent clockSetRate.
             * @member {perfetto.protos.IClockSetRateFtraceEvent|null|undefined} clockSetRate
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.clockSetRate = null;

            /**
             * FtraceEvent schedWakeup.
             * @member {perfetto.protos.ISchedWakeupFtraceEvent|null|undefined} schedWakeup
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.schedWakeup = null;

            /**
             * FtraceEvent schedBlockedReason.
             * @member {perfetto.protos.ISchedBlockedReasonFtraceEvent|null|undefined} schedBlockedReason
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.schedBlockedReason = null;

            /**
             * FtraceEvent schedCpuHotplug.
             * @member {perfetto.protos.ISchedCpuHotplugFtraceEvent|null|undefined} schedCpuHotplug
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.schedCpuHotplug = null;

            /**
             * FtraceEvent schedWaking.
             * @member {perfetto.protos.ISchedWakingFtraceEvent|null|undefined} schedWaking
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.schedWaking = null;

            /**
             * FtraceEvent ipiEntry.
             * @member {perfetto.protos.IIpiEntryFtraceEvent|null|undefined} ipiEntry
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ipiEntry = null;

            /**
             * FtraceEvent ipiExit.
             * @member {perfetto.protos.IIpiExitFtraceEvent|null|undefined} ipiExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ipiExit = null;

            /**
             * FtraceEvent ipiRaise.
             * @member {perfetto.protos.IIpiRaiseFtraceEvent|null|undefined} ipiRaise
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ipiRaise = null;

            /**
             * FtraceEvent softirqEntry.
             * @member {perfetto.protos.ISoftirqEntryFtraceEvent|null|undefined} softirqEntry
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.softirqEntry = null;

            /**
             * FtraceEvent softirqExit.
             * @member {perfetto.protos.ISoftirqExitFtraceEvent|null|undefined} softirqExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.softirqExit = null;

            /**
             * FtraceEvent softirqRaise.
             * @member {perfetto.protos.ISoftirqRaiseFtraceEvent|null|undefined} softirqRaise
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.softirqRaise = null;

            /**
             * FtraceEvent i2cRead.
             * @member {perfetto.protos.II2cReadFtraceEvent|null|undefined} i2cRead
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.i2cRead = null;

            /**
             * FtraceEvent i2cWrite.
             * @member {perfetto.protos.II2cWriteFtraceEvent|null|undefined} i2cWrite
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.i2cWrite = null;

            /**
             * FtraceEvent i2cResult.
             * @member {perfetto.protos.II2cResultFtraceEvent|null|undefined} i2cResult
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.i2cResult = null;

            /**
             * FtraceEvent i2cReply.
             * @member {perfetto.protos.II2cReplyFtraceEvent|null|undefined} i2cReply
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.i2cReply = null;

            /**
             * FtraceEvent smbusRead.
             * @member {perfetto.protos.ISmbusReadFtraceEvent|null|undefined} smbusRead
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.smbusRead = null;

            /**
             * FtraceEvent smbusWrite.
             * @member {perfetto.protos.ISmbusWriteFtraceEvent|null|undefined} smbusWrite
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.smbusWrite = null;

            /**
             * FtraceEvent smbusResult.
             * @member {perfetto.protos.ISmbusResultFtraceEvent|null|undefined} smbusResult
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.smbusResult = null;

            /**
             * FtraceEvent smbusReply.
             * @member {perfetto.protos.ISmbusReplyFtraceEvent|null|undefined} smbusReply
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.smbusReply = null;

            /**
             * FtraceEvent lowmemoryKill.
             * @member {perfetto.protos.ILowmemoryKillFtraceEvent|null|undefined} lowmemoryKill
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.lowmemoryKill = null;

            /**
             * FtraceEvent irqHandlerEntry.
             * @member {perfetto.protos.IIrqHandlerEntryFtraceEvent|null|undefined} irqHandlerEntry
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.irqHandlerEntry = null;

            /**
             * FtraceEvent irqHandlerExit.
             * @member {perfetto.protos.IIrqHandlerExitFtraceEvent|null|undefined} irqHandlerExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.irqHandlerExit = null;

            /**
             * FtraceEvent syncPt.
             * @member {perfetto.protos.ISyncPtFtraceEvent|null|undefined} syncPt
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.syncPt = null;

            /**
             * FtraceEvent syncTimeline.
             * @member {perfetto.protos.ISyncTimelineFtraceEvent|null|undefined} syncTimeline
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.syncTimeline = null;

            /**
             * FtraceEvent syncWait.
             * @member {perfetto.protos.ISyncWaitFtraceEvent|null|undefined} syncWait
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.syncWait = null;

            /**
             * FtraceEvent ext4DaWriteBegin.
             * @member {perfetto.protos.IExt4DaWriteBeginFtraceEvent|null|undefined} ext4DaWriteBegin
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4DaWriteBegin = null;

            /**
             * FtraceEvent ext4DaWriteEnd.
             * @member {perfetto.protos.IExt4DaWriteEndFtraceEvent|null|undefined} ext4DaWriteEnd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4DaWriteEnd = null;

            /**
             * FtraceEvent ext4SyncFileEnter.
             * @member {perfetto.protos.IExt4SyncFileEnterFtraceEvent|null|undefined} ext4SyncFileEnter
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4SyncFileEnter = null;

            /**
             * FtraceEvent ext4SyncFileExit.
             * @member {perfetto.protos.IExt4SyncFileExitFtraceEvent|null|undefined} ext4SyncFileExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4SyncFileExit = null;

            /**
             * FtraceEvent blockRqIssue.
             * @member {perfetto.protos.IBlockRqIssueFtraceEvent|null|undefined} blockRqIssue
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.blockRqIssue = null;

            /**
             * FtraceEvent mmVmscanDirectReclaimBegin.
             * @member {perfetto.protos.IMmVmscanDirectReclaimBeginFtraceEvent|null|undefined} mmVmscanDirectReclaimBegin
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmVmscanDirectReclaimBegin = null;

            /**
             * FtraceEvent mmVmscanDirectReclaimEnd.
             * @member {perfetto.protos.IMmVmscanDirectReclaimEndFtraceEvent|null|undefined} mmVmscanDirectReclaimEnd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmVmscanDirectReclaimEnd = null;

            /**
             * FtraceEvent mmVmscanKswapdWake.
             * @member {perfetto.protos.IMmVmscanKswapdWakeFtraceEvent|null|undefined} mmVmscanKswapdWake
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmVmscanKswapdWake = null;

            /**
             * FtraceEvent mmVmscanKswapdSleep.
             * @member {perfetto.protos.IMmVmscanKswapdSleepFtraceEvent|null|undefined} mmVmscanKswapdSleep
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmVmscanKswapdSleep = null;

            /**
             * FtraceEvent binderTransaction.
             * @member {perfetto.protos.IBinderTransactionFtraceEvent|null|undefined} binderTransaction
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.binderTransaction = null;

            /**
             * FtraceEvent binderTransactionReceived.
             * @member {perfetto.protos.IBinderTransactionReceivedFtraceEvent|null|undefined} binderTransactionReceived
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.binderTransactionReceived = null;

            /**
             * FtraceEvent binderSetPriority.
             * @member {perfetto.protos.IBinderSetPriorityFtraceEvent|null|undefined} binderSetPriority
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.binderSetPriority = null;

            /**
             * FtraceEvent binderLock.
             * @member {perfetto.protos.IBinderLockFtraceEvent|null|undefined} binderLock
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.binderLock = null;

            /**
             * FtraceEvent binderLocked.
             * @member {perfetto.protos.IBinderLockedFtraceEvent|null|undefined} binderLocked
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.binderLocked = null;

            /**
             * FtraceEvent binderUnlock.
             * @member {perfetto.protos.IBinderUnlockFtraceEvent|null|undefined} binderUnlock
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.binderUnlock = null;

            /**
             * FtraceEvent workqueueActivateWork.
             * @member {perfetto.protos.IWorkqueueActivateWorkFtraceEvent|null|undefined} workqueueActivateWork
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.workqueueActivateWork = null;

            /**
             * FtraceEvent workqueueExecuteEnd.
             * @member {perfetto.protos.IWorkqueueExecuteEndFtraceEvent|null|undefined} workqueueExecuteEnd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.workqueueExecuteEnd = null;

            /**
             * FtraceEvent workqueueExecuteStart.
             * @member {perfetto.protos.IWorkqueueExecuteStartFtraceEvent|null|undefined} workqueueExecuteStart
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.workqueueExecuteStart = null;

            /**
             * FtraceEvent workqueueQueueWork.
             * @member {perfetto.protos.IWorkqueueQueueWorkFtraceEvent|null|undefined} workqueueQueueWork
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.workqueueQueueWork = null;

            /**
             * FtraceEvent regulatorDisable.
             * @member {perfetto.protos.IRegulatorDisableFtraceEvent|null|undefined} regulatorDisable
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.regulatorDisable = null;

            /**
             * FtraceEvent regulatorDisableComplete.
             * @member {perfetto.protos.IRegulatorDisableCompleteFtraceEvent|null|undefined} regulatorDisableComplete
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.regulatorDisableComplete = null;

            /**
             * FtraceEvent regulatorEnable.
             * @member {perfetto.protos.IRegulatorEnableFtraceEvent|null|undefined} regulatorEnable
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.regulatorEnable = null;

            /**
             * FtraceEvent regulatorEnableComplete.
             * @member {perfetto.protos.IRegulatorEnableCompleteFtraceEvent|null|undefined} regulatorEnableComplete
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.regulatorEnableComplete = null;

            /**
             * FtraceEvent regulatorEnableDelay.
             * @member {perfetto.protos.IRegulatorEnableDelayFtraceEvent|null|undefined} regulatorEnableDelay
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.regulatorEnableDelay = null;

            /**
             * FtraceEvent regulatorSetVoltage.
             * @member {perfetto.protos.IRegulatorSetVoltageFtraceEvent|null|undefined} regulatorSetVoltage
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.regulatorSetVoltage = null;

            /**
             * FtraceEvent regulatorSetVoltageComplete.
             * @member {perfetto.protos.IRegulatorSetVoltageCompleteFtraceEvent|null|undefined} regulatorSetVoltageComplete
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.regulatorSetVoltageComplete = null;

            /**
             * FtraceEvent cgroupAttachTask.
             * @member {perfetto.protos.ICgroupAttachTaskFtraceEvent|null|undefined} cgroupAttachTask
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.cgroupAttachTask = null;

            /**
             * FtraceEvent cgroupMkdir.
             * @member {perfetto.protos.ICgroupMkdirFtraceEvent|null|undefined} cgroupMkdir
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.cgroupMkdir = null;

            /**
             * FtraceEvent cgroupRemount.
             * @member {perfetto.protos.ICgroupRemountFtraceEvent|null|undefined} cgroupRemount
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.cgroupRemount = null;

            /**
             * FtraceEvent cgroupRmdir.
             * @member {perfetto.protos.ICgroupRmdirFtraceEvent|null|undefined} cgroupRmdir
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.cgroupRmdir = null;

            /**
             * FtraceEvent cgroupTransferTasks.
             * @member {perfetto.protos.ICgroupTransferTasksFtraceEvent|null|undefined} cgroupTransferTasks
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.cgroupTransferTasks = null;

            /**
             * FtraceEvent cgroupDestroyRoot.
             * @member {perfetto.protos.ICgroupDestroyRootFtraceEvent|null|undefined} cgroupDestroyRoot
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.cgroupDestroyRoot = null;

            /**
             * FtraceEvent cgroupRelease.
             * @member {perfetto.protos.ICgroupReleaseFtraceEvent|null|undefined} cgroupRelease
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.cgroupRelease = null;

            /**
             * FtraceEvent cgroupRename.
             * @member {perfetto.protos.ICgroupRenameFtraceEvent|null|undefined} cgroupRename
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.cgroupRename = null;

            /**
             * FtraceEvent cgroupSetupRoot.
             * @member {perfetto.protos.ICgroupSetupRootFtraceEvent|null|undefined} cgroupSetupRoot
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.cgroupSetupRoot = null;

            /**
             * FtraceEvent mdpCmdKickoff.
             * @member {perfetto.protos.IMdpCmdKickoffFtraceEvent|null|undefined} mdpCmdKickoff
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mdpCmdKickoff = null;

            /**
             * FtraceEvent mdpCommit.
             * @member {perfetto.protos.IMdpCommitFtraceEvent|null|undefined} mdpCommit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mdpCommit = null;

            /**
             * FtraceEvent mdpPerfSetOt.
             * @member {perfetto.protos.IMdpPerfSetOtFtraceEvent|null|undefined} mdpPerfSetOt
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mdpPerfSetOt = null;

            /**
             * FtraceEvent mdpSsppChange.
             * @member {perfetto.protos.IMdpSsppChangeFtraceEvent|null|undefined} mdpSsppChange
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mdpSsppChange = null;

            /**
             * FtraceEvent tracingMarkWrite.
             * @member {perfetto.protos.ITracingMarkWriteFtraceEvent|null|undefined} tracingMarkWrite
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.tracingMarkWrite = null;

            /**
             * FtraceEvent mdpCmdPingpongDone.
             * @member {perfetto.protos.IMdpCmdPingpongDoneFtraceEvent|null|undefined} mdpCmdPingpongDone
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mdpCmdPingpongDone = null;

            /**
             * FtraceEvent mdpCompareBw.
             * @member {perfetto.protos.IMdpCompareBwFtraceEvent|null|undefined} mdpCompareBw
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mdpCompareBw = null;

            /**
             * FtraceEvent mdpPerfSetPanicLuts.
             * @member {perfetto.protos.IMdpPerfSetPanicLutsFtraceEvent|null|undefined} mdpPerfSetPanicLuts
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mdpPerfSetPanicLuts = null;

            /**
             * FtraceEvent mdpSsppSet.
             * @member {perfetto.protos.IMdpSsppSetFtraceEvent|null|undefined} mdpSsppSet
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mdpSsppSet = null;

            /**
             * FtraceEvent mdpCmdReadptrDone.
             * @member {perfetto.protos.IMdpCmdReadptrDoneFtraceEvent|null|undefined} mdpCmdReadptrDone
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mdpCmdReadptrDone = null;

            /**
             * FtraceEvent mdpMisrCrc.
             * @member {perfetto.protos.IMdpMisrCrcFtraceEvent|null|undefined} mdpMisrCrc
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mdpMisrCrc = null;

            /**
             * FtraceEvent mdpPerfSetQosLuts.
             * @member {perfetto.protos.IMdpPerfSetQosLutsFtraceEvent|null|undefined} mdpPerfSetQosLuts
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mdpPerfSetQosLuts = null;

            /**
             * FtraceEvent mdpTraceCounter.
             * @member {perfetto.protos.IMdpTraceCounterFtraceEvent|null|undefined} mdpTraceCounter
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mdpTraceCounter = null;

            /**
             * FtraceEvent mdpCmdReleaseBw.
             * @member {perfetto.protos.IMdpCmdReleaseBwFtraceEvent|null|undefined} mdpCmdReleaseBw
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mdpCmdReleaseBw = null;

            /**
             * FtraceEvent mdpMixerUpdate.
             * @member {perfetto.protos.IMdpMixerUpdateFtraceEvent|null|undefined} mdpMixerUpdate
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mdpMixerUpdate = null;

            /**
             * FtraceEvent mdpPerfSetWmLevels.
             * @member {perfetto.protos.IMdpPerfSetWmLevelsFtraceEvent|null|undefined} mdpPerfSetWmLevels
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mdpPerfSetWmLevels = null;

            /**
             * FtraceEvent mdpVideoUnderrunDone.
             * @member {perfetto.protos.IMdpVideoUnderrunDoneFtraceEvent|null|undefined} mdpVideoUnderrunDone
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mdpVideoUnderrunDone = null;

            /**
             * FtraceEvent mdpCmdWaitPingpong.
             * @member {perfetto.protos.IMdpCmdWaitPingpongFtraceEvent|null|undefined} mdpCmdWaitPingpong
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mdpCmdWaitPingpong = null;

            /**
             * FtraceEvent mdpPerfPrefillCalc.
             * @member {perfetto.protos.IMdpPerfPrefillCalcFtraceEvent|null|undefined} mdpPerfPrefillCalc
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mdpPerfPrefillCalc = null;

            /**
             * FtraceEvent mdpPerfUpdateBus.
             * @member {perfetto.protos.IMdpPerfUpdateBusFtraceEvent|null|undefined} mdpPerfUpdateBus
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mdpPerfUpdateBus = null;

            /**
             * FtraceEvent rotatorBwAoAsContext.
             * @member {perfetto.protos.IRotatorBwAoAsContextFtraceEvent|null|undefined} rotatorBwAoAsContext
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.rotatorBwAoAsContext = null;

            /**
             * FtraceEvent mmFilemapAddToPageCache.
             * @member {perfetto.protos.IMmFilemapAddToPageCacheFtraceEvent|null|undefined} mmFilemapAddToPageCache
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmFilemapAddToPageCache = null;

            /**
             * FtraceEvent mmFilemapDeleteFromPageCache.
             * @member {perfetto.protos.IMmFilemapDeleteFromPageCacheFtraceEvent|null|undefined} mmFilemapDeleteFromPageCache
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmFilemapDeleteFromPageCache = null;

            /**
             * FtraceEvent mmCompactionBegin.
             * @member {perfetto.protos.IMmCompactionBeginFtraceEvent|null|undefined} mmCompactionBegin
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmCompactionBegin = null;

            /**
             * FtraceEvent mmCompactionDeferCompaction.
             * @member {perfetto.protos.IMmCompactionDeferCompactionFtraceEvent|null|undefined} mmCompactionDeferCompaction
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmCompactionDeferCompaction = null;

            /**
             * FtraceEvent mmCompactionDeferred.
             * @member {perfetto.protos.IMmCompactionDeferredFtraceEvent|null|undefined} mmCompactionDeferred
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmCompactionDeferred = null;

            /**
             * FtraceEvent mmCompactionDeferReset.
             * @member {perfetto.protos.IMmCompactionDeferResetFtraceEvent|null|undefined} mmCompactionDeferReset
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmCompactionDeferReset = null;

            /**
             * FtraceEvent mmCompactionEnd.
             * @member {perfetto.protos.IMmCompactionEndFtraceEvent|null|undefined} mmCompactionEnd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmCompactionEnd = null;

            /**
             * FtraceEvent mmCompactionFinished.
             * @member {perfetto.protos.IMmCompactionFinishedFtraceEvent|null|undefined} mmCompactionFinished
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmCompactionFinished = null;

            /**
             * FtraceEvent mmCompactionIsolateFreepages.
             * @member {perfetto.protos.IMmCompactionIsolateFreepagesFtraceEvent|null|undefined} mmCompactionIsolateFreepages
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmCompactionIsolateFreepages = null;

            /**
             * FtraceEvent mmCompactionIsolateMigratepages.
             * @member {perfetto.protos.IMmCompactionIsolateMigratepagesFtraceEvent|null|undefined} mmCompactionIsolateMigratepages
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmCompactionIsolateMigratepages = null;

            /**
             * FtraceEvent mmCompactionKcompactdSleep.
             * @member {perfetto.protos.IMmCompactionKcompactdSleepFtraceEvent|null|undefined} mmCompactionKcompactdSleep
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmCompactionKcompactdSleep = null;

            /**
             * FtraceEvent mmCompactionKcompactdWake.
             * @member {perfetto.protos.IMmCompactionKcompactdWakeFtraceEvent|null|undefined} mmCompactionKcompactdWake
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmCompactionKcompactdWake = null;

            /**
             * FtraceEvent mmCompactionMigratepages.
             * @member {perfetto.protos.IMmCompactionMigratepagesFtraceEvent|null|undefined} mmCompactionMigratepages
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmCompactionMigratepages = null;

            /**
             * FtraceEvent mmCompactionSuitable.
             * @member {perfetto.protos.IMmCompactionSuitableFtraceEvent|null|undefined} mmCompactionSuitable
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmCompactionSuitable = null;

            /**
             * FtraceEvent mmCompactionTryToCompactPages.
             * @member {perfetto.protos.IMmCompactionTryToCompactPagesFtraceEvent|null|undefined} mmCompactionTryToCompactPages
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmCompactionTryToCompactPages = null;

            /**
             * FtraceEvent mmCompactionWakeupKcompactd.
             * @member {perfetto.protos.IMmCompactionWakeupKcompactdFtraceEvent|null|undefined} mmCompactionWakeupKcompactd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmCompactionWakeupKcompactd = null;

            /**
             * FtraceEvent suspendResume.
             * @member {perfetto.protos.ISuspendResumeFtraceEvent|null|undefined} suspendResume
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.suspendResume = null;

            /**
             * FtraceEvent schedWakeupNew.
             * @member {perfetto.protos.ISchedWakeupNewFtraceEvent|null|undefined} schedWakeupNew
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.schedWakeupNew = null;

            /**
             * FtraceEvent blockBioBackmerge.
             * @member {perfetto.protos.IBlockBioBackmergeFtraceEvent|null|undefined} blockBioBackmerge
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.blockBioBackmerge = null;

            /**
             * FtraceEvent blockBioBounce.
             * @member {perfetto.protos.IBlockBioBounceFtraceEvent|null|undefined} blockBioBounce
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.blockBioBounce = null;

            /**
             * FtraceEvent blockBioComplete.
             * @member {perfetto.protos.IBlockBioCompleteFtraceEvent|null|undefined} blockBioComplete
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.blockBioComplete = null;

            /**
             * FtraceEvent blockBioFrontmerge.
             * @member {perfetto.protos.IBlockBioFrontmergeFtraceEvent|null|undefined} blockBioFrontmerge
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.blockBioFrontmerge = null;

            /**
             * FtraceEvent blockBioQueue.
             * @member {perfetto.protos.IBlockBioQueueFtraceEvent|null|undefined} blockBioQueue
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.blockBioQueue = null;

            /**
             * FtraceEvent blockBioRemap.
             * @member {perfetto.protos.IBlockBioRemapFtraceEvent|null|undefined} blockBioRemap
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.blockBioRemap = null;

            /**
             * FtraceEvent blockDirtyBuffer.
             * @member {perfetto.protos.IBlockDirtyBufferFtraceEvent|null|undefined} blockDirtyBuffer
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.blockDirtyBuffer = null;

            /**
             * FtraceEvent blockGetrq.
             * @member {perfetto.protos.IBlockGetrqFtraceEvent|null|undefined} blockGetrq
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.blockGetrq = null;

            /**
             * FtraceEvent blockPlug.
             * @member {perfetto.protos.IBlockPlugFtraceEvent|null|undefined} blockPlug
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.blockPlug = null;

            /**
             * FtraceEvent blockRqAbort.
             * @member {perfetto.protos.IBlockRqAbortFtraceEvent|null|undefined} blockRqAbort
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.blockRqAbort = null;

            /**
             * FtraceEvent blockRqComplete.
             * @member {perfetto.protos.IBlockRqCompleteFtraceEvent|null|undefined} blockRqComplete
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.blockRqComplete = null;

            /**
             * FtraceEvent blockRqInsert.
             * @member {perfetto.protos.IBlockRqInsertFtraceEvent|null|undefined} blockRqInsert
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.blockRqInsert = null;

            /**
             * FtraceEvent blockRqRemap.
             * @member {perfetto.protos.IBlockRqRemapFtraceEvent|null|undefined} blockRqRemap
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.blockRqRemap = null;

            /**
             * FtraceEvent blockRqRequeue.
             * @member {perfetto.protos.IBlockRqRequeueFtraceEvent|null|undefined} blockRqRequeue
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.blockRqRequeue = null;

            /**
             * FtraceEvent blockSleeprq.
             * @member {perfetto.protos.IBlockSleeprqFtraceEvent|null|undefined} blockSleeprq
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.blockSleeprq = null;

            /**
             * FtraceEvent blockSplit.
             * @member {perfetto.protos.IBlockSplitFtraceEvent|null|undefined} blockSplit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.blockSplit = null;

            /**
             * FtraceEvent blockTouchBuffer.
             * @member {perfetto.protos.IBlockTouchBufferFtraceEvent|null|undefined} blockTouchBuffer
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.blockTouchBuffer = null;

            /**
             * FtraceEvent blockUnplug.
             * @member {perfetto.protos.IBlockUnplugFtraceEvent|null|undefined} blockUnplug
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.blockUnplug = null;

            /**
             * FtraceEvent ext4AllocDaBlocks.
             * @member {perfetto.protos.IExt4AllocDaBlocksFtraceEvent|null|undefined} ext4AllocDaBlocks
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4AllocDaBlocks = null;

            /**
             * FtraceEvent ext4AllocateBlocks.
             * @member {perfetto.protos.IExt4AllocateBlocksFtraceEvent|null|undefined} ext4AllocateBlocks
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4AllocateBlocks = null;

            /**
             * FtraceEvent ext4AllocateInode.
             * @member {perfetto.protos.IExt4AllocateInodeFtraceEvent|null|undefined} ext4AllocateInode
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4AllocateInode = null;

            /**
             * FtraceEvent ext4BeginOrderedTruncate.
             * @member {perfetto.protos.IExt4BeginOrderedTruncateFtraceEvent|null|undefined} ext4BeginOrderedTruncate
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4BeginOrderedTruncate = null;

            /**
             * FtraceEvent ext4CollapseRange.
             * @member {perfetto.protos.IExt4CollapseRangeFtraceEvent|null|undefined} ext4CollapseRange
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4CollapseRange = null;

            /**
             * FtraceEvent ext4DaReleaseSpace.
             * @member {perfetto.protos.IExt4DaReleaseSpaceFtraceEvent|null|undefined} ext4DaReleaseSpace
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4DaReleaseSpace = null;

            /**
             * FtraceEvent ext4DaReserveSpace.
             * @member {perfetto.protos.IExt4DaReserveSpaceFtraceEvent|null|undefined} ext4DaReserveSpace
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4DaReserveSpace = null;

            /**
             * FtraceEvent ext4DaUpdateReserveSpace.
             * @member {perfetto.protos.IExt4DaUpdateReserveSpaceFtraceEvent|null|undefined} ext4DaUpdateReserveSpace
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4DaUpdateReserveSpace = null;

            /**
             * FtraceEvent ext4DaWritePages.
             * @member {perfetto.protos.IExt4DaWritePagesFtraceEvent|null|undefined} ext4DaWritePages
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4DaWritePages = null;

            /**
             * FtraceEvent ext4DaWritePagesExtent.
             * @member {perfetto.protos.IExt4DaWritePagesExtentFtraceEvent|null|undefined} ext4DaWritePagesExtent
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4DaWritePagesExtent = null;

            /**
             * FtraceEvent ext4Direct_IOEnter.
             * @member {perfetto.protos.IExt4DirectIOEnterFtraceEvent|null|undefined} ext4Direct_IOEnter
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4Direct_IOEnter = null;

            /**
             * FtraceEvent ext4Direct_IOExit.
             * @member {perfetto.protos.IExt4DirectIOExitFtraceEvent|null|undefined} ext4Direct_IOExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4Direct_IOExit = null;

            /**
             * FtraceEvent ext4DiscardBlocks.
             * @member {perfetto.protos.IExt4DiscardBlocksFtraceEvent|null|undefined} ext4DiscardBlocks
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4DiscardBlocks = null;

            /**
             * FtraceEvent ext4DiscardPreallocations.
             * @member {perfetto.protos.IExt4DiscardPreallocationsFtraceEvent|null|undefined} ext4DiscardPreallocations
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4DiscardPreallocations = null;

            /**
             * FtraceEvent ext4DropInode.
             * @member {perfetto.protos.IExt4DropInodeFtraceEvent|null|undefined} ext4DropInode
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4DropInode = null;

            /**
             * FtraceEvent ext4EsCacheExtent.
             * @member {perfetto.protos.IExt4EsCacheExtentFtraceEvent|null|undefined} ext4EsCacheExtent
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4EsCacheExtent = null;

            /**
             * FtraceEvent ext4EsFindDelayedExtentRangeEnter.
             * @member {perfetto.protos.IExt4EsFindDelayedExtentRangeEnterFtraceEvent|null|undefined} ext4EsFindDelayedExtentRangeEnter
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4EsFindDelayedExtentRangeEnter = null;

            /**
             * FtraceEvent ext4EsFindDelayedExtentRangeExit.
             * @member {perfetto.protos.IExt4EsFindDelayedExtentRangeExitFtraceEvent|null|undefined} ext4EsFindDelayedExtentRangeExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4EsFindDelayedExtentRangeExit = null;

            /**
             * FtraceEvent ext4EsInsertExtent.
             * @member {perfetto.protos.IExt4EsInsertExtentFtraceEvent|null|undefined} ext4EsInsertExtent
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4EsInsertExtent = null;

            /**
             * FtraceEvent ext4EsLookupExtentEnter.
             * @member {perfetto.protos.IExt4EsLookupExtentEnterFtraceEvent|null|undefined} ext4EsLookupExtentEnter
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4EsLookupExtentEnter = null;

            /**
             * FtraceEvent ext4EsLookupExtentExit.
             * @member {perfetto.protos.IExt4EsLookupExtentExitFtraceEvent|null|undefined} ext4EsLookupExtentExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4EsLookupExtentExit = null;

            /**
             * FtraceEvent ext4EsRemoveExtent.
             * @member {perfetto.protos.IExt4EsRemoveExtentFtraceEvent|null|undefined} ext4EsRemoveExtent
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4EsRemoveExtent = null;

            /**
             * FtraceEvent ext4EsShrink.
             * @member {perfetto.protos.IExt4EsShrinkFtraceEvent|null|undefined} ext4EsShrink
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4EsShrink = null;

            /**
             * FtraceEvent ext4EsShrinkCount.
             * @member {perfetto.protos.IExt4EsShrinkCountFtraceEvent|null|undefined} ext4EsShrinkCount
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4EsShrinkCount = null;

            /**
             * FtraceEvent ext4EsShrinkScanEnter.
             * @member {perfetto.protos.IExt4EsShrinkScanEnterFtraceEvent|null|undefined} ext4EsShrinkScanEnter
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4EsShrinkScanEnter = null;

            /**
             * FtraceEvent ext4EsShrinkScanExit.
             * @member {perfetto.protos.IExt4EsShrinkScanExitFtraceEvent|null|undefined} ext4EsShrinkScanExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4EsShrinkScanExit = null;

            /**
             * FtraceEvent ext4EvictInode.
             * @member {perfetto.protos.IExt4EvictInodeFtraceEvent|null|undefined} ext4EvictInode
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4EvictInode = null;

            /**
             * FtraceEvent ext4ExtConvertToInitializedEnter.
             * @member {perfetto.protos.IExt4ExtConvertToInitializedEnterFtraceEvent|null|undefined} ext4ExtConvertToInitializedEnter
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4ExtConvertToInitializedEnter = null;

            /**
             * FtraceEvent ext4ExtConvertToInitializedFastpath.
             * @member {perfetto.protos.IExt4ExtConvertToInitializedFastpathFtraceEvent|null|undefined} ext4ExtConvertToInitializedFastpath
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4ExtConvertToInitializedFastpath = null;

            /**
             * FtraceEvent ext4ExtHandleUnwrittenExtents.
             * @member {perfetto.protos.IExt4ExtHandleUnwrittenExtentsFtraceEvent|null|undefined} ext4ExtHandleUnwrittenExtents
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4ExtHandleUnwrittenExtents = null;

            /**
             * FtraceEvent ext4ExtInCache.
             * @member {perfetto.protos.IExt4ExtInCacheFtraceEvent|null|undefined} ext4ExtInCache
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4ExtInCache = null;

            /**
             * FtraceEvent ext4ExtLoadExtent.
             * @member {perfetto.protos.IExt4ExtLoadExtentFtraceEvent|null|undefined} ext4ExtLoadExtent
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4ExtLoadExtent = null;

            /**
             * FtraceEvent ext4ExtMapBlocksEnter.
             * @member {perfetto.protos.IExt4ExtMapBlocksEnterFtraceEvent|null|undefined} ext4ExtMapBlocksEnter
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4ExtMapBlocksEnter = null;

            /**
             * FtraceEvent ext4ExtMapBlocksExit.
             * @member {perfetto.protos.IExt4ExtMapBlocksExitFtraceEvent|null|undefined} ext4ExtMapBlocksExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4ExtMapBlocksExit = null;

            /**
             * FtraceEvent ext4ExtPutInCache.
             * @member {perfetto.protos.IExt4ExtPutInCacheFtraceEvent|null|undefined} ext4ExtPutInCache
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4ExtPutInCache = null;

            /**
             * FtraceEvent ext4ExtRemoveSpace.
             * @member {perfetto.protos.IExt4ExtRemoveSpaceFtraceEvent|null|undefined} ext4ExtRemoveSpace
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4ExtRemoveSpace = null;

            /**
             * FtraceEvent ext4ExtRemoveSpaceDone.
             * @member {perfetto.protos.IExt4ExtRemoveSpaceDoneFtraceEvent|null|undefined} ext4ExtRemoveSpaceDone
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4ExtRemoveSpaceDone = null;

            /**
             * FtraceEvent ext4ExtRmIdx.
             * @member {perfetto.protos.IExt4ExtRmIdxFtraceEvent|null|undefined} ext4ExtRmIdx
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4ExtRmIdx = null;

            /**
             * FtraceEvent ext4ExtRmLeaf.
             * @member {perfetto.protos.IExt4ExtRmLeafFtraceEvent|null|undefined} ext4ExtRmLeaf
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4ExtRmLeaf = null;

            /**
             * FtraceEvent ext4ExtShowExtent.
             * @member {perfetto.protos.IExt4ExtShowExtentFtraceEvent|null|undefined} ext4ExtShowExtent
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4ExtShowExtent = null;

            /**
             * FtraceEvent ext4FallocateEnter.
             * @member {perfetto.protos.IExt4FallocateEnterFtraceEvent|null|undefined} ext4FallocateEnter
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4FallocateEnter = null;

            /**
             * FtraceEvent ext4FallocateExit.
             * @member {perfetto.protos.IExt4FallocateExitFtraceEvent|null|undefined} ext4FallocateExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4FallocateExit = null;

            /**
             * FtraceEvent ext4FindDelallocRange.
             * @member {perfetto.protos.IExt4FindDelallocRangeFtraceEvent|null|undefined} ext4FindDelallocRange
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4FindDelallocRange = null;

            /**
             * FtraceEvent ext4Forget.
             * @member {perfetto.protos.IExt4ForgetFtraceEvent|null|undefined} ext4Forget
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4Forget = null;

            /**
             * FtraceEvent ext4FreeBlocks.
             * @member {perfetto.protos.IExt4FreeBlocksFtraceEvent|null|undefined} ext4FreeBlocks
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4FreeBlocks = null;

            /**
             * FtraceEvent ext4FreeInode.
             * @member {perfetto.protos.IExt4FreeInodeFtraceEvent|null|undefined} ext4FreeInode
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4FreeInode = null;

            /**
             * FtraceEvent ext4GetImpliedClusterAllocExit.
             * @member {perfetto.protos.IExt4GetImpliedClusterAllocExitFtraceEvent|null|undefined} ext4GetImpliedClusterAllocExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4GetImpliedClusterAllocExit = null;

            /**
             * FtraceEvent ext4GetReservedClusterAlloc.
             * @member {perfetto.protos.IExt4GetReservedClusterAllocFtraceEvent|null|undefined} ext4GetReservedClusterAlloc
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4GetReservedClusterAlloc = null;

            /**
             * FtraceEvent ext4IndMapBlocksEnter.
             * @member {perfetto.protos.IExt4IndMapBlocksEnterFtraceEvent|null|undefined} ext4IndMapBlocksEnter
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4IndMapBlocksEnter = null;

            /**
             * FtraceEvent ext4IndMapBlocksExit.
             * @member {perfetto.protos.IExt4IndMapBlocksExitFtraceEvent|null|undefined} ext4IndMapBlocksExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4IndMapBlocksExit = null;

            /**
             * FtraceEvent ext4InsertRange.
             * @member {perfetto.protos.IExt4InsertRangeFtraceEvent|null|undefined} ext4InsertRange
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4InsertRange = null;

            /**
             * FtraceEvent ext4Invalidatepage.
             * @member {perfetto.protos.IExt4InvalidatepageFtraceEvent|null|undefined} ext4Invalidatepage
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4Invalidatepage = null;

            /**
             * FtraceEvent ext4JournalStart.
             * @member {perfetto.protos.IExt4JournalStartFtraceEvent|null|undefined} ext4JournalStart
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4JournalStart = null;

            /**
             * FtraceEvent ext4JournalStartReserved.
             * @member {perfetto.protos.IExt4JournalStartReservedFtraceEvent|null|undefined} ext4JournalStartReserved
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4JournalStartReserved = null;

            /**
             * FtraceEvent ext4JournalledInvalidatepage.
             * @member {perfetto.protos.IExt4JournalledInvalidatepageFtraceEvent|null|undefined} ext4JournalledInvalidatepage
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4JournalledInvalidatepage = null;

            /**
             * FtraceEvent ext4JournalledWriteEnd.
             * @member {perfetto.protos.IExt4JournalledWriteEndFtraceEvent|null|undefined} ext4JournalledWriteEnd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4JournalledWriteEnd = null;

            /**
             * FtraceEvent ext4LoadInode.
             * @member {perfetto.protos.IExt4LoadInodeFtraceEvent|null|undefined} ext4LoadInode
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4LoadInode = null;

            /**
             * FtraceEvent ext4LoadInodeBitmap.
             * @member {perfetto.protos.IExt4LoadInodeBitmapFtraceEvent|null|undefined} ext4LoadInodeBitmap
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4LoadInodeBitmap = null;

            /**
             * FtraceEvent ext4MarkInodeDirty.
             * @member {perfetto.protos.IExt4MarkInodeDirtyFtraceEvent|null|undefined} ext4MarkInodeDirty
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4MarkInodeDirty = null;

            /**
             * FtraceEvent ext4MbBitmapLoad.
             * @member {perfetto.protos.IExt4MbBitmapLoadFtraceEvent|null|undefined} ext4MbBitmapLoad
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4MbBitmapLoad = null;

            /**
             * FtraceEvent ext4MbBuddyBitmapLoad.
             * @member {perfetto.protos.IExt4MbBuddyBitmapLoadFtraceEvent|null|undefined} ext4MbBuddyBitmapLoad
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4MbBuddyBitmapLoad = null;

            /**
             * FtraceEvent ext4MbDiscardPreallocations.
             * @member {perfetto.protos.IExt4MbDiscardPreallocationsFtraceEvent|null|undefined} ext4MbDiscardPreallocations
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4MbDiscardPreallocations = null;

            /**
             * FtraceEvent ext4MbNewGroupPa.
             * @member {perfetto.protos.IExt4MbNewGroupPaFtraceEvent|null|undefined} ext4MbNewGroupPa
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4MbNewGroupPa = null;

            /**
             * FtraceEvent ext4MbNewInodePa.
             * @member {perfetto.protos.IExt4MbNewInodePaFtraceEvent|null|undefined} ext4MbNewInodePa
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4MbNewInodePa = null;

            /**
             * FtraceEvent ext4MbReleaseGroupPa.
             * @member {perfetto.protos.IExt4MbReleaseGroupPaFtraceEvent|null|undefined} ext4MbReleaseGroupPa
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4MbReleaseGroupPa = null;

            /**
             * FtraceEvent ext4MbReleaseInodePa.
             * @member {perfetto.protos.IExt4MbReleaseInodePaFtraceEvent|null|undefined} ext4MbReleaseInodePa
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4MbReleaseInodePa = null;

            /**
             * FtraceEvent ext4MballocAlloc.
             * @member {perfetto.protos.IExt4MballocAllocFtraceEvent|null|undefined} ext4MballocAlloc
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4MballocAlloc = null;

            /**
             * FtraceEvent ext4MballocDiscard.
             * @member {perfetto.protos.IExt4MballocDiscardFtraceEvent|null|undefined} ext4MballocDiscard
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4MballocDiscard = null;

            /**
             * FtraceEvent ext4MballocFree.
             * @member {perfetto.protos.IExt4MballocFreeFtraceEvent|null|undefined} ext4MballocFree
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4MballocFree = null;

            /**
             * FtraceEvent ext4MballocPrealloc.
             * @member {perfetto.protos.IExt4MballocPreallocFtraceEvent|null|undefined} ext4MballocPrealloc
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4MballocPrealloc = null;

            /**
             * FtraceEvent ext4OtherInodeUpdateTime.
             * @member {perfetto.protos.IExt4OtherInodeUpdateTimeFtraceEvent|null|undefined} ext4OtherInodeUpdateTime
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4OtherInodeUpdateTime = null;

            /**
             * FtraceEvent ext4PunchHole.
             * @member {perfetto.protos.IExt4PunchHoleFtraceEvent|null|undefined} ext4PunchHole
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4PunchHole = null;

            /**
             * FtraceEvent ext4ReadBlockBitmapLoad.
             * @member {perfetto.protos.IExt4ReadBlockBitmapLoadFtraceEvent|null|undefined} ext4ReadBlockBitmapLoad
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4ReadBlockBitmapLoad = null;

            /**
             * FtraceEvent ext4Readpage.
             * @member {perfetto.protos.IExt4ReadpageFtraceEvent|null|undefined} ext4Readpage
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4Readpage = null;

            /**
             * FtraceEvent ext4Releasepage.
             * @member {perfetto.protos.IExt4ReleasepageFtraceEvent|null|undefined} ext4Releasepage
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4Releasepage = null;

            /**
             * FtraceEvent ext4RemoveBlocks.
             * @member {perfetto.protos.IExt4RemoveBlocksFtraceEvent|null|undefined} ext4RemoveBlocks
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4RemoveBlocks = null;

            /**
             * FtraceEvent ext4RequestBlocks.
             * @member {perfetto.protos.IExt4RequestBlocksFtraceEvent|null|undefined} ext4RequestBlocks
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4RequestBlocks = null;

            /**
             * FtraceEvent ext4RequestInode.
             * @member {perfetto.protos.IExt4RequestInodeFtraceEvent|null|undefined} ext4RequestInode
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4RequestInode = null;

            /**
             * FtraceEvent ext4SyncFs.
             * @member {perfetto.protos.IExt4SyncFsFtraceEvent|null|undefined} ext4SyncFs
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4SyncFs = null;

            /**
             * FtraceEvent ext4TrimAllFree.
             * @member {perfetto.protos.IExt4TrimAllFreeFtraceEvent|null|undefined} ext4TrimAllFree
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4TrimAllFree = null;

            /**
             * FtraceEvent ext4TrimExtent.
             * @member {perfetto.protos.IExt4TrimExtentFtraceEvent|null|undefined} ext4TrimExtent
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4TrimExtent = null;

            /**
             * FtraceEvent ext4TruncateEnter.
             * @member {perfetto.protos.IExt4TruncateEnterFtraceEvent|null|undefined} ext4TruncateEnter
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4TruncateEnter = null;

            /**
             * FtraceEvent ext4TruncateExit.
             * @member {perfetto.protos.IExt4TruncateExitFtraceEvent|null|undefined} ext4TruncateExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4TruncateExit = null;

            /**
             * FtraceEvent ext4UnlinkEnter.
             * @member {perfetto.protos.IExt4UnlinkEnterFtraceEvent|null|undefined} ext4UnlinkEnter
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4UnlinkEnter = null;

            /**
             * FtraceEvent ext4UnlinkExit.
             * @member {perfetto.protos.IExt4UnlinkExitFtraceEvent|null|undefined} ext4UnlinkExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4UnlinkExit = null;

            /**
             * FtraceEvent ext4WriteBegin.
             * @member {perfetto.protos.IExt4WriteBeginFtraceEvent|null|undefined} ext4WriteBegin
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4WriteBegin = null;

            /**
             * FtraceEvent ext4WriteEnd.
             * @member {perfetto.protos.IExt4WriteEndFtraceEvent|null|undefined} ext4WriteEnd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4WriteEnd = null;

            /**
             * FtraceEvent ext4Writepage.
             * @member {perfetto.protos.IExt4WritepageFtraceEvent|null|undefined} ext4Writepage
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4Writepage = null;

            /**
             * FtraceEvent ext4Writepages.
             * @member {perfetto.protos.IExt4WritepagesFtraceEvent|null|undefined} ext4Writepages
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4Writepages = null;

            /**
             * FtraceEvent ext4WritepagesResult.
             * @member {perfetto.protos.IExt4WritepagesResultFtraceEvent|null|undefined} ext4WritepagesResult
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4WritepagesResult = null;

            /**
             * FtraceEvent ext4ZeroRange.
             * @member {perfetto.protos.IExt4ZeroRangeFtraceEvent|null|undefined} ext4ZeroRange
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ext4ZeroRange = null;

            /**
             * FtraceEvent taskNewtask.
             * @member {perfetto.protos.ITaskNewtaskFtraceEvent|null|undefined} taskNewtask
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.taskNewtask = null;

            /**
             * FtraceEvent taskRename.
             * @member {perfetto.protos.ITaskRenameFtraceEvent|null|undefined} taskRename
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.taskRename = null;

            /**
             * FtraceEvent schedProcessExec.
             * @member {perfetto.protos.ISchedProcessExecFtraceEvent|null|undefined} schedProcessExec
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.schedProcessExec = null;

            /**
             * FtraceEvent schedProcessExit.
             * @member {perfetto.protos.ISchedProcessExitFtraceEvent|null|undefined} schedProcessExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.schedProcessExit = null;

            /**
             * FtraceEvent schedProcessFork.
             * @member {perfetto.protos.ISchedProcessForkFtraceEvent|null|undefined} schedProcessFork
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.schedProcessFork = null;

            /**
             * FtraceEvent schedProcessFree.
             * @member {perfetto.protos.ISchedProcessFreeFtraceEvent|null|undefined} schedProcessFree
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.schedProcessFree = null;

            /**
             * FtraceEvent schedProcessHang.
             * @member {perfetto.protos.ISchedProcessHangFtraceEvent|null|undefined} schedProcessHang
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.schedProcessHang = null;

            /**
             * FtraceEvent schedProcessWait.
             * @member {perfetto.protos.ISchedProcessWaitFtraceEvent|null|undefined} schedProcessWait
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.schedProcessWait = null;

            /**
             * FtraceEvent f2fsDoSubmitBio.
             * @member {perfetto.protos.IF2fsDoSubmitBioFtraceEvent|null|undefined} f2fsDoSubmitBio
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsDoSubmitBio = null;

            /**
             * FtraceEvent f2fsEvictInode.
             * @member {perfetto.protos.IF2fsEvictInodeFtraceEvent|null|undefined} f2fsEvictInode
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsEvictInode = null;

            /**
             * FtraceEvent f2fsFallocate.
             * @member {perfetto.protos.IF2fsFallocateFtraceEvent|null|undefined} f2fsFallocate
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsFallocate = null;

            /**
             * FtraceEvent f2fsGetDataBlock.
             * @member {perfetto.protos.IF2fsGetDataBlockFtraceEvent|null|undefined} f2fsGetDataBlock
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsGetDataBlock = null;

            /**
             * FtraceEvent f2fsGetVictim.
             * @member {perfetto.protos.IF2fsGetVictimFtraceEvent|null|undefined} f2fsGetVictim
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsGetVictim = null;

            /**
             * FtraceEvent f2fsIget.
             * @member {perfetto.protos.IF2fsIgetFtraceEvent|null|undefined} f2fsIget
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsIget = null;

            /**
             * FtraceEvent f2fsIgetExit.
             * @member {perfetto.protos.IF2fsIgetExitFtraceEvent|null|undefined} f2fsIgetExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsIgetExit = null;

            /**
             * FtraceEvent f2fsNewInode.
             * @member {perfetto.protos.IF2fsNewInodeFtraceEvent|null|undefined} f2fsNewInode
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsNewInode = null;

            /**
             * FtraceEvent f2fsReadpage.
             * @member {perfetto.protos.IF2fsReadpageFtraceEvent|null|undefined} f2fsReadpage
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsReadpage = null;

            /**
             * FtraceEvent f2fsReserveNewBlock.
             * @member {perfetto.protos.IF2fsReserveNewBlockFtraceEvent|null|undefined} f2fsReserveNewBlock
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsReserveNewBlock = null;

            /**
             * FtraceEvent f2fsSetPageDirty.
             * @member {perfetto.protos.IF2fsSetPageDirtyFtraceEvent|null|undefined} f2fsSetPageDirty
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsSetPageDirty = null;

            /**
             * FtraceEvent f2fsSubmitWritePage.
             * @member {perfetto.protos.IF2fsSubmitWritePageFtraceEvent|null|undefined} f2fsSubmitWritePage
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsSubmitWritePage = null;

            /**
             * FtraceEvent f2fsSyncFileEnter.
             * @member {perfetto.protos.IF2fsSyncFileEnterFtraceEvent|null|undefined} f2fsSyncFileEnter
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsSyncFileEnter = null;

            /**
             * FtraceEvent f2fsSyncFileExit.
             * @member {perfetto.protos.IF2fsSyncFileExitFtraceEvent|null|undefined} f2fsSyncFileExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsSyncFileExit = null;

            /**
             * FtraceEvent f2fsSyncFs.
             * @member {perfetto.protos.IF2fsSyncFsFtraceEvent|null|undefined} f2fsSyncFs
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsSyncFs = null;

            /**
             * FtraceEvent f2fsTruncate.
             * @member {perfetto.protos.IF2fsTruncateFtraceEvent|null|undefined} f2fsTruncate
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsTruncate = null;

            /**
             * FtraceEvent f2fsTruncateBlocksEnter.
             * @member {perfetto.protos.IF2fsTruncateBlocksEnterFtraceEvent|null|undefined} f2fsTruncateBlocksEnter
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsTruncateBlocksEnter = null;

            /**
             * FtraceEvent f2fsTruncateBlocksExit.
             * @member {perfetto.protos.IF2fsTruncateBlocksExitFtraceEvent|null|undefined} f2fsTruncateBlocksExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsTruncateBlocksExit = null;

            /**
             * FtraceEvent f2fsTruncateDataBlocksRange.
             * @member {perfetto.protos.IF2fsTruncateDataBlocksRangeFtraceEvent|null|undefined} f2fsTruncateDataBlocksRange
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsTruncateDataBlocksRange = null;

            /**
             * FtraceEvent f2fsTruncateInodeBlocksEnter.
             * @member {perfetto.protos.IF2fsTruncateInodeBlocksEnterFtraceEvent|null|undefined} f2fsTruncateInodeBlocksEnter
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsTruncateInodeBlocksEnter = null;

            /**
             * FtraceEvent f2fsTruncateInodeBlocksExit.
             * @member {perfetto.protos.IF2fsTruncateInodeBlocksExitFtraceEvent|null|undefined} f2fsTruncateInodeBlocksExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsTruncateInodeBlocksExit = null;

            /**
             * FtraceEvent f2fsTruncateNode.
             * @member {perfetto.protos.IF2fsTruncateNodeFtraceEvent|null|undefined} f2fsTruncateNode
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsTruncateNode = null;

            /**
             * FtraceEvent f2fsTruncateNodesEnter.
             * @member {perfetto.protos.IF2fsTruncateNodesEnterFtraceEvent|null|undefined} f2fsTruncateNodesEnter
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsTruncateNodesEnter = null;

            /**
             * FtraceEvent f2fsTruncateNodesExit.
             * @member {perfetto.protos.IF2fsTruncateNodesExitFtraceEvent|null|undefined} f2fsTruncateNodesExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsTruncateNodesExit = null;

            /**
             * FtraceEvent f2fsTruncatePartialNodes.
             * @member {perfetto.protos.IF2fsTruncatePartialNodesFtraceEvent|null|undefined} f2fsTruncatePartialNodes
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsTruncatePartialNodes = null;

            /**
             * FtraceEvent f2fsUnlinkEnter.
             * @member {perfetto.protos.IF2fsUnlinkEnterFtraceEvent|null|undefined} f2fsUnlinkEnter
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsUnlinkEnter = null;

            /**
             * FtraceEvent f2fsUnlinkExit.
             * @member {perfetto.protos.IF2fsUnlinkExitFtraceEvent|null|undefined} f2fsUnlinkExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsUnlinkExit = null;

            /**
             * FtraceEvent f2fsVmPageMkwrite.
             * @member {perfetto.protos.IF2fsVmPageMkwriteFtraceEvent|null|undefined} f2fsVmPageMkwrite
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsVmPageMkwrite = null;

            /**
             * FtraceEvent f2fsWriteBegin.
             * @member {perfetto.protos.IF2fsWriteBeginFtraceEvent|null|undefined} f2fsWriteBegin
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsWriteBegin = null;

            /**
             * FtraceEvent f2fsWriteCheckpoint.
             * @member {perfetto.protos.IF2fsWriteCheckpointFtraceEvent|null|undefined} f2fsWriteCheckpoint
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsWriteCheckpoint = null;

            /**
             * FtraceEvent f2fsWriteEnd.
             * @member {perfetto.protos.IF2fsWriteEndFtraceEvent|null|undefined} f2fsWriteEnd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsWriteEnd = null;

            /**
             * FtraceEvent allocPagesIommuEnd.
             * @member {perfetto.protos.IAllocPagesIommuEndFtraceEvent|null|undefined} allocPagesIommuEnd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.allocPagesIommuEnd = null;

            /**
             * FtraceEvent allocPagesIommuFail.
             * @member {perfetto.protos.IAllocPagesIommuFailFtraceEvent|null|undefined} allocPagesIommuFail
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.allocPagesIommuFail = null;

            /**
             * FtraceEvent allocPagesIommuStart.
             * @member {perfetto.protos.IAllocPagesIommuStartFtraceEvent|null|undefined} allocPagesIommuStart
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.allocPagesIommuStart = null;

            /**
             * FtraceEvent allocPagesSysEnd.
             * @member {perfetto.protos.IAllocPagesSysEndFtraceEvent|null|undefined} allocPagesSysEnd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.allocPagesSysEnd = null;

            /**
             * FtraceEvent allocPagesSysFail.
             * @member {perfetto.protos.IAllocPagesSysFailFtraceEvent|null|undefined} allocPagesSysFail
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.allocPagesSysFail = null;

            /**
             * FtraceEvent allocPagesSysStart.
             * @member {perfetto.protos.IAllocPagesSysStartFtraceEvent|null|undefined} allocPagesSysStart
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.allocPagesSysStart = null;

            /**
             * FtraceEvent dmaAllocContiguousRetry.
             * @member {perfetto.protos.IDmaAllocContiguousRetryFtraceEvent|null|undefined} dmaAllocContiguousRetry
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.dmaAllocContiguousRetry = null;

            /**
             * FtraceEvent iommuMapRange.
             * @member {perfetto.protos.IIommuMapRangeFtraceEvent|null|undefined} iommuMapRange
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.iommuMapRange = null;

            /**
             * FtraceEvent iommuSecPtblMapRangeEnd.
             * @member {perfetto.protos.IIommuSecPtblMapRangeEndFtraceEvent|null|undefined} iommuSecPtblMapRangeEnd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.iommuSecPtblMapRangeEnd = null;

            /**
             * FtraceEvent iommuSecPtblMapRangeStart.
             * @member {perfetto.protos.IIommuSecPtblMapRangeStartFtraceEvent|null|undefined} iommuSecPtblMapRangeStart
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.iommuSecPtblMapRangeStart = null;

            /**
             * FtraceEvent ionAllocBufferEnd.
             * @member {perfetto.protos.IIonAllocBufferEndFtraceEvent|null|undefined} ionAllocBufferEnd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ionAllocBufferEnd = null;

            /**
             * FtraceEvent ionAllocBufferFail.
             * @member {perfetto.protos.IIonAllocBufferFailFtraceEvent|null|undefined} ionAllocBufferFail
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ionAllocBufferFail = null;

            /**
             * FtraceEvent ionAllocBufferFallback.
             * @member {perfetto.protos.IIonAllocBufferFallbackFtraceEvent|null|undefined} ionAllocBufferFallback
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ionAllocBufferFallback = null;

            /**
             * FtraceEvent ionAllocBufferStart.
             * @member {perfetto.protos.IIonAllocBufferStartFtraceEvent|null|undefined} ionAllocBufferStart
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ionAllocBufferStart = null;

            /**
             * FtraceEvent ionCpAllocRetry.
             * @member {perfetto.protos.IIonCpAllocRetryFtraceEvent|null|undefined} ionCpAllocRetry
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ionCpAllocRetry = null;

            /**
             * FtraceEvent ionCpSecureBufferEnd.
             * @member {perfetto.protos.IIonCpSecureBufferEndFtraceEvent|null|undefined} ionCpSecureBufferEnd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ionCpSecureBufferEnd = null;

            /**
             * FtraceEvent ionCpSecureBufferStart.
             * @member {perfetto.protos.IIonCpSecureBufferStartFtraceEvent|null|undefined} ionCpSecureBufferStart
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ionCpSecureBufferStart = null;

            /**
             * FtraceEvent ionPrefetching.
             * @member {perfetto.protos.IIonPrefetchingFtraceEvent|null|undefined} ionPrefetching
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ionPrefetching = null;

            /**
             * FtraceEvent ionSecureCmaAddToPoolEnd.
             * @member {perfetto.protos.IIonSecureCmaAddToPoolEndFtraceEvent|null|undefined} ionSecureCmaAddToPoolEnd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ionSecureCmaAddToPoolEnd = null;

            /**
             * FtraceEvent ionSecureCmaAddToPoolStart.
             * @member {perfetto.protos.IIonSecureCmaAddToPoolStartFtraceEvent|null|undefined} ionSecureCmaAddToPoolStart
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ionSecureCmaAddToPoolStart = null;

            /**
             * FtraceEvent ionSecureCmaAllocateEnd.
             * @member {perfetto.protos.IIonSecureCmaAllocateEndFtraceEvent|null|undefined} ionSecureCmaAllocateEnd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ionSecureCmaAllocateEnd = null;

            /**
             * FtraceEvent ionSecureCmaAllocateStart.
             * @member {perfetto.protos.IIonSecureCmaAllocateStartFtraceEvent|null|undefined} ionSecureCmaAllocateStart
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ionSecureCmaAllocateStart = null;

            /**
             * FtraceEvent ionSecureCmaShrinkPoolEnd.
             * @member {perfetto.protos.IIonSecureCmaShrinkPoolEndFtraceEvent|null|undefined} ionSecureCmaShrinkPoolEnd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ionSecureCmaShrinkPoolEnd = null;

            /**
             * FtraceEvent ionSecureCmaShrinkPoolStart.
             * @member {perfetto.protos.IIonSecureCmaShrinkPoolStartFtraceEvent|null|undefined} ionSecureCmaShrinkPoolStart
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ionSecureCmaShrinkPoolStart = null;

            /**
             * FtraceEvent kfree.
             * @member {perfetto.protos.IKfreeFtraceEvent|null|undefined} kfree
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kfree = null;

            /**
             * FtraceEvent kmalloc.
             * @member {perfetto.protos.IKmallocFtraceEvent|null|undefined} kmalloc
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kmalloc = null;

            /**
             * FtraceEvent kmallocNode.
             * @member {perfetto.protos.IKmallocNodeFtraceEvent|null|undefined} kmallocNode
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kmallocNode = null;

            /**
             * FtraceEvent kmemCacheAlloc.
             * @member {perfetto.protos.IKmemCacheAllocFtraceEvent|null|undefined} kmemCacheAlloc
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kmemCacheAlloc = null;

            /**
             * FtraceEvent kmemCacheAllocNode.
             * @member {perfetto.protos.IKmemCacheAllocNodeFtraceEvent|null|undefined} kmemCacheAllocNode
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kmemCacheAllocNode = null;

            /**
             * FtraceEvent kmemCacheFree.
             * @member {perfetto.protos.IKmemCacheFreeFtraceEvent|null|undefined} kmemCacheFree
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kmemCacheFree = null;

            /**
             * FtraceEvent migratePagesEnd.
             * @member {perfetto.protos.IMigratePagesEndFtraceEvent|null|undefined} migratePagesEnd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.migratePagesEnd = null;

            /**
             * FtraceEvent migratePagesStart.
             * @member {perfetto.protos.IMigratePagesStartFtraceEvent|null|undefined} migratePagesStart
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.migratePagesStart = null;

            /**
             * FtraceEvent migrateRetry.
             * @member {perfetto.protos.IMigrateRetryFtraceEvent|null|undefined} migrateRetry
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.migrateRetry = null;

            /**
             * FtraceEvent mmPageAlloc.
             * @member {perfetto.protos.IMmPageAllocFtraceEvent|null|undefined} mmPageAlloc
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmPageAlloc = null;

            /**
             * FtraceEvent mmPageAllocExtfrag.
             * @member {perfetto.protos.IMmPageAllocExtfragFtraceEvent|null|undefined} mmPageAllocExtfrag
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmPageAllocExtfrag = null;

            /**
             * FtraceEvent mmPageAllocZoneLocked.
             * @member {perfetto.protos.IMmPageAllocZoneLockedFtraceEvent|null|undefined} mmPageAllocZoneLocked
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmPageAllocZoneLocked = null;

            /**
             * FtraceEvent mmPageFree.
             * @member {perfetto.protos.IMmPageFreeFtraceEvent|null|undefined} mmPageFree
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmPageFree = null;

            /**
             * FtraceEvent mmPageFreeBatched.
             * @member {perfetto.protos.IMmPageFreeBatchedFtraceEvent|null|undefined} mmPageFreeBatched
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmPageFreeBatched = null;

            /**
             * FtraceEvent mmPagePcpuDrain.
             * @member {perfetto.protos.IMmPagePcpuDrainFtraceEvent|null|undefined} mmPagePcpuDrain
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmPagePcpuDrain = null;

            /**
             * FtraceEvent rssStat.
             * @member {perfetto.protos.IRssStatFtraceEvent|null|undefined} rssStat
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.rssStat = null;

            /**
             * FtraceEvent ionHeapShrink.
             * @member {perfetto.protos.IIonHeapShrinkFtraceEvent|null|undefined} ionHeapShrink
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ionHeapShrink = null;

            /**
             * FtraceEvent ionHeapGrow.
             * @member {perfetto.protos.IIonHeapGrowFtraceEvent|null|undefined} ionHeapGrow
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ionHeapGrow = null;

            /**
             * FtraceEvent fenceInit.
             * @member {perfetto.protos.IFenceInitFtraceEvent|null|undefined} fenceInit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.fenceInit = null;

            /**
             * FtraceEvent fenceDestroy.
             * @member {perfetto.protos.IFenceDestroyFtraceEvent|null|undefined} fenceDestroy
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.fenceDestroy = null;

            /**
             * FtraceEvent fenceEnableSignal.
             * @member {perfetto.protos.IFenceEnableSignalFtraceEvent|null|undefined} fenceEnableSignal
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.fenceEnableSignal = null;

            /**
             * FtraceEvent fenceSignaled.
             * @member {perfetto.protos.IFenceSignaledFtraceEvent|null|undefined} fenceSignaled
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.fenceSignaled = null;

            /**
             * FtraceEvent clkEnable.
             * @member {perfetto.protos.IClkEnableFtraceEvent|null|undefined} clkEnable
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.clkEnable = null;

            /**
             * FtraceEvent clkDisable.
             * @member {perfetto.protos.IClkDisableFtraceEvent|null|undefined} clkDisable
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.clkDisable = null;

            /**
             * FtraceEvent clkSetRate.
             * @member {perfetto.protos.IClkSetRateFtraceEvent|null|undefined} clkSetRate
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.clkSetRate = null;

            /**
             * FtraceEvent binderTransactionAllocBuf.
             * @member {perfetto.protos.IBinderTransactionAllocBufFtraceEvent|null|undefined} binderTransactionAllocBuf
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.binderTransactionAllocBuf = null;

            /**
             * FtraceEvent signalDeliver.
             * @member {perfetto.protos.ISignalDeliverFtraceEvent|null|undefined} signalDeliver
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.signalDeliver = null;

            /**
             * FtraceEvent signalGenerate.
             * @member {perfetto.protos.ISignalGenerateFtraceEvent|null|undefined} signalGenerate
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.signalGenerate = null;

            /**
             * FtraceEvent oomScoreAdjUpdate.
             * @member {perfetto.protos.IOomScoreAdjUpdateFtraceEvent|null|undefined} oomScoreAdjUpdate
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.oomScoreAdjUpdate = null;

            /**
             * FtraceEvent generic.
             * @member {perfetto.protos.IGenericFtraceEvent|null|undefined} generic
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.generic = null;

            /**
             * FtraceEvent mmEventRecord.
             * @member {perfetto.protos.IMmEventRecordFtraceEvent|null|undefined} mmEventRecord
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmEventRecord = null;

            /**
             * FtraceEvent sysEnter.
             * @member {perfetto.protos.ISysEnterFtraceEvent|null|undefined} sysEnter
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.sysEnter = null;

            /**
             * FtraceEvent sysExit.
             * @member {perfetto.protos.ISysExitFtraceEvent|null|undefined} sysExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.sysExit = null;

            /**
             * FtraceEvent zero.
             * @member {perfetto.protos.IZeroFtraceEvent|null|undefined} zero
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.zero = null;

            /**
             * FtraceEvent gpuFrequency.
             * @member {perfetto.protos.IGpuFrequencyFtraceEvent|null|undefined} gpuFrequency
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.gpuFrequency = null;

            /**
             * FtraceEvent sdeTracingMarkWrite.
             * @member {perfetto.protos.ISdeTracingMarkWriteFtraceEvent|null|undefined} sdeTracingMarkWrite
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.sdeTracingMarkWrite = null;

            /**
             * FtraceEvent markVictim.
             * @member {perfetto.protos.IMarkVictimFtraceEvent|null|undefined} markVictim
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.markVictim = null;

            /**
             * FtraceEvent ionStat.
             * @member {perfetto.protos.IIonStatFtraceEvent|null|undefined} ionStat
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ionStat = null;

            /**
             * FtraceEvent ionBufferCreate.
             * @member {perfetto.protos.IIonBufferCreateFtraceEvent|null|undefined} ionBufferCreate
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ionBufferCreate = null;

            /**
             * FtraceEvent ionBufferDestroy.
             * @member {perfetto.protos.IIonBufferDestroyFtraceEvent|null|undefined} ionBufferDestroy
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ionBufferDestroy = null;

            /**
             * FtraceEvent scmCallStart.
             * @member {perfetto.protos.IScmCallStartFtraceEvent|null|undefined} scmCallStart
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.scmCallStart = null;

            /**
             * FtraceEvent scmCallEnd.
             * @member {perfetto.protos.IScmCallEndFtraceEvent|null|undefined} scmCallEnd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.scmCallEnd = null;

            /**
             * FtraceEvent gpuMemTotal.
             * @member {perfetto.protos.IGpuMemTotalFtraceEvent|null|undefined} gpuMemTotal
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.gpuMemTotal = null;

            /**
             * FtraceEvent thermalTemperature.
             * @member {perfetto.protos.IThermalTemperatureFtraceEvent|null|undefined} thermalTemperature
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.thermalTemperature = null;

            /**
             * FtraceEvent cdevUpdate.
             * @member {perfetto.protos.ICdevUpdateFtraceEvent|null|undefined} cdevUpdate
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.cdevUpdate = null;

            /**
             * FtraceEvent cpuhpExit.
             * @member {perfetto.protos.ICpuhpExitFtraceEvent|null|undefined} cpuhpExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.cpuhpExit = null;

            /**
             * FtraceEvent cpuhpMultiEnter.
             * @member {perfetto.protos.ICpuhpMultiEnterFtraceEvent|null|undefined} cpuhpMultiEnter
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.cpuhpMultiEnter = null;

            /**
             * FtraceEvent cpuhpEnter.
             * @member {perfetto.protos.ICpuhpEnterFtraceEvent|null|undefined} cpuhpEnter
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.cpuhpEnter = null;

            /**
             * FtraceEvent cpuhpLatency.
             * @member {perfetto.protos.ICpuhpLatencyFtraceEvent|null|undefined} cpuhpLatency
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.cpuhpLatency = null;

            /**
             * FtraceEvent fastrpcDmaStat.
             * @member {perfetto.protos.IFastrpcDmaStatFtraceEvent|null|undefined} fastrpcDmaStat
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.fastrpcDmaStat = null;

            /**
             * FtraceEvent dpuTracingMarkWrite.
             * @member {perfetto.protos.IDpuTracingMarkWriteFtraceEvent|null|undefined} dpuTracingMarkWrite
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.dpuTracingMarkWrite = null;

            /**
             * FtraceEvent g2dTracingMarkWrite.
             * @member {perfetto.protos.IG2dTracingMarkWriteFtraceEvent|null|undefined} g2dTracingMarkWrite
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.g2dTracingMarkWrite = null;

            /**
             * FtraceEvent maliTracingMarkWrite.
             * @member {perfetto.protos.IMaliTracingMarkWriteFtraceEvent|null|undefined} maliTracingMarkWrite
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.maliTracingMarkWrite = null;

            /**
             * FtraceEvent dmaHeapStat.
             * @member {perfetto.protos.IDmaHeapStatFtraceEvent|null|undefined} dmaHeapStat
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.dmaHeapStat = null;

            /**
             * FtraceEvent cpuhpPause.
             * @member {perfetto.protos.ICpuhpPauseFtraceEvent|null|undefined} cpuhpPause
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.cpuhpPause = null;

            /**
             * FtraceEvent schedPiSetprio.
             * @member {perfetto.protos.ISchedPiSetprioFtraceEvent|null|undefined} schedPiSetprio
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.schedPiSetprio = null;

            /**
             * FtraceEvent sdeSdeEvtlog.
             * @member {perfetto.protos.ISdeSdeEvtlogFtraceEvent|null|undefined} sdeSdeEvtlog
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.sdeSdeEvtlog = null;

            /**
             * FtraceEvent sdeSdePerfCalcCrtc.
             * @member {perfetto.protos.ISdeSdePerfCalcCrtcFtraceEvent|null|undefined} sdeSdePerfCalcCrtc
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.sdeSdePerfCalcCrtc = null;

            /**
             * FtraceEvent sdeSdePerfCrtcUpdate.
             * @member {perfetto.protos.ISdeSdePerfCrtcUpdateFtraceEvent|null|undefined} sdeSdePerfCrtcUpdate
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.sdeSdePerfCrtcUpdate = null;

            /**
             * FtraceEvent sdeSdePerfSetQosLuts.
             * @member {perfetto.protos.ISdeSdePerfSetQosLutsFtraceEvent|null|undefined} sdeSdePerfSetQosLuts
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.sdeSdePerfSetQosLuts = null;

            /**
             * FtraceEvent sdeSdePerfUpdateBus.
             * @member {perfetto.protos.ISdeSdePerfUpdateBusFtraceEvent|null|undefined} sdeSdePerfUpdateBus
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.sdeSdePerfUpdateBus = null;

            /**
             * FtraceEvent rssStatThrottled.
             * @member {perfetto.protos.IRssStatThrottledFtraceEvent|null|undefined} rssStatThrottled
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.rssStatThrottled = null;

            /**
             * FtraceEvent netifReceiveSkb.
             * @member {perfetto.protos.INetifReceiveSkbFtraceEvent|null|undefined} netifReceiveSkb
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.netifReceiveSkb = null;

            /**
             * FtraceEvent netDevXmit.
             * @member {perfetto.protos.INetDevXmitFtraceEvent|null|undefined} netDevXmit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.netDevXmit = null;

            /**
             * FtraceEvent inetSockSetState.
             * @member {perfetto.protos.IInetSockSetStateFtraceEvent|null|undefined} inetSockSetState
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.inetSockSetState = null;

            /**
             * FtraceEvent tcpRetransmitSkb.
             * @member {perfetto.protos.ITcpRetransmitSkbFtraceEvent|null|undefined} tcpRetransmitSkb
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.tcpRetransmitSkb = null;

            /**
             * FtraceEvent crosEcSensorhubData.
             * @member {perfetto.protos.ICrosEcSensorhubDataFtraceEvent|null|undefined} crosEcSensorhubData
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.crosEcSensorhubData = null;

            /**
             * FtraceEvent napiGroReceiveEntry.
             * @member {perfetto.protos.INapiGroReceiveEntryFtraceEvent|null|undefined} napiGroReceiveEntry
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.napiGroReceiveEntry = null;

            /**
             * FtraceEvent napiGroReceiveExit.
             * @member {perfetto.protos.INapiGroReceiveExitFtraceEvent|null|undefined} napiGroReceiveExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.napiGroReceiveExit = null;

            /**
             * FtraceEvent kfreeSkb.
             * @member {perfetto.protos.IKfreeSkbFtraceEvent|null|undefined} kfreeSkb
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kfreeSkb = null;

            /**
             * FtraceEvent kvmAccessFault.
             * @member {perfetto.protos.IKvmAccessFaultFtraceEvent|null|undefined} kvmAccessFault
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmAccessFault = null;

            /**
             * FtraceEvent kvmAckIrq.
             * @member {perfetto.protos.IKvmAckIrqFtraceEvent|null|undefined} kvmAckIrq
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmAckIrq = null;

            /**
             * FtraceEvent kvmAgeHva.
             * @member {perfetto.protos.IKvmAgeHvaFtraceEvent|null|undefined} kvmAgeHva
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmAgeHva = null;

            /**
             * FtraceEvent kvmAgePage.
             * @member {perfetto.protos.IKvmAgePageFtraceEvent|null|undefined} kvmAgePage
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmAgePage = null;

            /**
             * FtraceEvent kvmArmClearDebug.
             * @member {perfetto.protos.IKvmArmClearDebugFtraceEvent|null|undefined} kvmArmClearDebug
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmArmClearDebug = null;

            /**
             * FtraceEvent kvmArmSetDreg32.
             * @member {perfetto.protos.IKvmArmSetDreg32FtraceEvent|null|undefined} kvmArmSetDreg32
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmArmSetDreg32 = null;

            /**
             * FtraceEvent kvmArmSetRegset.
             * @member {perfetto.protos.IKvmArmSetRegsetFtraceEvent|null|undefined} kvmArmSetRegset
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmArmSetRegset = null;

            /**
             * FtraceEvent kvmArmSetupDebug.
             * @member {perfetto.protos.IKvmArmSetupDebugFtraceEvent|null|undefined} kvmArmSetupDebug
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmArmSetupDebug = null;

            /**
             * FtraceEvent kvmEntry.
             * @member {perfetto.protos.IKvmEntryFtraceEvent|null|undefined} kvmEntry
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmEntry = null;

            /**
             * FtraceEvent kvmExit.
             * @member {perfetto.protos.IKvmExitFtraceEvent|null|undefined} kvmExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmExit = null;

            /**
             * FtraceEvent kvmFpu.
             * @member {perfetto.protos.IKvmFpuFtraceEvent|null|undefined} kvmFpu
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmFpu = null;

            /**
             * FtraceEvent kvmGetTimerMap.
             * @member {perfetto.protos.IKvmGetTimerMapFtraceEvent|null|undefined} kvmGetTimerMap
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmGetTimerMap = null;

            /**
             * FtraceEvent kvmGuestFault.
             * @member {perfetto.protos.IKvmGuestFaultFtraceEvent|null|undefined} kvmGuestFault
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmGuestFault = null;

            /**
             * FtraceEvent kvmHandleSysReg.
             * @member {perfetto.protos.IKvmHandleSysRegFtraceEvent|null|undefined} kvmHandleSysReg
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmHandleSysReg = null;

            /**
             * FtraceEvent kvmHvcArm64.
             * @member {perfetto.protos.IKvmHvcArm64FtraceEvent|null|undefined} kvmHvcArm64
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmHvcArm64 = null;

            /**
             * FtraceEvent kvmIrqLine.
             * @member {perfetto.protos.IKvmIrqLineFtraceEvent|null|undefined} kvmIrqLine
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmIrqLine = null;

            /**
             * FtraceEvent kvmMmio.
             * @member {perfetto.protos.IKvmMmioFtraceEvent|null|undefined} kvmMmio
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmMmio = null;

            /**
             * FtraceEvent kvmMmioEmulate.
             * @member {perfetto.protos.IKvmMmioEmulateFtraceEvent|null|undefined} kvmMmioEmulate
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmMmioEmulate = null;

            /**
             * FtraceEvent kvmSetGuestDebug.
             * @member {perfetto.protos.IKvmSetGuestDebugFtraceEvent|null|undefined} kvmSetGuestDebug
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmSetGuestDebug = null;

            /**
             * FtraceEvent kvmSetIrq.
             * @member {perfetto.protos.IKvmSetIrqFtraceEvent|null|undefined} kvmSetIrq
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmSetIrq = null;

            /**
             * FtraceEvent kvmSetSpteHva.
             * @member {perfetto.protos.IKvmSetSpteHvaFtraceEvent|null|undefined} kvmSetSpteHva
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmSetSpteHva = null;

            /**
             * FtraceEvent kvmSetWayFlush.
             * @member {perfetto.protos.IKvmSetWayFlushFtraceEvent|null|undefined} kvmSetWayFlush
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmSetWayFlush = null;

            /**
             * FtraceEvent kvmSysAccess.
             * @member {perfetto.protos.IKvmSysAccessFtraceEvent|null|undefined} kvmSysAccess
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmSysAccess = null;

            /**
             * FtraceEvent kvmTestAgeHva.
             * @member {perfetto.protos.IKvmTestAgeHvaFtraceEvent|null|undefined} kvmTestAgeHva
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmTestAgeHva = null;

            /**
             * FtraceEvent kvmTimerEmulate.
             * @member {perfetto.protos.IKvmTimerEmulateFtraceEvent|null|undefined} kvmTimerEmulate
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmTimerEmulate = null;

            /**
             * FtraceEvent kvmTimerHrtimerExpire.
             * @member {perfetto.protos.IKvmTimerHrtimerExpireFtraceEvent|null|undefined} kvmTimerHrtimerExpire
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmTimerHrtimerExpire = null;

            /**
             * FtraceEvent kvmTimerRestoreState.
             * @member {perfetto.protos.IKvmTimerRestoreStateFtraceEvent|null|undefined} kvmTimerRestoreState
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmTimerRestoreState = null;

            /**
             * FtraceEvent kvmTimerSaveState.
             * @member {perfetto.protos.IKvmTimerSaveStateFtraceEvent|null|undefined} kvmTimerSaveState
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmTimerSaveState = null;

            /**
             * FtraceEvent kvmTimerUpdateIrq.
             * @member {perfetto.protos.IKvmTimerUpdateIrqFtraceEvent|null|undefined} kvmTimerUpdateIrq
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmTimerUpdateIrq = null;

            /**
             * FtraceEvent kvmToggleCache.
             * @member {perfetto.protos.IKvmToggleCacheFtraceEvent|null|undefined} kvmToggleCache
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmToggleCache = null;

            /**
             * FtraceEvent kvmUnmapHvaRange.
             * @member {perfetto.protos.IKvmUnmapHvaRangeFtraceEvent|null|undefined} kvmUnmapHvaRange
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmUnmapHvaRange = null;

            /**
             * FtraceEvent kvmUserspaceExit.
             * @member {perfetto.protos.IKvmUserspaceExitFtraceEvent|null|undefined} kvmUserspaceExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmUserspaceExit = null;

            /**
             * FtraceEvent kvmVcpuWakeup.
             * @member {perfetto.protos.IKvmVcpuWakeupFtraceEvent|null|undefined} kvmVcpuWakeup
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmVcpuWakeup = null;

            /**
             * FtraceEvent kvmWfxArm64.
             * @member {perfetto.protos.IKvmWfxArm64FtraceEvent|null|undefined} kvmWfxArm64
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.kvmWfxArm64 = null;

            /**
             * FtraceEvent trapReg.
             * @member {perfetto.protos.ITrapRegFtraceEvent|null|undefined} trapReg
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.trapReg = null;

            /**
             * FtraceEvent vgicUpdateIrqPending.
             * @member {perfetto.protos.IVgicUpdateIrqPendingFtraceEvent|null|undefined} vgicUpdateIrqPending
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.vgicUpdateIrqPending = null;

            /**
             * FtraceEvent wakeupSourceActivate.
             * @member {perfetto.protos.IWakeupSourceActivateFtraceEvent|null|undefined} wakeupSourceActivate
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.wakeupSourceActivate = null;

            /**
             * FtraceEvent wakeupSourceDeactivate.
             * @member {perfetto.protos.IWakeupSourceDeactivateFtraceEvent|null|undefined} wakeupSourceDeactivate
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.wakeupSourceDeactivate = null;

            /**
             * FtraceEvent ufshcdCommand.
             * @member {perfetto.protos.IUfshcdCommandFtraceEvent|null|undefined} ufshcdCommand
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ufshcdCommand = null;

            /**
             * FtraceEvent ufshcdClkGating.
             * @member {perfetto.protos.IUfshcdClkGatingFtraceEvent|null|undefined} ufshcdClkGating
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.ufshcdClkGating = null;

            /**
             * FtraceEvent console.
             * @member {perfetto.protos.IConsoleFtraceEvent|null|undefined} console
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.console = null;

            /**
             * FtraceEvent drmVblankEvent.
             * @member {perfetto.protos.IDrmVblankEventFtraceEvent|null|undefined} drmVblankEvent
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.drmVblankEvent = null;

            /**
             * FtraceEvent drmVblankEventDelivered.
             * @member {perfetto.protos.IDrmVblankEventDeliveredFtraceEvent|null|undefined} drmVblankEventDelivered
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.drmVblankEventDelivered = null;

            /**
             * FtraceEvent drmSchedJob.
             * @member {perfetto.protos.IDrmSchedJobFtraceEvent|null|undefined} drmSchedJob
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.drmSchedJob = null;

            /**
             * FtraceEvent drmRunJob.
             * @member {perfetto.protos.IDrmRunJobFtraceEvent|null|undefined} drmRunJob
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.drmRunJob = null;

            /**
             * FtraceEvent drmSchedProcessJob.
             * @member {perfetto.protos.IDrmSchedProcessJobFtraceEvent|null|undefined} drmSchedProcessJob
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.drmSchedProcessJob = null;

            /**
             * FtraceEvent dmaFenceInit.
             * @member {perfetto.protos.IDmaFenceInitFtraceEvent|null|undefined} dmaFenceInit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.dmaFenceInit = null;

            /**
             * FtraceEvent dmaFenceEmit.
             * @member {perfetto.protos.IDmaFenceEmitFtraceEvent|null|undefined} dmaFenceEmit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.dmaFenceEmit = null;

            /**
             * FtraceEvent dmaFenceSignaled.
             * @member {perfetto.protos.IDmaFenceSignaledFtraceEvent|null|undefined} dmaFenceSignaled
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.dmaFenceSignaled = null;

            /**
             * FtraceEvent dmaFenceWaitStart.
             * @member {perfetto.protos.IDmaFenceWaitStartFtraceEvent|null|undefined} dmaFenceWaitStart
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.dmaFenceWaitStart = null;

            /**
             * FtraceEvent dmaFenceWaitEnd.
             * @member {perfetto.protos.IDmaFenceWaitEndFtraceEvent|null|undefined} dmaFenceWaitEnd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.dmaFenceWaitEnd = null;

            /**
             * FtraceEvent f2fsIostat.
             * @member {perfetto.protos.IF2fsIostatFtraceEvent|null|undefined} f2fsIostat
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsIostat = null;

            /**
             * FtraceEvent f2fsIostatLatency.
             * @member {perfetto.protos.IF2fsIostatLatencyFtraceEvent|null|undefined} f2fsIostatLatency
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.f2fsIostatLatency = null;

            /**
             * FtraceEvent schedCpuUtilCfs.
             * @member {perfetto.protos.ISchedCpuUtilCfsFtraceEvent|null|undefined} schedCpuUtilCfs
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.schedCpuUtilCfs = null;

            /**
             * FtraceEvent v4l2Qbuf.
             * @member {perfetto.protos.IV4l2QbufFtraceEvent|null|undefined} v4l2Qbuf
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.v4l2Qbuf = null;

            /**
             * FtraceEvent v4l2Dqbuf.
             * @member {perfetto.protos.IV4l2DqbufFtraceEvent|null|undefined} v4l2Dqbuf
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.v4l2Dqbuf = null;

            /**
             * FtraceEvent vb2V4l2BufQueue.
             * @member {perfetto.protos.IVb2V4l2BufQueueFtraceEvent|null|undefined} vb2V4l2BufQueue
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.vb2V4l2BufQueue = null;

            /**
             * FtraceEvent vb2V4l2BufDone.
             * @member {perfetto.protos.IVb2V4l2BufDoneFtraceEvent|null|undefined} vb2V4l2BufDone
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.vb2V4l2BufDone = null;

            /**
             * FtraceEvent vb2V4l2Qbuf.
             * @member {perfetto.protos.IVb2V4l2QbufFtraceEvent|null|undefined} vb2V4l2Qbuf
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.vb2V4l2Qbuf = null;

            /**
             * FtraceEvent vb2V4l2Dqbuf.
             * @member {perfetto.protos.IVb2V4l2DqbufFtraceEvent|null|undefined} vb2V4l2Dqbuf
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.vb2V4l2Dqbuf = null;

            /**
             * FtraceEvent dsiCmdFifoStatus.
             * @member {perfetto.protos.IDsiCmdFifoStatusFtraceEvent|null|undefined} dsiCmdFifoStatus
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.dsiCmdFifoStatus = null;

            /**
             * FtraceEvent dsiRx.
             * @member {perfetto.protos.IDsiRxFtraceEvent|null|undefined} dsiRx
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.dsiRx = null;

            /**
             * FtraceEvent dsiTx.
             * @member {perfetto.protos.IDsiTxFtraceEvent|null|undefined} dsiTx
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.dsiTx = null;

            /**
             * FtraceEvent androidFsDatareadEnd.
             * @member {perfetto.protos.IAndroidFsDatareadEndFtraceEvent|null|undefined} androidFsDatareadEnd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.androidFsDatareadEnd = null;

            /**
             * FtraceEvent androidFsDatareadStart.
             * @member {perfetto.protos.IAndroidFsDatareadStartFtraceEvent|null|undefined} androidFsDatareadStart
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.androidFsDatareadStart = null;

            /**
             * FtraceEvent androidFsDatawriteEnd.
             * @member {perfetto.protos.IAndroidFsDatawriteEndFtraceEvent|null|undefined} androidFsDatawriteEnd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.androidFsDatawriteEnd = null;

            /**
             * FtraceEvent androidFsDatawriteStart.
             * @member {perfetto.protos.IAndroidFsDatawriteStartFtraceEvent|null|undefined} androidFsDatawriteStart
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.androidFsDatawriteStart = null;

            /**
             * FtraceEvent androidFsFsyncEnd.
             * @member {perfetto.protos.IAndroidFsFsyncEndFtraceEvent|null|undefined} androidFsFsyncEnd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.androidFsFsyncEnd = null;

            /**
             * FtraceEvent androidFsFsyncStart.
             * @member {perfetto.protos.IAndroidFsFsyncStartFtraceEvent|null|undefined} androidFsFsyncStart
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.androidFsFsyncStart = null;

            /**
             * FtraceEvent funcgraphEntry.
             * @member {perfetto.protos.IFuncgraphEntryFtraceEvent|null|undefined} funcgraphEntry
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.funcgraphEntry = null;

            /**
             * FtraceEvent funcgraphExit.
             * @member {perfetto.protos.IFuncgraphExitFtraceEvent|null|undefined} funcgraphExit
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.funcgraphExit = null;

            /**
             * FtraceEvent virtioVideoCmd.
             * @member {perfetto.protos.IVirtioVideoCmdFtraceEvent|null|undefined} virtioVideoCmd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.virtioVideoCmd = null;

            /**
             * FtraceEvent virtioVideoCmdDone.
             * @member {perfetto.protos.IVirtioVideoCmdDoneFtraceEvent|null|undefined} virtioVideoCmdDone
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.virtioVideoCmdDone = null;

            /**
             * FtraceEvent virtioVideoResourceQueue.
             * @member {perfetto.protos.IVirtioVideoResourceQueueFtraceEvent|null|undefined} virtioVideoResourceQueue
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.virtioVideoResourceQueue = null;

            /**
             * FtraceEvent virtioVideoResourceQueueDone.
             * @member {perfetto.protos.IVirtioVideoResourceQueueDoneFtraceEvent|null|undefined} virtioVideoResourceQueueDone
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.virtioVideoResourceQueueDone = null;

            /**
             * FtraceEvent mmShrinkSlabStart.
             * @member {perfetto.protos.IMmShrinkSlabStartFtraceEvent|null|undefined} mmShrinkSlabStart
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmShrinkSlabStart = null;

            /**
             * FtraceEvent mmShrinkSlabEnd.
             * @member {perfetto.protos.IMmShrinkSlabEndFtraceEvent|null|undefined} mmShrinkSlabEnd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.mmShrinkSlabEnd = null;

            /**
             * FtraceEvent trustySmc.
             * @member {perfetto.protos.ITrustySmcFtraceEvent|null|undefined} trustySmc
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.trustySmc = null;

            /**
             * FtraceEvent trustySmcDone.
             * @member {perfetto.protos.ITrustySmcDoneFtraceEvent|null|undefined} trustySmcDone
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.trustySmcDone = null;

            /**
             * FtraceEvent trustyStdCall32.
             * @member {perfetto.protos.ITrustyStdCall32FtraceEvent|null|undefined} trustyStdCall32
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.trustyStdCall32 = null;

            /**
             * FtraceEvent trustyStdCall32Done.
             * @member {perfetto.protos.ITrustyStdCall32DoneFtraceEvent|null|undefined} trustyStdCall32Done
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.trustyStdCall32Done = null;

            /**
             * FtraceEvent trustyShareMemory.
             * @member {perfetto.protos.ITrustyShareMemoryFtraceEvent|null|undefined} trustyShareMemory
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.trustyShareMemory = null;

            /**
             * FtraceEvent trustyShareMemoryDone.
             * @member {perfetto.protos.ITrustyShareMemoryDoneFtraceEvent|null|undefined} trustyShareMemoryDone
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.trustyShareMemoryDone = null;

            /**
             * FtraceEvent trustyReclaimMemory.
             * @member {perfetto.protos.ITrustyReclaimMemoryFtraceEvent|null|undefined} trustyReclaimMemory
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.trustyReclaimMemory = null;

            /**
             * FtraceEvent trustyReclaimMemoryDone.
             * @member {perfetto.protos.ITrustyReclaimMemoryDoneFtraceEvent|null|undefined} trustyReclaimMemoryDone
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.trustyReclaimMemoryDone = null;

            /**
             * FtraceEvent trustyIrq.
             * @member {perfetto.protos.ITrustyIrqFtraceEvent|null|undefined} trustyIrq
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.trustyIrq = null;

            /**
             * FtraceEvent trustyIpcHandleEvent.
             * @member {perfetto.protos.ITrustyIpcHandleEventFtraceEvent|null|undefined} trustyIpcHandleEvent
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.trustyIpcHandleEvent = null;

            /**
             * FtraceEvent trustyIpcConnect.
             * @member {perfetto.protos.ITrustyIpcConnectFtraceEvent|null|undefined} trustyIpcConnect
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.trustyIpcConnect = null;

            /**
             * FtraceEvent trustyIpcConnectEnd.
             * @member {perfetto.protos.ITrustyIpcConnectEndFtraceEvent|null|undefined} trustyIpcConnectEnd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.trustyIpcConnectEnd = null;

            /**
             * FtraceEvent trustyIpcWrite.
             * @member {perfetto.protos.ITrustyIpcWriteFtraceEvent|null|undefined} trustyIpcWrite
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.trustyIpcWrite = null;

            /**
             * FtraceEvent trustyIpcPoll.
             * @member {perfetto.protos.ITrustyIpcPollFtraceEvent|null|undefined} trustyIpcPoll
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.trustyIpcPoll = null;

            /**
             * FtraceEvent trustyIpcPollEnd.
             * @member {perfetto.protos.ITrustyIpcPollEndFtraceEvent|null|undefined} trustyIpcPollEnd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.trustyIpcPollEnd = null;

            /**
             * FtraceEvent trustyIpcRead.
             * @member {perfetto.protos.ITrustyIpcReadFtraceEvent|null|undefined} trustyIpcRead
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.trustyIpcRead = null;

            /**
             * FtraceEvent trustyIpcReadEnd.
             * @member {perfetto.protos.ITrustyIpcReadEndFtraceEvent|null|undefined} trustyIpcReadEnd
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.trustyIpcReadEnd = null;

            /**
             * FtraceEvent trustyIpcRx.
             * @member {perfetto.protos.ITrustyIpcRxFtraceEvent|null|undefined} trustyIpcRx
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.trustyIpcRx = null;

            /**
             * FtraceEvent trustyIpcTx.
             * @member {perfetto.protos.ITrustyIpcTxFtraceEvent|null|undefined} trustyIpcTx
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.trustyIpcTx = null;

            /**
             * FtraceEvent trustyEnqueueNop.
             * @member {perfetto.protos.ITrustyEnqueueNopFtraceEvent|null|undefined} trustyEnqueueNop
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            FtraceEvent.prototype.trustyEnqueueNop = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * FtraceEvent event.
             * @member {"print"|"schedSwitch"|"cpuFrequency"|"cpuFrequencyLimits"|"cpuIdle"|"clockEnable"|"clockDisable"|"clockSetRate"|"schedWakeup"|"schedBlockedReason"|"schedCpuHotplug"|"schedWaking"|"ipiEntry"|"ipiExit"|"ipiRaise"|"softirqEntry"|"softirqExit"|"softirqRaise"|"i2cRead"|"i2cWrite"|"i2cResult"|"i2cReply"|"smbusRead"|"smbusWrite"|"smbusResult"|"smbusReply"|"lowmemoryKill"|"irqHandlerEntry"|"irqHandlerExit"|"syncPt"|"syncTimeline"|"syncWait"|"ext4DaWriteBegin"|"ext4DaWriteEnd"|"ext4SyncFileEnter"|"ext4SyncFileExit"|"blockRqIssue"|"mmVmscanDirectReclaimBegin"|"mmVmscanDirectReclaimEnd"|"mmVmscanKswapdWake"|"mmVmscanKswapdSleep"|"binderTransaction"|"binderTransactionReceived"|"binderSetPriority"|"binderLock"|"binderLocked"|"binderUnlock"|"workqueueActivateWork"|"workqueueExecuteEnd"|"workqueueExecuteStart"|"workqueueQueueWork"|"regulatorDisable"|"regulatorDisableComplete"|"regulatorEnable"|"regulatorEnableComplete"|"regulatorEnableDelay"|"regulatorSetVoltage"|"regulatorSetVoltageComplete"|"cgroupAttachTask"|"cgroupMkdir"|"cgroupRemount"|"cgroupRmdir"|"cgroupTransferTasks"|"cgroupDestroyRoot"|"cgroupRelease"|"cgroupRename"|"cgroupSetupRoot"|"mdpCmdKickoff"|"mdpCommit"|"mdpPerfSetOt"|"mdpSsppChange"|"tracingMarkWrite"|"mdpCmdPingpongDone"|"mdpCompareBw"|"mdpPerfSetPanicLuts"|"mdpSsppSet"|"mdpCmdReadptrDone"|"mdpMisrCrc"|"mdpPerfSetQosLuts"|"mdpTraceCounter"|"mdpCmdReleaseBw"|"mdpMixerUpdate"|"mdpPerfSetWmLevels"|"mdpVideoUnderrunDone"|"mdpCmdWaitPingpong"|"mdpPerfPrefillCalc"|"mdpPerfUpdateBus"|"rotatorBwAoAsContext"|"mmFilemapAddToPageCache"|"mmFilemapDeleteFromPageCache"|"mmCompactionBegin"|"mmCompactionDeferCompaction"|"mmCompactionDeferred"|"mmCompactionDeferReset"|"mmCompactionEnd"|"mmCompactionFinished"|"mmCompactionIsolateFreepages"|"mmCompactionIsolateMigratepages"|"mmCompactionKcompactdSleep"|"mmCompactionKcompactdWake"|"mmCompactionMigratepages"|"mmCompactionSuitable"|"mmCompactionTryToCompactPages"|"mmCompactionWakeupKcompactd"|"suspendResume"|"schedWakeupNew"|"blockBioBackmerge"|"blockBioBounce"|"blockBioComplete"|"blockBioFrontmerge"|"blockBioQueue"|"blockBioRemap"|"blockDirtyBuffer"|"blockGetrq"|"blockPlug"|"blockRqAbort"|"blockRqComplete"|"blockRqInsert"|"blockRqRemap"|"blockRqRequeue"|"blockSleeprq"|"blockSplit"|"blockTouchBuffer"|"blockUnplug"|"ext4AllocDaBlocks"|"ext4AllocateBlocks"|"ext4AllocateInode"|"ext4BeginOrderedTruncate"|"ext4CollapseRange"|"ext4DaReleaseSpace"|"ext4DaReserveSpace"|"ext4DaUpdateReserveSpace"|"ext4DaWritePages"|"ext4DaWritePagesExtent"|"ext4Direct_IOEnter"|"ext4Direct_IOExit"|"ext4DiscardBlocks"|"ext4DiscardPreallocations"|"ext4DropInode"|"ext4EsCacheExtent"|"ext4EsFindDelayedExtentRangeEnter"|"ext4EsFindDelayedExtentRangeExit"|"ext4EsInsertExtent"|"ext4EsLookupExtentEnter"|"ext4EsLookupExtentExit"|"ext4EsRemoveExtent"|"ext4EsShrink"|"ext4EsShrinkCount"|"ext4EsShrinkScanEnter"|"ext4EsShrinkScanExit"|"ext4EvictInode"|"ext4ExtConvertToInitializedEnter"|"ext4ExtConvertToInitializedFastpath"|"ext4ExtHandleUnwrittenExtents"|"ext4ExtInCache"|"ext4ExtLoadExtent"|"ext4ExtMapBlocksEnter"|"ext4ExtMapBlocksExit"|"ext4ExtPutInCache"|"ext4ExtRemoveSpace"|"ext4ExtRemoveSpaceDone"|"ext4ExtRmIdx"|"ext4ExtRmLeaf"|"ext4ExtShowExtent"|"ext4FallocateEnter"|"ext4FallocateExit"|"ext4FindDelallocRange"|"ext4Forget"|"ext4FreeBlocks"|"ext4FreeInode"|"ext4GetImpliedClusterAllocExit"|"ext4GetReservedClusterAlloc"|"ext4IndMapBlocksEnter"|"ext4IndMapBlocksExit"|"ext4InsertRange"|"ext4Invalidatepage"|"ext4JournalStart"|"ext4JournalStartReserved"|"ext4JournalledInvalidatepage"|"ext4JournalledWriteEnd"|"ext4LoadInode"|"ext4LoadInodeBitmap"|"ext4MarkInodeDirty"|"ext4MbBitmapLoad"|"ext4MbBuddyBitmapLoad"|"ext4MbDiscardPreallocations"|"ext4MbNewGroupPa"|"ext4MbNewInodePa"|"ext4MbReleaseGroupPa"|"ext4MbReleaseInodePa"|"ext4MballocAlloc"|"ext4MballocDiscard"|"ext4MballocFree"|"ext4MballocPrealloc"|"ext4OtherInodeUpdateTime"|"ext4PunchHole"|"ext4ReadBlockBitmapLoad"|"ext4Readpage"|"ext4Releasepage"|"ext4RemoveBlocks"|"ext4RequestBlocks"|"ext4RequestInode"|"ext4SyncFs"|"ext4TrimAllFree"|"ext4TrimExtent"|"ext4TruncateEnter"|"ext4TruncateExit"|"ext4UnlinkEnter"|"ext4UnlinkExit"|"ext4WriteBegin"|"ext4WriteEnd"|"ext4Writepage"|"ext4Writepages"|"ext4WritepagesResult"|"ext4ZeroRange"|"taskNewtask"|"taskRename"|"schedProcessExec"|"schedProcessExit"|"schedProcessFork"|"schedProcessFree"|"schedProcessHang"|"schedProcessWait"|"f2fsDoSubmitBio"|"f2fsEvictInode"|"f2fsFallocate"|"f2fsGetDataBlock"|"f2fsGetVictim"|"f2fsIget"|"f2fsIgetExit"|"f2fsNewInode"|"f2fsReadpage"|"f2fsReserveNewBlock"|"f2fsSetPageDirty"|"f2fsSubmitWritePage"|"f2fsSyncFileEnter"|"f2fsSyncFileExit"|"f2fsSyncFs"|"f2fsTruncate"|"f2fsTruncateBlocksEnter"|"f2fsTruncateBlocksExit"|"f2fsTruncateDataBlocksRange"|"f2fsTruncateInodeBlocksEnter"|"f2fsTruncateInodeBlocksExit"|"f2fsTruncateNode"|"f2fsTruncateNodesEnter"|"f2fsTruncateNodesExit"|"f2fsTruncatePartialNodes"|"f2fsUnlinkEnter"|"f2fsUnlinkExit"|"f2fsVmPageMkwrite"|"f2fsWriteBegin"|"f2fsWriteCheckpoint"|"f2fsWriteEnd"|"allocPagesIommuEnd"|"allocPagesIommuFail"|"allocPagesIommuStart"|"allocPagesSysEnd"|"allocPagesSysFail"|"allocPagesSysStart"|"dmaAllocContiguousRetry"|"iommuMapRange"|"iommuSecPtblMapRangeEnd"|"iommuSecPtblMapRangeStart"|"ionAllocBufferEnd"|"ionAllocBufferFail"|"ionAllocBufferFallback"|"ionAllocBufferStart"|"ionCpAllocRetry"|"ionCpSecureBufferEnd"|"ionCpSecureBufferStart"|"ionPrefetching"|"ionSecureCmaAddToPoolEnd"|"ionSecureCmaAddToPoolStart"|"ionSecureCmaAllocateEnd"|"ionSecureCmaAllocateStart"|"ionSecureCmaShrinkPoolEnd"|"ionSecureCmaShrinkPoolStart"|"kfree"|"kmalloc"|"kmallocNode"|"kmemCacheAlloc"|"kmemCacheAllocNode"|"kmemCacheFree"|"migratePagesEnd"|"migratePagesStart"|"migrateRetry"|"mmPageAlloc"|"mmPageAllocExtfrag"|"mmPageAllocZoneLocked"|"mmPageFree"|"mmPageFreeBatched"|"mmPagePcpuDrain"|"rssStat"|"ionHeapShrink"|"ionHeapGrow"|"fenceInit"|"fenceDestroy"|"fenceEnableSignal"|"fenceSignaled"|"clkEnable"|"clkDisable"|"clkSetRate"|"binderTransactionAllocBuf"|"signalDeliver"|"signalGenerate"|"oomScoreAdjUpdate"|"generic"|"mmEventRecord"|"sysEnter"|"sysExit"|"zero"|"gpuFrequency"|"sdeTracingMarkWrite"|"markVictim"|"ionStat"|"ionBufferCreate"|"ionBufferDestroy"|"scmCallStart"|"scmCallEnd"|"gpuMemTotal"|"thermalTemperature"|"cdevUpdate"|"cpuhpExit"|"cpuhpMultiEnter"|"cpuhpEnter"|"cpuhpLatency"|"fastrpcDmaStat"|"dpuTracingMarkWrite"|"g2dTracingMarkWrite"|"maliTracingMarkWrite"|"dmaHeapStat"|"cpuhpPause"|"schedPiSetprio"|"sdeSdeEvtlog"|"sdeSdePerfCalcCrtc"|"sdeSdePerfCrtcUpdate"|"sdeSdePerfSetQosLuts"|"sdeSdePerfUpdateBus"|"rssStatThrottled"|"netifReceiveSkb"|"netDevXmit"|"inetSockSetState"|"tcpRetransmitSkb"|"crosEcSensorhubData"|"napiGroReceiveEntry"|"napiGroReceiveExit"|"kfreeSkb"|"kvmAccessFault"|"kvmAckIrq"|"kvmAgeHva"|"kvmAgePage"|"kvmArmClearDebug"|"kvmArmSetDreg32"|"kvmArmSetRegset"|"kvmArmSetupDebug"|"kvmEntry"|"kvmExit"|"kvmFpu"|"kvmGetTimerMap"|"kvmGuestFault"|"kvmHandleSysReg"|"kvmHvcArm64"|"kvmIrqLine"|"kvmMmio"|"kvmMmioEmulate"|"kvmSetGuestDebug"|"kvmSetIrq"|"kvmSetSpteHva"|"kvmSetWayFlush"|"kvmSysAccess"|"kvmTestAgeHva"|"kvmTimerEmulate"|"kvmTimerHrtimerExpire"|"kvmTimerRestoreState"|"kvmTimerSaveState"|"kvmTimerUpdateIrq"|"kvmToggleCache"|"kvmUnmapHvaRange"|"kvmUserspaceExit"|"kvmVcpuWakeup"|"kvmWfxArm64"|"trapReg"|"vgicUpdateIrqPending"|"wakeupSourceActivate"|"wakeupSourceDeactivate"|"ufshcdCommand"|"ufshcdClkGating"|"console"|"drmVblankEvent"|"drmVblankEventDelivered"|"drmSchedJob"|"drmRunJob"|"drmSchedProcessJob"|"dmaFenceInit"|"dmaFenceEmit"|"dmaFenceSignaled"|"dmaFenceWaitStart"|"dmaFenceWaitEnd"|"f2fsIostat"|"f2fsIostatLatency"|"schedCpuUtilCfs"|"v4l2Qbuf"|"v4l2Dqbuf"|"vb2V4l2BufQueue"|"vb2V4l2BufDone"|"vb2V4l2Qbuf"|"vb2V4l2Dqbuf"|"dsiCmdFifoStatus"|"dsiRx"|"dsiTx"|"androidFsDatareadEnd"|"androidFsDatareadStart"|"androidFsDatawriteEnd"|"androidFsDatawriteStart"|"androidFsFsyncEnd"|"androidFsFsyncStart"|"funcgraphEntry"|"funcgraphExit"|"virtioVideoCmd"|"virtioVideoCmdDone"|"virtioVideoResourceQueue"|"virtioVideoResourceQueueDone"|"mmShrinkSlabStart"|"mmShrinkSlabEnd"|"trustySmc"|"trustySmcDone"|"trustyStdCall32"|"trustyStdCall32Done"|"trustyShareMemory"|"trustyShareMemoryDone"|"trustyReclaimMemory"|"trustyReclaimMemoryDone"|"trustyIrq"|"trustyIpcHandleEvent"|"trustyIpcConnect"|"trustyIpcConnectEnd"|"trustyIpcWrite"|"trustyIpcPoll"|"trustyIpcPollEnd"|"trustyIpcRead"|"trustyIpcReadEnd"|"trustyIpcRx"|"trustyIpcTx"|"trustyEnqueueNop"|undefined} event
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             */
            Object.defineProperty(FtraceEvent.prototype, "event", {
                get: $util.oneOfGetter($oneOfFields = ["print", "schedSwitch", "cpuFrequency", "cpuFrequencyLimits", "cpuIdle", "clockEnable", "clockDisable", "clockSetRate", "schedWakeup", "schedBlockedReason", "schedCpuHotplug", "schedWaking", "ipiEntry", "ipiExit", "ipiRaise", "softirqEntry", "softirqExit", "softirqRaise", "i2cRead", "i2cWrite", "i2cResult", "i2cReply", "smbusRead", "smbusWrite", "smbusResult", "smbusReply", "lowmemoryKill", "irqHandlerEntry", "irqHandlerExit", "syncPt", "syncTimeline", "syncWait", "ext4DaWriteBegin", "ext4DaWriteEnd", "ext4SyncFileEnter", "ext4SyncFileExit", "blockRqIssue", "mmVmscanDirectReclaimBegin", "mmVmscanDirectReclaimEnd", "mmVmscanKswapdWake", "mmVmscanKswapdSleep", "binderTransaction", "binderTransactionReceived", "binderSetPriority", "binderLock", "binderLocked", "binderUnlock", "workqueueActivateWork", "workqueueExecuteEnd", "workqueueExecuteStart", "workqueueQueueWork", "regulatorDisable", "regulatorDisableComplete", "regulatorEnable", "regulatorEnableComplete", "regulatorEnableDelay", "regulatorSetVoltage", "regulatorSetVoltageComplete", "cgroupAttachTask", "cgroupMkdir", "cgroupRemount", "cgroupRmdir", "cgroupTransferTasks", "cgroupDestroyRoot", "cgroupRelease", "cgroupRename", "cgroupSetupRoot", "mdpCmdKickoff", "mdpCommit", "mdpPerfSetOt", "mdpSsppChange", "tracingMarkWrite", "mdpCmdPingpongDone", "mdpCompareBw", "mdpPerfSetPanicLuts", "mdpSsppSet", "mdpCmdReadptrDone", "mdpMisrCrc", "mdpPerfSetQosLuts", "mdpTraceCounter", "mdpCmdReleaseBw", "mdpMixerUpdate", "mdpPerfSetWmLevels", "mdpVideoUnderrunDone", "mdpCmdWaitPingpong", "mdpPerfPrefillCalc", "mdpPerfUpdateBus", "rotatorBwAoAsContext", "mmFilemapAddToPageCache", "mmFilemapDeleteFromPageCache", "mmCompactionBegin", "mmCompactionDeferCompaction", "mmCompactionDeferred", "mmCompactionDeferReset", "mmCompactionEnd", "mmCompactionFinished", "mmCompactionIsolateFreepages", "mmCompactionIsolateMigratepages", "mmCompactionKcompactdSleep", "mmCompactionKcompactdWake", "mmCompactionMigratepages", "mmCompactionSuitable", "mmCompactionTryToCompactPages", "mmCompactionWakeupKcompactd", "suspendResume", "schedWakeupNew", "blockBioBackmerge", "blockBioBounce", "blockBioComplete", "blockBioFrontmerge", "blockBioQueue", "blockBioRemap", "blockDirtyBuffer", "blockGetrq", "blockPlug", "blockRqAbort", "blockRqComplete", "blockRqInsert", "blockRqRemap", "blockRqRequeue", "blockSleeprq", "blockSplit", "blockTouchBuffer", "blockUnplug", "ext4AllocDaBlocks", "ext4AllocateBlocks", "ext4AllocateInode", "ext4BeginOrderedTruncate", "ext4CollapseRange", "ext4DaReleaseSpace", "ext4DaReserveSpace", "ext4DaUpdateReserveSpace", "ext4DaWritePages", "ext4DaWritePagesExtent", "ext4Direct_IOEnter", "ext4Direct_IOExit", "ext4DiscardBlocks", "ext4DiscardPreallocations", "ext4DropInode", "ext4EsCacheExtent", "ext4EsFindDelayedExtentRangeEnter", "ext4EsFindDelayedExtentRangeExit", "ext4EsInsertExtent", "ext4EsLookupExtentEnter", "ext4EsLookupExtentExit", "ext4EsRemoveExtent", "ext4EsShrink", "ext4EsShrinkCount", "ext4EsShrinkScanEnter", "ext4EsShrinkScanExit", "ext4EvictInode", "ext4ExtConvertToInitializedEnter", "ext4ExtConvertToInitializedFastpath", "ext4ExtHandleUnwrittenExtents", "ext4ExtInCache", "ext4ExtLoadExtent", "ext4ExtMapBlocksEnter", "ext4ExtMapBlocksExit", "ext4ExtPutInCache", "ext4ExtRemoveSpace", "ext4ExtRemoveSpaceDone", "ext4ExtRmIdx", "ext4ExtRmLeaf", "ext4ExtShowExtent", "ext4FallocateEnter", "ext4FallocateExit", "ext4FindDelallocRange", "ext4Forget", "ext4FreeBlocks", "ext4FreeInode", "ext4GetImpliedClusterAllocExit", "ext4GetReservedClusterAlloc", "ext4IndMapBlocksEnter", "ext4IndMapBlocksExit", "ext4InsertRange", "ext4Invalidatepage", "ext4JournalStart", "ext4JournalStartReserved", "ext4JournalledInvalidatepage", "ext4JournalledWriteEnd", "ext4LoadInode", "ext4LoadInodeBitmap", "ext4MarkInodeDirty", "ext4MbBitmapLoad", "ext4MbBuddyBitmapLoad", "ext4MbDiscardPreallocations", "ext4MbNewGroupPa", "ext4MbNewInodePa", "ext4MbReleaseGroupPa", "ext4MbReleaseInodePa", "ext4MballocAlloc", "ext4MballocDiscard", "ext4MballocFree", "ext4MballocPrealloc", "ext4OtherInodeUpdateTime", "ext4PunchHole", "ext4ReadBlockBitmapLoad", "ext4Readpage", "ext4Releasepage", "ext4RemoveBlocks", "ext4RequestBlocks", "ext4RequestInode", "ext4SyncFs", "ext4TrimAllFree", "ext4TrimExtent", "ext4TruncateEnter", "ext4TruncateExit", "ext4UnlinkEnter", "ext4UnlinkExit", "ext4WriteBegin", "ext4WriteEnd", "ext4Writepage", "ext4Writepages", "ext4WritepagesResult", "ext4ZeroRange", "taskNewtask", "taskRename", "schedProcessExec", "schedProcessExit", "schedProcessFork", "schedProcessFree", "schedProcessHang", "schedProcessWait", "f2fsDoSubmitBio", "f2fsEvictInode", "f2fsFallocate", "f2fsGetDataBlock", "f2fsGetVictim", "f2fsIget", "f2fsIgetExit", "f2fsNewInode", "f2fsReadpage", "f2fsReserveNewBlock", "f2fsSetPageDirty", "f2fsSubmitWritePage", "f2fsSyncFileEnter", "f2fsSyncFileExit", "f2fsSyncFs", "f2fsTruncate", "f2fsTruncateBlocksEnter", "f2fsTruncateBlocksExit", "f2fsTruncateDataBlocksRange", "f2fsTruncateInodeBlocksEnter", "f2fsTruncateInodeBlocksExit", "f2fsTruncateNode", "f2fsTruncateNodesEnter", "f2fsTruncateNodesExit", "f2fsTruncatePartialNodes", "f2fsUnlinkEnter", "f2fsUnlinkExit", "f2fsVmPageMkwrite", "f2fsWriteBegin", "f2fsWriteCheckpoint", "f2fsWriteEnd", "allocPagesIommuEnd", "allocPagesIommuFail", "allocPagesIommuStart", "allocPagesSysEnd", "allocPagesSysFail", "allocPagesSysStart", "dmaAllocContiguousRetry", "iommuMapRange", "iommuSecPtblMapRangeEnd", "iommuSecPtblMapRangeStart", "ionAllocBufferEnd", "ionAllocBufferFail", "ionAllocBufferFallback", "ionAllocBufferStart", "ionCpAllocRetry", "ionCpSecureBufferEnd", "ionCpSecureBufferStart", "ionPrefetching", "ionSecureCmaAddToPoolEnd", "ionSecureCmaAddToPoolStart", "ionSecureCmaAllocateEnd", "ionSecureCmaAllocateStart", "ionSecureCmaShrinkPoolEnd", "ionSecureCmaShrinkPoolStart", "kfree", "kmalloc", "kmallocNode", "kmemCacheAlloc", "kmemCacheAllocNode", "kmemCacheFree", "migratePagesEnd", "migratePagesStart", "migrateRetry", "mmPageAlloc", "mmPageAllocExtfrag", "mmPageAllocZoneLocked", "mmPageFree", "mmPageFreeBatched", "mmPagePcpuDrain", "rssStat", "ionHeapShrink", "ionHeapGrow", "fenceInit", "fenceDestroy", "fenceEnableSignal", "fenceSignaled", "clkEnable", "clkDisable", "clkSetRate", "binderTransactionAllocBuf", "signalDeliver", "signalGenerate", "oomScoreAdjUpdate", "generic", "mmEventRecord", "sysEnter", "sysExit", "zero", "gpuFrequency", "sdeTracingMarkWrite", "markVictim", "ionStat", "ionBufferCreate", "ionBufferDestroy", "scmCallStart", "scmCallEnd", "gpuMemTotal", "thermalTemperature", "cdevUpdate", "cpuhpExit", "cpuhpMultiEnter", "cpuhpEnter", "cpuhpLatency", "fastrpcDmaStat", "dpuTracingMarkWrite", "g2dTracingMarkWrite", "maliTracingMarkWrite", "dmaHeapStat", "cpuhpPause", "schedPiSetprio", "sdeSdeEvtlog", "sdeSdePerfCalcCrtc", "sdeSdePerfCrtcUpdate", "sdeSdePerfSetQosLuts", "sdeSdePerfUpdateBus", "rssStatThrottled", "netifReceiveSkb", "netDevXmit", "inetSockSetState", "tcpRetransmitSkb", "crosEcSensorhubData", "napiGroReceiveEntry", "napiGroReceiveExit", "kfreeSkb", "kvmAccessFault", "kvmAckIrq", "kvmAgeHva", "kvmAgePage", "kvmArmClearDebug", "kvmArmSetDreg32", "kvmArmSetRegset", "kvmArmSetupDebug", "kvmEntry", "kvmExit", "kvmFpu", "kvmGetTimerMap", "kvmGuestFault", "kvmHandleSysReg", "kvmHvcArm64", "kvmIrqLine", "kvmMmio", "kvmMmioEmulate", "kvmSetGuestDebug", "kvmSetIrq", "kvmSetSpteHva", "kvmSetWayFlush", "kvmSysAccess", "kvmTestAgeHva", "kvmTimerEmulate", "kvmTimerHrtimerExpire", "kvmTimerRestoreState", "kvmTimerSaveState", "kvmTimerUpdateIrq", "kvmToggleCache", "kvmUnmapHvaRange", "kvmUserspaceExit", "kvmVcpuWakeup", "kvmWfxArm64", "trapReg", "vgicUpdateIrqPending", "wakeupSourceActivate", "wakeupSourceDeactivate", "ufshcdCommand", "ufshcdClkGating", "console", "drmVblankEvent", "drmVblankEventDelivered", "drmSchedJob", "drmRunJob", "drmSchedProcessJob", "dmaFenceInit", "dmaFenceEmit", "dmaFenceSignaled", "dmaFenceWaitStart", "dmaFenceWaitEnd", "f2fsIostat", "f2fsIostatLatency", "schedCpuUtilCfs", "v4l2Qbuf", "v4l2Dqbuf", "vb2V4l2BufQueue", "vb2V4l2BufDone", "vb2V4l2Qbuf", "vb2V4l2Dqbuf", "dsiCmdFifoStatus", "dsiRx", "dsiTx", "androidFsDatareadEnd", "androidFsDatareadStart", "androidFsDatawriteEnd", "androidFsDatawriteStart", "androidFsFsyncEnd", "androidFsFsyncStart", "funcgraphEntry", "funcgraphExit", "virtioVideoCmd", "virtioVideoCmdDone", "virtioVideoResourceQueue", "virtioVideoResourceQueueDone", "mmShrinkSlabStart", "mmShrinkSlabEnd", "trustySmc", "trustySmcDone", "trustyStdCall32", "trustyStdCall32Done", "trustyShareMemory", "trustyShareMemoryDone", "trustyReclaimMemory", "trustyReclaimMemoryDone", "trustyIrq", "trustyIpcHandleEvent", "trustyIpcConnect", "trustyIpcConnectEnd", "trustyIpcWrite", "trustyIpcPoll", "trustyIpcPollEnd", "trustyIpcRead", "trustyIpcReadEnd", "trustyIpcRx", "trustyIpcTx", "trustyEnqueueNop"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new FtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.FtraceEvent
             * @static
             * @param {perfetto.protos.IFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.FtraceEvent} FtraceEvent instance
             */
            FtraceEvent.create = function create(properties) {
                return new FtraceEvent(properties);
            };

            /**
             * Encodes the specified FtraceEvent message. Does not implicitly {@link perfetto.protos.FtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.FtraceEvent
             * @static
             * @param {perfetto.protos.IFtraceEvent} m FtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.timestamp != null && Object.hasOwnProperty.call(m, "timestamp"))
                    w.uint32(8).uint64(m.timestamp);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(16).uint32(m.pid);
                if (m.print != null && Object.hasOwnProperty.call(m, "print"))
                    $root.perfetto.protos.PrintFtraceEvent.encode(m.print, w.uint32(26).fork()).ldelim();
                if (m.schedSwitch != null && Object.hasOwnProperty.call(m, "schedSwitch"))
                    $root.perfetto.protos.SchedSwitchFtraceEvent.encode(m.schedSwitch, w.uint32(34).fork()).ldelim();
                if (m.cpuFrequency != null && Object.hasOwnProperty.call(m, "cpuFrequency"))
                    $root.perfetto.protos.CpuFrequencyFtraceEvent.encode(m.cpuFrequency, w.uint32(90).fork()).ldelim();
                if (m.cpuFrequencyLimits != null && Object.hasOwnProperty.call(m, "cpuFrequencyLimits"))
                    $root.perfetto.protos.CpuFrequencyLimitsFtraceEvent.encode(m.cpuFrequencyLimits, w.uint32(98).fork()).ldelim();
                if (m.cpuIdle != null && Object.hasOwnProperty.call(m, "cpuIdle"))
                    $root.perfetto.protos.CpuIdleFtraceEvent.encode(m.cpuIdle, w.uint32(106).fork()).ldelim();
                if (m.clockEnable != null && Object.hasOwnProperty.call(m, "clockEnable"))
                    $root.perfetto.protos.ClockEnableFtraceEvent.encode(m.clockEnable, w.uint32(114).fork()).ldelim();
                if (m.clockDisable != null && Object.hasOwnProperty.call(m, "clockDisable"))
                    $root.perfetto.protos.ClockDisableFtraceEvent.encode(m.clockDisable, w.uint32(122).fork()).ldelim();
                if (m.clockSetRate != null && Object.hasOwnProperty.call(m, "clockSetRate"))
                    $root.perfetto.protos.ClockSetRateFtraceEvent.encode(m.clockSetRate, w.uint32(130).fork()).ldelim();
                if (m.schedWakeup != null && Object.hasOwnProperty.call(m, "schedWakeup"))
                    $root.perfetto.protos.SchedWakeupFtraceEvent.encode(m.schedWakeup, w.uint32(138).fork()).ldelim();
                if (m.schedBlockedReason != null && Object.hasOwnProperty.call(m, "schedBlockedReason"))
                    $root.perfetto.protos.SchedBlockedReasonFtraceEvent.encode(m.schedBlockedReason, w.uint32(146).fork()).ldelim();
                if (m.schedCpuHotplug != null && Object.hasOwnProperty.call(m, "schedCpuHotplug"))
                    $root.perfetto.protos.SchedCpuHotplugFtraceEvent.encode(m.schedCpuHotplug, w.uint32(154).fork()).ldelim();
                if (m.schedWaking != null && Object.hasOwnProperty.call(m, "schedWaking"))
                    $root.perfetto.protos.SchedWakingFtraceEvent.encode(m.schedWaking, w.uint32(162).fork()).ldelim();
                if (m.ipiEntry != null && Object.hasOwnProperty.call(m, "ipiEntry"))
                    $root.perfetto.protos.IpiEntryFtraceEvent.encode(m.ipiEntry, w.uint32(170).fork()).ldelim();
                if (m.ipiExit != null && Object.hasOwnProperty.call(m, "ipiExit"))
                    $root.perfetto.protos.IpiExitFtraceEvent.encode(m.ipiExit, w.uint32(178).fork()).ldelim();
                if (m.ipiRaise != null && Object.hasOwnProperty.call(m, "ipiRaise"))
                    $root.perfetto.protos.IpiRaiseFtraceEvent.encode(m.ipiRaise, w.uint32(186).fork()).ldelim();
                if (m.softirqEntry != null && Object.hasOwnProperty.call(m, "softirqEntry"))
                    $root.perfetto.protos.SoftirqEntryFtraceEvent.encode(m.softirqEntry, w.uint32(194).fork()).ldelim();
                if (m.softirqExit != null && Object.hasOwnProperty.call(m, "softirqExit"))
                    $root.perfetto.protos.SoftirqExitFtraceEvent.encode(m.softirqExit, w.uint32(202).fork()).ldelim();
                if (m.softirqRaise != null && Object.hasOwnProperty.call(m, "softirqRaise"))
                    $root.perfetto.protos.SoftirqRaiseFtraceEvent.encode(m.softirqRaise, w.uint32(210).fork()).ldelim();
                if (m.i2cRead != null && Object.hasOwnProperty.call(m, "i2cRead"))
                    $root.perfetto.protos.I2cReadFtraceEvent.encode(m.i2cRead, w.uint32(218).fork()).ldelim();
                if (m.i2cWrite != null && Object.hasOwnProperty.call(m, "i2cWrite"))
                    $root.perfetto.protos.I2cWriteFtraceEvent.encode(m.i2cWrite, w.uint32(226).fork()).ldelim();
                if (m.i2cResult != null && Object.hasOwnProperty.call(m, "i2cResult"))
                    $root.perfetto.protos.I2cResultFtraceEvent.encode(m.i2cResult, w.uint32(234).fork()).ldelim();
                if (m.i2cReply != null && Object.hasOwnProperty.call(m, "i2cReply"))
                    $root.perfetto.protos.I2cReplyFtraceEvent.encode(m.i2cReply, w.uint32(242).fork()).ldelim();
                if (m.smbusRead != null && Object.hasOwnProperty.call(m, "smbusRead"))
                    $root.perfetto.protos.SmbusReadFtraceEvent.encode(m.smbusRead, w.uint32(250).fork()).ldelim();
                if (m.smbusWrite != null && Object.hasOwnProperty.call(m, "smbusWrite"))
                    $root.perfetto.protos.SmbusWriteFtraceEvent.encode(m.smbusWrite, w.uint32(258).fork()).ldelim();
                if (m.smbusResult != null && Object.hasOwnProperty.call(m, "smbusResult"))
                    $root.perfetto.protos.SmbusResultFtraceEvent.encode(m.smbusResult, w.uint32(266).fork()).ldelim();
                if (m.smbusReply != null && Object.hasOwnProperty.call(m, "smbusReply"))
                    $root.perfetto.protos.SmbusReplyFtraceEvent.encode(m.smbusReply, w.uint32(274).fork()).ldelim();
                if (m.lowmemoryKill != null && Object.hasOwnProperty.call(m, "lowmemoryKill"))
                    $root.perfetto.protos.LowmemoryKillFtraceEvent.encode(m.lowmemoryKill, w.uint32(282).fork()).ldelim();
                if (m.irqHandlerEntry != null && Object.hasOwnProperty.call(m, "irqHandlerEntry"))
                    $root.perfetto.protos.IrqHandlerEntryFtraceEvent.encode(m.irqHandlerEntry, w.uint32(290).fork()).ldelim();
                if (m.irqHandlerExit != null && Object.hasOwnProperty.call(m, "irqHandlerExit"))
                    $root.perfetto.protos.IrqHandlerExitFtraceEvent.encode(m.irqHandlerExit, w.uint32(298).fork()).ldelim();
                if (m.syncPt != null && Object.hasOwnProperty.call(m, "syncPt"))
                    $root.perfetto.protos.SyncPtFtraceEvent.encode(m.syncPt, w.uint32(306).fork()).ldelim();
                if (m.syncTimeline != null && Object.hasOwnProperty.call(m, "syncTimeline"))
                    $root.perfetto.protos.SyncTimelineFtraceEvent.encode(m.syncTimeline, w.uint32(314).fork()).ldelim();
                if (m.syncWait != null && Object.hasOwnProperty.call(m, "syncWait"))
                    $root.perfetto.protos.SyncWaitFtraceEvent.encode(m.syncWait, w.uint32(322).fork()).ldelim();
                if (m.ext4DaWriteBegin != null && Object.hasOwnProperty.call(m, "ext4DaWriteBegin"))
                    $root.perfetto.protos.Ext4DaWriteBeginFtraceEvent.encode(m.ext4DaWriteBegin, w.uint32(330).fork()).ldelim();
                if (m.ext4DaWriteEnd != null && Object.hasOwnProperty.call(m, "ext4DaWriteEnd"))
                    $root.perfetto.protos.Ext4DaWriteEndFtraceEvent.encode(m.ext4DaWriteEnd, w.uint32(338).fork()).ldelim();
                if (m.ext4SyncFileEnter != null && Object.hasOwnProperty.call(m, "ext4SyncFileEnter"))
                    $root.perfetto.protos.Ext4SyncFileEnterFtraceEvent.encode(m.ext4SyncFileEnter, w.uint32(346).fork()).ldelim();
                if (m.ext4SyncFileExit != null && Object.hasOwnProperty.call(m, "ext4SyncFileExit"))
                    $root.perfetto.protos.Ext4SyncFileExitFtraceEvent.encode(m.ext4SyncFileExit, w.uint32(354).fork()).ldelim();
                if (m.blockRqIssue != null && Object.hasOwnProperty.call(m, "blockRqIssue"))
                    $root.perfetto.protos.BlockRqIssueFtraceEvent.encode(m.blockRqIssue, w.uint32(362).fork()).ldelim();
                if (m.mmVmscanDirectReclaimBegin != null && Object.hasOwnProperty.call(m, "mmVmscanDirectReclaimBegin"))
                    $root.perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent.encode(m.mmVmscanDirectReclaimBegin, w.uint32(370).fork()).ldelim();
                if (m.mmVmscanDirectReclaimEnd != null && Object.hasOwnProperty.call(m, "mmVmscanDirectReclaimEnd"))
                    $root.perfetto.protos.MmVmscanDirectReclaimEndFtraceEvent.encode(m.mmVmscanDirectReclaimEnd, w.uint32(378).fork()).ldelim();
                if (m.mmVmscanKswapdWake != null && Object.hasOwnProperty.call(m, "mmVmscanKswapdWake"))
                    $root.perfetto.protos.MmVmscanKswapdWakeFtraceEvent.encode(m.mmVmscanKswapdWake, w.uint32(386).fork()).ldelim();
                if (m.mmVmscanKswapdSleep != null && Object.hasOwnProperty.call(m, "mmVmscanKswapdSleep"))
                    $root.perfetto.protos.MmVmscanKswapdSleepFtraceEvent.encode(m.mmVmscanKswapdSleep, w.uint32(394).fork()).ldelim();
                if (m.binderTransaction != null && Object.hasOwnProperty.call(m, "binderTransaction"))
                    $root.perfetto.protos.BinderTransactionFtraceEvent.encode(m.binderTransaction, w.uint32(402).fork()).ldelim();
                if (m.binderTransactionReceived != null && Object.hasOwnProperty.call(m, "binderTransactionReceived"))
                    $root.perfetto.protos.BinderTransactionReceivedFtraceEvent.encode(m.binderTransactionReceived, w.uint32(410).fork()).ldelim();
                if (m.binderSetPriority != null && Object.hasOwnProperty.call(m, "binderSetPriority"))
                    $root.perfetto.protos.BinderSetPriorityFtraceEvent.encode(m.binderSetPriority, w.uint32(418).fork()).ldelim();
                if (m.binderLock != null && Object.hasOwnProperty.call(m, "binderLock"))
                    $root.perfetto.protos.BinderLockFtraceEvent.encode(m.binderLock, w.uint32(426).fork()).ldelim();
                if (m.binderLocked != null && Object.hasOwnProperty.call(m, "binderLocked"))
                    $root.perfetto.protos.BinderLockedFtraceEvent.encode(m.binderLocked, w.uint32(434).fork()).ldelim();
                if (m.binderUnlock != null && Object.hasOwnProperty.call(m, "binderUnlock"))
                    $root.perfetto.protos.BinderUnlockFtraceEvent.encode(m.binderUnlock, w.uint32(442).fork()).ldelim();
                if (m.workqueueActivateWork != null && Object.hasOwnProperty.call(m, "workqueueActivateWork"))
                    $root.perfetto.protos.WorkqueueActivateWorkFtraceEvent.encode(m.workqueueActivateWork, w.uint32(450).fork()).ldelim();
                if (m.workqueueExecuteEnd != null && Object.hasOwnProperty.call(m, "workqueueExecuteEnd"))
                    $root.perfetto.protos.WorkqueueExecuteEndFtraceEvent.encode(m.workqueueExecuteEnd, w.uint32(458).fork()).ldelim();
                if (m.workqueueExecuteStart != null && Object.hasOwnProperty.call(m, "workqueueExecuteStart"))
                    $root.perfetto.protos.WorkqueueExecuteStartFtraceEvent.encode(m.workqueueExecuteStart, w.uint32(466).fork()).ldelim();
                if (m.workqueueQueueWork != null && Object.hasOwnProperty.call(m, "workqueueQueueWork"))
                    $root.perfetto.protos.WorkqueueQueueWorkFtraceEvent.encode(m.workqueueQueueWork, w.uint32(474).fork()).ldelim();
                if (m.regulatorDisable != null && Object.hasOwnProperty.call(m, "regulatorDisable"))
                    $root.perfetto.protos.RegulatorDisableFtraceEvent.encode(m.regulatorDisable, w.uint32(482).fork()).ldelim();
                if (m.regulatorDisableComplete != null && Object.hasOwnProperty.call(m, "regulatorDisableComplete"))
                    $root.perfetto.protos.RegulatorDisableCompleteFtraceEvent.encode(m.regulatorDisableComplete, w.uint32(490).fork()).ldelim();
                if (m.regulatorEnable != null && Object.hasOwnProperty.call(m, "regulatorEnable"))
                    $root.perfetto.protos.RegulatorEnableFtraceEvent.encode(m.regulatorEnable, w.uint32(498).fork()).ldelim();
                if (m.regulatorEnableComplete != null && Object.hasOwnProperty.call(m, "regulatorEnableComplete"))
                    $root.perfetto.protos.RegulatorEnableCompleteFtraceEvent.encode(m.regulatorEnableComplete, w.uint32(506).fork()).ldelim();
                if (m.regulatorEnableDelay != null && Object.hasOwnProperty.call(m, "regulatorEnableDelay"))
                    $root.perfetto.protos.RegulatorEnableDelayFtraceEvent.encode(m.regulatorEnableDelay, w.uint32(514).fork()).ldelim();
                if (m.regulatorSetVoltage != null && Object.hasOwnProperty.call(m, "regulatorSetVoltage"))
                    $root.perfetto.protos.RegulatorSetVoltageFtraceEvent.encode(m.regulatorSetVoltage, w.uint32(522).fork()).ldelim();
                if (m.regulatorSetVoltageComplete != null && Object.hasOwnProperty.call(m, "regulatorSetVoltageComplete"))
                    $root.perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent.encode(m.regulatorSetVoltageComplete, w.uint32(530).fork()).ldelim();
                if (m.cgroupAttachTask != null && Object.hasOwnProperty.call(m, "cgroupAttachTask"))
                    $root.perfetto.protos.CgroupAttachTaskFtraceEvent.encode(m.cgroupAttachTask, w.uint32(538).fork()).ldelim();
                if (m.cgroupMkdir != null && Object.hasOwnProperty.call(m, "cgroupMkdir"))
                    $root.perfetto.protos.CgroupMkdirFtraceEvent.encode(m.cgroupMkdir, w.uint32(546).fork()).ldelim();
                if (m.cgroupRemount != null && Object.hasOwnProperty.call(m, "cgroupRemount"))
                    $root.perfetto.protos.CgroupRemountFtraceEvent.encode(m.cgroupRemount, w.uint32(554).fork()).ldelim();
                if (m.cgroupRmdir != null && Object.hasOwnProperty.call(m, "cgroupRmdir"))
                    $root.perfetto.protos.CgroupRmdirFtraceEvent.encode(m.cgroupRmdir, w.uint32(562).fork()).ldelim();
                if (m.cgroupTransferTasks != null && Object.hasOwnProperty.call(m, "cgroupTransferTasks"))
                    $root.perfetto.protos.CgroupTransferTasksFtraceEvent.encode(m.cgroupTransferTasks, w.uint32(570).fork()).ldelim();
                if (m.cgroupDestroyRoot != null && Object.hasOwnProperty.call(m, "cgroupDestroyRoot"))
                    $root.perfetto.protos.CgroupDestroyRootFtraceEvent.encode(m.cgroupDestroyRoot, w.uint32(578).fork()).ldelim();
                if (m.cgroupRelease != null && Object.hasOwnProperty.call(m, "cgroupRelease"))
                    $root.perfetto.protos.CgroupReleaseFtraceEvent.encode(m.cgroupRelease, w.uint32(586).fork()).ldelim();
                if (m.cgroupRename != null && Object.hasOwnProperty.call(m, "cgroupRename"))
                    $root.perfetto.protos.CgroupRenameFtraceEvent.encode(m.cgroupRename, w.uint32(594).fork()).ldelim();
                if (m.cgroupSetupRoot != null && Object.hasOwnProperty.call(m, "cgroupSetupRoot"))
                    $root.perfetto.protos.CgroupSetupRootFtraceEvent.encode(m.cgroupSetupRoot, w.uint32(602).fork()).ldelim();
                if (m.mdpCmdKickoff != null && Object.hasOwnProperty.call(m, "mdpCmdKickoff"))
                    $root.perfetto.protos.MdpCmdKickoffFtraceEvent.encode(m.mdpCmdKickoff, w.uint32(610).fork()).ldelim();
                if (m.mdpCommit != null && Object.hasOwnProperty.call(m, "mdpCommit"))
                    $root.perfetto.protos.MdpCommitFtraceEvent.encode(m.mdpCommit, w.uint32(618).fork()).ldelim();
                if (m.mdpPerfSetOt != null && Object.hasOwnProperty.call(m, "mdpPerfSetOt"))
                    $root.perfetto.protos.MdpPerfSetOtFtraceEvent.encode(m.mdpPerfSetOt, w.uint32(626).fork()).ldelim();
                if (m.mdpSsppChange != null && Object.hasOwnProperty.call(m, "mdpSsppChange"))
                    $root.perfetto.protos.MdpSsppChangeFtraceEvent.encode(m.mdpSsppChange, w.uint32(634).fork()).ldelim();
                if (m.tracingMarkWrite != null && Object.hasOwnProperty.call(m, "tracingMarkWrite"))
                    $root.perfetto.protos.TracingMarkWriteFtraceEvent.encode(m.tracingMarkWrite, w.uint32(642).fork()).ldelim();
                if (m.mdpCmdPingpongDone != null && Object.hasOwnProperty.call(m, "mdpCmdPingpongDone"))
                    $root.perfetto.protos.MdpCmdPingpongDoneFtraceEvent.encode(m.mdpCmdPingpongDone, w.uint32(650).fork()).ldelim();
                if (m.mdpCompareBw != null && Object.hasOwnProperty.call(m, "mdpCompareBw"))
                    $root.perfetto.protos.MdpCompareBwFtraceEvent.encode(m.mdpCompareBw, w.uint32(658).fork()).ldelim();
                if (m.mdpPerfSetPanicLuts != null && Object.hasOwnProperty.call(m, "mdpPerfSetPanicLuts"))
                    $root.perfetto.protos.MdpPerfSetPanicLutsFtraceEvent.encode(m.mdpPerfSetPanicLuts, w.uint32(666).fork()).ldelim();
                if (m.mdpSsppSet != null && Object.hasOwnProperty.call(m, "mdpSsppSet"))
                    $root.perfetto.protos.MdpSsppSetFtraceEvent.encode(m.mdpSsppSet, w.uint32(674).fork()).ldelim();
                if (m.mdpCmdReadptrDone != null && Object.hasOwnProperty.call(m, "mdpCmdReadptrDone"))
                    $root.perfetto.protos.MdpCmdReadptrDoneFtraceEvent.encode(m.mdpCmdReadptrDone, w.uint32(682).fork()).ldelim();
                if (m.mdpMisrCrc != null && Object.hasOwnProperty.call(m, "mdpMisrCrc"))
                    $root.perfetto.protos.MdpMisrCrcFtraceEvent.encode(m.mdpMisrCrc, w.uint32(690).fork()).ldelim();
                if (m.mdpPerfSetQosLuts != null && Object.hasOwnProperty.call(m, "mdpPerfSetQosLuts"))
                    $root.perfetto.protos.MdpPerfSetQosLutsFtraceEvent.encode(m.mdpPerfSetQosLuts, w.uint32(698).fork()).ldelim();
                if (m.mdpTraceCounter != null && Object.hasOwnProperty.call(m, "mdpTraceCounter"))
                    $root.perfetto.protos.MdpTraceCounterFtraceEvent.encode(m.mdpTraceCounter, w.uint32(706).fork()).ldelim();
                if (m.mdpCmdReleaseBw != null && Object.hasOwnProperty.call(m, "mdpCmdReleaseBw"))
                    $root.perfetto.protos.MdpCmdReleaseBwFtraceEvent.encode(m.mdpCmdReleaseBw, w.uint32(714).fork()).ldelim();
                if (m.mdpMixerUpdate != null && Object.hasOwnProperty.call(m, "mdpMixerUpdate"))
                    $root.perfetto.protos.MdpMixerUpdateFtraceEvent.encode(m.mdpMixerUpdate, w.uint32(722).fork()).ldelim();
                if (m.mdpPerfSetWmLevels != null && Object.hasOwnProperty.call(m, "mdpPerfSetWmLevels"))
                    $root.perfetto.protos.MdpPerfSetWmLevelsFtraceEvent.encode(m.mdpPerfSetWmLevels, w.uint32(730).fork()).ldelim();
                if (m.mdpVideoUnderrunDone != null && Object.hasOwnProperty.call(m, "mdpVideoUnderrunDone"))
                    $root.perfetto.protos.MdpVideoUnderrunDoneFtraceEvent.encode(m.mdpVideoUnderrunDone, w.uint32(738).fork()).ldelim();
                if (m.mdpCmdWaitPingpong != null && Object.hasOwnProperty.call(m, "mdpCmdWaitPingpong"))
                    $root.perfetto.protos.MdpCmdWaitPingpongFtraceEvent.encode(m.mdpCmdWaitPingpong, w.uint32(746).fork()).ldelim();
                if (m.mdpPerfPrefillCalc != null && Object.hasOwnProperty.call(m, "mdpPerfPrefillCalc"))
                    $root.perfetto.protos.MdpPerfPrefillCalcFtraceEvent.encode(m.mdpPerfPrefillCalc, w.uint32(754).fork()).ldelim();
                if (m.mdpPerfUpdateBus != null && Object.hasOwnProperty.call(m, "mdpPerfUpdateBus"))
                    $root.perfetto.protos.MdpPerfUpdateBusFtraceEvent.encode(m.mdpPerfUpdateBus, w.uint32(762).fork()).ldelim();
                if (m.rotatorBwAoAsContext != null && Object.hasOwnProperty.call(m, "rotatorBwAoAsContext"))
                    $root.perfetto.protos.RotatorBwAoAsContextFtraceEvent.encode(m.rotatorBwAoAsContext, w.uint32(770).fork()).ldelim();
                if (m.mmFilemapAddToPageCache != null && Object.hasOwnProperty.call(m, "mmFilemapAddToPageCache"))
                    $root.perfetto.protos.MmFilemapAddToPageCacheFtraceEvent.encode(m.mmFilemapAddToPageCache, w.uint32(778).fork()).ldelim();
                if (m.mmFilemapDeleteFromPageCache != null && Object.hasOwnProperty.call(m, "mmFilemapDeleteFromPageCache"))
                    $root.perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent.encode(m.mmFilemapDeleteFromPageCache, w.uint32(786).fork()).ldelim();
                if (m.mmCompactionBegin != null && Object.hasOwnProperty.call(m, "mmCompactionBegin"))
                    $root.perfetto.protos.MmCompactionBeginFtraceEvent.encode(m.mmCompactionBegin, w.uint32(794).fork()).ldelim();
                if (m.mmCompactionDeferCompaction != null && Object.hasOwnProperty.call(m, "mmCompactionDeferCompaction"))
                    $root.perfetto.protos.MmCompactionDeferCompactionFtraceEvent.encode(m.mmCompactionDeferCompaction, w.uint32(802).fork()).ldelim();
                if (m.mmCompactionDeferred != null && Object.hasOwnProperty.call(m, "mmCompactionDeferred"))
                    $root.perfetto.protos.MmCompactionDeferredFtraceEvent.encode(m.mmCompactionDeferred, w.uint32(810).fork()).ldelim();
                if (m.mmCompactionDeferReset != null && Object.hasOwnProperty.call(m, "mmCompactionDeferReset"))
                    $root.perfetto.protos.MmCompactionDeferResetFtraceEvent.encode(m.mmCompactionDeferReset, w.uint32(818).fork()).ldelim();
                if (m.mmCompactionEnd != null && Object.hasOwnProperty.call(m, "mmCompactionEnd"))
                    $root.perfetto.protos.MmCompactionEndFtraceEvent.encode(m.mmCompactionEnd, w.uint32(826).fork()).ldelim();
                if (m.mmCompactionFinished != null && Object.hasOwnProperty.call(m, "mmCompactionFinished"))
                    $root.perfetto.protos.MmCompactionFinishedFtraceEvent.encode(m.mmCompactionFinished, w.uint32(834).fork()).ldelim();
                if (m.mmCompactionIsolateFreepages != null && Object.hasOwnProperty.call(m, "mmCompactionIsolateFreepages"))
                    $root.perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent.encode(m.mmCompactionIsolateFreepages, w.uint32(842).fork()).ldelim();
                if (m.mmCompactionIsolateMigratepages != null && Object.hasOwnProperty.call(m, "mmCompactionIsolateMigratepages"))
                    $root.perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent.encode(m.mmCompactionIsolateMigratepages, w.uint32(850).fork()).ldelim();
                if (m.mmCompactionKcompactdSleep != null && Object.hasOwnProperty.call(m, "mmCompactionKcompactdSleep"))
                    $root.perfetto.protos.MmCompactionKcompactdSleepFtraceEvent.encode(m.mmCompactionKcompactdSleep, w.uint32(858).fork()).ldelim();
                if (m.mmCompactionKcompactdWake != null && Object.hasOwnProperty.call(m, "mmCompactionKcompactdWake"))
                    $root.perfetto.protos.MmCompactionKcompactdWakeFtraceEvent.encode(m.mmCompactionKcompactdWake, w.uint32(866).fork()).ldelim();
                if (m.mmCompactionMigratepages != null && Object.hasOwnProperty.call(m, "mmCompactionMigratepages"))
                    $root.perfetto.protos.MmCompactionMigratepagesFtraceEvent.encode(m.mmCompactionMigratepages, w.uint32(874).fork()).ldelim();
                if (m.mmCompactionSuitable != null && Object.hasOwnProperty.call(m, "mmCompactionSuitable"))
                    $root.perfetto.protos.MmCompactionSuitableFtraceEvent.encode(m.mmCompactionSuitable, w.uint32(882).fork()).ldelim();
                if (m.mmCompactionTryToCompactPages != null && Object.hasOwnProperty.call(m, "mmCompactionTryToCompactPages"))
                    $root.perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent.encode(m.mmCompactionTryToCompactPages, w.uint32(890).fork()).ldelim();
                if (m.mmCompactionWakeupKcompactd != null && Object.hasOwnProperty.call(m, "mmCompactionWakeupKcompactd"))
                    $root.perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent.encode(m.mmCompactionWakeupKcompactd, w.uint32(898).fork()).ldelim();
                if (m.suspendResume != null && Object.hasOwnProperty.call(m, "suspendResume"))
                    $root.perfetto.protos.SuspendResumeFtraceEvent.encode(m.suspendResume, w.uint32(906).fork()).ldelim();
                if (m.schedWakeupNew != null && Object.hasOwnProperty.call(m, "schedWakeupNew"))
                    $root.perfetto.protos.SchedWakeupNewFtraceEvent.encode(m.schedWakeupNew, w.uint32(914).fork()).ldelim();
                if (m.blockBioBackmerge != null && Object.hasOwnProperty.call(m, "blockBioBackmerge"))
                    $root.perfetto.protos.BlockBioBackmergeFtraceEvent.encode(m.blockBioBackmerge, w.uint32(922).fork()).ldelim();
                if (m.blockBioBounce != null && Object.hasOwnProperty.call(m, "blockBioBounce"))
                    $root.perfetto.protos.BlockBioBounceFtraceEvent.encode(m.blockBioBounce, w.uint32(930).fork()).ldelim();
                if (m.blockBioComplete != null && Object.hasOwnProperty.call(m, "blockBioComplete"))
                    $root.perfetto.protos.BlockBioCompleteFtraceEvent.encode(m.blockBioComplete, w.uint32(938).fork()).ldelim();
                if (m.blockBioFrontmerge != null && Object.hasOwnProperty.call(m, "blockBioFrontmerge"))
                    $root.perfetto.protos.BlockBioFrontmergeFtraceEvent.encode(m.blockBioFrontmerge, w.uint32(946).fork()).ldelim();
                if (m.blockBioQueue != null && Object.hasOwnProperty.call(m, "blockBioQueue"))
                    $root.perfetto.protos.BlockBioQueueFtraceEvent.encode(m.blockBioQueue, w.uint32(954).fork()).ldelim();
                if (m.blockBioRemap != null && Object.hasOwnProperty.call(m, "blockBioRemap"))
                    $root.perfetto.protos.BlockBioRemapFtraceEvent.encode(m.blockBioRemap, w.uint32(962).fork()).ldelim();
                if (m.blockDirtyBuffer != null && Object.hasOwnProperty.call(m, "blockDirtyBuffer"))
                    $root.perfetto.protos.BlockDirtyBufferFtraceEvent.encode(m.blockDirtyBuffer, w.uint32(970).fork()).ldelim();
                if (m.blockGetrq != null && Object.hasOwnProperty.call(m, "blockGetrq"))
                    $root.perfetto.protos.BlockGetrqFtraceEvent.encode(m.blockGetrq, w.uint32(978).fork()).ldelim();
                if (m.blockPlug != null && Object.hasOwnProperty.call(m, "blockPlug"))
                    $root.perfetto.protos.BlockPlugFtraceEvent.encode(m.blockPlug, w.uint32(986).fork()).ldelim();
                if (m.blockRqAbort != null && Object.hasOwnProperty.call(m, "blockRqAbort"))
                    $root.perfetto.protos.BlockRqAbortFtraceEvent.encode(m.blockRqAbort, w.uint32(994).fork()).ldelim();
                if (m.blockRqComplete != null && Object.hasOwnProperty.call(m, "blockRqComplete"))
                    $root.perfetto.protos.BlockRqCompleteFtraceEvent.encode(m.blockRqComplete, w.uint32(1002).fork()).ldelim();
                if (m.blockRqInsert != null && Object.hasOwnProperty.call(m, "blockRqInsert"))
                    $root.perfetto.protos.BlockRqInsertFtraceEvent.encode(m.blockRqInsert, w.uint32(1010).fork()).ldelim();
                if (m.blockRqRemap != null && Object.hasOwnProperty.call(m, "blockRqRemap"))
                    $root.perfetto.protos.BlockRqRemapFtraceEvent.encode(m.blockRqRemap, w.uint32(1026).fork()).ldelim();
                if (m.blockRqRequeue != null && Object.hasOwnProperty.call(m, "blockRqRequeue"))
                    $root.perfetto.protos.BlockRqRequeueFtraceEvent.encode(m.blockRqRequeue, w.uint32(1034).fork()).ldelim();
                if (m.blockSleeprq != null && Object.hasOwnProperty.call(m, "blockSleeprq"))
                    $root.perfetto.protos.BlockSleeprqFtraceEvent.encode(m.blockSleeprq, w.uint32(1042).fork()).ldelim();
                if (m.blockSplit != null && Object.hasOwnProperty.call(m, "blockSplit"))
                    $root.perfetto.protos.BlockSplitFtraceEvent.encode(m.blockSplit, w.uint32(1050).fork()).ldelim();
                if (m.blockTouchBuffer != null && Object.hasOwnProperty.call(m, "blockTouchBuffer"))
                    $root.perfetto.protos.BlockTouchBufferFtraceEvent.encode(m.blockTouchBuffer, w.uint32(1058).fork()).ldelim();
                if (m.blockUnplug != null && Object.hasOwnProperty.call(m, "blockUnplug"))
                    $root.perfetto.protos.BlockUnplugFtraceEvent.encode(m.blockUnplug, w.uint32(1066).fork()).ldelim();
                if (m.ext4AllocDaBlocks != null && Object.hasOwnProperty.call(m, "ext4AllocDaBlocks"))
                    $root.perfetto.protos.Ext4AllocDaBlocksFtraceEvent.encode(m.ext4AllocDaBlocks, w.uint32(1074).fork()).ldelim();
                if (m.ext4AllocateBlocks != null && Object.hasOwnProperty.call(m, "ext4AllocateBlocks"))
                    $root.perfetto.protos.Ext4AllocateBlocksFtraceEvent.encode(m.ext4AllocateBlocks, w.uint32(1082).fork()).ldelim();
                if (m.ext4AllocateInode != null && Object.hasOwnProperty.call(m, "ext4AllocateInode"))
                    $root.perfetto.protos.Ext4AllocateInodeFtraceEvent.encode(m.ext4AllocateInode, w.uint32(1090).fork()).ldelim();
                if (m.ext4BeginOrderedTruncate != null && Object.hasOwnProperty.call(m, "ext4BeginOrderedTruncate"))
                    $root.perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent.encode(m.ext4BeginOrderedTruncate, w.uint32(1098).fork()).ldelim();
                if (m.ext4CollapseRange != null && Object.hasOwnProperty.call(m, "ext4CollapseRange"))
                    $root.perfetto.protos.Ext4CollapseRangeFtraceEvent.encode(m.ext4CollapseRange, w.uint32(1106).fork()).ldelim();
                if (m.ext4DaReleaseSpace != null && Object.hasOwnProperty.call(m, "ext4DaReleaseSpace"))
                    $root.perfetto.protos.Ext4DaReleaseSpaceFtraceEvent.encode(m.ext4DaReleaseSpace, w.uint32(1114).fork()).ldelim();
                if (m.ext4DaReserveSpace != null && Object.hasOwnProperty.call(m, "ext4DaReserveSpace"))
                    $root.perfetto.protos.Ext4DaReserveSpaceFtraceEvent.encode(m.ext4DaReserveSpace, w.uint32(1122).fork()).ldelim();
                if (m.ext4DaUpdateReserveSpace != null && Object.hasOwnProperty.call(m, "ext4DaUpdateReserveSpace"))
                    $root.perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent.encode(m.ext4DaUpdateReserveSpace, w.uint32(1130).fork()).ldelim();
                if (m.ext4DaWritePages != null && Object.hasOwnProperty.call(m, "ext4DaWritePages"))
                    $root.perfetto.protos.Ext4DaWritePagesFtraceEvent.encode(m.ext4DaWritePages, w.uint32(1138).fork()).ldelim();
                if (m.ext4DaWritePagesExtent != null && Object.hasOwnProperty.call(m, "ext4DaWritePagesExtent"))
                    $root.perfetto.protos.Ext4DaWritePagesExtentFtraceEvent.encode(m.ext4DaWritePagesExtent, w.uint32(1146).fork()).ldelim();
                if (m.ext4Direct_IOEnter != null && Object.hasOwnProperty.call(m, "ext4Direct_IOEnter"))
                    $root.perfetto.protos.Ext4DirectIOEnterFtraceEvent.encode(m.ext4Direct_IOEnter, w.uint32(1154).fork()).ldelim();
                if (m.ext4Direct_IOExit != null && Object.hasOwnProperty.call(m, "ext4Direct_IOExit"))
                    $root.perfetto.protos.Ext4DirectIOExitFtraceEvent.encode(m.ext4Direct_IOExit, w.uint32(1162).fork()).ldelim();
                if (m.ext4DiscardBlocks != null && Object.hasOwnProperty.call(m, "ext4DiscardBlocks"))
                    $root.perfetto.protos.Ext4DiscardBlocksFtraceEvent.encode(m.ext4DiscardBlocks, w.uint32(1170).fork()).ldelim();
                if (m.ext4DiscardPreallocations != null && Object.hasOwnProperty.call(m, "ext4DiscardPreallocations"))
                    $root.perfetto.protos.Ext4DiscardPreallocationsFtraceEvent.encode(m.ext4DiscardPreallocations, w.uint32(1178).fork()).ldelim();
                if (m.ext4DropInode != null && Object.hasOwnProperty.call(m, "ext4DropInode"))
                    $root.perfetto.protos.Ext4DropInodeFtraceEvent.encode(m.ext4DropInode, w.uint32(1186).fork()).ldelim();
                if (m.ext4EsCacheExtent != null && Object.hasOwnProperty.call(m, "ext4EsCacheExtent"))
                    $root.perfetto.protos.Ext4EsCacheExtentFtraceEvent.encode(m.ext4EsCacheExtent, w.uint32(1194).fork()).ldelim();
                if (m.ext4EsFindDelayedExtentRangeEnter != null && Object.hasOwnProperty.call(m, "ext4EsFindDelayedExtentRangeEnter"))
                    $root.perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent.encode(m.ext4EsFindDelayedExtentRangeEnter, w.uint32(1202).fork()).ldelim();
                if (m.ext4EsFindDelayedExtentRangeExit != null && Object.hasOwnProperty.call(m, "ext4EsFindDelayedExtentRangeExit"))
                    $root.perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent.encode(m.ext4EsFindDelayedExtentRangeExit, w.uint32(1210).fork()).ldelim();
                if (m.ext4EsInsertExtent != null && Object.hasOwnProperty.call(m, "ext4EsInsertExtent"))
                    $root.perfetto.protos.Ext4EsInsertExtentFtraceEvent.encode(m.ext4EsInsertExtent, w.uint32(1218).fork()).ldelim();
                if (m.ext4EsLookupExtentEnter != null && Object.hasOwnProperty.call(m, "ext4EsLookupExtentEnter"))
                    $root.perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent.encode(m.ext4EsLookupExtentEnter, w.uint32(1226).fork()).ldelim();
                if (m.ext4EsLookupExtentExit != null && Object.hasOwnProperty.call(m, "ext4EsLookupExtentExit"))
                    $root.perfetto.protos.Ext4EsLookupExtentExitFtraceEvent.encode(m.ext4EsLookupExtentExit, w.uint32(1234).fork()).ldelim();
                if (m.ext4EsRemoveExtent != null && Object.hasOwnProperty.call(m, "ext4EsRemoveExtent"))
                    $root.perfetto.protos.Ext4EsRemoveExtentFtraceEvent.encode(m.ext4EsRemoveExtent, w.uint32(1242).fork()).ldelim();
                if (m.ext4EsShrink != null && Object.hasOwnProperty.call(m, "ext4EsShrink"))
                    $root.perfetto.protos.Ext4EsShrinkFtraceEvent.encode(m.ext4EsShrink, w.uint32(1250).fork()).ldelim();
                if (m.ext4EsShrinkCount != null && Object.hasOwnProperty.call(m, "ext4EsShrinkCount"))
                    $root.perfetto.protos.Ext4EsShrinkCountFtraceEvent.encode(m.ext4EsShrinkCount, w.uint32(1258).fork()).ldelim();
                if (m.ext4EsShrinkScanEnter != null && Object.hasOwnProperty.call(m, "ext4EsShrinkScanEnter"))
                    $root.perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent.encode(m.ext4EsShrinkScanEnter, w.uint32(1266).fork()).ldelim();
                if (m.ext4EsShrinkScanExit != null && Object.hasOwnProperty.call(m, "ext4EsShrinkScanExit"))
                    $root.perfetto.protos.Ext4EsShrinkScanExitFtraceEvent.encode(m.ext4EsShrinkScanExit, w.uint32(1274).fork()).ldelim();
                if (m.ext4EvictInode != null && Object.hasOwnProperty.call(m, "ext4EvictInode"))
                    $root.perfetto.protos.Ext4EvictInodeFtraceEvent.encode(m.ext4EvictInode, w.uint32(1282).fork()).ldelim();
                if (m.ext4ExtConvertToInitializedEnter != null && Object.hasOwnProperty.call(m, "ext4ExtConvertToInitializedEnter"))
                    $root.perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent.encode(m.ext4ExtConvertToInitializedEnter, w.uint32(1290).fork()).ldelim();
                if (m.ext4ExtConvertToInitializedFastpath != null && Object.hasOwnProperty.call(m, "ext4ExtConvertToInitializedFastpath"))
                    $root.perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent.encode(m.ext4ExtConvertToInitializedFastpath, w.uint32(1298).fork()).ldelim();
                if (m.ext4ExtHandleUnwrittenExtents != null && Object.hasOwnProperty.call(m, "ext4ExtHandleUnwrittenExtents"))
                    $root.perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent.encode(m.ext4ExtHandleUnwrittenExtents, w.uint32(1306).fork()).ldelim();
                if (m.ext4ExtInCache != null && Object.hasOwnProperty.call(m, "ext4ExtInCache"))
                    $root.perfetto.protos.Ext4ExtInCacheFtraceEvent.encode(m.ext4ExtInCache, w.uint32(1314).fork()).ldelim();
                if (m.ext4ExtLoadExtent != null && Object.hasOwnProperty.call(m, "ext4ExtLoadExtent"))
                    $root.perfetto.protos.Ext4ExtLoadExtentFtraceEvent.encode(m.ext4ExtLoadExtent, w.uint32(1322).fork()).ldelim();
                if (m.ext4ExtMapBlocksEnter != null && Object.hasOwnProperty.call(m, "ext4ExtMapBlocksEnter"))
                    $root.perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent.encode(m.ext4ExtMapBlocksEnter, w.uint32(1330).fork()).ldelim();
                if (m.ext4ExtMapBlocksExit != null && Object.hasOwnProperty.call(m, "ext4ExtMapBlocksExit"))
                    $root.perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent.encode(m.ext4ExtMapBlocksExit, w.uint32(1338).fork()).ldelim();
                if (m.ext4ExtPutInCache != null && Object.hasOwnProperty.call(m, "ext4ExtPutInCache"))
                    $root.perfetto.protos.Ext4ExtPutInCacheFtraceEvent.encode(m.ext4ExtPutInCache, w.uint32(1346).fork()).ldelim();
                if (m.ext4ExtRemoveSpace != null && Object.hasOwnProperty.call(m, "ext4ExtRemoveSpace"))
                    $root.perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent.encode(m.ext4ExtRemoveSpace, w.uint32(1354).fork()).ldelim();
                if (m.ext4ExtRemoveSpaceDone != null && Object.hasOwnProperty.call(m, "ext4ExtRemoveSpaceDone"))
                    $root.perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent.encode(m.ext4ExtRemoveSpaceDone, w.uint32(1362).fork()).ldelim();
                if (m.ext4ExtRmIdx != null && Object.hasOwnProperty.call(m, "ext4ExtRmIdx"))
                    $root.perfetto.protos.Ext4ExtRmIdxFtraceEvent.encode(m.ext4ExtRmIdx, w.uint32(1370).fork()).ldelim();
                if (m.ext4ExtRmLeaf != null && Object.hasOwnProperty.call(m, "ext4ExtRmLeaf"))
                    $root.perfetto.protos.Ext4ExtRmLeafFtraceEvent.encode(m.ext4ExtRmLeaf, w.uint32(1378).fork()).ldelim();
                if (m.ext4ExtShowExtent != null && Object.hasOwnProperty.call(m, "ext4ExtShowExtent"))
                    $root.perfetto.protos.Ext4ExtShowExtentFtraceEvent.encode(m.ext4ExtShowExtent, w.uint32(1386).fork()).ldelim();
                if (m.ext4FallocateEnter != null && Object.hasOwnProperty.call(m, "ext4FallocateEnter"))
                    $root.perfetto.protos.Ext4FallocateEnterFtraceEvent.encode(m.ext4FallocateEnter, w.uint32(1394).fork()).ldelim();
                if (m.ext4FallocateExit != null && Object.hasOwnProperty.call(m, "ext4FallocateExit"))
                    $root.perfetto.protos.Ext4FallocateExitFtraceEvent.encode(m.ext4FallocateExit, w.uint32(1402).fork()).ldelim();
                if (m.ext4FindDelallocRange != null && Object.hasOwnProperty.call(m, "ext4FindDelallocRange"))
                    $root.perfetto.protos.Ext4FindDelallocRangeFtraceEvent.encode(m.ext4FindDelallocRange, w.uint32(1410).fork()).ldelim();
                if (m.ext4Forget != null && Object.hasOwnProperty.call(m, "ext4Forget"))
                    $root.perfetto.protos.Ext4ForgetFtraceEvent.encode(m.ext4Forget, w.uint32(1418).fork()).ldelim();
                if (m.ext4FreeBlocks != null && Object.hasOwnProperty.call(m, "ext4FreeBlocks"))
                    $root.perfetto.protos.Ext4FreeBlocksFtraceEvent.encode(m.ext4FreeBlocks, w.uint32(1426).fork()).ldelim();
                if (m.ext4FreeInode != null && Object.hasOwnProperty.call(m, "ext4FreeInode"))
                    $root.perfetto.protos.Ext4FreeInodeFtraceEvent.encode(m.ext4FreeInode, w.uint32(1434).fork()).ldelim();
                if (m.ext4GetImpliedClusterAllocExit != null && Object.hasOwnProperty.call(m, "ext4GetImpliedClusterAllocExit"))
                    $root.perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent.encode(m.ext4GetImpliedClusterAllocExit, w.uint32(1442).fork()).ldelim();
                if (m.ext4GetReservedClusterAlloc != null && Object.hasOwnProperty.call(m, "ext4GetReservedClusterAlloc"))
                    $root.perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent.encode(m.ext4GetReservedClusterAlloc, w.uint32(1450).fork()).ldelim();
                if (m.ext4IndMapBlocksEnter != null && Object.hasOwnProperty.call(m, "ext4IndMapBlocksEnter"))
                    $root.perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent.encode(m.ext4IndMapBlocksEnter, w.uint32(1458).fork()).ldelim();
                if (m.ext4IndMapBlocksExit != null && Object.hasOwnProperty.call(m, "ext4IndMapBlocksExit"))
                    $root.perfetto.protos.Ext4IndMapBlocksExitFtraceEvent.encode(m.ext4IndMapBlocksExit, w.uint32(1466).fork()).ldelim();
                if (m.ext4InsertRange != null && Object.hasOwnProperty.call(m, "ext4InsertRange"))
                    $root.perfetto.protos.Ext4InsertRangeFtraceEvent.encode(m.ext4InsertRange, w.uint32(1474).fork()).ldelim();
                if (m.ext4Invalidatepage != null && Object.hasOwnProperty.call(m, "ext4Invalidatepage"))
                    $root.perfetto.protos.Ext4InvalidatepageFtraceEvent.encode(m.ext4Invalidatepage, w.uint32(1482).fork()).ldelim();
                if (m.ext4JournalStart != null && Object.hasOwnProperty.call(m, "ext4JournalStart"))
                    $root.perfetto.protos.Ext4JournalStartFtraceEvent.encode(m.ext4JournalStart, w.uint32(1490).fork()).ldelim();
                if (m.ext4JournalStartReserved != null && Object.hasOwnProperty.call(m, "ext4JournalStartReserved"))
                    $root.perfetto.protos.Ext4JournalStartReservedFtraceEvent.encode(m.ext4JournalStartReserved, w.uint32(1498).fork()).ldelim();
                if (m.ext4JournalledInvalidatepage != null && Object.hasOwnProperty.call(m, "ext4JournalledInvalidatepage"))
                    $root.perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent.encode(m.ext4JournalledInvalidatepage, w.uint32(1506).fork()).ldelim();
                if (m.ext4JournalledWriteEnd != null && Object.hasOwnProperty.call(m, "ext4JournalledWriteEnd"))
                    $root.perfetto.protos.Ext4JournalledWriteEndFtraceEvent.encode(m.ext4JournalledWriteEnd, w.uint32(1514).fork()).ldelim();
                if (m.ext4LoadInode != null && Object.hasOwnProperty.call(m, "ext4LoadInode"))
                    $root.perfetto.protos.Ext4LoadInodeFtraceEvent.encode(m.ext4LoadInode, w.uint32(1522).fork()).ldelim();
                if (m.ext4LoadInodeBitmap != null && Object.hasOwnProperty.call(m, "ext4LoadInodeBitmap"))
                    $root.perfetto.protos.Ext4LoadInodeBitmapFtraceEvent.encode(m.ext4LoadInodeBitmap, w.uint32(1530).fork()).ldelim();
                if (m.ext4MarkInodeDirty != null && Object.hasOwnProperty.call(m, "ext4MarkInodeDirty"))
                    $root.perfetto.protos.Ext4MarkInodeDirtyFtraceEvent.encode(m.ext4MarkInodeDirty, w.uint32(1538).fork()).ldelim();
                if (m.ext4MbBitmapLoad != null && Object.hasOwnProperty.call(m, "ext4MbBitmapLoad"))
                    $root.perfetto.protos.Ext4MbBitmapLoadFtraceEvent.encode(m.ext4MbBitmapLoad, w.uint32(1546).fork()).ldelim();
                if (m.ext4MbBuddyBitmapLoad != null && Object.hasOwnProperty.call(m, "ext4MbBuddyBitmapLoad"))
                    $root.perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent.encode(m.ext4MbBuddyBitmapLoad, w.uint32(1554).fork()).ldelim();
                if (m.ext4MbDiscardPreallocations != null && Object.hasOwnProperty.call(m, "ext4MbDiscardPreallocations"))
                    $root.perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent.encode(m.ext4MbDiscardPreallocations, w.uint32(1562).fork()).ldelim();
                if (m.ext4MbNewGroupPa != null && Object.hasOwnProperty.call(m, "ext4MbNewGroupPa"))
                    $root.perfetto.protos.Ext4MbNewGroupPaFtraceEvent.encode(m.ext4MbNewGroupPa, w.uint32(1570).fork()).ldelim();
                if (m.ext4MbNewInodePa != null && Object.hasOwnProperty.call(m, "ext4MbNewInodePa"))
                    $root.perfetto.protos.Ext4MbNewInodePaFtraceEvent.encode(m.ext4MbNewInodePa, w.uint32(1578).fork()).ldelim();
                if (m.ext4MbReleaseGroupPa != null && Object.hasOwnProperty.call(m, "ext4MbReleaseGroupPa"))
                    $root.perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent.encode(m.ext4MbReleaseGroupPa, w.uint32(1586).fork()).ldelim();
                if (m.ext4MbReleaseInodePa != null && Object.hasOwnProperty.call(m, "ext4MbReleaseInodePa"))
                    $root.perfetto.protos.Ext4MbReleaseInodePaFtraceEvent.encode(m.ext4MbReleaseInodePa, w.uint32(1594).fork()).ldelim();
                if (m.ext4MballocAlloc != null && Object.hasOwnProperty.call(m, "ext4MballocAlloc"))
                    $root.perfetto.protos.Ext4MballocAllocFtraceEvent.encode(m.ext4MballocAlloc, w.uint32(1602).fork()).ldelim();
                if (m.ext4MballocDiscard != null && Object.hasOwnProperty.call(m, "ext4MballocDiscard"))
                    $root.perfetto.protos.Ext4MballocDiscardFtraceEvent.encode(m.ext4MballocDiscard, w.uint32(1610).fork()).ldelim();
                if (m.ext4MballocFree != null && Object.hasOwnProperty.call(m, "ext4MballocFree"))
                    $root.perfetto.protos.Ext4MballocFreeFtraceEvent.encode(m.ext4MballocFree, w.uint32(1618).fork()).ldelim();
                if (m.ext4MballocPrealloc != null && Object.hasOwnProperty.call(m, "ext4MballocPrealloc"))
                    $root.perfetto.protos.Ext4MballocPreallocFtraceEvent.encode(m.ext4MballocPrealloc, w.uint32(1626).fork()).ldelim();
                if (m.ext4OtherInodeUpdateTime != null && Object.hasOwnProperty.call(m, "ext4OtherInodeUpdateTime"))
                    $root.perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent.encode(m.ext4OtherInodeUpdateTime, w.uint32(1634).fork()).ldelim();
                if (m.ext4PunchHole != null && Object.hasOwnProperty.call(m, "ext4PunchHole"))
                    $root.perfetto.protos.Ext4PunchHoleFtraceEvent.encode(m.ext4PunchHole, w.uint32(1642).fork()).ldelim();
                if (m.ext4ReadBlockBitmapLoad != null && Object.hasOwnProperty.call(m, "ext4ReadBlockBitmapLoad"))
                    $root.perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent.encode(m.ext4ReadBlockBitmapLoad, w.uint32(1650).fork()).ldelim();
                if (m.ext4Readpage != null && Object.hasOwnProperty.call(m, "ext4Readpage"))
                    $root.perfetto.protos.Ext4ReadpageFtraceEvent.encode(m.ext4Readpage, w.uint32(1658).fork()).ldelim();
                if (m.ext4Releasepage != null && Object.hasOwnProperty.call(m, "ext4Releasepage"))
                    $root.perfetto.protos.Ext4ReleasepageFtraceEvent.encode(m.ext4Releasepage, w.uint32(1666).fork()).ldelim();
                if (m.ext4RemoveBlocks != null && Object.hasOwnProperty.call(m, "ext4RemoveBlocks"))
                    $root.perfetto.protos.Ext4RemoveBlocksFtraceEvent.encode(m.ext4RemoveBlocks, w.uint32(1674).fork()).ldelim();
                if (m.ext4RequestBlocks != null && Object.hasOwnProperty.call(m, "ext4RequestBlocks"))
                    $root.perfetto.protos.Ext4RequestBlocksFtraceEvent.encode(m.ext4RequestBlocks, w.uint32(1682).fork()).ldelim();
                if (m.ext4RequestInode != null && Object.hasOwnProperty.call(m, "ext4RequestInode"))
                    $root.perfetto.protos.Ext4RequestInodeFtraceEvent.encode(m.ext4RequestInode, w.uint32(1690).fork()).ldelim();
                if (m.ext4SyncFs != null && Object.hasOwnProperty.call(m, "ext4SyncFs"))
                    $root.perfetto.protos.Ext4SyncFsFtraceEvent.encode(m.ext4SyncFs, w.uint32(1698).fork()).ldelim();
                if (m.ext4TrimAllFree != null && Object.hasOwnProperty.call(m, "ext4TrimAllFree"))
                    $root.perfetto.protos.Ext4TrimAllFreeFtraceEvent.encode(m.ext4TrimAllFree, w.uint32(1706).fork()).ldelim();
                if (m.ext4TrimExtent != null && Object.hasOwnProperty.call(m, "ext4TrimExtent"))
                    $root.perfetto.protos.Ext4TrimExtentFtraceEvent.encode(m.ext4TrimExtent, w.uint32(1714).fork()).ldelim();
                if (m.ext4TruncateEnter != null && Object.hasOwnProperty.call(m, "ext4TruncateEnter"))
                    $root.perfetto.protos.Ext4TruncateEnterFtraceEvent.encode(m.ext4TruncateEnter, w.uint32(1722).fork()).ldelim();
                if (m.ext4TruncateExit != null && Object.hasOwnProperty.call(m, "ext4TruncateExit"))
                    $root.perfetto.protos.Ext4TruncateExitFtraceEvent.encode(m.ext4TruncateExit, w.uint32(1730).fork()).ldelim();
                if (m.ext4UnlinkEnter != null && Object.hasOwnProperty.call(m, "ext4UnlinkEnter"))
                    $root.perfetto.protos.Ext4UnlinkEnterFtraceEvent.encode(m.ext4UnlinkEnter, w.uint32(1738).fork()).ldelim();
                if (m.ext4UnlinkExit != null && Object.hasOwnProperty.call(m, "ext4UnlinkExit"))
                    $root.perfetto.protos.Ext4UnlinkExitFtraceEvent.encode(m.ext4UnlinkExit, w.uint32(1746).fork()).ldelim();
                if (m.ext4WriteBegin != null && Object.hasOwnProperty.call(m, "ext4WriteBegin"))
                    $root.perfetto.protos.Ext4WriteBeginFtraceEvent.encode(m.ext4WriteBegin, w.uint32(1754).fork()).ldelim();
                if (m.ext4WriteEnd != null && Object.hasOwnProperty.call(m, "ext4WriteEnd"))
                    $root.perfetto.protos.Ext4WriteEndFtraceEvent.encode(m.ext4WriteEnd, w.uint32(1842).fork()).ldelim();
                if (m.ext4Writepage != null && Object.hasOwnProperty.call(m, "ext4Writepage"))
                    $root.perfetto.protos.Ext4WritepageFtraceEvent.encode(m.ext4Writepage, w.uint32(1850).fork()).ldelim();
                if (m.ext4Writepages != null && Object.hasOwnProperty.call(m, "ext4Writepages"))
                    $root.perfetto.protos.Ext4WritepagesFtraceEvent.encode(m.ext4Writepages, w.uint32(1858).fork()).ldelim();
                if (m.ext4WritepagesResult != null && Object.hasOwnProperty.call(m, "ext4WritepagesResult"))
                    $root.perfetto.protos.Ext4WritepagesResultFtraceEvent.encode(m.ext4WritepagesResult, w.uint32(1866).fork()).ldelim();
                if (m.ext4ZeroRange != null && Object.hasOwnProperty.call(m, "ext4ZeroRange"))
                    $root.perfetto.protos.Ext4ZeroRangeFtraceEvent.encode(m.ext4ZeroRange, w.uint32(1874).fork()).ldelim();
                if (m.taskNewtask != null && Object.hasOwnProperty.call(m, "taskNewtask"))
                    $root.perfetto.protos.TaskNewtaskFtraceEvent.encode(m.taskNewtask, w.uint32(1882).fork()).ldelim();
                if (m.taskRename != null && Object.hasOwnProperty.call(m, "taskRename"))
                    $root.perfetto.protos.TaskRenameFtraceEvent.encode(m.taskRename, w.uint32(1890).fork()).ldelim();
                if (m.schedProcessExec != null && Object.hasOwnProperty.call(m, "schedProcessExec"))
                    $root.perfetto.protos.SchedProcessExecFtraceEvent.encode(m.schedProcessExec, w.uint32(1898).fork()).ldelim();
                if (m.schedProcessExit != null && Object.hasOwnProperty.call(m, "schedProcessExit"))
                    $root.perfetto.protos.SchedProcessExitFtraceEvent.encode(m.schedProcessExit, w.uint32(1906).fork()).ldelim();
                if (m.schedProcessFork != null && Object.hasOwnProperty.call(m, "schedProcessFork"))
                    $root.perfetto.protos.SchedProcessForkFtraceEvent.encode(m.schedProcessFork, w.uint32(1914).fork()).ldelim();
                if (m.schedProcessFree != null && Object.hasOwnProperty.call(m, "schedProcessFree"))
                    $root.perfetto.protos.SchedProcessFreeFtraceEvent.encode(m.schedProcessFree, w.uint32(1922).fork()).ldelim();
                if (m.schedProcessHang != null && Object.hasOwnProperty.call(m, "schedProcessHang"))
                    $root.perfetto.protos.SchedProcessHangFtraceEvent.encode(m.schedProcessHang, w.uint32(1930).fork()).ldelim();
                if (m.schedProcessWait != null && Object.hasOwnProperty.call(m, "schedProcessWait"))
                    $root.perfetto.protos.SchedProcessWaitFtraceEvent.encode(m.schedProcessWait, w.uint32(1938).fork()).ldelim();
                if (m.f2fsDoSubmitBio != null && Object.hasOwnProperty.call(m, "f2fsDoSubmitBio"))
                    $root.perfetto.protos.F2fsDoSubmitBioFtraceEvent.encode(m.f2fsDoSubmitBio, w.uint32(1946).fork()).ldelim();
                if (m.f2fsEvictInode != null && Object.hasOwnProperty.call(m, "f2fsEvictInode"))
                    $root.perfetto.protos.F2fsEvictInodeFtraceEvent.encode(m.f2fsEvictInode, w.uint32(1954).fork()).ldelim();
                if (m.f2fsFallocate != null && Object.hasOwnProperty.call(m, "f2fsFallocate"))
                    $root.perfetto.protos.F2fsFallocateFtraceEvent.encode(m.f2fsFallocate, w.uint32(1962).fork()).ldelim();
                if (m.f2fsGetDataBlock != null && Object.hasOwnProperty.call(m, "f2fsGetDataBlock"))
                    $root.perfetto.protos.F2fsGetDataBlockFtraceEvent.encode(m.f2fsGetDataBlock, w.uint32(1970).fork()).ldelim();
                if (m.f2fsGetVictim != null && Object.hasOwnProperty.call(m, "f2fsGetVictim"))
                    $root.perfetto.protos.F2fsGetVictimFtraceEvent.encode(m.f2fsGetVictim, w.uint32(1978).fork()).ldelim();
                if (m.f2fsIget != null && Object.hasOwnProperty.call(m, "f2fsIget"))
                    $root.perfetto.protos.F2fsIgetFtraceEvent.encode(m.f2fsIget, w.uint32(1986).fork()).ldelim();
                if (m.f2fsIgetExit != null && Object.hasOwnProperty.call(m, "f2fsIgetExit"))
                    $root.perfetto.protos.F2fsIgetExitFtraceEvent.encode(m.f2fsIgetExit, w.uint32(1994).fork()).ldelim();
                if (m.f2fsNewInode != null && Object.hasOwnProperty.call(m, "f2fsNewInode"))
                    $root.perfetto.protos.F2fsNewInodeFtraceEvent.encode(m.f2fsNewInode, w.uint32(2002).fork()).ldelim();
                if (m.f2fsReadpage != null && Object.hasOwnProperty.call(m, "f2fsReadpage"))
                    $root.perfetto.protos.F2fsReadpageFtraceEvent.encode(m.f2fsReadpage, w.uint32(2010).fork()).ldelim();
                if (m.f2fsReserveNewBlock != null && Object.hasOwnProperty.call(m, "f2fsReserveNewBlock"))
                    $root.perfetto.protos.F2fsReserveNewBlockFtraceEvent.encode(m.f2fsReserveNewBlock, w.uint32(2018).fork()).ldelim();
                if (m.f2fsSetPageDirty != null && Object.hasOwnProperty.call(m, "f2fsSetPageDirty"))
                    $root.perfetto.protos.F2fsSetPageDirtyFtraceEvent.encode(m.f2fsSetPageDirty, w.uint32(2026).fork()).ldelim();
                if (m.f2fsSubmitWritePage != null && Object.hasOwnProperty.call(m, "f2fsSubmitWritePage"))
                    $root.perfetto.protos.F2fsSubmitWritePageFtraceEvent.encode(m.f2fsSubmitWritePage, w.uint32(2034).fork()).ldelim();
                if (m.f2fsSyncFileEnter != null && Object.hasOwnProperty.call(m, "f2fsSyncFileEnter"))
                    $root.perfetto.protos.F2fsSyncFileEnterFtraceEvent.encode(m.f2fsSyncFileEnter, w.uint32(2042).fork()).ldelim();
                if (m.f2fsSyncFileExit != null && Object.hasOwnProperty.call(m, "f2fsSyncFileExit"))
                    $root.perfetto.protos.F2fsSyncFileExitFtraceEvent.encode(m.f2fsSyncFileExit, w.uint32(2050).fork()).ldelim();
                if (m.f2fsSyncFs != null && Object.hasOwnProperty.call(m, "f2fsSyncFs"))
                    $root.perfetto.protos.F2fsSyncFsFtraceEvent.encode(m.f2fsSyncFs, w.uint32(2058).fork()).ldelim();
                if (m.f2fsTruncate != null && Object.hasOwnProperty.call(m, "f2fsTruncate"))
                    $root.perfetto.protos.F2fsTruncateFtraceEvent.encode(m.f2fsTruncate, w.uint32(2066).fork()).ldelim();
                if (m.f2fsTruncateBlocksEnter != null && Object.hasOwnProperty.call(m, "f2fsTruncateBlocksEnter"))
                    $root.perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent.encode(m.f2fsTruncateBlocksEnter, w.uint32(2074).fork()).ldelim();
                if (m.f2fsTruncateBlocksExit != null && Object.hasOwnProperty.call(m, "f2fsTruncateBlocksExit"))
                    $root.perfetto.protos.F2fsTruncateBlocksExitFtraceEvent.encode(m.f2fsTruncateBlocksExit, w.uint32(2082).fork()).ldelim();
                if (m.f2fsTruncateDataBlocksRange != null && Object.hasOwnProperty.call(m, "f2fsTruncateDataBlocksRange"))
                    $root.perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent.encode(m.f2fsTruncateDataBlocksRange, w.uint32(2090).fork()).ldelim();
                if (m.f2fsTruncateInodeBlocksEnter != null && Object.hasOwnProperty.call(m, "f2fsTruncateInodeBlocksEnter"))
                    $root.perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent.encode(m.f2fsTruncateInodeBlocksEnter, w.uint32(2098).fork()).ldelim();
                if (m.f2fsTruncateInodeBlocksExit != null && Object.hasOwnProperty.call(m, "f2fsTruncateInodeBlocksExit"))
                    $root.perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent.encode(m.f2fsTruncateInodeBlocksExit, w.uint32(2106).fork()).ldelim();
                if (m.f2fsTruncateNode != null && Object.hasOwnProperty.call(m, "f2fsTruncateNode"))
                    $root.perfetto.protos.F2fsTruncateNodeFtraceEvent.encode(m.f2fsTruncateNode, w.uint32(2114).fork()).ldelim();
                if (m.f2fsTruncateNodesEnter != null && Object.hasOwnProperty.call(m, "f2fsTruncateNodesEnter"))
                    $root.perfetto.protos.F2fsTruncateNodesEnterFtraceEvent.encode(m.f2fsTruncateNodesEnter, w.uint32(2122).fork()).ldelim();
                if (m.f2fsTruncateNodesExit != null && Object.hasOwnProperty.call(m, "f2fsTruncateNodesExit"))
                    $root.perfetto.protos.F2fsTruncateNodesExitFtraceEvent.encode(m.f2fsTruncateNodesExit, w.uint32(2130).fork()).ldelim();
                if (m.f2fsTruncatePartialNodes != null && Object.hasOwnProperty.call(m, "f2fsTruncatePartialNodes"))
                    $root.perfetto.protos.F2fsTruncatePartialNodesFtraceEvent.encode(m.f2fsTruncatePartialNodes, w.uint32(2138).fork()).ldelim();
                if (m.f2fsUnlinkEnter != null && Object.hasOwnProperty.call(m, "f2fsUnlinkEnter"))
                    $root.perfetto.protos.F2fsUnlinkEnterFtraceEvent.encode(m.f2fsUnlinkEnter, w.uint32(2146).fork()).ldelim();
                if (m.f2fsUnlinkExit != null && Object.hasOwnProperty.call(m, "f2fsUnlinkExit"))
                    $root.perfetto.protos.F2fsUnlinkExitFtraceEvent.encode(m.f2fsUnlinkExit, w.uint32(2154).fork()).ldelim();
                if (m.f2fsVmPageMkwrite != null && Object.hasOwnProperty.call(m, "f2fsVmPageMkwrite"))
                    $root.perfetto.protos.F2fsVmPageMkwriteFtraceEvent.encode(m.f2fsVmPageMkwrite, w.uint32(2162).fork()).ldelim();
                if (m.f2fsWriteBegin != null && Object.hasOwnProperty.call(m, "f2fsWriteBegin"))
                    $root.perfetto.protos.F2fsWriteBeginFtraceEvent.encode(m.f2fsWriteBegin, w.uint32(2170).fork()).ldelim();
                if (m.f2fsWriteCheckpoint != null && Object.hasOwnProperty.call(m, "f2fsWriteCheckpoint"))
                    $root.perfetto.protos.F2fsWriteCheckpointFtraceEvent.encode(m.f2fsWriteCheckpoint, w.uint32(2178).fork()).ldelim();
                if (m.f2fsWriteEnd != null && Object.hasOwnProperty.call(m, "f2fsWriteEnd"))
                    $root.perfetto.protos.F2fsWriteEndFtraceEvent.encode(m.f2fsWriteEnd, w.uint32(2186).fork()).ldelim();
                if (m.allocPagesIommuEnd != null && Object.hasOwnProperty.call(m, "allocPagesIommuEnd"))
                    $root.perfetto.protos.AllocPagesIommuEndFtraceEvent.encode(m.allocPagesIommuEnd, w.uint32(2194).fork()).ldelim();
                if (m.allocPagesIommuFail != null && Object.hasOwnProperty.call(m, "allocPagesIommuFail"))
                    $root.perfetto.protos.AllocPagesIommuFailFtraceEvent.encode(m.allocPagesIommuFail, w.uint32(2202).fork()).ldelim();
                if (m.allocPagesIommuStart != null && Object.hasOwnProperty.call(m, "allocPagesIommuStart"))
                    $root.perfetto.protos.AllocPagesIommuStartFtraceEvent.encode(m.allocPagesIommuStart, w.uint32(2210).fork()).ldelim();
                if (m.allocPagesSysEnd != null && Object.hasOwnProperty.call(m, "allocPagesSysEnd"))
                    $root.perfetto.protos.AllocPagesSysEndFtraceEvent.encode(m.allocPagesSysEnd, w.uint32(2218).fork()).ldelim();
                if (m.allocPagesSysFail != null && Object.hasOwnProperty.call(m, "allocPagesSysFail"))
                    $root.perfetto.protos.AllocPagesSysFailFtraceEvent.encode(m.allocPagesSysFail, w.uint32(2226).fork()).ldelim();
                if (m.allocPagesSysStart != null && Object.hasOwnProperty.call(m, "allocPagesSysStart"))
                    $root.perfetto.protos.AllocPagesSysStartFtraceEvent.encode(m.allocPagesSysStart, w.uint32(2234).fork()).ldelim();
                if (m.dmaAllocContiguousRetry != null && Object.hasOwnProperty.call(m, "dmaAllocContiguousRetry"))
                    $root.perfetto.protos.DmaAllocContiguousRetryFtraceEvent.encode(m.dmaAllocContiguousRetry, w.uint32(2242).fork()).ldelim();
                if (m.iommuMapRange != null && Object.hasOwnProperty.call(m, "iommuMapRange"))
                    $root.perfetto.protos.IommuMapRangeFtraceEvent.encode(m.iommuMapRange, w.uint32(2250).fork()).ldelim();
                if (m.iommuSecPtblMapRangeEnd != null && Object.hasOwnProperty.call(m, "iommuSecPtblMapRangeEnd"))
                    $root.perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent.encode(m.iommuSecPtblMapRangeEnd, w.uint32(2258).fork()).ldelim();
                if (m.iommuSecPtblMapRangeStart != null && Object.hasOwnProperty.call(m, "iommuSecPtblMapRangeStart"))
                    $root.perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent.encode(m.iommuSecPtblMapRangeStart, w.uint32(2266).fork()).ldelim();
                if (m.ionAllocBufferEnd != null && Object.hasOwnProperty.call(m, "ionAllocBufferEnd"))
                    $root.perfetto.protos.IonAllocBufferEndFtraceEvent.encode(m.ionAllocBufferEnd, w.uint32(2274).fork()).ldelim();
                if (m.ionAllocBufferFail != null && Object.hasOwnProperty.call(m, "ionAllocBufferFail"))
                    $root.perfetto.protos.IonAllocBufferFailFtraceEvent.encode(m.ionAllocBufferFail, w.uint32(2282).fork()).ldelim();
                if (m.ionAllocBufferFallback != null && Object.hasOwnProperty.call(m, "ionAllocBufferFallback"))
                    $root.perfetto.protos.IonAllocBufferFallbackFtraceEvent.encode(m.ionAllocBufferFallback, w.uint32(2290).fork()).ldelim();
                if (m.ionAllocBufferStart != null && Object.hasOwnProperty.call(m, "ionAllocBufferStart"))
                    $root.perfetto.protos.IonAllocBufferStartFtraceEvent.encode(m.ionAllocBufferStart, w.uint32(2298).fork()).ldelim();
                if (m.ionCpAllocRetry != null && Object.hasOwnProperty.call(m, "ionCpAllocRetry"))
                    $root.perfetto.protos.IonCpAllocRetryFtraceEvent.encode(m.ionCpAllocRetry, w.uint32(2306).fork()).ldelim();
                if (m.ionCpSecureBufferEnd != null && Object.hasOwnProperty.call(m, "ionCpSecureBufferEnd"))
                    $root.perfetto.protos.IonCpSecureBufferEndFtraceEvent.encode(m.ionCpSecureBufferEnd, w.uint32(2314).fork()).ldelim();
                if (m.ionCpSecureBufferStart != null && Object.hasOwnProperty.call(m, "ionCpSecureBufferStart"))
                    $root.perfetto.protos.IonCpSecureBufferStartFtraceEvent.encode(m.ionCpSecureBufferStart, w.uint32(2322).fork()).ldelim();
                if (m.ionPrefetching != null && Object.hasOwnProperty.call(m, "ionPrefetching"))
                    $root.perfetto.protos.IonPrefetchingFtraceEvent.encode(m.ionPrefetching, w.uint32(2330).fork()).ldelim();
                if (m.ionSecureCmaAddToPoolEnd != null && Object.hasOwnProperty.call(m, "ionSecureCmaAddToPoolEnd"))
                    $root.perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent.encode(m.ionSecureCmaAddToPoolEnd, w.uint32(2338).fork()).ldelim();
                if (m.ionSecureCmaAddToPoolStart != null && Object.hasOwnProperty.call(m, "ionSecureCmaAddToPoolStart"))
                    $root.perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent.encode(m.ionSecureCmaAddToPoolStart, w.uint32(2346).fork()).ldelim();
                if (m.ionSecureCmaAllocateEnd != null && Object.hasOwnProperty.call(m, "ionSecureCmaAllocateEnd"))
                    $root.perfetto.protos.IonSecureCmaAllocateEndFtraceEvent.encode(m.ionSecureCmaAllocateEnd, w.uint32(2354).fork()).ldelim();
                if (m.ionSecureCmaAllocateStart != null && Object.hasOwnProperty.call(m, "ionSecureCmaAllocateStart"))
                    $root.perfetto.protos.IonSecureCmaAllocateStartFtraceEvent.encode(m.ionSecureCmaAllocateStart, w.uint32(2362).fork()).ldelim();
                if (m.ionSecureCmaShrinkPoolEnd != null && Object.hasOwnProperty.call(m, "ionSecureCmaShrinkPoolEnd"))
                    $root.perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent.encode(m.ionSecureCmaShrinkPoolEnd, w.uint32(2370).fork()).ldelim();
                if (m.ionSecureCmaShrinkPoolStart != null && Object.hasOwnProperty.call(m, "ionSecureCmaShrinkPoolStart"))
                    $root.perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent.encode(m.ionSecureCmaShrinkPoolStart, w.uint32(2378).fork()).ldelim();
                if (m.kfree != null && Object.hasOwnProperty.call(m, "kfree"))
                    $root.perfetto.protos.KfreeFtraceEvent.encode(m.kfree, w.uint32(2386).fork()).ldelim();
                if (m.kmalloc != null && Object.hasOwnProperty.call(m, "kmalloc"))
                    $root.perfetto.protos.KmallocFtraceEvent.encode(m.kmalloc, w.uint32(2394).fork()).ldelim();
                if (m.kmallocNode != null && Object.hasOwnProperty.call(m, "kmallocNode"))
                    $root.perfetto.protos.KmallocNodeFtraceEvent.encode(m.kmallocNode, w.uint32(2402).fork()).ldelim();
                if (m.kmemCacheAlloc != null && Object.hasOwnProperty.call(m, "kmemCacheAlloc"))
                    $root.perfetto.protos.KmemCacheAllocFtraceEvent.encode(m.kmemCacheAlloc, w.uint32(2410).fork()).ldelim();
                if (m.kmemCacheAllocNode != null && Object.hasOwnProperty.call(m, "kmemCacheAllocNode"))
                    $root.perfetto.protos.KmemCacheAllocNodeFtraceEvent.encode(m.kmemCacheAllocNode, w.uint32(2418).fork()).ldelim();
                if (m.kmemCacheFree != null && Object.hasOwnProperty.call(m, "kmemCacheFree"))
                    $root.perfetto.protos.KmemCacheFreeFtraceEvent.encode(m.kmemCacheFree, w.uint32(2426).fork()).ldelim();
                if (m.migratePagesEnd != null && Object.hasOwnProperty.call(m, "migratePagesEnd"))
                    $root.perfetto.protos.MigratePagesEndFtraceEvent.encode(m.migratePagesEnd, w.uint32(2434).fork()).ldelim();
                if (m.migratePagesStart != null && Object.hasOwnProperty.call(m, "migratePagesStart"))
                    $root.perfetto.protos.MigratePagesStartFtraceEvent.encode(m.migratePagesStart, w.uint32(2442).fork()).ldelim();
                if (m.migrateRetry != null && Object.hasOwnProperty.call(m, "migrateRetry"))
                    $root.perfetto.protos.MigrateRetryFtraceEvent.encode(m.migrateRetry, w.uint32(2450).fork()).ldelim();
                if (m.mmPageAlloc != null && Object.hasOwnProperty.call(m, "mmPageAlloc"))
                    $root.perfetto.protos.MmPageAllocFtraceEvent.encode(m.mmPageAlloc, w.uint32(2458).fork()).ldelim();
                if (m.mmPageAllocExtfrag != null && Object.hasOwnProperty.call(m, "mmPageAllocExtfrag"))
                    $root.perfetto.protos.MmPageAllocExtfragFtraceEvent.encode(m.mmPageAllocExtfrag, w.uint32(2466).fork()).ldelim();
                if (m.mmPageAllocZoneLocked != null && Object.hasOwnProperty.call(m, "mmPageAllocZoneLocked"))
                    $root.perfetto.protos.MmPageAllocZoneLockedFtraceEvent.encode(m.mmPageAllocZoneLocked, w.uint32(2474).fork()).ldelim();
                if (m.mmPageFree != null && Object.hasOwnProperty.call(m, "mmPageFree"))
                    $root.perfetto.protos.MmPageFreeFtraceEvent.encode(m.mmPageFree, w.uint32(2482).fork()).ldelim();
                if (m.mmPageFreeBatched != null && Object.hasOwnProperty.call(m, "mmPageFreeBatched"))
                    $root.perfetto.protos.MmPageFreeBatchedFtraceEvent.encode(m.mmPageFreeBatched, w.uint32(2490).fork()).ldelim();
                if (m.mmPagePcpuDrain != null && Object.hasOwnProperty.call(m, "mmPagePcpuDrain"))
                    $root.perfetto.protos.MmPagePcpuDrainFtraceEvent.encode(m.mmPagePcpuDrain, w.uint32(2498).fork()).ldelim();
                if (m.rssStat != null && Object.hasOwnProperty.call(m, "rssStat"))
                    $root.perfetto.protos.RssStatFtraceEvent.encode(m.rssStat, w.uint32(2506).fork()).ldelim();
                if (m.ionHeapShrink != null && Object.hasOwnProperty.call(m, "ionHeapShrink"))
                    $root.perfetto.protos.IonHeapShrinkFtraceEvent.encode(m.ionHeapShrink, w.uint32(2514).fork()).ldelim();
                if (m.ionHeapGrow != null && Object.hasOwnProperty.call(m, "ionHeapGrow"))
                    $root.perfetto.protos.IonHeapGrowFtraceEvent.encode(m.ionHeapGrow, w.uint32(2522).fork()).ldelim();
                if (m.fenceInit != null && Object.hasOwnProperty.call(m, "fenceInit"))
                    $root.perfetto.protos.FenceInitFtraceEvent.encode(m.fenceInit, w.uint32(2530).fork()).ldelim();
                if (m.fenceDestroy != null && Object.hasOwnProperty.call(m, "fenceDestroy"))
                    $root.perfetto.protos.FenceDestroyFtraceEvent.encode(m.fenceDestroy, w.uint32(2538).fork()).ldelim();
                if (m.fenceEnableSignal != null && Object.hasOwnProperty.call(m, "fenceEnableSignal"))
                    $root.perfetto.protos.FenceEnableSignalFtraceEvent.encode(m.fenceEnableSignal, w.uint32(2546).fork()).ldelim();
                if (m.fenceSignaled != null && Object.hasOwnProperty.call(m, "fenceSignaled"))
                    $root.perfetto.protos.FenceSignaledFtraceEvent.encode(m.fenceSignaled, w.uint32(2554).fork()).ldelim();
                if (m.clkEnable != null && Object.hasOwnProperty.call(m, "clkEnable"))
                    $root.perfetto.protos.ClkEnableFtraceEvent.encode(m.clkEnable, w.uint32(2562).fork()).ldelim();
                if (m.clkDisable != null && Object.hasOwnProperty.call(m, "clkDisable"))
                    $root.perfetto.protos.ClkDisableFtraceEvent.encode(m.clkDisable, w.uint32(2570).fork()).ldelim();
                if (m.clkSetRate != null && Object.hasOwnProperty.call(m, "clkSetRate"))
                    $root.perfetto.protos.ClkSetRateFtraceEvent.encode(m.clkSetRate, w.uint32(2578).fork()).ldelim();
                if (m.binderTransactionAllocBuf != null && Object.hasOwnProperty.call(m, "binderTransactionAllocBuf"))
                    $root.perfetto.protos.BinderTransactionAllocBufFtraceEvent.encode(m.binderTransactionAllocBuf, w.uint32(2586).fork()).ldelim();
                if (m.signalDeliver != null && Object.hasOwnProperty.call(m, "signalDeliver"))
                    $root.perfetto.protos.SignalDeliverFtraceEvent.encode(m.signalDeliver, w.uint32(2594).fork()).ldelim();
                if (m.signalGenerate != null && Object.hasOwnProperty.call(m, "signalGenerate"))
                    $root.perfetto.protos.SignalGenerateFtraceEvent.encode(m.signalGenerate, w.uint32(2602).fork()).ldelim();
                if (m.oomScoreAdjUpdate != null && Object.hasOwnProperty.call(m, "oomScoreAdjUpdate"))
                    $root.perfetto.protos.OomScoreAdjUpdateFtraceEvent.encode(m.oomScoreAdjUpdate, w.uint32(2610).fork()).ldelim();
                if (m.generic != null && Object.hasOwnProperty.call(m, "generic"))
                    $root.perfetto.protos.GenericFtraceEvent.encode(m.generic, w.uint32(2618).fork()).ldelim();
                if (m.mmEventRecord != null && Object.hasOwnProperty.call(m, "mmEventRecord"))
                    $root.perfetto.protos.MmEventRecordFtraceEvent.encode(m.mmEventRecord, w.uint32(2626).fork()).ldelim();
                if (m.sysEnter != null && Object.hasOwnProperty.call(m, "sysEnter"))
                    $root.perfetto.protos.SysEnterFtraceEvent.encode(m.sysEnter, w.uint32(2634).fork()).ldelim();
                if (m.sysExit != null && Object.hasOwnProperty.call(m, "sysExit"))
                    $root.perfetto.protos.SysExitFtraceEvent.encode(m.sysExit, w.uint32(2642).fork()).ldelim();
                if (m.zero != null && Object.hasOwnProperty.call(m, "zero"))
                    $root.perfetto.protos.ZeroFtraceEvent.encode(m.zero, w.uint32(2650).fork()).ldelim();
                if (m.gpuFrequency != null && Object.hasOwnProperty.call(m, "gpuFrequency"))
                    $root.perfetto.protos.GpuFrequencyFtraceEvent.encode(m.gpuFrequency, w.uint32(2658).fork()).ldelim();
                if (m.sdeTracingMarkWrite != null && Object.hasOwnProperty.call(m, "sdeTracingMarkWrite"))
                    $root.perfetto.protos.SdeTracingMarkWriteFtraceEvent.encode(m.sdeTracingMarkWrite, w.uint32(2666).fork()).ldelim();
                if (m.markVictim != null && Object.hasOwnProperty.call(m, "markVictim"))
                    $root.perfetto.protos.MarkVictimFtraceEvent.encode(m.markVictim, w.uint32(2674).fork()).ldelim();
                if (m.ionStat != null && Object.hasOwnProperty.call(m, "ionStat"))
                    $root.perfetto.protos.IonStatFtraceEvent.encode(m.ionStat, w.uint32(2682).fork()).ldelim();
                if (m.ionBufferCreate != null && Object.hasOwnProperty.call(m, "ionBufferCreate"))
                    $root.perfetto.protos.IonBufferCreateFtraceEvent.encode(m.ionBufferCreate, w.uint32(2690).fork()).ldelim();
                if (m.ionBufferDestroy != null && Object.hasOwnProperty.call(m, "ionBufferDestroy"))
                    $root.perfetto.protos.IonBufferDestroyFtraceEvent.encode(m.ionBufferDestroy, w.uint32(2698).fork()).ldelim();
                if (m.scmCallStart != null && Object.hasOwnProperty.call(m, "scmCallStart"))
                    $root.perfetto.protos.ScmCallStartFtraceEvent.encode(m.scmCallStart, w.uint32(2706).fork()).ldelim();
                if (m.scmCallEnd != null && Object.hasOwnProperty.call(m, "scmCallEnd"))
                    $root.perfetto.protos.ScmCallEndFtraceEvent.encode(m.scmCallEnd, w.uint32(2714).fork()).ldelim();
                if (m.gpuMemTotal != null && Object.hasOwnProperty.call(m, "gpuMemTotal"))
                    $root.perfetto.protos.GpuMemTotalFtraceEvent.encode(m.gpuMemTotal, w.uint32(2722).fork()).ldelim();
                if (m.thermalTemperature != null && Object.hasOwnProperty.call(m, "thermalTemperature"))
                    $root.perfetto.protos.ThermalTemperatureFtraceEvent.encode(m.thermalTemperature, w.uint32(2730).fork()).ldelim();
                if (m.cdevUpdate != null && Object.hasOwnProperty.call(m, "cdevUpdate"))
                    $root.perfetto.protos.CdevUpdateFtraceEvent.encode(m.cdevUpdate, w.uint32(2738).fork()).ldelim();
                if (m.cpuhpExit != null && Object.hasOwnProperty.call(m, "cpuhpExit"))
                    $root.perfetto.protos.CpuhpExitFtraceEvent.encode(m.cpuhpExit, w.uint32(2746).fork()).ldelim();
                if (m.cpuhpMultiEnter != null && Object.hasOwnProperty.call(m, "cpuhpMultiEnter"))
                    $root.perfetto.protos.CpuhpMultiEnterFtraceEvent.encode(m.cpuhpMultiEnter, w.uint32(2754).fork()).ldelim();
                if (m.cpuhpEnter != null && Object.hasOwnProperty.call(m, "cpuhpEnter"))
                    $root.perfetto.protos.CpuhpEnterFtraceEvent.encode(m.cpuhpEnter, w.uint32(2762).fork()).ldelim();
                if (m.cpuhpLatency != null && Object.hasOwnProperty.call(m, "cpuhpLatency"))
                    $root.perfetto.protos.CpuhpLatencyFtraceEvent.encode(m.cpuhpLatency, w.uint32(2770).fork()).ldelim();
                if (m.fastrpcDmaStat != null && Object.hasOwnProperty.call(m, "fastrpcDmaStat"))
                    $root.perfetto.protos.FastrpcDmaStatFtraceEvent.encode(m.fastrpcDmaStat, w.uint32(2778).fork()).ldelim();
                if (m.dpuTracingMarkWrite != null && Object.hasOwnProperty.call(m, "dpuTracingMarkWrite"))
                    $root.perfetto.protos.DpuTracingMarkWriteFtraceEvent.encode(m.dpuTracingMarkWrite, w.uint32(2786).fork()).ldelim();
                if (m.g2dTracingMarkWrite != null && Object.hasOwnProperty.call(m, "g2dTracingMarkWrite"))
                    $root.perfetto.protos.G2dTracingMarkWriteFtraceEvent.encode(m.g2dTracingMarkWrite, w.uint32(2794).fork()).ldelim();
                if (m.maliTracingMarkWrite != null && Object.hasOwnProperty.call(m, "maliTracingMarkWrite"))
                    $root.perfetto.protos.MaliTracingMarkWriteFtraceEvent.encode(m.maliTracingMarkWrite, w.uint32(2802).fork()).ldelim();
                if (m.dmaHeapStat != null && Object.hasOwnProperty.call(m, "dmaHeapStat"))
                    $root.perfetto.protos.DmaHeapStatFtraceEvent.encode(m.dmaHeapStat, w.uint32(2810).fork()).ldelim();
                if (m.cpuhpPause != null && Object.hasOwnProperty.call(m, "cpuhpPause"))
                    $root.perfetto.protos.CpuhpPauseFtraceEvent.encode(m.cpuhpPause, w.uint32(2818).fork()).ldelim();
                if (m.schedPiSetprio != null && Object.hasOwnProperty.call(m, "schedPiSetprio"))
                    $root.perfetto.protos.SchedPiSetprioFtraceEvent.encode(m.schedPiSetprio, w.uint32(2826).fork()).ldelim();
                if (m.sdeSdeEvtlog != null && Object.hasOwnProperty.call(m, "sdeSdeEvtlog"))
                    $root.perfetto.protos.SdeSdeEvtlogFtraceEvent.encode(m.sdeSdeEvtlog, w.uint32(2834).fork()).ldelim();
                if (m.sdeSdePerfCalcCrtc != null && Object.hasOwnProperty.call(m, "sdeSdePerfCalcCrtc"))
                    $root.perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent.encode(m.sdeSdePerfCalcCrtc, w.uint32(2842).fork()).ldelim();
                if (m.sdeSdePerfCrtcUpdate != null && Object.hasOwnProperty.call(m, "sdeSdePerfCrtcUpdate"))
                    $root.perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent.encode(m.sdeSdePerfCrtcUpdate, w.uint32(2850).fork()).ldelim();
                if (m.sdeSdePerfSetQosLuts != null && Object.hasOwnProperty.call(m, "sdeSdePerfSetQosLuts"))
                    $root.perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent.encode(m.sdeSdePerfSetQosLuts, w.uint32(2858).fork()).ldelim();
                if (m.sdeSdePerfUpdateBus != null && Object.hasOwnProperty.call(m, "sdeSdePerfUpdateBus"))
                    $root.perfetto.protos.SdeSdePerfUpdateBusFtraceEvent.encode(m.sdeSdePerfUpdateBus, w.uint32(2866).fork()).ldelim();
                if (m.rssStatThrottled != null && Object.hasOwnProperty.call(m, "rssStatThrottled"))
                    $root.perfetto.protos.RssStatThrottledFtraceEvent.encode(m.rssStatThrottled, w.uint32(2874).fork()).ldelim();
                if (m.netifReceiveSkb != null && Object.hasOwnProperty.call(m, "netifReceiveSkb"))
                    $root.perfetto.protos.NetifReceiveSkbFtraceEvent.encode(m.netifReceiveSkb, w.uint32(2882).fork()).ldelim();
                if (m.netDevXmit != null && Object.hasOwnProperty.call(m, "netDevXmit"))
                    $root.perfetto.protos.NetDevXmitFtraceEvent.encode(m.netDevXmit, w.uint32(2890).fork()).ldelim();
                if (m.inetSockSetState != null && Object.hasOwnProperty.call(m, "inetSockSetState"))
                    $root.perfetto.protos.InetSockSetStateFtraceEvent.encode(m.inetSockSetState, w.uint32(2898).fork()).ldelim();
                if (m.tcpRetransmitSkb != null && Object.hasOwnProperty.call(m, "tcpRetransmitSkb"))
                    $root.perfetto.protos.TcpRetransmitSkbFtraceEvent.encode(m.tcpRetransmitSkb, w.uint32(2906).fork()).ldelim();
                if (m.crosEcSensorhubData != null && Object.hasOwnProperty.call(m, "crosEcSensorhubData"))
                    $root.perfetto.protos.CrosEcSensorhubDataFtraceEvent.encode(m.crosEcSensorhubData, w.uint32(2914).fork()).ldelim();
                if (m.napiGroReceiveEntry != null && Object.hasOwnProperty.call(m, "napiGroReceiveEntry"))
                    $root.perfetto.protos.NapiGroReceiveEntryFtraceEvent.encode(m.napiGroReceiveEntry, w.uint32(2922).fork()).ldelim();
                if (m.napiGroReceiveExit != null && Object.hasOwnProperty.call(m, "napiGroReceiveExit"))
                    $root.perfetto.protos.NapiGroReceiveExitFtraceEvent.encode(m.napiGroReceiveExit, w.uint32(2930).fork()).ldelim();
                if (m.kfreeSkb != null && Object.hasOwnProperty.call(m, "kfreeSkb"))
                    $root.perfetto.protos.KfreeSkbFtraceEvent.encode(m.kfreeSkb, w.uint32(2938).fork()).ldelim();
                if (m.kvmAccessFault != null && Object.hasOwnProperty.call(m, "kvmAccessFault"))
                    $root.perfetto.protos.KvmAccessFaultFtraceEvent.encode(m.kvmAccessFault, w.uint32(2946).fork()).ldelim();
                if (m.kvmAckIrq != null && Object.hasOwnProperty.call(m, "kvmAckIrq"))
                    $root.perfetto.protos.KvmAckIrqFtraceEvent.encode(m.kvmAckIrq, w.uint32(2954).fork()).ldelim();
                if (m.kvmAgeHva != null && Object.hasOwnProperty.call(m, "kvmAgeHva"))
                    $root.perfetto.protos.KvmAgeHvaFtraceEvent.encode(m.kvmAgeHva, w.uint32(2962).fork()).ldelim();
                if (m.kvmAgePage != null && Object.hasOwnProperty.call(m, "kvmAgePage"))
                    $root.perfetto.protos.KvmAgePageFtraceEvent.encode(m.kvmAgePage, w.uint32(2970).fork()).ldelim();
                if (m.kvmArmClearDebug != null && Object.hasOwnProperty.call(m, "kvmArmClearDebug"))
                    $root.perfetto.protos.KvmArmClearDebugFtraceEvent.encode(m.kvmArmClearDebug, w.uint32(2978).fork()).ldelim();
                if (m.kvmArmSetDreg32 != null && Object.hasOwnProperty.call(m, "kvmArmSetDreg32"))
                    $root.perfetto.protos.KvmArmSetDreg32FtraceEvent.encode(m.kvmArmSetDreg32, w.uint32(2986).fork()).ldelim();
                if (m.kvmArmSetRegset != null && Object.hasOwnProperty.call(m, "kvmArmSetRegset"))
                    $root.perfetto.protos.KvmArmSetRegsetFtraceEvent.encode(m.kvmArmSetRegset, w.uint32(2994).fork()).ldelim();
                if (m.kvmArmSetupDebug != null && Object.hasOwnProperty.call(m, "kvmArmSetupDebug"))
                    $root.perfetto.protos.KvmArmSetupDebugFtraceEvent.encode(m.kvmArmSetupDebug, w.uint32(3002).fork()).ldelim();
                if (m.kvmEntry != null && Object.hasOwnProperty.call(m, "kvmEntry"))
                    $root.perfetto.protos.KvmEntryFtraceEvent.encode(m.kvmEntry, w.uint32(3010).fork()).ldelim();
                if (m.kvmExit != null && Object.hasOwnProperty.call(m, "kvmExit"))
                    $root.perfetto.protos.KvmExitFtraceEvent.encode(m.kvmExit, w.uint32(3018).fork()).ldelim();
                if (m.kvmFpu != null && Object.hasOwnProperty.call(m, "kvmFpu"))
                    $root.perfetto.protos.KvmFpuFtraceEvent.encode(m.kvmFpu, w.uint32(3026).fork()).ldelim();
                if (m.kvmGetTimerMap != null && Object.hasOwnProperty.call(m, "kvmGetTimerMap"))
                    $root.perfetto.protos.KvmGetTimerMapFtraceEvent.encode(m.kvmGetTimerMap, w.uint32(3034).fork()).ldelim();
                if (m.kvmGuestFault != null && Object.hasOwnProperty.call(m, "kvmGuestFault"))
                    $root.perfetto.protos.KvmGuestFaultFtraceEvent.encode(m.kvmGuestFault, w.uint32(3042).fork()).ldelim();
                if (m.kvmHandleSysReg != null && Object.hasOwnProperty.call(m, "kvmHandleSysReg"))
                    $root.perfetto.protos.KvmHandleSysRegFtraceEvent.encode(m.kvmHandleSysReg, w.uint32(3050).fork()).ldelim();
                if (m.kvmHvcArm64 != null && Object.hasOwnProperty.call(m, "kvmHvcArm64"))
                    $root.perfetto.protos.KvmHvcArm64FtraceEvent.encode(m.kvmHvcArm64, w.uint32(3058).fork()).ldelim();
                if (m.kvmIrqLine != null && Object.hasOwnProperty.call(m, "kvmIrqLine"))
                    $root.perfetto.protos.KvmIrqLineFtraceEvent.encode(m.kvmIrqLine, w.uint32(3066).fork()).ldelim();
                if (m.kvmMmio != null && Object.hasOwnProperty.call(m, "kvmMmio"))
                    $root.perfetto.protos.KvmMmioFtraceEvent.encode(m.kvmMmio, w.uint32(3074).fork()).ldelim();
                if (m.kvmMmioEmulate != null && Object.hasOwnProperty.call(m, "kvmMmioEmulate"))
                    $root.perfetto.protos.KvmMmioEmulateFtraceEvent.encode(m.kvmMmioEmulate, w.uint32(3082).fork()).ldelim();
                if (m.kvmSetGuestDebug != null && Object.hasOwnProperty.call(m, "kvmSetGuestDebug"))
                    $root.perfetto.protos.KvmSetGuestDebugFtraceEvent.encode(m.kvmSetGuestDebug, w.uint32(3090).fork()).ldelim();
                if (m.kvmSetIrq != null && Object.hasOwnProperty.call(m, "kvmSetIrq"))
                    $root.perfetto.protos.KvmSetIrqFtraceEvent.encode(m.kvmSetIrq, w.uint32(3098).fork()).ldelim();
                if (m.kvmSetSpteHva != null && Object.hasOwnProperty.call(m, "kvmSetSpteHva"))
                    $root.perfetto.protos.KvmSetSpteHvaFtraceEvent.encode(m.kvmSetSpteHva, w.uint32(3106).fork()).ldelim();
                if (m.kvmSetWayFlush != null && Object.hasOwnProperty.call(m, "kvmSetWayFlush"))
                    $root.perfetto.protos.KvmSetWayFlushFtraceEvent.encode(m.kvmSetWayFlush, w.uint32(3114).fork()).ldelim();
                if (m.kvmSysAccess != null && Object.hasOwnProperty.call(m, "kvmSysAccess"))
                    $root.perfetto.protos.KvmSysAccessFtraceEvent.encode(m.kvmSysAccess, w.uint32(3122).fork()).ldelim();
                if (m.kvmTestAgeHva != null && Object.hasOwnProperty.call(m, "kvmTestAgeHva"))
                    $root.perfetto.protos.KvmTestAgeHvaFtraceEvent.encode(m.kvmTestAgeHva, w.uint32(3130).fork()).ldelim();
                if (m.kvmTimerEmulate != null && Object.hasOwnProperty.call(m, "kvmTimerEmulate"))
                    $root.perfetto.protos.KvmTimerEmulateFtraceEvent.encode(m.kvmTimerEmulate, w.uint32(3138).fork()).ldelim();
                if (m.kvmTimerHrtimerExpire != null && Object.hasOwnProperty.call(m, "kvmTimerHrtimerExpire"))
                    $root.perfetto.protos.KvmTimerHrtimerExpireFtraceEvent.encode(m.kvmTimerHrtimerExpire, w.uint32(3146).fork()).ldelim();
                if (m.kvmTimerRestoreState != null && Object.hasOwnProperty.call(m, "kvmTimerRestoreState"))
                    $root.perfetto.protos.KvmTimerRestoreStateFtraceEvent.encode(m.kvmTimerRestoreState, w.uint32(3154).fork()).ldelim();
                if (m.kvmTimerSaveState != null && Object.hasOwnProperty.call(m, "kvmTimerSaveState"))
                    $root.perfetto.protos.KvmTimerSaveStateFtraceEvent.encode(m.kvmTimerSaveState, w.uint32(3162).fork()).ldelim();
                if (m.kvmTimerUpdateIrq != null && Object.hasOwnProperty.call(m, "kvmTimerUpdateIrq"))
                    $root.perfetto.protos.KvmTimerUpdateIrqFtraceEvent.encode(m.kvmTimerUpdateIrq, w.uint32(3170).fork()).ldelim();
                if (m.kvmToggleCache != null && Object.hasOwnProperty.call(m, "kvmToggleCache"))
                    $root.perfetto.protos.KvmToggleCacheFtraceEvent.encode(m.kvmToggleCache, w.uint32(3178).fork()).ldelim();
                if (m.kvmUnmapHvaRange != null && Object.hasOwnProperty.call(m, "kvmUnmapHvaRange"))
                    $root.perfetto.protos.KvmUnmapHvaRangeFtraceEvent.encode(m.kvmUnmapHvaRange, w.uint32(3186).fork()).ldelim();
                if (m.kvmUserspaceExit != null && Object.hasOwnProperty.call(m, "kvmUserspaceExit"))
                    $root.perfetto.protos.KvmUserspaceExitFtraceEvent.encode(m.kvmUserspaceExit, w.uint32(3194).fork()).ldelim();
                if (m.kvmVcpuWakeup != null && Object.hasOwnProperty.call(m, "kvmVcpuWakeup"))
                    $root.perfetto.protos.KvmVcpuWakeupFtraceEvent.encode(m.kvmVcpuWakeup, w.uint32(3202).fork()).ldelim();
                if (m.kvmWfxArm64 != null && Object.hasOwnProperty.call(m, "kvmWfxArm64"))
                    $root.perfetto.protos.KvmWfxArm64FtraceEvent.encode(m.kvmWfxArm64, w.uint32(3210).fork()).ldelim();
                if (m.trapReg != null && Object.hasOwnProperty.call(m, "trapReg"))
                    $root.perfetto.protos.TrapRegFtraceEvent.encode(m.trapReg, w.uint32(3218).fork()).ldelim();
                if (m.vgicUpdateIrqPending != null && Object.hasOwnProperty.call(m, "vgicUpdateIrqPending"))
                    $root.perfetto.protos.VgicUpdateIrqPendingFtraceEvent.encode(m.vgicUpdateIrqPending, w.uint32(3226).fork()).ldelim();
                if (m.wakeupSourceActivate != null && Object.hasOwnProperty.call(m, "wakeupSourceActivate"))
                    $root.perfetto.protos.WakeupSourceActivateFtraceEvent.encode(m.wakeupSourceActivate, w.uint32(3234).fork()).ldelim();
                if (m.wakeupSourceDeactivate != null && Object.hasOwnProperty.call(m, "wakeupSourceDeactivate"))
                    $root.perfetto.protos.WakeupSourceDeactivateFtraceEvent.encode(m.wakeupSourceDeactivate, w.uint32(3242).fork()).ldelim();
                if (m.ufshcdCommand != null && Object.hasOwnProperty.call(m, "ufshcdCommand"))
                    $root.perfetto.protos.UfshcdCommandFtraceEvent.encode(m.ufshcdCommand, w.uint32(3250).fork()).ldelim();
                if (m.ufshcdClkGating != null && Object.hasOwnProperty.call(m, "ufshcdClkGating"))
                    $root.perfetto.protos.UfshcdClkGatingFtraceEvent.encode(m.ufshcdClkGating, w.uint32(3258).fork()).ldelim();
                if (m.console != null && Object.hasOwnProperty.call(m, "console"))
                    $root.perfetto.protos.ConsoleFtraceEvent.encode(m.console, w.uint32(3266).fork()).ldelim();
                if (m.drmVblankEvent != null && Object.hasOwnProperty.call(m, "drmVblankEvent"))
                    $root.perfetto.protos.DrmVblankEventFtraceEvent.encode(m.drmVblankEvent, w.uint32(3274).fork()).ldelim();
                if (m.drmVblankEventDelivered != null && Object.hasOwnProperty.call(m, "drmVblankEventDelivered"))
                    $root.perfetto.protos.DrmVblankEventDeliveredFtraceEvent.encode(m.drmVblankEventDelivered, w.uint32(3282).fork()).ldelim();
                if (m.drmSchedJob != null && Object.hasOwnProperty.call(m, "drmSchedJob"))
                    $root.perfetto.protos.DrmSchedJobFtraceEvent.encode(m.drmSchedJob, w.uint32(3290).fork()).ldelim();
                if (m.drmRunJob != null && Object.hasOwnProperty.call(m, "drmRunJob"))
                    $root.perfetto.protos.DrmRunJobFtraceEvent.encode(m.drmRunJob, w.uint32(3298).fork()).ldelim();
                if (m.drmSchedProcessJob != null && Object.hasOwnProperty.call(m, "drmSchedProcessJob"))
                    $root.perfetto.protos.DrmSchedProcessJobFtraceEvent.encode(m.drmSchedProcessJob, w.uint32(3306).fork()).ldelim();
                if (m.dmaFenceInit != null && Object.hasOwnProperty.call(m, "dmaFenceInit"))
                    $root.perfetto.protos.DmaFenceInitFtraceEvent.encode(m.dmaFenceInit, w.uint32(3314).fork()).ldelim();
                if (m.dmaFenceEmit != null && Object.hasOwnProperty.call(m, "dmaFenceEmit"))
                    $root.perfetto.protos.DmaFenceEmitFtraceEvent.encode(m.dmaFenceEmit, w.uint32(3322).fork()).ldelim();
                if (m.dmaFenceSignaled != null && Object.hasOwnProperty.call(m, "dmaFenceSignaled"))
                    $root.perfetto.protos.DmaFenceSignaledFtraceEvent.encode(m.dmaFenceSignaled, w.uint32(3330).fork()).ldelim();
                if (m.dmaFenceWaitStart != null && Object.hasOwnProperty.call(m, "dmaFenceWaitStart"))
                    $root.perfetto.protos.DmaFenceWaitStartFtraceEvent.encode(m.dmaFenceWaitStart, w.uint32(3338).fork()).ldelim();
                if (m.dmaFenceWaitEnd != null && Object.hasOwnProperty.call(m, "dmaFenceWaitEnd"))
                    $root.perfetto.protos.DmaFenceWaitEndFtraceEvent.encode(m.dmaFenceWaitEnd, w.uint32(3346).fork()).ldelim();
                if (m.f2fsIostat != null && Object.hasOwnProperty.call(m, "f2fsIostat"))
                    $root.perfetto.protos.F2fsIostatFtraceEvent.encode(m.f2fsIostat, w.uint32(3354).fork()).ldelim();
                if (m.f2fsIostatLatency != null && Object.hasOwnProperty.call(m, "f2fsIostatLatency"))
                    $root.perfetto.protos.F2fsIostatLatencyFtraceEvent.encode(m.f2fsIostatLatency, w.uint32(3362).fork()).ldelim();
                if (m.schedCpuUtilCfs != null && Object.hasOwnProperty.call(m, "schedCpuUtilCfs"))
                    $root.perfetto.protos.SchedCpuUtilCfsFtraceEvent.encode(m.schedCpuUtilCfs, w.uint32(3370).fork()).ldelim();
                if (m.v4l2Qbuf != null && Object.hasOwnProperty.call(m, "v4l2Qbuf"))
                    $root.perfetto.protos.V4l2QbufFtraceEvent.encode(m.v4l2Qbuf, w.uint32(3378).fork()).ldelim();
                if (m.v4l2Dqbuf != null && Object.hasOwnProperty.call(m, "v4l2Dqbuf"))
                    $root.perfetto.protos.V4l2DqbufFtraceEvent.encode(m.v4l2Dqbuf, w.uint32(3386).fork()).ldelim();
                if (m.vb2V4l2BufQueue != null && Object.hasOwnProperty.call(m, "vb2V4l2BufQueue"))
                    $root.perfetto.protos.Vb2V4l2BufQueueFtraceEvent.encode(m.vb2V4l2BufQueue, w.uint32(3394).fork()).ldelim();
                if (m.vb2V4l2BufDone != null && Object.hasOwnProperty.call(m, "vb2V4l2BufDone"))
                    $root.perfetto.protos.Vb2V4l2BufDoneFtraceEvent.encode(m.vb2V4l2BufDone, w.uint32(3402).fork()).ldelim();
                if (m.vb2V4l2Qbuf != null && Object.hasOwnProperty.call(m, "vb2V4l2Qbuf"))
                    $root.perfetto.protos.Vb2V4l2QbufFtraceEvent.encode(m.vb2V4l2Qbuf, w.uint32(3410).fork()).ldelim();
                if (m.vb2V4l2Dqbuf != null && Object.hasOwnProperty.call(m, "vb2V4l2Dqbuf"))
                    $root.perfetto.protos.Vb2V4l2DqbufFtraceEvent.encode(m.vb2V4l2Dqbuf, w.uint32(3418).fork()).ldelim();
                if (m.dsiCmdFifoStatus != null && Object.hasOwnProperty.call(m, "dsiCmdFifoStatus"))
                    $root.perfetto.protos.DsiCmdFifoStatusFtraceEvent.encode(m.dsiCmdFifoStatus, w.uint32(3426).fork()).ldelim();
                if (m.dsiRx != null && Object.hasOwnProperty.call(m, "dsiRx"))
                    $root.perfetto.protos.DsiRxFtraceEvent.encode(m.dsiRx, w.uint32(3434).fork()).ldelim();
                if (m.dsiTx != null && Object.hasOwnProperty.call(m, "dsiTx"))
                    $root.perfetto.protos.DsiTxFtraceEvent.encode(m.dsiTx, w.uint32(3442).fork()).ldelim();
                if (m.androidFsDatareadEnd != null && Object.hasOwnProperty.call(m, "androidFsDatareadEnd"))
                    $root.perfetto.protos.AndroidFsDatareadEndFtraceEvent.encode(m.androidFsDatareadEnd, w.uint32(3450).fork()).ldelim();
                if (m.androidFsDatareadStart != null && Object.hasOwnProperty.call(m, "androidFsDatareadStart"))
                    $root.perfetto.protos.AndroidFsDatareadStartFtraceEvent.encode(m.androidFsDatareadStart, w.uint32(3458).fork()).ldelim();
                if (m.androidFsDatawriteEnd != null && Object.hasOwnProperty.call(m, "androidFsDatawriteEnd"))
                    $root.perfetto.protos.AndroidFsDatawriteEndFtraceEvent.encode(m.androidFsDatawriteEnd, w.uint32(3466).fork()).ldelim();
                if (m.androidFsDatawriteStart != null && Object.hasOwnProperty.call(m, "androidFsDatawriteStart"))
                    $root.perfetto.protos.AndroidFsDatawriteStartFtraceEvent.encode(m.androidFsDatawriteStart, w.uint32(3474).fork()).ldelim();
                if (m.androidFsFsyncEnd != null && Object.hasOwnProperty.call(m, "androidFsFsyncEnd"))
                    $root.perfetto.protos.AndroidFsFsyncEndFtraceEvent.encode(m.androidFsFsyncEnd, w.uint32(3482).fork()).ldelim();
                if (m.androidFsFsyncStart != null && Object.hasOwnProperty.call(m, "androidFsFsyncStart"))
                    $root.perfetto.protos.AndroidFsFsyncStartFtraceEvent.encode(m.androidFsFsyncStart, w.uint32(3490).fork()).ldelim();
                if (m.funcgraphEntry != null && Object.hasOwnProperty.call(m, "funcgraphEntry"))
                    $root.perfetto.protos.FuncgraphEntryFtraceEvent.encode(m.funcgraphEntry, w.uint32(3498).fork()).ldelim();
                if (m.funcgraphExit != null && Object.hasOwnProperty.call(m, "funcgraphExit"))
                    $root.perfetto.protos.FuncgraphExitFtraceEvent.encode(m.funcgraphExit, w.uint32(3506).fork()).ldelim();
                if (m.virtioVideoCmd != null && Object.hasOwnProperty.call(m, "virtioVideoCmd"))
                    $root.perfetto.protos.VirtioVideoCmdFtraceEvent.encode(m.virtioVideoCmd, w.uint32(3514).fork()).ldelim();
                if (m.virtioVideoCmdDone != null && Object.hasOwnProperty.call(m, "virtioVideoCmdDone"))
                    $root.perfetto.protos.VirtioVideoCmdDoneFtraceEvent.encode(m.virtioVideoCmdDone, w.uint32(3522).fork()).ldelim();
                if (m.virtioVideoResourceQueue != null && Object.hasOwnProperty.call(m, "virtioVideoResourceQueue"))
                    $root.perfetto.protos.VirtioVideoResourceQueueFtraceEvent.encode(m.virtioVideoResourceQueue, w.uint32(3530).fork()).ldelim();
                if (m.virtioVideoResourceQueueDone != null && Object.hasOwnProperty.call(m, "virtioVideoResourceQueueDone"))
                    $root.perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent.encode(m.virtioVideoResourceQueueDone, w.uint32(3538).fork()).ldelim();
                if (m.mmShrinkSlabStart != null && Object.hasOwnProperty.call(m, "mmShrinkSlabStart"))
                    $root.perfetto.protos.MmShrinkSlabStartFtraceEvent.encode(m.mmShrinkSlabStart, w.uint32(3546).fork()).ldelim();
                if (m.mmShrinkSlabEnd != null && Object.hasOwnProperty.call(m, "mmShrinkSlabEnd"))
                    $root.perfetto.protos.MmShrinkSlabEndFtraceEvent.encode(m.mmShrinkSlabEnd, w.uint32(3554).fork()).ldelim();
                if (m.trustySmc != null && Object.hasOwnProperty.call(m, "trustySmc"))
                    $root.perfetto.protos.TrustySmcFtraceEvent.encode(m.trustySmc, w.uint32(3562).fork()).ldelim();
                if (m.trustySmcDone != null && Object.hasOwnProperty.call(m, "trustySmcDone"))
                    $root.perfetto.protos.TrustySmcDoneFtraceEvent.encode(m.trustySmcDone, w.uint32(3570).fork()).ldelim();
                if (m.trustyStdCall32 != null && Object.hasOwnProperty.call(m, "trustyStdCall32"))
                    $root.perfetto.protos.TrustyStdCall32FtraceEvent.encode(m.trustyStdCall32, w.uint32(3578).fork()).ldelim();
                if (m.trustyStdCall32Done != null && Object.hasOwnProperty.call(m, "trustyStdCall32Done"))
                    $root.perfetto.protos.TrustyStdCall32DoneFtraceEvent.encode(m.trustyStdCall32Done, w.uint32(3586).fork()).ldelim();
                if (m.trustyShareMemory != null && Object.hasOwnProperty.call(m, "trustyShareMemory"))
                    $root.perfetto.protos.TrustyShareMemoryFtraceEvent.encode(m.trustyShareMemory, w.uint32(3594).fork()).ldelim();
                if (m.trustyShareMemoryDone != null && Object.hasOwnProperty.call(m, "trustyShareMemoryDone"))
                    $root.perfetto.protos.TrustyShareMemoryDoneFtraceEvent.encode(m.trustyShareMemoryDone, w.uint32(3602).fork()).ldelim();
                if (m.trustyReclaimMemory != null && Object.hasOwnProperty.call(m, "trustyReclaimMemory"))
                    $root.perfetto.protos.TrustyReclaimMemoryFtraceEvent.encode(m.trustyReclaimMemory, w.uint32(3610).fork()).ldelim();
                if (m.trustyReclaimMemoryDone != null && Object.hasOwnProperty.call(m, "trustyReclaimMemoryDone"))
                    $root.perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent.encode(m.trustyReclaimMemoryDone, w.uint32(3618).fork()).ldelim();
                if (m.trustyIrq != null && Object.hasOwnProperty.call(m, "trustyIrq"))
                    $root.perfetto.protos.TrustyIrqFtraceEvent.encode(m.trustyIrq, w.uint32(3626).fork()).ldelim();
                if (m.trustyIpcHandleEvent != null && Object.hasOwnProperty.call(m, "trustyIpcHandleEvent"))
                    $root.perfetto.protos.TrustyIpcHandleEventFtraceEvent.encode(m.trustyIpcHandleEvent, w.uint32(3634).fork()).ldelim();
                if (m.trustyIpcConnect != null && Object.hasOwnProperty.call(m, "trustyIpcConnect"))
                    $root.perfetto.protos.TrustyIpcConnectFtraceEvent.encode(m.trustyIpcConnect, w.uint32(3642).fork()).ldelim();
                if (m.trustyIpcConnectEnd != null && Object.hasOwnProperty.call(m, "trustyIpcConnectEnd"))
                    $root.perfetto.protos.TrustyIpcConnectEndFtraceEvent.encode(m.trustyIpcConnectEnd, w.uint32(3650).fork()).ldelim();
                if (m.trustyIpcWrite != null && Object.hasOwnProperty.call(m, "trustyIpcWrite"))
                    $root.perfetto.protos.TrustyIpcWriteFtraceEvent.encode(m.trustyIpcWrite, w.uint32(3658).fork()).ldelim();
                if (m.trustyIpcPoll != null && Object.hasOwnProperty.call(m, "trustyIpcPoll"))
                    $root.perfetto.protos.TrustyIpcPollFtraceEvent.encode(m.trustyIpcPoll, w.uint32(3666).fork()).ldelim();
                if (m.trustyIpcPollEnd != null && Object.hasOwnProperty.call(m, "trustyIpcPollEnd"))
                    $root.perfetto.protos.TrustyIpcPollEndFtraceEvent.encode(m.trustyIpcPollEnd, w.uint32(3674).fork()).ldelim();
                if (m.trustyIpcRead != null && Object.hasOwnProperty.call(m, "trustyIpcRead"))
                    $root.perfetto.protos.TrustyIpcReadFtraceEvent.encode(m.trustyIpcRead, w.uint32(3682).fork()).ldelim();
                if (m.trustyIpcReadEnd != null && Object.hasOwnProperty.call(m, "trustyIpcReadEnd"))
                    $root.perfetto.protos.TrustyIpcReadEndFtraceEvent.encode(m.trustyIpcReadEnd, w.uint32(3690).fork()).ldelim();
                if (m.trustyIpcRx != null && Object.hasOwnProperty.call(m, "trustyIpcRx"))
                    $root.perfetto.protos.TrustyIpcRxFtraceEvent.encode(m.trustyIpcRx, w.uint32(3698).fork()).ldelim();
                if (m.trustyIpcTx != null && Object.hasOwnProperty.call(m, "trustyIpcTx"))
                    $root.perfetto.protos.TrustyIpcTxFtraceEvent.encode(m.trustyIpcTx, w.uint32(3706).fork()).ldelim();
                if (m.trustyEnqueueNop != null && Object.hasOwnProperty.call(m, "trustyEnqueueNop"))
                    $root.perfetto.protos.TrustyEnqueueNopFtraceEvent.encode(m.trustyEnqueueNop, w.uint32(3714).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified FtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.FtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.FtraceEvent
             * @static
             * @param {perfetto.protos.IFtraceEvent} message FtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a FtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.FtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.FtraceEvent} FtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.timestamp = r.uint64();
                        break;
                    case 2:
                        m.pid = r.uint32();
                        break;
                    case 3:
                        m.print = $root.perfetto.protos.PrintFtraceEvent.decode(r, r.uint32());
                        break;
                    case 4:
                        m.schedSwitch = $root.perfetto.protos.SchedSwitchFtraceEvent.decode(r, r.uint32());
                        break;
                    case 11:
                        m.cpuFrequency = $root.perfetto.protos.CpuFrequencyFtraceEvent.decode(r, r.uint32());
                        break;
                    case 12:
                        m.cpuFrequencyLimits = $root.perfetto.protos.CpuFrequencyLimitsFtraceEvent.decode(r, r.uint32());
                        break;
                    case 13:
                        m.cpuIdle = $root.perfetto.protos.CpuIdleFtraceEvent.decode(r, r.uint32());
                        break;
                    case 14:
                        m.clockEnable = $root.perfetto.protos.ClockEnableFtraceEvent.decode(r, r.uint32());
                        break;
                    case 15:
                        m.clockDisable = $root.perfetto.protos.ClockDisableFtraceEvent.decode(r, r.uint32());
                        break;
                    case 16:
                        m.clockSetRate = $root.perfetto.protos.ClockSetRateFtraceEvent.decode(r, r.uint32());
                        break;
                    case 17:
                        m.schedWakeup = $root.perfetto.protos.SchedWakeupFtraceEvent.decode(r, r.uint32());
                        break;
                    case 18:
                        m.schedBlockedReason = $root.perfetto.protos.SchedBlockedReasonFtraceEvent.decode(r, r.uint32());
                        break;
                    case 19:
                        m.schedCpuHotplug = $root.perfetto.protos.SchedCpuHotplugFtraceEvent.decode(r, r.uint32());
                        break;
                    case 20:
                        m.schedWaking = $root.perfetto.protos.SchedWakingFtraceEvent.decode(r, r.uint32());
                        break;
                    case 21:
                        m.ipiEntry = $root.perfetto.protos.IpiEntryFtraceEvent.decode(r, r.uint32());
                        break;
                    case 22:
                        m.ipiExit = $root.perfetto.protos.IpiExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 23:
                        m.ipiRaise = $root.perfetto.protos.IpiRaiseFtraceEvent.decode(r, r.uint32());
                        break;
                    case 24:
                        m.softirqEntry = $root.perfetto.protos.SoftirqEntryFtraceEvent.decode(r, r.uint32());
                        break;
                    case 25:
                        m.softirqExit = $root.perfetto.protos.SoftirqExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 26:
                        m.softirqRaise = $root.perfetto.protos.SoftirqRaiseFtraceEvent.decode(r, r.uint32());
                        break;
                    case 27:
                        m.i2cRead = $root.perfetto.protos.I2cReadFtraceEvent.decode(r, r.uint32());
                        break;
                    case 28:
                        m.i2cWrite = $root.perfetto.protos.I2cWriteFtraceEvent.decode(r, r.uint32());
                        break;
                    case 29:
                        m.i2cResult = $root.perfetto.protos.I2cResultFtraceEvent.decode(r, r.uint32());
                        break;
                    case 30:
                        m.i2cReply = $root.perfetto.protos.I2cReplyFtraceEvent.decode(r, r.uint32());
                        break;
                    case 31:
                        m.smbusRead = $root.perfetto.protos.SmbusReadFtraceEvent.decode(r, r.uint32());
                        break;
                    case 32:
                        m.smbusWrite = $root.perfetto.protos.SmbusWriteFtraceEvent.decode(r, r.uint32());
                        break;
                    case 33:
                        m.smbusResult = $root.perfetto.protos.SmbusResultFtraceEvent.decode(r, r.uint32());
                        break;
                    case 34:
                        m.smbusReply = $root.perfetto.protos.SmbusReplyFtraceEvent.decode(r, r.uint32());
                        break;
                    case 35:
                        m.lowmemoryKill = $root.perfetto.protos.LowmemoryKillFtraceEvent.decode(r, r.uint32());
                        break;
                    case 36:
                        m.irqHandlerEntry = $root.perfetto.protos.IrqHandlerEntryFtraceEvent.decode(r, r.uint32());
                        break;
                    case 37:
                        m.irqHandlerExit = $root.perfetto.protos.IrqHandlerExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 38:
                        m.syncPt = $root.perfetto.protos.SyncPtFtraceEvent.decode(r, r.uint32());
                        break;
                    case 39:
                        m.syncTimeline = $root.perfetto.protos.SyncTimelineFtraceEvent.decode(r, r.uint32());
                        break;
                    case 40:
                        m.syncWait = $root.perfetto.protos.SyncWaitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 41:
                        m.ext4DaWriteBegin = $root.perfetto.protos.Ext4DaWriteBeginFtraceEvent.decode(r, r.uint32());
                        break;
                    case 42:
                        m.ext4DaWriteEnd = $root.perfetto.protos.Ext4DaWriteEndFtraceEvent.decode(r, r.uint32());
                        break;
                    case 43:
                        m.ext4SyncFileEnter = $root.perfetto.protos.Ext4SyncFileEnterFtraceEvent.decode(r, r.uint32());
                        break;
                    case 44:
                        m.ext4SyncFileExit = $root.perfetto.protos.Ext4SyncFileExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 45:
                        m.blockRqIssue = $root.perfetto.protos.BlockRqIssueFtraceEvent.decode(r, r.uint32());
                        break;
                    case 46:
                        m.mmVmscanDirectReclaimBegin = $root.perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent.decode(r, r.uint32());
                        break;
                    case 47:
                        m.mmVmscanDirectReclaimEnd = $root.perfetto.protos.MmVmscanDirectReclaimEndFtraceEvent.decode(r, r.uint32());
                        break;
                    case 48:
                        m.mmVmscanKswapdWake = $root.perfetto.protos.MmVmscanKswapdWakeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 49:
                        m.mmVmscanKswapdSleep = $root.perfetto.protos.MmVmscanKswapdSleepFtraceEvent.decode(r, r.uint32());
                        break;
                    case 50:
                        m.binderTransaction = $root.perfetto.protos.BinderTransactionFtraceEvent.decode(r, r.uint32());
                        break;
                    case 51:
                        m.binderTransactionReceived = $root.perfetto.protos.BinderTransactionReceivedFtraceEvent.decode(r, r.uint32());
                        break;
                    case 52:
                        m.binderSetPriority = $root.perfetto.protos.BinderSetPriorityFtraceEvent.decode(r, r.uint32());
                        break;
                    case 53:
                        m.binderLock = $root.perfetto.protos.BinderLockFtraceEvent.decode(r, r.uint32());
                        break;
                    case 54:
                        m.binderLocked = $root.perfetto.protos.BinderLockedFtraceEvent.decode(r, r.uint32());
                        break;
                    case 55:
                        m.binderUnlock = $root.perfetto.protos.BinderUnlockFtraceEvent.decode(r, r.uint32());
                        break;
                    case 56:
                        m.workqueueActivateWork = $root.perfetto.protos.WorkqueueActivateWorkFtraceEvent.decode(r, r.uint32());
                        break;
                    case 57:
                        m.workqueueExecuteEnd = $root.perfetto.protos.WorkqueueExecuteEndFtraceEvent.decode(r, r.uint32());
                        break;
                    case 58:
                        m.workqueueExecuteStart = $root.perfetto.protos.WorkqueueExecuteStartFtraceEvent.decode(r, r.uint32());
                        break;
                    case 59:
                        m.workqueueQueueWork = $root.perfetto.protos.WorkqueueQueueWorkFtraceEvent.decode(r, r.uint32());
                        break;
                    case 60:
                        m.regulatorDisable = $root.perfetto.protos.RegulatorDisableFtraceEvent.decode(r, r.uint32());
                        break;
                    case 61:
                        m.regulatorDisableComplete = $root.perfetto.protos.RegulatorDisableCompleteFtraceEvent.decode(r, r.uint32());
                        break;
                    case 62:
                        m.regulatorEnable = $root.perfetto.protos.RegulatorEnableFtraceEvent.decode(r, r.uint32());
                        break;
                    case 63:
                        m.regulatorEnableComplete = $root.perfetto.protos.RegulatorEnableCompleteFtraceEvent.decode(r, r.uint32());
                        break;
                    case 64:
                        m.regulatorEnableDelay = $root.perfetto.protos.RegulatorEnableDelayFtraceEvent.decode(r, r.uint32());
                        break;
                    case 65:
                        m.regulatorSetVoltage = $root.perfetto.protos.RegulatorSetVoltageFtraceEvent.decode(r, r.uint32());
                        break;
                    case 66:
                        m.regulatorSetVoltageComplete = $root.perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent.decode(r, r.uint32());
                        break;
                    case 67:
                        m.cgroupAttachTask = $root.perfetto.protos.CgroupAttachTaskFtraceEvent.decode(r, r.uint32());
                        break;
                    case 68:
                        m.cgroupMkdir = $root.perfetto.protos.CgroupMkdirFtraceEvent.decode(r, r.uint32());
                        break;
                    case 69:
                        m.cgroupRemount = $root.perfetto.protos.CgroupRemountFtraceEvent.decode(r, r.uint32());
                        break;
                    case 70:
                        m.cgroupRmdir = $root.perfetto.protos.CgroupRmdirFtraceEvent.decode(r, r.uint32());
                        break;
                    case 71:
                        m.cgroupTransferTasks = $root.perfetto.protos.CgroupTransferTasksFtraceEvent.decode(r, r.uint32());
                        break;
                    case 72:
                        m.cgroupDestroyRoot = $root.perfetto.protos.CgroupDestroyRootFtraceEvent.decode(r, r.uint32());
                        break;
                    case 73:
                        m.cgroupRelease = $root.perfetto.protos.CgroupReleaseFtraceEvent.decode(r, r.uint32());
                        break;
                    case 74:
                        m.cgroupRename = $root.perfetto.protos.CgroupRenameFtraceEvent.decode(r, r.uint32());
                        break;
                    case 75:
                        m.cgroupSetupRoot = $root.perfetto.protos.CgroupSetupRootFtraceEvent.decode(r, r.uint32());
                        break;
                    case 76:
                        m.mdpCmdKickoff = $root.perfetto.protos.MdpCmdKickoffFtraceEvent.decode(r, r.uint32());
                        break;
                    case 77:
                        m.mdpCommit = $root.perfetto.protos.MdpCommitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 78:
                        m.mdpPerfSetOt = $root.perfetto.protos.MdpPerfSetOtFtraceEvent.decode(r, r.uint32());
                        break;
                    case 79:
                        m.mdpSsppChange = $root.perfetto.protos.MdpSsppChangeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 80:
                        m.tracingMarkWrite = $root.perfetto.protos.TracingMarkWriteFtraceEvent.decode(r, r.uint32());
                        break;
                    case 81:
                        m.mdpCmdPingpongDone = $root.perfetto.protos.MdpCmdPingpongDoneFtraceEvent.decode(r, r.uint32());
                        break;
                    case 82:
                        m.mdpCompareBw = $root.perfetto.protos.MdpCompareBwFtraceEvent.decode(r, r.uint32());
                        break;
                    case 83:
                        m.mdpPerfSetPanicLuts = $root.perfetto.protos.MdpPerfSetPanicLutsFtraceEvent.decode(r, r.uint32());
                        break;
                    case 84:
                        m.mdpSsppSet = $root.perfetto.protos.MdpSsppSetFtraceEvent.decode(r, r.uint32());
                        break;
                    case 85:
                        m.mdpCmdReadptrDone = $root.perfetto.protos.MdpCmdReadptrDoneFtraceEvent.decode(r, r.uint32());
                        break;
                    case 86:
                        m.mdpMisrCrc = $root.perfetto.protos.MdpMisrCrcFtraceEvent.decode(r, r.uint32());
                        break;
                    case 87:
                        m.mdpPerfSetQosLuts = $root.perfetto.protos.MdpPerfSetQosLutsFtraceEvent.decode(r, r.uint32());
                        break;
                    case 88:
                        m.mdpTraceCounter = $root.perfetto.protos.MdpTraceCounterFtraceEvent.decode(r, r.uint32());
                        break;
                    case 89:
                        m.mdpCmdReleaseBw = $root.perfetto.protos.MdpCmdReleaseBwFtraceEvent.decode(r, r.uint32());
                        break;
                    case 90:
                        m.mdpMixerUpdate = $root.perfetto.protos.MdpMixerUpdateFtraceEvent.decode(r, r.uint32());
                        break;
                    case 91:
                        m.mdpPerfSetWmLevels = $root.perfetto.protos.MdpPerfSetWmLevelsFtraceEvent.decode(r, r.uint32());
                        break;
                    case 92:
                        m.mdpVideoUnderrunDone = $root.perfetto.protos.MdpVideoUnderrunDoneFtraceEvent.decode(r, r.uint32());
                        break;
                    case 93:
                        m.mdpCmdWaitPingpong = $root.perfetto.protos.MdpCmdWaitPingpongFtraceEvent.decode(r, r.uint32());
                        break;
                    case 94:
                        m.mdpPerfPrefillCalc = $root.perfetto.protos.MdpPerfPrefillCalcFtraceEvent.decode(r, r.uint32());
                        break;
                    case 95:
                        m.mdpPerfUpdateBus = $root.perfetto.protos.MdpPerfUpdateBusFtraceEvent.decode(r, r.uint32());
                        break;
                    case 96:
                        m.rotatorBwAoAsContext = $root.perfetto.protos.RotatorBwAoAsContextFtraceEvent.decode(r, r.uint32());
                        break;
                    case 97:
                        m.mmFilemapAddToPageCache = $root.perfetto.protos.MmFilemapAddToPageCacheFtraceEvent.decode(r, r.uint32());
                        break;
                    case 98:
                        m.mmFilemapDeleteFromPageCache = $root.perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent.decode(r, r.uint32());
                        break;
                    case 99:
                        m.mmCompactionBegin = $root.perfetto.protos.MmCompactionBeginFtraceEvent.decode(r, r.uint32());
                        break;
                    case 100:
                        m.mmCompactionDeferCompaction = $root.perfetto.protos.MmCompactionDeferCompactionFtraceEvent.decode(r, r.uint32());
                        break;
                    case 101:
                        m.mmCompactionDeferred = $root.perfetto.protos.MmCompactionDeferredFtraceEvent.decode(r, r.uint32());
                        break;
                    case 102:
                        m.mmCompactionDeferReset = $root.perfetto.protos.MmCompactionDeferResetFtraceEvent.decode(r, r.uint32());
                        break;
                    case 103:
                        m.mmCompactionEnd = $root.perfetto.protos.MmCompactionEndFtraceEvent.decode(r, r.uint32());
                        break;
                    case 104:
                        m.mmCompactionFinished = $root.perfetto.protos.MmCompactionFinishedFtraceEvent.decode(r, r.uint32());
                        break;
                    case 105:
                        m.mmCompactionIsolateFreepages = $root.perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent.decode(r, r.uint32());
                        break;
                    case 106:
                        m.mmCompactionIsolateMigratepages = $root.perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent.decode(r, r.uint32());
                        break;
                    case 107:
                        m.mmCompactionKcompactdSleep = $root.perfetto.protos.MmCompactionKcompactdSleepFtraceEvent.decode(r, r.uint32());
                        break;
                    case 108:
                        m.mmCompactionKcompactdWake = $root.perfetto.protos.MmCompactionKcompactdWakeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 109:
                        m.mmCompactionMigratepages = $root.perfetto.protos.MmCompactionMigratepagesFtraceEvent.decode(r, r.uint32());
                        break;
                    case 110:
                        m.mmCompactionSuitable = $root.perfetto.protos.MmCompactionSuitableFtraceEvent.decode(r, r.uint32());
                        break;
                    case 111:
                        m.mmCompactionTryToCompactPages = $root.perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent.decode(r, r.uint32());
                        break;
                    case 112:
                        m.mmCompactionWakeupKcompactd = $root.perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent.decode(r, r.uint32());
                        break;
                    case 113:
                        m.suspendResume = $root.perfetto.protos.SuspendResumeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 114:
                        m.schedWakeupNew = $root.perfetto.protos.SchedWakeupNewFtraceEvent.decode(r, r.uint32());
                        break;
                    case 115:
                        m.blockBioBackmerge = $root.perfetto.protos.BlockBioBackmergeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 116:
                        m.blockBioBounce = $root.perfetto.protos.BlockBioBounceFtraceEvent.decode(r, r.uint32());
                        break;
                    case 117:
                        m.blockBioComplete = $root.perfetto.protos.BlockBioCompleteFtraceEvent.decode(r, r.uint32());
                        break;
                    case 118:
                        m.blockBioFrontmerge = $root.perfetto.protos.BlockBioFrontmergeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 119:
                        m.blockBioQueue = $root.perfetto.protos.BlockBioQueueFtraceEvent.decode(r, r.uint32());
                        break;
                    case 120:
                        m.blockBioRemap = $root.perfetto.protos.BlockBioRemapFtraceEvent.decode(r, r.uint32());
                        break;
                    case 121:
                        m.blockDirtyBuffer = $root.perfetto.protos.BlockDirtyBufferFtraceEvent.decode(r, r.uint32());
                        break;
                    case 122:
                        m.blockGetrq = $root.perfetto.protos.BlockGetrqFtraceEvent.decode(r, r.uint32());
                        break;
                    case 123:
                        m.blockPlug = $root.perfetto.protos.BlockPlugFtraceEvent.decode(r, r.uint32());
                        break;
                    case 124:
                        m.blockRqAbort = $root.perfetto.protos.BlockRqAbortFtraceEvent.decode(r, r.uint32());
                        break;
                    case 125:
                        m.blockRqComplete = $root.perfetto.protos.BlockRqCompleteFtraceEvent.decode(r, r.uint32());
                        break;
                    case 126:
                        m.blockRqInsert = $root.perfetto.protos.BlockRqInsertFtraceEvent.decode(r, r.uint32());
                        break;
                    case 128:
                        m.blockRqRemap = $root.perfetto.protos.BlockRqRemapFtraceEvent.decode(r, r.uint32());
                        break;
                    case 129:
                        m.blockRqRequeue = $root.perfetto.protos.BlockRqRequeueFtraceEvent.decode(r, r.uint32());
                        break;
                    case 130:
                        m.blockSleeprq = $root.perfetto.protos.BlockSleeprqFtraceEvent.decode(r, r.uint32());
                        break;
                    case 131:
                        m.blockSplit = $root.perfetto.protos.BlockSplitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 132:
                        m.blockTouchBuffer = $root.perfetto.protos.BlockTouchBufferFtraceEvent.decode(r, r.uint32());
                        break;
                    case 133:
                        m.blockUnplug = $root.perfetto.protos.BlockUnplugFtraceEvent.decode(r, r.uint32());
                        break;
                    case 134:
                        m.ext4AllocDaBlocks = $root.perfetto.protos.Ext4AllocDaBlocksFtraceEvent.decode(r, r.uint32());
                        break;
                    case 135:
                        m.ext4AllocateBlocks = $root.perfetto.protos.Ext4AllocateBlocksFtraceEvent.decode(r, r.uint32());
                        break;
                    case 136:
                        m.ext4AllocateInode = $root.perfetto.protos.Ext4AllocateInodeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 137:
                        m.ext4BeginOrderedTruncate = $root.perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent.decode(r, r.uint32());
                        break;
                    case 138:
                        m.ext4CollapseRange = $root.perfetto.protos.Ext4CollapseRangeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 139:
                        m.ext4DaReleaseSpace = $root.perfetto.protos.Ext4DaReleaseSpaceFtraceEvent.decode(r, r.uint32());
                        break;
                    case 140:
                        m.ext4DaReserveSpace = $root.perfetto.protos.Ext4DaReserveSpaceFtraceEvent.decode(r, r.uint32());
                        break;
                    case 141:
                        m.ext4DaUpdateReserveSpace = $root.perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent.decode(r, r.uint32());
                        break;
                    case 142:
                        m.ext4DaWritePages = $root.perfetto.protos.Ext4DaWritePagesFtraceEvent.decode(r, r.uint32());
                        break;
                    case 143:
                        m.ext4DaWritePagesExtent = $root.perfetto.protos.Ext4DaWritePagesExtentFtraceEvent.decode(r, r.uint32());
                        break;
                    case 144:
                        m.ext4Direct_IOEnter = $root.perfetto.protos.Ext4DirectIOEnterFtraceEvent.decode(r, r.uint32());
                        break;
                    case 145:
                        m.ext4Direct_IOExit = $root.perfetto.protos.Ext4DirectIOExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 146:
                        m.ext4DiscardBlocks = $root.perfetto.protos.Ext4DiscardBlocksFtraceEvent.decode(r, r.uint32());
                        break;
                    case 147:
                        m.ext4DiscardPreallocations = $root.perfetto.protos.Ext4DiscardPreallocationsFtraceEvent.decode(r, r.uint32());
                        break;
                    case 148:
                        m.ext4DropInode = $root.perfetto.protos.Ext4DropInodeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 149:
                        m.ext4EsCacheExtent = $root.perfetto.protos.Ext4EsCacheExtentFtraceEvent.decode(r, r.uint32());
                        break;
                    case 150:
                        m.ext4EsFindDelayedExtentRangeEnter = $root.perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent.decode(r, r.uint32());
                        break;
                    case 151:
                        m.ext4EsFindDelayedExtentRangeExit = $root.perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 152:
                        m.ext4EsInsertExtent = $root.perfetto.protos.Ext4EsInsertExtentFtraceEvent.decode(r, r.uint32());
                        break;
                    case 153:
                        m.ext4EsLookupExtentEnter = $root.perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent.decode(r, r.uint32());
                        break;
                    case 154:
                        m.ext4EsLookupExtentExit = $root.perfetto.protos.Ext4EsLookupExtentExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 155:
                        m.ext4EsRemoveExtent = $root.perfetto.protos.Ext4EsRemoveExtentFtraceEvent.decode(r, r.uint32());
                        break;
                    case 156:
                        m.ext4EsShrink = $root.perfetto.protos.Ext4EsShrinkFtraceEvent.decode(r, r.uint32());
                        break;
                    case 157:
                        m.ext4EsShrinkCount = $root.perfetto.protos.Ext4EsShrinkCountFtraceEvent.decode(r, r.uint32());
                        break;
                    case 158:
                        m.ext4EsShrinkScanEnter = $root.perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent.decode(r, r.uint32());
                        break;
                    case 159:
                        m.ext4EsShrinkScanExit = $root.perfetto.protos.Ext4EsShrinkScanExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 160:
                        m.ext4EvictInode = $root.perfetto.protos.Ext4EvictInodeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 161:
                        m.ext4ExtConvertToInitializedEnter = $root.perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent.decode(r, r.uint32());
                        break;
                    case 162:
                        m.ext4ExtConvertToInitializedFastpath = $root.perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent.decode(r, r.uint32());
                        break;
                    case 163:
                        m.ext4ExtHandleUnwrittenExtents = $root.perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent.decode(r, r.uint32());
                        break;
                    case 164:
                        m.ext4ExtInCache = $root.perfetto.protos.Ext4ExtInCacheFtraceEvent.decode(r, r.uint32());
                        break;
                    case 165:
                        m.ext4ExtLoadExtent = $root.perfetto.protos.Ext4ExtLoadExtentFtraceEvent.decode(r, r.uint32());
                        break;
                    case 166:
                        m.ext4ExtMapBlocksEnter = $root.perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent.decode(r, r.uint32());
                        break;
                    case 167:
                        m.ext4ExtMapBlocksExit = $root.perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 168:
                        m.ext4ExtPutInCache = $root.perfetto.protos.Ext4ExtPutInCacheFtraceEvent.decode(r, r.uint32());
                        break;
                    case 169:
                        m.ext4ExtRemoveSpace = $root.perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent.decode(r, r.uint32());
                        break;
                    case 170:
                        m.ext4ExtRemoveSpaceDone = $root.perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent.decode(r, r.uint32());
                        break;
                    case 171:
                        m.ext4ExtRmIdx = $root.perfetto.protos.Ext4ExtRmIdxFtraceEvent.decode(r, r.uint32());
                        break;
                    case 172:
                        m.ext4ExtRmLeaf = $root.perfetto.protos.Ext4ExtRmLeafFtraceEvent.decode(r, r.uint32());
                        break;
                    case 173:
                        m.ext4ExtShowExtent = $root.perfetto.protos.Ext4ExtShowExtentFtraceEvent.decode(r, r.uint32());
                        break;
                    case 174:
                        m.ext4FallocateEnter = $root.perfetto.protos.Ext4FallocateEnterFtraceEvent.decode(r, r.uint32());
                        break;
                    case 175:
                        m.ext4FallocateExit = $root.perfetto.protos.Ext4FallocateExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 176:
                        m.ext4FindDelallocRange = $root.perfetto.protos.Ext4FindDelallocRangeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 177:
                        m.ext4Forget = $root.perfetto.protos.Ext4ForgetFtraceEvent.decode(r, r.uint32());
                        break;
                    case 178:
                        m.ext4FreeBlocks = $root.perfetto.protos.Ext4FreeBlocksFtraceEvent.decode(r, r.uint32());
                        break;
                    case 179:
                        m.ext4FreeInode = $root.perfetto.protos.Ext4FreeInodeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 180:
                        m.ext4GetImpliedClusterAllocExit = $root.perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 181:
                        m.ext4GetReservedClusterAlloc = $root.perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent.decode(r, r.uint32());
                        break;
                    case 182:
                        m.ext4IndMapBlocksEnter = $root.perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent.decode(r, r.uint32());
                        break;
                    case 183:
                        m.ext4IndMapBlocksExit = $root.perfetto.protos.Ext4IndMapBlocksExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 184:
                        m.ext4InsertRange = $root.perfetto.protos.Ext4InsertRangeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 185:
                        m.ext4Invalidatepage = $root.perfetto.protos.Ext4InvalidatepageFtraceEvent.decode(r, r.uint32());
                        break;
                    case 186:
                        m.ext4JournalStart = $root.perfetto.protos.Ext4JournalStartFtraceEvent.decode(r, r.uint32());
                        break;
                    case 187:
                        m.ext4JournalStartReserved = $root.perfetto.protos.Ext4JournalStartReservedFtraceEvent.decode(r, r.uint32());
                        break;
                    case 188:
                        m.ext4JournalledInvalidatepage = $root.perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent.decode(r, r.uint32());
                        break;
                    case 189:
                        m.ext4JournalledWriteEnd = $root.perfetto.protos.Ext4JournalledWriteEndFtraceEvent.decode(r, r.uint32());
                        break;
                    case 190:
                        m.ext4LoadInode = $root.perfetto.protos.Ext4LoadInodeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 191:
                        m.ext4LoadInodeBitmap = $root.perfetto.protos.Ext4LoadInodeBitmapFtraceEvent.decode(r, r.uint32());
                        break;
                    case 192:
                        m.ext4MarkInodeDirty = $root.perfetto.protos.Ext4MarkInodeDirtyFtraceEvent.decode(r, r.uint32());
                        break;
                    case 193:
                        m.ext4MbBitmapLoad = $root.perfetto.protos.Ext4MbBitmapLoadFtraceEvent.decode(r, r.uint32());
                        break;
                    case 194:
                        m.ext4MbBuddyBitmapLoad = $root.perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent.decode(r, r.uint32());
                        break;
                    case 195:
                        m.ext4MbDiscardPreallocations = $root.perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent.decode(r, r.uint32());
                        break;
                    case 196:
                        m.ext4MbNewGroupPa = $root.perfetto.protos.Ext4MbNewGroupPaFtraceEvent.decode(r, r.uint32());
                        break;
                    case 197:
                        m.ext4MbNewInodePa = $root.perfetto.protos.Ext4MbNewInodePaFtraceEvent.decode(r, r.uint32());
                        break;
                    case 198:
                        m.ext4MbReleaseGroupPa = $root.perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent.decode(r, r.uint32());
                        break;
                    case 199:
                        m.ext4MbReleaseInodePa = $root.perfetto.protos.Ext4MbReleaseInodePaFtraceEvent.decode(r, r.uint32());
                        break;
                    case 200:
                        m.ext4MballocAlloc = $root.perfetto.protos.Ext4MballocAllocFtraceEvent.decode(r, r.uint32());
                        break;
                    case 201:
                        m.ext4MballocDiscard = $root.perfetto.protos.Ext4MballocDiscardFtraceEvent.decode(r, r.uint32());
                        break;
                    case 202:
                        m.ext4MballocFree = $root.perfetto.protos.Ext4MballocFreeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 203:
                        m.ext4MballocPrealloc = $root.perfetto.protos.Ext4MballocPreallocFtraceEvent.decode(r, r.uint32());
                        break;
                    case 204:
                        m.ext4OtherInodeUpdateTime = $root.perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 205:
                        m.ext4PunchHole = $root.perfetto.protos.Ext4PunchHoleFtraceEvent.decode(r, r.uint32());
                        break;
                    case 206:
                        m.ext4ReadBlockBitmapLoad = $root.perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent.decode(r, r.uint32());
                        break;
                    case 207:
                        m.ext4Readpage = $root.perfetto.protos.Ext4ReadpageFtraceEvent.decode(r, r.uint32());
                        break;
                    case 208:
                        m.ext4Releasepage = $root.perfetto.protos.Ext4ReleasepageFtraceEvent.decode(r, r.uint32());
                        break;
                    case 209:
                        m.ext4RemoveBlocks = $root.perfetto.protos.Ext4RemoveBlocksFtraceEvent.decode(r, r.uint32());
                        break;
                    case 210:
                        m.ext4RequestBlocks = $root.perfetto.protos.Ext4RequestBlocksFtraceEvent.decode(r, r.uint32());
                        break;
                    case 211:
                        m.ext4RequestInode = $root.perfetto.protos.Ext4RequestInodeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 212:
                        m.ext4SyncFs = $root.perfetto.protos.Ext4SyncFsFtraceEvent.decode(r, r.uint32());
                        break;
                    case 213:
                        m.ext4TrimAllFree = $root.perfetto.protos.Ext4TrimAllFreeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 214:
                        m.ext4TrimExtent = $root.perfetto.protos.Ext4TrimExtentFtraceEvent.decode(r, r.uint32());
                        break;
                    case 215:
                        m.ext4TruncateEnter = $root.perfetto.protos.Ext4TruncateEnterFtraceEvent.decode(r, r.uint32());
                        break;
                    case 216:
                        m.ext4TruncateExit = $root.perfetto.protos.Ext4TruncateExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 217:
                        m.ext4UnlinkEnter = $root.perfetto.protos.Ext4UnlinkEnterFtraceEvent.decode(r, r.uint32());
                        break;
                    case 218:
                        m.ext4UnlinkExit = $root.perfetto.protos.Ext4UnlinkExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 219:
                        m.ext4WriteBegin = $root.perfetto.protos.Ext4WriteBeginFtraceEvent.decode(r, r.uint32());
                        break;
                    case 230:
                        m.ext4WriteEnd = $root.perfetto.protos.Ext4WriteEndFtraceEvent.decode(r, r.uint32());
                        break;
                    case 231:
                        m.ext4Writepage = $root.perfetto.protos.Ext4WritepageFtraceEvent.decode(r, r.uint32());
                        break;
                    case 232:
                        m.ext4Writepages = $root.perfetto.protos.Ext4WritepagesFtraceEvent.decode(r, r.uint32());
                        break;
                    case 233:
                        m.ext4WritepagesResult = $root.perfetto.protos.Ext4WritepagesResultFtraceEvent.decode(r, r.uint32());
                        break;
                    case 234:
                        m.ext4ZeroRange = $root.perfetto.protos.Ext4ZeroRangeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 235:
                        m.taskNewtask = $root.perfetto.protos.TaskNewtaskFtraceEvent.decode(r, r.uint32());
                        break;
                    case 236:
                        m.taskRename = $root.perfetto.protos.TaskRenameFtraceEvent.decode(r, r.uint32());
                        break;
                    case 237:
                        m.schedProcessExec = $root.perfetto.protos.SchedProcessExecFtraceEvent.decode(r, r.uint32());
                        break;
                    case 238:
                        m.schedProcessExit = $root.perfetto.protos.SchedProcessExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 239:
                        m.schedProcessFork = $root.perfetto.protos.SchedProcessForkFtraceEvent.decode(r, r.uint32());
                        break;
                    case 240:
                        m.schedProcessFree = $root.perfetto.protos.SchedProcessFreeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 241:
                        m.schedProcessHang = $root.perfetto.protos.SchedProcessHangFtraceEvent.decode(r, r.uint32());
                        break;
                    case 242:
                        m.schedProcessWait = $root.perfetto.protos.SchedProcessWaitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 243:
                        m.f2fsDoSubmitBio = $root.perfetto.protos.F2fsDoSubmitBioFtraceEvent.decode(r, r.uint32());
                        break;
                    case 244:
                        m.f2fsEvictInode = $root.perfetto.protos.F2fsEvictInodeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 245:
                        m.f2fsFallocate = $root.perfetto.protos.F2fsFallocateFtraceEvent.decode(r, r.uint32());
                        break;
                    case 246:
                        m.f2fsGetDataBlock = $root.perfetto.protos.F2fsGetDataBlockFtraceEvent.decode(r, r.uint32());
                        break;
                    case 247:
                        m.f2fsGetVictim = $root.perfetto.protos.F2fsGetVictimFtraceEvent.decode(r, r.uint32());
                        break;
                    case 248:
                        m.f2fsIget = $root.perfetto.protos.F2fsIgetFtraceEvent.decode(r, r.uint32());
                        break;
                    case 249:
                        m.f2fsIgetExit = $root.perfetto.protos.F2fsIgetExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 250:
                        m.f2fsNewInode = $root.perfetto.protos.F2fsNewInodeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 251:
                        m.f2fsReadpage = $root.perfetto.protos.F2fsReadpageFtraceEvent.decode(r, r.uint32());
                        break;
                    case 252:
                        m.f2fsReserveNewBlock = $root.perfetto.protos.F2fsReserveNewBlockFtraceEvent.decode(r, r.uint32());
                        break;
                    case 253:
                        m.f2fsSetPageDirty = $root.perfetto.protos.F2fsSetPageDirtyFtraceEvent.decode(r, r.uint32());
                        break;
                    case 254:
                        m.f2fsSubmitWritePage = $root.perfetto.protos.F2fsSubmitWritePageFtraceEvent.decode(r, r.uint32());
                        break;
                    case 255:
                        m.f2fsSyncFileEnter = $root.perfetto.protos.F2fsSyncFileEnterFtraceEvent.decode(r, r.uint32());
                        break;
                    case 256:
                        m.f2fsSyncFileExit = $root.perfetto.protos.F2fsSyncFileExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 257:
                        m.f2fsSyncFs = $root.perfetto.protos.F2fsSyncFsFtraceEvent.decode(r, r.uint32());
                        break;
                    case 258:
                        m.f2fsTruncate = $root.perfetto.protos.F2fsTruncateFtraceEvent.decode(r, r.uint32());
                        break;
                    case 259:
                        m.f2fsTruncateBlocksEnter = $root.perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent.decode(r, r.uint32());
                        break;
                    case 260:
                        m.f2fsTruncateBlocksExit = $root.perfetto.protos.F2fsTruncateBlocksExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 261:
                        m.f2fsTruncateDataBlocksRange = $root.perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 262:
                        m.f2fsTruncateInodeBlocksEnter = $root.perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent.decode(r, r.uint32());
                        break;
                    case 263:
                        m.f2fsTruncateInodeBlocksExit = $root.perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 264:
                        m.f2fsTruncateNode = $root.perfetto.protos.F2fsTruncateNodeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 265:
                        m.f2fsTruncateNodesEnter = $root.perfetto.protos.F2fsTruncateNodesEnterFtraceEvent.decode(r, r.uint32());
                        break;
                    case 266:
                        m.f2fsTruncateNodesExit = $root.perfetto.protos.F2fsTruncateNodesExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 267:
                        m.f2fsTruncatePartialNodes = $root.perfetto.protos.F2fsTruncatePartialNodesFtraceEvent.decode(r, r.uint32());
                        break;
                    case 268:
                        m.f2fsUnlinkEnter = $root.perfetto.protos.F2fsUnlinkEnterFtraceEvent.decode(r, r.uint32());
                        break;
                    case 269:
                        m.f2fsUnlinkExit = $root.perfetto.protos.F2fsUnlinkExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 270:
                        m.f2fsVmPageMkwrite = $root.perfetto.protos.F2fsVmPageMkwriteFtraceEvent.decode(r, r.uint32());
                        break;
                    case 271:
                        m.f2fsWriteBegin = $root.perfetto.protos.F2fsWriteBeginFtraceEvent.decode(r, r.uint32());
                        break;
                    case 272:
                        m.f2fsWriteCheckpoint = $root.perfetto.protos.F2fsWriteCheckpointFtraceEvent.decode(r, r.uint32());
                        break;
                    case 273:
                        m.f2fsWriteEnd = $root.perfetto.protos.F2fsWriteEndFtraceEvent.decode(r, r.uint32());
                        break;
                    case 274:
                        m.allocPagesIommuEnd = $root.perfetto.protos.AllocPagesIommuEndFtraceEvent.decode(r, r.uint32());
                        break;
                    case 275:
                        m.allocPagesIommuFail = $root.perfetto.protos.AllocPagesIommuFailFtraceEvent.decode(r, r.uint32());
                        break;
                    case 276:
                        m.allocPagesIommuStart = $root.perfetto.protos.AllocPagesIommuStartFtraceEvent.decode(r, r.uint32());
                        break;
                    case 277:
                        m.allocPagesSysEnd = $root.perfetto.protos.AllocPagesSysEndFtraceEvent.decode(r, r.uint32());
                        break;
                    case 278:
                        m.allocPagesSysFail = $root.perfetto.protos.AllocPagesSysFailFtraceEvent.decode(r, r.uint32());
                        break;
                    case 279:
                        m.allocPagesSysStart = $root.perfetto.protos.AllocPagesSysStartFtraceEvent.decode(r, r.uint32());
                        break;
                    case 280:
                        m.dmaAllocContiguousRetry = $root.perfetto.protos.DmaAllocContiguousRetryFtraceEvent.decode(r, r.uint32());
                        break;
                    case 281:
                        m.iommuMapRange = $root.perfetto.protos.IommuMapRangeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 282:
                        m.iommuSecPtblMapRangeEnd = $root.perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent.decode(r, r.uint32());
                        break;
                    case 283:
                        m.iommuSecPtblMapRangeStart = $root.perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent.decode(r, r.uint32());
                        break;
                    case 284:
                        m.ionAllocBufferEnd = $root.perfetto.protos.IonAllocBufferEndFtraceEvent.decode(r, r.uint32());
                        break;
                    case 285:
                        m.ionAllocBufferFail = $root.perfetto.protos.IonAllocBufferFailFtraceEvent.decode(r, r.uint32());
                        break;
                    case 286:
                        m.ionAllocBufferFallback = $root.perfetto.protos.IonAllocBufferFallbackFtraceEvent.decode(r, r.uint32());
                        break;
                    case 287:
                        m.ionAllocBufferStart = $root.perfetto.protos.IonAllocBufferStartFtraceEvent.decode(r, r.uint32());
                        break;
                    case 288:
                        m.ionCpAllocRetry = $root.perfetto.protos.IonCpAllocRetryFtraceEvent.decode(r, r.uint32());
                        break;
                    case 289:
                        m.ionCpSecureBufferEnd = $root.perfetto.protos.IonCpSecureBufferEndFtraceEvent.decode(r, r.uint32());
                        break;
                    case 290:
                        m.ionCpSecureBufferStart = $root.perfetto.protos.IonCpSecureBufferStartFtraceEvent.decode(r, r.uint32());
                        break;
                    case 291:
                        m.ionPrefetching = $root.perfetto.protos.IonPrefetchingFtraceEvent.decode(r, r.uint32());
                        break;
                    case 292:
                        m.ionSecureCmaAddToPoolEnd = $root.perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent.decode(r, r.uint32());
                        break;
                    case 293:
                        m.ionSecureCmaAddToPoolStart = $root.perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent.decode(r, r.uint32());
                        break;
                    case 294:
                        m.ionSecureCmaAllocateEnd = $root.perfetto.protos.IonSecureCmaAllocateEndFtraceEvent.decode(r, r.uint32());
                        break;
                    case 295:
                        m.ionSecureCmaAllocateStart = $root.perfetto.protos.IonSecureCmaAllocateStartFtraceEvent.decode(r, r.uint32());
                        break;
                    case 296:
                        m.ionSecureCmaShrinkPoolEnd = $root.perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent.decode(r, r.uint32());
                        break;
                    case 297:
                        m.ionSecureCmaShrinkPoolStart = $root.perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent.decode(r, r.uint32());
                        break;
                    case 298:
                        m.kfree = $root.perfetto.protos.KfreeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 299:
                        m.kmalloc = $root.perfetto.protos.KmallocFtraceEvent.decode(r, r.uint32());
                        break;
                    case 300:
                        m.kmallocNode = $root.perfetto.protos.KmallocNodeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 301:
                        m.kmemCacheAlloc = $root.perfetto.protos.KmemCacheAllocFtraceEvent.decode(r, r.uint32());
                        break;
                    case 302:
                        m.kmemCacheAllocNode = $root.perfetto.protos.KmemCacheAllocNodeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 303:
                        m.kmemCacheFree = $root.perfetto.protos.KmemCacheFreeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 304:
                        m.migratePagesEnd = $root.perfetto.protos.MigratePagesEndFtraceEvent.decode(r, r.uint32());
                        break;
                    case 305:
                        m.migratePagesStart = $root.perfetto.protos.MigratePagesStartFtraceEvent.decode(r, r.uint32());
                        break;
                    case 306:
                        m.migrateRetry = $root.perfetto.protos.MigrateRetryFtraceEvent.decode(r, r.uint32());
                        break;
                    case 307:
                        m.mmPageAlloc = $root.perfetto.protos.MmPageAllocFtraceEvent.decode(r, r.uint32());
                        break;
                    case 308:
                        m.mmPageAllocExtfrag = $root.perfetto.protos.MmPageAllocExtfragFtraceEvent.decode(r, r.uint32());
                        break;
                    case 309:
                        m.mmPageAllocZoneLocked = $root.perfetto.protos.MmPageAllocZoneLockedFtraceEvent.decode(r, r.uint32());
                        break;
                    case 310:
                        m.mmPageFree = $root.perfetto.protos.MmPageFreeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 311:
                        m.mmPageFreeBatched = $root.perfetto.protos.MmPageFreeBatchedFtraceEvent.decode(r, r.uint32());
                        break;
                    case 312:
                        m.mmPagePcpuDrain = $root.perfetto.protos.MmPagePcpuDrainFtraceEvent.decode(r, r.uint32());
                        break;
                    case 313:
                        m.rssStat = $root.perfetto.protos.RssStatFtraceEvent.decode(r, r.uint32());
                        break;
                    case 314:
                        m.ionHeapShrink = $root.perfetto.protos.IonHeapShrinkFtraceEvent.decode(r, r.uint32());
                        break;
                    case 315:
                        m.ionHeapGrow = $root.perfetto.protos.IonHeapGrowFtraceEvent.decode(r, r.uint32());
                        break;
                    case 316:
                        m.fenceInit = $root.perfetto.protos.FenceInitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 317:
                        m.fenceDestroy = $root.perfetto.protos.FenceDestroyFtraceEvent.decode(r, r.uint32());
                        break;
                    case 318:
                        m.fenceEnableSignal = $root.perfetto.protos.FenceEnableSignalFtraceEvent.decode(r, r.uint32());
                        break;
                    case 319:
                        m.fenceSignaled = $root.perfetto.protos.FenceSignaledFtraceEvent.decode(r, r.uint32());
                        break;
                    case 320:
                        m.clkEnable = $root.perfetto.protos.ClkEnableFtraceEvent.decode(r, r.uint32());
                        break;
                    case 321:
                        m.clkDisable = $root.perfetto.protos.ClkDisableFtraceEvent.decode(r, r.uint32());
                        break;
                    case 322:
                        m.clkSetRate = $root.perfetto.protos.ClkSetRateFtraceEvent.decode(r, r.uint32());
                        break;
                    case 323:
                        m.binderTransactionAllocBuf = $root.perfetto.protos.BinderTransactionAllocBufFtraceEvent.decode(r, r.uint32());
                        break;
                    case 324:
                        m.signalDeliver = $root.perfetto.protos.SignalDeliverFtraceEvent.decode(r, r.uint32());
                        break;
                    case 325:
                        m.signalGenerate = $root.perfetto.protos.SignalGenerateFtraceEvent.decode(r, r.uint32());
                        break;
                    case 326:
                        m.oomScoreAdjUpdate = $root.perfetto.protos.OomScoreAdjUpdateFtraceEvent.decode(r, r.uint32());
                        break;
                    case 327:
                        m.generic = $root.perfetto.protos.GenericFtraceEvent.decode(r, r.uint32());
                        break;
                    case 328:
                        m.mmEventRecord = $root.perfetto.protos.MmEventRecordFtraceEvent.decode(r, r.uint32());
                        break;
                    case 329:
                        m.sysEnter = $root.perfetto.protos.SysEnterFtraceEvent.decode(r, r.uint32());
                        break;
                    case 330:
                        m.sysExit = $root.perfetto.protos.SysExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 331:
                        m.zero = $root.perfetto.protos.ZeroFtraceEvent.decode(r, r.uint32());
                        break;
                    case 332:
                        m.gpuFrequency = $root.perfetto.protos.GpuFrequencyFtraceEvent.decode(r, r.uint32());
                        break;
                    case 333:
                        m.sdeTracingMarkWrite = $root.perfetto.protos.SdeTracingMarkWriteFtraceEvent.decode(r, r.uint32());
                        break;
                    case 334:
                        m.markVictim = $root.perfetto.protos.MarkVictimFtraceEvent.decode(r, r.uint32());
                        break;
                    case 335:
                        m.ionStat = $root.perfetto.protos.IonStatFtraceEvent.decode(r, r.uint32());
                        break;
                    case 336:
                        m.ionBufferCreate = $root.perfetto.protos.IonBufferCreateFtraceEvent.decode(r, r.uint32());
                        break;
                    case 337:
                        m.ionBufferDestroy = $root.perfetto.protos.IonBufferDestroyFtraceEvent.decode(r, r.uint32());
                        break;
                    case 338:
                        m.scmCallStart = $root.perfetto.protos.ScmCallStartFtraceEvent.decode(r, r.uint32());
                        break;
                    case 339:
                        m.scmCallEnd = $root.perfetto.protos.ScmCallEndFtraceEvent.decode(r, r.uint32());
                        break;
                    case 340:
                        m.gpuMemTotal = $root.perfetto.protos.GpuMemTotalFtraceEvent.decode(r, r.uint32());
                        break;
                    case 341:
                        m.thermalTemperature = $root.perfetto.protos.ThermalTemperatureFtraceEvent.decode(r, r.uint32());
                        break;
                    case 342:
                        m.cdevUpdate = $root.perfetto.protos.CdevUpdateFtraceEvent.decode(r, r.uint32());
                        break;
                    case 343:
                        m.cpuhpExit = $root.perfetto.protos.CpuhpExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 344:
                        m.cpuhpMultiEnter = $root.perfetto.protos.CpuhpMultiEnterFtraceEvent.decode(r, r.uint32());
                        break;
                    case 345:
                        m.cpuhpEnter = $root.perfetto.protos.CpuhpEnterFtraceEvent.decode(r, r.uint32());
                        break;
                    case 346:
                        m.cpuhpLatency = $root.perfetto.protos.CpuhpLatencyFtraceEvent.decode(r, r.uint32());
                        break;
                    case 347:
                        m.fastrpcDmaStat = $root.perfetto.protos.FastrpcDmaStatFtraceEvent.decode(r, r.uint32());
                        break;
                    case 348:
                        m.dpuTracingMarkWrite = $root.perfetto.protos.DpuTracingMarkWriteFtraceEvent.decode(r, r.uint32());
                        break;
                    case 349:
                        m.g2dTracingMarkWrite = $root.perfetto.protos.G2dTracingMarkWriteFtraceEvent.decode(r, r.uint32());
                        break;
                    case 350:
                        m.maliTracingMarkWrite = $root.perfetto.protos.MaliTracingMarkWriteFtraceEvent.decode(r, r.uint32());
                        break;
                    case 351:
                        m.dmaHeapStat = $root.perfetto.protos.DmaHeapStatFtraceEvent.decode(r, r.uint32());
                        break;
                    case 352:
                        m.cpuhpPause = $root.perfetto.protos.CpuhpPauseFtraceEvent.decode(r, r.uint32());
                        break;
                    case 353:
                        m.schedPiSetprio = $root.perfetto.protos.SchedPiSetprioFtraceEvent.decode(r, r.uint32());
                        break;
                    case 354:
                        m.sdeSdeEvtlog = $root.perfetto.protos.SdeSdeEvtlogFtraceEvent.decode(r, r.uint32());
                        break;
                    case 355:
                        m.sdeSdePerfCalcCrtc = $root.perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent.decode(r, r.uint32());
                        break;
                    case 356:
                        m.sdeSdePerfCrtcUpdate = $root.perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent.decode(r, r.uint32());
                        break;
                    case 357:
                        m.sdeSdePerfSetQosLuts = $root.perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent.decode(r, r.uint32());
                        break;
                    case 358:
                        m.sdeSdePerfUpdateBus = $root.perfetto.protos.SdeSdePerfUpdateBusFtraceEvent.decode(r, r.uint32());
                        break;
                    case 359:
                        m.rssStatThrottled = $root.perfetto.protos.RssStatThrottledFtraceEvent.decode(r, r.uint32());
                        break;
                    case 360:
                        m.netifReceiveSkb = $root.perfetto.protos.NetifReceiveSkbFtraceEvent.decode(r, r.uint32());
                        break;
                    case 361:
                        m.netDevXmit = $root.perfetto.protos.NetDevXmitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 362:
                        m.inetSockSetState = $root.perfetto.protos.InetSockSetStateFtraceEvent.decode(r, r.uint32());
                        break;
                    case 363:
                        m.tcpRetransmitSkb = $root.perfetto.protos.TcpRetransmitSkbFtraceEvent.decode(r, r.uint32());
                        break;
                    case 364:
                        m.crosEcSensorhubData = $root.perfetto.protos.CrosEcSensorhubDataFtraceEvent.decode(r, r.uint32());
                        break;
                    case 365:
                        m.napiGroReceiveEntry = $root.perfetto.protos.NapiGroReceiveEntryFtraceEvent.decode(r, r.uint32());
                        break;
                    case 366:
                        m.napiGroReceiveExit = $root.perfetto.protos.NapiGroReceiveExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 367:
                        m.kfreeSkb = $root.perfetto.protos.KfreeSkbFtraceEvent.decode(r, r.uint32());
                        break;
                    case 368:
                        m.kvmAccessFault = $root.perfetto.protos.KvmAccessFaultFtraceEvent.decode(r, r.uint32());
                        break;
                    case 369:
                        m.kvmAckIrq = $root.perfetto.protos.KvmAckIrqFtraceEvent.decode(r, r.uint32());
                        break;
                    case 370:
                        m.kvmAgeHva = $root.perfetto.protos.KvmAgeHvaFtraceEvent.decode(r, r.uint32());
                        break;
                    case 371:
                        m.kvmAgePage = $root.perfetto.protos.KvmAgePageFtraceEvent.decode(r, r.uint32());
                        break;
                    case 372:
                        m.kvmArmClearDebug = $root.perfetto.protos.KvmArmClearDebugFtraceEvent.decode(r, r.uint32());
                        break;
                    case 373:
                        m.kvmArmSetDreg32 = $root.perfetto.protos.KvmArmSetDreg32FtraceEvent.decode(r, r.uint32());
                        break;
                    case 374:
                        m.kvmArmSetRegset = $root.perfetto.protos.KvmArmSetRegsetFtraceEvent.decode(r, r.uint32());
                        break;
                    case 375:
                        m.kvmArmSetupDebug = $root.perfetto.protos.KvmArmSetupDebugFtraceEvent.decode(r, r.uint32());
                        break;
                    case 376:
                        m.kvmEntry = $root.perfetto.protos.KvmEntryFtraceEvent.decode(r, r.uint32());
                        break;
                    case 377:
                        m.kvmExit = $root.perfetto.protos.KvmExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 378:
                        m.kvmFpu = $root.perfetto.protos.KvmFpuFtraceEvent.decode(r, r.uint32());
                        break;
                    case 379:
                        m.kvmGetTimerMap = $root.perfetto.protos.KvmGetTimerMapFtraceEvent.decode(r, r.uint32());
                        break;
                    case 380:
                        m.kvmGuestFault = $root.perfetto.protos.KvmGuestFaultFtraceEvent.decode(r, r.uint32());
                        break;
                    case 381:
                        m.kvmHandleSysReg = $root.perfetto.protos.KvmHandleSysRegFtraceEvent.decode(r, r.uint32());
                        break;
                    case 382:
                        m.kvmHvcArm64 = $root.perfetto.protos.KvmHvcArm64FtraceEvent.decode(r, r.uint32());
                        break;
                    case 383:
                        m.kvmIrqLine = $root.perfetto.protos.KvmIrqLineFtraceEvent.decode(r, r.uint32());
                        break;
                    case 384:
                        m.kvmMmio = $root.perfetto.protos.KvmMmioFtraceEvent.decode(r, r.uint32());
                        break;
                    case 385:
                        m.kvmMmioEmulate = $root.perfetto.protos.KvmMmioEmulateFtraceEvent.decode(r, r.uint32());
                        break;
                    case 386:
                        m.kvmSetGuestDebug = $root.perfetto.protos.KvmSetGuestDebugFtraceEvent.decode(r, r.uint32());
                        break;
                    case 387:
                        m.kvmSetIrq = $root.perfetto.protos.KvmSetIrqFtraceEvent.decode(r, r.uint32());
                        break;
                    case 388:
                        m.kvmSetSpteHva = $root.perfetto.protos.KvmSetSpteHvaFtraceEvent.decode(r, r.uint32());
                        break;
                    case 389:
                        m.kvmSetWayFlush = $root.perfetto.protos.KvmSetWayFlushFtraceEvent.decode(r, r.uint32());
                        break;
                    case 390:
                        m.kvmSysAccess = $root.perfetto.protos.KvmSysAccessFtraceEvent.decode(r, r.uint32());
                        break;
                    case 391:
                        m.kvmTestAgeHva = $root.perfetto.protos.KvmTestAgeHvaFtraceEvent.decode(r, r.uint32());
                        break;
                    case 392:
                        m.kvmTimerEmulate = $root.perfetto.protos.KvmTimerEmulateFtraceEvent.decode(r, r.uint32());
                        break;
                    case 393:
                        m.kvmTimerHrtimerExpire = $root.perfetto.protos.KvmTimerHrtimerExpireFtraceEvent.decode(r, r.uint32());
                        break;
                    case 394:
                        m.kvmTimerRestoreState = $root.perfetto.protos.KvmTimerRestoreStateFtraceEvent.decode(r, r.uint32());
                        break;
                    case 395:
                        m.kvmTimerSaveState = $root.perfetto.protos.KvmTimerSaveStateFtraceEvent.decode(r, r.uint32());
                        break;
                    case 396:
                        m.kvmTimerUpdateIrq = $root.perfetto.protos.KvmTimerUpdateIrqFtraceEvent.decode(r, r.uint32());
                        break;
                    case 397:
                        m.kvmToggleCache = $root.perfetto.protos.KvmToggleCacheFtraceEvent.decode(r, r.uint32());
                        break;
                    case 398:
                        m.kvmUnmapHvaRange = $root.perfetto.protos.KvmUnmapHvaRangeFtraceEvent.decode(r, r.uint32());
                        break;
                    case 399:
                        m.kvmUserspaceExit = $root.perfetto.protos.KvmUserspaceExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 400:
                        m.kvmVcpuWakeup = $root.perfetto.protos.KvmVcpuWakeupFtraceEvent.decode(r, r.uint32());
                        break;
                    case 401:
                        m.kvmWfxArm64 = $root.perfetto.protos.KvmWfxArm64FtraceEvent.decode(r, r.uint32());
                        break;
                    case 402:
                        m.trapReg = $root.perfetto.protos.TrapRegFtraceEvent.decode(r, r.uint32());
                        break;
                    case 403:
                        m.vgicUpdateIrqPending = $root.perfetto.protos.VgicUpdateIrqPendingFtraceEvent.decode(r, r.uint32());
                        break;
                    case 404:
                        m.wakeupSourceActivate = $root.perfetto.protos.WakeupSourceActivateFtraceEvent.decode(r, r.uint32());
                        break;
                    case 405:
                        m.wakeupSourceDeactivate = $root.perfetto.protos.WakeupSourceDeactivateFtraceEvent.decode(r, r.uint32());
                        break;
                    case 406:
                        m.ufshcdCommand = $root.perfetto.protos.UfshcdCommandFtraceEvent.decode(r, r.uint32());
                        break;
                    case 407:
                        m.ufshcdClkGating = $root.perfetto.protos.UfshcdClkGatingFtraceEvent.decode(r, r.uint32());
                        break;
                    case 408:
                        m.console = $root.perfetto.protos.ConsoleFtraceEvent.decode(r, r.uint32());
                        break;
                    case 409:
                        m.drmVblankEvent = $root.perfetto.protos.DrmVblankEventFtraceEvent.decode(r, r.uint32());
                        break;
                    case 410:
                        m.drmVblankEventDelivered = $root.perfetto.protos.DrmVblankEventDeliveredFtraceEvent.decode(r, r.uint32());
                        break;
                    case 411:
                        m.drmSchedJob = $root.perfetto.protos.DrmSchedJobFtraceEvent.decode(r, r.uint32());
                        break;
                    case 412:
                        m.drmRunJob = $root.perfetto.protos.DrmRunJobFtraceEvent.decode(r, r.uint32());
                        break;
                    case 413:
                        m.drmSchedProcessJob = $root.perfetto.protos.DrmSchedProcessJobFtraceEvent.decode(r, r.uint32());
                        break;
                    case 414:
                        m.dmaFenceInit = $root.perfetto.protos.DmaFenceInitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 415:
                        m.dmaFenceEmit = $root.perfetto.protos.DmaFenceEmitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 416:
                        m.dmaFenceSignaled = $root.perfetto.protos.DmaFenceSignaledFtraceEvent.decode(r, r.uint32());
                        break;
                    case 417:
                        m.dmaFenceWaitStart = $root.perfetto.protos.DmaFenceWaitStartFtraceEvent.decode(r, r.uint32());
                        break;
                    case 418:
                        m.dmaFenceWaitEnd = $root.perfetto.protos.DmaFenceWaitEndFtraceEvent.decode(r, r.uint32());
                        break;
                    case 419:
                        m.f2fsIostat = $root.perfetto.protos.F2fsIostatFtraceEvent.decode(r, r.uint32());
                        break;
                    case 420:
                        m.f2fsIostatLatency = $root.perfetto.protos.F2fsIostatLatencyFtraceEvent.decode(r, r.uint32());
                        break;
                    case 421:
                        m.schedCpuUtilCfs = $root.perfetto.protos.SchedCpuUtilCfsFtraceEvent.decode(r, r.uint32());
                        break;
                    case 422:
                        m.v4l2Qbuf = $root.perfetto.protos.V4l2QbufFtraceEvent.decode(r, r.uint32());
                        break;
                    case 423:
                        m.v4l2Dqbuf = $root.perfetto.protos.V4l2DqbufFtraceEvent.decode(r, r.uint32());
                        break;
                    case 424:
                        m.vb2V4l2BufQueue = $root.perfetto.protos.Vb2V4l2BufQueueFtraceEvent.decode(r, r.uint32());
                        break;
                    case 425:
                        m.vb2V4l2BufDone = $root.perfetto.protos.Vb2V4l2BufDoneFtraceEvent.decode(r, r.uint32());
                        break;
                    case 426:
                        m.vb2V4l2Qbuf = $root.perfetto.protos.Vb2V4l2QbufFtraceEvent.decode(r, r.uint32());
                        break;
                    case 427:
                        m.vb2V4l2Dqbuf = $root.perfetto.protos.Vb2V4l2DqbufFtraceEvent.decode(r, r.uint32());
                        break;
                    case 428:
                        m.dsiCmdFifoStatus = $root.perfetto.protos.DsiCmdFifoStatusFtraceEvent.decode(r, r.uint32());
                        break;
                    case 429:
                        m.dsiRx = $root.perfetto.protos.DsiRxFtraceEvent.decode(r, r.uint32());
                        break;
                    case 430:
                        m.dsiTx = $root.perfetto.protos.DsiTxFtraceEvent.decode(r, r.uint32());
                        break;
                    case 431:
                        m.androidFsDatareadEnd = $root.perfetto.protos.AndroidFsDatareadEndFtraceEvent.decode(r, r.uint32());
                        break;
                    case 432:
                        m.androidFsDatareadStart = $root.perfetto.protos.AndroidFsDatareadStartFtraceEvent.decode(r, r.uint32());
                        break;
                    case 433:
                        m.androidFsDatawriteEnd = $root.perfetto.protos.AndroidFsDatawriteEndFtraceEvent.decode(r, r.uint32());
                        break;
                    case 434:
                        m.androidFsDatawriteStart = $root.perfetto.protos.AndroidFsDatawriteStartFtraceEvent.decode(r, r.uint32());
                        break;
                    case 435:
                        m.androidFsFsyncEnd = $root.perfetto.protos.AndroidFsFsyncEndFtraceEvent.decode(r, r.uint32());
                        break;
                    case 436:
                        m.androidFsFsyncStart = $root.perfetto.protos.AndroidFsFsyncStartFtraceEvent.decode(r, r.uint32());
                        break;
                    case 437:
                        m.funcgraphEntry = $root.perfetto.protos.FuncgraphEntryFtraceEvent.decode(r, r.uint32());
                        break;
                    case 438:
                        m.funcgraphExit = $root.perfetto.protos.FuncgraphExitFtraceEvent.decode(r, r.uint32());
                        break;
                    case 439:
                        m.virtioVideoCmd = $root.perfetto.protos.VirtioVideoCmdFtraceEvent.decode(r, r.uint32());
                        break;
                    case 440:
                        m.virtioVideoCmdDone = $root.perfetto.protos.VirtioVideoCmdDoneFtraceEvent.decode(r, r.uint32());
                        break;
                    case 441:
                        m.virtioVideoResourceQueue = $root.perfetto.protos.VirtioVideoResourceQueueFtraceEvent.decode(r, r.uint32());
                        break;
                    case 442:
                        m.virtioVideoResourceQueueDone = $root.perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent.decode(r, r.uint32());
                        break;
                    case 443:
                        m.mmShrinkSlabStart = $root.perfetto.protos.MmShrinkSlabStartFtraceEvent.decode(r, r.uint32());
                        break;
                    case 444:
                        m.mmShrinkSlabEnd = $root.perfetto.protos.MmShrinkSlabEndFtraceEvent.decode(r, r.uint32());
                        break;
                    case 445:
                        m.trustySmc = $root.perfetto.protos.TrustySmcFtraceEvent.decode(r, r.uint32());
                        break;
                    case 446:
                        m.trustySmcDone = $root.perfetto.protos.TrustySmcDoneFtraceEvent.decode(r, r.uint32());
                        break;
                    case 447:
                        m.trustyStdCall32 = $root.perfetto.protos.TrustyStdCall32FtraceEvent.decode(r, r.uint32());
                        break;
                    case 448:
                        m.trustyStdCall32Done = $root.perfetto.protos.TrustyStdCall32DoneFtraceEvent.decode(r, r.uint32());
                        break;
                    case 449:
                        m.trustyShareMemory = $root.perfetto.protos.TrustyShareMemoryFtraceEvent.decode(r, r.uint32());
                        break;
                    case 450:
                        m.trustyShareMemoryDone = $root.perfetto.protos.TrustyShareMemoryDoneFtraceEvent.decode(r, r.uint32());
                        break;
                    case 451:
                        m.trustyReclaimMemory = $root.perfetto.protos.TrustyReclaimMemoryFtraceEvent.decode(r, r.uint32());
                        break;
                    case 452:
                        m.trustyReclaimMemoryDone = $root.perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent.decode(r, r.uint32());
                        break;
                    case 453:
                        m.trustyIrq = $root.perfetto.protos.TrustyIrqFtraceEvent.decode(r, r.uint32());
                        break;
                    case 454:
                        m.trustyIpcHandleEvent = $root.perfetto.protos.TrustyIpcHandleEventFtraceEvent.decode(r, r.uint32());
                        break;
                    case 455:
                        m.trustyIpcConnect = $root.perfetto.protos.TrustyIpcConnectFtraceEvent.decode(r, r.uint32());
                        break;
                    case 456:
                        m.trustyIpcConnectEnd = $root.perfetto.protos.TrustyIpcConnectEndFtraceEvent.decode(r, r.uint32());
                        break;
                    case 457:
                        m.trustyIpcWrite = $root.perfetto.protos.TrustyIpcWriteFtraceEvent.decode(r, r.uint32());
                        break;
                    case 458:
                        m.trustyIpcPoll = $root.perfetto.protos.TrustyIpcPollFtraceEvent.decode(r, r.uint32());
                        break;
                    case 459:
                        m.trustyIpcPollEnd = $root.perfetto.protos.TrustyIpcPollEndFtraceEvent.decode(r, r.uint32());
                        break;
                    case 460:
                        m.trustyIpcRead = $root.perfetto.protos.TrustyIpcReadFtraceEvent.decode(r, r.uint32());
                        break;
                    case 461:
                        m.trustyIpcReadEnd = $root.perfetto.protos.TrustyIpcReadEndFtraceEvent.decode(r, r.uint32());
                        break;
                    case 462:
                        m.trustyIpcRx = $root.perfetto.protos.TrustyIpcRxFtraceEvent.decode(r, r.uint32());
                        break;
                    case 463:
                        m.trustyIpcTx = $root.perfetto.protos.TrustyIpcTxFtraceEvent.decode(r, r.uint32());
                        break;
                    case 464:
                        m.trustyEnqueueNop = $root.perfetto.protos.TrustyEnqueueNopFtraceEvent.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a FtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.FtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.FtraceEvent} FtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a FtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.FtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            FtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                var p = {};
                if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                    if (!$util.isInteger(m.timestamp) && !(m.timestamp && $util.isInteger(m.timestamp.low) && $util.isInteger(m.timestamp.high)))
                        return "timestamp: integer|Long expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.print != null && m.hasOwnProperty("print")) {
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.PrintFtraceEvent.verify(m.print);
                        if (e)
                            return "print." + e;
                    }
                }
                if (m.schedSwitch != null && m.hasOwnProperty("schedSwitch")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SchedSwitchFtraceEvent.verify(m.schedSwitch);
                        if (e)
                            return "schedSwitch." + e;
                    }
                }
                if (m.cpuFrequency != null && m.hasOwnProperty("cpuFrequency")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.CpuFrequencyFtraceEvent.verify(m.cpuFrequency);
                        if (e)
                            return "cpuFrequency." + e;
                    }
                }
                if (m.cpuFrequencyLimits != null && m.hasOwnProperty("cpuFrequencyLimits")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.CpuFrequencyLimitsFtraceEvent.verify(m.cpuFrequencyLimits);
                        if (e)
                            return "cpuFrequencyLimits." + e;
                    }
                }
                if (m.cpuIdle != null && m.hasOwnProperty("cpuIdle")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.CpuIdleFtraceEvent.verify(m.cpuIdle);
                        if (e)
                            return "cpuIdle." + e;
                    }
                }
                if (m.clockEnable != null && m.hasOwnProperty("clockEnable")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.ClockEnableFtraceEvent.verify(m.clockEnable);
                        if (e)
                            return "clockEnable." + e;
                    }
                }
                if (m.clockDisable != null && m.hasOwnProperty("clockDisable")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.ClockDisableFtraceEvent.verify(m.clockDisable);
                        if (e)
                            return "clockDisable." + e;
                    }
                }
                if (m.clockSetRate != null && m.hasOwnProperty("clockSetRate")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.ClockSetRateFtraceEvent.verify(m.clockSetRate);
                        if (e)
                            return "clockSetRate." + e;
                    }
                }
                if (m.schedWakeup != null && m.hasOwnProperty("schedWakeup")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SchedWakeupFtraceEvent.verify(m.schedWakeup);
                        if (e)
                            return "schedWakeup." + e;
                    }
                }
                if (m.schedBlockedReason != null && m.hasOwnProperty("schedBlockedReason")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SchedBlockedReasonFtraceEvent.verify(m.schedBlockedReason);
                        if (e)
                            return "schedBlockedReason." + e;
                    }
                }
                if (m.schedCpuHotplug != null && m.hasOwnProperty("schedCpuHotplug")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SchedCpuHotplugFtraceEvent.verify(m.schedCpuHotplug);
                        if (e)
                            return "schedCpuHotplug." + e;
                    }
                }
                if (m.schedWaking != null && m.hasOwnProperty("schedWaking")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SchedWakingFtraceEvent.verify(m.schedWaking);
                        if (e)
                            return "schedWaking." + e;
                    }
                }
                if (m.ipiEntry != null && m.hasOwnProperty("ipiEntry")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IpiEntryFtraceEvent.verify(m.ipiEntry);
                        if (e)
                            return "ipiEntry." + e;
                    }
                }
                if (m.ipiExit != null && m.hasOwnProperty("ipiExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IpiExitFtraceEvent.verify(m.ipiExit);
                        if (e)
                            return "ipiExit." + e;
                    }
                }
                if (m.ipiRaise != null && m.hasOwnProperty("ipiRaise")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IpiRaiseFtraceEvent.verify(m.ipiRaise);
                        if (e)
                            return "ipiRaise." + e;
                    }
                }
                if (m.softirqEntry != null && m.hasOwnProperty("softirqEntry")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SoftirqEntryFtraceEvent.verify(m.softirqEntry);
                        if (e)
                            return "softirqEntry." + e;
                    }
                }
                if (m.softirqExit != null && m.hasOwnProperty("softirqExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SoftirqExitFtraceEvent.verify(m.softirqExit);
                        if (e)
                            return "softirqExit." + e;
                    }
                }
                if (m.softirqRaise != null && m.hasOwnProperty("softirqRaise")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SoftirqRaiseFtraceEvent.verify(m.softirqRaise);
                        if (e)
                            return "softirqRaise." + e;
                    }
                }
                if (m.i2cRead != null && m.hasOwnProperty("i2cRead")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.I2cReadFtraceEvent.verify(m.i2cRead);
                        if (e)
                            return "i2cRead." + e;
                    }
                }
                if (m.i2cWrite != null && m.hasOwnProperty("i2cWrite")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.I2cWriteFtraceEvent.verify(m.i2cWrite);
                        if (e)
                            return "i2cWrite." + e;
                    }
                }
                if (m.i2cResult != null && m.hasOwnProperty("i2cResult")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.I2cResultFtraceEvent.verify(m.i2cResult);
                        if (e)
                            return "i2cResult." + e;
                    }
                }
                if (m.i2cReply != null && m.hasOwnProperty("i2cReply")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.I2cReplyFtraceEvent.verify(m.i2cReply);
                        if (e)
                            return "i2cReply." + e;
                    }
                }
                if (m.smbusRead != null && m.hasOwnProperty("smbusRead")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SmbusReadFtraceEvent.verify(m.smbusRead);
                        if (e)
                            return "smbusRead." + e;
                    }
                }
                if (m.smbusWrite != null && m.hasOwnProperty("smbusWrite")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SmbusWriteFtraceEvent.verify(m.smbusWrite);
                        if (e)
                            return "smbusWrite." + e;
                    }
                }
                if (m.smbusResult != null && m.hasOwnProperty("smbusResult")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SmbusResultFtraceEvent.verify(m.smbusResult);
                        if (e)
                            return "smbusResult." + e;
                    }
                }
                if (m.smbusReply != null && m.hasOwnProperty("smbusReply")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SmbusReplyFtraceEvent.verify(m.smbusReply);
                        if (e)
                            return "smbusReply." + e;
                    }
                }
                if (m.lowmemoryKill != null && m.hasOwnProperty("lowmemoryKill")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.LowmemoryKillFtraceEvent.verify(m.lowmemoryKill);
                        if (e)
                            return "lowmemoryKill." + e;
                    }
                }
                if (m.irqHandlerEntry != null && m.hasOwnProperty("irqHandlerEntry")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IrqHandlerEntryFtraceEvent.verify(m.irqHandlerEntry);
                        if (e)
                            return "irqHandlerEntry." + e;
                    }
                }
                if (m.irqHandlerExit != null && m.hasOwnProperty("irqHandlerExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IrqHandlerExitFtraceEvent.verify(m.irqHandlerExit);
                        if (e)
                            return "irqHandlerExit." + e;
                    }
                }
                if (m.syncPt != null && m.hasOwnProperty("syncPt")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SyncPtFtraceEvent.verify(m.syncPt);
                        if (e)
                            return "syncPt." + e;
                    }
                }
                if (m.syncTimeline != null && m.hasOwnProperty("syncTimeline")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SyncTimelineFtraceEvent.verify(m.syncTimeline);
                        if (e)
                            return "syncTimeline." + e;
                    }
                }
                if (m.syncWait != null && m.hasOwnProperty("syncWait")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SyncWaitFtraceEvent.verify(m.syncWait);
                        if (e)
                            return "syncWait." + e;
                    }
                }
                if (m.ext4DaWriteBegin != null && m.hasOwnProperty("ext4DaWriteBegin")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4DaWriteBeginFtraceEvent.verify(m.ext4DaWriteBegin);
                        if (e)
                            return "ext4DaWriteBegin." + e;
                    }
                }
                if (m.ext4DaWriteEnd != null && m.hasOwnProperty("ext4DaWriteEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4DaWriteEndFtraceEvent.verify(m.ext4DaWriteEnd);
                        if (e)
                            return "ext4DaWriteEnd." + e;
                    }
                }
                if (m.ext4SyncFileEnter != null && m.hasOwnProperty("ext4SyncFileEnter")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4SyncFileEnterFtraceEvent.verify(m.ext4SyncFileEnter);
                        if (e)
                            return "ext4SyncFileEnter." + e;
                    }
                }
                if (m.ext4SyncFileExit != null && m.hasOwnProperty("ext4SyncFileExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4SyncFileExitFtraceEvent.verify(m.ext4SyncFileExit);
                        if (e)
                            return "ext4SyncFileExit." + e;
                    }
                }
                if (m.blockRqIssue != null && m.hasOwnProperty("blockRqIssue")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BlockRqIssueFtraceEvent.verify(m.blockRqIssue);
                        if (e)
                            return "blockRqIssue." + e;
                    }
                }
                if (m.mmVmscanDirectReclaimBegin != null && m.hasOwnProperty("mmVmscanDirectReclaimBegin")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent.verify(m.mmVmscanDirectReclaimBegin);
                        if (e)
                            return "mmVmscanDirectReclaimBegin." + e;
                    }
                }
                if (m.mmVmscanDirectReclaimEnd != null && m.hasOwnProperty("mmVmscanDirectReclaimEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmVmscanDirectReclaimEndFtraceEvent.verify(m.mmVmscanDirectReclaimEnd);
                        if (e)
                            return "mmVmscanDirectReclaimEnd." + e;
                    }
                }
                if (m.mmVmscanKswapdWake != null && m.hasOwnProperty("mmVmscanKswapdWake")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmVmscanKswapdWakeFtraceEvent.verify(m.mmVmscanKswapdWake);
                        if (e)
                            return "mmVmscanKswapdWake." + e;
                    }
                }
                if (m.mmVmscanKswapdSleep != null && m.hasOwnProperty("mmVmscanKswapdSleep")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmVmscanKswapdSleepFtraceEvent.verify(m.mmVmscanKswapdSleep);
                        if (e)
                            return "mmVmscanKswapdSleep." + e;
                    }
                }
                if (m.binderTransaction != null && m.hasOwnProperty("binderTransaction")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BinderTransactionFtraceEvent.verify(m.binderTransaction);
                        if (e)
                            return "binderTransaction." + e;
                    }
                }
                if (m.binderTransactionReceived != null && m.hasOwnProperty("binderTransactionReceived")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BinderTransactionReceivedFtraceEvent.verify(m.binderTransactionReceived);
                        if (e)
                            return "binderTransactionReceived." + e;
                    }
                }
                if (m.binderSetPriority != null && m.hasOwnProperty("binderSetPriority")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BinderSetPriorityFtraceEvent.verify(m.binderSetPriority);
                        if (e)
                            return "binderSetPriority." + e;
                    }
                }
                if (m.binderLock != null && m.hasOwnProperty("binderLock")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BinderLockFtraceEvent.verify(m.binderLock);
                        if (e)
                            return "binderLock." + e;
                    }
                }
                if (m.binderLocked != null && m.hasOwnProperty("binderLocked")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BinderLockedFtraceEvent.verify(m.binderLocked);
                        if (e)
                            return "binderLocked." + e;
                    }
                }
                if (m.binderUnlock != null && m.hasOwnProperty("binderUnlock")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BinderUnlockFtraceEvent.verify(m.binderUnlock);
                        if (e)
                            return "binderUnlock." + e;
                    }
                }
                if (m.workqueueActivateWork != null && m.hasOwnProperty("workqueueActivateWork")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.WorkqueueActivateWorkFtraceEvent.verify(m.workqueueActivateWork);
                        if (e)
                            return "workqueueActivateWork." + e;
                    }
                }
                if (m.workqueueExecuteEnd != null && m.hasOwnProperty("workqueueExecuteEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.WorkqueueExecuteEndFtraceEvent.verify(m.workqueueExecuteEnd);
                        if (e)
                            return "workqueueExecuteEnd." + e;
                    }
                }
                if (m.workqueueExecuteStart != null && m.hasOwnProperty("workqueueExecuteStart")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.WorkqueueExecuteStartFtraceEvent.verify(m.workqueueExecuteStart);
                        if (e)
                            return "workqueueExecuteStart." + e;
                    }
                }
                if (m.workqueueQueueWork != null && m.hasOwnProperty("workqueueQueueWork")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.WorkqueueQueueWorkFtraceEvent.verify(m.workqueueQueueWork);
                        if (e)
                            return "workqueueQueueWork." + e;
                    }
                }
                if (m.regulatorDisable != null && m.hasOwnProperty("regulatorDisable")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.RegulatorDisableFtraceEvent.verify(m.regulatorDisable);
                        if (e)
                            return "regulatorDisable." + e;
                    }
                }
                if (m.regulatorDisableComplete != null && m.hasOwnProperty("regulatorDisableComplete")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.RegulatorDisableCompleteFtraceEvent.verify(m.regulatorDisableComplete);
                        if (e)
                            return "regulatorDisableComplete." + e;
                    }
                }
                if (m.regulatorEnable != null && m.hasOwnProperty("regulatorEnable")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.RegulatorEnableFtraceEvent.verify(m.regulatorEnable);
                        if (e)
                            return "regulatorEnable." + e;
                    }
                }
                if (m.regulatorEnableComplete != null && m.hasOwnProperty("regulatorEnableComplete")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.RegulatorEnableCompleteFtraceEvent.verify(m.regulatorEnableComplete);
                        if (e)
                            return "regulatorEnableComplete." + e;
                    }
                }
                if (m.regulatorEnableDelay != null && m.hasOwnProperty("regulatorEnableDelay")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.RegulatorEnableDelayFtraceEvent.verify(m.regulatorEnableDelay);
                        if (e)
                            return "regulatorEnableDelay." + e;
                    }
                }
                if (m.regulatorSetVoltage != null && m.hasOwnProperty("regulatorSetVoltage")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.RegulatorSetVoltageFtraceEvent.verify(m.regulatorSetVoltage);
                        if (e)
                            return "regulatorSetVoltage." + e;
                    }
                }
                if (m.regulatorSetVoltageComplete != null && m.hasOwnProperty("regulatorSetVoltageComplete")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent.verify(m.regulatorSetVoltageComplete);
                        if (e)
                            return "regulatorSetVoltageComplete." + e;
                    }
                }
                if (m.cgroupAttachTask != null && m.hasOwnProperty("cgroupAttachTask")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.CgroupAttachTaskFtraceEvent.verify(m.cgroupAttachTask);
                        if (e)
                            return "cgroupAttachTask." + e;
                    }
                }
                if (m.cgroupMkdir != null && m.hasOwnProperty("cgroupMkdir")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.CgroupMkdirFtraceEvent.verify(m.cgroupMkdir);
                        if (e)
                            return "cgroupMkdir." + e;
                    }
                }
                if (m.cgroupRemount != null && m.hasOwnProperty("cgroupRemount")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.CgroupRemountFtraceEvent.verify(m.cgroupRemount);
                        if (e)
                            return "cgroupRemount." + e;
                    }
                }
                if (m.cgroupRmdir != null && m.hasOwnProperty("cgroupRmdir")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.CgroupRmdirFtraceEvent.verify(m.cgroupRmdir);
                        if (e)
                            return "cgroupRmdir." + e;
                    }
                }
                if (m.cgroupTransferTasks != null && m.hasOwnProperty("cgroupTransferTasks")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.CgroupTransferTasksFtraceEvent.verify(m.cgroupTransferTasks);
                        if (e)
                            return "cgroupTransferTasks." + e;
                    }
                }
                if (m.cgroupDestroyRoot != null && m.hasOwnProperty("cgroupDestroyRoot")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.CgroupDestroyRootFtraceEvent.verify(m.cgroupDestroyRoot);
                        if (e)
                            return "cgroupDestroyRoot." + e;
                    }
                }
                if (m.cgroupRelease != null && m.hasOwnProperty("cgroupRelease")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.CgroupReleaseFtraceEvent.verify(m.cgroupRelease);
                        if (e)
                            return "cgroupRelease." + e;
                    }
                }
                if (m.cgroupRename != null && m.hasOwnProperty("cgroupRename")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.CgroupRenameFtraceEvent.verify(m.cgroupRename);
                        if (e)
                            return "cgroupRename." + e;
                    }
                }
                if (m.cgroupSetupRoot != null && m.hasOwnProperty("cgroupSetupRoot")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.CgroupSetupRootFtraceEvent.verify(m.cgroupSetupRoot);
                        if (e)
                            return "cgroupSetupRoot." + e;
                    }
                }
                if (m.mdpCmdKickoff != null && m.hasOwnProperty("mdpCmdKickoff")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MdpCmdKickoffFtraceEvent.verify(m.mdpCmdKickoff);
                        if (e)
                            return "mdpCmdKickoff." + e;
                    }
                }
                if (m.mdpCommit != null && m.hasOwnProperty("mdpCommit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MdpCommitFtraceEvent.verify(m.mdpCommit);
                        if (e)
                            return "mdpCommit." + e;
                    }
                }
                if (m.mdpPerfSetOt != null && m.hasOwnProperty("mdpPerfSetOt")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MdpPerfSetOtFtraceEvent.verify(m.mdpPerfSetOt);
                        if (e)
                            return "mdpPerfSetOt." + e;
                    }
                }
                if (m.mdpSsppChange != null && m.hasOwnProperty("mdpSsppChange")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MdpSsppChangeFtraceEvent.verify(m.mdpSsppChange);
                        if (e)
                            return "mdpSsppChange." + e;
                    }
                }
                if (m.tracingMarkWrite != null && m.hasOwnProperty("tracingMarkWrite")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.TracingMarkWriteFtraceEvent.verify(m.tracingMarkWrite);
                        if (e)
                            return "tracingMarkWrite." + e;
                    }
                }
                if (m.mdpCmdPingpongDone != null && m.hasOwnProperty("mdpCmdPingpongDone")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MdpCmdPingpongDoneFtraceEvent.verify(m.mdpCmdPingpongDone);
                        if (e)
                            return "mdpCmdPingpongDone." + e;
                    }
                }
                if (m.mdpCompareBw != null && m.hasOwnProperty("mdpCompareBw")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MdpCompareBwFtraceEvent.verify(m.mdpCompareBw);
                        if (e)
                            return "mdpCompareBw." + e;
                    }
                }
                if (m.mdpPerfSetPanicLuts != null && m.hasOwnProperty("mdpPerfSetPanicLuts")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MdpPerfSetPanicLutsFtraceEvent.verify(m.mdpPerfSetPanicLuts);
                        if (e)
                            return "mdpPerfSetPanicLuts." + e;
                    }
                }
                if (m.mdpSsppSet != null && m.hasOwnProperty("mdpSsppSet")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MdpSsppSetFtraceEvent.verify(m.mdpSsppSet);
                        if (e)
                            return "mdpSsppSet." + e;
                    }
                }
                if (m.mdpCmdReadptrDone != null && m.hasOwnProperty("mdpCmdReadptrDone")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MdpCmdReadptrDoneFtraceEvent.verify(m.mdpCmdReadptrDone);
                        if (e)
                            return "mdpCmdReadptrDone." + e;
                    }
                }
                if (m.mdpMisrCrc != null && m.hasOwnProperty("mdpMisrCrc")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MdpMisrCrcFtraceEvent.verify(m.mdpMisrCrc);
                        if (e)
                            return "mdpMisrCrc." + e;
                    }
                }
                if (m.mdpPerfSetQosLuts != null && m.hasOwnProperty("mdpPerfSetQosLuts")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MdpPerfSetQosLutsFtraceEvent.verify(m.mdpPerfSetQosLuts);
                        if (e)
                            return "mdpPerfSetQosLuts." + e;
                    }
                }
                if (m.mdpTraceCounter != null && m.hasOwnProperty("mdpTraceCounter")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MdpTraceCounterFtraceEvent.verify(m.mdpTraceCounter);
                        if (e)
                            return "mdpTraceCounter." + e;
                    }
                }
                if (m.mdpCmdReleaseBw != null && m.hasOwnProperty("mdpCmdReleaseBw")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MdpCmdReleaseBwFtraceEvent.verify(m.mdpCmdReleaseBw);
                        if (e)
                            return "mdpCmdReleaseBw." + e;
                    }
                }
                if (m.mdpMixerUpdate != null && m.hasOwnProperty("mdpMixerUpdate")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MdpMixerUpdateFtraceEvent.verify(m.mdpMixerUpdate);
                        if (e)
                            return "mdpMixerUpdate." + e;
                    }
                }
                if (m.mdpPerfSetWmLevels != null && m.hasOwnProperty("mdpPerfSetWmLevels")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MdpPerfSetWmLevelsFtraceEvent.verify(m.mdpPerfSetWmLevels);
                        if (e)
                            return "mdpPerfSetWmLevels." + e;
                    }
                }
                if (m.mdpVideoUnderrunDone != null && m.hasOwnProperty("mdpVideoUnderrunDone")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MdpVideoUnderrunDoneFtraceEvent.verify(m.mdpVideoUnderrunDone);
                        if (e)
                            return "mdpVideoUnderrunDone." + e;
                    }
                }
                if (m.mdpCmdWaitPingpong != null && m.hasOwnProperty("mdpCmdWaitPingpong")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MdpCmdWaitPingpongFtraceEvent.verify(m.mdpCmdWaitPingpong);
                        if (e)
                            return "mdpCmdWaitPingpong." + e;
                    }
                }
                if (m.mdpPerfPrefillCalc != null && m.hasOwnProperty("mdpPerfPrefillCalc")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MdpPerfPrefillCalcFtraceEvent.verify(m.mdpPerfPrefillCalc);
                        if (e)
                            return "mdpPerfPrefillCalc." + e;
                    }
                }
                if (m.mdpPerfUpdateBus != null && m.hasOwnProperty("mdpPerfUpdateBus")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MdpPerfUpdateBusFtraceEvent.verify(m.mdpPerfUpdateBus);
                        if (e)
                            return "mdpPerfUpdateBus." + e;
                    }
                }
                if (m.rotatorBwAoAsContext != null && m.hasOwnProperty("rotatorBwAoAsContext")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.RotatorBwAoAsContextFtraceEvent.verify(m.rotatorBwAoAsContext);
                        if (e)
                            return "rotatorBwAoAsContext." + e;
                    }
                }
                if (m.mmFilemapAddToPageCache != null && m.hasOwnProperty("mmFilemapAddToPageCache")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmFilemapAddToPageCacheFtraceEvent.verify(m.mmFilemapAddToPageCache);
                        if (e)
                            return "mmFilemapAddToPageCache." + e;
                    }
                }
                if (m.mmFilemapDeleteFromPageCache != null && m.hasOwnProperty("mmFilemapDeleteFromPageCache")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent.verify(m.mmFilemapDeleteFromPageCache);
                        if (e)
                            return "mmFilemapDeleteFromPageCache." + e;
                    }
                }
                if (m.mmCompactionBegin != null && m.hasOwnProperty("mmCompactionBegin")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmCompactionBeginFtraceEvent.verify(m.mmCompactionBegin);
                        if (e)
                            return "mmCompactionBegin." + e;
                    }
                }
                if (m.mmCompactionDeferCompaction != null && m.hasOwnProperty("mmCompactionDeferCompaction")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmCompactionDeferCompactionFtraceEvent.verify(m.mmCompactionDeferCompaction);
                        if (e)
                            return "mmCompactionDeferCompaction." + e;
                    }
                }
                if (m.mmCompactionDeferred != null && m.hasOwnProperty("mmCompactionDeferred")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmCompactionDeferredFtraceEvent.verify(m.mmCompactionDeferred);
                        if (e)
                            return "mmCompactionDeferred." + e;
                    }
                }
                if (m.mmCompactionDeferReset != null && m.hasOwnProperty("mmCompactionDeferReset")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmCompactionDeferResetFtraceEvent.verify(m.mmCompactionDeferReset);
                        if (e)
                            return "mmCompactionDeferReset." + e;
                    }
                }
                if (m.mmCompactionEnd != null && m.hasOwnProperty("mmCompactionEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmCompactionEndFtraceEvent.verify(m.mmCompactionEnd);
                        if (e)
                            return "mmCompactionEnd." + e;
                    }
                }
                if (m.mmCompactionFinished != null && m.hasOwnProperty("mmCompactionFinished")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmCompactionFinishedFtraceEvent.verify(m.mmCompactionFinished);
                        if (e)
                            return "mmCompactionFinished." + e;
                    }
                }
                if (m.mmCompactionIsolateFreepages != null && m.hasOwnProperty("mmCompactionIsolateFreepages")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent.verify(m.mmCompactionIsolateFreepages);
                        if (e)
                            return "mmCompactionIsolateFreepages." + e;
                    }
                }
                if (m.mmCompactionIsolateMigratepages != null && m.hasOwnProperty("mmCompactionIsolateMigratepages")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent.verify(m.mmCompactionIsolateMigratepages);
                        if (e)
                            return "mmCompactionIsolateMigratepages." + e;
                    }
                }
                if (m.mmCompactionKcompactdSleep != null && m.hasOwnProperty("mmCompactionKcompactdSleep")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmCompactionKcompactdSleepFtraceEvent.verify(m.mmCompactionKcompactdSleep);
                        if (e)
                            return "mmCompactionKcompactdSleep." + e;
                    }
                }
                if (m.mmCompactionKcompactdWake != null && m.hasOwnProperty("mmCompactionKcompactdWake")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmCompactionKcompactdWakeFtraceEvent.verify(m.mmCompactionKcompactdWake);
                        if (e)
                            return "mmCompactionKcompactdWake." + e;
                    }
                }
                if (m.mmCompactionMigratepages != null && m.hasOwnProperty("mmCompactionMigratepages")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmCompactionMigratepagesFtraceEvent.verify(m.mmCompactionMigratepages);
                        if (e)
                            return "mmCompactionMigratepages." + e;
                    }
                }
                if (m.mmCompactionSuitable != null && m.hasOwnProperty("mmCompactionSuitable")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmCompactionSuitableFtraceEvent.verify(m.mmCompactionSuitable);
                        if (e)
                            return "mmCompactionSuitable." + e;
                    }
                }
                if (m.mmCompactionTryToCompactPages != null && m.hasOwnProperty("mmCompactionTryToCompactPages")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent.verify(m.mmCompactionTryToCompactPages);
                        if (e)
                            return "mmCompactionTryToCompactPages." + e;
                    }
                }
                if (m.mmCompactionWakeupKcompactd != null && m.hasOwnProperty("mmCompactionWakeupKcompactd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent.verify(m.mmCompactionWakeupKcompactd);
                        if (e)
                            return "mmCompactionWakeupKcompactd." + e;
                    }
                }
                if (m.suspendResume != null && m.hasOwnProperty("suspendResume")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SuspendResumeFtraceEvent.verify(m.suspendResume);
                        if (e)
                            return "suspendResume." + e;
                    }
                }
                if (m.schedWakeupNew != null && m.hasOwnProperty("schedWakeupNew")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SchedWakeupNewFtraceEvent.verify(m.schedWakeupNew);
                        if (e)
                            return "schedWakeupNew." + e;
                    }
                }
                if (m.blockBioBackmerge != null && m.hasOwnProperty("blockBioBackmerge")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BlockBioBackmergeFtraceEvent.verify(m.blockBioBackmerge);
                        if (e)
                            return "blockBioBackmerge." + e;
                    }
                }
                if (m.blockBioBounce != null && m.hasOwnProperty("blockBioBounce")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BlockBioBounceFtraceEvent.verify(m.blockBioBounce);
                        if (e)
                            return "blockBioBounce." + e;
                    }
                }
                if (m.blockBioComplete != null && m.hasOwnProperty("blockBioComplete")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BlockBioCompleteFtraceEvent.verify(m.blockBioComplete);
                        if (e)
                            return "blockBioComplete." + e;
                    }
                }
                if (m.blockBioFrontmerge != null && m.hasOwnProperty("blockBioFrontmerge")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BlockBioFrontmergeFtraceEvent.verify(m.blockBioFrontmerge);
                        if (e)
                            return "blockBioFrontmerge." + e;
                    }
                }
                if (m.blockBioQueue != null && m.hasOwnProperty("blockBioQueue")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BlockBioQueueFtraceEvent.verify(m.blockBioQueue);
                        if (e)
                            return "blockBioQueue." + e;
                    }
                }
                if (m.blockBioRemap != null && m.hasOwnProperty("blockBioRemap")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BlockBioRemapFtraceEvent.verify(m.blockBioRemap);
                        if (e)
                            return "blockBioRemap." + e;
                    }
                }
                if (m.blockDirtyBuffer != null && m.hasOwnProperty("blockDirtyBuffer")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BlockDirtyBufferFtraceEvent.verify(m.blockDirtyBuffer);
                        if (e)
                            return "blockDirtyBuffer." + e;
                    }
                }
                if (m.blockGetrq != null && m.hasOwnProperty("blockGetrq")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BlockGetrqFtraceEvent.verify(m.blockGetrq);
                        if (e)
                            return "blockGetrq." + e;
                    }
                }
                if (m.blockPlug != null && m.hasOwnProperty("blockPlug")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BlockPlugFtraceEvent.verify(m.blockPlug);
                        if (e)
                            return "blockPlug." + e;
                    }
                }
                if (m.blockRqAbort != null && m.hasOwnProperty("blockRqAbort")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BlockRqAbortFtraceEvent.verify(m.blockRqAbort);
                        if (e)
                            return "blockRqAbort." + e;
                    }
                }
                if (m.blockRqComplete != null && m.hasOwnProperty("blockRqComplete")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BlockRqCompleteFtraceEvent.verify(m.blockRqComplete);
                        if (e)
                            return "blockRqComplete." + e;
                    }
                }
                if (m.blockRqInsert != null && m.hasOwnProperty("blockRqInsert")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BlockRqInsertFtraceEvent.verify(m.blockRqInsert);
                        if (e)
                            return "blockRqInsert." + e;
                    }
                }
                if (m.blockRqRemap != null && m.hasOwnProperty("blockRqRemap")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BlockRqRemapFtraceEvent.verify(m.blockRqRemap);
                        if (e)
                            return "blockRqRemap." + e;
                    }
                }
                if (m.blockRqRequeue != null && m.hasOwnProperty("blockRqRequeue")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BlockRqRequeueFtraceEvent.verify(m.blockRqRequeue);
                        if (e)
                            return "blockRqRequeue." + e;
                    }
                }
                if (m.blockSleeprq != null && m.hasOwnProperty("blockSleeprq")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BlockSleeprqFtraceEvent.verify(m.blockSleeprq);
                        if (e)
                            return "blockSleeprq." + e;
                    }
                }
                if (m.blockSplit != null && m.hasOwnProperty("blockSplit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BlockSplitFtraceEvent.verify(m.blockSplit);
                        if (e)
                            return "blockSplit." + e;
                    }
                }
                if (m.blockTouchBuffer != null && m.hasOwnProperty("blockTouchBuffer")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BlockTouchBufferFtraceEvent.verify(m.blockTouchBuffer);
                        if (e)
                            return "blockTouchBuffer." + e;
                    }
                }
                if (m.blockUnplug != null && m.hasOwnProperty("blockUnplug")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BlockUnplugFtraceEvent.verify(m.blockUnplug);
                        if (e)
                            return "blockUnplug." + e;
                    }
                }
                if (m.ext4AllocDaBlocks != null && m.hasOwnProperty("ext4AllocDaBlocks")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4AllocDaBlocksFtraceEvent.verify(m.ext4AllocDaBlocks);
                        if (e)
                            return "ext4AllocDaBlocks." + e;
                    }
                }
                if (m.ext4AllocateBlocks != null && m.hasOwnProperty("ext4AllocateBlocks")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4AllocateBlocksFtraceEvent.verify(m.ext4AllocateBlocks);
                        if (e)
                            return "ext4AllocateBlocks." + e;
                    }
                }
                if (m.ext4AllocateInode != null && m.hasOwnProperty("ext4AllocateInode")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4AllocateInodeFtraceEvent.verify(m.ext4AllocateInode);
                        if (e)
                            return "ext4AllocateInode." + e;
                    }
                }
                if (m.ext4BeginOrderedTruncate != null && m.hasOwnProperty("ext4BeginOrderedTruncate")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent.verify(m.ext4BeginOrderedTruncate);
                        if (e)
                            return "ext4BeginOrderedTruncate." + e;
                    }
                }
                if (m.ext4CollapseRange != null && m.hasOwnProperty("ext4CollapseRange")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4CollapseRangeFtraceEvent.verify(m.ext4CollapseRange);
                        if (e)
                            return "ext4CollapseRange." + e;
                    }
                }
                if (m.ext4DaReleaseSpace != null && m.hasOwnProperty("ext4DaReleaseSpace")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4DaReleaseSpaceFtraceEvent.verify(m.ext4DaReleaseSpace);
                        if (e)
                            return "ext4DaReleaseSpace." + e;
                    }
                }
                if (m.ext4DaReserveSpace != null && m.hasOwnProperty("ext4DaReserveSpace")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4DaReserveSpaceFtraceEvent.verify(m.ext4DaReserveSpace);
                        if (e)
                            return "ext4DaReserveSpace." + e;
                    }
                }
                if (m.ext4DaUpdateReserveSpace != null && m.hasOwnProperty("ext4DaUpdateReserveSpace")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent.verify(m.ext4DaUpdateReserveSpace);
                        if (e)
                            return "ext4DaUpdateReserveSpace." + e;
                    }
                }
                if (m.ext4DaWritePages != null && m.hasOwnProperty("ext4DaWritePages")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4DaWritePagesFtraceEvent.verify(m.ext4DaWritePages);
                        if (e)
                            return "ext4DaWritePages." + e;
                    }
                }
                if (m.ext4DaWritePagesExtent != null && m.hasOwnProperty("ext4DaWritePagesExtent")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4DaWritePagesExtentFtraceEvent.verify(m.ext4DaWritePagesExtent);
                        if (e)
                            return "ext4DaWritePagesExtent." + e;
                    }
                }
                if (m.ext4Direct_IOEnter != null && m.hasOwnProperty("ext4Direct_IOEnter")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4DirectIOEnterFtraceEvent.verify(m.ext4Direct_IOEnter);
                        if (e)
                            return "ext4Direct_IOEnter." + e;
                    }
                }
                if (m.ext4Direct_IOExit != null && m.hasOwnProperty("ext4Direct_IOExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4DirectIOExitFtraceEvent.verify(m.ext4Direct_IOExit);
                        if (e)
                            return "ext4Direct_IOExit." + e;
                    }
                }
                if (m.ext4DiscardBlocks != null && m.hasOwnProperty("ext4DiscardBlocks")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4DiscardBlocksFtraceEvent.verify(m.ext4DiscardBlocks);
                        if (e)
                            return "ext4DiscardBlocks." + e;
                    }
                }
                if (m.ext4DiscardPreallocations != null && m.hasOwnProperty("ext4DiscardPreallocations")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4DiscardPreallocationsFtraceEvent.verify(m.ext4DiscardPreallocations);
                        if (e)
                            return "ext4DiscardPreallocations." + e;
                    }
                }
                if (m.ext4DropInode != null && m.hasOwnProperty("ext4DropInode")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4DropInodeFtraceEvent.verify(m.ext4DropInode);
                        if (e)
                            return "ext4DropInode." + e;
                    }
                }
                if (m.ext4EsCacheExtent != null && m.hasOwnProperty("ext4EsCacheExtent")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4EsCacheExtentFtraceEvent.verify(m.ext4EsCacheExtent);
                        if (e)
                            return "ext4EsCacheExtent." + e;
                    }
                }
                if (m.ext4EsFindDelayedExtentRangeEnter != null && m.hasOwnProperty("ext4EsFindDelayedExtentRangeEnter")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent.verify(m.ext4EsFindDelayedExtentRangeEnter);
                        if (e)
                            return "ext4EsFindDelayedExtentRangeEnter." + e;
                    }
                }
                if (m.ext4EsFindDelayedExtentRangeExit != null && m.hasOwnProperty("ext4EsFindDelayedExtentRangeExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent.verify(m.ext4EsFindDelayedExtentRangeExit);
                        if (e)
                            return "ext4EsFindDelayedExtentRangeExit." + e;
                    }
                }
                if (m.ext4EsInsertExtent != null && m.hasOwnProperty("ext4EsInsertExtent")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4EsInsertExtentFtraceEvent.verify(m.ext4EsInsertExtent);
                        if (e)
                            return "ext4EsInsertExtent." + e;
                    }
                }
                if (m.ext4EsLookupExtentEnter != null && m.hasOwnProperty("ext4EsLookupExtentEnter")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent.verify(m.ext4EsLookupExtentEnter);
                        if (e)
                            return "ext4EsLookupExtentEnter." + e;
                    }
                }
                if (m.ext4EsLookupExtentExit != null && m.hasOwnProperty("ext4EsLookupExtentExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4EsLookupExtentExitFtraceEvent.verify(m.ext4EsLookupExtentExit);
                        if (e)
                            return "ext4EsLookupExtentExit." + e;
                    }
                }
                if (m.ext4EsRemoveExtent != null && m.hasOwnProperty("ext4EsRemoveExtent")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4EsRemoveExtentFtraceEvent.verify(m.ext4EsRemoveExtent);
                        if (e)
                            return "ext4EsRemoveExtent." + e;
                    }
                }
                if (m.ext4EsShrink != null && m.hasOwnProperty("ext4EsShrink")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4EsShrinkFtraceEvent.verify(m.ext4EsShrink);
                        if (e)
                            return "ext4EsShrink." + e;
                    }
                }
                if (m.ext4EsShrinkCount != null && m.hasOwnProperty("ext4EsShrinkCount")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4EsShrinkCountFtraceEvent.verify(m.ext4EsShrinkCount);
                        if (e)
                            return "ext4EsShrinkCount." + e;
                    }
                }
                if (m.ext4EsShrinkScanEnter != null && m.hasOwnProperty("ext4EsShrinkScanEnter")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent.verify(m.ext4EsShrinkScanEnter);
                        if (e)
                            return "ext4EsShrinkScanEnter." + e;
                    }
                }
                if (m.ext4EsShrinkScanExit != null && m.hasOwnProperty("ext4EsShrinkScanExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4EsShrinkScanExitFtraceEvent.verify(m.ext4EsShrinkScanExit);
                        if (e)
                            return "ext4EsShrinkScanExit." + e;
                    }
                }
                if (m.ext4EvictInode != null && m.hasOwnProperty("ext4EvictInode")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4EvictInodeFtraceEvent.verify(m.ext4EvictInode);
                        if (e)
                            return "ext4EvictInode." + e;
                    }
                }
                if (m.ext4ExtConvertToInitializedEnter != null && m.hasOwnProperty("ext4ExtConvertToInitializedEnter")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent.verify(m.ext4ExtConvertToInitializedEnter);
                        if (e)
                            return "ext4ExtConvertToInitializedEnter." + e;
                    }
                }
                if (m.ext4ExtConvertToInitializedFastpath != null && m.hasOwnProperty("ext4ExtConvertToInitializedFastpath")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent.verify(m.ext4ExtConvertToInitializedFastpath);
                        if (e)
                            return "ext4ExtConvertToInitializedFastpath." + e;
                    }
                }
                if (m.ext4ExtHandleUnwrittenExtents != null && m.hasOwnProperty("ext4ExtHandleUnwrittenExtents")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent.verify(m.ext4ExtHandleUnwrittenExtents);
                        if (e)
                            return "ext4ExtHandleUnwrittenExtents." + e;
                    }
                }
                if (m.ext4ExtInCache != null && m.hasOwnProperty("ext4ExtInCache")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4ExtInCacheFtraceEvent.verify(m.ext4ExtInCache);
                        if (e)
                            return "ext4ExtInCache." + e;
                    }
                }
                if (m.ext4ExtLoadExtent != null && m.hasOwnProperty("ext4ExtLoadExtent")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4ExtLoadExtentFtraceEvent.verify(m.ext4ExtLoadExtent);
                        if (e)
                            return "ext4ExtLoadExtent." + e;
                    }
                }
                if (m.ext4ExtMapBlocksEnter != null && m.hasOwnProperty("ext4ExtMapBlocksEnter")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent.verify(m.ext4ExtMapBlocksEnter);
                        if (e)
                            return "ext4ExtMapBlocksEnter." + e;
                    }
                }
                if (m.ext4ExtMapBlocksExit != null && m.hasOwnProperty("ext4ExtMapBlocksExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent.verify(m.ext4ExtMapBlocksExit);
                        if (e)
                            return "ext4ExtMapBlocksExit." + e;
                    }
                }
                if (m.ext4ExtPutInCache != null && m.hasOwnProperty("ext4ExtPutInCache")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4ExtPutInCacheFtraceEvent.verify(m.ext4ExtPutInCache);
                        if (e)
                            return "ext4ExtPutInCache." + e;
                    }
                }
                if (m.ext4ExtRemoveSpace != null && m.hasOwnProperty("ext4ExtRemoveSpace")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent.verify(m.ext4ExtRemoveSpace);
                        if (e)
                            return "ext4ExtRemoveSpace." + e;
                    }
                }
                if (m.ext4ExtRemoveSpaceDone != null && m.hasOwnProperty("ext4ExtRemoveSpaceDone")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent.verify(m.ext4ExtRemoveSpaceDone);
                        if (e)
                            return "ext4ExtRemoveSpaceDone." + e;
                    }
                }
                if (m.ext4ExtRmIdx != null && m.hasOwnProperty("ext4ExtRmIdx")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4ExtRmIdxFtraceEvent.verify(m.ext4ExtRmIdx);
                        if (e)
                            return "ext4ExtRmIdx." + e;
                    }
                }
                if (m.ext4ExtRmLeaf != null && m.hasOwnProperty("ext4ExtRmLeaf")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4ExtRmLeafFtraceEvent.verify(m.ext4ExtRmLeaf);
                        if (e)
                            return "ext4ExtRmLeaf." + e;
                    }
                }
                if (m.ext4ExtShowExtent != null && m.hasOwnProperty("ext4ExtShowExtent")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4ExtShowExtentFtraceEvent.verify(m.ext4ExtShowExtent);
                        if (e)
                            return "ext4ExtShowExtent." + e;
                    }
                }
                if (m.ext4FallocateEnter != null && m.hasOwnProperty("ext4FallocateEnter")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4FallocateEnterFtraceEvent.verify(m.ext4FallocateEnter);
                        if (e)
                            return "ext4FallocateEnter." + e;
                    }
                }
                if (m.ext4FallocateExit != null && m.hasOwnProperty("ext4FallocateExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4FallocateExitFtraceEvent.verify(m.ext4FallocateExit);
                        if (e)
                            return "ext4FallocateExit." + e;
                    }
                }
                if (m.ext4FindDelallocRange != null && m.hasOwnProperty("ext4FindDelallocRange")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4FindDelallocRangeFtraceEvent.verify(m.ext4FindDelallocRange);
                        if (e)
                            return "ext4FindDelallocRange." + e;
                    }
                }
                if (m.ext4Forget != null && m.hasOwnProperty("ext4Forget")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4ForgetFtraceEvent.verify(m.ext4Forget);
                        if (e)
                            return "ext4Forget." + e;
                    }
                }
                if (m.ext4FreeBlocks != null && m.hasOwnProperty("ext4FreeBlocks")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4FreeBlocksFtraceEvent.verify(m.ext4FreeBlocks);
                        if (e)
                            return "ext4FreeBlocks." + e;
                    }
                }
                if (m.ext4FreeInode != null && m.hasOwnProperty("ext4FreeInode")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4FreeInodeFtraceEvent.verify(m.ext4FreeInode);
                        if (e)
                            return "ext4FreeInode." + e;
                    }
                }
                if (m.ext4GetImpliedClusterAllocExit != null && m.hasOwnProperty("ext4GetImpliedClusterAllocExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent.verify(m.ext4GetImpliedClusterAllocExit);
                        if (e)
                            return "ext4GetImpliedClusterAllocExit." + e;
                    }
                }
                if (m.ext4GetReservedClusterAlloc != null && m.hasOwnProperty("ext4GetReservedClusterAlloc")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent.verify(m.ext4GetReservedClusterAlloc);
                        if (e)
                            return "ext4GetReservedClusterAlloc." + e;
                    }
                }
                if (m.ext4IndMapBlocksEnter != null && m.hasOwnProperty("ext4IndMapBlocksEnter")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent.verify(m.ext4IndMapBlocksEnter);
                        if (e)
                            return "ext4IndMapBlocksEnter." + e;
                    }
                }
                if (m.ext4IndMapBlocksExit != null && m.hasOwnProperty("ext4IndMapBlocksExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4IndMapBlocksExitFtraceEvent.verify(m.ext4IndMapBlocksExit);
                        if (e)
                            return "ext4IndMapBlocksExit." + e;
                    }
                }
                if (m.ext4InsertRange != null && m.hasOwnProperty("ext4InsertRange")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4InsertRangeFtraceEvent.verify(m.ext4InsertRange);
                        if (e)
                            return "ext4InsertRange." + e;
                    }
                }
                if (m.ext4Invalidatepage != null && m.hasOwnProperty("ext4Invalidatepage")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4InvalidatepageFtraceEvent.verify(m.ext4Invalidatepage);
                        if (e)
                            return "ext4Invalidatepage." + e;
                    }
                }
                if (m.ext4JournalStart != null && m.hasOwnProperty("ext4JournalStart")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4JournalStartFtraceEvent.verify(m.ext4JournalStart);
                        if (e)
                            return "ext4JournalStart." + e;
                    }
                }
                if (m.ext4JournalStartReserved != null && m.hasOwnProperty("ext4JournalStartReserved")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4JournalStartReservedFtraceEvent.verify(m.ext4JournalStartReserved);
                        if (e)
                            return "ext4JournalStartReserved." + e;
                    }
                }
                if (m.ext4JournalledInvalidatepage != null && m.hasOwnProperty("ext4JournalledInvalidatepage")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent.verify(m.ext4JournalledInvalidatepage);
                        if (e)
                            return "ext4JournalledInvalidatepage." + e;
                    }
                }
                if (m.ext4JournalledWriteEnd != null && m.hasOwnProperty("ext4JournalledWriteEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4JournalledWriteEndFtraceEvent.verify(m.ext4JournalledWriteEnd);
                        if (e)
                            return "ext4JournalledWriteEnd." + e;
                    }
                }
                if (m.ext4LoadInode != null && m.hasOwnProperty("ext4LoadInode")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4LoadInodeFtraceEvent.verify(m.ext4LoadInode);
                        if (e)
                            return "ext4LoadInode." + e;
                    }
                }
                if (m.ext4LoadInodeBitmap != null && m.hasOwnProperty("ext4LoadInodeBitmap")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4LoadInodeBitmapFtraceEvent.verify(m.ext4LoadInodeBitmap);
                        if (e)
                            return "ext4LoadInodeBitmap." + e;
                    }
                }
                if (m.ext4MarkInodeDirty != null && m.hasOwnProperty("ext4MarkInodeDirty")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4MarkInodeDirtyFtraceEvent.verify(m.ext4MarkInodeDirty);
                        if (e)
                            return "ext4MarkInodeDirty." + e;
                    }
                }
                if (m.ext4MbBitmapLoad != null && m.hasOwnProperty("ext4MbBitmapLoad")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4MbBitmapLoadFtraceEvent.verify(m.ext4MbBitmapLoad);
                        if (e)
                            return "ext4MbBitmapLoad." + e;
                    }
                }
                if (m.ext4MbBuddyBitmapLoad != null && m.hasOwnProperty("ext4MbBuddyBitmapLoad")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent.verify(m.ext4MbBuddyBitmapLoad);
                        if (e)
                            return "ext4MbBuddyBitmapLoad." + e;
                    }
                }
                if (m.ext4MbDiscardPreallocations != null && m.hasOwnProperty("ext4MbDiscardPreallocations")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent.verify(m.ext4MbDiscardPreallocations);
                        if (e)
                            return "ext4MbDiscardPreallocations." + e;
                    }
                }
                if (m.ext4MbNewGroupPa != null && m.hasOwnProperty("ext4MbNewGroupPa")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4MbNewGroupPaFtraceEvent.verify(m.ext4MbNewGroupPa);
                        if (e)
                            return "ext4MbNewGroupPa." + e;
                    }
                }
                if (m.ext4MbNewInodePa != null && m.hasOwnProperty("ext4MbNewInodePa")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4MbNewInodePaFtraceEvent.verify(m.ext4MbNewInodePa);
                        if (e)
                            return "ext4MbNewInodePa." + e;
                    }
                }
                if (m.ext4MbReleaseGroupPa != null && m.hasOwnProperty("ext4MbReleaseGroupPa")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent.verify(m.ext4MbReleaseGroupPa);
                        if (e)
                            return "ext4MbReleaseGroupPa." + e;
                    }
                }
                if (m.ext4MbReleaseInodePa != null && m.hasOwnProperty("ext4MbReleaseInodePa")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4MbReleaseInodePaFtraceEvent.verify(m.ext4MbReleaseInodePa);
                        if (e)
                            return "ext4MbReleaseInodePa." + e;
                    }
                }
                if (m.ext4MballocAlloc != null && m.hasOwnProperty("ext4MballocAlloc")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4MballocAllocFtraceEvent.verify(m.ext4MballocAlloc);
                        if (e)
                            return "ext4MballocAlloc." + e;
                    }
                }
                if (m.ext4MballocDiscard != null && m.hasOwnProperty("ext4MballocDiscard")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4MballocDiscardFtraceEvent.verify(m.ext4MballocDiscard);
                        if (e)
                            return "ext4MballocDiscard." + e;
                    }
                }
                if (m.ext4MballocFree != null && m.hasOwnProperty("ext4MballocFree")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4MballocFreeFtraceEvent.verify(m.ext4MballocFree);
                        if (e)
                            return "ext4MballocFree." + e;
                    }
                }
                if (m.ext4MballocPrealloc != null && m.hasOwnProperty("ext4MballocPrealloc")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4MballocPreallocFtraceEvent.verify(m.ext4MballocPrealloc);
                        if (e)
                            return "ext4MballocPrealloc." + e;
                    }
                }
                if (m.ext4OtherInodeUpdateTime != null && m.hasOwnProperty("ext4OtherInodeUpdateTime")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent.verify(m.ext4OtherInodeUpdateTime);
                        if (e)
                            return "ext4OtherInodeUpdateTime." + e;
                    }
                }
                if (m.ext4PunchHole != null && m.hasOwnProperty("ext4PunchHole")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4PunchHoleFtraceEvent.verify(m.ext4PunchHole);
                        if (e)
                            return "ext4PunchHole." + e;
                    }
                }
                if (m.ext4ReadBlockBitmapLoad != null && m.hasOwnProperty("ext4ReadBlockBitmapLoad")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent.verify(m.ext4ReadBlockBitmapLoad);
                        if (e)
                            return "ext4ReadBlockBitmapLoad." + e;
                    }
                }
                if (m.ext4Readpage != null && m.hasOwnProperty("ext4Readpage")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4ReadpageFtraceEvent.verify(m.ext4Readpage);
                        if (e)
                            return "ext4Readpage." + e;
                    }
                }
                if (m.ext4Releasepage != null && m.hasOwnProperty("ext4Releasepage")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4ReleasepageFtraceEvent.verify(m.ext4Releasepage);
                        if (e)
                            return "ext4Releasepage." + e;
                    }
                }
                if (m.ext4RemoveBlocks != null && m.hasOwnProperty("ext4RemoveBlocks")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4RemoveBlocksFtraceEvent.verify(m.ext4RemoveBlocks);
                        if (e)
                            return "ext4RemoveBlocks." + e;
                    }
                }
                if (m.ext4RequestBlocks != null && m.hasOwnProperty("ext4RequestBlocks")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4RequestBlocksFtraceEvent.verify(m.ext4RequestBlocks);
                        if (e)
                            return "ext4RequestBlocks." + e;
                    }
                }
                if (m.ext4RequestInode != null && m.hasOwnProperty("ext4RequestInode")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4RequestInodeFtraceEvent.verify(m.ext4RequestInode);
                        if (e)
                            return "ext4RequestInode." + e;
                    }
                }
                if (m.ext4SyncFs != null && m.hasOwnProperty("ext4SyncFs")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4SyncFsFtraceEvent.verify(m.ext4SyncFs);
                        if (e)
                            return "ext4SyncFs." + e;
                    }
                }
                if (m.ext4TrimAllFree != null && m.hasOwnProperty("ext4TrimAllFree")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4TrimAllFreeFtraceEvent.verify(m.ext4TrimAllFree);
                        if (e)
                            return "ext4TrimAllFree." + e;
                    }
                }
                if (m.ext4TrimExtent != null && m.hasOwnProperty("ext4TrimExtent")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4TrimExtentFtraceEvent.verify(m.ext4TrimExtent);
                        if (e)
                            return "ext4TrimExtent." + e;
                    }
                }
                if (m.ext4TruncateEnter != null && m.hasOwnProperty("ext4TruncateEnter")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4TruncateEnterFtraceEvent.verify(m.ext4TruncateEnter);
                        if (e)
                            return "ext4TruncateEnter." + e;
                    }
                }
                if (m.ext4TruncateExit != null && m.hasOwnProperty("ext4TruncateExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4TruncateExitFtraceEvent.verify(m.ext4TruncateExit);
                        if (e)
                            return "ext4TruncateExit." + e;
                    }
                }
                if (m.ext4UnlinkEnter != null && m.hasOwnProperty("ext4UnlinkEnter")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4UnlinkEnterFtraceEvent.verify(m.ext4UnlinkEnter);
                        if (e)
                            return "ext4UnlinkEnter." + e;
                    }
                }
                if (m.ext4UnlinkExit != null && m.hasOwnProperty("ext4UnlinkExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4UnlinkExitFtraceEvent.verify(m.ext4UnlinkExit);
                        if (e)
                            return "ext4UnlinkExit." + e;
                    }
                }
                if (m.ext4WriteBegin != null && m.hasOwnProperty("ext4WriteBegin")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4WriteBeginFtraceEvent.verify(m.ext4WriteBegin);
                        if (e)
                            return "ext4WriteBegin." + e;
                    }
                }
                if (m.ext4WriteEnd != null && m.hasOwnProperty("ext4WriteEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4WriteEndFtraceEvent.verify(m.ext4WriteEnd);
                        if (e)
                            return "ext4WriteEnd." + e;
                    }
                }
                if (m.ext4Writepage != null && m.hasOwnProperty("ext4Writepage")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4WritepageFtraceEvent.verify(m.ext4Writepage);
                        if (e)
                            return "ext4Writepage." + e;
                    }
                }
                if (m.ext4Writepages != null && m.hasOwnProperty("ext4Writepages")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4WritepagesFtraceEvent.verify(m.ext4Writepages);
                        if (e)
                            return "ext4Writepages." + e;
                    }
                }
                if (m.ext4WritepagesResult != null && m.hasOwnProperty("ext4WritepagesResult")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4WritepagesResultFtraceEvent.verify(m.ext4WritepagesResult);
                        if (e)
                            return "ext4WritepagesResult." + e;
                    }
                }
                if (m.ext4ZeroRange != null && m.hasOwnProperty("ext4ZeroRange")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Ext4ZeroRangeFtraceEvent.verify(m.ext4ZeroRange);
                        if (e)
                            return "ext4ZeroRange." + e;
                    }
                }
                if (m.taskNewtask != null && m.hasOwnProperty("taskNewtask")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.TaskNewtaskFtraceEvent.verify(m.taskNewtask);
                        if (e)
                            return "taskNewtask." + e;
                    }
                }
                if (m.taskRename != null && m.hasOwnProperty("taskRename")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.TaskRenameFtraceEvent.verify(m.taskRename);
                        if (e)
                            return "taskRename." + e;
                    }
                }
                if (m.schedProcessExec != null && m.hasOwnProperty("schedProcessExec")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SchedProcessExecFtraceEvent.verify(m.schedProcessExec);
                        if (e)
                            return "schedProcessExec." + e;
                    }
                }
                if (m.schedProcessExit != null && m.hasOwnProperty("schedProcessExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SchedProcessExitFtraceEvent.verify(m.schedProcessExit);
                        if (e)
                            return "schedProcessExit." + e;
                    }
                }
                if (m.schedProcessFork != null && m.hasOwnProperty("schedProcessFork")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SchedProcessForkFtraceEvent.verify(m.schedProcessFork);
                        if (e)
                            return "schedProcessFork." + e;
                    }
                }
                if (m.schedProcessFree != null && m.hasOwnProperty("schedProcessFree")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SchedProcessFreeFtraceEvent.verify(m.schedProcessFree);
                        if (e)
                            return "schedProcessFree." + e;
                    }
                }
                if (m.schedProcessHang != null && m.hasOwnProperty("schedProcessHang")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SchedProcessHangFtraceEvent.verify(m.schedProcessHang);
                        if (e)
                            return "schedProcessHang." + e;
                    }
                }
                if (m.schedProcessWait != null && m.hasOwnProperty("schedProcessWait")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SchedProcessWaitFtraceEvent.verify(m.schedProcessWait);
                        if (e)
                            return "schedProcessWait." + e;
                    }
                }
                if (m.f2fsDoSubmitBio != null && m.hasOwnProperty("f2fsDoSubmitBio")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsDoSubmitBioFtraceEvent.verify(m.f2fsDoSubmitBio);
                        if (e)
                            return "f2fsDoSubmitBio." + e;
                    }
                }
                if (m.f2fsEvictInode != null && m.hasOwnProperty("f2fsEvictInode")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsEvictInodeFtraceEvent.verify(m.f2fsEvictInode);
                        if (e)
                            return "f2fsEvictInode." + e;
                    }
                }
                if (m.f2fsFallocate != null && m.hasOwnProperty("f2fsFallocate")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsFallocateFtraceEvent.verify(m.f2fsFallocate);
                        if (e)
                            return "f2fsFallocate." + e;
                    }
                }
                if (m.f2fsGetDataBlock != null && m.hasOwnProperty("f2fsGetDataBlock")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsGetDataBlockFtraceEvent.verify(m.f2fsGetDataBlock);
                        if (e)
                            return "f2fsGetDataBlock." + e;
                    }
                }
                if (m.f2fsGetVictim != null && m.hasOwnProperty("f2fsGetVictim")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsGetVictimFtraceEvent.verify(m.f2fsGetVictim);
                        if (e)
                            return "f2fsGetVictim." + e;
                    }
                }
                if (m.f2fsIget != null && m.hasOwnProperty("f2fsIget")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsIgetFtraceEvent.verify(m.f2fsIget);
                        if (e)
                            return "f2fsIget." + e;
                    }
                }
                if (m.f2fsIgetExit != null && m.hasOwnProperty("f2fsIgetExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsIgetExitFtraceEvent.verify(m.f2fsIgetExit);
                        if (e)
                            return "f2fsIgetExit." + e;
                    }
                }
                if (m.f2fsNewInode != null && m.hasOwnProperty("f2fsNewInode")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsNewInodeFtraceEvent.verify(m.f2fsNewInode);
                        if (e)
                            return "f2fsNewInode." + e;
                    }
                }
                if (m.f2fsReadpage != null && m.hasOwnProperty("f2fsReadpage")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsReadpageFtraceEvent.verify(m.f2fsReadpage);
                        if (e)
                            return "f2fsReadpage." + e;
                    }
                }
                if (m.f2fsReserveNewBlock != null && m.hasOwnProperty("f2fsReserveNewBlock")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsReserveNewBlockFtraceEvent.verify(m.f2fsReserveNewBlock);
                        if (e)
                            return "f2fsReserveNewBlock." + e;
                    }
                }
                if (m.f2fsSetPageDirty != null && m.hasOwnProperty("f2fsSetPageDirty")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsSetPageDirtyFtraceEvent.verify(m.f2fsSetPageDirty);
                        if (e)
                            return "f2fsSetPageDirty." + e;
                    }
                }
                if (m.f2fsSubmitWritePage != null && m.hasOwnProperty("f2fsSubmitWritePage")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsSubmitWritePageFtraceEvent.verify(m.f2fsSubmitWritePage);
                        if (e)
                            return "f2fsSubmitWritePage." + e;
                    }
                }
                if (m.f2fsSyncFileEnter != null && m.hasOwnProperty("f2fsSyncFileEnter")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsSyncFileEnterFtraceEvent.verify(m.f2fsSyncFileEnter);
                        if (e)
                            return "f2fsSyncFileEnter." + e;
                    }
                }
                if (m.f2fsSyncFileExit != null && m.hasOwnProperty("f2fsSyncFileExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsSyncFileExitFtraceEvent.verify(m.f2fsSyncFileExit);
                        if (e)
                            return "f2fsSyncFileExit." + e;
                    }
                }
                if (m.f2fsSyncFs != null && m.hasOwnProperty("f2fsSyncFs")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsSyncFsFtraceEvent.verify(m.f2fsSyncFs);
                        if (e)
                            return "f2fsSyncFs." + e;
                    }
                }
                if (m.f2fsTruncate != null && m.hasOwnProperty("f2fsTruncate")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsTruncateFtraceEvent.verify(m.f2fsTruncate);
                        if (e)
                            return "f2fsTruncate." + e;
                    }
                }
                if (m.f2fsTruncateBlocksEnter != null && m.hasOwnProperty("f2fsTruncateBlocksEnter")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent.verify(m.f2fsTruncateBlocksEnter);
                        if (e)
                            return "f2fsTruncateBlocksEnter." + e;
                    }
                }
                if (m.f2fsTruncateBlocksExit != null && m.hasOwnProperty("f2fsTruncateBlocksExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsTruncateBlocksExitFtraceEvent.verify(m.f2fsTruncateBlocksExit);
                        if (e)
                            return "f2fsTruncateBlocksExit." + e;
                    }
                }
                if (m.f2fsTruncateDataBlocksRange != null && m.hasOwnProperty("f2fsTruncateDataBlocksRange")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent.verify(m.f2fsTruncateDataBlocksRange);
                        if (e)
                            return "f2fsTruncateDataBlocksRange." + e;
                    }
                }
                if (m.f2fsTruncateInodeBlocksEnter != null && m.hasOwnProperty("f2fsTruncateInodeBlocksEnter")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent.verify(m.f2fsTruncateInodeBlocksEnter);
                        if (e)
                            return "f2fsTruncateInodeBlocksEnter." + e;
                    }
                }
                if (m.f2fsTruncateInodeBlocksExit != null && m.hasOwnProperty("f2fsTruncateInodeBlocksExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent.verify(m.f2fsTruncateInodeBlocksExit);
                        if (e)
                            return "f2fsTruncateInodeBlocksExit." + e;
                    }
                }
                if (m.f2fsTruncateNode != null && m.hasOwnProperty("f2fsTruncateNode")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsTruncateNodeFtraceEvent.verify(m.f2fsTruncateNode);
                        if (e)
                            return "f2fsTruncateNode." + e;
                    }
                }
                if (m.f2fsTruncateNodesEnter != null && m.hasOwnProperty("f2fsTruncateNodesEnter")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsTruncateNodesEnterFtraceEvent.verify(m.f2fsTruncateNodesEnter);
                        if (e)
                            return "f2fsTruncateNodesEnter." + e;
                    }
                }
                if (m.f2fsTruncateNodesExit != null && m.hasOwnProperty("f2fsTruncateNodesExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsTruncateNodesExitFtraceEvent.verify(m.f2fsTruncateNodesExit);
                        if (e)
                            return "f2fsTruncateNodesExit." + e;
                    }
                }
                if (m.f2fsTruncatePartialNodes != null && m.hasOwnProperty("f2fsTruncatePartialNodes")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsTruncatePartialNodesFtraceEvent.verify(m.f2fsTruncatePartialNodes);
                        if (e)
                            return "f2fsTruncatePartialNodes." + e;
                    }
                }
                if (m.f2fsUnlinkEnter != null && m.hasOwnProperty("f2fsUnlinkEnter")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsUnlinkEnterFtraceEvent.verify(m.f2fsUnlinkEnter);
                        if (e)
                            return "f2fsUnlinkEnter." + e;
                    }
                }
                if (m.f2fsUnlinkExit != null && m.hasOwnProperty("f2fsUnlinkExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsUnlinkExitFtraceEvent.verify(m.f2fsUnlinkExit);
                        if (e)
                            return "f2fsUnlinkExit." + e;
                    }
                }
                if (m.f2fsVmPageMkwrite != null && m.hasOwnProperty("f2fsVmPageMkwrite")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsVmPageMkwriteFtraceEvent.verify(m.f2fsVmPageMkwrite);
                        if (e)
                            return "f2fsVmPageMkwrite." + e;
                    }
                }
                if (m.f2fsWriteBegin != null && m.hasOwnProperty("f2fsWriteBegin")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsWriteBeginFtraceEvent.verify(m.f2fsWriteBegin);
                        if (e)
                            return "f2fsWriteBegin." + e;
                    }
                }
                if (m.f2fsWriteCheckpoint != null && m.hasOwnProperty("f2fsWriteCheckpoint")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsWriteCheckpointFtraceEvent.verify(m.f2fsWriteCheckpoint);
                        if (e)
                            return "f2fsWriteCheckpoint." + e;
                    }
                }
                if (m.f2fsWriteEnd != null && m.hasOwnProperty("f2fsWriteEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsWriteEndFtraceEvent.verify(m.f2fsWriteEnd);
                        if (e)
                            return "f2fsWriteEnd." + e;
                    }
                }
                if (m.allocPagesIommuEnd != null && m.hasOwnProperty("allocPagesIommuEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.AllocPagesIommuEndFtraceEvent.verify(m.allocPagesIommuEnd);
                        if (e)
                            return "allocPagesIommuEnd." + e;
                    }
                }
                if (m.allocPagesIommuFail != null && m.hasOwnProperty("allocPagesIommuFail")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.AllocPagesIommuFailFtraceEvent.verify(m.allocPagesIommuFail);
                        if (e)
                            return "allocPagesIommuFail." + e;
                    }
                }
                if (m.allocPagesIommuStart != null && m.hasOwnProperty("allocPagesIommuStart")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.AllocPagesIommuStartFtraceEvent.verify(m.allocPagesIommuStart);
                        if (e)
                            return "allocPagesIommuStart." + e;
                    }
                }
                if (m.allocPagesSysEnd != null && m.hasOwnProperty("allocPagesSysEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.AllocPagesSysEndFtraceEvent.verify(m.allocPagesSysEnd);
                        if (e)
                            return "allocPagesSysEnd." + e;
                    }
                }
                if (m.allocPagesSysFail != null && m.hasOwnProperty("allocPagesSysFail")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.AllocPagesSysFailFtraceEvent.verify(m.allocPagesSysFail);
                        if (e)
                            return "allocPagesSysFail." + e;
                    }
                }
                if (m.allocPagesSysStart != null && m.hasOwnProperty("allocPagesSysStart")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.AllocPagesSysStartFtraceEvent.verify(m.allocPagesSysStart);
                        if (e)
                            return "allocPagesSysStart." + e;
                    }
                }
                if (m.dmaAllocContiguousRetry != null && m.hasOwnProperty("dmaAllocContiguousRetry")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.DmaAllocContiguousRetryFtraceEvent.verify(m.dmaAllocContiguousRetry);
                        if (e)
                            return "dmaAllocContiguousRetry." + e;
                    }
                }
                if (m.iommuMapRange != null && m.hasOwnProperty("iommuMapRange")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IommuMapRangeFtraceEvent.verify(m.iommuMapRange);
                        if (e)
                            return "iommuMapRange." + e;
                    }
                }
                if (m.iommuSecPtblMapRangeEnd != null && m.hasOwnProperty("iommuSecPtblMapRangeEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent.verify(m.iommuSecPtblMapRangeEnd);
                        if (e)
                            return "iommuSecPtblMapRangeEnd." + e;
                    }
                }
                if (m.iommuSecPtblMapRangeStart != null && m.hasOwnProperty("iommuSecPtblMapRangeStart")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent.verify(m.iommuSecPtblMapRangeStart);
                        if (e)
                            return "iommuSecPtblMapRangeStart." + e;
                    }
                }
                if (m.ionAllocBufferEnd != null && m.hasOwnProperty("ionAllocBufferEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IonAllocBufferEndFtraceEvent.verify(m.ionAllocBufferEnd);
                        if (e)
                            return "ionAllocBufferEnd." + e;
                    }
                }
                if (m.ionAllocBufferFail != null && m.hasOwnProperty("ionAllocBufferFail")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IonAllocBufferFailFtraceEvent.verify(m.ionAllocBufferFail);
                        if (e)
                            return "ionAllocBufferFail." + e;
                    }
                }
                if (m.ionAllocBufferFallback != null && m.hasOwnProperty("ionAllocBufferFallback")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IonAllocBufferFallbackFtraceEvent.verify(m.ionAllocBufferFallback);
                        if (e)
                            return "ionAllocBufferFallback." + e;
                    }
                }
                if (m.ionAllocBufferStart != null && m.hasOwnProperty("ionAllocBufferStart")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IonAllocBufferStartFtraceEvent.verify(m.ionAllocBufferStart);
                        if (e)
                            return "ionAllocBufferStart." + e;
                    }
                }
                if (m.ionCpAllocRetry != null && m.hasOwnProperty("ionCpAllocRetry")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IonCpAllocRetryFtraceEvent.verify(m.ionCpAllocRetry);
                        if (e)
                            return "ionCpAllocRetry." + e;
                    }
                }
                if (m.ionCpSecureBufferEnd != null && m.hasOwnProperty("ionCpSecureBufferEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IonCpSecureBufferEndFtraceEvent.verify(m.ionCpSecureBufferEnd);
                        if (e)
                            return "ionCpSecureBufferEnd." + e;
                    }
                }
                if (m.ionCpSecureBufferStart != null && m.hasOwnProperty("ionCpSecureBufferStart")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IonCpSecureBufferStartFtraceEvent.verify(m.ionCpSecureBufferStart);
                        if (e)
                            return "ionCpSecureBufferStart." + e;
                    }
                }
                if (m.ionPrefetching != null && m.hasOwnProperty("ionPrefetching")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IonPrefetchingFtraceEvent.verify(m.ionPrefetching);
                        if (e)
                            return "ionPrefetching." + e;
                    }
                }
                if (m.ionSecureCmaAddToPoolEnd != null && m.hasOwnProperty("ionSecureCmaAddToPoolEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent.verify(m.ionSecureCmaAddToPoolEnd);
                        if (e)
                            return "ionSecureCmaAddToPoolEnd." + e;
                    }
                }
                if (m.ionSecureCmaAddToPoolStart != null && m.hasOwnProperty("ionSecureCmaAddToPoolStart")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent.verify(m.ionSecureCmaAddToPoolStart);
                        if (e)
                            return "ionSecureCmaAddToPoolStart." + e;
                    }
                }
                if (m.ionSecureCmaAllocateEnd != null && m.hasOwnProperty("ionSecureCmaAllocateEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IonSecureCmaAllocateEndFtraceEvent.verify(m.ionSecureCmaAllocateEnd);
                        if (e)
                            return "ionSecureCmaAllocateEnd." + e;
                    }
                }
                if (m.ionSecureCmaAllocateStart != null && m.hasOwnProperty("ionSecureCmaAllocateStart")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IonSecureCmaAllocateStartFtraceEvent.verify(m.ionSecureCmaAllocateStart);
                        if (e)
                            return "ionSecureCmaAllocateStart." + e;
                    }
                }
                if (m.ionSecureCmaShrinkPoolEnd != null && m.hasOwnProperty("ionSecureCmaShrinkPoolEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent.verify(m.ionSecureCmaShrinkPoolEnd);
                        if (e)
                            return "ionSecureCmaShrinkPoolEnd." + e;
                    }
                }
                if (m.ionSecureCmaShrinkPoolStart != null && m.hasOwnProperty("ionSecureCmaShrinkPoolStart")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent.verify(m.ionSecureCmaShrinkPoolStart);
                        if (e)
                            return "ionSecureCmaShrinkPoolStart." + e;
                    }
                }
                if (m.kfree != null && m.hasOwnProperty("kfree")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KfreeFtraceEvent.verify(m.kfree);
                        if (e)
                            return "kfree." + e;
                    }
                }
                if (m.kmalloc != null && m.hasOwnProperty("kmalloc")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KmallocFtraceEvent.verify(m.kmalloc);
                        if (e)
                            return "kmalloc." + e;
                    }
                }
                if (m.kmallocNode != null && m.hasOwnProperty("kmallocNode")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KmallocNodeFtraceEvent.verify(m.kmallocNode);
                        if (e)
                            return "kmallocNode." + e;
                    }
                }
                if (m.kmemCacheAlloc != null && m.hasOwnProperty("kmemCacheAlloc")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KmemCacheAllocFtraceEvent.verify(m.kmemCacheAlloc);
                        if (e)
                            return "kmemCacheAlloc." + e;
                    }
                }
                if (m.kmemCacheAllocNode != null && m.hasOwnProperty("kmemCacheAllocNode")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KmemCacheAllocNodeFtraceEvent.verify(m.kmemCacheAllocNode);
                        if (e)
                            return "kmemCacheAllocNode." + e;
                    }
                }
                if (m.kmemCacheFree != null && m.hasOwnProperty("kmemCacheFree")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KmemCacheFreeFtraceEvent.verify(m.kmemCacheFree);
                        if (e)
                            return "kmemCacheFree." + e;
                    }
                }
                if (m.migratePagesEnd != null && m.hasOwnProperty("migratePagesEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MigratePagesEndFtraceEvent.verify(m.migratePagesEnd);
                        if (e)
                            return "migratePagesEnd." + e;
                    }
                }
                if (m.migratePagesStart != null && m.hasOwnProperty("migratePagesStart")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MigratePagesStartFtraceEvent.verify(m.migratePagesStart);
                        if (e)
                            return "migratePagesStart." + e;
                    }
                }
                if (m.migrateRetry != null && m.hasOwnProperty("migrateRetry")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MigrateRetryFtraceEvent.verify(m.migrateRetry);
                        if (e)
                            return "migrateRetry." + e;
                    }
                }
                if (m.mmPageAlloc != null && m.hasOwnProperty("mmPageAlloc")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmPageAllocFtraceEvent.verify(m.mmPageAlloc);
                        if (e)
                            return "mmPageAlloc." + e;
                    }
                }
                if (m.mmPageAllocExtfrag != null && m.hasOwnProperty("mmPageAllocExtfrag")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmPageAllocExtfragFtraceEvent.verify(m.mmPageAllocExtfrag);
                        if (e)
                            return "mmPageAllocExtfrag." + e;
                    }
                }
                if (m.mmPageAllocZoneLocked != null && m.hasOwnProperty("mmPageAllocZoneLocked")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmPageAllocZoneLockedFtraceEvent.verify(m.mmPageAllocZoneLocked);
                        if (e)
                            return "mmPageAllocZoneLocked." + e;
                    }
                }
                if (m.mmPageFree != null && m.hasOwnProperty("mmPageFree")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmPageFreeFtraceEvent.verify(m.mmPageFree);
                        if (e)
                            return "mmPageFree." + e;
                    }
                }
                if (m.mmPageFreeBatched != null && m.hasOwnProperty("mmPageFreeBatched")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmPageFreeBatchedFtraceEvent.verify(m.mmPageFreeBatched);
                        if (e)
                            return "mmPageFreeBatched." + e;
                    }
                }
                if (m.mmPagePcpuDrain != null && m.hasOwnProperty("mmPagePcpuDrain")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmPagePcpuDrainFtraceEvent.verify(m.mmPagePcpuDrain);
                        if (e)
                            return "mmPagePcpuDrain." + e;
                    }
                }
                if (m.rssStat != null && m.hasOwnProperty("rssStat")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.RssStatFtraceEvent.verify(m.rssStat);
                        if (e)
                            return "rssStat." + e;
                    }
                }
                if (m.ionHeapShrink != null && m.hasOwnProperty("ionHeapShrink")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IonHeapShrinkFtraceEvent.verify(m.ionHeapShrink);
                        if (e)
                            return "ionHeapShrink." + e;
                    }
                }
                if (m.ionHeapGrow != null && m.hasOwnProperty("ionHeapGrow")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IonHeapGrowFtraceEvent.verify(m.ionHeapGrow);
                        if (e)
                            return "ionHeapGrow." + e;
                    }
                }
                if (m.fenceInit != null && m.hasOwnProperty("fenceInit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.FenceInitFtraceEvent.verify(m.fenceInit);
                        if (e)
                            return "fenceInit." + e;
                    }
                }
                if (m.fenceDestroy != null && m.hasOwnProperty("fenceDestroy")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.FenceDestroyFtraceEvent.verify(m.fenceDestroy);
                        if (e)
                            return "fenceDestroy." + e;
                    }
                }
                if (m.fenceEnableSignal != null && m.hasOwnProperty("fenceEnableSignal")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.FenceEnableSignalFtraceEvent.verify(m.fenceEnableSignal);
                        if (e)
                            return "fenceEnableSignal." + e;
                    }
                }
                if (m.fenceSignaled != null && m.hasOwnProperty("fenceSignaled")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.FenceSignaledFtraceEvent.verify(m.fenceSignaled);
                        if (e)
                            return "fenceSignaled." + e;
                    }
                }
                if (m.clkEnable != null && m.hasOwnProperty("clkEnable")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.ClkEnableFtraceEvent.verify(m.clkEnable);
                        if (e)
                            return "clkEnable." + e;
                    }
                }
                if (m.clkDisable != null && m.hasOwnProperty("clkDisable")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.ClkDisableFtraceEvent.verify(m.clkDisable);
                        if (e)
                            return "clkDisable." + e;
                    }
                }
                if (m.clkSetRate != null && m.hasOwnProperty("clkSetRate")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.ClkSetRateFtraceEvent.verify(m.clkSetRate);
                        if (e)
                            return "clkSetRate." + e;
                    }
                }
                if (m.binderTransactionAllocBuf != null && m.hasOwnProperty("binderTransactionAllocBuf")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.BinderTransactionAllocBufFtraceEvent.verify(m.binderTransactionAllocBuf);
                        if (e)
                            return "binderTransactionAllocBuf." + e;
                    }
                }
                if (m.signalDeliver != null && m.hasOwnProperty("signalDeliver")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SignalDeliverFtraceEvent.verify(m.signalDeliver);
                        if (e)
                            return "signalDeliver." + e;
                    }
                }
                if (m.signalGenerate != null && m.hasOwnProperty("signalGenerate")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SignalGenerateFtraceEvent.verify(m.signalGenerate);
                        if (e)
                            return "signalGenerate." + e;
                    }
                }
                if (m.oomScoreAdjUpdate != null && m.hasOwnProperty("oomScoreAdjUpdate")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.OomScoreAdjUpdateFtraceEvent.verify(m.oomScoreAdjUpdate);
                        if (e)
                            return "oomScoreAdjUpdate." + e;
                    }
                }
                if (m.generic != null && m.hasOwnProperty("generic")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.GenericFtraceEvent.verify(m.generic);
                        if (e)
                            return "generic." + e;
                    }
                }
                if (m.mmEventRecord != null && m.hasOwnProperty("mmEventRecord")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmEventRecordFtraceEvent.verify(m.mmEventRecord);
                        if (e)
                            return "mmEventRecord." + e;
                    }
                }
                if (m.sysEnter != null && m.hasOwnProperty("sysEnter")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SysEnterFtraceEvent.verify(m.sysEnter);
                        if (e)
                            return "sysEnter." + e;
                    }
                }
                if (m.sysExit != null && m.hasOwnProperty("sysExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SysExitFtraceEvent.verify(m.sysExit);
                        if (e)
                            return "sysExit." + e;
                    }
                }
                if (m.zero != null && m.hasOwnProperty("zero")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.ZeroFtraceEvent.verify(m.zero);
                        if (e)
                            return "zero." + e;
                    }
                }
                if (m.gpuFrequency != null && m.hasOwnProperty("gpuFrequency")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.GpuFrequencyFtraceEvent.verify(m.gpuFrequency);
                        if (e)
                            return "gpuFrequency." + e;
                    }
                }
                if (m.sdeTracingMarkWrite != null && m.hasOwnProperty("sdeTracingMarkWrite")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SdeTracingMarkWriteFtraceEvent.verify(m.sdeTracingMarkWrite);
                        if (e)
                            return "sdeTracingMarkWrite." + e;
                    }
                }
                if (m.markVictim != null && m.hasOwnProperty("markVictim")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MarkVictimFtraceEvent.verify(m.markVictim);
                        if (e)
                            return "markVictim." + e;
                    }
                }
                if (m.ionStat != null && m.hasOwnProperty("ionStat")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IonStatFtraceEvent.verify(m.ionStat);
                        if (e)
                            return "ionStat." + e;
                    }
                }
                if (m.ionBufferCreate != null && m.hasOwnProperty("ionBufferCreate")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IonBufferCreateFtraceEvent.verify(m.ionBufferCreate);
                        if (e)
                            return "ionBufferCreate." + e;
                    }
                }
                if (m.ionBufferDestroy != null && m.hasOwnProperty("ionBufferDestroy")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.IonBufferDestroyFtraceEvent.verify(m.ionBufferDestroy);
                        if (e)
                            return "ionBufferDestroy." + e;
                    }
                }
                if (m.scmCallStart != null && m.hasOwnProperty("scmCallStart")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.ScmCallStartFtraceEvent.verify(m.scmCallStart);
                        if (e)
                            return "scmCallStart." + e;
                    }
                }
                if (m.scmCallEnd != null && m.hasOwnProperty("scmCallEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.ScmCallEndFtraceEvent.verify(m.scmCallEnd);
                        if (e)
                            return "scmCallEnd." + e;
                    }
                }
                if (m.gpuMemTotal != null && m.hasOwnProperty("gpuMemTotal")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.GpuMemTotalFtraceEvent.verify(m.gpuMemTotal);
                        if (e)
                            return "gpuMemTotal." + e;
                    }
                }
                if (m.thermalTemperature != null && m.hasOwnProperty("thermalTemperature")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.ThermalTemperatureFtraceEvent.verify(m.thermalTemperature);
                        if (e)
                            return "thermalTemperature." + e;
                    }
                }
                if (m.cdevUpdate != null && m.hasOwnProperty("cdevUpdate")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.CdevUpdateFtraceEvent.verify(m.cdevUpdate);
                        if (e)
                            return "cdevUpdate." + e;
                    }
                }
                if (m.cpuhpExit != null && m.hasOwnProperty("cpuhpExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.CpuhpExitFtraceEvent.verify(m.cpuhpExit);
                        if (e)
                            return "cpuhpExit." + e;
                    }
                }
                if (m.cpuhpMultiEnter != null && m.hasOwnProperty("cpuhpMultiEnter")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.CpuhpMultiEnterFtraceEvent.verify(m.cpuhpMultiEnter);
                        if (e)
                            return "cpuhpMultiEnter." + e;
                    }
                }
                if (m.cpuhpEnter != null && m.hasOwnProperty("cpuhpEnter")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.CpuhpEnterFtraceEvent.verify(m.cpuhpEnter);
                        if (e)
                            return "cpuhpEnter." + e;
                    }
                }
                if (m.cpuhpLatency != null && m.hasOwnProperty("cpuhpLatency")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.CpuhpLatencyFtraceEvent.verify(m.cpuhpLatency);
                        if (e)
                            return "cpuhpLatency." + e;
                    }
                }
                if (m.fastrpcDmaStat != null && m.hasOwnProperty("fastrpcDmaStat")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.FastrpcDmaStatFtraceEvent.verify(m.fastrpcDmaStat);
                        if (e)
                            return "fastrpcDmaStat." + e;
                    }
                }
                if (m.dpuTracingMarkWrite != null && m.hasOwnProperty("dpuTracingMarkWrite")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.DpuTracingMarkWriteFtraceEvent.verify(m.dpuTracingMarkWrite);
                        if (e)
                            return "dpuTracingMarkWrite." + e;
                    }
                }
                if (m.g2dTracingMarkWrite != null && m.hasOwnProperty("g2dTracingMarkWrite")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.G2dTracingMarkWriteFtraceEvent.verify(m.g2dTracingMarkWrite);
                        if (e)
                            return "g2dTracingMarkWrite." + e;
                    }
                }
                if (m.maliTracingMarkWrite != null && m.hasOwnProperty("maliTracingMarkWrite")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MaliTracingMarkWriteFtraceEvent.verify(m.maliTracingMarkWrite);
                        if (e)
                            return "maliTracingMarkWrite." + e;
                    }
                }
                if (m.dmaHeapStat != null && m.hasOwnProperty("dmaHeapStat")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.DmaHeapStatFtraceEvent.verify(m.dmaHeapStat);
                        if (e)
                            return "dmaHeapStat." + e;
                    }
                }
                if (m.cpuhpPause != null && m.hasOwnProperty("cpuhpPause")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.CpuhpPauseFtraceEvent.verify(m.cpuhpPause);
                        if (e)
                            return "cpuhpPause." + e;
                    }
                }
                if (m.schedPiSetprio != null && m.hasOwnProperty("schedPiSetprio")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SchedPiSetprioFtraceEvent.verify(m.schedPiSetprio);
                        if (e)
                            return "schedPiSetprio." + e;
                    }
                }
                if (m.sdeSdeEvtlog != null && m.hasOwnProperty("sdeSdeEvtlog")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SdeSdeEvtlogFtraceEvent.verify(m.sdeSdeEvtlog);
                        if (e)
                            return "sdeSdeEvtlog." + e;
                    }
                }
                if (m.sdeSdePerfCalcCrtc != null && m.hasOwnProperty("sdeSdePerfCalcCrtc")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent.verify(m.sdeSdePerfCalcCrtc);
                        if (e)
                            return "sdeSdePerfCalcCrtc." + e;
                    }
                }
                if (m.sdeSdePerfCrtcUpdate != null && m.hasOwnProperty("sdeSdePerfCrtcUpdate")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent.verify(m.sdeSdePerfCrtcUpdate);
                        if (e)
                            return "sdeSdePerfCrtcUpdate." + e;
                    }
                }
                if (m.sdeSdePerfSetQosLuts != null && m.hasOwnProperty("sdeSdePerfSetQosLuts")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent.verify(m.sdeSdePerfSetQosLuts);
                        if (e)
                            return "sdeSdePerfSetQosLuts." + e;
                    }
                }
                if (m.sdeSdePerfUpdateBus != null && m.hasOwnProperty("sdeSdePerfUpdateBus")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SdeSdePerfUpdateBusFtraceEvent.verify(m.sdeSdePerfUpdateBus);
                        if (e)
                            return "sdeSdePerfUpdateBus." + e;
                    }
                }
                if (m.rssStatThrottled != null && m.hasOwnProperty("rssStatThrottled")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.RssStatThrottledFtraceEvent.verify(m.rssStatThrottled);
                        if (e)
                            return "rssStatThrottled." + e;
                    }
                }
                if (m.netifReceiveSkb != null && m.hasOwnProperty("netifReceiveSkb")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.NetifReceiveSkbFtraceEvent.verify(m.netifReceiveSkb);
                        if (e)
                            return "netifReceiveSkb." + e;
                    }
                }
                if (m.netDevXmit != null && m.hasOwnProperty("netDevXmit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.NetDevXmitFtraceEvent.verify(m.netDevXmit);
                        if (e)
                            return "netDevXmit." + e;
                    }
                }
                if (m.inetSockSetState != null && m.hasOwnProperty("inetSockSetState")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.InetSockSetStateFtraceEvent.verify(m.inetSockSetState);
                        if (e)
                            return "inetSockSetState." + e;
                    }
                }
                if (m.tcpRetransmitSkb != null && m.hasOwnProperty("tcpRetransmitSkb")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.TcpRetransmitSkbFtraceEvent.verify(m.tcpRetransmitSkb);
                        if (e)
                            return "tcpRetransmitSkb." + e;
                    }
                }
                if (m.crosEcSensorhubData != null && m.hasOwnProperty("crosEcSensorhubData")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.CrosEcSensorhubDataFtraceEvent.verify(m.crosEcSensorhubData);
                        if (e)
                            return "crosEcSensorhubData." + e;
                    }
                }
                if (m.napiGroReceiveEntry != null && m.hasOwnProperty("napiGroReceiveEntry")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.NapiGroReceiveEntryFtraceEvent.verify(m.napiGroReceiveEntry);
                        if (e)
                            return "napiGroReceiveEntry." + e;
                    }
                }
                if (m.napiGroReceiveExit != null && m.hasOwnProperty("napiGroReceiveExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.NapiGroReceiveExitFtraceEvent.verify(m.napiGroReceiveExit);
                        if (e)
                            return "napiGroReceiveExit." + e;
                    }
                }
                if (m.kfreeSkb != null && m.hasOwnProperty("kfreeSkb")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KfreeSkbFtraceEvent.verify(m.kfreeSkb);
                        if (e)
                            return "kfreeSkb." + e;
                    }
                }
                if (m.kvmAccessFault != null && m.hasOwnProperty("kvmAccessFault")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmAccessFaultFtraceEvent.verify(m.kvmAccessFault);
                        if (e)
                            return "kvmAccessFault." + e;
                    }
                }
                if (m.kvmAckIrq != null && m.hasOwnProperty("kvmAckIrq")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmAckIrqFtraceEvent.verify(m.kvmAckIrq);
                        if (e)
                            return "kvmAckIrq." + e;
                    }
                }
                if (m.kvmAgeHva != null && m.hasOwnProperty("kvmAgeHva")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmAgeHvaFtraceEvent.verify(m.kvmAgeHva);
                        if (e)
                            return "kvmAgeHva." + e;
                    }
                }
                if (m.kvmAgePage != null && m.hasOwnProperty("kvmAgePage")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmAgePageFtraceEvent.verify(m.kvmAgePage);
                        if (e)
                            return "kvmAgePage." + e;
                    }
                }
                if (m.kvmArmClearDebug != null && m.hasOwnProperty("kvmArmClearDebug")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmArmClearDebugFtraceEvent.verify(m.kvmArmClearDebug);
                        if (e)
                            return "kvmArmClearDebug." + e;
                    }
                }
                if (m.kvmArmSetDreg32 != null && m.hasOwnProperty("kvmArmSetDreg32")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmArmSetDreg32FtraceEvent.verify(m.kvmArmSetDreg32);
                        if (e)
                            return "kvmArmSetDreg32." + e;
                    }
                }
                if (m.kvmArmSetRegset != null && m.hasOwnProperty("kvmArmSetRegset")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmArmSetRegsetFtraceEvent.verify(m.kvmArmSetRegset);
                        if (e)
                            return "kvmArmSetRegset." + e;
                    }
                }
                if (m.kvmArmSetupDebug != null && m.hasOwnProperty("kvmArmSetupDebug")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmArmSetupDebugFtraceEvent.verify(m.kvmArmSetupDebug);
                        if (e)
                            return "kvmArmSetupDebug." + e;
                    }
                }
                if (m.kvmEntry != null && m.hasOwnProperty("kvmEntry")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmEntryFtraceEvent.verify(m.kvmEntry);
                        if (e)
                            return "kvmEntry." + e;
                    }
                }
                if (m.kvmExit != null && m.hasOwnProperty("kvmExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmExitFtraceEvent.verify(m.kvmExit);
                        if (e)
                            return "kvmExit." + e;
                    }
                }
                if (m.kvmFpu != null && m.hasOwnProperty("kvmFpu")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmFpuFtraceEvent.verify(m.kvmFpu);
                        if (e)
                            return "kvmFpu." + e;
                    }
                }
                if (m.kvmGetTimerMap != null && m.hasOwnProperty("kvmGetTimerMap")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmGetTimerMapFtraceEvent.verify(m.kvmGetTimerMap);
                        if (e)
                            return "kvmGetTimerMap." + e;
                    }
                }
                if (m.kvmGuestFault != null && m.hasOwnProperty("kvmGuestFault")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmGuestFaultFtraceEvent.verify(m.kvmGuestFault);
                        if (e)
                            return "kvmGuestFault." + e;
                    }
                }
                if (m.kvmHandleSysReg != null && m.hasOwnProperty("kvmHandleSysReg")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmHandleSysRegFtraceEvent.verify(m.kvmHandleSysReg);
                        if (e)
                            return "kvmHandleSysReg." + e;
                    }
                }
                if (m.kvmHvcArm64 != null && m.hasOwnProperty("kvmHvcArm64")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmHvcArm64FtraceEvent.verify(m.kvmHvcArm64);
                        if (e)
                            return "kvmHvcArm64." + e;
                    }
                }
                if (m.kvmIrqLine != null && m.hasOwnProperty("kvmIrqLine")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmIrqLineFtraceEvent.verify(m.kvmIrqLine);
                        if (e)
                            return "kvmIrqLine." + e;
                    }
                }
                if (m.kvmMmio != null && m.hasOwnProperty("kvmMmio")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmMmioFtraceEvent.verify(m.kvmMmio);
                        if (e)
                            return "kvmMmio." + e;
                    }
                }
                if (m.kvmMmioEmulate != null && m.hasOwnProperty("kvmMmioEmulate")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmMmioEmulateFtraceEvent.verify(m.kvmMmioEmulate);
                        if (e)
                            return "kvmMmioEmulate." + e;
                    }
                }
                if (m.kvmSetGuestDebug != null && m.hasOwnProperty("kvmSetGuestDebug")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmSetGuestDebugFtraceEvent.verify(m.kvmSetGuestDebug);
                        if (e)
                            return "kvmSetGuestDebug." + e;
                    }
                }
                if (m.kvmSetIrq != null && m.hasOwnProperty("kvmSetIrq")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmSetIrqFtraceEvent.verify(m.kvmSetIrq);
                        if (e)
                            return "kvmSetIrq." + e;
                    }
                }
                if (m.kvmSetSpteHva != null && m.hasOwnProperty("kvmSetSpteHva")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmSetSpteHvaFtraceEvent.verify(m.kvmSetSpteHva);
                        if (e)
                            return "kvmSetSpteHva." + e;
                    }
                }
                if (m.kvmSetWayFlush != null && m.hasOwnProperty("kvmSetWayFlush")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmSetWayFlushFtraceEvent.verify(m.kvmSetWayFlush);
                        if (e)
                            return "kvmSetWayFlush." + e;
                    }
                }
                if (m.kvmSysAccess != null && m.hasOwnProperty("kvmSysAccess")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmSysAccessFtraceEvent.verify(m.kvmSysAccess);
                        if (e)
                            return "kvmSysAccess." + e;
                    }
                }
                if (m.kvmTestAgeHva != null && m.hasOwnProperty("kvmTestAgeHva")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmTestAgeHvaFtraceEvent.verify(m.kvmTestAgeHva);
                        if (e)
                            return "kvmTestAgeHva." + e;
                    }
                }
                if (m.kvmTimerEmulate != null && m.hasOwnProperty("kvmTimerEmulate")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmTimerEmulateFtraceEvent.verify(m.kvmTimerEmulate);
                        if (e)
                            return "kvmTimerEmulate." + e;
                    }
                }
                if (m.kvmTimerHrtimerExpire != null && m.hasOwnProperty("kvmTimerHrtimerExpire")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmTimerHrtimerExpireFtraceEvent.verify(m.kvmTimerHrtimerExpire);
                        if (e)
                            return "kvmTimerHrtimerExpire." + e;
                    }
                }
                if (m.kvmTimerRestoreState != null && m.hasOwnProperty("kvmTimerRestoreState")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmTimerRestoreStateFtraceEvent.verify(m.kvmTimerRestoreState);
                        if (e)
                            return "kvmTimerRestoreState." + e;
                    }
                }
                if (m.kvmTimerSaveState != null && m.hasOwnProperty("kvmTimerSaveState")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmTimerSaveStateFtraceEvent.verify(m.kvmTimerSaveState);
                        if (e)
                            return "kvmTimerSaveState." + e;
                    }
                }
                if (m.kvmTimerUpdateIrq != null && m.hasOwnProperty("kvmTimerUpdateIrq")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmTimerUpdateIrqFtraceEvent.verify(m.kvmTimerUpdateIrq);
                        if (e)
                            return "kvmTimerUpdateIrq." + e;
                    }
                }
                if (m.kvmToggleCache != null && m.hasOwnProperty("kvmToggleCache")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmToggleCacheFtraceEvent.verify(m.kvmToggleCache);
                        if (e)
                            return "kvmToggleCache." + e;
                    }
                }
                if (m.kvmUnmapHvaRange != null && m.hasOwnProperty("kvmUnmapHvaRange")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmUnmapHvaRangeFtraceEvent.verify(m.kvmUnmapHvaRange);
                        if (e)
                            return "kvmUnmapHvaRange." + e;
                    }
                }
                if (m.kvmUserspaceExit != null && m.hasOwnProperty("kvmUserspaceExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmUserspaceExitFtraceEvent.verify(m.kvmUserspaceExit);
                        if (e)
                            return "kvmUserspaceExit." + e;
                    }
                }
                if (m.kvmVcpuWakeup != null && m.hasOwnProperty("kvmVcpuWakeup")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmVcpuWakeupFtraceEvent.verify(m.kvmVcpuWakeup);
                        if (e)
                            return "kvmVcpuWakeup." + e;
                    }
                }
                if (m.kvmWfxArm64 != null && m.hasOwnProperty("kvmWfxArm64")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.KvmWfxArm64FtraceEvent.verify(m.kvmWfxArm64);
                        if (e)
                            return "kvmWfxArm64." + e;
                    }
                }
                if (m.trapReg != null && m.hasOwnProperty("trapReg")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.TrapRegFtraceEvent.verify(m.trapReg);
                        if (e)
                            return "trapReg." + e;
                    }
                }
                if (m.vgicUpdateIrqPending != null && m.hasOwnProperty("vgicUpdateIrqPending")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.VgicUpdateIrqPendingFtraceEvent.verify(m.vgicUpdateIrqPending);
                        if (e)
                            return "vgicUpdateIrqPending." + e;
                    }
                }
                if (m.wakeupSourceActivate != null && m.hasOwnProperty("wakeupSourceActivate")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.WakeupSourceActivateFtraceEvent.verify(m.wakeupSourceActivate);
                        if (e)
                            return "wakeupSourceActivate." + e;
                    }
                }
                if (m.wakeupSourceDeactivate != null && m.hasOwnProperty("wakeupSourceDeactivate")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.WakeupSourceDeactivateFtraceEvent.verify(m.wakeupSourceDeactivate);
                        if (e)
                            return "wakeupSourceDeactivate." + e;
                    }
                }
                if (m.ufshcdCommand != null && m.hasOwnProperty("ufshcdCommand")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.UfshcdCommandFtraceEvent.verify(m.ufshcdCommand);
                        if (e)
                            return "ufshcdCommand." + e;
                    }
                }
                if (m.ufshcdClkGating != null && m.hasOwnProperty("ufshcdClkGating")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.UfshcdClkGatingFtraceEvent.verify(m.ufshcdClkGating);
                        if (e)
                            return "ufshcdClkGating." + e;
                    }
                }
                if (m.console != null && m.hasOwnProperty("console")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.ConsoleFtraceEvent.verify(m.console);
                        if (e)
                            return "console." + e;
                    }
                }
                if (m.drmVblankEvent != null && m.hasOwnProperty("drmVblankEvent")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.DrmVblankEventFtraceEvent.verify(m.drmVblankEvent);
                        if (e)
                            return "drmVblankEvent." + e;
                    }
                }
                if (m.drmVblankEventDelivered != null && m.hasOwnProperty("drmVblankEventDelivered")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.DrmVblankEventDeliveredFtraceEvent.verify(m.drmVblankEventDelivered);
                        if (e)
                            return "drmVblankEventDelivered." + e;
                    }
                }
                if (m.drmSchedJob != null && m.hasOwnProperty("drmSchedJob")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.DrmSchedJobFtraceEvent.verify(m.drmSchedJob);
                        if (e)
                            return "drmSchedJob." + e;
                    }
                }
                if (m.drmRunJob != null && m.hasOwnProperty("drmRunJob")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.DrmRunJobFtraceEvent.verify(m.drmRunJob);
                        if (e)
                            return "drmRunJob." + e;
                    }
                }
                if (m.drmSchedProcessJob != null && m.hasOwnProperty("drmSchedProcessJob")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.DrmSchedProcessJobFtraceEvent.verify(m.drmSchedProcessJob);
                        if (e)
                            return "drmSchedProcessJob." + e;
                    }
                }
                if (m.dmaFenceInit != null && m.hasOwnProperty("dmaFenceInit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.DmaFenceInitFtraceEvent.verify(m.dmaFenceInit);
                        if (e)
                            return "dmaFenceInit." + e;
                    }
                }
                if (m.dmaFenceEmit != null && m.hasOwnProperty("dmaFenceEmit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.DmaFenceEmitFtraceEvent.verify(m.dmaFenceEmit);
                        if (e)
                            return "dmaFenceEmit." + e;
                    }
                }
                if (m.dmaFenceSignaled != null && m.hasOwnProperty("dmaFenceSignaled")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.DmaFenceSignaledFtraceEvent.verify(m.dmaFenceSignaled);
                        if (e)
                            return "dmaFenceSignaled." + e;
                    }
                }
                if (m.dmaFenceWaitStart != null && m.hasOwnProperty("dmaFenceWaitStart")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.DmaFenceWaitStartFtraceEvent.verify(m.dmaFenceWaitStart);
                        if (e)
                            return "dmaFenceWaitStart." + e;
                    }
                }
                if (m.dmaFenceWaitEnd != null && m.hasOwnProperty("dmaFenceWaitEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.DmaFenceWaitEndFtraceEvent.verify(m.dmaFenceWaitEnd);
                        if (e)
                            return "dmaFenceWaitEnd." + e;
                    }
                }
                if (m.f2fsIostat != null && m.hasOwnProperty("f2fsIostat")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsIostatFtraceEvent.verify(m.f2fsIostat);
                        if (e)
                            return "f2fsIostat." + e;
                    }
                }
                if (m.f2fsIostatLatency != null && m.hasOwnProperty("f2fsIostatLatency")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.F2fsIostatLatencyFtraceEvent.verify(m.f2fsIostatLatency);
                        if (e)
                            return "f2fsIostatLatency." + e;
                    }
                }
                if (m.schedCpuUtilCfs != null && m.hasOwnProperty("schedCpuUtilCfs")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.SchedCpuUtilCfsFtraceEvent.verify(m.schedCpuUtilCfs);
                        if (e)
                            return "schedCpuUtilCfs." + e;
                    }
                }
                if (m.v4l2Qbuf != null && m.hasOwnProperty("v4l2Qbuf")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.V4l2QbufFtraceEvent.verify(m.v4l2Qbuf);
                        if (e)
                            return "v4l2Qbuf." + e;
                    }
                }
                if (m.v4l2Dqbuf != null && m.hasOwnProperty("v4l2Dqbuf")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.V4l2DqbufFtraceEvent.verify(m.v4l2Dqbuf);
                        if (e)
                            return "v4l2Dqbuf." + e;
                    }
                }
                if (m.vb2V4l2BufQueue != null && m.hasOwnProperty("vb2V4l2BufQueue")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Vb2V4l2BufQueueFtraceEvent.verify(m.vb2V4l2BufQueue);
                        if (e)
                            return "vb2V4l2BufQueue." + e;
                    }
                }
                if (m.vb2V4l2BufDone != null && m.hasOwnProperty("vb2V4l2BufDone")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Vb2V4l2BufDoneFtraceEvent.verify(m.vb2V4l2BufDone);
                        if (e)
                            return "vb2V4l2BufDone." + e;
                    }
                }
                if (m.vb2V4l2Qbuf != null && m.hasOwnProperty("vb2V4l2Qbuf")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Vb2V4l2QbufFtraceEvent.verify(m.vb2V4l2Qbuf);
                        if (e)
                            return "vb2V4l2Qbuf." + e;
                    }
                }
                if (m.vb2V4l2Dqbuf != null && m.hasOwnProperty("vb2V4l2Dqbuf")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.Vb2V4l2DqbufFtraceEvent.verify(m.vb2V4l2Dqbuf);
                        if (e)
                            return "vb2V4l2Dqbuf." + e;
                    }
                }
                if (m.dsiCmdFifoStatus != null && m.hasOwnProperty("dsiCmdFifoStatus")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.DsiCmdFifoStatusFtraceEvent.verify(m.dsiCmdFifoStatus);
                        if (e)
                            return "dsiCmdFifoStatus." + e;
                    }
                }
                if (m.dsiRx != null && m.hasOwnProperty("dsiRx")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.DsiRxFtraceEvent.verify(m.dsiRx);
                        if (e)
                            return "dsiRx." + e;
                    }
                }
                if (m.dsiTx != null && m.hasOwnProperty("dsiTx")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.DsiTxFtraceEvent.verify(m.dsiTx);
                        if (e)
                            return "dsiTx." + e;
                    }
                }
                if (m.androidFsDatareadEnd != null && m.hasOwnProperty("androidFsDatareadEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.AndroidFsDatareadEndFtraceEvent.verify(m.androidFsDatareadEnd);
                        if (e)
                            return "androidFsDatareadEnd." + e;
                    }
                }
                if (m.androidFsDatareadStart != null && m.hasOwnProperty("androidFsDatareadStart")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.AndroidFsDatareadStartFtraceEvent.verify(m.androidFsDatareadStart);
                        if (e)
                            return "androidFsDatareadStart." + e;
                    }
                }
                if (m.androidFsDatawriteEnd != null && m.hasOwnProperty("androidFsDatawriteEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.AndroidFsDatawriteEndFtraceEvent.verify(m.androidFsDatawriteEnd);
                        if (e)
                            return "androidFsDatawriteEnd." + e;
                    }
                }
                if (m.androidFsDatawriteStart != null && m.hasOwnProperty("androidFsDatawriteStart")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.AndroidFsDatawriteStartFtraceEvent.verify(m.androidFsDatawriteStart);
                        if (e)
                            return "androidFsDatawriteStart." + e;
                    }
                }
                if (m.androidFsFsyncEnd != null && m.hasOwnProperty("androidFsFsyncEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.AndroidFsFsyncEndFtraceEvent.verify(m.androidFsFsyncEnd);
                        if (e)
                            return "androidFsFsyncEnd." + e;
                    }
                }
                if (m.androidFsFsyncStart != null && m.hasOwnProperty("androidFsFsyncStart")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.AndroidFsFsyncStartFtraceEvent.verify(m.androidFsFsyncStart);
                        if (e)
                            return "androidFsFsyncStart." + e;
                    }
                }
                if (m.funcgraphEntry != null && m.hasOwnProperty("funcgraphEntry")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.FuncgraphEntryFtraceEvent.verify(m.funcgraphEntry);
                        if (e)
                            return "funcgraphEntry." + e;
                    }
                }
                if (m.funcgraphExit != null && m.hasOwnProperty("funcgraphExit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.FuncgraphExitFtraceEvent.verify(m.funcgraphExit);
                        if (e)
                            return "funcgraphExit." + e;
                    }
                }
                if (m.virtioVideoCmd != null && m.hasOwnProperty("virtioVideoCmd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.VirtioVideoCmdFtraceEvent.verify(m.virtioVideoCmd);
                        if (e)
                            return "virtioVideoCmd." + e;
                    }
                }
                if (m.virtioVideoCmdDone != null && m.hasOwnProperty("virtioVideoCmdDone")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.VirtioVideoCmdDoneFtraceEvent.verify(m.virtioVideoCmdDone);
                        if (e)
                            return "virtioVideoCmdDone." + e;
                    }
                }
                if (m.virtioVideoResourceQueue != null && m.hasOwnProperty("virtioVideoResourceQueue")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.VirtioVideoResourceQueueFtraceEvent.verify(m.virtioVideoResourceQueue);
                        if (e)
                            return "virtioVideoResourceQueue." + e;
                    }
                }
                if (m.virtioVideoResourceQueueDone != null && m.hasOwnProperty("virtioVideoResourceQueueDone")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent.verify(m.virtioVideoResourceQueueDone);
                        if (e)
                            return "virtioVideoResourceQueueDone." + e;
                    }
                }
                if (m.mmShrinkSlabStart != null && m.hasOwnProperty("mmShrinkSlabStart")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmShrinkSlabStartFtraceEvent.verify(m.mmShrinkSlabStart);
                        if (e)
                            return "mmShrinkSlabStart." + e;
                    }
                }
                if (m.mmShrinkSlabEnd != null && m.hasOwnProperty("mmShrinkSlabEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.MmShrinkSlabEndFtraceEvent.verify(m.mmShrinkSlabEnd);
                        if (e)
                            return "mmShrinkSlabEnd." + e;
                    }
                }
                if (m.trustySmc != null && m.hasOwnProperty("trustySmc")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.TrustySmcFtraceEvent.verify(m.trustySmc);
                        if (e)
                            return "trustySmc." + e;
                    }
                }
                if (m.trustySmcDone != null && m.hasOwnProperty("trustySmcDone")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.TrustySmcDoneFtraceEvent.verify(m.trustySmcDone);
                        if (e)
                            return "trustySmcDone." + e;
                    }
                }
                if (m.trustyStdCall32 != null && m.hasOwnProperty("trustyStdCall32")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.TrustyStdCall32FtraceEvent.verify(m.trustyStdCall32);
                        if (e)
                            return "trustyStdCall32." + e;
                    }
                }
                if (m.trustyStdCall32Done != null && m.hasOwnProperty("trustyStdCall32Done")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.TrustyStdCall32DoneFtraceEvent.verify(m.trustyStdCall32Done);
                        if (e)
                            return "trustyStdCall32Done." + e;
                    }
                }
                if (m.trustyShareMemory != null && m.hasOwnProperty("trustyShareMemory")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.TrustyShareMemoryFtraceEvent.verify(m.trustyShareMemory);
                        if (e)
                            return "trustyShareMemory." + e;
                    }
                }
                if (m.trustyShareMemoryDone != null && m.hasOwnProperty("trustyShareMemoryDone")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.TrustyShareMemoryDoneFtraceEvent.verify(m.trustyShareMemoryDone);
                        if (e)
                            return "trustyShareMemoryDone." + e;
                    }
                }
                if (m.trustyReclaimMemory != null && m.hasOwnProperty("trustyReclaimMemory")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.TrustyReclaimMemoryFtraceEvent.verify(m.trustyReclaimMemory);
                        if (e)
                            return "trustyReclaimMemory." + e;
                    }
                }
                if (m.trustyReclaimMemoryDone != null && m.hasOwnProperty("trustyReclaimMemoryDone")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent.verify(m.trustyReclaimMemoryDone);
                        if (e)
                            return "trustyReclaimMemoryDone." + e;
                    }
                }
                if (m.trustyIrq != null && m.hasOwnProperty("trustyIrq")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.TrustyIrqFtraceEvent.verify(m.trustyIrq);
                        if (e)
                            return "trustyIrq." + e;
                    }
                }
                if (m.trustyIpcHandleEvent != null && m.hasOwnProperty("trustyIpcHandleEvent")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.TrustyIpcHandleEventFtraceEvent.verify(m.trustyIpcHandleEvent);
                        if (e)
                            return "trustyIpcHandleEvent." + e;
                    }
                }
                if (m.trustyIpcConnect != null && m.hasOwnProperty("trustyIpcConnect")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.TrustyIpcConnectFtraceEvent.verify(m.trustyIpcConnect);
                        if (e)
                            return "trustyIpcConnect." + e;
                    }
                }
                if (m.trustyIpcConnectEnd != null && m.hasOwnProperty("trustyIpcConnectEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.TrustyIpcConnectEndFtraceEvent.verify(m.trustyIpcConnectEnd);
                        if (e)
                            return "trustyIpcConnectEnd." + e;
                    }
                }
                if (m.trustyIpcWrite != null && m.hasOwnProperty("trustyIpcWrite")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.TrustyIpcWriteFtraceEvent.verify(m.trustyIpcWrite);
                        if (e)
                            return "trustyIpcWrite." + e;
                    }
                }
                if (m.trustyIpcPoll != null && m.hasOwnProperty("trustyIpcPoll")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.TrustyIpcPollFtraceEvent.verify(m.trustyIpcPoll);
                        if (e)
                            return "trustyIpcPoll." + e;
                    }
                }
                if (m.trustyIpcPollEnd != null && m.hasOwnProperty("trustyIpcPollEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.TrustyIpcPollEndFtraceEvent.verify(m.trustyIpcPollEnd);
                        if (e)
                            return "trustyIpcPollEnd." + e;
                    }
                }
                if (m.trustyIpcRead != null && m.hasOwnProperty("trustyIpcRead")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.TrustyIpcReadFtraceEvent.verify(m.trustyIpcRead);
                        if (e)
                            return "trustyIpcRead." + e;
                    }
                }
                if (m.trustyIpcReadEnd != null && m.hasOwnProperty("trustyIpcReadEnd")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.TrustyIpcReadEndFtraceEvent.verify(m.trustyIpcReadEnd);
                        if (e)
                            return "trustyIpcReadEnd." + e;
                    }
                }
                if (m.trustyIpcRx != null && m.hasOwnProperty("trustyIpcRx")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.TrustyIpcRxFtraceEvent.verify(m.trustyIpcRx);
                        if (e)
                            return "trustyIpcRx." + e;
                    }
                }
                if (m.trustyIpcTx != null && m.hasOwnProperty("trustyIpcTx")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.TrustyIpcTxFtraceEvent.verify(m.trustyIpcTx);
                        if (e)
                            return "trustyIpcTx." + e;
                    }
                }
                if (m.trustyEnqueueNop != null && m.hasOwnProperty("trustyEnqueueNop")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.TrustyEnqueueNopFtraceEvent.verify(m.trustyEnqueueNop);
                        if (e)
                            return "trustyEnqueueNop." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a FtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.FtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.FtraceEvent} FtraceEvent
             */
            FtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.FtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.FtraceEvent();
                if (d.timestamp != null) {
                    if ($util.Long)
                        (m.timestamp = $util.Long.fromValue(d.timestamp)).unsigned = true;
                    else if (typeof d.timestamp === "string")
                        m.timestamp = parseInt(d.timestamp, 10);
                    else if (typeof d.timestamp === "number")
                        m.timestamp = d.timestamp;
                    else if (typeof d.timestamp === "object")
                        m.timestamp = new $util.LongBits(d.timestamp.low >>> 0, d.timestamp.high >>> 0).toNumber(true);
                }
                if (d.pid != null) {
                    m.pid = d.pid >>> 0;
                }
                if (d.print != null) {
                    if (typeof d.print !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.print: object expected");
                    m.print = $root.perfetto.protos.PrintFtraceEvent.fromObject(d.print);
                }
                if (d.schedSwitch != null) {
                    if (typeof d.schedSwitch !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.schedSwitch: object expected");
                    m.schedSwitch = $root.perfetto.protos.SchedSwitchFtraceEvent.fromObject(d.schedSwitch);
                }
                if (d.cpuFrequency != null) {
                    if (typeof d.cpuFrequency !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.cpuFrequency: object expected");
                    m.cpuFrequency = $root.perfetto.protos.CpuFrequencyFtraceEvent.fromObject(d.cpuFrequency);
                }
                if (d.cpuFrequencyLimits != null) {
                    if (typeof d.cpuFrequencyLimits !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.cpuFrequencyLimits: object expected");
                    m.cpuFrequencyLimits = $root.perfetto.protos.CpuFrequencyLimitsFtraceEvent.fromObject(d.cpuFrequencyLimits);
                }
                if (d.cpuIdle != null) {
                    if (typeof d.cpuIdle !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.cpuIdle: object expected");
                    m.cpuIdle = $root.perfetto.protos.CpuIdleFtraceEvent.fromObject(d.cpuIdle);
                }
                if (d.clockEnable != null) {
                    if (typeof d.clockEnable !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.clockEnable: object expected");
                    m.clockEnable = $root.perfetto.protos.ClockEnableFtraceEvent.fromObject(d.clockEnable);
                }
                if (d.clockDisable != null) {
                    if (typeof d.clockDisable !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.clockDisable: object expected");
                    m.clockDisable = $root.perfetto.protos.ClockDisableFtraceEvent.fromObject(d.clockDisable);
                }
                if (d.clockSetRate != null) {
                    if (typeof d.clockSetRate !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.clockSetRate: object expected");
                    m.clockSetRate = $root.perfetto.protos.ClockSetRateFtraceEvent.fromObject(d.clockSetRate);
                }
                if (d.schedWakeup != null) {
                    if (typeof d.schedWakeup !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.schedWakeup: object expected");
                    m.schedWakeup = $root.perfetto.protos.SchedWakeupFtraceEvent.fromObject(d.schedWakeup);
                }
                if (d.schedBlockedReason != null) {
                    if (typeof d.schedBlockedReason !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.schedBlockedReason: object expected");
                    m.schedBlockedReason = $root.perfetto.protos.SchedBlockedReasonFtraceEvent.fromObject(d.schedBlockedReason);
                }
                if (d.schedCpuHotplug != null) {
                    if (typeof d.schedCpuHotplug !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.schedCpuHotplug: object expected");
                    m.schedCpuHotplug = $root.perfetto.protos.SchedCpuHotplugFtraceEvent.fromObject(d.schedCpuHotplug);
                }
                if (d.schedWaking != null) {
                    if (typeof d.schedWaking !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.schedWaking: object expected");
                    m.schedWaking = $root.perfetto.protos.SchedWakingFtraceEvent.fromObject(d.schedWaking);
                }
                if (d.ipiEntry != null) {
                    if (typeof d.ipiEntry !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ipiEntry: object expected");
                    m.ipiEntry = $root.perfetto.protos.IpiEntryFtraceEvent.fromObject(d.ipiEntry);
                }
                if (d.ipiExit != null) {
                    if (typeof d.ipiExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ipiExit: object expected");
                    m.ipiExit = $root.perfetto.protos.IpiExitFtraceEvent.fromObject(d.ipiExit);
                }
                if (d.ipiRaise != null) {
                    if (typeof d.ipiRaise !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ipiRaise: object expected");
                    m.ipiRaise = $root.perfetto.protos.IpiRaiseFtraceEvent.fromObject(d.ipiRaise);
                }
                if (d.softirqEntry != null) {
                    if (typeof d.softirqEntry !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.softirqEntry: object expected");
                    m.softirqEntry = $root.perfetto.protos.SoftirqEntryFtraceEvent.fromObject(d.softirqEntry);
                }
                if (d.softirqExit != null) {
                    if (typeof d.softirqExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.softirqExit: object expected");
                    m.softirqExit = $root.perfetto.protos.SoftirqExitFtraceEvent.fromObject(d.softirqExit);
                }
                if (d.softirqRaise != null) {
                    if (typeof d.softirqRaise !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.softirqRaise: object expected");
                    m.softirqRaise = $root.perfetto.protos.SoftirqRaiseFtraceEvent.fromObject(d.softirqRaise);
                }
                if (d.i2cRead != null) {
                    if (typeof d.i2cRead !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.i2cRead: object expected");
                    m.i2cRead = $root.perfetto.protos.I2cReadFtraceEvent.fromObject(d.i2cRead);
                }
                if (d.i2cWrite != null) {
                    if (typeof d.i2cWrite !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.i2cWrite: object expected");
                    m.i2cWrite = $root.perfetto.protos.I2cWriteFtraceEvent.fromObject(d.i2cWrite);
                }
                if (d.i2cResult != null) {
                    if (typeof d.i2cResult !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.i2cResult: object expected");
                    m.i2cResult = $root.perfetto.protos.I2cResultFtraceEvent.fromObject(d.i2cResult);
                }
                if (d.i2cReply != null) {
                    if (typeof d.i2cReply !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.i2cReply: object expected");
                    m.i2cReply = $root.perfetto.protos.I2cReplyFtraceEvent.fromObject(d.i2cReply);
                }
                if (d.smbusRead != null) {
                    if (typeof d.smbusRead !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.smbusRead: object expected");
                    m.smbusRead = $root.perfetto.protos.SmbusReadFtraceEvent.fromObject(d.smbusRead);
                }
                if (d.smbusWrite != null) {
                    if (typeof d.smbusWrite !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.smbusWrite: object expected");
                    m.smbusWrite = $root.perfetto.protos.SmbusWriteFtraceEvent.fromObject(d.smbusWrite);
                }
                if (d.smbusResult != null) {
                    if (typeof d.smbusResult !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.smbusResult: object expected");
                    m.smbusResult = $root.perfetto.protos.SmbusResultFtraceEvent.fromObject(d.smbusResult);
                }
                if (d.smbusReply != null) {
                    if (typeof d.smbusReply !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.smbusReply: object expected");
                    m.smbusReply = $root.perfetto.protos.SmbusReplyFtraceEvent.fromObject(d.smbusReply);
                }
                if (d.lowmemoryKill != null) {
                    if (typeof d.lowmemoryKill !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.lowmemoryKill: object expected");
                    m.lowmemoryKill = $root.perfetto.protos.LowmemoryKillFtraceEvent.fromObject(d.lowmemoryKill);
                }
                if (d.irqHandlerEntry != null) {
                    if (typeof d.irqHandlerEntry !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.irqHandlerEntry: object expected");
                    m.irqHandlerEntry = $root.perfetto.protos.IrqHandlerEntryFtraceEvent.fromObject(d.irqHandlerEntry);
                }
                if (d.irqHandlerExit != null) {
                    if (typeof d.irqHandlerExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.irqHandlerExit: object expected");
                    m.irqHandlerExit = $root.perfetto.protos.IrqHandlerExitFtraceEvent.fromObject(d.irqHandlerExit);
                }
                if (d.syncPt != null) {
                    if (typeof d.syncPt !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.syncPt: object expected");
                    m.syncPt = $root.perfetto.protos.SyncPtFtraceEvent.fromObject(d.syncPt);
                }
                if (d.syncTimeline != null) {
                    if (typeof d.syncTimeline !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.syncTimeline: object expected");
                    m.syncTimeline = $root.perfetto.protos.SyncTimelineFtraceEvent.fromObject(d.syncTimeline);
                }
                if (d.syncWait != null) {
                    if (typeof d.syncWait !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.syncWait: object expected");
                    m.syncWait = $root.perfetto.protos.SyncWaitFtraceEvent.fromObject(d.syncWait);
                }
                if (d.ext4DaWriteBegin != null) {
                    if (typeof d.ext4DaWriteBegin !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4DaWriteBegin: object expected");
                    m.ext4DaWriteBegin = $root.perfetto.protos.Ext4DaWriteBeginFtraceEvent.fromObject(d.ext4DaWriteBegin);
                }
                if (d.ext4DaWriteEnd != null) {
                    if (typeof d.ext4DaWriteEnd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4DaWriteEnd: object expected");
                    m.ext4DaWriteEnd = $root.perfetto.protos.Ext4DaWriteEndFtraceEvent.fromObject(d.ext4DaWriteEnd);
                }
                if (d.ext4SyncFileEnter != null) {
                    if (typeof d.ext4SyncFileEnter !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4SyncFileEnter: object expected");
                    m.ext4SyncFileEnter = $root.perfetto.protos.Ext4SyncFileEnterFtraceEvent.fromObject(d.ext4SyncFileEnter);
                }
                if (d.ext4SyncFileExit != null) {
                    if (typeof d.ext4SyncFileExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4SyncFileExit: object expected");
                    m.ext4SyncFileExit = $root.perfetto.protos.Ext4SyncFileExitFtraceEvent.fromObject(d.ext4SyncFileExit);
                }
                if (d.blockRqIssue != null) {
                    if (typeof d.blockRqIssue !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.blockRqIssue: object expected");
                    m.blockRqIssue = $root.perfetto.protos.BlockRqIssueFtraceEvent.fromObject(d.blockRqIssue);
                }
                if (d.mmVmscanDirectReclaimBegin != null) {
                    if (typeof d.mmVmscanDirectReclaimBegin !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmVmscanDirectReclaimBegin: object expected");
                    m.mmVmscanDirectReclaimBegin = $root.perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent.fromObject(d.mmVmscanDirectReclaimBegin);
                }
                if (d.mmVmscanDirectReclaimEnd != null) {
                    if (typeof d.mmVmscanDirectReclaimEnd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmVmscanDirectReclaimEnd: object expected");
                    m.mmVmscanDirectReclaimEnd = $root.perfetto.protos.MmVmscanDirectReclaimEndFtraceEvent.fromObject(d.mmVmscanDirectReclaimEnd);
                }
                if (d.mmVmscanKswapdWake != null) {
                    if (typeof d.mmVmscanKswapdWake !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmVmscanKswapdWake: object expected");
                    m.mmVmscanKswapdWake = $root.perfetto.protos.MmVmscanKswapdWakeFtraceEvent.fromObject(d.mmVmscanKswapdWake);
                }
                if (d.mmVmscanKswapdSleep != null) {
                    if (typeof d.mmVmscanKswapdSleep !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmVmscanKswapdSleep: object expected");
                    m.mmVmscanKswapdSleep = $root.perfetto.protos.MmVmscanKswapdSleepFtraceEvent.fromObject(d.mmVmscanKswapdSleep);
                }
                if (d.binderTransaction != null) {
                    if (typeof d.binderTransaction !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.binderTransaction: object expected");
                    m.binderTransaction = $root.perfetto.protos.BinderTransactionFtraceEvent.fromObject(d.binderTransaction);
                }
                if (d.binderTransactionReceived != null) {
                    if (typeof d.binderTransactionReceived !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.binderTransactionReceived: object expected");
                    m.binderTransactionReceived = $root.perfetto.protos.BinderTransactionReceivedFtraceEvent.fromObject(d.binderTransactionReceived);
                }
                if (d.binderSetPriority != null) {
                    if (typeof d.binderSetPriority !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.binderSetPriority: object expected");
                    m.binderSetPriority = $root.perfetto.protos.BinderSetPriorityFtraceEvent.fromObject(d.binderSetPriority);
                }
                if (d.binderLock != null) {
                    if (typeof d.binderLock !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.binderLock: object expected");
                    m.binderLock = $root.perfetto.protos.BinderLockFtraceEvent.fromObject(d.binderLock);
                }
                if (d.binderLocked != null) {
                    if (typeof d.binderLocked !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.binderLocked: object expected");
                    m.binderLocked = $root.perfetto.protos.BinderLockedFtraceEvent.fromObject(d.binderLocked);
                }
                if (d.binderUnlock != null) {
                    if (typeof d.binderUnlock !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.binderUnlock: object expected");
                    m.binderUnlock = $root.perfetto.protos.BinderUnlockFtraceEvent.fromObject(d.binderUnlock);
                }
                if (d.workqueueActivateWork != null) {
                    if (typeof d.workqueueActivateWork !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.workqueueActivateWork: object expected");
                    m.workqueueActivateWork = $root.perfetto.protos.WorkqueueActivateWorkFtraceEvent.fromObject(d.workqueueActivateWork);
                }
                if (d.workqueueExecuteEnd != null) {
                    if (typeof d.workqueueExecuteEnd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.workqueueExecuteEnd: object expected");
                    m.workqueueExecuteEnd = $root.perfetto.protos.WorkqueueExecuteEndFtraceEvent.fromObject(d.workqueueExecuteEnd);
                }
                if (d.workqueueExecuteStart != null) {
                    if (typeof d.workqueueExecuteStart !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.workqueueExecuteStart: object expected");
                    m.workqueueExecuteStart = $root.perfetto.protos.WorkqueueExecuteStartFtraceEvent.fromObject(d.workqueueExecuteStart);
                }
                if (d.workqueueQueueWork != null) {
                    if (typeof d.workqueueQueueWork !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.workqueueQueueWork: object expected");
                    m.workqueueQueueWork = $root.perfetto.protos.WorkqueueQueueWorkFtraceEvent.fromObject(d.workqueueQueueWork);
                }
                if (d.regulatorDisable != null) {
                    if (typeof d.regulatorDisable !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.regulatorDisable: object expected");
                    m.regulatorDisable = $root.perfetto.protos.RegulatorDisableFtraceEvent.fromObject(d.regulatorDisable);
                }
                if (d.regulatorDisableComplete != null) {
                    if (typeof d.regulatorDisableComplete !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.regulatorDisableComplete: object expected");
                    m.regulatorDisableComplete = $root.perfetto.protos.RegulatorDisableCompleteFtraceEvent.fromObject(d.regulatorDisableComplete);
                }
                if (d.regulatorEnable != null) {
                    if (typeof d.regulatorEnable !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.regulatorEnable: object expected");
                    m.regulatorEnable = $root.perfetto.protos.RegulatorEnableFtraceEvent.fromObject(d.regulatorEnable);
                }
                if (d.regulatorEnableComplete != null) {
                    if (typeof d.regulatorEnableComplete !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.regulatorEnableComplete: object expected");
                    m.regulatorEnableComplete = $root.perfetto.protos.RegulatorEnableCompleteFtraceEvent.fromObject(d.regulatorEnableComplete);
                }
                if (d.regulatorEnableDelay != null) {
                    if (typeof d.regulatorEnableDelay !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.regulatorEnableDelay: object expected");
                    m.regulatorEnableDelay = $root.perfetto.protos.RegulatorEnableDelayFtraceEvent.fromObject(d.regulatorEnableDelay);
                }
                if (d.regulatorSetVoltage != null) {
                    if (typeof d.regulatorSetVoltage !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.regulatorSetVoltage: object expected");
                    m.regulatorSetVoltage = $root.perfetto.protos.RegulatorSetVoltageFtraceEvent.fromObject(d.regulatorSetVoltage);
                }
                if (d.regulatorSetVoltageComplete != null) {
                    if (typeof d.regulatorSetVoltageComplete !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.regulatorSetVoltageComplete: object expected");
                    m.regulatorSetVoltageComplete = $root.perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent.fromObject(d.regulatorSetVoltageComplete);
                }
                if (d.cgroupAttachTask != null) {
                    if (typeof d.cgroupAttachTask !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.cgroupAttachTask: object expected");
                    m.cgroupAttachTask = $root.perfetto.protos.CgroupAttachTaskFtraceEvent.fromObject(d.cgroupAttachTask);
                }
                if (d.cgroupMkdir != null) {
                    if (typeof d.cgroupMkdir !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.cgroupMkdir: object expected");
                    m.cgroupMkdir = $root.perfetto.protos.CgroupMkdirFtraceEvent.fromObject(d.cgroupMkdir);
                }
                if (d.cgroupRemount != null) {
                    if (typeof d.cgroupRemount !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.cgroupRemount: object expected");
                    m.cgroupRemount = $root.perfetto.protos.CgroupRemountFtraceEvent.fromObject(d.cgroupRemount);
                }
                if (d.cgroupRmdir != null) {
                    if (typeof d.cgroupRmdir !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.cgroupRmdir: object expected");
                    m.cgroupRmdir = $root.perfetto.protos.CgroupRmdirFtraceEvent.fromObject(d.cgroupRmdir);
                }
                if (d.cgroupTransferTasks != null) {
                    if (typeof d.cgroupTransferTasks !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.cgroupTransferTasks: object expected");
                    m.cgroupTransferTasks = $root.perfetto.protos.CgroupTransferTasksFtraceEvent.fromObject(d.cgroupTransferTasks);
                }
                if (d.cgroupDestroyRoot != null) {
                    if (typeof d.cgroupDestroyRoot !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.cgroupDestroyRoot: object expected");
                    m.cgroupDestroyRoot = $root.perfetto.protos.CgroupDestroyRootFtraceEvent.fromObject(d.cgroupDestroyRoot);
                }
                if (d.cgroupRelease != null) {
                    if (typeof d.cgroupRelease !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.cgroupRelease: object expected");
                    m.cgroupRelease = $root.perfetto.protos.CgroupReleaseFtraceEvent.fromObject(d.cgroupRelease);
                }
                if (d.cgroupRename != null) {
                    if (typeof d.cgroupRename !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.cgroupRename: object expected");
                    m.cgroupRename = $root.perfetto.protos.CgroupRenameFtraceEvent.fromObject(d.cgroupRename);
                }
                if (d.cgroupSetupRoot != null) {
                    if (typeof d.cgroupSetupRoot !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.cgroupSetupRoot: object expected");
                    m.cgroupSetupRoot = $root.perfetto.protos.CgroupSetupRootFtraceEvent.fromObject(d.cgroupSetupRoot);
                }
                if (d.mdpCmdKickoff != null) {
                    if (typeof d.mdpCmdKickoff !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mdpCmdKickoff: object expected");
                    m.mdpCmdKickoff = $root.perfetto.protos.MdpCmdKickoffFtraceEvent.fromObject(d.mdpCmdKickoff);
                }
                if (d.mdpCommit != null) {
                    if (typeof d.mdpCommit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mdpCommit: object expected");
                    m.mdpCommit = $root.perfetto.protos.MdpCommitFtraceEvent.fromObject(d.mdpCommit);
                }
                if (d.mdpPerfSetOt != null) {
                    if (typeof d.mdpPerfSetOt !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mdpPerfSetOt: object expected");
                    m.mdpPerfSetOt = $root.perfetto.protos.MdpPerfSetOtFtraceEvent.fromObject(d.mdpPerfSetOt);
                }
                if (d.mdpSsppChange != null) {
                    if (typeof d.mdpSsppChange !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mdpSsppChange: object expected");
                    m.mdpSsppChange = $root.perfetto.protos.MdpSsppChangeFtraceEvent.fromObject(d.mdpSsppChange);
                }
                if (d.tracingMarkWrite != null) {
                    if (typeof d.tracingMarkWrite !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.tracingMarkWrite: object expected");
                    m.tracingMarkWrite = $root.perfetto.protos.TracingMarkWriteFtraceEvent.fromObject(d.tracingMarkWrite);
                }
                if (d.mdpCmdPingpongDone != null) {
                    if (typeof d.mdpCmdPingpongDone !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mdpCmdPingpongDone: object expected");
                    m.mdpCmdPingpongDone = $root.perfetto.protos.MdpCmdPingpongDoneFtraceEvent.fromObject(d.mdpCmdPingpongDone);
                }
                if (d.mdpCompareBw != null) {
                    if (typeof d.mdpCompareBw !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mdpCompareBw: object expected");
                    m.mdpCompareBw = $root.perfetto.protos.MdpCompareBwFtraceEvent.fromObject(d.mdpCompareBw);
                }
                if (d.mdpPerfSetPanicLuts != null) {
                    if (typeof d.mdpPerfSetPanicLuts !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mdpPerfSetPanicLuts: object expected");
                    m.mdpPerfSetPanicLuts = $root.perfetto.protos.MdpPerfSetPanicLutsFtraceEvent.fromObject(d.mdpPerfSetPanicLuts);
                }
                if (d.mdpSsppSet != null) {
                    if (typeof d.mdpSsppSet !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mdpSsppSet: object expected");
                    m.mdpSsppSet = $root.perfetto.protos.MdpSsppSetFtraceEvent.fromObject(d.mdpSsppSet);
                }
                if (d.mdpCmdReadptrDone != null) {
                    if (typeof d.mdpCmdReadptrDone !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mdpCmdReadptrDone: object expected");
                    m.mdpCmdReadptrDone = $root.perfetto.protos.MdpCmdReadptrDoneFtraceEvent.fromObject(d.mdpCmdReadptrDone);
                }
                if (d.mdpMisrCrc != null) {
                    if (typeof d.mdpMisrCrc !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mdpMisrCrc: object expected");
                    m.mdpMisrCrc = $root.perfetto.protos.MdpMisrCrcFtraceEvent.fromObject(d.mdpMisrCrc);
                }
                if (d.mdpPerfSetQosLuts != null) {
                    if (typeof d.mdpPerfSetQosLuts !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mdpPerfSetQosLuts: object expected");
                    m.mdpPerfSetQosLuts = $root.perfetto.protos.MdpPerfSetQosLutsFtraceEvent.fromObject(d.mdpPerfSetQosLuts);
                }
                if (d.mdpTraceCounter != null) {
                    if (typeof d.mdpTraceCounter !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mdpTraceCounter: object expected");
                    m.mdpTraceCounter = $root.perfetto.protos.MdpTraceCounterFtraceEvent.fromObject(d.mdpTraceCounter);
                }
                if (d.mdpCmdReleaseBw != null) {
                    if (typeof d.mdpCmdReleaseBw !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mdpCmdReleaseBw: object expected");
                    m.mdpCmdReleaseBw = $root.perfetto.protos.MdpCmdReleaseBwFtraceEvent.fromObject(d.mdpCmdReleaseBw);
                }
                if (d.mdpMixerUpdate != null) {
                    if (typeof d.mdpMixerUpdate !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mdpMixerUpdate: object expected");
                    m.mdpMixerUpdate = $root.perfetto.protos.MdpMixerUpdateFtraceEvent.fromObject(d.mdpMixerUpdate);
                }
                if (d.mdpPerfSetWmLevels != null) {
                    if (typeof d.mdpPerfSetWmLevels !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mdpPerfSetWmLevels: object expected");
                    m.mdpPerfSetWmLevels = $root.perfetto.protos.MdpPerfSetWmLevelsFtraceEvent.fromObject(d.mdpPerfSetWmLevels);
                }
                if (d.mdpVideoUnderrunDone != null) {
                    if (typeof d.mdpVideoUnderrunDone !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mdpVideoUnderrunDone: object expected");
                    m.mdpVideoUnderrunDone = $root.perfetto.protos.MdpVideoUnderrunDoneFtraceEvent.fromObject(d.mdpVideoUnderrunDone);
                }
                if (d.mdpCmdWaitPingpong != null) {
                    if (typeof d.mdpCmdWaitPingpong !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mdpCmdWaitPingpong: object expected");
                    m.mdpCmdWaitPingpong = $root.perfetto.protos.MdpCmdWaitPingpongFtraceEvent.fromObject(d.mdpCmdWaitPingpong);
                }
                if (d.mdpPerfPrefillCalc != null) {
                    if (typeof d.mdpPerfPrefillCalc !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mdpPerfPrefillCalc: object expected");
                    m.mdpPerfPrefillCalc = $root.perfetto.protos.MdpPerfPrefillCalcFtraceEvent.fromObject(d.mdpPerfPrefillCalc);
                }
                if (d.mdpPerfUpdateBus != null) {
                    if (typeof d.mdpPerfUpdateBus !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mdpPerfUpdateBus: object expected");
                    m.mdpPerfUpdateBus = $root.perfetto.protos.MdpPerfUpdateBusFtraceEvent.fromObject(d.mdpPerfUpdateBus);
                }
                if (d.rotatorBwAoAsContext != null) {
                    if (typeof d.rotatorBwAoAsContext !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.rotatorBwAoAsContext: object expected");
                    m.rotatorBwAoAsContext = $root.perfetto.protos.RotatorBwAoAsContextFtraceEvent.fromObject(d.rotatorBwAoAsContext);
                }
                if (d.mmFilemapAddToPageCache != null) {
                    if (typeof d.mmFilemapAddToPageCache !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmFilemapAddToPageCache: object expected");
                    m.mmFilemapAddToPageCache = $root.perfetto.protos.MmFilemapAddToPageCacheFtraceEvent.fromObject(d.mmFilemapAddToPageCache);
                }
                if (d.mmFilemapDeleteFromPageCache != null) {
                    if (typeof d.mmFilemapDeleteFromPageCache !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmFilemapDeleteFromPageCache: object expected");
                    m.mmFilemapDeleteFromPageCache = $root.perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent.fromObject(d.mmFilemapDeleteFromPageCache);
                }
                if (d.mmCompactionBegin != null) {
                    if (typeof d.mmCompactionBegin !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmCompactionBegin: object expected");
                    m.mmCompactionBegin = $root.perfetto.protos.MmCompactionBeginFtraceEvent.fromObject(d.mmCompactionBegin);
                }
                if (d.mmCompactionDeferCompaction != null) {
                    if (typeof d.mmCompactionDeferCompaction !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmCompactionDeferCompaction: object expected");
                    m.mmCompactionDeferCompaction = $root.perfetto.protos.MmCompactionDeferCompactionFtraceEvent.fromObject(d.mmCompactionDeferCompaction);
                }
                if (d.mmCompactionDeferred != null) {
                    if (typeof d.mmCompactionDeferred !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmCompactionDeferred: object expected");
                    m.mmCompactionDeferred = $root.perfetto.protos.MmCompactionDeferredFtraceEvent.fromObject(d.mmCompactionDeferred);
                }
                if (d.mmCompactionDeferReset != null) {
                    if (typeof d.mmCompactionDeferReset !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmCompactionDeferReset: object expected");
                    m.mmCompactionDeferReset = $root.perfetto.protos.MmCompactionDeferResetFtraceEvent.fromObject(d.mmCompactionDeferReset);
                }
                if (d.mmCompactionEnd != null) {
                    if (typeof d.mmCompactionEnd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmCompactionEnd: object expected");
                    m.mmCompactionEnd = $root.perfetto.protos.MmCompactionEndFtraceEvent.fromObject(d.mmCompactionEnd);
                }
                if (d.mmCompactionFinished != null) {
                    if (typeof d.mmCompactionFinished !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmCompactionFinished: object expected");
                    m.mmCompactionFinished = $root.perfetto.protos.MmCompactionFinishedFtraceEvent.fromObject(d.mmCompactionFinished);
                }
                if (d.mmCompactionIsolateFreepages != null) {
                    if (typeof d.mmCompactionIsolateFreepages !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmCompactionIsolateFreepages: object expected");
                    m.mmCompactionIsolateFreepages = $root.perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent.fromObject(d.mmCompactionIsolateFreepages);
                }
                if (d.mmCompactionIsolateMigratepages != null) {
                    if (typeof d.mmCompactionIsolateMigratepages !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmCompactionIsolateMigratepages: object expected");
                    m.mmCompactionIsolateMigratepages = $root.perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent.fromObject(d.mmCompactionIsolateMigratepages);
                }
                if (d.mmCompactionKcompactdSleep != null) {
                    if (typeof d.mmCompactionKcompactdSleep !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmCompactionKcompactdSleep: object expected");
                    m.mmCompactionKcompactdSleep = $root.perfetto.protos.MmCompactionKcompactdSleepFtraceEvent.fromObject(d.mmCompactionKcompactdSleep);
                }
                if (d.mmCompactionKcompactdWake != null) {
                    if (typeof d.mmCompactionKcompactdWake !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmCompactionKcompactdWake: object expected");
                    m.mmCompactionKcompactdWake = $root.perfetto.protos.MmCompactionKcompactdWakeFtraceEvent.fromObject(d.mmCompactionKcompactdWake);
                }
                if (d.mmCompactionMigratepages != null) {
                    if (typeof d.mmCompactionMigratepages !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmCompactionMigratepages: object expected");
                    m.mmCompactionMigratepages = $root.perfetto.protos.MmCompactionMigratepagesFtraceEvent.fromObject(d.mmCompactionMigratepages);
                }
                if (d.mmCompactionSuitable != null) {
                    if (typeof d.mmCompactionSuitable !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmCompactionSuitable: object expected");
                    m.mmCompactionSuitable = $root.perfetto.protos.MmCompactionSuitableFtraceEvent.fromObject(d.mmCompactionSuitable);
                }
                if (d.mmCompactionTryToCompactPages != null) {
                    if (typeof d.mmCompactionTryToCompactPages !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmCompactionTryToCompactPages: object expected");
                    m.mmCompactionTryToCompactPages = $root.perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent.fromObject(d.mmCompactionTryToCompactPages);
                }
                if (d.mmCompactionWakeupKcompactd != null) {
                    if (typeof d.mmCompactionWakeupKcompactd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmCompactionWakeupKcompactd: object expected");
                    m.mmCompactionWakeupKcompactd = $root.perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent.fromObject(d.mmCompactionWakeupKcompactd);
                }
                if (d.suspendResume != null) {
                    if (typeof d.suspendResume !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.suspendResume: object expected");
                    m.suspendResume = $root.perfetto.protos.SuspendResumeFtraceEvent.fromObject(d.suspendResume);
                }
                if (d.schedWakeupNew != null) {
                    if (typeof d.schedWakeupNew !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.schedWakeupNew: object expected");
                    m.schedWakeupNew = $root.perfetto.protos.SchedWakeupNewFtraceEvent.fromObject(d.schedWakeupNew);
                }
                if (d.blockBioBackmerge != null) {
                    if (typeof d.blockBioBackmerge !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.blockBioBackmerge: object expected");
                    m.blockBioBackmerge = $root.perfetto.protos.BlockBioBackmergeFtraceEvent.fromObject(d.blockBioBackmerge);
                }
                if (d.blockBioBounce != null) {
                    if (typeof d.blockBioBounce !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.blockBioBounce: object expected");
                    m.blockBioBounce = $root.perfetto.protos.BlockBioBounceFtraceEvent.fromObject(d.blockBioBounce);
                }
                if (d.blockBioComplete != null) {
                    if (typeof d.blockBioComplete !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.blockBioComplete: object expected");
                    m.blockBioComplete = $root.perfetto.protos.BlockBioCompleteFtraceEvent.fromObject(d.blockBioComplete);
                }
                if (d.blockBioFrontmerge != null) {
                    if (typeof d.blockBioFrontmerge !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.blockBioFrontmerge: object expected");
                    m.blockBioFrontmerge = $root.perfetto.protos.BlockBioFrontmergeFtraceEvent.fromObject(d.blockBioFrontmerge);
                }
                if (d.blockBioQueue != null) {
                    if (typeof d.blockBioQueue !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.blockBioQueue: object expected");
                    m.blockBioQueue = $root.perfetto.protos.BlockBioQueueFtraceEvent.fromObject(d.blockBioQueue);
                }
                if (d.blockBioRemap != null) {
                    if (typeof d.blockBioRemap !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.blockBioRemap: object expected");
                    m.blockBioRemap = $root.perfetto.protos.BlockBioRemapFtraceEvent.fromObject(d.blockBioRemap);
                }
                if (d.blockDirtyBuffer != null) {
                    if (typeof d.blockDirtyBuffer !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.blockDirtyBuffer: object expected");
                    m.blockDirtyBuffer = $root.perfetto.protos.BlockDirtyBufferFtraceEvent.fromObject(d.blockDirtyBuffer);
                }
                if (d.blockGetrq != null) {
                    if (typeof d.blockGetrq !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.blockGetrq: object expected");
                    m.blockGetrq = $root.perfetto.protos.BlockGetrqFtraceEvent.fromObject(d.blockGetrq);
                }
                if (d.blockPlug != null) {
                    if (typeof d.blockPlug !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.blockPlug: object expected");
                    m.blockPlug = $root.perfetto.protos.BlockPlugFtraceEvent.fromObject(d.blockPlug);
                }
                if (d.blockRqAbort != null) {
                    if (typeof d.blockRqAbort !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.blockRqAbort: object expected");
                    m.blockRqAbort = $root.perfetto.protos.BlockRqAbortFtraceEvent.fromObject(d.blockRqAbort);
                }
                if (d.blockRqComplete != null) {
                    if (typeof d.blockRqComplete !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.blockRqComplete: object expected");
                    m.blockRqComplete = $root.perfetto.protos.BlockRqCompleteFtraceEvent.fromObject(d.blockRqComplete);
                }
                if (d.blockRqInsert != null) {
                    if (typeof d.blockRqInsert !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.blockRqInsert: object expected");
                    m.blockRqInsert = $root.perfetto.protos.BlockRqInsertFtraceEvent.fromObject(d.blockRqInsert);
                }
                if (d.blockRqRemap != null) {
                    if (typeof d.blockRqRemap !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.blockRqRemap: object expected");
                    m.blockRqRemap = $root.perfetto.protos.BlockRqRemapFtraceEvent.fromObject(d.blockRqRemap);
                }
                if (d.blockRqRequeue != null) {
                    if (typeof d.blockRqRequeue !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.blockRqRequeue: object expected");
                    m.blockRqRequeue = $root.perfetto.protos.BlockRqRequeueFtraceEvent.fromObject(d.blockRqRequeue);
                }
                if (d.blockSleeprq != null) {
                    if (typeof d.blockSleeprq !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.blockSleeprq: object expected");
                    m.blockSleeprq = $root.perfetto.protos.BlockSleeprqFtraceEvent.fromObject(d.blockSleeprq);
                }
                if (d.blockSplit != null) {
                    if (typeof d.blockSplit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.blockSplit: object expected");
                    m.blockSplit = $root.perfetto.protos.BlockSplitFtraceEvent.fromObject(d.blockSplit);
                }
                if (d.blockTouchBuffer != null) {
                    if (typeof d.blockTouchBuffer !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.blockTouchBuffer: object expected");
                    m.blockTouchBuffer = $root.perfetto.protos.BlockTouchBufferFtraceEvent.fromObject(d.blockTouchBuffer);
                }
                if (d.blockUnplug != null) {
                    if (typeof d.blockUnplug !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.blockUnplug: object expected");
                    m.blockUnplug = $root.perfetto.protos.BlockUnplugFtraceEvent.fromObject(d.blockUnplug);
                }
                if (d.ext4AllocDaBlocks != null) {
                    if (typeof d.ext4AllocDaBlocks !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4AllocDaBlocks: object expected");
                    m.ext4AllocDaBlocks = $root.perfetto.protos.Ext4AllocDaBlocksFtraceEvent.fromObject(d.ext4AllocDaBlocks);
                }
                if (d.ext4AllocateBlocks != null) {
                    if (typeof d.ext4AllocateBlocks !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4AllocateBlocks: object expected");
                    m.ext4AllocateBlocks = $root.perfetto.protos.Ext4AllocateBlocksFtraceEvent.fromObject(d.ext4AllocateBlocks);
                }
                if (d.ext4AllocateInode != null) {
                    if (typeof d.ext4AllocateInode !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4AllocateInode: object expected");
                    m.ext4AllocateInode = $root.perfetto.protos.Ext4AllocateInodeFtraceEvent.fromObject(d.ext4AllocateInode);
                }
                if (d.ext4BeginOrderedTruncate != null) {
                    if (typeof d.ext4BeginOrderedTruncate !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4BeginOrderedTruncate: object expected");
                    m.ext4BeginOrderedTruncate = $root.perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent.fromObject(d.ext4BeginOrderedTruncate);
                }
                if (d.ext4CollapseRange != null) {
                    if (typeof d.ext4CollapseRange !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4CollapseRange: object expected");
                    m.ext4CollapseRange = $root.perfetto.protos.Ext4CollapseRangeFtraceEvent.fromObject(d.ext4CollapseRange);
                }
                if (d.ext4DaReleaseSpace != null) {
                    if (typeof d.ext4DaReleaseSpace !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4DaReleaseSpace: object expected");
                    m.ext4DaReleaseSpace = $root.perfetto.protos.Ext4DaReleaseSpaceFtraceEvent.fromObject(d.ext4DaReleaseSpace);
                }
                if (d.ext4DaReserveSpace != null) {
                    if (typeof d.ext4DaReserveSpace !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4DaReserveSpace: object expected");
                    m.ext4DaReserveSpace = $root.perfetto.protos.Ext4DaReserveSpaceFtraceEvent.fromObject(d.ext4DaReserveSpace);
                }
                if (d.ext4DaUpdateReserveSpace != null) {
                    if (typeof d.ext4DaUpdateReserveSpace !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4DaUpdateReserveSpace: object expected");
                    m.ext4DaUpdateReserveSpace = $root.perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent.fromObject(d.ext4DaUpdateReserveSpace);
                }
                if (d.ext4DaWritePages != null) {
                    if (typeof d.ext4DaWritePages !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4DaWritePages: object expected");
                    m.ext4DaWritePages = $root.perfetto.protos.Ext4DaWritePagesFtraceEvent.fromObject(d.ext4DaWritePages);
                }
                if (d.ext4DaWritePagesExtent != null) {
                    if (typeof d.ext4DaWritePagesExtent !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4DaWritePagesExtent: object expected");
                    m.ext4DaWritePagesExtent = $root.perfetto.protos.Ext4DaWritePagesExtentFtraceEvent.fromObject(d.ext4DaWritePagesExtent);
                }
                if (d.ext4Direct_IOEnter != null) {
                    if (typeof d.ext4Direct_IOEnter !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4Direct_IOEnter: object expected");
                    m.ext4Direct_IOEnter = $root.perfetto.protos.Ext4DirectIOEnterFtraceEvent.fromObject(d.ext4Direct_IOEnter);
                }
                if (d.ext4Direct_IOExit != null) {
                    if (typeof d.ext4Direct_IOExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4Direct_IOExit: object expected");
                    m.ext4Direct_IOExit = $root.perfetto.protos.Ext4DirectIOExitFtraceEvent.fromObject(d.ext4Direct_IOExit);
                }
                if (d.ext4DiscardBlocks != null) {
                    if (typeof d.ext4DiscardBlocks !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4DiscardBlocks: object expected");
                    m.ext4DiscardBlocks = $root.perfetto.protos.Ext4DiscardBlocksFtraceEvent.fromObject(d.ext4DiscardBlocks);
                }
                if (d.ext4DiscardPreallocations != null) {
                    if (typeof d.ext4DiscardPreallocations !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4DiscardPreallocations: object expected");
                    m.ext4DiscardPreallocations = $root.perfetto.protos.Ext4DiscardPreallocationsFtraceEvent.fromObject(d.ext4DiscardPreallocations);
                }
                if (d.ext4DropInode != null) {
                    if (typeof d.ext4DropInode !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4DropInode: object expected");
                    m.ext4DropInode = $root.perfetto.protos.Ext4DropInodeFtraceEvent.fromObject(d.ext4DropInode);
                }
                if (d.ext4EsCacheExtent != null) {
                    if (typeof d.ext4EsCacheExtent !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4EsCacheExtent: object expected");
                    m.ext4EsCacheExtent = $root.perfetto.protos.Ext4EsCacheExtentFtraceEvent.fromObject(d.ext4EsCacheExtent);
                }
                if (d.ext4EsFindDelayedExtentRangeEnter != null) {
                    if (typeof d.ext4EsFindDelayedExtentRangeEnter !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4EsFindDelayedExtentRangeEnter: object expected");
                    m.ext4EsFindDelayedExtentRangeEnter = $root.perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent.fromObject(d.ext4EsFindDelayedExtentRangeEnter);
                }
                if (d.ext4EsFindDelayedExtentRangeExit != null) {
                    if (typeof d.ext4EsFindDelayedExtentRangeExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4EsFindDelayedExtentRangeExit: object expected");
                    m.ext4EsFindDelayedExtentRangeExit = $root.perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent.fromObject(d.ext4EsFindDelayedExtentRangeExit);
                }
                if (d.ext4EsInsertExtent != null) {
                    if (typeof d.ext4EsInsertExtent !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4EsInsertExtent: object expected");
                    m.ext4EsInsertExtent = $root.perfetto.protos.Ext4EsInsertExtentFtraceEvent.fromObject(d.ext4EsInsertExtent);
                }
                if (d.ext4EsLookupExtentEnter != null) {
                    if (typeof d.ext4EsLookupExtentEnter !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4EsLookupExtentEnter: object expected");
                    m.ext4EsLookupExtentEnter = $root.perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent.fromObject(d.ext4EsLookupExtentEnter);
                }
                if (d.ext4EsLookupExtentExit != null) {
                    if (typeof d.ext4EsLookupExtentExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4EsLookupExtentExit: object expected");
                    m.ext4EsLookupExtentExit = $root.perfetto.protos.Ext4EsLookupExtentExitFtraceEvent.fromObject(d.ext4EsLookupExtentExit);
                }
                if (d.ext4EsRemoveExtent != null) {
                    if (typeof d.ext4EsRemoveExtent !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4EsRemoveExtent: object expected");
                    m.ext4EsRemoveExtent = $root.perfetto.protos.Ext4EsRemoveExtentFtraceEvent.fromObject(d.ext4EsRemoveExtent);
                }
                if (d.ext4EsShrink != null) {
                    if (typeof d.ext4EsShrink !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4EsShrink: object expected");
                    m.ext4EsShrink = $root.perfetto.protos.Ext4EsShrinkFtraceEvent.fromObject(d.ext4EsShrink);
                }
                if (d.ext4EsShrinkCount != null) {
                    if (typeof d.ext4EsShrinkCount !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4EsShrinkCount: object expected");
                    m.ext4EsShrinkCount = $root.perfetto.protos.Ext4EsShrinkCountFtraceEvent.fromObject(d.ext4EsShrinkCount);
                }
                if (d.ext4EsShrinkScanEnter != null) {
                    if (typeof d.ext4EsShrinkScanEnter !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4EsShrinkScanEnter: object expected");
                    m.ext4EsShrinkScanEnter = $root.perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent.fromObject(d.ext4EsShrinkScanEnter);
                }
                if (d.ext4EsShrinkScanExit != null) {
                    if (typeof d.ext4EsShrinkScanExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4EsShrinkScanExit: object expected");
                    m.ext4EsShrinkScanExit = $root.perfetto.protos.Ext4EsShrinkScanExitFtraceEvent.fromObject(d.ext4EsShrinkScanExit);
                }
                if (d.ext4EvictInode != null) {
                    if (typeof d.ext4EvictInode !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4EvictInode: object expected");
                    m.ext4EvictInode = $root.perfetto.protos.Ext4EvictInodeFtraceEvent.fromObject(d.ext4EvictInode);
                }
                if (d.ext4ExtConvertToInitializedEnter != null) {
                    if (typeof d.ext4ExtConvertToInitializedEnter !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4ExtConvertToInitializedEnter: object expected");
                    m.ext4ExtConvertToInitializedEnter = $root.perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent.fromObject(d.ext4ExtConvertToInitializedEnter);
                }
                if (d.ext4ExtConvertToInitializedFastpath != null) {
                    if (typeof d.ext4ExtConvertToInitializedFastpath !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4ExtConvertToInitializedFastpath: object expected");
                    m.ext4ExtConvertToInitializedFastpath = $root.perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent.fromObject(d.ext4ExtConvertToInitializedFastpath);
                }
                if (d.ext4ExtHandleUnwrittenExtents != null) {
                    if (typeof d.ext4ExtHandleUnwrittenExtents !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4ExtHandleUnwrittenExtents: object expected");
                    m.ext4ExtHandleUnwrittenExtents = $root.perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent.fromObject(d.ext4ExtHandleUnwrittenExtents);
                }
                if (d.ext4ExtInCache != null) {
                    if (typeof d.ext4ExtInCache !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4ExtInCache: object expected");
                    m.ext4ExtInCache = $root.perfetto.protos.Ext4ExtInCacheFtraceEvent.fromObject(d.ext4ExtInCache);
                }
                if (d.ext4ExtLoadExtent != null) {
                    if (typeof d.ext4ExtLoadExtent !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4ExtLoadExtent: object expected");
                    m.ext4ExtLoadExtent = $root.perfetto.protos.Ext4ExtLoadExtentFtraceEvent.fromObject(d.ext4ExtLoadExtent);
                }
                if (d.ext4ExtMapBlocksEnter != null) {
                    if (typeof d.ext4ExtMapBlocksEnter !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4ExtMapBlocksEnter: object expected");
                    m.ext4ExtMapBlocksEnter = $root.perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent.fromObject(d.ext4ExtMapBlocksEnter);
                }
                if (d.ext4ExtMapBlocksExit != null) {
                    if (typeof d.ext4ExtMapBlocksExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4ExtMapBlocksExit: object expected");
                    m.ext4ExtMapBlocksExit = $root.perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent.fromObject(d.ext4ExtMapBlocksExit);
                }
                if (d.ext4ExtPutInCache != null) {
                    if (typeof d.ext4ExtPutInCache !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4ExtPutInCache: object expected");
                    m.ext4ExtPutInCache = $root.perfetto.protos.Ext4ExtPutInCacheFtraceEvent.fromObject(d.ext4ExtPutInCache);
                }
                if (d.ext4ExtRemoveSpace != null) {
                    if (typeof d.ext4ExtRemoveSpace !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4ExtRemoveSpace: object expected");
                    m.ext4ExtRemoveSpace = $root.perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent.fromObject(d.ext4ExtRemoveSpace);
                }
                if (d.ext4ExtRemoveSpaceDone != null) {
                    if (typeof d.ext4ExtRemoveSpaceDone !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4ExtRemoveSpaceDone: object expected");
                    m.ext4ExtRemoveSpaceDone = $root.perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent.fromObject(d.ext4ExtRemoveSpaceDone);
                }
                if (d.ext4ExtRmIdx != null) {
                    if (typeof d.ext4ExtRmIdx !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4ExtRmIdx: object expected");
                    m.ext4ExtRmIdx = $root.perfetto.protos.Ext4ExtRmIdxFtraceEvent.fromObject(d.ext4ExtRmIdx);
                }
                if (d.ext4ExtRmLeaf != null) {
                    if (typeof d.ext4ExtRmLeaf !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4ExtRmLeaf: object expected");
                    m.ext4ExtRmLeaf = $root.perfetto.protos.Ext4ExtRmLeafFtraceEvent.fromObject(d.ext4ExtRmLeaf);
                }
                if (d.ext4ExtShowExtent != null) {
                    if (typeof d.ext4ExtShowExtent !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4ExtShowExtent: object expected");
                    m.ext4ExtShowExtent = $root.perfetto.protos.Ext4ExtShowExtentFtraceEvent.fromObject(d.ext4ExtShowExtent);
                }
                if (d.ext4FallocateEnter != null) {
                    if (typeof d.ext4FallocateEnter !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4FallocateEnter: object expected");
                    m.ext4FallocateEnter = $root.perfetto.protos.Ext4FallocateEnterFtraceEvent.fromObject(d.ext4FallocateEnter);
                }
                if (d.ext4FallocateExit != null) {
                    if (typeof d.ext4FallocateExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4FallocateExit: object expected");
                    m.ext4FallocateExit = $root.perfetto.protos.Ext4FallocateExitFtraceEvent.fromObject(d.ext4FallocateExit);
                }
                if (d.ext4FindDelallocRange != null) {
                    if (typeof d.ext4FindDelallocRange !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4FindDelallocRange: object expected");
                    m.ext4FindDelallocRange = $root.perfetto.protos.Ext4FindDelallocRangeFtraceEvent.fromObject(d.ext4FindDelallocRange);
                }
                if (d.ext4Forget != null) {
                    if (typeof d.ext4Forget !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4Forget: object expected");
                    m.ext4Forget = $root.perfetto.protos.Ext4ForgetFtraceEvent.fromObject(d.ext4Forget);
                }
                if (d.ext4FreeBlocks != null) {
                    if (typeof d.ext4FreeBlocks !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4FreeBlocks: object expected");
                    m.ext4FreeBlocks = $root.perfetto.protos.Ext4FreeBlocksFtraceEvent.fromObject(d.ext4FreeBlocks);
                }
                if (d.ext4FreeInode != null) {
                    if (typeof d.ext4FreeInode !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4FreeInode: object expected");
                    m.ext4FreeInode = $root.perfetto.protos.Ext4FreeInodeFtraceEvent.fromObject(d.ext4FreeInode);
                }
                if (d.ext4GetImpliedClusterAllocExit != null) {
                    if (typeof d.ext4GetImpliedClusterAllocExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4GetImpliedClusterAllocExit: object expected");
                    m.ext4GetImpliedClusterAllocExit = $root.perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent.fromObject(d.ext4GetImpliedClusterAllocExit);
                }
                if (d.ext4GetReservedClusterAlloc != null) {
                    if (typeof d.ext4GetReservedClusterAlloc !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4GetReservedClusterAlloc: object expected");
                    m.ext4GetReservedClusterAlloc = $root.perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent.fromObject(d.ext4GetReservedClusterAlloc);
                }
                if (d.ext4IndMapBlocksEnter != null) {
                    if (typeof d.ext4IndMapBlocksEnter !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4IndMapBlocksEnter: object expected");
                    m.ext4IndMapBlocksEnter = $root.perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent.fromObject(d.ext4IndMapBlocksEnter);
                }
                if (d.ext4IndMapBlocksExit != null) {
                    if (typeof d.ext4IndMapBlocksExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4IndMapBlocksExit: object expected");
                    m.ext4IndMapBlocksExit = $root.perfetto.protos.Ext4IndMapBlocksExitFtraceEvent.fromObject(d.ext4IndMapBlocksExit);
                }
                if (d.ext4InsertRange != null) {
                    if (typeof d.ext4InsertRange !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4InsertRange: object expected");
                    m.ext4InsertRange = $root.perfetto.protos.Ext4InsertRangeFtraceEvent.fromObject(d.ext4InsertRange);
                }
                if (d.ext4Invalidatepage != null) {
                    if (typeof d.ext4Invalidatepage !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4Invalidatepage: object expected");
                    m.ext4Invalidatepage = $root.perfetto.protos.Ext4InvalidatepageFtraceEvent.fromObject(d.ext4Invalidatepage);
                }
                if (d.ext4JournalStart != null) {
                    if (typeof d.ext4JournalStart !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4JournalStart: object expected");
                    m.ext4JournalStart = $root.perfetto.protos.Ext4JournalStartFtraceEvent.fromObject(d.ext4JournalStart);
                }
                if (d.ext4JournalStartReserved != null) {
                    if (typeof d.ext4JournalStartReserved !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4JournalStartReserved: object expected");
                    m.ext4JournalStartReserved = $root.perfetto.protos.Ext4JournalStartReservedFtraceEvent.fromObject(d.ext4JournalStartReserved);
                }
                if (d.ext4JournalledInvalidatepage != null) {
                    if (typeof d.ext4JournalledInvalidatepage !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4JournalledInvalidatepage: object expected");
                    m.ext4JournalledInvalidatepage = $root.perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent.fromObject(d.ext4JournalledInvalidatepage);
                }
                if (d.ext4JournalledWriteEnd != null) {
                    if (typeof d.ext4JournalledWriteEnd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4JournalledWriteEnd: object expected");
                    m.ext4JournalledWriteEnd = $root.perfetto.protos.Ext4JournalledWriteEndFtraceEvent.fromObject(d.ext4JournalledWriteEnd);
                }
                if (d.ext4LoadInode != null) {
                    if (typeof d.ext4LoadInode !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4LoadInode: object expected");
                    m.ext4LoadInode = $root.perfetto.protos.Ext4LoadInodeFtraceEvent.fromObject(d.ext4LoadInode);
                }
                if (d.ext4LoadInodeBitmap != null) {
                    if (typeof d.ext4LoadInodeBitmap !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4LoadInodeBitmap: object expected");
                    m.ext4LoadInodeBitmap = $root.perfetto.protos.Ext4LoadInodeBitmapFtraceEvent.fromObject(d.ext4LoadInodeBitmap);
                }
                if (d.ext4MarkInodeDirty != null) {
                    if (typeof d.ext4MarkInodeDirty !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4MarkInodeDirty: object expected");
                    m.ext4MarkInodeDirty = $root.perfetto.protos.Ext4MarkInodeDirtyFtraceEvent.fromObject(d.ext4MarkInodeDirty);
                }
                if (d.ext4MbBitmapLoad != null) {
                    if (typeof d.ext4MbBitmapLoad !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4MbBitmapLoad: object expected");
                    m.ext4MbBitmapLoad = $root.perfetto.protos.Ext4MbBitmapLoadFtraceEvent.fromObject(d.ext4MbBitmapLoad);
                }
                if (d.ext4MbBuddyBitmapLoad != null) {
                    if (typeof d.ext4MbBuddyBitmapLoad !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4MbBuddyBitmapLoad: object expected");
                    m.ext4MbBuddyBitmapLoad = $root.perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent.fromObject(d.ext4MbBuddyBitmapLoad);
                }
                if (d.ext4MbDiscardPreallocations != null) {
                    if (typeof d.ext4MbDiscardPreallocations !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4MbDiscardPreallocations: object expected");
                    m.ext4MbDiscardPreallocations = $root.perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent.fromObject(d.ext4MbDiscardPreallocations);
                }
                if (d.ext4MbNewGroupPa != null) {
                    if (typeof d.ext4MbNewGroupPa !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4MbNewGroupPa: object expected");
                    m.ext4MbNewGroupPa = $root.perfetto.protos.Ext4MbNewGroupPaFtraceEvent.fromObject(d.ext4MbNewGroupPa);
                }
                if (d.ext4MbNewInodePa != null) {
                    if (typeof d.ext4MbNewInodePa !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4MbNewInodePa: object expected");
                    m.ext4MbNewInodePa = $root.perfetto.protos.Ext4MbNewInodePaFtraceEvent.fromObject(d.ext4MbNewInodePa);
                }
                if (d.ext4MbReleaseGroupPa != null) {
                    if (typeof d.ext4MbReleaseGroupPa !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4MbReleaseGroupPa: object expected");
                    m.ext4MbReleaseGroupPa = $root.perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent.fromObject(d.ext4MbReleaseGroupPa);
                }
                if (d.ext4MbReleaseInodePa != null) {
                    if (typeof d.ext4MbReleaseInodePa !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4MbReleaseInodePa: object expected");
                    m.ext4MbReleaseInodePa = $root.perfetto.protos.Ext4MbReleaseInodePaFtraceEvent.fromObject(d.ext4MbReleaseInodePa);
                }
                if (d.ext4MballocAlloc != null) {
                    if (typeof d.ext4MballocAlloc !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4MballocAlloc: object expected");
                    m.ext4MballocAlloc = $root.perfetto.protos.Ext4MballocAllocFtraceEvent.fromObject(d.ext4MballocAlloc);
                }
                if (d.ext4MballocDiscard != null) {
                    if (typeof d.ext4MballocDiscard !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4MballocDiscard: object expected");
                    m.ext4MballocDiscard = $root.perfetto.protos.Ext4MballocDiscardFtraceEvent.fromObject(d.ext4MballocDiscard);
                }
                if (d.ext4MballocFree != null) {
                    if (typeof d.ext4MballocFree !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4MballocFree: object expected");
                    m.ext4MballocFree = $root.perfetto.protos.Ext4MballocFreeFtraceEvent.fromObject(d.ext4MballocFree);
                }
                if (d.ext4MballocPrealloc != null) {
                    if (typeof d.ext4MballocPrealloc !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4MballocPrealloc: object expected");
                    m.ext4MballocPrealloc = $root.perfetto.protos.Ext4MballocPreallocFtraceEvent.fromObject(d.ext4MballocPrealloc);
                }
                if (d.ext4OtherInodeUpdateTime != null) {
                    if (typeof d.ext4OtherInodeUpdateTime !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4OtherInodeUpdateTime: object expected");
                    m.ext4OtherInodeUpdateTime = $root.perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent.fromObject(d.ext4OtherInodeUpdateTime);
                }
                if (d.ext4PunchHole != null) {
                    if (typeof d.ext4PunchHole !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4PunchHole: object expected");
                    m.ext4PunchHole = $root.perfetto.protos.Ext4PunchHoleFtraceEvent.fromObject(d.ext4PunchHole);
                }
                if (d.ext4ReadBlockBitmapLoad != null) {
                    if (typeof d.ext4ReadBlockBitmapLoad !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4ReadBlockBitmapLoad: object expected");
                    m.ext4ReadBlockBitmapLoad = $root.perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent.fromObject(d.ext4ReadBlockBitmapLoad);
                }
                if (d.ext4Readpage != null) {
                    if (typeof d.ext4Readpage !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4Readpage: object expected");
                    m.ext4Readpage = $root.perfetto.protos.Ext4ReadpageFtraceEvent.fromObject(d.ext4Readpage);
                }
                if (d.ext4Releasepage != null) {
                    if (typeof d.ext4Releasepage !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4Releasepage: object expected");
                    m.ext4Releasepage = $root.perfetto.protos.Ext4ReleasepageFtraceEvent.fromObject(d.ext4Releasepage);
                }
                if (d.ext4RemoveBlocks != null) {
                    if (typeof d.ext4RemoveBlocks !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4RemoveBlocks: object expected");
                    m.ext4RemoveBlocks = $root.perfetto.protos.Ext4RemoveBlocksFtraceEvent.fromObject(d.ext4RemoveBlocks);
                }
                if (d.ext4RequestBlocks != null) {
                    if (typeof d.ext4RequestBlocks !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4RequestBlocks: object expected");
                    m.ext4RequestBlocks = $root.perfetto.protos.Ext4RequestBlocksFtraceEvent.fromObject(d.ext4RequestBlocks);
                }
                if (d.ext4RequestInode != null) {
                    if (typeof d.ext4RequestInode !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4RequestInode: object expected");
                    m.ext4RequestInode = $root.perfetto.protos.Ext4RequestInodeFtraceEvent.fromObject(d.ext4RequestInode);
                }
                if (d.ext4SyncFs != null) {
                    if (typeof d.ext4SyncFs !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4SyncFs: object expected");
                    m.ext4SyncFs = $root.perfetto.protos.Ext4SyncFsFtraceEvent.fromObject(d.ext4SyncFs);
                }
                if (d.ext4TrimAllFree != null) {
                    if (typeof d.ext4TrimAllFree !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4TrimAllFree: object expected");
                    m.ext4TrimAllFree = $root.perfetto.protos.Ext4TrimAllFreeFtraceEvent.fromObject(d.ext4TrimAllFree);
                }
                if (d.ext4TrimExtent != null) {
                    if (typeof d.ext4TrimExtent !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4TrimExtent: object expected");
                    m.ext4TrimExtent = $root.perfetto.protos.Ext4TrimExtentFtraceEvent.fromObject(d.ext4TrimExtent);
                }
                if (d.ext4TruncateEnter != null) {
                    if (typeof d.ext4TruncateEnter !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4TruncateEnter: object expected");
                    m.ext4TruncateEnter = $root.perfetto.protos.Ext4TruncateEnterFtraceEvent.fromObject(d.ext4TruncateEnter);
                }
                if (d.ext4TruncateExit != null) {
                    if (typeof d.ext4TruncateExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4TruncateExit: object expected");
                    m.ext4TruncateExit = $root.perfetto.protos.Ext4TruncateExitFtraceEvent.fromObject(d.ext4TruncateExit);
                }
                if (d.ext4UnlinkEnter != null) {
                    if (typeof d.ext4UnlinkEnter !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4UnlinkEnter: object expected");
                    m.ext4UnlinkEnter = $root.perfetto.protos.Ext4UnlinkEnterFtraceEvent.fromObject(d.ext4UnlinkEnter);
                }
                if (d.ext4UnlinkExit != null) {
                    if (typeof d.ext4UnlinkExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4UnlinkExit: object expected");
                    m.ext4UnlinkExit = $root.perfetto.protos.Ext4UnlinkExitFtraceEvent.fromObject(d.ext4UnlinkExit);
                }
                if (d.ext4WriteBegin != null) {
                    if (typeof d.ext4WriteBegin !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4WriteBegin: object expected");
                    m.ext4WriteBegin = $root.perfetto.protos.Ext4WriteBeginFtraceEvent.fromObject(d.ext4WriteBegin);
                }
                if (d.ext4WriteEnd != null) {
                    if (typeof d.ext4WriteEnd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4WriteEnd: object expected");
                    m.ext4WriteEnd = $root.perfetto.protos.Ext4WriteEndFtraceEvent.fromObject(d.ext4WriteEnd);
                }
                if (d.ext4Writepage != null) {
                    if (typeof d.ext4Writepage !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4Writepage: object expected");
                    m.ext4Writepage = $root.perfetto.protos.Ext4WritepageFtraceEvent.fromObject(d.ext4Writepage);
                }
                if (d.ext4Writepages != null) {
                    if (typeof d.ext4Writepages !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4Writepages: object expected");
                    m.ext4Writepages = $root.perfetto.protos.Ext4WritepagesFtraceEvent.fromObject(d.ext4Writepages);
                }
                if (d.ext4WritepagesResult != null) {
                    if (typeof d.ext4WritepagesResult !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4WritepagesResult: object expected");
                    m.ext4WritepagesResult = $root.perfetto.protos.Ext4WritepagesResultFtraceEvent.fromObject(d.ext4WritepagesResult);
                }
                if (d.ext4ZeroRange != null) {
                    if (typeof d.ext4ZeroRange !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ext4ZeroRange: object expected");
                    m.ext4ZeroRange = $root.perfetto.protos.Ext4ZeroRangeFtraceEvent.fromObject(d.ext4ZeroRange);
                }
                if (d.taskNewtask != null) {
                    if (typeof d.taskNewtask !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.taskNewtask: object expected");
                    m.taskNewtask = $root.perfetto.protos.TaskNewtaskFtraceEvent.fromObject(d.taskNewtask);
                }
                if (d.taskRename != null) {
                    if (typeof d.taskRename !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.taskRename: object expected");
                    m.taskRename = $root.perfetto.protos.TaskRenameFtraceEvent.fromObject(d.taskRename);
                }
                if (d.schedProcessExec != null) {
                    if (typeof d.schedProcessExec !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.schedProcessExec: object expected");
                    m.schedProcessExec = $root.perfetto.protos.SchedProcessExecFtraceEvent.fromObject(d.schedProcessExec);
                }
                if (d.schedProcessExit != null) {
                    if (typeof d.schedProcessExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.schedProcessExit: object expected");
                    m.schedProcessExit = $root.perfetto.protos.SchedProcessExitFtraceEvent.fromObject(d.schedProcessExit);
                }
                if (d.schedProcessFork != null) {
                    if (typeof d.schedProcessFork !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.schedProcessFork: object expected");
                    m.schedProcessFork = $root.perfetto.protos.SchedProcessForkFtraceEvent.fromObject(d.schedProcessFork);
                }
                if (d.schedProcessFree != null) {
                    if (typeof d.schedProcessFree !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.schedProcessFree: object expected");
                    m.schedProcessFree = $root.perfetto.protos.SchedProcessFreeFtraceEvent.fromObject(d.schedProcessFree);
                }
                if (d.schedProcessHang != null) {
                    if (typeof d.schedProcessHang !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.schedProcessHang: object expected");
                    m.schedProcessHang = $root.perfetto.protos.SchedProcessHangFtraceEvent.fromObject(d.schedProcessHang);
                }
                if (d.schedProcessWait != null) {
                    if (typeof d.schedProcessWait !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.schedProcessWait: object expected");
                    m.schedProcessWait = $root.perfetto.protos.SchedProcessWaitFtraceEvent.fromObject(d.schedProcessWait);
                }
                if (d.f2fsDoSubmitBio != null) {
                    if (typeof d.f2fsDoSubmitBio !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsDoSubmitBio: object expected");
                    m.f2fsDoSubmitBio = $root.perfetto.protos.F2fsDoSubmitBioFtraceEvent.fromObject(d.f2fsDoSubmitBio);
                }
                if (d.f2fsEvictInode != null) {
                    if (typeof d.f2fsEvictInode !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsEvictInode: object expected");
                    m.f2fsEvictInode = $root.perfetto.protos.F2fsEvictInodeFtraceEvent.fromObject(d.f2fsEvictInode);
                }
                if (d.f2fsFallocate != null) {
                    if (typeof d.f2fsFallocate !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsFallocate: object expected");
                    m.f2fsFallocate = $root.perfetto.protos.F2fsFallocateFtraceEvent.fromObject(d.f2fsFallocate);
                }
                if (d.f2fsGetDataBlock != null) {
                    if (typeof d.f2fsGetDataBlock !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsGetDataBlock: object expected");
                    m.f2fsGetDataBlock = $root.perfetto.protos.F2fsGetDataBlockFtraceEvent.fromObject(d.f2fsGetDataBlock);
                }
                if (d.f2fsGetVictim != null) {
                    if (typeof d.f2fsGetVictim !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsGetVictim: object expected");
                    m.f2fsGetVictim = $root.perfetto.protos.F2fsGetVictimFtraceEvent.fromObject(d.f2fsGetVictim);
                }
                if (d.f2fsIget != null) {
                    if (typeof d.f2fsIget !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsIget: object expected");
                    m.f2fsIget = $root.perfetto.protos.F2fsIgetFtraceEvent.fromObject(d.f2fsIget);
                }
                if (d.f2fsIgetExit != null) {
                    if (typeof d.f2fsIgetExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsIgetExit: object expected");
                    m.f2fsIgetExit = $root.perfetto.protos.F2fsIgetExitFtraceEvent.fromObject(d.f2fsIgetExit);
                }
                if (d.f2fsNewInode != null) {
                    if (typeof d.f2fsNewInode !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsNewInode: object expected");
                    m.f2fsNewInode = $root.perfetto.protos.F2fsNewInodeFtraceEvent.fromObject(d.f2fsNewInode);
                }
                if (d.f2fsReadpage != null) {
                    if (typeof d.f2fsReadpage !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsReadpage: object expected");
                    m.f2fsReadpage = $root.perfetto.protos.F2fsReadpageFtraceEvent.fromObject(d.f2fsReadpage);
                }
                if (d.f2fsReserveNewBlock != null) {
                    if (typeof d.f2fsReserveNewBlock !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsReserveNewBlock: object expected");
                    m.f2fsReserveNewBlock = $root.perfetto.protos.F2fsReserveNewBlockFtraceEvent.fromObject(d.f2fsReserveNewBlock);
                }
                if (d.f2fsSetPageDirty != null) {
                    if (typeof d.f2fsSetPageDirty !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsSetPageDirty: object expected");
                    m.f2fsSetPageDirty = $root.perfetto.protos.F2fsSetPageDirtyFtraceEvent.fromObject(d.f2fsSetPageDirty);
                }
                if (d.f2fsSubmitWritePage != null) {
                    if (typeof d.f2fsSubmitWritePage !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsSubmitWritePage: object expected");
                    m.f2fsSubmitWritePage = $root.perfetto.protos.F2fsSubmitWritePageFtraceEvent.fromObject(d.f2fsSubmitWritePage);
                }
                if (d.f2fsSyncFileEnter != null) {
                    if (typeof d.f2fsSyncFileEnter !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsSyncFileEnter: object expected");
                    m.f2fsSyncFileEnter = $root.perfetto.protos.F2fsSyncFileEnterFtraceEvent.fromObject(d.f2fsSyncFileEnter);
                }
                if (d.f2fsSyncFileExit != null) {
                    if (typeof d.f2fsSyncFileExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsSyncFileExit: object expected");
                    m.f2fsSyncFileExit = $root.perfetto.protos.F2fsSyncFileExitFtraceEvent.fromObject(d.f2fsSyncFileExit);
                }
                if (d.f2fsSyncFs != null) {
                    if (typeof d.f2fsSyncFs !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsSyncFs: object expected");
                    m.f2fsSyncFs = $root.perfetto.protos.F2fsSyncFsFtraceEvent.fromObject(d.f2fsSyncFs);
                }
                if (d.f2fsTruncate != null) {
                    if (typeof d.f2fsTruncate !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsTruncate: object expected");
                    m.f2fsTruncate = $root.perfetto.protos.F2fsTruncateFtraceEvent.fromObject(d.f2fsTruncate);
                }
                if (d.f2fsTruncateBlocksEnter != null) {
                    if (typeof d.f2fsTruncateBlocksEnter !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsTruncateBlocksEnter: object expected");
                    m.f2fsTruncateBlocksEnter = $root.perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent.fromObject(d.f2fsTruncateBlocksEnter);
                }
                if (d.f2fsTruncateBlocksExit != null) {
                    if (typeof d.f2fsTruncateBlocksExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsTruncateBlocksExit: object expected");
                    m.f2fsTruncateBlocksExit = $root.perfetto.protos.F2fsTruncateBlocksExitFtraceEvent.fromObject(d.f2fsTruncateBlocksExit);
                }
                if (d.f2fsTruncateDataBlocksRange != null) {
                    if (typeof d.f2fsTruncateDataBlocksRange !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsTruncateDataBlocksRange: object expected");
                    m.f2fsTruncateDataBlocksRange = $root.perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent.fromObject(d.f2fsTruncateDataBlocksRange);
                }
                if (d.f2fsTruncateInodeBlocksEnter != null) {
                    if (typeof d.f2fsTruncateInodeBlocksEnter !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsTruncateInodeBlocksEnter: object expected");
                    m.f2fsTruncateInodeBlocksEnter = $root.perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent.fromObject(d.f2fsTruncateInodeBlocksEnter);
                }
                if (d.f2fsTruncateInodeBlocksExit != null) {
                    if (typeof d.f2fsTruncateInodeBlocksExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsTruncateInodeBlocksExit: object expected");
                    m.f2fsTruncateInodeBlocksExit = $root.perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent.fromObject(d.f2fsTruncateInodeBlocksExit);
                }
                if (d.f2fsTruncateNode != null) {
                    if (typeof d.f2fsTruncateNode !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsTruncateNode: object expected");
                    m.f2fsTruncateNode = $root.perfetto.protos.F2fsTruncateNodeFtraceEvent.fromObject(d.f2fsTruncateNode);
                }
                if (d.f2fsTruncateNodesEnter != null) {
                    if (typeof d.f2fsTruncateNodesEnter !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsTruncateNodesEnter: object expected");
                    m.f2fsTruncateNodesEnter = $root.perfetto.protos.F2fsTruncateNodesEnterFtraceEvent.fromObject(d.f2fsTruncateNodesEnter);
                }
                if (d.f2fsTruncateNodesExit != null) {
                    if (typeof d.f2fsTruncateNodesExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsTruncateNodesExit: object expected");
                    m.f2fsTruncateNodesExit = $root.perfetto.protos.F2fsTruncateNodesExitFtraceEvent.fromObject(d.f2fsTruncateNodesExit);
                }
                if (d.f2fsTruncatePartialNodes != null) {
                    if (typeof d.f2fsTruncatePartialNodes !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsTruncatePartialNodes: object expected");
                    m.f2fsTruncatePartialNodes = $root.perfetto.protos.F2fsTruncatePartialNodesFtraceEvent.fromObject(d.f2fsTruncatePartialNodes);
                }
                if (d.f2fsUnlinkEnter != null) {
                    if (typeof d.f2fsUnlinkEnter !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsUnlinkEnter: object expected");
                    m.f2fsUnlinkEnter = $root.perfetto.protos.F2fsUnlinkEnterFtraceEvent.fromObject(d.f2fsUnlinkEnter);
                }
                if (d.f2fsUnlinkExit != null) {
                    if (typeof d.f2fsUnlinkExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsUnlinkExit: object expected");
                    m.f2fsUnlinkExit = $root.perfetto.protos.F2fsUnlinkExitFtraceEvent.fromObject(d.f2fsUnlinkExit);
                }
                if (d.f2fsVmPageMkwrite != null) {
                    if (typeof d.f2fsVmPageMkwrite !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsVmPageMkwrite: object expected");
                    m.f2fsVmPageMkwrite = $root.perfetto.protos.F2fsVmPageMkwriteFtraceEvent.fromObject(d.f2fsVmPageMkwrite);
                }
                if (d.f2fsWriteBegin != null) {
                    if (typeof d.f2fsWriteBegin !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsWriteBegin: object expected");
                    m.f2fsWriteBegin = $root.perfetto.protos.F2fsWriteBeginFtraceEvent.fromObject(d.f2fsWriteBegin);
                }
                if (d.f2fsWriteCheckpoint != null) {
                    if (typeof d.f2fsWriteCheckpoint !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsWriteCheckpoint: object expected");
                    m.f2fsWriteCheckpoint = $root.perfetto.protos.F2fsWriteCheckpointFtraceEvent.fromObject(d.f2fsWriteCheckpoint);
                }
                if (d.f2fsWriteEnd != null) {
                    if (typeof d.f2fsWriteEnd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsWriteEnd: object expected");
                    m.f2fsWriteEnd = $root.perfetto.protos.F2fsWriteEndFtraceEvent.fromObject(d.f2fsWriteEnd);
                }
                if (d.allocPagesIommuEnd != null) {
                    if (typeof d.allocPagesIommuEnd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.allocPagesIommuEnd: object expected");
                    m.allocPagesIommuEnd = $root.perfetto.protos.AllocPagesIommuEndFtraceEvent.fromObject(d.allocPagesIommuEnd);
                }
                if (d.allocPagesIommuFail != null) {
                    if (typeof d.allocPagesIommuFail !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.allocPagesIommuFail: object expected");
                    m.allocPagesIommuFail = $root.perfetto.protos.AllocPagesIommuFailFtraceEvent.fromObject(d.allocPagesIommuFail);
                }
                if (d.allocPagesIommuStart != null) {
                    if (typeof d.allocPagesIommuStart !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.allocPagesIommuStart: object expected");
                    m.allocPagesIommuStart = $root.perfetto.protos.AllocPagesIommuStartFtraceEvent.fromObject(d.allocPagesIommuStart);
                }
                if (d.allocPagesSysEnd != null) {
                    if (typeof d.allocPagesSysEnd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.allocPagesSysEnd: object expected");
                    m.allocPagesSysEnd = $root.perfetto.protos.AllocPagesSysEndFtraceEvent.fromObject(d.allocPagesSysEnd);
                }
                if (d.allocPagesSysFail != null) {
                    if (typeof d.allocPagesSysFail !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.allocPagesSysFail: object expected");
                    m.allocPagesSysFail = $root.perfetto.protos.AllocPagesSysFailFtraceEvent.fromObject(d.allocPagesSysFail);
                }
                if (d.allocPagesSysStart != null) {
                    if (typeof d.allocPagesSysStart !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.allocPagesSysStart: object expected");
                    m.allocPagesSysStart = $root.perfetto.protos.AllocPagesSysStartFtraceEvent.fromObject(d.allocPagesSysStart);
                }
                if (d.dmaAllocContiguousRetry != null) {
                    if (typeof d.dmaAllocContiguousRetry !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.dmaAllocContiguousRetry: object expected");
                    m.dmaAllocContiguousRetry = $root.perfetto.protos.DmaAllocContiguousRetryFtraceEvent.fromObject(d.dmaAllocContiguousRetry);
                }
                if (d.iommuMapRange != null) {
                    if (typeof d.iommuMapRange !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.iommuMapRange: object expected");
                    m.iommuMapRange = $root.perfetto.protos.IommuMapRangeFtraceEvent.fromObject(d.iommuMapRange);
                }
                if (d.iommuSecPtblMapRangeEnd != null) {
                    if (typeof d.iommuSecPtblMapRangeEnd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.iommuSecPtblMapRangeEnd: object expected");
                    m.iommuSecPtblMapRangeEnd = $root.perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent.fromObject(d.iommuSecPtblMapRangeEnd);
                }
                if (d.iommuSecPtblMapRangeStart != null) {
                    if (typeof d.iommuSecPtblMapRangeStart !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.iommuSecPtblMapRangeStart: object expected");
                    m.iommuSecPtblMapRangeStart = $root.perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent.fromObject(d.iommuSecPtblMapRangeStart);
                }
                if (d.ionAllocBufferEnd != null) {
                    if (typeof d.ionAllocBufferEnd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ionAllocBufferEnd: object expected");
                    m.ionAllocBufferEnd = $root.perfetto.protos.IonAllocBufferEndFtraceEvent.fromObject(d.ionAllocBufferEnd);
                }
                if (d.ionAllocBufferFail != null) {
                    if (typeof d.ionAllocBufferFail !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ionAllocBufferFail: object expected");
                    m.ionAllocBufferFail = $root.perfetto.protos.IonAllocBufferFailFtraceEvent.fromObject(d.ionAllocBufferFail);
                }
                if (d.ionAllocBufferFallback != null) {
                    if (typeof d.ionAllocBufferFallback !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ionAllocBufferFallback: object expected");
                    m.ionAllocBufferFallback = $root.perfetto.protos.IonAllocBufferFallbackFtraceEvent.fromObject(d.ionAllocBufferFallback);
                }
                if (d.ionAllocBufferStart != null) {
                    if (typeof d.ionAllocBufferStart !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ionAllocBufferStart: object expected");
                    m.ionAllocBufferStart = $root.perfetto.protos.IonAllocBufferStartFtraceEvent.fromObject(d.ionAllocBufferStart);
                }
                if (d.ionCpAllocRetry != null) {
                    if (typeof d.ionCpAllocRetry !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ionCpAllocRetry: object expected");
                    m.ionCpAllocRetry = $root.perfetto.protos.IonCpAllocRetryFtraceEvent.fromObject(d.ionCpAllocRetry);
                }
                if (d.ionCpSecureBufferEnd != null) {
                    if (typeof d.ionCpSecureBufferEnd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ionCpSecureBufferEnd: object expected");
                    m.ionCpSecureBufferEnd = $root.perfetto.protos.IonCpSecureBufferEndFtraceEvent.fromObject(d.ionCpSecureBufferEnd);
                }
                if (d.ionCpSecureBufferStart != null) {
                    if (typeof d.ionCpSecureBufferStart !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ionCpSecureBufferStart: object expected");
                    m.ionCpSecureBufferStart = $root.perfetto.protos.IonCpSecureBufferStartFtraceEvent.fromObject(d.ionCpSecureBufferStart);
                }
                if (d.ionPrefetching != null) {
                    if (typeof d.ionPrefetching !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ionPrefetching: object expected");
                    m.ionPrefetching = $root.perfetto.protos.IonPrefetchingFtraceEvent.fromObject(d.ionPrefetching);
                }
                if (d.ionSecureCmaAddToPoolEnd != null) {
                    if (typeof d.ionSecureCmaAddToPoolEnd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ionSecureCmaAddToPoolEnd: object expected");
                    m.ionSecureCmaAddToPoolEnd = $root.perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent.fromObject(d.ionSecureCmaAddToPoolEnd);
                }
                if (d.ionSecureCmaAddToPoolStart != null) {
                    if (typeof d.ionSecureCmaAddToPoolStart !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ionSecureCmaAddToPoolStart: object expected");
                    m.ionSecureCmaAddToPoolStart = $root.perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent.fromObject(d.ionSecureCmaAddToPoolStart);
                }
                if (d.ionSecureCmaAllocateEnd != null) {
                    if (typeof d.ionSecureCmaAllocateEnd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ionSecureCmaAllocateEnd: object expected");
                    m.ionSecureCmaAllocateEnd = $root.perfetto.protos.IonSecureCmaAllocateEndFtraceEvent.fromObject(d.ionSecureCmaAllocateEnd);
                }
                if (d.ionSecureCmaAllocateStart != null) {
                    if (typeof d.ionSecureCmaAllocateStart !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ionSecureCmaAllocateStart: object expected");
                    m.ionSecureCmaAllocateStart = $root.perfetto.protos.IonSecureCmaAllocateStartFtraceEvent.fromObject(d.ionSecureCmaAllocateStart);
                }
                if (d.ionSecureCmaShrinkPoolEnd != null) {
                    if (typeof d.ionSecureCmaShrinkPoolEnd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ionSecureCmaShrinkPoolEnd: object expected");
                    m.ionSecureCmaShrinkPoolEnd = $root.perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent.fromObject(d.ionSecureCmaShrinkPoolEnd);
                }
                if (d.ionSecureCmaShrinkPoolStart != null) {
                    if (typeof d.ionSecureCmaShrinkPoolStart !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ionSecureCmaShrinkPoolStart: object expected");
                    m.ionSecureCmaShrinkPoolStart = $root.perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent.fromObject(d.ionSecureCmaShrinkPoolStart);
                }
                if (d.kfree != null) {
                    if (typeof d.kfree !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kfree: object expected");
                    m.kfree = $root.perfetto.protos.KfreeFtraceEvent.fromObject(d.kfree);
                }
                if (d.kmalloc != null) {
                    if (typeof d.kmalloc !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kmalloc: object expected");
                    m.kmalloc = $root.perfetto.protos.KmallocFtraceEvent.fromObject(d.kmalloc);
                }
                if (d.kmallocNode != null) {
                    if (typeof d.kmallocNode !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kmallocNode: object expected");
                    m.kmallocNode = $root.perfetto.protos.KmallocNodeFtraceEvent.fromObject(d.kmallocNode);
                }
                if (d.kmemCacheAlloc != null) {
                    if (typeof d.kmemCacheAlloc !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kmemCacheAlloc: object expected");
                    m.kmemCacheAlloc = $root.perfetto.protos.KmemCacheAllocFtraceEvent.fromObject(d.kmemCacheAlloc);
                }
                if (d.kmemCacheAllocNode != null) {
                    if (typeof d.kmemCacheAllocNode !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kmemCacheAllocNode: object expected");
                    m.kmemCacheAllocNode = $root.perfetto.protos.KmemCacheAllocNodeFtraceEvent.fromObject(d.kmemCacheAllocNode);
                }
                if (d.kmemCacheFree != null) {
                    if (typeof d.kmemCacheFree !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kmemCacheFree: object expected");
                    m.kmemCacheFree = $root.perfetto.protos.KmemCacheFreeFtraceEvent.fromObject(d.kmemCacheFree);
                }
                if (d.migratePagesEnd != null) {
                    if (typeof d.migratePagesEnd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.migratePagesEnd: object expected");
                    m.migratePagesEnd = $root.perfetto.protos.MigratePagesEndFtraceEvent.fromObject(d.migratePagesEnd);
                }
                if (d.migratePagesStart != null) {
                    if (typeof d.migratePagesStart !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.migratePagesStart: object expected");
                    m.migratePagesStart = $root.perfetto.protos.MigratePagesStartFtraceEvent.fromObject(d.migratePagesStart);
                }
                if (d.migrateRetry != null) {
                    if (typeof d.migrateRetry !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.migrateRetry: object expected");
                    m.migrateRetry = $root.perfetto.protos.MigrateRetryFtraceEvent.fromObject(d.migrateRetry);
                }
                if (d.mmPageAlloc != null) {
                    if (typeof d.mmPageAlloc !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmPageAlloc: object expected");
                    m.mmPageAlloc = $root.perfetto.protos.MmPageAllocFtraceEvent.fromObject(d.mmPageAlloc);
                }
                if (d.mmPageAllocExtfrag != null) {
                    if (typeof d.mmPageAllocExtfrag !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmPageAllocExtfrag: object expected");
                    m.mmPageAllocExtfrag = $root.perfetto.protos.MmPageAllocExtfragFtraceEvent.fromObject(d.mmPageAllocExtfrag);
                }
                if (d.mmPageAllocZoneLocked != null) {
                    if (typeof d.mmPageAllocZoneLocked !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmPageAllocZoneLocked: object expected");
                    m.mmPageAllocZoneLocked = $root.perfetto.protos.MmPageAllocZoneLockedFtraceEvent.fromObject(d.mmPageAllocZoneLocked);
                }
                if (d.mmPageFree != null) {
                    if (typeof d.mmPageFree !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmPageFree: object expected");
                    m.mmPageFree = $root.perfetto.protos.MmPageFreeFtraceEvent.fromObject(d.mmPageFree);
                }
                if (d.mmPageFreeBatched != null) {
                    if (typeof d.mmPageFreeBatched !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmPageFreeBatched: object expected");
                    m.mmPageFreeBatched = $root.perfetto.protos.MmPageFreeBatchedFtraceEvent.fromObject(d.mmPageFreeBatched);
                }
                if (d.mmPagePcpuDrain != null) {
                    if (typeof d.mmPagePcpuDrain !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmPagePcpuDrain: object expected");
                    m.mmPagePcpuDrain = $root.perfetto.protos.MmPagePcpuDrainFtraceEvent.fromObject(d.mmPagePcpuDrain);
                }
                if (d.rssStat != null) {
                    if (typeof d.rssStat !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.rssStat: object expected");
                    m.rssStat = $root.perfetto.protos.RssStatFtraceEvent.fromObject(d.rssStat);
                }
                if (d.ionHeapShrink != null) {
                    if (typeof d.ionHeapShrink !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ionHeapShrink: object expected");
                    m.ionHeapShrink = $root.perfetto.protos.IonHeapShrinkFtraceEvent.fromObject(d.ionHeapShrink);
                }
                if (d.ionHeapGrow != null) {
                    if (typeof d.ionHeapGrow !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ionHeapGrow: object expected");
                    m.ionHeapGrow = $root.perfetto.protos.IonHeapGrowFtraceEvent.fromObject(d.ionHeapGrow);
                }
                if (d.fenceInit != null) {
                    if (typeof d.fenceInit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.fenceInit: object expected");
                    m.fenceInit = $root.perfetto.protos.FenceInitFtraceEvent.fromObject(d.fenceInit);
                }
                if (d.fenceDestroy != null) {
                    if (typeof d.fenceDestroy !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.fenceDestroy: object expected");
                    m.fenceDestroy = $root.perfetto.protos.FenceDestroyFtraceEvent.fromObject(d.fenceDestroy);
                }
                if (d.fenceEnableSignal != null) {
                    if (typeof d.fenceEnableSignal !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.fenceEnableSignal: object expected");
                    m.fenceEnableSignal = $root.perfetto.protos.FenceEnableSignalFtraceEvent.fromObject(d.fenceEnableSignal);
                }
                if (d.fenceSignaled != null) {
                    if (typeof d.fenceSignaled !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.fenceSignaled: object expected");
                    m.fenceSignaled = $root.perfetto.protos.FenceSignaledFtraceEvent.fromObject(d.fenceSignaled);
                }
                if (d.clkEnable != null) {
                    if (typeof d.clkEnable !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.clkEnable: object expected");
                    m.clkEnable = $root.perfetto.protos.ClkEnableFtraceEvent.fromObject(d.clkEnable);
                }
                if (d.clkDisable != null) {
                    if (typeof d.clkDisable !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.clkDisable: object expected");
                    m.clkDisable = $root.perfetto.protos.ClkDisableFtraceEvent.fromObject(d.clkDisable);
                }
                if (d.clkSetRate != null) {
                    if (typeof d.clkSetRate !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.clkSetRate: object expected");
                    m.clkSetRate = $root.perfetto.protos.ClkSetRateFtraceEvent.fromObject(d.clkSetRate);
                }
                if (d.binderTransactionAllocBuf != null) {
                    if (typeof d.binderTransactionAllocBuf !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.binderTransactionAllocBuf: object expected");
                    m.binderTransactionAllocBuf = $root.perfetto.protos.BinderTransactionAllocBufFtraceEvent.fromObject(d.binderTransactionAllocBuf);
                }
                if (d.signalDeliver != null) {
                    if (typeof d.signalDeliver !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.signalDeliver: object expected");
                    m.signalDeliver = $root.perfetto.protos.SignalDeliverFtraceEvent.fromObject(d.signalDeliver);
                }
                if (d.signalGenerate != null) {
                    if (typeof d.signalGenerate !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.signalGenerate: object expected");
                    m.signalGenerate = $root.perfetto.protos.SignalGenerateFtraceEvent.fromObject(d.signalGenerate);
                }
                if (d.oomScoreAdjUpdate != null) {
                    if (typeof d.oomScoreAdjUpdate !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.oomScoreAdjUpdate: object expected");
                    m.oomScoreAdjUpdate = $root.perfetto.protos.OomScoreAdjUpdateFtraceEvent.fromObject(d.oomScoreAdjUpdate);
                }
                if (d.generic != null) {
                    if (typeof d.generic !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.generic: object expected");
                    m.generic = $root.perfetto.protos.GenericFtraceEvent.fromObject(d.generic);
                }
                if (d.mmEventRecord != null) {
                    if (typeof d.mmEventRecord !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmEventRecord: object expected");
                    m.mmEventRecord = $root.perfetto.protos.MmEventRecordFtraceEvent.fromObject(d.mmEventRecord);
                }
                if (d.sysEnter != null) {
                    if (typeof d.sysEnter !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.sysEnter: object expected");
                    m.sysEnter = $root.perfetto.protos.SysEnterFtraceEvent.fromObject(d.sysEnter);
                }
                if (d.sysExit != null) {
                    if (typeof d.sysExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.sysExit: object expected");
                    m.sysExit = $root.perfetto.protos.SysExitFtraceEvent.fromObject(d.sysExit);
                }
                if (d.zero != null) {
                    if (typeof d.zero !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.zero: object expected");
                    m.zero = $root.perfetto.protos.ZeroFtraceEvent.fromObject(d.zero);
                }
                if (d.gpuFrequency != null) {
                    if (typeof d.gpuFrequency !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.gpuFrequency: object expected");
                    m.gpuFrequency = $root.perfetto.protos.GpuFrequencyFtraceEvent.fromObject(d.gpuFrequency);
                }
                if (d.sdeTracingMarkWrite != null) {
                    if (typeof d.sdeTracingMarkWrite !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.sdeTracingMarkWrite: object expected");
                    m.sdeTracingMarkWrite = $root.perfetto.protos.SdeTracingMarkWriteFtraceEvent.fromObject(d.sdeTracingMarkWrite);
                }
                if (d.markVictim != null) {
                    if (typeof d.markVictim !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.markVictim: object expected");
                    m.markVictim = $root.perfetto.protos.MarkVictimFtraceEvent.fromObject(d.markVictim);
                }
                if (d.ionStat != null) {
                    if (typeof d.ionStat !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ionStat: object expected");
                    m.ionStat = $root.perfetto.protos.IonStatFtraceEvent.fromObject(d.ionStat);
                }
                if (d.ionBufferCreate != null) {
                    if (typeof d.ionBufferCreate !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ionBufferCreate: object expected");
                    m.ionBufferCreate = $root.perfetto.protos.IonBufferCreateFtraceEvent.fromObject(d.ionBufferCreate);
                }
                if (d.ionBufferDestroy != null) {
                    if (typeof d.ionBufferDestroy !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ionBufferDestroy: object expected");
                    m.ionBufferDestroy = $root.perfetto.protos.IonBufferDestroyFtraceEvent.fromObject(d.ionBufferDestroy);
                }
                if (d.scmCallStart != null) {
                    if (typeof d.scmCallStart !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.scmCallStart: object expected");
                    m.scmCallStart = $root.perfetto.protos.ScmCallStartFtraceEvent.fromObject(d.scmCallStart);
                }
                if (d.scmCallEnd != null) {
                    if (typeof d.scmCallEnd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.scmCallEnd: object expected");
                    m.scmCallEnd = $root.perfetto.protos.ScmCallEndFtraceEvent.fromObject(d.scmCallEnd);
                }
                if (d.gpuMemTotal != null) {
                    if (typeof d.gpuMemTotal !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.gpuMemTotal: object expected");
                    m.gpuMemTotal = $root.perfetto.protos.GpuMemTotalFtraceEvent.fromObject(d.gpuMemTotal);
                }
                if (d.thermalTemperature != null) {
                    if (typeof d.thermalTemperature !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.thermalTemperature: object expected");
                    m.thermalTemperature = $root.perfetto.protos.ThermalTemperatureFtraceEvent.fromObject(d.thermalTemperature);
                }
                if (d.cdevUpdate != null) {
                    if (typeof d.cdevUpdate !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.cdevUpdate: object expected");
                    m.cdevUpdate = $root.perfetto.protos.CdevUpdateFtraceEvent.fromObject(d.cdevUpdate);
                }
                if (d.cpuhpExit != null) {
                    if (typeof d.cpuhpExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.cpuhpExit: object expected");
                    m.cpuhpExit = $root.perfetto.protos.CpuhpExitFtraceEvent.fromObject(d.cpuhpExit);
                }
                if (d.cpuhpMultiEnter != null) {
                    if (typeof d.cpuhpMultiEnter !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.cpuhpMultiEnter: object expected");
                    m.cpuhpMultiEnter = $root.perfetto.protos.CpuhpMultiEnterFtraceEvent.fromObject(d.cpuhpMultiEnter);
                }
                if (d.cpuhpEnter != null) {
                    if (typeof d.cpuhpEnter !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.cpuhpEnter: object expected");
                    m.cpuhpEnter = $root.perfetto.protos.CpuhpEnterFtraceEvent.fromObject(d.cpuhpEnter);
                }
                if (d.cpuhpLatency != null) {
                    if (typeof d.cpuhpLatency !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.cpuhpLatency: object expected");
                    m.cpuhpLatency = $root.perfetto.protos.CpuhpLatencyFtraceEvent.fromObject(d.cpuhpLatency);
                }
                if (d.fastrpcDmaStat != null) {
                    if (typeof d.fastrpcDmaStat !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.fastrpcDmaStat: object expected");
                    m.fastrpcDmaStat = $root.perfetto.protos.FastrpcDmaStatFtraceEvent.fromObject(d.fastrpcDmaStat);
                }
                if (d.dpuTracingMarkWrite != null) {
                    if (typeof d.dpuTracingMarkWrite !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.dpuTracingMarkWrite: object expected");
                    m.dpuTracingMarkWrite = $root.perfetto.protos.DpuTracingMarkWriteFtraceEvent.fromObject(d.dpuTracingMarkWrite);
                }
                if (d.g2dTracingMarkWrite != null) {
                    if (typeof d.g2dTracingMarkWrite !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.g2dTracingMarkWrite: object expected");
                    m.g2dTracingMarkWrite = $root.perfetto.protos.G2dTracingMarkWriteFtraceEvent.fromObject(d.g2dTracingMarkWrite);
                }
                if (d.maliTracingMarkWrite != null) {
                    if (typeof d.maliTracingMarkWrite !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.maliTracingMarkWrite: object expected");
                    m.maliTracingMarkWrite = $root.perfetto.protos.MaliTracingMarkWriteFtraceEvent.fromObject(d.maliTracingMarkWrite);
                }
                if (d.dmaHeapStat != null) {
                    if (typeof d.dmaHeapStat !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.dmaHeapStat: object expected");
                    m.dmaHeapStat = $root.perfetto.protos.DmaHeapStatFtraceEvent.fromObject(d.dmaHeapStat);
                }
                if (d.cpuhpPause != null) {
                    if (typeof d.cpuhpPause !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.cpuhpPause: object expected");
                    m.cpuhpPause = $root.perfetto.protos.CpuhpPauseFtraceEvent.fromObject(d.cpuhpPause);
                }
                if (d.schedPiSetprio != null) {
                    if (typeof d.schedPiSetprio !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.schedPiSetprio: object expected");
                    m.schedPiSetprio = $root.perfetto.protos.SchedPiSetprioFtraceEvent.fromObject(d.schedPiSetprio);
                }
                if (d.sdeSdeEvtlog != null) {
                    if (typeof d.sdeSdeEvtlog !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.sdeSdeEvtlog: object expected");
                    m.sdeSdeEvtlog = $root.perfetto.protos.SdeSdeEvtlogFtraceEvent.fromObject(d.sdeSdeEvtlog);
                }
                if (d.sdeSdePerfCalcCrtc != null) {
                    if (typeof d.sdeSdePerfCalcCrtc !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.sdeSdePerfCalcCrtc: object expected");
                    m.sdeSdePerfCalcCrtc = $root.perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent.fromObject(d.sdeSdePerfCalcCrtc);
                }
                if (d.sdeSdePerfCrtcUpdate != null) {
                    if (typeof d.sdeSdePerfCrtcUpdate !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.sdeSdePerfCrtcUpdate: object expected");
                    m.sdeSdePerfCrtcUpdate = $root.perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent.fromObject(d.sdeSdePerfCrtcUpdate);
                }
                if (d.sdeSdePerfSetQosLuts != null) {
                    if (typeof d.sdeSdePerfSetQosLuts !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.sdeSdePerfSetQosLuts: object expected");
                    m.sdeSdePerfSetQosLuts = $root.perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent.fromObject(d.sdeSdePerfSetQosLuts);
                }
                if (d.sdeSdePerfUpdateBus != null) {
                    if (typeof d.sdeSdePerfUpdateBus !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.sdeSdePerfUpdateBus: object expected");
                    m.sdeSdePerfUpdateBus = $root.perfetto.protos.SdeSdePerfUpdateBusFtraceEvent.fromObject(d.sdeSdePerfUpdateBus);
                }
                if (d.rssStatThrottled != null) {
                    if (typeof d.rssStatThrottled !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.rssStatThrottled: object expected");
                    m.rssStatThrottled = $root.perfetto.protos.RssStatThrottledFtraceEvent.fromObject(d.rssStatThrottled);
                }
                if (d.netifReceiveSkb != null) {
                    if (typeof d.netifReceiveSkb !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.netifReceiveSkb: object expected");
                    m.netifReceiveSkb = $root.perfetto.protos.NetifReceiveSkbFtraceEvent.fromObject(d.netifReceiveSkb);
                }
                if (d.netDevXmit != null) {
                    if (typeof d.netDevXmit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.netDevXmit: object expected");
                    m.netDevXmit = $root.perfetto.protos.NetDevXmitFtraceEvent.fromObject(d.netDevXmit);
                }
                if (d.inetSockSetState != null) {
                    if (typeof d.inetSockSetState !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.inetSockSetState: object expected");
                    m.inetSockSetState = $root.perfetto.protos.InetSockSetStateFtraceEvent.fromObject(d.inetSockSetState);
                }
                if (d.tcpRetransmitSkb != null) {
                    if (typeof d.tcpRetransmitSkb !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.tcpRetransmitSkb: object expected");
                    m.tcpRetransmitSkb = $root.perfetto.protos.TcpRetransmitSkbFtraceEvent.fromObject(d.tcpRetransmitSkb);
                }
                if (d.crosEcSensorhubData != null) {
                    if (typeof d.crosEcSensorhubData !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.crosEcSensorhubData: object expected");
                    m.crosEcSensorhubData = $root.perfetto.protos.CrosEcSensorhubDataFtraceEvent.fromObject(d.crosEcSensorhubData);
                }
                if (d.napiGroReceiveEntry != null) {
                    if (typeof d.napiGroReceiveEntry !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.napiGroReceiveEntry: object expected");
                    m.napiGroReceiveEntry = $root.perfetto.protos.NapiGroReceiveEntryFtraceEvent.fromObject(d.napiGroReceiveEntry);
                }
                if (d.napiGroReceiveExit != null) {
                    if (typeof d.napiGroReceiveExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.napiGroReceiveExit: object expected");
                    m.napiGroReceiveExit = $root.perfetto.protos.NapiGroReceiveExitFtraceEvent.fromObject(d.napiGroReceiveExit);
                }
                if (d.kfreeSkb != null) {
                    if (typeof d.kfreeSkb !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kfreeSkb: object expected");
                    m.kfreeSkb = $root.perfetto.protos.KfreeSkbFtraceEvent.fromObject(d.kfreeSkb);
                }
                if (d.kvmAccessFault != null) {
                    if (typeof d.kvmAccessFault !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmAccessFault: object expected");
                    m.kvmAccessFault = $root.perfetto.protos.KvmAccessFaultFtraceEvent.fromObject(d.kvmAccessFault);
                }
                if (d.kvmAckIrq != null) {
                    if (typeof d.kvmAckIrq !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmAckIrq: object expected");
                    m.kvmAckIrq = $root.perfetto.protos.KvmAckIrqFtraceEvent.fromObject(d.kvmAckIrq);
                }
                if (d.kvmAgeHva != null) {
                    if (typeof d.kvmAgeHva !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmAgeHva: object expected");
                    m.kvmAgeHva = $root.perfetto.protos.KvmAgeHvaFtraceEvent.fromObject(d.kvmAgeHva);
                }
                if (d.kvmAgePage != null) {
                    if (typeof d.kvmAgePage !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmAgePage: object expected");
                    m.kvmAgePage = $root.perfetto.protos.KvmAgePageFtraceEvent.fromObject(d.kvmAgePage);
                }
                if (d.kvmArmClearDebug != null) {
                    if (typeof d.kvmArmClearDebug !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmArmClearDebug: object expected");
                    m.kvmArmClearDebug = $root.perfetto.protos.KvmArmClearDebugFtraceEvent.fromObject(d.kvmArmClearDebug);
                }
                if (d.kvmArmSetDreg32 != null) {
                    if (typeof d.kvmArmSetDreg32 !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmArmSetDreg32: object expected");
                    m.kvmArmSetDreg32 = $root.perfetto.protos.KvmArmSetDreg32FtraceEvent.fromObject(d.kvmArmSetDreg32);
                }
                if (d.kvmArmSetRegset != null) {
                    if (typeof d.kvmArmSetRegset !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmArmSetRegset: object expected");
                    m.kvmArmSetRegset = $root.perfetto.protos.KvmArmSetRegsetFtraceEvent.fromObject(d.kvmArmSetRegset);
                }
                if (d.kvmArmSetupDebug != null) {
                    if (typeof d.kvmArmSetupDebug !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmArmSetupDebug: object expected");
                    m.kvmArmSetupDebug = $root.perfetto.protos.KvmArmSetupDebugFtraceEvent.fromObject(d.kvmArmSetupDebug);
                }
                if (d.kvmEntry != null) {
                    if (typeof d.kvmEntry !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmEntry: object expected");
                    m.kvmEntry = $root.perfetto.protos.KvmEntryFtraceEvent.fromObject(d.kvmEntry);
                }
                if (d.kvmExit != null) {
                    if (typeof d.kvmExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmExit: object expected");
                    m.kvmExit = $root.perfetto.protos.KvmExitFtraceEvent.fromObject(d.kvmExit);
                }
                if (d.kvmFpu != null) {
                    if (typeof d.kvmFpu !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmFpu: object expected");
                    m.kvmFpu = $root.perfetto.protos.KvmFpuFtraceEvent.fromObject(d.kvmFpu);
                }
                if (d.kvmGetTimerMap != null) {
                    if (typeof d.kvmGetTimerMap !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmGetTimerMap: object expected");
                    m.kvmGetTimerMap = $root.perfetto.protos.KvmGetTimerMapFtraceEvent.fromObject(d.kvmGetTimerMap);
                }
                if (d.kvmGuestFault != null) {
                    if (typeof d.kvmGuestFault !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmGuestFault: object expected");
                    m.kvmGuestFault = $root.perfetto.protos.KvmGuestFaultFtraceEvent.fromObject(d.kvmGuestFault);
                }
                if (d.kvmHandleSysReg != null) {
                    if (typeof d.kvmHandleSysReg !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmHandleSysReg: object expected");
                    m.kvmHandleSysReg = $root.perfetto.protos.KvmHandleSysRegFtraceEvent.fromObject(d.kvmHandleSysReg);
                }
                if (d.kvmHvcArm64 != null) {
                    if (typeof d.kvmHvcArm64 !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmHvcArm64: object expected");
                    m.kvmHvcArm64 = $root.perfetto.protos.KvmHvcArm64FtraceEvent.fromObject(d.kvmHvcArm64);
                }
                if (d.kvmIrqLine != null) {
                    if (typeof d.kvmIrqLine !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmIrqLine: object expected");
                    m.kvmIrqLine = $root.perfetto.protos.KvmIrqLineFtraceEvent.fromObject(d.kvmIrqLine);
                }
                if (d.kvmMmio != null) {
                    if (typeof d.kvmMmio !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmMmio: object expected");
                    m.kvmMmio = $root.perfetto.protos.KvmMmioFtraceEvent.fromObject(d.kvmMmio);
                }
                if (d.kvmMmioEmulate != null) {
                    if (typeof d.kvmMmioEmulate !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmMmioEmulate: object expected");
                    m.kvmMmioEmulate = $root.perfetto.protos.KvmMmioEmulateFtraceEvent.fromObject(d.kvmMmioEmulate);
                }
                if (d.kvmSetGuestDebug != null) {
                    if (typeof d.kvmSetGuestDebug !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmSetGuestDebug: object expected");
                    m.kvmSetGuestDebug = $root.perfetto.protos.KvmSetGuestDebugFtraceEvent.fromObject(d.kvmSetGuestDebug);
                }
                if (d.kvmSetIrq != null) {
                    if (typeof d.kvmSetIrq !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmSetIrq: object expected");
                    m.kvmSetIrq = $root.perfetto.protos.KvmSetIrqFtraceEvent.fromObject(d.kvmSetIrq);
                }
                if (d.kvmSetSpteHva != null) {
                    if (typeof d.kvmSetSpteHva !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmSetSpteHva: object expected");
                    m.kvmSetSpteHva = $root.perfetto.protos.KvmSetSpteHvaFtraceEvent.fromObject(d.kvmSetSpteHva);
                }
                if (d.kvmSetWayFlush != null) {
                    if (typeof d.kvmSetWayFlush !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmSetWayFlush: object expected");
                    m.kvmSetWayFlush = $root.perfetto.protos.KvmSetWayFlushFtraceEvent.fromObject(d.kvmSetWayFlush);
                }
                if (d.kvmSysAccess != null) {
                    if (typeof d.kvmSysAccess !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmSysAccess: object expected");
                    m.kvmSysAccess = $root.perfetto.protos.KvmSysAccessFtraceEvent.fromObject(d.kvmSysAccess);
                }
                if (d.kvmTestAgeHva != null) {
                    if (typeof d.kvmTestAgeHva !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmTestAgeHva: object expected");
                    m.kvmTestAgeHva = $root.perfetto.protos.KvmTestAgeHvaFtraceEvent.fromObject(d.kvmTestAgeHva);
                }
                if (d.kvmTimerEmulate != null) {
                    if (typeof d.kvmTimerEmulate !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmTimerEmulate: object expected");
                    m.kvmTimerEmulate = $root.perfetto.protos.KvmTimerEmulateFtraceEvent.fromObject(d.kvmTimerEmulate);
                }
                if (d.kvmTimerHrtimerExpire != null) {
                    if (typeof d.kvmTimerHrtimerExpire !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmTimerHrtimerExpire: object expected");
                    m.kvmTimerHrtimerExpire = $root.perfetto.protos.KvmTimerHrtimerExpireFtraceEvent.fromObject(d.kvmTimerHrtimerExpire);
                }
                if (d.kvmTimerRestoreState != null) {
                    if (typeof d.kvmTimerRestoreState !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmTimerRestoreState: object expected");
                    m.kvmTimerRestoreState = $root.perfetto.protos.KvmTimerRestoreStateFtraceEvent.fromObject(d.kvmTimerRestoreState);
                }
                if (d.kvmTimerSaveState != null) {
                    if (typeof d.kvmTimerSaveState !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmTimerSaveState: object expected");
                    m.kvmTimerSaveState = $root.perfetto.protos.KvmTimerSaveStateFtraceEvent.fromObject(d.kvmTimerSaveState);
                }
                if (d.kvmTimerUpdateIrq != null) {
                    if (typeof d.kvmTimerUpdateIrq !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmTimerUpdateIrq: object expected");
                    m.kvmTimerUpdateIrq = $root.perfetto.protos.KvmTimerUpdateIrqFtraceEvent.fromObject(d.kvmTimerUpdateIrq);
                }
                if (d.kvmToggleCache != null) {
                    if (typeof d.kvmToggleCache !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmToggleCache: object expected");
                    m.kvmToggleCache = $root.perfetto.protos.KvmToggleCacheFtraceEvent.fromObject(d.kvmToggleCache);
                }
                if (d.kvmUnmapHvaRange != null) {
                    if (typeof d.kvmUnmapHvaRange !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmUnmapHvaRange: object expected");
                    m.kvmUnmapHvaRange = $root.perfetto.protos.KvmUnmapHvaRangeFtraceEvent.fromObject(d.kvmUnmapHvaRange);
                }
                if (d.kvmUserspaceExit != null) {
                    if (typeof d.kvmUserspaceExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmUserspaceExit: object expected");
                    m.kvmUserspaceExit = $root.perfetto.protos.KvmUserspaceExitFtraceEvent.fromObject(d.kvmUserspaceExit);
                }
                if (d.kvmVcpuWakeup != null) {
                    if (typeof d.kvmVcpuWakeup !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmVcpuWakeup: object expected");
                    m.kvmVcpuWakeup = $root.perfetto.protos.KvmVcpuWakeupFtraceEvent.fromObject(d.kvmVcpuWakeup);
                }
                if (d.kvmWfxArm64 != null) {
                    if (typeof d.kvmWfxArm64 !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.kvmWfxArm64: object expected");
                    m.kvmWfxArm64 = $root.perfetto.protos.KvmWfxArm64FtraceEvent.fromObject(d.kvmWfxArm64);
                }
                if (d.trapReg != null) {
                    if (typeof d.trapReg !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.trapReg: object expected");
                    m.trapReg = $root.perfetto.protos.TrapRegFtraceEvent.fromObject(d.trapReg);
                }
                if (d.vgicUpdateIrqPending != null) {
                    if (typeof d.vgicUpdateIrqPending !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.vgicUpdateIrqPending: object expected");
                    m.vgicUpdateIrqPending = $root.perfetto.protos.VgicUpdateIrqPendingFtraceEvent.fromObject(d.vgicUpdateIrqPending);
                }
                if (d.wakeupSourceActivate != null) {
                    if (typeof d.wakeupSourceActivate !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.wakeupSourceActivate: object expected");
                    m.wakeupSourceActivate = $root.perfetto.protos.WakeupSourceActivateFtraceEvent.fromObject(d.wakeupSourceActivate);
                }
                if (d.wakeupSourceDeactivate != null) {
                    if (typeof d.wakeupSourceDeactivate !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.wakeupSourceDeactivate: object expected");
                    m.wakeupSourceDeactivate = $root.perfetto.protos.WakeupSourceDeactivateFtraceEvent.fromObject(d.wakeupSourceDeactivate);
                }
                if (d.ufshcdCommand != null) {
                    if (typeof d.ufshcdCommand !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ufshcdCommand: object expected");
                    m.ufshcdCommand = $root.perfetto.protos.UfshcdCommandFtraceEvent.fromObject(d.ufshcdCommand);
                }
                if (d.ufshcdClkGating != null) {
                    if (typeof d.ufshcdClkGating !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.ufshcdClkGating: object expected");
                    m.ufshcdClkGating = $root.perfetto.protos.UfshcdClkGatingFtraceEvent.fromObject(d.ufshcdClkGating);
                }
                if (d.console != null) {
                    if (typeof d.console !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.console: object expected");
                    m.console = $root.perfetto.protos.ConsoleFtraceEvent.fromObject(d.console);
                }
                if (d.drmVblankEvent != null) {
                    if (typeof d.drmVblankEvent !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.drmVblankEvent: object expected");
                    m.drmVblankEvent = $root.perfetto.protos.DrmVblankEventFtraceEvent.fromObject(d.drmVblankEvent);
                }
                if (d.drmVblankEventDelivered != null) {
                    if (typeof d.drmVblankEventDelivered !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.drmVblankEventDelivered: object expected");
                    m.drmVblankEventDelivered = $root.perfetto.protos.DrmVblankEventDeliveredFtraceEvent.fromObject(d.drmVblankEventDelivered);
                }
                if (d.drmSchedJob != null) {
                    if (typeof d.drmSchedJob !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.drmSchedJob: object expected");
                    m.drmSchedJob = $root.perfetto.protos.DrmSchedJobFtraceEvent.fromObject(d.drmSchedJob);
                }
                if (d.drmRunJob != null) {
                    if (typeof d.drmRunJob !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.drmRunJob: object expected");
                    m.drmRunJob = $root.perfetto.protos.DrmRunJobFtraceEvent.fromObject(d.drmRunJob);
                }
                if (d.drmSchedProcessJob != null) {
                    if (typeof d.drmSchedProcessJob !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.drmSchedProcessJob: object expected");
                    m.drmSchedProcessJob = $root.perfetto.protos.DrmSchedProcessJobFtraceEvent.fromObject(d.drmSchedProcessJob);
                }
                if (d.dmaFenceInit != null) {
                    if (typeof d.dmaFenceInit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.dmaFenceInit: object expected");
                    m.dmaFenceInit = $root.perfetto.protos.DmaFenceInitFtraceEvent.fromObject(d.dmaFenceInit);
                }
                if (d.dmaFenceEmit != null) {
                    if (typeof d.dmaFenceEmit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.dmaFenceEmit: object expected");
                    m.dmaFenceEmit = $root.perfetto.protos.DmaFenceEmitFtraceEvent.fromObject(d.dmaFenceEmit);
                }
                if (d.dmaFenceSignaled != null) {
                    if (typeof d.dmaFenceSignaled !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.dmaFenceSignaled: object expected");
                    m.dmaFenceSignaled = $root.perfetto.protos.DmaFenceSignaledFtraceEvent.fromObject(d.dmaFenceSignaled);
                }
                if (d.dmaFenceWaitStart != null) {
                    if (typeof d.dmaFenceWaitStart !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.dmaFenceWaitStart: object expected");
                    m.dmaFenceWaitStart = $root.perfetto.protos.DmaFenceWaitStartFtraceEvent.fromObject(d.dmaFenceWaitStart);
                }
                if (d.dmaFenceWaitEnd != null) {
                    if (typeof d.dmaFenceWaitEnd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.dmaFenceWaitEnd: object expected");
                    m.dmaFenceWaitEnd = $root.perfetto.protos.DmaFenceWaitEndFtraceEvent.fromObject(d.dmaFenceWaitEnd);
                }
                if (d.f2fsIostat != null) {
                    if (typeof d.f2fsIostat !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsIostat: object expected");
                    m.f2fsIostat = $root.perfetto.protos.F2fsIostatFtraceEvent.fromObject(d.f2fsIostat);
                }
                if (d.f2fsIostatLatency != null) {
                    if (typeof d.f2fsIostatLatency !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.f2fsIostatLatency: object expected");
                    m.f2fsIostatLatency = $root.perfetto.protos.F2fsIostatLatencyFtraceEvent.fromObject(d.f2fsIostatLatency);
                }
                if (d.schedCpuUtilCfs != null) {
                    if (typeof d.schedCpuUtilCfs !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.schedCpuUtilCfs: object expected");
                    m.schedCpuUtilCfs = $root.perfetto.protos.SchedCpuUtilCfsFtraceEvent.fromObject(d.schedCpuUtilCfs);
                }
                if (d.v4l2Qbuf != null) {
                    if (typeof d.v4l2Qbuf !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.v4l2Qbuf: object expected");
                    m.v4l2Qbuf = $root.perfetto.protos.V4l2QbufFtraceEvent.fromObject(d.v4l2Qbuf);
                }
                if (d.v4l2Dqbuf != null) {
                    if (typeof d.v4l2Dqbuf !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.v4l2Dqbuf: object expected");
                    m.v4l2Dqbuf = $root.perfetto.protos.V4l2DqbufFtraceEvent.fromObject(d.v4l2Dqbuf);
                }
                if (d.vb2V4l2BufQueue != null) {
                    if (typeof d.vb2V4l2BufQueue !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.vb2V4l2BufQueue: object expected");
                    m.vb2V4l2BufQueue = $root.perfetto.protos.Vb2V4l2BufQueueFtraceEvent.fromObject(d.vb2V4l2BufQueue);
                }
                if (d.vb2V4l2BufDone != null) {
                    if (typeof d.vb2V4l2BufDone !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.vb2V4l2BufDone: object expected");
                    m.vb2V4l2BufDone = $root.perfetto.protos.Vb2V4l2BufDoneFtraceEvent.fromObject(d.vb2V4l2BufDone);
                }
                if (d.vb2V4l2Qbuf != null) {
                    if (typeof d.vb2V4l2Qbuf !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.vb2V4l2Qbuf: object expected");
                    m.vb2V4l2Qbuf = $root.perfetto.protos.Vb2V4l2QbufFtraceEvent.fromObject(d.vb2V4l2Qbuf);
                }
                if (d.vb2V4l2Dqbuf != null) {
                    if (typeof d.vb2V4l2Dqbuf !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.vb2V4l2Dqbuf: object expected");
                    m.vb2V4l2Dqbuf = $root.perfetto.protos.Vb2V4l2DqbufFtraceEvent.fromObject(d.vb2V4l2Dqbuf);
                }
                if (d.dsiCmdFifoStatus != null) {
                    if (typeof d.dsiCmdFifoStatus !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.dsiCmdFifoStatus: object expected");
                    m.dsiCmdFifoStatus = $root.perfetto.protos.DsiCmdFifoStatusFtraceEvent.fromObject(d.dsiCmdFifoStatus);
                }
                if (d.dsiRx != null) {
                    if (typeof d.dsiRx !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.dsiRx: object expected");
                    m.dsiRx = $root.perfetto.protos.DsiRxFtraceEvent.fromObject(d.dsiRx);
                }
                if (d.dsiTx != null) {
                    if (typeof d.dsiTx !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.dsiTx: object expected");
                    m.dsiTx = $root.perfetto.protos.DsiTxFtraceEvent.fromObject(d.dsiTx);
                }
                if (d.androidFsDatareadEnd != null) {
                    if (typeof d.androidFsDatareadEnd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.androidFsDatareadEnd: object expected");
                    m.androidFsDatareadEnd = $root.perfetto.protos.AndroidFsDatareadEndFtraceEvent.fromObject(d.androidFsDatareadEnd);
                }
                if (d.androidFsDatareadStart != null) {
                    if (typeof d.androidFsDatareadStart !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.androidFsDatareadStart: object expected");
                    m.androidFsDatareadStart = $root.perfetto.protos.AndroidFsDatareadStartFtraceEvent.fromObject(d.androidFsDatareadStart);
                }
                if (d.androidFsDatawriteEnd != null) {
                    if (typeof d.androidFsDatawriteEnd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.androidFsDatawriteEnd: object expected");
                    m.androidFsDatawriteEnd = $root.perfetto.protos.AndroidFsDatawriteEndFtraceEvent.fromObject(d.androidFsDatawriteEnd);
                }
                if (d.androidFsDatawriteStart != null) {
                    if (typeof d.androidFsDatawriteStart !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.androidFsDatawriteStart: object expected");
                    m.androidFsDatawriteStart = $root.perfetto.protos.AndroidFsDatawriteStartFtraceEvent.fromObject(d.androidFsDatawriteStart);
                }
                if (d.androidFsFsyncEnd != null) {
                    if (typeof d.androidFsFsyncEnd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.androidFsFsyncEnd: object expected");
                    m.androidFsFsyncEnd = $root.perfetto.protos.AndroidFsFsyncEndFtraceEvent.fromObject(d.androidFsFsyncEnd);
                }
                if (d.androidFsFsyncStart != null) {
                    if (typeof d.androidFsFsyncStart !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.androidFsFsyncStart: object expected");
                    m.androidFsFsyncStart = $root.perfetto.protos.AndroidFsFsyncStartFtraceEvent.fromObject(d.androidFsFsyncStart);
                }
                if (d.funcgraphEntry != null) {
                    if (typeof d.funcgraphEntry !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.funcgraphEntry: object expected");
                    m.funcgraphEntry = $root.perfetto.protos.FuncgraphEntryFtraceEvent.fromObject(d.funcgraphEntry);
                }
                if (d.funcgraphExit != null) {
                    if (typeof d.funcgraphExit !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.funcgraphExit: object expected");
                    m.funcgraphExit = $root.perfetto.protos.FuncgraphExitFtraceEvent.fromObject(d.funcgraphExit);
                }
                if (d.virtioVideoCmd != null) {
                    if (typeof d.virtioVideoCmd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.virtioVideoCmd: object expected");
                    m.virtioVideoCmd = $root.perfetto.protos.VirtioVideoCmdFtraceEvent.fromObject(d.virtioVideoCmd);
                }
                if (d.virtioVideoCmdDone != null) {
                    if (typeof d.virtioVideoCmdDone !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.virtioVideoCmdDone: object expected");
                    m.virtioVideoCmdDone = $root.perfetto.protos.VirtioVideoCmdDoneFtraceEvent.fromObject(d.virtioVideoCmdDone);
                }
                if (d.virtioVideoResourceQueue != null) {
                    if (typeof d.virtioVideoResourceQueue !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.virtioVideoResourceQueue: object expected");
                    m.virtioVideoResourceQueue = $root.perfetto.protos.VirtioVideoResourceQueueFtraceEvent.fromObject(d.virtioVideoResourceQueue);
                }
                if (d.virtioVideoResourceQueueDone != null) {
                    if (typeof d.virtioVideoResourceQueueDone !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.virtioVideoResourceQueueDone: object expected");
                    m.virtioVideoResourceQueueDone = $root.perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent.fromObject(d.virtioVideoResourceQueueDone);
                }
                if (d.mmShrinkSlabStart != null) {
                    if (typeof d.mmShrinkSlabStart !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmShrinkSlabStart: object expected");
                    m.mmShrinkSlabStart = $root.perfetto.protos.MmShrinkSlabStartFtraceEvent.fromObject(d.mmShrinkSlabStart);
                }
                if (d.mmShrinkSlabEnd != null) {
                    if (typeof d.mmShrinkSlabEnd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.mmShrinkSlabEnd: object expected");
                    m.mmShrinkSlabEnd = $root.perfetto.protos.MmShrinkSlabEndFtraceEvent.fromObject(d.mmShrinkSlabEnd);
                }
                if (d.trustySmc != null) {
                    if (typeof d.trustySmc !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.trustySmc: object expected");
                    m.trustySmc = $root.perfetto.protos.TrustySmcFtraceEvent.fromObject(d.trustySmc);
                }
                if (d.trustySmcDone != null) {
                    if (typeof d.trustySmcDone !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.trustySmcDone: object expected");
                    m.trustySmcDone = $root.perfetto.protos.TrustySmcDoneFtraceEvent.fromObject(d.trustySmcDone);
                }
                if (d.trustyStdCall32 != null) {
                    if (typeof d.trustyStdCall32 !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.trustyStdCall32: object expected");
                    m.trustyStdCall32 = $root.perfetto.protos.TrustyStdCall32FtraceEvent.fromObject(d.trustyStdCall32);
                }
                if (d.trustyStdCall32Done != null) {
                    if (typeof d.trustyStdCall32Done !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.trustyStdCall32Done: object expected");
                    m.trustyStdCall32Done = $root.perfetto.protos.TrustyStdCall32DoneFtraceEvent.fromObject(d.trustyStdCall32Done);
                }
                if (d.trustyShareMemory != null) {
                    if (typeof d.trustyShareMemory !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.trustyShareMemory: object expected");
                    m.trustyShareMemory = $root.perfetto.protos.TrustyShareMemoryFtraceEvent.fromObject(d.trustyShareMemory);
                }
                if (d.trustyShareMemoryDone != null) {
                    if (typeof d.trustyShareMemoryDone !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.trustyShareMemoryDone: object expected");
                    m.trustyShareMemoryDone = $root.perfetto.protos.TrustyShareMemoryDoneFtraceEvent.fromObject(d.trustyShareMemoryDone);
                }
                if (d.trustyReclaimMemory != null) {
                    if (typeof d.trustyReclaimMemory !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.trustyReclaimMemory: object expected");
                    m.trustyReclaimMemory = $root.perfetto.protos.TrustyReclaimMemoryFtraceEvent.fromObject(d.trustyReclaimMemory);
                }
                if (d.trustyReclaimMemoryDone != null) {
                    if (typeof d.trustyReclaimMemoryDone !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.trustyReclaimMemoryDone: object expected");
                    m.trustyReclaimMemoryDone = $root.perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent.fromObject(d.trustyReclaimMemoryDone);
                }
                if (d.trustyIrq != null) {
                    if (typeof d.trustyIrq !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.trustyIrq: object expected");
                    m.trustyIrq = $root.perfetto.protos.TrustyIrqFtraceEvent.fromObject(d.trustyIrq);
                }
                if (d.trustyIpcHandleEvent != null) {
                    if (typeof d.trustyIpcHandleEvent !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.trustyIpcHandleEvent: object expected");
                    m.trustyIpcHandleEvent = $root.perfetto.protos.TrustyIpcHandleEventFtraceEvent.fromObject(d.trustyIpcHandleEvent);
                }
                if (d.trustyIpcConnect != null) {
                    if (typeof d.trustyIpcConnect !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.trustyIpcConnect: object expected");
                    m.trustyIpcConnect = $root.perfetto.protos.TrustyIpcConnectFtraceEvent.fromObject(d.trustyIpcConnect);
                }
                if (d.trustyIpcConnectEnd != null) {
                    if (typeof d.trustyIpcConnectEnd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.trustyIpcConnectEnd: object expected");
                    m.trustyIpcConnectEnd = $root.perfetto.protos.TrustyIpcConnectEndFtraceEvent.fromObject(d.trustyIpcConnectEnd);
                }
                if (d.trustyIpcWrite != null) {
                    if (typeof d.trustyIpcWrite !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.trustyIpcWrite: object expected");
                    m.trustyIpcWrite = $root.perfetto.protos.TrustyIpcWriteFtraceEvent.fromObject(d.trustyIpcWrite);
                }
                if (d.trustyIpcPoll != null) {
                    if (typeof d.trustyIpcPoll !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.trustyIpcPoll: object expected");
                    m.trustyIpcPoll = $root.perfetto.protos.TrustyIpcPollFtraceEvent.fromObject(d.trustyIpcPoll);
                }
                if (d.trustyIpcPollEnd != null) {
                    if (typeof d.trustyIpcPollEnd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.trustyIpcPollEnd: object expected");
                    m.trustyIpcPollEnd = $root.perfetto.protos.TrustyIpcPollEndFtraceEvent.fromObject(d.trustyIpcPollEnd);
                }
                if (d.trustyIpcRead != null) {
                    if (typeof d.trustyIpcRead !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.trustyIpcRead: object expected");
                    m.trustyIpcRead = $root.perfetto.protos.TrustyIpcReadFtraceEvent.fromObject(d.trustyIpcRead);
                }
                if (d.trustyIpcReadEnd != null) {
                    if (typeof d.trustyIpcReadEnd !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.trustyIpcReadEnd: object expected");
                    m.trustyIpcReadEnd = $root.perfetto.protos.TrustyIpcReadEndFtraceEvent.fromObject(d.trustyIpcReadEnd);
                }
                if (d.trustyIpcRx != null) {
                    if (typeof d.trustyIpcRx !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.trustyIpcRx: object expected");
                    m.trustyIpcRx = $root.perfetto.protos.TrustyIpcRxFtraceEvent.fromObject(d.trustyIpcRx);
                }
                if (d.trustyIpcTx != null) {
                    if (typeof d.trustyIpcTx !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.trustyIpcTx: object expected");
                    m.trustyIpcTx = $root.perfetto.protos.TrustyIpcTxFtraceEvent.fromObject(d.trustyIpcTx);
                }
                if (d.trustyEnqueueNop != null) {
                    if (typeof d.trustyEnqueueNop !== "object")
                        throw TypeError(".perfetto.protos.FtraceEvent.trustyEnqueueNop: object expected");
                    m.trustyEnqueueNop = $root.perfetto.protos.TrustyEnqueueNopFtraceEvent.fromObject(d.trustyEnqueueNop);
                }
                return m;
            };

            /**
             * Creates a plain object from a FtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.FtraceEvent
             * @static
             * @param {perfetto.protos.FtraceEvent} m FtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            FtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.timestamp = o.longs === String ? "0" : 0;
                    d.pid = 0;
                }
                if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                    if (typeof m.timestamp === "number")
                        d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp;
                    else
                        d.timestamp = o.longs === String ? $util.Long.prototype.toString.call(m.timestamp) : o.longs === Number ? new $util.LongBits(m.timestamp.low >>> 0, m.timestamp.high >>> 0).toNumber(true) : m.timestamp;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.print != null && m.hasOwnProperty("print")) {
                    d.print = $root.perfetto.protos.PrintFtraceEvent.toObject(m.print, o);
                    if (o.oneofs)
                        d.event = "print";
                }
                if (m.schedSwitch != null && m.hasOwnProperty("schedSwitch")) {
                    d.schedSwitch = $root.perfetto.protos.SchedSwitchFtraceEvent.toObject(m.schedSwitch, o);
                    if (o.oneofs)
                        d.event = "schedSwitch";
                }
                if (m.cpuFrequency != null && m.hasOwnProperty("cpuFrequency")) {
                    d.cpuFrequency = $root.perfetto.protos.CpuFrequencyFtraceEvent.toObject(m.cpuFrequency, o);
                    if (o.oneofs)
                        d.event = "cpuFrequency";
                }
                if (m.cpuFrequencyLimits != null && m.hasOwnProperty("cpuFrequencyLimits")) {
                    d.cpuFrequencyLimits = $root.perfetto.protos.CpuFrequencyLimitsFtraceEvent.toObject(m.cpuFrequencyLimits, o);
                    if (o.oneofs)
                        d.event = "cpuFrequencyLimits";
                }
                if (m.cpuIdle != null && m.hasOwnProperty("cpuIdle")) {
                    d.cpuIdle = $root.perfetto.protos.CpuIdleFtraceEvent.toObject(m.cpuIdle, o);
                    if (o.oneofs)
                        d.event = "cpuIdle";
                }
                if (m.clockEnable != null && m.hasOwnProperty("clockEnable")) {
                    d.clockEnable = $root.perfetto.protos.ClockEnableFtraceEvent.toObject(m.clockEnable, o);
                    if (o.oneofs)
                        d.event = "clockEnable";
                }
                if (m.clockDisable != null && m.hasOwnProperty("clockDisable")) {
                    d.clockDisable = $root.perfetto.protos.ClockDisableFtraceEvent.toObject(m.clockDisable, o);
                    if (o.oneofs)
                        d.event = "clockDisable";
                }
                if (m.clockSetRate != null && m.hasOwnProperty("clockSetRate")) {
                    d.clockSetRate = $root.perfetto.protos.ClockSetRateFtraceEvent.toObject(m.clockSetRate, o);
                    if (o.oneofs)
                        d.event = "clockSetRate";
                }
                if (m.schedWakeup != null && m.hasOwnProperty("schedWakeup")) {
                    d.schedWakeup = $root.perfetto.protos.SchedWakeupFtraceEvent.toObject(m.schedWakeup, o);
                    if (o.oneofs)
                        d.event = "schedWakeup";
                }
                if (m.schedBlockedReason != null && m.hasOwnProperty("schedBlockedReason")) {
                    d.schedBlockedReason = $root.perfetto.protos.SchedBlockedReasonFtraceEvent.toObject(m.schedBlockedReason, o);
                    if (o.oneofs)
                        d.event = "schedBlockedReason";
                }
                if (m.schedCpuHotplug != null && m.hasOwnProperty("schedCpuHotplug")) {
                    d.schedCpuHotplug = $root.perfetto.protos.SchedCpuHotplugFtraceEvent.toObject(m.schedCpuHotplug, o);
                    if (o.oneofs)
                        d.event = "schedCpuHotplug";
                }
                if (m.schedWaking != null && m.hasOwnProperty("schedWaking")) {
                    d.schedWaking = $root.perfetto.protos.SchedWakingFtraceEvent.toObject(m.schedWaking, o);
                    if (o.oneofs)
                        d.event = "schedWaking";
                }
                if (m.ipiEntry != null && m.hasOwnProperty("ipiEntry")) {
                    d.ipiEntry = $root.perfetto.protos.IpiEntryFtraceEvent.toObject(m.ipiEntry, o);
                    if (o.oneofs)
                        d.event = "ipiEntry";
                }
                if (m.ipiExit != null && m.hasOwnProperty("ipiExit")) {
                    d.ipiExit = $root.perfetto.protos.IpiExitFtraceEvent.toObject(m.ipiExit, o);
                    if (o.oneofs)
                        d.event = "ipiExit";
                }
                if (m.ipiRaise != null && m.hasOwnProperty("ipiRaise")) {
                    d.ipiRaise = $root.perfetto.protos.IpiRaiseFtraceEvent.toObject(m.ipiRaise, o);
                    if (o.oneofs)
                        d.event = "ipiRaise";
                }
                if (m.softirqEntry != null && m.hasOwnProperty("softirqEntry")) {
                    d.softirqEntry = $root.perfetto.protos.SoftirqEntryFtraceEvent.toObject(m.softirqEntry, o);
                    if (o.oneofs)
                        d.event = "softirqEntry";
                }
                if (m.softirqExit != null && m.hasOwnProperty("softirqExit")) {
                    d.softirqExit = $root.perfetto.protos.SoftirqExitFtraceEvent.toObject(m.softirqExit, o);
                    if (o.oneofs)
                        d.event = "softirqExit";
                }
                if (m.softirqRaise != null && m.hasOwnProperty("softirqRaise")) {
                    d.softirqRaise = $root.perfetto.protos.SoftirqRaiseFtraceEvent.toObject(m.softirqRaise, o);
                    if (o.oneofs)
                        d.event = "softirqRaise";
                }
                if (m.i2cRead != null && m.hasOwnProperty("i2cRead")) {
                    d.i2cRead = $root.perfetto.protos.I2cReadFtraceEvent.toObject(m.i2cRead, o);
                    if (o.oneofs)
                        d.event = "i2cRead";
                }
                if (m.i2cWrite != null && m.hasOwnProperty("i2cWrite")) {
                    d.i2cWrite = $root.perfetto.protos.I2cWriteFtraceEvent.toObject(m.i2cWrite, o);
                    if (o.oneofs)
                        d.event = "i2cWrite";
                }
                if (m.i2cResult != null && m.hasOwnProperty("i2cResult")) {
                    d.i2cResult = $root.perfetto.protos.I2cResultFtraceEvent.toObject(m.i2cResult, o);
                    if (o.oneofs)
                        d.event = "i2cResult";
                }
                if (m.i2cReply != null && m.hasOwnProperty("i2cReply")) {
                    d.i2cReply = $root.perfetto.protos.I2cReplyFtraceEvent.toObject(m.i2cReply, o);
                    if (o.oneofs)
                        d.event = "i2cReply";
                }
                if (m.smbusRead != null && m.hasOwnProperty("smbusRead")) {
                    d.smbusRead = $root.perfetto.protos.SmbusReadFtraceEvent.toObject(m.smbusRead, o);
                    if (o.oneofs)
                        d.event = "smbusRead";
                }
                if (m.smbusWrite != null && m.hasOwnProperty("smbusWrite")) {
                    d.smbusWrite = $root.perfetto.protos.SmbusWriteFtraceEvent.toObject(m.smbusWrite, o);
                    if (o.oneofs)
                        d.event = "smbusWrite";
                }
                if (m.smbusResult != null && m.hasOwnProperty("smbusResult")) {
                    d.smbusResult = $root.perfetto.protos.SmbusResultFtraceEvent.toObject(m.smbusResult, o);
                    if (o.oneofs)
                        d.event = "smbusResult";
                }
                if (m.smbusReply != null && m.hasOwnProperty("smbusReply")) {
                    d.smbusReply = $root.perfetto.protos.SmbusReplyFtraceEvent.toObject(m.smbusReply, o);
                    if (o.oneofs)
                        d.event = "smbusReply";
                }
                if (m.lowmemoryKill != null && m.hasOwnProperty("lowmemoryKill")) {
                    d.lowmemoryKill = $root.perfetto.protos.LowmemoryKillFtraceEvent.toObject(m.lowmemoryKill, o);
                    if (o.oneofs)
                        d.event = "lowmemoryKill";
                }
                if (m.irqHandlerEntry != null && m.hasOwnProperty("irqHandlerEntry")) {
                    d.irqHandlerEntry = $root.perfetto.protos.IrqHandlerEntryFtraceEvent.toObject(m.irqHandlerEntry, o);
                    if (o.oneofs)
                        d.event = "irqHandlerEntry";
                }
                if (m.irqHandlerExit != null && m.hasOwnProperty("irqHandlerExit")) {
                    d.irqHandlerExit = $root.perfetto.protos.IrqHandlerExitFtraceEvent.toObject(m.irqHandlerExit, o);
                    if (o.oneofs)
                        d.event = "irqHandlerExit";
                }
                if (m.syncPt != null && m.hasOwnProperty("syncPt")) {
                    d.syncPt = $root.perfetto.protos.SyncPtFtraceEvent.toObject(m.syncPt, o);
                    if (o.oneofs)
                        d.event = "syncPt";
                }
                if (m.syncTimeline != null && m.hasOwnProperty("syncTimeline")) {
                    d.syncTimeline = $root.perfetto.protos.SyncTimelineFtraceEvent.toObject(m.syncTimeline, o);
                    if (o.oneofs)
                        d.event = "syncTimeline";
                }
                if (m.syncWait != null && m.hasOwnProperty("syncWait")) {
                    d.syncWait = $root.perfetto.protos.SyncWaitFtraceEvent.toObject(m.syncWait, o);
                    if (o.oneofs)
                        d.event = "syncWait";
                }
                if (m.ext4DaWriteBegin != null && m.hasOwnProperty("ext4DaWriteBegin")) {
                    d.ext4DaWriteBegin = $root.perfetto.protos.Ext4DaWriteBeginFtraceEvent.toObject(m.ext4DaWriteBegin, o);
                    if (o.oneofs)
                        d.event = "ext4DaWriteBegin";
                }
                if (m.ext4DaWriteEnd != null && m.hasOwnProperty("ext4DaWriteEnd")) {
                    d.ext4DaWriteEnd = $root.perfetto.protos.Ext4DaWriteEndFtraceEvent.toObject(m.ext4DaWriteEnd, o);
                    if (o.oneofs)
                        d.event = "ext4DaWriteEnd";
                }
                if (m.ext4SyncFileEnter != null && m.hasOwnProperty("ext4SyncFileEnter")) {
                    d.ext4SyncFileEnter = $root.perfetto.protos.Ext4SyncFileEnterFtraceEvent.toObject(m.ext4SyncFileEnter, o);
                    if (o.oneofs)
                        d.event = "ext4SyncFileEnter";
                }
                if (m.ext4SyncFileExit != null && m.hasOwnProperty("ext4SyncFileExit")) {
                    d.ext4SyncFileExit = $root.perfetto.protos.Ext4SyncFileExitFtraceEvent.toObject(m.ext4SyncFileExit, o);
                    if (o.oneofs)
                        d.event = "ext4SyncFileExit";
                }
                if (m.blockRqIssue != null && m.hasOwnProperty("blockRqIssue")) {
                    d.blockRqIssue = $root.perfetto.protos.BlockRqIssueFtraceEvent.toObject(m.blockRqIssue, o);
                    if (o.oneofs)
                        d.event = "blockRqIssue";
                }
                if (m.mmVmscanDirectReclaimBegin != null && m.hasOwnProperty("mmVmscanDirectReclaimBegin")) {
                    d.mmVmscanDirectReclaimBegin = $root.perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent.toObject(m.mmVmscanDirectReclaimBegin, o);
                    if (o.oneofs)
                        d.event = "mmVmscanDirectReclaimBegin";
                }
                if (m.mmVmscanDirectReclaimEnd != null && m.hasOwnProperty("mmVmscanDirectReclaimEnd")) {
                    d.mmVmscanDirectReclaimEnd = $root.perfetto.protos.MmVmscanDirectReclaimEndFtraceEvent.toObject(m.mmVmscanDirectReclaimEnd, o);
                    if (o.oneofs)
                        d.event = "mmVmscanDirectReclaimEnd";
                }
                if (m.mmVmscanKswapdWake != null && m.hasOwnProperty("mmVmscanKswapdWake")) {
                    d.mmVmscanKswapdWake = $root.perfetto.protos.MmVmscanKswapdWakeFtraceEvent.toObject(m.mmVmscanKswapdWake, o);
                    if (o.oneofs)
                        d.event = "mmVmscanKswapdWake";
                }
                if (m.mmVmscanKswapdSleep != null && m.hasOwnProperty("mmVmscanKswapdSleep")) {
                    d.mmVmscanKswapdSleep = $root.perfetto.protos.MmVmscanKswapdSleepFtraceEvent.toObject(m.mmVmscanKswapdSleep, o);
                    if (o.oneofs)
                        d.event = "mmVmscanKswapdSleep";
                }
                if (m.binderTransaction != null && m.hasOwnProperty("binderTransaction")) {
                    d.binderTransaction = $root.perfetto.protos.BinderTransactionFtraceEvent.toObject(m.binderTransaction, o);
                    if (o.oneofs)
                        d.event = "binderTransaction";
                }
                if (m.binderTransactionReceived != null && m.hasOwnProperty("binderTransactionReceived")) {
                    d.binderTransactionReceived = $root.perfetto.protos.BinderTransactionReceivedFtraceEvent.toObject(m.binderTransactionReceived, o);
                    if (o.oneofs)
                        d.event = "binderTransactionReceived";
                }
                if (m.binderSetPriority != null && m.hasOwnProperty("binderSetPriority")) {
                    d.binderSetPriority = $root.perfetto.protos.BinderSetPriorityFtraceEvent.toObject(m.binderSetPriority, o);
                    if (o.oneofs)
                        d.event = "binderSetPriority";
                }
                if (m.binderLock != null && m.hasOwnProperty("binderLock")) {
                    d.binderLock = $root.perfetto.protos.BinderLockFtraceEvent.toObject(m.binderLock, o);
                    if (o.oneofs)
                        d.event = "binderLock";
                }
                if (m.binderLocked != null && m.hasOwnProperty("binderLocked")) {
                    d.binderLocked = $root.perfetto.protos.BinderLockedFtraceEvent.toObject(m.binderLocked, o);
                    if (o.oneofs)
                        d.event = "binderLocked";
                }
                if (m.binderUnlock != null && m.hasOwnProperty("binderUnlock")) {
                    d.binderUnlock = $root.perfetto.protos.BinderUnlockFtraceEvent.toObject(m.binderUnlock, o);
                    if (o.oneofs)
                        d.event = "binderUnlock";
                }
                if (m.workqueueActivateWork != null && m.hasOwnProperty("workqueueActivateWork")) {
                    d.workqueueActivateWork = $root.perfetto.protos.WorkqueueActivateWorkFtraceEvent.toObject(m.workqueueActivateWork, o);
                    if (o.oneofs)
                        d.event = "workqueueActivateWork";
                }
                if (m.workqueueExecuteEnd != null && m.hasOwnProperty("workqueueExecuteEnd")) {
                    d.workqueueExecuteEnd = $root.perfetto.protos.WorkqueueExecuteEndFtraceEvent.toObject(m.workqueueExecuteEnd, o);
                    if (o.oneofs)
                        d.event = "workqueueExecuteEnd";
                }
                if (m.workqueueExecuteStart != null && m.hasOwnProperty("workqueueExecuteStart")) {
                    d.workqueueExecuteStart = $root.perfetto.protos.WorkqueueExecuteStartFtraceEvent.toObject(m.workqueueExecuteStart, o);
                    if (o.oneofs)
                        d.event = "workqueueExecuteStart";
                }
                if (m.workqueueQueueWork != null && m.hasOwnProperty("workqueueQueueWork")) {
                    d.workqueueQueueWork = $root.perfetto.protos.WorkqueueQueueWorkFtraceEvent.toObject(m.workqueueQueueWork, o);
                    if (o.oneofs)
                        d.event = "workqueueQueueWork";
                }
                if (m.regulatorDisable != null && m.hasOwnProperty("regulatorDisable")) {
                    d.regulatorDisable = $root.perfetto.protos.RegulatorDisableFtraceEvent.toObject(m.regulatorDisable, o);
                    if (o.oneofs)
                        d.event = "regulatorDisable";
                }
                if (m.regulatorDisableComplete != null && m.hasOwnProperty("regulatorDisableComplete")) {
                    d.regulatorDisableComplete = $root.perfetto.protos.RegulatorDisableCompleteFtraceEvent.toObject(m.regulatorDisableComplete, o);
                    if (o.oneofs)
                        d.event = "regulatorDisableComplete";
                }
                if (m.regulatorEnable != null && m.hasOwnProperty("regulatorEnable")) {
                    d.regulatorEnable = $root.perfetto.protos.RegulatorEnableFtraceEvent.toObject(m.regulatorEnable, o);
                    if (o.oneofs)
                        d.event = "regulatorEnable";
                }
                if (m.regulatorEnableComplete != null && m.hasOwnProperty("regulatorEnableComplete")) {
                    d.regulatorEnableComplete = $root.perfetto.protos.RegulatorEnableCompleteFtraceEvent.toObject(m.regulatorEnableComplete, o);
                    if (o.oneofs)
                        d.event = "regulatorEnableComplete";
                }
                if (m.regulatorEnableDelay != null && m.hasOwnProperty("regulatorEnableDelay")) {
                    d.regulatorEnableDelay = $root.perfetto.protos.RegulatorEnableDelayFtraceEvent.toObject(m.regulatorEnableDelay, o);
                    if (o.oneofs)
                        d.event = "regulatorEnableDelay";
                }
                if (m.regulatorSetVoltage != null && m.hasOwnProperty("regulatorSetVoltage")) {
                    d.regulatorSetVoltage = $root.perfetto.protos.RegulatorSetVoltageFtraceEvent.toObject(m.regulatorSetVoltage, o);
                    if (o.oneofs)
                        d.event = "regulatorSetVoltage";
                }
                if (m.regulatorSetVoltageComplete != null && m.hasOwnProperty("regulatorSetVoltageComplete")) {
                    d.regulatorSetVoltageComplete = $root.perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent.toObject(m.regulatorSetVoltageComplete, o);
                    if (o.oneofs)
                        d.event = "regulatorSetVoltageComplete";
                }
                if (m.cgroupAttachTask != null && m.hasOwnProperty("cgroupAttachTask")) {
                    d.cgroupAttachTask = $root.perfetto.protos.CgroupAttachTaskFtraceEvent.toObject(m.cgroupAttachTask, o);
                    if (o.oneofs)
                        d.event = "cgroupAttachTask";
                }
                if (m.cgroupMkdir != null && m.hasOwnProperty("cgroupMkdir")) {
                    d.cgroupMkdir = $root.perfetto.protos.CgroupMkdirFtraceEvent.toObject(m.cgroupMkdir, o);
                    if (o.oneofs)
                        d.event = "cgroupMkdir";
                }
                if (m.cgroupRemount != null && m.hasOwnProperty("cgroupRemount")) {
                    d.cgroupRemount = $root.perfetto.protos.CgroupRemountFtraceEvent.toObject(m.cgroupRemount, o);
                    if (o.oneofs)
                        d.event = "cgroupRemount";
                }
                if (m.cgroupRmdir != null && m.hasOwnProperty("cgroupRmdir")) {
                    d.cgroupRmdir = $root.perfetto.protos.CgroupRmdirFtraceEvent.toObject(m.cgroupRmdir, o);
                    if (o.oneofs)
                        d.event = "cgroupRmdir";
                }
                if (m.cgroupTransferTasks != null && m.hasOwnProperty("cgroupTransferTasks")) {
                    d.cgroupTransferTasks = $root.perfetto.protos.CgroupTransferTasksFtraceEvent.toObject(m.cgroupTransferTasks, o);
                    if (o.oneofs)
                        d.event = "cgroupTransferTasks";
                }
                if (m.cgroupDestroyRoot != null && m.hasOwnProperty("cgroupDestroyRoot")) {
                    d.cgroupDestroyRoot = $root.perfetto.protos.CgroupDestroyRootFtraceEvent.toObject(m.cgroupDestroyRoot, o);
                    if (o.oneofs)
                        d.event = "cgroupDestroyRoot";
                }
                if (m.cgroupRelease != null && m.hasOwnProperty("cgroupRelease")) {
                    d.cgroupRelease = $root.perfetto.protos.CgroupReleaseFtraceEvent.toObject(m.cgroupRelease, o);
                    if (o.oneofs)
                        d.event = "cgroupRelease";
                }
                if (m.cgroupRename != null && m.hasOwnProperty("cgroupRename")) {
                    d.cgroupRename = $root.perfetto.protos.CgroupRenameFtraceEvent.toObject(m.cgroupRename, o);
                    if (o.oneofs)
                        d.event = "cgroupRename";
                }
                if (m.cgroupSetupRoot != null && m.hasOwnProperty("cgroupSetupRoot")) {
                    d.cgroupSetupRoot = $root.perfetto.protos.CgroupSetupRootFtraceEvent.toObject(m.cgroupSetupRoot, o);
                    if (o.oneofs)
                        d.event = "cgroupSetupRoot";
                }
                if (m.mdpCmdKickoff != null && m.hasOwnProperty("mdpCmdKickoff")) {
                    d.mdpCmdKickoff = $root.perfetto.protos.MdpCmdKickoffFtraceEvent.toObject(m.mdpCmdKickoff, o);
                    if (o.oneofs)
                        d.event = "mdpCmdKickoff";
                }
                if (m.mdpCommit != null && m.hasOwnProperty("mdpCommit")) {
                    d.mdpCommit = $root.perfetto.protos.MdpCommitFtraceEvent.toObject(m.mdpCommit, o);
                    if (o.oneofs)
                        d.event = "mdpCommit";
                }
                if (m.mdpPerfSetOt != null && m.hasOwnProperty("mdpPerfSetOt")) {
                    d.mdpPerfSetOt = $root.perfetto.protos.MdpPerfSetOtFtraceEvent.toObject(m.mdpPerfSetOt, o);
                    if (o.oneofs)
                        d.event = "mdpPerfSetOt";
                }
                if (m.mdpSsppChange != null && m.hasOwnProperty("mdpSsppChange")) {
                    d.mdpSsppChange = $root.perfetto.protos.MdpSsppChangeFtraceEvent.toObject(m.mdpSsppChange, o);
                    if (o.oneofs)
                        d.event = "mdpSsppChange";
                }
                if (m.tracingMarkWrite != null && m.hasOwnProperty("tracingMarkWrite")) {
                    d.tracingMarkWrite = $root.perfetto.protos.TracingMarkWriteFtraceEvent.toObject(m.tracingMarkWrite, o);
                    if (o.oneofs)
                        d.event = "tracingMarkWrite";
                }
                if (m.mdpCmdPingpongDone != null && m.hasOwnProperty("mdpCmdPingpongDone")) {
                    d.mdpCmdPingpongDone = $root.perfetto.protos.MdpCmdPingpongDoneFtraceEvent.toObject(m.mdpCmdPingpongDone, o);
                    if (o.oneofs)
                        d.event = "mdpCmdPingpongDone";
                }
                if (m.mdpCompareBw != null && m.hasOwnProperty("mdpCompareBw")) {
                    d.mdpCompareBw = $root.perfetto.protos.MdpCompareBwFtraceEvent.toObject(m.mdpCompareBw, o);
                    if (o.oneofs)
                        d.event = "mdpCompareBw";
                }
                if (m.mdpPerfSetPanicLuts != null && m.hasOwnProperty("mdpPerfSetPanicLuts")) {
                    d.mdpPerfSetPanicLuts = $root.perfetto.protos.MdpPerfSetPanicLutsFtraceEvent.toObject(m.mdpPerfSetPanicLuts, o);
                    if (o.oneofs)
                        d.event = "mdpPerfSetPanicLuts";
                }
                if (m.mdpSsppSet != null && m.hasOwnProperty("mdpSsppSet")) {
                    d.mdpSsppSet = $root.perfetto.protos.MdpSsppSetFtraceEvent.toObject(m.mdpSsppSet, o);
                    if (o.oneofs)
                        d.event = "mdpSsppSet";
                }
                if (m.mdpCmdReadptrDone != null && m.hasOwnProperty("mdpCmdReadptrDone")) {
                    d.mdpCmdReadptrDone = $root.perfetto.protos.MdpCmdReadptrDoneFtraceEvent.toObject(m.mdpCmdReadptrDone, o);
                    if (o.oneofs)
                        d.event = "mdpCmdReadptrDone";
                }
                if (m.mdpMisrCrc != null && m.hasOwnProperty("mdpMisrCrc")) {
                    d.mdpMisrCrc = $root.perfetto.protos.MdpMisrCrcFtraceEvent.toObject(m.mdpMisrCrc, o);
                    if (o.oneofs)
                        d.event = "mdpMisrCrc";
                }
                if (m.mdpPerfSetQosLuts != null && m.hasOwnProperty("mdpPerfSetQosLuts")) {
                    d.mdpPerfSetQosLuts = $root.perfetto.protos.MdpPerfSetQosLutsFtraceEvent.toObject(m.mdpPerfSetQosLuts, o);
                    if (o.oneofs)
                        d.event = "mdpPerfSetQosLuts";
                }
                if (m.mdpTraceCounter != null && m.hasOwnProperty("mdpTraceCounter")) {
                    d.mdpTraceCounter = $root.perfetto.protos.MdpTraceCounterFtraceEvent.toObject(m.mdpTraceCounter, o);
                    if (o.oneofs)
                        d.event = "mdpTraceCounter";
                }
                if (m.mdpCmdReleaseBw != null && m.hasOwnProperty("mdpCmdReleaseBw")) {
                    d.mdpCmdReleaseBw = $root.perfetto.protos.MdpCmdReleaseBwFtraceEvent.toObject(m.mdpCmdReleaseBw, o);
                    if (o.oneofs)
                        d.event = "mdpCmdReleaseBw";
                }
                if (m.mdpMixerUpdate != null && m.hasOwnProperty("mdpMixerUpdate")) {
                    d.mdpMixerUpdate = $root.perfetto.protos.MdpMixerUpdateFtraceEvent.toObject(m.mdpMixerUpdate, o);
                    if (o.oneofs)
                        d.event = "mdpMixerUpdate";
                }
                if (m.mdpPerfSetWmLevels != null && m.hasOwnProperty("mdpPerfSetWmLevels")) {
                    d.mdpPerfSetWmLevels = $root.perfetto.protos.MdpPerfSetWmLevelsFtraceEvent.toObject(m.mdpPerfSetWmLevels, o);
                    if (o.oneofs)
                        d.event = "mdpPerfSetWmLevels";
                }
                if (m.mdpVideoUnderrunDone != null && m.hasOwnProperty("mdpVideoUnderrunDone")) {
                    d.mdpVideoUnderrunDone = $root.perfetto.protos.MdpVideoUnderrunDoneFtraceEvent.toObject(m.mdpVideoUnderrunDone, o);
                    if (o.oneofs)
                        d.event = "mdpVideoUnderrunDone";
                }
                if (m.mdpCmdWaitPingpong != null && m.hasOwnProperty("mdpCmdWaitPingpong")) {
                    d.mdpCmdWaitPingpong = $root.perfetto.protos.MdpCmdWaitPingpongFtraceEvent.toObject(m.mdpCmdWaitPingpong, o);
                    if (o.oneofs)
                        d.event = "mdpCmdWaitPingpong";
                }
                if (m.mdpPerfPrefillCalc != null && m.hasOwnProperty("mdpPerfPrefillCalc")) {
                    d.mdpPerfPrefillCalc = $root.perfetto.protos.MdpPerfPrefillCalcFtraceEvent.toObject(m.mdpPerfPrefillCalc, o);
                    if (o.oneofs)
                        d.event = "mdpPerfPrefillCalc";
                }
                if (m.mdpPerfUpdateBus != null && m.hasOwnProperty("mdpPerfUpdateBus")) {
                    d.mdpPerfUpdateBus = $root.perfetto.protos.MdpPerfUpdateBusFtraceEvent.toObject(m.mdpPerfUpdateBus, o);
                    if (o.oneofs)
                        d.event = "mdpPerfUpdateBus";
                }
                if (m.rotatorBwAoAsContext != null && m.hasOwnProperty("rotatorBwAoAsContext")) {
                    d.rotatorBwAoAsContext = $root.perfetto.protos.RotatorBwAoAsContextFtraceEvent.toObject(m.rotatorBwAoAsContext, o);
                    if (o.oneofs)
                        d.event = "rotatorBwAoAsContext";
                }
                if (m.mmFilemapAddToPageCache != null && m.hasOwnProperty("mmFilemapAddToPageCache")) {
                    d.mmFilemapAddToPageCache = $root.perfetto.protos.MmFilemapAddToPageCacheFtraceEvent.toObject(m.mmFilemapAddToPageCache, o);
                    if (o.oneofs)
                        d.event = "mmFilemapAddToPageCache";
                }
                if (m.mmFilemapDeleteFromPageCache != null && m.hasOwnProperty("mmFilemapDeleteFromPageCache")) {
                    d.mmFilemapDeleteFromPageCache = $root.perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent.toObject(m.mmFilemapDeleteFromPageCache, o);
                    if (o.oneofs)
                        d.event = "mmFilemapDeleteFromPageCache";
                }
                if (m.mmCompactionBegin != null && m.hasOwnProperty("mmCompactionBegin")) {
                    d.mmCompactionBegin = $root.perfetto.protos.MmCompactionBeginFtraceEvent.toObject(m.mmCompactionBegin, o);
                    if (o.oneofs)
                        d.event = "mmCompactionBegin";
                }
                if (m.mmCompactionDeferCompaction != null && m.hasOwnProperty("mmCompactionDeferCompaction")) {
                    d.mmCompactionDeferCompaction = $root.perfetto.protos.MmCompactionDeferCompactionFtraceEvent.toObject(m.mmCompactionDeferCompaction, o);
                    if (o.oneofs)
                        d.event = "mmCompactionDeferCompaction";
                }
                if (m.mmCompactionDeferred != null && m.hasOwnProperty("mmCompactionDeferred")) {
                    d.mmCompactionDeferred = $root.perfetto.protos.MmCompactionDeferredFtraceEvent.toObject(m.mmCompactionDeferred, o);
                    if (o.oneofs)
                        d.event = "mmCompactionDeferred";
                }
                if (m.mmCompactionDeferReset != null && m.hasOwnProperty("mmCompactionDeferReset")) {
                    d.mmCompactionDeferReset = $root.perfetto.protos.MmCompactionDeferResetFtraceEvent.toObject(m.mmCompactionDeferReset, o);
                    if (o.oneofs)
                        d.event = "mmCompactionDeferReset";
                }
                if (m.mmCompactionEnd != null && m.hasOwnProperty("mmCompactionEnd")) {
                    d.mmCompactionEnd = $root.perfetto.protos.MmCompactionEndFtraceEvent.toObject(m.mmCompactionEnd, o);
                    if (o.oneofs)
                        d.event = "mmCompactionEnd";
                }
                if (m.mmCompactionFinished != null && m.hasOwnProperty("mmCompactionFinished")) {
                    d.mmCompactionFinished = $root.perfetto.protos.MmCompactionFinishedFtraceEvent.toObject(m.mmCompactionFinished, o);
                    if (o.oneofs)
                        d.event = "mmCompactionFinished";
                }
                if (m.mmCompactionIsolateFreepages != null && m.hasOwnProperty("mmCompactionIsolateFreepages")) {
                    d.mmCompactionIsolateFreepages = $root.perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent.toObject(m.mmCompactionIsolateFreepages, o);
                    if (o.oneofs)
                        d.event = "mmCompactionIsolateFreepages";
                }
                if (m.mmCompactionIsolateMigratepages != null && m.hasOwnProperty("mmCompactionIsolateMigratepages")) {
                    d.mmCompactionIsolateMigratepages = $root.perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent.toObject(m.mmCompactionIsolateMigratepages, o);
                    if (o.oneofs)
                        d.event = "mmCompactionIsolateMigratepages";
                }
                if (m.mmCompactionKcompactdSleep != null && m.hasOwnProperty("mmCompactionKcompactdSleep")) {
                    d.mmCompactionKcompactdSleep = $root.perfetto.protos.MmCompactionKcompactdSleepFtraceEvent.toObject(m.mmCompactionKcompactdSleep, o);
                    if (o.oneofs)
                        d.event = "mmCompactionKcompactdSleep";
                }
                if (m.mmCompactionKcompactdWake != null && m.hasOwnProperty("mmCompactionKcompactdWake")) {
                    d.mmCompactionKcompactdWake = $root.perfetto.protos.MmCompactionKcompactdWakeFtraceEvent.toObject(m.mmCompactionKcompactdWake, o);
                    if (o.oneofs)
                        d.event = "mmCompactionKcompactdWake";
                }
                if (m.mmCompactionMigratepages != null && m.hasOwnProperty("mmCompactionMigratepages")) {
                    d.mmCompactionMigratepages = $root.perfetto.protos.MmCompactionMigratepagesFtraceEvent.toObject(m.mmCompactionMigratepages, o);
                    if (o.oneofs)
                        d.event = "mmCompactionMigratepages";
                }
                if (m.mmCompactionSuitable != null && m.hasOwnProperty("mmCompactionSuitable")) {
                    d.mmCompactionSuitable = $root.perfetto.protos.MmCompactionSuitableFtraceEvent.toObject(m.mmCompactionSuitable, o);
                    if (o.oneofs)
                        d.event = "mmCompactionSuitable";
                }
                if (m.mmCompactionTryToCompactPages != null && m.hasOwnProperty("mmCompactionTryToCompactPages")) {
                    d.mmCompactionTryToCompactPages = $root.perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent.toObject(m.mmCompactionTryToCompactPages, o);
                    if (o.oneofs)
                        d.event = "mmCompactionTryToCompactPages";
                }
                if (m.mmCompactionWakeupKcompactd != null && m.hasOwnProperty("mmCompactionWakeupKcompactd")) {
                    d.mmCompactionWakeupKcompactd = $root.perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent.toObject(m.mmCompactionWakeupKcompactd, o);
                    if (o.oneofs)
                        d.event = "mmCompactionWakeupKcompactd";
                }
                if (m.suspendResume != null && m.hasOwnProperty("suspendResume")) {
                    d.suspendResume = $root.perfetto.protos.SuspendResumeFtraceEvent.toObject(m.suspendResume, o);
                    if (o.oneofs)
                        d.event = "suspendResume";
                }
                if (m.schedWakeupNew != null && m.hasOwnProperty("schedWakeupNew")) {
                    d.schedWakeupNew = $root.perfetto.protos.SchedWakeupNewFtraceEvent.toObject(m.schedWakeupNew, o);
                    if (o.oneofs)
                        d.event = "schedWakeupNew";
                }
                if (m.blockBioBackmerge != null && m.hasOwnProperty("blockBioBackmerge")) {
                    d.blockBioBackmerge = $root.perfetto.protos.BlockBioBackmergeFtraceEvent.toObject(m.blockBioBackmerge, o);
                    if (o.oneofs)
                        d.event = "blockBioBackmerge";
                }
                if (m.blockBioBounce != null && m.hasOwnProperty("blockBioBounce")) {
                    d.blockBioBounce = $root.perfetto.protos.BlockBioBounceFtraceEvent.toObject(m.blockBioBounce, o);
                    if (o.oneofs)
                        d.event = "blockBioBounce";
                }
                if (m.blockBioComplete != null && m.hasOwnProperty("blockBioComplete")) {
                    d.blockBioComplete = $root.perfetto.protos.BlockBioCompleteFtraceEvent.toObject(m.blockBioComplete, o);
                    if (o.oneofs)
                        d.event = "blockBioComplete";
                }
                if (m.blockBioFrontmerge != null && m.hasOwnProperty("blockBioFrontmerge")) {
                    d.blockBioFrontmerge = $root.perfetto.protos.BlockBioFrontmergeFtraceEvent.toObject(m.blockBioFrontmerge, o);
                    if (o.oneofs)
                        d.event = "blockBioFrontmerge";
                }
                if (m.blockBioQueue != null && m.hasOwnProperty("blockBioQueue")) {
                    d.blockBioQueue = $root.perfetto.protos.BlockBioQueueFtraceEvent.toObject(m.blockBioQueue, o);
                    if (o.oneofs)
                        d.event = "blockBioQueue";
                }
                if (m.blockBioRemap != null && m.hasOwnProperty("blockBioRemap")) {
                    d.blockBioRemap = $root.perfetto.protos.BlockBioRemapFtraceEvent.toObject(m.blockBioRemap, o);
                    if (o.oneofs)
                        d.event = "blockBioRemap";
                }
                if (m.blockDirtyBuffer != null && m.hasOwnProperty("blockDirtyBuffer")) {
                    d.blockDirtyBuffer = $root.perfetto.protos.BlockDirtyBufferFtraceEvent.toObject(m.blockDirtyBuffer, o);
                    if (o.oneofs)
                        d.event = "blockDirtyBuffer";
                }
                if (m.blockGetrq != null && m.hasOwnProperty("blockGetrq")) {
                    d.blockGetrq = $root.perfetto.protos.BlockGetrqFtraceEvent.toObject(m.blockGetrq, o);
                    if (o.oneofs)
                        d.event = "blockGetrq";
                }
                if (m.blockPlug != null && m.hasOwnProperty("blockPlug")) {
                    d.blockPlug = $root.perfetto.protos.BlockPlugFtraceEvent.toObject(m.blockPlug, o);
                    if (o.oneofs)
                        d.event = "blockPlug";
                }
                if (m.blockRqAbort != null && m.hasOwnProperty("blockRqAbort")) {
                    d.blockRqAbort = $root.perfetto.protos.BlockRqAbortFtraceEvent.toObject(m.blockRqAbort, o);
                    if (o.oneofs)
                        d.event = "blockRqAbort";
                }
                if (m.blockRqComplete != null && m.hasOwnProperty("blockRqComplete")) {
                    d.blockRqComplete = $root.perfetto.protos.BlockRqCompleteFtraceEvent.toObject(m.blockRqComplete, o);
                    if (o.oneofs)
                        d.event = "blockRqComplete";
                }
                if (m.blockRqInsert != null && m.hasOwnProperty("blockRqInsert")) {
                    d.blockRqInsert = $root.perfetto.protos.BlockRqInsertFtraceEvent.toObject(m.blockRqInsert, o);
                    if (o.oneofs)
                        d.event = "blockRqInsert";
                }
                if (m.blockRqRemap != null && m.hasOwnProperty("blockRqRemap")) {
                    d.blockRqRemap = $root.perfetto.protos.BlockRqRemapFtraceEvent.toObject(m.blockRqRemap, o);
                    if (o.oneofs)
                        d.event = "blockRqRemap";
                }
                if (m.blockRqRequeue != null && m.hasOwnProperty("blockRqRequeue")) {
                    d.blockRqRequeue = $root.perfetto.protos.BlockRqRequeueFtraceEvent.toObject(m.blockRqRequeue, o);
                    if (o.oneofs)
                        d.event = "blockRqRequeue";
                }
                if (m.blockSleeprq != null && m.hasOwnProperty("blockSleeprq")) {
                    d.blockSleeprq = $root.perfetto.protos.BlockSleeprqFtraceEvent.toObject(m.blockSleeprq, o);
                    if (o.oneofs)
                        d.event = "blockSleeprq";
                }
                if (m.blockSplit != null && m.hasOwnProperty("blockSplit")) {
                    d.blockSplit = $root.perfetto.protos.BlockSplitFtraceEvent.toObject(m.blockSplit, o);
                    if (o.oneofs)
                        d.event = "blockSplit";
                }
                if (m.blockTouchBuffer != null && m.hasOwnProperty("blockTouchBuffer")) {
                    d.blockTouchBuffer = $root.perfetto.protos.BlockTouchBufferFtraceEvent.toObject(m.blockTouchBuffer, o);
                    if (o.oneofs)
                        d.event = "blockTouchBuffer";
                }
                if (m.blockUnplug != null && m.hasOwnProperty("blockUnplug")) {
                    d.blockUnplug = $root.perfetto.protos.BlockUnplugFtraceEvent.toObject(m.blockUnplug, o);
                    if (o.oneofs)
                        d.event = "blockUnplug";
                }
                if (m.ext4AllocDaBlocks != null && m.hasOwnProperty("ext4AllocDaBlocks")) {
                    d.ext4AllocDaBlocks = $root.perfetto.protos.Ext4AllocDaBlocksFtraceEvent.toObject(m.ext4AllocDaBlocks, o);
                    if (o.oneofs)
                        d.event = "ext4AllocDaBlocks";
                }
                if (m.ext4AllocateBlocks != null && m.hasOwnProperty("ext4AllocateBlocks")) {
                    d.ext4AllocateBlocks = $root.perfetto.protos.Ext4AllocateBlocksFtraceEvent.toObject(m.ext4AllocateBlocks, o);
                    if (o.oneofs)
                        d.event = "ext4AllocateBlocks";
                }
                if (m.ext4AllocateInode != null && m.hasOwnProperty("ext4AllocateInode")) {
                    d.ext4AllocateInode = $root.perfetto.protos.Ext4AllocateInodeFtraceEvent.toObject(m.ext4AllocateInode, o);
                    if (o.oneofs)
                        d.event = "ext4AllocateInode";
                }
                if (m.ext4BeginOrderedTruncate != null && m.hasOwnProperty("ext4BeginOrderedTruncate")) {
                    d.ext4BeginOrderedTruncate = $root.perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent.toObject(m.ext4BeginOrderedTruncate, o);
                    if (o.oneofs)
                        d.event = "ext4BeginOrderedTruncate";
                }
                if (m.ext4CollapseRange != null && m.hasOwnProperty("ext4CollapseRange")) {
                    d.ext4CollapseRange = $root.perfetto.protos.Ext4CollapseRangeFtraceEvent.toObject(m.ext4CollapseRange, o);
                    if (o.oneofs)
                        d.event = "ext4CollapseRange";
                }
                if (m.ext4DaReleaseSpace != null && m.hasOwnProperty("ext4DaReleaseSpace")) {
                    d.ext4DaReleaseSpace = $root.perfetto.protos.Ext4DaReleaseSpaceFtraceEvent.toObject(m.ext4DaReleaseSpace, o);
                    if (o.oneofs)
                        d.event = "ext4DaReleaseSpace";
                }
                if (m.ext4DaReserveSpace != null && m.hasOwnProperty("ext4DaReserveSpace")) {
                    d.ext4DaReserveSpace = $root.perfetto.protos.Ext4DaReserveSpaceFtraceEvent.toObject(m.ext4DaReserveSpace, o);
                    if (o.oneofs)
                        d.event = "ext4DaReserveSpace";
                }
                if (m.ext4DaUpdateReserveSpace != null && m.hasOwnProperty("ext4DaUpdateReserveSpace")) {
                    d.ext4DaUpdateReserveSpace = $root.perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent.toObject(m.ext4DaUpdateReserveSpace, o);
                    if (o.oneofs)
                        d.event = "ext4DaUpdateReserveSpace";
                }
                if (m.ext4DaWritePages != null && m.hasOwnProperty("ext4DaWritePages")) {
                    d.ext4DaWritePages = $root.perfetto.protos.Ext4DaWritePagesFtraceEvent.toObject(m.ext4DaWritePages, o);
                    if (o.oneofs)
                        d.event = "ext4DaWritePages";
                }
                if (m.ext4DaWritePagesExtent != null && m.hasOwnProperty("ext4DaWritePagesExtent")) {
                    d.ext4DaWritePagesExtent = $root.perfetto.protos.Ext4DaWritePagesExtentFtraceEvent.toObject(m.ext4DaWritePagesExtent, o);
                    if (o.oneofs)
                        d.event = "ext4DaWritePagesExtent";
                }
                if (m.ext4Direct_IOEnter != null && m.hasOwnProperty("ext4Direct_IOEnter")) {
                    d.ext4Direct_IOEnter = $root.perfetto.protos.Ext4DirectIOEnterFtraceEvent.toObject(m.ext4Direct_IOEnter, o);
                    if (o.oneofs)
                        d.event = "ext4Direct_IOEnter";
                }
                if (m.ext4Direct_IOExit != null && m.hasOwnProperty("ext4Direct_IOExit")) {
                    d.ext4Direct_IOExit = $root.perfetto.protos.Ext4DirectIOExitFtraceEvent.toObject(m.ext4Direct_IOExit, o);
                    if (o.oneofs)
                        d.event = "ext4Direct_IOExit";
                }
                if (m.ext4DiscardBlocks != null && m.hasOwnProperty("ext4DiscardBlocks")) {
                    d.ext4DiscardBlocks = $root.perfetto.protos.Ext4DiscardBlocksFtraceEvent.toObject(m.ext4DiscardBlocks, o);
                    if (o.oneofs)
                        d.event = "ext4DiscardBlocks";
                }
                if (m.ext4DiscardPreallocations != null && m.hasOwnProperty("ext4DiscardPreallocations")) {
                    d.ext4DiscardPreallocations = $root.perfetto.protos.Ext4DiscardPreallocationsFtraceEvent.toObject(m.ext4DiscardPreallocations, o);
                    if (o.oneofs)
                        d.event = "ext4DiscardPreallocations";
                }
                if (m.ext4DropInode != null && m.hasOwnProperty("ext4DropInode")) {
                    d.ext4DropInode = $root.perfetto.protos.Ext4DropInodeFtraceEvent.toObject(m.ext4DropInode, o);
                    if (o.oneofs)
                        d.event = "ext4DropInode";
                }
                if (m.ext4EsCacheExtent != null && m.hasOwnProperty("ext4EsCacheExtent")) {
                    d.ext4EsCacheExtent = $root.perfetto.protos.Ext4EsCacheExtentFtraceEvent.toObject(m.ext4EsCacheExtent, o);
                    if (o.oneofs)
                        d.event = "ext4EsCacheExtent";
                }
                if (m.ext4EsFindDelayedExtentRangeEnter != null && m.hasOwnProperty("ext4EsFindDelayedExtentRangeEnter")) {
                    d.ext4EsFindDelayedExtentRangeEnter = $root.perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent.toObject(m.ext4EsFindDelayedExtentRangeEnter, o);
                    if (o.oneofs)
                        d.event = "ext4EsFindDelayedExtentRangeEnter";
                }
                if (m.ext4EsFindDelayedExtentRangeExit != null && m.hasOwnProperty("ext4EsFindDelayedExtentRangeExit")) {
                    d.ext4EsFindDelayedExtentRangeExit = $root.perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent.toObject(m.ext4EsFindDelayedExtentRangeExit, o);
                    if (o.oneofs)
                        d.event = "ext4EsFindDelayedExtentRangeExit";
                }
                if (m.ext4EsInsertExtent != null && m.hasOwnProperty("ext4EsInsertExtent")) {
                    d.ext4EsInsertExtent = $root.perfetto.protos.Ext4EsInsertExtentFtraceEvent.toObject(m.ext4EsInsertExtent, o);
                    if (o.oneofs)
                        d.event = "ext4EsInsertExtent";
                }
                if (m.ext4EsLookupExtentEnter != null && m.hasOwnProperty("ext4EsLookupExtentEnter")) {
                    d.ext4EsLookupExtentEnter = $root.perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent.toObject(m.ext4EsLookupExtentEnter, o);
                    if (o.oneofs)
                        d.event = "ext4EsLookupExtentEnter";
                }
                if (m.ext4EsLookupExtentExit != null && m.hasOwnProperty("ext4EsLookupExtentExit")) {
                    d.ext4EsLookupExtentExit = $root.perfetto.protos.Ext4EsLookupExtentExitFtraceEvent.toObject(m.ext4EsLookupExtentExit, o);
                    if (o.oneofs)
                        d.event = "ext4EsLookupExtentExit";
                }
                if (m.ext4EsRemoveExtent != null && m.hasOwnProperty("ext4EsRemoveExtent")) {
                    d.ext4EsRemoveExtent = $root.perfetto.protos.Ext4EsRemoveExtentFtraceEvent.toObject(m.ext4EsRemoveExtent, o);
                    if (o.oneofs)
                        d.event = "ext4EsRemoveExtent";
                }
                if (m.ext4EsShrink != null && m.hasOwnProperty("ext4EsShrink")) {
                    d.ext4EsShrink = $root.perfetto.protos.Ext4EsShrinkFtraceEvent.toObject(m.ext4EsShrink, o);
                    if (o.oneofs)
                        d.event = "ext4EsShrink";
                }
                if (m.ext4EsShrinkCount != null && m.hasOwnProperty("ext4EsShrinkCount")) {
                    d.ext4EsShrinkCount = $root.perfetto.protos.Ext4EsShrinkCountFtraceEvent.toObject(m.ext4EsShrinkCount, o);
                    if (o.oneofs)
                        d.event = "ext4EsShrinkCount";
                }
                if (m.ext4EsShrinkScanEnter != null && m.hasOwnProperty("ext4EsShrinkScanEnter")) {
                    d.ext4EsShrinkScanEnter = $root.perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent.toObject(m.ext4EsShrinkScanEnter, o);
                    if (o.oneofs)
                        d.event = "ext4EsShrinkScanEnter";
                }
                if (m.ext4EsShrinkScanExit != null && m.hasOwnProperty("ext4EsShrinkScanExit")) {
                    d.ext4EsShrinkScanExit = $root.perfetto.protos.Ext4EsShrinkScanExitFtraceEvent.toObject(m.ext4EsShrinkScanExit, o);
                    if (o.oneofs)
                        d.event = "ext4EsShrinkScanExit";
                }
                if (m.ext4EvictInode != null && m.hasOwnProperty("ext4EvictInode")) {
                    d.ext4EvictInode = $root.perfetto.protos.Ext4EvictInodeFtraceEvent.toObject(m.ext4EvictInode, o);
                    if (o.oneofs)
                        d.event = "ext4EvictInode";
                }
                if (m.ext4ExtConvertToInitializedEnter != null && m.hasOwnProperty("ext4ExtConvertToInitializedEnter")) {
                    d.ext4ExtConvertToInitializedEnter = $root.perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent.toObject(m.ext4ExtConvertToInitializedEnter, o);
                    if (o.oneofs)
                        d.event = "ext4ExtConvertToInitializedEnter";
                }
                if (m.ext4ExtConvertToInitializedFastpath != null && m.hasOwnProperty("ext4ExtConvertToInitializedFastpath")) {
                    d.ext4ExtConvertToInitializedFastpath = $root.perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent.toObject(m.ext4ExtConvertToInitializedFastpath, o);
                    if (o.oneofs)
                        d.event = "ext4ExtConvertToInitializedFastpath";
                }
                if (m.ext4ExtHandleUnwrittenExtents != null && m.hasOwnProperty("ext4ExtHandleUnwrittenExtents")) {
                    d.ext4ExtHandleUnwrittenExtents = $root.perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent.toObject(m.ext4ExtHandleUnwrittenExtents, o);
                    if (o.oneofs)
                        d.event = "ext4ExtHandleUnwrittenExtents";
                }
                if (m.ext4ExtInCache != null && m.hasOwnProperty("ext4ExtInCache")) {
                    d.ext4ExtInCache = $root.perfetto.protos.Ext4ExtInCacheFtraceEvent.toObject(m.ext4ExtInCache, o);
                    if (o.oneofs)
                        d.event = "ext4ExtInCache";
                }
                if (m.ext4ExtLoadExtent != null && m.hasOwnProperty("ext4ExtLoadExtent")) {
                    d.ext4ExtLoadExtent = $root.perfetto.protos.Ext4ExtLoadExtentFtraceEvent.toObject(m.ext4ExtLoadExtent, o);
                    if (o.oneofs)
                        d.event = "ext4ExtLoadExtent";
                }
                if (m.ext4ExtMapBlocksEnter != null && m.hasOwnProperty("ext4ExtMapBlocksEnter")) {
                    d.ext4ExtMapBlocksEnter = $root.perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent.toObject(m.ext4ExtMapBlocksEnter, o);
                    if (o.oneofs)
                        d.event = "ext4ExtMapBlocksEnter";
                }
                if (m.ext4ExtMapBlocksExit != null && m.hasOwnProperty("ext4ExtMapBlocksExit")) {
                    d.ext4ExtMapBlocksExit = $root.perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent.toObject(m.ext4ExtMapBlocksExit, o);
                    if (o.oneofs)
                        d.event = "ext4ExtMapBlocksExit";
                }
                if (m.ext4ExtPutInCache != null && m.hasOwnProperty("ext4ExtPutInCache")) {
                    d.ext4ExtPutInCache = $root.perfetto.protos.Ext4ExtPutInCacheFtraceEvent.toObject(m.ext4ExtPutInCache, o);
                    if (o.oneofs)
                        d.event = "ext4ExtPutInCache";
                }
                if (m.ext4ExtRemoveSpace != null && m.hasOwnProperty("ext4ExtRemoveSpace")) {
                    d.ext4ExtRemoveSpace = $root.perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent.toObject(m.ext4ExtRemoveSpace, o);
                    if (o.oneofs)
                        d.event = "ext4ExtRemoveSpace";
                }
                if (m.ext4ExtRemoveSpaceDone != null && m.hasOwnProperty("ext4ExtRemoveSpaceDone")) {
                    d.ext4ExtRemoveSpaceDone = $root.perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent.toObject(m.ext4ExtRemoveSpaceDone, o);
                    if (o.oneofs)
                        d.event = "ext4ExtRemoveSpaceDone";
                }
                if (m.ext4ExtRmIdx != null && m.hasOwnProperty("ext4ExtRmIdx")) {
                    d.ext4ExtRmIdx = $root.perfetto.protos.Ext4ExtRmIdxFtraceEvent.toObject(m.ext4ExtRmIdx, o);
                    if (o.oneofs)
                        d.event = "ext4ExtRmIdx";
                }
                if (m.ext4ExtRmLeaf != null && m.hasOwnProperty("ext4ExtRmLeaf")) {
                    d.ext4ExtRmLeaf = $root.perfetto.protos.Ext4ExtRmLeafFtraceEvent.toObject(m.ext4ExtRmLeaf, o);
                    if (o.oneofs)
                        d.event = "ext4ExtRmLeaf";
                }
                if (m.ext4ExtShowExtent != null && m.hasOwnProperty("ext4ExtShowExtent")) {
                    d.ext4ExtShowExtent = $root.perfetto.protos.Ext4ExtShowExtentFtraceEvent.toObject(m.ext4ExtShowExtent, o);
                    if (o.oneofs)
                        d.event = "ext4ExtShowExtent";
                }
                if (m.ext4FallocateEnter != null && m.hasOwnProperty("ext4FallocateEnter")) {
                    d.ext4FallocateEnter = $root.perfetto.protos.Ext4FallocateEnterFtraceEvent.toObject(m.ext4FallocateEnter, o);
                    if (o.oneofs)
                        d.event = "ext4FallocateEnter";
                }
                if (m.ext4FallocateExit != null && m.hasOwnProperty("ext4FallocateExit")) {
                    d.ext4FallocateExit = $root.perfetto.protos.Ext4FallocateExitFtraceEvent.toObject(m.ext4FallocateExit, o);
                    if (o.oneofs)
                        d.event = "ext4FallocateExit";
                }
                if (m.ext4FindDelallocRange != null && m.hasOwnProperty("ext4FindDelallocRange")) {
                    d.ext4FindDelallocRange = $root.perfetto.protos.Ext4FindDelallocRangeFtraceEvent.toObject(m.ext4FindDelallocRange, o);
                    if (o.oneofs)
                        d.event = "ext4FindDelallocRange";
                }
                if (m.ext4Forget != null && m.hasOwnProperty("ext4Forget")) {
                    d.ext4Forget = $root.perfetto.protos.Ext4ForgetFtraceEvent.toObject(m.ext4Forget, o);
                    if (o.oneofs)
                        d.event = "ext4Forget";
                }
                if (m.ext4FreeBlocks != null && m.hasOwnProperty("ext4FreeBlocks")) {
                    d.ext4FreeBlocks = $root.perfetto.protos.Ext4FreeBlocksFtraceEvent.toObject(m.ext4FreeBlocks, o);
                    if (o.oneofs)
                        d.event = "ext4FreeBlocks";
                }
                if (m.ext4FreeInode != null && m.hasOwnProperty("ext4FreeInode")) {
                    d.ext4FreeInode = $root.perfetto.protos.Ext4FreeInodeFtraceEvent.toObject(m.ext4FreeInode, o);
                    if (o.oneofs)
                        d.event = "ext4FreeInode";
                }
                if (m.ext4GetImpliedClusterAllocExit != null && m.hasOwnProperty("ext4GetImpliedClusterAllocExit")) {
                    d.ext4GetImpliedClusterAllocExit = $root.perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent.toObject(m.ext4GetImpliedClusterAllocExit, o);
                    if (o.oneofs)
                        d.event = "ext4GetImpliedClusterAllocExit";
                }
                if (m.ext4GetReservedClusterAlloc != null && m.hasOwnProperty("ext4GetReservedClusterAlloc")) {
                    d.ext4GetReservedClusterAlloc = $root.perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent.toObject(m.ext4GetReservedClusterAlloc, o);
                    if (o.oneofs)
                        d.event = "ext4GetReservedClusterAlloc";
                }
                if (m.ext4IndMapBlocksEnter != null && m.hasOwnProperty("ext4IndMapBlocksEnter")) {
                    d.ext4IndMapBlocksEnter = $root.perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent.toObject(m.ext4IndMapBlocksEnter, o);
                    if (o.oneofs)
                        d.event = "ext4IndMapBlocksEnter";
                }
                if (m.ext4IndMapBlocksExit != null && m.hasOwnProperty("ext4IndMapBlocksExit")) {
                    d.ext4IndMapBlocksExit = $root.perfetto.protos.Ext4IndMapBlocksExitFtraceEvent.toObject(m.ext4IndMapBlocksExit, o);
                    if (o.oneofs)
                        d.event = "ext4IndMapBlocksExit";
                }
                if (m.ext4InsertRange != null && m.hasOwnProperty("ext4InsertRange")) {
                    d.ext4InsertRange = $root.perfetto.protos.Ext4InsertRangeFtraceEvent.toObject(m.ext4InsertRange, o);
                    if (o.oneofs)
                        d.event = "ext4InsertRange";
                }
                if (m.ext4Invalidatepage != null && m.hasOwnProperty("ext4Invalidatepage")) {
                    d.ext4Invalidatepage = $root.perfetto.protos.Ext4InvalidatepageFtraceEvent.toObject(m.ext4Invalidatepage, o);
                    if (o.oneofs)
                        d.event = "ext4Invalidatepage";
                }
                if (m.ext4JournalStart != null && m.hasOwnProperty("ext4JournalStart")) {
                    d.ext4JournalStart = $root.perfetto.protos.Ext4JournalStartFtraceEvent.toObject(m.ext4JournalStart, o);
                    if (o.oneofs)
                        d.event = "ext4JournalStart";
                }
                if (m.ext4JournalStartReserved != null && m.hasOwnProperty("ext4JournalStartReserved")) {
                    d.ext4JournalStartReserved = $root.perfetto.protos.Ext4JournalStartReservedFtraceEvent.toObject(m.ext4JournalStartReserved, o);
                    if (o.oneofs)
                        d.event = "ext4JournalStartReserved";
                }
                if (m.ext4JournalledInvalidatepage != null && m.hasOwnProperty("ext4JournalledInvalidatepage")) {
                    d.ext4JournalledInvalidatepage = $root.perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent.toObject(m.ext4JournalledInvalidatepage, o);
                    if (o.oneofs)
                        d.event = "ext4JournalledInvalidatepage";
                }
                if (m.ext4JournalledWriteEnd != null && m.hasOwnProperty("ext4JournalledWriteEnd")) {
                    d.ext4JournalledWriteEnd = $root.perfetto.protos.Ext4JournalledWriteEndFtraceEvent.toObject(m.ext4JournalledWriteEnd, o);
                    if (o.oneofs)
                        d.event = "ext4JournalledWriteEnd";
                }
                if (m.ext4LoadInode != null && m.hasOwnProperty("ext4LoadInode")) {
                    d.ext4LoadInode = $root.perfetto.protos.Ext4LoadInodeFtraceEvent.toObject(m.ext4LoadInode, o);
                    if (o.oneofs)
                        d.event = "ext4LoadInode";
                }
                if (m.ext4LoadInodeBitmap != null && m.hasOwnProperty("ext4LoadInodeBitmap")) {
                    d.ext4LoadInodeBitmap = $root.perfetto.protos.Ext4LoadInodeBitmapFtraceEvent.toObject(m.ext4LoadInodeBitmap, o);
                    if (o.oneofs)
                        d.event = "ext4LoadInodeBitmap";
                }
                if (m.ext4MarkInodeDirty != null && m.hasOwnProperty("ext4MarkInodeDirty")) {
                    d.ext4MarkInodeDirty = $root.perfetto.protos.Ext4MarkInodeDirtyFtraceEvent.toObject(m.ext4MarkInodeDirty, o);
                    if (o.oneofs)
                        d.event = "ext4MarkInodeDirty";
                }
                if (m.ext4MbBitmapLoad != null && m.hasOwnProperty("ext4MbBitmapLoad")) {
                    d.ext4MbBitmapLoad = $root.perfetto.protos.Ext4MbBitmapLoadFtraceEvent.toObject(m.ext4MbBitmapLoad, o);
                    if (o.oneofs)
                        d.event = "ext4MbBitmapLoad";
                }
                if (m.ext4MbBuddyBitmapLoad != null && m.hasOwnProperty("ext4MbBuddyBitmapLoad")) {
                    d.ext4MbBuddyBitmapLoad = $root.perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent.toObject(m.ext4MbBuddyBitmapLoad, o);
                    if (o.oneofs)
                        d.event = "ext4MbBuddyBitmapLoad";
                }
                if (m.ext4MbDiscardPreallocations != null && m.hasOwnProperty("ext4MbDiscardPreallocations")) {
                    d.ext4MbDiscardPreallocations = $root.perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent.toObject(m.ext4MbDiscardPreallocations, o);
                    if (o.oneofs)
                        d.event = "ext4MbDiscardPreallocations";
                }
                if (m.ext4MbNewGroupPa != null && m.hasOwnProperty("ext4MbNewGroupPa")) {
                    d.ext4MbNewGroupPa = $root.perfetto.protos.Ext4MbNewGroupPaFtraceEvent.toObject(m.ext4MbNewGroupPa, o);
                    if (o.oneofs)
                        d.event = "ext4MbNewGroupPa";
                }
                if (m.ext4MbNewInodePa != null && m.hasOwnProperty("ext4MbNewInodePa")) {
                    d.ext4MbNewInodePa = $root.perfetto.protos.Ext4MbNewInodePaFtraceEvent.toObject(m.ext4MbNewInodePa, o);
                    if (o.oneofs)
                        d.event = "ext4MbNewInodePa";
                }
                if (m.ext4MbReleaseGroupPa != null && m.hasOwnProperty("ext4MbReleaseGroupPa")) {
                    d.ext4MbReleaseGroupPa = $root.perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent.toObject(m.ext4MbReleaseGroupPa, o);
                    if (o.oneofs)
                        d.event = "ext4MbReleaseGroupPa";
                }
                if (m.ext4MbReleaseInodePa != null && m.hasOwnProperty("ext4MbReleaseInodePa")) {
                    d.ext4MbReleaseInodePa = $root.perfetto.protos.Ext4MbReleaseInodePaFtraceEvent.toObject(m.ext4MbReleaseInodePa, o);
                    if (o.oneofs)
                        d.event = "ext4MbReleaseInodePa";
                }
                if (m.ext4MballocAlloc != null && m.hasOwnProperty("ext4MballocAlloc")) {
                    d.ext4MballocAlloc = $root.perfetto.protos.Ext4MballocAllocFtraceEvent.toObject(m.ext4MballocAlloc, o);
                    if (o.oneofs)
                        d.event = "ext4MballocAlloc";
                }
                if (m.ext4MballocDiscard != null && m.hasOwnProperty("ext4MballocDiscard")) {
                    d.ext4MballocDiscard = $root.perfetto.protos.Ext4MballocDiscardFtraceEvent.toObject(m.ext4MballocDiscard, o);
                    if (o.oneofs)
                        d.event = "ext4MballocDiscard";
                }
                if (m.ext4MballocFree != null && m.hasOwnProperty("ext4MballocFree")) {
                    d.ext4MballocFree = $root.perfetto.protos.Ext4MballocFreeFtraceEvent.toObject(m.ext4MballocFree, o);
                    if (o.oneofs)
                        d.event = "ext4MballocFree";
                }
                if (m.ext4MballocPrealloc != null && m.hasOwnProperty("ext4MballocPrealloc")) {
                    d.ext4MballocPrealloc = $root.perfetto.protos.Ext4MballocPreallocFtraceEvent.toObject(m.ext4MballocPrealloc, o);
                    if (o.oneofs)
                        d.event = "ext4MballocPrealloc";
                }
                if (m.ext4OtherInodeUpdateTime != null && m.hasOwnProperty("ext4OtherInodeUpdateTime")) {
                    d.ext4OtherInodeUpdateTime = $root.perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent.toObject(m.ext4OtherInodeUpdateTime, o);
                    if (o.oneofs)
                        d.event = "ext4OtherInodeUpdateTime";
                }
                if (m.ext4PunchHole != null && m.hasOwnProperty("ext4PunchHole")) {
                    d.ext4PunchHole = $root.perfetto.protos.Ext4PunchHoleFtraceEvent.toObject(m.ext4PunchHole, o);
                    if (o.oneofs)
                        d.event = "ext4PunchHole";
                }
                if (m.ext4ReadBlockBitmapLoad != null && m.hasOwnProperty("ext4ReadBlockBitmapLoad")) {
                    d.ext4ReadBlockBitmapLoad = $root.perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent.toObject(m.ext4ReadBlockBitmapLoad, o);
                    if (o.oneofs)
                        d.event = "ext4ReadBlockBitmapLoad";
                }
                if (m.ext4Readpage != null && m.hasOwnProperty("ext4Readpage")) {
                    d.ext4Readpage = $root.perfetto.protos.Ext4ReadpageFtraceEvent.toObject(m.ext4Readpage, o);
                    if (o.oneofs)
                        d.event = "ext4Readpage";
                }
                if (m.ext4Releasepage != null && m.hasOwnProperty("ext4Releasepage")) {
                    d.ext4Releasepage = $root.perfetto.protos.Ext4ReleasepageFtraceEvent.toObject(m.ext4Releasepage, o);
                    if (o.oneofs)
                        d.event = "ext4Releasepage";
                }
                if (m.ext4RemoveBlocks != null && m.hasOwnProperty("ext4RemoveBlocks")) {
                    d.ext4RemoveBlocks = $root.perfetto.protos.Ext4RemoveBlocksFtraceEvent.toObject(m.ext4RemoveBlocks, o);
                    if (o.oneofs)
                        d.event = "ext4RemoveBlocks";
                }
                if (m.ext4RequestBlocks != null && m.hasOwnProperty("ext4RequestBlocks")) {
                    d.ext4RequestBlocks = $root.perfetto.protos.Ext4RequestBlocksFtraceEvent.toObject(m.ext4RequestBlocks, o);
                    if (o.oneofs)
                        d.event = "ext4RequestBlocks";
                }
                if (m.ext4RequestInode != null && m.hasOwnProperty("ext4RequestInode")) {
                    d.ext4RequestInode = $root.perfetto.protos.Ext4RequestInodeFtraceEvent.toObject(m.ext4RequestInode, o);
                    if (o.oneofs)
                        d.event = "ext4RequestInode";
                }
                if (m.ext4SyncFs != null && m.hasOwnProperty("ext4SyncFs")) {
                    d.ext4SyncFs = $root.perfetto.protos.Ext4SyncFsFtraceEvent.toObject(m.ext4SyncFs, o);
                    if (o.oneofs)
                        d.event = "ext4SyncFs";
                }
                if (m.ext4TrimAllFree != null && m.hasOwnProperty("ext4TrimAllFree")) {
                    d.ext4TrimAllFree = $root.perfetto.protos.Ext4TrimAllFreeFtraceEvent.toObject(m.ext4TrimAllFree, o);
                    if (o.oneofs)
                        d.event = "ext4TrimAllFree";
                }
                if (m.ext4TrimExtent != null && m.hasOwnProperty("ext4TrimExtent")) {
                    d.ext4TrimExtent = $root.perfetto.protos.Ext4TrimExtentFtraceEvent.toObject(m.ext4TrimExtent, o);
                    if (o.oneofs)
                        d.event = "ext4TrimExtent";
                }
                if (m.ext4TruncateEnter != null && m.hasOwnProperty("ext4TruncateEnter")) {
                    d.ext4TruncateEnter = $root.perfetto.protos.Ext4TruncateEnterFtraceEvent.toObject(m.ext4TruncateEnter, o);
                    if (o.oneofs)
                        d.event = "ext4TruncateEnter";
                }
                if (m.ext4TruncateExit != null && m.hasOwnProperty("ext4TruncateExit")) {
                    d.ext4TruncateExit = $root.perfetto.protos.Ext4TruncateExitFtraceEvent.toObject(m.ext4TruncateExit, o);
                    if (o.oneofs)
                        d.event = "ext4TruncateExit";
                }
                if (m.ext4UnlinkEnter != null && m.hasOwnProperty("ext4UnlinkEnter")) {
                    d.ext4UnlinkEnter = $root.perfetto.protos.Ext4UnlinkEnterFtraceEvent.toObject(m.ext4UnlinkEnter, o);
                    if (o.oneofs)
                        d.event = "ext4UnlinkEnter";
                }
                if (m.ext4UnlinkExit != null && m.hasOwnProperty("ext4UnlinkExit")) {
                    d.ext4UnlinkExit = $root.perfetto.protos.Ext4UnlinkExitFtraceEvent.toObject(m.ext4UnlinkExit, o);
                    if (o.oneofs)
                        d.event = "ext4UnlinkExit";
                }
                if (m.ext4WriteBegin != null && m.hasOwnProperty("ext4WriteBegin")) {
                    d.ext4WriteBegin = $root.perfetto.protos.Ext4WriteBeginFtraceEvent.toObject(m.ext4WriteBegin, o);
                    if (o.oneofs)
                        d.event = "ext4WriteBegin";
                }
                if (m.ext4WriteEnd != null && m.hasOwnProperty("ext4WriteEnd")) {
                    d.ext4WriteEnd = $root.perfetto.protos.Ext4WriteEndFtraceEvent.toObject(m.ext4WriteEnd, o);
                    if (o.oneofs)
                        d.event = "ext4WriteEnd";
                }
                if (m.ext4Writepage != null && m.hasOwnProperty("ext4Writepage")) {
                    d.ext4Writepage = $root.perfetto.protos.Ext4WritepageFtraceEvent.toObject(m.ext4Writepage, o);
                    if (o.oneofs)
                        d.event = "ext4Writepage";
                }
                if (m.ext4Writepages != null && m.hasOwnProperty("ext4Writepages")) {
                    d.ext4Writepages = $root.perfetto.protos.Ext4WritepagesFtraceEvent.toObject(m.ext4Writepages, o);
                    if (o.oneofs)
                        d.event = "ext4Writepages";
                }
                if (m.ext4WritepagesResult != null && m.hasOwnProperty("ext4WritepagesResult")) {
                    d.ext4WritepagesResult = $root.perfetto.protos.Ext4WritepagesResultFtraceEvent.toObject(m.ext4WritepagesResult, o);
                    if (o.oneofs)
                        d.event = "ext4WritepagesResult";
                }
                if (m.ext4ZeroRange != null && m.hasOwnProperty("ext4ZeroRange")) {
                    d.ext4ZeroRange = $root.perfetto.protos.Ext4ZeroRangeFtraceEvent.toObject(m.ext4ZeroRange, o);
                    if (o.oneofs)
                        d.event = "ext4ZeroRange";
                }
                if (m.taskNewtask != null && m.hasOwnProperty("taskNewtask")) {
                    d.taskNewtask = $root.perfetto.protos.TaskNewtaskFtraceEvent.toObject(m.taskNewtask, o);
                    if (o.oneofs)
                        d.event = "taskNewtask";
                }
                if (m.taskRename != null && m.hasOwnProperty("taskRename")) {
                    d.taskRename = $root.perfetto.protos.TaskRenameFtraceEvent.toObject(m.taskRename, o);
                    if (o.oneofs)
                        d.event = "taskRename";
                }
                if (m.schedProcessExec != null && m.hasOwnProperty("schedProcessExec")) {
                    d.schedProcessExec = $root.perfetto.protos.SchedProcessExecFtraceEvent.toObject(m.schedProcessExec, o);
                    if (o.oneofs)
                        d.event = "schedProcessExec";
                }
                if (m.schedProcessExit != null && m.hasOwnProperty("schedProcessExit")) {
                    d.schedProcessExit = $root.perfetto.protos.SchedProcessExitFtraceEvent.toObject(m.schedProcessExit, o);
                    if (o.oneofs)
                        d.event = "schedProcessExit";
                }
                if (m.schedProcessFork != null && m.hasOwnProperty("schedProcessFork")) {
                    d.schedProcessFork = $root.perfetto.protos.SchedProcessForkFtraceEvent.toObject(m.schedProcessFork, o);
                    if (o.oneofs)
                        d.event = "schedProcessFork";
                }
                if (m.schedProcessFree != null && m.hasOwnProperty("schedProcessFree")) {
                    d.schedProcessFree = $root.perfetto.protos.SchedProcessFreeFtraceEvent.toObject(m.schedProcessFree, o);
                    if (o.oneofs)
                        d.event = "schedProcessFree";
                }
                if (m.schedProcessHang != null && m.hasOwnProperty("schedProcessHang")) {
                    d.schedProcessHang = $root.perfetto.protos.SchedProcessHangFtraceEvent.toObject(m.schedProcessHang, o);
                    if (o.oneofs)
                        d.event = "schedProcessHang";
                }
                if (m.schedProcessWait != null && m.hasOwnProperty("schedProcessWait")) {
                    d.schedProcessWait = $root.perfetto.protos.SchedProcessWaitFtraceEvent.toObject(m.schedProcessWait, o);
                    if (o.oneofs)
                        d.event = "schedProcessWait";
                }
                if (m.f2fsDoSubmitBio != null && m.hasOwnProperty("f2fsDoSubmitBio")) {
                    d.f2fsDoSubmitBio = $root.perfetto.protos.F2fsDoSubmitBioFtraceEvent.toObject(m.f2fsDoSubmitBio, o);
                    if (o.oneofs)
                        d.event = "f2fsDoSubmitBio";
                }
                if (m.f2fsEvictInode != null && m.hasOwnProperty("f2fsEvictInode")) {
                    d.f2fsEvictInode = $root.perfetto.protos.F2fsEvictInodeFtraceEvent.toObject(m.f2fsEvictInode, o);
                    if (o.oneofs)
                        d.event = "f2fsEvictInode";
                }
                if (m.f2fsFallocate != null && m.hasOwnProperty("f2fsFallocate")) {
                    d.f2fsFallocate = $root.perfetto.protos.F2fsFallocateFtraceEvent.toObject(m.f2fsFallocate, o);
                    if (o.oneofs)
                        d.event = "f2fsFallocate";
                }
                if (m.f2fsGetDataBlock != null && m.hasOwnProperty("f2fsGetDataBlock")) {
                    d.f2fsGetDataBlock = $root.perfetto.protos.F2fsGetDataBlockFtraceEvent.toObject(m.f2fsGetDataBlock, o);
                    if (o.oneofs)
                        d.event = "f2fsGetDataBlock";
                }
                if (m.f2fsGetVictim != null && m.hasOwnProperty("f2fsGetVictim")) {
                    d.f2fsGetVictim = $root.perfetto.protos.F2fsGetVictimFtraceEvent.toObject(m.f2fsGetVictim, o);
                    if (o.oneofs)
                        d.event = "f2fsGetVictim";
                }
                if (m.f2fsIget != null && m.hasOwnProperty("f2fsIget")) {
                    d.f2fsIget = $root.perfetto.protos.F2fsIgetFtraceEvent.toObject(m.f2fsIget, o);
                    if (o.oneofs)
                        d.event = "f2fsIget";
                }
                if (m.f2fsIgetExit != null && m.hasOwnProperty("f2fsIgetExit")) {
                    d.f2fsIgetExit = $root.perfetto.protos.F2fsIgetExitFtraceEvent.toObject(m.f2fsIgetExit, o);
                    if (o.oneofs)
                        d.event = "f2fsIgetExit";
                }
                if (m.f2fsNewInode != null && m.hasOwnProperty("f2fsNewInode")) {
                    d.f2fsNewInode = $root.perfetto.protos.F2fsNewInodeFtraceEvent.toObject(m.f2fsNewInode, o);
                    if (o.oneofs)
                        d.event = "f2fsNewInode";
                }
                if (m.f2fsReadpage != null && m.hasOwnProperty("f2fsReadpage")) {
                    d.f2fsReadpage = $root.perfetto.protos.F2fsReadpageFtraceEvent.toObject(m.f2fsReadpage, o);
                    if (o.oneofs)
                        d.event = "f2fsReadpage";
                }
                if (m.f2fsReserveNewBlock != null && m.hasOwnProperty("f2fsReserveNewBlock")) {
                    d.f2fsReserveNewBlock = $root.perfetto.protos.F2fsReserveNewBlockFtraceEvent.toObject(m.f2fsReserveNewBlock, o);
                    if (o.oneofs)
                        d.event = "f2fsReserveNewBlock";
                }
                if (m.f2fsSetPageDirty != null && m.hasOwnProperty("f2fsSetPageDirty")) {
                    d.f2fsSetPageDirty = $root.perfetto.protos.F2fsSetPageDirtyFtraceEvent.toObject(m.f2fsSetPageDirty, o);
                    if (o.oneofs)
                        d.event = "f2fsSetPageDirty";
                }
                if (m.f2fsSubmitWritePage != null && m.hasOwnProperty("f2fsSubmitWritePage")) {
                    d.f2fsSubmitWritePage = $root.perfetto.protos.F2fsSubmitWritePageFtraceEvent.toObject(m.f2fsSubmitWritePage, o);
                    if (o.oneofs)
                        d.event = "f2fsSubmitWritePage";
                }
                if (m.f2fsSyncFileEnter != null && m.hasOwnProperty("f2fsSyncFileEnter")) {
                    d.f2fsSyncFileEnter = $root.perfetto.protos.F2fsSyncFileEnterFtraceEvent.toObject(m.f2fsSyncFileEnter, o);
                    if (o.oneofs)
                        d.event = "f2fsSyncFileEnter";
                }
                if (m.f2fsSyncFileExit != null && m.hasOwnProperty("f2fsSyncFileExit")) {
                    d.f2fsSyncFileExit = $root.perfetto.protos.F2fsSyncFileExitFtraceEvent.toObject(m.f2fsSyncFileExit, o);
                    if (o.oneofs)
                        d.event = "f2fsSyncFileExit";
                }
                if (m.f2fsSyncFs != null && m.hasOwnProperty("f2fsSyncFs")) {
                    d.f2fsSyncFs = $root.perfetto.protos.F2fsSyncFsFtraceEvent.toObject(m.f2fsSyncFs, o);
                    if (o.oneofs)
                        d.event = "f2fsSyncFs";
                }
                if (m.f2fsTruncate != null && m.hasOwnProperty("f2fsTruncate")) {
                    d.f2fsTruncate = $root.perfetto.protos.F2fsTruncateFtraceEvent.toObject(m.f2fsTruncate, o);
                    if (o.oneofs)
                        d.event = "f2fsTruncate";
                }
                if (m.f2fsTruncateBlocksEnter != null && m.hasOwnProperty("f2fsTruncateBlocksEnter")) {
                    d.f2fsTruncateBlocksEnter = $root.perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent.toObject(m.f2fsTruncateBlocksEnter, o);
                    if (o.oneofs)
                        d.event = "f2fsTruncateBlocksEnter";
                }
                if (m.f2fsTruncateBlocksExit != null && m.hasOwnProperty("f2fsTruncateBlocksExit")) {
                    d.f2fsTruncateBlocksExit = $root.perfetto.protos.F2fsTruncateBlocksExitFtraceEvent.toObject(m.f2fsTruncateBlocksExit, o);
                    if (o.oneofs)
                        d.event = "f2fsTruncateBlocksExit";
                }
                if (m.f2fsTruncateDataBlocksRange != null && m.hasOwnProperty("f2fsTruncateDataBlocksRange")) {
                    d.f2fsTruncateDataBlocksRange = $root.perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent.toObject(m.f2fsTruncateDataBlocksRange, o);
                    if (o.oneofs)
                        d.event = "f2fsTruncateDataBlocksRange";
                }
                if (m.f2fsTruncateInodeBlocksEnter != null && m.hasOwnProperty("f2fsTruncateInodeBlocksEnter")) {
                    d.f2fsTruncateInodeBlocksEnter = $root.perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent.toObject(m.f2fsTruncateInodeBlocksEnter, o);
                    if (o.oneofs)
                        d.event = "f2fsTruncateInodeBlocksEnter";
                }
                if (m.f2fsTruncateInodeBlocksExit != null && m.hasOwnProperty("f2fsTruncateInodeBlocksExit")) {
                    d.f2fsTruncateInodeBlocksExit = $root.perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent.toObject(m.f2fsTruncateInodeBlocksExit, o);
                    if (o.oneofs)
                        d.event = "f2fsTruncateInodeBlocksExit";
                }
                if (m.f2fsTruncateNode != null && m.hasOwnProperty("f2fsTruncateNode")) {
                    d.f2fsTruncateNode = $root.perfetto.protos.F2fsTruncateNodeFtraceEvent.toObject(m.f2fsTruncateNode, o);
                    if (o.oneofs)
                        d.event = "f2fsTruncateNode";
                }
                if (m.f2fsTruncateNodesEnter != null && m.hasOwnProperty("f2fsTruncateNodesEnter")) {
                    d.f2fsTruncateNodesEnter = $root.perfetto.protos.F2fsTruncateNodesEnterFtraceEvent.toObject(m.f2fsTruncateNodesEnter, o);
                    if (o.oneofs)
                        d.event = "f2fsTruncateNodesEnter";
                }
                if (m.f2fsTruncateNodesExit != null && m.hasOwnProperty("f2fsTruncateNodesExit")) {
                    d.f2fsTruncateNodesExit = $root.perfetto.protos.F2fsTruncateNodesExitFtraceEvent.toObject(m.f2fsTruncateNodesExit, o);
                    if (o.oneofs)
                        d.event = "f2fsTruncateNodesExit";
                }
                if (m.f2fsTruncatePartialNodes != null && m.hasOwnProperty("f2fsTruncatePartialNodes")) {
                    d.f2fsTruncatePartialNodes = $root.perfetto.protos.F2fsTruncatePartialNodesFtraceEvent.toObject(m.f2fsTruncatePartialNodes, o);
                    if (o.oneofs)
                        d.event = "f2fsTruncatePartialNodes";
                }
                if (m.f2fsUnlinkEnter != null && m.hasOwnProperty("f2fsUnlinkEnter")) {
                    d.f2fsUnlinkEnter = $root.perfetto.protos.F2fsUnlinkEnterFtraceEvent.toObject(m.f2fsUnlinkEnter, o);
                    if (o.oneofs)
                        d.event = "f2fsUnlinkEnter";
                }
                if (m.f2fsUnlinkExit != null && m.hasOwnProperty("f2fsUnlinkExit")) {
                    d.f2fsUnlinkExit = $root.perfetto.protos.F2fsUnlinkExitFtraceEvent.toObject(m.f2fsUnlinkExit, o);
                    if (o.oneofs)
                        d.event = "f2fsUnlinkExit";
                }
                if (m.f2fsVmPageMkwrite != null && m.hasOwnProperty("f2fsVmPageMkwrite")) {
                    d.f2fsVmPageMkwrite = $root.perfetto.protos.F2fsVmPageMkwriteFtraceEvent.toObject(m.f2fsVmPageMkwrite, o);
                    if (o.oneofs)
                        d.event = "f2fsVmPageMkwrite";
                }
                if (m.f2fsWriteBegin != null && m.hasOwnProperty("f2fsWriteBegin")) {
                    d.f2fsWriteBegin = $root.perfetto.protos.F2fsWriteBeginFtraceEvent.toObject(m.f2fsWriteBegin, o);
                    if (o.oneofs)
                        d.event = "f2fsWriteBegin";
                }
                if (m.f2fsWriteCheckpoint != null && m.hasOwnProperty("f2fsWriteCheckpoint")) {
                    d.f2fsWriteCheckpoint = $root.perfetto.protos.F2fsWriteCheckpointFtraceEvent.toObject(m.f2fsWriteCheckpoint, o);
                    if (o.oneofs)
                        d.event = "f2fsWriteCheckpoint";
                }
                if (m.f2fsWriteEnd != null && m.hasOwnProperty("f2fsWriteEnd")) {
                    d.f2fsWriteEnd = $root.perfetto.protos.F2fsWriteEndFtraceEvent.toObject(m.f2fsWriteEnd, o);
                    if (o.oneofs)
                        d.event = "f2fsWriteEnd";
                }
                if (m.allocPagesIommuEnd != null && m.hasOwnProperty("allocPagesIommuEnd")) {
                    d.allocPagesIommuEnd = $root.perfetto.protos.AllocPagesIommuEndFtraceEvent.toObject(m.allocPagesIommuEnd, o);
                    if (o.oneofs)
                        d.event = "allocPagesIommuEnd";
                }
                if (m.allocPagesIommuFail != null && m.hasOwnProperty("allocPagesIommuFail")) {
                    d.allocPagesIommuFail = $root.perfetto.protos.AllocPagesIommuFailFtraceEvent.toObject(m.allocPagesIommuFail, o);
                    if (o.oneofs)
                        d.event = "allocPagesIommuFail";
                }
                if (m.allocPagesIommuStart != null && m.hasOwnProperty("allocPagesIommuStart")) {
                    d.allocPagesIommuStart = $root.perfetto.protos.AllocPagesIommuStartFtraceEvent.toObject(m.allocPagesIommuStart, o);
                    if (o.oneofs)
                        d.event = "allocPagesIommuStart";
                }
                if (m.allocPagesSysEnd != null && m.hasOwnProperty("allocPagesSysEnd")) {
                    d.allocPagesSysEnd = $root.perfetto.protos.AllocPagesSysEndFtraceEvent.toObject(m.allocPagesSysEnd, o);
                    if (o.oneofs)
                        d.event = "allocPagesSysEnd";
                }
                if (m.allocPagesSysFail != null && m.hasOwnProperty("allocPagesSysFail")) {
                    d.allocPagesSysFail = $root.perfetto.protos.AllocPagesSysFailFtraceEvent.toObject(m.allocPagesSysFail, o);
                    if (o.oneofs)
                        d.event = "allocPagesSysFail";
                }
                if (m.allocPagesSysStart != null && m.hasOwnProperty("allocPagesSysStart")) {
                    d.allocPagesSysStart = $root.perfetto.protos.AllocPagesSysStartFtraceEvent.toObject(m.allocPagesSysStart, o);
                    if (o.oneofs)
                        d.event = "allocPagesSysStart";
                }
                if (m.dmaAllocContiguousRetry != null && m.hasOwnProperty("dmaAllocContiguousRetry")) {
                    d.dmaAllocContiguousRetry = $root.perfetto.protos.DmaAllocContiguousRetryFtraceEvent.toObject(m.dmaAllocContiguousRetry, o);
                    if (o.oneofs)
                        d.event = "dmaAllocContiguousRetry";
                }
                if (m.iommuMapRange != null && m.hasOwnProperty("iommuMapRange")) {
                    d.iommuMapRange = $root.perfetto.protos.IommuMapRangeFtraceEvent.toObject(m.iommuMapRange, o);
                    if (o.oneofs)
                        d.event = "iommuMapRange";
                }
                if (m.iommuSecPtblMapRangeEnd != null && m.hasOwnProperty("iommuSecPtblMapRangeEnd")) {
                    d.iommuSecPtblMapRangeEnd = $root.perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent.toObject(m.iommuSecPtblMapRangeEnd, o);
                    if (o.oneofs)
                        d.event = "iommuSecPtblMapRangeEnd";
                }
                if (m.iommuSecPtblMapRangeStart != null && m.hasOwnProperty("iommuSecPtblMapRangeStart")) {
                    d.iommuSecPtblMapRangeStart = $root.perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent.toObject(m.iommuSecPtblMapRangeStart, o);
                    if (o.oneofs)
                        d.event = "iommuSecPtblMapRangeStart";
                }
                if (m.ionAllocBufferEnd != null && m.hasOwnProperty("ionAllocBufferEnd")) {
                    d.ionAllocBufferEnd = $root.perfetto.protos.IonAllocBufferEndFtraceEvent.toObject(m.ionAllocBufferEnd, o);
                    if (o.oneofs)
                        d.event = "ionAllocBufferEnd";
                }
                if (m.ionAllocBufferFail != null && m.hasOwnProperty("ionAllocBufferFail")) {
                    d.ionAllocBufferFail = $root.perfetto.protos.IonAllocBufferFailFtraceEvent.toObject(m.ionAllocBufferFail, o);
                    if (o.oneofs)
                        d.event = "ionAllocBufferFail";
                }
                if (m.ionAllocBufferFallback != null && m.hasOwnProperty("ionAllocBufferFallback")) {
                    d.ionAllocBufferFallback = $root.perfetto.protos.IonAllocBufferFallbackFtraceEvent.toObject(m.ionAllocBufferFallback, o);
                    if (o.oneofs)
                        d.event = "ionAllocBufferFallback";
                }
                if (m.ionAllocBufferStart != null && m.hasOwnProperty("ionAllocBufferStart")) {
                    d.ionAllocBufferStart = $root.perfetto.protos.IonAllocBufferStartFtraceEvent.toObject(m.ionAllocBufferStart, o);
                    if (o.oneofs)
                        d.event = "ionAllocBufferStart";
                }
                if (m.ionCpAllocRetry != null && m.hasOwnProperty("ionCpAllocRetry")) {
                    d.ionCpAllocRetry = $root.perfetto.protos.IonCpAllocRetryFtraceEvent.toObject(m.ionCpAllocRetry, o);
                    if (o.oneofs)
                        d.event = "ionCpAllocRetry";
                }
                if (m.ionCpSecureBufferEnd != null && m.hasOwnProperty("ionCpSecureBufferEnd")) {
                    d.ionCpSecureBufferEnd = $root.perfetto.protos.IonCpSecureBufferEndFtraceEvent.toObject(m.ionCpSecureBufferEnd, o);
                    if (o.oneofs)
                        d.event = "ionCpSecureBufferEnd";
                }
                if (m.ionCpSecureBufferStart != null && m.hasOwnProperty("ionCpSecureBufferStart")) {
                    d.ionCpSecureBufferStart = $root.perfetto.protos.IonCpSecureBufferStartFtraceEvent.toObject(m.ionCpSecureBufferStart, o);
                    if (o.oneofs)
                        d.event = "ionCpSecureBufferStart";
                }
                if (m.ionPrefetching != null && m.hasOwnProperty("ionPrefetching")) {
                    d.ionPrefetching = $root.perfetto.protos.IonPrefetchingFtraceEvent.toObject(m.ionPrefetching, o);
                    if (o.oneofs)
                        d.event = "ionPrefetching";
                }
                if (m.ionSecureCmaAddToPoolEnd != null && m.hasOwnProperty("ionSecureCmaAddToPoolEnd")) {
                    d.ionSecureCmaAddToPoolEnd = $root.perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent.toObject(m.ionSecureCmaAddToPoolEnd, o);
                    if (o.oneofs)
                        d.event = "ionSecureCmaAddToPoolEnd";
                }
                if (m.ionSecureCmaAddToPoolStart != null && m.hasOwnProperty("ionSecureCmaAddToPoolStart")) {
                    d.ionSecureCmaAddToPoolStart = $root.perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent.toObject(m.ionSecureCmaAddToPoolStart, o);
                    if (o.oneofs)
                        d.event = "ionSecureCmaAddToPoolStart";
                }
                if (m.ionSecureCmaAllocateEnd != null && m.hasOwnProperty("ionSecureCmaAllocateEnd")) {
                    d.ionSecureCmaAllocateEnd = $root.perfetto.protos.IonSecureCmaAllocateEndFtraceEvent.toObject(m.ionSecureCmaAllocateEnd, o);
                    if (o.oneofs)
                        d.event = "ionSecureCmaAllocateEnd";
                }
                if (m.ionSecureCmaAllocateStart != null && m.hasOwnProperty("ionSecureCmaAllocateStart")) {
                    d.ionSecureCmaAllocateStart = $root.perfetto.protos.IonSecureCmaAllocateStartFtraceEvent.toObject(m.ionSecureCmaAllocateStart, o);
                    if (o.oneofs)
                        d.event = "ionSecureCmaAllocateStart";
                }
                if (m.ionSecureCmaShrinkPoolEnd != null && m.hasOwnProperty("ionSecureCmaShrinkPoolEnd")) {
                    d.ionSecureCmaShrinkPoolEnd = $root.perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent.toObject(m.ionSecureCmaShrinkPoolEnd, o);
                    if (o.oneofs)
                        d.event = "ionSecureCmaShrinkPoolEnd";
                }
                if (m.ionSecureCmaShrinkPoolStart != null && m.hasOwnProperty("ionSecureCmaShrinkPoolStart")) {
                    d.ionSecureCmaShrinkPoolStart = $root.perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent.toObject(m.ionSecureCmaShrinkPoolStart, o);
                    if (o.oneofs)
                        d.event = "ionSecureCmaShrinkPoolStart";
                }
                if (m.kfree != null && m.hasOwnProperty("kfree")) {
                    d.kfree = $root.perfetto.protos.KfreeFtraceEvent.toObject(m.kfree, o);
                    if (o.oneofs)
                        d.event = "kfree";
                }
                if (m.kmalloc != null && m.hasOwnProperty("kmalloc")) {
                    d.kmalloc = $root.perfetto.protos.KmallocFtraceEvent.toObject(m.kmalloc, o);
                    if (o.oneofs)
                        d.event = "kmalloc";
                }
                if (m.kmallocNode != null && m.hasOwnProperty("kmallocNode")) {
                    d.kmallocNode = $root.perfetto.protos.KmallocNodeFtraceEvent.toObject(m.kmallocNode, o);
                    if (o.oneofs)
                        d.event = "kmallocNode";
                }
                if (m.kmemCacheAlloc != null && m.hasOwnProperty("kmemCacheAlloc")) {
                    d.kmemCacheAlloc = $root.perfetto.protos.KmemCacheAllocFtraceEvent.toObject(m.kmemCacheAlloc, o);
                    if (o.oneofs)
                        d.event = "kmemCacheAlloc";
                }
                if (m.kmemCacheAllocNode != null && m.hasOwnProperty("kmemCacheAllocNode")) {
                    d.kmemCacheAllocNode = $root.perfetto.protos.KmemCacheAllocNodeFtraceEvent.toObject(m.kmemCacheAllocNode, o);
                    if (o.oneofs)
                        d.event = "kmemCacheAllocNode";
                }
                if (m.kmemCacheFree != null && m.hasOwnProperty("kmemCacheFree")) {
                    d.kmemCacheFree = $root.perfetto.protos.KmemCacheFreeFtraceEvent.toObject(m.kmemCacheFree, o);
                    if (o.oneofs)
                        d.event = "kmemCacheFree";
                }
                if (m.migratePagesEnd != null && m.hasOwnProperty("migratePagesEnd")) {
                    d.migratePagesEnd = $root.perfetto.protos.MigratePagesEndFtraceEvent.toObject(m.migratePagesEnd, o);
                    if (o.oneofs)
                        d.event = "migratePagesEnd";
                }
                if (m.migratePagesStart != null && m.hasOwnProperty("migratePagesStart")) {
                    d.migratePagesStart = $root.perfetto.protos.MigratePagesStartFtraceEvent.toObject(m.migratePagesStart, o);
                    if (o.oneofs)
                        d.event = "migratePagesStart";
                }
                if (m.migrateRetry != null && m.hasOwnProperty("migrateRetry")) {
                    d.migrateRetry = $root.perfetto.protos.MigrateRetryFtraceEvent.toObject(m.migrateRetry, o);
                    if (o.oneofs)
                        d.event = "migrateRetry";
                }
                if (m.mmPageAlloc != null && m.hasOwnProperty("mmPageAlloc")) {
                    d.mmPageAlloc = $root.perfetto.protos.MmPageAllocFtraceEvent.toObject(m.mmPageAlloc, o);
                    if (o.oneofs)
                        d.event = "mmPageAlloc";
                }
                if (m.mmPageAllocExtfrag != null && m.hasOwnProperty("mmPageAllocExtfrag")) {
                    d.mmPageAllocExtfrag = $root.perfetto.protos.MmPageAllocExtfragFtraceEvent.toObject(m.mmPageAllocExtfrag, o);
                    if (o.oneofs)
                        d.event = "mmPageAllocExtfrag";
                }
                if (m.mmPageAllocZoneLocked != null && m.hasOwnProperty("mmPageAllocZoneLocked")) {
                    d.mmPageAllocZoneLocked = $root.perfetto.protos.MmPageAllocZoneLockedFtraceEvent.toObject(m.mmPageAllocZoneLocked, o);
                    if (o.oneofs)
                        d.event = "mmPageAllocZoneLocked";
                }
                if (m.mmPageFree != null && m.hasOwnProperty("mmPageFree")) {
                    d.mmPageFree = $root.perfetto.protos.MmPageFreeFtraceEvent.toObject(m.mmPageFree, o);
                    if (o.oneofs)
                        d.event = "mmPageFree";
                }
                if (m.mmPageFreeBatched != null && m.hasOwnProperty("mmPageFreeBatched")) {
                    d.mmPageFreeBatched = $root.perfetto.protos.MmPageFreeBatchedFtraceEvent.toObject(m.mmPageFreeBatched, o);
                    if (o.oneofs)
                        d.event = "mmPageFreeBatched";
                }
                if (m.mmPagePcpuDrain != null && m.hasOwnProperty("mmPagePcpuDrain")) {
                    d.mmPagePcpuDrain = $root.perfetto.protos.MmPagePcpuDrainFtraceEvent.toObject(m.mmPagePcpuDrain, o);
                    if (o.oneofs)
                        d.event = "mmPagePcpuDrain";
                }
                if (m.rssStat != null && m.hasOwnProperty("rssStat")) {
                    d.rssStat = $root.perfetto.protos.RssStatFtraceEvent.toObject(m.rssStat, o);
                    if (o.oneofs)
                        d.event = "rssStat";
                }
                if (m.ionHeapShrink != null && m.hasOwnProperty("ionHeapShrink")) {
                    d.ionHeapShrink = $root.perfetto.protos.IonHeapShrinkFtraceEvent.toObject(m.ionHeapShrink, o);
                    if (o.oneofs)
                        d.event = "ionHeapShrink";
                }
                if (m.ionHeapGrow != null && m.hasOwnProperty("ionHeapGrow")) {
                    d.ionHeapGrow = $root.perfetto.protos.IonHeapGrowFtraceEvent.toObject(m.ionHeapGrow, o);
                    if (o.oneofs)
                        d.event = "ionHeapGrow";
                }
                if (m.fenceInit != null && m.hasOwnProperty("fenceInit")) {
                    d.fenceInit = $root.perfetto.protos.FenceInitFtraceEvent.toObject(m.fenceInit, o);
                    if (o.oneofs)
                        d.event = "fenceInit";
                }
                if (m.fenceDestroy != null && m.hasOwnProperty("fenceDestroy")) {
                    d.fenceDestroy = $root.perfetto.protos.FenceDestroyFtraceEvent.toObject(m.fenceDestroy, o);
                    if (o.oneofs)
                        d.event = "fenceDestroy";
                }
                if (m.fenceEnableSignal != null && m.hasOwnProperty("fenceEnableSignal")) {
                    d.fenceEnableSignal = $root.perfetto.protos.FenceEnableSignalFtraceEvent.toObject(m.fenceEnableSignal, o);
                    if (o.oneofs)
                        d.event = "fenceEnableSignal";
                }
                if (m.fenceSignaled != null && m.hasOwnProperty("fenceSignaled")) {
                    d.fenceSignaled = $root.perfetto.protos.FenceSignaledFtraceEvent.toObject(m.fenceSignaled, o);
                    if (o.oneofs)
                        d.event = "fenceSignaled";
                }
                if (m.clkEnable != null && m.hasOwnProperty("clkEnable")) {
                    d.clkEnable = $root.perfetto.protos.ClkEnableFtraceEvent.toObject(m.clkEnable, o);
                    if (o.oneofs)
                        d.event = "clkEnable";
                }
                if (m.clkDisable != null && m.hasOwnProperty("clkDisable")) {
                    d.clkDisable = $root.perfetto.protos.ClkDisableFtraceEvent.toObject(m.clkDisable, o);
                    if (o.oneofs)
                        d.event = "clkDisable";
                }
                if (m.clkSetRate != null && m.hasOwnProperty("clkSetRate")) {
                    d.clkSetRate = $root.perfetto.protos.ClkSetRateFtraceEvent.toObject(m.clkSetRate, o);
                    if (o.oneofs)
                        d.event = "clkSetRate";
                }
                if (m.binderTransactionAllocBuf != null && m.hasOwnProperty("binderTransactionAllocBuf")) {
                    d.binderTransactionAllocBuf = $root.perfetto.protos.BinderTransactionAllocBufFtraceEvent.toObject(m.binderTransactionAllocBuf, o);
                    if (o.oneofs)
                        d.event = "binderTransactionAllocBuf";
                }
                if (m.signalDeliver != null && m.hasOwnProperty("signalDeliver")) {
                    d.signalDeliver = $root.perfetto.protos.SignalDeliverFtraceEvent.toObject(m.signalDeliver, o);
                    if (o.oneofs)
                        d.event = "signalDeliver";
                }
                if (m.signalGenerate != null && m.hasOwnProperty("signalGenerate")) {
                    d.signalGenerate = $root.perfetto.protos.SignalGenerateFtraceEvent.toObject(m.signalGenerate, o);
                    if (o.oneofs)
                        d.event = "signalGenerate";
                }
                if (m.oomScoreAdjUpdate != null && m.hasOwnProperty("oomScoreAdjUpdate")) {
                    d.oomScoreAdjUpdate = $root.perfetto.protos.OomScoreAdjUpdateFtraceEvent.toObject(m.oomScoreAdjUpdate, o);
                    if (o.oneofs)
                        d.event = "oomScoreAdjUpdate";
                }
                if (m.generic != null && m.hasOwnProperty("generic")) {
                    d.generic = $root.perfetto.protos.GenericFtraceEvent.toObject(m.generic, o);
                    if (o.oneofs)
                        d.event = "generic";
                }
                if (m.mmEventRecord != null && m.hasOwnProperty("mmEventRecord")) {
                    d.mmEventRecord = $root.perfetto.protos.MmEventRecordFtraceEvent.toObject(m.mmEventRecord, o);
                    if (o.oneofs)
                        d.event = "mmEventRecord";
                }
                if (m.sysEnter != null && m.hasOwnProperty("sysEnter")) {
                    d.sysEnter = $root.perfetto.protos.SysEnterFtraceEvent.toObject(m.sysEnter, o);
                    if (o.oneofs)
                        d.event = "sysEnter";
                }
                if (m.sysExit != null && m.hasOwnProperty("sysExit")) {
                    d.sysExit = $root.perfetto.protos.SysExitFtraceEvent.toObject(m.sysExit, o);
                    if (o.oneofs)
                        d.event = "sysExit";
                }
                if (m.zero != null && m.hasOwnProperty("zero")) {
                    d.zero = $root.perfetto.protos.ZeroFtraceEvent.toObject(m.zero, o);
                    if (o.oneofs)
                        d.event = "zero";
                }
                if (m.gpuFrequency != null && m.hasOwnProperty("gpuFrequency")) {
                    d.gpuFrequency = $root.perfetto.protos.GpuFrequencyFtraceEvent.toObject(m.gpuFrequency, o);
                    if (o.oneofs)
                        d.event = "gpuFrequency";
                }
                if (m.sdeTracingMarkWrite != null && m.hasOwnProperty("sdeTracingMarkWrite")) {
                    d.sdeTracingMarkWrite = $root.perfetto.protos.SdeTracingMarkWriteFtraceEvent.toObject(m.sdeTracingMarkWrite, o);
                    if (o.oneofs)
                        d.event = "sdeTracingMarkWrite";
                }
                if (m.markVictim != null && m.hasOwnProperty("markVictim")) {
                    d.markVictim = $root.perfetto.protos.MarkVictimFtraceEvent.toObject(m.markVictim, o);
                    if (o.oneofs)
                        d.event = "markVictim";
                }
                if (m.ionStat != null && m.hasOwnProperty("ionStat")) {
                    d.ionStat = $root.perfetto.protos.IonStatFtraceEvent.toObject(m.ionStat, o);
                    if (o.oneofs)
                        d.event = "ionStat";
                }
                if (m.ionBufferCreate != null && m.hasOwnProperty("ionBufferCreate")) {
                    d.ionBufferCreate = $root.perfetto.protos.IonBufferCreateFtraceEvent.toObject(m.ionBufferCreate, o);
                    if (o.oneofs)
                        d.event = "ionBufferCreate";
                }
                if (m.ionBufferDestroy != null && m.hasOwnProperty("ionBufferDestroy")) {
                    d.ionBufferDestroy = $root.perfetto.protos.IonBufferDestroyFtraceEvent.toObject(m.ionBufferDestroy, o);
                    if (o.oneofs)
                        d.event = "ionBufferDestroy";
                }
                if (m.scmCallStart != null && m.hasOwnProperty("scmCallStart")) {
                    d.scmCallStart = $root.perfetto.protos.ScmCallStartFtraceEvent.toObject(m.scmCallStart, o);
                    if (o.oneofs)
                        d.event = "scmCallStart";
                }
                if (m.scmCallEnd != null && m.hasOwnProperty("scmCallEnd")) {
                    d.scmCallEnd = $root.perfetto.protos.ScmCallEndFtraceEvent.toObject(m.scmCallEnd, o);
                    if (o.oneofs)
                        d.event = "scmCallEnd";
                }
                if (m.gpuMemTotal != null && m.hasOwnProperty("gpuMemTotal")) {
                    d.gpuMemTotal = $root.perfetto.protos.GpuMemTotalFtraceEvent.toObject(m.gpuMemTotal, o);
                    if (o.oneofs)
                        d.event = "gpuMemTotal";
                }
                if (m.thermalTemperature != null && m.hasOwnProperty("thermalTemperature")) {
                    d.thermalTemperature = $root.perfetto.protos.ThermalTemperatureFtraceEvent.toObject(m.thermalTemperature, o);
                    if (o.oneofs)
                        d.event = "thermalTemperature";
                }
                if (m.cdevUpdate != null && m.hasOwnProperty("cdevUpdate")) {
                    d.cdevUpdate = $root.perfetto.protos.CdevUpdateFtraceEvent.toObject(m.cdevUpdate, o);
                    if (o.oneofs)
                        d.event = "cdevUpdate";
                }
                if (m.cpuhpExit != null && m.hasOwnProperty("cpuhpExit")) {
                    d.cpuhpExit = $root.perfetto.protos.CpuhpExitFtraceEvent.toObject(m.cpuhpExit, o);
                    if (o.oneofs)
                        d.event = "cpuhpExit";
                }
                if (m.cpuhpMultiEnter != null && m.hasOwnProperty("cpuhpMultiEnter")) {
                    d.cpuhpMultiEnter = $root.perfetto.protos.CpuhpMultiEnterFtraceEvent.toObject(m.cpuhpMultiEnter, o);
                    if (o.oneofs)
                        d.event = "cpuhpMultiEnter";
                }
                if (m.cpuhpEnter != null && m.hasOwnProperty("cpuhpEnter")) {
                    d.cpuhpEnter = $root.perfetto.protos.CpuhpEnterFtraceEvent.toObject(m.cpuhpEnter, o);
                    if (o.oneofs)
                        d.event = "cpuhpEnter";
                }
                if (m.cpuhpLatency != null && m.hasOwnProperty("cpuhpLatency")) {
                    d.cpuhpLatency = $root.perfetto.protos.CpuhpLatencyFtraceEvent.toObject(m.cpuhpLatency, o);
                    if (o.oneofs)
                        d.event = "cpuhpLatency";
                }
                if (m.fastrpcDmaStat != null && m.hasOwnProperty("fastrpcDmaStat")) {
                    d.fastrpcDmaStat = $root.perfetto.protos.FastrpcDmaStatFtraceEvent.toObject(m.fastrpcDmaStat, o);
                    if (o.oneofs)
                        d.event = "fastrpcDmaStat";
                }
                if (m.dpuTracingMarkWrite != null && m.hasOwnProperty("dpuTracingMarkWrite")) {
                    d.dpuTracingMarkWrite = $root.perfetto.protos.DpuTracingMarkWriteFtraceEvent.toObject(m.dpuTracingMarkWrite, o);
                    if (o.oneofs)
                        d.event = "dpuTracingMarkWrite";
                }
                if (m.g2dTracingMarkWrite != null && m.hasOwnProperty("g2dTracingMarkWrite")) {
                    d.g2dTracingMarkWrite = $root.perfetto.protos.G2dTracingMarkWriteFtraceEvent.toObject(m.g2dTracingMarkWrite, o);
                    if (o.oneofs)
                        d.event = "g2dTracingMarkWrite";
                }
                if (m.maliTracingMarkWrite != null && m.hasOwnProperty("maliTracingMarkWrite")) {
                    d.maliTracingMarkWrite = $root.perfetto.protos.MaliTracingMarkWriteFtraceEvent.toObject(m.maliTracingMarkWrite, o);
                    if (o.oneofs)
                        d.event = "maliTracingMarkWrite";
                }
                if (m.dmaHeapStat != null && m.hasOwnProperty("dmaHeapStat")) {
                    d.dmaHeapStat = $root.perfetto.protos.DmaHeapStatFtraceEvent.toObject(m.dmaHeapStat, o);
                    if (o.oneofs)
                        d.event = "dmaHeapStat";
                }
                if (m.cpuhpPause != null && m.hasOwnProperty("cpuhpPause")) {
                    d.cpuhpPause = $root.perfetto.protos.CpuhpPauseFtraceEvent.toObject(m.cpuhpPause, o);
                    if (o.oneofs)
                        d.event = "cpuhpPause";
                }
                if (m.schedPiSetprio != null && m.hasOwnProperty("schedPiSetprio")) {
                    d.schedPiSetprio = $root.perfetto.protos.SchedPiSetprioFtraceEvent.toObject(m.schedPiSetprio, o);
                    if (o.oneofs)
                        d.event = "schedPiSetprio";
                }
                if (m.sdeSdeEvtlog != null && m.hasOwnProperty("sdeSdeEvtlog")) {
                    d.sdeSdeEvtlog = $root.perfetto.protos.SdeSdeEvtlogFtraceEvent.toObject(m.sdeSdeEvtlog, o);
                    if (o.oneofs)
                        d.event = "sdeSdeEvtlog";
                }
                if (m.sdeSdePerfCalcCrtc != null && m.hasOwnProperty("sdeSdePerfCalcCrtc")) {
                    d.sdeSdePerfCalcCrtc = $root.perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent.toObject(m.sdeSdePerfCalcCrtc, o);
                    if (o.oneofs)
                        d.event = "sdeSdePerfCalcCrtc";
                }
                if (m.sdeSdePerfCrtcUpdate != null && m.hasOwnProperty("sdeSdePerfCrtcUpdate")) {
                    d.sdeSdePerfCrtcUpdate = $root.perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent.toObject(m.sdeSdePerfCrtcUpdate, o);
                    if (o.oneofs)
                        d.event = "sdeSdePerfCrtcUpdate";
                }
                if (m.sdeSdePerfSetQosLuts != null && m.hasOwnProperty("sdeSdePerfSetQosLuts")) {
                    d.sdeSdePerfSetQosLuts = $root.perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent.toObject(m.sdeSdePerfSetQosLuts, o);
                    if (o.oneofs)
                        d.event = "sdeSdePerfSetQosLuts";
                }
                if (m.sdeSdePerfUpdateBus != null && m.hasOwnProperty("sdeSdePerfUpdateBus")) {
                    d.sdeSdePerfUpdateBus = $root.perfetto.protos.SdeSdePerfUpdateBusFtraceEvent.toObject(m.sdeSdePerfUpdateBus, o);
                    if (o.oneofs)
                        d.event = "sdeSdePerfUpdateBus";
                }
                if (m.rssStatThrottled != null && m.hasOwnProperty("rssStatThrottled")) {
                    d.rssStatThrottled = $root.perfetto.protos.RssStatThrottledFtraceEvent.toObject(m.rssStatThrottled, o);
                    if (o.oneofs)
                        d.event = "rssStatThrottled";
                }
                if (m.netifReceiveSkb != null && m.hasOwnProperty("netifReceiveSkb")) {
                    d.netifReceiveSkb = $root.perfetto.protos.NetifReceiveSkbFtraceEvent.toObject(m.netifReceiveSkb, o);
                    if (o.oneofs)
                        d.event = "netifReceiveSkb";
                }
                if (m.netDevXmit != null && m.hasOwnProperty("netDevXmit")) {
                    d.netDevXmit = $root.perfetto.protos.NetDevXmitFtraceEvent.toObject(m.netDevXmit, o);
                    if (o.oneofs)
                        d.event = "netDevXmit";
                }
                if (m.inetSockSetState != null && m.hasOwnProperty("inetSockSetState")) {
                    d.inetSockSetState = $root.perfetto.protos.InetSockSetStateFtraceEvent.toObject(m.inetSockSetState, o);
                    if (o.oneofs)
                        d.event = "inetSockSetState";
                }
                if (m.tcpRetransmitSkb != null && m.hasOwnProperty("tcpRetransmitSkb")) {
                    d.tcpRetransmitSkb = $root.perfetto.protos.TcpRetransmitSkbFtraceEvent.toObject(m.tcpRetransmitSkb, o);
                    if (o.oneofs)
                        d.event = "tcpRetransmitSkb";
                }
                if (m.crosEcSensorhubData != null && m.hasOwnProperty("crosEcSensorhubData")) {
                    d.crosEcSensorhubData = $root.perfetto.protos.CrosEcSensorhubDataFtraceEvent.toObject(m.crosEcSensorhubData, o);
                    if (o.oneofs)
                        d.event = "crosEcSensorhubData";
                }
                if (m.napiGroReceiveEntry != null && m.hasOwnProperty("napiGroReceiveEntry")) {
                    d.napiGroReceiveEntry = $root.perfetto.protos.NapiGroReceiveEntryFtraceEvent.toObject(m.napiGroReceiveEntry, o);
                    if (o.oneofs)
                        d.event = "napiGroReceiveEntry";
                }
                if (m.napiGroReceiveExit != null && m.hasOwnProperty("napiGroReceiveExit")) {
                    d.napiGroReceiveExit = $root.perfetto.protos.NapiGroReceiveExitFtraceEvent.toObject(m.napiGroReceiveExit, o);
                    if (o.oneofs)
                        d.event = "napiGroReceiveExit";
                }
                if (m.kfreeSkb != null && m.hasOwnProperty("kfreeSkb")) {
                    d.kfreeSkb = $root.perfetto.protos.KfreeSkbFtraceEvent.toObject(m.kfreeSkb, o);
                    if (o.oneofs)
                        d.event = "kfreeSkb";
                }
                if (m.kvmAccessFault != null && m.hasOwnProperty("kvmAccessFault")) {
                    d.kvmAccessFault = $root.perfetto.protos.KvmAccessFaultFtraceEvent.toObject(m.kvmAccessFault, o);
                    if (o.oneofs)
                        d.event = "kvmAccessFault";
                }
                if (m.kvmAckIrq != null && m.hasOwnProperty("kvmAckIrq")) {
                    d.kvmAckIrq = $root.perfetto.protos.KvmAckIrqFtraceEvent.toObject(m.kvmAckIrq, o);
                    if (o.oneofs)
                        d.event = "kvmAckIrq";
                }
                if (m.kvmAgeHva != null && m.hasOwnProperty("kvmAgeHva")) {
                    d.kvmAgeHva = $root.perfetto.protos.KvmAgeHvaFtraceEvent.toObject(m.kvmAgeHva, o);
                    if (o.oneofs)
                        d.event = "kvmAgeHva";
                }
                if (m.kvmAgePage != null && m.hasOwnProperty("kvmAgePage")) {
                    d.kvmAgePage = $root.perfetto.protos.KvmAgePageFtraceEvent.toObject(m.kvmAgePage, o);
                    if (o.oneofs)
                        d.event = "kvmAgePage";
                }
                if (m.kvmArmClearDebug != null && m.hasOwnProperty("kvmArmClearDebug")) {
                    d.kvmArmClearDebug = $root.perfetto.protos.KvmArmClearDebugFtraceEvent.toObject(m.kvmArmClearDebug, o);
                    if (o.oneofs)
                        d.event = "kvmArmClearDebug";
                }
                if (m.kvmArmSetDreg32 != null && m.hasOwnProperty("kvmArmSetDreg32")) {
                    d.kvmArmSetDreg32 = $root.perfetto.protos.KvmArmSetDreg32FtraceEvent.toObject(m.kvmArmSetDreg32, o);
                    if (o.oneofs)
                        d.event = "kvmArmSetDreg32";
                }
                if (m.kvmArmSetRegset != null && m.hasOwnProperty("kvmArmSetRegset")) {
                    d.kvmArmSetRegset = $root.perfetto.protos.KvmArmSetRegsetFtraceEvent.toObject(m.kvmArmSetRegset, o);
                    if (o.oneofs)
                        d.event = "kvmArmSetRegset";
                }
                if (m.kvmArmSetupDebug != null && m.hasOwnProperty("kvmArmSetupDebug")) {
                    d.kvmArmSetupDebug = $root.perfetto.protos.KvmArmSetupDebugFtraceEvent.toObject(m.kvmArmSetupDebug, o);
                    if (o.oneofs)
                        d.event = "kvmArmSetupDebug";
                }
                if (m.kvmEntry != null && m.hasOwnProperty("kvmEntry")) {
                    d.kvmEntry = $root.perfetto.protos.KvmEntryFtraceEvent.toObject(m.kvmEntry, o);
                    if (o.oneofs)
                        d.event = "kvmEntry";
                }
                if (m.kvmExit != null && m.hasOwnProperty("kvmExit")) {
                    d.kvmExit = $root.perfetto.protos.KvmExitFtraceEvent.toObject(m.kvmExit, o);
                    if (o.oneofs)
                        d.event = "kvmExit";
                }
                if (m.kvmFpu != null && m.hasOwnProperty("kvmFpu")) {
                    d.kvmFpu = $root.perfetto.protos.KvmFpuFtraceEvent.toObject(m.kvmFpu, o);
                    if (o.oneofs)
                        d.event = "kvmFpu";
                }
                if (m.kvmGetTimerMap != null && m.hasOwnProperty("kvmGetTimerMap")) {
                    d.kvmGetTimerMap = $root.perfetto.protos.KvmGetTimerMapFtraceEvent.toObject(m.kvmGetTimerMap, o);
                    if (o.oneofs)
                        d.event = "kvmGetTimerMap";
                }
                if (m.kvmGuestFault != null && m.hasOwnProperty("kvmGuestFault")) {
                    d.kvmGuestFault = $root.perfetto.protos.KvmGuestFaultFtraceEvent.toObject(m.kvmGuestFault, o);
                    if (o.oneofs)
                        d.event = "kvmGuestFault";
                }
                if (m.kvmHandleSysReg != null && m.hasOwnProperty("kvmHandleSysReg")) {
                    d.kvmHandleSysReg = $root.perfetto.protos.KvmHandleSysRegFtraceEvent.toObject(m.kvmHandleSysReg, o);
                    if (o.oneofs)
                        d.event = "kvmHandleSysReg";
                }
                if (m.kvmHvcArm64 != null && m.hasOwnProperty("kvmHvcArm64")) {
                    d.kvmHvcArm64 = $root.perfetto.protos.KvmHvcArm64FtraceEvent.toObject(m.kvmHvcArm64, o);
                    if (o.oneofs)
                        d.event = "kvmHvcArm64";
                }
                if (m.kvmIrqLine != null && m.hasOwnProperty("kvmIrqLine")) {
                    d.kvmIrqLine = $root.perfetto.protos.KvmIrqLineFtraceEvent.toObject(m.kvmIrqLine, o);
                    if (o.oneofs)
                        d.event = "kvmIrqLine";
                }
                if (m.kvmMmio != null && m.hasOwnProperty("kvmMmio")) {
                    d.kvmMmio = $root.perfetto.protos.KvmMmioFtraceEvent.toObject(m.kvmMmio, o);
                    if (o.oneofs)
                        d.event = "kvmMmio";
                }
                if (m.kvmMmioEmulate != null && m.hasOwnProperty("kvmMmioEmulate")) {
                    d.kvmMmioEmulate = $root.perfetto.protos.KvmMmioEmulateFtraceEvent.toObject(m.kvmMmioEmulate, o);
                    if (o.oneofs)
                        d.event = "kvmMmioEmulate";
                }
                if (m.kvmSetGuestDebug != null && m.hasOwnProperty("kvmSetGuestDebug")) {
                    d.kvmSetGuestDebug = $root.perfetto.protos.KvmSetGuestDebugFtraceEvent.toObject(m.kvmSetGuestDebug, o);
                    if (o.oneofs)
                        d.event = "kvmSetGuestDebug";
                }
                if (m.kvmSetIrq != null && m.hasOwnProperty("kvmSetIrq")) {
                    d.kvmSetIrq = $root.perfetto.protos.KvmSetIrqFtraceEvent.toObject(m.kvmSetIrq, o);
                    if (o.oneofs)
                        d.event = "kvmSetIrq";
                }
                if (m.kvmSetSpteHva != null && m.hasOwnProperty("kvmSetSpteHva")) {
                    d.kvmSetSpteHva = $root.perfetto.protos.KvmSetSpteHvaFtraceEvent.toObject(m.kvmSetSpteHva, o);
                    if (o.oneofs)
                        d.event = "kvmSetSpteHva";
                }
                if (m.kvmSetWayFlush != null && m.hasOwnProperty("kvmSetWayFlush")) {
                    d.kvmSetWayFlush = $root.perfetto.protos.KvmSetWayFlushFtraceEvent.toObject(m.kvmSetWayFlush, o);
                    if (o.oneofs)
                        d.event = "kvmSetWayFlush";
                }
                if (m.kvmSysAccess != null && m.hasOwnProperty("kvmSysAccess")) {
                    d.kvmSysAccess = $root.perfetto.protos.KvmSysAccessFtraceEvent.toObject(m.kvmSysAccess, o);
                    if (o.oneofs)
                        d.event = "kvmSysAccess";
                }
                if (m.kvmTestAgeHva != null && m.hasOwnProperty("kvmTestAgeHva")) {
                    d.kvmTestAgeHva = $root.perfetto.protos.KvmTestAgeHvaFtraceEvent.toObject(m.kvmTestAgeHva, o);
                    if (o.oneofs)
                        d.event = "kvmTestAgeHva";
                }
                if (m.kvmTimerEmulate != null && m.hasOwnProperty("kvmTimerEmulate")) {
                    d.kvmTimerEmulate = $root.perfetto.protos.KvmTimerEmulateFtraceEvent.toObject(m.kvmTimerEmulate, o);
                    if (o.oneofs)
                        d.event = "kvmTimerEmulate";
                }
                if (m.kvmTimerHrtimerExpire != null && m.hasOwnProperty("kvmTimerHrtimerExpire")) {
                    d.kvmTimerHrtimerExpire = $root.perfetto.protos.KvmTimerHrtimerExpireFtraceEvent.toObject(m.kvmTimerHrtimerExpire, o);
                    if (o.oneofs)
                        d.event = "kvmTimerHrtimerExpire";
                }
                if (m.kvmTimerRestoreState != null && m.hasOwnProperty("kvmTimerRestoreState")) {
                    d.kvmTimerRestoreState = $root.perfetto.protos.KvmTimerRestoreStateFtraceEvent.toObject(m.kvmTimerRestoreState, o);
                    if (o.oneofs)
                        d.event = "kvmTimerRestoreState";
                }
                if (m.kvmTimerSaveState != null && m.hasOwnProperty("kvmTimerSaveState")) {
                    d.kvmTimerSaveState = $root.perfetto.protos.KvmTimerSaveStateFtraceEvent.toObject(m.kvmTimerSaveState, o);
                    if (o.oneofs)
                        d.event = "kvmTimerSaveState";
                }
                if (m.kvmTimerUpdateIrq != null && m.hasOwnProperty("kvmTimerUpdateIrq")) {
                    d.kvmTimerUpdateIrq = $root.perfetto.protos.KvmTimerUpdateIrqFtraceEvent.toObject(m.kvmTimerUpdateIrq, o);
                    if (o.oneofs)
                        d.event = "kvmTimerUpdateIrq";
                }
                if (m.kvmToggleCache != null && m.hasOwnProperty("kvmToggleCache")) {
                    d.kvmToggleCache = $root.perfetto.protos.KvmToggleCacheFtraceEvent.toObject(m.kvmToggleCache, o);
                    if (o.oneofs)
                        d.event = "kvmToggleCache";
                }
                if (m.kvmUnmapHvaRange != null && m.hasOwnProperty("kvmUnmapHvaRange")) {
                    d.kvmUnmapHvaRange = $root.perfetto.protos.KvmUnmapHvaRangeFtraceEvent.toObject(m.kvmUnmapHvaRange, o);
                    if (o.oneofs)
                        d.event = "kvmUnmapHvaRange";
                }
                if (m.kvmUserspaceExit != null && m.hasOwnProperty("kvmUserspaceExit")) {
                    d.kvmUserspaceExit = $root.perfetto.protos.KvmUserspaceExitFtraceEvent.toObject(m.kvmUserspaceExit, o);
                    if (o.oneofs)
                        d.event = "kvmUserspaceExit";
                }
                if (m.kvmVcpuWakeup != null && m.hasOwnProperty("kvmVcpuWakeup")) {
                    d.kvmVcpuWakeup = $root.perfetto.protos.KvmVcpuWakeupFtraceEvent.toObject(m.kvmVcpuWakeup, o);
                    if (o.oneofs)
                        d.event = "kvmVcpuWakeup";
                }
                if (m.kvmWfxArm64 != null && m.hasOwnProperty("kvmWfxArm64")) {
                    d.kvmWfxArm64 = $root.perfetto.protos.KvmWfxArm64FtraceEvent.toObject(m.kvmWfxArm64, o);
                    if (o.oneofs)
                        d.event = "kvmWfxArm64";
                }
                if (m.trapReg != null && m.hasOwnProperty("trapReg")) {
                    d.trapReg = $root.perfetto.protos.TrapRegFtraceEvent.toObject(m.trapReg, o);
                    if (o.oneofs)
                        d.event = "trapReg";
                }
                if (m.vgicUpdateIrqPending != null && m.hasOwnProperty("vgicUpdateIrqPending")) {
                    d.vgicUpdateIrqPending = $root.perfetto.protos.VgicUpdateIrqPendingFtraceEvent.toObject(m.vgicUpdateIrqPending, o);
                    if (o.oneofs)
                        d.event = "vgicUpdateIrqPending";
                }
                if (m.wakeupSourceActivate != null && m.hasOwnProperty("wakeupSourceActivate")) {
                    d.wakeupSourceActivate = $root.perfetto.protos.WakeupSourceActivateFtraceEvent.toObject(m.wakeupSourceActivate, o);
                    if (o.oneofs)
                        d.event = "wakeupSourceActivate";
                }
                if (m.wakeupSourceDeactivate != null && m.hasOwnProperty("wakeupSourceDeactivate")) {
                    d.wakeupSourceDeactivate = $root.perfetto.protos.WakeupSourceDeactivateFtraceEvent.toObject(m.wakeupSourceDeactivate, o);
                    if (o.oneofs)
                        d.event = "wakeupSourceDeactivate";
                }
                if (m.ufshcdCommand != null && m.hasOwnProperty("ufshcdCommand")) {
                    d.ufshcdCommand = $root.perfetto.protos.UfshcdCommandFtraceEvent.toObject(m.ufshcdCommand, o);
                    if (o.oneofs)
                        d.event = "ufshcdCommand";
                }
                if (m.ufshcdClkGating != null && m.hasOwnProperty("ufshcdClkGating")) {
                    d.ufshcdClkGating = $root.perfetto.protos.UfshcdClkGatingFtraceEvent.toObject(m.ufshcdClkGating, o);
                    if (o.oneofs)
                        d.event = "ufshcdClkGating";
                }
                if (m.console != null && m.hasOwnProperty("console")) {
                    d.console = $root.perfetto.protos.ConsoleFtraceEvent.toObject(m.console, o);
                    if (o.oneofs)
                        d.event = "console";
                }
                if (m.drmVblankEvent != null && m.hasOwnProperty("drmVblankEvent")) {
                    d.drmVblankEvent = $root.perfetto.protos.DrmVblankEventFtraceEvent.toObject(m.drmVblankEvent, o);
                    if (o.oneofs)
                        d.event = "drmVblankEvent";
                }
                if (m.drmVblankEventDelivered != null && m.hasOwnProperty("drmVblankEventDelivered")) {
                    d.drmVblankEventDelivered = $root.perfetto.protos.DrmVblankEventDeliveredFtraceEvent.toObject(m.drmVblankEventDelivered, o);
                    if (o.oneofs)
                        d.event = "drmVblankEventDelivered";
                }
                if (m.drmSchedJob != null && m.hasOwnProperty("drmSchedJob")) {
                    d.drmSchedJob = $root.perfetto.protos.DrmSchedJobFtraceEvent.toObject(m.drmSchedJob, o);
                    if (o.oneofs)
                        d.event = "drmSchedJob";
                }
                if (m.drmRunJob != null && m.hasOwnProperty("drmRunJob")) {
                    d.drmRunJob = $root.perfetto.protos.DrmRunJobFtraceEvent.toObject(m.drmRunJob, o);
                    if (o.oneofs)
                        d.event = "drmRunJob";
                }
                if (m.drmSchedProcessJob != null && m.hasOwnProperty("drmSchedProcessJob")) {
                    d.drmSchedProcessJob = $root.perfetto.protos.DrmSchedProcessJobFtraceEvent.toObject(m.drmSchedProcessJob, o);
                    if (o.oneofs)
                        d.event = "drmSchedProcessJob";
                }
                if (m.dmaFenceInit != null && m.hasOwnProperty("dmaFenceInit")) {
                    d.dmaFenceInit = $root.perfetto.protos.DmaFenceInitFtraceEvent.toObject(m.dmaFenceInit, o);
                    if (o.oneofs)
                        d.event = "dmaFenceInit";
                }
                if (m.dmaFenceEmit != null && m.hasOwnProperty("dmaFenceEmit")) {
                    d.dmaFenceEmit = $root.perfetto.protos.DmaFenceEmitFtraceEvent.toObject(m.dmaFenceEmit, o);
                    if (o.oneofs)
                        d.event = "dmaFenceEmit";
                }
                if (m.dmaFenceSignaled != null && m.hasOwnProperty("dmaFenceSignaled")) {
                    d.dmaFenceSignaled = $root.perfetto.protos.DmaFenceSignaledFtraceEvent.toObject(m.dmaFenceSignaled, o);
                    if (o.oneofs)
                        d.event = "dmaFenceSignaled";
                }
                if (m.dmaFenceWaitStart != null && m.hasOwnProperty("dmaFenceWaitStart")) {
                    d.dmaFenceWaitStart = $root.perfetto.protos.DmaFenceWaitStartFtraceEvent.toObject(m.dmaFenceWaitStart, o);
                    if (o.oneofs)
                        d.event = "dmaFenceWaitStart";
                }
                if (m.dmaFenceWaitEnd != null && m.hasOwnProperty("dmaFenceWaitEnd")) {
                    d.dmaFenceWaitEnd = $root.perfetto.protos.DmaFenceWaitEndFtraceEvent.toObject(m.dmaFenceWaitEnd, o);
                    if (o.oneofs)
                        d.event = "dmaFenceWaitEnd";
                }
                if (m.f2fsIostat != null && m.hasOwnProperty("f2fsIostat")) {
                    d.f2fsIostat = $root.perfetto.protos.F2fsIostatFtraceEvent.toObject(m.f2fsIostat, o);
                    if (o.oneofs)
                        d.event = "f2fsIostat";
                }
                if (m.f2fsIostatLatency != null && m.hasOwnProperty("f2fsIostatLatency")) {
                    d.f2fsIostatLatency = $root.perfetto.protos.F2fsIostatLatencyFtraceEvent.toObject(m.f2fsIostatLatency, o);
                    if (o.oneofs)
                        d.event = "f2fsIostatLatency";
                }
                if (m.schedCpuUtilCfs != null && m.hasOwnProperty("schedCpuUtilCfs")) {
                    d.schedCpuUtilCfs = $root.perfetto.protos.SchedCpuUtilCfsFtraceEvent.toObject(m.schedCpuUtilCfs, o);
                    if (o.oneofs)
                        d.event = "schedCpuUtilCfs";
                }
                if (m.v4l2Qbuf != null && m.hasOwnProperty("v4l2Qbuf")) {
                    d.v4l2Qbuf = $root.perfetto.protos.V4l2QbufFtraceEvent.toObject(m.v4l2Qbuf, o);
                    if (o.oneofs)
                        d.event = "v4l2Qbuf";
                }
                if (m.v4l2Dqbuf != null && m.hasOwnProperty("v4l2Dqbuf")) {
                    d.v4l2Dqbuf = $root.perfetto.protos.V4l2DqbufFtraceEvent.toObject(m.v4l2Dqbuf, o);
                    if (o.oneofs)
                        d.event = "v4l2Dqbuf";
                }
                if (m.vb2V4l2BufQueue != null && m.hasOwnProperty("vb2V4l2BufQueue")) {
                    d.vb2V4l2BufQueue = $root.perfetto.protos.Vb2V4l2BufQueueFtraceEvent.toObject(m.vb2V4l2BufQueue, o);
                    if (o.oneofs)
                        d.event = "vb2V4l2BufQueue";
                }
                if (m.vb2V4l2BufDone != null && m.hasOwnProperty("vb2V4l2BufDone")) {
                    d.vb2V4l2BufDone = $root.perfetto.protos.Vb2V4l2BufDoneFtraceEvent.toObject(m.vb2V4l2BufDone, o);
                    if (o.oneofs)
                        d.event = "vb2V4l2BufDone";
                }
                if (m.vb2V4l2Qbuf != null && m.hasOwnProperty("vb2V4l2Qbuf")) {
                    d.vb2V4l2Qbuf = $root.perfetto.protos.Vb2V4l2QbufFtraceEvent.toObject(m.vb2V4l2Qbuf, o);
                    if (o.oneofs)
                        d.event = "vb2V4l2Qbuf";
                }
                if (m.vb2V4l2Dqbuf != null && m.hasOwnProperty("vb2V4l2Dqbuf")) {
                    d.vb2V4l2Dqbuf = $root.perfetto.protos.Vb2V4l2DqbufFtraceEvent.toObject(m.vb2V4l2Dqbuf, o);
                    if (o.oneofs)
                        d.event = "vb2V4l2Dqbuf";
                }
                if (m.dsiCmdFifoStatus != null && m.hasOwnProperty("dsiCmdFifoStatus")) {
                    d.dsiCmdFifoStatus = $root.perfetto.protos.DsiCmdFifoStatusFtraceEvent.toObject(m.dsiCmdFifoStatus, o);
                    if (o.oneofs)
                        d.event = "dsiCmdFifoStatus";
                }
                if (m.dsiRx != null && m.hasOwnProperty("dsiRx")) {
                    d.dsiRx = $root.perfetto.protos.DsiRxFtraceEvent.toObject(m.dsiRx, o);
                    if (o.oneofs)
                        d.event = "dsiRx";
                }
                if (m.dsiTx != null && m.hasOwnProperty("dsiTx")) {
                    d.dsiTx = $root.perfetto.protos.DsiTxFtraceEvent.toObject(m.dsiTx, o);
                    if (o.oneofs)
                        d.event = "dsiTx";
                }
                if (m.androidFsDatareadEnd != null && m.hasOwnProperty("androidFsDatareadEnd")) {
                    d.androidFsDatareadEnd = $root.perfetto.protos.AndroidFsDatareadEndFtraceEvent.toObject(m.androidFsDatareadEnd, o);
                    if (o.oneofs)
                        d.event = "androidFsDatareadEnd";
                }
                if (m.androidFsDatareadStart != null && m.hasOwnProperty("androidFsDatareadStart")) {
                    d.androidFsDatareadStart = $root.perfetto.protos.AndroidFsDatareadStartFtraceEvent.toObject(m.androidFsDatareadStart, o);
                    if (o.oneofs)
                        d.event = "androidFsDatareadStart";
                }
                if (m.androidFsDatawriteEnd != null && m.hasOwnProperty("androidFsDatawriteEnd")) {
                    d.androidFsDatawriteEnd = $root.perfetto.protos.AndroidFsDatawriteEndFtraceEvent.toObject(m.androidFsDatawriteEnd, o);
                    if (o.oneofs)
                        d.event = "androidFsDatawriteEnd";
                }
                if (m.androidFsDatawriteStart != null && m.hasOwnProperty("androidFsDatawriteStart")) {
                    d.androidFsDatawriteStart = $root.perfetto.protos.AndroidFsDatawriteStartFtraceEvent.toObject(m.androidFsDatawriteStart, o);
                    if (o.oneofs)
                        d.event = "androidFsDatawriteStart";
                }
                if (m.androidFsFsyncEnd != null && m.hasOwnProperty("androidFsFsyncEnd")) {
                    d.androidFsFsyncEnd = $root.perfetto.protos.AndroidFsFsyncEndFtraceEvent.toObject(m.androidFsFsyncEnd, o);
                    if (o.oneofs)
                        d.event = "androidFsFsyncEnd";
                }
                if (m.androidFsFsyncStart != null && m.hasOwnProperty("androidFsFsyncStart")) {
                    d.androidFsFsyncStart = $root.perfetto.protos.AndroidFsFsyncStartFtraceEvent.toObject(m.androidFsFsyncStart, o);
                    if (o.oneofs)
                        d.event = "androidFsFsyncStart";
                }
                if (m.funcgraphEntry != null && m.hasOwnProperty("funcgraphEntry")) {
                    d.funcgraphEntry = $root.perfetto.protos.FuncgraphEntryFtraceEvent.toObject(m.funcgraphEntry, o);
                    if (o.oneofs)
                        d.event = "funcgraphEntry";
                }
                if (m.funcgraphExit != null && m.hasOwnProperty("funcgraphExit")) {
                    d.funcgraphExit = $root.perfetto.protos.FuncgraphExitFtraceEvent.toObject(m.funcgraphExit, o);
                    if (o.oneofs)
                        d.event = "funcgraphExit";
                }
                if (m.virtioVideoCmd != null && m.hasOwnProperty("virtioVideoCmd")) {
                    d.virtioVideoCmd = $root.perfetto.protos.VirtioVideoCmdFtraceEvent.toObject(m.virtioVideoCmd, o);
                    if (o.oneofs)
                        d.event = "virtioVideoCmd";
                }
                if (m.virtioVideoCmdDone != null && m.hasOwnProperty("virtioVideoCmdDone")) {
                    d.virtioVideoCmdDone = $root.perfetto.protos.VirtioVideoCmdDoneFtraceEvent.toObject(m.virtioVideoCmdDone, o);
                    if (o.oneofs)
                        d.event = "virtioVideoCmdDone";
                }
                if (m.virtioVideoResourceQueue != null && m.hasOwnProperty("virtioVideoResourceQueue")) {
                    d.virtioVideoResourceQueue = $root.perfetto.protos.VirtioVideoResourceQueueFtraceEvent.toObject(m.virtioVideoResourceQueue, o);
                    if (o.oneofs)
                        d.event = "virtioVideoResourceQueue";
                }
                if (m.virtioVideoResourceQueueDone != null && m.hasOwnProperty("virtioVideoResourceQueueDone")) {
                    d.virtioVideoResourceQueueDone = $root.perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent.toObject(m.virtioVideoResourceQueueDone, o);
                    if (o.oneofs)
                        d.event = "virtioVideoResourceQueueDone";
                }
                if (m.mmShrinkSlabStart != null && m.hasOwnProperty("mmShrinkSlabStart")) {
                    d.mmShrinkSlabStart = $root.perfetto.protos.MmShrinkSlabStartFtraceEvent.toObject(m.mmShrinkSlabStart, o);
                    if (o.oneofs)
                        d.event = "mmShrinkSlabStart";
                }
                if (m.mmShrinkSlabEnd != null && m.hasOwnProperty("mmShrinkSlabEnd")) {
                    d.mmShrinkSlabEnd = $root.perfetto.protos.MmShrinkSlabEndFtraceEvent.toObject(m.mmShrinkSlabEnd, o);
                    if (o.oneofs)
                        d.event = "mmShrinkSlabEnd";
                }
                if (m.trustySmc != null && m.hasOwnProperty("trustySmc")) {
                    d.trustySmc = $root.perfetto.protos.TrustySmcFtraceEvent.toObject(m.trustySmc, o);
                    if (o.oneofs)
                        d.event = "trustySmc";
                }
                if (m.trustySmcDone != null && m.hasOwnProperty("trustySmcDone")) {
                    d.trustySmcDone = $root.perfetto.protos.TrustySmcDoneFtraceEvent.toObject(m.trustySmcDone, o);
                    if (o.oneofs)
                        d.event = "trustySmcDone";
                }
                if (m.trustyStdCall32 != null && m.hasOwnProperty("trustyStdCall32")) {
                    d.trustyStdCall32 = $root.perfetto.protos.TrustyStdCall32FtraceEvent.toObject(m.trustyStdCall32, o);
                    if (o.oneofs)
                        d.event = "trustyStdCall32";
                }
                if (m.trustyStdCall32Done != null && m.hasOwnProperty("trustyStdCall32Done")) {
                    d.trustyStdCall32Done = $root.perfetto.protos.TrustyStdCall32DoneFtraceEvent.toObject(m.trustyStdCall32Done, o);
                    if (o.oneofs)
                        d.event = "trustyStdCall32Done";
                }
                if (m.trustyShareMemory != null && m.hasOwnProperty("trustyShareMemory")) {
                    d.trustyShareMemory = $root.perfetto.protos.TrustyShareMemoryFtraceEvent.toObject(m.trustyShareMemory, o);
                    if (o.oneofs)
                        d.event = "trustyShareMemory";
                }
                if (m.trustyShareMemoryDone != null && m.hasOwnProperty("trustyShareMemoryDone")) {
                    d.trustyShareMemoryDone = $root.perfetto.protos.TrustyShareMemoryDoneFtraceEvent.toObject(m.trustyShareMemoryDone, o);
                    if (o.oneofs)
                        d.event = "trustyShareMemoryDone";
                }
                if (m.trustyReclaimMemory != null && m.hasOwnProperty("trustyReclaimMemory")) {
                    d.trustyReclaimMemory = $root.perfetto.protos.TrustyReclaimMemoryFtraceEvent.toObject(m.trustyReclaimMemory, o);
                    if (o.oneofs)
                        d.event = "trustyReclaimMemory";
                }
                if (m.trustyReclaimMemoryDone != null && m.hasOwnProperty("trustyReclaimMemoryDone")) {
                    d.trustyReclaimMemoryDone = $root.perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent.toObject(m.trustyReclaimMemoryDone, o);
                    if (o.oneofs)
                        d.event = "trustyReclaimMemoryDone";
                }
                if (m.trustyIrq != null && m.hasOwnProperty("trustyIrq")) {
                    d.trustyIrq = $root.perfetto.protos.TrustyIrqFtraceEvent.toObject(m.trustyIrq, o);
                    if (o.oneofs)
                        d.event = "trustyIrq";
                }
                if (m.trustyIpcHandleEvent != null && m.hasOwnProperty("trustyIpcHandleEvent")) {
                    d.trustyIpcHandleEvent = $root.perfetto.protos.TrustyIpcHandleEventFtraceEvent.toObject(m.trustyIpcHandleEvent, o);
                    if (o.oneofs)
                        d.event = "trustyIpcHandleEvent";
                }
                if (m.trustyIpcConnect != null && m.hasOwnProperty("trustyIpcConnect")) {
                    d.trustyIpcConnect = $root.perfetto.protos.TrustyIpcConnectFtraceEvent.toObject(m.trustyIpcConnect, o);
                    if (o.oneofs)
                        d.event = "trustyIpcConnect";
                }
                if (m.trustyIpcConnectEnd != null && m.hasOwnProperty("trustyIpcConnectEnd")) {
                    d.trustyIpcConnectEnd = $root.perfetto.protos.TrustyIpcConnectEndFtraceEvent.toObject(m.trustyIpcConnectEnd, o);
                    if (o.oneofs)
                        d.event = "trustyIpcConnectEnd";
                }
                if (m.trustyIpcWrite != null && m.hasOwnProperty("trustyIpcWrite")) {
                    d.trustyIpcWrite = $root.perfetto.protos.TrustyIpcWriteFtraceEvent.toObject(m.trustyIpcWrite, o);
                    if (o.oneofs)
                        d.event = "trustyIpcWrite";
                }
                if (m.trustyIpcPoll != null && m.hasOwnProperty("trustyIpcPoll")) {
                    d.trustyIpcPoll = $root.perfetto.protos.TrustyIpcPollFtraceEvent.toObject(m.trustyIpcPoll, o);
                    if (o.oneofs)
                        d.event = "trustyIpcPoll";
                }
                if (m.trustyIpcPollEnd != null && m.hasOwnProperty("trustyIpcPollEnd")) {
                    d.trustyIpcPollEnd = $root.perfetto.protos.TrustyIpcPollEndFtraceEvent.toObject(m.trustyIpcPollEnd, o);
                    if (o.oneofs)
                        d.event = "trustyIpcPollEnd";
                }
                if (m.trustyIpcRead != null && m.hasOwnProperty("trustyIpcRead")) {
                    d.trustyIpcRead = $root.perfetto.protos.TrustyIpcReadFtraceEvent.toObject(m.trustyIpcRead, o);
                    if (o.oneofs)
                        d.event = "trustyIpcRead";
                }
                if (m.trustyIpcReadEnd != null && m.hasOwnProperty("trustyIpcReadEnd")) {
                    d.trustyIpcReadEnd = $root.perfetto.protos.TrustyIpcReadEndFtraceEvent.toObject(m.trustyIpcReadEnd, o);
                    if (o.oneofs)
                        d.event = "trustyIpcReadEnd";
                }
                if (m.trustyIpcRx != null && m.hasOwnProperty("trustyIpcRx")) {
                    d.trustyIpcRx = $root.perfetto.protos.TrustyIpcRxFtraceEvent.toObject(m.trustyIpcRx, o);
                    if (o.oneofs)
                        d.event = "trustyIpcRx";
                }
                if (m.trustyIpcTx != null && m.hasOwnProperty("trustyIpcTx")) {
                    d.trustyIpcTx = $root.perfetto.protos.TrustyIpcTxFtraceEvent.toObject(m.trustyIpcTx, o);
                    if (o.oneofs)
                        d.event = "trustyIpcTx";
                }
                if (m.trustyEnqueueNop != null && m.hasOwnProperty("trustyEnqueueNop")) {
                    d.trustyEnqueueNop = $root.perfetto.protos.TrustyEnqueueNopFtraceEvent.toObject(m.trustyEnqueueNop, o);
                    if (o.oneofs)
                        d.event = "trustyEnqueueNop";
                }
                return d;
            };

            /**
             * Converts this FtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.FtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            FtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return FtraceEvent;
        })();

        protos.AndroidFsDatareadEndFtraceEvent = (function() {

            /**
             * Properties of an AndroidFsDatareadEndFtraceEvent.
             * @memberof perfetto.protos
             * @interface IAndroidFsDatareadEndFtraceEvent
             * @property {number|null} [bytes] AndroidFsDatareadEndFtraceEvent bytes
             * @property {number|null} [ino] AndroidFsDatareadEndFtraceEvent ino
             * @property {number|null} [offset] AndroidFsDatareadEndFtraceEvent offset
             */

            /**
             * Constructs a new AndroidFsDatareadEndFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidFsDatareadEndFtraceEvent.
             * @implements IAndroidFsDatareadEndFtraceEvent
             * @constructor
             * @param {perfetto.protos.IAndroidFsDatareadEndFtraceEvent=} [p] Properties to set
             */
            function AndroidFsDatareadEndFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidFsDatareadEndFtraceEvent bytes.
             * @member {number} bytes
             * @memberof perfetto.protos.AndroidFsDatareadEndFtraceEvent
             * @instance
             */
            AndroidFsDatareadEndFtraceEvent.prototype.bytes = 0;

            /**
             * AndroidFsDatareadEndFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.AndroidFsDatareadEndFtraceEvent
             * @instance
             */
            AndroidFsDatareadEndFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * AndroidFsDatareadEndFtraceEvent offset.
             * @member {number} offset
             * @memberof perfetto.protos.AndroidFsDatareadEndFtraceEvent
             * @instance
             */
            AndroidFsDatareadEndFtraceEvent.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new AndroidFsDatareadEndFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidFsDatareadEndFtraceEvent
             * @static
             * @param {perfetto.protos.IAndroidFsDatareadEndFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidFsDatareadEndFtraceEvent} AndroidFsDatareadEndFtraceEvent instance
             */
            AndroidFsDatareadEndFtraceEvent.create = function create(properties) {
                return new AndroidFsDatareadEndFtraceEvent(properties);
            };

            /**
             * Encodes the specified AndroidFsDatareadEndFtraceEvent message. Does not implicitly {@link perfetto.protos.AndroidFsDatareadEndFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidFsDatareadEndFtraceEvent
             * @static
             * @param {perfetto.protos.IAndroidFsDatareadEndFtraceEvent} m AndroidFsDatareadEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidFsDatareadEndFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.bytes != null && Object.hasOwnProperty.call(m, "bytes"))
                    w.uint32(8).int32(m.bytes);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.offset != null && Object.hasOwnProperty.call(m, "offset"))
                    w.uint32(24).int64(m.offset);
                return w;
            };

            /**
             * Encodes the specified AndroidFsDatareadEndFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.AndroidFsDatareadEndFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidFsDatareadEndFtraceEvent
             * @static
             * @param {perfetto.protos.IAndroidFsDatareadEndFtraceEvent} message AndroidFsDatareadEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidFsDatareadEndFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidFsDatareadEndFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidFsDatareadEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidFsDatareadEndFtraceEvent} AndroidFsDatareadEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidFsDatareadEndFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidFsDatareadEndFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.bytes = r.int32();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.offset = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidFsDatareadEndFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidFsDatareadEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidFsDatareadEndFtraceEvent} AndroidFsDatareadEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidFsDatareadEndFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidFsDatareadEndFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.AndroidFsDatareadEndFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidFsDatareadEndFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.bytes != null && m.hasOwnProperty("bytes")) {
                    if (!$util.isInteger(m.bytes))
                        return "bytes: integer expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (!$util.isInteger(m.offset) && !(m.offset && $util.isInteger(m.offset.low) && $util.isInteger(m.offset.high)))
                        return "offset: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an AndroidFsDatareadEndFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidFsDatareadEndFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidFsDatareadEndFtraceEvent} AndroidFsDatareadEndFtraceEvent
             */
            AndroidFsDatareadEndFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidFsDatareadEndFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.AndroidFsDatareadEndFtraceEvent();
                if (d.bytes != null) {
                    m.bytes = d.bytes | 0;
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.offset != null) {
                    if ($util.Long)
                        (m.offset = $util.Long.fromValue(d.offset)).unsigned = false;
                    else if (typeof d.offset === "string")
                        m.offset = parseInt(d.offset, 10);
                    else if (typeof d.offset === "number")
                        m.offset = d.offset;
                    else if (typeof d.offset === "object")
                        m.offset = new $util.LongBits(d.offset.low >>> 0, d.offset.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidFsDatareadEndFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidFsDatareadEndFtraceEvent
             * @static
             * @param {perfetto.protos.AndroidFsDatareadEndFtraceEvent} m AndroidFsDatareadEndFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidFsDatareadEndFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.bytes = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.offset = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.offset = o.longs === String ? "0" : 0;
                }
                if (m.bytes != null && m.hasOwnProperty("bytes")) {
                    d.bytes = m.bytes;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (typeof m.offset === "number")
                        d.offset = o.longs === String ? String(m.offset) : m.offset;
                    else
                        d.offset = o.longs === String ? $util.Long.prototype.toString.call(m.offset) : o.longs === Number ? new $util.LongBits(m.offset.low >>> 0, m.offset.high >>> 0).toNumber() : m.offset;
                }
                return d;
            };

            /**
             * Converts this AndroidFsDatareadEndFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidFsDatareadEndFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidFsDatareadEndFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AndroidFsDatareadEndFtraceEvent;
        })();

        protos.AndroidFsDatareadStartFtraceEvent = (function() {

            /**
             * Properties of an AndroidFsDatareadStartFtraceEvent.
             * @memberof perfetto.protos
             * @interface IAndroidFsDatareadStartFtraceEvent
             * @property {number|null} [bytes] AndroidFsDatareadStartFtraceEvent bytes
             * @property {string|null} [cmdline] AndroidFsDatareadStartFtraceEvent cmdline
             * @property {number|null} [iSize] AndroidFsDatareadStartFtraceEvent iSize
             * @property {number|null} [ino] AndroidFsDatareadStartFtraceEvent ino
             * @property {number|null} [offset] AndroidFsDatareadStartFtraceEvent offset
             * @property {string|null} [pathbuf] AndroidFsDatareadStartFtraceEvent pathbuf
             * @property {number|null} [pid] AndroidFsDatareadStartFtraceEvent pid
             */

            /**
             * Constructs a new AndroidFsDatareadStartFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidFsDatareadStartFtraceEvent.
             * @implements IAndroidFsDatareadStartFtraceEvent
             * @constructor
             * @param {perfetto.protos.IAndroidFsDatareadStartFtraceEvent=} [p] Properties to set
             */
            function AndroidFsDatareadStartFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidFsDatareadStartFtraceEvent bytes.
             * @member {number} bytes
             * @memberof perfetto.protos.AndroidFsDatareadStartFtraceEvent
             * @instance
             */
            AndroidFsDatareadStartFtraceEvent.prototype.bytes = 0;

            /**
             * AndroidFsDatareadStartFtraceEvent cmdline.
             * @member {string} cmdline
             * @memberof perfetto.protos.AndroidFsDatareadStartFtraceEvent
             * @instance
             */
            AndroidFsDatareadStartFtraceEvent.prototype.cmdline = "";

            /**
             * AndroidFsDatareadStartFtraceEvent iSize.
             * @member {number} iSize
             * @memberof perfetto.protos.AndroidFsDatareadStartFtraceEvent
             * @instance
             */
            AndroidFsDatareadStartFtraceEvent.prototype.iSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * AndroidFsDatareadStartFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.AndroidFsDatareadStartFtraceEvent
             * @instance
             */
            AndroidFsDatareadStartFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * AndroidFsDatareadStartFtraceEvent offset.
             * @member {number} offset
             * @memberof perfetto.protos.AndroidFsDatareadStartFtraceEvent
             * @instance
             */
            AndroidFsDatareadStartFtraceEvent.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * AndroidFsDatareadStartFtraceEvent pathbuf.
             * @member {string} pathbuf
             * @memberof perfetto.protos.AndroidFsDatareadStartFtraceEvent
             * @instance
             */
            AndroidFsDatareadStartFtraceEvent.prototype.pathbuf = "";

            /**
             * AndroidFsDatareadStartFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.AndroidFsDatareadStartFtraceEvent
             * @instance
             */
            AndroidFsDatareadStartFtraceEvent.prototype.pid = 0;

            /**
             * Creates a new AndroidFsDatareadStartFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidFsDatareadStartFtraceEvent
             * @static
             * @param {perfetto.protos.IAndroidFsDatareadStartFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidFsDatareadStartFtraceEvent} AndroidFsDatareadStartFtraceEvent instance
             */
            AndroidFsDatareadStartFtraceEvent.create = function create(properties) {
                return new AndroidFsDatareadStartFtraceEvent(properties);
            };

            /**
             * Encodes the specified AndroidFsDatareadStartFtraceEvent message. Does not implicitly {@link perfetto.protos.AndroidFsDatareadStartFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidFsDatareadStartFtraceEvent
             * @static
             * @param {perfetto.protos.IAndroidFsDatareadStartFtraceEvent} m AndroidFsDatareadStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidFsDatareadStartFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.bytes != null && Object.hasOwnProperty.call(m, "bytes"))
                    w.uint32(8).int32(m.bytes);
                if (m.cmdline != null && Object.hasOwnProperty.call(m, "cmdline"))
                    w.uint32(18).string(m.cmdline);
                if (m.iSize != null && Object.hasOwnProperty.call(m, "iSize"))
                    w.uint32(24).int64(m.iSize);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(32).uint64(m.ino);
                if (m.offset != null && Object.hasOwnProperty.call(m, "offset"))
                    w.uint32(40).int64(m.offset);
                if (m.pathbuf != null && Object.hasOwnProperty.call(m, "pathbuf"))
                    w.uint32(50).string(m.pathbuf);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(56).int32(m.pid);
                return w;
            };

            /**
             * Encodes the specified AndroidFsDatareadStartFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.AndroidFsDatareadStartFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidFsDatareadStartFtraceEvent
             * @static
             * @param {perfetto.protos.IAndroidFsDatareadStartFtraceEvent} message AndroidFsDatareadStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidFsDatareadStartFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidFsDatareadStartFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidFsDatareadStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidFsDatareadStartFtraceEvent} AndroidFsDatareadStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidFsDatareadStartFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidFsDatareadStartFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.bytes = r.int32();
                        break;
                    case 2:
                        m.cmdline = r.string();
                        break;
                    case 3:
                        m.iSize = r.int64();
                        break;
                    case 4:
                        m.ino = r.uint64();
                        break;
                    case 5:
                        m.offset = r.int64();
                        break;
                    case 6:
                        m.pathbuf = r.string();
                        break;
                    case 7:
                        m.pid = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidFsDatareadStartFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidFsDatareadStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidFsDatareadStartFtraceEvent} AndroidFsDatareadStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidFsDatareadStartFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidFsDatareadStartFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.AndroidFsDatareadStartFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidFsDatareadStartFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.bytes != null && m.hasOwnProperty("bytes")) {
                    if (!$util.isInteger(m.bytes))
                        return "bytes: integer expected";
                }
                if (m.cmdline != null && m.hasOwnProperty("cmdline")) {
                    if (!$util.isString(m.cmdline))
                        return "cmdline: string expected";
                }
                if (m.iSize != null && m.hasOwnProperty("iSize")) {
                    if (!$util.isInteger(m.iSize) && !(m.iSize && $util.isInteger(m.iSize.low) && $util.isInteger(m.iSize.high)))
                        return "iSize: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (!$util.isInteger(m.offset) && !(m.offset && $util.isInteger(m.offset.low) && $util.isInteger(m.offset.high)))
                        return "offset: integer|Long expected";
                }
                if (m.pathbuf != null && m.hasOwnProperty("pathbuf")) {
                    if (!$util.isString(m.pathbuf))
                        return "pathbuf: string expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                return null;
            };

            /**
             * Creates an AndroidFsDatareadStartFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidFsDatareadStartFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidFsDatareadStartFtraceEvent} AndroidFsDatareadStartFtraceEvent
             */
            AndroidFsDatareadStartFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidFsDatareadStartFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.AndroidFsDatareadStartFtraceEvent();
                if (d.bytes != null) {
                    m.bytes = d.bytes | 0;
                }
                if (d.cmdline != null) {
                    m.cmdline = String(d.cmdline);
                }
                if (d.iSize != null) {
                    if ($util.Long)
                        (m.iSize = $util.Long.fromValue(d.iSize)).unsigned = false;
                    else if (typeof d.iSize === "string")
                        m.iSize = parseInt(d.iSize, 10);
                    else if (typeof d.iSize === "number")
                        m.iSize = d.iSize;
                    else if (typeof d.iSize === "object")
                        m.iSize = new $util.LongBits(d.iSize.low >>> 0, d.iSize.high >>> 0).toNumber();
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.offset != null) {
                    if ($util.Long)
                        (m.offset = $util.Long.fromValue(d.offset)).unsigned = false;
                    else if (typeof d.offset === "string")
                        m.offset = parseInt(d.offset, 10);
                    else if (typeof d.offset === "number")
                        m.offset = d.offset;
                    else if (typeof d.offset === "object")
                        m.offset = new $util.LongBits(d.offset.low >>> 0, d.offset.high >>> 0).toNumber();
                }
                if (d.pathbuf != null) {
                    m.pathbuf = String(d.pathbuf);
                }
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidFsDatareadStartFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidFsDatareadStartFtraceEvent
             * @static
             * @param {perfetto.protos.AndroidFsDatareadStartFtraceEvent} m AndroidFsDatareadStartFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidFsDatareadStartFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.bytes = 0;
                    d.cmdline = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.iSize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.iSize = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.offset = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.offset = o.longs === String ? "0" : 0;
                    d.pathbuf = "";
                    d.pid = 0;
                }
                if (m.bytes != null && m.hasOwnProperty("bytes")) {
                    d.bytes = m.bytes;
                }
                if (m.cmdline != null && m.hasOwnProperty("cmdline")) {
                    d.cmdline = m.cmdline;
                }
                if (m.iSize != null && m.hasOwnProperty("iSize")) {
                    if (typeof m.iSize === "number")
                        d.iSize = o.longs === String ? String(m.iSize) : m.iSize;
                    else
                        d.iSize = o.longs === String ? $util.Long.prototype.toString.call(m.iSize) : o.longs === Number ? new $util.LongBits(m.iSize.low >>> 0, m.iSize.high >>> 0).toNumber() : m.iSize;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (typeof m.offset === "number")
                        d.offset = o.longs === String ? String(m.offset) : m.offset;
                    else
                        d.offset = o.longs === String ? $util.Long.prototype.toString.call(m.offset) : o.longs === Number ? new $util.LongBits(m.offset.low >>> 0, m.offset.high >>> 0).toNumber() : m.offset;
                }
                if (m.pathbuf != null && m.hasOwnProperty("pathbuf")) {
                    d.pathbuf = m.pathbuf;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                return d;
            };

            /**
             * Converts this AndroidFsDatareadStartFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidFsDatareadStartFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidFsDatareadStartFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AndroidFsDatareadStartFtraceEvent;
        })();

        protos.AndroidFsDatawriteEndFtraceEvent = (function() {

            /**
             * Properties of an AndroidFsDatawriteEndFtraceEvent.
             * @memberof perfetto.protos
             * @interface IAndroidFsDatawriteEndFtraceEvent
             * @property {number|null} [bytes] AndroidFsDatawriteEndFtraceEvent bytes
             * @property {number|null} [ino] AndroidFsDatawriteEndFtraceEvent ino
             * @property {number|null} [offset] AndroidFsDatawriteEndFtraceEvent offset
             */

            /**
             * Constructs a new AndroidFsDatawriteEndFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidFsDatawriteEndFtraceEvent.
             * @implements IAndroidFsDatawriteEndFtraceEvent
             * @constructor
             * @param {perfetto.protos.IAndroidFsDatawriteEndFtraceEvent=} [p] Properties to set
             */
            function AndroidFsDatawriteEndFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidFsDatawriteEndFtraceEvent bytes.
             * @member {number} bytes
             * @memberof perfetto.protos.AndroidFsDatawriteEndFtraceEvent
             * @instance
             */
            AndroidFsDatawriteEndFtraceEvent.prototype.bytes = 0;

            /**
             * AndroidFsDatawriteEndFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.AndroidFsDatawriteEndFtraceEvent
             * @instance
             */
            AndroidFsDatawriteEndFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * AndroidFsDatawriteEndFtraceEvent offset.
             * @member {number} offset
             * @memberof perfetto.protos.AndroidFsDatawriteEndFtraceEvent
             * @instance
             */
            AndroidFsDatawriteEndFtraceEvent.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new AndroidFsDatawriteEndFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidFsDatawriteEndFtraceEvent
             * @static
             * @param {perfetto.protos.IAndroidFsDatawriteEndFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidFsDatawriteEndFtraceEvent} AndroidFsDatawriteEndFtraceEvent instance
             */
            AndroidFsDatawriteEndFtraceEvent.create = function create(properties) {
                return new AndroidFsDatawriteEndFtraceEvent(properties);
            };

            /**
             * Encodes the specified AndroidFsDatawriteEndFtraceEvent message. Does not implicitly {@link perfetto.protos.AndroidFsDatawriteEndFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidFsDatawriteEndFtraceEvent
             * @static
             * @param {perfetto.protos.IAndroidFsDatawriteEndFtraceEvent} m AndroidFsDatawriteEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidFsDatawriteEndFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.bytes != null && Object.hasOwnProperty.call(m, "bytes"))
                    w.uint32(8).int32(m.bytes);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.offset != null && Object.hasOwnProperty.call(m, "offset"))
                    w.uint32(24).int64(m.offset);
                return w;
            };

            /**
             * Encodes the specified AndroidFsDatawriteEndFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.AndroidFsDatawriteEndFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidFsDatawriteEndFtraceEvent
             * @static
             * @param {perfetto.protos.IAndroidFsDatawriteEndFtraceEvent} message AndroidFsDatawriteEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidFsDatawriteEndFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidFsDatawriteEndFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidFsDatawriteEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidFsDatawriteEndFtraceEvent} AndroidFsDatawriteEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidFsDatawriteEndFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidFsDatawriteEndFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.bytes = r.int32();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.offset = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidFsDatawriteEndFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidFsDatawriteEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidFsDatawriteEndFtraceEvent} AndroidFsDatawriteEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidFsDatawriteEndFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidFsDatawriteEndFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.AndroidFsDatawriteEndFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidFsDatawriteEndFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.bytes != null && m.hasOwnProperty("bytes")) {
                    if (!$util.isInteger(m.bytes))
                        return "bytes: integer expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (!$util.isInteger(m.offset) && !(m.offset && $util.isInteger(m.offset.low) && $util.isInteger(m.offset.high)))
                        return "offset: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an AndroidFsDatawriteEndFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidFsDatawriteEndFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidFsDatawriteEndFtraceEvent} AndroidFsDatawriteEndFtraceEvent
             */
            AndroidFsDatawriteEndFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidFsDatawriteEndFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.AndroidFsDatawriteEndFtraceEvent();
                if (d.bytes != null) {
                    m.bytes = d.bytes | 0;
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.offset != null) {
                    if ($util.Long)
                        (m.offset = $util.Long.fromValue(d.offset)).unsigned = false;
                    else if (typeof d.offset === "string")
                        m.offset = parseInt(d.offset, 10);
                    else if (typeof d.offset === "number")
                        m.offset = d.offset;
                    else if (typeof d.offset === "object")
                        m.offset = new $util.LongBits(d.offset.low >>> 0, d.offset.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidFsDatawriteEndFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidFsDatawriteEndFtraceEvent
             * @static
             * @param {perfetto.protos.AndroidFsDatawriteEndFtraceEvent} m AndroidFsDatawriteEndFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidFsDatawriteEndFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.bytes = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.offset = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.offset = o.longs === String ? "0" : 0;
                }
                if (m.bytes != null && m.hasOwnProperty("bytes")) {
                    d.bytes = m.bytes;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (typeof m.offset === "number")
                        d.offset = o.longs === String ? String(m.offset) : m.offset;
                    else
                        d.offset = o.longs === String ? $util.Long.prototype.toString.call(m.offset) : o.longs === Number ? new $util.LongBits(m.offset.low >>> 0, m.offset.high >>> 0).toNumber() : m.offset;
                }
                return d;
            };

            /**
             * Converts this AndroidFsDatawriteEndFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidFsDatawriteEndFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidFsDatawriteEndFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AndroidFsDatawriteEndFtraceEvent;
        })();

        protos.AndroidFsDatawriteStartFtraceEvent = (function() {

            /**
             * Properties of an AndroidFsDatawriteStartFtraceEvent.
             * @memberof perfetto.protos
             * @interface IAndroidFsDatawriteStartFtraceEvent
             * @property {number|null} [bytes] AndroidFsDatawriteStartFtraceEvent bytes
             * @property {string|null} [cmdline] AndroidFsDatawriteStartFtraceEvent cmdline
             * @property {number|null} [iSize] AndroidFsDatawriteStartFtraceEvent iSize
             * @property {number|null} [ino] AndroidFsDatawriteStartFtraceEvent ino
             * @property {number|null} [offset] AndroidFsDatawriteStartFtraceEvent offset
             * @property {string|null} [pathbuf] AndroidFsDatawriteStartFtraceEvent pathbuf
             * @property {number|null} [pid] AndroidFsDatawriteStartFtraceEvent pid
             */

            /**
             * Constructs a new AndroidFsDatawriteStartFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidFsDatawriteStartFtraceEvent.
             * @implements IAndroidFsDatawriteStartFtraceEvent
             * @constructor
             * @param {perfetto.protos.IAndroidFsDatawriteStartFtraceEvent=} [p] Properties to set
             */
            function AndroidFsDatawriteStartFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidFsDatawriteStartFtraceEvent bytes.
             * @member {number} bytes
             * @memberof perfetto.protos.AndroidFsDatawriteStartFtraceEvent
             * @instance
             */
            AndroidFsDatawriteStartFtraceEvent.prototype.bytes = 0;

            /**
             * AndroidFsDatawriteStartFtraceEvent cmdline.
             * @member {string} cmdline
             * @memberof perfetto.protos.AndroidFsDatawriteStartFtraceEvent
             * @instance
             */
            AndroidFsDatawriteStartFtraceEvent.prototype.cmdline = "";

            /**
             * AndroidFsDatawriteStartFtraceEvent iSize.
             * @member {number} iSize
             * @memberof perfetto.protos.AndroidFsDatawriteStartFtraceEvent
             * @instance
             */
            AndroidFsDatawriteStartFtraceEvent.prototype.iSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * AndroidFsDatawriteStartFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.AndroidFsDatawriteStartFtraceEvent
             * @instance
             */
            AndroidFsDatawriteStartFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * AndroidFsDatawriteStartFtraceEvent offset.
             * @member {number} offset
             * @memberof perfetto.protos.AndroidFsDatawriteStartFtraceEvent
             * @instance
             */
            AndroidFsDatawriteStartFtraceEvent.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * AndroidFsDatawriteStartFtraceEvent pathbuf.
             * @member {string} pathbuf
             * @memberof perfetto.protos.AndroidFsDatawriteStartFtraceEvent
             * @instance
             */
            AndroidFsDatawriteStartFtraceEvent.prototype.pathbuf = "";

            /**
             * AndroidFsDatawriteStartFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.AndroidFsDatawriteStartFtraceEvent
             * @instance
             */
            AndroidFsDatawriteStartFtraceEvent.prototype.pid = 0;

            /**
             * Creates a new AndroidFsDatawriteStartFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidFsDatawriteStartFtraceEvent
             * @static
             * @param {perfetto.protos.IAndroidFsDatawriteStartFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidFsDatawriteStartFtraceEvent} AndroidFsDatawriteStartFtraceEvent instance
             */
            AndroidFsDatawriteStartFtraceEvent.create = function create(properties) {
                return new AndroidFsDatawriteStartFtraceEvent(properties);
            };

            /**
             * Encodes the specified AndroidFsDatawriteStartFtraceEvent message. Does not implicitly {@link perfetto.protos.AndroidFsDatawriteStartFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidFsDatawriteStartFtraceEvent
             * @static
             * @param {perfetto.protos.IAndroidFsDatawriteStartFtraceEvent} m AndroidFsDatawriteStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidFsDatawriteStartFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.bytes != null && Object.hasOwnProperty.call(m, "bytes"))
                    w.uint32(8).int32(m.bytes);
                if (m.cmdline != null && Object.hasOwnProperty.call(m, "cmdline"))
                    w.uint32(18).string(m.cmdline);
                if (m.iSize != null && Object.hasOwnProperty.call(m, "iSize"))
                    w.uint32(24).int64(m.iSize);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(32).uint64(m.ino);
                if (m.offset != null && Object.hasOwnProperty.call(m, "offset"))
                    w.uint32(40).int64(m.offset);
                if (m.pathbuf != null && Object.hasOwnProperty.call(m, "pathbuf"))
                    w.uint32(50).string(m.pathbuf);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(56).int32(m.pid);
                return w;
            };

            /**
             * Encodes the specified AndroidFsDatawriteStartFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.AndroidFsDatawriteStartFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidFsDatawriteStartFtraceEvent
             * @static
             * @param {perfetto.protos.IAndroidFsDatawriteStartFtraceEvent} message AndroidFsDatawriteStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidFsDatawriteStartFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidFsDatawriteStartFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidFsDatawriteStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidFsDatawriteStartFtraceEvent} AndroidFsDatawriteStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidFsDatawriteStartFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidFsDatawriteStartFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.bytes = r.int32();
                        break;
                    case 2:
                        m.cmdline = r.string();
                        break;
                    case 3:
                        m.iSize = r.int64();
                        break;
                    case 4:
                        m.ino = r.uint64();
                        break;
                    case 5:
                        m.offset = r.int64();
                        break;
                    case 6:
                        m.pathbuf = r.string();
                        break;
                    case 7:
                        m.pid = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidFsDatawriteStartFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidFsDatawriteStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidFsDatawriteStartFtraceEvent} AndroidFsDatawriteStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidFsDatawriteStartFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidFsDatawriteStartFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.AndroidFsDatawriteStartFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidFsDatawriteStartFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.bytes != null && m.hasOwnProperty("bytes")) {
                    if (!$util.isInteger(m.bytes))
                        return "bytes: integer expected";
                }
                if (m.cmdline != null && m.hasOwnProperty("cmdline")) {
                    if (!$util.isString(m.cmdline))
                        return "cmdline: string expected";
                }
                if (m.iSize != null && m.hasOwnProperty("iSize")) {
                    if (!$util.isInteger(m.iSize) && !(m.iSize && $util.isInteger(m.iSize.low) && $util.isInteger(m.iSize.high)))
                        return "iSize: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (!$util.isInteger(m.offset) && !(m.offset && $util.isInteger(m.offset.low) && $util.isInteger(m.offset.high)))
                        return "offset: integer|Long expected";
                }
                if (m.pathbuf != null && m.hasOwnProperty("pathbuf")) {
                    if (!$util.isString(m.pathbuf))
                        return "pathbuf: string expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                return null;
            };

            /**
             * Creates an AndroidFsDatawriteStartFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidFsDatawriteStartFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidFsDatawriteStartFtraceEvent} AndroidFsDatawriteStartFtraceEvent
             */
            AndroidFsDatawriteStartFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidFsDatawriteStartFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.AndroidFsDatawriteStartFtraceEvent();
                if (d.bytes != null) {
                    m.bytes = d.bytes | 0;
                }
                if (d.cmdline != null) {
                    m.cmdline = String(d.cmdline);
                }
                if (d.iSize != null) {
                    if ($util.Long)
                        (m.iSize = $util.Long.fromValue(d.iSize)).unsigned = false;
                    else if (typeof d.iSize === "string")
                        m.iSize = parseInt(d.iSize, 10);
                    else if (typeof d.iSize === "number")
                        m.iSize = d.iSize;
                    else if (typeof d.iSize === "object")
                        m.iSize = new $util.LongBits(d.iSize.low >>> 0, d.iSize.high >>> 0).toNumber();
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.offset != null) {
                    if ($util.Long)
                        (m.offset = $util.Long.fromValue(d.offset)).unsigned = false;
                    else if (typeof d.offset === "string")
                        m.offset = parseInt(d.offset, 10);
                    else if (typeof d.offset === "number")
                        m.offset = d.offset;
                    else if (typeof d.offset === "object")
                        m.offset = new $util.LongBits(d.offset.low >>> 0, d.offset.high >>> 0).toNumber();
                }
                if (d.pathbuf != null) {
                    m.pathbuf = String(d.pathbuf);
                }
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidFsDatawriteStartFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidFsDatawriteStartFtraceEvent
             * @static
             * @param {perfetto.protos.AndroidFsDatawriteStartFtraceEvent} m AndroidFsDatawriteStartFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidFsDatawriteStartFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.bytes = 0;
                    d.cmdline = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.iSize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.iSize = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.offset = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.offset = o.longs === String ? "0" : 0;
                    d.pathbuf = "";
                    d.pid = 0;
                }
                if (m.bytes != null && m.hasOwnProperty("bytes")) {
                    d.bytes = m.bytes;
                }
                if (m.cmdline != null && m.hasOwnProperty("cmdline")) {
                    d.cmdline = m.cmdline;
                }
                if (m.iSize != null && m.hasOwnProperty("iSize")) {
                    if (typeof m.iSize === "number")
                        d.iSize = o.longs === String ? String(m.iSize) : m.iSize;
                    else
                        d.iSize = o.longs === String ? $util.Long.prototype.toString.call(m.iSize) : o.longs === Number ? new $util.LongBits(m.iSize.low >>> 0, m.iSize.high >>> 0).toNumber() : m.iSize;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (typeof m.offset === "number")
                        d.offset = o.longs === String ? String(m.offset) : m.offset;
                    else
                        d.offset = o.longs === String ? $util.Long.prototype.toString.call(m.offset) : o.longs === Number ? new $util.LongBits(m.offset.low >>> 0, m.offset.high >>> 0).toNumber() : m.offset;
                }
                if (m.pathbuf != null && m.hasOwnProperty("pathbuf")) {
                    d.pathbuf = m.pathbuf;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                return d;
            };

            /**
             * Converts this AndroidFsDatawriteStartFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidFsDatawriteStartFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidFsDatawriteStartFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AndroidFsDatawriteStartFtraceEvent;
        })();

        protos.AndroidFsFsyncEndFtraceEvent = (function() {

            /**
             * Properties of an AndroidFsFsyncEndFtraceEvent.
             * @memberof perfetto.protos
             * @interface IAndroidFsFsyncEndFtraceEvent
             * @property {number|null} [bytes] AndroidFsFsyncEndFtraceEvent bytes
             * @property {number|null} [ino] AndroidFsFsyncEndFtraceEvent ino
             * @property {number|null} [offset] AndroidFsFsyncEndFtraceEvent offset
             */

            /**
             * Constructs a new AndroidFsFsyncEndFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidFsFsyncEndFtraceEvent.
             * @implements IAndroidFsFsyncEndFtraceEvent
             * @constructor
             * @param {perfetto.protos.IAndroidFsFsyncEndFtraceEvent=} [p] Properties to set
             */
            function AndroidFsFsyncEndFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidFsFsyncEndFtraceEvent bytes.
             * @member {number} bytes
             * @memberof perfetto.protos.AndroidFsFsyncEndFtraceEvent
             * @instance
             */
            AndroidFsFsyncEndFtraceEvent.prototype.bytes = 0;

            /**
             * AndroidFsFsyncEndFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.AndroidFsFsyncEndFtraceEvent
             * @instance
             */
            AndroidFsFsyncEndFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * AndroidFsFsyncEndFtraceEvent offset.
             * @member {number} offset
             * @memberof perfetto.protos.AndroidFsFsyncEndFtraceEvent
             * @instance
             */
            AndroidFsFsyncEndFtraceEvent.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new AndroidFsFsyncEndFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidFsFsyncEndFtraceEvent
             * @static
             * @param {perfetto.protos.IAndroidFsFsyncEndFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidFsFsyncEndFtraceEvent} AndroidFsFsyncEndFtraceEvent instance
             */
            AndroidFsFsyncEndFtraceEvent.create = function create(properties) {
                return new AndroidFsFsyncEndFtraceEvent(properties);
            };

            /**
             * Encodes the specified AndroidFsFsyncEndFtraceEvent message. Does not implicitly {@link perfetto.protos.AndroidFsFsyncEndFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidFsFsyncEndFtraceEvent
             * @static
             * @param {perfetto.protos.IAndroidFsFsyncEndFtraceEvent} m AndroidFsFsyncEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidFsFsyncEndFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.bytes != null && Object.hasOwnProperty.call(m, "bytes"))
                    w.uint32(8).int32(m.bytes);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.offset != null && Object.hasOwnProperty.call(m, "offset"))
                    w.uint32(24).int64(m.offset);
                return w;
            };

            /**
             * Encodes the specified AndroidFsFsyncEndFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.AndroidFsFsyncEndFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidFsFsyncEndFtraceEvent
             * @static
             * @param {perfetto.protos.IAndroidFsFsyncEndFtraceEvent} message AndroidFsFsyncEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidFsFsyncEndFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidFsFsyncEndFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidFsFsyncEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidFsFsyncEndFtraceEvent} AndroidFsFsyncEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidFsFsyncEndFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidFsFsyncEndFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.bytes = r.int32();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.offset = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidFsFsyncEndFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidFsFsyncEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidFsFsyncEndFtraceEvent} AndroidFsFsyncEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidFsFsyncEndFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidFsFsyncEndFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.AndroidFsFsyncEndFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidFsFsyncEndFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.bytes != null && m.hasOwnProperty("bytes")) {
                    if (!$util.isInteger(m.bytes))
                        return "bytes: integer expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (!$util.isInteger(m.offset) && !(m.offset && $util.isInteger(m.offset.low) && $util.isInteger(m.offset.high)))
                        return "offset: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an AndroidFsFsyncEndFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidFsFsyncEndFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidFsFsyncEndFtraceEvent} AndroidFsFsyncEndFtraceEvent
             */
            AndroidFsFsyncEndFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidFsFsyncEndFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.AndroidFsFsyncEndFtraceEvent();
                if (d.bytes != null) {
                    m.bytes = d.bytes | 0;
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.offset != null) {
                    if ($util.Long)
                        (m.offset = $util.Long.fromValue(d.offset)).unsigned = false;
                    else if (typeof d.offset === "string")
                        m.offset = parseInt(d.offset, 10);
                    else if (typeof d.offset === "number")
                        m.offset = d.offset;
                    else if (typeof d.offset === "object")
                        m.offset = new $util.LongBits(d.offset.low >>> 0, d.offset.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidFsFsyncEndFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidFsFsyncEndFtraceEvent
             * @static
             * @param {perfetto.protos.AndroidFsFsyncEndFtraceEvent} m AndroidFsFsyncEndFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidFsFsyncEndFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.bytes = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.offset = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.offset = o.longs === String ? "0" : 0;
                }
                if (m.bytes != null && m.hasOwnProperty("bytes")) {
                    d.bytes = m.bytes;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (typeof m.offset === "number")
                        d.offset = o.longs === String ? String(m.offset) : m.offset;
                    else
                        d.offset = o.longs === String ? $util.Long.prototype.toString.call(m.offset) : o.longs === Number ? new $util.LongBits(m.offset.low >>> 0, m.offset.high >>> 0).toNumber() : m.offset;
                }
                return d;
            };

            /**
             * Converts this AndroidFsFsyncEndFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidFsFsyncEndFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidFsFsyncEndFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AndroidFsFsyncEndFtraceEvent;
        })();

        protos.AndroidFsFsyncStartFtraceEvent = (function() {

            /**
             * Properties of an AndroidFsFsyncStartFtraceEvent.
             * @memberof perfetto.protos
             * @interface IAndroidFsFsyncStartFtraceEvent
             * @property {string|null} [cmdline] AndroidFsFsyncStartFtraceEvent cmdline
             * @property {number|null} [iSize] AndroidFsFsyncStartFtraceEvent iSize
             * @property {number|null} [ino] AndroidFsFsyncStartFtraceEvent ino
             * @property {string|null} [pathbuf] AndroidFsFsyncStartFtraceEvent pathbuf
             * @property {number|null} [pid] AndroidFsFsyncStartFtraceEvent pid
             */

            /**
             * Constructs a new AndroidFsFsyncStartFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidFsFsyncStartFtraceEvent.
             * @implements IAndroidFsFsyncStartFtraceEvent
             * @constructor
             * @param {perfetto.protos.IAndroidFsFsyncStartFtraceEvent=} [p] Properties to set
             */
            function AndroidFsFsyncStartFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidFsFsyncStartFtraceEvent cmdline.
             * @member {string} cmdline
             * @memberof perfetto.protos.AndroidFsFsyncStartFtraceEvent
             * @instance
             */
            AndroidFsFsyncStartFtraceEvent.prototype.cmdline = "";

            /**
             * AndroidFsFsyncStartFtraceEvent iSize.
             * @member {number} iSize
             * @memberof perfetto.protos.AndroidFsFsyncStartFtraceEvent
             * @instance
             */
            AndroidFsFsyncStartFtraceEvent.prototype.iSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * AndroidFsFsyncStartFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.AndroidFsFsyncStartFtraceEvent
             * @instance
             */
            AndroidFsFsyncStartFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * AndroidFsFsyncStartFtraceEvent pathbuf.
             * @member {string} pathbuf
             * @memberof perfetto.protos.AndroidFsFsyncStartFtraceEvent
             * @instance
             */
            AndroidFsFsyncStartFtraceEvent.prototype.pathbuf = "";

            /**
             * AndroidFsFsyncStartFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.AndroidFsFsyncStartFtraceEvent
             * @instance
             */
            AndroidFsFsyncStartFtraceEvent.prototype.pid = 0;

            /**
             * Creates a new AndroidFsFsyncStartFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidFsFsyncStartFtraceEvent
             * @static
             * @param {perfetto.protos.IAndroidFsFsyncStartFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidFsFsyncStartFtraceEvent} AndroidFsFsyncStartFtraceEvent instance
             */
            AndroidFsFsyncStartFtraceEvent.create = function create(properties) {
                return new AndroidFsFsyncStartFtraceEvent(properties);
            };

            /**
             * Encodes the specified AndroidFsFsyncStartFtraceEvent message. Does not implicitly {@link perfetto.protos.AndroidFsFsyncStartFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidFsFsyncStartFtraceEvent
             * @static
             * @param {perfetto.protos.IAndroidFsFsyncStartFtraceEvent} m AndroidFsFsyncStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidFsFsyncStartFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.cmdline != null && Object.hasOwnProperty.call(m, "cmdline"))
                    w.uint32(10).string(m.cmdline);
                if (m.iSize != null && Object.hasOwnProperty.call(m, "iSize"))
                    w.uint32(16).int64(m.iSize);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(24).uint64(m.ino);
                if (m.pathbuf != null && Object.hasOwnProperty.call(m, "pathbuf"))
                    w.uint32(34).string(m.pathbuf);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(40).int32(m.pid);
                return w;
            };

            /**
             * Encodes the specified AndroidFsFsyncStartFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.AndroidFsFsyncStartFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidFsFsyncStartFtraceEvent
             * @static
             * @param {perfetto.protos.IAndroidFsFsyncStartFtraceEvent} message AndroidFsFsyncStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidFsFsyncStartFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidFsFsyncStartFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidFsFsyncStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidFsFsyncStartFtraceEvent} AndroidFsFsyncStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidFsFsyncStartFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidFsFsyncStartFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.cmdline = r.string();
                        break;
                    case 2:
                        m.iSize = r.int64();
                        break;
                    case 3:
                        m.ino = r.uint64();
                        break;
                    case 4:
                        m.pathbuf = r.string();
                        break;
                    case 5:
                        m.pid = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidFsFsyncStartFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidFsFsyncStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidFsFsyncStartFtraceEvent} AndroidFsFsyncStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidFsFsyncStartFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidFsFsyncStartFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.AndroidFsFsyncStartFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidFsFsyncStartFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.cmdline != null && m.hasOwnProperty("cmdline")) {
                    if (!$util.isString(m.cmdline))
                        return "cmdline: string expected";
                }
                if (m.iSize != null && m.hasOwnProperty("iSize")) {
                    if (!$util.isInteger(m.iSize) && !(m.iSize && $util.isInteger(m.iSize.low) && $util.isInteger(m.iSize.high)))
                        return "iSize: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.pathbuf != null && m.hasOwnProperty("pathbuf")) {
                    if (!$util.isString(m.pathbuf))
                        return "pathbuf: string expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                return null;
            };

            /**
             * Creates an AndroidFsFsyncStartFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidFsFsyncStartFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidFsFsyncStartFtraceEvent} AndroidFsFsyncStartFtraceEvent
             */
            AndroidFsFsyncStartFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidFsFsyncStartFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.AndroidFsFsyncStartFtraceEvent();
                if (d.cmdline != null) {
                    m.cmdline = String(d.cmdline);
                }
                if (d.iSize != null) {
                    if ($util.Long)
                        (m.iSize = $util.Long.fromValue(d.iSize)).unsigned = false;
                    else if (typeof d.iSize === "string")
                        m.iSize = parseInt(d.iSize, 10);
                    else if (typeof d.iSize === "number")
                        m.iSize = d.iSize;
                    else if (typeof d.iSize === "object")
                        m.iSize = new $util.LongBits(d.iSize.low >>> 0, d.iSize.high >>> 0).toNumber();
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.pathbuf != null) {
                    m.pathbuf = String(d.pathbuf);
                }
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidFsFsyncStartFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidFsFsyncStartFtraceEvent
             * @static
             * @param {perfetto.protos.AndroidFsFsyncStartFtraceEvent} m AndroidFsFsyncStartFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidFsFsyncStartFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.cmdline = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.iSize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.iSize = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.pathbuf = "";
                    d.pid = 0;
                }
                if (m.cmdline != null && m.hasOwnProperty("cmdline")) {
                    d.cmdline = m.cmdline;
                }
                if (m.iSize != null && m.hasOwnProperty("iSize")) {
                    if (typeof m.iSize === "number")
                        d.iSize = o.longs === String ? String(m.iSize) : m.iSize;
                    else
                        d.iSize = o.longs === String ? $util.Long.prototype.toString.call(m.iSize) : o.longs === Number ? new $util.LongBits(m.iSize.low >>> 0, m.iSize.high >>> 0).toNumber() : m.iSize;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.pathbuf != null && m.hasOwnProperty("pathbuf")) {
                    d.pathbuf = m.pathbuf;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                return d;
            };

            /**
             * Converts this AndroidFsFsyncStartFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidFsFsyncStartFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidFsFsyncStartFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AndroidFsFsyncStartFtraceEvent;
        })();

        protos.BinderTransactionFtraceEvent = (function() {

            /**
             * Properties of a BinderTransactionFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBinderTransactionFtraceEvent
             * @property {number|null} [debugId] BinderTransactionFtraceEvent debugId
             * @property {number|null} [targetNode] BinderTransactionFtraceEvent targetNode
             * @property {number|null} [toProc] BinderTransactionFtraceEvent toProc
             * @property {number|null} [toThread] BinderTransactionFtraceEvent toThread
             * @property {number|null} [reply] BinderTransactionFtraceEvent reply
             * @property {number|null} [code] BinderTransactionFtraceEvent code
             * @property {number|null} [flags] BinderTransactionFtraceEvent flags
             */

            /**
             * Constructs a new BinderTransactionFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BinderTransactionFtraceEvent.
             * @implements IBinderTransactionFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBinderTransactionFtraceEvent=} [p] Properties to set
             */
            function BinderTransactionFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BinderTransactionFtraceEvent debugId.
             * @member {number} debugId
             * @memberof perfetto.protos.BinderTransactionFtraceEvent
             * @instance
             */
            BinderTransactionFtraceEvent.prototype.debugId = 0;

            /**
             * BinderTransactionFtraceEvent targetNode.
             * @member {number} targetNode
             * @memberof perfetto.protos.BinderTransactionFtraceEvent
             * @instance
             */
            BinderTransactionFtraceEvent.prototype.targetNode = 0;

            /**
             * BinderTransactionFtraceEvent toProc.
             * @member {number} toProc
             * @memberof perfetto.protos.BinderTransactionFtraceEvent
             * @instance
             */
            BinderTransactionFtraceEvent.prototype.toProc = 0;

            /**
             * BinderTransactionFtraceEvent toThread.
             * @member {number} toThread
             * @memberof perfetto.protos.BinderTransactionFtraceEvent
             * @instance
             */
            BinderTransactionFtraceEvent.prototype.toThread = 0;

            /**
             * BinderTransactionFtraceEvent reply.
             * @member {number} reply
             * @memberof perfetto.protos.BinderTransactionFtraceEvent
             * @instance
             */
            BinderTransactionFtraceEvent.prototype.reply = 0;

            /**
             * BinderTransactionFtraceEvent code.
             * @member {number} code
             * @memberof perfetto.protos.BinderTransactionFtraceEvent
             * @instance
             */
            BinderTransactionFtraceEvent.prototype.code = 0;

            /**
             * BinderTransactionFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.BinderTransactionFtraceEvent
             * @instance
             */
            BinderTransactionFtraceEvent.prototype.flags = 0;

            /**
             * Creates a new BinderTransactionFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BinderTransactionFtraceEvent
             * @static
             * @param {perfetto.protos.IBinderTransactionFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BinderTransactionFtraceEvent} BinderTransactionFtraceEvent instance
             */
            BinderTransactionFtraceEvent.create = function create(properties) {
                return new BinderTransactionFtraceEvent(properties);
            };

            /**
             * Encodes the specified BinderTransactionFtraceEvent message. Does not implicitly {@link perfetto.protos.BinderTransactionFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BinderTransactionFtraceEvent
             * @static
             * @param {perfetto.protos.IBinderTransactionFtraceEvent} m BinderTransactionFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BinderTransactionFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.debugId != null && Object.hasOwnProperty.call(m, "debugId"))
                    w.uint32(8).int32(m.debugId);
                if (m.targetNode != null && Object.hasOwnProperty.call(m, "targetNode"))
                    w.uint32(16).int32(m.targetNode);
                if (m.toProc != null && Object.hasOwnProperty.call(m, "toProc"))
                    w.uint32(24).int32(m.toProc);
                if (m.toThread != null && Object.hasOwnProperty.call(m, "toThread"))
                    w.uint32(32).int32(m.toThread);
                if (m.reply != null && Object.hasOwnProperty.call(m, "reply"))
                    w.uint32(40).int32(m.reply);
                if (m.code != null && Object.hasOwnProperty.call(m, "code"))
                    w.uint32(48).uint32(m.code);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(56).uint32(m.flags);
                return w;
            };

            /**
             * Encodes the specified BinderTransactionFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BinderTransactionFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BinderTransactionFtraceEvent
             * @static
             * @param {perfetto.protos.IBinderTransactionFtraceEvent} message BinderTransactionFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BinderTransactionFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BinderTransactionFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BinderTransactionFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BinderTransactionFtraceEvent} BinderTransactionFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BinderTransactionFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BinderTransactionFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.debugId = r.int32();
                        break;
                    case 2:
                        m.targetNode = r.int32();
                        break;
                    case 3:
                        m.toProc = r.int32();
                        break;
                    case 4:
                        m.toThread = r.int32();
                        break;
                    case 5:
                        m.reply = r.int32();
                        break;
                    case 6:
                        m.code = r.uint32();
                        break;
                    case 7:
                        m.flags = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BinderTransactionFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BinderTransactionFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BinderTransactionFtraceEvent} BinderTransactionFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BinderTransactionFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BinderTransactionFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BinderTransactionFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BinderTransactionFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.debugId != null && m.hasOwnProperty("debugId")) {
                    if (!$util.isInteger(m.debugId))
                        return "debugId: integer expected";
                }
                if (m.targetNode != null && m.hasOwnProperty("targetNode")) {
                    if (!$util.isInteger(m.targetNode))
                        return "targetNode: integer expected";
                }
                if (m.toProc != null && m.hasOwnProperty("toProc")) {
                    if (!$util.isInteger(m.toProc))
                        return "toProc: integer expected";
                }
                if (m.toThread != null && m.hasOwnProperty("toThread")) {
                    if (!$util.isInteger(m.toThread))
                        return "toThread: integer expected";
                }
                if (m.reply != null && m.hasOwnProperty("reply")) {
                    if (!$util.isInteger(m.reply))
                        return "reply: integer expected";
                }
                if (m.code != null && m.hasOwnProperty("code")) {
                    if (!$util.isInteger(m.code))
                        return "code: integer expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                return null;
            };

            /**
             * Creates a BinderTransactionFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BinderTransactionFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BinderTransactionFtraceEvent} BinderTransactionFtraceEvent
             */
            BinderTransactionFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BinderTransactionFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BinderTransactionFtraceEvent();
                if (d.debugId != null) {
                    m.debugId = d.debugId | 0;
                }
                if (d.targetNode != null) {
                    m.targetNode = d.targetNode | 0;
                }
                if (d.toProc != null) {
                    m.toProc = d.toProc | 0;
                }
                if (d.toThread != null) {
                    m.toThread = d.toThread | 0;
                }
                if (d.reply != null) {
                    m.reply = d.reply | 0;
                }
                if (d.code != null) {
                    m.code = d.code >>> 0;
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a BinderTransactionFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BinderTransactionFtraceEvent
             * @static
             * @param {perfetto.protos.BinderTransactionFtraceEvent} m BinderTransactionFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BinderTransactionFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.debugId = 0;
                    d.targetNode = 0;
                    d.toProc = 0;
                    d.toThread = 0;
                    d.reply = 0;
                    d.code = 0;
                    d.flags = 0;
                }
                if (m.debugId != null && m.hasOwnProperty("debugId")) {
                    d.debugId = m.debugId;
                }
                if (m.targetNode != null && m.hasOwnProperty("targetNode")) {
                    d.targetNode = m.targetNode;
                }
                if (m.toProc != null && m.hasOwnProperty("toProc")) {
                    d.toProc = m.toProc;
                }
                if (m.toThread != null && m.hasOwnProperty("toThread")) {
                    d.toThread = m.toThread;
                }
                if (m.reply != null && m.hasOwnProperty("reply")) {
                    d.reply = m.reply;
                }
                if (m.code != null && m.hasOwnProperty("code")) {
                    d.code = m.code;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                return d;
            };

            /**
             * Converts this BinderTransactionFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BinderTransactionFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BinderTransactionFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BinderTransactionFtraceEvent;
        })();

        protos.BinderTransactionReceivedFtraceEvent = (function() {

            /**
             * Properties of a BinderTransactionReceivedFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBinderTransactionReceivedFtraceEvent
             * @property {number|null} [debugId] BinderTransactionReceivedFtraceEvent debugId
             */

            /**
             * Constructs a new BinderTransactionReceivedFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BinderTransactionReceivedFtraceEvent.
             * @implements IBinderTransactionReceivedFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBinderTransactionReceivedFtraceEvent=} [p] Properties to set
             */
            function BinderTransactionReceivedFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BinderTransactionReceivedFtraceEvent debugId.
             * @member {number} debugId
             * @memberof perfetto.protos.BinderTransactionReceivedFtraceEvent
             * @instance
             */
            BinderTransactionReceivedFtraceEvent.prototype.debugId = 0;

            /**
             * Creates a new BinderTransactionReceivedFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BinderTransactionReceivedFtraceEvent
             * @static
             * @param {perfetto.protos.IBinderTransactionReceivedFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BinderTransactionReceivedFtraceEvent} BinderTransactionReceivedFtraceEvent instance
             */
            BinderTransactionReceivedFtraceEvent.create = function create(properties) {
                return new BinderTransactionReceivedFtraceEvent(properties);
            };

            /**
             * Encodes the specified BinderTransactionReceivedFtraceEvent message. Does not implicitly {@link perfetto.protos.BinderTransactionReceivedFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BinderTransactionReceivedFtraceEvent
             * @static
             * @param {perfetto.protos.IBinderTransactionReceivedFtraceEvent} m BinderTransactionReceivedFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BinderTransactionReceivedFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.debugId != null && Object.hasOwnProperty.call(m, "debugId"))
                    w.uint32(8).int32(m.debugId);
                return w;
            };

            /**
             * Encodes the specified BinderTransactionReceivedFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BinderTransactionReceivedFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BinderTransactionReceivedFtraceEvent
             * @static
             * @param {perfetto.protos.IBinderTransactionReceivedFtraceEvent} message BinderTransactionReceivedFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BinderTransactionReceivedFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BinderTransactionReceivedFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BinderTransactionReceivedFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BinderTransactionReceivedFtraceEvent} BinderTransactionReceivedFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BinderTransactionReceivedFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BinderTransactionReceivedFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.debugId = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BinderTransactionReceivedFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BinderTransactionReceivedFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BinderTransactionReceivedFtraceEvent} BinderTransactionReceivedFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BinderTransactionReceivedFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BinderTransactionReceivedFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BinderTransactionReceivedFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BinderTransactionReceivedFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.debugId != null && m.hasOwnProperty("debugId")) {
                    if (!$util.isInteger(m.debugId))
                        return "debugId: integer expected";
                }
                return null;
            };

            /**
             * Creates a BinderTransactionReceivedFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BinderTransactionReceivedFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BinderTransactionReceivedFtraceEvent} BinderTransactionReceivedFtraceEvent
             */
            BinderTransactionReceivedFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BinderTransactionReceivedFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BinderTransactionReceivedFtraceEvent();
                if (d.debugId != null) {
                    m.debugId = d.debugId | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a BinderTransactionReceivedFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BinderTransactionReceivedFtraceEvent
             * @static
             * @param {perfetto.protos.BinderTransactionReceivedFtraceEvent} m BinderTransactionReceivedFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BinderTransactionReceivedFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.debugId = 0;
                }
                if (m.debugId != null && m.hasOwnProperty("debugId")) {
                    d.debugId = m.debugId;
                }
                return d;
            };

            /**
             * Converts this BinderTransactionReceivedFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BinderTransactionReceivedFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BinderTransactionReceivedFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BinderTransactionReceivedFtraceEvent;
        })();

        protos.BinderSetPriorityFtraceEvent = (function() {

            /**
             * Properties of a BinderSetPriorityFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBinderSetPriorityFtraceEvent
             * @property {number|null} [proc] BinderSetPriorityFtraceEvent proc
             * @property {number|null} [thread] BinderSetPriorityFtraceEvent thread
             * @property {number|null} [oldPrio] BinderSetPriorityFtraceEvent oldPrio
             * @property {number|null} [newPrio] BinderSetPriorityFtraceEvent newPrio
             * @property {number|null} [desiredPrio] BinderSetPriorityFtraceEvent desiredPrio
             */

            /**
             * Constructs a new BinderSetPriorityFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BinderSetPriorityFtraceEvent.
             * @implements IBinderSetPriorityFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBinderSetPriorityFtraceEvent=} [p] Properties to set
             */
            function BinderSetPriorityFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BinderSetPriorityFtraceEvent proc.
             * @member {number} proc
             * @memberof perfetto.protos.BinderSetPriorityFtraceEvent
             * @instance
             */
            BinderSetPriorityFtraceEvent.prototype.proc = 0;

            /**
             * BinderSetPriorityFtraceEvent thread.
             * @member {number} thread
             * @memberof perfetto.protos.BinderSetPriorityFtraceEvent
             * @instance
             */
            BinderSetPriorityFtraceEvent.prototype.thread = 0;

            /**
             * BinderSetPriorityFtraceEvent oldPrio.
             * @member {number} oldPrio
             * @memberof perfetto.protos.BinderSetPriorityFtraceEvent
             * @instance
             */
            BinderSetPriorityFtraceEvent.prototype.oldPrio = 0;

            /**
             * BinderSetPriorityFtraceEvent newPrio.
             * @member {number} newPrio
             * @memberof perfetto.protos.BinderSetPriorityFtraceEvent
             * @instance
             */
            BinderSetPriorityFtraceEvent.prototype.newPrio = 0;

            /**
             * BinderSetPriorityFtraceEvent desiredPrio.
             * @member {number} desiredPrio
             * @memberof perfetto.protos.BinderSetPriorityFtraceEvent
             * @instance
             */
            BinderSetPriorityFtraceEvent.prototype.desiredPrio = 0;

            /**
             * Creates a new BinderSetPriorityFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BinderSetPriorityFtraceEvent
             * @static
             * @param {perfetto.protos.IBinderSetPriorityFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BinderSetPriorityFtraceEvent} BinderSetPriorityFtraceEvent instance
             */
            BinderSetPriorityFtraceEvent.create = function create(properties) {
                return new BinderSetPriorityFtraceEvent(properties);
            };

            /**
             * Encodes the specified BinderSetPriorityFtraceEvent message. Does not implicitly {@link perfetto.protos.BinderSetPriorityFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BinderSetPriorityFtraceEvent
             * @static
             * @param {perfetto.protos.IBinderSetPriorityFtraceEvent} m BinderSetPriorityFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BinderSetPriorityFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.proc != null && Object.hasOwnProperty.call(m, "proc"))
                    w.uint32(8).int32(m.proc);
                if (m.thread != null && Object.hasOwnProperty.call(m, "thread"))
                    w.uint32(16).int32(m.thread);
                if (m.oldPrio != null && Object.hasOwnProperty.call(m, "oldPrio"))
                    w.uint32(24).uint32(m.oldPrio);
                if (m.newPrio != null && Object.hasOwnProperty.call(m, "newPrio"))
                    w.uint32(32).uint32(m.newPrio);
                if (m.desiredPrio != null && Object.hasOwnProperty.call(m, "desiredPrio"))
                    w.uint32(40).uint32(m.desiredPrio);
                return w;
            };

            /**
             * Encodes the specified BinderSetPriorityFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BinderSetPriorityFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BinderSetPriorityFtraceEvent
             * @static
             * @param {perfetto.protos.IBinderSetPriorityFtraceEvent} message BinderSetPriorityFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BinderSetPriorityFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BinderSetPriorityFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BinderSetPriorityFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BinderSetPriorityFtraceEvent} BinderSetPriorityFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BinderSetPriorityFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BinderSetPriorityFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.proc = r.int32();
                        break;
                    case 2:
                        m.thread = r.int32();
                        break;
                    case 3:
                        m.oldPrio = r.uint32();
                        break;
                    case 4:
                        m.newPrio = r.uint32();
                        break;
                    case 5:
                        m.desiredPrio = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BinderSetPriorityFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BinderSetPriorityFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BinderSetPriorityFtraceEvent} BinderSetPriorityFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BinderSetPriorityFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BinderSetPriorityFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BinderSetPriorityFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BinderSetPriorityFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.proc != null && m.hasOwnProperty("proc")) {
                    if (!$util.isInteger(m.proc))
                        return "proc: integer expected";
                }
                if (m.thread != null && m.hasOwnProperty("thread")) {
                    if (!$util.isInteger(m.thread))
                        return "thread: integer expected";
                }
                if (m.oldPrio != null && m.hasOwnProperty("oldPrio")) {
                    if (!$util.isInteger(m.oldPrio))
                        return "oldPrio: integer expected";
                }
                if (m.newPrio != null && m.hasOwnProperty("newPrio")) {
                    if (!$util.isInteger(m.newPrio))
                        return "newPrio: integer expected";
                }
                if (m.desiredPrio != null && m.hasOwnProperty("desiredPrio")) {
                    if (!$util.isInteger(m.desiredPrio))
                        return "desiredPrio: integer expected";
                }
                return null;
            };

            /**
             * Creates a BinderSetPriorityFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BinderSetPriorityFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BinderSetPriorityFtraceEvent} BinderSetPriorityFtraceEvent
             */
            BinderSetPriorityFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BinderSetPriorityFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BinderSetPriorityFtraceEvent();
                if (d.proc != null) {
                    m.proc = d.proc | 0;
                }
                if (d.thread != null) {
                    m.thread = d.thread | 0;
                }
                if (d.oldPrio != null) {
                    m.oldPrio = d.oldPrio >>> 0;
                }
                if (d.newPrio != null) {
                    m.newPrio = d.newPrio >>> 0;
                }
                if (d.desiredPrio != null) {
                    m.desiredPrio = d.desiredPrio >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a BinderSetPriorityFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BinderSetPriorityFtraceEvent
             * @static
             * @param {perfetto.protos.BinderSetPriorityFtraceEvent} m BinderSetPriorityFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BinderSetPriorityFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.proc = 0;
                    d.thread = 0;
                    d.oldPrio = 0;
                    d.newPrio = 0;
                    d.desiredPrio = 0;
                }
                if (m.proc != null && m.hasOwnProperty("proc")) {
                    d.proc = m.proc;
                }
                if (m.thread != null && m.hasOwnProperty("thread")) {
                    d.thread = m.thread;
                }
                if (m.oldPrio != null && m.hasOwnProperty("oldPrio")) {
                    d.oldPrio = m.oldPrio;
                }
                if (m.newPrio != null && m.hasOwnProperty("newPrio")) {
                    d.newPrio = m.newPrio;
                }
                if (m.desiredPrio != null && m.hasOwnProperty("desiredPrio")) {
                    d.desiredPrio = m.desiredPrio;
                }
                return d;
            };

            /**
             * Converts this BinderSetPriorityFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BinderSetPriorityFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BinderSetPriorityFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BinderSetPriorityFtraceEvent;
        })();

        protos.BinderLockFtraceEvent = (function() {

            /**
             * Properties of a BinderLockFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBinderLockFtraceEvent
             * @property {string|null} [tag] BinderLockFtraceEvent tag
             */

            /**
             * Constructs a new BinderLockFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BinderLockFtraceEvent.
             * @implements IBinderLockFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBinderLockFtraceEvent=} [p] Properties to set
             */
            function BinderLockFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BinderLockFtraceEvent tag.
             * @member {string} tag
             * @memberof perfetto.protos.BinderLockFtraceEvent
             * @instance
             */
            BinderLockFtraceEvent.prototype.tag = "";

            /**
             * Creates a new BinderLockFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BinderLockFtraceEvent
             * @static
             * @param {perfetto.protos.IBinderLockFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BinderLockFtraceEvent} BinderLockFtraceEvent instance
             */
            BinderLockFtraceEvent.create = function create(properties) {
                return new BinderLockFtraceEvent(properties);
            };

            /**
             * Encodes the specified BinderLockFtraceEvent message. Does not implicitly {@link perfetto.protos.BinderLockFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BinderLockFtraceEvent
             * @static
             * @param {perfetto.protos.IBinderLockFtraceEvent} m BinderLockFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BinderLockFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.tag != null && Object.hasOwnProperty.call(m, "tag"))
                    w.uint32(10).string(m.tag);
                return w;
            };

            /**
             * Encodes the specified BinderLockFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BinderLockFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BinderLockFtraceEvent
             * @static
             * @param {perfetto.protos.IBinderLockFtraceEvent} message BinderLockFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BinderLockFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BinderLockFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BinderLockFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BinderLockFtraceEvent} BinderLockFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BinderLockFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BinderLockFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.tag = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BinderLockFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BinderLockFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BinderLockFtraceEvent} BinderLockFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BinderLockFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BinderLockFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BinderLockFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BinderLockFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.tag != null && m.hasOwnProperty("tag")) {
                    if (!$util.isString(m.tag))
                        return "tag: string expected";
                }
                return null;
            };

            /**
             * Creates a BinderLockFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BinderLockFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BinderLockFtraceEvent} BinderLockFtraceEvent
             */
            BinderLockFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BinderLockFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BinderLockFtraceEvent();
                if (d.tag != null) {
                    m.tag = String(d.tag);
                }
                return m;
            };

            /**
             * Creates a plain object from a BinderLockFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BinderLockFtraceEvent
             * @static
             * @param {perfetto.protos.BinderLockFtraceEvent} m BinderLockFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BinderLockFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.tag = "";
                }
                if (m.tag != null && m.hasOwnProperty("tag")) {
                    d.tag = m.tag;
                }
                return d;
            };

            /**
             * Converts this BinderLockFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BinderLockFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BinderLockFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BinderLockFtraceEvent;
        })();

        protos.BinderLockedFtraceEvent = (function() {

            /**
             * Properties of a BinderLockedFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBinderLockedFtraceEvent
             * @property {string|null} [tag] BinderLockedFtraceEvent tag
             */

            /**
             * Constructs a new BinderLockedFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BinderLockedFtraceEvent.
             * @implements IBinderLockedFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBinderLockedFtraceEvent=} [p] Properties to set
             */
            function BinderLockedFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BinderLockedFtraceEvent tag.
             * @member {string} tag
             * @memberof perfetto.protos.BinderLockedFtraceEvent
             * @instance
             */
            BinderLockedFtraceEvent.prototype.tag = "";

            /**
             * Creates a new BinderLockedFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BinderLockedFtraceEvent
             * @static
             * @param {perfetto.protos.IBinderLockedFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BinderLockedFtraceEvent} BinderLockedFtraceEvent instance
             */
            BinderLockedFtraceEvent.create = function create(properties) {
                return new BinderLockedFtraceEvent(properties);
            };

            /**
             * Encodes the specified BinderLockedFtraceEvent message. Does not implicitly {@link perfetto.protos.BinderLockedFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BinderLockedFtraceEvent
             * @static
             * @param {perfetto.protos.IBinderLockedFtraceEvent} m BinderLockedFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BinderLockedFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.tag != null && Object.hasOwnProperty.call(m, "tag"))
                    w.uint32(10).string(m.tag);
                return w;
            };

            /**
             * Encodes the specified BinderLockedFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BinderLockedFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BinderLockedFtraceEvent
             * @static
             * @param {perfetto.protos.IBinderLockedFtraceEvent} message BinderLockedFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BinderLockedFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BinderLockedFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BinderLockedFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BinderLockedFtraceEvent} BinderLockedFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BinderLockedFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BinderLockedFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.tag = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BinderLockedFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BinderLockedFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BinderLockedFtraceEvent} BinderLockedFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BinderLockedFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BinderLockedFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BinderLockedFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BinderLockedFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.tag != null && m.hasOwnProperty("tag")) {
                    if (!$util.isString(m.tag))
                        return "tag: string expected";
                }
                return null;
            };

            /**
             * Creates a BinderLockedFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BinderLockedFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BinderLockedFtraceEvent} BinderLockedFtraceEvent
             */
            BinderLockedFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BinderLockedFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BinderLockedFtraceEvent();
                if (d.tag != null) {
                    m.tag = String(d.tag);
                }
                return m;
            };

            /**
             * Creates a plain object from a BinderLockedFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BinderLockedFtraceEvent
             * @static
             * @param {perfetto.protos.BinderLockedFtraceEvent} m BinderLockedFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BinderLockedFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.tag = "";
                }
                if (m.tag != null && m.hasOwnProperty("tag")) {
                    d.tag = m.tag;
                }
                return d;
            };

            /**
             * Converts this BinderLockedFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BinderLockedFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BinderLockedFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BinderLockedFtraceEvent;
        })();

        protos.BinderUnlockFtraceEvent = (function() {

            /**
             * Properties of a BinderUnlockFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBinderUnlockFtraceEvent
             * @property {string|null} [tag] BinderUnlockFtraceEvent tag
             */

            /**
             * Constructs a new BinderUnlockFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BinderUnlockFtraceEvent.
             * @implements IBinderUnlockFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBinderUnlockFtraceEvent=} [p] Properties to set
             */
            function BinderUnlockFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BinderUnlockFtraceEvent tag.
             * @member {string} tag
             * @memberof perfetto.protos.BinderUnlockFtraceEvent
             * @instance
             */
            BinderUnlockFtraceEvent.prototype.tag = "";

            /**
             * Creates a new BinderUnlockFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BinderUnlockFtraceEvent
             * @static
             * @param {perfetto.protos.IBinderUnlockFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BinderUnlockFtraceEvent} BinderUnlockFtraceEvent instance
             */
            BinderUnlockFtraceEvent.create = function create(properties) {
                return new BinderUnlockFtraceEvent(properties);
            };

            /**
             * Encodes the specified BinderUnlockFtraceEvent message. Does not implicitly {@link perfetto.protos.BinderUnlockFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BinderUnlockFtraceEvent
             * @static
             * @param {perfetto.protos.IBinderUnlockFtraceEvent} m BinderUnlockFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BinderUnlockFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.tag != null && Object.hasOwnProperty.call(m, "tag"))
                    w.uint32(10).string(m.tag);
                return w;
            };

            /**
             * Encodes the specified BinderUnlockFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BinderUnlockFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BinderUnlockFtraceEvent
             * @static
             * @param {perfetto.protos.IBinderUnlockFtraceEvent} message BinderUnlockFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BinderUnlockFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BinderUnlockFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BinderUnlockFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BinderUnlockFtraceEvent} BinderUnlockFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BinderUnlockFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BinderUnlockFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.tag = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BinderUnlockFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BinderUnlockFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BinderUnlockFtraceEvent} BinderUnlockFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BinderUnlockFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BinderUnlockFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BinderUnlockFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BinderUnlockFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.tag != null && m.hasOwnProperty("tag")) {
                    if (!$util.isString(m.tag))
                        return "tag: string expected";
                }
                return null;
            };

            /**
             * Creates a BinderUnlockFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BinderUnlockFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BinderUnlockFtraceEvent} BinderUnlockFtraceEvent
             */
            BinderUnlockFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BinderUnlockFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BinderUnlockFtraceEvent();
                if (d.tag != null) {
                    m.tag = String(d.tag);
                }
                return m;
            };

            /**
             * Creates a plain object from a BinderUnlockFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BinderUnlockFtraceEvent
             * @static
             * @param {perfetto.protos.BinderUnlockFtraceEvent} m BinderUnlockFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BinderUnlockFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.tag = "";
                }
                if (m.tag != null && m.hasOwnProperty("tag")) {
                    d.tag = m.tag;
                }
                return d;
            };

            /**
             * Converts this BinderUnlockFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BinderUnlockFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BinderUnlockFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BinderUnlockFtraceEvent;
        })();

        protos.BinderTransactionAllocBufFtraceEvent = (function() {

            /**
             * Properties of a BinderTransactionAllocBufFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBinderTransactionAllocBufFtraceEvent
             * @property {number|null} [dataSize] BinderTransactionAllocBufFtraceEvent dataSize
             * @property {number|null} [debugId] BinderTransactionAllocBufFtraceEvent debugId
             * @property {number|null} [offsetsSize] BinderTransactionAllocBufFtraceEvent offsetsSize
             * @property {number|null} [extraBuffersSize] BinderTransactionAllocBufFtraceEvent extraBuffersSize
             */

            /**
             * Constructs a new BinderTransactionAllocBufFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BinderTransactionAllocBufFtraceEvent.
             * @implements IBinderTransactionAllocBufFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBinderTransactionAllocBufFtraceEvent=} [p] Properties to set
             */
            function BinderTransactionAllocBufFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BinderTransactionAllocBufFtraceEvent dataSize.
             * @member {number} dataSize
             * @memberof perfetto.protos.BinderTransactionAllocBufFtraceEvent
             * @instance
             */
            BinderTransactionAllocBufFtraceEvent.prototype.dataSize = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BinderTransactionAllocBufFtraceEvent debugId.
             * @member {number} debugId
             * @memberof perfetto.protos.BinderTransactionAllocBufFtraceEvent
             * @instance
             */
            BinderTransactionAllocBufFtraceEvent.prototype.debugId = 0;

            /**
             * BinderTransactionAllocBufFtraceEvent offsetsSize.
             * @member {number} offsetsSize
             * @memberof perfetto.protos.BinderTransactionAllocBufFtraceEvent
             * @instance
             */
            BinderTransactionAllocBufFtraceEvent.prototype.offsetsSize = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BinderTransactionAllocBufFtraceEvent extraBuffersSize.
             * @member {number} extraBuffersSize
             * @memberof perfetto.protos.BinderTransactionAllocBufFtraceEvent
             * @instance
             */
            BinderTransactionAllocBufFtraceEvent.prototype.extraBuffersSize = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new BinderTransactionAllocBufFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BinderTransactionAllocBufFtraceEvent
             * @static
             * @param {perfetto.protos.IBinderTransactionAllocBufFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BinderTransactionAllocBufFtraceEvent} BinderTransactionAllocBufFtraceEvent instance
             */
            BinderTransactionAllocBufFtraceEvent.create = function create(properties) {
                return new BinderTransactionAllocBufFtraceEvent(properties);
            };

            /**
             * Encodes the specified BinderTransactionAllocBufFtraceEvent message. Does not implicitly {@link perfetto.protos.BinderTransactionAllocBufFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BinderTransactionAllocBufFtraceEvent
             * @static
             * @param {perfetto.protos.IBinderTransactionAllocBufFtraceEvent} m BinderTransactionAllocBufFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BinderTransactionAllocBufFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dataSize != null && Object.hasOwnProperty.call(m, "dataSize"))
                    w.uint32(8).uint64(m.dataSize);
                if (m.debugId != null && Object.hasOwnProperty.call(m, "debugId"))
                    w.uint32(16).int32(m.debugId);
                if (m.offsetsSize != null && Object.hasOwnProperty.call(m, "offsetsSize"))
                    w.uint32(24).uint64(m.offsetsSize);
                if (m.extraBuffersSize != null && Object.hasOwnProperty.call(m, "extraBuffersSize"))
                    w.uint32(32).uint64(m.extraBuffersSize);
                return w;
            };

            /**
             * Encodes the specified BinderTransactionAllocBufFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BinderTransactionAllocBufFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BinderTransactionAllocBufFtraceEvent
             * @static
             * @param {perfetto.protos.IBinderTransactionAllocBufFtraceEvent} message BinderTransactionAllocBufFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BinderTransactionAllocBufFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BinderTransactionAllocBufFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BinderTransactionAllocBufFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BinderTransactionAllocBufFtraceEvent} BinderTransactionAllocBufFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BinderTransactionAllocBufFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BinderTransactionAllocBufFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dataSize = r.uint64();
                        break;
                    case 2:
                        m.debugId = r.int32();
                        break;
                    case 3:
                        m.offsetsSize = r.uint64();
                        break;
                    case 4:
                        m.extraBuffersSize = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BinderTransactionAllocBufFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BinderTransactionAllocBufFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BinderTransactionAllocBufFtraceEvent} BinderTransactionAllocBufFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BinderTransactionAllocBufFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BinderTransactionAllocBufFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BinderTransactionAllocBufFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BinderTransactionAllocBufFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dataSize != null && m.hasOwnProperty("dataSize")) {
                    if (!$util.isInteger(m.dataSize) && !(m.dataSize && $util.isInteger(m.dataSize.low) && $util.isInteger(m.dataSize.high)))
                        return "dataSize: integer|Long expected";
                }
                if (m.debugId != null && m.hasOwnProperty("debugId")) {
                    if (!$util.isInteger(m.debugId))
                        return "debugId: integer expected";
                }
                if (m.offsetsSize != null && m.hasOwnProperty("offsetsSize")) {
                    if (!$util.isInteger(m.offsetsSize) && !(m.offsetsSize && $util.isInteger(m.offsetsSize.low) && $util.isInteger(m.offsetsSize.high)))
                        return "offsetsSize: integer|Long expected";
                }
                if (m.extraBuffersSize != null && m.hasOwnProperty("extraBuffersSize")) {
                    if (!$util.isInteger(m.extraBuffersSize) && !(m.extraBuffersSize && $util.isInteger(m.extraBuffersSize.low) && $util.isInteger(m.extraBuffersSize.high)))
                        return "extraBuffersSize: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a BinderTransactionAllocBufFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BinderTransactionAllocBufFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BinderTransactionAllocBufFtraceEvent} BinderTransactionAllocBufFtraceEvent
             */
            BinderTransactionAllocBufFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BinderTransactionAllocBufFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BinderTransactionAllocBufFtraceEvent();
                if (d.dataSize != null) {
                    if ($util.Long)
                        (m.dataSize = $util.Long.fromValue(d.dataSize)).unsigned = true;
                    else if (typeof d.dataSize === "string")
                        m.dataSize = parseInt(d.dataSize, 10);
                    else if (typeof d.dataSize === "number")
                        m.dataSize = d.dataSize;
                    else if (typeof d.dataSize === "object")
                        m.dataSize = new $util.LongBits(d.dataSize.low >>> 0, d.dataSize.high >>> 0).toNumber(true);
                }
                if (d.debugId != null) {
                    m.debugId = d.debugId | 0;
                }
                if (d.offsetsSize != null) {
                    if ($util.Long)
                        (m.offsetsSize = $util.Long.fromValue(d.offsetsSize)).unsigned = true;
                    else if (typeof d.offsetsSize === "string")
                        m.offsetsSize = parseInt(d.offsetsSize, 10);
                    else if (typeof d.offsetsSize === "number")
                        m.offsetsSize = d.offsetsSize;
                    else if (typeof d.offsetsSize === "object")
                        m.offsetsSize = new $util.LongBits(d.offsetsSize.low >>> 0, d.offsetsSize.high >>> 0).toNumber(true);
                }
                if (d.extraBuffersSize != null) {
                    if ($util.Long)
                        (m.extraBuffersSize = $util.Long.fromValue(d.extraBuffersSize)).unsigned = true;
                    else if (typeof d.extraBuffersSize === "string")
                        m.extraBuffersSize = parseInt(d.extraBuffersSize, 10);
                    else if (typeof d.extraBuffersSize === "number")
                        m.extraBuffersSize = d.extraBuffersSize;
                    else if (typeof d.extraBuffersSize === "object")
                        m.extraBuffersSize = new $util.LongBits(d.extraBuffersSize.low >>> 0, d.extraBuffersSize.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a BinderTransactionAllocBufFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BinderTransactionAllocBufFtraceEvent
             * @static
             * @param {perfetto.protos.BinderTransactionAllocBufFtraceEvent} m BinderTransactionAllocBufFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BinderTransactionAllocBufFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dataSize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dataSize = o.longs === String ? "0" : 0;
                    d.debugId = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.offsetsSize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.offsetsSize = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.extraBuffersSize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.extraBuffersSize = o.longs === String ? "0" : 0;
                }
                if (m.dataSize != null && m.hasOwnProperty("dataSize")) {
                    if (typeof m.dataSize === "number")
                        d.dataSize = o.longs === String ? String(m.dataSize) : m.dataSize;
                    else
                        d.dataSize = o.longs === String ? $util.Long.prototype.toString.call(m.dataSize) : o.longs === Number ? new $util.LongBits(m.dataSize.low >>> 0, m.dataSize.high >>> 0).toNumber(true) : m.dataSize;
                }
                if (m.debugId != null && m.hasOwnProperty("debugId")) {
                    d.debugId = m.debugId;
                }
                if (m.offsetsSize != null && m.hasOwnProperty("offsetsSize")) {
                    if (typeof m.offsetsSize === "number")
                        d.offsetsSize = o.longs === String ? String(m.offsetsSize) : m.offsetsSize;
                    else
                        d.offsetsSize = o.longs === String ? $util.Long.prototype.toString.call(m.offsetsSize) : o.longs === Number ? new $util.LongBits(m.offsetsSize.low >>> 0, m.offsetsSize.high >>> 0).toNumber(true) : m.offsetsSize;
                }
                if (m.extraBuffersSize != null && m.hasOwnProperty("extraBuffersSize")) {
                    if (typeof m.extraBuffersSize === "number")
                        d.extraBuffersSize = o.longs === String ? String(m.extraBuffersSize) : m.extraBuffersSize;
                    else
                        d.extraBuffersSize = o.longs === String ? $util.Long.prototype.toString.call(m.extraBuffersSize) : o.longs === Number ? new $util.LongBits(m.extraBuffersSize.low >>> 0, m.extraBuffersSize.high >>> 0).toNumber(true) : m.extraBuffersSize;
                }
                return d;
            };

            /**
             * Converts this BinderTransactionAllocBufFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BinderTransactionAllocBufFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BinderTransactionAllocBufFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BinderTransactionAllocBufFtraceEvent;
        })();

        protos.BlockRqIssueFtraceEvent = (function() {

            /**
             * Properties of a BlockRqIssueFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBlockRqIssueFtraceEvent
             * @property {number|null} [dev] BlockRqIssueFtraceEvent dev
             * @property {number|null} [sector] BlockRqIssueFtraceEvent sector
             * @property {number|null} [nrSector] BlockRqIssueFtraceEvent nrSector
             * @property {number|null} [bytes] BlockRqIssueFtraceEvent bytes
             * @property {string|null} [rwbs] BlockRqIssueFtraceEvent rwbs
             * @property {string|null} [comm] BlockRqIssueFtraceEvent comm
             * @property {string|null} [cmd] BlockRqIssueFtraceEvent cmd
             */

            /**
             * Constructs a new BlockRqIssueFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BlockRqIssueFtraceEvent.
             * @implements IBlockRqIssueFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBlockRqIssueFtraceEvent=} [p] Properties to set
             */
            function BlockRqIssueFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BlockRqIssueFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.BlockRqIssueFtraceEvent
             * @instance
             */
            BlockRqIssueFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockRqIssueFtraceEvent sector.
             * @member {number} sector
             * @memberof perfetto.protos.BlockRqIssueFtraceEvent
             * @instance
             */
            BlockRqIssueFtraceEvent.prototype.sector = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockRqIssueFtraceEvent nrSector.
             * @member {number} nrSector
             * @memberof perfetto.protos.BlockRqIssueFtraceEvent
             * @instance
             */
            BlockRqIssueFtraceEvent.prototype.nrSector = 0;

            /**
             * BlockRqIssueFtraceEvent bytes.
             * @member {number} bytes
             * @memberof perfetto.protos.BlockRqIssueFtraceEvent
             * @instance
             */
            BlockRqIssueFtraceEvent.prototype.bytes = 0;

            /**
             * BlockRqIssueFtraceEvent rwbs.
             * @member {string} rwbs
             * @memberof perfetto.protos.BlockRqIssueFtraceEvent
             * @instance
             */
            BlockRqIssueFtraceEvent.prototype.rwbs = "";

            /**
             * BlockRqIssueFtraceEvent comm.
             * @member {string} comm
             * @memberof perfetto.protos.BlockRqIssueFtraceEvent
             * @instance
             */
            BlockRqIssueFtraceEvent.prototype.comm = "";

            /**
             * BlockRqIssueFtraceEvent cmd.
             * @member {string} cmd
             * @memberof perfetto.protos.BlockRqIssueFtraceEvent
             * @instance
             */
            BlockRqIssueFtraceEvent.prototype.cmd = "";

            /**
             * Creates a new BlockRqIssueFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BlockRqIssueFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockRqIssueFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BlockRqIssueFtraceEvent} BlockRqIssueFtraceEvent instance
             */
            BlockRqIssueFtraceEvent.create = function create(properties) {
                return new BlockRqIssueFtraceEvent(properties);
            };

            /**
             * Encodes the specified BlockRqIssueFtraceEvent message. Does not implicitly {@link perfetto.protos.BlockRqIssueFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BlockRqIssueFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockRqIssueFtraceEvent} m BlockRqIssueFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockRqIssueFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.sector != null && Object.hasOwnProperty.call(m, "sector"))
                    w.uint32(16).uint64(m.sector);
                if (m.nrSector != null && Object.hasOwnProperty.call(m, "nrSector"))
                    w.uint32(24).uint32(m.nrSector);
                if (m.bytes != null && Object.hasOwnProperty.call(m, "bytes"))
                    w.uint32(32).uint32(m.bytes);
                if (m.rwbs != null && Object.hasOwnProperty.call(m, "rwbs"))
                    w.uint32(42).string(m.rwbs);
                if (m.comm != null && Object.hasOwnProperty.call(m, "comm"))
                    w.uint32(50).string(m.comm);
                if (m.cmd != null && Object.hasOwnProperty.call(m, "cmd"))
                    w.uint32(58).string(m.cmd);
                return w;
            };

            /**
             * Encodes the specified BlockRqIssueFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BlockRqIssueFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BlockRqIssueFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockRqIssueFtraceEvent} message BlockRqIssueFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockRqIssueFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BlockRqIssueFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BlockRqIssueFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BlockRqIssueFtraceEvent} BlockRqIssueFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockRqIssueFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BlockRqIssueFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.sector = r.uint64();
                        break;
                    case 3:
                        m.nrSector = r.uint32();
                        break;
                    case 4:
                        m.bytes = r.uint32();
                        break;
                    case 5:
                        m.rwbs = r.string();
                        break;
                    case 6:
                        m.comm = r.string();
                        break;
                    case 7:
                        m.cmd = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BlockRqIssueFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BlockRqIssueFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BlockRqIssueFtraceEvent} BlockRqIssueFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockRqIssueFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BlockRqIssueFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BlockRqIssueFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BlockRqIssueFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (!$util.isInteger(m.sector) && !(m.sector && $util.isInteger(m.sector.low) && $util.isInteger(m.sector.high)))
                        return "sector: integer|Long expected";
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    if (!$util.isInteger(m.nrSector))
                        return "nrSector: integer expected";
                }
                if (m.bytes != null && m.hasOwnProperty("bytes")) {
                    if (!$util.isInteger(m.bytes))
                        return "bytes: integer expected";
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    if (!$util.isString(m.rwbs))
                        return "rwbs: string expected";
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    if (!$util.isString(m.comm))
                        return "comm: string expected";
                }
                if (m.cmd != null && m.hasOwnProperty("cmd")) {
                    if (!$util.isString(m.cmd))
                        return "cmd: string expected";
                }
                return null;
            };

            /**
             * Creates a BlockRqIssueFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BlockRqIssueFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BlockRqIssueFtraceEvent} BlockRqIssueFtraceEvent
             */
            BlockRqIssueFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BlockRqIssueFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BlockRqIssueFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.sector != null) {
                    if ($util.Long)
                        (m.sector = $util.Long.fromValue(d.sector)).unsigned = true;
                    else if (typeof d.sector === "string")
                        m.sector = parseInt(d.sector, 10);
                    else if (typeof d.sector === "number")
                        m.sector = d.sector;
                    else if (typeof d.sector === "object")
                        m.sector = new $util.LongBits(d.sector.low >>> 0, d.sector.high >>> 0).toNumber(true);
                }
                if (d.nrSector != null) {
                    m.nrSector = d.nrSector >>> 0;
                }
                if (d.bytes != null) {
                    m.bytes = d.bytes >>> 0;
                }
                if (d.rwbs != null) {
                    m.rwbs = String(d.rwbs);
                }
                if (d.comm != null) {
                    m.comm = String(d.comm);
                }
                if (d.cmd != null) {
                    m.cmd = String(d.cmd);
                }
                return m;
            };

            /**
             * Creates a plain object from a BlockRqIssueFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BlockRqIssueFtraceEvent
             * @static
             * @param {perfetto.protos.BlockRqIssueFtraceEvent} m BlockRqIssueFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BlockRqIssueFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sector = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sector = o.longs === String ? "0" : 0;
                    d.nrSector = 0;
                    d.bytes = 0;
                    d.rwbs = "";
                    d.comm = "";
                    d.cmd = "";
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (typeof m.sector === "number")
                        d.sector = o.longs === String ? String(m.sector) : m.sector;
                    else
                        d.sector = o.longs === String ? $util.Long.prototype.toString.call(m.sector) : o.longs === Number ? new $util.LongBits(m.sector.low >>> 0, m.sector.high >>> 0).toNumber(true) : m.sector;
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    d.nrSector = m.nrSector;
                }
                if (m.bytes != null && m.hasOwnProperty("bytes")) {
                    d.bytes = m.bytes;
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    d.rwbs = m.rwbs;
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    d.comm = m.comm;
                }
                if (m.cmd != null && m.hasOwnProperty("cmd")) {
                    d.cmd = m.cmd;
                }
                return d;
            };

            /**
             * Converts this BlockRqIssueFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BlockRqIssueFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BlockRqIssueFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BlockRqIssueFtraceEvent;
        })();

        protos.BlockBioBackmergeFtraceEvent = (function() {

            /**
             * Properties of a BlockBioBackmergeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBlockBioBackmergeFtraceEvent
             * @property {number|null} [dev] BlockBioBackmergeFtraceEvent dev
             * @property {number|null} [sector] BlockBioBackmergeFtraceEvent sector
             * @property {number|null} [nrSector] BlockBioBackmergeFtraceEvent nrSector
             * @property {string|null} [rwbs] BlockBioBackmergeFtraceEvent rwbs
             * @property {string|null} [comm] BlockBioBackmergeFtraceEvent comm
             */

            /**
             * Constructs a new BlockBioBackmergeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BlockBioBackmergeFtraceEvent.
             * @implements IBlockBioBackmergeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBlockBioBackmergeFtraceEvent=} [p] Properties to set
             */
            function BlockBioBackmergeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BlockBioBackmergeFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.BlockBioBackmergeFtraceEvent
             * @instance
             */
            BlockBioBackmergeFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockBioBackmergeFtraceEvent sector.
             * @member {number} sector
             * @memberof perfetto.protos.BlockBioBackmergeFtraceEvent
             * @instance
             */
            BlockBioBackmergeFtraceEvent.prototype.sector = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockBioBackmergeFtraceEvent nrSector.
             * @member {number} nrSector
             * @memberof perfetto.protos.BlockBioBackmergeFtraceEvent
             * @instance
             */
            BlockBioBackmergeFtraceEvent.prototype.nrSector = 0;

            /**
             * BlockBioBackmergeFtraceEvent rwbs.
             * @member {string} rwbs
             * @memberof perfetto.protos.BlockBioBackmergeFtraceEvent
             * @instance
             */
            BlockBioBackmergeFtraceEvent.prototype.rwbs = "";

            /**
             * BlockBioBackmergeFtraceEvent comm.
             * @member {string} comm
             * @memberof perfetto.protos.BlockBioBackmergeFtraceEvent
             * @instance
             */
            BlockBioBackmergeFtraceEvent.prototype.comm = "";

            /**
             * Creates a new BlockBioBackmergeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BlockBioBackmergeFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockBioBackmergeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BlockBioBackmergeFtraceEvent} BlockBioBackmergeFtraceEvent instance
             */
            BlockBioBackmergeFtraceEvent.create = function create(properties) {
                return new BlockBioBackmergeFtraceEvent(properties);
            };

            /**
             * Encodes the specified BlockBioBackmergeFtraceEvent message. Does not implicitly {@link perfetto.protos.BlockBioBackmergeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BlockBioBackmergeFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockBioBackmergeFtraceEvent} m BlockBioBackmergeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockBioBackmergeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.sector != null && Object.hasOwnProperty.call(m, "sector"))
                    w.uint32(16).uint64(m.sector);
                if (m.nrSector != null && Object.hasOwnProperty.call(m, "nrSector"))
                    w.uint32(24).uint32(m.nrSector);
                if (m.rwbs != null && Object.hasOwnProperty.call(m, "rwbs"))
                    w.uint32(34).string(m.rwbs);
                if (m.comm != null && Object.hasOwnProperty.call(m, "comm"))
                    w.uint32(42).string(m.comm);
                return w;
            };

            /**
             * Encodes the specified BlockBioBackmergeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BlockBioBackmergeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BlockBioBackmergeFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockBioBackmergeFtraceEvent} message BlockBioBackmergeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockBioBackmergeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BlockBioBackmergeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BlockBioBackmergeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BlockBioBackmergeFtraceEvent} BlockBioBackmergeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockBioBackmergeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BlockBioBackmergeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.sector = r.uint64();
                        break;
                    case 3:
                        m.nrSector = r.uint32();
                        break;
                    case 4:
                        m.rwbs = r.string();
                        break;
                    case 5:
                        m.comm = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BlockBioBackmergeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BlockBioBackmergeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BlockBioBackmergeFtraceEvent} BlockBioBackmergeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockBioBackmergeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BlockBioBackmergeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BlockBioBackmergeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BlockBioBackmergeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (!$util.isInteger(m.sector) && !(m.sector && $util.isInteger(m.sector.low) && $util.isInteger(m.sector.high)))
                        return "sector: integer|Long expected";
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    if (!$util.isInteger(m.nrSector))
                        return "nrSector: integer expected";
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    if (!$util.isString(m.rwbs))
                        return "rwbs: string expected";
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    if (!$util.isString(m.comm))
                        return "comm: string expected";
                }
                return null;
            };

            /**
             * Creates a BlockBioBackmergeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BlockBioBackmergeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BlockBioBackmergeFtraceEvent} BlockBioBackmergeFtraceEvent
             */
            BlockBioBackmergeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BlockBioBackmergeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BlockBioBackmergeFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.sector != null) {
                    if ($util.Long)
                        (m.sector = $util.Long.fromValue(d.sector)).unsigned = true;
                    else if (typeof d.sector === "string")
                        m.sector = parseInt(d.sector, 10);
                    else if (typeof d.sector === "number")
                        m.sector = d.sector;
                    else if (typeof d.sector === "object")
                        m.sector = new $util.LongBits(d.sector.low >>> 0, d.sector.high >>> 0).toNumber(true);
                }
                if (d.nrSector != null) {
                    m.nrSector = d.nrSector >>> 0;
                }
                if (d.rwbs != null) {
                    m.rwbs = String(d.rwbs);
                }
                if (d.comm != null) {
                    m.comm = String(d.comm);
                }
                return m;
            };

            /**
             * Creates a plain object from a BlockBioBackmergeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BlockBioBackmergeFtraceEvent
             * @static
             * @param {perfetto.protos.BlockBioBackmergeFtraceEvent} m BlockBioBackmergeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BlockBioBackmergeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sector = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sector = o.longs === String ? "0" : 0;
                    d.nrSector = 0;
                    d.rwbs = "";
                    d.comm = "";
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (typeof m.sector === "number")
                        d.sector = o.longs === String ? String(m.sector) : m.sector;
                    else
                        d.sector = o.longs === String ? $util.Long.prototype.toString.call(m.sector) : o.longs === Number ? new $util.LongBits(m.sector.low >>> 0, m.sector.high >>> 0).toNumber(true) : m.sector;
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    d.nrSector = m.nrSector;
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    d.rwbs = m.rwbs;
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    d.comm = m.comm;
                }
                return d;
            };

            /**
             * Converts this BlockBioBackmergeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BlockBioBackmergeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BlockBioBackmergeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BlockBioBackmergeFtraceEvent;
        })();

        protos.BlockBioBounceFtraceEvent = (function() {

            /**
             * Properties of a BlockBioBounceFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBlockBioBounceFtraceEvent
             * @property {number|null} [dev] BlockBioBounceFtraceEvent dev
             * @property {number|null} [sector] BlockBioBounceFtraceEvent sector
             * @property {number|null} [nrSector] BlockBioBounceFtraceEvent nrSector
             * @property {string|null} [rwbs] BlockBioBounceFtraceEvent rwbs
             * @property {string|null} [comm] BlockBioBounceFtraceEvent comm
             */

            /**
             * Constructs a new BlockBioBounceFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BlockBioBounceFtraceEvent.
             * @implements IBlockBioBounceFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBlockBioBounceFtraceEvent=} [p] Properties to set
             */
            function BlockBioBounceFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BlockBioBounceFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.BlockBioBounceFtraceEvent
             * @instance
             */
            BlockBioBounceFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockBioBounceFtraceEvent sector.
             * @member {number} sector
             * @memberof perfetto.protos.BlockBioBounceFtraceEvent
             * @instance
             */
            BlockBioBounceFtraceEvent.prototype.sector = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockBioBounceFtraceEvent nrSector.
             * @member {number} nrSector
             * @memberof perfetto.protos.BlockBioBounceFtraceEvent
             * @instance
             */
            BlockBioBounceFtraceEvent.prototype.nrSector = 0;

            /**
             * BlockBioBounceFtraceEvent rwbs.
             * @member {string} rwbs
             * @memberof perfetto.protos.BlockBioBounceFtraceEvent
             * @instance
             */
            BlockBioBounceFtraceEvent.prototype.rwbs = "";

            /**
             * BlockBioBounceFtraceEvent comm.
             * @member {string} comm
             * @memberof perfetto.protos.BlockBioBounceFtraceEvent
             * @instance
             */
            BlockBioBounceFtraceEvent.prototype.comm = "";

            /**
             * Creates a new BlockBioBounceFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BlockBioBounceFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockBioBounceFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BlockBioBounceFtraceEvent} BlockBioBounceFtraceEvent instance
             */
            BlockBioBounceFtraceEvent.create = function create(properties) {
                return new BlockBioBounceFtraceEvent(properties);
            };

            /**
             * Encodes the specified BlockBioBounceFtraceEvent message. Does not implicitly {@link perfetto.protos.BlockBioBounceFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BlockBioBounceFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockBioBounceFtraceEvent} m BlockBioBounceFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockBioBounceFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.sector != null && Object.hasOwnProperty.call(m, "sector"))
                    w.uint32(16).uint64(m.sector);
                if (m.nrSector != null && Object.hasOwnProperty.call(m, "nrSector"))
                    w.uint32(24).uint32(m.nrSector);
                if (m.rwbs != null && Object.hasOwnProperty.call(m, "rwbs"))
                    w.uint32(34).string(m.rwbs);
                if (m.comm != null && Object.hasOwnProperty.call(m, "comm"))
                    w.uint32(42).string(m.comm);
                return w;
            };

            /**
             * Encodes the specified BlockBioBounceFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BlockBioBounceFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BlockBioBounceFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockBioBounceFtraceEvent} message BlockBioBounceFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockBioBounceFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BlockBioBounceFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BlockBioBounceFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BlockBioBounceFtraceEvent} BlockBioBounceFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockBioBounceFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BlockBioBounceFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.sector = r.uint64();
                        break;
                    case 3:
                        m.nrSector = r.uint32();
                        break;
                    case 4:
                        m.rwbs = r.string();
                        break;
                    case 5:
                        m.comm = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BlockBioBounceFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BlockBioBounceFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BlockBioBounceFtraceEvent} BlockBioBounceFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockBioBounceFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BlockBioBounceFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BlockBioBounceFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BlockBioBounceFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (!$util.isInteger(m.sector) && !(m.sector && $util.isInteger(m.sector.low) && $util.isInteger(m.sector.high)))
                        return "sector: integer|Long expected";
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    if (!$util.isInteger(m.nrSector))
                        return "nrSector: integer expected";
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    if (!$util.isString(m.rwbs))
                        return "rwbs: string expected";
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    if (!$util.isString(m.comm))
                        return "comm: string expected";
                }
                return null;
            };

            /**
             * Creates a BlockBioBounceFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BlockBioBounceFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BlockBioBounceFtraceEvent} BlockBioBounceFtraceEvent
             */
            BlockBioBounceFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BlockBioBounceFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BlockBioBounceFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.sector != null) {
                    if ($util.Long)
                        (m.sector = $util.Long.fromValue(d.sector)).unsigned = true;
                    else if (typeof d.sector === "string")
                        m.sector = parseInt(d.sector, 10);
                    else if (typeof d.sector === "number")
                        m.sector = d.sector;
                    else if (typeof d.sector === "object")
                        m.sector = new $util.LongBits(d.sector.low >>> 0, d.sector.high >>> 0).toNumber(true);
                }
                if (d.nrSector != null) {
                    m.nrSector = d.nrSector >>> 0;
                }
                if (d.rwbs != null) {
                    m.rwbs = String(d.rwbs);
                }
                if (d.comm != null) {
                    m.comm = String(d.comm);
                }
                return m;
            };

            /**
             * Creates a plain object from a BlockBioBounceFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BlockBioBounceFtraceEvent
             * @static
             * @param {perfetto.protos.BlockBioBounceFtraceEvent} m BlockBioBounceFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BlockBioBounceFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sector = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sector = o.longs === String ? "0" : 0;
                    d.nrSector = 0;
                    d.rwbs = "";
                    d.comm = "";
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (typeof m.sector === "number")
                        d.sector = o.longs === String ? String(m.sector) : m.sector;
                    else
                        d.sector = o.longs === String ? $util.Long.prototype.toString.call(m.sector) : o.longs === Number ? new $util.LongBits(m.sector.low >>> 0, m.sector.high >>> 0).toNumber(true) : m.sector;
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    d.nrSector = m.nrSector;
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    d.rwbs = m.rwbs;
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    d.comm = m.comm;
                }
                return d;
            };

            /**
             * Converts this BlockBioBounceFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BlockBioBounceFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BlockBioBounceFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BlockBioBounceFtraceEvent;
        })();

        protos.BlockBioCompleteFtraceEvent = (function() {

            /**
             * Properties of a BlockBioCompleteFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBlockBioCompleteFtraceEvent
             * @property {number|null} [dev] BlockBioCompleteFtraceEvent dev
             * @property {number|null} [sector] BlockBioCompleteFtraceEvent sector
             * @property {number|null} [nrSector] BlockBioCompleteFtraceEvent nrSector
             * @property {number|null} [error] BlockBioCompleteFtraceEvent error
             * @property {string|null} [rwbs] BlockBioCompleteFtraceEvent rwbs
             */

            /**
             * Constructs a new BlockBioCompleteFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BlockBioCompleteFtraceEvent.
             * @implements IBlockBioCompleteFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBlockBioCompleteFtraceEvent=} [p] Properties to set
             */
            function BlockBioCompleteFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BlockBioCompleteFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.BlockBioCompleteFtraceEvent
             * @instance
             */
            BlockBioCompleteFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockBioCompleteFtraceEvent sector.
             * @member {number} sector
             * @memberof perfetto.protos.BlockBioCompleteFtraceEvent
             * @instance
             */
            BlockBioCompleteFtraceEvent.prototype.sector = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockBioCompleteFtraceEvent nrSector.
             * @member {number} nrSector
             * @memberof perfetto.protos.BlockBioCompleteFtraceEvent
             * @instance
             */
            BlockBioCompleteFtraceEvent.prototype.nrSector = 0;

            /**
             * BlockBioCompleteFtraceEvent error.
             * @member {number} error
             * @memberof perfetto.protos.BlockBioCompleteFtraceEvent
             * @instance
             */
            BlockBioCompleteFtraceEvent.prototype.error = 0;

            /**
             * BlockBioCompleteFtraceEvent rwbs.
             * @member {string} rwbs
             * @memberof perfetto.protos.BlockBioCompleteFtraceEvent
             * @instance
             */
            BlockBioCompleteFtraceEvent.prototype.rwbs = "";

            /**
             * Creates a new BlockBioCompleteFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BlockBioCompleteFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockBioCompleteFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BlockBioCompleteFtraceEvent} BlockBioCompleteFtraceEvent instance
             */
            BlockBioCompleteFtraceEvent.create = function create(properties) {
                return new BlockBioCompleteFtraceEvent(properties);
            };

            /**
             * Encodes the specified BlockBioCompleteFtraceEvent message. Does not implicitly {@link perfetto.protos.BlockBioCompleteFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BlockBioCompleteFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockBioCompleteFtraceEvent} m BlockBioCompleteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockBioCompleteFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.sector != null && Object.hasOwnProperty.call(m, "sector"))
                    w.uint32(16).uint64(m.sector);
                if (m.nrSector != null && Object.hasOwnProperty.call(m, "nrSector"))
                    w.uint32(24).uint32(m.nrSector);
                if (m.error != null && Object.hasOwnProperty.call(m, "error"))
                    w.uint32(32).int32(m.error);
                if (m.rwbs != null && Object.hasOwnProperty.call(m, "rwbs"))
                    w.uint32(42).string(m.rwbs);
                return w;
            };

            /**
             * Encodes the specified BlockBioCompleteFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BlockBioCompleteFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BlockBioCompleteFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockBioCompleteFtraceEvent} message BlockBioCompleteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockBioCompleteFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BlockBioCompleteFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BlockBioCompleteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BlockBioCompleteFtraceEvent} BlockBioCompleteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockBioCompleteFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BlockBioCompleteFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.sector = r.uint64();
                        break;
                    case 3:
                        m.nrSector = r.uint32();
                        break;
                    case 4:
                        m.error = r.int32();
                        break;
                    case 5:
                        m.rwbs = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BlockBioCompleteFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BlockBioCompleteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BlockBioCompleteFtraceEvent} BlockBioCompleteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockBioCompleteFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BlockBioCompleteFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BlockBioCompleteFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BlockBioCompleteFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (!$util.isInteger(m.sector) && !(m.sector && $util.isInteger(m.sector.low) && $util.isInteger(m.sector.high)))
                        return "sector: integer|Long expected";
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    if (!$util.isInteger(m.nrSector))
                        return "nrSector: integer expected";
                }
                if (m.error != null && m.hasOwnProperty("error")) {
                    if (!$util.isInteger(m.error))
                        return "error: integer expected";
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    if (!$util.isString(m.rwbs))
                        return "rwbs: string expected";
                }
                return null;
            };

            /**
             * Creates a BlockBioCompleteFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BlockBioCompleteFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BlockBioCompleteFtraceEvent} BlockBioCompleteFtraceEvent
             */
            BlockBioCompleteFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BlockBioCompleteFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BlockBioCompleteFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.sector != null) {
                    if ($util.Long)
                        (m.sector = $util.Long.fromValue(d.sector)).unsigned = true;
                    else if (typeof d.sector === "string")
                        m.sector = parseInt(d.sector, 10);
                    else if (typeof d.sector === "number")
                        m.sector = d.sector;
                    else if (typeof d.sector === "object")
                        m.sector = new $util.LongBits(d.sector.low >>> 0, d.sector.high >>> 0).toNumber(true);
                }
                if (d.nrSector != null) {
                    m.nrSector = d.nrSector >>> 0;
                }
                if (d.error != null) {
                    m.error = d.error | 0;
                }
                if (d.rwbs != null) {
                    m.rwbs = String(d.rwbs);
                }
                return m;
            };

            /**
             * Creates a plain object from a BlockBioCompleteFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BlockBioCompleteFtraceEvent
             * @static
             * @param {perfetto.protos.BlockBioCompleteFtraceEvent} m BlockBioCompleteFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BlockBioCompleteFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sector = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sector = o.longs === String ? "0" : 0;
                    d.nrSector = 0;
                    d.error = 0;
                    d.rwbs = "";
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (typeof m.sector === "number")
                        d.sector = o.longs === String ? String(m.sector) : m.sector;
                    else
                        d.sector = o.longs === String ? $util.Long.prototype.toString.call(m.sector) : o.longs === Number ? new $util.LongBits(m.sector.low >>> 0, m.sector.high >>> 0).toNumber(true) : m.sector;
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    d.nrSector = m.nrSector;
                }
                if (m.error != null && m.hasOwnProperty("error")) {
                    d.error = m.error;
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    d.rwbs = m.rwbs;
                }
                return d;
            };

            /**
             * Converts this BlockBioCompleteFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BlockBioCompleteFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BlockBioCompleteFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BlockBioCompleteFtraceEvent;
        })();

        protos.BlockBioFrontmergeFtraceEvent = (function() {

            /**
             * Properties of a BlockBioFrontmergeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBlockBioFrontmergeFtraceEvent
             * @property {number|null} [dev] BlockBioFrontmergeFtraceEvent dev
             * @property {number|null} [sector] BlockBioFrontmergeFtraceEvent sector
             * @property {number|null} [nrSector] BlockBioFrontmergeFtraceEvent nrSector
             * @property {string|null} [rwbs] BlockBioFrontmergeFtraceEvent rwbs
             * @property {string|null} [comm] BlockBioFrontmergeFtraceEvent comm
             */

            /**
             * Constructs a new BlockBioFrontmergeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BlockBioFrontmergeFtraceEvent.
             * @implements IBlockBioFrontmergeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBlockBioFrontmergeFtraceEvent=} [p] Properties to set
             */
            function BlockBioFrontmergeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BlockBioFrontmergeFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.BlockBioFrontmergeFtraceEvent
             * @instance
             */
            BlockBioFrontmergeFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockBioFrontmergeFtraceEvent sector.
             * @member {number} sector
             * @memberof perfetto.protos.BlockBioFrontmergeFtraceEvent
             * @instance
             */
            BlockBioFrontmergeFtraceEvent.prototype.sector = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockBioFrontmergeFtraceEvent nrSector.
             * @member {number} nrSector
             * @memberof perfetto.protos.BlockBioFrontmergeFtraceEvent
             * @instance
             */
            BlockBioFrontmergeFtraceEvent.prototype.nrSector = 0;

            /**
             * BlockBioFrontmergeFtraceEvent rwbs.
             * @member {string} rwbs
             * @memberof perfetto.protos.BlockBioFrontmergeFtraceEvent
             * @instance
             */
            BlockBioFrontmergeFtraceEvent.prototype.rwbs = "";

            /**
             * BlockBioFrontmergeFtraceEvent comm.
             * @member {string} comm
             * @memberof perfetto.protos.BlockBioFrontmergeFtraceEvent
             * @instance
             */
            BlockBioFrontmergeFtraceEvent.prototype.comm = "";

            /**
             * Creates a new BlockBioFrontmergeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BlockBioFrontmergeFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockBioFrontmergeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BlockBioFrontmergeFtraceEvent} BlockBioFrontmergeFtraceEvent instance
             */
            BlockBioFrontmergeFtraceEvent.create = function create(properties) {
                return new BlockBioFrontmergeFtraceEvent(properties);
            };

            /**
             * Encodes the specified BlockBioFrontmergeFtraceEvent message. Does not implicitly {@link perfetto.protos.BlockBioFrontmergeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BlockBioFrontmergeFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockBioFrontmergeFtraceEvent} m BlockBioFrontmergeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockBioFrontmergeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.sector != null && Object.hasOwnProperty.call(m, "sector"))
                    w.uint32(16).uint64(m.sector);
                if (m.nrSector != null && Object.hasOwnProperty.call(m, "nrSector"))
                    w.uint32(24).uint32(m.nrSector);
                if (m.rwbs != null && Object.hasOwnProperty.call(m, "rwbs"))
                    w.uint32(34).string(m.rwbs);
                if (m.comm != null && Object.hasOwnProperty.call(m, "comm"))
                    w.uint32(42).string(m.comm);
                return w;
            };

            /**
             * Encodes the specified BlockBioFrontmergeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BlockBioFrontmergeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BlockBioFrontmergeFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockBioFrontmergeFtraceEvent} message BlockBioFrontmergeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockBioFrontmergeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BlockBioFrontmergeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BlockBioFrontmergeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BlockBioFrontmergeFtraceEvent} BlockBioFrontmergeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockBioFrontmergeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BlockBioFrontmergeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.sector = r.uint64();
                        break;
                    case 3:
                        m.nrSector = r.uint32();
                        break;
                    case 4:
                        m.rwbs = r.string();
                        break;
                    case 5:
                        m.comm = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BlockBioFrontmergeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BlockBioFrontmergeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BlockBioFrontmergeFtraceEvent} BlockBioFrontmergeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockBioFrontmergeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BlockBioFrontmergeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BlockBioFrontmergeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BlockBioFrontmergeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (!$util.isInteger(m.sector) && !(m.sector && $util.isInteger(m.sector.low) && $util.isInteger(m.sector.high)))
                        return "sector: integer|Long expected";
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    if (!$util.isInteger(m.nrSector))
                        return "nrSector: integer expected";
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    if (!$util.isString(m.rwbs))
                        return "rwbs: string expected";
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    if (!$util.isString(m.comm))
                        return "comm: string expected";
                }
                return null;
            };

            /**
             * Creates a BlockBioFrontmergeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BlockBioFrontmergeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BlockBioFrontmergeFtraceEvent} BlockBioFrontmergeFtraceEvent
             */
            BlockBioFrontmergeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BlockBioFrontmergeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BlockBioFrontmergeFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.sector != null) {
                    if ($util.Long)
                        (m.sector = $util.Long.fromValue(d.sector)).unsigned = true;
                    else if (typeof d.sector === "string")
                        m.sector = parseInt(d.sector, 10);
                    else if (typeof d.sector === "number")
                        m.sector = d.sector;
                    else if (typeof d.sector === "object")
                        m.sector = new $util.LongBits(d.sector.low >>> 0, d.sector.high >>> 0).toNumber(true);
                }
                if (d.nrSector != null) {
                    m.nrSector = d.nrSector >>> 0;
                }
                if (d.rwbs != null) {
                    m.rwbs = String(d.rwbs);
                }
                if (d.comm != null) {
                    m.comm = String(d.comm);
                }
                return m;
            };

            /**
             * Creates a plain object from a BlockBioFrontmergeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BlockBioFrontmergeFtraceEvent
             * @static
             * @param {perfetto.protos.BlockBioFrontmergeFtraceEvent} m BlockBioFrontmergeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BlockBioFrontmergeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sector = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sector = o.longs === String ? "0" : 0;
                    d.nrSector = 0;
                    d.rwbs = "";
                    d.comm = "";
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (typeof m.sector === "number")
                        d.sector = o.longs === String ? String(m.sector) : m.sector;
                    else
                        d.sector = o.longs === String ? $util.Long.prototype.toString.call(m.sector) : o.longs === Number ? new $util.LongBits(m.sector.low >>> 0, m.sector.high >>> 0).toNumber(true) : m.sector;
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    d.nrSector = m.nrSector;
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    d.rwbs = m.rwbs;
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    d.comm = m.comm;
                }
                return d;
            };

            /**
             * Converts this BlockBioFrontmergeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BlockBioFrontmergeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BlockBioFrontmergeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BlockBioFrontmergeFtraceEvent;
        })();

        protos.BlockBioQueueFtraceEvent = (function() {

            /**
             * Properties of a BlockBioQueueFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBlockBioQueueFtraceEvent
             * @property {number|null} [dev] BlockBioQueueFtraceEvent dev
             * @property {number|null} [sector] BlockBioQueueFtraceEvent sector
             * @property {number|null} [nrSector] BlockBioQueueFtraceEvent nrSector
             * @property {string|null} [rwbs] BlockBioQueueFtraceEvent rwbs
             * @property {string|null} [comm] BlockBioQueueFtraceEvent comm
             */

            /**
             * Constructs a new BlockBioQueueFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BlockBioQueueFtraceEvent.
             * @implements IBlockBioQueueFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBlockBioQueueFtraceEvent=} [p] Properties to set
             */
            function BlockBioQueueFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BlockBioQueueFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.BlockBioQueueFtraceEvent
             * @instance
             */
            BlockBioQueueFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockBioQueueFtraceEvent sector.
             * @member {number} sector
             * @memberof perfetto.protos.BlockBioQueueFtraceEvent
             * @instance
             */
            BlockBioQueueFtraceEvent.prototype.sector = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockBioQueueFtraceEvent nrSector.
             * @member {number} nrSector
             * @memberof perfetto.protos.BlockBioQueueFtraceEvent
             * @instance
             */
            BlockBioQueueFtraceEvent.prototype.nrSector = 0;

            /**
             * BlockBioQueueFtraceEvent rwbs.
             * @member {string} rwbs
             * @memberof perfetto.protos.BlockBioQueueFtraceEvent
             * @instance
             */
            BlockBioQueueFtraceEvent.prototype.rwbs = "";

            /**
             * BlockBioQueueFtraceEvent comm.
             * @member {string} comm
             * @memberof perfetto.protos.BlockBioQueueFtraceEvent
             * @instance
             */
            BlockBioQueueFtraceEvent.prototype.comm = "";

            /**
             * Creates a new BlockBioQueueFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BlockBioQueueFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockBioQueueFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BlockBioQueueFtraceEvent} BlockBioQueueFtraceEvent instance
             */
            BlockBioQueueFtraceEvent.create = function create(properties) {
                return new BlockBioQueueFtraceEvent(properties);
            };

            /**
             * Encodes the specified BlockBioQueueFtraceEvent message. Does not implicitly {@link perfetto.protos.BlockBioQueueFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BlockBioQueueFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockBioQueueFtraceEvent} m BlockBioQueueFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockBioQueueFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.sector != null && Object.hasOwnProperty.call(m, "sector"))
                    w.uint32(16).uint64(m.sector);
                if (m.nrSector != null && Object.hasOwnProperty.call(m, "nrSector"))
                    w.uint32(24).uint32(m.nrSector);
                if (m.rwbs != null && Object.hasOwnProperty.call(m, "rwbs"))
                    w.uint32(34).string(m.rwbs);
                if (m.comm != null && Object.hasOwnProperty.call(m, "comm"))
                    w.uint32(42).string(m.comm);
                return w;
            };

            /**
             * Encodes the specified BlockBioQueueFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BlockBioQueueFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BlockBioQueueFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockBioQueueFtraceEvent} message BlockBioQueueFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockBioQueueFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BlockBioQueueFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BlockBioQueueFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BlockBioQueueFtraceEvent} BlockBioQueueFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockBioQueueFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BlockBioQueueFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.sector = r.uint64();
                        break;
                    case 3:
                        m.nrSector = r.uint32();
                        break;
                    case 4:
                        m.rwbs = r.string();
                        break;
                    case 5:
                        m.comm = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BlockBioQueueFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BlockBioQueueFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BlockBioQueueFtraceEvent} BlockBioQueueFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockBioQueueFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BlockBioQueueFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BlockBioQueueFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BlockBioQueueFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (!$util.isInteger(m.sector) && !(m.sector && $util.isInteger(m.sector.low) && $util.isInteger(m.sector.high)))
                        return "sector: integer|Long expected";
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    if (!$util.isInteger(m.nrSector))
                        return "nrSector: integer expected";
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    if (!$util.isString(m.rwbs))
                        return "rwbs: string expected";
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    if (!$util.isString(m.comm))
                        return "comm: string expected";
                }
                return null;
            };

            /**
             * Creates a BlockBioQueueFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BlockBioQueueFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BlockBioQueueFtraceEvent} BlockBioQueueFtraceEvent
             */
            BlockBioQueueFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BlockBioQueueFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BlockBioQueueFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.sector != null) {
                    if ($util.Long)
                        (m.sector = $util.Long.fromValue(d.sector)).unsigned = true;
                    else if (typeof d.sector === "string")
                        m.sector = parseInt(d.sector, 10);
                    else if (typeof d.sector === "number")
                        m.sector = d.sector;
                    else if (typeof d.sector === "object")
                        m.sector = new $util.LongBits(d.sector.low >>> 0, d.sector.high >>> 0).toNumber(true);
                }
                if (d.nrSector != null) {
                    m.nrSector = d.nrSector >>> 0;
                }
                if (d.rwbs != null) {
                    m.rwbs = String(d.rwbs);
                }
                if (d.comm != null) {
                    m.comm = String(d.comm);
                }
                return m;
            };

            /**
             * Creates a plain object from a BlockBioQueueFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BlockBioQueueFtraceEvent
             * @static
             * @param {perfetto.protos.BlockBioQueueFtraceEvent} m BlockBioQueueFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BlockBioQueueFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sector = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sector = o.longs === String ? "0" : 0;
                    d.nrSector = 0;
                    d.rwbs = "";
                    d.comm = "";
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (typeof m.sector === "number")
                        d.sector = o.longs === String ? String(m.sector) : m.sector;
                    else
                        d.sector = o.longs === String ? $util.Long.prototype.toString.call(m.sector) : o.longs === Number ? new $util.LongBits(m.sector.low >>> 0, m.sector.high >>> 0).toNumber(true) : m.sector;
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    d.nrSector = m.nrSector;
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    d.rwbs = m.rwbs;
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    d.comm = m.comm;
                }
                return d;
            };

            /**
             * Converts this BlockBioQueueFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BlockBioQueueFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BlockBioQueueFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BlockBioQueueFtraceEvent;
        })();

        protos.BlockBioRemapFtraceEvent = (function() {

            /**
             * Properties of a BlockBioRemapFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBlockBioRemapFtraceEvent
             * @property {number|null} [dev] BlockBioRemapFtraceEvent dev
             * @property {number|null} [sector] BlockBioRemapFtraceEvent sector
             * @property {number|null} [nrSector] BlockBioRemapFtraceEvent nrSector
             * @property {number|null} [oldDev] BlockBioRemapFtraceEvent oldDev
             * @property {number|null} [oldSector] BlockBioRemapFtraceEvent oldSector
             * @property {string|null} [rwbs] BlockBioRemapFtraceEvent rwbs
             */

            /**
             * Constructs a new BlockBioRemapFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BlockBioRemapFtraceEvent.
             * @implements IBlockBioRemapFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBlockBioRemapFtraceEvent=} [p] Properties to set
             */
            function BlockBioRemapFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BlockBioRemapFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.BlockBioRemapFtraceEvent
             * @instance
             */
            BlockBioRemapFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockBioRemapFtraceEvent sector.
             * @member {number} sector
             * @memberof perfetto.protos.BlockBioRemapFtraceEvent
             * @instance
             */
            BlockBioRemapFtraceEvent.prototype.sector = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockBioRemapFtraceEvent nrSector.
             * @member {number} nrSector
             * @memberof perfetto.protos.BlockBioRemapFtraceEvent
             * @instance
             */
            BlockBioRemapFtraceEvent.prototype.nrSector = 0;

            /**
             * BlockBioRemapFtraceEvent oldDev.
             * @member {number} oldDev
             * @memberof perfetto.protos.BlockBioRemapFtraceEvent
             * @instance
             */
            BlockBioRemapFtraceEvent.prototype.oldDev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockBioRemapFtraceEvent oldSector.
             * @member {number} oldSector
             * @memberof perfetto.protos.BlockBioRemapFtraceEvent
             * @instance
             */
            BlockBioRemapFtraceEvent.prototype.oldSector = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockBioRemapFtraceEvent rwbs.
             * @member {string} rwbs
             * @memberof perfetto.protos.BlockBioRemapFtraceEvent
             * @instance
             */
            BlockBioRemapFtraceEvent.prototype.rwbs = "";

            /**
             * Creates a new BlockBioRemapFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BlockBioRemapFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockBioRemapFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BlockBioRemapFtraceEvent} BlockBioRemapFtraceEvent instance
             */
            BlockBioRemapFtraceEvent.create = function create(properties) {
                return new BlockBioRemapFtraceEvent(properties);
            };

            /**
             * Encodes the specified BlockBioRemapFtraceEvent message. Does not implicitly {@link perfetto.protos.BlockBioRemapFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BlockBioRemapFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockBioRemapFtraceEvent} m BlockBioRemapFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockBioRemapFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.sector != null && Object.hasOwnProperty.call(m, "sector"))
                    w.uint32(16).uint64(m.sector);
                if (m.nrSector != null && Object.hasOwnProperty.call(m, "nrSector"))
                    w.uint32(24).uint32(m.nrSector);
                if (m.oldDev != null && Object.hasOwnProperty.call(m, "oldDev"))
                    w.uint32(32).uint64(m.oldDev);
                if (m.oldSector != null && Object.hasOwnProperty.call(m, "oldSector"))
                    w.uint32(40).uint64(m.oldSector);
                if (m.rwbs != null && Object.hasOwnProperty.call(m, "rwbs"))
                    w.uint32(50).string(m.rwbs);
                return w;
            };

            /**
             * Encodes the specified BlockBioRemapFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BlockBioRemapFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BlockBioRemapFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockBioRemapFtraceEvent} message BlockBioRemapFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockBioRemapFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BlockBioRemapFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BlockBioRemapFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BlockBioRemapFtraceEvent} BlockBioRemapFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockBioRemapFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BlockBioRemapFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.sector = r.uint64();
                        break;
                    case 3:
                        m.nrSector = r.uint32();
                        break;
                    case 4:
                        m.oldDev = r.uint64();
                        break;
                    case 5:
                        m.oldSector = r.uint64();
                        break;
                    case 6:
                        m.rwbs = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BlockBioRemapFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BlockBioRemapFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BlockBioRemapFtraceEvent} BlockBioRemapFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockBioRemapFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BlockBioRemapFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BlockBioRemapFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BlockBioRemapFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (!$util.isInteger(m.sector) && !(m.sector && $util.isInteger(m.sector.low) && $util.isInteger(m.sector.high)))
                        return "sector: integer|Long expected";
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    if (!$util.isInteger(m.nrSector))
                        return "nrSector: integer expected";
                }
                if (m.oldDev != null && m.hasOwnProperty("oldDev")) {
                    if (!$util.isInteger(m.oldDev) && !(m.oldDev && $util.isInteger(m.oldDev.low) && $util.isInteger(m.oldDev.high)))
                        return "oldDev: integer|Long expected";
                }
                if (m.oldSector != null && m.hasOwnProperty("oldSector")) {
                    if (!$util.isInteger(m.oldSector) && !(m.oldSector && $util.isInteger(m.oldSector.low) && $util.isInteger(m.oldSector.high)))
                        return "oldSector: integer|Long expected";
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    if (!$util.isString(m.rwbs))
                        return "rwbs: string expected";
                }
                return null;
            };

            /**
             * Creates a BlockBioRemapFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BlockBioRemapFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BlockBioRemapFtraceEvent} BlockBioRemapFtraceEvent
             */
            BlockBioRemapFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BlockBioRemapFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BlockBioRemapFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.sector != null) {
                    if ($util.Long)
                        (m.sector = $util.Long.fromValue(d.sector)).unsigned = true;
                    else if (typeof d.sector === "string")
                        m.sector = parseInt(d.sector, 10);
                    else if (typeof d.sector === "number")
                        m.sector = d.sector;
                    else if (typeof d.sector === "object")
                        m.sector = new $util.LongBits(d.sector.low >>> 0, d.sector.high >>> 0).toNumber(true);
                }
                if (d.nrSector != null) {
                    m.nrSector = d.nrSector >>> 0;
                }
                if (d.oldDev != null) {
                    if ($util.Long)
                        (m.oldDev = $util.Long.fromValue(d.oldDev)).unsigned = true;
                    else if (typeof d.oldDev === "string")
                        m.oldDev = parseInt(d.oldDev, 10);
                    else if (typeof d.oldDev === "number")
                        m.oldDev = d.oldDev;
                    else if (typeof d.oldDev === "object")
                        m.oldDev = new $util.LongBits(d.oldDev.low >>> 0, d.oldDev.high >>> 0).toNumber(true);
                }
                if (d.oldSector != null) {
                    if ($util.Long)
                        (m.oldSector = $util.Long.fromValue(d.oldSector)).unsigned = true;
                    else if (typeof d.oldSector === "string")
                        m.oldSector = parseInt(d.oldSector, 10);
                    else if (typeof d.oldSector === "number")
                        m.oldSector = d.oldSector;
                    else if (typeof d.oldSector === "object")
                        m.oldSector = new $util.LongBits(d.oldSector.low >>> 0, d.oldSector.high >>> 0).toNumber(true);
                }
                if (d.rwbs != null) {
                    m.rwbs = String(d.rwbs);
                }
                return m;
            };

            /**
             * Creates a plain object from a BlockBioRemapFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BlockBioRemapFtraceEvent
             * @static
             * @param {perfetto.protos.BlockBioRemapFtraceEvent} m BlockBioRemapFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BlockBioRemapFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sector = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sector = o.longs === String ? "0" : 0;
                    d.nrSector = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.oldDev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.oldDev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.oldSector = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.oldSector = o.longs === String ? "0" : 0;
                    d.rwbs = "";
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (typeof m.sector === "number")
                        d.sector = o.longs === String ? String(m.sector) : m.sector;
                    else
                        d.sector = o.longs === String ? $util.Long.prototype.toString.call(m.sector) : o.longs === Number ? new $util.LongBits(m.sector.low >>> 0, m.sector.high >>> 0).toNumber(true) : m.sector;
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    d.nrSector = m.nrSector;
                }
                if (m.oldDev != null && m.hasOwnProperty("oldDev")) {
                    if (typeof m.oldDev === "number")
                        d.oldDev = o.longs === String ? String(m.oldDev) : m.oldDev;
                    else
                        d.oldDev = o.longs === String ? $util.Long.prototype.toString.call(m.oldDev) : o.longs === Number ? new $util.LongBits(m.oldDev.low >>> 0, m.oldDev.high >>> 0).toNumber(true) : m.oldDev;
                }
                if (m.oldSector != null && m.hasOwnProperty("oldSector")) {
                    if (typeof m.oldSector === "number")
                        d.oldSector = o.longs === String ? String(m.oldSector) : m.oldSector;
                    else
                        d.oldSector = o.longs === String ? $util.Long.prototype.toString.call(m.oldSector) : o.longs === Number ? new $util.LongBits(m.oldSector.low >>> 0, m.oldSector.high >>> 0).toNumber(true) : m.oldSector;
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    d.rwbs = m.rwbs;
                }
                return d;
            };

            /**
             * Converts this BlockBioRemapFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BlockBioRemapFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BlockBioRemapFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BlockBioRemapFtraceEvent;
        })();

        protos.BlockDirtyBufferFtraceEvent = (function() {

            /**
             * Properties of a BlockDirtyBufferFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBlockDirtyBufferFtraceEvent
             * @property {number|null} [dev] BlockDirtyBufferFtraceEvent dev
             * @property {number|null} [sector] BlockDirtyBufferFtraceEvent sector
             * @property {number|null} [size] BlockDirtyBufferFtraceEvent size
             */

            /**
             * Constructs a new BlockDirtyBufferFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BlockDirtyBufferFtraceEvent.
             * @implements IBlockDirtyBufferFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBlockDirtyBufferFtraceEvent=} [p] Properties to set
             */
            function BlockDirtyBufferFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BlockDirtyBufferFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.BlockDirtyBufferFtraceEvent
             * @instance
             */
            BlockDirtyBufferFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockDirtyBufferFtraceEvent sector.
             * @member {number} sector
             * @memberof perfetto.protos.BlockDirtyBufferFtraceEvent
             * @instance
             */
            BlockDirtyBufferFtraceEvent.prototype.sector = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockDirtyBufferFtraceEvent size.
             * @member {number} size
             * @memberof perfetto.protos.BlockDirtyBufferFtraceEvent
             * @instance
             */
            BlockDirtyBufferFtraceEvent.prototype.size = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new BlockDirtyBufferFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BlockDirtyBufferFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockDirtyBufferFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BlockDirtyBufferFtraceEvent} BlockDirtyBufferFtraceEvent instance
             */
            BlockDirtyBufferFtraceEvent.create = function create(properties) {
                return new BlockDirtyBufferFtraceEvent(properties);
            };

            /**
             * Encodes the specified BlockDirtyBufferFtraceEvent message. Does not implicitly {@link perfetto.protos.BlockDirtyBufferFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BlockDirtyBufferFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockDirtyBufferFtraceEvent} m BlockDirtyBufferFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockDirtyBufferFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.sector != null && Object.hasOwnProperty.call(m, "sector"))
                    w.uint32(16).uint64(m.sector);
                if (m.size != null && Object.hasOwnProperty.call(m, "size"))
                    w.uint32(24).uint64(m.size);
                return w;
            };

            /**
             * Encodes the specified BlockDirtyBufferFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BlockDirtyBufferFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BlockDirtyBufferFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockDirtyBufferFtraceEvent} message BlockDirtyBufferFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockDirtyBufferFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BlockDirtyBufferFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BlockDirtyBufferFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BlockDirtyBufferFtraceEvent} BlockDirtyBufferFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockDirtyBufferFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BlockDirtyBufferFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.sector = r.uint64();
                        break;
                    case 3:
                        m.size = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BlockDirtyBufferFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BlockDirtyBufferFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BlockDirtyBufferFtraceEvent} BlockDirtyBufferFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockDirtyBufferFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BlockDirtyBufferFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BlockDirtyBufferFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BlockDirtyBufferFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (!$util.isInteger(m.sector) && !(m.sector && $util.isInteger(m.sector.low) && $util.isInteger(m.sector.high)))
                        return "sector: integer|Long expected";
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (!$util.isInteger(m.size) && !(m.size && $util.isInteger(m.size.low) && $util.isInteger(m.size.high)))
                        return "size: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a BlockDirtyBufferFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BlockDirtyBufferFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BlockDirtyBufferFtraceEvent} BlockDirtyBufferFtraceEvent
             */
            BlockDirtyBufferFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BlockDirtyBufferFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BlockDirtyBufferFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.sector != null) {
                    if ($util.Long)
                        (m.sector = $util.Long.fromValue(d.sector)).unsigned = true;
                    else if (typeof d.sector === "string")
                        m.sector = parseInt(d.sector, 10);
                    else if (typeof d.sector === "number")
                        m.sector = d.sector;
                    else if (typeof d.sector === "object")
                        m.sector = new $util.LongBits(d.sector.low >>> 0, d.sector.high >>> 0).toNumber(true);
                }
                if (d.size != null) {
                    if ($util.Long)
                        (m.size = $util.Long.fromValue(d.size)).unsigned = true;
                    else if (typeof d.size === "string")
                        m.size = parseInt(d.size, 10);
                    else if (typeof d.size === "number")
                        m.size = d.size;
                    else if (typeof d.size === "object")
                        m.size = new $util.LongBits(d.size.low >>> 0, d.size.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a BlockDirtyBufferFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BlockDirtyBufferFtraceEvent
             * @static
             * @param {perfetto.protos.BlockDirtyBufferFtraceEvent} m BlockDirtyBufferFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BlockDirtyBufferFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sector = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sector = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.size = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.size = o.longs === String ? "0" : 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (typeof m.sector === "number")
                        d.sector = o.longs === String ? String(m.sector) : m.sector;
                    else
                        d.sector = o.longs === String ? $util.Long.prototype.toString.call(m.sector) : o.longs === Number ? new $util.LongBits(m.sector.low >>> 0, m.sector.high >>> 0).toNumber(true) : m.sector;
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (typeof m.size === "number")
                        d.size = o.longs === String ? String(m.size) : m.size;
                    else
                        d.size = o.longs === String ? $util.Long.prototype.toString.call(m.size) : o.longs === Number ? new $util.LongBits(m.size.low >>> 0, m.size.high >>> 0).toNumber(true) : m.size;
                }
                return d;
            };

            /**
             * Converts this BlockDirtyBufferFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BlockDirtyBufferFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BlockDirtyBufferFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BlockDirtyBufferFtraceEvent;
        })();

        protos.BlockGetrqFtraceEvent = (function() {

            /**
             * Properties of a BlockGetrqFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBlockGetrqFtraceEvent
             * @property {number|null} [dev] BlockGetrqFtraceEvent dev
             * @property {number|null} [sector] BlockGetrqFtraceEvent sector
             * @property {number|null} [nrSector] BlockGetrqFtraceEvent nrSector
             * @property {string|null} [rwbs] BlockGetrqFtraceEvent rwbs
             * @property {string|null} [comm] BlockGetrqFtraceEvent comm
             */

            /**
             * Constructs a new BlockGetrqFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BlockGetrqFtraceEvent.
             * @implements IBlockGetrqFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBlockGetrqFtraceEvent=} [p] Properties to set
             */
            function BlockGetrqFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BlockGetrqFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.BlockGetrqFtraceEvent
             * @instance
             */
            BlockGetrqFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockGetrqFtraceEvent sector.
             * @member {number} sector
             * @memberof perfetto.protos.BlockGetrqFtraceEvent
             * @instance
             */
            BlockGetrqFtraceEvent.prototype.sector = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockGetrqFtraceEvent nrSector.
             * @member {number} nrSector
             * @memberof perfetto.protos.BlockGetrqFtraceEvent
             * @instance
             */
            BlockGetrqFtraceEvent.prototype.nrSector = 0;

            /**
             * BlockGetrqFtraceEvent rwbs.
             * @member {string} rwbs
             * @memberof perfetto.protos.BlockGetrqFtraceEvent
             * @instance
             */
            BlockGetrqFtraceEvent.prototype.rwbs = "";

            /**
             * BlockGetrqFtraceEvent comm.
             * @member {string} comm
             * @memberof perfetto.protos.BlockGetrqFtraceEvent
             * @instance
             */
            BlockGetrqFtraceEvent.prototype.comm = "";

            /**
             * Creates a new BlockGetrqFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BlockGetrqFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockGetrqFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BlockGetrqFtraceEvent} BlockGetrqFtraceEvent instance
             */
            BlockGetrqFtraceEvent.create = function create(properties) {
                return new BlockGetrqFtraceEvent(properties);
            };

            /**
             * Encodes the specified BlockGetrqFtraceEvent message. Does not implicitly {@link perfetto.protos.BlockGetrqFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BlockGetrqFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockGetrqFtraceEvent} m BlockGetrqFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockGetrqFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.sector != null && Object.hasOwnProperty.call(m, "sector"))
                    w.uint32(16).uint64(m.sector);
                if (m.nrSector != null && Object.hasOwnProperty.call(m, "nrSector"))
                    w.uint32(24).uint32(m.nrSector);
                if (m.rwbs != null && Object.hasOwnProperty.call(m, "rwbs"))
                    w.uint32(34).string(m.rwbs);
                if (m.comm != null && Object.hasOwnProperty.call(m, "comm"))
                    w.uint32(42).string(m.comm);
                return w;
            };

            /**
             * Encodes the specified BlockGetrqFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BlockGetrqFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BlockGetrqFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockGetrqFtraceEvent} message BlockGetrqFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockGetrqFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BlockGetrqFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BlockGetrqFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BlockGetrqFtraceEvent} BlockGetrqFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockGetrqFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BlockGetrqFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.sector = r.uint64();
                        break;
                    case 3:
                        m.nrSector = r.uint32();
                        break;
                    case 4:
                        m.rwbs = r.string();
                        break;
                    case 5:
                        m.comm = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BlockGetrqFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BlockGetrqFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BlockGetrqFtraceEvent} BlockGetrqFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockGetrqFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BlockGetrqFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BlockGetrqFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BlockGetrqFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (!$util.isInteger(m.sector) && !(m.sector && $util.isInteger(m.sector.low) && $util.isInteger(m.sector.high)))
                        return "sector: integer|Long expected";
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    if (!$util.isInteger(m.nrSector))
                        return "nrSector: integer expected";
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    if (!$util.isString(m.rwbs))
                        return "rwbs: string expected";
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    if (!$util.isString(m.comm))
                        return "comm: string expected";
                }
                return null;
            };

            /**
             * Creates a BlockGetrqFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BlockGetrqFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BlockGetrqFtraceEvent} BlockGetrqFtraceEvent
             */
            BlockGetrqFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BlockGetrqFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BlockGetrqFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.sector != null) {
                    if ($util.Long)
                        (m.sector = $util.Long.fromValue(d.sector)).unsigned = true;
                    else if (typeof d.sector === "string")
                        m.sector = parseInt(d.sector, 10);
                    else if (typeof d.sector === "number")
                        m.sector = d.sector;
                    else if (typeof d.sector === "object")
                        m.sector = new $util.LongBits(d.sector.low >>> 0, d.sector.high >>> 0).toNumber(true);
                }
                if (d.nrSector != null) {
                    m.nrSector = d.nrSector >>> 0;
                }
                if (d.rwbs != null) {
                    m.rwbs = String(d.rwbs);
                }
                if (d.comm != null) {
                    m.comm = String(d.comm);
                }
                return m;
            };

            /**
             * Creates a plain object from a BlockGetrqFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BlockGetrqFtraceEvent
             * @static
             * @param {perfetto.protos.BlockGetrqFtraceEvent} m BlockGetrqFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BlockGetrqFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sector = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sector = o.longs === String ? "0" : 0;
                    d.nrSector = 0;
                    d.rwbs = "";
                    d.comm = "";
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (typeof m.sector === "number")
                        d.sector = o.longs === String ? String(m.sector) : m.sector;
                    else
                        d.sector = o.longs === String ? $util.Long.prototype.toString.call(m.sector) : o.longs === Number ? new $util.LongBits(m.sector.low >>> 0, m.sector.high >>> 0).toNumber(true) : m.sector;
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    d.nrSector = m.nrSector;
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    d.rwbs = m.rwbs;
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    d.comm = m.comm;
                }
                return d;
            };

            /**
             * Converts this BlockGetrqFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BlockGetrqFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BlockGetrqFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BlockGetrqFtraceEvent;
        })();

        protos.BlockPlugFtraceEvent = (function() {

            /**
             * Properties of a BlockPlugFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBlockPlugFtraceEvent
             * @property {string|null} [comm] BlockPlugFtraceEvent comm
             */

            /**
             * Constructs a new BlockPlugFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BlockPlugFtraceEvent.
             * @implements IBlockPlugFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBlockPlugFtraceEvent=} [p] Properties to set
             */
            function BlockPlugFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BlockPlugFtraceEvent comm.
             * @member {string} comm
             * @memberof perfetto.protos.BlockPlugFtraceEvent
             * @instance
             */
            BlockPlugFtraceEvent.prototype.comm = "";

            /**
             * Creates a new BlockPlugFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BlockPlugFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockPlugFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BlockPlugFtraceEvent} BlockPlugFtraceEvent instance
             */
            BlockPlugFtraceEvent.create = function create(properties) {
                return new BlockPlugFtraceEvent(properties);
            };

            /**
             * Encodes the specified BlockPlugFtraceEvent message. Does not implicitly {@link perfetto.protos.BlockPlugFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BlockPlugFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockPlugFtraceEvent} m BlockPlugFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockPlugFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.comm != null && Object.hasOwnProperty.call(m, "comm"))
                    w.uint32(10).string(m.comm);
                return w;
            };

            /**
             * Encodes the specified BlockPlugFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BlockPlugFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BlockPlugFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockPlugFtraceEvent} message BlockPlugFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockPlugFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BlockPlugFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BlockPlugFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BlockPlugFtraceEvent} BlockPlugFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockPlugFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BlockPlugFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.comm = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BlockPlugFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BlockPlugFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BlockPlugFtraceEvent} BlockPlugFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockPlugFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BlockPlugFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BlockPlugFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BlockPlugFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    if (!$util.isString(m.comm))
                        return "comm: string expected";
                }
                return null;
            };

            /**
             * Creates a BlockPlugFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BlockPlugFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BlockPlugFtraceEvent} BlockPlugFtraceEvent
             */
            BlockPlugFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BlockPlugFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BlockPlugFtraceEvent();
                if (d.comm != null) {
                    m.comm = String(d.comm);
                }
                return m;
            };

            /**
             * Creates a plain object from a BlockPlugFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BlockPlugFtraceEvent
             * @static
             * @param {perfetto.protos.BlockPlugFtraceEvent} m BlockPlugFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BlockPlugFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.comm = "";
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    d.comm = m.comm;
                }
                return d;
            };

            /**
             * Converts this BlockPlugFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BlockPlugFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BlockPlugFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BlockPlugFtraceEvent;
        })();

        protos.BlockRqAbortFtraceEvent = (function() {

            /**
             * Properties of a BlockRqAbortFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBlockRqAbortFtraceEvent
             * @property {number|null} [dev] BlockRqAbortFtraceEvent dev
             * @property {number|null} [sector] BlockRqAbortFtraceEvent sector
             * @property {number|null} [nrSector] BlockRqAbortFtraceEvent nrSector
             * @property {number|null} [errors] BlockRqAbortFtraceEvent errors
             * @property {string|null} [rwbs] BlockRqAbortFtraceEvent rwbs
             * @property {string|null} [cmd] BlockRqAbortFtraceEvent cmd
             */

            /**
             * Constructs a new BlockRqAbortFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BlockRqAbortFtraceEvent.
             * @implements IBlockRqAbortFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBlockRqAbortFtraceEvent=} [p] Properties to set
             */
            function BlockRqAbortFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BlockRqAbortFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.BlockRqAbortFtraceEvent
             * @instance
             */
            BlockRqAbortFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockRqAbortFtraceEvent sector.
             * @member {number} sector
             * @memberof perfetto.protos.BlockRqAbortFtraceEvent
             * @instance
             */
            BlockRqAbortFtraceEvent.prototype.sector = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockRqAbortFtraceEvent nrSector.
             * @member {number} nrSector
             * @memberof perfetto.protos.BlockRqAbortFtraceEvent
             * @instance
             */
            BlockRqAbortFtraceEvent.prototype.nrSector = 0;

            /**
             * BlockRqAbortFtraceEvent errors.
             * @member {number} errors
             * @memberof perfetto.protos.BlockRqAbortFtraceEvent
             * @instance
             */
            BlockRqAbortFtraceEvent.prototype.errors = 0;

            /**
             * BlockRqAbortFtraceEvent rwbs.
             * @member {string} rwbs
             * @memberof perfetto.protos.BlockRqAbortFtraceEvent
             * @instance
             */
            BlockRqAbortFtraceEvent.prototype.rwbs = "";

            /**
             * BlockRqAbortFtraceEvent cmd.
             * @member {string} cmd
             * @memberof perfetto.protos.BlockRqAbortFtraceEvent
             * @instance
             */
            BlockRqAbortFtraceEvent.prototype.cmd = "";

            /**
             * Creates a new BlockRqAbortFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BlockRqAbortFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockRqAbortFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BlockRqAbortFtraceEvent} BlockRqAbortFtraceEvent instance
             */
            BlockRqAbortFtraceEvent.create = function create(properties) {
                return new BlockRqAbortFtraceEvent(properties);
            };

            /**
             * Encodes the specified BlockRqAbortFtraceEvent message. Does not implicitly {@link perfetto.protos.BlockRqAbortFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BlockRqAbortFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockRqAbortFtraceEvent} m BlockRqAbortFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockRqAbortFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.sector != null && Object.hasOwnProperty.call(m, "sector"))
                    w.uint32(16).uint64(m.sector);
                if (m.nrSector != null && Object.hasOwnProperty.call(m, "nrSector"))
                    w.uint32(24).uint32(m.nrSector);
                if (m.errors != null && Object.hasOwnProperty.call(m, "errors"))
                    w.uint32(32).int32(m.errors);
                if (m.rwbs != null && Object.hasOwnProperty.call(m, "rwbs"))
                    w.uint32(42).string(m.rwbs);
                if (m.cmd != null && Object.hasOwnProperty.call(m, "cmd"))
                    w.uint32(50).string(m.cmd);
                return w;
            };

            /**
             * Encodes the specified BlockRqAbortFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BlockRqAbortFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BlockRqAbortFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockRqAbortFtraceEvent} message BlockRqAbortFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockRqAbortFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BlockRqAbortFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BlockRqAbortFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BlockRqAbortFtraceEvent} BlockRqAbortFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockRqAbortFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BlockRqAbortFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.sector = r.uint64();
                        break;
                    case 3:
                        m.nrSector = r.uint32();
                        break;
                    case 4:
                        m.errors = r.int32();
                        break;
                    case 5:
                        m.rwbs = r.string();
                        break;
                    case 6:
                        m.cmd = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BlockRqAbortFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BlockRqAbortFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BlockRqAbortFtraceEvent} BlockRqAbortFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockRqAbortFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BlockRqAbortFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BlockRqAbortFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BlockRqAbortFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (!$util.isInteger(m.sector) && !(m.sector && $util.isInteger(m.sector.low) && $util.isInteger(m.sector.high)))
                        return "sector: integer|Long expected";
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    if (!$util.isInteger(m.nrSector))
                        return "nrSector: integer expected";
                }
                if (m.errors != null && m.hasOwnProperty("errors")) {
                    if (!$util.isInteger(m.errors))
                        return "errors: integer expected";
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    if (!$util.isString(m.rwbs))
                        return "rwbs: string expected";
                }
                if (m.cmd != null && m.hasOwnProperty("cmd")) {
                    if (!$util.isString(m.cmd))
                        return "cmd: string expected";
                }
                return null;
            };

            /**
             * Creates a BlockRqAbortFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BlockRqAbortFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BlockRqAbortFtraceEvent} BlockRqAbortFtraceEvent
             */
            BlockRqAbortFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BlockRqAbortFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BlockRqAbortFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.sector != null) {
                    if ($util.Long)
                        (m.sector = $util.Long.fromValue(d.sector)).unsigned = true;
                    else if (typeof d.sector === "string")
                        m.sector = parseInt(d.sector, 10);
                    else if (typeof d.sector === "number")
                        m.sector = d.sector;
                    else if (typeof d.sector === "object")
                        m.sector = new $util.LongBits(d.sector.low >>> 0, d.sector.high >>> 0).toNumber(true);
                }
                if (d.nrSector != null) {
                    m.nrSector = d.nrSector >>> 0;
                }
                if (d.errors != null) {
                    m.errors = d.errors | 0;
                }
                if (d.rwbs != null) {
                    m.rwbs = String(d.rwbs);
                }
                if (d.cmd != null) {
                    m.cmd = String(d.cmd);
                }
                return m;
            };

            /**
             * Creates a plain object from a BlockRqAbortFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BlockRqAbortFtraceEvent
             * @static
             * @param {perfetto.protos.BlockRqAbortFtraceEvent} m BlockRqAbortFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BlockRqAbortFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sector = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sector = o.longs === String ? "0" : 0;
                    d.nrSector = 0;
                    d.errors = 0;
                    d.rwbs = "";
                    d.cmd = "";
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (typeof m.sector === "number")
                        d.sector = o.longs === String ? String(m.sector) : m.sector;
                    else
                        d.sector = o.longs === String ? $util.Long.prototype.toString.call(m.sector) : o.longs === Number ? new $util.LongBits(m.sector.low >>> 0, m.sector.high >>> 0).toNumber(true) : m.sector;
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    d.nrSector = m.nrSector;
                }
                if (m.errors != null && m.hasOwnProperty("errors")) {
                    d.errors = m.errors;
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    d.rwbs = m.rwbs;
                }
                if (m.cmd != null && m.hasOwnProperty("cmd")) {
                    d.cmd = m.cmd;
                }
                return d;
            };

            /**
             * Converts this BlockRqAbortFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BlockRqAbortFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BlockRqAbortFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BlockRqAbortFtraceEvent;
        })();

        protos.BlockRqCompleteFtraceEvent = (function() {

            /**
             * Properties of a BlockRqCompleteFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBlockRqCompleteFtraceEvent
             * @property {number|null} [dev] BlockRqCompleteFtraceEvent dev
             * @property {number|null} [sector] BlockRqCompleteFtraceEvent sector
             * @property {number|null} [nrSector] BlockRqCompleteFtraceEvent nrSector
             * @property {number|null} [errors] BlockRqCompleteFtraceEvent errors
             * @property {string|null} [rwbs] BlockRqCompleteFtraceEvent rwbs
             * @property {string|null} [cmd] BlockRqCompleteFtraceEvent cmd
             * @property {number|null} [error] BlockRqCompleteFtraceEvent error
             */

            /**
             * Constructs a new BlockRqCompleteFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BlockRqCompleteFtraceEvent.
             * @implements IBlockRqCompleteFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBlockRqCompleteFtraceEvent=} [p] Properties to set
             */
            function BlockRqCompleteFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BlockRqCompleteFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.BlockRqCompleteFtraceEvent
             * @instance
             */
            BlockRqCompleteFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockRqCompleteFtraceEvent sector.
             * @member {number} sector
             * @memberof perfetto.protos.BlockRqCompleteFtraceEvent
             * @instance
             */
            BlockRqCompleteFtraceEvent.prototype.sector = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockRqCompleteFtraceEvent nrSector.
             * @member {number} nrSector
             * @memberof perfetto.protos.BlockRqCompleteFtraceEvent
             * @instance
             */
            BlockRqCompleteFtraceEvent.prototype.nrSector = 0;

            /**
             * BlockRqCompleteFtraceEvent errors.
             * @member {number} errors
             * @memberof perfetto.protos.BlockRqCompleteFtraceEvent
             * @instance
             */
            BlockRqCompleteFtraceEvent.prototype.errors = 0;

            /**
             * BlockRqCompleteFtraceEvent rwbs.
             * @member {string} rwbs
             * @memberof perfetto.protos.BlockRqCompleteFtraceEvent
             * @instance
             */
            BlockRqCompleteFtraceEvent.prototype.rwbs = "";

            /**
             * BlockRqCompleteFtraceEvent cmd.
             * @member {string} cmd
             * @memberof perfetto.protos.BlockRqCompleteFtraceEvent
             * @instance
             */
            BlockRqCompleteFtraceEvent.prototype.cmd = "";

            /**
             * BlockRqCompleteFtraceEvent error.
             * @member {number} error
             * @memberof perfetto.protos.BlockRqCompleteFtraceEvent
             * @instance
             */
            BlockRqCompleteFtraceEvent.prototype.error = 0;

            /**
             * Creates a new BlockRqCompleteFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BlockRqCompleteFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockRqCompleteFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BlockRqCompleteFtraceEvent} BlockRqCompleteFtraceEvent instance
             */
            BlockRqCompleteFtraceEvent.create = function create(properties) {
                return new BlockRqCompleteFtraceEvent(properties);
            };

            /**
             * Encodes the specified BlockRqCompleteFtraceEvent message. Does not implicitly {@link perfetto.protos.BlockRqCompleteFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BlockRqCompleteFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockRqCompleteFtraceEvent} m BlockRqCompleteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockRqCompleteFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.sector != null && Object.hasOwnProperty.call(m, "sector"))
                    w.uint32(16).uint64(m.sector);
                if (m.nrSector != null && Object.hasOwnProperty.call(m, "nrSector"))
                    w.uint32(24).uint32(m.nrSector);
                if (m.errors != null && Object.hasOwnProperty.call(m, "errors"))
                    w.uint32(32).int32(m.errors);
                if (m.rwbs != null && Object.hasOwnProperty.call(m, "rwbs"))
                    w.uint32(42).string(m.rwbs);
                if (m.cmd != null && Object.hasOwnProperty.call(m, "cmd"))
                    w.uint32(50).string(m.cmd);
                if (m.error != null && Object.hasOwnProperty.call(m, "error"))
                    w.uint32(56).int32(m.error);
                return w;
            };

            /**
             * Encodes the specified BlockRqCompleteFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BlockRqCompleteFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BlockRqCompleteFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockRqCompleteFtraceEvent} message BlockRqCompleteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockRqCompleteFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BlockRqCompleteFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BlockRqCompleteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BlockRqCompleteFtraceEvent} BlockRqCompleteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockRqCompleteFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BlockRqCompleteFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.sector = r.uint64();
                        break;
                    case 3:
                        m.nrSector = r.uint32();
                        break;
                    case 4:
                        m.errors = r.int32();
                        break;
                    case 5:
                        m.rwbs = r.string();
                        break;
                    case 6:
                        m.cmd = r.string();
                        break;
                    case 7:
                        m.error = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BlockRqCompleteFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BlockRqCompleteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BlockRqCompleteFtraceEvent} BlockRqCompleteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockRqCompleteFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BlockRqCompleteFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BlockRqCompleteFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BlockRqCompleteFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (!$util.isInteger(m.sector) && !(m.sector && $util.isInteger(m.sector.low) && $util.isInteger(m.sector.high)))
                        return "sector: integer|Long expected";
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    if (!$util.isInteger(m.nrSector))
                        return "nrSector: integer expected";
                }
                if (m.errors != null && m.hasOwnProperty("errors")) {
                    if (!$util.isInteger(m.errors))
                        return "errors: integer expected";
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    if (!$util.isString(m.rwbs))
                        return "rwbs: string expected";
                }
                if (m.cmd != null && m.hasOwnProperty("cmd")) {
                    if (!$util.isString(m.cmd))
                        return "cmd: string expected";
                }
                if (m.error != null && m.hasOwnProperty("error")) {
                    if (!$util.isInteger(m.error))
                        return "error: integer expected";
                }
                return null;
            };

            /**
             * Creates a BlockRqCompleteFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BlockRqCompleteFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BlockRqCompleteFtraceEvent} BlockRqCompleteFtraceEvent
             */
            BlockRqCompleteFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BlockRqCompleteFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BlockRqCompleteFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.sector != null) {
                    if ($util.Long)
                        (m.sector = $util.Long.fromValue(d.sector)).unsigned = true;
                    else if (typeof d.sector === "string")
                        m.sector = parseInt(d.sector, 10);
                    else if (typeof d.sector === "number")
                        m.sector = d.sector;
                    else if (typeof d.sector === "object")
                        m.sector = new $util.LongBits(d.sector.low >>> 0, d.sector.high >>> 0).toNumber(true);
                }
                if (d.nrSector != null) {
                    m.nrSector = d.nrSector >>> 0;
                }
                if (d.errors != null) {
                    m.errors = d.errors | 0;
                }
                if (d.rwbs != null) {
                    m.rwbs = String(d.rwbs);
                }
                if (d.cmd != null) {
                    m.cmd = String(d.cmd);
                }
                if (d.error != null) {
                    m.error = d.error | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a BlockRqCompleteFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BlockRqCompleteFtraceEvent
             * @static
             * @param {perfetto.protos.BlockRqCompleteFtraceEvent} m BlockRqCompleteFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BlockRqCompleteFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sector = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sector = o.longs === String ? "0" : 0;
                    d.nrSector = 0;
                    d.errors = 0;
                    d.rwbs = "";
                    d.cmd = "";
                    d.error = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (typeof m.sector === "number")
                        d.sector = o.longs === String ? String(m.sector) : m.sector;
                    else
                        d.sector = o.longs === String ? $util.Long.prototype.toString.call(m.sector) : o.longs === Number ? new $util.LongBits(m.sector.low >>> 0, m.sector.high >>> 0).toNumber(true) : m.sector;
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    d.nrSector = m.nrSector;
                }
                if (m.errors != null && m.hasOwnProperty("errors")) {
                    d.errors = m.errors;
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    d.rwbs = m.rwbs;
                }
                if (m.cmd != null && m.hasOwnProperty("cmd")) {
                    d.cmd = m.cmd;
                }
                if (m.error != null && m.hasOwnProperty("error")) {
                    d.error = m.error;
                }
                return d;
            };

            /**
             * Converts this BlockRqCompleteFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BlockRqCompleteFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BlockRqCompleteFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BlockRqCompleteFtraceEvent;
        })();

        protos.BlockRqInsertFtraceEvent = (function() {

            /**
             * Properties of a BlockRqInsertFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBlockRqInsertFtraceEvent
             * @property {number|null} [dev] BlockRqInsertFtraceEvent dev
             * @property {number|null} [sector] BlockRqInsertFtraceEvent sector
             * @property {number|null} [nrSector] BlockRqInsertFtraceEvent nrSector
             * @property {number|null} [bytes] BlockRqInsertFtraceEvent bytes
             * @property {string|null} [rwbs] BlockRqInsertFtraceEvent rwbs
             * @property {string|null} [comm] BlockRqInsertFtraceEvent comm
             * @property {string|null} [cmd] BlockRqInsertFtraceEvent cmd
             */

            /**
             * Constructs a new BlockRqInsertFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BlockRqInsertFtraceEvent.
             * @implements IBlockRqInsertFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBlockRqInsertFtraceEvent=} [p] Properties to set
             */
            function BlockRqInsertFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BlockRqInsertFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.BlockRqInsertFtraceEvent
             * @instance
             */
            BlockRqInsertFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockRqInsertFtraceEvent sector.
             * @member {number} sector
             * @memberof perfetto.protos.BlockRqInsertFtraceEvent
             * @instance
             */
            BlockRqInsertFtraceEvent.prototype.sector = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockRqInsertFtraceEvent nrSector.
             * @member {number} nrSector
             * @memberof perfetto.protos.BlockRqInsertFtraceEvent
             * @instance
             */
            BlockRqInsertFtraceEvent.prototype.nrSector = 0;

            /**
             * BlockRqInsertFtraceEvent bytes.
             * @member {number} bytes
             * @memberof perfetto.protos.BlockRqInsertFtraceEvent
             * @instance
             */
            BlockRqInsertFtraceEvent.prototype.bytes = 0;

            /**
             * BlockRqInsertFtraceEvent rwbs.
             * @member {string} rwbs
             * @memberof perfetto.protos.BlockRqInsertFtraceEvent
             * @instance
             */
            BlockRqInsertFtraceEvent.prototype.rwbs = "";

            /**
             * BlockRqInsertFtraceEvent comm.
             * @member {string} comm
             * @memberof perfetto.protos.BlockRqInsertFtraceEvent
             * @instance
             */
            BlockRqInsertFtraceEvent.prototype.comm = "";

            /**
             * BlockRqInsertFtraceEvent cmd.
             * @member {string} cmd
             * @memberof perfetto.protos.BlockRqInsertFtraceEvent
             * @instance
             */
            BlockRqInsertFtraceEvent.prototype.cmd = "";

            /**
             * Creates a new BlockRqInsertFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BlockRqInsertFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockRqInsertFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BlockRqInsertFtraceEvent} BlockRqInsertFtraceEvent instance
             */
            BlockRqInsertFtraceEvent.create = function create(properties) {
                return new BlockRqInsertFtraceEvent(properties);
            };

            /**
             * Encodes the specified BlockRqInsertFtraceEvent message. Does not implicitly {@link perfetto.protos.BlockRqInsertFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BlockRqInsertFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockRqInsertFtraceEvent} m BlockRqInsertFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockRqInsertFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.sector != null && Object.hasOwnProperty.call(m, "sector"))
                    w.uint32(16).uint64(m.sector);
                if (m.nrSector != null && Object.hasOwnProperty.call(m, "nrSector"))
                    w.uint32(24).uint32(m.nrSector);
                if (m.bytes != null && Object.hasOwnProperty.call(m, "bytes"))
                    w.uint32(32).uint32(m.bytes);
                if (m.rwbs != null && Object.hasOwnProperty.call(m, "rwbs"))
                    w.uint32(42).string(m.rwbs);
                if (m.comm != null && Object.hasOwnProperty.call(m, "comm"))
                    w.uint32(50).string(m.comm);
                if (m.cmd != null && Object.hasOwnProperty.call(m, "cmd"))
                    w.uint32(58).string(m.cmd);
                return w;
            };

            /**
             * Encodes the specified BlockRqInsertFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BlockRqInsertFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BlockRqInsertFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockRqInsertFtraceEvent} message BlockRqInsertFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockRqInsertFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BlockRqInsertFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BlockRqInsertFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BlockRqInsertFtraceEvent} BlockRqInsertFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockRqInsertFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BlockRqInsertFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.sector = r.uint64();
                        break;
                    case 3:
                        m.nrSector = r.uint32();
                        break;
                    case 4:
                        m.bytes = r.uint32();
                        break;
                    case 5:
                        m.rwbs = r.string();
                        break;
                    case 6:
                        m.comm = r.string();
                        break;
                    case 7:
                        m.cmd = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BlockRqInsertFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BlockRqInsertFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BlockRqInsertFtraceEvent} BlockRqInsertFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockRqInsertFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BlockRqInsertFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BlockRqInsertFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BlockRqInsertFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (!$util.isInteger(m.sector) && !(m.sector && $util.isInteger(m.sector.low) && $util.isInteger(m.sector.high)))
                        return "sector: integer|Long expected";
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    if (!$util.isInteger(m.nrSector))
                        return "nrSector: integer expected";
                }
                if (m.bytes != null && m.hasOwnProperty("bytes")) {
                    if (!$util.isInteger(m.bytes))
                        return "bytes: integer expected";
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    if (!$util.isString(m.rwbs))
                        return "rwbs: string expected";
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    if (!$util.isString(m.comm))
                        return "comm: string expected";
                }
                if (m.cmd != null && m.hasOwnProperty("cmd")) {
                    if (!$util.isString(m.cmd))
                        return "cmd: string expected";
                }
                return null;
            };

            /**
             * Creates a BlockRqInsertFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BlockRqInsertFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BlockRqInsertFtraceEvent} BlockRqInsertFtraceEvent
             */
            BlockRqInsertFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BlockRqInsertFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BlockRqInsertFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.sector != null) {
                    if ($util.Long)
                        (m.sector = $util.Long.fromValue(d.sector)).unsigned = true;
                    else if (typeof d.sector === "string")
                        m.sector = parseInt(d.sector, 10);
                    else if (typeof d.sector === "number")
                        m.sector = d.sector;
                    else if (typeof d.sector === "object")
                        m.sector = new $util.LongBits(d.sector.low >>> 0, d.sector.high >>> 0).toNumber(true);
                }
                if (d.nrSector != null) {
                    m.nrSector = d.nrSector >>> 0;
                }
                if (d.bytes != null) {
                    m.bytes = d.bytes >>> 0;
                }
                if (d.rwbs != null) {
                    m.rwbs = String(d.rwbs);
                }
                if (d.comm != null) {
                    m.comm = String(d.comm);
                }
                if (d.cmd != null) {
                    m.cmd = String(d.cmd);
                }
                return m;
            };

            /**
             * Creates a plain object from a BlockRqInsertFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BlockRqInsertFtraceEvent
             * @static
             * @param {perfetto.protos.BlockRqInsertFtraceEvent} m BlockRqInsertFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BlockRqInsertFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sector = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sector = o.longs === String ? "0" : 0;
                    d.nrSector = 0;
                    d.bytes = 0;
                    d.rwbs = "";
                    d.comm = "";
                    d.cmd = "";
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (typeof m.sector === "number")
                        d.sector = o.longs === String ? String(m.sector) : m.sector;
                    else
                        d.sector = o.longs === String ? $util.Long.prototype.toString.call(m.sector) : o.longs === Number ? new $util.LongBits(m.sector.low >>> 0, m.sector.high >>> 0).toNumber(true) : m.sector;
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    d.nrSector = m.nrSector;
                }
                if (m.bytes != null && m.hasOwnProperty("bytes")) {
                    d.bytes = m.bytes;
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    d.rwbs = m.rwbs;
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    d.comm = m.comm;
                }
                if (m.cmd != null && m.hasOwnProperty("cmd")) {
                    d.cmd = m.cmd;
                }
                return d;
            };

            /**
             * Converts this BlockRqInsertFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BlockRqInsertFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BlockRqInsertFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BlockRqInsertFtraceEvent;
        })();

        protos.BlockRqRemapFtraceEvent = (function() {

            /**
             * Properties of a BlockRqRemapFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBlockRqRemapFtraceEvent
             * @property {number|null} [dev] BlockRqRemapFtraceEvent dev
             * @property {number|null} [sector] BlockRqRemapFtraceEvent sector
             * @property {number|null} [nrSector] BlockRqRemapFtraceEvent nrSector
             * @property {number|null} [oldDev] BlockRqRemapFtraceEvent oldDev
             * @property {number|null} [oldSector] BlockRqRemapFtraceEvent oldSector
             * @property {number|null} [nrBios] BlockRqRemapFtraceEvent nrBios
             * @property {string|null} [rwbs] BlockRqRemapFtraceEvent rwbs
             */

            /**
             * Constructs a new BlockRqRemapFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BlockRqRemapFtraceEvent.
             * @implements IBlockRqRemapFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBlockRqRemapFtraceEvent=} [p] Properties to set
             */
            function BlockRqRemapFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BlockRqRemapFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.BlockRqRemapFtraceEvent
             * @instance
             */
            BlockRqRemapFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockRqRemapFtraceEvent sector.
             * @member {number} sector
             * @memberof perfetto.protos.BlockRqRemapFtraceEvent
             * @instance
             */
            BlockRqRemapFtraceEvent.prototype.sector = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockRqRemapFtraceEvent nrSector.
             * @member {number} nrSector
             * @memberof perfetto.protos.BlockRqRemapFtraceEvent
             * @instance
             */
            BlockRqRemapFtraceEvent.prototype.nrSector = 0;

            /**
             * BlockRqRemapFtraceEvent oldDev.
             * @member {number} oldDev
             * @memberof perfetto.protos.BlockRqRemapFtraceEvent
             * @instance
             */
            BlockRqRemapFtraceEvent.prototype.oldDev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockRqRemapFtraceEvent oldSector.
             * @member {number} oldSector
             * @memberof perfetto.protos.BlockRqRemapFtraceEvent
             * @instance
             */
            BlockRqRemapFtraceEvent.prototype.oldSector = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockRqRemapFtraceEvent nrBios.
             * @member {number} nrBios
             * @memberof perfetto.protos.BlockRqRemapFtraceEvent
             * @instance
             */
            BlockRqRemapFtraceEvent.prototype.nrBios = 0;

            /**
             * BlockRqRemapFtraceEvent rwbs.
             * @member {string} rwbs
             * @memberof perfetto.protos.BlockRqRemapFtraceEvent
             * @instance
             */
            BlockRqRemapFtraceEvent.prototype.rwbs = "";

            /**
             * Creates a new BlockRqRemapFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BlockRqRemapFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockRqRemapFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BlockRqRemapFtraceEvent} BlockRqRemapFtraceEvent instance
             */
            BlockRqRemapFtraceEvent.create = function create(properties) {
                return new BlockRqRemapFtraceEvent(properties);
            };

            /**
             * Encodes the specified BlockRqRemapFtraceEvent message. Does not implicitly {@link perfetto.protos.BlockRqRemapFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BlockRqRemapFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockRqRemapFtraceEvent} m BlockRqRemapFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockRqRemapFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.sector != null && Object.hasOwnProperty.call(m, "sector"))
                    w.uint32(16).uint64(m.sector);
                if (m.nrSector != null && Object.hasOwnProperty.call(m, "nrSector"))
                    w.uint32(24).uint32(m.nrSector);
                if (m.oldDev != null && Object.hasOwnProperty.call(m, "oldDev"))
                    w.uint32(32).uint64(m.oldDev);
                if (m.oldSector != null && Object.hasOwnProperty.call(m, "oldSector"))
                    w.uint32(40).uint64(m.oldSector);
                if (m.nrBios != null && Object.hasOwnProperty.call(m, "nrBios"))
                    w.uint32(48).uint32(m.nrBios);
                if (m.rwbs != null && Object.hasOwnProperty.call(m, "rwbs"))
                    w.uint32(58).string(m.rwbs);
                return w;
            };

            /**
             * Encodes the specified BlockRqRemapFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BlockRqRemapFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BlockRqRemapFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockRqRemapFtraceEvent} message BlockRqRemapFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockRqRemapFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BlockRqRemapFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BlockRqRemapFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BlockRqRemapFtraceEvent} BlockRqRemapFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockRqRemapFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BlockRqRemapFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.sector = r.uint64();
                        break;
                    case 3:
                        m.nrSector = r.uint32();
                        break;
                    case 4:
                        m.oldDev = r.uint64();
                        break;
                    case 5:
                        m.oldSector = r.uint64();
                        break;
                    case 6:
                        m.nrBios = r.uint32();
                        break;
                    case 7:
                        m.rwbs = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BlockRqRemapFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BlockRqRemapFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BlockRqRemapFtraceEvent} BlockRqRemapFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockRqRemapFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BlockRqRemapFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BlockRqRemapFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BlockRqRemapFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (!$util.isInteger(m.sector) && !(m.sector && $util.isInteger(m.sector.low) && $util.isInteger(m.sector.high)))
                        return "sector: integer|Long expected";
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    if (!$util.isInteger(m.nrSector))
                        return "nrSector: integer expected";
                }
                if (m.oldDev != null && m.hasOwnProperty("oldDev")) {
                    if (!$util.isInteger(m.oldDev) && !(m.oldDev && $util.isInteger(m.oldDev.low) && $util.isInteger(m.oldDev.high)))
                        return "oldDev: integer|Long expected";
                }
                if (m.oldSector != null && m.hasOwnProperty("oldSector")) {
                    if (!$util.isInteger(m.oldSector) && !(m.oldSector && $util.isInteger(m.oldSector.low) && $util.isInteger(m.oldSector.high)))
                        return "oldSector: integer|Long expected";
                }
                if (m.nrBios != null && m.hasOwnProperty("nrBios")) {
                    if (!$util.isInteger(m.nrBios))
                        return "nrBios: integer expected";
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    if (!$util.isString(m.rwbs))
                        return "rwbs: string expected";
                }
                return null;
            };

            /**
             * Creates a BlockRqRemapFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BlockRqRemapFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BlockRqRemapFtraceEvent} BlockRqRemapFtraceEvent
             */
            BlockRqRemapFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BlockRqRemapFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BlockRqRemapFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.sector != null) {
                    if ($util.Long)
                        (m.sector = $util.Long.fromValue(d.sector)).unsigned = true;
                    else if (typeof d.sector === "string")
                        m.sector = parseInt(d.sector, 10);
                    else if (typeof d.sector === "number")
                        m.sector = d.sector;
                    else if (typeof d.sector === "object")
                        m.sector = new $util.LongBits(d.sector.low >>> 0, d.sector.high >>> 0).toNumber(true);
                }
                if (d.nrSector != null) {
                    m.nrSector = d.nrSector >>> 0;
                }
                if (d.oldDev != null) {
                    if ($util.Long)
                        (m.oldDev = $util.Long.fromValue(d.oldDev)).unsigned = true;
                    else if (typeof d.oldDev === "string")
                        m.oldDev = parseInt(d.oldDev, 10);
                    else if (typeof d.oldDev === "number")
                        m.oldDev = d.oldDev;
                    else if (typeof d.oldDev === "object")
                        m.oldDev = new $util.LongBits(d.oldDev.low >>> 0, d.oldDev.high >>> 0).toNumber(true);
                }
                if (d.oldSector != null) {
                    if ($util.Long)
                        (m.oldSector = $util.Long.fromValue(d.oldSector)).unsigned = true;
                    else if (typeof d.oldSector === "string")
                        m.oldSector = parseInt(d.oldSector, 10);
                    else if (typeof d.oldSector === "number")
                        m.oldSector = d.oldSector;
                    else if (typeof d.oldSector === "object")
                        m.oldSector = new $util.LongBits(d.oldSector.low >>> 0, d.oldSector.high >>> 0).toNumber(true);
                }
                if (d.nrBios != null) {
                    m.nrBios = d.nrBios >>> 0;
                }
                if (d.rwbs != null) {
                    m.rwbs = String(d.rwbs);
                }
                return m;
            };

            /**
             * Creates a plain object from a BlockRqRemapFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BlockRqRemapFtraceEvent
             * @static
             * @param {perfetto.protos.BlockRqRemapFtraceEvent} m BlockRqRemapFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BlockRqRemapFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sector = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sector = o.longs === String ? "0" : 0;
                    d.nrSector = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.oldDev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.oldDev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.oldSector = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.oldSector = o.longs === String ? "0" : 0;
                    d.nrBios = 0;
                    d.rwbs = "";
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (typeof m.sector === "number")
                        d.sector = o.longs === String ? String(m.sector) : m.sector;
                    else
                        d.sector = o.longs === String ? $util.Long.prototype.toString.call(m.sector) : o.longs === Number ? new $util.LongBits(m.sector.low >>> 0, m.sector.high >>> 0).toNumber(true) : m.sector;
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    d.nrSector = m.nrSector;
                }
                if (m.oldDev != null && m.hasOwnProperty("oldDev")) {
                    if (typeof m.oldDev === "number")
                        d.oldDev = o.longs === String ? String(m.oldDev) : m.oldDev;
                    else
                        d.oldDev = o.longs === String ? $util.Long.prototype.toString.call(m.oldDev) : o.longs === Number ? new $util.LongBits(m.oldDev.low >>> 0, m.oldDev.high >>> 0).toNumber(true) : m.oldDev;
                }
                if (m.oldSector != null && m.hasOwnProperty("oldSector")) {
                    if (typeof m.oldSector === "number")
                        d.oldSector = o.longs === String ? String(m.oldSector) : m.oldSector;
                    else
                        d.oldSector = o.longs === String ? $util.Long.prototype.toString.call(m.oldSector) : o.longs === Number ? new $util.LongBits(m.oldSector.low >>> 0, m.oldSector.high >>> 0).toNumber(true) : m.oldSector;
                }
                if (m.nrBios != null && m.hasOwnProperty("nrBios")) {
                    d.nrBios = m.nrBios;
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    d.rwbs = m.rwbs;
                }
                return d;
            };

            /**
             * Converts this BlockRqRemapFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BlockRqRemapFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BlockRqRemapFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BlockRqRemapFtraceEvent;
        })();

        protos.BlockRqRequeueFtraceEvent = (function() {

            /**
             * Properties of a BlockRqRequeueFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBlockRqRequeueFtraceEvent
             * @property {number|null} [dev] BlockRqRequeueFtraceEvent dev
             * @property {number|null} [sector] BlockRqRequeueFtraceEvent sector
             * @property {number|null} [nrSector] BlockRqRequeueFtraceEvent nrSector
             * @property {number|null} [errors] BlockRqRequeueFtraceEvent errors
             * @property {string|null} [rwbs] BlockRqRequeueFtraceEvent rwbs
             * @property {string|null} [cmd] BlockRqRequeueFtraceEvent cmd
             */

            /**
             * Constructs a new BlockRqRequeueFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BlockRqRequeueFtraceEvent.
             * @implements IBlockRqRequeueFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBlockRqRequeueFtraceEvent=} [p] Properties to set
             */
            function BlockRqRequeueFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BlockRqRequeueFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.BlockRqRequeueFtraceEvent
             * @instance
             */
            BlockRqRequeueFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockRqRequeueFtraceEvent sector.
             * @member {number} sector
             * @memberof perfetto.protos.BlockRqRequeueFtraceEvent
             * @instance
             */
            BlockRqRequeueFtraceEvent.prototype.sector = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockRqRequeueFtraceEvent nrSector.
             * @member {number} nrSector
             * @memberof perfetto.protos.BlockRqRequeueFtraceEvent
             * @instance
             */
            BlockRqRequeueFtraceEvent.prototype.nrSector = 0;

            /**
             * BlockRqRequeueFtraceEvent errors.
             * @member {number} errors
             * @memberof perfetto.protos.BlockRqRequeueFtraceEvent
             * @instance
             */
            BlockRqRequeueFtraceEvent.prototype.errors = 0;

            /**
             * BlockRqRequeueFtraceEvent rwbs.
             * @member {string} rwbs
             * @memberof perfetto.protos.BlockRqRequeueFtraceEvent
             * @instance
             */
            BlockRqRequeueFtraceEvent.prototype.rwbs = "";

            /**
             * BlockRqRequeueFtraceEvent cmd.
             * @member {string} cmd
             * @memberof perfetto.protos.BlockRqRequeueFtraceEvent
             * @instance
             */
            BlockRqRequeueFtraceEvent.prototype.cmd = "";

            /**
             * Creates a new BlockRqRequeueFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BlockRqRequeueFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockRqRequeueFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BlockRqRequeueFtraceEvent} BlockRqRequeueFtraceEvent instance
             */
            BlockRqRequeueFtraceEvent.create = function create(properties) {
                return new BlockRqRequeueFtraceEvent(properties);
            };

            /**
             * Encodes the specified BlockRqRequeueFtraceEvent message. Does not implicitly {@link perfetto.protos.BlockRqRequeueFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BlockRqRequeueFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockRqRequeueFtraceEvent} m BlockRqRequeueFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockRqRequeueFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.sector != null && Object.hasOwnProperty.call(m, "sector"))
                    w.uint32(16).uint64(m.sector);
                if (m.nrSector != null && Object.hasOwnProperty.call(m, "nrSector"))
                    w.uint32(24).uint32(m.nrSector);
                if (m.errors != null && Object.hasOwnProperty.call(m, "errors"))
                    w.uint32(32).int32(m.errors);
                if (m.rwbs != null && Object.hasOwnProperty.call(m, "rwbs"))
                    w.uint32(42).string(m.rwbs);
                if (m.cmd != null && Object.hasOwnProperty.call(m, "cmd"))
                    w.uint32(50).string(m.cmd);
                return w;
            };

            /**
             * Encodes the specified BlockRqRequeueFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BlockRqRequeueFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BlockRqRequeueFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockRqRequeueFtraceEvent} message BlockRqRequeueFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockRqRequeueFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BlockRqRequeueFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BlockRqRequeueFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BlockRqRequeueFtraceEvent} BlockRqRequeueFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockRqRequeueFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BlockRqRequeueFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.sector = r.uint64();
                        break;
                    case 3:
                        m.nrSector = r.uint32();
                        break;
                    case 4:
                        m.errors = r.int32();
                        break;
                    case 5:
                        m.rwbs = r.string();
                        break;
                    case 6:
                        m.cmd = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BlockRqRequeueFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BlockRqRequeueFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BlockRqRequeueFtraceEvent} BlockRqRequeueFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockRqRequeueFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BlockRqRequeueFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BlockRqRequeueFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BlockRqRequeueFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (!$util.isInteger(m.sector) && !(m.sector && $util.isInteger(m.sector.low) && $util.isInteger(m.sector.high)))
                        return "sector: integer|Long expected";
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    if (!$util.isInteger(m.nrSector))
                        return "nrSector: integer expected";
                }
                if (m.errors != null && m.hasOwnProperty("errors")) {
                    if (!$util.isInteger(m.errors))
                        return "errors: integer expected";
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    if (!$util.isString(m.rwbs))
                        return "rwbs: string expected";
                }
                if (m.cmd != null && m.hasOwnProperty("cmd")) {
                    if (!$util.isString(m.cmd))
                        return "cmd: string expected";
                }
                return null;
            };

            /**
             * Creates a BlockRqRequeueFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BlockRqRequeueFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BlockRqRequeueFtraceEvent} BlockRqRequeueFtraceEvent
             */
            BlockRqRequeueFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BlockRqRequeueFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BlockRqRequeueFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.sector != null) {
                    if ($util.Long)
                        (m.sector = $util.Long.fromValue(d.sector)).unsigned = true;
                    else if (typeof d.sector === "string")
                        m.sector = parseInt(d.sector, 10);
                    else if (typeof d.sector === "number")
                        m.sector = d.sector;
                    else if (typeof d.sector === "object")
                        m.sector = new $util.LongBits(d.sector.low >>> 0, d.sector.high >>> 0).toNumber(true);
                }
                if (d.nrSector != null) {
                    m.nrSector = d.nrSector >>> 0;
                }
                if (d.errors != null) {
                    m.errors = d.errors | 0;
                }
                if (d.rwbs != null) {
                    m.rwbs = String(d.rwbs);
                }
                if (d.cmd != null) {
                    m.cmd = String(d.cmd);
                }
                return m;
            };

            /**
             * Creates a plain object from a BlockRqRequeueFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BlockRqRequeueFtraceEvent
             * @static
             * @param {perfetto.protos.BlockRqRequeueFtraceEvent} m BlockRqRequeueFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BlockRqRequeueFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sector = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sector = o.longs === String ? "0" : 0;
                    d.nrSector = 0;
                    d.errors = 0;
                    d.rwbs = "";
                    d.cmd = "";
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (typeof m.sector === "number")
                        d.sector = o.longs === String ? String(m.sector) : m.sector;
                    else
                        d.sector = o.longs === String ? $util.Long.prototype.toString.call(m.sector) : o.longs === Number ? new $util.LongBits(m.sector.low >>> 0, m.sector.high >>> 0).toNumber(true) : m.sector;
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    d.nrSector = m.nrSector;
                }
                if (m.errors != null && m.hasOwnProperty("errors")) {
                    d.errors = m.errors;
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    d.rwbs = m.rwbs;
                }
                if (m.cmd != null && m.hasOwnProperty("cmd")) {
                    d.cmd = m.cmd;
                }
                return d;
            };

            /**
             * Converts this BlockRqRequeueFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BlockRqRequeueFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BlockRqRequeueFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BlockRqRequeueFtraceEvent;
        })();

        protos.BlockSleeprqFtraceEvent = (function() {

            /**
             * Properties of a BlockSleeprqFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBlockSleeprqFtraceEvent
             * @property {number|null} [dev] BlockSleeprqFtraceEvent dev
             * @property {number|null} [sector] BlockSleeprqFtraceEvent sector
             * @property {number|null} [nrSector] BlockSleeprqFtraceEvent nrSector
             * @property {string|null} [rwbs] BlockSleeprqFtraceEvent rwbs
             * @property {string|null} [comm] BlockSleeprqFtraceEvent comm
             */

            /**
             * Constructs a new BlockSleeprqFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BlockSleeprqFtraceEvent.
             * @implements IBlockSleeprqFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBlockSleeprqFtraceEvent=} [p] Properties to set
             */
            function BlockSleeprqFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BlockSleeprqFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.BlockSleeprqFtraceEvent
             * @instance
             */
            BlockSleeprqFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockSleeprqFtraceEvent sector.
             * @member {number} sector
             * @memberof perfetto.protos.BlockSleeprqFtraceEvent
             * @instance
             */
            BlockSleeprqFtraceEvent.prototype.sector = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockSleeprqFtraceEvent nrSector.
             * @member {number} nrSector
             * @memberof perfetto.protos.BlockSleeprqFtraceEvent
             * @instance
             */
            BlockSleeprqFtraceEvent.prototype.nrSector = 0;

            /**
             * BlockSleeprqFtraceEvent rwbs.
             * @member {string} rwbs
             * @memberof perfetto.protos.BlockSleeprqFtraceEvent
             * @instance
             */
            BlockSleeprqFtraceEvent.prototype.rwbs = "";

            /**
             * BlockSleeprqFtraceEvent comm.
             * @member {string} comm
             * @memberof perfetto.protos.BlockSleeprqFtraceEvent
             * @instance
             */
            BlockSleeprqFtraceEvent.prototype.comm = "";

            /**
             * Creates a new BlockSleeprqFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BlockSleeprqFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockSleeprqFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BlockSleeprqFtraceEvent} BlockSleeprqFtraceEvent instance
             */
            BlockSleeprqFtraceEvent.create = function create(properties) {
                return new BlockSleeprqFtraceEvent(properties);
            };

            /**
             * Encodes the specified BlockSleeprqFtraceEvent message. Does not implicitly {@link perfetto.protos.BlockSleeprqFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BlockSleeprqFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockSleeprqFtraceEvent} m BlockSleeprqFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockSleeprqFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.sector != null && Object.hasOwnProperty.call(m, "sector"))
                    w.uint32(16).uint64(m.sector);
                if (m.nrSector != null && Object.hasOwnProperty.call(m, "nrSector"))
                    w.uint32(24).uint32(m.nrSector);
                if (m.rwbs != null && Object.hasOwnProperty.call(m, "rwbs"))
                    w.uint32(34).string(m.rwbs);
                if (m.comm != null && Object.hasOwnProperty.call(m, "comm"))
                    w.uint32(42).string(m.comm);
                return w;
            };

            /**
             * Encodes the specified BlockSleeprqFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BlockSleeprqFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BlockSleeprqFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockSleeprqFtraceEvent} message BlockSleeprqFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockSleeprqFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BlockSleeprqFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BlockSleeprqFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BlockSleeprqFtraceEvent} BlockSleeprqFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockSleeprqFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BlockSleeprqFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.sector = r.uint64();
                        break;
                    case 3:
                        m.nrSector = r.uint32();
                        break;
                    case 4:
                        m.rwbs = r.string();
                        break;
                    case 5:
                        m.comm = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BlockSleeprqFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BlockSleeprqFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BlockSleeprqFtraceEvent} BlockSleeprqFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockSleeprqFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BlockSleeprqFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BlockSleeprqFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BlockSleeprqFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (!$util.isInteger(m.sector) && !(m.sector && $util.isInteger(m.sector.low) && $util.isInteger(m.sector.high)))
                        return "sector: integer|Long expected";
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    if (!$util.isInteger(m.nrSector))
                        return "nrSector: integer expected";
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    if (!$util.isString(m.rwbs))
                        return "rwbs: string expected";
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    if (!$util.isString(m.comm))
                        return "comm: string expected";
                }
                return null;
            };

            /**
             * Creates a BlockSleeprqFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BlockSleeprqFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BlockSleeprqFtraceEvent} BlockSleeprqFtraceEvent
             */
            BlockSleeprqFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BlockSleeprqFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BlockSleeprqFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.sector != null) {
                    if ($util.Long)
                        (m.sector = $util.Long.fromValue(d.sector)).unsigned = true;
                    else if (typeof d.sector === "string")
                        m.sector = parseInt(d.sector, 10);
                    else if (typeof d.sector === "number")
                        m.sector = d.sector;
                    else if (typeof d.sector === "object")
                        m.sector = new $util.LongBits(d.sector.low >>> 0, d.sector.high >>> 0).toNumber(true);
                }
                if (d.nrSector != null) {
                    m.nrSector = d.nrSector >>> 0;
                }
                if (d.rwbs != null) {
                    m.rwbs = String(d.rwbs);
                }
                if (d.comm != null) {
                    m.comm = String(d.comm);
                }
                return m;
            };

            /**
             * Creates a plain object from a BlockSleeprqFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BlockSleeprqFtraceEvent
             * @static
             * @param {perfetto.protos.BlockSleeprqFtraceEvent} m BlockSleeprqFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BlockSleeprqFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sector = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sector = o.longs === String ? "0" : 0;
                    d.nrSector = 0;
                    d.rwbs = "";
                    d.comm = "";
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (typeof m.sector === "number")
                        d.sector = o.longs === String ? String(m.sector) : m.sector;
                    else
                        d.sector = o.longs === String ? $util.Long.prototype.toString.call(m.sector) : o.longs === Number ? new $util.LongBits(m.sector.low >>> 0, m.sector.high >>> 0).toNumber(true) : m.sector;
                }
                if (m.nrSector != null && m.hasOwnProperty("nrSector")) {
                    d.nrSector = m.nrSector;
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    d.rwbs = m.rwbs;
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    d.comm = m.comm;
                }
                return d;
            };

            /**
             * Converts this BlockSleeprqFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BlockSleeprqFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BlockSleeprqFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BlockSleeprqFtraceEvent;
        })();

        protos.BlockSplitFtraceEvent = (function() {

            /**
             * Properties of a BlockSplitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBlockSplitFtraceEvent
             * @property {number|null} [dev] BlockSplitFtraceEvent dev
             * @property {number|null} [sector] BlockSplitFtraceEvent sector
             * @property {number|null} [newSector] BlockSplitFtraceEvent newSector
             * @property {string|null} [rwbs] BlockSplitFtraceEvent rwbs
             * @property {string|null} [comm] BlockSplitFtraceEvent comm
             */

            /**
             * Constructs a new BlockSplitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BlockSplitFtraceEvent.
             * @implements IBlockSplitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBlockSplitFtraceEvent=} [p] Properties to set
             */
            function BlockSplitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BlockSplitFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.BlockSplitFtraceEvent
             * @instance
             */
            BlockSplitFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockSplitFtraceEvent sector.
             * @member {number} sector
             * @memberof perfetto.protos.BlockSplitFtraceEvent
             * @instance
             */
            BlockSplitFtraceEvent.prototype.sector = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockSplitFtraceEvent newSector.
             * @member {number} newSector
             * @memberof perfetto.protos.BlockSplitFtraceEvent
             * @instance
             */
            BlockSplitFtraceEvent.prototype.newSector = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockSplitFtraceEvent rwbs.
             * @member {string} rwbs
             * @memberof perfetto.protos.BlockSplitFtraceEvent
             * @instance
             */
            BlockSplitFtraceEvent.prototype.rwbs = "";

            /**
             * BlockSplitFtraceEvent comm.
             * @member {string} comm
             * @memberof perfetto.protos.BlockSplitFtraceEvent
             * @instance
             */
            BlockSplitFtraceEvent.prototype.comm = "";

            /**
             * Creates a new BlockSplitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BlockSplitFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockSplitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BlockSplitFtraceEvent} BlockSplitFtraceEvent instance
             */
            BlockSplitFtraceEvent.create = function create(properties) {
                return new BlockSplitFtraceEvent(properties);
            };

            /**
             * Encodes the specified BlockSplitFtraceEvent message. Does not implicitly {@link perfetto.protos.BlockSplitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BlockSplitFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockSplitFtraceEvent} m BlockSplitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockSplitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.sector != null && Object.hasOwnProperty.call(m, "sector"))
                    w.uint32(16).uint64(m.sector);
                if (m.newSector != null && Object.hasOwnProperty.call(m, "newSector"))
                    w.uint32(24).uint64(m.newSector);
                if (m.rwbs != null && Object.hasOwnProperty.call(m, "rwbs"))
                    w.uint32(34).string(m.rwbs);
                if (m.comm != null && Object.hasOwnProperty.call(m, "comm"))
                    w.uint32(42).string(m.comm);
                return w;
            };

            /**
             * Encodes the specified BlockSplitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BlockSplitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BlockSplitFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockSplitFtraceEvent} message BlockSplitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockSplitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BlockSplitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BlockSplitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BlockSplitFtraceEvent} BlockSplitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockSplitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BlockSplitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.sector = r.uint64();
                        break;
                    case 3:
                        m.newSector = r.uint64();
                        break;
                    case 4:
                        m.rwbs = r.string();
                        break;
                    case 5:
                        m.comm = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BlockSplitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BlockSplitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BlockSplitFtraceEvent} BlockSplitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockSplitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BlockSplitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BlockSplitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BlockSplitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (!$util.isInteger(m.sector) && !(m.sector && $util.isInteger(m.sector.low) && $util.isInteger(m.sector.high)))
                        return "sector: integer|Long expected";
                }
                if (m.newSector != null && m.hasOwnProperty("newSector")) {
                    if (!$util.isInteger(m.newSector) && !(m.newSector && $util.isInteger(m.newSector.low) && $util.isInteger(m.newSector.high)))
                        return "newSector: integer|Long expected";
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    if (!$util.isString(m.rwbs))
                        return "rwbs: string expected";
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    if (!$util.isString(m.comm))
                        return "comm: string expected";
                }
                return null;
            };

            /**
             * Creates a BlockSplitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BlockSplitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BlockSplitFtraceEvent} BlockSplitFtraceEvent
             */
            BlockSplitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BlockSplitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BlockSplitFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.sector != null) {
                    if ($util.Long)
                        (m.sector = $util.Long.fromValue(d.sector)).unsigned = true;
                    else if (typeof d.sector === "string")
                        m.sector = parseInt(d.sector, 10);
                    else if (typeof d.sector === "number")
                        m.sector = d.sector;
                    else if (typeof d.sector === "object")
                        m.sector = new $util.LongBits(d.sector.low >>> 0, d.sector.high >>> 0).toNumber(true);
                }
                if (d.newSector != null) {
                    if ($util.Long)
                        (m.newSector = $util.Long.fromValue(d.newSector)).unsigned = true;
                    else if (typeof d.newSector === "string")
                        m.newSector = parseInt(d.newSector, 10);
                    else if (typeof d.newSector === "number")
                        m.newSector = d.newSector;
                    else if (typeof d.newSector === "object")
                        m.newSector = new $util.LongBits(d.newSector.low >>> 0, d.newSector.high >>> 0).toNumber(true);
                }
                if (d.rwbs != null) {
                    m.rwbs = String(d.rwbs);
                }
                if (d.comm != null) {
                    m.comm = String(d.comm);
                }
                return m;
            };

            /**
             * Creates a plain object from a BlockSplitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BlockSplitFtraceEvent
             * @static
             * @param {perfetto.protos.BlockSplitFtraceEvent} m BlockSplitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BlockSplitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sector = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sector = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.newSector = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.newSector = o.longs === String ? "0" : 0;
                    d.rwbs = "";
                    d.comm = "";
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (typeof m.sector === "number")
                        d.sector = o.longs === String ? String(m.sector) : m.sector;
                    else
                        d.sector = o.longs === String ? $util.Long.prototype.toString.call(m.sector) : o.longs === Number ? new $util.LongBits(m.sector.low >>> 0, m.sector.high >>> 0).toNumber(true) : m.sector;
                }
                if (m.newSector != null && m.hasOwnProperty("newSector")) {
                    if (typeof m.newSector === "number")
                        d.newSector = o.longs === String ? String(m.newSector) : m.newSector;
                    else
                        d.newSector = o.longs === String ? $util.Long.prototype.toString.call(m.newSector) : o.longs === Number ? new $util.LongBits(m.newSector.low >>> 0, m.newSector.high >>> 0).toNumber(true) : m.newSector;
                }
                if (m.rwbs != null && m.hasOwnProperty("rwbs")) {
                    d.rwbs = m.rwbs;
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    d.comm = m.comm;
                }
                return d;
            };

            /**
             * Converts this BlockSplitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BlockSplitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BlockSplitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BlockSplitFtraceEvent;
        })();

        protos.BlockTouchBufferFtraceEvent = (function() {

            /**
             * Properties of a BlockTouchBufferFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBlockTouchBufferFtraceEvent
             * @property {number|null} [dev] BlockTouchBufferFtraceEvent dev
             * @property {number|null} [sector] BlockTouchBufferFtraceEvent sector
             * @property {number|null} [size] BlockTouchBufferFtraceEvent size
             */

            /**
             * Constructs a new BlockTouchBufferFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BlockTouchBufferFtraceEvent.
             * @implements IBlockTouchBufferFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBlockTouchBufferFtraceEvent=} [p] Properties to set
             */
            function BlockTouchBufferFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BlockTouchBufferFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.BlockTouchBufferFtraceEvent
             * @instance
             */
            BlockTouchBufferFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockTouchBufferFtraceEvent sector.
             * @member {number} sector
             * @memberof perfetto.protos.BlockTouchBufferFtraceEvent
             * @instance
             */
            BlockTouchBufferFtraceEvent.prototype.sector = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BlockTouchBufferFtraceEvent size.
             * @member {number} size
             * @memberof perfetto.protos.BlockTouchBufferFtraceEvent
             * @instance
             */
            BlockTouchBufferFtraceEvent.prototype.size = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new BlockTouchBufferFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BlockTouchBufferFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockTouchBufferFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BlockTouchBufferFtraceEvent} BlockTouchBufferFtraceEvent instance
             */
            BlockTouchBufferFtraceEvent.create = function create(properties) {
                return new BlockTouchBufferFtraceEvent(properties);
            };

            /**
             * Encodes the specified BlockTouchBufferFtraceEvent message. Does not implicitly {@link perfetto.protos.BlockTouchBufferFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BlockTouchBufferFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockTouchBufferFtraceEvent} m BlockTouchBufferFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockTouchBufferFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.sector != null && Object.hasOwnProperty.call(m, "sector"))
                    w.uint32(16).uint64(m.sector);
                if (m.size != null && Object.hasOwnProperty.call(m, "size"))
                    w.uint32(24).uint64(m.size);
                return w;
            };

            /**
             * Encodes the specified BlockTouchBufferFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BlockTouchBufferFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BlockTouchBufferFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockTouchBufferFtraceEvent} message BlockTouchBufferFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockTouchBufferFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BlockTouchBufferFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BlockTouchBufferFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BlockTouchBufferFtraceEvent} BlockTouchBufferFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockTouchBufferFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BlockTouchBufferFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.sector = r.uint64();
                        break;
                    case 3:
                        m.size = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BlockTouchBufferFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BlockTouchBufferFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BlockTouchBufferFtraceEvent} BlockTouchBufferFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockTouchBufferFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BlockTouchBufferFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BlockTouchBufferFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BlockTouchBufferFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (!$util.isInteger(m.sector) && !(m.sector && $util.isInteger(m.sector.low) && $util.isInteger(m.sector.high)))
                        return "sector: integer|Long expected";
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (!$util.isInteger(m.size) && !(m.size && $util.isInteger(m.size.low) && $util.isInteger(m.size.high)))
                        return "size: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a BlockTouchBufferFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BlockTouchBufferFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BlockTouchBufferFtraceEvent} BlockTouchBufferFtraceEvent
             */
            BlockTouchBufferFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BlockTouchBufferFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BlockTouchBufferFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.sector != null) {
                    if ($util.Long)
                        (m.sector = $util.Long.fromValue(d.sector)).unsigned = true;
                    else if (typeof d.sector === "string")
                        m.sector = parseInt(d.sector, 10);
                    else if (typeof d.sector === "number")
                        m.sector = d.sector;
                    else if (typeof d.sector === "object")
                        m.sector = new $util.LongBits(d.sector.low >>> 0, d.sector.high >>> 0).toNumber(true);
                }
                if (d.size != null) {
                    if ($util.Long)
                        (m.size = $util.Long.fromValue(d.size)).unsigned = true;
                    else if (typeof d.size === "string")
                        m.size = parseInt(d.size, 10);
                    else if (typeof d.size === "number")
                        m.size = d.size;
                    else if (typeof d.size === "object")
                        m.size = new $util.LongBits(d.size.low >>> 0, d.size.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a BlockTouchBufferFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BlockTouchBufferFtraceEvent
             * @static
             * @param {perfetto.protos.BlockTouchBufferFtraceEvent} m BlockTouchBufferFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BlockTouchBufferFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sector = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sector = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.size = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.size = o.longs === String ? "0" : 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (typeof m.sector === "number")
                        d.sector = o.longs === String ? String(m.sector) : m.sector;
                    else
                        d.sector = o.longs === String ? $util.Long.prototype.toString.call(m.sector) : o.longs === Number ? new $util.LongBits(m.sector.low >>> 0, m.sector.high >>> 0).toNumber(true) : m.sector;
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (typeof m.size === "number")
                        d.size = o.longs === String ? String(m.size) : m.size;
                    else
                        d.size = o.longs === String ? $util.Long.prototype.toString.call(m.size) : o.longs === Number ? new $util.LongBits(m.size.low >>> 0, m.size.high >>> 0).toNumber(true) : m.size;
                }
                return d;
            };

            /**
             * Converts this BlockTouchBufferFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BlockTouchBufferFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BlockTouchBufferFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BlockTouchBufferFtraceEvent;
        })();

        protos.BlockUnplugFtraceEvent = (function() {

            /**
             * Properties of a BlockUnplugFtraceEvent.
             * @memberof perfetto.protos
             * @interface IBlockUnplugFtraceEvent
             * @property {number|null} [nrRq] BlockUnplugFtraceEvent nrRq
             * @property {string|null} [comm] BlockUnplugFtraceEvent comm
             */

            /**
             * Constructs a new BlockUnplugFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a BlockUnplugFtraceEvent.
             * @implements IBlockUnplugFtraceEvent
             * @constructor
             * @param {perfetto.protos.IBlockUnplugFtraceEvent=} [p] Properties to set
             */
            function BlockUnplugFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BlockUnplugFtraceEvent nrRq.
             * @member {number} nrRq
             * @memberof perfetto.protos.BlockUnplugFtraceEvent
             * @instance
             */
            BlockUnplugFtraceEvent.prototype.nrRq = 0;

            /**
             * BlockUnplugFtraceEvent comm.
             * @member {string} comm
             * @memberof perfetto.protos.BlockUnplugFtraceEvent
             * @instance
             */
            BlockUnplugFtraceEvent.prototype.comm = "";

            /**
             * Creates a new BlockUnplugFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BlockUnplugFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockUnplugFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.BlockUnplugFtraceEvent} BlockUnplugFtraceEvent instance
             */
            BlockUnplugFtraceEvent.create = function create(properties) {
                return new BlockUnplugFtraceEvent(properties);
            };

            /**
             * Encodes the specified BlockUnplugFtraceEvent message. Does not implicitly {@link perfetto.protos.BlockUnplugFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BlockUnplugFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockUnplugFtraceEvent} m BlockUnplugFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockUnplugFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.nrRq != null && Object.hasOwnProperty.call(m, "nrRq"))
                    w.uint32(8).int32(m.nrRq);
                if (m.comm != null && Object.hasOwnProperty.call(m, "comm"))
                    w.uint32(18).string(m.comm);
                return w;
            };

            /**
             * Encodes the specified BlockUnplugFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.BlockUnplugFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BlockUnplugFtraceEvent
             * @static
             * @param {perfetto.protos.IBlockUnplugFtraceEvent} message BlockUnplugFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BlockUnplugFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BlockUnplugFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BlockUnplugFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BlockUnplugFtraceEvent} BlockUnplugFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockUnplugFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BlockUnplugFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.nrRq = r.int32();
                        break;
                    case 2:
                        m.comm = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BlockUnplugFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BlockUnplugFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BlockUnplugFtraceEvent} BlockUnplugFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BlockUnplugFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BlockUnplugFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.BlockUnplugFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BlockUnplugFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.nrRq != null && m.hasOwnProperty("nrRq")) {
                    if (!$util.isInteger(m.nrRq))
                        return "nrRq: integer expected";
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    if (!$util.isString(m.comm))
                        return "comm: string expected";
                }
                return null;
            };

            /**
             * Creates a BlockUnplugFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BlockUnplugFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BlockUnplugFtraceEvent} BlockUnplugFtraceEvent
             */
            BlockUnplugFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BlockUnplugFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.BlockUnplugFtraceEvent();
                if (d.nrRq != null) {
                    m.nrRq = d.nrRq | 0;
                }
                if (d.comm != null) {
                    m.comm = String(d.comm);
                }
                return m;
            };

            /**
             * Creates a plain object from a BlockUnplugFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BlockUnplugFtraceEvent
             * @static
             * @param {perfetto.protos.BlockUnplugFtraceEvent} m BlockUnplugFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BlockUnplugFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.nrRq = 0;
                    d.comm = "";
                }
                if (m.nrRq != null && m.hasOwnProperty("nrRq")) {
                    d.nrRq = m.nrRq;
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    d.comm = m.comm;
                }
                return d;
            };

            /**
             * Converts this BlockUnplugFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BlockUnplugFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BlockUnplugFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BlockUnplugFtraceEvent;
        })();

        protos.CgroupAttachTaskFtraceEvent = (function() {

            /**
             * Properties of a CgroupAttachTaskFtraceEvent.
             * @memberof perfetto.protos
             * @interface ICgroupAttachTaskFtraceEvent
             * @property {number|null} [dstRoot] CgroupAttachTaskFtraceEvent dstRoot
             * @property {number|null} [dstId] CgroupAttachTaskFtraceEvent dstId
             * @property {number|null} [pid] CgroupAttachTaskFtraceEvent pid
             * @property {string|null} [comm] CgroupAttachTaskFtraceEvent comm
             * @property {string|null} [cname] CgroupAttachTaskFtraceEvent cname
             * @property {number|null} [dstLevel] CgroupAttachTaskFtraceEvent dstLevel
             * @property {string|null} [dstPath] CgroupAttachTaskFtraceEvent dstPath
             */

            /**
             * Constructs a new CgroupAttachTaskFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a CgroupAttachTaskFtraceEvent.
             * @implements ICgroupAttachTaskFtraceEvent
             * @constructor
             * @param {perfetto.protos.ICgroupAttachTaskFtraceEvent=} [p] Properties to set
             */
            function CgroupAttachTaskFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * CgroupAttachTaskFtraceEvent dstRoot.
             * @member {number} dstRoot
             * @memberof perfetto.protos.CgroupAttachTaskFtraceEvent
             * @instance
             */
            CgroupAttachTaskFtraceEvent.prototype.dstRoot = 0;

            /**
             * CgroupAttachTaskFtraceEvent dstId.
             * @member {number} dstId
             * @memberof perfetto.protos.CgroupAttachTaskFtraceEvent
             * @instance
             */
            CgroupAttachTaskFtraceEvent.prototype.dstId = 0;

            /**
             * CgroupAttachTaskFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.CgroupAttachTaskFtraceEvent
             * @instance
             */
            CgroupAttachTaskFtraceEvent.prototype.pid = 0;

            /**
             * CgroupAttachTaskFtraceEvent comm.
             * @member {string} comm
             * @memberof perfetto.protos.CgroupAttachTaskFtraceEvent
             * @instance
             */
            CgroupAttachTaskFtraceEvent.prototype.comm = "";

            /**
             * CgroupAttachTaskFtraceEvent cname.
             * @member {string} cname
             * @memberof perfetto.protos.CgroupAttachTaskFtraceEvent
             * @instance
             */
            CgroupAttachTaskFtraceEvent.prototype.cname = "";

            /**
             * CgroupAttachTaskFtraceEvent dstLevel.
             * @member {number} dstLevel
             * @memberof perfetto.protos.CgroupAttachTaskFtraceEvent
             * @instance
             */
            CgroupAttachTaskFtraceEvent.prototype.dstLevel = 0;

            /**
             * CgroupAttachTaskFtraceEvent dstPath.
             * @member {string} dstPath
             * @memberof perfetto.protos.CgroupAttachTaskFtraceEvent
             * @instance
             */
            CgroupAttachTaskFtraceEvent.prototype.dstPath = "";

            /**
             * Creates a new CgroupAttachTaskFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.CgroupAttachTaskFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupAttachTaskFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.CgroupAttachTaskFtraceEvent} CgroupAttachTaskFtraceEvent instance
             */
            CgroupAttachTaskFtraceEvent.create = function create(properties) {
                return new CgroupAttachTaskFtraceEvent(properties);
            };

            /**
             * Encodes the specified CgroupAttachTaskFtraceEvent message. Does not implicitly {@link perfetto.protos.CgroupAttachTaskFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.CgroupAttachTaskFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupAttachTaskFtraceEvent} m CgroupAttachTaskFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CgroupAttachTaskFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dstRoot != null && Object.hasOwnProperty.call(m, "dstRoot"))
                    w.uint32(8).int32(m.dstRoot);
                if (m.dstId != null && Object.hasOwnProperty.call(m, "dstId"))
                    w.uint32(16).int32(m.dstId);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(24).int32(m.pid);
                if (m.comm != null && Object.hasOwnProperty.call(m, "comm"))
                    w.uint32(34).string(m.comm);
                if (m.cname != null && Object.hasOwnProperty.call(m, "cname"))
                    w.uint32(42).string(m.cname);
                if (m.dstLevel != null && Object.hasOwnProperty.call(m, "dstLevel"))
                    w.uint32(48).int32(m.dstLevel);
                if (m.dstPath != null && Object.hasOwnProperty.call(m, "dstPath"))
                    w.uint32(58).string(m.dstPath);
                return w;
            };

            /**
             * Encodes the specified CgroupAttachTaskFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.CgroupAttachTaskFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.CgroupAttachTaskFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupAttachTaskFtraceEvent} message CgroupAttachTaskFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CgroupAttachTaskFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CgroupAttachTaskFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.CgroupAttachTaskFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.CgroupAttachTaskFtraceEvent} CgroupAttachTaskFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CgroupAttachTaskFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.CgroupAttachTaskFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dstRoot = r.int32();
                        break;
                    case 2:
                        m.dstId = r.int32();
                        break;
                    case 3:
                        m.pid = r.int32();
                        break;
                    case 4:
                        m.comm = r.string();
                        break;
                    case 5:
                        m.cname = r.string();
                        break;
                    case 6:
                        m.dstLevel = r.int32();
                        break;
                    case 7:
                        m.dstPath = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a CgroupAttachTaskFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.CgroupAttachTaskFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.CgroupAttachTaskFtraceEvent} CgroupAttachTaskFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CgroupAttachTaskFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CgroupAttachTaskFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.CgroupAttachTaskFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CgroupAttachTaskFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dstRoot != null && m.hasOwnProperty("dstRoot")) {
                    if (!$util.isInteger(m.dstRoot))
                        return "dstRoot: integer expected";
                }
                if (m.dstId != null && m.hasOwnProperty("dstId")) {
                    if (!$util.isInteger(m.dstId))
                        return "dstId: integer expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    if (!$util.isString(m.comm))
                        return "comm: string expected";
                }
                if (m.cname != null && m.hasOwnProperty("cname")) {
                    if (!$util.isString(m.cname))
                        return "cname: string expected";
                }
                if (m.dstLevel != null && m.hasOwnProperty("dstLevel")) {
                    if (!$util.isInteger(m.dstLevel))
                        return "dstLevel: integer expected";
                }
                if (m.dstPath != null && m.hasOwnProperty("dstPath")) {
                    if (!$util.isString(m.dstPath))
                        return "dstPath: string expected";
                }
                return null;
            };

            /**
             * Creates a CgroupAttachTaskFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.CgroupAttachTaskFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.CgroupAttachTaskFtraceEvent} CgroupAttachTaskFtraceEvent
             */
            CgroupAttachTaskFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.CgroupAttachTaskFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.CgroupAttachTaskFtraceEvent();
                if (d.dstRoot != null) {
                    m.dstRoot = d.dstRoot | 0;
                }
                if (d.dstId != null) {
                    m.dstId = d.dstId | 0;
                }
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                if (d.comm != null) {
                    m.comm = String(d.comm);
                }
                if (d.cname != null) {
                    m.cname = String(d.cname);
                }
                if (d.dstLevel != null) {
                    m.dstLevel = d.dstLevel | 0;
                }
                if (d.dstPath != null) {
                    m.dstPath = String(d.dstPath);
                }
                return m;
            };

            /**
             * Creates a plain object from a CgroupAttachTaskFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.CgroupAttachTaskFtraceEvent
             * @static
             * @param {perfetto.protos.CgroupAttachTaskFtraceEvent} m CgroupAttachTaskFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CgroupAttachTaskFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.dstRoot = 0;
                    d.dstId = 0;
                    d.pid = 0;
                    d.comm = "";
                    d.cname = "";
                    d.dstLevel = 0;
                    d.dstPath = "";
                }
                if (m.dstRoot != null && m.hasOwnProperty("dstRoot")) {
                    d.dstRoot = m.dstRoot;
                }
                if (m.dstId != null && m.hasOwnProperty("dstId")) {
                    d.dstId = m.dstId;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    d.comm = m.comm;
                }
                if (m.cname != null && m.hasOwnProperty("cname")) {
                    d.cname = m.cname;
                }
                if (m.dstLevel != null && m.hasOwnProperty("dstLevel")) {
                    d.dstLevel = m.dstLevel;
                }
                if (m.dstPath != null && m.hasOwnProperty("dstPath")) {
                    d.dstPath = m.dstPath;
                }
                return d;
            };

            /**
             * Converts this CgroupAttachTaskFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.CgroupAttachTaskFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CgroupAttachTaskFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return CgroupAttachTaskFtraceEvent;
        })();

        protos.CgroupMkdirFtraceEvent = (function() {

            /**
             * Properties of a CgroupMkdirFtraceEvent.
             * @memberof perfetto.protos
             * @interface ICgroupMkdirFtraceEvent
             * @property {number|null} [root] CgroupMkdirFtraceEvent root
             * @property {number|null} [id] CgroupMkdirFtraceEvent id
             * @property {string|null} [cname] CgroupMkdirFtraceEvent cname
             * @property {number|null} [level] CgroupMkdirFtraceEvent level
             * @property {string|null} [path] CgroupMkdirFtraceEvent path
             */

            /**
             * Constructs a new CgroupMkdirFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a CgroupMkdirFtraceEvent.
             * @implements ICgroupMkdirFtraceEvent
             * @constructor
             * @param {perfetto.protos.ICgroupMkdirFtraceEvent=} [p] Properties to set
             */
            function CgroupMkdirFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * CgroupMkdirFtraceEvent root.
             * @member {number} root
             * @memberof perfetto.protos.CgroupMkdirFtraceEvent
             * @instance
             */
            CgroupMkdirFtraceEvent.prototype.root = 0;

            /**
             * CgroupMkdirFtraceEvent id.
             * @member {number} id
             * @memberof perfetto.protos.CgroupMkdirFtraceEvent
             * @instance
             */
            CgroupMkdirFtraceEvent.prototype.id = 0;

            /**
             * CgroupMkdirFtraceEvent cname.
             * @member {string} cname
             * @memberof perfetto.protos.CgroupMkdirFtraceEvent
             * @instance
             */
            CgroupMkdirFtraceEvent.prototype.cname = "";

            /**
             * CgroupMkdirFtraceEvent level.
             * @member {number} level
             * @memberof perfetto.protos.CgroupMkdirFtraceEvent
             * @instance
             */
            CgroupMkdirFtraceEvent.prototype.level = 0;

            /**
             * CgroupMkdirFtraceEvent path.
             * @member {string} path
             * @memberof perfetto.protos.CgroupMkdirFtraceEvent
             * @instance
             */
            CgroupMkdirFtraceEvent.prototype.path = "";

            /**
             * Creates a new CgroupMkdirFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.CgroupMkdirFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupMkdirFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.CgroupMkdirFtraceEvent} CgroupMkdirFtraceEvent instance
             */
            CgroupMkdirFtraceEvent.create = function create(properties) {
                return new CgroupMkdirFtraceEvent(properties);
            };

            /**
             * Encodes the specified CgroupMkdirFtraceEvent message. Does not implicitly {@link perfetto.protos.CgroupMkdirFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.CgroupMkdirFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupMkdirFtraceEvent} m CgroupMkdirFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CgroupMkdirFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.root != null && Object.hasOwnProperty.call(m, "root"))
                    w.uint32(8).int32(m.root);
                if (m.id != null && Object.hasOwnProperty.call(m, "id"))
                    w.uint32(16).int32(m.id);
                if (m.cname != null && Object.hasOwnProperty.call(m, "cname"))
                    w.uint32(26).string(m.cname);
                if (m.level != null && Object.hasOwnProperty.call(m, "level"))
                    w.uint32(32).int32(m.level);
                if (m.path != null && Object.hasOwnProperty.call(m, "path"))
                    w.uint32(42).string(m.path);
                return w;
            };

            /**
             * Encodes the specified CgroupMkdirFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.CgroupMkdirFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.CgroupMkdirFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupMkdirFtraceEvent} message CgroupMkdirFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CgroupMkdirFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CgroupMkdirFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.CgroupMkdirFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.CgroupMkdirFtraceEvent} CgroupMkdirFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CgroupMkdirFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.CgroupMkdirFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.root = r.int32();
                        break;
                    case 2:
                        m.id = r.int32();
                        break;
                    case 3:
                        m.cname = r.string();
                        break;
                    case 4:
                        m.level = r.int32();
                        break;
                    case 5:
                        m.path = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a CgroupMkdirFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.CgroupMkdirFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.CgroupMkdirFtraceEvent} CgroupMkdirFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CgroupMkdirFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CgroupMkdirFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.CgroupMkdirFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CgroupMkdirFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.root != null && m.hasOwnProperty("root")) {
                    if (!$util.isInteger(m.root))
                        return "root: integer expected";
                }
                if (m.id != null && m.hasOwnProperty("id")) {
                    if (!$util.isInteger(m.id))
                        return "id: integer expected";
                }
                if (m.cname != null && m.hasOwnProperty("cname")) {
                    if (!$util.isString(m.cname))
                        return "cname: string expected";
                }
                if (m.level != null && m.hasOwnProperty("level")) {
                    if (!$util.isInteger(m.level))
                        return "level: integer expected";
                }
                if (m.path != null && m.hasOwnProperty("path")) {
                    if (!$util.isString(m.path))
                        return "path: string expected";
                }
                return null;
            };

            /**
             * Creates a CgroupMkdirFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.CgroupMkdirFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.CgroupMkdirFtraceEvent} CgroupMkdirFtraceEvent
             */
            CgroupMkdirFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.CgroupMkdirFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.CgroupMkdirFtraceEvent();
                if (d.root != null) {
                    m.root = d.root | 0;
                }
                if (d.id != null) {
                    m.id = d.id | 0;
                }
                if (d.cname != null) {
                    m.cname = String(d.cname);
                }
                if (d.level != null) {
                    m.level = d.level | 0;
                }
                if (d.path != null) {
                    m.path = String(d.path);
                }
                return m;
            };

            /**
             * Creates a plain object from a CgroupMkdirFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.CgroupMkdirFtraceEvent
             * @static
             * @param {perfetto.protos.CgroupMkdirFtraceEvent} m CgroupMkdirFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CgroupMkdirFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.root = 0;
                    d.id = 0;
                    d.cname = "";
                    d.level = 0;
                    d.path = "";
                }
                if (m.root != null && m.hasOwnProperty("root")) {
                    d.root = m.root;
                }
                if (m.id != null && m.hasOwnProperty("id")) {
                    d.id = m.id;
                }
                if (m.cname != null && m.hasOwnProperty("cname")) {
                    d.cname = m.cname;
                }
                if (m.level != null && m.hasOwnProperty("level")) {
                    d.level = m.level;
                }
                if (m.path != null && m.hasOwnProperty("path")) {
                    d.path = m.path;
                }
                return d;
            };

            /**
             * Converts this CgroupMkdirFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.CgroupMkdirFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CgroupMkdirFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return CgroupMkdirFtraceEvent;
        })();

        protos.CgroupRemountFtraceEvent = (function() {

            /**
             * Properties of a CgroupRemountFtraceEvent.
             * @memberof perfetto.protos
             * @interface ICgroupRemountFtraceEvent
             * @property {number|null} [root] CgroupRemountFtraceEvent root
             * @property {number|null} [ssMask] CgroupRemountFtraceEvent ssMask
             * @property {string|null} [name] CgroupRemountFtraceEvent name
             */

            /**
             * Constructs a new CgroupRemountFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a CgroupRemountFtraceEvent.
             * @implements ICgroupRemountFtraceEvent
             * @constructor
             * @param {perfetto.protos.ICgroupRemountFtraceEvent=} [p] Properties to set
             */
            function CgroupRemountFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * CgroupRemountFtraceEvent root.
             * @member {number} root
             * @memberof perfetto.protos.CgroupRemountFtraceEvent
             * @instance
             */
            CgroupRemountFtraceEvent.prototype.root = 0;

            /**
             * CgroupRemountFtraceEvent ssMask.
             * @member {number} ssMask
             * @memberof perfetto.protos.CgroupRemountFtraceEvent
             * @instance
             */
            CgroupRemountFtraceEvent.prototype.ssMask = 0;

            /**
             * CgroupRemountFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.CgroupRemountFtraceEvent
             * @instance
             */
            CgroupRemountFtraceEvent.prototype.name = "";

            /**
             * Creates a new CgroupRemountFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.CgroupRemountFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupRemountFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.CgroupRemountFtraceEvent} CgroupRemountFtraceEvent instance
             */
            CgroupRemountFtraceEvent.create = function create(properties) {
                return new CgroupRemountFtraceEvent(properties);
            };

            /**
             * Encodes the specified CgroupRemountFtraceEvent message. Does not implicitly {@link perfetto.protos.CgroupRemountFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.CgroupRemountFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupRemountFtraceEvent} m CgroupRemountFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CgroupRemountFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.root != null && Object.hasOwnProperty.call(m, "root"))
                    w.uint32(8).int32(m.root);
                if (m.ssMask != null && Object.hasOwnProperty.call(m, "ssMask"))
                    w.uint32(16).uint32(m.ssMask);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(26).string(m.name);
                return w;
            };

            /**
             * Encodes the specified CgroupRemountFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.CgroupRemountFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.CgroupRemountFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupRemountFtraceEvent} message CgroupRemountFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CgroupRemountFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CgroupRemountFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.CgroupRemountFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.CgroupRemountFtraceEvent} CgroupRemountFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CgroupRemountFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.CgroupRemountFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.root = r.int32();
                        break;
                    case 2:
                        m.ssMask = r.uint32();
                        break;
                    case 3:
                        m.name = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a CgroupRemountFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.CgroupRemountFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.CgroupRemountFtraceEvent} CgroupRemountFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CgroupRemountFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CgroupRemountFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.CgroupRemountFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CgroupRemountFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.root != null && m.hasOwnProperty("root")) {
                    if (!$util.isInteger(m.root))
                        return "root: integer expected";
                }
                if (m.ssMask != null && m.hasOwnProperty("ssMask")) {
                    if (!$util.isInteger(m.ssMask))
                        return "ssMask: integer expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                return null;
            };

            /**
             * Creates a CgroupRemountFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.CgroupRemountFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.CgroupRemountFtraceEvent} CgroupRemountFtraceEvent
             */
            CgroupRemountFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.CgroupRemountFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.CgroupRemountFtraceEvent();
                if (d.root != null) {
                    m.root = d.root | 0;
                }
                if (d.ssMask != null) {
                    m.ssMask = d.ssMask >>> 0;
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                return m;
            };

            /**
             * Creates a plain object from a CgroupRemountFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.CgroupRemountFtraceEvent
             * @static
             * @param {perfetto.protos.CgroupRemountFtraceEvent} m CgroupRemountFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CgroupRemountFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.root = 0;
                    d.ssMask = 0;
                    d.name = "";
                }
                if (m.root != null && m.hasOwnProperty("root")) {
                    d.root = m.root;
                }
                if (m.ssMask != null && m.hasOwnProperty("ssMask")) {
                    d.ssMask = m.ssMask;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                return d;
            };

            /**
             * Converts this CgroupRemountFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.CgroupRemountFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CgroupRemountFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return CgroupRemountFtraceEvent;
        })();

        protos.CgroupRmdirFtraceEvent = (function() {

            /**
             * Properties of a CgroupRmdirFtraceEvent.
             * @memberof perfetto.protos
             * @interface ICgroupRmdirFtraceEvent
             * @property {number|null} [root] CgroupRmdirFtraceEvent root
             * @property {number|null} [id] CgroupRmdirFtraceEvent id
             * @property {string|null} [cname] CgroupRmdirFtraceEvent cname
             * @property {number|null} [level] CgroupRmdirFtraceEvent level
             * @property {string|null} [path] CgroupRmdirFtraceEvent path
             */

            /**
             * Constructs a new CgroupRmdirFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a CgroupRmdirFtraceEvent.
             * @implements ICgroupRmdirFtraceEvent
             * @constructor
             * @param {perfetto.protos.ICgroupRmdirFtraceEvent=} [p] Properties to set
             */
            function CgroupRmdirFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * CgroupRmdirFtraceEvent root.
             * @member {number} root
             * @memberof perfetto.protos.CgroupRmdirFtraceEvent
             * @instance
             */
            CgroupRmdirFtraceEvent.prototype.root = 0;

            /**
             * CgroupRmdirFtraceEvent id.
             * @member {number} id
             * @memberof perfetto.protos.CgroupRmdirFtraceEvent
             * @instance
             */
            CgroupRmdirFtraceEvent.prototype.id = 0;

            /**
             * CgroupRmdirFtraceEvent cname.
             * @member {string} cname
             * @memberof perfetto.protos.CgroupRmdirFtraceEvent
             * @instance
             */
            CgroupRmdirFtraceEvent.prototype.cname = "";

            /**
             * CgroupRmdirFtraceEvent level.
             * @member {number} level
             * @memberof perfetto.protos.CgroupRmdirFtraceEvent
             * @instance
             */
            CgroupRmdirFtraceEvent.prototype.level = 0;

            /**
             * CgroupRmdirFtraceEvent path.
             * @member {string} path
             * @memberof perfetto.protos.CgroupRmdirFtraceEvent
             * @instance
             */
            CgroupRmdirFtraceEvent.prototype.path = "";

            /**
             * Creates a new CgroupRmdirFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.CgroupRmdirFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupRmdirFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.CgroupRmdirFtraceEvent} CgroupRmdirFtraceEvent instance
             */
            CgroupRmdirFtraceEvent.create = function create(properties) {
                return new CgroupRmdirFtraceEvent(properties);
            };

            /**
             * Encodes the specified CgroupRmdirFtraceEvent message. Does not implicitly {@link perfetto.protos.CgroupRmdirFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.CgroupRmdirFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupRmdirFtraceEvent} m CgroupRmdirFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CgroupRmdirFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.root != null && Object.hasOwnProperty.call(m, "root"))
                    w.uint32(8).int32(m.root);
                if (m.id != null && Object.hasOwnProperty.call(m, "id"))
                    w.uint32(16).int32(m.id);
                if (m.cname != null && Object.hasOwnProperty.call(m, "cname"))
                    w.uint32(26).string(m.cname);
                if (m.level != null && Object.hasOwnProperty.call(m, "level"))
                    w.uint32(32).int32(m.level);
                if (m.path != null && Object.hasOwnProperty.call(m, "path"))
                    w.uint32(42).string(m.path);
                return w;
            };

            /**
             * Encodes the specified CgroupRmdirFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.CgroupRmdirFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.CgroupRmdirFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupRmdirFtraceEvent} message CgroupRmdirFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CgroupRmdirFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CgroupRmdirFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.CgroupRmdirFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.CgroupRmdirFtraceEvent} CgroupRmdirFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CgroupRmdirFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.CgroupRmdirFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.root = r.int32();
                        break;
                    case 2:
                        m.id = r.int32();
                        break;
                    case 3:
                        m.cname = r.string();
                        break;
                    case 4:
                        m.level = r.int32();
                        break;
                    case 5:
                        m.path = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a CgroupRmdirFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.CgroupRmdirFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.CgroupRmdirFtraceEvent} CgroupRmdirFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CgroupRmdirFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CgroupRmdirFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.CgroupRmdirFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CgroupRmdirFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.root != null && m.hasOwnProperty("root")) {
                    if (!$util.isInteger(m.root))
                        return "root: integer expected";
                }
                if (m.id != null && m.hasOwnProperty("id")) {
                    if (!$util.isInteger(m.id))
                        return "id: integer expected";
                }
                if (m.cname != null && m.hasOwnProperty("cname")) {
                    if (!$util.isString(m.cname))
                        return "cname: string expected";
                }
                if (m.level != null && m.hasOwnProperty("level")) {
                    if (!$util.isInteger(m.level))
                        return "level: integer expected";
                }
                if (m.path != null && m.hasOwnProperty("path")) {
                    if (!$util.isString(m.path))
                        return "path: string expected";
                }
                return null;
            };

            /**
             * Creates a CgroupRmdirFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.CgroupRmdirFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.CgroupRmdirFtraceEvent} CgroupRmdirFtraceEvent
             */
            CgroupRmdirFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.CgroupRmdirFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.CgroupRmdirFtraceEvent();
                if (d.root != null) {
                    m.root = d.root | 0;
                }
                if (d.id != null) {
                    m.id = d.id | 0;
                }
                if (d.cname != null) {
                    m.cname = String(d.cname);
                }
                if (d.level != null) {
                    m.level = d.level | 0;
                }
                if (d.path != null) {
                    m.path = String(d.path);
                }
                return m;
            };

            /**
             * Creates a plain object from a CgroupRmdirFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.CgroupRmdirFtraceEvent
             * @static
             * @param {perfetto.protos.CgroupRmdirFtraceEvent} m CgroupRmdirFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CgroupRmdirFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.root = 0;
                    d.id = 0;
                    d.cname = "";
                    d.level = 0;
                    d.path = "";
                }
                if (m.root != null && m.hasOwnProperty("root")) {
                    d.root = m.root;
                }
                if (m.id != null && m.hasOwnProperty("id")) {
                    d.id = m.id;
                }
                if (m.cname != null && m.hasOwnProperty("cname")) {
                    d.cname = m.cname;
                }
                if (m.level != null && m.hasOwnProperty("level")) {
                    d.level = m.level;
                }
                if (m.path != null && m.hasOwnProperty("path")) {
                    d.path = m.path;
                }
                return d;
            };

            /**
             * Converts this CgroupRmdirFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.CgroupRmdirFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CgroupRmdirFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return CgroupRmdirFtraceEvent;
        })();

        protos.CgroupTransferTasksFtraceEvent = (function() {

            /**
             * Properties of a CgroupTransferTasksFtraceEvent.
             * @memberof perfetto.protos
             * @interface ICgroupTransferTasksFtraceEvent
             * @property {number|null} [dstRoot] CgroupTransferTasksFtraceEvent dstRoot
             * @property {number|null} [dstId] CgroupTransferTasksFtraceEvent dstId
             * @property {number|null} [pid] CgroupTransferTasksFtraceEvent pid
             * @property {string|null} [comm] CgroupTransferTasksFtraceEvent comm
             * @property {string|null} [cname] CgroupTransferTasksFtraceEvent cname
             * @property {number|null} [dstLevel] CgroupTransferTasksFtraceEvent dstLevel
             * @property {string|null} [dstPath] CgroupTransferTasksFtraceEvent dstPath
             */

            /**
             * Constructs a new CgroupTransferTasksFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a CgroupTransferTasksFtraceEvent.
             * @implements ICgroupTransferTasksFtraceEvent
             * @constructor
             * @param {perfetto.protos.ICgroupTransferTasksFtraceEvent=} [p] Properties to set
             */
            function CgroupTransferTasksFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * CgroupTransferTasksFtraceEvent dstRoot.
             * @member {number} dstRoot
             * @memberof perfetto.protos.CgroupTransferTasksFtraceEvent
             * @instance
             */
            CgroupTransferTasksFtraceEvent.prototype.dstRoot = 0;

            /**
             * CgroupTransferTasksFtraceEvent dstId.
             * @member {number} dstId
             * @memberof perfetto.protos.CgroupTransferTasksFtraceEvent
             * @instance
             */
            CgroupTransferTasksFtraceEvent.prototype.dstId = 0;

            /**
             * CgroupTransferTasksFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.CgroupTransferTasksFtraceEvent
             * @instance
             */
            CgroupTransferTasksFtraceEvent.prototype.pid = 0;

            /**
             * CgroupTransferTasksFtraceEvent comm.
             * @member {string} comm
             * @memberof perfetto.protos.CgroupTransferTasksFtraceEvent
             * @instance
             */
            CgroupTransferTasksFtraceEvent.prototype.comm = "";

            /**
             * CgroupTransferTasksFtraceEvent cname.
             * @member {string} cname
             * @memberof perfetto.protos.CgroupTransferTasksFtraceEvent
             * @instance
             */
            CgroupTransferTasksFtraceEvent.prototype.cname = "";

            /**
             * CgroupTransferTasksFtraceEvent dstLevel.
             * @member {number} dstLevel
             * @memberof perfetto.protos.CgroupTransferTasksFtraceEvent
             * @instance
             */
            CgroupTransferTasksFtraceEvent.prototype.dstLevel = 0;

            /**
             * CgroupTransferTasksFtraceEvent dstPath.
             * @member {string} dstPath
             * @memberof perfetto.protos.CgroupTransferTasksFtraceEvent
             * @instance
             */
            CgroupTransferTasksFtraceEvent.prototype.dstPath = "";

            /**
             * Creates a new CgroupTransferTasksFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.CgroupTransferTasksFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupTransferTasksFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.CgroupTransferTasksFtraceEvent} CgroupTransferTasksFtraceEvent instance
             */
            CgroupTransferTasksFtraceEvent.create = function create(properties) {
                return new CgroupTransferTasksFtraceEvent(properties);
            };

            /**
             * Encodes the specified CgroupTransferTasksFtraceEvent message. Does not implicitly {@link perfetto.protos.CgroupTransferTasksFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.CgroupTransferTasksFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupTransferTasksFtraceEvent} m CgroupTransferTasksFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CgroupTransferTasksFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dstRoot != null && Object.hasOwnProperty.call(m, "dstRoot"))
                    w.uint32(8).int32(m.dstRoot);
                if (m.dstId != null && Object.hasOwnProperty.call(m, "dstId"))
                    w.uint32(16).int32(m.dstId);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(24).int32(m.pid);
                if (m.comm != null && Object.hasOwnProperty.call(m, "comm"))
                    w.uint32(34).string(m.comm);
                if (m.cname != null && Object.hasOwnProperty.call(m, "cname"))
                    w.uint32(42).string(m.cname);
                if (m.dstLevel != null && Object.hasOwnProperty.call(m, "dstLevel"))
                    w.uint32(48).int32(m.dstLevel);
                if (m.dstPath != null && Object.hasOwnProperty.call(m, "dstPath"))
                    w.uint32(58).string(m.dstPath);
                return w;
            };

            /**
             * Encodes the specified CgroupTransferTasksFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.CgroupTransferTasksFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.CgroupTransferTasksFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupTransferTasksFtraceEvent} message CgroupTransferTasksFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CgroupTransferTasksFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CgroupTransferTasksFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.CgroupTransferTasksFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.CgroupTransferTasksFtraceEvent} CgroupTransferTasksFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CgroupTransferTasksFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.CgroupTransferTasksFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dstRoot = r.int32();
                        break;
                    case 2:
                        m.dstId = r.int32();
                        break;
                    case 3:
                        m.pid = r.int32();
                        break;
                    case 4:
                        m.comm = r.string();
                        break;
                    case 5:
                        m.cname = r.string();
                        break;
                    case 6:
                        m.dstLevel = r.int32();
                        break;
                    case 7:
                        m.dstPath = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a CgroupTransferTasksFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.CgroupTransferTasksFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.CgroupTransferTasksFtraceEvent} CgroupTransferTasksFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CgroupTransferTasksFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CgroupTransferTasksFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.CgroupTransferTasksFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CgroupTransferTasksFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dstRoot != null && m.hasOwnProperty("dstRoot")) {
                    if (!$util.isInteger(m.dstRoot))
                        return "dstRoot: integer expected";
                }
                if (m.dstId != null && m.hasOwnProperty("dstId")) {
                    if (!$util.isInteger(m.dstId))
                        return "dstId: integer expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    if (!$util.isString(m.comm))
                        return "comm: string expected";
                }
                if (m.cname != null && m.hasOwnProperty("cname")) {
                    if (!$util.isString(m.cname))
                        return "cname: string expected";
                }
                if (m.dstLevel != null && m.hasOwnProperty("dstLevel")) {
                    if (!$util.isInteger(m.dstLevel))
                        return "dstLevel: integer expected";
                }
                if (m.dstPath != null && m.hasOwnProperty("dstPath")) {
                    if (!$util.isString(m.dstPath))
                        return "dstPath: string expected";
                }
                return null;
            };

            /**
             * Creates a CgroupTransferTasksFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.CgroupTransferTasksFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.CgroupTransferTasksFtraceEvent} CgroupTransferTasksFtraceEvent
             */
            CgroupTransferTasksFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.CgroupTransferTasksFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.CgroupTransferTasksFtraceEvent();
                if (d.dstRoot != null) {
                    m.dstRoot = d.dstRoot | 0;
                }
                if (d.dstId != null) {
                    m.dstId = d.dstId | 0;
                }
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                if (d.comm != null) {
                    m.comm = String(d.comm);
                }
                if (d.cname != null) {
                    m.cname = String(d.cname);
                }
                if (d.dstLevel != null) {
                    m.dstLevel = d.dstLevel | 0;
                }
                if (d.dstPath != null) {
                    m.dstPath = String(d.dstPath);
                }
                return m;
            };

            /**
             * Creates a plain object from a CgroupTransferTasksFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.CgroupTransferTasksFtraceEvent
             * @static
             * @param {perfetto.protos.CgroupTransferTasksFtraceEvent} m CgroupTransferTasksFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CgroupTransferTasksFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.dstRoot = 0;
                    d.dstId = 0;
                    d.pid = 0;
                    d.comm = "";
                    d.cname = "";
                    d.dstLevel = 0;
                    d.dstPath = "";
                }
                if (m.dstRoot != null && m.hasOwnProperty("dstRoot")) {
                    d.dstRoot = m.dstRoot;
                }
                if (m.dstId != null && m.hasOwnProperty("dstId")) {
                    d.dstId = m.dstId;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    d.comm = m.comm;
                }
                if (m.cname != null && m.hasOwnProperty("cname")) {
                    d.cname = m.cname;
                }
                if (m.dstLevel != null && m.hasOwnProperty("dstLevel")) {
                    d.dstLevel = m.dstLevel;
                }
                if (m.dstPath != null && m.hasOwnProperty("dstPath")) {
                    d.dstPath = m.dstPath;
                }
                return d;
            };

            /**
             * Converts this CgroupTransferTasksFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.CgroupTransferTasksFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CgroupTransferTasksFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return CgroupTransferTasksFtraceEvent;
        })();

        protos.CgroupDestroyRootFtraceEvent = (function() {

            /**
             * Properties of a CgroupDestroyRootFtraceEvent.
             * @memberof perfetto.protos
             * @interface ICgroupDestroyRootFtraceEvent
             * @property {number|null} [root] CgroupDestroyRootFtraceEvent root
             * @property {number|null} [ssMask] CgroupDestroyRootFtraceEvent ssMask
             * @property {string|null} [name] CgroupDestroyRootFtraceEvent name
             */

            /**
             * Constructs a new CgroupDestroyRootFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a CgroupDestroyRootFtraceEvent.
             * @implements ICgroupDestroyRootFtraceEvent
             * @constructor
             * @param {perfetto.protos.ICgroupDestroyRootFtraceEvent=} [p] Properties to set
             */
            function CgroupDestroyRootFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * CgroupDestroyRootFtraceEvent root.
             * @member {number} root
             * @memberof perfetto.protos.CgroupDestroyRootFtraceEvent
             * @instance
             */
            CgroupDestroyRootFtraceEvent.prototype.root = 0;

            /**
             * CgroupDestroyRootFtraceEvent ssMask.
             * @member {number} ssMask
             * @memberof perfetto.protos.CgroupDestroyRootFtraceEvent
             * @instance
             */
            CgroupDestroyRootFtraceEvent.prototype.ssMask = 0;

            /**
             * CgroupDestroyRootFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.CgroupDestroyRootFtraceEvent
             * @instance
             */
            CgroupDestroyRootFtraceEvent.prototype.name = "";

            /**
             * Creates a new CgroupDestroyRootFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.CgroupDestroyRootFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupDestroyRootFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.CgroupDestroyRootFtraceEvent} CgroupDestroyRootFtraceEvent instance
             */
            CgroupDestroyRootFtraceEvent.create = function create(properties) {
                return new CgroupDestroyRootFtraceEvent(properties);
            };

            /**
             * Encodes the specified CgroupDestroyRootFtraceEvent message. Does not implicitly {@link perfetto.protos.CgroupDestroyRootFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.CgroupDestroyRootFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupDestroyRootFtraceEvent} m CgroupDestroyRootFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CgroupDestroyRootFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.root != null && Object.hasOwnProperty.call(m, "root"))
                    w.uint32(8).int32(m.root);
                if (m.ssMask != null && Object.hasOwnProperty.call(m, "ssMask"))
                    w.uint32(16).uint32(m.ssMask);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(26).string(m.name);
                return w;
            };

            /**
             * Encodes the specified CgroupDestroyRootFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.CgroupDestroyRootFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.CgroupDestroyRootFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupDestroyRootFtraceEvent} message CgroupDestroyRootFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CgroupDestroyRootFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CgroupDestroyRootFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.CgroupDestroyRootFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.CgroupDestroyRootFtraceEvent} CgroupDestroyRootFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CgroupDestroyRootFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.CgroupDestroyRootFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.root = r.int32();
                        break;
                    case 2:
                        m.ssMask = r.uint32();
                        break;
                    case 3:
                        m.name = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a CgroupDestroyRootFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.CgroupDestroyRootFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.CgroupDestroyRootFtraceEvent} CgroupDestroyRootFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CgroupDestroyRootFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CgroupDestroyRootFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.CgroupDestroyRootFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CgroupDestroyRootFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.root != null && m.hasOwnProperty("root")) {
                    if (!$util.isInteger(m.root))
                        return "root: integer expected";
                }
                if (m.ssMask != null && m.hasOwnProperty("ssMask")) {
                    if (!$util.isInteger(m.ssMask))
                        return "ssMask: integer expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                return null;
            };

            /**
             * Creates a CgroupDestroyRootFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.CgroupDestroyRootFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.CgroupDestroyRootFtraceEvent} CgroupDestroyRootFtraceEvent
             */
            CgroupDestroyRootFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.CgroupDestroyRootFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.CgroupDestroyRootFtraceEvent();
                if (d.root != null) {
                    m.root = d.root | 0;
                }
                if (d.ssMask != null) {
                    m.ssMask = d.ssMask >>> 0;
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                return m;
            };

            /**
             * Creates a plain object from a CgroupDestroyRootFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.CgroupDestroyRootFtraceEvent
             * @static
             * @param {perfetto.protos.CgroupDestroyRootFtraceEvent} m CgroupDestroyRootFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CgroupDestroyRootFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.root = 0;
                    d.ssMask = 0;
                    d.name = "";
                }
                if (m.root != null && m.hasOwnProperty("root")) {
                    d.root = m.root;
                }
                if (m.ssMask != null && m.hasOwnProperty("ssMask")) {
                    d.ssMask = m.ssMask;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                return d;
            };

            /**
             * Converts this CgroupDestroyRootFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.CgroupDestroyRootFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CgroupDestroyRootFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return CgroupDestroyRootFtraceEvent;
        })();

        protos.CgroupReleaseFtraceEvent = (function() {

            /**
             * Properties of a CgroupReleaseFtraceEvent.
             * @memberof perfetto.protos
             * @interface ICgroupReleaseFtraceEvent
             * @property {number|null} [root] CgroupReleaseFtraceEvent root
             * @property {number|null} [id] CgroupReleaseFtraceEvent id
             * @property {string|null} [cname] CgroupReleaseFtraceEvent cname
             * @property {number|null} [level] CgroupReleaseFtraceEvent level
             * @property {string|null} [path] CgroupReleaseFtraceEvent path
             */

            /**
             * Constructs a new CgroupReleaseFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a CgroupReleaseFtraceEvent.
             * @implements ICgroupReleaseFtraceEvent
             * @constructor
             * @param {perfetto.protos.ICgroupReleaseFtraceEvent=} [p] Properties to set
             */
            function CgroupReleaseFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * CgroupReleaseFtraceEvent root.
             * @member {number} root
             * @memberof perfetto.protos.CgroupReleaseFtraceEvent
             * @instance
             */
            CgroupReleaseFtraceEvent.prototype.root = 0;

            /**
             * CgroupReleaseFtraceEvent id.
             * @member {number} id
             * @memberof perfetto.protos.CgroupReleaseFtraceEvent
             * @instance
             */
            CgroupReleaseFtraceEvent.prototype.id = 0;

            /**
             * CgroupReleaseFtraceEvent cname.
             * @member {string} cname
             * @memberof perfetto.protos.CgroupReleaseFtraceEvent
             * @instance
             */
            CgroupReleaseFtraceEvent.prototype.cname = "";

            /**
             * CgroupReleaseFtraceEvent level.
             * @member {number} level
             * @memberof perfetto.protos.CgroupReleaseFtraceEvent
             * @instance
             */
            CgroupReleaseFtraceEvent.prototype.level = 0;

            /**
             * CgroupReleaseFtraceEvent path.
             * @member {string} path
             * @memberof perfetto.protos.CgroupReleaseFtraceEvent
             * @instance
             */
            CgroupReleaseFtraceEvent.prototype.path = "";

            /**
             * Creates a new CgroupReleaseFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.CgroupReleaseFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupReleaseFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.CgroupReleaseFtraceEvent} CgroupReleaseFtraceEvent instance
             */
            CgroupReleaseFtraceEvent.create = function create(properties) {
                return new CgroupReleaseFtraceEvent(properties);
            };

            /**
             * Encodes the specified CgroupReleaseFtraceEvent message. Does not implicitly {@link perfetto.protos.CgroupReleaseFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.CgroupReleaseFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupReleaseFtraceEvent} m CgroupReleaseFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CgroupReleaseFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.root != null && Object.hasOwnProperty.call(m, "root"))
                    w.uint32(8).int32(m.root);
                if (m.id != null && Object.hasOwnProperty.call(m, "id"))
                    w.uint32(16).int32(m.id);
                if (m.cname != null && Object.hasOwnProperty.call(m, "cname"))
                    w.uint32(26).string(m.cname);
                if (m.level != null && Object.hasOwnProperty.call(m, "level"))
                    w.uint32(32).int32(m.level);
                if (m.path != null && Object.hasOwnProperty.call(m, "path"))
                    w.uint32(42).string(m.path);
                return w;
            };

            /**
             * Encodes the specified CgroupReleaseFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.CgroupReleaseFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.CgroupReleaseFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupReleaseFtraceEvent} message CgroupReleaseFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CgroupReleaseFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CgroupReleaseFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.CgroupReleaseFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.CgroupReleaseFtraceEvent} CgroupReleaseFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CgroupReleaseFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.CgroupReleaseFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.root = r.int32();
                        break;
                    case 2:
                        m.id = r.int32();
                        break;
                    case 3:
                        m.cname = r.string();
                        break;
                    case 4:
                        m.level = r.int32();
                        break;
                    case 5:
                        m.path = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a CgroupReleaseFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.CgroupReleaseFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.CgroupReleaseFtraceEvent} CgroupReleaseFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CgroupReleaseFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CgroupReleaseFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.CgroupReleaseFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CgroupReleaseFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.root != null && m.hasOwnProperty("root")) {
                    if (!$util.isInteger(m.root))
                        return "root: integer expected";
                }
                if (m.id != null && m.hasOwnProperty("id")) {
                    if (!$util.isInteger(m.id))
                        return "id: integer expected";
                }
                if (m.cname != null && m.hasOwnProperty("cname")) {
                    if (!$util.isString(m.cname))
                        return "cname: string expected";
                }
                if (m.level != null && m.hasOwnProperty("level")) {
                    if (!$util.isInteger(m.level))
                        return "level: integer expected";
                }
                if (m.path != null && m.hasOwnProperty("path")) {
                    if (!$util.isString(m.path))
                        return "path: string expected";
                }
                return null;
            };

            /**
             * Creates a CgroupReleaseFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.CgroupReleaseFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.CgroupReleaseFtraceEvent} CgroupReleaseFtraceEvent
             */
            CgroupReleaseFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.CgroupReleaseFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.CgroupReleaseFtraceEvent();
                if (d.root != null) {
                    m.root = d.root | 0;
                }
                if (d.id != null) {
                    m.id = d.id | 0;
                }
                if (d.cname != null) {
                    m.cname = String(d.cname);
                }
                if (d.level != null) {
                    m.level = d.level | 0;
                }
                if (d.path != null) {
                    m.path = String(d.path);
                }
                return m;
            };

            /**
             * Creates a plain object from a CgroupReleaseFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.CgroupReleaseFtraceEvent
             * @static
             * @param {perfetto.protos.CgroupReleaseFtraceEvent} m CgroupReleaseFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CgroupReleaseFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.root = 0;
                    d.id = 0;
                    d.cname = "";
                    d.level = 0;
                    d.path = "";
                }
                if (m.root != null && m.hasOwnProperty("root")) {
                    d.root = m.root;
                }
                if (m.id != null && m.hasOwnProperty("id")) {
                    d.id = m.id;
                }
                if (m.cname != null && m.hasOwnProperty("cname")) {
                    d.cname = m.cname;
                }
                if (m.level != null && m.hasOwnProperty("level")) {
                    d.level = m.level;
                }
                if (m.path != null && m.hasOwnProperty("path")) {
                    d.path = m.path;
                }
                return d;
            };

            /**
             * Converts this CgroupReleaseFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.CgroupReleaseFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CgroupReleaseFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return CgroupReleaseFtraceEvent;
        })();

        protos.CgroupRenameFtraceEvent = (function() {

            /**
             * Properties of a CgroupRenameFtraceEvent.
             * @memberof perfetto.protos
             * @interface ICgroupRenameFtraceEvent
             * @property {number|null} [root] CgroupRenameFtraceEvent root
             * @property {number|null} [id] CgroupRenameFtraceEvent id
             * @property {string|null} [cname] CgroupRenameFtraceEvent cname
             * @property {number|null} [level] CgroupRenameFtraceEvent level
             * @property {string|null} [path] CgroupRenameFtraceEvent path
             */

            /**
             * Constructs a new CgroupRenameFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a CgroupRenameFtraceEvent.
             * @implements ICgroupRenameFtraceEvent
             * @constructor
             * @param {perfetto.protos.ICgroupRenameFtraceEvent=} [p] Properties to set
             */
            function CgroupRenameFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * CgroupRenameFtraceEvent root.
             * @member {number} root
             * @memberof perfetto.protos.CgroupRenameFtraceEvent
             * @instance
             */
            CgroupRenameFtraceEvent.prototype.root = 0;

            /**
             * CgroupRenameFtraceEvent id.
             * @member {number} id
             * @memberof perfetto.protos.CgroupRenameFtraceEvent
             * @instance
             */
            CgroupRenameFtraceEvent.prototype.id = 0;

            /**
             * CgroupRenameFtraceEvent cname.
             * @member {string} cname
             * @memberof perfetto.protos.CgroupRenameFtraceEvent
             * @instance
             */
            CgroupRenameFtraceEvent.prototype.cname = "";

            /**
             * CgroupRenameFtraceEvent level.
             * @member {number} level
             * @memberof perfetto.protos.CgroupRenameFtraceEvent
             * @instance
             */
            CgroupRenameFtraceEvent.prototype.level = 0;

            /**
             * CgroupRenameFtraceEvent path.
             * @member {string} path
             * @memberof perfetto.protos.CgroupRenameFtraceEvent
             * @instance
             */
            CgroupRenameFtraceEvent.prototype.path = "";

            /**
             * Creates a new CgroupRenameFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.CgroupRenameFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupRenameFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.CgroupRenameFtraceEvent} CgroupRenameFtraceEvent instance
             */
            CgroupRenameFtraceEvent.create = function create(properties) {
                return new CgroupRenameFtraceEvent(properties);
            };

            /**
             * Encodes the specified CgroupRenameFtraceEvent message. Does not implicitly {@link perfetto.protos.CgroupRenameFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.CgroupRenameFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupRenameFtraceEvent} m CgroupRenameFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CgroupRenameFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.root != null && Object.hasOwnProperty.call(m, "root"))
                    w.uint32(8).int32(m.root);
                if (m.id != null && Object.hasOwnProperty.call(m, "id"))
                    w.uint32(16).int32(m.id);
                if (m.cname != null && Object.hasOwnProperty.call(m, "cname"))
                    w.uint32(26).string(m.cname);
                if (m.level != null && Object.hasOwnProperty.call(m, "level"))
                    w.uint32(32).int32(m.level);
                if (m.path != null && Object.hasOwnProperty.call(m, "path"))
                    w.uint32(42).string(m.path);
                return w;
            };

            /**
             * Encodes the specified CgroupRenameFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.CgroupRenameFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.CgroupRenameFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupRenameFtraceEvent} message CgroupRenameFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CgroupRenameFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CgroupRenameFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.CgroupRenameFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.CgroupRenameFtraceEvent} CgroupRenameFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CgroupRenameFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.CgroupRenameFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.root = r.int32();
                        break;
                    case 2:
                        m.id = r.int32();
                        break;
                    case 3:
                        m.cname = r.string();
                        break;
                    case 4:
                        m.level = r.int32();
                        break;
                    case 5:
                        m.path = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a CgroupRenameFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.CgroupRenameFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.CgroupRenameFtraceEvent} CgroupRenameFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CgroupRenameFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CgroupRenameFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.CgroupRenameFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CgroupRenameFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.root != null && m.hasOwnProperty("root")) {
                    if (!$util.isInteger(m.root))
                        return "root: integer expected";
                }
                if (m.id != null && m.hasOwnProperty("id")) {
                    if (!$util.isInteger(m.id))
                        return "id: integer expected";
                }
                if (m.cname != null && m.hasOwnProperty("cname")) {
                    if (!$util.isString(m.cname))
                        return "cname: string expected";
                }
                if (m.level != null && m.hasOwnProperty("level")) {
                    if (!$util.isInteger(m.level))
                        return "level: integer expected";
                }
                if (m.path != null && m.hasOwnProperty("path")) {
                    if (!$util.isString(m.path))
                        return "path: string expected";
                }
                return null;
            };

            /**
             * Creates a CgroupRenameFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.CgroupRenameFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.CgroupRenameFtraceEvent} CgroupRenameFtraceEvent
             */
            CgroupRenameFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.CgroupRenameFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.CgroupRenameFtraceEvent();
                if (d.root != null) {
                    m.root = d.root | 0;
                }
                if (d.id != null) {
                    m.id = d.id | 0;
                }
                if (d.cname != null) {
                    m.cname = String(d.cname);
                }
                if (d.level != null) {
                    m.level = d.level | 0;
                }
                if (d.path != null) {
                    m.path = String(d.path);
                }
                return m;
            };

            /**
             * Creates a plain object from a CgroupRenameFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.CgroupRenameFtraceEvent
             * @static
             * @param {perfetto.protos.CgroupRenameFtraceEvent} m CgroupRenameFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CgroupRenameFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.root = 0;
                    d.id = 0;
                    d.cname = "";
                    d.level = 0;
                    d.path = "";
                }
                if (m.root != null && m.hasOwnProperty("root")) {
                    d.root = m.root;
                }
                if (m.id != null && m.hasOwnProperty("id")) {
                    d.id = m.id;
                }
                if (m.cname != null && m.hasOwnProperty("cname")) {
                    d.cname = m.cname;
                }
                if (m.level != null && m.hasOwnProperty("level")) {
                    d.level = m.level;
                }
                if (m.path != null && m.hasOwnProperty("path")) {
                    d.path = m.path;
                }
                return d;
            };

            /**
             * Converts this CgroupRenameFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.CgroupRenameFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CgroupRenameFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return CgroupRenameFtraceEvent;
        })();

        protos.CgroupSetupRootFtraceEvent = (function() {

            /**
             * Properties of a CgroupSetupRootFtraceEvent.
             * @memberof perfetto.protos
             * @interface ICgroupSetupRootFtraceEvent
             * @property {number|null} [root] CgroupSetupRootFtraceEvent root
             * @property {number|null} [ssMask] CgroupSetupRootFtraceEvent ssMask
             * @property {string|null} [name] CgroupSetupRootFtraceEvent name
             */

            /**
             * Constructs a new CgroupSetupRootFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a CgroupSetupRootFtraceEvent.
             * @implements ICgroupSetupRootFtraceEvent
             * @constructor
             * @param {perfetto.protos.ICgroupSetupRootFtraceEvent=} [p] Properties to set
             */
            function CgroupSetupRootFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * CgroupSetupRootFtraceEvent root.
             * @member {number} root
             * @memberof perfetto.protos.CgroupSetupRootFtraceEvent
             * @instance
             */
            CgroupSetupRootFtraceEvent.prototype.root = 0;

            /**
             * CgroupSetupRootFtraceEvent ssMask.
             * @member {number} ssMask
             * @memberof perfetto.protos.CgroupSetupRootFtraceEvent
             * @instance
             */
            CgroupSetupRootFtraceEvent.prototype.ssMask = 0;

            /**
             * CgroupSetupRootFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.CgroupSetupRootFtraceEvent
             * @instance
             */
            CgroupSetupRootFtraceEvent.prototype.name = "";

            /**
             * Creates a new CgroupSetupRootFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.CgroupSetupRootFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupSetupRootFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.CgroupSetupRootFtraceEvent} CgroupSetupRootFtraceEvent instance
             */
            CgroupSetupRootFtraceEvent.create = function create(properties) {
                return new CgroupSetupRootFtraceEvent(properties);
            };

            /**
             * Encodes the specified CgroupSetupRootFtraceEvent message. Does not implicitly {@link perfetto.protos.CgroupSetupRootFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.CgroupSetupRootFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupSetupRootFtraceEvent} m CgroupSetupRootFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CgroupSetupRootFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.root != null && Object.hasOwnProperty.call(m, "root"))
                    w.uint32(8).int32(m.root);
                if (m.ssMask != null && Object.hasOwnProperty.call(m, "ssMask"))
                    w.uint32(16).uint32(m.ssMask);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(26).string(m.name);
                return w;
            };

            /**
             * Encodes the specified CgroupSetupRootFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.CgroupSetupRootFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.CgroupSetupRootFtraceEvent
             * @static
             * @param {perfetto.protos.ICgroupSetupRootFtraceEvent} message CgroupSetupRootFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CgroupSetupRootFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CgroupSetupRootFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.CgroupSetupRootFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.CgroupSetupRootFtraceEvent} CgroupSetupRootFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CgroupSetupRootFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.CgroupSetupRootFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.root = r.int32();
                        break;
                    case 2:
                        m.ssMask = r.uint32();
                        break;
                    case 3:
                        m.name = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a CgroupSetupRootFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.CgroupSetupRootFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.CgroupSetupRootFtraceEvent} CgroupSetupRootFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CgroupSetupRootFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CgroupSetupRootFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.CgroupSetupRootFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CgroupSetupRootFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.root != null && m.hasOwnProperty("root")) {
                    if (!$util.isInteger(m.root))
                        return "root: integer expected";
                }
                if (m.ssMask != null && m.hasOwnProperty("ssMask")) {
                    if (!$util.isInteger(m.ssMask))
                        return "ssMask: integer expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                return null;
            };

            /**
             * Creates a CgroupSetupRootFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.CgroupSetupRootFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.CgroupSetupRootFtraceEvent} CgroupSetupRootFtraceEvent
             */
            CgroupSetupRootFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.CgroupSetupRootFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.CgroupSetupRootFtraceEvent();
                if (d.root != null) {
                    m.root = d.root | 0;
                }
                if (d.ssMask != null) {
                    m.ssMask = d.ssMask >>> 0;
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                return m;
            };

            /**
             * Creates a plain object from a CgroupSetupRootFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.CgroupSetupRootFtraceEvent
             * @static
             * @param {perfetto.protos.CgroupSetupRootFtraceEvent} m CgroupSetupRootFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CgroupSetupRootFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.root = 0;
                    d.ssMask = 0;
                    d.name = "";
                }
                if (m.root != null && m.hasOwnProperty("root")) {
                    d.root = m.root;
                }
                if (m.ssMask != null && m.hasOwnProperty("ssMask")) {
                    d.ssMask = m.ssMask;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                return d;
            };

            /**
             * Converts this CgroupSetupRootFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.CgroupSetupRootFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CgroupSetupRootFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return CgroupSetupRootFtraceEvent;
        })();

        protos.ClkEnableFtraceEvent = (function() {

            /**
             * Properties of a ClkEnableFtraceEvent.
             * @memberof perfetto.protos
             * @interface IClkEnableFtraceEvent
             * @property {string|null} [name] ClkEnableFtraceEvent name
             */

            /**
             * Constructs a new ClkEnableFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a ClkEnableFtraceEvent.
             * @implements IClkEnableFtraceEvent
             * @constructor
             * @param {perfetto.protos.IClkEnableFtraceEvent=} [p] Properties to set
             */
            function ClkEnableFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ClkEnableFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.ClkEnableFtraceEvent
             * @instance
             */
            ClkEnableFtraceEvent.prototype.name = "";

            /**
             * Creates a new ClkEnableFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ClkEnableFtraceEvent
             * @static
             * @param {perfetto.protos.IClkEnableFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.ClkEnableFtraceEvent} ClkEnableFtraceEvent instance
             */
            ClkEnableFtraceEvent.create = function create(properties) {
                return new ClkEnableFtraceEvent(properties);
            };

            /**
             * Encodes the specified ClkEnableFtraceEvent message. Does not implicitly {@link perfetto.protos.ClkEnableFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ClkEnableFtraceEvent
             * @static
             * @param {perfetto.protos.IClkEnableFtraceEvent} m ClkEnableFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ClkEnableFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                return w;
            };

            /**
             * Encodes the specified ClkEnableFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.ClkEnableFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ClkEnableFtraceEvent
             * @static
             * @param {perfetto.protos.IClkEnableFtraceEvent} message ClkEnableFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ClkEnableFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ClkEnableFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ClkEnableFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ClkEnableFtraceEvent} ClkEnableFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ClkEnableFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ClkEnableFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ClkEnableFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ClkEnableFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ClkEnableFtraceEvent} ClkEnableFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ClkEnableFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ClkEnableFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.ClkEnableFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ClkEnableFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                return null;
            };

            /**
             * Creates a ClkEnableFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ClkEnableFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ClkEnableFtraceEvent} ClkEnableFtraceEvent
             */
            ClkEnableFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ClkEnableFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.ClkEnableFtraceEvent();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                return m;
            };

            /**
             * Creates a plain object from a ClkEnableFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ClkEnableFtraceEvent
             * @static
             * @param {perfetto.protos.ClkEnableFtraceEvent} m ClkEnableFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ClkEnableFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                return d;
            };

            /**
             * Converts this ClkEnableFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ClkEnableFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ClkEnableFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ClkEnableFtraceEvent;
        })();

        protos.ClkDisableFtraceEvent = (function() {

            /**
             * Properties of a ClkDisableFtraceEvent.
             * @memberof perfetto.protos
             * @interface IClkDisableFtraceEvent
             * @property {string|null} [name] ClkDisableFtraceEvent name
             */

            /**
             * Constructs a new ClkDisableFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a ClkDisableFtraceEvent.
             * @implements IClkDisableFtraceEvent
             * @constructor
             * @param {perfetto.protos.IClkDisableFtraceEvent=} [p] Properties to set
             */
            function ClkDisableFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ClkDisableFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.ClkDisableFtraceEvent
             * @instance
             */
            ClkDisableFtraceEvent.prototype.name = "";

            /**
             * Creates a new ClkDisableFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ClkDisableFtraceEvent
             * @static
             * @param {perfetto.protos.IClkDisableFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.ClkDisableFtraceEvent} ClkDisableFtraceEvent instance
             */
            ClkDisableFtraceEvent.create = function create(properties) {
                return new ClkDisableFtraceEvent(properties);
            };

            /**
             * Encodes the specified ClkDisableFtraceEvent message. Does not implicitly {@link perfetto.protos.ClkDisableFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ClkDisableFtraceEvent
             * @static
             * @param {perfetto.protos.IClkDisableFtraceEvent} m ClkDisableFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ClkDisableFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                return w;
            };

            /**
             * Encodes the specified ClkDisableFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.ClkDisableFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ClkDisableFtraceEvent
             * @static
             * @param {perfetto.protos.IClkDisableFtraceEvent} message ClkDisableFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ClkDisableFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ClkDisableFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ClkDisableFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ClkDisableFtraceEvent} ClkDisableFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ClkDisableFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ClkDisableFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ClkDisableFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ClkDisableFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ClkDisableFtraceEvent} ClkDisableFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ClkDisableFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ClkDisableFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.ClkDisableFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ClkDisableFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                return null;
            };

            /**
             * Creates a ClkDisableFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ClkDisableFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ClkDisableFtraceEvent} ClkDisableFtraceEvent
             */
            ClkDisableFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ClkDisableFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.ClkDisableFtraceEvent();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                return m;
            };

            /**
             * Creates a plain object from a ClkDisableFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ClkDisableFtraceEvent
             * @static
             * @param {perfetto.protos.ClkDisableFtraceEvent} m ClkDisableFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ClkDisableFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                return d;
            };

            /**
             * Converts this ClkDisableFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ClkDisableFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ClkDisableFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ClkDisableFtraceEvent;
        })();

        protos.ClkSetRateFtraceEvent = (function() {

            /**
             * Properties of a ClkSetRateFtraceEvent.
             * @memberof perfetto.protos
             * @interface IClkSetRateFtraceEvent
             * @property {string|null} [name] ClkSetRateFtraceEvent name
             * @property {number|null} [rate] ClkSetRateFtraceEvent rate
             */

            /**
             * Constructs a new ClkSetRateFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a ClkSetRateFtraceEvent.
             * @implements IClkSetRateFtraceEvent
             * @constructor
             * @param {perfetto.protos.IClkSetRateFtraceEvent=} [p] Properties to set
             */
            function ClkSetRateFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ClkSetRateFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.ClkSetRateFtraceEvent
             * @instance
             */
            ClkSetRateFtraceEvent.prototype.name = "";

            /**
             * ClkSetRateFtraceEvent rate.
             * @member {number} rate
             * @memberof perfetto.protos.ClkSetRateFtraceEvent
             * @instance
             */
            ClkSetRateFtraceEvent.prototype.rate = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new ClkSetRateFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ClkSetRateFtraceEvent
             * @static
             * @param {perfetto.protos.IClkSetRateFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.ClkSetRateFtraceEvent} ClkSetRateFtraceEvent instance
             */
            ClkSetRateFtraceEvent.create = function create(properties) {
                return new ClkSetRateFtraceEvent(properties);
            };

            /**
             * Encodes the specified ClkSetRateFtraceEvent message. Does not implicitly {@link perfetto.protos.ClkSetRateFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ClkSetRateFtraceEvent
             * @static
             * @param {perfetto.protos.IClkSetRateFtraceEvent} m ClkSetRateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ClkSetRateFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                if (m.rate != null && Object.hasOwnProperty.call(m, "rate"))
                    w.uint32(16).uint64(m.rate);
                return w;
            };

            /**
             * Encodes the specified ClkSetRateFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.ClkSetRateFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ClkSetRateFtraceEvent
             * @static
             * @param {perfetto.protos.IClkSetRateFtraceEvent} message ClkSetRateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ClkSetRateFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ClkSetRateFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ClkSetRateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ClkSetRateFtraceEvent} ClkSetRateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ClkSetRateFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ClkSetRateFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    case 2:
                        m.rate = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ClkSetRateFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ClkSetRateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ClkSetRateFtraceEvent} ClkSetRateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ClkSetRateFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ClkSetRateFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.ClkSetRateFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ClkSetRateFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.rate != null && m.hasOwnProperty("rate")) {
                    if (!$util.isInteger(m.rate) && !(m.rate && $util.isInteger(m.rate.low) && $util.isInteger(m.rate.high)))
                        return "rate: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a ClkSetRateFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ClkSetRateFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ClkSetRateFtraceEvent} ClkSetRateFtraceEvent
             */
            ClkSetRateFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ClkSetRateFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.ClkSetRateFtraceEvent();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.rate != null) {
                    if ($util.Long)
                        (m.rate = $util.Long.fromValue(d.rate)).unsigned = true;
                    else if (typeof d.rate === "string")
                        m.rate = parseInt(d.rate, 10);
                    else if (typeof d.rate === "number")
                        m.rate = d.rate;
                    else if (typeof d.rate === "object")
                        m.rate = new $util.LongBits(d.rate.low >>> 0, d.rate.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a ClkSetRateFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ClkSetRateFtraceEvent
             * @static
             * @param {perfetto.protos.ClkSetRateFtraceEvent} m ClkSetRateFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ClkSetRateFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.rate = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.rate = o.longs === String ? "0" : 0;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.rate != null && m.hasOwnProperty("rate")) {
                    if (typeof m.rate === "number")
                        d.rate = o.longs === String ? String(m.rate) : m.rate;
                    else
                        d.rate = o.longs === String ? $util.Long.prototype.toString.call(m.rate) : o.longs === Number ? new $util.LongBits(m.rate.low >>> 0, m.rate.high >>> 0).toNumber(true) : m.rate;
                }
                return d;
            };

            /**
             * Converts this ClkSetRateFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ClkSetRateFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ClkSetRateFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ClkSetRateFtraceEvent;
        })();

        protos.MmCompactionBeginFtraceEvent = (function() {

            /**
             * Properties of a MmCompactionBeginFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmCompactionBeginFtraceEvent
             * @property {number|null} [zoneStart] MmCompactionBeginFtraceEvent zoneStart
             * @property {number|null} [migratePfn] MmCompactionBeginFtraceEvent migratePfn
             * @property {number|null} [freePfn] MmCompactionBeginFtraceEvent freePfn
             * @property {number|null} [zoneEnd] MmCompactionBeginFtraceEvent zoneEnd
             * @property {number|null} [sync] MmCompactionBeginFtraceEvent sync
             */

            /**
             * Constructs a new MmCompactionBeginFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmCompactionBeginFtraceEvent.
             * @implements IMmCompactionBeginFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmCompactionBeginFtraceEvent=} [p] Properties to set
             */
            function MmCompactionBeginFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmCompactionBeginFtraceEvent zoneStart.
             * @member {number} zoneStart
             * @memberof perfetto.protos.MmCompactionBeginFtraceEvent
             * @instance
             */
            MmCompactionBeginFtraceEvent.prototype.zoneStart = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmCompactionBeginFtraceEvent migratePfn.
             * @member {number} migratePfn
             * @memberof perfetto.protos.MmCompactionBeginFtraceEvent
             * @instance
             */
            MmCompactionBeginFtraceEvent.prototype.migratePfn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmCompactionBeginFtraceEvent freePfn.
             * @member {number} freePfn
             * @memberof perfetto.protos.MmCompactionBeginFtraceEvent
             * @instance
             */
            MmCompactionBeginFtraceEvent.prototype.freePfn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmCompactionBeginFtraceEvent zoneEnd.
             * @member {number} zoneEnd
             * @memberof perfetto.protos.MmCompactionBeginFtraceEvent
             * @instance
             */
            MmCompactionBeginFtraceEvent.prototype.zoneEnd = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmCompactionBeginFtraceEvent sync.
             * @member {number} sync
             * @memberof perfetto.protos.MmCompactionBeginFtraceEvent
             * @instance
             */
            MmCompactionBeginFtraceEvent.prototype.sync = 0;

            /**
             * Creates a new MmCompactionBeginFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmCompactionBeginFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionBeginFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmCompactionBeginFtraceEvent} MmCompactionBeginFtraceEvent instance
             */
            MmCompactionBeginFtraceEvent.create = function create(properties) {
                return new MmCompactionBeginFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmCompactionBeginFtraceEvent message. Does not implicitly {@link perfetto.protos.MmCompactionBeginFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmCompactionBeginFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionBeginFtraceEvent} m MmCompactionBeginFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionBeginFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.zoneStart != null && Object.hasOwnProperty.call(m, "zoneStart"))
                    w.uint32(8).uint64(m.zoneStart);
                if (m.migratePfn != null && Object.hasOwnProperty.call(m, "migratePfn"))
                    w.uint32(16).uint64(m.migratePfn);
                if (m.freePfn != null && Object.hasOwnProperty.call(m, "freePfn"))
                    w.uint32(24).uint64(m.freePfn);
                if (m.zoneEnd != null && Object.hasOwnProperty.call(m, "zoneEnd"))
                    w.uint32(32).uint64(m.zoneEnd);
                if (m.sync != null && Object.hasOwnProperty.call(m, "sync"))
                    w.uint32(40).uint32(m.sync);
                return w;
            };

            /**
             * Encodes the specified MmCompactionBeginFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmCompactionBeginFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmCompactionBeginFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionBeginFtraceEvent} message MmCompactionBeginFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionBeginFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmCompactionBeginFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmCompactionBeginFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmCompactionBeginFtraceEvent} MmCompactionBeginFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionBeginFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmCompactionBeginFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.zoneStart = r.uint64();
                        break;
                    case 2:
                        m.migratePfn = r.uint64();
                        break;
                    case 3:
                        m.freePfn = r.uint64();
                        break;
                    case 4:
                        m.zoneEnd = r.uint64();
                        break;
                    case 5:
                        m.sync = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmCompactionBeginFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmCompactionBeginFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmCompactionBeginFtraceEvent} MmCompactionBeginFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionBeginFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmCompactionBeginFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmCompactionBeginFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmCompactionBeginFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.zoneStart != null && m.hasOwnProperty("zoneStart")) {
                    if (!$util.isInteger(m.zoneStart) && !(m.zoneStart && $util.isInteger(m.zoneStart.low) && $util.isInteger(m.zoneStart.high)))
                        return "zoneStart: integer|Long expected";
                }
                if (m.migratePfn != null && m.hasOwnProperty("migratePfn")) {
                    if (!$util.isInteger(m.migratePfn) && !(m.migratePfn && $util.isInteger(m.migratePfn.low) && $util.isInteger(m.migratePfn.high)))
                        return "migratePfn: integer|Long expected";
                }
                if (m.freePfn != null && m.hasOwnProperty("freePfn")) {
                    if (!$util.isInteger(m.freePfn) && !(m.freePfn && $util.isInteger(m.freePfn.low) && $util.isInteger(m.freePfn.high)))
                        return "freePfn: integer|Long expected";
                }
                if (m.zoneEnd != null && m.hasOwnProperty("zoneEnd")) {
                    if (!$util.isInteger(m.zoneEnd) && !(m.zoneEnd && $util.isInteger(m.zoneEnd.low) && $util.isInteger(m.zoneEnd.high)))
                        return "zoneEnd: integer|Long expected";
                }
                if (m.sync != null && m.hasOwnProperty("sync")) {
                    if (!$util.isInteger(m.sync))
                        return "sync: integer expected";
                }
                return null;
            };

            /**
             * Creates a MmCompactionBeginFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmCompactionBeginFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmCompactionBeginFtraceEvent} MmCompactionBeginFtraceEvent
             */
            MmCompactionBeginFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmCompactionBeginFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmCompactionBeginFtraceEvent();
                if (d.zoneStart != null) {
                    if ($util.Long)
                        (m.zoneStart = $util.Long.fromValue(d.zoneStart)).unsigned = true;
                    else if (typeof d.zoneStart === "string")
                        m.zoneStart = parseInt(d.zoneStart, 10);
                    else if (typeof d.zoneStart === "number")
                        m.zoneStart = d.zoneStart;
                    else if (typeof d.zoneStart === "object")
                        m.zoneStart = new $util.LongBits(d.zoneStart.low >>> 0, d.zoneStart.high >>> 0).toNumber(true);
                }
                if (d.migratePfn != null) {
                    if ($util.Long)
                        (m.migratePfn = $util.Long.fromValue(d.migratePfn)).unsigned = true;
                    else if (typeof d.migratePfn === "string")
                        m.migratePfn = parseInt(d.migratePfn, 10);
                    else if (typeof d.migratePfn === "number")
                        m.migratePfn = d.migratePfn;
                    else if (typeof d.migratePfn === "object")
                        m.migratePfn = new $util.LongBits(d.migratePfn.low >>> 0, d.migratePfn.high >>> 0).toNumber(true);
                }
                if (d.freePfn != null) {
                    if ($util.Long)
                        (m.freePfn = $util.Long.fromValue(d.freePfn)).unsigned = true;
                    else if (typeof d.freePfn === "string")
                        m.freePfn = parseInt(d.freePfn, 10);
                    else if (typeof d.freePfn === "number")
                        m.freePfn = d.freePfn;
                    else if (typeof d.freePfn === "object")
                        m.freePfn = new $util.LongBits(d.freePfn.low >>> 0, d.freePfn.high >>> 0).toNumber(true);
                }
                if (d.zoneEnd != null) {
                    if ($util.Long)
                        (m.zoneEnd = $util.Long.fromValue(d.zoneEnd)).unsigned = true;
                    else if (typeof d.zoneEnd === "string")
                        m.zoneEnd = parseInt(d.zoneEnd, 10);
                    else if (typeof d.zoneEnd === "number")
                        m.zoneEnd = d.zoneEnd;
                    else if (typeof d.zoneEnd === "object")
                        m.zoneEnd = new $util.LongBits(d.zoneEnd.low >>> 0, d.zoneEnd.high >>> 0).toNumber(true);
                }
                if (d.sync != null) {
                    m.sync = d.sync >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MmCompactionBeginFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmCompactionBeginFtraceEvent
             * @static
             * @param {perfetto.protos.MmCompactionBeginFtraceEvent} m MmCompactionBeginFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmCompactionBeginFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.zoneStart = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.zoneStart = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.migratePfn = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.migratePfn = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.freePfn = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.freePfn = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.zoneEnd = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.zoneEnd = o.longs === String ? "0" : 0;
                    d.sync = 0;
                }
                if (m.zoneStart != null && m.hasOwnProperty("zoneStart")) {
                    if (typeof m.zoneStart === "number")
                        d.zoneStart = o.longs === String ? String(m.zoneStart) : m.zoneStart;
                    else
                        d.zoneStart = o.longs === String ? $util.Long.prototype.toString.call(m.zoneStart) : o.longs === Number ? new $util.LongBits(m.zoneStart.low >>> 0, m.zoneStart.high >>> 0).toNumber(true) : m.zoneStart;
                }
                if (m.migratePfn != null && m.hasOwnProperty("migratePfn")) {
                    if (typeof m.migratePfn === "number")
                        d.migratePfn = o.longs === String ? String(m.migratePfn) : m.migratePfn;
                    else
                        d.migratePfn = o.longs === String ? $util.Long.prototype.toString.call(m.migratePfn) : o.longs === Number ? new $util.LongBits(m.migratePfn.low >>> 0, m.migratePfn.high >>> 0).toNumber(true) : m.migratePfn;
                }
                if (m.freePfn != null && m.hasOwnProperty("freePfn")) {
                    if (typeof m.freePfn === "number")
                        d.freePfn = o.longs === String ? String(m.freePfn) : m.freePfn;
                    else
                        d.freePfn = o.longs === String ? $util.Long.prototype.toString.call(m.freePfn) : o.longs === Number ? new $util.LongBits(m.freePfn.low >>> 0, m.freePfn.high >>> 0).toNumber(true) : m.freePfn;
                }
                if (m.zoneEnd != null && m.hasOwnProperty("zoneEnd")) {
                    if (typeof m.zoneEnd === "number")
                        d.zoneEnd = o.longs === String ? String(m.zoneEnd) : m.zoneEnd;
                    else
                        d.zoneEnd = o.longs === String ? $util.Long.prototype.toString.call(m.zoneEnd) : o.longs === Number ? new $util.LongBits(m.zoneEnd.low >>> 0, m.zoneEnd.high >>> 0).toNumber(true) : m.zoneEnd;
                }
                if (m.sync != null && m.hasOwnProperty("sync")) {
                    d.sync = m.sync;
                }
                return d;
            };

            /**
             * Converts this MmCompactionBeginFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmCompactionBeginFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmCompactionBeginFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmCompactionBeginFtraceEvent;
        })();

        protos.MmCompactionDeferCompactionFtraceEvent = (function() {

            /**
             * Properties of a MmCompactionDeferCompactionFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmCompactionDeferCompactionFtraceEvent
             * @property {number|null} [nid] MmCompactionDeferCompactionFtraceEvent nid
             * @property {number|null} [idx] MmCompactionDeferCompactionFtraceEvent idx
             * @property {number|null} [order] MmCompactionDeferCompactionFtraceEvent order
             * @property {number|null} [considered] MmCompactionDeferCompactionFtraceEvent considered
             * @property {number|null} [deferShift] MmCompactionDeferCompactionFtraceEvent deferShift
             * @property {number|null} [orderFailed] MmCompactionDeferCompactionFtraceEvent orderFailed
             */

            /**
             * Constructs a new MmCompactionDeferCompactionFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmCompactionDeferCompactionFtraceEvent.
             * @implements IMmCompactionDeferCompactionFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmCompactionDeferCompactionFtraceEvent=} [p] Properties to set
             */
            function MmCompactionDeferCompactionFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmCompactionDeferCompactionFtraceEvent nid.
             * @member {number} nid
             * @memberof perfetto.protos.MmCompactionDeferCompactionFtraceEvent
             * @instance
             */
            MmCompactionDeferCompactionFtraceEvent.prototype.nid = 0;

            /**
             * MmCompactionDeferCompactionFtraceEvent idx.
             * @member {number} idx
             * @memberof perfetto.protos.MmCompactionDeferCompactionFtraceEvent
             * @instance
             */
            MmCompactionDeferCompactionFtraceEvent.prototype.idx = 0;

            /**
             * MmCompactionDeferCompactionFtraceEvent order.
             * @member {number} order
             * @memberof perfetto.protos.MmCompactionDeferCompactionFtraceEvent
             * @instance
             */
            MmCompactionDeferCompactionFtraceEvent.prototype.order = 0;

            /**
             * MmCompactionDeferCompactionFtraceEvent considered.
             * @member {number} considered
             * @memberof perfetto.protos.MmCompactionDeferCompactionFtraceEvent
             * @instance
             */
            MmCompactionDeferCompactionFtraceEvent.prototype.considered = 0;

            /**
             * MmCompactionDeferCompactionFtraceEvent deferShift.
             * @member {number} deferShift
             * @memberof perfetto.protos.MmCompactionDeferCompactionFtraceEvent
             * @instance
             */
            MmCompactionDeferCompactionFtraceEvent.prototype.deferShift = 0;

            /**
             * MmCompactionDeferCompactionFtraceEvent orderFailed.
             * @member {number} orderFailed
             * @memberof perfetto.protos.MmCompactionDeferCompactionFtraceEvent
             * @instance
             */
            MmCompactionDeferCompactionFtraceEvent.prototype.orderFailed = 0;

            /**
             * Creates a new MmCompactionDeferCompactionFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmCompactionDeferCompactionFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionDeferCompactionFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmCompactionDeferCompactionFtraceEvent} MmCompactionDeferCompactionFtraceEvent instance
             */
            MmCompactionDeferCompactionFtraceEvent.create = function create(properties) {
                return new MmCompactionDeferCompactionFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmCompactionDeferCompactionFtraceEvent message. Does not implicitly {@link perfetto.protos.MmCompactionDeferCompactionFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmCompactionDeferCompactionFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionDeferCompactionFtraceEvent} m MmCompactionDeferCompactionFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionDeferCompactionFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.nid != null && Object.hasOwnProperty.call(m, "nid"))
                    w.uint32(8).int32(m.nid);
                if (m.idx != null && Object.hasOwnProperty.call(m, "idx"))
                    w.uint32(16).uint32(m.idx);
                if (m.order != null && Object.hasOwnProperty.call(m, "order"))
                    w.uint32(24).int32(m.order);
                if (m.considered != null && Object.hasOwnProperty.call(m, "considered"))
                    w.uint32(32).uint32(m.considered);
                if (m.deferShift != null && Object.hasOwnProperty.call(m, "deferShift"))
                    w.uint32(40).uint32(m.deferShift);
                if (m.orderFailed != null && Object.hasOwnProperty.call(m, "orderFailed"))
                    w.uint32(48).int32(m.orderFailed);
                return w;
            };

            /**
             * Encodes the specified MmCompactionDeferCompactionFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmCompactionDeferCompactionFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmCompactionDeferCompactionFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionDeferCompactionFtraceEvent} message MmCompactionDeferCompactionFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionDeferCompactionFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmCompactionDeferCompactionFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmCompactionDeferCompactionFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmCompactionDeferCompactionFtraceEvent} MmCompactionDeferCompactionFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionDeferCompactionFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmCompactionDeferCompactionFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.nid = r.int32();
                        break;
                    case 2:
                        m.idx = r.uint32();
                        break;
                    case 3:
                        m.order = r.int32();
                        break;
                    case 4:
                        m.considered = r.uint32();
                        break;
                    case 5:
                        m.deferShift = r.uint32();
                        break;
                    case 6:
                        m.orderFailed = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmCompactionDeferCompactionFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmCompactionDeferCompactionFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmCompactionDeferCompactionFtraceEvent} MmCompactionDeferCompactionFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionDeferCompactionFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmCompactionDeferCompactionFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmCompactionDeferCompactionFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmCompactionDeferCompactionFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    if (!$util.isInteger(m.nid))
                        return "nid: integer expected";
                }
                if (m.idx != null && m.hasOwnProperty("idx")) {
                    if (!$util.isInteger(m.idx))
                        return "idx: integer expected";
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    if (!$util.isInteger(m.order))
                        return "order: integer expected";
                }
                if (m.considered != null && m.hasOwnProperty("considered")) {
                    if (!$util.isInteger(m.considered))
                        return "considered: integer expected";
                }
                if (m.deferShift != null && m.hasOwnProperty("deferShift")) {
                    if (!$util.isInteger(m.deferShift))
                        return "deferShift: integer expected";
                }
                if (m.orderFailed != null && m.hasOwnProperty("orderFailed")) {
                    if (!$util.isInteger(m.orderFailed))
                        return "orderFailed: integer expected";
                }
                return null;
            };

            /**
             * Creates a MmCompactionDeferCompactionFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmCompactionDeferCompactionFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmCompactionDeferCompactionFtraceEvent} MmCompactionDeferCompactionFtraceEvent
             */
            MmCompactionDeferCompactionFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmCompactionDeferCompactionFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmCompactionDeferCompactionFtraceEvent();
                if (d.nid != null) {
                    m.nid = d.nid | 0;
                }
                if (d.idx != null) {
                    m.idx = d.idx >>> 0;
                }
                if (d.order != null) {
                    m.order = d.order | 0;
                }
                if (d.considered != null) {
                    m.considered = d.considered >>> 0;
                }
                if (d.deferShift != null) {
                    m.deferShift = d.deferShift >>> 0;
                }
                if (d.orderFailed != null) {
                    m.orderFailed = d.orderFailed | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MmCompactionDeferCompactionFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmCompactionDeferCompactionFtraceEvent
             * @static
             * @param {perfetto.protos.MmCompactionDeferCompactionFtraceEvent} m MmCompactionDeferCompactionFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmCompactionDeferCompactionFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.nid = 0;
                    d.idx = 0;
                    d.order = 0;
                    d.considered = 0;
                    d.deferShift = 0;
                    d.orderFailed = 0;
                }
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    d.nid = m.nid;
                }
                if (m.idx != null && m.hasOwnProperty("idx")) {
                    d.idx = m.idx;
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    d.order = m.order;
                }
                if (m.considered != null && m.hasOwnProperty("considered")) {
                    d.considered = m.considered;
                }
                if (m.deferShift != null && m.hasOwnProperty("deferShift")) {
                    d.deferShift = m.deferShift;
                }
                if (m.orderFailed != null && m.hasOwnProperty("orderFailed")) {
                    d.orderFailed = m.orderFailed;
                }
                return d;
            };

            /**
             * Converts this MmCompactionDeferCompactionFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmCompactionDeferCompactionFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmCompactionDeferCompactionFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmCompactionDeferCompactionFtraceEvent;
        })();

        protos.MmCompactionDeferredFtraceEvent = (function() {

            /**
             * Properties of a MmCompactionDeferredFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmCompactionDeferredFtraceEvent
             * @property {number|null} [nid] MmCompactionDeferredFtraceEvent nid
             * @property {number|null} [idx] MmCompactionDeferredFtraceEvent idx
             * @property {number|null} [order] MmCompactionDeferredFtraceEvent order
             * @property {number|null} [considered] MmCompactionDeferredFtraceEvent considered
             * @property {number|null} [deferShift] MmCompactionDeferredFtraceEvent deferShift
             * @property {number|null} [orderFailed] MmCompactionDeferredFtraceEvent orderFailed
             */

            /**
             * Constructs a new MmCompactionDeferredFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmCompactionDeferredFtraceEvent.
             * @implements IMmCompactionDeferredFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmCompactionDeferredFtraceEvent=} [p] Properties to set
             */
            function MmCompactionDeferredFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmCompactionDeferredFtraceEvent nid.
             * @member {number} nid
             * @memberof perfetto.protos.MmCompactionDeferredFtraceEvent
             * @instance
             */
            MmCompactionDeferredFtraceEvent.prototype.nid = 0;

            /**
             * MmCompactionDeferredFtraceEvent idx.
             * @member {number} idx
             * @memberof perfetto.protos.MmCompactionDeferredFtraceEvent
             * @instance
             */
            MmCompactionDeferredFtraceEvent.prototype.idx = 0;

            /**
             * MmCompactionDeferredFtraceEvent order.
             * @member {number} order
             * @memberof perfetto.protos.MmCompactionDeferredFtraceEvent
             * @instance
             */
            MmCompactionDeferredFtraceEvent.prototype.order = 0;

            /**
             * MmCompactionDeferredFtraceEvent considered.
             * @member {number} considered
             * @memberof perfetto.protos.MmCompactionDeferredFtraceEvent
             * @instance
             */
            MmCompactionDeferredFtraceEvent.prototype.considered = 0;

            /**
             * MmCompactionDeferredFtraceEvent deferShift.
             * @member {number} deferShift
             * @memberof perfetto.protos.MmCompactionDeferredFtraceEvent
             * @instance
             */
            MmCompactionDeferredFtraceEvent.prototype.deferShift = 0;

            /**
             * MmCompactionDeferredFtraceEvent orderFailed.
             * @member {number} orderFailed
             * @memberof perfetto.protos.MmCompactionDeferredFtraceEvent
             * @instance
             */
            MmCompactionDeferredFtraceEvent.prototype.orderFailed = 0;

            /**
             * Creates a new MmCompactionDeferredFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmCompactionDeferredFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionDeferredFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmCompactionDeferredFtraceEvent} MmCompactionDeferredFtraceEvent instance
             */
            MmCompactionDeferredFtraceEvent.create = function create(properties) {
                return new MmCompactionDeferredFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmCompactionDeferredFtraceEvent message. Does not implicitly {@link perfetto.protos.MmCompactionDeferredFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmCompactionDeferredFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionDeferredFtraceEvent} m MmCompactionDeferredFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionDeferredFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.nid != null && Object.hasOwnProperty.call(m, "nid"))
                    w.uint32(8).int32(m.nid);
                if (m.idx != null && Object.hasOwnProperty.call(m, "idx"))
                    w.uint32(16).uint32(m.idx);
                if (m.order != null && Object.hasOwnProperty.call(m, "order"))
                    w.uint32(24).int32(m.order);
                if (m.considered != null && Object.hasOwnProperty.call(m, "considered"))
                    w.uint32(32).uint32(m.considered);
                if (m.deferShift != null && Object.hasOwnProperty.call(m, "deferShift"))
                    w.uint32(40).uint32(m.deferShift);
                if (m.orderFailed != null && Object.hasOwnProperty.call(m, "orderFailed"))
                    w.uint32(48).int32(m.orderFailed);
                return w;
            };

            /**
             * Encodes the specified MmCompactionDeferredFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmCompactionDeferredFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmCompactionDeferredFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionDeferredFtraceEvent} message MmCompactionDeferredFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionDeferredFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmCompactionDeferredFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmCompactionDeferredFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmCompactionDeferredFtraceEvent} MmCompactionDeferredFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionDeferredFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmCompactionDeferredFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.nid = r.int32();
                        break;
                    case 2:
                        m.idx = r.uint32();
                        break;
                    case 3:
                        m.order = r.int32();
                        break;
                    case 4:
                        m.considered = r.uint32();
                        break;
                    case 5:
                        m.deferShift = r.uint32();
                        break;
                    case 6:
                        m.orderFailed = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmCompactionDeferredFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmCompactionDeferredFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmCompactionDeferredFtraceEvent} MmCompactionDeferredFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionDeferredFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmCompactionDeferredFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmCompactionDeferredFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmCompactionDeferredFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    if (!$util.isInteger(m.nid))
                        return "nid: integer expected";
                }
                if (m.idx != null && m.hasOwnProperty("idx")) {
                    if (!$util.isInteger(m.idx))
                        return "idx: integer expected";
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    if (!$util.isInteger(m.order))
                        return "order: integer expected";
                }
                if (m.considered != null && m.hasOwnProperty("considered")) {
                    if (!$util.isInteger(m.considered))
                        return "considered: integer expected";
                }
                if (m.deferShift != null && m.hasOwnProperty("deferShift")) {
                    if (!$util.isInteger(m.deferShift))
                        return "deferShift: integer expected";
                }
                if (m.orderFailed != null && m.hasOwnProperty("orderFailed")) {
                    if (!$util.isInteger(m.orderFailed))
                        return "orderFailed: integer expected";
                }
                return null;
            };

            /**
             * Creates a MmCompactionDeferredFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmCompactionDeferredFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmCompactionDeferredFtraceEvent} MmCompactionDeferredFtraceEvent
             */
            MmCompactionDeferredFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmCompactionDeferredFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmCompactionDeferredFtraceEvent();
                if (d.nid != null) {
                    m.nid = d.nid | 0;
                }
                if (d.idx != null) {
                    m.idx = d.idx >>> 0;
                }
                if (d.order != null) {
                    m.order = d.order | 0;
                }
                if (d.considered != null) {
                    m.considered = d.considered >>> 0;
                }
                if (d.deferShift != null) {
                    m.deferShift = d.deferShift >>> 0;
                }
                if (d.orderFailed != null) {
                    m.orderFailed = d.orderFailed | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MmCompactionDeferredFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmCompactionDeferredFtraceEvent
             * @static
             * @param {perfetto.protos.MmCompactionDeferredFtraceEvent} m MmCompactionDeferredFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmCompactionDeferredFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.nid = 0;
                    d.idx = 0;
                    d.order = 0;
                    d.considered = 0;
                    d.deferShift = 0;
                    d.orderFailed = 0;
                }
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    d.nid = m.nid;
                }
                if (m.idx != null && m.hasOwnProperty("idx")) {
                    d.idx = m.idx;
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    d.order = m.order;
                }
                if (m.considered != null && m.hasOwnProperty("considered")) {
                    d.considered = m.considered;
                }
                if (m.deferShift != null && m.hasOwnProperty("deferShift")) {
                    d.deferShift = m.deferShift;
                }
                if (m.orderFailed != null && m.hasOwnProperty("orderFailed")) {
                    d.orderFailed = m.orderFailed;
                }
                return d;
            };

            /**
             * Converts this MmCompactionDeferredFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmCompactionDeferredFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmCompactionDeferredFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmCompactionDeferredFtraceEvent;
        })();

        protos.MmCompactionDeferResetFtraceEvent = (function() {

            /**
             * Properties of a MmCompactionDeferResetFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmCompactionDeferResetFtraceEvent
             * @property {number|null} [nid] MmCompactionDeferResetFtraceEvent nid
             * @property {number|null} [idx] MmCompactionDeferResetFtraceEvent idx
             * @property {number|null} [order] MmCompactionDeferResetFtraceEvent order
             * @property {number|null} [considered] MmCompactionDeferResetFtraceEvent considered
             * @property {number|null} [deferShift] MmCompactionDeferResetFtraceEvent deferShift
             * @property {number|null} [orderFailed] MmCompactionDeferResetFtraceEvent orderFailed
             */

            /**
             * Constructs a new MmCompactionDeferResetFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmCompactionDeferResetFtraceEvent.
             * @implements IMmCompactionDeferResetFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmCompactionDeferResetFtraceEvent=} [p] Properties to set
             */
            function MmCompactionDeferResetFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmCompactionDeferResetFtraceEvent nid.
             * @member {number} nid
             * @memberof perfetto.protos.MmCompactionDeferResetFtraceEvent
             * @instance
             */
            MmCompactionDeferResetFtraceEvent.prototype.nid = 0;

            /**
             * MmCompactionDeferResetFtraceEvent idx.
             * @member {number} idx
             * @memberof perfetto.protos.MmCompactionDeferResetFtraceEvent
             * @instance
             */
            MmCompactionDeferResetFtraceEvent.prototype.idx = 0;

            /**
             * MmCompactionDeferResetFtraceEvent order.
             * @member {number} order
             * @memberof perfetto.protos.MmCompactionDeferResetFtraceEvent
             * @instance
             */
            MmCompactionDeferResetFtraceEvent.prototype.order = 0;

            /**
             * MmCompactionDeferResetFtraceEvent considered.
             * @member {number} considered
             * @memberof perfetto.protos.MmCompactionDeferResetFtraceEvent
             * @instance
             */
            MmCompactionDeferResetFtraceEvent.prototype.considered = 0;

            /**
             * MmCompactionDeferResetFtraceEvent deferShift.
             * @member {number} deferShift
             * @memberof perfetto.protos.MmCompactionDeferResetFtraceEvent
             * @instance
             */
            MmCompactionDeferResetFtraceEvent.prototype.deferShift = 0;

            /**
             * MmCompactionDeferResetFtraceEvent orderFailed.
             * @member {number} orderFailed
             * @memberof perfetto.protos.MmCompactionDeferResetFtraceEvent
             * @instance
             */
            MmCompactionDeferResetFtraceEvent.prototype.orderFailed = 0;

            /**
             * Creates a new MmCompactionDeferResetFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmCompactionDeferResetFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionDeferResetFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmCompactionDeferResetFtraceEvent} MmCompactionDeferResetFtraceEvent instance
             */
            MmCompactionDeferResetFtraceEvent.create = function create(properties) {
                return new MmCompactionDeferResetFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmCompactionDeferResetFtraceEvent message. Does not implicitly {@link perfetto.protos.MmCompactionDeferResetFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmCompactionDeferResetFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionDeferResetFtraceEvent} m MmCompactionDeferResetFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionDeferResetFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.nid != null && Object.hasOwnProperty.call(m, "nid"))
                    w.uint32(8).int32(m.nid);
                if (m.idx != null && Object.hasOwnProperty.call(m, "idx"))
                    w.uint32(16).uint32(m.idx);
                if (m.order != null && Object.hasOwnProperty.call(m, "order"))
                    w.uint32(24).int32(m.order);
                if (m.considered != null && Object.hasOwnProperty.call(m, "considered"))
                    w.uint32(32).uint32(m.considered);
                if (m.deferShift != null && Object.hasOwnProperty.call(m, "deferShift"))
                    w.uint32(40).uint32(m.deferShift);
                if (m.orderFailed != null && Object.hasOwnProperty.call(m, "orderFailed"))
                    w.uint32(48).int32(m.orderFailed);
                return w;
            };

            /**
             * Encodes the specified MmCompactionDeferResetFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmCompactionDeferResetFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmCompactionDeferResetFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionDeferResetFtraceEvent} message MmCompactionDeferResetFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionDeferResetFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmCompactionDeferResetFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmCompactionDeferResetFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmCompactionDeferResetFtraceEvent} MmCompactionDeferResetFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionDeferResetFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmCompactionDeferResetFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.nid = r.int32();
                        break;
                    case 2:
                        m.idx = r.uint32();
                        break;
                    case 3:
                        m.order = r.int32();
                        break;
                    case 4:
                        m.considered = r.uint32();
                        break;
                    case 5:
                        m.deferShift = r.uint32();
                        break;
                    case 6:
                        m.orderFailed = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmCompactionDeferResetFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmCompactionDeferResetFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmCompactionDeferResetFtraceEvent} MmCompactionDeferResetFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionDeferResetFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmCompactionDeferResetFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmCompactionDeferResetFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmCompactionDeferResetFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    if (!$util.isInteger(m.nid))
                        return "nid: integer expected";
                }
                if (m.idx != null && m.hasOwnProperty("idx")) {
                    if (!$util.isInteger(m.idx))
                        return "idx: integer expected";
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    if (!$util.isInteger(m.order))
                        return "order: integer expected";
                }
                if (m.considered != null && m.hasOwnProperty("considered")) {
                    if (!$util.isInteger(m.considered))
                        return "considered: integer expected";
                }
                if (m.deferShift != null && m.hasOwnProperty("deferShift")) {
                    if (!$util.isInteger(m.deferShift))
                        return "deferShift: integer expected";
                }
                if (m.orderFailed != null && m.hasOwnProperty("orderFailed")) {
                    if (!$util.isInteger(m.orderFailed))
                        return "orderFailed: integer expected";
                }
                return null;
            };

            /**
             * Creates a MmCompactionDeferResetFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmCompactionDeferResetFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmCompactionDeferResetFtraceEvent} MmCompactionDeferResetFtraceEvent
             */
            MmCompactionDeferResetFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmCompactionDeferResetFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmCompactionDeferResetFtraceEvent();
                if (d.nid != null) {
                    m.nid = d.nid | 0;
                }
                if (d.idx != null) {
                    m.idx = d.idx >>> 0;
                }
                if (d.order != null) {
                    m.order = d.order | 0;
                }
                if (d.considered != null) {
                    m.considered = d.considered >>> 0;
                }
                if (d.deferShift != null) {
                    m.deferShift = d.deferShift >>> 0;
                }
                if (d.orderFailed != null) {
                    m.orderFailed = d.orderFailed | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MmCompactionDeferResetFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmCompactionDeferResetFtraceEvent
             * @static
             * @param {perfetto.protos.MmCompactionDeferResetFtraceEvent} m MmCompactionDeferResetFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmCompactionDeferResetFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.nid = 0;
                    d.idx = 0;
                    d.order = 0;
                    d.considered = 0;
                    d.deferShift = 0;
                    d.orderFailed = 0;
                }
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    d.nid = m.nid;
                }
                if (m.idx != null && m.hasOwnProperty("idx")) {
                    d.idx = m.idx;
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    d.order = m.order;
                }
                if (m.considered != null && m.hasOwnProperty("considered")) {
                    d.considered = m.considered;
                }
                if (m.deferShift != null && m.hasOwnProperty("deferShift")) {
                    d.deferShift = m.deferShift;
                }
                if (m.orderFailed != null && m.hasOwnProperty("orderFailed")) {
                    d.orderFailed = m.orderFailed;
                }
                return d;
            };

            /**
             * Converts this MmCompactionDeferResetFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmCompactionDeferResetFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmCompactionDeferResetFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmCompactionDeferResetFtraceEvent;
        })();

        protos.MmCompactionEndFtraceEvent = (function() {

            /**
             * Properties of a MmCompactionEndFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmCompactionEndFtraceEvent
             * @property {number|null} [zoneStart] MmCompactionEndFtraceEvent zoneStart
             * @property {number|null} [migratePfn] MmCompactionEndFtraceEvent migratePfn
             * @property {number|null} [freePfn] MmCompactionEndFtraceEvent freePfn
             * @property {number|null} [zoneEnd] MmCompactionEndFtraceEvent zoneEnd
             * @property {number|null} [sync] MmCompactionEndFtraceEvent sync
             * @property {number|null} [status] MmCompactionEndFtraceEvent status
             */

            /**
             * Constructs a new MmCompactionEndFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmCompactionEndFtraceEvent.
             * @implements IMmCompactionEndFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmCompactionEndFtraceEvent=} [p] Properties to set
             */
            function MmCompactionEndFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmCompactionEndFtraceEvent zoneStart.
             * @member {number} zoneStart
             * @memberof perfetto.protos.MmCompactionEndFtraceEvent
             * @instance
             */
            MmCompactionEndFtraceEvent.prototype.zoneStart = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmCompactionEndFtraceEvent migratePfn.
             * @member {number} migratePfn
             * @memberof perfetto.protos.MmCompactionEndFtraceEvent
             * @instance
             */
            MmCompactionEndFtraceEvent.prototype.migratePfn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmCompactionEndFtraceEvent freePfn.
             * @member {number} freePfn
             * @memberof perfetto.protos.MmCompactionEndFtraceEvent
             * @instance
             */
            MmCompactionEndFtraceEvent.prototype.freePfn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmCompactionEndFtraceEvent zoneEnd.
             * @member {number} zoneEnd
             * @memberof perfetto.protos.MmCompactionEndFtraceEvent
             * @instance
             */
            MmCompactionEndFtraceEvent.prototype.zoneEnd = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmCompactionEndFtraceEvent sync.
             * @member {number} sync
             * @memberof perfetto.protos.MmCompactionEndFtraceEvent
             * @instance
             */
            MmCompactionEndFtraceEvent.prototype.sync = 0;

            /**
             * MmCompactionEndFtraceEvent status.
             * @member {number} status
             * @memberof perfetto.protos.MmCompactionEndFtraceEvent
             * @instance
             */
            MmCompactionEndFtraceEvent.prototype.status = 0;

            /**
             * Creates a new MmCompactionEndFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmCompactionEndFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionEndFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmCompactionEndFtraceEvent} MmCompactionEndFtraceEvent instance
             */
            MmCompactionEndFtraceEvent.create = function create(properties) {
                return new MmCompactionEndFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmCompactionEndFtraceEvent message. Does not implicitly {@link perfetto.protos.MmCompactionEndFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmCompactionEndFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionEndFtraceEvent} m MmCompactionEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionEndFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.zoneStart != null && Object.hasOwnProperty.call(m, "zoneStart"))
                    w.uint32(8).uint64(m.zoneStart);
                if (m.migratePfn != null && Object.hasOwnProperty.call(m, "migratePfn"))
                    w.uint32(16).uint64(m.migratePfn);
                if (m.freePfn != null && Object.hasOwnProperty.call(m, "freePfn"))
                    w.uint32(24).uint64(m.freePfn);
                if (m.zoneEnd != null && Object.hasOwnProperty.call(m, "zoneEnd"))
                    w.uint32(32).uint64(m.zoneEnd);
                if (m.sync != null && Object.hasOwnProperty.call(m, "sync"))
                    w.uint32(40).uint32(m.sync);
                if (m.status != null && Object.hasOwnProperty.call(m, "status"))
                    w.uint32(48).int32(m.status);
                return w;
            };

            /**
             * Encodes the specified MmCompactionEndFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmCompactionEndFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmCompactionEndFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionEndFtraceEvent} message MmCompactionEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionEndFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmCompactionEndFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmCompactionEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmCompactionEndFtraceEvent} MmCompactionEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionEndFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmCompactionEndFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.zoneStart = r.uint64();
                        break;
                    case 2:
                        m.migratePfn = r.uint64();
                        break;
                    case 3:
                        m.freePfn = r.uint64();
                        break;
                    case 4:
                        m.zoneEnd = r.uint64();
                        break;
                    case 5:
                        m.sync = r.uint32();
                        break;
                    case 6:
                        m.status = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmCompactionEndFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmCompactionEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmCompactionEndFtraceEvent} MmCompactionEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionEndFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmCompactionEndFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmCompactionEndFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmCompactionEndFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.zoneStart != null && m.hasOwnProperty("zoneStart")) {
                    if (!$util.isInteger(m.zoneStart) && !(m.zoneStart && $util.isInteger(m.zoneStart.low) && $util.isInteger(m.zoneStart.high)))
                        return "zoneStart: integer|Long expected";
                }
                if (m.migratePfn != null && m.hasOwnProperty("migratePfn")) {
                    if (!$util.isInteger(m.migratePfn) && !(m.migratePfn && $util.isInteger(m.migratePfn.low) && $util.isInteger(m.migratePfn.high)))
                        return "migratePfn: integer|Long expected";
                }
                if (m.freePfn != null && m.hasOwnProperty("freePfn")) {
                    if (!$util.isInteger(m.freePfn) && !(m.freePfn && $util.isInteger(m.freePfn.low) && $util.isInteger(m.freePfn.high)))
                        return "freePfn: integer|Long expected";
                }
                if (m.zoneEnd != null && m.hasOwnProperty("zoneEnd")) {
                    if (!$util.isInteger(m.zoneEnd) && !(m.zoneEnd && $util.isInteger(m.zoneEnd.low) && $util.isInteger(m.zoneEnd.high)))
                        return "zoneEnd: integer|Long expected";
                }
                if (m.sync != null && m.hasOwnProperty("sync")) {
                    if (!$util.isInteger(m.sync))
                        return "sync: integer expected";
                }
                if (m.status != null && m.hasOwnProperty("status")) {
                    if (!$util.isInteger(m.status))
                        return "status: integer expected";
                }
                return null;
            };

            /**
             * Creates a MmCompactionEndFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmCompactionEndFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmCompactionEndFtraceEvent} MmCompactionEndFtraceEvent
             */
            MmCompactionEndFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmCompactionEndFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmCompactionEndFtraceEvent();
                if (d.zoneStart != null) {
                    if ($util.Long)
                        (m.zoneStart = $util.Long.fromValue(d.zoneStart)).unsigned = true;
                    else if (typeof d.zoneStart === "string")
                        m.zoneStart = parseInt(d.zoneStart, 10);
                    else if (typeof d.zoneStart === "number")
                        m.zoneStart = d.zoneStart;
                    else if (typeof d.zoneStart === "object")
                        m.zoneStart = new $util.LongBits(d.zoneStart.low >>> 0, d.zoneStart.high >>> 0).toNumber(true);
                }
                if (d.migratePfn != null) {
                    if ($util.Long)
                        (m.migratePfn = $util.Long.fromValue(d.migratePfn)).unsigned = true;
                    else if (typeof d.migratePfn === "string")
                        m.migratePfn = parseInt(d.migratePfn, 10);
                    else if (typeof d.migratePfn === "number")
                        m.migratePfn = d.migratePfn;
                    else if (typeof d.migratePfn === "object")
                        m.migratePfn = new $util.LongBits(d.migratePfn.low >>> 0, d.migratePfn.high >>> 0).toNumber(true);
                }
                if (d.freePfn != null) {
                    if ($util.Long)
                        (m.freePfn = $util.Long.fromValue(d.freePfn)).unsigned = true;
                    else if (typeof d.freePfn === "string")
                        m.freePfn = parseInt(d.freePfn, 10);
                    else if (typeof d.freePfn === "number")
                        m.freePfn = d.freePfn;
                    else if (typeof d.freePfn === "object")
                        m.freePfn = new $util.LongBits(d.freePfn.low >>> 0, d.freePfn.high >>> 0).toNumber(true);
                }
                if (d.zoneEnd != null) {
                    if ($util.Long)
                        (m.zoneEnd = $util.Long.fromValue(d.zoneEnd)).unsigned = true;
                    else if (typeof d.zoneEnd === "string")
                        m.zoneEnd = parseInt(d.zoneEnd, 10);
                    else if (typeof d.zoneEnd === "number")
                        m.zoneEnd = d.zoneEnd;
                    else if (typeof d.zoneEnd === "object")
                        m.zoneEnd = new $util.LongBits(d.zoneEnd.low >>> 0, d.zoneEnd.high >>> 0).toNumber(true);
                }
                if (d.sync != null) {
                    m.sync = d.sync >>> 0;
                }
                if (d.status != null) {
                    m.status = d.status | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MmCompactionEndFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmCompactionEndFtraceEvent
             * @static
             * @param {perfetto.protos.MmCompactionEndFtraceEvent} m MmCompactionEndFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmCompactionEndFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.zoneStart = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.zoneStart = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.migratePfn = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.migratePfn = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.freePfn = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.freePfn = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.zoneEnd = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.zoneEnd = o.longs === String ? "0" : 0;
                    d.sync = 0;
                    d.status = 0;
                }
                if (m.zoneStart != null && m.hasOwnProperty("zoneStart")) {
                    if (typeof m.zoneStart === "number")
                        d.zoneStart = o.longs === String ? String(m.zoneStart) : m.zoneStart;
                    else
                        d.zoneStart = o.longs === String ? $util.Long.prototype.toString.call(m.zoneStart) : o.longs === Number ? new $util.LongBits(m.zoneStart.low >>> 0, m.zoneStart.high >>> 0).toNumber(true) : m.zoneStart;
                }
                if (m.migratePfn != null && m.hasOwnProperty("migratePfn")) {
                    if (typeof m.migratePfn === "number")
                        d.migratePfn = o.longs === String ? String(m.migratePfn) : m.migratePfn;
                    else
                        d.migratePfn = o.longs === String ? $util.Long.prototype.toString.call(m.migratePfn) : o.longs === Number ? new $util.LongBits(m.migratePfn.low >>> 0, m.migratePfn.high >>> 0).toNumber(true) : m.migratePfn;
                }
                if (m.freePfn != null && m.hasOwnProperty("freePfn")) {
                    if (typeof m.freePfn === "number")
                        d.freePfn = o.longs === String ? String(m.freePfn) : m.freePfn;
                    else
                        d.freePfn = o.longs === String ? $util.Long.prototype.toString.call(m.freePfn) : o.longs === Number ? new $util.LongBits(m.freePfn.low >>> 0, m.freePfn.high >>> 0).toNumber(true) : m.freePfn;
                }
                if (m.zoneEnd != null && m.hasOwnProperty("zoneEnd")) {
                    if (typeof m.zoneEnd === "number")
                        d.zoneEnd = o.longs === String ? String(m.zoneEnd) : m.zoneEnd;
                    else
                        d.zoneEnd = o.longs === String ? $util.Long.prototype.toString.call(m.zoneEnd) : o.longs === Number ? new $util.LongBits(m.zoneEnd.low >>> 0, m.zoneEnd.high >>> 0).toNumber(true) : m.zoneEnd;
                }
                if (m.sync != null && m.hasOwnProperty("sync")) {
                    d.sync = m.sync;
                }
                if (m.status != null && m.hasOwnProperty("status")) {
                    d.status = m.status;
                }
                return d;
            };

            /**
             * Converts this MmCompactionEndFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmCompactionEndFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmCompactionEndFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmCompactionEndFtraceEvent;
        })();

        protos.MmCompactionFinishedFtraceEvent = (function() {

            /**
             * Properties of a MmCompactionFinishedFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmCompactionFinishedFtraceEvent
             * @property {number|null} [nid] MmCompactionFinishedFtraceEvent nid
             * @property {number|null} [idx] MmCompactionFinishedFtraceEvent idx
             * @property {number|null} [order] MmCompactionFinishedFtraceEvent order
             * @property {number|null} [ret] MmCompactionFinishedFtraceEvent ret
             */

            /**
             * Constructs a new MmCompactionFinishedFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmCompactionFinishedFtraceEvent.
             * @implements IMmCompactionFinishedFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmCompactionFinishedFtraceEvent=} [p] Properties to set
             */
            function MmCompactionFinishedFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmCompactionFinishedFtraceEvent nid.
             * @member {number} nid
             * @memberof perfetto.protos.MmCompactionFinishedFtraceEvent
             * @instance
             */
            MmCompactionFinishedFtraceEvent.prototype.nid = 0;

            /**
             * MmCompactionFinishedFtraceEvent idx.
             * @member {number} idx
             * @memberof perfetto.protos.MmCompactionFinishedFtraceEvent
             * @instance
             */
            MmCompactionFinishedFtraceEvent.prototype.idx = 0;

            /**
             * MmCompactionFinishedFtraceEvent order.
             * @member {number} order
             * @memberof perfetto.protos.MmCompactionFinishedFtraceEvent
             * @instance
             */
            MmCompactionFinishedFtraceEvent.prototype.order = 0;

            /**
             * MmCompactionFinishedFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.MmCompactionFinishedFtraceEvent
             * @instance
             */
            MmCompactionFinishedFtraceEvent.prototype.ret = 0;

            /**
             * Creates a new MmCompactionFinishedFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmCompactionFinishedFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionFinishedFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmCompactionFinishedFtraceEvent} MmCompactionFinishedFtraceEvent instance
             */
            MmCompactionFinishedFtraceEvent.create = function create(properties) {
                return new MmCompactionFinishedFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmCompactionFinishedFtraceEvent message. Does not implicitly {@link perfetto.protos.MmCompactionFinishedFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmCompactionFinishedFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionFinishedFtraceEvent} m MmCompactionFinishedFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionFinishedFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.nid != null && Object.hasOwnProperty.call(m, "nid"))
                    w.uint32(8).int32(m.nid);
                if (m.idx != null && Object.hasOwnProperty.call(m, "idx"))
                    w.uint32(16).uint32(m.idx);
                if (m.order != null && Object.hasOwnProperty.call(m, "order"))
                    w.uint32(24).int32(m.order);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(32).int32(m.ret);
                return w;
            };

            /**
             * Encodes the specified MmCompactionFinishedFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmCompactionFinishedFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmCompactionFinishedFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionFinishedFtraceEvent} message MmCompactionFinishedFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionFinishedFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmCompactionFinishedFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmCompactionFinishedFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmCompactionFinishedFtraceEvent} MmCompactionFinishedFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionFinishedFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmCompactionFinishedFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.nid = r.int32();
                        break;
                    case 2:
                        m.idx = r.uint32();
                        break;
                    case 3:
                        m.order = r.int32();
                        break;
                    case 4:
                        m.ret = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmCompactionFinishedFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmCompactionFinishedFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmCompactionFinishedFtraceEvent} MmCompactionFinishedFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionFinishedFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmCompactionFinishedFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmCompactionFinishedFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmCompactionFinishedFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    if (!$util.isInteger(m.nid))
                        return "nid: integer expected";
                }
                if (m.idx != null && m.hasOwnProperty("idx")) {
                    if (!$util.isInteger(m.idx))
                        return "idx: integer expected";
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    if (!$util.isInteger(m.order))
                        return "order: integer expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                return null;
            };

            /**
             * Creates a MmCompactionFinishedFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmCompactionFinishedFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmCompactionFinishedFtraceEvent} MmCompactionFinishedFtraceEvent
             */
            MmCompactionFinishedFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmCompactionFinishedFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmCompactionFinishedFtraceEvent();
                if (d.nid != null) {
                    m.nid = d.nid | 0;
                }
                if (d.idx != null) {
                    m.idx = d.idx >>> 0;
                }
                if (d.order != null) {
                    m.order = d.order | 0;
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MmCompactionFinishedFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmCompactionFinishedFtraceEvent
             * @static
             * @param {perfetto.protos.MmCompactionFinishedFtraceEvent} m MmCompactionFinishedFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmCompactionFinishedFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.nid = 0;
                    d.idx = 0;
                    d.order = 0;
                    d.ret = 0;
                }
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    d.nid = m.nid;
                }
                if (m.idx != null && m.hasOwnProperty("idx")) {
                    d.idx = m.idx;
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    d.order = m.order;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                return d;
            };

            /**
             * Converts this MmCompactionFinishedFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmCompactionFinishedFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmCompactionFinishedFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmCompactionFinishedFtraceEvent;
        })();

        protos.MmCompactionIsolateFreepagesFtraceEvent = (function() {

            /**
             * Properties of a MmCompactionIsolateFreepagesFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmCompactionIsolateFreepagesFtraceEvent
             * @property {number|null} [startPfn] MmCompactionIsolateFreepagesFtraceEvent startPfn
             * @property {number|null} [endPfn] MmCompactionIsolateFreepagesFtraceEvent endPfn
             * @property {number|null} [nrScanned] MmCompactionIsolateFreepagesFtraceEvent nrScanned
             * @property {number|null} [nrTaken] MmCompactionIsolateFreepagesFtraceEvent nrTaken
             */

            /**
             * Constructs a new MmCompactionIsolateFreepagesFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmCompactionIsolateFreepagesFtraceEvent.
             * @implements IMmCompactionIsolateFreepagesFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmCompactionIsolateFreepagesFtraceEvent=} [p] Properties to set
             */
            function MmCompactionIsolateFreepagesFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmCompactionIsolateFreepagesFtraceEvent startPfn.
             * @member {number} startPfn
             * @memberof perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent
             * @instance
             */
            MmCompactionIsolateFreepagesFtraceEvent.prototype.startPfn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmCompactionIsolateFreepagesFtraceEvent endPfn.
             * @member {number} endPfn
             * @memberof perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent
             * @instance
             */
            MmCompactionIsolateFreepagesFtraceEvent.prototype.endPfn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmCompactionIsolateFreepagesFtraceEvent nrScanned.
             * @member {number} nrScanned
             * @memberof perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent
             * @instance
             */
            MmCompactionIsolateFreepagesFtraceEvent.prototype.nrScanned = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmCompactionIsolateFreepagesFtraceEvent nrTaken.
             * @member {number} nrTaken
             * @memberof perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent
             * @instance
             */
            MmCompactionIsolateFreepagesFtraceEvent.prototype.nrTaken = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new MmCompactionIsolateFreepagesFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionIsolateFreepagesFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent} MmCompactionIsolateFreepagesFtraceEvent instance
             */
            MmCompactionIsolateFreepagesFtraceEvent.create = function create(properties) {
                return new MmCompactionIsolateFreepagesFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmCompactionIsolateFreepagesFtraceEvent message. Does not implicitly {@link perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionIsolateFreepagesFtraceEvent} m MmCompactionIsolateFreepagesFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionIsolateFreepagesFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.startPfn != null && Object.hasOwnProperty.call(m, "startPfn"))
                    w.uint32(8).uint64(m.startPfn);
                if (m.endPfn != null && Object.hasOwnProperty.call(m, "endPfn"))
                    w.uint32(16).uint64(m.endPfn);
                if (m.nrScanned != null && Object.hasOwnProperty.call(m, "nrScanned"))
                    w.uint32(24).uint64(m.nrScanned);
                if (m.nrTaken != null && Object.hasOwnProperty.call(m, "nrTaken"))
                    w.uint32(32).uint64(m.nrTaken);
                return w;
            };

            /**
             * Encodes the specified MmCompactionIsolateFreepagesFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionIsolateFreepagesFtraceEvent} message MmCompactionIsolateFreepagesFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionIsolateFreepagesFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmCompactionIsolateFreepagesFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent} MmCompactionIsolateFreepagesFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionIsolateFreepagesFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.startPfn = r.uint64();
                        break;
                    case 2:
                        m.endPfn = r.uint64();
                        break;
                    case 3:
                        m.nrScanned = r.uint64();
                        break;
                    case 4:
                        m.nrTaken = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmCompactionIsolateFreepagesFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent} MmCompactionIsolateFreepagesFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionIsolateFreepagesFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmCompactionIsolateFreepagesFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmCompactionIsolateFreepagesFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.startPfn != null && m.hasOwnProperty("startPfn")) {
                    if (!$util.isInteger(m.startPfn) && !(m.startPfn && $util.isInteger(m.startPfn.low) && $util.isInteger(m.startPfn.high)))
                        return "startPfn: integer|Long expected";
                }
                if (m.endPfn != null && m.hasOwnProperty("endPfn")) {
                    if (!$util.isInteger(m.endPfn) && !(m.endPfn && $util.isInteger(m.endPfn.low) && $util.isInteger(m.endPfn.high)))
                        return "endPfn: integer|Long expected";
                }
                if (m.nrScanned != null && m.hasOwnProperty("nrScanned")) {
                    if (!$util.isInteger(m.nrScanned) && !(m.nrScanned && $util.isInteger(m.nrScanned.low) && $util.isInteger(m.nrScanned.high)))
                        return "nrScanned: integer|Long expected";
                }
                if (m.nrTaken != null && m.hasOwnProperty("nrTaken")) {
                    if (!$util.isInteger(m.nrTaken) && !(m.nrTaken && $util.isInteger(m.nrTaken.low) && $util.isInteger(m.nrTaken.high)))
                        return "nrTaken: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a MmCompactionIsolateFreepagesFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent} MmCompactionIsolateFreepagesFtraceEvent
             */
            MmCompactionIsolateFreepagesFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent();
                if (d.startPfn != null) {
                    if ($util.Long)
                        (m.startPfn = $util.Long.fromValue(d.startPfn)).unsigned = true;
                    else if (typeof d.startPfn === "string")
                        m.startPfn = parseInt(d.startPfn, 10);
                    else if (typeof d.startPfn === "number")
                        m.startPfn = d.startPfn;
                    else if (typeof d.startPfn === "object")
                        m.startPfn = new $util.LongBits(d.startPfn.low >>> 0, d.startPfn.high >>> 0).toNumber(true);
                }
                if (d.endPfn != null) {
                    if ($util.Long)
                        (m.endPfn = $util.Long.fromValue(d.endPfn)).unsigned = true;
                    else if (typeof d.endPfn === "string")
                        m.endPfn = parseInt(d.endPfn, 10);
                    else if (typeof d.endPfn === "number")
                        m.endPfn = d.endPfn;
                    else if (typeof d.endPfn === "object")
                        m.endPfn = new $util.LongBits(d.endPfn.low >>> 0, d.endPfn.high >>> 0).toNumber(true);
                }
                if (d.nrScanned != null) {
                    if ($util.Long)
                        (m.nrScanned = $util.Long.fromValue(d.nrScanned)).unsigned = true;
                    else if (typeof d.nrScanned === "string")
                        m.nrScanned = parseInt(d.nrScanned, 10);
                    else if (typeof d.nrScanned === "number")
                        m.nrScanned = d.nrScanned;
                    else if (typeof d.nrScanned === "object")
                        m.nrScanned = new $util.LongBits(d.nrScanned.low >>> 0, d.nrScanned.high >>> 0).toNumber(true);
                }
                if (d.nrTaken != null) {
                    if ($util.Long)
                        (m.nrTaken = $util.Long.fromValue(d.nrTaken)).unsigned = true;
                    else if (typeof d.nrTaken === "string")
                        m.nrTaken = parseInt(d.nrTaken, 10);
                    else if (typeof d.nrTaken === "number")
                        m.nrTaken = d.nrTaken;
                    else if (typeof d.nrTaken === "object")
                        m.nrTaken = new $util.LongBits(d.nrTaken.low >>> 0, d.nrTaken.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a MmCompactionIsolateFreepagesFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent
             * @static
             * @param {perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent} m MmCompactionIsolateFreepagesFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmCompactionIsolateFreepagesFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.startPfn = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.startPfn = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.endPfn = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.endPfn = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.nrScanned = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.nrScanned = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.nrTaken = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.nrTaken = o.longs === String ? "0" : 0;
                }
                if (m.startPfn != null && m.hasOwnProperty("startPfn")) {
                    if (typeof m.startPfn === "number")
                        d.startPfn = o.longs === String ? String(m.startPfn) : m.startPfn;
                    else
                        d.startPfn = o.longs === String ? $util.Long.prototype.toString.call(m.startPfn) : o.longs === Number ? new $util.LongBits(m.startPfn.low >>> 0, m.startPfn.high >>> 0).toNumber(true) : m.startPfn;
                }
                if (m.endPfn != null && m.hasOwnProperty("endPfn")) {
                    if (typeof m.endPfn === "number")
                        d.endPfn = o.longs === String ? String(m.endPfn) : m.endPfn;
                    else
                        d.endPfn = o.longs === String ? $util.Long.prototype.toString.call(m.endPfn) : o.longs === Number ? new $util.LongBits(m.endPfn.low >>> 0, m.endPfn.high >>> 0).toNumber(true) : m.endPfn;
                }
                if (m.nrScanned != null && m.hasOwnProperty("nrScanned")) {
                    if (typeof m.nrScanned === "number")
                        d.nrScanned = o.longs === String ? String(m.nrScanned) : m.nrScanned;
                    else
                        d.nrScanned = o.longs === String ? $util.Long.prototype.toString.call(m.nrScanned) : o.longs === Number ? new $util.LongBits(m.nrScanned.low >>> 0, m.nrScanned.high >>> 0).toNumber(true) : m.nrScanned;
                }
                if (m.nrTaken != null && m.hasOwnProperty("nrTaken")) {
                    if (typeof m.nrTaken === "number")
                        d.nrTaken = o.longs === String ? String(m.nrTaken) : m.nrTaken;
                    else
                        d.nrTaken = o.longs === String ? $util.Long.prototype.toString.call(m.nrTaken) : o.longs === Number ? new $util.LongBits(m.nrTaken.low >>> 0, m.nrTaken.high >>> 0).toNumber(true) : m.nrTaken;
                }
                return d;
            };

            /**
             * Converts this MmCompactionIsolateFreepagesFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmCompactionIsolateFreepagesFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmCompactionIsolateFreepagesFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmCompactionIsolateFreepagesFtraceEvent;
        })();

        protos.MmCompactionIsolateMigratepagesFtraceEvent = (function() {

            /**
             * Properties of a MmCompactionIsolateMigratepagesFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmCompactionIsolateMigratepagesFtraceEvent
             * @property {number|null} [startPfn] MmCompactionIsolateMigratepagesFtraceEvent startPfn
             * @property {number|null} [endPfn] MmCompactionIsolateMigratepagesFtraceEvent endPfn
             * @property {number|null} [nrScanned] MmCompactionIsolateMigratepagesFtraceEvent nrScanned
             * @property {number|null} [nrTaken] MmCompactionIsolateMigratepagesFtraceEvent nrTaken
             */

            /**
             * Constructs a new MmCompactionIsolateMigratepagesFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmCompactionIsolateMigratepagesFtraceEvent.
             * @implements IMmCompactionIsolateMigratepagesFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmCompactionIsolateMigratepagesFtraceEvent=} [p] Properties to set
             */
            function MmCompactionIsolateMigratepagesFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmCompactionIsolateMigratepagesFtraceEvent startPfn.
             * @member {number} startPfn
             * @memberof perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent
             * @instance
             */
            MmCompactionIsolateMigratepagesFtraceEvent.prototype.startPfn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmCompactionIsolateMigratepagesFtraceEvent endPfn.
             * @member {number} endPfn
             * @memberof perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent
             * @instance
             */
            MmCompactionIsolateMigratepagesFtraceEvent.prototype.endPfn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmCompactionIsolateMigratepagesFtraceEvent nrScanned.
             * @member {number} nrScanned
             * @memberof perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent
             * @instance
             */
            MmCompactionIsolateMigratepagesFtraceEvent.prototype.nrScanned = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmCompactionIsolateMigratepagesFtraceEvent nrTaken.
             * @member {number} nrTaken
             * @memberof perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent
             * @instance
             */
            MmCompactionIsolateMigratepagesFtraceEvent.prototype.nrTaken = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new MmCompactionIsolateMigratepagesFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionIsolateMigratepagesFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent} MmCompactionIsolateMigratepagesFtraceEvent instance
             */
            MmCompactionIsolateMigratepagesFtraceEvent.create = function create(properties) {
                return new MmCompactionIsolateMigratepagesFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmCompactionIsolateMigratepagesFtraceEvent message. Does not implicitly {@link perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionIsolateMigratepagesFtraceEvent} m MmCompactionIsolateMigratepagesFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionIsolateMigratepagesFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.startPfn != null && Object.hasOwnProperty.call(m, "startPfn"))
                    w.uint32(8).uint64(m.startPfn);
                if (m.endPfn != null && Object.hasOwnProperty.call(m, "endPfn"))
                    w.uint32(16).uint64(m.endPfn);
                if (m.nrScanned != null && Object.hasOwnProperty.call(m, "nrScanned"))
                    w.uint32(24).uint64(m.nrScanned);
                if (m.nrTaken != null && Object.hasOwnProperty.call(m, "nrTaken"))
                    w.uint32(32).uint64(m.nrTaken);
                return w;
            };

            /**
             * Encodes the specified MmCompactionIsolateMigratepagesFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionIsolateMigratepagesFtraceEvent} message MmCompactionIsolateMigratepagesFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionIsolateMigratepagesFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmCompactionIsolateMigratepagesFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent} MmCompactionIsolateMigratepagesFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionIsolateMigratepagesFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.startPfn = r.uint64();
                        break;
                    case 2:
                        m.endPfn = r.uint64();
                        break;
                    case 3:
                        m.nrScanned = r.uint64();
                        break;
                    case 4:
                        m.nrTaken = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmCompactionIsolateMigratepagesFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent} MmCompactionIsolateMigratepagesFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionIsolateMigratepagesFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmCompactionIsolateMigratepagesFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmCompactionIsolateMigratepagesFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.startPfn != null && m.hasOwnProperty("startPfn")) {
                    if (!$util.isInteger(m.startPfn) && !(m.startPfn && $util.isInteger(m.startPfn.low) && $util.isInteger(m.startPfn.high)))
                        return "startPfn: integer|Long expected";
                }
                if (m.endPfn != null && m.hasOwnProperty("endPfn")) {
                    if (!$util.isInteger(m.endPfn) && !(m.endPfn && $util.isInteger(m.endPfn.low) && $util.isInteger(m.endPfn.high)))
                        return "endPfn: integer|Long expected";
                }
                if (m.nrScanned != null && m.hasOwnProperty("nrScanned")) {
                    if (!$util.isInteger(m.nrScanned) && !(m.nrScanned && $util.isInteger(m.nrScanned.low) && $util.isInteger(m.nrScanned.high)))
                        return "nrScanned: integer|Long expected";
                }
                if (m.nrTaken != null && m.hasOwnProperty("nrTaken")) {
                    if (!$util.isInteger(m.nrTaken) && !(m.nrTaken && $util.isInteger(m.nrTaken.low) && $util.isInteger(m.nrTaken.high)))
                        return "nrTaken: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a MmCompactionIsolateMigratepagesFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent} MmCompactionIsolateMigratepagesFtraceEvent
             */
            MmCompactionIsolateMigratepagesFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent();
                if (d.startPfn != null) {
                    if ($util.Long)
                        (m.startPfn = $util.Long.fromValue(d.startPfn)).unsigned = true;
                    else if (typeof d.startPfn === "string")
                        m.startPfn = parseInt(d.startPfn, 10);
                    else if (typeof d.startPfn === "number")
                        m.startPfn = d.startPfn;
                    else if (typeof d.startPfn === "object")
                        m.startPfn = new $util.LongBits(d.startPfn.low >>> 0, d.startPfn.high >>> 0).toNumber(true);
                }
                if (d.endPfn != null) {
                    if ($util.Long)
                        (m.endPfn = $util.Long.fromValue(d.endPfn)).unsigned = true;
                    else if (typeof d.endPfn === "string")
                        m.endPfn = parseInt(d.endPfn, 10);
                    else if (typeof d.endPfn === "number")
                        m.endPfn = d.endPfn;
                    else if (typeof d.endPfn === "object")
                        m.endPfn = new $util.LongBits(d.endPfn.low >>> 0, d.endPfn.high >>> 0).toNumber(true);
                }
                if (d.nrScanned != null) {
                    if ($util.Long)
                        (m.nrScanned = $util.Long.fromValue(d.nrScanned)).unsigned = true;
                    else if (typeof d.nrScanned === "string")
                        m.nrScanned = parseInt(d.nrScanned, 10);
                    else if (typeof d.nrScanned === "number")
                        m.nrScanned = d.nrScanned;
                    else if (typeof d.nrScanned === "object")
                        m.nrScanned = new $util.LongBits(d.nrScanned.low >>> 0, d.nrScanned.high >>> 0).toNumber(true);
                }
                if (d.nrTaken != null) {
                    if ($util.Long)
                        (m.nrTaken = $util.Long.fromValue(d.nrTaken)).unsigned = true;
                    else if (typeof d.nrTaken === "string")
                        m.nrTaken = parseInt(d.nrTaken, 10);
                    else if (typeof d.nrTaken === "number")
                        m.nrTaken = d.nrTaken;
                    else if (typeof d.nrTaken === "object")
                        m.nrTaken = new $util.LongBits(d.nrTaken.low >>> 0, d.nrTaken.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a MmCompactionIsolateMigratepagesFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent
             * @static
             * @param {perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent} m MmCompactionIsolateMigratepagesFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmCompactionIsolateMigratepagesFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.startPfn = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.startPfn = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.endPfn = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.endPfn = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.nrScanned = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.nrScanned = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.nrTaken = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.nrTaken = o.longs === String ? "0" : 0;
                }
                if (m.startPfn != null && m.hasOwnProperty("startPfn")) {
                    if (typeof m.startPfn === "number")
                        d.startPfn = o.longs === String ? String(m.startPfn) : m.startPfn;
                    else
                        d.startPfn = o.longs === String ? $util.Long.prototype.toString.call(m.startPfn) : o.longs === Number ? new $util.LongBits(m.startPfn.low >>> 0, m.startPfn.high >>> 0).toNumber(true) : m.startPfn;
                }
                if (m.endPfn != null && m.hasOwnProperty("endPfn")) {
                    if (typeof m.endPfn === "number")
                        d.endPfn = o.longs === String ? String(m.endPfn) : m.endPfn;
                    else
                        d.endPfn = o.longs === String ? $util.Long.prototype.toString.call(m.endPfn) : o.longs === Number ? new $util.LongBits(m.endPfn.low >>> 0, m.endPfn.high >>> 0).toNumber(true) : m.endPfn;
                }
                if (m.nrScanned != null && m.hasOwnProperty("nrScanned")) {
                    if (typeof m.nrScanned === "number")
                        d.nrScanned = o.longs === String ? String(m.nrScanned) : m.nrScanned;
                    else
                        d.nrScanned = o.longs === String ? $util.Long.prototype.toString.call(m.nrScanned) : o.longs === Number ? new $util.LongBits(m.nrScanned.low >>> 0, m.nrScanned.high >>> 0).toNumber(true) : m.nrScanned;
                }
                if (m.nrTaken != null && m.hasOwnProperty("nrTaken")) {
                    if (typeof m.nrTaken === "number")
                        d.nrTaken = o.longs === String ? String(m.nrTaken) : m.nrTaken;
                    else
                        d.nrTaken = o.longs === String ? $util.Long.prototype.toString.call(m.nrTaken) : o.longs === Number ? new $util.LongBits(m.nrTaken.low >>> 0, m.nrTaken.high >>> 0).toNumber(true) : m.nrTaken;
                }
                return d;
            };

            /**
             * Converts this MmCompactionIsolateMigratepagesFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmCompactionIsolateMigratepagesFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmCompactionIsolateMigratepagesFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmCompactionIsolateMigratepagesFtraceEvent;
        })();

        protos.MmCompactionKcompactdSleepFtraceEvent = (function() {

            /**
             * Properties of a MmCompactionKcompactdSleepFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmCompactionKcompactdSleepFtraceEvent
             * @property {number|null} [nid] MmCompactionKcompactdSleepFtraceEvent nid
             */

            /**
             * Constructs a new MmCompactionKcompactdSleepFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmCompactionKcompactdSleepFtraceEvent.
             * @implements IMmCompactionKcompactdSleepFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmCompactionKcompactdSleepFtraceEvent=} [p] Properties to set
             */
            function MmCompactionKcompactdSleepFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmCompactionKcompactdSleepFtraceEvent nid.
             * @member {number} nid
             * @memberof perfetto.protos.MmCompactionKcompactdSleepFtraceEvent
             * @instance
             */
            MmCompactionKcompactdSleepFtraceEvent.prototype.nid = 0;

            /**
             * Creates a new MmCompactionKcompactdSleepFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmCompactionKcompactdSleepFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionKcompactdSleepFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmCompactionKcompactdSleepFtraceEvent} MmCompactionKcompactdSleepFtraceEvent instance
             */
            MmCompactionKcompactdSleepFtraceEvent.create = function create(properties) {
                return new MmCompactionKcompactdSleepFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmCompactionKcompactdSleepFtraceEvent message. Does not implicitly {@link perfetto.protos.MmCompactionKcompactdSleepFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmCompactionKcompactdSleepFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionKcompactdSleepFtraceEvent} m MmCompactionKcompactdSleepFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionKcompactdSleepFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.nid != null && Object.hasOwnProperty.call(m, "nid"))
                    w.uint32(8).int32(m.nid);
                return w;
            };

            /**
             * Encodes the specified MmCompactionKcompactdSleepFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmCompactionKcompactdSleepFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmCompactionKcompactdSleepFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionKcompactdSleepFtraceEvent} message MmCompactionKcompactdSleepFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionKcompactdSleepFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmCompactionKcompactdSleepFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmCompactionKcompactdSleepFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmCompactionKcompactdSleepFtraceEvent} MmCompactionKcompactdSleepFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionKcompactdSleepFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmCompactionKcompactdSleepFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.nid = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmCompactionKcompactdSleepFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmCompactionKcompactdSleepFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmCompactionKcompactdSleepFtraceEvent} MmCompactionKcompactdSleepFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionKcompactdSleepFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmCompactionKcompactdSleepFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmCompactionKcompactdSleepFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmCompactionKcompactdSleepFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    if (!$util.isInteger(m.nid))
                        return "nid: integer expected";
                }
                return null;
            };

            /**
             * Creates a MmCompactionKcompactdSleepFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmCompactionKcompactdSleepFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmCompactionKcompactdSleepFtraceEvent} MmCompactionKcompactdSleepFtraceEvent
             */
            MmCompactionKcompactdSleepFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmCompactionKcompactdSleepFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmCompactionKcompactdSleepFtraceEvent();
                if (d.nid != null) {
                    m.nid = d.nid | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MmCompactionKcompactdSleepFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmCompactionKcompactdSleepFtraceEvent
             * @static
             * @param {perfetto.protos.MmCompactionKcompactdSleepFtraceEvent} m MmCompactionKcompactdSleepFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmCompactionKcompactdSleepFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.nid = 0;
                }
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    d.nid = m.nid;
                }
                return d;
            };

            /**
             * Converts this MmCompactionKcompactdSleepFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmCompactionKcompactdSleepFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmCompactionKcompactdSleepFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmCompactionKcompactdSleepFtraceEvent;
        })();

        protos.MmCompactionKcompactdWakeFtraceEvent = (function() {

            /**
             * Properties of a MmCompactionKcompactdWakeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmCompactionKcompactdWakeFtraceEvent
             * @property {number|null} [nid] MmCompactionKcompactdWakeFtraceEvent nid
             * @property {number|null} [order] MmCompactionKcompactdWakeFtraceEvent order
             * @property {number|null} [classzoneIdx] MmCompactionKcompactdWakeFtraceEvent classzoneIdx
             * @property {number|null} [highestZoneidx] MmCompactionKcompactdWakeFtraceEvent highestZoneidx
             */

            /**
             * Constructs a new MmCompactionKcompactdWakeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmCompactionKcompactdWakeFtraceEvent.
             * @implements IMmCompactionKcompactdWakeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmCompactionKcompactdWakeFtraceEvent=} [p] Properties to set
             */
            function MmCompactionKcompactdWakeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmCompactionKcompactdWakeFtraceEvent nid.
             * @member {number} nid
             * @memberof perfetto.protos.MmCompactionKcompactdWakeFtraceEvent
             * @instance
             */
            MmCompactionKcompactdWakeFtraceEvent.prototype.nid = 0;

            /**
             * MmCompactionKcompactdWakeFtraceEvent order.
             * @member {number} order
             * @memberof perfetto.protos.MmCompactionKcompactdWakeFtraceEvent
             * @instance
             */
            MmCompactionKcompactdWakeFtraceEvent.prototype.order = 0;

            /**
             * MmCompactionKcompactdWakeFtraceEvent classzoneIdx.
             * @member {number} classzoneIdx
             * @memberof perfetto.protos.MmCompactionKcompactdWakeFtraceEvent
             * @instance
             */
            MmCompactionKcompactdWakeFtraceEvent.prototype.classzoneIdx = 0;

            /**
             * MmCompactionKcompactdWakeFtraceEvent highestZoneidx.
             * @member {number} highestZoneidx
             * @memberof perfetto.protos.MmCompactionKcompactdWakeFtraceEvent
             * @instance
             */
            MmCompactionKcompactdWakeFtraceEvent.prototype.highestZoneidx = 0;

            /**
             * Creates a new MmCompactionKcompactdWakeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmCompactionKcompactdWakeFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionKcompactdWakeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmCompactionKcompactdWakeFtraceEvent} MmCompactionKcompactdWakeFtraceEvent instance
             */
            MmCompactionKcompactdWakeFtraceEvent.create = function create(properties) {
                return new MmCompactionKcompactdWakeFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmCompactionKcompactdWakeFtraceEvent message. Does not implicitly {@link perfetto.protos.MmCompactionKcompactdWakeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmCompactionKcompactdWakeFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionKcompactdWakeFtraceEvent} m MmCompactionKcompactdWakeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionKcompactdWakeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.nid != null && Object.hasOwnProperty.call(m, "nid"))
                    w.uint32(8).int32(m.nid);
                if (m.order != null && Object.hasOwnProperty.call(m, "order"))
                    w.uint32(16).int32(m.order);
                if (m.classzoneIdx != null && Object.hasOwnProperty.call(m, "classzoneIdx"))
                    w.uint32(24).uint32(m.classzoneIdx);
                if (m.highestZoneidx != null && Object.hasOwnProperty.call(m, "highestZoneidx"))
                    w.uint32(32).uint32(m.highestZoneidx);
                return w;
            };

            /**
             * Encodes the specified MmCompactionKcompactdWakeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmCompactionKcompactdWakeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmCompactionKcompactdWakeFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionKcompactdWakeFtraceEvent} message MmCompactionKcompactdWakeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionKcompactdWakeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmCompactionKcompactdWakeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmCompactionKcompactdWakeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmCompactionKcompactdWakeFtraceEvent} MmCompactionKcompactdWakeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionKcompactdWakeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmCompactionKcompactdWakeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.nid = r.int32();
                        break;
                    case 2:
                        m.order = r.int32();
                        break;
                    case 3:
                        m.classzoneIdx = r.uint32();
                        break;
                    case 4:
                        m.highestZoneidx = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmCompactionKcompactdWakeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmCompactionKcompactdWakeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmCompactionKcompactdWakeFtraceEvent} MmCompactionKcompactdWakeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionKcompactdWakeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmCompactionKcompactdWakeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmCompactionKcompactdWakeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmCompactionKcompactdWakeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    if (!$util.isInteger(m.nid))
                        return "nid: integer expected";
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    if (!$util.isInteger(m.order))
                        return "order: integer expected";
                }
                if (m.classzoneIdx != null && m.hasOwnProperty("classzoneIdx")) {
                    if (!$util.isInteger(m.classzoneIdx))
                        return "classzoneIdx: integer expected";
                }
                if (m.highestZoneidx != null && m.hasOwnProperty("highestZoneidx")) {
                    if (!$util.isInteger(m.highestZoneidx))
                        return "highestZoneidx: integer expected";
                }
                return null;
            };

            /**
             * Creates a MmCompactionKcompactdWakeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmCompactionKcompactdWakeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmCompactionKcompactdWakeFtraceEvent} MmCompactionKcompactdWakeFtraceEvent
             */
            MmCompactionKcompactdWakeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmCompactionKcompactdWakeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmCompactionKcompactdWakeFtraceEvent();
                if (d.nid != null) {
                    m.nid = d.nid | 0;
                }
                if (d.order != null) {
                    m.order = d.order | 0;
                }
                if (d.classzoneIdx != null) {
                    m.classzoneIdx = d.classzoneIdx >>> 0;
                }
                if (d.highestZoneidx != null) {
                    m.highestZoneidx = d.highestZoneidx >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MmCompactionKcompactdWakeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmCompactionKcompactdWakeFtraceEvent
             * @static
             * @param {perfetto.protos.MmCompactionKcompactdWakeFtraceEvent} m MmCompactionKcompactdWakeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmCompactionKcompactdWakeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.nid = 0;
                    d.order = 0;
                    d.classzoneIdx = 0;
                    d.highestZoneidx = 0;
                }
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    d.nid = m.nid;
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    d.order = m.order;
                }
                if (m.classzoneIdx != null && m.hasOwnProperty("classzoneIdx")) {
                    d.classzoneIdx = m.classzoneIdx;
                }
                if (m.highestZoneidx != null && m.hasOwnProperty("highestZoneidx")) {
                    d.highestZoneidx = m.highestZoneidx;
                }
                return d;
            };

            /**
             * Converts this MmCompactionKcompactdWakeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmCompactionKcompactdWakeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmCompactionKcompactdWakeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmCompactionKcompactdWakeFtraceEvent;
        })();

        protos.MmCompactionMigratepagesFtraceEvent = (function() {

            /**
             * Properties of a MmCompactionMigratepagesFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmCompactionMigratepagesFtraceEvent
             * @property {number|null} [nrMigrated] MmCompactionMigratepagesFtraceEvent nrMigrated
             * @property {number|null} [nrFailed] MmCompactionMigratepagesFtraceEvent nrFailed
             */

            /**
             * Constructs a new MmCompactionMigratepagesFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmCompactionMigratepagesFtraceEvent.
             * @implements IMmCompactionMigratepagesFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmCompactionMigratepagesFtraceEvent=} [p] Properties to set
             */
            function MmCompactionMigratepagesFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmCompactionMigratepagesFtraceEvent nrMigrated.
             * @member {number} nrMigrated
             * @memberof perfetto.protos.MmCompactionMigratepagesFtraceEvent
             * @instance
             */
            MmCompactionMigratepagesFtraceEvent.prototype.nrMigrated = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmCompactionMigratepagesFtraceEvent nrFailed.
             * @member {number} nrFailed
             * @memberof perfetto.protos.MmCompactionMigratepagesFtraceEvent
             * @instance
             */
            MmCompactionMigratepagesFtraceEvent.prototype.nrFailed = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new MmCompactionMigratepagesFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmCompactionMigratepagesFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionMigratepagesFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmCompactionMigratepagesFtraceEvent} MmCompactionMigratepagesFtraceEvent instance
             */
            MmCompactionMigratepagesFtraceEvent.create = function create(properties) {
                return new MmCompactionMigratepagesFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmCompactionMigratepagesFtraceEvent message. Does not implicitly {@link perfetto.protos.MmCompactionMigratepagesFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmCompactionMigratepagesFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionMigratepagesFtraceEvent} m MmCompactionMigratepagesFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionMigratepagesFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.nrMigrated != null && Object.hasOwnProperty.call(m, "nrMigrated"))
                    w.uint32(8).uint64(m.nrMigrated);
                if (m.nrFailed != null && Object.hasOwnProperty.call(m, "nrFailed"))
                    w.uint32(16).uint64(m.nrFailed);
                return w;
            };

            /**
             * Encodes the specified MmCompactionMigratepagesFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmCompactionMigratepagesFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmCompactionMigratepagesFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionMigratepagesFtraceEvent} message MmCompactionMigratepagesFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionMigratepagesFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmCompactionMigratepagesFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmCompactionMigratepagesFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmCompactionMigratepagesFtraceEvent} MmCompactionMigratepagesFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionMigratepagesFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmCompactionMigratepagesFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.nrMigrated = r.uint64();
                        break;
                    case 2:
                        m.nrFailed = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmCompactionMigratepagesFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmCompactionMigratepagesFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmCompactionMigratepagesFtraceEvent} MmCompactionMigratepagesFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionMigratepagesFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmCompactionMigratepagesFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmCompactionMigratepagesFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmCompactionMigratepagesFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.nrMigrated != null && m.hasOwnProperty("nrMigrated")) {
                    if (!$util.isInteger(m.nrMigrated) && !(m.nrMigrated && $util.isInteger(m.nrMigrated.low) && $util.isInteger(m.nrMigrated.high)))
                        return "nrMigrated: integer|Long expected";
                }
                if (m.nrFailed != null && m.hasOwnProperty("nrFailed")) {
                    if (!$util.isInteger(m.nrFailed) && !(m.nrFailed && $util.isInteger(m.nrFailed.low) && $util.isInteger(m.nrFailed.high)))
                        return "nrFailed: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a MmCompactionMigratepagesFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmCompactionMigratepagesFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmCompactionMigratepagesFtraceEvent} MmCompactionMigratepagesFtraceEvent
             */
            MmCompactionMigratepagesFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmCompactionMigratepagesFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmCompactionMigratepagesFtraceEvent();
                if (d.nrMigrated != null) {
                    if ($util.Long)
                        (m.nrMigrated = $util.Long.fromValue(d.nrMigrated)).unsigned = true;
                    else if (typeof d.nrMigrated === "string")
                        m.nrMigrated = parseInt(d.nrMigrated, 10);
                    else if (typeof d.nrMigrated === "number")
                        m.nrMigrated = d.nrMigrated;
                    else if (typeof d.nrMigrated === "object")
                        m.nrMigrated = new $util.LongBits(d.nrMigrated.low >>> 0, d.nrMigrated.high >>> 0).toNumber(true);
                }
                if (d.nrFailed != null) {
                    if ($util.Long)
                        (m.nrFailed = $util.Long.fromValue(d.nrFailed)).unsigned = true;
                    else if (typeof d.nrFailed === "string")
                        m.nrFailed = parseInt(d.nrFailed, 10);
                    else if (typeof d.nrFailed === "number")
                        m.nrFailed = d.nrFailed;
                    else if (typeof d.nrFailed === "object")
                        m.nrFailed = new $util.LongBits(d.nrFailed.low >>> 0, d.nrFailed.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a MmCompactionMigratepagesFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmCompactionMigratepagesFtraceEvent
             * @static
             * @param {perfetto.protos.MmCompactionMigratepagesFtraceEvent} m MmCompactionMigratepagesFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmCompactionMigratepagesFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.nrMigrated = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.nrMigrated = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.nrFailed = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.nrFailed = o.longs === String ? "0" : 0;
                }
                if (m.nrMigrated != null && m.hasOwnProperty("nrMigrated")) {
                    if (typeof m.nrMigrated === "number")
                        d.nrMigrated = o.longs === String ? String(m.nrMigrated) : m.nrMigrated;
                    else
                        d.nrMigrated = o.longs === String ? $util.Long.prototype.toString.call(m.nrMigrated) : o.longs === Number ? new $util.LongBits(m.nrMigrated.low >>> 0, m.nrMigrated.high >>> 0).toNumber(true) : m.nrMigrated;
                }
                if (m.nrFailed != null && m.hasOwnProperty("nrFailed")) {
                    if (typeof m.nrFailed === "number")
                        d.nrFailed = o.longs === String ? String(m.nrFailed) : m.nrFailed;
                    else
                        d.nrFailed = o.longs === String ? $util.Long.prototype.toString.call(m.nrFailed) : o.longs === Number ? new $util.LongBits(m.nrFailed.low >>> 0, m.nrFailed.high >>> 0).toNumber(true) : m.nrFailed;
                }
                return d;
            };

            /**
             * Converts this MmCompactionMigratepagesFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmCompactionMigratepagesFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmCompactionMigratepagesFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmCompactionMigratepagesFtraceEvent;
        })();

        protos.MmCompactionSuitableFtraceEvent = (function() {

            /**
             * Properties of a MmCompactionSuitableFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmCompactionSuitableFtraceEvent
             * @property {number|null} [nid] MmCompactionSuitableFtraceEvent nid
             * @property {number|null} [idx] MmCompactionSuitableFtraceEvent idx
             * @property {number|null} [order] MmCompactionSuitableFtraceEvent order
             * @property {number|null} [ret] MmCompactionSuitableFtraceEvent ret
             */

            /**
             * Constructs a new MmCompactionSuitableFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmCompactionSuitableFtraceEvent.
             * @implements IMmCompactionSuitableFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmCompactionSuitableFtraceEvent=} [p] Properties to set
             */
            function MmCompactionSuitableFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmCompactionSuitableFtraceEvent nid.
             * @member {number} nid
             * @memberof perfetto.protos.MmCompactionSuitableFtraceEvent
             * @instance
             */
            MmCompactionSuitableFtraceEvent.prototype.nid = 0;

            /**
             * MmCompactionSuitableFtraceEvent idx.
             * @member {number} idx
             * @memberof perfetto.protos.MmCompactionSuitableFtraceEvent
             * @instance
             */
            MmCompactionSuitableFtraceEvent.prototype.idx = 0;

            /**
             * MmCompactionSuitableFtraceEvent order.
             * @member {number} order
             * @memberof perfetto.protos.MmCompactionSuitableFtraceEvent
             * @instance
             */
            MmCompactionSuitableFtraceEvent.prototype.order = 0;

            /**
             * MmCompactionSuitableFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.MmCompactionSuitableFtraceEvent
             * @instance
             */
            MmCompactionSuitableFtraceEvent.prototype.ret = 0;

            /**
             * Creates a new MmCompactionSuitableFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmCompactionSuitableFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionSuitableFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmCompactionSuitableFtraceEvent} MmCompactionSuitableFtraceEvent instance
             */
            MmCompactionSuitableFtraceEvent.create = function create(properties) {
                return new MmCompactionSuitableFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmCompactionSuitableFtraceEvent message. Does not implicitly {@link perfetto.protos.MmCompactionSuitableFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmCompactionSuitableFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionSuitableFtraceEvent} m MmCompactionSuitableFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionSuitableFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.nid != null && Object.hasOwnProperty.call(m, "nid"))
                    w.uint32(8).int32(m.nid);
                if (m.idx != null && Object.hasOwnProperty.call(m, "idx"))
                    w.uint32(16).uint32(m.idx);
                if (m.order != null && Object.hasOwnProperty.call(m, "order"))
                    w.uint32(24).int32(m.order);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(32).int32(m.ret);
                return w;
            };

            /**
             * Encodes the specified MmCompactionSuitableFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmCompactionSuitableFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmCompactionSuitableFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionSuitableFtraceEvent} message MmCompactionSuitableFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionSuitableFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmCompactionSuitableFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmCompactionSuitableFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmCompactionSuitableFtraceEvent} MmCompactionSuitableFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionSuitableFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmCompactionSuitableFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.nid = r.int32();
                        break;
                    case 2:
                        m.idx = r.uint32();
                        break;
                    case 3:
                        m.order = r.int32();
                        break;
                    case 4:
                        m.ret = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmCompactionSuitableFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmCompactionSuitableFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmCompactionSuitableFtraceEvent} MmCompactionSuitableFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionSuitableFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmCompactionSuitableFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmCompactionSuitableFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmCompactionSuitableFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    if (!$util.isInteger(m.nid))
                        return "nid: integer expected";
                }
                if (m.idx != null && m.hasOwnProperty("idx")) {
                    if (!$util.isInteger(m.idx))
                        return "idx: integer expected";
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    if (!$util.isInteger(m.order))
                        return "order: integer expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                return null;
            };

            /**
             * Creates a MmCompactionSuitableFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmCompactionSuitableFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmCompactionSuitableFtraceEvent} MmCompactionSuitableFtraceEvent
             */
            MmCompactionSuitableFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmCompactionSuitableFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmCompactionSuitableFtraceEvent();
                if (d.nid != null) {
                    m.nid = d.nid | 0;
                }
                if (d.idx != null) {
                    m.idx = d.idx >>> 0;
                }
                if (d.order != null) {
                    m.order = d.order | 0;
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MmCompactionSuitableFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmCompactionSuitableFtraceEvent
             * @static
             * @param {perfetto.protos.MmCompactionSuitableFtraceEvent} m MmCompactionSuitableFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmCompactionSuitableFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.nid = 0;
                    d.idx = 0;
                    d.order = 0;
                    d.ret = 0;
                }
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    d.nid = m.nid;
                }
                if (m.idx != null && m.hasOwnProperty("idx")) {
                    d.idx = m.idx;
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    d.order = m.order;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                return d;
            };

            /**
             * Converts this MmCompactionSuitableFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmCompactionSuitableFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmCompactionSuitableFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmCompactionSuitableFtraceEvent;
        })();

        protos.MmCompactionTryToCompactPagesFtraceEvent = (function() {

            /**
             * Properties of a MmCompactionTryToCompactPagesFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmCompactionTryToCompactPagesFtraceEvent
             * @property {number|null} [order] MmCompactionTryToCompactPagesFtraceEvent order
             * @property {number|null} [gfpMask] MmCompactionTryToCompactPagesFtraceEvent gfpMask
             * @property {number|null} [mode] MmCompactionTryToCompactPagesFtraceEvent mode
             * @property {number|null} [prio] MmCompactionTryToCompactPagesFtraceEvent prio
             */

            /**
             * Constructs a new MmCompactionTryToCompactPagesFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmCompactionTryToCompactPagesFtraceEvent.
             * @implements IMmCompactionTryToCompactPagesFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmCompactionTryToCompactPagesFtraceEvent=} [p] Properties to set
             */
            function MmCompactionTryToCompactPagesFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmCompactionTryToCompactPagesFtraceEvent order.
             * @member {number} order
             * @memberof perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent
             * @instance
             */
            MmCompactionTryToCompactPagesFtraceEvent.prototype.order = 0;

            /**
             * MmCompactionTryToCompactPagesFtraceEvent gfpMask.
             * @member {number} gfpMask
             * @memberof perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent
             * @instance
             */
            MmCompactionTryToCompactPagesFtraceEvent.prototype.gfpMask = 0;

            /**
             * MmCompactionTryToCompactPagesFtraceEvent mode.
             * @member {number} mode
             * @memberof perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent
             * @instance
             */
            MmCompactionTryToCompactPagesFtraceEvent.prototype.mode = 0;

            /**
             * MmCompactionTryToCompactPagesFtraceEvent prio.
             * @member {number} prio
             * @memberof perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent
             * @instance
             */
            MmCompactionTryToCompactPagesFtraceEvent.prototype.prio = 0;

            /**
             * Creates a new MmCompactionTryToCompactPagesFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionTryToCompactPagesFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent} MmCompactionTryToCompactPagesFtraceEvent instance
             */
            MmCompactionTryToCompactPagesFtraceEvent.create = function create(properties) {
                return new MmCompactionTryToCompactPagesFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmCompactionTryToCompactPagesFtraceEvent message. Does not implicitly {@link perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionTryToCompactPagesFtraceEvent} m MmCompactionTryToCompactPagesFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionTryToCompactPagesFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.order != null && Object.hasOwnProperty.call(m, "order"))
                    w.uint32(8).int32(m.order);
                if (m.gfpMask != null && Object.hasOwnProperty.call(m, "gfpMask"))
                    w.uint32(16).uint32(m.gfpMask);
                if (m.mode != null && Object.hasOwnProperty.call(m, "mode"))
                    w.uint32(24).uint32(m.mode);
                if (m.prio != null && Object.hasOwnProperty.call(m, "prio"))
                    w.uint32(32).int32(m.prio);
                return w;
            };

            /**
             * Encodes the specified MmCompactionTryToCompactPagesFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionTryToCompactPagesFtraceEvent} message MmCompactionTryToCompactPagesFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionTryToCompactPagesFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmCompactionTryToCompactPagesFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent} MmCompactionTryToCompactPagesFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionTryToCompactPagesFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.order = r.int32();
                        break;
                    case 2:
                        m.gfpMask = r.uint32();
                        break;
                    case 3:
                        m.mode = r.uint32();
                        break;
                    case 4:
                        m.prio = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmCompactionTryToCompactPagesFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent} MmCompactionTryToCompactPagesFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionTryToCompactPagesFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmCompactionTryToCompactPagesFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmCompactionTryToCompactPagesFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.order != null && m.hasOwnProperty("order")) {
                    if (!$util.isInteger(m.order))
                        return "order: integer expected";
                }
                if (m.gfpMask != null && m.hasOwnProperty("gfpMask")) {
                    if (!$util.isInteger(m.gfpMask))
                        return "gfpMask: integer expected";
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    if (!$util.isInteger(m.mode))
                        return "mode: integer expected";
                }
                if (m.prio != null && m.hasOwnProperty("prio")) {
                    if (!$util.isInteger(m.prio))
                        return "prio: integer expected";
                }
                return null;
            };

            /**
             * Creates a MmCompactionTryToCompactPagesFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent} MmCompactionTryToCompactPagesFtraceEvent
             */
            MmCompactionTryToCompactPagesFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent();
                if (d.order != null) {
                    m.order = d.order | 0;
                }
                if (d.gfpMask != null) {
                    m.gfpMask = d.gfpMask >>> 0;
                }
                if (d.mode != null) {
                    m.mode = d.mode >>> 0;
                }
                if (d.prio != null) {
                    m.prio = d.prio | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MmCompactionTryToCompactPagesFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent
             * @static
             * @param {perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent} m MmCompactionTryToCompactPagesFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmCompactionTryToCompactPagesFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.order = 0;
                    d.gfpMask = 0;
                    d.mode = 0;
                    d.prio = 0;
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    d.order = m.order;
                }
                if (m.gfpMask != null && m.hasOwnProperty("gfpMask")) {
                    d.gfpMask = m.gfpMask;
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    d.mode = m.mode;
                }
                if (m.prio != null && m.hasOwnProperty("prio")) {
                    d.prio = m.prio;
                }
                return d;
            };

            /**
             * Converts this MmCompactionTryToCompactPagesFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmCompactionTryToCompactPagesFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmCompactionTryToCompactPagesFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmCompactionTryToCompactPagesFtraceEvent;
        })();

        protos.MmCompactionWakeupKcompactdFtraceEvent = (function() {

            /**
             * Properties of a MmCompactionWakeupKcompactdFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmCompactionWakeupKcompactdFtraceEvent
             * @property {number|null} [nid] MmCompactionWakeupKcompactdFtraceEvent nid
             * @property {number|null} [order] MmCompactionWakeupKcompactdFtraceEvent order
             * @property {number|null} [classzoneIdx] MmCompactionWakeupKcompactdFtraceEvent classzoneIdx
             * @property {number|null} [highestZoneidx] MmCompactionWakeupKcompactdFtraceEvent highestZoneidx
             */

            /**
             * Constructs a new MmCompactionWakeupKcompactdFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmCompactionWakeupKcompactdFtraceEvent.
             * @implements IMmCompactionWakeupKcompactdFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmCompactionWakeupKcompactdFtraceEvent=} [p] Properties to set
             */
            function MmCompactionWakeupKcompactdFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmCompactionWakeupKcompactdFtraceEvent nid.
             * @member {number} nid
             * @memberof perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent
             * @instance
             */
            MmCompactionWakeupKcompactdFtraceEvent.prototype.nid = 0;

            /**
             * MmCompactionWakeupKcompactdFtraceEvent order.
             * @member {number} order
             * @memberof perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent
             * @instance
             */
            MmCompactionWakeupKcompactdFtraceEvent.prototype.order = 0;

            /**
             * MmCompactionWakeupKcompactdFtraceEvent classzoneIdx.
             * @member {number} classzoneIdx
             * @memberof perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent
             * @instance
             */
            MmCompactionWakeupKcompactdFtraceEvent.prototype.classzoneIdx = 0;

            /**
             * MmCompactionWakeupKcompactdFtraceEvent highestZoneidx.
             * @member {number} highestZoneidx
             * @memberof perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent
             * @instance
             */
            MmCompactionWakeupKcompactdFtraceEvent.prototype.highestZoneidx = 0;

            /**
             * Creates a new MmCompactionWakeupKcompactdFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionWakeupKcompactdFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent} MmCompactionWakeupKcompactdFtraceEvent instance
             */
            MmCompactionWakeupKcompactdFtraceEvent.create = function create(properties) {
                return new MmCompactionWakeupKcompactdFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmCompactionWakeupKcompactdFtraceEvent message. Does not implicitly {@link perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionWakeupKcompactdFtraceEvent} m MmCompactionWakeupKcompactdFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionWakeupKcompactdFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.nid != null && Object.hasOwnProperty.call(m, "nid"))
                    w.uint32(8).int32(m.nid);
                if (m.order != null && Object.hasOwnProperty.call(m, "order"))
                    w.uint32(16).int32(m.order);
                if (m.classzoneIdx != null && Object.hasOwnProperty.call(m, "classzoneIdx"))
                    w.uint32(24).uint32(m.classzoneIdx);
                if (m.highestZoneidx != null && Object.hasOwnProperty.call(m, "highestZoneidx"))
                    w.uint32(32).uint32(m.highestZoneidx);
                return w;
            };

            /**
             * Encodes the specified MmCompactionWakeupKcompactdFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent
             * @static
             * @param {perfetto.protos.IMmCompactionWakeupKcompactdFtraceEvent} message MmCompactionWakeupKcompactdFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmCompactionWakeupKcompactdFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmCompactionWakeupKcompactdFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent} MmCompactionWakeupKcompactdFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionWakeupKcompactdFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.nid = r.int32();
                        break;
                    case 2:
                        m.order = r.int32();
                        break;
                    case 3:
                        m.classzoneIdx = r.uint32();
                        break;
                    case 4:
                        m.highestZoneidx = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmCompactionWakeupKcompactdFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent} MmCompactionWakeupKcompactdFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmCompactionWakeupKcompactdFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmCompactionWakeupKcompactdFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmCompactionWakeupKcompactdFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    if (!$util.isInteger(m.nid))
                        return "nid: integer expected";
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    if (!$util.isInteger(m.order))
                        return "order: integer expected";
                }
                if (m.classzoneIdx != null && m.hasOwnProperty("classzoneIdx")) {
                    if (!$util.isInteger(m.classzoneIdx))
                        return "classzoneIdx: integer expected";
                }
                if (m.highestZoneidx != null && m.hasOwnProperty("highestZoneidx")) {
                    if (!$util.isInteger(m.highestZoneidx))
                        return "highestZoneidx: integer expected";
                }
                return null;
            };

            /**
             * Creates a MmCompactionWakeupKcompactdFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent} MmCompactionWakeupKcompactdFtraceEvent
             */
            MmCompactionWakeupKcompactdFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent();
                if (d.nid != null) {
                    m.nid = d.nid | 0;
                }
                if (d.order != null) {
                    m.order = d.order | 0;
                }
                if (d.classzoneIdx != null) {
                    m.classzoneIdx = d.classzoneIdx >>> 0;
                }
                if (d.highestZoneidx != null) {
                    m.highestZoneidx = d.highestZoneidx >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MmCompactionWakeupKcompactdFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent
             * @static
             * @param {perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent} m MmCompactionWakeupKcompactdFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmCompactionWakeupKcompactdFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.nid = 0;
                    d.order = 0;
                    d.classzoneIdx = 0;
                    d.highestZoneidx = 0;
                }
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    d.nid = m.nid;
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    d.order = m.order;
                }
                if (m.classzoneIdx != null && m.hasOwnProperty("classzoneIdx")) {
                    d.classzoneIdx = m.classzoneIdx;
                }
                if (m.highestZoneidx != null && m.hasOwnProperty("highestZoneidx")) {
                    d.highestZoneidx = m.highestZoneidx;
                }
                return d;
            };

            /**
             * Converts this MmCompactionWakeupKcompactdFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmCompactionWakeupKcompactdFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmCompactionWakeupKcompactdFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmCompactionWakeupKcompactdFtraceEvent;
        })();

        protos.CpuhpExitFtraceEvent = (function() {

            /**
             * Properties of a CpuhpExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface ICpuhpExitFtraceEvent
             * @property {number|null} [cpu] CpuhpExitFtraceEvent cpu
             * @property {number|null} [idx] CpuhpExitFtraceEvent idx
             * @property {number|null} [ret] CpuhpExitFtraceEvent ret
             * @property {number|null} [state] CpuhpExitFtraceEvent state
             */

            /**
             * Constructs a new CpuhpExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a CpuhpExitFtraceEvent.
             * @implements ICpuhpExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.ICpuhpExitFtraceEvent=} [p] Properties to set
             */
            function CpuhpExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * CpuhpExitFtraceEvent cpu.
             * @member {number} cpu
             * @memberof perfetto.protos.CpuhpExitFtraceEvent
             * @instance
             */
            CpuhpExitFtraceEvent.prototype.cpu = 0;

            /**
             * CpuhpExitFtraceEvent idx.
             * @member {number} idx
             * @memberof perfetto.protos.CpuhpExitFtraceEvent
             * @instance
             */
            CpuhpExitFtraceEvent.prototype.idx = 0;

            /**
             * CpuhpExitFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.CpuhpExitFtraceEvent
             * @instance
             */
            CpuhpExitFtraceEvent.prototype.ret = 0;

            /**
             * CpuhpExitFtraceEvent state.
             * @member {number} state
             * @memberof perfetto.protos.CpuhpExitFtraceEvent
             * @instance
             */
            CpuhpExitFtraceEvent.prototype.state = 0;

            /**
             * Creates a new CpuhpExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.CpuhpExitFtraceEvent
             * @static
             * @param {perfetto.protos.ICpuhpExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.CpuhpExitFtraceEvent} CpuhpExitFtraceEvent instance
             */
            CpuhpExitFtraceEvent.create = function create(properties) {
                return new CpuhpExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified CpuhpExitFtraceEvent message. Does not implicitly {@link perfetto.protos.CpuhpExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.CpuhpExitFtraceEvent
             * @static
             * @param {perfetto.protos.ICpuhpExitFtraceEvent} m CpuhpExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CpuhpExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.cpu != null && Object.hasOwnProperty.call(m, "cpu"))
                    w.uint32(8).uint32(m.cpu);
                if (m.idx != null && Object.hasOwnProperty.call(m, "idx"))
                    w.uint32(16).int32(m.idx);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(24).int32(m.ret);
                if (m.state != null && Object.hasOwnProperty.call(m, "state"))
                    w.uint32(32).int32(m.state);
                return w;
            };

            /**
             * Encodes the specified CpuhpExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.CpuhpExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.CpuhpExitFtraceEvent
             * @static
             * @param {perfetto.protos.ICpuhpExitFtraceEvent} message CpuhpExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CpuhpExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CpuhpExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.CpuhpExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.CpuhpExitFtraceEvent} CpuhpExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CpuhpExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.CpuhpExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.cpu = r.uint32();
                        break;
                    case 2:
                        m.idx = r.int32();
                        break;
                    case 3:
                        m.ret = r.int32();
                        break;
                    case 4:
                        m.state = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a CpuhpExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.CpuhpExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.CpuhpExitFtraceEvent} CpuhpExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CpuhpExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CpuhpExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.CpuhpExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CpuhpExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.cpu != null && m.hasOwnProperty("cpu")) {
                    if (!$util.isInteger(m.cpu))
                        return "cpu: integer expected";
                }
                if (m.idx != null && m.hasOwnProperty("idx")) {
                    if (!$util.isInteger(m.idx))
                        return "idx: integer expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    if (!$util.isInteger(m.state))
                        return "state: integer expected";
                }
                return null;
            };

            /**
             * Creates a CpuhpExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.CpuhpExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.CpuhpExitFtraceEvent} CpuhpExitFtraceEvent
             */
            CpuhpExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.CpuhpExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.CpuhpExitFtraceEvent();
                if (d.cpu != null) {
                    m.cpu = d.cpu >>> 0;
                }
                if (d.idx != null) {
                    m.idx = d.idx | 0;
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                if (d.state != null) {
                    m.state = d.state | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a CpuhpExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.CpuhpExitFtraceEvent
             * @static
             * @param {perfetto.protos.CpuhpExitFtraceEvent} m CpuhpExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CpuhpExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.cpu = 0;
                    d.idx = 0;
                    d.ret = 0;
                    d.state = 0;
                }
                if (m.cpu != null && m.hasOwnProperty("cpu")) {
                    d.cpu = m.cpu;
                }
                if (m.idx != null && m.hasOwnProperty("idx")) {
                    d.idx = m.idx;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    d.state = m.state;
                }
                return d;
            };

            /**
             * Converts this CpuhpExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.CpuhpExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CpuhpExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return CpuhpExitFtraceEvent;
        })();

        protos.CpuhpMultiEnterFtraceEvent = (function() {

            /**
             * Properties of a CpuhpMultiEnterFtraceEvent.
             * @memberof perfetto.protos
             * @interface ICpuhpMultiEnterFtraceEvent
             * @property {number|null} [cpu] CpuhpMultiEnterFtraceEvent cpu
             * @property {number|null} [fun] CpuhpMultiEnterFtraceEvent fun
             * @property {number|null} [idx] CpuhpMultiEnterFtraceEvent idx
             * @property {number|null} [target] CpuhpMultiEnterFtraceEvent target
             */

            /**
             * Constructs a new CpuhpMultiEnterFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a CpuhpMultiEnterFtraceEvent.
             * @implements ICpuhpMultiEnterFtraceEvent
             * @constructor
             * @param {perfetto.protos.ICpuhpMultiEnterFtraceEvent=} [p] Properties to set
             */
            function CpuhpMultiEnterFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * CpuhpMultiEnterFtraceEvent cpu.
             * @member {number} cpu
             * @memberof perfetto.protos.CpuhpMultiEnterFtraceEvent
             * @instance
             */
            CpuhpMultiEnterFtraceEvent.prototype.cpu = 0;

            /**
             * CpuhpMultiEnterFtraceEvent fun.
             * @member {number} fun
             * @memberof perfetto.protos.CpuhpMultiEnterFtraceEvent
             * @instance
             */
            CpuhpMultiEnterFtraceEvent.prototype.fun = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * CpuhpMultiEnterFtraceEvent idx.
             * @member {number} idx
             * @memberof perfetto.protos.CpuhpMultiEnterFtraceEvent
             * @instance
             */
            CpuhpMultiEnterFtraceEvent.prototype.idx = 0;

            /**
             * CpuhpMultiEnterFtraceEvent target.
             * @member {number} target
             * @memberof perfetto.protos.CpuhpMultiEnterFtraceEvent
             * @instance
             */
            CpuhpMultiEnterFtraceEvent.prototype.target = 0;

            /**
             * Creates a new CpuhpMultiEnterFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.CpuhpMultiEnterFtraceEvent
             * @static
             * @param {perfetto.protos.ICpuhpMultiEnterFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.CpuhpMultiEnterFtraceEvent} CpuhpMultiEnterFtraceEvent instance
             */
            CpuhpMultiEnterFtraceEvent.create = function create(properties) {
                return new CpuhpMultiEnterFtraceEvent(properties);
            };

            /**
             * Encodes the specified CpuhpMultiEnterFtraceEvent message. Does not implicitly {@link perfetto.protos.CpuhpMultiEnterFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.CpuhpMultiEnterFtraceEvent
             * @static
             * @param {perfetto.protos.ICpuhpMultiEnterFtraceEvent} m CpuhpMultiEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CpuhpMultiEnterFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.cpu != null && Object.hasOwnProperty.call(m, "cpu"))
                    w.uint32(8).uint32(m.cpu);
                if (m.fun != null && Object.hasOwnProperty.call(m, "fun"))
                    w.uint32(16).uint64(m.fun);
                if (m.idx != null && Object.hasOwnProperty.call(m, "idx"))
                    w.uint32(24).int32(m.idx);
                if (m.target != null && Object.hasOwnProperty.call(m, "target"))
                    w.uint32(32).int32(m.target);
                return w;
            };

            /**
             * Encodes the specified CpuhpMultiEnterFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.CpuhpMultiEnterFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.CpuhpMultiEnterFtraceEvent
             * @static
             * @param {perfetto.protos.ICpuhpMultiEnterFtraceEvent} message CpuhpMultiEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CpuhpMultiEnterFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CpuhpMultiEnterFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.CpuhpMultiEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.CpuhpMultiEnterFtraceEvent} CpuhpMultiEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CpuhpMultiEnterFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.CpuhpMultiEnterFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.cpu = r.uint32();
                        break;
                    case 2:
                        m.fun = r.uint64();
                        break;
                    case 3:
                        m.idx = r.int32();
                        break;
                    case 4:
                        m.target = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a CpuhpMultiEnterFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.CpuhpMultiEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.CpuhpMultiEnterFtraceEvent} CpuhpMultiEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CpuhpMultiEnterFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CpuhpMultiEnterFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.CpuhpMultiEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CpuhpMultiEnterFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.cpu != null && m.hasOwnProperty("cpu")) {
                    if (!$util.isInteger(m.cpu))
                        return "cpu: integer expected";
                }
                if (m.fun != null && m.hasOwnProperty("fun")) {
                    if (!$util.isInteger(m.fun) && !(m.fun && $util.isInteger(m.fun.low) && $util.isInteger(m.fun.high)))
                        return "fun: integer|Long expected";
                }
                if (m.idx != null && m.hasOwnProperty("idx")) {
                    if (!$util.isInteger(m.idx))
                        return "idx: integer expected";
                }
                if (m.target != null && m.hasOwnProperty("target")) {
                    if (!$util.isInteger(m.target))
                        return "target: integer expected";
                }
                return null;
            };

            /**
             * Creates a CpuhpMultiEnterFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.CpuhpMultiEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.CpuhpMultiEnterFtraceEvent} CpuhpMultiEnterFtraceEvent
             */
            CpuhpMultiEnterFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.CpuhpMultiEnterFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.CpuhpMultiEnterFtraceEvent();
                if (d.cpu != null) {
                    m.cpu = d.cpu >>> 0;
                }
                if (d.fun != null) {
                    if ($util.Long)
                        (m.fun = $util.Long.fromValue(d.fun)).unsigned = true;
                    else if (typeof d.fun === "string")
                        m.fun = parseInt(d.fun, 10);
                    else if (typeof d.fun === "number")
                        m.fun = d.fun;
                    else if (typeof d.fun === "object")
                        m.fun = new $util.LongBits(d.fun.low >>> 0, d.fun.high >>> 0).toNumber(true);
                }
                if (d.idx != null) {
                    m.idx = d.idx | 0;
                }
                if (d.target != null) {
                    m.target = d.target | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a CpuhpMultiEnterFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.CpuhpMultiEnterFtraceEvent
             * @static
             * @param {perfetto.protos.CpuhpMultiEnterFtraceEvent} m CpuhpMultiEnterFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CpuhpMultiEnterFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.cpu = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.fun = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.fun = o.longs === String ? "0" : 0;
                    d.idx = 0;
                    d.target = 0;
                }
                if (m.cpu != null && m.hasOwnProperty("cpu")) {
                    d.cpu = m.cpu;
                }
                if (m.fun != null && m.hasOwnProperty("fun")) {
                    if (typeof m.fun === "number")
                        d.fun = o.longs === String ? String(m.fun) : m.fun;
                    else
                        d.fun = o.longs === String ? $util.Long.prototype.toString.call(m.fun) : o.longs === Number ? new $util.LongBits(m.fun.low >>> 0, m.fun.high >>> 0).toNumber(true) : m.fun;
                }
                if (m.idx != null && m.hasOwnProperty("idx")) {
                    d.idx = m.idx;
                }
                if (m.target != null && m.hasOwnProperty("target")) {
                    d.target = m.target;
                }
                return d;
            };

            /**
             * Converts this CpuhpMultiEnterFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.CpuhpMultiEnterFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CpuhpMultiEnterFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return CpuhpMultiEnterFtraceEvent;
        })();

        protos.CpuhpEnterFtraceEvent = (function() {

            /**
             * Properties of a CpuhpEnterFtraceEvent.
             * @memberof perfetto.protos
             * @interface ICpuhpEnterFtraceEvent
             * @property {number|null} [cpu] CpuhpEnterFtraceEvent cpu
             * @property {number|null} [fun] CpuhpEnterFtraceEvent fun
             * @property {number|null} [idx] CpuhpEnterFtraceEvent idx
             * @property {number|null} [target] CpuhpEnterFtraceEvent target
             */

            /**
             * Constructs a new CpuhpEnterFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a CpuhpEnterFtraceEvent.
             * @implements ICpuhpEnterFtraceEvent
             * @constructor
             * @param {perfetto.protos.ICpuhpEnterFtraceEvent=} [p] Properties to set
             */
            function CpuhpEnterFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * CpuhpEnterFtraceEvent cpu.
             * @member {number} cpu
             * @memberof perfetto.protos.CpuhpEnterFtraceEvent
             * @instance
             */
            CpuhpEnterFtraceEvent.prototype.cpu = 0;

            /**
             * CpuhpEnterFtraceEvent fun.
             * @member {number} fun
             * @memberof perfetto.protos.CpuhpEnterFtraceEvent
             * @instance
             */
            CpuhpEnterFtraceEvent.prototype.fun = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * CpuhpEnterFtraceEvent idx.
             * @member {number} idx
             * @memberof perfetto.protos.CpuhpEnterFtraceEvent
             * @instance
             */
            CpuhpEnterFtraceEvent.prototype.idx = 0;

            /**
             * CpuhpEnterFtraceEvent target.
             * @member {number} target
             * @memberof perfetto.protos.CpuhpEnterFtraceEvent
             * @instance
             */
            CpuhpEnterFtraceEvent.prototype.target = 0;

            /**
             * Creates a new CpuhpEnterFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.CpuhpEnterFtraceEvent
             * @static
             * @param {perfetto.protos.ICpuhpEnterFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.CpuhpEnterFtraceEvent} CpuhpEnterFtraceEvent instance
             */
            CpuhpEnterFtraceEvent.create = function create(properties) {
                return new CpuhpEnterFtraceEvent(properties);
            };

            /**
             * Encodes the specified CpuhpEnterFtraceEvent message. Does not implicitly {@link perfetto.protos.CpuhpEnterFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.CpuhpEnterFtraceEvent
             * @static
             * @param {perfetto.protos.ICpuhpEnterFtraceEvent} m CpuhpEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CpuhpEnterFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.cpu != null && Object.hasOwnProperty.call(m, "cpu"))
                    w.uint32(8).uint32(m.cpu);
                if (m.fun != null && Object.hasOwnProperty.call(m, "fun"))
                    w.uint32(16).uint64(m.fun);
                if (m.idx != null && Object.hasOwnProperty.call(m, "idx"))
                    w.uint32(24).int32(m.idx);
                if (m.target != null && Object.hasOwnProperty.call(m, "target"))
                    w.uint32(32).int32(m.target);
                return w;
            };

            /**
             * Encodes the specified CpuhpEnterFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.CpuhpEnterFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.CpuhpEnterFtraceEvent
             * @static
             * @param {perfetto.protos.ICpuhpEnterFtraceEvent} message CpuhpEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CpuhpEnterFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CpuhpEnterFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.CpuhpEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.CpuhpEnterFtraceEvent} CpuhpEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CpuhpEnterFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.CpuhpEnterFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.cpu = r.uint32();
                        break;
                    case 2:
                        m.fun = r.uint64();
                        break;
                    case 3:
                        m.idx = r.int32();
                        break;
                    case 4:
                        m.target = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a CpuhpEnterFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.CpuhpEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.CpuhpEnterFtraceEvent} CpuhpEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CpuhpEnterFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CpuhpEnterFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.CpuhpEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CpuhpEnterFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.cpu != null && m.hasOwnProperty("cpu")) {
                    if (!$util.isInteger(m.cpu))
                        return "cpu: integer expected";
                }
                if (m.fun != null && m.hasOwnProperty("fun")) {
                    if (!$util.isInteger(m.fun) && !(m.fun && $util.isInteger(m.fun.low) && $util.isInteger(m.fun.high)))
                        return "fun: integer|Long expected";
                }
                if (m.idx != null && m.hasOwnProperty("idx")) {
                    if (!$util.isInteger(m.idx))
                        return "idx: integer expected";
                }
                if (m.target != null && m.hasOwnProperty("target")) {
                    if (!$util.isInteger(m.target))
                        return "target: integer expected";
                }
                return null;
            };

            /**
             * Creates a CpuhpEnterFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.CpuhpEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.CpuhpEnterFtraceEvent} CpuhpEnterFtraceEvent
             */
            CpuhpEnterFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.CpuhpEnterFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.CpuhpEnterFtraceEvent();
                if (d.cpu != null) {
                    m.cpu = d.cpu >>> 0;
                }
                if (d.fun != null) {
                    if ($util.Long)
                        (m.fun = $util.Long.fromValue(d.fun)).unsigned = true;
                    else if (typeof d.fun === "string")
                        m.fun = parseInt(d.fun, 10);
                    else if (typeof d.fun === "number")
                        m.fun = d.fun;
                    else if (typeof d.fun === "object")
                        m.fun = new $util.LongBits(d.fun.low >>> 0, d.fun.high >>> 0).toNumber(true);
                }
                if (d.idx != null) {
                    m.idx = d.idx | 0;
                }
                if (d.target != null) {
                    m.target = d.target | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a CpuhpEnterFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.CpuhpEnterFtraceEvent
             * @static
             * @param {perfetto.protos.CpuhpEnterFtraceEvent} m CpuhpEnterFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CpuhpEnterFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.cpu = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.fun = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.fun = o.longs === String ? "0" : 0;
                    d.idx = 0;
                    d.target = 0;
                }
                if (m.cpu != null && m.hasOwnProperty("cpu")) {
                    d.cpu = m.cpu;
                }
                if (m.fun != null && m.hasOwnProperty("fun")) {
                    if (typeof m.fun === "number")
                        d.fun = o.longs === String ? String(m.fun) : m.fun;
                    else
                        d.fun = o.longs === String ? $util.Long.prototype.toString.call(m.fun) : o.longs === Number ? new $util.LongBits(m.fun.low >>> 0, m.fun.high >>> 0).toNumber(true) : m.fun;
                }
                if (m.idx != null && m.hasOwnProperty("idx")) {
                    d.idx = m.idx;
                }
                if (m.target != null && m.hasOwnProperty("target")) {
                    d.target = m.target;
                }
                return d;
            };

            /**
             * Converts this CpuhpEnterFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.CpuhpEnterFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CpuhpEnterFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return CpuhpEnterFtraceEvent;
        })();

        protos.CpuhpLatencyFtraceEvent = (function() {

            /**
             * Properties of a CpuhpLatencyFtraceEvent.
             * @memberof perfetto.protos
             * @interface ICpuhpLatencyFtraceEvent
             * @property {number|null} [cpu] CpuhpLatencyFtraceEvent cpu
             * @property {number|null} [ret] CpuhpLatencyFtraceEvent ret
             * @property {number|null} [state] CpuhpLatencyFtraceEvent state
             * @property {number|null} [time] CpuhpLatencyFtraceEvent time
             */

            /**
             * Constructs a new CpuhpLatencyFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a CpuhpLatencyFtraceEvent.
             * @implements ICpuhpLatencyFtraceEvent
             * @constructor
             * @param {perfetto.protos.ICpuhpLatencyFtraceEvent=} [p] Properties to set
             */
            function CpuhpLatencyFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * CpuhpLatencyFtraceEvent cpu.
             * @member {number} cpu
             * @memberof perfetto.protos.CpuhpLatencyFtraceEvent
             * @instance
             */
            CpuhpLatencyFtraceEvent.prototype.cpu = 0;

            /**
             * CpuhpLatencyFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.CpuhpLatencyFtraceEvent
             * @instance
             */
            CpuhpLatencyFtraceEvent.prototype.ret = 0;

            /**
             * CpuhpLatencyFtraceEvent state.
             * @member {number} state
             * @memberof perfetto.protos.CpuhpLatencyFtraceEvent
             * @instance
             */
            CpuhpLatencyFtraceEvent.prototype.state = 0;

            /**
             * CpuhpLatencyFtraceEvent time.
             * @member {number} time
             * @memberof perfetto.protos.CpuhpLatencyFtraceEvent
             * @instance
             */
            CpuhpLatencyFtraceEvent.prototype.time = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new CpuhpLatencyFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.CpuhpLatencyFtraceEvent
             * @static
             * @param {perfetto.protos.ICpuhpLatencyFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.CpuhpLatencyFtraceEvent} CpuhpLatencyFtraceEvent instance
             */
            CpuhpLatencyFtraceEvent.create = function create(properties) {
                return new CpuhpLatencyFtraceEvent(properties);
            };

            /**
             * Encodes the specified CpuhpLatencyFtraceEvent message. Does not implicitly {@link perfetto.protos.CpuhpLatencyFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.CpuhpLatencyFtraceEvent
             * @static
             * @param {perfetto.protos.ICpuhpLatencyFtraceEvent} m CpuhpLatencyFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CpuhpLatencyFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.cpu != null && Object.hasOwnProperty.call(m, "cpu"))
                    w.uint32(8).uint32(m.cpu);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(16).int32(m.ret);
                if (m.state != null && Object.hasOwnProperty.call(m, "state"))
                    w.uint32(24).uint32(m.state);
                if (m.time != null && Object.hasOwnProperty.call(m, "time"))
                    w.uint32(32).uint64(m.time);
                return w;
            };

            /**
             * Encodes the specified CpuhpLatencyFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.CpuhpLatencyFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.CpuhpLatencyFtraceEvent
             * @static
             * @param {perfetto.protos.ICpuhpLatencyFtraceEvent} message CpuhpLatencyFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CpuhpLatencyFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CpuhpLatencyFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.CpuhpLatencyFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.CpuhpLatencyFtraceEvent} CpuhpLatencyFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CpuhpLatencyFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.CpuhpLatencyFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.cpu = r.uint32();
                        break;
                    case 2:
                        m.ret = r.int32();
                        break;
                    case 3:
                        m.state = r.uint32();
                        break;
                    case 4:
                        m.time = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a CpuhpLatencyFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.CpuhpLatencyFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.CpuhpLatencyFtraceEvent} CpuhpLatencyFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CpuhpLatencyFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CpuhpLatencyFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.CpuhpLatencyFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CpuhpLatencyFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.cpu != null && m.hasOwnProperty("cpu")) {
                    if (!$util.isInteger(m.cpu))
                        return "cpu: integer expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    if (!$util.isInteger(m.state))
                        return "state: integer expected";
                }
                if (m.time != null && m.hasOwnProperty("time")) {
                    if (!$util.isInteger(m.time) && !(m.time && $util.isInteger(m.time.low) && $util.isInteger(m.time.high)))
                        return "time: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a CpuhpLatencyFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.CpuhpLatencyFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.CpuhpLatencyFtraceEvent} CpuhpLatencyFtraceEvent
             */
            CpuhpLatencyFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.CpuhpLatencyFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.CpuhpLatencyFtraceEvent();
                if (d.cpu != null) {
                    m.cpu = d.cpu >>> 0;
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                if (d.state != null) {
                    m.state = d.state >>> 0;
                }
                if (d.time != null) {
                    if ($util.Long)
                        (m.time = $util.Long.fromValue(d.time)).unsigned = true;
                    else if (typeof d.time === "string")
                        m.time = parseInt(d.time, 10);
                    else if (typeof d.time === "number")
                        m.time = d.time;
                    else if (typeof d.time === "object")
                        m.time = new $util.LongBits(d.time.low >>> 0, d.time.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a CpuhpLatencyFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.CpuhpLatencyFtraceEvent
             * @static
             * @param {perfetto.protos.CpuhpLatencyFtraceEvent} m CpuhpLatencyFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CpuhpLatencyFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.cpu = 0;
                    d.ret = 0;
                    d.state = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.time = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.time = o.longs === String ? "0" : 0;
                }
                if (m.cpu != null && m.hasOwnProperty("cpu")) {
                    d.cpu = m.cpu;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    d.state = m.state;
                }
                if (m.time != null && m.hasOwnProperty("time")) {
                    if (typeof m.time === "number")
                        d.time = o.longs === String ? String(m.time) : m.time;
                    else
                        d.time = o.longs === String ? $util.Long.prototype.toString.call(m.time) : o.longs === Number ? new $util.LongBits(m.time.low >>> 0, m.time.high >>> 0).toNumber(true) : m.time;
                }
                return d;
            };

            /**
             * Converts this CpuhpLatencyFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.CpuhpLatencyFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CpuhpLatencyFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return CpuhpLatencyFtraceEvent;
        })();

        protos.CpuhpPauseFtraceEvent = (function() {

            /**
             * Properties of a CpuhpPauseFtraceEvent.
             * @memberof perfetto.protos
             * @interface ICpuhpPauseFtraceEvent
             * @property {number|null} [activeCpus] CpuhpPauseFtraceEvent activeCpus
             * @property {number|null} [cpus] CpuhpPauseFtraceEvent cpus
             * @property {number|null} [pause] CpuhpPauseFtraceEvent pause
             * @property {number|null} [time] CpuhpPauseFtraceEvent time
             */

            /**
             * Constructs a new CpuhpPauseFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a CpuhpPauseFtraceEvent.
             * @implements ICpuhpPauseFtraceEvent
             * @constructor
             * @param {perfetto.protos.ICpuhpPauseFtraceEvent=} [p] Properties to set
             */
            function CpuhpPauseFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * CpuhpPauseFtraceEvent activeCpus.
             * @member {number} activeCpus
             * @memberof perfetto.protos.CpuhpPauseFtraceEvent
             * @instance
             */
            CpuhpPauseFtraceEvent.prototype.activeCpus = 0;

            /**
             * CpuhpPauseFtraceEvent cpus.
             * @member {number} cpus
             * @memberof perfetto.protos.CpuhpPauseFtraceEvent
             * @instance
             */
            CpuhpPauseFtraceEvent.prototype.cpus = 0;

            /**
             * CpuhpPauseFtraceEvent pause.
             * @member {number} pause
             * @memberof perfetto.protos.CpuhpPauseFtraceEvent
             * @instance
             */
            CpuhpPauseFtraceEvent.prototype.pause = 0;

            /**
             * CpuhpPauseFtraceEvent time.
             * @member {number} time
             * @memberof perfetto.protos.CpuhpPauseFtraceEvent
             * @instance
             */
            CpuhpPauseFtraceEvent.prototype.time = 0;

            /**
             * Creates a new CpuhpPauseFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.CpuhpPauseFtraceEvent
             * @static
             * @param {perfetto.protos.ICpuhpPauseFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.CpuhpPauseFtraceEvent} CpuhpPauseFtraceEvent instance
             */
            CpuhpPauseFtraceEvent.create = function create(properties) {
                return new CpuhpPauseFtraceEvent(properties);
            };

            /**
             * Encodes the specified CpuhpPauseFtraceEvent message. Does not implicitly {@link perfetto.protos.CpuhpPauseFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.CpuhpPauseFtraceEvent
             * @static
             * @param {perfetto.protos.ICpuhpPauseFtraceEvent} m CpuhpPauseFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CpuhpPauseFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.activeCpus != null && Object.hasOwnProperty.call(m, "activeCpus"))
                    w.uint32(8).uint32(m.activeCpus);
                if (m.cpus != null && Object.hasOwnProperty.call(m, "cpus"))
                    w.uint32(16).uint32(m.cpus);
                if (m.pause != null && Object.hasOwnProperty.call(m, "pause"))
                    w.uint32(24).uint32(m.pause);
                if (m.time != null && Object.hasOwnProperty.call(m, "time"))
                    w.uint32(32).uint32(m.time);
                return w;
            };

            /**
             * Encodes the specified CpuhpPauseFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.CpuhpPauseFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.CpuhpPauseFtraceEvent
             * @static
             * @param {perfetto.protos.ICpuhpPauseFtraceEvent} message CpuhpPauseFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CpuhpPauseFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CpuhpPauseFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.CpuhpPauseFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.CpuhpPauseFtraceEvent} CpuhpPauseFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CpuhpPauseFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.CpuhpPauseFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.activeCpus = r.uint32();
                        break;
                    case 2:
                        m.cpus = r.uint32();
                        break;
                    case 3:
                        m.pause = r.uint32();
                        break;
                    case 4:
                        m.time = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a CpuhpPauseFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.CpuhpPauseFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.CpuhpPauseFtraceEvent} CpuhpPauseFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CpuhpPauseFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CpuhpPauseFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.CpuhpPauseFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CpuhpPauseFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.activeCpus != null && m.hasOwnProperty("activeCpus")) {
                    if (!$util.isInteger(m.activeCpus))
                        return "activeCpus: integer expected";
                }
                if (m.cpus != null && m.hasOwnProperty("cpus")) {
                    if (!$util.isInteger(m.cpus))
                        return "cpus: integer expected";
                }
                if (m.pause != null && m.hasOwnProperty("pause")) {
                    if (!$util.isInteger(m.pause))
                        return "pause: integer expected";
                }
                if (m.time != null && m.hasOwnProperty("time")) {
                    if (!$util.isInteger(m.time))
                        return "time: integer expected";
                }
                return null;
            };

            /**
             * Creates a CpuhpPauseFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.CpuhpPauseFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.CpuhpPauseFtraceEvent} CpuhpPauseFtraceEvent
             */
            CpuhpPauseFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.CpuhpPauseFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.CpuhpPauseFtraceEvent();
                if (d.activeCpus != null) {
                    m.activeCpus = d.activeCpus >>> 0;
                }
                if (d.cpus != null) {
                    m.cpus = d.cpus >>> 0;
                }
                if (d.pause != null) {
                    m.pause = d.pause >>> 0;
                }
                if (d.time != null) {
                    m.time = d.time >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a CpuhpPauseFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.CpuhpPauseFtraceEvent
             * @static
             * @param {perfetto.protos.CpuhpPauseFtraceEvent} m CpuhpPauseFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CpuhpPauseFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.activeCpus = 0;
                    d.cpus = 0;
                    d.pause = 0;
                    d.time = 0;
                }
                if (m.activeCpus != null && m.hasOwnProperty("activeCpus")) {
                    d.activeCpus = m.activeCpus;
                }
                if (m.cpus != null && m.hasOwnProperty("cpus")) {
                    d.cpus = m.cpus;
                }
                if (m.pause != null && m.hasOwnProperty("pause")) {
                    d.pause = m.pause;
                }
                if (m.time != null && m.hasOwnProperty("time")) {
                    d.time = m.time;
                }
                return d;
            };

            /**
             * Converts this CpuhpPauseFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.CpuhpPauseFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CpuhpPauseFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return CpuhpPauseFtraceEvent;
        })();

        protos.CrosEcSensorhubDataFtraceEvent = (function() {

            /**
             * Properties of a CrosEcSensorhubDataFtraceEvent.
             * @memberof perfetto.protos
             * @interface ICrosEcSensorhubDataFtraceEvent
             * @property {number|null} [currentTime] CrosEcSensorhubDataFtraceEvent currentTime
             * @property {number|null} [currentTimestamp] CrosEcSensorhubDataFtraceEvent currentTimestamp
             * @property {number|null} [delta] CrosEcSensorhubDataFtraceEvent delta
             * @property {number|null} [ecFifoTimestamp] CrosEcSensorhubDataFtraceEvent ecFifoTimestamp
             * @property {number|null} [ecSensorNum] CrosEcSensorhubDataFtraceEvent ecSensorNum
             * @property {number|null} [fifoTimestamp] CrosEcSensorhubDataFtraceEvent fifoTimestamp
             */

            /**
             * Constructs a new CrosEcSensorhubDataFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a CrosEcSensorhubDataFtraceEvent.
             * @implements ICrosEcSensorhubDataFtraceEvent
             * @constructor
             * @param {perfetto.protos.ICrosEcSensorhubDataFtraceEvent=} [p] Properties to set
             */
            function CrosEcSensorhubDataFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * CrosEcSensorhubDataFtraceEvent currentTime.
             * @member {number} currentTime
             * @memberof perfetto.protos.CrosEcSensorhubDataFtraceEvent
             * @instance
             */
            CrosEcSensorhubDataFtraceEvent.prototype.currentTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * CrosEcSensorhubDataFtraceEvent currentTimestamp.
             * @member {number} currentTimestamp
             * @memberof perfetto.protos.CrosEcSensorhubDataFtraceEvent
             * @instance
             */
            CrosEcSensorhubDataFtraceEvent.prototype.currentTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * CrosEcSensorhubDataFtraceEvent delta.
             * @member {number} delta
             * @memberof perfetto.protos.CrosEcSensorhubDataFtraceEvent
             * @instance
             */
            CrosEcSensorhubDataFtraceEvent.prototype.delta = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * CrosEcSensorhubDataFtraceEvent ecFifoTimestamp.
             * @member {number} ecFifoTimestamp
             * @memberof perfetto.protos.CrosEcSensorhubDataFtraceEvent
             * @instance
             */
            CrosEcSensorhubDataFtraceEvent.prototype.ecFifoTimestamp = 0;

            /**
             * CrosEcSensorhubDataFtraceEvent ecSensorNum.
             * @member {number} ecSensorNum
             * @memberof perfetto.protos.CrosEcSensorhubDataFtraceEvent
             * @instance
             */
            CrosEcSensorhubDataFtraceEvent.prototype.ecSensorNum = 0;

            /**
             * CrosEcSensorhubDataFtraceEvent fifoTimestamp.
             * @member {number} fifoTimestamp
             * @memberof perfetto.protos.CrosEcSensorhubDataFtraceEvent
             * @instance
             */
            CrosEcSensorhubDataFtraceEvent.prototype.fifoTimestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new CrosEcSensorhubDataFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.CrosEcSensorhubDataFtraceEvent
             * @static
             * @param {perfetto.protos.ICrosEcSensorhubDataFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.CrosEcSensorhubDataFtraceEvent} CrosEcSensorhubDataFtraceEvent instance
             */
            CrosEcSensorhubDataFtraceEvent.create = function create(properties) {
                return new CrosEcSensorhubDataFtraceEvent(properties);
            };

            /**
             * Encodes the specified CrosEcSensorhubDataFtraceEvent message. Does not implicitly {@link perfetto.protos.CrosEcSensorhubDataFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.CrosEcSensorhubDataFtraceEvent
             * @static
             * @param {perfetto.protos.ICrosEcSensorhubDataFtraceEvent} m CrosEcSensorhubDataFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CrosEcSensorhubDataFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.currentTime != null && Object.hasOwnProperty.call(m, "currentTime"))
                    w.uint32(8).int64(m.currentTime);
                if (m.currentTimestamp != null && Object.hasOwnProperty.call(m, "currentTimestamp"))
                    w.uint32(16).int64(m.currentTimestamp);
                if (m.delta != null && Object.hasOwnProperty.call(m, "delta"))
                    w.uint32(24).int64(m.delta);
                if (m.ecFifoTimestamp != null && Object.hasOwnProperty.call(m, "ecFifoTimestamp"))
                    w.uint32(32).uint32(m.ecFifoTimestamp);
                if (m.ecSensorNum != null && Object.hasOwnProperty.call(m, "ecSensorNum"))
                    w.uint32(40).uint32(m.ecSensorNum);
                if (m.fifoTimestamp != null && Object.hasOwnProperty.call(m, "fifoTimestamp"))
                    w.uint32(48).int64(m.fifoTimestamp);
                return w;
            };

            /**
             * Encodes the specified CrosEcSensorhubDataFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.CrosEcSensorhubDataFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.CrosEcSensorhubDataFtraceEvent
             * @static
             * @param {perfetto.protos.ICrosEcSensorhubDataFtraceEvent} message CrosEcSensorhubDataFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CrosEcSensorhubDataFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CrosEcSensorhubDataFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.CrosEcSensorhubDataFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.CrosEcSensorhubDataFtraceEvent} CrosEcSensorhubDataFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CrosEcSensorhubDataFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.CrosEcSensorhubDataFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.currentTime = r.int64();
                        break;
                    case 2:
                        m.currentTimestamp = r.int64();
                        break;
                    case 3:
                        m.delta = r.int64();
                        break;
                    case 4:
                        m.ecFifoTimestamp = r.uint32();
                        break;
                    case 5:
                        m.ecSensorNum = r.uint32();
                        break;
                    case 6:
                        m.fifoTimestamp = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a CrosEcSensorhubDataFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.CrosEcSensorhubDataFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.CrosEcSensorhubDataFtraceEvent} CrosEcSensorhubDataFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CrosEcSensorhubDataFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CrosEcSensorhubDataFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.CrosEcSensorhubDataFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CrosEcSensorhubDataFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.currentTime != null && m.hasOwnProperty("currentTime")) {
                    if (!$util.isInteger(m.currentTime) && !(m.currentTime && $util.isInteger(m.currentTime.low) && $util.isInteger(m.currentTime.high)))
                        return "currentTime: integer|Long expected";
                }
                if (m.currentTimestamp != null && m.hasOwnProperty("currentTimestamp")) {
                    if (!$util.isInteger(m.currentTimestamp) && !(m.currentTimestamp && $util.isInteger(m.currentTimestamp.low) && $util.isInteger(m.currentTimestamp.high)))
                        return "currentTimestamp: integer|Long expected";
                }
                if (m.delta != null && m.hasOwnProperty("delta")) {
                    if (!$util.isInteger(m.delta) && !(m.delta && $util.isInteger(m.delta.low) && $util.isInteger(m.delta.high)))
                        return "delta: integer|Long expected";
                }
                if (m.ecFifoTimestamp != null && m.hasOwnProperty("ecFifoTimestamp")) {
                    if (!$util.isInteger(m.ecFifoTimestamp))
                        return "ecFifoTimestamp: integer expected";
                }
                if (m.ecSensorNum != null && m.hasOwnProperty("ecSensorNum")) {
                    if (!$util.isInteger(m.ecSensorNum))
                        return "ecSensorNum: integer expected";
                }
                if (m.fifoTimestamp != null && m.hasOwnProperty("fifoTimestamp")) {
                    if (!$util.isInteger(m.fifoTimestamp) && !(m.fifoTimestamp && $util.isInteger(m.fifoTimestamp.low) && $util.isInteger(m.fifoTimestamp.high)))
                        return "fifoTimestamp: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a CrosEcSensorhubDataFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.CrosEcSensorhubDataFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.CrosEcSensorhubDataFtraceEvent} CrosEcSensorhubDataFtraceEvent
             */
            CrosEcSensorhubDataFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.CrosEcSensorhubDataFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.CrosEcSensorhubDataFtraceEvent();
                if (d.currentTime != null) {
                    if ($util.Long)
                        (m.currentTime = $util.Long.fromValue(d.currentTime)).unsigned = false;
                    else if (typeof d.currentTime === "string")
                        m.currentTime = parseInt(d.currentTime, 10);
                    else if (typeof d.currentTime === "number")
                        m.currentTime = d.currentTime;
                    else if (typeof d.currentTime === "object")
                        m.currentTime = new $util.LongBits(d.currentTime.low >>> 0, d.currentTime.high >>> 0).toNumber();
                }
                if (d.currentTimestamp != null) {
                    if ($util.Long)
                        (m.currentTimestamp = $util.Long.fromValue(d.currentTimestamp)).unsigned = false;
                    else if (typeof d.currentTimestamp === "string")
                        m.currentTimestamp = parseInt(d.currentTimestamp, 10);
                    else if (typeof d.currentTimestamp === "number")
                        m.currentTimestamp = d.currentTimestamp;
                    else if (typeof d.currentTimestamp === "object")
                        m.currentTimestamp = new $util.LongBits(d.currentTimestamp.low >>> 0, d.currentTimestamp.high >>> 0).toNumber();
                }
                if (d.delta != null) {
                    if ($util.Long)
                        (m.delta = $util.Long.fromValue(d.delta)).unsigned = false;
                    else if (typeof d.delta === "string")
                        m.delta = parseInt(d.delta, 10);
                    else if (typeof d.delta === "number")
                        m.delta = d.delta;
                    else if (typeof d.delta === "object")
                        m.delta = new $util.LongBits(d.delta.low >>> 0, d.delta.high >>> 0).toNumber();
                }
                if (d.ecFifoTimestamp != null) {
                    m.ecFifoTimestamp = d.ecFifoTimestamp >>> 0;
                }
                if (d.ecSensorNum != null) {
                    m.ecSensorNum = d.ecSensorNum >>> 0;
                }
                if (d.fifoTimestamp != null) {
                    if ($util.Long)
                        (m.fifoTimestamp = $util.Long.fromValue(d.fifoTimestamp)).unsigned = false;
                    else if (typeof d.fifoTimestamp === "string")
                        m.fifoTimestamp = parseInt(d.fifoTimestamp, 10);
                    else if (typeof d.fifoTimestamp === "number")
                        m.fifoTimestamp = d.fifoTimestamp;
                    else if (typeof d.fifoTimestamp === "object")
                        m.fifoTimestamp = new $util.LongBits(d.fifoTimestamp.low >>> 0, d.fifoTimestamp.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from a CrosEcSensorhubDataFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.CrosEcSensorhubDataFtraceEvent
             * @static
             * @param {perfetto.protos.CrosEcSensorhubDataFtraceEvent} m CrosEcSensorhubDataFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CrosEcSensorhubDataFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.currentTime = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.currentTime = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.currentTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.currentTimestamp = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.delta = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.delta = o.longs === String ? "0" : 0;
                    d.ecFifoTimestamp = 0;
                    d.ecSensorNum = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.fifoTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.fifoTimestamp = o.longs === String ? "0" : 0;
                }
                if (m.currentTime != null && m.hasOwnProperty("currentTime")) {
                    if (typeof m.currentTime === "number")
                        d.currentTime = o.longs === String ? String(m.currentTime) : m.currentTime;
                    else
                        d.currentTime = o.longs === String ? $util.Long.prototype.toString.call(m.currentTime) : o.longs === Number ? new $util.LongBits(m.currentTime.low >>> 0, m.currentTime.high >>> 0).toNumber() : m.currentTime;
                }
                if (m.currentTimestamp != null && m.hasOwnProperty("currentTimestamp")) {
                    if (typeof m.currentTimestamp === "number")
                        d.currentTimestamp = o.longs === String ? String(m.currentTimestamp) : m.currentTimestamp;
                    else
                        d.currentTimestamp = o.longs === String ? $util.Long.prototype.toString.call(m.currentTimestamp) : o.longs === Number ? new $util.LongBits(m.currentTimestamp.low >>> 0, m.currentTimestamp.high >>> 0).toNumber() : m.currentTimestamp;
                }
                if (m.delta != null && m.hasOwnProperty("delta")) {
                    if (typeof m.delta === "number")
                        d.delta = o.longs === String ? String(m.delta) : m.delta;
                    else
                        d.delta = o.longs === String ? $util.Long.prototype.toString.call(m.delta) : o.longs === Number ? new $util.LongBits(m.delta.low >>> 0, m.delta.high >>> 0).toNumber() : m.delta;
                }
                if (m.ecFifoTimestamp != null && m.hasOwnProperty("ecFifoTimestamp")) {
                    d.ecFifoTimestamp = m.ecFifoTimestamp;
                }
                if (m.ecSensorNum != null && m.hasOwnProperty("ecSensorNum")) {
                    d.ecSensorNum = m.ecSensorNum;
                }
                if (m.fifoTimestamp != null && m.hasOwnProperty("fifoTimestamp")) {
                    if (typeof m.fifoTimestamp === "number")
                        d.fifoTimestamp = o.longs === String ? String(m.fifoTimestamp) : m.fifoTimestamp;
                    else
                        d.fifoTimestamp = o.longs === String ? $util.Long.prototype.toString.call(m.fifoTimestamp) : o.longs === Number ? new $util.LongBits(m.fifoTimestamp.low >>> 0, m.fifoTimestamp.high >>> 0).toNumber() : m.fifoTimestamp;
                }
                return d;
            };

            /**
             * Converts this CrosEcSensorhubDataFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.CrosEcSensorhubDataFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CrosEcSensorhubDataFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return CrosEcSensorhubDataFtraceEvent;
        })();

        protos.DmaFenceInitFtraceEvent = (function() {

            /**
             * Properties of a DmaFenceInitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IDmaFenceInitFtraceEvent
             * @property {number|null} [context] DmaFenceInitFtraceEvent context
             * @property {string|null} [driver] DmaFenceInitFtraceEvent driver
             * @property {number|null} [seqno] DmaFenceInitFtraceEvent seqno
             * @property {string|null} [timeline] DmaFenceInitFtraceEvent timeline
             */

            /**
             * Constructs a new DmaFenceInitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a DmaFenceInitFtraceEvent.
             * @implements IDmaFenceInitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IDmaFenceInitFtraceEvent=} [p] Properties to set
             */
            function DmaFenceInitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DmaFenceInitFtraceEvent context.
             * @member {number} context
             * @memberof perfetto.protos.DmaFenceInitFtraceEvent
             * @instance
             */
            DmaFenceInitFtraceEvent.prototype.context = 0;

            /**
             * DmaFenceInitFtraceEvent driver.
             * @member {string} driver
             * @memberof perfetto.protos.DmaFenceInitFtraceEvent
             * @instance
             */
            DmaFenceInitFtraceEvent.prototype.driver = "";

            /**
             * DmaFenceInitFtraceEvent seqno.
             * @member {number} seqno
             * @memberof perfetto.protos.DmaFenceInitFtraceEvent
             * @instance
             */
            DmaFenceInitFtraceEvent.prototype.seqno = 0;

            /**
             * DmaFenceInitFtraceEvent timeline.
             * @member {string} timeline
             * @memberof perfetto.protos.DmaFenceInitFtraceEvent
             * @instance
             */
            DmaFenceInitFtraceEvent.prototype.timeline = "";

            /**
             * Creates a new DmaFenceInitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DmaFenceInitFtraceEvent
             * @static
             * @param {perfetto.protos.IDmaFenceInitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.DmaFenceInitFtraceEvent} DmaFenceInitFtraceEvent instance
             */
            DmaFenceInitFtraceEvent.create = function create(properties) {
                return new DmaFenceInitFtraceEvent(properties);
            };

            /**
             * Encodes the specified DmaFenceInitFtraceEvent message. Does not implicitly {@link perfetto.protos.DmaFenceInitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DmaFenceInitFtraceEvent
             * @static
             * @param {perfetto.protos.IDmaFenceInitFtraceEvent} m DmaFenceInitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DmaFenceInitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.context != null && Object.hasOwnProperty.call(m, "context"))
                    w.uint32(8).uint32(m.context);
                if (m.driver != null && Object.hasOwnProperty.call(m, "driver"))
                    w.uint32(18).string(m.driver);
                if (m.seqno != null && Object.hasOwnProperty.call(m, "seqno"))
                    w.uint32(24).uint32(m.seqno);
                if (m.timeline != null && Object.hasOwnProperty.call(m, "timeline"))
                    w.uint32(34).string(m.timeline);
                return w;
            };

            /**
             * Encodes the specified DmaFenceInitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.DmaFenceInitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DmaFenceInitFtraceEvent
             * @static
             * @param {perfetto.protos.IDmaFenceInitFtraceEvent} message DmaFenceInitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DmaFenceInitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DmaFenceInitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DmaFenceInitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DmaFenceInitFtraceEvent} DmaFenceInitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DmaFenceInitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DmaFenceInitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.context = r.uint32();
                        break;
                    case 2:
                        m.driver = r.string();
                        break;
                    case 3:
                        m.seqno = r.uint32();
                        break;
                    case 4:
                        m.timeline = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DmaFenceInitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DmaFenceInitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DmaFenceInitFtraceEvent} DmaFenceInitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DmaFenceInitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DmaFenceInitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.DmaFenceInitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DmaFenceInitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.context != null && m.hasOwnProperty("context")) {
                    if (!$util.isInteger(m.context))
                        return "context: integer expected";
                }
                if (m.driver != null && m.hasOwnProperty("driver")) {
                    if (!$util.isString(m.driver))
                        return "driver: string expected";
                }
                if (m.seqno != null && m.hasOwnProperty("seqno")) {
                    if (!$util.isInteger(m.seqno))
                        return "seqno: integer expected";
                }
                if (m.timeline != null && m.hasOwnProperty("timeline")) {
                    if (!$util.isString(m.timeline))
                        return "timeline: string expected";
                }
                return null;
            };

            /**
             * Creates a DmaFenceInitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DmaFenceInitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DmaFenceInitFtraceEvent} DmaFenceInitFtraceEvent
             */
            DmaFenceInitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DmaFenceInitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.DmaFenceInitFtraceEvent();
                if (d.context != null) {
                    m.context = d.context >>> 0;
                }
                if (d.driver != null) {
                    m.driver = String(d.driver);
                }
                if (d.seqno != null) {
                    m.seqno = d.seqno >>> 0;
                }
                if (d.timeline != null) {
                    m.timeline = String(d.timeline);
                }
                return m;
            };

            /**
             * Creates a plain object from a DmaFenceInitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DmaFenceInitFtraceEvent
             * @static
             * @param {perfetto.protos.DmaFenceInitFtraceEvent} m DmaFenceInitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DmaFenceInitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.context = 0;
                    d.driver = "";
                    d.seqno = 0;
                    d.timeline = "";
                }
                if (m.context != null && m.hasOwnProperty("context")) {
                    d.context = m.context;
                }
                if (m.driver != null && m.hasOwnProperty("driver")) {
                    d.driver = m.driver;
                }
                if (m.seqno != null && m.hasOwnProperty("seqno")) {
                    d.seqno = m.seqno;
                }
                if (m.timeline != null && m.hasOwnProperty("timeline")) {
                    d.timeline = m.timeline;
                }
                return d;
            };

            /**
             * Converts this DmaFenceInitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DmaFenceInitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DmaFenceInitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DmaFenceInitFtraceEvent;
        })();

        protos.DmaFenceEmitFtraceEvent = (function() {

            /**
             * Properties of a DmaFenceEmitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IDmaFenceEmitFtraceEvent
             * @property {number|null} [context] DmaFenceEmitFtraceEvent context
             * @property {string|null} [driver] DmaFenceEmitFtraceEvent driver
             * @property {number|null} [seqno] DmaFenceEmitFtraceEvent seqno
             * @property {string|null} [timeline] DmaFenceEmitFtraceEvent timeline
             */

            /**
             * Constructs a new DmaFenceEmitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a DmaFenceEmitFtraceEvent.
             * @implements IDmaFenceEmitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IDmaFenceEmitFtraceEvent=} [p] Properties to set
             */
            function DmaFenceEmitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DmaFenceEmitFtraceEvent context.
             * @member {number} context
             * @memberof perfetto.protos.DmaFenceEmitFtraceEvent
             * @instance
             */
            DmaFenceEmitFtraceEvent.prototype.context = 0;

            /**
             * DmaFenceEmitFtraceEvent driver.
             * @member {string} driver
             * @memberof perfetto.protos.DmaFenceEmitFtraceEvent
             * @instance
             */
            DmaFenceEmitFtraceEvent.prototype.driver = "";

            /**
             * DmaFenceEmitFtraceEvent seqno.
             * @member {number} seqno
             * @memberof perfetto.protos.DmaFenceEmitFtraceEvent
             * @instance
             */
            DmaFenceEmitFtraceEvent.prototype.seqno = 0;

            /**
             * DmaFenceEmitFtraceEvent timeline.
             * @member {string} timeline
             * @memberof perfetto.protos.DmaFenceEmitFtraceEvent
             * @instance
             */
            DmaFenceEmitFtraceEvent.prototype.timeline = "";

            /**
             * Creates a new DmaFenceEmitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DmaFenceEmitFtraceEvent
             * @static
             * @param {perfetto.protos.IDmaFenceEmitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.DmaFenceEmitFtraceEvent} DmaFenceEmitFtraceEvent instance
             */
            DmaFenceEmitFtraceEvent.create = function create(properties) {
                return new DmaFenceEmitFtraceEvent(properties);
            };

            /**
             * Encodes the specified DmaFenceEmitFtraceEvent message. Does not implicitly {@link perfetto.protos.DmaFenceEmitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DmaFenceEmitFtraceEvent
             * @static
             * @param {perfetto.protos.IDmaFenceEmitFtraceEvent} m DmaFenceEmitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DmaFenceEmitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.context != null && Object.hasOwnProperty.call(m, "context"))
                    w.uint32(8).uint32(m.context);
                if (m.driver != null && Object.hasOwnProperty.call(m, "driver"))
                    w.uint32(18).string(m.driver);
                if (m.seqno != null && Object.hasOwnProperty.call(m, "seqno"))
                    w.uint32(24).uint32(m.seqno);
                if (m.timeline != null && Object.hasOwnProperty.call(m, "timeline"))
                    w.uint32(34).string(m.timeline);
                return w;
            };

            /**
             * Encodes the specified DmaFenceEmitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.DmaFenceEmitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DmaFenceEmitFtraceEvent
             * @static
             * @param {perfetto.protos.IDmaFenceEmitFtraceEvent} message DmaFenceEmitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DmaFenceEmitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DmaFenceEmitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DmaFenceEmitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DmaFenceEmitFtraceEvent} DmaFenceEmitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DmaFenceEmitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DmaFenceEmitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.context = r.uint32();
                        break;
                    case 2:
                        m.driver = r.string();
                        break;
                    case 3:
                        m.seqno = r.uint32();
                        break;
                    case 4:
                        m.timeline = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DmaFenceEmitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DmaFenceEmitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DmaFenceEmitFtraceEvent} DmaFenceEmitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DmaFenceEmitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DmaFenceEmitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.DmaFenceEmitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DmaFenceEmitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.context != null && m.hasOwnProperty("context")) {
                    if (!$util.isInteger(m.context))
                        return "context: integer expected";
                }
                if (m.driver != null && m.hasOwnProperty("driver")) {
                    if (!$util.isString(m.driver))
                        return "driver: string expected";
                }
                if (m.seqno != null && m.hasOwnProperty("seqno")) {
                    if (!$util.isInteger(m.seqno))
                        return "seqno: integer expected";
                }
                if (m.timeline != null && m.hasOwnProperty("timeline")) {
                    if (!$util.isString(m.timeline))
                        return "timeline: string expected";
                }
                return null;
            };

            /**
             * Creates a DmaFenceEmitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DmaFenceEmitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DmaFenceEmitFtraceEvent} DmaFenceEmitFtraceEvent
             */
            DmaFenceEmitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DmaFenceEmitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.DmaFenceEmitFtraceEvent();
                if (d.context != null) {
                    m.context = d.context >>> 0;
                }
                if (d.driver != null) {
                    m.driver = String(d.driver);
                }
                if (d.seqno != null) {
                    m.seqno = d.seqno >>> 0;
                }
                if (d.timeline != null) {
                    m.timeline = String(d.timeline);
                }
                return m;
            };

            /**
             * Creates a plain object from a DmaFenceEmitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DmaFenceEmitFtraceEvent
             * @static
             * @param {perfetto.protos.DmaFenceEmitFtraceEvent} m DmaFenceEmitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DmaFenceEmitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.context = 0;
                    d.driver = "";
                    d.seqno = 0;
                    d.timeline = "";
                }
                if (m.context != null && m.hasOwnProperty("context")) {
                    d.context = m.context;
                }
                if (m.driver != null && m.hasOwnProperty("driver")) {
                    d.driver = m.driver;
                }
                if (m.seqno != null && m.hasOwnProperty("seqno")) {
                    d.seqno = m.seqno;
                }
                if (m.timeline != null && m.hasOwnProperty("timeline")) {
                    d.timeline = m.timeline;
                }
                return d;
            };

            /**
             * Converts this DmaFenceEmitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DmaFenceEmitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DmaFenceEmitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DmaFenceEmitFtraceEvent;
        })();

        protos.DmaFenceSignaledFtraceEvent = (function() {

            /**
             * Properties of a DmaFenceSignaledFtraceEvent.
             * @memberof perfetto.protos
             * @interface IDmaFenceSignaledFtraceEvent
             * @property {number|null} [context] DmaFenceSignaledFtraceEvent context
             * @property {string|null} [driver] DmaFenceSignaledFtraceEvent driver
             * @property {number|null} [seqno] DmaFenceSignaledFtraceEvent seqno
             * @property {string|null} [timeline] DmaFenceSignaledFtraceEvent timeline
             */

            /**
             * Constructs a new DmaFenceSignaledFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a DmaFenceSignaledFtraceEvent.
             * @implements IDmaFenceSignaledFtraceEvent
             * @constructor
             * @param {perfetto.protos.IDmaFenceSignaledFtraceEvent=} [p] Properties to set
             */
            function DmaFenceSignaledFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DmaFenceSignaledFtraceEvent context.
             * @member {number} context
             * @memberof perfetto.protos.DmaFenceSignaledFtraceEvent
             * @instance
             */
            DmaFenceSignaledFtraceEvent.prototype.context = 0;

            /**
             * DmaFenceSignaledFtraceEvent driver.
             * @member {string} driver
             * @memberof perfetto.protos.DmaFenceSignaledFtraceEvent
             * @instance
             */
            DmaFenceSignaledFtraceEvent.prototype.driver = "";

            /**
             * DmaFenceSignaledFtraceEvent seqno.
             * @member {number} seqno
             * @memberof perfetto.protos.DmaFenceSignaledFtraceEvent
             * @instance
             */
            DmaFenceSignaledFtraceEvent.prototype.seqno = 0;

            /**
             * DmaFenceSignaledFtraceEvent timeline.
             * @member {string} timeline
             * @memberof perfetto.protos.DmaFenceSignaledFtraceEvent
             * @instance
             */
            DmaFenceSignaledFtraceEvent.prototype.timeline = "";

            /**
             * Creates a new DmaFenceSignaledFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DmaFenceSignaledFtraceEvent
             * @static
             * @param {perfetto.protos.IDmaFenceSignaledFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.DmaFenceSignaledFtraceEvent} DmaFenceSignaledFtraceEvent instance
             */
            DmaFenceSignaledFtraceEvent.create = function create(properties) {
                return new DmaFenceSignaledFtraceEvent(properties);
            };

            /**
             * Encodes the specified DmaFenceSignaledFtraceEvent message. Does not implicitly {@link perfetto.protos.DmaFenceSignaledFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DmaFenceSignaledFtraceEvent
             * @static
             * @param {perfetto.protos.IDmaFenceSignaledFtraceEvent} m DmaFenceSignaledFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DmaFenceSignaledFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.context != null && Object.hasOwnProperty.call(m, "context"))
                    w.uint32(8).uint32(m.context);
                if (m.driver != null && Object.hasOwnProperty.call(m, "driver"))
                    w.uint32(18).string(m.driver);
                if (m.seqno != null && Object.hasOwnProperty.call(m, "seqno"))
                    w.uint32(24).uint32(m.seqno);
                if (m.timeline != null && Object.hasOwnProperty.call(m, "timeline"))
                    w.uint32(34).string(m.timeline);
                return w;
            };

            /**
             * Encodes the specified DmaFenceSignaledFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.DmaFenceSignaledFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DmaFenceSignaledFtraceEvent
             * @static
             * @param {perfetto.protos.IDmaFenceSignaledFtraceEvent} message DmaFenceSignaledFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DmaFenceSignaledFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DmaFenceSignaledFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DmaFenceSignaledFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DmaFenceSignaledFtraceEvent} DmaFenceSignaledFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DmaFenceSignaledFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DmaFenceSignaledFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.context = r.uint32();
                        break;
                    case 2:
                        m.driver = r.string();
                        break;
                    case 3:
                        m.seqno = r.uint32();
                        break;
                    case 4:
                        m.timeline = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DmaFenceSignaledFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DmaFenceSignaledFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DmaFenceSignaledFtraceEvent} DmaFenceSignaledFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DmaFenceSignaledFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DmaFenceSignaledFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.DmaFenceSignaledFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DmaFenceSignaledFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.context != null && m.hasOwnProperty("context")) {
                    if (!$util.isInteger(m.context))
                        return "context: integer expected";
                }
                if (m.driver != null && m.hasOwnProperty("driver")) {
                    if (!$util.isString(m.driver))
                        return "driver: string expected";
                }
                if (m.seqno != null && m.hasOwnProperty("seqno")) {
                    if (!$util.isInteger(m.seqno))
                        return "seqno: integer expected";
                }
                if (m.timeline != null && m.hasOwnProperty("timeline")) {
                    if (!$util.isString(m.timeline))
                        return "timeline: string expected";
                }
                return null;
            };

            /**
             * Creates a DmaFenceSignaledFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DmaFenceSignaledFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DmaFenceSignaledFtraceEvent} DmaFenceSignaledFtraceEvent
             */
            DmaFenceSignaledFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DmaFenceSignaledFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.DmaFenceSignaledFtraceEvent();
                if (d.context != null) {
                    m.context = d.context >>> 0;
                }
                if (d.driver != null) {
                    m.driver = String(d.driver);
                }
                if (d.seqno != null) {
                    m.seqno = d.seqno >>> 0;
                }
                if (d.timeline != null) {
                    m.timeline = String(d.timeline);
                }
                return m;
            };

            /**
             * Creates a plain object from a DmaFenceSignaledFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DmaFenceSignaledFtraceEvent
             * @static
             * @param {perfetto.protos.DmaFenceSignaledFtraceEvent} m DmaFenceSignaledFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DmaFenceSignaledFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.context = 0;
                    d.driver = "";
                    d.seqno = 0;
                    d.timeline = "";
                }
                if (m.context != null && m.hasOwnProperty("context")) {
                    d.context = m.context;
                }
                if (m.driver != null && m.hasOwnProperty("driver")) {
                    d.driver = m.driver;
                }
                if (m.seqno != null && m.hasOwnProperty("seqno")) {
                    d.seqno = m.seqno;
                }
                if (m.timeline != null && m.hasOwnProperty("timeline")) {
                    d.timeline = m.timeline;
                }
                return d;
            };

            /**
             * Converts this DmaFenceSignaledFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DmaFenceSignaledFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DmaFenceSignaledFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DmaFenceSignaledFtraceEvent;
        })();

        protos.DmaFenceWaitStartFtraceEvent = (function() {

            /**
             * Properties of a DmaFenceWaitStartFtraceEvent.
             * @memberof perfetto.protos
             * @interface IDmaFenceWaitStartFtraceEvent
             * @property {number|null} [context] DmaFenceWaitStartFtraceEvent context
             * @property {string|null} [driver] DmaFenceWaitStartFtraceEvent driver
             * @property {number|null} [seqno] DmaFenceWaitStartFtraceEvent seqno
             * @property {string|null} [timeline] DmaFenceWaitStartFtraceEvent timeline
             */

            /**
             * Constructs a new DmaFenceWaitStartFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a DmaFenceWaitStartFtraceEvent.
             * @implements IDmaFenceWaitStartFtraceEvent
             * @constructor
             * @param {perfetto.protos.IDmaFenceWaitStartFtraceEvent=} [p] Properties to set
             */
            function DmaFenceWaitStartFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DmaFenceWaitStartFtraceEvent context.
             * @member {number} context
             * @memberof perfetto.protos.DmaFenceWaitStartFtraceEvent
             * @instance
             */
            DmaFenceWaitStartFtraceEvent.prototype.context = 0;

            /**
             * DmaFenceWaitStartFtraceEvent driver.
             * @member {string} driver
             * @memberof perfetto.protos.DmaFenceWaitStartFtraceEvent
             * @instance
             */
            DmaFenceWaitStartFtraceEvent.prototype.driver = "";

            /**
             * DmaFenceWaitStartFtraceEvent seqno.
             * @member {number} seqno
             * @memberof perfetto.protos.DmaFenceWaitStartFtraceEvent
             * @instance
             */
            DmaFenceWaitStartFtraceEvent.prototype.seqno = 0;

            /**
             * DmaFenceWaitStartFtraceEvent timeline.
             * @member {string} timeline
             * @memberof perfetto.protos.DmaFenceWaitStartFtraceEvent
             * @instance
             */
            DmaFenceWaitStartFtraceEvent.prototype.timeline = "";

            /**
             * Creates a new DmaFenceWaitStartFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DmaFenceWaitStartFtraceEvent
             * @static
             * @param {perfetto.protos.IDmaFenceWaitStartFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.DmaFenceWaitStartFtraceEvent} DmaFenceWaitStartFtraceEvent instance
             */
            DmaFenceWaitStartFtraceEvent.create = function create(properties) {
                return new DmaFenceWaitStartFtraceEvent(properties);
            };

            /**
             * Encodes the specified DmaFenceWaitStartFtraceEvent message. Does not implicitly {@link perfetto.protos.DmaFenceWaitStartFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DmaFenceWaitStartFtraceEvent
             * @static
             * @param {perfetto.protos.IDmaFenceWaitStartFtraceEvent} m DmaFenceWaitStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DmaFenceWaitStartFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.context != null && Object.hasOwnProperty.call(m, "context"))
                    w.uint32(8).uint32(m.context);
                if (m.driver != null && Object.hasOwnProperty.call(m, "driver"))
                    w.uint32(18).string(m.driver);
                if (m.seqno != null && Object.hasOwnProperty.call(m, "seqno"))
                    w.uint32(24).uint32(m.seqno);
                if (m.timeline != null && Object.hasOwnProperty.call(m, "timeline"))
                    w.uint32(34).string(m.timeline);
                return w;
            };

            /**
             * Encodes the specified DmaFenceWaitStartFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.DmaFenceWaitStartFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DmaFenceWaitStartFtraceEvent
             * @static
             * @param {perfetto.protos.IDmaFenceWaitStartFtraceEvent} message DmaFenceWaitStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DmaFenceWaitStartFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DmaFenceWaitStartFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DmaFenceWaitStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DmaFenceWaitStartFtraceEvent} DmaFenceWaitStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DmaFenceWaitStartFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DmaFenceWaitStartFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.context = r.uint32();
                        break;
                    case 2:
                        m.driver = r.string();
                        break;
                    case 3:
                        m.seqno = r.uint32();
                        break;
                    case 4:
                        m.timeline = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DmaFenceWaitStartFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DmaFenceWaitStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DmaFenceWaitStartFtraceEvent} DmaFenceWaitStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DmaFenceWaitStartFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DmaFenceWaitStartFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.DmaFenceWaitStartFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DmaFenceWaitStartFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.context != null && m.hasOwnProperty("context")) {
                    if (!$util.isInteger(m.context))
                        return "context: integer expected";
                }
                if (m.driver != null && m.hasOwnProperty("driver")) {
                    if (!$util.isString(m.driver))
                        return "driver: string expected";
                }
                if (m.seqno != null && m.hasOwnProperty("seqno")) {
                    if (!$util.isInteger(m.seqno))
                        return "seqno: integer expected";
                }
                if (m.timeline != null && m.hasOwnProperty("timeline")) {
                    if (!$util.isString(m.timeline))
                        return "timeline: string expected";
                }
                return null;
            };

            /**
             * Creates a DmaFenceWaitStartFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DmaFenceWaitStartFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DmaFenceWaitStartFtraceEvent} DmaFenceWaitStartFtraceEvent
             */
            DmaFenceWaitStartFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DmaFenceWaitStartFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.DmaFenceWaitStartFtraceEvent();
                if (d.context != null) {
                    m.context = d.context >>> 0;
                }
                if (d.driver != null) {
                    m.driver = String(d.driver);
                }
                if (d.seqno != null) {
                    m.seqno = d.seqno >>> 0;
                }
                if (d.timeline != null) {
                    m.timeline = String(d.timeline);
                }
                return m;
            };

            /**
             * Creates a plain object from a DmaFenceWaitStartFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DmaFenceWaitStartFtraceEvent
             * @static
             * @param {perfetto.protos.DmaFenceWaitStartFtraceEvent} m DmaFenceWaitStartFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DmaFenceWaitStartFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.context = 0;
                    d.driver = "";
                    d.seqno = 0;
                    d.timeline = "";
                }
                if (m.context != null && m.hasOwnProperty("context")) {
                    d.context = m.context;
                }
                if (m.driver != null && m.hasOwnProperty("driver")) {
                    d.driver = m.driver;
                }
                if (m.seqno != null && m.hasOwnProperty("seqno")) {
                    d.seqno = m.seqno;
                }
                if (m.timeline != null && m.hasOwnProperty("timeline")) {
                    d.timeline = m.timeline;
                }
                return d;
            };

            /**
             * Converts this DmaFenceWaitStartFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DmaFenceWaitStartFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DmaFenceWaitStartFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DmaFenceWaitStartFtraceEvent;
        })();

        protos.DmaFenceWaitEndFtraceEvent = (function() {

            /**
             * Properties of a DmaFenceWaitEndFtraceEvent.
             * @memberof perfetto.protos
             * @interface IDmaFenceWaitEndFtraceEvent
             * @property {number|null} [context] DmaFenceWaitEndFtraceEvent context
             * @property {string|null} [driver] DmaFenceWaitEndFtraceEvent driver
             * @property {number|null} [seqno] DmaFenceWaitEndFtraceEvent seqno
             * @property {string|null} [timeline] DmaFenceWaitEndFtraceEvent timeline
             */

            /**
             * Constructs a new DmaFenceWaitEndFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a DmaFenceWaitEndFtraceEvent.
             * @implements IDmaFenceWaitEndFtraceEvent
             * @constructor
             * @param {perfetto.protos.IDmaFenceWaitEndFtraceEvent=} [p] Properties to set
             */
            function DmaFenceWaitEndFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DmaFenceWaitEndFtraceEvent context.
             * @member {number} context
             * @memberof perfetto.protos.DmaFenceWaitEndFtraceEvent
             * @instance
             */
            DmaFenceWaitEndFtraceEvent.prototype.context = 0;

            /**
             * DmaFenceWaitEndFtraceEvent driver.
             * @member {string} driver
             * @memberof perfetto.protos.DmaFenceWaitEndFtraceEvent
             * @instance
             */
            DmaFenceWaitEndFtraceEvent.prototype.driver = "";

            /**
             * DmaFenceWaitEndFtraceEvent seqno.
             * @member {number} seqno
             * @memberof perfetto.protos.DmaFenceWaitEndFtraceEvent
             * @instance
             */
            DmaFenceWaitEndFtraceEvent.prototype.seqno = 0;

            /**
             * DmaFenceWaitEndFtraceEvent timeline.
             * @member {string} timeline
             * @memberof perfetto.protos.DmaFenceWaitEndFtraceEvent
             * @instance
             */
            DmaFenceWaitEndFtraceEvent.prototype.timeline = "";

            /**
             * Creates a new DmaFenceWaitEndFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DmaFenceWaitEndFtraceEvent
             * @static
             * @param {perfetto.protos.IDmaFenceWaitEndFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.DmaFenceWaitEndFtraceEvent} DmaFenceWaitEndFtraceEvent instance
             */
            DmaFenceWaitEndFtraceEvent.create = function create(properties) {
                return new DmaFenceWaitEndFtraceEvent(properties);
            };

            /**
             * Encodes the specified DmaFenceWaitEndFtraceEvent message. Does not implicitly {@link perfetto.protos.DmaFenceWaitEndFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DmaFenceWaitEndFtraceEvent
             * @static
             * @param {perfetto.protos.IDmaFenceWaitEndFtraceEvent} m DmaFenceWaitEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DmaFenceWaitEndFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.context != null && Object.hasOwnProperty.call(m, "context"))
                    w.uint32(8).uint32(m.context);
                if (m.driver != null && Object.hasOwnProperty.call(m, "driver"))
                    w.uint32(18).string(m.driver);
                if (m.seqno != null && Object.hasOwnProperty.call(m, "seqno"))
                    w.uint32(24).uint32(m.seqno);
                if (m.timeline != null && Object.hasOwnProperty.call(m, "timeline"))
                    w.uint32(34).string(m.timeline);
                return w;
            };

            /**
             * Encodes the specified DmaFenceWaitEndFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.DmaFenceWaitEndFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DmaFenceWaitEndFtraceEvent
             * @static
             * @param {perfetto.protos.IDmaFenceWaitEndFtraceEvent} message DmaFenceWaitEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DmaFenceWaitEndFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DmaFenceWaitEndFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DmaFenceWaitEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DmaFenceWaitEndFtraceEvent} DmaFenceWaitEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DmaFenceWaitEndFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DmaFenceWaitEndFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.context = r.uint32();
                        break;
                    case 2:
                        m.driver = r.string();
                        break;
                    case 3:
                        m.seqno = r.uint32();
                        break;
                    case 4:
                        m.timeline = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DmaFenceWaitEndFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DmaFenceWaitEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DmaFenceWaitEndFtraceEvent} DmaFenceWaitEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DmaFenceWaitEndFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DmaFenceWaitEndFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.DmaFenceWaitEndFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DmaFenceWaitEndFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.context != null && m.hasOwnProperty("context")) {
                    if (!$util.isInteger(m.context))
                        return "context: integer expected";
                }
                if (m.driver != null && m.hasOwnProperty("driver")) {
                    if (!$util.isString(m.driver))
                        return "driver: string expected";
                }
                if (m.seqno != null && m.hasOwnProperty("seqno")) {
                    if (!$util.isInteger(m.seqno))
                        return "seqno: integer expected";
                }
                if (m.timeline != null && m.hasOwnProperty("timeline")) {
                    if (!$util.isString(m.timeline))
                        return "timeline: string expected";
                }
                return null;
            };

            /**
             * Creates a DmaFenceWaitEndFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DmaFenceWaitEndFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DmaFenceWaitEndFtraceEvent} DmaFenceWaitEndFtraceEvent
             */
            DmaFenceWaitEndFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DmaFenceWaitEndFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.DmaFenceWaitEndFtraceEvent();
                if (d.context != null) {
                    m.context = d.context >>> 0;
                }
                if (d.driver != null) {
                    m.driver = String(d.driver);
                }
                if (d.seqno != null) {
                    m.seqno = d.seqno >>> 0;
                }
                if (d.timeline != null) {
                    m.timeline = String(d.timeline);
                }
                return m;
            };

            /**
             * Creates a plain object from a DmaFenceWaitEndFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DmaFenceWaitEndFtraceEvent
             * @static
             * @param {perfetto.protos.DmaFenceWaitEndFtraceEvent} m DmaFenceWaitEndFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DmaFenceWaitEndFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.context = 0;
                    d.driver = "";
                    d.seqno = 0;
                    d.timeline = "";
                }
                if (m.context != null && m.hasOwnProperty("context")) {
                    d.context = m.context;
                }
                if (m.driver != null && m.hasOwnProperty("driver")) {
                    d.driver = m.driver;
                }
                if (m.seqno != null && m.hasOwnProperty("seqno")) {
                    d.seqno = m.seqno;
                }
                if (m.timeline != null && m.hasOwnProperty("timeline")) {
                    d.timeline = m.timeline;
                }
                return d;
            };

            /**
             * Converts this DmaFenceWaitEndFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DmaFenceWaitEndFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DmaFenceWaitEndFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DmaFenceWaitEndFtraceEvent;
        })();

        protos.DmaHeapStatFtraceEvent = (function() {

            /**
             * Properties of a DmaHeapStatFtraceEvent.
             * @memberof perfetto.protos
             * @interface IDmaHeapStatFtraceEvent
             * @property {number|null} [inode] DmaHeapStatFtraceEvent inode
             * @property {number|null} [len] DmaHeapStatFtraceEvent len
             * @property {number|null} [totalAllocated] DmaHeapStatFtraceEvent totalAllocated
             */

            /**
             * Constructs a new DmaHeapStatFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a DmaHeapStatFtraceEvent.
             * @implements IDmaHeapStatFtraceEvent
             * @constructor
             * @param {perfetto.protos.IDmaHeapStatFtraceEvent=} [p] Properties to set
             */
            function DmaHeapStatFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DmaHeapStatFtraceEvent inode.
             * @member {number} inode
             * @memberof perfetto.protos.DmaHeapStatFtraceEvent
             * @instance
             */
            DmaHeapStatFtraceEvent.prototype.inode = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * DmaHeapStatFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.DmaHeapStatFtraceEvent
             * @instance
             */
            DmaHeapStatFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * DmaHeapStatFtraceEvent totalAllocated.
             * @member {number} totalAllocated
             * @memberof perfetto.protos.DmaHeapStatFtraceEvent
             * @instance
             */
            DmaHeapStatFtraceEvent.prototype.totalAllocated = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new DmaHeapStatFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DmaHeapStatFtraceEvent
             * @static
             * @param {perfetto.protos.IDmaHeapStatFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.DmaHeapStatFtraceEvent} DmaHeapStatFtraceEvent instance
             */
            DmaHeapStatFtraceEvent.create = function create(properties) {
                return new DmaHeapStatFtraceEvent(properties);
            };

            /**
             * Encodes the specified DmaHeapStatFtraceEvent message. Does not implicitly {@link perfetto.protos.DmaHeapStatFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DmaHeapStatFtraceEvent
             * @static
             * @param {perfetto.protos.IDmaHeapStatFtraceEvent} m DmaHeapStatFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DmaHeapStatFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.inode != null && Object.hasOwnProperty.call(m, "inode"))
                    w.uint32(8).uint64(m.inode);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(16).int64(m.len);
                if (m.totalAllocated != null && Object.hasOwnProperty.call(m, "totalAllocated"))
                    w.uint32(24).uint64(m.totalAllocated);
                return w;
            };

            /**
             * Encodes the specified DmaHeapStatFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.DmaHeapStatFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DmaHeapStatFtraceEvent
             * @static
             * @param {perfetto.protos.IDmaHeapStatFtraceEvent} message DmaHeapStatFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DmaHeapStatFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DmaHeapStatFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DmaHeapStatFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DmaHeapStatFtraceEvent} DmaHeapStatFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DmaHeapStatFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DmaHeapStatFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.inode = r.uint64();
                        break;
                    case 2:
                        m.len = r.int64();
                        break;
                    case 3:
                        m.totalAllocated = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DmaHeapStatFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DmaHeapStatFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DmaHeapStatFtraceEvent} DmaHeapStatFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DmaHeapStatFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DmaHeapStatFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.DmaHeapStatFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DmaHeapStatFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.inode != null && m.hasOwnProperty("inode")) {
                    if (!$util.isInteger(m.inode) && !(m.inode && $util.isInteger(m.inode.low) && $util.isInteger(m.inode.high)))
                        return "inode: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                if (m.totalAllocated != null && m.hasOwnProperty("totalAllocated")) {
                    if (!$util.isInteger(m.totalAllocated) && !(m.totalAllocated && $util.isInteger(m.totalAllocated.low) && $util.isInteger(m.totalAllocated.high)))
                        return "totalAllocated: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a DmaHeapStatFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DmaHeapStatFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DmaHeapStatFtraceEvent} DmaHeapStatFtraceEvent
             */
            DmaHeapStatFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DmaHeapStatFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.DmaHeapStatFtraceEvent();
                if (d.inode != null) {
                    if ($util.Long)
                        (m.inode = $util.Long.fromValue(d.inode)).unsigned = true;
                    else if (typeof d.inode === "string")
                        m.inode = parseInt(d.inode, 10);
                    else if (typeof d.inode === "number")
                        m.inode = d.inode;
                    else if (typeof d.inode === "object")
                        m.inode = new $util.LongBits(d.inode.low >>> 0, d.inode.high >>> 0).toNumber(true);
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = false;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber();
                }
                if (d.totalAllocated != null) {
                    if ($util.Long)
                        (m.totalAllocated = $util.Long.fromValue(d.totalAllocated)).unsigned = true;
                    else if (typeof d.totalAllocated === "string")
                        m.totalAllocated = parseInt(d.totalAllocated, 10);
                    else if (typeof d.totalAllocated === "number")
                        m.totalAllocated = d.totalAllocated;
                    else if (typeof d.totalAllocated === "object")
                        m.totalAllocated = new $util.LongBits(d.totalAllocated.low >>> 0, d.totalAllocated.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a DmaHeapStatFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DmaHeapStatFtraceEvent
             * @static
             * @param {perfetto.protos.DmaHeapStatFtraceEvent} m DmaHeapStatFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DmaHeapStatFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.inode = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.inode = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.totalAllocated = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.totalAllocated = o.longs === String ? "0" : 0;
                }
                if (m.inode != null && m.hasOwnProperty("inode")) {
                    if (typeof m.inode === "number")
                        d.inode = o.longs === String ? String(m.inode) : m.inode;
                    else
                        d.inode = o.longs === String ? $util.Long.prototype.toString.call(m.inode) : o.longs === Number ? new $util.LongBits(m.inode.low >>> 0, m.inode.high >>> 0).toNumber(true) : m.inode;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber() : m.len;
                }
                if (m.totalAllocated != null && m.hasOwnProperty("totalAllocated")) {
                    if (typeof m.totalAllocated === "number")
                        d.totalAllocated = o.longs === String ? String(m.totalAllocated) : m.totalAllocated;
                    else
                        d.totalAllocated = o.longs === String ? $util.Long.prototype.toString.call(m.totalAllocated) : o.longs === Number ? new $util.LongBits(m.totalAllocated.low >>> 0, m.totalAllocated.high >>> 0).toNumber(true) : m.totalAllocated;
                }
                return d;
            };

            /**
             * Converts this DmaHeapStatFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DmaHeapStatFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DmaHeapStatFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DmaHeapStatFtraceEvent;
        })();

        protos.DpuTracingMarkWriteFtraceEvent = (function() {

            /**
             * Properties of a DpuTracingMarkWriteFtraceEvent.
             * @memberof perfetto.protos
             * @interface IDpuTracingMarkWriteFtraceEvent
             * @property {number|null} [pid] DpuTracingMarkWriteFtraceEvent pid
             * @property {string|null} [traceName] DpuTracingMarkWriteFtraceEvent traceName
             * @property {number|null} [traceBegin] DpuTracingMarkWriteFtraceEvent traceBegin
             * @property {string|null} [name] DpuTracingMarkWriteFtraceEvent name
             * @property {number|null} [type] DpuTracingMarkWriteFtraceEvent type
             * @property {number|null} [value] DpuTracingMarkWriteFtraceEvent value
             */

            /**
             * Constructs a new DpuTracingMarkWriteFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a DpuTracingMarkWriteFtraceEvent.
             * @implements IDpuTracingMarkWriteFtraceEvent
             * @constructor
             * @param {perfetto.protos.IDpuTracingMarkWriteFtraceEvent=} [p] Properties to set
             */
            function DpuTracingMarkWriteFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DpuTracingMarkWriteFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.DpuTracingMarkWriteFtraceEvent
             * @instance
             */
            DpuTracingMarkWriteFtraceEvent.prototype.pid = 0;

            /**
             * DpuTracingMarkWriteFtraceEvent traceName.
             * @member {string} traceName
             * @memberof perfetto.protos.DpuTracingMarkWriteFtraceEvent
             * @instance
             */
            DpuTracingMarkWriteFtraceEvent.prototype.traceName = "";

            /**
             * DpuTracingMarkWriteFtraceEvent traceBegin.
             * @member {number} traceBegin
             * @memberof perfetto.protos.DpuTracingMarkWriteFtraceEvent
             * @instance
             */
            DpuTracingMarkWriteFtraceEvent.prototype.traceBegin = 0;

            /**
             * DpuTracingMarkWriteFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.DpuTracingMarkWriteFtraceEvent
             * @instance
             */
            DpuTracingMarkWriteFtraceEvent.prototype.name = "";

            /**
             * DpuTracingMarkWriteFtraceEvent type.
             * @member {number} type
             * @memberof perfetto.protos.DpuTracingMarkWriteFtraceEvent
             * @instance
             */
            DpuTracingMarkWriteFtraceEvent.prototype.type = 0;

            /**
             * DpuTracingMarkWriteFtraceEvent value.
             * @member {number} value
             * @memberof perfetto.protos.DpuTracingMarkWriteFtraceEvent
             * @instance
             */
            DpuTracingMarkWriteFtraceEvent.prototype.value = 0;

            /**
             * Creates a new DpuTracingMarkWriteFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DpuTracingMarkWriteFtraceEvent
             * @static
             * @param {perfetto.protos.IDpuTracingMarkWriteFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.DpuTracingMarkWriteFtraceEvent} DpuTracingMarkWriteFtraceEvent instance
             */
            DpuTracingMarkWriteFtraceEvent.create = function create(properties) {
                return new DpuTracingMarkWriteFtraceEvent(properties);
            };

            /**
             * Encodes the specified DpuTracingMarkWriteFtraceEvent message. Does not implicitly {@link perfetto.protos.DpuTracingMarkWriteFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DpuTracingMarkWriteFtraceEvent
             * @static
             * @param {perfetto.protos.IDpuTracingMarkWriteFtraceEvent} m DpuTracingMarkWriteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DpuTracingMarkWriteFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(8).int32(m.pid);
                if (m.traceName != null && Object.hasOwnProperty.call(m, "traceName"))
                    w.uint32(18).string(m.traceName);
                if (m.traceBegin != null && Object.hasOwnProperty.call(m, "traceBegin"))
                    w.uint32(24).uint32(m.traceBegin);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(34).string(m.name);
                if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                    w.uint32(40).uint32(m.type);
                if (m.value != null && Object.hasOwnProperty.call(m, "value"))
                    w.uint32(48).int32(m.value);
                return w;
            };

            /**
             * Encodes the specified DpuTracingMarkWriteFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.DpuTracingMarkWriteFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DpuTracingMarkWriteFtraceEvent
             * @static
             * @param {perfetto.protos.IDpuTracingMarkWriteFtraceEvent} message DpuTracingMarkWriteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DpuTracingMarkWriteFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DpuTracingMarkWriteFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DpuTracingMarkWriteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DpuTracingMarkWriteFtraceEvent} DpuTracingMarkWriteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DpuTracingMarkWriteFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DpuTracingMarkWriteFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.pid = r.int32();
                        break;
                    case 2:
                        m.traceName = r.string();
                        break;
                    case 3:
                        m.traceBegin = r.uint32();
                        break;
                    case 4:
                        m.name = r.string();
                        break;
                    case 5:
                        m.type = r.uint32();
                        break;
                    case 6:
                        m.value = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DpuTracingMarkWriteFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DpuTracingMarkWriteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DpuTracingMarkWriteFtraceEvent} DpuTracingMarkWriteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DpuTracingMarkWriteFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DpuTracingMarkWriteFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.DpuTracingMarkWriteFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DpuTracingMarkWriteFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.traceName != null && m.hasOwnProperty("traceName")) {
                    if (!$util.isString(m.traceName))
                        return "traceName: string expected";
                }
                if (m.traceBegin != null && m.hasOwnProperty("traceBegin")) {
                    if (!$util.isInteger(m.traceBegin))
                        return "traceBegin: integer expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    if (!$util.isInteger(m.type))
                        return "type: integer expected";
                }
                if (m.value != null && m.hasOwnProperty("value")) {
                    if (!$util.isInteger(m.value))
                        return "value: integer expected";
                }
                return null;
            };

            /**
             * Creates a DpuTracingMarkWriteFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DpuTracingMarkWriteFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DpuTracingMarkWriteFtraceEvent} DpuTracingMarkWriteFtraceEvent
             */
            DpuTracingMarkWriteFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DpuTracingMarkWriteFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.DpuTracingMarkWriteFtraceEvent();
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                if (d.traceName != null) {
                    m.traceName = String(d.traceName);
                }
                if (d.traceBegin != null) {
                    m.traceBegin = d.traceBegin >>> 0;
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.type != null) {
                    m.type = d.type >>> 0;
                }
                if (d.value != null) {
                    m.value = d.value | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a DpuTracingMarkWriteFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DpuTracingMarkWriteFtraceEvent
             * @static
             * @param {perfetto.protos.DpuTracingMarkWriteFtraceEvent} m DpuTracingMarkWriteFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DpuTracingMarkWriteFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.pid = 0;
                    d.traceName = "";
                    d.traceBegin = 0;
                    d.name = "";
                    d.type = 0;
                    d.value = 0;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.traceName != null && m.hasOwnProperty("traceName")) {
                    d.traceName = m.traceName;
                }
                if (m.traceBegin != null && m.hasOwnProperty("traceBegin")) {
                    d.traceBegin = m.traceBegin;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    d.type = m.type;
                }
                if (m.value != null && m.hasOwnProperty("value")) {
                    d.value = m.value;
                }
                return d;
            };

            /**
             * Converts this DpuTracingMarkWriteFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DpuTracingMarkWriteFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DpuTracingMarkWriteFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DpuTracingMarkWriteFtraceEvent;
        })();

        protos.DrmVblankEventFtraceEvent = (function() {

            /**
             * Properties of a DrmVblankEventFtraceEvent.
             * @memberof perfetto.protos
             * @interface IDrmVblankEventFtraceEvent
             * @property {number|null} [crtc] DrmVblankEventFtraceEvent crtc
             * @property {number|null} [highPrec] DrmVblankEventFtraceEvent highPrec
             * @property {number|null} [seq] DrmVblankEventFtraceEvent seq
             * @property {number|null} [time] DrmVblankEventFtraceEvent time
             */

            /**
             * Constructs a new DrmVblankEventFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a DrmVblankEventFtraceEvent.
             * @implements IDrmVblankEventFtraceEvent
             * @constructor
             * @param {perfetto.protos.IDrmVblankEventFtraceEvent=} [p] Properties to set
             */
            function DrmVblankEventFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DrmVblankEventFtraceEvent crtc.
             * @member {number} crtc
             * @memberof perfetto.protos.DrmVblankEventFtraceEvent
             * @instance
             */
            DrmVblankEventFtraceEvent.prototype.crtc = 0;

            /**
             * DrmVblankEventFtraceEvent highPrec.
             * @member {number} highPrec
             * @memberof perfetto.protos.DrmVblankEventFtraceEvent
             * @instance
             */
            DrmVblankEventFtraceEvent.prototype.highPrec = 0;

            /**
             * DrmVblankEventFtraceEvent seq.
             * @member {number} seq
             * @memberof perfetto.protos.DrmVblankEventFtraceEvent
             * @instance
             */
            DrmVblankEventFtraceEvent.prototype.seq = 0;

            /**
             * DrmVblankEventFtraceEvent time.
             * @member {number} time
             * @memberof perfetto.protos.DrmVblankEventFtraceEvent
             * @instance
             */
            DrmVblankEventFtraceEvent.prototype.time = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new DrmVblankEventFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DrmVblankEventFtraceEvent
             * @static
             * @param {perfetto.protos.IDrmVblankEventFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.DrmVblankEventFtraceEvent} DrmVblankEventFtraceEvent instance
             */
            DrmVblankEventFtraceEvent.create = function create(properties) {
                return new DrmVblankEventFtraceEvent(properties);
            };

            /**
             * Encodes the specified DrmVblankEventFtraceEvent message. Does not implicitly {@link perfetto.protos.DrmVblankEventFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DrmVblankEventFtraceEvent
             * @static
             * @param {perfetto.protos.IDrmVblankEventFtraceEvent} m DrmVblankEventFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DrmVblankEventFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.crtc != null && Object.hasOwnProperty.call(m, "crtc"))
                    w.uint32(8).int32(m.crtc);
                if (m.highPrec != null && Object.hasOwnProperty.call(m, "highPrec"))
                    w.uint32(16).uint32(m.highPrec);
                if (m.seq != null && Object.hasOwnProperty.call(m, "seq"))
                    w.uint32(24).uint32(m.seq);
                if (m.time != null && Object.hasOwnProperty.call(m, "time"))
                    w.uint32(32).int64(m.time);
                return w;
            };

            /**
             * Encodes the specified DrmVblankEventFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.DrmVblankEventFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DrmVblankEventFtraceEvent
             * @static
             * @param {perfetto.protos.IDrmVblankEventFtraceEvent} message DrmVblankEventFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DrmVblankEventFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DrmVblankEventFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DrmVblankEventFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DrmVblankEventFtraceEvent} DrmVblankEventFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DrmVblankEventFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DrmVblankEventFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.crtc = r.int32();
                        break;
                    case 2:
                        m.highPrec = r.uint32();
                        break;
                    case 3:
                        m.seq = r.uint32();
                        break;
                    case 4:
                        m.time = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DrmVblankEventFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DrmVblankEventFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DrmVblankEventFtraceEvent} DrmVblankEventFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DrmVblankEventFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DrmVblankEventFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.DrmVblankEventFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DrmVblankEventFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.crtc != null && m.hasOwnProperty("crtc")) {
                    if (!$util.isInteger(m.crtc))
                        return "crtc: integer expected";
                }
                if (m.highPrec != null && m.hasOwnProperty("highPrec")) {
                    if (!$util.isInteger(m.highPrec))
                        return "highPrec: integer expected";
                }
                if (m.seq != null && m.hasOwnProperty("seq")) {
                    if (!$util.isInteger(m.seq))
                        return "seq: integer expected";
                }
                if (m.time != null && m.hasOwnProperty("time")) {
                    if (!$util.isInteger(m.time) && !(m.time && $util.isInteger(m.time.low) && $util.isInteger(m.time.high)))
                        return "time: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a DrmVblankEventFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DrmVblankEventFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DrmVblankEventFtraceEvent} DrmVblankEventFtraceEvent
             */
            DrmVblankEventFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DrmVblankEventFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.DrmVblankEventFtraceEvent();
                if (d.crtc != null) {
                    m.crtc = d.crtc | 0;
                }
                if (d.highPrec != null) {
                    m.highPrec = d.highPrec >>> 0;
                }
                if (d.seq != null) {
                    m.seq = d.seq >>> 0;
                }
                if (d.time != null) {
                    if ($util.Long)
                        (m.time = $util.Long.fromValue(d.time)).unsigned = false;
                    else if (typeof d.time === "string")
                        m.time = parseInt(d.time, 10);
                    else if (typeof d.time === "number")
                        m.time = d.time;
                    else if (typeof d.time === "object")
                        m.time = new $util.LongBits(d.time.low >>> 0, d.time.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from a DrmVblankEventFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DrmVblankEventFtraceEvent
             * @static
             * @param {perfetto.protos.DrmVblankEventFtraceEvent} m DrmVblankEventFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DrmVblankEventFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.crtc = 0;
                    d.highPrec = 0;
                    d.seq = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.time = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.time = o.longs === String ? "0" : 0;
                }
                if (m.crtc != null && m.hasOwnProperty("crtc")) {
                    d.crtc = m.crtc;
                }
                if (m.highPrec != null && m.hasOwnProperty("highPrec")) {
                    d.highPrec = m.highPrec;
                }
                if (m.seq != null && m.hasOwnProperty("seq")) {
                    d.seq = m.seq;
                }
                if (m.time != null && m.hasOwnProperty("time")) {
                    if (typeof m.time === "number")
                        d.time = o.longs === String ? String(m.time) : m.time;
                    else
                        d.time = o.longs === String ? $util.Long.prototype.toString.call(m.time) : o.longs === Number ? new $util.LongBits(m.time.low >>> 0, m.time.high >>> 0).toNumber() : m.time;
                }
                return d;
            };

            /**
             * Converts this DrmVblankEventFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DrmVblankEventFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DrmVblankEventFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DrmVblankEventFtraceEvent;
        })();

        protos.DrmVblankEventDeliveredFtraceEvent = (function() {

            /**
             * Properties of a DrmVblankEventDeliveredFtraceEvent.
             * @memberof perfetto.protos
             * @interface IDrmVblankEventDeliveredFtraceEvent
             * @property {number|null} [crtc] DrmVblankEventDeliveredFtraceEvent crtc
             * @property {number|null} [file] DrmVblankEventDeliveredFtraceEvent file
             * @property {number|null} [seq] DrmVblankEventDeliveredFtraceEvent seq
             */

            /**
             * Constructs a new DrmVblankEventDeliveredFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a DrmVblankEventDeliveredFtraceEvent.
             * @implements IDrmVblankEventDeliveredFtraceEvent
             * @constructor
             * @param {perfetto.protos.IDrmVblankEventDeliveredFtraceEvent=} [p] Properties to set
             */
            function DrmVblankEventDeliveredFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DrmVblankEventDeliveredFtraceEvent crtc.
             * @member {number} crtc
             * @memberof perfetto.protos.DrmVblankEventDeliveredFtraceEvent
             * @instance
             */
            DrmVblankEventDeliveredFtraceEvent.prototype.crtc = 0;

            /**
             * DrmVblankEventDeliveredFtraceEvent file.
             * @member {number} file
             * @memberof perfetto.protos.DrmVblankEventDeliveredFtraceEvent
             * @instance
             */
            DrmVblankEventDeliveredFtraceEvent.prototype.file = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * DrmVblankEventDeliveredFtraceEvent seq.
             * @member {number} seq
             * @memberof perfetto.protos.DrmVblankEventDeliveredFtraceEvent
             * @instance
             */
            DrmVblankEventDeliveredFtraceEvent.prototype.seq = 0;

            /**
             * Creates a new DrmVblankEventDeliveredFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DrmVblankEventDeliveredFtraceEvent
             * @static
             * @param {perfetto.protos.IDrmVblankEventDeliveredFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.DrmVblankEventDeliveredFtraceEvent} DrmVblankEventDeliveredFtraceEvent instance
             */
            DrmVblankEventDeliveredFtraceEvent.create = function create(properties) {
                return new DrmVblankEventDeliveredFtraceEvent(properties);
            };

            /**
             * Encodes the specified DrmVblankEventDeliveredFtraceEvent message. Does not implicitly {@link perfetto.protos.DrmVblankEventDeliveredFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DrmVblankEventDeliveredFtraceEvent
             * @static
             * @param {perfetto.protos.IDrmVblankEventDeliveredFtraceEvent} m DrmVblankEventDeliveredFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DrmVblankEventDeliveredFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.crtc != null && Object.hasOwnProperty.call(m, "crtc"))
                    w.uint32(8).int32(m.crtc);
                if (m.file != null && Object.hasOwnProperty.call(m, "file"))
                    w.uint32(16).uint64(m.file);
                if (m.seq != null && Object.hasOwnProperty.call(m, "seq"))
                    w.uint32(24).uint32(m.seq);
                return w;
            };

            /**
             * Encodes the specified DrmVblankEventDeliveredFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.DrmVblankEventDeliveredFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DrmVblankEventDeliveredFtraceEvent
             * @static
             * @param {perfetto.protos.IDrmVblankEventDeliveredFtraceEvent} message DrmVblankEventDeliveredFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DrmVblankEventDeliveredFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DrmVblankEventDeliveredFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DrmVblankEventDeliveredFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DrmVblankEventDeliveredFtraceEvent} DrmVblankEventDeliveredFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DrmVblankEventDeliveredFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DrmVblankEventDeliveredFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.crtc = r.int32();
                        break;
                    case 2:
                        m.file = r.uint64();
                        break;
                    case 3:
                        m.seq = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DrmVblankEventDeliveredFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DrmVblankEventDeliveredFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DrmVblankEventDeliveredFtraceEvent} DrmVblankEventDeliveredFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DrmVblankEventDeliveredFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DrmVblankEventDeliveredFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.DrmVblankEventDeliveredFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DrmVblankEventDeliveredFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.crtc != null && m.hasOwnProperty("crtc")) {
                    if (!$util.isInteger(m.crtc))
                        return "crtc: integer expected";
                }
                if (m.file != null && m.hasOwnProperty("file")) {
                    if (!$util.isInteger(m.file) && !(m.file && $util.isInteger(m.file.low) && $util.isInteger(m.file.high)))
                        return "file: integer|Long expected";
                }
                if (m.seq != null && m.hasOwnProperty("seq")) {
                    if (!$util.isInteger(m.seq))
                        return "seq: integer expected";
                }
                return null;
            };

            /**
             * Creates a DrmVblankEventDeliveredFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DrmVblankEventDeliveredFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DrmVblankEventDeliveredFtraceEvent} DrmVblankEventDeliveredFtraceEvent
             */
            DrmVblankEventDeliveredFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DrmVblankEventDeliveredFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.DrmVblankEventDeliveredFtraceEvent();
                if (d.crtc != null) {
                    m.crtc = d.crtc | 0;
                }
                if (d.file != null) {
                    if ($util.Long)
                        (m.file = $util.Long.fromValue(d.file)).unsigned = true;
                    else if (typeof d.file === "string")
                        m.file = parseInt(d.file, 10);
                    else if (typeof d.file === "number")
                        m.file = d.file;
                    else if (typeof d.file === "object")
                        m.file = new $util.LongBits(d.file.low >>> 0, d.file.high >>> 0).toNumber(true);
                }
                if (d.seq != null) {
                    m.seq = d.seq >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a DrmVblankEventDeliveredFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DrmVblankEventDeliveredFtraceEvent
             * @static
             * @param {perfetto.protos.DrmVblankEventDeliveredFtraceEvent} m DrmVblankEventDeliveredFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DrmVblankEventDeliveredFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.crtc = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.file = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.file = o.longs === String ? "0" : 0;
                    d.seq = 0;
                }
                if (m.crtc != null && m.hasOwnProperty("crtc")) {
                    d.crtc = m.crtc;
                }
                if (m.file != null && m.hasOwnProperty("file")) {
                    if (typeof m.file === "number")
                        d.file = o.longs === String ? String(m.file) : m.file;
                    else
                        d.file = o.longs === String ? $util.Long.prototype.toString.call(m.file) : o.longs === Number ? new $util.LongBits(m.file.low >>> 0, m.file.high >>> 0).toNumber(true) : m.file;
                }
                if (m.seq != null && m.hasOwnProperty("seq")) {
                    d.seq = m.seq;
                }
                return d;
            };

            /**
             * Converts this DrmVblankEventDeliveredFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DrmVblankEventDeliveredFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DrmVblankEventDeliveredFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DrmVblankEventDeliveredFtraceEvent;
        })();

        protos.Ext4DaWriteBeginFtraceEvent = (function() {

            /**
             * Properties of an Ext4DaWriteBeginFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4DaWriteBeginFtraceEvent
             * @property {number|null} [dev] Ext4DaWriteBeginFtraceEvent dev
             * @property {number|null} [ino] Ext4DaWriteBeginFtraceEvent ino
             * @property {number|null} [pos] Ext4DaWriteBeginFtraceEvent pos
             * @property {number|null} [len] Ext4DaWriteBeginFtraceEvent len
             * @property {number|null} [flags] Ext4DaWriteBeginFtraceEvent flags
             */

            /**
             * Constructs a new Ext4DaWriteBeginFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4DaWriteBeginFtraceEvent.
             * @implements IExt4DaWriteBeginFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4DaWriteBeginFtraceEvent=} [p] Properties to set
             */
            function Ext4DaWriteBeginFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4DaWriteBeginFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4DaWriteBeginFtraceEvent
             * @instance
             */
            Ext4DaWriteBeginFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DaWriteBeginFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4DaWriteBeginFtraceEvent
             * @instance
             */
            Ext4DaWriteBeginFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DaWriteBeginFtraceEvent pos.
             * @member {number} pos
             * @memberof perfetto.protos.Ext4DaWriteBeginFtraceEvent
             * @instance
             */
            Ext4DaWriteBeginFtraceEvent.prototype.pos = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4DaWriteBeginFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4DaWriteBeginFtraceEvent
             * @instance
             */
            Ext4DaWriteBeginFtraceEvent.prototype.len = 0;

            /**
             * Ext4DaWriteBeginFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.Ext4DaWriteBeginFtraceEvent
             * @instance
             */
            Ext4DaWriteBeginFtraceEvent.prototype.flags = 0;

            /**
             * Creates a new Ext4DaWriteBeginFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4DaWriteBeginFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DaWriteBeginFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4DaWriteBeginFtraceEvent} Ext4DaWriteBeginFtraceEvent instance
             */
            Ext4DaWriteBeginFtraceEvent.create = function create(properties) {
                return new Ext4DaWriteBeginFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4DaWriteBeginFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4DaWriteBeginFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4DaWriteBeginFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DaWriteBeginFtraceEvent} m Ext4DaWriteBeginFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4DaWriteBeginFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.pos != null && Object.hasOwnProperty.call(m, "pos"))
                    w.uint32(24).int64(m.pos);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).uint32(m.len);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(40).uint32(m.flags);
                return w;
            };

            /**
             * Encodes the specified Ext4DaWriteBeginFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4DaWriteBeginFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4DaWriteBeginFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DaWriteBeginFtraceEvent} message Ext4DaWriteBeginFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4DaWriteBeginFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4DaWriteBeginFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4DaWriteBeginFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4DaWriteBeginFtraceEvent} Ext4DaWriteBeginFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4DaWriteBeginFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4DaWriteBeginFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.pos = r.int64();
                        break;
                    case 4:
                        m.len = r.uint32();
                        break;
                    case 5:
                        m.flags = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4DaWriteBeginFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4DaWriteBeginFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4DaWriteBeginFtraceEvent} Ext4DaWriteBeginFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4DaWriteBeginFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4DaWriteBeginFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4DaWriteBeginFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4DaWriteBeginFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.pos != null && m.hasOwnProperty("pos")) {
                    if (!$util.isInteger(m.pos) && !(m.pos && $util.isInteger(m.pos.low) && $util.isInteger(m.pos.high)))
                        return "pos: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4DaWriteBeginFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4DaWriteBeginFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4DaWriteBeginFtraceEvent} Ext4DaWriteBeginFtraceEvent
             */
            Ext4DaWriteBeginFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4DaWriteBeginFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4DaWriteBeginFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.pos != null) {
                    if ($util.Long)
                        (m.pos = $util.Long.fromValue(d.pos)).unsigned = false;
                    else if (typeof d.pos === "string")
                        m.pos = parseInt(d.pos, 10);
                    else if (typeof d.pos === "number")
                        m.pos = d.pos;
                    else if (typeof d.pos === "object")
                        m.pos = new $util.LongBits(d.pos.low >>> 0, d.pos.high >>> 0).toNumber();
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4DaWriteBeginFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4DaWriteBeginFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4DaWriteBeginFtraceEvent} m Ext4DaWriteBeginFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4DaWriteBeginFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.pos = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pos = o.longs === String ? "0" : 0;
                    d.len = 0;
                    d.flags = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.pos != null && m.hasOwnProperty("pos")) {
                    if (typeof m.pos === "number")
                        d.pos = o.longs === String ? String(m.pos) : m.pos;
                    else
                        d.pos = o.longs === String ? $util.Long.prototype.toString.call(m.pos) : o.longs === Number ? new $util.LongBits(m.pos.low >>> 0, m.pos.high >>> 0).toNumber() : m.pos;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                return d;
            };

            /**
             * Converts this Ext4DaWriteBeginFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4DaWriteBeginFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4DaWriteBeginFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4DaWriteBeginFtraceEvent;
        })();

        protos.Ext4DaWriteEndFtraceEvent = (function() {

            /**
             * Properties of an Ext4DaWriteEndFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4DaWriteEndFtraceEvent
             * @property {number|null} [dev] Ext4DaWriteEndFtraceEvent dev
             * @property {number|null} [ino] Ext4DaWriteEndFtraceEvent ino
             * @property {number|null} [pos] Ext4DaWriteEndFtraceEvent pos
             * @property {number|null} [len] Ext4DaWriteEndFtraceEvent len
             * @property {number|null} [copied] Ext4DaWriteEndFtraceEvent copied
             */

            /**
             * Constructs a new Ext4DaWriteEndFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4DaWriteEndFtraceEvent.
             * @implements IExt4DaWriteEndFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4DaWriteEndFtraceEvent=} [p] Properties to set
             */
            function Ext4DaWriteEndFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4DaWriteEndFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4DaWriteEndFtraceEvent
             * @instance
             */
            Ext4DaWriteEndFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DaWriteEndFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4DaWriteEndFtraceEvent
             * @instance
             */
            Ext4DaWriteEndFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DaWriteEndFtraceEvent pos.
             * @member {number} pos
             * @memberof perfetto.protos.Ext4DaWriteEndFtraceEvent
             * @instance
             */
            Ext4DaWriteEndFtraceEvent.prototype.pos = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4DaWriteEndFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4DaWriteEndFtraceEvent
             * @instance
             */
            Ext4DaWriteEndFtraceEvent.prototype.len = 0;

            /**
             * Ext4DaWriteEndFtraceEvent copied.
             * @member {number} copied
             * @memberof perfetto.protos.Ext4DaWriteEndFtraceEvent
             * @instance
             */
            Ext4DaWriteEndFtraceEvent.prototype.copied = 0;

            /**
             * Creates a new Ext4DaWriteEndFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4DaWriteEndFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DaWriteEndFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4DaWriteEndFtraceEvent} Ext4DaWriteEndFtraceEvent instance
             */
            Ext4DaWriteEndFtraceEvent.create = function create(properties) {
                return new Ext4DaWriteEndFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4DaWriteEndFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4DaWriteEndFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4DaWriteEndFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DaWriteEndFtraceEvent} m Ext4DaWriteEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4DaWriteEndFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.pos != null && Object.hasOwnProperty.call(m, "pos"))
                    w.uint32(24).int64(m.pos);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).uint32(m.len);
                if (m.copied != null && Object.hasOwnProperty.call(m, "copied"))
                    w.uint32(40).uint32(m.copied);
                return w;
            };

            /**
             * Encodes the specified Ext4DaWriteEndFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4DaWriteEndFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4DaWriteEndFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DaWriteEndFtraceEvent} message Ext4DaWriteEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4DaWriteEndFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4DaWriteEndFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4DaWriteEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4DaWriteEndFtraceEvent} Ext4DaWriteEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4DaWriteEndFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4DaWriteEndFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.pos = r.int64();
                        break;
                    case 4:
                        m.len = r.uint32();
                        break;
                    case 5:
                        m.copied = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4DaWriteEndFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4DaWriteEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4DaWriteEndFtraceEvent} Ext4DaWriteEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4DaWriteEndFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4DaWriteEndFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4DaWriteEndFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4DaWriteEndFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.pos != null && m.hasOwnProperty("pos")) {
                    if (!$util.isInteger(m.pos) && !(m.pos && $util.isInteger(m.pos.low) && $util.isInteger(m.pos.high)))
                        return "pos: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.copied != null && m.hasOwnProperty("copied")) {
                    if (!$util.isInteger(m.copied))
                        return "copied: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4DaWriteEndFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4DaWriteEndFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4DaWriteEndFtraceEvent} Ext4DaWriteEndFtraceEvent
             */
            Ext4DaWriteEndFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4DaWriteEndFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4DaWriteEndFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.pos != null) {
                    if ($util.Long)
                        (m.pos = $util.Long.fromValue(d.pos)).unsigned = false;
                    else if (typeof d.pos === "string")
                        m.pos = parseInt(d.pos, 10);
                    else if (typeof d.pos === "number")
                        m.pos = d.pos;
                    else if (typeof d.pos === "object")
                        m.pos = new $util.LongBits(d.pos.low >>> 0, d.pos.high >>> 0).toNumber();
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.copied != null) {
                    m.copied = d.copied >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4DaWriteEndFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4DaWriteEndFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4DaWriteEndFtraceEvent} m Ext4DaWriteEndFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4DaWriteEndFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.pos = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pos = o.longs === String ? "0" : 0;
                    d.len = 0;
                    d.copied = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.pos != null && m.hasOwnProperty("pos")) {
                    if (typeof m.pos === "number")
                        d.pos = o.longs === String ? String(m.pos) : m.pos;
                    else
                        d.pos = o.longs === String ? $util.Long.prototype.toString.call(m.pos) : o.longs === Number ? new $util.LongBits(m.pos.low >>> 0, m.pos.high >>> 0).toNumber() : m.pos;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.copied != null && m.hasOwnProperty("copied")) {
                    d.copied = m.copied;
                }
                return d;
            };

            /**
             * Converts this Ext4DaWriteEndFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4DaWriteEndFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4DaWriteEndFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4DaWriteEndFtraceEvent;
        })();

        protos.Ext4SyncFileEnterFtraceEvent = (function() {

            /**
             * Properties of an Ext4SyncFileEnterFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4SyncFileEnterFtraceEvent
             * @property {number|null} [dev] Ext4SyncFileEnterFtraceEvent dev
             * @property {number|null} [ino] Ext4SyncFileEnterFtraceEvent ino
             * @property {number|null} [parent] Ext4SyncFileEnterFtraceEvent parent
             * @property {number|null} [datasync] Ext4SyncFileEnterFtraceEvent datasync
             */

            /**
             * Constructs a new Ext4SyncFileEnterFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4SyncFileEnterFtraceEvent.
             * @implements IExt4SyncFileEnterFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4SyncFileEnterFtraceEvent=} [p] Properties to set
             */
            function Ext4SyncFileEnterFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4SyncFileEnterFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4SyncFileEnterFtraceEvent
             * @instance
             */
            Ext4SyncFileEnterFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4SyncFileEnterFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4SyncFileEnterFtraceEvent
             * @instance
             */
            Ext4SyncFileEnterFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4SyncFileEnterFtraceEvent parent.
             * @member {number} parent
             * @memberof perfetto.protos.Ext4SyncFileEnterFtraceEvent
             * @instance
             */
            Ext4SyncFileEnterFtraceEvent.prototype.parent = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4SyncFileEnterFtraceEvent datasync.
             * @member {number} datasync
             * @memberof perfetto.protos.Ext4SyncFileEnterFtraceEvent
             * @instance
             */
            Ext4SyncFileEnterFtraceEvent.prototype.datasync = 0;

            /**
             * Creates a new Ext4SyncFileEnterFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4SyncFileEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4SyncFileEnterFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4SyncFileEnterFtraceEvent} Ext4SyncFileEnterFtraceEvent instance
             */
            Ext4SyncFileEnterFtraceEvent.create = function create(properties) {
                return new Ext4SyncFileEnterFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4SyncFileEnterFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4SyncFileEnterFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4SyncFileEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4SyncFileEnterFtraceEvent} m Ext4SyncFileEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4SyncFileEnterFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.parent != null && Object.hasOwnProperty.call(m, "parent"))
                    w.uint32(24).uint64(m.parent);
                if (m.datasync != null && Object.hasOwnProperty.call(m, "datasync"))
                    w.uint32(32).int32(m.datasync);
                return w;
            };

            /**
             * Encodes the specified Ext4SyncFileEnterFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4SyncFileEnterFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4SyncFileEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4SyncFileEnterFtraceEvent} message Ext4SyncFileEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4SyncFileEnterFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4SyncFileEnterFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4SyncFileEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4SyncFileEnterFtraceEvent} Ext4SyncFileEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4SyncFileEnterFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4SyncFileEnterFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.parent = r.uint64();
                        break;
                    case 4:
                        m.datasync = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4SyncFileEnterFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4SyncFileEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4SyncFileEnterFtraceEvent} Ext4SyncFileEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4SyncFileEnterFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4SyncFileEnterFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4SyncFileEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4SyncFileEnterFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.parent != null && m.hasOwnProperty("parent")) {
                    if (!$util.isInteger(m.parent) && !(m.parent && $util.isInteger(m.parent.low) && $util.isInteger(m.parent.high)))
                        return "parent: integer|Long expected";
                }
                if (m.datasync != null && m.hasOwnProperty("datasync")) {
                    if (!$util.isInteger(m.datasync))
                        return "datasync: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4SyncFileEnterFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4SyncFileEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4SyncFileEnterFtraceEvent} Ext4SyncFileEnterFtraceEvent
             */
            Ext4SyncFileEnterFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4SyncFileEnterFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4SyncFileEnterFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.parent != null) {
                    if ($util.Long)
                        (m.parent = $util.Long.fromValue(d.parent)).unsigned = true;
                    else if (typeof d.parent === "string")
                        m.parent = parseInt(d.parent, 10);
                    else if (typeof d.parent === "number")
                        m.parent = d.parent;
                    else if (typeof d.parent === "object")
                        m.parent = new $util.LongBits(d.parent.low >>> 0, d.parent.high >>> 0).toNumber(true);
                }
                if (d.datasync != null) {
                    m.datasync = d.datasync | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4SyncFileEnterFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4SyncFileEnterFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4SyncFileEnterFtraceEvent} m Ext4SyncFileEnterFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4SyncFileEnterFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.parent = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.parent = o.longs === String ? "0" : 0;
                    d.datasync = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.parent != null && m.hasOwnProperty("parent")) {
                    if (typeof m.parent === "number")
                        d.parent = o.longs === String ? String(m.parent) : m.parent;
                    else
                        d.parent = o.longs === String ? $util.Long.prototype.toString.call(m.parent) : o.longs === Number ? new $util.LongBits(m.parent.low >>> 0, m.parent.high >>> 0).toNumber(true) : m.parent;
                }
                if (m.datasync != null && m.hasOwnProperty("datasync")) {
                    d.datasync = m.datasync;
                }
                return d;
            };

            /**
             * Converts this Ext4SyncFileEnterFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4SyncFileEnterFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4SyncFileEnterFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4SyncFileEnterFtraceEvent;
        })();

        protos.Ext4SyncFileExitFtraceEvent = (function() {

            /**
             * Properties of an Ext4SyncFileExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4SyncFileExitFtraceEvent
             * @property {number|null} [dev] Ext4SyncFileExitFtraceEvent dev
             * @property {number|null} [ino] Ext4SyncFileExitFtraceEvent ino
             * @property {number|null} [ret] Ext4SyncFileExitFtraceEvent ret
             */

            /**
             * Constructs a new Ext4SyncFileExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4SyncFileExitFtraceEvent.
             * @implements IExt4SyncFileExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4SyncFileExitFtraceEvent=} [p] Properties to set
             */
            function Ext4SyncFileExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4SyncFileExitFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4SyncFileExitFtraceEvent
             * @instance
             */
            Ext4SyncFileExitFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4SyncFileExitFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4SyncFileExitFtraceEvent
             * @instance
             */
            Ext4SyncFileExitFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4SyncFileExitFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.Ext4SyncFileExitFtraceEvent
             * @instance
             */
            Ext4SyncFileExitFtraceEvent.prototype.ret = 0;

            /**
             * Creates a new Ext4SyncFileExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4SyncFileExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4SyncFileExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4SyncFileExitFtraceEvent} Ext4SyncFileExitFtraceEvent instance
             */
            Ext4SyncFileExitFtraceEvent.create = function create(properties) {
                return new Ext4SyncFileExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4SyncFileExitFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4SyncFileExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4SyncFileExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4SyncFileExitFtraceEvent} m Ext4SyncFileExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4SyncFileExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(24).int32(m.ret);
                return w;
            };

            /**
             * Encodes the specified Ext4SyncFileExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4SyncFileExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4SyncFileExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4SyncFileExitFtraceEvent} message Ext4SyncFileExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4SyncFileExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4SyncFileExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4SyncFileExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4SyncFileExitFtraceEvent} Ext4SyncFileExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4SyncFileExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4SyncFileExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.ret = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4SyncFileExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4SyncFileExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4SyncFileExitFtraceEvent} Ext4SyncFileExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4SyncFileExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4SyncFileExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4SyncFileExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4SyncFileExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4SyncFileExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4SyncFileExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4SyncFileExitFtraceEvent} Ext4SyncFileExitFtraceEvent
             */
            Ext4SyncFileExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4SyncFileExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4SyncFileExitFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4SyncFileExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4SyncFileExitFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4SyncFileExitFtraceEvent} m Ext4SyncFileExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4SyncFileExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.ret = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                return d;
            };

            /**
             * Converts this Ext4SyncFileExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4SyncFileExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4SyncFileExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4SyncFileExitFtraceEvent;
        })();

        protos.Ext4AllocDaBlocksFtraceEvent = (function() {

            /**
             * Properties of an Ext4AllocDaBlocksFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4AllocDaBlocksFtraceEvent
             * @property {number|null} [dev] Ext4AllocDaBlocksFtraceEvent dev
             * @property {number|null} [ino] Ext4AllocDaBlocksFtraceEvent ino
             * @property {number|null} [dataBlocks] Ext4AllocDaBlocksFtraceEvent dataBlocks
             * @property {number|null} [metaBlocks] Ext4AllocDaBlocksFtraceEvent metaBlocks
             */

            /**
             * Constructs a new Ext4AllocDaBlocksFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4AllocDaBlocksFtraceEvent.
             * @implements IExt4AllocDaBlocksFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4AllocDaBlocksFtraceEvent=} [p] Properties to set
             */
            function Ext4AllocDaBlocksFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4AllocDaBlocksFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4AllocDaBlocksFtraceEvent
             * @instance
             */
            Ext4AllocDaBlocksFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4AllocDaBlocksFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4AllocDaBlocksFtraceEvent
             * @instance
             */
            Ext4AllocDaBlocksFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4AllocDaBlocksFtraceEvent dataBlocks.
             * @member {number} dataBlocks
             * @memberof perfetto.protos.Ext4AllocDaBlocksFtraceEvent
             * @instance
             */
            Ext4AllocDaBlocksFtraceEvent.prototype.dataBlocks = 0;

            /**
             * Ext4AllocDaBlocksFtraceEvent metaBlocks.
             * @member {number} metaBlocks
             * @memberof perfetto.protos.Ext4AllocDaBlocksFtraceEvent
             * @instance
             */
            Ext4AllocDaBlocksFtraceEvent.prototype.metaBlocks = 0;

            /**
             * Creates a new Ext4AllocDaBlocksFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4AllocDaBlocksFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4AllocDaBlocksFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4AllocDaBlocksFtraceEvent} Ext4AllocDaBlocksFtraceEvent instance
             */
            Ext4AllocDaBlocksFtraceEvent.create = function create(properties) {
                return new Ext4AllocDaBlocksFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4AllocDaBlocksFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4AllocDaBlocksFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4AllocDaBlocksFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4AllocDaBlocksFtraceEvent} m Ext4AllocDaBlocksFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4AllocDaBlocksFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.dataBlocks != null && Object.hasOwnProperty.call(m, "dataBlocks"))
                    w.uint32(24).uint32(m.dataBlocks);
                if (m.metaBlocks != null && Object.hasOwnProperty.call(m, "metaBlocks"))
                    w.uint32(32).uint32(m.metaBlocks);
                return w;
            };

            /**
             * Encodes the specified Ext4AllocDaBlocksFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4AllocDaBlocksFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4AllocDaBlocksFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4AllocDaBlocksFtraceEvent} message Ext4AllocDaBlocksFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4AllocDaBlocksFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4AllocDaBlocksFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4AllocDaBlocksFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4AllocDaBlocksFtraceEvent} Ext4AllocDaBlocksFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4AllocDaBlocksFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4AllocDaBlocksFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.dataBlocks = r.uint32();
                        break;
                    case 4:
                        m.metaBlocks = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4AllocDaBlocksFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4AllocDaBlocksFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4AllocDaBlocksFtraceEvent} Ext4AllocDaBlocksFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4AllocDaBlocksFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4AllocDaBlocksFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4AllocDaBlocksFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4AllocDaBlocksFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.dataBlocks != null && m.hasOwnProperty("dataBlocks")) {
                    if (!$util.isInteger(m.dataBlocks))
                        return "dataBlocks: integer expected";
                }
                if (m.metaBlocks != null && m.hasOwnProperty("metaBlocks")) {
                    if (!$util.isInteger(m.metaBlocks))
                        return "metaBlocks: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4AllocDaBlocksFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4AllocDaBlocksFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4AllocDaBlocksFtraceEvent} Ext4AllocDaBlocksFtraceEvent
             */
            Ext4AllocDaBlocksFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4AllocDaBlocksFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4AllocDaBlocksFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.dataBlocks != null) {
                    m.dataBlocks = d.dataBlocks >>> 0;
                }
                if (d.metaBlocks != null) {
                    m.metaBlocks = d.metaBlocks >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4AllocDaBlocksFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4AllocDaBlocksFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4AllocDaBlocksFtraceEvent} m Ext4AllocDaBlocksFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4AllocDaBlocksFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.dataBlocks = 0;
                    d.metaBlocks = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.dataBlocks != null && m.hasOwnProperty("dataBlocks")) {
                    d.dataBlocks = m.dataBlocks;
                }
                if (m.metaBlocks != null && m.hasOwnProperty("metaBlocks")) {
                    d.metaBlocks = m.metaBlocks;
                }
                return d;
            };

            /**
             * Converts this Ext4AllocDaBlocksFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4AllocDaBlocksFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4AllocDaBlocksFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4AllocDaBlocksFtraceEvent;
        })();

        protos.Ext4AllocateBlocksFtraceEvent = (function() {

            /**
             * Properties of an Ext4AllocateBlocksFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4AllocateBlocksFtraceEvent
             * @property {number|null} [dev] Ext4AllocateBlocksFtraceEvent dev
             * @property {number|null} [ino] Ext4AllocateBlocksFtraceEvent ino
             * @property {number|null} [block] Ext4AllocateBlocksFtraceEvent block
             * @property {number|null} [len] Ext4AllocateBlocksFtraceEvent len
             * @property {number|null} [logical] Ext4AllocateBlocksFtraceEvent logical
             * @property {number|null} [lleft] Ext4AllocateBlocksFtraceEvent lleft
             * @property {number|null} [lright] Ext4AllocateBlocksFtraceEvent lright
             * @property {number|null} [goal] Ext4AllocateBlocksFtraceEvent goal
             * @property {number|null} [pleft] Ext4AllocateBlocksFtraceEvent pleft
             * @property {number|null} [pright] Ext4AllocateBlocksFtraceEvent pright
             * @property {number|null} [flags] Ext4AllocateBlocksFtraceEvent flags
             */

            /**
             * Constructs a new Ext4AllocateBlocksFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4AllocateBlocksFtraceEvent.
             * @implements IExt4AllocateBlocksFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4AllocateBlocksFtraceEvent=} [p] Properties to set
             */
            function Ext4AllocateBlocksFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4AllocateBlocksFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4AllocateBlocksFtraceEvent
             * @instance
             */
            Ext4AllocateBlocksFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4AllocateBlocksFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4AllocateBlocksFtraceEvent
             * @instance
             */
            Ext4AllocateBlocksFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4AllocateBlocksFtraceEvent block.
             * @member {number} block
             * @memberof perfetto.protos.Ext4AllocateBlocksFtraceEvent
             * @instance
             */
            Ext4AllocateBlocksFtraceEvent.prototype.block = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4AllocateBlocksFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4AllocateBlocksFtraceEvent
             * @instance
             */
            Ext4AllocateBlocksFtraceEvent.prototype.len = 0;

            /**
             * Ext4AllocateBlocksFtraceEvent logical.
             * @member {number} logical
             * @memberof perfetto.protos.Ext4AllocateBlocksFtraceEvent
             * @instance
             */
            Ext4AllocateBlocksFtraceEvent.prototype.logical = 0;

            /**
             * Ext4AllocateBlocksFtraceEvent lleft.
             * @member {number} lleft
             * @memberof perfetto.protos.Ext4AllocateBlocksFtraceEvent
             * @instance
             */
            Ext4AllocateBlocksFtraceEvent.prototype.lleft = 0;

            /**
             * Ext4AllocateBlocksFtraceEvent lright.
             * @member {number} lright
             * @memberof perfetto.protos.Ext4AllocateBlocksFtraceEvent
             * @instance
             */
            Ext4AllocateBlocksFtraceEvent.prototype.lright = 0;

            /**
             * Ext4AllocateBlocksFtraceEvent goal.
             * @member {number} goal
             * @memberof perfetto.protos.Ext4AllocateBlocksFtraceEvent
             * @instance
             */
            Ext4AllocateBlocksFtraceEvent.prototype.goal = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4AllocateBlocksFtraceEvent pleft.
             * @member {number} pleft
             * @memberof perfetto.protos.Ext4AllocateBlocksFtraceEvent
             * @instance
             */
            Ext4AllocateBlocksFtraceEvent.prototype.pleft = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4AllocateBlocksFtraceEvent pright.
             * @member {number} pright
             * @memberof perfetto.protos.Ext4AllocateBlocksFtraceEvent
             * @instance
             */
            Ext4AllocateBlocksFtraceEvent.prototype.pright = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4AllocateBlocksFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.Ext4AllocateBlocksFtraceEvent
             * @instance
             */
            Ext4AllocateBlocksFtraceEvent.prototype.flags = 0;

            /**
             * Creates a new Ext4AllocateBlocksFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4AllocateBlocksFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4AllocateBlocksFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4AllocateBlocksFtraceEvent} Ext4AllocateBlocksFtraceEvent instance
             */
            Ext4AllocateBlocksFtraceEvent.create = function create(properties) {
                return new Ext4AllocateBlocksFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4AllocateBlocksFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4AllocateBlocksFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4AllocateBlocksFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4AllocateBlocksFtraceEvent} m Ext4AllocateBlocksFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4AllocateBlocksFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.block != null && Object.hasOwnProperty.call(m, "block"))
                    w.uint32(24).uint64(m.block);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).uint32(m.len);
                if (m.logical != null && Object.hasOwnProperty.call(m, "logical"))
                    w.uint32(40).uint32(m.logical);
                if (m.lleft != null && Object.hasOwnProperty.call(m, "lleft"))
                    w.uint32(48).uint32(m.lleft);
                if (m.lright != null && Object.hasOwnProperty.call(m, "lright"))
                    w.uint32(56).uint32(m.lright);
                if (m.goal != null && Object.hasOwnProperty.call(m, "goal"))
                    w.uint32(64).uint64(m.goal);
                if (m.pleft != null && Object.hasOwnProperty.call(m, "pleft"))
                    w.uint32(72).uint64(m.pleft);
                if (m.pright != null && Object.hasOwnProperty.call(m, "pright"))
                    w.uint32(80).uint64(m.pright);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(88).uint32(m.flags);
                return w;
            };

            /**
             * Encodes the specified Ext4AllocateBlocksFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4AllocateBlocksFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4AllocateBlocksFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4AllocateBlocksFtraceEvent} message Ext4AllocateBlocksFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4AllocateBlocksFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4AllocateBlocksFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4AllocateBlocksFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4AllocateBlocksFtraceEvent} Ext4AllocateBlocksFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4AllocateBlocksFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4AllocateBlocksFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.block = r.uint64();
                        break;
                    case 4:
                        m.len = r.uint32();
                        break;
                    case 5:
                        m.logical = r.uint32();
                        break;
                    case 6:
                        m.lleft = r.uint32();
                        break;
                    case 7:
                        m.lright = r.uint32();
                        break;
                    case 8:
                        m.goal = r.uint64();
                        break;
                    case 9:
                        m.pleft = r.uint64();
                        break;
                    case 10:
                        m.pright = r.uint64();
                        break;
                    case 11:
                        m.flags = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4AllocateBlocksFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4AllocateBlocksFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4AllocateBlocksFtraceEvent} Ext4AllocateBlocksFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4AllocateBlocksFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4AllocateBlocksFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4AllocateBlocksFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4AllocateBlocksFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.block != null && m.hasOwnProperty("block")) {
                    if (!$util.isInteger(m.block) && !(m.block && $util.isInteger(m.block.low) && $util.isInteger(m.block.high)))
                        return "block: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.logical != null && m.hasOwnProperty("logical")) {
                    if (!$util.isInteger(m.logical))
                        return "logical: integer expected";
                }
                if (m.lleft != null && m.hasOwnProperty("lleft")) {
                    if (!$util.isInteger(m.lleft))
                        return "lleft: integer expected";
                }
                if (m.lright != null && m.hasOwnProperty("lright")) {
                    if (!$util.isInteger(m.lright))
                        return "lright: integer expected";
                }
                if (m.goal != null && m.hasOwnProperty("goal")) {
                    if (!$util.isInteger(m.goal) && !(m.goal && $util.isInteger(m.goal.low) && $util.isInteger(m.goal.high)))
                        return "goal: integer|Long expected";
                }
                if (m.pleft != null && m.hasOwnProperty("pleft")) {
                    if (!$util.isInteger(m.pleft) && !(m.pleft && $util.isInteger(m.pleft.low) && $util.isInteger(m.pleft.high)))
                        return "pleft: integer|Long expected";
                }
                if (m.pright != null && m.hasOwnProperty("pright")) {
                    if (!$util.isInteger(m.pright) && !(m.pright && $util.isInteger(m.pright.low) && $util.isInteger(m.pright.high)))
                        return "pright: integer|Long expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4AllocateBlocksFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4AllocateBlocksFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4AllocateBlocksFtraceEvent} Ext4AllocateBlocksFtraceEvent
             */
            Ext4AllocateBlocksFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4AllocateBlocksFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4AllocateBlocksFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.block != null) {
                    if ($util.Long)
                        (m.block = $util.Long.fromValue(d.block)).unsigned = true;
                    else if (typeof d.block === "string")
                        m.block = parseInt(d.block, 10);
                    else if (typeof d.block === "number")
                        m.block = d.block;
                    else if (typeof d.block === "object")
                        m.block = new $util.LongBits(d.block.low >>> 0, d.block.high >>> 0).toNumber(true);
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.logical != null) {
                    m.logical = d.logical >>> 0;
                }
                if (d.lleft != null) {
                    m.lleft = d.lleft >>> 0;
                }
                if (d.lright != null) {
                    m.lright = d.lright >>> 0;
                }
                if (d.goal != null) {
                    if ($util.Long)
                        (m.goal = $util.Long.fromValue(d.goal)).unsigned = true;
                    else if (typeof d.goal === "string")
                        m.goal = parseInt(d.goal, 10);
                    else if (typeof d.goal === "number")
                        m.goal = d.goal;
                    else if (typeof d.goal === "object")
                        m.goal = new $util.LongBits(d.goal.low >>> 0, d.goal.high >>> 0).toNumber(true);
                }
                if (d.pleft != null) {
                    if ($util.Long)
                        (m.pleft = $util.Long.fromValue(d.pleft)).unsigned = true;
                    else if (typeof d.pleft === "string")
                        m.pleft = parseInt(d.pleft, 10);
                    else if (typeof d.pleft === "number")
                        m.pleft = d.pleft;
                    else if (typeof d.pleft === "object")
                        m.pleft = new $util.LongBits(d.pleft.low >>> 0, d.pleft.high >>> 0).toNumber(true);
                }
                if (d.pright != null) {
                    if ($util.Long)
                        (m.pright = $util.Long.fromValue(d.pright)).unsigned = true;
                    else if (typeof d.pright === "string")
                        m.pright = parseInt(d.pright, 10);
                    else if (typeof d.pright === "number")
                        m.pright = d.pright;
                    else if (typeof d.pright === "object")
                        m.pright = new $util.LongBits(d.pright.low >>> 0, d.pright.high >>> 0).toNumber(true);
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4AllocateBlocksFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4AllocateBlocksFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4AllocateBlocksFtraceEvent} m Ext4AllocateBlocksFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4AllocateBlocksFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.block = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.block = o.longs === String ? "0" : 0;
                    d.len = 0;
                    d.logical = 0;
                    d.lleft = 0;
                    d.lright = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.goal = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.goal = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pleft = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pleft = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pright = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pright = o.longs === String ? "0" : 0;
                    d.flags = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.block != null && m.hasOwnProperty("block")) {
                    if (typeof m.block === "number")
                        d.block = o.longs === String ? String(m.block) : m.block;
                    else
                        d.block = o.longs === String ? $util.Long.prototype.toString.call(m.block) : o.longs === Number ? new $util.LongBits(m.block.low >>> 0, m.block.high >>> 0).toNumber(true) : m.block;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.logical != null && m.hasOwnProperty("logical")) {
                    d.logical = m.logical;
                }
                if (m.lleft != null && m.hasOwnProperty("lleft")) {
                    d.lleft = m.lleft;
                }
                if (m.lright != null && m.hasOwnProperty("lright")) {
                    d.lright = m.lright;
                }
                if (m.goal != null && m.hasOwnProperty("goal")) {
                    if (typeof m.goal === "number")
                        d.goal = o.longs === String ? String(m.goal) : m.goal;
                    else
                        d.goal = o.longs === String ? $util.Long.prototype.toString.call(m.goal) : o.longs === Number ? new $util.LongBits(m.goal.low >>> 0, m.goal.high >>> 0).toNumber(true) : m.goal;
                }
                if (m.pleft != null && m.hasOwnProperty("pleft")) {
                    if (typeof m.pleft === "number")
                        d.pleft = o.longs === String ? String(m.pleft) : m.pleft;
                    else
                        d.pleft = o.longs === String ? $util.Long.prototype.toString.call(m.pleft) : o.longs === Number ? new $util.LongBits(m.pleft.low >>> 0, m.pleft.high >>> 0).toNumber(true) : m.pleft;
                }
                if (m.pright != null && m.hasOwnProperty("pright")) {
                    if (typeof m.pright === "number")
                        d.pright = o.longs === String ? String(m.pright) : m.pright;
                    else
                        d.pright = o.longs === String ? $util.Long.prototype.toString.call(m.pright) : o.longs === Number ? new $util.LongBits(m.pright.low >>> 0, m.pright.high >>> 0).toNumber(true) : m.pright;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                return d;
            };

            /**
             * Converts this Ext4AllocateBlocksFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4AllocateBlocksFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4AllocateBlocksFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4AllocateBlocksFtraceEvent;
        })();

        protos.Ext4AllocateInodeFtraceEvent = (function() {

            /**
             * Properties of an Ext4AllocateInodeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4AllocateInodeFtraceEvent
             * @property {number|null} [dev] Ext4AllocateInodeFtraceEvent dev
             * @property {number|null} [ino] Ext4AllocateInodeFtraceEvent ino
             * @property {number|null} [dir] Ext4AllocateInodeFtraceEvent dir
             * @property {number|null} [mode] Ext4AllocateInodeFtraceEvent mode
             */

            /**
             * Constructs a new Ext4AllocateInodeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4AllocateInodeFtraceEvent.
             * @implements IExt4AllocateInodeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4AllocateInodeFtraceEvent=} [p] Properties to set
             */
            function Ext4AllocateInodeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4AllocateInodeFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4AllocateInodeFtraceEvent
             * @instance
             */
            Ext4AllocateInodeFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4AllocateInodeFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4AllocateInodeFtraceEvent
             * @instance
             */
            Ext4AllocateInodeFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4AllocateInodeFtraceEvent dir.
             * @member {number} dir
             * @memberof perfetto.protos.Ext4AllocateInodeFtraceEvent
             * @instance
             */
            Ext4AllocateInodeFtraceEvent.prototype.dir = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4AllocateInodeFtraceEvent mode.
             * @member {number} mode
             * @memberof perfetto.protos.Ext4AllocateInodeFtraceEvent
             * @instance
             */
            Ext4AllocateInodeFtraceEvent.prototype.mode = 0;

            /**
             * Creates a new Ext4AllocateInodeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4AllocateInodeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4AllocateInodeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4AllocateInodeFtraceEvent} Ext4AllocateInodeFtraceEvent instance
             */
            Ext4AllocateInodeFtraceEvent.create = function create(properties) {
                return new Ext4AllocateInodeFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4AllocateInodeFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4AllocateInodeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4AllocateInodeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4AllocateInodeFtraceEvent} m Ext4AllocateInodeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4AllocateInodeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.dir != null && Object.hasOwnProperty.call(m, "dir"))
                    w.uint32(24).uint64(m.dir);
                if (m.mode != null && Object.hasOwnProperty.call(m, "mode"))
                    w.uint32(32).uint32(m.mode);
                return w;
            };

            /**
             * Encodes the specified Ext4AllocateInodeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4AllocateInodeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4AllocateInodeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4AllocateInodeFtraceEvent} message Ext4AllocateInodeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4AllocateInodeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4AllocateInodeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4AllocateInodeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4AllocateInodeFtraceEvent} Ext4AllocateInodeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4AllocateInodeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4AllocateInodeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.dir = r.uint64();
                        break;
                    case 4:
                        m.mode = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4AllocateInodeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4AllocateInodeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4AllocateInodeFtraceEvent} Ext4AllocateInodeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4AllocateInodeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4AllocateInodeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4AllocateInodeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4AllocateInodeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.dir != null && m.hasOwnProperty("dir")) {
                    if (!$util.isInteger(m.dir) && !(m.dir && $util.isInteger(m.dir.low) && $util.isInteger(m.dir.high)))
                        return "dir: integer|Long expected";
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    if (!$util.isInteger(m.mode))
                        return "mode: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4AllocateInodeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4AllocateInodeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4AllocateInodeFtraceEvent} Ext4AllocateInodeFtraceEvent
             */
            Ext4AllocateInodeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4AllocateInodeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4AllocateInodeFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.dir != null) {
                    if ($util.Long)
                        (m.dir = $util.Long.fromValue(d.dir)).unsigned = true;
                    else if (typeof d.dir === "string")
                        m.dir = parseInt(d.dir, 10);
                    else if (typeof d.dir === "number")
                        m.dir = d.dir;
                    else if (typeof d.dir === "object")
                        m.dir = new $util.LongBits(d.dir.low >>> 0, d.dir.high >>> 0).toNumber(true);
                }
                if (d.mode != null) {
                    m.mode = d.mode >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4AllocateInodeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4AllocateInodeFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4AllocateInodeFtraceEvent} m Ext4AllocateInodeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4AllocateInodeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dir = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dir = o.longs === String ? "0" : 0;
                    d.mode = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.dir != null && m.hasOwnProperty("dir")) {
                    if (typeof m.dir === "number")
                        d.dir = o.longs === String ? String(m.dir) : m.dir;
                    else
                        d.dir = o.longs === String ? $util.Long.prototype.toString.call(m.dir) : o.longs === Number ? new $util.LongBits(m.dir.low >>> 0, m.dir.high >>> 0).toNumber(true) : m.dir;
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    d.mode = m.mode;
                }
                return d;
            };

            /**
             * Converts this Ext4AllocateInodeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4AllocateInodeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4AllocateInodeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4AllocateInodeFtraceEvent;
        })();

        protos.Ext4BeginOrderedTruncateFtraceEvent = (function() {

            /**
             * Properties of an Ext4BeginOrderedTruncateFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4BeginOrderedTruncateFtraceEvent
             * @property {number|null} [dev] Ext4BeginOrderedTruncateFtraceEvent dev
             * @property {number|null} [ino] Ext4BeginOrderedTruncateFtraceEvent ino
             * @property {number|null} [newSize] Ext4BeginOrderedTruncateFtraceEvent newSize
             */

            /**
             * Constructs a new Ext4BeginOrderedTruncateFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4BeginOrderedTruncateFtraceEvent.
             * @implements IExt4BeginOrderedTruncateFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4BeginOrderedTruncateFtraceEvent=} [p] Properties to set
             */
            function Ext4BeginOrderedTruncateFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4BeginOrderedTruncateFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent
             * @instance
             */
            Ext4BeginOrderedTruncateFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4BeginOrderedTruncateFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent
             * @instance
             */
            Ext4BeginOrderedTruncateFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4BeginOrderedTruncateFtraceEvent newSize.
             * @member {number} newSize
             * @memberof perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent
             * @instance
             */
            Ext4BeginOrderedTruncateFtraceEvent.prototype.newSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new Ext4BeginOrderedTruncateFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4BeginOrderedTruncateFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent} Ext4BeginOrderedTruncateFtraceEvent instance
             */
            Ext4BeginOrderedTruncateFtraceEvent.create = function create(properties) {
                return new Ext4BeginOrderedTruncateFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4BeginOrderedTruncateFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4BeginOrderedTruncateFtraceEvent} m Ext4BeginOrderedTruncateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4BeginOrderedTruncateFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.newSize != null && Object.hasOwnProperty.call(m, "newSize"))
                    w.uint32(24).int64(m.newSize);
                return w;
            };

            /**
             * Encodes the specified Ext4BeginOrderedTruncateFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4BeginOrderedTruncateFtraceEvent} message Ext4BeginOrderedTruncateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4BeginOrderedTruncateFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4BeginOrderedTruncateFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent} Ext4BeginOrderedTruncateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4BeginOrderedTruncateFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.newSize = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4BeginOrderedTruncateFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent} Ext4BeginOrderedTruncateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4BeginOrderedTruncateFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4BeginOrderedTruncateFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4BeginOrderedTruncateFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.newSize != null && m.hasOwnProperty("newSize")) {
                    if (!$util.isInteger(m.newSize) && !(m.newSize && $util.isInteger(m.newSize.low) && $util.isInteger(m.newSize.high)))
                        return "newSize: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an Ext4BeginOrderedTruncateFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent} Ext4BeginOrderedTruncateFtraceEvent
             */
            Ext4BeginOrderedTruncateFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.newSize != null) {
                    if ($util.Long)
                        (m.newSize = $util.Long.fromValue(d.newSize)).unsigned = false;
                    else if (typeof d.newSize === "string")
                        m.newSize = parseInt(d.newSize, 10);
                    else if (typeof d.newSize === "number")
                        m.newSize = d.newSize;
                    else if (typeof d.newSize === "object")
                        m.newSize = new $util.LongBits(d.newSize.low >>> 0, d.newSize.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4BeginOrderedTruncateFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent} m Ext4BeginOrderedTruncateFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4BeginOrderedTruncateFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.newSize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.newSize = o.longs === String ? "0" : 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.newSize != null && m.hasOwnProperty("newSize")) {
                    if (typeof m.newSize === "number")
                        d.newSize = o.longs === String ? String(m.newSize) : m.newSize;
                    else
                        d.newSize = o.longs === String ? $util.Long.prototype.toString.call(m.newSize) : o.longs === Number ? new $util.LongBits(m.newSize.low >>> 0, m.newSize.high >>> 0).toNumber() : m.newSize;
                }
                return d;
            };

            /**
             * Converts this Ext4BeginOrderedTruncateFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4BeginOrderedTruncateFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4BeginOrderedTruncateFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4BeginOrderedTruncateFtraceEvent;
        })();

        protos.Ext4CollapseRangeFtraceEvent = (function() {

            /**
             * Properties of an Ext4CollapseRangeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4CollapseRangeFtraceEvent
             * @property {number|null} [dev] Ext4CollapseRangeFtraceEvent dev
             * @property {number|null} [ino] Ext4CollapseRangeFtraceEvent ino
             * @property {number|null} [offset] Ext4CollapseRangeFtraceEvent offset
             * @property {number|null} [len] Ext4CollapseRangeFtraceEvent len
             */

            /**
             * Constructs a new Ext4CollapseRangeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4CollapseRangeFtraceEvent.
             * @implements IExt4CollapseRangeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4CollapseRangeFtraceEvent=} [p] Properties to set
             */
            function Ext4CollapseRangeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4CollapseRangeFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4CollapseRangeFtraceEvent
             * @instance
             */
            Ext4CollapseRangeFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4CollapseRangeFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4CollapseRangeFtraceEvent
             * @instance
             */
            Ext4CollapseRangeFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4CollapseRangeFtraceEvent offset.
             * @member {number} offset
             * @memberof perfetto.protos.Ext4CollapseRangeFtraceEvent
             * @instance
             */
            Ext4CollapseRangeFtraceEvent.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4CollapseRangeFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4CollapseRangeFtraceEvent
             * @instance
             */
            Ext4CollapseRangeFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new Ext4CollapseRangeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4CollapseRangeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4CollapseRangeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4CollapseRangeFtraceEvent} Ext4CollapseRangeFtraceEvent instance
             */
            Ext4CollapseRangeFtraceEvent.create = function create(properties) {
                return new Ext4CollapseRangeFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4CollapseRangeFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4CollapseRangeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4CollapseRangeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4CollapseRangeFtraceEvent} m Ext4CollapseRangeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4CollapseRangeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.offset != null && Object.hasOwnProperty.call(m, "offset"))
                    w.uint32(24).int64(m.offset);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).int64(m.len);
                return w;
            };

            /**
             * Encodes the specified Ext4CollapseRangeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4CollapseRangeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4CollapseRangeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4CollapseRangeFtraceEvent} message Ext4CollapseRangeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4CollapseRangeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4CollapseRangeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4CollapseRangeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4CollapseRangeFtraceEvent} Ext4CollapseRangeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4CollapseRangeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4CollapseRangeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.offset = r.int64();
                        break;
                    case 4:
                        m.len = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4CollapseRangeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4CollapseRangeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4CollapseRangeFtraceEvent} Ext4CollapseRangeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4CollapseRangeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4CollapseRangeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4CollapseRangeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4CollapseRangeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (!$util.isInteger(m.offset) && !(m.offset && $util.isInteger(m.offset.low) && $util.isInteger(m.offset.high)))
                        return "offset: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an Ext4CollapseRangeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4CollapseRangeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4CollapseRangeFtraceEvent} Ext4CollapseRangeFtraceEvent
             */
            Ext4CollapseRangeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4CollapseRangeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4CollapseRangeFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.offset != null) {
                    if ($util.Long)
                        (m.offset = $util.Long.fromValue(d.offset)).unsigned = false;
                    else if (typeof d.offset === "string")
                        m.offset = parseInt(d.offset, 10);
                    else if (typeof d.offset === "number")
                        m.offset = d.offset;
                    else if (typeof d.offset === "object")
                        m.offset = new $util.LongBits(d.offset.low >>> 0, d.offset.high >>> 0).toNumber();
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = false;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4CollapseRangeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4CollapseRangeFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4CollapseRangeFtraceEvent} m Ext4CollapseRangeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4CollapseRangeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.offset = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.offset = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (typeof m.offset === "number")
                        d.offset = o.longs === String ? String(m.offset) : m.offset;
                    else
                        d.offset = o.longs === String ? $util.Long.prototype.toString.call(m.offset) : o.longs === Number ? new $util.LongBits(m.offset.low >>> 0, m.offset.high >>> 0).toNumber() : m.offset;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber() : m.len;
                }
                return d;
            };

            /**
             * Converts this Ext4CollapseRangeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4CollapseRangeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4CollapseRangeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4CollapseRangeFtraceEvent;
        })();

        protos.Ext4DaReleaseSpaceFtraceEvent = (function() {

            /**
             * Properties of an Ext4DaReleaseSpaceFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4DaReleaseSpaceFtraceEvent
             * @property {number|null} [dev] Ext4DaReleaseSpaceFtraceEvent dev
             * @property {number|null} [ino] Ext4DaReleaseSpaceFtraceEvent ino
             * @property {number|null} [iBlocks] Ext4DaReleaseSpaceFtraceEvent iBlocks
             * @property {number|null} [freedBlocks] Ext4DaReleaseSpaceFtraceEvent freedBlocks
             * @property {number|null} [reservedDataBlocks] Ext4DaReleaseSpaceFtraceEvent reservedDataBlocks
             * @property {number|null} [reservedMetaBlocks] Ext4DaReleaseSpaceFtraceEvent reservedMetaBlocks
             * @property {number|null} [allocatedMetaBlocks] Ext4DaReleaseSpaceFtraceEvent allocatedMetaBlocks
             * @property {number|null} [mode] Ext4DaReleaseSpaceFtraceEvent mode
             */

            /**
             * Constructs a new Ext4DaReleaseSpaceFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4DaReleaseSpaceFtraceEvent.
             * @implements IExt4DaReleaseSpaceFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4DaReleaseSpaceFtraceEvent=} [p] Properties to set
             */
            function Ext4DaReleaseSpaceFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4DaReleaseSpaceFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4DaReleaseSpaceFtraceEvent
             * @instance
             */
            Ext4DaReleaseSpaceFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DaReleaseSpaceFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4DaReleaseSpaceFtraceEvent
             * @instance
             */
            Ext4DaReleaseSpaceFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DaReleaseSpaceFtraceEvent iBlocks.
             * @member {number} iBlocks
             * @memberof perfetto.protos.Ext4DaReleaseSpaceFtraceEvent
             * @instance
             */
            Ext4DaReleaseSpaceFtraceEvent.prototype.iBlocks = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DaReleaseSpaceFtraceEvent freedBlocks.
             * @member {number} freedBlocks
             * @memberof perfetto.protos.Ext4DaReleaseSpaceFtraceEvent
             * @instance
             */
            Ext4DaReleaseSpaceFtraceEvent.prototype.freedBlocks = 0;

            /**
             * Ext4DaReleaseSpaceFtraceEvent reservedDataBlocks.
             * @member {number} reservedDataBlocks
             * @memberof perfetto.protos.Ext4DaReleaseSpaceFtraceEvent
             * @instance
             */
            Ext4DaReleaseSpaceFtraceEvent.prototype.reservedDataBlocks = 0;

            /**
             * Ext4DaReleaseSpaceFtraceEvent reservedMetaBlocks.
             * @member {number} reservedMetaBlocks
             * @memberof perfetto.protos.Ext4DaReleaseSpaceFtraceEvent
             * @instance
             */
            Ext4DaReleaseSpaceFtraceEvent.prototype.reservedMetaBlocks = 0;

            /**
             * Ext4DaReleaseSpaceFtraceEvent allocatedMetaBlocks.
             * @member {number} allocatedMetaBlocks
             * @memberof perfetto.protos.Ext4DaReleaseSpaceFtraceEvent
             * @instance
             */
            Ext4DaReleaseSpaceFtraceEvent.prototype.allocatedMetaBlocks = 0;

            /**
             * Ext4DaReleaseSpaceFtraceEvent mode.
             * @member {number} mode
             * @memberof perfetto.protos.Ext4DaReleaseSpaceFtraceEvent
             * @instance
             */
            Ext4DaReleaseSpaceFtraceEvent.prototype.mode = 0;

            /**
             * Creates a new Ext4DaReleaseSpaceFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4DaReleaseSpaceFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DaReleaseSpaceFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4DaReleaseSpaceFtraceEvent} Ext4DaReleaseSpaceFtraceEvent instance
             */
            Ext4DaReleaseSpaceFtraceEvent.create = function create(properties) {
                return new Ext4DaReleaseSpaceFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4DaReleaseSpaceFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4DaReleaseSpaceFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4DaReleaseSpaceFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DaReleaseSpaceFtraceEvent} m Ext4DaReleaseSpaceFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4DaReleaseSpaceFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.iBlocks != null && Object.hasOwnProperty.call(m, "iBlocks"))
                    w.uint32(24).uint64(m.iBlocks);
                if (m.freedBlocks != null && Object.hasOwnProperty.call(m, "freedBlocks"))
                    w.uint32(32).int32(m.freedBlocks);
                if (m.reservedDataBlocks != null && Object.hasOwnProperty.call(m, "reservedDataBlocks"))
                    w.uint32(40).int32(m.reservedDataBlocks);
                if (m.reservedMetaBlocks != null && Object.hasOwnProperty.call(m, "reservedMetaBlocks"))
                    w.uint32(48).int32(m.reservedMetaBlocks);
                if (m.allocatedMetaBlocks != null && Object.hasOwnProperty.call(m, "allocatedMetaBlocks"))
                    w.uint32(56).int32(m.allocatedMetaBlocks);
                if (m.mode != null && Object.hasOwnProperty.call(m, "mode"))
                    w.uint32(64).uint32(m.mode);
                return w;
            };

            /**
             * Encodes the specified Ext4DaReleaseSpaceFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4DaReleaseSpaceFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4DaReleaseSpaceFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DaReleaseSpaceFtraceEvent} message Ext4DaReleaseSpaceFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4DaReleaseSpaceFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4DaReleaseSpaceFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4DaReleaseSpaceFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4DaReleaseSpaceFtraceEvent} Ext4DaReleaseSpaceFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4DaReleaseSpaceFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4DaReleaseSpaceFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.iBlocks = r.uint64();
                        break;
                    case 4:
                        m.freedBlocks = r.int32();
                        break;
                    case 5:
                        m.reservedDataBlocks = r.int32();
                        break;
                    case 6:
                        m.reservedMetaBlocks = r.int32();
                        break;
                    case 7:
                        m.allocatedMetaBlocks = r.int32();
                        break;
                    case 8:
                        m.mode = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4DaReleaseSpaceFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4DaReleaseSpaceFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4DaReleaseSpaceFtraceEvent} Ext4DaReleaseSpaceFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4DaReleaseSpaceFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4DaReleaseSpaceFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4DaReleaseSpaceFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4DaReleaseSpaceFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.iBlocks != null && m.hasOwnProperty("iBlocks")) {
                    if (!$util.isInteger(m.iBlocks) && !(m.iBlocks && $util.isInteger(m.iBlocks.low) && $util.isInteger(m.iBlocks.high)))
                        return "iBlocks: integer|Long expected";
                }
                if (m.freedBlocks != null && m.hasOwnProperty("freedBlocks")) {
                    if (!$util.isInteger(m.freedBlocks))
                        return "freedBlocks: integer expected";
                }
                if (m.reservedDataBlocks != null && m.hasOwnProperty("reservedDataBlocks")) {
                    if (!$util.isInteger(m.reservedDataBlocks))
                        return "reservedDataBlocks: integer expected";
                }
                if (m.reservedMetaBlocks != null && m.hasOwnProperty("reservedMetaBlocks")) {
                    if (!$util.isInteger(m.reservedMetaBlocks))
                        return "reservedMetaBlocks: integer expected";
                }
                if (m.allocatedMetaBlocks != null && m.hasOwnProperty("allocatedMetaBlocks")) {
                    if (!$util.isInteger(m.allocatedMetaBlocks))
                        return "allocatedMetaBlocks: integer expected";
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    if (!$util.isInteger(m.mode))
                        return "mode: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4DaReleaseSpaceFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4DaReleaseSpaceFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4DaReleaseSpaceFtraceEvent} Ext4DaReleaseSpaceFtraceEvent
             */
            Ext4DaReleaseSpaceFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4DaReleaseSpaceFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4DaReleaseSpaceFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.iBlocks != null) {
                    if ($util.Long)
                        (m.iBlocks = $util.Long.fromValue(d.iBlocks)).unsigned = true;
                    else if (typeof d.iBlocks === "string")
                        m.iBlocks = parseInt(d.iBlocks, 10);
                    else if (typeof d.iBlocks === "number")
                        m.iBlocks = d.iBlocks;
                    else if (typeof d.iBlocks === "object")
                        m.iBlocks = new $util.LongBits(d.iBlocks.low >>> 0, d.iBlocks.high >>> 0).toNumber(true);
                }
                if (d.freedBlocks != null) {
                    m.freedBlocks = d.freedBlocks | 0;
                }
                if (d.reservedDataBlocks != null) {
                    m.reservedDataBlocks = d.reservedDataBlocks | 0;
                }
                if (d.reservedMetaBlocks != null) {
                    m.reservedMetaBlocks = d.reservedMetaBlocks | 0;
                }
                if (d.allocatedMetaBlocks != null) {
                    m.allocatedMetaBlocks = d.allocatedMetaBlocks | 0;
                }
                if (d.mode != null) {
                    m.mode = d.mode >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4DaReleaseSpaceFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4DaReleaseSpaceFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4DaReleaseSpaceFtraceEvent} m Ext4DaReleaseSpaceFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4DaReleaseSpaceFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.iBlocks = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.iBlocks = o.longs === String ? "0" : 0;
                    d.freedBlocks = 0;
                    d.reservedDataBlocks = 0;
                    d.reservedMetaBlocks = 0;
                    d.allocatedMetaBlocks = 0;
                    d.mode = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.iBlocks != null && m.hasOwnProperty("iBlocks")) {
                    if (typeof m.iBlocks === "number")
                        d.iBlocks = o.longs === String ? String(m.iBlocks) : m.iBlocks;
                    else
                        d.iBlocks = o.longs === String ? $util.Long.prototype.toString.call(m.iBlocks) : o.longs === Number ? new $util.LongBits(m.iBlocks.low >>> 0, m.iBlocks.high >>> 0).toNumber(true) : m.iBlocks;
                }
                if (m.freedBlocks != null && m.hasOwnProperty("freedBlocks")) {
                    d.freedBlocks = m.freedBlocks;
                }
                if (m.reservedDataBlocks != null && m.hasOwnProperty("reservedDataBlocks")) {
                    d.reservedDataBlocks = m.reservedDataBlocks;
                }
                if (m.reservedMetaBlocks != null && m.hasOwnProperty("reservedMetaBlocks")) {
                    d.reservedMetaBlocks = m.reservedMetaBlocks;
                }
                if (m.allocatedMetaBlocks != null && m.hasOwnProperty("allocatedMetaBlocks")) {
                    d.allocatedMetaBlocks = m.allocatedMetaBlocks;
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    d.mode = m.mode;
                }
                return d;
            };

            /**
             * Converts this Ext4DaReleaseSpaceFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4DaReleaseSpaceFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4DaReleaseSpaceFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4DaReleaseSpaceFtraceEvent;
        })();

        protos.Ext4DaReserveSpaceFtraceEvent = (function() {

            /**
             * Properties of an Ext4DaReserveSpaceFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4DaReserveSpaceFtraceEvent
             * @property {number|null} [dev] Ext4DaReserveSpaceFtraceEvent dev
             * @property {number|null} [ino] Ext4DaReserveSpaceFtraceEvent ino
             * @property {number|null} [iBlocks] Ext4DaReserveSpaceFtraceEvent iBlocks
             * @property {number|null} [reservedDataBlocks] Ext4DaReserveSpaceFtraceEvent reservedDataBlocks
             * @property {number|null} [reservedMetaBlocks] Ext4DaReserveSpaceFtraceEvent reservedMetaBlocks
             * @property {number|null} [mode] Ext4DaReserveSpaceFtraceEvent mode
             * @property {number|null} [mdNeeded] Ext4DaReserveSpaceFtraceEvent mdNeeded
             */

            /**
             * Constructs a new Ext4DaReserveSpaceFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4DaReserveSpaceFtraceEvent.
             * @implements IExt4DaReserveSpaceFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4DaReserveSpaceFtraceEvent=} [p] Properties to set
             */
            function Ext4DaReserveSpaceFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4DaReserveSpaceFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4DaReserveSpaceFtraceEvent
             * @instance
             */
            Ext4DaReserveSpaceFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DaReserveSpaceFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4DaReserveSpaceFtraceEvent
             * @instance
             */
            Ext4DaReserveSpaceFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DaReserveSpaceFtraceEvent iBlocks.
             * @member {number} iBlocks
             * @memberof perfetto.protos.Ext4DaReserveSpaceFtraceEvent
             * @instance
             */
            Ext4DaReserveSpaceFtraceEvent.prototype.iBlocks = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DaReserveSpaceFtraceEvent reservedDataBlocks.
             * @member {number} reservedDataBlocks
             * @memberof perfetto.protos.Ext4DaReserveSpaceFtraceEvent
             * @instance
             */
            Ext4DaReserveSpaceFtraceEvent.prototype.reservedDataBlocks = 0;

            /**
             * Ext4DaReserveSpaceFtraceEvent reservedMetaBlocks.
             * @member {number} reservedMetaBlocks
             * @memberof perfetto.protos.Ext4DaReserveSpaceFtraceEvent
             * @instance
             */
            Ext4DaReserveSpaceFtraceEvent.prototype.reservedMetaBlocks = 0;

            /**
             * Ext4DaReserveSpaceFtraceEvent mode.
             * @member {number} mode
             * @memberof perfetto.protos.Ext4DaReserveSpaceFtraceEvent
             * @instance
             */
            Ext4DaReserveSpaceFtraceEvent.prototype.mode = 0;

            /**
             * Ext4DaReserveSpaceFtraceEvent mdNeeded.
             * @member {number} mdNeeded
             * @memberof perfetto.protos.Ext4DaReserveSpaceFtraceEvent
             * @instance
             */
            Ext4DaReserveSpaceFtraceEvent.prototype.mdNeeded = 0;

            /**
             * Creates a new Ext4DaReserveSpaceFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4DaReserveSpaceFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DaReserveSpaceFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4DaReserveSpaceFtraceEvent} Ext4DaReserveSpaceFtraceEvent instance
             */
            Ext4DaReserveSpaceFtraceEvent.create = function create(properties) {
                return new Ext4DaReserveSpaceFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4DaReserveSpaceFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4DaReserveSpaceFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4DaReserveSpaceFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DaReserveSpaceFtraceEvent} m Ext4DaReserveSpaceFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4DaReserveSpaceFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.iBlocks != null && Object.hasOwnProperty.call(m, "iBlocks"))
                    w.uint32(24).uint64(m.iBlocks);
                if (m.reservedDataBlocks != null && Object.hasOwnProperty.call(m, "reservedDataBlocks"))
                    w.uint32(32).int32(m.reservedDataBlocks);
                if (m.reservedMetaBlocks != null && Object.hasOwnProperty.call(m, "reservedMetaBlocks"))
                    w.uint32(40).int32(m.reservedMetaBlocks);
                if (m.mode != null && Object.hasOwnProperty.call(m, "mode"))
                    w.uint32(48).uint32(m.mode);
                if (m.mdNeeded != null && Object.hasOwnProperty.call(m, "mdNeeded"))
                    w.uint32(56).int32(m.mdNeeded);
                return w;
            };

            /**
             * Encodes the specified Ext4DaReserveSpaceFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4DaReserveSpaceFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4DaReserveSpaceFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DaReserveSpaceFtraceEvent} message Ext4DaReserveSpaceFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4DaReserveSpaceFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4DaReserveSpaceFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4DaReserveSpaceFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4DaReserveSpaceFtraceEvent} Ext4DaReserveSpaceFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4DaReserveSpaceFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4DaReserveSpaceFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.iBlocks = r.uint64();
                        break;
                    case 4:
                        m.reservedDataBlocks = r.int32();
                        break;
                    case 5:
                        m.reservedMetaBlocks = r.int32();
                        break;
                    case 6:
                        m.mode = r.uint32();
                        break;
                    case 7:
                        m.mdNeeded = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4DaReserveSpaceFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4DaReserveSpaceFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4DaReserveSpaceFtraceEvent} Ext4DaReserveSpaceFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4DaReserveSpaceFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4DaReserveSpaceFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4DaReserveSpaceFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4DaReserveSpaceFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.iBlocks != null && m.hasOwnProperty("iBlocks")) {
                    if (!$util.isInteger(m.iBlocks) && !(m.iBlocks && $util.isInteger(m.iBlocks.low) && $util.isInteger(m.iBlocks.high)))
                        return "iBlocks: integer|Long expected";
                }
                if (m.reservedDataBlocks != null && m.hasOwnProperty("reservedDataBlocks")) {
                    if (!$util.isInteger(m.reservedDataBlocks))
                        return "reservedDataBlocks: integer expected";
                }
                if (m.reservedMetaBlocks != null && m.hasOwnProperty("reservedMetaBlocks")) {
                    if (!$util.isInteger(m.reservedMetaBlocks))
                        return "reservedMetaBlocks: integer expected";
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    if (!$util.isInteger(m.mode))
                        return "mode: integer expected";
                }
                if (m.mdNeeded != null && m.hasOwnProperty("mdNeeded")) {
                    if (!$util.isInteger(m.mdNeeded))
                        return "mdNeeded: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4DaReserveSpaceFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4DaReserveSpaceFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4DaReserveSpaceFtraceEvent} Ext4DaReserveSpaceFtraceEvent
             */
            Ext4DaReserveSpaceFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4DaReserveSpaceFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4DaReserveSpaceFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.iBlocks != null) {
                    if ($util.Long)
                        (m.iBlocks = $util.Long.fromValue(d.iBlocks)).unsigned = true;
                    else if (typeof d.iBlocks === "string")
                        m.iBlocks = parseInt(d.iBlocks, 10);
                    else if (typeof d.iBlocks === "number")
                        m.iBlocks = d.iBlocks;
                    else if (typeof d.iBlocks === "object")
                        m.iBlocks = new $util.LongBits(d.iBlocks.low >>> 0, d.iBlocks.high >>> 0).toNumber(true);
                }
                if (d.reservedDataBlocks != null) {
                    m.reservedDataBlocks = d.reservedDataBlocks | 0;
                }
                if (d.reservedMetaBlocks != null) {
                    m.reservedMetaBlocks = d.reservedMetaBlocks | 0;
                }
                if (d.mode != null) {
                    m.mode = d.mode >>> 0;
                }
                if (d.mdNeeded != null) {
                    m.mdNeeded = d.mdNeeded | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4DaReserveSpaceFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4DaReserveSpaceFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4DaReserveSpaceFtraceEvent} m Ext4DaReserveSpaceFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4DaReserveSpaceFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.iBlocks = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.iBlocks = o.longs === String ? "0" : 0;
                    d.reservedDataBlocks = 0;
                    d.reservedMetaBlocks = 0;
                    d.mode = 0;
                    d.mdNeeded = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.iBlocks != null && m.hasOwnProperty("iBlocks")) {
                    if (typeof m.iBlocks === "number")
                        d.iBlocks = o.longs === String ? String(m.iBlocks) : m.iBlocks;
                    else
                        d.iBlocks = o.longs === String ? $util.Long.prototype.toString.call(m.iBlocks) : o.longs === Number ? new $util.LongBits(m.iBlocks.low >>> 0, m.iBlocks.high >>> 0).toNumber(true) : m.iBlocks;
                }
                if (m.reservedDataBlocks != null && m.hasOwnProperty("reservedDataBlocks")) {
                    d.reservedDataBlocks = m.reservedDataBlocks;
                }
                if (m.reservedMetaBlocks != null && m.hasOwnProperty("reservedMetaBlocks")) {
                    d.reservedMetaBlocks = m.reservedMetaBlocks;
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    d.mode = m.mode;
                }
                if (m.mdNeeded != null && m.hasOwnProperty("mdNeeded")) {
                    d.mdNeeded = m.mdNeeded;
                }
                return d;
            };

            /**
             * Converts this Ext4DaReserveSpaceFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4DaReserveSpaceFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4DaReserveSpaceFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4DaReserveSpaceFtraceEvent;
        })();

        protos.Ext4DaUpdateReserveSpaceFtraceEvent = (function() {

            /**
             * Properties of an Ext4DaUpdateReserveSpaceFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4DaUpdateReserveSpaceFtraceEvent
             * @property {number|null} [dev] Ext4DaUpdateReserveSpaceFtraceEvent dev
             * @property {number|null} [ino] Ext4DaUpdateReserveSpaceFtraceEvent ino
             * @property {number|null} [iBlocks] Ext4DaUpdateReserveSpaceFtraceEvent iBlocks
             * @property {number|null} [usedBlocks] Ext4DaUpdateReserveSpaceFtraceEvent usedBlocks
             * @property {number|null} [reservedDataBlocks] Ext4DaUpdateReserveSpaceFtraceEvent reservedDataBlocks
             * @property {number|null} [reservedMetaBlocks] Ext4DaUpdateReserveSpaceFtraceEvent reservedMetaBlocks
             * @property {number|null} [allocatedMetaBlocks] Ext4DaUpdateReserveSpaceFtraceEvent allocatedMetaBlocks
             * @property {number|null} [quotaClaim] Ext4DaUpdateReserveSpaceFtraceEvent quotaClaim
             * @property {number|null} [mode] Ext4DaUpdateReserveSpaceFtraceEvent mode
             */

            /**
             * Constructs a new Ext4DaUpdateReserveSpaceFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4DaUpdateReserveSpaceFtraceEvent.
             * @implements IExt4DaUpdateReserveSpaceFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4DaUpdateReserveSpaceFtraceEvent=} [p] Properties to set
             */
            function Ext4DaUpdateReserveSpaceFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4DaUpdateReserveSpaceFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent
             * @instance
             */
            Ext4DaUpdateReserveSpaceFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DaUpdateReserveSpaceFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent
             * @instance
             */
            Ext4DaUpdateReserveSpaceFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DaUpdateReserveSpaceFtraceEvent iBlocks.
             * @member {number} iBlocks
             * @memberof perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent
             * @instance
             */
            Ext4DaUpdateReserveSpaceFtraceEvent.prototype.iBlocks = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DaUpdateReserveSpaceFtraceEvent usedBlocks.
             * @member {number} usedBlocks
             * @memberof perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent
             * @instance
             */
            Ext4DaUpdateReserveSpaceFtraceEvent.prototype.usedBlocks = 0;

            /**
             * Ext4DaUpdateReserveSpaceFtraceEvent reservedDataBlocks.
             * @member {number} reservedDataBlocks
             * @memberof perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent
             * @instance
             */
            Ext4DaUpdateReserveSpaceFtraceEvent.prototype.reservedDataBlocks = 0;

            /**
             * Ext4DaUpdateReserveSpaceFtraceEvent reservedMetaBlocks.
             * @member {number} reservedMetaBlocks
             * @memberof perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent
             * @instance
             */
            Ext4DaUpdateReserveSpaceFtraceEvent.prototype.reservedMetaBlocks = 0;

            /**
             * Ext4DaUpdateReserveSpaceFtraceEvent allocatedMetaBlocks.
             * @member {number} allocatedMetaBlocks
             * @memberof perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent
             * @instance
             */
            Ext4DaUpdateReserveSpaceFtraceEvent.prototype.allocatedMetaBlocks = 0;

            /**
             * Ext4DaUpdateReserveSpaceFtraceEvent quotaClaim.
             * @member {number} quotaClaim
             * @memberof perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent
             * @instance
             */
            Ext4DaUpdateReserveSpaceFtraceEvent.prototype.quotaClaim = 0;

            /**
             * Ext4DaUpdateReserveSpaceFtraceEvent mode.
             * @member {number} mode
             * @memberof perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent
             * @instance
             */
            Ext4DaUpdateReserveSpaceFtraceEvent.prototype.mode = 0;

            /**
             * Creates a new Ext4DaUpdateReserveSpaceFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DaUpdateReserveSpaceFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent} Ext4DaUpdateReserveSpaceFtraceEvent instance
             */
            Ext4DaUpdateReserveSpaceFtraceEvent.create = function create(properties) {
                return new Ext4DaUpdateReserveSpaceFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4DaUpdateReserveSpaceFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DaUpdateReserveSpaceFtraceEvent} m Ext4DaUpdateReserveSpaceFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4DaUpdateReserveSpaceFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.iBlocks != null && Object.hasOwnProperty.call(m, "iBlocks"))
                    w.uint32(24).uint64(m.iBlocks);
                if (m.usedBlocks != null && Object.hasOwnProperty.call(m, "usedBlocks"))
                    w.uint32(32).int32(m.usedBlocks);
                if (m.reservedDataBlocks != null && Object.hasOwnProperty.call(m, "reservedDataBlocks"))
                    w.uint32(40).int32(m.reservedDataBlocks);
                if (m.reservedMetaBlocks != null && Object.hasOwnProperty.call(m, "reservedMetaBlocks"))
                    w.uint32(48).int32(m.reservedMetaBlocks);
                if (m.allocatedMetaBlocks != null && Object.hasOwnProperty.call(m, "allocatedMetaBlocks"))
                    w.uint32(56).int32(m.allocatedMetaBlocks);
                if (m.quotaClaim != null && Object.hasOwnProperty.call(m, "quotaClaim"))
                    w.uint32(64).int32(m.quotaClaim);
                if (m.mode != null && Object.hasOwnProperty.call(m, "mode"))
                    w.uint32(72).uint32(m.mode);
                return w;
            };

            /**
             * Encodes the specified Ext4DaUpdateReserveSpaceFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DaUpdateReserveSpaceFtraceEvent} message Ext4DaUpdateReserveSpaceFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4DaUpdateReserveSpaceFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4DaUpdateReserveSpaceFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent} Ext4DaUpdateReserveSpaceFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4DaUpdateReserveSpaceFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.iBlocks = r.uint64();
                        break;
                    case 4:
                        m.usedBlocks = r.int32();
                        break;
                    case 5:
                        m.reservedDataBlocks = r.int32();
                        break;
                    case 6:
                        m.reservedMetaBlocks = r.int32();
                        break;
                    case 7:
                        m.allocatedMetaBlocks = r.int32();
                        break;
                    case 8:
                        m.quotaClaim = r.int32();
                        break;
                    case 9:
                        m.mode = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4DaUpdateReserveSpaceFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent} Ext4DaUpdateReserveSpaceFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4DaUpdateReserveSpaceFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4DaUpdateReserveSpaceFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4DaUpdateReserveSpaceFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.iBlocks != null && m.hasOwnProperty("iBlocks")) {
                    if (!$util.isInteger(m.iBlocks) && !(m.iBlocks && $util.isInteger(m.iBlocks.low) && $util.isInteger(m.iBlocks.high)))
                        return "iBlocks: integer|Long expected";
                }
                if (m.usedBlocks != null && m.hasOwnProperty("usedBlocks")) {
                    if (!$util.isInteger(m.usedBlocks))
                        return "usedBlocks: integer expected";
                }
                if (m.reservedDataBlocks != null && m.hasOwnProperty("reservedDataBlocks")) {
                    if (!$util.isInteger(m.reservedDataBlocks))
                        return "reservedDataBlocks: integer expected";
                }
                if (m.reservedMetaBlocks != null && m.hasOwnProperty("reservedMetaBlocks")) {
                    if (!$util.isInteger(m.reservedMetaBlocks))
                        return "reservedMetaBlocks: integer expected";
                }
                if (m.allocatedMetaBlocks != null && m.hasOwnProperty("allocatedMetaBlocks")) {
                    if (!$util.isInteger(m.allocatedMetaBlocks))
                        return "allocatedMetaBlocks: integer expected";
                }
                if (m.quotaClaim != null && m.hasOwnProperty("quotaClaim")) {
                    if (!$util.isInteger(m.quotaClaim))
                        return "quotaClaim: integer expected";
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    if (!$util.isInteger(m.mode))
                        return "mode: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4DaUpdateReserveSpaceFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent} Ext4DaUpdateReserveSpaceFtraceEvent
             */
            Ext4DaUpdateReserveSpaceFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.iBlocks != null) {
                    if ($util.Long)
                        (m.iBlocks = $util.Long.fromValue(d.iBlocks)).unsigned = true;
                    else if (typeof d.iBlocks === "string")
                        m.iBlocks = parseInt(d.iBlocks, 10);
                    else if (typeof d.iBlocks === "number")
                        m.iBlocks = d.iBlocks;
                    else if (typeof d.iBlocks === "object")
                        m.iBlocks = new $util.LongBits(d.iBlocks.low >>> 0, d.iBlocks.high >>> 0).toNumber(true);
                }
                if (d.usedBlocks != null) {
                    m.usedBlocks = d.usedBlocks | 0;
                }
                if (d.reservedDataBlocks != null) {
                    m.reservedDataBlocks = d.reservedDataBlocks | 0;
                }
                if (d.reservedMetaBlocks != null) {
                    m.reservedMetaBlocks = d.reservedMetaBlocks | 0;
                }
                if (d.allocatedMetaBlocks != null) {
                    m.allocatedMetaBlocks = d.allocatedMetaBlocks | 0;
                }
                if (d.quotaClaim != null) {
                    m.quotaClaim = d.quotaClaim | 0;
                }
                if (d.mode != null) {
                    m.mode = d.mode >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4DaUpdateReserveSpaceFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent} m Ext4DaUpdateReserveSpaceFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4DaUpdateReserveSpaceFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.iBlocks = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.iBlocks = o.longs === String ? "0" : 0;
                    d.usedBlocks = 0;
                    d.reservedDataBlocks = 0;
                    d.reservedMetaBlocks = 0;
                    d.allocatedMetaBlocks = 0;
                    d.quotaClaim = 0;
                    d.mode = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.iBlocks != null && m.hasOwnProperty("iBlocks")) {
                    if (typeof m.iBlocks === "number")
                        d.iBlocks = o.longs === String ? String(m.iBlocks) : m.iBlocks;
                    else
                        d.iBlocks = o.longs === String ? $util.Long.prototype.toString.call(m.iBlocks) : o.longs === Number ? new $util.LongBits(m.iBlocks.low >>> 0, m.iBlocks.high >>> 0).toNumber(true) : m.iBlocks;
                }
                if (m.usedBlocks != null && m.hasOwnProperty("usedBlocks")) {
                    d.usedBlocks = m.usedBlocks;
                }
                if (m.reservedDataBlocks != null && m.hasOwnProperty("reservedDataBlocks")) {
                    d.reservedDataBlocks = m.reservedDataBlocks;
                }
                if (m.reservedMetaBlocks != null && m.hasOwnProperty("reservedMetaBlocks")) {
                    d.reservedMetaBlocks = m.reservedMetaBlocks;
                }
                if (m.allocatedMetaBlocks != null && m.hasOwnProperty("allocatedMetaBlocks")) {
                    d.allocatedMetaBlocks = m.allocatedMetaBlocks;
                }
                if (m.quotaClaim != null && m.hasOwnProperty("quotaClaim")) {
                    d.quotaClaim = m.quotaClaim;
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    d.mode = m.mode;
                }
                return d;
            };

            /**
             * Converts this Ext4DaUpdateReserveSpaceFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4DaUpdateReserveSpaceFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4DaUpdateReserveSpaceFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4DaUpdateReserveSpaceFtraceEvent;
        })();

        protos.Ext4DaWritePagesFtraceEvent = (function() {

            /**
             * Properties of an Ext4DaWritePagesFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4DaWritePagesFtraceEvent
             * @property {number|null} [dev] Ext4DaWritePagesFtraceEvent dev
             * @property {number|null} [ino] Ext4DaWritePagesFtraceEvent ino
             * @property {number|null} [firstPage] Ext4DaWritePagesFtraceEvent firstPage
             * @property {number|null} [nrToWrite] Ext4DaWritePagesFtraceEvent nrToWrite
             * @property {number|null} [syncMode] Ext4DaWritePagesFtraceEvent syncMode
             * @property {number|null} [bBlocknr] Ext4DaWritePagesFtraceEvent bBlocknr
             * @property {number|null} [bSize] Ext4DaWritePagesFtraceEvent bSize
             * @property {number|null} [bState] Ext4DaWritePagesFtraceEvent bState
             * @property {number|null} [ioDone] Ext4DaWritePagesFtraceEvent ioDone
             * @property {number|null} [pagesWritten] Ext4DaWritePagesFtraceEvent pagesWritten
             */

            /**
             * Constructs a new Ext4DaWritePagesFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4DaWritePagesFtraceEvent.
             * @implements IExt4DaWritePagesFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4DaWritePagesFtraceEvent=} [p] Properties to set
             */
            function Ext4DaWritePagesFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4DaWritePagesFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4DaWritePagesFtraceEvent
             * @instance
             */
            Ext4DaWritePagesFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DaWritePagesFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4DaWritePagesFtraceEvent
             * @instance
             */
            Ext4DaWritePagesFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DaWritePagesFtraceEvent firstPage.
             * @member {number} firstPage
             * @memberof perfetto.protos.Ext4DaWritePagesFtraceEvent
             * @instance
             */
            Ext4DaWritePagesFtraceEvent.prototype.firstPage = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DaWritePagesFtraceEvent nrToWrite.
             * @member {number} nrToWrite
             * @memberof perfetto.protos.Ext4DaWritePagesFtraceEvent
             * @instance
             */
            Ext4DaWritePagesFtraceEvent.prototype.nrToWrite = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4DaWritePagesFtraceEvent syncMode.
             * @member {number} syncMode
             * @memberof perfetto.protos.Ext4DaWritePagesFtraceEvent
             * @instance
             */
            Ext4DaWritePagesFtraceEvent.prototype.syncMode = 0;

            /**
             * Ext4DaWritePagesFtraceEvent bBlocknr.
             * @member {number} bBlocknr
             * @memberof perfetto.protos.Ext4DaWritePagesFtraceEvent
             * @instance
             */
            Ext4DaWritePagesFtraceEvent.prototype.bBlocknr = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DaWritePagesFtraceEvent bSize.
             * @member {number} bSize
             * @memberof perfetto.protos.Ext4DaWritePagesFtraceEvent
             * @instance
             */
            Ext4DaWritePagesFtraceEvent.prototype.bSize = 0;

            /**
             * Ext4DaWritePagesFtraceEvent bState.
             * @member {number} bState
             * @memberof perfetto.protos.Ext4DaWritePagesFtraceEvent
             * @instance
             */
            Ext4DaWritePagesFtraceEvent.prototype.bState = 0;

            /**
             * Ext4DaWritePagesFtraceEvent ioDone.
             * @member {number} ioDone
             * @memberof perfetto.protos.Ext4DaWritePagesFtraceEvent
             * @instance
             */
            Ext4DaWritePagesFtraceEvent.prototype.ioDone = 0;

            /**
             * Ext4DaWritePagesFtraceEvent pagesWritten.
             * @member {number} pagesWritten
             * @memberof perfetto.protos.Ext4DaWritePagesFtraceEvent
             * @instance
             */
            Ext4DaWritePagesFtraceEvent.prototype.pagesWritten = 0;

            /**
             * Creates a new Ext4DaWritePagesFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4DaWritePagesFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DaWritePagesFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4DaWritePagesFtraceEvent} Ext4DaWritePagesFtraceEvent instance
             */
            Ext4DaWritePagesFtraceEvent.create = function create(properties) {
                return new Ext4DaWritePagesFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4DaWritePagesFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4DaWritePagesFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4DaWritePagesFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DaWritePagesFtraceEvent} m Ext4DaWritePagesFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4DaWritePagesFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.firstPage != null && Object.hasOwnProperty.call(m, "firstPage"))
                    w.uint32(24).uint64(m.firstPage);
                if (m.nrToWrite != null && Object.hasOwnProperty.call(m, "nrToWrite"))
                    w.uint32(32).int64(m.nrToWrite);
                if (m.syncMode != null && Object.hasOwnProperty.call(m, "syncMode"))
                    w.uint32(40).int32(m.syncMode);
                if (m.bBlocknr != null && Object.hasOwnProperty.call(m, "bBlocknr"))
                    w.uint32(48).uint64(m.bBlocknr);
                if (m.bSize != null && Object.hasOwnProperty.call(m, "bSize"))
                    w.uint32(56).uint32(m.bSize);
                if (m.bState != null && Object.hasOwnProperty.call(m, "bState"))
                    w.uint32(64).uint32(m.bState);
                if (m.ioDone != null && Object.hasOwnProperty.call(m, "ioDone"))
                    w.uint32(72).int32(m.ioDone);
                if (m.pagesWritten != null && Object.hasOwnProperty.call(m, "pagesWritten"))
                    w.uint32(80).int32(m.pagesWritten);
                return w;
            };

            /**
             * Encodes the specified Ext4DaWritePagesFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4DaWritePagesFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4DaWritePagesFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DaWritePagesFtraceEvent} message Ext4DaWritePagesFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4DaWritePagesFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4DaWritePagesFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4DaWritePagesFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4DaWritePagesFtraceEvent} Ext4DaWritePagesFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4DaWritePagesFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4DaWritePagesFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.firstPage = r.uint64();
                        break;
                    case 4:
                        m.nrToWrite = r.int64();
                        break;
                    case 5:
                        m.syncMode = r.int32();
                        break;
                    case 6:
                        m.bBlocknr = r.uint64();
                        break;
                    case 7:
                        m.bSize = r.uint32();
                        break;
                    case 8:
                        m.bState = r.uint32();
                        break;
                    case 9:
                        m.ioDone = r.int32();
                        break;
                    case 10:
                        m.pagesWritten = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4DaWritePagesFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4DaWritePagesFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4DaWritePagesFtraceEvent} Ext4DaWritePagesFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4DaWritePagesFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4DaWritePagesFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4DaWritePagesFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4DaWritePagesFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.firstPage != null && m.hasOwnProperty("firstPage")) {
                    if (!$util.isInteger(m.firstPage) && !(m.firstPage && $util.isInteger(m.firstPage.low) && $util.isInteger(m.firstPage.high)))
                        return "firstPage: integer|Long expected";
                }
                if (m.nrToWrite != null && m.hasOwnProperty("nrToWrite")) {
                    if (!$util.isInteger(m.nrToWrite) && !(m.nrToWrite && $util.isInteger(m.nrToWrite.low) && $util.isInteger(m.nrToWrite.high)))
                        return "nrToWrite: integer|Long expected";
                }
                if (m.syncMode != null && m.hasOwnProperty("syncMode")) {
                    if (!$util.isInteger(m.syncMode))
                        return "syncMode: integer expected";
                }
                if (m.bBlocknr != null && m.hasOwnProperty("bBlocknr")) {
                    if (!$util.isInteger(m.bBlocknr) && !(m.bBlocknr && $util.isInteger(m.bBlocknr.low) && $util.isInteger(m.bBlocknr.high)))
                        return "bBlocknr: integer|Long expected";
                }
                if (m.bSize != null && m.hasOwnProperty("bSize")) {
                    if (!$util.isInteger(m.bSize))
                        return "bSize: integer expected";
                }
                if (m.bState != null && m.hasOwnProperty("bState")) {
                    if (!$util.isInteger(m.bState))
                        return "bState: integer expected";
                }
                if (m.ioDone != null && m.hasOwnProperty("ioDone")) {
                    if (!$util.isInteger(m.ioDone))
                        return "ioDone: integer expected";
                }
                if (m.pagesWritten != null && m.hasOwnProperty("pagesWritten")) {
                    if (!$util.isInteger(m.pagesWritten))
                        return "pagesWritten: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4DaWritePagesFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4DaWritePagesFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4DaWritePagesFtraceEvent} Ext4DaWritePagesFtraceEvent
             */
            Ext4DaWritePagesFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4DaWritePagesFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4DaWritePagesFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.firstPage != null) {
                    if ($util.Long)
                        (m.firstPage = $util.Long.fromValue(d.firstPage)).unsigned = true;
                    else if (typeof d.firstPage === "string")
                        m.firstPage = parseInt(d.firstPage, 10);
                    else if (typeof d.firstPage === "number")
                        m.firstPage = d.firstPage;
                    else if (typeof d.firstPage === "object")
                        m.firstPage = new $util.LongBits(d.firstPage.low >>> 0, d.firstPage.high >>> 0).toNumber(true);
                }
                if (d.nrToWrite != null) {
                    if ($util.Long)
                        (m.nrToWrite = $util.Long.fromValue(d.nrToWrite)).unsigned = false;
                    else if (typeof d.nrToWrite === "string")
                        m.nrToWrite = parseInt(d.nrToWrite, 10);
                    else if (typeof d.nrToWrite === "number")
                        m.nrToWrite = d.nrToWrite;
                    else if (typeof d.nrToWrite === "object")
                        m.nrToWrite = new $util.LongBits(d.nrToWrite.low >>> 0, d.nrToWrite.high >>> 0).toNumber();
                }
                if (d.syncMode != null) {
                    m.syncMode = d.syncMode | 0;
                }
                if (d.bBlocknr != null) {
                    if ($util.Long)
                        (m.bBlocknr = $util.Long.fromValue(d.bBlocknr)).unsigned = true;
                    else if (typeof d.bBlocknr === "string")
                        m.bBlocknr = parseInt(d.bBlocknr, 10);
                    else if (typeof d.bBlocknr === "number")
                        m.bBlocknr = d.bBlocknr;
                    else if (typeof d.bBlocknr === "object")
                        m.bBlocknr = new $util.LongBits(d.bBlocknr.low >>> 0, d.bBlocknr.high >>> 0).toNumber(true);
                }
                if (d.bSize != null) {
                    m.bSize = d.bSize >>> 0;
                }
                if (d.bState != null) {
                    m.bState = d.bState >>> 0;
                }
                if (d.ioDone != null) {
                    m.ioDone = d.ioDone | 0;
                }
                if (d.pagesWritten != null) {
                    m.pagesWritten = d.pagesWritten | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4DaWritePagesFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4DaWritePagesFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4DaWritePagesFtraceEvent} m Ext4DaWritePagesFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4DaWritePagesFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.firstPage = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.firstPage = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.nrToWrite = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.nrToWrite = o.longs === String ? "0" : 0;
                    d.syncMode = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.bBlocknr = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.bBlocknr = o.longs === String ? "0" : 0;
                    d.bSize = 0;
                    d.bState = 0;
                    d.ioDone = 0;
                    d.pagesWritten = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.firstPage != null && m.hasOwnProperty("firstPage")) {
                    if (typeof m.firstPage === "number")
                        d.firstPage = o.longs === String ? String(m.firstPage) : m.firstPage;
                    else
                        d.firstPage = o.longs === String ? $util.Long.prototype.toString.call(m.firstPage) : o.longs === Number ? new $util.LongBits(m.firstPage.low >>> 0, m.firstPage.high >>> 0).toNumber(true) : m.firstPage;
                }
                if (m.nrToWrite != null && m.hasOwnProperty("nrToWrite")) {
                    if (typeof m.nrToWrite === "number")
                        d.nrToWrite = o.longs === String ? String(m.nrToWrite) : m.nrToWrite;
                    else
                        d.nrToWrite = o.longs === String ? $util.Long.prototype.toString.call(m.nrToWrite) : o.longs === Number ? new $util.LongBits(m.nrToWrite.low >>> 0, m.nrToWrite.high >>> 0).toNumber() : m.nrToWrite;
                }
                if (m.syncMode != null && m.hasOwnProperty("syncMode")) {
                    d.syncMode = m.syncMode;
                }
                if (m.bBlocknr != null && m.hasOwnProperty("bBlocknr")) {
                    if (typeof m.bBlocknr === "number")
                        d.bBlocknr = o.longs === String ? String(m.bBlocknr) : m.bBlocknr;
                    else
                        d.bBlocknr = o.longs === String ? $util.Long.prototype.toString.call(m.bBlocknr) : o.longs === Number ? new $util.LongBits(m.bBlocknr.low >>> 0, m.bBlocknr.high >>> 0).toNumber(true) : m.bBlocknr;
                }
                if (m.bSize != null && m.hasOwnProperty("bSize")) {
                    d.bSize = m.bSize;
                }
                if (m.bState != null && m.hasOwnProperty("bState")) {
                    d.bState = m.bState;
                }
                if (m.ioDone != null && m.hasOwnProperty("ioDone")) {
                    d.ioDone = m.ioDone;
                }
                if (m.pagesWritten != null && m.hasOwnProperty("pagesWritten")) {
                    d.pagesWritten = m.pagesWritten;
                }
                return d;
            };

            /**
             * Converts this Ext4DaWritePagesFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4DaWritePagesFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4DaWritePagesFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4DaWritePagesFtraceEvent;
        })();

        protos.Ext4DaWritePagesExtentFtraceEvent = (function() {

            /**
             * Properties of an Ext4DaWritePagesExtentFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4DaWritePagesExtentFtraceEvent
             * @property {number|null} [dev] Ext4DaWritePagesExtentFtraceEvent dev
             * @property {number|null} [ino] Ext4DaWritePagesExtentFtraceEvent ino
             * @property {number|null} [lblk] Ext4DaWritePagesExtentFtraceEvent lblk
             * @property {number|null} [len] Ext4DaWritePagesExtentFtraceEvent len
             * @property {number|null} [flags] Ext4DaWritePagesExtentFtraceEvent flags
             */

            /**
             * Constructs a new Ext4DaWritePagesExtentFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4DaWritePagesExtentFtraceEvent.
             * @implements IExt4DaWritePagesExtentFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4DaWritePagesExtentFtraceEvent=} [p] Properties to set
             */
            function Ext4DaWritePagesExtentFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4DaWritePagesExtentFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4DaWritePagesExtentFtraceEvent
             * @instance
             */
            Ext4DaWritePagesExtentFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DaWritePagesExtentFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4DaWritePagesExtentFtraceEvent
             * @instance
             */
            Ext4DaWritePagesExtentFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DaWritePagesExtentFtraceEvent lblk.
             * @member {number} lblk
             * @memberof perfetto.protos.Ext4DaWritePagesExtentFtraceEvent
             * @instance
             */
            Ext4DaWritePagesExtentFtraceEvent.prototype.lblk = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DaWritePagesExtentFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4DaWritePagesExtentFtraceEvent
             * @instance
             */
            Ext4DaWritePagesExtentFtraceEvent.prototype.len = 0;

            /**
             * Ext4DaWritePagesExtentFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.Ext4DaWritePagesExtentFtraceEvent
             * @instance
             */
            Ext4DaWritePagesExtentFtraceEvent.prototype.flags = 0;

            /**
             * Creates a new Ext4DaWritePagesExtentFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4DaWritePagesExtentFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DaWritePagesExtentFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4DaWritePagesExtentFtraceEvent} Ext4DaWritePagesExtentFtraceEvent instance
             */
            Ext4DaWritePagesExtentFtraceEvent.create = function create(properties) {
                return new Ext4DaWritePagesExtentFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4DaWritePagesExtentFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4DaWritePagesExtentFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4DaWritePagesExtentFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DaWritePagesExtentFtraceEvent} m Ext4DaWritePagesExtentFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4DaWritePagesExtentFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.lblk != null && Object.hasOwnProperty.call(m, "lblk"))
                    w.uint32(24).uint64(m.lblk);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).uint32(m.len);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(40).uint32(m.flags);
                return w;
            };

            /**
             * Encodes the specified Ext4DaWritePagesExtentFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4DaWritePagesExtentFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4DaWritePagesExtentFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DaWritePagesExtentFtraceEvent} message Ext4DaWritePagesExtentFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4DaWritePagesExtentFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4DaWritePagesExtentFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4DaWritePagesExtentFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4DaWritePagesExtentFtraceEvent} Ext4DaWritePagesExtentFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4DaWritePagesExtentFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4DaWritePagesExtentFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.lblk = r.uint64();
                        break;
                    case 4:
                        m.len = r.uint32();
                        break;
                    case 5:
                        m.flags = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4DaWritePagesExtentFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4DaWritePagesExtentFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4DaWritePagesExtentFtraceEvent} Ext4DaWritePagesExtentFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4DaWritePagesExtentFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4DaWritePagesExtentFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4DaWritePagesExtentFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4DaWritePagesExtentFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    if (!$util.isInteger(m.lblk) && !(m.lblk && $util.isInteger(m.lblk.low) && $util.isInteger(m.lblk.high)))
                        return "lblk: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4DaWritePagesExtentFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4DaWritePagesExtentFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4DaWritePagesExtentFtraceEvent} Ext4DaWritePagesExtentFtraceEvent
             */
            Ext4DaWritePagesExtentFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4DaWritePagesExtentFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4DaWritePagesExtentFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.lblk != null) {
                    if ($util.Long)
                        (m.lblk = $util.Long.fromValue(d.lblk)).unsigned = true;
                    else if (typeof d.lblk === "string")
                        m.lblk = parseInt(d.lblk, 10);
                    else if (typeof d.lblk === "number")
                        m.lblk = d.lblk;
                    else if (typeof d.lblk === "object")
                        m.lblk = new $util.LongBits(d.lblk.low >>> 0, d.lblk.high >>> 0).toNumber(true);
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4DaWritePagesExtentFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4DaWritePagesExtentFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4DaWritePagesExtentFtraceEvent} m Ext4DaWritePagesExtentFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4DaWritePagesExtentFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.lblk = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.lblk = o.longs === String ? "0" : 0;
                    d.len = 0;
                    d.flags = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    if (typeof m.lblk === "number")
                        d.lblk = o.longs === String ? String(m.lblk) : m.lblk;
                    else
                        d.lblk = o.longs === String ? $util.Long.prototype.toString.call(m.lblk) : o.longs === Number ? new $util.LongBits(m.lblk.low >>> 0, m.lblk.high >>> 0).toNumber(true) : m.lblk;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                return d;
            };

            /**
             * Converts this Ext4DaWritePagesExtentFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4DaWritePagesExtentFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4DaWritePagesExtentFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4DaWritePagesExtentFtraceEvent;
        })();

        protos.Ext4DirectIOEnterFtraceEvent = (function() {

            /**
             * Properties of an Ext4DirectIOEnterFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4DirectIOEnterFtraceEvent
             * @property {number|null} [dev] Ext4DirectIOEnterFtraceEvent dev
             * @property {number|null} [ino] Ext4DirectIOEnterFtraceEvent ino
             * @property {number|null} [pos] Ext4DirectIOEnterFtraceEvent pos
             * @property {number|null} [len] Ext4DirectIOEnterFtraceEvent len
             * @property {number|null} [rw] Ext4DirectIOEnterFtraceEvent rw
             */

            /**
             * Constructs a new Ext4DirectIOEnterFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4DirectIOEnterFtraceEvent.
             * @implements IExt4DirectIOEnterFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4DirectIOEnterFtraceEvent=} [p] Properties to set
             */
            function Ext4DirectIOEnterFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4DirectIOEnterFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4DirectIOEnterFtraceEvent
             * @instance
             */
            Ext4DirectIOEnterFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DirectIOEnterFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4DirectIOEnterFtraceEvent
             * @instance
             */
            Ext4DirectIOEnterFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DirectIOEnterFtraceEvent pos.
             * @member {number} pos
             * @memberof perfetto.protos.Ext4DirectIOEnterFtraceEvent
             * @instance
             */
            Ext4DirectIOEnterFtraceEvent.prototype.pos = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4DirectIOEnterFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4DirectIOEnterFtraceEvent
             * @instance
             */
            Ext4DirectIOEnterFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DirectIOEnterFtraceEvent rw.
             * @member {number} rw
             * @memberof perfetto.protos.Ext4DirectIOEnterFtraceEvent
             * @instance
             */
            Ext4DirectIOEnterFtraceEvent.prototype.rw = 0;

            /**
             * Creates a new Ext4DirectIOEnterFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4DirectIOEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DirectIOEnterFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4DirectIOEnterFtraceEvent} Ext4DirectIOEnterFtraceEvent instance
             */
            Ext4DirectIOEnterFtraceEvent.create = function create(properties) {
                return new Ext4DirectIOEnterFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4DirectIOEnterFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4DirectIOEnterFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4DirectIOEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DirectIOEnterFtraceEvent} m Ext4DirectIOEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4DirectIOEnterFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.pos != null && Object.hasOwnProperty.call(m, "pos"))
                    w.uint32(24).int64(m.pos);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).uint64(m.len);
                if (m.rw != null && Object.hasOwnProperty.call(m, "rw"))
                    w.uint32(40).int32(m.rw);
                return w;
            };

            /**
             * Encodes the specified Ext4DirectIOEnterFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4DirectIOEnterFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4DirectIOEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DirectIOEnterFtraceEvent} message Ext4DirectIOEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4DirectIOEnterFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4DirectIOEnterFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4DirectIOEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4DirectIOEnterFtraceEvent} Ext4DirectIOEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4DirectIOEnterFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4DirectIOEnterFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.pos = r.int64();
                        break;
                    case 4:
                        m.len = r.uint64();
                        break;
                    case 5:
                        m.rw = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4DirectIOEnterFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4DirectIOEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4DirectIOEnterFtraceEvent} Ext4DirectIOEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4DirectIOEnterFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4DirectIOEnterFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4DirectIOEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4DirectIOEnterFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.pos != null && m.hasOwnProperty("pos")) {
                    if (!$util.isInteger(m.pos) && !(m.pos && $util.isInteger(m.pos.low) && $util.isInteger(m.pos.high)))
                        return "pos: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                if (m.rw != null && m.hasOwnProperty("rw")) {
                    if (!$util.isInteger(m.rw))
                        return "rw: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4DirectIOEnterFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4DirectIOEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4DirectIOEnterFtraceEvent} Ext4DirectIOEnterFtraceEvent
             */
            Ext4DirectIOEnterFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4DirectIOEnterFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4DirectIOEnterFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.pos != null) {
                    if ($util.Long)
                        (m.pos = $util.Long.fromValue(d.pos)).unsigned = false;
                    else if (typeof d.pos === "string")
                        m.pos = parseInt(d.pos, 10);
                    else if (typeof d.pos === "number")
                        m.pos = d.pos;
                    else if (typeof d.pos === "object")
                        m.pos = new $util.LongBits(d.pos.low >>> 0, d.pos.high >>> 0).toNumber();
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = true;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber(true);
                }
                if (d.rw != null) {
                    m.rw = d.rw | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4DirectIOEnterFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4DirectIOEnterFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4DirectIOEnterFtraceEvent} m Ext4DirectIOEnterFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4DirectIOEnterFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.pos = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pos = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                    d.rw = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.pos != null && m.hasOwnProperty("pos")) {
                    if (typeof m.pos === "number")
                        d.pos = o.longs === String ? String(m.pos) : m.pos;
                    else
                        d.pos = o.longs === String ? $util.Long.prototype.toString.call(m.pos) : o.longs === Number ? new $util.LongBits(m.pos.low >>> 0, m.pos.high >>> 0).toNumber() : m.pos;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber(true) : m.len;
                }
                if (m.rw != null && m.hasOwnProperty("rw")) {
                    d.rw = m.rw;
                }
                return d;
            };

            /**
             * Converts this Ext4DirectIOEnterFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4DirectIOEnterFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4DirectIOEnterFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4DirectIOEnterFtraceEvent;
        })();

        protos.Ext4DirectIOExitFtraceEvent = (function() {

            /**
             * Properties of an Ext4DirectIOExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4DirectIOExitFtraceEvent
             * @property {number|null} [dev] Ext4DirectIOExitFtraceEvent dev
             * @property {number|null} [ino] Ext4DirectIOExitFtraceEvent ino
             * @property {number|null} [pos] Ext4DirectIOExitFtraceEvent pos
             * @property {number|null} [len] Ext4DirectIOExitFtraceEvent len
             * @property {number|null} [rw] Ext4DirectIOExitFtraceEvent rw
             * @property {number|null} [ret] Ext4DirectIOExitFtraceEvent ret
             */

            /**
             * Constructs a new Ext4DirectIOExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4DirectIOExitFtraceEvent.
             * @implements IExt4DirectIOExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4DirectIOExitFtraceEvent=} [p] Properties to set
             */
            function Ext4DirectIOExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4DirectIOExitFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4DirectIOExitFtraceEvent
             * @instance
             */
            Ext4DirectIOExitFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DirectIOExitFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4DirectIOExitFtraceEvent
             * @instance
             */
            Ext4DirectIOExitFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DirectIOExitFtraceEvent pos.
             * @member {number} pos
             * @memberof perfetto.protos.Ext4DirectIOExitFtraceEvent
             * @instance
             */
            Ext4DirectIOExitFtraceEvent.prototype.pos = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4DirectIOExitFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4DirectIOExitFtraceEvent
             * @instance
             */
            Ext4DirectIOExitFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DirectIOExitFtraceEvent rw.
             * @member {number} rw
             * @memberof perfetto.protos.Ext4DirectIOExitFtraceEvent
             * @instance
             */
            Ext4DirectIOExitFtraceEvent.prototype.rw = 0;

            /**
             * Ext4DirectIOExitFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.Ext4DirectIOExitFtraceEvent
             * @instance
             */
            Ext4DirectIOExitFtraceEvent.prototype.ret = 0;

            /**
             * Creates a new Ext4DirectIOExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4DirectIOExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DirectIOExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4DirectIOExitFtraceEvent} Ext4DirectIOExitFtraceEvent instance
             */
            Ext4DirectIOExitFtraceEvent.create = function create(properties) {
                return new Ext4DirectIOExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4DirectIOExitFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4DirectIOExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4DirectIOExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DirectIOExitFtraceEvent} m Ext4DirectIOExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4DirectIOExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.pos != null && Object.hasOwnProperty.call(m, "pos"))
                    w.uint32(24).int64(m.pos);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).uint64(m.len);
                if (m.rw != null && Object.hasOwnProperty.call(m, "rw"))
                    w.uint32(40).int32(m.rw);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(48).int32(m.ret);
                return w;
            };

            /**
             * Encodes the specified Ext4DirectIOExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4DirectIOExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4DirectIOExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DirectIOExitFtraceEvent} message Ext4DirectIOExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4DirectIOExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4DirectIOExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4DirectIOExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4DirectIOExitFtraceEvent} Ext4DirectIOExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4DirectIOExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4DirectIOExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.pos = r.int64();
                        break;
                    case 4:
                        m.len = r.uint64();
                        break;
                    case 5:
                        m.rw = r.int32();
                        break;
                    case 6:
                        m.ret = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4DirectIOExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4DirectIOExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4DirectIOExitFtraceEvent} Ext4DirectIOExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4DirectIOExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4DirectIOExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4DirectIOExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4DirectIOExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.pos != null && m.hasOwnProperty("pos")) {
                    if (!$util.isInteger(m.pos) && !(m.pos && $util.isInteger(m.pos.low) && $util.isInteger(m.pos.high)))
                        return "pos: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                if (m.rw != null && m.hasOwnProperty("rw")) {
                    if (!$util.isInteger(m.rw))
                        return "rw: integer expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4DirectIOExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4DirectIOExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4DirectIOExitFtraceEvent} Ext4DirectIOExitFtraceEvent
             */
            Ext4DirectIOExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4DirectIOExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4DirectIOExitFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.pos != null) {
                    if ($util.Long)
                        (m.pos = $util.Long.fromValue(d.pos)).unsigned = false;
                    else if (typeof d.pos === "string")
                        m.pos = parseInt(d.pos, 10);
                    else if (typeof d.pos === "number")
                        m.pos = d.pos;
                    else if (typeof d.pos === "object")
                        m.pos = new $util.LongBits(d.pos.low >>> 0, d.pos.high >>> 0).toNumber();
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = true;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber(true);
                }
                if (d.rw != null) {
                    m.rw = d.rw | 0;
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4DirectIOExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4DirectIOExitFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4DirectIOExitFtraceEvent} m Ext4DirectIOExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4DirectIOExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.pos = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pos = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                    d.rw = 0;
                    d.ret = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.pos != null && m.hasOwnProperty("pos")) {
                    if (typeof m.pos === "number")
                        d.pos = o.longs === String ? String(m.pos) : m.pos;
                    else
                        d.pos = o.longs === String ? $util.Long.prototype.toString.call(m.pos) : o.longs === Number ? new $util.LongBits(m.pos.low >>> 0, m.pos.high >>> 0).toNumber() : m.pos;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber(true) : m.len;
                }
                if (m.rw != null && m.hasOwnProperty("rw")) {
                    d.rw = m.rw;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                return d;
            };

            /**
             * Converts this Ext4DirectIOExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4DirectIOExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4DirectIOExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4DirectIOExitFtraceEvent;
        })();

        protos.Ext4DiscardBlocksFtraceEvent = (function() {

            /**
             * Properties of an Ext4DiscardBlocksFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4DiscardBlocksFtraceEvent
             * @property {number|null} [dev] Ext4DiscardBlocksFtraceEvent dev
             * @property {number|null} [blk] Ext4DiscardBlocksFtraceEvent blk
             * @property {number|null} [count] Ext4DiscardBlocksFtraceEvent count
             */

            /**
             * Constructs a new Ext4DiscardBlocksFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4DiscardBlocksFtraceEvent.
             * @implements IExt4DiscardBlocksFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4DiscardBlocksFtraceEvent=} [p] Properties to set
             */
            function Ext4DiscardBlocksFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4DiscardBlocksFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4DiscardBlocksFtraceEvent
             * @instance
             */
            Ext4DiscardBlocksFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DiscardBlocksFtraceEvent blk.
             * @member {number} blk
             * @memberof perfetto.protos.Ext4DiscardBlocksFtraceEvent
             * @instance
             */
            Ext4DiscardBlocksFtraceEvent.prototype.blk = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DiscardBlocksFtraceEvent count.
             * @member {number} count
             * @memberof perfetto.protos.Ext4DiscardBlocksFtraceEvent
             * @instance
             */
            Ext4DiscardBlocksFtraceEvent.prototype.count = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new Ext4DiscardBlocksFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4DiscardBlocksFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DiscardBlocksFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4DiscardBlocksFtraceEvent} Ext4DiscardBlocksFtraceEvent instance
             */
            Ext4DiscardBlocksFtraceEvent.create = function create(properties) {
                return new Ext4DiscardBlocksFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4DiscardBlocksFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4DiscardBlocksFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4DiscardBlocksFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DiscardBlocksFtraceEvent} m Ext4DiscardBlocksFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4DiscardBlocksFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.blk != null && Object.hasOwnProperty.call(m, "blk"))
                    w.uint32(16).uint64(m.blk);
                if (m.count != null && Object.hasOwnProperty.call(m, "count"))
                    w.uint32(24).uint64(m.count);
                return w;
            };

            /**
             * Encodes the specified Ext4DiscardBlocksFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4DiscardBlocksFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4DiscardBlocksFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DiscardBlocksFtraceEvent} message Ext4DiscardBlocksFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4DiscardBlocksFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4DiscardBlocksFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4DiscardBlocksFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4DiscardBlocksFtraceEvent} Ext4DiscardBlocksFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4DiscardBlocksFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4DiscardBlocksFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.blk = r.uint64();
                        break;
                    case 3:
                        m.count = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4DiscardBlocksFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4DiscardBlocksFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4DiscardBlocksFtraceEvent} Ext4DiscardBlocksFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4DiscardBlocksFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4DiscardBlocksFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4DiscardBlocksFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4DiscardBlocksFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.blk != null && m.hasOwnProperty("blk")) {
                    if (!$util.isInteger(m.blk) && !(m.blk && $util.isInteger(m.blk.low) && $util.isInteger(m.blk.high)))
                        return "blk: integer|Long expected";
                }
                if (m.count != null && m.hasOwnProperty("count")) {
                    if (!$util.isInteger(m.count) && !(m.count && $util.isInteger(m.count.low) && $util.isInteger(m.count.high)))
                        return "count: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an Ext4DiscardBlocksFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4DiscardBlocksFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4DiscardBlocksFtraceEvent} Ext4DiscardBlocksFtraceEvent
             */
            Ext4DiscardBlocksFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4DiscardBlocksFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4DiscardBlocksFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.blk != null) {
                    if ($util.Long)
                        (m.blk = $util.Long.fromValue(d.blk)).unsigned = true;
                    else if (typeof d.blk === "string")
                        m.blk = parseInt(d.blk, 10);
                    else if (typeof d.blk === "number")
                        m.blk = d.blk;
                    else if (typeof d.blk === "object")
                        m.blk = new $util.LongBits(d.blk.low >>> 0, d.blk.high >>> 0).toNumber(true);
                }
                if (d.count != null) {
                    if ($util.Long)
                        (m.count = $util.Long.fromValue(d.count)).unsigned = true;
                    else if (typeof d.count === "string")
                        m.count = parseInt(d.count, 10);
                    else if (typeof d.count === "number")
                        m.count = d.count;
                    else if (typeof d.count === "object")
                        m.count = new $util.LongBits(d.count.low >>> 0, d.count.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4DiscardBlocksFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4DiscardBlocksFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4DiscardBlocksFtraceEvent} m Ext4DiscardBlocksFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4DiscardBlocksFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.blk = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.blk = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.count = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.count = o.longs === String ? "0" : 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.blk != null && m.hasOwnProperty("blk")) {
                    if (typeof m.blk === "number")
                        d.blk = o.longs === String ? String(m.blk) : m.blk;
                    else
                        d.blk = o.longs === String ? $util.Long.prototype.toString.call(m.blk) : o.longs === Number ? new $util.LongBits(m.blk.low >>> 0, m.blk.high >>> 0).toNumber(true) : m.blk;
                }
                if (m.count != null && m.hasOwnProperty("count")) {
                    if (typeof m.count === "number")
                        d.count = o.longs === String ? String(m.count) : m.count;
                    else
                        d.count = o.longs === String ? $util.Long.prototype.toString.call(m.count) : o.longs === Number ? new $util.LongBits(m.count.low >>> 0, m.count.high >>> 0).toNumber(true) : m.count;
                }
                return d;
            };

            /**
             * Converts this Ext4DiscardBlocksFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4DiscardBlocksFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4DiscardBlocksFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4DiscardBlocksFtraceEvent;
        })();

        protos.Ext4DiscardPreallocationsFtraceEvent = (function() {

            /**
             * Properties of an Ext4DiscardPreallocationsFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4DiscardPreallocationsFtraceEvent
             * @property {number|null} [dev] Ext4DiscardPreallocationsFtraceEvent dev
             * @property {number|null} [ino] Ext4DiscardPreallocationsFtraceEvent ino
             * @property {number|null} [len] Ext4DiscardPreallocationsFtraceEvent len
             * @property {number|null} [needed] Ext4DiscardPreallocationsFtraceEvent needed
             */

            /**
             * Constructs a new Ext4DiscardPreallocationsFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4DiscardPreallocationsFtraceEvent.
             * @implements IExt4DiscardPreallocationsFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4DiscardPreallocationsFtraceEvent=} [p] Properties to set
             */
            function Ext4DiscardPreallocationsFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4DiscardPreallocationsFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4DiscardPreallocationsFtraceEvent
             * @instance
             */
            Ext4DiscardPreallocationsFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DiscardPreallocationsFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4DiscardPreallocationsFtraceEvent
             * @instance
             */
            Ext4DiscardPreallocationsFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DiscardPreallocationsFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4DiscardPreallocationsFtraceEvent
             * @instance
             */
            Ext4DiscardPreallocationsFtraceEvent.prototype.len = 0;

            /**
             * Ext4DiscardPreallocationsFtraceEvent needed.
             * @member {number} needed
             * @memberof perfetto.protos.Ext4DiscardPreallocationsFtraceEvent
             * @instance
             */
            Ext4DiscardPreallocationsFtraceEvent.prototype.needed = 0;

            /**
             * Creates a new Ext4DiscardPreallocationsFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4DiscardPreallocationsFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DiscardPreallocationsFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4DiscardPreallocationsFtraceEvent} Ext4DiscardPreallocationsFtraceEvent instance
             */
            Ext4DiscardPreallocationsFtraceEvent.create = function create(properties) {
                return new Ext4DiscardPreallocationsFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4DiscardPreallocationsFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4DiscardPreallocationsFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4DiscardPreallocationsFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DiscardPreallocationsFtraceEvent} m Ext4DiscardPreallocationsFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4DiscardPreallocationsFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(24).uint32(m.len);
                if (m.needed != null && Object.hasOwnProperty.call(m, "needed"))
                    w.uint32(32).uint32(m.needed);
                return w;
            };

            /**
             * Encodes the specified Ext4DiscardPreallocationsFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4DiscardPreallocationsFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4DiscardPreallocationsFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DiscardPreallocationsFtraceEvent} message Ext4DiscardPreallocationsFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4DiscardPreallocationsFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4DiscardPreallocationsFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4DiscardPreallocationsFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4DiscardPreallocationsFtraceEvent} Ext4DiscardPreallocationsFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4DiscardPreallocationsFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4DiscardPreallocationsFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.len = r.uint32();
                        break;
                    case 4:
                        m.needed = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4DiscardPreallocationsFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4DiscardPreallocationsFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4DiscardPreallocationsFtraceEvent} Ext4DiscardPreallocationsFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4DiscardPreallocationsFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4DiscardPreallocationsFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4DiscardPreallocationsFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4DiscardPreallocationsFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.needed != null && m.hasOwnProperty("needed")) {
                    if (!$util.isInteger(m.needed))
                        return "needed: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4DiscardPreallocationsFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4DiscardPreallocationsFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4DiscardPreallocationsFtraceEvent} Ext4DiscardPreallocationsFtraceEvent
             */
            Ext4DiscardPreallocationsFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4DiscardPreallocationsFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4DiscardPreallocationsFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.needed != null) {
                    m.needed = d.needed >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4DiscardPreallocationsFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4DiscardPreallocationsFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4DiscardPreallocationsFtraceEvent} m Ext4DiscardPreallocationsFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4DiscardPreallocationsFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.len = 0;
                    d.needed = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.needed != null && m.hasOwnProperty("needed")) {
                    d.needed = m.needed;
                }
                return d;
            };

            /**
             * Converts this Ext4DiscardPreallocationsFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4DiscardPreallocationsFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4DiscardPreallocationsFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4DiscardPreallocationsFtraceEvent;
        })();

        protos.Ext4DropInodeFtraceEvent = (function() {

            /**
             * Properties of an Ext4DropInodeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4DropInodeFtraceEvent
             * @property {number|null} [dev] Ext4DropInodeFtraceEvent dev
             * @property {number|null} [ino] Ext4DropInodeFtraceEvent ino
             * @property {number|null} [drop] Ext4DropInodeFtraceEvent drop
             */

            /**
             * Constructs a new Ext4DropInodeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4DropInodeFtraceEvent.
             * @implements IExt4DropInodeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4DropInodeFtraceEvent=} [p] Properties to set
             */
            function Ext4DropInodeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4DropInodeFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4DropInodeFtraceEvent
             * @instance
             */
            Ext4DropInodeFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DropInodeFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4DropInodeFtraceEvent
             * @instance
             */
            Ext4DropInodeFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4DropInodeFtraceEvent drop.
             * @member {number} drop
             * @memberof perfetto.protos.Ext4DropInodeFtraceEvent
             * @instance
             */
            Ext4DropInodeFtraceEvent.prototype.drop = 0;

            /**
             * Creates a new Ext4DropInodeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4DropInodeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DropInodeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4DropInodeFtraceEvent} Ext4DropInodeFtraceEvent instance
             */
            Ext4DropInodeFtraceEvent.create = function create(properties) {
                return new Ext4DropInodeFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4DropInodeFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4DropInodeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4DropInodeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DropInodeFtraceEvent} m Ext4DropInodeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4DropInodeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.drop != null && Object.hasOwnProperty.call(m, "drop"))
                    w.uint32(24).int32(m.drop);
                return w;
            };

            /**
             * Encodes the specified Ext4DropInodeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4DropInodeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4DropInodeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4DropInodeFtraceEvent} message Ext4DropInodeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4DropInodeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4DropInodeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4DropInodeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4DropInodeFtraceEvent} Ext4DropInodeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4DropInodeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4DropInodeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.drop = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4DropInodeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4DropInodeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4DropInodeFtraceEvent} Ext4DropInodeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4DropInodeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4DropInodeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4DropInodeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4DropInodeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.drop != null && m.hasOwnProperty("drop")) {
                    if (!$util.isInteger(m.drop))
                        return "drop: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4DropInodeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4DropInodeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4DropInodeFtraceEvent} Ext4DropInodeFtraceEvent
             */
            Ext4DropInodeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4DropInodeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4DropInodeFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.drop != null) {
                    m.drop = d.drop | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4DropInodeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4DropInodeFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4DropInodeFtraceEvent} m Ext4DropInodeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4DropInodeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.drop = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.drop != null && m.hasOwnProperty("drop")) {
                    d.drop = m.drop;
                }
                return d;
            };

            /**
             * Converts this Ext4DropInodeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4DropInodeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4DropInodeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4DropInodeFtraceEvent;
        })();

        protos.Ext4EsCacheExtentFtraceEvent = (function() {

            /**
             * Properties of an Ext4EsCacheExtentFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4EsCacheExtentFtraceEvent
             * @property {number|null} [dev] Ext4EsCacheExtentFtraceEvent dev
             * @property {number|null} [ino] Ext4EsCacheExtentFtraceEvent ino
             * @property {number|null} [lblk] Ext4EsCacheExtentFtraceEvent lblk
             * @property {number|null} [len] Ext4EsCacheExtentFtraceEvent len
             * @property {number|null} [pblk] Ext4EsCacheExtentFtraceEvent pblk
             * @property {number|null} [status] Ext4EsCacheExtentFtraceEvent status
             */

            /**
             * Constructs a new Ext4EsCacheExtentFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4EsCacheExtentFtraceEvent.
             * @implements IExt4EsCacheExtentFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4EsCacheExtentFtraceEvent=} [p] Properties to set
             */
            function Ext4EsCacheExtentFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4EsCacheExtentFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4EsCacheExtentFtraceEvent
             * @instance
             */
            Ext4EsCacheExtentFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EsCacheExtentFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4EsCacheExtentFtraceEvent
             * @instance
             */
            Ext4EsCacheExtentFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EsCacheExtentFtraceEvent lblk.
             * @member {number} lblk
             * @memberof perfetto.protos.Ext4EsCacheExtentFtraceEvent
             * @instance
             */
            Ext4EsCacheExtentFtraceEvent.prototype.lblk = 0;

            /**
             * Ext4EsCacheExtentFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4EsCacheExtentFtraceEvent
             * @instance
             */
            Ext4EsCacheExtentFtraceEvent.prototype.len = 0;

            /**
             * Ext4EsCacheExtentFtraceEvent pblk.
             * @member {number} pblk
             * @memberof perfetto.protos.Ext4EsCacheExtentFtraceEvent
             * @instance
             */
            Ext4EsCacheExtentFtraceEvent.prototype.pblk = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EsCacheExtentFtraceEvent status.
             * @member {number} status
             * @memberof perfetto.protos.Ext4EsCacheExtentFtraceEvent
             * @instance
             */
            Ext4EsCacheExtentFtraceEvent.prototype.status = 0;

            /**
             * Creates a new Ext4EsCacheExtentFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4EsCacheExtentFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsCacheExtentFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4EsCacheExtentFtraceEvent} Ext4EsCacheExtentFtraceEvent instance
             */
            Ext4EsCacheExtentFtraceEvent.create = function create(properties) {
                return new Ext4EsCacheExtentFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4EsCacheExtentFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4EsCacheExtentFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4EsCacheExtentFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsCacheExtentFtraceEvent} m Ext4EsCacheExtentFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4EsCacheExtentFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.lblk != null && Object.hasOwnProperty.call(m, "lblk"))
                    w.uint32(24).uint32(m.lblk);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).uint32(m.len);
                if (m.pblk != null && Object.hasOwnProperty.call(m, "pblk"))
                    w.uint32(40).uint64(m.pblk);
                if (m.status != null && Object.hasOwnProperty.call(m, "status"))
                    w.uint32(48).uint32(m.status);
                return w;
            };

            /**
             * Encodes the specified Ext4EsCacheExtentFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4EsCacheExtentFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4EsCacheExtentFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsCacheExtentFtraceEvent} message Ext4EsCacheExtentFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4EsCacheExtentFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4EsCacheExtentFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4EsCacheExtentFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4EsCacheExtentFtraceEvent} Ext4EsCacheExtentFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4EsCacheExtentFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4EsCacheExtentFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.lblk = r.uint32();
                        break;
                    case 4:
                        m.len = r.uint32();
                        break;
                    case 5:
                        m.pblk = r.uint64();
                        break;
                    case 6:
                        m.status = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4EsCacheExtentFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4EsCacheExtentFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4EsCacheExtentFtraceEvent} Ext4EsCacheExtentFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4EsCacheExtentFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4EsCacheExtentFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4EsCacheExtentFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4EsCacheExtentFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    if (!$util.isInteger(m.lblk))
                        return "lblk: integer expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.pblk != null && m.hasOwnProperty("pblk")) {
                    if (!$util.isInteger(m.pblk) && !(m.pblk && $util.isInteger(m.pblk.low) && $util.isInteger(m.pblk.high)))
                        return "pblk: integer|Long expected";
                }
                if (m.status != null && m.hasOwnProperty("status")) {
                    if (!$util.isInteger(m.status))
                        return "status: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4EsCacheExtentFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4EsCacheExtentFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4EsCacheExtentFtraceEvent} Ext4EsCacheExtentFtraceEvent
             */
            Ext4EsCacheExtentFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4EsCacheExtentFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4EsCacheExtentFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.lblk != null) {
                    m.lblk = d.lblk >>> 0;
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.pblk != null) {
                    if ($util.Long)
                        (m.pblk = $util.Long.fromValue(d.pblk)).unsigned = true;
                    else if (typeof d.pblk === "string")
                        m.pblk = parseInt(d.pblk, 10);
                    else if (typeof d.pblk === "number")
                        m.pblk = d.pblk;
                    else if (typeof d.pblk === "object")
                        m.pblk = new $util.LongBits(d.pblk.low >>> 0, d.pblk.high >>> 0).toNumber(true);
                }
                if (d.status != null) {
                    m.status = d.status >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4EsCacheExtentFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4EsCacheExtentFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4EsCacheExtentFtraceEvent} m Ext4EsCacheExtentFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4EsCacheExtentFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.lblk = 0;
                    d.len = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pblk = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pblk = o.longs === String ? "0" : 0;
                    d.status = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    d.lblk = m.lblk;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.pblk != null && m.hasOwnProperty("pblk")) {
                    if (typeof m.pblk === "number")
                        d.pblk = o.longs === String ? String(m.pblk) : m.pblk;
                    else
                        d.pblk = o.longs === String ? $util.Long.prototype.toString.call(m.pblk) : o.longs === Number ? new $util.LongBits(m.pblk.low >>> 0, m.pblk.high >>> 0).toNumber(true) : m.pblk;
                }
                if (m.status != null && m.hasOwnProperty("status")) {
                    d.status = m.status;
                }
                return d;
            };

            /**
             * Converts this Ext4EsCacheExtentFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4EsCacheExtentFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4EsCacheExtentFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4EsCacheExtentFtraceEvent;
        })();

        protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent = (function() {

            /**
             * Properties of an Ext4EsFindDelayedExtentRangeEnterFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4EsFindDelayedExtentRangeEnterFtraceEvent
             * @property {number|null} [dev] Ext4EsFindDelayedExtentRangeEnterFtraceEvent dev
             * @property {number|null} [ino] Ext4EsFindDelayedExtentRangeEnterFtraceEvent ino
             * @property {number|null} [lblk] Ext4EsFindDelayedExtentRangeEnterFtraceEvent lblk
             */

            /**
             * Constructs a new Ext4EsFindDelayedExtentRangeEnterFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4EsFindDelayedExtentRangeEnterFtraceEvent.
             * @implements IExt4EsFindDelayedExtentRangeEnterFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4EsFindDelayedExtentRangeEnterFtraceEvent=} [p] Properties to set
             */
            function Ext4EsFindDelayedExtentRangeEnterFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4EsFindDelayedExtentRangeEnterFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent
             * @instance
             */
            Ext4EsFindDelayedExtentRangeEnterFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EsFindDelayedExtentRangeEnterFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent
             * @instance
             */
            Ext4EsFindDelayedExtentRangeEnterFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EsFindDelayedExtentRangeEnterFtraceEvent lblk.
             * @member {number} lblk
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent
             * @instance
             */
            Ext4EsFindDelayedExtentRangeEnterFtraceEvent.prototype.lblk = 0;

            /**
             * Creates a new Ext4EsFindDelayedExtentRangeEnterFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsFindDelayedExtentRangeEnterFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent} Ext4EsFindDelayedExtentRangeEnterFtraceEvent instance
             */
            Ext4EsFindDelayedExtentRangeEnterFtraceEvent.create = function create(properties) {
                return new Ext4EsFindDelayedExtentRangeEnterFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4EsFindDelayedExtentRangeEnterFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsFindDelayedExtentRangeEnterFtraceEvent} m Ext4EsFindDelayedExtentRangeEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4EsFindDelayedExtentRangeEnterFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.lblk != null && Object.hasOwnProperty.call(m, "lblk"))
                    w.uint32(24).uint32(m.lblk);
                return w;
            };

            /**
             * Encodes the specified Ext4EsFindDelayedExtentRangeEnterFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsFindDelayedExtentRangeEnterFtraceEvent} message Ext4EsFindDelayedExtentRangeEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4EsFindDelayedExtentRangeEnterFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4EsFindDelayedExtentRangeEnterFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent} Ext4EsFindDelayedExtentRangeEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4EsFindDelayedExtentRangeEnterFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.lblk = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4EsFindDelayedExtentRangeEnterFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent} Ext4EsFindDelayedExtentRangeEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4EsFindDelayedExtentRangeEnterFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4EsFindDelayedExtentRangeEnterFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4EsFindDelayedExtentRangeEnterFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    if (!$util.isInteger(m.lblk))
                        return "lblk: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4EsFindDelayedExtentRangeEnterFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent} Ext4EsFindDelayedExtentRangeEnterFtraceEvent
             */
            Ext4EsFindDelayedExtentRangeEnterFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.lblk != null) {
                    m.lblk = d.lblk >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4EsFindDelayedExtentRangeEnterFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent} m Ext4EsFindDelayedExtentRangeEnterFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4EsFindDelayedExtentRangeEnterFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.lblk = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    d.lblk = m.lblk;
                }
                return d;
            };

            /**
             * Converts this Ext4EsFindDelayedExtentRangeEnterFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeEnterFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4EsFindDelayedExtentRangeEnterFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4EsFindDelayedExtentRangeEnterFtraceEvent;
        })();

        protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent = (function() {

            /**
             * Properties of an Ext4EsFindDelayedExtentRangeExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4EsFindDelayedExtentRangeExitFtraceEvent
             * @property {number|null} [dev] Ext4EsFindDelayedExtentRangeExitFtraceEvent dev
             * @property {number|null} [ino] Ext4EsFindDelayedExtentRangeExitFtraceEvent ino
             * @property {number|null} [lblk] Ext4EsFindDelayedExtentRangeExitFtraceEvent lblk
             * @property {number|null} [len] Ext4EsFindDelayedExtentRangeExitFtraceEvent len
             * @property {number|null} [pblk] Ext4EsFindDelayedExtentRangeExitFtraceEvent pblk
             * @property {number|null} [status] Ext4EsFindDelayedExtentRangeExitFtraceEvent status
             */

            /**
             * Constructs a new Ext4EsFindDelayedExtentRangeExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4EsFindDelayedExtentRangeExitFtraceEvent.
             * @implements IExt4EsFindDelayedExtentRangeExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4EsFindDelayedExtentRangeExitFtraceEvent=} [p] Properties to set
             */
            function Ext4EsFindDelayedExtentRangeExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4EsFindDelayedExtentRangeExitFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent
             * @instance
             */
            Ext4EsFindDelayedExtentRangeExitFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EsFindDelayedExtentRangeExitFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent
             * @instance
             */
            Ext4EsFindDelayedExtentRangeExitFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EsFindDelayedExtentRangeExitFtraceEvent lblk.
             * @member {number} lblk
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent
             * @instance
             */
            Ext4EsFindDelayedExtentRangeExitFtraceEvent.prototype.lblk = 0;

            /**
             * Ext4EsFindDelayedExtentRangeExitFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent
             * @instance
             */
            Ext4EsFindDelayedExtentRangeExitFtraceEvent.prototype.len = 0;

            /**
             * Ext4EsFindDelayedExtentRangeExitFtraceEvent pblk.
             * @member {number} pblk
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent
             * @instance
             */
            Ext4EsFindDelayedExtentRangeExitFtraceEvent.prototype.pblk = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EsFindDelayedExtentRangeExitFtraceEvent status.
             * @member {number} status
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent
             * @instance
             */
            Ext4EsFindDelayedExtentRangeExitFtraceEvent.prototype.status = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new Ext4EsFindDelayedExtentRangeExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsFindDelayedExtentRangeExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent} Ext4EsFindDelayedExtentRangeExitFtraceEvent instance
             */
            Ext4EsFindDelayedExtentRangeExitFtraceEvent.create = function create(properties) {
                return new Ext4EsFindDelayedExtentRangeExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4EsFindDelayedExtentRangeExitFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsFindDelayedExtentRangeExitFtraceEvent} m Ext4EsFindDelayedExtentRangeExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4EsFindDelayedExtentRangeExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.lblk != null && Object.hasOwnProperty.call(m, "lblk"))
                    w.uint32(24).uint32(m.lblk);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).uint32(m.len);
                if (m.pblk != null && Object.hasOwnProperty.call(m, "pblk"))
                    w.uint32(40).uint64(m.pblk);
                if (m.status != null && Object.hasOwnProperty.call(m, "status"))
                    w.uint32(48).uint64(m.status);
                return w;
            };

            /**
             * Encodes the specified Ext4EsFindDelayedExtentRangeExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsFindDelayedExtentRangeExitFtraceEvent} message Ext4EsFindDelayedExtentRangeExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4EsFindDelayedExtentRangeExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4EsFindDelayedExtentRangeExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent} Ext4EsFindDelayedExtentRangeExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4EsFindDelayedExtentRangeExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.lblk = r.uint32();
                        break;
                    case 4:
                        m.len = r.uint32();
                        break;
                    case 5:
                        m.pblk = r.uint64();
                        break;
                    case 6:
                        m.status = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4EsFindDelayedExtentRangeExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent} Ext4EsFindDelayedExtentRangeExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4EsFindDelayedExtentRangeExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4EsFindDelayedExtentRangeExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4EsFindDelayedExtentRangeExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    if (!$util.isInteger(m.lblk))
                        return "lblk: integer expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.pblk != null && m.hasOwnProperty("pblk")) {
                    if (!$util.isInteger(m.pblk) && !(m.pblk && $util.isInteger(m.pblk.low) && $util.isInteger(m.pblk.high)))
                        return "pblk: integer|Long expected";
                }
                if (m.status != null && m.hasOwnProperty("status")) {
                    if (!$util.isInteger(m.status) && !(m.status && $util.isInteger(m.status.low) && $util.isInteger(m.status.high)))
                        return "status: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an Ext4EsFindDelayedExtentRangeExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent} Ext4EsFindDelayedExtentRangeExitFtraceEvent
             */
            Ext4EsFindDelayedExtentRangeExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.lblk != null) {
                    m.lblk = d.lblk >>> 0;
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.pblk != null) {
                    if ($util.Long)
                        (m.pblk = $util.Long.fromValue(d.pblk)).unsigned = true;
                    else if (typeof d.pblk === "string")
                        m.pblk = parseInt(d.pblk, 10);
                    else if (typeof d.pblk === "number")
                        m.pblk = d.pblk;
                    else if (typeof d.pblk === "object")
                        m.pblk = new $util.LongBits(d.pblk.low >>> 0, d.pblk.high >>> 0).toNumber(true);
                }
                if (d.status != null) {
                    if ($util.Long)
                        (m.status = $util.Long.fromValue(d.status)).unsigned = true;
                    else if (typeof d.status === "string")
                        m.status = parseInt(d.status, 10);
                    else if (typeof d.status === "number")
                        m.status = d.status;
                    else if (typeof d.status === "object")
                        m.status = new $util.LongBits(d.status.low >>> 0, d.status.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4EsFindDelayedExtentRangeExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent} m Ext4EsFindDelayedExtentRangeExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4EsFindDelayedExtentRangeExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.lblk = 0;
                    d.len = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pblk = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pblk = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.status = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.status = o.longs === String ? "0" : 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    d.lblk = m.lblk;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.pblk != null && m.hasOwnProperty("pblk")) {
                    if (typeof m.pblk === "number")
                        d.pblk = o.longs === String ? String(m.pblk) : m.pblk;
                    else
                        d.pblk = o.longs === String ? $util.Long.prototype.toString.call(m.pblk) : o.longs === Number ? new $util.LongBits(m.pblk.low >>> 0, m.pblk.high >>> 0).toNumber(true) : m.pblk;
                }
                if (m.status != null && m.hasOwnProperty("status")) {
                    if (typeof m.status === "number")
                        d.status = o.longs === String ? String(m.status) : m.status;
                    else
                        d.status = o.longs === String ? $util.Long.prototype.toString.call(m.status) : o.longs === Number ? new $util.LongBits(m.status.low >>> 0, m.status.high >>> 0).toNumber(true) : m.status;
                }
                return d;
            };

            /**
             * Converts this Ext4EsFindDelayedExtentRangeExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4EsFindDelayedExtentRangeExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4EsFindDelayedExtentRangeExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4EsFindDelayedExtentRangeExitFtraceEvent;
        })();

        protos.Ext4EsInsertExtentFtraceEvent = (function() {

            /**
             * Properties of an Ext4EsInsertExtentFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4EsInsertExtentFtraceEvent
             * @property {number|null} [dev] Ext4EsInsertExtentFtraceEvent dev
             * @property {number|null} [ino] Ext4EsInsertExtentFtraceEvent ino
             * @property {number|null} [lblk] Ext4EsInsertExtentFtraceEvent lblk
             * @property {number|null} [len] Ext4EsInsertExtentFtraceEvent len
             * @property {number|null} [pblk] Ext4EsInsertExtentFtraceEvent pblk
             * @property {number|null} [status] Ext4EsInsertExtentFtraceEvent status
             */

            /**
             * Constructs a new Ext4EsInsertExtentFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4EsInsertExtentFtraceEvent.
             * @implements IExt4EsInsertExtentFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4EsInsertExtentFtraceEvent=} [p] Properties to set
             */
            function Ext4EsInsertExtentFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4EsInsertExtentFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4EsInsertExtentFtraceEvent
             * @instance
             */
            Ext4EsInsertExtentFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EsInsertExtentFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4EsInsertExtentFtraceEvent
             * @instance
             */
            Ext4EsInsertExtentFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EsInsertExtentFtraceEvent lblk.
             * @member {number} lblk
             * @memberof perfetto.protos.Ext4EsInsertExtentFtraceEvent
             * @instance
             */
            Ext4EsInsertExtentFtraceEvent.prototype.lblk = 0;

            /**
             * Ext4EsInsertExtentFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4EsInsertExtentFtraceEvent
             * @instance
             */
            Ext4EsInsertExtentFtraceEvent.prototype.len = 0;

            /**
             * Ext4EsInsertExtentFtraceEvent pblk.
             * @member {number} pblk
             * @memberof perfetto.protos.Ext4EsInsertExtentFtraceEvent
             * @instance
             */
            Ext4EsInsertExtentFtraceEvent.prototype.pblk = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EsInsertExtentFtraceEvent status.
             * @member {number} status
             * @memberof perfetto.protos.Ext4EsInsertExtentFtraceEvent
             * @instance
             */
            Ext4EsInsertExtentFtraceEvent.prototype.status = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new Ext4EsInsertExtentFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4EsInsertExtentFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsInsertExtentFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4EsInsertExtentFtraceEvent} Ext4EsInsertExtentFtraceEvent instance
             */
            Ext4EsInsertExtentFtraceEvent.create = function create(properties) {
                return new Ext4EsInsertExtentFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4EsInsertExtentFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4EsInsertExtentFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4EsInsertExtentFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsInsertExtentFtraceEvent} m Ext4EsInsertExtentFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4EsInsertExtentFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.lblk != null && Object.hasOwnProperty.call(m, "lblk"))
                    w.uint32(24).uint32(m.lblk);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).uint32(m.len);
                if (m.pblk != null && Object.hasOwnProperty.call(m, "pblk"))
                    w.uint32(40).uint64(m.pblk);
                if (m.status != null && Object.hasOwnProperty.call(m, "status"))
                    w.uint32(48).uint64(m.status);
                return w;
            };

            /**
             * Encodes the specified Ext4EsInsertExtentFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4EsInsertExtentFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4EsInsertExtentFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsInsertExtentFtraceEvent} message Ext4EsInsertExtentFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4EsInsertExtentFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4EsInsertExtentFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4EsInsertExtentFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4EsInsertExtentFtraceEvent} Ext4EsInsertExtentFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4EsInsertExtentFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4EsInsertExtentFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.lblk = r.uint32();
                        break;
                    case 4:
                        m.len = r.uint32();
                        break;
                    case 5:
                        m.pblk = r.uint64();
                        break;
                    case 6:
                        m.status = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4EsInsertExtentFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4EsInsertExtentFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4EsInsertExtentFtraceEvent} Ext4EsInsertExtentFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4EsInsertExtentFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4EsInsertExtentFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4EsInsertExtentFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4EsInsertExtentFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    if (!$util.isInteger(m.lblk))
                        return "lblk: integer expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.pblk != null && m.hasOwnProperty("pblk")) {
                    if (!$util.isInteger(m.pblk) && !(m.pblk && $util.isInteger(m.pblk.low) && $util.isInteger(m.pblk.high)))
                        return "pblk: integer|Long expected";
                }
                if (m.status != null && m.hasOwnProperty("status")) {
                    if (!$util.isInteger(m.status) && !(m.status && $util.isInteger(m.status.low) && $util.isInteger(m.status.high)))
                        return "status: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an Ext4EsInsertExtentFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4EsInsertExtentFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4EsInsertExtentFtraceEvent} Ext4EsInsertExtentFtraceEvent
             */
            Ext4EsInsertExtentFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4EsInsertExtentFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4EsInsertExtentFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.lblk != null) {
                    m.lblk = d.lblk >>> 0;
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.pblk != null) {
                    if ($util.Long)
                        (m.pblk = $util.Long.fromValue(d.pblk)).unsigned = true;
                    else if (typeof d.pblk === "string")
                        m.pblk = parseInt(d.pblk, 10);
                    else if (typeof d.pblk === "number")
                        m.pblk = d.pblk;
                    else if (typeof d.pblk === "object")
                        m.pblk = new $util.LongBits(d.pblk.low >>> 0, d.pblk.high >>> 0).toNumber(true);
                }
                if (d.status != null) {
                    if ($util.Long)
                        (m.status = $util.Long.fromValue(d.status)).unsigned = true;
                    else if (typeof d.status === "string")
                        m.status = parseInt(d.status, 10);
                    else if (typeof d.status === "number")
                        m.status = d.status;
                    else if (typeof d.status === "object")
                        m.status = new $util.LongBits(d.status.low >>> 0, d.status.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4EsInsertExtentFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4EsInsertExtentFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4EsInsertExtentFtraceEvent} m Ext4EsInsertExtentFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4EsInsertExtentFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.lblk = 0;
                    d.len = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pblk = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pblk = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.status = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.status = o.longs === String ? "0" : 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    d.lblk = m.lblk;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.pblk != null && m.hasOwnProperty("pblk")) {
                    if (typeof m.pblk === "number")
                        d.pblk = o.longs === String ? String(m.pblk) : m.pblk;
                    else
                        d.pblk = o.longs === String ? $util.Long.prototype.toString.call(m.pblk) : o.longs === Number ? new $util.LongBits(m.pblk.low >>> 0, m.pblk.high >>> 0).toNumber(true) : m.pblk;
                }
                if (m.status != null && m.hasOwnProperty("status")) {
                    if (typeof m.status === "number")
                        d.status = o.longs === String ? String(m.status) : m.status;
                    else
                        d.status = o.longs === String ? $util.Long.prototype.toString.call(m.status) : o.longs === Number ? new $util.LongBits(m.status.low >>> 0, m.status.high >>> 0).toNumber(true) : m.status;
                }
                return d;
            };

            /**
             * Converts this Ext4EsInsertExtentFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4EsInsertExtentFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4EsInsertExtentFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4EsInsertExtentFtraceEvent;
        })();

        protos.Ext4EsLookupExtentEnterFtraceEvent = (function() {

            /**
             * Properties of an Ext4EsLookupExtentEnterFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4EsLookupExtentEnterFtraceEvent
             * @property {number|null} [dev] Ext4EsLookupExtentEnterFtraceEvent dev
             * @property {number|null} [ino] Ext4EsLookupExtentEnterFtraceEvent ino
             * @property {number|null} [lblk] Ext4EsLookupExtentEnterFtraceEvent lblk
             */

            /**
             * Constructs a new Ext4EsLookupExtentEnterFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4EsLookupExtentEnterFtraceEvent.
             * @implements IExt4EsLookupExtentEnterFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4EsLookupExtentEnterFtraceEvent=} [p] Properties to set
             */
            function Ext4EsLookupExtentEnterFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4EsLookupExtentEnterFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent
             * @instance
             */
            Ext4EsLookupExtentEnterFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EsLookupExtentEnterFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent
             * @instance
             */
            Ext4EsLookupExtentEnterFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EsLookupExtentEnterFtraceEvent lblk.
             * @member {number} lblk
             * @memberof perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent
             * @instance
             */
            Ext4EsLookupExtentEnterFtraceEvent.prototype.lblk = 0;

            /**
             * Creates a new Ext4EsLookupExtentEnterFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsLookupExtentEnterFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent} Ext4EsLookupExtentEnterFtraceEvent instance
             */
            Ext4EsLookupExtentEnterFtraceEvent.create = function create(properties) {
                return new Ext4EsLookupExtentEnterFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4EsLookupExtentEnterFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsLookupExtentEnterFtraceEvent} m Ext4EsLookupExtentEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4EsLookupExtentEnterFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.lblk != null && Object.hasOwnProperty.call(m, "lblk"))
                    w.uint32(24).uint32(m.lblk);
                return w;
            };

            /**
             * Encodes the specified Ext4EsLookupExtentEnterFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsLookupExtentEnterFtraceEvent} message Ext4EsLookupExtentEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4EsLookupExtentEnterFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4EsLookupExtentEnterFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent} Ext4EsLookupExtentEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4EsLookupExtentEnterFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.lblk = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4EsLookupExtentEnterFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent} Ext4EsLookupExtentEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4EsLookupExtentEnterFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4EsLookupExtentEnterFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4EsLookupExtentEnterFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    if (!$util.isInteger(m.lblk))
                        return "lblk: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4EsLookupExtentEnterFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent} Ext4EsLookupExtentEnterFtraceEvent
             */
            Ext4EsLookupExtentEnterFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.lblk != null) {
                    m.lblk = d.lblk >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4EsLookupExtentEnterFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent} m Ext4EsLookupExtentEnterFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4EsLookupExtentEnterFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.lblk = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    d.lblk = m.lblk;
                }
                return d;
            };

            /**
             * Converts this Ext4EsLookupExtentEnterFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4EsLookupExtentEnterFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4EsLookupExtentEnterFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4EsLookupExtentEnterFtraceEvent;
        })();

        protos.Ext4EsLookupExtentExitFtraceEvent = (function() {

            /**
             * Properties of an Ext4EsLookupExtentExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4EsLookupExtentExitFtraceEvent
             * @property {number|null} [dev] Ext4EsLookupExtentExitFtraceEvent dev
             * @property {number|null} [ino] Ext4EsLookupExtentExitFtraceEvent ino
             * @property {number|null} [lblk] Ext4EsLookupExtentExitFtraceEvent lblk
             * @property {number|null} [len] Ext4EsLookupExtentExitFtraceEvent len
             * @property {number|null} [pblk] Ext4EsLookupExtentExitFtraceEvent pblk
             * @property {number|null} [status] Ext4EsLookupExtentExitFtraceEvent status
             * @property {number|null} [found] Ext4EsLookupExtentExitFtraceEvent found
             */

            /**
             * Constructs a new Ext4EsLookupExtentExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4EsLookupExtentExitFtraceEvent.
             * @implements IExt4EsLookupExtentExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4EsLookupExtentExitFtraceEvent=} [p] Properties to set
             */
            function Ext4EsLookupExtentExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4EsLookupExtentExitFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4EsLookupExtentExitFtraceEvent
             * @instance
             */
            Ext4EsLookupExtentExitFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EsLookupExtentExitFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4EsLookupExtentExitFtraceEvent
             * @instance
             */
            Ext4EsLookupExtentExitFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EsLookupExtentExitFtraceEvent lblk.
             * @member {number} lblk
             * @memberof perfetto.protos.Ext4EsLookupExtentExitFtraceEvent
             * @instance
             */
            Ext4EsLookupExtentExitFtraceEvent.prototype.lblk = 0;

            /**
             * Ext4EsLookupExtentExitFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4EsLookupExtentExitFtraceEvent
             * @instance
             */
            Ext4EsLookupExtentExitFtraceEvent.prototype.len = 0;

            /**
             * Ext4EsLookupExtentExitFtraceEvent pblk.
             * @member {number} pblk
             * @memberof perfetto.protos.Ext4EsLookupExtentExitFtraceEvent
             * @instance
             */
            Ext4EsLookupExtentExitFtraceEvent.prototype.pblk = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EsLookupExtentExitFtraceEvent status.
             * @member {number} status
             * @memberof perfetto.protos.Ext4EsLookupExtentExitFtraceEvent
             * @instance
             */
            Ext4EsLookupExtentExitFtraceEvent.prototype.status = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EsLookupExtentExitFtraceEvent found.
             * @member {number} found
             * @memberof perfetto.protos.Ext4EsLookupExtentExitFtraceEvent
             * @instance
             */
            Ext4EsLookupExtentExitFtraceEvent.prototype.found = 0;

            /**
             * Creates a new Ext4EsLookupExtentExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4EsLookupExtentExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsLookupExtentExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4EsLookupExtentExitFtraceEvent} Ext4EsLookupExtentExitFtraceEvent instance
             */
            Ext4EsLookupExtentExitFtraceEvent.create = function create(properties) {
                return new Ext4EsLookupExtentExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4EsLookupExtentExitFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4EsLookupExtentExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4EsLookupExtentExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsLookupExtentExitFtraceEvent} m Ext4EsLookupExtentExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4EsLookupExtentExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.lblk != null && Object.hasOwnProperty.call(m, "lblk"))
                    w.uint32(24).uint32(m.lblk);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).uint32(m.len);
                if (m.pblk != null && Object.hasOwnProperty.call(m, "pblk"))
                    w.uint32(40).uint64(m.pblk);
                if (m.status != null && Object.hasOwnProperty.call(m, "status"))
                    w.uint32(48).uint64(m.status);
                if (m.found != null && Object.hasOwnProperty.call(m, "found"))
                    w.uint32(56).int32(m.found);
                return w;
            };

            /**
             * Encodes the specified Ext4EsLookupExtentExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4EsLookupExtentExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4EsLookupExtentExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsLookupExtentExitFtraceEvent} message Ext4EsLookupExtentExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4EsLookupExtentExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4EsLookupExtentExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4EsLookupExtentExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4EsLookupExtentExitFtraceEvent} Ext4EsLookupExtentExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4EsLookupExtentExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4EsLookupExtentExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.lblk = r.uint32();
                        break;
                    case 4:
                        m.len = r.uint32();
                        break;
                    case 5:
                        m.pblk = r.uint64();
                        break;
                    case 6:
                        m.status = r.uint64();
                        break;
                    case 7:
                        m.found = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4EsLookupExtentExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4EsLookupExtentExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4EsLookupExtentExitFtraceEvent} Ext4EsLookupExtentExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4EsLookupExtentExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4EsLookupExtentExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4EsLookupExtentExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4EsLookupExtentExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    if (!$util.isInteger(m.lblk))
                        return "lblk: integer expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.pblk != null && m.hasOwnProperty("pblk")) {
                    if (!$util.isInteger(m.pblk) && !(m.pblk && $util.isInteger(m.pblk.low) && $util.isInteger(m.pblk.high)))
                        return "pblk: integer|Long expected";
                }
                if (m.status != null && m.hasOwnProperty("status")) {
                    if (!$util.isInteger(m.status) && !(m.status && $util.isInteger(m.status.low) && $util.isInteger(m.status.high)))
                        return "status: integer|Long expected";
                }
                if (m.found != null && m.hasOwnProperty("found")) {
                    if (!$util.isInteger(m.found))
                        return "found: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4EsLookupExtentExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4EsLookupExtentExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4EsLookupExtentExitFtraceEvent} Ext4EsLookupExtentExitFtraceEvent
             */
            Ext4EsLookupExtentExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4EsLookupExtentExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4EsLookupExtentExitFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.lblk != null) {
                    m.lblk = d.lblk >>> 0;
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.pblk != null) {
                    if ($util.Long)
                        (m.pblk = $util.Long.fromValue(d.pblk)).unsigned = true;
                    else if (typeof d.pblk === "string")
                        m.pblk = parseInt(d.pblk, 10);
                    else if (typeof d.pblk === "number")
                        m.pblk = d.pblk;
                    else if (typeof d.pblk === "object")
                        m.pblk = new $util.LongBits(d.pblk.low >>> 0, d.pblk.high >>> 0).toNumber(true);
                }
                if (d.status != null) {
                    if ($util.Long)
                        (m.status = $util.Long.fromValue(d.status)).unsigned = true;
                    else if (typeof d.status === "string")
                        m.status = parseInt(d.status, 10);
                    else if (typeof d.status === "number")
                        m.status = d.status;
                    else if (typeof d.status === "object")
                        m.status = new $util.LongBits(d.status.low >>> 0, d.status.high >>> 0).toNumber(true);
                }
                if (d.found != null) {
                    m.found = d.found | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4EsLookupExtentExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4EsLookupExtentExitFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4EsLookupExtentExitFtraceEvent} m Ext4EsLookupExtentExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4EsLookupExtentExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.lblk = 0;
                    d.len = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pblk = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pblk = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.status = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.status = o.longs === String ? "0" : 0;
                    d.found = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    d.lblk = m.lblk;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.pblk != null && m.hasOwnProperty("pblk")) {
                    if (typeof m.pblk === "number")
                        d.pblk = o.longs === String ? String(m.pblk) : m.pblk;
                    else
                        d.pblk = o.longs === String ? $util.Long.prototype.toString.call(m.pblk) : o.longs === Number ? new $util.LongBits(m.pblk.low >>> 0, m.pblk.high >>> 0).toNumber(true) : m.pblk;
                }
                if (m.status != null && m.hasOwnProperty("status")) {
                    if (typeof m.status === "number")
                        d.status = o.longs === String ? String(m.status) : m.status;
                    else
                        d.status = o.longs === String ? $util.Long.prototype.toString.call(m.status) : o.longs === Number ? new $util.LongBits(m.status.low >>> 0, m.status.high >>> 0).toNumber(true) : m.status;
                }
                if (m.found != null && m.hasOwnProperty("found")) {
                    d.found = m.found;
                }
                return d;
            };

            /**
             * Converts this Ext4EsLookupExtentExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4EsLookupExtentExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4EsLookupExtentExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4EsLookupExtentExitFtraceEvent;
        })();

        protos.Ext4EsRemoveExtentFtraceEvent = (function() {

            /**
             * Properties of an Ext4EsRemoveExtentFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4EsRemoveExtentFtraceEvent
             * @property {number|null} [dev] Ext4EsRemoveExtentFtraceEvent dev
             * @property {number|null} [ino] Ext4EsRemoveExtentFtraceEvent ino
             * @property {number|null} [lblk] Ext4EsRemoveExtentFtraceEvent lblk
             * @property {number|null} [len] Ext4EsRemoveExtentFtraceEvent len
             */

            /**
             * Constructs a new Ext4EsRemoveExtentFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4EsRemoveExtentFtraceEvent.
             * @implements IExt4EsRemoveExtentFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4EsRemoveExtentFtraceEvent=} [p] Properties to set
             */
            function Ext4EsRemoveExtentFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4EsRemoveExtentFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4EsRemoveExtentFtraceEvent
             * @instance
             */
            Ext4EsRemoveExtentFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EsRemoveExtentFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4EsRemoveExtentFtraceEvent
             * @instance
             */
            Ext4EsRemoveExtentFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EsRemoveExtentFtraceEvent lblk.
             * @member {number} lblk
             * @memberof perfetto.protos.Ext4EsRemoveExtentFtraceEvent
             * @instance
             */
            Ext4EsRemoveExtentFtraceEvent.prototype.lblk = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4EsRemoveExtentFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4EsRemoveExtentFtraceEvent
             * @instance
             */
            Ext4EsRemoveExtentFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new Ext4EsRemoveExtentFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4EsRemoveExtentFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsRemoveExtentFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4EsRemoveExtentFtraceEvent} Ext4EsRemoveExtentFtraceEvent instance
             */
            Ext4EsRemoveExtentFtraceEvent.create = function create(properties) {
                return new Ext4EsRemoveExtentFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4EsRemoveExtentFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4EsRemoveExtentFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4EsRemoveExtentFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsRemoveExtentFtraceEvent} m Ext4EsRemoveExtentFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4EsRemoveExtentFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.lblk != null && Object.hasOwnProperty.call(m, "lblk"))
                    w.uint32(24).int64(m.lblk);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).int64(m.len);
                return w;
            };

            /**
             * Encodes the specified Ext4EsRemoveExtentFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4EsRemoveExtentFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4EsRemoveExtentFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsRemoveExtentFtraceEvent} message Ext4EsRemoveExtentFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4EsRemoveExtentFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4EsRemoveExtentFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4EsRemoveExtentFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4EsRemoveExtentFtraceEvent} Ext4EsRemoveExtentFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4EsRemoveExtentFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4EsRemoveExtentFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.lblk = r.int64();
                        break;
                    case 4:
                        m.len = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4EsRemoveExtentFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4EsRemoveExtentFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4EsRemoveExtentFtraceEvent} Ext4EsRemoveExtentFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4EsRemoveExtentFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4EsRemoveExtentFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4EsRemoveExtentFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4EsRemoveExtentFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    if (!$util.isInteger(m.lblk) && !(m.lblk && $util.isInteger(m.lblk.low) && $util.isInteger(m.lblk.high)))
                        return "lblk: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an Ext4EsRemoveExtentFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4EsRemoveExtentFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4EsRemoveExtentFtraceEvent} Ext4EsRemoveExtentFtraceEvent
             */
            Ext4EsRemoveExtentFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4EsRemoveExtentFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4EsRemoveExtentFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.lblk != null) {
                    if ($util.Long)
                        (m.lblk = $util.Long.fromValue(d.lblk)).unsigned = false;
                    else if (typeof d.lblk === "string")
                        m.lblk = parseInt(d.lblk, 10);
                    else if (typeof d.lblk === "number")
                        m.lblk = d.lblk;
                    else if (typeof d.lblk === "object")
                        m.lblk = new $util.LongBits(d.lblk.low >>> 0, d.lblk.high >>> 0).toNumber();
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = false;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4EsRemoveExtentFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4EsRemoveExtentFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4EsRemoveExtentFtraceEvent} m Ext4EsRemoveExtentFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4EsRemoveExtentFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.lblk = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.lblk = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    if (typeof m.lblk === "number")
                        d.lblk = o.longs === String ? String(m.lblk) : m.lblk;
                    else
                        d.lblk = o.longs === String ? $util.Long.prototype.toString.call(m.lblk) : o.longs === Number ? new $util.LongBits(m.lblk.low >>> 0, m.lblk.high >>> 0).toNumber() : m.lblk;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber() : m.len;
                }
                return d;
            };

            /**
             * Converts this Ext4EsRemoveExtentFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4EsRemoveExtentFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4EsRemoveExtentFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4EsRemoveExtentFtraceEvent;
        })();

        protos.Ext4EsShrinkFtraceEvent = (function() {

            /**
             * Properties of an Ext4EsShrinkFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4EsShrinkFtraceEvent
             * @property {number|null} [dev] Ext4EsShrinkFtraceEvent dev
             * @property {number|null} [nrShrunk] Ext4EsShrinkFtraceEvent nrShrunk
             * @property {number|null} [scanTime] Ext4EsShrinkFtraceEvent scanTime
             * @property {number|null} [nrSkipped] Ext4EsShrinkFtraceEvent nrSkipped
             * @property {number|null} [retried] Ext4EsShrinkFtraceEvent retried
             */

            /**
             * Constructs a new Ext4EsShrinkFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4EsShrinkFtraceEvent.
             * @implements IExt4EsShrinkFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4EsShrinkFtraceEvent=} [p] Properties to set
             */
            function Ext4EsShrinkFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4EsShrinkFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4EsShrinkFtraceEvent
             * @instance
             */
            Ext4EsShrinkFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EsShrinkFtraceEvent nrShrunk.
             * @member {number} nrShrunk
             * @memberof perfetto.protos.Ext4EsShrinkFtraceEvent
             * @instance
             */
            Ext4EsShrinkFtraceEvent.prototype.nrShrunk = 0;

            /**
             * Ext4EsShrinkFtraceEvent scanTime.
             * @member {number} scanTime
             * @memberof perfetto.protos.Ext4EsShrinkFtraceEvent
             * @instance
             */
            Ext4EsShrinkFtraceEvent.prototype.scanTime = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EsShrinkFtraceEvent nrSkipped.
             * @member {number} nrSkipped
             * @memberof perfetto.protos.Ext4EsShrinkFtraceEvent
             * @instance
             */
            Ext4EsShrinkFtraceEvent.prototype.nrSkipped = 0;

            /**
             * Ext4EsShrinkFtraceEvent retried.
             * @member {number} retried
             * @memberof perfetto.protos.Ext4EsShrinkFtraceEvent
             * @instance
             */
            Ext4EsShrinkFtraceEvent.prototype.retried = 0;

            /**
             * Creates a new Ext4EsShrinkFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4EsShrinkFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsShrinkFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4EsShrinkFtraceEvent} Ext4EsShrinkFtraceEvent instance
             */
            Ext4EsShrinkFtraceEvent.create = function create(properties) {
                return new Ext4EsShrinkFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4EsShrinkFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4EsShrinkFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4EsShrinkFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsShrinkFtraceEvent} m Ext4EsShrinkFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4EsShrinkFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.nrShrunk != null && Object.hasOwnProperty.call(m, "nrShrunk"))
                    w.uint32(16).int32(m.nrShrunk);
                if (m.scanTime != null && Object.hasOwnProperty.call(m, "scanTime"))
                    w.uint32(24).uint64(m.scanTime);
                if (m.nrSkipped != null && Object.hasOwnProperty.call(m, "nrSkipped"))
                    w.uint32(32).int32(m.nrSkipped);
                if (m.retried != null && Object.hasOwnProperty.call(m, "retried"))
                    w.uint32(40).int32(m.retried);
                return w;
            };

            /**
             * Encodes the specified Ext4EsShrinkFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4EsShrinkFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4EsShrinkFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsShrinkFtraceEvent} message Ext4EsShrinkFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4EsShrinkFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4EsShrinkFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4EsShrinkFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4EsShrinkFtraceEvent} Ext4EsShrinkFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4EsShrinkFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4EsShrinkFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.nrShrunk = r.int32();
                        break;
                    case 3:
                        m.scanTime = r.uint64();
                        break;
                    case 4:
                        m.nrSkipped = r.int32();
                        break;
                    case 5:
                        m.retried = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4EsShrinkFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4EsShrinkFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4EsShrinkFtraceEvent} Ext4EsShrinkFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4EsShrinkFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4EsShrinkFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4EsShrinkFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4EsShrinkFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.nrShrunk != null && m.hasOwnProperty("nrShrunk")) {
                    if (!$util.isInteger(m.nrShrunk))
                        return "nrShrunk: integer expected";
                }
                if (m.scanTime != null && m.hasOwnProperty("scanTime")) {
                    if (!$util.isInteger(m.scanTime) && !(m.scanTime && $util.isInteger(m.scanTime.low) && $util.isInteger(m.scanTime.high)))
                        return "scanTime: integer|Long expected";
                }
                if (m.nrSkipped != null && m.hasOwnProperty("nrSkipped")) {
                    if (!$util.isInteger(m.nrSkipped))
                        return "nrSkipped: integer expected";
                }
                if (m.retried != null && m.hasOwnProperty("retried")) {
                    if (!$util.isInteger(m.retried))
                        return "retried: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4EsShrinkFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4EsShrinkFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4EsShrinkFtraceEvent} Ext4EsShrinkFtraceEvent
             */
            Ext4EsShrinkFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4EsShrinkFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4EsShrinkFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.nrShrunk != null) {
                    m.nrShrunk = d.nrShrunk | 0;
                }
                if (d.scanTime != null) {
                    if ($util.Long)
                        (m.scanTime = $util.Long.fromValue(d.scanTime)).unsigned = true;
                    else if (typeof d.scanTime === "string")
                        m.scanTime = parseInt(d.scanTime, 10);
                    else if (typeof d.scanTime === "number")
                        m.scanTime = d.scanTime;
                    else if (typeof d.scanTime === "object")
                        m.scanTime = new $util.LongBits(d.scanTime.low >>> 0, d.scanTime.high >>> 0).toNumber(true);
                }
                if (d.nrSkipped != null) {
                    m.nrSkipped = d.nrSkipped | 0;
                }
                if (d.retried != null) {
                    m.retried = d.retried | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4EsShrinkFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4EsShrinkFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4EsShrinkFtraceEvent} m Ext4EsShrinkFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4EsShrinkFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    d.nrShrunk = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.scanTime = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.scanTime = o.longs === String ? "0" : 0;
                    d.nrSkipped = 0;
                    d.retried = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.nrShrunk != null && m.hasOwnProperty("nrShrunk")) {
                    d.nrShrunk = m.nrShrunk;
                }
                if (m.scanTime != null && m.hasOwnProperty("scanTime")) {
                    if (typeof m.scanTime === "number")
                        d.scanTime = o.longs === String ? String(m.scanTime) : m.scanTime;
                    else
                        d.scanTime = o.longs === String ? $util.Long.prototype.toString.call(m.scanTime) : o.longs === Number ? new $util.LongBits(m.scanTime.low >>> 0, m.scanTime.high >>> 0).toNumber(true) : m.scanTime;
                }
                if (m.nrSkipped != null && m.hasOwnProperty("nrSkipped")) {
                    d.nrSkipped = m.nrSkipped;
                }
                if (m.retried != null && m.hasOwnProperty("retried")) {
                    d.retried = m.retried;
                }
                return d;
            };

            /**
             * Converts this Ext4EsShrinkFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4EsShrinkFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4EsShrinkFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4EsShrinkFtraceEvent;
        })();

        protos.Ext4EsShrinkCountFtraceEvent = (function() {

            /**
             * Properties of an Ext4EsShrinkCountFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4EsShrinkCountFtraceEvent
             * @property {number|null} [dev] Ext4EsShrinkCountFtraceEvent dev
             * @property {number|null} [nrToScan] Ext4EsShrinkCountFtraceEvent nrToScan
             * @property {number|null} [cacheCnt] Ext4EsShrinkCountFtraceEvent cacheCnt
             */

            /**
             * Constructs a new Ext4EsShrinkCountFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4EsShrinkCountFtraceEvent.
             * @implements IExt4EsShrinkCountFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4EsShrinkCountFtraceEvent=} [p] Properties to set
             */
            function Ext4EsShrinkCountFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4EsShrinkCountFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4EsShrinkCountFtraceEvent
             * @instance
             */
            Ext4EsShrinkCountFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EsShrinkCountFtraceEvent nrToScan.
             * @member {number} nrToScan
             * @memberof perfetto.protos.Ext4EsShrinkCountFtraceEvent
             * @instance
             */
            Ext4EsShrinkCountFtraceEvent.prototype.nrToScan = 0;

            /**
             * Ext4EsShrinkCountFtraceEvent cacheCnt.
             * @member {number} cacheCnt
             * @memberof perfetto.protos.Ext4EsShrinkCountFtraceEvent
             * @instance
             */
            Ext4EsShrinkCountFtraceEvent.prototype.cacheCnt = 0;

            /**
             * Creates a new Ext4EsShrinkCountFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4EsShrinkCountFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsShrinkCountFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4EsShrinkCountFtraceEvent} Ext4EsShrinkCountFtraceEvent instance
             */
            Ext4EsShrinkCountFtraceEvent.create = function create(properties) {
                return new Ext4EsShrinkCountFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4EsShrinkCountFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4EsShrinkCountFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4EsShrinkCountFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsShrinkCountFtraceEvent} m Ext4EsShrinkCountFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4EsShrinkCountFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.nrToScan != null && Object.hasOwnProperty.call(m, "nrToScan"))
                    w.uint32(16).int32(m.nrToScan);
                if (m.cacheCnt != null && Object.hasOwnProperty.call(m, "cacheCnt"))
                    w.uint32(24).int32(m.cacheCnt);
                return w;
            };

            /**
             * Encodes the specified Ext4EsShrinkCountFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4EsShrinkCountFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4EsShrinkCountFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsShrinkCountFtraceEvent} message Ext4EsShrinkCountFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4EsShrinkCountFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4EsShrinkCountFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4EsShrinkCountFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4EsShrinkCountFtraceEvent} Ext4EsShrinkCountFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4EsShrinkCountFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4EsShrinkCountFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.nrToScan = r.int32();
                        break;
                    case 3:
                        m.cacheCnt = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4EsShrinkCountFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4EsShrinkCountFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4EsShrinkCountFtraceEvent} Ext4EsShrinkCountFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4EsShrinkCountFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4EsShrinkCountFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4EsShrinkCountFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4EsShrinkCountFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.nrToScan != null && m.hasOwnProperty("nrToScan")) {
                    if (!$util.isInteger(m.nrToScan))
                        return "nrToScan: integer expected";
                }
                if (m.cacheCnt != null && m.hasOwnProperty("cacheCnt")) {
                    if (!$util.isInteger(m.cacheCnt))
                        return "cacheCnt: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4EsShrinkCountFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4EsShrinkCountFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4EsShrinkCountFtraceEvent} Ext4EsShrinkCountFtraceEvent
             */
            Ext4EsShrinkCountFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4EsShrinkCountFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4EsShrinkCountFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.nrToScan != null) {
                    m.nrToScan = d.nrToScan | 0;
                }
                if (d.cacheCnt != null) {
                    m.cacheCnt = d.cacheCnt | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4EsShrinkCountFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4EsShrinkCountFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4EsShrinkCountFtraceEvent} m Ext4EsShrinkCountFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4EsShrinkCountFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    d.nrToScan = 0;
                    d.cacheCnt = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.nrToScan != null && m.hasOwnProperty("nrToScan")) {
                    d.nrToScan = m.nrToScan;
                }
                if (m.cacheCnt != null && m.hasOwnProperty("cacheCnt")) {
                    d.cacheCnt = m.cacheCnt;
                }
                return d;
            };

            /**
             * Converts this Ext4EsShrinkCountFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4EsShrinkCountFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4EsShrinkCountFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4EsShrinkCountFtraceEvent;
        })();

        protos.Ext4EsShrinkScanEnterFtraceEvent = (function() {

            /**
             * Properties of an Ext4EsShrinkScanEnterFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4EsShrinkScanEnterFtraceEvent
             * @property {number|null} [dev] Ext4EsShrinkScanEnterFtraceEvent dev
             * @property {number|null} [nrToScan] Ext4EsShrinkScanEnterFtraceEvent nrToScan
             * @property {number|null} [cacheCnt] Ext4EsShrinkScanEnterFtraceEvent cacheCnt
             */

            /**
             * Constructs a new Ext4EsShrinkScanEnterFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4EsShrinkScanEnterFtraceEvent.
             * @implements IExt4EsShrinkScanEnterFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4EsShrinkScanEnterFtraceEvent=} [p] Properties to set
             */
            function Ext4EsShrinkScanEnterFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4EsShrinkScanEnterFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent
             * @instance
             */
            Ext4EsShrinkScanEnterFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EsShrinkScanEnterFtraceEvent nrToScan.
             * @member {number} nrToScan
             * @memberof perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent
             * @instance
             */
            Ext4EsShrinkScanEnterFtraceEvent.prototype.nrToScan = 0;

            /**
             * Ext4EsShrinkScanEnterFtraceEvent cacheCnt.
             * @member {number} cacheCnt
             * @memberof perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent
             * @instance
             */
            Ext4EsShrinkScanEnterFtraceEvent.prototype.cacheCnt = 0;

            /**
             * Creates a new Ext4EsShrinkScanEnterFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsShrinkScanEnterFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent} Ext4EsShrinkScanEnterFtraceEvent instance
             */
            Ext4EsShrinkScanEnterFtraceEvent.create = function create(properties) {
                return new Ext4EsShrinkScanEnterFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4EsShrinkScanEnterFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsShrinkScanEnterFtraceEvent} m Ext4EsShrinkScanEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4EsShrinkScanEnterFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.nrToScan != null && Object.hasOwnProperty.call(m, "nrToScan"))
                    w.uint32(16).int32(m.nrToScan);
                if (m.cacheCnt != null && Object.hasOwnProperty.call(m, "cacheCnt"))
                    w.uint32(24).int32(m.cacheCnt);
                return w;
            };

            /**
             * Encodes the specified Ext4EsShrinkScanEnterFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsShrinkScanEnterFtraceEvent} message Ext4EsShrinkScanEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4EsShrinkScanEnterFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4EsShrinkScanEnterFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent} Ext4EsShrinkScanEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4EsShrinkScanEnterFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.nrToScan = r.int32();
                        break;
                    case 3:
                        m.cacheCnt = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4EsShrinkScanEnterFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent} Ext4EsShrinkScanEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4EsShrinkScanEnterFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4EsShrinkScanEnterFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4EsShrinkScanEnterFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.nrToScan != null && m.hasOwnProperty("nrToScan")) {
                    if (!$util.isInteger(m.nrToScan))
                        return "nrToScan: integer expected";
                }
                if (m.cacheCnt != null && m.hasOwnProperty("cacheCnt")) {
                    if (!$util.isInteger(m.cacheCnt))
                        return "cacheCnt: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4EsShrinkScanEnterFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent} Ext4EsShrinkScanEnterFtraceEvent
             */
            Ext4EsShrinkScanEnterFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.nrToScan != null) {
                    m.nrToScan = d.nrToScan | 0;
                }
                if (d.cacheCnt != null) {
                    m.cacheCnt = d.cacheCnt | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4EsShrinkScanEnterFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent} m Ext4EsShrinkScanEnterFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4EsShrinkScanEnterFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    d.nrToScan = 0;
                    d.cacheCnt = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.nrToScan != null && m.hasOwnProperty("nrToScan")) {
                    d.nrToScan = m.nrToScan;
                }
                if (m.cacheCnt != null && m.hasOwnProperty("cacheCnt")) {
                    d.cacheCnt = m.cacheCnt;
                }
                return d;
            };

            /**
             * Converts this Ext4EsShrinkScanEnterFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4EsShrinkScanEnterFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4EsShrinkScanEnterFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4EsShrinkScanEnterFtraceEvent;
        })();

        protos.Ext4EsShrinkScanExitFtraceEvent = (function() {

            /**
             * Properties of an Ext4EsShrinkScanExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4EsShrinkScanExitFtraceEvent
             * @property {number|null} [dev] Ext4EsShrinkScanExitFtraceEvent dev
             * @property {number|null} [nrShrunk] Ext4EsShrinkScanExitFtraceEvent nrShrunk
             * @property {number|null} [cacheCnt] Ext4EsShrinkScanExitFtraceEvent cacheCnt
             */

            /**
             * Constructs a new Ext4EsShrinkScanExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4EsShrinkScanExitFtraceEvent.
             * @implements IExt4EsShrinkScanExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4EsShrinkScanExitFtraceEvent=} [p] Properties to set
             */
            function Ext4EsShrinkScanExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4EsShrinkScanExitFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4EsShrinkScanExitFtraceEvent
             * @instance
             */
            Ext4EsShrinkScanExitFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EsShrinkScanExitFtraceEvent nrShrunk.
             * @member {number} nrShrunk
             * @memberof perfetto.protos.Ext4EsShrinkScanExitFtraceEvent
             * @instance
             */
            Ext4EsShrinkScanExitFtraceEvent.prototype.nrShrunk = 0;

            /**
             * Ext4EsShrinkScanExitFtraceEvent cacheCnt.
             * @member {number} cacheCnt
             * @memberof perfetto.protos.Ext4EsShrinkScanExitFtraceEvent
             * @instance
             */
            Ext4EsShrinkScanExitFtraceEvent.prototype.cacheCnt = 0;

            /**
             * Creates a new Ext4EsShrinkScanExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4EsShrinkScanExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsShrinkScanExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4EsShrinkScanExitFtraceEvent} Ext4EsShrinkScanExitFtraceEvent instance
             */
            Ext4EsShrinkScanExitFtraceEvent.create = function create(properties) {
                return new Ext4EsShrinkScanExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4EsShrinkScanExitFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4EsShrinkScanExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4EsShrinkScanExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsShrinkScanExitFtraceEvent} m Ext4EsShrinkScanExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4EsShrinkScanExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.nrShrunk != null && Object.hasOwnProperty.call(m, "nrShrunk"))
                    w.uint32(16).int32(m.nrShrunk);
                if (m.cacheCnt != null && Object.hasOwnProperty.call(m, "cacheCnt"))
                    w.uint32(24).int32(m.cacheCnt);
                return w;
            };

            /**
             * Encodes the specified Ext4EsShrinkScanExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4EsShrinkScanExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4EsShrinkScanExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EsShrinkScanExitFtraceEvent} message Ext4EsShrinkScanExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4EsShrinkScanExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4EsShrinkScanExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4EsShrinkScanExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4EsShrinkScanExitFtraceEvent} Ext4EsShrinkScanExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4EsShrinkScanExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4EsShrinkScanExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.nrShrunk = r.int32();
                        break;
                    case 3:
                        m.cacheCnt = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4EsShrinkScanExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4EsShrinkScanExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4EsShrinkScanExitFtraceEvent} Ext4EsShrinkScanExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4EsShrinkScanExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4EsShrinkScanExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4EsShrinkScanExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4EsShrinkScanExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.nrShrunk != null && m.hasOwnProperty("nrShrunk")) {
                    if (!$util.isInteger(m.nrShrunk))
                        return "nrShrunk: integer expected";
                }
                if (m.cacheCnt != null && m.hasOwnProperty("cacheCnt")) {
                    if (!$util.isInteger(m.cacheCnt))
                        return "cacheCnt: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4EsShrinkScanExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4EsShrinkScanExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4EsShrinkScanExitFtraceEvent} Ext4EsShrinkScanExitFtraceEvent
             */
            Ext4EsShrinkScanExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4EsShrinkScanExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4EsShrinkScanExitFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.nrShrunk != null) {
                    m.nrShrunk = d.nrShrunk | 0;
                }
                if (d.cacheCnt != null) {
                    m.cacheCnt = d.cacheCnt | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4EsShrinkScanExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4EsShrinkScanExitFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4EsShrinkScanExitFtraceEvent} m Ext4EsShrinkScanExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4EsShrinkScanExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    d.nrShrunk = 0;
                    d.cacheCnt = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.nrShrunk != null && m.hasOwnProperty("nrShrunk")) {
                    d.nrShrunk = m.nrShrunk;
                }
                if (m.cacheCnt != null && m.hasOwnProperty("cacheCnt")) {
                    d.cacheCnt = m.cacheCnt;
                }
                return d;
            };

            /**
             * Converts this Ext4EsShrinkScanExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4EsShrinkScanExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4EsShrinkScanExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4EsShrinkScanExitFtraceEvent;
        })();

        protos.Ext4EvictInodeFtraceEvent = (function() {

            /**
             * Properties of an Ext4EvictInodeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4EvictInodeFtraceEvent
             * @property {number|null} [dev] Ext4EvictInodeFtraceEvent dev
             * @property {number|null} [ino] Ext4EvictInodeFtraceEvent ino
             * @property {number|null} [nlink] Ext4EvictInodeFtraceEvent nlink
             */

            /**
             * Constructs a new Ext4EvictInodeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4EvictInodeFtraceEvent.
             * @implements IExt4EvictInodeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4EvictInodeFtraceEvent=} [p] Properties to set
             */
            function Ext4EvictInodeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4EvictInodeFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4EvictInodeFtraceEvent
             * @instance
             */
            Ext4EvictInodeFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EvictInodeFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4EvictInodeFtraceEvent
             * @instance
             */
            Ext4EvictInodeFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4EvictInodeFtraceEvent nlink.
             * @member {number} nlink
             * @memberof perfetto.protos.Ext4EvictInodeFtraceEvent
             * @instance
             */
            Ext4EvictInodeFtraceEvent.prototype.nlink = 0;

            /**
             * Creates a new Ext4EvictInodeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4EvictInodeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EvictInodeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4EvictInodeFtraceEvent} Ext4EvictInodeFtraceEvent instance
             */
            Ext4EvictInodeFtraceEvent.create = function create(properties) {
                return new Ext4EvictInodeFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4EvictInodeFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4EvictInodeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4EvictInodeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EvictInodeFtraceEvent} m Ext4EvictInodeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4EvictInodeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.nlink != null && Object.hasOwnProperty.call(m, "nlink"))
                    w.uint32(24).int32(m.nlink);
                return w;
            };

            /**
             * Encodes the specified Ext4EvictInodeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4EvictInodeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4EvictInodeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4EvictInodeFtraceEvent} message Ext4EvictInodeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4EvictInodeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4EvictInodeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4EvictInodeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4EvictInodeFtraceEvent} Ext4EvictInodeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4EvictInodeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4EvictInodeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.nlink = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4EvictInodeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4EvictInodeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4EvictInodeFtraceEvent} Ext4EvictInodeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4EvictInodeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4EvictInodeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4EvictInodeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4EvictInodeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.nlink != null && m.hasOwnProperty("nlink")) {
                    if (!$util.isInteger(m.nlink))
                        return "nlink: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4EvictInodeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4EvictInodeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4EvictInodeFtraceEvent} Ext4EvictInodeFtraceEvent
             */
            Ext4EvictInodeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4EvictInodeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4EvictInodeFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.nlink != null) {
                    m.nlink = d.nlink | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4EvictInodeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4EvictInodeFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4EvictInodeFtraceEvent} m Ext4EvictInodeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4EvictInodeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.nlink = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.nlink != null && m.hasOwnProperty("nlink")) {
                    d.nlink = m.nlink;
                }
                return d;
            };

            /**
             * Converts this Ext4EvictInodeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4EvictInodeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4EvictInodeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4EvictInodeFtraceEvent;
        })();

        protos.Ext4ExtConvertToInitializedEnterFtraceEvent = (function() {

            /**
             * Properties of an Ext4ExtConvertToInitializedEnterFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4ExtConvertToInitializedEnterFtraceEvent
             * @property {number|null} [dev] Ext4ExtConvertToInitializedEnterFtraceEvent dev
             * @property {number|null} [ino] Ext4ExtConvertToInitializedEnterFtraceEvent ino
             * @property {number|null} [mLblk] Ext4ExtConvertToInitializedEnterFtraceEvent mLblk
             * @property {number|null} [mLen] Ext4ExtConvertToInitializedEnterFtraceEvent mLen
             * @property {number|null} [uLblk] Ext4ExtConvertToInitializedEnterFtraceEvent uLblk
             * @property {number|null} [uLen] Ext4ExtConvertToInitializedEnterFtraceEvent uLen
             * @property {number|null} [uPblk] Ext4ExtConvertToInitializedEnterFtraceEvent uPblk
             */

            /**
             * Constructs a new Ext4ExtConvertToInitializedEnterFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4ExtConvertToInitializedEnterFtraceEvent.
             * @implements IExt4ExtConvertToInitializedEnterFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4ExtConvertToInitializedEnterFtraceEvent=} [p] Properties to set
             */
            function Ext4ExtConvertToInitializedEnterFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4ExtConvertToInitializedEnterFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent
             * @instance
             */
            Ext4ExtConvertToInitializedEnterFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtConvertToInitializedEnterFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent
             * @instance
             */
            Ext4ExtConvertToInitializedEnterFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtConvertToInitializedEnterFtraceEvent mLblk.
             * @member {number} mLblk
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent
             * @instance
             */
            Ext4ExtConvertToInitializedEnterFtraceEvent.prototype.mLblk = 0;

            /**
             * Ext4ExtConvertToInitializedEnterFtraceEvent mLen.
             * @member {number} mLen
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent
             * @instance
             */
            Ext4ExtConvertToInitializedEnterFtraceEvent.prototype.mLen = 0;

            /**
             * Ext4ExtConvertToInitializedEnterFtraceEvent uLblk.
             * @member {number} uLblk
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent
             * @instance
             */
            Ext4ExtConvertToInitializedEnterFtraceEvent.prototype.uLblk = 0;

            /**
             * Ext4ExtConvertToInitializedEnterFtraceEvent uLen.
             * @member {number} uLen
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent
             * @instance
             */
            Ext4ExtConvertToInitializedEnterFtraceEvent.prototype.uLen = 0;

            /**
             * Ext4ExtConvertToInitializedEnterFtraceEvent uPblk.
             * @member {number} uPblk
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent
             * @instance
             */
            Ext4ExtConvertToInitializedEnterFtraceEvent.prototype.uPblk = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new Ext4ExtConvertToInitializedEnterFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtConvertToInitializedEnterFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent} Ext4ExtConvertToInitializedEnterFtraceEvent instance
             */
            Ext4ExtConvertToInitializedEnterFtraceEvent.create = function create(properties) {
                return new Ext4ExtConvertToInitializedEnterFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4ExtConvertToInitializedEnterFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtConvertToInitializedEnterFtraceEvent} m Ext4ExtConvertToInitializedEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtConvertToInitializedEnterFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.mLblk != null && Object.hasOwnProperty.call(m, "mLblk"))
                    w.uint32(24).uint32(m.mLblk);
                if (m.mLen != null && Object.hasOwnProperty.call(m, "mLen"))
                    w.uint32(32).uint32(m.mLen);
                if (m.uLblk != null && Object.hasOwnProperty.call(m, "uLblk"))
                    w.uint32(40).uint32(m.uLblk);
                if (m.uLen != null && Object.hasOwnProperty.call(m, "uLen"))
                    w.uint32(48).uint32(m.uLen);
                if (m.uPblk != null && Object.hasOwnProperty.call(m, "uPblk"))
                    w.uint32(56).uint64(m.uPblk);
                return w;
            };

            /**
             * Encodes the specified Ext4ExtConvertToInitializedEnterFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtConvertToInitializedEnterFtraceEvent} message Ext4ExtConvertToInitializedEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtConvertToInitializedEnterFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4ExtConvertToInitializedEnterFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent} Ext4ExtConvertToInitializedEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtConvertToInitializedEnterFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.mLblk = r.uint32();
                        break;
                    case 4:
                        m.mLen = r.uint32();
                        break;
                    case 5:
                        m.uLblk = r.uint32();
                        break;
                    case 6:
                        m.uLen = r.uint32();
                        break;
                    case 7:
                        m.uPblk = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4ExtConvertToInitializedEnterFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent} Ext4ExtConvertToInitializedEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtConvertToInitializedEnterFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4ExtConvertToInitializedEnterFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4ExtConvertToInitializedEnterFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.mLblk != null && m.hasOwnProperty("mLblk")) {
                    if (!$util.isInteger(m.mLblk))
                        return "mLblk: integer expected";
                }
                if (m.mLen != null && m.hasOwnProperty("mLen")) {
                    if (!$util.isInteger(m.mLen))
                        return "mLen: integer expected";
                }
                if (m.uLblk != null && m.hasOwnProperty("uLblk")) {
                    if (!$util.isInteger(m.uLblk))
                        return "uLblk: integer expected";
                }
                if (m.uLen != null && m.hasOwnProperty("uLen")) {
                    if (!$util.isInteger(m.uLen))
                        return "uLen: integer expected";
                }
                if (m.uPblk != null && m.hasOwnProperty("uPblk")) {
                    if (!$util.isInteger(m.uPblk) && !(m.uPblk && $util.isInteger(m.uPblk.low) && $util.isInteger(m.uPblk.high)))
                        return "uPblk: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an Ext4ExtConvertToInitializedEnterFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent} Ext4ExtConvertToInitializedEnterFtraceEvent
             */
            Ext4ExtConvertToInitializedEnterFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.mLblk != null) {
                    m.mLblk = d.mLblk >>> 0;
                }
                if (d.mLen != null) {
                    m.mLen = d.mLen >>> 0;
                }
                if (d.uLblk != null) {
                    m.uLblk = d.uLblk >>> 0;
                }
                if (d.uLen != null) {
                    m.uLen = d.uLen >>> 0;
                }
                if (d.uPblk != null) {
                    if ($util.Long)
                        (m.uPblk = $util.Long.fromValue(d.uPblk)).unsigned = true;
                    else if (typeof d.uPblk === "string")
                        m.uPblk = parseInt(d.uPblk, 10);
                    else if (typeof d.uPblk === "number")
                        m.uPblk = d.uPblk;
                    else if (typeof d.uPblk === "object")
                        m.uPblk = new $util.LongBits(d.uPblk.low >>> 0, d.uPblk.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4ExtConvertToInitializedEnterFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent} m Ext4ExtConvertToInitializedEnterFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4ExtConvertToInitializedEnterFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.mLblk = 0;
                    d.mLen = 0;
                    d.uLblk = 0;
                    d.uLen = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.uPblk = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.uPblk = o.longs === String ? "0" : 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.mLblk != null && m.hasOwnProperty("mLblk")) {
                    d.mLblk = m.mLblk;
                }
                if (m.mLen != null && m.hasOwnProperty("mLen")) {
                    d.mLen = m.mLen;
                }
                if (m.uLblk != null && m.hasOwnProperty("uLblk")) {
                    d.uLblk = m.uLblk;
                }
                if (m.uLen != null && m.hasOwnProperty("uLen")) {
                    d.uLen = m.uLen;
                }
                if (m.uPblk != null && m.hasOwnProperty("uPblk")) {
                    if (typeof m.uPblk === "number")
                        d.uPblk = o.longs === String ? String(m.uPblk) : m.uPblk;
                    else
                        d.uPblk = o.longs === String ? $util.Long.prototype.toString.call(m.uPblk) : o.longs === Number ? new $util.LongBits(m.uPblk.low >>> 0, m.uPblk.high >>> 0).toNumber(true) : m.uPblk;
                }
                return d;
            };

            /**
             * Converts this Ext4ExtConvertToInitializedEnterFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedEnterFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4ExtConvertToInitializedEnterFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4ExtConvertToInitializedEnterFtraceEvent;
        })();

        protos.Ext4ExtConvertToInitializedFastpathFtraceEvent = (function() {

            /**
             * Properties of an Ext4ExtConvertToInitializedFastpathFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4ExtConvertToInitializedFastpathFtraceEvent
             * @property {number|null} [dev] Ext4ExtConvertToInitializedFastpathFtraceEvent dev
             * @property {number|null} [ino] Ext4ExtConvertToInitializedFastpathFtraceEvent ino
             * @property {number|null} [mLblk] Ext4ExtConvertToInitializedFastpathFtraceEvent mLblk
             * @property {number|null} [mLen] Ext4ExtConvertToInitializedFastpathFtraceEvent mLen
             * @property {number|null} [uLblk] Ext4ExtConvertToInitializedFastpathFtraceEvent uLblk
             * @property {number|null} [uLen] Ext4ExtConvertToInitializedFastpathFtraceEvent uLen
             * @property {number|null} [uPblk] Ext4ExtConvertToInitializedFastpathFtraceEvent uPblk
             * @property {number|null} [iLblk] Ext4ExtConvertToInitializedFastpathFtraceEvent iLblk
             * @property {number|null} [iLen] Ext4ExtConvertToInitializedFastpathFtraceEvent iLen
             * @property {number|null} [iPblk] Ext4ExtConvertToInitializedFastpathFtraceEvent iPblk
             */

            /**
             * Constructs a new Ext4ExtConvertToInitializedFastpathFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4ExtConvertToInitializedFastpathFtraceEvent.
             * @implements IExt4ExtConvertToInitializedFastpathFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4ExtConvertToInitializedFastpathFtraceEvent=} [p] Properties to set
             */
            function Ext4ExtConvertToInitializedFastpathFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4ExtConvertToInitializedFastpathFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent
             * @instance
             */
            Ext4ExtConvertToInitializedFastpathFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtConvertToInitializedFastpathFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent
             * @instance
             */
            Ext4ExtConvertToInitializedFastpathFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtConvertToInitializedFastpathFtraceEvent mLblk.
             * @member {number} mLblk
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent
             * @instance
             */
            Ext4ExtConvertToInitializedFastpathFtraceEvent.prototype.mLblk = 0;

            /**
             * Ext4ExtConvertToInitializedFastpathFtraceEvent mLen.
             * @member {number} mLen
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent
             * @instance
             */
            Ext4ExtConvertToInitializedFastpathFtraceEvent.prototype.mLen = 0;

            /**
             * Ext4ExtConvertToInitializedFastpathFtraceEvent uLblk.
             * @member {number} uLblk
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent
             * @instance
             */
            Ext4ExtConvertToInitializedFastpathFtraceEvent.prototype.uLblk = 0;

            /**
             * Ext4ExtConvertToInitializedFastpathFtraceEvent uLen.
             * @member {number} uLen
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent
             * @instance
             */
            Ext4ExtConvertToInitializedFastpathFtraceEvent.prototype.uLen = 0;

            /**
             * Ext4ExtConvertToInitializedFastpathFtraceEvent uPblk.
             * @member {number} uPblk
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent
             * @instance
             */
            Ext4ExtConvertToInitializedFastpathFtraceEvent.prototype.uPblk = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtConvertToInitializedFastpathFtraceEvent iLblk.
             * @member {number} iLblk
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent
             * @instance
             */
            Ext4ExtConvertToInitializedFastpathFtraceEvent.prototype.iLblk = 0;

            /**
             * Ext4ExtConvertToInitializedFastpathFtraceEvent iLen.
             * @member {number} iLen
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent
             * @instance
             */
            Ext4ExtConvertToInitializedFastpathFtraceEvent.prototype.iLen = 0;

            /**
             * Ext4ExtConvertToInitializedFastpathFtraceEvent iPblk.
             * @member {number} iPblk
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent
             * @instance
             */
            Ext4ExtConvertToInitializedFastpathFtraceEvent.prototype.iPblk = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new Ext4ExtConvertToInitializedFastpathFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtConvertToInitializedFastpathFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent} Ext4ExtConvertToInitializedFastpathFtraceEvent instance
             */
            Ext4ExtConvertToInitializedFastpathFtraceEvent.create = function create(properties) {
                return new Ext4ExtConvertToInitializedFastpathFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4ExtConvertToInitializedFastpathFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtConvertToInitializedFastpathFtraceEvent} m Ext4ExtConvertToInitializedFastpathFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtConvertToInitializedFastpathFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.mLblk != null && Object.hasOwnProperty.call(m, "mLblk"))
                    w.uint32(24).uint32(m.mLblk);
                if (m.mLen != null && Object.hasOwnProperty.call(m, "mLen"))
                    w.uint32(32).uint32(m.mLen);
                if (m.uLblk != null && Object.hasOwnProperty.call(m, "uLblk"))
                    w.uint32(40).uint32(m.uLblk);
                if (m.uLen != null && Object.hasOwnProperty.call(m, "uLen"))
                    w.uint32(48).uint32(m.uLen);
                if (m.uPblk != null && Object.hasOwnProperty.call(m, "uPblk"))
                    w.uint32(56).uint64(m.uPblk);
                if (m.iLblk != null && Object.hasOwnProperty.call(m, "iLblk"))
                    w.uint32(64).uint32(m.iLblk);
                if (m.iLen != null && Object.hasOwnProperty.call(m, "iLen"))
                    w.uint32(72).uint32(m.iLen);
                if (m.iPblk != null && Object.hasOwnProperty.call(m, "iPblk"))
                    w.uint32(80).uint64(m.iPblk);
                return w;
            };

            /**
             * Encodes the specified Ext4ExtConvertToInitializedFastpathFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtConvertToInitializedFastpathFtraceEvent} message Ext4ExtConvertToInitializedFastpathFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtConvertToInitializedFastpathFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4ExtConvertToInitializedFastpathFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent} Ext4ExtConvertToInitializedFastpathFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtConvertToInitializedFastpathFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.mLblk = r.uint32();
                        break;
                    case 4:
                        m.mLen = r.uint32();
                        break;
                    case 5:
                        m.uLblk = r.uint32();
                        break;
                    case 6:
                        m.uLen = r.uint32();
                        break;
                    case 7:
                        m.uPblk = r.uint64();
                        break;
                    case 8:
                        m.iLblk = r.uint32();
                        break;
                    case 9:
                        m.iLen = r.uint32();
                        break;
                    case 10:
                        m.iPblk = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4ExtConvertToInitializedFastpathFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent} Ext4ExtConvertToInitializedFastpathFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtConvertToInitializedFastpathFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4ExtConvertToInitializedFastpathFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4ExtConvertToInitializedFastpathFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.mLblk != null && m.hasOwnProperty("mLblk")) {
                    if (!$util.isInteger(m.mLblk))
                        return "mLblk: integer expected";
                }
                if (m.mLen != null && m.hasOwnProperty("mLen")) {
                    if (!$util.isInteger(m.mLen))
                        return "mLen: integer expected";
                }
                if (m.uLblk != null && m.hasOwnProperty("uLblk")) {
                    if (!$util.isInteger(m.uLblk))
                        return "uLblk: integer expected";
                }
                if (m.uLen != null && m.hasOwnProperty("uLen")) {
                    if (!$util.isInteger(m.uLen))
                        return "uLen: integer expected";
                }
                if (m.uPblk != null && m.hasOwnProperty("uPblk")) {
                    if (!$util.isInteger(m.uPblk) && !(m.uPblk && $util.isInteger(m.uPblk.low) && $util.isInteger(m.uPblk.high)))
                        return "uPblk: integer|Long expected";
                }
                if (m.iLblk != null && m.hasOwnProperty("iLblk")) {
                    if (!$util.isInteger(m.iLblk))
                        return "iLblk: integer expected";
                }
                if (m.iLen != null && m.hasOwnProperty("iLen")) {
                    if (!$util.isInteger(m.iLen))
                        return "iLen: integer expected";
                }
                if (m.iPblk != null && m.hasOwnProperty("iPblk")) {
                    if (!$util.isInteger(m.iPblk) && !(m.iPblk && $util.isInteger(m.iPblk.low) && $util.isInteger(m.iPblk.high)))
                        return "iPblk: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an Ext4ExtConvertToInitializedFastpathFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent} Ext4ExtConvertToInitializedFastpathFtraceEvent
             */
            Ext4ExtConvertToInitializedFastpathFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.mLblk != null) {
                    m.mLblk = d.mLblk >>> 0;
                }
                if (d.mLen != null) {
                    m.mLen = d.mLen >>> 0;
                }
                if (d.uLblk != null) {
                    m.uLblk = d.uLblk >>> 0;
                }
                if (d.uLen != null) {
                    m.uLen = d.uLen >>> 0;
                }
                if (d.uPblk != null) {
                    if ($util.Long)
                        (m.uPblk = $util.Long.fromValue(d.uPblk)).unsigned = true;
                    else if (typeof d.uPblk === "string")
                        m.uPblk = parseInt(d.uPblk, 10);
                    else if (typeof d.uPblk === "number")
                        m.uPblk = d.uPblk;
                    else if (typeof d.uPblk === "object")
                        m.uPblk = new $util.LongBits(d.uPblk.low >>> 0, d.uPblk.high >>> 0).toNumber(true);
                }
                if (d.iLblk != null) {
                    m.iLblk = d.iLblk >>> 0;
                }
                if (d.iLen != null) {
                    m.iLen = d.iLen >>> 0;
                }
                if (d.iPblk != null) {
                    if ($util.Long)
                        (m.iPblk = $util.Long.fromValue(d.iPblk)).unsigned = true;
                    else if (typeof d.iPblk === "string")
                        m.iPblk = parseInt(d.iPblk, 10);
                    else if (typeof d.iPblk === "number")
                        m.iPblk = d.iPblk;
                    else if (typeof d.iPblk === "object")
                        m.iPblk = new $util.LongBits(d.iPblk.low >>> 0, d.iPblk.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4ExtConvertToInitializedFastpathFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent} m Ext4ExtConvertToInitializedFastpathFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4ExtConvertToInitializedFastpathFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.mLblk = 0;
                    d.mLen = 0;
                    d.uLblk = 0;
                    d.uLen = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.uPblk = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.uPblk = o.longs === String ? "0" : 0;
                    d.iLblk = 0;
                    d.iLen = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.iPblk = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.iPblk = o.longs === String ? "0" : 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.mLblk != null && m.hasOwnProperty("mLblk")) {
                    d.mLblk = m.mLblk;
                }
                if (m.mLen != null && m.hasOwnProperty("mLen")) {
                    d.mLen = m.mLen;
                }
                if (m.uLblk != null && m.hasOwnProperty("uLblk")) {
                    d.uLblk = m.uLblk;
                }
                if (m.uLen != null && m.hasOwnProperty("uLen")) {
                    d.uLen = m.uLen;
                }
                if (m.uPblk != null && m.hasOwnProperty("uPblk")) {
                    if (typeof m.uPblk === "number")
                        d.uPblk = o.longs === String ? String(m.uPblk) : m.uPblk;
                    else
                        d.uPblk = o.longs === String ? $util.Long.prototype.toString.call(m.uPblk) : o.longs === Number ? new $util.LongBits(m.uPblk.low >>> 0, m.uPblk.high >>> 0).toNumber(true) : m.uPblk;
                }
                if (m.iLblk != null && m.hasOwnProperty("iLblk")) {
                    d.iLblk = m.iLblk;
                }
                if (m.iLen != null && m.hasOwnProperty("iLen")) {
                    d.iLen = m.iLen;
                }
                if (m.iPblk != null && m.hasOwnProperty("iPblk")) {
                    if (typeof m.iPblk === "number")
                        d.iPblk = o.longs === String ? String(m.iPblk) : m.iPblk;
                    else
                        d.iPblk = o.longs === String ? $util.Long.prototype.toString.call(m.iPblk) : o.longs === Number ? new $util.LongBits(m.iPblk.low >>> 0, m.iPblk.high >>> 0).toNumber(true) : m.iPblk;
                }
                return d;
            };

            /**
             * Converts this Ext4ExtConvertToInitializedFastpathFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4ExtConvertToInitializedFastpathFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4ExtConvertToInitializedFastpathFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4ExtConvertToInitializedFastpathFtraceEvent;
        })();

        protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent = (function() {

            /**
             * Properties of an Ext4ExtHandleUnwrittenExtentsFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4ExtHandleUnwrittenExtentsFtraceEvent
             * @property {number|null} [dev] Ext4ExtHandleUnwrittenExtentsFtraceEvent dev
             * @property {number|null} [ino] Ext4ExtHandleUnwrittenExtentsFtraceEvent ino
             * @property {number|null} [flags] Ext4ExtHandleUnwrittenExtentsFtraceEvent flags
             * @property {number|null} [lblk] Ext4ExtHandleUnwrittenExtentsFtraceEvent lblk
             * @property {number|null} [pblk] Ext4ExtHandleUnwrittenExtentsFtraceEvent pblk
             * @property {number|null} [len] Ext4ExtHandleUnwrittenExtentsFtraceEvent len
             * @property {number|null} [allocated] Ext4ExtHandleUnwrittenExtentsFtraceEvent allocated
             * @property {number|null} [newblk] Ext4ExtHandleUnwrittenExtentsFtraceEvent newblk
             */

            /**
             * Constructs a new Ext4ExtHandleUnwrittenExtentsFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4ExtHandleUnwrittenExtentsFtraceEvent.
             * @implements IExt4ExtHandleUnwrittenExtentsFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4ExtHandleUnwrittenExtentsFtraceEvent=} [p] Properties to set
             */
            function Ext4ExtHandleUnwrittenExtentsFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4ExtHandleUnwrittenExtentsFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent
             * @instance
             */
            Ext4ExtHandleUnwrittenExtentsFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtHandleUnwrittenExtentsFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent
             * @instance
             */
            Ext4ExtHandleUnwrittenExtentsFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtHandleUnwrittenExtentsFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent
             * @instance
             */
            Ext4ExtHandleUnwrittenExtentsFtraceEvent.prototype.flags = 0;

            /**
             * Ext4ExtHandleUnwrittenExtentsFtraceEvent lblk.
             * @member {number} lblk
             * @memberof perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent
             * @instance
             */
            Ext4ExtHandleUnwrittenExtentsFtraceEvent.prototype.lblk = 0;

            /**
             * Ext4ExtHandleUnwrittenExtentsFtraceEvent pblk.
             * @member {number} pblk
             * @memberof perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent
             * @instance
             */
            Ext4ExtHandleUnwrittenExtentsFtraceEvent.prototype.pblk = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtHandleUnwrittenExtentsFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent
             * @instance
             */
            Ext4ExtHandleUnwrittenExtentsFtraceEvent.prototype.len = 0;

            /**
             * Ext4ExtHandleUnwrittenExtentsFtraceEvent allocated.
             * @member {number} allocated
             * @memberof perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent
             * @instance
             */
            Ext4ExtHandleUnwrittenExtentsFtraceEvent.prototype.allocated = 0;

            /**
             * Ext4ExtHandleUnwrittenExtentsFtraceEvent newblk.
             * @member {number} newblk
             * @memberof perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent
             * @instance
             */
            Ext4ExtHandleUnwrittenExtentsFtraceEvent.prototype.newblk = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new Ext4ExtHandleUnwrittenExtentsFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtHandleUnwrittenExtentsFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent} Ext4ExtHandleUnwrittenExtentsFtraceEvent instance
             */
            Ext4ExtHandleUnwrittenExtentsFtraceEvent.create = function create(properties) {
                return new Ext4ExtHandleUnwrittenExtentsFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4ExtHandleUnwrittenExtentsFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtHandleUnwrittenExtentsFtraceEvent} m Ext4ExtHandleUnwrittenExtentsFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtHandleUnwrittenExtentsFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(24).int32(m.flags);
                if (m.lblk != null && Object.hasOwnProperty.call(m, "lblk"))
                    w.uint32(32).uint32(m.lblk);
                if (m.pblk != null && Object.hasOwnProperty.call(m, "pblk"))
                    w.uint32(40).uint64(m.pblk);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(48).uint32(m.len);
                if (m.allocated != null && Object.hasOwnProperty.call(m, "allocated"))
                    w.uint32(56).uint32(m.allocated);
                if (m.newblk != null && Object.hasOwnProperty.call(m, "newblk"))
                    w.uint32(64).uint64(m.newblk);
                return w;
            };

            /**
             * Encodes the specified Ext4ExtHandleUnwrittenExtentsFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtHandleUnwrittenExtentsFtraceEvent} message Ext4ExtHandleUnwrittenExtentsFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtHandleUnwrittenExtentsFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4ExtHandleUnwrittenExtentsFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent} Ext4ExtHandleUnwrittenExtentsFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtHandleUnwrittenExtentsFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.flags = r.int32();
                        break;
                    case 4:
                        m.lblk = r.uint32();
                        break;
                    case 5:
                        m.pblk = r.uint64();
                        break;
                    case 6:
                        m.len = r.uint32();
                        break;
                    case 7:
                        m.allocated = r.uint32();
                        break;
                    case 8:
                        m.newblk = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4ExtHandleUnwrittenExtentsFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent} Ext4ExtHandleUnwrittenExtentsFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtHandleUnwrittenExtentsFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4ExtHandleUnwrittenExtentsFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4ExtHandleUnwrittenExtentsFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    if (!$util.isInteger(m.lblk))
                        return "lblk: integer expected";
                }
                if (m.pblk != null && m.hasOwnProperty("pblk")) {
                    if (!$util.isInteger(m.pblk) && !(m.pblk && $util.isInteger(m.pblk.low) && $util.isInteger(m.pblk.high)))
                        return "pblk: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.allocated != null && m.hasOwnProperty("allocated")) {
                    if (!$util.isInteger(m.allocated))
                        return "allocated: integer expected";
                }
                if (m.newblk != null && m.hasOwnProperty("newblk")) {
                    if (!$util.isInteger(m.newblk) && !(m.newblk && $util.isInteger(m.newblk.low) && $util.isInteger(m.newblk.high)))
                        return "newblk: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an Ext4ExtHandleUnwrittenExtentsFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent} Ext4ExtHandleUnwrittenExtentsFtraceEvent
             */
            Ext4ExtHandleUnwrittenExtentsFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.flags != null) {
                    m.flags = d.flags | 0;
                }
                if (d.lblk != null) {
                    m.lblk = d.lblk >>> 0;
                }
                if (d.pblk != null) {
                    if ($util.Long)
                        (m.pblk = $util.Long.fromValue(d.pblk)).unsigned = true;
                    else if (typeof d.pblk === "string")
                        m.pblk = parseInt(d.pblk, 10);
                    else if (typeof d.pblk === "number")
                        m.pblk = d.pblk;
                    else if (typeof d.pblk === "object")
                        m.pblk = new $util.LongBits(d.pblk.low >>> 0, d.pblk.high >>> 0).toNumber(true);
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.allocated != null) {
                    m.allocated = d.allocated >>> 0;
                }
                if (d.newblk != null) {
                    if ($util.Long)
                        (m.newblk = $util.Long.fromValue(d.newblk)).unsigned = true;
                    else if (typeof d.newblk === "string")
                        m.newblk = parseInt(d.newblk, 10);
                    else if (typeof d.newblk === "number")
                        m.newblk = d.newblk;
                    else if (typeof d.newblk === "object")
                        m.newblk = new $util.LongBits(d.newblk.low >>> 0, d.newblk.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4ExtHandleUnwrittenExtentsFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent} m Ext4ExtHandleUnwrittenExtentsFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4ExtHandleUnwrittenExtentsFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.flags = 0;
                    d.lblk = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pblk = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pblk = o.longs === String ? "0" : 0;
                    d.len = 0;
                    d.allocated = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.newblk = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.newblk = o.longs === String ? "0" : 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    d.lblk = m.lblk;
                }
                if (m.pblk != null && m.hasOwnProperty("pblk")) {
                    if (typeof m.pblk === "number")
                        d.pblk = o.longs === String ? String(m.pblk) : m.pblk;
                    else
                        d.pblk = o.longs === String ? $util.Long.prototype.toString.call(m.pblk) : o.longs === Number ? new $util.LongBits(m.pblk.low >>> 0, m.pblk.high >>> 0).toNumber(true) : m.pblk;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.allocated != null && m.hasOwnProperty("allocated")) {
                    d.allocated = m.allocated;
                }
                if (m.newblk != null && m.hasOwnProperty("newblk")) {
                    if (typeof m.newblk === "number")
                        d.newblk = o.longs === String ? String(m.newblk) : m.newblk;
                    else
                        d.newblk = o.longs === String ? $util.Long.prototype.toString.call(m.newblk) : o.longs === Number ? new $util.LongBits(m.newblk.low >>> 0, m.newblk.high >>> 0).toNumber(true) : m.newblk;
                }
                return d;
            };

            /**
             * Converts this Ext4ExtHandleUnwrittenExtentsFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4ExtHandleUnwrittenExtentsFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4ExtHandleUnwrittenExtentsFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4ExtHandleUnwrittenExtentsFtraceEvent;
        })();

        protos.Ext4ExtInCacheFtraceEvent = (function() {

            /**
             * Properties of an Ext4ExtInCacheFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4ExtInCacheFtraceEvent
             * @property {number|null} [dev] Ext4ExtInCacheFtraceEvent dev
             * @property {number|null} [ino] Ext4ExtInCacheFtraceEvent ino
             * @property {number|null} [lblk] Ext4ExtInCacheFtraceEvent lblk
             * @property {number|null} [ret] Ext4ExtInCacheFtraceEvent ret
             */

            /**
             * Constructs a new Ext4ExtInCacheFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4ExtInCacheFtraceEvent.
             * @implements IExt4ExtInCacheFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4ExtInCacheFtraceEvent=} [p] Properties to set
             */
            function Ext4ExtInCacheFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4ExtInCacheFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4ExtInCacheFtraceEvent
             * @instance
             */
            Ext4ExtInCacheFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtInCacheFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4ExtInCacheFtraceEvent
             * @instance
             */
            Ext4ExtInCacheFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtInCacheFtraceEvent lblk.
             * @member {number} lblk
             * @memberof perfetto.protos.Ext4ExtInCacheFtraceEvent
             * @instance
             */
            Ext4ExtInCacheFtraceEvent.prototype.lblk = 0;

            /**
             * Ext4ExtInCacheFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.Ext4ExtInCacheFtraceEvent
             * @instance
             */
            Ext4ExtInCacheFtraceEvent.prototype.ret = 0;

            /**
             * Creates a new Ext4ExtInCacheFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4ExtInCacheFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtInCacheFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4ExtInCacheFtraceEvent} Ext4ExtInCacheFtraceEvent instance
             */
            Ext4ExtInCacheFtraceEvent.create = function create(properties) {
                return new Ext4ExtInCacheFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4ExtInCacheFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4ExtInCacheFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4ExtInCacheFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtInCacheFtraceEvent} m Ext4ExtInCacheFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtInCacheFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.lblk != null && Object.hasOwnProperty.call(m, "lblk"))
                    w.uint32(24).uint32(m.lblk);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(32).int32(m.ret);
                return w;
            };

            /**
             * Encodes the specified Ext4ExtInCacheFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4ExtInCacheFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4ExtInCacheFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtInCacheFtraceEvent} message Ext4ExtInCacheFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtInCacheFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4ExtInCacheFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4ExtInCacheFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4ExtInCacheFtraceEvent} Ext4ExtInCacheFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtInCacheFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4ExtInCacheFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.lblk = r.uint32();
                        break;
                    case 4:
                        m.ret = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4ExtInCacheFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4ExtInCacheFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4ExtInCacheFtraceEvent} Ext4ExtInCacheFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtInCacheFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4ExtInCacheFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4ExtInCacheFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4ExtInCacheFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    if (!$util.isInteger(m.lblk))
                        return "lblk: integer expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4ExtInCacheFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4ExtInCacheFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4ExtInCacheFtraceEvent} Ext4ExtInCacheFtraceEvent
             */
            Ext4ExtInCacheFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4ExtInCacheFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4ExtInCacheFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.lblk != null) {
                    m.lblk = d.lblk >>> 0;
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4ExtInCacheFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4ExtInCacheFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4ExtInCacheFtraceEvent} m Ext4ExtInCacheFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4ExtInCacheFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.lblk = 0;
                    d.ret = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    d.lblk = m.lblk;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                return d;
            };

            /**
             * Converts this Ext4ExtInCacheFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4ExtInCacheFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4ExtInCacheFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4ExtInCacheFtraceEvent;
        })();

        protos.Ext4ExtLoadExtentFtraceEvent = (function() {

            /**
             * Properties of an Ext4ExtLoadExtentFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4ExtLoadExtentFtraceEvent
             * @property {number|null} [dev] Ext4ExtLoadExtentFtraceEvent dev
             * @property {number|null} [ino] Ext4ExtLoadExtentFtraceEvent ino
             * @property {number|null} [pblk] Ext4ExtLoadExtentFtraceEvent pblk
             * @property {number|null} [lblk] Ext4ExtLoadExtentFtraceEvent lblk
             */

            /**
             * Constructs a new Ext4ExtLoadExtentFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4ExtLoadExtentFtraceEvent.
             * @implements IExt4ExtLoadExtentFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4ExtLoadExtentFtraceEvent=} [p] Properties to set
             */
            function Ext4ExtLoadExtentFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4ExtLoadExtentFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4ExtLoadExtentFtraceEvent
             * @instance
             */
            Ext4ExtLoadExtentFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtLoadExtentFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4ExtLoadExtentFtraceEvent
             * @instance
             */
            Ext4ExtLoadExtentFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtLoadExtentFtraceEvent pblk.
             * @member {number} pblk
             * @memberof perfetto.protos.Ext4ExtLoadExtentFtraceEvent
             * @instance
             */
            Ext4ExtLoadExtentFtraceEvent.prototype.pblk = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtLoadExtentFtraceEvent lblk.
             * @member {number} lblk
             * @memberof perfetto.protos.Ext4ExtLoadExtentFtraceEvent
             * @instance
             */
            Ext4ExtLoadExtentFtraceEvent.prototype.lblk = 0;

            /**
             * Creates a new Ext4ExtLoadExtentFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4ExtLoadExtentFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtLoadExtentFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4ExtLoadExtentFtraceEvent} Ext4ExtLoadExtentFtraceEvent instance
             */
            Ext4ExtLoadExtentFtraceEvent.create = function create(properties) {
                return new Ext4ExtLoadExtentFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4ExtLoadExtentFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4ExtLoadExtentFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4ExtLoadExtentFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtLoadExtentFtraceEvent} m Ext4ExtLoadExtentFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtLoadExtentFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.pblk != null && Object.hasOwnProperty.call(m, "pblk"))
                    w.uint32(24).uint64(m.pblk);
                if (m.lblk != null && Object.hasOwnProperty.call(m, "lblk"))
                    w.uint32(32).uint32(m.lblk);
                return w;
            };

            /**
             * Encodes the specified Ext4ExtLoadExtentFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4ExtLoadExtentFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4ExtLoadExtentFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtLoadExtentFtraceEvent} message Ext4ExtLoadExtentFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtLoadExtentFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4ExtLoadExtentFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4ExtLoadExtentFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4ExtLoadExtentFtraceEvent} Ext4ExtLoadExtentFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtLoadExtentFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4ExtLoadExtentFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.pblk = r.uint64();
                        break;
                    case 4:
                        m.lblk = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4ExtLoadExtentFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4ExtLoadExtentFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4ExtLoadExtentFtraceEvent} Ext4ExtLoadExtentFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtLoadExtentFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4ExtLoadExtentFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4ExtLoadExtentFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4ExtLoadExtentFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.pblk != null && m.hasOwnProperty("pblk")) {
                    if (!$util.isInteger(m.pblk) && !(m.pblk && $util.isInteger(m.pblk.low) && $util.isInteger(m.pblk.high)))
                        return "pblk: integer|Long expected";
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    if (!$util.isInteger(m.lblk))
                        return "lblk: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4ExtLoadExtentFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4ExtLoadExtentFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4ExtLoadExtentFtraceEvent} Ext4ExtLoadExtentFtraceEvent
             */
            Ext4ExtLoadExtentFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4ExtLoadExtentFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4ExtLoadExtentFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.pblk != null) {
                    if ($util.Long)
                        (m.pblk = $util.Long.fromValue(d.pblk)).unsigned = true;
                    else if (typeof d.pblk === "string")
                        m.pblk = parseInt(d.pblk, 10);
                    else if (typeof d.pblk === "number")
                        m.pblk = d.pblk;
                    else if (typeof d.pblk === "object")
                        m.pblk = new $util.LongBits(d.pblk.low >>> 0, d.pblk.high >>> 0).toNumber(true);
                }
                if (d.lblk != null) {
                    m.lblk = d.lblk >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4ExtLoadExtentFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4ExtLoadExtentFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4ExtLoadExtentFtraceEvent} m Ext4ExtLoadExtentFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4ExtLoadExtentFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pblk = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pblk = o.longs === String ? "0" : 0;
                    d.lblk = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.pblk != null && m.hasOwnProperty("pblk")) {
                    if (typeof m.pblk === "number")
                        d.pblk = o.longs === String ? String(m.pblk) : m.pblk;
                    else
                        d.pblk = o.longs === String ? $util.Long.prototype.toString.call(m.pblk) : o.longs === Number ? new $util.LongBits(m.pblk.low >>> 0, m.pblk.high >>> 0).toNumber(true) : m.pblk;
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    d.lblk = m.lblk;
                }
                return d;
            };

            /**
             * Converts this Ext4ExtLoadExtentFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4ExtLoadExtentFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4ExtLoadExtentFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4ExtLoadExtentFtraceEvent;
        })();

        protos.Ext4ExtMapBlocksEnterFtraceEvent = (function() {

            /**
             * Properties of an Ext4ExtMapBlocksEnterFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4ExtMapBlocksEnterFtraceEvent
             * @property {number|null} [dev] Ext4ExtMapBlocksEnterFtraceEvent dev
             * @property {number|null} [ino] Ext4ExtMapBlocksEnterFtraceEvent ino
             * @property {number|null} [lblk] Ext4ExtMapBlocksEnterFtraceEvent lblk
             * @property {number|null} [len] Ext4ExtMapBlocksEnterFtraceEvent len
             * @property {number|null} [flags] Ext4ExtMapBlocksEnterFtraceEvent flags
             */

            /**
             * Constructs a new Ext4ExtMapBlocksEnterFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4ExtMapBlocksEnterFtraceEvent.
             * @implements IExt4ExtMapBlocksEnterFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4ExtMapBlocksEnterFtraceEvent=} [p] Properties to set
             */
            function Ext4ExtMapBlocksEnterFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4ExtMapBlocksEnterFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent
             * @instance
             */
            Ext4ExtMapBlocksEnterFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtMapBlocksEnterFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent
             * @instance
             */
            Ext4ExtMapBlocksEnterFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtMapBlocksEnterFtraceEvent lblk.
             * @member {number} lblk
             * @memberof perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent
             * @instance
             */
            Ext4ExtMapBlocksEnterFtraceEvent.prototype.lblk = 0;

            /**
             * Ext4ExtMapBlocksEnterFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent
             * @instance
             */
            Ext4ExtMapBlocksEnterFtraceEvent.prototype.len = 0;

            /**
             * Ext4ExtMapBlocksEnterFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent
             * @instance
             */
            Ext4ExtMapBlocksEnterFtraceEvent.prototype.flags = 0;

            /**
             * Creates a new Ext4ExtMapBlocksEnterFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtMapBlocksEnterFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent} Ext4ExtMapBlocksEnterFtraceEvent instance
             */
            Ext4ExtMapBlocksEnterFtraceEvent.create = function create(properties) {
                return new Ext4ExtMapBlocksEnterFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4ExtMapBlocksEnterFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtMapBlocksEnterFtraceEvent} m Ext4ExtMapBlocksEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtMapBlocksEnterFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.lblk != null && Object.hasOwnProperty.call(m, "lblk"))
                    w.uint32(24).uint32(m.lblk);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).uint32(m.len);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(40).uint32(m.flags);
                return w;
            };

            /**
             * Encodes the specified Ext4ExtMapBlocksEnterFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtMapBlocksEnterFtraceEvent} message Ext4ExtMapBlocksEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtMapBlocksEnterFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4ExtMapBlocksEnterFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent} Ext4ExtMapBlocksEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtMapBlocksEnterFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.lblk = r.uint32();
                        break;
                    case 4:
                        m.len = r.uint32();
                        break;
                    case 5:
                        m.flags = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4ExtMapBlocksEnterFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent} Ext4ExtMapBlocksEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtMapBlocksEnterFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4ExtMapBlocksEnterFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4ExtMapBlocksEnterFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    if (!$util.isInteger(m.lblk))
                        return "lblk: integer expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4ExtMapBlocksEnterFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent} Ext4ExtMapBlocksEnterFtraceEvent
             */
            Ext4ExtMapBlocksEnterFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.lblk != null) {
                    m.lblk = d.lblk >>> 0;
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4ExtMapBlocksEnterFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent} m Ext4ExtMapBlocksEnterFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4ExtMapBlocksEnterFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.lblk = 0;
                    d.len = 0;
                    d.flags = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    d.lblk = m.lblk;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                return d;
            };

            /**
             * Converts this Ext4ExtMapBlocksEnterFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4ExtMapBlocksEnterFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4ExtMapBlocksEnterFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4ExtMapBlocksEnterFtraceEvent;
        })();

        protos.Ext4ExtMapBlocksExitFtraceEvent = (function() {

            /**
             * Properties of an Ext4ExtMapBlocksExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4ExtMapBlocksExitFtraceEvent
             * @property {number|null} [dev] Ext4ExtMapBlocksExitFtraceEvent dev
             * @property {number|null} [ino] Ext4ExtMapBlocksExitFtraceEvent ino
             * @property {number|null} [flags] Ext4ExtMapBlocksExitFtraceEvent flags
             * @property {number|null} [pblk] Ext4ExtMapBlocksExitFtraceEvent pblk
             * @property {number|null} [lblk] Ext4ExtMapBlocksExitFtraceEvent lblk
             * @property {number|null} [len] Ext4ExtMapBlocksExitFtraceEvent len
             * @property {number|null} [mflags] Ext4ExtMapBlocksExitFtraceEvent mflags
             * @property {number|null} [ret] Ext4ExtMapBlocksExitFtraceEvent ret
             */

            /**
             * Constructs a new Ext4ExtMapBlocksExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4ExtMapBlocksExitFtraceEvent.
             * @implements IExt4ExtMapBlocksExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4ExtMapBlocksExitFtraceEvent=} [p] Properties to set
             */
            function Ext4ExtMapBlocksExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4ExtMapBlocksExitFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent
             * @instance
             */
            Ext4ExtMapBlocksExitFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtMapBlocksExitFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent
             * @instance
             */
            Ext4ExtMapBlocksExitFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtMapBlocksExitFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent
             * @instance
             */
            Ext4ExtMapBlocksExitFtraceEvent.prototype.flags = 0;

            /**
             * Ext4ExtMapBlocksExitFtraceEvent pblk.
             * @member {number} pblk
             * @memberof perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent
             * @instance
             */
            Ext4ExtMapBlocksExitFtraceEvent.prototype.pblk = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtMapBlocksExitFtraceEvent lblk.
             * @member {number} lblk
             * @memberof perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent
             * @instance
             */
            Ext4ExtMapBlocksExitFtraceEvent.prototype.lblk = 0;

            /**
             * Ext4ExtMapBlocksExitFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent
             * @instance
             */
            Ext4ExtMapBlocksExitFtraceEvent.prototype.len = 0;

            /**
             * Ext4ExtMapBlocksExitFtraceEvent mflags.
             * @member {number} mflags
             * @memberof perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent
             * @instance
             */
            Ext4ExtMapBlocksExitFtraceEvent.prototype.mflags = 0;

            /**
             * Ext4ExtMapBlocksExitFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent
             * @instance
             */
            Ext4ExtMapBlocksExitFtraceEvent.prototype.ret = 0;

            /**
             * Creates a new Ext4ExtMapBlocksExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtMapBlocksExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent} Ext4ExtMapBlocksExitFtraceEvent instance
             */
            Ext4ExtMapBlocksExitFtraceEvent.create = function create(properties) {
                return new Ext4ExtMapBlocksExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4ExtMapBlocksExitFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtMapBlocksExitFtraceEvent} m Ext4ExtMapBlocksExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtMapBlocksExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(24).uint32(m.flags);
                if (m.pblk != null && Object.hasOwnProperty.call(m, "pblk"))
                    w.uint32(32).uint64(m.pblk);
                if (m.lblk != null && Object.hasOwnProperty.call(m, "lblk"))
                    w.uint32(40).uint32(m.lblk);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(48).uint32(m.len);
                if (m.mflags != null && Object.hasOwnProperty.call(m, "mflags"))
                    w.uint32(56).uint32(m.mflags);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(64).int32(m.ret);
                return w;
            };

            /**
             * Encodes the specified Ext4ExtMapBlocksExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtMapBlocksExitFtraceEvent} message Ext4ExtMapBlocksExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtMapBlocksExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4ExtMapBlocksExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent} Ext4ExtMapBlocksExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtMapBlocksExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.flags = r.uint32();
                        break;
                    case 4:
                        m.pblk = r.uint64();
                        break;
                    case 5:
                        m.lblk = r.uint32();
                        break;
                    case 6:
                        m.len = r.uint32();
                        break;
                    case 7:
                        m.mflags = r.uint32();
                        break;
                    case 8:
                        m.ret = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4ExtMapBlocksExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent} Ext4ExtMapBlocksExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtMapBlocksExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4ExtMapBlocksExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4ExtMapBlocksExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.pblk != null && m.hasOwnProperty("pblk")) {
                    if (!$util.isInteger(m.pblk) && !(m.pblk && $util.isInteger(m.pblk.low) && $util.isInteger(m.pblk.high)))
                        return "pblk: integer|Long expected";
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    if (!$util.isInteger(m.lblk))
                        return "lblk: integer expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.mflags != null && m.hasOwnProperty("mflags")) {
                    if (!$util.isInteger(m.mflags))
                        return "mflags: integer expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4ExtMapBlocksExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent} Ext4ExtMapBlocksExitFtraceEvent
             */
            Ext4ExtMapBlocksExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                if (d.pblk != null) {
                    if ($util.Long)
                        (m.pblk = $util.Long.fromValue(d.pblk)).unsigned = true;
                    else if (typeof d.pblk === "string")
                        m.pblk = parseInt(d.pblk, 10);
                    else if (typeof d.pblk === "number")
                        m.pblk = d.pblk;
                    else if (typeof d.pblk === "object")
                        m.pblk = new $util.LongBits(d.pblk.low >>> 0, d.pblk.high >>> 0).toNumber(true);
                }
                if (d.lblk != null) {
                    m.lblk = d.lblk >>> 0;
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.mflags != null) {
                    m.mflags = d.mflags >>> 0;
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4ExtMapBlocksExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent} m Ext4ExtMapBlocksExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4ExtMapBlocksExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.flags = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pblk = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pblk = o.longs === String ? "0" : 0;
                    d.lblk = 0;
                    d.len = 0;
                    d.mflags = 0;
                    d.ret = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.pblk != null && m.hasOwnProperty("pblk")) {
                    if (typeof m.pblk === "number")
                        d.pblk = o.longs === String ? String(m.pblk) : m.pblk;
                    else
                        d.pblk = o.longs === String ? $util.Long.prototype.toString.call(m.pblk) : o.longs === Number ? new $util.LongBits(m.pblk.low >>> 0, m.pblk.high >>> 0).toNumber(true) : m.pblk;
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    d.lblk = m.lblk;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.mflags != null && m.hasOwnProperty("mflags")) {
                    d.mflags = m.mflags;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                return d;
            };

            /**
             * Converts this Ext4ExtMapBlocksExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4ExtMapBlocksExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4ExtMapBlocksExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4ExtMapBlocksExitFtraceEvent;
        })();

        protos.Ext4ExtPutInCacheFtraceEvent = (function() {

            /**
             * Properties of an Ext4ExtPutInCacheFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4ExtPutInCacheFtraceEvent
             * @property {number|null} [dev] Ext4ExtPutInCacheFtraceEvent dev
             * @property {number|null} [ino] Ext4ExtPutInCacheFtraceEvent ino
             * @property {number|null} [lblk] Ext4ExtPutInCacheFtraceEvent lblk
             * @property {number|null} [len] Ext4ExtPutInCacheFtraceEvent len
             * @property {number|null} [start] Ext4ExtPutInCacheFtraceEvent start
             */

            /**
             * Constructs a new Ext4ExtPutInCacheFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4ExtPutInCacheFtraceEvent.
             * @implements IExt4ExtPutInCacheFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4ExtPutInCacheFtraceEvent=} [p] Properties to set
             */
            function Ext4ExtPutInCacheFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4ExtPutInCacheFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4ExtPutInCacheFtraceEvent
             * @instance
             */
            Ext4ExtPutInCacheFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtPutInCacheFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4ExtPutInCacheFtraceEvent
             * @instance
             */
            Ext4ExtPutInCacheFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtPutInCacheFtraceEvent lblk.
             * @member {number} lblk
             * @memberof perfetto.protos.Ext4ExtPutInCacheFtraceEvent
             * @instance
             */
            Ext4ExtPutInCacheFtraceEvent.prototype.lblk = 0;

            /**
             * Ext4ExtPutInCacheFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4ExtPutInCacheFtraceEvent
             * @instance
             */
            Ext4ExtPutInCacheFtraceEvent.prototype.len = 0;

            /**
             * Ext4ExtPutInCacheFtraceEvent start.
             * @member {number} start
             * @memberof perfetto.protos.Ext4ExtPutInCacheFtraceEvent
             * @instance
             */
            Ext4ExtPutInCacheFtraceEvent.prototype.start = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new Ext4ExtPutInCacheFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4ExtPutInCacheFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtPutInCacheFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4ExtPutInCacheFtraceEvent} Ext4ExtPutInCacheFtraceEvent instance
             */
            Ext4ExtPutInCacheFtraceEvent.create = function create(properties) {
                return new Ext4ExtPutInCacheFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4ExtPutInCacheFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4ExtPutInCacheFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4ExtPutInCacheFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtPutInCacheFtraceEvent} m Ext4ExtPutInCacheFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtPutInCacheFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.lblk != null && Object.hasOwnProperty.call(m, "lblk"))
                    w.uint32(24).uint32(m.lblk);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).uint32(m.len);
                if (m.start != null && Object.hasOwnProperty.call(m, "start"))
                    w.uint32(40).uint64(m.start);
                return w;
            };

            /**
             * Encodes the specified Ext4ExtPutInCacheFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4ExtPutInCacheFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4ExtPutInCacheFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtPutInCacheFtraceEvent} message Ext4ExtPutInCacheFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtPutInCacheFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4ExtPutInCacheFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4ExtPutInCacheFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4ExtPutInCacheFtraceEvent} Ext4ExtPutInCacheFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtPutInCacheFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4ExtPutInCacheFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.lblk = r.uint32();
                        break;
                    case 4:
                        m.len = r.uint32();
                        break;
                    case 5:
                        m.start = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4ExtPutInCacheFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4ExtPutInCacheFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4ExtPutInCacheFtraceEvent} Ext4ExtPutInCacheFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtPutInCacheFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4ExtPutInCacheFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4ExtPutInCacheFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4ExtPutInCacheFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    if (!$util.isInteger(m.lblk))
                        return "lblk: integer expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.start != null && m.hasOwnProperty("start")) {
                    if (!$util.isInteger(m.start) && !(m.start && $util.isInteger(m.start.low) && $util.isInteger(m.start.high)))
                        return "start: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an Ext4ExtPutInCacheFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4ExtPutInCacheFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4ExtPutInCacheFtraceEvent} Ext4ExtPutInCacheFtraceEvent
             */
            Ext4ExtPutInCacheFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4ExtPutInCacheFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4ExtPutInCacheFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.lblk != null) {
                    m.lblk = d.lblk >>> 0;
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.start != null) {
                    if ($util.Long)
                        (m.start = $util.Long.fromValue(d.start)).unsigned = true;
                    else if (typeof d.start === "string")
                        m.start = parseInt(d.start, 10);
                    else if (typeof d.start === "number")
                        m.start = d.start;
                    else if (typeof d.start === "object")
                        m.start = new $util.LongBits(d.start.low >>> 0, d.start.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4ExtPutInCacheFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4ExtPutInCacheFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4ExtPutInCacheFtraceEvent} m Ext4ExtPutInCacheFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4ExtPutInCacheFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.lblk = 0;
                    d.len = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.start = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.start = o.longs === String ? "0" : 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    d.lblk = m.lblk;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.start != null && m.hasOwnProperty("start")) {
                    if (typeof m.start === "number")
                        d.start = o.longs === String ? String(m.start) : m.start;
                    else
                        d.start = o.longs === String ? $util.Long.prototype.toString.call(m.start) : o.longs === Number ? new $util.LongBits(m.start.low >>> 0, m.start.high >>> 0).toNumber(true) : m.start;
                }
                return d;
            };

            /**
             * Converts this Ext4ExtPutInCacheFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4ExtPutInCacheFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4ExtPutInCacheFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4ExtPutInCacheFtraceEvent;
        })();

        protos.Ext4ExtRemoveSpaceFtraceEvent = (function() {

            /**
             * Properties of an Ext4ExtRemoveSpaceFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4ExtRemoveSpaceFtraceEvent
             * @property {number|null} [dev] Ext4ExtRemoveSpaceFtraceEvent dev
             * @property {number|null} [ino] Ext4ExtRemoveSpaceFtraceEvent ino
             * @property {number|null} [start] Ext4ExtRemoveSpaceFtraceEvent start
             * @property {number|null} [end] Ext4ExtRemoveSpaceFtraceEvent end
             * @property {number|null} [depth] Ext4ExtRemoveSpaceFtraceEvent depth
             */

            /**
             * Constructs a new Ext4ExtRemoveSpaceFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4ExtRemoveSpaceFtraceEvent.
             * @implements IExt4ExtRemoveSpaceFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4ExtRemoveSpaceFtraceEvent=} [p] Properties to set
             */
            function Ext4ExtRemoveSpaceFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4ExtRemoveSpaceFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent
             * @instance
             */
            Ext4ExtRemoveSpaceFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtRemoveSpaceFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent
             * @instance
             */
            Ext4ExtRemoveSpaceFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtRemoveSpaceFtraceEvent start.
             * @member {number} start
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent
             * @instance
             */
            Ext4ExtRemoveSpaceFtraceEvent.prototype.start = 0;

            /**
             * Ext4ExtRemoveSpaceFtraceEvent end.
             * @member {number} end
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent
             * @instance
             */
            Ext4ExtRemoveSpaceFtraceEvent.prototype.end = 0;

            /**
             * Ext4ExtRemoveSpaceFtraceEvent depth.
             * @member {number} depth
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent
             * @instance
             */
            Ext4ExtRemoveSpaceFtraceEvent.prototype.depth = 0;

            /**
             * Creates a new Ext4ExtRemoveSpaceFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtRemoveSpaceFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent} Ext4ExtRemoveSpaceFtraceEvent instance
             */
            Ext4ExtRemoveSpaceFtraceEvent.create = function create(properties) {
                return new Ext4ExtRemoveSpaceFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4ExtRemoveSpaceFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtRemoveSpaceFtraceEvent} m Ext4ExtRemoveSpaceFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtRemoveSpaceFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.start != null && Object.hasOwnProperty.call(m, "start"))
                    w.uint32(24).uint32(m.start);
                if (m.end != null && Object.hasOwnProperty.call(m, "end"))
                    w.uint32(32).uint32(m.end);
                if (m.depth != null && Object.hasOwnProperty.call(m, "depth"))
                    w.uint32(40).int32(m.depth);
                return w;
            };

            /**
             * Encodes the specified Ext4ExtRemoveSpaceFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtRemoveSpaceFtraceEvent} message Ext4ExtRemoveSpaceFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtRemoveSpaceFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4ExtRemoveSpaceFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent} Ext4ExtRemoveSpaceFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtRemoveSpaceFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.start = r.uint32();
                        break;
                    case 4:
                        m.end = r.uint32();
                        break;
                    case 5:
                        m.depth = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4ExtRemoveSpaceFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent} Ext4ExtRemoveSpaceFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtRemoveSpaceFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4ExtRemoveSpaceFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4ExtRemoveSpaceFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.start != null && m.hasOwnProperty("start")) {
                    if (!$util.isInteger(m.start))
                        return "start: integer expected";
                }
                if (m.end != null && m.hasOwnProperty("end")) {
                    if (!$util.isInteger(m.end))
                        return "end: integer expected";
                }
                if (m.depth != null && m.hasOwnProperty("depth")) {
                    if (!$util.isInteger(m.depth))
                        return "depth: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4ExtRemoveSpaceFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent} Ext4ExtRemoveSpaceFtraceEvent
             */
            Ext4ExtRemoveSpaceFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.start != null) {
                    m.start = d.start >>> 0;
                }
                if (d.end != null) {
                    m.end = d.end >>> 0;
                }
                if (d.depth != null) {
                    m.depth = d.depth | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4ExtRemoveSpaceFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent} m Ext4ExtRemoveSpaceFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4ExtRemoveSpaceFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.start = 0;
                    d.end = 0;
                    d.depth = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.start != null && m.hasOwnProperty("start")) {
                    d.start = m.start;
                }
                if (m.end != null && m.hasOwnProperty("end")) {
                    d.end = m.end;
                }
                if (m.depth != null && m.hasOwnProperty("depth")) {
                    d.depth = m.depth;
                }
                return d;
            };

            /**
             * Converts this Ext4ExtRemoveSpaceFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4ExtRemoveSpaceFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4ExtRemoveSpaceFtraceEvent;
        })();

        protos.Ext4ExtRemoveSpaceDoneFtraceEvent = (function() {

            /**
             * Properties of an Ext4ExtRemoveSpaceDoneFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4ExtRemoveSpaceDoneFtraceEvent
             * @property {number|null} [dev] Ext4ExtRemoveSpaceDoneFtraceEvent dev
             * @property {number|null} [ino] Ext4ExtRemoveSpaceDoneFtraceEvent ino
             * @property {number|null} [start] Ext4ExtRemoveSpaceDoneFtraceEvent start
             * @property {number|null} [end] Ext4ExtRemoveSpaceDoneFtraceEvent end
             * @property {number|null} [depth] Ext4ExtRemoveSpaceDoneFtraceEvent depth
             * @property {number|null} [partial] Ext4ExtRemoveSpaceDoneFtraceEvent partial
             * @property {number|null} [ehEntries] Ext4ExtRemoveSpaceDoneFtraceEvent ehEntries
             * @property {number|null} [pcLblk] Ext4ExtRemoveSpaceDoneFtraceEvent pcLblk
             * @property {number|null} [pcPclu] Ext4ExtRemoveSpaceDoneFtraceEvent pcPclu
             * @property {number|null} [pcState] Ext4ExtRemoveSpaceDoneFtraceEvent pcState
             */

            /**
             * Constructs a new Ext4ExtRemoveSpaceDoneFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4ExtRemoveSpaceDoneFtraceEvent.
             * @implements IExt4ExtRemoveSpaceDoneFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4ExtRemoveSpaceDoneFtraceEvent=} [p] Properties to set
             */
            function Ext4ExtRemoveSpaceDoneFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4ExtRemoveSpaceDoneFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent
             * @instance
             */
            Ext4ExtRemoveSpaceDoneFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtRemoveSpaceDoneFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent
             * @instance
             */
            Ext4ExtRemoveSpaceDoneFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtRemoveSpaceDoneFtraceEvent start.
             * @member {number} start
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent
             * @instance
             */
            Ext4ExtRemoveSpaceDoneFtraceEvent.prototype.start = 0;

            /**
             * Ext4ExtRemoveSpaceDoneFtraceEvent end.
             * @member {number} end
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent
             * @instance
             */
            Ext4ExtRemoveSpaceDoneFtraceEvent.prototype.end = 0;

            /**
             * Ext4ExtRemoveSpaceDoneFtraceEvent depth.
             * @member {number} depth
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent
             * @instance
             */
            Ext4ExtRemoveSpaceDoneFtraceEvent.prototype.depth = 0;

            /**
             * Ext4ExtRemoveSpaceDoneFtraceEvent partial.
             * @member {number} partial
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent
             * @instance
             */
            Ext4ExtRemoveSpaceDoneFtraceEvent.prototype.partial = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4ExtRemoveSpaceDoneFtraceEvent ehEntries.
             * @member {number} ehEntries
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent
             * @instance
             */
            Ext4ExtRemoveSpaceDoneFtraceEvent.prototype.ehEntries = 0;

            /**
             * Ext4ExtRemoveSpaceDoneFtraceEvent pcLblk.
             * @member {number} pcLblk
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent
             * @instance
             */
            Ext4ExtRemoveSpaceDoneFtraceEvent.prototype.pcLblk = 0;

            /**
             * Ext4ExtRemoveSpaceDoneFtraceEvent pcPclu.
             * @member {number} pcPclu
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent
             * @instance
             */
            Ext4ExtRemoveSpaceDoneFtraceEvent.prototype.pcPclu = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtRemoveSpaceDoneFtraceEvent pcState.
             * @member {number} pcState
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent
             * @instance
             */
            Ext4ExtRemoveSpaceDoneFtraceEvent.prototype.pcState = 0;

            /**
             * Creates a new Ext4ExtRemoveSpaceDoneFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtRemoveSpaceDoneFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent} Ext4ExtRemoveSpaceDoneFtraceEvent instance
             */
            Ext4ExtRemoveSpaceDoneFtraceEvent.create = function create(properties) {
                return new Ext4ExtRemoveSpaceDoneFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4ExtRemoveSpaceDoneFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtRemoveSpaceDoneFtraceEvent} m Ext4ExtRemoveSpaceDoneFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtRemoveSpaceDoneFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.start != null && Object.hasOwnProperty.call(m, "start"))
                    w.uint32(24).uint32(m.start);
                if (m.end != null && Object.hasOwnProperty.call(m, "end"))
                    w.uint32(32).uint32(m.end);
                if (m.depth != null && Object.hasOwnProperty.call(m, "depth"))
                    w.uint32(40).int32(m.depth);
                if (m.partial != null && Object.hasOwnProperty.call(m, "partial"))
                    w.uint32(48).int64(m.partial);
                if (m.ehEntries != null && Object.hasOwnProperty.call(m, "ehEntries"))
                    w.uint32(56).uint32(m.ehEntries);
                if (m.pcLblk != null && Object.hasOwnProperty.call(m, "pcLblk"))
                    w.uint32(64).uint32(m.pcLblk);
                if (m.pcPclu != null && Object.hasOwnProperty.call(m, "pcPclu"))
                    w.uint32(72).uint64(m.pcPclu);
                if (m.pcState != null && Object.hasOwnProperty.call(m, "pcState"))
                    w.uint32(80).int32(m.pcState);
                return w;
            };

            /**
             * Encodes the specified Ext4ExtRemoveSpaceDoneFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtRemoveSpaceDoneFtraceEvent} message Ext4ExtRemoveSpaceDoneFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtRemoveSpaceDoneFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4ExtRemoveSpaceDoneFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent} Ext4ExtRemoveSpaceDoneFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtRemoveSpaceDoneFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.start = r.uint32();
                        break;
                    case 4:
                        m.end = r.uint32();
                        break;
                    case 5:
                        m.depth = r.int32();
                        break;
                    case 6:
                        m.partial = r.int64();
                        break;
                    case 7:
                        m.ehEntries = r.uint32();
                        break;
                    case 8:
                        m.pcLblk = r.uint32();
                        break;
                    case 9:
                        m.pcPclu = r.uint64();
                        break;
                    case 10:
                        m.pcState = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4ExtRemoveSpaceDoneFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent} Ext4ExtRemoveSpaceDoneFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtRemoveSpaceDoneFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4ExtRemoveSpaceDoneFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4ExtRemoveSpaceDoneFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.start != null && m.hasOwnProperty("start")) {
                    if (!$util.isInteger(m.start))
                        return "start: integer expected";
                }
                if (m.end != null && m.hasOwnProperty("end")) {
                    if (!$util.isInteger(m.end))
                        return "end: integer expected";
                }
                if (m.depth != null && m.hasOwnProperty("depth")) {
                    if (!$util.isInteger(m.depth))
                        return "depth: integer expected";
                }
                if (m.partial != null && m.hasOwnProperty("partial")) {
                    if (!$util.isInteger(m.partial) && !(m.partial && $util.isInteger(m.partial.low) && $util.isInteger(m.partial.high)))
                        return "partial: integer|Long expected";
                }
                if (m.ehEntries != null && m.hasOwnProperty("ehEntries")) {
                    if (!$util.isInteger(m.ehEntries))
                        return "ehEntries: integer expected";
                }
                if (m.pcLblk != null && m.hasOwnProperty("pcLblk")) {
                    if (!$util.isInteger(m.pcLblk))
                        return "pcLblk: integer expected";
                }
                if (m.pcPclu != null && m.hasOwnProperty("pcPclu")) {
                    if (!$util.isInteger(m.pcPclu) && !(m.pcPclu && $util.isInteger(m.pcPclu.low) && $util.isInteger(m.pcPclu.high)))
                        return "pcPclu: integer|Long expected";
                }
                if (m.pcState != null && m.hasOwnProperty("pcState")) {
                    if (!$util.isInteger(m.pcState))
                        return "pcState: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4ExtRemoveSpaceDoneFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent} Ext4ExtRemoveSpaceDoneFtraceEvent
             */
            Ext4ExtRemoveSpaceDoneFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.start != null) {
                    m.start = d.start >>> 0;
                }
                if (d.end != null) {
                    m.end = d.end >>> 0;
                }
                if (d.depth != null) {
                    m.depth = d.depth | 0;
                }
                if (d.partial != null) {
                    if ($util.Long)
                        (m.partial = $util.Long.fromValue(d.partial)).unsigned = false;
                    else if (typeof d.partial === "string")
                        m.partial = parseInt(d.partial, 10);
                    else if (typeof d.partial === "number")
                        m.partial = d.partial;
                    else if (typeof d.partial === "object")
                        m.partial = new $util.LongBits(d.partial.low >>> 0, d.partial.high >>> 0).toNumber();
                }
                if (d.ehEntries != null) {
                    m.ehEntries = d.ehEntries >>> 0;
                }
                if (d.pcLblk != null) {
                    m.pcLblk = d.pcLblk >>> 0;
                }
                if (d.pcPclu != null) {
                    if ($util.Long)
                        (m.pcPclu = $util.Long.fromValue(d.pcPclu)).unsigned = true;
                    else if (typeof d.pcPclu === "string")
                        m.pcPclu = parseInt(d.pcPclu, 10);
                    else if (typeof d.pcPclu === "number")
                        m.pcPclu = d.pcPclu;
                    else if (typeof d.pcPclu === "object")
                        m.pcPclu = new $util.LongBits(d.pcPclu.low >>> 0, d.pcPclu.high >>> 0).toNumber(true);
                }
                if (d.pcState != null) {
                    m.pcState = d.pcState | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4ExtRemoveSpaceDoneFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent} m Ext4ExtRemoveSpaceDoneFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4ExtRemoveSpaceDoneFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.start = 0;
                    d.end = 0;
                    d.depth = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.partial = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.partial = o.longs === String ? "0" : 0;
                    d.ehEntries = 0;
                    d.pcLblk = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pcPclu = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pcPclu = o.longs === String ? "0" : 0;
                    d.pcState = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.start != null && m.hasOwnProperty("start")) {
                    d.start = m.start;
                }
                if (m.end != null && m.hasOwnProperty("end")) {
                    d.end = m.end;
                }
                if (m.depth != null && m.hasOwnProperty("depth")) {
                    d.depth = m.depth;
                }
                if (m.partial != null && m.hasOwnProperty("partial")) {
                    if (typeof m.partial === "number")
                        d.partial = o.longs === String ? String(m.partial) : m.partial;
                    else
                        d.partial = o.longs === String ? $util.Long.prototype.toString.call(m.partial) : o.longs === Number ? new $util.LongBits(m.partial.low >>> 0, m.partial.high >>> 0).toNumber() : m.partial;
                }
                if (m.ehEntries != null && m.hasOwnProperty("ehEntries")) {
                    d.ehEntries = m.ehEntries;
                }
                if (m.pcLblk != null && m.hasOwnProperty("pcLblk")) {
                    d.pcLblk = m.pcLblk;
                }
                if (m.pcPclu != null && m.hasOwnProperty("pcPclu")) {
                    if (typeof m.pcPclu === "number")
                        d.pcPclu = o.longs === String ? String(m.pcPclu) : m.pcPclu;
                    else
                        d.pcPclu = o.longs === String ? $util.Long.prototype.toString.call(m.pcPclu) : o.longs === Number ? new $util.LongBits(m.pcPclu.low >>> 0, m.pcPclu.high >>> 0).toNumber(true) : m.pcPclu;
                }
                if (m.pcState != null && m.hasOwnProperty("pcState")) {
                    d.pcState = m.pcState;
                }
                return d;
            };

            /**
             * Converts this Ext4ExtRemoveSpaceDoneFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4ExtRemoveSpaceDoneFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4ExtRemoveSpaceDoneFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4ExtRemoveSpaceDoneFtraceEvent;
        })();

        protos.Ext4ExtRmIdxFtraceEvent = (function() {

            /**
             * Properties of an Ext4ExtRmIdxFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4ExtRmIdxFtraceEvent
             * @property {number|null} [dev] Ext4ExtRmIdxFtraceEvent dev
             * @property {number|null} [ino] Ext4ExtRmIdxFtraceEvent ino
             * @property {number|null} [pblk] Ext4ExtRmIdxFtraceEvent pblk
             */

            /**
             * Constructs a new Ext4ExtRmIdxFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4ExtRmIdxFtraceEvent.
             * @implements IExt4ExtRmIdxFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4ExtRmIdxFtraceEvent=} [p] Properties to set
             */
            function Ext4ExtRmIdxFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4ExtRmIdxFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4ExtRmIdxFtraceEvent
             * @instance
             */
            Ext4ExtRmIdxFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtRmIdxFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4ExtRmIdxFtraceEvent
             * @instance
             */
            Ext4ExtRmIdxFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtRmIdxFtraceEvent pblk.
             * @member {number} pblk
             * @memberof perfetto.protos.Ext4ExtRmIdxFtraceEvent
             * @instance
             */
            Ext4ExtRmIdxFtraceEvent.prototype.pblk = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new Ext4ExtRmIdxFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4ExtRmIdxFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtRmIdxFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4ExtRmIdxFtraceEvent} Ext4ExtRmIdxFtraceEvent instance
             */
            Ext4ExtRmIdxFtraceEvent.create = function create(properties) {
                return new Ext4ExtRmIdxFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4ExtRmIdxFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4ExtRmIdxFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4ExtRmIdxFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtRmIdxFtraceEvent} m Ext4ExtRmIdxFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtRmIdxFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.pblk != null && Object.hasOwnProperty.call(m, "pblk"))
                    w.uint32(24).uint64(m.pblk);
                return w;
            };

            /**
             * Encodes the specified Ext4ExtRmIdxFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4ExtRmIdxFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4ExtRmIdxFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtRmIdxFtraceEvent} message Ext4ExtRmIdxFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtRmIdxFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4ExtRmIdxFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4ExtRmIdxFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4ExtRmIdxFtraceEvent} Ext4ExtRmIdxFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtRmIdxFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4ExtRmIdxFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.pblk = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4ExtRmIdxFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4ExtRmIdxFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4ExtRmIdxFtraceEvent} Ext4ExtRmIdxFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtRmIdxFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4ExtRmIdxFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4ExtRmIdxFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4ExtRmIdxFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.pblk != null && m.hasOwnProperty("pblk")) {
                    if (!$util.isInteger(m.pblk) && !(m.pblk && $util.isInteger(m.pblk.low) && $util.isInteger(m.pblk.high)))
                        return "pblk: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an Ext4ExtRmIdxFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4ExtRmIdxFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4ExtRmIdxFtraceEvent} Ext4ExtRmIdxFtraceEvent
             */
            Ext4ExtRmIdxFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4ExtRmIdxFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4ExtRmIdxFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.pblk != null) {
                    if ($util.Long)
                        (m.pblk = $util.Long.fromValue(d.pblk)).unsigned = true;
                    else if (typeof d.pblk === "string")
                        m.pblk = parseInt(d.pblk, 10);
                    else if (typeof d.pblk === "number")
                        m.pblk = d.pblk;
                    else if (typeof d.pblk === "object")
                        m.pblk = new $util.LongBits(d.pblk.low >>> 0, d.pblk.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4ExtRmIdxFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4ExtRmIdxFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4ExtRmIdxFtraceEvent} m Ext4ExtRmIdxFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4ExtRmIdxFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pblk = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pblk = o.longs === String ? "0" : 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.pblk != null && m.hasOwnProperty("pblk")) {
                    if (typeof m.pblk === "number")
                        d.pblk = o.longs === String ? String(m.pblk) : m.pblk;
                    else
                        d.pblk = o.longs === String ? $util.Long.prototype.toString.call(m.pblk) : o.longs === Number ? new $util.LongBits(m.pblk.low >>> 0, m.pblk.high >>> 0).toNumber(true) : m.pblk;
                }
                return d;
            };

            /**
             * Converts this Ext4ExtRmIdxFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4ExtRmIdxFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4ExtRmIdxFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4ExtRmIdxFtraceEvent;
        })();

        protos.Ext4ExtRmLeafFtraceEvent = (function() {

            /**
             * Properties of an Ext4ExtRmLeafFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4ExtRmLeafFtraceEvent
             * @property {number|null} [dev] Ext4ExtRmLeafFtraceEvent dev
             * @property {number|null} [ino] Ext4ExtRmLeafFtraceEvent ino
             * @property {number|null} [partial] Ext4ExtRmLeafFtraceEvent partial
             * @property {number|null} [start] Ext4ExtRmLeafFtraceEvent start
             * @property {number|null} [eeLblk] Ext4ExtRmLeafFtraceEvent eeLblk
             * @property {number|null} [eePblk] Ext4ExtRmLeafFtraceEvent eePblk
             * @property {number|null} [eeLen] Ext4ExtRmLeafFtraceEvent eeLen
             * @property {number|null} [pcLblk] Ext4ExtRmLeafFtraceEvent pcLblk
             * @property {number|null} [pcPclu] Ext4ExtRmLeafFtraceEvent pcPclu
             * @property {number|null} [pcState] Ext4ExtRmLeafFtraceEvent pcState
             */

            /**
             * Constructs a new Ext4ExtRmLeafFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4ExtRmLeafFtraceEvent.
             * @implements IExt4ExtRmLeafFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4ExtRmLeafFtraceEvent=} [p] Properties to set
             */
            function Ext4ExtRmLeafFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4ExtRmLeafFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4ExtRmLeafFtraceEvent
             * @instance
             */
            Ext4ExtRmLeafFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtRmLeafFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4ExtRmLeafFtraceEvent
             * @instance
             */
            Ext4ExtRmLeafFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtRmLeafFtraceEvent partial.
             * @member {number} partial
             * @memberof perfetto.protos.Ext4ExtRmLeafFtraceEvent
             * @instance
             */
            Ext4ExtRmLeafFtraceEvent.prototype.partial = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4ExtRmLeafFtraceEvent start.
             * @member {number} start
             * @memberof perfetto.protos.Ext4ExtRmLeafFtraceEvent
             * @instance
             */
            Ext4ExtRmLeafFtraceEvent.prototype.start = 0;

            /**
             * Ext4ExtRmLeafFtraceEvent eeLblk.
             * @member {number} eeLblk
             * @memberof perfetto.protos.Ext4ExtRmLeafFtraceEvent
             * @instance
             */
            Ext4ExtRmLeafFtraceEvent.prototype.eeLblk = 0;

            /**
             * Ext4ExtRmLeafFtraceEvent eePblk.
             * @member {number} eePblk
             * @memberof perfetto.protos.Ext4ExtRmLeafFtraceEvent
             * @instance
             */
            Ext4ExtRmLeafFtraceEvent.prototype.eePblk = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtRmLeafFtraceEvent eeLen.
             * @member {number} eeLen
             * @memberof perfetto.protos.Ext4ExtRmLeafFtraceEvent
             * @instance
             */
            Ext4ExtRmLeafFtraceEvent.prototype.eeLen = 0;

            /**
             * Ext4ExtRmLeafFtraceEvent pcLblk.
             * @member {number} pcLblk
             * @memberof perfetto.protos.Ext4ExtRmLeafFtraceEvent
             * @instance
             */
            Ext4ExtRmLeafFtraceEvent.prototype.pcLblk = 0;

            /**
             * Ext4ExtRmLeafFtraceEvent pcPclu.
             * @member {number} pcPclu
             * @memberof perfetto.protos.Ext4ExtRmLeafFtraceEvent
             * @instance
             */
            Ext4ExtRmLeafFtraceEvent.prototype.pcPclu = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtRmLeafFtraceEvent pcState.
             * @member {number} pcState
             * @memberof perfetto.protos.Ext4ExtRmLeafFtraceEvent
             * @instance
             */
            Ext4ExtRmLeafFtraceEvent.prototype.pcState = 0;

            /**
             * Creates a new Ext4ExtRmLeafFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4ExtRmLeafFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtRmLeafFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4ExtRmLeafFtraceEvent} Ext4ExtRmLeafFtraceEvent instance
             */
            Ext4ExtRmLeafFtraceEvent.create = function create(properties) {
                return new Ext4ExtRmLeafFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4ExtRmLeafFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4ExtRmLeafFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4ExtRmLeafFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtRmLeafFtraceEvent} m Ext4ExtRmLeafFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtRmLeafFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.partial != null && Object.hasOwnProperty.call(m, "partial"))
                    w.uint32(24).int64(m.partial);
                if (m.start != null && Object.hasOwnProperty.call(m, "start"))
                    w.uint32(32).uint32(m.start);
                if (m.eeLblk != null && Object.hasOwnProperty.call(m, "eeLblk"))
                    w.uint32(40).uint32(m.eeLblk);
                if (m.eePblk != null && Object.hasOwnProperty.call(m, "eePblk"))
                    w.uint32(48).uint64(m.eePblk);
                if (m.eeLen != null && Object.hasOwnProperty.call(m, "eeLen"))
                    w.uint32(56).int32(m.eeLen);
                if (m.pcLblk != null && Object.hasOwnProperty.call(m, "pcLblk"))
                    w.uint32(64).uint32(m.pcLblk);
                if (m.pcPclu != null && Object.hasOwnProperty.call(m, "pcPclu"))
                    w.uint32(72).uint64(m.pcPclu);
                if (m.pcState != null && Object.hasOwnProperty.call(m, "pcState"))
                    w.uint32(80).int32(m.pcState);
                return w;
            };

            /**
             * Encodes the specified Ext4ExtRmLeafFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4ExtRmLeafFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4ExtRmLeafFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtRmLeafFtraceEvent} message Ext4ExtRmLeafFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtRmLeafFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4ExtRmLeafFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4ExtRmLeafFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4ExtRmLeafFtraceEvent} Ext4ExtRmLeafFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtRmLeafFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4ExtRmLeafFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.partial = r.int64();
                        break;
                    case 4:
                        m.start = r.uint32();
                        break;
                    case 5:
                        m.eeLblk = r.uint32();
                        break;
                    case 6:
                        m.eePblk = r.uint64();
                        break;
                    case 7:
                        m.eeLen = r.int32();
                        break;
                    case 8:
                        m.pcLblk = r.uint32();
                        break;
                    case 9:
                        m.pcPclu = r.uint64();
                        break;
                    case 10:
                        m.pcState = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4ExtRmLeafFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4ExtRmLeafFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4ExtRmLeafFtraceEvent} Ext4ExtRmLeafFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtRmLeafFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4ExtRmLeafFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4ExtRmLeafFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4ExtRmLeafFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.partial != null && m.hasOwnProperty("partial")) {
                    if (!$util.isInteger(m.partial) && !(m.partial && $util.isInteger(m.partial.low) && $util.isInteger(m.partial.high)))
                        return "partial: integer|Long expected";
                }
                if (m.start != null && m.hasOwnProperty("start")) {
                    if (!$util.isInteger(m.start))
                        return "start: integer expected";
                }
                if (m.eeLblk != null && m.hasOwnProperty("eeLblk")) {
                    if (!$util.isInteger(m.eeLblk))
                        return "eeLblk: integer expected";
                }
                if (m.eePblk != null && m.hasOwnProperty("eePblk")) {
                    if (!$util.isInteger(m.eePblk) && !(m.eePblk && $util.isInteger(m.eePblk.low) && $util.isInteger(m.eePblk.high)))
                        return "eePblk: integer|Long expected";
                }
                if (m.eeLen != null && m.hasOwnProperty("eeLen")) {
                    if (!$util.isInteger(m.eeLen))
                        return "eeLen: integer expected";
                }
                if (m.pcLblk != null && m.hasOwnProperty("pcLblk")) {
                    if (!$util.isInteger(m.pcLblk))
                        return "pcLblk: integer expected";
                }
                if (m.pcPclu != null && m.hasOwnProperty("pcPclu")) {
                    if (!$util.isInteger(m.pcPclu) && !(m.pcPclu && $util.isInteger(m.pcPclu.low) && $util.isInteger(m.pcPclu.high)))
                        return "pcPclu: integer|Long expected";
                }
                if (m.pcState != null && m.hasOwnProperty("pcState")) {
                    if (!$util.isInteger(m.pcState))
                        return "pcState: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4ExtRmLeafFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4ExtRmLeafFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4ExtRmLeafFtraceEvent} Ext4ExtRmLeafFtraceEvent
             */
            Ext4ExtRmLeafFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4ExtRmLeafFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4ExtRmLeafFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.partial != null) {
                    if ($util.Long)
                        (m.partial = $util.Long.fromValue(d.partial)).unsigned = false;
                    else if (typeof d.partial === "string")
                        m.partial = parseInt(d.partial, 10);
                    else if (typeof d.partial === "number")
                        m.partial = d.partial;
                    else if (typeof d.partial === "object")
                        m.partial = new $util.LongBits(d.partial.low >>> 0, d.partial.high >>> 0).toNumber();
                }
                if (d.start != null) {
                    m.start = d.start >>> 0;
                }
                if (d.eeLblk != null) {
                    m.eeLblk = d.eeLblk >>> 0;
                }
                if (d.eePblk != null) {
                    if ($util.Long)
                        (m.eePblk = $util.Long.fromValue(d.eePblk)).unsigned = true;
                    else if (typeof d.eePblk === "string")
                        m.eePblk = parseInt(d.eePblk, 10);
                    else if (typeof d.eePblk === "number")
                        m.eePblk = d.eePblk;
                    else if (typeof d.eePblk === "object")
                        m.eePblk = new $util.LongBits(d.eePblk.low >>> 0, d.eePblk.high >>> 0).toNumber(true);
                }
                if (d.eeLen != null) {
                    m.eeLen = d.eeLen | 0;
                }
                if (d.pcLblk != null) {
                    m.pcLblk = d.pcLblk >>> 0;
                }
                if (d.pcPclu != null) {
                    if ($util.Long)
                        (m.pcPclu = $util.Long.fromValue(d.pcPclu)).unsigned = true;
                    else if (typeof d.pcPclu === "string")
                        m.pcPclu = parseInt(d.pcPclu, 10);
                    else if (typeof d.pcPclu === "number")
                        m.pcPclu = d.pcPclu;
                    else if (typeof d.pcPclu === "object")
                        m.pcPclu = new $util.LongBits(d.pcPclu.low >>> 0, d.pcPclu.high >>> 0).toNumber(true);
                }
                if (d.pcState != null) {
                    m.pcState = d.pcState | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4ExtRmLeafFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4ExtRmLeafFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4ExtRmLeafFtraceEvent} m Ext4ExtRmLeafFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4ExtRmLeafFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.partial = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.partial = o.longs === String ? "0" : 0;
                    d.start = 0;
                    d.eeLblk = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.eePblk = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.eePblk = o.longs === String ? "0" : 0;
                    d.eeLen = 0;
                    d.pcLblk = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pcPclu = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pcPclu = o.longs === String ? "0" : 0;
                    d.pcState = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.partial != null && m.hasOwnProperty("partial")) {
                    if (typeof m.partial === "number")
                        d.partial = o.longs === String ? String(m.partial) : m.partial;
                    else
                        d.partial = o.longs === String ? $util.Long.prototype.toString.call(m.partial) : o.longs === Number ? new $util.LongBits(m.partial.low >>> 0, m.partial.high >>> 0).toNumber() : m.partial;
                }
                if (m.start != null && m.hasOwnProperty("start")) {
                    d.start = m.start;
                }
                if (m.eeLblk != null && m.hasOwnProperty("eeLblk")) {
                    d.eeLblk = m.eeLblk;
                }
                if (m.eePblk != null && m.hasOwnProperty("eePblk")) {
                    if (typeof m.eePblk === "number")
                        d.eePblk = o.longs === String ? String(m.eePblk) : m.eePblk;
                    else
                        d.eePblk = o.longs === String ? $util.Long.prototype.toString.call(m.eePblk) : o.longs === Number ? new $util.LongBits(m.eePblk.low >>> 0, m.eePblk.high >>> 0).toNumber(true) : m.eePblk;
                }
                if (m.eeLen != null && m.hasOwnProperty("eeLen")) {
                    d.eeLen = m.eeLen;
                }
                if (m.pcLblk != null && m.hasOwnProperty("pcLblk")) {
                    d.pcLblk = m.pcLblk;
                }
                if (m.pcPclu != null && m.hasOwnProperty("pcPclu")) {
                    if (typeof m.pcPclu === "number")
                        d.pcPclu = o.longs === String ? String(m.pcPclu) : m.pcPclu;
                    else
                        d.pcPclu = o.longs === String ? $util.Long.prototype.toString.call(m.pcPclu) : o.longs === Number ? new $util.LongBits(m.pcPclu.low >>> 0, m.pcPclu.high >>> 0).toNumber(true) : m.pcPclu;
                }
                if (m.pcState != null && m.hasOwnProperty("pcState")) {
                    d.pcState = m.pcState;
                }
                return d;
            };

            /**
             * Converts this Ext4ExtRmLeafFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4ExtRmLeafFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4ExtRmLeafFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4ExtRmLeafFtraceEvent;
        })();

        protos.Ext4ExtShowExtentFtraceEvent = (function() {

            /**
             * Properties of an Ext4ExtShowExtentFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4ExtShowExtentFtraceEvent
             * @property {number|null} [dev] Ext4ExtShowExtentFtraceEvent dev
             * @property {number|null} [ino] Ext4ExtShowExtentFtraceEvent ino
             * @property {number|null} [pblk] Ext4ExtShowExtentFtraceEvent pblk
             * @property {number|null} [lblk] Ext4ExtShowExtentFtraceEvent lblk
             * @property {number|null} [len] Ext4ExtShowExtentFtraceEvent len
             */

            /**
             * Constructs a new Ext4ExtShowExtentFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4ExtShowExtentFtraceEvent.
             * @implements IExt4ExtShowExtentFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4ExtShowExtentFtraceEvent=} [p] Properties to set
             */
            function Ext4ExtShowExtentFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4ExtShowExtentFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4ExtShowExtentFtraceEvent
             * @instance
             */
            Ext4ExtShowExtentFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtShowExtentFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4ExtShowExtentFtraceEvent
             * @instance
             */
            Ext4ExtShowExtentFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtShowExtentFtraceEvent pblk.
             * @member {number} pblk
             * @memberof perfetto.protos.Ext4ExtShowExtentFtraceEvent
             * @instance
             */
            Ext4ExtShowExtentFtraceEvent.prototype.pblk = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ExtShowExtentFtraceEvent lblk.
             * @member {number} lblk
             * @memberof perfetto.protos.Ext4ExtShowExtentFtraceEvent
             * @instance
             */
            Ext4ExtShowExtentFtraceEvent.prototype.lblk = 0;

            /**
             * Ext4ExtShowExtentFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4ExtShowExtentFtraceEvent
             * @instance
             */
            Ext4ExtShowExtentFtraceEvent.prototype.len = 0;

            /**
             * Creates a new Ext4ExtShowExtentFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4ExtShowExtentFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtShowExtentFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4ExtShowExtentFtraceEvent} Ext4ExtShowExtentFtraceEvent instance
             */
            Ext4ExtShowExtentFtraceEvent.create = function create(properties) {
                return new Ext4ExtShowExtentFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4ExtShowExtentFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4ExtShowExtentFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4ExtShowExtentFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtShowExtentFtraceEvent} m Ext4ExtShowExtentFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtShowExtentFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.pblk != null && Object.hasOwnProperty.call(m, "pblk"))
                    w.uint32(24).uint64(m.pblk);
                if (m.lblk != null && Object.hasOwnProperty.call(m, "lblk"))
                    w.uint32(32).uint32(m.lblk);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(40).uint32(m.len);
                return w;
            };

            /**
             * Encodes the specified Ext4ExtShowExtentFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4ExtShowExtentFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4ExtShowExtentFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ExtShowExtentFtraceEvent} message Ext4ExtShowExtentFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ExtShowExtentFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4ExtShowExtentFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4ExtShowExtentFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4ExtShowExtentFtraceEvent} Ext4ExtShowExtentFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtShowExtentFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4ExtShowExtentFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.pblk = r.uint64();
                        break;
                    case 4:
                        m.lblk = r.uint32();
                        break;
                    case 5:
                        m.len = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4ExtShowExtentFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4ExtShowExtentFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4ExtShowExtentFtraceEvent} Ext4ExtShowExtentFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ExtShowExtentFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4ExtShowExtentFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4ExtShowExtentFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4ExtShowExtentFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.pblk != null && m.hasOwnProperty("pblk")) {
                    if (!$util.isInteger(m.pblk) && !(m.pblk && $util.isInteger(m.pblk.low) && $util.isInteger(m.pblk.high)))
                        return "pblk: integer|Long expected";
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    if (!$util.isInteger(m.lblk))
                        return "lblk: integer expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4ExtShowExtentFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4ExtShowExtentFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4ExtShowExtentFtraceEvent} Ext4ExtShowExtentFtraceEvent
             */
            Ext4ExtShowExtentFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4ExtShowExtentFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4ExtShowExtentFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.pblk != null) {
                    if ($util.Long)
                        (m.pblk = $util.Long.fromValue(d.pblk)).unsigned = true;
                    else if (typeof d.pblk === "string")
                        m.pblk = parseInt(d.pblk, 10);
                    else if (typeof d.pblk === "number")
                        m.pblk = d.pblk;
                    else if (typeof d.pblk === "object")
                        m.pblk = new $util.LongBits(d.pblk.low >>> 0, d.pblk.high >>> 0).toNumber(true);
                }
                if (d.lblk != null) {
                    m.lblk = d.lblk >>> 0;
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4ExtShowExtentFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4ExtShowExtentFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4ExtShowExtentFtraceEvent} m Ext4ExtShowExtentFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4ExtShowExtentFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pblk = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pblk = o.longs === String ? "0" : 0;
                    d.lblk = 0;
                    d.len = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.pblk != null && m.hasOwnProperty("pblk")) {
                    if (typeof m.pblk === "number")
                        d.pblk = o.longs === String ? String(m.pblk) : m.pblk;
                    else
                        d.pblk = o.longs === String ? $util.Long.prototype.toString.call(m.pblk) : o.longs === Number ? new $util.LongBits(m.pblk.low >>> 0, m.pblk.high >>> 0).toNumber(true) : m.pblk;
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    d.lblk = m.lblk;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                return d;
            };

            /**
             * Converts this Ext4ExtShowExtentFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4ExtShowExtentFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4ExtShowExtentFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4ExtShowExtentFtraceEvent;
        })();

        protos.Ext4FallocateEnterFtraceEvent = (function() {

            /**
             * Properties of an Ext4FallocateEnterFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4FallocateEnterFtraceEvent
             * @property {number|null} [dev] Ext4FallocateEnterFtraceEvent dev
             * @property {number|null} [ino] Ext4FallocateEnterFtraceEvent ino
             * @property {number|null} [offset] Ext4FallocateEnterFtraceEvent offset
             * @property {number|null} [len] Ext4FallocateEnterFtraceEvent len
             * @property {number|null} [mode] Ext4FallocateEnterFtraceEvent mode
             * @property {number|null} [pos] Ext4FallocateEnterFtraceEvent pos
             */

            /**
             * Constructs a new Ext4FallocateEnterFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4FallocateEnterFtraceEvent.
             * @implements IExt4FallocateEnterFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4FallocateEnterFtraceEvent=} [p] Properties to set
             */
            function Ext4FallocateEnterFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4FallocateEnterFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4FallocateEnterFtraceEvent
             * @instance
             */
            Ext4FallocateEnterFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4FallocateEnterFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4FallocateEnterFtraceEvent
             * @instance
             */
            Ext4FallocateEnterFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4FallocateEnterFtraceEvent offset.
             * @member {number} offset
             * @memberof perfetto.protos.Ext4FallocateEnterFtraceEvent
             * @instance
             */
            Ext4FallocateEnterFtraceEvent.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4FallocateEnterFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4FallocateEnterFtraceEvent
             * @instance
             */
            Ext4FallocateEnterFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4FallocateEnterFtraceEvent mode.
             * @member {number} mode
             * @memberof perfetto.protos.Ext4FallocateEnterFtraceEvent
             * @instance
             */
            Ext4FallocateEnterFtraceEvent.prototype.mode = 0;

            /**
             * Ext4FallocateEnterFtraceEvent pos.
             * @member {number} pos
             * @memberof perfetto.protos.Ext4FallocateEnterFtraceEvent
             * @instance
             */
            Ext4FallocateEnterFtraceEvent.prototype.pos = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new Ext4FallocateEnterFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4FallocateEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4FallocateEnterFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4FallocateEnterFtraceEvent} Ext4FallocateEnterFtraceEvent instance
             */
            Ext4FallocateEnterFtraceEvent.create = function create(properties) {
                return new Ext4FallocateEnterFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4FallocateEnterFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4FallocateEnterFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4FallocateEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4FallocateEnterFtraceEvent} m Ext4FallocateEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4FallocateEnterFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.offset != null && Object.hasOwnProperty.call(m, "offset"))
                    w.uint32(24).int64(m.offset);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).int64(m.len);
                if (m.mode != null && Object.hasOwnProperty.call(m, "mode"))
                    w.uint32(40).int32(m.mode);
                if (m.pos != null && Object.hasOwnProperty.call(m, "pos"))
                    w.uint32(48).int64(m.pos);
                return w;
            };

            /**
             * Encodes the specified Ext4FallocateEnterFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4FallocateEnterFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4FallocateEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4FallocateEnterFtraceEvent} message Ext4FallocateEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4FallocateEnterFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4FallocateEnterFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4FallocateEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4FallocateEnterFtraceEvent} Ext4FallocateEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4FallocateEnterFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4FallocateEnterFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.offset = r.int64();
                        break;
                    case 4:
                        m.len = r.int64();
                        break;
                    case 5:
                        m.mode = r.int32();
                        break;
                    case 6:
                        m.pos = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4FallocateEnterFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4FallocateEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4FallocateEnterFtraceEvent} Ext4FallocateEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4FallocateEnterFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4FallocateEnterFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4FallocateEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4FallocateEnterFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (!$util.isInteger(m.offset) && !(m.offset && $util.isInteger(m.offset.low) && $util.isInteger(m.offset.high)))
                        return "offset: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    if (!$util.isInteger(m.mode))
                        return "mode: integer expected";
                }
                if (m.pos != null && m.hasOwnProperty("pos")) {
                    if (!$util.isInteger(m.pos) && !(m.pos && $util.isInteger(m.pos.low) && $util.isInteger(m.pos.high)))
                        return "pos: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an Ext4FallocateEnterFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4FallocateEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4FallocateEnterFtraceEvent} Ext4FallocateEnterFtraceEvent
             */
            Ext4FallocateEnterFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4FallocateEnterFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4FallocateEnterFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.offset != null) {
                    if ($util.Long)
                        (m.offset = $util.Long.fromValue(d.offset)).unsigned = false;
                    else if (typeof d.offset === "string")
                        m.offset = parseInt(d.offset, 10);
                    else if (typeof d.offset === "number")
                        m.offset = d.offset;
                    else if (typeof d.offset === "object")
                        m.offset = new $util.LongBits(d.offset.low >>> 0, d.offset.high >>> 0).toNumber();
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = false;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber();
                }
                if (d.mode != null) {
                    m.mode = d.mode | 0;
                }
                if (d.pos != null) {
                    if ($util.Long)
                        (m.pos = $util.Long.fromValue(d.pos)).unsigned = false;
                    else if (typeof d.pos === "string")
                        m.pos = parseInt(d.pos, 10);
                    else if (typeof d.pos === "number")
                        m.pos = d.pos;
                    else if (typeof d.pos === "object")
                        m.pos = new $util.LongBits(d.pos.low >>> 0, d.pos.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4FallocateEnterFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4FallocateEnterFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4FallocateEnterFtraceEvent} m Ext4FallocateEnterFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4FallocateEnterFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.offset = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.offset = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                    d.mode = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.pos = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pos = o.longs === String ? "0" : 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (typeof m.offset === "number")
                        d.offset = o.longs === String ? String(m.offset) : m.offset;
                    else
                        d.offset = o.longs === String ? $util.Long.prototype.toString.call(m.offset) : o.longs === Number ? new $util.LongBits(m.offset.low >>> 0, m.offset.high >>> 0).toNumber() : m.offset;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber() : m.len;
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    d.mode = m.mode;
                }
                if (m.pos != null && m.hasOwnProperty("pos")) {
                    if (typeof m.pos === "number")
                        d.pos = o.longs === String ? String(m.pos) : m.pos;
                    else
                        d.pos = o.longs === String ? $util.Long.prototype.toString.call(m.pos) : o.longs === Number ? new $util.LongBits(m.pos.low >>> 0, m.pos.high >>> 0).toNumber() : m.pos;
                }
                return d;
            };

            /**
             * Converts this Ext4FallocateEnterFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4FallocateEnterFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4FallocateEnterFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4FallocateEnterFtraceEvent;
        })();

        protos.Ext4FallocateExitFtraceEvent = (function() {

            /**
             * Properties of an Ext4FallocateExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4FallocateExitFtraceEvent
             * @property {number|null} [dev] Ext4FallocateExitFtraceEvent dev
             * @property {number|null} [ino] Ext4FallocateExitFtraceEvent ino
             * @property {number|null} [pos] Ext4FallocateExitFtraceEvent pos
             * @property {number|null} [blocks] Ext4FallocateExitFtraceEvent blocks
             * @property {number|null} [ret] Ext4FallocateExitFtraceEvent ret
             */

            /**
             * Constructs a new Ext4FallocateExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4FallocateExitFtraceEvent.
             * @implements IExt4FallocateExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4FallocateExitFtraceEvent=} [p] Properties to set
             */
            function Ext4FallocateExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4FallocateExitFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4FallocateExitFtraceEvent
             * @instance
             */
            Ext4FallocateExitFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4FallocateExitFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4FallocateExitFtraceEvent
             * @instance
             */
            Ext4FallocateExitFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4FallocateExitFtraceEvent pos.
             * @member {number} pos
             * @memberof perfetto.protos.Ext4FallocateExitFtraceEvent
             * @instance
             */
            Ext4FallocateExitFtraceEvent.prototype.pos = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4FallocateExitFtraceEvent blocks.
             * @member {number} blocks
             * @memberof perfetto.protos.Ext4FallocateExitFtraceEvent
             * @instance
             */
            Ext4FallocateExitFtraceEvent.prototype.blocks = 0;

            /**
             * Ext4FallocateExitFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.Ext4FallocateExitFtraceEvent
             * @instance
             */
            Ext4FallocateExitFtraceEvent.prototype.ret = 0;

            /**
             * Creates a new Ext4FallocateExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4FallocateExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4FallocateExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4FallocateExitFtraceEvent} Ext4FallocateExitFtraceEvent instance
             */
            Ext4FallocateExitFtraceEvent.create = function create(properties) {
                return new Ext4FallocateExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4FallocateExitFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4FallocateExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4FallocateExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4FallocateExitFtraceEvent} m Ext4FallocateExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4FallocateExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.pos != null && Object.hasOwnProperty.call(m, "pos"))
                    w.uint32(24).int64(m.pos);
                if (m.blocks != null && Object.hasOwnProperty.call(m, "blocks"))
                    w.uint32(32).uint32(m.blocks);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(40).int32(m.ret);
                return w;
            };

            /**
             * Encodes the specified Ext4FallocateExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4FallocateExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4FallocateExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4FallocateExitFtraceEvent} message Ext4FallocateExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4FallocateExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4FallocateExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4FallocateExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4FallocateExitFtraceEvent} Ext4FallocateExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4FallocateExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4FallocateExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.pos = r.int64();
                        break;
                    case 4:
                        m.blocks = r.uint32();
                        break;
                    case 5:
                        m.ret = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4FallocateExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4FallocateExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4FallocateExitFtraceEvent} Ext4FallocateExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4FallocateExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4FallocateExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4FallocateExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4FallocateExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.pos != null && m.hasOwnProperty("pos")) {
                    if (!$util.isInteger(m.pos) && !(m.pos && $util.isInteger(m.pos.low) && $util.isInteger(m.pos.high)))
                        return "pos: integer|Long expected";
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (!$util.isInteger(m.blocks))
                        return "blocks: integer expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4FallocateExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4FallocateExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4FallocateExitFtraceEvent} Ext4FallocateExitFtraceEvent
             */
            Ext4FallocateExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4FallocateExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4FallocateExitFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.pos != null) {
                    if ($util.Long)
                        (m.pos = $util.Long.fromValue(d.pos)).unsigned = false;
                    else if (typeof d.pos === "string")
                        m.pos = parseInt(d.pos, 10);
                    else if (typeof d.pos === "number")
                        m.pos = d.pos;
                    else if (typeof d.pos === "object")
                        m.pos = new $util.LongBits(d.pos.low >>> 0, d.pos.high >>> 0).toNumber();
                }
                if (d.blocks != null) {
                    m.blocks = d.blocks >>> 0;
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4FallocateExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4FallocateExitFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4FallocateExitFtraceEvent} m Ext4FallocateExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4FallocateExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.pos = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pos = o.longs === String ? "0" : 0;
                    d.blocks = 0;
                    d.ret = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.pos != null && m.hasOwnProperty("pos")) {
                    if (typeof m.pos === "number")
                        d.pos = o.longs === String ? String(m.pos) : m.pos;
                    else
                        d.pos = o.longs === String ? $util.Long.prototype.toString.call(m.pos) : o.longs === Number ? new $util.LongBits(m.pos.low >>> 0, m.pos.high >>> 0).toNumber() : m.pos;
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    d.blocks = m.blocks;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                return d;
            };

            /**
             * Converts this Ext4FallocateExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4FallocateExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4FallocateExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4FallocateExitFtraceEvent;
        })();

        protos.Ext4FindDelallocRangeFtraceEvent = (function() {

            /**
             * Properties of an Ext4FindDelallocRangeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4FindDelallocRangeFtraceEvent
             * @property {number|null} [dev] Ext4FindDelallocRangeFtraceEvent dev
             * @property {number|null} [ino] Ext4FindDelallocRangeFtraceEvent ino
             * @property {number|null} [from] Ext4FindDelallocRangeFtraceEvent from
             * @property {number|null} [to] Ext4FindDelallocRangeFtraceEvent to
             * @property {number|null} [reverse] Ext4FindDelallocRangeFtraceEvent reverse
             * @property {number|null} [found] Ext4FindDelallocRangeFtraceEvent found
             * @property {number|null} [foundBlk] Ext4FindDelallocRangeFtraceEvent foundBlk
             */

            /**
             * Constructs a new Ext4FindDelallocRangeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4FindDelallocRangeFtraceEvent.
             * @implements IExt4FindDelallocRangeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4FindDelallocRangeFtraceEvent=} [p] Properties to set
             */
            function Ext4FindDelallocRangeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4FindDelallocRangeFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4FindDelallocRangeFtraceEvent
             * @instance
             */
            Ext4FindDelallocRangeFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4FindDelallocRangeFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4FindDelallocRangeFtraceEvent
             * @instance
             */
            Ext4FindDelallocRangeFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4FindDelallocRangeFtraceEvent from.
             * @member {number} from
             * @memberof perfetto.protos.Ext4FindDelallocRangeFtraceEvent
             * @instance
             */
            Ext4FindDelallocRangeFtraceEvent.prototype.from = 0;

            /**
             * Ext4FindDelallocRangeFtraceEvent to.
             * @member {number} to
             * @memberof perfetto.protos.Ext4FindDelallocRangeFtraceEvent
             * @instance
             */
            Ext4FindDelallocRangeFtraceEvent.prototype.to = 0;

            /**
             * Ext4FindDelallocRangeFtraceEvent reverse.
             * @member {number} reverse
             * @memberof perfetto.protos.Ext4FindDelallocRangeFtraceEvent
             * @instance
             */
            Ext4FindDelallocRangeFtraceEvent.prototype.reverse = 0;

            /**
             * Ext4FindDelallocRangeFtraceEvent found.
             * @member {number} found
             * @memberof perfetto.protos.Ext4FindDelallocRangeFtraceEvent
             * @instance
             */
            Ext4FindDelallocRangeFtraceEvent.prototype.found = 0;

            /**
             * Ext4FindDelallocRangeFtraceEvent foundBlk.
             * @member {number} foundBlk
             * @memberof perfetto.protos.Ext4FindDelallocRangeFtraceEvent
             * @instance
             */
            Ext4FindDelallocRangeFtraceEvent.prototype.foundBlk = 0;

            /**
             * Creates a new Ext4FindDelallocRangeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4FindDelallocRangeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4FindDelallocRangeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4FindDelallocRangeFtraceEvent} Ext4FindDelallocRangeFtraceEvent instance
             */
            Ext4FindDelallocRangeFtraceEvent.create = function create(properties) {
                return new Ext4FindDelallocRangeFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4FindDelallocRangeFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4FindDelallocRangeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4FindDelallocRangeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4FindDelallocRangeFtraceEvent} m Ext4FindDelallocRangeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4FindDelallocRangeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.from != null && Object.hasOwnProperty.call(m, "from"))
                    w.uint32(24).uint32(m.from);
                if (m.to != null && Object.hasOwnProperty.call(m, "to"))
                    w.uint32(32).uint32(m.to);
                if (m.reverse != null && Object.hasOwnProperty.call(m, "reverse"))
                    w.uint32(40).int32(m.reverse);
                if (m.found != null && Object.hasOwnProperty.call(m, "found"))
                    w.uint32(48).int32(m.found);
                if (m.foundBlk != null && Object.hasOwnProperty.call(m, "foundBlk"))
                    w.uint32(56).uint32(m.foundBlk);
                return w;
            };

            /**
             * Encodes the specified Ext4FindDelallocRangeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4FindDelallocRangeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4FindDelallocRangeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4FindDelallocRangeFtraceEvent} message Ext4FindDelallocRangeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4FindDelallocRangeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4FindDelallocRangeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4FindDelallocRangeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4FindDelallocRangeFtraceEvent} Ext4FindDelallocRangeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4FindDelallocRangeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4FindDelallocRangeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.from = r.uint32();
                        break;
                    case 4:
                        m.to = r.uint32();
                        break;
                    case 5:
                        m.reverse = r.int32();
                        break;
                    case 6:
                        m.found = r.int32();
                        break;
                    case 7:
                        m.foundBlk = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4FindDelallocRangeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4FindDelallocRangeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4FindDelallocRangeFtraceEvent} Ext4FindDelallocRangeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4FindDelallocRangeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4FindDelallocRangeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4FindDelallocRangeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4FindDelallocRangeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.from != null && m.hasOwnProperty("from")) {
                    if (!$util.isInteger(m.from))
                        return "from: integer expected";
                }
                if (m.to != null && m.hasOwnProperty("to")) {
                    if (!$util.isInteger(m.to))
                        return "to: integer expected";
                }
                if (m.reverse != null && m.hasOwnProperty("reverse")) {
                    if (!$util.isInteger(m.reverse))
                        return "reverse: integer expected";
                }
                if (m.found != null && m.hasOwnProperty("found")) {
                    if (!$util.isInteger(m.found))
                        return "found: integer expected";
                }
                if (m.foundBlk != null && m.hasOwnProperty("foundBlk")) {
                    if (!$util.isInteger(m.foundBlk))
                        return "foundBlk: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4FindDelallocRangeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4FindDelallocRangeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4FindDelallocRangeFtraceEvent} Ext4FindDelallocRangeFtraceEvent
             */
            Ext4FindDelallocRangeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4FindDelallocRangeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4FindDelallocRangeFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.from != null) {
                    m.from = d.from >>> 0;
                }
                if (d.to != null) {
                    m.to = d.to >>> 0;
                }
                if (d.reverse != null) {
                    m.reverse = d.reverse | 0;
                }
                if (d.found != null) {
                    m.found = d.found | 0;
                }
                if (d.foundBlk != null) {
                    m.foundBlk = d.foundBlk >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4FindDelallocRangeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4FindDelallocRangeFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4FindDelallocRangeFtraceEvent} m Ext4FindDelallocRangeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4FindDelallocRangeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.from = 0;
                    d.to = 0;
                    d.reverse = 0;
                    d.found = 0;
                    d.foundBlk = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.from != null && m.hasOwnProperty("from")) {
                    d.from = m.from;
                }
                if (m.to != null && m.hasOwnProperty("to")) {
                    d.to = m.to;
                }
                if (m.reverse != null && m.hasOwnProperty("reverse")) {
                    d.reverse = m.reverse;
                }
                if (m.found != null && m.hasOwnProperty("found")) {
                    d.found = m.found;
                }
                if (m.foundBlk != null && m.hasOwnProperty("foundBlk")) {
                    d.foundBlk = m.foundBlk;
                }
                return d;
            };

            /**
             * Converts this Ext4FindDelallocRangeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4FindDelallocRangeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4FindDelallocRangeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4FindDelallocRangeFtraceEvent;
        })();

        protos.Ext4ForgetFtraceEvent = (function() {

            /**
             * Properties of an Ext4ForgetFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4ForgetFtraceEvent
             * @property {number|null} [dev] Ext4ForgetFtraceEvent dev
             * @property {number|null} [ino] Ext4ForgetFtraceEvent ino
             * @property {number|null} [block] Ext4ForgetFtraceEvent block
             * @property {number|null} [isMetadata] Ext4ForgetFtraceEvent isMetadata
             * @property {number|null} [mode] Ext4ForgetFtraceEvent mode
             */

            /**
             * Constructs a new Ext4ForgetFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4ForgetFtraceEvent.
             * @implements IExt4ForgetFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4ForgetFtraceEvent=} [p] Properties to set
             */
            function Ext4ForgetFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4ForgetFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4ForgetFtraceEvent
             * @instance
             */
            Ext4ForgetFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ForgetFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4ForgetFtraceEvent
             * @instance
             */
            Ext4ForgetFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ForgetFtraceEvent block.
             * @member {number} block
             * @memberof perfetto.protos.Ext4ForgetFtraceEvent
             * @instance
             */
            Ext4ForgetFtraceEvent.prototype.block = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ForgetFtraceEvent isMetadata.
             * @member {number} isMetadata
             * @memberof perfetto.protos.Ext4ForgetFtraceEvent
             * @instance
             */
            Ext4ForgetFtraceEvent.prototype.isMetadata = 0;

            /**
             * Ext4ForgetFtraceEvent mode.
             * @member {number} mode
             * @memberof perfetto.protos.Ext4ForgetFtraceEvent
             * @instance
             */
            Ext4ForgetFtraceEvent.prototype.mode = 0;

            /**
             * Creates a new Ext4ForgetFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4ForgetFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ForgetFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4ForgetFtraceEvent} Ext4ForgetFtraceEvent instance
             */
            Ext4ForgetFtraceEvent.create = function create(properties) {
                return new Ext4ForgetFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4ForgetFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4ForgetFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4ForgetFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ForgetFtraceEvent} m Ext4ForgetFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ForgetFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.block != null && Object.hasOwnProperty.call(m, "block"))
                    w.uint32(24).uint64(m.block);
                if (m.isMetadata != null && Object.hasOwnProperty.call(m, "isMetadata"))
                    w.uint32(32).int32(m.isMetadata);
                if (m.mode != null && Object.hasOwnProperty.call(m, "mode"))
                    w.uint32(40).uint32(m.mode);
                return w;
            };

            /**
             * Encodes the specified Ext4ForgetFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4ForgetFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4ForgetFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ForgetFtraceEvent} message Ext4ForgetFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ForgetFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4ForgetFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4ForgetFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4ForgetFtraceEvent} Ext4ForgetFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ForgetFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4ForgetFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.block = r.uint64();
                        break;
                    case 4:
                        m.isMetadata = r.int32();
                        break;
                    case 5:
                        m.mode = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4ForgetFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4ForgetFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4ForgetFtraceEvent} Ext4ForgetFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ForgetFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4ForgetFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4ForgetFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4ForgetFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.block != null && m.hasOwnProperty("block")) {
                    if (!$util.isInteger(m.block) && !(m.block && $util.isInteger(m.block.low) && $util.isInteger(m.block.high)))
                        return "block: integer|Long expected";
                }
                if (m.isMetadata != null && m.hasOwnProperty("isMetadata")) {
                    if (!$util.isInteger(m.isMetadata))
                        return "isMetadata: integer expected";
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    if (!$util.isInteger(m.mode))
                        return "mode: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4ForgetFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4ForgetFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4ForgetFtraceEvent} Ext4ForgetFtraceEvent
             */
            Ext4ForgetFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4ForgetFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4ForgetFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.block != null) {
                    if ($util.Long)
                        (m.block = $util.Long.fromValue(d.block)).unsigned = true;
                    else if (typeof d.block === "string")
                        m.block = parseInt(d.block, 10);
                    else if (typeof d.block === "number")
                        m.block = d.block;
                    else if (typeof d.block === "object")
                        m.block = new $util.LongBits(d.block.low >>> 0, d.block.high >>> 0).toNumber(true);
                }
                if (d.isMetadata != null) {
                    m.isMetadata = d.isMetadata | 0;
                }
                if (d.mode != null) {
                    m.mode = d.mode >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4ForgetFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4ForgetFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4ForgetFtraceEvent} m Ext4ForgetFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4ForgetFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.block = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.block = o.longs === String ? "0" : 0;
                    d.isMetadata = 0;
                    d.mode = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.block != null && m.hasOwnProperty("block")) {
                    if (typeof m.block === "number")
                        d.block = o.longs === String ? String(m.block) : m.block;
                    else
                        d.block = o.longs === String ? $util.Long.prototype.toString.call(m.block) : o.longs === Number ? new $util.LongBits(m.block.low >>> 0, m.block.high >>> 0).toNumber(true) : m.block;
                }
                if (m.isMetadata != null && m.hasOwnProperty("isMetadata")) {
                    d.isMetadata = m.isMetadata;
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    d.mode = m.mode;
                }
                return d;
            };

            /**
             * Converts this Ext4ForgetFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4ForgetFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4ForgetFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4ForgetFtraceEvent;
        })();

        protos.Ext4FreeBlocksFtraceEvent = (function() {

            /**
             * Properties of an Ext4FreeBlocksFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4FreeBlocksFtraceEvent
             * @property {number|null} [dev] Ext4FreeBlocksFtraceEvent dev
             * @property {number|null} [ino] Ext4FreeBlocksFtraceEvent ino
             * @property {number|null} [block] Ext4FreeBlocksFtraceEvent block
             * @property {number|null} [count] Ext4FreeBlocksFtraceEvent count
             * @property {number|null} [flags] Ext4FreeBlocksFtraceEvent flags
             * @property {number|null} [mode] Ext4FreeBlocksFtraceEvent mode
             */

            /**
             * Constructs a new Ext4FreeBlocksFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4FreeBlocksFtraceEvent.
             * @implements IExt4FreeBlocksFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4FreeBlocksFtraceEvent=} [p] Properties to set
             */
            function Ext4FreeBlocksFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4FreeBlocksFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4FreeBlocksFtraceEvent
             * @instance
             */
            Ext4FreeBlocksFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4FreeBlocksFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4FreeBlocksFtraceEvent
             * @instance
             */
            Ext4FreeBlocksFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4FreeBlocksFtraceEvent block.
             * @member {number} block
             * @memberof perfetto.protos.Ext4FreeBlocksFtraceEvent
             * @instance
             */
            Ext4FreeBlocksFtraceEvent.prototype.block = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4FreeBlocksFtraceEvent count.
             * @member {number} count
             * @memberof perfetto.protos.Ext4FreeBlocksFtraceEvent
             * @instance
             */
            Ext4FreeBlocksFtraceEvent.prototype.count = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4FreeBlocksFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.Ext4FreeBlocksFtraceEvent
             * @instance
             */
            Ext4FreeBlocksFtraceEvent.prototype.flags = 0;

            /**
             * Ext4FreeBlocksFtraceEvent mode.
             * @member {number} mode
             * @memberof perfetto.protos.Ext4FreeBlocksFtraceEvent
             * @instance
             */
            Ext4FreeBlocksFtraceEvent.prototype.mode = 0;

            /**
             * Creates a new Ext4FreeBlocksFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4FreeBlocksFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4FreeBlocksFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4FreeBlocksFtraceEvent} Ext4FreeBlocksFtraceEvent instance
             */
            Ext4FreeBlocksFtraceEvent.create = function create(properties) {
                return new Ext4FreeBlocksFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4FreeBlocksFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4FreeBlocksFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4FreeBlocksFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4FreeBlocksFtraceEvent} m Ext4FreeBlocksFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4FreeBlocksFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.block != null && Object.hasOwnProperty.call(m, "block"))
                    w.uint32(24).uint64(m.block);
                if (m.count != null && Object.hasOwnProperty.call(m, "count"))
                    w.uint32(32).uint64(m.count);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(40).int32(m.flags);
                if (m.mode != null && Object.hasOwnProperty.call(m, "mode"))
                    w.uint32(48).uint32(m.mode);
                return w;
            };

            /**
             * Encodes the specified Ext4FreeBlocksFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4FreeBlocksFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4FreeBlocksFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4FreeBlocksFtraceEvent} message Ext4FreeBlocksFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4FreeBlocksFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4FreeBlocksFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4FreeBlocksFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4FreeBlocksFtraceEvent} Ext4FreeBlocksFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4FreeBlocksFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4FreeBlocksFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.block = r.uint64();
                        break;
                    case 4:
                        m.count = r.uint64();
                        break;
                    case 5:
                        m.flags = r.int32();
                        break;
                    case 6:
                        m.mode = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4FreeBlocksFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4FreeBlocksFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4FreeBlocksFtraceEvent} Ext4FreeBlocksFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4FreeBlocksFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4FreeBlocksFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4FreeBlocksFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4FreeBlocksFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.block != null && m.hasOwnProperty("block")) {
                    if (!$util.isInteger(m.block) && !(m.block && $util.isInteger(m.block.low) && $util.isInteger(m.block.high)))
                        return "block: integer|Long expected";
                }
                if (m.count != null && m.hasOwnProperty("count")) {
                    if (!$util.isInteger(m.count) && !(m.count && $util.isInteger(m.count.low) && $util.isInteger(m.count.high)))
                        return "count: integer|Long expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    if (!$util.isInteger(m.mode))
                        return "mode: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4FreeBlocksFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4FreeBlocksFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4FreeBlocksFtraceEvent} Ext4FreeBlocksFtraceEvent
             */
            Ext4FreeBlocksFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4FreeBlocksFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4FreeBlocksFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.block != null) {
                    if ($util.Long)
                        (m.block = $util.Long.fromValue(d.block)).unsigned = true;
                    else if (typeof d.block === "string")
                        m.block = parseInt(d.block, 10);
                    else if (typeof d.block === "number")
                        m.block = d.block;
                    else if (typeof d.block === "object")
                        m.block = new $util.LongBits(d.block.low >>> 0, d.block.high >>> 0).toNumber(true);
                }
                if (d.count != null) {
                    if ($util.Long)
                        (m.count = $util.Long.fromValue(d.count)).unsigned = true;
                    else if (typeof d.count === "string")
                        m.count = parseInt(d.count, 10);
                    else if (typeof d.count === "number")
                        m.count = d.count;
                    else if (typeof d.count === "object")
                        m.count = new $util.LongBits(d.count.low >>> 0, d.count.high >>> 0).toNumber(true);
                }
                if (d.flags != null) {
                    m.flags = d.flags | 0;
                }
                if (d.mode != null) {
                    m.mode = d.mode >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4FreeBlocksFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4FreeBlocksFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4FreeBlocksFtraceEvent} m Ext4FreeBlocksFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4FreeBlocksFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.block = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.block = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.count = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.count = o.longs === String ? "0" : 0;
                    d.flags = 0;
                    d.mode = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.block != null && m.hasOwnProperty("block")) {
                    if (typeof m.block === "number")
                        d.block = o.longs === String ? String(m.block) : m.block;
                    else
                        d.block = o.longs === String ? $util.Long.prototype.toString.call(m.block) : o.longs === Number ? new $util.LongBits(m.block.low >>> 0, m.block.high >>> 0).toNumber(true) : m.block;
                }
                if (m.count != null && m.hasOwnProperty("count")) {
                    if (typeof m.count === "number")
                        d.count = o.longs === String ? String(m.count) : m.count;
                    else
                        d.count = o.longs === String ? $util.Long.prototype.toString.call(m.count) : o.longs === Number ? new $util.LongBits(m.count.low >>> 0, m.count.high >>> 0).toNumber(true) : m.count;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    d.mode = m.mode;
                }
                return d;
            };

            /**
             * Converts this Ext4FreeBlocksFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4FreeBlocksFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4FreeBlocksFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4FreeBlocksFtraceEvent;
        })();

        protos.Ext4FreeInodeFtraceEvent = (function() {

            /**
             * Properties of an Ext4FreeInodeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4FreeInodeFtraceEvent
             * @property {number|null} [dev] Ext4FreeInodeFtraceEvent dev
             * @property {number|null} [ino] Ext4FreeInodeFtraceEvent ino
             * @property {number|null} [uid] Ext4FreeInodeFtraceEvent uid
             * @property {number|null} [gid] Ext4FreeInodeFtraceEvent gid
             * @property {number|null} [blocks] Ext4FreeInodeFtraceEvent blocks
             * @property {number|null} [mode] Ext4FreeInodeFtraceEvent mode
             */

            /**
             * Constructs a new Ext4FreeInodeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4FreeInodeFtraceEvent.
             * @implements IExt4FreeInodeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4FreeInodeFtraceEvent=} [p] Properties to set
             */
            function Ext4FreeInodeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4FreeInodeFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4FreeInodeFtraceEvent
             * @instance
             */
            Ext4FreeInodeFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4FreeInodeFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4FreeInodeFtraceEvent
             * @instance
             */
            Ext4FreeInodeFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4FreeInodeFtraceEvent uid.
             * @member {number} uid
             * @memberof perfetto.protos.Ext4FreeInodeFtraceEvent
             * @instance
             */
            Ext4FreeInodeFtraceEvent.prototype.uid = 0;

            /**
             * Ext4FreeInodeFtraceEvent gid.
             * @member {number} gid
             * @memberof perfetto.protos.Ext4FreeInodeFtraceEvent
             * @instance
             */
            Ext4FreeInodeFtraceEvent.prototype.gid = 0;

            /**
             * Ext4FreeInodeFtraceEvent blocks.
             * @member {number} blocks
             * @memberof perfetto.protos.Ext4FreeInodeFtraceEvent
             * @instance
             */
            Ext4FreeInodeFtraceEvent.prototype.blocks = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4FreeInodeFtraceEvent mode.
             * @member {number} mode
             * @memberof perfetto.protos.Ext4FreeInodeFtraceEvent
             * @instance
             */
            Ext4FreeInodeFtraceEvent.prototype.mode = 0;

            /**
             * Creates a new Ext4FreeInodeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4FreeInodeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4FreeInodeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4FreeInodeFtraceEvent} Ext4FreeInodeFtraceEvent instance
             */
            Ext4FreeInodeFtraceEvent.create = function create(properties) {
                return new Ext4FreeInodeFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4FreeInodeFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4FreeInodeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4FreeInodeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4FreeInodeFtraceEvent} m Ext4FreeInodeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4FreeInodeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.uid != null && Object.hasOwnProperty.call(m, "uid"))
                    w.uint32(24).uint32(m.uid);
                if (m.gid != null && Object.hasOwnProperty.call(m, "gid"))
                    w.uint32(32).uint32(m.gid);
                if (m.blocks != null && Object.hasOwnProperty.call(m, "blocks"))
                    w.uint32(40).uint64(m.blocks);
                if (m.mode != null && Object.hasOwnProperty.call(m, "mode"))
                    w.uint32(48).uint32(m.mode);
                return w;
            };

            /**
             * Encodes the specified Ext4FreeInodeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4FreeInodeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4FreeInodeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4FreeInodeFtraceEvent} message Ext4FreeInodeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4FreeInodeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4FreeInodeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4FreeInodeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4FreeInodeFtraceEvent} Ext4FreeInodeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4FreeInodeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4FreeInodeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.uid = r.uint32();
                        break;
                    case 4:
                        m.gid = r.uint32();
                        break;
                    case 5:
                        m.blocks = r.uint64();
                        break;
                    case 6:
                        m.mode = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4FreeInodeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4FreeInodeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4FreeInodeFtraceEvent} Ext4FreeInodeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4FreeInodeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4FreeInodeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4FreeInodeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4FreeInodeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.uid != null && m.hasOwnProperty("uid")) {
                    if (!$util.isInteger(m.uid))
                        return "uid: integer expected";
                }
                if (m.gid != null && m.hasOwnProperty("gid")) {
                    if (!$util.isInteger(m.gid))
                        return "gid: integer expected";
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (!$util.isInteger(m.blocks) && !(m.blocks && $util.isInteger(m.blocks.low) && $util.isInteger(m.blocks.high)))
                        return "blocks: integer|Long expected";
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    if (!$util.isInteger(m.mode))
                        return "mode: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4FreeInodeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4FreeInodeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4FreeInodeFtraceEvent} Ext4FreeInodeFtraceEvent
             */
            Ext4FreeInodeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4FreeInodeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4FreeInodeFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.uid != null) {
                    m.uid = d.uid >>> 0;
                }
                if (d.gid != null) {
                    m.gid = d.gid >>> 0;
                }
                if (d.blocks != null) {
                    if ($util.Long)
                        (m.blocks = $util.Long.fromValue(d.blocks)).unsigned = true;
                    else if (typeof d.blocks === "string")
                        m.blocks = parseInt(d.blocks, 10);
                    else if (typeof d.blocks === "number")
                        m.blocks = d.blocks;
                    else if (typeof d.blocks === "object")
                        m.blocks = new $util.LongBits(d.blocks.low >>> 0, d.blocks.high >>> 0).toNumber(true);
                }
                if (d.mode != null) {
                    m.mode = d.mode >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4FreeInodeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4FreeInodeFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4FreeInodeFtraceEvent} m Ext4FreeInodeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4FreeInodeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.uid = 0;
                    d.gid = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.blocks = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.blocks = o.longs === String ? "0" : 0;
                    d.mode = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.uid != null && m.hasOwnProperty("uid")) {
                    d.uid = m.uid;
                }
                if (m.gid != null && m.hasOwnProperty("gid")) {
                    d.gid = m.gid;
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (typeof m.blocks === "number")
                        d.blocks = o.longs === String ? String(m.blocks) : m.blocks;
                    else
                        d.blocks = o.longs === String ? $util.Long.prototype.toString.call(m.blocks) : o.longs === Number ? new $util.LongBits(m.blocks.low >>> 0, m.blocks.high >>> 0).toNumber(true) : m.blocks;
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    d.mode = m.mode;
                }
                return d;
            };

            /**
             * Converts this Ext4FreeInodeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4FreeInodeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4FreeInodeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4FreeInodeFtraceEvent;
        })();

        protos.Ext4GetImpliedClusterAllocExitFtraceEvent = (function() {

            /**
             * Properties of an Ext4GetImpliedClusterAllocExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4GetImpliedClusterAllocExitFtraceEvent
             * @property {number|null} [dev] Ext4GetImpliedClusterAllocExitFtraceEvent dev
             * @property {number|null} [flags] Ext4GetImpliedClusterAllocExitFtraceEvent flags
             * @property {number|null} [lblk] Ext4GetImpliedClusterAllocExitFtraceEvent lblk
             * @property {number|null} [pblk] Ext4GetImpliedClusterAllocExitFtraceEvent pblk
             * @property {number|null} [len] Ext4GetImpliedClusterAllocExitFtraceEvent len
             * @property {number|null} [ret] Ext4GetImpliedClusterAllocExitFtraceEvent ret
             */

            /**
             * Constructs a new Ext4GetImpliedClusterAllocExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4GetImpliedClusterAllocExitFtraceEvent.
             * @implements IExt4GetImpliedClusterAllocExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4GetImpliedClusterAllocExitFtraceEvent=} [p] Properties to set
             */
            function Ext4GetImpliedClusterAllocExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4GetImpliedClusterAllocExitFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent
             * @instance
             */
            Ext4GetImpliedClusterAllocExitFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4GetImpliedClusterAllocExitFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent
             * @instance
             */
            Ext4GetImpliedClusterAllocExitFtraceEvent.prototype.flags = 0;

            /**
             * Ext4GetImpliedClusterAllocExitFtraceEvent lblk.
             * @member {number} lblk
             * @memberof perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent
             * @instance
             */
            Ext4GetImpliedClusterAllocExitFtraceEvent.prototype.lblk = 0;

            /**
             * Ext4GetImpliedClusterAllocExitFtraceEvent pblk.
             * @member {number} pblk
             * @memberof perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent
             * @instance
             */
            Ext4GetImpliedClusterAllocExitFtraceEvent.prototype.pblk = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4GetImpliedClusterAllocExitFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent
             * @instance
             */
            Ext4GetImpliedClusterAllocExitFtraceEvent.prototype.len = 0;

            /**
             * Ext4GetImpliedClusterAllocExitFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent
             * @instance
             */
            Ext4GetImpliedClusterAllocExitFtraceEvent.prototype.ret = 0;

            /**
             * Creates a new Ext4GetImpliedClusterAllocExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4GetImpliedClusterAllocExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent} Ext4GetImpliedClusterAllocExitFtraceEvent instance
             */
            Ext4GetImpliedClusterAllocExitFtraceEvent.create = function create(properties) {
                return new Ext4GetImpliedClusterAllocExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4GetImpliedClusterAllocExitFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4GetImpliedClusterAllocExitFtraceEvent} m Ext4GetImpliedClusterAllocExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4GetImpliedClusterAllocExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(16).uint32(m.flags);
                if (m.lblk != null && Object.hasOwnProperty.call(m, "lblk"))
                    w.uint32(24).uint32(m.lblk);
                if (m.pblk != null && Object.hasOwnProperty.call(m, "pblk"))
                    w.uint32(32).uint64(m.pblk);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(40).uint32(m.len);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(48).int32(m.ret);
                return w;
            };

            /**
             * Encodes the specified Ext4GetImpliedClusterAllocExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4GetImpliedClusterAllocExitFtraceEvent} message Ext4GetImpliedClusterAllocExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4GetImpliedClusterAllocExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4GetImpliedClusterAllocExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent} Ext4GetImpliedClusterAllocExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4GetImpliedClusterAllocExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.flags = r.uint32();
                        break;
                    case 3:
                        m.lblk = r.uint32();
                        break;
                    case 4:
                        m.pblk = r.uint64();
                        break;
                    case 5:
                        m.len = r.uint32();
                        break;
                    case 6:
                        m.ret = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4GetImpliedClusterAllocExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent} Ext4GetImpliedClusterAllocExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4GetImpliedClusterAllocExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4GetImpliedClusterAllocExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4GetImpliedClusterAllocExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    if (!$util.isInteger(m.lblk))
                        return "lblk: integer expected";
                }
                if (m.pblk != null && m.hasOwnProperty("pblk")) {
                    if (!$util.isInteger(m.pblk) && !(m.pblk && $util.isInteger(m.pblk.low) && $util.isInteger(m.pblk.high)))
                        return "pblk: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4GetImpliedClusterAllocExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent} Ext4GetImpliedClusterAllocExitFtraceEvent
             */
            Ext4GetImpliedClusterAllocExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                if (d.lblk != null) {
                    m.lblk = d.lblk >>> 0;
                }
                if (d.pblk != null) {
                    if ($util.Long)
                        (m.pblk = $util.Long.fromValue(d.pblk)).unsigned = true;
                    else if (typeof d.pblk === "string")
                        m.pblk = parseInt(d.pblk, 10);
                    else if (typeof d.pblk === "number")
                        m.pblk = d.pblk;
                    else if (typeof d.pblk === "object")
                        m.pblk = new $util.LongBits(d.pblk.low >>> 0, d.pblk.high >>> 0).toNumber(true);
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4GetImpliedClusterAllocExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent} m Ext4GetImpliedClusterAllocExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4GetImpliedClusterAllocExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    d.flags = 0;
                    d.lblk = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pblk = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pblk = o.longs === String ? "0" : 0;
                    d.len = 0;
                    d.ret = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    d.lblk = m.lblk;
                }
                if (m.pblk != null && m.hasOwnProperty("pblk")) {
                    if (typeof m.pblk === "number")
                        d.pblk = o.longs === String ? String(m.pblk) : m.pblk;
                    else
                        d.pblk = o.longs === String ? $util.Long.prototype.toString.call(m.pblk) : o.longs === Number ? new $util.LongBits(m.pblk.low >>> 0, m.pblk.high >>> 0).toNumber(true) : m.pblk;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                return d;
            };

            /**
             * Converts this Ext4GetImpliedClusterAllocExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4GetImpliedClusterAllocExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4GetImpliedClusterAllocExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4GetImpliedClusterAllocExitFtraceEvent;
        })();

        protos.Ext4GetReservedClusterAllocFtraceEvent = (function() {

            /**
             * Properties of an Ext4GetReservedClusterAllocFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4GetReservedClusterAllocFtraceEvent
             * @property {number|null} [dev] Ext4GetReservedClusterAllocFtraceEvent dev
             * @property {number|null} [ino] Ext4GetReservedClusterAllocFtraceEvent ino
             * @property {number|null} [lblk] Ext4GetReservedClusterAllocFtraceEvent lblk
             * @property {number|null} [len] Ext4GetReservedClusterAllocFtraceEvent len
             */

            /**
             * Constructs a new Ext4GetReservedClusterAllocFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4GetReservedClusterAllocFtraceEvent.
             * @implements IExt4GetReservedClusterAllocFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4GetReservedClusterAllocFtraceEvent=} [p] Properties to set
             */
            function Ext4GetReservedClusterAllocFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4GetReservedClusterAllocFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent
             * @instance
             */
            Ext4GetReservedClusterAllocFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4GetReservedClusterAllocFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent
             * @instance
             */
            Ext4GetReservedClusterAllocFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4GetReservedClusterAllocFtraceEvent lblk.
             * @member {number} lblk
             * @memberof perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent
             * @instance
             */
            Ext4GetReservedClusterAllocFtraceEvent.prototype.lblk = 0;

            /**
             * Ext4GetReservedClusterAllocFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent
             * @instance
             */
            Ext4GetReservedClusterAllocFtraceEvent.prototype.len = 0;

            /**
             * Creates a new Ext4GetReservedClusterAllocFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4GetReservedClusterAllocFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent} Ext4GetReservedClusterAllocFtraceEvent instance
             */
            Ext4GetReservedClusterAllocFtraceEvent.create = function create(properties) {
                return new Ext4GetReservedClusterAllocFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4GetReservedClusterAllocFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4GetReservedClusterAllocFtraceEvent} m Ext4GetReservedClusterAllocFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4GetReservedClusterAllocFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.lblk != null && Object.hasOwnProperty.call(m, "lblk"))
                    w.uint32(24).uint32(m.lblk);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).uint32(m.len);
                return w;
            };

            /**
             * Encodes the specified Ext4GetReservedClusterAllocFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4GetReservedClusterAllocFtraceEvent} message Ext4GetReservedClusterAllocFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4GetReservedClusterAllocFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4GetReservedClusterAllocFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent} Ext4GetReservedClusterAllocFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4GetReservedClusterAllocFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.lblk = r.uint32();
                        break;
                    case 4:
                        m.len = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4GetReservedClusterAllocFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent} Ext4GetReservedClusterAllocFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4GetReservedClusterAllocFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4GetReservedClusterAllocFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4GetReservedClusterAllocFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    if (!$util.isInteger(m.lblk))
                        return "lblk: integer expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4GetReservedClusterAllocFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent} Ext4GetReservedClusterAllocFtraceEvent
             */
            Ext4GetReservedClusterAllocFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.lblk != null) {
                    m.lblk = d.lblk >>> 0;
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4GetReservedClusterAllocFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent} m Ext4GetReservedClusterAllocFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4GetReservedClusterAllocFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.lblk = 0;
                    d.len = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    d.lblk = m.lblk;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                return d;
            };

            /**
             * Converts this Ext4GetReservedClusterAllocFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4GetReservedClusterAllocFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4GetReservedClusterAllocFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4GetReservedClusterAllocFtraceEvent;
        })();

        protos.Ext4IndMapBlocksEnterFtraceEvent = (function() {

            /**
             * Properties of an Ext4IndMapBlocksEnterFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4IndMapBlocksEnterFtraceEvent
             * @property {number|null} [dev] Ext4IndMapBlocksEnterFtraceEvent dev
             * @property {number|null} [ino] Ext4IndMapBlocksEnterFtraceEvent ino
             * @property {number|null} [lblk] Ext4IndMapBlocksEnterFtraceEvent lblk
             * @property {number|null} [len] Ext4IndMapBlocksEnterFtraceEvent len
             * @property {number|null} [flags] Ext4IndMapBlocksEnterFtraceEvent flags
             */

            /**
             * Constructs a new Ext4IndMapBlocksEnterFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4IndMapBlocksEnterFtraceEvent.
             * @implements IExt4IndMapBlocksEnterFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4IndMapBlocksEnterFtraceEvent=} [p] Properties to set
             */
            function Ext4IndMapBlocksEnterFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4IndMapBlocksEnterFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent
             * @instance
             */
            Ext4IndMapBlocksEnterFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4IndMapBlocksEnterFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent
             * @instance
             */
            Ext4IndMapBlocksEnterFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4IndMapBlocksEnterFtraceEvent lblk.
             * @member {number} lblk
             * @memberof perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent
             * @instance
             */
            Ext4IndMapBlocksEnterFtraceEvent.prototype.lblk = 0;

            /**
             * Ext4IndMapBlocksEnterFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent
             * @instance
             */
            Ext4IndMapBlocksEnterFtraceEvent.prototype.len = 0;

            /**
             * Ext4IndMapBlocksEnterFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent
             * @instance
             */
            Ext4IndMapBlocksEnterFtraceEvent.prototype.flags = 0;

            /**
             * Creates a new Ext4IndMapBlocksEnterFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4IndMapBlocksEnterFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent} Ext4IndMapBlocksEnterFtraceEvent instance
             */
            Ext4IndMapBlocksEnterFtraceEvent.create = function create(properties) {
                return new Ext4IndMapBlocksEnterFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4IndMapBlocksEnterFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4IndMapBlocksEnterFtraceEvent} m Ext4IndMapBlocksEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4IndMapBlocksEnterFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.lblk != null && Object.hasOwnProperty.call(m, "lblk"))
                    w.uint32(24).uint32(m.lblk);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).uint32(m.len);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(40).uint32(m.flags);
                return w;
            };

            /**
             * Encodes the specified Ext4IndMapBlocksEnterFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4IndMapBlocksEnterFtraceEvent} message Ext4IndMapBlocksEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4IndMapBlocksEnterFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4IndMapBlocksEnterFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent} Ext4IndMapBlocksEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4IndMapBlocksEnterFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.lblk = r.uint32();
                        break;
                    case 4:
                        m.len = r.uint32();
                        break;
                    case 5:
                        m.flags = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4IndMapBlocksEnterFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent} Ext4IndMapBlocksEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4IndMapBlocksEnterFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4IndMapBlocksEnterFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4IndMapBlocksEnterFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    if (!$util.isInteger(m.lblk))
                        return "lblk: integer expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4IndMapBlocksEnterFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent} Ext4IndMapBlocksEnterFtraceEvent
             */
            Ext4IndMapBlocksEnterFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.lblk != null) {
                    m.lblk = d.lblk >>> 0;
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4IndMapBlocksEnterFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent} m Ext4IndMapBlocksEnterFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4IndMapBlocksEnterFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.lblk = 0;
                    d.len = 0;
                    d.flags = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    d.lblk = m.lblk;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                return d;
            };

            /**
             * Converts this Ext4IndMapBlocksEnterFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4IndMapBlocksEnterFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4IndMapBlocksEnterFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4IndMapBlocksEnterFtraceEvent;
        })();

        protos.Ext4IndMapBlocksExitFtraceEvent = (function() {

            /**
             * Properties of an Ext4IndMapBlocksExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4IndMapBlocksExitFtraceEvent
             * @property {number|null} [dev] Ext4IndMapBlocksExitFtraceEvent dev
             * @property {number|null} [ino] Ext4IndMapBlocksExitFtraceEvent ino
             * @property {number|null} [flags] Ext4IndMapBlocksExitFtraceEvent flags
             * @property {number|null} [pblk] Ext4IndMapBlocksExitFtraceEvent pblk
             * @property {number|null} [lblk] Ext4IndMapBlocksExitFtraceEvent lblk
             * @property {number|null} [len] Ext4IndMapBlocksExitFtraceEvent len
             * @property {number|null} [mflags] Ext4IndMapBlocksExitFtraceEvent mflags
             * @property {number|null} [ret] Ext4IndMapBlocksExitFtraceEvent ret
             */

            /**
             * Constructs a new Ext4IndMapBlocksExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4IndMapBlocksExitFtraceEvent.
             * @implements IExt4IndMapBlocksExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4IndMapBlocksExitFtraceEvent=} [p] Properties to set
             */
            function Ext4IndMapBlocksExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4IndMapBlocksExitFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4IndMapBlocksExitFtraceEvent
             * @instance
             */
            Ext4IndMapBlocksExitFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4IndMapBlocksExitFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4IndMapBlocksExitFtraceEvent
             * @instance
             */
            Ext4IndMapBlocksExitFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4IndMapBlocksExitFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.Ext4IndMapBlocksExitFtraceEvent
             * @instance
             */
            Ext4IndMapBlocksExitFtraceEvent.prototype.flags = 0;

            /**
             * Ext4IndMapBlocksExitFtraceEvent pblk.
             * @member {number} pblk
             * @memberof perfetto.protos.Ext4IndMapBlocksExitFtraceEvent
             * @instance
             */
            Ext4IndMapBlocksExitFtraceEvent.prototype.pblk = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4IndMapBlocksExitFtraceEvent lblk.
             * @member {number} lblk
             * @memberof perfetto.protos.Ext4IndMapBlocksExitFtraceEvent
             * @instance
             */
            Ext4IndMapBlocksExitFtraceEvent.prototype.lblk = 0;

            /**
             * Ext4IndMapBlocksExitFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4IndMapBlocksExitFtraceEvent
             * @instance
             */
            Ext4IndMapBlocksExitFtraceEvent.prototype.len = 0;

            /**
             * Ext4IndMapBlocksExitFtraceEvent mflags.
             * @member {number} mflags
             * @memberof perfetto.protos.Ext4IndMapBlocksExitFtraceEvent
             * @instance
             */
            Ext4IndMapBlocksExitFtraceEvent.prototype.mflags = 0;

            /**
             * Ext4IndMapBlocksExitFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.Ext4IndMapBlocksExitFtraceEvent
             * @instance
             */
            Ext4IndMapBlocksExitFtraceEvent.prototype.ret = 0;

            /**
             * Creates a new Ext4IndMapBlocksExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4IndMapBlocksExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4IndMapBlocksExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4IndMapBlocksExitFtraceEvent} Ext4IndMapBlocksExitFtraceEvent instance
             */
            Ext4IndMapBlocksExitFtraceEvent.create = function create(properties) {
                return new Ext4IndMapBlocksExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4IndMapBlocksExitFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4IndMapBlocksExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4IndMapBlocksExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4IndMapBlocksExitFtraceEvent} m Ext4IndMapBlocksExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4IndMapBlocksExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(24).uint32(m.flags);
                if (m.pblk != null && Object.hasOwnProperty.call(m, "pblk"))
                    w.uint32(32).uint64(m.pblk);
                if (m.lblk != null && Object.hasOwnProperty.call(m, "lblk"))
                    w.uint32(40).uint32(m.lblk);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(48).uint32(m.len);
                if (m.mflags != null && Object.hasOwnProperty.call(m, "mflags"))
                    w.uint32(56).uint32(m.mflags);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(64).int32(m.ret);
                return w;
            };

            /**
             * Encodes the specified Ext4IndMapBlocksExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4IndMapBlocksExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4IndMapBlocksExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4IndMapBlocksExitFtraceEvent} message Ext4IndMapBlocksExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4IndMapBlocksExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4IndMapBlocksExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4IndMapBlocksExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4IndMapBlocksExitFtraceEvent} Ext4IndMapBlocksExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4IndMapBlocksExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4IndMapBlocksExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.flags = r.uint32();
                        break;
                    case 4:
                        m.pblk = r.uint64();
                        break;
                    case 5:
                        m.lblk = r.uint32();
                        break;
                    case 6:
                        m.len = r.uint32();
                        break;
                    case 7:
                        m.mflags = r.uint32();
                        break;
                    case 8:
                        m.ret = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4IndMapBlocksExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4IndMapBlocksExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4IndMapBlocksExitFtraceEvent} Ext4IndMapBlocksExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4IndMapBlocksExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4IndMapBlocksExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4IndMapBlocksExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4IndMapBlocksExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.pblk != null && m.hasOwnProperty("pblk")) {
                    if (!$util.isInteger(m.pblk) && !(m.pblk && $util.isInteger(m.pblk.low) && $util.isInteger(m.pblk.high)))
                        return "pblk: integer|Long expected";
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    if (!$util.isInteger(m.lblk))
                        return "lblk: integer expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.mflags != null && m.hasOwnProperty("mflags")) {
                    if (!$util.isInteger(m.mflags))
                        return "mflags: integer expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4IndMapBlocksExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4IndMapBlocksExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4IndMapBlocksExitFtraceEvent} Ext4IndMapBlocksExitFtraceEvent
             */
            Ext4IndMapBlocksExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4IndMapBlocksExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4IndMapBlocksExitFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                if (d.pblk != null) {
                    if ($util.Long)
                        (m.pblk = $util.Long.fromValue(d.pblk)).unsigned = true;
                    else if (typeof d.pblk === "string")
                        m.pblk = parseInt(d.pblk, 10);
                    else if (typeof d.pblk === "number")
                        m.pblk = d.pblk;
                    else if (typeof d.pblk === "object")
                        m.pblk = new $util.LongBits(d.pblk.low >>> 0, d.pblk.high >>> 0).toNumber(true);
                }
                if (d.lblk != null) {
                    m.lblk = d.lblk >>> 0;
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.mflags != null) {
                    m.mflags = d.mflags >>> 0;
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4IndMapBlocksExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4IndMapBlocksExitFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4IndMapBlocksExitFtraceEvent} m Ext4IndMapBlocksExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4IndMapBlocksExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.flags = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pblk = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pblk = o.longs === String ? "0" : 0;
                    d.lblk = 0;
                    d.len = 0;
                    d.mflags = 0;
                    d.ret = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.pblk != null && m.hasOwnProperty("pblk")) {
                    if (typeof m.pblk === "number")
                        d.pblk = o.longs === String ? String(m.pblk) : m.pblk;
                    else
                        d.pblk = o.longs === String ? $util.Long.prototype.toString.call(m.pblk) : o.longs === Number ? new $util.LongBits(m.pblk.low >>> 0, m.pblk.high >>> 0).toNumber(true) : m.pblk;
                }
                if (m.lblk != null && m.hasOwnProperty("lblk")) {
                    d.lblk = m.lblk;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.mflags != null && m.hasOwnProperty("mflags")) {
                    d.mflags = m.mflags;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                return d;
            };

            /**
             * Converts this Ext4IndMapBlocksExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4IndMapBlocksExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4IndMapBlocksExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4IndMapBlocksExitFtraceEvent;
        })();

        protos.Ext4InsertRangeFtraceEvent = (function() {

            /**
             * Properties of an Ext4InsertRangeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4InsertRangeFtraceEvent
             * @property {number|null} [dev] Ext4InsertRangeFtraceEvent dev
             * @property {number|null} [ino] Ext4InsertRangeFtraceEvent ino
             * @property {number|null} [offset] Ext4InsertRangeFtraceEvent offset
             * @property {number|null} [len] Ext4InsertRangeFtraceEvent len
             */

            /**
             * Constructs a new Ext4InsertRangeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4InsertRangeFtraceEvent.
             * @implements IExt4InsertRangeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4InsertRangeFtraceEvent=} [p] Properties to set
             */
            function Ext4InsertRangeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4InsertRangeFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4InsertRangeFtraceEvent
             * @instance
             */
            Ext4InsertRangeFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4InsertRangeFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4InsertRangeFtraceEvent
             * @instance
             */
            Ext4InsertRangeFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4InsertRangeFtraceEvent offset.
             * @member {number} offset
             * @memberof perfetto.protos.Ext4InsertRangeFtraceEvent
             * @instance
             */
            Ext4InsertRangeFtraceEvent.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4InsertRangeFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4InsertRangeFtraceEvent
             * @instance
             */
            Ext4InsertRangeFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new Ext4InsertRangeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4InsertRangeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4InsertRangeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4InsertRangeFtraceEvent} Ext4InsertRangeFtraceEvent instance
             */
            Ext4InsertRangeFtraceEvent.create = function create(properties) {
                return new Ext4InsertRangeFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4InsertRangeFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4InsertRangeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4InsertRangeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4InsertRangeFtraceEvent} m Ext4InsertRangeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4InsertRangeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.offset != null && Object.hasOwnProperty.call(m, "offset"))
                    w.uint32(24).int64(m.offset);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).int64(m.len);
                return w;
            };

            /**
             * Encodes the specified Ext4InsertRangeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4InsertRangeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4InsertRangeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4InsertRangeFtraceEvent} message Ext4InsertRangeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4InsertRangeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4InsertRangeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4InsertRangeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4InsertRangeFtraceEvent} Ext4InsertRangeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4InsertRangeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4InsertRangeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.offset = r.int64();
                        break;
                    case 4:
                        m.len = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4InsertRangeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4InsertRangeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4InsertRangeFtraceEvent} Ext4InsertRangeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4InsertRangeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4InsertRangeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4InsertRangeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4InsertRangeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (!$util.isInteger(m.offset) && !(m.offset && $util.isInteger(m.offset.low) && $util.isInteger(m.offset.high)))
                        return "offset: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an Ext4InsertRangeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4InsertRangeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4InsertRangeFtraceEvent} Ext4InsertRangeFtraceEvent
             */
            Ext4InsertRangeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4InsertRangeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4InsertRangeFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.offset != null) {
                    if ($util.Long)
                        (m.offset = $util.Long.fromValue(d.offset)).unsigned = false;
                    else if (typeof d.offset === "string")
                        m.offset = parseInt(d.offset, 10);
                    else if (typeof d.offset === "number")
                        m.offset = d.offset;
                    else if (typeof d.offset === "object")
                        m.offset = new $util.LongBits(d.offset.low >>> 0, d.offset.high >>> 0).toNumber();
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = false;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4InsertRangeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4InsertRangeFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4InsertRangeFtraceEvent} m Ext4InsertRangeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4InsertRangeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.offset = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.offset = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (typeof m.offset === "number")
                        d.offset = o.longs === String ? String(m.offset) : m.offset;
                    else
                        d.offset = o.longs === String ? $util.Long.prototype.toString.call(m.offset) : o.longs === Number ? new $util.LongBits(m.offset.low >>> 0, m.offset.high >>> 0).toNumber() : m.offset;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber() : m.len;
                }
                return d;
            };

            /**
             * Converts this Ext4InsertRangeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4InsertRangeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4InsertRangeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4InsertRangeFtraceEvent;
        })();

        protos.Ext4InvalidatepageFtraceEvent = (function() {

            /**
             * Properties of an Ext4InvalidatepageFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4InvalidatepageFtraceEvent
             * @property {number|null} [dev] Ext4InvalidatepageFtraceEvent dev
             * @property {number|null} [ino] Ext4InvalidatepageFtraceEvent ino
             * @property {number|null} [index] Ext4InvalidatepageFtraceEvent index
             * @property {number|null} [offset] Ext4InvalidatepageFtraceEvent offset
             * @property {number|null} [length] Ext4InvalidatepageFtraceEvent length
             */

            /**
             * Constructs a new Ext4InvalidatepageFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4InvalidatepageFtraceEvent.
             * @implements IExt4InvalidatepageFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4InvalidatepageFtraceEvent=} [p] Properties to set
             */
            function Ext4InvalidatepageFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4InvalidatepageFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4InvalidatepageFtraceEvent
             * @instance
             */
            Ext4InvalidatepageFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4InvalidatepageFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4InvalidatepageFtraceEvent
             * @instance
             */
            Ext4InvalidatepageFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4InvalidatepageFtraceEvent index.
             * @member {number} index
             * @memberof perfetto.protos.Ext4InvalidatepageFtraceEvent
             * @instance
             */
            Ext4InvalidatepageFtraceEvent.prototype.index = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4InvalidatepageFtraceEvent offset.
             * @member {number} offset
             * @memberof perfetto.protos.Ext4InvalidatepageFtraceEvent
             * @instance
             */
            Ext4InvalidatepageFtraceEvent.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4InvalidatepageFtraceEvent length.
             * @member {number} length
             * @memberof perfetto.protos.Ext4InvalidatepageFtraceEvent
             * @instance
             */
            Ext4InvalidatepageFtraceEvent.prototype.length = 0;

            /**
             * Creates a new Ext4InvalidatepageFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4InvalidatepageFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4InvalidatepageFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4InvalidatepageFtraceEvent} Ext4InvalidatepageFtraceEvent instance
             */
            Ext4InvalidatepageFtraceEvent.create = function create(properties) {
                return new Ext4InvalidatepageFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4InvalidatepageFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4InvalidatepageFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4InvalidatepageFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4InvalidatepageFtraceEvent} m Ext4InvalidatepageFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4InvalidatepageFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.index != null && Object.hasOwnProperty.call(m, "index"))
                    w.uint32(24).uint64(m.index);
                if (m.offset != null && Object.hasOwnProperty.call(m, "offset"))
                    w.uint32(32).uint64(m.offset);
                if (m.length != null && Object.hasOwnProperty.call(m, "length"))
                    w.uint32(40).uint32(m.length);
                return w;
            };

            /**
             * Encodes the specified Ext4InvalidatepageFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4InvalidatepageFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4InvalidatepageFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4InvalidatepageFtraceEvent} message Ext4InvalidatepageFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4InvalidatepageFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4InvalidatepageFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4InvalidatepageFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4InvalidatepageFtraceEvent} Ext4InvalidatepageFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4InvalidatepageFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4InvalidatepageFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.index = r.uint64();
                        break;
                    case 4:
                        m.offset = r.uint64();
                        break;
                    case 5:
                        m.length = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4InvalidatepageFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4InvalidatepageFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4InvalidatepageFtraceEvent} Ext4InvalidatepageFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4InvalidatepageFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4InvalidatepageFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4InvalidatepageFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4InvalidatepageFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (!$util.isInteger(m.index) && !(m.index && $util.isInteger(m.index.low) && $util.isInteger(m.index.high)))
                        return "index: integer|Long expected";
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (!$util.isInteger(m.offset) && !(m.offset && $util.isInteger(m.offset.low) && $util.isInteger(m.offset.high)))
                        return "offset: integer|Long expected";
                }
                if (m.length != null && m.hasOwnProperty("length")) {
                    if (!$util.isInteger(m.length))
                        return "length: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4InvalidatepageFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4InvalidatepageFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4InvalidatepageFtraceEvent} Ext4InvalidatepageFtraceEvent
             */
            Ext4InvalidatepageFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4InvalidatepageFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4InvalidatepageFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.index != null) {
                    if ($util.Long)
                        (m.index = $util.Long.fromValue(d.index)).unsigned = true;
                    else if (typeof d.index === "string")
                        m.index = parseInt(d.index, 10);
                    else if (typeof d.index === "number")
                        m.index = d.index;
                    else if (typeof d.index === "object")
                        m.index = new $util.LongBits(d.index.low >>> 0, d.index.high >>> 0).toNumber(true);
                }
                if (d.offset != null) {
                    if ($util.Long)
                        (m.offset = $util.Long.fromValue(d.offset)).unsigned = true;
                    else if (typeof d.offset === "string")
                        m.offset = parseInt(d.offset, 10);
                    else if (typeof d.offset === "number")
                        m.offset = d.offset;
                    else if (typeof d.offset === "object")
                        m.offset = new $util.LongBits(d.offset.low >>> 0, d.offset.high >>> 0).toNumber(true);
                }
                if (d.length != null) {
                    m.length = d.length >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4InvalidatepageFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4InvalidatepageFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4InvalidatepageFtraceEvent} m Ext4InvalidatepageFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4InvalidatepageFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.index = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.index = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.offset = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.offset = o.longs === String ? "0" : 0;
                    d.length = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (typeof m.index === "number")
                        d.index = o.longs === String ? String(m.index) : m.index;
                    else
                        d.index = o.longs === String ? $util.Long.prototype.toString.call(m.index) : o.longs === Number ? new $util.LongBits(m.index.low >>> 0, m.index.high >>> 0).toNumber(true) : m.index;
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (typeof m.offset === "number")
                        d.offset = o.longs === String ? String(m.offset) : m.offset;
                    else
                        d.offset = o.longs === String ? $util.Long.prototype.toString.call(m.offset) : o.longs === Number ? new $util.LongBits(m.offset.low >>> 0, m.offset.high >>> 0).toNumber(true) : m.offset;
                }
                if (m.length != null && m.hasOwnProperty("length")) {
                    d.length = m.length;
                }
                return d;
            };

            /**
             * Converts this Ext4InvalidatepageFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4InvalidatepageFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4InvalidatepageFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4InvalidatepageFtraceEvent;
        })();

        protos.Ext4JournalStartFtraceEvent = (function() {

            /**
             * Properties of an Ext4JournalStartFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4JournalStartFtraceEvent
             * @property {number|null} [dev] Ext4JournalStartFtraceEvent dev
             * @property {number|null} [ip] Ext4JournalStartFtraceEvent ip
             * @property {number|null} [blocks] Ext4JournalStartFtraceEvent blocks
             * @property {number|null} [rsvBlocks] Ext4JournalStartFtraceEvent rsvBlocks
             * @property {number|null} [nblocks] Ext4JournalStartFtraceEvent nblocks
             * @property {number|null} [revokeCreds] Ext4JournalStartFtraceEvent revokeCreds
             */

            /**
             * Constructs a new Ext4JournalStartFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4JournalStartFtraceEvent.
             * @implements IExt4JournalStartFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4JournalStartFtraceEvent=} [p] Properties to set
             */
            function Ext4JournalStartFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4JournalStartFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4JournalStartFtraceEvent
             * @instance
             */
            Ext4JournalStartFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4JournalStartFtraceEvent ip.
             * @member {number} ip
             * @memberof perfetto.protos.Ext4JournalStartFtraceEvent
             * @instance
             */
            Ext4JournalStartFtraceEvent.prototype.ip = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4JournalStartFtraceEvent blocks.
             * @member {number} blocks
             * @memberof perfetto.protos.Ext4JournalStartFtraceEvent
             * @instance
             */
            Ext4JournalStartFtraceEvent.prototype.blocks = 0;

            /**
             * Ext4JournalStartFtraceEvent rsvBlocks.
             * @member {number} rsvBlocks
             * @memberof perfetto.protos.Ext4JournalStartFtraceEvent
             * @instance
             */
            Ext4JournalStartFtraceEvent.prototype.rsvBlocks = 0;

            /**
             * Ext4JournalStartFtraceEvent nblocks.
             * @member {number} nblocks
             * @memberof perfetto.protos.Ext4JournalStartFtraceEvent
             * @instance
             */
            Ext4JournalStartFtraceEvent.prototype.nblocks = 0;

            /**
             * Ext4JournalStartFtraceEvent revokeCreds.
             * @member {number} revokeCreds
             * @memberof perfetto.protos.Ext4JournalStartFtraceEvent
             * @instance
             */
            Ext4JournalStartFtraceEvent.prototype.revokeCreds = 0;

            /**
             * Creates a new Ext4JournalStartFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4JournalStartFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4JournalStartFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4JournalStartFtraceEvent} Ext4JournalStartFtraceEvent instance
             */
            Ext4JournalStartFtraceEvent.create = function create(properties) {
                return new Ext4JournalStartFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4JournalStartFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4JournalStartFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4JournalStartFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4JournalStartFtraceEvent} m Ext4JournalStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4JournalStartFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ip != null && Object.hasOwnProperty.call(m, "ip"))
                    w.uint32(16).uint64(m.ip);
                if (m.blocks != null && Object.hasOwnProperty.call(m, "blocks"))
                    w.uint32(24).int32(m.blocks);
                if (m.rsvBlocks != null && Object.hasOwnProperty.call(m, "rsvBlocks"))
                    w.uint32(32).int32(m.rsvBlocks);
                if (m.nblocks != null && Object.hasOwnProperty.call(m, "nblocks"))
                    w.uint32(40).int32(m.nblocks);
                if (m.revokeCreds != null && Object.hasOwnProperty.call(m, "revokeCreds"))
                    w.uint32(48).int32(m.revokeCreds);
                return w;
            };

            /**
             * Encodes the specified Ext4JournalStartFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4JournalStartFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4JournalStartFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4JournalStartFtraceEvent} message Ext4JournalStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4JournalStartFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4JournalStartFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4JournalStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4JournalStartFtraceEvent} Ext4JournalStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4JournalStartFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4JournalStartFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ip = r.uint64();
                        break;
                    case 3:
                        m.blocks = r.int32();
                        break;
                    case 4:
                        m.rsvBlocks = r.int32();
                        break;
                    case 5:
                        m.nblocks = r.int32();
                        break;
                    case 6:
                        m.revokeCreds = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4JournalStartFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4JournalStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4JournalStartFtraceEvent} Ext4JournalStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4JournalStartFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4JournalStartFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4JournalStartFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4JournalStartFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ip != null && m.hasOwnProperty("ip")) {
                    if (!$util.isInteger(m.ip) && !(m.ip && $util.isInteger(m.ip.low) && $util.isInteger(m.ip.high)))
                        return "ip: integer|Long expected";
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (!$util.isInteger(m.blocks))
                        return "blocks: integer expected";
                }
                if (m.rsvBlocks != null && m.hasOwnProperty("rsvBlocks")) {
                    if (!$util.isInteger(m.rsvBlocks))
                        return "rsvBlocks: integer expected";
                }
                if (m.nblocks != null && m.hasOwnProperty("nblocks")) {
                    if (!$util.isInteger(m.nblocks))
                        return "nblocks: integer expected";
                }
                if (m.revokeCreds != null && m.hasOwnProperty("revokeCreds")) {
                    if (!$util.isInteger(m.revokeCreds))
                        return "revokeCreds: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4JournalStartFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4JournalStartFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4JournalStartFtraceEvent} Ext4JournalStartFtraceEvent
             */
            Ext4JournalStartFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4JournalStartFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4JournalStartFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ip != null) {
                    if ($util.Long)
                        (m.ip = $util.Long.fromValue(d.ip)).unsigned = true;
                    else if (typeof d.ip === "string")
                        m.ip = parseInt(d.ip, 10);
                    else if (typeof d.ip === "number")
                        m.ip = d.ip;
                    else if (typeof d.ip === "object")
                        m.ip = new $util.LongBits(d.ip.low >>> 0, d.ip.high >>> 0).toNumber(true);
                }
                if (d.blocks != null) {
                    m.blocks = d.blocks | 0;
                }
                if (d.rsvBlocks != null) {
                    m.rsvBlocks = d.rsvBlocks | 0;
                }
                if (d.nblocks != null) {
                    m.nblocks = d.nblocks | 0;
                }
                if (d.revokeCreds != null) {
                    m.revokeCreds = d.revokeCreds | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4JournalStartFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4JournalStartFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4JournalStartFtraceEvent} m Ext4JournalStartFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4JournalStartFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ip = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ip = o.longs === String ? "0" : 0;
                    d.blocks = 0;
                    d.rsvBlocks = 0;
                    d.nblocks = 0;
                    d.revokeCreds = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ip != null && m.hasOwnProperty("ip")) {
                    if (typeof m.ip === "number")
                        d.ip = o.longs === String ? String(m.ip) : m.ip;
                    else
                        d.ip = o.longs === String ? $util.Long.prototype.toString.call(m.ip) : o.longs === Number ? new $util.LongBits(m.ip.low >>> 0, m.ip.high >>> 0).toNumber(true) : m.ip;
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    d.blocks = m.blocks;
                }
                if (m.rsvBlocks != null && m.hasOwnProperty("rsvBlocks")) {
                    d.rsvBlocks = m.rsvBlocks;
                }
                if (m.nblocks != null && m.hasOwnProperty("nblocks")) {
                    d.nblocks = m.nblocks;
                }
                if (m.revokeCreds != null && m.hasOwnProperty("revokeCreds")) {
                    d.revokeCreds = m.revokeCreds;
                }
                return d;
            };

            /**
             * Converts this Ext4JournalStartFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4JournalStartFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4JournalStartFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4JournalStartFtraceEvent;
        })();

        protos.Ext4JournalStartReservedFtraceEvent = (function() {

            /**
             * Properties of an Ext4JournalStartReservedFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4JournalStartReservedFtraceEvent
             * @property {number|null} [dev] Ext4JournalStartReservedFtraceEvent dev
             * @property {number|null} [ip] Ext4JournalStartReservedFtraceEvent ip
             * @property {number|null} [blocks] Ext4JournalStartReservedFtraceEvent blocks
             */

            /**
             * Constructs a new Ext4JournalStartReservedFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4JournalStartReservedFtraceEvent.
             * @implements IExt4JournalStartReservedFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4JournalStartReservedFtraceEvent=} [p] Properties to set
             */
            function Ext4JournalStartReservedFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4JournalStartReservedFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4JournalStartReservedFtraceEvent
             * @instance
             */
            Ext4JournalStartReservedFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4JournalStartReservedFtraceEvent ip.
             * @member {number} ip
             * @memberof perfetto.protos.Ext4JournalStartReservedFtraceEvent
             * @instance
             */
            Ext4JournalStartReservedFtraceEvent.prototype.ip = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4JournalStartReservedFtraceEvent blocks.
             * @member {number} blocks
             * @memberof perfetto.protos.Ext4JournalStartReservedFtraceEvent
             * @instance
             */
            Ext4JournalStartReservedFtraceEvent.prototype.blocks = 0;

            /**
             * Creates a new Ext4JournalStartReservedFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4JournalStartReservedFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4JournalStartReservedFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4JournalStartReservedFtraceEvent} Ext4JournalStartReservedFtraceEvent instance
             */
            Ext4JournalStartReservedFtraceEvent.create = function create(properties) {
                return new Ext4JournalStartReservedFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4JournalStartReservedFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4JournalStartReservedFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4JournalStartReservedFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4JournalStartReservedFtraceEvent} m Ext4JournalStartReservedFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4JournalStartReservedFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ip != null && Object.hasOwnProperty.call(m, "ip"))
                    w.uint32(16).uint64(m.ip);
                if (m.blocks != null && Object.hasOwnProperty.call(m, "blocks"))
                    w.uint32(24).int32(m.blocks);
                return w;
            };

            /**
             * Encodes the specified Ext4JournalStartReservedFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4JournalStartReservedFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4JournalStartReservedFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4JournalStartReservedFtraceEvent} message Ext4JournalStartReservedFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4JournalStartReservedFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4JournalStartReservedFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4JournalStartReservedFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4JournalStartReservedFtraceEvent} Ext4JournalStartReservedFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4JournalStartReservedFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4JournalStartReservedFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ip = r.uint64();
                        break;
                    case 3:
                        m.blocks = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4JournalStartReservedFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4JournalStartReservedFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4JournalStartReservedFtraceEvent} Ext4JournalStartReservedFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4JournalStartReservedFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4JournalStartReservedFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4JournalStartReservedFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4JournalStartReservedFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ip != null && m.hasOwnProperty("ip")) {
                    if (!$util.isInteger(m.ip) && !(m.ip && $util.isInteger(m.ip.low) && $util.isInteger(m.ip.high)))
                        return "ip: integer|Long expected";
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (!$util.isInteger(m.blocks))
                        return "blocks: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4JournalStartReservedFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4JournalStartReservedFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4JournalStartReservedFtraceEvent} Ext4JournalStartReservedFtraceEvent
             */
            Ext4JournalStartReservedFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4JournalStartReservedFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4JournalStartReservedFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ip != null) {
                    if ($util.Long)
                        (m.ip = $util.Long.fromValue(d.ip)).unsigned = true;
                    else if (typeof d.ip === "string")
                        m.ip = parseInt(d.ip, 10);
                    else if (typeof d.ip === "number")
                        m.ip = d.ip;
                    else if (typeof d.ip === "object")
                        m.ip = new $util.LongBits(d.ip.low >>> 0, d.ip.high >>> 0).toNumber(true);
                }
                if (d.blocks != null) {
                    m.blocks = d.blocks | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4JournalStartReservedFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4JournalStartReservedFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4JournalStartReservedFtraceEvent} m Ext4JournalStartReservedFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4JournalStartReservedFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ip = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ip = o.longs === String ? "0" : 0;
                    d.blocks = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ip != null && m.hasOwnProperty("ip")) {
                    if (typeof m.ip === "number")
                        d.ip = o.longs === String ? String(m.ip) : m.ip;
                    else
                        d.ip = o.longs === String ? $util.Long.prototype.toString.call(m.ip) : o.longs === Number ? new $util.LongBits(m.ip.low >>> 0, m.ip.high >>> 0).toNumber(true) : m.ip;
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    d.blocks = m.blocks;
                }
                return d;
            };

            /**
             * Converts this Ext4JournalStartReservedFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4JournalStartReservedFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4JournalStartReservedFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4JournalStartReservedFtraceEvent;
        })();

        protos.Ext4JournalledInvalidatepageFtraceEvent = (function() {

            /**
             * Properties of an Ext4JournalledInvalidatepageFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4JournalledInvalidatepageFtraceEvent
             * @property {number|null} [dev] Ext4JournalledInvalidatepageFtraceEvent dev
             * @property {number|null} [ino] Ext4JournalledInvalidatepageFtraceEvent ino
             * @property {number|null} [index] Ext4JournalledInvalidatepageFtraceEvent index
             * @property {number|null} [offset] Ext4JournalledInvalidatepageFtraceEvent offset
             * @property {number|null} [length] Ext4JournalledInvalidatepageFtraceEvent length
             */

            /**
             * Constructs a new Ext4JournalledInvalidatepageFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4JournalledInvalidatepageFtraceEvent.
             * @implements IExt4JournalledInvalidatepageFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4JournalledInvalidatepageFtraceEvent=} [p] Properties to set
             */
            function Ext4JournalledInvalidatepageFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4JournalledInvalidatepageFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent
             * @instance
             */
            Ext4JournalledInvalidatepageFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4JournalledInvalidatepageFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent
             * @instance
             */
            Ext4JournalledInvalidatepageFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4JournalledInvalidatepageFtraceEvent index.
             * @member {number} index
             * @memberof perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent
             * @instance
             */
            Ext4JournalledInvalidatepageFtraceEvent.prototype.index = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4JournalledInvalidatepageFtraceEvent offset.
             * @member {number} offset
             * @memberof perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent
             * @instance
             */
            Ext4JournalledInvalidatepageFtraceEvent.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4JournalledInvalidatepageFtraceEvent length.
             * @member {number} length
             * @memberof perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent
             * @instance
             */
            Ext4JournalledInvalidatepageFtraceEvent.prototype.length = 0;

            /**
             * Creates a new Ext4JournalledInvalidatepageFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4JournalledInvalidatepageFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent} Ext4JournalledInvalidatepageFtraceEvent instance
             */
            Ext4JournalledInvalidatepageFtraceEvent.create = function create(properties) {
                return new Ext4JournalledInvalidatepageFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4JournalledInvalidatepageFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4JournalledInvalidatepageFtraceEvent} m Ext4JournalledInvalidatepageFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4JournalledInvalidatepageFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.index != null && Object.hasOwnProperty.call(m, "index"))
                    w.uint32(24).uint64(m.index);
                if (m.offset != null && Object.hasOwnProperty.call(m, "offset"))
                    w.uint32(32).uint64(m.offset);
                if (m.length != null && Object.hasOwnProperty.call(m, "length"))
                    w.uint32(40).uint32(m.length);
                return w;
            };

            /**
             * Encodes the specified Ext4JournalledInvalidatepageFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4JournalledInvalidatepageFtraceEvent} message Ext4JournalledInvalidatepageFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4JournalledInvalidatepageFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4JournalledInvalidatepageFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent} Ext4JournalledInvalidatepageFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4JournalledInvalidatepageFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.index = r.uint64();
                        break;
                    case 4:
                        m.offset = r.uint64();
                        break;
                    case 5:
                        m.length = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4JournalledInvalidatepageFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent} Ext4JournalledInvalidatepageFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4JournalledInvalidatepageFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4JournalledInvalidatepageFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4JournalledInvalidatepageFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (!$util.isInteger(m.index) && !(m.index && $util.isInteger(m.index.low) && $util.isInteger(m.index.high)))
                        return "index: integer|Long expected";
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (!$util.isInteger(m.offset) && !(m.offset && $util.isInteger(m.offset.low) && $util.isInteger(m.offset.high)))
                        return "offset: integer|Long expected";
                }
                if (m.length != null && m.hasOwnProperty("length")) {
                    if (!$util.isInteger(m.length))
                        return "length: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4JournalledInvalidatepageFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent} Ext4JournalledInvalidatepageFtraceEvent
             */
            Ext4JournalledInvalidatepageFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.index != null) {
                    if ($util.Long)
                        (m.index = $util.Long.fromValue(d.index)).unsigned = true;
                    else if (typeof d.index === "string")
                        m.index = parseInt(d.index, 10);
                    else if (typeof d.index === "number")
                        m.index = d.index;
                    else if (typeof d.index === "object")
                        m.index = new $util.LongBits(d.index.low >>> 0, d.index.high >>> 0).toNumber(true);
                }
                if (d.offset != null) {
                    if ($util.Long)
                        (m.offset = $util.Long.fromValue(d.offset)).unsigned = true;
                    else if (typeof d.offset === "string")
                        m.offset = parseInt(d.offset, 10);
                    else if (typeof d.offset === "number")
                        m.offset = d.offset;
                    else if (typeof d.offset === "object")
                        m.offset = new $util.LongBits(d.offset.low >>> 0, d.offset.high >>> 0).toNumber(true);
                }
                if (d.length != null) {
                    m.length = d.length >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4JournalledInvalidatepageFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent} m Ext4JournalledInvalidatepageFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4JournalledInvalidatepageFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.index = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.index = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.offset = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.offset = o.longs === String ? "0" : 0;
                    d.length = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (typeof m.index === "number")
                        d.index = o.longs === String ? String(m.index) : m.index;
                    else
                        d.index = o.longs === String ? $util.Long.prototype.toString.call(m.index) : o.longs === Number ? new $util.LongBits(m.index.low >>> 0, m.index.high >>> 0).toNumber(true) : m.index;
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (typeof m.offset === "number")
                        d.offset = o.longs === String ? String(m.offset) : m.offset;
                    else
                        d.offset = o.longs === String ? $util.Long.prototype.toString.call(m.offset) : o.longs === Number ? new $util.LongBits(m.offset.low >>> 0, m.offset.high >>> 0).toNumber(true) : m.offset;
                }
                if (m.length != null && m.hasOwnProperty("length")) {
                    d.length = m.length;
                }
                return d;
            };

            /**
             * Converts this Ext4JournalledInvalidatepageFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4JournalledInvalidatepageFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4JournalledInvalidatepageFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4JournalledInvalidatepageFtraceEvent;
        })();

        protos.Ext4JournalledWriteEndFtraceEvent = (function() {

            /**
             * Properties of an Ext4JournalledWriteEndFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4JournalledWriteEndFtraceEvent
             * @property {number|null} [dev] Ext4JournalledWriteEndFtraceEvent dev
             * @property {number|null} [ino] Ext4JournalledWriteEndFtraceEvent ino
             * @property {number|null} [pos] Ext4JournalledWriteEndFtraceEvent pos
             * @property {number|null} [len] Ext4JournalledWriteEndFtraceEvent len
             * @property {number|null} [copied] Ext4JournalledWriteEndFtraceEvent copied
             */

            /**
             * Constructs a new Ext4JournalledWriteEndFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4JournalledWriteEndFtraceEvent.
             * @implements IExt4JournalledWriteEndFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4JournalledWriteEndFtraceEvent=} [p] Properties to set
             */
            function Ext4JournalledWriteEndFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4JournalledWriteEndFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4JournalledWriteEndFtraceEvent
             * @instance
             */
            Ext4JournalledWriteEndFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4JournalledWriteEndFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4JournalledWriteEndFtraceEvent
             * @instance
             */
            Ext4JournalledWriteEndFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4JournalledWriteEndFtraceEvent pos.
             * @member {number} pos
             * @memberof perfetto.protos.Ext4JournalledWriteEndFtraceEvent
             * @instance
             */
            Ext4JournalledWriteEndFtraceEvent.prototype.pos = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4JournalledWriteEndFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4JournalledWriteEndFtraceEvent
             * @instance
             */
            Ext4JournalledWriteEndFtraceEvent.prototype.len = 0;

            /**
             * Ext4JournalledWriteEndFtraceEvent copied.
             * @member {number} copied
             * @memberof perfetto.protos.Ext4JournalledWriteEndFtraceEvent
             * @instance
             */
            Ext4JournalledWriteEndFtraceEvent.prototype.copied = 0;

            /**
             * Creates a new Ext4JournalledWriteEndFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4JournalledWriteEndFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4JournalledWriteEndFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4JournalledWriteEndFtraceEvent} Ext4JournalledWriteEndFtraceEvent instance
             */
            Ext4JournalledWriteEndFtraceEvent.create = function create(properties) {
                return new Ext4JournalledWriteEndFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4JournalledWriteEndFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4JournalledWriteEndFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4JournalledWriteEndFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4JournalledWriteEndFtraceEvent} m Ext4JournalledWriteEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4JournalledWriteEndFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.pos != null && Object.hasOwnProperty.call(m, "pos"))
                    w.uint32(24).int64(m.pos);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).uint32(m.len);
                if (m.copied != null && Object.hasOwnProperty.call(m, "copied"))
                    w.uint32(40).uint32(m.copied);
                return w;
            };

            /**
             * Encodes the specified Ext4JournalledWriteEndFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4JournalledWriteEndFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4JournalledWriteEndFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4JournalledWriteEndFtraceEvent} message Ext4JournalledWriteEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4JournalledWriteEndFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4JournalledWriteEndFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4JournalledWriteEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4JournalledWriteEndFtraceEvent} Ext4JournalledWriteEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4JournalledWriteEndFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4JournalledWriteEndFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.pos = r.int64();
                        break;
                    case 4:
                        m.len = r.uint32();
                        break;
                    case 5:
                        m.copied = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4JournalledWriteEndFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4JournalledWriteEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4JournalledWriteEndFtraceEvent} Ext4JournalledWriteEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4JournalledWriteEndFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4JournalledWriteEndFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4JournalledWriteEndFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4JournalledWriteEndFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.pos != null && m.hasOwnProperty("pos")) {
                    if (!$util.isInteger(m.pos) && !(m.pos && $util.isInteger(m.pos.low) && $util.isInteger(m.pos.high)))
                        return "pos: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.copied != null && m.hasOwnProperty("copied")) {
                    if (!$util.isInteger(m.copied))
                        return "copied: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4JournalledWriteEndFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4JournalledWriteEndFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4JournalledWriteEndFtraceEvent} Ext4JournalledWriteEndFtraceEvent
             */
            Ext4JournalledWriteEndFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4JournalledWriteEndFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4JournalledWriteEndFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.pos != null) {
                    if ($util.Long)
                        (m.pos = $util.Long.fromValue(d.pos)).unsigned = false;
                    else if (typeof d.pos === "string")
                        m.pos = parseInt(d.pos, 10);
                    else if (typeof d.pos === "number")
                        m.pos = d.pos;
                    else if (typeof d.pos === "object")
                        m.pos = new $util.LongBits(d.pos.low >>> 0, d.pos.high >>> 0).toNumber();
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.copied != null) {
                    m.copied = d.copied >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4JournalledWriteEndFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4JournalledWriteEndFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4JournalledWriteEndFtraceEvent} m Ext4JournalledWriteEndFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4JournalledWriteEndFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.pos = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pos = o.longs === String ? "0" : 0;
                    d.len = 0;
                    d.copied = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.pos != null && m.hasOwnProperty("pos")) {
                    if (typeof m.pos === "number")
                        d.pos = o.longs === String ? String(m.pos) : m.pos;
                    else
                        d.pos = o.longs === String ? $util.Long.prototype.toString.call(m.pos) : o.longs === Number ? new $util.LongBits(m.pos.low >>> 0, m.pos.high >>> 0).toNumber() : m.pos;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.copied != null && m.hasOwnProperty("copied")) {
                    d.copied = m.copied;
                }
                return d;
            };

            /**
             * Converts this Ext4JournalledWriteEndFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4JournalledWriteEndFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4JournalledWriteEndFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4JournalledWriteEndFtraceEvent;
        })();

        protos.Ext4LoadInodeFtraceEvent = (function() {

            /**
             * Properties of an Ext4LoadInodeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4LoadInodeFtraceEvent
             * @property {number|null} [dev] Ext4LoadInodeFtraceEvent dev
             * @property {number|null} [ino] Ext4LoadInodeFtraceEvent ino
             */

            /**
             * Constructs a new Ext4LoadInodeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4LoadInodeFtraceEvent.
             * @implements IExt4LoadInodeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4LoadInodeFtraceEvent=} [p] Properties to set
             */
            function Ext4LoadInodeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4LoadInodeFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4LoadInodeFtraceEvent
             * @instance
             */
            Ext4LoadInodeFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4LoadInodeFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4LoadInodeFtraceEvent
             * @instance
             */
            Ext4LoadInodeFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new Ext4LoadInodeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4LoadInodeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4LoadInodeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4LoadInodeFtraceEvent} Ext4LoadInodeFtraceEvent instance
             */
            Ext4LoadInodeFtraceEvent.create = function create(properties) {
                return new Ext4LoadInodeFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4LoadInodeFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4LoadInodeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4LoadInodeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4LoadInodeFtraceEvent} m Ext4LoadInodeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4LoadInodeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                return w;
            };

            /**
             * Encodes the specified Ext4LoadInodeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4LoadInodeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4LoadInodeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4LoadInodeFtraceEvent} message Ext4LoadInodeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4LoadInodeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4LoadInodeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4LoadInodeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4LoadInodeFtraceEvent} Ext4LoadInodeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4LoadInodeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4LoadInodeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4LoadInodeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4LoadInodeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4LoadInodeFtraceEvent} Ext4LoadInodeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4LoadInodeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4LoadInodeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4LoadInodeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4LoadInodeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an Ext4LoadInodeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4LoadInodeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4LoadInodeFtraceEvent} Ext4LoadInodeFtraceEvent
             */
            Ext4LoadInodeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4LoadInodeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4LoadInodeFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4LoadInodeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4LoadInodeFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4LoadInodeFtraceEvent} m Ext4LoadInodeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4LoadInodeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                return d;
            };

            /**
             * Converts this Ext4LoadInodeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4LoadInodeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4LoadInodeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4LoadInodeFtraceEvent;
        })();

        protos.Ext4LoadInodeBitmapFtraceEvent = (function() {

            /**
             * Properties of an Ext4LoadInodeBitmapFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4LoadInodeBitmapFtraceEvent
             * @property {number|null} [dev] Ext4LoadInodeBitmapFtraceEvent dev
             * @property {number|null} [group] Ext4LoadInodeBitmapFtraceEvent group
             */

            /**
             * Constructs a new Ext4LoadInodeBitmapFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4LoadInodeBitmapFtraceEvent.
             * @implements IExt4LoadInodeBitmapFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4LoadInodeBitmapFtraceEvent=} [p] Properties to set
             */
            function Ext4LoadInodeBitmapFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4LoadInodeBitmapFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4LoadInodeBitmapFtraceEvent
             * @instance
             */
            Ext4LoadInodeBitmapFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4LoadInodeBitmapFtraceEvent group.
             * @member {number} group
             * @memberof perfetto.protos.Ext4LoadInodeBitmapFtraceEvent
             * @instance
             */
            Ext4LoadInodeBitmapFtraceEvent.prototype.group = 0;

            /**
             * Creates a new Ext4LoadInodeBitmapFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4LoadInodeBitmapFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4LoadInodeBitmapFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4LoadInodeBitmapFtraceEvent} Ext4LoadInodeBitmapFtraceEvent instance
             */
            Ext4LoadInodeBitmapFtraceEvent.create = function create(properties) {
                return new Ext4LoadInodeBitmapFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4LoadInodeBitmapFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4LoadInodeBitmapFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4LoadInodeBitmapFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4LoadInodeBitmapFtraceEvent} m Ext4LoadInodeBitmapFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4LoadInodeBitmapFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.group != null && Object.hasOwnProperty.call(m, "group"))
                    w.uint32(16).uint32(m.group);
                return w;
            };

            /**
             * Encodes the specified Ext4LoadInodeBitmapFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4LoadInodeBitmapFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4LoadInodeBitmapFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4LoadInodeBitmapFtraceEvent} message Ext4LoadInodeBitmapFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4LoadInodeBitmapFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4LoadInodeBitmapFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4LoadInodeBitmapFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4LoadInodeBitmapFtraceEvent} Ext4LoadInodeBitmapFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4LoadInodeBitmapFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4LoadInodeBitmapFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.group = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4LoadInodeBitmapFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4LoadInodeBitmapFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4LoadInodeBitmapFtraceEvent} Ext4LoadInodeBitmapFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4LoadInodeBitmapFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4LoadInodeBitmapFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4LoadInodeBitmapFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4LoadInodeBitmapFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.group != null && m.hasOwnProperty("group")) {
                    if (!$util.isInteger(m.group))
                        return "group: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4LoadInodeBitmapFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4LoadInodeBitmapFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4LoadInodeBitmapFtraceEvent} Ext4LoadInodeBitmapFtraceEvent
             */
            Ext4LoadInodeBitmapFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4LoadInodeBitmapFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4LoadInodeBitmapFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.group != null) {
                    m.group = d.group >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4LoadInodeBitmapFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4LoadInodeBitmapFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4LoadInodeBitmapFtraceEvent} m Ext4LoadInodeBitmapFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4LoadInodeBitmapFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    d.group = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.group != null && m.hasOwnProperty("group")) {
                    d.group = m.group;
                }
                return d;
            };

            /**
             * Converts this Ext4LoadInodeBitmapFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4LoadInodeBitmapFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4LoadInodeBitmapFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4LoadInodeBitmapFtraceEvent;
        })();

        protos.Ext4MarkInodeDirtyFtraceEvent = (function() {

            /**
             * Properties of an Ext4MarkInodeDirtyFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4MarkInodeDirtyFtraceEvent
             * @property {number|null} [dev] Ext4MarkInodeDirtyFtraceEvent dev
             * @property {number|null} [ino] Ext4MarkInodeDirtyFtraceEvent ino
             * @property {number|null} [ip] Ext4MarkInodeDirtyFtraceEvent ip
             */

            /**
             * Constructs a new Ext4MarkInodeDirtyFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4MarkInodeDirtyFtraceEvent.
             * @implements IExt4MarkInodeDirtyFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4MarkInodeDirtyFtraceEvent=} [p] Properties to set
             */
            function Ext4MarkInodeDirtyFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4MarkInodeDirtyFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4MarkInodeDirtyFtraceEvent
             * @instance
             */
            Ext4MarkInodeDirtyFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MarkInodeDirtyFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4MarkInodeDirtyFtraceEvent
             * @instance
             */
            Ext4MarkInodeDirtyFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MarkInodeDirtyFtraceEvent ip.
             * @member {number} ip
             * @memberof perfetto.protos.Ext4MarkInodeDirtyFtraceEvent
             * @instance
             */
            Ext4MarkInodeDirtyFtraceEvent.prototype.ip = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new Ext4MarkInodeDirtyFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4MarkInodeDirtyFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MarkInodeDirtyFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4MarkInodeDirtyFtraceEvent} Ext4MarkInodeDirtyFtraceEvent instance
             */
            Ext4MarkInodeDirtyFtraceEvent.create = function create(properties) {
                return new Ext4MarkInodeDirtyFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4MarkInodeDirtyFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4MarkInodeDirtyFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4MarkInodeDirtyFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MarkInodeDirtyFtraceEvent} m Ext4MarkInodeDirtyFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4MarkInodeDirtyFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.ip != null && Object.hasOwnProperty.call(m, "ip"))
                    w.uint32(24).uint64(m.ip);
                return w;
            };

            /**
             * Encodes the specified Ext4MarkInodeDirtyFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4MarkInodeDirtyFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4MarkInodeDirtyFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MarkInodeDirtyFtraceEvent} message Ext4MarkInodeDirtyFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4MarkInodeDirtyFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4MarkInodeDirtyFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4MarkInodeDirtyFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4MarkInodeDirtyFtraceEvent} Ext4MarkInodeDirtyFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4MarkInodeDirtyFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4MarkInodeDirtyFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.ip = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4MarkInodeDirtyFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4MarkInodeDirtyFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4MarkInodeDirtyFtraceEvent} Ext4MarkInodeDirtyFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4MarkInodeDirtyFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4MarkInodeDirtyFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4MarkInodeDirtyFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4MarkInodeDirtyFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.ip != null && m.hasOwnProperty("ip")) {
                    if (!$util.isInteger(m.ip) && !(m.ip && $util.isInteger(m.ip.low) && $util.isInteger(m.ip.high)))
                        return "ip: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an Ext4MarkInodeDirtyFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4MarkInodeDirtyFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4MarkInodeDirtyFtraceEvent} Ext4MarkInodeDirtyFtraceEvent
             */
            Ext4MarkInodeDirtyFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4MarkInodeDirtyFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4MarkInodeDirtyFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.ip != null) {
                    if ($util.Long)
                        (m.ip = $util.Long.fromValue(d.ip)).unsigned = true;
                    else if (typeof d.ip === "string")
                        m.ip = parseInt(d.ip, 10);
                    else if (typeof d.ip === "number")
                        m.ip = d.ip;
                    else if (typeof d.ip === "object")
                        m.ip = new $util.LongBits(d.ip.low >>> 0, d.ip.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4MarkInodeDirtyFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4MarkInodeDirtyFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4MarkInodeDirtyFtraceEvent} m Ext4MarkInodeDirtyFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4MarkInodeDirtyFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ip = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ip = o.longs === String ? "0" : 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.ip != null && m.hasOwnProperty("ip")) {
                    if (typeof m.ip === "number")
                        d.ip = o.longs === String ? String(m.ip) : m.ip;
                    else
                        d.ip = o.longs === String ? $util.Long.prototype.toString.call(m.ip) : o.longs === Number ? new $util.LongBits(m.ip.low >>> 0, m.ip.high >>> 0).toNumber(true) : m.ip;
                }
                return d;
            };

            /**
             * Converts this Ext4MarkInodeDirtyFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4MarkInodeDirtyFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4MarkInodeDirtyFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4MarkInodeDirtyFtraceEvent;
        })();

        protos.Ext4MbBitmapLoadFtraceEvent = (function() {

            /**
             * Properties of an Ext4MbBitmapLoadFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4MbBitmapLoadFtraceEvent
             * @property {number|null} [dev] Ext4MbBitmapLoadFtraceEvent dev
             * @property {number|null} [group] Ext4MbBitmapLoadFtraceEvent group
             */

            /**
             * Constructs a new Ext4MbBitmapLoadFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4MbBitmapLoadFtraceEvent.
             * @implements IExt4MbBitmapLoadFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4MbBitmapLoadFtraceEvent=} [p] Properties to set
             */
            function Ext4MbBitmapLoadFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4MbBitmapLoadFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4MbBitmapLoadFtraceEvent
             * @instance
             */
            Ext4MbBitmapLoadFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MbBitmapLoadFtraceEvent group.
             * @member {number} group
             * @memberof perfetto.protos.Ext4MbBitmapLoadFtraceEvent
             * @instance
             */
            Ext4MbBitmapLoadFtraceEvent.prototype.group = 0;

            /**
             * Creates a new Ext4MbBitmapLoadFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4MbBitmapLoadFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MbBitmapLoadFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4MbBitmapLoadFtraceEvent} Ext4MbBitmapLoadFtraceEvent instance
             */
            Ext4MbBitmapLoadFtraceEvent.create = function create(properties) {
                return new Ext4MbBitmapLoadFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4MbBitmapLoadFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4MbBitmapLoadFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4MbBitmapLoadFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MbBitmapLoadFtraceEvent} m Ext4MbBitmapLoadFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4MbBitmapLoadFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.group != null && Object.hasOwnProperty.call(m, "group"))
                    w.uint32(16).uint32(m.group);
                return w;
            };

            /**
             * Encodes the specified Ext4MbBitmapLoadFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4MbBitmapLoadFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4MbBitmapLoadFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MbBitmapLoadFtraceEvent} message Ext4MbBitmapLoadFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4MbBitmapLoadFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4MbBitmapLoadFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4MbBitmapLoadFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4MbBitmapLoadFtraceEvent} Ext4MbBitmapLoadFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4MbBitmapLoadFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4MbBitmapLoadFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.group = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4MbBitmapLoadFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4MbBitmapLoadFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4MbBitmapLoadFtraceEvent} Ext4MbBitmapLoadFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4MbBitmapLoadFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4MbBitmapLoadFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4MbBitmapLoadFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4MbBitmapLoadFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.group != null && m.hasOwnProperty("group")) {
                    if (!$util.isInteger(m.group))
                        return "group: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4MbBitmapLoadFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4MbBitmapLoadFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4MbBitmapLoadFtraceEvent} Ext4MbBitmapLoadFtraceEvent
             */
            Ext4MbBitmapLoadFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4MbBitmapLoadFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4MbBitmapLoadFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.group != null) {
                    m.group = d.group >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4MbBitmapLoadFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4MbBitmapLoadFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4MbBitmapLoadFtraceEvent} m Ext4MbBitmapLoadFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4MbBitmapLoadFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    d.group = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.group != null && m.hasOwnProperty("group")) {
                    d.group = m.group;
                }
                return d;
            };

            /**
             * Converts this Ext4MbBitmapLoadFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4MbBitmapLoadFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4MbBitmapLoadFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4MbBitmapLoadFtraceEvent;
        })();

        protos.Ext4MbBuddyBitmapLoadFtraceEvent = (function() {

            /**
             * Properties of an Ext4MbBuddyBitmapLoadFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4MbBuddyBitmapLoadFtraceEvent
             * @property {number|null} [dev] Ext4MbBuddyBitmapLoadFtraceEvent dev
             * @property {number|null} [group] Ext4MbBuddyBitmapLoadFtraceEvent group
             */

            /**
             * Constructs a new Ext4MbBuddyBitmapLoadFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4MbBuddyBitmapLoadFtraceEvent.
             * @implements IExt4MbBuddyBitmapLoadFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4MbBuddyBitmapLoadFtraceEvent=} [p] Properties to set
             */
            function Ext4MbBuddyBitmapLoadFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4MbBuddyBitmapLoadFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent
             * @instance
             */
            Ext4MbBuddyBitmapLoadFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MbBuddyBitmapLoadFtraceEvent group.
             * @member {number} group
             * @memberof perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent
             * @instance
             */
            Ext4MbBuddyBitmapLoadFtraceEvent.prototype.group = 0;

            /**
             * Creates a new Ext4MbBuddyBitmapLoadFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MbBuddyBitmapLoadFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent} Ext4MbBuddyBitmapLoadFtraceEvent instance
             */
            Ext4MbBuddyBitmapLoadFtraceEvent.create = function create(properties) {
                return new Ext4MbBuddyBitmapLoadFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4MbBuddyBitmapLoadFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MbBuddyBitmapLoadFtraceEvent} m Ext4MbBuddyBitmapLoadFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4MbBuddyBitmapLoadFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.group != null && Object.hasOwnProperty.call(m, "group"))
                    w.uint32(16).uint32(m.group);
                return w;
            };

            /**
             * Encodes the specified Ext4MbBuddyBitmapLoadFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MbBuddyBitmapLoadFtraceEvent} message Ext4MbBuddyBitmapLoadFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4MbBuddyBitmapLoadFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4MbBuddyBitmapLoadFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent} Ext4MbBuddyBitmapLoadFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4MbBuddyBitmapLoadFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.group = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4MbBuddyBitmapLoadFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent} Ext4MbBuddyBitmapLoadFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4MbBuddyBitmapLoadFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4MbBuddyBitmapLoadFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4MbBuddyBitmapLoadFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.group != null && m.hasOwnProperty("group")) {
                    if (!$util.isInteger(m.group))
                        return "group: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4MbBuddyBitmapLoadFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent} Ext4MbBuddyBitmapLoadFtraceEvent
             */
            Ext4MbBuddyBitmapLoadFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.group != null) {
                    m.group = d.group >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4MbBuddyBitmapLoadFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent} m Ext4MbBuddyBitmapLoadFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4MbBuddyBitmapLoadFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    d.group = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.group != null && m.hasOwnProperty("group")) {
                    d.group = m.group;
                }
                return d;
            };

            /**
             * Converts this Ext4MbBuddyBitmapLoadFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4MbBuddyBitmapLoadFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4MbBuddyBitmapLoadFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4MbBuddyBitmapLoadFtraceEvent;
        })();

        protos.Ext4MbDiscardPreallocationsFtraceEvent = (function() {

            /**
             * Properties of an Ext4MbDiscardPreallocationsFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4MbDiscardPreallocationsFtraceEvent
             * @property {number|null} [dev] Ext4MbDiscardPreallocationsFtraceEvent dev
             * @property {number|null} [needed] Ext4MbDiscardPreallocationsFtraceEvent needed
             */

            /**
             * Constructs a new Ext4MbDiscardPreallocationsFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4MbDiscardPreallocationsFtraceEvent.
             * @implements IExt4MbDiscardPreallocationsFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4MbDiscardPreallocationsFtraceEvent=} [p] Properties to set
             */
            function Ext4MbDiscardPreallocationsFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4MbDiscardPreallocationsFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent
             * @instance
             */
            Ext4MbDiscardPreallocationsFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MbDiscardPreallocationsFtraceEvent needed.
             * @member {number} needed
             * @memberof perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent
             * @instance
             */
            Ext4MbDiscardPreallocationsFtraceEvent.prototype.needed = 0;

            /**
             * Creates a new Ext4MbDiscardPreallocationsFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MbDiscardPreallocationsFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent} Ext4MbDiscardPreallocationsFtraceEvent instance
             */
            Ext4MbDiscardPreallocationsFtraceEvent.create = function create(properties) {
                return new Ext4MbDiscardPreallocationsFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4MbDiscardPreallocationsFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MbDiscardPreallocationsFtraceEvent} m Ext4MbDiscardPreallocationsFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4MbDiscardPreallocationsFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.needed != null && Object.hasOwnProperty.call(m, "needed"))
                    w.uint32(16).int32(m.needed);
                return w;
            };

            /**
             * Encodes the specified Ext4MbDiscardPreallocationsFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MbDiscardPreallocationsFtraceEvent} message Ext4MbDiscardPreallocationsFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4MbDiscardPreallocationsFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4MbDiscardPreallocationsFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent} Ext4MbDiscardPreallocationsFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4MbDiscardPreallocationsFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.needed = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4MbDiscardPreallocationsFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent} Ext4MbDiscardPreallocationsFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4MbDiscardPreallocationsFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4MbDiscardPreallocationsFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4MbDiscardPreallocationsFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.needed != null && m.hasOwnProperty("needed")) {
                    if (!$util.isInteger(m.needed))
                        return "needed: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4MbDiscardPreallocationsFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent} Ext4MbDiscardPreallocationsFtraceEvent
             */
            Ext4MbDiscardPreallocationsFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.needed != null) {
                    m.needed = d.needed | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4MbDiscardPreallocationsFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent} m Ext4MbDiscardPreallocationsFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4MbDiscardPreallocationsFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    d.needed = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.needed != null && m.hasOwnProperty("needed")) {
                    d.needed = m.needed;
                }
                return d;
            };

            /**
             * Converts this Ext4MbDiscardPreallocationsFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4MbDiscardPreallocationsFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4MbDiscardPreallocationsFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4MbDiscardPreallocationsFtraceEvent;
        })();

        protos.Ext4MbNewGroupPaFtraceEvent = (function() {

            /**
             * Properties of an Ext4MbNewGroupPaFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4MbNewGroupPaFtraceEvent
             * @property {number|null} [dev] Ext4MbNewGroupPaFtraceEvent dev
             * @property {number|null} [ino] Ext4MbNewGroupPaFtraceEvent ino
             * @property {number|null} [paPstart] Ext4MbNewGroupPaFtraceEvent paPstart
             * @property {number|null} [paLstart] Ext4MbNewGroupPaFtraceEvent paLstart
             * @property {number|null} [paLen] Ext4MbNewGroupPaFtraceEvent paLen
             */

            /**
             * Constructs a new Ext4MbNewGroupPaFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4MbNewGroupPaFtraceEvent.
             * @implements IExt4MbNewGroupPaFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4MbNewGroupPaFtraceEvent=} [p] Properties to set
             */
            function Ext4MbNewGroupPaFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4MbNewGroupPaFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4MbNewGroupPaFtraceEvent
             * @instance
             */
            Ext4MbNewGroupPaFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MbNewGroupPaFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4MbNewGroupPaFtraceEvent
             * @instance
             */
            Ext4MbNewGroupPaFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MbNewGroupPaFtraceEvent paPstart.
             * @member {number} paPstart
             * @memberof perfetto.protos.Ext4MbNewGroupPaFtraceEvent
             * @instance
             */
            Ext4MbNewGroupPaFtraceEvent.prototype.paPstart = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MbNewGroupPaFtraceEvent paLstart.
             * @member {number} paLstart
             * @memberof perfetto.protos.Ext4MbNewGroupPaFtraceEvent
             * @instance
             */
            Ext4MbNewGroupPaFtraceEvent.prototype.paLstart = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MbNewGroupPaFtraceEvent paLen.
             * @member {number} paLen
             * @memberof perfetto.protos.Ext4MbNewGroupPaFtraceEvent
             * @instance
             */
            Ext4MbNewGroupPaFtraceEvent.prototype.paLen = 0;

            /**
             * Creates a new Ext4MbNewGroupPaFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4MbNewGroupPaFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MbNewGroupPaFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4MbNewGroupPaFtraceEvent} Ext4MbNewGroupPaFtraceEvent instance
             */
            Ext4MbNewGroupPaFtraceEvent.create = function create(properties) {
                return new Ext4MbNewGroupPaFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4MbNewGroupPaFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4MbNewGroupPaFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4MbNewGroupPaFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MbNewGroupPaFtraceEvent} m Ext4MbNewGroupPaFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4MbNewGroupPaFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.paPstart != null && Object.hasOwnProperty.call(m, "paPstart"))
                    w.uint32(24).uint64(m.paPstart);
                if (m.paLstart != null && Object.hasOwnProperty.call(m, "paLstart"))
                    w.uint32(32).uint64(m.paLstart);
                if (m.paLen != null && Object.hasOwnProperty.call(m, "paLen"))
                    w.uint32(40).uint32(m.paLen);
                return w;
            };

            /**
             * Encodes the specified Ext4MbNewGroupPaFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4MbNewGroupPaFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4MbNewGroupPaFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MbNewGroupPaFtraceEvent} message Ext4MbNewGroupPaFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4MbNewGroupPaFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4MbNewGroupPaFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4MbNewGroupPaFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4MbNewGroupPaFtraceEvent} Ext4MbNewGroupPaFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4MbNewGroupPaFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4MbNewGroupPaFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.paPstart = r.uint64();
                        break;
                    case 4:
                        m.paLstart = r.uint64();
                        break;
                    case 5:
                        m.paLen = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4MbNewGroupPaFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4MbNewGroupPaFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4MbNewGroupPaFtraceEvent} Ext4MbNewGroupPaFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4MbNewGroupPaFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4MbNewGroupPaFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4MbNewGroupPaFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4MbNewGroupPaFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.paPstart != null && m.hasOwnProperty("paPstart")) {
                    if (!$util.isInteger(m.paPstart) && !(m.paPstart && $util.isInteger(m.paPstart.low) && $util.isInteger(m.paPstart.high)))
                        return "paPstart: integer|Long expected";
                }
                if (m.paLstart != null && m.hasOwnProperty("paLstart")) {
                    if (!$util.isInteger(m.paLstart) && !(m.paLstart && $util.isInteger(m.paLstart.low) && $util.isInteger(m.paLstart.high)))
                        return "paLstart: integer|Long expected";
                }
                if (m.paLen != null && m.hasOwnProperty("paLen")) {
                    if (!$util.isInteger(m.paLen))
                        return "paLen: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4MbNewGroupPaFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4MbNewGroupPaFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4MbNewGroupPaFtraceEvent} Ext4MbNewGroupPaFtraceEvent
             */
            Ext4MbNewGroupPaFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4MbNewGroupPaFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4MbNewGroupPaFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.paPstart != null) {
                    if ($util.Long)
                        (m.paPstart = $util.Long.fromValue(d.paPstart)).unsigned = true;
                    else if (typeof d.paPstart === "string")
                        m.paPstart = parseInt(d.paPstart, 10);
                    else if (typeof d.paPstart === "number")
                        m.paPstart = d.paPstart;
                    else if (typeof d.paPstart === "object")
                        m.paPstart = new $util.LongBits(d.paPstart.low >>> 0, d.paPstart.high >>> 0).toNumber(true);
                }
                if (d.paLstart != null) {
                    if ($util.Long)
                        (m.paLstart = $util.Long.fromValue(d.paLstart)).unsigned = true;
                    else if (typeof d.paLstart === "string")
                        m.paLstart = parseInt(d.paLstart, 10);
                    else if (typeof d.paLstart === "number")
                        m.paLstart = d.paLstart;
                    else if (typeof d.paLstart === "object")
                        m.paLstart = new $util.LongBits(d.paLstart.low >>> 0, d.paLstart.high >>> 0).toNumber(true);
                }
                if (d.paLen != null) {
                    m.paLen = d.paLen >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4MbNewGroupPaFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4MbNewGroupPaFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4MbNewGroupPaFtraceEvent} m Ext4MbNewGroupPaFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4MbNewGroupPaFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.paPstart = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.paPstart = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.paLstart = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.paLstart = o.longs === String ? "0" : 0;
                    d.paLen = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.paPstart != null && m.hasOwnProperty("paPstart")) {
                    if (typeof m.paPstart === "number")
                        d.paPstart = o.longs === String ? String(m.paPstart) : m.paPstart;
                    else
                        d.paPstart = o.longs === String ? $util.Long.prototype.toString.call(m.paPstart) : o.longs === Number ? new $util.LongBits(m.paPstart.low >>> 0, m.paPstart.high >>> 0).toNumber(true) : m.paPstart;
                }
                if (m.paLstart != null && m.hasOwnProperty("paLstart")) {
                    if (typeof m.paLstart === "number")
                        d.paLstart = o.longs === String ? String(m.paLstart) : m.paLstart;
                    else
                        d.paLstart = o.longs === String ? $util.Long.prototype.toString.call(m.paLstart) : o.longs === Number ? new $util.LongBits(m.paLstart.low >>> 0, m.paLstart.high >>> 0).toNumber(true) : m.paLstart;
                }
                if (m.paLen != null && m.hasOwnProperty("paLen")) {
                    d.paLen = m.paLen;
                }
                return d;
            };

            /**
             * Converts this Ext4MbNewGroupPaFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4MbNewGroupPaFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4MbNewGroupPaFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4MbNewGroupPaFtraceEvent;
        })();

        protos.Ext4MbNewInodePaFtraceEvent = (function() {

            /**
             * Properties of an Ext4MbNewInodePaFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4MbNewInodePaFtraceEvent
             * @property {number|null} [dev] Ext4MbNewInodePaFtraceEvent dev
             * @property {number|null} [ino] Ext4MbNewInodePaFtraceEvent ino
             * @property {number|null} [paPstart] Ext4MbNewInodePaFtraceEvent paPstart
             * @property {number|null} [paLstart] Ext4MbNewInodePaFtraceEvent paLstart
             * @property {number|null} [paLen] Ext4MbNewInodePaFtraceEvent paLen
             */

            /**
             * Constructs a new Ext4MbNewInodePaFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4MbNewInodePaFtraceEvent.
             * @implements IExt4MbNewInodePaFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4MbNewInodePaFtraceEvent=} [p] Properties to set
             */
            function Ext4MbNewInodePaFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4MbNewInodePaFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4MbNewInodePaFtraceEvent
             * @instance
             */
            Ext4MbNewInodePaFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MbNewInodePaFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4MbNewInodePaFtraceEvent
             * @instance
             */
            Ext4MbNewInodePaFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MbNewInodePaFtraceEvent paPstart.
             * @member {number} paPstart
             * @memberof perfetto.protos.Ext4MbNewInodePaFtraceEvent
             * @instance
             */
            Ext4MbNewInodePaFtraceEvent.prototype.paPstart = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MbNewInodePaFtraceEvent paLstart.
             * @member {number} paLstart
             * @memberof perfetto.protos.Ext4MbNewInodePaFtraceEvent
             * @instance
             */
            Ext4MbNewInodePaFtraceEvent.prototype.paLstart = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MbNewInodePaFtraceEvent paLen.
             * @member {number} paLen
             * @memberof perfetto.protos.Ext4MbNewInodePaFtraceEvent
             * @instance
             */
            Ext4MbNewInodePaFtraceEvent.prototype.paLen = 0;

            /**
             * Creates a new Ext4MbNewInodePaFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4MbNewInodePaFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MbNewInodePaFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4MbNewInodePaFtraceEvent} Ext4MbNewInodePaFtraceEvent instance
             */
            Ext4MbNewInodePaFtraceEvent.create = function create(properties) {
                return new Ext4MbNewInodePaFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4MbNewInodePaFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4MbNewInodePaFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4MbNewInodePaFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MbNewInodePaFtraceEvent} m Ext4MbNewInodePaFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4MbNewInodePaFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.paPstart != null && Object.hasOwnProperty.call(m, "paPstart"))
                    w.uint32(24).uint64(m.paPstart);
                if (m.paLstart != null && Object.hasOwnProperty.call(m, "paLstart"))
                    w.uint32(32).uint64(m.paLstart);
                if (m.paLen != null && Object.hasOwnProperty.call(m, "paLen"))
                    w.uint32(40).uint32(m.paLen);
                return w;
            };

            /**
             * Encodes the specified Ext4MbNewInodePaFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4MbNewInodePaFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4MbNewInodePaFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MbNewInodePaFtraceEvent} message Ext4MbNewInodePaFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4MbNewInodePaFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4MbNewInodePaFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4MbNewInodePaFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4MbNewInodePaFtraceEvent} Ext4MbNewInodePaFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4MbNewInodePaFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4MbNewInodePaFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.paPstart = r.uint64();
                        break;
                    case 4:
                        m.paLstart = r.uint64();
                        break;
                    case 5:
                        m.paLen = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4MbNewInodePaFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4MbNewInodePaFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4MbNewInodePaFtraceEvent} Ext4MbNewInodePaFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4MbNewInodePaFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4MbNewInodePaFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4MbNewInodePaFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4MbNewInodePaFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.paPstart != null && m.hasOwnProperty("paPstart")) {
                    if (!$util.isInteger(m.paPstart) && !(m.paPstart && $util.isInteger(m.paPstart.low) && $util.isInteger(m.paPstart.high)))
                        return "paPstart: integer|Long expected";
                }
                if (m.paLstart != null && m.hasOwnProperty("paLstart")) {
                    if (!$util.isInteger(m.paLstart) && !(m.paLstart && $util.isInteger(m.paLstart.low) && $util.isInteger(m.paLstart.high)))
                        return "paLstart: integer|Long expected";
                }
                if (m.paLen != null && m.hasOwnProperty("paLen")) {
                    if (!$util.isInteger(m.paLen))
                        return "paLen: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4MbNewInodePaFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4MbNewInodePaFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4MbNewInodePaFtraceEvent} Ext4MbNewInodePaFtraceEvent
             */
            Ext4MbNewInodePaFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4MbNewInodePaFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4MbNewInodePaFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.paPstart != null) {
                    if ($util.Long)
                        (m.paPstart = $util.Long.fromValue(d.paPstart)).unsigned = true;
                    else if (typeof d.paPstart === "string")
                        m.paPstart = parseInt(d.paPstart, 10);
                    else if (typeof d.paPstart === "number")
                        m.paPstart = d.paPstart;
                    else if (typeof d.paPstart === "object")
                        m.paPstart = new $util.LongBits(d.paPstart.low >>> 0, d.paPstart.high >>> 0).toNumber(true);
                }
                if (d.paLstart != null) {
                    if ($util.Long)
                        (m.paLstart = $util.Long.fromValue(d.paLstart)).unsigned = true;
                    else if (typeof d.paLstart === "string")
                        m.paLstart = parseInt(d.paLstart, 10);
                    else if (typeof d.paLstart === "number")
                        m.paLstart = d.paLstart;
                    else if (typeof d.paLstart === "object")
                        m.paLstart = new $util.LongBits(d.paLstart.low >>> 0, d.paLstart.high >>> 0).toNumber(true);
                }
                if (d.paLen != null) {
                    m.paLen = d.paLen >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4MbNewInodePaFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4MbNewInodePaFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4MbNewInodePaFtraceEvent} m Ext4MbNewInodePaFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4MbNewInodePaFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.paPstart = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.paPstart = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.paLstart = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.paLstart = o.longs === String ? "0" : 0;
                    d.paLen = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.paPstart != null && m.hasOwnProperty("paPstart")) {
                    if (typeof m.paPstart === "number")
                        d.paPstart = o.longs === String ? String(m.paPstart) : m.paPstart;
                    else
                        d.paPstart = o.longs === String ? $util.Long.prototype.toString.call(m.paPstart) : o.longs === Number ? new $util.LongBits(m.paPstart.low >>> 0, m.paPstart.high >>> 0).toNumber(true) : m.paPstart;
                }
                if (m.paLstart != null && m.hasOwnProperty("paLstart")) {
                    if (typeof m.paLstart === "number")
                        d.paLstart = o.longs === String ? String(m.paLstart) : m.paLstart;
                    else
                        d.paLstart = o.longs === String ? $util.Long.prototype.toString.call(m.paLstart) : o.longs === Number ? new $util.LongBits(m.paLstart.low >>> 0, m.paLstart.high >>> 0).toNumber(true) : m.paLstart;
                }
                if (m.paLen != null && m.hasOwnProperty("paLen")) {
                    d.paLen = m.paLen;
                }
                return d;
            };

            /**
             * Converts this Ext4MbNewInodePaFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4MbNewInodePaFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4MbNewInodePaFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4MbNewInodePaFtraceEvent;
        })();

        protos.Ext4MbReleaseGroupPaFtraceEvent = (function() {

            /**
             * Properties of an Ext4MbReleaseGroupPaFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4MbReleaseGroupPaFtraceEvent
             * @property {number|null} [dev] Ext4MbReleaseGroupPaFtraceEvent dev
             * @property {number|null} [paPstart] Ext4MbReleaseGroupPaFtraceEvent paPstart
             * @property {number|null} [paLen] Ext4MbReleaseGroupPaFtraceEvent paLen
             */

            /**
             * Constructs a new Ext4MbReleaseGroupPaFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4MbReleaseGroupPaFtraceEvent.
             * @implements IExt4MbReleaseGroupPaFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4MbReleaseGroupPaFtraceEvent=} [p] Properties to set
             */
            function Ext4MbReleaseGroupPaFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4MbReleaseGroupPaFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent
             * @instance
             */
            Ext4MbReleaseGroupPaFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MbReleaseGroupPaFtraceEvent paPstart.
             * @member {number} paPstart
             * @memberof perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent
             * @instance
             */
            Ext4MbReleaseGroupPaFtraceEvent.prototype.paPstart = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MbReleaseGroupPaFtraceEvent paLen.
             * @member {number} paLen
             * @memberof perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent
             * @instance
             */
            Ext4MbReleaseGroupPaFtraceEvent.prototype.paLen = 0;

            /**
             * Creates a new Ext4MbReleaseGroupPaFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MbReleaseGroupPaFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent} Ext4MbReleaseGroupPaFtraceEvent instance
             */
            Ext4MbReleaseGroupPaFtraceEvent.create = function create(properties) {
                return new Ext4MbReleaseGroupPaFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4MbReleaseGroupPaFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MbReleaseGroupPaFtraceEvent} m Ext4MbReleaseGroupPaFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4MbReleaseGroupPaFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.paPstart != null && Object.hasOwnProperty.call(m, "paPstart"))
                    w.uint32(16).uint64(m.paPstart);
                if (m.paLen != null && Object.hasOwnProperty.call(m, "paLen"))
                    w.uint32(24).uint32(m.paLen);
                return w;
            };

            /**
             * Encodes the specified Ext4MbReleaseGroupPaFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MbReleaseGroupPaFtraceEvent} message Ext4MbReleaseGroupPaFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4MbReleaseGroupPaFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4MbReleaseGroupPaFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent} Ext4MbReleaseGroupPaFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4MbReleaseGroupPaFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.paPstart = r.uint64();
                        break;
                    case 3:
                        m.paLen = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4MbReleaseGroupPaFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent} Ext4MbReleaseGroupPaFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4MbReleaseGroupPaFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4MbReleaseGroupPaFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4MbReleaseGroupPaFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.paPstart != null && m.hasOwnProperty("paPstart")) {
                    if (!$util.isInteger(m.paPstart) && !(m.paPstart && $util.isInteger(m.paPstart.low) && $util.isInteger(m.paPstart.high)))
                        return "paPstart: integer|Long expected";
                }
                if (m.paLen != null && m.hasOwnProperty("paLen")) {
                    if (!$util.isInteger(m.paLen))
                        return "paLen: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4MbReleaseGroupPaFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent} Ext4MbReleaseGroupPaFtraceEvent
             */
            Ext4MbReleaseGroupPaFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.paPstart != null) {
                    if ($util.Long)
                        (m.paPstart = $util.Long.fromValue(d.paPstart)).unsigned = true;
                    else if (typeof d.paPstart === "string")
                        m.paPstart = parseInt(d.paPstart, 10);
                    else if (typeof d.paPstart === "number")
                        m.paPstart = d.paPstart;
                    else if (typeof d.paPstart === "object")
                        m.paPstart = new $util.LongBits(d.paPstart.low >>> 0, d.paPstart.high >>> 0).toNumber(true);
                }
                if (d.paLen != null) {
                    m.paLen = d.paLen >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4MbReleaseGroupPaFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent} m Ext4MbReleaseGroupPaFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4MbReleaseGroupPaFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.paPstart = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.paPstart = o.longs === String ? "0" : 0;
                    d.paLen = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.paPstart != null && m.hasOwnProperty("paPstart")) {
                    if (typeof m.paPstart === "number")
                        d.paPstart = o.longs === String ? String(m.paPstart) : m.paPstart;
                    else
                        d.paPstart = o.longs === String ? $util.Long.prototype.toString.call(m.paPstart) : o.longs === Number ? new $util.LongBits(m.paPstart.low >>> 0, m.paPstart.high >>> 0).toNumber(true) : m.paPstart;
                }
                if (m.paLen != null && m.hasOwnProperty("paLen")) {
                    d.paLen = m.paLen;
                }
                return d;
            };

            /**
             * Converts this Ext4MbReleaseGroupPaFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4MbReleaseGroupPaFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4MbReleaseGroupPaFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4MbReleaseGroupPaFtraceEvent;
        })();

        protos.Ext4MbReleaseInodePaFtraceEvent = (function() {

            /**
             * Properties of an Ext4MbReleaseInodePaFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4MbReleaseInodePaFtraceEvent
             * @property {number|null} [dev] Ext4MbReleaseInodePaFtraceEvent dev
             * @property {number|null} [ino] Ext4MbReleaseInodePaFtraceEvent ino
             * @property {number|null} [block] Ext4MbReleaseInodePaFtraceEvent block
             * @property {number|null} [count] Ext4MbReleaseInodePaFtraceEvent count
             */

            /**
             * Constructs a new Ext4MbReleaseInodePaFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4MbReleaseInodePaFtraceEvent.
             * @implements IExt4MbReleaseInodePaFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4MbReleaseInodePaFtraceEvent=} [p] Properties to set
             */
            function Ext4MbReleaseInodePaFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4MbReleaseInodePaFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4MbReleaseInodePaFtraceEvent
             * @instance
             */
            Ext4MbReleaseInodePaFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MbReleaseInodePaFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4MbReleaseInodePaFtraceEvent
             * @instance
             */
            Ext4MbReleaseInodePaFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MbReleaseInodePaFtraceEvent block.
             * @member {number} block
             * @memberof perfetto.protos.Ext4MbReleaseInodePaFtraceEvent
             * @instance
             */
            Ext4MbReleaseInodePaFtraceEvent.prototype.block = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MbReleaseInodePaFtraceEvent count.
             * @member {number} count
             * @memberof perfetto.protos.Ext4MbReleaseInodePaFtraceEvent
             * @instance
             */
            Ext4MbReleaseInodePaFtraceEvent.prototype.count = 0;

            /**
             * Creates a new Ext4MbReleaseInodePaFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4MbReleaseInodePaFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MbReleaseInodePaFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4MbReleaseInodePaFtraceEvent} Ext4MbReleaseInodePaFtraceEvent instance
             */
            Ext4MbReleaseInodePaFtraceEvent.create = function create(properties) {
                return new Ext4MbReleaseInodePaFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4MbReleaseInodePaFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4MbReleaseInodePaFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4MbReleaseInodePaFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MbReleaseInodePaFtraceEvent} m Ext4MbReleaseInodePaFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4MbReleaseInodePaFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.block != null && Object.hasOwnProperty.call(m, "block"))
                    w.uint32(24).uint64(m.block);
                if (m.count != null && Object.hasOwnProperty.call(m, "count"))
                    w.uint32(32).uint32(m.count);
                return w;
            };

            /**
             * Encodes the specified Ext4MbReleaseInodePaFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4MbReleaseInodePaFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4MbReleaseInodePaFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MbReleaseInodePaFtraceEvent} message Ext4MbReleaseInodePaFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4MbReleaseInodePaFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4MbReleaseInodePaFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4MbReleaseInodePaFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4MbReleaseInodePaFtraceEvent} Ext4MbReleaseInodePaFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4MbReleaseInodePaFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4MbReleaseInodePaFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.block = r.uint64();
                        break;
                    case 4:
                        m.count = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4MbReleaseInodePaFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4MbReleaseInodePaFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4MbReleaseInodePaFtraceEvent} Ext4MbReleaseInodePaFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4MbReleaseInodePaFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4MbReleaseInodePaFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4MbReleaseInodePaFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4MbReleaseInodePaFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.block != null && m.hasOwnProperty("block")) {
                    if (!$util.isInteger(m.block) && !(m.block && $util.isInteger(m.block.low) && $util.isInteger(m.block.high)))
                        return "block: integer|Long expected";
                }
                if (m.count != null && m.hasOwnProperty("count")) {
                    if (!$util.isInteger(m.count))
                        return "count: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4MbReleaseInodePaFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4MbReleaseInodePaFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4MbReleaseInodePaFtraceEvent} Ext4MbReleaseInodePaFtraceEvent
             */
            Ext4MbReleaseInodePaFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4MbReleaseInodePaFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4MbReleaseInodePaFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.block != null) {
                    if ($util.Long)
                        (m.block = $util.Long.fromValue(d.block)).unsigned = true;
                    else if (typeof d.block === "string")
                        m.block = parseInt(d.block, 10);
                    else if (typeof d.block === "number")
                        m.block = d.block;
                    else if (typeof d.block === "object")
                        m.block = new $util.LongBits(d.block.low >>> 0, d.block.high >>> 0).toNumber(true);
                }
                if (d.count != null) {
                    m.count = d.count >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4MbReleaseInodePaFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4MbReleaseInodePaFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4MbReleaseInodePaFtraceEvent} m Ext4MbReleaseInodePaFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4MbReleaseInodePaFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.block = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.block = o.longs === String ? "0" : 0;
                    d.count = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.block != null && m.hasOwnProperty("block")) {
                    if (typeof m.block === "number")
                        d.block = o.longs === String ? String(m.block) : m.block;
                    else
                        d.block = o.longs === String ? $util.Long.prototype.toString.call(m.block) : o.longs === Number ? new $util.LongBits(m.block.low >>> 0, m.block.high >>> 0).toNumber(true) : m.block;
                }
                if (m.count != null && m.hasOwnProperty("count")) {
                    d.count = m.count;
                }
                return d;
            };

            /**
             * Converts this Ext4MbReleaseInodePaFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4MbReleaseInodePaFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4MbReleaseInodePaFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4MbReleaseInodePaFtraceEvent;
        })();

        protos.Ext4MballocAllocFtraceEvent = (function() {

            /**
             * Properties of an Ext4MballocAllocFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4MballocAllocFtraceEvent
             * @property {number|null} [dev] Ext4MballocAllocFtraceEvent dev
             * @property {number|null} [ino] Ext4MballocAllocFtraceEvent ino
             * @property {number|null} [origLogical] Ext4MballocAllocFtraceEvent origLogical
             * @property {number|null} [origStart] Ext4MballocAllocFtraceEvent origStart
             * @property {number|null} [origGroup] Ext4MballocAllocFtraceEvent origGroup
             * @property {number|null} [origLen] Ext4MballocAllocFtraceEvent origLen
             * @property {number|null} [goalLogical] Ext4MballocAllocFtraceEvent goalLogical
             * @property {number|null} [goalStart] Ext4MballocAllocFtraceEvent goalStart
             * @property {number|null} [goalGroup] Ext4MballocAllocFtraceEvent goalGroup
             * @property {number|null} [goalLen] Ext4MballocAllocFtraceEvent goalLen
             * @property {number|null} [resultLogical] Ext4MballocAllocFtraceEvent resultLogical
             * @property {number|null} [resultStart] Ext4MballocAllocFtraceEvent resultStart
             * @property {number|null} [resultGroup] Ext4MballocAllocFtraceEvent resultGroup
             * @property {number|null} [resultLen] Ext4MballocAllocFtraceEvent resultLen
             * @property {number|null} [found] Ext4MballocAllocFtraceEvent found
             * @property {number|null} [groups] Ext4MballocAllocFtraceEvent groups
             * @property {number|null} [buddy] Ext4MballocAllocFtraceEvent buddy
             * @property {number|null} [flags] Ext4MballocAllocFtraceEvent flags
             * @property {number|null} [tail] Ext4MballocAllocFtraceEvent tail
             * @property {number|null} [cr] Ext4MballocAllocFtraceEvent cr
             */

            /**
             * Constructs a new Ext4MballocAllocFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4MballocAllocFtraceEvent.
             * @implements IExt4MballocAllocFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4MballocAllocFtraceEvent=} [p] Properties to set
             */
            function Ext4MballocAllocFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4MballocAllocFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @instance
             */
            Ext4MballocAllocFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MballocAllocFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @instance
             */
            Ext4MballocAllocFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MballocAllocFtraceEvent origLogical.
             * @member {number} origLogical
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @instance
             */
            Ext4MballocAllocFtraceEvent.prototype.origLogical = 0;

            /**
             * Ext4MballocAllocFtraceEvent origStart.
             * @member {number} origStart
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @instance
             */
            Ext4MballocAllocFtraceEvent.prototype.origStart = 0;

            /**
             * Ext4MballocAllocFtraceEvent origGroup.
             * @member {number} origGroup
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @instance
             */
            Ext4MballocAllocFtraceEvent.prototype.origGroup = 0;

            /**
             * Ext4MballocAllocFtraceEvent origLen.
             * @member {number} origLen
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @instance
             */
            Ext4MballocAllocFtraceEvent.prototype.origLen = 0;

            /**
             * Ext4MballocAllocFtraceEvent goalLogical.
             * @member {number} goalLogical
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @instance
             */
            Ext4MballocAllocFtraceEvent.prototype.goalLogical = 0;

            /**
             * Ext4MballocAllocFtraceEvent goalStart.
             * @member {number} goalStart
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @instance
             */
            Ext4MballocAllocFtraceEvent.prototype.goalStart = 0;

            /**
             * Ext4MballocAllocFtraceEvent goalGroup.
             * @member {number} goalGroup
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @instance
             */
            Ext4MballocAllocFtraceEvent.prototype.goalGroup = 0;

            /**
             * Ext4MballocAllocFtraceEvent goalLen.
             * @member {number} goalLen
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @instance
             */
            Ext4MballocAllocFtraceEvent.prototype.goalLen = 0;

            /**
             * Ext4MballocAllocFtraceEvent resultLogical.
             * @member {number} resultLogical
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @instance
             */
            Ext4MballocAllocFtraceEvent.prototype.resultLogical = 0;

            /**
             * Ext4MballocAllocFtraceEvent resultStart.
             * @member {number} resultStart
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @instance
             */
            Ext4MballocAllocFtraceEvent.prototype.resultStart = 0;

            /**
             * Ext4MballocAllocFtraceEvent resultGroup.
             * @member {number} resultGroup
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @instance
             */
            Ext4MballocAllocFtraceEvent.prototype.resultGroup = 0;

            /**
             * Ext4MballocAllocFtraceEvent resultLen.
             * @member {number} resultLen
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @instance
             */
            Ext4MballocAllocFtraceEvent.prototype.resultLen = 0;

            /**
             * Ext4MballocAllocFtraceEvent found.
             * @member {number} found
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @instance
             */
            Ext4MballocAllocFtraceEvent.prototype.found = 0;

            /**
             * Ext4MballocAllocFtraceEvent groups.
             * @member {number} groups
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @instance
             */
            Ext4MballocAllocFtraceEvent.prototype.groups = 0;

            /**
             * Ext4MballocAllocFtraceEvent buddy.
             * @member {number} buddy
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @instance
             */
            Ext4MballocAllocFtraceEvent.prototype.buddy = 0;

            /**
             * Ext4MballocAllocFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @instance
             */
            Ext4MballocAllocFtraceEvent.prototype.flags = 0;

            /**
             * Ext4MballocAllocFtraceEvent tail.
             * @member {number} tail
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @instance
             */
            Ext4MballocAllocFtraceEvent.prototype.tail = 0;

            /**
             * Ext4MballocAllocFtraceEvent cr.
             * @member {number} cr
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @instance
             */
            Ext4MballocAllocFtraceEvent.prototype.cr = 0;

            /**
             * Creates a new Ext4MballocAllocFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MballocAllocFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4MballocAllocFtraceEvent} Ext4MballocAllocFtraceEvent instance
             */
            Ext4MballocAllocFtraceEvent.create = function create(properties) {
                return new Ext4MballocAllocFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4MballocAllocFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4MballocAllocFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MballocAllocFtraceEvent} m Ext4MballocAllocFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4MballocAllocFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.origLogical != null && Object.hasOwnProperty.call(m, "origLogical"))
                    w.uint32(24).uint32(m.origLogical);
                if (m.origStart != null && Object.hasOwnProperty.call(m, "origStart"))
                    w.uint32(32).int32(m.origStart);
                if (m.origGroup != null && Object.hasOwnProperty.call(m, "origGroup"))
                    w.uint32(40).uint32(m.origGroup);
                if (m.origLen != null && Object.hasOwnProperty.call(m, "origLen"))
                    w.uint32(48).int32(m.origLen);
                if (m.goalLogical != null && Object.hasOwnProperty.call(m, "goalLogical"))
                    w.uint32(56).uint32(m.goalLogical);
                if (m.goalStart != null && Object.hasOwnProperty.call(m, "goalStart"))
                    w.uint32(64).int32(m.goalStart);
                if (m.goalGroup != null && Object.hasOwnProperty.call(m, "goalGroup"))
                    w.uint32(72).uint32(m.goalGroup);
                if (m.goalLen != null && Object.hasOwnProperty.call(m, "goalLen"))
                    w.uint32(80).int32(m.goalLen);
                if (m.resultLogical != null && Object.hasOwnProperty.call(m, "resultLogical"))
                    w.uint32(88).uint32(m.resultLogical);
                if (m.resultStart != null && Object.hasOwnProperty.call(m, "resultStart"))
                    w.uint32(96).int32(m.resultStart);
                if (m.resultGroup != null && Object.hasOwnProperty.call(m, "resultGroup"))
                    w.uint32(104).uint32(m.resultGroup);
                if (m.resultLen != null && Object.hasOwnProperty.call(m, "resultLen"))
                    w.uint32(112).int32(m.resultLen);
                if (m.found != null && Object.hasOwnProperty.call(m, "found"))
                    w.uint32(120).uint32(m.found);
                if (m.groups != null && Object.hasOwnProperty.call(m, "groups"))
                    w.uint32(128).uint32(m.groups);
                if (m.buddy != null && Object.hasOwnProperty.call(m, "buddy"))
                    w.uint32(136).uint32(m.buddy);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(144).uint32(m.flags);
                if (m.tail != null && Object.hasOwnProperty.call(m, "tail"))
                    w.uint32(152).uint32(m.tail);
                if (m.cr != null && Object.hasOwnProperty.call(m, "cr"))
                    w.uint32(160).uint32(m.cr);
                return w;
            };

            /**
             * Encodes the specified Ext4MballocAllocFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4MballocAllocFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MballocAllocFtraceEvent} message Ext4MballocAllocFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4MballocAllocFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4MballocAllocFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4MballocAllocFtraceEvent} Ext4MballocAllocFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4MballocAllocFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4MballocAllocFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.origLogical = r.uint32();
                        break;
                    case 4:
                        m.origStart = r.int32();
                        break;
                    case 5:
                        m.origGroup = r.uint32();
                        break;
                    case 6:
                        m.origLen = r.int32();
                        break;
                    case 7:
                        m.goalLogical = r.uint32();
                        break;
                    case 8:
                        m.goalStart = r.int32();
                        break;
                    case 9:
                        m.goalGroup = r.uint32();
                        break;
                    case 10:
                        m.goalLen = r.int32();
                        break;
                    case 11:
                        m.resultLogical = r.uint32();
                        break;
                    case 12:
                        m.resultStart = r.int32();
                        break;
                    case 13:
                        m.resultGroup = r.uint32();
                        break;
                    case 14:
                        m.resultLen = r.int32();
                        break;
                    case 15:
                        m.found = r.uint32();
                        break;
                    case 16:
                        m.groups = r.uint32();
                        break;
                    case 17:
                        m.buddy = r.uint32();
                        break;
                    case 18:
                        m.flags = r.uint32();
                        break;
                    case 19:
                        m.tail = r.uint32();
                        break;
                    case 20:
                        m.cr = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4MballocAllocFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4MballocAllocFtraceEvent} Ext4MballocAllocFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4MballocAllocFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4MballocAllocFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4MballocAllocFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.origLogical != null && m.hasOwnProperty("origLogical")) {
                    if (!$util.isInteger(m.origLogical))
                        return "origLogical: integer expected";
                }
                if (m.origStart != null && m.hasOwnProperty("origStart")) {
                    if (!$util.isInteger(m.origStart))
                        return "origStart: integer expected";
                }
                if (m.origGroup != null && m.hasOwnProperty("origGroup")) {
                    if (!$util.isInteger(m.origGroup))
                        return "origGroup: integer expected";
                }
                if (m.origLen != null && m.hasOwnProperty("origLen")) {
                    if (!$util.isInteger(m.origLen))
                        return "origLen: integer expected";
                }
                if (m.goalLogical != null && m.hasOwnProperty("goalLogical")) {
                    if (!$util.isInteger(m.goalLogical))
                        return "goalLogical: integer expected";
                }
                if (m.goalStart != null && m.hasOwnProperty("goalStart")) {
                    if (!$util.isInteger(m.goalStart))
                        return "goalStart: integer expected";
                }
                if (m.goalGroup != null && m.hasOwnProperty("goalGroup")) {
                    if (!$util.isInteger(m.goalGroup))
                        return "goalGroup: integer expected";
                }
                if (m.goalLen != null && m.hasOwnProperty("goalLen")) {
                    if (!$util.isInteger(m.goalLen))
                        return "goalLen: integer expected";
                }
                if (m.resultLogical != null && m.hasOwnProperty("resultLogical")) {
                    if (!$util.isInteger(m.resultLogical))
                        return "resultLogical: integer expected";
                }
                if (m.resultStart != null && m.hasOwnProperty("resultStart")) {
                    if (!$util.isInteger(m.resultStart))
                        return "resultStart: integer expected";
                }
                if (m.resultGroup != null && m.hasOwnProperty("resultGroup")) {
                    if (!$util.isInteger(m.resultGroup))
                        return "resultGroup: integer expected";
                }
                if (m.resultLen != null && m.hasOwnProperty("resultLen")) {
                    if (!$util.isInteger(m.resultLen))
                        return "resultLen: integer expected";
                }
                if (m.found != null && m.hasOwnProperty("found")) {
                    if (!$util.isInteger(m.found))
                        return "found: integer expected";
                }
                if (m.groups != null && m.hasOwnProperty("groups")) {
                    if (!$util.isInteger(m.groups))
                        return "groups: integer expected";
                }
                if (m.buddy != null && m.hasOwnProperty("buddy")) {
                    if (!$util.isInteger(m.buddy))
                        return "buddy: integer expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.tail != null && m.hasOwnProperty("tail")) {
                    if (!$util.isInteger(m.tail))
                        return "tail: integer expected";
                }
                if (m.cr != null && m.hasOwnProperty("cr")) {
                    if (!$util.isInteger(m.cr))
                        return "cr: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4MballocAllocFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4MballocAllocFtraceEvent} Ext4MballocAllocFtraceEvent
             */
            Ext4MballocAllocFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4MballocAllocFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4MballocAllocFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.origLogical != null) {
                    m.origLogical = d.origLogical >>> 0;
                }
                if (d.origStart != null) {
                    m.origStart = d.origStart | 0;
                }
                if (d.origGroup != null) {
                    m.origGroup = d.origGroup >>> 0;
                }
                if (d.origLen != null) {
                    m.origLen = d.origLen | 0;
                }
                if (d.goalLogical != null) {
                    m.goalLogical = d.goalLogical >>> 0;
                }
                if (d.goalStart != null) {
                    m.goalStart = d.goalStart | 0;
                }
                if (d.goalGroup != null) {
                    m.goalGroup = d.goalGroup >>> 0;
                }
                if (d.goalLen != null) {
                    m.goalLen = d.goalLen | 0;
                }
                if (d.resultLogical != null) {
                    m.resultLogical = d.resultLogical >>> 0;
                }
                if (d.resultStart != null) {
                    m.resultStart = d.resultStart | 0;
                }
                if (d.resultGroup != null) {
                    m.resultGroup = d.resultGroup >>> 0;
                }
                if (d.resultLen != null) {
                    m.resultLen = d.resultLen | 0;
                }
                if (d.found != null) {
                    m.found = d.found >>> 0;
                }
                if (d.groups != null) {
                    m.groups = d.groups >>> 0;
                }
                if (d.buddy != null) {
                    m.buddy = d.buddy >>> 0;
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                if (d.tail != null) {
                    m.tail = d.tail >>> 0;
                }
                if (d.cr != null) {
                    m.cr = d.cr >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4MballocAllocFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4MballocAllocFtraceEvent} m Ext4MballocAllocFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4MballocAllocFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.origLogical = 0;
                    d.origStart = 0;
                    d.origGroup = 0;
                    d.origLen = 0;
                    d.goalLogical = 0;
                    d.goalStart = 0;
                    d.goalGroup = 0;
                    d.goalLen = 0;
                    d.resultLogical = 0;
                    d.resultStart = 0;
                    d.resultGroup = 0;
                    d.resultLen = 0;
                    d.found = 0;
                    d.groups = 0;
                    d.buddy = 0;
                    d.flags = 0;
                    d.tail = 0;
                    d.cr = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.origLogical != null && m.hasOwnProperty("origLogical")) {
                    d.origLogical = m.origLogical;
                }
                if (m.origStart != null && m.hasOwnProperty("origStart")) {
                    d.origStart = m.origStart;
                }
                if (m.origGroup != null && m.hasOwnProperty("origGroup")) {
                    d.origGroup = m.origGroup;
                }
                if (m.origLen != null && m.hasOwnProperty("origLen")) {
                    d.origLen = m.origLen;
                }
                if (m.goalLogical != null && m.hasOwnProperty("goalLogical")) {
                    d.goalLogical = m.goalLogical;
                }
                if (m.goalStart != null && m.hasOwnProperty("goalStart")) {
                    d.goalStart = m.goalStart;
                }
                if (m.goalGroup != null && m.hasOwnProperty("goalGroup")) {
                    d.goalGroup = m.goalGroup;
                }
                if (m.goalLen != null && m.hasOwnProperty("goalLen")) {
                    d.goalLen = m.goalLen;
                }
                if (m.resultLogical != null && m.hasOwnProperty("resultLogical")) {
                    d.resultLogical = m.resultLogical;
                }
                if (m.resultStart != null && m.hasOwnProperty("resultStart")) {
                    d.resultStart = m.resultStart;
                }
                if (m.resultGroup != null && m.hasOwnProperty("resultGroup")) {
                    d.resultGroup = m.resultGroup;
                }
                if (m.resultLen != null && m.hasOwnProperty("resultLen")) {
                    d.resultLen = m.resultLen;
                }
                if (m.found != null && m.hasOwnProperty("found")) {
                    d.found = m.found;
                }
                if (m.groups != null && m.hasOwnProperty("groups")) {
                    d.groups = m.groups;
                }
                if (m.buddy != null && m.hasOwnProperty("buddy")) {
                    d.buddy = m.buddy;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.tail != null && m.hasOwnProperty("tail")) {
                    d.tail = m.tail;
                }
                if (m.cr != null && m.hasOwnProperty("cr")) {
                    d.cr = m.cr;
                }
                return d;
            };

            /**
             * Converts this Ext4MballocAllocFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4MballocAllocFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4MballocAllocFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4MballocAllocFtraceEvent;
        })();

        protos.Ext4MballocDiscardFtraceEvent = (function() {

            /**
             * Properties of an Ext4MballocDiscardFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4MballocDiscardFtraceEvent
             * @property {number|null} [dev] Ext4MballocDiscardFtraceEvent dev
             * @property {number|null} [ino] Ext4MballocDiscardFtraceEvent ino
             * @property {number|null} [resultStart] Ext4MballocDiscardFtraceEvent resultStart
             * @property {number|null} [resultGroup] Ext4MballocDiscardFtraceEvent resultGroup
             * @property {number|null} [resultLen] Ext4MballocDiscardFtraceEvent resultLen
             */

            /**
             * Constructs a new Ext4MballocDiscardFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4MballocDiscardFtraceEvent.
             * @implements IExt4MballocDiscardFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4MballocDiscardFtraceEvent=} [p] Properties to set
             */
            function Ext4MballocDiscardFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4MballocDiscardFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4MballocDiscardFtraceEvent
             * @instance
             */
            Ext4MballocDiscardFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MballocDiscardFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4MballocDiscardFtraceEvent
             * @instance
             */
            Ext4MballocDiscardFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MballocDiscardFtraceEvent resultStart.
             * @member {number} resultStart
             * @memberof perfetto.protos.Ext4MballocDiscardFtraceEvent
             * @instance
             */
            Ext4MballocDiscardFtraceEvent.prototype.resultStart = 0;

            /**
             * Ext4MballocDiscardFtraceEvent resultGroup.
             * @member {number} resultGroup
             * @memberof perfetto.protos.Ext4MballocDiscardFtraceEvent
             * @instance
             */
            Ext4MballocDiscardFtraceEvent.prototype.resultGroup = 0;

            /**
             * Ext4MballocDiscardFtraceEvent resultLen.
             * @member {number} resultLen
             * @memberof perfetto.protos.Ext4MballocDiscardFtraceEvent
             * @instance
             */
            Ext4MballocDiscardFtraceEvent.prototype.resultLen = 0;

            /**
             * Creates a new Ext4MballocDiscardFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4MballocDiscardFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MballocDiscardFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4MballocDiscardFtraceEvent} Ext4MballocDiscardFtraceEvent instance
             */
            Ext4MballocDiscardFtraceEvent.create = function create(properties) {
                return new Ext4MballocDiscardFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4MballocDiscardFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4MballocDiscardFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4MballocDiscardFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MballocDiscardFtraceEvent} m Ext4MballocDiscardFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4MballocDiscardFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.resultStart != null && Object.hasOwnProperty.call(m, "resultStart"))
                    w.uint32(24).int32(m.resultStart);
                if (m.resultGroup != null && Object.hasOwnProperty.call(m, "resultGroup"))
                    w.uint32(32).uint32(m.resultGroup);
                if (m.resultLen != null && Object.hasOwnProperty.call(m, "resultLen"))
                    w.uint32(40).int32(m.resultLen);
                return w;
            };

            /**
             * Encodes the specified Ext4MballocDiscardFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4MballocDiscardFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4MballocDiscardFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MballocDiscardFtraceEvent} message Ext4MballocDiscardFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4MballocDiscardFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4MballocDiscardFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4MballocDiscardFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4MballocDiscardFtraceEvent} Ext4MballocDiscardFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4MballocDiscardFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4MballocDiscardFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.resultStart = r.int32();
                        break;
                    case 4:
                        m.resultGroup = r.uint32();
                        break;
                    case 5:
                        m.resultLen = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4MballocDiscardFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4MballocDiscardFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4MballocDiscardFtraceEvent} Ext4MballocDiscardFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4MballocDiscardFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4MballocDiscardFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4MballocDiscardFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4MballocDiscardFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.resultStart != null && m.hasOwnProperty("resultStart")) {
                    if (!$util.isInteger(m.resultStart))
                        return "resultStart: integer expected";
                }
                if (m.resultGroup != null && m.hasOwnProperty("resultGroup")) {
                    if (!$util.isInteger(m.resultGroup))
                        return "resultGroup: integer expected";
                }
                if (m.resultLen != null && m.hasOwnProperty("resultLen")) {
                    if (!$util.isInteger(m.resultLen))
                        return "resultLen: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4MballocDiscardFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4MballocDiscardFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4MballocDiscardFtraceEvent} Ext4MballocDiscardFtraceEvent
             */
            Ext4MballocDiscardFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4MballocDiscardFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4MballocDiscardFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.resultStart != null) {
                    m.resultStart = d.resultStart | 0;
                }
                if (d.resultGroup != null) {
                    m.resultGroup = d.resultGroup >>> 0;
                }
                if (d.resultLen != null) {
                    m.resultLen = d.resultLen | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4MballocDiscardFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4MballocDiscardFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4MballocDiscardFtraceEvent} m Ext4MballocDiscardFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4MballocDiscardFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.resultStart = 0;
                    d.resultGroup = 0;
                    d.resultLen = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.resultStart != null && m.hasOwnProperty("resultStart")) {
                    d.resultStart = m.resultStart;
                }
                if (m.resultGroup != null && m.hasOwnProperty("resultGroup")) {
                    d.resultGroup = m.resultGroup;
                }
                if (m.resultLen != null && m.hasOwnProperty("resultLen")) {
                    d.resultLen = m.resultLen;
                }
                return d;
            };

            /**
             * Converts this Ext4MballocDiscardFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4MballocDiscardFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4MballocDiscardFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4MballocDiscardFtraceEvent;
        })();

        protos.Ext4MballocFreeFtraceEvent = (function() {

            /**
             * Properties of an Ext4MballocFreeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4MballocFreeFtraceEvent
             * @property {number|null} [dev] Ext4MballocFreeFtraceEvent dev
             * @property {number|null} [ino] Ext4MballocFreeFtraceEvent ino
             * @property {number|null} [resultStart] Ext4MballocFreeFtraceEvent resultStart
             * @property {number|null} [resultGroup] Ext4MballocFreeFtraceEvent resultGroup
             * @property {number|null} [resultLen] Ext4MballocFreeFtraceEvent resultLen
             */

            /**
             * Constructs a new Ext4MballocFreeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4MballocFreeFtraceEvent.
             * @implements IExt4MballocFreeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4MballocFreeFtraceEvent=} [p] Properties to set
             */
            function Ext4MballocFreeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4MballocFreeFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4MballocFreeFtraceEvent
             * @instance
             */
            Ext4MballocFreeFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MballocFreeFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4MballocFreeFtraceEvent
             * @instance
             */
            Ext4MballocFreeFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MballocFreeFtraceEvent resultStart.
             * @member {number} resultStart
             * @memberof perfetto.protos.Ext4MballocFreeFtraceEvent
             * @instance
             */
            Ext4MballocFreeFtraceEvent.prototype.resultStart = 0;

            /**
             * Ext4MballocFreeFtraceEvent resultGroup.
             * @member {number} resultGroup
             * @memberof perfetto.protos.Ext4MballocFreeFtraceEvent
             * @instance
             */
            Ext4MballocFreeFtraceEvent.prototype.resultGroup = 0;

            /**
             * Ext4MballocFreeFtraceEvent resultLen.
             * @member {number} resultLen
             * @memberof perfetto.protos.Ext4MballocFreeFtraceEvent
             * @instance
             */
            Ext4MballocFreeFtraceEvent.prototype.resultLen = 0;

            /**
             * Creates a new Ext4MballocFreeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4MballocFreeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MballocFreeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4MballocFreeFtraceEvent} Ext4MballocFreeFtraceEvent instance
             */
            Ext4MballocFreeFtraceEvent.create = function create(properties) {
                return new Ext4MballocFreeFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4MballocFreeFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4MballocFreeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4MballocFreeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MballocFreeFtraceEvent} m Ext4MballocFreeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4MballocFreeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.resultStart != null && Object.hasOwnProperty.call(m, "resultStart"))
                    w.uint32(24).int32(m.resultStart);
                if (m.resultGroup != null && Object.hasOwnProperty.call(m, "resultGroup"))
                    w.uint32(32).uint32(m.resultGroup);
                if (m.resultLen != null && Object.hasOwnProperty.call(m, "resultLen"))
                    w.uint32(40).int32(m.resultLen);
                return w;
            };

            /**
             * Encodes the specified Ext4MballocFreeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4MballocFreeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4MballocFreeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MballocFreeFtraceEvent} message Ext4MballocFreeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4MballocFreeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4MballocFreeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4MballocFreeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4MballocFreeFtraceEvent} Ext4MballocFreeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4MballocFreeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4MballocFreeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.resultStart = r.int32();
                        break;
                    case 4:
                        m.resultGroup = r.uint32();
                        break;
                    case 5:
                        m.resultLen = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4MballocFreeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4MballocFreeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4MballocFreeFtraceEvent} Ext4MballocFreeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4MballocFreeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4MballocFreeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4MballocFreeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4MballocFreeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.resultStart != null && m.hasOwnProperty("resultStart")) {
                    if (!$util.isInteger(m.resultStart))
                        return "resultStart: integer expected";
                }
                if (m.resultGroup != null && m.hasOwnProperty("resultGroup")) {
                    if (!$util.isInteger(m.resultGroup))
                        return "resultGroup: integer expected";
                }
                if (m.resultLen != null && m.hasOwnProperty("resultLen")) {
                    if (!$util.isInteger(m.resultLen))
                        return "resultLen: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4MballocFreeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4MballocFreeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4MballocFreeFtraceEvent} Ext4MballocFreeFtraceEvent
             */
            Ext4MballocFreeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4MballocFreeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4MballocFreeFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.resultStart != null) {
                    m.resultStart = d.resultStart | 0;
                }
                if (d.resultGroup != null) {
                    m.resultGroup = d.resultGroup >>> 0;
                }
                if (d.resultLen != null) {
                    m.resultLen = d.resultLen | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4MballocFreeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4MballocFreeFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4MballocFreeFtraceEvent} m Ext4MballocFreeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4MballocFreeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.resultStart = 0;
                    d.resultGroup = 0;
                    d.resultLen = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.resultStart != null && m.hasOwnProperty("resultStart")) {
                    d.resultStart = m.resultStart;
                }
                if (m.resultGroup != null && m.hasOwnProperty("resultGroup")) {
                    d.resultGroup = m.resultGroup;
                }
                if (m.resultLen != null && m.hasOwnProperty("resultLen")) {
                    d.resultLen = m.resultLen;
                }
                return d;
            };

            /**
             * Converts this Ext4MballocFreeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4MballocFreeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4MballocFreeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4MballocFreeFtraceEvent;
        })();

        protos.Ext4MballocPreallocFtraceEvent = (function() {

            /**
             * Properties of an Ext4MballocPreallocFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4MballocPreallocFtraceEvent
             * @property {number|null} [dev] Ext4MballocPreallocFtraceEvent dev
             * @property {number|null} [ino] Ext4MballocPreallocFtraceEvent ino
             * @property {number|null} [origLogical] Ext4MballocPreallocFtraceEvent origLogical
             * @property {number|null} [origStart] Ext4MballocPreallocFtraceEvent origStart
             * @property {number|null} [origGroup] Ext4MballocPreallocFtraceEvent origGroup
             * @property {number|null} [origLen] Ext4MballocPreallocFtraceEvent origLen
             * @property {number|null} [resultLogical] Ext4MballocPreallocFtraceEvent resultLogical
             * @property {number|null} [resultStart] Ext4MballocPreallocFtraceEvent resultStart
             * @property {number|null} [resultGroup] Ext4MballocPreallocFtraceEvent resultGroup
             * @property {number|null} [resultLen] Ext4MballocPreallocFtraceEvent resultLen
             */

            /**
             * Constructs a new Ext4MballocPreallocFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4MballocPreallocFtraceEvent.
             * @implements IExt4MballocPreallocFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4MballocPreallocFtraceEvent=} [p] Properties to set
             */
            function Ext4MballocPreallocFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4MballocPreallocFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4MballocPreallocFtraceEvent
             * @instance
             */
            Ext4MballocPreallocFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MballocPreallocFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4MballocPreallocFtraceEvent
             * @instance
             */
            Ext4MballocPreallocFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4MballocPreallocFtraceEvent origLogical.
             * @member {number} origLogical
             * @memberof perfetto.protos.Ext4MballocPreallocFtraceEvent
             * @instance
             */
            Ext4MballocPreallocFtraceEvent.prototype.origLogical = 0;

            /**
             * Ext4MballocPreallocFtraceEvent origStart.
             * @member {number} origStart
             * @memberof perfetto.protos.Ext4MballocPreallocFtraceEvent
             * @instance
             */
            Ext4MballocPreallocFtraceEvent.prototype.origStart = 0;

            /**
             * Ext4MballocPreallocFtraceEvent origGroup.
             * @member {number} origGroup
             * @memberof perfetto.protos.Ext4MballocPreallocFtraceEvent
             * @instance
             */
            Ext4MballocPreallocFtraceEvent.prototype.origGroup = 0;

            /**
             * Ext4MballocPreallocFtraceEvent origLen.
             * @member {number} origLen
             * @memberof perfetto.protos.Ext4MballocPreallocFtraceEvent
             * @instance
             */
            Ext4MballocPreallocFtraceEvent.prototype.origLen = 0;

            /**
             * Ext4MballocPreallocFtraceEvent resultLogical.
             * @member {number} resultLogical
             * @memberof perfetto.protos.Ext4MballocPreallocFtraceEvent
             * @instance
             */
            Ext4MballocPreallocFtraceEvent.prototype.resultLogical = 0;

            /**
             * Ext4MballocPreallocFtraceEvent resultStart.
             * @member {number} resultStart
             * @memberof perfetto.protos.Ext4MballocPreallocFtraceEvent
             * @instance
             */
            Ext4MballocPreallocFtraceEvent.prototype.resultStart = 0;

            /**
             * Ext4MballocPreallocFtraceEvent resultGroup.
             * @member {number} resultGroup
             * @memberof perfetto.protos.Ext4MballocPreallocFtraceEvent
             * @instance
             */
            Ext4MballocPreallocFtraceEvent.prototype.resultGroup = 0;

            /**
             * Ext4MballocPreallocFtraceEvent resultLen.
             * @member {number} resultLen
             * @memberof perfetto.protos.Ext4MballocPreallocFtraceEvent
             * @instance
             */
            Ext4MballocPreallocFtraceEvent.prototype.resultLen = 0;

            /**
             * Creates a new Ext4MballocPreallocFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4MballocPreallocFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MballocPreallocFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4MballocPreallocFtraceEvent} Ext4MballocPreallocFtraceEvent instance
             */
            Ext4MballocPreallocFtraceEvent.create = function create(properties) {
                return new Ext4MballocPreallocFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4MballocPreallocFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4MballocPreallocFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4MballocPreallocFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MballocPreallocFtraceEvent} m Ext4MballocPreallocFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4MballocPreallocFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.origLogical != null && Object.hasOwnProperty.call(m, "origLogical"))
                    w.uint32(24).uint32(m.origLogical);
                if (m.origStart != null && Object.hasOwnProperty.call(m, "origStart"))
                    w.uint32(32).int32(m.origStart);
                if (m.origGroup != null && Object.hasOwnProperty.call(m, "origGroup"))
                    w.uint32(40).uint32(m.origGroup);
                if (m.origLen != null && Object.hasOwnProperty.call(m, "origLen"))
                    w.uint32(48).int32(m.origLen);
                if (m.resultLogical != null && Object.hasOwnProperty.call(m, "resultLogical"))
                    w.uint32(56).uint32(m.resultLogical);
                if (m.resultStart != null && Object.hasOwnProperty.call(m, "resultStart"))
                    w.uint32(64).int32(m.resultStart);
                if (m.resultGroup != null && Object.hasOwnProperty.call(m, "resultGroup"))
                    w.uint32(72).uint32(m.resultGroup);
                if (m.resultLen != null && Object.hasOwnProperty.call(m, "resultLen"))
                    w.uint32(80).int32(m.resultLen);
                return w;
            };

            /**
             * Encodes the specified Ext4MballocPreallocFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4MballocPreallocFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4MballocPreallocFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4MballocPreallocFtraceEvent} message Ext4MballocPreallocFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4MballocPreallocFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4MballocPreallocFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4MballocPreallocFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4MballocPreallocFtraceEvent} Ext4MballocPreallocFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4MballocPreallocFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4MballocPreallocFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.origLogical = r.uint32();
                        break;
                    case 4:
                        m.origStart = r.int32();
                        break;
                    case 5:
                        m.origGroup = r.uint32();
                        break;
                    case 6:
                        m.origLen = r.int32();
                        break;
                    case 7:
                        m.resultLogical = r.uint32();
                        break;
                    case 8:
                        m.resultStart = r.int32();
                        break;
                    case 9:
                        m.resultGroup = r.uint32();
                        break;
                    case 10:
                        m.resultLen = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4MballocPreallocFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4MballocPreallocFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4MballocPreallocFtraceEvent} Ext4MballocPreallocFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4MballocPreallocFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4MballocPreallocFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4MballocPreallocFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4MballocPreallocFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.origLogical != null && m.hasOwnProperty("origLogical")) {
                    if (!$util.isInteger(m.origLogical))
                        return "origLogical: integer expected";
                }
                if (m.origStart != null && m.hasOwnProperty("origStart")) {
                    if (!$util.isInteger(m.origStart))
                        return "origStart: integer expected";
                }
                if (m.origGroup != null && m.hasOwnProperty("origGroup")) {
                    if (!$util.isInteger(m.origGroup))
                        return "origGroup: integer expected";
                }
                if (m.origLen != null && m.hasOwnProperty("origLen")) {
                    if (!$util.isInteger(m.origLen))
                        return "origLen: integer expected";
                }
                if (m.resultLogical != null && m.hasOwnProperty("resultLogical")) {
                    if (!$util.isInteger(m.resultLogical))
                        return "resultLogical: integer expected";
                }
                if (m.resultStart != null && m.hasOwnProperty("resultStart")) {
                    if (!$util.isInteger(m.resultStart))
                        return "resultStart: integer expected";
                }
                if (m.resultGroup != null && m.hasOwnProperty("resultGroup")) {
                    if (!$util.isInteger(m.resultGroup))
                        return "resultGroup: integer expected";
                }
                if (m.resultLen != null && m.hasOwnProperty("resultLen")) {
                    if (!$util.isInteger(m.resultLen))
                        return "resultLen: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4MballocPreallocFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4MballocPreallocFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4MballocPreallocFtraceEvent} Ext4MballocPreallocFtraceEvent
             */
            Ext4MballocPreallocFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4MballocPreallocFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4MballocPreallocFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.origLogical != null) {
                    m.origLogical = d.origLogical >>> 0;
                }
                if (d.origStart != null) {
                    m.origStart = d.origStart | 0;
                }
                if (d.origGroup != null) {
                    m.origGroup = d.origGroup >>> 0;
                }
                if (d.origLen != null) {
                    m.origLen = d.origLen | 0;
                }
                if (d.resultLogical != null) {
                    m.resultLogical = d.resultLogical >>> 0;
                }
                if (d.resultStart != null) {
                    m.resultStart = d.resultStart | 0;
                }
                if (d.resultGroup != null) {
                    m.resultGroup = d.resultGroup >>> 0;
                }
                if (d.resultLen != null) {
                    m.resultLen = d.resultLen | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4MballocPreallocFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4MballocPreallocFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4MballocPreallocFtraceEvent} m Ext4MballocPreallocFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4MballocPreallocFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.origLogical = 0;
                    d.origStart = 0;
                    d.origGroup = 0;
                    d.origLen = 0;
                    d.resultLogical = 0;
                    d.resultStart = 0;
                    d.resultGroup = 0;
                    d.resultLen = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.origLogical != null && m.hasOwnProperty("origLogical")) {
                    d.origLogical = m.origLogical;
                }
                if (m.origStart != null && m.hasOwnProperty("origStart")) {
                    d.origStart = m.origStart;
                }
                if (m.origGroup != null && m.hasOwnProperty("origGroup")) {
                    d.origGroup = m.origGroup;
                }
                if (m.origLen != null && m.hasOwnProperty("origLen")) {
                    d.origLen = m.origLen;
                }
                if (m.resultLogical != null && m.hasOwnProperty("resultLogical")) {
                    d.resultLogical = m.resultLogical;
                }
                if (m.resultStart != null && m.hasOwnProperty("resultStart")) {
                    d.resultStart = m.resultStart;
                }
                if (m.resultGroup != null && m.hasOwnProperty("resultGroup")) {
                    d.resultGroup = m.resultGroup;
                }
                if (m.resultLen != null && m.hasOwnProperty("resultLen")) {
                    d.resultLen = m.resultLen;
                }
                return d;
            };

            /**
             * Converts this Ext4MballocPreallocFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4MballocPreallocFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4MballocPreallocFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4MballocPreallocFtraceEvent;
        })();

        protos.Ext4OtherInodeUpdateTimeFtraceEvent = (function() {

            /**
             * Properties of an Ext4OtherInodeUpdateTimeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4OtherInodeUpdateTimeFtraceEvent
             * @property {number|null} [dev] Ext4OtherInodeUpdateTimeFtraceEvent dev
             * @property {number|null} [ino] Ext4OtherInodeUpdateTimeFtraceEvent ino
             * @property {number|null} [origIno] Ext4OtherInodeUpdateTimeFtraceEvent origIno
             * @property {number|null} [uid] Ext4OtherInodeUpdateTimeFtraceEvent uid
             * @property {number|null} [gid] Ext4OtherInodeUpdateTimeFtraceEvent gid
             * @property {number|null} [mode] Ext4OtherInodeUpdateTimeFtraceEvent mode
             */

            /**
             * Constructs a new Ext4OtherInodeUpdateTimeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4OtherInodeUpdateTimeFtraceEvent.
             * @implements IExt4OtherInodeUpdateTimeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4OtherInodeUpdateTimeFtraceEvent=} [p] Properties to set
             */
            function Ext4OtherInodeUpdateTimeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4OtherInodeUpdateTimeFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent
             * @instance
             */
            Ext4OtherInodeUpdateTimeFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4OtherInodeUpdateTimeFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent
             * @instance
             */
            Ext4OtherInodeUpdateTimeFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4OtherInodeUpdateTimeFtraceEvent origIno.
             * @member {number} origIno
             * @memberof perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent
             * @instance
             */
            Ext4OtherInodeUpdateTimeFtraceEvent.prototype.origIno = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4OtherInodeUpdateTimeFtraceEvent uid.
             * @member {number} uid
             * @memberof perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent
             * @instance
             */
            Ext4OtherInodeUpdateTimeFtraceEvent.prototype.uid = 0;

            /**
             * Ext4OtherInodeUpdateTimeFtraceEvent gid.
             * @member {number} gid
             * @memberof perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent
             * @instance
             */
            Ext4OtherInodeUpdateTimeFtraceEvent.prototype.gid = 0;

            /**
             * Ext4OtherInodeUpdateTimeFtraceEvent mode.
             * @member {number} mode
             * @memberof perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent
             * @instance
             */
            Ext4OtherInodeUpdateTimeFtraceEvent.prototype.mode = 0;

            /**
             * Creates a new Ext4OtherInodeUpdateTimeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4OtherInodeUpdateTimeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent} Ext4OtherInodeUpdateTimeFtraceEvent instance
             */
            Ext4OtherInodeUpdateTimeFtraceEvent.create = function create(properties) {
                return new Ext4OtherInodeUpdateTimeFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4OtherInodeUpdateTimeFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4OtherInodeUpdateTimeFtraceEvent} m Ext4OtherInodeUpdateTimeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4OtherInodeUpdateTimeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.origIno != null && Object.hasOwnProperty.call(m, "origIno"))
                    w.uint32(24).uint64(m.origIno);
                if (m.uid != null && Object.hasOwnProperty.call(m, "uid"))
                    w.uint32(32).uint32(m.uid);
                if (m.gid != null && Object.hasOwnProperty.call(m, "gid"))
                    w.uint32(40).uint32(m.gid);
                if (m.mode != null && Object.hasOwnProperty.call(m, "mode"))
                    w.uint32(48).uint32(m.mode);
                return w;
            };

            /**
             * Encodes the specified Ext4OtherInodeUpdateTimeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4OtherInodeUpdateTimeFtraceEvent} message Ext4OtherInodeUpdateTimeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4OtherInodeUpdateTimeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4OtherInodeUpdateTimeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent} Ext4OtherInodeUpdateTimeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4OtherInodeUpdateTimeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.origIno = r.uint64();
                        break;
                    case 4:
                        m.uid = r.uint32();
                        break;
                    case 5:
                        m.gid = r.uint32();
                        break;
                    case 6:
                        m.mode = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4OtherInodeUpdateTimeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent} Ext4OtherInodeUpdateTimeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4OtherInodeUpdateTimeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4OtherInodeUpdateTimeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4OtherInodeUpdateTimeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.origIno != null && m.hasOwnProperty("origIno")) {
                    if (!$util.isInteger(m.origIno) && !(m.origIno && $util.isInteger(m.origIno.low) && $util.isInteger(m.origIno.high)))
                        return "origIno: integer|Long expected";
                }
                if (m.uid != null && m.hasOwnProperty("uid")) {
                    if (!$util.isInteger(m.uid))
                        return "uid: integer expected";
                }
                if (m.gid != null && m.hasOwnProperty("gid")) {
                    if (!$util.isInteger(m.gid))
                        return "gid: integer expected";
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    if (!$util.isInteger(m.mode))
                        return "mode: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4OtherInodeUpdateTimeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent} Ext4OtherInodeUpdateTimeFtraceEvent
             */
            Ext4OtherInodeUpdateTimeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.origIno != null) {
                    if ($util.Long)
                        (m.origIno = $util.Long.fromValue(d.origIno)).unsigned = true;
                    else if (typeof d.origIno === "string")
                        m.origIno = parseInt(d.origIno, 10);
                    else if (typeof d.origIno === "number")
                        m.origIno = d.origIno;
                    else if (typeof d.origIno === "object")
                        m.origIno = new $util.LongBits(d.origIno.low >>> 0, d.origIno.high >>> 0).toNumber(true);
                }
                if (d.uid != null) {
                    m.uid = d.uid >>> 0;
                }
                if (d.gid != null) {
                    m.gid = d.gid >>> 0;
                }
                if (d.mode != null) {
                    m.mode = d.mode >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4OtherInodeUpdateTimeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent} m Ext4OtherInodeUpdateTimeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4OtherInodeUpdateTimeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.origIno = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.origIno = o.longs === String ? "0" : 0;
                    d.uid = 0;
                    d.gid = 0;
                    d.mode = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.origIno != null && m.hasOwnProperty("origIno")) {
                    if (typeof m.origIno === "number")
                        d.origIno = o.longs === String ? String(m.origIno) : m.origIno;
                    else
                        d.origIno = o.longs === String ? $util.Long.prototype.toString.call(m.origIno) : o.longs === Number ? new $util.LongBits(m.origIno.low >>> 0, m.origIno.high >>> 0).toNumber(true) : m.origIno;
                }
                if (m.uid != null && m.hasOwnProperty("uid")) {
                    d.uid = m.uid;
                }
                if (m.gid != null && m.hasOwnProperty("gid")) {
                    d.gid = m.gid;
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    d.mode = m.mode;
                }
                return d;
            };

            /**
             * Converts this Ext4OtherInodeUpdateTimeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4OtherInodeUpdateTimeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4OtherInodeUpdateTimeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4OtherInodeUpdateTimeFtraceEvent;
        })();

        protos.Ext4PunchHoleFtraceEvent = (function() {

            /**
             * Properties of an Ext4PunchHoleFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4PunchHoleFtraceEvent
             * @property {number|null} [dev] Ext4PunchHoleFtraceEvent dev
             * @property {number|null} [ino] Ext4PunchHoleFtraceEvent ino
             * @property {number|null} [offset] Ext4PunchHoleFtraceEvent offset
             * @property {number|null} [len] Ext4PunchHoleFtraceEvent len
             * @property {number|null} [mode] Ext4PunchHoleFtraceEvent mode
             */

            /**
             * Constructs a new Ext4PunchHoleFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4PunchHoleFtraceEvent.
             * @implements IExt4PunchHoleFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4PunchHoleFtraceEvent=} [p] Properties to set
             */
            function Ext4PunchHoleFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4PunchHoleFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4PunchHoleFtraceEvent
             * @instance
             */
            Ext4PunchHoleFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4PunchHoleFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4PunchHoleFtraceEvent
             * @instance
             */
            Ext4PunchHoleFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4PunchHoleFtraceEvent offset.
             * @member {number} offset
             * @memberof perfetto.protos.Ext4PunchHoleFtraceEvent
             * @instance
             */
            Ext4PunchHoleFtraceEvent.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4PunchHoleFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4PunchHoleFtraceEvent
             * @instance
             */
            Ext4PunchHoleFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4PunchHoleFtraceEvent mode.
             * @member {number} mode
             * @memberof perfetto.protos.Ext4PunchHoleFtraceEvent
             * @instance
             */
            Ext4PunchHoleFtraceEvent.prototype.mode = 0;

            /**
             * Creates a new Ext4PunchHoleFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4PunchHoleFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4PunchHoleFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4PunchHoleFtraceEvent} Ext4PunchHoleFtraceEvent instance
             */
            Ext4PunchHoleFtraceEvent.create = function create(properties) {
                return new Ext4PunchHoleFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4PunchHoleFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4PunchHoleFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4PunchHoleFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4PunchHoleFtraceEvent} m Ext4PunchHoleFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4PunchHoleFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.offset != null && Object.hasOwnProperty.call(m, "offset"))
                    w.uint32(24).int64(m.offset);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).int64(m.len);
                if (m.mode != null && Object.hasOwnProperty.call(m, "mode"))
                    w.uint32(40).int32(m.mode);
                return w;
            };

            /**
             * Encodes the specified Ext4PunchHoleFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4PunchHoleFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4PunchHoleFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4PunchHoleFtraceEvent} message Ext4PunchHoleFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4PunchHoleFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4PunchHoleFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4PunchHoleFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4PunchHoleFtraceEvent} Ext4PunchHoleFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4PunchHoleFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4PunchHoleFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.offset = r.int64();
                        break;
                    case 4:
                        m.len = r.int64();
                        break;
                    case 5:
                        m.mode = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4PunchHoleFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4PunchHoleFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4PunchHoleFtraceEvent} Ext4PunchHoleFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4PunchHoleFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4PunchHoleFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4PunchHoleFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4PunchHoleFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (!$util.isInteger(m.offset) && !(m.offset && $util.isInteger(m.offset.low) && $util.isInteger(m.offset.high)))
                        return "offset: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    if (!$util.isInteger(m.mode))
                        return "mode: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4PunchHoleFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4PunchHoleFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4PunchHoleFtraceEvent} Ext4PunchHoleFtraceEvent
             */
            Ext4PunchHoleFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4PunchHoleFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4PunchHoleFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.offset != null) {
                    if ($util.Long)
                        (m.offset = $util.Long.fromValue(d.offset)).unsigned = false;
                    else if (typeof d.offset === "string")
                        m.offset = parseInt(d.offset, 10);
                    else if (typeof d.offset === "number")
                        m.offset = d.offset;
                    else if (typeof d.offset === "object")
                        m.offset = new $util.LongBits(d.offset.low >>> 0, d.offset.high >>> 0).toNumber();
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = false;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber();
                }
                if (d.mode != null) {
                    m.mode = d.mode | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4PunchHoleFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4PunchHoleFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4PunchHoleFtraceEvent} m Ext4PunchHoleFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4PunchHoleFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.offset = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.offset = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                    d.mode = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (typeof m.offset === "number")
                        d.offset = o.longs === String ? String(m.offset) : m.offset;
                    else
                        d.offset = o.longs === String ? $util.Long.prototype.toString.call(m.offset) : o.longs === Number ? new $util.LongBits(m.offset.low >>> 0, m.offset.high >>> 0).toNumber() : m.offset;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber() : m.len;
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    d.mode = m.mode;
                }
                return d;
            };

            /**
             * Converts this Ext4PunchHoleFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4PunchHoleFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4PunchHoleFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4PunchHoleFtraceEvent;
        })();

        protos.Ext4ReadBlockBitmapLoadFtraceEvent = (function() {

            /**
             * Properties of an Ext4ReadBlockBitmapLoadFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4ReadBlockBitmapLoadFtraceEvent
             * @property {number|null} [dev] Ext4ReadBlockBitmapLoadFtraceEvent dev
             * @property {number|null} [group] Ext4ReadBlockBitmapLoadFtraceEvent group
             * @property {number|null} [prefetch] Ext4ReadBlockBitmapLoadFtraceEvent prefetch
             */

            /**
             * Constructs a new Ext4ReadBlockBitmapLoadFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4ReadBlockBitmapLoadFtraceEvent.
             * @implements IExt4ReadBlockBitmapLoadFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4ReadBlockBitmapLoadFtraceEvent=} [p] Properties to set
             */
            function Ext4ReadBlockBitmapLoadFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4ReadBlockBitmapLoadFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent
             * @instance
             */
            Ext4ReadBlockBitmapLoadFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ReadBlockBitmapLoadFtraceEvent group.
             * @member {number} group
             * @memberof perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent
             * @instance
             */
            Ext4ReadBlockBitmapLoadFtraceEvent.prototype.group = 0;

            /**
             * Ext4ReadBlockBitmapLoadFtraceEvent prefetch.
             * @member {number} prefetch
             * @memberof perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent
             * @instance
             */
            Ext4ReadBlockBitmapLoadFtraceEvent.prototype.prefetch = 0;

            /**
             * Creates a new Ext4ReadBlockBitmapLoadFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ReadBlockBitmapLoadFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent} Ext4ReadBlockBitmapLoadFtraceEvent instance
             */
            Ext4ReadBlockBitmapLoadFtraceEvent.create = function create(properties) {
                return new Ext4ReadBlockBitmapLoadFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4ReadBlockBitmapLoadFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ReadBlockBitmapLoadFtraceEvent} m Ext4ReadBlockBitmapLoadFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ReadBlockBitmapLoadFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.group != null && Object.hasOwnProperty.call(m, "group"))
                    w.uint32(16).uint32(m.group);
                if (m.prefetch != null && Object.hasOwnProperty.call(m, "prefetch"))
                    w.uint32(24).uint32(m.prefetch);
                return w;
            };

            /**
             * Encodes the specified Ext4ReadBlockBitmapLoadFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ReadBlockBitmapLoadFtraceEvent} message Ext4ReadBlockBitmapLoadFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ReadBlockBitmapLoadFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4ReadBlockBitmapLoadFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent} Ext4ReadBlockBitmapLoadFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ReadBlockBitmapLoadFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.group = r.uint32();
                        break;
                    case 3:
                        m.prefetch = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4ReadBlockBitmapLoadFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent} Ext4ReadBlockBitmapLoadFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ReadBlockBitmapLoadFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4ReadBlockBitmapLoadFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4ReadBlockBitmapLoadFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.group != null && m.hasOwnProperty("group")) {
                    if (!$util.isInteger(m.group))
                        return "group: integer expected";
                }
                if (m.prefetch != null && m.hasOwnProperty("prefetch")) {
                    if (!$util.isInteger(m.prefetch))
                        return "prefetch: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4ReadBlockBitmapLoadFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent} Ext4ReadBlockBitmapLoadFtraceEvent
             */
            Ext4ReadBlockBitmapLoadFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.group != null) {
                    m.group = d.group >>> 0;
                }
                if (d.prefetch != null) {
                    m.prefetch = d.prefetch >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4ReadBlockBitmapLoadFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent} m Ext4ReadBlockBitmapLoadFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4ReadBlockBitmapLoadFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    d.group = 0;
                    d.prefetch = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.group != null && m.hasOwnProperty("group")) {
                    d.group = m.group;
                }
                if (m.prefetch != null && m.hasOwnProperty("prefetch")) {
                    d.prefetch = m.prefetch;
                }
                return d;
            };

            /**
             * Converts this Ext4ReadBlockBitmapLoadFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4ReadBlockBitmapLoadFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4ReadBlockBitmapLoadFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4ReadBlockBitmapLoadFtraceEvent;
        })();

        protos.Ext4ReadpageFtraceEvent = (function() {

            /**
             * Properties of an Ext4ReadpageFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4ReadpageFtraceEvent
             * @property {number|null} [dev] Ext4ReadpageFtraceEvent dev
             * @property {number|null} [ino] Ext4ReadpageFtraceEvent ino
             * @property {number|null} [index] Ext4ReadpageFtraceEvent index
             */

            /**
             * Constructs a new Ext4ReadpageFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4ReadpageFtraceEvent.
             * @implements IExt4ReadpageFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4ReadpageFtraceEvent=} [p] Properties to set
             */
            function Ext4ReadpageFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4ReadpageFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4ReadpageFtraceEvent
             * @instance
             */
            Ext4ReadpageFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ReadpageFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4ReadpageFtraceEvent
             * @instance
             */
            Ext4ReadpageFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ReadpageFtraceEvent index.
             * @member {number} index
             * @memberof perfetto.protos.Ext4ReadpageFtraceEvent
             * @instance
             */
            Ext4ReadpageFtraceEvent.prototype.index = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new Ext4ReadpageFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4ReadpageFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ReadpageFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4ReadpageFtraceEvent} Ext4ReadpageFtraceEvent instance
             */
            Ext4ReadpageFtraceEvent.create = function create(properties) {
                return new Ext4ReadpageFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4ReadpageFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4ReadpageFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4ReadpageFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ReadpageFtraceEvent} m Ext4ReadpageFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ReadpageFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.index != null && Object.hasOwnProperty.call(m, "index"))
                    w.uint32(24).uint64(m.index);
                return w;
            };

            /**
             * Encodes the specified Ext4ReadpageFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4ReadpageFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4ReadpageFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ReadpageFtraceEvent} message Ext4ReadpageFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ReadpageFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4ReadpageFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4ReadpageFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4ReadpageFtraceEvent} Ext4ReadpageFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ReadpageFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4ReadpageFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.index = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4ReadpageFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4ReadpageFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4ReadpageFtraceEvent} Ext4ReadpageFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ReadpageFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4ReadpageFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4ReadpageFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4ReadpageFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (!$util.isInteger(m.index) && !(m.index && $util.isInteger(m.index.low) && $util.isInteger(m.index.high)))
                        return "index: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an Ext4ReadpageFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4ReadpageFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4ReadpageFtraceEvent} Ext4ReadpageFtraceEvent
             */
            Ext4ReadpageFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4ReadpageFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4ReadpageFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.index != null) {
                    if ($util.Long)
                        (m.index = $util.Long.fromValue(d.index)).unsigned = true;
                    else if (typeof d.index === "string")
                        m.index = parseInt(d.index, 10);
                    else if (typeof d.index === "number")
                        m.index = d.index;
                    else if (typeof d.index === "object")
                        m.index = new $util.LongBits(d.index.low >>> 0, d.index.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4ReadpageFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4ReadpageFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4ReadpageFtraceEvent} m Ext4ReadpageFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4ReadpageFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.index = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.index = o.longs === String ? "0" : 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (typeof m.index === "number")
                        d.index = o.longs === String ? String(m.index) : m.index;
                    else
                        d.index = o.longs === String ? $util.Long.prototype.toString.call(m.index) : o.longs === Number ? new $util.LongBits(m.index.low >>> 0, m.index.high >>> 0).toNumber(true) : m.index;
                }
                return d;
            };

            /**
             * Converts this Ext4ReadpageFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4ReadpageFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4ReadpageFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4ReadpageFtraceEvent;
        })();

        protos.Ext4ReleasepageFtraceEvent = (function() {

            /**
             * Properties of an Ext4ReleasepageFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4ReleasepageFtraceEvent
             * @property {number|null} [dev] Ext4ReleasepageFtraceEvent dev
             * @property {number|null} [ino] Ext4ReleasepageFtraceEvent ino
             * @property {number|null} [index] Ext4ReleasepageFtraceEvent index
             */

            /**
             * Constructs a new Ext4ReleasepageFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4ReleasepageFtraceEvent.
             * @implements IExt4ReleasepageFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4ReleasepageFtraceEvent=} [p] Properties to set
             */
            function Ext4ReleasepageFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4ReleasepageFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4ReleasepageFtraceEvent
             * @instance
             */
            Ext4ReleasepageFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ReleasepageFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4ReleasepageFtraceEvent
             * @instance
             */
            Ext4ReleasepageFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ReleasepageFtraceEvent index.
             * @member {number} index
             * @memberof perfetto.protos.Ext4ReleasepageFtraceEvent
             * @instance
             */
            Ext4ReleasepageFtraceEvent.prototype.index = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new Ext4ReleasepageFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4ReleasepageFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ReleasepageFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4ReleasepageFtraceEvent} Ext4ReleasepageFtraceEvent instance
             */
            Ext4ReleasepageFtraceEvent.create = function create(properties) {
                return new Ext4ReleasepageFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4ReleasepageFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4ReleasepageFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4ReleasepageFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ReleasepageFtraceEvent} m Ext4ReleasepageFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ReleasepageFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.index != null && Object.hasOwnProperty.call(m, "index"))
                    w.uint32(24).uint64(m.index);
                return w;
            };

            /**
             * Encodes the specified Ext4ReleasepageFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4ReleasepageFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4ReleasepageFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ReleasepageFtraceEvent} message Ext4ReleasepageFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ReleasepageFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4ReleasepageFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4ReleasepageFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4ReleasepageFtraceEvent} Ext4ReleasepageFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ReleasepageFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4ReleasepageFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.index = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4ReleasepageFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4ReleasepageFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4ReleasepageFtraceEvent} Ext4ReleasepageFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ReleasepageFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4ReleasepageFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4ReleasepageFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4ReleasepageFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (!$util.isInteger(m.index) && !(m.index && $util.isInteger(m.index.low) && $util.isInteger(m.index.high)))
                        return "index: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an Ext4ReleasepageFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4ReleasepageFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4ReleasepageFtraceEvent} Ext4ReleasepageFtraceEvent
             */
            Ext4ReleasepageFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4ReleasepageFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4ReleasepageFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.index != null) {
                    if ($util.Long)
                        (m.index = $util.Long.fromValue(d.index)).unsigned = true;
                    else if (typeof d.index === "string")
                        m.index = parseInt(d.index, 10);
                    else if (typeof d.index === "number")
                        m.index = d.index;
                    else if (typeof d.index === "object")
                        m.index = new $util.LongBits(d.index.low >>> 0, d.index.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4ReleasepageFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4ReleasepageFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4ReleasepageFtraceEvent} m Ext4ReleasepageFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4ReleasepageFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.index = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.index = o.longs === String ? "0" : 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (typeof m.index === "number")
                        d.index = o.longs === String ? String(m.index) : m.index;
                    else
                        d.index = o.longs === String ? $util.Long.prototype.toString.call(m.index) : o.longs === Number ? new $util.LongBits(m.index.low >>> 0, m.index.high >>> 0).toNumber(true) : m.index;
                }
                return d;
            };

            /**
             * Converts this Ext4ReleasepageFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4ReleasepageFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4ReleasepageFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4ReleasepageFtraceEvent;
        })();

        protos.Ext4RemoveBlocksFtraceEvent = (function() {

            /**
             * Properties of an Ext4RemoveBlocksFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4RemoveBlocksFtraceEvent
             * @property {number|null} [dev] Ext4RemoveBlocksFtraceEvent dev
             * @property {number|null} [ino] Ext4RemoveBlocksFtraceEvent ino
             * @property {number|null} [from] Ext4RemoveBlocksFtraceEvent from
             * @property {number|null} [to] Ext4RemoveBlocksFtraceEvent to
             * @property {number|null} [partial] Ext4RemoveBlocksFtraceEvent partial
             * @property {number|null} [eePblk] Ext4RemoveBlocksFtraceEvent eePblk
             * @property {number|null} [eeLblk] Ext4RemoveBlocksFtraceEvent eeLblk
             * @property {number|null} [eeLen] Ext4RemoveBlocksFtraceEvent eeLen
             * @property {number|null} [pcLblk] Ext4RemoveBlocksFtraceEvent pcLblk
             * @property {number|null} [pcPclu] Ext4RemoveBlocksFtraceEvent pcPclu
             * @property {number|null} [pcState] Ext4RemoveBlocksFtraceEvent pcState
             */

            /**
             * Constructs a new Ext4RemoveBlocksFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4RemoveBlocksFtraceEvent.
             * @implements IExt4RemoveBlocksFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4RemoveBlocksFtraceEvent=} [p] Properties to set
             */
            function Ext4RemoveBlocksFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4RemoveBlocksFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4RemoveBlocksFtraceEvent
             * @instance
             */
            Ext4RemoveBlocksFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4RemoveBlocksFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4RemoveBlocksFtraceEvent
             * @instance
             */
            Ext4RemoveBlocksFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4RemoveBlocksFtraceEvent from.
             * @member {number} from
             * @memberof perfetto.protos.Ext4RemoveBlocksFtraceEvent
             * @instance
             */
            Ext4RemoveBlocksFtraceEvent.prototype.from = 0;

            /**
             * Ext4RemoveBlocksFtraceEvent to.
             * @member {number} to
             * @memberof perfetto.protos.Ext4RemoveBlocksFtraceEvent
             * @instance
             */
            Ext4RemoveBlocksFtraceEvent.prototype.to = 0;

            /**
             * Ext4RemoveBlocksFtraceEvent partial.
             * @member {number} partial
             * @memberof perfetto.protos.Ext4RemoveBlocksFtraceEvent
             * @instance
             */
            Ext4RemoveBlocksFtraceEvent.prototype.partial = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4RemoveBlocksFtraceEvent eePblk.
             * @member {number} eePblk
             * @memberof perfetto.protos.Ext4RemoveBlocksFtraceEvent
             * @instance
             */
            Ext4RemoveBlocksFtraceEvent.prototype.eePblk = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4RemoveBlocksFtraceEvent eeLblk.
             * @member {number} eeLblk
             * @memberof perfetto.protos.Ext4RemoveBlocksFtraceEvent
             * @instance
             */
            Ext4RemoveBlocksFtraceEvent.prototype.eeLblk = 0;

            /**
             * Ext4RemoveBlocksFtraceEvent eeLen.
             * @member {number} eeLen
             * @memberof perfetto.protos.Ext4RemoveBlocksFtraceEvent
             * @instance
             */
            Ext4RemoveBlocksFtraceEvent.prototype.eeLen = 0;

            /**
             * Ext4RemoveBlocksFtraceEvent pcLblk.
             * @member {number} pcLblk
             * @memberof perfetto.protos.Ext4RemoveBlocksFtraceEvent
             * @instance
             */
            Ext4RemoveBlocksFtraceEvent.prototype.pcLblk = 0;

            /**
             * Ext4RemoveBlocksFtraceEvent pcPclu.
             * @member {number} pcPclu
             * @memberof perfetto.protos.Ext4RemoveBlocksFtraceEvent
             * @instance
             */
            Ext4RemoveBlocksFtraceEvent.prototype.pcPclu = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4RemoveBlocksFtraceEvent pcState.
             * @member {number} pcState
             * @memberof perfetto.protos.Ext4RemoveBlocksFtraceEvent
             * @instance
             */
            Ext4RemoveBlocksFtraceEvent.prototype.pcState = 0;

            /**
             * Creates a new Ext4RemoveBlocksFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4RemoveBlocksFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4RemoveBlocksFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4RemoveBlocksFtraceEvent} Ext4RemoveBlocksFtraceEvent instance
             */
            Ext4RemoveBlocksFtraceEvent.create = function create(properties) {
                return new Ext4RemoveBlocksFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4RemoveBlocksFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4RemoveBlocksFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4RemoveBlocksFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4RemoveBlocksFtraceEvent} m Ext4RemoveBlocksFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4RemoveBlocksFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.from != null && Object.hasOwnProperty.call(m, "from"))
                    w.uint32(24).uint32(m.from);
                if (m.to != null && Object.hasOwnProperty.call(m, "to"))
                    w.uint32(32).uint32(m.to);
                if (m.partial != null && Object.hasOwnProperty.call(m, "partial"))
                    w.uint32(40).int64(m.partial);
                if (m.eePblk != null && Object.hasOwnProperty.call(m, "eePblk"))
                    w.uint32(48).uint64(m.eePblk);
                if (m.eeLblk != null && Object.hasOwnProperty.call(m, "eeLblk"))
                    w.uint32(56).uint32(m.eeLblk);
                if (m.eeLen != null && Object.hasOwnProperty.call(m, "eeLen"))
                    w.uint32(64).uint32(m.eeLen);
                if (m.pcLblk != null && Object.hasOwnProperty.call(m, "pcLblk"))
                    w.uint32(72).uint32(m.pcLblk);
                if (m.pcPclu != null && Object.hasOwnProperty.call(m, "pcPclu"))
                    w.uint32(80).uint64(m.pcPclu);
                if (m.pcState != null && Object.hasOwnProperty.call(m, "pcState"))
                    w.uint32(88).int32(m.pcState);
                return w;
            };

            /**
             * Encodes the specified Ext4RemoveBlocksFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4RemoveBlocksFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4RemoveBlocksFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4RemoveBlocksFtraceEvent} message Ext4RemoveBlocksFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4RemoveBlocksFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4RemoveBlocksFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4RemoveBlocksFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4RemoveBlocksFtraceEvent} Ext4RemoveBlocksFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4RemoveBlocksFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4RemoveBlocksFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.from = r.uint32();
                        break;
                    case 4:
                        m.to = r.uint32();
                        break;
                    case 5:
                        m.partial = r.int64();
                        break;
                    case 6:
                        m.eePblk = r.uint64();
                        break;
                    case 7:
                        m.eeLblk = r.uint32();
                        break;
                    case 8:
                        m.eeLen = r.uint32();
                        break;
                    case 9:
                        m.pcLblk = r.uint32();
                        break;
                    case 10:
                        m.pcPclu = r.uint64();
                        break;
                    case 11:
                        m.pcState = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4RemoveBlocksFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4RemoveBlocksFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4RemoveBlocksFtraceEvent} Ext4RemoveBlocksFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4RemoveBlocksFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4RemoveBlocksFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4RemoveBlocksFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4RemoveBlocksFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.from != null && m.hasOwnProperty("from")) {
                    if (!$util.isInteger(m.from))
                        return "from: integer expected";
                }
                if (m.to != null && m.hasOwnProperty("to")) {
                    if (!$util.isInteger(m.to))
                        return "to: integer expected";
                }
                if (m.partial != null && m.hasOwnProperty("partial")) {
                    if (!$util.isInteger(m.partial) && !(m.partial && $util.isInteger(m.partial.low) && $util.isInteger(m.partial.high)))
                        return "partial: integer|Long expected";
                }
                if (m.eePblk != null && m.hasOwnProperty("eePblk")) {
                    if (!$util.isInteger(m.eePblk) && !(m.eePblk && $util.isInteger(m.eePblk.low) && $util.isInteger(m.eePblk.high)))
                        return "eePblk: integer|Long expected";
                }
                if (m.eeLblk != null && m.hasOwnProperty("eeLblk")) {
                    if (!$util.isInteger(m.eeLblk))
                        return "eeLblk: integer expected";
                }
                if (m.eeLen != null && m.hasOwnProperty("eeLen")) {
                    if (!$util.isInteger(m.eeLen))
                        return "eeLen: integer expected";
                }
                if (m.pcLblk != null && m.hasOwnProperty("pcLblk")) {
                    if (!$util.isInteger(m.pcLblk))
                        return "pcLblk: integer expected";
                }
                if (m.pcPclu != null && m.hasOwnProperty("pcPclu")) {
                    if (!$util.isInteger(m.pcPclu) && !(m.pcPclu && $util.isInteger(m.pcPclu.low) && $util.isInteger(m.pcPclu.high)))
                        return "pcPclu: integer|Long expected";
                }
                if (m.pcState != null && m.hasOwnProperty("pcState")) {
                    if (!$util.isInteger(m.pcState))
                        return "pcState: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4RemoveBlocksFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4RemoveBlocksFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4RemoveBlocksFtraceEvent} Ext4RemoveBlocksFtraceEvent
             */
            Ext4RemoveBlocksFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4RemoveBlocksFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4RemoveBlocksFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.from != null) {
                    m.from = d.from >>> 0;
                }
                if (d.to != null) {
                    m.to = d.to >>> 0;
                }
                if (d.partial != null) {
                    if ($util.Long)
                        (m.partial = $util.Long.fromValue(d.partial)).unsigned = false;
                    else if (typeof d.partial === "string")
                        m.partial = parseInt(d.partial, 10);
                    else if (typeof d.partial === "number")
                        m.partial = d.partial;
                    else if (typeof d.partial === "object")
                        m.partial = new $util.LongBits(d.partial.low >>> 0, d.partial.high >>> 0).toNumber();
                }
                if (d.eePblk != null) {
                    if ($util.Long)
                        (m.eePblk = $util.Long.fromValue(d.eePblk)).unsigned = true;
                    else if (typeof d.eePblk === "string")
                        m.eePblk = parseInt(d.eePblk, 10);
                    else if (typeof d.eePblk === "number")
                        m.eePblk = d.eePblk;
                    else if (typeof d.eePblk === "object")
                        m.eePblk = new $util.LongBits(d.eePblk.low >>> 0, d.eePblk.high >>> 0).toNumber(true);
                }
                if (d.eeLblk != null) {
                    m.eeLblk = d.eeLblk >>> 0;
                }
                if (d.eeLen != null) {
                    m.eeLen = d.eeLen >>> 0;
                }
                if (d.pcLblk != null) {
                    m.pcLblk = d.pcLblk >>> 0;
                }
                if (d.pcPclu != null) {
                    if ($util.Long)
                        (m.pcPclu = $util.Long.fromValue(d.pcPclu)).unsigned = true;
                    else if (typeof d.pcPclu === "string")
                        m.pcPclu = parseInt(d.pcPclu, 10);
                    else if (typeof d.pcPclu === "number")
                        m.pcPclu = d.pcPclu;
                    else if (typeof d.pcPclu === "object")
                        m.pcPclu = new $util.LongBits(d.pcPclu.low >>> 0, d.pcPclu.high >>> 0).toNumber(true);
                }
                if (d.pcState != null) {
                    m.pcState = d.pcState | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4RemoveBlocksFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4RemoveBlocksFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4RemoveBlocksFtraceEvent} m Ext4RemoveBlocksFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4RemoveBlocksFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.from = 0;
                    d.to = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.partial = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.partial = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.eePblk = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.eePblk = o.longs === String ? "0" : 0;
                    d.eeLblk = 0;
                    d.eeLen = 0;
                    d.pcLblk = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pcPclu = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pcPclu = o.longs === String ? "0" : 0;
                    d.pcState = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.from != null && m.hasOwnProperty("from")) {
                    d.from = m.from;
                }
                if (m.to != null && m.hasOwnProperty("to")) {
                    d.to = m.to;
                }
                if (m.partial != null && m.hasOwnProperty("partial")) {
                    if (typeof m.partial === "number")
                        d.partial = o.longs === String ? String(m.partial) : m.partial;
                    else
                        d.partial = o.longs === String ? $util.Long.prototype.toString.call(m.partial) : o.longs === Number ? new $util.LongBits(m.partial.low >>> 0, m.partial.high >>> 0).toNumber() : m.partial;
                }
                if (m.eePblk != null && m.hasOwnProperty("eePblk")) {
                    if (typeof m.eePblk === "number")
                        d.eePblk = o.longs === String ? String(m.eePblk) : m.eePblk;
                    else
                        d.eePblk = o.longs === String ? $util.Long.prototype.toString.call(m.eePblk) : o.longs === Number ? new $util.LongBits(m.eePblk.low >>> 0, m.eePblk.high >>> 0).toNumber(true) : m.eePblk;
                }
                if (m.eeLblk != null && m.hasOwnProperty("eeLblk")) {
                    d.eeLblk = m.eeLblk;
                }
                if (m.eeLen != null && m.hasOwnProperty("eeLen")) {
                    d.eeLen = m.eeLen;
                }
                if (m.pcLblk != null && m.hasOwnProperty("pcLblk")) {
                    d.pcLblk = m.pcLblk;
                }
                if (m.pcPclu != null && m.hasOwnProperty("pcPclu")) {
                    if (typeof m.pcPclu === "number")
                        d.pcPclu = o.longs === String ? String(m.pcPclu) : m.pcPclu;
                    else
                        d.pcPclu = o.longs === String ? $util.Long.prototype.toString.call(m.pcPclu) : o.longs === Number ? new $util.LongBits(m.pcPclu.low >>> 0, m.pcPclu.high >>> 0).toNumber(true) : m.pcPclu;
                }
                if (m.pcState != null && m.hasOwnProperty("pcState")) {
                    d.pcState = m.pcState;
                }
                return d;
            };

            /**
             * Converts this Ext4RemoveBlocksFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4RemoveBlocksFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4RemoveBlocksFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4RemoveBlocksFtraceEvent;
        })();

        protos.Ext4RequestBlocksFtraceEvent = (function() {

            /**
             * Properties of an Ext4RequestBlocksFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4RequestBlocksFtraceEvent
             * @property {number|null} [dev] Ext4RequestBlocksFtraceEvent dev
             * @property {number|null} [ino] Ext4RequestBlocksFtraceEvent ino
             * @property {number|null} [len] Ext4RequestBlocksFtraceEvent len
             * @property {number|null} [logical] Ext4RequestBlocksFtraceEvent logical
             * @property {number|null} [lleft] Ext4RequestBlocksFtraceEvent lleft
             * @property {number|null} [lright] Ext4RequestBlocksFtraceEvent lright
             * @property {number|null} [goal] Ext4RequestBlocksFtraceEvent goal
             * @property {number|null} [pleft] Ext4RequestBlocksFtraceEvent pleft
             * @property {number|null} [pright] Ext4RequestBlocksFtraceEvent pright
             * @property {number|null} [flags] Ext4RequestBlocksFtraceEvent flags
             */

            /**
             * Constructs a new Ext4RequestBlocksFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4RequestBlocksFtraceEvent.
             * @implements IExt4RequestBlocksFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4RequestBlocksFtraceEvent=} [p] Properties to set
             */
            function Ext4RequestBlocksFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4RequestBlocksFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4RequestBlocksFtraceEvent
             * @instance
             */
            Ext4RequestBlocksFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4RequestBlocksFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4RequestBlocksFtraceEvent
             * @instance
             */
            Ext4RequestBlocksFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4RequestBlocksFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4RequestBlocksFtraceEvent
             * @instance
             */
            Ext4RequestBlocksFtraceEvent.prototype.len = 0;

            /**
             * Ext4RequestBlocksFtraceEvent logical.
             * @member {number} logical
             * @memberof perfetto.protos.Ext4RequestBlocksFtraceEvent
             * @instance
             */
            Ext4RequestBlocksFtraceEvent.prototype.logical = 0;

            /**
             * Ext4RequestBlocksFtraceEvent lleft.
             * @member {number} lleft
             * @memberof perfetto.protos.Ext4RequestBlocksFtraceEvent
             * @instance
             */
            Ext4RequestBlocksFtraceEvent.prototype.lleft = 0;

            /**
             * Ext4RequestBlocksFtraceEvent lright.
             * @member {number} lright
             * @memberof perfetto.protos.Ext4RequestBlocksFtraceEvent
             * @instance
             */
            Ext4RequestBlocksFtraceEvent.prototype.lright = 0;

            /**
             * Ext4RequestBlocksFtraceEvent goal.
             * @member {number} goal
             * @memberof perfetto.protos.Ext4RequestBlocksFtraceEvent
             * @instance
             */
            Ext4RequestBlocksFtraceEvent.prototype.goal = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4RequestBlocksFtraceEvent pleft.
             * @member {number} pleft
             * @memberof perfetto.protos.Ext4RequestBlocksFtraceEvent
             * @instance
             */
            Ext4RequestBlocksFtraceEvent.prototype.pleft = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4RequestBlocksFtraceEvent pright.
             * @member {number} pright
             * @memberof perfetto.protos.Ext4RequestBlocksFtraceEvent
             * @instance
             */
            Ext4RequestBlocksFtraceEvent.prototype.pright = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4RequestBlocksFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.Ext4RequestBlocksFtraceEvent
             * @instance
             */
            Ext4RequestBlocksFtraceEvent.prototype.flags = 0;

            /**
             * Creates a new Ext4RequestBlocksFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4RequestBlocksFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4RequestBlocksFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4RequestBlocksFtraceEvent} Ext4RequestBlocksFtraceEvent instance
             */
            Ext4RequestBlocksFtraceEvent.create = function create(properties) {
                return new Ext4RequestBlocksFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4RequestBlocksFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4RequestBlocksFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4RequestBlocksFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4RequestBlocksFtraceEvent} m Ext4RequestBlocksFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4RequestBlocksFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(24).uint32(m.len);
                if (m.logical != null && Object.hasOwnProperty.call(m, "logical"))
                    w.uint32(32).uint32(m.logical);
                if (m.lleft != null && Object.hasOwnProperty.call(m, "lleft"))
                    w.uint32(40).uint32(m.lleft);
                if (m.lright != null && Object.hasOwnProperty.call(m, "lright"))
                    w.uint32(48).uint32(m.lright);
                if (m.goal != null && Object.hasOwnProperty.call(m, "goal"))
                    w.uint32(56).uint64(m.goal);
                if (m.pleft != null && Object.hasOwnProperty.call(m, "pleft"))
                    w.uint32(64).uint64(m.pleft);
                if (m.pright != null && Object.hasOwnProperty.call(m, "pright"))
                    w.uint32(72).uint64(m.pright);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(80).uint32(m.flags);
                return w;
            };

            /**
             * Encodes the specified Ext4RequestBlocksFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4RequestBlocksFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4RequestBlocksFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4RequestBlocksFtraceEvent} message Ext4RequestBlocksFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4RequestBlocksFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4RequestBlocksFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4RequestBlocksFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4RequestBlocksFtraceEvent} Ext4RequestBlocksFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4RequestBlocksFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4RequestBlocksFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.len = r.uint32();
                        break;
                    case 4:
                        m.logical = r.uint32();
                        break;
                    case 5:
                        m.lleft = r.uint32();
                        break;
                    case 6:
                        m.lright = r.uint32();
                        break;
                    case 7:
                        m.goal = r.uint64();
                        break;
                    case 8:
                        m.pleft = r.uint64();
                        break;
                    case 9:
                        m.pright = r.uint64();
                        break;
                    case 10:
                        m.flags = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4RequestBlocksFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4RequestBlocksFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4RequestBlocksFtraceEvent} Ext4RequestBlocksFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4RequestBlocksFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4RequestBlocksFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4RequestBlocksFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4RequestBlocksFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.logical != null && m.hasOwnProperty("logical")) {
                    if (!$util.isInteger(m.logical))
                        return "logical: integer expected";
                }
                if (m.lleft != null && m.hasOwnProperty("lleft")) {
                    if (!$util.isInteger(m.lleft))
                        return "lleft: integer expected";
                }
                if (m.lright != null && m.hasOwnProperty("lright")) {
                    if (!$util.isInteger(m.lright))
                        return "lright: integer expected";
                }
                if (m.goal != null && m.hasOwnProperty("goal")) {
                    if (!$util.isInteger(m.goal) && !(m.goal && $util.isInteger(m.goal.low) && $util.isInteger(m.goal.high)))
                        return "goal: integer|Long expected";
                }
                if (m.pleft != null && m.hasOwnProperty("pleft")) {
                    if (!$util.isInteger(m.pleft) && !(m.pleft && $util.isInteger(m.pleft.low) && $util.isInteger(m.pleft.high)))
                        return "pleft: integer|Long expected";
                }
                if (m.pright != null && m.hasOwnProperty("pright")) {
                    if (!$util.isInteger(m.pright) && !(m.pright && $util.isInteger(m.pright.low) && $util.isInteger(m.pright.high)))
                        return "pright: integer|Long expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4RequestBlocksFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4RequestBlocksFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4RequestBlocksFtraceEvent} Ext4RequestBlocksFtraceEvent
             */
            Ext4RequestBlocksFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4RequestBlocksFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4RequestBlocksFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.logical != null) {
                    m.logical = d.logical >>> 0;
                }
                if (d.lleft != null) {
                    m.lleft = d.lleft >>> 0;
                }
                if (d.lright != null) {
                    m.lright = d.lright >>> 0;
                }
                if (d.goal != null) {
                    if ($util.Long)
                        (m.goal = $util.Long.fromValue(d.goal)).unsigned = true;
                    else if (typeof d.goal === "string")
                        m.goal = parseInt(d.goal, 10);
                    else if (typeof d.goal === "number")
                        m.goal = d.goal;
                    else if (typeof d.goal === "object")
                        m.goal = new $util.LongBits(d.goal.low >>> 0, d.goal.high >>> 0).toNumber(true);
                }
                if (d.pleft != null) {
                    if ($util.Long)
                        (m.pleft = $util.Long.fromValue(d.pleft)).unsigned = true;
                    else if (typeof d.pleft === "string")
                        m.pleft = parseInt(d.pleft, 10);
                    else if (typeof d.pleft === "number")
                        m.pleft = d.pleft;
                    else if (typeof d.pleft === "object")
                        m.pleft = new $util.LongBits(d.pleft.low >>> 0, d.pleft.high >>> 0).toNumber(true);
                }
                if (d.pright != null) {
                    if ($util.Long)
                        (m.pright = $util.Long.fromValue(d.pright)).unsigned = true;
                    else if (typeof d.pright === "string")
                        m.pright = parseInt(d.pright, 10);
                    else if (typeof d.pright === "number")
                        m.pright = d.pright;
                    else if (typeof d.pright === "object")
                        m.pright = new $util.LongBits(d.pright.low >>> 0, d.pright.high >>> 0).toNumber(true);
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4RequestBlocksFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4RequestBlocksFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4RequestBlocksFtraceEvent} m Ext4RequestBlocksFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4RequestBlocksFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.len = 0;
                    d.logical = 0;
                    d.lleft = 0;
                    d.lright = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.goal = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.goal = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pleft = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pleft = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pright = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pright = o.longs === String ? "0" : 0;
                    d.flags = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.logical != null && m.hasOwnProperty("logical")) {
                    d.logical = m.logical;
                }
                if (m.lleft != null && m.hasOwnProperty("lleft")) {
                    d.lleft = m.lleft;
                }
                if (m.lright != null && m.hasOwnProperty("lright")) {
                    d.lright = m.lright;
                }
                if (m.goal != null && m.hasOwnProperty("goal")) {
                    if (typeof m.goal === "number")
                        d.goal = o.longs === String ? String(m.goal) : m.goal;
                    else
                        d.goal = o.longs === String ? $util.Long.prototype.toString.call(m.goal) : o.longs === Number ? new $util.LongBits(m.goal.low >>> 0, m.goal.high >>> 0).toNumber(true) : m.goal;
                }
                if (m.pleft != null && m.hasOwnProperty("pleft")) {
                    if (typeof m.pleft === "number")
                        d.pleft = o.longs === String ? String(m.pleft) : m.pleft;
                    else
                        d.pleft = o.longs === String ? $util.Long.prototype.toString.call(m.pleft) : o.longs === Number ? new $util.LongBits(m.pleft.low >>> 0, m.pleft.high >>> 0).toNumber(true) : m.pleft;
                }
                if (m.pright != null && m.hasOwnProperty("pright")) {
                    if (typeof m.pright === "number")
                        d.pright = o.longs === String ? String(m.pright) : m.pright;
                    else
                        d.pright = o.longs === String ? $util.Long.prototype.toString.call(m.pright) : o.longs === Number ? new $util.LongBits(m.pright.low >>> 0, m.pright.high >>> 0).toNumber(true) : m.pright;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                return d;
            };

            /**
             * Converts this Ext4RequestBlocksFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4RequestBlocksFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4RequestBlocksFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4RequestBlocksFtraceEvent;
        })();

        protos.Ext4RequestInodeFtraceEvent = (function() {

            /**
             * Properties of an Ext4RequestInodeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4RequestInodeFtraceEvent
             * @property {number|null} [dev] Ext4RequestInodeFtraceEvent dev
             * @property {number|null} [dir] Ext4RequestInodeFtraceEvent dir
             * @property {number|null} [mode] Ext4RequestInodeFtraceEvent mode
             */

            /**
             * Constructs a new Ext4RequestInodeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4RequestInodeFtraceEvent.
             * @implements IExt4RequestInodeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4RequestInodeFtraceEvent=} [p] Properties to set
             */
            function Ext4RequestInodeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4RequestInodeFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4RequestInodeFtraceEvent
             * @instance
             */
            Ext4RequestInodeFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4RequestInodeFtraceEvent dir.
             * @member {number} dir
             * @memberof perfetto.protos.Ext4RequestInodeFtraceEvent
             * @instance
             */
            Ext4RequestInodeFtraceEvent.prototype.dir = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4RequestInodeFtraceEvent mode.
             * @member {number} mode
             * @memberof perfetto.protos.Ext4RequestInodeFtraceEvent
             * @instance
             */
            Ext4RequestInodeFtraceEvent.prototype.mode = 0;

            /**
             * Creates a new Ext4RequestInodeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4RequestInodeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4RequestInodeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4RequestInodeFtraceEvent} Ext4RequestInodeFtraceEvent instance
             */
            Ext4RequestInodeFtraceEvent.create = function create(properties) {
                return new Ext4RequestInodeFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4RequestInodeFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4RequestInodeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4RequestInodeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4RequestInodeFtraceEvent} m Ext4RequestInodeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4RequestInodeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.dir != null && Object.hasOwnProperty.call(m, "dir"))
                    w.uint32(16).uint64(m.dir);
                if (m.mode != null && Object.hasOwnProperty.call(m, "mode"))
                    w.uint32(24).uint32(m.mode);
                return w;
            };

            /**
             * Encodes the specified Ext4RequestInodeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4RequestInodeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4RequestInodeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4RequestInodeFtraceEvent} message Ext4RequestInodeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4RequestInodeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4RequestInodeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4RequestInodeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4RequestInodeFtraceEvent} Ext4RequestInodeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4RequestInodeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4RequestInodeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.dir = r.uint64();
                        break;
                    case 3:
                        m.mode = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4RequestInodeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4RequestInodeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4RequestInodeFtraceEvent} Ext4RequestInodeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4RequestInodeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4RequestInodeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4RequestInodeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4RequestInodeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.dir != null && m.hasOwnProperty("dir")) {
                    if (!$util.isInteger(m.dir) && !(m.dir && $util.isInteger(m.dir.low) && $util.isInteger(m.dir.high)))
                        return "dir: integer|Long expected";
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    if (!$util.isInteger(m.mode))
                        return "mode: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4RequestInodeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4RequestInodeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4RequestInodeFtraceEvent} Ext4RequestInodeFtraceEvent
             */
            Ext4RequestInodeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4RequestInodeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4RequestInodeFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.dir != null) {
                    if ($util.Long)
                        (m.dir = $util.Long.fromValue(d.dir)).unsigned = true;
                    else if (typeof d.dir === "string")
                        m.dir = parseInt(d.dir, 10);
                    else if (typeof d.dir === "number")
                        m.dir = d.dir;
                    else if (typeof d.dir === "object")
                        m.dir = new $util.LongBits(d.dir.low >>> 0, d.dir.high >>> 0).toNumber(true);
                }
                if (d.mode != null) {
                    m.mode = d.mode >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4RequestInodeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4RequestInodeFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4RequestInodeFtraceEvent} m Ext4RequestInodeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4RequestInodeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dir = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dir = o.longs === String ? "0" : 0;
                    d.mode = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.dir != null && m.hasOwnProperty("dir")) {
                    if (typeof m.dir === "number")
                        d.dir = o.longs === String ? String(m.dir) : m.dir;
                    else
                        d.dir = o.longs === String ? $util.Long.prototype.toString.call(m.dir) : o.longs === Number ? new $util.LongBits(m.dir.low >>> 0, m.dir.high >>> 0).toNumber(true) : m.dir;
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    d.mode = m.mode;
                }
                return d;
            };

            /**
             * Converts this Ext4RequestInodeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4RequestInodeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4RequestInodeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4RequestInodeFtraceEvent;
        })();

        protos.Ext4SyncFsFtraceEvent = (function() {

            /**
             * Properties of an Ext4SyncFsFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4SyncFsFtraceEvent
             * @property {number|null} [dev] Ext4SyncFsFtraceEvent dev
             * @property {number|null} [wait] Ext4SyncFsFtraceEvent wait
             */

            /**
             * Constructs a new Ext4SyncFsFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4SyncFsFtraceEvent.
             * @implements IExt4SyncFsFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4SyncFsFtraceEvent=} [p] Properties to set
             */
            function Ext4SyncFsFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4SyncFsFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4SyncFsFtraceEvent
             * @instance
             */
            Ext4SyncFsFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4SyncFsFtraceEvent wait.
             * @member {number} wait
             * @memberof perfetto.protos.Ext4SyncFsFtraceEvent
             * @instance
             */
            Ext4SyncFsFtraceEvent.prototype.wait = 0;

            /**
             * Creates a new Ext4SyncFsFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4SyncFsFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4SyncFsFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4SyncFsFtraceEvent} Ext4SyncFsFtraceEvent instance
             */
            Ext4SyncFsFtraceEvent.create = function create(properties) {
                return new Ext4SyncFsFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4SyncFsFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4SyncFsFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4SyncFsFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4SyncFsFtraceEvent} m Ext4SyncFsFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4SyncFsFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.wait != null && Object.hasOwnProperty.call(m, "wait"))
                    w.uint32(16).int32(m.wait);
                return w;
            };

            /**
             * Encodes the specified Ext4SyncFsFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4SyncFsFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4SyncFsFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4SyncFsFtraceEvent} message Ext4SyncFsFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4SyncFsFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4SyncFsFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4SyncFsFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4SyncFsFtraceEvent} Ext4SyncFsFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4SyncFsFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4SyncFsFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.wait = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4SyncFsFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4SyncFsFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4SyncFsFtraceEvent} Ext4SyncFsFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4SyncFsFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4SyncFsFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4SyncFsFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4SyncFsFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.wait != null && m.hasOwnProperty("wait")) {
                    if (!$util.isInteger(m.wait))
                        return "wait: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4SyncFsFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4SyncFsFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4SyncFsFtraceEvent} Ext4SyncFsFtraceEvent
             */
            Ext4SyncFsFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4SyncFsFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4SyncFsFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.wait != null) {
                    m.wait = d.wait | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4SyncFsFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4SyncFsFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4SyncFsFtraceEvent} m Ext4SyncFsFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4SyncFsFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    d.wait = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.wait != null && m.hasOwnProperty("wait")) {
                    d.wait = m.wait;
                }
                return d;
            };

            /**
             * Converts this Ext4SyncFsFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4SyncFsFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4SyncFsFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4SyncFsFtraceEvent;
        })();

        protos.Ext4TrimAllFreeFtraceEvent = (function() {

            /**
             * Properties of an Ext4TrimAllFreeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4TrimAllFreeFtraceEvent
             * @property {number|null} [devMajor] Ext4TrimAllFreeFtraceEvent devMajor
             * @property {number|null} [devMinor] Ext4TrimAllFreeFtraceEvent devMinor
             * @property {number|null} [group] Ext4TrimAllFreeFtraceEvent group
             * @property {number|null} [start] Ext4TrimAllFreeFtraceEvent start
             * @property {number|null} [len] Ext4TrimAllFreeFtraceEvent len
             */

            /**
             * Constructs a new Ext4TrimAllFreeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4TrimAllFreeFtraceEvent.
             * @implements IExt4TrimAllFreeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4TrimAllFreeFtraceEvent=} [p] Properties to set
             */
            function Ext4TrimAllFreeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4TrimAllFreeFtraceEvent devMajor.
             * @member {number} devMajor
             * @memberof perfetto.protos.Ext4TrimAllFreeFtraceEvent
             * @instance
             */
            Ext4TrimAllFreeFtraceEvent.prototype.devMajor = 0;

            /**
             * Ext4TrimAllFreeFtraceEvent devMinor.
             * @member {number} devMinor
             * @memberof perfetto.protos.Ext4TrimAllFreeFtraceEvent
             * @instance
             */
            Ext4TrimAllFreeFtraceEvent.prototype.devMinor = 0;

            /**
             * Ext4TrimAllFreeFtraceEvent group.
             * @member {number} group
             * @memberof perfetto.protos.Ext4TrimAllFreeFtraceEvent
             * @instance
             */
            Ext4TrimAllFreeFtraceEvent.prototype.group = 0;

            /**
             * Ext4TrimAllFreeFtraceEvent start.
             * @member {number} start
             * @memberof perfetto.protos.Ext4TrimAllFreeFtraceEvent
             * @instance
             */
            Ext4TrimAllFreeFtraceEvent.prototype.start = 0;

            /**
             * Ext4TrimAllFreeFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4TrimAllFreeFtraceEvent
             * @instance
             */
            Ext4TrimAllFreeFtraceEvent.prototype.len = 0;

            /**
             * Creates a new Ext4TrimAllFreeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4TrimAllFreeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4TrimAllFreeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4TrimAllFreeFtraceEvent} Ext4TrimAllFreeFtraceEvent instance
             */
            Ext4TrimAllFreeFtraceEvent.create = function create(properties) {
                return new Ext4TrimAllFreeFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4TrimAllFreeFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4TrimAllFreeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4TrimAllFreeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4TrimAllFreeFtraceEvent} m Ext4TrimAllFreeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4TrimAllFreeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.devMajor != null && Object.hasOwnProperty.call(m, "devMajor"))
                    w.uint32(8).int32(m.devMajor);
                if (m.devMinor != null && Object.hasOwnProperty.call(m, "devMinor"))
                    w.uint32(16).int32(m.devMinor);
                if (m.group != null && Object.hasOwnProperty.call(m, "group"))
                    w.uint32(24).uint32(m.group);
                if (m.start != null && Object.hasOwnProperty.call(m, "start"))
                    w.uint32(32).int32(m.start);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(40).int32(m.len);
                return w;
            };

            /**
             * Encodes the specified Ext4TrimAllFreeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4TrimAllFreeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4TrimAllFreeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4TrimAllFreeFtraceEvent} message Ext4TrimAllFreeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4TrimAllFreeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4TrimAllFreeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4TrimAllFreeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4TrimAllFreeFtraceEvent} Ext4TrimAllFreeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4TrimAllFreeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4TrimAllFreeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.devMajor = r.int32();
                        break;
                    case 2:
                        m.devMinor = r.int32();
                        break;
                    case 3:
                        m.group = r.uint32();
                        break;
                    case 4:
                        m.start = r.int32();
                        break;
                    case 5:
                        m.len = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4TrimAllFreeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4TrimAllFreeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4TrimAllFreeFtraceEvent} Ext4TrimAllFreeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4TrimAllFreeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4TrimAllFreeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4TrimAllFreeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4TrimAllFreeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.devMajor != null && m.hasOwnProperty("devMajor")) {
                    if (!$util.isInteger(m.devMajor))
                        return "devMajor: integer expected";
                }
                if (m.devMinor != null && m.hasOwnProperty("devMinor")) {
                    if (!$util.isInteger(m.devMinor))
                        return "devMinor: integer expected";
                }
                if (m.group != null && m.hasOwnProperty("group")) {
                    if (!$util.isInteger(m.group))
                        return "group: integer expected";
                }
                if (m.start != null && m.hasOwnProperty("start")) {
                    if (!$util.isInteger(m.start))
                        return "start: integer expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4TrimAllFreeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4TrimAllFreeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4TrimAllFreeFtraceEvent} Ext4TrimAllFreeFtraceEvent
             */
            Ext4TrimAllFreeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4TrimAllFreeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4TrimAllFreeFtraceEvent();
                if (d.devMajor != null) {
                    m.devMajor = d.devMajor | 0;
                }
                if (d.devMinor != null) {
                    m.devMinor = d.devMinor | 0;
                }
                if (d.group != null) {
                    m.group = d.group >>> 0;
                }
                if (d.start != null) {
                    m.start = d.start | 0;
                }
                if (d.len != null) {
                    m.len = d.len | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4TrimAllFreeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4TrimAllFreeFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4TrimAllFreeFtraceEvent} m Ext4TrimAllFreeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4TrimAllFreeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.devMajor = 0;
                    d.devMinor = 0;
                    d.group = 0;
                    d.start = 0;
                    d.len = 0;
                }
                if (m.devMajor != null && m.hasOwnProperty("devMajor")) {
                    d.devMajor = m.devMajor;
                }
                if (m.devMinor != null && m.hasOwnProperty("devMinor")) {
                    d.devMinor = m.devMinor;
                }
                if (m.group != null && m.hasOwnProperty("group")) {
                    d.group = m.group;
                }
                if (m.start != null && m.hasOwnProperty("start")) {
                    d.start = m.start;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                return d;
            };

            /**
             * Converts this Ext4TrimAllFreeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4TrimAllFreeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4TrimAllFreeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4TrimAllFreeFtraceEvent;
        })();

        protos.Ext4TrimExtentFtraceEvent = (function() {

            /**
             * Properties of an Ext4TrimExtentFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4TrimExtentFtraceEvent
             * @property {number|null} [devMajor] Ext4TrimExtentFtraceEvent devMajor
             * @property {number|null} [devMinor] Ext4TrimExtentFtraceEvent devMinor
             * @property {number|null} [group] Ext4TrimExtentFtraceEvent group
             * @property {number|null} [start] Ext4TrimExtentFtraceEvent start
             * @property {number|null} [len] Ext4TrimExtentFtraceEvent len
             */

            /**
             * Constructs a new Ext4TrimExtentFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4TrimExtentFtraceEvent.
             * @implements IExt4TrimExtentFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4TrimExtentFtraceEvent=} [p] Properties to set
             */
            function Ext4TrimExtentFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4TrimExtentFtraceEvent devMajor.
             * @member {number} devMajor
             * @memberof perfetto.protos.Ext4TrimExtentFtraceEvent
             * @instance
             */
            Ext4TrimExtentFtraceEvent.prototype.devMajor = 0;

            /**
             * Ext4TrimExtentFtraceEvent devMinor.
             * @member {number} devMinor
             * @memberof perfetto.protos.Ext4TrimExtentFtraceEvent
             * @instance
             */
            Ext4TrimExtentFtraceEvent.prototype.devMinor = 0;

            /**
             * Ext4TrimExtentFtraceEvent group.
             * @member {number} group
             * @memberof perfetto.protos.Ext4TrimExtentFtraceEvent
             * @instance
             */
            Ext4TrimExtentFtraceEvent.prototype.group = 0;

            /**
             * Ext4TrimExtentFtraceEvent start.
             * @member {number} start
             * @memberof perfetto.protos.Ext4TrimExtentFtraceEvent
             * @instance
             */
            Ext4TrimExtentFtraceEvent.prototype.start = 0;

            /**
             * Ext4TrimExtentFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4TrimExtentFtraceEvent
             * @instance
             */
            Ext4TrimExtentFtraceEvent.prototype.len = 0;

            /**
             * Creates a new Ext4TrimExtentFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4TrimExtentFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4TrimExtentFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4TrimExtentFtraceEvent} Ext4TrimExtentFtraceEvent instance
             */
            Ext4TrimExtentFtraceEvent.create = function create(properties) {
                return new Ext4TrimExtentFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4TrimExtentFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4TrimExtentFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4TrimExtentFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4TrimExtentFtraceEvent} m Ext4TrimExtentFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4TrimExtentFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.devMajor != null && Object.hasOwnProperty.call(m, "devMajor"))
                    w.uint32(8).int32(m.devMajor);
                if (m.devMinor != null && Object.hasOwnProperty.call(m, "devMinor"))
                    w.uint32(16).int32(m.devMinor);
                if (m.group != null && Object.hasOwnProperty.call(m, "group"))
                    w.uint32(24).uint32(m.group);
                if (m.start != null && Object.hasOwnProperty.call(m, "start"))
                    w.uint32(32).int32(m.start);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(40).int32(m.len);
                return w;
            };

            /**
             * Encodes the specified Ext4TrimExtentFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4TrimExtentFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4TrimExtentFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4TrimExtentFtraceEvent} message Ext4TrimExtentFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4TrimExtentFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4TrimExtentFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4TrimExtentFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4TrimExtentFtraceEvent} Ext4TrimExtentFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4TrimExtentFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4TrimExtentFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.devMajor = r.int32();
                        break;
                    case 2:
                        m.devMinor = r.int32();
                        break;
                    case 3:
                        m.group = r.uint32();
                        break;
                    case 4:
                        m.start = r.int32();
                        break;
                    case 5:
                        m.len = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4TrimExtentFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4TrimExtentFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4TrimExtentFtraceEvent} Ext4TrimExtentFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4TrimExtentFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4TrimExtentFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4TrimExtentFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4TrimExtentFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.devMajor != null && m.hasOwnProperty("devMajor")) {
                    if (!$util.isInteger(m.devMajor))
                        return "devMajor: integer expected";
                }
                if (m.devMinor != null && m.hasOwnProperty("devMinor")) {
                    if (!$util.isInteger(m.devMinor))
                        return "devMinor: integer expected";
                }
                if (m.group != null && m.hasOwnProperty("group")) {
                    if (!$util.isInteger(m.group))
                        return "group: integer expected";
                }
                if (m.start != null && m.hasOwnProperty("start")) {
                    if (!$util.isInteger(m.start))
                        return "start: integer expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4TrimExtentFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4TrimExtentFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4TrimExtentFtraceEvent} Ext4TrimExtentFtraceEvent
             */
            Ext4TrimExtentFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4TrimExtentFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4TrimExtentFtraceEvent();
                if (d.devMajor != null) {
                    m.devMajor = d.devMajor | 0;
                }
                if (d.devMinor != null) {
                    m.devMinor = d.devMinor | 0;
                }
                if (d.group != null) {
                    m.group = d.group >>> 0;
                }
                if (d.start != null) {
                    m.start = d.start | 0;
                }
                if (d.len != null) {
                    m.len = d.len | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4TrimExtentFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4TrimExtentFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4TrimExtentFtraceEvent} m Ext4TrimExtentFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4TrimExtentFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.devMajor = 0;
                    d.devMinor = 0;
                    d.group = 0;
                    d.start = 0;
                    d.len = 0;
                }
                if (m.devMajor != null && m.hasOwnProperty("devMajor")) {
                    d.devMajor = m.devMajor;
                }
                if (m.devMinor != null && m.hasOwnProperty("devMinor")) {
                    d.devMinor = m.devMinor;
                }
                if (m.group != null && m.hasOwnProperty("group")) {
                    d.group = m.group;
                }
                if (m.start != null && m.hasOwnProperty("start")) {
                    d.start = m.start;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                return d;
            };

            /**
             * Converts this Ext4TrimExtentFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4TrimExtentFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4TrimExtentFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4TrimExtentFtraceEvent;
        })();

        protos.Ext4TruncateEnterFtraceEvent = (function() {

            /**
             * Properties of an Ext4TruncateEnterFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4TruncateEnterFtraceEvent
             * @property {number|null} [dev] Ext4TruncateEnterFtraceEvent dev
             * @property {number|null} [ino] Ext4TruncateEnterFtraceEvent ino
             * @property {number|null} [blocks] Ext4TruncateEnterFtraceEvent blocks
             */

            /**
             * Constructs a new Ext4TruncateEnterFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4TruncateEnterFtraceEvent.
             * @implements IExt4TruncateEnterFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4TruncateEnterFtraceEvent=} [p] Properties to set
             */
            function Ext4TruncateEnterFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4TruncateEnterFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4TruncateEnterFtraceEvent
             * @instance
             */
            Ext4TruncateEnterFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4TruncateEnterFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4TruncateEnterFtraceEvent
             * @instance
             */
            Ext4TruncateEnterFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4TruncateEnterFtraceEvent blocks.
             * @member {number} blocks
             * @memberof perfetto.protos.Ext4TruncateEnterFtraceEvent
             * @instance
             */
            Ext4TruncateEnterFtraceEvent.prototype.blocks = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new Ext4TruncateEnterFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4TruncateEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4TruncateEnterFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4TruncateEnterFtraceEvent} Ext4TruncateEnterFtraceEvent instance
             */
            Ext4TruncateEnterFtraceEvent.create = function create(properties) {
                return new Ext4TruncateEnterFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4TruncateEnterFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4TruncateEnterFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4TruncateEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4TruncateEnterFtraceEvent} m Ext4TruncateEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4TruncateEnterFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.blocks != null && Object.hasOwnProperty.call(m, "blocks"))
                    w.uint32(24).uint64(m.blocks);
                return w;
            };

            /**
             * Encodes the specified Ext4TruncateEnterFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4TruncateEnterFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4TruncateEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4TruncateEnterFtraceEvent} message Ext4TruncateEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4TruncateEnterFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4TruncateEnterFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4TruncateEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4TruncateEnterFtraceEvent} Ext4TruncateEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4TruncateEnterFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4TruncateEnterFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.blocks = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4TruncateEnterFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4TruncateEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4TruncateEnterFtraceEvent} Ext4TruncateEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4TruncateEnterFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4TruncateEnterFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4TruncateEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4TruncateEnterFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (!$util.isInteger(m.blocks) && !(m.blocks && $util.isInteger(m.blocks.low) && $util.isInteger(m.blocks.high)))
                        return "blocks: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an Ext4TruncateEnterFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4TruncateEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4TruncateEnterFtraceEvent} Ext4TruncateEnterFtraceEvent
             */
            Ext4TruncateEnterFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4TruncateEnterFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4TruncateEnterFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.blocks != null) {
                    if ($util.Long)
                        (m.blocks = $util.Long.fromValue(d.blocks)).unsigned = true;
                    else if (typeof d.blocks === "string")
                        m.blocks = parseInt(d.blocks, 10);
                    else if (typeof d.blocks === "number")
                        m.blocks = d.blocks;
                    else if (typeof d.blocks === "object")
                        m.blocks = new $util.LongBits(d.blocks.low >>> 0, d.blocks.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4TruncateEnterFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4TruncateEnterFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4TruncateEnterFtraceEvent} m Ext4TruncateEnterFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4TruncateEnterFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.blocks = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.blocks = o.longs === String ? "0" : 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (typeof m.blocks === "number")
                        d.blocks = o.longs === String ? String(m.blocks) : m.blocks;
                    else
                        d.blocks = o.longs === String ? $util.Long.prototype.toString.call(m.blocks) : o.longs === Number ? new $util.LongBits(m.blocks.low >>> 0, m.blocks.high >>> 0).toNumber(true) : m.blocks;
                }
                return d;
            };

            /**
             * Converts this Ext4TruncateEnterFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4TruncateEnterFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4TruncateEnterFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4TruncateEnterFtraceEvent;
        })();

        protos.Ext4TruncateExitFtraceEvent = (function() {

            /**
             * Properties of an Ext4TruncateExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4TruncateExitFtraceEvent
             * @property {number|null} [dev] Ext4TruncateExitFtraceEvent dev
             * @property {number|null} [ino] Ext4TruncateExitFtraceEvent ino
             * @property {number|null} [blocks] Ext4TruncateExitFtraceEvent blocks
             */

            /**
             * Constructs a new Ext4TruncateExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4TruncateExitFtraceEvent.
             * @implements IExt4TruncateExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4TruncateExitFtraceEvent=} [p] Properties to set
             */
            function Ext4TruncateExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4TruncateExitFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4TruncateExitFtraceEvent
             * @instance
             */
            Ext4TruncateExitFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4TruncateExitFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4TruncateExitFtraceEvent
             * @instance
             */
            Ext4TruncateExitFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4TruncateExitFtraceEvent blocks.
             * @member {number} blocks
             * @memberof perfetto.protos.Ext4TruncateExitFtraceEvent
             * @instance
             */
            Ext4TruncateExitFtraceEvent.prototype.blocks = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new Ext4TruncateExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4TruncateExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4TruncateExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4TruncateExitFtraceEvent} Ext4TruncateExitFtraceEvent instance
             */
            Ext4TruncateExitFtraceEvent.create = function create(properties) {
                return new Ext4TruncateExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4TruncateExitFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4TruncateExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4TruncateExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4TruncateExitFtraceEvent} m Ext4TruncateExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4TruncateExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.blocks != null && Object.hasOwnProperty.call(m, "blocks"))
                    w.uint32(24).uint64(m.blocks);
                return w;
            };

            /**
             * Encodes the specified Ext4TruncateExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4TruncateExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4TruncateExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4TruncateExitFtraceEvent} message Ext4TruncateExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4TruncateExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4TruncateExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4TruncateExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4TruncateExitFtraceEvent} Ext4TruncateExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4TruncateExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4TruncateExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.blocks = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4TruncateExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4TruncateExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4TruncateExitFtraceEvent} Ext4TruncateExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4TruncateExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4TruncateExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4TruncateExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4TruncateExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (!$util.isInteger(m.blocks) && !(m.blocks && $util.isInteger(m.blocks.low) && $util.isInteger(m.blocks.high)))
                        return "blocks: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an Ext4TruncateExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4TruncateExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4TruncateExitFtraceEvent} Ext4TruncateExitFtraceEvent
             */
            Ext4TruncateExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4TruncateExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4TruncateExitFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.blocks != null) {
                    if ($util.Long)
                        (m.blocks = $util.Long.fromValue(d.blocks)).unsigned = true;
                    else if (typeof d.blocks === "string")
                        m.blocks = parseInt(d.blocks, 10);
                    else if (typeof d.blocks === "number")
                        m.blocks = d.blocks;
                    else if (typeof d.blocks === "object")
                        m.blocks = new $util.LongBits(d.blocks.low >>> 0, d.blocks.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4TruncateExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4TruncateExitFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4TruncateExitFtraceEvent} m Ext4TruncateExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4TruncateExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.blocks = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.blocks = o.longs === String ? "0" : 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (typeof m.blocks === "number")
                        d.blocks = o.longs === String ? String(m.blocks) : m.blocks;
                    else
                        d.blocks = o.longs === String ? $util.Long.prototype.toString.call(m.blocks) : o.longs === Number ? new $util.LongBits(m.blocks.low >>> 0, m.blocks.high >>> 0).toNumber(true) : m.blocks;
                }
                return d;
            };

            /**
             * Converts this Ext4TruncateExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4TruncateExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4TruncateExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4TruncateExitFtraceEvent;
        })();

        protos.Ext4UnlinkEnterFtraceEvent = (function() {

            /**
             * Properties of an Ext4UnlinkEnterFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4UnlinkEnterFtraceEvent
             * @property {number|null} [dev] Ext4UnlinkEnterFtraceEvent dev
             * @property {number|null} [ino] Ext4UnlinkEnterFtraceEvent ino
             * @property {number|null} [parent] Ext4UnlinkEnterFtraceEvent parent
             * @property {number|null} [size] Ext4UnlinkEnterFtraceEvent size
             */

            /**
             * Constructs a new Ext4UnlinkEnterFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4UnlinkEnterFtraceEvent.
             * @implements IExt4UnlinkEnterFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4UnlinkEnterFtraceEvent=} [p] Properties to set
             */
            function Ext4UnlinkEnterFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4UnlinkEnterFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4UnlinkEnterFtraceEvent
             * @instance
             */
            Ext4UnlinkEnterFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4UnlinkEnterFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4UnlinkEnterFtraceEvent
             * @instance
             */
            Ext4UnlinkEnterFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4UnlinkEnterFtraceEvent parent.
             * @member {number} parent
             * @memberof perfetto.protos.Ext4UnlinkEnterFtraceEvent
             * @instance
             */
            Ext4UnlinkEnterFtraceEvent.prototype.parent = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4UnlinkEnterFtraceEvent size.
             * @member {number} size
             * @memberof perfetto.protos.Ext4UnlinkEnterFtraceEvent
             * @instance
             */
            Ext4UnlinkEnterFtraceEvent.prototype.size = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new Ext4UnlinkEnterFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4UnlinkEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4UnlinkEnterFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4UnlinkEnterFtraceEvent} Ext4UnlinkEnterFtraceEvent instance
             */
            Ext4UnlinkEnterFtraceEvent.create = function create(properties) {
                return new Ext4UnlinkEnterFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4UnlinkEnterFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4UnlinkEnterFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4UnlinkEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4UnlinkEnterFtraceEvent} m Ext4UnlinkEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4UnlinkEnterFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.parent != null && Object.hasOwnProperty.call(m, "parent"))
                    w.uint32(24).uint64(m.parent);
                if (m.size != null && Object.hasOwnProperty.call(m, "size"))
                    w.uint32(32).int64(m.size);
                return w;
            };

            /**
             * Encodes the specified Ext4UnlinkEnterFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4UnlinkEnterFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4UnlinkEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4UnlinkEnterFtraceEvent} message Ext4UnlinkEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4UnlinkEnterFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4UnlinkEnterFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4UnlinkEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4UnlinkEnterFtraceEvent} Ext4UnlinkEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4UnlinkEnterFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4UnlinkEnterFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.parent = r.uint64();
                        break;
                    case 4:
                        m.size = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4UnlinkEnterFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4UnlinkEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4UnlinkEnterFtraceEvent} Ext4UnlinkEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4UnlinkEnterFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4UnlinkEnterFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4UnlinkEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4UnlinkEnterFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.parent != null && m.hasOwnProperty("parent")) {
                    if (!$util.isInteger(m.parent) && !(m.parent && $util.isInteger(m.parent.low) && $util.isInteger(m.parent.high)))
                        return "parent: integer|Long expected";
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (!$util.isInteger(m.size) && !(m.size && $util.isInteger(m.size.low) && $util.isInteger(m.size.high)))
                        return "size: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an Ext4UnlinkEnterFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4UnlinkEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4UnlinkEnterFtraceEvent} Ext4UnlinkEnterFtraceEvent
             */
            Ext4UnlinkEnterFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4UnlinkEnterFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4UnlinkEnterFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.parent != null) {
                    if ($util.Long)
                        (m.parent = $util.Long.fromValue(d.parent)).unsigned = true;
                    else if (typeof d.parent === "string")
                        m.parent = parseInt(d.parent, 10);
                    else if (typeof d.parent === "number")
                        m.parent = d.parent;
                    else if (typeof d.parent === "object")
                        m.parent = new $util.LongBits(d.parent.low >>> 0, d.parent.high >>> 0).toNumber(true);
                }
                if (d.size != null) {
                    if ($util.Long)
                        (m.size = $util.Long.fromValue(d.size)).unsigned = false;
                    else if (typeof d.size === "string")
                        m.size = parseInt(d.size, 10);
                    else if (typeof d.size === "number")
                        m.size = d.size;
                    else if (typeof d.size === "object")
                        m.size = new $util.LongBits(d.size.low >>> 0, d.size.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4UnlinkEnterFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4UnlinkEnterFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4UnlinkEnterFtraceEvent} m Ext4UnlinkEnterFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4UnlinkEnterFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.parent = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.parent = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.size = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.size = o.longs === String ? "0" : 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.parent != null && m.hasOwnProperty("parent")) {
                    if (typeof m.parent === "number")
                        d.parent = o.longs === String ? String(m.parent) : m.parent;
                    else
                        d.parent = o.longs === String ? $util.Long.prototype.toString.call(m.parent) : o.longs === Number ? new $util.LongBits(m.parent.low >>> 0, m.parent.high >>> 0).toNumber(true) : m.parent;
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (typeof m.size === "number")
                        d.size = o.longs === String ? String(m.size) : m.size;
                    else
                        d.size = o.longs === String ? $util.Long.prototype.toString.call(m.size) : o.longs === Number ? new $util.LongBits(m.size.low >>> 0, m.size.high >>> 0).toNumber() : m.size;
                }
                return d;
            };

            /**
             * Converts this Ext4UnlinkEnterFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4UnlinkEnterFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4UnlinkEnterFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4UnlinkEnterFtraceEvent;
        })();

        protos.Ext4UnlinkExitFtraceEvent = (function() {

            /**
             * Properties of an Ext4UnlinkExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4UnlinkExitFtraceEvent
             * @property {number|null} [dev] Ext4UnlinkExitFtraceEvent dev
             * @property {number|null} [ino] Ext4UnlinkExitFtraceEvent ino
             * @property {number|null} [ret] Ext4UnlinkExitFtraceEvent ret
             */

            /**
             * Constructs a new Ext4UnlinkExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4UnlinkExitFtraceEvent.
             * @implements IExt4UnlinkExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4UnlinkExitFtraceEvent=} [p] Properties to set
             */
            function Ext4UnlinkExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4UnlinkExitFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4UnlinkExitFtraceEvent
             * @instance
             */
            Ext4UnlinkExitFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4UnlinkExitFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4UnlinkExitFtraceEvent
             * @instance
             */
            Ext4UnlinkExitFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4UnlinkExitFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.Ext4UnlinkExitFtraceEvent
             * @instance
             */
            Ext4UnlinkExitFtraceEvent.prototype.ret = 0;

            /**
             * Creates a new Ext4UnlinkExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4UnlinkExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4UnlinkExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4UnlinkExitFtraceEvent} Ext4UnlinkExitFtraceEvent instance
             */
            Ext4UnlinkExitFtraceEvent.create = function create(properties) {
                return new Ext4UnlinkExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4UnlinkExitFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4UnlinkExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4UnlinkExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4UnlinkExitFtraceEvent} m Ext4UnlinkExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4UnlinkExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(24).int32(m.ret);
                return w;
            };

            /**
             * Encodes the specified Ext4UnlinkExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4UnlinkExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4UnlinkExitFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4UnlinkExitFtraceEvent} message Ext4UnlinkExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4UnlinkExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4UnlinkExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4UnlinkExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4UnlinkExitFtraceEvent} Ext4UnlinkExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4UnlinkExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4UnlinkExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.ret = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4UnlinkExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4UnlinkExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4UnlinkExitFtraceEvent} Ext4UnlinkExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4UnlinkExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4UnlinkExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4UnlinkExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4UnlinkExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4UnlinkExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4UnlinkExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4UnlinkExitFtraceEvent} Ext4UnlinkExitFtraceEvent
             */
            Ext4UnlinkExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4UnlinkExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4UnlinkExitFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4UnlinkExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4UnlinkExitFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4UnlinkExitFtraceEvent} m Ext4UnlinkExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4UnlinkExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.ret = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                return d;
            };

            /**
             * Converts this Ext4UnlinkExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4UnlinkExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4UnlinkExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4UnlinkExitFtraceEvent;
        })();

        protos.Ext4WriteBeginFtraceEvent = (function() {

            /**
             * Properties of an Ext4WriteBeginFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4WriteBeginFtraceEvent
             * @property {number|null} [dev] Ext4WriteBeginFtraceEvent dev
             * @property {number|null} [ino] Ext4WriteBeginFtraceEvent ino
             * @property {number|null} [pos] Ext4WriteBeginFtraceEvent pos
             * @property {number|null} [len] Ext4WriteBeginFtraceEvent len
             * @property {number|null} [flags] Ext4WriteBeginFtraceEvent flags
             */

            /**
             * Constructs a new Ext4WriteBeginFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4WriteBeginFtraceEvent.
             * @implements IExt4WriteBeginFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4WriteBeginFtraceEvent=} [p] Properties to set
             */
            function Ext4WriteBeginFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4WriteBeginFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4WriteBeginFtraceEvent
             * @instance
             */
            Ext4WriteBeginFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4WriteBeginFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4WriteBeginFtraceEvent
             * @instance
             */
            Ext4WriteBeginFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4WriteBeginFtraceEvent pos.
             * @member {number} pos
             * @memberof perfetto.protos.Ext4WriteBeginFtraceEvent
             * @instance
             */
            Ext4WriteBeginFtraceEvent.prototype.pos = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4WriteBeginFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4WriteBeginFtraceEvent
             * @instance
             */
            Ext4WriteBeginFtraceEvent.prototype.len = 0;

            /**
             * Ext4WriteBeginFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.Ext4WriteBeginFtraceEvent
             * @instance
             */
            Ext4WriteBeginFtraceEvent.prototype.flags = 0;

            /**
             * Creates a new Ext4WriteBeginFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4WriteBeginFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4WriteBeginFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4WriteBeginFtraceEvent} Ext4WriteBeginFtraceEvent instance
             */
            Ext4WriteBeginFtraceEvent.create = function create(properties) {
                return new Ext4WriteBeginFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4WriteBeginFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4WriteBeginFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4WriteBeginFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4WriteBeginFtraceEvent} m Ext4WriteBeginFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4WriteBeginFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.pos != null && Object.hasOwnProperty.call(m, "pos"))
                    w.uint32(24).int64(m.pos);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).uint32(m.len);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(40).uint32(m.flags);
                return w;
            };

            /**
             * Encodes the specified Ext4WriteBeginFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4WriteBeginFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4WriteBeginFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4WriteBeginFtraceEvent} message Ext4WriteBeginFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4WriteBeginFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4WriteBeginFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4WriteBeginFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4WriteBeginFtraceEvent} Ext4WriteBeginFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4WriteBeginFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4WriteBeginFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.pos = r.int64();
                        break;
                    case 4:
                        m.len = r.uint32();
                        break;
                    case 5:
                        m.flags = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4WriteBeginFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4WriteBeginFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4WriteBeginFtraceEvent} Ext4WriteBeginFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4WriteBeginFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4WriteBeginFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4WriteBeginFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4WriteBeginFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.pos != null && m.hasOwnProperty("pos")) {
                    if (!$util.isInteger(m.pos) && !(m.pos && $util.isInteger(m.pos.low) && $util.isInteger(m.pos.high)))
                        return "pos: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4WriteBeginFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4WriteBeginFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4WriteBeginFtraceEvent} Ext4WriteBeginFtraceEvent
             */
            Ext4WriteBeginFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4WriteBeginFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4WriteBeginFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.pos != null) {
                    if ($util.Long)
                        (m.pos = $util.Long.fromValue(d.pos)).unsigned = false;
                    else if (typeof d.pos === "string")
                        m.pos = parseInt(d.pos, 10);
                    else if (typeof d.pos === "number")
                        m.pos = d.pos;
                    else if (typeof d.pos === "object")
                        m.pos = new $util.LongBits(d.pos.low >>> 0, d.pos.high >>> 0).toNumber();
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4WriteBeginFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4WriteBeginFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4WriteBeginFtraceEvent} m Ext4WriteBeginFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4WriteBeginFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.pos = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pos = o.longs === String ? "0" : 0;
                    d.len = 0;
                    d.flags = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.pos != null && m.hasOwnProperty("pos")) {
                    if (typeof m.pos === "number")
                        d.pos = o.longs === String ? String(m.pos) : m.pos;
                    else
                        d.pos = o.longs === String ? $util.Long.prototype.toString.call(m.pos) : o.longs === Number ? new $util.LongBits(m.pos.low >>> 0, m.pos.high >>> 0).toNumber() : m.pos;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                return d;
            };

            /**
             * Converts this Ext4WriteBeginFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4WriteBeginFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4WriteBeginFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4WriteBeginFtraceEvent;
        })();

        protos.Ext4WriteEndFtraceEvent = (function() {

            /**
             * Properties of an Ext4WriteEndFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4WriteEndFtraceEvent
             * @property {number|null} [dev] Ext4WriteEndFtraceEvent dev
             * @property {number|null} [ino] Ext4WriteEndFtraceEvent ino
             * @property {number|null} [pos] Ext4WriteEndFtraceEvent pos
             * @property {number|null} [len] Ext4WriteEndFtraceEvent len
             * @property {number|null} [copied] Ext4WriteEndFtraceEvent copied
             */

            /**
             * Constructs a new Ext4WriteEndFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4WriteEndFtraceEvent.
             * @implements IExt4WriteEndFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4WriteEndFtraceEvent=} [p] Properties to set
             */
            function Ext4WriteEndFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4WriteEndFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4WriteEndFtraceEvent
             * @instance
             */
            Ext4WriteEndFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4WriteEndFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4WriteEndFtraceEvent
             * @instance
             */
            Ext4WriteEndFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4WriteEndFtraceEvent pos.
             * @member {number} pos
             * @memberof perfetto.protos.Ext4WriteEndFtraceEvent
             * @instance
             */
            Ext4WriteEndFtraceEvent.prototype.pos = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4WriteEndFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4WriteEndFtraceEvent
             * @instance
             */
            Ext4WriteEndFtraceEvent.prototype.len = 0;

            /**
             * Ext4WriteEndFtraceEvent copied.
             * @member {number} copied
             * @memberof perfetto.protos.Ext4WriteEndFtraceEvent
             * @instance
             */
            Ext4WriteEndFtraceEvent.prototype.copied = 0;

            /**
             * Creates a new Ext4WriteEndFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4WriteEndFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4WriteEndFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4WriteEndFtraceEvent} Ext4WriteEndFtraceEvent instance
             */
            Ext4WriteEndFtraceEvent.create = function create(properties) {
                return new Ext4WriteEndFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4WriteEndFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4WriteEndFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4WriteEndFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4WriteEndFtraceEvent} m Ext4WriteEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4WriteEndFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.pos != null && Object.hasOwnProperty.call(m, "pos"))
                    w.uint32(24).int64(m.pos);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).uint32(m.len);
                if (m.copied != null && Object.hasOwnProperty.call(m, "copied"))
                    w.uint32(40).uint32(m.copied);
                return w;
            };

            /**
             * Encodes the specified Ext4WriteEndFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4WriteEndFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4WriteEndFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4WriteEndFtraceEvent} message Ext4WriteEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4WriteEndFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4WriteEndFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4WriteEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4WriteEndFtraceEvent} Ext4WriteEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4WriteEndFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4WriteEndFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.pos = r.int64();
                        break;
                    case 4:
                        m.len = r.uint32();
                        break;
                    case 5:
                        m.copied = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4WriteEndFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4WriteEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4WriteEndFtraceEvent} Ext4WriteEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4WriteEndFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4WriteEndFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4WriteEndFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4WriteEndFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.pos != null && m.hasOwnProperty("pos")) {
                    if (!$util.isInteger(m.pos) && !(m.pos && $util.isInteger(m.pos.low) && $util.isInteger(m.pos.high)))
                        return "pos: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.copied != null && m.hasOwnProperty("copied")) {
                    if (!$util.isInteger(m.copied))
                        return "copied: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4WriteEndFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4WriteEndFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4WriteEndFtraceEvent} Ext4WriteEndFtraceEvent
             */
            Ext4WriteEndFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4WriteEndFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4WriteEndFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.pos != null) {
                    if ($util.Long)
                        (m.pos = $util.Long.fromValue(d.pos)).unsigned = false;
                    else if (typeof d.pos === "string")
                        m.pos = parseInt(d.pos, 10);
                    else if (typeof d.pos === "number")
                        m.pos = d.pos;
                    else if (typeof d.pos === "object")
                        m.pos = new $util.LongBits(d.pos.low >>> 0, d.pos.high >>> 0).toNumber();
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.copied != null) {
                    m.copied = d.copied >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4WriteEndFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4WriteEndFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4WriteEndFtraceEvent} m Ext4WriteEndFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4WriteEndFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.pos = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pos = o.longs === String ? "0" : 0;
                    d.len = 0;
                    d.copied = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.pos != null && m.hasOwnProperty("pos")) {
                    if (typeof m.pos === "number")
                        d.pos = o.longs === String ? String(m.pos) : m.pos;
                    else
                        d.pos = o.longs === String ? $util.Long.prototype.toString.call(m.pos) : o.longs === Number ? new $util.LongBits(m.pos.low >>> 0, m.pos.high >>> 0).toNumber() : m.pos;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.copied != null && m.hasOwnProperty("copied")) {
                    d.copied = m.copied;
                }
                return d;
            };

            /**
             * Converts this Ext4WriteEndFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4WriteEndFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4WriteEndFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4WriteEndFtraceEvent;
        })();

        protos.Ext4WritepageFtraceEvent = (function() {

            /**
             * Properties of an Ext4WritepageFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4WritepageFtraceEvent
             * @property {number|null} [dev] Ext4WritepageFtraceEvent dev
             * @property {number|null} [ino] Ext4WritepageFtraceEvent ino
             * @property {number|null} [index] Ext4WritepageFtraceEvent index
             */

            /**
             * Constructs a new Ext4WritepageFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4WritepageFtraceEvent.
             * @implements IExt4WritepageFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4WritepageFtraceEvent=} [p] Properties to set
             */
            function Ext4WritepageFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4WritepageFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4WritepageFtraceEvent
             * @instance
             */
            Ext4WritepageFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4WritepageFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4WritepageFtraceEvent
             * @instance
             */
            Ext4WritepageFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4WritepageFtraceEvent index.
             * @member {number} index
             * @memberof perfetto.protos.Ext4WritepageFtraceEvent
             * @instance
             */
            Ext4WritepageFtraceEvent.prototype.index = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new Ext4WritepageFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4WritepageFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4WritepageFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4WritepageFtraceEvent} Ext4WritepageFtraceEvent instance
             */
            Ext4WritepageFtraceEvent.create = function create(properties) {
                return new Ext4WritepageFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4WritepageFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4WritepageFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4WritepageFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4WritepageFtraceEvent} m Ext4WritepageFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4WritepageFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.index != null && Object.hasOwnProperty.call(m, "index"))
                    w.uint32(24).uint64(m.index);
                return w;
            };

            /**
             * Encodes the specified Ext4WritepageFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4WritepageFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4WritepageFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4WritepageFtraceEvent} message Ext4WritepageFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4WritepageFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4WritepageFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4WritepageFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4WritepageFtraceEvent} Ext4WritepageFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4WritepageFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4WritepageFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.index = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4WritepageFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4WritepageFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4WritepageFtraceEvent} Ext4WritepageFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4WritepageFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4WritepageFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4WritepageFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4WritepageFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (!$util.isInteger(m.index) && !(m.index && $util.isInteger(m.index.low) && $util.isInteger(m.index.high)))
                        return "index: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an Ext4WritepageFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4WritepageFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4WritepageFtraceEvent} Ext4WritepageFtraceEvent
             */
            Ext4WritepageFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4WritepageFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4WritepageFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.index != null) {
                    if ($util.Long)
                        (m.index = $util.Long.fromValue(d.index)).unsigned = true;
                    else if (typeof d.index === "string")
                        m.index = parseInt(d.index, 10);
                    else if (typeof d.index === "number")
                        m.index = d.index;
                    else if (typeof d.index === "object")
                        m.index = new $util.LongBits(d.index.low >>> 0, d.index.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4WritepageFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4WritepageFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4WritepageFtraceEvent} m Ext4WritepageFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4WritepageFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.index = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.index = o.longs === String ? "0" : 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (typeof m.index === "number")
                        d.index = o.longs === String ? String(m.index) : m.index;
                    else
                        d.index = o.longs === String ? $util.Long.prototype.toString.call(m.index) : o.longs === Number ? new $util.LongBits(m.index.low >>> 0, m.index.high >>> 0).toNumber(true) : m.index;
                }
                return d;
            };

            /**
             * Converts this Ext4WritepageFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4WritepageFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4WritepageFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4WritepageFtraceEvent;
        })();

        protos.Ext4WritepagesFtraceEvent = (function() {

            /**
             * Properties of an Ext4WritepagesFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4WritepagesFtraceEvent
             * @property {number|null} [dev] Ext4WritepagesFtraceEvent dev
             * @property {number|null} [ino] Ext4WritepagesFtraceEvent ino
             * @property {number|null} [nrToWrite] Ext4WritepagesFtraceEvent nrToWrite
             * @property {number|null} [pagesSkipped] Ext4WritepagesFtraceEvent pagesSkipped
             * @property {number|null} [rangeStart] Ext4WritepagesFtraceEvent rangeStart
             * @property {number|null} [rangeEnd] Ext4WritepagesFtraceEvent rangeEnd
             * @property {number|null} [writebackIndex] Ext4WritepagesFtraceEvent writebackIndex
             * @property {number|null} [syncMode] Ext4WritepagesFtraceEvent syncMode
             * @property {number|null} [forKupdate] Ext4WritepagesFtraceEvent forKupdate
             * @property {number|null} [rangeCyclic] Ext4WritepagesFtraceEvent rangeCyclic
             */

            /**
             * Constructs a new Ext4WritepagesFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4WritepagesFtraceEvent.
             * @implements IExt4WritepagesFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4WritepagesFtraceEvent=} [p] Properties to set
             */
            function Ext4WritepagesFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4WritepagesFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4WritepagesFtraceEvent
             * @instance
             */
            Ext4WritepagesFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4WritepagesFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4WritepagesFtraceEvent
             * @instance
             */
            Ext4WritepagesFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4WritepagesFtraceEvent nrToWrite.
             * @member {number} nrToWrite
             * @memberof perfetto.protos.Ext4WritepagesFtraceEvent
             * @instance
             */
            Ext4WritepagesFtraceEvent.prototype.nrToWrite = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4WritepagesFtraceEvent pagesSkipped.
             * @member {number} pagesSkipped
             * @memberof perfetto.protos.Ext4WritepagesFtraceEvent
             * @instance
             */
            Ext4WritepagesFtraceEvent.prototype.pagesSkipped = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4WritepagesFtraceEvent rangeStart.
             * @member {number} rangeStart
             * @memberof perfetto.protos.Ext4WritepagesFtraceEvent
             * @instance
             */
            Ext4WritepagesFtraceEvent.prototype.rangeStart = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4WritepagesFtraceEvent rangeEnd.
             * @member {number} rangeEnd
             * @memberof perfetto.protos.Ext4WritepagesFtraceEvent
             * @instance
             */
            Ext4WritepagesFtraceEvent.prototype.rangeEnd = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4WritepagesFtraceEvent writebackIndex.
             * @member {number} writebackIndex
             * @memberof perfetto.protos.Ext4WritepagesFtraceEvent
             * @instance
             */
            Ext4WritepagesFtraceEvent.prototype.writebackIndex = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4WritepagesFtraceEvent syncMode.
             * @member {number} syncMode
             * @memberof perfetto.protos.Ext4WritepagesFtraceEvent
             * @instance
             */
            Ext4WritepagesFtraceEvent.prototype.syncMode = 0;

            /**
             * Ext4WritepagesFtraceEvent forKupdate.
             * @member {number} forKupdate
             * @memberof perfetto.protos.Ext4WritepagesFtraceEvent
             * @instance
             */
            Ext4WritepagesFtraceEvent.prototype.forKupdate = 0;

            /**
             * Ext4WritepagesFtraceEvent rangeCyclic.
             * @member {number} rangeCyclic
             * @memberof perfetto.protos.Ext4WritepagesFtraceEvent
             * @instance
             */
            Ext4WritepagesFtraceEvent.prototype.rangeCyclic = 0;

            /**
             * Creates a new Ext4WritepagesFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4WritepagesFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4WritepagesFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4WritepagesFtraceEvent} Ext4WritepagesFtraceEvent instance
             */
            Ext4WritepagesFtraceEvent.create = function create(properties) {
                return new Ext4WritepagesFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4WritepagesFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4WritepagesFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4WritepagesFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4WritepagesFtraceEvent} m Ext4WritepagesFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4WritepagesFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.nrToWrite != null && Object.hasOwnProperty.call(m, "nrToWrite"))
                    w.uint32(24).int64(m.nrToWrite);
                if (m.pagesSkipped != null && Object.hasOwnProperty.call(m, "pagesSkipped"))
                    w.uint32(32).int64(m.pagesSkipped);
                if (m.rangeStart != null && Object.hasOwnProperty.call(m, "rangeStart"))
                    w.uint32(40).int64(m.rangeStart);
                if (m.rangeEnd != null && Object.hasOwnProperty.call(m, "rangeEnd"))
                    w.uint32(48).int64(m.rangeEnd);
                if (m.writebackIndex != null && Object.hasOwnProperty.call(m, "writebackIndex"))
                    w.uint32(56).uint64(m.writebackIndex);
                if (m.syncMode != null && Object.hasOwnProperty.call(m, "syncMode"))
                    w.uint32(64).int32(m.syncMode);
                if (m.forKupdate != null && Object.hasOwnProperty.call(m, "forKupdate"))
                    w.uint32(72).uint32(m.forKupdate);
                if (m.rangeCyclic != null && Object.hasOwnProperty.call(m, "rangeCyclic"))
                    w.uint32(80).uint32(m.rangeCyclic);
                return w;
            };

            /**
             * Encodes the specified Ext4WritepagesFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4WritepagesFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4WritepagesFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4WritepagesFtraceEvent} message Ext4WritepagesFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4WritepagesFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4WritepagesFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4WritepagesFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4WritepagesFtraceEvent} Ext4WritepagesFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4WritepagesFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4WritepagesFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.nrToWrite = r.int64();
                        break;
                    case 4:
                        m.pagesSkipped = r.int64();
                        break;
                    case 5:
                        m.rangeStart = r.int64();
                        break;
                    case 6:
                        m.rangeEnd = r.int64();
                        break;
                    case 7:
                        m.writebackIndex = r.uint64();
                        break;
                    case 8:
                        m.syncMode = r.int32();
                        break;
                    case 9:
                        m.forKupdate = r.uint32();
                        break;
                    case 10:
                        m.rangeCyclic = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4WritepagesFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4WritepagesFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4WritepagesFtraceEvent} Ext4WritepagesFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4WritepagesFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4WritepagesFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4WritepagesFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4WritepagesFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.nrToWrite != null && m.hasOwnProperty("nrToWrite")) {
                    if (!$util.isInteger(m.nrToWrite) && !(m.nrToWrite && $util.isInteger(m.nrToWrite.low) && $util.isInteger(m.nrToWrite.high)))
                        return "nrToWrite: integer|Long expected";
                }
                if (m.pagesSkipped != null && m.hasOwnProperty("pagesSkipped")) {
                    if (!$util.isInteger(m.pagesSkipped) && !(m.pagesSkipped && $util.isInteger(m.pagesSkipped.low) && $util.isInteger(m.pagesSkipped.high)))
                        return "pagesSkipped: integer|Long expected";
                }
                if (m.rangeStart != null && m.hasOwnProperty("rangeStart")) {
                    if (!$util.isInteger(m.rangeStart) && !(m.rangeStart && $util.isInteger(m.rangeStart.low) && $util.isInteger(m.rangeStart.high)))
                        return "rangeStart: integer|Long expected";
                }
                if (m.rangeEnd != null && m.hasOwnProperty("rangeEnd")) {
                    if (!$util.isInteger(m.rangeEnd) && !(m.rangeEnd && $util.isInteger(m.rangeEnd.low) && $util.isInteger(m.rangeEnd.high)))
                        return "rangeEnd: integer|Long expected";
                }
                if (m.writebackIndex != null && m.hasOwnProperty("writebackIndex")) {
                    if (!$util.isInteger(m.writebackIndex) && !(m.writebackIndex && $util.isInteger(m.writebackIndex.low) && $util.isInteger(m.writebackIndex.high)))
                        return "writebackIndex: integer|Long expected";
                }
                if (m.syncMode != null && m.hasOwnProperty("syncMode")) {
                    if (!$util.isInteger(m.syncMode))
                        return "syncMode: integer expected";
                }
                if (m.forKupdate != null && m.hasOwnProperty("forKupdate")) {
                    if (!$util.isInteger(m.forKupdate))
                        return "forKupdate: integer expected";
                }
                if (m.rangeCyclic != null && m.hasOwnProperty("rangeCyclic")) {
                    if (!$util.isInteger(m.rangeCyclic))
                        return "rangeCyclic: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4WritepagesFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4WritepagesFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4WritepagesFtraceEvent} Ext4WritepagesFtraceEvent
             */
            Ext4WritepagesFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4WritepagesFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4WritepagesFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.nrToWrite != null) {
                    if ($util.Long)
                        (m.nrToWrite = $util.Long.fromValue(d.nrToWrite)).unsigned = false;
                    else if (typeof d.nrToWrite === "string")
                        m.nrToWrite = parseInt(d.nrToWrite, 10);
                    else if (typeof d.nrToWrite === "number")
                        m.nrToWrite = d.nrToWrite;
                    else if (typeof d.nrToWrite === "object")
                        m.nrToWrite = new $util.LongBits(d.nrToWrite.low >>> 0, d.nrToWrite.high >>> 0).toNumber();
                }
                if (d.pagesSkipped != null) {
                    if ($util.Long)
                        (m.pagesSkipped = $util.Long.fromValue(d.pagesSkipped)).unsigned = false;
                    else if (typeof d.pagesSkipped === "string")
                        m.pagesSkipped = parseInt(d.pagesSkipped, 10);
                    else if (typeof d.pagesSkipped === "number")
                        m.pagesSkipped = d.pagesSkipped;
                    else if (typeof d.pagesSkipped === "object")
                        m.pagesSkipped = new $util.LongBits(d.pagesSkipped.low >>> 0, d.pagesSkipped.high >>> 0).toNumber();
                }
                if (d.rangeStart != null) {
                    if ($util.Long)
                        (m.rangeStart = $util.Long.fromValue(d.rangeStart)).unsigned = false;
                    else if (typeof d.rangeStart === "string")
                        m.rangeStart = parseInt(d.rangeStart, 10);
                    else if (typeof d.rangeStart === "number")
                        m.rangeStart = d.rangeStart;
                    else if (typeof d.rangeStart === "object")
                        m.rangeStart = new $util.LongBits(d.rangeStart.low >>> 0, d.rangeStart.high >>> 0).toNumber();
                }
                if (d.rangeEnd != null) {
                    if ($util.Long)
                        (m.rangeEnd = $util.Long.fromValue(d.rangeEnd)).unsigned = false;
                    else if (typeof d.rangeEnd === "string")
                        m.rangeEnd = parseInt(d.rangeEnd, 10);
                    else if (typeof d.rangeEnd === "number")
                        m.rangeEnd = d.rangeEnd;
                    else if (typeof d.rangeEnd === "object")
                        m.rangeEnd = new $util.LongBits(d.rangeEnd.low >>> 0, d.rangeEnd.high >>> 0).toNumber();
                }
                if (d.writebackIndex != null) {
                    if ($util.Long)
                        (m.writebackIndex = $util.Long.fromValue(d.writebackIndex)).unsigned = true;
                    else if (typeof d.writebackIndex === "string")
                        m.writebackIndex = parseInt(d.writebackIndex, 10);
                    else if (typeof d.writebackIndex === "number")
                        m.writebackIndex = d.writebackIndex;
                    else if (typeof d.writebackIndex === "object")
                        m.writebackIndex = new $util.LongBits(d.writebackIndex.low >>> 0, d.writebackIndex.high >>> 0).toNumber(true);
                }
                if (d.syncMode != null) {
                    m.syncMode = d.syncMode | 0;
                }
                if (d.forKupdate != null) {
                    m.forKupdate = d.forKupdate >>> 0;
                }
                if (d.rangeCyclic != null) {
                    m.rangeCyclic = d.rangeCyclic >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4WritepagesFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4WritepagesFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4WritepagesFtraceEvent} m Ext4WritepagesFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4WritepagesFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.nrToWrite = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.nrToWrite = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.pagesSkipped = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pagesSkipped = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.rangeStart = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.rangeStart = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.rangeEnd = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.rangeEnd = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.writebackIndex = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.writebackIndex = o.longs === String ? "0" : 0;
                    d.syncMode = 0;
                    d.forKupdate = 0;
                    d.rangeCyclic = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.nrToWrite != null && m.hasOwnProperty("nrToWrite")) {
                    if (typeof m.nrToWrite === "number")
                        d.nrToWrite = o.longs === String ? String(m.nrToWrite) : m.nrToWrite;
                    else
                        d.nrToWrite = o.longs === String ? $util.Long.prototype.toString.call(m.nrToWrite) : o.longs === Number ? new $util.LongBits(m.nrToWrite.low >>> 0, m.nrToWrite.high >>> 0).toNumber() : m.nrToWrite;
                }
                if (m.pagesSkipped != null && m.hasOwnProperty("pagesSkipped")) {
                    if (typeof m.pagesSkipped === "number")
                        d.pagesSkipped = o.longs === String ? String(m.pagesSkipped) : m.pagesSkipped;
                    else
                        d.pagesSkipped = o.longs === String ? $util.Long.prototype.toString.call(m.pagesSkipped) : o.longs === Number ? new $util.LongBits(m.pagesSkipped.low >>> 0, m.pagesSkipped.high >>> 0).toNumber() : m.pagesSkipped;
                }
                if (m.rangeStart != null && m.hasOwnProperty("rangeStart")) {
                    if (typeof m.rangeStart === "number")
                        d.rangeStart = o.longs === String ? String(m.rangeStart) : m.rangeStart;
                    else
                        d.rangeStart = o.longs === String ? $util.Long.prototype.toString.call(m.rangeStart) : o.longs === Number ? new $util.LongBits(m.rangeStart.low >>> 0, m.rangeStart.high >>> 0).toNumber() : m.rangeStart;
                }
                if (m.rangeEnd != null && m.hasOwnProperty("rangeEnd")) {
                    if (typeof m.rangeEnd === "number")
                        d.rangeEnd = o.longs === String ? String(m.rangeEnd) : m.rangeEnd;
                    else
                        d.rangeEnd = o.longs === String ? $util.Long.prototype.toString.call(m.rangeEnd) : o.longs === Number ? new $util.LongBits(m.rangeEnd.low >>> 0, m.rangeEnd.high >>> 0).toNumber() : m.rangeEnd;
                }
                if (m.writebackIndex != null && m.hasOwnProperty("writebackIndex")) {
                    if (typeof m.writebackIndex === "number")
                        d.writebackIndex = o.longs === String ? String(m.writebackIndex) : m.writebackIndex;
                    else
                        d.writebackIndex = o.longs === String ? $util.Long.prototype.toString.call(m.writebackIndex) : o.longs === Number ? new $util.LongBits(m.writebackIndex.low >>> 0, m.writebackIndex.high >>> 0).toNumber(true) : m.writebackIndex;
                }
                if (m.syncMode != null && m.hasOwnProperty("syncMode")) {
                    d.syncMode = m.syncMode;
                }
                if (m.forKupdate != null && m.hasOwnProperty("forKupdate")) {
                    d.forKupdate = m.forKupdate;
                }
                if (m.rangeCyclic != null && m.hasOwnProperty("rangeCyclic")) {
                    d.rangeCyclic = m.rangeCyclic;
                }
                return d;
            };

            /**
             * Converts this Ext4WritepagesFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4WritepagesFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4WritepagesFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4WritepagesFtraceEvent;
        })();

        protos.Ext4WritepagesResultFtraceEvent = (function() {

            /**
             * Properties of an Ext4WritepagesResultFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4WritepagesResultFtraceEvent
             * @property {number|null} [dev] Ext4WritepagesResultFtraceEvent dev
             * @property {number|null} [ino] Ext4WritepagesResultFtraceEvent ino
             * @property {number|null} [ret] Ext4WritepagesResultFtraceEvent ret
             * @property {number|null} [pagesWritten] Ext4WritepagesResultFtraceEvent pagesWritten
             * @property {number|null} [pagesSkipped] Ext4WritepagesResultFtraceEvent pagesSkipped
             * @property {number|null} [writebackIndex] Ext4WritepagesResultFtraceEvent writebackIndex
             * @property {number|null} [syncMode] Ext4WritepagesResultFtraceEvent syncMode
             */

            /**
             * Constructs a new Ext4WritepagesResultFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4WritepagesResultFtraceEvent.
             * @implements IExt4WritepagesResultFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4WritepagesResultFtraceEvent=} [p] Properties to set
             */
            function Ext4WritepagesResultFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4WritepagesResultFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4WritepagesResultFtraceEvent
             * @instance
             */
            Ext4WritepagesResultFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4WritepagesResultFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4WritepagesResultFtraceEvent
             * @instance
             */
            Ext4WritepagesResultFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4WritepagesResultFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.Ext4WritepagesResultFtraceEvent
             * @instance
             */
            Ext4WritepagesResultFtraceEvent.prototype.ret = 0;

            /**
             * Ext4WritepagesResultFtraceEvent pagesWritten.
             * @member {number} pagesWritten
             * @memberof perfetto.protos.Ext4WritepagesResultFtraceEvent
             * @instance
             */
            Ext4WritepagesResultFtraceEvent.prototype.pagesWritten = 0;

            /**
             * Ext4WritepagesResultFtraceEvent pagesSkipped.
             * @member {number} pagesSkipped
             * @memberof perfetto.protos.Ext4WritepagesResultFtraceEvent
             * @instance
             */
            Ext4WritepagesResultFtraceEvent.prototype.pagesSkipped = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4WritepagesResultFtraceEvent writebackIndex.
             * @member {number} writebackIndex
             * @memberof perfetto.protos.Ext4WritepagesResultFtraceEvent
             * @instance
             */
            Ext4WritepagesResultFtraceEvent.prototype.writebackIndex = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4WritepagesResultFtraceEvent syncMode.
             * @member {number} syncMode
             * @memberof perfetto.protos.Ext4WritepagesResultFtraceEvent
             * @instance
             */
            Ext4WritepagesResultFtraceEvent.prototype.syncMode = 0;

            /**
             * Creates a new Ext4WritepagesResultFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4WritepagesResultFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4WritepagesResultFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4WritepagesResultFtraceEvent} Ext4WritepagesResultFtraceEvent instance
             */
            Ext4WritepagesResultFtraceEvent.create = function create(properties) {
                return new Ext4WritepagesResultFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4WritepagesResultFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4WritepagesResultFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4WritepagesResultFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4WritepagesResultFtraceEvent} m Ext4WritepagesResultFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4WritepagesResultFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(24).int32(m.ret);
                if (m.pagesWritten != null && Object.hasOwnProperty.call(m, "pagesWritten"))
                    w.uint32(32).int32(m.pagesWritten);
                if (m.pagesSkipped != null && Object.hasOwnProperty.call(m, "pagesSkipped"))
                    w.uint32(40).int64(m.pagesSkipped);
                if (m.writebackIndex != null && Object.hasOwnProperty.call(m, "writebackIndex"))
                    w.uint32(48).uint64(m.writebackIndex);
                if (m.syncMode != null && Object.hasOwnProperty.call(m, "syncMode"))
                    w.uint32(56).int32(m.syncMode);
                return w;
            };

            /**
             * Encodes the specified Ext4WritepagesResultFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4WritepagesResultFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4WritepagesResultFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4WritepagesResultFtraceEvent} message Ext4WritepagesResultFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4WritepagesResultFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4WritepagesResultFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4WritepagesResultFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4WritepagesResultFtraceEvent} Ext4WritepagesResultFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4WritepagesResultFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4WritepagesResultFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.ret = r.int32();
                        break;
                    case 4:
                        m.pagesWritten = r.int32();
                        break;
                    case 5:
                        m.pagesSkipped = r.int64();
                        break;
                    case 6:
                        m.writebackIndex = r.uint64();
                        break;
                    case 7:
                        m.syncMode = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4WritepagesResultFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4WritepagesResultFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4WritepagesResultFtraceEvent} Ext4WritepagesResultFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4WritepagesResultFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4WritepagesResultFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4WritepagesResultFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4WritepagesResultFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                if (m.pagesWritten != null && m.hasOwnProperty("pagesWritten")) {
                    if (!$util.isInteger(m.pagesWritten))
                        return "pagesWritten: integer expected";
                }
                if (m.pagesSkipped != null && m.hasOwnProperty("pagesSkipped")) {
                    if (!$util.isInteger(m.pagesSkipped) && !(m.pagesSkipped && $util.isInteger(m.pagesSkipped.low) && $util.isInteger(m.pagesSkipped.high)))
                        return "pagesSkipped: integer|Long expected";
                }
                if (m.writebackIndex != null && m.hasOwnProperty("writebackIndex")) {
                    if (!$util.isInteger(m.writebackIndex) && !(m.writebackIndex && $util.isInteger(m.writebackIndex.low) && $util.isInteger(m.writebackIndex.high)))
                        return "writebackIndex: integer|Long expected";
                }
                if (m.syncMode != null && m.hasOwnProperty("syncMode")) {
                    if (!$util.isInteger(m.syncMode))
                        return "syncMode: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4WritepagesResultFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4WritepagesResultFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4WritepagesResultFtraceEvent} Ext4WritepagesResultFtraceEvent
             */
            Ext4WritepagesResultFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4WritepagesResultFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4WritepagesResultFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                if (d.pagesWritten != null) {
                    m.pagesWritten = d.pagesWritten | 0;
                }
                if (d.pagesSkipped != null) {
                    if ($util.Long)
                        (m.pagesSkipped = $util.Long.fromValue(d.pagesSkipped)).unsigned = false;
                    else if (typeof d.pagesSkipped === "string")
                        m.pagesSkipped = parseInt(d.pagesSkipped, 10);
                    else if (typeof d.pagesSkipped === "number")
                        m.pagesSkipped = d.pagesSkipped;
                    else if (typeof d.pagesSkipped === "object")
                        m.pagesSkipped = new $util.LongBits(d.pagesSkipped.low >>> 0, d.pagesSkipped.high >>> 0).toNumber();
                }
                if (d.writebackIndex != null) {
                    if ($util.Long)
                        (m.writebackIndex = $util.Long.fromValue(d.writebackIndex)).unsigned = true;
                    else if (typeof d.writebackIndex === "string")
                        m.writebackIndex = parseInt(d.writebackIndex, 10);
                    else if (typeof d.writebackIndex === "number")
                        m.writebackIndex = d.writebackIndex;
                    else if (typeof d.writebackIndex === "object")
                        m.writebackIndex = new $util.LongBits(d.writebackIndex.low >>> 0, d.writebackIndex.high >>> 0).toNumber(true);
                }
                if (d.syncMode != null) {
                    m.syncMode = d.syncMode | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4WritepagesResultFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4WritepagesResultFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4WritepagesResultFtraceEvent} m Ext4WritepagesResultFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4WritepagesResultFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.ret = 0;
                    d.pagesWritten = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.pagesSkipped = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pagesSkipped = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.writebackIndex = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.writebackIndex = o.longs === String ? "0" : 0;
                    d.syncMode = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                if (m.pagesWritten != null && m.hasOwnProperty("pagesWritten")) {
                    d.pagesWritten = m.pagesWritten;
                }
                if (m.pagesSkipped != null && m.hasOwnProperty("pagesSkipped")) {
                    if (typeof m.pagesSkipped === "number")
                        d.pagesSkipped = o.longs === String ? String(m.pagesSkipped) : m.pagesSkipped;
                    else
                        d.pagesSkipped = o.longs === String ? $util.Long.prototype.toString.call(m.pagesSkipped) : o.longs === Number ? new $util.LongBits(m.pagesSkipped.low >>> 0, m.pagesSkipped.high >>> 0).toNumber() : m.pagesSkipped;
                }
                if (m.writebackIndex != null && m.hasOwnProperty("writebackIndex")) {
                    if (typeof m.writebackIndex === "number")
                        d.writebackIndex = o.longs === String ? String(m.writebackIndex) : m.writebackIndex;
                    else
                        d.writebackIndex = o.longs === String ? $util.Long.prototype.toString.call(m.writebackIndex) : o.longs === Number ? new $util.LongBits(m.writebackIndex.low >>> 0, m.writebackIndex.high >>> 0).toNumber(true) : m.writebackIndex;
                }
                if (m.syncMode != null && m.hasOwnProperty("syncMode")) {
                    d.syncMode = m.syncMode;
                }
                return d;
            };

            /**
             * Converts this Ext4WritepagesResultFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4WritepagesResultFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4WritepagesResultFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4WritepagesResultFtraceEvent;
        })();

        protos.Ext4ZeroRangeFtraceEvent = (function() {

            /**
             * Properties of an Ext4ZeroRangeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IExt4ZeroRangeFtraceEvent
             * @property {number|null} [dev] Ext4ZeroRangeFtraceEvent dev
             * @property {number|null} [ino] Ext4ZeroRangeFtraceEvent ino
             * @property {number|null} [offset] Ext4ZeroRangeFtraceEvent offset
             * @property {number|null} [len] Ext4ZeroRangeFtraceEvent len
             * @property {number|null} [mode] Ext4ZeroRangeFtraceEvent mode
             */

            /**
             * Constructs a new Ext4ZeroRangeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an Ext4ZeroRangeFtraceEvent.
             * @implements IExt4ZeroRangeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IExt4ZeroRangeFtraceEvent=} [p] Properties to set
             */
            function Ext4ZeroRangeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Ext4ZeroRangeFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.Ext4ZeroRangeFtraceEvent
             * @instance
             */
            Ext4ZeroRangeFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ZeroRangeFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.Ext4ZeroRangeFtraceEvent
             * @instance
             */
            Ext4ZeroRangeFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Ext4ZeroRangeFtraceEvent offset.
             * @member {number} offset
             * @memberof perfetto.protos.Ext4ZeroRangeFtraceEvent
             * @instance
             */
            Ext4ZeroRangeFtraceEvent.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4ZeroRangeFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.Ext4ZeroRangeFtraceEvent
             * @instance
             */
            Ext4ZeroRangeFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Ext4ZeroRangeFtraceEvent mode.
             * @member {number} mode
             * @memberof perfetto.protos.Ext4ZeroRangeFtraceEvent
             * @instance
             */
            Ext4ZeroRangeFtraceEvent.prototype.mode = 0;

            /**
             * Creates a new Ext4ZeroRangeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Ext4ZeroRangeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ZeroRangeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Ext4ZeroRangeFtraceEvent} Ext4ZeroRangeFtraceEvent instance
             */
            Ext4ZeroRangeFtraceEvent.create = function create(properties) {
                return new Ext4ZeroRangeFtraceEvent(properties);
            };

            /**
             * Encodes the specified Ext4ZeroRangeFtraceEvent message. Does not implicitly {@link perfetto.protos.Ext4ZeroRangeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Ext4ZeroRangeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ZeroRangeFtraceEvent} m Ext4ZeroRangeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ZeroRangeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.offset != null && Object.hasOwnProperty.call(m, "offset"))
                    w.uint32(24).int64(m.offset);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).int64(m.len);
                if (m.mode != null && Object.hasOwnProperty.call(m, "mode"))
                    w.uint32(40).int32(m.mode);
                return w;
            };

            /**
             * Encodes the specified Ext4ZeroRangeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Ext4ZeroRangeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Ext4ZeroRangeFtraceEvent
             * @static
             * @param {perfetto.protos.IExt4ZeroRangeFtraceEvent} message Ext4ZeroRangeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Ext4ZeroRangeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Ext4ZeroRangeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Ext4ZeroRangeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Ext4ZeroRangeFtraceEvent} Ext4ZeroRangeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ZeroRangeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Ext4ZeroRangeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.offset = r.int64();
                        break;
                    case 4:
                        m.len = r.int64();
                        break;
                    case 5:
                        m.mode = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Ext4ZeroRangeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Ext4ZeroRangeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Ext4ZeroRangeFtraceEvent} Ext4ZeroRangeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Ext4ZeroRangeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Ext4ZeroRangeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Ext4ZeroRangeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Ext4ZeroRangeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (!$util.isInteger(m.offset) && !(m.offset && $util.isInteger(m.offset.low) && $util.isInteger(m.offset.high)))
                        return "offset: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    if (!$util.isInteger(m.mode))
                        return "mode: integer expected";
                }
                return null;
            };

            /**
             * Creates an Ext4ZeroRangeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Ext4ZeroRangeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Ext4ZeroRangeFtraceEvent} Ext4ZeroRangeFtraceEvent
             */
            Ext4ZeroRangeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Ext4ZeroRangeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Ext4ZeroRangeFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.offset != null) {
                    if ($util.Long)
                        (m.offset = $util.Long.fromValue(d.offset)).unsigned = false;
                    else if (typeof d.offset === "string")
                        m.offset = parseInt(d.offset, 10);
                    else if (typeof d.offset === "number")
                        m.offset = d.offset;
                    else if (typeof d.offset === "object")
                        m.offset = new $util.LongBits(d.offset.low >>> 0, d.offset.high >>> 0).toNumber();
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = false;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber();
                }
                if (d.mode != null) {
                    m.mode = d.mode | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an Ext4ZeroRangeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Ext4ZeroRangeFtraceEvent
             * @static
             * @param {perfetto.protos.Ext4ZeroRangeFtraceEvent} m Ext4ZeroRangeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Ext4ZeroRangeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.offset = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.offset = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                    d.mode = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (typeof m.offset === "number")
                        d.offset = o.longs === String ? String(m.offset) : m.offset;
                    else
                        d.offset = o.longs === String ? $util.Long.prototype.toString.call(m.offset) : o.longs === Number ? new $util.LongBits(m.offset.low >>> 0, m.offset.high >>> 0).toNumber() : m.offset;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber() : m.len;
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    d.mode = m.mode;
                }
                return d;
            };

            /**
             * Converts this Ext4ZeroRangeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Ext4ZeroRangeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Ext4ZeroRangeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Ext4ZeroRangeFtraceEvent;
        })();

        protos.F2fsDoSubmitBioFtraceEvent = (function() {

            /**
             * Properties of a F2fsDoSubmitBioFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsDoSubmitBioFtraceEvent
             * @property {number|null} [dev] F2fsDoSubmitBioFtraceEvent dev
             * @property {number|null} [btype] F2fsDoSubmitBioFtraceEvent btype
             * @property {number|null} [sync] F2fsDoSubmitBioFtraceEvent sync
             * @property {number|null} [sector] F2fsDoSubmitBioFtraceEvent sector
             * @property {number|null} [size] F2fsDoSubmitBioFtraceEvent size
             */

            /**
             * Constructs a new F2fsDoSubmitBioFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsDoSubmitBioFtraceEvent.
             * @implements IF2fsDoSubmitBioFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsDoSubmitBioFtraceEvent=} [p] Properties to set
             */
            function F2fsDoSubmitBioFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsDoSubmitBioFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsDoSubmitBioFtraceEvent
             * @instance
             */
            F2fsDoSubmitBioFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsDoSubmitBioFtraceEvent btype.
             * @member {number} btype
             * @memberof perfetto.protos.F2fsDoSubmitBioFtraceEvent
             * @instance
             */
            F2fsDoSubmitBioFtraceEvent.prototype.btype = 0;

            /**
             * F2fsDoSubmitBioFtraceEvent sync.
             * @member {number} sync
             * @memberof perfetto.protos.F2fsDoSubmitBioFtraceEvent
             * @instance
             */
            F2fsDoSubmitBioFtraceEvent.prototype.sync = 0;

            /**
             * F2fsDoSubmitBioFtraceEvent sector.
             * @member {number} sector
             * @memberof perfetto.protos.F2fsDoSubmitBioFtraceEvent
             * @instance
             */
            F2fsDoSubmitBioFtraceEvent.prototype.sector = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsDoSubmitBioFtraceEvent size.
             * @member {number} size
             * @memberof perfetto.protos.F2fsDoSubmitBioFtraceEvent
             * @instance
             */
            F2fsDoSubmitBioFtraceEvent.prototype.size = 0;

            /**
             * Creates a new F2fsDoSubmitBioFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsDoSubmitBioFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsDoSubmitBioFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsDoSubmitBioFtraceEvent} F2fsDoSubmitBioFtraceEvent instance
             */
            F2fsDoSubmitBioFtraceEvent.create = function create(properties) {
                return new F2fsDoSubmitBioFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsDoSubmitBioFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsDoSubmitBioFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsDoSubmitBioFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsDoSubmitBioFtraceEvent} m F2fsDoSubmitBioFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsDoSubmitBioFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.btype != null && Object.hasOwnProperty.call(m, "btype"))
                    w.uint32(16).int32(m.btype);
                if (m.sync != null && Object.hasOwnProperty.call(m, "sync"))
                    w.uint32(24).uint32(m.sync);
                if (m.sector != null && Object.hasOwnProperty.call(m, "sector"))
                    w.uint32(32).uint64(m.sector);
                if (m.size != null && Object.hasOwnProperty.call(m, "size"))
                    w.uint32(40).uint32(m.size);
                return w;
            };

            /**
             * Encodes the specified F2fsDoSubmitBioFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsDoSubmitBioFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsDoSubmitBioFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsDoSubmitBioFtraceEvent} message F2fsDoSubmitBioFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsDoSubmitBioFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsDoSubmitBioFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsDoSubmitBioFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsDoSubmitBioFtraceEvent} F2fsDoSubmitBioFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsDoSubmitBioFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsDoSubmitBioFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.btype = r.int32();
                        break;
                    case 3:
                        m.sync = r.uint32();
                        break;
                    case 4:
                        m.sector = r.uint64();
                        break;
                    case 5:
                        m.size = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsDoSubmitBioFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsDoSubmitBioFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsDoSubmitBioFtraceEvent} F2fsDoSubmitBioFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsDoSubmitBioFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsDoSubmitBioFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsDoSubmitBioFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsDoSubmitBioFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.btype != null && m.hasOwnProperty("btype")) {
                    if (!$util.isInteger(m.btype))
                        return "btype: integer expected";
                }
                if (m.sync != null && m.hasOwnProperty("sync")) {
                    if (!$util.isInteger(m.sync))
                        return "sync: integer expected";
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (!$util.isInteger(m.sector) && !(m.sector && $util.isInteger(m.sector.low) && $util.isInteger(m.sector.high)))
                        return "sector: integer|Long expected";
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (!$util.isInteger(m.size))
                        return "size: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsDoSubmitBioFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsDoSubmitBioFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsDoSubmitBioFtraceEvent} F2fsDoSubmitBioFtraceEvent
             */
            F2fsDoSubmitBioFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsDoSubmitBioFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsDoSubmitBioFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.btype != null) {
                    m.btype = d.btype | 0;
                }
                if (d.sync != null) {
                    m.sync = d.sync >>> 0;
                }
                if (d.sector != null) {
                    if ($util.Long)
                        (m.sector = $util.Long.fromValue(d.sector)).unsigned = true;
                    else if (typeof d.sector === "string")
                        m.sector = parseInt(d.sector, 10);
                    else if (typeof d.sector === "number")
                        m.sector = d.sector;
                    else if (typeof d.sector === "object")
                        m.sector = new $util.LongBits(d.sector.low >>> 0, d.sector.high >>> 0).toNumber(true);
                }
                if (d.size != null) {
                    m.size = d.size >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsDoSubmitBioFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsDoSubmitBioFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsDoSubmitBioFtraceEvent} m F2fsDoSubmitBioFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsDoSubmitBioFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    d.btype = 0;
                    d.sync = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sector = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sector = o.longs === String ? "0" : 0;
                    d.size = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.btype != null && m.hasOwnProperty("btype")) {
                    d.btype = m.btype;
                }
                if (m.sync != null && m.hasOwnProperty("sync")) {
                    d.sync = m.sync;
                }
                if (m.sector != null && m.hasOwnProperty("sector")) {
                    if (typeof m.sector === "number")
                        d.sector = o.longs === String ? String(m.sector) : m.sector;
                    else
                        d.sector = o.longs === String ? $util.Long.prototype.toString.call(m.sector) : o.longs === Number ? new $util.LongBits(m.sector.low >>> 0, m.sector.high >>> 0).toNumber(true) : m.sector;
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    d.size = m.size;
                }
                return d;
            };

            /**
             * Converts this F2fsDoSubmitBioFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsDoSubmitBioFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsDoSubmitBioFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsDoSubmitBioFtraceEvent;
        })();

        protos.F2fsEvictInodeFtraceEvent = (function() {

            /**
             * Properties of a F2fsEvictInodeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsEvictInodeFtraceEvent
             * @property {number|null} [dev] F2fsEvictInodeFtraceEvent dev
             * @property {number|null} [ino] F2fsEvictInodeFtraceEvent ino
             * @property {number|null} [pino] F2fsEvictInodeFtraceEvent pino
             * @property {number|null} [mode] F2fsEvictInodeFtraceEvent mode
             * @property {number|null} [size] F2fsEvictInodeFtraceEvent size
             * @property {number|null} [nlink] F2fsEvictInodeFtraceEvent nlink
             * @property {number|null} [blocks] F2fsEvictInodeFtraceEvent blocks
             * @property {number|null} [advise] F2fsEvictInodeFtraceEvent advise
             */

            /**
             * Constructs a new F2fsEvictInodeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsEvictInodeFtraceEvent.
             * @implements IF2fsEvictInodeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsEvictInodeFtraceEvent=} [p] Properties to set
             */
            function F2fsEvictInodeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsEvictInodeFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsEvictInodeFtraceEvent
             * @instance
             */
            F2fsEvictInodeFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsEvictInodeFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsEvictInodeFtraceEvent
             * @instance
             */
            F2fsEvictInodeFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsEvictInodeFtraceEvent pino.
             * @member {number} pino
             * @memberof perfetto.protos.F2fsEvictInodeFtraceEvent
             * @instance
             */
            F2fsEvictInodeFtraceEvent.prototype.pino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsEvictInodeFtraceEvent mode.
             * @member {number} mode
             * @memberof perfetto.protos.F2fsEvictInodeFtraceEvent
             * @instance
             */
            F2fsEvictInodeFtraceEvent.prototype.mode = 0;

            /**
             * F2fsEvictInodeFtraceEvent size.
             * @member {number} size
             * @memberof perfetto.protos.F2fsEvictInodeFtraceEvent
             * @instance
             */
            F2fsEvictInodeFtraceEvent.prototype.size = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * F2fsEvictInodeFtraceEvent nlink.
             * @member {number} nlink
             * @memberof perfetto.protos.F2fsEvictInodeFtraceEvent
             * @instance
             */
            F2fsEvictInodeFtraceEvent.prototype.nlink = 0;

            /**
             * F2fsEvictInodeFtraceEvent blocks.
             * @member {number} blocks
             * @memberof perfetto.protos.F2fsEvictInodeFtraceEvent
             * @instance
             */
            F2fsEvictInodeFtraceEvent.prototype.blocks = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsEvictInodeFtraceEvent advise.
             * @member {number} advise
             * @memberof perfetto.protos.F2fsEvictInodeFtraceEvent
             * @instance
             */
            F2fsEvictInodeFtraceEvent.prototype.advise = 0;

            /**
             * Creates a new F2fsEvictInodeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsEvictInodeFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsEvictInodeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsEvictInodeFtraceEvent} F2fsEvictInodeFtraceEvent instance
             */
            F2fsEvictInodeFtraceEvent.create = function create(properties) {
                return new F2fsEvictInodeFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsEvictInodeFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsEvictInodeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsEvictInodeFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsEvictInodeFtraceEvent} m F2fsEvictInodeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsEvictInodeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.pino != null && Object.hasOwnProperty.call(m, "pino"))
                    w.uint32(24).uint64(m.pino);
                if (m.mode != null && Object.hasOwnProperty.call(m, "mode"))
                    w.uint32(32).uint32(m.mode);
                if (m.size != null && Object.hasOwnProperty.call(m, "size"))
                    w.uint32(40).int64(m.size);
                if (m.nlink != null && Object.hasOwnProperty.call(m, "nlink"))
                    w.uint32(48).uint32(m.nlink);
                if (m.blocks != null && Object.hasOwnProperty.call(m, "blocks"))
                    w.uint32(56).uint64(m.blocks);
                if (m.advise != null && Object.hasOwnProperty.call(m, "advise"))
                    w.uint32(64).uint32(m.advise);
                return w;
            };

            /**
             * Encodes the specified F2fsEvictInodeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsEvictInodeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsEvictInodeFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsEvictInodeFtraceEvent} message F2fsEvictInodeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsEvictInodeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsEvictInodeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsEvictInodeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsEvictInodeFtraceEvent} F2fsEvictInodeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsEvictInodeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsEvictInodeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.pino = r.uint64();
                        break;
                    case 4:
                        m.mode = r.uint32();
                        break;
                    case 5:
                        m.size = r.int64();
                        break;
                    case 6:
                        m.nlink = r.uint32();
                        break;
                    case 7:
                        m.blocks = r.uint64();
                        break;
                    case 8:
                        m.advise = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsEvictInodeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsEvictInodeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsEvictInodeFtraceEvent} F2fsEvictInodeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsEvictInodeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsEvictInodeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsEvictInodeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsEvictInodeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.pino != null && m.hasOwnProperty("pino")) {
                    if (!$util.isInteger(m.pino) && !(m.pino && $util.isInteger(m.pino.low) && $util.isInteger(m.pino.high)))
                        return "pino: integer|Long expected";
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    if (!$util.isInteger(m.mode))
                        return "mode: integer expected";
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (!$util.isInteger(m.size) && !(m.size && $util.isInteger(m.size.low) && $util.isInteger(m.size.high)))
                        return "size: integer|Long expected";
                }
                if (m.nlink != null && m.hasOwnProperty("nlink")) {
                    if (!$util.isInteger(m.nlink))
                        return "nlink: integer expected";
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (!$util.isInteger(m.blocks) && !(m.blocks && $util.isInteger(m.blocks.low) && $util.isInteger(m.blocks.high)))
                        return "blocks: integer|Long expected";
                }
                if (m.advise != null && m.hasOwnProperty("advise")) {
                    if (!$util.isInteger(m.advise))
                        return "advise: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsEvictInodeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsEvictInodeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsEvictInodeFtraceEvent} F2fsEvictInodeFtraceEvent
             */
            F2fsEvictInodeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsEvictInodeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsEvictInodeFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.pino != null) {
                    if ($util.Long)
                        (m.pino = $util.Long.fromValue(d.pino)).unsigned = true;
                    else if (typeof d.pino === "string")
                        m.pino = parseInt(d.pino, 10);
                    else if (typeof d.pino === "number")
                        m.pino = d.pino;
                    else if (typeof d.pino === "object")
                        m.pino = new $util.LongBits(d.pino.low >>> 0, d.pino.high >>> 0).toNumber(true);
                }
                if (d.mode != null) {
                    m.mode = d.mode >>> 0;
                }
                if (d.size != null) {
                    if ($util.Long)
                        (m.size = $util.Long.fromValue(d.size)).unsigned = false;
                    else if (typeof d.size === "string")
                        m.size = parseInt(d.size, 10);
                    else if (typeof d.size === "number")
                        m.size = d.size;
                    else if (typeof d.size === "object")
                        m.size = new $util.LongBits(d.size.low >>> 0, d.size.high >>> 0).toNumber();
                }
                if (d.nlink != null) {
                    m.nlink = d.nlink >>> 0;
                }
                if (d.blocks != null) {
                    if ($util.Long)
                        (m.blocks = $util.Long.fromValue(d.blocks)).unsigned = true;
                    else if (typeof d.blocks === "string")
                        m.blocks = parseInt(d.blocks, 10);
                    else if (typeof d.blocks === "number")
                        m.blocks = d.blocks;
                    else if (typeof d.blocks === "object")
                        m.blocks = new $util.LongBits(d.blocks.low >>> 0, d.blocks.high >>> 0).toNumber(true);
                }
                if (d.advise != null) {
                    m.advise = d.advise >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsEvictInodeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsEvictInodeFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsEvictInodeFtraceEvent} m F2fsEvictInodeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsEvictInodeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pino = o.longs === String ? "0" : 0;
                    d.mode = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.size = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.size = o.longs === String ? "0" : 0;
                    d.nlink = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.blocks = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.blocks = o.longs === String ? "0" : 0;
                    d.advise = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.pino != null && m.hasOwnProperty("pino")) {
                    if (typeof m.pino === "number")
                        d.pino = o.longs === String ? String(m.pino) : m.pino;
                    else
                        d.pino = o.longs === String ? $util.Long.prototype.toString.call(m.pino) : o.longs === Number ? new $util.LongBits(m.pino.low >>> 0, m.pino.high >>> 0).toNumber(true) : m.pino;
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    d.mode = m.mode;
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (typeof m.size === "number")
                        d.size = o.longs === String ? String(m.size) : m.size;
                    else
                        d.size = o.longs === String ? $util.Long.prototype.toString.call(m.size) : o.longs === Number ? new $util.LongBits(m.size.low >>> 0, m.size.high >>> 0).toNumber() : m.size;
                }
                if (m.nlink != null && m.hasOwnProperty("nlink")) {
                    d.nlink = m.nlink;
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (typeof m.blocks === "number")
                        d.blocks = o.longs === String ? String(m.blocks) : m.blocks;
                    else
                        d.blocks = o.longs === String ? $util.Long.prototype.toString.call(m.blocks) : o.longs === Number ? new $util.LongBits(m.blocks.low >>> 0, m.blocks.high >>> 0).toNumber(true) : m.blocks;
                }
                if (m.advise != null && m.hasOwnProperty("advise")) {
                    d.advise = m.advise;
                }
                return d;
            };

            /**
             * Converts this F2fsEvictInodeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsEvictInodeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsEvictInodeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsEvictInodeFtraceEvent;
        })();

        protos.F2fsFallocateFtraceEvent = (function() {

            /**
             * Properties of a F2fsFallocateFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsFallocateFtraceEvent
             * @property {number|null} [dev] F2fsFallocateFtraceEvent dev
             * @property {number|null} [ino] F2fsFallocateFtraceEvent ino
             * @property {number|null} [mode] F2fsFallocateFtraceEvent mode
             * @property {number|null} [offset] F2fsFallocateFtraceEvent offset
             * @property {number|null} [len] F2fsFallocateFtraceEvent len
             * @property {number|null} [size] F2fsFallocateFtraceEvent size
             * @property {number|null} [blocks] F2fsFallocateFtraceEvent blocks
             * @property {number|null} [ret] F2fsFallocateFtraceEvent ret
             */

            /**
             * Constructs a new F2fsFallocateFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsFallocateFtraceEvent.
             * @implements IF2fsFallocateFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsFallocateFtraceEvent=} [p] Properties to set
             */
            function F2fsFallocateFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsFallocateFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsFallocateFtraceEvent
             * @instance
             */
            F2fsFallocateFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsFallocateFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsFallocateFtraceEvent
             * @instance
             */
            F2fsFallocateFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsFallocateFtraceEvent mode.
             * @member {number} mode
             * @memberof perfetto.protos.F2fsFallocateFtraceEvent
             * @instance
             */
            F2fsFallocateFtraceEvent.prototype.mode = 0;

            /**
             * F2fsFallocateFtraceEvent offset.
             * @member {number} offset
             * @memberof perfetto.protos.F2fsFallocateFtraceEvent
             * @instance
             */
            F2fsFallocateFtraceEvent.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * F2fsFallocateFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.F2fsFallocateFtraceEvent
             * @instance
             */
            F2fsFallocateFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * F2fsFallocateFtraceEvent size.
             * @member {number} size
             * @memberof perfetto.protos.F2fsFallocateFtraceEvent
             * @instance
             */
            F2fsFallocateFtraceEvent.prototype.size = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * F2fsFallocateFtraceEvent blocks.
             * @member {number} blocks
             * @memberof perfetto.protos.F2fsFallocateFtraceEvent
             * @instance
             */
            F2fsFallocateFtraceEvent.prototype.blocks = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsFallocateFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.F2fsFallocateFtraceEvent
             * @instance
             */
            F2fsFallocateFtraceEvent.prototype.ret = 0;

            /**
             * Creates a new F2fsFallocateFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsFallocateFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsFallocateFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsFallocateFtraceEvent} F2fsFallocateFtraceEvent instance
             */
            F2fsFallocateFtraceEvent.create = function create(properties) {
                return new F2fsFallocateFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsFallocateFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsFallocateFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsFallocateFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsFallocateFtraceEvent} m F2fsFallocateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsFallocateFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.mode != null && Object.hasOwnProperty.call(m, "mode"))
                    w.uint32(24).int32(m.mode);
                if (m.offset != null && Object.hasOwnProperty.call(m, "offset"))
                    w.uint32(32).int64(m.offset);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(40).int64(m.len);
                if (m.size != null && Object.hasOwnProperty.call(m, "size"))
                    w.uint32(48).int64(m.size);
                if (m.blocks != null && Object.hasOwnProperty.call(m, "blocks"))
                    w.uint32(56).uint64(m.blocks);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(64).int32(m.ret);
                return w;
            };

            /**
             * Encodes the specified F2fsFallocateFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsFallocateFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsFallocateFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsFallocateFtraceEvent} message F2fsFallocateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsFallocateFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsFallocateFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsFallocateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsFallocateFtraceEvent} F2fsFallocateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsFallocateFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsFallocateFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.mode = r.int32();
                        break;
                    case 4:
                        m.offset = r.int64();
                        break;
                    case 5:
                        m.len = r.int64();
                        break;
                    case 6:
                        m.size = r.int64();
                        break;
                    case 7:
                        m.blocks = r.uint64();
                        break;
                    case 8:
                        m.ret = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsFallocateFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsFallocateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsFallocateFtraceEvent} F2fsFallocateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsFallocateFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsFallocateFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsFallocateFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsFallocateFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    if (!$util.isInteger(m.mode))
                        return "mode: integer expected";
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (!$util.isInteger(m.offset) && !(m.offset && $util.isInteger(m.offset.low) && $util.isInteger(m.offset.high)))
                        return "offset: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (!$util.isInteger(m.size) && !(m.size && $util.isInteger(m.size.low) && $util.isInteger(m.size.high)))
                        return "size: integer|Long expected";
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (!$util.isInteger(m.blocks) && !(m.blocks && $util.isInteger(m.blocks.low) && $util.isInteger(m.blocks.high)))
                        return "blocks: integer|Long expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsFallocateFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsFallocateFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsFallocateFtraceEvent} F2fsFallocateFtraceEvent
             */
            F2fsFallocateFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsFallocateFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsFallocateFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.mode != null) {
                    m.mode = d.mode | 0;
                }
                if (d.offset != null) {
                    if ($util.Long)
                        (m.offset = $util.Long.fromValue(d.offset)).unsigned = false;
                    else if (typeof d.offset === "string")
                        m.offset = parseInt(d.offset, 10);
                    else if (typeof d.offset === "number")
                        m.offset = d.offset;
                    else if (typeof d.offset === "object")
                        m.offset = new $util.LongBits(d.offset.low >>> 0, d.offset.high >>> 0).toNumber();
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = false;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber();
                }
                if (d.size != null) {
                    if ($util.Long)
                        (m.size = $util.Long.fromValue(d.size)).unsigned = false;
                    else if (typeof d.size === "string")
                        m.size = parseInt(d.size, 10);
                    else if (typeof d.size === "number")
                        m.size = d.size;
                    else if (typeof d.size === "object")
                        m.size = new $util.LongBits(d.size.low >>> 0, d.size.high >>> 0).toNumber();
                }
                if (d.blocks != null) {
                    if ($util.Long)
                        (m.blocks = $util.Long.fromValue(d.blocks)).unsigned = true;
                    else if (typeof d.blocks === "string")
                        m.blocks = parseInt(d.blocks, 10);
                    else if (typeof d.blocks === "number")
                        m.blocks = d.blocks;
                    else if (typeof d.blocks === "object")
                        m.blocks = new $util.LongBits(d.blocks.low >>> 0, d.blocks.high >>> 0).toNumber(true);
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsFallocateFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsFallocateFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsFallocateFtraceEvent} m F2fsFallocateFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsFallocateFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.mode = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.offset = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.offset = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.size = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.size = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.blocks = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.blocks = o.longs === String ? "0" : 0;
                    d.ret = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    d.mode = m.mode;
                }
                if (m.offset != null && m.hasOwnProperty("offset")) {
                    if (typeof m.offset === "number")
                        d.offset = o.longs === String ? String(m.offset) : m.offset;
                    else
                        d.offset = o.longs === String ? $util.Long.prototype.toString.call(m.offset) : o.longs === Number ? new $util.LongBits(m.offset.low >>> 0, m.offset.high >>> 0).toNumber() : m.offset;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber() : m.len;
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (typeof m.size === "number")
                        d.size = o.longs === String ? String(m.size) : m.size;
                    else
                        d.size = o.longs === String ? $util.Long.prototype.toString.call(m.size) : o.longs === Number ? new $util.LongBits(m.size.low >>> 0, m.size.high >>> 0).toNumber() : m.size;
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (typeof m.blocks === "number")
                        d.blocks = o.longs === String ? String(m.blocks) : m.blocks;
                    else
                        d.blocks = o.longs === String ? $util.Long.prototype.toString.call(m.blocks) : o.longs === Number ? new $util.LongBits(m.blocks.low >>> 0, m.blocks.high >>> 0).toNumber(true) : m.blocks;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                return d;
            };

            /**
             * Converts this F2fsFallocateFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsFallocateFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsFallocateFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsFallocateFtraceEvent;
        })();

        protos.F2fsGetDataBlockFtraceEvent = (function() {

            /**
             * Properties of a F2fsGetDataBlockFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsGetDataBlockFtraceEvent
             * @property {number|null} [dev] F2fsGetDataBlockFtraceEvent dev
             * @property {number|null} [ino] F2fsGetDataBlockFtraceEvent ino
             * @property {number|null} [iblock] F2fsGetDataBlockFtraceEvent iblock
             * @property {number|null} [bhStart] F2fsGetDataBlockFtraceEvent bhStart
             * @property {number|null} [bhSize] F2fsGetDataBlockFtraceEvent bhSize
             * @property {number|null} [ret] F2fsGetDataBlockFtraceEvent ret
             */

            /**
             * Constructs a new F2fsGetDataBlockFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsGetDataBlockFtraceEvent.
             * @implements IF2fsGetDataBlockFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsGetDataBlockFtraceEvent=} [p] Properties to set
             */
            function F2fsGetDataBlockFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsGetDataBlockFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsGetDataBlockFtraceEvent
             * @instance
             */
            F2fsGetDataBlockFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsGetDataBlockFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsGetDataBlockFtraceEvent
             * @instance
             */
            F2fsGetDataBlockFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsGetDataBlockFtraceEvent iblock.
             * @member {number} iblock
             * @memberof perfetto.protos.F2fsGetDataBlockFtraceEvent
             * @instance
             */
            F2fsGetDataBlockFtraceEvent.prototype.iblock = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsGetDataBlockFtraceEvent bhStart.
             * @member {number} bhStart
             * @memberof perfetto.protos.F2fsGetDataBlockFtraceEvent
             * @instance
             */
            F2fsGetDataBlockFtraceEvent.prototype.bhStart = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsGetDataBlockFtraceEvent bhSize.
             * @member {number} bhSize
             * @memberof perfetto.protos.F2fsGetDataBlockFtraceEvent
             * @instance
             */
            F2fsGetDataBlockFtraceEvent.prototype.bhSize = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsGetDataBlockFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.F2fsGetDataBlockFtraceEvent
             * @instance
             */
            F2fsGetDataBlockFtraceEvent.prototype.ret = 0;

            /**
             * Creates a new F2fsGetDataBlockFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsGetDataBlockFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsGetDataBlockFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsGetDataBlockFtraceEvent} F2fsGetDataBlockFtraceEvent instance
             */
            F2fsGetDataBlockFtraceEvent.create = function create(properties) {
                return new F2fsGetDataBlockFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsGetDataBlockFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsGetDataBlockFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsGetDataBlockFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsGetDataBlockFtraceEvent} m F2fsGetDataBlockFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsGetDataBlockFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.iblock != null && Object.hasOwnProperty.call(m, "iblock"))
                    w.uint32(24).uint64(m.iblock);
                if (m.bhStart != null && Object.hasOwnProperty.call(m, "bhStart"))
                    w.uint32(32).uint64(m.bhStart);
                if (m.bhSize != null && Object.hasOwnProperty.call(m, "bhSize"))
                    w.uint32(40).uint64(m.bhSize);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(48).int32(m.ret);
                return w;
            };

            /**
             * Encodes the specified F2fsGetDataBlockFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsGetDataBlockFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsGetDataBlockFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsGetDataBlockFtraceEvent} message F2fsGetDataBlockFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsGetDataBlockFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsGetDataBlockFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsGetDataBlockFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsGetDataBlockFtraceEvent} F2fsGetDataBlockFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsGetDataBlockFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsGetDataBlockFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.iblock = r.uint64();
                        break;
                    case 4:
                        m.bhStart = r.uint64();
                        break;
                    case 5:
                        m.bhSize = r.uint64();
                        break;
                    case 6:
                        m.ret = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsGetDataBlockFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsGetDataBlockFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsGetDataBlockFtraceEvent} F2fsGetDataBlockFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsGetDataBlockFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsGetDataBlockFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsGetDataBlockFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsGetDataBlockFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.iblock != null && m.hasOwnProperty("iblock")) {
                    if (!$util.isInteger(m.iblock) && !(m.iblock && $util.isInteger(m.iblock.low) && $util.isInteger(m.iblock.high)))
                        return "iblock: integer|Long expected";
                }
                if (m.bhStart != null && m.hasOwnProperty("bhStart")) {
                    if (!$util.isInteger(m.bhStart) && !(m.bhStart && $util.isInteger(m.bhStart.low) && $util.isInteger(m.bhStart.high)))
                        return "bhStart: integer|Long expected";
                }
                if (m.bhSize != null && m.hasOwnProperty("bhSize")) {
                    if (!$util.isInteger(m.bhSize) && !(m.bhSize && $util.isInteger(m.bhSize.low) && $util.isInteger(m.bhSize.high)))
                        return "bhSize: integer|Long expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsGetDataBlockFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsGetDataBlockFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsGetDataBlockFtraceEvent} F2fsGetDataBlockFtraceEvent
             */
            F2fsGetDataBlockFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsGetDataBlockFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsGetDataBlockFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.iblock != null) {
                    if ($util.Long)
                        (m.iblock = $util.Long.fromValue(d.iblock)).unsigned = true;
                    else if (typeof d.iblock === "string")
                        m.iblock = parseInt(d.iblock, 10);
                    else if (typeof d.iblock === "number")
                        m.iblock = d.iblock;
                    else if (typeof d.iblock === "object")
                        m.iblock = new $util.LongBits(d.iblock.low >>> 0, d.iblock.high >>> 0).toNumber(true);
                }
                if (d.bhStart != null) {
                    if ($util.Long)
                        (m.bhStart = $util.Long.fromValue(d.bhStart)).unsigned = true;
                    else if (typeof d.bhStart === "string")
                        m.bhStart = parseInt(d.bhStart, 10);
                    else if (typeof d.bhStart === "number")
                        m.bhStart = d.bhStart;
                    else if (typeof d.bhStart === "object")
                        m.bhStart = new $util.LongBits(d.bhStart.low >>> 0, d.bhStart.high >>> 0).toNumber(true);
                }
                if (d.bhSize != null) {
                    if ($util.Long)
                        (m.bhSize = $util.Long.fromValue(d.bhSize)).unsigned = true;
                    else if (typeof d.bhSize === "string")
                        m.bhSize = parseInt(d.bhSize, 10);
                    else if (typeof d.bhSize === "number")
                        m.bhSize = d.bhSize;
                    else if (typeof d.bhSize === "object")
                        m.bhSize = new $util.LongBits(d.bhSize.low >>> 0, d.bhSize.high >>> 0).toNumber(true);
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsGetDataBlockFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsGetDataBlockFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsGetDataBlockFtraceEvent} m F2fsGetDataBlockFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsGetDataBlockFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.iblock = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.iblock = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.bhStart = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.bhStart = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.bhSize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.bhSize = o.longs === String ? "0" : 0;
                    d.ret = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.iblock != null && m.hasOwnProperty("iblock")) {
                    if (typeof m.iblock === "number")
                        d.iblock = o.longs === String ? String(m.iblock) : m.iblock;
                    else
                        d.iblock = o.longs === String ? $util.Long.prototype.toString.call(m.iblock) : o.longs === Number ? new $util.LongBits(m.iblock.low >>> 0, m.iblock.high >>> 0).toNumber(true) : m.iblock;
                }
                if (m.bhStart != null && m.hasOwnProperty("bhStart")) {
                    if (typeof m.bhStart === "number")
                        d.bhStart = o.longs === String ? String(m.bhStart) : m.bhStart;
                    else
                        d.bhStart = o.longs === String ? $util.Long.prototype.toString.call(m.bhStart) : o.longs === Number ? new $util.LongBits(m.bhStart.low >>> 0, m.bhStart.high >>> 0).toNumber(true) : m.bhStart;
                }
                if (m.bhSize != null && m.hasOwnProperty("bhSize")) {
                    if (typeof m.bhSize === "number")
                        d.bhSize = o.longs === String ? String(m.bhSize) : m.bhSize;
                    else
                        d.bhSize = o.longs === String ? $util.Long.prototype.toString.call(m.bhSize) : o.longs === Number ? new $util.LongBits(m.bhSize.low >>> 0, m.bhSize.high >>> 0).toNumber(true) : m.bhSize;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                return d;
            };

            /**
             * Converts this F2fsGetDataBlockFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsGetDataBlockFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsGetDataBlockFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsGetDataBlockFtraceEvent;
        })();

        protos.F2fsGetVictimFtraceEvent = (function() {

            /**
             * Properties of a F2fsGetVictimFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsGetVictimFtraceEvent
             * @property {number|null} [dev] F2fsGetVictimFtraceEvent dev
             * @property {number|null} [type] F2fsGetVictimFtraceEvent type
             * @property {number|null} [gcType] F2fsGetVictimFtraceEvent gcType
             * @property {number|null} [allocMode] F2fsGetVictimFtraceEvent allocMode
             * @property {number|null} [gcMode] F2fsGetVictimFtraceEvent gcMode
             * @property {number|null} [victim] F2fsGetVictimFtraceEvent victim
             * @property {number|null} [ofsUnit] F2fsGetVictimFtraceEvent ofsUnit
             * @property {number|null} [preVictim] F2fsGetVictimFtraceEvent preVictim
             * @property {number|null} [prefree] F2fsGetVictimFtraceEvent prefree
             * @property {number|null} [free] F2fsGetVictimFtraceEvent free
             * @property {number|null} [cost] F2fsGetVictimFtraceEvent cost
             */

            /**
             * Constructs a new F2fsGetVictimFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsGetVictimFtraceEvent.
             * @implements IF2fsGetVictimFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsGetVictimFtraceEvent=} [p] Properties to set
             */
            function F2fsGetVictimFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsGetVictimFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsGetVictimFtraceEvent
             * @instance
             */
            F2fsGetVictimFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsGetVictimFtraceEvent type.
             * @member {number} type
             * @memberof perfetto.protos.F2fsGetVictimFtraceEvent
             * @instance
             */
            F2fsGetVictimFtraceEvent.prototype.type = 0;

            /**
             * F2fsGetVictimFtraceEvent gcType.
             * @member {number} gcType
             * @memberof perfetto.protos.F2fsGetVictimFtraceEvent
             * @instance
             */
            F2fsGetVictimFtraceEvent.prototype.gcType = 0;

            /**
             * F2fsGetVictimFtraceEvent allocMode.
             * @member {number} allocMode
             * @memberof perfetto.protos.F2fsGetVictimFtraceEvent
             * @instance
             */
            F2fsGetVictimFtraceEvent.prototype.allocMode = 0;

            /**
             * F2fsGetVictimFtraceEvent gcMode.
             * @member {number} gcMode
             * @memberof perfetto.protos.F2fsGetVictimFtraceEvent
             * @instance
             */
            F2fsGetVictimFtraceEvent.prototype.gcMode = 0;

            /**
             * F2fsGetVictimFtraceEvent victim.
             * @member {number} victim
             * @memberof perfetto.protos.F2fsGetVictimFtraceEvent
             * @instance
             */
            F2fsGetVictimFtraceEvent.prototype.victim = 0;

            /**
             * F2fsGetVictimFtraceEvent ofsUnit.
             * @member {number} ofsUnit
             * @memberof perfetto.protos.F2fsGetVictimFtraceEvent
             * @instance
             */
            F2fsGetVictimFtraceEvent.prototype.ofsUnit = 0;

            /**
             * F2fsGetVictimFtraceEvent preVictim.
             * @member {number} preVictim
             * @memberof perfetto.protos.F2fsGetVictimFtraceEvent
             * @instance
             */
            F2fsGetVictimFtraceEvent.prototype.preVictim = 0;

            /**
             * F2fsGetVictimFtraceEvent prefree.
             * @member {number} prefree
             * @memberof perfetto.protos.F2fsGetVictimFtraceEvent
             * @instance
             */
            F2fsGetVictimFtraceEvent.prototype.prefree = 0;

            /**
             * F2fsGetVictimFtraceEvent free.
             * @member {number} free
             * @memberof perfetto.protos.F2fsGetVictimFtraceEvent
             * @instance
             */
            F2fsGetVictimFtraceEvent.prototype.free = 0;

            /**
             * F2fsGetVictimFtraceEvent cost.
             * @member {number} cost
             * @memberof perfetto.protos.F2fsGetVictimFtraceEvent
             * @instance
             */
            F2fsGetVictimFtraceEvent.prototype.cost = 0;

            /**
             * Creates a new F2fsGetVictimFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsGetVictimFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsGetVictimFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsGetVictimFtraceEvent} F2fsGetVictimFtraceEvent instance
             */
            F2fsGetVictimFtraceEvent.create = function create(properties) {
                return new F2fsGetVictimFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsGetVictimFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsGetVictimFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsGetVictimFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsGetVictimFtraceEvent} m F2fsGetVictimFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsGetVictimFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                    w.uint32(16).int32(m.type);
                if (m.gcType != null && Object.hasOwnProperty.call(m, "gcType"))
                    w.uint32(24).int32(m.gcType);
                if (m.allocMode != null && Object.hasOwnProperty.call(m, "allocMode"))
                    w.uint32(32).int32(m.allocMode);
                if (m.gcMode != null && Object.hasOwnProperty.call(m, "gcMode"))
                    w.uint32(40).int32(m.gcMode);
                if (m.victim != null && Object.hasOwnProperty.call(m, "victim"))
                    w.uint32(48).uint32(m.victim);
                if (m.ofsUnit != null && Object.hasOwnProperty.call(m, "ofsUnit"))
                    w.uint32(56).uint32(m.ofsUnit);
                if (m.preVictim != null && Object.hasOwnProperty.call(m, "preVictim"))
                    w.uint32(64).uint32(m.preVictim);
                if (m.prefree != null && Object.hasOwnProperty.call(m, "prefree"))
                    w.uint32(72).uint32(m.prefree);
                if (m.free != null && Object.hasOwnProperty.call(m, "free"))
                    w.uint32(80).uint32(m.free);
                if (m.cost != null && Object.hasOwnProperty.call(m, "cost"))
                    w.uint32(88).uint32(m.cost);
                return w;
            };

            /**
             * Encodes the specified F2fsGetVictimFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsGetVictimFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsGetVictimFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsGetVictimFtraceEvent} message F2fsGetVictimFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsGetVictimFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsGetVictimFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsGetVictimFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsGetVictimFtraceEvent} F2fsGetVictimFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsGetVictimFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsGetVictimFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.type = r.int32();
                        break;
                    case 3:
                        m.gcType = r.int32();
                        break;
                    case 4:
                        m.allocMode = r.int32();
                        break;
                    case 5:
                        m.gcMode = r.int32();
                        break;
                    case 6:
                        m.victim = r.uint32();
                        break;
                    case 7:
                        m.ofsUnit = r.uint32();
                        break;
                    case 8:
                        m.preVictim = r.uint32();
                        break;
                    case 9:
                        m.prefree = r.uint32();
                        break;
                    case 10:
                        m.free = r.uint32();
                        break;
                    case 11:
                        m.cost = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsGetVictimFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsGetVictimFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsGetVictimFtraceEvent} F2fsGetVictimFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsGetVictimFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsGetVictimFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsGetVictimFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsGetVictimFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    if (!$util.isInteger(m.type))
                        return "type: integer expected";
                }
                if (m.gcType != null && m.hasOwnProperty("gcType")) {
                    if (!$util.isInteger(m.gcType))
                        return "gcType: integer expected";
                }
                if (m.allocMode != null && m.hasOwnProperty("allocMode")) {
                    if (!$util.isInteger(m.allocMode))
                        return "allocMode: integer expected";
                }
                if (m.gcMode != null && m.hasOwnProperty("gcMode")) {
                    if (!$util.isInteger(m.gcMode))
                        return "gcMode: integer expected";
                }
                if (m.victim != null && m.hasOwnProperty("victim")) {
                    if (!$util.isInteger(m.victim))
                        return "victim: integer expected";
                }
                if (m.ofsUnit != null && m.hasOwnProperty("ofsUnit")) {
                    if (!$util.isInteger(m.ofsUnit))
                        return "ofsUnit: integer expected";
                }
                if (m.preVictim != null && m.hasOwnProperty("preVictim")) {
                    if (!$util.isInteger(m.preVictim))
                        return "preVictim: integer expected";
                }
                if (m.prefree != null && m.hasOwnProperty("prefree")) {
                    if (!$util.isInteger(m.prefree))
                        return "prefree: integer expected";
                }
                if (m.free != null && m.hasOwnProperty("free")) {
                    if (!$util.isInteger(m.free))
                        return "free: integer expected";
                }
                if (m.cost != null && m.hasOwnProperty("cost")) {
                    if (!$util.isInteger(m.cost))
                        return "cost: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsGetVictimFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsGetVictimFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsGetVictimFtraceEvent} F2fsGetVictimFtraceEvent
             */
            F2fsGetVictimFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsGetVictimFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsGetVictimFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.type != null) {
                    m.type = d.type | 0;
                }
                if (d.gcType != null) {
                    m.gcType = d.gcType | 0;
                }
                if (d.allocMode != null) {
                    m.allocMode = d.allocMode | 0;
                }
                if (d.gcMode != null) {
                    m.gcMode = d.gcMode | 0;
                }
                if (d.victim != null) {
                    m.victim = d.victim >>> 0;
                }
                if (d.ofsUnit != null) {
                    m.ofsUnit = d.ofsUnit >>> 0;
                }
                if (d.preVictim != null) {
                    m.preVictim = d.preVictim >>> 0;
                }
                if (d.prefree != null) {
                    m.prefree = d.prefree >>> 0;
                }
                if (d.free != null) {
                    m.free = d.free >>> 0;
                }
                if (d.cost != null) {
                    m.cost = d.cost >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsGetVictimFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsGetVictimFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsGetVictimFtraceEvent} m F2fsGetVictimFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsGetVictimFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    d.type = 0;
                    d.gcType = 0;
                    d.allocMode = 0;
                    d.gcMode = 0;
                    d.victim = 0;
                    d.ofsUnit = 0;
                    d.preVictim = 0;
                    d.prefree = 0;
                    d.free = 0;
                    d.cost = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    d.type = m.type;
                }
                if (m.gcType != null && m.hasOwnProperty("gcType")) {
                    d.gcType = m.gcType;
                }
                if (m.allocMode != null && m.hasOwnProperty("allocMode")) {
                    d.allocMode = m.allocMode;
                }
                if (m.gcMode != null && m.hasOwnProperty("gcMode")) {
                    d.gcMode = m.gcMode;
                }
                if (m.victim != null && m.hasOwnProperty("victim")) {
                    d.victim = m.victim;
                }
                if (m.ofsUnit != null && m.hasOwnProperty("ofsUnit")) {
                    d.ofsUnit = m.ofsUnit;
                }
                if (m.preVictim != null && m.hasOwnProperty("preVictim")) {
                    d.preVictim = m.preVictim;
                }
                if (m.prefree != null && m.hasOwnProperty("prefree")) {
                    d.prefree = m.prefree;
                }
                if (m.free != null && m.hasOwnProperty("free")) {
                    d.free = m.free;
                }
                if (m.cost != null && m.hasOwnProperty("cost")) {
                    d.cost = m.cost;
                }
                return d;
            };

            /**
             * Converts this F2fsGetVictimFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsGetVictimFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsGetVictimFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsGetVictimFtraceEvent;
        })();

        protos.F2fsIgetFtraceEvent = (function() {

            /**
             * Properties of a F2fsIgetFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsIgetFtraceEvent
             * @property {number|null} [dev] F2fsIgetFtraceEvent dev
             * @property {number|null} [ino] F2fsIgetFtraceEvent ino
             * @property {number|null} [pino] F2fsIgetFtraceEvent pino
             * @property {number|null} [mode] F2fsIgetFtraceEvent mode
             * @property {number|null} [size] F2fsIgetFtraceEvent size
             * @property {number|null} [nlink] F2fsIgetFtraceEvent nlink
             * @property {number|null} [blocks] F2fsIgetFtraceEvent blocks
             * @property {number|null} [advise] F2fsIgetFtraceEvent advise
             */

            /**
             * Constructs a new F2fsIgetFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsIgetFtraceEvent.
             * @implements IF2fsIgetFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsIgetFtraceEvent=} [p] Properties to set
             */
            function F2fsIgetFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsIgetFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsIgetFtraceEvent
             * @instance
             */
            F2fsIgetFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIgetFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsIgetFtraceEvent
             * @instance
             */
            F2fsIgetFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIgetFtraceEvent pino.
             * @member {number} pino
             * @memberof perfetto.protos.F2fsIgetFtraceEvent
             * @instance
             */
            F2fsIgetFtraceEvent.prototype.pino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIgetFtraceEvent mode.
             * @member {number} mode
             * @memberof perfetto.protos.F2fsIgetFtraceEvent
             * @instance
             */
            F2fsIgetFtraceEvent.prototype.mode = 0;

            /**
             * F2fsIgetFtraceEvent size.
             * @member {number} size
             * @memberof perfetto.protos.F2fsIgetFtraceEvent
             * @instance
             */
            F2fsIgetFtraceEvent.prototype.size = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * F2fsIgetFtraceEvent nlink.
             * @member {number} nlink
             * @memberof perfetto.protos.F2fsIgetFtraceEvent
             * @instance
             */
            F2fsIgetFtraceEvent.prototype.nlink = 0;

            /**
             * F2fsIgetFtraceEvent blocks.
             * @member {number} blocks
             * @memberof perfetto.protos.F2fsIgetFtraceEvent
             * @instance
             */
            F2fsIgetFtraceEvent.prototype.blocks = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIgetFtraceEvent advise.
             * @member {number} advise
             * @memberof perfetto.protos.F2fsIgetFtraceEvent
             * @instance
             */
            F2fsIgetFtraceEvent.prototype.advise = 0;

            /**
             * Creates a new F2fsIgetFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsIgetFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsIgetFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsIgetFtraceEvent} F2fsIgetFtraceEvent instance
             */
            F2fsIgetFtraceEvent.create = function create(properties) {
                return new F2fsIgetFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsIgetFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsIgetFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsIgetFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsIgetFtraceEvent} m F2fsIgetFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsIgetFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.pino != null && Object.hasOwnProperty.call(m, "pino"))
                    w.uint32(24).uint64(m.pino);
                if (m.mode != null && Object.hasOwnProperty.call(m, "mode"))
                    w.uint32(32).uint32(m.mode);
                if (m.size != null && Object.hasOwnProperty.call(m, "size"))
                    w.uint32(40).int64(m.size);
                if (m.nlink != null && Object.hasOwnProperty.call(m, "nlink"))
                    w.uint32(48).uint32(m.nlink);
                if (m.blocks != null && Object.hasOwnProperty.call(m, "blocks"))
                    w.uint32(56).uint64(m.blocks);
                if (m.advise != null && Object.hasOwnProperty.call(m, "advise"))
                    w.uint32(64).uint32(m.advise);
                return w;
            };

            /**
             * Encodes the specified F2fsIgetFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsIgetFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsIgetFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsIgetFtraceEvent} message F2fsIgetFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsIgetFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsIgetFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsIgetFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsIgetFtraceEvent} F2fsIgetFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsIgetFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsIgetFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.pino = r.uint64();
                        break;
                    case 4:
                        m.mode = r.uint32();
                        break;
                    case 5:
                        m.size = r.int64();
                        break;
                    case 6:
                        m.nlink = r.uint32();
                        break;
                    case 7:
                        m.blocks = r.uint64();
                        break;
                    case 8:
                        m.advise = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsIgetFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsIgetFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsIgetFtraceEvent} F2fsIgetFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsIgetFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsIgetFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsIgetFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsIgetFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.pino != null && m.hasOwnProperty("pino")) {
                    if (!$util.isInteger(m.pino) && !(m.pino && $util.isInteger(m.pino.low) && $util.isInteger(m.pino.high)))
                        return "pino: integer|Long expected";
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    if (!$util.isInteger(m.mode))
                        return "mode: integer expected";
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (!$util.isInteger(m.size) && !(m.size && $util.isInteger(m.size.low) && $util.isInteger(m.size.high)))
                        return "size: integer|Long expected";
                }
                if (m.nlink != null && m.hasOwnProperty("nlink")) {
                    if (!$util.isInteger(m.nlink))
                        return "nlink: integer expected";
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (!$util.isInteger(m.blocks) && !(m.blocks && $util.isInteger(m.blocks.low) && $util.isInteger(m.blocks.high)))
                        return "blocks: integer|Long expected";
                }
                if (m.advise != null && m.hasOwnProperty("advise")) {
                    if (!$util.isInteger(m.advise))
                        return "advise: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsIgetFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsIgetFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsIgetFtraceEvent} F2fsIgetFtraceEvent
             */
            F2fsIgetFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsIgetFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsIgetFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.pino != null) {
                    if ($util.Long)
                        (m.pino = $util.Long.fromValue(d.pino)).unsigned = true;
                    else if (typeof d.pino === "string")
                        m.pino = parseInt(d.pino, 10);
                    else if (typeof d.pino === "number")
                        m.pino = d.pino;
                    else if (typeof d.pino === "object")
                        m.pino = new $util.LongBits(d.pino.low >>> 0, d.pino.high >>> 0).toNumber(true);
                }
                if (d.mode != null) {
                    m.mode = d.mode >>> 0;
                }
                if (d.size != null) {
                    if ($util.Long)
                        (m.size = $util.Long.fromValue(d.size)).unsigned = false;
                    else if (typeof d.size === "string")
                        m.size = parseInt(d.size, 10);
                    else if (typeof d.size === "number")
                        m.size = d.size;
                    else if (typeof d.size === "object")
                        m.size = new $util.LongBits(d.size.low >>> 0, d.size.high >>> 0).toNumber();
                }
                if (d.nlink != null) {
                    m.nlink = d.nlink >>> 0;
                }
                if (d.blocks != null) {
                    if ($util.Long)
                        (m.blocks = $util.Long.fromValue(d.blocks)).unsigned = true;
                    else if (typeof d.blocks === "string")
                        m.blocks = parseInt(d.blocks, 10);
                    else if (typeof d.blocks === "number")
                        m.blocks = d.blocks;
                    else if (typeof d.blocks === "object")
                        m.blocks = new $util.LongBits(d.blocks.low >>> 0, d.blocks.high >>> 0).toNumber(true);
                }
                if (d.advise != null) {
                    m.advise = d.advise >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsIgetFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsIgetFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsIgetFtraceEvent} m F2fsIgetFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsIgetFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pino = o.longs === String ? "0" : 0;
                    d.mode = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.size = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.size = o.longs === String ? "0" : 0;
                    d.nlink = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.blocks = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.blocks = o.longs === String ? "0" : 0;
                    d.advise = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.pino != null && m.hasOwnProperty("pino")) {
                    if (typeof m.pino === "number")
                        d.pino = o.longs === String ? String(m.pino) : m.pino;
                    else
                        d.pino = o.longs === String ? $util.Long.prototype.toString.call(m.pino) : o.longs === Number ? new $util.LongBits(m.pino.low >>> 0, m.pino.high >>> 0).toNumber(true) : m.pino;
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    d.mode = m.mode;
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (typeof m.size === "number")
                        d.size = o.longs === String ? String(m.size) : m.size;
                    else
                        d.size = o.longs === String ? $util.Long.prototype.toString.call(m.size) : o.longs === Number ? new $util.LongBits(m.size.low >>> 0, m.size.high >>> 0).toNumber() : m.size;
                }
                if (m.nlink != null && m.hasOwnProperty("nlink")) {
                    d.nlink = m.nlink;
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (typeof m.blocks === "number")
                        d.blocks = o.longs === String ? String(m.blocks) : m.blocks;
                    else
                        d.blocks = o.longs === String ? $util.Long.prototype.toString.call(m.blocks) : o.longs === Number ? new $util.LongBits(m.blocks.low >>> 0, m.blocks.high >>> 0).toNumber(true) : m.blocks;
                }
                if (m.advise != null && m.hasOwnProperty("advise")) {
                    d.advise = m.advise;
                }
                return d;
            };

            /**
             * Converts this F2fsIgetFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsIgetFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsIgetFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsIgetFtraceEvent;
        })();

        protos.F2fsIgetExitFtraceEvent = (function() {

            /**
             * Properties of a F2fsIgetExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsIgetExitFtraceEvent
             * @property {number|null} [dev] F2fsIgetExitFtraceEvent dev
             * @property {number|null} [ino] F2fsIgetExitFtraceEvent ino
             * @property {number|null} [ret] F2fsIgetExitFtraceEvent ret
             */

            /**
             * Constructs a new F2fsIgetExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsIgetExitFtraceEvent.
             * @implements IF2fsIgetExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsIgetExitFtraceEvent=} [p] Properties to set
             */
            function F2fsIgetExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsIgetExitFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsIgetExitFtraceEvent
             * @instance
             */
            F2fsIgetExitFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIgetExitFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsIgetExitFtraceEvent
             * @instance
             */
            F2fsIgetExitFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIgetExitFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.F2fsIgetExitFtraceEvent
             * @instance
             */
            F2fsIgetExitFtraceEvent.prototype.ret = 0;

            /**
             * Creates a new F2fsIgetExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsIgetExitFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsIgetExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsIgetExitFtraceEvent} F2fsIgetExitFtraceEvent instance
             */
            F2fsIgetExitFtraceEvent.create = function create(properties) {
                return new F2fsIgetExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsIgetExitFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsIgetExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsIgetExitFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsIgetExitFtraceEvent} m F2fsIgetExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsIgetExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(24).int32(m.ret);
                return w;
            };

            /**
             * Encodes the specified F2fsIgetExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsIgetExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsIgetExitFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsIgetExitFtraceEvent} message F2fsIgetExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsIgetExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsIgetExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsIgetExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsIgetExitFtraceEvent} F2fsIgetExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsIgetExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsIgetExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.ret = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsIgetExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsIgetExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsIgetExitFtraceEvent} F2fsIgetExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsIgetExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsIgetExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsIgetExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsIgetExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsIgetExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsIgetExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsIgetExitFtraceEvent} F2fsIgetExitFtraceEvent
             */
            F2fsIgetExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsIgetExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsIgetExitFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsIgetExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsIgetExitFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsIgetExitFtraceEvent} m F2fsIgetExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsIgetExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.ret = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                return d;
            };

            /**
             * Converts this F2fsIgetExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsIgetExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsIgetExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsIgetExitFtraceEvent;
        })();

        protos.F2fsNewInodeFtraceEvent = (function() {

            /**
             * Properties of a F2fsNewInodeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsNewInodeFtraceEvent
             * @property {number|null} [dev] F2fsNewInodeFtraceEvent dev
             * @property {number|null} [ino] F2fsNewInodeFtraceEvent ino
             * @property {number|null} [ret] F2fsNewInodeFtraceEvent ret
             */

            /**
             * Constructs a new F2fsNewInodeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsNewInodeFtraceEvent.
             * @implements IF2fsNewInodeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsNewInodeFtraceEvent=} [p] Properties to set
             */
            function F2fsNewInodeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsNewInodeFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsNewInodeFtraceEvent
             * @instance
             */
            F2fsNewInodeFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsNewInodeFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsNewInodeFtraceEvent
             * @instance
             */
            F2fsNewInodeFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsNewInodeFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.F2fsNewInodeFtraceEvent
             * @instance
             */
            F2fsNewInodeFtraceEvent.prototype.ret = 0;

            /**
             * Creates a new F2fsNewInodeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsNewInodeFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsNewInodeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsNewInodeFtraceEvent} F2fsNewInodeFtraceEvent instance
             */
            F2fsNewInodeFtraceEvent.create = function create(properties) {
                return new F2fsNewInodeFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsNewInodeFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsNewInodeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsNewInodeFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsNewInodeFtraceEvent} m F2fsNewInodeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsNewInodeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(24).int32(m.ret);
                return w;
            };

            /**
             * Encodes the specified F2fsNewInodeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsNewInodeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsNewInodeFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsNewInodeFtraceEvent} message F2fsNewInodeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsNewInodeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsNewInodeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsNewInodeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsNewInodeFtraceEvent} F2fsNewInodeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsNewInodeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsNewInodeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.ret = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsNewInodeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsNewInodeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsNewInodeFtraceEvent} F2fsNewInodeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsNewInodeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsNewInodeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsNewInodeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsNewInodeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsNewInodeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsNewInodeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsNewInodeFtraceEvent} F2fsNewInodeFtraceEvent
             */
            F2fsNewInodeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsNewInodeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsNewInodeFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsNewInodeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsNewInodeFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsNewInodeFtraceEvent} m F2fsNewInodeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsNewInodeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.ret = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                return d;
            };

            /**
             * Converts this F2fsNewInodeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsNewInodeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsNewInodeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsNewInodeFtraceEvent;
        })();

        protos.F2fsReadpageFtraceEvent = (function() {

            /**
             * Properties of a F2fsReadpageFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsReadpageFtraceEvent
             * @property {number|null} [dev] F2fsReadpageFtraceEvent dev
             * @property {number|null} [ino] F2fsReadpageFtraceEvent ino
             * @property {number|null} [index] F2fsReadpageFtraceEvent index
             * @property {number|null} [blkaddr] F2fsReadpageFtraceEvent blkaddr
             * @property {number|null} [type] F2fsReadpageFtraceEvent type
             * @property {number|null} [dir] F2fsReadpageFtraceEvent dir
             * @property {number|null} [dirty] F2fsReadpageFtraceEvent dirty
             * @property {number|null} [uptodate] F2fsReadpageFtraceEvent uptodate
             */

            /**
             * Constructs a new F2fsReadpageFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsReadpageFtraceEvent.
             * @implements IF2fsReadpageFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsReadpageFtraceEvent=} [p] Properties to set
             */
            function F2fsReadpageFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsReadpageFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsReadpageFtraceEvent
             * @instance
             */
            F2fsReadpageFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsReadpageFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsReadpageFtraceEvent
             * @instance
             */
            F2fsReadpageFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsReadpageFtraceEvent index.
             * @member {number} index
             * @memberof perfetto.protos.F2fsReadpageFtraceEvent
             * @instance
             */
            F2fsReadpageFtraceEvent.prototype.index = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsReadpageFtraceEvent blkaddr.
             * @member {number} blkaddr
             * @memberof perfetto.protos.F2fsReadpageFtraceEvent
             * @instance
             */
            F2fsReadpageFtraceEvent.prototype.blkaddr = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsReadpageFtraceEvent type.
             * @member {number} type
             * @memberof perfetto.protos.F2fsReadpageFtraceEvent
             * @instance
             */
            F2fsReadpageFtraceEvent.prototype.type = 0;

            /**
             * F2fsReadpageFtraceEvent dir.
             * @member {number} dir
             * @memberof perfetto.protos.F2fsReadpageFtraceEvent
             * @instance
             */
            F2fsReadpageFtraceEvent.prototype.dir = 0;

            /**
             * F2fsReadpageFtraceEvent dirty.
             * @member {number} dirty
             * @memberof perfetto.protos.F2fsReadpageFtraceEvent
             * @instance
             */
            F2fsReadpageFtraceEvent.prototype.dirty = 0;

            /**
             * F2fsReadpageFtraceEvent uptodate.
             * @member {number} uptodate
             * @memberof perfetto.protos.F2fsReadpageFtraceEvent
             * @instance
             */
            F2fsReadpageFtraceEvent.prototype.uptodate = 0;

            /**
             * Creates a new F2fsReadpageFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsReadpageFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsReadpageFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsReadpageFtraceEvent} F2fsReadpageFtraceEvent instance
             */
            F2fsReadpageFtraceEvent.create = function create(properties) {
                return new F2fsReadpageFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsReadpageFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsReadpageFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsReadpageFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsReadpageFtraceEvent} m F2fsReadpageFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsReadpageFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.index != null && Object.hasOwnProperty.call(m, "index"))
                    w.uint32(24).uint64(m.index);
                if (m.blkaddr != null && Object.hasOwnProperty.call(m, "blkaddr"))
                    w.uint32(32).uint64(m.blkaddr);
                if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                    w.uint32(40).int32(m.type);
                if (m.dir != null && Object.hasOwnProperty.call(m, "dir"))
                    w.uint32(48).int32(m.dir);
                if (m.dirty != null && Object.hasOwnProperty.call(m, "dirty"))
                    w.uint32(56).int32(m.dirty);
                if (m.uptodate != null && Object.hasOwnProperty.call(m, "uptodate"))
                    w.uint32(64).int32(m.uptodate);
                return w;
            };

            /**
             * Encodes the specified F2fsReadpageFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsReadpageFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsReadpageFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsReadpageFtraceEvent} message F2fsReadpageFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsReadpageFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsReadpageFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsReadpageFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsReadpageFtraceEvent} F2fsReadpageFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsReadpageFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsReadpageFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.index = r.uint64();
                        break;
                    case 4:
                        m.blkaddr = r.uint64();
                        break;
                    case 5:
                        m.type = r.int32();
                        break;
                    case 6:
                        m.dir = r.int32();
                        break;
                    case 7:
                        m.dirty = r.int32();
                        break;
                    case 8:
                        m.uptodate = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsReadpageFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsReadpageFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsReadpageFtraceEvent} F2fsReadpageFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsReadpageFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsReadpageFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsReadpageFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsReadpageFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (!$util.isInteger(m.index) && !(m.index && $util.isInteger(m.index.low) && $util.isInteger(m.index.high)))
                        return "index: integer|Long expected";
                }
                if (m.blkaddr != null && m.hasOwnProperty("blkaddr")) {
                    if (!$util.isInteger(m.blkaddr) && !(m.blkaddr && $util.isInteger(m.blkaddr.low) && $util.isInteger(m.blkaddr.high)))
                        return "blkaddr: integer|Long expected";
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    if (!$util.isInteger(m.type))
                        return "type: integer expected";
                }
                if (m.dir != null && m.hasOwnProperty("dir")) {
                    if (!$util.isInteger(m.dir))
                        return "dir: integer expected";
                }
                if (m.dirty != null && m.hasOwnProperty("dirty")) {
                    if (!$util.isInteger(m.dirty))
                        return "dirty: integer expected";
                }
                if (m.uptodate != null && m.hasOwnProperty("uptodate")) {
                    if (!$util.isInteger(m.uptodate))
                        return "uptodate: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsReadpageFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsReadpageFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsReadpageFtraceEvent} F2fsReadpageFtraceEvent
             */
            F2fsReadpageFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsReadpageFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsReadpageFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.index != null) {
                    if ($util.Long)
                        (m.index = $util.Long.fromValue(d.index)).unsigned = true;
                    else if (typeof d.index === "string")
                        m.index = parseInt(d.index, 10);
                    else if (typeof d.index === "number")
                        m.index = d.index;
                    else if (typeof d.index === "object")
                        m.index = new $util.LongBits(d.index.low >>> 0, d.index.high >>> 0).toNumber(true);
                }
                if (d.blkaddr != null) {
                    if ($util.Long)
                        (m.blkaddr = $util.Long.fromValue(d.blkaddr)).unsigned = true;
                    else if (typeof d.blkaddr === "string")
                        m.blkaddr = parseInt(d.blkaddr, 10);
                    else if (typeof d.blkaddr === "number")
                        m.blkaddr = d.blkaddr;
                    else if (typeof d.blkaddr === "object")
                        m.blkaddr = new $util.LongBits(d.blkaddr.low >>> 0, d.blkaddr.high >>> 0).toNumber(true);
                }
                if (d.type != null) {
                    m.type = d.type | 0;
                }
                if (d.dir != null) {
                    m.dir = d.dir | 0;
                }
                if (d.dirty != null) {
                    m.dirty = d.dirty | 0;
                }
                if (d.uptodate != null) {
                    m.uptodate = d.uptodate | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsReadpageFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsReadpageFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsReadpageFtraceEvent} m F2fsReadpageFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsReadpageFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.index = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.index = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.blkaddr = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.blkaddr = o.longs === String ? "0" : 0;
                    d.type = 0;
                    d.dir = 0;
                    d.dirty = 0;
                    d.uptodate = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (typeof m.index === "number")
                        d.index = o.longs === String ? String(m.index) : m.index;
                    else
                        d.index = o.longs === String ? $util.Long.prototype.toString.call(m.index) : o.longs === Number ? new $util.LongBits(m.index.low >>> 0, m.index.high >>> 0).toNumber(true) : m.index;
                }
                if (m.blkaddr != null && m.hasOwnProperty("blkaddr")) {
                    if (typeof m.blkaddr === "number")
                        d.blkaddr = o.longs === String ? String(m.blkaddr) : m.blkaddr;
                    else
                        d.blkaddr = o.longs === String ? $util.Long.prototype.toString.call(m.blkaddr) : o.longs === Number ? new $util.LongBits(m.blkaddr.low >>> 0, m.blkaddr.high >>> 0).toNumber(true) : m.blkaddr;
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    d.type = m.type;
                }
                if (m.dir != null && m.hasOwnProperty("dir")) {
                    d.dir = m.dir;
                }
                if (m.dirty != null && m.hasOwnProperty("dirty")) {
                    d.dirty = m.dirty;
                }
                if (m.uptodate != null && m.hasOwnProperty("uptodate")) {
                    d.uptodate = m.uptodate;
                }
                return d;
            };

            /**
             * Converts this F2fsReadpageFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsReadpageFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsReadpageFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsReadpageFtraceEvent;
        })();

        protos.F2fsReserveNewBlockFtraceEvent = (function() {

            /**
             * Properties of a F2fsReserveNewBlockFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsReserveNewBlockFtraceEvent
             * @property {number|null} [dev] F2fsReserveNewBlockFtraceEvent dev
             * @property {number|null} [nid] F2fsReserveNewBlockFtraceEvent nid
             * @property {number|null} [ofsInNode] F2fsReserveNewBlockFtraceEvent ofsInNode
             */

            /**
             * Constructs a new F2fsReserveNewBlockFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsReserveNewBlockFtraceEvent.
             * @implements IF2fsReserveNewBlockFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsReserveNewBlockFtraceEvent=} [p] Properties to set
             */
            function F2fsReserveNewBlockFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsReserveNewBlockFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsReserveNewBlockFtraceEvent
             * @instance
             */
            F2fsReserveNewBlockFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsReserveNewBlockFtraceEvent nid.
             * @member {number} nid
             * @memberof perfetto.protos.F2fsReserveNewBlockFtraceEvent
             * @instance
             */
            F2fsReserveNewBlockFtraceEvent.prototype.nid = 0;

            /**
             * F2fsReserveNewBlockFtraceEvent ofsInNode.
             * @member {number} ofsInNode
             * @memberof perfetto.protos.F2fsReserveNewBlockFtraceEvent
             * @instance
             */
            F2fsReserveNewBlockFtraceEvent.prototype.ofsInNode = 0;

            /**
             * Creates a new F2fsReserveNewBlockFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsReserveNewBlockFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsReserveNewBlockFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsReserveNewBlockFtraceEvent} F2fsReserveNewBlockFtraceEvent instance
             */
            F2fsReserveNewBlockFtraceEvent.create = function create(properties) {
                return new F2fsReserveNewBlockFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsReserveNewBlockFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsReserveNewBlockFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsReserveNewBlockFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsReserveNewBlockFtraceEvent} m F2fsReserveNewBlockFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsReserveNewBlockFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.nid != null && Object.hasOwnProperty.call(m, "nid"))
                    w.uint32(16).uint32(m.nid);
                if (m.ofsInNode != null && Object.hasOwnProperty.call(m, "ofsInNode"))
                    w.uint32(24).uint32(m.ofsInNode);
                return w;
            };

            /**
             * Encodes the specified F2fsReserveNewBlockFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsReserveNewBlockFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsReserveNewBlockFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsReserveNewBlockFtraceEvent} message F2fsReserveNewBlockFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsReserveNewBlockFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsReserveNewBlockFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsReserveNewBlockFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsReserveNewBlockFtraceEvent} F2fsReserveNewBlockFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsReserveNewBlockFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsReserveNewBlockFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.nid = r.uint32();
                        break;
                    case 3:
                        m.ofsInNode = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsReserveNewBlockFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsReserveNewBlockFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsReserveNewBlockFtraceEvent} F2fsReserveNewBlockFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsReserveNewBlockFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsReserveNewBlockFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsReserveNewBlockFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsReserveNewBlockFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    if (!$util.isInteger(m.nid))
                        return "nid: integer expected";
                }
                if (m.ofsInNode != null && m.hasOwnProperty("ofsInNode")) {
                    if (!$util.isInteger(m.ofsInNode))
                        return "ofsInNode: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsReserveNewBlockFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsReserveNewBlockFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsReserveNewBlockFtraceEvent} F2fsReserveNewBlockFtraceEvent
             */
            F2fsReserveNewBlockFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsReserveNewBlockFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsReserveNewBlockFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.nid != null) {
                    m.nid = d.nid >>> 0;
                }
                if (d.ofsInNode != null) {
                    m.ofsInNode = d.ofsInNode >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsReserveNewBlockFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsReserveNewBlockFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsReserveNewBlockFtraceEvent} m F2fsReserveNewBlockFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsReserveNewBlockFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    d.nid = 0;
                    d.ofsInNode = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    d.nid = m.nid;
                }
                if (m.ofsInNode != null && m.hasOwnProperty("ofsInNode")) {
                    d.ofsInNode = m.ofsInNode;
                }
                return d;
            };

            /**
             * Converts this F2fsReserveNewBlockFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsReserveNewBlockFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsReserveNewBlockFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsReserveNewBlockFtraceEvent;
        })();

        protos.F2fsSetPageDirtyFtraceEvent = (function() {

            /**
             * Properties of a F2fsSetPageDirtyFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsSetPageDirtyFtraceEvent
             * @property {number|null} [dev] F2fsSetPageDirtyFtraceEvent dev
             * @property {number|null} [ino] F2fsSetPageDirtyFtraceEvent ino
             * @property {number|null} [type] F2fsSetPageDirtyFtraceEvent type
             * @property {number|null} [dir] F2fsSetPageDirtyFtraceEvent dir
             * @property {number|null} [index] F2fsSetPageDirtyFtraceEvent index
             * @property {number|null} [dirty] F2fsSetPageDirtyFtraceEvent dirty
             * @property {number|null} [uptodate] F2fsSetPageDirtyFtraceEvent uptodate
             */

            /**
             * Constructs a new F2fsSetPageDirtyFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsSetPageDirtyFtraceEvent.
             * @implements IF2fsSetPageDirtyFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsSetPageDirtyFtraceEvent=} [p] Properties to set
             */
            function F2fsSetPageDirtyFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsSetPageDirtyFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsSetPageDirtyFtraceEvent
             * @instance
             */
            F2fsSetPageDirtyFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsSetPageDirtyFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsSetPageDirtyFtraceEvent
             * @instance
             */
            F2fsSetPageDirtyFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsSetPageDirtyFtraceEvent type.
             * @member {number} type
             * @memberof perfetto.protos.F2fsSetPageDirtyFtraceEvent
             * @instance
             */
            F2fsSetPageDirtyFtraceEvent.prototype.type = 0;

            /**
             * F2fsSetPageDirtyFtraceEvent dir.
             * @member {number} dir
             * @memberof perfetto.protos.F2fsSetPageDirtyFtraceEvent
             * @instance
             */
            F2fsSetPageDirtyFtraceEvent.prototype.dir = 0;

            /**
             * F2fsSetPageDirtyFtraceEvent index.
             * @member {number} index
             * @memberof perfetto.protos.F2fsSetPageDirtyFtraceEvent
             * @instance
             */
            F2fsSetPageDirtyFtraceEvent.prototype.index = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsSetPageDirtyFtraceEvent dirty.
             * @member {number} dirty
             * @memberof perfetto.protos.F2fsSetPageDirtyFtraceEvent
             * @instance
             */
            F2fsSetPageDirtyFtraceEvent.prototype.dirty = 0;

            /**
             * F2fsSetPageDirtyFtraceEvent uptodate.
             * @member {number} uptodate
             * @memberof perfetto.protos.F2fsSetPageDirtyFtraceEvent
             * @instance
             */
            F2fsSetPageDirtyFtraceEvent.prototype.uptodate = 0;

            /**
             * Creates a new F2fsSetPageDirtyFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsSetPageDirtyFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsSetPageDirtyFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsSetPageDirtyFtraceEvent} F2fsSetPageDirtyFtraceEvent instance
             */
            F2fsSetPageDirtyFtraceEvent.create = function create(properties) {
                return new F2fsSetPageDirtyFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsSetPageDirtyFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsSetPageDirtyFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsSetPageDirtyFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsSetPageDirtyFtraceEvent} m F2fsSetPageDirtyFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsSetPageDirtyFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                    w.uint32(24).int32(m.type);
                if (m.dir != null && Object.hasOwnProperty.call(m, "dir"))
                    w.uint32(32).int32(m.dir);
                if (m.index != null && Object.hasOwnProperty.call(m, "index"))
                    w.uint32(40).uint64(m.index);
                if (m.dirty != null && Object.hasOwnProperty.call(m, "dirty"))
                    w.uint32(48).int32(m.dirty);
                if (m.uptodate != null && Object.hasOwnProperty.call(m, "uptodate"))
                    w.uint32(56).int32(m.uptodate);
                return w;
            };

            /**
             * Encodes the specified F2fsSetPageDirtyFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsSetPageDirtyFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsSetPageDirtyFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsSetPageDirtyFtraceEvent} message F2fsSetPageDirtyFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsSetPageDirtyFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsSetPageDirtyFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsSetPageDirtyFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsSetPageDirtyFtraceEvent} F2fsSetPageDirtyFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsSetPageDirtyFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsSetPageDirtyFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.type = r.int32();
                        break;
                    case 4:
                        m.dir = r.int32();
                        break;
                    case 5:
                        m.index = r.uint64();
                        break;
                    case 6:
                        m.dirty = r.int32();
                        break;
                    case 7:
                        m.uptodate = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsSetPageDirtyFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsSetPageDirtyFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsSetPageDirtyFtraceEvent} F2fsSetPageDirtyFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsSetPageDirtyFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsSetPageDirtyFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsSetPageDirtyFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsSetPageDirtyFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    if (!$util.isInteger(m.type))
                        return "type: integer expected";
                }
                if (m.dir != null && m.hasOwnProperty("dir")) {
                    if (!$util.isInteger(m.dir))
                        return "dir: integer expected";
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (!$util.isInteger(m.index) && !(m.index && $util.isInteger(m.index.low) && $util.isInteger(m.index.high)))
                        return "index: integer|Long expected";
                }
                if (m.dirty != null && m.hasOwnProperty("dirty")) {
                    if (!$util.isInteger(m.dirty))
                        return "dirty: integer expected";
                }
                if (m.uptodate != null && m.hasOwnProperty("uptodate")) {
                    if (!$util.isInteger(m.uptodate))
                        return "uptodate: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsSetPageDirtyFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsSetPageDirtyFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsSetPageDirtyFtraceEvent} F2fsSetPageDirtyFtraceEvent
             */
            F2fsSetPageDirtyFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsSetPageDirtyFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsSetPageDirtyFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.type != null) {
                    m.type = d.type | 0;
                }
                if (d.dir != null) {
                    m.dir = d.dir | 0;
                }
                if (d.index != null) {
                    if ($util.Long)
                        (m.index = $util.Long.fromValue(d.index)).unsigned = true;
                    else if (typeof d.index === "string")
                        m.index = parseInt(d.index, 10);
                    else if (typeof d.index === "number")
                        m.index = d.index;
                    else if (typeof d.index === "object")
                        m.index = new $util.LongBits(d.index.low >>> 0, d.index.high >>> 0).toNumber(true);
                }
                if (d.dirty != null) {
                    m.dirty = d.dirty | 0;
                }
                if (d.uptodate != null) {
                    m.uptodate = d.uptodate | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsSetPageDirtyFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsSetPageDirtyFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsSetPageDirtyFtraceEvent} m F2fsSetPageDirtyFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsSetPageDirtyFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.type = 0;
                    d.dir = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.index = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.index = o.longs === String ? "0" : 0;
                    d.dirty = 0;
                    d.uptodate = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    d.type = m.type;
                }
                if (m.dir != null && m.hasOwnProperty("dir")) {
                    d.dir = m.dir;
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (typeof m.index === "number")
                        d.index = o.longs === String ? String(m.index) : m.index;
                    else
                        d.index = o.longs === String ? $util.Long.prototype.toString.call(m.index) : o.longs === Number ? new $util.LongBits(m.index.low >>> 0, m.index.high >>> 0).toNumber(true) : m.index;
                }
                if (m.dirty != null && m.hasOwnProperty("dirty")) {
                    d.dirty = m.dirty;
                }
                if (m.uptodate != null && m.hasOwnProperty("uptodate")) {
                    d.uptodate = m.uptodate;
                }
                return d;
            };

            /**
             * Converts this F2fsSetPageDirtyFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsSetPageDirtyFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsSetPageDirtyFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsSetPageDirtyFtraceEvent;
        })();

        protos.F2fsSubmitWritePageFtraceEvent = (function() {

            /**
             * Properties of a F2fsSubmitWritePageFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsSubmitWritePageFtraceEvent
             * @property {number|null} [dev] F2fsSubmitWritePageFtraceEvent dev
             * @property {number|null} [ino] F2fsSubmitWritePageFtraceEvent ino
             * @property {number|null} [type] F2fsSubmitWritePageFtraceEvent type
             * @property {number|null} [index] F2fsSubmitWritePageFtraceEvent index
             * @property {number|null} [block] F2fsSubmitWritePageFtraceEvent block
             */

            /**
             * Constructs a new F2fsSubmitWritePageFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsSubmitWritePageFtraceEvent.
             * @implements IF2fsSubmitWritePageFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsSubmitWritePageFtraceEvent=} [p] Properties to set
             */
            function F2fsSubmitWritePageFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsSubmitWritePageFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsSubmitWritePageFtraceEvent
             * @instance
             */
            F2fsSubmitWritePageFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsSubmitWritePageFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsSubmitWritePageFtraceEvent
             * @instance
             */
            F2fsSubmitWritePageFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsSubmitWritePageFtraceEvent type.
             * @member {number} type
             * @memberof perfetto.protos.F2fsSubmitWritePageFtraceEvent
             * @instance
             */
            F2fsSubmitWritePageFtraceEvent.prototype.type = 0;

            /**
             * F2fsSubmitWritePageFtraceEvent index.
             * @member {number} index
             * @memberof perfetto.protos.F2fsSubmitWritePageFtraceEvent
             * @instance
             */
            F2fsSubmitWritePageFtraceEvent.prototype.index = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsSubmitWritePageFtraceEvent block.
             * @member {number} block
             * @memberof perfetto.protos.F2fsSubmitWritePageFtraceEvent
             * @instance
             */
            F2fsSubmitWritePageFtraceEvent.prototype.block = 0;

            /**
             * Creates a new F2fsSubmitWritePageFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsSubmitWritePageFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsSubmitWritePageFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsSubmitWritePageFtraceEvent} F2fsSubmitWritePageFtraceEvent instance
             */
            F2fsSubmitWritePageFtraceEvent.create = function create(properties) {
                return new F2fsSubmitWritePageFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsSubmitWritePageFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsSubmitWritePageFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsSubmitWritePageFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsSubmitWritePageFtraceEvent} m F2fsSubmitWritePageFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsSubmitWritePageFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                    w.uint32(24).int32(m.type);
                if (m.index != null && Object.hasOwnProperty.call(m, "index"))
                    w.uint32(32).uint64(m.index);
                if (m.block != null && Object.hasOwnProperty.call(m, "block"))
                    w.uint32(40).uint32(m.block);
                return w;
            };

            /**
             * Encodes the specified F2fsSubmitWritePageFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsSubmitWritePageFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsSubmitWritePageFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsSubmitWritePageFtraceEvent} message F2fsSubmitWritePageFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsSubmitWritePageFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsSubmitWritePageFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsSubmitWritePageFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsSubmitWritePageFtraceEvent} F2fsSubmitWritePageFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsSubmitWritePageFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsSubmitWritePageFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.type = r.int32();
                        break;
                    case 4:
                        m.index = r.uint64();
                        break;
                    case 5:
                        m.block = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsSubmitWritePageFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsSubmitWritePageFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsSubmitWritePageFtraceEvent} F2fsSubmitWritePageFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsSubmitWritePageFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsSubmitWritePageFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsSubmitWritePageFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsSubmitWritePageFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    if (!$util.isInteger(m.type))
                        return "type: integer expected";
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (!$util.isInteger(m.index) && !(m.index && $util.isInteger(m.index.low) && $util.isInteger(m.index.high)))
                        return "index: integer|Long expected";
                }
                if (m.block != null && m.hasOwnProperty("block")) {
                    if (!$util.isInteger(m.block))
                        return "block: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsSubmitWritePageFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsSubmitWritePageFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsSubmitWritePageFtraceEvent} F2fsSubmitWritePageFtraceEvent
             */
            F2fsSubmitWritePageFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsSubmitWritePageFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsSubmitWritePageFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.type != null) {
                    m.type = d.type | 0;
                }
                if (d.index != null) {
                    if ($util.Long)
                        (m.index = $util.Long.fromValue(d.index)).unsigned = true;
                    else if (typeof d.index === "string")
                        m.index = parseInt(d.index, 10);
                    else if (typeof d.index === "number")
                        m.index = d.index;
                    else if (typeof d.index === "object")
                        m.index = new $util.LongBits(d.index.low >>> 0, d.index.high >>> 0).toNumber(true);
                }
                if (d.block != null) {
                    m.block = d.block >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsSubmitWritePageFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsSubmitWritePageFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsSubmitWritePageFtraceEvent} m F2fsSubmitWritePageFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsSubmitWritePageFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.type = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.index = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.index = o.longs === String ? "0" : 0;
                    d.block = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    d.type = m.type;
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (typeof m.index === "number")
                        d.index = o.longs === String ? String(m.index) : m.index;
                    else
                        d.index = o.longs === String ? $util.Long.prototype.toString.call(m.index) : o.longs === Number ? new $util.LongBits(m.index.low >>> 0, m.index.high >>> 0).toNumber(true) : m.index;
                }
                if (m.block != null && m.hasOwnProperty("block")) {
                    d.block = m.block;
                }
                return d;
            };

            /**
             * Converts this F2fsSubmitWritePageFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsSubmitWritePageFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsSubmitWritePageFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsSubmitWritePageFtraceEvent;
        })();

        protos.F2fsSyncFileEnterFtraceEvent = (function() {

            /**
             * Properties of a F2fsSyncFileEnterFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsSyncFileEnterFtraceEvent
             * @property {number|null} [dev] F2fsSyncFileEnterFtraceEvent dev
             * @property {number|null} [ino] F2fsSyncFileEnterFtraceEvent ino
             * @property {number|null} [pino] F2fsSyncFileEnterFtraceEvent pino
             * @property {number|null} [mode] F2fsSyncFileEnterFtraceEvent mode
             * @property {number|null} [size] F2fsSyncFileEnterFtraceEvent size
             * @property {number|null} [nlink] F2fsSyncFileEnterFtraceEvent nlink
             * @property {number|null} [blocks] F2fsSyncFileEnterFtraceEvent blocks
             * @property {number|null} [advise] F2fsSyncFileEnterFtraceEvent advise
             */

            /**
             * Constructs a new F2fsSyncFileEnterFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsSyncFileEnterFtraceEvent.
             * @implements IF2fsSyncFileEnterFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsSyncFileEnterFtraceEvent=} [p] Properties to set
             */
            function F2fsSyncFileEnterFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsSyncFileEnterFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsSyncFileEnterFtraceEvent
             * @instance
             */
            F2fsSyncFileEnterFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsSyncFileEnterFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsSyncFileEnterFtraceEvent
             * @instance
             */
            F2fsSyncFileEnterFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsSyncFileEnterFtraceEvent pino.
             * @member {number} pino
             * @memberof perfetto.protos.F2fsSyncFileEnterFtraceEvent
             * @instance
             */
            F2fsSyncFileEnterFtraceEvent.prototype.pino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsSyncFileEnterFtraceEvent mode.
             * @member {number} mode
             * @memberof perfetto.protos.F2fsSyncFileEnterFtraceEvent
             * @instance
             */
            F2fsSyncFileEnterFtraceEvent.prototype.mode = 0;

            /**
             * F2fsSyncFileEnterFtraceEvent size.
             * @member {number} size
             * @memberof perfetto.protos.F2fsSyncFileEnterFtraceEvent
             * @instance
             */
            F2fsSyncFileEnterFtraceEvent.prototype.size = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * F2fsSyncFileEnterFtraceEvent nlink.
             * @member {number} nlink
             * @memberof perfetto.protos.F2fsSyncFileEnterFtraceEvent
             * @instance
             */
            F2fsSyncFileEnterFtraceEvent.prototype.nlink = 0;

            /**
             * F2fsSyncFileEnterFtraceEvent blocks.
             * @member {number} blocks
             * @memberof perfetto.protos.F2fsSyncFileEnterFtraceEvent
             * @instance
             */
            F2fsSyncFileEnterFtraceEvent.prototype.blocks = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsSyncFileEnterFtraceEvent advise.
             * @member {number} advise
             * @memberof perfetto.protos.F2fsSyncFileEnterFtraceEvent
             * @instance
             */
            F2fsSyncFileEnterFtraceEvent.prototype.advise = 0;

            /**
             * Creates a new F2fsSyncFileEnterFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsSyncFileEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsSyncFileEnterFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsSyncFileEnterFtraceEvent} F2fsSyncFileEnterFtraceEvent instance
             */
            F2fsSyncFileEnterFtraceEvent.create = function create(properties) {
                return new F2fsSyncFileEnterFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsSyncFileEnterFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsSyncFileEnterFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsSyncFileEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsSyncFileEnterFtraceEvent} m F2fsSyncFileEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsSyncFileEnterFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.pino != null && Object.hasOwnProperty.call(m, "pino"))
                    w.uint32(24).uint64(m.pino);
                if (m.mode != null && Object.hasOwnProperty.call(m, "mode"))
                    w.uint32(32).uint32(m.mode);
                if (m.size != null && Object.hasOwnProperty.call(m, "size"))
                    w.uint32(40).int64(m.size);
                if (m.nlink != null && Object.hasOwnProperty.call(m, "nlink"))
                    w.uint32(48).uint32(m.nlink);
                if (m.blocks != null && Object.hasOwnProperty.call(m, "blocks"))
                    w.uint32(56).uint64(m.blocks);
                if (m.advise != null && Object.hasOwnProperty.call(m, "advise"))
                    w.uint32(64).uint32(m.advise);
                return w;
            };

            /**
             * Encodes the specified F2fsSyncFileEnterFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsSyncFileEnterFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsSyncFileEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsSyncFileEnterFtraceEvent} message F2fsSyncFileEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsSyncFileEnterFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsSyncFileEnterFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsSyncFileEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsSyncFileEnterFtraceEvent} F2fsSyncFileEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsSyncFileEnterFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsSyncFileEnterFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.pino = r.uint64();
                        break;
                    case 4:
                        m.mode = r.uint32();
                        break;
                    case 5:
                        m.size = r.int64();
                        break;
                    case 6:
                        m.nlink = r.uint32();
                        break;
                    case 7:
                        m.blocks = r.uint64();
                        break;
                    case 8:
                        m.advise = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsSyncFileEnterFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsSyncFileEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsSyncFileEnterFtraceEvent} F2fsSyncFileEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsSyncFileEnterFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsSyncFileEnterFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsSyncFileEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsSyncFileEnterFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.pino != null && m.hasOwnProperty("pino")) {
                    if (!$util.isInteger(m.pino) && !(m.pino && $util.isInteger(m.pino.low) && $util.isInteger(m.pino.high)))
                        return "pino: integer|Long expected";
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    if (!$util.isInteger(m.mode))
                        return "mode: integer expected";
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (!$util.isInteger(m.size) && !(m.size && $util.isInteger(m.size.low) && $util.isInteger(m.size.high)))
                        return "size: integer|Long expected";
                }
                if (m.nlink != null && m.hasOwnProperty("nlink")) {
                    if (!$util.isInteger(m.nlink))
                        return "nlink: integer expected";
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (!$util.isInteger(m.blocks) && !(m.blocks && $util.isInteger(m.blocks.low) && $util.isInteger(m.blocks.high)))
                        return "blocks: integer|Long expected";
                }
                if (m.advise != null && m.hasOwnProperty("advise")) {
                    if (!$util.isInteger(m.advise))
                        return "advise: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsSyncFileEnterFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsSyncFileEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsSyncFileEnterFtraceEvent} F2fsSyncFileEnterFtraceEvent
             */
            F2fsSyncFileEnterFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsSyncFileEnterFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsSyncFileEnterFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.pino != null) {
                    if ($util.Long)
                        (m.pino = $util.Long.fromValue(d.pino)).unsigned = true;
                    else if (typeof d.pino === "string")
                        m.pino = parseInt(d.pino, 10);
                    else if (typeof d.pino === "number")
                        m.pino = d.pino;
                    else if (typeof d.pino === "object")
                        m.pino = new $util.LongBits(d.pino.low >>> 0, d.pino.high >>> 0).toNumber(true);
                }
                if (d.mode != null) {
                    m.mode = d.mode >>> 0;
                }
                if (d.size != null) {
                    if ($util.Long)
                        (m.size = $util.Long.fromValue(d.size)).unsigned = false;
                    else if (typeof d.size === "string")
                        m.size = parseInt(d.size, 10);
                    else if (typeof d.size === "number")
                        m.size = d.size;
                    else if (typeof d.size === "object")
                        m.size = new $util.LongBits(d.size.low >>> 0, d.size.high >>> 0).toNumber();
                }
                if (d.nlink != null) {
                    m.nlink = d.nlink >>> 0;
                }
                if (d.blocks != null) {
                    if ($util.Long)
                        (m.blocks = $util.Long.fromValue(d.blocks)).unsigned = true;
                    else if (typeof d.blocks === "string")
                        m.blocks = parseInt(d.blocks, 10);
                    else if (typeof d.blocks === "number")
                        m.blocks = d.blocks;
                    else if (typeof d.blocks === "object")
                        m.blocks = new $util.LongBits(d.blocks.low >>> 0, d.blocks.high >>> 0).toNumber(true);
                }
                if (d.advise != null) {
                    m.advise = d.advise >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsSyncFileEnterFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsSyncFileEnterFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsSyncFileEnterFtraceEvent} m F2fsSyncFileEnterFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsSyncFileEnterFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pino = o.longs === String ? "0" : 0;
                    d.mode = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.size = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.size = o.longs === String ? "0" : 0;
                    d.nlink = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.blocks = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.blocks = o.longs === String ? "0" : 0;
                    d.advise = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.pino != null && m.hasOwnProperty("pino")) {
                    if (typeof m.pino === "number")
                        d.pino = o.longs === String ? String(m.pino) : m.pino;
                    else
                        d.pino = o.longs === String ? $util.Long.prototype.toString.call(m.pino) : o.longs === Number ? new $util.LongBits(m.pino.low >>> 0, m.pino.high >>> 0).toNumber(true) : m.pino;
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    d.mode = m.mode;
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (typeof m.size === "number")
                        d.size = o.longs === String ? String(m.size) : m.size;
                    else
                        d.size = o.longs === String ? $util.Long.prototype.toString.call(m.size) : o.longs === Number ? new $util.LongBits(m.size.low >>> 0, m.size.high >>> 0).toNumber() : m.size;
                }
                if (m.nlink != null && m.hasOwnProperty("nlink")) {
                    d.nlink = m.nlink;
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (typeof m.blocks === "number")
                        d.blocks = o.longs === String ? String(m.blocks) : m.blocks;
                    else
                        d.blocks = o.longs === String ? $util.Long.prototype.toString.call(m.blocks) : o.longs === Number ? new $util.LongBits(m.blocks.low >>> 0, m.blocks.high >>> 0).toNumber(true) : m.blocks;
                }
                if (m.advise != null && m.hasOwnProperty("advise")) {
                    d.advise = m.advise;
                }
                return d;
            };

            /**
             * Converts this F2fsSyncFileEnterFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsSyncFileEnterFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsSyncFileEnterFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsSyncFileEnterFtraceEvent;
        })();

        protos.F2fsSyncFileExitFtraceEvent = (function() {

            /**
             * Properties of a F2fsSyncFileExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsSyncFileExitFtraceEvent
             * @property {number|null} [dev] F2fsSyncFileExitFtraceEvent dev
             * @property {number|null} [ino] F2fsSyncFileExitFtraceEvent ino
             * @property {number|null} [needCp] F2fsSyncFileExitFtraceEvent needCp
             * @property {number|null} [datasync] F2fsSyncFileExitFtraceEvent datasync
             * @property {number|null} [ret] F2fsSyncFileExitFtraceEvent ret
             * @property {number|null} [cpReason] F2fsSyncFileExitFtraceEvent cpReason
             */

            /**
             * Constructs a new F2fsSyncFileExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsSyncFileExitFtraceEvent.
             * @implements IF2fsSyncFileExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsSyncFileExitFtraceEvent=} [p] Properties to set
             */
            function F2fsSyncFileExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsSyncFileExitFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsSyncFileExitFtraceEvent
             * @instance
             */
            F2fsSyncFileExitFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsSyncFileExitFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsSyncFileExitFtraceEvent
             * @instance
             */
            F2fsSyncFileExitFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsSyncFileExitFtraceEvent needCp.
             * @member {number} needCp
             * @memberof perfetto.protos.F2fsSyncFileExitFtraceEvent
             * @instance
             */
            F2fsSyncFileExitFtraceEvent.prototype.needCp = 0;

            /**
             * F2fsSyncFileExitFtraceEvent datasync.
             * @member {number} datasync
             * @memberof perfetto.protos.F2fsSyncFileExitFtraceEvent
             * @instance
             */
            F2fsSyncFileExitFtraceEvent.prototype.datasync = 0;

            /**
             * F2fsSyncFileExitFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.F2fsSyncFileExitFtraceEvent
             * @instance
             */
            F2fsSyncFileExitFtraceEvent.prototype.ret = 0;

            /**
             * F2fsSyncFileExitFtraceEvent cpReason.
             * @member {number} cpReason
             * @memberof perfetto.protos.F2fsSyncFileExitFtraceEvent
             * @instance
             */
            F2fsSyncFileExitFtraceEvent.prototype.cpReason = 0;

            /**
             * Creates a new F2fsSyncFileExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsSyncFileExitFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsSyncFileExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsSyncFileExitFtraceEvent} F2fsSyncFileExitFtraceEvent instance
             */
            F2fsSyncFileExitFtraceEvent.create = function create(properties) {
                return new F2fsSyncFileExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsSyncFileExitFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsSyncFileExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsSyncFileExitFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsSyncFileExitFtraceEvent} m F2fsSyncFileExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsSyncFileExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.needCp != null && Object.hasOwnProperty.call(m, "needCp"))
                    w.uint32(24).uint32(m.needCp);
                if (m.datasync != null && Object.hasOwnProperty.call(m, "datasync"))
                    w.uint32(32).int32(m.datasync);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(40).int32(m.ret);
                if (m.cpReason != null && Object.hasOwnProperty.call(m, "cpReason"))
                    w.uint32(48).int32(m.cpReason);
                return w;
            };

            /**
             * Encodes the specified F2fsSyncFileExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsSyncFileExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsSyncFileExitFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsSyncFileExitFtraceEvent} message F2fsSyncFileExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsSyncFileExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsSyncFileExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsSyncFileExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsSyncFileExitFtraceEvent} F2fsSyncFileExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsSyncFileExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsSyncFileExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.needCp = r.uint32();
                        break;
                    case 4:
                        m.datasync = r.int32();
                        break;
                    case 5:
                        m.ret = r.int32();
                        break;
                    case 6:
                        m.cpReason = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsSyncFileExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsSyncFileExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsSyncFileExitFtraceEvent} F2fsSyncFileExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsSyncFileExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsSyncFileExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsSyncFileExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsSyncFileExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.needCp != null && m.hasOwnProperty("needCp")) {
                    if (!$util.isInteger(m.needCp))
                        return "needCp: integer expected";
                }
                if (m.datasync != null && m.hasOwnProperty("datasync")) {
                    if (!$util.isInteger(m.datasync))
                        return "datasync: integer expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                if (m.cpReason != null && m.hasOwnProperty("cpReason")) {
                    if (!$util.isInteger(m.cpReason))
                        return "cpReason: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsSyncFileExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsSyncFileExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsSyncFileExitFtraceEvent} F2fsSyncFileExitFtraceEvent
             */
            F2fsSyncFileExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsSyncFileExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsSyncFileExitFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.needCp != null) {
                    m.needCp = d.needCp >>> 0;
                }
                if (d.datasync != null) {
                    m.datasync = d.datasync | 0;
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                if (d.cpReason != null) {
                    m.cpReason = d.cpReason | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsSyncFileExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsSyncFileExitFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsSyncFileExitFtraceEvent} m F2fsSyncFileExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsSyncFileExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.needCp = 0;
                    d.datasync = 0;
                    d.ret = 0;
                    d.cpReason = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.needCp != null && m.hasOwnProperty("needCp")) {
                    d.needCp = m.needCp;
                }
                if (m.datasync != null && m.hasOwnProperty("datasync")) {
                    d.datasync = m.datasync;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                if (m.cpReason != null && m.hasOwnProperty("cpReason")) {
                    d.cpReason = m.cpReason;
                }
                return d;
            };

            /**
             * Converts this F2fsSyncFileExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsSyncFileExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsSyncFileExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsSyncFileExitFtraceEvent;
        })();

        protos.F2fsSyncFsFtraceEvent = (function() {

            /**
             * Properties of a F2fsSyncFsFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsSyncFsFtraceEvent
             * @property {number|null} [dev] F2fsSyncFsFtraceEvent dev
             * @property {number|null} [dirty] F2fsSyncFsFtraceEvent dirty
             * @property {number|null} [wait] F2fsSyncFsFtraceEvent wait
             */

            /**
             * Constructs a new F2fsSyncFsFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsSyncFsFtraceEvent.
             * @implements IF2fsSyncFsFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsSyncFsFtraceEvent=} [p] Properties to set
             */
            function F2fsSyncFsFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsSyncFsFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsSyncFsFtraceEvent
             * @instance
             */
            F2fsSyncFsFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsSyncFsFtraceEvent dirty.
             * @member {number} dirty
             * @memberof perfetto.protos.F2fsSyncFsFtraceEvent
             * @instance
             */
            F2fsSyncFsFtraceEvent.prototype.dirty = 0;

            /**
             * F2fsSyncFsFtraceEvent wait.
             * @member {number} wait
             * @memberof perfetto.protos.F2fsSyncFsFtraceEvent
             * @instance
             */
            F2fsSyncFsFtraceEvent.prototype.wait = 0;

            /**
             * Creates a new F2fsSyncFsFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsSyncFsFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsSyncFsFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsSyncFsFtraceEvent} F2fsSyncFsFtraceEvent instance
             */
            F2fsSyncFsFtraceEvent.create = function create(properties) {
                return new F2fsSyncFsFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsSyncFsFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsSyncFsFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsSyncFsFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsSyncFsFtraceEvent} m F2fsSyncFsFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsSyncFsFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.dirty != null && Object.hasOwnProperty.call(m, "dirty"))
                    w.uint32(16).int32(m.dirty);
                if (m.wait != null && Object.hasOwnProperty.call(m, "wait"))
                    w.uint32(24).int32(m.wait);
                return w;
            };

            /**
             * Encodes the specified F2fsSyncFsFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsSyncFsFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsSyncFsFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsSyncFsFtraceEvent} message F2fsSyncFsFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsSyncFsFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsSyncFsFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsSyncFsFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsSyncFsFtraceEvent} F2fsSyncFsFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsSyncFsFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsSyncFsFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.dirty = r.int32();
                        break;
                    case 3:
                        m.wait = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsSyncFsFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsSyncFsFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsSyncFsFtraceEvent} F2fsSyncFsFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsSyncFsFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsSyncFsFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsSyncFsFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsSyncFsFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.dirty != null && m.hasOwnProperty("dirty")) {
                    if (!$util.isInteger(m.dirty))
                        return "dirty: integer expected";
                }
                if (m.wait != null && m.hasOwnProperty("wait")) {
                    if (!$util.isInteger(m.wait))
                        return "wait: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsSyncFsFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsSyncFsFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsSyncFsFtraceEvent} F2fsSyncFsFtraceEvent
             */
            F2fsSyncFsFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsSyncFsFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsSyncFsFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.dirty != null) {
                    m.dirty = d.dirty | 0;
                }
                if (d.wait != null) {
                    m.wait = d.wait | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsSyncFsFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsSyncFsFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsSyncFsFtraceEvent} m F2fsSyncFsFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsSyncFsFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    d.dirty = 0;
                    d.wait = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.dirty != null && m.hasOwnProperty("dirty")) {
                    d.dirty = m.dirty;
                }
                if (m.wait != null && m.hasOwnProperty("wait")) {
                    d.wait = m.wait;
                }
                return d;
            };

            /**
             * Converts this F2fsSyncFsFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsSyncFsFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsSyncFsFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsSyncFsFtraceEvent;
        })();

        protos.F2fsTruncateFtraceEvent = (function() {

            /**
             * Properties of a F2fsTruncateFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsTruncateFtraceEvent
             * @property {number|null} [dev] F2fsTruncateFtraceEvent dev
             * @property {number|null} [ino] F2fsTruncateFtraceEvent ino
             * @property {number|null} [pino] F2fsTruncateFtraceEvent pino
             * @property {number|null} [mode] F2fsTruncateFtraceEvent mode
             * @property {number|null} [size] F2fsTruncateFtraceEvent size
             * @property {number|null} [nlink] F2fsTruncateFtraceEvent nlink
             * @property {number|null} [blocks] F2fsTruncateFtraceEvent blocks
             * @property {number|null} [advise] F2fsTruncateFtraceEvent advise
             */

            /**
             * Constructs a new F2fsTruncateFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsTruncateFtraceEvent.
             * @implements IF2fsTruncateFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsTruncateFtraceEvent=} [p] Properties to set
             */
            function F2fsTruncateFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsTruncateFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsTruncateFtraceEvent
             * @instance
             */
            F2fsTruncateFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsTruncateFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsTruncateFtraceEvent
             * @instance
             */
            F2fsTruncateFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsTruncateFtraceEvent pino.
             * @member {number} pino
             * @memberof perfetto.protos.F2fsTruncateFtraceEvent
             * @instance
             */
            F2fsTruncateFtraceEvent.prototype.pino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsTruncateFtraceEvent mode.
             * @member {number} mode
             * @memberof perfetto.protos.F2fsTruncateFtraceEvent
             * @instance
             */
            F2fsTruncateFtraceEvent.prototype.mode = 0;

            /**
             * F2fsTruncateFtraceEvent size.
             * @member {number} size
             * @memberof perfetto.protos.F2fsTruncateFtraceEvent
             * @instance
             */
            F2fsTruncateFtraceEvent.prototype.size = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * F2fsTruncateFtraceEvent nlink.
             * @member {number} nlink
             * @memberof perfetto.protos.F2fsTruncateFtraceEvent
             * @instance
             */
            F2fsTruncateFtraceEvent.prototype.nlink = 0;

            /**
             * F2fsTruncateFtraceEvent blocks.
             * @member {number} blocks
             * @memberof perfetto.protos.F2fsTruncateFtraceEvent
             * @instance
             */
            F2fsTruncateFtraceEvent.prototype.blocks = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsTruncateFtraceEvent advise.
             * @member {number} advise
             * @memberof perfetto.protos.F2fsTruncateFtraceEvent
             * @instance
             */
            F2fsTruncateFtraceEvent.prototype.advise = 0;

            /**
             * Creates a new F2fsTruncateFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsTruncateFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsTruncateFtraceEvent} F2fsTruncateFtraceEvent instance
             */
            F2fsTruncateFtraceEvent.create = function create(properties) {
                return new F2fsTruncateFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsTruncateFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsTruncateFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsTruncateFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateFtraceEvent} m F2fsTruncateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsTruncateFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.pino != null && Object.hasOwnProperty.call(m, "pino"))
                    w.uint32(24).uint64(m.pino);
                if (m.mode != null && Object.hasOwnProperty.call(m, "mode"))
                    w.uint32(32).uint32(m.mode);
                if (m.size != null && Object.hasOwnProperty.call(m, "size"))
                    w.uint32(40).int64(m.size);
                if (m.nlink != null && Object.hasOwnProperty.call(m, "nlink"))
                    w.uint32(48).uint32(m.nlink);
                if (m.blocks != null && Object.hasOwnProperty.call(m, "blocks"))
                    w.uint32(56).uint64(m.blocks);
                if (m.advise != null && Object.hasOwnProperty.call(m, "advise"))
                    w.uint32(64).uint32(m.advise);
                return w;
            };

            /**
             * Encodes the specified F2fsTruncateFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsTruncateFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsTruncateFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateFtraceEvent} message F2fsTruncateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsTruncateFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsTruncateFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsTruncateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsTruncateFtraceEvent} F2fsTruncateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsTruncateFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsTruncateFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.pino = r.uint64();
                        break;
                    case 4:
                        m.mode = r.uint32();
                        break;
                    case 5:
                        m.size = r.int64();
                        break;
                    case 6:
                        m.nlink = r.uint32();
                        break;
                    case 7:
                        m.blocks = r.uint64();
                        break;
                    case 8:
                        m.advise = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsTruncateFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsTruncateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsTruncateFtraceEvent} F2fsTruncateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsTruncateFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsTruncateFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsTruncateFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsTruncateFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.pino != null && m.hasOwnProperty("pino")) {
                    if (!$util.isInteger(m.pino) && !(m.pino && $util.isInteger(m.pino.low) && $util.isInteger(m.pino.high)))
                        return "pino: integer|Long expected";
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    if (!$util.isInteger(m.mode))
                        return "mode: integer expected";
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (!$util.isInteger(m.size) && !(m.size && $util.isInteger(m.size.low) && $util.isInteger(m.size.high)))
                        return "size: integer|Long expected";
                }
                if (m.nlink != null && m.hasOwnProperty("nlink")) {
                    if (!$util.isInteger(m.nlink))
                        return "nlink: integer expected";
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (!$util.isInteger(m.blocks) && !(m.blocks && $util.isInteger(m.blocks.low) && $util.isInteger(m.blocks.high)))
                        return "blocks: integer|Long expected";
                }
                if (m.advise != null && m.hasOwnProperty("advise")) {
                    if (!$util.isInteger(m.advise))
                        return "advise: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsTruncateFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsTruncateFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsTruncateFtraceEvent} F2fsTruncateFtraceEvent
             */
            F2fsTruncateFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsTruncateFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsTruncateFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.pino != null) {
                    if ($util.Long)
                        (m.pino = $util.Long.fromValue(d.pino)).unsigned = true;
                    else if (typeof d.pino === "string")
                        m.pino = parseInt(d.pino, 10);
                    else if (typeof d.pino === "number")
                        m.pino = d.pino;
                    else if (typeof d.pino === "object")
                        m.pino = new $util.LongBits(d.pino.low >>> 0, d.pino.high >>> 0).toNumber(true);
                }
                if (d.mode != null) {
                    m.mode = d.mode >>> 0;
                }
                if (d.size != null) {
                    if ($util.Long)
                        (m.size = $util.Long.fromValue(d.size)).unsigned = false;
                    else if (typeof d.size === "string")
                        m.size = parseInt(d.size, 10);
                    else if (typeof d.size === "number")
                        m.size = d.size;
                    else if (typeof d.size === "object")
                        m.size = new $util.LongBits(d.size.low >>> 0, d.size.high >>> 0).toNumber();
                }
                if (d.nlink != null) {
                    m.nlink = d.nlink >>> 0;
                }
                if (d.blocks != null) {
                    if ($util.Long)
                        (m.blocks = $util.Long.fromValue(d.blocks)).unsigned = true;
                    else if (typeof d.blocks === "string")
                        m.blocks = parseInt(d.blocks, 10);
                    else if (typeof d.blocks === "number")
                        m.blocks = d.blocks;
                    else if (typeof d.blocks === "object")
                        m.blocks = new $util.LongBits(d.blocks.low >>> 0, d.blocks.high >>> 0).toNumber(true);
                }
                if (d.advise != null) {
                    m.advise = d.advise >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsTruncateFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsTruncateFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsTruncateFtraceEvent} m F2fsTruncateFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsTruncateFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pino = o.longs === String ? "0" : 0;
                    d.mode = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.size = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.size = o.longs === String ? "0" : 0;
                    d.nlink = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.blocks = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.blocks = o.longs === String ? "0" : 0;
                    d.advise = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.pino != null && m.hasOwnProperty("pino")) {
                    if (typeof m.pino === "number")
                        d.pino = o.longs === String ? String(m.pino) : m.pino;
                    else
                        d.pino = o.longs === String ? $util.Long.prototype.toString.call(m.pino) : o.longs === Number ? new $util.LongBits(m.pino.low >>> 0, m.pino.high >>> 0).toNumber(true) : m.pino;
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    d.mode = m.mode;
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (typeof m.size === "number")
                        d.size = o.longs === String ? String(m.size) : m.size;
                    else
                        d.size = o.longs === String ? $util.Long.prototype.toString.call(m.size) : o.longs === Number ? new $util.LongBits(m.size.low >>> 0, m.size.high >>> 0).toNumber() : m.size;
                }
                if (m.nlink != null && m.hasOwnProperty("nlink")) {
                    d.nlink = m.nlink;
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (typeof m.blocks === "number")
                        d.blocks = o.longs === String ? String(m.blocks) : m.blocks;
                    else
                        d.blocks = o.longs === String ? $util.Long.prototype.toString.call(m.blocks) : o.longs === Number ? new $util.LongBits(m.blocks.low >>> 0, m.blocks.high >>> 0).toNumber(true) : m.blocks;
                }
                if (m.advise != null && m.hasOwnProperty("advise")) {
                    d.advise = m.advise;
                }
                return d;
            };

            /**
             * Converts this F2fsTruncateFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsTruncateFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsTruncateFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsTruncateFtraceEvent;
        })();

        protos.F2fsTruncateBlocksEnterFtraceEvent = (function() {

            /**
             * Properties of a F2fsTruncateBlocksEnterFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsTruncateBlocksEnterFtraceEvent
             * @property {number|null} [dev] F2fsTruncateBlocksEnterFtraceEvent dev
             * @property {number|null} [ino] F2fsTruncateBlocksEnterFtraceEvent ino
             * @property {number|null} [size] F2fsTruncateBlocksEnterFtraceEvent size
             * @property {number|null} [blocks] F2fsTruncateBlocksEnterFtraceEvent blocks
             * @property {number|null} [from] F2fsTruncateBlocksEnterFtraceEvent from
             */

            /**
             * Constructs a new F2fsTruncateBlocksEnterFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsTruncateBlocksEnterFtraceEvent.
             * @implements IF2fsTruncateBlocksEnterFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsTruncateBlocksEnterFtraceEvent=} [p] Properties to set
             */
            function F2fsTruncateBlocksEnterFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsTruncateBlocksEnterFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent
             * @instance
             */
            F2fsTruncateBlocksEnterFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsTruncateBlocksEnterFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent
             * @instance
             */
            F2fsTruncateBlocksEnterFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsTruncateBlocksEnterFtraceEvent size.
             * @member {number} size
             * @memberof perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent
             * @instance
             */
            F2fsTruncateBlocksEnterFtraceEvent.prototype.size = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * F2fsTruncateBlocksEnterFtraceEvent blocks.
             * @member {number} blocks
             * @memberof perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent
             * @instance
             */
            F2fsTruncateBlocksEnterFtraceEvent.prototype.blocks = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsTruncateBlocksEnterFtraceEvent from.
             * @member {number} from
             * @memberof perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent
             * @instance
             */
            F2fsTruncateBlocksEnterFtraceEvent.prototype.from = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new F2fsTruncateBlocksEnterFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateBlocksEnterFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent} F2fsTruncateBlocksEnterFtraceEvent instance
             */
            F2fsTruncateBlocksEnterFtraceEvent.create = function create(properties) {
                return new F2fsTruncateBlocksEnterFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsTruncateBlocksEnterFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateBlocksEnterFtraceEvent} m F2fsTruncateBlocksEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsTruncateBlocksEnterFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.size != null && Object.hasOwnProperty.call(m, "size"))
                    w.uint32(24).int64(m.size);
                if (m.blocks != null && Object.hasOwnProperty.call(m, "blocks"))
                    w.uint32(32).uint64(m.blocks);
                if (m.from != null && Object.hasOwnProperty.call(m, "from"))
                    w.uint32(40).uint64(m.from);
                return w;
            };

            /**
             * Encodes the specified F2fsTruncateBlocksEnterFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateBlocksEnterFtraceEvent} message F2fsTruncateBlocksEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsTruncateBlocksEnterFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsTruncateBlocksEnterFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent} F2fsTruncateBlocksEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsTruncateBlocksEnterFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.size = r.int64();
                        break;
                    case 4:
                        m.blocks = r.uint64();
                        break;
                    case 5:
                        m.from = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsTruncateBlocksEnterFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent} F2fsTruncateBlocksEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsTruncateBlocksEnterFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsTruncateBlocksEnterFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsTruncateBlocksEnterFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (!$util.isInteger(m.size) && !(m.size && $util.isInteger(m.size.low) && $util.isInteger(m.size.high)))
                        return "size: integer|Long expected";
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (!$util.isInteger(m.blocks) && !(m.blocks && $util.isInteger(m.blocks.low) && $util.isInteger(m.blocks.high)))
                        return "blocks: integer|Long expected";
                }
                if (m.from != null && m.hasOwnProperty("from")) {
                    if (!$util.isInteger(m.from) && !(m.from && $util.isInteger(m.from.low) && $util.isInteger(m.from.high)))
                        return "from: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a F2fsTruncateBlocksEnterFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent} F2fsTruncateBlocksEnterFtraceEvent
             */
            F2fsTruncateBlocksEnterFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.size != null) {
                    if ($util.Long)
                        (m.size = $util.Long.fromValue(d.size)).unsigned = false;
                    else if (typeof d.size === "string")
                        m.size = parseInt(d.size, 10);
                    else if (typeof d.size === "number")
                        m.size = d.size;
                    else if (typeof d.size === "object")
                        m.size = new $util.LongBits(d.size.low >>> 0, d.size.high >>> 0).toNumber();
                }
                if (d.blocks != null) {
                    if ($util.Long)
                        (m.blocks = $util.Long.fromValue(d.blocks)).unsigned = true;
                    else if (typeof d.blocks === "string")
                        m.blocks = parseInt(d.blocks, 10);
                    else if (typeof d.blocks === "number")
                        m.blocks = d.blocks;
                    else if (typeof d.blocks === "object")
                        m.blocks = new $util.LongBits(d.blocks.low >>> 0, d.blocks.high >>> 0).toNumber(true);
                }
                if (d.from != null) {
                    if ($util.Long)
                        (m.from = $util.Long.fromValue(d.from)).unsigned = true;
                    else if (typeof d.from === "string")
                        m.from = parseInt(d.from, 10);
                    else if (typeof d.from === "number")
                        m.from = d.from;
                    else if (typeof d.from === "object")
                        m.from = new $util.LongBits(d.from.low >>> 0, d.from.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsTruncateBlocksEnterFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent} m F2fsTruncateBlocksEnterFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsTruncateBlocksEnterFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.size = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.size = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.blocks = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.blocks = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.from = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.from = o.longs === String ? "0" : 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (typeof m.size === "number")
                        d.size = o.longs === String ? String(m.size) : m.size;
                    else
                        d.size = o.longs === String ? $util.Long.prototype.toString.call(m.size) : o.longs === Number ? new $util.LongBits(m.size.low >>> 0, m.size.high >>> 0).toNumber() : m.size;
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (typeof m.blocks === "number")
                        d.blocks = o.longs === String ? String(m.blocks) : m.blocks;
                    else
                        d.blocks = o.longs === String ? $util.Long.prototype.toString.call(m.blocks) : o.longs === Number ? new $util.LongBits(m.blocks.low >>> 0, m.blocks.high >>> 0).toNumber(true) : m.blocks;
                }
                if (m.from != null && m.hasOwnProperty("from")) {
                    if (typeof m.from === "number")
                        d.from = o.longs === String ? String(m.from) : m.from;
                    else
                        d.from = o.longs === String ? $util.Long.prototype.toString.call(m.from) : o.longs === Number ? new $util.LongBits(m.from.low >>> 0, m.from.high >>> 0).toNumber(true) : m.from;
                }
                return d;
            };

            /**
             * Converts this F2fsTruncateBlocksEnterFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsTruncateBlocksEnterFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsTruncateBlocksEnterFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsTruncateBlocksEnterFtraceEvent;
        })();

        protos.F2fsTruncateBlocksExitFtraceEvent = (function() {

            /**
             * Properties of a F2fsTruncateBlocksExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsTruncateBlocksExitFtraceEvent
             * @property {number|null} [dev] F2fsTruncateBlocksExitFtraceEvent dev
             * @property {number|null} [ino] F2fsTruncateBlocksExitFtraceEvent ino
             * @property {number|null} [ret] F2fsTruncateBlocksExitFtraceEvent ret
             */

            /**
             * Constructs a new F2fsTruncateBlocksExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsTruncateBlocksExitFtraceEvent.
             * @implements IF2fsTruncateBlocksExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsTruncateBlocksExitFtraceEvent=} [p] Properties to set
             */
            function F2fsTruncateBlocksExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsTruncateBlocksExitFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsTruncateBlocksExitFtraceEvent
             * @instance
             */
            F2fsTruncateBlocksExitFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsTruncateBlocksExitFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsTruncateBlocksExitFtraceEvent
             * @instance
             */
            F2fsTruncateBlocksExitFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsTruncateBlocksExitFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.F2fsTruncateBlocksExitFtraceEvent
             * @instance
             */
            F2fsTruncateBlocksExitFtraceEvent.prototype.ret = 0;

            /**
             * Creates a new F2fsTruncateBlocksExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsTruncateBlocksExitFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateBlocksExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsTruncateBlocksExitFtraceEvent} F2fsTruncateBlocksExitFtraceEvent instance
             */
            F2fsTruncateBlocksExitFtraceEvent.create = function create(properties) {
                return new F2fsTruncateBlocksExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsTruncateBlocksExitFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsTruncateBlocksExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsTruncateBlocksExitFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateBlocksExitFtraceEvent} m F2fsTruncateBlocksExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsTruncateBlocksExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(24).int32(m.ret);
                return w;
            };

            /**
             * Encodes the specified F2fsTruncateBlocksExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsTruncateBlocksExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsTruncateBlocksExitFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateBlocksExitFtraceEvent} message F2fsTruncateBlocksExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsTruncateBlocksExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsTruncateBlocksExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsTruncateBlocksExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsTruncateBlocksExitFtraceEvent} F2fsTruncateBlocksExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsTruncateBlocksExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsTruncateBlocksExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.ret = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsTruncateBlocksExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsTruncateBlocksExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsTruncateBlocksExitFtraceEvent} F2fsTruncateBlocksExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsTruncateBlocksExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsTruncateBlocksExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsTruncateBlocksExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsTruncateBlocksExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsTruncateBlocksExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsTruncateBlocksExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsTruncateBlocksExitFtraceEvent} F2fsTruncateBlocksExitFtraceEvent
             */
            F2fsTruncateBlocksExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsTruncateBlocksExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsTruncateBlocksExitFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsTruncateBlocksExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsTruncateBlocksExitFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsTruncateBlocksExitFtraceEvent} m F2fsTruncateBlocksExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsTruncateBlocksExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.ret = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                return d;
            };

            /**
             * Converts this F2fsTruncateBlocksExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsTruncateBlocksExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsTruncateBlocksExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsTruncateBlocksExitFtraceEvent;
        })();

        protos.F2fsTruncateDataBlocksRangeFtraceEvent = (function() {

            /**
             * Properties of a F2fsTruncateDataBlocksRangeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsTruncateDataBlocksRangeFtraceEvent
             * @property {number|null} [dev] F2fsTruncateDataBlocksRangeFtraceEvent dev
             * @property {number|null} [ino] F2fsTruncateDataBlocksRangeFtraceEvent ino
             * @property {number|null} [nid] F2fsTruncateDataBlocksRangeFtraceEvent nid
             * @property {number|null} [ofs] F2fsTruncateDataBlocksRangeFtraceEvent ofs
             * @property {number|null} [free] F2fsTruncateDataBlocksRangeFtraceEvent free
             */

            /**
             * Constructs a new F2fsTruncateDataBlocksRangeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsTruncateDataBlocksRangeFtraceEvent.
             * @implements IF2fsTruncateDataBlocksRangeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsTruncateDataBlocksRangeFtraceEvent=} [p] Properties to set
             */
            function F2fsTruncateDataBlocksRangeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsTruncateDataBlocksRangeFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent
             * @instance
             */
            F2fsTruncateDataBlocksRangeFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsTruncateDataBlocksRangeFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent
             * @instance
             */
            F2fsTruncateDataBlocksRangeFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsTruncateDataBlocksRangeFtraceEvent nid.
             * @member {number} nid
             * @memberof perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent
             * @instance
             */
            F2fsTruncateDataBlocksRangeFtraceEvent.prototype.nid = 0;

            /**
             * F2fsTruncateDataBlocksRangeFtraceEvent ofs.
             * @member {number} ofs
             * @memberof perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent
             * @instance
             */
            F2fsTruncateDataBlocksRangeFtraceEvent.prototype.ofs = 0;

            /**
             * F2fsTruncateDataBlocksRangeFtraceEvent free.
             * @member {number} free
             * @memberof perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent
             * @instance
             */
            F2fsTruncateDataBlocksRangeFtraceEvent.prototype.free = 0;

            /**
             * Creates a new F2fsTruncateDataBlocksRangeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateDataBlocksRangeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent} F2fsTruncateDataBlocksRangeFtraceEvent instance
             */
            F2fsTruncateDataBlocksRangeFtraceEvent.create = function create(properties) {
                return new F2fsTruncateDataBlocksRangeFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsTruncateDataBlocksRangeFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateDataBlocksRangeFtraceEvent} m F2fsTruncateDataBlocksRangeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsTruncateDataBlocksRangeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.nid != null && Object.hasOwnProperty.call(m, "nid"))
                    w.uint32(24).uint32(m.nid);
                if (m.ofs != null && Object.hasOwnProperty.call(m, "ofs"))
                    w.uint32(32).uint32(m.ofs);
                if (m.free != null && Object.hasOwnProperty.call(m, "free"))
                    w.uint32(40).int32(m.free);
                return w;
            };

            /**
             * Encodes the specified F2fsTruncateDataBlocksRangeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateDataBlocksRangeFtraceEvent} message F2fsTruncateDataBlocksRangeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsTruncateDataBlocksRangeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsTruncateDataBlocksRangeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent} F2fsTruncateDataBlocksRangeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsTruncateDataBlocksRangeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.nid = r.uint32();
                        break;
                    case 4:
                        m.ofs = r.uint32();
                        break;
                    case 5:
                        m.free = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsTruncateDataBlocksRangeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent} F2fsTruncateDataBlocksRangeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsTruncateDataBlocksRangeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsTruncateDataBlocksRangeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsTruncateDataBlocksRangeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    if (!$util.isInteger(m.nid))
                        return "nid: integer expected";
                }
                if (m.ofs != null && m.hasOwnProperty("ofs")) {
                    if (!$util.isInteger(m.ofs))
                        return "ofs: integer expected";
                }
                if (m.free != null && m.hasOwnProperty("free")) {
                    if (!$util.isInteger(m.free))
                        return "free: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsTruncateDataBlocksRangeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent} F2fsTruncateDataBlocksRangeFtraceEvent
             */
            F2fsTruncateDataBlocksRangeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.nid != null) {
                    m.nid = d.nid >>> 0;
                }
                if (d.ofs != null) {
                    m.ofs = d.ofs >>> 0;
                }
                if (d.free != null) {
                    m.free = d.free | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsTruncateDataBlocksRangeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent} m F2fsTruncateDataBlocksRangeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsTruncateDataBlocksRangeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.nid = 0;
                    d.ofs = 0;
                    d.free = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    d.nid = m.nid;
                }
                if (m.ofs != null && m.hasOwnProperty("ofs")) {
                    d.ofs = m.ofs;
                }
                if (m.free != null && m.hasOwnProperty("free")) {
                    d.free = m.free;
                }
                return d;
            };

            /**
             * Converts this F2fsTruncateDataBlocksRangeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsTruncateDataBlocksRangeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsTruncateDataBlocksRangeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsTruncateDataBlocksRangeFtraceEvent;
        })();

        protos.F2fsTruncateInodeBlocksEnterFtraceEvent = (function() {

            /**
             * Properties of a F2fsTruncateInodeBlocksEnterFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsTruncateInodeBlocksEnterFtraceEvent
             * @property {number|null} [dev] F2fsTruncateInodeBlocksEnterFtraceEvent dev
             * @property {number|null} [ino] F2fsTruncateInodeBlocksEnterFtraceEvent ino
             * @property {number|null} [size] F2fsTruncateInodeBlocksEnterFtraceEvent size
             * @property {number|null} [blocks] F2fsTruncateInodeBlocksEnterFtraceEvent blocks
             * @property {number|null} [from] F2fsTruncateInodeBlocksEnterFtraceEvent from
             */

            /**
             * Constructs a new F2fsTruncateInodeBlocksEnterFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsTruncateInodeBlocksEnterFtraceEvent.
             * @implements IF2fsTruncateInodeBlocksEnterFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsTruncateInodeBlocksEnterFtraceEvent=} [p] Properties to set
             */
            function F2fsTruncateInodeBlocksEnterFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsTruncateInodeBlocksEnterFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent
             * @instance
             */
            F2fsTruncateInodeBlocksEnterFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsTruncateInodeBlocksEnterFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent
             * @instance
             */
            F2fsTruncateInodeBlocksEnterFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsTruncateInodeBlocksEnterFtraceEvent size.
             * @member {number} size
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent
             * @instance
             */
            F2fsTruncateInodeBlocksEnterFtraceEvent.prototype.size = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * F2fsTruncateInodeBlocksEnterFtraceEvent blocks.
             * @member {number} blocks
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent
             * @instance
             */
            F2fsTruncateInodeBlocksEnterFtraceEvent.prototype.blocks = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsTruncateInodeBlocksEnterFtraceEvent from.
             * @member {number} from
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent
             * @instance
             */
            F2fsTruncateInodeBlocksEnterFtraceEvent.prototype.from = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new F2fsTruncateInodeBlocksEnterFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateInodeBlocksEnterFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent} F2fsTruncateInodeBlocksEnterFtraceEvent instance
             */
            F2fsTruncateInodeBlocksEnterFtraceEvent.create = function create(properties) {
                return new F2fsTruncateInodeBlocksEnterFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsTruncateInodeBlocksEnterFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateInodeBlocksEnterFtraceEvent} m F2fsTruncateInodeBlocksEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsTruncateInodeBlocksEnterFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.size != null && Object.hasOwnProperty.call(m, "size"))
                    w.uint32(24).int64(m.size);
                if (m.blocks != null && Object.hasOwnProperty.call(m, "blocks"))
                    w.uint32(32).uint64(m.blocks);
                if (m.from != null && Object.hasOwnProperty.call(m, "from"))
                    w.uint32(40).uint64(m.from);
                return w;
            };

            /**
             * Encodes the specified F2fsTruncateInodeBlocksEnterFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateInodeBlocksEnterFtraceEvent} message F2fsTruncateInodeBlocksEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsTruncateInodeBlocksEnterFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsTruncateInodeBlocksEnterFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent} F2fsTruncateInodeBlocksEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsTruncateInodeBlocksEnterFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.size = r.int64();
                        break;
                    case 4:
                        m.blocks = r.uint64();
                        break;
                    case 5:
                        m.from = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsTruncateInodeBlocksEnterFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent} F2fsTruncateInodeBlocksEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsTruncateInodeBlocksEnterFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsTruncateInodeBlocksEnterFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsTruncateInodeBlocksEnterFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (!$util.isInteger(m.size) && !(m.size && $util.isInteger(m.size.low) && $util.isInteger(m.size.high)))
                        return "size: integer|Long expected";
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (!$util.isInteger(m.blocks) && !(m.blocks && $util.isInteger(m.blocks.low) && $util.isInteger(m.blocks.high)))
                        return "blocks: integer|Long expected";
                }
                if (m.from != null && m.hasOwnProperty("from")) {
                    if (!$util.isInteger(m.from) && !(m.from && $util.isInteger(m.from.low) && $util.isInteger(m.from.high)))
                        return "from: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a F2fsTruncateInodeBlocksEnterFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent} F2fsTruncateInodeBlocksEnterFtraceEvent
             */
            F2fsTruncateInodeBlocksEnterFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.size != null) {
                    if ($util.Long)
                        (m.size = $util.Long.fromValue(d.size)).unsigned = false;
                    else if (typeof d.size === "string")
                        m.size = parseInt(d.size, 10);
                    else if (typeof d.size === "number")
                        m.size = d.size;
                    else if (typeof d.size === "object")
                        m.size = new $util.LongBits(d.size.low >>> 0, d.size.high >>> 0).toNumber();
                }
                if (d.blocks != null) {
                    if ($util.Long)
                        (m.blocks = $util.Long.fromValue(d.blocks)).unsigned = true;
                    else if (typeof d.blocks === "string")
                        m.blocks = parseInt(d.blocks, 10);
                    else if (typeof d.blocks === "number")
                        m.blocks = d.blocks;
                    else if (typeof d.blocks === "object")
                        m.blocks = new $util.LongBits(d.blocks.low >>> 0, d.blocks.high >>> 0).toNumber(true);
                }
                if (d.from != null) {
                    if ($util.Long)
                        (m.from = $util.Long.fromValue(d.from)).unsigned = true;
                    else if (typeof d.from === "string")
                        m.from = parseInt(d.from, 10);
                    else if (typeof d.from === "number")
                        m.from = d.from;
                    else if (typeof d.from === "object")
                        m.from = new $util.LongBits(d.from.low >>> 0, d.from.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsTruncateInodeBlocksEnterFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent} m F2fsTruncateInodeBlocksEnterFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsTruncateInodeBlocksEnterFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.size = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.size = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.blocks = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.blocks = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.from = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.from = o.longs === String ? "0" : 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (typeof m.size === "number")
                        d.size = o.longs === String ? String(m.size) : m.size;
                    else
                        d.size = o.longs === String ? $util.Long.prototype.toString.call(m.size) : o.longs === Number ? new $util.LongBits(m.size.low >>> 0, m.size.high >>> 0).toNumber() : m.size;
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (typeof m.blocks === "number")
                        d.blocks = o.longs === String ? String(m.blocks) : m.blocks;
                    else
                        d.blocks = o.longs === String ? $util.Long.prototype.toString.call(m.blocks) : o.longs === Number ? new $util.LongBits(m.blocks.low >>> 0, m.blocks.high >>> 0).toNumber(true) : m.blocks;
                }
                if (m.from != null && m.hasOwnProperty("from")) {
                    if (typeof m.from === "number")
                        d.from = o.longs === String ? String(m.from) : m.from;
                    else
                        d.from = o.longs === String ? $util.Long.prototype.toString.call(m.from) : o.longs === Number ? new $util.LongBits(m.from.low >>> 0, m.from.high >>> 0).toNumber(true) : m.from;
                }
                return d;
            };

            /**
             * Converts this F2fsTruncateInodeBlocksEnterFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksEnterFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsTruncateInodeBlocksEnterFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsTruncateInodeBlocksEnterFtraceEvent;
        })();

        protos.F2fsTruncateInodeBlocksExitFtraceEvent = (function() {

            /**
             * Properties of a F2fsTruncateInodeBlocksExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsTruncateInodeBlocksExitFtraceEvent
             * @property {number|null} [dev] F2fsTruncateInodeBlocksExitFtraceEvent dev
             * @property {number|null} [ino] F2fsTruncateInodeBlocksExitFtraceEvent ino
             * @property {number|null} [ret] F2fsTruncateInodeBlocksExitFtraceEvent ret
             */

            /**
             * Constructs a new F2fsTruncateInodeBlocksExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsTruncateInodeBlocksExitFtraceEvent.
             * @implements IF2fsTruncateInodeBlocksExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsTruncateInodeBlocksExitFtraceEvent=} [p] Properties to set
             */
            function F2fsTruncateInodeBlocksExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsTruncateInodeBlocksExitFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent
             * @instance
             */
            F2fsTruncateInodeBlocksExitFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsTruncateInodeBlocksExitFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent
             * @instance
             */
            F2fsTruncateInodeBlocksExitFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsTruncateInodeBlocksExitFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent
             * @instance
             */
            F2fsTruncateInodeBlocksExitFtraceEvent.prototype.ret = 0;

            /**
             * Creates a new F2fsTruncateInodeBlocksExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateInodeBlocksExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent} F2fsTruncateInodeBlocksExitFtraceEvent instance
             */
            F2fsTruncateInodeBlocksExitFtraceEvent.create = function create(properties) {
                return new F2fsTruncateInodeBlocksExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsTruncateInodeBlocksExitFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateInodeBlocksExitFtraceEvent} m F2fsTruncateInodeBlocksExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsTruncateInodeBlocksExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(24).int32(m.ret);
                return w;
            };

            /**
             * Encodes the specified F2fsTruncateInodeBlocksExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateInodeBlocksExitFtraceEvent} message F2fsTruncateInodeBlocksExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsTruncateInodeBlocksExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsTruncateInodeBlocksExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent} F2fsTruncateInodeBlocksExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsTruncateInodeBlocksExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.ret = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsTruncateInodeBlocksExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent} F2fsTruncateInodeBlocksExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsTruncateInodeBlocksExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsTruncateInodeBlocksExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsTruncateInodeBlocksExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsTruncateInodeBlocksExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent} F2fsTruncateInodeBlocksExitFtraceEvent
             */
            F2fsTruncateInodeBlocksExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsTruncateInodeBlocksExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent} m F2fsTruncateInodeBlocksExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsTruncateInodeBlocksExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.ret = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                return d;
            };

            /**
             * Converts this F2fsTruncateInodeBlocksExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsTruncateInodeBlocksExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsTruncateInodeBlocksExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsTruncateInodeBlocksExitFtraceEvent;
        })();

        protos.F2fsTruncateNodeFtraceEvent = (function() {

            /**
             * Properties of a F2fsTruncateNodeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsTruncateNodeFtraceEvent
             * @property {number|null} [dev] F2fsTruncateNodeFtraceEvent dev
             * @property {number|null} [ino] F2fsTruncateNodeFtraceEvent ino
             * @property {number|null} [nid] F2fsTruncateNodeFtraceEvent nid
             * @property {number|null} [blkAddr] F2fsTruncateNodeFtraceEvent blkAddr
             */

            /**
             * Constructs a new F2fsTruncateNodeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsTruncateNodeFtraceEvent.
             * @implements IF2fsTruncateNodeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsTruncateNodeFtraceEvent=} [p] Properties to set
             */
            function F2fsTruncateNodeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsTruncateNodeFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsTruncateNodeFtraceEvent
             * @instance
             */
            F2fsTruncateNodeFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsTruncateNodeFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsTruncateNodeFtraceEvent
             * @instance
             */
            F2fsTruncateNodeFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsTruncateNodeFtraceEvent nid.
             * @member {number} nid
             * @memberof perfetto.protos.F2fsTruncateNodeFtraceEvent
             * @instance
             */
            F2fsTruncateNodeFtraceEvent.prototype.nid = 0;

            /**
             * F2fsTruncateNodeFtraceEvent blkAddr.
             * @member {number} blkAddr
             * @memberof perfetto.protos.F2fsTruncateNodeFtraceEvent
             * @instance
             */
            F2fsTruncateNodeFtraceEvent.prototype.blkAddr = 0;

            /**
             * Creates a new F2fsTruncateNodeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsTruncateNodeFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateNodeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsTruncateNodeFtraceEvent} F2fsTruncateNodeFtraceEvent instance
             */
            F2fsTruncateNodeFtraceEvent.create = function create(properties) {
                return new F2fsTruncateNodeFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsTruncateNodeFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsTruncateNodeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsTruncateNodeFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateNodeFtraceEvent} m F2fsTruncateNodeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsTruncateNodeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.nid != null && Object.hasOwnProperty.call(m, "nid"))
                    w.uint32(24).uint32(m.nid);
                if (m.blkAddr != null && Object.hasOwnProperty.call(m, "blkAddr"))
                    w.uint32(32).uint32(m.blkAddr);
                return w;
            };

            /**
             * Encodes the specified F2fsTruncateNodeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsTruncateNodeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsTruncateNodeFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateNodeFtraceEvent} message F2fsTruncateNodeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsTruncateNodeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsTruncateNodeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsTruncateNodeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsTruncateNodeFtraceEvent} F2fsTruncateNodeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsTruncateNodeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsTruncateNodeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.nid = r.uint32();
                        break;
                    case 4:
                        m.blkAddr = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsTruncateNodeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsTruncateNodeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsTruncateNodeFtraceEvent} F2fsTruncateNodeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsTruncateNodeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsTruncateNodeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsTruncateNodeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsTruncateNodeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    if (!$util.isInteger(m.nid))
                        return "nid: integer expected";
                }
                if (m.blkAddr != null && m.hasOwnProperty("blkAddr")) {
                    if (!$util.isInteger(m.blkAddr))
                        return "blkAddr: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsTruncateNodeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsTruncateNodeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsTruncateNodeFtraceEvent} F2fsTruncateNodeFtraceEvent
             */
            F2fsTruncateNodeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsTruncateNodeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsTruncateNodeFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.nid != null) {
                    m.nid = d.nid >>> 0;
                }
                if (d.blkAddr != null) {
                    m.blkAddr = d.blkAddr >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsTruncateNodeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsTruncateNodeFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsTruncateNodeFtraceEvent} m F2fsTruncateNodeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsTruncateNodeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.nid = 0;
                    d.blkAddr = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    d.nid = m.nid;
                }
                if (m.blkAddr != null && m.hasOwnProperty("blkAddr")) {
                    d.blkAddr = m.blkAddr;
                }
                return d;
            };

            /**
             * Converts this F2fsTruncateNodeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsTruncateNodeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsTruncateNodeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsTruncateNodeFtraceEvent;
        })();

        protos.F2fsTruncateNodesEnterFtraceEvent = (function() {

            /**
             * Properties of a F2fsTruncateNodesEnterFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsTruncateNodesEnterFtraceEvent
             * @property {number|null} [dev] F2fsTruncateNodesEnterFtraceEvent dev
             * @property {number|null} [ino] F2fsTruncateNodesEnterFtraceEvent ino
             * @property {number|null} [nid] F2fsTruncateNodesEnterFtraceEvent nid
             * @property {number|null} [blkAddr] F2fsTruncateNodesEnterFtraceEvent blkAddr
             */

            /**
             * Constructs a new F2fsTruncateNodesEnterFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsTruncateNodesEnterFtraceEvent.
             * @implements IF2fsTruncateNodesEnterFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsTruncateNodesEnterFtraceEvent=} [p] Properties to set
             */
            function F2fsTruncateNodesEnterFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsTruncateNodesEnterFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsTruncateNodesEnterFtraceEvent
             * @instance
             */
            F2fsTruncateNodesEnterFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsTruncateNodesEnterFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsTruncateNodesEnterFtraceEvent
             * @instance
             */
            F2fsTruncateNodesEnterFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsTruncateNodesEnterFtraceEvent nid.
             * @member {number} nid
             * @memberof perfetto.protos.F2fsTruncateNodesEnterFtraceEvent
             * @instance
             */
            F2fsTruncateNodesEnterFtraceEvent.prototype.nid = 0;

            /**
             * F2fsTruncateNodesEnterFtraceEvent blkAddr.
             * @member {number} blkAddr
             * @memberof perfetto.protos.F2fsTruncateNodesEnterFtraceEvent
             * @instance
             */
            F2fsTruncateNodesEnterFtraceEvent.prototype.blkAddr = 0;

            /**
             * Creates a new F2fsTruncateNodesEnterFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsTruncateNodesEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateNodesEnterFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsTruncateNodesEnterFtraceEvent} F2fsTruncateNodesEnterFtraceEvent instance
             */
            F2fsTruncateNodesEnterFtraceEvent.create = function create(properties) {
                return new F2fsTruncateNodesEnterFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsTruncateNodesEnterFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsTruncateNodesEnterFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsTruncateNodesEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateNodesEnterFtraceEvent} m F2fsTruncateNodesEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsTruncateNodesEnterFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.nid != null && Object.hasOwnProperty.call(m, "nid"))
                    w.uint32(24).uint32(m.nid);
                if (m.blkAddr != null && Object.hasOwnProperty.call(m, "blkAddr"))
                    w.uint32(32).uint32(m.blkAddr);
                return w;
            };

            /**
             * Encodes the specified F2fsTruncateNodesEnterFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsTruncateNodesEnterFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsTruncateNodesEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateNodesEnterFtraceEvent} message F2fsTruncateNodesEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsTruncateNodesEnterFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsTruncateNodesEnterFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsTruncateNodesEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsTruncateNodesEnterFtraceEvent} F2fsTruncateNodesEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsTruncateNodesEnterFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsTruncateNodesEnterFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.nid = r.uint32();
                        break;
                    case 4:
                        m.blkAddr = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsTruncateNodesEnterFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsTruncateNodesEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsTruncateNodesEnterFtraceEvent} F2fsTruncateNodesEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsTruncateNodesEnterFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsTruncateNodesEnterFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsTruncateNodesEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsTruncateNodesEnterFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    if (!$util.isInteger(m.nid))
                        return "nid: integer expected";
                }
                if (m.blkAddr != null && m.hasOwnProperty("blkAddr")) {
                    if (!$util.isInteger(m.blkAddr))
                        return "blkAddr: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsTruncateNodesEnterFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsTruncateNodesEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsTruncateNodesEnterFtraceEvent} F2fsTruncateNodesEnterFtraceEvent
             */
            F2fsTruncateNodesEnterFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsTruncateNodesEnterFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsTruncateNodesEnterFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.nid != null) {
                    m.nid = d.nid >>> 0;
                }
                if (d.blkAddr != null) {
                    m.blkAddr = d.blkAddr >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsTruncateNodesEnterFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsTruncateNodesEnterFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsTruncateNodesEnterFtraceEvent} m F2fsTruncateNodesEnterFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsTruncateNodesEnterFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.nid = 0;
                    d.blkAddr = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    d.nid = m.nid;
                }
                if (m.blkAddr != null && m.hasOwnProperty("blkAddr")) {
                    d.blkAddr = m.blkAddr;
                }
                return d;
            };

            /**
             * Converts this F2fsTruncateNodesEnterFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsTruncateNodesEnterFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsTruncateNodesEnterFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsTruncateNodesEnterFtraceEvent;
        })();

        protos.F2fsTruncateNodesExitFtraceEvent = (function() {

            /**
             * Properties of a F2fsTruncateNodesExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsTruncateNodesExitFtraceEvent
             * @property {number|null} [dev] F2fsTruncateNodesExitFtraceEvent dev
             * @property {number|null} [ino] F2fsTruncateNodesExitFtraceEvent ino
             * @property {number|null} [ret] F2fsTruncateNodesExitFtraceEvent ret
             */

            /**
             * Constructs a new F2fsTruncateNodesExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsTruncateNodesExitFtraceEvent.
             * @implements IF2fsTruncateNodesExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsTruncateNodesExitFtraceEvent=} [p] Properties to set
             */
            function F2fsTruncateNodesExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsTruncateNodesExitFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsTruncateNodesExitFtraceEvent
             * @instance
             */
            F2fsTruncateNodesExitFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsTruncateNodesExitFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsTruncateNodesExitFtraceEvent
             * @instance
             */
            F2fsTruncateNodesExitFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsTruncateNodesExitFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.F2fsTruncateNodesExitFtraceEvent
             * @instance
             */
            F2fsTruncateNodesExitFtraceEvent.prototype.ret = 0;

            /**
             * Creates a new F2fsTruncateNodesExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsTruncateNodesExitFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateNodesExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsTruncateNodesExitFtraceEvent} F2fsTruncateNodesExitFtraceEvent instance
             */
            F2fsTruncateNodesExitFtraceEvent.create = function create(properties) {
                return new F2fsTruncateNodesExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsTruncateNodesExitFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsTruncateNodesExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsTruncateNodesExitFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateNodesExitFtraceEvent} m F2fsTruncateNodesExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsTruncateNodesExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(24).int32(m.ret);
                return w;
            };

            /**
             * Encodes the specified F2fsTruncateNodesExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsTruncateNodesExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsTruncateNodesExitFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncateNodesExitFtraceEvent} message F2fsTruncateNodesExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsTruncateNodesExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsTruncateNodesExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsTruncateNodesExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsTruncateNodesExitFtraceEvent} F2fsTruncateNodesExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsTruncateNodesExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsTruncateNodesExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.ret = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsTruncateNodesExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsTruncateNodesExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsTruncateNodesExitFtraceEvent} F2fsTruncateNodesExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsTruncateNodesExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsTruncateNodesExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsTruncateNodesExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsTruncateNodesExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsTruncateNodesExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsTruncateNodesExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsTruncateNodesExitFtraceEvent} F2fsTruncateNodesExitFtraceEvent
             */
            F2fsTruncateNodesExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsTruncateNodesExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsTruncateNodesExitFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsTruncateNodesExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsTruncateNodesExitFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsTruncateNodesExitFtraceEvent} m F2fsTruncateNodesExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsTruncateNodesExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.ret = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                return d;
            };

            /**
             * Converts this F2fsTruncateNodesExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsTruncateNodesExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsTruncateNodesExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsTruncateNodesExitFtraceEvent;
        })();

        protos.F2fsTruncatePartialNodesFtraceEvent = (function() {

            /**
             * Properties of a F2fsTruncatePartialNodesFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsTruncatePartialNodesFtraceEvent
             * @property {number|null} [dev] F2fsTruncatePartialNodesFtraceEvent dev
             * @property {number|null} [ino] F2fsTruncatePartialNodesFtraceEvent ino
             * @property {number|null} [nid] F2fsTruncatePartialNodesFtraceEvent nid
             * @property {number|null} [depth] F2fsTruncatePartialNodesFtraceEvent depth
             * @property {number|null} [err] F2fsTruncatePartialNodesFtraceEvent err
             */

            /**
             * Constructs a new F2fsTruncatePartialNodesFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsTruncatePartialNodesFtraceEvent.
             * @implements IF2fsTruncatePartialNodesFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsTruncatePartialNodesFtraceEvent=} [p] Properties to set
             */
            function F2fsTruncatePartialNodesFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsTruncatePartialNodesFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsTruncatePartialNodesFtraceEvent
             * @instance
             */
            F2fsTruncatePartialNodesFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsTruncatePartialNodesFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsTruncatePartialNodesFtraceEvent
             * @instance
             */
            F2fsTruncatePartialNodesFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsTruncatePartialNodesFtraceEvent nid.
             * @member {number} nid
             * @memberof perfetto.protos.F2fsTruncatePartialNodesFtraceEvent
             * @instance
             */
            F2fsTruncatePartialNodesFtraceEvent.prototype.nid = 0;

            /**
             * F2fsTruncatePartialNodesFtraceEvent depth.
             * @member {number} depth
             * @memberof perfetto.protos.F2fsTruncatePartialNodesFtraceEvent
             * @instance
             */
            F2fsTruncatePartialNodesFtraceEvent.prototype.depth = 0;

            /**
             * F2fsTruncatePartialNodesFtraceEvent err.
             * @member {number} err
             * @memberof perfetto.protos.F2fsTruncatePartialNodesFtraceEvent
             * @instance
             */
            F2fsTruncatePartialNodesFtraceEvent.prototype.err = 0;

            /**
             * Creates a new F2fsTruncatePartialNodesFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsTruncatePartialNodesFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncatePartialNodesFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsTruncatePartialNodesFtraceEvent} F2fsTruncatePartialNodesFtraceEvent instance
             */
            F2fsTruncatePartialNodesFtraceEvent.create = function create(properties) {
                return new F2fsTruncatePartialNodesFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsTruncatePartialNodesFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsTruncatePartialNodesFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsTruncatePartialNodesFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncatePartialNodesFtraceEvent} m F2fsTruncatePartialNodesFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsTruncatePartialNodesFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.nid != null && Object.hasOwnProperty.call(m, "nid"))
                    w.uint32(24).uint32(m.nid);
                if (m.depth != null && Object.hasOwnProperty.call(m, "depth"))
                    w.uint32(32).int32(m.depth);
                if (m.err != null && Object.hasOwnProperty.call(m, "err"))
                    w.uint32(40).int32(m.err);
                return w;
            };

            /**
             * Encodes the specified F2fsTruncatePartialNodesFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsTruncatePartialNodesFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsTruncatePartialNodesFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsTruncatePartialNodesFtraceEvent} message F2fsTruncatePartialNodesFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsTruncatePartialNodesFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsTruncatePartialNodesFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsTruncatePartialNodesFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsTruncatePartialNodesFtraceEvent} F2fsTruncatePartialNodesFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsTruncatePartialNodesFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsTruncatePartialNodesFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.nid = r.uint32();
                        break;
                    case 4:
                        m.depth = r.int32();
                        break;
                    case 5:
                        m.err = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsTruncatePartialNodesFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsTruncatePartialNodesFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsTruncatePartialNodesFtraceEvent} F2fsTruncatePartialNodesFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsTruncatePartialNodesFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsTruncatePartialNodesFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsTruncatePartialNodesFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsTruncatePartialNodesFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    if (!$util.isInteger(m.nid))
                        return "nid: integer expected";
                }
                if (m.depth != null && m.hasOwnProperty("depth")) {
                    if (!$util.isInteger(m.depth))
                        return "depth: integer expected";
                }
                if (m.err != null && m.hasOwnProperty("err")) {
                    if (!$util.isInteger(m.err))
                        return "err: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsTruncatePartialNodesFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsTruncatePartialNodesFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsTruncatePartialNodesFtraceEvent} F2fsTruncatePartialNodesFtraceEvent
             */
            F2fsTruncatePartialNodesFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsTruncatePartialNodesFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsTruncatePartialNodesFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.nid != null) {
                    m.nid = d.nid >>> 0;
                }
                if (d.depth != null) {
                    m.depth = d.depth | 0;
                }
                if (d.err != null) {
                    m.err = d.err | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsTruncatePartialNodesFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsTruncatePartialNodesFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsTruncatePartialNodesFtraceEvent} m F2fsTruncatePartialNodesFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsTruncatePartialNodesFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.nid = 0;
                    d.depth = 0;
                    d.err = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    d.nid = m.nid;
                }
                if (m.depth != null && m.hasOwnProperty("depth")) {
                    d.depth = m.depth;
                }
                if (m.err != null && m.hasOwnProperty("err")) {
                    d.err = m.err;
                }
                return d;
            };

            /**
             * Converts this F2fsTruncatePartialNodesFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsTruncatePartialNodesFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsTruncatePartialNodesFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsTruncatePartialNodesFtraceEvent;
        })();

        protos.F2fsUnlinkEnterFtraceEvent = (function() {

            /**
             * Properties of a F2fsUnlinkEnterFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsUnlinkEnterFtraceEvent
             * @property {number|null} [dev] F2fsUnlinkEnterFtraceEvent dev
             * @property {number|null} [ino] F2fsUnlinkEnterFtraceEvent ino
             * @property {number|null} [size] F2fsUnlinkEnterFtraceEvent size
             * @property {number|null} [blocks] F2fsUnlinkEnterFtraceEvent blocks
             * @property {string|null} [name] F2fsUnlinkEnterFtraceEvent name
             */

            /**
             * Constructs a new F2fsUnlinkEnterFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsUnlinkEnterFtraceEvent.
             * @implements IF2fsUnlinkEnterFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsUnlinkEnterFtraceEvent=} [p] Properties to set
             */
            function F2fsUnlinkEnterFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsUnlinkEnterFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsUnlinkEnterFtraceEvent
             * @instance
             */
            F2fsUnlinkEnterFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsUnlinkEnterFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsUnlinkEnterFtraceEvent
             * @instance
             */
            F2fsUnlinkEnterFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsUnlinkEnterFtraceEvent size.
             * @member {number} size
             * @memberof perfetto.protos.F2fsUnlinkEnterFtraceEvent
             * @instance
             */
            F2fsUnlinkEnterFtraceEvent.prototype.size = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * F2fsUnlinkEnterFtraceEvent blocks.
             * @member {number} blocks
             * @memberof perfetto.protos.F2fsUnlinkEnterFtraceEvent
             * @instance
             */
            F2fsUnlinkEnterFtraceEvent.prototype.blocks = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsUnlinkEnterFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.F2fsUnlinkEnterFtraceEvent
             * @instance
             */
            F2fsUnlinkEnterFtraceEvent.prototype.name = "";

            /**
             * Creates a new F2fsUnlinkEnterFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsUnlinkEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsUnlinkEnterFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsUnlinkEnterFtraceEvent} F2fsUnlinkEnterFtraceEvent instance
             */
            F2fsUnlinkEnterFtraceEvent.create = function create(properties) {
                return new F2fsUnlinkEnterFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsUnlinkEnterFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsUnlinkEnterFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsUnlinkEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsUnlinkEnterFtraceEvent} m F2fsUnlinkEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsUnlinkEnterFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.size != null && Object.hasOwnProperty.call(m, "size"))
                    w.uint32(24).int64(m.size);
                if (m.blocks != null && Object.hasOwnProperty.call(m, "blocks"))
                    w.uint32(32).uint64(m.blocks);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(42).string(m.name);
                return w;
            };

            /**
             * Encodes the specified F2fsUnlinkEnterFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsUnlinkEnterFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsUnlinkEnterFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsUnlinkEnterFtraceEvent} message F2fsUnlinkEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsUnlinkEnterFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsUnlinkEnterFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsUnlinkEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsUnlinkEnterFtraceEvent} F2fsUnlinkEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsUnlinkEnterFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsUnlinkEnterFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.size = r.int64();
                        break;
                    case 4:
                        m.blocks = r.uint64();
                        break;
                    case 5:
                        m.name = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsUnlinkEnterFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsUnlinkEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsUnlinkEnterFtraceEvent} F2fsUnlinkEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsUnlinkEnterFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsUnlinkEnterFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsUnlinkEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsUnlinkEnterFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (!$util.isInteger(m.size) && !(m.size && $util.isInteger(m.size.low) && $util.isInteger(m.size.high)))
                        return "size: integer|Long expected";
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (!$util.isInteger(m.blocks) && !(m.blocks && $util.isInteger(m.blocks.low) && $util.isInteger(m.blocks.high)))
                        return "blocks: integer|Long expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                return null;
            };

            /**
             * Creates a F2fsUnlinkEnterFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsUnlinkEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsUnlinkEnterFtraceEvent} F2fsUnlinkEnterFtraceEvent
             */
            F2fsUnlinkEnterFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsUnlinkEnterFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsUnlinkEnterFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.size != null) {
                    if ($util.Long)
                        (m.size = $util.Long.fromValue(d.size)).unsigned = false;
                    else if (typeof d.size === "string")
                        m.size = parseInt(d.size, 10);
                    else if (typeof d.size === "number")
                        m.size = d.size;
                    else if (typeof d.size === "object")
                        m.size = new $util.LongBits(d.size.low >>> 0, d.size.high >>> 0).toNumber();
                }
                if (d.blocks != null) {
                    if ($util.Long)
                        (m.blocks = $util.Long.fromValue(d.blocks)).unsigned = true;
                    else if (typeof d.blocks === "string")
                        m.blocks = parseInt(d.blocks, 10);
                    else if (typeof d.blocks === "number")
                        m.blocks = d.blocks;
                    else if (typeof d.blocks === "object")
                        m.blocks = new $util.LongBits(d.blocks.low >>> 0, d.blocks.high >>> 0).toNumber(true);
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsUnlinkEnterFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsUnlinkEnterFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsUnlinkEnterFtraceEvent} m F2fsUnlinkEnterFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsUnlinkEnterFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.size = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.size = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.blocks = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.blocks = o.longs === String ? "0" : 0;
                    d.name = "";
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (typeof m.size === "number")
                        d.size = o.longs === String ? String(m.size) : m.size;
                    else
                        d.size = o.longs === String ? $util.Long.prototype.toString.call(m.size) : o.longs === Number ? new $util.LongBits(m.size.low >>> 0, m.size.high >>> 0).toNumber() : m.size;
                }
                if (m.blocks != null && m.hasOwnProperty("blocks")) {
                    if (typeof m.blocks === "number")
                        d.blocks = o.longs === String ? String(m.blocks) : m.blocks;
                    else
                        d.blocks = o.longs === String ? $util.Long.prototype.toString.call(m.blocks) : o.longs === Number ? new $util.LongBits(m.blocks.low >>> 0, m.blocks.high >>> 0).toNumber(true) : m.blocks;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                return d;
            };

            /**
             * Converts this F2fsUnlinkEnterFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsUnlinkEnterFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsUnlinkEnterFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsUnlinkEnterFtraceEvent;
        })();

        protos.F2fsUnlinkExitFtraceEvent = (function() {

            /**
             * Properties of a F2fsUnlinkExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsUnlinkExitFtraceEvent
             * @property {number|null} [dev] F2fsUnlinkExitFtraceEvent dev
             * @property {number|null} [ino] F2fsUnlinkExitFtraceEvent ino
             * @property {number|null} [ret] F2fsUnlinkExitFtraceEvent ret
             */

            /**
             * Constructs a new F2fsUnlinkExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsUnlinkExitFtraceEvent.
             * @implements IF2fsUnlinkExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsUnlinkExitFtraceEvent=} [p] Properties to set
             */
            function F2fsUnlinkExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsUnlinkExitFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsUnlinkExitFtraceEvent
             * @instance
             */
            F2fsUnlinkExitFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsUnlinkExitFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsUnlinkExitFtraceEvent
             * @instance
             */
            F2fsUnlinkExitFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsUnlinkExitFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.F2fsUnlinkExitFtraceEvent
             * @instance
             */
            F2fsUnlinkExitFtraceEvent.prototype.ret = 0;

            /**
             * Creates a new F2fsUnlinkExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsUnlinkExitFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsUnlinkExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsUnlinkExitFtraceEvent} F2fsUnlinkExitFtraceEvent instance
             */
            F2fsUnlinkExitFtraceEvent.create = function create(properties) {
                return new F2fsUnlinkExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsUnlinkExitFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsUnlinkExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsUnlinkExitFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsUnlinkExitFtraceEvent} m F2fsUnlinkExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsUnlinkExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(24).int32(m.ret);
                return w;
            };

            /**
             * Encodes the specified F2fsUnlinkExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsUnlinkExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsUnlinkExitFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsUnlinkExitFtraceEvent} message F2fsUnlinkExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsUnlinkExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsUnlinkExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsUnlinkExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsUnlinkExitFtraceEvent} F2fsUnlinkExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsUnlinkExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsUnlinkExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.ret = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsUnlinkExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsUnlinkExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsUnlinkExitFtraceEvent} F2fsUnlinkExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsUnlinkExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsUnlinkExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsUnlinkExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsUnlinkExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsUnlinkExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsUnlinkExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsUnlinkExitFtraceEvent} F2fsUnlinkExitFtraceEvent
             */
            F2fsUnlinkExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsUnlinkExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsUnlinkExitFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsUnlinkExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsUnlinkExitFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsUnlinkExitFtraceEvent} m F2fsUnlinkExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsUnlinkExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.ret = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                return d;
            };

            /**
             * Converts this F2fsUnlinkExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsUnlinkExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsUnlinkExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsUnlinkExitFtraceEvent;
        })();

        protos.F2fsVmPageMkwriteFtraceEvent = (function() {

            /**
             * Properties of a F2fsVmPageMkwriteFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsVmPageMkwriteFtraceEvent
             * @property {number|null} [dev] F2fsVmPageMkwriteFtraceEvent dev
             * @property {number|null} [ino] F2fsVmPageMkwriteFtraceEvent ino
             * @property {number|null} [type] F2fsVmPageMkwriteFtraceEvent type
             * @property {number|null} [dir] F2fsVmPageMkwriteFtraceEvent dir
             * @property {number|null} [index] F2fsVmPageMkwriteFtraceEvent index
             * @property {number|null} [dirty] F2fsVmPageMkwriteFtraceEvent dirty
             * @property {number|null} [uptodate] F2fsVmPageMkwriteFtraceEvent uptodate
             */

            /**
             * Constructs a new F2fsVmPageMkwriteFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsVmPageMkwriteFtraceEvent.
             * @implements IF2fsVmPageMkwriteFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsVmPageMkwriteFtraceEvent=} [p] Properties to set
             */
            function F2fsVmPageMkwriteFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsVmPageMkwriteFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsVmPageMkwriteFtraceEvent
             * @instance
             */
            F2fsVmPageMkwriteFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsVmPageMkwriteFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsVmPageMkwriteFtraceEvent
             * @instance
             */
            F2fsVmPageMkwriteFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsVmPageMkwriteFtraceEvent type.
             * @member {number} type
             * @memberof perfetto.protos.F2fsVmPageMkwriteFtraceEvent
             * @instance
             */
            F2fsVmPageMkwriteFtraceEvent.prototype.type = 0;

            /**
             * F2fsVmPageMkwriteFtraceEvent dir.
             * @member {number} dir
             * @memberof perfetto.protos.F2fsVmPageMkwriteFtraceEvent
             * @instance
             */
            F2fsVmPageMkwriteFtraceEvent.prototype.dir = 0;

            /**
             * F2fsVmPageMkwriteFtraceEvent index.
             * @member {number} index
             * @memberof perfetto.protos.F2fsVmPageMkwriteFtraceEvent
             * @instance
             */
            F2fsVmPageMkwriteFtraceEvent.prototype.index = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsVmPageMkwriteFtraceEvent dirty.
             * @member {number} dirty
             * @memberof perfetto.protos.F2fsVmPageMkwriteFtraceEvent
             * @instance
             */
            F2fsVmPageMkwriteFtraceEvent.prototype.dirty = 0;

            /**
             * F2fsVmPageMkwriteFtraceEvent uptodate.
             * @member {number} uptodate
             * @memberof perfetto.protos.F2fsVmPageMkwriteFtraceEvent
             * @instance
             */
            F2fsVmPageMkwriteFtraceEvent.prototype.uptodate = 0;

            /**
             * Creates a new F2fsVmPageMkwriteFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsVmPageMkwriteFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsVmPageMkwriteFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsVmPageMkwriteFtraceEvent} F2fsVmPageMkwriteFtraceEvent instance
             */
            F2fsVmPageMkwriteFtraceEvent.create = function create(properties) {
                return new F2fsVmPageMkwriteFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsVmPageMkwriteFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsVmPageMkwriteFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsVmPageMkwriteFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsVmPageMkwriteFtraceEvent} m F2fsVmPageMkwriteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsVmPageMkwriteFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                    w.uint32(24).int32(m.type);
                if (m.dir != null && Object.hasOwnProperty.call(m, "dir"))
                    w.uint32(32).int32(m.dir);
                if (m.index != null && Object.hasOwnProperty.call(m, "index"))
                    w.uint32(40).uint64(m.index);
                if (m.dirty != null && Object.hasOwnProperty.call(m, "dirty"))
                    w.uint32(48).int32(m.dirty);
                if (m.uptodate != null && Object.hasOwnProperty.call(m, "uptodate"))
                    w.uint32(56).int32(m.uptodate);
                return w;
            };

            /**
             * Encodes the specified F2fsVmPageMkwriteFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsVmPageMkwriteFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsVmPageMkwriteFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsVmPageMkwriteFtraceEvent} message F2fsVmPageMkwriteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsVmPageMkwriteFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsVmPageMkwriteFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsVmPageMkwriteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsVmPageMkwriteFtraceEvent} F2fsVmPageMkwriteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsVmPageMkwriteFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsVmPageMkwriteFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.type = r.int32();
                        break;
                    case 4:
                        m.dir = r.int32();
                        break;
                    case 5:
                        m.index = r.uint64();
                        break;
                    case 6:
                        m.dirty = r.int32();
                        break;
                    case 7:
                        m.uptodate = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsVmPageMkwriteFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsVmPageMkwriteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsVmPageMkwriteFtraceEvent} F2fsVmPageMkwriteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsVmPageMkwriteFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsVmPageMkwriteFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsVmPageMkwriteFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsVmPageMkwriteFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    if (!$util.isInteger(m.type))
                        return "type: integer expected";
                }
                if (m.dir != null && m.hasOwnProperty("dir")) {
                    if (!$util.isInteger(m.dir))
                        return "dir: integer expected";
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (!$util.isInteger(m.index) && !(m.index && $util.isInteger(m.index.low) && $util.isInteger(m.index.high)))
                        return "index: integer|Long expected";
                }
                if (m.dirty != null && m.hasOwnProperty("dirty")) {
                    if (!$util.isInteger(m.dirty))
                        return "dirty: integer expected";
                }
                if (m.uptodate != null && m.hasOwnProperty("uptodate")) {
                    if (!$util.isInteger(m.uptodate))
                        return "uptodate: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsVmPageMkwriteFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsVmPageMkwriteFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsVmPageMkwriteFtraceEvent} F2fsVmPageMkwriteFtraceEvent
             */
            F2fsVmPageMkwriteFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsVmPageMkwriteFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsVmPageMkwriteFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.type != null) {
                    m.type = d.type | 0;
                }
                if (d.dir != null) {
                    m.dir = d.dir | 0;
                }
                if (d.index != null) {
                    if ($util.Long)
                        (m.index = $util.Long.fromValue(d.index)).unsigned = true;
                    else if (typeof d.index === "string")
                        m.index = parseInt(d.index, 10);
                    else if (typeof d.index === "number")
                        m.index = d.index;
                    else if (typeof d.index === "object")
                        m.index = new $util.LongBits(d.index.low >>> 0, d.index.high >>> 0).toNumber(true);
                }
                if (d.dirty != null) {
                    m.dirty = d.dirty | 0;
                }
                if (d.uptodate != null) {
                    m.uptodate = d.uptodate | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsVmPageMkwriteFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsVmPageMkwriteFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsVmPageMkwriteFtraceEvent} m F2fsVmPageMkwriteFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsVmPageMkwriteFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    d.type = 0;
                    d.dir = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.index = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.index = o.longs === String ? "0" : 0;
                    d.dirty = 0;
                    d.uptodate = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    d.type = m.type;
                }
                if (m.dir != null && m.hasOwnProperty("dir")) {
                    d.dir = m.dir;
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (typeof m.index === "number")
                        d.index = o.longs === String ? String(m.index) : m.index;
                    else
                        d.index = o.longs === String ? $util.Long.prototype.toString.call(m.index) : o.longs === Number ? new $util.LongBits(m.index.low >>> 0, m.index.high >>> 0).toNumber(true) : m.index;
                }
                if (m.dirty != null && m.hasOwnProperty("dirty")) {
                    d.dirty = m.dirty;
                }
                if (m.uptodate != null && m.hasOwnProperty("uptodate")) {
                    d.uptodate = m.uptodate;
                }
                return d;
            };

            /**
             * Converts this F2fsVmPageMkwriteFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsVmPageMkwriteFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsVmPageMkwriteFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsVmPageMkwriteFtraceEvent;
        })();

        protos.F2fsWriteBeginFtraceEvent = (function() {

            /**
             * Properties of a F2fsWriteBeginFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsWriteBeginFtraceEvent
             * @property {number|null} [dev] F2fsWriteBeginFtraceEvent dev
             * @property {number|null} [ino] F2fsWriteBeginFtraceEvent ino
             * @property {number|null} [pos] F2fsWriteBeginFtraceEvent pos
             * @property {number|null} [len] F2fsWriteBeginFtraceEvent len
             * @property {number|null} [flags] F2fsWriteBeginFtraceEvent flags
             */

            /**
             * Constructs a new F2fsWriteBeginFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsWriteBeginFtraceEvent.
             * @implements IF2fsWriteBeginFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsWriteBeginFtraceEvent=} [p] Properties to set
             */
            function F2fsWriteBeginFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsWriteBeginFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsWriteBeginFtraceEvent
             * @instance
             */
            F2fsWriteBeginFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsWriteBeginFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsWriteBeginFtraceEvent
             * @instance
             */
            F2fsWriteBeginFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsWriteBeginFtraceEvent pos.
             * @member {number} pos
             * @memberof perfetto.protos.F2fsWriteBeginFtraceEvent
             * @instance
             */
            F2fsWriteBeginFtraceEvent.prototype.pos = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * F2fsWriteBeginFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.F2fsWriteBeginFtraceEvent
             * @instance
             */
            F2fsWriteBeginFtraceEvent.prototype.len = 0;

            /**
             * F2fsWriteBeginFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.F2fsWriteBeginFtraceEvent
             * @instance
             */
            F2fsWriteBeginFtraceEvent.prototype.flags = 0;

            /**
             * Creates a new F2fsWriteBeginFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsWriteBeginFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsWriteBeginFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsWriteBeginFtraceEvent} F2fsWriteBeginFtraceEvent instance
             */
            F2fsWriteBeginFtraceEvent.create = function create(properties) {
                return new F2fsWriteBeginFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsWriteBeginFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsWriteBeginFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsWriteBeginFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsWriteBeginFtraceEvent} m F2fsWriteBeginFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsWriteBeginFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.pos != null && Object.hasOwnProperty.call(m, "pos"))
                    w.uint32(24).int64(m.pos);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).uint32(m.len);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(40).uint32(m.flags);
                return w;
            };

            /**
             * Encodes the specified F2fsWriteBeginFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsWriteBeginFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsWriteBeginFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsWriteBeginFtraceEvent} message F2fsWriteBeginFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsWriteBeginFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsWriteBeginFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsWriteBeginFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsWriteBeginFtraceEvent} F2fsWriteBeginFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsWriteBeginFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsWriteBeginFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.pos = r.int64();
                        break;
                    case 4:
                        m.len = r.uint32();
                        break;
                    case 5:
                        m.flags = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsWriteBeginFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsWriteBeginFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsWriteBeginFtraceEvent} F2fsWriteBeginFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsWriteBeginFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsWriteBeginFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsWriteBeginFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsWriteBeginFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.pos != null && m.hasOwnProperty("pos")) {
                    if (!$util.isInteger(m.pos) && !(m.pos && $util.isInteger(m.pos.low) && $util.isInteger(m.pos.high)))
                        return "pos: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsWriteBeginFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsWriteBeginFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsWriteBeginFtraceEvent} F2fsWriteBeginFtraceEvent
             */
            F2fsWriteBeginFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsWriteBeginFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsWriteBeginFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.pos != null) {
                    if ($util.Long)
                        (m.pos = $util.Long.fromValue(d.pos)).unsigned = false;
                    else if (typeof d.pos === "string")
                        m.pos = parseInt(d.pos, 10);
                    else if (typeof d.pos === "number")
                        m.pos = d.pos;
                    else if (typeof d.pos === "object")
                        m.pos = new $util.LongBits(d.pos.low >>> 0, d.pos.high >>> 0).toNumber();
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsWriteBeginFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsWriteBeginFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsWriteBeginFtraceEvent} m F2fsWriteBeginFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsWriteBeginFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.pos = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pos = o.longs === String ? "0" : 0;
                    d.len = 0;
                    d.flags = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.pos != null && m.hasOwnProperty("pos")) {
                    if (typeof m.pos === "number")
                        d.pos = o.longs === String ? String(m.pos) : m.pos;
                    else
                        d.pos = o.longs === String ? $util.Long.prototype.toString.call(m.pos) : o.longs === Number ? new $util.LongBits(m.pos.low >>> 0, m.pos.high >>> 0).toNumber() : m.pos;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                return d;
            };

            /**
             * Converts this F2fsWriteBeginFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsWriteBeginFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsWriteBeginFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsWriteBeginFtraceEvent;
        })();

        protos.F2fsWriteCheckpointFtraceEvent = (function() {

            /**
             * Properties of a F2fsWriteCheckpointFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsWriteCheckpointFtraceEvent
             * @property {number|null} [dev] F2fsWriteCheckpointFtraceEvent dev
             * @property {number|null} [isUmount] F2fsWriteCheckpointFtraceEvent isUmount
             * @property {string|null} [msg] F2fsWriteCheckpointFtraceEvent msg
             * @property {number|null} [reason] F2fsWriteCheckpointFtraceEvent reason
             */

            /**
             * Constructs a new F2fsWriteCheckpointFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsWriteCheckpointFtraceEvent.
             * @implements IF2fsWriteCheckpointFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsWriteCheckpointFtraceEvent=} [p] Properties to set
             */
            function F2fsWriteCheckpointFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsWriteCheckpointFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsWriteCheckpointFtraceEvent
             * @instance
             */
            F2fsWriteCheckpointFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsWriteCheckpointFtraceEvent isUmount.
             * @member {number} isUmount
             * @memberof perfetto.protos.F2fsWriteCheckpointFtraceEvent
             * @instance
             */
            F2fsWriteCheckpointFtraceEvent.prototype.isUmount = 0;

            /**
             * F2fsWriteCheckpointFtraceEvent msg.
             * @member {string} msg
             * @memberof perfetto.protos.F2fsWriteCheckpointFtraceEvent
             * @instance
             */
            F2fsWriteCheckpointFtraceEvent.prototype.msg = "";

            /**
             * F2fsWriteCheckpointFtraceEvent reason.
             * @member {number} reason
             * @memberof perfetto.protos.F2fsWriteCheckpointFtraceEvent
             * @instance
             */
            F2fsWriteCheckpointFtraceEvent.prototype.reason = 0;

            /**
             * Creates a new F2fsWriteCheckpointFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsWriteCheckpointFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsWriteCheckpointFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsWriteCheckpointFtraceEvent} F2fsWriteCheckpointFtraceEvent instance
             */
            F2fsWriteCheckpointFtraceEvent.create = function create(properties) {
                return new F2fsWriteCheckpointFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsWriteCheckpointFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsWriteCheckpointFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsWriteCheckpointFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsWriteCheckpointFtraceEvent} m F2fsWriteCheckpointFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsWriteCheckpointFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.isUmount != null && Object.hasOwnProperty.call(m, "isUmount"))
                    w.uint32(16).uint32(m.isUmount);
                if (m.msg != null && Object.hasOwnProperty.call(m, "msg"))
                    w.uint32(26).string(m.msg);
                if (m.reason != null && Object.hasOwnProperty.call(m, "reason"))
                    w.uint32(32).int32(m.reason);
                return w;
            };

            /**
             * Encodes the specified F2fsWriteCheckpointFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsWriteCheckpointFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsWriteCheckpointFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsWriteCheckpointFtraceEvent} message F2fsWriteCheckpointFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsWriteCheckpointFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsWriteCheckpointFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsWriteCheckpointFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsWriteCheckpointFtraceEvent} F2fsWriteCheckpointFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsWriteCheckpointFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsWriteCheckpointFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.isUmount = r.uint32();
                        break;
                    case 3:
                        m.msg = r.string();
                        break;
                    case 4:
                        m.reason = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsWriteCheckpointFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsWriteCheckpointFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsWriteCheckpointFtraceEvent} F2fsWriteCheckpointFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsWriteCheckpointFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsWriteCheckpointFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsWriteCheckpointFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsWriteCheckpointFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.isUmount != null && m.hasOwnProperty("isUmount")) {
                    if (!$util.isInteger(m.isUmount))
                        return "isUmount: integer expected";
                }
                if (m.msg != null && m.hasOwnProperty("msg")) {
                    if (!$util.isString(m.msg))
                        return "msg: string expected";
                }
                if (m.reason != null && m.hasOwnProperty("reason")) {
                    if (!$util.isInteger(m.reason))
                        return "reason: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsWriteCheckpointFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsWriteCheckpointFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsWriteCheckpointFtraceEvent} F2fsWriteCheckpointFtraceEvent
             */
            F2fsWriteCheckpointFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsWriteCheckpointFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsWriteCheckpointFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.isUmount != null) {
                    m.isUmount = d.isUmount >>> 0;
                }
                if (d.msg != null) {
                    m.msg = String(d.msg);
                }
                if (d.reason != null) {
                    m.reason = d.reason | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsWriteCheckpointFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsWriteCheckpointFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsWriteCheckpointFtraceEvent} m F2fsWriteCheckpointFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsWriteCheckpointFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    d.isUmount = 0;
                    d.msg = "";
                    d.reason = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.isUmount != null && m.hasOwnProperty("isUmount")) {
                    d.isUmount = m.isUmount;
                }
                if (m.msg != null && m.hasOwnProperty("msg")) {
                    d.msg = m.msg;
                }
                if (m.reason != null && m.hasOwnProperty("reason")) {
                    d.reason = m.reason;
                }
                return d;
            };

            /**
             * Converts this F2fsWriteCheckpointFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsWriteCheckpointFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsWriteCheckpointFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsWriteCheckpointFtraceEvent;
        })();

        protos.F2fsWriteEndFtraceEvent = (function() {

            /**
             * Properties of a F2fsWriteEndFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsWriteEndFtraceEvent
             * @property {number|null} [dev] F2fsWriteEndFtraceEvent dev
             * @property {number|null} [ino] F2fsWriteEndFtraceEvent ino
             * @property {number|null} [pos] F2fsWriteEndFtraceEvent pos
             * @property {number|null} [len] F2fsWriteEndFtraceEvent len
             * @property {number|null} [copied] F2fsWriteEndFtraceEvent copied
             */

            /**
             * Constructs a new F2fsWriteEndFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsWriteEndFtraceEvent.
             * @implements IF2fsWriteEndFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsWriteEndFtraceEvent=} [p] Properties to set
             */
            function F2fsWriteEndFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsWriteEndFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsWriteEndFtraceEvent
             * @instance
             */
            F2fsWriteEndFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsWriteEndFtraceEvent ino.
             * @member {number} ino
             * @memberof perfetto.protos.F2fsWriteEndFtraceEvent
             * @instance
             */
            F2fsWriteEndFtraceEvent.prototype.ino = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsWriteEndFtraceEvent pos.
             * @member {number} pos
             * @memberof perfetto.protos.F2fsWriteEndFtraceEvent
             * @instance
             */
            F2fsWriteEndFtraceEvent.prototype.pos = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * F2fsWriteEndFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.F2fsWriteEndFtraceEvent
             * @instance
             */
            F2fsWriteEndFtraceEvent.prototype.len = 0;

            /**
             * F2fsWriteEndFtraceEvent copied.
             * @member {number} copied
             * @memberof perfetto.protos.F2fsWriteEndFtraceEvent
             * @instance
             */
            F2fsWriteEndFtraceEvent.prototype.copied = 0;

            /**
             * Creates a new F2fsWriteEndFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsWriteEndFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsWriteEndFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsWriteEndFtraceEvent} F2fsWriteEndFtraceEvent instance
             */
            F2fsWriteEndFtraceEvent.create = function create(properties) {
                return new F2fsWriteEndFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsWriteEndFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsWriteEndFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsWriteEndFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsWriteEndFtraceEvent} m F2fsWriteEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsWriteEndFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(8).uint64(m.dev);
                if (m.ino != null && Object.hasOwnProperty.call(m, "ino"))
                    w.uint32(16).uint64(m.ino);
                if (m.pos != null && Object.hasOwnProperty.call(m, "pos"))
                    w.uint32(24).int64(m.pos);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).uint32(m.len);
                if (m.copied != null && Object.hasOwnProperty.call(m, "copied"))
                    w.uint32(40).uint32(m.copied);
                return w;
            };

            /**
             * Encodes the specified F2fsWriteEndFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsWriteEndFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsWriteEndFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsWriteEndFtraceEvent} message F2fsWriteEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsWriteEndFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsWriteEndFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsWriteEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsWriteEndFtraceEvent} F2fsWriteEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsWriteEndFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsWriteEndFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dev = r.uint64();
                        break;
                    case 2:
                        m.ino = r.uint64();
                        break;
                    case 3:
                        m.pos = r.int64();
                        break;
                    case 4:
                        m.len = r.uint32();
                        break;
                    case 5:
                        m.copied = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsWriteEndFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsWriteEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsWriteEndFtraceEvent} F2fsWriteEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsWriteEndFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsWriteEndFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsWriteEndFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsWriteEndFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (!$util.isInteger(m.ino) && !(m.ino && $util.isInteger(m.ino.low) && $util.isInteger(m.ino.high)))
                        return "ino: integer|Long expected";
                }
                if (m.pos != null && m.hasOwnProperty("pos")) {
                    if (!$util.isInteger(m.pos) && !(m.pos && $util.isInteger(m.pos.low) && $util.isInteger(m.pos.high)))
                        return "pos: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.copied != null && m.hasOwnProperty("copied")) {
                    if (!$util.isInteger(m.copied))
                        return "copied: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsWriteEndFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsWriteEndFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsWriteEndFtraceEvent} F2fsWriteEndFtraceEvent
             */
            F2fsWriteEndFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsWriteEndFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsWriteEndFtraceEvent();
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.ino != null) {
                    if ($util.Long)
                        (m.ino = $util.Long.fromValue(d.ino)).unsigned = true;
                    else if (typeof d.ino === "string")
                        m.ino = parseInt(d.ino, 10);
                    else if (typeof d.ino === "number")
                        m.ino = d.ino;
                    else if (typeof d.ino === "object")
                        m.ino = new $util.LongBits(d.ino.low >>> 0, d.ino.high >>> 0).toNumber(true);
                }
                if (d.pos != null) {
                    if ($util.Long)
                        (m.pos = $util.Long.fromValue(d.pos)).unsigned = false;
                    else if (typeof d.pos === "string")
                        m.pos = parseInt(d.pos, 10);
                    else if (typeof d.pos === "number")
                        m.pos = d.pos;
                    else if (typeof d.pos === "object")
                        m.pos = new $util.LongBits(d.pos.low >>> 0, d.pos.high >>> 0).toNumber();
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.copied != null) {
                    m.copied = d.copied >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsWriteEndFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsWriteEndFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsWriteEndFtraceEvent} m F2fsWriteEndFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsWriteEndFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ino = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ino = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.pos = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pos = o.longs === String ? "0" : 0;
                    d.len = 0;
                    d.copied = 0;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.ino != null && m.hasOwnProperty("ino")) {
                    if (typeof m.ino === "number")
                        d.ino = o.longs === String ? String(m.ino) : m.ino;
                    else
                        d.ino = o.longs === String ? $util.Long.prototype.toString.call(m.ino) : o.longs === Number ? new $util.LongBits(m.ino.low >>> 0, m.ino.high >>> 0).toNumber(true) : m.ino;
                }
                if (m.pos != null && m.hasOwnProperty("pos")) {
                    if (typeof m.pos === "number")
                        d.pos = o.longs === String ? String(m.pos) : m.pos;
                    else
                        d.pos = o.longs === String ? $util.Long.prototype.toString.call(m.pos) : o.longs === Number ? new $util.LongBits(m.pos.low >>> 0, m.pos.high >>> 0).toNumber() : m.pos;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.copied != null && m.hasOwnProperty("copied")) {
                    d.copied = m.copied;
                }
                return d;
            };

            /**
             * Converts this F2fsWriteEndFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsWriteEndFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsWriteEndFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsWriteEndFtraceEvent;
        })();

        protos.F2fsIostatFtraceEvent = (function() {

            /**
             * Properties of a F2fsIostatFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsIostatFtraceEvent
             * @property {number|null} [appBio] F2fsIostatFtraceEvent appBio
             * @property {number|null} [appBrio] F2fsIostatFtraceEvent appBrio
             * @property {number|null} [appDio] F2fsIostatFtraceEvent appDio
             * @property {number|null} [appDrio] F2fsIostatFtraceEvent appDrio
             * @property {number|null} [appMio] F2fsIostatFtraceEvent appMio
             * @property {number|null} [appMrio] F2fsIostatFtraceEvent appMrio
             * @property {number|null} [appRio] F2fsIostatFtraceEvent appRio
             * @property {number|null} [appWio] F2fsIostatFtraceEvent appWio
             * @property {number|null} [dev] F2fsIostatFtraceEvent dev
             * @property {number|null} [fsCdrio] F2fsIostatFtraceEvent fsCdrio
             * @property {number|null} [fsCpDio] F2fsIostatFtraceEvent fsCpDio
             * @property {number|null} [fsCpMio] F2fsIostatFtraceEvent fsCpMio
             * @property {number|null} [fsCpNio] F2fsIostatFtraceEvent fsCpNio
             * @property {number|null} [fsDio] F2fsIostatFtraceEvent fsDio
             * @property {number|null} [fsDiscard] F2fsIostatFtraceEvent fsDiscard
             * @property {number|null} [fsDrio] F2fsIostatFtraceEvent fsDrio
             * @property {number|null} [fsGcDio] F2fsIostatFtraceEvent fsGcDio
             * @property {number|null} [fsGcNio] F2fsIostatFtraceEvent fsGcNio
             * @property {number|null} [fsGdrio] F2fsIostatFtraceEvent fsGdrio
             * @property {number|null} [fsMio] F2fsIostatFtraceEvent fsMio
             * @property {number|null} [fsMrio] F2fsIostatFtraceEvent fsMrio
             * @property {number|null} [fsNio] F2fsIostatFtraceEvent fsNio
             * @property {number|null} [fsNrio] F2fsIostatFtraceEvent fsNrio
             */

            /**
             * Constructs a new F2fsIostatFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsIostatFtraceEvent.
             * @implements IF2fsIostatFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsIostatFtraceEvent=} [p] Properties to set
             */
            function F2fsIostatFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsIostatFtraceEvent appBio.
             * @member {number} appBio
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @instance
             */
            F2fsIostatFtraceEvent.prototype.appBio = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIostatFtraceEvent appBrio.
             * @member {number} appBrio
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @instance
             */
            F2fsIostatFtraceEvent.prototype.appBrio = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIostatFtraceEvent appDio.
             * @member {number} appDio
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @instance
             */
            F2fsIostatFtraceEvent.prototype.appDio = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIostatFtraceEvent appDrio.
             * @member {number} appDrio
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @instance
             */
            F2fsIostatFtraceEvent.prototype.appDrio = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIostatFtraceEvent appMio.
             * @member {number} appMio
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @instance
             */
            F2fsIostatFtraceEvent.prototype.appMio = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIostatFtraceEvent appMrio.
             * @member {number} appMrio
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @instance
             */
            F2fsIostatFtraceEvent.prototype.appMrio = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIostatFtraceEvent appRio.
             * @member {number} appRio
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @instance
             */
            F2fsIostatFtraceEvent.prototype.appRio = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIostatFtraceEvent appWio.
             * @member {number} appWio
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @instance
             */
            F2fsIostatFtraceEvent.prototype.appWio = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIostatFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @instance
             */
            F2fsIostatFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIostatFtraceEvent fsCdrio.
             * @member {number} fsCdrio
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @instance
             */
            F2fsIostatFtraceEvent.prototype.fsCdrio = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIostatFtraceEvent fsCpDio.
             * @member {number} fsCpDio
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @instance
             */
            F2fsIostatFtraceEvent.prototype.fsCpDio = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIostatFtraceEvent fsCpMio.
             * @member {number} fsCpMio
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @instance
             */
            F2fsIostatFtraceEvent.prototype.fsCpMio = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIostatFtraceEvent fsCpNio.
             * @member {number} fsCpNio
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @instance
             */
            F2fsIostatFtraceEvent.prototype.fsCpNio = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIostatFtraceEvent fsDio.
             * @member {number} fsDio
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @instance
             */
            F2fsIostatFtraceEvent.prototype.fsDio = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIostatFtraceEvent fsDiscard.
             * @member {number} fsDiscard
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @instance
             */
            F2fsIostatFtraceEvent.prototype.fsDiscard = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIostatFtraceEvent fsDrio.
             * @member {number} fsDrio
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @instance
             */
            F2fsIostatFtraceEvent.prototype.fsDrio = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIostatFtraceEvent fsGcDio.
             * @member {number} fsGcDio
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @instance
             */
            F2fsIostatFtraceEvent.prototype.fsGcDio = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIostatFtraceEvent fsGcNio.
             * @member {number} fsGcNio
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @instance
             */
            F2fsIostatFtraceEvent.prototype.fsGcNio = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIostatFtraceEvent fsGdrio.
             * @member {number} fsGdrio
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @instance
             */
            F2fsIostatFtraceEvent.prototype.fsGdrio = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIostatFtraceEvent fsMio.
             * @member {number} fsMio
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @instance
             */
            F2fsIostatFtraceEvent.prototype.fsMio = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIostatFtraceEvent fsMrio.
             * @member {number} fsMrio
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @instance
             */
            F2fsIostatFtraceEvent.prototype.fsMrio = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIostatFtraceEvent fsNio.
             * @member {number} fsNio
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @instance
             */
            F2fsIostatFtraceEvent.prototype.fsNio = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIostatFtraceEvent fsNrio.
             * @member {number} fsNrio
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @instance
             */
            F2fsIostatFtraceEvent.prototype.fsNrio = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new F2fsIostatFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsIostatFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsIostatFtraceEvent} F2fsIostatFtraceEvent instance
             */
            F2fsIostatFtraceEvent.create = function create(properties) {
                return new F2fsIostatFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsIostatFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsIostatFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsIostatFtraceEvent} m F2fsIostatFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsIostatFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.appBio != null && Object.hasOwnProperty.call(m, "appBio"))
                    w.uint32(8).uint64(m.appBio);
                if (m.appBrio != null && Object.hasOwnProperty.call(m, "appBrio"))
                    w.uint32(16).uint64(m.appBrio);
                if (m.appDio != null && Object.hasOwnProperty.call(m, "appDio"))
                    w.uint32(24).uint64(m.appDio);
                if (m.appDrio != null && Object.hasOwnProperty.call(m, "appDrio"))
                    w.uint32(32).uint64(m.appDrio);
                if (m.appMio != null && Object.hasOwnProperty.call(m, "appMio"))
                    w.uint32(40).uint64(m.appMio);
                if (m.appMrio != null && Object.hasOwnProperty.call(m, "appMrio"))
                    w.uint32(48).uint64(m.appMrio);
                if (m.appRio != null && Object.hasOwnProperty.call(m, "appRio"))
                    w.uint32(56).uint64(m.appRio);
                if (m.appWio != null && Object.hasOwnProperty.call(m, "appWio"))
                    w.uint32(64).uint64(m.appWio);
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(72).uint64(m.dev);
                if (m.fsCdrio != null && Object.hasOwnProperty.call(m, "fsCdrio"))
                    w.uint32(80).uint64(m.fsCdrio);
                if (m.fsCpDio != null && Object.hasOwnProperty.call(m, "fsCpDio"))
                    w.uint32(88).uint64(m.fsCpDio);
                if (m.fsCpMio != null && Object.hasOwnProperty.call(m, "fsCpMio"))
                    w.uint32(96).uint64(m.fsCpMio);
                if (m.fsCpNio != null && Object.hasOwnProperty.call(m, "fsCpNio"))
                    w.uint32(104).uint64(m.fsCpNio);
                if (m.fsDio != null && Object.hasOwnProperty.call(m, "fsDio"))
                    w.uint32(112).uint64(m.fsDio);
                if (m.fsDiscard != null && Object.hasOwnProperty.call(m, "fsDiscard"))
                    w.uint32(120).uint64(m.fsDiscard);
                if (m.fsDrio != null && Object.hasOwnProperty.call(m, "fsDrio"))
                    w.uint32(128).uint64(m.fsDrio);
                if (m.fsGcDio != null && Object.hasOwnProperty.call(m, "fsGcDio"))
                    w.uint32(136).uint64(m.fsGcDio);
                if (m.fsGcNio != null && Object.hasOwnProperty.call(m, "fsGcNio"))
                    w.uint32(144).uint64(m.fsGcNio);
                if (m.fsGdrio != null && Object.hasOwnProperty.call(m, "fsGdrio"))
                    w.uint32(152).uint64(m.fsGdrio);
                if (m.fsMio != null && Object.hasOwnProperty.call(m, "fsMio"))
                    w.uint32(160).uint64(m.fsMio);
                if (m.fsMrio != null && Object.hasOwnProperty.call(m, "fsMrio"))
                    w.uint32(168).uint64(m.fsMrio);
                if (m.fsNio != null && Object.hasOwnProperty.call(m, "fsNio"))
                    w.uint32(176).uint64(m.fsNio);
                if (m.fsNrio != null && Object.hasOwnProperty.call(m, "fsNrio"))
                    w.uint32(184).uint64(m.fsNrio);
                return w;
            };

            /**
             * Encodes the specified F2fsIostatFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsIostatFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsIostatFtraceEvent} message F2fsIostatFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsIostatFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsIostatFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsIostatFtraceEvent} F2fsIostatFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsIostatFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsIostatFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.appBio = r.uint64();
                        break;
                    case 2:
                        m.appBrio = r.uint64();
                        break;
                    case 3:
                        m.appDio = r.uint64();
                        break;
                    case 4:
                        m.appDrio = r.uint64();
                        break;
                    case 5:
                        m.appMio = r.uint64();
                        break;
                    case 6:
                        m.appMrio = r.uint64();
                        break;
                    case 7:
                        m.appRio = r.uint64();
                        break;
                    case 8:
                        m.appWio = r.uint64();
                        break;
                    case 9:
                        m.dev = r.uint64();
                        break;
                    case 10:
                        m.fsCdrio = r.uint64();
                        break;
                    case 11:
                        m.fsCpDio = r.uint64();
                        break;
                    case 12:
                        m.fsCpMio = r.uint64();
                        break;
                    case 13:
                        m.fsCpNio = r.uint64();
                        break;
                    case 14:
                        m.fsDio = r.uint64();
                        break;
                    case 15:
                        m.fsDiscard = r.uint64();
                        break;
                    case 16:
                        m.fsDrio = r.uint64();
                        break;
                    case 17:
                        m.fsGcDio = r.uint64();
                        break;
                    case 18:
                        m.fsGcNio = r.uint64();
                        break;
                    case 19:
                        m.fsGdrio = r.uint64();
                        break;
                    case 20:
                        m.fsMio = r.uint64();
                        break;
                    case 21:
                        m.fsMrio = r.uint64();
                        break;
                    case 22:
                        m.fsNio = r.uint64();
                        break;
                    case 23:
                        m.fsNrio = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsIostatFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsIostatFtraceEvent} F2fsIostatFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsIostatFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsIostatFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsIostatFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.appBio != null && m.hasOwnProperty("appBio")) {
                    if (!$util.isInteger(m.appBio) && !(m.appBio && $util.isInteger(m.appBio.low) && $util.isInteger(m.appBio.high)))
                        return "appBio: integer|Long expected";
                }
                if (m.appBrio != null && m.hasOwnProperty("appBrio")) {
                    if (!$util.isInteger(m.appBrio) && !(m.appBrio && $util.isInteger(m.appBrio.low) && $util.isInteger(m.appBrio.high)))
                        return "appBrio: integer|Long expected";
                }
                if (m.appDio != null && m.hasOwnProperty("appDio")) {
                    if (!$util.isInteger(m.appDio) && !(m.appDio && $util.isInteger(m.appDio.low) && $util.isInteger(m.appDio.high)))
                        return "appDio: integer|Long expected";
                }
                if (m.appDrio != null && m.hasOwnProperty("appDrio")) {
                    if (!$util.isInteger(m.appDrio) && !(m.appDrio && $util.isInteger(m.appDrio.low) && $util.isInteger(m.appDrio.high)))
                        return "appDrio: integer|Long expected";
                }
                if (m.appMio != null && m.hasOwnProperty("appMio")) {
                    if (!$util.isInteger(m.appMio) && !(m.appMio && $util.isInteger(m.appMio.low) && $util.isInteger(m.appMio.high)))
                        return "appMio: integer|Long expected";
                }
                if (m.appMrio != null && m.hasOwnProperty("appMrio")) {
                    if (!$util.isInteger(m.appMrio) && !(m.appMrio && $util.isInteger(m.appMrio.low) && $util.isInteger(m.appMrio.high)))
                        return "appMrio: integer|Long expected";
                }
                if (m.appRio != null && m.hasOwnProperty("appRio")) {
                    if (!$util.isInteger(m.appRio) && !(m.appRio && $util.isInteger(m.appRio.low) && $util.isInteger(m.appRio.high)))
                        return "appRio: integer|Long expected";
                }
                if (m.appWio != null && m.hasOwnProperty("appWio")) {
                    if (!$util.isInteger(m.appWio) && !(m.appWio && $util.isInteger(m.appWio.low) && $util.isInteger(m.appWio.high)))
                        return "appWio: integer|Long expected";
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.fsCdrio != null && m.hasOwnProperty("fsCdrio")) {
                    if (!$util.isInteger(m.fsCdrio) && !(m.fsCdrio && $util.isInteger(m.fsCdrio.low) && $util.isInteger(m.fsCdrio.high)))
                        return "fsCdrio: integer|Long expected";
                }
                if (m.fsCpDio != null && m.hasOwnProperty("fsCpDio")) {
                    if (!$util.isInteger(m.fsCpDio) && !(m.fsCpDio && $util.isInteger(m.fsCpDio.low) && $util.isInteger(m.fsCpDio.high)))
                        return "fsCpDio: integer|Long expected";
                }
                if (m.fsCpMio != null && m.hasOwnProperty("fsCpMio")) {
                    if (!$util.isInteger(m.fsCpMio) && !(m.fsCpMio && $util.isInteger(m.fsCpMio.low) && $util.isInteger(m.fsCpMio.high)))
                        return "fsCpMio: integer|Long expected";
                }
                if (m.fsCpNio != null && m.hasOwnProperty("fsCpNio")) {
                    if (!$util.isInteger(m.fsCpNio) && !(m.fsCpNio && $util.isInteger(m.fsCpNio.low) && $util.isInteger(m.fsCpNio.high)))
                        return "fsCpNio: integer|Long expected";
                }
                if (m.fsDio != null && m.hasOwnProperty("fsDio")) {
                    if (!$util.isInteger(m.fsDio) && !(m.fsDio && $util.isInteger(m.fsDio.low) && $util.isInteger(m.fsDio.high)))
                        return "fsDio: integer|Long expected";
                }
                if (m.fsDiscard != null && m.hasOwnProperty("fsDiscard")) {
                    if (!$util.isInteger(m.fsDiscard) && !(m.fsDiscard && $util.isInteger(m.fsDiscard.low) && $util.isInteger(m.fsDiscard.high)))
                        return "fsDiscard: integer|Long expected";
                }
                if (m.fsDrio != null && m.hasOwnProperty("fsDrio")) {
                    if (!$util.isInteger(m.fsDrio) && !(m.fsDrio && $util.isInteger(m.fsDrio.low) && $util.isInteger(m.fsDrio.high)))
                        return "fsDrio: integer|Long expected";
                }
                if (m.fsGcDio != null && m.hasOwnProperty("fsGcDio")) {
                    if (!$util.isInteger(m.fsGcDio) && !(m.fsGcDio && $util.isInteger(m.fsGcDio.low) && $util.isInteger(m.fsGcDio.high)))
                        return "fsGcDio: integer|Long expected";
                }
                if (m.fsGcNio != null && m.hasOwnProperty("fsGcNio")) {
                    if (!$util.isInteger(m.fsGcNio) && !(m.fsGcNio && $util.isInteger(m.fsGcNio.low) && $util.isInteger(m.fsGcNio.high)))
                        return "fsGcNio: integer|Long expected";
                }
                if (m.fsGdrio != null && m.hasOwnProperty("fsGdrio")) {
                    if (!$util.isInteger(m.fsGdrio) && !(m.fsGdrio && $util.isInteger(m.fsGdrio.low) && $util.isInteger(m.fsGdrio.high)))
                        return "fsGdrio: integer|Long expected";
                }
                if (m.fsMio != null && m.hasOwnProperty("fsMio")) {
                    if (!$util.isInteger(m.fsMio) && !(m.fsMio && $util.isInteger(m.fsMio.low) && $util.isInteger(m.fsMio.high)))
                        return "fsMio: integer|Long expected";
                }
                if (m.fsMrio != null && m.hasOwnProperty("fsMrio")) {
                    if (!$util.isInteger(m.fsMrio) && !(m.fsMrio && $util.isInteger(m.fsMrio.low) && $util.isInteger(m.fsMrio.high)))
                        return "fsMrio: integer|Long expected";
                }
                if (m.fsNio != null && m.hasOwnProperty("fsNio")) {
                    if (!$util.isInteger(m.fsNio) && !(m.fsNio && $util.isInteger(m.fsNio.low) && $util.isInteger(m.fsNio.high)))
                        return "fsNio: integer|Long expected";
                }
                if (m.fsNrio != null && m.hasOwnProperty("fsNrio")) {
                    if (!$util.isInteger(m.fsNrio) && !(m.fsNrio && $util.isInteger(m.fsNrio.low) && $util.isInteger(m.fsNrio.high)))
                        return "fsNrio: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a F2fsIostatFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsIostatFtraceEvent} F2fsIostatFtraceEvent
             */
            F2fsIostatFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsIostatFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsIostatFtraceEvent();
                if (d.appBio != null) {
                    if ($util.Long)
                        (m.appBio = $util.Long.fromValue(d.appBio)).unsigned = true;
                    else if (typeof d.appBio === "string")
                        m.appBio = parseInt(d.appBio, 10);
                    else if (typeof d.appBio === "number")
                        m.appBio = d.appBio;
                    else if (typeof d.appBio === "object")
                        m.appBio = new $util.LongBits(d.appBio.low >>> 0, d.appBio.high >>> 0).toNumber(true);
                }
                if (d.appBrio != null) {
                    if ($util.Long)
                        (m.appBrio = $util.Long.fromValue(d.appBrio)).unsigned = true;
                    else if (typeof d.appBrio === "string")
                        m.appBrio = parseInt(d.appBrio, 10);
                    else if (typeof d.appBrio === "number")
                        m.appBrio = d.appBrio;
                    else if (typeof d.appBrio === "object")
                        m.appBrio = new $util.LongBits(d.appBrio.low >>> 0, d.appBrio.high >>> 0).toNumber(true);
                }
                if (d.appDio != null) {
                    if ($util.Long)
                        (m.appDio = $util.Long.fromValue(d.appDio)).unsigned = true;
                    else if (typeof d.appDio === "string")
                        m.appDio = parseInt(d.appDio, 10);
                    else if (typeof d.appDio === "number")
                        m.appDio = d.appDio;
                    else if (typeof d.appDio === "object")
                        m.appDio = new $util.LongBits(d.appDio.low >>> 0, d.appDio.high >>> 0).toNumber(true);
                }
                if (d.appDrio != null) {
                    if ($util.Long)
                        (m.appDrio = $util.Long.fromValue(d.appDrio)).unsigned = true;
                    else if (typeof d.appDrio === "string")
                        m.appDrio = parseInt(d.appDrio, 10);
                    else if (typeof d.appDrio === "number")
                        m.appDrio = d.appDrio;
                    else if (typeof d.appDrio === "object")
                        m.appDrio = new $util.LongBits(d.appDrio.low >>> 0, d.appDrio.high >>> 0).toNumber(true);
                }
                if (d.appMio != null) {
                    if ($util.Long)
                        (m.appMio = $util.Long.fromValue(d.appMio)).unsigned = true;
                    else if (typeof d.appMio === "string")
                        m.appMio = parseInt(d.appMio, 10);
                    else if (typeof d.appMio === "number")
                        m.appMio = d.appMio;
                    else if (typeof d.appMio === "object")
                        m.appMio = new $util.LongBits(d.appMio.low >>> 0, d.appMio.high >>> 0).toNumber(true);
                }
                if (d.appMrio != null) {
                    if ($util.Long)
                        (m.appMrio = $util.Long.fromValue(d.appMrio)).unsigned = true;
                    else if (typeof d.appMrio === "string")
                        m.appMrio = parseInt(d.appMrio, 10);
                    else if (typeof d.appMrio === "number")
                        m.appMrio = d.appMrio;
                    else if (typeof d.appMrio === "object")
                        m.appMrio = new $util.LongBits(d.appMrio.low >>> 0, d.appMrio.high >>> 0).toNumber(true);
                }
                if (d.appRio != null) {
                    if ($util.Long)
                        (m.appRio = $util.Long.fromValue(d.appRio)).unsigned = true;
                    else if (typeof d.appRio === "string")
                        m.appRio = parseInt(d.appRio, 10);
                    else if (typeof d.appRio === "number")
                        m.appRio = d.appRio;
                    else if (typeof d.appRio === "object")
                        m.appRio = new $util.LongBits(d.appRio.low >>> 0, d.appRio.high >>> 0).toNumber(true);
                }
                if (d.appWio != null) {
                    if ($util.Long)
                        (m.appWio = $util.Long.fromValue(d.appWio)).unsigned = true;
                    else if (typeof d.appWio === "string")
                        m.appWio = parseInt(d.appWio, 10);
                    else if (typeof d.appWio === "number")
                        m.appWio = d.appWio;
                    else if (typeof d.appWio === "object")
                        m.appWio = new $util.LongBits(d.appWio.low >>> 0, d.appWio.high >>> 0).toNumber(true);
                }
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.fsCdrio != null) {
                    if ($util.Long)
                        (m.fsCdrio = $util.Long.fromValue(d.fsCdrio)).unsigned = true;
                    else if (typeof d.fsCdrio === "string")
                        m.fsCdrio = parseInt(d.fsCdrio, 10);
                    else if (typeof d.fsCdrio === "number")
                        m.fsCdrio = d.fsCdrio;
                    else if (typeof d.fsCdrio === "object")
                        m.fsCdrio = new $util.LongBits(d.fsCdrio.low >>> 0, d.fsCdrio.high >>> 0).toNumber(true);
                }
                if (d.fsCpDio != null) {
                    if ($util.Long)
                        (m.fsCpDio = $util.Long.fromValue(d.fsCpDio)).unsigned = true;
                    else if (typeof d.fsCpDio === "string")
                        m.fsCpDio = parseInt(d.fsCpDio, 10);
                    else if (typeof d.fsCpDio === "number")
                        m.fsCpDio = d.fsCpDio;
                    else if (typeof d.fsCpDio === "object")
                        m.fsCpDio = new $util.LongBits(d.fsCpDio.low >>> 0, d.fsCpDio.high >>> 0).toNumber(true);
                }
                if (d.fsCpMio != null) {
                    if ($util.Long)
                        (m.fsCpMio = $util.Long.fromValue(d.fsCpMio)).unsigned = true;
                    else if (typeof d.fsCpMio === "string")
                        m.fsCpMio = parseInt(d.fsCpMio, 10);
                    else if (typeof d.fsCpMio === "number")
                        m.fsCpMio = d.fsCpMio;
                    else if (typeof d.fsCpMio === "object")
                        m.fsCpMio = new $util.LongBits(d.fsCpMio.low >>> 0, d.fsCpMio.high >>> 0).toNumber(true);
                }
                if (d.fsCpNio != null) {
                    if ($util.Long)
                        (m.fsCpNio = $util.Long.fromValue(d.fsCpNio)).unsigned = true;
                    else if (typeof d.fsCpNio === "string")
                        m.fsCpNio = parseInt(d.fsCpNio, 10);
                    else if (typeof d.fsCpNio === "number")
                        m.fsCpNio = d.fsCpNio;
                    else if (typeof d.fsCpNio === "object")
                        m.fsCpNio = new $util.LongBits(d.fsCpNio.low >>> 0, d.fsCpNio.high >>> 0).toNumber(true);
                }
                if (d.fsDio != null) {
                    if ($util.Long)
                        (m.fsDio = $util.Long.fromValue(d.fsDio)).unsigned = true;
                    else if (typeof d.fsDio === "string")
                        m.fsDio = parseInt(d.fsDio, 10);
                    else if (typeof d.fsDio === "number")
                        m.fsDio = d.fsDio;
                    else if (typeof d.fsDio === "object")
                        m.fsDio = new $util.LongBits(d.fsDio.low >>> 0, d.fsDio.high >>> 0).toNumber(true);
                }
                if (d.fsDiscard != null) {
                    if ($util.Long)
                        (m.fsDiscard = $util.Long.fromValue(d.fsDiscard)).unsigned = true;
                    else if (typeof d.fsDiscard === "string")
                        m.fsDiscard = parseInt(d.fsDiscard, 10);
                    else if (typeof d.fsDiscard === "number")
                        m.fsDiscard = d.fsDiscard;
                    else if (typeof d.fsDiscard === "object")
                        m.fsDiscard = new $util.LongBits(d.fsDiscard.low >>> 0, d.fsDiscard.high >>> 0).toNumber(true);
                }
                if (d.fsDrio != null) {
                    if ($util.Long)
                        (m.fsDrio = $util.Long.fromValue(d.fsDrio)).unsigned = true;
                    else if (typeof d.fsDrio === "string")
                        m.fsDrio = parseInt(d.fsDrio, 10);
                    else if (typeof d.fsDrio === "number")
                        m.fsDrio = d.fsDrio;
                    else if (typeof d.fsDrio === "object")
                        m.fsDrio = new $util.LongBits(d.fsDrio.low >>> 0, d.fsDrio.high >>> 0).toNumber(true);
                }
                if (d.fsGcDio != null) {
                    if ($util.Long)
                        (m.fsGcDio = $util.Long.fromValue(d.fsGcDio)).unsigned = true;
                    else if (typeof d.fsGcDio === "string")
                        m.fsGcDio = parseInt(d.fsGcDio, 10);
                    else if (typeof d.fsGcDio === "number")
                        m.fsGcDio = d.fsGcDio;
                    else if (typeof d.fsGcDio === "object")
                        m.fsGcDio = new $util.LongBits(d.fsGcDio.low >>> 0, d.fsGcDio.high >>> 0).toNumber(true);
                }
                if (d.fsGcNio != null) {
                    if ($util.Long)
                        (m.fsGcNio = $util.Long.fromValue(d.fsGcNio)).unsigned = true;
                    else if (typeof d.fsGcNio === "string")
                        m.fsGcNio = parseInt(d.fsGcNio, 10);
                    else if (typeof d.fsGcNio === "number")
                        m.fsGcNio = d.fsGcNio;
                    else if (typeof d.fsGcNio === "object")
                        m.fsGcNio = new $util.LongBits(d.fsGcNio.low >>> 0, d.fsGcNio.high >>> 0).toNumber(true);
                }
                if (d.fsGdrio != null) {
                    if ($util.Long)
                        (m.fsGdrio = $util.Long.fromValue(d.fsGdrio)).unsigned = true;
                    else if (typeof d.fsGdrio === "string")
                        m.fsGdrio = parseInt(d.fsGdrio, 10);
                    else if (typeof d.fsGdrio === "number")
                        m.fsGdrio = d.fsGdrio;
                    else if (typeof d.fsGdrio === "object")
                        m.fsGdrio = new $util.LongBits(d.fsGdrio.low >>> 0, d.fsGdrio.high >>> 0).toNumber(true);
                }
                if (d.fsMio != null) {
                    if ($util.Long)
                        (m.fsMio = $util.Long.fromValue(d.fsMio)).unsigned = true;
                    else if (typeof d.fsMio === "string")
                        m.fsMio = parseInt(d.fsMio, 10);
                    else if (typeof d.fsMio === "number")
                        m.fsMio = d.fsMio;
                    else if (typeof d.fsMio === "object")
                        m.fsMio = new $util.LongBits(d.fsMio.low >>> 0, d.fsMio.high >>> 0).toNumber(true);
                }
                if (d.fsMrio != null) {
                    if ($util.Long)
                        (m.fsMrio = $util.Long.fromValue(d.fsMrio)).unsigned = true;
                    else if (typeof d.fsMrio === "string")
                        m.fsMrio = parseInt(d.fsMrio, 10);
                    else if (typeof d.fsMrio === "number")
                        m.fsMrio = d.fsMrio;
                    else if (typeof d.fsMrio === "object")
                        m.fsMrio = new $util.LongBits(d.fsMrio.low >>> 0, d.fsMrio.high >>> 0).toNumber(true);
                }
                if (d.fsNio != null) {
                    if ($util.Long)
                        (m.fsNio = $util.Long.fromValue(d.fsNio)).unsigned = true;
                    else if (typeof d.fsNio === "string")
                        m.fsNio = parseInt(d.fsNio, 10);
                    else if (typeof d.fsNio === "number")
                        m.fsNio = d.fsNio;
                    else if (typeof d.fsNio === "object")
                        m.fsNio = new $util.LongBits(d.fsNio.low >>> 0, d.fsNio.high >>> 0).toNumber(true);
                }
                if (d.fsNrio != null) {
                    if ($util.Long)
                        (m.fsNrio = $util.Long.fromValue(d.fsNrio)).unsigned = true;
                    else if (typeof d.fsNrio === "string")
                        m.fsNrio = parseInt(d.fsNrio, 10);
                    else if (typeof d.fsNrio === "number")
                        m.fsNrio = d.fsNrio;
                    else if (typeof d.fsNrio === "object")
                        m.fsNrio = new $util.LongBits(d.fsNrio.low >>> 0, d.fsNrio.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsIostatFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsIostatFtraceEvent} m F2fsIostatFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsIostatFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.appBio = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.appBio = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.appBrio = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.appBrio = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.appDio = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.appDio = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.appDrio = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.appDrio = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.appMio = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.appMio = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.appMrio = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.appMrio = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.appRio = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.appRio = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.appWio = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.appWio = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.fsCdrio = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.fsCdrio = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.fsCpDio = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.fsCpDio = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.fsCpMio = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.fsCpMio = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.fsCpNio = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.fsCpNio = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.fsDio = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.fsDio = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.fsDiscard = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.fsDiscard = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.fsDrio = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.fsDrio = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.fsGcDio = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.fsGcDio = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.fsGcNio = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.fsGcNio = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.fsGdrio = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.fsGdrio = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.fsMio = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.fsMio = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.fsMrio = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.fsMrio = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.fsNio = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.fsNio = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.fsNrio = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.fsNrio = o.longs === String ? "0" : 0;
                }
                if (m.appBio != null && m.hasOwnProperty("appBio")) {
                    if (typeof m.appBio === "number")
                        d.appBio = o.longs === String ? String(m.appBio) : m.appBio;
                    else
                        d.appBio = o.longs === String ? $util.Long.prototype.toString.call(m.appBio) : o.longs === Number ? new $util.LongBits(m.appBio.low >>> 0, m.appBio.high >>> 0).toNumber(true) : m.appBio;
                }
                if (m.appBrio != null && m.hasOwnProperty("appBrio")) {
                    if (typeof m.appBrio === "number")
                        d.appBrio = o.longs === String ? String(m.appBrio) : m.appBrio;
                    else
                        d.appBrio = o.longs === String ? $util.Long.prototype.toString.call(m.appBrio) : o.longs === Number ? new $util.LongBits(m.appBrio.low >>> 0, m.appBrio.high >>> 0).toNumber(true) : m.appBrio;
                }
                if (m.appDio != null && m.hasOwnProperty("appDio")) {
                    if (typeof m.appDio === "number")
                        d.appDio = o.longs === String ? String(m.appDio) : m.appDio;
                    else
                        d.appDio = o.longs === String ? $util.Long.prototype.toString.call(m.appDio) : o.longs === Number ? new $util.LongBits(m.appDio.low >>> 0, m.appDio.high >>> 0).toNumber(true) : m.appDio;
                }
                if (m.appDrio != null && m.hasOwnProperty("appDrio")) {
                    if (typeof m.appDrio === "number")
                        d.appDrio = o.longs === String ? String(m.appDrio) : m.appDrio;
                    else
                        d.appDrio = o.longs === String ? $util.Long.prototype.toString.call(m.appDrio) : o.longs === Number ? new $util.LongBits(m.appDrio.low >>> 0, m.appDrio.high >>> 0).toNumber(true) : m.appDrio;
                }
                if (m.appMio != null && m.hasOwnProperty("appMio")) {
                    if (typeof m.appMio === "number")
                        d.appMio = o.longs === String ? String(m.appMio) : m.appMio;
                    else
                        d.appMio = o.longs === String ? $util.Long.prototype.toString.call(m.appMio) : o.longs === Number ? new $util.LongBits(m.appMio.low >>> 0, m.appMio.high >>> 0).toNumber(true) : m.appMio;
                }
                if (m.appMrio != null && m.hasOwnProperty("appMrio")) {
                    if (typeof m.appMrio === "number")
                        d.appMrio = o.longs === String ? String(m.appMrio) : m.appMrio;
                    else
                        d.appMrio = o.longs === String ? $util.Long.prototype.toString.call(m.appMrio) : o.longs === Number ? new $util.LongBits(m.appMrio.low >>> 0, m.appMrio.high >>> 0).toNumber(true) : m.appMrio;
                }
                if (m.appRio != null && m.hasOwnProperty("appRio")) {
                    if (typeof m.appRio === "number")
                        d.appRio = o.longs === String ? String(m.appRio) : m.appRio;
                    else
                        d.appRio = o.longs === String ? $util.Long.prototype.toString.call(m.appRio) : o.longs === Number ? new $util.LongBits(m.appRio.low >>> 0, m.appRio.high >>> 0).toNumber(true) : m.appRio;
                }
                if (m.appWio != null && m.hasOwnProperty("appWio")) {
                    if (typeof m.appWio === "number")
                        d.appWio = o.longs === String ? String(m.appWio) : m.appWio;
                    else
                        d.appWio = o.longs === String ? $util.Long.prototype.toString.call(m.appWio) : o.longs === Number ? new $util.LongBits(m.appWio.low >>> 0, m.appWio.high >>> 0).toNumber(true) : m.appWio;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.fsCdrio != null && m.hasOwnProperty("fsCdrio")) {
                    if (typeof m.fsCdrio === "number")
                        d.fsCdrio = o.longs === String ? String(m.fsCdrio) : m.fsCdrio;
                    else
                        d.fsCdrio = o.longs === String ? $util.Long.prototype.toString.call(m.fsCdrio) : o.longs === Number ? new $util.LongBits(m.fsCdrio.low >>> 0, m.fsCdrio.high >>> 0).toNumber(true) : m.fsCdrio;
                }
                if (m.fsCpDio != null && m.hasOwnProperty("fsCpDio")) {
                    if (typeof m.fsCpDio === "number")
                        d.fsCpDio = o.longs === String ? String(m.fsCpDio) : m.fsCpDio;
                    else
                        d.fsCpDio = o.longs === String ? $util.Long.prototype.toString.call(m.fsCpDio) : o.longs === Number ? new $util.LongBits(m.fsCpDio.low >>> 0, m.fsCpDio.high >>> 0).toNumber(true) : m.fsCpDio;
                }
                if (m.fsCpMio != null && m.hasOwnProperty("fsCpMio")) {
                    if (typeof m.fsCpMio === "number")
                        d.fsCpMio = o.longs === String ? String(m.fsCpMio) : m.fsCpMio;
                    else
                        d.fsCpMio = o.longs === String ? $util.Long.prototype.toString.call(m.fsCpMio) : o.longs === Number ? new $util.LongBits(m.fsCpMio.low >>> 0, m.fsCpMio.high >>> 0).toNumber(true) : m.fsCpMio;
                }
                if (m.fsCpNio != null && m.hasOwnProperty("fsCpNio")) {
                    if (typeof m.fsCpNio === "number")
                        d.fsCpNio = o.longs === String ? String(m.fsCpNio) : m.fsCpNio;
                    else
                        d.fsCpNio = o.longs === String ? $util.Long.prototype.toString.call(m.fsCpNio) : o.longs === Number ? new $util.LongBits(m.fsCpNio.low >>> 0, m.fsCpNio.high >>> 0).toNumber(true) : m.fsCpNio;
                }
                if (m.fsDio != null && m.hasOwnProperty("fsDio")) {
                    if (typeof m.fsDio === "number")
                        d.fsDio = o.longs === String ? String(m.fsDio) : m.fsDio;
                    else
                        d.fsDio = o.longs === String ? $util.Long.prototype.toString.call(m.fsDio) : o.longs === Number ? new $util.LongBits(m.fsDio.low >>> 0, m.fsDio.high >>> 0).toNumber(true) : m.fsDio;
                }
                if (m.fsDiscard != null && m.hasOwnProperty("fsDiscard")) {
                    if (typeof m.fsDiscard === "number")
                        d.fsDiscard = o.longs === String ? String(m.fsDiscard) : m.fsDiscard;
                    else
                        d.fsDiscard = o.longs === String ? $util.Long.prototype.toString.call(m.fsDiscard) : o.longs === Number ? new $util.LongBits(m.fsDiscard.low >>> 0, m.fsDiscard.high >>> 0).toNumber(true) : m.fsDiscard;
                }
                if (m.fsDrio != null && m.hasOwnProperty("fsDrio")) {
                    if (typeof m.fsDrio === "number")
                        d.fsDrio = o.longs === String ? String(m.fsDrio) : m.fsDrio;
                    else
                        d.fsDrio = o.longs === String ? $util.Long.prototype.toString.call(m.fsDrio) : o.longs === Number ? new $util.LongBits(m.fsDrio.low >>> 0, m.fsDrio.high >>> 0).toNumber(true) : m.fsDrio;
                }
                if (m.fsGcDio != null && m.hasOwnProperty("fsGcDio")) {
                    if (typeof m.fsGcDio === "number")
                        d.fsGcDio = o.longs === String ? String(m.fsGcDio) : m.fsGcDio;
                    else
                        d.fsGcDio = o.longs === String ? $util.Long.prototype.toString.call(m.fsGcDio) : o.longs === Number ? new $util.LongBits(m.fsGcDio.low >>> 0, m.fsGcDio.high >>> 0).toNumber(true) : m.fsGcDio;
                }
                if (m.fsGcNio != null && m.hasOwnProperty("fsGcNio")) {
                    if (typeof m.fsGcNio === "number")
                        d.fsGcNio = o.longs === String ? String(m.fsGcNio) : m.fsGcNio;
                    else
                        d.fsGcNio = o.longs === String ? $util.Long.prototype.toString.call(m.fsGcNio) : o.longs === Number ? new $util.LongBits(m.fsGcNio.low >>> 0, m.fsGcNio.high >>> 0).toNumber(true) : m.fsGcNio;
                }
                if (m.fsGdrio != null && m.hasOwnProperty("fsGdrio")) {
                    if (typeof m.fsGdrio === "number")
                        d.fsGdrio = o.longs === String ? String(m.fsGdrio) : m.fsGdrio;
                    else
                        d.fsGdrio = o.longs === String ? $util.Long.prototype.toString.call(m.fsGdrio) : o.longs === Number ? new $util.LongBits(m.fsGdrio.low >>> 0, m.fsGdrio.high >>> 0).toNumber(true) : m.fsGdrio;
                }
                if (m.fsMio != null && m.hasOwnProperty("fsMio")) {
                    if (typeof m.fsMio === "number")
                        d.fsMio = o.longs === String ? String(m.fsMio) : m.fsMio;
                    else
                        d.fsMio = o.longs === String ? $util.Long.prototype.toString.call(m.fsMio) : o.longs === Number ? new $util.LongBits(m.fsMio.low >>> 0, m.fsMio.high >>> 0).toNumber(true) : m.fsMio;
                }
                if (m.fsMrio != null && m.hasOwnProperty("fsMrio")) {
                    if (typeof m.fsMrio === "number")
                        d.fsMrio = o.longs === String ? String(m.fsMrio) : m.fsMrio;
                    else
                        d.fsMrio = o.longs === String ? $util.Long.prototype.toString.call(m.fsMrio) : o.longs === Number ? new $util.LongBits(m.fsMrio.low >>> 0, m.fsMrio.high >>> 0).toNumber(true) : m.fsMrio;
                }
                if (m.fsNio != null && m.hasOwnProperty("fsNio")) {
                    if (typeof m.fsNio === "number")
                        d.fsNio = o.longs === String ? String(m.fsNio) : m.fsNio;
                    else
                        d.fsNio = o.longs === String ? $util.Long.prototype.toString.call(m.fsNio) : o.longs === Number ? new $util.LongBits(m.fsNio.low >>> 0, m.fsNio.high >>> 0).toNumber(true) : m.fsNio;
                }
                if (m.fsNrio != null && m.hasOwnProperty("fsNrio")) {
                    if (typeof m.fsNrio === "number")
                        d.fsNrio = o.longs === String ? String(m.fsNrio) : m.fsNrio;
                    else
                        d.fsNrio = o.longs === String ? $util.Long.prototype.toString.call(m.fsNrio) : o.longs === Number ? new $util.LongBits(m.fsNrio.low >>> 0, m.fsNrio.high >>> 0).toNumber(true) : m.fsNrio;
                }
                return d;
            };

            /**
             * Converts this F2fsIostatFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsIostatFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsIostatFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsIostatFtraceEvent;
        })();

        protos.F2fsIostatLatencyFtraceEvent = (function() {

            /**
             * Properties of a F2fsIostatLatencyFtraceEvent.
             * @memberof perfetto.protos
             * @interface IF2fsIostatLatencyFtraceEvent
             * @property {number|null} [dRdAvg] F2fsIostatLatencyFtraceEvent dRdAvg
             * @property {number|null} [dRdCnt] F2fsIostatLatencyFtraceEvent dRdCnt
             * @property {number|null} [dRdPeak] F2fsIostatLatencyFtraceEvent dRdPeak
             * @property {number|null} [dWrAsAvg] F2fsIostatLatencyFtraceEvent dWrAsAvg
             * @property {number|null} [dWrAsCnt] F2fsIostatLatencyFtraceEvent dWrAsCnt
             * @property {number|null} [dWrAsPeak] F2fsIostatLatencyFtraceEvent dWrAsPeak
             * @property {number|null} [dWrSAvg] F2fsIostatLatencyFtraceEvent dWrSAvg
             * @property {number|null} [dWrSCnt] F2fsIostatLatencyFtraceEvent dWrSCnt
             * @property {number|null} [dWrSPeak] F2fsIostatLatencyFtraceEvent dWrSPeak
             * @property {number|null} [dev] F2fsIostatLatencyFtraceEvent dev
             * @property {number|null} [mRdAvg] F2fsIostatLatencyFtraceEvent mRdAvg
             * @property {number|null} [mRdCnt] F2fsIostatLatencyFtraceEvent mRdCnt
             * @property {number|null} [mRdPeak] F2fsIostatLatencyFtraceEvent mRdPeak
             * @property {number|null} [mWrAsAvg] F2fsIostatLatencyFtraceEvent mWrAsAvg
             * @property {number|null} [mWrAsCnt] F2fsIostatLatencyFtraceEvent mWrAsCnt
             * @property {number|null} [mWrAsPeak] F2fsIostatLatencyFtraceEvent mWrAsPeak
             * @property {number|null} [mWrSAvg] F2fsIostatLatencyFtraceEvent mWrSAvg
             * @property {number|null} [mWrSCnt] F2fsIostatLatencyFtraceEvent mWrSCnt
             * @property {number|null} [mWrSPeak] F2fsIostatLatencyFtraceEvent mWrSPeak
             * @property {number|null} [nRdAvg] F2fsIostatLatencyFtraceEvent nRdAvg
             * @property {number|null} [nRdCnt] F2fsIostatLatencyFtraceEvent nRdCnt
             * @property {number|null} [nRdPeak] F2fsIostatLatencyFtraceEvent nRdPeak
             * @property {number|null} [nWrAsAvg] F2fsIostatLatencyFtraceEvent nWrAsAvg
             * @property {number|null} [nWrAsCnt] F2fsIostatLatencyFtraceEvent nWrAsCnt
             * @property {number|null} [nWrAsPeak] F2fsIostatLatencyFtraceEvent nWrAsPeak
             * @property {number|null} [nWrSAvg] F2fsIostatLatencyFtraceEvent nWrSAvg
             * @property {number|null} [nWrSCnt] F2fsIostatLatencyFtraceEvent nWrSCnt
             * @property {number|null} [nWrSPeak] F2fsIostatLatencyFtraceEvent nWrSPeak
             */

            /**
             * Constructs a new F2fsIostatLatencyFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a F2fsIostatLatencyFtraceEvent.
             * @implements IF2fsIostatLatencyFtraceEvent
             * @constructor
             * @param {perfetto.protos.IF2fsIostatLatencyFtraceEvent=} [p] Properties to set
             */
            function F2fsIostatLatencyFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * F2fsIostatLatencyFtraceEvent dRdAvg.
             * @member {number} dRdAvg
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.dRdAvg = 0;

            /**
             * F2fsIostatLatencyFtraceEvent dRdCnt.
             * @member {number} dRdCnt
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.dRdCnt = 0;

            /**
             * F2fsIostatLatencyFtraceEvent dRdPeak.
             * @member {number} dRdPeak
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.dRdPeak = 0;

            /**
             * F2fsIostatLatencyFtraceEvent dWrAsAvg.
             * @member {number} dWrAsAvg
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.dWrAsAvg = 0;

            /**
             * F2fsIostatLatencyFtraceEvent dWrAsCnt.
             * @member {number} dWrAsCnt
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.dWrAsCnt = 0;

            /**
             * F2fsIostatLatencyFtraceEvent dWrAsPeak.
             * @member {number} dWrAsPeak
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.dWrAsPeak = 0;

            /**
             * F2fsIostatLatencyFtraceEvent dWrSAvg.
             * @member {number} dWrSAvg
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.dWrSAvg = 0;

            /**
             * F2fsIostatLatencyFtraceEvent dWrSCnt.
             * @member {number} dWrSCnt
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.dWrSCnt = 0;

            /**
             * F2fsIostatLatencyFtraceEvent dWrSPeak.
             * @member {number} dWrSPeak
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.dWrSPeak = 0;

            /**
             * F2fsIostatLatencyFtraceEvent dev.
             * @member {number} dev
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.dev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * F2fsIostatLatencyFtraceEvent mRdAvg.
             * @member {number} mRdAvg
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.mRdAvg = 0;

            /**
             * F2fsIostatLatencyFtraceEvent mRdCnt.
             * @member {number} mRdCnt
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.mRdCnt = 0;

            /**
             * F2fsIostatLatencyFtraceEvent mRdPeak.
             * @member {number} mRdPeak
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.mRdPeak = 0;

            /**
             * F2fsIostatLatencyFtraceEvent mWrAsAvg.
             * @member {number} mWrAsAvg
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.mWrAsAvg = 0;

            /**
             * F2fsIostatLatencyFtraceEvent mWrAsCnt.
             * @member {number} mWrAsCnt
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.mWrAsCnt = 0;

            /**
             * F2fsIostatLatencyFtraceEvent mWrAsPeak.
             * @member {number} mWrAsPeak
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.mWrAsPeak = 0;

            /**
             * F2fsIostatLatencyFtraceEvent mWrSAvg.
             * @member {number} mWrSAvg
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.mWrSAvg = 0;

            /**
             * F2fsIostatLatencyFtraceEvent mWrSCnt.
             * @member {number} mWrSCnt
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.mWrSCnt = 0;

            /**
             * F2fsIostatLatencyFtraceEvent mWrSPeak.
             * @member {number} mWrSPeak
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.mWrSPeak = 0;

            /**
             * F2fsIostatLatencyFtraceEvent nRdAvg.
             * @member {number} nRdAvg
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.nRdAvg = 0;

            /**
             * F2fsIostatLatencyFtraceEvent nRdCnt.
             * @member {number} nRdCnt
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.nRdCnt = 0;

            /**
             * F2fsIostatLatencyFtraceEvent nRdPeak.
             * @member {number} nRdPeak
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.nRdPeak = 0;

            /**
             * F2fsIostatLatencyFtraceEvent nWrAsAvg.
             * @member {number} nWrAsAvg
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.nWrAsAvg = 0;

            /**
             * F2fsIostatLatencyFtraceEvent nWrAsCnt.
             * @member {number} nWrAsCnt
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.nWrAsCnt = 0;

            /**
             * F2fsIostatLatencyFtraceEvent nWrAsPeak.
             * @member {number} nWrAsPeak
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.nWrAsPeak = 0;

            /**
             * F2fsIostatLatencyFtraceEvent nWrSAvg.
             * @member {number} nWrSAvg
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.nWrSAvg = 0;

            /**
             * F2fsIostatLatencyFtraceEvent nWrSCnt.
             * @member {number} nWrSCnt
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.nWrSCnt = 0;

            /**
             * F2fsIostatLatencyFtraceEvent nWrSPeak.
             * @member {number} nWrSPeak
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             */
            F2fsIostatLatencyFtraceEvent.prototype.nWrSPeak = 0;

            /**
             * Creates a new F2fsIostatLatencyFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsIostatLatencyFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.F2fsIostatLatencyFtraceEvent} F2fsIostatLatencyFtraceEvent instance
             */
            F2fsIostatLatencyFtraceEvent.create = function create(properties) {
                return new F2fsIostatLatencyFtraceEvent(properties);
            };

            /**
             * Encodes the specified F2fsIostatLatencyFtraceEvent message. Does not implicitly {@link perfetto.protos.F2fsIostatLatencyFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsIostatLatencyFtraceEvent} m F2fsIostatLatencyFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsIostatLatencyFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dRdAvg != null && Object.hasOwnProperty.call(m, "dRdAvg"))
                    w.uint32(8).uint32(m.dRdAvg);
                if (m.dRdCnt != null && Object.hasOwnProperty.call(m, "dRdCnt"))
                    w.uint32(16).uint32(m.dRdCnt);
                if (m.dRdPeak != null && Object.hasOwnProperty.call(m, "dRdPeak"))
                    w.uint32(24).uint32(m.dRdPeak);
                if (m.dWrAsAvg != null && Object.hasOwnProperty.call(m, "dWrAsAvg"))
                    w.uint32(32).uint32(m.dWrAsAvg);
                if (m.dWrAsCnt != null && Object.hasOwnProperty.call(m, "dWrAsCnt"))
                    w.uint32(40).uint32(m.dWrAsCnt);
                if (m.dWrAsPeak != null && Object.hasOwnProperty.call(m, "dWrAsPeak"))
                    w.uint32(48).uint32(m.dWrAsPeak);
                if (m.dWrSAvg != null && Object.hasOwnProperty.call(m, "dWrSAvg"))
                    w.uint32(56).uint32(m.dWrSAvg);
                if (m.dWrSCnt != null && Object.hasOwnProperty.call(m, "dWrSCnt"))
                    w.uint32(64).uint32(m.dWrSCnt);
                if (m.dWrSPeak != null && Object.hasOwnProperty.call(m, "dWrSPeak"))
                    w.uint32(72).uint32(m.dWrSPeak);
                if (m.dev != null && Object.hasOwnProperty.call(m, "dev"))
                    w.uint32(80).uint64(m.dev);
                if (m.mRdAvg != null && Object.hasOwnProperty.call(m, "mRdAvg"))
                    w.uint32(88).uint32(m.mRdAvg);
                if (m.mRdCnt != null && Object.hasOwnProperty.call(m, "mRdCnt"))
                    w.uint32(96).uint32(m.mRdCnt);
                if (m.mRdPeak != null && Object.hasOwnProperty.call(m, "mRdPeak"))
                    w.uint32(104).uint32(m.mRdPeak);
                if (m.mWrAsAvg != null && Object.hasOwnProperty.call(m, "mWrAsAvg"))
                    w.uint32(112).uint32(m.mWrAsAvg);
                if (m.mWrAsCnt != null && Object.hasOwnProperty.call(m, "mWrAsCnt"))
                    w.uint32(120).uint32(m.mWrAsCnt);
                if (m.mWrAsPeak != null && Object.hasOwnProperty.call(m, "mWrAsPeak"))
                    w.uint32(128).uint32(m.mWrAsPeak);
                if (m.mWrSAvg != null && Object.hasOwnProperty.call(m, "mWrSAvg"))
                    w.uint32(136).uint32(m.mWrSAvg);
                if (m.mWrSCnt != null && Object.hasOwnProperty.call(m, "mWrSCnt"))
                    w.uint32(144).uint32(m.mWrSCnt);
                if (m.mWrSPeak != null && Object.hasOwnProperty.call(m, "mWrSPeak"))
                    w.uint32(152).uint32(m.mWrSPeak);
                if (m.nRdAvg != null && Object.hasOwnProperty.call(m, "nRdAvg"))
                    w.uint32(160).uint32(m.nRdAvg);
                if (m.nRdCnt != null && Object.hasOwnProperty.call(m, "nRdCnt"))
                    w.uint32(168).uint32(m.nRdCnt);
                if (m.nRdPeak != null && Object.hasOwnProperty.call(m, "nRdPeak"))
                    w.uint32(176).uint32(m.nRdPeak);
                if (m.nWrAsAvg != null && Object.hasOwnProperty.call(m, "nWrAsAvg"))
                    w.uint32(184).uint32(m.nWrAsAvg);
                if (m.nWrAsCnt != null && Object.hasOwnProperty.call(m, "nWrAsCnt"))
                    w.uint32(192).uint32(m.nWrAsCnt);
                if (m.nWrAsPeak != null && Object.hasOwnProperty.call(m, "nWrAsPeak"))
                    w.uint32(200).uint32(m.nWrAsPeak);
                if (m.nWrSAvg != null && Object.hasOwnProperty.call(m, "nWrSAvg"))
                    w.uint32(208).uint32(m.nWrSAvg);
                if (m.nWrSCnt != null && Object.hasOwnProperty.call(m, "nWrSCnt"))
                    w.uint32(216).uint32(m.nWrSCnt);
                if (m.nWrSPeak != null && Object.hasOwnProperty.call(m, "nWrSPeak"))
                    w.uint32(224).uint32(m.nWrSPeak);
                return w;
            };

            /**
             * Encodes the specified F2fsIostatLatencyFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.F2fsIostatLatencyFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @static
             * @param {perfetto.protos.IF2fsIostatLatencyFtraceEvent} message F2fsIostatLatencyFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            F2fsIostatLatencyFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a F2fsIostatLatencyFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.F2fsIostatLatencyFtraceEvent} F2fsIostatLatencyFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsIostatLatencyFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.F2fsIostatLatencyFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dRdAvg = r.uint32();
                        break;
                    case 2:
                        m.dRdCnt = r.uint32();
                        break;
                    case 3:
                        m.dRdPeak = r.uint32();
                        break;
                    case 4:
                        m.dWrAsAvg = r.uint32();
                        break;
                    case 5:
                        m.dWrAsCnt = r.uint32();
                        break;
                    case 6:
                        m.dWrAsPeak = r.uint32();
                        break;
                    case 7:
                        m.dWrSAvg = r.uint32();
                        break;
                    case 8:
                        m.dWrSCnt = r.uint32();
                        break;
                    case 9:
                        m.dWrSPeak = r.uint32();
                        break;
                    case 10:
                        m.dev = r.uint64();
                        break;
                    case 11:
                        m.mRdAvg = r.uint32();
                        break;
                    case 12:
                        m.mRdCnt = r.uint32();
                        break;
                    case 13:
                        m.mRdPeak = r.uint32();
                        break;
                    case 14:
                        m.mWrAsAvg = r.uint32();
                        break;
                    case 15:
                        m.mWrAsCnt = r.uint32();
                        break;
                    case 16:
                        m.mWrAsPeak = r.uint32();
                        break;
                    case 17:
                        m.mWrSAvg = r.uint32();
                        break;
                    case 18:
                        m.mWrSCnt = r.uint32();
                        break;
                    case 19:
                        m.mWrSPeak = r.uint32();
                        break;
                    case 20:
                        m.nRdAvg = r.uint32();
                        break;
                    case 21:
                        m.nRdCnt = r.uint32();
                        break;
                    case 22:
                        m.nRdPeak = r.uint32();
                        break;
                    case 23:
                        m.nWrAsAvg = r.uint32();
                        break;
                    case 24:
                        m.nWrAsCnt = r.uint32();
                        break;
                    case 25:
                        m.nWrAsPeak = r.uint32();
                        break;
                    case 26:
                        m.nWrSAvg = r.uint32();
                        break;
                    case 27:
                        m.nWrSCnt = r.uint32();
                        break;
                    case 28:
                        m.nWrSPeak = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a F2fsIostatLatencyFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.F2fsIostatLatencyFtraceEvent} F2fsIostatLatencyFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            F2fsIostatLatencyFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a F2fsIostatLatencyFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            F2fsIostatLatencyFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dRdAvg != null && m.hasOwnProperty("dRdAvg")) {
                    if (!$util.isInteger(m.dRdAvg))
                        return "dRdAvg: integer expected";
                }
                if (m.dRdCnt != null && m.hasOwnProperty("dRdCnt")) {
                    if (!$util.isInteger(m.dRdCnt))
                        return "dRdCnt: integer expected";
                }
                if (m.dRdPeak != null && m.hasOwnProperty("dRdPeak")) {
                    if (!$util.isInteger(m.dRdPeak))
                        return "dRdPeak: integer expected";
                }
                if (m.dWrAsAvg != null && m.hasOwnProperty("dWrAsAvg")) {
                    if (!$util.isInteger(m.dWrAsAvg))
                        return "dWrAsAvg: integer expected";
                }
                if (m.dWrAsCnt != null && m.hasOwnProperty("dWrAsCnt")) {
                    if (!$util.isInteger(m.dWrAsCnt))
                        return "dWrAsCnt: integer expected";
                }
                if (m.dWrAsPeak != null && m.hasOwnProperty("dWrAsPeak")) {
                    if (!$util.isInteger(m.dWrAsPeak))
                        return "dWrAsPeak: integer expected";
                }
                if (m.dWrSAvg != null && m.hasOwnProperty("dWrSAvg")) {
                    if (!$util.isInteger(m.dWrSAvg))
                        return "dWrSAvg: integer expected";
                }
                if (m.dWrSCnt != null && m.hasOwnProperty("dWrSCnt")) {
                    if (!$util.isInteger(m.dWrSCnt))
                        return "dWrSCnt: integer expected";
                }
                if (m.dWrSPeak != null && m.hasOwnProperty("dWrSPeak")) {
                    if (!$util.isInteger(m.dWrSPeak))
                        return "dWrSPeak: integer expected";
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (!$util.isInteger(m.dev) && !(m.dev && $util.isInteger(m.dev.low) && $util.isInteger(m.dev.high)))
                        return "dev: integer|Long expected";
                }
                if (m.mRdAvg != null && m.hasOwnProperty("mRdAvg")) {
                    if (!$util.isInteger(m.mRdAvg))
                        return "mRdAvg: integer expected";
                }
                if (m.mRdCnt != null && m.hasOwnProperty("mRdCnt")) {
                    if (!$util.isInteger(m.mRdCnt))
                        return "mRdCnt: integer expected";
                }
                if (m.mRdPeak != null && m.hasOwnProperty("mRdPeak")) {
                    if (!$util.isInteger(m.mRdPeak))
                        return "mRdPeak: integer expected";
                }
                if (m.mWrAsAvg != null && m.hasOwnProperty("mWrAsAvg")) {
                    if (!$util.isInteger(m.mWrAsAvg))
                        return "mWrAsAvg: integer expected";
                }
                if (m.mWrAsCnt != null && m.hasOwnProperty("mWrAsCnt")) {
                    if (!$util.isInteger(m.mWrAsCnt))
                        return "mWrAsCnt: integer expected";
                }
                if (m.mWrAsPeak != null && m.hasOwnProperty("mWrAsPeak")) {
                    if (!$util.isInteger(m.mWrAsPeak))
                        return "mWrAsPeak: integer expected";
                }
                if (m.mWrSAvg != null && m.hasOwnProperty("mWrSAvg")) {
                    if (!$util.isInteger(m.mWrSAvg))
                        return "mWrSAvg: integer expected";
                }
                if (m.mWrSCnt != null && m.hasOwnProperty("mWrSCnt")) {
                    if (!$util.isInteger(m.mWrSCnt))
                        return "mWrSCnt: integer expected";
                }
                if (m.mWrSPeak != null && m.hasOwnProperty("mWrSPeak")) {
                    if (!$util.isInteger(m.mWrSPeak))
                        return "mWrSPeak: integer expected";
                }
                if (m.nRdAvg != null && m.hasOwnProperty("nRdAvg")) {
                    if (!$util.isInteger(m.nRdAvg))
                        return "nRdAvg: integer expected";
                }
                if (m.nRdCnt != null && m.hasOwnProperty("nRdCnt")) {
                    if (!$util.isInteger(m.nRdCnt))
                        return "nRdCnt: integer expected";
                }
                if (m.nRdPeak != null && m.hasOwnProperty("nRdPeak")) {
                    if (!$util.isInteger(m.nRdPeak))
                        return "nRdPeak: integer expected";
                }
                if (m.nWrAsAvg != null && m.hasOwnProperty("nWrAsAvg")) {
                    if (!$util.isInteger(m.nWrAsAvg))
                        return "nWrAsAvg: integer expected";
                }
                if (m.nWrAsCnt != null && m.hasOwnProperty("nWrAsCnt")) {
                    if (!$util.isInteger(m.nWrAsCnt))
                        return "nWrAsCnt: integer expected";
                }
                if (m.nWrAsPeak != null && m.hasOwnProperty("nWrAsPeak")) {
                    if (!$util.isInteger(m.nWrAsPeak))
                        return "nWrAsPeak: integer expected";
                }
                if (m.nWrSAvg != null && m.hasOwnProperty("nWrSAvg")) {
                    if (!$util.isInteger(m.nWrSAvg))
                        return "nWrSAvg: integer expected";
                }
                if (m.nWrSCnt != null && m.hasOwnProperty("nWrSCnt")) {
                    if (!$util.isInteger(m.nWrSCnt))
                        return "nWrSCnt: integer expected";
                }
                if (m.nWrSPeak != null && m.hasOwnProperty("nWrSPeak")) {
                    if (!$util.isInteger(m.nWrSPeak))
                        return "nWrSPeak: integer expected";
                }
                return null;
            };

            /**
             * Creates a F2fsIostatLatencyFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.F2fsIostatLatencyFtraceEvent} F2fsIostatLatencyFtraceEvent
             */
            F2fsIostatLatencyFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.F2fsIostatLatencyFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.F2fsIostatLatencyFtraceEvent();
                if (d.dRdAvg != null) {
                    m.dRdAvg = d.dRdAvg >>> 0;
                }
                if (d.dRdCnt != null) {
                    m.dRdCnt = d.dRdCnt >>> 0;
                }
                if (d.dRdPeak != null) {
                    m.dRdPeak = d.dRdPeak >>> 0;
                }
                if (d.dWrAsAvg != null) {
                    m.dWrAsAvg = d.dWrAsAvg >>> 0;
                }
                if (d.dWrAsCnt != null) {
                    m.dWrAsCnt = d.dWrAsCnt >>> 0;
                }
                if (d.dWrAsPeak != null) {
                    m.dWrAsPeak = d.dWrAsPeak >>> 0;
                }
                if (d.dWrSAvg != null) {
                    m.dWrSAvg = d.dWrSAvg >>> 0;
                }
                if (d.dWrSCnt != null) {
                    m.dWrSCnt = d.dWrSCnt >>> 0;
                }
                if (d.dWrSPeak != null) {
                    m.dWrSPeak = d.dWrSPeak >>> 0;
                }
                if (d.dev != null) {
                    if ($util.Long)
                        (m.dev = $util.Long.fromValue(d.dev)).unsigned = true;
                    else if (typeof d.dev === "string")
                        m.dev = parseInt(d.dev, 10);
                    else if (typeof d.dev === "number")
                        m.dev = d.dev;
                    else if (typeof d.dev === "object")
                        m.dev = new $util.LongBits(d.dev.low >>> 0, d.dev.high >>> 0).toNumber(true);
                }
                if (d.mRdAvg != null) {
                    m.mRdAvg = d.mRdAvg >>> 0;
                }
                if (d.mRdCnt != null) {
                    m.mRdCnt = d.mRdCnt >>> 0;
                }
                if (d.mRdPeak != null) {
                    m.mRdPeak = d.mRdPeak >>> 0;
                }
                if (d.mWrAsAvg != null) {
                    m.mWrAsAvg = d.mWrAsAvg >>> 0;
                }
                if (d.mWrAsCnt != null) {
                    m.mWrAsCnt = d.mWrAsCnt >>> 0;
                }
                if (d.mWrAsPeak != null) {
                    m.mWrAsPeak = d.mWrAsPeak >>> 0;
                }
                if (d.mWrSAvg != null) {
                    m.mWrSAvg = d.mWrSAvg >>> 0;
                }
                if (d.mWrSCnt != null) {
                    m.mWrSCnt = d.mWrSCnt >>> 0;
                }
                if (d.mWrSPeak != null) {
                    m.mWrSPeak = d.mWrSPeak >>> 0;
                }
                if (d.nRdAvg != null) {
                    m.nRdAvg = d.nRdAvg >>> 0;
                }
                if (d.nRdCnt != null) {
                    m.nRdCnt = d.nRdCnt >>> 0;
                }
                if (d.nRdPeak != null) {
                    m.nRdPeak = d.nRdPeak >>> 0;
                }
                if (d.nWrAsAvg != null) {
                    m.nWrAsAvg = d.nWrAsAvg >>> 0;
                }
                if (d.nWrAsCnt != null) {
                    m.nWrAsCnt = d.nWrAsCnt >>> 0;
                }
                if (d.nWrAsPeak != null) {
                    m.nWrAsPeak = d.nWrAsPeak >>> 0;
                }
                if (d.nWrSAvg != null) {
                    m.nWrSAvg = d.nWrSAvg >>> 0;
                }
                if (d.nWrSCnt != null) {
                    m.nWrSCnt = d.nWrSCnt >>> 0;
                }
                if (d.nWrSPeak != null) {
                    m.nWrSPeak = d.nWrSPeak >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a F2fsIostatLatencyFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @static
             * @param {perfetto.protos.F2fsIostatLatencyFtraceEvent} m F2fsIostatLatencyFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            F2fsIostatLatencyFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.dRdAvg = 0;
                    d.dRdCnt = 0;
                    d.dRdPeak = 0;
                    d.dWrAsAvg = 0;
                    d.dWrAsCnt = 0;
                    d.dWrAsPeak = 0;
                    d.dWrSAvg = 0;
                    d.dWrSCnt = 0;
                    d.dWrSPeak = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.dev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.dev = o.longs === String ? "0" : 0;
                    d.mRdAvg = 0;
                    d.mRdCnt = 0;
                    d.mRdPeak = 0;
                    d.mWrAsAvg = 0;
                    d.mWrAsCnt = 0;
                    d.mWrAsPeak = 0;
                    d.mWrSAvg = 0;
                    d.mWrSCnt = 0;
                    d.mWrSPeak = 0;
                    d.nRdAvg = 0;
                    d.nRdCnt = 0;
                    d.nRdPeak = 0;
                    d.nWrAsAvg = 0;
                    d.nWrAsCnt = 0;
                    d.nWrAsPeak = 0;
                    d.nWrSAvg = 0;
                    d.nWrSCnt = 0;
                    d.nWrSPeak = 0;
                }
                if (m.dRdAvg != null && m.hasOwnProperty("dRdAvg")) {
                    d.dRdAvg = m.dRdAvg;
                }
                if (m.dRdCnt != null && m.hasOwnProperty("dRdCnt")) {
                    d.dRdCnt = m.dRdCnt;
                }
                if (m.dRdPeak != null && m.hasOwnProperty("dRdPeak")) {
                    d.dRdPeak = m.dRdPeak;
                }
                if (m.dWrAsAvg != null && m.hasOwnProperty("dWrAsAvg")) {
                    d.dWrAsAvg = m.dWrAsAvg;
                }
                if (m.dWrAsCnt != null && m.hasOwnProperty("dWrAsCnt")) {
                    d.dWrAsCnt = m.dWrAsCnt;
                }
                if (m.dWrAsPeak != null && m.hasOwnProperty("dWrAsPeak")) {
                    d.dWrAsPeak = m.dWrAsPeak;
                }
                if (m.dWrSAvg != null && m.hasOwnProperty("dWrSAvg")) {
                    d.dWrSAvg = m.dWrSAvg;
                }
                if (m.dWrSCnt != null && m.hasOwnProperty("dWrSCnt")) {
                    d.dWrSCnt = m.dWrSCnt;
                }
                if (m.dWrSPeak != null && m.hasOwnProperty("dWrSPeak")) {
                    d.dWrSPeak = m.dWrSPeak;
                }
                if (m.dev != null && m.hasOwnProperty("dev")) {
                    if (typeof m.dev === "number")
                        d.dev = o.longs === String ? String(m.dev) : m.dev;
                    else
                        d.dev = o.longs === String ? $util.Long.prototype.toString.call(m.dev) : o.longs === Number ? new $util.LongBits(m.dev.low >>> 0, m.dev.high >>> 0).toNumber(true) : m.dev;
                }
                if (m.mRdAvg != null && m.hasOwnProperty("mRdAvg")) {
                    d.mRdAvg = m.mRdAvg;
                }
                if (m.mRdCnt != null && m.hasOwnProperty("mRdCnt")) {
                    d.mRdCnt = m.mRdCnt;
                }
                if (m.mRdPeak != null && m.hasOwnProperty("mRdPeak")) {
                    d.mRdPeak = m.mRdPeak;
                }
                if (m.mWrAsAvg != null && m.hasOwnProperty("mWrAsAvg")) {
                    d.mWrAsAvg = m.mWrAsAvg;
                }
                if (m.mWrAsCnt != null && m.hasOwnProperty("mWrAsCnt")) {
                    d.mWrAsCnt = m.mWrAsCnt;
                }
                if (m.mWrAsPeak != null && m.hasOwnProperty("mWrAsPeak")) {
                    d.mWrAsPeak = m.mWrAsPeak;
                }
                if (m.mWrSAvg != null && m.hasOwnProperty("mWrSAvg")) {
                    d.mWrSAvg = m.mWrSAvg;
                }
                if (m.mWrSCnt != null && m.hasOwnProperty("mWrSCnt")) {
                    d.mWrSCnt = m.mWrSCnt;
                }
                if (m.mWrSPeak != null && m.hasOwnProperty("mWrSPeak")) {
                    d.mWrSPeak = m.mWrSPeak;
                }
                if (m.nRdAvg != null && m.hasOwnProperty("nRdAvg")) {
                    d.nRdAvg = m.nRdAvg;
                }
                if (m.nRdCnt != null && m.hasOwnProperty("nRdCnt")) {
                    d.nRdCnt = m.nRdCnt;
                }
                if (m.nRdPeak != null && m.hasOwnProperty("nRdPeak")) {
                    d.nRdPeak = m.nRdPeak;
                }
                if (m.nWrAsAvg != null && m.hasOwnProperty("nWrAsAvg")) {
                    d.nWrAsAvg = m.nWrAsAvg;
                }
                if (m.nWrAsCnt != null && m.hasOwnProperty("nWrAsCnt")) {
                    d.nWrAsCnt = m.nWrAsCnt;
                }
                if (m.nWrAsPeak != null && m.hasOwnProperty("nWrAsPeak")) {
                    d.nWrAsPeak = m.nWrAsPeak;
                }
                if (m.nWrSAvg != null && m.hasOwnProperty("nWrSAvg")) {
                    d.nWrSAvg = m.nWrSAvg;
                }
                if (m.nWrSCnt != null && m.hasOwnProperty("nWrSCnt")) {
                    d.nWrSCnt = m.nWrSCnt;
                }
                if (m.nWrSPeak != null && m.hasOwnProperty("nWrSPeak")) {
                    d.nWrSPeak = m.nWrSPeak;
                }
                return d;
            };

            /**
             * Converts this F2fsIostatLatencyFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.F2fsIostatLatencyFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            F2fsIostatLatencyFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return F2fsIostatLatencyFtraceEvent;
        })();

        protos.FastrpcDmaStatFtraceEvent = (function() {

            /**
             * Properties of a FastrpcDmaStatFtraceEvent.
             * @memberof perfetto.protos
             * @interface IFastrpcDmaStatFtraceEvent
             * @property {number|null} [cid] FastrpcDmaStatFtraceEvent cid
             * @property {number|null} [len] FastrpcDmaStatFtraceEvent len
             * @property {number|null} [totalAllocated] FastrpcDmaStatFtraceEvent totalAllocated
             */

            /**
             * Constructs a new FastrpcDmaStatFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a FastrpcDmaStatFtraceEvent.
             * @implements IFastrpcDmaStatFtraceEvent
             * @constructor
             * @param {perfetto.protos.IFastrpcDmaStatFtraceEvent=} [p] Properties to set
             */
            function FastrpcDmaStatFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * FastrpcDmaStatFtraceEvent cid.
             * @member {number} cid
             * @memberof perfetto.protos.FastrpcDmaStatFtraceEvent
             * @instance
             */
            FastrpcDmaStatFtraceEvent.prototype.cid = 0;

            /**
             * FastrpcDmaStatFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.FastrpcDmaStatFtraceEvent
             * @instance
             */
            FastrpcDmaStatFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * FastrpcDmaStatFtraceEvent totalAllocated.
             * @member {number} totalAllocated
             * @memberof perfetto.protos.FastrpcDmaStatFtraceEvent
             * @instance
             */
            FastrpcDmaStatFtraceEvent.prototype.totalAllocated = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new FastrpcDmaStatFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.FastrpcDmaStatFtraceEvent
             * @static
             * @param {perfetto.protos.IFastrpcDmaStatFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.FastrpcDmaStatFtraceEvent} FastrpcDmaStatFtraceEvent instance
             */
            FastrpcDmaStatFtraceEvent.create = function create(properties) {
                return new FastrpcDmaStatFtraceEvent(properties);
            };

            /**
             * Encodes the specified FastrpcDmaStatFtraceEvent message. Does not implicitly {@link perfetto.protos.FastrpcDmaStatFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.FastrpcDmaStatFtraceEvent
             * @static
             * @param {perfetto.protos.IFastrpcDmaStatFtraceEvent} m FastrpcDmaStatFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FastrpcDmaStatFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.cid != null && Object.hasOwnProperty.call(m, "cid"))
                    w.uint32(8).int32(m.cid);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(16).int64(m.len);
                if (m.totalAllocated != null && Object.hasOwnProperty.call(m, "totalAllocated"))
                    w.uint32(24).uint64(m.totalAllocated);
                return w;
            };

            /**
             * Encodes the specified FastrpcDmaStatFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.FastrpcDmaStatFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.FastrpcDmaStatFtraceEvent
             * @static
             * @param {perfetto.protos.IFastrpcDmaStatFtraceEvent} message FastrpcDmaStatFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FastrpcDmaStatFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a FastrpcDmaStatFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.FastrpcDmaStatFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.FastrpcDmaStatFtraceEvent} FastrpcDmaStatFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FastrpcDmaStatFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FastrpcDmaStatFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.cid = r.int32();
                        break;
                    case 2:
                        m.len = r.int64();
                        break;
                    case 3:
                        m.totalAllocated = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a FastrpcDmaStatFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.FastrpcDmaStatFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.FastrpcDmaStatFtraceEvent} FastrpcDmaStatFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FastrpcDmaStatFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a FastrpcDmaStatFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.FastrpcDmaStatFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            FastrpcDmaStatFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.cid != null && m.hasOwnProperty("cid")) {
                    if (!$util.isInteger(m.cid))
                        return "cid: integer expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                if (m.totalAllocated != null && m.hasOwnProperty("totalAllocated")) {
                    if (!$util.isInteger(m.totalAllocated) && !(m.totalAllocated && $util.isInteger(m.totalAllocated.low) && $util.isInteger(m.totalAllocated.high)))
                        return "totalAllocated: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a FastrpcDmaStatFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.FastrpcDmaStatFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.FastrpcDmaStatFtraceEvent} FastrpcDmaStatFtraceEvent
             */
            FastrpcDmaStatFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.FastrpcDmaStatFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.FastrpcDmaStatFtraceEvent();
                if (d.cid != null) {
                    m.cid = d.cid | 0;
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = false;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber();
                }
                if (d.totalAllocated != null) {
                    if ($util.Long)
                        (m.totalAllocated = $util.Long.fromValue(d.totalAllocated)).unsigned = true;
                    else if (typeof d.totalAllocated === "string")
                        m.totalAllocated = parseInt(d.totalAllocated, 10);
                    else if (typeof d.totalAllocated === "number")
                        m.totalAllocated = d.totalAllocated;
                    else if (typeof d.totalAllocated === "object")
                        m.totalAllocated = new $util.LongBits(d.totalAllocated.low >>> 0, d.totalAllocated.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a FastrpcDmaStatFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.FastrpcDmaStatFtraceEvent
             * @static
             * @param {perfetto.protos.FastrpcDmaStatFtraceEvent} m FastrpcDmaStatFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            FastrpcDmaStatFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.cid = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.totalAllocated = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.totalAllocated = o.longs === String ? "0" : 0;
                }
                if (m.cid != null && m.hasOwnProperty("cid")) {
                    d.cid = m.cid;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber() : m.len;
                }
                if (m.totalAllocated != null && m.hasOwnProperty("totalAllocated")) {
                    if (typeof m.totalAllocated === "number")
                        d.totalAllocated = o.longs === String ? String(m.totalAllocated) : m.totalAllocated;
                    else
                        d.totalAllocated = o.longs === String ? $util.Long.prototype.toString.call(m.totalAllocated) : o.longs === Number ? new $util.LongBits(m.totalAllocated.low >>> 0, m.totalAllocated.high >>> 0).toNumber(true) : m.totalAllocated;
                }
                return d;
            };

            /**
             * Converts this FastrpcDmaStatFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.FastrpcDmaStatFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            FastrpcDmaStatFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return FastrpcDmaStatFtraceEvent;
        })();

        protos.FenceInitFtraceEvent = (function() {

            /**
             * Properties of a FenceInitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IFenceInitFtraceEvent
             * @property {number|null} [context] FenceInitFtraceEvent context
             * @property {string|null} [driver] FenceInitFtraceEvent driver
             * @property {number|null} [seqno] FenceInitFtraceEvent seqno
             * @property {string|null} [timeline] FenceInitFtraceEvent timeline
             */

            /**
             * Constructs a new FenceInitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a FenceInitFtraceEvent.
             * @implements IFenceInitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IFenceInitFtraceEvent=} [p] Properties to set
             */
            function FenceInitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * FenceInitFtraceEvent context.
             * @member {number} context
             * @memberof perfetto.protos.FenceInitFtraceEvent
             * @instance
             */
            FenceInitFtraceEvent.prototype.context = 0;

            /**
             * FenceInitFtraceEvent driver.
             * @member {string} driver
             * @memberof perfetto.protos.FenceInitFtraceEvent
             * @instance
             */
            FenceInitFtraceEvent.prototype.driver = "";

            /**
             * FenceInitFtraceEvent seqno.
             * @member {number} seqno
             * @memberof perfetto.protos.FenceInitFtraceEvent
             * @instance
             */
            FenceInitFtraceEvent.prototype.seqno = 0;

            /**
             * FenceInitFtraceEvent timeline.
             * @member {string} timeline
             * @memberof perfetto.protos.FenceInitFtraceEvent
             * @instance
             */
            FenceInitFtraceEvent.prototype.timeline = "";

            /**
             * Creates a new FenceInitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.FenceInitFtraceEvent
             * @static
             * @param {perfetto.protos.IFenceInitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.FenceInitFtraceEvent} FenceInitFtraceEvent instance
             */
            FenceInitFtraceEvent.create = function create(properties) {
                return new FenceInitFtraceEvent(properties);
            };

            /**
             * Encodes the specified FenceInitFtraceEvent message. Does not implicitly {@link perfetto.protos.FenceInitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.FenceInitFtraceEvent
             * @static
             * @param {perfetto.protos.IFenceInitFtraceEvent} m FenceInitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FenceInitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.context != null && Object.hasOwnProperty.call(m, "context"))
                    w.uint32(8).uint32(m.context);
                if (m.driver != null && Object.hasOwnProperty.call(m, "driver"))
                    w.uint32(18).string(m.driver);
                if (m.seqno != null && Object.hasOwnProperty.call(m, "seqno"))
                    w.uint32(24).uint32(m.seqno);
                if (m.timeline != null && Object.hasOwnProperty.call(m, "timeline"))
                    w.uint32(34).string(m.timeline);
                return w;
            };

            /**
             * Encodes the specified FenceInitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.FenceInitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.FenceInitFtraceEvent
             * @static
             * @param {perfetto.protos.IFenceInitFtraceEvent} message FenceInitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FenceInitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a FenceInitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.FenceInitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.FenceInitFtraceEvent} FenceInitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FenceInitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FenceInitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.context = r.uint32();
                        break;
                    case 2:
                        m.driver = r.string();
                        break;
                    case 3:
                        m.seqno = r.uint32();
                        break;
                    case 4:
                        m.timeline = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a FenceInitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.FenceInitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.FenceInitFtraceEvent} FenceInitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FenceInitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a FenceInitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.FenceInitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            FenceInitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.context != null && m.hasOwnProperty("context")) {
                    if (!$util.isInteger(m.context))
                        return "context: integer expected";
                }
                if (m.driver != null && m.hasOwnProperty("driver")) {
                    if (!$util.isString(m.driver))
                        return "driver: string expected";
                }
                if (m.seqno != null && m.hasOwnProperty("seqno")) {
                    if (!$util.isInteger(m.seqno))
                        return "seqno: integer expected";
                }
                if (m.timeline != null && m.hasOwnProperty("timeline")) {
                    if (!$util.isString(m.timeline))
                        return "timeline: string expected";
                }
                return null;
            };

            /**
             * Creates a FenceInitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.FenceInitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.FenceInitFtraceEvent} FenceInitFtraceEvent
             */
            FenceInitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.FenceInitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.FenceInitFtraceEvent();
                if (d.context != null) {
                    m.context = d.context >>> 0;
                }
                if (d.driver != null) {
                    m.driver = String(d.driver);
                }
                if (d.seqno != null) {
                    m.seqno = d.seqno >>> 0;
                }
                if (d.timeline != null) {
                    m.timeline = String(d.timeline);
                }
                return m;
            };

            /**
             * Creates a plain object from a FenceInitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.FenceInitFtraceEvent
             * @static
             * @param {perfetto.protos.FenceInitFtraceEvent} m FenceInitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            FenceInitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.context = 0;
                    d.driver = "";
                    d.seqno = 0;
                    d.timeline = "";
                }
                if (m.context != null && m.hasOwnProperty("context")) {
                    d.context = m.context;
                }
                if (m.driver != null && m.hasOwnProperty("driver")) {
                    d.driver = m.driver;
                }
                if (m.seqno != null && m.hasOwnProperty("seqno")) {
                    d.seqno = m.seqno;
                }
                if (m.timeline != null && m.hasOwnProperty("timeline")) {
                    d.timeline = m.timeline;
                }
                return d;
            };

            /**
             * Converts this FenceInitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.FenceInitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            FenceInitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return FenceInitFtraceEvent;
        })();

        protos.FenceDestroyFtraceEvent = (function() {

            /**
             * Properties of a FenceDestroyFtraceEvent.
             * @memberof perfetto.protos
             * @interface IFenceDestroyFtraceEvent
             * @property {number|null} [context] FenceDestroyFtraceEvent context
             * @property {string|null} [driver] FenceDestroyFtraceEvent driver
             * @property {number|null} [seqno] FenceDestroyFtraceEvent seqno
             * @property {string|null} [timeline] FenceDestroyFtraceEvent timeline
             */

            /**
             * Constructs a new FenceDestroyFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a FenceDestroyFtraceEvent.
             * @implements IFenceDestroyFtraceEvent
             * @constructor
             * @param {perfetto.protos.IFenceDestroyFtraceEvent=} [p] Properties to set
             */
            function FenceDestroyFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * FenceDestroyFtraceEvent context.
             * @member {number} context
             * @memberof perfetto.protos.FenceDestroyFtraceEvent
             * @instance
             */
            FenceDestroyFtraceEvent.prototype.context = 0;

            /**
             * FenceDestroyFtraceEvent driver.
             * @member {string} driver
             * @memberof perfetto.protos.FenceDestroyFtraceEvent
             * @instance
             */
            FenceDestroyFtraceEvent.prototype.driver = "";

            /**
             * FenceDestroyFtraceEvent seqno.
             * @member {number} seqno
             * @memberof perfetto.protos.FenceDestroyFtraceEvent
             * @instance
             */
            FenceDestroyFtraceEvent.prototype.seqno = 0;

            /**
             * FenceDestroyFtraceEvent timeline.
             * @member {string} timeline
             * @memberof perfetto.protos.FenceDestroyFtraceEvent
             * @instance
             */
            FenceDestroyFtraceEvent.prototype.timeline = "";

            /**
             * Creates a new FenceDestroyFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.FenceDestroyFtraceEvent
             * @static
             * @param {perfetto.protos.IFenceDestroyFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.FenceDestroyFtraceEvent} FenceDestroyFtraceEvent instance
             */
            FenceDestroyFtraceEvent.create = function create(properties) {
                return new FenceDestroyFtraceEvent(properties);
            };

            /**
             * Encodes the specified FenceDestroyFtraceEvent message. Does not implicitly {@link perfetto.protos.FenceDestroyFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.FenceDestroyFtraceEvent
             * @static
             * @param {perfetto.protos.IFenceDestroyFtraceEvent} m FenceDestroyFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FenceDestroyFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.context != null && Object.hasOwnProperty.call(m, "context"))
                    w.uint32(8).uint32(m.context);
                if (m.driver != null && Object.hasOwnProperty.call(m, "driver"))
                    w.uint32(18).string(m.driver);
                if (m.seqno != null && Object.hasOwnProperty.call(m, "seqno"))
                    w.uint32(24).uint32(m.seqno);
                if (m.timeline != null && Object.hasOwnProperty.call(m, "timeline"))
                    w.uint32(34).string(m.timeline);
                return w;
            };

            /**
             * Encodes the specified FenceDestroyFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.FenceDestroyFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.FenceDestroyFtraceEvent
             * @static
             * @param {perfetto.protos.IFenceDestroyFtraceEvent} message FenceDestroyFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FenceDestroyFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a FenceDestroyFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.FenceDestroyFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.FenceDestroyFtraceEvent} FenceDestroyFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FenceDestroyFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FenceDestroyFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.context = r.uint32();
                        break;
                    case 2:
                        m.driver = r.string();
                        break;
                    case 3:
                        m.seqno = r.uint32();
                        break;
                    case 4:
                        m.timeline = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a FenceDestroyFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.FenceDestroyFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.FenceDestroyFtraceEvent} FenceDestroyFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FenceDestroyFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a FenceDestroyFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.FenceDestroyFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            FenceDestroyFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.context != null && m.hasOwnProperty("context")) {
                    if (!$util.isInteger(m.context))
                        return "context: integer expected";
                }
                if (m.driver != null && m.hasOwnProperty("driver")) {
                    if (!$util.isString(m.driver))
                        return "driver: string expected";
                }
                if (m.seqno != null && m.hasOwnProperty("seqno")) {
                    if (!$util.isInteger(m.seqno))
                        return "seqno: integer expected";
                }
                if (m.timeline != null && m.hasOwnProperty("timeline")) {
                    if (!$util.isString(m.timeline))
                        return "timeline: string expected";
                }
                return null;
            };

            /**
             * Creates a FenceDestroyFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.FenceDestroyFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.FenceDestroyFtraceEvent} FenceDestroyFtraceEvent
             */
            FenceDestroyFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.FenceDestroyFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.FenceDestroyFtraceEvent();
                if (d.context != null) {
                    m.context = d.context >>> 0;
                }
                if (d.driver != null) {
                    m.driver = String(d.driver);
                }
                if (d.seqno != null) {
                    m.seqno = d.seqno >>> 0;
                }
                if (d.timeline != null) {
                    m.timeline = String(d.timeline);
                }
                return m;
            };

            /**
             * Creates a plain object from a FenceDestroyFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.FenceDestroyFtraceEvent
             * @static
             * @param {perfetto.protos.FenceDestroyFtraceEvent} m FenceDestroyFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            FenceDestroyFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.context = 0;
                    d.driver = "";
                    d.seqno = 0;
                    d.timeline = "";
                }
                if (m.context != null && m.hasOwnProperty("context")) {
                    d.context = m.context;
                }
                if (m.driver != null && m.hasOwnProperty("driver")) {
                    d.driver = m.driver;
                }
                if (m.seqno != null && m.hasOwnProperty("seqno")) {
                    d.seqno = m.seqno;
                }
                if (m.timeline != null && m.hasOwnProperty("timeline")) {
                    d.timeline = m.timeline;
                }
                return d;
            };

            /**
             * Converts this FenceDestroyFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.FenceDestroyFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            FenceDestroyFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return FenceDestroyFtraceEvent;
        })();

        protos.FenceEnableSignalFtraceEvent = (function() {

            /**
             * Properties of a FenceEnableSignalFtraceEvent.
             * @memberof perfetto.protos
             * @interface IFenceEnableSignalFtraceEvent
             * @property {number|null} [context] FenceEnableSignalFtraceEvent context
             * @property {string|null} [driver] FenceEnableSignalFtraceEvent driver
             * @property {number|null} [seqno] FenceEnableSignalFtraceEvent seqno
             * @property {string|null} [timeline] FenceEnableSignalFtraceEvent timeline
             */

            /**
             * Constructs a new FenceEnableSignalFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a FenceEnableSignalFtraceEvent.
             * @implements IFenceEnableSignalFtraceEvent
             * @constructor
             * @param {perfetto.protos.IFenceEnableSignalFtraceEvent=} [p] Properties to set
             */
            function FenceEnableSignalFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * FenceEnableSignalFtraceEvent context.
             * @member {number} context
             * @memberof perfetto.protos.FenceEnableSignalFtraceEvent
             * @instance
             */
            FenceEnableSignalFtraceEvent.prototype.context = 0;

            /**
             * FenceEnableSignalFtraceEvent driver.
             * @member {string} driver
             * @memberof perfetto.protos.FenceEnableSignalFtraceEvent
             * @instance
             */
            FenceEnableSignalFtraceEvent.prototype.driver = "";

            /**
             * FenceEnableSignalFtraceEvent seqno.
             * @member {number} seqno
             * @memberof perfetto.protos.FenceEnableSignalFtraceEvent
             * @instance
             */
            FenceEnableSignalFtraceEvent.prototype.seqno = 0;

            /**
             * FenceEnableSignalFtraceEvent timeline.
             * @member {string} timeline
             * @memberof perfetto.protos.FenceEnableSignalFtraceEvent
             * @instance
             */
            FenceEnableSignalFtraceEvent.prototype.timeline = "";

            /**
             * Creates a new FenceEnableSignalFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.FenceEnableSignalFtraceEvent
             * @static
             * @param {perfetto.protos.IFenceEnableSignalFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.FenceEnableSignalFtraceEvent} FenceEnableSignalFtraceEvent instance
             */
            FenceEnableSignalFtraceEvent.create = function create(properties) {
                return new FenceEnableSignalFtraceEvent(properties);
            };

            /**
             * Encodes the specified FenceEnableSignalFtraceEvent message. Does not implicitly {@link perfetto.protos.FenceEnableSignalFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.FenceEnableSignalFtraceEvent
             * @static
             * @param {perfetto.protos.IFenceEnableSignalFtraceEvent} m FenceEnableSignalFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FenceEnableSignalFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.context != null && Object.hasOwnProperty.call(m, "context"))
                    w.uint32(8).uint32(m.context);
                if (m.driver != null && Object.hasOwnProperty.call(m, "driver"))
                    w.uint32(18).string(m.driver);
                if (m.seqno != null && Object.hasOwnProperty.call(m, "seqno"))
                    w.uint32(24).uint32(m.seqno);
                if (m.timeline != null && Object.hasOwnProperty.call(m, "timeline"))
                    w.uint32(34).string(m.timeline);
                return w;
            };

            /**
             * Encodes the specified FenceEnableSignalFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.FenceEnableSignalFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.FenceEnableSignalFtraceEvent
             * @static
             * @param {perfetto.protos.IFenceEnableSignalFtraceEvent} message FenceEnableSignalFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FenceEnableSignalFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a FenceEnableSignalFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.FenceEnableSignalFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.FenceEnableSignalFtraceEvent} FenceEnableSignalFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FenceEnableSignalFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FenceEnableSignalFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.context = r.uint32();
                        break;
                    case 2:
                        m.driver = r.string();
                        break;
                    case 3:
                        m.seqno = r.uint32();
                        break;
                    case 4:
                        m.timeline = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a FenceEnableSignalFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.FenceEnableSignalFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.FenceEnableSignalFtraceEvent} FenceEnableSignalFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FenceEnableSignalFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a FenceEnableSignalFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.FenceEnableSignalFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            FenceEnableSignalFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.context != null && m.hasOwnProperty("context")) {
                    if (!$util.isInteger(m.context))
                        return "context: integer expected";
                }
                if (m.driver != null && m.hasOwnProperty("driver")) {
                    if (!$util.isString(m.driver))
                        return "driver: string expected";
                }
                if (m.seqno != null && m.hasOwnProperty("seqno")) {
                    if (!$util.isInteger(m.seqno))
                        return "seqno: integer expected";
                }
                if (m.timeline != null && m.hasOwnProperty("timeline")) {
                    if (!$util.isString(m.timeline))
                        return "timeline: string expected";
                }
                return null;
            };

            /**
             * Creates a FenceEnableSignalFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.FenceEnableSignalFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.FenceEnableSignalFtraceEvent} FenceEnableSignalFtraceEvent
             */
            FenceEnableSignalFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.FenceEnableSignalFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.FenceEnableSignalFtraceEvent();
                if (d.context != null) {
                    m.context = d.context >>> 0;
                }
                if (d.driver != null) {
                    m.driver = String(d.driver);
                }
                if (d.seqno != null) {
                    m.seqno = d.seqno >>> 0;
                }
                if (d.timeline != null) {
                    m.timeline = String(d.timeline);
                }
                return m;
            };

            /**
             * Creates a plain object from a FenceEnableSignalFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.FenceEnableSignalFtraceEvent
             * @static
             * @param {perfetto.protos.FenceEnableSignalFtraceEvent} m FenceEnableSignalFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            FenceEnableSignalFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.context = 0;
                    d.driver = "";
                    d.seqno = 0;
                    d.timeline = "";
                }
                if (m.context != null && m.hasOwnProperty("context")) {
                    d.context = m.context;
                }
                if (m.driver != null && m.hasOwnProperty("driver")) {
                    d.driver = m.driver;
                }
                if (m.seqno != null && m.hasOwnProperty("seqno")) {
                    d.seqno = m.seqno;
                }
                if (m.timeline != null && m.hasOwnProperty("timeline")) {
                    d.timeline = m.timeline;
                }
                return d;
            };

            /**
             * Converts this FenceEnableSignalFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.FenceEnableSignalFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            FenceEnableSignalFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return FenceEnableSignalFtraceEvent;
        })();

        protos.FenceSignaledFtraceEvent = (function() {

            /**
             * Properties of a FenceSignaledFtraceEvent.
             * @memberof perfetto.protos
             * @interface IFenceSignaledFtraceEvent
             * @property {number|null} [context] FenceSignaledFtraceEvent context
             * @property {string|null} [driver] FenceSignaledFtraceEvent driver
             * @property {number|null} [seqno] FenceSignaledFtraceEvent seqno
             * @property {string|null} [timeline] FenceSignaledFtraceEvent timeline
             */

            /**
             * Constructs a new FenceSignaledFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a FenceSignaledFtraceEvent.
             * @implements IFenceSignaledFtraceEvent
             * @constructor
             * @param {perfetto.protos.IFenceSignaledFtraceEvent=} [p] Properties to set
             */
            function FenceSignaledFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * FenceSignaledFtraceEvent context.
             * @member {number} context
             * @memberof perfetto.protos.FenceSignaledFtraceEvent
             * @instance
             */
            FenceSignaledFtraceEvent.prototype.context = 0;

            /**
             * FenceSignaledFtraceEvent driver.
             * @member {string} driver
             * @memberof perfetto.protos.FenceSignaledFtraceEvent
             * @instance
             */
            FenceSignaledFtraceEvent.prototype.driver = "";

            /**
             * FenceSignaledFtraceEvent seqno.
             * @member {number} seqno
             * @memberof perfetto.protos.FenceSignaledFtraceEvent
             * @instance
             */
            FenceSignaledFtraceEvent.prototype.seqno = 0;

            /**
             * FenceSignaledFtraceEvent timeline.
             * @member {string} timeline
             * @memberof perfetto.protos.FenceSignaledFtraceEvent
             * @instance
             */
            FenceSignaledFtraceEvent.prototype.timeline = "";

            /**
             * Creates a new FenceSignaledFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.FenceSignaledFtraceEvent
             * @static
             * @param {perfetto.protos.IFenceSignaledFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.FenceSignaledFtraceEvent} FenceSignaledFtraceEvent instance
             */
            FenceSignaledFtraceEvent.create = function create(properties) {
                return new FenceSignaledFtraceEvent(properties);
            };

            /**
             * Encodes the specified FenceSignaledFtraceEvent message. Does not implicitly {@link perfetto.protos.FenceSignaledFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.FenceSignaledFtraceEvent
             * @static
             * @param {perfetto.protos.IFenceSignaledFtraceEvent} m FenceSignaledFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FenceSignaledFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.context != null && Object.hasOwnProperty.call(m, "context"))
                    w.uint32(8).uint32(m.context);
                if (m.driver != null && Object.hasOwnProperty.call(m, "driver"))
                    w.uint32(18).string(m.driver);
                if (m.seqno != null && Object.hasOwnProperty.call(m, "seqno"))
                    w.uint32(24).uint32(m.seqno);
                if (m.timeline != null && Object.hasOwnProperty.call(m, "timeline"))
                    w.uint32(34).string(m.timeline);
                return w;
            };

            /**
             * Encodes the specified FenceSignaledFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.FenceSignaledFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.FenceSignaledFtraceEvent
             * @static
             * @param {perfetto.protos.IFenceSignaledFtraceEvent} message FenceSignaledFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FenceSignaledFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a FenceSignaledFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.FenceSignaledFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.FenceSignaledFtraceEvent} FenceSignaledFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FenceSignaledFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FenceSignaledFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.context = r.uint32();
                        break;
                    case 2:
                        m.driver = r.string();
                        break;
                    case 3:
                        m.seqno = r.uint32();
                        break;
                    case 4:
                        m.timeline = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a FenceSignaledFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.FenceSignaledFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.FenceSignaledFtraceEvent} FenceSignaledFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FenceSignaledFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a FenceSignaledFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.FenceSignaledFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            FenceSignaledFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.context != null && m.hasOwnProperty("context")) {
                    if (!$util.isInteger(m.context))
                        return "context: integer expected";
                }
                if (m.driver != null && m.hasOwnProperty("driver")) {
                    if (!$util.isString(m.driver))
                        return "driver: string expected";
                }
                if (m.seqno != null && m.hasOwnProperty("seqno")) {
                    if (!$util.isInteger(m.seqno))
                        return "seqno: integer expected";
                }
                if (m.timeline != null && m.hasOwnProperty("timeline")) {
                    if (!$util.isString(m.timeline))
                        return "timeline: string expected";
                }
                return null;
            };

            /**
             * Creates a FenceSignaledFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.FenceSignaledFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.FenceSignaledFtraceEvent} FenceSignaledFtraceEvent
             */
            FenceSignaledFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.FenceSignaledFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.FenceSignaledFtraceEvent();
                if (d.context != null) {
                    m.context = d.context >>> 0;
                }
                if (d.driver != null) {
                    m.driver = String(d.driver);
                }
                if (d.seqno != null) {
                    m.seqno = d.seqno >>> 0;
                }
                if (d.timeline != null) {
                    m.timeline = String(d.timeline);
                }
                return m;
            };

            /**
             * Creates a plain object from a FenceSignaledFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.FenceSignaledFtraceEvent
             * @static
             * @param {perfetto.protos.FenceSignaledFtraceEvent} m FenceSignaledFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            FenceSignaledFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.context = 0;
                    d.driver = "";
                    d.seqno = 0;
                    d.timeline = "";
                }
                if (m.context != null && m.hasOwnProperty("context")) {
                    d.context = m.context;
                }
                if (m.driver != null && m.hasOwnProperty("driver")) {
                    d.driver = m.driver;
                }
                if (m.seqno != null && m.hasOwnProperty("seqno")) {
                    d.seqno = m.seqno;
                }
                if (m.timeline != null && m.hasOwnProperty("timeline")) {
                    d.timeline = m.timeline;
                }
                return d;
            };

            /**
             * Converts this FenceSignaledFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.FenceSignaledFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            FenceSignaledFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return FenceSignaledFtraceEvent;
        })();

        protos.MmFilemapAddToPageCacheFtraceEvent = (function() {

            /**
             * Properties of a MmFilemapAddToPageCacheFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmFilemapAddToPageCacheFtraceEvent
             * @property {number|null} [pfn] MmFilemapAddToPageCacheFtraceEvent pfn
             * @property {number|null} [iIno] MmFilemapAddToPageCacheFtraceEvent iIno
             * @property {number|null} [index] MmFilemapAddToPageCacheFtraceEvent index
             * @property {number|null} [sDev] MmFilemapAddToPageCacheFtraceEvent sDev
             * @property {number|null} [page] MmFilemapAddToPageCacheFtraceEvent page
             */

            /**
             * Constructs a new MmFilemapAddToPageCacheFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmFilemapAddToPageCacheFtraceEvent.
             * @implements IMmFilemapAddToPageCacheFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmFilemapAddToPageCacheFtraceEvent=} [p] Properties to set
             */
            function MmFilemapAddToPageCacheFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmFilemapAddToPageCacheFtraceEvent pfn.
             * @member {number} pfn
             * @memberof perfetto.protos.MmFilemapAddToPageCacheFtraceEvent
             * @instance
             */
            MmFilemapAddToPageCacheFtraceEvent.prototype.pfn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmFilemapAddToPageCacheFtraceEvent iIno.
             * @member {number} iIno
             * @memberof perfetto.protos.MmFilemapAddToPageCacheFtraceEvent
             * @instance
             */
            MmFilemapAddToPageCacheFtraceEvent.prototype.iIno = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmFilemapAddToPageCacheFtraceEvent index.
             * @member {number} index
             * @memberof perfetto.protos.MmFilemapAddToPageCacheFtraceEvent
             * @instance
             */
            MmFilemapAddToPageCacheFtraceEvent.prototype.index = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmFilemapAddToPageCacheFtraceEvent sDev.
             * @member {number} sDev
             * @memberof perfetto.protos.MmFilemapAddToPageCacheFtraceEvent
             * @instance
             */
            MmFilemapAddToPageCacheFtraceEvent.prototype.sDev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmFilemapAddToPageCacheFtraceEvent page.
             * @member {number} page
             * @memberof perfetto.protos.MmFilemapAddToPageCacheFtraceEvent
             * @instance
             */
            MmFilemapAddToPageCacheFtraceEvent.prototype.page = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new MmFilemapAddToPageCacheFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmFilemapAddToPageCacheFtraceEvent
             * @static
             * @param {perfetto.protos.IMmFilemapAddToPageCacheFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmFilemapAddToPageCacheFtraceEvent} MmFilemapAddToPageCacheFtraceEvent instance
             */
            MmFilemapAddToPageCacheFtraceEvent.create = function create(properties) {
                return new MmFilemapAddToPageCacheFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmFilemapAddToPageCacheFtraceEvent message. Does not implicitly {@link perfetto.protos.MmFilemapAddToPageCacheFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmFilemapAddToPageCacheFtraceEvent
             * @static
             * @param {perfetto.protos.IMmFilemapAddToPageCacheFtraceEvent} m MmFilemapAddToPageCacheFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmFilemapAddToPageCacheFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.pfn != null && Object.hasOwnProperty.call(m, "pfn"))
                    w.uint32(8).uint64(m.pfn);
                if (m.iIno != null && Object.hasOwnProperty.call(m, "iIno"))
                    w.uint32(16).uint64(m.iIno);
                if (m.index != null && Object.hasOwnProperty.call(m, "index"))
                    w.uint32(24).uint64(m.index);
                if (m.sDev != null && Object.hasOwnProperty.call(m, "sDev"))
                    w.uint32(32).uint64(m.sDev);
                if (m.page != null && Object.hasOwnProperty.call(m, "page"))
                    w.uint32(40).uint64(m.page);
                return w;
            };

            /**
             * Encodes the specified MmFilemapAddToPageCacheFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmFilemapAddToPageCacheFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmFilemapAddToPageCacheFtraceEvent
             * @static
             * @param {perfetto.protos.IMmFilemapAddToPageCacheFtraceEvent} message MmFilemapAddToPageCacheFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmFilemapAddToPageCacheFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmFilemapAddToPageCacheFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmFilemapAddToPageCacheFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmFilemapAddToPageCacheFtraceEvent} MmFilemapAddToPageCacheFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmFilemapAddToPageCacheFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmFilemapAddToPageCacheFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.pfn = r.uint64();
                        break;
                    case 2:
                        m.iIno = r.uint64();
                        break;
                    case 3:
                        m.index = r.uint64();
                        break;
                    case 4:
                        m.sDev = r.uint64();
                        break;
                    case 5:
                        m.page = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmFilemapAddToPageCacheFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmFilemapAddToPageCacheFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmFilemapAddToPageCacheFtraceEvent} MmFilemapAddToPageCacheFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmFilemapAddToPageCacheFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmFilemapAddToPageCacheFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmFilemapAddToPageCacheFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmFilemapAddToPageCacheFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.pfn != null && m.hasOwnProperty("pfn")) {
                    if (!$util.isInteger(m.pfn) && !(m.pfn && $util.isInteger(m.pfn.low) && $util.isInteger(m.pfn.high)))
                        return "pfn: integer|Long expected";
                }
                if (m.iIno != null && m.hasOwnProperty("iIno")) {
                    if (!$util.isInteger(m.iIno) && !(m.iIno && $util.isInteger(m.iIno.low) && $util.isInteger(m.iIno.high)))
                        return "iIno: integer|Long expected";
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (!$util.isInteger(m.index) && !(m.index && $util.isInteger(m.index.low) && $util.isInteger(m.index.high)))
                        return "index: integer|Long expected";
                }
                if (m.sDev != null && m.hasOwnProperty("sDev")) {
                    if (!$util.isInteger(m.sDev) && !(m.sDev && $util.isInteger(m.sDev.low) && $util.isInteger(m.sDev.high)))
                        return "sDev: integer|Long expected";
                }
                if (m.page != null && m.hasOwnProperty("page")) {
                    if (!$util.isInteger(m.page) && !(m.page && $util.isInteger(m.page.low) && $util.isInteger(m.page.high)))
                        return "page: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a MmFilemapAddToPageCacheFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmFilemapAddToPageCacheFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmFilemapAddToPageCacheFtraceEvent} MmFilemapAddToPageCacheFtraceEvent
             */
            MmFilemapAddToPageCacheFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmFilemapAddToPageCacheFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmFilemapAddToPageCacheFtraceEvent();
                if (d.pfn != null) {
                    if ($util.Long)
                        (m.pfn = $util.Long.fromValue(d.pfn)).unsigned = true;
                    else if (typeof d.pfn === "string")
                        m.pfn = parseInt(d.pfn, 10);
                    else if (typeof d.pfn === "number")
                        m.pfn = d.pfn;
                    else if (typeof d.pfn === "object")
                        m.pfn = new $util.LongBits(d.pfn.low >>> 0, d.pfn.high >>> 0).toNumber(true);
                }
                if (d.iIno != null) {
                    if ($util.Long)
                        (m.iIno = $util.Long.fromValue(d.iIno)).unsigned = true;
                    else if (typeof d.iIno === "string")
                        m.iIno = parseInt(d.iIno, 10);
                    else if (typeof d.iIno === "number")
                        m.iIno = d.iIno;
                    else if (typeof d.iIno === "object")
                        m.iIno = new $util.LongBits(d.iIno.low >>> 0, d.iIno.high >>> 0).toNumber(true);
                }
                if (d.index != null) {
                    if ($util.Long)
                        (m.index = $util.Long.fromValue(d.index)).unsigned = true;
                    else if (typeof d.index === "string")
                        m.index = parseInt(d.index, 10);
                    else if (typeof d.index === "number")
                        m.index = d.index;
                    else if (typeof d.index === "object")
                        m.index = new $util.LongBits(d.index.low >>> 0, d.index.high >>> 0).toNumber(true);
                }
                if (d.sDev != null) {
                    if ($util.Long)
                        (m.sDev = $util.Long.fromValue(d.sDev)).unsigned = true;
                    else if (typeof d.sDev === "string")
                        m.sDev = parseInt(d.sDev, 10);
                    else if (typeof d.sDev === "number")
                        m.sDev = d.sDev;
                    else if (typeof d.sDev === "object")
                        m.sDev = new $util.LongBits(d.sDev.low >>> 0, d.sDev.high >>> 0).toNumber(true);
                }
                if (d.page != null) {
                    if ($util.Long)
                        (m.page = $util.Long.fromValue(d.page)).unsigned = true;
                    else if (typeof d.page === "string")
                        m.page = parseInt(d.page, 10);
                    else if (typeof d.page === "number")
                        m.page = d.page;
                    else if (typeof d.page === "object")
                        m.page = new $util.LongBits(d.page.low >>> 0, d.page.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a MmFilemapAddToPageCacheFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmFilemapAddToPageCacheFtraceEvent
             * @static
             * @param {perfetto.protos.MmFilemapAddToPageCacheFtraceEvent} m MmFilemapAddToPageCacheFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmFilemapAddToPageCacheFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pfn = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pfn = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.iIno = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.iIno = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.index = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.index = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sDev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sDev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.page = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.page = o.longs === String ? "0" : 0;
                }
                if (m.pfn != null && m.hasOwnProperty("pfn")) {
                    if (typeof m.pfn === "number")
                        d.pfn = o.longs === String ? String(m.pfn) : m.pfn;
                    else
                        d.pfn = o.longs === String ? $util.Long.prototype.toString.call(m.pfn) : o.longs === Number ? new $util.LongBits(m.pfn.low >>> 0, m.pfn.high >>> 0).toNumber(true) : m.pfn;
                }
                if (m.iIno != null && m.hasOwnProperty("iIno")) {
                    if (typeof m.iIno === "number")
                        d.iIno = o.longs === String ? String(m.iIno) : m.iIno;
                    else
                        d.iIno = o.longs === String ? $util.Long.prototype.toString.call(m.iIno) : o.longs === Number ? new $util.LongBits(m.iIno.low >>> 0, m.iIno.high >>> 0).toNumber(true) : m.iIno;
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (typeof m.index === "number")
                        d.index = o.longs === String ? String(m.index) : m.index;
                    else
                        d.index = o.longs === String ? $util.Long.prototype.toString.call(m.index) : o.longs === Number ? new $util.LongBits(m.index.low >>> 0, m.index.high >>> 0).toNumber(true) : m.index;
                }
                if (m.sDev != null && m.hasOwnProperty("sDev")) {
                    if (typeof m.sDev === "number")
                        d.sDev = o.longs === String ? String(m.sDev) : m.sDev;
                    else
                        d.sDev = o.longs === String ? $util.Long.prototype.toString.call(m.sDev) : o.longs === Number ? new $util.LongBits(m.sDev.low >>> 0, m.sDev.high >>> 0).toNumber(true) : m.sDev;
                }
                if (m.page != null && m.hasOwnProperty("page")) {
                    if (typeof m.page === "number")
                        d.page = o.longs === String ? String(m.page) : m.page;
                    else
                        d.page = o.longs === String ? $util.Long.prototype.toString.call(m.page) : o.longs === Number ? new $util.LongBits(m.page.low >>> 0, m.page.high >>> 0).toNumber(true) : m.page;
                }
                return d;
            };

            /**
             * Converts this MmFilemapAddToPageCacheFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmFilemapAddToPageCacheFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmFilemapAddToPageCacheFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmFilemapAddToPageCacheFtraceEvent;
        })();

        protos.MmFilemapDeleteFromPageCacheFtraceEvent = (function() {

            /**
             * Properties of a MmFilemapDeleteFromPageCacheFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmFilemapDeleteFromPageCacheFtraceEvent
             * @property {number|null} [pfn] MmFilemapDeleteFromPageCacheFtraceEvent pfn
             * @property {number|null} [iIno] MmFilemapDeleteFromPageCacheFtraceEvent iIno
             * @property {number|null} [index] MmFilemapDeleteFromPageCacheFtraceEvent index
             * @property {number|null} [sDev] MmFilemapDeleteFromPageCacheFtraceEvent sDev
             * @property {number|null} [page] MmFilemapDeleteFromPageCacheFtraceEvent page
             */

            /**
             * Constructs a new MmFilemapDeleteFromPageCacheFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmFilemapDeleteFromPageCacheFtraceEvent.
             * @implements IMmFilemapDeleteFromPageCacheFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmFilemapDeleteFromPageCacheFtraceEvent=} [p] Properties to set
             */
            function MmFilemapDeleteFromPageCacheFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmFilemapDeleteFromPageCacheFtraceEvent pfn.
             * @member {number} pfn
             * @memberof perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent
             * @instance
             */
            MmFilemapDeleteFromPageCacheFtraceEvent.prototype.pfn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmFilemapDeleteFromPageCacheFtraceEvent iIno.
             * @member {number} iIno
             * @memberof perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent
             * @instance
             */
            MmFilemapDeleteFromPageCacheFtraceEvent.prototype.iIno = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmFilemapDeleteFromPageCacheFtraceEvent index.
             * @member {number} index
             * @memberof perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent
             * @instance
             */
            MmFilemapDeleteFromPageCacheFtraceEvent.prototype.index = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmFilemapDeleteFromPageCacheFtraceEvent sDev.
             * @member {number} sDev
             * @memberof perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent
             * @instance
             */
            MmFilemapDeleteFromPageCacheFtraceEvent.prototype.sDev = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmFilemapDeleteFromPageCacheFtraceEvent page.
             * @member {number} page
             * @memberof perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent
             * @instance
             */
            MmFilemapDeleteFromPageCacheFtraceEvent.prototype.page = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new MmFilemapDeleteFromPageCacheFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent
             * @static
             * @param {perfetto.protos.IMmFilemapDeleteFromPageCacheFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent} MmFilemapDeleteFromPageCacheFtraceEvent instance
             */
            MmFilemapDeleteFromPageCacheFtraceEvent.create = function create(properties) {
                return new MmFilemapDeleteFromPageCacheFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmFilemapDeleteFromPageCacheFtraceEvent message. Does not implicitly {@link perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent
             * @static
             * @param {perfetto.protos.IMmFilemapDeleteFromPageCacheFtraceEvent} m MmFilemapDeleteFromPageCacheFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmFilemapDeleteFromPageCacheFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.pfn != null && Object.hasOwnProperty.call(m, "pfn"))
                    w.uint32(8).uint64(m.pfn);
                if (m.iIno != null && Object.hasOwnProperty.call(m, "iIno"))
                    w.uint32(16).uint64(m.iIno);
                if (m.index != null && Object.hasOwnProperty.call(m, "index"))
                    w.uint32(24).uint64(m.index);
                if (m.sDev != null && Object.hasOwnProperty.call(m, "sDev"))
                    w.uint32(32).uint64(m.sDev);
                if (m.page != null && Object.hasOwnProperty.call(m, "page"))
                    w.uint32(40).uint64(m.page);
                return w;
            };

            /**
             * Encodes the specified MmFilemapDeleteFromPageCacheFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent
             * @static
             * @param {perfetto.protos.IMmFilemapDeleteFromPageCacheFtraceEvent} message MmFilemapDeleteFromPageCacheFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmFilemapDeleteFromPageCacheFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmFilemapDeleteFromPageCacheFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent} MmFilemapDeleteFromPageCacheFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmFilemapDeleteFromPageCacheFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.pfn = r.uint64();
                        break;
                    case 2:
                        m.iIno = r.uint64();
                        break;
                    case 3:
                        m.index = r.uint64();
                        break;
                    case 4:
                        m.sDev = r.uint64();
                        break;
                    case 5:
                        m.page = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmFilemapDeleteFromPageCacheFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent} MmFilemapDeleteFromPageCacheFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmFilemapDeleteFromPageCacheFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmFilemapDeleteFromPageCacheFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmFilemapDeleteFromPageCacheFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.pfn != null && m.hasOwnProperty("pfn")) {
                    if (!$util.isInteger(m.pfn) && !(m.pfn && $util.isInteger(m.pfn.low) && $util.isInteger(m.pfn.high)))
                        return "pfn: integer|Long expected";
                }
                if (m.iIno != null && m.hasOwnProperty("iIno")) {
                    if (!$util.isInteger(m.iIno) && !(m.iIno && $util.isInteger(m.iIno.low) && $util.isInteger(m.iIno.high)))
                        return "iIno: integer|Long expected";
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (!$util.isInteger(m.index) && !(m.index && $util.isInteger(m.index.low) && $util.isInteger(m.index.high)))
                        return "index: integer|Long expected";
                }
                if (m.sDev != null && m.hasOwnProperty("sDev")) {
                    if (!$util.isInteger(m.sDev) && !(m.sDev && $util.isInteger(m.sDev.low) && $util.isInteger(m.sDev.high)))
                        return "sDev: integer|Long expected";
                }
                if (m.page != null && m.hasOwnProperty("page")) {
                    if (!$util.isInteger(m.page) && !(m.page && $util.isInteger(m.page.low) && $util.isInteger(m.page.high)))
                        return "page: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a MmFilemapDeleteFromPageCacheFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent} MmFilemapDeleteFromPageCacheFtraceEvent
             */
            MmFilemapDeleteFromPageCacheFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent();
                if (d.pfn != null) {
                    if ($util.Long)
                        (m.pfn = $util.Long.fromValue(d.pfn)).unsigned = true;
                    else if (typeof d.pfn === "string")
                        m.pfn = parseInt(d.pfn, 10);
                    else if (typeof d.pfn === "number")
                        m.pfn = d.pfn;
                    else if (typeof d.pfn === "object")
                        m.pfn = new $util.LongBits(d.pfn.low >>> 0, d.pfn.high >>> 0).toNumber(true);
                }
                if (d.iIno != null) {
                    if ($util.Long)
                        (m.iIno = $util.Long.fromValue(d.iIno)).unsigned = true;
                    else if (typeof d.iIno === "string")
                        m.iIno = parseInt(d.iIno, 10);
                    else if (typeof d.iIno === "number")
                        m.iIno = d.iIno;
                    else if (typeof d.iIno === "object")
                        m.iIno = new $util.LongBits(d.iIno.low >>> 0, d.iIno.high >>> 0).toNumber(true);
                }
                if (d.index != null) {
                    if ($util.Long)
                        (m.index = $util.Long.fromValue(d.index)).unsigned = true;
                    else if (typeof d.index === "string")
                        m.index = parseInt(d.index, 10);
                    else if (typeof d.index === "number")
                        m.index = d.index;
                    else if (typeof d.index === "object")
                        m.index = new $util.LongBits(d.index.low >>> 0, d.index.high >>> 0).toNumber(true);
                }
                if (d.sDev != null) {
                    if ($util.Long)
                        (m.sDev = $util.Long.fromValue(d.sDev)).unsigned = true;
                    else if (typeof d.sDev === "string")
                        m.sDev = parseInt(d.sDev, 10);
                    else if (typeof d.sDev === "number")
                        m.sDev = d.sDev;
                    else if (typeof d.sDev === "object")
                        m.sDev = new $util.LongBits(d.sDev.low >>> 0, d.sDev.high >>> 0).toNumber(true);
                }
                if (d.page != null) {
                    if ($util.Long)
                        (m.page = $util.Long.fromValue(d.page)).unsigned = true;
                    else if (typeof d.page === "string")
                        m.page = parseInt(d.page, 10);
                    else if (typeof d.page === "number")
                        m.page = d.page;
                    else if (typeof d.page === "object")
                        m.page = new $util.LongBits(d.page.low >>> 0, d.page.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a MmFilemapDeleteFromPageCacheFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent
             * @static
             * @param {perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent} m MmFilemapDeleteFromPageCacheFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmFilemapDeleteFromPageCacheFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pfn = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pfn = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.iIno = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.iIno = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.index = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.index = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sDev = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sDev = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.page = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.page = o.longs === String ? "0" : 0;
                }
                if (m.pfn != null && m.hasOwnProperty("pfn")) {
                    if (typeof m.pfn === "number")
                        d.pfn = o.longs === String ? String(m.pfn) : m.pfn;
                    else
                        d.pfn = o.longs === String ? $util.Long.prototype.toString.call(m.pfn) : o.longs === Number ? new $util.LongBits(m.pfn.low >>> 0, m.pfn.high >>> 0).toNumber(true) : m.pfn;
                }
                if (m.iIno != null && m.hasOwnProperty("iIno")) {
                    if (typeof m.iIno === "number")
                        d.iIno = o.longs === String ? String(m.iIno) : m.iIno;
                    else
                        d.iIno = o.longs === String ? $util.Long.prototype.toString.call(m.iIno) : o.longs === Number ? new $util.LongBits(m.iIno.low >>> 0, m.iIno.high >>> 0).toNumber(true) : m.iIno;
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (typeof m.index === "number")
                        d.index = o.longs === String ? String(m.index) : m.index;
                    else
                        d.index = o.longs === String ? $util.Long.prototype.toString.call(m.index) : o.longs === Number ? new $util.LongBits(m.index.low >>> 0, m.index.high >>> 0).toNumber(true) : m.index;
                }
                if (m.sDev != null && m.hasOwnProperty("sDev")) {
                    if (typeof m.sDev === "number")
                        d.sDev = o.longs === String ? String(m.sDev) : m.sDev;
                    else
                        d.sDev = o.longs === String ? $util.Long.prototype.toString.call(m.sDev) : o.longs === Number ? new $util.LongBits(m.sDev.low >>> 0, m.sDev.high >>> 0).toNumber(true) : m.sDev;
                }
                if (m.page != null && m.hasOwnProperty("page")) {
                    if (typeof m.page === "number")
                        d.page = o.longs === String ? String(m.page) : m.page;
                    else
                        d.page = o.longs === String ? $util.Long.prototype.toString.call(m.page) : o.longs === Number ? new $util.LongBits(m.page.low >>> 0, m.page.high >>> 0).toNumber(true) : m.page;
                }
                return d;
            };

            /**
             * Converts this MmFilemapDeleteFromPageCacheFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmFilemapDeleteFromPageCacheFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmFilemapDeleteFromPageCacheFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmFilemapDeleteFromPageCacheFtraceEvent;
        })();

        protos.PrintFtraceEvent = (function() {

            /**
             * Properties of a PrintFtraceEvent.
             * @memberof perfetto.protos
             * @interface IPrintFtraceEvent
             * @property {number|null} [ip] PrintFtraceEvent ip
             * @property {string|null} [buf] PrintFtraceEvent buf
             */

            /**
             * Constructs a new PrintFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a PrintFtraceEvent.
             * @implements IPrintFtraceEvent
             * @constructor
             * @param {perfetto.protos.IPrintFtraceEvent=} [p] Properties to set
             */
            function PrintFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * PrintFtraceEvent ip.
             * @member {number} ip
             * @memberof perfetto.protos.PrintFtraceEvent
             * @instance
             */
            PrintFtraceEvent.prototype.ip = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * PrintFtraceEvent buf.
             * @member {string} buf
             * @memberof perfetto.protos.PrintFtraceEvent
             * @instance
             */
            PrintFtraceEvent.prototype.buf = "";

            /**
             * Creates a new PrintFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.PrintFtraceEvent
             * @static
             * @param {perfetto.protos.IPrintFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.PrintFtraceEvent} PrintFtraceEvent instance
             */
            PrintFtraceEvent.create = function create(properties) {
                return new PrintFtraceEvent(properties);
            };

            /**
             * Encodes the specified PrintFtraceEvent message. Does not implicitly {@link perfetto.protos.PrintFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.PrintFtraceEvent
             * @static
             * @param {perfetto.protos.IPrintFtraceEvent} m PrintFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PrintFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.ip != null && Object.hasOwnProperty.call(m, "ip"))
                    w.uint32(8).uint64(m.ip);
                if (m.buf != null && Object.hasOwnProperty.call(m, "buf"))
                    w.uint32(18).string(m.buf);
                return w;
            };

            /**
             * Encodes the specified PrintFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.PrintFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.PrintFtraceEvent
             * @static
             * @param {perfetto.protos.IPrintFtraceEvent} message PrintFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PrintFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a PrintFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.PrintFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.PrintFtraceEvent} PrintFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PrintFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.PrintFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.ip = r.uint64();
                        break;
                    case 2:
                        m.buf = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a PrintFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.PrintFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.PrintFtraceEvent} PrintFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PrintFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a PrintFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.PrintFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            PrintFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.ip != null && m.hasOwnProperty("ip")) {
                    if (!$util.isInteger(m.ip) && !(m.ip && $util.isInteger(m.ip.low) && $util.isInteger(m.ip.high)))
                        return "ip: integer|Long expected";
                }
                if (m.buf != null && m.hasOwnProperty("buf")) {
                    if (!$util.isString(m.buf))
                        return "buf: string expected";
                }
                return null;
            };

            /**
             * Creates a PrintFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.PrintFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.PrintFtraceEvent} PrintFtraceEvent
             */
            PrintFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.PrintFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.PrintFtraceEvent();
                if (d.ip != null) {
                    if ($util.Long)
                        (m.ip = $util.Long.fromValue(d.ip)).unsigned = true;
                    else if (typeof d.ip === "string")
                        m.ip = parseInt(d.ip, 10);
                    else if (typeof d.ip === "number")
                        m.ip = d.ip;
                    else if (typeof d.ip === "object")
                        m.ip = new $util.LongBits(d.ip.low >>> 0, d.ip.high >>> 0).toNumber(true);
                }
                if (d.buf != null) {
                    m.buf = String(d.buf);
                }
                return m;
            };

            /**
             * Creates a plain object from a PrintFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.PrintFtraceEvent
             * @static
             * @param {perfetto.protos.PrintFtraceEvent} m PrintFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            PrintFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ip = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ip = o.longs === String ? "0" : 0;
                    d.buf = "";
                }
                if (m.ip != null && m.hasOwnProperty("ip")) {
                    if (typeof m.ip === "number")
                        d.ip = o.longs === String ? String(m.ip) : m.ip;
                    else
                        d.ip = o.longs === String ? $util.Long.prototype.toString.call(m.ip) : o.longs === Number ? new $util.LongBits(m.ip.low >>> 0, m.ip.high >>> 0).toNumber(true) : m.ip;
                }
                if (m.buf != null && m.hasOwnProperty("buf")) {
                    d.buf = m.buf;
                }
                return d;
            };

            /**
             * Converts this PrintFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.PrintFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            PrintFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return PrintFtraceEvent;
        })();

        protos.FuncgraphEntryFtraceEvent = (function() {

            /**
             * Properties of a FuncgraphEntryFtraceEvent.
             * @memberof perfetto.protos
             * @interface IFuncgraphEntryFtraceEvent
             * @property {number|null} [depth] FuncgraphEntryFtraceEvent depth
             * @property {number|null} [func] FuncgraphEntryFtraceEvent func
             */

            /**
             * Constructs a new FuncgraphEntryFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a FuncgraphEntryFtraceEvent.
             * @implements IFuncgraphEntryFtraceEvent
             * @constructor
             * @param {perfetto.protos.IFuncgraphEntryFtraceEvent=} [p] Properties to set
             */
            function FuncgraphEntryFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * FuncgraphEntryFtraceEvent depth.
             * @member {number} depth
             * @memberof perfetto.protos.FuncgraphEntryFtraceEvent
             * @instance
             */
            FuncgraphEntryFtraceEvent.prototype.depth = 0;

            /**
             * FuncgraphEntryFtraceEvent func.
             * @member {number} func
             * @memberof perfetto.protos.FuncgraphEntryFtraceEvent
             * @instance
             */
            FuncgraphEntryFtraceEvent.prototype.func = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new FuncgraphEntryFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.FuncgraphEntryFtraceEvent
             * @static
             * @param {perfetto.protos.IFuncgraphEntryFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.FuncgraphEntryFtraceEvent} FuncgraphEntryFtraceEvent instance
             */
            FuncgraphEntryFtraceEvent.create = function create(properties) {
                return new FuncgraphEntryFtraceEvent(properties);
            };

            /**
             * Encodes the specified FuncgraphEntryFtraceEvent message. Does not implicitly {@link perfetto.protos.FuncgraphEntryFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.FuncgraphEntryFtraceEvent
             * @static
             * @param {perfetto.protos.IFuncgraphEntryFtraceEvent} m FuncgraphEntryFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FuncgraphEntryFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.depth != null && Object.hasOwnProperty.call(m, "depth"))
                    w.uint32(8).int32(m.depth);
                if (m.func != null && Object.hasOwnProperty.call(m, "func"))
                    w.uint32(16).uint64(m.func);
                return w;
            };

            /**
             * Encodes the specified FuncgraphEntryFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.FuncgraphEntryFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.FuncgraphEntryFtraceEvent
             * @static
             * @param {perfetto.protos.IFuncgraphEntryFtraceEvent} message FuncgraphEntryFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FuncgraphEntryFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a FuncgraphEntryFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.FuncgraphEntryFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.FuncgraphEntryFtraceEvent} FuncgraphEntryFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FuncgraphEntryFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FuncgraphEntryFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.depth = r.int32();
                        break;
                    case 2:
                        m.func = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a FuncgraphEntryFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.FuncgraphEntryFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.FuncgraphEntryFtraceEvent} FuncgraphEntryFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FuncgraphEntryFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a FuncgraphEntryFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.FuncgraphEntryFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            FuncgraphEntryFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.depth != null && m.hasOwnProperty("depth")) {
                    if (!$util.isInteger(m.depth))
                        return "depth: integer expected";
                }
                if (m.func != null && m.hasOwnProperty("func")) {
                    if (!$util.isInteger(m.func) && !(m.func && $util.isInteger(m.func.low) && $util.isInteger(m.func.high)))
                        return "func: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a FuncgraphEntryFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.FuncgraphEntryFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.FuncgraphEntryFtraceEvent} FuncgraphEntryFtraceEvent
             */
            FuncgraphEntryFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.FuncgraphEntryFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.FuncgraphEntryFtraceEvent();
                if (d.depth != null) {
                    m.depth = d.depth | 0;
                }
                if (d.func != null) {
                    if ($util.Long)
                        (m.func = $util.Long.fromValue(d.func)).unsigned = true;
                    else if (typeof d.func === "string")
                        m.func = parseInt(d.func, 10);
                    else if (typeof d.func === "number")
                        m.func = d.func;
                    else if (typeof d.func === "object")
                        m.func = new $util.LongBits(d.func.low >>> 0, d.func.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a FuncgraphEntryFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.FuncgraphEntryFtraceEvent
             * @static
             * @param {perfetto.protos.FuncgraphEntryFtraceEvent} m FuncgraphEntryFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            FuncgraphEntryFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.depth = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.func = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.func = o.longs === String ? "0" : 0;
                }
                if (m.depth != null && m.hasOwnProperty("depth")) {
                    d.depth = m.depth;
                }
                if (m.func != null && m.hasOwnProperty("func")) {
                    if (typeof m.func === "number")
                        d.func = o.longs === String ? String(m.func) : m.func;
                    else
                        d.func = o.longs === String ? $util.Long.prototype.toString.call(m.func) : o.longs === Number ? new $util.LongBits(m.func.low >>> 0, m.func.high >>> 0).toNumber(true) : m.func;
                }
                return d;
            };

            /**
             * Converts this FuncgraphEntryFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.FuncgraphEntryFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            FuncgraphEntryFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return FuncgraphEntryFtraceEvent;
        })();

        protos.FuncgraphExitFtraceEvent = (function() {

            /**
             * Properties of a FuncgraphExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IFuncgraphExitFtraceEvent
             * @property {number|null} [calltime] FuncgraphExitFtraceEvent calltime
             * @property {number|null} [depth] FuncgraphExitFtraceEvent depth
             * @property {number|null} [func] FuncgraphExitFtraceEvent func
             * @property {number|null} [overrun] FuncgraphExitFtraceEvent overrun
             * @property {number|null} [rettime] FuncgraphExitFtraceEvent rettime
             */

            /**
             * Constructs a new FuncgraphExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a FuncgraphExitFtraceEvent.
             * @implements IFuncgraphExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IFuncgraphExitFtraceEvent=} [p] Properties to set
             */
            function FuncgraphExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * FuncgraphExitFtraceEvent calltime.
             * @member {number} calltime
             * @memberof perfetto.protos.FuncgraphExitFtraceEvent
             * @instance
             */
            FuncgraphExitFtraceEvent.prototype.calltime = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * FuncgraphExitFtraceEvent depth.
             * @member {number} depth
             * @memberof perfetto.protos.FuncgraphExitFtraceEvent
             * @instance
             */
            FuncgraphExitFtraceEvent.prototype.depth = 0;

            /**
             * FuncgraphExitFtraceEvent func.
             * @member {number} func
             * @memberof perfetto.protos.FuncgraphExitFtraceEvent
             * @instance
             */
            FuncgraphExitFtraceEvent.prototype.func = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * FuncgraphExitFtraceEvent overrun.
             * @member {number} overrun
             * @memberof perfetto.protos.FuncgraphExitFtraceEvent
             * @instance
             */
            FuncgraphExitFtraceEvent.prototype.overrun = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * FuncgraphExitFtraceEvent rettime.
             * @member {number} rettime
             * @memberof perfetto.protos.FuncgraphExitFtraceEvent
             * @instance
             */
            FuncgraphExitFtraceEvent.prototype.rettime = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new FuncgraphExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.FuncgraphExitFtraceEvent
             * @static
             * @param {perfetto.protos.IFuncgraphExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.FuncgraphExitFtraceEvent} FuncgraphExitFtraceEvent instance
             */
            FuncgraphExitFtraceEvent.create = function create(properties) {
                return new FuncgraphExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified FuncgraphExitFtraceEvent message. Does not implicitly {@link perfetto.protos.FuncgraphExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.FuncgraphExitFtraceEvent
             * @static
             * @param {perfetto.protos.IFuncgraphExitFtraceEvent} m FuncgraphExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FuncgraphExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.calltime != null && Object.hasOwnProperty.call(m, "calltime"))
                    w.uint32(8).uint64(m.calltime);
                if (m.depth != null && Object.hasOwnProperty.call(m, "depth"))
                    w.uint32(16).int32(m.depth);
                if (m.func != null && Object.hasOwnProperty.call(m, "func"))
                    w.uint32(24).uint64(m.func);
                if (m.overrun != null && Object.hasOwnProperty.call(m, "overrun"))
                    w.uint32(32).uint64(m.overrun);
                if (m.rettime != null && Object.hasOwnProperty.call(m, "rettime"))
                    w.uint32(40).uint64(m.rettime);
                return w;
            };

            /**
             * Encodes the specified FuncgraphExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.FuncgraphExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.FuncgraphExitFtraceEvent
             * @static
             * @param {perfetto.protos.IFuncgraphExitFtraceEvent} message FuncgraphExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FuncgraphExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a FuncgraphExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.FuncgraphExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.FuncgraphExitFtraceEvent} FuncgraphExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FuncgraphExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FuncgraphExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.calltime = r.uint64();
                        break;
                    case 2:
                        m.depth = r.int32();
                        break;
                    case 3:
                        m.func = r.uint64();
                        break;
                    case 4:
                        m.overrun = r.uint64();
                        break;
                    case 5:
                        m.rettime = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a FuncgraphExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.FuncgraphExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.FuncgraphExitFtraceEvent} FuncgraphExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FuncgraphExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a FuncgraphExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.FuncgraphExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            FuncgraphExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.calltime != null && m.hasOwnProperty("calltime")) {
                    if (!$util.isInteger(m.calltime) && !(m.calltime && $util.isInteger(m.calltime.low) && $util.isInteger(m.calltime.high)))
                        return "calltime: integer|Long expected";
                }
                if (m.depth != null && m.hasOwnProperty("depth")) {
                    if (!$util.isInteger(m.depth))
                        return "depth: integer expected";
                }
                if (m.func != null && m.hasOwnProperty("func")) {
                    if (!$util.isInteger(m.func) && !(m.func && $util.isInteger(m.func.low) && $util.isInteger(m.func.high)))
                        return "func: integer|Long expected";
                }
                if (m.overrun != null && m.hasOwnProperty("overrun")) {
                    if (!$util.isInteger(m.overrun) && !(m.overrun && $util.isInteger(m.overrun.low) && $util.isInteger(m.overrun.high)))
                        return "overrun: integer|Long expected";
                }
                if (m.rettime != null && m.hasOwnProperty("rettime")) {
                    if (!$util.isInteger(m.rettime) && !(m.rettime && $util.isInteger(m.rettime.low) && $util.isInteger(m.rettime.high)))
                        return "rettime: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a FuncgraphExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.FuncgraphExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.FuncgraphExitFtraceEvent} FuncgraphExitFtraceEvent
             */
            FuncgraphExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.FuncgraphExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.FuncgraphExitFtraceEvent();
                if (d.calltime != null) {
                    if ($util.Long)
                        (m.calltime = $util.Long.fromValue(d.calltime)).unsigned = true;
                    else if (typeof d.calltime === "string")
                        m.calltime = parseInt(d.calltime, 10);
                    else if (typeof d.calltime === "number")
                        m.calltime = d.calltime;
                    else if (typeof d.calltime === "object")
                        m.calltime = new $util.LongBits(d.calltime.low >>> 0, d.calltime.high >>> 0).toNumber(true);
                }
                if (d.depth != null) {
                    m.depth = d.depth | 0;
                }
                if (d.func != null) {
                    if ($util.Long)
                        (m.func = $util.Long.fromValue(d.func)).unsigned = true;
                    else if (typeof d.func === "string")
                        m.func = parseInt(d.func, 10);
                    else if (typeof d.func === "number")
                        m.func = d.func;
                    else if (typeof d.func === "object")
                        m.func = new $util.LongBits(d.func.low >>> 0, d.func.high >>> 0).toNumber(true);
                }
                if (d.overrun != null) {
                    if ($util.Long)
                        (m.overrun = $util.Long.fromValue(d.overrun)).unsigned = true;
                    else if (typeof d.overrun === "string")
                        m.overrun = parseInt(d.overrun, 10);
                    else if (typeof d.overrun === "number")
                        m.overrun = d.overrun;
                    else if (typeof d.overrun === "object")
                        m.overrun = new $util.LongBits(d.overrun.low >>> 0, d.overrun.high >>> 0).toNumber(true);
                }
                if (d.rettime != null) {
                    if ($util.Long)
                        (m.rettime = $util.Long.fromValue(d.rettime)).unsigned = true;
                    else if (typeof d.rettime === "string")
                        m.rettime = parseInt(d.rettime, 10);
                    else if (typeof d.rettime === "number")
                        m.rettime = d.rettime;
                    else if (typeof d.rettime === "object")
                        m.rettime = new $util.LongBits(d.rettime.low >>> 0, d.rettime.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a FuncgraphExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.FuncgraphExitFtraceEvent
             * @static
             * @param {perfetto.protos.FuncgraphExitFtraceEvent} m FuncgraphExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            FuncgraphExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.calltime = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.calltime = o.longs === String ? "0" : 0;
                    d.depth = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.func = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.func = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.overrun = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.overrun = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.rettime = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.rettime = o.longs === String ? "0" : 0;
                }
                if (m.calltime != null && m.hasOwnProperty("calltime")) {
                    if (typeof m.calltime === "number")
                        d.calltime = o.longs === String ? String(m.calltime) : m.calltime;
                    else
                        d.calltime = o.longs === String ? $util.Long.prototype.toString.call(m.calltime) : o.longs === Number ? new $util.LongBits(m.calltime.low >>> 0, m.calltime.high >>> 0).toNumber(true) : m.calltime;
                }
                if (m.depth != null && m.hasOwnProperty("depth")) {
                    d.depth = m.depth;
                }
                if (m.func != null && m.hasOwnProperty("func")) {
                    if (typeof m.func === "number")
                        d.func = o.longs === String ? String(m.func) : m.func;
                    else
                        d.func = o.longs === String ? $util.Long.prototype.toString.call(m.func) : o.longs === Number ? new $util.LongBits(m.func.low >>> 0, m.func.high >>> 0).toNumber(true) : m.func;
                }
                if (m.overrun != null && m.hasOwnProperty("overrun")) {
                    if (typeof m.overrun === "number")
                        d.overrun = o.longs === String ? String(m.overrun) : m.overrun;
                    else
                        d.overrun = o.longs === String ? $util.Long.prototype.toString.call(m.overrun) : o.longs === Number ? new $util.LongBits(m.overrun.low >>> 0, m.overrun.high >>> 0).toNumber(true) : m.overrun;
                }
                if (m.rettime != null && m.hasOwnProperty("rettime")) {
                    if (typeof m.rettime === "number")
                        d.rettime = o.longs === String ? String(m.rettime) : m.rettime;
                    else
                        d.rettime = o.longs === String ? $util.Long.prototype.toString.call(m.rettime) : o.longs === Number ? new $util.LongBits(m.rettime.low >>> 0, m.rettime.high >>> 0).toNumber(true) : m.rettime;
                }
                return d;
            };

            /**
             * Converts this FuncgraphExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.FuncgraphExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            FuncgraphExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return FuncgraphExitFtraceEvent;
        })();

        protos.G2dTracingMarkWriteFtraceEvent = (function() {

            /**
             * Properties of a G2dTracingMarkWriteFtraceEvent.
             * @memberof perfetto.protos
             * @interface IG2dTracingMarkWriteFtraceEvent
             * @property {number|null} [pid] G2dTracingMarkWriteFtraceEvent pid
             * @property {string|null} [name] G2dTracingMarkWriteFtraceEvent name
             * @property {number|null} [type] G2dTracingMarkWriteFtraceEvent type
             * @property {number|null} [value] G2dTracingMarkWriteFtraceEvent value
             */

            /**
             * Constructs a new G2dTracingMarkWriteFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a G2dTracingMarkWriteFtraceEvent.
             * @implements IG2dTracingMarkWriteFtraceEvent
             * @constructor
             * @param {perfetto.protos.IG2dTracingMarkWriteFtraceEvent=} [p] Properties to set
             */
            function G2dTracingMarkWriteFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * G2dTracingMarkWriteFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.G2dTracingMarkWriteFtraceEvent
             * @instance
             */
            G2dTracingMarkWriteFtraceEvent.prototype.pid = 0;

            /**
             * G2dTracingMarkWriteFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.G2dTracingMarkWriteFtraceEvent
             * @instance
             */
            G2dTracingMarkWriteFtraceEvent.prototype.name = "";

            /**
             * G2dTracingMarkWriteFtraceEvent type.
             * @member {number} type
             * @memberof perfetto.protos.G2dTracingMarkWriteFtraceEvent
             * @instance
             */
            G2dTracingMarkWriteFtraceEvent.prototype.type = 0;

            /**
             * G2dTracingMarkWriteFtraceEvent value.
             * @member {number} value
             * @memberof perfetto.protos.G2dTracingMarkWriteFtraceEvent
             * @instance
             */
            G2dTracingMarkWriteFtraceEvent.prototype.value = 0;

            /**
             * Creates a new G2dTracingMarkWriteFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.G2dTracingMarkWriteFtraceEvent
             * @static
             * @param {perfetto.protos.IG2dTracingMarkWriteFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.G2dTracingMarkWriteFtraceEvent} G2dTracingMarkWriteFtraceEvent instance
             */
            G2dTracingMarkWriteFtraceEvent.create = function create(properties) {
                return new G2dTracingMarkWriteFtraceEvent(properties);
            };

            /**
             * Encodes the specified G2dTracingMarkWriteFtraceEvent message. Does not implicitly {@link perfetto.protos.G2dTracingMarkWriteFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.G2dTracingMarkWriteFtraceEvent
             * @static
             * @param {perfetto.protos.IG2dTracingMarkWriteFtraceEvent} m G2dTracingMarkWriteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            G2dTracingMarkWriteFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(8).int32(m.pid);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(34).string(m.name);
                if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                    w.uint32(40).uint32(m.type);
                if (m.value != null && Object.hasOwnProperty.call(m, "value"))
                    w.uint32(48).int32(m.value);
                return w;
            };

            /**
             * Encodes the specified G2dTracingMarkWriteFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.G2dTracingMarkWriteFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.G2dTracingMarkWriteFtraceEvent
             * @static
             * @param {perfetto.protos.IG2dTracingMarkWriteFtraceEvent} message G2dTracingMarkWriteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            G2dTracingMarkWriteFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a G2dTracingMarkWriteFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.G2dTracingMarkWriteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.G2dTracingMarkWriteFtraceEvent} G2dTracingMarkWriteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            G2dTracingMarkWriteFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.G2dTracingMarkWriteFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.pid = r.int32();
                        break;
                    case 4:
                        m.name = r.string();
                        break;
                    case 5:
                        m.type = r.uint32();
                        break;
                    case 6:
                        m.value = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a G2dTracingMarkWriteFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.G2dTracingMarkWriteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.G2dTracingMarkWriteFtraceEvent} G2dTracingMarkWriteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            G2dTracingMarkWriteFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a G2dTracingMarkWriteFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.G2dTracingMarkWriteFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            G2dTracingMarkWriteFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    if (!$util.isInteger(m.type))
                        return "type: integer expected";
                }
                if (m.value != null && m.hasOwnProperty("value")) {
                    if (!$util.isInteger(m.value))
                        return "value: integer expected";
                }
                return null;
            };

            /**
             * Creates a G2dTracingMarkWriteFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.G2dTracingMarkWriteFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.G2dTracingMarkWriteFtraceEvent} G2dTracingMarkWriteFtraceEvent
             */
            G2dTracingMarkWriteFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.G2dTracingMarkWriteFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.G2dTracingMarkWriteFtraceEvent();
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.type != null) {
                    m.type = d.type >>> 0;
                }
                if (d.value != null) {
                    m.value = d.value | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a G2dTracingMarkWriteFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.G2dTracingMarkWriteFtraceEvent
             * @static
             * @param {perfetto.protos.G2dTracingMarkWriteFtraceEvent} m G2dTracingMarkWriteFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            G2dTracingMarkWriteFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.pid = 0;
                    d.name = "";
                    d.type = 0;
                    d.value = 0;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    d.type = m.type;
                }
                if (m.value != null && m.hasOwnProperty("value")) {
                    d.value = m.value;
                }
                return d;
            };

            /**
             * Converts this G2dTracingMarkWriteFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.G2dTracingMarkWriteFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            G2dTracingMarkWriteFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return G2dTracingMarkWriteFtraceEvent;
        })();

        protos.GpuMemTotalFtraceEvent = (function() {

            /**
             * Properties of a GpuMemTotalFtraceEvent.
             * @memberof perfetto.protos
             * @interface IGpuMemTotalFtraceEvent
             * @property {number|null} [gpuId] GpuMemTotalFtraceEvent gpuId
             * @property {number|null} [pid] GpuMemTotalFtraceEvent pid
             * @property {number|null} [size] GpuMemTotalFtraceEvent size
             */

            /**
             * Constructs a new GpuMemTotalFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a GpuMemTotalFtraceEvent.
             * @implements IGpuMemTotalFtraceEvent
             * @constructor
             * @param {perfetto.protos.IGpuMemTotalFtraceEvent=} [p] Properties to set
             */
            function GpuMemTotalFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * GpuMemTotalFtraceEvent gpuId.
             * @member {number} gpuId
             * @memberof perfetto.protos.GpuMemTotalFtraceEvent
             * @instance
             */
            GpuMemTotalFtraceEvent.prototype.gpuId = 0;

            /**
             * GpuMemTotalFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.GpuMemTotalFtraceEvent
             * @instance
             */
            GpuMemTotalFtraceEvent.prototype.pid = 0;

            /**
             * GpuMemTotalFtraceEvent size.
             * @member {number} size
             * @memberof perfetto.protos.GpuMemTotalFtraceEvent
             * @instance
             */
            GpuMemTotalFtraceEvent.prototype.size = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new GpuMemTotalFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.GpuMemTotalFtraceEvent
             * @static
             * @param {perfetto.protos.IGpuMemTotalFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.GpuMemTotalFtraceEvent} GpuMemTotalFtraceEvent instance
             */
            GpuMemTotalFtraceEvent.create = function create(properties) {
                return new GpuMemTotalFtraceEvent(properties);
            };

            /**
             * Encodes the specified GpuMemTotalFtraceEvent message. Does not implicitly {@link perfetto.protos.GpuMemTotalFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.GpuMemTotalFtraceEvent
             * @static
             * @param {perfetto.protos.IGpuMemTotalFtraceEvent} m GpuMemTotalFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GpuMemTotalFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.gpuId != null && Object.hasOwnProperty.call(m, "gpuId"))
                    w.uint32(8).uint32(m.gpuId);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(16).uint32(m.pid);
                if (m.size != null && Object.hasOwnProperty.call(m, "size"))
                    w.uint32(24).uint64(m.size);
                return w;
            };

            /**
             * Encodes the specified GpuMemTotalFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.GpuMemTotalFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.GpuMemTotalFtraceEvent
             * @static
             * @param {perfetto.protos.IGpuMemTotalFtraceEvent} message GpuMemTotalFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GpuMemTotalFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a GpuMemTotalFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.GpuMemTotalFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.GpuMemTotalFtraceEvent} GpuMemTotalFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GpuMemTotalFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.GpuMemTotalFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.gpuId = r.uint32();
                        break;
                    case 2:
                        m.pid = r.uint32();
                        break;
                    case 3:
                        m.size = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a GpuMemTotalFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.GpuMemTotalFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.GpuMemTotalFtraceEvent} GpuMemTotalFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GpuMemTotalFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a GpuMemTotalFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.GpuMemTotalFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            GpuMemTotalFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.gpuId != null && m.hasOwnProperty("gpuId")) {
                    if (!$util.isInteger(m.gpuId))
                        return "gpuId: integer expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (!$util.isInteger(m.size) && !(m.size && $util.isInteger(m.size.low) && $util.isInteger(m.size.high)))
                        return "size: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a GpuMemTotalFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.GpuMemTotalFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.GpuMemTotalFtraceEvent} GpuMemTotalFtraceEvent
             */
            GpuMemTotalFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.GpuMemTotalFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.GpuMemTotalFtraceEvent();
                if (d.gpuId != null) {
                    m.gpuId = d.gpuId >>> 0;
                }
                if (d.pid != null) {
                    m.pid = d.pid >>> 0;
                }
                if (d.size != null) {
                    if ($util.Long)
                        (m.size = $util.Long.fromValue(d.size)).unsigned = true;
                    else if (typeof d.size === "string")
                        m.size = parseInt(d.size, 10);
                    else if (typeof d.size === "number")
                        m.size = d.size;
                    else if (typeof d.size === "object")
                        m.size = new $util.LongBits(d.size.low >>> 0, d.size.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a GpuMemTotalFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.GpuMemTotalFtraceEvent
             * @static
             * @param {perfetto.protos.GpuMemTotalFtraceEvent} m GpuMemTotalFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            GpuMemTotalFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.gpuId = 0;
                    d.pid = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.size = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.size = o.longs === String ? "0" : 0;
                }
                if (m.gpuId != null && m.hasOwnProperty("gpuId")) {
                    d.gpuId = m.gpuId;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (typeof m.size === "number")
                        d.size = o.longs === String ? String(m.size) : m.size;
                    else
                        d.size = o.longs === String ? $util.Long.prototype.toString.call(m.size) : o.longs === Number ? new $util.LongBits(m.size.low >>> 0, m.size.high >>> 0).toNumber(true) : m.size;
                }
                return d;
            };

            /**
             * Converts this GpuMemTotalFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.GpuMemTotalFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            GpuMemTotalFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return GpuMemTotalFtraceEvent;
        })();

        protos.DrmSchedJobFtraceEvent = (function() {

            /**
             * Properties of a DrmSchedJobFtraceEvent.
             * @memberof perfetto.protos
             * @interface IDrmSchedJobFtraceEvent
             * @property {number|null} [entity] DrmSchedJobFtraceEvent entity
             * @property {number|null} [fence] DrmSchedJobFtraceEvent fence
             * @property {number|null} [hwJobCount] DrmSchedJobFtraceEvent hwJobCount
             * @property {number|null} [id] DrmSchedJobFtraceEvent id
             * @property {number|null} [jobCount] DrmSchedJobFtraceEvent jobCount
             * @property {string|null} [name] DrmSchedJobFtraceEvent name
             */

            /**
             * Constructs a new DrmSchedJobFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a DrmSchedJobFtraceEvent.
             * @implements IDrmSchedJobFtraceEvent
             * @constructor
             * @param {perfetto.protos.IDrmSchedJobFtraceEvent=} [p] Properties to set
             */
            function DrmSchedJobFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DrmSchedJobFtraceEvent entity.
             * @member {number} entity
             * @memberof perfetto.protos.DrmSchedJobFtraceEvent
             * @instance
             */
            DrmSchedJobFtraceEvent.prototype.entity = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * DrmSchedJobFtraceEvent fence.
             * @member {number} fence
             * @memberof perfetto.protos.DrmSchedJobFtraceEvent
             * @instance
             */
            DrmSchedJobFtraceEvent.prototype.fence = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * DrmSchedJobFtraceEvent hwJobCount.
             * @member {number} hwJobCount
             * @memberof perfetto.protos.DrmSchedJobFtraceEvent
             * @instance
             */
            DrmSchedJobFtraceEvent.prototype.hwJobCount = 0;

            /**
             * DrmSchedJobFtraceEvent id.
             * @member {number} id
             * @memberof perfetto.protos.DrmSchedJobFtraceEvent
             * @instance
             */
            DrmSchedJobFtraceEvent.prototype.id = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * DrmSchedJobFtraceEvent jobCount.
             * @member {number} jobCount
             * @memberof perfetto.protos.DrmSchedJobFtraceEvent
             * @instance
             */
            DrmSchedJobFtraceEvent.prototype.jobCount = 0;

            /**
             * DrmSchedJobFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.DrmSchedJobFtraceEvent
             * @instance
             */
            DrmSchedJobFtraceEvent.prototype.name = "";

            /**
             * Creates a new DrmSchedJobFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DrmSchedJobFtraceEvent
             * @static
             * @param {perfetto.protos.IDrmSchedJobFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.DrmSchedJobFtraceEvent} DrmSchedJobFtraceEvent instance
             */
            DrmSchedJobFtraceEvent.create = function create(properties) {
                return new DrmSchedJobFtraceEvent(properties);
            };

            /**
             * Encodes the specified DrmSchedJobFtraceEvent message. Does not implicitly {@link perfetto.protos.DrmSchedJobFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DrmSchedJobFtraceEvent
             * @static
             * @param {perfetto.protos.IDrmSchedJobFtraceEvent} m DrmSchedJobFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DrmSchedJobFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.entity != null && Object.hasOwnProperty.call(m, "entity"))
                    w.uint32(8).uint64(m.entity);
                if (m.fence != null && Object.hasOwnProperty.call(m, "fence"))
                    w.uint32(16).uint64(m.fence);
                if (m.hwJobCount != null && Object.hasOwnProperty.call(m, "hwJobCount"))
                    w.uint32(24).int32(m.hwJobCount);
                if (m.id != null && Object.hasOwnProperty.call(m, "id"))
                    w.uint32(32).uint64(m.id);
                if (m.jobCount != null && Object.hasOwnProperty.call(m, "jobCount"))
                    w.uint32(40).uint32(m.jobCount);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(50).string(m.name);
                return w;
            };

            /**
             * Encodes the specified DrmSchedJobFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.DrmSchedJobFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DrmSchedJobFtraceEvent
             * @static
             * @param {perfetto.protos.IDrmSchedJobFtraceEvent} message DrmSchedJobFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DrmSchedJobFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DrmSchedJobFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DrmSchedJobFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DrmSchedJobFtraceEvent} DrmSchedJobFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DrmSchedJobFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DrmSchedJobFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.entity = r.uint64();
                        break;
                    case 2:
                        m.fence = r.uint64();
                        break;
                    case 3:
                        m.hwJobCount = r.int32();
                        break;
                    case 4:
                        m.id = r.uint64();
                        break;
                    case 5:
                        m.jobCount = r.uint32();
                        break;
                    case 6:
                        m.name = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DrmSchedJobFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DrmSchedJobFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DrmSchedJobFtraceEvent} DrmSchedJobFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DrmSchedJobFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DrmSchedJobFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.DrmSchedJobFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DrmSchedJobFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.entity != null && m.hasOwnProperty("entity")) {
                    if (!$util.isInteger(m.entity) && !(m.entity && $util.isInteger(m.entity.low) && $util.isInteger(m.entity.high)))
                        return "entity: integer|Long expected";
                }
                if (m.fence != null && m.hasOwnProperty("fence")) {
                    if (!$util.isInteger(m.fence) && !(m.fence && $util.isInteger(m.fence.low) && $util.isInteger(m.fence.high)))
                        return "fence: integer|Long expected";
                }
                if (m.hwJobCount != null && m.hasOwnProperty("hwJobCount")) {
                    if (!$util.isInteger(m.hwJobCount))
                        return "hwJobCount: integer expected";
                }
                if (m.id != null && m.hasOwnProperty("id")) {
                    if (!$util.isInteger(m.id) && !(m.id && $util.isInteger(m.id.low) && $util.isInteger(m.id.high)))
                        return "id: integer|Long expected";
                }
                if (m.jobCount != null && m.hasOwnProperty("jobCount")) {
                    if (!$util.isInteger(m.jobCount))
                        return "jobCount: integer expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                return null;
            };

            /**
             * Creates a DrmSchedJobFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DrmSchedJobFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DrmSchedJobFtraceEvent} DrmSchedJobFtraceEvent
             */
            DrmSchedJobFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DrmSchedJobFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.DrmSchedJobFtraceEvent();
                if (d.entity != null) {
                    if ($util.Long)
                        (m.entity = $util.Long.fromValue(d.entity)).unsigned = true;
                    else if (typeof d.entity === "string")
                        m.entity = parseInt(d.entity, 10);
                    else if (typeof d.entity === "number")
                        m.entity = d.entity;
                    else if (typeof d.entity === "object")
                        m.entity = new $util.LongBits(d.entity.low >>> 0, d.entity.high >>> 0).toNumber(true);
                }
                if (d.fence != null) {
                    if ($util.Long)
                        (m.fence = $util.Long.fromValue(d.fence)).unsigned = true;
                    else if (typeof d.fence === "string")
                        m.fence = parseInt(d.fence, 10);
                    else if (typeof d.fence === "number")
                        m.fence = d.fence;
                    else if (typeof d.fence === "object")
                        m.fence = new $util.LongBits(d.fence.low >>> 0, d.fence.high >>> 0).toNumber(true);
                }
                if (d.hwJobCount != null) {
                    m.hwJobCount = d.hwJobCount | 0;
                }
                if (d.id != null) {
                    if ($util.Long)
                        (m.id = $util.Long.fromValue(d.id)).unsigned = true;
                    else if (typeof d.id === "string")
                        m.id = parseInt(d.id, 10);
                    else if (typeof d.id === "number")
                        m.id = d.id;
                    else if (typeof d.id === "object")
                        m.id = new $util.LongBits(d.id.low >>> 0, d.id.high >>> 0).toNumber(true);
                }
                if (d.jobCount != null) {
                    m.jobCount = d.jobCount >>> 0;
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                return m;
            };

            /**
             * Creates a plain object from a DrmSchedJobFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DrmSchedJobFtraceEvent
             * @static
             * @param {perfetto.protos.DrmSchedJobFtraceEvent} m DrmSchedJobFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DrmSchedJobFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.entity = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.entity = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.fence = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.fence = o.longs === String ? "0" : 0;
                    d.hwJobCount = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.id = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.id = o.longs === String ? "0" : 0;
                    d.jobCount = 0;
                    d.name = "";
                }
                if (m.entity != null && m.hasOwnProperty("entity")) {
                    if (typeof m.entity === "number")
                        d.entity = o.longs === String ? String(m.entity) : m.entity;
                    else
                        d.entity = o.longs === String ? $util.Long.prototype.toString.call(m.entity) : o.longs === Number ? new $util.LongBits(m.entity.low >>> 0, m.entity.high >>> 0).toNumber(true) : m.entity;
                }
                if (m.fence != null && m.hasOwnProperty("fence")) {
                    if (typeof m.fence === "number")
                        d.fence = o.longs === String ? String(m.fence) : m.fence;
                    else
                        d.fence = o.longs === String ? $util.Long.prototype.toString.call(m.fence) : o.longs === Number ? new $util.LongBits(m.fence.low >>> 0, m.fence.high >>> 0).toNumber(true) : m.fence;
                }
                if (m.hwJobCount != null && m.hasOwnProperty("hwJobCount")) {
                    d.hwJobCount = m.hwJobCount;
                }
                if (m.id != null && m.hasOwnProperty("id")) {
                    if (typeof m.id === "number")
                        d.id = o.longs === String ? String(m.id) : m.id;
                    else
                        d.id = o.longs === String ? $util.Long.prototype.toString.call(m.id) : o.longs === Number ? new $util.LongBits(m.id.low >>> 0, m.id.high >>> 0).toNumber(true) : m.id;
                }
                if (m.jobCount != null && m.hasOwnProperty("jobCount")) {
                    d.jobCount = m.jobCount;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                return d;
            };

            /**
             * Converts this DrmSchedJobFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DrmSchedJobFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DrmSchedJobFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DrmSchedJobFtraceEvent;
        })();

        protos.DrmRunJobFtraceEvent = (function() {

            /**
             * Properties of a DrmRunJobFtraceEvent.
             * @memberof perfetto.protos
             * @interface IDrmRunJobFtraceEvent
             * @property {number|null} [entity] DrmRunJobFtraceEvent entity
             * @property {number|null} [fence] DrmRunJobFtraceEvent fence
             * @property {number|null} [hwJobCount] DrmRunJobFtraceEvent hwJobCount
             * @property {number|null} [id] DrmRunJobFtraceEvent id
             * @property {number|null} [jobCount] DrmRunJobFtraceEvent jobCount
             * @property {string|null} [name] DrmRunJobFtraceEvent name
             */

            /**
             * Constructs a new DrmRunJobFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a DrmRunJobFtraceEvent.
             * @implements IDrmRunJobFtraceEvent
             * @constructor
             * @param {perfetto.protos.IDrmRunJobFtraceEvent=} [p] Properties to set
             */
            function DrmRunJobFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DrmRunJobFtraceEvent entity.
             * @member {number} entity
             * @memberof perfetto.protos.DrmRunJobFtraceEvent
             * @instance
             */
            DrmRunJobFtraceEvent.prototype.entity = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * DrmRunJobFtraceEvent fence.
             * @member {number} fence
             * @memberof perfetto.protos.DrmRunJobFtraceEvent
             * @instance
             */
            DrmRunJobFtraceEvent.prototype.fence = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * DrmRunJobFtraceEvent hwJobCount.
             * @member {number} hwJobCount
             * @memberof perfetto.protos.DrmRunJobFtraceEvent
             * @instance
             */
            DrmRunJobFtraceEvent.prototype.hwJobCount = 0;

            /**
             * DrmRunJobFtraceEvent id.
             * @member {number} id
             * @memberof perfetto.protos.DrmRunJobFtraceEvent
             * @instance
             */
            DrmRunJobFtraceEvent.prototype.id = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * DrmRunJobFtraceEvent jobCount.
             * @member {number} jobCount
             * @memberof perfetto.protos.DrmRunJobFtraceEvent
             * @instance
             */
            DrmRunJobFtraceEvent.prototype.jobCount = 0;

            /**
             * DrmRunJobFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.DrmRunJobFtraceEvent
             * @instance
             */
            DrmRunJobFtraceEvent.prototype.name = "";

            /**
             * Creates a new DrmRunJobFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DrmRunJobFtraceEvent
             * @static
             * @param {perfetto.protos.IDrmRunJobFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.DrmRunJobFtraceEvent} DrmRunJobFtraceEvent instance
             */
            DrmRunJobFtraceEvent.create = function create(properties) {
                return new DrmRunJobFtraceEvent(properties);
            };

            /**
             * Encodes the specified DrmRunJobFtraceEvent message. Does not implicitly {@link perfetto.protos.DrmRunJobFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DrmRunJobFtraceEvent
             * @static
             * @param {perfetto.protos.IDrmRunJobFtraceEvent} m DrmRunJobFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DrmRunJobFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.entity != null && Object.hasOwnProperty.call(m, "entity"))
                    w.uint32(8).uint64(m.entity);
                if (m.fence != null && Object.hasOwnProperty.call(m, "fence"))
                    w.uint32(16).uint64(m.fence);
                if (m.hwJobCount != null && Object.hasOwnProperty.call(m, "hwJobCount"))
                    w.uint32(24).int32(m.hwJobCount);
                if (m.id != null && Object.hasOwnProperty.call(m, "id"))
                    w.uint32(32).uint64(m.id);
                if (m.jobCount != null && Object.hasOwnProperty.call(m, "jobCount"))
                    w.uint32(40).uint32(m.jobCount);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(50).string(m.name);
                return w;
            };

            /**
             * Encodes the specified DrmRunJobFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.DrmRunJobFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DrmRunJobFtraceEvent
             * @static
             * @param {perfetto.protos.IDrmRunJobFtraceEvent} message DrmRunJobFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DrmRunJobFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DrmRunJobFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DrmRunJobFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DrmRunJobFtraceEvent} DrmRunJobFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DrmRunJobFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DrmRunJobFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.entity = r.uint64();
                        break;
                    case 2:
                        m.fence = r.uint64();
                        break;
                    case 3:
                        m.hwJobCount = r.int32();
                        break;
                    case 4:
                        m.id = r.uint64();
                        break;
                    case 5:
                        m.jobCount = r.uint32();
                        break;
                    case 6:
                        m.name = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DrmRunJobFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DrmRunJobFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DrmRunJobFtraceEvent} DrmRunJobFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DrmRunJobFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DrmRunJobFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.DrmRunJobFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DrmRunJobFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.entity != null && m.hasOwnProperty("entity")) {
                    if (!$util.isInteger(m.entity) && !(m.entity && $util.isInteger(m.entity.low) && $util.isInteger(m.entity.high)))
                        return "entity: integer|Long expected";
                }
                if (m.fence != null && m.hasOwnProperty("fence")) {
                    if (!$util.isInteger(m.fence) && !(m.fence && $util.isInteger(m.fence.low) && $util.isInteger(m.fence.high)))
                        return "fence: integer|Long expected";
                }
                if (m.hwJobCount != null && m.hasOwnProperty("hwJobCount")) {
                    if (!$util.isInteger(m.hwJobCount))
                        return "hwJobCount: integer expected";
                }
                if (m.id != null && m.hasOwnProperty("id")) {
                    if (!$util.isInteger(m.id) && !(m.id && $util.isInteger(m.id.low) && $util.isInteger(m.id.high)))
                        return "id: integer|Long expected";
                }
                if (m.jobCount != null && m.hasOwnProperty("jobCount")) {
                    if (!$util.isInteger(m.jobCount))
                        return "jobCount: integer expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                return null;
            };

            /**
             * Creates a DrmRunJobFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DrmRunJobFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DrmRunJobFtraceEvent} DrmRunJobFtraceEvent
             */
            DrmRunJobFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DrmRunJobFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.DrmRunJobFtraceEvent();
                if (d.entity != null) {
                    if ($util.Long)
                        (m.entity = $util.Long.fromValue(d.entity)).unsigned = true;
                    else if (typeof d.entity === "string")
                        m.entity = parseInt(d.entity, 10);
                    else if (typeof d.entity === "number")
                        m.entity = d.entity;
                    else if (typeof d.entity === "object")
                        m.entity = new $util.LongBits(d.entity.low >>> 0, d.entity.high >>> 0).toNumber(true);
                }
                if (d.fence != null) {
                    if ($util.Long)
                        (m.fence = $util.Long.fromValue(d.fence)).unsigned = true;
                    else if (typeof d.fence === "string")
                        m.fence = parseInt(d.fence, 10);
                    else if (typeof d.fence === "number")
                        m.fence = d.fence;
                    else if (typeof d.fence === "object")
                        m.fence = new $util.LongBits(d.fence.low >>> 0, d.fence.high >>> 0).toNumber(true);
                }
                if (d.hwJobCount != null) {
                    m.hwJobCount = d.hwJobCount | 0;
                }
                if (d.id != null) {
                    if ($util.Long)
                        (m.id = $util.Long.fromValue(d.id)).unsigned = true;
                    else if (typeof d.id === "string")
                        m.id = parseInt(d.id, 10);
                    else if (typeof d.id === "number")
                        m.id = d.id;
                    else if (typeof d.id === "object")
                        m.id = new $util.LongBits(d.id.low >>> 0, d.id.high >>> 0).toNumber(true);
                }
                if (d.jobCount != null) {
                    m.jobCount = d.jobCount >>> 0;
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                return m;
            };

            /**
             * Creates a plain object from a DrmRunJobFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DrmRunJobFtraceEvent
             * @static
             * @param {perfetto.protos.DrmRunJobFtraceEvent} m DrmRunJobFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DrmRunJobFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.entity = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.entity = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.fence = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.fence = o.longs === String ? "0" : 0;
                    d.hwJobCount = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.id = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.id = o.longs === String ? "0" : 0;
                    d.jobCount = 0;
                    d.name = "";
                }
                if (m.entity != null && m.hasOwnProperty("entity")) {
                    if (typeof m.entity === "number")
                        d.entity = o.longs === String ? String(m.entity) : m.entity;
                    else
                        d.entity = o.longs === String ? $util.Long.prototype.toString.call(m.entity) : o.longs === Number ? new $util.LongBits(m.entity.low >>> 0, m.entity.high >>> 0).toNumber(true) : m.entity;
                }
                if (m.fence != null && m.hasOwnProperty("fence")) {
                    if (typeof m.fence === "number")
                        d.fence = o.longs === String ? String(m.fence) : m.fence;
                    else
                        d.fence = o.longs === String ? $util.Long.prototype.toString.call(m.fence) : o.longs === Number ? new $util.LongBits(m.fence.low >>> 0, m.fence.high >>> 0).toNumber(true) : m.fence;
                }
                if (m.hwJobCount != null && m.hasOwnProperty("hwJobCount")) {
                    d.hwJobCount = m.hwJobCount;
                }
                if (m.id != null && m.hasOwnProperty("id")) {
                    if (typeof m.id === "number")
                        d.id = o.longs === String ? String(m.id) : m.id;
                    else
                        d.id = o.longs === String ? $util.Long.prototype.toString.call(m.id) : o.longs === Number ? new $util.LongBits(m.id.low >>> 0, m.id.high >>> 0).toNumber(true) : m.id;
                }
                if (m.jobCount != null && m.hasOwnProperty("jobCount")) {
                    d.jobCount = m.jobCount;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                return d;
            };

            /**
             * Converts this DrmRunJobFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DrmRunJobFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DrmRunJobFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DrmRunJobFtraceEvent;
        })();

        protos.DrmSchedProcessJobFtraceEvent = (function() {

            /**
             * Properties of a DrmSchedProcessJobFtraceEvent.
             * @memberof perfetto.protos
             * @interface IDrmSchedProcessJobFtraceEvent
             * @property {number|null} [fence] DrmSchedProcessJobFtraceEvent fence
             */

            /**
             * Constructs a new DrmSchedProcessJobFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a DrmSchedProcessJobFtraceEvent.
             * @implements IDrmSchedProcessJobFtraceEvent
             * @constructor
             * @param {perfetto.protos.IDrmSchedProcessJobFtraceEvent=} [p] Properties to set
             */
            function DrmSchedProcessJobFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DrmSchedProcessJobFtraceEvent fence.
             * @member {number} fence
             * @memberof perfetto.protos.DrmSchedProcessJobFtraceEvent
             * @instance
             */
            DrmSchedProcessJobFtraceEvent.prototype.fence = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new DrmSchedProcessJobFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DrmSchedProcessJobFtraceEvent
             * @static
             * @param {perfetto.protos.IDrmSchedProcessJobFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.DrmSchedProcessJobFtraceEvent} DrmSchedProcessJobFtraceEvent instance
             */
            DrmSchedProcessJobFtraceEvent.create = function create(properties) {
                return new DrmSchedProcessJobFtraceEvent(properties);
            };

            /**
             * Encodes the specified DrmSchedProcessJobFtraceEvent message. Does not implicitly {@link perfetto.protos.DrmSchedProcessJobFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DrmSchedProcessJobFtraceEvent
             * @static
             * @param {perfetto.protos.IDrmSchedProcessJobFtraceEvent} m DrmSchedProcessJobFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DrmSchedProcessJobFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.fence != null && Object.hasOwnProperty.call(m, "fence"))
                    w.uint32(8).uint64(m.fence);
                return w;
            };

            /**
             * Encodes the specified DrmSchedProcessJobFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.DrmSchedProcessJobFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DrmSchedProcessJobFtraceEvent
             * @static
             * @param {perfetto.protos.IDrmSchedProcessJobFtraceEvent} message DrmSchedProcessJobFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DrmSchedProcessJobFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DrmSchedProcessJobFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DrmSchedProcessJobFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DrmSchedProcessJobFtraceEvent} DrmSchedProcessJobFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DrmSchedProcessJobFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DrmSchedProcessJobFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.fence = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DrmSchedProcessJobFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DrmSchedProcessJobFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DrmSchedProcessJobFtraceEvent} DrmSchedProcessJobFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DrmSchedProcessJobFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DrmSchedProcessJobFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.DrmSchedProcessJobFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DrmSchedProcessJobFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.fence != null && m.hasOwnProperty("fence")) {
                    if (!$util.isInteger(m.fence) && !(m.fence && $util.isInteger(m.fence.low) && $util.isInteger(m.fence.high)))
                        return "fence: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a DrmSchedProcessJobFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DrmSchedProcessJobFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DrmSchedProcessJobFtraceEvent} DrmSchedProcessJobFtraceEvent
             */
            DrmSchedProcessJobFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DrmSchedProcessJobFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.DrmSchedProcessJobFtraceEvent();
                if (d.fence != null) {
                    if ($util.Long)
                        (m.fence = $util.Long.fromValue(d.fence)).unsigned = true;
                    else if (typeof d.fence === "string")
                        m.fence = parseInt(d.fence, 10);
                    else if (typeof d.fence === "number")
                        m.fence = d.fence;
                    else if (typeof d.fence === "object")
                        m.fence = new $util.LongBits(d.fence.low >>> 0, d.fence.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a DrmSchedProcessJobFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DrmSchedProcessJobFtraceEvent
             * @static
             * @param {perfetto.protos.DrmSchedProcessJobFtraceEvent} m DrmSchedProcessJobFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DrmSchedProcessJobFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.fence = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.fence = o.longs === String ? "0" : 0;
                }
                if (m.fence != null && m.hasOwnProperty("fence")) {
                    if (typeof m.fence === "number")
                        d.fence = o.longs === String ? String(m.fence) : m.fence;
                    else
                        d.fence = o.longs === String ? $util.Long.prototype.toString.call(m.fence) : o.longs === Number ? new $util.LongBits(m.fence.low >>> 0, m.fence.high >>> 0).toNumber(true) : m.fence;
                }
                return d;
            };

            /**
             * Converts this DrmSchedProcessJobFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DrmSchedProcessJobFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DrmSchedProcessJobFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DrmSchedProcessJobFtraceEvent;
        })();

        protos.I2cReadFtraceEvent = (function() {

            /**
             * Properties of a I2cReadFtraceEvent.
             * @memberof perfetto.protos
             * @interface II2cReadFtraceEvent
             * @property {number|null} [adapterNr] I2cReadFtraceEvent adapterNr
             * @property {number|null} [msgNr] I2cReadFtraceEvent msgNr
             * @property {number|null} [addr] I2cReadFtraceEvent addr
             * @property {number|null} [flags] I2cReadFtraceEvent flags
             * @property {number|null} [len] I2cReadFtraceEvent len
             */

            /**
             * Constructs a new I2cReadFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a I2cReadFtraceEvent.
             * @implements II2cReadFtraceEvent
             * @constructor
             * @param {perfetto.protos.II2cReadFtraceEvent=} [p] Properties to set
             */
            function I2cReadFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * I2cReadFtraceEvent adapterNr.
             * @member {number} adapterNr
             * @memberof perfetto.protos.I2cReadFtraceEvent
             * @instance
             */
            I2cReadFtraceEvent.prototype.adapterNr = 0;

            /**
             * I2cReadFtraceEvent msgNr.
             * @member {number} msgNr
             * @memberof perfetto.protos.I2cReadFtraceEvent
             * @instance
             */
            I2cReadFtraceEvent.prototype.msgNr = 0;

            /**
             * I2cReadFtraceEvent addr.
             * @member {number} addr
             * @memberof perfetto.protos.I2cReadFtraceEvent
             * @instance
             */
            I2cReadFtraceEvent.prototype.addr = 0;

            /**
             * I2cReadFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.I2cReadFtraceEvent
             * @instance
             */
            I2cReadFtraceEvent.prototype.flags = 0;

            /**
             * I2cReadFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.I2cReadFtraceEvent
             * @instance
             */
            I2cReadFtraceEvent.prototype.len = 0;

            /**
             * Creates a new I2cReadFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.I2cReadFtraceEvent
             * @static
             * @param {perfetto.protos.II2cReadFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.I2cReadFtraceEvent} I2cReadFtraceEvent instance
             */
            I2cReadFtraceEvent.create = function create(properties) {
                return new I2cReadFtraceEvent(properties);
            };

            /**
             * Encodes the specified I2cReadFtraceEvent message. Does not implicitly {@link perfetto.protos.I2cReadFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.I2cReadFtraceEvent
             * @static
             * @param {perfetto.protos.II2cReadFtraceEvent} m I2cReadFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            I2cReadFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.adapterNr != null && Object.hasOwnProperty.call(m, "adapterNr"))
                    w.uint32(8).int32(m.adapterNr);
                if (m.msgNr != null && Object.hasOwnProperty.call(m, "msgNr"))
                    w.uint32(16).uint32(m.msgNr);
                if (m.addr != null && Object.hasOwnProperty.call(m, "addr"))
                    w.uint32(24).uint32(m.addr);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(32).uint32(m.flags);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(40).uint32(m.len);
                return w;
            };

            /**
             * Encodes the specified I2cReadFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.I2cReadFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.I2cReadFtraceEvent
             * @static
             * @param {perfetto.protos.II2cReadFtraceEvent} message I2cReadFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            I2cReadFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a I2cReadFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.I2cReadFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.I2cReadFtraceEvent} I2cReadFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            I2cReadFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.I2cReadFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.adapterNr = r.int32();
                        break;
                    case 2:
                        m.msgNr = r.uint32();
                        break;
                    case 3:
                        m.addr = r.uint32();
                        break;
                    case 4:
                        m.flags = r.uint32();
                        break;
                    case 5:
                        m.len = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a I2cReadFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.I2cReadFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.I2cReadFtraceEvent} I2cReadFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            I2cReadFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a I2cReadFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.I2cReadFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            I2cReadFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.adapterNr != null && m.hasOwnProperty("adapterNr")) {
                    if (!$util.isInteger(m.adapterNr))
                        return "adapterNr: integer expected";
                }
                if (m.msgNr != null && m.hasOwnProperty("msgNr")) {
                    if (!$util.isInteger(m.msgNr))
                        return "msgNr: integer expected";
                }
                if (m.addr != null && m.hasOwnProperty("addr")) {
                    if (!$util.isInteger(m.addr))
                        return "addr: integer expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                return null;
            };

            /**
             * Creates a I2cReadFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.I2cReadFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.I2cReadFtraceEvent} I2cReadFtraceEvent
             */
            I2cReadFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.I2cReadFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.I2cReadFtraceEvent();
                if (d.adapterNr != null) {
                    m.adapterNr = d.adapterNr | 0;
                }
                if (d.msgNr != null) {
                    m.msgNr = d.msgNr >>> 0;
                }
                if (d.addr != null) {
                    m.addr = d.addr >>> 0;
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a I2cReadFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.I2cReadFtraceEvent
             * @static
             * @param {perfetto.protos.I2cReadFtraceEvent} m I2cReadFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            I2cReadFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.adapterNr = 0;
                    d.msgNr = 0;
                    d.addr = 0;
                    d.flags = 0;
                    d.len = 0;
                }
                if (m.adapterNr != null && m.hasOwnProperty("adapterNr")) {
                    d.adapterNr = m.adapterNr;
                }
                if (m.msgNr != null && m.hasOwnProperty("msgNr")) {
                    d.msgNr = m.msgNr;
                }
                if (m.addr != null && m.hasOwnProperty("addr")) {
                    d.addr = m.addr;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                return d;
            };

            /**
             * Converts this I2cReadFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.I2cReadFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            I2cReadFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return I2cReadFtraceEvent;
        })();

        protos.I2cWriteFtraceEvent = (function() {

            /**
             * Properties of a I2cWriteFtraceEvent.
             * @memberof perfetto.protos
             * @interface II2cWriteFtraceEvent
             * @property {number|null} [adapterNr] I2cWriteFtraceEvent adapterNr
             * @property {number|null} [msgNr] I2cWriteFtraceEvent msgNr
             * @property {number|null} [addr] I2cWriteFtraceEvent addr
             * @property {number|null} [flags] I2cWriteFtraceEvent flags
             * @property {number|null} [len] I2cWriteFtraceEvent len
             * @property {number|null} [buf] I2cWriteFtraceEvent buf
             */

            /**
             * Constructs a new I2cWriteFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a I2cWriteFtraceEvent.
             * @implements II2cWriteFtraceEvent
             * @constructor
             * @param {perfetto.protos.II2cWriteFtraceEvent=} [p] Properties to set
             */
            function I2cWriteFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * I2cWriteFtraceEvent adapterNr.
             * @member {number} adapterNr
             * @memberof perfetto.protos.I2cWriteFtraceEvent
             * @instance
             */
            I2cWriteFtraceEvent.prototype.adapterNr = 0;

            /**
             * I2cWriteFtraceEvent msgNr.
             * @member {number} msgNr
             * @memberof perfetto.protos.I2cWriteFtraceEvent
             * @instance
             */
            I2cWriteFtraceEvent.prototype.msgNr = 0;

            /**
             * I2cWriteFtraceEvent addr.
             * @member {number} addr
             * @memberof perfetto.protos.I2cWriteFtraceEvent
             * @instance
             */
            I2cWriteFtraceEvent.prototype.addr = 0;

            /**
             * I2cWriteFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.I2cWriteFtraceEvent
             * @instance
             */
            I2cWriteFtraceEvent.prototype.flags = 0;

            /**
             * I2cWriteFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.I2cWriteFtraceEvent
             * @instance
             */
            I2cWriteFtraceEvent.prototype.len = 0;

            /**
             * I2cWriteFtraceEvent buf.
             * @member {number} buf
             * @memberof perfetto.protos.I2cWriteFtraceEvent
             * @instance
             */
            I2cWriteFtraceEvent.prototype.buf = 0;

            /**
             * Creates a new I2cWriteFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.I2cWriteFtraceEvent
             * @static
             * @param {perfetto.protos.II2cWriteFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.I2cWriteFtraceEvent} I2cWriteFtraceEvent instance
             */
            I2cWriteFtraceEvent.create = function create(properties) {
                return new I2cWriteFtraceEvent(properties);
            };

            /**
             * Encodes the specified I2cWriteFtraceEvent message. Does not implicitly {@link perfetto.protos.I2cWriteFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.I2cWriteFtraceEvent
             * @static
             * @param {perfetto.protos.II2cWriteFtraceEvent} m I2cWriteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            I2cWriteFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.adapterNr != null && Object.hasOwnProperty.call(m, "adapterNr"))
                    w.uint32(8).int32(m.adapterNr);
                if (m.msgNr != null && Object.hasOwnProperty.call(m, "msgNr"))
                    w.uint32(16).uint32(m.msgNr);
                if (m.addr != null && Object.hasOwnProperty.call(m, "addr"))
                    w.uint32(24).uint32(m.addr);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(32).uint32(m.flags);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(40).uint32(m.len);
                if (m.buf != null && Object.hasOwnProperty.call(m, "buf"))
                    w.uint32(48).uint32(m.buf);
                return w;
            };

            /**
             * Encodes the specified I2cWriteFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.I2cWriteFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.I2cWriteFtraceEvent
             * @static
             * @param {perfetto.protos.II2cWriteFtraceEvent} message I2cWriteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            I2cWriteFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a I2cWriteFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.I2cWriteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.I2cWriteFtraceEvent} I2cWriteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            I2cWriteFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.I2cWriteFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.adapterNr = r.int32();
                        break;
                    case 2:
                        m.msgNr = r.uint32();
                        break;
                    case 3:
                        m.addr = r.uint32();
                        break;
                    case 4:
                        m.flags = r.uint32();
                        break;
                    case 5:
                        m.len = r.uint32();
                        break;
                    case 6:
                        m.buf = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a I2cWriteFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.I2cWriteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.I2cWriteFtraceEvent} I2cWriteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            I2cWriteFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a I2cWriteFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.I2cWriteFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            I2cWriteFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.adapterNr != null && m.hasOwnProperty("adapterNr")) {
                    if (!$util.isInteger(m.adapterNr))
                        return "adapterNr: integer expected";
                }
                if (m.msgNr != null && m.hasOwnProperty("msgNr")) {
                    if (!$util.isInteger(m.msgNr))
                        return "msgNr: integer expected";
                }
                if (m.addr != null && m.hasOwnProperty("addr")) {
                    if (!$util.isInteger(m.addr))
                        return "addr: integer expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.buf != null && m.hasOwnProperty("buf")) {
                    if (!$util.isInteger(m.buf))
                        return "buf: integer expected";
                }
                return null;
            };

            /**
             * Creates a I2cWriteFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.I2cWriteFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.I2cWriteFtraceEvent} I2cWriteFtraceEvent
             */
            I2cWriteFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.I2cWriteFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.I2cWriteFtraceEvent();
                if (d.adapterNr != null) {
                    m.adapterNr = d.adapterNr | 0;
                }
                if (d.msgNr != null) {
                    m.msgNr = d.msgNr >>> 0;
                }
                if (d.addr != null) {
                    m.addr = d.addr >>> 0;
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.buf != null) {
                    m.buf = d.buf >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a I2cWriteFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.I2cWriteFtraceEvent
             * @static
             * @param {perfetto.protos.I2cWriteFtraceEvent} m I2cWriteFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            I2cWriteFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.adapterNr = 0;
                    d.msgNr = 0;
                    d.addr = 0;
                    d.flags = 0;
                    d.len = 0;
                    d.buf = 0;
                }
                if (m.adapterNr != null && m.hasOwnProperty("adapterNr")) {
                    d.adapterNr = m.adapterNr;
                }
                if (m.msgNr != null && m.hasOwnProperty("msgNr")) {
                    d.msgNr = m.msgNr;
                }
                if (m.addr != null && m.hasOwnProperty("addr")) {
                    d.addr = m.addr;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.buf != null && m.hasOwnProperty("buf")) {
                    d.buf = m.buf;
                }
                return d;
            };

            /**
             * Converts this I2cWriteFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.I2cWriteFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            I2cWriteFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return I2cWriteFtraceEvent;
        })();

        protos.I2cResultFtraceEvent = (function() {

            /**
             * Properties of a I2cResultFtraceEvent.
             * @memberof perfetto.protos
             * @interface II2cResultFtraceEvent
             * @property {number|null} [adapterNr] I2cResultFtraceEvent adapterNr
             * @property {number|null} [nrMsgs] I2cResultFtraceEvent nrMsgs
             * @property {number|null} [ret] I2cResultFtraceEvent ret
             */

            /**
             * Constructs a new I2cResultFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a I2cResultFtraceEvent.
             * @implements II2cResultFtraceEvent
             * @constructor
             * @param {perfetto.protos.II2cResultFtraceEvent=} [p] Properties to set
             */
            function I2cResultFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * I2cResultFtraceEvent adapterNr.
             * @member {number} adapterNr
             * @memberof perfetto.protos.I2cResultFtraceEvent
             * @instance
             */
            I2cResultFtraceEvent.prototype.adapterNr = 0;

            /**
             * I2cResultFtraceEvent nrMsgs.
             * @member {number} nrMsgs
             * @memberof perfetto.protos.I2cResultFtraceEvent
             * @instance
             */
            I2cResultFtraceEvent.prototype.nrMsgs = 0;

            /**
             * I2cResultFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.I2cResultFtraceEvent
             * @instance
             */
            I2cResultFtraceEvent.prototype.ret = 0;

            /**
             * Creates a new I2cResultFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.I2cResultFtraceEvent
             * @static
             * @param {perfetto.protos.II2cResultFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.I2cResultFtraceEvent} I2cResultFtraceEvent instance
             */
            I2cResultFtraceEvent.create = function create(properties) {
                return new I2cResultFtraceEvent(properties);
            };

            /**
             * Encodes the specified I2cResultFtraceEvent message. Does not implicitly {@link perfetto.protos.I2cResultFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.I2cResultFtraceEvent
             * @static
             * @param {perfetto.protos.II2cResultFtraceEvent} m I2cResultFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            I2cResultFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.adapterNr != null && Object.hasOwnProperty.call(m, "adapterNr"))
                    w.uint32(8).int32(m.adapterNr);
                if (m.nrMsgs != null && Object.hasOwnProperty.call(m, "nrMsgs"))
                    w.uint32(16).uint32(m.nrMsgs);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(24).int32(m.ret);
                return w;
            };

            /**
             * Encodes the specified I2cResultFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.I2cResultFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.I2cResultFtraceEvent
             * @static
             * @param {perfetto.protos.II2cResultFtraceEvent} message I2cResultFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            I2cResultFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a I2cResultFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.I2cResultFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.I2cResultFtraceEvent} I2cResultFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            I2cResultFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.I2cResultFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.adapterNr = r.int32();
                        break;
                    case 2:
                        m.nrMsgs = r.uint32();
                        break;
                    case 3:
                        m.ret = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a I2cResultFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.I2cResultFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.I2cResultFtraceEvent} I2cResultFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            I2cResultFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a I2cResultFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.I2cResultFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            I2cResultFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.adapterNr != null && m.hasOwnProperty("adapterNr")) {
                    if (!$util.isInteger(m.adapterNr))
                        return "adapterNr: integer expected";
                }
                if (m.nrMsgs != null && m.hasOwnProperty("nrMsgs")) {
                    if (!$util.isInteger(m.nrMsgs))
                        return "nrMsgs: integer expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                return null;
            };

            /**
             * Creates a I2cResultFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.I2cResultFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.I2cResultFtraceEvent} I2cResultFtraceEvent
             */
            I2cResultFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.I2cResultFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.I2cResultFtraceEvent();
                if (d.adapterNr != null) {
                    m.adapterNr = d.adapterNr | 0;
                }
                if (d.nrMsgs != null) {
                    m.nrMsgs = d.nrMsgs >>> 0;
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a I2cResultFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.I2cResultFtraceEvent
             * @static
             * @param {perfetto.protos.I2cResultFtraceEvent} m I2cResultFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            I2cResultFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.adapterNr = 0;
                    d.nrMsgs = 0;
                    d.ret = 0;
                }
                if (m.adapterNr != null && m.hasOwnProperty("adapterNr")) {
                    d.adapterNr = m.adapterNr;
                }
                if (m.nrMsgs != null && m.hasOwnProperty("nrMsgs")) {
                    d.nrMsgs = m.nrMsgs;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                return d;
            };

            /**
             * Converts this I2cResultFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.I2cResultFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            I2cResultFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return I2cResultFtraceEvent;
        })();

        protos.I2cReplyFtraceEvent = (function() {

            /**
             * Properties of a I2cReplyFtraceEvent.
             * @memberof perfetto.protos
             * @interface II2cReplyFtraceEvent
             * @property {number|null} [adapterNr] I2cReplyFtraceEvent adapterNr
             * @property {number|null} [msgNr] I2cReplyFtraceEvent msgNr
             * @property {number|null} [addr] I2cReplyFtraceEvent addr
             * @property {number|null} [flags] I2cReplyFtraceEvent flags
             * @property {number|null} [len] I2cReplyFtraceEvent len
             * @property {number|null} [buf] I2cReplyFtraceEvent buf
             */

            /**
             * Constructs a new I2cReplyFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a I2cReplyFtraceEvent.
             * @implements II2cReplyFtraceEvent
             * @constructor
             * @param {perfetto.protos.II2cReplyFtraceEvent=} [p] Properties to set
             */
            function I2cReplyFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * I2cReplyFtraceEvent adapterNr.
             * @member {number} adapterNr
             * @memberof perfetto.protos.I2cReplyFtraceEvent
             * @instance
             */
            I2cReplyFtraceEvent.prototype.adapterNr = 0;

            /**
             * I2cReplyFtraceEvent msgNr.
             * @member {number} msgNr
             * @memberof perfetto.protos.I2cReplyFtraceEvent
             * @instance
             */
            I2cReplyFtraceEvent.prototype.msgNr = 0;

            /**
             * I2cReplyFtraceEvent addr.
             * @member {number} addr
             * @memberof perfetto.protos.I2cReplyFtraceEvent
             * @instance
             */
            I2cReplyFtraceEvent.prototype.addr = 0;

            /**
             * I2cReplyFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.I2cReplyFtraceEvent
             * @instance
             */
            I2cReplyFtraceEvent.prototype.flags = 0;

            /**
             * I2cReplyFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.I2cReplyFtraceEvent
             * @instance
             */
            I2cReplyFtraceEvent.prototype.len = 0;

            /**
             * I2cReplyFtraceEvent buf.
             * @member {number} buf
             * @memberof perfetto.protos.I2cReplyFtraceEvent
             * @instance
             */
            I2cReplyFtraceEvent.prototype.buf = 0;

            /**
             * Creates a new I2cReplyFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.I2cReplyFtraceEvent
             * @static
             * @param {perfetto.protos.II2cReplyFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.I2cReplyFtraceEvent} I2cReplyFtraceEvent instance
             */
            I2cReplyFtraceEvent.create = function create(properties) {
                return new I2cReplyFtraceEvent(properties);
            };

            /**
             * Encodes the specified I2cReplyFtraceEvent message. Does not implicitly {@link perfetto.protos.I2cReplyFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.I2cReplyFtraceEvent
             * @static
             * @param {perfetto.protos.II2cReplyFtraceEvent} m I2cReplyFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            I2cReplyFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.adapterNr != null && Object.hasOwnProperty.call(m, "adapterNr"))
                    w.uint32(8).int32(m.adapterNr);
                if (m.msgNr != null && Object.hasOwnProperty.call(m, "msgNr"))
                    w.uint32(16).uint32(m.msgNr);
                if (m.addr != null && Object.hasOwnProperty.call(m, "addr"))
                    w.uint32(24).uint32(m.addr);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(32).uint32(m.flags);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(40).uint32(m.len);
                if (m.buf != null && Object.hasOwnProperty.call(m, "buf"))
                    w.uint32(48).uint32(m.buf);
                return w;
            };

            /**
             * Encodes the specified I2cReplyFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.I2cReplyFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.I2cReplyFtraceEvent
             * @static
             * @param {perfetto.protos.II2cReplyFtraceEvent} message I2cReplyFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            I2cReplyFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a I2cReplyFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.I2cReplyFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.I2cReplyFtraceEvent} I2cReplyFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            I2cReplyFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.I2cReplyFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.adapterNr = r.int32();
                        break;
                    case 2:
                        m.msgNr = r.uint32();
                        break;
                    case 3:
                        m.addr = r.uint32();
                        break;
                    case 4:
                        m.flags = r.uint32();
                        break;
                    case 5:
                        m.len = r.uint32();
                        break;
                    case 6:
                        m.buf = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a I2cReplyFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.I2cReplyFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.I2cReplyFtraceEvent} I2cReplyFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            I2cReplyFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a I2cReplyFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.I2cReplyFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            I2cReplyFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.adapterNr != null && m.hasOwnProperty("adapterNr")) {
                    if (!$util.isInteger(m.adapterNr))
                        return "adapterNr: integer expected";
                }
                if (m.msgNr != null && m.hasOwnProperty("msgNr")) {
                    if (!$util.isInteger(m.msgNr))
                        return "msgNr: integer expected";
                }
                if (m.addr != null && m.hasOwnProperty("addr")) {
                    if (!$util.isInteger(m.addr))
                        return "addr: integer expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.buf != null && m.hasOwnProperty("buf")) {
                    if (!$util.isInteger(m.buf))
                        return "buf: integer expected";
                }
                return null;
            };

            /**
             * Creates a I2cReplyFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.I2cReplyFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.I2cReplyFtraceEvent} I2cReplyFtraceEvent
             */
            I2cReplyFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.I2cReplyFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.I2cReplyFtraceEvent();
                if (d.adapterNr != null) {
                    m.adapterNr = d.adapterNr | 0;
                }
                if (d.msgNr != null) {
                    m.msgNr = d.msgNr >>> 0;
                }
                if (d.addr != null) {
                    m.addr = d.addr >>> 0;
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.buf != null) {
                    m.buf = d.buf >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a I2cReplyFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.I2cReplyFtraceEvent
             * @static
             * @param {perfetto.protos.I2cReplyFtraceEvent} m I2cReplyFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            I2cReplyFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.adapterNr = 0;
                    d.msgNr = 0;
                    d.addr = 0;
                    d.flags = 0;
                    d.len = 0;
                    d.buf = 0;
                }
                if (m.adapterNr != null && m.hasOwnProperty("adapterNr")) {
                    d.adapterNr = m.adapterNr;
                }
                if (m.msgNr != null && m.hasOwnProperty("msgNr")) {
                    d.msgNr = m.msgNr;
                }
                if (m.addr != null && m.hasOwnProperty("addr")) {
                    d.addr = m.addr;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.buf != null && m.hasOwnProperty("buf")) {
                    d.buf = m.buf;
                }
                return d;
            };

            /**
             * Converts this I2cReplyFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.I2cReplyFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            I2cReplyFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return I2cReplyFtraceEvent;
        })();

        protos.SmbusReadFtraceEvent = (function() {

            /**
             * Properties of a SmbusReadFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISmbusReadFtraceEvent
             * @property {number|null} [adapterNr] SmbusReadFtraceEvent adapterNr
             * @property {number|null} [flags] SmbusReadFtraceEvent flags
             * @property {number|null} [addr] SmbusReadFtraceEvent addr
             * @property {number|null} [command] SmbusReadFtraceEvent command
             * @property {number|null} [protocol] SmbusReadFtraceEvent protocol
             */

            /**
             * Constructs a new SmbusReadFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SmbusReadFtraceEvent.
             * @implements ISmbusReadFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISmbusReadFtraceEvent=} [p] Properties to set
             */
            function SmbusReadFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SmbusReadFtraceEvent adapterNr.
             * @member {number} adapterNr
             * @memberof perfetto.protos.SmbusReadFtraceEvent
             * @instance
             */
            SmbusReadFtraceEvent.prototype.adapterNr = 0;

            /**
             * SmbusReadFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.SmbusReadFtraceEvent
             * @instance
             */
            SmbusReadFtraceEvent.prototype.flags = 0;

            /**
             * SmbusReadFtraceEvent addr.
             * @member {number} addr
             * @memberof perfetto.protos.SmbusReadFtraceEvent
             * @instance
             */
            SmbusReadFtraceEvent.prototype.addr = 0;

            /**
             * SmbusReadFtraceEvent command.
             * @member {number} command
             * @memberof perfetto.protos.SmbusReadFtraceEvent
             * @instance
             */
            SmbusReadFtraceEvent.prototype.command = 0;

            /**
             * SmbusReadFtraceEvent protocol.
             * @member {number} protocol
             * @memberof perfetto.protos.SmbusReadFtraceEvent
             * @instance
             */
            SmbusReadFtraceEvent.prototype.protocol = 0;

            /**
             * Creates a new SmbusReadFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SmbusReadFtraceEvent
             * @static
             * @param {perfetto.protos.ISmbusReadFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SmbusReadFtraceEvent} SmbusReadFtraceEvent instance
             */
            SmbusReadFtraceEvent.create = function create(properties) {
                return new SmbusReadFtraceEvent(properties);
            };

            /**
             * Encodes the specified SmbusReadFtraceEvent message. Does not implicitly {@link perfetto.protos.SmbusReadFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SmbusReadFtraceEvent
             * @static
             * @param {perfetto.protos.ISmbusReadFtraceEvent} m SmbusReadFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SmbusReadFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.adapterNr != null && Object.hasOwnProperty.call(m, "adapterNr"))
                    w.uint32(8).int32(m.adapterNr);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(16).uint32(m.flags);
                if (m.addr != null && Object.hasOwnProperty.call(m, "addr"))
                    w.uint32(24).uint32(m.addr);
                if (m.command != null && Object.hasOwnProperty.call(m, "command"))
                    w.uint32(32).uint32(m.command);
                if (m.protocol != null && Object.hasOwnProperty.call(m, "protocol"))
                    w.uint32(40).uint32(m.protocol);
                return w;
            };

            /**
             * Encodes the specified SmbusReadFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SmbusReadFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SmbusReadFtraceEvent
             * @static
             * @param {perfetto.protos.ISmbusReadFtraceEvent} message SmbusReadFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SmbusReadFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SmbusReadFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SmbusReadFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SmbusReadFtraceEvent} SmbusReadFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SmbusReadFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SmbusReadFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.adapterNr = r.int32();
                        break;
                    case 2:
                        m.flags = r.uint32();
                        break;
                    case 3:
                        m.addr = r.uint32();
                        break;
                    case 4:
                        m.command = r.uint32();
                        break;
                    case 5:
                        m.protocol = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SmbusReadFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SmbusReadFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SmbusReadFtraceEvent} SmbusReadFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SmbusReadFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SmbusReadFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SmbusReadFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SmbusReadFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.adapterNr != null && m.hasOwnProperty("adapterNr")) {
                    if (!$util.isInteger(m.adapterNr))
                        return "adapterNr: integer expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.addr != null && m.hasOwnProperty("addr")) {
                    if (!$util.isInteger(m.addr))
                        return "addr: integer expected";
                }
                if (m.command != null && m.hasOwnProperty("command")) {
                    if (!$util.isInteger(m.command))
                        return "command: integer expected";
                }
                if (m.protocol != null && m.hasOwnProperty("protocol")) {
                    if (!$util.isInteger(m.protocol))
                        return "protocol: integer expected";
                }
                return null;
            };

            /**
             * Creates a SmbusReadFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SmbusReadFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SmbusReadFtraceEvent} SmbusReadFtraceEvent
             */
            SmbusReadFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SmbusReadFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SmbusReadFtraceEvent();
                if (d.adapterNr != null) {
                    m.adapterNr = d.adapterNr | 0;
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                if (d.addr != null) {
                    m.addr = d.addr >>> 0;
                }
                if (d.command != null) {
                    m.command = d.command >>> 0;
                }
                if (d.protocol != null) {
                    m.protocol = d.protocol >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SmbusReadFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SmbusReadFtraceEvent
             * @static
             * @param {perfetto.protos.SmbusReadFtraceEvent} m SmbusReadFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SmbusReadFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.adapterNr = 0;
                    d.flags = 0;
                    d.addr = 0;
                    d.command = 0;
                    d.protocol = 0;
                }
                if (m.adapterNr != null && m.hasOwnProperty("adapterNr")) {
                    d.adapterNr = m.adapterNr;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.addr != null && m.hasOwnProperty("addr")) {
                    d.addr = m.addr;
                }
                if (m.command != null && m.hasOwnProperty("command")) {
                    d.command = m.command;
                }
                if (m.protocol != null && m.hasOwnProperty("protocol")) {
                    d.protocol = m.protocol;
                }
                return d;
            };

            /**
             * Converts this SmbusReadFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SmbusReadFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SmbusReadFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SmbusReadFtraceEvent;
        })();

        protos.SmbusWriteFtraceEvent = (function() {

            /**
             * Properties of a SmbusWriteFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISmbusWriteFtraceEvent
             * @property {number|null} [adapterNr] SmbusWriteFtraceEvent adapterNr
             * @property {number|null} [addr] SmbusWriteFtraceEvent addr
             * @property {number|null} [flags] SmbusWriteFtraceEvent flags
             * @property {number|null} [command] SmbusWriteFtraceEvent command
             * @property {number|null} [len] SmbusWriteFtraceEvent len
             * @property {number|null} [protocol] SmbusWriteFtraceEvent protocol
             */

            /**
             * Constructs a new SmbusWriteFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SmbusWriteFtraceEvent.
             * @implements ISmbusWriteFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISmbusWriteFtraceEvent=} [p] Properties to set
             */
            function SmbusWriteFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SmbusWriteFtraceEvent adapterNr.
             * @member {number} adapterNr
             * @memberof perfetto.protos.SmbusWriteFtraceEvent
             * @instance
             */
            SmbusWriteFtraceEvent.prototype.adapterNr = 0;

            /**
             * SmbusWriteFtraceEvent addr.
             * @member {number} addr
             * @memberof perfetto.protos.SmbusWriteFtraceEvent
             * @instance
             */
            SmbusWriteFtraceEvent.prototype.addr = 0;

            /**
             * SmbusWriteFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.SmbusWriteFtraceEvent
             * @instance
             */
            SmbusWriteFtraceEvent.prototype.flags = 0;

            /**
             * SmbusWriteFtraceEvent command.
             * @member {number} command
             * @memberof perfetto.protos.SmbusWriteFtraceEvent
             * @instance
             */
            SmbusWriteFtraceEvent.prototype.command = 0;

            /**
             * SmbusWriteFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.SmbusWriteFtraceEvent
             * @instance
             */
            SmbusWriteFtraceEvent.prototype.len = 0;

            /**
             * SmbusWriteFtraceEvent protocol.
             * @member {number} protocol
             * @memberof perfetto.protos.SmbusWriteFtraceEvent
             * @instance
             */
            SmbusWriteFtraceEvent.prototype.protocol = 0;

            /**
             * Creates a new SmbusWriteFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SmbusWriteFtraceEvent
             * @static
             * @param {perfetto.protos.ISmbusWriteFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SmbusWriteFtraceEvent} SmbusWriteFtraceEvent instance
             */
            SmbusWriteFtraceEvent.create = function create(properties) {
                return new SmbusWriteFtraceEvent(properties);
            };

            /**
             * Encodes the specified SmbusWriteFtraceEvent message. Does not implicitly {@link perfetto.protos.SmbusWriteFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SmbusWriteFtraceEvent
             * @static
             * @param {perfetto.protos.ISmbusWriteFtraceEvent} m SmbusWriteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SmbusWriteFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.adapterNr != null && Object.hasOwnProperty.call(m, "adapterNr"))
                    w.uint32(8).int32(m.adapterNr);
                if (m.addr != null && Object.hasOwnProperty.call(m, "addr"))
                    w.uint32(16).uint32(m.addr);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(24).uint32(m.flags);
                if (m.command != null && Object.hasOwnProperty.call(m, "command"))
                    w.uint32(32).uint32(m.command);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(40).uint32(m.len);
                if (m.protocol != null && Object.hasOwnProperty.call(m, "protocol"))
                    w.uint32(48).uint32(m.protocol);
                return w;
            };

            /**
             * Encodes the specified SmbusWriteFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SmbusWriteFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SmbusWriteFtraceEvent
             * @static
             * @param {perfetto.protos.ISmbusWriteFtraceEvent} message SmbusWriteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SmbusWriteFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SmbusWriteFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SmbusWriteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SmbusWriteFtraceEvent} SmbusWriteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SmbusWriteFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SmbusWriteFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.adapterNr = r.int32();
                        break;
                    case 2:
                        m.addr = r.uint32();
                        break;
                    case 3:
                        m.flags = r.uint32();
                        break;
                    case 4:
                        m.command = r.uint32();
                        break;
                    case 5:
                        m.len = r.uint32();
                        break;
                    case 6:
                        m.protocol = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SmbusWriteFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SmbusWriteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SmbusWriteFtraceEvent} SmbusWriteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SmbusWriteFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SmbusWriteFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SmbusWriteFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SmbusWriteFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.adapterNr != null && m.hasOwnProperty("adapterNr")) {
                    if (!$util.isInteger(m.adapterNr))
                        return "adapterNr: integer expected";
                }
                if (m.addr != null && m.hasOwnProperty("addr")) {
                    if (!$util.isInteger(m.addr))
                        return "addr: integer expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.command != null && m.hasOwnProperty("command")) {
                    if (!$util.isInteger(m.command))
                        return "command: integer expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.protocol != null && m.hasOwnProperty("protocol")) {
                    if (!$util.isInteger(m.protocol))
                        return "protocol: integer expected";
                }
                return null;
            };

            /**
             * Creates a SmbusWriteFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SmbusWriteFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SmbusWriteFtraceEvent} SmbusWriteFtraceEvent
             */
            SmbusWriteFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SmbusWriteFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SmbusWriteFtraceEvent();
                if (d.adapterNr != null) {
                    m.adapterNr = d.adapterNr | 0;
                }
                if (d.addr != null) {
                    m.addr = d.addr >>> 0;
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                if (d.command != null) {
                    m.command = d.command >>> 0;
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.protocol != null) {
                    m.protocol = d.protocol >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SmbusWriteFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SmbusWriteFtraceEvent
             * @static
             * @param {perfetto.protos.SmbusWriteFtraceEvent} m SmbusWriteFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SmbusWriteFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.adapterNr = 0;
                    d.addr = 0;
                    d.flags = 0;
                    d.command = 0;
                    d.len = 0;
                    d.protocol = 0;
                }
                if (m.adapterNr != null && m.hasOwnProperty("adapterNr")) {
                    d.adapterNr = m.adapterNr;
                }
                if (m.addr != null && m.hasOwnProperty("addr")) {
                    d.addr = m.addr;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.command != null && m.hasOwnProperty("command")) {
                    d.command = m.command;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.protocol != null && m.hasOwnProperty("protocol")) {
                    d.protocol = m.protocol;
                }
                return d;
            };

            /**
             * Converts this SmbusWriteFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SmbusWriteFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SmbusWriteFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SmbusWriteFtraceEvent;
        })();

        protos.SmbusResultFtraceEvent = (function() {

            /**
             * Properties of a SmbusResultFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISmbusResultFtraceEvent
             * @property {number|null} [adapterNr] SmbusResultFtraceEvent adapterNr
             * @property {number|null} [addr] SmbusResultFtraceEvent addr
             * @property {number|null} [flags] SmbusResultFtraceEvent flags
             * @property {number|null} [readWrite] SmbusResultFtraceEvent readWrite
             * @property {number|null} [command] SmbusResultFtraceEvent command
             * @property {number|null} [res] SmbusResultFtraceEvent res
             * @property {number|null} [protocol] SmbusResultFtraceEvent protocol
             */

            /**
             * Constructs a new SmbusResultFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SmbusResultFtraceEvent.
             * @implements ISmbusResultFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISmbusResultFtraceEvent=} [p] Properties to set
             */
            function SmbusResultFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SmbusResultFtraceEvent adapterNr.
             * @member {number} adapterNr
             * @memberof perfetto.protos.SmbusResultFtraceEvent
             * @instance
             */
            SmbusResultFtraceEvent.prototype.adapterNr = 0;

            /**
             * SmbusResultFtraceEvent addr.
             * @member {number} addr
             * @memberof perfetto.protos.SmbusResultFtraceEvent
             * @instance
             */
            SmbusResultFtraceEvent.prototype.addr = 0;

            /**
             * SmbusResultFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.SmbusResultFtraceEvent
             * @instance
             */
            SmbusResultFtraceEvent.prototype.flags = 0;

            /**
             * SmbusResultFtraceEvent readWrite.
             * @member {number} readWrite
             * @memberof perfetto.protos.SmbusResultFtraceEvent
             * @instance
             */
            SmbusResultFtraceEvent.prototype.readWrite = 0;

            /**
             * SmbusResultFtraceEvent command.
             * @member {number} command
             * @memberof perfetto.protos.SmbusResultFtraceEvent
             * @instance
             */
            SmbusResultFtraceEvent.prototype.command = 0;

            /**
             * SmbusResultFtraceEvent res.
             * @member {number} res
             * @memberof perfetto.protos.SmbusResultFtraceEvent
             * @instance
             */
            SmbusResultFtraceEvent.prototype.res = 0;

            /**
             * SmbusResultFtraceEvent protocol.
             * @member {number} protocol
             * @memberof perfetto.protos.SmbusResultFtraceEvent
             * @instance
             */
            SmbusResultFtraceEvent.prototype.protocol = 0;

            /**
             * Creates a new SmbusResultFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SmbusResultFtraceEvent
             * @static
             * @param {perfetto.protos.ISmbusResultFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SmbusResultFtraceEvent} SmbusResultFtraceEvent instance
             */
            SmbusResultFtraceEvent.create = function create(properties) {
                return new SmbusResultFtraceEvent(properties);
            };

            /**
             * Encodes the specified SmbusResultFtraceEvent message. Does not implicitly {@link perfetto.protos.SmbusResultFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SmbusResultFtraceEvent
             * @static
             * @param {perfetto.protos.ISmbusResultFtraceEvent} m SmbusResultFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SmbusResultFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.adapterNr != null && Object.hasOwnProperty.call(m, "adapterNr"))
                    w.uint32(8).int32(m.adapterNr);
                if (m.addr != null && Object.hasOwnProperty.call(m, "addr"))
                    w.uint32(16).uint32(m.addr);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(24).uint32(m.flags);
                if (m.readWrite != null && Object.hasOwnProperty.call(m, "readWrite"))
                    w.uint32(32).uint32(m.readWrite);
                if (m.command != null && Object.hasOwnProperty.call(m, "command"))
                    w.uint32(40).uint32(m.command);
                if (m.res != null && Object.hasOwnProperty.call(m, "res"))
                    w.uint32(48).int32(m.res);
                if (m.protocol != null && Object.hasOwnProperty.call(m, "protocol"))
                    w.uint32(56).uint32(m.protocol);
                return w;
            };

            /**
             * Encodes the specified SmbusResultFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SmbusResultFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SmbusResultFtraceEvent
             * @static
             * @param {perfetto.protos.ISmbusResultFtraceEvent} message SmbusResultFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SmbusResultFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SmbusResultFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SmbusResultFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SmbusResultFtraceEvent} SmbusResultFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SmbusResultFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SmbusResultFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.adapterNr = r.int32();
                        break;
                    case 2:
                        m.addr = r.uint32();
                        break;
                    case 3:
                        m.flags = r.uint32();
                        break;
                    case 4:
                        m.readWrite = r.uint32();
                        break;
                    case 5:
                        m.command = r.uint32();
                        break;
                    case 6:
                        m.res = r.int32();
                        break;
                    case 7:
                        m.protocol = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SmbusResultFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SmbusResultFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SmbusResultFtraceEvent} SmbusResultFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SmbusResultFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SmbusResultFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SmbusResultFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SmbusResultFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.adapterNr != null && m.hasOwnProperty("adapterNr")) {
                    if (!$util.isInteger(m.adapterNr))
                        return "adapterNr: integer expected";
                }
                if (m.addr != null && m.hasOwnProperty("addr")) {
                    if (!$util.isInteger(m.addr))
                        return "addr: integer expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.readWrite != null && m.hasOwnProperty("readWrite")) {
                    if (!$util.isInteger(m.readWrite))
                        return "readWrite: integer expected";
                }
                if (m.command != null && m.hasOwnProperty("command")) {
                    if (!$util.isInteger(m.command))
                        return "command: integer expected";
                }
                if (m.res != null && m.hasOwnProperty("res")) {
                    if (!$util.isInteger(m.res))
                        return "res: integer expected";
                }
                if (m.protocol != null && m.hasOwnProperty("protocol")) {
                    if (!$util.isInteger(m.protocol))
                        return "protocol: integer expected";
                }
                return null;
            };

            /**
             * Creates a SmbusResultFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SmbusResultFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SmbusResultFtraceEvent} SmbusResultFtraceEvent
             */
            SmbusResultFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SmbusResultFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SmbusResultFtraceEvent();
                if (d.adapterNr != null) {
                    m.adapterNr = d.adapterNr | 0;
                }
                if (d.addr != null) {
                    m.addr = d.addr >>> 0;
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                if (d.readWrite != null) {
                    m.readWrite = d.readWrite >>> 0;
                }
                if (d.command != null) {
                    m.command = d.command >>> 0;
                }
                if (d.res != null) {
                    m.res = d.res | 0;
                }
                if (d.protocol != null) {
                    m.protocol = d.protocol >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SmbusResultFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SmbusResultFtraceEvent
             * @static
             * @param {perfetto.protos.SmbusResultFtraceEvent} m SmbusResultFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SmbusResultFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.adapterNr = 0;
                    d.addr = 0;
                    d.flags = 0;
                    d.readWrite = 0;
                    d.command = 0;
                    d.res = 0;
                    d.protocol = 0;
                }
                if (m.adapterNr != null && m.hasOwnProperty("adapterNr")) {
                    d.adapterNr = m.adapterNr;
                }
                if (m.addr != null && m.hasOwnProperty("addr")) {
                    d.addr = m.addr;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.readWrite != null && m.hasOwnProperty("readWrite")) {
                    d.readWrite = m.readWrite;
                }
                if (m.command != null && m.hasOwnProperty("command")) {
                    d.command = m.command;
                }
                if (m.res != null && m.hasOwnProperty("res")) {
                    d.res = m.res;
                }
                if (m.protocol != null && m.hasOwnProperty("protocol")) {
                    d.protocol = m.protocol;
                }
                return d;
            };

            /**
             * Converts this SmbusResultFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SmbusResultFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SmbusResultFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SmbusResultFtraceEvent;
        })();

        protos.SmbusReplyFtraceEvent = (function() {

            /**
             * Properties of a SmbusReplyFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISmbusReplyFtraceEvent
             * @property {number|null} [adapterNr] SmbusReplyFtraceEvent adapterNr
             * @property {number|null} [addr] SmbusReplyFtraceEvent addr
             * @property {number|null} [flags] SmbusReplyFtraceEvent flags
             * @property {number|null} [command] SmbusReplyFtraceEvent command
             * @property {number|null} [len] SmbusReplyFtraceEvent len
             * @property {number|null} [protocol] SmbusReplyFtraceEvent protocol
             */

            /**
             * Constructs a new SmbusReplyFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SmbusReplyFtraceEvent.
             * @implements ISmbusReplyFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISmbusReplyFtraceEvent=} [p] Properties to set
             */
            function SmbusReplyFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SmbusReplyFtraceEvent adapterNr.
             * @member {number} adapterNr
             * @memberof perfetto.protos.SmbusReplyFtraceEvent
             * @instance
             */
            SmbusReplyFtraceEvent.prototype.adapterNr = 0;

            /**
             * SmbusReplyFtraceEvent addr.
             * @member {number} addr
             * @memberof perfetto.protos.SmbusReplyFtraceEvent
             * @instance
             */
            SmbusReplyFtraceEvent.prototype.addr = 0;

            /**
             * SmbusReplyFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.SmbusReplyFtraceEvent
             * @instance
             */
            SmbusReplyFtraceEvent.prototype.flags = 0;

            /**
             * SmbusReplyFtraceEvent command.
             * @member {number} command
             * @memberof perfetto.protos.SmbusReplyFtraceEvent
             * @instance
             */
            SmbusReplyFtraceEvent.prototype.command = 0;

            /**
             * SmbusReplyFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.SmbusReplyFtraceEvent
             * @instance
             */
            SmbusReplyFtraceEvent.prototype.len = 0;

            /**
             * SmbusReplyFtraceEvent protocol.
             * @member {number} protocol
             * @memberof perfetto.protos.SmbusReplyFtraceEvent
             * @instance
             */
            SmbusReplyFtraceEvent.prototype.protocol = 0;

            /**
             * Creates a new SmbusReplyFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SmbusReplyFtraceEvent
             * @static
             * @param {perfetto.protos.ISmbusReplyFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SmbusReplyFtraceEvent} SmbusReplyFtraceEvent instance
             */
            SmbusReplyFtraceEvent.create = function create(properties) {
                return new SmbusReplyFtraceEvent(properties);
            };

            /**
             * Encodes the specified SmbusReplyFtraceEvent message. Does not implicitly {@link perfetto.protos.SmbusReplyFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SmbusReplyFtraceEvent
             * @static
             * @param {perfetto.protos.ISmbusReplyFtraceEvent} m SmbusReplyFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SmbusReplyFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.adapterNr != null && Object.hasOwnProperty.call(m, "adapterNr"))
                    w.uint32(8).int32(m.adapterNr);
                if (m.addr != null && Object.hasOwnProperty.call(m, "addr"))
                    w.uint32(16).uint32(m.addr);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(24).uint32(m.flags);
                if (m.command != null && Object.hasOwnProperty.call(m, "command"))
                    w.uint32(32).uint32(m.command);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(40).uint32(m.len);
                if (m.protocol != null && Object.hasOwnProperty.call(m, "protocol"))
                    w.uint32(48).uint32(m.protocol);
                return w;
            };

            /**
             * Encodes the specified SmbusReplyFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SmbusReplyFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SmbusReplyFtraceEvent
             * @static
             * @param {perfetto.protos.ISmbusReplyFtraceEvent} message SmbusReplyFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SmbusReplyFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SmbusReplyFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SmbusReplyFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SmbusReplyFtraceEvent} SmbusReplyFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SmbusReplyFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SmbusReplyFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.adapterNr = r.int32();
                        break;
                    case 2:
                        m.addr = r.uint32();
                        break;
                    case 3:
                        m.flags = r.uint32();
                        break;
                    case 4:
                        m.command = r.uint32();
                        break;
                    case 5:
                        m.len = r.uint32();
                        break;
                    case 6:
                        m.protocol = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SmbusReplyFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SmbusReplyFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SmbusReplyFtraceEvent} SmbusReplyFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SmbusReplyFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SmbusReplyFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SmbusReplyFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SmbusReplyFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.adapterNr != null && m.hasOwnProperty("adapterNr")) {
                    if (!$util.isInteger(m.adapterNr))
                        return "adapterNr: integer expected";
                }
                if (m.addr != null && m.hasOwnProperty("addr")) {
                    if (!$util.isInteger(m.addr))
                        return "addr: integer expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.command != null && m.hasOwnProperty("command")) {
                    if (!$util.isInteger(m.command))
                        return "command: integer expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.protocol != null && m.hasOwnProperty("protocol")) {
                    if (!$util.isInteger(m.protocol))
                        return "protocol: integer expected";
                }
                return null;
            };

            /**
             * Creates a SmbusReplyFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SmbusReplyFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SmbusReplyFtraceEvent} SmbusReplyFtraceEvent
             */
            SmbusReplyFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SmbusReplyFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SmbusReplyFtraceEvent();
                if (d.adapterNr != null) {
                    m.adapterNr = d.adapterNr | 0;
                }
                if (d.addr != null) {
                    m.addr = d.addr >>> 0;
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                if (d.command != null) {
                    m.command = d.command >>> 0;
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.protocol != null) {
                    m.protocol = d.protocol >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SmbusReplyFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SmbusReplyFtraceEvent
             * @static
             * @param {perfetto.protos.SmbusReplyFtraceEvent} m SmbusReplyFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SmbusReplyFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.adapterNr = 0;
                    d.addr = 0;
                    d.flags = 0;
                    d.command = 0;
                    d.len = 0;
                    d.protocol = 0;
                }
                if (m.adapterNr != null && m.hasOwnProperty("adapterNr")) {
                    d.adapterNr = m.adapterNr;
                }
                if (m.addr != null && m.hasOwnProperty("addr")) {
                    d.addr = m.addr;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.command != null && m.hasOwnProperty("command")) {
                    d.command = m.command;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.protocol != null && m.hasOwnProperty("protocol")) {
                    d.protocol = m.protocol;
                }
                return d;
            };

            /**
             * Converts this SmbusReplyFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SmbusReplyFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SmbusReplyFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SmbusReplyFtraceEvent;
        })();

        protos.IonStatFtraceEvent = (function() {

            /**
             * Properties of an IonStatFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIonStatFtraceEvent
             * @property {number|null} [bufferId] IonStatFtraceEvent bufferId
             * @property {number|null} [len] IonStatFtraceEvent len
             * @property {number|null} [totalAllocated] IonStatFtraceEvent totalAllocated
             */

            /**
             * Constructs a new IonStatFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IonStatFtraceEvent.
             * @implements IIonStatFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIonStatFtraceEvent=} [p] Properties to set
             */
            function IonStatFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IonStatFtraceEvent bufferId.
             * @member {number} bufferId
             * @memberof perfetto.protos.IonStatFtraceEvent
             * @instance
             */
            IonStatFtraceEvent.prototype.bufferId = 0;

            /**
             * IonStatFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.IonStatFtraceEvent
             * @instance
             */
            IonStatFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * IonStatFtraceEvent totalAllocated.
             * @member {number} totalAllocated
             * @memberof perfetto.protos.IonStatFtraceEvent
             * @instance
             */
            IonStatFtraceEvent.prototype.totalAllocated = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new IonStatFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IonStatFtraceEvent
             * @static
             * @param {perfetto.protos.IIonStatFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IonStatFtraceEvent} IonStatFtraceEvent instance
             */
            IonStatFtraceEvent.create = function create(properties) {
                return new IonStatFtraceEvent(properties);
            };

            /**
             * Encodes the specified IonStatFtraceEvent message. Does not implicitly {@link perfetto.protos.IonStatFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IonStatFtraceEvent
             * @static
             * @param {perfetto.protos.IIonStatFtraceEvent} m IonStatFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonStatFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.bufferId != null && Object.hasOwnProperty.call(m, "bufferId"))
                    w.uint32(8).uint32(m.bufferId);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(16).int64(m.len);
                if (m.totalAllocated != null && Object.hasOwnProperty.call(m, "totalAllocated"))
                    w.uint32(24).uint64(m.totalAllocated);
                return w;
            };

            /**
             * Encodes the specified IonStatFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IonStatFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IonStatFtraceEvent
             * @static
             * @param {perfetto.protos.IIonStatFtraceEvent} message IonStatFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonStatFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IonStatFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IonStatFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IonStatFtraceEvent} IonStatFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonStatFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IonStatFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.bufferId = r.uint32();
                        break;
                    case 2:
                        m.len = r.int64();
                        break;
                    case 3:
                        m.totalAllocated = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IonStatFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IonStatFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IonStatFtraceEvent} IonStatFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonStatFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IonStatFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IonStatFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IonStatFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.bufferId != null && m.hasOwnProperty("bufferId")) {
                    if (!$util.isInteger(m.bufferId))
                        return "bufferId: integer expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                if (m.totalAllocated != null && m.hasOwnProperty("totalAllocated")) {
                    if (!$util.isInteger(m.totalAllocated) && !(m.totalAllocated && $util.isInteger(m.totalAllocated.low) && $util.isInteger(m.totalAllocated.high)))
                        return "totalAllocated: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an IonStatFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IonStatFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IonStatFtraceEvent} IonStatFtraceEvent
             */
            IonStatFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IonStatFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IonStatFtraceEvent();
                if (d.bufferId != null) {
                    m.bufferId = d.bufferId >>> 0;
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = false;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber();
                }
                if (d.totalAllocated != null) {
                    if ($util.Long)
                        (m.totalAllocated = $util.Long.fromValue(d.totalAllocated)).unsigned = true;
                    else if (typeof d.totalAllocated === "string")
                        m.totalAllocated = parseInt(d.totalAllocated, 10);
                    else if (typeof d.totalAllocated === "number")
                        m.totalAllocated = d.totalAllocated;
                    else if (typeof d.totalAllocated === "object")
                        m.totalAllocated = new $util.LongBits(d.totalAllocated.low >>> 0, d.totalAllocated.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an IonStatFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IonStatFtraceEvent
             * @static
             * @param {perfetto.protos.IonStatFtraceEvent} m IonStatFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IonStatFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.bufferId = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.totalAllocated = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.totalAllocated = o.longs === String ? "0" : 0;
                }
                if (m.bufferId != null && m.hasOwnProperty("bufferId")) {
                    d.bufferId = m.bufferId;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber() : m.len;
                }
                if (m.totalAllocated != null && m.hasOwnProperty("totalAllocated")) {
                    if (typeof m.totalAllocated === "number")
                        d.totalAllocated = o.longs === String ? String(m.totalAllocated) : m.totalAllocated;
                    else
                        d.totalAllocated = o.longs === String ? $util.Long.prototype.toString.call(m.totalAllocated) : o.longs === Number ? new $util.LongBits(m.totalAllocated.low >>> 0, m.totalAllocated.high >>> 0).toNumber(true) : m.totalAllocated;
                }
                return d;
            };

            /**
             * Converts this IonStatFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IonStatFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IonStatFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IonStatFtraceEvent;
        })();

        protos.IpiEntryFtraceEvent = (function() {

            /**
             * Properties of an IpiEntryFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIpiEntryFtraceEvent
             * @property {string|null} [reason] IpiEntryFtraceEvent reason
             */

            /**
             * Constructs a new IpiEntryFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IpiEntryFtraceEvent.
             * @implements IIpiEntryFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIpiEntryFtraceEvent=} [p] Properties to set
             */
            function IpiEntryFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IpiEntryFtraceEvent reason.
             * @member {string} reason
             * @memberof perfetto.protos.IpiEntryFtraceEvent
             * @instance
             */
            IpiEntryFtraceEvent.prototype.reason = "";

            /**
             * Creates a new IpiEntryFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IpiEntryFtraceEvent
             * @static
             * @param {perfetto.protos.IIpiEntryFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IpiEntryFtraceEvent} IpiEntryFtraceEvent instance
             */
            IpiEntryFtraceEvent.create = function create(properties) {
                return new IpiEntryFtraceEvent(properties);
            };

            /**
             * Encodes the specified IpiEntryFtraceEvent message. Does not implicitly {@link perfetto.protos.IpiEntryFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IpiEntryFtraceEvent
             * @static
             * @param {perfetto.protos.IIpiEntryFtraceEvent} m IpiEntryFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IpiEntryFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.reason != null && Object.hasOwnProperty.call(m, "reason"))
                    w.uint32(10).string(m.reason);
                return w;
            };

            /**
             * Encodes the specified IpiEntryFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IpiEntryFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IpiEntryFtraceEvent
             * @static
             * @param {perfetto.protos.IIpiEntryFtraceEvent} message IpiEntryFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IpiEntryFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IpiEntryFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IpiEntryFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IpiEntryFtraceEvent} IpiEntryFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IpiEntryFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IpiEntryFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.reason = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IpiEntryFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IpiEntryFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IpiEntryFtraceEvent} IpiEntryFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IpiEntryFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IpiEntryFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IpiEntryFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IpiEntryFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.reason != null && m.hasOwnProperty("reason")) {
                    if (!$util.isString(m.reason))
                        return "reason: string expected";
                }
                return null;
            };

            /**
             * Creates an IpiEntryFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IpiEntryFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IpiEntryFtraceEvent} IpiEntryFtraceEvent
             */
            IpiEntryFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IpiEntryFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IpiEntryFtraceEvent();
                if (d.reason != null) {
                    m.reason = String(d.reason);
                }
                return m;
            };

            /**
             * Creates a plain object from an IpiEntryFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IpiEntryFtraceEvent
             * @static
             * @param {perfetto.protos.IpiEntryFtraceEvent} m IpiEntryFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IpiEntryFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.reason = "";
                }
                if (m.reason != null && m.hasOwnProperty("reason")) {
                    d.reason = m.reason;
                }
                return d;
            };

            /**
             * Converts this IpiEntryFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IpiEntryFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IpiEntryFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IpiEntryFtraceEvent;
        })();

        protos.IpiExitFtraceEvent = (function() {

            /**
             * Properties of an IpiExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIpiExitFtraceEvent
             * @property {string|null} [reason] IpiExitFtraceEvent reason
             */

            /**
             * Constructs a new IpiExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IpiExitFtraceEvent.
             * @implements IIpiExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIpiExitFtraceEvent=} [p] Properties to set
             */
            function IpiExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IpiExitFtraceEvent reason.
             * @member {string} reason
             * @memberof perfetto.protos.IpiExitFtraceEvent
             * @instance
             */
            IpiExitFtraceEvent.prototype.reason = "";

            /**
             * Creates a new IpiExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IpiExitFtraceEvent
             * @static
             * @param {perfetto.protos.IIpiExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IpiExitFtraceEvent} IpiExitFtraceEvent instance
             */
            IpiExitFtraceEvent.create = function create(properties) {
                return new IpiExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified IpiExitFtraceEvent message. Does not implicitly {@link perfetto.protos.IpiExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IpiExitFtraceEvent
             * @static
             * @param {perfetto.protos.IIpiExitFtraceEvent} m IpiExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IpiExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.reason != null && Object.hasOwnProperty.call(m, "reason"))
                    w.uint32(10).string(m.reason);
                return w;
            };

            /**
             * Encodes the specified IpiExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IpiExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IpiExitFtraceEvent
             * @static
             * @param {perfetto.protos.IIpiExitFtraceEvent} message IpiExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IpiExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IpiExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IpiExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IpiExitFtraceEvent} IpiExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IpiExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IpiExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.reason = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IpiExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IpiExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IpiExitFtraceEvent} IpiExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IpiExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IpiExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IpiExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IpiExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.reason != null && m.hasOwnProperty("reason")) {
                    if (!$util.isString(m.reason))
                        return "reason: string expected";
                }
                return null;
            };

            /**
             * Creates an IpiExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IpiExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IpiExitFtraceEvent} IpiExitFtraceEvent
             */
            IpiExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IpiExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IpiExitFtraceEvent();
                if (d.reason != null) {
                    m.reason = String(d.reason);
                }
                return m;
            };

            /**
             * Creates a plain object from an IpiExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IpiExitFtraceEvent
             * @static
             * @param {perfetto.protos.IpiExitFtraceEvent} m IpiExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IpiExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.reason = "";
                }
                if (m.reason != null && m.hasOwnProperty("reason")) {
                    d.reason = m.reason;
                }
                return d;
            };

            /**
             * Converts this IpiExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IpiExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IpiExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IpiExitFtraceEvent;
        })();

        protos.IpiRaiseFtraceEvent = (function() {

            /**
             * Properties of an IpiRaiseFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIpiRaiseFtraceEvent
             * @property {number|null} [targetCpus] IpiRaiseFtraceEvent targetCpus
             * @property {string|null} [reason] IpiRaiseFtraceEvent reason
             */

            /**
             * Constructs a new IpiRaiseFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IpiRaiseFtraceEvent.
             * @implements IIpiRaiseFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIpiRaiseFtraceEvent=} [p] Properties to set
             */
            function IpiRaiseFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IpiRaiseFtraceEvent targetCpus.
             * @member {number} targetCpus
             * @memberof perfetto.protos.IpiRaiseFtraceEvent
             * @instance
             */
            IpiRaiseFtraceEvent.prototype.targetCpus = 0;

            /**
             * IpiRaiseFtraceEvent reason.
             * @member {string} reason
             * @memberof perfetto.protos.IpiRaiseFtraceEvent
             * @instance
             */
            IpiRaiseFtraceEvent.prototype.reason = "";

            /**
             * Creates a new IpiRaiseFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IpiRaiseFtraceEvent
             * @static
             * @param {perfetto.protos.IIpiRaiseFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IpiRaiseFtraceEvent} IpiRaiseFtraceEvent instance
             */
            IpiRaiseFtraceEvent.create = function create(properties) {
                return new IpiRaiseFtraceEvent(properties);
            };

            /**
             * Encodes the specified IpiRaiseFtraceEvent message. Does not implicitly {@link perfetto.protos.IpiRaiseFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IpiRaiseFtraceEvent
             * @static
             * @param {perfetto.protos.IIpiRaiseFtraceEvent} m IpiRaiseFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IpiRaiseFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.targetCpus != null && Object.hasOwnProperty.call(m, "targetCpus"))
                    w.uint32(8).uint32(m.targetCpus);
                if (m.reason != null && Object.hasOwnProperty.call(m, "reason"))
                    w.uint32(18).string(m.reason);
                return w;
            };

            /**
             * Encodes the specified IpiRaiseFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IpiRaiseFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IpiRaiseFtraceEvent
             * @static
             * @param {perfetto.protos.IIpiRaiseFtraceEvent} message IpiRaiseFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IpiRaiseFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IpiRaiseFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IpiRaiseFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IpiRaiseFtraceEvent} IpiRaiseFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IpiRaiseFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IpiRaiseFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.targetCpus = r.uint32();
                        break;
                    case 2:
                        m.reason = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IpiRaiseFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IpiRaiseFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IpiRaiseFtraceEvent} IpiRaiseFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IpiRaiseFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IpiRaiseFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IpiRaiseFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IpiRaiseFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.targetCpus != null && m.hasOwnProperty("targetCpus")) {
                    if (!$util.isInteger(m.targetCpus))
                        return "targetCpus: integer expected";
                }
                if (m.reason != null && m.hasOwnProperty("reason")) {
                    if (!$util.isString(m.reason))
                        return "reason: string expected";
                }
                return null;
            };

            /**
             * Creates an IpiRaiseFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IpiRaiseFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IpiRaiseFtraceEvent} IpiRaiseFtraceEvent
             */
            IpiRaiseFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IpiRaiseFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IpiRaiseFtraceEvent();
                if (d.targetCpus != null) {
                    m.targetCpus = d.targetCpus >>> 0;
                }
                if (d.reason != null) {
                    m.reason = String(d.reason);
                }
                return m;
            };

            /**
             * Creates a plain object from an IpiRaiseFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IpiRaiseFtraceEvent
             * @static
             * @param {perfetto.protos.IpiRaiseFtraceEvent} m IpiRaiseFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IpiRaiseFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.targetCpus = 0;
                    d.reason = "";
                }
                if (m.targetCpus != null && m.hasOwnProperty("targetCpus")) {
                    d.targetCpus = m.targetCpus;
                }
                if (m.reason != null && m.hasOwnProperty("reason")) {
                    d.reason = m.reason;
                }
                return d;
            };

            /**
             * Converts this IpiRaiseFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IpiRaiseFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IpiRaiseFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IpiRaiseFtraceEvent;
        })();

        protos.SoftirqEntryFtraceEvent = (function() {

            /**
             * Properties of a SoftirqEntryFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISoftirqEntryFtraceEvent
             * @property {number|null} [vec] SoftirqEntryFtraceEvent vec
             */

            /**
             * Constructs a new SoftirqEntryFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SoftirqEntryFtraceEvent.
             * @implements ISoftirqEntryFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISoftirqEntryFtraceEvent=} [p] Properties to set
             */
            function SoftirqEntryFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SoftirqEntryFtraceEvent vec.
             * @member {number} vec
             * @memberof perfetto.protos.SoftirqEntryFtraceEvent
             * @instance
             */
            SoftirqEntryFtraceEvent.prototype.vec = 0;

            /**
             * Creates a new SoftirqEntryFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SoftirqEntryFtraceEvent
             * @static
             * @param {perfetto.protos.ISoftirqEntryFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SoftirqEntryFtraceEvent} SoftirqEntryFtraceEvent instance
             */
            SoftirqEntryFtraceEvent.create = function create(properties) {
                return new SoftirqEntryFtraceEvent(properties);
            };

            /**
             * Encodes the specified SoftirqEntryFtraceEvent message. Does not implicitly {@link perfetto.protos.SoftirqEntryFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SoftirqEntryFtraceEvent
             * @static
             * @param {perfetto.protos.ISoftirqEntryFtraceEvent} m SoftirqEntryFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SoftirqEntryFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.vec != null && Object.hasOwnProperty.call(m, "vec"))
                    w.uint32(8).uint32(m.vec);
                return w;
            };

            /**
             * Encodes the specified SoftirqEntryFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SoftirqEntryFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SoftirqEntryFtraceEvent
             * @static
             * @param {perfetto.protos.ISoftirqEntryFtraceEvent} message SoftirqEntryFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SoftirqEntryFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SoftirqEntryFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SoftirqEntryFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SoftirqEntryFtraceEvent} SoftirqEntryFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SoftirqEntryFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SoftirqEntryFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.vec = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SoftirqEntryFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SoftirqEntryFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SoftirqEntryFtraceEvent} SoftirqEntryFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SoftirqEntryFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SoftirqEntryFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SoftirqEntryFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SoftirqEntryFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.vec != null && m.hasOwnProperty("vec")) {
                    if (!$util.isInteger(m.vec))
                        return "vec: integer expected";
                }
                return null;
            };

            /**
             * Creates a SoftirqEntryFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SoftirqEntryFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SoftirqEntryFtraceEvent} SoftirqEntryFtraceEvent
             */
            SoftirqEntryFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SoftirqEntryFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SoftirqEntryFtraceEvent();
                if (d.vec != null) {
                    m.vec = d.vec >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SoftirqEntryFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SoftirqEntryFtraceEvent
             * @static
             * @param {perfetto.protos.SoftirqEntryFtraceEvent} m SoftirqEntryFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SoftirqEntryFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.vec = 0;
                }
                if (m.vec != null && m.hasOwnProperty("vec")) {
                    d.vec = m.vec;
                }
                return d;
            };

            /**
             * Converts this SoftirqEntryFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SoftirqEntryFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SoftirqEntryFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SoftirqEntryFtraceEvent;
        })();

        protos.SoftirqExitFtraceEvent = (function() {

            /**
             * Properties of a SoftirqExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISoftirqExitFtraceEvent
             * @property {number|null} [vec] SoftirqExitFtraceEvent vec
             */

            /**
             * Constructs a new SoftirqExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SoftirqExitFtraceEvent.
             * @implements ISoftirqExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISoftirqExitFtraceEvent=} [p] Properties to set
             */
            function SoftirqExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SoftirqExitFtraceEvent vec.
             * @member {number} vec
             * @memberof perfetto.protos.SoftirqExitFtraceEvent
             * @instance
             */
            SoftirqExitFtraceEvent.prototype.vec = 0;

            /**
             * Creates a new SoftirqExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SoftirqExitFtraceEvent
             * @static
             * @param {perfetto.protos.ISoftirqExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SoftirqExitFtraceEvent} SoftirqExitFtraceEvent instance
             */
            SoftirqExitFtraceEvent.create = function create(properties) {
                return new SoftirqExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified SoftirqExitFtraceEvent message. Does not implicitly {@link perfetto.protos.SoftirqExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SoftirqExitFtraceEvent
             * @static
             * @param {perfetto.protos.ISoftirqExitFtraceEvent} m SoftirqExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SoftirqExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.vec != null && Object.hasOwnProperty.call(m, "vec"))
                    w.uint32(8).uint32(m.vec);
                return w;
            };

            /**
             * Encodes the specified SoftirqExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SoftirqExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SoftirqExitFtraceEvent
             * @static
             * @param {perfetto.protos.ISoftirqExitFtraceEvent} message SoftirqExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SoftirqExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SoftirqExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SoftirqExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SoftirqExitFtraceEvent} SoftirqExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SoftirqExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SoftirqExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.vec = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SoftirqExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SoftirqExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SoftirqExitFtraceEvent} SoftirqExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SoftirqExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SoftirqExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SoftirqExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SoftirqExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.vec != null && m.hasOwnProperty("vec")) {
                    if (!$util.isInteger(m.vec))
                        return "vec: integer expected";
                }
                return null;
            };

            /**
             * Creates a SoftirqExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SoftirqExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SoftirqExitFtraceEvent} SoftirqExitFtraceEvent
             */
            SoftirqExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SoftirqExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SoftirqExitFtraceEvent();
                if (d.vec != null) {
                    m.vec = d.vec >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SoftirqExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SoftirqExitFtraceEvent
             * @static
             * @param {perfetto.protos.SoftirqExitFtraceEvent} m SoftirqExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SoftirqExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.vec = 0;
                }
                if (m.vec != null && m.hasOwnProperty("vec")) {
                    d.vec = m.vec;
                }
                return d;
            };

            /**
             * Converts this SoftirqExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SoftirqExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SoftirqExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SoftirqExitFtraceEvent;
        })();

        protos.SoftirqRaiseFtraceEvent = (function() {

            /**
             * Properties of a SoftirqRaiseFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISoftirqRaiseFtraceEvent
             * @property {number|null} [vec] SoftirqRaiseFtraceEvent vec
             */

            /**
             * Constructs a new SoftirqRaiseFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SoftirqRaiseFtraceEvent.
             * @implements ISoftirqRaiseFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISoftirqRaiseFtraceEvent=} [p] Properties to set
             */
            function SoftirqRaiseFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SoftirqRaiseFtraceEvent vec.
             * @member {number} vec
             * @memberof perfetto.protos.SoftirqRaiseFtraceEvent
             * @instance
             */
            SoftirqRaiseFtraceEvent.prototype.vec = 0;

            /**
             * Creates a new SoftirqRaiseFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SoftirqRaiseFtraceEvent
             * @static
             * @param {perfetto.protos.ISoftirqRaiseFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SoftirqRaiseFtraceEvent} SoftirqRaiseFtraceEvent instance
             */
            SoftirqRaiseFtraceEvent.create = function create(properties) {
                return new SoftirqRaiseFtraceEvent(properties);
            };

            /**
             * Encodes the specified SoftirqRaiseFtraceEvent message. Does not implicitly {@link perfetto.protos.SoftirqRaiseFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SoftirqRaiseFtraceEvent
             * @static
             * @param {perfetto.protos.ISoftirqRaiseFtraceEvent} m SoftirqRaiseFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SoftirqRaiseFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.vec != null && Object.hasOwnProperty.call(m, "vec"))
                    w.uint32(8).uint32(m.vec);
                return w;
            };

            /**
             * Encodes the specified SoftirqRaiseFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SoftirqRaiseFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SoftirqRaiseFtraceEvent
             * @static
             * @param {perfetto.protos.ISoftirqRaiseFtraceEvent} message SoftirqRaiseFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SoftirqRaiseFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SoftirqRaiseFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SoftirqRaiseFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SoftirqRaiseFtraceEvent} SoftirqRaiseFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SoftirqRaiseFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SoftirqRaiseFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.vec = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SoftirqRaiseFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SoftirqRaiseFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SoftirqRaiseFtraceEvent} SoftirqRaiseFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SoftirqRaiseFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SoftirqRaiseFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SoftirqRaiseFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SoftirqRaiseFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.vec != null && m.hasOwnProperty("vec")) {
                    if (!$util.isInteger(m.vec))
                        return "vec: integer expected";
                }
                return null;
            };

            /**
             * Creates a SoftirqRaiseFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SoftirqRaiseFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SoftirqRaiseFtraceEvent} SoftirqRaiseFtraceEvent
             */
            SoftirqRaiseFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SoftirqRaiseFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SoftirqRaiseFtraceEvent();
                if (d.vec != null) {
                    m.vec = d.vec >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SoftirqRaiseFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SoftirqRaiseFtraceEvent
             * @static
             * @param {perfetto.protos.SoftirqRaiseFtraceEvent} m SoftirqRaiseFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SoftirqRaiseFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.vec = 0;
                }
                if (m.vec != null && m.hasOwnProperty("vec")) {
                    d.vec = m.vec;
                }
                return d;
            };

            /**
             * Converts this SoftirqRaiseFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SoftirqRaiseFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SoftirqRaiseFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SoftirqRaiseFtraceEvent;
        })();

        protos.IrqHandlerEntryFtraceEvent = (function() {

            /**
             * Properties of an IrqHandlerEntryFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIrqHandlerEntryFtraceEvent
             * @property {number|null} [irq] IrqHandlerEntryFtraceEvent irq
             * @property {string|null} [name] IrqHandlerEntryFtraceEvent name
             * @property {number|null} [handler] IrqHandlerEntryFtraceEvent handler
             */

            /**
             * Constructs a new IrqHandlerEntryFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IrqHandlerEntryFtraceEvent.
             * @implements IIrqHandlerEntryFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIrqHandlerEntryFtraceEvent=} [p] Properties to set
             */
            function IrqHandlerEntryFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IrqHandlerEntryFtraceEvent irq.
             * @member {number} irq
             * @memberof perfetto.protos.IrqHandlerEntryFtraceEvent
             * @instance
             */
            IrqHandlerEntryFtraceEvent.prototype.irq = 0;

            /**
             * IrqHandlerEntryFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.IrqHandlerEntryFtraceEvent
             * @instance
             */
            IrqHandlerEntryFtraceEvent.prototype.name = "";

            /**
             * IrqHandlerEntryFtraceEvent handler.
             * @member {number} handler
             * @memberof perfetto.protos.IrqHandlerEntryFtraceEvent
             * @instance
             */
            IrqHandlerEntryFtraceEvent.prototype.handler = 0;

            /**
             * Creates a new IrqHandlerEntryFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IrqHandlerEntryFtraceEvent
             * @static
             * @param {perfetto.protos.IIrqHandlerEntryFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IrqHandlerEntryFtraceEvent} IrqHandlerEntryFtraceEvent instance
             */
            IrqHandlerEntryFtraceEvent.create = function create(properties) {
                return new IrqHandlerEntryFtraceEvent(properties);
            };

            /**
             * Encodes the specified IrqHandlerEntryFtraceEvent message. Does not implicitly {@link perfetto.protos.IrqHandlerEntryFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IrqHandlerEntryFtraceEvent
             * @static
             * @param {perfetto.protos.IIrqHandlerEntryFtraceEvent} m IrqHandlerEntryFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IrqHandlerEntryFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.irq != null && Object.hasOwnProperty.call(m, "irq"))
                    w.uint32(8).int32(m.irq);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(18).string(m.name);
                if (m.handler != null && Object.hasOwnProperty.call(m, "handler"))
                    w.uint32(24).uint32(m.handler);
                return w;
            };

            /**
             * Encodes the specified IrqHandlerEntryFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IrqHandlerEntryFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IrqHandlerEntryFtraceEvent
             * @static
             * @param {perfetto.protos.IIrqHandlerEntryFtraceEvent} message IrqHandlerEntryFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IrqHandlerEntryFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IrqHandlerEntryFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IrqHandlerEntryFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IrqHandlerEntryFtraceEvent} IrqHandlerEntryFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IrqHandlerEntryFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IrqHandlerEntryFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.irq = r.int32();
                        break;
                    case 2:
                        m.name = r.string();
                        break;
                    case 3:
                        m.handler = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IrqHandlerEntryFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IrqHandlerEntryFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IrqHandlerEntryFtraceEvent} IrqHandlerEntryFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IrqHandlerEntryFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IrqHandlerEntryFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IrqHandlerEntryFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IrqHandlerEntryFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.irq != null && m.hasOwnProperty("irq")) {
                    if (!$util.isInteger(m.irq))
                        return "irq: integer expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.handler != null && m.hasOwnProperty("handler")) {
                    if (!$util.isInteger(m.handler))
                        return "handler: integer expected";
                }
                return null;
            };

            /**
             * Creates an IrqHandlerEntryFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IrqHandlerEntryFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IrqHandlerEntryFtraceEvent} IrqHandlerEntryFtraceEvent
             */
            IrqHandlerEntryFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IrqHandlerEntryFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IrqHandlerEntryFtraceEvent();
                if (d.irq != null) {
                    m.irq = d.irq | 0;
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.handler != null) {
                    m.handler = d.handler >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an IrqHandlerEntryFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IrqHandlerEntryFtraceEvent
             * @static
             * @param {perfetto.protos.IrqHandlerEntryFtraceEvent} m IrqHandlerEntryFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IrqHandlerEntryFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.irq = 0;
                    d.name = "";
                    d.handler = 0;
                }
                if (m.irq != null && m.hasOwnProperty("irq")) {
                    d.irq = m.irq;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.handler != null && m.hasOwnProperty("handler")) {
                    d.handler = m.handler;
                }
                return d;
            };

            /**
             * Converts this IrqHandlerEntryFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IrqHandlerEntryFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IrqHandlerEntryFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IrqHandlerEntryFtraceEvent;
        })();

        protos.IrqHandlerExitFtraceEvent = (function() {

            /**
             * Properties of an IrqHandlerExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIrqHandlerExitFtraceEvent
             * @property {number|null} [irq] IrqHandlerExitFtraceEvent irq
             * @property {number|null} [ret] IrqHandlerExitFtraceEvent ret
             */

            /**
             * Constructs a new IrqHandlerExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IrqHandlerExitFtraceEvent.
             * @implements IIrqHandlerExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIrqHandlerExitFtraceEvent=} [p] Properties to set
             */
            function IrqHandlerExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IrqHandlerExitFtraceEvent irq.
             * @member {number} irq
             * @memberof perfetto.protos.IrqHandlerExitFtraceEvent
             * @instance
             */
            IrqHandlerExitFtraceEvent.prototype.irq = 0;

            /**
             * IrqHandlerExitFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.IrqHandlerExitFtraceEvent
             * @instance
             */
            IrqHandlerExitFtraceEvent.prototype.ret = 0;

            /**
             * Creates a new IrqHandlerExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IrqHandlerExitFtraceEvent
             * @static
             * @param {perfetto.protos.IIrqHandlerExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IrqHandlerExitFtraceEvent} IrqHandlerExitFtraceEvent instance
             */
            IrqHandlerExitFtraceEvent.create = function create(properties) {
                return new IrqHandlerExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified IrqHandlerExitFtraceEvent message. Does not implicitly {@link perfetto.protos.IrqHandlerExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IrqHandlerExitFtraceEvent
             * @static
             * @param {perfetto.protos.IIrqHandlerExitFtraceEvent} m IrqHandlerExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IrqHandlerExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.irq != null && Object.hasOwnProperty.call(m, "irq"))
                    w.uint32(8).int32(m.irq);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(16).int32(m.ret);
                return w;
            };

            /**
             * Encodes the specified IrqHandlerExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IrqHandlerExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IrqHandlerExitFtraceEvent
             * @static
             * @param {perfetto.protos.IIrqHandlerExitFtraceEvent} message IrqHandlerExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IrqHandlerExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IrqHandlerExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IrqHandlerExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IrqHandlerExitFtraceEvent} IrqHandlerExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IrqHandlerExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IrqHandlerExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.irq = r.int32();
                        break;
                    case 2:
                        m.ret = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IrqHandlerExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IrqHandlerExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IrqHandlerExitFtraceEvent} IrqHandlerExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IrqHandlerExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IrqHandlerExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IrqHandlerExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IrqHandlerExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.irq != null && m.hasOwnProperty("irq")) {
                    if (!$util.isInteger(m.irq))
                        return "irq: integer expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                return null;
            };

            /**
             * Creates an IrqHandlerExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IrqHandlerExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IrqHandlerExitFtraceEvent} IrqHandlerExitFtraceEvent
             */
            IrqHandlerExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IrqHandlerExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IrqHandlerExitFtraceEvent();
                if (d.irq != null) {
                    m.irq = d.irq | 0;
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an IrqHandlerExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IrqHandlerExitFtraceEvent
             * @static
             * @param {perfetto.protos.IrqHandlerExitFtraceEvent} m IrqHandlerExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IrqHandlerExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.irq = 0;
                    d.ret = 0;
                }
                if (m.irq != null && m.hasOwnProperty("irq")) {
                    d.irq = m.irq;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                return d;
            };

            /**
             * Converts this IrqHandlerExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IrqHandlerExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IrqHandlerExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IrqHandlerExitFtraceEvent;
        })();

        protos.AllocPagesIommuEndFtraceEvent = (function() {

            /**
             * Properties of an AllocPagesIommuEndFtraceEvent.
             * @memberof perfetto.protos
             * @interface IAllocPagesIommuEndFtraceEvent
             * @property {number|null} [gfpFlags] AllocPagesIommuEndFtraceEvent gfpFlags
             * @property {number|null} [order] AllocPagesIommuEndFtraceEvent order
             */

            /**
             * Constructs a new AllocPagesIommuEndFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an AllocPagesIommuEndFtraceEvent.
             * @implements IAllocPagesIommuEndFtraceEvent
             * @constructor
             * @param {perfetto.protos.IAllocPagesIommuEndFtraceEvent=} [p] Properties to set
             */
            function AllocPagesIommuEndFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AllocPagesIommuEndFtraceEvent gfpFlags.
             * @member {number} gfpFlags
             * @memberof perfetto.protos.AllocPagesIommuEndFtraceEvent
             * @instance
             */
            AllocPagesIommuEndFtraceEvent.prototype.gfpFlags = 0;

            /**
             * AllocPagesIommuEndFtraceEvent order.
             * @member {number} order
             * @memberof perfetto.protos.AllocPagesIommuEndFtraceEvent
             * @instance
             */
            AllocPagesIommuEndFtraceEvent.prototype.order = 0;

            /**
             * Creates a new AllocPagesIommuEndFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AllocPagesIommuEndFtraceEvent
             * @static
             * @param {perfetto.protos.IAllocPagesIommuEndFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.AllocPagesIommuEndFtraceEvent} AllocPagesIommuEndFtraceEvent instance
             */
            AllocPagesIommuEndFtraceEvent.create = function create(properties) {
                return new AllocPagesIommuEndFtraceEvent(properties);
            };

            /**
             * Encodes the specified AllocPagesIommuEndFtraceEvent message. Does not implicitly {@link perfetto.protos.AllocPagesIommuEndFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AllocPagesIommuEndFtraceEvent
             * @static
             * @param {perfetto.protos.IAllocPagesIommuEndFtraceEvent} m AllocPagesIommuEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AllocPagesIommuEndFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.gfpFlags != null && Object.hasOwnProperty.call(m, "gfpFlags"))
                    w.uint32(8).uint32(m.gfpFlags);
                if (m.order != null && Object.hasOwnProperty.call(m, "order"))
                    w.uint32(16).uint32(m.order);
                return w;
            };

            /**
             * Encodes the specified AllocPagesIommuEndFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.AllocPagesIommuEndFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AllocPagesIommuEndFtraceEvent
             * @static
             * @param {perfetto.protos.IAllocPagesIommuEndFtraceEvent} message AllocPagesIommuEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AllocPagesIommuEndFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AllocPagesIommuEndFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AllocPagesIommuEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AllocPagesIommuEndFtraceEvent} AllocPagesIommuEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AllocPagesIommuEndFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AllocPagesIommuEndFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.gfpFlags = r.uint32();
                        break;
                    case 2:
                        m.order = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AllocPagesIommuEndFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AllocPagesIommuEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AllocPagesIommuEndFtraceEvent} AllocPagesIommuEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AllocPagesIommuEndFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AllocPagesIommuEndFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.AllocPagesIommuEndFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AllocPagesIommuEndFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    if (!$util.isInteger(m.gfpFlags))
                        return "gfpFlags: integer expected";
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    if (!$util.isInteger(m.order))
                        return "order: integer expected";
                }
                return null;
            };

            /**
             * Creates an AllocPagesIommuEndFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AllocPagesIommuEndFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AllocPagesIommuEndFtraceEvent} AllocPagesIommuEndFtraceEvent
             */
            AllocPagesIommuEndFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AllocPagesIommuEndFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.AllocPagesIommuEndFtraceEvent();
                if (d.gfpFlags != null) {
                    m.gfpFlags = d.gfpFlags >>> 0;
                }
                if (d.order != null) {
                    m.order = d.order >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an AllocPagesIommuEndFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AllocPagesIommuEndFtraceEvent
             * @static
             * @param {perfetto.protos.AllocPagesIommuEndFtraceEvent} m AllocPagesIommuEndFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AllocPagesIommuEndFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.gfpFlags = 0;
                    d.order = 0;
                }
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    d.gfpFlags = m.gfpFlags;
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    d.order = m.order;
                }
                return d;
            };

            /**
             * Converts this AllocPagesIommuEndFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AllocPagesIommuEndFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AllocPagesIommuEndFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AllocPagesIommuEndFtraceEvent;
        })();

        protos.AllocPagesIommuFailFtraceEvent = (function() {

            /**
             * Properties of an AllocPagesIommuFailFtraceEvent.
             * @memberof perfetto.protos
             * @interface IAllocPagesIommuFailFtraceEvent
             * @property {number|null} [gfpFlags] AllocPagesIommuFailFtraceEvent gfpFlags
             * @property {number|null} [order] AllocPagesIommuFailFtraceEvent order
             */

            /**
             * Constructs a new AllocPagesIommuFailFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an AllocPagesIommuFailFtraceEvent.
             * @implements IAllocPagesIommuFailFtraceEvent
             * @constructor
             * @param {perfetto.protos.IAllocPagesIommuFailFtraceEvent=} [p] Properties to set
             */
            function AllocPagesIommuFailFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AllocPagesIommuFailFtraceEvent gfpFlags.
             * @member {number} gfpFlags
             * @memberof perfetto.protos.AllocPagesIommuFailFtraceEvent
             * @instance
             */
            AllocPagesIommuFailFtraceEvent.prototype.gfpFlags = 0;

            /**
             * AllocPagesIommuFailFtraceEvent order.
             * @member {number} order
             * @memberof perfetto.protos.AllocPagesIommuFailFtraceEvent
             * @instance
             */
            AllocPagesIommuFailFtraceEvent.prototype.order = 0;

            /**
             * Creates a new AllocPagesIommuFailFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AllocPagesIommuFailFtraceEvent
             * @static
             * @param {perfetto.protos.IAllocPagesIommuFailFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.AllocPagesIommuFailFtraceEvent} AllocPagesIommuFailFtraceEvent instance
             */
            AllocPagesIommuFailFtraceEvent.create = function create(properties) {
                return new AllocPagesIommuFailFtraceEvent(properties);
            };

            /**
             * Encodes the specified AllocPagesIommuFailFtraceEvent message. Does not implicitly {@link perfetto.protos.AllocPagesIommuFailFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AllocPagesIommuFailFtraceEvent
             * @static
             * @param {perfetto.protos.IAllocPagesIommuFailFtraceEvent} m AllocPagesIommuFailFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AllocPagesIommuFailFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.gfpFlags != null && Object.hasOwnProperty.call(m, "gfpFlags"))
                    w.uint32(8).uint32(m.gfpFlags);
                if (m.order != null && Object.hasOwnProperty.call(m, "order"))
                    w.uint32(16).uint32(m.order);
                return w;
            };

            /**
             * Encodes the specified AllocPagesIommuFailFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.AllocPagesIommuFailFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AllocPagesIommuFailFtraceEvent
             * @static
             * @param {perfetto.protos.IAllocPagesIommuFailFtraceEvent} message AllocPagesIommuFailFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AllocPagesIommuFailFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AllocPagesIommuFailFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AllocPagesIommuFailFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AllocPagesIommuFailFtraceEvent} AllocPagesIommuFailFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AllocPagesIommuFailFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AllocPagesIommuFailFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.gfpFlags = r.uint32();
                        break;
                    case 2:
                        m.order = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AllocPagesIommuFailFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AllocPagesIommuFailFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AllocPagesIommuFailFtraceEvent} AllocPagesIommuFailFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AllocPagesIommuFailFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AllocPagesIommuFailFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.AllocPagesIommuFailFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AllocPagesIommuFailFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    if (!$util.isInteger(m.gfpFlags))
                        return "gfpFlags: integer expected";
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    if (!$util.isInteger(m.order))
                        return "order: integer expected";
                }
                return null;
            };

            /**
             * Creates an AllocPagesIommuFailFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AllocPagesIommuFailFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AllocPagesIommuFailFtraceEvent} AllocPagesIommuFailFtraceEvent
             */
            AllocPagesIommuFailFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AllocPagesIommuFailFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.AllocPagesIommuFailFtraceEvent();
                if (d.gfpFlags != null) {
                    m.gfpFlags = d.gfpFlags >>> 0;
                }
                if (d.order != null) {
                    m.order = d.order >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an AllocPagesIommuFailFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AllocPagesIommuFailFtraceEvent
             * @static
             * @param {perfetto.protos.AllocPagesIommuFailFtraceEvent} m AllocPagesIommuFailFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AllocPagesIommuFailFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.gfpFlags = 0;
                    d.order = 0;
                }
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    d.gfpFlags = m.gfpFlags;
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    d.order = m.order;
                }
                return d;
            };

            /**
             * Converts this AllocPagesIommuFailFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AllocPagesIommuFailFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AllocPagesIommuFailFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AllocPagesIommuFailFtraceEvent;
        })();

        protos.AllocPagesIommuStartFtraceEvent = (function() {

            /**
             * Properties of an AllocPagesIommuStartFtraceEvent.
             * @memberof perfetto.protos
             * @interface IAllocPagesIommuStartFtraceEvent
             * @property {number|null} [gfpFlags] AllocPagesIommuStartFtraceEvent gfpFlags
             * @property {number|null} [order] AllocPagesIommuStartFtraceEvent order
             */

            /**
             * Constructs a new AllocPagesIommuStartFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an AllocPagesIommuStartFtraceEvent.
             * @implements IAllocPagesIommuStartFtraceEvent
             * @constructor
             * @param {perfetto.protos.IAllocPagesIommuStartFtraceEvent=} [p] Properties to set
             */
            function AllocPagesIommuStartFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AllocPagesIommuStartFtraceEvent gfpFlags.
             * @member {number} gfpFlags
             * @memberof perfetto.protos.AllocPagesIommuStartFtraceEvent
             * @instance
             */
            AllocPagesIommuStartFtraceEvent.prototype.gfpFlags = 0;

            /**
             * AllocPagesIommuStartFtraceEvent order.
             * @member {number} order
             * @memberof perfetto.protos.AllocPagesIommuStartFtraceEvent
             * @instance
             */
            AllocPagesIommuStartFtraceEvent.prototype.order = 0;

            /**
             * Creates a new AllocPagesIommuStartFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AllocPagesIommuStartFtraceEvent
             * @static
             * @param {perfetto.protos.IAllocPagesIommuStartFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.AllocPagesIommuStartFtraceEvent} AllocPagesIommuStartFtraceEvent instance
             */
            AllocPagesIommuStartFtraceEvent.create = function create(properties) {
                return new AllocPagesIommuStartFtraceEvent(properties);
            };

            /**
             * Encodes the specified AllocPagesIommuStartFtraceEvent message. Does not implicitly {@link perfetto.protos.AllocPagesIommuStartFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AllocPagesIommuStartFtraceEvent
             * @static
             * @param {perfetto.protos.IAllocPagesIommuStartFtraceEvent} m AllocPagesIommuStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AllocPagesIommuStartFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.gfpFlags != null && Object.hasOwnProperty.call(m, "gfpFlags"))
                    w.uint32(8).uint32(m.gfpFlags);
                if (m.order != null && Object.hasOwnProperty.call(m, "order"))
                    w.uint32(16).uint32(m.order);
                return w;
            };

            /**
             * Encodes the specified AllocPagesIommuStartFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.AllocPagesIommuStartFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AllocPagesIommuStartFtraceEvent
             * @static
             * @param {perfetto.protos.IAllocPagesIommuStartFtraceEvent} message AllocPagesIommuStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AllocPagesIommuStartFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AllocPagesIommuStartFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AllocPagesIommuStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AllocPagesIommuStartFtraceEvent} AllocPagesIommuStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AllocPagesIommuStartFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AllocPagesIommuStartFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.gfpFlags = r.uint32();
                        break;
                    case 2:
                        m.order = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AllocPagesIommuStartFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AllocPagesIommuStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AllocPagesIommuStartFtraceEvent} AllocPagesIommuStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AllocPagesIommuStartFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AllocPagesIommuStartFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.AllocPagesIommuStartFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AllocPagesIommuStartFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    if (!$util.isInteger(m.gfpFlags))
                        return "gfpFlags: integer expected";
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    if (!$util.isInteger(m.order))
                        return "order: integer expected";
                }
                return null;
            };

            /**
             * Creates an AllocPagesIommuStartFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AllocPagesIommuStartFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AllocPagesIommuStartFtraceEvent} AllocPagesIommuStartFtraceEvent
             */
            AllocPagesIommuStartFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AllocPagesIommuStartFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.AllocPagesIommuStartFtraceEvent();
                if (d.gfpFlags != null) {
                    m.gfpFlags = d.gfpFlags >>> 0;
                }
                if (d.order != null) {
                    m.order = d.order >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an AllocPagesIommuStartFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AllocPagesIommuStartFtraceEvent
             * @static
             * @param {perfetto.protos.AllocPagesIommuStartFtraceEvent} m AllocPagesIommuStartFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AllocPagesIommuStartFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.gfpFlags = 0;
                    d.order = 0;
                }
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    d.gfpFlags = m.gfpFlags;
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    d.order = m.order;
                }
                return d;
            };

            /**
             * Converts this AllocPagesIommuStartFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AllocPagesIommuStartFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AllocPagesIommuStartFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AllocPagesIommuStartFtraceEvent;
        })();

        protos.AllocPagesSysEndFtraceEvent = (function() {

            /**
             * Properties of an AllocPagesSysEndFtraceEvent.
             * @memberof perfetto.protos
             * @interface IAllocPagesSysEndFtraceEvent
             * @property {number|null} [gfpFlags] AllocPagesSysEndFtraceEvent gfpFlags
             * @property {number|null} [order] AllocPagesSysEndFtraceEvent order
             */

            /**
             * Constructs a new AllocPagesSysEndFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an AllocPagesSysEndFtraceEvent.
             * @implements IAllocPagesSysEndFtraceEvent
             * @constructor
             * @param {perfetto.protos.IAllocPagesSysEndFtraceEvent=} [p] Properties to set
             */
            function AllocPagesSysEndFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AllocPagesSysEndFtraceEvent gfpFlags.
             * @member {number} gfpFlags
             * @memberof perfetto.protos.AllocPagesSysEndFtraceEvent
             * @instance
             */
            AllocPagesSysEndFtraceEvent.prototype.gfpFlags = 0;

            /**
             * AllocPagesSysEndFtraceEvent order.
             * @member {number} order
             * @memberof perfetto.protos.AllocPagesSysEndFtraceEvent
             * @instance
             */
            AllocPagesSysEndFtraceEvent.prototype.order = 0;

            /**
             * Creates a new AllocPagesSysEndFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AllocPagesSysEndFtraceEvent
             * @static
             * @param {perfetto.protos.IAllocPagesSysEndFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.AllocPagesSysEndFtraceEvent} AllocPagesSysEndFtraceEvent instance
             */
            AllocPagesSysEndFtraceEvent.create = function create(properties) {
                return new AllocPagesSysEndFtraceEvent(properties);
            };

            /**
             * Encodes the specified AllocPagesSysEndFtraceEvent message. Does not implicitly {@link perfetto.protos.AllocPagesSysEndFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AllocPagesSysEndFtraceEvent
             * @static
             * @param {perfetto.protos.IAllocPagesSysEndFtraceEvent} m AllocPagesSysEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AllocPagesSysEndFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.gfpFlags != null && Object.hasOwnProperty.call(m, "gfpFlags"))
                    w.uint32(8).uint32(m.gfpFlags);
                if (m.order != null && Object.hasOwnProperty.call(m, "order"))
                    w.uint32(16).uint32(m.order);
                return w;
            };

            /**
             * Encodes the specified AllocPagesSysEndFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.AllocPagesSysEndFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AllocPagesSysEndFtraceEvent
             * @static
             * @param {perfetto.protos.IAllocPagesSysEndFtraceEvent} message AllocPagesSysEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AllocPagesSysEndFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AllocPagesSysEndFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AllocPagesSysEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AllocPagesSysEndFtraceEvent} AllocPagesSysEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AllocPagesSysEndFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AllocPagesSysEndFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.gfpFlags = r.uint32();
                        break;
                    case 2:
                        m.order = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AllocPagesSysEndFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AllocPagesSysEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AllocPagesSysEndFtraceEvent} AllocPagesSysEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AllocPagesSysEndFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AllocPagesSysEndFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.AllocPagesSysEndFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AllocPagesSysEndFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    if (!$util.isInteger(m.gfpFlags))
                        return "gfpFlags: integer expected";
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    if (!$util.isInteger(m.order))
                        return "order: integer expected";
                }
                return null;
            };

            /**
             * Creates an AllocPagesSysEndFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AllocPagesSysEndFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AllocPagesSysEndFtraceEvent} AllocPagesSysEndFtraceEvent
             */
            AllocPagesSysEndFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AllocPagesSysEndFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.AllocPagesSysEndFtraceEvent();
                if (d.gfpFlags != null) {
                    m.gfpFlags = d.gfpFlags >>> 0;
                }
                if (d.order != null) {
                    m.order = d.order >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an AllocPagesSysEndFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AllocPagesSysEndFtraceEvent
             * @static
             * @param {perfetto.protos.AllocPagesSysEndFtraceEvent} m AllocPagesSysEndFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AllocPagesSysEndFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.gfpFlags = 0;
                    d.order = 0;
                }
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    d.gfpFlags = m.gfpFlags;
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    d.order = m.order;
                }
                return d;
            };

            /**
             * Converts this AllocPagesSysEndFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AllocPagesSysEndFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AllocPagesSysEndFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AllocPagesSysEndFtraceEvent;
        })();

        protos.AllocPagesSysFailFtraceEvent = (function() {

            /**
             * Properties of an AllocPagesSysFailFtraceEvent.
             * @memberof perfetto.protos
             * @interface IAllocPagesSysFailFtraceEvent
             * @property {number|null} [gfpFlags] AllocPagesSysFailFtraceEvent gfpFlags
             * @property {number|null} [order] AllocPagesSysFailFtraceEvent order
             */

            /**
             * Constructs a new AllocPagesSysFailFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an AllocPagesSysFailFtraceEvent.
             * @implements IAllocPagesSysFailFtraceEvent
             * @constructor
             * @param {perfetto.protos.IAllocPagesSysFailFtraceEvent=} [p] Properties to set
             */
            function AllocPagesSysFailFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AllocPagesSysFailFtraceEvent gfpFlags.
             * @member {number} gfpFlags
             * @memberof perfetto.protos.AllocPagesSysFailFtraceEvent
             * @instance
             */
            AllocPagesSysFailFtraceEvent.prototype.gfpFlags = 0;

            /**
             * AllocPagesSysFailFtraceEvent order.
             * @member {number} order
             * @memberof perfetto.protos.AllocPagesSysFailFtraceEvent
             * @instance
             */
            AllocPagesSysFailFtraceEvent.prototype.order = 0;

            /**
             * Creates a new AllocPagesSysFailFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AllocPagesSysFailFtraceEvent
             * @static
             * @param {perfetto.protos.IAllocPagesSysFailFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.AllocPagesSysFailFtraceEvent} AllocPagesSysFailFtraceEvent instance
             */
            AllocPagesSysFailFtraceEvent.create = function create(properties) {
                return new AllocPagesSysFailFtraceEvent(properties);
            };

            /**
             * Encodes the specified AllocPagesSysFailFtraceEvent message. Does not implicitly {@link perfetto.protos.AllocPagesSysFailFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AllocPagesSysFailFtraceEvent
             * @static
             * @param {perfetto.protos.IAllocPagesSysFailFtraceEvent} m AllocPagesSysFailFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AllocPagesSysFailFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.gfpFlags != null && Object.hasOwnProperty.call(m, "gfpFlags"))
                    w.uint32(8).uint32(m.gfpFlags);
                if (m.order != null && Object.hasOwnProperty.call(m, "order"))
                    w.uint32(16).uint32(m.order);
                return w;
            };

            /**
             * Encodes the specified AllocPagesSysFailFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.AllocPagesSysFailFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AllocPagesSysFailFtraceEvent
             * @static
             * @param {perfetto.protos.IAllocPagesSysFailFtraceEvent} message AllocPagesSysFailFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AllocPagesSysFailFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AllocPagesSysFailFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AllocPagesSysFailFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AllocPagesSysFailFtraceEvent} AllocPagesSysFailFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AllocPagesSysFailFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AllocPagesSysFailFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.gfpFlags = r.uint32();
                        break;
                    case 2:
                        m.order = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AllocPagesSysFailFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AllocPagesSysFailFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AllocPagesSysFailFtraceEvent} AllocPagesSysFailFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AllocPagesSysFailFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AllocPagesSysFailFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.AllocPagesSysFailFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AllocPagesSysFailFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    if (!$util.isInteger(m.gfpFlags))
                        return "gfpFlags: integer expected";
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    if (!$util.isInteger(m.order))
                        return "order: integer expected";
                }
                return null;
            };

            /**
             * Creates an AllocPagesSysFailFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AllocPagesSysFailFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AllocPagesSysFailFtraceEvent} AllocPagesSysFailFtraceEvent
             */
            AllocPagesSysFailFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AllocPagesSysFailFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.AllocPagesSysFailFtraceEvent();
                if (d.gfpFlags != null) {
                    m.gfpFlags = d.gfpFlags >>> 0;
                }
                if (d.order != null) {
                    m.order = d.order >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an AllocPagesSysFailFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AllocPagesSysFailFtraceEvent
             * @static
             * @param {perfetto.protos.AllocPagesSysFailFtraceEvent} m AllocPagesSysFailFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AllocPagesSysFailFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.gfpFlags = 0;
                    d.order = 0;
                }
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    d.gfpFlags = m.gfpFlags;
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    d.order = m.order;
                }
                return d;
            };

            /**
             * Converts this AllocPagesSysFailFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AllocPagesSysFailFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AllocPagesSysFailFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AllocPagesSysFailFtraceEvent;
        })();

        protos.AllocPagesSysStartFtraceEvent = (function() {

            /**
             * Properties of an AllocPagesSysStartFtraceEvent.
             * @memberof perfetto.protos
             * @interface IAllocPagesSysStartFtraceEvent
             * @property {number|null} [gfpFlags] AllocPagesSysStartFtraceEvent gfpFlags
             * @property {number|null} [order] AllocPagesSysStartFtraceEvent order
             */

            /**
             * Constructs a new AllocPagesSysStartFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an AllocPagesSysStartFtraceEvent.
             * @implements IAllocPagesSysStartFtraceEvent
             * @constructor
             * @param {perfetto.protos.IAllocPagesSysStartFtraceEvent=} [p] Properties to set
             */
            function AllocPagesSysStartFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AllocPagesSysStartFtraceEvent gfpFlags.
             * @member {number} gfpFlags
             * @memberof perfetto.protos.AllocPagesSysStartFtraceEvent
             * @instance
             */
            AllocPagesSysStartFtraceEvent.prototype.gfpFlags = 0;

            /**
             * AllocPagesSysStartFtraceEvent order.
             * @member {number} order
             * @memberof perfetto.protos.AllocPagesSysStartFtraceEvent
             * @instance
             */
            AllocPagesSysStartFtraceEvent.prototype.order = 0;

            /**
             * Creates a new AllocPagesSysStartFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AllocPagesSysStartFtraceEvent
             * @static
             * @param {perfetto.protos.IAllocPagesSysStartFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.AllocPagesSysStartFtraceEvent} AllocPagesSysStartFtraceEvent instance
             */
            AllocPagesSysStartFtraceEvent.create = function create(properties) {
                return new AllocPagesSysStartFtraceEvent(properties);
            };

            /**
             * Encodes the specified AllocPagesSysStartFtraceEvent message. Does not implicitly {@link perfetto.protos.AllocPagesSysStartFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AllocPagesSysStartFtraceEvent
             * @static
             * @param {perfetto.protos.IAllocPagesSysStartFtraceEvent} m AllocPagesSysStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AllocPagesSysStartFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.gfpFlags != null && Object.hasOwnProperty.call(m, "gfpFlags"))
                    w.uint32(8).uint32(m.gfpFlags);
                if (m.order != null && Object.hasOwnProperty.call(m, "order"))
                    w.uint32(16).uint32(m.order);
                return w;
            };

            /**
             * Encodes the specified AllocPagesSysStartFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.AllocPagesSysStartFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AllocPagesSysStartFtraceEvent
             * @static
             * @param {perfetto.protos.IAllocPagesSysStartFtraceEvent} message AllocPagesSysStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AllocPagesSysStartFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AllocPagesSysStartFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AllocPagesSysStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AllocPagesSysStartFtraceEvent} AllocPagesSysStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AllocPagesSysStartFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AllocPagesSysStartFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.gfpFlags = r.uint32();
                        break;
                    case 2:
                        m.order = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AllocPagesSysStartFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AllocPagesSysStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AllocPagesSysStartFtraceEvent} AllocPagesSysStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AllocPagesSysStartFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AllocPagesSysStartFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.AllocPagesSysStartFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AllocPagesSysStartFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    if (!$util.isInteger(m.gfpFlags))
                        return "gfpFlags: integer expected";
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    if (!$util.isInteger(m.order))
                        return "order: integer expected";
                }
                return null;
            };

            /**
             * Creates an AllocPagesSysStartFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AllocPagesSysStartFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AllocPagesSysStartFtraceEvent} AllocPagesSysStartFtraceEvent
             */
            AllocPagesSysStartFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AllocPagesSysStartFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.AllocPagesSysStartFtraceEvent();
                if (d.gfpFlags != null) {
                    m.gfpFlags = d.gfpFlags >>> 0;
                }
                if (d.order != null) {
                    m.order = d.order >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an AllocPagesSysStartFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AllocPagesSysStartFtraceEvent
             * @static
             * @param {perfetto.protos.AllocPagesSysStartFtraceEvent} m AllocPagesSysStartFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AllocPagesSysStartFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.gfpFlags = 0;
                    d.order = 0;
                }
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    d.gfpFlags = m.gfpFlags;
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    d.order = m.order;
                }
                return d;
            };

            /**
             * Converts this AllocPagesSysStartFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AllocPagesSysStartFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AllocPagesSysStartFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AllocPagesSysStartFtraceEvent;
        })();

        protos.DmaAllocContiguousRetryFtraceEvent = (function() {

            /**
             * Properties of a DmaAllocContiguousRetryFtraceEvent.
             * @memberof perfetto.protos
             * @interface IDmaAllocContiguousRetryFtraceEvent
             * @property {number|null} [tries] DmaAllocContiguousRetryFtraceEvent tries
             */

            /**
             * Constructs a new DmaAllocContiguousRetryFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a DmaAllocContiguousRetryFtraceEvent.
             * @implements IDmaAllocContiguousRetryFtraceEvent
             * @constructor
             * @param {perfetto.protos.IDmaAllocContiguousRetryFtraceEvent=} [p] Properties to set
             */
            function DmaAllocContiguousRetryFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DmaAllocContiguousRetryFtraceEvent tries.
             * @member {number} tries
             * @memberof perfetto.protos.DmaAllocContiguousRetryFtraceEvent
             * @instance
             */
            DmaAllocContiguousRetryFtraceEvent.prototype.tries = 0;

            /**
             * Creates a new DmaAllocContiguousRetryFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DmaAllocContiguousRetryFtraceEvent
             * @static
             * @param {perfetto.protos.IDmaAllocContiguousRetryFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.DmaAllocContiguousRetryFtraceEvent} DmaAllocContiguousRetryFtraceEvent instance
             */
            DmaAllocContiguousRetryFtraceEvent.create = function create(properties) {
                return new DmaAllocContiguousRetryFtraceEvent(properties);
            };

            /**
             * Encodes the specified DmaAllocContiguousRetryFtraceEvent message. Does not implicitly {@link perfetto.protos.DmaAllocContiguousRetryFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DmaAllocContiguousRetryFtraceEvent
             * @static
             * @param {perfetto.protos.IDmaAllocContiguousRetryFtraceEvent} m DmaAllocContiguousRetryFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DmaAllocContiguousRetryFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.tries != null && Object.hasOwnProperty.call(m, "tries"))
                    w.uint32(8).int32(m.tries);
                return w;
            };

            /**
             * Encodes the specified DmaAllocContiguousRetryFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.DmaAllocContiguousRetryFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DmaAllocContiguousRetryFtraceEvent
             * @static
             * @param {perfetto.protos.IDmaAllocContiguousRetryFtraceEvent} message DmaAllocContiguousRetryFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DmaAllocContiguousRetryFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DmaAllocContiguousRetryFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DmaAllocContiguousRetryFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DmaAllocContiguousRetryFtraceEvent} DmaAllocContiguousRetryFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DmaAllocContiguousRetryFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DmaAllocContiguousRetryFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.tries = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DmaAllocContiguousRetryFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DmaAllocContiguousRetryFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DmaAllocContiguousRetryFtraceEvent} DmaAllocContiguousRetryFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DmaAllocContiguousRetryFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DmaAllocContiguousRetryFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.DmaAllocContiguousRetryFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DmaAllocContiguousRetryFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.tries != null && m.hasOwnProperty("tries")) {
                    if (!$util.isInteger(m.tries))
                        return "tries: integer expected";
                }
                return null;
            };

            /**
             * Creates a DmaAllocContiguousRetryFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DmaAllocContiguousRetryFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DmaAllocContiguousRetryFtraceEvent} DmaAllocContiguousRetryFtraceEvent
             */
            DmaAllocContiguousRetryFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DmaAllocContiguousRetryFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.DmaAllocContiguousRetryFtraceEvent();
                if (d.tries != null) {
                    m.tries = d.tries | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a DmaAllocContiguousRetryFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DmaAllocContiguousRetryFtraceEvent
             * @static
             * @param {perfetto.protos.DmaAllocContiguousRetryFtraceEvent} m DmaAllocContiguousRetryFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DmaAllocContiguousRetryFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.tries = 0;
                }
                if (m.tries != null && m.hasOwnProperty("tries")) {
                    d.tries = m.tries;
                }
                return d;
            };

            /**
             * Converts this DmaAllocContiguousRetryFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DmaAllocContiguousRetryFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DmaAllocContiguousRetryFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DmaAllocContiguousRetryFtraceEvent;
        })();

        protos.IommuMapRangeFtraceEvent = (function() {

            /**
             * Properties of an IommuMapRangeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIommuMapRangeFtraceEvent
             * @property {number|null} [chunkSize] IommuMapRangeFtraceEvent chunkSize
             * @property {number|null} [len] IommuMapRangeFtraceEvent len
             * @property {number|null} [pa] IommuMapRangeFtraceEvent pa
             * @property {number|null} [va] IommuMapRangeFtraceEvent va
             */

            /**
             * Constructs a new IommuMapRangeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IommuMapRangeFtraceEvent.
             * @implements IIommuMapRangeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIommuMapRangeFtraceEvent=} [p] Properties to set
             */
            function IommuMapRangeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IommuMapRangeFtraceEvent chunkSize.
             * @member {number} chunkSize
             * @memberof perfetto.protos.IommuMapRangeFtraceEvent
             * @instance
             */
            IommuMapRangeFtraceEvent.prototype.chunkSize = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IommuMapRangeFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.IommuMapRangeFtraceEvent
             * @instance
             */
            IommuMapRangeFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IommuMapRangeFtraceEvent pa.
             * @member {number} pa
             * @memberof perfetto.protos.IommuMapRangeFtraceEvent
             * @instance
             */
            IommuMapRangeFtraceEvent.prototype.pa = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IommuMapRangeFtraceEvent va.
             * @member {number} va
             * @memberof perfetto.protos.IommuMapRangeFtraceEvent
             * @instance
             */
            IommuMapRangeFtraceEvent.prototype.va = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new IommuMapRangeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IommuMapRangeFtraceEvent
             * @static
             * @param {perfetto.protos.IIommuMapRangeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IommuMapRangeFtraceEvent} IommuMapRangeFtraceEvent instance
             */
            IommuMapRangeFtraceEvent.create = function create(properties) {
                return new IommuMapRangeFtraceEvent(properties);
            };

            /**
             * Encodes the specified IommuMapRangeFtraceEvent message. Does not implicitly {@link perfetto.protos.IommuMapRangeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IommuMapRangeFtraceEvent
             * @static
             * @param {perfetto.protos.IIommuMapRangeFtraceEvent} m IommuMapRangeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IommuMapRangeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.chunkSize != null && Object.hasOwnProperty.call(m, "chunkSize"))
                    w.uint32(8).uint64(m.chunkSize);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(16).uint64(m.len);
                if (m.pa != null && Object.hasOwnProperty.call(m, "pa"))
                    w.uint32(24).uint64(m.pa);
                if (m.va != null && Object.hasOwnProperty.call(m, "va"))
                    w.uint32(32).uint64(m.va);
                return w;
            };

            /**
             * Encodes the specified IommuMapRangeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IommuMapRangeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IommuMapRangeFtraceEvent
             * @static
             * @param {perfetto.protos.IIommuMapRangeFtraceEvent} message IommuMapRangeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IommuMapRangeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IommuMapRangeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IommuMapRangeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IommuMapRangeFtraceEvent} IommuMapRangeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IommuMapRangeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IommuMapRangeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.chunkSize = r.uint64();
                        break;
                    case 2:
                        m.len = r.uint64();
                        break;
                    case 3:
                        m.pa = r.uint64();
                        break;
                    case 4:
                        m.va = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IommuMapRangeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IommuMapRangeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IommuMapRangeFtraceEvent} IommuMapRangeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IommuMapRangeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IommuMapRangeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IommuMapRangeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IommuMapRangeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.chunkSize != null && m.hasOwnProperty("chunkSize")) {
                    if (!$util.isInteger(m.chunkSize) && !(m.chunkSize && $util.isInteger(m.chunkSize.low) && $util.isInteger(m.chunkSize.high)))
                        return "chunkSize: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                if (m.pa != null && m.hasOwnProperty("pa")) {
                    if (!$util.isInteger(m.pa) && !(m.pa && $util.isInteger(m.pa.low) && $util.isInteger(m.pa.high)))
                        return "pa: integer|Long expected";
                }
                if (m.va != null && m.hasOwnProperty("va")) {
                    if (!$util.isInteger(m.va) && !(m.va && $util.isInteger(m.va.low) && $util.isInteger(m.va.high)))
                        return "va: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an IommuMapRangeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IommuMapRangeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IommuMapRangeFtraceEvent} IommuMapRangeFtraceEvent
             */
            IommuMapRangeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IommuMapRangeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IommuMapRangeFtraceEvent();
                if (d.chunkSize != null) {
                    if ($util.Long)
                        (m.chunkSize = $util.Long.fromValue(d.chunkSize)).unsigned = true;
                    else if (typeof d.chunkSize === "string")
                        m.chunkSize = parseInt(d.chunkSize, 10);
                    else if (typeof d.chunkSize === "number")
                        m.chunkSize = d.chunkSize;
                    else if (typeof d.chunkSize === "object")
                        m.chunkSize = new $util.LongBits(d.chunkSize.low >>> 0, d.chunkSize.high >>> 0).toNumber(true);
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = true;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber(true);
                }
                if (d.pa != null) {
                    if ($util.Long)
                        (m.pa = $util.Long.fromValue(d.pa)).unsigned = true;
                    else if (typeof d.pa === "string")
                        m.pa = parseInt(d.pa, 10);
                    else if (typeof d.pa === "number")
                        m.pa = d.pa;
                    else if (typeof d.pa === "object")
                        m.pa = new $util.LongBits(d.pa.low >>> 0, d.pa.high >>> 0).toNumber(true);
                }
                if (d.va != null) {
                    if ($util.Long)
                        (m.va = $util.Long.fromValue(d.va)).unsigned = true;
                    else if (typeof d.va === "string")
                        m.va = parseInt(d.va, 10);
                    else if (typeof d.va === "number")
                        m.va = d.va;
                    else if (typeof d.va === "object")
                        m.va = new $util.LongBits(d.va.low >>> 0, d.va.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an IommuMapRangeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IommuMapRangeFtraceEvent
             * @static
             * @param {perfetto.protos.IommuMapRangeFtraceEvent} m IommuMapRangeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IommuMapRangeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.chunkSize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.chunkSize = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pa = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pa = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.va = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.va = o.longs === String ? "0" : 0;
                }
                if (m.chunkSize != null && m.hasOwnProperty("chunkSize")) {
                    if (typeof m.chunkSize === "number")
                        d.chunkSize = o.longs === String ? String(m.chunkSize) : m.chunkSize;
                    else
                        d.chunkSize = o.longs === String ? $util.Long.prototype.toString.call(m.chunkSize) : o.longs === Number ? new $util.LongBits(m.chunkSize.low >>> 0, m.chunkSize.high >>> 0).toNumber(true) : m.chunkSize;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber(true) : m.len;
                }
                if (m.pa != null && m.hasOwnProperty("pa")) {
                    if (typeof m.pa === "number")
                        d.pa = o.longs === String ? String(m.pa) : m.pa;
                    else
                        d.pa = o.longs === String ? $util.Long.prototype.toString.call(m.pa) : o.longs === Number ? new $util.LongBits(m.pa.low >>> 0, m.pa.high >>> 0).toNumber(true) : m.pa;
                }
                if (m.va != null && m.hasOwnProperty("va")) {
                    if (typeof m.va === "number")
                        d.va = o.longs === String ? String(m.va) : m.va;
                    else
                        d.va = o.longs === String ? $util.Long.prototype.toString.call(m.va) : o.longs === Number ? new $util.LongBits(m.va.low >>> 0, m.va.high >>> 0).toNumber(true) : m.va;
                }
                return d;
            };

            /**
             * Converts this IommuMapRangeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IommuMapRangeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IommuMapRangeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IommuMapRangeFtraceEvent;
        })();

        protos.IommuSecPtblMapRangeEndFtraceEvent = (function() {

            /**
             * Properties of an IommuSecPtblMapRangeEndFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIommuSecPtblMapRangeEndFtraceEvent
             * @property {number|null} [len] IommuSecPtblMapRangeEndFtraceEvent len
             * @property {number|null} [num] IommuSecPtblMapRangeEndFtraceEvent num
             * @property {number|null} [pa] IommuSecPtblMapRangeEndFtraceEvent pa
             * @property {number|null} [secId] IommuSecPtblMapRangeEndFtraceEvent secId
             * @property {number|null} [va] IommuSecPtblMapRangeEndFtraceEvent va
             */

            /**
             * Constructs a new IommuSecPtblMapRangeEndFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IommuSecPtblMapRangeEndFtraceEvent.
             * @implements IIommuSecPtblMapRangeEndFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIommuSecPtblMapRangeEndFtraceEvent=} [p] Properties to set
             */
            function IommuSecPtblMapRangeEndFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IommuSecPtblMapRangeEndFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent
             * @instance
             */
            IommuSecPtblMapRangeEndFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IommuSecPtblMapRangeEndFtraceEvent num.
             * @member {number} num
             * @memberof perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent
             * @instance
             */
            IommuSecPtblMapRangeEndFtraceEvent.prototype.num = 0;

            /**
             * IommuSecPtblMapRangeEndFtraceEvent pa.
             * @member {number} pa
             * @memberof perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent
             * @instance
             */
            IommuSecPtblMapRangeEndFtraceEvent.prototype.pa = 0;

            /**
             * IommuSecPtblMapRangeEndFtraceEvent secId.
             * @member {number} secId
             * @memberof perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent
             * @instance
             */
            IommuSecPtblMapRangeEndFtraceEvent.prototype.secId = 0;

            /**
             * IommuSecPtblMapRangeEndFtraceEvent va.
             * @member {number} va
             * @memberof perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent
             * @instance
             */
            IommuSecPtblMapRangeEndFtraceEvent.prototype.va = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new IommuSecPtblMapRangeEndFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent
             * @static
             * @param {perfetto.protos.IIommuSecPtblMapRangeEndFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent} IommuSecPtblMapRangeEndFtraceEvent instance
             */
            IommuSecPtblMapRangeEndFtraceEvent.create = function create(properties) {
                return new IommuSecPtblMapRangeEndFtraceEvent(properties);
            };

            /**
             * Encodes the specified IommuSecPtblMapRangeEndFtraceEvent message. Does not implicitly {@link perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent
             * @static
             * @param {perfetto.protos.IIommuSecPtblMapRangeEndFtraceEvent} m IommuSecPtblMapRangeEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IommuSecPtblMapRangeEndFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(8).uint64(m.len);
                if (m.num != null && Object.hasOwnProperty.call(m, "num"))
                    w.uint32(16).int32(m.num);
                if (m.pa != null && Object.hasOwnProperty.call(m, "pa"))
                    w.uint32(24).uint32(m.pa);
                if (m.secId != null && Object.hasOwnProperty.call(m, "secId"))
                    w.uint32(32).int32(m.secId);
                if (m.va != null && Object.hasOwnProperty.call(m, "va"))
                    w.uint32(40).uint64(m.va);
                return w;
            };

            /**
             * Encodes the specified IommuSecPtblMapRangeEndFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent
             * @static
             * @param {perfetto.protos.IIommuSecPtblMapRangeEndFtraceEvent} message IommuSecPtblMapRangeEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IommuSecPtblMapRangeEndFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IommuSecPtblMapRangeEndFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent} IommuSecPtblMapRangeEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IommuSecPtblMapRangeEndFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.len = r.uint64();
                        break;
                    case 2:
                        m.num = r.int32();
                        break;
                    case 3:
                        m.pa = r.uint32();
                        break;
                    case 4:
                        m.secId = r.int32();
                        break;
                    case 5:
                        m.va = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IommuSecPtblMapRangeEndFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent} IommuSecPtblMapRangeEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IommuSecPtblMapRangeEndFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IommuSecPtblMapRangeEndFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IommuSecPtblMapRangeEndFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                if (m.num != null && m.hasOwnProperty("num")) {
                    if (!$util.isInteger(m.num))
                        return "num: integer expected";
                }
                if (m.pa != null && m.hasOwnProperty("pa")) {
                    if (!$util.isInteger(m.pa))
                        return "pa: integer expected";
                }
                if (m.secId != null && m.hasOwnProperty("secId")) {
                    if (!$util.isInteger(m.secId))
                        return "secId: integer expected";
                }
                if (m.va != null && m.hasOwnProperty("va")) {
                    if (!$util.isInteger(m.va) && !(m.va && $util.isInteger(m.va.low) && $util.isInteger(m.va.high)))
                        return "va: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an IommuSecPtblMapRangeEndFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent} IommuSecPtblMapRangeEndFtraceEvent
             */
            IommuSecPtblMapRangeEndFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent();
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = true;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber(true);
                }
                if (d.num != null) {
                    m.num = d.num | 0;
                }
                if (d.pa != null) {
                    m.pa = d.pa >>> 0;
                }
                if (d.secId != null) {
                    m.secId = d.secId | 0;
                }
                if (d.va != null) {
                    if ($util.Long)
                        (m.va = $util.Long.fromValue(d.va)).unsigned = true;
                    else if (typeof d.va === "string")
                        m.va = parseInt(d.va, 10);
                    else if (typeof d.va === "number")
                        m.va = d.va;
                    else if (typeof d.va === "object")
                        m.va = new $util.LongBits(d.va.low >>> 0, d.va.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an IommuSecPtblMapRangeEndFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent
             * @static
             * @param {perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent} m IommuSecPtblMapRangeEndFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IommuSecPtblMapRangeEndFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                    d.num = 0;
                    d.pa = 0;
                    d.secId = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.va = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.va = o.longs === String ? "0" : 0;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber(true) : m.len;
                }
                if (m.num != null && m.hasOwnProperty("num")) {
                    d.num = m.num;
                }
                if (m.pa != null && m.hasOwnProperty("pa")) {
                    d.pa = m.pa;
                }
                if (m.secId != null && m.hasOwnProperty("secId")) {
                    d.secId = m.secId;
                }
                if (m.va != null && m.hasOwnProperty("va")) {
                    if (typeof m.va === "number")
                        d.va = o.longs === String ? String(m.va) : m.va;
                    else
                        d.va = o.longs === String ? $util.Long.prototype.toString.call(m.va) : o.longs === Number ? new $util.LongBits(m.va.low >>> 0, m.va.high >>> 0).toNumber(true) : m.va;
                }
                return d;
            };

            /**
             * Converts this IommuSecPtblMapRangeEndFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IommuSecPtblMapRangeEndFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IommuSecPtblMapRangeEndFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IommuSecPtblMapRangeEndFtraceEvent;
        })();

        protos.IommuSecPtblMapRangeStartFtraceEvent = (function() {

            /**
             * Properties of an IommuSecPtblMapRangeStartFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIommuSecPtblMapRangeStartFtraceEvent
             * @property {number|null} [len] IommuSecPtblMapRangeStartFtraceEvent len
             * @property {number|null} [num] IommuSecPtblMapRangeStartFtraceEvent num
             * @property {number|null} [pa] IommuSecPtblMapRangeStartFtraceEvent pa
             * @property {number|null} [secId] IommuSecPtblMapRangeStartFtraceEvent secId
             * @property {number|null} [va] IommuSecPtblMapRangeStartFtraceEvent va
             */

            /**
             * Constructs a new IommuSecPtblMapRangeStartFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IommuSecPtblMapRangeStartFtraceEvent.
             * @implements IIommuSecPtblMapRangeStartFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIommuSecPtblMapRangeStartFtraceEvent=} [p] Properties to set
             */
            function IommuSecPtblMapRangeStartFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IommuSecPtblMapRangeStartFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent
             * @instance
             */
            IommuSecPtblMapRangeStartFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IommuSecPtblMapRangeStartFtraceEvent num.
             * @member {number} num
             * @memberof perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent
             * @instance
             */
            IommuSecPtblMapRangeStartFtraceEvent.prototype.num = 0;

            /**
             * IommuSecPtblMapRangeStartFtraceEvent pa.
             * @member {number} pa
             * @memberof perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent
             * @instance
             */
            IommuSecPtblMapRangeStartFtraceEvent.prototype.pa = 0;

            /**
             * IommuSecPtblMapRangeStartFtraceEvent secId.
             * @member {number} secId
             * @memberof perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent
             * @instance
             */
            IommuSecPtblMapRangeStartFtraceEvent.prototype.secId = 0;

            /**
             * IommuSecPtblMapRangeStartFtraceEvent va.
             * @member {number} va
             * @memberof perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent
             * @instance
             */
            IommuSecPtblMapRangeStartFtraceEvent.prototype.va = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new IommuSecPtblMapRangeStartFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent
             * @static
             * @param {perfetto.protos.IIommuSecPtblMapRangeStartFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent} IommuSecPtblMapRangeStartFtraceEvent instance
             */
            IommuSecPtblMapRangeStartFtraceEvent.create = function create(properties) {
                return new IommuSecPtblMapRangeStartFtraceEvent(properties);
            };

            /**
             * Encodes the specified IommuSecPtblMapRangeStartFtraceEvent message. Does not implicitly {@link perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent
             * @static
             * @param {perfetto.protos.IIommuSecPtblMapRangeStartFtraceEvent} m IommuSecPtblMapRangeStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IommuSecPtblMapRangeStartFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(8).uint64(m.len);
                if (m.num != null && Object.hasOwnProperty.call(m, "num"))
                    w.uint32(16).int32(m.num);
                if (m.pa != null && Object.hasOwnProperty.call(m, "pa"))
                    w.uint32(24).uint32(m.pa);
                if (m.secId != null && Object.hasOwnProperty.call(m, "secId"))
                    w.uint32(32).int32(m.secId);
                if (m.va != null && Object.hasOwnProperty.call(m, "va"))
                    w.uint32(40).uint64(m.va);
                return w;
            };

            /**
             * Encodes the specified IommuSecPtblMapRangeStartFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent
             * @static
             * @param {perfetto.protos.IIommuSecPtblMapRangeStartFtraceEvent} message IommuSecPtblMapRangeStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IommuSecPtblMapRangeStartFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IommuSecPtblMapRangeStartFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent} IommuSecPtblMapRangeStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IommuSecPtblMapRangeStartFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.len = r.uint64();
                        break;
                    case 2:
                        m.num = r.int32();
                        break;
                    case 3:
                        m.pa = r.uint32();
                        break;
                    case 4:
                        m.secId = r.int32();
                        break;
                    case 5:
                        m.va = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IommuSecPtblMapRangeStartFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent} IommuSecPtblMapRangeStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IommuSecPtblMapRangeStartFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IommuSecPtblMapRangeStartFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IommuSecPtblMapRangeStartFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                if (m.num != null && m.hasOwnProperty("num")) {
                    if (!$util.isInteger(m.num))
                        return "num: integer expected";
                }
                if (m.pa != null && m.hasOwnProperty("pa")) {
                    if (!$util.isInteger(m.pa))
                        return "pa: integer expected";
                }
                if (m.secId != null && m.hasOwnProperty("secId")) {
                    if (!$util.isInteger(m.secId))
                        return "secId: integer expected";
                }
                if (m.va != null && m.hasOwnProperty("va")) {
                    if (!$util.isInteger(m.va) && !(m.va && $util.isInteger(m.va.low) && $util.isInteger(m.va.high)))
                        return "va: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an IommuSecPtblMapRangeStartFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent} IommuSecPtblMapRangeStartFtraceEvent
             */
            IommuSecPtblMapRangeStartFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent();
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = true;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber(true);
                }
                if (d.num != null) {
                    m.num = d.num | 0;
                }
                if (d.pa != null) {
                    m.pa = d.pa >>> 0;
                }
                if (d.secId != null) {
                    m.secId = d.secId | 0;
                }
                if (d.va != null) {
                    if ($util.Long)
                        (m.va = $util.Long.fromValue(d.va)).unsigned = true;
                    else if (typeof d.va === "string")
                        m.va = parseInt(d.va, 10);
                    else if (typeof d.va === "number")
                        m.va = d.va;
                    else if (typeof d.va === "object")
                        m.va = new $util.LongBits(d.va.low >>> 0, d.va.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an IommuSecPtblMapRangeStartFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent
             * @static
             * @param {perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent} m IommuSecPtblMapRangeStartFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IommuSecPtblMapRangeStartFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                    d.num = 0;
                    d.pa = 0;
                    d.secId = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.va = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.va = o.longs === String ? "0" : 0;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber(true) : m.len;
                }
                if (m.num != null && m.hasOwnProperty("num")) {
                    d.num = m.num;
                }
                if (m.pa != null && m.hasOwnProperty("pa")) {
                    d.pa = m.pa;
                }
                if (m.secId != null && m.hasOwnProperty("secId")) {
                    d.secId = m.secId;
                }
                if (m.va != null && m.hasOwnProperty("va")) {
                    if (typeof m.va === "number")
                        d.va = o.longs === String ? String(m.va) : m.va;
                    else
                        d.va = o.longs === String ? $util.Long.prototype.toString.call(m.va) : o.longs === Number ? new $util.LongBits(m.va.low >>> 0, m.va.high >>> 0).toNumber(true) : m.va;
                }
                return d;
            };

            /**
             * Converts this IommuSecPtblMapRangeStartFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IommuSecPtblMapRangeStartFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IommuSecPtblMapRangeStartFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IommuSecPtblMapRangeStartFtraceEvent;
        })();

        protos.IonAllocBufferEndFtraceEvent = (function() {

            /**
             * Properties of an IonAllocBufferEndFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIonAllocBufferEndFtraceEvent
             * @property {string|null} [clientName] IonAllocBufferEndFtraceEvent clientName
             * @property {number|null} [flags] IonAllocBufferEndFtraceEvent flags
             * @property {string|null} [heapName] IonAllocBufferEndFtraceEvent heapName
             * @property {number|null} [len] IonAllocBufferEndFtraceEvent len
             * @property {number|null} [mask] IonAllocBufferEndFtraceEvent mask
             */

            /**
             * Constructs a new IonAllocBufferEndFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IonAllocBufferEndFtraceEvent.
             * @implements IIonAllocBufferEndFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIonAllocBufferEndFtraceEvent=} [p] Properties to set
             */
            function IonAllocBufferEndFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IonAllocBufferEndFtraceEvent clientName.
             * @member {string} clientName
             * @memberof perfetto.protos.IonAllocBufferEndFtraceEvent
             * @instance
             */
            IonAllocBufferEndFtraceEvent.prototype.clientName = "";

            /**
             * IonAllocBufferEndFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.IonAllocBufferEndFtraceEvent
             * @instance
             */
            IonAllocBufferEndFtraceEvent.prototype.flags = 0;

            /**
             * IonAllocBufferEndFtraceEvent heapName.
             * @member {string} heapName
             * @memberof perfetto.protos.IonAllocBufferEndFtraceEvent
             * @instance
             */
            IonAllocBufferEndFtraceEvent.prototype.heapName = "";

            /**
             * IonAllocBufferEndFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.IonAllocBufferEndFtraceEvent
             * @instance
             */
            IonAllocBufferEndFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IonAllocBufferEndFtraceEvent mask.
             * @member {number} mask
             * @memberof perfetto.protos.IonAllocBufferEndFtraceEvent
             * @instance
             */
            IonAllocBufferEndFtraceEvent.prototype.mask = 0;

            /**
             * Creates a new IonAllocBufferEndFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IonAllocBufferEndFtraceEvent
             * @static
             * @param {perfetto.protos.IIonAllocBufferEndFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IonAllocBufferEndFtraceEvent} IonAllocBufferEndFtraceEvent instance
             */
            IonAllocBufferEndFtraceEvent.create = function create(properties) {
                return new IonAllocBufferEndFtraceEvent(properties);
            };

            /**
             * Encodes the specified IonAllocBufferEndFtraceEvent message. Does not implicitly {@link perfetto.protos.IonAllocBufferEndFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IonAllocBufferEndFtraceEvent
             * @static
             * @param {perfetto.protos.IIonAllocBufferEndFtraceEvent} m IonAllocBufferEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonAllocBufferEndFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.clientName != null && Object.hasOwnProperty.call(m, "clientName"))
                    w.uint32(10).string(m.clientName);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(16).uint32(m.flags);
                if (m.heapName != null && Object.hasOwnProperty.call(m, "heapName"))
                    w.uint32(26).string(m.heapName);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).uint64(m.len);
                if (m.mask != null && Object.hasOwnProperty.call(m, "mask"))
                    w.uint32(40).uint32(m.mask);
                return w;
            };

            /**
             * Encodes the specified IonAllocBufferEndFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IonAllocBufferEndFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IonAllocBufferEndFtraceEvent
             * @static
             * @param {perfetto.protos.IIonAllocBufferEndFtraceEvent} message IonAllocBufferEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonAllocBufferEndFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IonAllocBufferEndFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IonAllocBufferEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IonAllocBufferEndFtraceEvent} IonAllocBufferEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonAllocBufferEndFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IonAllocBufferEndFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.clientName = r.string();
                        break;
                    case 2:
                        m.flags = r.uint32();
                        break;
                    case 3:
                        m.heapName = r.string();
                        break;
                    case 4:
                        m.len = r.uint64();
                        break;
                    case 5:
                        m.mask = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IonAllocBufferEndFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IonAllocBufferEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IonAllocBufferEndFtraceEvent} IonAllocBufferEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonAllocBufferEndFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IonAllocBufferEndFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IonAllocBufferEndFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IonAllocBufferEndFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.clientName != null && m.hasOwnProperty("clientName")) {
                    if (!$util.isString(m.clientName))
                        return "clientName: string expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.heapName != null && m.hasOwnProperty("heapName")) {
                    if (!$util.isString(m.heapName))
                        return "heapName: string expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                if (m.mask != null && m.hasOwnProperty("mask")) {
                    if (!$util.isInteger(m.mask))
                        return "mask: integer expected";
                }
                return null;
            };

            /**
             * Creates an IonAllocBufferEndFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IonAllocBufferEndFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IonAllocBufferEndFtraceEvent} IonAllocBufferEndFtraceEvent
             */
            IonAllocBufferEndFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IonAllocBufferEndFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IonAllocBufferEndFtraceEvent();
                if (d.clientName != null) {
                    m.clientName = String(d.clientName);
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                if (d.heapName != null) {
                    m.heapName = String(d.heapName);
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = true;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber(true);
                }
                if (d.mask != null) {
                    m.mask = d.mask >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an IonAllocBufferEndFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IonAllocBufferEndFtraceEvent
             * @static
             * @param {perfetto.protos.IonAllocBufferEndFtraceEvent} m IonAllocBufferEndFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IonAllocBufferEndFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.clientName = "";
                    d.flags = 0;
                    d.heapName = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                    d.mask = 0;
                }
                if (m.clientName != null && m.hasOwnProperty("clientName")) {
                    d.clientName = m.clientName;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.heapName != null && m.hasOwnProperty("heapName")) {
                    d.heapName = m.heapName;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber(true) : m.len;
                }
                if (m.mask != null && m.hasOwnProperty("mask")) {
                    d.mask = m.mask;
                }
                return d;
            };

            /**
             * Converts this IonAllocBufferEndFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IonAllocBufferEndFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IonAllocBufferEndFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IonAllocBufferEndFtraceEvent;
        })();

        protos.IonAllocBufferFailFtraceEvent = (function() {

            /**
             * Properties of an IonAllocBufferFailFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIonAllocBufferFailFtraceEvent
             * @property {string|null} [clientName] IonAllocBufferFailFtraceEvent clientName
             * @property {number|null} [error] IonAllocBufferFailFtraceEvent error
             * @property {number|null} [flags] IonAllocBufferFailFtraceEvent flags
             * @property {string|null} [heapName] IonAllocBufferFailFtraceEvent heapName
             * @property {number|null} [len] IonAllocBufferFailFtraceEvent len
             * @property {number|null} [mask] IonAllocBufferFailFtraceEvent mask
             */

            /**
             * Constructs a new IonAllocBufferFailFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IonAllocBufferFailFtraceEvent.
             * @implements IIonAllocBufferFailFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIonAllocBufferFailFtraceEvent=} [p] Properties to set
             */
            function IonAllocBufferFailFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IonAllocBufferFailFtraceEvent clientName.
             * @member {string} clientName
             * @memberof perfetto.protos.IonAllocBufferFailFtraceEvent
             * @instance
             */
            IonAllocBufferFailFtraceEvent.prototype.clientName = "";

            /**
             * IonAllocBufferFailFtraceEvent error.
             * @member {number} error
             * @memberof perfetto.protos.IonAllocBufferFailFtraceEvent
             * @instance
             */
            IonAllocBufferFailFtraceEvent.prototype.error = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * IonAllocBufferFailFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.IonAllocBufferFailFtraceEvent
             * @instance
             */
            IonAllocBufferFailFtraceEvent.prototype.flags = 0;

            /**
             * IonAllocBufferFailFtraceEvent heapName.
             * @member {string} heapName
             * @memberof perfetto.protos.IonAllocBufferFailFtraceEvent
             * @instance
             */
            IonAllocBufferFailFtraceEvent.prototype.heapName = "";

            /**
             * IonAllocBufferFailFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.IonAllocBufferFailFtraceEvent
             * @instance
             */
            IonAllocBufferFailFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IonAllocBufferFailFtraceEvent mask.
             * @member {number} mask
             * @memberof perfetto.protos.IonAllocBufferFailFtraceEvent
             * @instance
             */
            IonAllocBufferFailFtraceEvent.prototype.mask = 0;

            /**
             * Creates a new IonAllocBufferFailFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IonAllocBufferFailFtraceEvent
             * @static
             * @param {perfetto.protos.IIonAllocBufferFailFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IonAllocBufferFailFtraceEvent} IonAllocBufferFailFtraceEvent instance
             */
            IonAllocBufferFailFtraceEvent.create = function create(properties) {
                return new IonAllocBufferFailFtraceEvent(properties);
            };

            /**
             * Encodes the specified IonAllocBufferFailFtraceEvent message. Does not implicitly {@link perfetto.protos.IonAllocBufferFailFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IonAllocBufferFailFtraceEvent
             * @static
             * @param {perfetto.protos.IIonAllocBufferFailFtraceEvent} m IonAllocBufferFailFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonAllocBufferFailFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.clientName != null && Object.hasOwnProperty.call(m, "clientName"))
                    w.uint32(10).string(m.clientName);
                if (m.error != null && Object.hasOwnProperty.call(m, "error"))
                    w.uint32(16).int64(m.error);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(24).uint32(m.flags);
                if (m.heapName != null && Object.hasOwnProperty.call(m, "heapName"))
                    w.uint32(34).string(m.heapName);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(40).uint64(m.len);
                if (m.mask != null && Object.hasOwnProperty.call(m, "mask"))
                    w.uint32(48).uint32(m.mask);
                return w;
            };

            /**
             * Encodes the specified IonAllocBufferFailFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IonAllocBufferFailFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IonAllocBufferFailFtraceEvent
             * @static
             * @param {perfetto.protos.IIonAllocBufferFailFtraceEvent} message IonAllocBufferFailFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonAllocBufferFailFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IonAllocBufferFailFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IonAllocBufferFailFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IonAllocBufferFailFtraceEvent} IonAllocBufferFailFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonAllocBufferFailFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IonAllocBufferFailFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.clientName = r.string();
                        break;
                    case 2:
                        m.error = r.int64();
                        break;
                    case 3:
                        m.flags = r.uint32();
                        break;
                    case 4:
                        m.heapName = r.string();
                        break;
                    case 5:
                        m.len = r.uint64();
                        break;
                    case 6:
                        m.mask = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IonAllocBufferFailFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IonAllocBufferFailFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IonAllocBufferFailFtraceEvent} IonAllocBufferFailFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonAllocBufferFailFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IonAllocBufferFailFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IonAllocBufferFailFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IonAllocBufferFailFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.clientName != null && m.hasOwnProperty("clientName")) {
                    if (!$util.isString(m.clientName))
                        return "clientName: string expected";
                }
                if (m.error != null && m.hasOwnProperty("error")) {
                    if (!$util.isInteger(m.error) && !(m.error && $util.isInteger(m.error.low) && $util.isInteger(m.error.high)))
                        return "error: integer|Long expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.heapName != null && m.hasOwnProperty("heapName")) {
                    if (!$util.isString(m.heapName))
                        return "heapName: string expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                if (m.mask != null && m.hasOwnProperty("mask")) {
                    if (!$util.isInteger(m.mask))
                        return "mask: integer expected";
                }
                return null;
            };

            /**
             * Creates an IonAllocBufferFailFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IonAllocBufferFailFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IonAllocBufferFailFtraceEvent} IonAllocBufferFailFtraceEvent
             */
            IonAllocBufferFailFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IonAllocBufferFailFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IonAllocBufferFailFtraceEvent();
                if (d.clientName != null) {
                    m.clientName = String(d.clientName);
                }
                if (d.error != null) {
                    if ($util.Long)
                        (m.error = $util.Long.fromValue(d.error)).unsigned = false;
                    else if (typeof d.error === "string")
                        m.error = parseInt(d.error, 10);
                    else if (typeof d.error === "number")
                        m.error = d.error;
                    else if (typeof d.error === "object")
                        m.error = new $util.LongBits(d.error.low >>> 0, d.error.high >>> 0).toNumber();
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                if (d.heapName != null) {
                    m.heapName = String(d.heapName);
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = true;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber(true);
                }
                if (d.mask != null) {
                    m.mask = d.mask >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an IonAllocBufferFailFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IonAllocBufferFailFtraceEvent
             * @static
             * @param {perfetto.protos.IonAllocBufferFailFtraceEvent} m IonAllocBufferFailFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IonAllocBufferFailFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.clientName = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.error = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.error = o.longs === String ? "0" : 0;
                    d.flags = 0;
                    d.heapName = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                    d.mask = 0;
                }
                if (m.clientName != null && m.hasOwnProperty("clientName")) {
                    d.clientName = m.clientName;
                }
                if (m.error != null && m.hasOwnProperty("error")) {
                    if (typeof m.error === "number")
                        d.error = o.longs === String ? String(m.error) : m.error;
                    else
                        d.error = o.longs === String ? $util.Long.prototype.toString.call(m.error) : o.longs === Number ? new $util.LongBits(m.error.low >>> 0, m.error.high >>> 0).toNumber() : m.error;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.heapName != null && m.hasOwnProperty("heapName")) {
                    d.heapName = m.heapName;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber(true) : m.len;
                }
                if (m.mask != null && m.hasOwnProperty("mask")) {
                    d.mask = m.mask;
                }
                return d;
            };

            /**
             * Converts this IonAllocBufferFailFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IonAllocBufferFailFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IonAllocBufferFailFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IonAllocBufferFailFtraceEvent;
        })();

        protos.IonAllocBufferFallbackFtraceEvent = (function() {

            /**
             * Properties of an IonAllocBufferFallbackFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIonAllocBufferFallbackFtraceEvent
             * @property {string|null} [clientName] IonAllocBufferFallbackFtraceEvent clientName
             * @property {number|null} [error] IonAllocBufferFallbackFtraceEvent error
             * @property {number|null} [flags] IonAllocBufferFallbackFtraceEvent flags
             * @property {string|null} [heapName] IonAllocBufferFallbackFtraceEvent heapName
             * @property {number|null} [len] IonAllocBufferFallbackFtraceEvent len
             * @property {number|null} [mask] IonAllocBufferFallbackFtraceEvent mask
             */

            /**
             * Constructs a new IonAllocBufferFallbackFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IonAllocBufferFallbackFtraceEvent.
             * @implements IIonAllocBufferFallbackFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIonAllocBufferFallbackFtraceEvent=} [p] Properties to set
             */
            function IonAllocBufferFallbackFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IonAllocBufferFallbackFtraceEvent clientName.
             * @member {string} clientName
             * @memberof perfetto.protos.IonAllocBufferFallbackFtraceEvent
             * @instance
             */
            IonAllocBufferFallbackFtraceEvent.prototype.clientName = "";

            /**
             * IonAllocBufferFallbackFtraceEvent error.
             * @member {number} error
             * @memberof perfetto.protos.IonAllocBufferFallbackFtraceEvent
             * @instance
             */
            IonAllocBufferFallbackFtraceEvent.prototype.error = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * IonAllocBufferFallbackFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.IonAllocBufferFallbackFtraceEvent
             * @instance
             */
            IonAllocBufferFallbackFtraceEvent.prototype.flags = 0;

            /**
             * IonAllocBufferFallbackFtraceEvent heapName.
             * @member {string} heapName
             * @memberof perfetto.protos.IonAllocBufferFallbackFtraceEvent
             * @instance
             */
            IonAllocBufferFallbackFtraceEvent.prototype.heapName = "";

            /**
             * IonAllocBufferFallbackFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.IonAllocBufferFallbackFtraceEvent
             * @instance
             */
            IonAllocBufferFallbackFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IonAllocBufferFallbackFtraceEvent mask.
             * @member {number} mask
             * @memberof perfetto.protos.IonAllocBufferFallbackFtraceEvent
             * @instance
             */
            IonAllocBufferFallbackFtraceEvent.prototype.mask = 0;

            /**
             * Creates a new IonAllocBufferFallbackFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IonAllocBufferFallbackFtraceEvent
             * @static
             * @param {perfetto.protos.IIonAllocBufferFallbackFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IonAllocBufferFallbackFtraceEvent} IonAllocBufferFallbackFtraceEvent instance
             */
            IonAllocBufferFallbackFtraceEvent.create = function create(properties) {
                return new IonAllocBufferFallbackFtraceEvent(properties);
            };

            /**
             * Encodes the specified IonAllocBufferFallbackFtraceEvent message. Does not implicitly {@link perfetto.protos.IonAllocBufferFallbackFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IonAllocBufferFallbackFtraceEvent
             * @static
             * @param {perfetto.protos.IIonAllocBufferFallbackFtraceEvent} m IonAllocBufferFallbackFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonAllocBufferFallbackFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.clientName != null && Object.hasOwnProperty.call(m, "clientName"))
                    w.uint32(10).string(m.clientName);
                if (m.error != null && Object.hasOwnProperty.call(m, "error"))
                    w.uint32(16).int64(m.error);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(24).uint32(m.flags);
                if (m.heapName != null && Object.hasOwnProperty.call(m, "heapName"))
                    w.uint32(34).string(m.heapName);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(40).uint64(m.len);
                if (m.mask != null && Object.hasOwnProperty.call(m, "mask"))
                    w.uint32(48).uint32(m.mask);
                return w;
            };

            /**
             * Encodes the specified IonAllocBufferFallbackFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IonAllocBufferFallbackFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IonAllocBufferFallbackFtraceEvent
             * @static
             * @param {perfetto.protos.IIonAllocBufferFallbackFtraceEvent} message IonAllocBufferFallbackFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonAllocBufferFallbackFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IonAllocBufferFallbackFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IonAllocBufferFallbackFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IonAllocBufferFallbackFtraceEvent} IonAllocBufferFallbackFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonAllocBufferFallbackFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IonAllocBufferFallbackFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.clientName = r.string();
                        break;
                    case 2:
                        m.error = r.int64();
                        break;
                    case 3:
                        m.flags = r.uint32();
                        break;
                    case 4:
                        m.heapName = r.string();
                        break;
                    case 5:
                        m.len = r.uint64();
                        break;
                    case 6:
                        m.mask = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IonAllocBufferFallbackFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IonAllocBufferFallbackFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IonAllocBufferFallbackFtraceEvent} IonAllocBufferFallbackFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonAllocBufferFallbackFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IonAllocBufferFallbackFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IonAllocBufferFallbackFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IonAllocBufferFallbackFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.clientName != null && m.hasOwnProperty("clientName")) {
                    if (!$util.isString(m.clientName))
                        return "clientName: string expected";
                }
                if (m.error != null && m.hasOwnProperty("error")) {
                    if (!$util.isInteger(m.error) && !(m.error && $util.isInteger(m.error.low) && $util.isInteger(m.error.high)))
                        return "error: integer|Long expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.heapName != null && m.hasOwnProperty("heapName")) {
                    if (!$util.isString(m.heapName))
                        return "heapName: string expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                if (m.mask != null && m.hasOwnProperty("mask")) {
                    if (!$util.isInteger(m.mask))
                        return "mask: integer expected";
                }
                return null;
            };

            /**
             * Creates an IonAllocBufferFallbackFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IonAllocBufferFallbackFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IonAllocBufferFallbackFtraceEvent} IonAllocBufferFallbackFtraceEvent
             */
            IonAllocBufferFallbackFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IonAllocBufferFallbackFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IonAllocBufferFallbackFtraceEvent();
                if (d.clientName != null) {
                    m.clientName = String(d.clientName);
                }
                if (d.error != null) {
                    if ($util.Long)
                        (m.error = $util.Long.fromValue(d.error)).unsigned = false;
                    else if (typeof d.error === "string")
                        m.error = parseInt(d.error, 10);
                    else if (typeof d.error === "number")
                        m.error = d.error;
                    else if (typeof d.error === "object")
                        m.error = new $util.LongBits(d.error.low >>> 0, d.error.high >>> 0).toNumber();
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                if (d.heapName != null) {
                    m.heapName = String(d.heapName);
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = true;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber(true);
                }
                if (d.mask != null) {
                    m.mask = d.mask >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an IonAllocBufferFallbackFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IonAllocBufferFallbackFtraceEvent
             * @static
             * @param {perfetto.protos.IonAllocBufferFallbackFtraceEvent} m IonAllocBufferFallbackFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IonAllocBufferFallbackFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.clientName = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.error = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.error = o.longs === String ? "0" : 0;
                    d.flags = 0;
                    d.heapName = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                    d.mask = 0;
                }
                if (m.clientName != null && m.hasOwnProperty("clientName")) {
                    d.clientName = m.clientName;
                }
                if (m.error != null && m.hasOwnProperty("error")) {
                    if (typeof m.error === "number")
                        d.error = o.longs === String ? String(m.error) : m.error;
                    else
                        d.error = o.longs === String ? $util.Long.prototype.toString.call(m.error) : o.longs === Number ? new $util.LongBits(m.error.low >>> 0, m.error.high >>> 0).toNumber() : m.error;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.heapName != null && m.hasOwnProperty("heapName")) {
                    d.heapName = m.heapName;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber(true) : m.len;
                }
                if (m.mask != null && m.hasOwnProperty("mask")) {
                    d.mask = m.mask;
                }
                return d;
            };

            /**
             * Converts this IonAllocBufferFallbackFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IonAllocBufferFallbackFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IonAllocBufferFallbackFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IonAllocBufferFallbackFtraceEvent;
        })();

        protos.IonAllocBufferStartFtraceEvent = (function() {

            /**
             * Properties of an IonAllocBufferStartFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIonAllocBufferStartFtraceEvent
             * @property {string|null} [clientName] IonAllocBufferStartFtraceEvent clientName
             * @property {number|null} [flags] IonAllocBufferStartFtraceEvent flags
             * @property {string|null} [heapName] IonAllocBufferStartFtraceEvent heapName
             * @property {number|null} [len] IonAllocBufferStartFtraceEvent len
             * @property {number|null} [mask] IonAllocBufferStartFtraceEvent mask
             */

            /**
             * Constructs a new IonAllocBufferStartFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IonAllocBufferStartFtraceEvent.
             * @implements IIonAllocBufferStartFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIonAllocBufferStartFtraceEvent=} [p] Properties to set
             */
            function IonAllocBufferStartFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IonAllocBufferStartFtraceEvent clientName.
             * @member {string} clientName
             * @memberof perfetto.protos.IonAllocBufferStartFtraceEvent
             * @instance
             */
            IonAllocBufferStartFtraceEvent.prototype.clientName = "";

            /**
             * IonAllocBufferStartFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.IonAllocBufferStartFtraceEvent
             * @instance
             */
            IonAllocBufferStartFtraceEvent.prototype.flags = 0;

            /**
             * IonAllocBufferStartFtraceEvent heapName.
             * @member {string} heapName
             * @memberof perfetto.protos.IonAllocBufferStartFtraceEvent
             * @instance
             */
            IonAllocBufferStartFtraceEvent.prototype.heapName = "";

            /**
             * IonAllocBufferStartFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.IonAllocBufferStartFtraceEvent
             * @instance
             */
            IonAllocBufferStartFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IonAllocBufferStartFtraceEvent mask.
             * @member {number} mask
             * @memberof perfetto.protos.IonAllocBufferStartFtraceEvent
             * @instance
             */
            IonAllocBufferStartFtraceEvent.prototype.mask = 0;

            /**
             * Creates a new IonAllocBufferStartFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IonAllocBufferStartFtraceEvent
             * @static
             * @param {perfetto.protos.IIonAllocBufferStartFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IonAllocBufferStartFtraceEvent} IonAllocBufferStartFtraceEvent instance
             */
            IonAllocBufferStartFtraceEvent.create = function create(properties) {
                return new IonAllocBufferStartFtraceEvent(properties);
            };

            /**
             * Encodes the specified IonAllocBufferStartFtraceEvent message. Does not implicitly {@link perfetto.protos.IonAllocBufferStartFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IonAllocBufferStartFtraceEvent
             * @static
             * @param {perfetto.protos.IIonAllocBufferStartFtraceEvent} m IonAllocBufferStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonAllocBufferStartFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.clientName != null && Object.hasOwnProperty.call(m, "clientName"))
                    w.uint32(10).string(m.clientName);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(16).uint32(m.flags);
                if (m.heapName != null && Object.hasOwnProperty.call(m, "heapName"))
                    w.uint32(26).string(m.heapName);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).uint64(m.len);
                if (m.mask != null && Object.hasOwnProperty.call(m, "mask"))
                    w.uint32(40).uint32(m.mask);
                return w;
            };

            /**
             * Encodes the specified IonAllocBufferStartFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IonAllocBufferStartFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IonAllocBufferStartFtraceEvent
             * @static
             * @param {perfetto.protos.IIonAllocBufferStartFtraceEvent} message IonAllocBufferStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonAllocBufferStartFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IonAllocBufferStartFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IonAllocBufferStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IonAllocBufferStartFtraceEvent} IonAllocBufferStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonAllocBufferStartFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IonAllocBufferStartFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.clientName = r.string();
                        break;
                    case 2:
                        m.flags = r.uint32();
                        break;
                    case 3:
                        m.heapName = r.string();
                        break;
                    case 4:
                        m.len = r.uint64();
                        break;
                    case 5:
                        m.mask = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IonAllocBufferStartFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IonAllocBufferStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IonAllocBufferStartFtraceEvent} IonAllocBufferStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonAllocBufferStartFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IonAllocBufferStartFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IonAllocBufferStartFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IonAllocBufferStartFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.clientName != null && m.hasOwnProperty("clientName")) {
                    if (!$util.isString(m.clientName))
                        return "clientName: string expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.heapName != null && m.hasOwnProperty("heapName")) {
                    if (!$util.isString(m.heapName))
                        return "heapName: string expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                if (m.mask != null && m.hasOwnProperty("mask")) {
                    if (!$util.isInteger(m.mask))
                        return "mask: integer expected";
                }
                return null;
            };

            /**
             * Creates an IonAllocBufferStartFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IonAllocBufferStartFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IonAllocBufferStartFtraceEvent} IonAllocBufferStartFtraceEvent
             */
            IonAllocBufferStartFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IonAllocBufferStartFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IonAllocBufferStartFtraceEvent();
                if (d.clientName != null) {
                    m.clientName = String(d.clientName);
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                if (d.heapName != null) {
                    m.heapName = String(d.heapName);
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = true;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber(true);
                }
                if (d.mask != null) {
                    m.mask = d.mask >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an IonAllocBufferStartFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IonAllocBufferStartFtraceEvent
             * @static
             * @param {perfetto.protos.IonAllocBufferStartFtraceEvent} m IonAllocBufferStartFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IonAllocBufferStartFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.clientName = "";
                    d.flags = 0;
                    d.heapName = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                    d.mask = 0;
                }
                if (m.clientName != null && m.hasOwnProperty("clientName")) {
                    d.clientName = m.clientName;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.heapName != null && m.hasOwnProperty("heapName")) {
                    d.heapName = m.heapName;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber(true) : m.len;
                }
                if (m.mask != null && m.hasOwnProperty("mask")) {
                    d.mask = m.mask;
                }
                return d;
            };

            /**
             * Converts this IonAllocBufferStartFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IonAllocBufferStartFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IonAllocBufferStartFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IonAllocBufferStartFtraceEvent;
        })();

        protos.IonCpAllocRetryFtraceEvent = (function() {

            /**
             * Properties of an IonCpAllocRetryFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIonCpAllocRetryFtraceEvent
             * @property {number|null} [tries] IonCpAllocRetryFtraceEvent tries
             */

            /**
             * Constructs a new IonCpAllocRetryFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IonCpAllocRetryFtraceEvent.
             * @implements IIonCpAllocRetryFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIonCpAllocRetryFtraceEvent=} [p] Properties to set
             */
            function IonCpAllocRetryFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IonCpAllocRetryFtraceEvent tries.
             * @member {number} tries
             * @memberof perfetto.protos.IonCpAllocRetryFtraceEvent
             * @instance
             */
            IonCpAllocRetryFtraceEvent.prototype.tries = 0;

            /**
             * Creates a new IonCpAllocRetryFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IonCpAllocRetryFtraceEvent
             * @static
             * @param {perfetto.protos.IIonCpAllocRetryFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IonCpAllocRetryFtraceEvent} IonCpAllocRetryFtraceEvent instance
             */
            IonCpAllocRetryFtraceEvent.create = function create(properties) {
                return new IonCpAllocRetryFtraceEvent(properties);
            };

            /**
             * Encodes the specified IonCpAllocRetryFtraceEvent message. Does not implicitly {@link perfetto.protos.IonCpAllocRetryFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IonCpAllocRetryFtraceEvent
             * @static
             * @param {perfetto.protos.IIonCpAllocRetryFtraceEvent} m IonCpAllocRetryFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonCpAllocRetryFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.tries != null && Object.hasOwnProperty.call(m, "tries"))
                    w.uint32(8).int32(m.tries);
                return w;
            };

            /**
             * Encodes the specified IonCpAllocRetryFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IonCpAllocRetryFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IonCpAllocRetryFtraceEvent
             * @static
             * @param {perfetto.protos.IIonCpAllocRetryFtraceEvent} message IonCpAllocRetryFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonCpAllocRetryFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IonCpAllocRetryFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IonCpAllocRetryFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IonCpAllocRetryFtraceEvent} IonCpAllocRetryFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonCpAllocRetryFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IonCpAllocRetryFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.tries = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IonCpAllocRetryFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IonCpAllocRetryFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IonCpAllocRetryFtraceEvent} IonCpAllocRetryFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonCpAllocRetryFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IonCpAllocRetryFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IonCpAllocRetryFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IonCpAllocRetryFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.tries != null && m.hasOwnProperty("tries")) {
                    if (!$util.isInteger(m.tries))
                        return "tries: integer expected";
                }
                return null;
            };

            /**
             * Creates an IonCpAllocRetryFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IonCpAllocRetryFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IonCpAllocRetryFtraceEvent} IonCpAllocRetryFtraceEvent
             */
            IonCpAllocRetryFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IonCpAllocRetryFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IonCpAllocRetryFtraceEvent();
                if (d.tries != null) {
                    m.tries = d.tries | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an IonCpAllocRetryFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IonCpAllocRetryFtraceEvent
             * @static
             * @param {perfetto.protos.IonCpAllocRetryFtraceEvent} m IonCpAllocRetryFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IonCpAllocRetryFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.tries = 0;
                }
                if (m.tries != null && m.hasOwnProperty("tries")) {
                    d.tries = m.tries;
                }
                return d;
            };

            /**
             * Converts this IonCpAllocRetryFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IonCpAllocRetryFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IonCpAllocRetryFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IonCpAllocRetryFtraceEvent;
        })();

        protos.IonCpSecureBufferEndFtraceEvent = (function() {

            /**
             * Properties of an IonCpSecureBufferEndFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIonCpSecureBufferEndFtraceEvent
             * @property {number|null} [align] IonCpSecureBufferEndFtraceEvent align
             * @property {number|null} [flags] IonCpSecureBufferEndFtraceEvent flags
             * @property {string|null} [heapName] IonCpSecureBufferEndFtraceEvent heapName
             * @property {number|null} [len] IonCpSecureBufferEndFtraceEvent len
             */

            /**
             * Constructs a new IonCpSecureBufferEndFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IonCpSecureBufferEndFtraceEvent.
             * @implements IIonCpSecureBufferEndFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIonCpSecureBufferEndFtraceEvent=} [p] Properties to set
             */
            function IonCpSecureBufferEndFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IonCpSecureBufferEndFtraceEvent align.
             * @member {number} align
             * @memberof perfetto.protos.IonCpSecureBufferEndFtraceEvent
             * @instance
             */
            IonCpSecureBufferEndFtraceEvent.prototype.align = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IonCpSecureBufferEndFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.IonCpSecureBufferEndFtraceEvent
             * @instance
             */
            IonCpSecureBufferEndFtraceEvent.prototype.flags = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IonCpSecureBufferEndFtraceEvent heapName.
             * @member {string} heapName
             * @memberof perfetto.protos.IonCpSecureBufferEndFtraceEvent
             * @instance
             */
            IonCpSecureBufferEndFtraceEvent.prototype.heapName = "";

            /**
             * IonCpSecureBufferEndFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.IonCpSecureBufferEndFtraceEvent
             * @instance
             */
            IonCpSecureBufferEndFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new IonCpSecureBufferEndFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IonCpSecureBufferEndFtraceEvent
             * @static
             * @param {perfetto.protos.IIonCpSecureBufferEndFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IonCpSecureBufferEndFtraceEvent} IonCpSecureBufferEndFtraceEvent instance
             */
            IonCpSecureBufferEndFtraceEvent.create = function create(properties) {
                return new IonCpSecureBufferEndFtraceEvent(properties);
            };

            /**
             * Encodes the specified IonCpSecureBufferEndFtraceEvent message. Does not implicitly {@link perfetto.protos.IonCpSecureBufferEndFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IonCpSecureBufferEndFtraceEvent
             * @static
             * @param {perfetto.protos.IIonCpSecureBufferEndFtraceEvent} m IonCpSecureBufferEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonCpSecureBufferEndFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.align != null && Object.hasOwnProperty.call(m, "align"))
                    w.uint32(8).uint64(m.align);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(16).uint64(m.flags);
                if (m.heapName != null && Object.hasOwnProperty.call(m, "heapName"))
                    w.uint32(26).string(m.heapName);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).uint64(m.len);
                return w;
            };

            /**
             * Encodes the specified IonCpSecureBufferEndFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IonCpSecureBufferEndFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IonCpSecureBufferEndFtraceEvent
             * @static
             * @param {perfetto.protos.IIonCpSecureBufferEndFtraceEvent} message IonCpSecureBufferEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonCpSecureBufferEndFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IonCpSecureBufferEndFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IonCpSecureBufferEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IonCpSecureBufferEndFtraceEvent} IonCpSecureBufferEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonCpSecureBufferEndFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IonCpSecureBufferEndFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.align = r.uint64();
                        break;
                    case 2:
                        m.flags = r.uint64();
                        break;
                    case 3:
                        m.heapName = r.string();
                        break;
                    case 4:
                        m.len = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IonCpSecureBufferEndFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IonCpSecureBufferEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IonCpSecureBufferEndFtraceEvent} IonCpSecureBufferEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonCpSecureBufferEndFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IonCpSecureBufferEndFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IonCpSecureBufferEndFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IonCpSecureBufferEndFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.align != null && m.hasOwnProperty("align")) {
                    if (!$util.isInteger(m.align) && !(m.align && $util.isInteger(m.align.low) && $util.isInteger(m.align.high)))
                        return "align: integer|Long expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags) && !(m.flags && $util.isInteger(m.flags.low) && $util.isInteger(m.flags.high)))
                        return "flags: integer|Long expected";
                }
                if (m.heapName != null && m.hasOwnProperty("heapName")) {
                    if (!$util.isString(m.heapName))
                        return "heapName: string expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an IonCpSecureBufferEndFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IonCpSecureBufferEndFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IonCpSecureBufferEndFtraceEvent} IonCpSecureBufferEndFtraceEvent
             */
            IonCpSecureBufferEndFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IonCpSecureBufferEndFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IonCpSecureBufferEndFtraceEvent();
                if (d.align != null) {
                    if ($util.Long)
                        (m.align = $util.Long.fromValue(d.align)).unsigned = true;
                    else if (typeof d.align === "string")
                        m.align = parseInt(d.align, 10);
                    else if (typeof d.align === "number")
                        m.align = d.align;
                    else if (typeof d.align === "object")
                        m.align = new $util.LongBits(d.align.low >>> 0, d.align.high >>> 0).toNumber(true);
                }
                if (d.flags != null) {
                    if ($util.Long)
                        (m.flags = $util.Long.fromValue(d.flags)).unsigned = true;
                    else if (typeof d.flags === "string")
                        m.flags = parseInt(d.flags, 10);
                    else if (typeof d.flags === "number")
                        m.flags = d.flags;
                    else if (typeof d.flags === "object")
                        m.flags = new $util.LongBits(d.flags.low >>> 0, d.flags.high >>> 0).toNumber(true);
                }
                if (d.heapName != null) {
                    m.heapName = String(d.heapName);
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = true;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an IonCpSecureBufferEndFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IonCpSecureBufferEndFtraceEvent
             * @static
             * @param {perfetto.protos.IonCpSecureBufferEndFtraceEvent} m IonCpSecureBufferEndFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IonCpSecureBufferEndFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.align = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.align = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.flags = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.flags = o.longs === String ? "0" : 0;
                    d.heapName = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                }
                if (m.align != null && m.hasOwnProperty("align")) {
                    if (typeof m.align === "number")
                        d.align = o.longs === String ? String(m.align) : m.align;
                    else
                        d.align = o.longs === String ? $util.Long.prototype.toString.call(m.align) : o.longs === Number ? new $util.LongBits(m.align.low >>> 0, m.align.high >>> 0).toNumber(true) : m.align;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (typeof m.flags === "number")
                        d.flags = o.longs === String ? String(m.flags) : m.flags;
                    else
                        d.flags = o.longs === String ? $util.Long.prototype.toString.call(m.flags) : o.longs === Number ? new $util.LongBits(m.flags.low >>> 0, m.flags.high >>> 0).toNumber(true) : m.flags;
                }
                if (m.heapName != null && m.hasOwnProperty("heapName")) {
                    d.heapName = m.heapName;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber(true) : m.len;
                }
                return d;
            };

            /**
             * Converts this IonCpSecureBufferEndFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IonCpSecureBufferEndFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IonCpSecureBufferEndFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IonCpSecureBufferEndFtraceEvent;
        })();

        protos.IonCpSecureBufferStartFtraceEvent = (function() {

            /**
             * Properties of an IonCpSecureBufferStartFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIonCpSecureBufferStartFtraceEvent
             * @property {number|null} [align] IonCpSecureBufferStartFtraceEvent align
             * @property {number|null} [flags] IonCpSecureBufferStartFtraceEvent flags
             * @property {string|null} [heapName] IonCpSecureBufferStartFtraceEvent heapName
             * @property {number|null} [len] IonCpSecureBufferStartFtraceEvent len
             */

            /**
             * Constructs a new IonCpSecureBufferStartFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IonCpSecureBufferStartFtraceEvent.
             * @implements IIonCpSecureBufferStartFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIonCpSecureBufferStartFtraceEvent=} [p] Properties to set
             */
            function IonCpSecureBufferStartFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IonCpSecureBufferStartFtraceEvent align.
             * @member {number} align
             * @memberof perfetto.protos.IonCpSecureBufferStartFtraceEvent
             * @instance
             */
            IonCpSecureBufferStartFtraceEvent.prototype.align = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IonCpSecureBufferStartFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.IonCpSecureBufferStartFtraceEvent
             * @instance
             */
            IonCpSecureBufferStartFtraceEvent.prototype.flags = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IonCpSecureBufferStartFtraceEvent heapName.
             * @member {string} heapName
             * @memberof perfetto.protos.IonCpSecureBufferStartFtraceEvent
             * @instance
             */
            IonCpSecureBufferStartFtraceEvent.prototype.heapName = "";

            /**
             * IonCpSecureBufferStartFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.IonCpSecureBufferStartFtraceEvent
             * @instance
             */
            IonCpSecureBufferStartFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new IonCpSecureBufferStartFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IonCpSecureBufferStartFtraceEvent
             * @static
             * @param {perfetto.protos.IIonCpSecureBufferStartFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IonCpSecureBufferStartFtraceEvent} IonCpSecureBufferStartFtraceEvent instance
             */
            IonCpSecureBufferStartFtraceEvent.create = function create(properties) {
                return new IonCpSecureBufferStartFtraceEvent(properties);
            };

            /**
             * Encodes the specified IonCpSecureBufferStartFtraceEvent message. Does not implicitly {@link perfetto.protos.IonCpSecureBufferStartFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IonCpSecureBufferStartFtraceEvent
             * @static
             * @param {perfetto.protos.IIonCpSecureBufferStartFtraceEvent} m IonCpSecureBufferStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonCpSecureBufferStartFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.align != null && Object.hasOwnProperty.call(m, "align"))
                    w.uint32(8).uint64(m.align);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(16).uint64(m.flags);
                if (m.heapName != null && Object.hasOwnProperty.call(m, "heapName"))
                    w.uint32(26).string(m.heapName);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).uint64(m.len);
                return w;
            };

            /**
             * Encodes the specified IonCpSecureBufferStartFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IonCpSecureBufferStartFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IonCpSecureBufferStartFtraceEvent
             * @static
             * @param {perfetto.protos.IIonCpSecureBufferStartFtraceEvent} message IonCpSecureBufferStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonCpSecureBufferStartFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IonCpSecureBufferStartFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IonCpSecureBufferStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IonCpSecureBufferStartFtraceEvent} IonCpSecureBufferStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonCpSecureBufferStartFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IonCpSecureBufferStartFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.align = r.uint64();
                        break;
                    case 2:
                        m.flags = r.uint64();
                        break;
                    case 3:
                        m.heapName = r.string();
                        break;
                    case 4:
                        m.len = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IonCpSecureBufferStartFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IonCpSecureBufferStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IonCpSecureBufferStartFtraceEvent} IonCpSecureBufferStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonCpSecureBufferStartFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IonCpSecureBufferStartFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IonCpSecureBufferStartFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IonCpSecureBufferStartFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.align != null && m.hasOwnProperty("align")) {
                    if (!$util.isInteger(m.align) && !(m.align && $util.isInteger(m.align.low) && $util.isInteger(m.align.high)))
                        return "align: integer|Long expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags) && !(m.flags && $util.isInteger(m.flags.low) && $util.isInteger(m.flags.high)))
                        return "flags: integer|Long expected";
                }
                if (m.heapName != null && m.hasOwnProperty("heapName")) {
                    if (!$util.isString(m.heapName))
                        return "heapName: string expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an IonCpSecureBufferStartFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IonCpSecureBufferStartFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IonCpSecureBufferStartFtraceEvent} IonCpSecureBufferStartFtraceEvent
             */
            IonCpSecureBufferStartFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IonCpSecureBufferStartFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IonCpSecureBufferStartFtraceEvent();
                if (d.align != null) {
                    if ($util.Long)
                        (m.align = $util.Long.fromValue(d.align)).unsigned = true;
                    else if (typeof d.align === "string")
                        m.align = parseInt(d.align, 10);
                    else if (typeof d.align === "number")
                        m.align = d.align;
                    else if (typeof d.align === "object")
                        m.align = new $util.LongBits(d.align.low >>> 0, d.align.high >>> 0).toNumber(true);
                }
                if (d.flags != null) {
                    if ($util.Long)
                        (m.flags = $util.Long.fromValue(d.flags)).unsigned = true;
                    else if (typeof d.flags === "string")
                        m.flags = parseInt(d.flags, 10);
                    else if (typeof d.flags === "number")
                        m.flags = d.flags;
                    else if (typeof d.flags === "object")
                        m.flags = new $util.LongBits(d.flags.low >>> 0, d.flags.high >>> 0).toNumber(true);
                }
                if (d.heapName != null) {
                    m.heapName = String(d.heapName);
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = true;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an IonCpSecureBufferStartFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IonCpSecureBufferStartFtraceEvent
             * @static
             * @param {perfetto.protos.IonCpSecureBufferStartFtraceEvent} m IonCpSecureBufferStartFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IonCpSecureBufferStartFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.align = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.align = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.flags = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.flags = o.longs === String ? "0" : 0;
                    d.heapName = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                }
                if (m.align != null && m.hasOwnProperty("align")) {
                    if (typeof m.align === "number")
                        d.align = o.longs === String ? String(m.align) : m.align;
                    else
                        d.align = o.longs === String ? $util.Long.prototype.toString.call(m.align) : o.longs === Number ? new $util.LongBits(m.align.low >>> 0, m.align.high >>> 0).toNumber(true) : m.align;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (typeof m.flags === "number")
                        d.flags = o.longs === String ? String(m.flags) : m.flags;
                    else
                        d.flags = o.longs === String ? $util.Long.prototype.toString.call(m.flags) : o.longs === Number ? new $util.LongBits(m.flags.low >>> 0, m.flags.high >>> 0).toNumber(true) : m.flags;
                }
                if (m.heapName != null && m.hasOwnProperty("heapName")) {
                    d.heapName = m.heapName;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber(true) : m.len;
                }
                return d;
            };

            /**
             * Converts this IonCpSecureBufferStartFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IonCpSecureBufferStartFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IonCpSecureBufferStartFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IonCpSecureBufferStartFtraceEvent;
        })();

        protos.IonPrefetchingFtraceEvent = (function() {

            /**
             * Properties of an IonPrefetchingFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIonPrefetchingFtraceEvent
             * @property {number|null} [len] IonPrefetchingFtraceEvent len
             */

            /**
             * Constructs a new IonPrefetchingFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IonPrefetchingFtraceEvent.
             * @implements IIonPrefetchingFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIonPrefetchingFtraceEvent=} [p] Properties to set
             */
            function IonPrefetchingFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IonPrefetchingFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.IonPrefetchingFtraceEvent
             * @instance
             */
            IonPrefetchingFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new IonPrefetchingFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IonPrefetchingFtraceEvent
             * @static
             * @param {perfetto.protos.IIonPrefetchingFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IonPrefetchingFtraceEvent} IonPrefetchingFtraceEvent instance
             */
            IonPrefetchingFtraceEvent.create = function create(properties) {
                return new IonPrefetchingFtraceEvent(properties);
            };

            /**
             * Encodes the specified IonPrefetchingFtraceEvent message. Does not implicitly {@link perfetto.protos.IonPrefetchingFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IonPrefetchingFtraceEvent
             * @static
             * @param {perfetto.protos.IIonPrefetchingFtraceEvent} m IonPrefetchingFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonPrefetchingFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(8).uint64(m.len);
                return w;
            };

            /**
             * Encodes the specified IonPrefetchingFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IonPrefetchingFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IonPrefetchingFtraceEvent
             * @static
             * @param {perfetto.protos.IIonPrefetchingFtraceEvent} message IonPrefetchingFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonPrefetchingFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IonPrefetchingFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IonPrefetchingFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IonPrefetchingFtraceEvent} IonPrefetchingFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonPrefetchingFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IonPrefetchingFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.len = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IonPrefetchingFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IonPrefetchingFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IonPrefetchingFtraceEvent} IonPrefetchingFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonPrefetchingFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IonPrefetchingFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IonPrefetchingFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IonPrefetchingFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an IonPrefetchingFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IonPrefetchingFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IonPrefetchingFtraceEvent} IonPrefetchingFtraceEvent
             */
            IonPrefetchingFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IonPrefetchingFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IonPrefetchingFtraceEvent();
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = true;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an IonPrefetchingFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IonPrefetchingFtraceEvent
             * @static
             * @param {perfetto.protos.IonPrefetchingFtraceEvent} m IonPrefetchingFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IonPrefetchingFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber(true) : m.len;
                }
                return d;
            };

            /**
             * Converts this IonPrefetchingFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IonPrefetchingFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IonPrefetchingFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IonPrefetchingFtraceEvent;
        })();

        protos.IonSecureCmaAddToPoolEndFtraceEvent = (function() {

            /**
             * Properties of an IonSecureCmaAddToPoolEndFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIonSecureCmaAddToPoolEndFtraceEvent
             * @property {number|null} [isPrefetch] IonSecureCmaAddToPoolEndFtraceEvent isPrefetch
             * @property {number|null} [len] IonSecureCmaAddToPoolEndFtraceEvent len
             * @property {number|null} [poolTotal] IonSecureCmaAddToPoolEndFtraceEvent poolTotal
             */

            /**
             * Constructs a new IonSecureCmaAddToPoolEndFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IonSecureCmaAddToPoolEndFtraceEvent.
             * @implements IIonSecureCmaAddToPoolEndFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIonSecureCmaAddToPoolEndFtraceEvent=} [p] Properties to set
             */
            function IonSecureCmaAddToPoolEndFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IonSecureCmaAddToPoolEndFtraceEvent isPrefetch.
             * @member {number} isPrefetch
             * @memberof perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent
             * @instance
             */
            IonSecureCmaAddToPoolEndFtraceEvent.prototype.isPrefetch = 0;

            /**
             * IonSecureCmaAddToPoolEndFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent
             * @instance
             */
            IonSecureCmaAddToPoolEndFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IonSecureCmaAddToPoolEndFtraceEvent poolTotal.
             * @member {number} poolTotal
             * @memberof perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent
             * @instance
             */
            IonSecureCmaAddToPoolEndFtraceEvent.prototype.poolTotal = 0;

            /**
             * Creates a new IonSecureCmaAddToPoolEndFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent
             * @static
             * @param {perfetto.protos.IIonSecureCmaAddToPoolEndFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent} IonSecureCmaAddToPoolEndFtraceEvent instance
             */
            IonSecureCmaAddToPoolEndFtraceEvent.create = function create(properties) {
                return new IonSecureCmaAddToPoolEndFtraceEvent(properties);
            };

            /**
             * Encodes the specified IonSecureCmaAddToPoolEndFtraceEvent message. Does not implicitly {@link perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent
             * @static
             * @param {perfetto.protos.IIonSecureCmaAddToPoolEndFtraceEvent} m IonSecureCmaAddToPoolEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonSecureCmaAddToPoolEndFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.isPrefetch != null && Object.hasOwnProperty.call(m, "isPrefetch"))
                    w.uint32(8).uint32(m.isPrefetch);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(16).uint64(m.len);
                if (m.poolTotal != null && Object.hasOwnProperty.call(m, "poolTotal"))
                    w.uint32(24).int32(m.poolTotal);
                return w;
            };

            /**
             * Encodes the specified IonSecureCmaAddToPoolEndFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent
             * @static
             * @param {perfetto.protos.IIonSecureCmaAddToPoolEndFtraceEvent} message IonSecureCmaAddToPoolEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonSecureCmaAddToPoolEndFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IonSecureCmaAddToPoolEndFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent} IonSecureCmaAddToPoolEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonSecureCmaAddToPoolEndFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.isPrefetch = r.uint32();
                        break;
                    case 2:
                        m.len = r.uint64();
                        break;
                    case 3:
                        m.poolTotal = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IonSecureCmaAddToPoolEndFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent} IonSecureCmaAddToPoolEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonSecureCmaAddToPoolEndFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IonSecureCmaAddToPoolEndFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IonSecureCmaAddToPoolEndFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.isPrefetch != null && m.hasOwnProperty("isPrefetch")) {
                    if (!$util.isInteger(m.isPrefetch))
                        return "isPrefetch: integer expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                if (m.poolTotal != null && m.hasOwnProperty("poolTotal")) {
                    if (!$util.isInteger(m.poolTotal))
                        return "poolTotal: integer expected";
                }
                return null;
            };

            /**
             * Creates an IonSecureCmaAddToPoolEndFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent} IonSecureCmaAddToPoolEndFtraceEvent
             */
            IonSecureCmaAddToPoolEndFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent();
                if (d.isPrefetch != null) {
                    m.isPrefetch = d.isPrefetch >>> 0;
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = true;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber(true);
                }
                if (d.poolTotal != null) {
                    m.poolTotal = d.poolTotal | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an IonSecureCmaAddToPoolEndFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent
             * @static
             * @param {perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent} m IonSecureCmaAddToPoolEndFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IonSecureCmaAddToPoolEndFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.isPrefetch = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                    d.poolTotal = 0;
                }
                if (m.isPrefetch != null && m.hasOwnProperty("isPrefetch")) {
                    d.isPrefetch = m.isPrefetch;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber(true) : m.len;
                }
                if (m.poolTotal != null && m.hasOwnProperty("poolTotal")) {
                    d.poolTotal = m.poolTotal;
                }
                return d;
            };

            /**
             * Converts this IonSecureCmaAddToPoolEndFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IonSecureCmaAddToPoolEndFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IonSecureCmaAddToPoolEndFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IonSecureCmaAddToPoolEndFtraceEvent;
        })();

        protos.IonSecureCmaAddToPoolStartFtraceEvent = (function() {

            /**
             * Properties of an IonSecureCmaAddToPoolStartFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIonSecureCmaAddToPoolStartFtraceEvent
             * @property {number|null} [isPrefetch] IonSecureCmaAddToPoolStartFtraceEvent isPrefetch
             * @property {number|null} [len] IonSecureCmaAddToPoolStartFtraceEvent len
             * @property {number|null} [poolTotal] IonSecureCmaAddToPoolStartFtraceEvent poolTotal
             */

            /**
             * Constructs a new IonSecureCmaAddToPoolStartFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IonSecureCmaAddToPoolStartFtraceEvent.
             * @implements IIonSecureCmaAddToPoolStartFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIonSecureCmaAddToPoolStartFtraceEvent=} [p] Properties to set
             */
            function IonSecureCmaAddToPoolStartFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IonSecureCmaAddToPoolStartFtraceEvent isPrefetch.
             * @member {number} isPrefetch
             * @memberof perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent
             * @instance
             */
            IonSecureCmaAddToPoolStartFtraceEvent.prototype.isPrefetch = 0;

            /**
             * IonSecureCmaAddToPoolStartFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent
             * @instance
             */
            IonSecureCmaAddToPoolStartFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IonSecureCmaAddToPoolStartFtraceEvent poolTotal.
             * @member {number} poolTotal
             * @memberof perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent
             * @instance
             */
            IonSecureCmaAddToPoolStartFtraceEvent.prototype.poolTotal = 0;

            /**
             * Creates a new IonSecureCmaAddToPoolStartFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent
             * @static
             * @param {perfetto.protos.IIonSecureCmaAddToPoolStartFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent} IonSecureCmaAddToPoolStartFtraceEvent instance
             */
            IonSecureCmaAddToPoolStartFtraceEvent.create = function create(properties) {
                return new IonSecureCmaAddToPoolStartFtraceEvent(properties);
            };

            /**
             * Encodes the specified IonSecureCmaAddToPoolStartFtraceEvent message. Does not implicitly {@link perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent
             * @static
             * @param {perfetto.protos.IIonSecureCmaAddToPoolStartFtraceEvent} m IonSecureCmaAddToPoolStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonSecureCmaAddToPoolStartFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.isPrefetch != null && Object.hasOwnProperty.call(m, "isPrefetch"))
                    w.uint32(8).uint32(m.isPrefetch);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(16).uint64(m.len);
                if (m.poolTotal != null && Object.hasOwnProperty.call(m, "poolTotal"))
                    w.uint32(24).int32(m.poolTotal);
                return w;
            };

            /**
             * Encodes the specified IonSecureCmaAddToPoolStartFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent
             * @static
             * @param {perfetto.protos.IIonSecureCmaAddToPoolStartFtraceEvent} message IonSecureCmaAddToPoolStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonSecureCmaAddToPoolStartFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IonSecureCmaAddToPoolStartFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent} IonSecureCmaAddToPoolStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonSecureCmaAddToPoolStartFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.isPrefetch = r.uint32();
                        break;
                    case 2:
                        m.len = r.uint64();
                        break;
                    case 3:
                        m.poolTotal = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IonSecureCmaAddToPoolStartFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent} IonSecureCmaAddToPoolStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonSecureCmaAddToPoolStartFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IonSecureCmaAddToPoolStartFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IonSecureCmaAddToPoolStartFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.isPrefetch != null && m.hasOwnProperty("isPrefetch")) {
                    if (!$util.isInteger(m.isPrefetch))
                        return "isPrefetch: integer expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                if (m.poolTotal != null && m.hasOwnProperty("poolTotal")) {
                    if (!$util.isInteger(m.poolTotal))
                        return "poolTotal: integer expected";
                }
                return null;
            };

            /**
             * Creates an IonSecureCmaAddToPoolStartFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent} IonSecureCmaAddToPoolStartFtraceEvent
             */
            IonSecureCmaAddToPoolStartFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent();
                if (d.isPrefetch != null) {
                    m.isPrefetch = d.isPrefetch >>> 0;
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = true;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber(true);
                }
                if (d.poolTotal != null) {
                    m.poolTotal = d.poolTotal | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an IonSecureCmaAddToPoolStartFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent
             * @static
             * @param {perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent} m IonSecureCmaAddToPoolStartFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IonSecureCmaAddToPoolStartFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.isPrefetch = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                    d.poolTotal = 0;
                }
                if (m.isPrefetch != null && m.hasOwnProperty("isPrefetch")) {
                    d.isPrefetch = m.isPrefetch;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber(true) : m.len;
                }
                if (m.poolTotal != null && m.hasOwnProperty("poolTotal")) {
                    d.poolTotal = m.poolTotal;
                }
                return d;
            };

            /**
             * Converts this IonSecureCmaAddToPoolStartFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IonSecureCmaAddToPoolStartFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IonSecureCmaAddToPoolStartFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IonSecureCmaAddToPoolStartFtraceEvent;
        })();

        protos.IonSecureCmaAllocateEndFtraceEvent = (function() {

            /**
             * Properties of an IonSecureCmaAllocateEndFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIonSecureCmaAllocateEndFtraceEvent
             * @property {number|null} [align] IonSecureCmaAllocateEndFtraceEvent align
             * @property {number|null} [flags] IonSecureCmaAllocateEndFtraceEvent flags
             * @property {string|null} [heapName] IonSecureCmaAllocateEndFtraceEvent heapName
             * @property {number|null} [len] IonSecureCmaAllocateEndFtraceEvent len
             */

            /**
             * Constructs a new IonSecureCmaAllocateEndFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IonSecureCmaAllocateEndFtraceEvent.
             * @implements IIonSecureCmaAllocateEndFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIonSecureCmaAllocateEndFtraceEvent=} [p] Properties to set
             */
            function IonSecureCmaAllocateEndFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IonSecureCmaAllocateEndFtraceEvent align.
             * @member {number} align
             * @memberof perfetto.protos.IonSecureCmaAllocateEndFtraceEvent
             * @instance
             */
            IonSecureCmaAllocateEndFtraceEvent.prototype.align = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IonSecureCmaAllocateEndFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.IonSecureCmaAllocateEndFtraceEvent
             * @instance
             */
            IonSecureCmaAllocateEndFtraceEvent.prototype.flags = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IonSecureCmaAllocateEndFtraceEvent heapName.
             * @member {string} heapName
             * @memberof perfetto.protos.IonSecureCmaAllocateEndFtraceEvent
             * @instance
             */
            IonSecureCmaAllocateEndFtraceEvent.prototype.heapName = "";

            /**
             * IonSecureCmaAllocateEndFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.IonSecureCmaAllocateEndFtraceEvent
             * @instance
             */
            IonSecureCmaAllocateEndFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new IonSecureCmaAllocateEndFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IonSecureCmaAllocateEndFtraceEvent
             * @static
             * @param {perfetto.protos.IIonSecureCmaAllocateEndFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IonSecureCmaAllocateEndFtraceEvent} IonSecureCmaAllocateEndFtraceEvent instance
             */
            IonSecureCmaAllocateEndFtraceEvent.create = function create(properties) {
                return new IonSecureCmaAllocateEndFtraceEvent(properties);
            };

            /**
             * Encodes the specified IonSecureCmaAllocateEndFtraceEvent message. Does not implicitly {@link perfetto.protos.IonSecureCmaAllocateEndFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IonSecureCmaAllocateEndFtraceEvent
             * @static
             * @param {perfetto.protos.IIonSecureCmaAllocateEndFtraceEvent} m IonSecureCmaAllocateEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonSecureCmaAllocateEndFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.align != null && Object.hasOwnProperty.call(m, "align"))
                    w.uint32(8).uint64(m.align);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(16).uint64(m.flags);
                if (m.heapName != null && Object.hasOwnProperty.call(m, "heapName"))
                    w.uint32(26).string(m.heapName);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).uint64(m.len);
                return w;
            };

            /**
             * Encodes the specified IonSecureCmaAllocateEndFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IonSecureCmaAllocateEndFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IonSecureCmaAllocateEndFtraceEvent
             * @static
             * @param {perfetto.protos.IIonSecureCmaAllocateEndFtraceEvent} message IonSecureCmaAllocateEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonSecureCmaAllocateEndFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IonSecureCmaAllocateEndFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IonSecureCmaAllocateEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IonSecureCmaAllocateEndFtraceEvent} IonSecureCmaAllocateEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonSecureCmaAllocateEndFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IonSecureCmaAllocateEndFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.align = r.uint64();
                        break;
                    case 2:
                        m.flags = r.uint64();
                        break;
                    case 3:
                        m.heapName = r.string();
                        break;
                    case 4:
                        m.len = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IonSecureCmaAllocateEndFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IonSecureCmaAllocateEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IonSecureCmaAllocateEndFtraceEvent} IonSecureCmaAllocateEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonSecureCmaAllocateEndFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IonSecureCmaAllocateEndFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IonSecureCmaAllocateEndFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IonSecureCmaAllocateEndFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.align != null && m.hasOwnProperty("align")) {
                    if (!$util.isInteger(m.align) && !(m.align && $util.isInteger(m.align.low) && $util.isInteger(m.align.high)))
                        return "align: integer|Long expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags) && !(m.flags && $util.isInteger(m.flags.low) && $util.isInteger(m.flags.high)))
                        return "flags: integer|Long expected";
                }
                if (m.heapName != null && m.hasOwnProperty("heapName")) {
                    if (!$util.isString(m.heapName))
                        return "heapName: string expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an IonSecureCmaAllocateEndFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IonSecureCmaAllocateEndFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IonSecureCmaAllocateEndFtraceEvent} IonSecureCmaAllocateEndFtraceEvent
             */
            IonSecureCmaAllocateEndFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IonSecureCmaAllocateEndFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IonSecureCmaAllocateEndFtraceEvent();
                if (d.align != null) {
                    if ($util.Long)
                        (m.align = $util.Long.fromValue(d.align)).unsigned = true;
                    else if (typeof d.align === "string")
                        m.align = parseInt(d.align, 10);
                    else if (typeof d.align === "number")
                        m.align = d.align;
                    else if (typeof d.align === "object")
                        m.align = new $util.LongBits(d.align.low >>> 0, d.align.high >>> 0).toNumber(true);
                }
                if (d.flags != null) {
                    if ($util.Long)
                        (m.flags = $util.Long.fromValue(d.flags)).unsigned = true;
                    else if (typeof d.flags === "string")
                        m.flags = parseInt(d.flags, 10);
                    else if (typeof d.flags === "number")
                        m.flags = d.flags;
                    else if (typeof d.flags === "object")
                        m.flags = new $util.LongBits(d.flags.low >>> 0, d.flags.high >>> 0).toNumber(true);
                }
                if (d.heapName != null) {
                    m.heapName = String(d.heapName);
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = true;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an IonSecureCmaAllocateEndFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IonSecureCmaAllocateEndFtraceEvent
             * @static
             * @param {perfetto.protos.IonSecureCmaAllocateEndFtraceEvent} m IonSecureCmaAllocateEndFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IonSecureCmaAllocateEndFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.align = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.align = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.flags = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.flags = o.longs === String ? "0" : 0;
                    d.heapName = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                }
                if (m.align != null && m.hasOwnProperty("align")) {
                    if (typeof m.align === "number")
                        d.align = o.longs === String ? String(m.align) : m.align;
                    else
                        d.align = o.longs === String ? $util.Long.prototype.toString.call(m.align) : o.longs === Number ? new $util.LongBits(m.align.low >>> 0, m.align.high >>> 0).toNumber(true) : m.align;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (typeof m.flags === "number")
                        d.flags = o.longs === String ? String(m.flags) : m.flags;
                    else
                        d.flags = o.longs === String ? $util.Long.prototype.toString.call(m.flags) : o.longs === Number ? new $util.LongBits(m.flags.low >>> 0, m.flags.high >>> 0).toNumber(true) : m.flags;
                }
                if (m.heapName != null && m.hasOwnProperty("heapName")) {
                    d.heapName = m.heapName;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber(true) : m.len;
                }
                return d;
            };

            /**
             * Converts this IonSecureCmaAllocateEndFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IonSecureCmaAllocateEndFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IonSecureCmaAllocateEndFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IonSecureCmaAllocateEndFtraceEvent;
        })();

        protos.IonSecureCmaAllocateStartFtraceEvent = (function() {

            /**
             * Properties of an IonSecureCmaAllocateStartFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIonSecureCmaAllocateStartFtraceEvent
             * @property {number|null} [align] IonSecureCmaAllocateStartFtraceEvent align
             * @property {number|null} [flags] IonSecureCmaAllocateStartFtraceEvent flags
             * @property {string|null} [heapName] IonSecureCmaAllocateStartFtraceEvent heapName
             * @property {number|null} [len] IonSecureCmaAllocateStartFtraceEvent len
             */

            /**
             * Constructs a new IonSecureCmaAllocateStartFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IonSecureCmaAllocateStartFtraceEvent.
             * @implements IIonSecureCmaAllocateStartFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIonSecureCmaAllocateStartFtraceEvent=} [p] Properties to set
             */
            function IonSecureCmaAllocateStartFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IonSecureCmaAllocateStartFtraceEvent align.
             * @member {number} align
             * @memberof perfetto.protos.IonSecureCmaAllocateStartFtraceEvent
             * @instance
             */
            IonSecureCmaAllocateStartFtraceEvent.prototype.align = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IonSecureCmaAllocateStartFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.IonSecureCmaAllocateStartFtraceEvent
             * @instance
             */
            IonSecureCmaAllocateStartFtraceEvent.prototype.flags = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IonSecureCmaAllocateStartFtraceEvent heapName.
             * @member {string} heapName
             * @memberof perfetto.protos.IonSecureCmaAllocateStartFtraceEvent
             * @instance
             */
            IonSecureCmaAllocateStartFtraceEvent.prototype.heapName = "";

            /**
             * IonSecureCmaAllocateStartFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.IonSecureCmaAllocateStartFtraceEvent
             * @instance
             */
            IonSecureCmaAllocateStartFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new IonSecureCmaAllocateStartFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IonSecureCmaAllocateStartFtraceEvent
             * @static
             * @param {perfetto.protos.IIonSecureCmaAllocateStartFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IonSecureCmaAllocateStartFtraceEvent} IonSecureCmaAllocateStartFtraceEvent instance
             */
            IonSecureCmaAllocateStartFtraceEvent.create = function create(properties) {
                return new IonSecureCmaAllocateStartFtraceEvent(properties);
            };

            /**
             * Encodes the specified IonSecureCmaAllocateStartFtraceEvent message. Does not implicitly {@link perfetto.protos.IonSecureCmaAllocateStartFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IonSecureCmaAllocateStartFtraceEvent
             * @static
             * @param {perfetto.protos.IIonSecureCmaAllocateStartFtraceEvent} m IonSecureCmaAllocateStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonSecureCmaAllocateStartFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.align != null && Object.hasOwnProperty.call(m, "align"))
                    w.uint32(8).uint64(m.align);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(16).uint64(m.flags);
                if (m.heapName != null && Object.hasOwnProperty.call(m, "heapName"))
                    w.uint32(26).string(m.heapName);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(32).uint64(m.len);
                return w;
            };

            /**
             * Encodes the specified IonSecureCmaAllocateStartFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IonSecureCmaAllocateStartFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IonSecureCmaAllocateStartFtraceEvent
             * @static
             * @param {perfetto.protos.IIonSecureCmaAllocateStartFtraceEvent} message IonSecureCmaAllocateStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonSecureCmaAllocateStartFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IonSecureCmaAllocateStartFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IonSecureCmaAllocateStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IonSecureCmaAllocateStartFtraceEvent} IonSecureCmaAllocateStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonSecureCmaAllocateStartFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IonSecureCmaAllocateStartFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.align = r.uint64();
                        break;
                    case 2:
                        m.flags = r.uint64();
                        break;
                    case 3:
                        m.heapName = r.string();
                        break;
                    case 4:
                        m.len = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IonSecureCmaAllocateStartFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IonSecureCmaAllocateStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IonSecureCmaAllocateStartFtraceEvent} IonSecureCmaAllocateStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonSecureCmaAllocateStartFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IonSecureCmaAllocateStartFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IonSecureCmaAllocateStartFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IonSecureCmaAllocateStartFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.align != null && m.hasOwnProperty("align")) {
                    if (!$util.isInteger(m.align) && !(m.align && $util.isInteger(m.align.low) && $util.isInteger(m.align.high)))
                        return "align: integer|Long expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags) && !(m.flags && $util.isInteger(m.flags.low) && $util.isInteger(m.flags.high)))
                        return "flags: integer|Long expected";
                }
                if (m.heapName != null && m.hasOwnProperty("heapName")) {
                    if (!$util.isString(m.heapName))
                        return "heapName: string expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an IonSecureCmaAllocateStartFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IonSecureCmaAllocateStartFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IonSecureCmaAllocateStartFtraceEvent} IonSecureCmaAllocateStartFtraceEvent
             */
            IonSecureCmaAllocateStartFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IonSecureCmaAllocateStartFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IonSecureCmaAllocateStartFtraceEvent();
                if (d.align != null) {
                    if ($util.Long)
                        (m.align = $util.Long.fromValue(d.align)).unsigned = true;
                    else if (typeof d.align === "string")
                        m.align = parseInt(d.align, 10);
                    else if (typeof d.align === "number")
                        m.align = d.align;
                    else if (typeof d.align === "object")
                        m.align = new $util.LongBits(d.align.low >>> 0, d.align.high >>> 0).toNumber(true);
                }
                if (d.flags != null) {
                    if ($util.Long)
                        (m.flags = $util.Long.fromValue(d.flags)).unsigned = true;
                    else if (typeof d.flags === "string")
                        m.flags = parseInt(d.flags, 10);
                    else if (typeof d.flags === "number")
                        m.flags = d.flags;
                    else if (typeof d.flags === "object")
                        m.flags = new $util.LongBits(d.flags.low >>> 0, d.flags.high >>> 0).toNumber(true);
                }
                if (d.heapName != null) {
                    m.heapName = String(d.heapName);
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = true;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an IonSecureCmaAllocateStartFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IonSecureCmaAllocateStartFtraceEvent
             * @static
             * @param {perfetto.protos.IonSecureCmaAllocateStartFtraceEvent} m IonSecureCmaAllocateStartFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IonSecureCmaAllocateStartFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.align = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.align = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.flags = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.flags = o.longs === String ? "0" : 0;
                    d.heapName = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                }
                if (m.align != null && m.hasOwnProperty("align")) {
                    if (typeof m.align === "number")
                        d.align = o.longs === String ? String(m.align) : m.align;
                    else
                        d.align = o.longs === String ? $util.Long.prototype.toString.call(m.align) : o.longs === Number ? new $util.LongBits(m.align.low >>> 0, m.align.high >>> 0).toNumber(true) : m.align;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (typeof m.flags === "number")
                        d.flags = o.longs === String ? String(m.flags) : m.flags;
                    else
                        d.flags = o.longs === String ? $util.Long.prototype.toString.call(m.flags) : o.longs === Number ? new $util.LongBits(m.flags.low >>> 0, m.flags.high >>> 0).toNumber(true) : m.flags;
                }
                if (m.heapName != null && m.hasOwnProperty("heapName")) {
                    d.heapName = m.heapName;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber(true) : m.len;
                }
                return d;
            };

            /**
             * Converts this IonSecureCmaAllocateStartFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IonSecureCmaAllocateStartFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IonSecureCmaAllocateStartFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IonSecureCmaAllocateStartFtraceEvent;
        })();

        protos.IonSecureCmaShrinkPoolEndFtraceEvent = (function() {

            /**
             * Properties of an IonSecureCmaShrinkPoolEndFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIonSecureCmaShrinkPoolEndFtraceEvent
             * @property {number|null} [drainedSize] IonSecureCmaShrinkPoolEndFtraceEvent drainedSize
             * @property {number|null} [skippedSize] IonSecureCmaShrinkPoolEndFtraceEvent skippedSize
             */

            /**
             * Constructs a new IonSecureCmaShrinkPoolEndFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IonSecureCmaShrinkPoolEndFtraceEvent.
             * @implements IIonSecureCmaShrinkPoolEndFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIonSecureCmaShrinkPoolEndFtraceEvent=} [p] Properties to set
             */
            function IonSecureCmaShrinkPoolEndFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IonSecureCmaShrinkPoolEndFtraceEvent drainedSize.
             * @member {number} drainedSize
             * @memberof perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent
             * @instance
             */
            IonSecureCmaShrinkPoolEndFtraceEvent.prototype.drainedSize = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IonSecureCmaShrinkPoolEndFtraceEvent skippedSize.
             * @member {number} skippedSize
             * @memberof perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent
             * @instance
             */
            IonSecureCmaShrinkPoolEndFtraceEvent.prototype.skippedSize = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new IonSecureCmaShrinkPoolEndFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent
             * @static
             * @param {perfetto.protos.IIonSecureCmaShrinkPoolEndFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent} IonSecureCmaShrinkPoolEndFtraceEvent instance
             */
            IonSecureCmaShrinkPoolEndFtraceEvent.create = function create(properties) {
                return new IonSecureCmaShrinkPoolEndFtraceEvent(properties);
            };

            /**
             * Encodes the specified IonSecureCmaShrinkPoolEndFtraceEvent message. Does not implicitly {@link perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent
             * @static
             * @param {perfetto.protos.IIonSecureCmaShrinkPoolEndFtraceEvent} m IonSecureCmaShrinkPoolEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonSecureCmaShrinkPoolEndFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.drainedSize != null && Object.hasOwnProperty.call(m, "drainedSize"))
                    w.uint32(8).uint64(m.drainedSize);
                if (m.skippedSize != null && Object.hasOwnProperty.call(m, "skippedSize"))
                    w.uint32(16).uint64(m.skippedSize);
                return w;
            };

            /**
             * Encodes the specified IonSecureCmaShrinkPoolEndFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent
             * @static
             * @param {perfetto.protos.IIonSecureCmaShrinkPoolEndFtraceEvent} message IonSecureCmaShrinkPoolEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonSecureCmaShrinkPoolEndFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IonSecureCmaShrinkPoolEndFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent} IonSecureCmaShrinkPoolEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonSecureCmaShrinkPoolEndFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.drainedSize = r.uint64();
                        break;
                    case 2:
                        m.skippedSize = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IonSecureCmaShrinkPoolEndFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent} IonSecureCmaShrinkPoolEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonSecureCmaShrinkPoolEndFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IonSecureCmaShrinkPoolEndFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IonSecureCmaShrinkPoolEndFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.drainedSize != null && m.hasOwnProperty("drainedSize")) {
                    if (!$util.isInteger(m.drainedSize) && !(m.drainedSize && $util.isInteger(m.drainedSize.low) && $util.isInteger(m.drainedSize.high)))
                        return "drainedSize: integer|Long expected";
                }
                if (m.skippedSize != null && m.hasOwnProperty("skippedSize")) {
                    if (!$util.isInteger(m.skippedSize) && !(m.skippedSize && $util.isInteger(m.skippedSize.low) && $util.isInteger(m.skippedSize.high)))
                        return "skippedSize: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an IonSecureCmaShrinkPoolEndFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent} IonSecureCmaShrinkPoolEndFtraceEvent
             */
            IonSecureCmaShrinkPoolEndFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent();
                if (d.drainedSize != null) {
                    if ($util.Long)
                        (m.drainedSize = $util.Long.fromValue(d.drainedSize)).unsigned = true;
                    else if (typeof d.drainedSize === "string")
                        m.drainedSize = parseInt(d.drainedSize, 10);
                    else if (typeof d.drainedSize === "number")
                        m.drainedSize = d.drainedSize;
                    else if (typeof d.drainedSize === "object")
                        m.drainedSize = new $util.LongBits(d.drainedSize.low >>> 0, d.drainedSize.high >>> 0).toNumber(true);
                }
                if (d.skippedSize != null) {
                    if ($util.Long)
                        (m.skippedSize = $util.Long.fromValue(d.skippedSize)).unsigned = true;
                    else if (typeof d.skippedSize === "string")
                        m.skippedSize = parseInt(d.skippedSize, 10);
                    else if (typeof d.skippedSize === "number")
                        m.skippedSize = d.skippedSize;
                    else if (typeof d.skippedSize === "object")
                        m.skippedSize = new $util.LongBits(d.skippedSize.low >>> 0, d.skippedSize.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an IonSecureCmaShrinkPoolEndFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent
             * @static
             * @param {perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent} m IonSecureCmaShrinkPoolEndFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IonSecureCmaShrinkPoolEndFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.drainedSize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.drainedSize = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.skippedSize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.skippedSize = o.longs === String ? "0" : 0;
                }
                if (m.drainedSize != null && m.hasOwnProperty("drainedSize")) {
                    if (typeof m.drainedSize === "number")
                        d.drainedSize = o.longs === String ? String(m.drainedSize) : m.drainedSize;
                    else
                        d.drainedSize = o.longs === String ? $util.Long.prototype.toString.call(m.drainedSize) : o.longs === Number ? new $util.LongBits(m.drainedSize.low >>> 0, m.drainedSize.high >>> 0).toNumber(true) : m.drainedSize;
                }
                if (m.skippedSize != null && m.hasOwnProperty("skippedSize")) {
                    if (typeof m.skippedSize === "number")
                        d.skippedSize = o.longs === String ? String(m.skippedSize) : m.skippedSize;
                    else
                        d.skippedSize = o.longs === String ? $util.Long.prototype.toString.call(m.skippedSize) : o.longs === Number ? new $util.LongBits(m.skippedSize.low >>> 0, m.skippedSize.high >>> 0).toNumber(true) : m.skippedSize;
                }
                return d;
            };

            /**
             * Converts this IonSecureCmaShrinkPoolEndFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IonSecureCmaShrinkPoolEndFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IonSecureCmaShrinkPoolEndFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IonSecureCmaShrinkPoolEndFtraceEvent;
        })();

        protos.IonSecureCmaShrinkPoolStartFtraceEvent = (function() {

            /**
             * Properties of an IonSecureCmaShrinkPoolStartFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIonSecureCmaShrinkPoolStartFtraceEvent
             * @property {number|null} [drainedSize] IonSecureCmaShrinkPoolStartFtraceEvent drainedSize
             * @property {number|null} [skippedSize] IonSecureCmaShrinkPoolStartFtraceEvent skippedSize
             */

            /**
             * Constructs a new IonSecureCmaShrinkPoolStartFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IonSecureCmaShrinkPoolStartFtraceEvent.
             * @implements IIonSecureCmaShrinkPoolStartFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIonSecureCmaShrinkPoolStartFtraceEvent=} [p] Properties to set
             */
            function IonSecureCmaShrinkPoolStartFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IonSecureCmaShrinkPoolStartFtraceEvent drainedSize.
             * @member {number} drainedSize
             * @memberof perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent
             * @instance
             */
            IonSecureCmaShrinkPoolStartFtraceEvent.prototype.drainedSize = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IonSecureCmaShrinkPoolStartFtraceEvent skippedSize.
             * @member {number} skippedSize
             * @memberof perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent
             * @instance
             */
            IonSecureCmaShrinkPoolStartFtraceEvent.prototype.skippedSize = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new IonSecureCmaShrinkPoolStartFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent
             * @static
             * @param {perfetto.protos.IIonSecureCmaShrinkPoolStartFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent} IonSecureCmaShrinkPoolStartFtraceEvent instance
             */
            IonSecureCmaShrinkPoolStartFtraceEvent.create = function create(properties) {
                return new IonSecureCmaShrinkPoolStartFtraceEvent(properties);
            };

            /**
             * Encodes the specified IonSecureCmaShrinkPoolStartFtraceEvent message. Does not implicitly {@link perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent
             * @static
             * @param {perfetto.protos.IIonSecureCmaShrinkPoolStartFtraceEvent} m IonSecureCmaShrinkPoolStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonSecureCmaShrinkPoolStartFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.drainedSize != null && Object.hasOwnProperty.call(m, "drainedSize"))
                    w.uint32(8).uint64(m.drainedSize);
                if (m.skippedSize != null && Object.hasOwnProperty.call(m, "skippedSize"))
                    w.uint32(16).uint64(m.skippedSize);
                return w;
            };

            /**
             * Encodes the specified IonSecureCmaShrinkPoolStartFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent
             * @static
             * @param {perfetto.protos.IIonSecureCmaShrinkPoolStartFtraceEvent} message IonSecureCmaShrinkPoolStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonSecureCmaShrinkPoolStartFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IonSecureCmaShrinkPoolStartFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent} IonSecureCmaShrinkPoolStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonSecureCmaShrinkPoolStartFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.drainedSize = r.uint64();
                        break;
                    case 2:
                        m.skippedSize = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IonSecureCmaShrinkPoolStartFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent} IonSecureCmaShrinkPoolStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonSecureCmaShrinkPoolStartFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IonSecureCmaShrinkPoolStartFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IonSecureCmaShrinkPoolStartFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.drainedSize != null && m.hasOwnProperty("drainedSize")) {
                    if (!$util.isInteger(m.drainedSize) && !(m.drainedSize && $util.isInteger(m.drainedSize.low) && $util.isInteger(m.drainedSize.high)))
                        return "drainedSize: integer|Long expected";
                }
                if (m.skippedSize != null && m.hasOwnProperty("skippedSize")) {
                    if (!$util.isInteger(m.skippedSize) && !(m.skippedSize && $util.isInteger(m.skippedSize.low) && $util.isInteger(m.skippedSize.high)))
                        return "skippedSize: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an IonSecureCmaShrinkPoolStartFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent} IonSecureCmaShrinkPoolStartFtraceEvent
             */
            IonSecureCmaShrinkPoolStartFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent();
                if (d.drainedSize != null) {
                    if ($util.Long)
                        (m.drainedSize = $util.Long.fromValue(d.drainedSize)).unsigned = true;
                    else if (typeof d.drainedSize === "string")
                        m.drainedSize = parseInt(d.drainedSize, 10);
                    else if (typeof d.drainedSize === "number")
                        m.drainedSize = d.drainedSize;
                    else if (typeof d.drainedSize === "object")
                        m.drainedSize = new $util.LongBits(d.drainedSize.low >>> 0, d.drainedSize.high >>> 0).toNumber(true);
                }
                if (d.skippedSize != null) {
                    if ($util.Long)
                        (m.skippedSize = $util.Long.fromValue(d.skippedSize)).unsigned = true;
                    else if (typeof d.skippedSize === "string")
                        m.skippedSize = parseInt(d.skippedSize, 10);
                    else if (typeof d.skippedSize === "number")
                        m.skippedSize = d.skippedSize;
                    else if (typeof d.skippedSize === "object")
                        m.skippedSize = new $util.LongBits(d.skippedSize.low >>> 0, d.skippedSize.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an IonSecureCmaShrinkPoolStartFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent
             * @static
             * @param {perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent} m IonSecureCmaShrinkPoolStartFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IonSecureCmaShrinkPoolStartFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.drainedSize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.drainedSize = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.skippedSize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.skippedSize = o.longs === String ? "0" : 0;
                }
                if (m.drainedSize != null && m.hasOwnProperty("drainedSize")) {
                    if (typeof m.drainedSize === "number")
                        d.drainedSize = o.longs === String ? String(m.drainedSize) : m.drainedSize;
                    else
                        d.drainedSize = o.longs === String ? $util.Long.prototype.toString.call(m.drainedSize) : o.longs === Number ? new $util.LongBits(m.drainedSize.low >>> 0, m.drainedSize.high >>> 0).toNumber(true) : m.drainedSize;
                }
                if (m.skippedSize != null && m.hasOwnProperty("skippedSize")) {
                    if (typeof m.skippedSize === "number")
                        d.skippedSize = o.longs === String ? String(m.skippedSize) : m.skippedSize;
                    else
                        d.skippedSize = o.longs === String ? $util.Long.prototype.toString.call(m.skippedSize) : o.longs === Number ? new $util.LongBits(m.skippedSize.low >>> 0, m.skippedSize.high >>> 0).toNumber(true) : m.skippedSize;
                }
                return d;
            };

            /**
             * Converts this IonSecureCmaShrinkPoolStartFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IonSecureCmaShrinkPoolStartFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IonSecureCmaShrinkPoolStartFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IonSecureCmaShrinkPoolStartFtraceEvent;
        })();

        protos.KfreeFtraceEvent = (function() {

            /**
             * Properties of a KfreeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKfreeFtraceEvent
             * @property {number|null} [callSite] KfreeFtraceEvent callSite
             * @property {number|null} [ptr] KfreeFtraceEvent ptr
             */

            /**
             * Constructs a new KfreeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KfreeFtraceEvent.
             * @implements IKfreeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKfreeFtraceEvent=} [p] Properties to set
             */
            function KfreeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KfreeFtraceEvent callSite.
             * @member {number} callSite
             * @memberof perfetto.protos.KfreeFtraceEvent
             * @instance
             */
            KfreeFtraceEvent.prototype.callSite = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KfreeFtraceEvent ptr.
             * @member {number} ptr
             * @memberof perfetto.protos.KfreeFtraceEvent
             * @instance
             */
            KfreeFtraceEvent.prototype.ptr = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KfreeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KfreeFtraceEvent
             * @static
             * @param {perfetto.protos.IKfreeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KfreeFtraceEvent} KfreeFtraceEvent instance
             */
            KfreeFtraceEvent.create = function create(properties) {
                return new KfreeFtraceEvent(properties);
            };

            /**
             * Encodes the specified KfreeFtraceEvent message. Does not implicitly {@link perfetto.protos.KfreeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KfreeFtraceEvent
             * @static
             * @param {perfetto.protos.IKfreeFtraceEvent} m KfreeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KfreeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.callSite != null && Object.hasOwnProperty.call(m, "callSite"))
                    w.uint32(8).uint64(m.callSite);
                if (m.ptr != null && Object.hasOwnProperty.call(m, "ptr"))
                    w.uint32(16).uint64(m.ptr);
                return w;
            };

            /**
             * Encodes the specified KfreeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KfreeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KfreeFtraceEvent
             * @static
             * @param {perfetto.protos.IKfreeFtraceEvent} message KfreeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KfreeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KfreeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KfreeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KfreeFtraceEvent} KfreeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KfreeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KfreeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.callSite = r.uint64();
                        break;
                    case 2:
                        m.ptr = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KfreeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KfreeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KfreeFtraceEvent} KfreeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KfreeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KfreeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KfreeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KfreeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.callSite != null && m.hasOwnProperty("callSite")) {
                    if (!$util.isInteger(m.callSite) && !(m.callSite && $util.isInteger(m.callSite.low) && $util.isInteger(m.callSite.high)))
                        return "callSite: integer|Long expected";
                }
                if (m.ptr != null && m.hasOwnProperty("ptr")) {
                    if (!$util.isInteger(m.ptr) && !(m.ptr && $util.isInteger(m.ptr.low) && $util.isInteger(m.ptr.high)))
                        return "ptr: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KfreeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KfreeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KfreeFtraceEvent} KfreeFtraceEvent
             */
            KfreeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KfreeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KfreeFtraceEvent();
                if (d.callSite != null) {
                    if ($util.Long)
                        (m.callSite = $util.Long.fromValue(d.callSite)).unsigned = true;
                    else if (typeof d.callSite === "string")
                        m.callSite = parseInt(d.callSite, 10);
                    else if (typeof d.callSite === "number")
                        m.callSite = d.callSite;
                    else if (typeof d.callSite === "object")
                        m.callSite = new $util.LongBits(d.callSite.low >>> 0, d.callSite.high >>> 0).toNumber(true);
                }
                if (d.ptr != null) {
                    if ($util.Long)
                        (m.ptr = $util.Long.fromValue(d.ptr)).unsigned = true;
                    else if (typeof d.ptr === "string")
                        m.ptr = parseInt(d.ptr, 10);
                    else if (typeof d.ptr === "number")
                        m.ptr = d.ptr;
                    else if (typeof d.ptr === "object")
                        m.ptr = new $util.LongBits(d.ptr.low >>> 0, d.ptr.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KfreeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KfreeFtraceEvent
             * @static
             * @param {perfetto.protos.KfreeFtraceEvent} m KfreeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KfreeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.callSite = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.callSite = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ptr = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ptr = o.longs === String ? "0" : 0;
                }
                if (m.callSite != null && m.hasOwnProperty("callSite")) {
                    if (typeof m.callSite === "number")
                        d.callSite = o.longs === String ? String(m.callSite) : m.callSite;
                    else
                        d.callSite = o.longs === String ? $util.Long.prototype.toString.call(m.callSite) : o.longs === Number ? new $util.LongBits(m.callSite.low >>> 0, m.callSite.high >>> 0).toNumber(true) : m.callSite;
                }
                if (m.ptr != null && m.hasOwnProperty("ptr")) {
                    if (typeof m.ptr === "number")
                        d.ptr = o.longs === String ? String(m.ptr) : m.ptr;
                    else
                        d.ptr = o.longs === String ? $util.Long.prototype.toString.call(m.ptr) : o.longs === Number ? new $util.LongBits(m.ptr.low >>> 0, m.ptr.high >>> 0).toNumber(true) : m.ptr;
                }
                return d;
            };

            /**
             * Converts this KfreeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KfreeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KfreeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KfreeFtraceEvent;
        })();

        protos.KmallocFtraceEvent = (function() {

            /**
             * Properties of a KmallocFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKmallocFtraceEvent
             * @property {number|null} [bytesAlloc] KmallocFtraceEvent bytesAlloc
             * @property {number|null} [bytesReq] KmallocFtraceEvent bytesReq
             * @property {number|null} [callSite] KmallocFtraceEvent callSite
             * @property {number|null} [gfpFlags] KmallocFtraceEvent gfpFlags
             * @property {number|null} [ptr] KmallocFtraceEvent ptr
             */

            /**
             * Constructs a new KmallocFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KmallocFtraceEvent.
             * @implements IKmallocFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKmallocFtraceEvent=} [p] Properties to set
             */
            function KmallocFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KmallocFtraceEvent bytesAlloc.
             * @member {number} bytesAlloc
             * @memberof perfetto.protos.KmallocFtraceEvent
             * @instance
             */
            KmallocFtraceEvent.prototype.bytesAlloc = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KmallocFtraceEvent bytesReq.
             * @member {number} bytesReq
             * @memberof perfetto.protos.KmallocFtraceEvent
             * @instance
             */
            KmallocFtraceEvent.prototype.bytesReq = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KmallocFtraceEvent callSite.
             * @member {number} callSite
             * @memberof perfetto.protos.KmallocFtraceEvent
             * @instance
             */
            KmallocFtraceEvent.prototype.callSite = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KmallocFtraceEvent gfpFlags.
             * @member {number} gfpFlags
             * @memberof perfetto.protos.KmallocFtraceEvent
             * @instance
             */
            KmallocFtraceEvent.prototype.gfpFlags = 0;

            /**
             * KmallocFtraceEvent ptr.
             * @member {number} ptr
             * @memberof perfetto.protos.KmallocFtraceEvent
             * @instance
             */
            KmallocFtraceEvent.prototype.ptr = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KmallocFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KmallocFtraceEvent
             * @static
             * @param {perfetto.protos.IKmallocFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KmallocFtraceEvent} KmallocFtraceEvent instance
             */
            KmallocFtraceEvent.create = function create(properties) {
                return new KmallocFtraceEvent(properties);
            };

            /**
             * Encodes the specified KmallocFtraceEvent message. Does not implicitly {@link perfetto.protos.KmallocFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KmallocFtraceEvent
             * @static
             * @param {perfetto.protos.IKmallocFtraceEvent} m KmallocFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KmallocFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.bytesAlloc != null && Object.hasOwnProperty.call(m, "bytesAlloc"))
                    w.uint32(8).uint64(m.bytesAlloc);
                if (m.bytesReq != null && Object.hasOwnProperty.call(m, "bytesReq"))
                    w.uint32(16).uint64(m.bytesReq);
                if (m.callSite != null && Object.hasOwnProperty.call(m, "callSite"))
                    w.uint32(24).uint64(m.callSite);
                if (m.gfpFlags != null && Object.hasOwnProperty.call(m, "gfpFlags"))
                    w.uint32(32).uint32(m.gfpFlags);
                if (m.ptr != null && Object.hasOwnProperty.call(m, "ptr"))
                    w.uint32(40).uint64(m.ptr);
                return w;
            };

            /**
             * Encodes the specified KmallocFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KmallocFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KmallocFtraceEvent
             * @static
             * @param {perfetto.protos.IKmallocFtraceEvent} message KmallocFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KmallocFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KmallocFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KmallocFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KmallocFtraceEvent} KmallocFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KmallocFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KmallocFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.bytesAlloc = r.uint64();
                        break;
                    case 2:
                        m.bytesReq = r.uint64();
                        break;
                    case 3:
                        m.callSite = r.uint64();
                        break;
                    case 4:
                        m.gfpFlags = r.uint32();
                        break;
                    case 5:
                        m.ptr = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KmallocFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KmallocFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KmallocFtraceEvent} KmallocFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KmallocFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KmallocFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KmallocFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KmallocFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.bytesAlloc != null && m.hasOwnProperty("bytesAlloc")) {
                    if (!$util.isInteger(m.bytesAlloc) && !(m.bytesAlloc && $util.isInteger(m.bytesAlloc.low) && $util.isInteger(m.bytesAlloc.high)))
                        return "bytesAlloc: integer|Long expected";
                }
                if (m.bytesReq != null && m.hasOwnProperty("bytesReq")) {
                    if (!$util.isInteger(m.bytesReq) && !(m.bytesReq && $util.isInteger(m.bytesReq.low) && $util.isInteger(m.bytesReq.high)))
                        return "bytesReq: integer|Long expected";
                }
                if (m.callSite != null && m.hasOwnProperty("callSite")) {
                    if (!$util.isInteger(m.callSite) && !(m.callSite && $util.isInteger(m.callSite.low) && $util.isInteger(m.callSite.high)))
                        return "callSite: integer|Long expected";
                }
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    if (!$util.isInteger(m.gfpFlags))
                        return "gfpFlags: integer expected";
                }
                if (m.ptr != null && m.hasOwnProperty("ptr")) {
                    if (!$util.isInteger(m.ptr) && !(m.ptr && $util.isInteger(m.ptr.low) && $util.isInteger(m.ptr.high)))
                        return "ptr: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KmallocFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KmallocFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KmallocFtraceEvent} KmallocFtraceEvent
             */
            KmallocFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KmallocFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KmallocFtraceEvent();
                if (d.bytesAlloc != null) {
                    if ($util.Long)
                        (m.bytesAlloc = $util.Long.fromValue(d.bytesAlloc)).unsigned = true;
                    else if (typeof d.bytesAlloc === "string")
                        m.bytesAlloc = parseInt(d.bytesAlloc, 10);
                    else if (typeof d.bytesAlloc === "number")
                        m.bytesAlloc = d.bytesAlloc;
                    else if (typeof d.bytesAlloc === "object")
                        m.bytesAlloc = new $util.LongBits(d.bytesAlloc.low >>> 0, d.bytesAlloc.high >>> 0).toNumber(true);
                }
                if (d.bytesReq != null) {
                    if ($util.Long)
                        (m.bytesReq = $util.Long.fromValue(d.bytesReq)).unsigned = true;
                    else if (typeof d.bytesReq === "string")
                        m.bytesReq = parseInt(d.bytesReq, 10);
                    else if (typeof d.bytesReq === "number")
                        m.bytesReq = d.bytesReq;
                    else if (typeof d.bytesReq === "object")
                        m.bytesReq = new $util.LongBits(d.bytesReq.low >>> 0, d.bytesReq.high >>> 0).toNumber(true);
                }
                if (d.callSite != null) {
                    if ($util.Long)
                        (m.callSite = $util.Long.fromValue(d.callSite)).unsigned = true;
                    else if (typeof d.callSite === "string")
                        m.callSite = parseInt(d.callSite, 10);
                    else if (typeof d.callSite === "number")
                        m.callSite = d.callSite;
                    else if (typeof d.callSite === "object")
                        m.callSite = new $util.LongBits(d.callSite.low >>> 0, d.callSite.high >>> 0).toNumber(true);
                }
                if (d.gfpFlags != null) {
                    m.gfpFlags = d.gfpFlags >>> 0;
                }
                if (d.ptr != null) {
                    if ($util.Long)
                        (m.ptr = $util.Long.fromValue(d.ptr)).unsigned = true;
                    else if (typeof d.ptr === "string")
                        m.ptr = parseInt(d.ptr, 10);
                    else if (typeof d.ptr === "number")
                        m.ptr = d.ptr;
                    else if (typeof d.ptr === "object")
                        m.ptr = new $util.LongBits(d.ptr.low >>> 0, d.ptr.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KmallocFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KmallocFtraceEvent
             * @static
             * @param {perfetto.protos.KmallocFtraceEvent} m KmallocFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KmallocFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.bytesAlloc = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.bytesAlloc = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.bytesReq = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.bytesReq = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.callSite = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.callSite = o.longs === String ? "0" : 0;
                    d.gfpFlags = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ptr = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ptr = o.longs === String ? "0" : 0;
                }
                if (m.bytesAlloc != null && m.hasOwnProperty("bytesAlloc")) {
                    if (typeof m.bytesAlloc === "number")
                        d.bytesAlloc = o.longs === String ? String(m.bytesAlloc) : m.bytesAlloc;
                    else
                        d.bytesAlloc = o.longs === String ? $util.Long.prototype.toString.call(m.bytesAlloc) : o.longs === Number ? new $util.LongBits(m.bytesAlloc.low >>> 0, m.bytesAlloc.high >>> 0).toNumber(true) : m.bytesAlloc;
                }
                if (m.bytesReq != null && m.hasOwnProperty("bytesReq")) {
                    if (typeof m.bytesReq === "number")
                        d.bytesReq = o.longs === String ? String(m.bytesReq) : m.bytesReq;
                    else
                        d.bytesReq = o.longs === String ? $util.Long.prototype.toString.call(m.bytesReq) : o.longs === Number ? new $util.LongBits(m.bytesReq.low >>> 0, m.bytesReq.high >>> 0).toNumber(true) : m.bytesReq;
                }
                if (m.callSite != null && m.hasOwnProperty("callSite")) {
                    if (typeof m.callSite === "number")
                        d.callSite = o.longs === String ? String(m.callSite) : m.callSite;
                    else
                        d.callSite = o.longs === String ? $util.Long.prototype.toString.call(m.callSite) : o.longs === Number ? new $util.LongBits(m.callSite.low >>> 0, m.callSite.high >>> 0).toNumber(true) : m.callSite;
                }
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    d.gfpFlags = m.gfpFlags;
                }
                if (m.ptr != null && m.hasOwnProperty("ptr")) {
                    if (typeof m.ptr === "number")
                        d.ptr = o.longs === String ? String(m.ptr) : m.ptr;
                    else
                        d.ptr = o.longs === String ? $util.Long.prototype.toString.call(m.ptr) : o.longs === Number ? new $util.LongBits(m.ptr.low >>> 0, m.ptr.high >>> 0).toNumber(true) : m.ptr;
                }
                return d;
            };

            /**
             * Converts this KmallocFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KmallocFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KmallocFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KmallocFtraceEvent;
        })();

        protos.KmallocNodeFtraceEvent = (function() {

            /**
             * Properties of a KmallocNodeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKmallocNodeFtraceEvent
             * @property {number|null} [bytesAlloc] KmallocNodeFtraceEvent bytesAlloc
             * @property {number|null} [bytesReq] KmallocNodeFtraceEvent bytesReq
             * @property {number|null} [callSite] KmallocNodeFtraceEvent callSite
             * @property {number|null} [gfpFlags] KmallocNodeFtraceEvent gfpFlags
             * @property {number|null} [node] KmallocNodeFtraceEvent node
             * @property {number|null} [ptr] KmallocNodeFtraceEvent ptr
             */

            /**
             * Constructs a new KmallocNodeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KmallocNodeFtraceEvent.
             * @implements IKmallocNodeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKmallocNodeFtraceEvent=} [p] Properties to set
             */
            function KmallocNodeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KmallocNodeFtraceEvent bytesAlloc.
             * @member {number} bytesAlloc
             * @memberof perfetto.protos.KmallocNodeFtraceEvent
             * @instance
             */
            KmallocNodeFtraceEvent.prototype.bytesAlloc = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KmallocNodeFtraceEvent bytesReq.
             * @member {number} bytesReq
             * @memberof perfetto.protos.KmallocNodeFtraceEvent
             * @instance
             */
            KmallocNodeFtraceEvent.prototype.bytesReq = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KmallocNodeFtraceEvent callSite.
             * @member {number} callSite
             * @memberof perfetto.protos.KmallocNodeFtraceEvent
             * @instance
             */
            KmallocNodeFtraceEvent.prototype.callSite = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KmallocNodeFtraceEvent gfpFlags.
             * @member {number} gfpFlags
             * @memberof perfetto.protos.KmallocNodeFtraceEvent
             * @instance
             */
            KmallocNodeFtraceEvent.prototype.gfpFlags = 0;

            /**
             * KmallocNodeFtraceEvent node.
             * @member {number} node
             * @memberof perfetto.protos.KmallocNodeFtraceEvent
             * @instance
             */
            KmallocNodeFtraceEvent.prototype.node = 0;

            /**
             * KmallocNodeFtraceEvent ptr.
             * @member {number} ptr
             * @memberof perfetto.protos.KmallocNodeFtraceEvent
             * @instance
             */
            KmallocNodeFtraceEvent.prototype.ptr = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KmallocNodeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KmallocNodeFtraceEvent
             * @static
             * @param {perfetto.protos.IKmallocNodeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KmallocNodeFtraceEvent} KmallocNodeFtraceEvent instance
             */
            KmallocNodeFtraceEvent.create = function create(properties) {
                return new KmallocNodeFtraceEvent(properties);
            };

            /**
             * Encodes the specified KmallocNodeFtraceEvent message. Does not implicitly {@link perfetto.protos.KmallocNodeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KmallocNodeFtraceEvent
             * @static
             * @param {perfetto.protos.IKmallocNodeFtraceEvent} m KmallocNodeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KmallocNodeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.bytesAlloc != null && Object.hasOwnProperty.call(m, "bytesAlloc"))
                    w.uint32(8).uint64(m.bytesAlloc);
                if (m.bytesReq != null && Object.hasOwnProperty.call(m, "bytesReq"))
                    w.uint32(16).uint64(m.bytesReq);
                if (m.callSite != null && Object.hasOwnProperty.call(m, "callSite"))
                    w.uint32(24).uint64(m.callSite);
                if (m.gfpFlags != null && Object.hasOwnProperty.call(m, "gfpFlags"))
                    w.uint32(32).uint32(m.gfpFlags);
                if (m.node != null && Object.hasOwnProperty.call(m, "node"))
                    w.uint32(40).int32(m.node);
                if (m.ptr != null && Object.hasOwnProperty.call(m, "ptr"))
                    w.uint32(48).uint64(m.ptr);
                return w;
            };

            /**
             * Encodes the specified KmallocNodeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KmallocNodeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KmallocNodeFtraceEvent
             * @static
             * @param {perfetto.protos.IKmallocNodeFtraceEvent} message KmallocNodeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KmallocNodeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KmallocNodeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KmallocNodeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KmallocNodeFtraceEvent} KmallocNodeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KmallocNodeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KmallocNodeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.bytesAlloc = r.uint64();
                        break;
                    case 2:
                        m.bytesReq = r.uint64();
                        break;
                    case 3:
                        m.callSite = r.uint64();
                        break;
                    case 4:
                        m.gfpFlags = r.uint32();
                        break;
                    case 5:
                        m.node = r.int32();
                        break;
                    case 6:
                        m.ptr = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KmallocNodeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KmallocNodeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KmallocNodeFtraceEvent} KmallocNodeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KmallocNodeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KmallocNodeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KmallocNodeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KmallocNodeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.bytesAlloc != null && m.hasOwnProperty("bytesAlloc")) {
                    if (!$util.isInteger(m.bytesAlloc) && !(m.bytesAlloc && $util.isInteger(m.bytesAlloc.low) && $util.isInteger(m.bytesAlloc.high)))
                        return "bytesAlloc: integer|Long expected";
                }
                if (m.bytesReq != null && m.hasOwnProperty("bytesReq")) {
                    if (!$util.isInteger(m.bytesReq) && !(m.bytesReq && $util.isInteger(m.bytesReq.low) && $util.isInteger(m.bytesReq.high)))
                        return "bytesReq: integer|Long expected";
                }
                if (m.callSite != null && m.hasOwnProperty("callSite")) {
                    if (!$util.isInteger(m.callSite) && !(m.callSite && $util.isInteger(m.callSite.low) && $util.isInteger(m.callSite.high)))
                        return "callSite: integer|Long expected";
                }
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    if (!$util.isInteger(m.gfpFlags))
                        return "gfpFlags: integer expected";
                }
                if (m.node != null && m.hasOwnProperty("node")) {
                    if (!$util.isInteger(m.node))
                        return "node: integer expected";
                }
                if (m.ptr != null && m.hasOwnProperty("ptr")) {
                    if (!$util.isInteger(m.ptr) && !(m.ptr && $util.isInteger(m.ptr.low) && $util.isInteger(m.ptr.high)))
                        return "ptr: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KmallocNodeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KmallocNodeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KmallocNodeFtraceEvent} KmallocNodeFtraceEvent
             */
            KmallocNodeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KmallocNodeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KmallocNodeFtraceEvent();
                if (d.bytesAlloc != null) {
                    if ($util.Long)
                        (m.bytesAlloc = $util.Long.fromValue(d.bytesAlloc)).unsigned = true;
                    else if (typeof d.bytesAlloc === "string")
                        m.bytesAlloc = parseInt(d.bytesAlloc, 10);
                    else if (typeof d.bytesAlloc === "number")
                        m.bytesAlloc = d.bytesAlloc;
                    else if (typeof d.bytesAlloc === "object")
                        m.bytesAlloc = new $util.LongBits(d.bytesAlloc.low >>> 0, d.bytesAlloc.high >>> 0).toNumber(true);
                }
                if (d.bytesReq != null) {
                    if ($util.Long)
                        (m.bytesReq = $util.Long.fromValue(d.bytesReq)).unsigned = true;
                    else if (typeof d.bytesReq === "string")
                        m.bytesReq = parseInt(d.bytesReq, 10);
                    else if (typeof d.bytesReq === "number")
                        m.bytesReq = d.bytesReq;
                    else if (typeof d.bytesReq === "object")
                        m.bytesReq = new $util.LongBits(d.bytesReq.low >>> 0, d.bytesReq.high >>> 0).toNumber(true);
                }
                if (d.callSite != null) {
                    if ($util.Long)
                        (m.callSite = $util.Long.fromValue(d.callSite)).unsigned = true;
                    else if (typeof d.callSite === "string")
                        m.callSite = parseInt(d.callSite, 10);
                    else if (typeof d.callSite === "number")
                        m.callSite = d.callSite;
                    else if (typeof d.callSite === "object")
                        m.callSite = new $util.LongBits(d.callSite.low >>> 0, d.callSite.high >>> 0).toNumber(true);
                }
                if (d.gfpFlags != null) {
                    m.gfpFlags = d.gfpFlags >>> 0;
                }
                if (d.node != null) {
                    m.node = d.node | 0;
                }
                if (d.ptr != null) {
                    if ($util.Long)
                        (m.ptr = $util.Long.fromValue(d.ptr)).unsigned = true;
                    else if (typeof d.ptr === "string")
                        m.ptr = parseInt(d.ptr, 10);
                    else if (typeof d.ptr === "number")
                        m.ptr = d.ptr;
                    else if (typeof d.ptr === "object")
                        m.ptr = new $util.LongBits(d.ptr.low >>> 0, d.ptr.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KmallocNodeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KmallocNodeFtraceEvent
             * @static
             * @param {perfetto.protos.KmallocNodeFtraceEvent} m KmallocNodeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KmallocNodeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.bytesAlloc = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.bytesAlloc = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.bytesReq = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.bytesReq = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.callSite = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.callSite = o.longs === String ? "0" : 0;
                    d.gfpFlags = 0;
                    d.node = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ptr = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ptr = o.longs === String ? "0" : 0;
                }
                if (m.bytesAlloc != null && m.hasOwnProperty("bytesAlloc")) {
                    if (typeof m.bytesAlloc === "number")
                        d.bytesAlloc = o.longs === String ? String(m.bytesAlloc) : m.bytesAlloc;
                    else
                        d.bytesAlloc = o.longs === String ? $util.Long.prototype.toString.call(m.bytesAlloc) : o.longs === Number ? new $util.LongBits(m.bytesAlloc.low >>> 0, m.bytesAlloc.high >>> 0).toNumber(true) : m.bytesAlloc;
                }
                if (m.bytesReq != null && m.hasOwnProperty("bytesReq")) {
                    if (typeof m.bytesReq === "number")
                        d.bytesReq = o.longs === String ? String(m.bytesReq) : m.bytesReq;
                    else
                        d.bytesReq = o.longs === String ? $util.Long.prototype.toString.call(m.bytesReq) : o.longs === Number ? new $util.LongBits(m.bytesReq.low >>> 0, m.bytesReq.high >>> 0).toNumber(true) : m.bytesReq;
                }
                if (m.callSite != null && m.hasOwnProperty("callSite")) {
                    if (typeof m.callSite === "number")
                        d.callSite = o.longs === String ? String(m.callSite) : m.callSite;
                    else
                        d.callSite = o.longs === String ? $util.Long.prototype.toString.call(m.callSite) : o.longs === Number ? new $util.LongBits(m.callSite.low >>> 0, m.callSite.high >>> 0).toNumber(true) : m.callSite;
                }
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    d.gfpFlags = m.gfpFlags;
                }
                if (m.node != null && m.hasOwnProperty("node")) {
                    d.node = m.node;
                }
                if (m.ptr != null && m.hasOwnProperty("ptr")) {
                    if (typeof m.ptr === "number")
                        d.ptr = o.longs === String ? String(m.ptr) : m.ptr;
                    else
                        d.ptr = o.longs === String ? $util.Long.prototype.toString.call(m.ptr) : o.longs === Number ? new $util.LongBits(m.ptr.low >>> 0, m.ptr.high >>> 0).toNumber(true) : m.ptr;
                }
                return d;
            };

            /**
             * Converts this KmallocNodeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KmallocNodeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KmallocNodeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KmallocNodeFtraceEvent;
        })();

        protos.KmemCacheAllocFtraceEvent = (function() {

            /**
             * Properties of a KmemCacheAllocFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKmemCacheAllocFtraceEvent
             * @property {number|null} [bytesAlloc] KmemCacheAllocFtraceEvent bytesAlloc
             * @property {number|null} [bytesReq] KmemCacheAllocFtraceEvent bytesReq
             * @property {number|null} [callSite] KmemCacheAllocFtraceEvent callSite
             * @property {number|null} [gfpFlags] KmemCacheAllocFtraceEvent gfpFlags
             * @property {number|null} [ptr] KmemCacheAllocFtraceEvent ptr
             */

            /**
             * Constructs a new KmemCacheAllocFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KmemCacheAllocFtraceEvent.
             * @implements IKmemCacheAllocFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKmemCacheAllocFtraceEvent=} [p] Properties to set
             */
            function KmemCacheAllocFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KmemCacheAllocFtraceEvent bytesAlloc.
             * @member {number} bytesAlloc
             * @memberof perfetto.protos.KmemCacheAllocFtraceEvent
             * @instance
             */
            KmemCacheAllocFtraceEvent.prototype.bytesAlloc = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KmemCacheAllocFtraceEvent bytesReq.
             * @member {number} bytesReq
             * @memberof perfetto.protos.KmemCacheAllocFtraceEvent
             * @instance
             */
            KmemCacheAllocFtraceEvent.prototype.bytesReq = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KmemCacheAllocFtraceEvent callSite.
             * @member {number} callSite
             * @memberof perfetto.protos.KmemCacheAllocFtraceEvent
             * @instance
             */
            KmemCacheAllocFtraceEvent.prototype.callSite = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KmemCacheAllocFtraceEvent gfpFlags.
             * @member {number} gfpFlags
             * @memberof perfetto.protos.KmemCacheAllocFtraceEvent
             * @instance
             */
            KmemCacheAllocFtraceEvent.prototype.gfpFlags = 0;

            /**
             * KmemCacheAllocFtraceEvent ptr.
             * @member {number} ptr
             * @memberof perfetto.protos.KmemCacheAllocFtraceEvent
             * @instance
             */
            KmemCacheAllocFtraceEvent.prototype.ptr = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KmemCacheAllocFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KmemCacheAllocFtraceEvent
             * @static
             * @param {perfetto.protos.IKmemCacheAllocFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KmemCacheAllocFtraceEvent} KmemCacheAllocFtraceEvent instance
             */
            KmemCacheAllocFtraceEvent.create = function create(properties) {
                return new KmemCacheAllocFtraceEvent(properties);
            };

            /**
             * Encodes the specified KmemCacheAllocFtraceEvent message. Does not implicitly {@link perfetto.protos.KmemCacheAllocFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KmemCacheAllocFtraceEvent
             * @static
             * @param {perfetto.protos.IKmemCacheAllocFtraceEvent} m KmemCacheAllocFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KmemCacheAllocFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.bytesAlloc != null && Object.hasOwnProperty.call(m, "bytesAlloc"))
                    w.uint32(8).uint64(m.bytesAlloc);
                if (m.bytesReq != null && Object.hasOwnProperty.call(m, "bytesReq"))
                    w.uint32(16).uint64(m.bytesReq);
                if (m.callSite != null && Object.hasOwnProperty.call(m, "callSite"))
                    w.uint32(24).uint64(m.callSite);
                if (m.gfpFlags != null && Object.hasOwnProperty.call(m, "gfpFlags"))
                    w.uint32(32).uint32(m.gfpFlags);
                if (m.ptr != null && Object.hasOwnProperty.call(m, "ptr"))
                    w.uint32(40).uint64(m.ptr);
                return w;
            };

            /**
             * Encodes the specified KmemCacheAllocFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KmemCacheAllocFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KmemCacheAllocFtraceEvent
             * @static
             * @param {perfetto.protos.IKmemCacheAllocFtraceEvent} message KmemCacheAllocFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KmemCacheAllocFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KmemCacheAllocFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KmemCacheAllocFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KmemCacheAllocFtraceEvent} KmemCacheAllocFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KmemCacheAllocFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KmemCacheAllocFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.bytesAlloc = r.uint64();
                        break;
                    case 2:
                        m.bytesReq = r.uint64();
                        break;
                    case 3:
                        m.callSite = r.uint64();
                        break;
                    case 4:
                        m.gfpFlags = r.uint32();
                        break;
                    case 5:
                        m.ptr = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KmemCacheAllocFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KmemCacheAllocFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KmemCacheAllocFtraceEvent} KmemCacheAllocFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KmemCacheAllocFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KmemCacheAllocFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KmemCacheAllocFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KmemCacheAllocFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.bytesAlloc != null && m.hasOwnProperty("bytesAlloc")) {
                    if (!$util.isInteger(m.bytesAlloc) && !(m.bytesAlloc && $util.isInteger(m.bytesAlloc.low) && $util.isInteger(m.bytesAlloc.high)))
                        return "bytesAlloc: integer|Long expected";
                }
                if (m.bytesReq != null && m.hasOwnProperty("bytesReq")) {
                    if (!$util.isInteger(m.bytesReq) && !(m.bytesReq && $util.isInteger(m.bytesReq.low) && $util.isInteger(m.bytesReq.high)))
                        return "bytesReq: integer|Long expected";
                }
                if (m.callSite != null && m.hasOwnProperty("callSite")) {
                    if (!$util.isInteger(m.callSite) && !(m.callSite && $util.isInteger(m.callSite.low) && $util.isInteger(m.callSite.high)))
                        return "callSite: integer|Long expected";
                }
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    if (!$util.isInteger(m.gfpFlags))
                        return "gfpFlags: integer expected";
                }
                if (m.ptr != null && m.hasOwnProperty("ptr")) {
                    if (!$util.isInteger(m.ptr) && !(m.ptr && $util.isInteger(m.ptr.low) && $util.isInteger(m.ptr.high)))
                        return "ptr: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KmemCacheAllocFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KmemCacheAllocFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KmemCacheAllocFtraceEvent} KmemCacheAllocFtraceEvent
             */
            KmemCacheAllocFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KmemCacheAllocFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KmemCacheAllocFtraceEvent();
                if (d.bytesAlloc != null) {
                    if ($util.Long)
                        (m.bytesAlloc = $util.Long.fromValue(d.bytesAlloc)).unsigned = true;
                    else if (typeof d.bytesAlloc === "string")
                        m.bytesAlloc = parseInt(d.bytesAlloc, 10);
                    else if (typeof d.bytesAlloc === "number")
                        m.bytesAlloc = d.bytesAlloc;
                    else if (typeof d.bytesAlloc === "object")
                        m.bytesAlloc = new $util.LongBits(d.bytesAlloc.low >>> 0, d.bytesAlloc.high >>> 0).toNumber(true);
                }
                if (d.bytesReq != null) {
                    if ($util.Long)
                        (m.bytesReq = $util.Long.fromValue(d.bytesReq)).unsigned = true;
                    else if (typeof d.bytesReq === "string")
                        m.bytesReq = parseInt(d.bytesReq, 10);
                    else if (typeof d.bytesReq === "number")
                        m.bytesReq = d.bytesReq;
                    else if (typeof d.bytesReq === "object")
                        m.bytesReq = new $util.LongBits(d.bytesReq.low >>> 0, d.bytesReq.high >>> 0).toNumber(true);
                }
                if (d.callSite != null) {
                    if ($util.Long)
                        (m.callSite = $util.Long.fromValue(d.callSite)).unsigned = true;
                    else if (typeof d.callSite === "string")
                        m.callSite = parseInt(d.callSite, 10);
                    else if (typeof d.callSite === "number")
                        m.callSite = d.callSite;
                    else if (typeof d.callSite === "object")
                        m.callSite = new $util.LongBits(d.callSite.low >>> 0, d.callSite.high >>> 0).toNumber(true);
                }
                if (d.gfpFlags != null) {
                    m.gfpFlags = d.gfpFlags >>> 0;
                }
                if (d.ptr != null) {
                    if ($util.Long)
                        (m.ptr = $util.Long.fromValue(d.ptr)).unsigned = true;
                    else if (typeof d.ptr === "string")
                        m.ptr = parseInt(d.ptr, 10);
                    else if (typeof d.ptr === "number")
                        m.ptr = d.ptr;
                    else if (typeof d.ptr === "object")
                        m.ptr = new $util.LongBits(d.ptr.low >>> 0, d.ptr.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KmemCacheAllocFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KmemCacheAllocFtraceEvent
             * @static
             * @param {perfetto.protos.KmemCacheAllocFtraceEvent} m KmemCacheAllocFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KmemCacheAllocFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.bytesAlloc = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.bytesAlloc = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.bytesReq = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.bytesReq = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.callSite = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.callSite = o.longs === String ? "0" : 0;
                    d.gfpFlags = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ptr = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ptr = o.longs === String ? "0" : 0;
                }
                if (m.bytesAlloc != null && m.hasOwnProperty("bytesAlloc")) {
                    if (typeof m.bytesAlloc === "number")
                        d.bytesAlloc = o.longs === String ? String(m.bytesAlloc) : m.bytesAlloc;
                    else
                        d.bytesAlloc = o.longs === String ? $util.Long.prototype.toString.call(m.bytesAlloc) : o.longs === Number ? new $util.LongBits(m.bytesAlloc.low >>> 0, m.bytesAlloc.high >>> 0).toNumber(true) : m.bytesAlloc;
                }
                if (m.bytesReq != null && m.hasOwnProperty("bytesReq")) {
                    if (typeof m.bytesReq === "number")
                        d.bytesReq = o.longs === String ? String(m.bytesReq) : m.bytesReq;
                    else
                        d.bytesReq = o.longs === String ? $util.Long.prototype.toString.call(m.bytesReq) : o.longs === Number ? new $util.LongBits(m.bytesReq.low >>> 0, m.bytesReq.high >>> 0).toNumber(true) : m.bytesReq;
                }
                if (m.callSite != null && m.hasOwnProperty("callSite")) {
                    if (typeof m.callSite === "number")
                        d.callSite = o.longs === String ? String(m.callSite) : m.callSite;
                    else
                        d.callSite = o.longs === String ? $util.Long.prototype.toString.call(m.callSite) : o.longs === Number ? new $util.LongBits(m.callSite.low >>> 0, m.callSite.high >>> 0).toNumber(true) : m.callSite;
                }
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    d.gfpFlags = m.gfpFlags;
                }
                if (m.ptr != null && m.hasOwnProperty("ptr")) {
                    if (typeof m.ptr === "number")
                        d.ptr = o.longs === String ? String(m.ptr) : m.ptr;
                    else
                        d.ptr = o.longs === String ? $util.Long.prototype.toString.call(m.ptr) : o.longs === Number ? new $util.LongBits(m.ptr.low >>> 0, m.ptr.high >>> 0).toNumber(true) : m.ptr;
                }
                return d;
            };

            /**
             * Converts this KmemCacheAllocFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KmemCacheAllocFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KmemCacheAllocFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KmemCacheAllocFtraceEvent;
        })();

        protos.KmemCacheAllocNodeFtraceEvent = (function() {

            /**
             * Properties of a KmemCacheAllocNodeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKmemCacheAllocNodeFtraceEvent
             * @property {number|null} [bytesAlloc] KmemCacheAllocNodeFtraceEvent bytesAlloc
             * @property {number|null} [bytesReq] KmemCacheAllocNodeFtraceEvent bytesReq
             * @property {number|null} [callSite] KmemCacheAllocNodeFtraceEvent callSite
             * @property {number|null} [gfpFlags] KmemCacheAllocNodeFtraceEvent gfpFlags
             * @property {number|null} [node] KmemCacheAllocNodeFtraceEvent node
             * @property {number|null} [ptr] KmemCacheAllocNodeFtraceEvent ptr
             */

            /**
             * Constructs a new KmemCacheAllocNodeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KmemCacheAllocNodeFtraceEvent.
             * @implements IKmemCacheAllocNodeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKmemCacheAllocNodeFtraceEvent=} [p] Properties to set
             */
            function KmemCacheAllocNodeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KmemCacheAllocNodeFtraceEvent bytesAlloc.
             * @member {number} bytesAlloc
             * @memberof perfetto.protos.KmemCacheAllocNodeFtraceEvent
             * @instance
             */
            KmemCacheAllocNodeFtraceEvent.prototype.bytesAlloc = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KmemCacheAllocNodeFtraceEvent bytesReq.
             * @member {number} bytesReq
             * @memberof perfetto.protos.KmemCacheAllocNodeFtraceEvent
             * @instance
             */
            KmemCacheAllocNodeFtraceEvent.prototype.bytesReq = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KmemCacheAllocNodeFtraceEvent callSite.
             * @member {number} callSite
             * @memberof perfetto.protos.KmemCacheAllocNodeFtraceEvent
             * @instance
             */
            KmemCacheAllocNodeFtraceEvent.prototype.callSite = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KmemCacheAllocNodeFtraceEvent gfpFlags.
             * @member {number} gfpFlags
             * @memberof perfetto.protos.KmemCacheAllocNodeFtraceEvent
             * @instance
             */
            KmemCacheAllocNodeFtraceEvent.prototype.gfpFlags = 0;

            /**
             * KmemCacheAllocNodeFtraceEvent node.
             * @member {number} node
             * @memberof perfetto.protos.KmemCacheAllocNodeFtraceEvent
             * @instance
             */
            KmemCacheAllocNodeFtraceEvent.prototype.node = 0;

            /**
             * KmemCacheAllocNodeFtraceEvent ptr.
             * @member {number} ptr
             * @memberof perfetto.protos.KmemCacheAllocNodeFtraceEvent
             * @instance
             */
            KmemCacheAllocNodeFtraceEvent.prototype.ptr = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KmemCacheAllocNodeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KmemCacheAllocNodeFtraceEvent
             * @static
             * @param {perfetto.protos.IKmemCacheAllocNodeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KmemCacheAllocNodeFtraceEvent} KmemCacheAllocNodeFtraceEvent instance
             */
            KmemCacheAllocNodeFtraceEvent.create = function create(properties) {
                return new KmemCacheAllocNodeFtraceEvent(properties);
            };

            /**
             * Encodes the specified KmemCacheAllocNodeFtraceEvent message. Does not implicitly {@link perfetto.protos.KmemCacheAllocNodeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KmemCacheAllocNodeFtraceEvent
             * @static
             * @param {perfetto.protos.IKmemCacheAllocNodeFtraceEvent} m KmemCacheAllocNodeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KmemCacheAllocNodeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.bytesAlloc != null && Object.hasOwnProperty.call(m, "bytesAlloc"))
                    w.uint32(8).uint64(m.bytesAlloc);
                if (m.bytesReq != null && Object.hasOwnProperty.call(m, "bytesReq"))
                    w.uint32(16).uint64(m.bytesReq);
                if (m.callSite != null && Object.hasOwnProperty.call(m, "callSite"))
                    w.uint32(24).uint64(m.callSite);
                if (m.gfpFlags != null && Object.hasOwnProperty.call(m, "gfpFlags"))
                    w.uint32(32).uint32(m.gfpFlags);
                if (m.node != null && Object.hasOwnProperty.call(m, "node"))
                    w.uint32(40).int32(m.node);
                if (m.ptr != null && Object.hasOwnProperty.call(m, "ptr"))
                    w.uint32(48).uint64(m.ptr);
                return w;
            };

            /**
             * Encodes the specified KmemCacheAllocNodeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KmemCacheAllocNodeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KmemCacheAllocNodeFtraceEvent
             * @static
             * @param {perfetto.protos.IKmemCacheAllocNodeFtraceEvent} message KmemCacheAllocNodeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KmemCacheAllocNodeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KmemCacheAllocNodeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KmemCacheAllocNodeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KmemCacheAllocNodeFtraceEvent} KmemCacheAllocNodeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KmemCacheAllocNodeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KmemCacheAllocNodeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.bytesAlloc = r.uint64();
                        break;
                    case 2:
                        m.bytesReq = r.uint64();
                        break;
                    case 3:
                        m.callSite = r.uint64();
                        break;
                    case 4:
                        m.gfpFlags = r.uint32();
                        break;
                    case 5:
                        m.node = r.int32();
                        break;
                    case 6:
                        m.ptr = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KmemCacheAllocNodeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KmemCacheAllocNodeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KmemCacheAllocNodeFtraceEvent} KmemCacheAllocNodeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KmemCacheAllocNodeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KmemCacheAllocNodeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KmemCacheAllocNodeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KmemCacheAllocNodeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.bytesAlloc != null && m.hasOwnProperty("bytesAlloc")) {
                    if (!$util.isInteger(m.bytesAlloc) && !(m.bytesAlloc && $util.isInteger(m.bytesAlloc.low) && $util.isInteger(m.bytesAlloc.high)))
                        return "bytesAlloc: integer|Long expected";
                }
                if (m.bytesReq != null && m.hasOwnProperty("bytesReq")) {
                    if (!$util.isInteger(m.bytesReq) && !(m.bytesReq && $util.isInteger(m.bytesReq.low) && $util.isInteger(m.bytesReq.high)))
                        return "bytesReq: integer|Long expected";
                }
                if (m.callSite != null && m.hasOwnProperty("callSite")) {
                    if (!$util.isInteger(m.callSite) && !(m.callSite && $util.isInteger(m.callSite.low) && $util.isInteger(m.callSite.high)))
                        return "callSite: integer|Long expected";
                }
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    if (!$util.isInteger(m.gfpFlags))
                        return "gfpFlags: integer expected";
                }
                if (m.node != null && m.hasOwnProperty("node")) {
                    if (!$util.isInteger(m.node))
                        return "node: integer expected";
                }
                if (m.ptr != null && m.hasOwnProperty("ptr")) {
                    if (!$util.isInteger(m.ptr) && !(m.ptr && $util.isInteger(m.ptr.low) && $util.isInteger(m.ptr.high)))
                        return "ptr: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KmemCacheAllocNodeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KmemCacheAllocNodeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KmemCacheAllocNodeFtraceEvent} KmemCacheAllocNodeFtraceEvent
             */
            KmemCacheAllocNodeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KmemCacheAllocNodeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KmemCacheAllocNodeFtraceEvent();
                if (d.bytesAlloc != null) {
                    if ($util.Long)
                        (m.bytesAlloc = $util.Long.fromValue(d.bytesAlloc)).unsigned = true;
                    else if (typeof d.bytesAlloc === "string")
                        m.bytesAlloc = parseInt(d.bytesAlloc, 10);
                    else if (typeof d.bytesAlloc === "number")
                        m.bytesAlloc = d.bytesAlloc;
                    else if (typeof d.bytesAlloc === "object")
                        m.bytesAlloc = new $util.LongBits(d.bytesAlloc.low >>> 0, d.bytesAlloc.high >>> 0).toNumber(true);
                }
                if (d.bytesReq != null) {
                    if ($util.Long)
                        (m.bytesReq = $util.Long.fromValue(d.bytesReq)).unsigned = true;
                    else if (typeof d.bytesReq === "string")
                        m.bytesReq = parseInt(d.bytesReq, 10);
                    else if (typeof d.bytesReq === "number")
                        m.bytesReq = d.bytesReq;
                    else if (typeof d.bytesReq === "object")
                        m.bytesReq = new $util.LongBits(d.bytesReq.low >>> 0, d.bytesReq.high >>> 0).toNumber(true);
                }
                if (d.callSite != null) {
                    if ($util.Long)
                        (m.callSite = $util.Long.fromValue(d.callSite)).unsigned = true;
                    else if (typeof d.callSite === "string")
                        m.callSite = parseInt(d.callSite, 10);
                    else if (typeof d.callSite === "number")
                        m.callSite = d.callSite;
                    else if (typeof d.callSite === "object")
                        m.callSite = new $util.LongBits(d.callSite.low >>> 0, d.callSite.high >>> 0).toNumber(true);
                }
                if (d.gfpFlags != null) {
                    m.gfpFlags = d.gfpFlags >>> 0;
                }
                if (d.node != null) {
                    m.node = d.node | 0;
                }
                if (d.ptr != null) {
                    if ($util.Long)
                        (m.ptr = $util.Long.fromValue(d.ptr)).unsigned = true;
                    else if (typeof d.ptr === "string")
                        m.ptr = parseInt(d.ptr, 10);
                    else if (typeof d.ptr === "number")
                        m.ptr = d.ptr;
                    else if (typeof d.ptr === "object")
                        m.ptr = new $util.LongBits(d.ptr.low >>> 0, d.ptr.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KmemCacheAllocNodeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KmemCacheAllocNodeFtraceEvent
             * @static
             * @param {perfetto.protos.KmemCacheAllocNodeFtraceEvent} m KmemCacheAllocNodeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KmemCacheAllocNodeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.bytesAlloc = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.bytesAlloc = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.bytesReq = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.bytesReq = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.callSite = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.callSite = o.longs === String ? "0" : 0;
                    d.gfpFlags = 0;
                    d.node = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ptr = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ptr = o.longs === String ? "0" : 0;
                }
                if (m.bytesAlloc != null && m.hasOwnProperty("bytesAlloc")) {
                    if (typeof m.bytesAlloc === "number")
                        d.bytesAlloc = o.longs === String ? String(m.bytesAlloc) : m.bytesAlloc;
                    else
                        d.bytesAlloc = o.longs === String ? $util.Long.prototype.toString.call(m.bytesAlloc) : o.longs === Number ? new $util.LongBits(m.bytesAlloc.low >>> 0, m.bytesAlloc.high >>> 0).toNumber(true) : m.bytesAlloc;
                }
                if (m.bytesReq != null && m.hasOwnProperty("bytesReq")) {
                    if (typeof m.bytesReq === "number")
                        d.bytesReq = o.longs === String ? String(m.bytesReq) : m.bytesReq;
                    else
                        d.bytesReq = o.longs === String ? $util.Long.prototype.toString.call(m.bytesReq) : o.longs === Number ? new $util.LongBits(m.bytesReq.low >>> 0, m.bytesReq.high >>> 0).toNumber(true) : m.bytesReq;
                }
                if (m.callSite != null && m.hasOwnProperty("callSite")) {
                    if (typeof m.callSite === "number")
                        d.callSite = o.longs === String ? String(m.callSite) : m.callSite;
                    else
                        d.callSite = o.longs === String ? $util.Long.prototype.toString.call(m.callSite) : o.longs === Number ? new $util.LongBits(m.callSite.low >>> 0, m.callSite.high >>> 0).toNumber(true) : m.callSite;
                }
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    d.gfpFlags = m.gfpFlags;
                }
                if (m.node != null && m.hasOwnProperty("node")) {
                    d.node = m.node;
                }
                if (m.ptr != null && m.hasOwnProperty("ptr")) {
                    if (typeof m.ptr === "number")
                        d.ptr = o.longs === String ? String(m.ptr) : m.ptr;
                    else
                        d.ptr = o.longs === String ? $util.Long.prototype.toString.call(m.ptr) : o.longs === Number ? new $util.LongBits(m.ptr.low >>> 0, m.ptr.high >>> 0).toNumber(true) : m.ptr;
                }
                return d;
            };

            /**
             * Converts this KmemCacheAllocNodeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KmemCacheAllocNodeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KmemCacheAllocNodeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KmemCacheAllocNodeFtraceEvent;
        })();

        protos.KmemCacheFreeFtraceEvent = (function() {

            /**
             * Properties of a KmemCacheFreeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKmemCacheFreeFtraceEvent
             * @property {number|null} [callSite] KmemCacheFreeFtraceEvent callSite
             * @property {number|null} [ptr] KmemCacheFreeFtraceEvent ptr
             */

            /**
             * Constructs a new KmemCacheFreeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KmemCacheFreeFtraceEvent.
             * @implements IKmemCacheFreeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKmemCacheFreeFtraceEvent=} [p] Properties to set
             */
            function KmemCacheFreeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KmemCacheFreeFtraceEvent callSite.
             * @member {number} callSite
             * @memberof perfetto.protos.KmemCacheFreeFtraceEvent
             * @instance
             */
            KmemCacheFreeFtraceEvent.prototype.callSite = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KmemCacheFreeFtraceEvent ptr.
             * @member {number} ptr
             * @memberof perfetto.protos.KmemCacheFreeFtraceEvent
             * @instance
             */
            KmemCacheFreeFtraceEvent.prototype.ptr = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KmemCacheFreeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KmemCacheFreeFtraceEvent
             * @static
             * @param {perfetto.protos.IKmemCacheFreeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KmemCacheFreeFtraceEvent} KmemCacheFreeFtraceEvent instance
             */
            KmemCacheFreeFtraceEvent.create = function create(properties) {
                return new KmemCacheFreeFtraceEvent(properties);
            };

            /**
             * Encodes the specified KmemCacheFreeFtraceEvent message. Does not implicitly {@link perfetto.protos.KmemCacheFreeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KmemCacheFreeFtraceEvent
             * @static
             * @param {perfetto.protos.IKmemCacheFreeFtraceEvent} m KmemCacheFreeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KmemCacheFreeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.callSite != null && Object.hasOwnProperty.call(m, "callSite"))
                    w.uint32(8).uint64(m.callSite);
                if (m.ptr != null && Object.hasOwnProperty.call(m, "ptr"))
                    w.uint32(16).uint64(m.ptr);
                return w;
            };

            /**
             * Encodes the specified KmemCacheFreeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KmemCacheFreeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KmemCacheFreeFtraceEvent
             * @static
             * @param {perfetto.protos.IKmemCacheFreeFtraceEvent} message KmemCacheFreeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KmemCacheFreeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KmemCacheFreeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KmemCacheFreeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KmemCacheFreeFtraceEvent} KmemCacheFreeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KmemCacheFreeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KmemCacheFreeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.callSite = r.uint64();
                        break;
                    case 2:
                        m.ptr = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KmemCacheFreeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KmemCacheFreeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KmemCacheFreeFtraceEvent} KmemCacheFreeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KmemCacheFreeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KmemCacheFreeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KmemCacheFreeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KmemCacheFreeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.callSite != null && m.hasOwnProperty("callSite")) {
                    if (!$util.isInteger(m.callSite) && !(m.callSite && $util.isInteger(m.callSite.low) && $util.isInteger(m.callSite.high)))
                        return "callSite: integer|Long expected";
                }
                if (m.ptr != null && m.hasOwnProperty("ptr")) {
                    if (!$util.isInteger(m.ptr) && !(m.ptr && $util.isInteger(m.ptr.low) && $util.isInteger(m.ptr.high)))
                        return "ptr: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KmemCacheFreeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KmemCacheFreeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KmemCacheFreeFtraceEvent} KmemCacheFreeFtraceEvent
             */
            KmemCacheFreeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KmemCacheFreeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KmemCacheFreeFtraceEvent();
                if (d.callSite != null) {
                    if ($util.Long)
                        (m.callSite = $util.Long.fromValue(d.callSite)).unsigned = true;
                    else if (typeof d.callSite === "string")
                        m.callSite = parseInt(d.callSite, 10);
                    else if (typeof d.callSite === "number")
                        m.callSite = d.callSite;
                    else if (typeof d.callSite === "object")
                        m.callSite = new $util.LongBits(d.callSite.low >>> 0, d.callSite.high >>> 0).toNumber(true);
                }
                if (d.ptr != null) {
                    if ($util.Long)
                        (m.ptr = $util.Long.fromValue(d.ptr)).unsigned = true;
                    else if (typeof d.ptr === "string")
                        m.ptr = parseInt(d.ptr, 10);
                    else if (typeof d.ptr === "number")
                        m.ptr = d.ptr;
                    else if (typeof d.ptr === "object")
                        m.ptr = new $util.LongBits(d.ptr.low >>> 0, d.ptr.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KmemCacheFreeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KmemCacheFreeFtraceEvent
             * @static
             * @param {perfetto.protos.KmemCacheFreeFtraceEvent} m KmemCacheFreeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KmemCacheFreeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.callSite = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.callSite = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ptr = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ptr = o.longs === String ? "0" : 0;
                }
                if (m.callSite != null && m.hasOwnProperty("callSite")) {
                    if (typeof m.callSite === "number")
                        d.callSite = o.longs === String ? String(m.callSite) : m.callSite;
                    else
                        d.callSite = o.longs === String ? $util.Long.prototype.toString.call(m.callSite) : o.longs === Number ? new $util.LongBits(m.callSite.low >>> 0, m.callSite.high >>> 0).toNumber(true) : m.callSite;
                }
                if (m.ptr != null && m.hasOwnProperty("ptr")) {
                    if (typeof m.ptr === "number")
                        d.ptr = o.longs === String ? String(m.ptr) : m.ptr;
                    else
                        d.ptr = o.longs === String ? $util.Long.prototype.toString.call(m.ptr) : o.longs === Number ? new $util.LongBits(m.ptr.low >>> 0, m.ptr.high >>> 0).toNumber(true) : m.ptr;
                }
                return d;
            };

            /**
             * Converts this KmemCacheFreeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KmemCacheFreeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KmemCacheFreeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KmemCacheFreeFtraceEvent;
        })();

        protos.MigratePagesEndFtraceEvent = (function() {

            /**
             * Properties of a MigratePagesEndFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMigratePagesEndFtraceEvent
             * @property {number|null} [mode] MigratePagesEndFtraceEvent mode
             */

            /**
             * Constructs a new MigratePagesEndFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MigratePagesEndFtraceEvent.
             * @implements IMigratePagesEndFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMigratePagesEndFtraceEvent=} [p] Properties to set
             */
            function MigratePagesEndFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MigratePagesEndFtraceEvent mode.
             * @member {number} mode
             * @memberof perfetto.protos.MigratePagesEndFtraceEvent
             * @instance
             */
            MigratePagesEndFtraceEvent.prototype.mode = 0;

            /**
             * Creates a new MigratePagesEndFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MigratePagesEndFtraceEvent
             * @static
             * @param {perfetto.protos.IMigratePagesEndFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MigratePagesEndFtraceEvent} MigratePagesEndFtraceEvent instance
             */
            MigratePagesEndFtraceEvent.create = function create(properties) {
                return new MigratePagesEndFtraceEvent(properties);
            };

            /**
             * Encodes the specified MigratePagesEndFtraceEvent message. Does not implicitly {@link perfetto.protos.MigratePagesEndFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MigratePagesEndFtraceEvent
             * @static
             * @param {perfetto.protos.IMigratePagesEndFtraceEvent} m MigratePagesEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MigratePagesEndFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.mode != null && Object.hasOwnProperty.call(m, "mode"))
                    w.uint32(8).int32(m.mode);
                return w;
            };

            /**
             * Encodes the specified MigratePagesEndFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MigratePagesEndFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MigratePagesEndFtraceEvent
             * @static
             * @param {perfetto.protos.IMigratePagesEndFtraceEvent} message MigratePagesEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MigratePagesEndFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MigratePagesEndFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MigratePagesEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MigratePagesEndFtraceEvent} MigratePagesEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MigratePagesEndFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MigratePagesEndFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.mode = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MigratePagesEndFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MigratePagesEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MigratePagesEndFtraceEvent} MigratePagesEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MigratePagesEndFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MigratePagesEndFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MigratePagesEndFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MigratePagesEndFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    if (!$util.isInteger(m.mode))
                        return "mode: integer expected";
                }
                return null;
            };

            /**
             * Creates a MigratePagesEndFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MigratePagesEndFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MigratePagesEndFtraceEvent} MigratePagesEndFtraceEvent
             */
            MigratePagesEndFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MigratePagesEndFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MigratePagesEndFtraceEvent();
                if (d.mode != null) {
                    m.mode = d.mode | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MigratePagesEndFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MigratePagesEndFtraceEvent
             * @static
             * @param {perfetto.protos.MigratePagesEndFtraceEvent} m MigratePagesEndFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MigratePagesEndFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.mode = 0;
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    d.mode = m.mode;
                }
                return d;
            };

            /**
             * Converts this MigratePagesEndFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MigratePagesEndFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MigratePagesEndFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MigratePagesEndFtraceEvent;
        })();

        protos.MigratePagesStartFtraceEvent = (function() {

            /**
             * Properties of a MigratePagesStartFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMigratePagesStartFtraceEvent
             * @property {number|null} [mode] MigratePagesStartFtraceEvent mode
             */

            /**
             * Constructs a new MigratePagesStartFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MigratePagesStartFtraceEvent.
             * @implements IMigratePagesStartFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMigratePagesStartFtraceEvent=} [p] Properties to set
             */
            function MigratePagesStartFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MigratePagesStartFtraceEvent mode.
             * @member {number} mode
             * @memberof perfetto.protos.MigratePagesStartFtraceEvent
             * @instance
             */
            MigratePagesStartFtraceEvent.prototype.mode = 0;

            /**
             * Creates a new MigratePagesStartFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MigratePagesStartFtraceEvent
             * @static
             * @param {perfetto.protos.IMigratePagesStartFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MigratePagesStartFtraceEvent} MigratePagesStartFtraceEvent instance
             */
            MigratePagesStartFtraceEvent.create = function create(properties) {
                return new MigratePagesStartFtraceEvent(properties);
            };

            /**
             * Encodes the specified MigratePagesStartFtraceEvent message. Does not implicitly {@link perfetto.protos.MigratePagesStartFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MigratePagesStartFtraceEvent
             * @static
             * @param {perfetto.protos.IMigratePagesStartFtraceEvent} m MigratePagesStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MigratePagesStartFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.mode != null && Object.hasOwnProperty.call(m, "mode"))
                    w.uint32(8).int32(m.mode);
                return w;
            };

            /**
             * Encodes the specified MigratePagesStartFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MigratePagesStartFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MigratePagesStartFtraceEvent
             * @static
             * @param {perfetto.protos.IMigratePagesStartFtraceEvent} message MigratePagesStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MigratePagesStartFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MigratePagesStartFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MigratePagesStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MigratePagesStartFtraceEvent} MigratePagesStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MigratePagesStartFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MigratePagesStartFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.mode = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MigratePagesStartFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MigratePagesStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MigratePagesStartFtraceEvent} MigratePagesStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MigratePagesStartFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MigratePagesStartFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MigratePagesStartFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MigratePagesStartFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    if (!$util.isInteger(m.mode))
                        return "mode: integer expected";
                }
                return null;
            };

            /**
             * Creates a MigratePagesStartFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MigratePagesStartFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MigratePagesStartFtraceEvent} MigratePagesStartFtraceEvent
             */
            MigratePagesStartFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MigratePagesStartFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MigratePagesStartFtraceEvent();
                if (d.mode != null) {
                    m.mode = d.mode | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MigratePagesStartFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MigratePagesStartFtraceEvent
             * @static
             * @param {perfetto.protos.MigratePagesStartFtraceEvent} m MigratePagesStartFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MigratePagesStartFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.mode = 0;
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    d.mode = m.mode;
                }
                return d;
            };

            /**
             * Converts this MigratePagesStartFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MigratePagesStartFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MigratePagesStartFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MigratePagesStartFtraceEvent;
        })();

        protos.MigrateRetryFtraceEvent = (function() {

            /**
             * Properties of a MigrateRetryFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMigrateRetryFtraceEvent
             * @property {number|null} [tries] MigrateRetryFtraceEvent tries
             */

            /**
             * Constructs a new MigrateRetryFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MigrateRetryFtraceEvent.
             * @implements IMigrateRetryFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMigrateRetryFtraceEvent=} [p] Properties to set
             */
            function MigrateRetryFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MigrateRetryFtraceEvent tries.
             * @member {number} tries
             * @memberof perfetto.protos.MigrateRetryFtraceEvent
             * @instance
             */
            MigrateRetryFtraceEvent.prototype.tries = 0;

            /**
             * Creates a new MigrateRetryFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MigrateRetryFtraceEvent
             * @static
             * @param {perfetto.protos.IMigrateRetryFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MigrateRetryFtraceEvent} MigrateRetryFtraceEvent instance
             */
            MigrateRetryFtraceEvent.create = function create(properties) {
                return new MigrateRetryFtraceEvent(properties);
            };

            /**
             * Encodes the specified MigrateRetryFtraceEvent message. Does not implicitly {@link perfetto.protos.MigrateRetryFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MigrateRetryFtraceEvent
             * @static
             * @param {perfetto.protos.IMigrateRetryFtraceEvent} m MigrateRetryFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MigrateRetryFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.tries != null && Object.hasOwnProperty.call(m, "tries"))
                    w.uint32(8).int32(m.tries);
                return w;
            };

            /**
             * Encodes the specified MigrateRetryFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MigrateRetryFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MigrateRetryFtraceEvent
             * @static
             * @param {perfetto.protos.IMigrateRetryFtraceEvent} message MigrateRetryFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MigrateRetryFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MigrateRetryFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MigrateRetryFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MigrateRetryFtraceEvent} MigrateRetryFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MigrateRetryFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MigrateRetryFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.tries = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MigrateRetryFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MigrateRetryFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MigrateRetryFtraceEvent} MigrateRetryFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MigrateRetryFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MigrateRetryFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MigrateRetryFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MigrateRetryFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.tries != null && m.hasOwnProperty("tries")) {
                    if (!$util.isInteger(m.tries))
                        return "tries: integer expected";
                }
                return null;
            };

            /**
             * Creates a MigrateRetryFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MigrateRetryFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MigrateRetryFtraceEvent} MigrateRetryFtraceEvent
             */
            MigrateRetryFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MigrateRetryFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MigrateRetryFtraceEvent();
                if (d.tries != null) {
                    m.tries = d.tries | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MigrateRetryFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MigrateRetryFtraceEvent
             * @static
             * @param {perfetto.protos.MigrateRetryFtraceEvent} m MigrateRetryFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MigrateRetryFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.tries = 0;
                }
                if (m.tries != null && m.hasOwnProperty("tries")) {
                    d.tries = m.tries;
                }
                return d;
            };

            /**
             * Converts this MigrateRetryFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MigrateRetryFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MigrateRetryFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MigrateRetryFtraceEvent;
        })();

        protos.MmPageAllocFtraceEvent = (function() {

            /**
             * Properties of a MmPageAllocFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmPageAllocFtraceEvent
             * @property {number|null} [gfpFlags] MmPageAllocFtraceEvent gfpFlags
             * @property {number|null} [migratetype] MmPageAllocFtraceEvent migratetype
             * @property {number|null} [order] MmPageAllocFtraceEvent order
             * @property {number|null} [page] MmPageAllocFtraceEvent page
             * @property {number|null} [pfn] MmPageAllocFtraceEvent pfn
             */

            /**
             * Constructs a new MmPageAllocFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmPageAllocFtraceEvent.
             * @implements IMmPageAllocFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmPageAllocFtraceEvent=} [p] Properties to set
             */
            function MmPageAllocFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmPageAllocFtraceEvent gfpFlags.
             * @member {number} gfpFlags
             * @memberof perfetto.protos.MmPageAllocFtraceEvent
             * @instance
             */
            MmPageAllocFtraceEvent.prototype.gfpFlags = 0;

            /**
             * MmPageAllocFtraceEvent migratetype.
             * @member {number} migratetype
             * @memberof perfetto.protos.MmPageAllocFtraceEvent
             * @instance
             */
            MmPageAllocFtraceEvent.prototype.migratetype = 0;

            /**
             * MmPageAllocFtraceEvent order.
             * @member {number} order
             * @memberof perfetto.protos.MmPageAllocFtraceEvent
             * @instance
             */
            MmPageAllocFtraceEvent.prototype.order = 0;

            /**
             * MmPageAllocFtraceEvent page.
             * @member {number} page
             * @memberof perfetto.protos.MmPageAllocFtraceEvent
             * @instance
             */
            MmPageAllocFtraceEvent.prototype.page = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmPageAllocFtraceEvent pfn.
             * @member {number} pfn
             * @memberof perfetto.protos.MmPageAllocFtraceEvent
             * @instance
             */
            MmPageAllocFtraceEvent.prototype.pfn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new MmPageAllocFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmPageAllocFtraceEvent
             * @static
             * @param {perfetto.protos.IMmPageAllocFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmPageAllocFtraceEvent} MmPageAllocFtraceEvent instance
             */
            MmPageAllocFtraceEvent.create = function create(properties) {
                return new MmPageAllocFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmPageAllocFtraceEvent message. Does not implicitly {@link perfetto.protos.MmPageAllocFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmPageAllocFtraceEvent
             * @static
             * @param {perfetto.protos.IMmPageAllocFtraceEvent} m MmPageAllocFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmPageAllocFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.gfpFlags != null && Object.hasOwnProperty.call(m, "gfpFlags"))
                    w.uint32(8).uint32(m.gfpFlags);
                if (m.migratetype != null && Object.hasOwnProperty.call(m, "migratetype"))
                    w.uint32(16).int32(m.migratetype);
                if (m.order != null && Object.hasOwnProperty.call(m, "order"))
                    w.uint32(24).uint32(m.order);
                if (m.page != null && Object.hasOwnProperty.call(m, "page"))
                    w.uint32(32).uint64(m.page);
                if (m.pfn != null && Object.hasOwnProperty.call(m, "pfn"))
                    w.uint32(40).uint64(m.pfn);
                return w;
            };

            /**
             * Encodes the specified MmPageAllocFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmPageAllocFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmPageAllocFtraceEvent
             * @static
             * @param {perfetto.protos.IMmPageAllocFtraceEvent} message MmPageAllocFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmPageAllocFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmPageAllocFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmPageAllocFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmPageAllocFtraceEvent} MmPageAllocFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmPageAllocFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmPageAllocFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.gfpFlags = r.uint32();
                        break;
                    case 2:
                        m.migratetype = r.int32();
                        break;
                    case 3:
                        m.order = r.uint32();
                        break;
                    case 4:
                        m.page = r.uint64();
                        break;
                    case 5:
                        m.pfn = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmPageAllocFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmPageAllocFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmPageAllocFtraceEvent} MmPageAllocFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmPageAllocFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmPageAllocFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmPageAllocFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmPageAllocFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    if (!$util.isInteger(m.gfpFlags))
                        return "gfpFlags: integer expected";
                }
                if (m.migratetype != null && m.hasOwnProperty("migratetype")) {
                    if (!$util.isInteger(m.migratetype))
                        return "migratetype: integer expected";
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    if (!$util.isInteger(m.order))
                        return "order: integer expected";
                }
                if (m.page != null && m.hasOwnProperty("page")) {
                    if (!$util.isInteger(m.page) && !(m.page && $util.isInteger(m.page.low) && $util.isInteger(m.page.high)))
                        return "page: integer|Long expected";
                }
                if (m.pfn != null && m.hasOwnProperty("pfn")) {
                    if (!$util.isInteger(m.pfn) && !(m.pfn && $util.isInteger(m.pfn.low) && $util.isInteger(m.pfn.high)))
                        return "pfn: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a MmPageAllocFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmPageAllocFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmPageAllocFtraceEvent} MmPageAllocFtraceEvent
             */
            MmPageAllocFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmPageAllocFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmPageAllocFtraceEvent();
                if (d.gfpFlags != null) {
                    m.gfpFlags = d.gfpFlags >>> 0;
                }
                if (d.migratetype != null) {
                    m.migratetype = d.migratetype | 0;
                }
                if (d.order != null) {
                    m.order = d.order >>> 0;
                }
                if (d.page != null) {
                    if ($util.Long)
                        (m.page = $util.Long.fromValue(d.page)).unsigned = true;
                    else if (typeof d.page === "string")
                        m.page = parseInt(d.page, 10);
                    else if (typeof d.page === "number")
                        m.page = d.page;
                    else if (typeof d.page === "object")
                        m.page = new $util.LongBits(d.page.low >>> 0, d.page.high >>> 0).toNumber(true);
                }
                if (d.pfn != null) {
                    if ($util.Long)
                        (m.pfn = $util.Long.fromValue(d.pfn)).unsigned = true;
                    else if (typeof d.pfn === "string")
                        m.pfn = parseInt(d.pfn, 10);
                    else if (typeof d.pfn === "number")
                        m.pfn = d.pfn;
                    else if (typeof d.pfn === "object")
                        m.pfn = new $util.LongBits(d.pfn.low >>> 0, d.pfn.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a MmPageAllocFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmPageAllocFtraceEvent
             * @static
             * @param {perfetto.protos.MmPageAllocFtraceEvent} m MmPageAllocFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmPageAllocFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.gfpFlags = 0;
                    d.migratetype = 0;
                    d.order = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.page = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.page = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pfn = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pfn = o.longs === String ? "0" : 0;
                }
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    d.gfpFlags = m.gfpFlags;
                }
                if (m.migratetype != null && m.hasOwnProperty("migratetype")) {
                    d.migratetype = m.migratetype;
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    d.order = m.order;
                }
                if (m.page != null && m.hasOwnProperty("page")) {
                    if (typeof m.page === "number")
                        d.page = o.longs === String ? String(m.page) : m.page;
                    else
                        d.page = o.longs === String ? $util.Long.prototype.toString.call(m.page) : o.longs === Number ? new $util.LongBits(m.page.low >>> 0, m.page.high >>> 0).toNumber(true) : m.page;
                }
                if (m.pfn != null && m.hasOwnProperty("pfn")) {
                    if (typeof m.pfn === "number")
                        d.pfn = o.longs === String ? String(m.pfn) : m.pfn;
                    else
                        d.pfn = o.longs === String ? $util.Long.prototype.toString.call(m.pfn) : o.longs === Number ? new $util.LongBits(m.pfn.low >>> 0, m.pfn.high >>> 0).toNumber(true) : m.pfn;
                }
                return d;
            };

            /**
             * Converts this MmPageAllocFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmPageAllocFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmPageAllocFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmPageAllocFtraceEvent;
        })();

        protos.MmPageAllocExtfragFtraceEvent = (function() {

            /**
             * Properties of a MmPageAllocExtfragFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmPageAllocExtfragFtraceEvent
             * @property {number|null} [allocMigratetype] MmPageAllocExtfragFtraceEvent allocMigratetype
             * @property {number|null} [allocOrder] MmPageAllocExtfragFtraceEvent allocOrder
             * @property {number|null} [fallbackMigratetype] MmPageAllocExtfragFtraceEvent fallbackMigratetype
             * @property {number|null} [fallbackOrder] MmPageAllocExtfragFtraceEvent fallbackOrder
             * @property {number|null} [page] MmPageAllocExtfragFtraceEvent page
             * @property {number|null} [changeOwnership] MmPageAllocExtfragFtraceEvent changeOwnership
             * @property {number|null} [pfn] MmPageAllocExtfragFtraceEvent pfn
             */

            /**
             * Constructs a new MmPageAllocExtfragFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmPageAllocExtfragFtraceEvent.
             * @implements IMmPageAllocExtfragFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmPageAllocExtfragFtraceEvent=} [p] Properties to set
             */
            function MmPageAllocExtfragFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmPageAllocExtfragFtraceEvent allocMigratetype.
             * @member {number} allocMigratetype
             * @memberof perfetto.protos.MmPageAllocExtfragFtraceEvent
             * @instance
             */
            MmPageAllocExtfragFtraceEvent.prototype.allocMigratetype = 0;

            /**
             * MmPageAllocExtfragFtraceEvent allocOrder.
             * @member {number} allocOrder
             * @memberof perfetto.protos.MmPageAllocExtfragFtraceEvent
             * @instance
             */
            MmPageAllocExtfragFtraceEvent.prototype.allocOrder = 0;

            /**
             * MmPageAllocExtfragFtraceEvent fallbackMigratetype.
             * @member {number} fallbackMigratetype
             * @memberof perfetto.protos.MmPageAllocExtfragFtraceEvent
             * @instance
             */
            MmPageAllocExtfragFtraceEvent.prototype.fallbackMigratetype = 0;

            /**
             * MmPageAllocExtfragFtraceEvent fallbackOrder.
             * @member {number} fallbackOrder
             * @memberof perfetto.protos.MmPageAllocExtfragFtraceEvent
             * @instance
             */
            MmPageAllocExtfragFtraceEvent.prototype.fallbackOrder = 0;

            /**
             * MmPageAllocExtfragFtraceEvent page.
             * @member {number} page
             * @memberof perfetto.protos.MmPageAllocExtfragFtraceEvent
             * @instance
             */
            MmPageAllocExtfragFtraceEvent.prototype.page = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmPageAllocExtfragFtraceEvent changeOwnership.
             * @member {number} changeOwnership
             * @memberof perfetto.protos.MmPageAllocExtfragFtraceEvent
             * @instance
             */
            MmPageAllocExtfragFtraceEvent.prototype.changeOwnership = 0;

            /**
             * MmPageAllocExtfragFtraceEvent pfn.
             * @member {number} pfn
             * @memberof perfetto.protos.MmPageAllocExtfragFtraceEvent
             * @instance
             */
            MmPageAllocExtfragFtraceEvent.prototype.pfn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new MmPageAllocExtfragFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmPageAllocExtfragFtraceEvent
             * @static
             * @param {perfetto.protos.IMmPageAllocExtfragFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmPageAllocExtfragFtraceEvent} MmPageAllocExtfragFtraceEvent instance
             */
            MmPageAllocExtfragFtraceEvent.create = function create(properties) {
                return new MmPageAllocExtfragFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmPageAllocExtfragFtraceEvent message. Does not implicitly {@link perfetto.protos.MmPageAllocExtfragFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmPageAllocExtfragFtraceEvent
             * @static
             * @param {perfetto.protos.IMmPageAllocExtfragFtraceEvent} m MmPageAllocExtfragFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmPageAllocExtfragFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.allocMigratetype != null && Object.hasOwnProperty.call(m, "allocMigratetype"))
                    w.uint32(8).int32(m.allocMigratetype);
                if (m.allocOrder != null && Object.hasOwnProperty.call(m, "allocOrder"))
                    w.uint32(16).int32(m.allocOrder);
                if (m.fallbackMigratetype != null && Object.hasOwnProperty.call(m, "fallbackMigratetype"))
                    w.uint32(24).int32(m.fallbackMigratetype);
                if (m.fallbackOrder != null && Object.hasOwnProperty.call(m, "fallbackOrder"))
                    w.uint32(32).int32(m.fallbackOrder);
                if (m.page != null && Object.hasOwnProperty.call(m, "page"))
                    w.uint32(40).uint64(m.page);
                if (m.changeOwnership != null && Object.hasOwnProperty.call(m, "changeOwnership"))
                    w.uint32(48).int32(m.changeOwnership);
                if (m.pfn != null && Object.hasOwnProperty.call(m, "pfn"))
                    w.uint32(56).uint64(m.pfn);
                return w;
            };

            /**
             * Encodes the specified MmPageAllocExtfragFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmPageAllocExtfragFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmPageAllocExtfragFtraceEvent
             * @static
             * @param {perfetto.protos.IMmPageAllocExtfragFtraceEvent} message MmPageAllocExtfragFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmPageAllocExtfragFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmPageAllocExtfragFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmPageAllocExtfragFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmPageAllocExtfragFtraceEvent} MmPageAllocExtfragFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmPageAllocExtfragFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmPageAllocExtfragFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.allocMigratetype = r.int32();
                        break;
                    case 2:
                        m.allocOrder = r.int32();
                        break;
                    case 3:
                        m.fallbackMigratetype = r.int32();
                        break;
                    case 4:
                        m.fallbackOrder = r.int32();
                        break;
                    case 5:
                        m.page = r.uint64();
                        break;
                    case 6:
                        m.changeOwnership = r.int32();
                        break;
                    case 7:
                        m.pfn = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmPageAllocExtfragFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmPageAllocExtfragFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmPageAllocExtfragFtraceEvent} MmPageAllocExtfragFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmPageAllocExtfragFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmPageAllocExtfragFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmPageAllocExtfragFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmPageAllocExtfragFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.allocMigratetype != null && m.hasOwnProperty("allocMigratetype")) {
                    if (!$util.isInteger(m.allocMigratetype))
                        return "allocMigratetype: integer expected";
                }
                if (m.allocOrder != null && m.hasOwnProperty("allocOrder")) {
                    if (!$util.isInteger(m.allocOrder))
                        return "allocOrder: integer expected";
                }
                if (m.fallbackMigratetype != null && m.hasOwnProperty("fallbackMigratetype")) {
                    if (!$util.isInteger(m.fallbackMigratetype))
                        return "fallbackMigratetype: integer expected";
                }
                if (m.fallbackOrder != null && m.hasOwnProperty("fallbackOrder")) {
                    if (!$util.isInteger(m.fallbackOrder))
                        return "fallbackOrder: integer expected";
                }
                if (m.page != null && m.hasOwnProperty("page")) {
                    if (!$util.isInteger(m.page) && !(m.page && $util.isInteger(m.page.low) && $util.isInteger(m.page.high)))
                        return "page: integer|Long expected";
                }
                if (m.changeOwnership != null && m.hasOwnProperty("changeOwnership")) {
                    if (!$util.isInteger(m.changeOwnership))
                        return "changeOwnership: integer expected";
                }
                if (m.pfn != null && m.hasOwnProperty("pfn")) {
                    if (!$util.isInteger(m.pfn) && !(m.pfn && $util.isInteger(m.pfn.low) && $util.isInteger(m.pfn.high)))
                        return "pfn: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a MmPageAllocExtfragFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmPageAllocExtfragFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmPageAllocExtfragFtraceEvent} MmPageAllocExtfragFtraceEvent
             */
            MmPageAllocExtfragFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmPageAllocExtfragFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmPageAllocExtfragFtraceEvent();
                if (d.allocMigratetype != null) {
                    m.allocMigratetype = d.allocMigratetype | 0;
                }
                if (d.allocOrder != null) {
                    m.allocOrder = d.allocOrder | 0;
                }
                if (d.fallbackMigratetype != null) {
                    m.fallbackMigratetype = d.fallbackMigratetype | 0;
                }
                if (d.fallbackOrder != null) {
                    m.fallbackOrder = d.fallbackOrder | 0;
                }
                if (d.page != null) {
                    if ($util.Long)
                        (m.page = $util.Long.fromValue(d.page)).unsigned = true;
                    else if (typeof d.page === "string")
                        m.page = parseInt(d.page, 10);
                    else if (typeof d.page === "number")
                        m.page = d.page;
                    else if (typeof d.page === "object")
                        m.page = new $util.LongBits(d.page.low >>> 0, d.page.high >>> 0).toNumber(true);
                }
                if (d.changeOwnership != null) {
                    m.changeOwnership = d.changeOwnership | 0;
                }
                if (d.pfn != null) {
                    if ($util.Long)
                        (m.pfn = $util.Long.fromValue(d.pfn)).unsigned = true;
                    else if (typeof d.pfn === "string")
                        m.pfn = parseInt(d.pfn, 10);
                    else if (typeof d.pfn === "number")
                        m.pfn = d.pfn;
                    else if (typeof d.pfn === "object")
                        m.pfn = new $util.LongBits(d.pfn.low >>> 0, d.pfn.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a MmPageAllocExtfragFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmPageAllocExtfragFtraceEvent
             * @static
             * @param {perfetto.protos.MmPageAllocExtfragFtraceEvent} m MmPageAllocExtfragFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmPageAllocExtfragFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.allocMigratetype = 0;
                    d.allocOrder = 0;
                    d.fallbackMigratetype = 0;
                    d.fallbackOrder = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.page = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.page = o.longs === String ? "0" : 0;
                    d.changeOwnership = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pfn = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pfn = o.longs === String ? "0" : 0;
                }
                if (m.allocMigratetype != null && m.hasOwnProperty("allocMigratetype")) {
                    d.allocMigratetype = m.allocMigratetype;
                }
                if (m.allocOrder != null && m.hasOwnProperty("allocOrder")) {
                    d.allocOrder = m.allocOrder;
                }
                if (m.fallbackMigratetype != null && m.hasOwnProperty("fallbackMigratetype")) {
                    d.fallbackMigratetype = m.fallbackMigratetype;
                }
                if (m.fallbackOrder != null && m.hasOwnProperty("fallbackOrder")) {
                    d.fallbackOrder = m.fallbackOrder;
                }
                if (m.page != null && m.hasOwnProperty("page")) {
                    if (typeof m.page === "number")
                        d.page = o.longs === String ? String(m.page) : m.page;
                    else
                        d.page = o.longs === String ? $util.Long.prototype.toString.call(m.page) : o.longs === Number ? new $util.LongBits(m.page.low >>> 0, m.page.high >>> 0).toNumber(true) : m.page;
                }
                if (m.changeOwnership != null && m.hasOwnProperty("changeOwnership")) {
                    d.changeOwnership = m.changeOwnership;
                }
                if (m.pfn != null && m.hasOwnProperty("pfn")) {
                    if (typeof m.pfn === "number")
                        d.pfn = o.longs === String ? String(m.pfn) : m.pfn;
                    else
                        d.pfn = o.longs === String ? $util.Long.prototype.toString.call(m.pfn) : o.longs === Number ? new $util.LongBits(m.pfn.low >>> 0, m.pfn.high >>> 0).toNumber(true) : m.pfn;
                }
                return d;
            };

            /**
             * Converts this MmPageAllocExtfragFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmPageAllocExtfragFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmPageAllocExtfragFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmPageAllocExtfragFtraceEvent;
        })();

        protos.MmPageAllocZoneLockedFtraceEvent = (function() {

            /**
             * Properties of a MmPageAllocZoneLockedFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmPageAllocZoneLockedFtraceEvent
             * @property {number|null} [migratetype] MmPageAllocZoneLockedFtraceEvent migratetype
             * @property {number|null} [order] MmPageAllocZoneLockedFtraceEvent order
             * @property {number|null} [page] MmPageAllocZoneLockedFtraceEvent page
             * @property {number|null} [pfn] MmPageAllocZoneLockedFtraceEvent pfn
             */

            /**
             * Constructs a new MmPageAllocZoneLockedFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmPageAllocZoneLockedFtraceEvent.
             * @implements IMmPageAllocZoneLockedFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmPageAllocZoneLockedFtraceEvent=} [p] Properties to set
             */
            function MmPageAllocZoneLockedFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmPageAllocZoneLockedFtraceEvent migratetype.
             * @member {number} migratetype
             * @memberof perfetto.protos.MmPageAllocZoneLockedFtraceEvent
             * @instance
             */
            MmPageAllocZoneLockedFtraceEvent.prototype.migratetype = 0;

            /**
             * MmPageAllocZoneLockedFtraceEvent order.
             * @member {number} order
             * @memberof perfetto.protos.MmPageAllocZoneLockedFtraceEvent
             * @instance
             */
            MmPageAllocZoneLockedFtraceEvent.prototype.order = 0;

            /**
             * MmPageAllocZoneLockedFtraceEvent page.
             * @member {number} page
             * @memberof perfetto.protos.MmPageAllocZoneLockedFtraceEvent
             * @instance
             */
            MmPageAllocZoneLockedFtraceEvent.prototype.page = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmPageAllocZoneLockedFtraceEvent pfn.
             * @member {number} pfn
             * @memberof perfetto.protos.MmPageAllocZoneLockedFtraceEvent
             * @instance
             */
            MmPageAllocZoneLockedFtraceEvent.prototype.pfn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new MmPageAllocZoneLockedFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmPageAllocZoneLockedFtraceEvent
             * @static
             * @param {perfetto.protos.IMmPageAllocZoneLockedFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmPageAllocZoneLockedFtraceEvent} MmPageAllocZoneLockedFtraceEvent instance
             */
            MmPageAllocZoneLockedFtraceEvent.create = function create(properties) {
                return new MmPageAllocZoneLockedFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmPageAllocZoneLockedFtraceEvent message. Does not implicitly {@link perfetto.protos.MmPageAllocZoneLockedFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmPageAllocZoneLockedFtraceEvent
             * @static
             * @param {perfetto.protos.IMmPageAllocZoneLockedFtraceEvent} m MmPageAllocZoneLockedFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmPageAllocZoneLockedFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.migratetype != null && Object.hasOwnProperty.call(m, "migratetype"))
                    w.uint32(8).int32(m.migratetype);
                if (m.order != null && Object.hasOwnProperty.call(m, "order"))
                    w.uint32(16).uint32(m.order);
                if (m.page != null && Object.hasOwnProperty.call(m, "page"))
                    w.uint32(24).uint64(m.page);
                if (m.pfn != null && Object.hasOwnProperty.call(m, "pfn"))
                    w.uint32(32).uint64(m.pfn);
                return w;
            };

            /**
             * Encodes the specified MmPageAllocZoneLockedFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmPageAllocZoneLockedFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmPageAllocZoneLockedFtraceEvent
             * @static
             * @param {perfetto.protos.IMmPageAllocZoneLockedFtraceEvent} message MmPageAllocZoneLockedFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmPageAllocZoneLockedFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmPageAllocZoneLockedFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmPageAllocZoneLockedFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmPageAllocZoneLockedFtraceEvent} MmPageAllocZoneLockedFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmPageAllocZoneLockedFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmPageAllocZoneLockedFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.migratetype = r.int32();
                        break;
                    case 2:
                        m.order = r.uint32();
                        break;
                    case 3:
                        m.page = r.uint64();
                        break;
                    case 4:
                        m.pfn = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmPageAllocZoneLockedFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmPageAllocZoneLockedFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmPageAllocZoneLockedFtraceEvent} MmPageAllocZoneLockedFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmPageAllocZoneLockedFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmPageAllocZoneLockedFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmPageAllocZoneLockedFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmPageAllocZoneLockedFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.migratetype != null && m.hasOwnProperty("migratetype")) {
                    if (!$util.isInteger(m.migratetype))
                        return "migratetype: integer expected";
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    if (!$util.isInteger(m.order))
                        return "order: integer expected";
                }
                if (m.page != null && m.hasOwnProperty("page")) {
                    if (!$util.isInteger(m.page) && !(m.page && $util.isInteger(m.page.low) && $util.isInteger(m.page.high)))
                        return "page: integer|Long expected";
                }
                if (m.pfn != null && m.hasOwnProperty("pfn")) {
                    if (!$util.isInteger(m.pfn) && !(m.pfn && $util.isInteger(m.pfn.low) && $util.isInteger(m.pfn.high)))
                        return "pfn: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a MmPageAllocZoneLockedFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmPageAllocZoneLockedFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmPageAllocZoneLockedFtraceEvent} MmPageAllocZoneLockedFtraceEvent
             */
            MmPageAllocZoneLockedFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmPageAllocZoneLockedFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmPageAllocZoneLockedFtraceEvent();
                if (d.migratetype != null) {
                    m.migratetype = d.migratetype | 0;
                }
                if (d.order != null) {
                    m.order = d.order >>> 0;
                }
                if (d.page != null) {
                    if ($util.Long)
                        (m.page = $util.Long.fromValue(d.page)).unsigned = true;
                    else if (typeof d.page === "string")
                        m.page = parseInt(d.page, 10);
                    else if (typeof d.page === "number")
                        m.page = d.page;
                    else if (typeof d.page === "object")
                        m.page = new $util.LongBits(d.page.low >>> 0, d.page.high >>> 0).toNumber(true);
                }
                if (d.pfn != null) {
                    if ($util.Long)
                        (m.pfn = $util.Long.fromValue(d.pfn)).unsigned = true;
                    else if (typeof d.pfn === "string")
                        m.pfn = parseInt(d.pfn, 10);
                    else if (typeof d.pfn === "number")
                        m.pfn = d.pfn;
                    else if (typeof d.pfn === "object")
                        m.pfn = new $util.LongBits(d.pfn.low >>> 0, d.pfn.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a MmPageAllocZoneLockedFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmPageAllocZoneLockedFtraceEvent
             * @static
             * @param {perfetto.protos.MmPageAllocZoneLockedFtraceEvent} m MmPageAllocZoneLockedFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmPageAllocZoneLockedFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.migratetype = 0;
                    d.order = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.page = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.page = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pfn = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pfn = o.longs === String ? "0" : 0;
                }
                if (m.migratetype != null && m.hasOwnProperty("migratetype")) {
                    d.migratetype = m.migratetype;
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    d.order = m.order;
                }
                if (m.page != null && m.hasOwnProperty("page")) {
                    if (typeof m.page === "number")
                        d.page = o.longs === String ? String(m.page) : m.page;
                    else
                        d.page = o.longs === String ? $util.Long.prototype.toString.call(m.page) : o.longs === Number ? new $util.LongBits(m.page.low >>> 0, m.page.high >>> 0).toNumber(true) : m.page;
                }
                if (m.pfn != null && m.hasOwnProperty("pfn")) {
                    if (typeof m.pfn === "number")
                        d.pfn = o.longs === String ? String(m.pfn) : m.pfn;
                    else
                        d.pfn = o.longs === String ? $util.Long.prototype.toString.call(m.pfn) : o.longs === Number ? new $util.LongBits(m.pfn.low >>> 0, m.pfn.high >>> 0).toNumber(true) : m.pfn;
                }
                return d;
            };

            /**
             * Converts this MmPageAllocZoneLockedFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmPageAllocZoneLockedFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmPageAllocZoneLockedFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmPageAllocZoneLockedFtraceEvent;
        })();

        protos.MmPageFreeFtraceEvent = (function() {

            /**
             * Properties of a MmPageFreeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmPageFreeFtraceEvent
             * @property {number|null} [order] MmPageFreeFtraceEvent order
             * @property {number|null} [page] MmPageFreeFtraceEvent page
             * @property {number|null} [pfn] MmPageFreeFtraceEvent pfn
             */

            /**
             * Constructs a new MmPageFreeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmPageFreeFtraceEvent.
             * @implements IMmPageFreeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmPageFreeFtraceEvent=} [p] Properties to set
             */
            function MmPageFreeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmPageFreeFtraceEvent order.
             * @member {number} order
             * @memberof perfetto.protos.MmPageFreeFtraceEvent
             * @instance
             */
            MmPageFreeFtraceEvent.prototype.order = 0;

            /**
             * MmPageFreeFtraceEvent page.
             * @member {number} page
             * @memberof perfetto.protos.MmPageFreeFtraceEvent
             * @instance
             */
            MmPageFreeFtraceEvent.prototype.page = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmPageFreeFtraceEvent pfn.
             * @member {number} pfn
             * @memberof perfetto.protos.MmPageFreeFtraceEvent
             * @instance
             */
            MmPageFreeFtraceEvent.prototype.pfn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new MmPageFreeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmPageFreeFtraceEvent
             * @static
             * @param {perfetto.protos.IMmPageFreeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmPageFreeFtraceEvent} MmPageFreeFtraceEvent instance
             */
            MmPageFreeFtraceEvent.create = function create(properties) {
                return new MmPageFreeFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmPageFreeFtraceEvent message. Does not implicitly {@link perfetto.protos.MmPageFreeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmPageFreeFtraceEvent
             * @static
             * @param {perfetto.protos.IMmPageFreeFtraceEvent} m MmPageFreeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmPageFreeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.order != null && Object.hasOwnProperty.call(m, "order"))
                    w.uint32(8).uint32(m.order);
                if (m.page != null && Object.hasOwnProperty.call(m, "page"))
                    w.uint32(16).uint64(m.page);
                if (m.pfn != null && Object.hasOwnProperty.call(m, "pfn"))
                    w.uint32(24).uint64(m.pfn);
                return w;
            };

            /**
             * Encodes the specified MmPageFreeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmPageFreeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmPageFreeFtraceEvent
             * @static
             * @param {perfetto.protos.IMmPageFreeFtraceEvent} message MmPageFreeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmPageFreeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmPageFreeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmPageFreeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmPageFreeFtraceEvent} MmPageFreeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmPageFreeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmPageFreeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.order = r.uint32();
                        break;
                    case 2:
                        m.page = r.uint64();
                        break;
                    case 3:
                        m.pfn = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmPageFreeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmPageFreeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmPageFreeFtraceEvent} MmPageFreeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmPageFreeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmPageFreeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmPageFreeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmPageFreeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.order != null && m.hasOwnProperty("order")) {
                    if (!$util.isInteger(m.order))
                        return "order: integer expected";
                }
                if (m.page != null && m.hasOwnProperty("page")) {
                    if (!$util.isInteger(m.page) && !(m.page && $util.isInteger(m.page.low) && $util.isInteger(m.page.high)))
                        return "page: integer|Long expected";
                }
                if (m.pfn != null && m.hasOwnProperty("pfn")) {
                    if (!$util.isInteger(m.pfn) && !(m.pfn && $util.isInteger(m.pfn.low) && $util.isInteger(m.pfn.high)))
                        return "pfn: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a MmPageFreeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmPageFreeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmPageFreeFtraceEvent} MmPageFreeFtraceEvent
             */
            MmPageFreeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmPageFreeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmPageFreeFtraceEvent();
                if (d.order != null) {
                    m.order = d.order >>> 0;
                }
                if (d.page != null) {
                    if ($util.Long)
                        (m.page = $util.Long.fromValue(d.page)).unsigned = true;
                    else if (typeof d.page === "string")
                        m.page = parseInt(d.page, 10);
                    else if (typeof d.page === "number")
                        m.page = d.page;
                    else if (typeof d.page === "object")
                        m.page = new $util.LongBits(d.page.low >>> 0, d.page.high >>> 0).toNumber(true);
                }
                if (d.pfn != null) {
                    if ($util.Long)
                        (m.pfn = $util.Long.fromValue(d.pfn)).unsigned = true;
                    else if (typeof d.pfn === "string")
                        m.pfn = parseInt(d.pfn, 10);
                    else if (typeof d.pfn === "number")
                        m.pfn = d.pfn;
                    else if (typeof d.pfn === "object")
                        m.pfn = new $util.LongBits(d.pfn.low >>> 0, d.pfn.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a MmPageFreeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmPageFreeFtraceEvent
             * @static
             * @param {perfetto.protos.MmPageFreeFtraceEvent} m MmPageFreeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmPageFreeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.order = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.page = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.page = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pfn = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pfn = o.longs === String ? "0" : 0;
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    d.order = m.order;
                }
                if (m.page != null && m.hasOwnProperty("page")) {
                    if (typeof m.page === "number")
                        d.page = o.longs === String ? String(m.page) : m.page;
                    else
                        d.page = o.longs === String ? $util.Long.prototype.toString.call(m.page) : o.longs === Number ? new $util.LongBits(m.page.low >>> 0, m.page.high >>> 0).toNumber(true) : m.page;
                }
                if (m.pfn != null && m.hasOwnProperty("pfn")) {
                    if (typeof m.pfn === "number")
                        d.pfn = o.longs === String ? String(m.pfn) : m.pfn;
                    else
                        d.pfn = o.longs === String ? $util.Long.prototype.toString.call(m.pfn) : o.longs === Number ? new $util.LongBits(m.pfn.low >>> 0, m.pfn.high >>> 0).toNumber(true) : m.pfn;
                }
                return d;
            };

            /**
             * Converts this MmPageFreeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmPageFreeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmPageFreeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmPageFreeFtraceEvent;
        })();

        protos.MmPageFreeBatchedFtraceEvent = (function() {

            /**
             * Properties of a MmPageFreeBatchedFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmPageFreeBatchedFtraceEvent
             * @property {number|null} [cold] MmPageFreeBatchedFtraceEvent cold
             * @property {number|null} [page] MmPageFreeBatchedFtraceEvent page
             * @property {number|null} [pfn] MmPageFreeBatchedFtraceEvent pfn
             */

            /**
             * Constructs a new MmPageFreeBatchedFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmPageFreeBatchedFtraceEvent.
             * @implements IMmPageFreeBatchedFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmPageFreeBatchedFtraceEvent=} [p] Properties to set
             */
            function MmPageFreeBatchedFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmPageFreeBatchedFtraceEvent cold.
             * @member {number} cold
             * @memberof perfetto.protos.MmPageFreeBatchedFtraceEvent
             * @instance
             */
            MmPageFreeBatchedFtraceEvent.prototype.cold = 0;

            /**
             * MmPageFreeBatchedFtraceEvent page.
             * @member {number} page
             * @memberof perfetto.protos.MmPageFreeBatchedFtraceEvent
             * @instance
             */
            MmPageFreeBatchedFtraceEvent.prototype.page = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmPageFreeBatchedFtraceEvent pfn.
             * @member {number} pfn
             * @memberof perfetto.protos.MmPageFreeBatchedFtraceEvent
             * @instance
             */
            MmPageFreeBatchedFtraceEvent.prototype.pfn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new MmPageFreeBatchedFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmPageFreeBatchedFtraceEvent
             * @static
             * @param {perfetto.protos.IMmPageFreeBatchedFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmPageFreeBatchedFtraceEvent} MmPageFreeBatchedFtraceEvent instance
             */
            MmPageFreeBatchedFtraceEvent.create = function create(properties) {
                return new MmPageFreeBatchedFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmPageFreeBatchedFtraceEvent message. Does not implicitly {@link perfetto.protos.MmPageFreeBatchedFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmPageFreeBatchedFtraceEvent
             * @static
             * @param {perfetto.protos.IMmPageFreeBatchedFtraceEvent} m MmPageFreeBatchedFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmPageFreeBatchedFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.cold != null && Object.hasOwnProperty.call(m, "cold"))
                    w.uint32(8).int32(m.cold);
                if (m.page != null && Object.hasOwnProperty.call(m, "page"))
                    w.uint32(16).uint64(m.page);
                if (m.pfn != null && Object.hasOwnProperty.call(m, "pfn"))
                    w.uint32(24).uint64(m.pfn);
                return w;
            };

            /**
             * Encodes the specified MmPageFreeBatchedFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmPageFreeBatchedFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmPageFreeBatchedFtraceEvent
             * @static
             * @param {perfetto.protos.IMmPageFreeBatchedFtraceEvent} message MmPageFreeBatchedFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmPageFreeBatchedFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmPageFreeBatchedFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmPageFreeBatchedFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmPageFreeBatchedFtraceEvent} MmPageFreeBatchedFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmPageFreeBatchedFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmPageFreeBatchedFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.cold = r.int32();
                        break;
                    case 2:
                        m.page = r.uint64();
                        break;
                    case 3:
                        m.pfn = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmPageFreeBatchedFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmPageFreeBatchedFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmPageFreeBatchedFtraceEvent} MmPageFreeBatchedFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmPageFreeBatchedFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmPageFreeBatchedFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmPageFreeBatchedFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmPageFreeBatchedFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.cold != null && m.hasOwnProperty("cold")) {
                    if (!$util.isInteger(m.cold))
                        return "cold: integer expected";
                }
                if (m.page != null && m.hasOwnProperty("page")) {
                    if (!$util.isInteger(m.page) && !(m.page && $util.isInteger(m.page.low) && $util.isInteger(m.page.high)))
                        return "page: integer|Long expected";
                }
                if (m.pfn != null && m.hasOwnProperty("pfn")) {
                    if (!$util.isInteger(m.pfn) && !(m.pfn && $util.isInteger(m.pfn.low) && $util.isInteger(m.pfn.high)))
                        return "pfn: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a MmPageFreeBatchedFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmPageFreeBatchedFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmPageFreeBatchedFtraceEvent} MmPageFreeBatchedFtraceEvent
             */
            MmPageFreeBatchedFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmPageFreeBatchedFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmPageFreeBatchedFtraceEvent();
                if (d.cold != null) {
                    m.cold = d.cold | 0;
                }
                if (d.page != null) {
                    if ($util.Long)
                        (m.page = $util.Long.fromValue(d.page)).unsigned = true;
                    else if (typeof d.page === "string")
                        m.page = parseInt(d.page, 10);
                    else if (typeof d.page === "number")
                        m.page = d.page;
                    else if (typeof d.page === "object")
                        m.page = new $util.LongBits(d.page.low >>> 0, d.page.high >>> 0).toNumber(true);
                }
                if (d.pfn != null) {
                    if ($util.Long)
                        (m.pfn = $util.Long.fromValue(d.pfn)).unsigned = true;
                    else if (typeof d.pfn === "string")
                        m.pfn = parseInt(d.pfn, 10);
                    else if (typeof d.pfn === "number")
                        m.pfn = d.pfn;
                    else if (typeof d.pfn === "object")
                        m.pfn = new $util.LongBits(d.pfn.low >>> 0, d.pfn.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a MmPageFreeBatchedFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmPageFreeBatchedFtraceEvent
             * @static
             * @param {perfetto.protos.MmPageFreeBatchedFtraceEvent} m MmPageFreeBatchedFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmPageFreeBatchedFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.cold = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.page = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.page = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pfn = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pfn = o.longs === String ? "0" : 0;
                }
                if (m.cold != null && m.hasOwnProperty("cold")) {
                    d.cold = m.cold;
                }
                if (m.page != null && m.hasOwnProperty("page")) {
                    if (typeof m.page === "number")
                        d.page = o.longs === String ? String(m.page) : m.page;
                    else
                        d.page = o.longs === String ? $util.Long.prototype.toString.call(m.page) : o.longs === Number ? new $util.LongBits(m.page.low >>> 0, m.page.high >>> 0).toNumber(true) : m.page;
                }
                if (m.pfn != null && m.hasOwnProperty("pfn")) {
                    if (typeof m.pfn === "number")
                        d.pfn = o.longs === String ? String(m.pfn) : m.pfn;
                    else
                        d.pfn = o.longs === String ? $util.Long.prototype.toString.call(m.pfn) : o.longs === Number ? new $util.LongBits(m.pfn.low >>> 0, m.pfn.high >>> 0).toNumber(true) : m.pfn;
                }
                return d;
            };

            /**
             * Converts this MmPageFreeBatchedFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmPageFreeBatchedFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmPageFreeBatchedFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmPageFreeBatchedFtraceEvent;
        })();

        protos.MmPagePcpuDrainFtraceEvent = (function() {

            /**
             * Properties of a MmPagePcpuDrainFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmPagePcpuDrainFtraceEvent
             * @property {number|null} [migratetype] MmPagePcpuDrainFtraceEvent migratetype
             * @property {number|null} [order] MmPagePcpuDrainFtraceEvent order
             * @property {number|null} [page] MmPagePcpuDrainFtraceEvent page
             * @property {number|null} [pfn] MmPagePcpuDrainFtraceEvent pfn
             */

            /**
             * Constructs a new MmPagePcpuDrainFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmPagePcpuDrainFtraceEvent.
             * @implements IMmPagePcpuDrainFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmPagePcpuDrainFtraceEvent=} [p] Properties to set
             */
            function MmPagePcpuDrainFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmPagePcpuDrainFtraceEvent migratetype.
             * @member {number} migratetype
             * @memberof perfetto.protos.MmPagePcpuDrainFtraceEvent
             * @instance
             */
            MmPagePcpuDrainFtraceEvent.prototype.migratetype = 0;

            /**
             * MmPagePcpuDrainFtraceEvent order.
             * @member {number} order
             * @memberof perfetto.protos.MmPagePcpuDrainFtraceEvent
             * @instance
             */
            MmPagePcpuDrainFtraceEvent.prototype.order = 0;

            /**
             * MmPagePcpuDrainFtraceEvent page.
             * @member {number} page
             * @memberof perfetto.protos.MmPagePcpuDrainFtraceEvent
             * @instance
             */
            MmPagePcpuDrainFtraceEvent.prototype.page = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmPagePcpuDrainFtraceEvent pfn.
             * @member {number} pfn
             * @memberof perfetto.protos.MmPagePcpuDrainFtraceEvent
             * @instance
             */
            MmPagePcpuDrainFtraceEvent.prototype.pfn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new MmPagePcpuDrainFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmPagePcpuDrainFtraceEvent
             * @static
             * @param {perfetto.protos.IMmPagePcpuDrainFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmPagePcpuDrainFtraceEvent} MmPagePcpuDrainFtraceEvent instance
             */
            MmPagePcpuDrainFtraceEvent.create = function create(properties) {
                return new MmPagePcpuDrainFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmPagePcpuDrainFtraceEvent message. Does not implicitly {@link perfetto.protos.MmPagePcpuDrainFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmPagePcpuDrainFtraceEvent
             * @static
             * @param {perfetto.protos.IMmPagePcpuDrainFtraceEvent} m MmPagePcpuDrainFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmPagePcpuDrainFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.migratetype != null && Object.hasOwnProperty.call(m, "migratetype"))
                    w.uint32(8).int32(m.migratetype);
                if (m.order != null && Object.hasOwnProperty.call(m, "order"))
                    w.uint32(16).uint32(m.order);
                if (m.page != null && Object.hasOwnProperty.call(m, "page"))
                    w.uint32(24).uint64(m.page);
                if (m.pfn != null && Object.hasOwnProperty.call(m, "pfn"))
                    w.uint32(32).uint64(m.pfn);
                return w;
            };

            /**
             * Encodes the specified MmPagePcpuDrainFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmPagePcpuDrainFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmPagePcpuDrainFtraceEvent
             * @static
             * @param {perfetto.protos.IMmPagePcpuDrainFtraceEvent} message MmPagePcpuDrainFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmPagePcpuDrainFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmPagePcpuDrainFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmPagePcpuDrainFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmPagePcpuDrainFtraceEvent} MmPagePcpuDrainFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmPagePcpuDrainFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmPagePcpuDrainFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.migratetype = r.int32();
                        break;
                    case 2:
                        m.order = r.uint32();
                        break;
                    case 3:
                        m.page = r.uint64();
                        break;
                    case 4:
                        m.pfn = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmPagePcpuDrainFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmPagePcpuDrainFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmPagePcpuDrainFtraceEvent} MmPagePcpuDrainFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmPagePcpuDrainFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmPagePcpuDrainFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmPagePcpuDrainFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmPagePcpuDrainFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.migratetype != null && m.hasOwnProperty("migratetype")) {
                    if (!$util.isInteger(m.migratetype))
                        return "migratetype: integer expected";
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    if (!$util.isInteger(m.order))
                        return "order: integer expected";
                }
                if (m.page != null && m.hasOwnProperty("page")) {
                    if (!$util.isInteger(m.page) && !(m.page && $util.isInteger(m.page.low) && $util.isInteger(m.page.high)))
                        return "page: integer|Long expected";
                }
                if (m.pfn != null && m.hasOwnProperty("pfn")) {
                    if (!$util.isInteger(m.pfn) && !(m.pfn && $util.isInteger(m.pfn.low) && $util.isInteger(m.pfn.high)))
                        return "pfn: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a MmPagePcpuDrainFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmPagePcpuDrainFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmPagePcpuDrainFtraceEvent} MmPagePcpuDrainFtraceEvent
             */
            MmPagePcpuDrainFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmPagePcpuDrainFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmPagePcpuDrainFtraceEvent();
                if (d.migratetype != null) {
                    m.migratetype = d.migratetype | 0;
                }
                if (d.order != null) {
                    m.order = d.order >>> 0;
                }
                if (d.page != null) {
                    if ($util.Long)
                        (m.page = $util.Long.fromValue(d.page)).unsigned = true;
                    else if (typeof d.page === "string")
                        m.page = parseInt(d.page, 10);
                    else if (typeof d.page === "number")
                        m.page = d.page;
                    else if (typeof d.page === "object")
                        m.page = new $util.LongBits(d.page.low >>> 0, d.page.high >>> 0).toNumber(true);
                }
                if (d.pfn != null) {
                    if ($util.Long)
                        (m.pfn = $util.Long.fromValue(d.pfn)).unsigned = true;
                    else if (typeof d.pfn === "string")
                        m.pfn = parseInt(d.pfn, 10);
                    else if (typeof d.pfn === "number")
                        m.pfn = d.pfn;
                    else if (typeof d.pfn === "object")
                        m.pfn = new $util.LongBits(d.pfn.low >>> 0, d.pfn.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a MmPagePcpuDrainFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmPagePcpuDrainFtraceEvent
             * @static
             * @param {perfetto.protos.MmPagePcpuDrainFtraceEvent} m MmPagePcpuDrainFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmPagePcpuDrainFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.migratetype = 0;
                    d.order = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.page = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.page = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pfn = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pfn = o.longs === String ? "0" : 0;
                }
                if (m.migratetype != null && m.hasOwnProperty("migratetype")) {
                    d.migratetype = m.migratetype;
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    d.order = m.order;
                }
                if (m.page != null && m.hasOwnProperty("page")) {
                    if (typeof m.page === "number")
                        d.page = o.longs === String ? String(m.page) : m.page;
                    else
                        d.page = o.longs === String ? $util.Long.prototype.toString.call(m.page) : o.longs === Number ? new $util.LongBits(m.page.low >>> 0, m.page.high >>> 0).toNumber(true) : m.page;
                }
                if (m.pfn != null && m.hasOwnProperty("pfn")) {
                    if (typeof m.pfn === "number")
                        d.pfn = o.longs === String ? String(m.pfn) : m.pfn;
                    else
                        d.pfn = o.longs === String ? $util.Long.prototype.toString.call(m.pfn) : o.longs === Number ? new $util.LongBits(m.pfn.low >>> 0, m.pfn.high >>> 0).toNumber(true) : m.pfn;
                }
                return d;
            };

            /**
             * Converts this MmPagePcpuDrainFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmPagePcpuDrainFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmPagePcpuDrainFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmPagePcpuDrainFtraceEvent;
        })();

        protos.RssStatFtraceEvent = (function() {

            /**
             * Properties of a RssStatFtraceEvent.
             * @memberof perfetto.protos
             * @interface IRssStatFtraceEvent
             * @property {number|null} [member] RssStatFtraceEvent member
             * @property {number|null} [size] RssStatFtraceEvent size
             * @property {number|null} [curr] RssStatFtraceEvent curr
             * @property {number|null} [mmId] RssStatFtraceEvent mmId
             */

            /**
             * Constructs a new RssStatFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a RssStatFtraceEvent.
             * @implements IRssStatFtraceEvent
             * @constructor
             * @param {perfetto.protos.IRssStatFtraceEvent=} [p] Properties to set
             */
            function RssStatFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * RssStatFtraceEvent member.
             * @member {number} member
             * @memberof perfetto.protos.RssStatFtraceEvent
             * @instance
             */
            RssStatFtraceEvent.prototype.member = 0;

            /**
             * RssStatFtraceEvent size.
             * @member {number} size
             * @memberof perfetto.protos.RssStatFtraceEvent
             * @instance
             */
            RssStatFtraceEvent.prototype.size = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * RssStatFtraceEvent curr.
             * @member {number} curr
             * @memberof perfetto.protos.RssStatFtraceEvent
             * @instance
             */
            RssStatFtraceEvent.prototype.curr = 0;

            /**
             * RssStatFtraceEvent mmId.
             * @member {number} mmId
             * @memberof perfetto.protos.RssStatFtraceEvent
             * @instance
             */
            RssStatFtraceEvent.prototype.mmId = 0;

            /**
             * Creates a new RssStatFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.RssStatFtraceEvent
             * @static
             * @param {perfetto.protos.IRssStatFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.RssStatFtraceEvent} RssStatFtraceEvent instance
             */
            RssStatFtraceEvent.create = function create(properties) {
                return new RssStatFtraceEvent(properties);
            };

            /**
             * Encodes the specified RssStatFtraceEvent message. Does not implicitly {@link perfetto.protos.RssStatFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.RssStatFtraceEvent
             * @static
             * @param {perfetto.protos.IRssStatFtraceEvent} m RssStatFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RssStatFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.member != null && Object.hasOwnProperty.call(m, "member"))
                    w.uint32(8).int32(m.member);
                if (m.size != null && Object.hasOwnProperty.call(m, "size"))
                    w.uint32(16).int64(m.size);
                if (m.curr != null && Object.hasOwnProperty.call(m, "curr"))
                    w.uint32(24).uint32(m.curr);
                if (m.mmId != null && Object.hasOwnProperty.call(m, "mmId"))
                    w.uint32(32).uint32(m.mmId);
                return w;
            };

            /**
             * Encodes the specified RssStatFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.RssStatFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.RssStatFtraceEvent
             * @static
             * @param {perfetto.protos.IRssStatFtraceEvent} message RssStatFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RssStatFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a RssStatFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.RssStatFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.RssStatFtraceEvent} RssStatFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RssStatFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.RssStatFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.member = r.int32();
                        break;
                    case 2:
                        m.size = r.int64();
                        break;
                    case 3:
                        m.curr = r.uint32();
                        break;
                    case 4:
                        m.mmId = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a RssStatFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.RssStatFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.RssStatFtraceEvent} RssStatFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RssStatFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a RssStatFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.RssStatFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            RssStatFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.member != null && m.hasOwnProperty("member")) {
                    if (!$util.isInteger(m.member))
                        return "member: integer expected";
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (!$util.isInteger(m.size) && !(m.size && $util.isInteger(m.size.low) && $util.isInteger(m.size.high)))
                        return "size: integer|Long expected";
                }
                if (m.curr != null && m.hasOwnProperty("curr")) {
                    if (!$util.isInteger(m.curr))
                        return "curr: integer expected";
                }
                if (m.mmId != null && m.hasOwnProperty("mmId")) {
                    if (!$util.isInteger(m.mmId))
                        return "mmId: integer expected";
                }
                return null;
            };

            /**
             * Creates a RssStatFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.RssStatFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.RssStatFtraceEvent} RssStatFtraceEvent
             */
            RssStatFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.RssStatFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.RssStatFtraceEvent();
                if (d.member != null) {
                    m.member = d.member | 0;
                }
                if (d.size != null) {
                    if ($util.Long)
                        (m.size = $util.Long.fromValue(d.size)).unsigned = false;
                    else if (typeof d.size === "string")
                        m.size = parseInt(d.size, 10);
                    else if (typeof d.size === "number")
                        m.size = d.size;
                    else if (typeof d.size === "object")
                        m.size = new $util.LongBits(d.size.low >>> 0, d.size.high >>> 0).toNumber();
                }
                if (d.curr != null) {
                    m.curr = d.curr >>> 0;
                }
                if (d.mmId != null) {
                    m.mmId = d.mmId >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a RssStatFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.RssStatFtraceEvent
             * @static
             * @param {perfetto.protos.RssStatFtraceEvent} m RssStatFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            RssStatFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.member = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.size = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.size = o.longs === String ? "0" : 0;
                    d.curr = 0;
                    d.mmId = 0;
                }
                if (m.member != null && m.hasOwnProperty("member")) {
                    d.member = m.member;
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (typeof m.size === "number")
                        d.size = o.longs === String ? String(m.size) : m.size;
                    else
                        d.size = o.longs === String ? $util.Long.prototype.toString.call(m.size) : o.longs === Number ? new $util.LongBits(m.size.low >>> 0, m.size.high >>> 0).toNumber() : m.size;
                }
                if (m.curr != null && m.hasOwnProperty("curr")) {
                    d.curr = m.curr;
                }
                if (m.mmId != null && m.hasOwnProperty("mmId")) {
                    d.mmId = m.mmId;
                }
                return d;
            };

            /**
             * Converts this RssStatFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.RssStatFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            RssStatFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return RssStatFtraceEvent;
        })();

        protos.IonHeapShrinkFtraceEvent = (function() {

            /**
             * Properties of an IonHeapShrinkFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIonHeapShrinkFtraceEvent
             * @property {string|null} [heapName] IonHeapShrinkFtraceEvent heapName
             * @property {number|null} [len] IonHeapShrinkFtraceEvent len
             * @property {number|null} [totalAllocated] IonHeapShrinkFtraceEvent totalAllocated
             */

            /**
             * Constructs a new IonHeapShrinkFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IonHeapShrinkFtraceEvent.
             * @implements IIonHeapShrinkFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIonHeapShrinkFtraceEvent=} [p] Properties to set
             */
            function IonHeapShrinkFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IonHeapShrinkFtraceEvent heapName.
             * @member {string} heapName
             * @memberof perfetto.protos.IonHeapShrinkFtraceEvent
             * @instance
             */
            IonHeapShrinkFtraceEvent.prototype.heapName = "";

            /**
             * IonHeapShrinkFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.IonHeapShrinkFtraceEvent
             * @instance
             */
            IonHeapShrinkFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IonHeapShrinkFtraceEvent totalAllocated.
             * @member {number} totalAllocated
             * @memberof perfetto.protos.IonHeapShrinkFtraceEvent
             * @instance
             */
            IonHeapShrinkFtraceEvent.prototype.totalAllocated = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new IonHeapShrinkFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IonHeapShrinkFtraceEvent
             * @static
             * @param {perfetto.protos.IIonHeapShrinkFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IonHeapShrinkFtraceEvent} IonHeapShrinkFtraceEvent instance
             */
            IonHeapShrinkFtraceEvent.create = function create(properties) {
                return new IonHeapShrinkFtraceEvent(properties);
            };

            /**
             * Encodes the specified IonHeapShrinkFtraceEvent message. Does not implicitly {@link perfetto.protos.IonHeapShrinkFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IonHeapShrinkFtraceEvent
             * @static
             * @param {perfetto.protos.IIonHeapShrinkFtraceEvent} m IonHeapShrinkFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonHeapShrinkFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.heapName != null && Object.hasOwnProperty.call(m, "heapName"))
                    w.uint32(10).string(m.heapName);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(16).uint64(m.len);
                if (m.totalAllocated != null && Object.hasOwnProperty.call(m, "totalAllocated"))
                    w.uint32(24).int64(m.totalAllocated);
                return w;
            };

            /**
             * Encodes the specified IonHeapShrinkFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IonHeapShrinkFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IonHeapShrinkFtraceEvent
             * @static
             * @param {perfetto.protos.IIonHeapShrinkFtraceEvent} message IonHeapShrinkFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonHeapShrinkFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IonHeapShrinkFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IonHeapShrinkFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IonHeapShrinkFtraceEvent} IonHeapShrinkFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonHeapShrinkFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IonHeapShrinkFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.heapName = r.string();
                        break;
                    case 2:
                        m.len = r.uint64();
                        break;
                    case 3:
                        m.totalAllocated = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IonHeapShrinkFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IonHeapShrinkFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IonHeapShrinkFtraceEvent} IonHeapShrinkFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonHeapShrinkFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IonHeapShrinkFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IonHeapShrinkFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IonHeapShrinkFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.heapName != null && m.hasOwnProperty("heapName")) {
                    if (!$util.isString(m.heapName))
                        return "heapName: string expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                if (m.totalAllocated != null && m.hasOwnProperty("totalAllocated")) {
                    if (!$util.isInteger(m.totalAllocated) && !(m.totalAllocated && $util.isInteger(m.totalAllocated.low) && $util.isInteger(m.totalAllocated.high)))
                        return "totalAllocated: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an IonHeapShrinkFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IonHeapShrinkFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IonHeapShrinkFtraceEvent} IonHeapShrinkFtraceEvent
             */
            IonHeapShrinkFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IonHeapShrinkFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IonHeapShrinkFtraceEvent();
                if (d.heapName != null) {
                    m.heapName = String(d.heapName);
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = true;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber(true);
                }
                if (d.totalAllocated != null) {
                    if ($util.Long)
                        (m.totalAllocated = $util.Long.fromValue(d.totalAllocated)).unsigned = false;
                    else if (typeof d.totalAllocated === "string")
                        m.totalAllocated = parseInt(d.totalAllocated, 10);
                    else if (typeof d.totalAllocated === "number")
                        m.totalAllocated = d.totalAllocated;
                    else if (typeof d.totalAllocated === "object")
                        m.totalAllocated = new $util.LongBits(d.totalAllocated.low >>> 0, d.totalAllocated.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from an IonHeapShrinkFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IonHeapShrinkFtraceEvent
             * @static
             * @param {perfetto.protos.IonHeapShrinkFtraceEvent} m IonHeapShrinkFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IonHeapShrinkFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.heapName = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.totalAllocated = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.totalAllocated = o.longs === String ? "0" : 0;
                }
                if (m.heapName != null && m.hasOwnProperty("heapName")) {
                    d.heapName = m.heapName;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber(true) : m.len;
                }
                if (m.totalAllocated != null && m.hasOwnProperty("totalAllocated")) {
                    if (typeof m.totalAllocated === "number")
                        d.totalAllocated = o.longs === String ? String(m.totalAllocated) : m.totalAllocated;
                    else
                        d.totalAllocated = o.longs === String ? $util.Long.prototype.toString.call(m.totalAllocated) : o.longs === Number ? new $util.LongBits(m.totalAllocated.low >>> 0, m.totalAllocated.high >>> 0).toNumber() : m.totalAllocated;
                }
                return d;
            };

            /**
             * Converts this IonHeapShrinkFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IonHeapShrinkFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IonHeapShrinkFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IonHeapShrinkFtraceEvent;
        })();

        protos.IonHeapGrowFtraceEvent = (function() {

            /**
             * Properties of an IonHeapGrowFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIonHeapGrowFtraceEvent
             * @property {string|null} [heapName] IonHeapGrowFtraceEvent heapName
             * @property {number|null} [len] IonHeapGrowFtraceEvent len
             * @property {number|null} [totalAllocated] IonHeapGrowFtraceEvent totalAllocated
             */

            /**
             * Constructs a new IonHeapGrowFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IonHeapGrowFtraceEvent.
             * @implements IIonHeapGrowFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIonHeapGrowFtraceEvent=} [p] Properties to set
             */
            function IonHeapGrowFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IonHeapGrowFtraceEvent heapName.
             * @member {string} heapName
             * @memberof perfetto.protos.IonHeapGrowFtraceEvent
             * @instance
             */
            IonHeapGrowFtraceEvent.prototype.heapName = "";

            /**
             * IonHeapGrowFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.IonHeapGrowFtraceEvent
             * @instance
             */
            IonHeapGrowFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IonHeapGrowFtraceEvent totalAllocated.
             * @member {number} totalAllocated
             * @memberof perfetto.protos.IonHeapGrowFtraceEvent
             * @instance
             */
            IonHeapGrowFtraceEvent.prototype.totalAllocated = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new IonHeapGrowFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IonHeapGrowFtraceEvent
             * @static
             * @param {perfetto.protos.IIonHeapGrowFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IonHeapGrowFtraceEvent} IonHeapGrowFtraceEvent instance
             */
            IonHeapGrowFtraceEvent.create = function create(properties) {
                return new IonHeapGrowFtraceEvent(properties);
            };

            /**
             * Encodes the specified IonHeapGrowFtraceEvent message. Does not implicitly {@link perfetto.protos.IonHeapGrowFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IonHeapGrowFtraceEvent
             * @static
             * @param {perfetto.protos.IIonHeapGrowFtraceEvent} m IonHeapGrowFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonHeapGrowFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.heapName != null && Object.hasOwnProperty.call(m, "heapName"))
                    w.uint32(10).string(m.heapName);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(16).uint64(m.len);
                if (m.totalAllocated != null && Object.hasOwnProperty.call(m, "totalAllocated"))
                    w.uint32(24).int64(m.totalAllocated);
                return w;
            };

            /**
             * Encodes the specified IonHeapGrowFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IonHeapGrowFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IonHeapGrowFtraceEvent
             * @static
             * @param {perfetto.protos.IIonHeapGrowFtraceEvent} message IonHeapGrowFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonHeapGrowFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IonHeapGrowFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IonHeapGrowFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IonHeapGrowFtraceEvent} IonHeapGrowFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonHeapGrowFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IonHeapGrowFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.heapName = r.string();
                        break;
                    case 2:
                        m.len = r.uint64();
                        break;
                    case 3:
                        m.totalAllocated = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IonHeapGrowFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IonHeapGrowFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IonHeapGrowFtraceEvent} IonHeapGrowFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonHeapGrowFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IonHeapGrowFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IonHeapGrowFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IonHeapGrowFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.heapName != null && m.hasOwnProperty("heapName")) {
                    if (!$util.isString(m.heapName))
                        return "heapName: string expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                if (m.totalAllocated != null && m.hasOwnProperty("totalAllocated")) {
                    if (!$util.isInteger(m.totalAllocated) && !(m.totalAllocated && $util.isInteger(m.totalAllocated.low) && $util.isInteger(m.totalAllocated.high)))
                        return "totalAllocated: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an IonHeapGrowFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IonHeapGrowFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IonHeapGrowFtraceEvent} IonHeapGrowFtraceEvent
             */
            IonHeapGrowFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IonHeapGrowFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IonHeapGrowFtraceEvent();
                if (d.heapName != null) {
                    m.heapName = String(d.heapName);
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = true;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber(true);
                }
                if (d.totalAllocated != null) {
                    if ($util.Long)
                        (m.totalAllocated = $util.Long.fromValue(d.totalAllocated)).unsigned = false;
                    else if (typeof d.totalAllocated === "string")
                        m.totalAllocated = parseInt(d.totalAllocated, 10);
                    else if (typeof d.totalAllocated === "number")
                        m.totalAllocated = d.totalAllocated;
                    else if (typeof d.totalAllocated === "object")
                        m.totalAllocated = new $util.LongBits(d.totalAllocated.low >>> 0, d.totalAllocated.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from an IonHeapGrowFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IonHeapGrowFtraceEvent
             * @static
             * @param {perfetto.protos.IonHeapGrowFtraceEvent} m IonHeapGrowFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IonHeapGrowFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.heapName = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.totalAllocated = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.totalAllocated = o.longs === String ? "0" : 0;
                }
                if (m.heapName != null && m.hasOwnProperty("heapName")) {
                    d.heapName = m.heapName;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber(true) : m.len;
                }
                if (m.totalAllocated != null && m.hasOwnProperty("totalAllocated")) {
                    if (typeof m.totalAllocated === "number")
                        d.totalAllocated = o.longs === String ? String(m.totalAllocated) : m.totalAllocated;
                    else
                        d.totalAllocated = o.longs === String ? $util.Long.prototype.toString.call(m.totalAllocated) : o.longs === Number ? new $util.LongBits(m.totalAllocated.low >>> 0, m.totalAllocated.high >>> 0).toNumber() : m.totalAllocated;
                }
                return d;
            };

            /**
             * Converts this IonHeapGrowFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IonHeapGrowFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IonHeapGrowFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IonHeapGrowFtraceEvent;
        })();

        protos.IonBufferCreateFtraceEvent = (function() {

            /**
             * Properties of an IonBufferCreateFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIonBufferCreateFtraceEvent
             * @property {number|null} [addr] IonBufferCreateFtraceEvent addr
             * @property {number|null} [len] IonBufferCreateFtraceEvent len
             */

            /**
             * Constructs a new IonBufferCreateFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IonBufferCreateFtraceEvent.
             * @implements IIonBufferCreateFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIonBufferCreateFtraceEvent=} [p] Properties to set
             */
            function IonBufferCreateFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IonBufferCreateFtraceEvent addr.
             * @member {number} addr
             * @memberof perfetto.protos.IonBufferCreateFtraceEvent
             * @instance
             */
            IonBufferCreateFtraceEvent.prototype.addr = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IonBufferCreateFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.IonBufferCreateFtraceEvent
             * @instance
             */
            IonBufferCreateFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new IonBufferCreateFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IonBufferCreateFtraceEvent
             * @static
             * @param {perfetto.protos.IIonBufferCreateFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IonBufferCreateFtraceEvent} IonBufferCreateFtraceEvent instance
             */
            IonBufferCreateFtraceEvent.create = function create(properties) {
                return new IonBufferCreateFtraceEvent(properties);
            };

            /**
             * Encodes the specified IonBufferCreateFtraceEvent message. Does not implicitly {@link perfetto.protos.IonBufferCreateFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IonBufferCreateFtraceEvent
             * @static
             * @param {perfetto.protos.IIonBufferCreateFtraceEvent} m IonBufferCreateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonBufferCreateFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.addr != null && Object.hasOwnProperty.call(m, "addr"))
                    w.uint32(8).uint64(m.addr);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(16).uint64(m.len);
                return w;
            };

            /**
             * Encodes the specified IonBufferCreateFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IonBufferCreateFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IonBufferCreateFtraceEvent
             * @static
             * @param {perfetto.protos.IIonBufferCreateFtraceEvent} message IonBufferCreateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonBufferCreateFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IonBufferCreateFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IonBufferCreateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IonBufferCreateFtraceEvent} IonBufferCreateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonBufferCreateFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IonBufferCreateFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.addr = r.uint64();
                        break;
                    case 2:
                        m.len = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IonBufferCreateFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IonBufferCreateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IonBufferCreateFtraceEvent} IonBufferCreateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonBufferCreateFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IonBufferCreateFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IonBufferCreateFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IonBufferCreateFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.addr != null && m.hasOwnProperty("addr")) {
                    if (!$util.isInteger(m.addr) && !(m.addr && $util.isInteger(m.addr.low) && $util.isInteger(m.addr.high)))
                        return "addr: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an IonBufferCreateFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IonBufferCreateFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IonBufferCreateFtraceEvent} IonBufferCreateFtraceEvent
             */
            IonBufferCreateFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IonBufferCreateFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IonBufferCreateFtraceEvent();
                if (d.addr != null) {
                    if ($util.Long)
                        (m.addr = $util.Long.fromValue(d.addr)).unsigned = true;
                    else if (typeof d.addr === "string")
                        m.addr = parseInt(d.addr, 10);
                    else if (typeof d.addr === "number")
                        m.addr = d.addr;
                    else if (typeof d.addr === "object")
                        m.addr = new $util.LongBits(d.addr.low >>> 0, d.addr.high >>> 0).toNumber(true);
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = true;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an IonBufferCreateFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IonBufferCreateFtraceEvent
             * @static
             * @param {perfetto.protos.IonBufferCreateFtraceEvent} m IonBufferCreateFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IonBufferCreateFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.addr = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.addr = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                }
                if (m.addr != null && m.hasOwnProperty("addr")) {
                    if (typeof m.addr === "number")
                        d.addr = o.longs === String ? String(m.addr) : m.addr;
                    else
                        d.addr = o.longs === String ? $util.Long.prototype.toString.call(m.addr) : o.longs === Number ? new $util.LongBits(m.addr.low >>> 0, m.addr.high >>> 0).toNumber(true) : m.addr;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber(true) : m.len;
                }
                return d;
            };

            /**
             * Converts this IonBufferCreateFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IonBufferCreateFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IonBufferCreateFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IonBufferCreateFtraceEvent;
        })();

        protos.IonBufferDestroyFtraceEvent = (function() {

            /**
             * Properties of an IonBufferDestroyFtraceEvent.
             * @memberof perfetto.protos
             * @interface IIonBufferDestroyFtraceEvent
             * @property {number|null} [addr] IonBufferDestroyFtraceEvent addr
             * @property {number|null} [len] IonBufferDestroyFtraceEvent len
             */

            /**
             * Constructs a new IonBufferDestroyFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an IonBufferDestroyFtraceEvent.
             * @implements IIonBufferDestroyFtraceEvent
             * @constructor
             * @param {perfetto.protos.IIonBufferDestroyFtraceEvent=} [p] Properties to set
             */
            function IonBufferDestroyFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * IonBufferDestroyFtraceEvent addr.
             * @member {number} addr
             * @memberof perfetto.protos.IonBufferDestroyFtraceEvent
             * @instance
             */
            IonBufferDestroyFtraceEvent.prototype.addr = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * IonBufferDestroyFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.IonBufferDestroyFtraceEvent
             * @instance
             */
            IonBufferDestroyFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new IonBufferDestroyFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.IonBufferDestroyFtraceEvent
             * @static
             * @param {perfetto.protos.IIonBufferDestroyFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.IonBufferDestroyFtraceEvent} IonBufferDestroyFtraceEvent instance
             */
            IonBufferDestroyFtraceEvent.create = function create(properties) {
                return new IonBufferDestroyFtraceEvent(properties);
            };

            /**
             * Encodes the specified IonBufferDestroyFtraceEvent message. Does not implicitly {@link perfetto.protos.IonBufferDestroyFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.IonBufferDestroyFtraceEvent
             * @static
             * @param {perfetto.protos.IIonBufferDestroyFtraceEvent} m IonBufferDestroyFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonBufferDestroyFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.addr != null && Object.hasOwnProperty.call(m, "addr"))
                    w.uint32(8).uint64(m.addr);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(16).uint64(m.len);
                return w;
            };

            /**
             * Encodes the specified IonBufferDestroyFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.IonBufferDestroyFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.IonBufferDestroyFtraceEvent
             * @static
             * @param {perfetto.protos.IIonBufferDestroyFtraceEvent} message IonBufferDestroyFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            IonBufferDestroyFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an IonBufferDestroyFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.IonBufferDestroyFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.IonBufferDestroyFtraceEvent} IonBufferDestroyFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonBufferDestroyFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.IonBufferDestroyFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.addr = r.uint64();
                        break;
                    case 2:
                        m.len = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an IonBufferDestroyFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.IonBufferDestroyFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.IonBufferDestroyFtraceEvent} IonBufferDestroyFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            IonBufferDestroyFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an IonBufferDestroyFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.IonBufferDestroyFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            IonBufferDestroyFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.addr != null && m.hasOwnProperty("addr")) {
                    if (!$util.isInteger(m.addr) && !(m.addr && $util.isInteger(m.addr.low) && $util.isInteger(m.addr.high)))
                        return "addr: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an IonBufferDestroyFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.IonBufferDestroyFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.IonBufferDestroyFtraceEvent} IonBufferDestroyFtraceEvent
             */
            IonBufferDestroyFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.IonBufferDestroyFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.IonBufferDestroyFtraceEvent();
                if (d.addr != null) {
                    if ($util.Long)
                        (m.addr = $util.Long.fromValue(d.addr)).unsigned = true;
                    else if (typeof d.addr === "string")
                        m.addr = parseInt(d.addr, 10);
                    else if (typeof d.addr === "number")
                        m.addr = d.addr;
                    else if (typeof d.addr === "object")
                        m.addr = new $util.LongBits(d.addr.low >>> 0, d.addr.high >>> 0).toNumber(true);
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = true;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an IonBufferDestroyFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.IonBufferDestroyFtraceEvent
             * @static
             * @param {perfetto.protos.IonBufferDestroyFtraceEvent} m IonBufferDestroyFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            IonBufferDestroyFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.addr = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.addr = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                }
                if (m.addr != null && m.hasOwnProperty("addr")) {
                    if (typeof m.addr === "number")
                        d.addr = o.longs === String ? String(m.addr) : m.addr;
                    else
                        d.addr = o.longs === String ? $util.Long.prototype.toString.call(m.addr) : o.longs === Number ? new $util.LongBits(m.addr.low >>> 0, m.addr.high >>> 0).toNumber(true) : m.addr;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber(true) : m.len;
                }
                return d;
            };

            /**
             * Converts this IonBufferDestroyFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.IonBufferDestroyFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            IonBufferDestroyFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return IonBufferDestroyFtraceEvent;
        })();

        protos.KvmAccessFaultFtraceEvent = (function() {

            /**
             * Properties of a KvmAccessFaultFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmAccessFaultFtraceEvent
             * @property {number|null} [ipa] KvmAccessFaultFtraceEvent ipa
             */

            /**
             * Constructs a new KvmAccessFaultFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmAccessFaultFtraceEvent.
             * @implements IKvmAccessFaultFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmAccessFaultFtraceEvent=} [p] Properties to set
             */
            function KvmAccessFaultFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmAccessFaultFtraceEvent ipa.
             * @member {number} ipa
             * @memberof perfetto.protos.KvmAccessFaultFtraceEvent
             * @instance
             */
            KvmAccessFaultFtraceEvent.prototype.ipa = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KvmAccessFaultFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmAccessFaultFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmAccessFaultFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmAccessFaultFtraceEvent} KvmAccessFaultFtraceEvent instance
             */
            KvmAccessFaultFtraceEvent.create = function create(properties) {
                return new KvmAccessFaultFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmAccessFaultFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmAccessFaultFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmAccessFaultFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmAccessFaultFtraceEvent} m KvmAccessFaultFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmAccessFaultFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.ipa != null && Object.hasOwnProperty.call(m, "ipa"))
                    w.uint32(8).uint64(m.ipa);
                return w;
            };

            /**
             * Encodes the specified KvmAccessFaultFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmAccessFaultFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmAccessFaultFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmAccessFaultFtraceEvent} message KvmAccessFaultFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmAccessFaultFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmAccessFaultFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmAccessFaultFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmAccessFaultFtraceEvent} KvmAccessFaultFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmAccessFaultFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmAccessFaultFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.ipa = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmAccessFaultFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmAccessFaultFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmAccessFaultFtraceEvent} KvmAccessFaultFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmAccessFaultFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmAccessFaultFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmAccessFaultFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmAccessFaultFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.ipa != null && m.hasOwnProperty("ipa")) {
                    if (!$util.isInteger(m.ipa) && !(m.ipa && $util.isInteger(m.ipa.low) && $util.isInteger(m.ipa.high)))
                        return "ipa: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KvmAccessFaultFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmAccessFaultFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmAccessFaultFtraceEvent} KvmAccessFaultFtraceEvent
             */
            KvmAccessFaultFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmAccessFaultFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmAccessFaultFtraceEvent();
                if (d.ipa != null) {
                    if ($util.Long)
                        (m.ipa = $util.Long.fromValue(d.ipa)).unsigned = true;
                    else if (typeof d.ipa === "string")
                        m.ipa = parseInt(d.ipa, 10);
                    else if (typeof d.ipa === "number")
                        m.ipa = d.ipa;
                    else if (typeof d.ipa === "object")
                        m.ipa = new $util.LongBits(d.ipa.low >>> 0, d.ipa.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmAccessFaultFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmAccessFaultFtraceEvent
             * @static
             * @param {perfetto.protos.KvmAccessFaultFtraceEvent} m KvmAccessFaultFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmAccessFaultFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ipa = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ipa = o.longs === String ? "0" : 0;
                }
                if (m.ipa != null && m.hasOwnProperty("ipa")) {
                    if (typeof m.ipa === "number")
                        d.ipa = o.longs === String ? String(m.ipa) : m.ipa;
                    else
                        d.ipa = o.longs === String ? $util.Long.prototype.toString.call(m.ipa) : o.longs === Number ? new $util.LongBits(m.ipa.low >>> 0, m.ipa.high >>> 0).toNumber(true) : m.ipa;
                }
                return d;
            };

            /**
             * Converts this KvmAccessFaultFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmAccessFaultFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmAccessFaultFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmAccessFaultFtraceEvent;
        })();

        protos.KvmAckIrqFtraceEvent = (function() {

            /**
             * Properties of a KvmAckIrqFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmAckIrqFtraceEvent
             * @property {number|null} [irqchip] KvmAckIrqFtraceEvent irqchip
             * @property {number|null} [pin] KvmAckIrqFtraceEvent pin
             */

            /**
             * Constructs a new KvmAckIrqFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmAckIrqFtraceEvent.
             * @implements IKvmAckIrqFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmAckIrqFtraceEvent=} [p] Properties to set
             */
            function KvmAckIrqFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmAckIrqFtraceEvent irqchip.
             * @member {number} irqchip
             * @memberof perfetto.protos.KvmAckIrqFtraceEvent
             * @instance
             */
            KvmAckIrqFtraceEvent.prototype.irqchip = 0;

            /**
             * KvmAckIrqFtraceEvent pin.
             * @member {number} pin
             * @memberof perfetto.protos.KvmAckIrqFtraceEvent
             * @instance
             */
            KvmAckIrqFtraceEvent.prototype.pin = 0;

            /**
             * Creates a new KvmAckIrqFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmAckIrqFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmAckIrqFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmAckIrqFtraceEvent} KvmAckIrqFtraceEvent instance
             */
            KvmAckIrqFtraceEvent.create = function create(properties) {
                return new KvmAckIrqFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmAckIrqFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmAckIrqFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmAckIrqFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmAckIrqFtraceEvent} m KvmAckIrqFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmAckIrqFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.irqchip != null && Object.hasOwnProperty.call(m, "irqchip"))
                    w.uint32(8).uint32(m.irqchip);
                if (m.pin != null && Object.hasOwnProperty.call(m, "pin"))
                    w.uint32(16).uint32(m.pin);
                return w;
            };

            /**
             * Encodes the specified KvmAckIrqFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmAckIrqFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmAckIrqFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmAckIrqFtraceEvent} message KvmAckIrqFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmAckIrqFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmAckIrqFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmAckIrqFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmAckIrqFtraceEvent} KvmAckIrqFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmAckIrqFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmAckIrqFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.irqchip = r.uint32();
                        break;
                    case 2:
                        m.pin = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmAckIrqFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmAckIrqFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmAckIrqFtraceEvent} KvmAckIrqFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmAckIrqFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmAckIrqFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmAckIrqFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmAckIrqFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.irqchip != null && m.hasOwnProperty("irqchip")) {
                    if (!$util.isInteger(m.irqchip))
                        return "irqchip: integer expected";
                }
                if (m.pin != null && m.hasOwnProperty("pin")) {
                    if (!$util.isInteger(m.pin))
                        return "pin: integer expected";
                }
                return null;
            };

            /**
             * Creates a KvmAckIrqFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmAckIrqFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmAckIrqFtraceEvent} KvmAckIrqFtraceEvent
             */
            KvmAckIrqFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmAckIrqFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmAckIrqFtraceEvent();
                if (d.irqchip != null) {
                    m.irqchip = d.irqchip >>> 0;
                }
                if (d.pin != null) {
                    m.pin = d.pin >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmAckIrqFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmAckIrqFtraceEvent
             * @static
             * @param {perfetto.protos.KvmAckIrqFtraceEvent} m KvmAckIrqFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmAckIrqFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.irqchip = 0;
                    d.pin = 0;
                }
                if (m.irqchip != null && m.hasOwnProperty("irqchip")) {
                    d.irqchip = m.irqchip;
                }
                if (m.pin != null && m.hasOwnProperty("pin")) {
                    d.pin = m.pin;
                }
                return d;
            };

            /**
             * Converts this KvmAckIrqFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmAckIrqFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmAckIrqFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmAckIrqFtraceEvent;
        })();

        protos.KvmAgeHvaFtraceEvent = (function() {

            /**
             * Properties of a KvmAgeHvaFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmAgeHvaFtraceEvent
             * @property {number|null} [end] KvmAgeHvaFtraceEvent end
             * @property {number|null} [start] KvmAgeHvaFtraceEvent start
             */

            /**
             * Constructs a new KvmAgeHvaFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmAgeHvaFtraceEvent.
             * @implements IKvmAgeHvaFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmAgeHvaFtraceEvent=} [p] Properties to set
             */
            function KvmAgeHvaFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmAgeHvaFtraceEvent end.
             * @member {number} end
             * @memberof perfetto.protos.KvmAgeHvaFtraceEvent
             * @instance
             */
            KvmAgeHvaFtraceEvent.prototype.end = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KvmAgeHvaFtraceEvent start.
             * @member {number} start
             * @memberof perfetto.protos.KvmAgeHvaFtraceEvent
             * @instance
             */
            KvmAgeHvaFtraceEvent.prototype.start = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KvmAgeHvaFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmAgeHvaFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmAgeHvaFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmAgeHvaFtraceEvent} KvmAgeHvaFtraceEvent instance
             */
            KvmAgeHvaFtraceEvent.create = function create(properties) {
                return new KvmAgeHvaFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmAgeHvaFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmAgeHvaFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmAgeHvaFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmAgeHvaFtraceEvent} m KvmAgeHvaFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmAgeHvaFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.end != null && Object.hasOwnProperty.call(m, "end"))
                    w.uint32(8).uint64(m.end);
                if (m.start != null && Object.hasOwnProperty.call(m, "start"))
                    w.uint32(16).uint64(m.start);
                return w;
            };

            /**
             * Encodes the specified KvmAgeHvaFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmAgeHvaFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmAgeHvaFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmAgeHvaFtraceEvent} message KvmAgeHvaFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmAgeHvaFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmAgeHvaFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmAgeHvaFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmAgeHvaFtraceEvent} KvmAgeHvaFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmAgeHvaFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmAgeHvaFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.end = r.uint64();
                        break;
                    case 2:
                        m.start = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmAgeHvaFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmAgeHvaFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmAgeHvaFtraceEvent} KvmAgeHvaFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmAgeHvaFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmAgeHvaFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmAgeHvaFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmAgeHvaFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.end != null && m.hasOwnProperty("end")) {
                    if (!$util.isInteger(m.end) && !(m.end && $util.isInteger(m.end.low) && $util.isInteger(m.end.high)))
                        return "end: integer|Long expected";
                }
                if (m.start != null && m.hasOwnProperty("start")) {
                    if (!$util.isInteger(m.start) && !(m.start && $util.isInteger(m.start.low) && $util.isInteger(m.start.high)))
                        return "start: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KvmAgeHvaFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmAgeHvaFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmAgeHvaFtraceEvent} KvmAgeHvaFtraceEvent
             */
            KvmAgeHvaFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmAgeHvaFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmAgeHvaFtraceEvent();
                if (d.end != null) {
                    if ($util.Long)
                        (m.end = $util.Long.fromValue(d.end)).unsigned = true;
                    else if (typeof d.end === "string")
                        m.end = parseInt(d.end, 10);
                    else if (typeof d.end === "number")
                        m.end = d.end;
                    else if (typeof d.end === "object")
                        m.end = new $util.LongBits(d.end.low >>> 0, d.end.high >>> 0).toNumber(true);
                }
                if (d.start != null) {
                    if ($util.Long)
                        (m.start = $util.Long.fromValue(d.start)).unsigned = true;
                    else if (typeof d.start === "string")
                        m.start = parseInt(d.start, 10);
                    else if (typeof d.start === "number")
                        m.start = d.start;
                    else if (typeof d.start === "object")
                        m.start = new $util.LongBits(d.start.low >>> 0, d.start.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmAgeHvaFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmAgeHvaFtraceEvent
             * @static
             * @param {perfetto.protos.KvmAgeHvaFtraceEvent} m KvmAgeHvaFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmAgeHvaFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.end = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.end = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.start = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.start = o.longs === String ? "0" : 0;
                }
                if (m.end != null && m.hasOwnProperty("end")) {
                    if (typeof m.end === "number")
                        d.end = o.longs === String ? String(m.end) : m.end;
                    else
                        d.end = o.longs === String ? $util.Long.prototype.toString.call(m.end) : o.longs === Number ? new $util.LongBits(m.end.low >>> 0, m.end.high >>> 0).toNumber(true) : m.end;
                }
                if (m.start != null && m.hasOwnProperty("start")) {
                    if (typeof m.start === "number")
                        d.start = o.longs === String ? String(m.start) : m.start;
                    else
                        d.start = o.longs === String ? $util.Long.prototype.toString.call(m.start) : o.longs === Number ? new $util.LongBits(m.start.low >>> 0, m.start.high >>> 0).toNumber(true) : m.start;
                }
                return d;
            };

            /**
             * Converts this KvmAgeHvaFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmAgeHvaFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmAgeHvaFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmAgeHvaFtraceEvent;
        })();

        protos.KvmAgePageFtraceEvent = (function() {

            /**
             * Properties of a KvmAgePageFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmAgePageFtraceEvent
             * @property {number|null} [gfn] KvmAgePageFtraceEvent gfn
             * @property {number|null} [hva] KvmAgePageFtraceEvent hva
             * @property {number|null} [level] KvmAgePageFtraceEvent level
             * @property {number|null} [referenced] KvmAgePageFtraceEvent referenced
             */

            /**
             * Constructs a new KvmAgePageFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmAgePageFtraceEvent.
             * @implements IKvmAgePageFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmAgePageFtraceEvent=} [p] Properties to set
             */
            function KvmAgePageFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmAgePageFtraceEvent gfn.
             * @member {number} gfn
             * @memberof perfetto.protos.KvmAgePageFtraceEvent
             * @instance
             */
            KvmAgePageFtraceEvent.prototype.gfn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KvmAgePageFtraceEvent hva.
             * @member {number} hva
             * @memberof perfetto.protos.KvmAgePageFtraceEvent
             * @instance
             */
            KvmAgePageFtraceEvent.prototype.hva = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KvmAgePageFtraceEvent level.
             * @member {number} level
             * @memberof perfetto.protos.KvmAgePageFtraceEvent
             * @instance
             */
            KvmAgePageFtraceEvent.prototype.level = 0;

            /**
             * KvmAgePageFtraceEvent referenced.
             * @member {number} referenced
             * @memberof perfetto.protos.KvmAgePageFtraceEvent
             * @instance
             */
            KvmAgePageFtraceEvent.prototype.referenced = 0;

            /**
             * Creates a new KvmAgePageFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmAgePageFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmAgePageFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmAgePageFtraceEvent} KvmAgePageFtraceEvent instance
             */
            KvmAgePageFtraceEvent.create = function create(properties) {
                return new KvmAgePageFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmAgePageFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmAgePageFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmAgePageFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmAgePageFtraceEvent} m KvmAgePageFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmAgePageFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.gfn != null && Object.hasOwnProperty.call(m, "gfn"))
                    w.uint32(8).uint64(m.gfn);
                if (m.hva != null && Object.hasOwnProperty.call(m, "hva"))
                    w.uint32(16).uint64(m.hva);
                if (m.level != null && Object.hasOwnProperty.call(m, "level"))
                    w.uint32(24).uint32(m.level);
                if (m.referenced != null && Object.hasOwnProperty.call(m, "referenced"))
                    w.uint32(32).uint32(m.referenced);
                return w;
            };

            /**
             * Encodes the specified KvmAgePageFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmAgePageFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmAgePageFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmAgePageFtraceEvent} message KvmAgePageFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmAgePageFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmAgePageFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmAgePageFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmAgePageFtraceEvent} KvmAgePageFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmAgePageFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmAgePageFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.gfn = r.uint64();
                        break;
                    case 2:
                        m.hva = r.uint64();
                        break;
                    case 3:
                        m.level = r.uint32();
                        break;
                    case 4:
                        m.referenced = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmAgePageFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmAgePageFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmAgePageFtraceEvent} KvmAgePageFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmAgePageFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmAgePageFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmAgePageFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmAgePageFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.gfn != null && m.hasOwnProperty("gfn")) {
                    if (!$util.isInteger(m.gfn) && !(m.gfn && $util.isInteger(m.gfn.low) && $util.isInteger(m.gfn.high)))
                        return "gfn: integer|Long expected";
                }
                if (m.hva != null && m.hasOwnProperty("hva")) {
                    if (!$util.isInteger(m.hva) && !(m.hva && $util.isInteger(m.hva.low) && $util.isInteger(m.hva.high)))
                        return "hva: integer|Long expected";
                }
                if (m.level != null && m.hasOwnProperty("level")) {
                    if (!$util.isInteger(m.level))
                        return "level: integer expected";
                }
                if (m.referenced != null && m.hasOwnProperty("referenced")) {
                    if (!$util.isInteger(m.referenced))
                        return "referenced: integer expected";
                }
                return null;
            };

            /**
             * Creates a KvmAgePageFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmAgePageFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmAgePageFtraceEvent} KvmAgePageFtraceEvent
             */
            KvmAgePageFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmAgePageFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmAgePageFtraceEvent();
                if (d.gfn != null) {
                    if ($util.Long)
                        (m.gfn = $util.Long.fromValue(d.gfn)).unsigned = true;
                    else if (typeof d.gfn === "string")
                        m.gfn = parseInt(d.gfn, 10);
                    else if (typeof d.gfn === "number")
                        m.gfn = d.gfn;
                    else if (typeof d.gfn === "object")
                        m.gfn = new $util.LongBits(d.gfn.low >>> 0, d.gfn.high >>> 0).toNumber(true);
                }
                if (d.hva != null) {
                    if ($util.Long)
                        (m.hva = $util.Long.fromValue(d.hva)).unsigned = true;
                    else if (typeof d.hva === "string")
                        m.hva = parseInt(d.hva, 10);
                    else if (typeof d.hva === "number")
                        m.hva = d.hva;
                    else if (typeof d.hva === "object")
                        m.hva = new $util.LongBits(d.hva.low >>> 0, d.hva.high >>> 0).toNumber(true);
                }
                if (d.level != null) {
                    m.level = d.level >>> 0;
                }
                if (d.referenced != null) {
                    m.referenced = d.referenced >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmAgePageFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmAgePageFtraceEvent
             * @static
             * @param {perfetto.protos.KvmAgePageFtraceEvent} m KvmAgePageFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmAgePageFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.gfn = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.gfn = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.hva = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.hva = o.longs === String ? "0" : 0;
                    d.level = 0;
                    d.referenced = 0;
                }
                if (m.gfn != null && m.hasOwnProperty("gfn")) {
                    if (typeof m.gfn === "number")
                        d.gfn = o.longs === String ? String(m.gfn) : m.gfn;
                    else
                        d.gfn = o.longs === String ? $util.Long.prototype.toString.call(m.gfn) : o.longs === Number ? new $util.LongBits(m.gfn.low >>> 0, m.gfn.high >>> 0).toNumber(true) : m.gfn;
                }
                if (m.hva != null && m.hasOwnProperty("hva")) {
                    if (typeof m.hva === "number")
                        d.hva = o.longs === String ? String(m.hva) : m.hva;
                    else
                        d.hva = o.longs === String ? $util.Long.prototype.toString.call(m.hva) : o.longs === Number ? new $util.LongBits(m.hva.low >>> 0, m.hva.high >>> 0).toNumber(true) : m.hva;
                }
                if (m.level != null && m.hasOwnProperty("level")) {
                    d.level = m.level;
                }
                if (m.referenced != null && m.hasOwnProperty("referenced")) {
                    d.referenced = m.referenced;
                }
                return d;
            };

            /**
             * Converts this KvmAgePageFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmAgePageFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmAgePageFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmAgePageFtraceEvent;
        })();

        protos.KvmArmClearDebugFtraceEvent = (function() {

            /**
             * Properties of a KvmArmClearDebugFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmArmClearDebugFtraceEvent
             * @property {number|null} [guestDebug] KvmArmClearDebugFtraceEvent guestDebug
             */

            /**
             * Constructs a new KvmArmClearDebugFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmArmClearDebugFtraceEvent.
             * @implements IKvmArmClearDebugFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmArmClearDebugFtraceEvent=} [p] Properties to set
             */
            function KvmArmClearDebugFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmArmClearDebugFtraceEvent guestDebug.
             * @member {number} guestDebug
             * @memberof perfetto.protos.KvmArmClearDebugFtraceEvent
             * @instance
             */
            KvmArmClearDebugFtraceEvent.prototype.guestDebug = 0;

            /**
             * Creates a new KvmArmClearDebugFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmArmClearDebugFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmArmClearDebugFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmArmClearDebugFtraceEvent} KvmArmClearDebugFtraceEvent instance
             */
            KvmArmClearDebugFtraceEvent.create = function create(properties) {
                return new KvmArmClearDebugFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmArmClearDebugFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmArmClearDebugFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmArmClearDebugFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmArmClearDebugFtraceEvent} m KvmArmClearDebugFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmArmClearDebugFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.guestDebug != null && Object.hasOwnProperty.call(m, "guestDebug"))
                    w.uint32(8).uint32(m.guestDebug);
                return w;
            };

            /**
             * Encodes the specified KvmArmClearDebugFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmArmClearDebugFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmArmClearDebugFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmArmClearDebugFtraceEvent} message KvmArmClearDebugFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmArmClearDebugFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmArmClearDebugFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmArmClearDebugFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmArmClearDebugFtraceEvent} KvmArmClearDebugFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmArmClearDebugFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmArmClearDebugFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.guestDebug = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmArmClearDebugFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmArmClearDebugFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmArmClearDebugFtraceEvent} KvmArmClearDebugFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmArmClearDebugFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmArmClearDebugFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmArmClearDebugFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmArmClearDebugFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.guestDebug != null && m.hasOwnProperty("guestDebug")) {
                    if (!$util.isInteger(m.guestDebug))
                        return "guestDebug: integer expected";
                }
                return null;
            };

            /**
             * Creates a KvmArmClearDebugFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmArmClearDebugFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmArmClearDebugFtraceEvent} KvmArmClearDebugFtraceEvent
             */
            KvmArmClearDebugFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmArmClearDebugFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmArmClearDebugFtraceEvent();
                if (d.guestDebug != null) {
                    m.guestDebug = d.guestDebug >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmArmClearDebugFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmArmClearDebugFtraceEvent
             * @static
             * @param {perfetto.protos.KvmArmClearDebugFtraceEvent} m KvmArmClearDebugFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmArmClearDebugFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.guestDebug = 0;
                }
                if (m.guestDebug != null && m.hasOwnProperty("guestDebug")) {
                    d.guestDebug = m.guestDebug;
                }
                return d;
            };

            /**
             * Converts this KvmArmClearDebugFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmArmClearDebugFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmArmClearDebugFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmArmClearDebugFtraceEvent;
        })();

        protos.KvmArmSetDreg32FtraceEvent = (function() {

            /**
             * Properties of a KvmArmSetDreg32FtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmArmSetDreg32FtraceEvent
             * @property {string|null} [name] KvmArmSetDreg32FtraceEvent name
             * @property {number|null} [value] KvmArmSetDreg32FtraceEvent value
             */

            /**
             * Constructs a new KvmArmSetDreg32FtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmArmSetDreg32FtraceEvent.
             * @implements IKvmArmSetDreg32FtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmArmSetDreg32FtraceEvent=} [p] Properties to set
             */
            function KvmArmSetDreg32FtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmArmSetDreg32FtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.KvmArmSetDreg32FtraceEvent
             * @instance
             */
            KvmArmSetDreg32FtraceEvent.prototype.name = "";

            /**
             * KvmArmSetDreg32FtraceEvent value.
             * @member {number} value
             * @memberof perfetto.protos.KvmArmSetDreg32FtraceEvent
             * @instance
             */
            KvmArmSetDreg32FtraceEvent.prototype.value = 0;

            /**
             * Creates a new KvmArmSetDreg32FtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmArmSetDreg32FtraceEvent
             * @static
             * @param {perfetto.protos.IKvmArmSetDreg32FtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmArmSetDreg32FtraceEvent} KvmArmSetDreg32FtraceEvent instance
             */
            KvmArmSetDreg32FtraceEvent.create = function create(properties) {
                return new KvmArmSetDreg32FtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmArmSetDreg32FtraceEvent message. Does not implicitly {@link perfetto.protos.KvmArmSetDreg32FtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmArmSetDreg32FtraceEvent
             * @static
             * @param {perfetto.protos.IKvmArmSetDreg32FtraceEvent} m KvmArmSetDreg32FtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmArmSetDreg32FtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                if (m.value != null && Object.hasOwnProperty.call(m, "value"))
                    w.uint32(16).uint32(m.value);
                return w;
            };

            /**
             * Encodes the specified KvmArmSetDreg32FtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmArmSetDreg32FtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmArmSetDreg32FtraceEvent
             * @static
             * @param {perfetto.protos.IKvmArmSetDreg32FtraceEvent} message KvmArmSetDreg32FtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmArmSetDreg32FtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmArmSetDreg32FtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmArmSetDreg32FtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmArmSetDreg32FtraceEvent} KvmArmSetDreg32FtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmArmSetDreg32FtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmArmSetDreg32FtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    case 2:
                        m.value = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmArmSetDreg32FtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmArmSetDreg32FtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmArmSetDreg32FtraceEvent} KvmArmSetDreg32FtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmArmSetDreg32FtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmArmSetDreg32FtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmArmSetDreg32FtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmArmSetDreg32FtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.value != null && m.hasOwnProperty("value")) {
                    if (!$util.isInteger(m.value))
                        return "value: integer expected";
                }
                return null;
            };

            /**
             * Creates a KvmArmSetDreg32FtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmArmSetDreg32FtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmArmSetDreg32FtraceEvent} KvmArmSetDreg32FtraceEvent
             */
            KvmArmSetDreg32FtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmArmSetDreg32FtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmArmSetDreg32FtraceEvent();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.value != null) {
                    m.value = d.value >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmArmSetDreg32FtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmArmSetDreg32FtraceEvent
             * @static
             * @param {perfetto.protos.KvmArmSetDreg32FtraceEvent} m KvmArmSetDreg32FtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmArmSetDreg32FtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                    d.value = 0;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.value != null && m.hasOwnProperty("value")) {
                    d.value = m.value;
                }
                return d;
            };

            /**
             * Converts this KvmArmSetDreg32FtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmArmSetDreg32FtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmArmSetDreg32FtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmArmSetDreg32FtraceEvent;
        })();

        protos.KvmArmSetRegsetFtraceEvent = (function() {

            /**
             * Properties of a KvmArmSetRegsetFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmArmSetRegsetFtraceEvent
             * @property {number|null} [len] KvmArmSetRegsetFtraceEvent len
             * @property {string|null} [name] KvmArmSetRegsetFtraceEvent name
             */

            /**
             * Constructs a new KvmArmSetRegsetFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmArmSetRegsetFtraceEvent.
             * @implements IKvmArmSetRegsetFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmArmSetRegsetFtraceEvent=} [p] Properties to set
             */
            function KvmArmSetRegsetFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmArmSetRegsetFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.KvmArmSetRegsetFtraceEvent
             * @instance
             */
            KvmArmSetRegsetFtraceEvent.prototype.len = 0;

            /**
             * KvmArmSetRegsetFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.KvmArmSetRegsetFtraceEvent
             * @instance
             */
            KvmArmSetRegsetFtraceEvent.prototype.name = "";

            /**
             * Creates a new KvmArmSetRegsetFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmArmSetRegsetFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmArmSetRegsetFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmArmSetRegsetFtraceEvent} KvmArmSetRegsetFtraceEvent instance
             */
            KvmArmSetRegsetFtraceEvent.create = function create(properties) {
                return new KvmArmSetRegsetFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmArmSetRegsetFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmArmSetRegsetFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmArmSetRegsetFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmArmSetRegsetFtraceEvent} m KvmArmSetRegsetFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmArmSetRegsetFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(8).int32(m.len);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(18).string(m.name);
                return w;
            };

            /**
             * Encodes the specified KvmArmSetRegsetFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmArmSetRegsetFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmArmSetRegsetFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmArmSetRegsetFtraceEvent} message KvmArmSetRegsetFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmArmSetRegsetFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmArmSetRegsetFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmArmSetRegsetFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmArmSetRegsetFtraceEvent} KvmArmSetRegsetFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmArmSetRegsetFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmArmSetRegsetFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.len = r.int32();
                        break;
                    case 2:
                        m.name = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmArmSetRegsetFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmArmSetRegsetFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmArmSetRegsetFtraceEvent} KvmArmSetRegsetFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmArmSetRegsetFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmArmSetRegsetFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmArmSetRegsetFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmArmSetRegsetFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                return null;
            };

            /**
             * Creates a KvmArmSetRegsetFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmArmSetRegsetFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmArmSetRegsetFtraceEvent} KvmArmSetRegsetFtraceEvent
             */
            KvmArmSetRegsetFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmArmSetRegsetFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmArmSetRegsetFtraceEvent();
                if (d.len != null) {
                    m.len = d.len | 0;
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmArmSetRegsetFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmArmSetRegsetFtraceEvent
             * @static
             * @param {perfetto.protos.KvmArmSetRegsetFtraceEvent} m KvmArmSetRegsetFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmArmSetRegsetFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.len = 0;
                    d.name = "";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                return d;
            };

            /**
             * Converts this KvmArmSetRegsetFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmArmSetRegsetFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmArmSetRegsetFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmArmSetRegsetFtraceEvent;
        })();

        protos.KvmArmSetupDebugFtraceEvent = (function() {

            /**
             * Properties of a KvmArmSetupDebugFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmArmSetupDebugFtraceEvent
             * @property {number|null} [guestDebug] KvmArmSetupDebugFtraceEvent guestDebug
             * @property {number|null} [vcpu] KvmArmSetupDebugFtraceEvent vcpu
             */

            /**
             * Constructs a new KvmArmSetupDebugFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmArmSetupDebugFtraceEvent.
             * @implements IKvmArmSetupDebugFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmArmSetupDebugFtraceEvent=} [p] Properties to set
             */
            function KvmArmSetupDebugFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmArmSetupDebugFtraceEvent guestDebug.
             * @member {number} guestDebug
             * @memberof perfetto.protos.KvmArmSetupDebugFtraceEvent
             * @instance
             */
            KvmArmSetupDebugFtraceEvent.prototype.guestDebug = 0;

            /**
             * KvmArmSetupDebugFtraceEvent vcpu.
             * @member {number} vcpu
             * @memberof perfetto.protos.KvmArmSetupDebugFtraceEvent
             * @instance
             */
            KvmArmSetupDebugFtraceEvent.prototype.vcpu = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KvmArmSetupDebugFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmArmSetupDebugFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmArmSetupDebugFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmArmSetupDebugFtraceEvent} KvmArmSetupDebugFtraceEvent instance
             */
            KvmArmSetupDebugFtraceEvent.create = function create(properties) {
                return new KvmArmSetupDebugFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmArmSetupDebugFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmArmSetupDebugFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmArmSetupDebugFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmArmSetupDebugFtraceEvent} m KvmArmSetupDebugFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmArmSetupDebugFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.guestDebug != null && Object.hasOwnProperty.call(m, "guestDebug"))
                    w.uint32(8).uint32(m.guestDebug);
                if (m.vcpu != null && Object.hasOwnProperty.call(m, "vcpu"))
                    w.uint32(16).uint64(m.vcpu);
                return w;
            };

            /**
             * Encodes the specified KvmArmSetupDebugFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmArmSetupDebugFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmArmSetupDebugFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmArmSetupDebugFtraceEvent} message KvmArmSetupDebugFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmArmSetupDebugFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmArmSetupDebugFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmArmSetupDebugFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmArmSetupDebugFtraceEvent} KvmArmSetupDebugFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmArmSetupDebugFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmArmSetupDebugFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.guestDebug = r.uint32();
                        break;
                    case 2:
                        m.vcpu = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmArmSetupDebugFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmArmSetupDebugFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmArmSetupDebugFtraceEvent} KvmArmSetupDebugFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmArmSetupDebugFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmArmSetupDebugFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmArmSetupDebugFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmArmSetupDebugFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.guestDebug != null && m.hasOwnProperty("guestDebug")) {
                    if (!$util.isInteger(m.guestDebug))
                        return "guestDebug: integer expected";
                }
                if (m.vcpu != null && m.hasOwnProperty("vcpu")) {
                    if (!$util.isInteger(m.vcpu) && !(m.vcpu && $util.isInteger(m.vcpu.low) && $util.isInteger(m.vcpu.high)))
                        return "vcpu: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KvmArmSetupDebugFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmArmSetupDebugFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmArmSetupDebugFtraceEvent} KvmArmSetupDebugFtraceEvent
             */
            KvmArmSetupDebugFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmArmSetupDebugFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmArmSetupDebugFtraceEvent();
                if (d.guestDebug != null) {
                    m.guestDebug = d.guestDebug >>> 0;
                }
                if (d.vcpu != null) {
                    if ($util.Long)
                        (m.vcpu = $util.Long.fromValue(d.vcpu)).unsigned = true;
                    else if (typeof d.vcpu === "string")
                        m.vcpu = parseInt(d.vcpu, 10);
                    else if (typeof d.vcpu === "number")
                        m.vcpu = d.vcpu;
                    else if (typeof d.vcpu === "object")
                        m.vcpu = new $util.LongBits(d.vcpu.low >>> 0, d.vcpu.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmArmSetupDebugFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmArmSetupDebugFtraceEvent
             * @static
             * @param {perfetto.protos.KvmArmSetupDebugFtraceEvent} m KvmArmSetupDebugFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmArmSetupDebugFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.guestDebug = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.vcpu = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.vcpu = o.longs === String ? "0" : 0;
                }
                if (m.guestDebug != null && m.hasOwnProperty("guestDebug")) {
                    d.guestDebug = m.guestDebug;
                }
                if (m.vcpu != null && m.hasOwnProperty("vcpu")) {
                    if (typeof m.vcpu === "number")
                        d.vcpu = o.longs === String ? String(m.vcpu) : m.vcpu;
                    else
                        d.vcpu = o.longs === String ? $util.Long.prototype.toString.call(m.vcpu) : o.longs === Number ? new $util.LongBits(m.vcpu.low >>> 0, m.vcpu.high >>> 0).toNumber(true) : m.vcpu;
                }
                return d;
            };

            /**
             * Converts this KvmArmSetupDebugFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmArmSetupDebugFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmArmSetupDebugFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmArmSetupDebugFtraceEvent;
        })();

        protos.KvmEntryFtraceEvent = (function() {

            /**
             * Properties of a KvmEntryFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmEntryFtraceEvent
             * @property {number|null} [vcpuPc] KvmEntryFtraceEvent vcpuPc
             */

            /**
             * Constructs a new KvmEntryFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmEntryFtraceEvent.
             * @implements IKvmEntryFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmEntryFtraceEvent=} [p] Properties to set
             */
            function KvmEntryFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmEntryFtraceEvent vcpuPc.
             * @member {number} vcpuPc
             * @memberof perfetto.protos.KvmEntryFtraceEvent
             * @instance
             */
            KvmEntryFtraceEvent.prototype.vcpuPc = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KvmEntryFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmEntryFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmEntryFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmEntryFtraceEvent} KvmEntryFtraceEvent instance
             */
            KvmEntryFtraceEvent.create = function create(properties) {
                return new KvmEntryFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmEntryFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmEntryFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmEntryFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmEntryFtraceEvent} m KvmEntryFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmEntryFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.vcpuPc != null && Object.hasOwnProperty.call(m, "vcpuPc"))
                    w.uint32(8).uint64(m.vcpuPc);
                return w;
            };

            /**
             * Encodes the specified KvmEntryFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmEntryFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmEntryFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmEntryFtraceEvent} message KvmEntryFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmEntryFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmEntryFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmEntryFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmEntryFtraceEvent} KvmEntryFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmEntryFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmEntryFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.vcpuPc = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmEntryFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmEntryFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmEntryFtraceEvent} KvmEntryFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmEntryFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmEntryFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmEntryFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmEntryFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.vcpuPc != null && m.hasOwnProperty("vcpuPc")) {
                    if (!$util.isInteger(m.vcpuPc) && !(m.vcpuPc && $util.isInteger(m.vcpuPc.low) && $util.isInteger(m.vcpuPc.high)))
                        return "vcpuPc: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KvmEntryFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmEntryFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmEntryFtraceEvent} KvmEntryFtraceEvent
             */
            KvmEntryFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmEntryFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmEntryFtraceEvent();
                if (d.vcpuPc != null) {
                    if ($util.Long)
                        (m.vcpuPc = $util.Long.fromValue(d.vcpuPc)).unsigned = true;
                    else if (typeof d.vcpuPc === "string")
                        m.vcpuPc = parseInt(d.vcpuPc, 10);
                    else if (typeof d.vcpuPc === "number")
                        m.vcpuPc = d.vcpuPc;
                    else if (typeof d.vcpuPc === "object")
                        m.vcpuPc = new $util.LongBits(d.vcpuPc.low >>> 0, d.vcpuPc.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmEntryFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmEntryFtraceEvent
             * @static
             * @param {perfetto.protos.KvmEntryFtraceEvent} m KvmEntryFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmEntryFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.vcpuPc = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.vcpuPc = o.longs === String ? "0" : 0;
                }
                if (m.vcpuPc != null && m.hasOwnProperty("vcpuPc")) {
                    if (typeof m.vcpuPc === "number")
                        d.vcpuPc = o.longs === String ? String(m.vcpuPc) : m.vcpuPc;
                    else
                        d.vcpuPc = o.longs === String ? $util.Long.prototype.toString.call(m.vcpuPc) : o.longs === Number ? new $util.LongBits(m.vcpuPc.low >>> 0, m.vcpuPc.high >>> 0).toNumber(true) : m.vcpuPc;
                }
                return d;
            };

            /**
             * Converts this KvmEntryFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmEntryFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmEntryFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmEntryFtraceEvent;
        })();

        protos.KvmExitFtraceEvent = (function() {

            /**
             * Properties of a KvmExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmExitFtraceEvent
             * @property {number|null} [esrEc] KvmExitFtraceEvent esrEc
             * @property {number|null} [ret] KvmExitFtraceEvent ret
             * @property {number|null} [vcpuPc] KvmExitFtraceEvent vcpuPc
             */

            /**
             * Constructs a new KvmExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmExitFtraceEvent.
             * @implements IKvmExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmExitFtraceEvent=} [p] Properties to set
             */
            function KvmExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmExitFtraceEvent esrEc.
             * @member {number} esrEc
             * @memberof perfetto.protos.KvmExitFtraceEvent
             * @instance
             */
            KvmExitFtraceEvent.prototype.esrEc = 0;

            /**
             * KvmExitFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.KvmExitFtraceEvent
             * @instance
             */
            KvmExitFtraceEvent.prototype.ret = 0;

            /**
             * KvmExitFtraceEvent vcpuPc.
             * @member {number} vcpuPc
             * @memberof perfetto.protos.KvmExitFtraceEvent
             * @instance
             */
            KvmExitFtraceEvent.prototype.vcpuPc = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KvmExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmExitFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmExitFtraceEvent} KvmExitFtraceEvent instance
             */
            KvmExitFtraceEvent.create = function create(properties) {
                return new KvmExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmExitFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmExitFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmExitFtraceEvent} m KvmExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.esrEc != null && Object.hasOwnProperty.call(m, "esrEc"))
                    w.uint32(8).uint32(m.esrEc);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(16).int32(m.ret);
                if (m.vcpuPc != null && Object.hasOwnProperty.call(m, "vcpuPc"))
                    w.uint32(24).uint64(m.vcpuPc);
                return w;
            };

            /**
             * Encodes the specified KvmExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmExitFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmExitFtraceEvent} message KvmExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmExitFtraceEvent} KvmExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.esrEc = r.uint32();
                        break;
                    case 2:
                        m.ret = r.int32();
                        break;
                    case 3:
                        m.vcpuPc = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmExitFtraceEvent} KvmExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.esrEc != null && m.hasOwnProperty("esrEc")) {
                    if (!$util.isInteger(m.esrEc))
                        return "esrEc: integer expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                if (m.vcpuPc != null && m.hasOwnProperty("vcpuPc")) {
                    if (!$util.isInteger(m.vcpuPc) && !(m.vcpuPc && $util.isInteger(m.vcpuPc.low) && $util.isInteger(m.vcpuPc.high)))
                        return "vcpuPc: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KvmExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmExitFtraceEvent} KvmExitFtraceEvent
             */
            KvmExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmExitFtraceEvent();
                if (d.esrEc != null) {
                    m.esrEc = d.esrEc >>> 0;
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                if (d.vcpuPc != null) {
                    if ($util.Long)
                        (m.vcpuPc = $util.Long.fromValue(d.vcpuPc)).unsigned = true;
                    else if (typeof d.vcpuPc === "string")
                        m.vcpuPc = parseInt(d.vcpuPc, 10);
                    else if (typeof d.vcpuPc === "number")
                        m.vcpuPc = d.vcpuPc;
                    else if (typeof d.vcpuPc === "object")
                        m.vcpuPc = new $util.LongBits(d.vcpuPc.low >>> 0, d.vcpuPc.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmExitFtraceEvent
             * @static
             * @param {perfetto.protos.KvmExitFtraceEvent} m KvmExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.esrEc = 0;
                    d.ret = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.vcpuPc = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.vcpuPc = o.longs === String ? "0" : 0;
                }
                if (m.esrEc != null && m.hasOwnProperty("esrEc")) {
                    d.esrEc = m.esrEc;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                if (m.vcpuPc != null && m.hasOwnProperty("vcpuPc")) {
                    if (typeof m.vcpuPc === "number")
                        d.vcpuPc = o.longs === String ? String(m.vcpuPc) : m.vcpuPc;
                    else
                        d.vcpuPc = o.longs === String ? $util.Long.prototype.toString.call(m.vcpuPc) : o.longs === Number ? new $util.LongBits(m.vcpuPc.low >>> 0, m.vcpuPc.high >>> 0).toNumber(true) : m.vcpuPc;
                }
                return d;
            };

            /**
             * Converts this KvmExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmExitFtraceEvent;
        })();

        protos.KvmFpuFtraceEvent = (function() {

            /**
             * Properties of a KvmFpuFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmFpuFtraceEvent
             * @property {number|null} [load] KvmFpuFtraceEvent load
             */

            /**
             * Constructs a new KvmFpuFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmFpuFtraceEvent.
             * @implements IKvmFpuFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmFpuFtraceEvent=} [p] Properties to set
             */
            function KvmFpuFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmFpuFtraceEvent load.
             * @member {number} load
             * @memberof perfetto.protos.KvmFpuFtraceEvent
             * @instance
             */
            KvmFpuFtraceEvent.prototype.load = 0;

            /**
             * Creates a new KvmFpuFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmFpuFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmFpuFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmFpuFtraceEvent} KvmFpuFtraceEvent instance
             */
            KvmFpuFtraceEvent.create = function create(properties) {
                return new KvmFpuFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmFpuFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmFpuFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmFpuFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmFpuFtraceEvent} m KvmFpuFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmFpuFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.load != null && Object.hasOwnProperty.call(m, "load"))
                    w.uint32(8).uint32(m.load);
                return w;
            };

            /**
             * Encodes the specified KvmFpuFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmFpuFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmFpuFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmFpuFtraceEvent} message KvmFpuFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmFpuFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmFpuFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmFpuFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmFpuFtraceEvent} KvmFpuFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmFpuFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmFpuFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.load = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmFpuFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmFpuFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmFpuFtraceEvent} KvmFpuFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmFpuFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmFpuFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmFpuFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmFpuFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.load != null && m.hasOwnProperty("load")) {
                    if (!$util.isInteger(m.load))
                        return "load: integer expected";
                }
                return null;
            };

            /**
             * Creates a KvmFpuFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmFpuFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmFpuFtraceEvent} KvmFpuFtraceEvent
             */
            KvmFpuFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmFpuFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmFpuFtraceEvent();
                if (d.load != null) {
                    m.load = d.load >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmFpuFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmFpuFtraceEvent
             * @static
             * @param {perfetto.protos.KvmFpuFtraceEvent} m KvmFpuFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmFpuFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.load = 0;
                }
                if (m.load != null && m.hasOwnProperty("load")) {
                    d.load = m.load;
                }
                return d;
            };

            /**
             * Converts this KvmFpuFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmFpuFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmFpuFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmFpuFtraceEvent;
        })();

        protos.KvmGetTimerMapFtraceEvent = (function() {

            /**
             * Properties of a KvmGetTimerMapFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmGetTimerMapFtraceEvent
             * @property {number|null} [directPtimer] KvmGetTimerMapFtraceEvent directPtimer
             * @property {number|null} [directVtimer] KvmGetTimerMapFtraceEvent directVtimer
             * @property {number|null} [emulPtimer] KvmGetTimerMapFtraceEvent emulPtimer
             * @property {number|null} [vcpuId] KvmGetTimerMapFtraceEvent vcpuId
             */

            /**
             * Constructs a new KvmGetTimerMapFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmGetTimerMapFtraceEvent.
             * @implements IKvmGetTimerMapFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmGetTimerMapFtraceEvent=} [p] Properties to set
             */
            function KvmGetTimerMapFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmGetTimerMapFtraceEvent directPtimer.
             * @member {number} directPtimer
             * @memberof perfetto.protos.KvmGetTimerMapFtraceEvent
             * @instance
             */
            KvmGetTimerMapFtraceEvent.prototype.directPtimer = 0;

            /**
             * KvmGetTimerMapFtraceEvent directVtimer.
             * @member {number} directVtimer
             * @memberof perfetto.protos.KvmGetTimerMapFtraceEvent
             * @instance
             */
            KvmGetTimerMapFtraceEvent.prototype.directVtimer = 0;

            /**
             * KvmGetTimerMapFtraceEvent emulPtimer.
             * @member {number} emulPtimer
             * @memberof perfetto.protos.KvmGetTimerMapFtraceEvent
             * @instance
             */
            KvmGetTimerMapFtraceEvent.prototype.emulPtimer = 0;

            /**
             * KvmGetTimerMapFtraceEvent vcpuId.
             * @member {number} vcpuId
             * @memberof perfetto.protos.KvmGetTimerMapFtraceEvent
             * @instance
             */
            KvmGetTimerMapFtraceEvent.prototype.vcpuId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KvmGetTimerMapFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmGetTimerMapFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmGetTimerMapFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmGetTimerMapFtraceEvent} KvmGetTimerMapFtraceEvent instance
             */
            KvmGetTimerMapFtraceEvent.create = function create(properties) {
                return new KvmGetTimerMapFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmGetTimerMapFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmGetTimerMapFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmGetTimerMapFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmGetTimerMapFtraceEvent} m KvmGetTimerMapFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmGetTimerMapFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.directPtimer != null && Object.hasOwnProperty.call(m, "directPtimer"))
                    w.uint32(8).int32(m.directPtimer);
                if (m.directVtimer != null && Object.hasOwnProperty.call(m, "directVtimer"))
                    w.uint32(16).int32(m.directVtimer);
                if (m.emulPtimer != null && Object.hasOwnProperty.call(m, "emulPtimer"))
                    w.uint32(24).int32(m.emulPtimer);
                if (m.vcpuId != null && Object.hasOwnProperty.call(m, "vcpuId"))
                    w.uint32(32).uint64(m.vcpuId);
                return w;
            };

            /**
             * Encodes the specified KvmGetTimerMapFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmGetTimerMapFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmGetTimerMapFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmGetTimerMapFtraceEvent} message KvmGetTimerMapFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmGetTimerMapFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmGetTimerMapFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmGetTimerMapFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmGetTimerMapFtraceEvent} KvmGetTimerMapFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmGetTimerMapFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmGetTimerMapFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.directPtimer = r.int32();
                        break;
                    case 2:
                        m.directVtimer = r.int32();
                        break;
                    case 3:
                        m.emulPtimer = r.int32();
                        break;
                    case 4:
                        m.vcpuId = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmGetTimerMapFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmGetTimerMapFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmGetTimerMapFtraceEvent} KvmGetTimerMapFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmGetTimerMapFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmGetTimerMapFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmGetTimerMapFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmGetTimerMapFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.directPtimer != null && m.hasOwnProperty("directPtimer")) {
                    if (!$util.isInteger(m.directPtimer))
                        return "directPtimer: integer expected";
                }
                if (m.directVtimer != null && m.hasOwnProperty("directVtimer")) {
                    if (!$util.isInteger(m.directVtimer))
                        return "directVtimer: integer expected";
                }
                if (m.emulPtimer != null && m.hasOwnProperty("emulPtimer")) {
                    if (!$util.isInteger(m.emulPtimer))
                        return "emulPtimer: integer expected";
                }
                if (m.vcpuId != null && m.hasOwnProperty("vcpuId")) {
                    if (!$util.isInteger(m.vcpuId) && !(m.vcpuId && $util.isInteger(m.vcpuId.low) && $util.isInteger(m.vcpuId.high)))
                        return "vcpuId: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KvmGetTimerMapFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmGetTimerMapFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmGetTimerMapFtraceEvent} KvmGetTimerMapFtraceEvent
             */
            KvmGetTimerMapFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmGetTimerMapFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmGetTimerMapFtraceEvent();
                if (d.directPtimer != null) {
                    m.directPtimer = d.directPtimer | 0;
                }
                if (d.directVtimer != null) {
                    m.directVtimer = d.directVtimer | 0;
                }
                if (d.emulPtimer != null) {
                    m.emulPtimer = d.emulPtimer | 0;
                }
                if (d.vcpuId != null) {
                    if ($util.Long)
                        (m.vcpuId = $util.Long.fromValue(d.vcpuId)).unsigned = true;
                    else if (typeof d.vcpuId === "string")
                        m.vcpuId = parseInt(d.vcpuId, 10);
                    else if (typeof d.vcpuId === "number")
                        m.vcpuId = d.vcpuId;
                    else if (typeof d.vcpuId === "object")
                        m.vcpuId = new $util.LongBits(d.vcpuId.low >>> 0, d.vcpuId.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmGetTimerMapFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmGetTimerMapFtraceEvent
             * @static
             * @param {perfetto.protos.KvmGetTimerMapFtraceEvent} m KvmGetTimerMapFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmGetTimerMapFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.directPtimer = 0;
                    d.directVtimer = 0;
                    d.emulPtimer = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.vcpuId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.vcpuId = o.longs === String ? "0" : 0;
                }
                if (m.directPtimer != null && m.hasOwnProperty("directPtimer")) {
                    d.directPtimer = m.directPtimer;
                }
                if (m.directVtimer != null && m.hasOwnProperty("directVtimer")) {
                    d.directVtimer = m.directVtimer;
                }
                if (m.emulPtimer != null && m.hasOwnProperty("emulPtimer")) {
                    d.emulPtimer = m.emulPtimer;
                }
                if (m.vcpuId != null && m.hasOwnProperty("vcpuId")) {
                    if (typeof m.vcpuId === "number")
                        d.vcpuId = o.longs === String ? String(m.vcpuId) : m.vcpuId;
                    else
                        d.vcpuId = o.longs === String ? $util.Long.prototype.toString.call(m.vcpuId) : o.longs === Number ? new $util.LongBits(m.vcpuId.low >>> 0, m.vcpuId.high >>> 0).toNumber(true) : m.vcpuId;
                }
                return d;
            };

            /**
             * Converts this KvmGetTimerMapFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmGetTimerMapFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmGetTimerMapFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmGetTimerMapFtraceEvent;
        })();

        protos.KvmGuestFaultFtraceEvent = (function() {

            /**
             * Properties of a KvmGuestFaultFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmGuestFaultFtraceEvent
             * @property {number|null} [hsr] KvmGuestFaultFtraceEvent hsr
             * @property {number|null} [hxfar] KvmGuestFaultFtraceEvent hxfar
             * @property {number|null} [ipa] KvmGuestFaultFtraceEvent ipa
             * @property {number|null} [vcpuPc] KvmGuestFaultFtraceEvent vcpuPc
             */

            /**
             * Constructs a new KvmGuestFaultFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmGuestFaultFtraceEvent.
             * @implements IKvmGuestFaultFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmGuestFaultFtraceEvent=} [p] Properties to set
             */
            function KvmGuestFaultFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmGuestFaultFtraceEvent hsr.
             * @member {number} hsr
             * @memberof perfetto.protos.KvmGuestFaultFtraceEvent
             * @instance
             */
            KvmGuestFaultFtraceEvent.prototype.hsr = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KvmGuestFaultFtraceEvent hxfar.
             * @member {number} hxfar
             * @memberof perfetto.protos.KvmGuestFaultFtraceEvent
             * @instance
             */
            KvmGuestFaultFtraceEvent.prototype.hxfar = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KvmGuestFaultFtraceEvent ipa.
             * @member {number} ipa
             * @memberof perfetto.protos.KvmGuestFaultFtraceEvent
             * @instance
             */
            KvmGuestFaultFtraceEvent.prototype.ipa = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KvmGuestFaultFtraceEvent vcpuPc.
             * @member {number} vcpuPc
             * @memberof perfetto.protos.KvmGuestFaultFtraceEvent
             * @instance
             */
            KvmGuestFaultFtraceEvent.prototype.vcpuPc = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KvmGuestFaultFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmGuestFaultFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmGuestFaultFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmGuestFaultFtraceEvent} KvmGuestFaultFtraceEvent instance
             */
            KvmGuestFaultFtraceEvent.create = function create(properties) {
                return new KvmGuestFaultFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmGuestFaultFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmGuestFaultFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmGuestFaultFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmGuestFaultFtraceEvent} m KvmGuestFaultFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmGuestFaultFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.hsr != null && Object.hasOwnProperty.call(m, "hsr"))
                    w.uint32(8).uint64(m.hsr);
                if (m.hxfar != null && Object.hasOwnProperty.call(m, "hxfar"))
                    w.uint32(16).uint64(m.hxfar);
                if (m.ipa != null && Object.hasOwnProperty.call(m, "ipa"))
                    w.uint32(24).uint64(m.ipa);
                if (m.vcpuPc != null && Object.hasOwnProperty.call(m, "vcpuPc"))
                    w.uint32(32).uint64(m.vcpuPc);
                return w;
            };

            /**
             * Encodes the specified KvmGuestFaultFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmGuestFaultFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmGuestFaultFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmGuestFaultFtraceEvent} message KvmGuestFaultFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmGuestFaultFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmGuestFaultFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmGuestFaultFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmGuestFaultFtraceEvent} KvmGuestFaultFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmGuestFaultFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmGuestFaultFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.hsr = r.uint64();
                        break;
                    case 2:
                        m.hxfar = r.uint64();
                        break;
                    case 3:
                        m.ipa = r.uint64();
                        break;
                    case 4:
                        m.vcpuPc = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmGuestFaultFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmGuestFaultFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmGuestFaultFtraceEvent} KvmGuestFaultFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmGuestFaultFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmGuestFaultFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmGuestFaultFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmGuestFaultFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.hsr != null && m.hasOwnProperty("hsr")) {
                    if (!$util.isInteger(m.hsr) && !(m.hsr && $util.isInteger(m.hsr.low) && $util.isInteger(m.hsr.high)))
                        return "hsr: integer|Long expected";
                }
                if (m.hxfar != null && m.hasOwnProperty("hxfar")) {
                    if (!$util.isInteger(m.hxfar) && !(m.hxfar && $util.isInteger(m.hxfar.low) && $util.isInteger(m.hxfar.high)))
                        return "hxfar: integer|Long expected";
                }
                if (m.ipa != null && m.hasOwnProperty("ipa")) {
                    if (!$util.isInteger(m.ipa) && !(m.ipa && $util.isInteger(m.ipa.low) && $util.isInteger(m.ipa.high)))
                        return "ipa: integer|Long expected";
                }
                if (m.vcpuPc != null && m.hasOwnProperty("vcpuPc")) {
                    if (!$util.isInteger(m.vcpuPc) && !(m.vcpuPc && $util.isInteger(m.vcpuPc.low) && $util.isInteger(m.vcpuPc.high)))
                        return "vcpuPc: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KvmGuestFaultFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmGuestFaultFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmGuestFaultFtraceEvent} KvmGuestFaultFtraceEvent
             */
            KvmGuestFaultFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmGuestFaultFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmGuestFaultFtraceEvent();
                if (d.hsr != null) {
                    if ($util.Long)
                        (m.hsr = $util.Long.fromValue(d.hsr)).unsigned = true;
                    else if (typeof d.hsr === "string")
                        m.hsr = parseInt(d.hsr, 10);
                    else if (typeof d.hsr === "number")
                        m.hsr = d.hsr;
                    else if (typeof d.hsr === "object")
                        m.hsr = new $util.LongBits(d.hsr.low >>> 0, d.hsr.high >>> 0).toNumber(true);
                }
                if (d.hxfar != null) {
                    if ($util.Long)
                        (m.hxfar = $util.Long.fromValue(d.hxfar)).unsigned = true;
                    else if (typeof d.hxfar === "string")
                        m.hxfar = parseInt(d.hxfar, 10);
                    else if (typeof d.hxfar === "number")
                        m.hxfar = d.hxfar;
                    else if (typeof d.hxfar === "object")
                        m.hxfar = new $util.LongBits(d.hxfar.low >>> 0, d.hxfar.high >>> 0).toNumber(true);
                }
                if (d.ipa != null) {
                    if ($util.Long)
                        (m.ipa = $util.Long.fromValue(d.ipa)).unsigned = true;
                    else if (typeof d.ipa === "string")
                        m.ipa = parseInt(d.ipa, 10);
                    else if (typeof d.ipa === "number")
                        m.ipa = d.ipa;
                    else if (typeof d.ipa === "object")
                        m.ipa = new $util.LongBits(d.ipa.low >>> 0, d.ipa.high >>> 0).toNumber(true);
                }
                if (d.vcpuPc != null) {
                    if ($util.Long)
                        (m.vcpuPc = $util.Long.fromValue(d.vcpuPc)).unsigned = true;
                    else if (typeof d.vcpuPc === "string")
                        m.vcpuPc = parseInt(d.vcpuPc, 10);
                    else if (typeof d.vcpuPc === "number")
                        m.vcpuPc = d.vcpuPc;
                    else if (typeof d.vcpuPc === "object")
                        m.vcpuPc = new $util.LongBits(d.vcpuPc.low >>> 0, d.vcpuPc.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmGuestFaultFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmGuestFaultFtraceEvent
             * @static
             * @param {perfetto.protos.KvmGuestFaultFtraceEvent} m KvmGuestFaultFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmGuestFaultFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.hsr = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.hsr = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.hxfar = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.hxfar = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ipa = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ipa = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.vcpuPc = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.vcpuPc = o.longs === String ? "0" : 0;
                }
                if (m.hsr != null && m.hasOwnProperty("hsr")) {
                    if (typeof m.hsr === "number")
                        d.hsr = o.longs === String ? String(m.hsr) : m.hsr;
                    else
                        d.hsr = o.longs === String ? $util.Long.prototype.toString.call(m.hsr) : o.longs === Number ? new $util.LongBits(m.hsr.low >>> 0, m.hsr.high >>> 0).toNumber(true) : m.hsr;
                }
                if (m.hxfar != null && m.hasOwnProperty("hxfar")) {
                    if (typeof m.hxfar === "number")
                        d.hxfar = o.longs === String ? String(m.hxfar) : m.hxfar;
                    else
                        d.hxfar = o.longs === String ? $util.Long.prototype.toString.call(m.hxfar) : o.longs === Number ? new $util.LongBits(m.hxfar.low >>> 0, m.hxfar.high >>> 0).toNumber(true) : m.hxfar;
                }
                if (m.ipa != null && m.hasOwnProperty("ipa")) {
                    if (typeof m.ipa === "number")
                        d.ipa = o.longs === String ? String(m.ipa) : m.ipa;
                    else
                        d.ipa = o.longs === String ? $util.Long.prototype.toString.call(m.ipa) : o.longs === Number ? new $util.LongBits(m.ipa.low >>> 0, m.ipa.high >>> 0).toNumber(true) : m.ipa;
                }
                if (m.vcpuPc != null && m.hasOwnProperty("vcpuPc")) {
                    if (typeof m.vcpuPc === "number")
                        d.vcpuPc = o.longs === String ? String(m.vcpuPc) : m.vcpuPc;
                    else
                        d.vcpuPc = o.longs === String ? $util.Long.prototype.toString.call(m.vcpuPc) : o.longs === Number ? new $util.LongBits(m.vcpuPc.low >>> 0, m.vcpuPc.high >>> 0).toNumber(true) : m.vcpuPc;
                }
                return d;
            };

            /**
             * Converts this KvmGuestFaultFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmGuestFaultFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmGuestFaultFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmGuestFaultFtraceEvent;
        })();

        protos.KvmHandleSysRegFtraceEvent = (function() {

            /**
             * Properties of a KvmHandleSysRegFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmHandleSysRegFtraceEvent
             * @property {number|null} [hsr] KvmHandleSysRegFtraceEvent hsr
             */

            /**
             * Constructs a new KvmHandleSysRegFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmHandleSysRegFtraceEvent.
             * @implements IKvmHandleSysRegFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmHandleSysRegFtraceEvent=} [p] Properties to set
             */
            function KvmHandleSysRegFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmHandleSysRegFtraceEvent hsr.
             * @member {number} hsr
             * @memberof perfetto.protos.KvmHandleSysRegFtraceEvent
             * @instance
             */
            KvmHandleSysRegFtraceEvent.prototype.hsr = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KvmHandleSysRegFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmHandleSysRegFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmHandleSysRegFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmHandleSysRegFtraceEvent} KvmHandleSysRegFtraceEvent instance
             */
            KvmHandleSysRegFtraceEvent.create = function create(properties) {
                return new KvmHandleSysRegFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmHandleSysRegFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmHandleSysRegFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmHandleSysRegFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmHandleSysRegFtraceEvent} m KvmHandleSysRegFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmHandleSysRegFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.hsr != null && Object.hasOwnProperty.call(m, "hsr"))
                    w.uint32(8).uint64(m.hsr);
                return w;
            };

            /**
             * Encodes the specified KvmHandleSysRegFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmHandleSysRegFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmHandleSysRegFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmHandleSysRegFtraceEvent} message KvmHandleSysRegFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmHandleSysRegFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmHandleSysRegFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmHandleSysRegFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmHandleSysRegFtraceEvent} KvmHandleSysRegFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmHandleSysRegFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmHandleSysRegFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.hsr = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmHandleSysRegFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmHandleSysRegFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmHandleSysRegFtraceEvent} KvmHandleSysRegFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmHandleSysRegFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmHandleSysRegFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmHandleSysRegFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmHandleSysRegFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.hsr != null && m.hasOwnProperty("hsr")) {
                    if (!$util.isInteger(m.hsr) && !(m.hsr && $util.isInteger(m.hsr.low) && $util.isInteger(m.hsr.high)))
                        return "hsr: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KvmHandleSysRegFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmHandleSysRegFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmHandleSysRegFtraceEvent} KvmHandleSysRegFtraceEvent
             */
            KvmHandleSysRegFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmHandleSysRegFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmHandleSysRegFtraceEvent();
                if (d.hsr != null) {
                    if ($util.Long)
                        (m.hsr = $util.Long.fromValue(d.hsr)).unsigned = true;
                    else if (typeof d.hsr === "string")
                        m.hsr = parseInt(d.hsr, 10);
                    else if (typeof d.hsr === "number")
                        m.hsr = d.hsr;
                    else if (typeof d.hsr === "object")
                        m.hsr = new $util.LongBits(d.hsr.low >>> 0, d.hsr.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmHandleSysRegFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmHandleSysRegFtraceEvent
             * @static
             * @param {perfetto.protos.KvmHandleSysRegFtraceEvent} m KvmHandleSysRegFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmHandleSysRegFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.hsr = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.hsr = o.longs === String ? "0" : 0;
                }
                if (m.hsr != null && m.hasOwnProperty("hsr")) {
                    if (typeof m.hsr === "number")
                        d.hsr = o.longs === String ? String(m.hsr) : m.hsr;
                    else
                        d.hsr = o.longs === String ? $util.Long.prototype.toString.call(m.hsr) : o.longs === Number ? new $util.LongBits(m.hsr.low >>> 0, m.hsr.high >>> 0).toNumber(true) : m.hsr;
                }
                return d;
            };

            /**
             * Converts this KvmHandleSysRegFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmHandleSysRegFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmHandleSysRegFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmHandleSysRegFtraceEvent;
        })();

        protos.KvmHvcArm64FtraceEvent = (function() {

            /**
             * Properties of a KvmHvcArm64FtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmHvcArm64FtraceEvent
             * @property {number|null} [imm] KvmHvcArm64FtraceEvent imm
             * @property {number|null} [r0] KvmHvcArm64FtraceEvent r0
             * @property {number|null} [vcpuPc] KvmHvcArm64FtraceEvent vcpuPc
             */

            /**
             * Constructs a new KvmHvcArm64FtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmHvcArm64FtraceEvent.
             * @implements IKvmHvcArm64FtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmHvcArm64FtraceEvent=} [p] Properties to set
             */
            function KvmHvcArm64FtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmHvcArm64FtraceEvent imm.
             * @member {number} imm
             * @memberof perfetto.protos.KvmHvcArm64FtraceEvent
             * @instance
             */
            KvmHvcArm64FtraceEvent.prototype.imm = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KvmHvcArm64FtraceEvent r0.
             * @member {number} r0
             * @memberof perfetto.protos.KvmHvcArm64FtraceEvent
             * @instance
             */
            KvmHvcArm64FtraceEvent.prototype.r0 = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KvmHvcArm64FtraceEvent vcpuPc.
             * @member {number} vcpuPc
             * @memberof perfetto.protos.KvmHvcArm64FtraceEvent
             * @instance
             */
            KvmHvcArm64FtraceEvent.prototype.vcpuPc = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KvmHvcArm64FtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmHvcArm64FtraceEvent
             * @static
             * @param {perfetto.protos.IKvmHvcArm64FtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmHvcArm64FtraceEvent} KvmHvcArm64FtraceEvent instance
             */
            KvmHvcArm64FtraceEvent.create = function create(properties) {
                return new KvmHvcArm64FtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmHvcArm64FtraceEvent message. Does not implicitly {@link perfetto.protos.KvmHvcArm64FtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmHvcArm64FtraceEvent
             * @static
             * @param {perfetto.protos.IKvmHvcArm64FtraceEvent} m KvmHvcArm64FtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmHvcArm64FtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.imm != null && Object.hasOwnProperty.call(m, "imm"))
                    w.uint32(8).uint64(m.imm);
                if (m.r0 != null && Object.hasOwnProperty.call(m, "r0"))
                    w.uint32(16).uint64(m.r0);
                if (m.vcpuPc != null && Object.hasOwnProperty.call(m, "vcpuPc"))
                    w.uint32(24).uint64(m.vcpuPc);
                return w;
            };

            /**
             * Encodes the specified KvmHvcArm64FtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmHvcArm64FtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmHvcArm64FtraceEvent
             * @static
             * @param {perfetto.protos.IKvmHvcArm64FtraceEvent} message KvmHvcArm64FtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmHvcArm64FtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmHvcArm64FtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmHvcArm64FtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmHvcArm64FtraceEvent} KvmHvcArm64FtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmHvcArm64FtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmHvcArm64FtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.imm = r.uint64();
                        break;
                    case 2:
                        m.r0 = r.uint64();
                        break;
                    case 3:
                        m.vcpuPc = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmHvcArm64FtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmHvcArm64FtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmHvcArm64FtraceEvent} KvmHvcArm64FtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmHvcArm64FtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmHvcArm64FtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmHvcArm64FtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmHvcArm64FtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.imm != null && m.hasOwnProperty("imm")) {
                    if (!$util.isInteger(m.imm) && !(m.imm && $util.isInteger(m.imm.low) && $util.isInteger(m.imm.high)))
                        return "imm: integer|Long expected";
                }
                if (m.r0 != null && m.hasOwnProperty("r0")) {
                    if (!$util.isInteger(m.r0) && !(m.r0 && $util.isInteger(m.r0.low) && $util.isInteger(m.r0.high)))
                        return "r0: integer|Long expected";
                }
                if (m.vcpuPc != null && m.hasOwnProperty("vcpuPc")) {
                    if (!$util.isInteger(m.vcpuPc) && !(m.vcpuPc && $util.isInteger(m.vcpuPc.low) && $util.isInteger(m.vcpuPc.high)))
                        return "vcpuPc: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KvmHvcArm64FtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmHvcArm64FtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmHvcArm64FtraceEvent} KvmHvcArm64FtraceEvent
             */
            KvmHvcArm64FtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmHvcArm64FtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmHvcArm64FtraceEvent();
                if (d.imm != null) {
                    if ($util.Long)
                        (m.imm = $util.Long.fromValue(d.imm)).unsigned = true;
                    else if (typeof d.imm === "string")
                        m.imm = parseInt(d.imm, 10);
                    else if (typeof d.imm === "number")
                        m.imm = d.imm;
                    else if (typeof d.imm === "object")
                        m.imm = new $util.LongBits(d.imm.low >>> 0, d.imm.high >>> 0).toNumber(true);
                }
                if (d.r0 != null) {
                    if ($util.Long)
                        (m.r0 = $util.Long.fromValue(d.r0)).unsigned = true;
                    else if (typeof d.r0 === "string")
                        m.r0 = parseInt(d.r0, 10);
                    else if (typeof d.r0 === "number")
                        m.r0 = d.r0;
                    else if (typeof d.r0 === "object")
                        m.r0 = new $util.LongBits(d.r0.low >>> 0, d.r0.high >>> 0).toNumber(true);
                }
                if (d.vcpuPc != null) {
                    if ($util.Long)
                        (m.vcpuPc = $util.Long.fromValue(d.vcpuPc)).unsigned = true;
                    else if (typeof d.vcpuPc === "string")
                        m.vcpuPc = parseInt(d.vcpuPc, 10);
                    else if (typeof d.vcpuPc === "number")
                        m.vcpuPc = d.vcpuPc;
                    else if (typeof d.vcpuPc === "object")
                        m.vcpuPc = new $util.LongBits(d.vcpuPc.low >>> 0, d.vcpuPc.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmHvcArm64FtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmHvcArm64FtraceEvent
             * @static
             * @param {perfetto.protos.KvmHvcArm64FtraceEvent} m KvmHvcArm64FtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmHvcArm64FtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.imm = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.imm = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.r0 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.r0 = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.vcpuPc = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.vcpuPc = o.longs === String ? "0" : 0;
                }
                if (m.imm != null && m.hasOwnProperty("imm")) {
                    if (typeof m.imm === "number")
                        d.imm = o.longs === String ? String(m.imm) : m.imm;
                    else
                        d.imm = o.longs === String ? $util.Long.prototype.toString.call(m.imm) : o.longs === Number ? new $util.LongBits(m.imm.low >>> 0, m.imm.high >>> 0).toNumber(true) : m.imm;
                }
                if (m.r0 != null && m.hasOwnProperty("r0")) {
                    if (typeof m.r0 === "number")
                        d.r0 = o.longs === String ? String(m.r0) : m.r0;
                    else
                        d.r0 = o.longs === String ? $util.Long.prototype.toString.call(m.r0) : o.longs === Number ? new $util.LongBits(m.r0.low >>> 0, m.r0.high >>> 0).toNumber(true) : m.r0;
                }
                if (m.vcpuPc != null && m.hasOwnProperty("vcpuPc")) {
                    if (typeof m.vcpuPc === "number")
                        d.vcpuPc = o.longs === String ? String(m.vcpuPc) : m.vcpuPc;
                    else
                        d.vcpuPc = o.longs === String ? $util.Long.prototype.toString.call(m.vcpuPc) : o.longs === Number ? new $util.LongBits(m.vcpuPc.low >>> 0, m.vcpuPc.high >>> 0).toNumber(true) : m.vcpuPc;
                }
                return d;
            };

            /**
             * Converts this KvmHvcArm64FtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmHvcArm64FtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmHvcArm64FtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmHvcArm64FtraceEvent;
        })();

        protos.KvmIrqLineFtraceEvent = (function() {

            /**
             * Properties of a KvmIrqLineFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmIrqLineFtraceEvent
             * @property {number|null} [irqNum] KvmIrqLineFtraceEvent irqNum
             * @property {number|null} [level] KvmIrqLineFtraceEvent level
             * @property {number|null} [type] KvmIrqLineFtraceEvent type
             * @property {number|null} [vcpuIdx] KvmIrqLineFtraceEvent vcpuIdx
             */

            /**
             * Constructs a new KvmIrqLineFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmIrqLineFtraceEvent.
             * @implements IKvmIrqLineFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmIrqLineFtraceEvent=} [p] Properties to set
             */
            function KvmIrqLineFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmIrqLineFtraceEvent irqNum.
             * @member {number} irqNum
             * @memberof perfetto.protos.KvmIrqLineFtraceEvent
             * @instance
             */
            KvmIrqLineFtraceEvent.prototype.irqNum = 0;

            /**
             * KvmIrqLineFtraceEvent level.
             * @member {number} level
             * @memberof perfetto.protos.KvmIrqLineFtraceEvent
             * @instance
             */
            KvmIrqLineFtraceEvent.prototype.level = 0;

            /**
             * KvmIrqLineFtraceEvent type.
             * @member {number} type
             * @memberof perfetto.protos.KvmIrqLineFtraceEvent
             * @instance
             */
            KvmIrqLineFtraceEvent.prototype.type = 0;

            /**
             * KvmIrqLineFtraceEvent vcpuIdx.
             * @member {number} vcpuIdx
             * @memberof perfetto.protos.KvmIrqLineFtraceEvent
             * @instance
             */
            KvmIrqLineFtraceEvent.prototype.vcpuIdx = 0;

            /**
             * Creates a new KvmIrqLineFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmIrqLineFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmIrqLineFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmIrqLineFtraceEvent} KvmIrqLineFtraceEvent instance
             */
            KvmIrqLineFtraceEvent.create = function create(properties) {
                return new KvmIrqLineFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmIrqLineFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmIrqLineFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmIrqLineFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmIrqLineFtraceEvent} m KvmIrqLineFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmIrqLineFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.irqNum != null && Object.hasOwnProperty.call(m, "irqNum"))
                    w.uint32(8).int32(m.irqNum);
                if (m.level != null && Object.hasOwnProperty.call(m, "level"))
                    w.uint32(16).int32(m.level);
                if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                    w.uint32(24).uint32(m.type);
                if (m.vcpuIdx != null && Object.hasOwnProperty.call(m, "vcpuIdx"))
                    w.uint32(32).int32(m.vcpuIdx);
                return w;
            };

            /**
             * Encodes the specified KvmIrqLineFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmIrqLineFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmIrqLineFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmIrqLineFtraceEvent} message KvmIrqLineFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmIrqLineFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmIrqLineFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmIrqLineFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmIrqLineFtraceEvent} KvmIrqLineFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmIrqLineFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmIrqLineFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.irqNum = r.int32();
                        break;
                    case 2:
                        m.level = r.int32();
                        break;
                    case 3:
                        m.type = r.uint32();
                        break;
                    case 4:
                        m.vcpuIdx = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmIrqLineFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmIrqLineFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmIrqLineFtraceEvent} KvmIrqLineFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmIrqLineFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmIrqLineFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmIrqLineFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmIrqLineFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.irqNum != null && m.hasOwnProperty("irqNum")) {
                    if (!$util.isInteger(m.irqNum))
                        return "irqNum: integer expected";
                }
                if (m.level != null && m.hasOwnProperty("level")) {
                    if (!$util.isInteger(m.level))
                        return "level: integer expected";
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    if (!$util.isInteger(m.type))
                        return "type: integer expected";
                }
                if (m.vcpuIdx != null && m.hasOwnProperty("vcpuIdx")) {
                    if (!$util.isInteger(m.vcpuIdx))
                        return "vcpuIdx: integer expected";
                }
                return null;
            };

            /**
             * Creates a KvmIrqLineFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmIrqLineFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmIrqLineFtraceEvent} KvmIrqLineFtraceEvent
             */
            KvmIrqLineFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmIrqLineFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmIrqLineFtraceEvent();
                if (d.irqNum != null) {
                    m.irqNum = d.irqNum | 0;
                }
                if (d.level != null) {
                    m.level = d.level | 0;
                }
                if (d.type != null) {
                    m.type = d.type >>> 0;
                }
                if (d.vcpuIdx != null) {
                    m.vcpuIdx = d.vcpuIdx | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmIrqLineFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmIrqLineFtraceEvent
             * @static
             * @param {perfetto.protos.KvmIrqLineFtraceEvent} m KvmIrqLineFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmIrqLineFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.irqNum = 0;
                    d.level = 0;
                    d.type = 0;
                    d.vcpuIdx = 0;
                }
                if (m.irqNum != null && m.hasOwnProperty("irqNum")) {
                    d.irqNum = m.irqNum;
                }
                if (m.level != null && m.hasOwnProperty("level")) {
                    d.level = m.level;
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    d.type = m.type;
                }
                if (m.vcpuIdx != null && m.hasOwnProperty("vcpuIdx")) {
                    d.vcpuIdx = m.vcpuIdx;
                }
                return d;
            };

            /**
             * Converts this KvmIrqLineFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmIrqLineFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmIrqLineFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmIrqLineFtraceEvent;
        })();

        protos.KvmMmioFtraceEvent = (function() {

            /**
             * Properties of a KvmMmioFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmMmioFtraceEvent
             * @property {number|null} [gpa] KvmMmioFtraceEvent gpa
             * @property {number|null} [len] KvmMmioFtraceEvent len
             * @property {number|null} [type] KvmMmioFtraceEvent type
             * @property {number|null} [val] KvmMmioFtraceEvent val
             */

            /**
             * Constructs a new KvmMmioFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmMmioFtraceEvent.
             * @implements IKvmMmioFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmMmioFtraceEvent=} [p] Properties to set
             */
            function KvmMmioFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmMmioFtraceEvent gpa.
             * @member {number} gpa
             * @memberof perfetto.protos.KvmMmioFtraceEvent
             * @instance
             */
            KvmMmioFtraceEvent.prototype.gpa = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KvmMmioFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.KvmMmioFtraceEvent
             * @instance
             */
            KvmMmioFtraceEvent.prototype.len = 0;

            /**
             * KvmMmioFtraceEvent type.
             * @member {number} type
             * @memberof perfetto.protos.KvmMmioFtraceEvent
             * @instance
             */
            KvmMmioFtraceEvent.prototype.type = 0;

            /**
             * KvmMmioFtraceEvent val.
             * @member {number} val
             * @memberof perfetto.protos.KvmMmioFtraceEvent
             * @instance
             */
            KvmMmioFtraceEvent.prototype.val = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KvmMmioFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmMmioFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmMmioFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmMmioFtraceEvent} KvmMmioFtraceEvent instance
             */
            KvmMmioFtraceEvent.create = function create(properties) {
                return new KvmMmioFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmMmioFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmMmioFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmMmioFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmMmioFtraceEvent} m KvmMmioFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmMmioFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.gpa != null && Object.hasOwnProperty.call(m, "gpa"))
                    w.uint32(8).uint64(m.gpa);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(16).uint32(m.len);
                if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                    w.uint32(24).uint32(m.type);
                if (m.val != null && Object.hasOwnProperty.call(m, "val"))
                    w.uint32(32).uint64(m.val);
                return w;
            };

            /**
             * Encodes the specified KvmMmioFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmMmioFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmMmioFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmMmioFtraceEvent} message KvmMmioFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmMmioFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmMmioFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmMmioFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmMmioFtraceEvent} KvmMmioFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmMmioFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmMmioFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.gpa = r.uint64();
                        break;
                    case 2:
                        m.len = r.uint32();
                        break;
                    case 3:
                        m.type = r.uint32();
                        break;
                    case 4:
                        m.val = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmMmioFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmMmioFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmMmioFtraceEvent} KvmMmioFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmMmioFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmMmioFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmMmioFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmMmioFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.gpa != null && m.hasOwnProperty("gpa")) {
                    if (!$util.isInteger(m.gpa) && !(m.gpa && $util.isInteger(m.gpa.low) && $util.isInteger(m.gpa.high)))
                        return "gpa: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    if (!$util.isInteger(m.type))
                        return "type: integer expected";
                }
                if (m.val != null && m.hasOwnProperty("val")) {
                    if (!$util.isInteger(m.val) && !(m.val && $util.isInteger(m.val.low) && $util.isInteger(m.val.high)))
                        return "val: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KvmMmioFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmMmioFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmMmioFtraceEvent} KvmMmioFtraceEvent
             */
            KvmMmioFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmMmioFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmMmioFtraceEvent();
                if (d.gpa != null) {
                    if ($util.Long)
                        (m.gpa = $util.Long.fromValue(d.gpa)).unsigned = true;
                    else if (typeof d.gpa === "string")
                        m.gpa = parseInt(d.gpa, 10);
                    else if (typeof d.gpa === "number")
                        m.gpa = d.gpa;
                    else if (typeof d.gpa === "object")
                        m.gpa = new $util.LongBits(d.gpa.low >>> 0, d.gpa.high >>> 0).toNumber(true);
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.type != null) {
                    m.type = d.type >>> 0;
                }
                if (d.val != null) {
                    if ($util.Long)
                        (m.val = $util.Long.fromValue(d.val)).unsigned = true;
                    else if (typeof d.val === "string")
                        m.val = parseInt(d.val, 10);
                    else if (typeof d.val === "number")
                        m.val = d.val;
                    else if (typeof d.val === "object")
                        m.val = new $util.LongBits(d.val.low >>> 0, d.val.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmMmioFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmMmioFtraceEvent
             * @static
             * @param {perfetto.protos.KvmMmioFtraceEvent} m KvmMmioFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmMmioFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.gpa = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.gpa = o.longs === String ? "0" : 0;
                    d.len = 0;
                    d.type = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.val = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.val = o.longs === String ? "0" : 0;
                }
                if (m.gpa != null && m.hasOwnProperty("gpa")) {
                    if (typeof m.gpa === "number")
                        d.gpa = o.longs === String ? String(m.gpa) : m.gpa;
                    else
                        d.gpa = o.longs === String ? $util.Long.prototype.toString.call(m.gpa) : o.longs === Number ? new $util.LongBits(m.gpa.low >>> 0, m.gpa.high >>> 0).toNumber(true) : m.gpa;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    d.type = m.type;
                }
                if (m.val != null && m.hasOwnProperty("val")) {
                    if (typeof m.val === "number")
                        d.val = o.longs === String ? String(m.val) : m.val;
                    else
                        d.val = o.longs === String ? $util.Long.prototype.toString.call(m.val) : o.longs === Number ? new $util.LongBits(m.val.low >>> 0, m.val.high >>> 0).toNumber(true) : m.val;
                }
                return d;
            };

            /**
             * Converts this KvmMmioFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmMmioFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmMmioFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmMmioFtraceEvent;
        })();

        protos.KvmMmioEmulateFtraceEvent = (function() {

            /**
             * Properties of a KvmMmioEmulateFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmMmioEmulateFtraceEvent
             * @property {number|null} [cpsr] KvmMmioEmulateFtraceEvent cpsr
             * @property {number|null} [instr] KvmMmioEmulateFtraceEvent instr
             * @property {number|null} [vcpuPc] KvmMmioEmulateFtraceEvent vcpuPc
             */

            /**
             * Constructs a new KvmMmioEmulateFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmMmioEmulateFtraceEvent.
             * @implements IKvmMmioEmulateFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmMmioEmulateFtraceEvent=} [p] Properties to set
             */
            function KvmMmioEmulateFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmMmioEmulateFtraceEvent cpsr.
             * @member {number} cpsr
             * @memberof perfetto.protos.KvmMmioEmulateFtraceEvent
             * @instance
             */
            KvmMmioEmulateFtraceEvent.prototype.cpsr = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KvmMmioEmulateFtraceEvent instr.
             * @member {number} instr
             * @memberof perfetto.protos.KvmMmioEmulateFtraceEvent
             * @instance
             */
            KvmMmioEmulateFtraceEvent.prototype.instr = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KvmMmioEmulateFtraceEvent vcpuPc.
             * @member {number} vcpuPc
             * @memberof perfetto.protos.KvmMmioEmulateFtraceEvent
             * @instance
             */
            KvmMmioEmulateFtraceEvent.prototype.vcpuPc = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KvmMmioEmulateFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmMmioEmulateFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmMmioEmulateFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmMmioEmulateFtraceEvent} KvmMmioEmulateFtraceEvent instance
             */
            KvmMmioEmulateFtraceEvent.create = function create(properties) {
                return new KvmMmioEmulateFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmMmioEmulateFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmMmioEmulateFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmMmioEmulateFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmMmioEmulateFtraceEvent} m KvmMmioEmulateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmMmioEmulateFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.cpsr != null && Object.hasOwnProperty.call(m, "cpsr"))
                    w.uint32(8).uint64(m.cpsr);
                if (m.instr != null && Object.hasOwnProperty.call(m, "instr"))
                    w.uint32(16).uint64(m.instr);
                if (m.vcpuPc != null && Object.hasOwnProperty.call(m, "vcpuPc"))
                    w.uint32(24).uint64(m.vcpuPc);
                return w;
            };

            /**
             * Encodes the specified KvmMmioEmulateFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmMmioEmulateFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmMmioEmulateFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmMmioEmulateFtraceEvent} message KvmMmioEmulateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmMmioEmulateFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmMmioEmulateFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmMmioEmulateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmMmioEmulateFtraceEvent} KvmMmioEmulateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmMmioEmulateFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmMmioEmulateFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.cpsr = r.uint64();
                        break;
                    case 2:
                        m.instr = r.uint64();
                        break;
                    case 3:
                        m.vcpuPc = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmMmioEmulateFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmMmioEmulateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmMmioEmulateFtraceEvent} KvmMmioEmulateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmMmioEmulateFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmMmioEmulateFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmMmioEmulateFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmMmioEmulateFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.cpsr != null && m.hasOwnProperty("cpsr")) {
                    if (!$util.isInteger(m.cpsr) && !(m.cpsr && $util.isInteger(m.cpsr.low) && $util.isInteger(m.cpsr.high)))
                        return "cpsr: integer|Long expected";
                }
                if (m.instr != null && m.hasOwnProperty("instr")) {
                    if (!$util.isInteger(m.instr) && !(m.instr && $util.isInteger(m.instr.low) && $util.isInteger(m.instr.high)))
                        return "instr: integer|Long expected";
                }
                if (m.vcpuPc != null && m.hasOwnProperty("vcpuPc")) {
                    if (!$util.isInteger(m.vcpuPc) && !(m.vcpuPc && $util.isInteger(m.vcpuPc.low) && $util.isInteger(m.vcpuPc.high)))
                        return "vcpuPc: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KvmMmioEmulateFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmMmioEmulateFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmMmioEmulateFtraceEvent} KvmMmioEmulateFtraceEvent
             */
            KvmMmioEmulateFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmMmioEmulateFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmMmioEmulateFtraceEvent();
                if (d.cpsr != null) {
                    if ($util.Long)
                        (m.cpsr = $util.Long.fromValue(d.cpsr)).unsigned = true;
                    else if (typeof d.cpsr === "string")
                        m.cpsr = parseInt(d.cpsr, 10);
                    else if (typeof d.cpsr === "number")
                        m.cpsr = d.cpsr;
                    else if (typeof d.cpsr === "object")
                        m.cpsr = new $util.LongBits(d.cpsr.low >>> 0, d.cpsr.high >>> 0).toNumber(true);
                }
                if (d.instr != null) {
                    if ($util.Long)
                        (m.instr = $util.Long.fromValue(d.instr)).unsigned = true;
                    else if (typeof d.instr === "string")
                        m.instr = parseInt(d.instr, 10);
                    else if (typeof d.instr === "number")
                        m.instr = d.instr;
                    else if (typeof d.instr === "object")
                        m.instr = new $util.LongBits(d.instr.low >>> 0, d.instr.high >>> 0).toNumber(true);
                }
                if (d.vcpuPc != null) {
                    if ($util.Long)
                        (m.vcpuPc = $util.Long.fromValue(d.vcpuPc)).unsigned = true;
                    else if (typeof d.vcpuPc === "string")
                        m.vcpuPc = parseInt(d.vcpuPc, 10);
                    else if (typeof d.vcpuPc === "number")
                        m.vcpuPc = d.vcpuPc;
                    else if (typeof d.vcpuPc === "object")
                        m.vcpuPc = new $util.LongBits(d.vcpuPc.low >>> 0, d.vcpuPc.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmMmioEmulateFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmMmioEmulateFtraceEvent
             * @static
             * @param {perfetto.protos.KvmMmioEmulateFtraceEvent} m KvmMmioEmulateFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmMmioEmulateFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.cpsr = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.cpsr = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.instr = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.instr = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.vcpuPc = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.vcpuPc = o.longs === String ? "0" : 0;
                }
                if (m.cpsr != null && m.hasOwnProperty("cpsr")) {
                    if (typeof m.cpsr === "number")
                        d.cpsr = o.longs === String ? String(m.cpsr) : m.cpsr;
                    else
                        d.cpsr = o.longs === String ? $util.Long.prototype.toString.call(m.cpsr) : o.longs === Number ? new $util.LongBits(m.cpsr.low >>> 0, m.cpsr.high >>> 0).toNumber(true) : m.cpsr;
                }
                if (m.instr != null && m.hasOwnProperty("instr")) {
                    if (typeof m.instr === "number")
                        d.instr = o.longs === String ? String(m.instr) : m.instr;
                    else
                        d.instr = o.longs === String ? $util.Long.prototype.toString.call(m.instr) : o.longs === Number ? new $util.LongBits(m.instr.low >>> 0, m.instr.high >>> 0).toNumber(true) : m.instr;
                }
                if (m.vcpuPc != null && m.hasOwnProperty("vcpuPc")) {
                    if (typeof m.vcpuPc === "number")
                        d.vcpuPc = o.longs === String ? String(m.vcpuPc) : m.vcpuPc;
                    else
                        d.vcpuPc = o.longs === String ? $util.Long.prototype.toString.call(m.vcpuPc) : o.longs === Number ? new $util.LongBits(m.vcpuPc.low >>> 0, m.vcpuPc.high >>> 0).toNumber(true) : m.vcpuPc;
                }
                return d;
            };

            /**
             * Converts this KvmMmioEmulateFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmMmioEmulateFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmMmioEmulateFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmMmioEmulateFtraceEvent;
        })();

        protos.KvmSetGuestDebugFtraceEvent = (function() {

            /**
             * Properties of a KvmSetGuestDebugFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmSetGuestDebugFtraceEvent
             * @property {number|null} [guestDebug] KvmSetGuestDebugFtraceEvent guestDebug
             * @property {number|null} [vcpu] KvmSetGuestDebugFtraceEvent vcpu
             */

            /**
             * Constructs a new KvmSetGuestDebugFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmSetGuestDebugFtraceEvent.
             * @implements IKvmSetGuestDebugFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmSetGuestDebugFtraceEvent=} [p] Properties to set
             */
            function KvmSetGuestDebugFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmSetGuestDebugFtraceEvent guestDebug.
             * @member {number} guestDebug
             * @memberof perfetto.protos.KvmSetGuestDebugFtraceEvent
             * @instance
             */
            KvmSetGuestDebugFtraceEvent.prototype.guestDebug = 0;

            /**
             * KvmSetGuestDebugFtraceEvent vcpu.
             * @member {number} vcpu
             * @memberof perfetto.protos.KvmSetGuestDebugFtraceEvent
             * @instance
             */
            KvmSetGuestDebugFtraceEvent.prototype.vcpu = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KvmSetGuestDebugFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmSetGuestDebugFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmSetGuestDebugFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmSetGuestDebugFtraceEvent} KvmSetGuestDebugFtraceEvent instance
             */
            KvmSetGuestDebugFtraceEvent.create = function create(properties) {
                return new KvmSetGuestDebugFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmSetGuestDebugFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmSetGuestDebugFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmSetGuestDebugFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmSetGuestDebugFtraceEvent} m KvmSetGuestDebugFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmSetGuestDebugFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.guestDebug != null && Object.hasOwnProperty.call(m, "guestDebug"))
                    w.uint32(8).uint32(m.guestDebug);
                if (m.vcpu != null && Object.hasOwnProperty.call(m, "vcpu"))
                    w.uint32(16).uint64(m.vcpu);
                return w;
            };

            /**
             * Encodes the specified KvmSetGuestDebugFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmSetGuestDebugFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmSetGuestDebugFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmSetGuestDebugFtraceEvent} message KvmSetGuestDebugFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmSetGuestDebugFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmSetGuestDebugFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmSetGuestDebugFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmSetGuestDebugFtraceEvent} KvmSetGuestDebugFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmSetGuestDebugFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmSetGuestDebugFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.guestDebug = r.uint32();
                        break;
                    case 2:
                        m.vcpu = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmSetGuestDebugFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmSetGuestDebugFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmSetGuestDebugFtraceEvent} KvmSetGuestDebugFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmSetGuestDebugFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmSetGuestDebugFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmSetGuestDebugFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmSetGuestDebugFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.guestDebug != null && m.hasOwnProperty("guestDebug")) {
                    if (!$util.isInteger(m.guestDebug))
                        return "guestDebug: integer expected";
                }
                if (m.vcpu != null && m.hasOwnProperty("vcpu")) {
                    if (!$util.isInteger(m.vcpu) && !(m.vcpu && $util.isInteger(m.vcpu.low) && $util.isInteger(m.vcpu.high)))
                        return "vcpu: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KvmSetGuestDebugFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmSetGuestDebugFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmSetGuestDebugFtraceEvent} KvmSetGuestDebugFtraceEvent
             */
            KvmSetGuestDebugFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmSetGuestDebugFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmSetGuestDebugFtraceEvent();
                if (d.guestDebug != null) {
                    m.guestDebug = d.guestDebug >>> 0;
                }
                if (d.vcpu != null) {
                    if ($util.Long)
                        (m.vcpu = $util.Long.fromValue(d.vcpu)).unsigned = true;
                    else if (typeof d.vcpu === "string")
                        m.vcpu = parseInt(d.vcpu, 10);
                    else if (typeof d.vcpu === "number")
                        m.vcpu = d.vcpu;
                    else if (typeof d.vcpu === "object")
                        m.vcpu = new $util.LongBits(d.vcpu.low >>> 0, d.vcpu.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmSetGuestDebugFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmSetGuestDebugFtraceEvent
             * @static
             * @param {perfetto.protos.KvmSetGuestDebugFtraceEvent} m KvmSetGuestDebugFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmSetGuestDebugFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.guestDebug = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.vcpu = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.vcpu = o.longs === String ? "0" : 0;
                }
                if (m.guestDebug != null && m.hasOwnProperty("guestDebug")) {
                    d.guestDebug = m.guestDebug;
                }
                if (m.vcpu != null && m.hasOwnProperty("vcpu")) {
                    if (typeof m.vcpu === "number")
                        d.vcpu = o.longs === String ? String(m.vcpu) : m.vcpu;
                    else
                        d.vcpu = o.longs === String ? $util.Long.prototype.toString.call(m.vcpu) : o.longs === Number ? new $util.LongBits(m.vcpu.low >>> 0, m.vcpu.high >>> 0).toNumber(true) : m.vcpu;
                }
                return d;
            };

            /**
             * Converts this KvmSetGuestDebugFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmSetGuestDebugFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmSetGuestDebugFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmSetGuestDebugFtraceEvent;
        })();

        protos.KvmSetIrqFtraceEvent = (function() {

            /**
             * Properties of a KvmSetIrqFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmSetIrqFtraceEvent
             * @property {number|null} [gsi] KvmSetIrqFtraceEvent gsi
             * @property {number|null} [irqSourceId] KvmSetIrqFtraceEvent irqSourceId
             * @property {number|null} [level] KvmSetIrqFtraceEvent level
             */

            /**
             * Constructs a new KvmSetIrqFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmSetIrqFtraceEvent.
             * @implements IKvmSetIrqFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmSetIrqFtraceEvent=} [p] Properties to set
             */
            function KvmSetIrqFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmSetIrqFtraceEvent gsi.
             * @member {number} gsi
             * @memberof perfetto.protos.KvmSetIrqFtraceEvent
             * @instance
             */
            KvmSetIrqFtraceEvent.prototype.gsi = 0;

            /**
             * KvmSetIrqFtraceEvent irqSourceId.
             * @member {number} irqSourceId
             * @memberof perfetto.protos.KvmSetIrqFtraceEvent
             * @instance
             */
            KvmSetIrqFtraceEvent.prototype.irqSourceId = 0;

            /**
             * KvmSetIrqFtraceEvent level.
             * @member {number} level
             * @memberof perfetto.protos.KvmSetIrqFtraceEvent
             * @instance
             */
            KvmSetIrqFtraceEvent.prototype.level = 0;

            /**
             * Creates a new KvmSetIrqFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmSetIrqFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmSetIrqFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmSetIrqFtraceEvent} KvmSetIrqFtraceEvent instance
             */
            KvmSetIrqFtraceEvent.create = function create(properties) {
                return new KvmSetIrqFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmSetIrqFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmSetIrqFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmSetIrqFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmSetIrqFtraceEvent} m KvmSetIrqFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmSetIrqFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.gsi != null && Object.hasOwnProperty.call(m, "gsi"))
                    w.uint32(8).uint32(m.gsi);
                if (m.irqSourceId != null && Object.hasOwnProperty.call(m, "irqSourceId"))
                    w.uint32(16).int32(m.irqSourceId);
                if (m.level != null && Object.hasOwnProperty.call(m, "level"))
                    w.uint32(24).int32(m.level);
                return w;
            };

            /**
             * Encodes the specified KvmSetIrqFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmSetIrqFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmSetIrqFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmSetIrqFtraceEvent} message KvmSetIrqFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmSetIrqFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmSetIrqFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmSetIrqFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmSetIrqFtraceEvent} KvmSetIrqFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmSetIrqFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmSetIrqFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.gsi = r.uint32();
                        break;
                    case 2:
                        m.irqSourceId = r.int32();
                        break;
                    case 3:
                        m.level = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmSetIrqFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmSetIrqFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmSetIrqFtraceEvent} KvmSetIrqFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmSetIrqFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmSetIrqFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmSetIrqFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmSetIrqFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.gsi != null && m.hasOwnProperty("gsi")) {
                    if (!$util.isInteger(m.gsi))
                        return "gsi: integer expected";
                }
                if (m.irqSourceId != null && m.hasOwnProperty("irqSourceId")) {
                    if (!$util.isInteger(m.irqSourceId))
                        return "irqSourceId: integer expected";
                }
                if (m.level != null && m.hasOwnProperty("level")) {
                    if (!$util.isInteger(m.level))
                        return "level: integer expected";
                }
                return null;
            };

            /**
             * Creates a KvmSetIrqFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmSetIrqFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmSetIrqFtraceEvent} KvmSetIrqFtraceEvent
             */
            KvmSetIrqFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmSetIrqFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmSetIrqFtraceEvent();
                if (d.gsi != null) {
                    m.gsi = d.gsi >>> 0;
                }
                if (d.irqSourceId != null) {
                    m.irqSourceId = d.irqSourceId | 0;
                }
                if (d.level != null) {
                    m.level = d.level | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmSetIrqFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmSetIrqFtraceEvent
             * @static
             * @param {perfetto.protos.KvmSetIrqFtraceEvent} m KvmSetIrqFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmSetIrqFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.gsi = 0;
                    d.irqSourceId = 0;
                    d.level = 0;
                }
                if (m.gsi != null && m.hasOwnProperty("gsi")) {
                    d.gsi = m.gsi;
                }
                if (m.irqSourceId != null && m.hasOwnProperty("irqSourceId")) {
                    d.irqSourceId = m.irqSourceId;
                }
                if (m.level != null && m.hasOwnProperty("level")) {
                    d.level = m.level;
                }
                return d;
            };

            /**
             * Converts this KvmSetIrqFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmSetIrqFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmSetIrqFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmSetIrqFtraceEvent;
        })();

        protos.KvmSetSpteHvaFtraceEvent = (function() {

            /**
             * Properties of a KvmSetSpteHvaFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmSetSpteHvaFtraceEvent
             * @property {number|null} [hva] KvmSetSpteHvaFtraceEvent hva
             */

            /**
             * Constructs a new KvmSetSpteHvaFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmSetSpteHvaFtraceEvent.
             * @implements IKvmSetSpteHvaFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmSetSpteHvaFtraceEvent=} [p] Properties to set
             */
            function KvmSetSpteHvaFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmSetSpteHvaFtraceEvent hva.
             * @member {number} hva
             * @memberof perfetto.protos.KvmSetSpteHvaFtraceEvent
             * @instance
             */
            KvmSetSpteHvaFtraceEvent.prototype.hva = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KvmSetSpteHvaFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmSetSpteHvaFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmSetSpteHvaFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmSetSpteHvaFtraceEvent} KvmSetSpteHvaFtraceEvent instance
             */
            KvmSetSpteHvaFtraceEvent.create = function create(properties) {
                return new KvmSetSpteHvaFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmSetSpteHvaFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmSetSpteHvaFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmSetSpteHvaFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmSetSpteHvaFtraceEvent} m KvmSetSpteHvaFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmSetSpteHvaFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.hva != null && Object.hasOwnProperty.call(m, "hva"))
                    w.uint32(8).uint64(m.hva);
                return w;
            };

            /**
             * Encodes the specified KvmSetSpteHvaFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmSetSpteHvaFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmSetSpteHvaFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmSetSpteHvaFtraceEvent} message KvmSetSpteHvaFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmSetSpteHvaFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmSetSpteHvaFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmSetSpteHvaFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmSetSpteHvaFtraceEvent} KvmSetSpteHvaFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmSetSpteHvaFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmSetSpteHvaFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.hva = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmSetSpteHvaFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmSetSpteHvaFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmSetSpteHvaFtraceEvent} KvmSetSpteHvaFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmSetSpteHvaFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmSetSpteHvaFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmSetSpteHvaFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmSetSpteHvaFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.hva != null && m.hasOwnProperty("hva")) {
                    if (!$util.isInteger(m.hva) && !(m.hva && $util.isInteger(m.hva.low) && $util.isInteger(m.hva.high)))
                        return "hva: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KvmSetSpteHvaFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmSetSpteHvaFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmSetSpteHvaFtraceEvent} KvmSetSpteHvaFtraceEvent
             */
            KvmSetSpteHvaFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmSetSpteHvaFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmSetSpteHvaFtraceEvent();
                if (d.hva != null) {
                    if ($util.Long)
                        (m.hva = $util.Long.fromValue(d.hva)).unsigned = true;
                    else if (typeof d.hva === "string")
                        m.hva = parseInt(d.hva, 10);
                    else if (typeof d.hva === "number")
                        m.hva = d.hva;
                    else if (typeof d.hva === "object")
                        m.hva = new $util.LongBits(d.hva.low >>> 0, d.hva.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmSetSpteHvaFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmSetSpteHvaFtraceEvent
             * @static
             * @param {perfetto.protos.KvmSetSpteHvaFtraceEvent} m KvmSetSpteHvaFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmSetSpteHvaFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.hva = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.hva = o.longs === String ? "0" : 0;
                }
                if (m.hva != null && m.hasOwnProperty("hva")) {
                    if (typeof m.hva === "number")
                        d.hva = o.longs === String ? String(m.hva) : m.hva;
                    else
                        d.hva = o.longs === String ? $util.Long.prototype.toString.call(m.hva) : o.longs === Number ? new $util.LongBits(m.hva.low >>> 0, m.hva.high >>> 0).toNumber(true) : m.hva;
                }
                return d;
            };

            /**
             * Converts this KvmSetSpteHvaFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmSetSpteHvaFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmSetSpteHvaFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmSetSpteHvaFtraceEvent;
        })();

        protos.KvmSetWayFlushFtraceEvent = (function() {

            /**
             * Properties of a KvmSetWayFlushFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmSetWayFlushFtraceEvent
             * @property {number|null} [cache] KvmSetWayFlushFtraceEvent cache
             * @property {number|null} [vcpuPc] KvmSetWayFlushFtraceEvent vcpuPc
             */

            /**
             * Constructs a new KvmSetWayFlushFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmSetWayFlushFtraceEvent.
             * @implements IKvmSetWayFlushFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmSetWayFlushFtraceEvent=} [p] Properties to set
             */
            function KvmSetWayFlushFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmSetWayFlushFtraceEvent cache.
             * @member {number} cache
             * @memberof perfetto.protos.KvmSetWayFlushFtraceEvent
             * @instance
             */
            KvmSetWayFlushFtraceEvent.prototype.cache = 0;

            /**
             * KvmSetWayFlushFtraceEvent vcpuPc.
             * @member {number} vcpuPc
             * @memberof perfetto.protos.KvmSetWayFlushFtraceEvent
             * @instance
             */
            KvmSetWayFlushFtraceEvent.prototype.vcpuPc = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KvmSetWayFlushFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmSetWayFlushFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmSetWayFlushFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmSetWayFlushFtraceEvent} KvmSetWayFlushFtraceEvent instance
             */
            KvmSetWayFlushFtraceEvent.create = function create(properties) {
                return new KvmSetWayFlushFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmSetWayFlushFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmSetWayFlushFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmSetWayFlushFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmSetWayFlushFtraceEvent} m KvmSetWayFlushFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmSetWayFlushFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.cache != null && Object.hasOwnProperty.call(m, "cache"))
                    w.uint32(8).uint32(m.cache);
                if (m.vcpuPc != null && Object.hasOwnProperty.call(m, "vcpuPc"))
                    w.uint32(16).uint64(m.vcpuPc);
                return w;
            };

            /**
             * Encodes the specified KvmSetWayFlushFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmSetWayFlushFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmSetWayFlushFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmSetWayFlushFtraceEvent} message KvmSetWayFlushFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmSetWayFlushFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmSetWayFlushFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmSetWayFlushFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmSetWayFlushFtraceEvent} KvmSetWayFlushFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmSetWayFlushFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmSetWayFlushFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.cache = r.uint32();
                        break;
                    case 2:
                        m.vcpuPc = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmSetWayFlushFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmSetWayFlushFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmSetWayFlushFtraceEvent} KvmSetWayFlushFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmSetWayFlushFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmSetWayFlushFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmSetWayFlushFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmSetWayFlushFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.cache != null && m.hasOwnProperty("cache")) {
                    if (!$util.isInteger(m.cache))
                        return "cache: integer expected";
                }
                if (m.vcpuPc != null && m.hasOwnProperty("vcpuPc")) {
                    if (!$util.isInteger(m.vcpuPc) && !(m.vcpuPc && $util.isInteger(m.vcpuPc.low) && $util.isInteger(m.vcpuPc.high)))
                        return "vcpuPc: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KvmSetWayFlushFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmSetWayFlushFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmSetWayFlushFtraceEvent} KvmSetWayFlushFtraceEvent
             */
            KvmSetWayFlushFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmSetWayFlushFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmSetWayFlushFtraceEvent();
                if (d.cache != null) {
                    m.cache = d.cache >>> 0;
                }
                if (d.vcpuPc != null) {
                    if ($util.Long)
                        (m.vcpuPc = $util.Long.fromValue(d.vcpuPc)).unsigned = true;
                    else if (typeof d.vcpuPc === "string")
                        m.vcpuPc = parseInt(d.vcpuPc, 10);
                    else if (typeof d.vcpuPc === "number")
                        m.vcpuPc = d.vcpuPc;
                    else if (typeof d.vcpuPc === "object")
                        m.vcpuPc = new $util.LongBits(d.vcpuPc.low >>> 0, d.vcpuPc.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmSetWayFlushFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmSetWayFlushFtraceEvent
             * @static
             * @param {perfetto.protos.KvmSetWayFlushFtraceEvent} m KvmSetWayFlushFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmSetWayFlushFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.cache = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.vcpuPc = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.vcpuPc = o.longs === String ? "0" : 0;
                }
                if (m.cache != null && m.hasOwnProperty("cache")) {
                    d.cache = m.cache;
                }
                if (m.vcpuPc != null && m.hasOwnProperty("vcpuPc")) {
                    if (typeof m.vcpuPc === "number")
                        d.vcpuPc = o.longs === String ? String(m.vcpuPc) : m.vcpuPc;
                    else
                        d.vcpuPc = o.longs === String ? $util.Long.prototype.toString.call(m.vcpuPc) : o.longs === Number ? new $util.LongBits(m.vcpuPc.low >>> 0, m.vcpuPc.high >>> 0).toNumber(true) : m.vcpuPc;
                }
                return d;
            };

            /**
             * Converts this KvmSetWayFlushFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmSetWayFlushFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmSetWayFlushFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmSetWayFlushFtraceEvent;
        })();

        protos.KvmSysAccessFtraceEvent = (function() {

            /**
             * Properties of a KvmSysAccessFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmSysAccessFtraceEvent
             * @property {number|null} [CRm] KvmSysAccessFtraceEvent CRm
             * @property {number|null} [CRn] KvmSysAccessFtraceEvent CRn
             * @property {number|null} [Op0] KvmSysAccessFtraceEvent Op0
             * @property {number|null} [Op1] KvmSysAccessFtraceEvent Op1
             * @property {number|null} [Op2] KvmSysAccessFtraceEvent Op2
             * @property {number|null} [isWrite] KvmSysAccessFtraceEvent isWrite
             * @property {string|null} [name] KvmSysAccessFtraceEvent name
             * @property {number|null} [vcpuPc] KvmSysAccessFtraceEvent vcpuPc
             */

            /**
             * Constructs a new KvmSysAccessFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmSysAccessFtraceEvent.
             * @implements IKvmSysAccessFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmSysAccessFtraceEvent=} [p] Properties to set
             */
            function KvmSysAccessFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmSysAccessFtraceEvent CRm.
             * @member {number} CRm
             * @memberof perfetto.protos.KvmSysAccessFtraceEvent
             * @instance
             */
            KvmSysAccessFtraceEvent.prototype.CRm = 0;

            /**
             * KvmSysAccessFtraceEvent CRn.
             * @member {number} CRn
             * @memberof perfetto.protos.KvmSysAccessFtraceEvent
             * @instance
             */
            KvmSysAccessFtraceEvent.prototype.CRn = 0;

            /**
             * KvmSysAccessFtraceEvent Op0.
             * @member {number} Op0
             * @memberof perfetto.protos.KvmSysAccessFtraceEvent
             * @instance
             */
            KvmSysAccessFtraceEvent.prototype.Op0 = 0;

            /**
             * KvmSysAccessFtraceEvent Op1.
             * @member {number} Op1
             * @memberof perfetto.protos.KvmSysAccessFtraceEvent
             * @instance
             */
            KvmSysAccessFtraceEvent.prototype.Op1 = 0;

            /**
             * KvmSysAccessFtraceEvent Op2.
             * @member {number} Op2
             * @memberof perfetto.protos.KvmSysAccessFtraceEvent
             * @instance
             */
            KvmSysAccessFtraceEvent.prototype.Op2 = 0;

            /**
             * KvmSysAccessFtraceEvent isWrite.
             * @member {number} isWrite
             * @memberof perfetto.protos.KvmSysAccessFtraceEvent
             * @instance
             */
            KvmSysAccessFtraceEvent.prototype.isWrite = 0;

            /**
             * KvmSysAccessFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.KvmSysAccessFtraceEvent
             * @instance
             */
            KvmSysAccessFtraceEvent.prototype.name = "";

            /**
             * KvmSysAccessFtraceEvent vcpuPc.
             * @member {number} vcpuPc
             * @memberof perfetto.protos.KvmSysAccessFtraceEvent
             * @instance
             */
            KvmSysAccessFtraceEvent.prototype.vcpuPc = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KvmSysAccessFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmSysAccessFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmSysAccessFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmSysAccessFtraceEvent} KvmSysAccessFtraceEvent instance
             */
            KvmSysAccessFtraceEvent.create = function create(properties) {
                return new KvmSysAccessFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmSysAccessFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmSysAccessFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmSysAccessFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmSysAccessFtraceEvent} m KvmSysAccessFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmSysAccessFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.CRm != null && Object.hasOwnProperty.call(m, "CRm"))
                    w.uint32(8).uint32(m.CRm);
                if (m.CRn != null && Object.hasOwnProperty.call(m, "CRn"))
                    w.uint32(16).uint32(m.CRn);
                if (m.Op0 != null && Object.hasOwnProperty.call(m, "Op0"))
                    w.uint32(24).uint32(m.Op0);
                if (m.Op1 != null && Object.hasOwnProperty.call(m, "Op1"))
                    w.uint32(32).uint32(m.Op1);
                if (m.Op2 != null && Object.hasOwnProperty.call(m, "Op2"))
                    w.uint32(40).uint32(m.Op2);
                if (m.isWrite != null && Object.hasOwnProperty.call(m, "isWrite"))
                    w.uint32(48).uint32(m.isWrite);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(58).string(m.name);
                if (m.vcpuPc != null && Object.hasOwnProperty.call(m, "vcpuPc"))
                    w.uint32(64).uint64(m.vcpuPc);
                return w;
            };

            /**
             * Encodes the specified KvmSysAccessFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmSysAccessFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmSysAccessFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmSysAccessFtraceEvent} message KvmSysAccessFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmSysAccessFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmSysAccessFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmSysAccessFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmSysAccessFtraceEvent} KvmSysAccessFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmSysAccessFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmSysAccessFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.CRm = r.uint32();
                        break;
                    case 2:
                        m.CRn = r.uint32();
                        break;
                    case 3:
                        m.Op0 = r.uint32();
                        break;
                    case 4:
                        m.Op1 = r.uint32();
                        break;
                    case 5:
                        m.Op2 = r.uint32();
                        break;
                    case 6:
                        m.isWrite = r.uint32();
                        break;
                    case 7:
                        m.name = r.string();
                        break;
                    case 8:
                        m.vcpuPc = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmSysAccessFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmSysAccessFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmSysAccessFtraceEvent} KvmSysAccessFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmSysAccessFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmSysAccessFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmSysAccessFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmSysAccessFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.CRm != null && m.hasOwnProperty("CRm")) {
                    if (!$util.isInteger(m.CRm))
                        return "CRm: integer expected";
                }
                if (m.CRn != null && m.hasOwnProperty("CRn")) {
                    if (!$util.isInteger(m.CRn))
                        return "CRn: integer expected";
                }
                if (m.Op0 != null && m.hasOwnProperty("Op0")) {
                    if (!$util.isInteger(m.Op0))
                        return "Op0: integer expected";
                }
                if (m.Op1 != null && m.hasOwnProperty("Op1")) {
                    if (!$util.isInteger(m.Op1))
                        return "Op1: integer expected";
                }
                if (m.Op2 != null && m.hasOwnProperty("Op2")) {
                    if (!$util.isInteger(m.Op2))
                        return "Op2: integer expected";
                }
                if (m.isWrite != null && m.hasOwnProperty("isWrite")) {
                    if (!$util.isInteger(m.isWrite))
                        return "isWrite: integer expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.vcpuPc != null && m.hasOwnProperty("vcpuPc")) {
                    if (!$util.isInteger(m.vcpuPc) && !(m.vcpuPc && $util.isInteger(m.vcpuPc.low) && $util.isInteger(m.vcpuPc.high)))
                        return "vcpuPc: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KvmSysAccessFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmSysAccessFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmSysAccessFtraceEvent} KvmSysAccessFtraceEvent
             */
            KvmSysAccessFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmSysAccessFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmSysAccessFtraceEvent();
                if (d.CRm != null) {
                    m.CRm = d.CRm >>> 0;
                }
                if (d.CRn != null) {
                    m.CRn = d.CRn >>> 0;
                }
                if (d.Op0 != null) {
                    m.Op0 = d.Op0 >>> 0;
                }
                if (d.Op1 != null) {
                    m.Op1 = d.Op1 >>> 0;
                }
                if (d.Op2 != null) {
                    m.Op2 = d.Op2 >>> 0;
                }
                if (d.isWrite != null) {
                    m.isWrite = d.isWrite >>> 0;
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.vcpuPc != null) {
                    if ($util.Long)
                        (m.vcpuPc = $util.Long.fromValue(d.vcpuPc)).unsigned = true;
                    else if (typeof d.vcpuPc === "string")
                        m.vcpuPc = parseInt(d.vcpuPc, 10);
                    else if (typeof d.vcpuPc === "number")
                        m.vcpuPc = d.vcpuPc;
                    else if (typeof d.vcpuPc === "object")
                        m.vcpuPc = new $util.LongBits(d.vcpuPc.low >>> 0, d.vcpuPc.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmSysAccessFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmSysAccessFtraceEvent
             * @static
             * @param {perfetto.protos.KvmSysAccessFtraceEvent} m KvmSysAccessFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmSysAccessFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.CRm = 0;
                    d.CRn = 0;
                    d.Op0 = 0;
                    d.Op1 = 0;
                    d.Op2 = 0;
                    d.isWrite = 0;
                    d.name = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.vcpuPc = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.vcpuPc = o.longs === String ? "0" : 0;
                }
                if (m.CRm != null && m.hasOwnProperty("CRm")) {
                    d.CRm = m.CRm;
                }
                if (m.CRn != null && m.hasOwnProperty("CRn")) {
                    d.CRn = m.CRn;
                }
                if (m.Op0 != null && m.hasOwnProperty("Op0")) {
                    d.Op0 = m.Op0;
                }
                if (m.Op1 != null && m.hasOwnProperty("Op1")) {
                    d.Op1 = m.Op1;
                }
                if (m.Op2 != null && m.hasOwnProperty("Op2")) {
                    d.Op2 = m.Op2;
                }
                if (m.isWrite != null && m.hasOwnProperty("isWrite")) {
                    d.isWrite = m.isWrite;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.vcpuPc != null && m.hasOwnProperty("vcpuPc")) {
                    if (typeof m.vcpuPc === "number")
                        d.vcpuPc = o.longs === String ? String(m.vcpuPc) : m.vcpuPc;
                    else
                        d.vcpuPc = o.longs === String ? $util.Long.prototype.toString.call(m.vcpuPc) : o.longs === Number ? new $util.LongBits(m.vcpuPc.low >>> 0, m.vcpuPc.high >>> 0).toNumber(true) : m.vcpuPc;
                }
                return d;
            };

            /**
             * Converts this KvmSysAccessFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmSysAccessFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmSysAccessFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmSysAccessFtraceEvent;
        })();

        protos.KvmTestAgeHvaFtraceEvent = (function() {

            /**
             * Properties of a KvmTestAgeHvaFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmTestAgeHvaFtraceEvent
             * @property {number|null} [hva] KvmTestAgeHvaFtraceEvent hva
             */

            /**
             * Constructs a new KvmTestAgeHvaFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmTestAgeHvaFtraceEvent.
             * @implements IKvmTestAgeHvaFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmTestAgeHvaFtraceEvent=} [p] Properties to set
             */
            function KvmTestAgeHvaFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmTestAgeHvaFtraceEvent hva.
             * @member {number} hva
             * @memberof perfetto.protos.KvmTestAgeHvaFtraceEvent
             * @instance
             */
            KvmTestAgeHvaFtraceEvent.prototype.hva = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KvmTestAgeHvaFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmTestAgeHvaFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmTestAgeHvaFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmTestAgeHvaFtraceEvent} KvmTestAgeHvaFtraceEvent instance
             */
            KvmTestAgeHvaFtraceEvent.create = function create(properties) {
                return new KvmTestAgeHvaFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmTestAgeHvaFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmTestAgeHvaFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmTestAgeHvaFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmTestAgeHvaFtraceEvent} m KvmTestAgeHvaFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmTestAgeHvaFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.hva != null && Object.hasOwnProperty.call(m, "hva"))
                    w.uint32(8).uint64(m.hva);
                return w;
            };

            /**
             * Encodes the specified KvmTestAgeHvaFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmTestAgeHvaFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmTestAgeHvaFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmTestAgeHvaFtraceEvent} message KvmTestAgeHvaFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmTestAgeHvaFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmTestAgeHvaFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmTestAgeHvaFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmTestAgeHvaFtraceEvent} KvmTestAgeHvaFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmTestAgeHvaFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmTestAgeHvaFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.hva = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmTestAgeHvaFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmTestAgeHvaFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmTestAgeHvaFtraceEvent} KvmTestAgeHvaFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmTestAgeHvaFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmTestAgeHvaFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmTestAgeHvaFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmTestAgeHvaFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.hva != null && m.hasOwnProperty("hva")) {
                    if (!$util.isInteger(m.hva) && !(m.hva && $util.isInteger(m.hva.low) && $util.isInteger(m.hva.high)))
                        return "hva: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KvmTestAgeHvaFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmTestAgeHvaFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmTestAgeHvaFtraceEvent} KvmTestAgeHvaFtraceEvent
             */
            KvmTestAgeHvaFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmTestAgeHvaFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmTestAgeHvaFtraceEvent();
                if (d.hva != null) {
                    if ($util.Long)
                        (m.hva = $util.Long.fromValue(d.hva)).unsigned = true;
                    else if (typeof d.hva === "string")
                        m.hva = parseInt(d.hva, 10);
                    else if (typeof d.hva === "number")
                        m.hva = d.hva;
                    else if (typeof d.hva === "object")
                        m.hva = new $util.LongBits(d.hva.low >>> 0, d.hva.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmTestAgeHvaFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmTestAgeHvaFtraceEvent
             * @static
             * @param {perfetto.protos.KvmTestAgeHvaFtraceEvent} m KvmTestAgeHvaFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmTestAgeHvaFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.hva = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.hva = o.longs === String ? "0" : 0;
                }
                if (m.hva != null && m.hasOwnProperty("hva")) {
                    if (typeof m.hva === "number")
                        d.hva = o.longs === String ? String(m.hva) : m.hva;
                    else
                        d.hva = o.longs === String ? $util.Long.prototype.toString.call(m.hva) : o.longs === Number ? new $util.LongBits(m.hva.low >>> 0, m.hva.high >>> 0).toNumber(true) : m.hva;
                }
                return d;
            };

            /**
             * Converts this KvmTestAgeHvaFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmTestAgeHvaFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmTestAgeHvaFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmTestAgeHvaFtraceEvent;
        })();

        protos.KvmTimerEmulateFtraceEvent = (function() {

            /**
             * Properties of a KvmTimerEmulateFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmTimerEmulateFtraceEvent
             * @property {number|null} [shouldFire] KvmTimerEmulateFtraceEvent shouldFire
             * @property {number|null} [timerIdx] KvmTimerEmulateFtraceEvent timerIdx
             */

            /**
             * Constructs a new KvmTimerEmulateFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmTimerEmulateFtraceEvent.
             * @implements IKvmTimerEmulateFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmTimerEmulateFtraceEvent=} [p] Properties to set
             */
            function KvmTimerEmulateFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmTimerEmulateFtraceEvent shouldFire.
             * @member {number} shouldFire
             * @memberof perfetto.protos.KvmTimerEmulateFtraceEvent
             * @instance
             */
            KvmTimerEmulateFtraceEvent.prototype.shouldFire = 0;

            /**
             * KvmTimerEmulateFtraceEvent timerIdx.
             * @member {number} timerIdx
             * @memberof perfetto.protos.KvmTimerEmulateFtraceEvent
             * @instance
             */
            KvmTimerEmulateFtraceEvent.prototype.timerIdx = 0;

            /**
             * Creates a new KvmTimerEmulateFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmTimerEmulateFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmTimerEmulateFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmTimerEmulateFtraceEvent} KvmTimerEmulateFtraceEvent instance
             */
            KvmTimerEmulateFtraceEvent.create = function create(properties) {
                return new KvmTimerEmulateFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmTimerEmulateFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmTimerEmulateFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmTimerEmulateFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmTimerEmulateFtraceEvent} m KvmTimerEmulateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmTimerEmulateFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.shouldFire != null && Object.hasOwnProperty.call(m, "shouldFire"))
                    w.uint32(8).uint32(m.shouldFire);
                if (m.timerIdx != null && Object.hasOwnProperty.call(m, "timerIdx"))
                    w.uint32(16).int32(m.timerIdx);
                return w;
            };

            /**
             * Encodes the specified KvmTimerEmulateFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmTimerEmulateFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmTimerEmulateFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmTimerEmulateFtraceEvent} message KvmTimerEmulateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmTimerEmulateFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmTimerEmulateFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmTimerEmulateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmTimerEmulateFtraceEvent} KvmTimerEmulateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmTimerEmulateFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmTimerEmulateFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.shouldFire = r.uint32();
                        break;
                    case 2:
                        m.timerIdx = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmTimerEmulateFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmTimerEmulateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmTimerEmulateFtraceEvent} KvmTimerEmulateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmTimerEmulateFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmTimerEmulateFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmTimerEmulateFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmTimerEmulateFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.shouldFire != null && m.hasOwnProperty("shouldFire")) {
                    if (!$util.isInteger(m.shouldFire))
                        return "shouldFire: integer expected";
                }
                if (m.timerIdx != null && m.hasOwnProperty("timerIdx")) {
                    if (!$util.isInteger(m.timerIdx))
                        return "timerIdx: integer expected";
                }
                return null;
            };

            /**
             * Creates a KvmTimerEmulateFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmTimerEmulateFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmTimerEmulateFtraceEvent} KvmTimerEmulateFtraceEvent
             */
            KvmTimerEmulateFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmTimerEmulateFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmTimerEmulateFtraceEvent();
                if (d.shouldFire != null) {
                    m.shouldFire = d.shouldFire >>> 0;
                }
                if (d.timerIdx != null) {
                    m.timerIdx = d.timerIdx | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmTimerEmulateFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmTimerEmulateFtraceEvent
             * @static
             * @param {perfetto.protos.KvmTimerEmulateFtraceEvent} m KvmTimerEmulateFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmTimerEmulateFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.shouldFire = 0;
                    d.timerIdx = 0;
                }
                if (m.shouldFire != null && m.hasOwnProperty("shouldFire")) {
                    d.shouldFire = m.shouldFire;
                }
                if (m.timerIdx != null && m.hasOwnProperty("timerIdx")) {
                    d.timerIdx = m.timerIdx;
                }
                return d;
            };

            /**
             * Converts this KvmTimerEmulateFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmTimerEmulateFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmTimerEmulateFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmTimerEmulateFtraceEvent;
        })();

        protos.KvmTimerHrtimerExpireFtraceEvent = (function() {

            /**
             * Properties of a KvmTimerHrtimerExpireFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmTimerHrtimerExpireFtraceEvent
             * @property {number|null} [timerIdx] KvmTimerHrtimerExpireFtraceEvent timerIdx
             */

            /**
             * Constructs a new KvmTimerHrtimerExpireFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmTimerHrtimerExpireFtraceEvent.
             * @implements IKvmTimerHrtimerExpireFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmTimerHrtimerExpireFtraceEvent=} [p] Properties to set
             */
            function KvmTimerHrtimerExpireFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmTimerHrtimerExpireFtraceEvent timerIdx.
             * @member {number} timerIdx
             * @memberof perfetto.protos.KvmTimerHrtimerExpireFtraceEvent
             * @instance
             */
            KvmTimerHrtimerExpireFtraceEvent.prototype.timerIdx = 0;

            /**
             * Creates a new KvmTimerHrtimerExpireFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmTimerHrtimerExpireFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmTimerHrtimerExpireFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmTimerHrtimerExpireFtraceEvent} KvmTimerHrtimerExpireFtraceEvent instance
             */
            KvmTimerHrtimerExpireFtraceEvent.create = function create(properties) {
                return new KvmTimerHrtimerExpireFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmTimerHrtimerExpireFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmTimerHrtimerExpireFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmTimerHrtimerExpireFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmTimerHrtimerExpireFtraceEvent} m KvmTimerHrtimerExpireFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmTimerHrtimerExpireFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.timerIdx != null && Object.hasOwnProperty.call(m, "timerIdx"))
                    w.uint32(8).int32(m.timerIdx);
                return w;
            };

            /**
             * Encodes the specified KvmTimerHrtimerExpireFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmTimerHrtimerExpireFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmTimerHrtimerExpireFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmTimerHrtimerExpireFtraceEvent} message KvmTimerHrtimerExpireFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmTimerHrtimerExpireFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmTimerHrtimerExpireFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmTimerHrtimerExpireFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmTimerHrtimerExpireFtraceEvent} KvmTimerHrtimerExpireFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmTimerHrtimerExpireFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmTimerHrtimerExpireFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.timerIdx = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmTimerHrtimerExpireFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmTimerHrtimerExpireFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmTimerHrtimerExpireFtraceEvent} KvmTimerHrtimerExpireFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmTimerHrtimerExpireFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmTimerHrtimerExpireFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmTimerHrtimerExpireFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmTimerHrtimerExpireFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.timerIdx != null && m.hasOwnProperty("timerIdx")) {
                    if (!$util.isInteger(m.timerIdx))
                        return "timerIdx: integer expected";
                }
                return null;
            };

            /**
             * Creates a KvmTimerHrtimerExpireFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmTimerHrtimerExpireFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmTimerHrtimerExpireFtraceEvent} KvmTimerHrtimerExpireFtraceEvent
             */
            KvmTimerHrtimerExpireFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmTimerHrtimerExpireFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmTimerHrtimerExpireFtraceEvent();
                if (d.timerIdx != null) {
                    m.timerIdx = d.timerIdx | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmTimerHrtimerExpireFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmTimerHrtimerExpireFtraceEvent
             * @static
             * @param {perfetto.protos.KvmTimerHrtimerExpireFtraceEvent} m KvmTimerHrtimerExpireFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmTimerHrtimerExpireFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.timerIdx = 0;
                }
                if (m.timerIdx != null && m.hasOwnProperty("timerIdx")) {
                    d.timerIdx = m.timerIdx;
                }
                return d;
            };

            /**
             * Converts this KvmTimerHrtimerExpireFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmTimerHrtimerExpireFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmTimerHrtimerExpireFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmTimerHrtimerExpireFtraceEvent;
        })();

        protos.KvmTimerRestoreStateFtraceEvent = (function() {

            /**
             * Properties of a KvmTimerRestoreStateFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmTimerRestoreStateFtraceEvent
             * @property {number|null} [ctl] KvmTimerRestoreStateFtraceEvent ctl
             * @property {number|null} [cval] KvmTimerRestoreStateFtraceEvent cval
             * @property {number|null} [timerIdx] KvmTimerRestoreStateFtraceEvent timerIdx
             */

            /**
             * Constructs a new KvmTimerRestoreStateFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmTimerRestoreStateFtraceEvent.
             * @implements IKvmTimerRestoreStateFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmTimerRestoreStateFtraceEvent=} [p] Properties to set
             */
            function KvmTimerRestoreStateFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmTimerRestoreStateFtraceEvent ctl.
             * @member {number} ctl
             * @memberof perfetto.protos.KvmTimerRestoreStateFtraceEvent
             * @instance
             */
            KvmTimerRestoreStateFtraceEvent.prototype.ctl = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KvmTimerRestoreStateFtraceEvent cval.
             * @member {number} cval
             * @memberof perfetto.protos.KvmTimerRestoreStateFtraceEvent
             * @instance
             */
            KvmTimerRestoreStateFtraceEvent.prototype.cval = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KvmTimerRestoreStateFtraceEvent timerIdx.
             * @member {number} timerIdx
             * @memberof perfetto.protos.KvmTimerRestoreStateFtraceEvent
             * @instance
             */
            KvmTimerRestoreStateFtraceEvent.prototype.timerIdx = 0;

            /**
             * Creates a new KvmTimerRestoreStateFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmTimerRestoreStateFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmTimerRestoreStateFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmTimerRestoreStateFtraceEvent} KvmTimerRestoreStateFtraceEvent instance
             */
            KvmTimerRestoreStateFtraceEvent.create = function create(properties) {
                return new KvmTimerRestoreStateFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmTimerRestoreStateFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmTimerRestoreStateFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmTimerRestoreStateFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmTimerRestoreStateFtraceEvent} m KvmTimerRestoreStateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmTimerRestoreStateFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.ctl != null && Object.hasOwnProperty.call(m, "ctl"))
                    w.uint32(8).uint64(m.ctl);
                if (m.cval != null && Object.hasOwnProperty.call(m, "cval"))
                    w.uint32(16).uint64(m.cval);
                if (m.timerIdx != null && Object.hasOwnProperty.call(m, "timerIdx"))
                    w.uint32(24).int32(m.timerIdx);
                return w;
            };

            /**
             * Encodes the specified KvmTimerRestoreStateFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmTimerRestoreStateFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmTimerRestoreStateFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmTimerRestoreStateFtraceEvent} message KvmTimerRestoreStateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmTimerRestoreStateFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmTimerRestoreStateFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmTimerRestoreStateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmTimerRestoreStateFtraceEvent} KvmTimerRestoreStateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmTimerRestoreStateFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmTimerRestoreStateFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.ctl = r.uint64();
                        break;
                    case 2:
                        m.cval = r.uint64();
                        break;
                    case 3:
                        m.timerIdx = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmTimerRestoreStateFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmTimerRestoreStateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmTimerRestoreStateFtraceEvent} KvmTimerRestoreStateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmTimerRestoreStateFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmTimerRestoreStateFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmTimerRestoreStateFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmTimerRestoreStateFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.ctl != null && m.hasOwnProperty("ctl")) {
                    if (!$util.isInteger(m.ctl) && !(m.ctl && $util.isInteger(m.ctl.low) && $util.isInteger(m.ctl.high)))
                        return "ctl: integer|Long expected";
                }
                if (m.cval != null && m.hasOwnProperty("cval")) {
                    if (!$util.isInteger(m.cval) && !(m.cval && $util.isInteger(m.cval.low) && $util.isInteger(m.cval.high)))
                        return "cval: integer|Long expected";
                }
                if (m.timerIdx != null && m.hasOwnProperty("timerIdx")) {
                    if (!$util.isInteger(m.timerIdx))
                        return "timerIdx: integer expected";
                }
                return null;
            };

            /**
             * Creates a KvmTimerRestoreStateFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmTimerRestoreStateFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmTimerRestoreStateFtraceEvent} KvmTimerRestoreStateFtraceEvent
             */
            KvmTimerRestoreStateFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmTimerRestoreStateFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmTimerRestoreStateFtraceEvent();
                if (d.ctl != null) {
                    if ($util.Long)
                        (m.ctl = $util.Long.fromValue(d.ctl)).unsigned = true;
                    else if (typeof d.ctl === "string")
                        m.ctl = parseInt(d.ctl, 10);
                    else if (typeof d.ctl === "number")
                        m.ctl = d.ctl;
                    else if (typeof d.ctl === "object")
                        m.ctl = new $util.LongBits(d.ctl.low >>> 0, d.ctl.high >>> 0).toNumber(true);
                }
                if (d.cval != null) {
                    if ($util.Long)
                        (m.cval = $util.Long.fromValue(d.cval)).unsigned = true;
                    else if (typeof d.cval === "string")
                        m.cval = parseInt(d.cval, 10);
                    else if (typeof d.cval === "number")
                        m.cval = d.cval;
                    else if (typeof d.cval === "object")
                        m.cval = new $util.LongBits(d.cval.low >>> 0, d.cval.high >>> 0).toNumber(true);
                }
                if (d.timerIdx != null) {
                    m.timerIdx = d.timerIdx | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmTimerRestoreStateFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmTimerRestoreStateFtraceEvent
             * @static
             * @param {perfetto.protos.KvmTimerRestoreStateFtraceEvent} m KvmTimerRestoreStateFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmTimerRestoreStateFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ctl = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ctl = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.cval = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.cval = o.longs === String ? "0" : 0;
                    d.timerIdx = 0;
                }
                if (m.ctl != null && m.hasOwnProperty("ctl")) {
                    if (typeof m.ctl === "number")
                        d.ctl = o.longs === String ? String(m.ctl) : m.ctl;
                    else
                        d.ctl = o.longs === String ? $util.Long.prototype.toString.call(m.ctl) : o.longs === Number ? new $util.LongBits(m.ctl.low >>> 0, m.ctl.high >>> 0).toNumber(true) : m.ctl;
                }
                if (m.cval != null && m.hasOwnProperty("cval")) {
                    if (typeof m.cval === "number")
                        d.cval = o.longs === String ? String(m.cval) : m.cval;
                    else
                        d.cval = o.longs === String ? $util.Long.prototype.toString.call(m.cval) : o.longs === Number ? new $util.LongBits(m.cval.low >>> 0, m.cval.high >>> 0).toNumber(true) : m.cval;
                }
                if (m.timerIdx != null && m.hasOwnProperty("timerIdx")) {
                    d.timerIdx = m.timerIdx;
                }
                return d;
            };

            /**
             * Converts this KvmTimerRestoreStateFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmTimerRestoreStateFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmTimerRestoreStateFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmTimerRestoreStateFtraceEvent;
        })();

        protos.KvmTimerSaveStateFtraceEvent = (function() {

            /**
             * Properties of a KvmTimerSaveStateFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmTimerSaveStateFtraceEvent
             * @property {number|null} [ctl] KvmTimerSaveStateFtraceEvent ctl
             * @property {number|null} [cval] KvmTimerSaveStateFtraceEvent cval
             * @property {number|null} [timerIdx] KvmTimerSaveStateFtraceEvent timerIdx
             */

            /**
             * Constructs a new KvmTimerSaveStateFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmTimerSaveStateFtraceEvent.
             * @implements IKvmTimerSaveStateFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmTimerSaveStateFtraceEvent=} [p] Properties to set
             */
            function KvmTimerSaveStateFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmTimerSaveStateFtraceEvent ctl.
             * @member {number} ctl
             * @memberof perfetto.protos.KvmTimerSaveStateFtraceEvent
             * @instance
             */
            KvmTimerSaveStateFtraceEvent.prototype.ctl = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KvmTimerSaveStateFtraceEvent cval.
             * @member {number} cval
             * @memberof perfetto.protos.KvmTimerSaveStateFtraceEvent
             * @instance
             */
            KvmTimerSaveStateFtraceEvent.prototype.cval = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KvmTimerSaveStateFtraceEvent timerIdx.
             * @member {number} timerIdx
             * @memberof perfetto.protos.KvmTimerSaveStateFtraceEvent
             * @instance
             */
            KvmTimerSaveStateFtraceEvent.prototype.timerIdx = 0;

            /**
             * Creates a new KvmTimerSaveStateFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmTimerSaveStateFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmTimerSaveStateFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmTimerSaveStateFtraceEvent} KvmTimerSaveStateFtraceEvent instance
             */
            KvmTimerSaveStateFtraceEvent.create = function create(properties) {
                return new KvmTimerSaveStateFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmTimerSaveStateFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmTimerSaveStateFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmTimerSaveStateFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmTimerSaveStateFtraceEvent} m KvmTimerSaveStateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmTimerSaveStateFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.ctl != null && Object.hasOwnProperty.call(m, "ctl"))
                    w.uint32(8).uint64(m.ctl);
                if (m.cval != null && Object.hasOwnProperty.call(m, "cval"))
                    w.uint32(16).uint64(m.cval);
                if (m.timerIdx != null && Object.hasOwnProperty.call(m, "timerIdx"))
                    w.uint32(24).int32(m.timerIdx);
                return w;
            };

            /**
             * Encodes the specified KvmTimerSaveStateFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmTimerSaveStateFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmTimerSaveStateFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmTimerSaveStateFtraceEvent} message KvmTimerSaveStateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmTimerSaveStateFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmTimerSaveStateFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmTimerSaveStateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmTimerSaveStateFtraceEvent} KvmTimerSaveStateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmTimerSaveStateFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmTimerSaveStateFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.ctl = r.uint64();
                        break;
                    case 2:
                        m.cval = r.uint64();
                        break;
                    case 3:
                        m.timerIdx = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmTimerSaveStateFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmTimerSaveStateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmTimerSaveStateFtraceEvent} KvmTimerSaveStateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmTimerSaveStateFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmTimerSaveStateFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmTimerSaveStateFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmTimerSaveStateFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.ctl != null && m.hasOwnProperty("ctl")) {
                    if (!$util.isInteger(m.ctl) && !(m.ctl && $util.isInteger(m.ctl.low) && $util.isInteger(m.ctl.high)))
                        return "ctl: integer|Long expected";
                }
                if (m.cval != null && m.hasOwnProperty("cval")) {
                    if (!$util.isInteger(m.cval) && !(m.cval && $util.isInteger(m.cval.low) && $util.isInteger(m.cval.high)))
                        return "cval: integer|Long expected";
                }
                if (m.timerIdx != null && m.hasOwnProperty("timerIdx")) {
                    if (!$util.isInteger(m.timerIdx))
                        return "timerIdx: integer expected";
                }
                return null;
            };

            /**
             * Creates a KvmTimerSaveStateFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmTimerSaveStateFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmTimerSaveStateFtraceEvent} KvmTimerSaveStateFtraceEvent
             */
            KvmTimerSaveStateFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmTimerSaveStateFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmTimerSaveStateFtraceEvent();
                if (d.ctl != null) {
                    if ($util.Long)
                        (m.ctl = $util.Long.fromValue(d.ctl)).unsigned = true;
                    else if (typeof d.ctl === "string")
                        m.ctl = parseInt(d.ctl, 10);
                    else if (typeof d.ctl === "number")
                        m.ctl = d.ctl;
                    else if (typeof d.ctl === "object")
                        m.ctl = new $util.LongBits(d.ctl.low >>> 0, d.ctl.high >>> 0).toNumber(true);
                }
                if (d.cval != null) {
                    if ($util.Long)
                        (m.cval = $util.Long.fromValue(d.cval)).unsigned = true;
                    else if (typeof d.cval === "string")
                        m.cval = parseInt(d.cval, 10);
                    else if (typeof d.cval === "number")
                        m.cval = d.cval;
                    else if (typeof d.cval === "object")
                        m.cval = new $util.LongBits(d.cval.low >>> 0, d.cval.high >>> 0).toNumber(true);
                }
                if (d.timerIdx != null) {
                    m.timerIdx = d.timerIdx | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmTimerSaveStateFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmTimerSaveStateFtraceEvent
             * @static
             * @param {perfetto.protos.KvmTimerSaveStateFtraceEvent} m KvmTimerSaveStateFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmTimerSaveStateFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ctl = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ctl = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.cval = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.cval = o.longs === String ? "0" : 0;
                    d.timerIdx = 0;
                }
                if (m.ctl != null && m.hasOwnProperty("ctl")) {
                    if (typeof m.ctl === "number")
                        d.ctl = o.longs === String ? String(m.ctl) : m.ctl;
                    else
                        d.ctl = o.longs === String ? $util.Long.prototype.toString.call(m.ctl) : o.longs === Number ? new $util.LongBits(m.ctl.low >>> 0, m.ctl.high >>> 0).toNumber(true) : m.ctl;
                }
                if (m.cval != null && m.hasOwnProperty("cval")) {
                    if (typeof m.cval === "number")
                        d.cval = o.longs === String ? String(m.cval) : m.cval;
                    else
                        d.cval = o.longs === String ? $util.Long.prototype.toString.call(m.cval) : o.longs === Number ? new $util.LongBits(m.cval.low >>> 0, m.cval.high >>> 0).toNumber(true) : m.cval;
                }
                if (m.timerIdx != null && m.hasOwnProperty("timerIdx")) {
                    d.timerIdx = m.timerIdx;
                }
                return d;
            };

            /**
             * Converts this KvmTimerSaveStateFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmTimerSaveStateFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmTimerSaveStateFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmTimerSaveStateFtraceEvent;
        })();

        protos.KvmTimerUpdateIrqFtraceEvent = (function() {

            /**
             * Properties of a KvmTimerUpdateIrqFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmTimerUpdateIrqFtraceEvent
             * @property {number|null} [irq] KvmTimerUpdateIrqFtraceEvent irq
             * @property {number|null} [level] KvmTimerUpdateIrqFtraceEvent level
             * @property {number|null} [vcpuId] KvmTimerUpdateIrqFtraceEvent vcpuId
             */

            /**
             * Constructs a new KvmTimerUpdateIrqFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmTimerUpdateIrqFtraceEvent.
             * @implements IKvmTimerUpdateIrqFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmTimerUpdateIrqFtraceEvent=} [p] Properties to set
             */
            function KvmTimerUpdateIrqFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmTimerUpdateIrqFtraceEvent irq.
             * @member {number} irq
             * @memberof perfetto.protos.KvmTimerUpdateIrqFtraceEvent
             * @instance
             */
            KvmTimerUpdateIrqFtraceEvent.prototype.irq = 0;

            /**
             * KvmTimerUpdateIrqFtraceEvent level.
             * @member {number} level
             * @memberof perfetto.protos.KvmTimerUpdateIrqFtraceEvent
             * @instance
             */
            KvmTimerUpdateIrqFtraceEvent.prototype.level = 0;

            /**
             * KvmTimerUpdateIrqFtraceEvent vcpuId.
             * @member {number} vcpuId
             * @memberof perfetto.protos.KvmTimerUpdateIrqFtraceEvent
             * @instance
             */
            KvmTimerUpdateIrqFtraceEvent.prototype.vcpuId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KvmTimerUpdateIrqFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmTimerUpdateIrqFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmTimerUpdateIrqFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmTimerUpdateIrqFtraceEvent} KvmTimerUpdateIrqFtraceEvent instance
             */
            KvmTimerUpdateIrqFtraceEvent.create = function create(properties) {
                return new KvmTimerUpdateIrqFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmTimerUpdateIrqFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmTimerUpdateIrqFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmTimerUpdateIrqFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmTimerUpdateIrqFtraceEvent} m KvmTimerUpdateIrqFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmTimerUpdateIrqFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.irq != null && Object.hasOwnProperty.call(m, "irq"))
                    w.uint32(8).uint32(m.irq);
                if (m.level != null && Object.hasOwnProperty.call(m, "level"))
                    w.uint32(16).int32(m.level);
                if (m.vcpuId != null && Object.hasOwnProperty.call(m, "vcpuId"))
                    w.uint32(24).uint64(m.vcpuId);
                return w;
            };

            /**
             * Encodes the specified KvmTimerUpdateIrqFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmTimerUpdateIrqFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmTimerUpdateIrqFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmTimerUpdateIrqFtraceEvent} message KvmTimerUpdateIrqFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmTimerUpdateIrqFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmTimerUpdateIrqFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmTimerUpdateIrqFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmTimerUpdateIrqFtraceEvent} KvmTimerUpdateIrqFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmTimerUpdateIrqFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmTimerUpdateIrqFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.irq = r.uint32();
                        break;
                    case 2:
                        m.level = r.int32();
                        break;
                    case 3:
                        m.vcpuId = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmTimerUpdateIrqFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmTimerUpdateIrqFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmTimerUpdateIrqFtraceEvent} KvmTimerUpdateIrqFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmTimerUpdateIrqFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmTimerUpdateIrqFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmTimerUpdateIrqFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmTimerUpdateIrqFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.irq != null && m.hasOwnProperty("irq")) {
                    if (!$util.isInteger(m.irq))
                        return "irq: integer expected";
                }
                if (m.level != null && m.hasOwnProperty("level")) {
                    if (!$util.isInteger(m.level))
                        return "level: integer expected";
                }
                if (m.vcpuId != null && m.hasOwnProperty("vcpuId")) {
                    if (!$util.isInteger(m.vcpuId) && !(m.vcpuId && $util.isInteger(m.vcpuId.low) && $util.isInteger(m.vcpuId.high)))
                        return "vcpuId: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KvmTimerUpdateIrqFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmTimerUpdateIrqFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmTimerUpdateIrqFtraceEvent} KvmTimerUpdateIrqFtraceEvent
             */
            KvmTimerUpdateIrqFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmTimerUpdateIrqFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmTimerUpdateIrqFtraceEvent();
                if (d.irq != null) {
                    m.irq = d.irq >>> 0;
                }
                if (d.level != null) {
                    m.level = d.level | 0;
                }
                if (d.vcpuId != null) {
                    if ($util.Long)
                        (m.vcpuId = $util.Long.fromValue(d.vcpuId)).unsigned = true;
                    else if (typeof d.vcpuId === "string")
                        m.vcpuId = parseInt(d.vcpuId, 10);
                    else if (typeof d.vcpuId === "number")
                        m.vcpuId = d.vcpuId;
                    else if (typeof d.vcpuId === "object")
                        m.vcpuId = new $util.LongBits(d.vcpuId.low >>> 0, d.vcpuId.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmTimerUpdateIrqFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmTimerUpdateIrqFtraceEvent
             * @static
             * @param {perfetto.protos.KvmTimerUpdateIrqFtraceEvent} m KvmTimerUpdateIrqFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmTimerUpdateIrqFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.irq = 0;
                    d.level = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.vcpuId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.vcpuId = o.longs === String ? "0" : 0;
                }
                if (m.irq != null && m.hasOwnProperty("irq")) {
                    d.irq = m.irq;
                }
                if (m.level != null && m.hasOwnProperty("level")) {
                    d.level = m.level;
                }
                if (m.vcpuId != null && m.hasOwnProperty("vcpuId")) {
                    if (typeof m.vcpuId === "number")
                        d.vcpuId = o.longs === String ? String(m.vcpuId) : m.vcpuId;
                    else
                        d.vcpuId = o.longs === String ? $util.Long.prototype.toString.call(m.vcpuId) : o.longs === Number ? new $util.LongBits(m.vcpuId.low >>> 0, m.vcpuId.high >>> 0).toNumber(true) : m.vcpuId;
                }
                return d;
            };

            /**
             * Converts this KvmTimerUpdateIrqFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmTimerUpdateIrqFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmTimerUpdateIrqFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmTimerUpdateIrqFtraceEvent;
        })();

        protos.KvmToggleCacheFtraceEvent = (function() {

            /**
             * Properties of a KvmToggleCacheFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmToggleCacheFtraceEvent
             * @property {number|null} [now] KvmToggleCacheFtraceEvent now
             * @property {number|null} [vcpuPc] KvmToggleCacheFtraceEvent vcpuPc
             * @property {number|null} [was] KvmToggleCacheFtraceEvent was
             */

            /**
             * Constructs a new KvmToggleCacheFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmToggleCacheFtraceEvent.
             * @implements IKvmToggleCacheFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmToggleCacheFtraceEvent=} [p] Properties to set
             */
            function KvmToggleCacheFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmToggleCacheFtraceEvent now.
             * @member {number} now
             * @memberof perfetto.protos.KvmToggleCacheFtraceEvent
             * @instance
             */
            KvmToggleCacheFtraceEvent.prototype.now = 0;

            /**
             * KvmToggleCacheFtraceEvent vcpuPc.
             * @member {number} vcpuPc
             * @memberof perfetto.protos.KvmToggleCacheFtraceEvent
             * @instance
             */
            KvmToggleCacheFtraceEvent.prototype.vcpuPc = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KvmToggleCacheFtraceEvent was.
             * @member {number} was
             * @memberof perfetto.protos.KvmToggleCacheFtraceEvent
             * @instance
             */
            KvmToggleCacheFtraceEvent.prototype.was = 0;

            /**
             * Creates a new KvmToggleCacheFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmToggleCacheFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmToggleCacheFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmToggleCacheFtraceEvent} KvmToggleCacheFtraceEvent instance
             */
            KvmToggleCacheFtraceEvent.create = function create(properties) {
                return new KvmToggleCacheFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmToggleCacheFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmToggleCacheFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmToggleCacheFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmToggleCacheFtraceEvent} m KvmToggleCacheFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmToggleCacheFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.now != null && Object.hasOwnProperty.call(m, "now"))
                    w.uint32(8).uint32(m.now);
                if (m.vcpuPc != null && Object.hasOwnProperty.call(m, "vcpuPc"))
                    w.uint32(16).uint64(m.vcpuPc);
                if (m.was != null && Object.hasOwnProperty.call(m, "was"))
                    w.uint32(24).uint32(m.was);
                return w;
            };

            /**
             * Encodes the specified KvmToggleCacheFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmToggleCacheFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmToggleCacheFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmToggleCacheFtraceEvent} message KvmToggleCacheFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmToggleCacheFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmToggleCacheFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmToggleCacheFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmToggleCacheFtraceEvent} KvmToggleCacheFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmToggleCacheFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmToggleCacheFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.now = r.uint32();
                        break;
                    case 2:
                        m.vcpuPc = r.uint64();
                        break;
                    case 3:
                        m.was = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmToggleCacheFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmToggleCacheFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmToggleCacheFtraceEvent} KvmToggleCacheFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmToggleCacheFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmToggleCacheFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmToggleCacheFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmToggleCacheFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.now != null && m.hasOwnProperty("now")) {
                    if (!$util.isInteger(m.now))
                        return "now: integer expected";
                }
                if (m.vcpuPc != null && m.hasOwnProperty("vcpuPc")) {
                    if (!$util.isInteger(m.vcpuPc) && !(m.vcpuPc && $util.isInteger(m.vcpuPc.low) && $util.isInteger(m.vcpuPc.high)))
                        return "vcpuPc: integer|Long expected";
                }
                if (m.was != null && m.hasOwnProperty("was")) {
                    if (!$util.isInteger(m.was))
                        return "was: integer expected";
                }
                return null;
            };

            /**
             * Creates a KvmToggleCacheFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmToggleCacheFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmToggleCacheFtraceEvent} KvmToggleCacheFtraceEvent
             */
            KvmToggleCacheFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmToggleCacheFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmToggleCacheFtraceEvent();
                if (d.now != null) {
                    m.now = d.now >>> 0;
                }
                if (d.vcpuPc != null) {
                    if ($util.Long)
                        (m.vcpuPc = $util.Long.fromValue(d.vcpuPc)).unsigned = true;
                    else if (typeof d.vcpuPc === "string")
                        m.vcpuPc = parseInt(d.vcpuPc, 10);
                    else if (typeof d.vcpuPc === "number")
                        m.vcpuPc = d.vcpuPc;
                    else if (typeof d.vcpuPc === "object")
                        m.vcpuPc = new $util.LongBits(d.vcpuPc.low >>> 0, d.vcpuPc.high >>> 0).toNumber(true);
                }
                if (d.was != null) {
                    m.was = d.was >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmToggleCacheFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmToggleCacheFtraceEvent
             * @static
             * @param {perfetto.protos.KvmToggleCacheFtraceEvent} m KvmToggleCacheFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmToggleCacheFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.now = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.vcpuPc = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.vcpuPc = o.longs === String ? "0" : 0;
                    d.was = 0;
                }
                if (m.now != null && m.hasOwnProperty("now")) {
                    d.now = m.now;
                }
                if (m.vcpuPc != null && m.hasOwnProperty("vcpuPc")) {
                    if (typeof m.vcpuPc === "number")
                        d.vcpuPc = o.longs === String ? String(m.vcpuPc) : m.vcpuPc;
                    else
                        d.vcpuPc = o.longs === String ? $util.Long.prototype.toString.call(m.vcpuPc) : o.longs === Number ? new $util.LongBits(m.vcpuPc.low >>> 0, m.vcpuPc.high >>> 0).toNumber(true) : m.vcpuPc;
                }
                if (m.was != null && m.hasOwnProperty("was")) {
                    d.was = m.was;
                }
                return d;
            };

            /**
             * Converts this KvmToggleCacheFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmToggleCacheFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmToggleCacheFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmToggleCacheFtraceEvent;
        })();

        protos.KvmUnmapHvaRangeFtraceEvent = (function() {

            /**
             * Properties of a KvmUnmapHvaRangeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmUnmapHvaRangeFtraceEvent
             * @property {number|null} [end] KvmUnmapHvaRangeFtraceEvent end
             * @property {number|null} [start] KvmUnmapHvaRangeFtraceEvent start
             */

            /**
             * Constructs a new KvmUnmapHvaRangeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmUnmapHvaRangeFtraceEvent.
             * @implements IKvmUnmapHvaRangeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmUnmapHvaRangeFtraceEvent=} [p] Properties to set
             */
            function KvmUnmapHvaRangeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmUnmapHvaRangeFtraceEvent end.
             * @member {number} end
             * @memberof perfetto.protos.KvmUnmapHvaRangeFtraceEvent
             * @instance
             */
            KvmUnmapHvaRangeFtraceEvent.prototype.end = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KvmUnmapHvaRangeFtraceEvent start.
             * @member {number} start
             * @memberof perfetto.protos.KvmUnmapHvaRangeFtraceEvent
             * @instance
             */
            KvmUnmapHvaRangeFtraceEvent.prototype.start = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KvmUnmapHvaRangeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmUnmapHvaRangeFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmUnmapHvaRangeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmUnmapHvaRangeFtraceEvent} KvmUnmapHvaRangeFtraceEvent instance
             */
            KvmUnmapHvaRangeFtraceEvent.create = function create(properties) {
                return new KvmUnmapHvaRangeFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmUnmapHvaRangeFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmUnmapHvaRangeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmUnmapHvaRangeFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmUnmapHvaRangeFtraceEvent} m KvmUnmapHvaRangeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmUnmapHvaRangeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.end != null && Object.hasOwnProperty.call(m, "end"))
                    w.uint32(8).uint64(m.end);
                if (m.start != null && Object.hasOwnProperty.call(m, "start"))
                    w.uint32(16).uint64(m.start);
                return w;
            };

            /**
             * Encodes the specified KvmUnmapHvaRangeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmUnmapHvaRangeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmUnmapHvaRangeFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmUnmapHvaRangeFtraceEvent} message KvmUnmapHvaRangeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmUnmapHvaRangeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmUnmapHvaRangeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmUnmapHvaRangeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmUnmapHvaRangeFtraceEvent} KvmUnmapHvaRangeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmUnmapHvaRangeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmUnmapHvaRangeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.end = r.uint64();
                        break;
                    case 2:
                        m.start = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmUnmapHvaRangeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmUnmapHvaRangeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmUnmapHvaRangeFtraceEvent} KvmUnmapHvaRangeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmUnmapHvaRangeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmUnmapHvaRangeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmUnmapHvaRangeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmUnmapHvaRangeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.end != null && m.hasOwnProperty("end")) {
                    if (!$util.isInteger(m.end) && !(m.end && $util.isInteger(m.end.low) && $util.isInteger(m.end.high)))
                        return "end: integer|Long expected";
                }
                if (m.start != null && m.hasOwnProperty("start")) {
                    if (!$util.isInteger(m.start) && !(m.start && $util.isInteger(m.start.low) && $util.isInteger(m.start.high)))
                        return "start: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KvmUnmapHvaRangeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmUnmapHvaRangeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmUnmapHvaRangeFtraceEvent} KvmUnmapHvaRangeFtraceEvent
             */
            KvmUnmapHvaRangeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmUnmapHvaRangeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmUnmapHvaRangeFtraceEvent();
                if (d.end != null) {
                    if ($util.Long)
                        (m.end = $util.Long.fromValue(d.end)).unsigned = true;
                    else if (typeof d.end === "string")
                        m.end = parseInt(d.end, 10);
                    else if (typeof d.end === "number")
                        m.end = d.end;
                    else if (typeof d.end === "object")
                        m.end = new $util.LongBits(d.end.low >>> 0, d.end.high >>> 0).toNumber(true);
                }
                if (d.start != null) {
                    if ($util.Long)
                        (m.start = $util.Long.fromValue(d.start)).unsigned = true;
                    else if (typeof d.start === "string")
                        m.start = parseInt(d.start, 10);
                    else if (typeof d.start === "number")
                        m.start = d.start;
                    else if (typeof d.start === "object")
                        m.start = new $util.LongBits(d.start.low >>> 0, d.start.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmUnmapHvaRangeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmUnmapHvaRangeFtraceEvent
             * @static
             * @param {perfetto.protos.KvmUnmapHvaRangeFtraceEvent} m KvmUnmapHvaRangeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmUnmapHvaRangeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.end = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.end = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.start = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.start = o.longs === String ? "0" : 0;
                }
                if (m.end != null && m.hasOwnProperty("end")) {
                    if (typeof m.end === "number")
                        d.end = o.longs === String ? String(m.end) : m.end;
                    else
                        d.end = o.longs === String ? $util.Long.prototype.toString.call(m.end) : o.longs === Number ? new $util.LongBits(m.end.low >>> 0, m.end.high >>> 0).toNumber(true) : m.end;
                }
                if (m.start != null && m.hasOwnProperty("start")) {
                    if (typeof m.start === "number")
                        d.start = o.longs === String ? String(m.start) : m.start;
                    else
                        d.start = o.longs === String ? $util.Long.prototype.toString.call(m.start) : o.longs === Number ? new $util.LongBits(m.start.low >>> 0, m.start.high >>> 0).toNumber(true) : m.start;
                }
                return d;
            };

            /**
             * Converts this KvmUnmapHvaRangeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmUnmapHvaRangeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmUnmapHvaRangeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmUnmapHvaRangeFtraceEvent;
        })();

        protos.KvmUserspaceExitFtraceEvent = (function() {

            /**
             * Properties of a KvmUserspaceExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmUserspaceExitFtraceEvent
             * @property {number|null} [reason] KvmUserspaceExitFtraceEvent reason
             */

            /**
             * Constructs a new KvmUserspaceExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmUserspaceExitFtraceEvent.
             * @implements IKvmUserspaceExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmUserspaceExitFtraceEvent=} [p] Properties to set
             */
            function KvmUserspaceExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmUserspaceExitFtraceEvent reason.
             * @member {number} reason
             * @memberof perfetto.protos.KvmUserspaceExitFtraceEvent
             * @instance
             */
            KvmUserspaceExitFtraceEvent.prototype.reason = 0;

            /**
             * Creates a new KvmUserspaceExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmUserspaceExitFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmUserspaceExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmUserspaceExitFtraceEvent} KvmUserspaceExitFtraceEvent instance
             */
            KvmUserspaceExitFtraceEvent.create = function create(properties) {
                return new KvmUserspaceExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmUserspaceExitFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmUserspaceExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmUserspaceExitFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmUserspaceExitFtraceEvent} m KvmUserspaceExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmUserspaceExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.reason != null && Object.hasOwnProperty.call(m, "reason"))
                    w.uint32(8).uint32(m.reason);
                return w;
            };

            /**
             * Encodes the specified KvmUserspaceExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmUserspaceExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmUserspaceExitFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmUserspaceExitFtraceEvent} message KvmUserspaceExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmUserspaceExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmUserspaceExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmUserspaceExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmUserspaceExitFtraceEvent} KvmUserspaceExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmUserspaceExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmUserspaceExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.reason = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmUserspaceExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmUserspaceExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmUserspaceExitFtraceEvent} KvmUserspaceExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmUserspaceExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmUserspaceExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmUserspaceExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmUserspaceExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.reason != null && m.hasOwnProperty("reason")) {
                    if (!$util.isInteger(m.reason))
                        return "reason: integer expected";
                }
                return null;
            };

            /**
             * Creates a KvmUserspaceExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmUserspaceExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmUserspaceExitFtraceEvent} KvmUserspaceExitFtraceEvent
             */
            KvmUserspaceExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmUserspaceExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmUserspaceExitFtraceEvent();
                if (d.reason != null) {
                    m.reason = d.reason >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmUserspaceExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmUserspaceExitFtraceEvent
             * @static
             * @param {perfetto.protos.KvmUserspaceExitFtraceEvent} m KvmUserspaceExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmUserspaceExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.reason = 0;
                }
                if (m.reason != null && m.hasOwnProperty("reason")) {
                    d.reason = m.reason;
                }
                return d;
            };

            /**
             * Converts this KvmUserspaceExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmUserspaceExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmUserspaceExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmUserspaceExitFtraceEvent;
        })();

        protos.KvmVcpuWakeupFtraceEvent = (function() {

            /**
             * Properties of a KvmVcpuWakeupFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmVcpuWakeupFtraceEvent
             * @property {number|null} [ns] KvmVcpuWakeupFtraceEvent ns
             * @property {number|null} [valid] KvmVcpuWakeupFtraceEvent valid
             * @property {number|null} [waited] KvmVcpuWakeupFtraceEvent waited
             */

            /**
             * Constructs a new KvmVcpuWakeupFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmVcpuWakeupFtraceEvent.
             * @implements IKvmVcpuWakeupFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmVcpuWakeupFtraceEvent=} [p] Properties to set
             */
            function KvmVcpuWakeupFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmVcpuWakeupFtraceEvent ns.
             * @member {number} ns
             * @memberof perfetto.protos.KvmVcpuWakeupFtraceEvent
             * @instance
             */
            KvmVcpuWakeupFtraceEvent.prototype.ns = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KvmVcpuWakeupFtraceEvent valid.
             * @member {number} valid
             * @memberof perfetto.protos.KvmVcpuWakeupFtraceEvent
             * @instance
             */
            KvmVcpuWakeupFtraceEvent.prototype.valid = 0;

            /**
             * KvmVcpuWakeupFtraceEvent waited.
             * @member {number} waited
             * @memberof perfetto.protos.KvmVcpuWakeupFtraceEvent
             * @instance
             */
            KvmVcpuWakeupFtraceEvent.prototype.waited = 0;

            /**
             * Creates a new KvmVcpuWakeupFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmVcpuWakeupFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmVcpuWakeupFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmVcpuWakeupFtraceEvent} KvmVcpuWakeupFtraceEvent instance
             */
            KvmVcpuWakeupFtraceEvent.create = function create(properties) {
                return new KvmVcpuWakeupFtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmVcpuWakeupFtraceEvent message. Does not implicitly {@link perfetto.protos.KvmVcpuWakeupFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmVcpuWakeupFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmVcpuWakeupFtraceEvent} m KvmVcpuWakeupFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmVcpuWakeupFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.ns != null && Object.hasOwnProperty.call(m, "ns"))
                    w.uint32(8).uint64(m.ns);
                if (m.valid != null && Object.hasOwnProperty.call(m, "valid"))
                    w.uint32(16).uint32(m.valid);
                if (m.waited != null && Object.hasOwnProperty.call(m, "waited"))
                    w.uint32(24).uint32(m.waited);
                return w;
            };

            /**
             * Encodes the specified KvmVcpuWakeupFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmVcpuWakeupFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmVcpuWakeupFtraceEvent
             * @static
             * @param {perfetto.protos.IKvmVcpuWakeupFtraceEvent} message KvmVcpuWakeupFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmVcpuWakeupFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmVcpuWakeupFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmVcpuWakeupFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmVcpuWakeupFtraceEvent} KvmVcpuWakeupFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmVcpuWakeupFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmVcpuWakeupFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.ns = r.uint64();
                        break;
                    case 2:
                        m.valid = r.uint32();
                        break;
                    case 3:
                        m.waited = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmVcpuWakeupFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmVcpuWakeupFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmVcpuWakeupFtraceEvent} KvmVcpuWakeupFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmVcpuWakeupFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmVcpuWakeupFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmVcpuWakeupFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmVcpuWakeupFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.ns != null && m.hasOwnProperty("ns")) {
                    if (!$util.isInteger(m.ns) && !(m.ns && $util.isInteger(m.ns.low) && $util.isInteger(m.ns.high)))
                        return "ns: integer|Long expected";
                }
                if (m.valid != null && m.hasOwnProperty("valid")) {
                    if (!$util.isInteger(m.valid))
                        return "valid: integer expected";
                }
                if (m.waited != null && m.hasOwnProperty("waited")) {
                    if (!$util.isInteger(m.waited))
                        return "waited: integer expected";
                }
                return null;
            };

            /**
             * Creates a KvmVcpuWakeupFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmVcpuWakeupFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmVcpuWakeupFtraceEvent} KvmVcpuWakeupFtraceEvent
             */
            KvmVcpuWakeupFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmVcpuWakeupFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmVcpuWakeupFtraceEvent();
                if (d.ns != null) {
                    if ($util.Long)
                        (m.ns = $util.Long.fromValue(d.ns)).unsigned = true;
                    else if (typeof d.ns === "string")
                        m.ns = parseInt(d.ns, 10);
                    else if (typeof d.ns === "number")
                        m.ns = d.ns;
                    else if (typeof d.ns === "object")
                        m.ns = new $util.LongBits(d.ns.low >>> 0, d.ns.high >>> 0).toNumber(true);
                }
                if (d.valid != null) {
                    m.valid = d.valid >>> 0;
                }
                if (d.waited != null) {
                    m.waited = d.waited >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmVcpuWakeupFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmVcpuWakeupFtraceEvent
             * @static
             * @param {perfetto.protos.KvmVcpuWakeupFtraceEvent} m KvmVcpuWakeupFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmVcpuWakeupFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ns = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ns = o.longs === String ? "0" : 0;
                    d.valid = 0;
                    d.waited = 0;
                }
                if (m.ns != null && m.hasOwnProperty("ns")) {
                    if (typeof m.ns === "number")
                        d.ns = o.longs === String ? String(m.ns) : m.ns;
                    else
                        d.ns = o.longs === String ? $util.Long.prototype.toString.call(m.ns) : o.longs === Number ? new $util.LongBits(m.ns.low >>> 0, m.ns.high >>> 0).toNumber(true) : m.ns;
                }
                if (m.valid != null && m.hasOwnProperty("valid")) {
                    d.valid = m.valid;
                }
                if (m.waited != null && m.hasOwnProperty("waited")) {
                    d.waited = m.waited;
                }
                return d;
            };

            /**
             * Converts this KvmVcpuWakeupFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmVcpuWakeupFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmVcpuWakeupFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmVcpuWakeupFtraceEvent;
        })();

        protos.KvmWfxArm64FtraceEvent = (function() {

            /**
             * Properties of a KvmWfxArm64FtraceEvent.
             * @memberof perfetto.protos
             * @interface IKvmWfxArm64FtraceEvent
             * @property {number|null} [isWfe] KvmWfxArm64FtraceEvent isWfe
             * @property {number|null} [vcpuPc] KvmWfxArm64FtraceEvent vcpuPc
             */

            /**
             * Constructs a new KvmWfxArm64FtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KvmWfxArm64FtraceEvent.
             * @implements IKvmWfxArm64FtraceEvent
             * @constructor
             * @param {perfetto.protos.IKvmWfxArm64FtraceEvent=} [p] Properties to set
             */
            function KvmWfxArm64FtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KvmWfxArm64FtraceEvent isWfe.
             * @member {number} isWfe
             * @memberof perfetto.protos.KvmWfxArm64FtraceEvent
             * @instance
             */
            KvmWfxArm64FtraceEvent.prototype.isWfe = 0;

            /**
             * KvmWfxArm64FtraceEvent vcpuPc.
             * @member {number} vcpuPc
             * @memberof perfetto.protos.KvmWfxArm64FtraceEvent
             * @instance
             */
            KvmWfxArm64FtraceEvent.prototype.vcpuPc = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KvmWfxArm64FtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KvmWfxArm64FtraceEvent
             * @static
             * @param {perfetto.protos.IKvmWfxArm64FtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KvmWfxArm64FtraceEvent} KvmWfxArm64FtraceEvent instance
             */
            KvmWfxArm64FtraceEvent.create = function create(properties) {
                return new KvmWfxArm64FtraceEvent(properties);
            };

            /**
             * Encodes the specified KvmWfxArm64FtraceEvent message. Does not implicitly {@link perfetto.protos.KvmWfxArm64FtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KvmWfxArm64FtraceEvent
             * @static
             * @param {perfetto.protos.IKvmWfxArm64FtraceEvent} m KvmWfxArm64FtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmWfxArm64FtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.isWfe != null && Object.hasOwnProperty.call(m, "isWfe"))
                    w.uint32(8).uint32(m.isWfe);
                if (m.vcpuPc != null && Object.hasOwnProperty.call(m, "vcpuPc"))
                    w.uint32(16).uint64(m.vcpuPc);
                return w;
            };

            /**
             * Encodes the specified KvmWfxArm64FtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KvmWfxArm64FtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KvmWfxArm64FtraceEvent
             * @static
             * @param {perfetto.protos.IKvmWfxArm64FtraceEvent} message KvmWfxArm64FtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KvmWfxArm64FtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KvmWfxArm64FtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KvmWfxArm64FtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KvmWfxArm64FtraceEvent} KvmWfxArm64FtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmWfxArm64FtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KvmWfxArm64FtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.isWfe = r.uint32();
                        break;
                    case 2:
                        m.vcpuPc = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KvmWfxArm64FtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KvmWfxArm64FtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KvmWfxArm64FtraceEvent} KvmWfxArm64FtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KvmWfxArm64FtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KvmWfxArm64FtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KvmWfxArm64FtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KvmWfxArm64FtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.isWfe != null && m.hasOwnProperty("isWfe")) {
                    if (!$util.isInteger(m.isWfe))
                        return "isWfe: integer expected";
                }
                if (m.vcpuPc != null && m.hasOwnProperty("vcpuPc")) {
                    if (!$util.isInteger(m.vcpuPc) && !(m.vcpuPc && $util.isInteger(m.vcpuPc.low) && $util.isInteger(m.vcpuPc.high)))
                        return "vcpuPc: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KvmWfxArm64FtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KvmWfxArm64FtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KvmWfxArm64FtraceEvent} KvmWfxArm64FtraceEvent
             */
            KvmWfxArm64FtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KvmWfxArm64FtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KvmWfxArm64FtraceEvent();
                if (d.isWfe != null) {
                    m.isWfe = d.isWfe >>> 0;
                }
                if (d.vcpuPc != null) {
                    if ($util.Long)
                        (m.vcpuPc = $util.Long.fromValue(d.vcpuPc)).unsigned = true;
                    else if (typeof d.vcpuPc === "string")
                        m.vcpuPc = parseInt(d.vcpuPc, 10);
                    else if (typeof d.vcpuPc === "number")
                        m.vcpuPc = d.vcpuPc;
                    else if (typeof d.vcpuPc === "object")
                        m.vcpuPc = new $util.LongBits(d.vcpuPc.low >>> 0, d.vcpuPc.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KvmWfxArm64FtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KvmWfxArm64FtraceEvent
             * @static
             * @param {perfetto.protos.KvmWfxArm64FtraceEvent} m KvmWfxArm64FtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KvmWfxArm64FtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.isWfe = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.vcpuPc = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.vcpuPc = o.longs === String ? "0" : 0;
                }
                if (m.isWfe != null && m.hasOwnProperty("isWfe")) {
                    d.isWfe = m.isWfe;
                }
                if (m.vcpuPc != null && m.hasOwnProperty("vcpuPc")) {
                    if (typeof m.vcpuPc === "number")
                        d.vcpuPc = o.longs === String ? String(m.vcpuPc) : m.vcpuPc;
                    else
                        d.vcpuPc = o.longs === String ? $util.Long.prototype.toString.call(m.vcpuPc) : o.longs === Number ? new $util.LongBits(m.vcpuPc.low >>> 0, m.vcpuPc.high >>> 0).toNumber(true) : m.vcpuPc;
                }
                return d;
            };

            /**
             * Converts this KvmWfxArm64FtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KvmWfxArm64FtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KvmWfxArm64FtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KvmWfxArm64FtraceEvent;
        })();

        protos.TrapRegFtraceEvent = (function() {

            /**
             * Properties of a TrapRegFtraceEvent.
             * @memberof perfetto.protos
             * @interface ITrapRegFtraceEvent
             * @property {string|null} [fn] TrapRegFtraceEvent fn
             * @property {number|null} [isWrite] TrapRegFtraceEvent isWrite
             * @property {number|null} [reg] TrapRegFtraceEvent reg
             * @property {number|null} [writeValue] TrapRegFtraceEvent writeValue
             */

            /**
             * Constructs a new TrapRegFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TrapRegFtraceEvent.
             * @implements ITrapRegFtraceEvent
             * @constructor
             * @param {perfetto.protos.ITrapRegFtraceEvent=} [p] Properties to set
             */
            function TrapRegFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TrapRegFtraceEvent fn.
             * @member {string} fn
             * @memberof perfetto.protos.TrapRegFtraceEvent
             * @instance
             */
            TrapRegFtraceEvent.prototype.fn = "";

            /**
             * TrapRegFtraceEvent isWrite.
             * @member {number} isWrite
             * @memberof perfetto.protos.TrapRegFtraceEvent
             * @instance
             */
            TrapRegFtraceEvent.prototype.isWrite = 0;

            /**
             * TrapRegFtraceEvent reg.
             * @member {number} reg
             * @memberof perfetto.protos.TrapRegFtraceEvent
             * @instance
             */
            TrapRegFtraceEvent.prototype.reg = 0;

            /**
             * TrapRegFtraceEvent writeValue.
             * @member {number} writeValue
             * @memberof perfetto.protos.TrapRegFtraceEvent
             * @instance
             */
            TrapRegFtraceEvent.prototype.writeValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new TrapRegFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrapRegFtraceEvent
             * @static
             * @param {perfetto.protos.ITrapRegFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TrapRegFtraceEvent} TrapRegFtraceEvent instance
             */
            TrapRegFtraceEvent.create = function create(properties) {
                return new TrapRegFtraceEvent(properties);
            };

            /**
             * Encodes the specified TrapRegFtraceEvent message. Does not implicitly {@link perfetto.protos.TrapRegFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrapRegFtraceEvent
             * @static
             * @param {perfetto.protos.ITrapRegFtraceEvent} m TrapRegFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrapRegFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.fn != null && Object.hasOwnProperty.call(m, "fn"))
                    w.uint32(10).string(m.fn);
                if (m.isWrite != null && Object.hasOwnProperty.call(m, "isWrite"))
                    w.uint32(16).uint32(m.isWrite);
                if (m.reg != null && Object.hasOwnProperty.call(m, "reg"))
                    w.uint32(24).int32(m.reg);
                if (m.writeValue != null && Object.hasOwnProperty.call(m, "writeValue"))
                    w.uint32(32).uint64(m.writeValue);
                return w;
            };

            /**
             * Encodes the specified TrapRegFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TrapRegFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrapRegFtraceEvent
             * @static
             * @param {perfetto.protos.ITrapRegFtraceEvent} message TrapRegFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrapRegFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrapRegFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrapRegFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrapRegFtraceEvent} TrapRegFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrapRegFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrapRegFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.fn = r.string();
                        break;
                    case 2:
                        m.isWrite = r.uint32();
                        break;
                    case 3:
                        m.reg = r.int32();
                        break;
                    case 4:
                        m.writeValue = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrapRegFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrapRegFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrapRegFtraceEvent} TrapRegFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrapRegFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrapRegFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.TrapRegFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrapRegFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.fn != null && m.hasOwnProperty("fn")) {
                    if (!$util.isString(m.fn))
                        return "fn: string expected";
                }
                if (m.isWrite != null && m.hasOwnProperty("isWrite")) {
                    if (!$util.isInteger(m.isWrite))
                        return "isWrite: integer expected";
                }
                if (m.reg != null && m.hasOwnProperty("reg")) {
                    if (!$util.isInteger(m.reg))
                        return "reg: integer expected";
                }
                if (m.writeValue != null && m.hasOwnProperty("writeValue")) {
                    if (!$util.isInteger(m.writeValue) && !(m.writeValue && $util.isInteger(m.writeValue.low) && $util.isInteger(m.writeValue.high)))
                        return "writeValue: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a TrapRegFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrapRegFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrapRegFtraceEvent} TrapRegFtraceEvent
             */
            TrapRegFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrapRegFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.TrapRegFtraceEvent();
                if (d.fn != null) {
                    m.fn = String(d.fn);
                }
                if (d.isWrite != null) {
                    m.isWrite = d.isWrite >>> 0;
                }
                if (d.reg != null) {
                    m.reg = d.reg | 0;
                }
                if (d.writeValue != null) {
                    if ($util.Long)
                        (m.writeValue = $util.Long.fromValue(d.writeValue)).unsigned = true;
                    else if (typeof d.writeValue === "string")
                        m.writeValue = parseInt(d.writeValue, 10);
                    else if (typeof d.writeValue === "number")
                        m.writeValue = d.writeValue;
                    else if (typeof d.writeValue === "object")
                        m.writeValue = new $util.LongBits(d.writeValue.low >>> 0, d.writeValue.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a TrapRegFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrapRegFtraceEvent
             * @static
             * @param {perfetto.protos.TrapRegFtraceEvent} m TrapRegFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrapRegFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.fn = "";
                    d.isWrite = 0;
                    d.reg = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.writeValue = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.writeValue = o.longs === String ? "0" : 0;
                }
                if (m.fn != null && m.hasOwnProperty("fn")) {
                    d.fn = m.fn;
                }
                if (m.isWrite != null && m.hasOwnProperty("isWrite")) {
                    d.isWrite = m.isWrite;
                }
                if (m.reg != null && m.hasOwnProperty("reg")) {
                    d.reg = m.reg;
                }
                if (m.writeValue != null && m.hasOwnProperty("writeValue")) {
                    if (typeof m.writeValue === "number")
                        d.writeValue = o.longs === String ? String(m.writeValue) : m.writeValue;
                    else
                        d.writeValue = o.longs === String ? $util.Long.prototype.toString.call(m.writeValue) : o.longs === Number ? new $util.LongBits(m.writeValue.low >>> 0, m.writeValue.high >>> 0).toNumber(true) : m.writeValue;
                }
                return d;
            };

            /**
             * Converts this TrapRegFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrapRegFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrapRegFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrapRegFtraceEvent;
        })();

        protos.VgicUpdateIrqPendingFtraceEvent = (function() {

            /**
             * Properties of a VgicUpdateIrqPendingFtraceEvent.
             * @memberof perfetto.protos
             * @interface IVgicUpdateIrqPendingFtraceEvent
             * @property {number|null} [irq] VgicUpdateIrqPendingFtraceEvent irq
             * @property {number|null} [level] VgicUpdateIrqPendingFtraceEvent level
             * @property {number|null} [vcpuId] VgicUpdateIrqPendingFtraceEvent vcpuId
             */

            /**
             * Constructs a new VgicUpdateIrqPendingFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a VgicUpdateIrqPendingFtraceEvent.
             * @implements IVgicUpdateIrqPendingFtraceEvent
             * @constructor
             * @param {perfetto.protos.IVgicUpdateIrqPendingFtraceEvent=} [p] Properties to set
             */
            function VgicUpdateIrqPendingFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * VgicUpdateIrqPendingFtraceEvent irq.
             * @member {number} irq
             * @memberof perfetto.protos.VgicUpdateIrqPendingFtraceEvent
             * @instance
             */
            VgicUpdateIrqPendingFtraceEvent.prototype.irq = 0;

            /**
             * VgicUpdateIrqPendingFtraceEvent level.
             * @member {number} level
             * @memberof perfetto.protos.VgicUpdateIrqPendingFtraceEvent
             * @instance
             */
            VgicUpdateIrqPendingFtraceEvent.prototype.level = 0;

            /**
             * VgicUpdateIrqPendingFtraceEvent vcpuId.
             * @member {number} vcpuId
             * @memberof perfetto.protos.VgicUpdateIrqPendingFtraceEvent
             * @instance
             */
            VgicUpdateIrqPendingFtraceEvent.prototype.vcpuId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new VgicUpdateIrqPendingFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.VgicUpdateIrqPendingFtraceEvent
             * @static
             * @param {perfetto.protos.IVgicUpdateIrqPendingFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.VgicUpdateIrqPendingFtraceEvent} VgicUpdateIrqPendingFtraceEvent instance
             */
            VgicUpdateIrqPendingFtraceEvent.create = function create(properties) {
                return new VgicUpdateIrqPendingFtraceEvent(properties);
            };

            /**
             * Encodes the specified VgicUpdateIrqPendingFtraceEvent message. Does not implicitly {@link perfetto.protos.VgicUpdateIrqPendingFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.VgicUpdateIrqPendingFtraceEvent
             * @static
             * @param {perfetto.protos.IVgicUpdateIrqPendingFtraceEvent} m VgicUpdateIrqPendingFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            VgicUpdateIrqPendingFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.irq != null && Object.hasOwnProperty.call(m, "irq"))
                    w.uint32(8).uint32(m.irq);
                if (m.level != null && Object.hasOwnProperty.call(m, "level"))
                    w.uint32(16).uint32(m.level);
                if (m.vcpuId != null && Object.hasOwnProperty.call(m, "vcpuId"))
                    w.uint32(24).uint64(m.vcpuId);
                return w;
            };

            /**
             * Encodes the specified VgicUpdateIrqPendingFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.VgicUpdateIrqPendingFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.VgicUpdateIrqPendingFtraceEvent
             * @static
             * @param {perfetto.protos.IVgicUpdateIrqPendingFtraceEvent} message VgicUpdateIrqPendingFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            VgicUpdateIrqPendingFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a VgicUpdateIrqPendingFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.VgicUpdateIrqPendingFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.VgicUpdateIrqPendingFtraceEvent} VgicUpdateIrqPendingFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            VgicUpdateIrqPendingFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.VgicUpdateIrqPendingFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.irq = r.uint32();
                        break;
                    case 2:
                        m.level = r.uint32();
                        break;
                    case 3:
                        m.vcpuId = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a VgicUpdateIrqPendingFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.VgicUpdateIrqPendingFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.VgicUpdateIrqPendingFtraceEvent} VgicUpdateIrqPendingFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            VgicUpdateIrqPendingFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a VgicUpdateIrqPendingFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.VgicUpdateIrqPendingFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            VgicUpdateIrqPendingFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.irq != null && m.hasOwnProperty("irq")) {
                    if (!$util.isInteger(m.irq))
                        return "irq: integer expected";
                }
                if (m.level != null && m.hasOwnProperty("level")) {
                    if (!$util.isInteger(m.level))
                        return "level: integer expected";
                }
                if (m.vcpuId != null && m.hasOwnProperty("vcpuId")) {
                    if (!$util.isInteger(m.vcpuId) && !(m.vcpuId && $util.isInteger(m.vcpuId.low) && $util.isInteger(m.vcpuId.high)))
                        return "vcpuId: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a VgicUpdateIrqPendingFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.VgicUpdateIrqPendingFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.VgicUpdateIrqPendingFtraceEvent} VgicUpdateIrqPendingFtraceEvent
             */
            VgicUpdateIrqPendingFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.VgicUpdateIrqPendingFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.VgicUpdateIrqPendingFtraceEvent();
                if (d.irq != null) {
                    m.irq = d.irq >>> 0;
                }
                if (d.level != null) {
                    m.level = d.level >>> 0;
                }
                if (d.vcpuId != null) {
                    if ($util.Long)
                        (m.vcpuId = $util.Long.fromValue(d.vcpuId)).unsigned = true;
                    else if (typeof d.vcpuId === "string")
                        m.vcpuId = parseInt(d.vcpuId, 10);
                    else if (typeof d.vcpuId === "number")
                        m.vcpuId = d.vcpuId;
                    else if (typeof d.vcpuId === "object")
                        m.vcpuId = new $util.LongBits(d.vcpuId.low >>> 0, d.vcpuId.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a VgicUpdateIrqPendingFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.VgicUpdateIrqPendingFtraceEvent
             * @static
             * @param {perfetto.protos.VgicUpdateIrqPendingFtraceEvent} m VgicUpdateIrqPendingFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            VgicUpdateIrqPendingFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.irq = 0;
                    d.level = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.vcpuId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.vcpuId = o.longs === String ? "0" : 0;
                }
                if (m.irq != null && m.hasOwnProperty("irq")) {
                    d.irq = m.irq;
                }
                if (m.level != null && m.hasOwnProperty("level")) {
                    d.level = m.level;
                }
                if (m.vcpuId != null && m.hasOwnProperty("vcpuId")) {
                    if (typeof m.vcpuId === "number")
                        d.vcpuId = o.longs === String ? String(m.vcpuId) : m.vcpuId;
                    else
                        d.vcpuId = o.longs === String ? $util.Long.prototype.toString.call(m.vcpuId) : o.longs === Number ? new $util.LongBits(m.vcpuId.low >>> 0, m.vcpuId.high >>> 0).toNumber(true) : m.vcpuId;
                }
                return d;
            };

            /**
             * Converts this VgicUpdateIrqPendingFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.VgicUpdateIrqPendingFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            VgicUpdateIrqPendingFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return VgicUpdateIrqPendingFtraceEvent;
        })();

        protos.LowmemoryKillFtraceEvent = (function() {

            /**
             * Properties of a LowmemoryKillFtraceEvent.
             * @memberof perfetto.protos
             * @interface ILowmemoryKillFtraceEvent
             * @property {string|null} [comm] LowmemoryKillFtraceEvent comm
             * @property {number|null} [pid] LowmemoryKillFtraceEvent pid
             * @property {number|null} [pagecacheSize] LowmemoryKillFtraceEvent pagecacheSize
             * @property {number|null} [pagecacheLimit] LowmemoryKillFtraceEvent pagecacheLimit
             * @property {number|null} [free] LowmemoryKillFtraceEvent free
             */

            /**
             * Constructs a new LowmemoryKillFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a LowmemoryKillFtraceEvent.
             * @implements ILowmemoryKillFtraceEvent
             * @constructor
             * @param {perfetto.protos.ILowmemoryKillFtraceEvent=} [p] Properties to set
             */
            function LowmemoryKillFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * LowmemoryKillFtraceEvent comm.
             * @member {string} comm
             * @memberof perfetto.protos.LowmemoryKillFtraceEvent
             * @instance
             */
            LowmemoryKillFtraceEvent.prototype.comm = "";

            /**
             * LowmemoryKillFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.LowmemoryKillFtraceEvent
             * @instance
             */
            LowmemoryKillFtraceEvent.prototype.pid = 0;

            /**
             * LowmemoryKillFtraceEvent pagecacheSize.
             * @member {number} pagecacheSize
             * @memberof perfetto.protos.LowmemoryKillFtraceEvent
             * @instance
             */
            LowmemoryKillFtraceEvent.prototype.pagecacheSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * LowmemoryKillFtraceEvent pagecacheLimit.
             * @member {number} pagecacheLimit
             * @memberof perfetto.protos.LowmemoryKillFtraceEvent
             * @instance
             */
            LowmemoryKillFtraceEvent.prototype.pagecacheLimit = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * LowmemoryKillFtraceEvent free.
             * @member {number} free
             * @memberof perfetto.protos.LowmemoryKillFtraceEvent
             * @instance
             */
            LowmemoryKillFtraceEvent.prototype.free = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new LowmemoryKillFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.LowmemoryKillFtraceEvent
             * @static
             * @param {perfetto.protos.ILowmemoryKillFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.LowmemoryKillFtraceEvent} LowmemoryKillFtraceEvent instance
             */
            LowmemoryKillFtraceEvent.create = function create(properties) {
                return new LowmemoryKillFtraceEvent(properties);
            };

            /**
             * Encodes the specified LowmemoryKillFtraceEvent message. Does not implicitly {@link perfetto.protos.LowmemoryKillFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.LowmemoryKillFtraceEvent
             * @static
             * @param {perfetto.protos.ILowmemoryKillFtraceEvent} m LowmemoryKillFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LowmemoryKillFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.comm != null && Object.hasOwnProperty.call(m, "comm"))
                    w.uint32(10).string(m.comm);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(16).int32(m.pid);
                if (m.pagecacheSize != null && Object.hasOwnProperty.call(m, "pagecacheSize"))
                    w.uint32(24).int64(m.pagecacheSize);
                if (m.pagecacheLimit != null && Object.hasOwnProperty.call(m, "pagecacheLimit"))
                    w.uint32(32).int64(m.pagecacheLimit);
                if (m.free != null && Object.hasOwnProperty.call(m, "free"))
                    w.uint32(40).int64(m.free);
                return w;
            };

            /**
             * Encodes the specified LowmemoryKillFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.LowmemoryKillFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.LowmemoryKillFtraceEvent
             * @static
             * @param {perfetto.protos.ILowmemoryKillFtraceEvent} message LowmemoryKillFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LowmemoryKillFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a LowmemoryKillFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.LowmemoryKillFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.LowmemoryKillFtraceEvent} LowmemoryKillFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LowmemoryKillFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.LowmemoryKillFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.comm = r.string();
                        break;
                    case 2:
                        m.pid = r.int32();
                        break;
                    case 3:
                        m.pagecacheSize = r.int64();
                        break;
                    case 4:
                        m.pagecacheLimit = r.int64();
                        break;
                    case 5:
                        m.free = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a LowmemoryKillFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.LowmemoryKillFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.LowmemoryKillFtraceEvent} LowmemoryKillFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LowmemoryKillFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a LowmemoryKillFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.LowmemoryKillFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            LowmemoryKillFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    if (!$util.isString(m.comm))
                        return "comm: string expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.pagecacheSize != null && m.hasOwnProperty("pagecacheSize")) {
                    if (!$util.isInteger(m.pagecacheSize) && !(m.pagecacheSize && $util.isInteger(m.pagecacheSize.low) && $util.isInteger(m.pagecacheSize.high)))
                        return "pagecacheSize: integer|Long expected";
                }
                if (m.pagecacheLimit != null && m.hasOwnProperty("pagecacheLimit")) {
                    if (!$util.isInteger(m.pagecacheLimit) && !(m.pagecacheLimit && $util.isInteger(m.pagecacheLimit.low) && $util.isInteger(m.pagecacheLimit.high)))
                        return "pagecacheLimit: integer|Long expected";
                }
                if (m.free != null && m.hasOwnProperty("free")) {
                    if (!$util.isInteger(m.free) && !(m.free && $util.isInteger(m.free.low) && $util.isInteger(m.free.high)))
                        return "free: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a LowmemoryKillFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.LowmemoryKillFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.LowmemoryKillFtraceEvent} LowmemoryKillFtraceEvent
             */
            LowmemoryKillFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.LowmemoryKillFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.LowmemoryKillFtraceEvent();
                if (d.comm != null) {
                    m.comm = String(d.comm);
                }
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                if (d.pagecacheSize != null) {
                    if ($util.Long)
                        (m.pagecacheSize = $util.Long.fromValue(d.pagecacheSize)).unsigned = false;
                    else if (typeof d.pagecacheSize === "string")
                        m.pagecacheSize = parseInt(d.pagecacheSize, 10);
                    else if (typeof d.pagecacheSize === "number")
                        m.pagecacheSize = d.pagecacheSize;
                    else if (typeof d.pagecacheSize === "object")
                        m.pagecacheSize = new $util.LongBits(d.pagecacheSize.low >>> 0, d.pagecacheSize.high >>> 0).toNumber();
                }
                if (d.pagecacheLimit != null) {
                    if ($util.Long)
                        (m.pagecacheLimit = $util.Long.fromValue(d.pagecacheLimit)).unsigned = false;
                    else if (typeof d.pagecacheLimit === "string")
                        m.pagecacheLimit = parseInt(d.pagecacheLimit, 10);
                    else if (typeof d.pagecacheLimit === "number")
                        m.pagecacheLimit = d.pagecacheLimit;
                    else if (typeof d.pagecacheLimit === "object")
                        m.pagecacheLimit = new $util.LongBits(d.pagecacheLimit.low >>> 0, d.pagecacheLimit.high >>> 0).toNumber();
                }
                if (d.free != null) {
                    if ($util.Long)
                        (m.free = $util.Long.fromValue(d.free)).unsigned = false;
                    else if (typeof d.free === "string")
                        m.free = parseInt(d.free, 10);
                    else if (typeof d.free === "number")
                        m.free = d.free;
                    else if (typeof d.free === "object")
                        m.free = new $util.LongBits(d.free.low >>> 0, d.free.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from a LowmemoryKillFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.LowmemoryKillFtraceEvent
             * @static
             * @param {perfetto.protos.LowmemoryKillFtraceEvent} m LowmemoryKillFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            LowmemoryKillFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.comm = "";
                    d.pid = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.pagecacheSize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pagecacheSize = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.pagecacheLimit = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pagecacheLimit = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.free = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.free = o.longs === String ? "0" : 0;
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    d.comm = m.comm;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.pagecacheSize != null && m.hasOwnProperty("pagecacheSize")) {
                    if (typeof m.pagecacheSize === "number")
                        d.pagecacheSize = o.longs === String ? String(m.pagecacheSize) : m.pagecacheSize;
                    else
                        d.pagecacheSize = o.longs === String ? $util.Long.prototype.toString.call(m.pagecacheSize) : o.longs === Number ? new $util.LongBits(m.pagecacheSize.low >>> 0, m.pagecacheSize.high >>> 0).toNumber() : m.pagecacheSize;
                }
                if (m.pagecacheLimit != null && m.hasOwnProperty("pagecacheLimit")) {
                    if (typeof m.pagecacheLimit === "number")
                        d.pagecacheLimit = o.longs === String ? String(m.pagecacheLimit) : m.pagecacheLimit;
                    else
                        d.pagecacheLimit = o.longs === String ? $util.Long.prototype.toString.call(m.pagecacheLimit) : o.longs === Number ? new $util.LongBits(m.pagecacheLimit.low >>> 0, m.pagecacheLimit.high >>> 0).toNumber() : m.pagecacheLimit;
                }
                if (m.free != null && m.hasOwnProperty("free")) {
                    if (typeof m.free === "number")
                        d.free = o.longs === String ? String(m.free) : m.free;
                    else
                        d.free = o.longs === String ? $util.Long.prototype.toString.call(m.free) : o.longs === Number ? new $util.LongBits(m.free.low >>> 0, m.free.high >>> 0).toNumber() : m.free;
                }
                return d;
            };

            /**
             * Converts this LowmemoryKillFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.LowmemoryKillFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            LowmemoryKillFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return LowmemoryKillFtraceEvent;
        })();

        protos.MaliTracingMarkWriteFtraceEvent = (function() {

            /**
             * Properties of a MaliTracingMarkWriteFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMaliTracingMarkWriteFtraceEvent
             * @property {string|null} [name] MaliTracingMarkWriteFtraceEvent name
             * @property {number|null} [pid] MaliTracingMarkWriteFtraceEvent pid
             * @property {number|null} [type] MaliTracingMarkWriteFtraceEvent type
             * @property {number|null} [value] MaliTracingMarkWriteFtraceEvent value
             */

            /**
             * Constructs a new MaliTracingMarkWriteFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MaliTracingMarkWriteFtraceEvent.
             * @implements IMaliTracingMarkWriteFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMaliTracingMarkWriteFtraceEvent=} [p] Properties to set
             */
            function MaliTracingMarkWriteFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MaliTracingMarkWriteFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.MaliTracingMarkWriteFtraceEvent
             * @instance
             */
            MaliTracingMarkWriteFtraceEvent.prototype.name = "";

            /**
             * MaliTracingMarkWriteFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.MaliTracingMarkWriteFtraceEvent
             * @instance
             */
            MaliTracingMarkWriteFtraceEvent.prototype.pid = 0;

            /**
             * MaliTracingMarkWriteFtraceEvent type.
             * @member {number} type
             * @memberof perfetto.protos.MaliTracingMarkWriteFtraceEvent
             * @instance
             */
            MaliTracingMarkWriteFtraceEvent.prototype.type = 0;

            /**
             * MaliTracingMarkWriteFtraceEvent value.
             * @member {number} value
             * @memberof perfetto.protos.MaliTracingMarkWriteFtraceEvent
             * @instance
             */
            MaliTracingMarkWriteFtraceEvent.prototype.value = 0;

            /**
             * Creates a new MaliTracingMarkWriteFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MaliTracingMarkWriteFtraceEvent
             * @static
             * @param {perfetto.protos.IMaliTracingMarkWriteFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MaliTracingMarkWriteFtraceEvent} MaliTracingMarkWriteFtraceEvent instance
             */
            MaliTracingMarkWriteFtraceEvent.create = function create(properties) {
                return new MaliTracingMarkWriteFtraceEvent(properties);
            };

            /**
             * Encodes the specified MaliTracingMarkWriteFtraceEvent message. Does not implicitly {@link perfetto.protos.MaliTracingMarkWriteFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MaliTracingMarkWriteFtraceEvent
             * @static
             * @param {perfetto.protos.IMaliTracingMarkWriteFtraceEvent} m MaliTracingMarkWriteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MaliTracingMarkWriteFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(16).int32(m.pid);
                if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                    w.uint32(24).uint32(m.type);
                if (m.value != null && Object.hasOwnProperty.call(m, "value"))
                    w.uint32(32).int32(m.value);
                return w;
            };

            /**
             * Encodes the specified MaliTracingMarkWriteFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MaliTracingMarkWriteFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MaliTracingMarkWriteFtraceEvent
             * @static
             * @param {perfetto.protos.IMaliTracingMarkWriteFtraceEvent} message MaliTracingMarkWriteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MaliTracingMarkWriteFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MaliTracingMarkWriteFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MaliTracingMarkWriteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MaliTracingMarkWriteFtraceEvent} MaliTracingMarkWriteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MaliTracingMarkWriteFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MaliTracingMarkWriteFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    case 2:
                        m.pid = r.int32();
                        break;
                    case 3:
                        m.type = r.uint32();
                        break;
                    case 4:
                        m.value = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MaliTracingMarkWriteFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MaliTracingMarkWriteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MaliTracingMarkWriteFtraceEvent} MaliTracingMarkWriteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MaliTracingMarkWriteFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MaliTracingMarkWriteFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MaliTracingMarkWriteFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MaliTracingMarkWriteFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    if (!$util.isInteger(m.type))
                        return "type: integer expected";
                }
                if (m.value != null && m.hasOwnProperty("value")) {
                    if (!$util.isInteger(m.value))
                        return "value: integer expected";
                }
                return null;
            };

            /**
             * Creates a MaliTracingMarkWriteFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MaliTracingMarkWriteFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MaliTracingMarkWriteFtraceEvent} MaliTracingMarkWriteFtraceEvent
             */
            MaliTracingMarkWriteFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MaliTracingMarkWriteFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MaliTracingMarkWriteFtraceEvent();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                if (d.type != null) {
                    m.type = d.type >>> 0;
                }
                if (d.value != null) {
                    m.value = d.value | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MaliTracingMarkWriteFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MaliTracingMarkWriteFtraceEvent
             * @static
             * @param {perfetto.protos.MaliTracingMarkWriteFtraceEvent} m MaliTracingMarkWriteFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MaliTracingMarkWriteFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                    d.pid = 0;
                    d.type = 0;
                    d.value = 0;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    d.type = m.type;
                }
                if (m.value != null && m.hasOwnProperty("value")) {
                    d.value = m.value;
                }
                return d;
            };

            /**
             * Converts this MaliTracingMarkWriteFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MaliTracingMarkWriteFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MaliTracingMarkWriteFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MaliTracingMarkWriteFtraceEvent;
        })();

        protos.MdpCmdKickoffFtraceEvent = (function() {

            /**
             * Properties of a MdpCmdKickoffFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMdpCmdKickoffFtraceEvent
             * @property {number|null} [ctlNum] MdpCmdKickoffFtraceEvent ctlNum
             * @property {number|null} [kickoffCnt] MdpCmdKickoffFtraceEvent kickoffCnt
             */

            /**
             * Constructs a new MdpCmdKickoffFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MdpCmdKickoffFtraceEvent.
             * @implements IMdpCmdKickoffFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMdpCmdKickoffFtraceEvent=} [p] Properties to set
             */
            function MdpCmdKickoffFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MdpCmdKickoffFtraceEvent ctlNum.
             * @member {number} ctlNum
             * @memberof perfetto.protos.MdpCmdKickoffFtraceEvent
             * @instance
             */
            MdpCmdKickoffFtraceEvent.prototype.ctlNum = 0;

            /**
             * MdpCmdKickoffFtraceEvent kickoffCnt.
             * @member {number} kickoffCnt
             * @memberof perfetto.protos.MdpCmdKickoffFtraceEvent
             * @instance
             */
            MdpCmdKickoffFtraceEvent.prototype.kickoffCnt = 0;

            /**
             * Creates a new MdpCmdKickoffFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MdpCmdKickoffFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpCmdKickoffFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MdpCmdKickoffFtraceEvent} MdpCmdKickoffFtraceEvent instance
             */
            MdpCmdKickoffFtraceEvent.create = function create(properties) {
                return new MdpCmdKickoffFtraceEvent(properties);
            };

            /**
             * Encodes the specified MdpCmdKickoffFtraceEvent message. Does not implicitly {@link perfetto.protos.MdpCmdKickoffFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MdpCmdKickoffFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpCmdKickoffFtraceEvent} m MdpCmdKickoffFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpCmdKickoffFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.ctlNum != null && Object.hasOwnProperty.call(m, "ctlNum"))
                    w.uint32(8).uint32(m.ctlNum);
                if (m.kickoffCnt != null && Object.hasOwnProperty.call(m, "kickoffCnt"))
                    w.uint32(16).int32(m.kickoffCnt);
                return w;
            };

            /**
             * Encodes the specified MdpCmdKickoffFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MdpCmdKickoffFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MdpCmdKickoffFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpCmdKickoffFtraceEvent} message MdpCmdKickoffFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpCmdKickoffFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MdpCmdKickoffFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MdpCmdKickoffFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MdpCmdKickoffFtraceEvent} MdpCmdKickoffFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpCmdKickoffFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MdpCmdKickoffFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.ctlNum = r.uint32();
                        break;
                    case 2:
                        m.kickoffCnt = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MdpCmdKickoffFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MdpCmdKickoffFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MdpCmdKickoffFtraceEvent} MdpCmdKickoffFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpCmdKickoffFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MdpCmdKickoffFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MdpCmdKickoffFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MdpCmdKickoffFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.ctlNum != null && m.hasOwnProperty("ctlNum")) {
                    if (!$util.isInteger(m.ctlNum))
                        return "ctlNum: integer expected";
                }
                if (m.kickoffCnt != null && m.hasOwnProperty("kickoffCnt")) {
                    if (!$util.isInteger(m.kickoffCnt))
                        return "kickoffCnt: integer expected";
                }
                return null;
            };

            /**
             * Creates a MdpCmdKickoffFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MdpCmdKickoffFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MdpCmdKickoffFtraceEvent} MdpCmdKickoffFtraceEvent
             */
            MdpCmdKickoffFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MdpCmdKickoffFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MdpCmdKickoffFtraceEvent();
                if (d.ctlNum != null) {
                    m.ctlNum = d.ctlNum >>> 0;
                }
                if (d.kickoffCnt != null) {
                    m.kickoffCnt = d.kickoffCnt | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MdpCmdKickoffFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MdpCmdKickoffFtraceEvent
             * @static
             * @param {perfetto.protos.MdpCmdKickoffFtraceEvent} m MdpCmdKickoffFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MdpCmdKickoffFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.ctlNum = 0;
                    d.kickoffCnt = 0;
                }
                if (m.ctlNum != null && m.hasOwnProperty("ctlNum")) {
                    d.ctlNum = m.ctlNum;
                }
                if (m.kickoffCnt != null && m.hasOwnProperty("kickoffCnt")) {
                    d.kickoffCnt = m.kickoffCnt;
                }
                return d;
            };

            /**
             * Converts this MdpCmdKickoffFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MdpCmdKickoffFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MdpCmdKickoffFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MdpCmdKickoffFtraceEvent;
        })();

        protos.MdpCommitFtraceEvent = (function() {

            /**
             * Properties of a MdpCommitFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMdpCommitFtraceEvent
             * @property {number|null} [num] MdpCommitFtraceEvent num
             * @property {number|null} [playCnt] MdpCommitFtraceEvent playCnt
             * @property {number|null} [clkRate] MdpCommitFtraceEvent clkRate
             * @property {number|null} [bandwidth] MdpCommitFtraceEvent bandwidth
             */

            /**
             * Constructs a new MdpCommitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MdpCommitFtraceEvent.
             * @implements IMdpCommitFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMdpCommitFtraceEvent=} [p] Properties to set
             */
            function MdpCommitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MdpCommitFtraceEvent num.
             * @member {number} num
             * @memberof perfetto.protos.MdpCommitFtraceEvent
             * @instance
             */
            MdpCommitFtraceEvent.prototype.num = 0;

            /**
             * MdpCommitFtraceEvent playCnt.
             * @member {number} playCnt
             * @memberof perfetto.protos.MdpCommitFtraceEvent
             * @instance
             */
            MdpCommitFtraceEvent.prototype.playCnt = 0;

            /**
             * MdpCommitFtraceEvent clkRate.
             * @member {number} clkRate
             * @memberof perfetto.protos.MdpCommitFtraceEvent
             * @instance
             */
            MdpCommitFtraceEvent.prototype.clkRate = 0;

            /**
             * MdpCommitFtraceEvent bandwidth.
             * @member {number} bandwidth
             * @memberof perfetto.protos.MdpCommitFtraceEvent
             * @instance
             */
            MdpCommitFtraceEvent.prototype.bandwidth = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new MdpCommitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MdpCommitFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpCommitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MdpCommitFtraceEvent} MdpCommitFtraceEvent instance
             */
            MdpCommitFtraceEvent.create = function create(properties) {
                return new MdpCommitFtraceEvent(properties);
            };

            /**
             * Encodes the specified MdpCommitFtraceEvent message. Does not implicitly {@link perfetto.protos.MdpCommitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MdpCommitFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpCommitFtraceEvent} m MdpCommitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpCommitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.num != null && Object.hasOwnProperty.call(m, "num"))
                    w.uint32(8).uint32(m.num);
                if (m.playCnt != null && Object.hasOwnProperty.call(m, "playCnt"))
                    w.uint32(16).uint32(m.playCnt);
                if (m.clkRate != null && Object.hasOwnProperty.call(m, "clkRate"))
                    w.uint32(24).uint32(m.clkRate);
                if (m.bandwidth != null && Object.hasOwnProperty.call(m, "bandwidth"))
                    w.uint32(32).uint64(m.bandwidth);
                return w;
            };

            /**
             * Encodes the specified MdpCommitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MdpCommitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MdpCommitFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpCommitFtraceEvent} message MdpCommitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpCommitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MdpCommitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MdpCommitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MdpCommitFtraceEvent} MdpCommitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpCommitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MdpCommitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.num = r.uint32();
                        break;
                    case 2:
                        m.playCnt = r.uint32();
                        break;
                    case 3:
                        m.clkRate = r.uint32();
                        break;
                    case 4:
                        m.bandwidth = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MdpCommitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MdpCommitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MdpCommitFtraceEvent} MdpCommitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpCommitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MdpCommitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MdpCommitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MdpCommitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.num != null && m.hasOwnProperty("num")) {
                    if (!$util.isInteger(m.num))
                        return "num: integer expected";
                }
                if (m.playCnt != null && m.hasOwnProperty("playCnt")) {
                    if (!$util.isInteger(m.playCnt))
                        return "playCnt: integer expected";
                }
                if (m.clkRate != null && m.hasOwnProperty("clkRate")) {
                    if (!$util.isInteger(m.clkRate))
                        return "clkRate: integer expected";
                }
                if (m.bandwidth != null && m.hasOwnProperty("bandwidth")) {
                    if (!$util.isInteger(m.bandwidth) && !(m.bandwidth && $util.isInteger(m.bandwidth.low) && $util.isInteger(m.bandwidth.high)))
                        return "bandwidth: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a MdpCommitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MdpCommitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MdpCommitFtraceEvent} MdpCommitFtraceEvent
             */
            MdpCommitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MdpCommitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MdpCommitFtraceEvent();
                if (d.num != null) {
                    m.num = d.num >>> 0;
                }
                if (d.playCnt != null) {
                    m.playCnt = d.playCnt >>> 0;
                }
                if (d.clkRate != null) {
                    m.clkRate = d.clkRate >>> 0;
                }
                if (d.bandwidth != null) {
                    if ($util.Long)
                        (m.bandwidth = $util.Long.fromValue(d.bandwidth)).unsigned = true;
                    else if (typeof d.bandwidth === "string")
                        m.bandwidth = parseInt(d.bandwidth, 10);
                    else if (typeof d.bandwidth === "number")
                        m.bandwidth = d.bandwidth;
                    else if (typeof d.bandwidth === "object")
                        m.bandwidth = new $util.LongBits(d.bandwidth.low >>> 0, d.bandwidth.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a MdpCommitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MdpCommitFtraceEvent
             * @static
             * @param {perfetto.protos.MdpCommitFtraceEvent} m MdpCommitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MdpCommitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.num = 0;
                    d.playCnt = 0;
                    d.clkRate = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.bandwidth = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.bandwidth = o.longs === String ? "0" : 0;
                }
                if (m.num != null && m.hasOwnProperty("num")) {
                    d.num = m.num;
                }
                if (m.playCnt != null && m.hasOwnProperty("playCnt")) {
                    d.playCnt = m.playCnt;
                }
                if (m.clkRate != null && m.hasOwnProperty("clkRate")) {
                    d.clkRate = m.clkRate;
                }
                if (m.bandwidth != null && m.hasOwnProperty("bandwidth")) {
                    if (typeof m.bandwidth === "number")
                        d.bandwidth = o.longs === String ? String(m.bandwidth) : m.bandwidth;
                    else
                        d.bandwidth = o.longs === String ? $util.Long.prototype.toString.call(m.bandwidth) : o.longs === Number ? new $util.LongBits(m.bandwidth.low >>> 0, m.bandwidth.high >>> 0).toNumber(true) : m.bandwidth;
                }
                return d;
            };

            /**
             * Converts this MdpCommitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MdpCommitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MdpCommitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MdpCommitFtraceEvent;
        })();

        protos.MdpPerfSetOtFtraceEvent = (function() {

            /**
             * Properties of a MdpPerfSetOtFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMdpPerfSetOtFtraceEvent
             * @property {number|null} [pnum] MdpPerfSetOtFtraceEvent pnum
             * @property {number|null} [xinId] MdpPerfSetOtFtraceEvent xinId
             * @property {number|null} [rdLim] MdpPerfSetOtFtraceEvent rdLim
             * @property {number|null} [isVbifRt] MdpPerfSetOtFtraceEvent isVbifRt
             */

            /**
             * Constructs a new MdpPerfSetOtFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MdpPerfSetOtFtraceEvent.
             * @implements IMdpPerfSetOtFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMdpPerfSetOtFtraceEvent=} [p] Properties to set
             */
            function MdpPerfSetOtFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MdpPerfSetOtFtraceEvent pnum.
             * @member {number} pnum
             * @memberof perfetto.protos.MdpPerfSetOtFtraceEvent
             * @instance
             */
            MdpPerfSetOtFtraceEvent.prototype.pnum = 0;

            /**
             * MdpPerfSetOtFtraceEvent xinId.
             * @member {number} xinId
             * @memberof perfetto.protos.MdpPerfSetOtFtraceEvent
             * @instance
             */
            MdpPerfSetOtFtraceEvent.prototype.xinId = 0;

            /**
             * MdpPerfSetOtFtraceEvent rdLim.
             * @member {number} rdLim
             * @memberof perfetto.protos.MdpPerfSetOtFtraceEvent
             * @instance
             */
            MdpPerfSetOtFtraceEvent.prototype.rdLim = 0;

            /**
             * MdpPerfSetOtFtraceEvent isVbifRt.
             * @member {number} isVbifRt
             * @memberof perfetto.protos.MdpPerfSetOtFtraceEvent
             * @instance
             */
            MdpPerfSetOtFtraceEvent.prototype.isVbifRt = 0;

            /**
             * Creates a new MdpPerfSetOtFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MdpPerfSetOtFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpPerfSetOtFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MdpPerfSetOtFtraceEvent} MdpPerfSetOtFtraceEvent instance
             */
            MdpPerfSetOtFtraceEvent.create = function create(properties) {
                return new MdpPerfSetOtFtraceEvent(properties);
            };

            /**
             * Encodes the specified MdpPerfSetOtFtraceEvent message. Does not implicitly {@link perfetto.protos.MdpPerfSetOtFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MdpPerfSetOtFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpPerfSetOtFtraceEvent} m MdpPerfSetOtFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpPerfSetOtFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.pnum != null && Object.hasOwnProperty.call(m, "pnum"))
                    w.uint32(8).uint32(m.pnum);
                if (m.xinId != null && Object.hasOwnProperty.call(m, "xinId"))
                    w.uint32(16).uint32(m.xinId);
                if (m.rdLim != null && Object.hasOwnProperty.call(m, "rdLim"))
                    w.uint32(24).uint32(m.rdLim);
                if (m.isVbifRt != null && Object.hasOwnProperty.call(m, "isVbifRt"))
                    w.uint32(32).uint32(m.isVbifRt);
                return w;
            };

            /**
             * Encodes the specified MdpPerfSetOtFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MdpPerfSetOtFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MdpPerfSetOtFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpPerfSetOtFtraceEvent} message MdpPerfSetOtFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpPerfSetOtFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MdpPerfSetOtFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MdpPerfSetOtFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MdpPerfSetOtFtraceEvent} MdpPerfSetOtFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpPerfSetOtFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MdpPerfSetOtFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.pnum = r.uint32();
                        break;
                    case 2:
                        m.xinId = r.uint32();
                        break;
                    case 3:
                        m.rdLim = r.uint32();
                        break;
                    case 4:
                        m.isVbifRt = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MdpPerfSetOtFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MdpPerfSetOtFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MdpPerfSetOtFtraceEvent} MdpPerfSetOtFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpPerfSetOtFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MdpPerfSetOtFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MdpPerfSetOtFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MdpPerfSetOtFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.pnum != null && m.hasOwnProperty("pnum")) {
                    if (!$util.isInteger(m.pnum))
                        return "pnum: integer expected";
                }
                if (m.xinId != null && m.hasOwnProperty("xinId")) {
                    if (!$util.isInteger(m.xinId))
                        return "xinId: integer expected";
                }
                if (m.rdLim != null && m.hasOwnProperty("rdLim")) {
                    if (!$util.isInteger(m.rdLim))
                        return "rdLim: integer expected";
                }
                if (m.isVbifRt != null && m.hasOwnProperty("isVbifRt")) {
                    if (!$util.isInteger(m.isVbifRt))
                        return "isVbifRt: integer expected";
                }
                return null;
            };

            /**
             * Creates a MdpPerfSetOtFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MdpPerfSetOtFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MdpPerfSetOtFtraceEvent} MdpPerfSetOtFtraceEvent
             */
            MdpPerfSetOtFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MdpPerfSetOtFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MdpPerfSetOtFtraceEvent();
                if (d.pnum != null) {
                    m.pnum = d.pnum >>> 0;
                }
                if (d.xinId != null) {
                    m.xinId = d.xinId >>> 0;
                }
                if (d.rdLim != null) {
                    m.rdLim = d.rdLim >>> 0;
                }
                if (d.isVbifRt != null) {
                    m.isVbifRt = d.isVbifRt >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MdpPerfSetOtFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MdpPerfSetOtFtraceEvent
             * @static
             * @param {perfetto.protos.MdpPerfSetOtFtraceEvent} m MdpPerfSetOtFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MdpPerfSetOtFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.pnum = 0;
                    d.xinId = 0;
                    d.rdLim = 0;
                    d.isVbifRt = 0;
                }
                if (m.pnum != null && m.hasOwnProperty("pnum")) {
                    d.pnum = m.pnum;
                }
                if (m.xinId != null && m.hasOwnProperty("xinId")) {
                    d.xinId = m.xinId;
                }
                if (m.rdLim != null && m.hasOwnProperty("rdLim")) {
                    d.rdLim = m.rdLim;
                }
                if (m.isVbifRt != null && m.hasOwnProperty("isVbifRt")) {
                    d.isVbifRt = m.isVbifRt;
                }
                return d;
            };

            /**
             * Converts this MdpPerfSetOtFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MdpPerfSetOtFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MdpPerfSetOtFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MdpPerfSetOtFtraceEvent;
        })();

        protos.MdpSsppChangeFtraceEvent = (function() {

            /**
             * Properties of a MdpSsppChangeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMdpSsppChangeFtraceEvent
             * @property {number|null} [num] MdpSsppChangeFtraceEvent num
             * @property {number|null} [playCnt] MdpSsppChangeFtraceEvent playCnt
             * @property {number|null} [mixer] MdpSsppChangeFtraceEvent mixer
             * @property {number|null} [stage] MdpSsppChangeFtraceEvent stage
             * @property {number|null} [flags] MdpSsppChangeFtraceEvent flags
             * @property {number|null} [format] MdpSsppChangeFtraceEvent format
             * @property {number|null} [imgW] MdpSsppChangeFtraceEvent imgW
             * @property {number|null} [imgH] MdpSsppChangeFtraceEvent imgH
             * @property {number|null} [srcX] MdpSsppChangeFtraceEvent srcX
             * @property {number|null} [srcY] MdpSsppChangeFtraceEvent srcY
             * @property {number|null} [srcW] MdpSsppChangeFtraceEvent srcW
             * @property {number|null} [srcH] MdpSsppChangeFtraceEvent srcH
             * @property {number|null} [dstX] MdpSsppChangeFtraceEvent dstX
             * @property {number|null} [dstY] MdpSsppChangeFtraceEvent dstY
             * @property {number|null} [dstW] MdpSsppChangeFtraceEvent dstW
             * @property {number|null} [dstH] MdpSsppChangeFtraceEvent dstH
             */

            /**
             * Constructs a new MdpSsppChangeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MdpSsppChangeFtraceEvent.
             * @implements IMdpSsppChangeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMdpSsppChangeFtraceEvent=} [p] Properties to set
             */
            function MdpSsppChangeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MdpSsppChangeFtraceEvent num.
             * @member {number} num
             * @memberof perfetto.protos.MdpSsppChangeFtraceEvent
             * @instance
             */
            MdpSsppChangeFtraceEvent.prototype.num = 0;

            /**
             * MdpSsppChangeFtraceEvent playCnt.
             * @member {number} playCnt
             * @memberof perfetto.protos.MdpSsppChangeFtraceEvent
             * @instance
             */
            MdpSsppChangeFtraceEvent.prototype.playCnt = 0;

            /**
             * MdpSsppChangeFtraceEvent mixer.
             * @member {number} mixer
             * @memberof perfetto.protos.MdpSsppChangeFtraceEvent
             * @instance
             */
            MdpSsppChangeFtraceEvent.prototype.mixer = 0;

            /**
             * MdpSsppChangeFtraceEvent stage.
             * @member {number} stage
             * @memberof perfetto.protos.MdpSsppChangeFtraceEvent
             * @instance
             */
            MdpSsppChangeFtraceEvent.prototype.stage = 0;

            /**
             * MdpSsppChangeFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.MdpSsppChangeFtraceEvent
             * @instance
             */
            MdpSsppChangeFtraceEvent.prototype.flags = 0;

            /**
             * MdpSsppChangeFtraceEvent format.
             * @member {number} format
             * @memberof perfetto.protos.MdpSsppChangeFtraceEvent
             * @instance
             */
            MdpSsppChangeFtraceEvent.prototype.format = 0;

            /**
             * MdpSsppChangeFtraceEvent imgW.
             * @member {number} imgW
             * @memberof perfetto.protos.MdpSsppChangeFtraceEvent
             * @instance
             */
            MdpSsppChangeFtraceEvent.prototype.imgW = 0;

            /**
             * MdpSsppChangeFtraceEvent imgH.
             * @member {number} imgH
             * @memberof perfetto.protos.MdpSsppChangeFtraceEvent
             * @instance
             */
            MdpSsppChangeFtraceEvent.prototype.imgH = 0;

            /**
             * MdpSsppChangeFtraceEvent srcX.
             * @member {number} srcX
             * @memberof perfetto.protos.MdpSsppChangeFtraceEvent
             * @instance
             */
            MdpSsppChangeFtraceEvent.prototype.srcX = 0;

            /**
             * MdpSsppChangeFtraceEvent srcY.
             * @member {number} srcY
             * @memberof perfetto.protos.MdpSsppChangeFtraceEvent
             * @instance
             */
            MdpSsppChangeFtraceEvent.prototype.srcY = 0;

            /**
             * MdpSsppChangeFtraceEvent srcW.
             * @member {number} srcW
             * @memberof perfetto.protos.MdpSsppChangeFtraceEvent
             * @instance
             */
            MdpSsppChangeFtraceEvent.prototype.srcW = 0;

            /**
             * MdpSsppChangeFtraceEvent srcH.
             * @member {number} srcH
             * @memberof perfetto.protos.MdpSsppChangeFtraceEvent
             * @instance
             */
            MdpSsppChangeFtraceEvent.prototype.srcH = 0;

            /**
             * MdpSsppChangeFtraceEvent dstX.
             * @member {number} dstX
             * @memberof perfetto.protos.MdpSsppChangeFtraceEvent
             * @instance
             */
            MdpSsppChangeFtraceEvent.prototype.dstX = 0;

            /**
             * MdpSsppChangeFtraceEvent dstY.
             * @member {number} dstY
             * @memberof perfetto.protos.MdpSsppChangeFtraceEvent
             * @instance
             */
            MdpSsppChangeFtraceEvent.prototype.dstY = 0;

            /**
             * MdpSsppChangeFtraceEvent dstW.
             * @member {number} dstW
             * @memberof perfetto.protos.MdpSsppChangeFtraceEvent
             * @instance
             */
            MdpSsppChangeFtraceEvent.prototype.dstW = 0;

            /**
             * MdpSsppChangeFtraceEvent dstH.
             * @member {number} dstH
             * @memberof perfetto.protos.MdpSsppChangeFtraceEvent
             * @instance
             */
            MdpSsppChangeFtraceEvent.prototype.dstH = 0;

            /**
             * Creates a new MdpSsppChangeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MdpSsppChangeFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpSsppChangeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MdpSsppChangeFtraceEvent} MdpSsppChangeFtraceEvent instance
             */
            MdpSsppChangeFtraceEvent.create = function create(properties) {
                return new MdpSsppChangeFtraceEvent(properties);
            };

            /**
             * Encodes the specified MdpSsppChangeFtraceEvent message. Does not implicitly {@link perfetto.protos.MdpSsppChangeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MdpSsppChangeFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpSsppChangeFtraceEvent} m MdpSsppChangeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpSsppChangeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.num != null && Object.hasOwnProperty.call(m, "num"))
                    w.uint32(8).uint32(m.num);
                if (m.playCnt != null && Object.hasOwnProperty.call(m, "playCnt"))
                    w.uint32(16).uint32(m.playCnt);
                if (m.mixer != null && Object.hasOwnProperty.call(m, "mixer"))
                    w.uint32(24).uint32(m.mixer);
                if (m.stage != null && Object.hasOwnProperty.call(m, "stage"))
                    w.uint32(32).uint32(m.stage);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(40).uint32(m.flags);
                if (m.format != null && Object.hasOwnProperty.call(m, "format"))
                    w.uint32(48).uint32(m.format);
                if (m.imgW != null && Object.hasOwnProperty.call(m, "imgW"))
                    w.uint32(56).uint32(m.imgW);
                if (m.imgH != null && Object.hasOwnProperty.call(m, "imgH"))
                    w.uint32(64).uint32(m.imgH);
                if (m.srcX != null && Object.hasOwnProperty.call(m, "srcX"))
                    w.uint32(72).uint32(m.srcX);
                if (m.srcY != null && Object.hasOwnProperty.call(m, "srcY"))
                    w.uint32(80).uint32(m.srcY);
                if (m.srcW != null && Object.hasOwnProperty.call(m, "srcW"))
                    w.uint32(88).uint32(m.srcW);
                if (m.srcH != null && Object.hasOwnProperty.call(m, "srcH"))
                    w.uint32(96).uint32(m.srcH);
                if (m.dstX != null && Object.hasOwnProperty.call(m, "dstX"))
                    w.uint32(104).uint32(m.dstX);
                if (m.dstY != null && Object.hasOwnProperty.call(m, "dstY"))
                    w.uint32(112).uint32(m.dstY);
                if (m.dstW != null && Object.hasOwnProperty.call(m, "dstW"))
                    w.uint32(120).uint32(m.dstW);
                if (m.dstH != null && Object.hasOwnProperty.call(m, "dstH"))
                    w.uint32(128).uint32(m.dstH);
                return w;
            };

            /**
             * Encodes the specified MdpSsppChangeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MdpSsppChangeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MdpSsppChangeFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpSsppChangeFtraceEvent} message MdpSsppChangeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpSsppChangeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MdpSsppChangeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MdpSsppChangeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MdpSsppChangeFtraceEvent} MdpSsppChangeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpSsppChangeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MdpSsppChangeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.num = r.uint32();
                        break;
                    case 2:
                        m.playCnt = r.uint32();
                        break;
                    case 3:
                        m.mixer = r.uint32();
                        break;
                    case 4:
                        m.stage = r.uint32();
                        break;
                    case 5:
                        m.flags = r.uint32();
                        break;
                    case 6:
                        m.format = r.uint32();
                        break;
                    case 7:
                        m.imgW = r.uint32();
                        break;
                    case 8:
                        m.imgH = r.uint32();
                        break;
                    case 9:
                        m.srcX = r.uint32();
                        break;
                    case 10:
                        m.srcY = r.uint32();
                        break;
                    case 11:
                        m.srcW = r.uint32();
                        break;
                    case 12:
                        m.srcH = r.uint32();
                        break;
                    case 13:
                        m.dstX = r.uint32();
                        break;
                    case 14:
                        m.dstY = r.uint32();
                        break;
                    case 15:
                        m.dstW = r.uint32();
                        break;
                    case 16:
                        m.dstH = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MdpSsppChangeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MdpSsppChangeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MdpSsppChangeFtraceEvent} MdpSsppChangeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpSsppChangeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MdpSsppChangeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MdpSsppChangeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MdpSsppChangeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.num != null && m.hasOwnProperty("num")) {
                    if (!$util.isInteger(m.num))
                        return "num: integer expected";
                }
                if (m.playCnt != null && m.hasOwnProperty("playCnt")) {
                    if (!$util.isInteger(m.playCnt))
                        return "playCnt: integer expected";
                }
                if (m.mixer != null && m.hasOwnProperty("mixer")) {
                    if (!$util.isInteger(m.mixer))
                        return "mixer: integer expected";
                }
                if (m.stage != null && m.hasOwnProperty("stage")) {
                    if (!$util.isInteger(m.stage))
                        return "stage: integer expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.format != null && m.hasOwnProperty("format")) {
                    if (!$util.isInteger(m.format))
                        return "format: integer expected";
                }
                if (m.imgW != null && m.hasOwnProperty("imgW")) {
                    if (!$util.isInteger(m.imgW))
                        return "imgW: integer expected";
                }
                if (m.imgH != null && m.hasOwnProperty("imgH")) {
                    if (!$util.isInteger(m.imgH))
                        return "imgH: integer expected";
                }
                if (m.srcX != null && m.hasOwnProperty("srcX")) {
                    if (!$util.isInteger(m.srcX))
                        return "srcX: integer expected";
                }
                if (m.srcY != null && m.hasOwnProperty("srcY")) {
                    if (!$util.isInteger(m.srcY))
                        return "srcY: integer expected";
                }
                if (m.srcW != null && m.hasOwnProperty("srcW")) {
                    if (!$util.isInteger(m.srcW))
                        return "srcW: integer expected";
                }
                if (m.srcH != null && m.hasOwnProperty("srcH")) {
                    if (!$util.isInteger(m.srcH))
                        return "srcH: integer expected";
                }
                if (m.dstX != null && m.hasOwnProperty("dstX")) {
                    if (!$util.isInteger(m.dstX))
                        return "dstX: integer expected";
                }
                if (m.dstY != null && m.hasOwnProperty("dstY")) {
                    if (!$util.isInteger(m.dstY))
                        return "dstY: integer expected";
                }
                if (m.dstW != null && m.hasOwnProperty("dstW")) {
                    if (!$util.isInteger(m.dstW))
                        return "dstW: integer expected";
                }
                if (m.dstH != null && m.hasOwnProperty("dstH")) {
                    if (!$util.isInteger(m.dstH))
                        return "dstH: integer expected";
                }
                return null;
            };

            /**
             * Creates a MdpSsppChangeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MdpSsppChangeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MdpSsppChangeFtraceEvent} MdpSsppChangeFtraceEvent
             */
            MdpSsppChangeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MdpSsppChangeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MdpSsppChangeFtraceEvent();
                if (d.num != null) {
                    m.num = d.num >>> 0;
                }
                if (d.playCnt != null) {
                    m.playCnt = d.playCnt >>> 0;
                }
                if (d.mixer != null) {
                    m.mixer = d.mixer >>> 0;
                }
                if (d.stage != null) {
                    m.stage = d.stage >>> 0;
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                if (d.format != null) {
                    m.format = d.format >>> 0;
                }
                if (d.imgW != null) {
                    m.imgW = d.imgW >>> 0;
                }
                if (d.imgH != null) {
                    m.imgH = d.imgH >>> 0;
                }
                if (d.srcX != null) {
                    m.srcX = d.srcX >>> 0;
                }
                if (d.srcY != null) {
                    m.srcY = d.srcY >>> 0;
                }
                if (d.srcW != null) {
                    m.srcW = d.srcW >>> 0;
                }
                if (d.srcH != null) {
                    m.srcH = d.srcH >>> 0;
                }
                if (d.dstX != null) {
                    m.dstX = d.dstX >>> 0;
                }
                if (d.dstY != null) {
                    m.dstY = d.dstY >>> 0;
                }
                if (d.dstW != null) {
                    m.dstW = d.dstW >>> 0;
                }
                if (d.dstH != null) {
                    m.dstH = d.dstH >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MdpSsppChangeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MdpSsppChangeFtraceEvent
             * @static
             * @param {perfetto.protos.MdpSsppChangeFtraceEvent} m MdpSsppChangeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MdpSsppChangeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.num = 0;
                    d.playCnt = 0;
                    d.mixer = 0;
                    d.stage = 0;
                    d.flags = 0;
                    d.format = 0;
                    d.imgW = 0;
                    d.imgH = 0;
                    d.srcX = 0;
                    d.srcY = 0;
                    d.srcW = 0;
                    d.srcH = 0;
                    d.dstX = 0;
                    d.dstY = 0;
                    d.dstW = 0;
                    d.dstH = 0;
                }
                if (m.num != null && m.hasOwnProperty("num")) {
                    d.num = m.num;
                }
                if (m.playCnt != null && m.hasOwnProperty("playCnt")) {
                    d.playCnt = m.playCnt;
                }
                if (m.mixer != null && m.hasOwnProperty("mixer")) {
                    d.mixer = m.mixer;
                }
                if (m.stage != null && m.hasOwnProperty("stage")) {
                    d.stage = m.stage;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.format != null && m.hasOwnProperty("format")) {
                    d.format = m.format;
                }
                if (m.imgW != null && m.hasOwnProperty("imgW")) {
                    d.imgW = m.imgW;
                }
                if (m.imgH != null && m.hasOwnProperty("imgH")) {
                    d.imgH = m.imgH;
                }
                if (m.srcX != null && m.hasOwnProperty("srcX")) {
                    d.srcX = m.srcX;
                }
                if (m.srcY != null && m.hasOwnProperty("srcY")) {
                    d.srcY = m.srcY;
                }
                if (m.srcW != null && m.hasOwnProperty("srcW")) {
                    d.srcW = m.srcW;
                }
                if (m.srcH != null && m.hasOwnProperty("srcH")) {
                    d.srcH = m.srcH;
                }
                if (m.dstX != null && m.hasOwnProperty("dstX")) {
                    d.dstX = m.dstX;
                }
                if (m.dstY != null && m.hasOwnProperty("dstY")) {
                    d.dstY = m.dstY;
                }
                if (m.dstW != null && m.hasOwnProperty("dstW")) {
                    d.dstW = m.dstW;
                }
                if (m.dstH != null && m.hasOwnProperty("dstH")) {
                    d.dstH = m.dstH;
                }
                return d;
            };

            /**
             * Converts this MdpSsppChangeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MdpSsppChangeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MdpSsppChangeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MdpSsppChangeFtraceEvent;
        })();

        protos.TracingMarkWriteFtraceEvent = (function() {

            /**
             * Properties of a TracingMarkWriteFtraceEvent.
             * @memberof perfetto.protos
             * @interface ITracingMarkWriteFtraceEvent
             * @property {number|null} [pid] TracingMarkWriteFtraceEvent pid
             * @property {string|null} [traceName] TracingMarkWriteFtraceEvent traceName
             * @property {number|null} [traceBegin] TracingMarkWriteFtraceEvent traceBegin
             */

            /**
             * Constructs a new TracingMarkWriteFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TracingMarkWriteFtraceEvent.
             * @implements ITracingMarkWriteFtraceEvent
             * @constructor
             * @param {perfetto.protos.ITracingMarkWriteFtraceEvent=} [p] Properties to set
             */
            function TracingMarkWriteFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TracingMarkWriteFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.TracingMarkWriteFtraceEvent
             * @instance
             */
            TracingMarkWriteFtraceEvent.prototype.pid = 0;

            /**
             * TracingMarkWriteFtraceEvent traceName.
             * @member {string} traceName
             * @memberof perfetto.protos.TracingMarkWriteFtraceEvent
             * @instance
             */
            TracingMarkWriteFtraceEvent.prototype.traceName = "";

            /**
             * TracingMarkWriteFtraceEvent traceBegin.
             * @member {number} traceBegin
             * @memberof perfetto.protos.TracingMarkWriteFtraceEvent
             * @instance
             */
            TracingMarkWriteFtraceEvent.prototype.traceBegin = 0;

            /**
             * Creates a new TracingMarkWriteFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TracingMarkWriteFtraceEvent
             * @static
             * @param {perfetto.protos.ITracingMarkWriteFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TracingMarkWriteFtraceEvent} TracingMarkWriteFtraceEvent instance
             */
            TracingMarkWriteFtraceEvent.create = function create(properties) {
                return new TracingMarkWriteFtraceEvent(properties);
            };

            /**
             * Encodes the specified TracingMarkWriteFtraceEvent message. Does not implicitly {@link perfetto.protos.TracingMarkWriteFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TracingMarkWriteFtraceEvent
             * @static
             * @param {perfetto.protos.ITracingMarkWriteFtraceEvent} m TracingMarkWriteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TracingMarkWriteFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(8).int32(m.pid);
                if (m.traceName != null && Object.hasOwnProperty.call(m, "traceName"))
                    w.uint32(18).string(m.traceName);
                if (m.traceBegin != null && Object.hasOwnProperty.call(m, "traceBegin"))
                    w.uint32(24).uint32(m.traceBegin);
                return w;
            };

            /**
             * Encodes the specified TracingMarkWriteFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TracingMarkWriteFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TracingMarkWriteFtraceEvent
             * @static
             * @param {perfetto.protos.ITracingMarkWriteFtraceEvent} message TracingMarkWriteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TracingMarkWriteFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TracingMarkWriteFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TracingMarkWriteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TracingMarkWriteFtraceEvent} TracingMarkWriteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TracingMarkWriteFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TracingMarkWriteFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.pid = r.int32();
                        break;
                    case 2:
                        m.traceName = r.string();
                        break;
                    case 3:
                        m.traceBegin = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TracingMarkWriteFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TracingMarkWriteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TracingMarkWriteFtraceEvent} TracingMarkWriteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TracingMarkWriteFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TracingMarkWriteFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.TracingMarkWriteFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TracingMarkWriteFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.traceName != null && m.hasOwnProperty("traceName")) {
                    if (!$util.isString(m.traceName))
                        return "traceName: string expected";
                }
                if (m.traceBegin != null && m.hasOwnProperty("traceBegin")) {
                    if (!$util.isInteger(m.traceBegin))
                        return "traceBegin: integer expected";
                }
                return null;
            };

            /**
             * Creates a TracingMarkWriteFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TracingMarkWriteFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TracingMarkWriteFtraceEvent} TracingMarkWriteFtraceEvent
             */
            TracingMarkWriteFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TracingMarkWriteFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.TracingMarkWriteFtraceEvent();
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                if (d.traceName != null) {
                    m.traceName = String(d.traceName);
                }
                if (d.traceBegin != null) {
                    m.traceBegin = d.traceBegin >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a TracingMarkWriteFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TracingMarkWriteFtraceEvent
             * @static
             * @param {perfetto.protos.TracingMarkWriteFtraceEvent} m TracingMarkWriteFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TracingMarkWriteFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.pid = 0;
                    d.traceName = "";
                    d.traceBegin = 0;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.traceName != null && m.hasOwnProperty("traceName")) {
                    d.traceName = m.traceName;
                }
                if (m.traceBegin != null && m.hasOwnProperty("traceBegin")) {
                    d.traceBegin = m.traceBegin;
                }
                return d;
            };

            /**
             * Converts this TracingMarkWriteFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TracingMarkWriteFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TracingMarkWriteFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TracingMarkWriteFtraceEvent;
        })();

        protos.MdpCmdPingpongDoneFtraceEvent = (function() {

            /**
             * Properties of a MdpCmdPingpongDoneFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMdpCmdPingpongDoneFtraceEvent
             * @property {number|null} [ctlNum] MdpCmdPingpongDoneFtraceEvent ctlNum
             * @property {number|null} [intfNum] MdpCmdPingpongDoneFtraceEvent intfNum
             * @property {number|null} [ppNum] MdpCmdPingpongDoneFtraceEvent ppNum
             * @property {number|null} [koffCnt] MdpCmdPingpongDoneFtraceEvent koffCnt
             */

            /**
             * Constructs a new MdpCmdPingpongDoneFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MdpCmdPingpongDoneFtraceEvent.
             * @implements IMdpCmdPingpongDoneFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMdpCmdPingpongDoneFtraceEvent=} [p] Properties to set
             */
            function MdpCmdPingpongDoneFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MdpCmdPingpongDoneFtraceEvent ctlNum.
             * @member {number} ctlNum
             * @memberof perfetto.protos.MdpCmdPingpongDoneFtraceEvent
             * @instance
             */
            MdpCmdPingpongDoneFtraceEvent.prototype.ctlNum = 0;

            /**
             * MdpCmdPingpongDoneFtraceEvent intfNum.
             * @member {number} intfNum
             * @memberof perfetto.protos.MdpCmdPingpongDoneFtraceEvent
             * @instance
             */
            MdpCmdPingpongDoneFtraceEvent.prototype.intfNum = 0;

            /**
             * MdpCmdPingpongDoneFtraceEvent ppNum.
             * @member {number} ppNum
             * @memberof perfetto.protos.MdpCmdPingpongDoneFtraceEvent
             * @instance
             */
            MdpCmdPingpongDoneFtraceEvent.prototype.ppNum = 0;

            /**
             * MdpCmdPingpongDoneFtraceEvent koffCnt.
             * @member {number} koffCnt
             * @memberof perfetto.protos.MdpCmdPingpongDoneFtraceEvent
             * @instance
             */
            MdpCmdPingpongDoneFtraceEvent.prototype.koffCnt = 0;

            /**
             * Creates a new MdpCmdPingpongDoneFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MdpCmdPingpongDoneFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpCmdPingpongDoneFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MdpCmdPingpongDoneFtraceEvent} MdpCmdPingpongDoneFtraceEvent instance
             */
            MdpCmdPingpongDoneFtraceEvent.create = function create(properties) {
                return new MdpCmdPingpongDoneFtraceEvent(properties);
            };

            /**
             * Encodes the specified MdpCmdPingpongDoneFtraceEvent message. Does not implicitly {@link perfetto.protos.MdpCmdPingpongDoneFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MdpCmdPingpongDoneFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpCmdPingpongDoneFtraceEvent} m MdpCmdPingpongDoneFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpCmdPingpongDoneFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.ctlNum != null && Object.hasOwnProperty.call(m, "ctlNum"))
                    w.uint32(8).uint32(m.ctlNum);
                if (m.intfNum != null && Object.hasOwnProperty.call(m, "intfNum"))
                    w.uint32(16).uint32(m.intfNum);
                if (m.ppNum != null && Object.hasOwnProperty.call(m, "ppNum"))
                    w.uint32(24).uint32(m.ppNum);
                if (m.koffCnt != null && Object.hasOwnProperty.call(m, "koffCnt"))
                    w.uint32(32).int32(m.koffCnt);
                return w;
            };

            /**
             * Encodes the specified MdpCmdPingpongDoneFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MdpCmdPingpongDoneFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MdpCmdPingpongDoneFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpCmdPingpongDoneFtraceEvent} message MdpCmdPingpongDoneFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpCmdPingpongDoneFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MdpCmdPingpongDoneFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MdpCmdPingpongDoneFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MdpCmdPingpongDoneFtraceEvent} MdpCmdPingpongDoneFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpCmdPingpongDoneFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MdpCmdPingpongDoneFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.ctlNum = r.uint32();
                        break;
                    case 2:
                        m.intfNum = r.uint32();
                        break;
                    case 3:
                        m.ppNum = r.uint32();
                        break;
                    case 4:
                        m.koffCnt = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MdpCmdPingpongDoneFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MdpCmdPingpongDoneFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MdpCmdPingpongDoneFtraceEvent} MdpCmdPingpongDoneFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpCmdPingpongDoneFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MdpCmdPingpongDoneFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MdpCmdPingpongDoneFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MdpCmdPingpongDoneFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.ctlNum != null && m.hasOwnProperty("ctlNum")) {
                    if (!$util.isInteger(m.ctlNum))
                        return "ctlNum: integer expected";
                }
                if (m.intfNum != null && m.hasOwnProperty("intfNum")) {
                    if (!$util.isInteger(m.intfNum))
                        return "intfNum: integer expected";
                }
                if (m.ppNum != null && m.hasOwnProperty("ppNum")) {
                    if (!$util.isInteger(m.ppNum))
                        return "ppNum: integer expected";
                }
                if (m.koffCnt != null && m.hasOwnProperty("koffCnt")) {
                    if (!$util.isInteger(m.koffCnt))
                        return "koffCnt: integer expected";
                }
                return null;
            };

            /**
             * Creates a MdpCmdPingpongDoneFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MdpCmdPingpongDoneFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MdpCmdPingpongDoneFtraceEvent} MdpCmdPingpongDoneFtraceEvent
             */
            MdpCmdPingpongDoneFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MdpCmdPingpongDoneFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MdpCmdPingpongDoneFtraceEvent();
                if (d.ctlNum != null) {
                    m.ctlNum = d.ctlNum >>> 0;
                }
                if (d.intfNum != null) {
                    m.intfNum = d.intfNum >>> 0;
                }
                if (d.ppNum != null) {
                    m.ppNum = d.ppNum >>> 0;
                }
                if (d.koffCnt != null) {
                    m.koffCnt = d.koffCnt | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MdpCmdPingpongDoneFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MdpCmdPingpongDoneFtraceEvent
             * @static
             * @param {perfetto.protos.MdpCmdPingpongDoneFtraceEvent} m MdpCmdPingpongDoneFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MdpCmdPingpongDoneFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.ctlNum = 0;
                    d.intfNum = 0;
                    d.ppNum = 0;
                    d.koffCnt = 0;
                }
                if (m.ctlNum != null && m.hasOwnProperty("ctlNum")) {
                    d.ctlNum = m.ctlNum;
                }
                if (m.intfNum != null && m.hasOwnProperty("intfNum")) {
                    d.intfNum = m.intfNum;
                }
                if (m.ppNum != null && m.hasOwnProperty("ppNum")) {
                    d.ppNum = m.ppNum;
                }
                if (m.koffCnt != null && m.hasOwnProperty("koffCnt")) {
                    d.koffCnt = m.koffCnt;
                }
                return d;
            };

            /**
             * Converts this MdpCmdPingpongDoneFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MdpCmdPingpongDoneFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MdpCmdPingpongDoneFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MdpCmdPingpongDoneFtraceEvent;
        })();

        protos.MdpCompareBwFtraceEvent = (function() {

            /**
             * Properties of a MdpCompareBwFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMdpCompareBwFtraceEvent
             * @property {number|null} [newAb] MdpCompareBwFtraceEvent newAb
             * @property {number|null} [newIb] MdpCompareBwFtraceEvent newIb
             * @property {number|null} [newWb] MdpCompareBwFtraceEvent newWb
             * @property {number|null} [oldAb] MdpCompareBwFtraceEvent oldAb
             * @property {number|null} [oldIb] MdpCompareBwFtraceEvent oldIb
             * @property {number|null} [oldWb] MdpCompareBwFtraceEvent oldWb
             * @property {number|null} [paramsChanged] MdpCompareBwFtraceEvent paramsChanged
             * @property {number|null} [updateBw] MdpCompareBwFtraceEvent updateBw
             */

            /**
             * Constructs a new MdpCompareBwFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MdpCompareBwFtraceEvent.
             * @implements IMdpCompareBwFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMdpCompareBwFtraceEvent=} [p] Properties to set
             */
            function MdpCompareBwFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MdpCompareBwFtraceEvent newAb.
             * @member {number} newAb
             * @memberof perfetto.protos.MdpCompareBwFtraceEvent
             * @instance
             */
            MdpCompareBwFtraceEvent.prototype.newAb = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MdpCompareBwFtraceEvent newIb.
             * @member {number} newIb
             * @memberof perfetto.protos.MdpCompareBwFtraceEvent
             * @instance
             */
            MdpCompareBwFtraceEvent.prototype.newIb = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MdpCompareBwFtraceEvent newWb.
             * @member {number} newWb
             * @memberof perfetto.protos.MdpCompareBwFtraceEvent
             * @instance
             */
            MdpCompareBwFtraceEvent.prototype.newWb = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MdpCompareBwFtraceEvent oldAb.
             * @member {number} oldAb
             * @memberof perfetto.protos.MdpCompareBwFtraceEvent
             * @instance
             */
            MdpCompareBwFtraceEvent.prototype.oldAb = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MdpCompareBwFtraceEvent oldIb.
             * @member {number} oldIb
             * @memberof perfetto.protos.MdpCompareBwFtraceEvent
             * @instance
             */
            MdpCompareBwFtraceEvent.prototype.oldIb = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MdpCompareBwFtraceEvent oldWb.
             * @member {number} oldWb
             * @memberof perfetto.protos.MdpCompareBwFtraceEvent
             * @instance
             */
            MdpCompareBwFtraceEvent.prototype.oldWb = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MdpCompareBwFtraceEvent paramsChanged.
             * @member {number} paramsChanged
             * @memberof perfetto.protos.MdpCompareBwFtraceEvent
             * @instance
             */
            MdpCompareBwFtraceEvent.prototype.paramsChanged = 0;

            /**
             * MdpCompareBwFtraceEvent updateBw.
             * @member {number} updateBw
             * @memberof perfetto.protos.MdpCompareBwFtraceEvent
             * @instance
             */
            MdpCompareBwFtraceEvent.prototype.updateBw = 0;

            /**
             * Creates a new MdpCompareBwFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MdpCompareBwFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpCompareBwFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MdpCompareBwFtraceEvent} MdpCompareBwFtraceEvent instance
             */
            MdpCompareBwFtraceEvent.create = function create(properties) {
                return new MdpCompareBwFtraceEvent(properties);
            };

            /**
             * Encodes the specified MdpCompareBwFtraceEvent message. Does not implicitly {@link perfetto.protos.MdpCompareBwFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MdpCompareBwFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpCompareBwFtraceEvent} m MdpCompareBwFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpCompareBwFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.newAb != null && Object.hasOwnProperty.call(m, "newAb"))
                    w.uint32(8).uint64(m.newAb);
                if (m.newIb != null && Object.hasOwnProperty.call(m, "newIb"))
                    w.uint32(16).uint64(m.newIb);
                if (m.newWb != null && Object.hasOwnProperty.call(m, "newWb"))
                    w.uint32(24).uint64(m.newWb);
                if (m.oldAb != null && Object.hasOwnProperty.call(m, "oldAb"))
                    w.uint32(32).uint64(m.oldAb);
                if (m.oldIb != null && Object.hasOwnProperty.call(m, "oldIb"))
                    w.uint32(40).uint64(m.oldIb);
                if (m.oldWb != null && Object.hasOwnProperty.call(m, "oldWb"))
                    w.uint32(48).uint64(m.oldWb);
                if (m.paramsChanged != null && Object.hasOwnProperty.call(m, "paramsChanged"))
                    w.uint32(56).uint32(m.paramsChanged);
                if (m.updateBw != null && Object.hasOwnProperty.call(m, "updateBw"))
                    w.uint32(64).uint32(m.updateBw);
                return w;
            };

            /**
             * Encodes the specified MdpCompareBwFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MdpCompareBwFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MdpCompareBwFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpCompareBwFtraceEvent} message MdpCompareBwFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpCompareBwFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MdpCompareBwFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MdpCompareBwFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MdpCompareBwFtraceEvent} MdpCompareBwFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpCompareBwFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MdpCompareBwFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.newAb = r.uint64();
                        break;
                    case 2:
                        m.newIb = r.uint64();
                        break;
                    case 3:
                        m.newWb = r.uint64();
                        break;
                    case 4:
                        m.oldAb = r.uint64();
                        break;
                    case 5:
                        m.oldIb = r.uint64();
                        break;
                    case 6:
                        m.oldWb = r.uint64();
                        break;
                    case 7:
                        m.paramsChanged = r.uint32();
                        break;
                    case 8:
                        m.updateBw = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MdpCompareBwFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MdpCompareBwFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MdpCompareBwFtraceEvent} MdpCompareBwFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpCompareBwFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MdpCompareBwFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MdpCompareBwFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MdpCompareBwFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.newAb != null && m.hasOwnProperty("newAb")) {
                    if (!$util.isInteger(m.newAb) && !(m.newAb && $util.isInteger(m.newAb.low) && $util.isInteger(m.newAb.high)))
                        return "newAb: integer|Long expected";
                }
                if (m.newIb != null && m.hasOwnProperty("newIb")) {
                    if (!$util.isInteger(m.newIb) && !(m.newIb && $util.isInteger(m.newIb.low) && $util.isInteger(m.newIb.high)))
                        return "newIb: integer|Long expected";
                }
                if (m.newWb != null && m.hasOwnProperty("newWb")) {
                    if (!$util.isInteger(m.newWb) && !(m.newWb && $util.isInteger(m.newWb.low) && $util.isInteger(m.newWb.high)))
                        return "newWb: integer|Long expected";
                }
                if (m.oldAb != null && m.hasOwnProperty("oldAb")) {
                    if (!$util.isInteger(m.oldAb) && !(m.oldAb && $util.isInteger(m.oldAb.low) && $util.isInteger(m.oldAb.high)))
                        return "oldAb: integer|Long expected";
                }
                if (m.oldIb != null && m.hasOwnProperty("oldIb")) {
                    if (!$util.isInteger(m.oldIb) && !(m.oldIb && $util.isInteger(m.oldIb.low) && $util.isInteger(m.oldIb.high)))
                        return "oldIb: integer|Long expected";
                }
                if (m.oldWb != null && m.hasOwnProperty("oldWb")) {
                    if (!$util.isInteger(m.oldWb) && !(m.oldWb && $util.isInteger(m.oldWb.low) && $util.isInteger(m.oldWb.high)))
                        return "oldWb: integer|Long expected";
                }
                if (m.paramsChanged != null && m.hasOwnProperty("paramsChanged")) {
                    if (!$util.isInteger(m.paramsChanged))
                        return "paramsChanged: integer expected";
                }
                if (m.updateBw != null && m.hasOwnProperty("updateBw")) {
                    if (!$util.isInteger(m.updateBw))
                        return "updateBw: integer expected";
                }
                return null;
            };

            /**
             * Creates a MdpCompareBwFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MdpCompareBwFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MdpCompareBwFtraceEvent} MdpCompareBwFtraceEvent
             */
            MdpCompareBwFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MdpCompareBwFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MdpCompareBwFtraceEvent();
                if (d.newAb != null) {
                    if ($util.Long)
                        (m.newAb = $util.Long.fromValue(d.newAb)).unsigned = true;
                    else if (typeof d.newAb === "string")
                        m.newAb = parseInt(d.newAb, 10);
                    else if (typeof d.newAb === "number")
                        m.newAb = d.newAb;
                    else if (typeof d.newAb === "object")
                        m.newAb = new $util.LongBits(d.newAb.low >>> 0, d.newAb.high >>> 0).toNumber(true);
                }
                if (d.newIb != null) {
                    if ($util.Long)
                        (m.newIb = $util.Long.fromValue(d.newIb)).unsigned = true;
                    else if (typeof d.newIb === "string")
                        m.newIb = parseInt(d.newIb, 10);
                    else if (typeof d.newIb === "number")
                        m.newIb = d.newIb;
                    else if (typeof d.newIb === "object")
                        m.newIb = new $util.LongBits(d.newIb.low >>> 0, d.newIb.high >>> 0).toNumber(true);
                }
                if (d.newWb != null) {
                    if ($util.Long)
                        (m.newWb = $util.Long.fromValue(d.newWb)).unsigned = true;
                    else if (typeof d.newWb === "string")
                        m.newWb = parseInt(d.newWb, 10);
                    else if (typeof d.newWb === "number")
                        m.newWb = d.newWb;
                    else if (typeof d.newWb === "object")
                        m.newWb = new $util.LongBits(d.newWb.low >>> 0, d.newWb.high >>> 0).toNumber(true);
                }
                if (d.oldAb != null) {
                    if ($util.Long)
                        (m.oldAb = $util.Long.fromValue(d.oldAb)).unsigned = true;
                    else if (typeof d.oldAb === "string")
                        m.oldAb = parseInt(d.oldAb, 10);
                    else if (typeof d.oldAb === "number")
                        m.oldAb = d.oldAb;
                    else if (typeof d.oldAb === "object")
                        m.oldAb = new $util.LongBits(d.oldAb.low >>> 0, d.oldAb.high >>> 0).toNumber(true);
                }
                if (d.oldIb != null) {
                    if ($util.Long)
                        (m.oldIb = $util.Long.fromValue(d.oldIb)).unsigned = true;
                    else if (typeof d.oldIb === "string")
                        m.oldIb = parseInt(d.oldIb, 10);
                    else if (typeof d.oldIb === "number")
                        m.oldIb = d.oldIb;
                    else if (typeof d.oldIb === "object")
                        m.oldIb = new $util.LongBits(d.oldIb.low >>> 0, d.oldIb.high >>> 0).toNumber(true);
                }
                if (d.oldWb != null) {
                    if ($util.Long)
                        (m.oldWb = $util.Long.fromValue(d.oldWb)).unsigned = true;
                    else if (typeof d.oldWb === "string")
                        m.oldWb = parseInt(d.oldWb, 10);
                    else if (typeof d.oldWb === "number")
                        m.oldWb = d.oldWb;
                    else if (typeof d.oldWb === "object")
                        m.oldWb = new $util.LongBits(d.oldWb.low >>> 0, d.oldWb.high >>> 0).toNumber(true);
                }
                if (d.paramsChanged != null) {
                    m.paramsChanged = d.paramsChanged >>> 0;
                }
                if (d.updateBw != null) {
                    m.updateBw = d.updateBw >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MdpCompareBwFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MdpCompareBwFtraceEvent
             * @static
             * @param {perfetto.protos.MdpCompareBwFtraceEvent} m MdpCompareBwFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MdpCompareBwFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.newAb = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.newAb = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.newIb = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.newIb = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.newWb = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.newWb = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.oldAb = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.oldAb = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.oldIb = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.oldIb = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.oldWb = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.oldWb = o.longs === String ? "0" : 0;
                    d.paramsChanged = 0;
                    d.updateBw = 0;
                }
                if (m.newAb != null && m.hasOwnProperty("newAb")) {
                    if (typeof m.newAb === "number")
                        d.newAb = o.longs === String ? String(m.newAb) : m.newAb;
                    else
                        d.newAb = o.longs === String ? $util.Long.prototype.toString.call(m.newAb) : o.longs === Number ? new $util.LongBits(m.newAb.low >>> 0, m.newAb.high >>> 0).toNumber(true) : m.newAb;
                }
                if (m.newIb != null && m.hasOwnProperty("newIb")) {
                    if (typeof m.newIb === "number")
                        d.newIb = o.longs === String ? String(m.newIb) : m.newIb;
                    else
                        d.newIb = o.longs === String ? $util.Long.prototype.toString.call(m.newIb) : o.longs === Number ? new $util.LongBits(m.newIb.low >>> 0, m.newIb.high >>> 0).toNumber(true) : m.newIb;
                }
                if (m.newWb != null && m.hasOwnProperty("newWb")) {
                    if (typeof m.newWb === "number")
                        d.newWb = o.longs === String ? String(m.newWb) : m.newWb;
                    else
                        d.newWb = o.longs === String ? $util.Long.prototype.toString.call(m.newWb) : o.longs === Number ? new $util.LongBits(m.newWb.low >>> 0, m.newWb.high >>> 0).toNumber(true) : m.newWb;
                }
                if (m.oldAb != null && m.hasOwnProperty("oldAb")) {
                    if (typeof m.oldAb === "number")
                        d.oldAb = o.longs === String ? String(m.oldAb) : m.oldAb;
                    else
                        d.oldAb = o.longs === String ? $util.Long.prototype.toString.call(m.oldAb) : o.longs === Number ? new $util.LongBits(m.oldAb.low >>> 0, m.oldAb.high >>> 0).toNumber(true) : m.oldAb;
                }
                if (m.oldIb != null && m.hasOwnProperty("oldIb")) {
                    if (typeof m.oldIb === "number")
                        d.oldIb = o.longs === String ? String(m.oldIb) : m.oldIb;
                    else
                        d.oldIb = o.longs === String ? $util.Long.prototype.toString.call(m.oldIb) : o.longs === Number ? new $util.LongBits(m.oldIb.low >>> 0, m.oldIb.high >>> 0).toNumber(true) : m.oldIb;
                }
                if (m.oldWb != null && m.hasOwnProperty("oldWb")) {
                    if (typeof m.oldWb === "number")
                        d.oldWb = o.longs === String ? String(m.oldWb) : m.oldWb;
                    else
                        d.oldWb = o.longs === String ? $util.Long.prototype.toString.call(m.oldWb) : o.longs === Number ? new $util.LongBits(m.oldWb.low >>> 0, m.oldWb.high >>> 0).toNumber(true) : m.oldWb;
                }
                if (m.paramsChanged != null && m.hasOwnProperty("paramsChanged")) {
                    d.paramsChanged = m.paramsChanged;
                }
                if (m.updateBw != null && m.hasOwnProperty("updateBw")) {
                    d.updateBw = m.updateBw;
                }
                return d;
            };

            /**
             * Converts this MdpCompareBwFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MdpCompareBwFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MdpCompareBwFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MdpCompareBwFtraceEvent;
        })();

        protos.MdpPerfSetPanicLutsFtraceEvent = (function() {

            /**
             * Properties of a MdpPerfSetPanicLutsFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMdpPerfSetPanicLutsFtraceEvent
             * @property {number|null} [pnum] MdpPerfSetPanicLutsFtraceEvent pnum
             * @property {number|null} [fmt] MdpPerfSetPanicLutsFtraceEvent fmt
             * @property {number|null} [mode] MdpPerfSetPanicLutsFtraceEvent mode
             * @property {number|null} [panicLut] MdpPerfSetPanicLutsFtraceEvent panicLut
             * @property {number|null} [robustLut] MdpPerfSetPanicLutsFtraceEvent robustLut
             */

            /**
             * Constructs a new MdpPerfSetPanicLutsFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MdpPerfSetPanicLutsFtraceEvent.
             * @implements IMdpPerfSetPanicLutsFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMdpPerfSetPanicLutsFtraceEvent=} [p] Properties to set
             */
            function MdpPerfSetPanicLutsFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MdpPerfSetPanicLutsFtraceEvent pnum.
             * @member {number} pnum
             * @memberof perfetto.protos.MdpPerfSetPanicLutsFtraceEvent
             * @instance
             */
            MdpPerfSetPanicLutsFtraceEvent.prototype.pnum = 0;

            /**
             * MdpPerfSetPanicLutsFtraceEvent fmt.
             * @member {number} fmt
             * @memberof perfetto.protos.MdpPerfSetPanicLutsFtraceEvent
             * @instance
             */
            MdpPerfSetPanicLutsFtraceEvent.prototype.fmt = 0;

            /**
             * MdpPerfSetPanicLutsFtraceEvent mode.
             * @member {number} mode
             * @memberof perfetto.protos.MdpPerfSetPanicLutsFtraceEvent
             * @instance
             */
            MdpPerfSetPanicLutsFtraceEvent.prototype.mode = 0;

            /**
             * MdpPerfSetPanicLutsFtraceEvent panicLut.
             * @member {number} panicLut
             * @memberof perfetto.protos.MdpPerfSetPanicLutsFtraceEvent
             * @instance
             */
            MdpPerfSetPanicLutsFtraceEvent.prototype.panicLut = 0;

            /**
             * MdpPerfSetPanicLutsFtraceEvent robustLut.
             * @member {number} robustLut
             * @memberof perfetto.protos.MdpPerfSetPanicLutsFtraceEvent
             * @instance
             */
            MdpPerfSetPanicLutsFtraceEvent.prototype.robustLut = 0;

            /**
             * Creates a new MdpPerfSetPanicLutsFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MdpPerfSetPanicLutsFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpPerfSetPanicLutsFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MdpPerfSetPanicLutsFtraceEvent} MdpPerfSetPanicLutsFtraceEvent instance
             */
            MdpPerfSetPanicLutsFtraceEvent.create = function create(properties) {
                return new MdpPerfSetPanicLutsFtraceEvent(properties);
            };

            /**
             * Encodes the specified MdpPerfSetPanicLutsFtraceEvent message. Does not implicitly {@link perfetto.protos.MdpPerfSetPanicLutsFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MdpPerfSetPanicLutsFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpPerfSetPanicLutsFtraceEvent} m MdpPerfSetPanicLutsFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpPerfSetPanicLutsFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.pnum != null && Object.hasOwnProperty.call(m, "pnum"))
                    w.uint32(8).uint32(m.pnum);
                if (m.fmt != null && Object.hasOwnProperty.call(m, "fmt"))
                    w.uint32(16).uint32(m.fmt);
                if (m.mode != null && Object.hasOwnProperty.call(m, "mode"))
                    w.uint32(24).uint32(m.mode);
                if (m.panicLut != null && Object.hasOwnProperty.call(m, "panicLut"))
                    w.uint32(32).uint32(m.panicLut);
                if (m.robustLut != null && Object.hasOwnProperty.call(m, "robustLut"))
                    w.uint32(40).uint32(m.robustLut);
                return w;
            };

            /**
             * Encodes the specified MdpPerfSetPanicLutsFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MdpPerfSetPanicLutsFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MdpPerfSetPanicLutsFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpPerfSetPanicLutsFtraceEvent} message MdpPerfSetPanicLutsFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpPerfSetPanicLutsFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MdpPerfSetPanicLutsFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MdpPerfSetPanicLutsFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MdpPerfSetPanicLutsFtraceEvent} MdpPerfSetPanicLutsFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpPerfSetPanicLutsFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MdpPerfSetPanicLutsFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.pnum = r.uint32();
                        break;
                    case 2:
                        m.fmt = r.uint32();
                        break;
                    case 3:
                        m.mode = r.uint32();
                        break;
                    case 4:
                        m.panicLut = r.uint32();
                        break;
                    case 5:
                        m.robustLut = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MdpPerfSetPanicLutsFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MdpPerfSetPanicLutsFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MdpPerfSetPanicLutsFtraceEvent} MdpPerfSetPanicLutsFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpPerfSetPanicLutsFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MdpPerfSetPanicLutsFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MdpPerfSetPanicLutsFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MdpPerfSetPanicLutsFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.pnum != null && m.hasOwnProperty("pnum")) {
                    if (!$util.isInteger(m.pnum))
                        return "pnum: integer expected";
                }
                if (m.fmt != null && m.hasOwnProperty("fmt")) {
                    if (!$util.isInteger(m.fmt))
                        return "fmt: integer expected";
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    if (!$util.isInteger(m.mode))
                        return "mode: integer expected";
                }
                if (m.panicLut != null && m.hasOwnProperty("panicLut")) {
                    if (!$util.isInteger(m.panicLut))
                        return "panicLut: integer expected";
                }
                if (m.robustLut != null && m.hasOwnProperty("robustLut")) {
                    if (!$util.isInteger(m.robustLut))
                        return "robustLut: integer expected";
                }
                return null;
            };

            /**
             * Creates a MdpPerfSetPanicLutsFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MdpPerfSetPanicLutsFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MdpPerfSetPanicLutsFtraceEvent} MdpPerfSetPanicLutsFtraceEvent
             */
            MdpPerfSetPanicLutsFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MdpPerfSetPanicLutsFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MdpPerfSetPanicLutsFtraceEvent();
                if (d.pnum != null) {
                    m.pnum = d.pnum >>> 0;
                }
                if (d.fmt != null) {
                    m.fmt = d.fmt >>> 0;
                }
                if (d.mode != null) {
                    m.mode = d.mode >>> 0;
                }
                if (d.panicLut != null) {
                    m.panicLut = d.panicLut >>> 0;
                }
                if (d.robustLut != null) {
                    m.robustLut = d.robustLut >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MdpPerfSetPanicLutsFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MdpPerfSetPanicLutsFtraceEvent
             * @static
             * @param {perfetto.protos.MdpPerfSetPanicLutsFtraceEvent} m MdpPerfSetPanicLutsFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MdpPerfSetPanicLutsFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.pnum = 0;
                    d.fmt = 0;
                    d.mode = 0;
                    d.panicLut = 0;
                    d.robustLut = 0;
                }
                if (m.pnum != null && m.hasOwnProperty("pnum")) {
                    d.pnum = m.pnum;
                }
                if (m.fmt != null && m.hasOwnProperty("fmt")) {
                    d.fmt = m.fmt;
                }
                if (m.mode != null && m.hasOwnProperty("mode")) {
                    d.mode = m.mode;
                }
                if (m.panicLut != null && m.hasOwnProperty("panicLut")) {
                    d.panicLut = m.panicLut;
                }
                if (m.robustLut != null && m.hasOwnProperty("robustLut")) {
                    d.robustLut = m.robustLut;
                }
                return d;
            };

            /**
             * Converts this MdpPerfSetPanicLutsFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MdpPerfSetPanicLutsFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MdpPerfSetPanicLutsFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MdpPerfSetPanicLutsFtraceEvent;
        })();

        protos.MdpSsppSetFtraceEvent = (function() {

            /**
             * Properties of a MdpSsppSetFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMdpSsppSetFtraceEvent
             * @property {number|null} [num] MdpSsppSetFtraceEvent num
             * @property {number|null} [playCnt] MdpSsppSetFtraceEvent playCnt
             * @property {number|null} [mixer] MdpSsppSetFtraceEvent mixer
             * @property {number|null} [stage] MdpSsppSetFtraceEvent stage
             * @property {number|null} [flags] MdpSsppSetFtraceEvent flags
             * @property {number|null} [format] MdpSsppSetFtraceEvent format
             * @property {number|null} [imgW] MdpSsppSetFtraceEvent imgW
             * @property {number|null} [imgH] MdpSsppSetFtraceEvent imgH
             * @property {number|null} [srcX] MdpSsppSetFtraceEvent srcX
             * @property {number|null} [srcY] MdpSsppSetFtraceEvent srcY
             * @property {number|null} [srcW] MdpSsppSetFtraceEvent srcW
             * @property {number|null} [srcH] MdpSsppSetFtraceEvent srcH
             * @property {number|null} [dstX] MdpSsppSetFtraceEvent dstX
             * @property {number|null} [dstY] MdpSsppSetFtraceEvent dstY
             * @property {number|null} [dstW] MdpSsppSetFtraceEvent dstW
             * @property {number|null} [dstH] MdpSsppSetFtraceEvent dstH
             */

            /**
             * Constructs a new MdpSsppSetFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MdpSsppSetFtraceEvent.
             * @implements IMdpSsppSetFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMdpSsppSetFtraceEvent=} [p] Properties to set
             */
            function MdpSsppSetFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MdpSsppSetFtraceEvent num.
             * @member {number} num
             * @memberof perfetto.protos.MdpSsppSetFtraceEvent
             * @instance
             */
            MdpSsppSetFtraceEvent.prototype.num = 0;

            /**
             * MdpSsppSetFtraceEvent playCnt.
             * @member {number} playCnt
             * @memberof perfetto.protos.MdpSsppSetFtraceEvent
             * @instance
             */
            MdpSsppSetFtraceEvent.prototype.playCnt = 0;

            /**
             * MdpSsppSetFtraceEvent mixer.
             * @member {number} mixer
             * @memberof perfetto.protos.MdpSsppSetFtraceEvent
             * @instance
             */
            MdpSsppSetFtraceEvent.prototype.mixer = 0;

            /**
             * MdpSsppSetFtraceEvent stage.
             * @member {number} stage
             * @memberof perfetto.protos.MdpSsppSetFtraceEvent
             * @instance
             */
            MdpSsppSetFtraceEvent.prototype.stage = 0;

            /**
             * MdpSsppSetFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.MdpSsppSetFtraceEvent
             * @instance
             */
            MdpSsppSetFtraceEvent.prototype.flags = 0;

            /**
             * MdpSsppSetFtraceEvent format.
             * @member {number} format
             * @memberof perfetto.protos.MdpSsppSetFtraceEvent
             * @instance
             */
            MdpSsppSetFtraceEvent.prototype.format = 0;

            /**
             * MdpSsppSetFtraceEvent imgW.
             * @member {number} imgW
             * @memberof perfetto.protos.MdpSsppSetFtraceEvent
             * @instance
             */
            MdpSsppSetFtraceEvent.prototype.imgW = 0;

            /**
             * MdpSsppSetFtraceEvent imgH.
             * @member {number} imgH
             * @memberof perfetto.protos.MdpSsppSetFtraceEvent
             * @instance
             */
            MdpSsppSetFtraceEvent.prototype.imgH = 0;

            /**
             * MdpSsppSetFtraceEvent srcX.
             * @member {number} srcX
             * @memberof perfetto.protos.MdpSsppSetFtraceEvent
             * @instance
             */
            MdpSsppSetFtraceEvent.prototype.srcX = 0;

            /**
             * MdpSsppSetFtraceEvent srcY.
             * @member {number} srcY
             * @memberof perfetto.protos.MdpSsppSetFtraceEvent
             * @instance
             */
            MdpSsppSetFtraceEvent.prototype.srcY = 0;

            /**
             * MdpSsppSetFtraceEvent srcW.
             * @member {number} srcW
             * @memberof perfetto.protos.MdpSsppSetFtraceEvent
             * @instance
             */
            MdpSsppSetFtraceEvent.prototype.srcW = 0;

            /**
             * MdpSsppSetFtraceEvent srcH.
             * @member {number} srcH
             * @memberof perfetto.protos.MdpSsppSetFtraceEvent
             * @instance
             */
            MdpSsppSetFtraceEvent.prototype.srcH = 0;

            /**
             * MdpSsppSetFtraceEvent dstX.
             * @member {number} dstX
             * @memberof perfetto.protos.MdpSsppSetFtraceEvent
             * @instance
             */
            MdpSsppSetFtraceEvent.prototype.dstX = 0;

            /**
             * MdpSsppSetFtraceEvent dstY.
             * @member {number} dstY
             * @memberof perfetto.protos.MdpSsppSetFtraceEvent
             * @instance
             */
            MdpSsppSetFtraceEvent.prototype.dstY = 0;

            /**
             * MdpSsppSetFtraceEvent dstW.
             * @member {number} dstW
             * @memberof perfetto.protos.MdpSsppSetFtraceEvent
             * @instance
             */
            MdpSsppSetFtraceEvent.prototype.dstW = 0;

            /**
             * MdpSsppSetFtraceEvent dstH.
             * @member {number} dstH
             * @memberof perfetto.protos.MdpSsppSetFtraceEvent
             * @instance
             */
            MdpSsppSetFtraceEvent.prototype.dstH = 0;

            /**
             * Creates a new MdpSsppSetFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MdpSsppSetFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpSsppSetFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MdpSsppSetFtraceEvent} MdpSsppSetFtraceEvent instance
             */
            MdpSsppSetFtraceEvent.create = function create(properties) {
                return new MdpSsppSetFtraceEvent(properties);
            };

            /**
             * Encodes the specified MdpSsppSetFtraceEvent message. Does not implicitly {@link perfetto.protos.MdpSsppSetFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MdpSsppSetFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpSsppSetFtraceEvent} m MdpSsppSetFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpSsppSetFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.num != null && Object.hasOwnProperty.call(m, "num"))
                    w.uint32(8).uint32(m.num);
                if (m.playCnt != null && Object.hasOwnProperty.call(m, "playCnt"))
                    w.uint32(16).uint32(m.playCnt);
                if (m.mixer != null && Object.hasOwnProperty.call(m, "mixer"))
                    w.uint32(24).uint32(m.mixer);
                if (m.stage != null && Object.hasOwnProperty.call(m, "stage"))
                    w.uint32(32).uint32(m.stage);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(40).uint32(m.flags);
                if (m.format != null && Object.hasOwnProperty.call(m, "format"))
                    w.uint32(48).uint32(m.format);
                if (m.imgW != null && Object.hasOwnProperty.call(m, "imgW"))
                    w.uint32(56).uint32(m.imgW);
                if (m.imgH != null && Object.hasOwnProperty.call(m, "imgH"))
                    w.uint32(64).uint32(m.imgH);
                if (m.srcX != null && Object.hasOwnProperty.call(m, "srcX"))
                    w.uint32(72).uint32(m.srcX);
                if (m.srcY != null && Object.hasOwnProperty.call(m, "srcY"))
                    w.uint32(80).uint32(m.srcY);
                if (m.srcW != null && Object.hasOwnProperty.call(m, "srcW"))
                    w.uint32(88).uint32(m.srcW);
                if (m.srcH != null && Object.hasOwnProperty.call(m, "srcH"))
                    w.uint32(96).uint32(m.srcH);
                if (m.dstX != null && Object.hasOwnProperty.call(m, "dstX"))
                    w.uint32(104).uint32(m.dstX);
                if (m.dstY != null && Object.hasOwnProperty.call(m, "dstY"))
                    w.uint32(112).uint32(m.dstY);
                if (m.dstW != null && Object.hasOwnProperty.call(m, "dstW"))
                    w.uint32(120).uint32(m.dstW);
                if (m.dstH != null && Object.hasOwnProperty.call(m, "dstH"))
                    w.uint32(128).uint32(m.dstH);
                return w;
            };

            /**
             * Encodes the specified MdpSsppSetFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MdpSsppSetFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MdpSsppSetFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpSsppSetFtraceEvent} message MdpSsppSetFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpSsppSetFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MdpSsppSetFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MdpSsppSetFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MdpSsppSetFtraceEvent} MdpSsppSetFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpSsppSetFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MdpSsppSetFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.num = r.uint32();
                        break;
                    case 2:
                        m.playCnt = r.uint32();
                        break;
                    case 3:
                        m.mixer = r.uint32();
                        break;
                    case 4:
                        m.stage = r.uint32();
                        break;
                    case 5:
                        m.flags = r.uint32();
                        break;
                    case 6:
                        m.format = r.uint32();
                        break;
                    case 7:
                        m.imgW = r.uint32();
                        break;
                    case 8:
                        m.imgH = r.uint32();
                        break;
                    case 9:
                        m.srcX = r.uint32();
                        break;
                    case 10:
                        m.srcY = r.uint32();
                        break;
                    case 11:
                        m.srcW = r.uint32();
                        break;
                    case 12:
                        m.srcH = r.uint32();
                        break;
                    case 13:
                        m.dstX = r.uint32();
                        break;
                    case 14:
                        m.dstY = r.uint32();
                        break;
                    case 15:
                        m.dstW = r.uint32();
                        break;
                    case 16:
                        m.dstH = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MdpSsppSetFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MdpSsppSetFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MdpSsppSetFtraceEvent} MdpSsppSetFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpSsppSetFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MdpSsppSetFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MdpSsppSetFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MdpSsppSetFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.num != null && m.hasOwnProperty("num")) {
                    if (!$util.isInteger(m.num))
                        return "num: integer expected";
                }
                if (m.playCnt != null && m.hasOwnProperty("playCnt")) {
                    if (!$util.isInteger(m.playCnt))
                        return "playCnt: integer expected";
                }
                if (m.mixer != null && m.hasOwnProperty("mixer")) {
                    if (!$util.isInteger(m.mixer))
                        return "mixer: integer expected";
                }
                if (m.stage != null && m.hasOwnProperty("stage")) {
                    if (!$util.isInteger(m.stage))
                        return "stage: integer expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.format != null && m.hasOwnProperty("format")) {
                    if (!$util.isInteger(m.format))
                        return "format: integer expected";
                }
                if (m.imgW != null && m.hasOwnProperty("imgW")) {
                    if (!$util.isInteger(m.imgW))
                        return "imgW: integer expected";
                }
                if (m.imgH != null && m.hasOwnProperty("imgH")) {
                    if (!$util.isInteger(m.imgH))
                        return "imgH: integer expected";
                }
                if (m.srcX != null && m.hasOwnProperty("srcX")) {
                    if (!$util.isInteger(m.srcX))
                        return "srcX: integer expected";
                }
                if (m.srcY != null && m.hasOwnProperty("srcY")) {
                    if (!$util.isInteger(m.srcY))
                        return "srcY: integer expected";
                }
                if (m.srcW != null && m.hasOwnProperty("srcW")) {
                    if (!$util.isInteger(m.srcW))
                        return "srcW: integer expected";
                }
                if (m.srcH != null && m.hasOwnProperty("srcH")) {
                    if (!$util.isInteger(m.srcH))
                        return "srcH: integer expected";
                }
                if (m.dstX != null && m.hasOwnProperty("dstX")) {
                    if (!$util.isInteger(m.dstX))
                        return "dstX: integer expected";
                }
                if (m.dstY != null && m.hasOwnProperty("dstY")) {
                    if (!$util.isInteger(m.dstY))
                        return "dstY: integer expected";
                }
                if (m.dstW != null && m.hasOwnProperty("dstW")) {
                    if (!$util.isInteger(m.dstW))
                        return "dstW: integer expected";
                }
                if (m.dstH != null && m.hasOwnProperty("dstH")) {
                    if (!$util.isInteger(m.dstH))
                        return "dstH: integer expected";
                }
                return null;
            };

            /**
             * Creates a MdpSsppSetFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MdpSsppSetFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MdpSsppSetFtraceEvent} MdpSsppSetFtraceEvent
             */
            MdpSsppSetFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MdpSsppSetFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MdpSsppSetFtraceEvent();
                if (d.num != null) {
                    m.num = d.num >>> 0;
                }
                if (d.playCnt != null) {
                    m.playCnt = d.playCnt >>> 0;
                }
                if (d.mixer != null) {
                    m.mixer = d.mixer >>> 0;
                }
                if (d.stage != null) {
                    m.stage = d.stage >>> 0;
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                if (d.format != null) {
                    m.format = d.format >>> 0;
                }
                if (d.imgW != null) {
                    m.imgW = d.imgW >>> 0;
                }
                if (d.imgH != null) {
                    m.imgH = d.imgH >>> 0;
                }
                if (d.srcX != null) {
                    m.srcX = d.srcX >>> 0;
                }
                if (d.srcY != null) {
                    m.srcY = d.srcY >>> 0;
                }
                if (d.srcW != null) {
                    m.srcW = d.srcW >>> 0;
                }
                if (d.srcH != null) {
                    m.srcH = d.srcH >>> 0;
                }
                if (d.dstX != null) {
                    m.dstX = d.dstX >>> 0;
                }
                if (d.dstY != null) {
                    m.dstY = d.dstY >>> 0;
                }
                if (d.dstW != null) {
                    m.dstW = d.dstW >>> 0;
                }
                if (d.dstH != null) {
                    m.dstH = d.dstH >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MdpSsppSetFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MdpSsppSetFtraceEvent
             * @static
             * @param {perfetto.protos.MdpSsppSetFtraceEvent} m MdpSsppSetFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MdpSsppSetFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.num = 0;
                    d.playCnt = 0;
                    d.mixer = 0;
                    d.stage = 0;
                    d.flags = 0;
                    d.format = 0;
                    d.imgW = 0;
                    d.imgH = 0;
                    d.srcX = 0;
                    d.srcY = 0;
                    d.srcW = 0;
                    d.srcH = 0;
                    d.dstX = 0;
                    d.dstY = 0;
                    d.dstW = 0;
                    d.dstH = 0;
                }
                if (m.num != null && m.hasOwnProperty("num")) {
                    d.num = m.num;
                }
                if (m.playCnt != null && m.hasOwnProperty("playCnt")) {
                    d.playCnt = m.playCnt;
                }
                if (m.mixer != null && m.hasOwnProperty("mixer")) {
                    d.mixer = m.mixer;
                }
                if (m.stage != null && m.hasOwnProperty("stage")) {
                    d.stage = m.stage;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.format != null && m.hasOwnProperty("format")) {
                    d.format = m.format;
                }
                if (m.imgW != null && m.hasOwnProperty("imgW")) {
                    d.imgW = m.imgW;
                }
                if (m.imgH != null && m.hasOwnProperty("imgH")) {
                    d.imgH = m.imgH;
                }
                if (m.srcX != null && m.hasOwnProperty("srcX")) {
                    d.srcX = m.srcX;
                }
                if (m.srcY != null && m.hasOwnProperty("srcY")) {
                    d.srcY = m.srcY;
                }
                if (m.srcW != null && m.hasOwnProperty("srcW")) {
                    d.srcW = m.srcW;
                }
                if (m.srcH != null && m.hasOwnProperty("srcH")) {
                    d.srcH = m.srcH;
                }
                if (m.dstX != null && m.hasOwnProperty("dstX")) {
                    d.dstX = m.dstX;
                }
                if (m.dstY != null && m.hasOwnProperty("dstY")) {
                    d.dstY = m.dstY;
                }
                if (m.dstW != null && m.hasOwnProperty("dstW")) {
                    d.dstW = m.dstW;
                }
                if (m.dstH != null && m.hasOwnProperty("dstH")) {
                    d.dstH = m.dstH;
                }
                return d;
            };

            /**
             * Converts this MdpSsppSetFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MdpSsppSetFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MdpSsppSetFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MdpSsppSetFtraceEvent;
        })();

        protos.MdpCmdReadptrDoneFtraceEvent = (function() {

            /**
             * Properties of a MdpCmdReadptrDoneFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMdpCmdReadptrDoneFtraceEvent
             * @property {number|null} [ctlNum] MdpCmdReadptrDoneFtraceEvent ctlNum
             * @property {number|null} [koffCnt] MdpCmdReadptrDoneFtraceEvent koffCnt
             */

            /**
             * Constructs a new MdpCmdReadptrDoneFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MdpCmdReadptrDoneFtraceEvent.
             * @implements IMdpCmdReadptrDoneFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMdpCmdReadptrDoneFtraceEvent=} [p] Properties to set
             */
            function MdpCmdReadptrDoneFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MdpCmdReadptrDoneFtraceEvent ctlNum.
             * @member {number} ctlNum
             * @memberof perfetto.protos.MdpCmdReadptrDoneFtraceEvent
             * @instance
             */
            MdpCmdReadptrDoneFtraceEvent.prototype.ctlNum = 0;

            /**
             * MdpCmdReadptrDoneFtraceEvent koffCnt.
             * @member {number} koffCnt
             * @memberof perfetto.protos.MdpCmdReadptrDoneFtraceEvent
             * @instance
             */
            MdpCmdReadptrDoneFtraceEvent.prototype.koffCnt = 0;

            /**
             * Creates a new MdpCmdReadptrDoneFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MdpCmdReadptrDoneFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpCmdReadptrDoneFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MdpCmdReadptrDoneFtraceEvent} MdpCmdReadptrDoneFtraceEvent instance
             */
            MdpCmdReadptrDoneFtraceEvent.create = function create(properties) {
                return new MdpCmdReadptrDoneFtraceEvent(properties);
            };

            /**
             * Encodes the specified MdpCmdReadptrDoneFtraceEvent message. Does not implicitly {@link perfetto.protos.MdpCmdReadptrDoneFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MdpCmdReadptrDoneFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpCmdReadptrDoneFtraceEvent} m MdpCmdReadptrDoneFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpCmdReadptrDoneFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.ctlNum != null && Object.hasOwnProperty.call(m, "ctlNum"))
                    w.uint32(8).uint32(m.ctlNum);
                if (m.koffCnt != null && Object.hasOwnProperty.call(m, "koffCnt"))
                    w.uint32(16).int32(m.koffCnt);
                return w;
            };

            /**
             * Encodes the specified MdpCmdReadptrDoneFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MdpCmdReadptrDoneFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MdpCmdReadptrDoneFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpCmdReadptrDoneFtraceEvent} message MdpCmdReadptrDoneFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpCmdReadptrDoneFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MdpCmdReadptrDoneFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MdpCmdReadptrDoneFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MdpCmdReadptrDoneFtraceEvent} MdpCmdReadptrDoneFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpCmdReadptrDoneFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MdpCmdReadptrDoneFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.ctlNum = r.uint32();
                        break;
                    case 2:
                        m.koffCnt = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MdpCmdReadptrDoneFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MdpCmdReadptrDoneFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MdpCmdReadptrDoneFtraceEvent} MdpCmdReadptrDoneFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpCmdReadptrDoneFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MdpCmdReadptrDoneFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MdpCmdReadptrDoneFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MdpCmdReadptrDoneFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.ctlNum != null && m.hasOwnProperty("ctlNum")) {
                    if (!$util.isInteger(m.ctlNum))
                        return "ctlNum: integer expected";
                }
                if (m.koffCnt != null && m.hasOwnProperty("koffCnt")) {
                    if (!$util.isInteger(m.koffCnt))
                        return "koffCnt: integer expected";
                }
                return null;
            };

            /**
             * Creates a MdpCmdReadptrDoneFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MdpCmdReadptrDoneFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MdpCmdReadptrDoneFtraceEvent} MdpCmdReadptrDoneFtraceEvent
             */
            MdpCmdReadptrDoneFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MdpCmdReadptrDoneFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MdpCmdReadptrDoneFtraceEvent();
                if (d.ctlNum != null) {
                    m.ctlNum = d.ctlNum >>> 0;
                }
                if (d.koffCnt != null) {
                    m.koffCnt = d.koffCnt | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MdpCmdReadptrDoneFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MdpCmdReadptrDoneFtraceEvent
             * @static
             * @param {perfetto.protos.MdpCmdReadptrDoneFtraceEvent} m MdpCmdReadptrDoneFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MdpCmdReadptrDoneFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.ctlNum = 0;
                    d.koffCnt = 0;
                }
                if (m.ctlNum != null && m.hasOwnProperty("ctlNum")) {
                    d.ctlNum = m.ctlNum;
                }
                if (m.koffCnt != null && m.hasOwnProperty("koffCnt")) {
                    d.koffCnt = m.koffCnt;
                }
                return d;
            };

            /**
             * Converts this MdpCmdReadptrDoneFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MdpCmdReadptrDoneFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MdpCmdReadptrDoneFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MdpCmdReadptrDoneFtraceEvent;
        })();

        protos.MdpMisrCrcFtraceEvent = (function() {

            /**
             * Properties of a MdpMisrCrcFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMdpMisrCrcFtraceEvent
             * @property {number|null} [blockId] MdpMisrCrcFtraceEvent blockId
             * @property {number|null} [vsyncCnt] MdpMisrCrcFtraceEvent vsyncCnt
             * @property {number|null} [crc] MdpMisrCrcFtraceEvent crc
             */

            /**
             * Constructs a new MdpMisrCrcFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MdpMisrCrcFtraceEvent.
             * @implements IMdpMisrCrcFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMdpMisrCrcFtraceEvent=} [p] Properties to set
             */
            function MdpMisrCrcFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MdpMisrCrcFtraceEvent blockId.
             * @member {number} blockId
             * @memberof perfetto.protos.MdpMisrCrcFtraceEvent
             * @instance
             */
            MdpMisrCrcFtraceEvent.prototype.blockId = 0;

            /**
             * MdpMisrCrcFtraceEvent vsyncCnt.
             * @member {number} vsyncCnt
             * @memberof perfetto.protos.MdpMisrCrcFtraceEvent
             * @instance
             */
            MdpMisrCrcFtraceEvent.prototype.vsyncCnt = 0;

            /**
             * MdpMisrCrcFtraceEvent crc.
             * @member {number} crc
             * @memberof perfetto.protos.MdpMisrCrcFtraceEvent
             * @instance
             */
            MdpMisrCrcFtraceEvent.prototype.crc = 0;

            /**
             * Creates a new MdpMisrCrcFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MdpMisrCrcFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpMisrCrcFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MdpMisrCrcFtraceEvent} MdpMisrCrcFtraceEvent instance
             */
            MdpMisrCrcFtraceEvent.create = function create(properties) {
                return new MdpMisrCrcFtraceEvent(properties);
            };

            /**
             * Encodes the specified MdpMisrCrcFtraceEvent message. Does not implicitly {@link perfetto.protos.MdpMisrCrcFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MdpMisrCrcFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpMisrCrcFtraceEvent} m MdpMisrCrcFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpMisrCrcFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.blockId != null && Object.hasOwnProperty.call(m, "blockId"))
                    w.uint32(8).uint32(m.blockId);
                if (m.vsyncCnt != null && Object.hasOwnProperty.call(m, "vsyncCnt"))
                    w.uint32(16).uint32(m.vsyncCnt);
                if (m.crc != null && Object.hasOwnProperty.call(m, "crc"))
                    w.uint32(24).uint32(m.crc);
                return w;
            };

            /**
             * Encodes the specified MdpMisrCrcFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MdpMisrCrcFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MdpMisrCrcFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpMisrCrcFtraceEvent} message MdpMisrCrcFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpMisrCrcFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MdpMisrCrcFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MdpMisrCrcFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MdpMisrCrcFtraceEvent} MdpMisrCrcFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpMisrCrcFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MdpMisrCrcFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.blockId = r.uint32();
                        break;
                    case 2:
                        m.vsyncCnt = r.uint32();
                        break;
                    case 3:
                        m.crc = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MdpMisrCrcFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MdpMisrCrcFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MdpMisrCrcFtraceEvent} MdpMisrCrcFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpMisrCrcFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MdpMisrCrcFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MdpMisrCrcFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MdpMisrCrcFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.blockId != null && m.hasOwnProperty("blockId")) {
                    if (!$util.isInteger(m.blockId))
                        return "blockId: integer expected";
                }
                if (m.vsyncCnt != null && m.hasOwnProperty("vsyncCnt")) {
                    if (!$util.isInteger(m.vsyncCnt))
                        return "vsyncCnt: integer expected";
                }
                if (m.crc != null && m.hasOwnProperty("crc")) {
                    if (!$util.isInteger(m.crc))
                        return "crc: integer expected";
                }
                return null;
            };

            /**
             * Creates a MdpMisrCrcFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MdpMisrCrcFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MdpMisrCrcFtraceEvent} MdpMisrCrcFtraceEvent
             */
            MdpMisrCrcFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MdpMisrCrcFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MdpMisrCrcFtraceEvent();
                if (d.blockId != null) {
                    m.blockId = d.blockId >>> 0;
                }
                if (d.vsyncCnt != null) {
                    m.vsyncCnt = d.vsyncCnt >>> 0;
                }
                if (d.crc != null) {
                    m.crc = d.crc >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MdpMisrCrcFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MdpMisrCrcFtraceEvent
             * @static
             * @param {perfetto.protos.MdpMisrCrcFtraceEvent} m MdpMisrCrcFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MdpMisrCrcFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.blockId = 0;
                    d.vsyncCnt = 0;
                    d.crc = 0;
                }
                if (m.blockId != null && m.hasOwnProperty("blockId")) {
                    d.blockId = m.blockId;
                }
                if (m.vsyncCnt != null && m.hasOwnProperty("vsyncCnt")) {
                    d.vsyncCnt = m.vsyncCnt;
                }
                if (m.crc != null && m.hasOwnProperty("crc")) {
                    d.crc = m.crc;
                }
                return d;
            };

            /**
             * Converts this MdpMisrCrcFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MdpMisrCrcFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MdpMisrCrcFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MdpMisrCrcFtraceEvent;
        })();

        protos.MdpPerfSetQosLutsFtraceEvent = (function() {

            /**
             * Properties of a MdpPerfSetQosLutsFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMdpPerfSetQosLutsFtraceEvent
             * @property {number|null} [pnum] MdpPerfSetQosLutsFtraceEvent pnum
             * @property {number|null} [fmt] MdpPerfSetQosLutsFtraceEvent fmt
             * @property {number|null} [intf] MdpPerfSetQosLutsFtraceEvent intf
             * @property {number|null} [rot] MdpPerfSetQosLutsFtraceEvent rot
             * @property {number|null} [fl] MdpPerfSetQosLutsFtraceEvent fl
             * @property {number|null} [lut] MdpPerfSetQosLutsFtraceEvent lut
             * @property {number|null} [linear] MdpPerfSetQosLutsFtraceEvent linear
             */

            /**
             * Constructs a new MdpPerfSetQosLutsFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MdpPerfSetQosLutsFtraceEvent.
             * @implements IMdpPerfSetQosLutsFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMdpPerfSetQosLutsFtraceEvent=} [p] Properties to set
             */
            function MdpPerfSetQosLutsFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MdpPerfSetQosLutsFtraceEvent pnum.
             * @member {number} pnum
             * @memberof perfetto.protos.MdpPerfSetQosLutsFtraceEvent
             * @instance
             */
            MdpPerfSetQosLutsFtraceEvent.prototype.pnum = 0;

            /**
             * MdpPerfSetQosLutsFtraceEvent fmt.
             * @member {number} fmt
             * @memberof perfetto.protos.MdpPerfSetQosLutsFtraceEvent
             * @instance
             */
            MdpPerfSetQosLutsFtraceEvent.prototype.fmt = 0;

            /**
             * MdpPerfSetQosLutsFtraceEvent intf.
             * @member {number} intf
             * @memberof perfetto.protos.MdpPerfSetQosLutsFtraceEvent
             * @instance
             */
            MdpPerfSetQosLutsFtraceEvent.prototype.intf = 0;

            /**
             * MdpPerfSetQosLutsFtraceEvent rot.
             * @member {number} rot
             * @memberof perfetto.protos.MdpPerfSetQosLutsFtraceEvent
             * @instance
             */
            MdpPerfSetQosLutsFtraceEvent.prototype.rot = 0;

            /**
             * MdpPerfSetQosLutsFtraceEvent fl.
             * @member {number} fl
             * @memberof perfetto.protos.MdpPerfSetQosLutsFtraceEvent
             * @instance
             */
            MdpPerfSetQosLutsFtraceEvent.prototype.fl = 0;

            /**
             * MdpPerfSetQosLutsFtraceEvent lut.
             * @member {number} lut
             * @memberof perfetto.protos.MdpPerfSetQosLutsFtraceEvent
             * @instance
             */
            MdpPerfSetQosLutsFtraceEvent.prototype.lut = 0;

            /**
             * MdpPerfSetQosLutsFtraceEvent linear.
             * @member {number} linear
             * @memberof perfetto.protos.MdpPerfSetQosLutsFtraceEvent
             * @instance
             */
            MdpPerfSetQosLutsFtraceEvent.prototype.linear = 0;

            /**
             * Creates a new MdpPerfSetQosLutsFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MdpPerfSetQosLutsFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpPerfSetQosLutsFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MdpPerfSetQosLutsFtraceEvent} MdpPerfSetQosLutsFtraceEvent instance
             */
            MdpPerfSetQosLutsFtraceEvent.create = function create(properties) {
                return new MdpPerfSetQosLutsFtraceEvent(properties);
            };

            /**
             * Encodes the specified MdpPerfSetQosLutsFtraceEvent message. Does not implicitly {@link perfetto.protos.MdpPerfSetQosLutsFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MdpPerfSetQosLutsFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpPerfSetQosLutsFtraceEvent} m MdpPerfSetQosLutsFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpPerfSetQosLutsFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.pnum != null && Object.hasOwnProperty.call(m, "pnum"))
                    w.uint32(8).uint32(m.pnum);
                if (m.fmt != null && Object.hasOwnProperty.call(m, "fmt"))
                    w.uint32(16).uint32(m.fmt);
                if (m.intf != null && Object.hasOwnProperty.call(m, "intf"))
                    w.uint32(24).uint32(m.intf);
                if (m.rot != null && Object.hasOwnProperty.call(m, "rot"))
                    w.uint32(32).uint32(m.rot);
                if (m.fl != null && Object.hasOwnProperty.call(m, "fl"))
                    w.uint32(40).uint32(m.fl);
                if (m.lut != null && Object.hasOwnProperty.call(m, "lut"))
                    w.uint32(48).uint32(m.lut);
                if (m.linear != null && Object.hasOwnProperty.call(m, "linear"))
                    w.uint32(56).uint32(m.linear);
                return w;
            };

            /**
             * Encodes the specified MdpPerfSetQosLutsFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MdpPerfSetQosLutsFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MdpPerfSetQosLutsFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpPerfSetQosLutsFtraceEvent} message MdpPerfSetQosLutsFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpPerfSetQosLutsFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MdpPerfSetQosLutsFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MdpPerfSetQosLutsFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MdpPerfSetQosLutsFtraceEvent} MdpPerfSetQosLutsFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpPerfSetQosLutsFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MdpPerfSetQosLutsFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.pnum = r.uint32();
                        break;
                    case 2:
                        m.fmt = r.uint32();
                        break;
                    case 3:
                        m.intf = r.uint32();
                        break;
                    case 4:
                        m.rot = r.uint32();
                        break;
                    case 5:
                        m.fl = r.uint32();
                        break;
                    case 6:
                        m.lut = r.uint32();
                        break;
                    case 7:
                        m.linear = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MdpPerfSetQosLutsFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MdpPerfSetQosLutsFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MdpPerfSetQosLutsFtraceEvent} MdpPerfSetQosLutsFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpPerfSetQosLutsFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MdpPerfSetQosLutsFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MdpPerfSetQosLutsFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MdpPerfSetQosLutsFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.pnum != null && m.hasOwnProperty("pnum")) {
                    if (!$util.isInteger(m.pnum))
                        return "pnum: integer expected";
                }
                if (m.fmt != null && m.hasOwnProperty("fmt")) {
                    if (!$util.isInteger(m.fmt))
                        return "fmt: integer expected";
                }
                if (m.intf != null && m.hasOwnProperty("intf")) {
                    if (!$util.isInteger(m.intf))
                        return "intf: integer expected";
                }
                if (m.rot != null && m.hasOwnProperty("rot")) {
                    if (!$util.isInteger(m.rot))
                        return "rot: integer expected";
                }
                if (m.fl != null && m.hasOwnProperty("fl")) {
                    if (!$util.isInteger(m.fl))
                        return "fl: integer expected";
                }
                if (m.lut != null && m.hasOwnProperty("lut")) {
                    if (!$util.isInteger(m.lut))
                        return "lut: integer expected";
                }
                if (m.linear != null && m.hasOwnProperty("linear")) {
                    if (!$util.isInteger(m.linear))
                        return "linear: integer expected";
                }
                return null;
            };

            /**
             * Creates a MdpPerfSetQosLutsFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MdpPerfSetQosLutsFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MdpPerfSetQosLutsFtraceEvent} MdpPerfSetQosLutsFtraceEvent
             */
            MdpPerfSetQosLutsFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MdpPerfSetQosLutsFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MdpPerfSetQosLutsFtraceEvent();
                if (d.pnum != null) {
                    m.pnum = d.pnum >>> 0;
                }
                if (d.fmt != null) {
                    m.fmt = d.fmt >>> 0;
                }
                if (d.intf != null) {
                    m.intf = d.intf >>> 0;
                }
                if (d.rot != null) {
                    m.rot = d.rot >>> 0;
                }
                if (d.fl != null) {
                    m.fl = d.fl >>> 0;
                }
                if (d.lut != null) {
                    m.lut = d.lut >>> 0;
                }
                if (d.linear != null) {
                    m.linear = d.linear >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MdpPerfSetQosLutsFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MdpPerfSetQosLutsFtraceEvent
             * @static
             * @param {perfetto.protos.MdpPerfSetQosLutsFtraceEvent} m MdpPerfSetQosLutsFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MdpPerfSetQosLutsFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.pnum = 0;
                    d.fmt = 0;
                    d.intf = 0;
                    d.rot = 0;
                    d.fl = 0;
                    d.lut = 0;
                    d.linear = 0;
                }
                if (m.pnum != null && m.hasOwnProperty("pnum")) {
                    d.pnum = m.pnum;
                }
                if (m.fmt != null && m.hasOwnProperty("fmt")) {
                    d.fmt = m.fmt;
                }
                if (m.intf != null && m.hasOwnProperty("intf")) {
                    d.intf = m.intf;
                }
                if (m.rot != null && m.hasOwnProperty("rot")) {
                    d.rot = m.rot;
                }
                if (m.fl != null && m.hasOwnProperty("fl")) {
                    d.fl = m.fl;
                }
                if (m.lut != null && m.hasOwnProperty("lut")) {
                    d.lut = m.lut;
                }
                if (m.linear != null && m.hasOwnProperty("linear")) {
                    d.linear = m.linear;
                }
                return d;
            };

            /**
             * Converts this MdpPerfSetQosLutsFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MdpPerfSetQosLutsFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MdpPerfSetQosLutsFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MdpPerfSetQosLutsFtraceEvent;
        })();

        protos.MdpTraceCounterFtraceEvent = (function() {

            /**
             * Properties of a MdpTraceCounterFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMdpTraceCounterFtraceEvent
             * @property {number|null} [pid] MdpTraceCounterFtraceEvent pid
             * @property {string|null} [counterName] MdpTraceCounterFtraceEvent counterName
             * @property {number|null} [value] MdpTraceCounterFtraceEvent value
             */

            /**
             * Constructs a new MdpTraceCounterFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MdpTraceCounterFtraceEvent.
             * @implements IMdpTraceCounterFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMdpTraceCounterFtraceEvent=} [p] Properties to set
             */
            function MdpTraceCounterFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MdpTraceCounterFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.MdpTraceCounterFtraceEvent
             * @instance
             */
            MdpTraceCounterFtraceEvent.prototype.pid = 0;

            /**
             * MdpTraceCounterFtraceEvent counterName.
             * @member {string} counterName
             * @memberof perfetto.protos.MdpTraceCounterFtraceEvent
             * @instance
             */
            MdpTraceCounterFtraceEvent.prototype.counterName = "";

            /**
             * MdpTraceCounterFtraceEvent value.
             * @member {number} value
             * @memberof perfetto.protos.MdpTraceCounterFtraceEvent
             * @instance
             */
            MdpTraceCounterFtraceEvent.prototype.value = 0;

            /**
             * Creates a new MdpTraceCounterFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MdpTraceCounterFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpTraceCounterFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MdpTraceCounterFtraceEvent} MdpTraceCounterFtraceEvent instance
             */
            MdpTraceCounterFtraceEvent.create = function create(properties) {
                return new MdpTraceCounterFtraceEvent(properties);
            };

            /**
             * Encodes the specified MdpTraceCounterFtraceEvent message. Does not implicitly {@link perfetto.protos.MdpTraceCounterFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MdpTraceCounterFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpTraceCounterFtraceEvent} m MdpTraceCounterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpTraceCounterFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(8).int32(m.pid);
                if (m.counterName != null && Object.hasOwnProperty.call(m, "counterName"))
                    w.uint32(18).string(m.counterName);
                if (m.value != null && Object.hasOwnProperty.call(m, "value"))
                    w.uint32(24).int32(m.value);
                return w;
            };

            /**
             * Encodes the specified MdpTraceCounterFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MdpTraceCounterFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MdpTraceCounterFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpTraceCounterFtraceEvent} message MdpTraceCounterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpTraceCounterFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MdpTraceCounterFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MdpTraceCounterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MdpTraceCounterFtraceEvent} MdpTraceCounterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpTraceCounterFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MdpTraceCounterFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.pid = r.int32();
                        break;
                    case 2:
                        m.counterName = r.string();
                        break;
                    case 3:
                        m.value = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MdpTraceCounterFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MdpTraceCounterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MdpTraceCounterFtraceEvent} MdpTraceCounterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpTraceCounterFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MdpTraceCounterFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MdpTraceCounterFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MdpTraceCounterFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.counterName != null && m.hasOwnProperty("counterName")) {
                    if (!$util.isString(m.counterName))
                        return "counterName: string expected";
                }
                if (m.value != null && m.hasOwnProperty("value")) {
                    if (!$util.isInteger(m.value))
                        return "value: integer expected";
                }
                return null;
            };

            /**
             * Creates a MdpTraceCounterFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MdpTraceCounterFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MdpTraceCounterFtraceEvent} MdpTraceCounterFtraceEvent
             */
            MdpTraceCounterFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MdpTraceCounterFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MdpTraceCounterFtraceEvent();
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                if (d.counterName != null) {
                    m.counterName = String(d.counterName);
                }
                if (d.value != null) {
                    m.value = d.value | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MdpTraceCounterFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MdpTraceCounterFtraceEvent
             * @static
             * @param {perfetto.protos.MdpTraceCounterFtraceEvent} m MdpTraceCounterFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MdpTraceCounterFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.pid = 0;
                    d.counterName = "";
                    d.value = 0;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.counterName != null && m.hasOwnProperty("counterName")) {
                    d.counterName = m.counterName;
                }
                if (m.value != null && m.hasOwnProperty("value")) {
                    d.value = m.value;
                }
                return d;
            };

            /**
             * Converts this MdpTraceCounterFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MdpTraceCounterFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MdpTraceCounterFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MdpTraceCounterFtraceEvent;
        })();

        protos.MdpCmdReleaseBwFtraceEvent = (function() {

            /**
             * Properties of a MdpCmdReleaseBwFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMdpCmdReleaseBwFtraceEvent
             * @property {number|null} [ctlNum] MdpCmdReleaseBwFtraceEvent ctlNum
             */

            /**
             * Constructs a new MdpCmdReleaseBwFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MdpCmdReleaseBwFtraceEvent.
             * @implements IMdpCmdReleaseBwFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMdpCmdReleaseBwFtraceEvent=} [p] Properties to set
             */
            function MdpCmdReleaseBwFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MdpCmdReleaseBwFtraceEvent ctlNum.
             * @member {number} ctlNum
             * @memberof perfetto.protos.MdpCmdReleaseBwFtraceEvent
             * @instance
             */
            MdpCmdReleaseBwFtraceEvent.prototype.ctlNum = 0;

            /**
             * Creates a new MdpCmdReleaseBwFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MdpCmdReleaseBwFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpCmdReleaseBwFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MdpCmdReleaseBwFtraceEvent} MdpCmdReleaseBwFtraceEvent instance
             */
            MdpCmdReleaseBwFtraceEvent.create = function create(properties) {
                return new MdpCmdReleaseBwFtraceEvent(properties);
            };

            /**
             * Encodes the specified MdpCmdReleaseBwFtraceEvent message. Does not implicitly {@link perfetto.protos.MdpCmdReleaseBwFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MdpCmdReleaseBwFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpCmdReleaseBwFtraceEvent} m MdpCmdReleaseBwFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpCmdReleaseBwFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.ctlNum != null && Object.hasOwnProperty.call(m, "ctlNum"))
                    w.uint32(8).uint32(m.ctlNum);
                return w;
            };

            /**
             * Encodes the specified MdpCmdReleaseBwFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MdpCmdReleaseBwFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MdpCmdReleaseBwFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpCmdReleaseBwFtraceEvent} message MdpCmdReleaseBwFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpCmdReleaseBwFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MdpCmdReleaseBwFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MdpCmdReleaseBwFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MdpCmdReleaseBwFtraceEvent} MdpCmdReleaseBwFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpCmdReleaseBwFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MdpCmdReleaseBwFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.ctlNum = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MdpCmdReleaseBwFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MdpCmdReleaseBwFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MdpCmdReleaseBwFtraceEvent} MdpCmdReleaseBwFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpCmdReleaseBwFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MdpCmdReleaseBwFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MdpCmdReleaseBwFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MdpCmdReleaseBwFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.ctlNum != null && m.hasOwnProperty("ctlNum")) {
                    if (!$util.isInteger(m.ctlNum))
                        return "ctlNum: integer expected";
                }
                return null;
            };

            /**
             * Creates a MdpCmdReleaseBwFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MdpCmdReleaseBwFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MdpCmdReleaseBwFtraceEvent} MdpCmdReleaseBwFtraceEvent
             */
            MdpCmdReleaseBwFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MdpCmdReleaseBwFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MdpCmdReleaseBwFtraceEvent();
                if (d.ctlNum != null) {
                    m.ctlNum = d.ctlNum >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MdpCmdReleaseBwFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MdpCmdReleaseBwFtraceEvent
             * @static
             * @param {perfetto.protos.MdpCmdReleaseBwFtraceEvent} m MdpCmdReleaseBwFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MdpCmdReleaseBwFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.ctlNum = 0;
                }
                if (m.ctlNum != null && m.hasOwnProperty("ctlNum")) {
                    d.ctlNum = m.ctlNum;
                }
                return d;
            };

            /**
             * Converts this MdpCmdReleaseBwFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MdpCmdReleaseBwFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MdpCmdReleaseBwFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MdpCmdReleaseBwFtraceEvent;
        })();

        protos.MdpMixerUpdateFtraceEvent = (function() {

            /**
             * Properties of a MdpMixerUpdateFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMdpMixerUpdateFtraceEvent
             * @property {number|null} [mixerNum] MdpMixerUpdateFtraceEvent mixerNum
             */

            /**
             * Constructs a new MdpMixerUpdateFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MdpMixerUpdateFtraceEvent.
             * @implements IMdpMixerUpdateFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMdpMixerUpdateFtraceEvent=} [p] Properties to set
             */
            function MdpMixerUpdateFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MdpMixerUpdateFtraceEvent mixerNum.
             * @member {number} mixerNum
             * @memberof perfetto.protos.MdpMixerUpdateFtraceEvent
             * @instance
             */
            MdpMixerUpdateFtraceEvent.prototype.mixerNum = 0;

            /**
             * Creates a new MdpMixerUpdateFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MdpMixerUpdateFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpMixerUpdateFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MdpMixerUpdateFtraceEvent} MdpMixerUpdateFtraceEvent instance
             */
            MdpMixerUpdateFtraceEvent.create = function create(properties) {
                return new MdpMixerUpdateFtraceEvent(properties);
            };

            /**
             * Encodes the specified MdpMixerUpdateFtraceEvent message. Does not implicitly {@link perfetto.protos.MdpMixerUpdateFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MdpMixerUpdateFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpMixerUpdateFtraceEvent} m MdpMixerUpdateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpMixerUpdateFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.mixerNum != null && Object.hasOwnProperty.call(m, "mixerNum"))
                    w.uint32(8).uint32(m.mixerNum);
                return w;
            };

            /**
             * Encodes the specified MdpMixerUpdateFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MdpMixerUpdateFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MdpMixerUpdateFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpMixerUpdateFtraceEvent} message MdpMixerUpdateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpMixerUpdateFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MdpMixerUpdateFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MdpMixerUpdateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MdpMixerUpdateFtraceEvent} MdpMixerUpdateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpMixerUpdateFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MdpMixerUpdateFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.mixerNum = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MdpMixerUpdateFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MdpMixerUpdateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MdpMixerUpdateFtraceEvent} MdpMixerUpdateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpMixerUpdateFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MdpMixerUpdateFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MdpMixerUpdateFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MdpMixerUpdateFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.mixerNum != null && m.hasOwnProperty("mixerNum")) {
                    if (!$util.isInteger(m.mixerNum))
                        return "mixerNum: integer expected";
                }
                return null;
            };

            /**
             * Creates a MdpMixerUpdateFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MdpMixerUpdateFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MdpMixerUpdateFtraceEvent} MdpMixerUpdateFtraceEvent
             */
            MdpMixerUpdateFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MdpMixerUpdateFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MdpMixerUpdateFtraceEvent();
                if (d.mixerNum != null) {
                    m.mixerNum = d.mixerNum >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MdpMixerUpdateFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MdpMixerUpdateFtraceEvent
             * @static
             * @param {perfetto.protos.MdpMixerUpdateFtraceEvent} m MdpMixerUpdateFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MdpMixerUpdateFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.mixerNum = 0;
                }
                if (m.mixerNum != null && m.hasOwnProperty("mixerNum")) {
                    d.mixerNum = m.mixerNum;
                }
                return d;
            };

            /**
             * Converts this MdpMixerUpdateFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MdpMixerUpdateFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MdpMixerUpdateFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MdpMixerUpdateFtraceEvent;
        })();

        protos.MdpPerfSetWmLevelsFtraceEvent = (function() {

            /**
             * Properties of a MdpPerfSetWmLevelsFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMdpPerfSetWmLevelsFtraceEvent
             * @property {number|null} [pnum] MdpPerfSetWmLevelsFtraceEvent pnum
             * @property {number|null} [useSpace] MdpPerfSetWmLevelsFtraceEvent useSpace
             * @property {number|null} [priorityBytes] MdpPerfSetWmLevelsFtraceEvent priorityBytes
             * @property {number|null} [wm0] MdpPerfSetWmLevelsFtraceEvent wm0
             * @property {number|null} [wm1] MdpPerfSetWmLevelsFtraceEvent wm1
             * @property {number|null} [wm2] MdpPerfSetWmLevelsFtraceEvent wm2
             * @property {number|null} [mbCnt] MdpPerfSetWmLevelsFtraceEvent mbCnt
             * @property {number|null} [mbSize] MdpPerfSetWmLevelsFtraceEvent mbSize
             */

            /**
             * Constructs a new MdpPerfSetWmLevelsFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MdpPerfSetWmLevelsFtraceEvent.
             * @implements IMdpPerfSetWmLevelsFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMdpPerfSetWmLevelsFtraceEvent=} [p] Properties to set
             */
            function MdpPerfSetWmLevelsFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MdpPerfSetWmLevelsFtraceEvent pnum.
             * @member {number} pnum
             * @memberof perfetto.protos.MdpPerfSetWmLevelsFtraceEvent
             * @instance
             */
            MdpPerfSetWmLevelsFtraceEvent.prototype.pnum = 0;

            /**
             * MdpPerfSetWmLevelsFtraceEvent useSpace.
             * @member {number} useSpace
             * @memberof perfetto.protos.MdpPerfSetWmLevelsFtraceEvent
             * @instance
             */
            MdpPerfSetWmLevelsFtraceEvent.prototype.useSpace = 0;

            /**
             * MdpPerfSetWmLevelsFtraceEvent priorityBytes.
             * @member {number} priorityBytes
             * @memberof perfetto.protos.MdpPerfSetWmLevelsFtraceEvent
             * @instance
             */
            MdpPerfSetWmLevelsFtraceEvent.prototype.priorityBytes = 0;

            /**
             * MdpPerfSetWmLevelsFtraceEvent wm0.
             * @member {number} wm0
             * @memberof perfetto.protos.MdpPerfSetWmLevelsFtraceEvent
             * @instance
             */
            MdpPerfSetWmLevelsFtraceEvent.prototype.wm0 = 0;

            /**
             * MdpPerfSetWmLevelsFtraceEvent wm1.
             * @member {number} wm1
             * @memberof perfetto.protos.MdpPerfSetWmLevelsFtraceEvent
             * @instance
             */
            MdpPerfSetWmLevelsFtraceEvent.prototype.wm1 = 0;

            /**
             * MdpPerfSetWmLevelsFtraceEvent wm2.
             * @member {number} wm2
             * @memberof perfetto.protos.MdpPerfSetWmLevelsFtraceEvent
             * @instance
             */
            MdpPerfSetWmLevelsFtraceEvent.prototype.wm2 = 0;

            /**
             * MdpPerfSetWmLevelsFtraceEvent mbCnt.
             * @member {number} mbCnt
             * @memberof perfetto.protos.MdpPerfSetWmLevelsFtraceEvent
             * @instance
             */
            MdpPerfSetWmLevelsFtraceEvent.prototype.mbCnt = 0;

            /**
             * MdpPerfSetWmLevelsFtraceEvent mbSize.
             * @member {number} mbSize
             * @memberof perfetto.protos.MdpPerfSetWmLevelsFtraceEvent
             * @instance
             */
            MdpPerfSetWmLevelsFtraceEvent.prototype.mbSize = 0;

            /**
             * Creates a new MdpPerfSetWmLevelsFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MdpPerfSetWmLevelsFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpPerfSetWmLevelsFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MdpPerfSetWmLevelsFtraceEvent} MdpPerfSetWmLevelsFtraceEvent instance
             */
            MdpPerfSetWmLevelsFtraceEvent.create = function create(properties) {
                return new MdpPerfSetWmLevelsFtraceEvent(properties);
            };

            /**
             * Encodes the specified MdpPerfSetWmLevelsFtraceEvent message. Does not implicitly {@link perfetto.protos.MdpPerfSetWmLevelsFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MdpPerfSetWmLevelsFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpPerfSetWmLevelsFtraceEvent} m MdpPerfSetWmLevelsFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpPerfSetWmLevelsFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.pnum != null && Object.hasOwnProperty.call(m, "pnum"))
                    w.uint32(8).uint32(m.pnum);
                if (m.useSpace != null && Object.hasOwnProperty.call(m, "useSpace"))
                    w.uint32(16).uint32(m.useSpace);
                if (m.priorityBytes != null && Object.hasOwnProperty.call(m, "priorityBytes"))
                    w.uint32(24).uint32(m.priorityBytes);
                if (m.wm0 != null && Object.hasOwnProperty.call(m, "wm0"))
                    w.uint32(32).uint32(m.wm0);
                if (m.wm1 != null && Object.hasOwnProperty.call(m, "wm1"))
                    w.uint32(40).uint32(m.wm1);
                if (m.wm2 != null && Object.hasOwnProperty.call(m, "wm2"))
                    w.uint32(48).uint32(m.wm2);
                if (m.mbCnt != null && Object.hasOwnProperty.call(m, "mbCnt"))
                    w.uint32(56).uint32(m.mbCnt);
                if (m.mbSize != null && Object.hasOwnProperty.call(m, "mbSize"))
                    w.uint32(64).uint32(m.mbSize);
                return w;
            };

            /**
             * Encodes the specified MdpPerfSetWmLevelsFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MdpPerfSetWmLevelsFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MdpPerfSetWmLevelsFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpPerfSetWmLevelsFtraceEvent} message MdpPerfSetWmLevelsFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpPerfSetWmLevelsFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MdpPerfSetWmLevelsFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MdpPerfSetWmLevelsFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MdpPerfSetWmLevelsFtraceEvent} MdpPerfSetWmLevelsFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpPerfSetWmLevelsFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MdpPerfSetWmLevelsFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.pnum = r.uint32();
                        break;
                    case 2:
                        m.useSpace = r.uint32();
                        break;
                    case 3:
                        m.priorityBytes = r.uint32();
                        break;
                    case 4:
                        m.wm0 = r.uint32();
                        break;
                    case 5:
                        m.wm1 = r.uint32();
                        break;
                    case 6:
                        m.wm2 = r.uint32();
                        break;
                    case 7:
                        m.mbCnt = r.uint32();
                        break;
                    case 8:
                        m.mbSize = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MdpPerfSetWmLevelsFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MdpPerfSetWmLevelsFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MdpPerfSetWmLevelsFtraceEvent} MdpPerfSetWmLevelsFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpPerfSetWmLevelsFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MdpPerfSetWmLevelsFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MdpPerfSetWmLevelsFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MdpPerfSetWmLevelsFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.pnum != null && m.hasOwnProperty("pnum")) {
                    if (!$util.isInteger(m.pnum))
                        return "pnum: integer expected";
                }
                if (m.useSpace != null && m.hasOwnProperty("useSpace")) {
                    if (!$util.isInteger(m.useSpace))
                        return "useSpace: integer expected";
                }
                if (m.priorityBytes != null && m.hasOwnProperty("priorityBytes")) {
                    if (!$util.isInteger(m.priorityBytes))
                        return "priorityBytes: integer expected";
                }
                if (m.wm0 != null && m.hasOwnProperty("wm0")) {
                    if (!$util.isInteger(m.wm0))
                        return "wm0: integer expected";
                }
                if (m.wm1 != null && m.hasOwnProperty("wm1")) {
                    if (!$util.isInteger(m.wm1))
                        return "wm1: integer expected";
                }
                if (m.wm2 != null && m.hasOwnProperty("wm2")) {
                    if (!$util.isInteger(m.wm2))
                        return "wm2: integer expected";
                }
                if (m.mbCnt != null && m.hasOwnProperty("mbCnt")) {
                    if (!$util.isInteger(m.mbCnt))
                        return "mbCnt: integer expected";
                }
                if (m.mbSize != null && m.hasOwnProperty("mbSize")) {
                    if (!$util.isInteger(m.mbSize))
                        return "mbSize: integer expected";
                }
                return null;
            };

            /**
             * Creates a MdpPerfSetWmLevelsFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MdpPerfSetWmLevelsFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MdpPerfSetWmLevelsFtraceEvent} MdpPerfSetWmLevelsFtraceEvent
             */
            MdpPerfSetWmLevelsFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MdpPerfSetWmLevelsFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MdpPerfSetWmLevelsFtraceEvent();
                if (d.pnum != null) {
                    m.pnum = d.pnum >>> 0;
                }
                if (d.useSpace != null) {
                    m.useSpace = d.useSpace >>> 0;
                }
                if (d.priorityBytes != null) {
                    m.priorityBytes = d.priorityBytes >>> 0;
                }
                if (d.wm0 != null) {
                    m.wm0 = d.wm0 >>> 0;
                }
                if (d.wm1 != null) {
                    m.wm1 = d.wm1 >>> 0;
                }
                if (d.wm2 != null) {
                    m.wm2 = d.wm2 >>> 0;
                }
                if (d.mbCnt != null) {
                    m.mbCnt = d.mbCnt >>> 0;
                }
                if (d.mbSize != null) {
                    m.mbSize = d.mbSize >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MdpPerfSetWmLevelsFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MdpPerfSetWmLevelsFtraceEvent
             * @static
             * @param {perfetto.protos.MdpPerfSetWmLevelsFtraceEvent} m MdpPerfSetWmLevelsFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MdpPerfSetWmLevelsFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.pnum = 0;
                    d.useSpace = 0;
                    d.priorityBytes = 0;
                    d.wm0 = 0;
                    d.wm1 = 0;
                    d.wm2 = 0;
                    d.mbCnt = 0;
                    d.mbSize = 0;
                }
                if (m.pnum != null && m.hasOwnProperty("pnum")) {
                    d.pnum = m.pnum;
                }
                if (m.useSpace != null && m.hasOwnProperty("useSpace")) {
                    d.useSpace = m.useSpace;
                }
                if (m.priorityBytes != null && m.hasOwnProperty("priorityBytes")) {
                    d.priorityBytes = m.priorityBytes;
                }
                if (m.wm0 != null && m.hasOwnProperty("wm0")) {
                    d.wm0 = m.wm0;
                }
                if (m.wm1 != null && m.hasOwnProperty("wm1")) {
                    d.wm1 = m.wm1;
                }
                if (m.wm2 != null && m.hasOwnProperty("wm2")) {
                    d.wm2 = m.wm2;
                }
                if (m.mbCnt != null && m.hasOwnProperty("mbCnt")) {
                    d.mbCnt = m.mbCnt;
                }
                if (m.mbSize != null && m.hasOwnProperty("mbSize")) {
                    d.mbSize = m.mbSize;
                }
                return d;
            };

            /**
             * Converts this MdpPerfSetWmLevelsFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MdpPerfSetWmLevelsFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MdpPerfSetWmLevelsFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MdpPerfSetWmLevelsFtraceEvent;
        })();

        protos.MdpVideoUnderrunDoneFtraceEvent = (function() {

            /**
             * Properties of a MdpVideoUnderrunDoneFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMdpVideoUnderrunDoneFtraceEvent
             * @property {number|null} [ctlNum] MdpVideoUnderrunDoneFtraceEvent ctlNum
             * @property {number|null} [underrunCnt] MdpVideoUnderrunDoneFtraceEvent underrunCnt
             */

            /**
             * Constructs a new MdpVideoUnderrunDoneFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MdpVideoUnderrunDoneFtraceEvent.
             * @implements IMdpVideoUnderrunDoneFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMdpVideoUnderrunDoneFtraceEvent=} [p] Properties to set
             */
            function MdpVideoUnderrunDoneFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MdpVideoUnderrunDoneFtraceEvent ctlNum.
             * @member {number} ctlNum
             * @memberof perfetto.protos.MdpVideoUnderrunDoneFtraceEvent
             * @instance
             */
            MdpVideoUnderrunDoneFtraceEvent.prototype.ctlNum = 0;

            /**
             * MdpVideoUnderrunDoneFtraceEvent underrunCnt.
             * @member {number} underrunCnt
             * @memberof perfetto.protos.MdpVideoUnderrunDoneFtraceEvent
             * @instance
             */
            MdpVideoUnderrunDoneFtraceEvent.prototype.underrunCnt = 0;

            /**
             * Creates a new MdpVideoUnderrunDoneFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MdpVideoUnderrunDoneFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpVideoUnderrunDoneFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MdpVideoUnderrunDoneFtraceEvent} MdpVideoUnderrunDoneFtraceEvent instance
             */
            MdpVideoUnderrunDoneFtraceEvent.create = function create(properties) {
                return new MdpVideoUnderrunDoneFtraceEvent(properties);
            };

            /**
             * Encodes the specified MdpVideoUnderrunDoneFtraceEvent message. Does not implicitly {@link perfetto.protos.MdpVideoUnderrunDoneFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MdpVideoUnderrunDoneFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpVideoUnderrunDoneFtraceEvent} m MdpVideoUnderrunDoneFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpVideoUnderrunDoneFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.ctlNum != null && Object.hasOwnProperty.call(m, "ctlNum"))
                    w.uint32(8).uint32(m.ctlNum);
                if (m.underrunCnt != null && Object.hasOwnProperty.call(m, "underrunCnt"))
                    w.uint32(16).uint32(m.underrunCnt);
                return w;
            };

            /**
             * Encodes the specified MdpVideoUnderrunDoneFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MdpVideoUnderrunDoneFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MdpVideoUnderrunDoneFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpVideoUnderrunDoneFtraceEvent} message MdpVideoUnderrunDoneFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpVideoUnderrunDoneFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MdpVideoUnderrunDoneFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MdpVideoUnderrunDoneFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MdpVideoUnderrunDoneFtraceEvent} MdpVideoUnderrunDoneFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpVideoUnderrunDoneFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MdpVideoUnderrunDoneFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.ctlNum = r.uint32();
                        break;
                    case 2:
                        m.underrunCnt = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MdpVideoUnderrunDoneFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MdpVideoUnderrunDoneFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MdpVideoUnderrunDoneFtraceEvent} MdpVideoUnderrunDoneFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpVideoUnderrunDoneFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MdpVideoUnderrunDoneFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MdpVideoUnderrunDoneFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MdpVideoUnderrunDoneFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.ctlNum != null && m.hasOwnProperty("ctlNum")) {
                    if (!$util.isInteger(m.ctlNum))
                        return "ctlNum: integer expected";
                }
                if (m.underrunCnt != null && m.hasOwnProperty("underrunCnt")) {
                    if (!$util.isInteger(m.underrunCnt))
                        return "underrunCnt: integer expected";
                }
                return null;
            };

            /**
             * Creates a MdpVideoUnderrunDoneFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MdpVideoUnderrunDoneFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MdpVideoUnderrunDoneFtraceEvent} MdpVideoUnderrunDoneFtraceEvent
             */
            MdpVideoUnderrunDoneFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MdpVideoUnderrunDoneFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MdpVideoUnderrunDoneFtraceEvent();
                if (d.ctlNum != null) {
                    m.ctlNum = d.ctlNum >>> 0;
                }
                if (d.underrunCnt != null) {
                    m.underrunCnt = d.underrunCnt >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MdpVideoUnderrunDoneFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MdpVideoUnderrunDoneFtraceEvent
             * @static
             * @param {perfetto.protos.MdpVideoUnderrunDoneFtraceEvent} m MdpVideoUnderrunDoneFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MdpVideoUnderrunDoneFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.ctlNum = 0;
                    d.underrunCnt = 0;
                }
                if (m.ctlNum != null && m.hasOwnProperty("ctlNum")) {
                    d.ctlNum = m.ctlNum;
                }
                if (m.underrunCnt != null && m.hasOwnProperty("underrunCnt")) {
                    d.underrunCnt = m.underrunCnt;
                }
                return d;
            };

            /**
             * Converts this MdpVideoUnderrunDoneFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MdpVideoUnderrunDoneFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MdpVideoUnderrunDoneFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MdpVideoUnderrunDoneFtraceEvent;
        })();

        protos.MdpCmdWaitPingpongFtraceEvent = (function() {

            /**
             * Properties of a MdpCmdWaitPingpongFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMdpCmdWaitPingpongFtraceEvent
             * @property {number|null} [ctlNum] MdpCmdWaitPingpongFtraceEvent ctlNum
             * @property {number|null} [kickoffCnt] MdpCmdWaitPingpongFtraceEvent kickoffCnt
             */

            /**
             * Constructs a new MdpCmdWaitPingpongFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MdpCmdWaitPingpongFtraceEvent.
             * @implements IMdpCmdWaitPingpongFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMdpCmdWaitPingpongFtraceEvent=} [p] Properties to set
             */
            function MdpCmdWaitPingpongFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MdpCmdWaitPingpongFtraceEvent ctlNum.
             * @member {number} ctlNum
             * @memberof perfetto.protos.MdpCmdWaitPingpongFtraceEvent
             * @instance
             */
            MdpCmdWaitPingpongFtraceEvent.prototype.ctlNum = 0;

            /**
             * MdpCmdWaitPingpongFtraceEvent kickoffCnt.
             * @member {number} kickoffCnt
             * @memberof perfetto.protos.MdpCmdWaitPingpongFtraceEvent
             * @instance
             */
            MdpCmdWaitPingpongFtraceEvent.prototype.kickoffCnt = 0;

            /**
             * Creates a new MdpCmdWaitPingpongFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MdpCmdWaitPingpongFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpCmdWaitPingpongFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MdpCmdWaitPingpongFtraceEvent} MdpCmdWaitPingpongFtraceEvent instance
             */
            MdpCmdWaitPingpongFtraceEvent.create = function create(properties) {
                return new MdpCmdWaitPingpongFtraceEvent(properties);
            };

            /**
             * Encodes the specified MdpCmdWaitPingpongFtraceEvent message. Does not implicitly {@link perfetto.protos.MdpCmdWaitPingpongFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MdpCmdWaitPingpongFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpCmdWaitPingpongFtraceEvent} m MdpCmdWaitPingpongFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpCmdWaitPingpongFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.ctlNum != null && Object.hasOwnProperty.call(m, "ctlNum"))
                    w.uint32(8).uint32(m.ctlNum);
                if (m.kickoffCnt != null && Object.hasOwnProperty.call(m, "kickoffCnt"))
                    w.uint32(16).int32(m.kickoffCnt);
                return w;
            };

            /**
             * Encodes the specified MdpCmdWaitPingpongFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MdpCmdWaitPingpongFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MdpCmdWaitPingpongFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpCmdWaitPingpongFtraceEvent} message MdpCmdWaitPingpongFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpCmdWaitPingpongFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MdpCmdWaitPingpongFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MdpCmdWaitPingpongFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MdpCmdWaitPingpongFtraceEvent} MdpCmdWaitPingpongFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpCmdWaitPingpongFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MdpCmdWaitPingpongFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.ctlNum = r.uint32();
                        break;
                    case 2:
                        m.kickoffCnt = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MdpCmdWaitPingpongFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MdpCmdWaitPingpongFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MdpCmdWaitPingpongFtraceEvent} MdpCmdWaitPingpongFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpCmdWaitPingpongFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MdpCmdWaitPingpongFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MdpCmdWaitPingpongFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MdpCmdWaitPingpongFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.ctlNum != null && m.hasOwnProperty("ctlNum")) {
                    if (!$util.isInteger(m.ctlNum))
                        return "ctlNum: integer expected";
                }
                if (m.kickoffCnt != null && m.hasOwnProperty("kickoffCnt")) {
                    if (!$util.isInteger(m.kickoffCnt))
                        return "kickoffCnt: integer expected";
                }
                return null;
            };

            /**
             * Creates a MdpCmdWaitPingpongFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MdpCmdWaitPingpongFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MdpCmdWaitPingpongFtraceEvent} MdpCmdWaitPingpongFtraceEvent
             */
            MdpCmdWaitPingpongFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MdpCmdWaitPingpongFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MdpCmdWaitPingpongFtraceEvent();
                if (d.ctlNum != null) {
                    m.ctlNum = d.ctlNum >>> 0;
                }
                if (d.kickoffCnt != null) {
                    m.kickoffCnt = d.kickoffCnt | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MdpCmdWaitPingpongFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MdpCmdWaitPingpongFtraceEvent
             * @static
             * @param {perfetto.protos.MdpCmdWaitPingpongFtraceEvent} m MdpCmdWaitPingpongFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MdpCmdWaitPingpongFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.ctlNum = 0;
                    d.kickoffCnt = 0;
                }
                if (m.ctlNum != null && m.hasOwnProperty("ctlNum")) {
                    d.ctlNum = m.ctlNum;
                }
                if (m.kickoffCnt != null && m.hasOwnProperty("kickoffCnt")) {
                    d.kickoffCnt = m.kickoffCnt;
                }
                return d;
            };

            /**
             * Converts this MdpCmdWaitPingpongFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MdpCmdWaitPingpongFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MdpCmdWaitPingpongFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MdpCmdWaitPingpongFtraceEvent;
        })();

        protos.MdpPerfPrefillCalcFtraceEvent = (function() {

            /**
             * Properties of a MdpPerfPrefillCalcFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMdpPerfPrefillCalcFtraceEvent
             * @property {number|null} [pnum] MdpPerfPrefillCalcFtraceEvent pnum
             * @property {number|null} [latencyBuf] MdpPerfPrefillCalcFtraceEvent latencyBuf
             * @property {number|null} [ot] MdpPerfPrefillCalcFtraceEvent ot
             * @property {number|null} [yBuf] MdpPerfPrefillCalcFtraceEvent yBuf
             * @property {number|null} [yScaler] MdpPerfPrefillCalcFtraceEvent yScaler
             * @property {number|null} [ppLines] MdpPerfPrefillCalcFtraceEvent ppLines
             * @property {number|null} [ppBytes] MdpPerfPrefillCalcFtraceEvent ppBytes
             * @property {number|null} [postSc] MdpPerfPrefillCalcFtraceEvent postSc
             * @property {number|null} [fbcBytes] MdpPerfPrefillCalcFtraceEvent fbcBytes
             * @property {number|null} [prefillBytes] MdpPerfPrefillCalcFtraceEvent prefillBytes
             */

            /**
             * Constructs a new MdpPerfPrefillCalcFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MdpPerfPrefillCalcFtraceEvent.
             * @implements IMdpPerfPrefillCalcFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMdpPerfPrefillCalcFtraceEvent=} [p] Properties to set
             */
            function MdpPerfPrefillCalcFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MdpPerfPrefillCalcFtraceEvent pnum.
             * @member {number} pnum
             * @memberof perfetto.protos.MdpPerfPrefillCalcFtraceEvent
             * @instance
             */
            MdpPerfPrefillCalcFtraceEvent.prototype.pnum = 0;

            /**
             * MdpPerfPrefillCalcFtraceEvent latencyBuf.
             * @member {number} latencyBuf
             * @memberof perfetto.protos.MdpPerfPrefillCalcFtraceEvent
             * @instance
             */
            MdpPerfPrefillCalcFtraceEvent.prototype.latencyBuf = 0;

            /**
             * MdpPerfPrefillCalcFtraceEvent ot.
             * @member {number} ot
             * @memberof perfetto.protos.MdpPerfPrefillCalcFtraceEvent
             * @instance
             */
            MdpPerfPrefillCalcFtraceEvent.prototype.ot = 0;

            /**
             * MdpPerfPrefillCalcFtraceEvent yBuf.
             * @member {number} yBuf
             * @memberof perfetto.protos.MdpPerfPrefillCalcFtraceEvent
             * @instance
             */
            MdpPerfPrefillCalcFtraceEvent.prototype.yBuf = 0;

            /**
             * MdpPerfPrefillCalcFtraceEvent yScaler.
             * @member {number} yScaler
             * @memberof perfetto.protos.MdpPerfPrefillCalcFtraceEvent
             * @instance
             */
            MdpPerfPrefillCalcFtraceEvent.prototype.yScaler = 0;

            /**
             * MdpPerfPrefillCalcFtraceEvent ppLines.
             * @member {number} ppLines
             * @memberof perfetto.protos.MdpPerfPrefillCalcFtraceEvent
             * @instance
             */
            MdpPerfPrefillCalcFtraceEvent.prototype.ppLines = 0;

            /**
             * MdpPerfPrefillCalcFtraceEvent ppBytes.
             * @member {number} ppBytes
             * @memberof perfetto.protos.MdpPerfPrefillCalcFtraceEvent
             * @instance
             */
            MdpPerfPrefillCalcFtraceEvent.prototype.ppBytes = 0;

            /**
             * MdpPerfPrefillCalcFtraceEvent postSc.
             * @member {number} postSc
             * @memberof perfetto.protos.MdpPerfPrefillCalcFtraceEvent
             * @instance
             */
            MdpPerfPrefillCalcFtraceEvent.prototype.postSc = 0;

            /**
             * MdpPerfPrefillCalcFtraceEvent fbcBytes.
             * @member {number} fbcBytes
             * @memberof perfetto.protos.MdpPerfPrefillCalcFtraceEvent
             * @instance
             */
            MdpPerfPrefillCalcFtraceEvent.prototype.fbcBytes = 0;

            /**
             * MdpPerfPrefillCalcFtraceEvent prefillBytes.
             * @member {number} prefillBytes
             * @memberof perfetto.protos.MdpPerfPrefillCalcFtraceEvent
             * @instance
             */
            MdpPerfPrefillCalcFtraceEvent.prototype.prefillBytes = 0;

            /**
             * Creates a new MdpPerfPrefillCalcFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MdpPerfPrefillCalcFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpPerfPrefillCalcFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MdpPerfPrefillCalcFtraceEvent} MdpPerfPrefillCalcFtraceEvent instance
             */
            MdpPerfPrefillCalcFtraceEvent.create = function create(properties) {
                return new MdpPerfPrefillCalcFtraceEvent(properties);
            };

            /**
             * Encodes the specified MdpPerfPrefillCalcFtraceEvent message. Does not implicitly {@link perfetto.protos.MdpPerfPrefillCalcFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MdpPerfPrefillCalcFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpPerfPrefillCalcFtraceEvent} m MdpPerfPrefillCalcFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpPerfPrefillCalcFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.pnum != null && Object.hasOwnProperty.call(m, "pnum"))
                    w.uint32(8).uint32(m.pnum);
                if (m.latencyBuf != null && Object.hasOwnProperty.call(m, "latencyBuf"))
                    w.uint32(16).uint32(m.latencyBuf);
                if (m.ot != null && Object.hasOwnProperty.call(m, "ot"))
                    w.uint32(24).uint32(m.ot);
                if (m.yBuf != null && Object.hasOwnProperty.call(m, "yBuf"))
                    w.uint32(32).uint32(m.yBuf);
                if (m.yScaler != null && Object.hasOwnProperty.call(m, "yScaler"))
                    w.uint32(40).uint32(m.yScaler);
                if (m.ppLines != null && Object.hasOwnProperty.call(m, "ppLines"))
                    w.uint32(48).uint32(m.ppLines);
                if (m.ppBytes != null && Object.hasOwnProperty.call(m, "ppBytes"))
                    w.uint32(56).uint32(m.ppBytes);
                if (m.postSc != null && Object.hasOwnProperty.call(m, "postSc"))
                    w.uint32(64).uint32(m.postSc);
                if (m.fbcBytes != null && Object.hasOwnProperty.call(m, "fbcBytes"))
                    w.uint32(72).uint32(m.fbcBytes);
                if (m.prefillBytes != null && Object.hasOwnProperty.call(m, "prefillBytes"))
                    w.uint32(80).uint32(m.prefillBytes);
                return w;
            };

            /**
             * Encodes the specified MdpPerfPrefillCalcFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MdpPerfPrefillCalcFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MdpPerfPrefillCalcFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpPerfPrefillCalcFtraceEvent} message MdpPerfPrefillCalcFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpPerfPrefillCalcFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MdpPerfPrefillCalcFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MdpPerfPrefillCalcFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MdpPerfPrefillCalcFtraceEvent} MdpPerfPrefillCalcFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpPerfPrefillCalcFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MdpPerfPrefillCalcFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.pnum = r.uint32();
                        break;
                    case 2:
                        m.latencyBuf = r.uint32();
                        break;
                    case 3:
                        m.ot = r.uint32();
                        break;
                    case 4:
                        m.yBuf = r.uint32();
                        break;
                    case 5:
                        m.yScaler = r.uint32();
                        break;
                    case 6:
                        m.ppLines = r.uint32();
                        break;
                    case 7:
                        m.ppBytes = r.uint32();
                        break;
                    case 8:
                        m.postSc = r.uint32();
                        break;
                    case 9:
                        m.fbcBytes = r.uint32();
                        break;
                    case 10:
                        m.prefillBytes = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MdpPerfPrefillCalcFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MdpPerfPrefillCalcFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MdpPerfPrefillCalcFtraceEvent} MdpPerfPrefillCalcFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpPerfPrefillCalcFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MdpPerfPrefillCalcFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MdpPerfPrefillCalcFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MdpPerfPrefillCalcFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.pnum != null && m.hasOwnProperty("pnum")) {
                    if (!$util.isInteger(m.pnum))
                        return "pnum: integer expected";
                }
                if (m.latencyBuf != null && m.hasOwnProperty("latencyBuf")) {
                    if (!$util.isInteger(m.latencyBuf))
                        return "latencyBuf: integer expected";
                }
                if (m.ot != null && m.hasOwnProperty("ot")) {
                    if (!$util.isInteger(m.ot))
                        return "ot: integer expected";
                }
                if (m.yBuf != null && m.hasOwnProperty("yBuf")) {
                    if (!$util.isInteger(m.yBuf))
                        return "yBuf: integer expected";
                }
                if (m.yScaler != null && m.hasOwnProperty("yScaler")) {
                    if (!$util.isInteger(m.yScaler))
                        return "yScaler: integer expected";
                }
                if (m.ppLines != null && m.hasOwnProperty("ppLines")) {
                    if (!$util.isInteger(m.ppLines))
                        return "ppLines: integer expected";
                }
                if (m.ppBytes != null && m.hasOwnProperty("ppBytes")) {
                    if (!$util.isInteger(m.ppBytes))
                        return "ppBytes: integer expected";
                }
                if (m.postSc != null && m.hasOwnProperty("postSc")) {
                    if (!$util.isInteger(m.postSc))
                        return "postSc: integer expected";
                }
                if (m.fbcBytes != null && m.hasOwnProperty("fbcBytes")) {
                    if (!$util.isInteger(m.fbcBytes))
                        return "fbcBytes: integer expected";
                }
                if (m.prefillBytes != null && m.hasOwnProperty("prefillBytes")) {
                    if (!$util.isInteger(m.prefillBytes))
                        return "prefillBytes: integer expected";
                }
                return null;
            };

            /**
             * Creates a MdpPerfPrefillCalcFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MdpPerfPrefillCalcFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MdpPerfPrefillCalcFtraceEvent} MdpPerfPrefillCalcFtraceEvent
             */
            MdpPerfPrefillCalcFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MdpPerfPrefillCalcFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MdpPerfPrefillCalcFtraceEvent();
                if (d.pnum != null) {
                    m.pnum = d.pnum >>> 0;
                }
                if (d.latencyBuf != null) {
                    m.latencyBuf = d.latencyBuf >>> 0;
                }
                if (d.ot != null) {
                    m.ot = d.ot >>> 0;
                }
                if (d.yBuf != null) {
                    m.yBuf = d.yBuf >>> 0;
                }
                if (d.yScaler != null) {
                    m.yScaler = d.yScaler >>> 0;
                }
                if (d.ppLines != null) {
                    m.ppLines = d.ppLines >>> 0;
                }
                if (d.ppBytes != null) {
                    m.ppBytes = d.ppBytes >>> 0;
                }
                if (d.postSc != null) {
                    m.postSc = d.postSc >>> 0;
                }
                if (d.fbcBytes != null) {
                    m.fbcBytes = d.fbcBytes >>> 0;
                }
                if (d.prefillBytes != null) {
                    m.prefillBytes = d.prefillBytes >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MdpPerfPrefillCalcFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MdpPerfPrefillCalcFtraceEvent
             * @static
             * @param {perfetto.protos.MdpPerfPrefillCalcFtraceEvent} m MdpPerfPrefillCalcFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MdpPerfPrefillCalcFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.pnum = 0;
                    d.latencyBuf = 0;
                    d.ot = 0;
                    d.yBuf = 0;
                    d.yScaler = 0;
                    d.ppLines = 0;
                    d.ppBytes = 0;
                    d.postSc = 0;
                    d.fbcBytes = 0;
                    d.prefillBytes = 0;
                }
                if (m.pnum != null && m.hasOwnProperty("pnum")) {
                    d.pnum = m.pnum;
                }
                if (m.latencyBuf != null && m.hasOwnProperty("latencyBuf")) {
                    d.latencyBuf = m.latencyBuf;
                }
                if (m.ot != null && m.hasOwnProperty("ot")) {
                    d.ot = m.ot;
                }
                if (m.yBuf != null && m.hasOwnProperty("yBuf")) {
                    d.yBuf = m.yBuf;
                }
                if (m.yScaler != null && m.hasOwnProperty("yScaler")) {
                    d.yScaler = m.yScaler;
                }
                if (m.ppLines != null && m.hasOwnProperty("ppLines")) {
                    d.ppLines = m.ppLines;
                }
                if (m.ppBytes != null && m.hasOwnProperty("ppBytes")) {
                    d.ppBytes = m.ppBytes;
                }
                if (m.postSc != null && m.hasOwnProperty("postSc")) {
                    d.postSc = m.postSc;
                }
                if (m.fbcBytes != null && m.hasOwnProperty("fbcBytes")) {
                    d.fbcBytes = m.fbcBytes;
                }
                if (m.prefillBytes != null && m.hasOwnProperty("prefillBytes")) {
                    d.prefillBytes = m.prefillBytes;
                }
                return d;
            };

            /**
             * Converts this MdpPerfPrefillCalcFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MdpPerfPrefillCalcFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MdpPerfPrefillCalcFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MdpPerfPrefillCalcFtraceEvent;
        })();

        protos.MdpPerfUpdateBusFtraceEvent = (function() {

            /**
             * Properties of a MdpPerfUpdateBusFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMdpPerfUpdateBusFtraceEvent
             * @property {number|null} [client] MdpPerfUpdateBusFtraceEvent client
             * @property {number|null} [abQuota] MdpPerfUpdateBusFtraceEvent abQuota
             * @property {number|null} [ibQuota] MdpPerfUpdateBusFtraceEvent ibQuota
             */

            /**
             * Constructs a new MdpPerfUpdateBusFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MdpPerfUpdateBusFtraceEvent.
             * @implements IMdpPerfUpdateBusFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMdpPerfUpdateBusFtraceEvent=} [p] Properties to set
             */
            function MdpPerfUpdateBusFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MdpPerfUpdateBusFtraceEvent client.
             * @member {number} client
             * @memberof perfetto.protos.MdpPerfUpdateBusFtraceEvent
             * @instance
             */
            MdpPerfUpdateBusFtraceEvent.prototype.client = 0;

            /**
             * MdpPerfUpdateBusFtraceEvent abQuota.
             * @member {number} abQuota
             * @memberof perfetto.protos.MdpPerfUpdateBusFtraceEvent
             * @instance
             */
            MdpPerfUpdateBusFtraceEvent.prototype.abQuota = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MdpPerfUpdateBusFtraceEvent ibQuota.
             * @member {number} ibQuota
             * @memberof perfetto.protos.MdpPerfUpdateBusFtraceEvent
             * @instance
             */
            MdpPerfUpdateBusFtraceEvent.prototype.ibQuota = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new MdpPerfUpdateBusFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MdpPerfUpdateBusFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpPerfUpdateBusFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MdpPerfUpdateBusFtraceEvent} MdpPerfUpdateBusFtraceEvent instance
             */
            MdpPerfUpdateBusFtraceEvent.create = function create(properties) {
                return new MdpPerfUpdateBusFtraceEvent(properties);
            };

            /**
             * Encodes the specified MdpPerfUpdateBusFtraceEvent message. Does not implicitly {@link perfetto.protos.MdpPerfUpdateBusFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MdpPerfUpdateBusFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpPerfUpdateBusFtraceEvent} m MdpPerfUpdateBusFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpPerfUpdateBusFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.client != null && Object.hasOwnProperty.call(m, "client"))
                    w.uint32(8).int32(m.client);
                if (m.abQuota != null && Object.hasOwnProperty.call(m, "abQuota"))
                    w.uint32(16).uint64(m.abQuota);
                if (m.ibQuota != null && Object.hasOwnProperty.call(m, "ibQuota"))
                    w.uint32(24).uint64(m.ibQuota);
                return w;
            };

            /**
             * Encodes the specified MdpPerfUpdateBusFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MdpPerfUpdateBusFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MdpPerfUpdateBusFtraceEvent
             * @static
             * @param {perfetto.protos.IMdpPerfUpdateBusFtraceEvent} message MdpPerfUpdateBusFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MdpPerfUpdateBusFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MdpPerfUpdateBusFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MdpPerfUpdateBusFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MdpPerfUpdateBusFtraceEvent} MdpPerfUpdateBusFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpPerfUpdateBusFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MdpPerfUpdateBusFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.client = r.int32();
                        break;
                    case 2:
                        m.abQuota = r.uint64();
                        break;
                    case 3:
                        m.ibQuota = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MdpPerfUpdateBusFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MdpPerfUpdateBusFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MdpPerfUpdateBusFtraceEvent} MdpPerfUpdateBusFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MdpPerfUpdateBusFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MdpPerfUpdateBusFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MdpPerfUpdateBusFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MdpPerfUpdateBusFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.client != null && m.hasOwnProperty("client")) {
                    if (!$util.isInteger(m.client))
                        return "client: integer expected";
                }
                if (m.abQuota != null && m.hasOwnProperty("abQuota")) {
                    if (!$util.isInteger(m.abQuota) && !(m.abQuota && $util.isInteger(m.abQuota.low) && $util.isInteger(m.abQuota.high)))
                        return "abQuota: integer|Long expected";
                }
                if (m.ibQuota != null && m.hasOwnProperty("ibQuota")) {
                    if (!$util.isInteger(m.ibQuota) && !(m.ibQuota && $util.isInteger(m.ibQuota.low) && $util.isInteger(m.ibQuota.high)))
                        return "ibQuota: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a MdpPerfUpdateBusFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MdpPerfUpdateBusFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MdpPerfUpdateBusFtraceEvent} MdpPerfUpdateBusFtraceEvent
             */
            MdpPerfUpdateBusFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MdpPerfUpdateBusFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MdpPerfUpdateBusFtraceEvent();
                if (d.client != null) {
                    m.client = d.client | 0;
                }
                if (d.abQuota != null) {
                    if ($util.Long)
                        (m.abQuota = $util.Long.fromValue(d.abQuota)).unsigned = true;
                    else if (typeof d.abQuota === "string")
                        m.abQuota = parseInt(d.abQuota, 10);
                    else if (typeof d.abQuota === "number")
                        m.abQuota = d.abQuota;
                    else if (typeof d.abQuota === "object")
                        m.abQuota = new $util.LongBits(d.abQuota.low >>> 0, d.abQuota.high >>> 0).toNumber(true);
                }
                if (d.ibQuota != null) {
                    if ($util.Long)
                        (m.ibQuota = $util.Long.fromValue(d.ibQuota)).unsigned = true;
                    else if (typeof d.ibQuota === "string")
                        m.ibQuota = parseInt(d.ibQuota, 10);
                    else if (typeof d.ibQuota === "number")
                        m.ibQuota = d.ibQuota;
                    else if (typeof d.ibQuota === "object")
                        m.ibQuota = new $util.LongBits(d.ibQuota.low >>> 0, d.ibQuota.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a MdpPerfUpdateBusFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MdpPerfUpdateBusFtraceEvent
             * @static
             * @param {perfetto.protos.MdpPerfUpdateBusFtraceEvent} m MdpPerfUpdateBusFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MdpPerfUpdateBusFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.client = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.abQuota = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.abQuota = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ibQuota = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ibQuota = o.longs === String ? "0" : 0;
                }
                if (m.client != null && m.hasOwnProperty("client")) {
                    d.client = m.client;
                }
                if (m.abQuota != null && m.hasOwnProperty("abQuota")) {
                    if (typeof m.abQuota === "number")
                        d.abQuota = o.longs === String ? String(m.abQuota) : m.abQuota;
                    else
                        d.abQuota = o.longs === String ? $util.Long.prototype.toString.call(m.abQuota) : o.longs === Number ? new $util.LongBits(m.abQuota.low >>> 0, m.abQuota.high >>> 0).toNumber(true) : m.abQuota;
                }
                if (m.ibQuota != null && m.hasOwnProperty("ibQuota")) {
                    if (typeof m.ibQuota === "number")
                        d.ibQuota = o.longs === String ? String(m.ibQuota) : m.ibQuota;
                    else
                        d.ibQuota = o.longs === String ? $util.Long.prototype.toString.call(m.ibQuota) : o.longs === Number ? new $util.LongBits(m.ibQuota.low >>> 0, m.ibQuota.high >>> 0).toNumber(true) : m.ibQuota;
                }
                return d;
            };

            /**
             * Converts this MdpPerfUpdateBusFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MdpPerfUpdateBusFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MdpPerfUpdateBusFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MdpPerfUpdateBusFtraceEvent;
        })();

        protos.RotatorBwAoAsContextFtraceEvent = (function() {

            /**
             * Properties of a RotatorBwAoAsContextFtraceEvent.
             * @memberof perfetto.protos
             * @interface IRotatorBwAoAsContextFtraceEvent
             * @property {number|null} [state] RotatorBwAoAsContextFtraceEvent state
             */

            /**
             * Constructs a new RotatorBwAoAsContextFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a RotatorBwAoAsContextFtraceEvent.
             * @implements IRotatorBwAoAsContextFtraceEvent
             * @constructor
             * @param {perfetto.protos.IRotatorBwAoAsContextFtraceEvent=} [p] Properties to set
             */
            function RotatorBwAoAsContextFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * RotatorBwAoAsContextFtraceEvent state.
             * @member {number} state
             * @memberof perfetto.protos.RotatorBwAoAsContextFtraceEvent
             * @instance
             */
            RotatorBwAoAsContextFtraceEvent.prototype.state = 0;

            /**
             * Creates a new RotatorBwAoAsContextFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.RotatorBwAoAsContextFtraceEvent
             * @static
             * @param {perfetto.protos.IRotatorBwAoAsContextFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.RotatorBwAoAsContextFtraceEvent} RotatorBwAoAsContextFtraceEvent instance
             */
            RotatorBwAoAsContextFtraceEvent.create = function create(properties) {
                return new RotatorBwAoAsContextFtraceEvent(properties);
            };

            /**
             * Encodes the specified RotatorBwAoAsContextFtraceEvent message. Does not implicitly {@link perfetto.protos.RotatorBwAoAsContextFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.RotatorBwAoAsContextFtraceEvent
             * @static
             * @param {perfetto.protos.IRotatorBwAoAsContextFtraceEvent} m RotatorBwAoAsContextFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RotatorBwAoAsContextFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.state != null && Object.hasOwnProperty.call(m, "state"))
                    w.uint32(8).uint32(m.state);
                return w;
            };

            /**
             * Encodes the specified RotatorBwAoAsContextFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.RotatorBwAoAsContextFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.RotatorBwAoAsContextFtraceEvent
             * @static
             * @param {perfetto.protos.IRotatorBwAoAsContextFtraceEvent} message RotatorBwAoAsContextFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RotatorBwAoAsContextFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a RotatorBwAoAsContextFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.RotatorBwAoAsContextFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.RotatorBwAoAsContextFtraceEvent} RotatorBwAoAsContextFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RotatorBwAoAsContextFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.RotatorBwAoAsContextFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.state = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a RotatorBwAoAsContextFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.RotatorBwAoAsContextFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.RotatorBwAoAsContextFtraceEvent} RotatorBwAoAsContextFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RotatorBwAoAsContextFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a RotatorBwAoAsContextFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.RotatorBwAoAsContextFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            RotatorBwAoAsContextFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.state != null && m.hasOwnProperty("state")) {
                    if (!$util.isInteger(m.state))
                        return "state: integer expected";
                }
                return null;
            };

            /**
             * Creates a RotatorBwAoAsContextFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.RotatorBwAoAsContextFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.RotatorBwAoAsContextFtraceEvent} RotatorBwAoAsContextFtraceEvent
             */
            RotatorBwAoAsContextFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.RotatorBwAoAsContextFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.RotatorBwAoAsContextFtraceEvent();
                if (d.state != null) {
                    m.state = d.state >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a RotatorBwAoAsContextFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.RotatorBwAoAsContextFtraceEvent
             * @static
             * @param {perfetto.protos.RotatorBwAoAsContextFtraceEvent} m RotatorBwAoAsContextFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            RotatorBwAoAsContextFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.state = 0;
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    d.state = m.state;
                }
                return d;
            };

            /**
             * Converts this RotatorBwAoAsContextFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.RotatorBwAoAsContextFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            RotatorBwAoAsContextFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return RotatorBwAoAsContextFtraceEvent;
        })();

        protos.MmEventRecordFtraceEvent = (function() {

            /**
             * Properties of a MmEventRecordFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmEventRecordFtraceEvent
             * @property {number|null} [avgLat] MmEventRecordFtraceEvent avgLat
             * @property {number|null} [count] MmEventRecordFtraceEvent count
             * @property {number|null} [maxLat] MmEventRecordFtraceEvent maxLat
             * @property {number|null} [type] MmEventRecordFtraceEvent type
             */

            /**
             * Constructs a new MmEventRecordFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmEventRecordFtraceEvent.
             * @implements IMmEventRecordFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmEventRecordFtraceEvent=} [p] Properties to set
             */
            function MmEventRecordFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmEventRecordFtraceEvent avgLat.
             * @member {number} avgLat
             * @memberof perfetto.protos.MmEventRecordFtraceEvent
             * @instance
             */
            MmEventRecordFtraceEvent.prototype.avgLat = 0;

            /**
             * MmEventRecordFtraceEvent count.
             * @member {number} count
             * @memberof perfetto.protos.MmEventRecordFtraceEvent
             * @instance
             */
            MmEventRecordFtraceEvent.prototype.count = 0;

            /**
             * MmEventRecordFtraceEvent maxLat.
             * @member {number} maxLat
             * @memberof perfetto.protos.MmEventRecordFtraceEvent
             * @instance
             */
            MmEventRecordFtraceEvent.prototype.maxLat = 0;

            /**
             * MmEventRecordFtraceEvent type.
             * @member {number} type
             * @memberof perfetto.protos.MmEventRecordFtraceEvent
             * @instance
             */
            MmEventRecordFtraceEvent.prototype.type = 0;

            /**
             * Creates a new MmEventRecordFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmEventRecordFtraceEvent
             * @static
             * @param {perfetto.protos.IMmEventRecordFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmEventRecordFtraceEvent} MmEventRecordFtraceEvent instance
             */
            MmEventRecordFtraceEvent.create = function create(properties) {
                return new MmEventRecordFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmEventRecordFtraceEvent message. Does not implicitly {@link perfetto.protos.MmEventRecordFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmEventRecordFtraceEvent
             * @static
             * @param {perfetto.protos.IMmEventRecordFtraceEvent} m MmEventRecordFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmEventRecordFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.avgLat != null && Object.hasOwnProperty.call(m, "avgLat"))
                    w.uint32(8).uint32(m.avgLat);
                if (m.count != null && Object.hasOwnProperty.call(m, "count"))
                    w.uint32(16).uint32(m.count);
                if (m.maxLat != null && Object.hasOwnProperty.call(m, "maxLat"))
                    w.uint32(24).uint32(m.maxLat);
                if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                    w.uint32(32).uint32(m.type);
                return w;
            };

            /**
             * Encodes the specified MmEventRecordFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmEventRecordFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmEventRecordFtraceEvent
             * @static
             * @param {perfetto.protos.IMmEventRecordFtraceEvent} message MmEventRecordFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmEventRecordFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmEventRecordFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmEventRecordFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmEventRecordFtraceEvent} MmEventRecordFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmEventRecordFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmEventRecordFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.avgLat = r.uint32();
                        break;
                    case 2:
                        m.count = r.uint32();
                        break;
                    case 3:
                        m.maxLat = r.uint32();
                        break;
                    case 4:
                        m.type = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmEventRecordFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmEventRecordFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmEventRecordFtraceEvent} MmEventRecordFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmEventRecordFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmEventRecordFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmEventRecordFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmEventRecordFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.avgLat != null && m.hasOwnProperty("avgLat")) {
                    if (!$util.isInteger(m.avgLat))
                        return "avgLat: integer expected";
                }
                if (m.count != null && m.hasOwnProperty("count")) {
                    if (!$util.isInteger(m.count))
                        return "count: integer expected";
                }
                if (m.maxLat != null && m.hasOwnProperty("maxLat")) {
                    if (!$util.isInteger(m.maxLat))
                        return "maxLat: integer expected";
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    if (!$util.isInteger(m.type))
                        return "type: integer expected";
                }
                return null;
            };

            /**
             * Creates a MmEventRecordFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmEventRecordFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmEventRecordFtraceEvent} MmEventRecordFtraceEvent
             */
            MmEventRecordFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmEventRecordFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmEventRecordFtraceEvent();
                if (d.avgLat != null) {
                    m.avgLat = d.avgLat >>> 0;
                }
                if (d.count != null) {
                    m.count = d.count >>> 0;
                }
                if (d.maxLat != null) {
                    m.maxLat = d.maxLat >>> 0;
                }
                if (d.type != null) {
                    m.type = d.type >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MmEventRecordFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmEventRecordFtraceEvent
             * @static
             * @param {perfetto.protos.MmEventRecordFtraceEvent} m MmEventRecordFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmEventRecordFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.avgLat = 0;
                    d.count = 0;
                    d.maxLat = 0;
                    d.type = 0;
                }
                if (m.avgLat != null && m.hasOwnProperty("avgLat")) {
                    d.avgLat = m.avgLat;
                }
                if (m.count != null && m.hasOwnProperty("count")) {
                    d.count = m.count;
                }
                if (m.maxLat != null && m.hasOwnProperty("maxLat")) {
                    d.maxLat = m.maxLat;
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    d.type = m.type;
                }
                return d;
            };

            /**
             * Converts this MmEventRecordFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmEventRecordFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmEventRecordFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmEventRecordFtraceEvent;
        })();

        protos.NetifReceiveSkbFtraceEvent = (function() {

            /**
             * Properties of a NetifReceiveSkbFtraceEvent.
             * @memberof perfetto.protos
             * @interface INetifReceiveSkbFtraceEvent
             * @property {number|null} [len] NetifReceiveSkbFtraceEvent len
             * @property {string|null} [name] NetifReceiveSkbFtraceEvent name
             * @property {number|null} [skbaddr] NetifReceiveSkbFtraceEvent skbaddr
             */

            /**
             * Constructs a new NetifReceiveSkbFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a NetifReceiveSkbFtraceEvent.
             * @implements INetifReceiveSkbFtraceEvent
             * @constructor
             * @param {perfetto.protos.INetifReceiveSkbFtraceEvent=} [p] Properties to set
             */
            function NetifReceiveSkbFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * NetifReceiveSkbFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.NetifReceiveSkbFtraceEvent
             * @instance
             */
            NetifReceiveSkbFtraceEvent.prototype.len = 0;

            /**
             * NetifReceiveSkbFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.NetifReceiveSkbFtraceEvent
             * @instance
             */
            NetifReceiveSkbFtraceEvent.prototype.name = "";

            /**
             * NetifReceiveSkbFtraceEvent skbaddr.
             * @member {number} skbaddr
             * @memberof perfetto.protos.NetifReceiveSkbFtraceEvent
             * @instance
             */
            NetifReceiveSkbFtraceEvent.prototype.skbaddr = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new NetifReceiveSkbFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.NetifReceiveSkbFtraceEvent
             * @static
             * @param {perfetto.protos.INetifReceiveSkbFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.NetifReceiveSkbFtraceEvent} NetifReceiveSkbFtraceEvent instance
             */
            NetifReceiveSkbFtraceEvent.create = function create(properties) {
                return new NetifReceiveSkbFtraceEvent(properties);
            };

            /**
             * Encodes the specified NetifReceiveSkbFtraceEvent message. Does not implicitly {@link perfetto.protos.NetifReceiveSkbFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.NetifReceiveSkbFtraceEvent
             * @static
             * @param {perfetto.protos.INetifReceiveSkbFtraceEvent} m NetifReceiveSkbFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            NetifReceiveSkbFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(8).uint32(m.len);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(18).string(m.name);
                if (m.skbaddr != null && Object.hasOwnProperty.call(m, "skbaddr"))
                    w.uint32(24).uint64(m.skbaddr);
                return w;
            };

            /**
             * Encodes the specified NetifReceiveSkbFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.NetifReceiveSkbFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.NetifReceiveSkbFtraceEvent
             * @static
             * @param {perfetto.protos.INetifReceiveSkbFtraceEvent} message NetifReceiveSkbFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            NetifReceiveSkbFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a NetifReceiveSkbFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.NetifReceiveSkbFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.NetifReceiveSkbFtraceEvent} NetifReceiveSkbFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            NetifReceiveSkbFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.NetifReceiveSkbFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.len = r.uint32();
                        break;
                    case 2:
                        m.name = r.string();
                        break;
                    case 3:
                        m.skbaddr = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a NetifReceiveSkbFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.NetifReceiveSkbFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.NetifReceiveSkbFtraceEvent} NetifReceiveSkbFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            NetifReceiveSkbFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a NetifReceiveSkbFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.NetifReceiveSkbFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            NetifReceiveSkbFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.skbaddr != null && m.hasOwnProperty("skbaddr")) {
                    if (!$util.isInteger(m.skbaddr) && !(m.skbaddr && $util.isInteger(m.skbaddr.low) && $util.isInteger(m.skbaddr.high)))
                        return "skbaddr: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a NetifReceiveSkbFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.NetifReceiveSkbFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.NetifReceiveSkbFtraceEvent} NetifReceiveSkbFtraceEvent
             */
            NetifReceiveSkbFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.NetifReceiveSkbFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.NetifReceiveSkbFtraceEvent();
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.skbaddr != null) {
                    if ($util.Long)
                        (m.skbaddr = $util.Long.fromValue(d.skbaddr)).unsigned = true;
                    else if (typeof d.skbaddr === "string")
                        m.skbaddr = parseInt(d.skbaddr, 10);
                    else if (typeof d.skbaddr === "number")
                        m.skbaddr = d.skbaddr;
                    else if (typeof d.skbaddr === "object")
                        m.skbaddr = new $util.LongBits(d.skbaddr.low >>> 0, d.skbaddr.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a NetifReceiveSkbFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.NetifReceiveSkbFtraceEvent
             * @static
             * @param {perfetto.protos.NetifReceiveSkbFtraceEvent} m NetifReceiveSkbFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            NetifReceiveSkbFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.len = 0;
                    d.name = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.skbaddr = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.skbaddr = o.longs === String ? "0" : 0;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.skbaddr != null && m.hasOwnProperty("skbaddr")) {
                    if (typeof m.skbaddr === "number")
                        d.skbaddr = o.longs === String ? String(m.skbaddr) : m.skbaddr;
                    else
                        d.skbaddr = o.longs === String ? $util.Long.prototype.toString.call(m.skbaddr) : o.longs === Number ? new $util.LongBits(m.skbaddr.low >>> 0, m.skbaddr.high >>> 0).toNumber(true) : m.skbaddr;
                }
                return d;
            };

            /**
             * Converts this NetifReceiveSkbFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.NetifReceiveSkbFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            NetifReceiveSkbFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return NetifReceiveSkbFtraceEvent;
        })();

        protos.NetDevXmitFtraceEvent = (function() {

            /**
             * Properties of a NetDevXmitFtraceEvent.
             * @memberof perfetto.protos
             * @interface INetDevXmitFtraceEvent
             * @property {number|null} [len] NetDevXmitFtraceEvent len
             * @property {string|null} [name] NetDevXmitFtraceEvent name
             * @property {number|null} [rc] NetDevXmitFtraceEvent rc
             * @property {number|null} [skbaddr] NetDevXmitFtraceEvent skbaddr
             */

            /**
             * Constructs a new NetDevXmitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a NetDevXmitFtraceEvent.
             * @implements INetDevXmitFtraceEvent
             * @constructor
             * @param {perfetto.protos.INetDevXmitFtraceEvent=} [p] Properties to set
             */
            function NetDevXmitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * NetDevXmitFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.NetDevXmitFtraceEvent
             * @instance
             */
            NetDevXmitFtraceEvent.prototype.len = 0;

            /**
             * NetDevXmitFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.NetDevXmitFtraceEvent
             * @instance
             */
            NetDevXmitFtraceEvent.prototype.name = "";

            /**
             * NetDevXmitFtraceEvent rc.
             * @member {number} rc
             * @memberof perfetto.protos.NetDevXmitFtraceEvent
             * @instance
             */
            NetDevXmitFtraceEvent.prototype.rc = 0;

            /**
             * NetDevXmitFtraceEvent skbaddr.
             * @member {number} skbaddr
             * @memberof perfetto.protos.NetDevXmitFtraceEvent
             * @instance
             */
            NetDevXmitFtraceEvent.prototype.skbaddr = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new NetDevXmitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.NetDevXmitFtraceEvent
             * @static
             * @param {perfetto.protos.INetDevXmitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.NetDevXmitFtraceEvent} NetDevXmitFtraceEvent instance
             */
            NetDevXmitFtraceEvent.create = function create(properties) {
                return new NetDevXmitFtraceEvent(properties);
            };

            /**
             * Encodes the specified NetDevXmitFtraceEvent message. Does not implicitly {@link perfetto.protos.NetDevXmitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.NetDevXmitFtraceEvent
             * @static
             * @param {perfetto.protos.INetDevXmitFtraceEvent} m NetDevXmitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            NetDevXmitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(8).uint32(m.len);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(18).string(m.name);
                if (m.rc != null && Object.hasOwnProperty.call(m, "rc"))
                    w.uint32(24).int32(m.rc);
                if (m.skbaddr != null && Object.hasOwnProperty.call(m, "skbaddr"))
                    w.uint32(32).uint64(m.skbaddr);
                return w;
            };

            /**
             * Encodes the specified NetDevXmitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.NetDevXmitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.NetDevXmitFtraceEvent
             * @static
             * @param {perfetto.protos.INetDevXmitFtraceEvent} message NetDevXmitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            NetDevXmitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a NetDevXmitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.NetDevXmitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.NetDevXmitFtraceEvent} NetDevXmitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            NetDevXmitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.NetDevXmitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.len = r.uint32();
                        break;
                    case 2:
                        m.name = r.string();
                        break;
                    case 3:
                        m.rc = r.int32();
                        break;
                    case 4:
                        m.skbaddr = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a NetDevXmitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.NetDevXmitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.NetDevXmitFtraceEvent} NetDevXmitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            NetDevXmitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a NetDevXmitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.NetDevXmitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            NetDevXmitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.rc != null && m.hasOwnProperty("rc")) {
                    if (!$util.isInteger(m.rc))
                        return "rc: integer expected";
                }
                if (m.skbaddr != null && m.hasOwnProperty("skbaddr")) {
                    if (!$util.isInteger(m.skbaddr) && !(m.skbaddr && $util.isInteger(m.skbaddr.low) && $util.isInteger(m.skbaddr.high)))
                        return "skbaddr: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a NetDevXmitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.NetDevXmitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.NetDevXmitFtraceEvent} NetDevXmitFtraceEvent
             */
            NetDevXmitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.NetDevXmitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.NetDevXmitFtraceEvent();
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.rc != null) {
                    m.rc = d.rc | 0;
                }
                if (d.skbaddr != null) {
                    if ($util.Long)
                        (m.skbaddr = $util.Long.fromValue(d.skbaddr)).unsigned = true;
                    else if (typeof d.skbaddr === "string")
                        m.skbaddr = parseInt(d.skbaddr, 10);
                    else if (typeof d.skbaddr === "number")
                        m.skbaddr = d.skbaddr;
                    else if (typeof d.skbaddr === "object")
                        m.skbaddr = new $util.LongBits(d.skbaddr.low >>> 0, d.skbaddr.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a NetDevXmitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.NetDevXmitFtraceEvent
             * @static
             * @param {perfetto.protos.NetDevXmitFtraceEvent} m NetDevXmitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            NetDevXmitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.len = 0;
                    d.name = "";
                    d.rc = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.skbaddr = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.skbaddr = o.longs === String ? "0" : 0;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.rc != null && m.hasOwnProperty("rc")) {
                    d.rc = m.rc;
                }
                if (m.skbaddr != null && m.hasOwnProperty("skbaddr")) {
                    if (typeof m.skbaddr === "number")
                        d.skbaddr = o.longs === String ? String(m.skbaddr) : m.skbaddr;
                    else
                        d.skbaddr = o.longs === String ? $util.Long.prototype.toString.call(m.skbaddr) : o.longs === Number ? new $util.LongBits(m.skbaddr.low >>> 0, m.skbaddr.high >>> 0).toNumber(true) : m.skbaddr;
                }
                return d;
            };

            /**
             * Converts this NetDevXmitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.NetDevXmitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            NetDevXmitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return NetDevXmitFtraceEvent;
        })();

        protos.NapiGroReceiveEntryFtraceEvent = (function() {

            /**
             * Properties of a NapiGroReceiveEntryFtraceEvent.
             * @memberof perfetto.protos
             * @interface INapiGroReceiveEntryFtraceEvent
             * @property {number|null} [dataLen] NapiGroReceiveEntryFtraceEvent dataLen
             * @property {number|null} [gsoSize] NapiGroReceiveEntryFtraceEvent gsoSize
             * @property {number|null} [gsoType] NapiGroReceiveEntryFtraceEvent gsoType
             * @property {number|null} [hash] NapiGroReceiveEntryFtraceEvent hash
             * @property {number|null} [ipSummed] NapiGroReceiveEntryFtraceEvent ipSummed
             * @property {number|null} [l4Hash] NapiGroReceiveEntryFtraceEvent l4Hash
             * @property {number|null} [len] NapiGroReceiveEntryFtraceEvent len
             * @property {number|null} [macHeader] NapiGroReceiveEntryFtraceEvent macHeader
             * @property {number|null} [macHeaderValid] NapiGroReceiveEntryFtraceEvent macHeaderValid
             * @property {string|null} [name] NapiGroReceiveEntryFtraceEvent name
             * @property {number|null} [napiId] NapiGroReceiveEntryFtraceEvent napiId
             * @property {number|null} [nrFrags] NapiGroReceiveEntryFtraceEvent nrFrags
             * @property {number|null} [protocol] NapiGroReceiveEntryFtraceEvent protocol
             * @property {number|null} [queueMapping] NapiGroReceiveEntryFtraceEvent queueMapping
             * @property {number|null} [skbaddr] NapiGroReceiveEntryFtraceEvent skbaddr
             * @property {number|null} [truesize] NapiGroReceiveEntryFtraceEvent truesize
             * @property {number|null} [vlanProto] NapiGroReceiveEntryFtraceEvent vlanProto
             * @property {number|null} [vlanTagged] NapiGroReceiveEntryFtraceEvent vlanTagged
             * @property {number|null} [vlanTci] NapiGroReceiveEntryFtraceEvent vlanTci
             */

            /**
             * Constructs a new NapiGroReceiveEntryFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a NapiGroReceiveEntryFtraceEvent.
             * @implements INapiGroReceiveEntryFtraceEvent
             * @constructor
             * @param {perfetto.protos.INapiGroReceiveEntryFtraceEvent=} [p] Properties to set
             */
            function NapiGroReceiveEntryFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * NapiGroReceiveEntryFtraceEvent dataLen.
             * @member {number} dataLen
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @instance
             */
            NapiGroReceiveEntryFtraceEvent.prototype.dataLen = 0;

            /**
             * NapiGroReceiveEntryFtraceEvent gsoSize.
             * @member {number} gsoSize
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @instance
             */
            NapiGroReceiveEntryFtraceEvent.prototype.gsoSize = 0;

            /**
             * NapiGroReceiveEntryFtraceEvent gsoType.
             * @member {number} gsoType
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @instance
             */
            NapiGroReceiveEntryFtraceEvent.prototype.gsoType = 0;

            /**
             * NapiGroReceiveEntryFtraceEvent hash.
             * @member {number} hash
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @instance
             */
            NapiGroReceiveEntryFtraceEvent.prototype.hash = 0;

            /**
             * NapiGroReceiveEntryFtraceEvent ipSummed.
             * @member {number} ipSummed
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @instance
             */
            NapiGroReceiveEntryFtraceEvent.prototype.ipSummed = 0;

            /**
             * NapiGroReceiveEntryFtraceEvent l4Hash.
             * @member {number} l4Hash
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @instance
             */
            NapiGroReceiveEntryFtraceEvent.prototype.l4Hash = 0;

            /**
             * NapiGroReceiveEntryFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @instance
             */
            NapiGroReceiveEntryFtraceEvent.prototype.len = 0;

            /**
             * NapiGroReceiveEntryFtraceEvent macHeader.
             * @member {number} macHeader
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @instance
             */
            NapiGroReceiveEntryFtraceEvent.prototype.macHeader = 0;

            /**
             * NapiGroReceiveEntryFtraceEvent macHeaderValid.
             * @member {number} macHeaderValid
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @instance
             */
            NapiGroReceiveEntryFtraceEvent.prototype.macHeaderValid = 0;

            /**
             * NapiGroReceiveEntryFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @instance
             */
            NapiGroReceiveEntryFtraceEvent.prototype.name = "";

            /**
             * NapiGroReceiveEntryFtraceEvent napiId.
             * @member {number} napiId
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @instance
             */
            NapiGroReceiveEntryFtraceEvent.prototype.napiId = 0;

            /**
             * NapiGroReceiveEntryFtraceEvent nrFrags.
             * @member {number} nrFrags
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @instance
             */
            NapiGroReceiveEntryFtraceEvent.prototype.nrFrags = 0;

            /**
             * NapiGroReceiveEntryFtraceEvent protocol.
             * @member {number} protocol
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @instance
             */
            NapiGroReceiveEntryFtraceEvent.prototype.protocol = 0;

            /**
             * NapiGroReceiveEntryFtraceEvent queueMapping.
             * @member {number} queueMapping
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @instance
             */
            NapiGroReceiveEntryFtraceEvent.prototype.queueMapping = 0;

            /**
             * NapiGroReceiveEntryFtraceEvent skbaddr.
             * @member {number} skbaddr
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @instance
             */
            NapiGroReceiveEntryFtraceEvent.prototype.skbaddr = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * NapiGroReceiveEntryFtraceEvent truesize.
             * @member {number} truesize
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @instance
             */
            NapiGroReceiveEntryFtraceEvent.prototype.truesize = 0;

            /**
             * NapiGroReceiveEntryFtraceEvent vlanProto.
             * @member {number} vlanProto
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @instance
             */
            NapiGroReceiveEntryFtraceEvent.prototype.vlanProto = 0;

            /**
             * NapiGroReceiveEntryFtraceEvent vlanTagged.
             * @member {number} vlanTagged
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @instance
             */
            NapiGroReceiveEntryFtraceEvent.prototype.vlanTagged = 0;

            /**
             * NapiGroReceiveEntryFtraceEvent vlanTci.
             * @member {number} vlanTci
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @instance
             */
            NapiGroReceiveEntryFtraceEvent.prototype.vlanTci = 0;

            /**
             * Creates a new NapiGroReceiveEntryFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @static
             * @param {perfetto.protos.INapiGroReceiveEntryFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.NapiGroReceiveEntryFtraceEvent} NapiGroReceiveEntryFtraceEvent instance
             */
            NapiGroReceiveEntryFtraceEvent.create = function create(properties) {
                return new NapiGroReceiveEntryFtraceEvent(properties);
            };

            /**
             * Encodes the specified NapiGroReceiveEntryFtraceEvent message. Does not implicitly {@link perfetto.protos.NapiGroReceiveEntryFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @static
             * @param {perfetto.protos.INapiGroReceiveEntryFtraceEvent} m NapiGroReceiveEntryFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            NapiGroReceiveEntryFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dataLen != null && Object.hasOwnProperty.call(m, "dataLen"))
                    w.uint32(8).uint32(m.dataLen);
                if (m.gsoSize != null && Object.hasOwnProperty.call(m, "gsoSize"))
                    w.uint32(16).uint32(m.gsoSize);
                if (m.gsoType != null && Object.hasOwnProperty.call(m, "gsoType"))
                    w.uint32(24).uint32(m.gsoType);
                if (m.hash != null && Object.hasOwnProperty.call(m, "hash"))
                    w.uint32(32).uint32(m.hash);
                if (m.ipSummed != null && Object.hasOwnProperty.call(m, "ipSummed"))
                    w.uint32(40).uint32(m.ipSummed);
                if (m.l4Hash != null && Object.hasOwnProperty.call(m, "l4Hash"))
                    w.uint32(48).uint32(m.l4Hash);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(56).uint32(m.len);
                if (m.macHeader != null && Object.hasOwnProperty.call(m, "macHeader"))
                    w.uint32(64).int32(m.macHeader);
                if (m.macHeaderValid != null && Object.hasOwnProperty.call(m, "macHeaderValid"))
                    w.uint32(72).uint32(m.macHeaderValid);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(82).string(m.name);
                if (m.napiId != null && Object.hasOwnProperty.call(m, "napiId"))
                    w.uint32(88).uint32(m.napiId);
                if (m.nrFrags != null && Object.hasOwnProperty.call(m, "nrFrags"))
                    w.uint32(96).uint32(m.nrFrags);
                if (m.protocol != null && Object.hasOwnProperty.call(m, "protocol"))
                    w.uint32(104).uint32(m.protocol);
                if (m.queueMapping != null && Object.hasOwnProperty.call(m, "queueMapping"))
                    w.uint32(112).uint32(m.queueMapping);
                if (m.skbaddr != null && Object.hasOwnProperty.call(m, "skbaddr"))
                    w.uint32(120).uint64(m.skbaddr);
                if (m.truesize != null && Object.hasOwnProperty.call(m, "truesize"))
                    w.uint32(128).uint32(m.truesize);
                if (m.vlanProto != null && Object.hasOwnProperty.call(m, "vlanProto"))
                    w.uint32(136).uint32(m.vlanProto);
                if (m.vlanTagged != null && Object.hasOwnProperty.call(m, "vlanTagged"))
                    w.uint32(144).uint32(m.vlanTagged);
                if (m.vlanTci != null && Object.hasOwnProperty.call(m, "vlanTci"))
                    w.uint32(152).uint32(m.vlanTci);
                return w;
            };

            /**
             * Encodes the specified NapiGroReceiveEntryFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.NapiGroReceiveEntryFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @static
             * @param {perfetto.protos.INapiGroReceiveEntryFtraceEvent} message NapiGroReceiveEntryFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            NapiGroReceiveEntryFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a NapiGroReceiveEntryFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.NapiGroReceiveEntryFtraceEvent} NapiGroReceiveEntryFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            NapiGroReceiveEntryFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.NapiGroReceiveEntryFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dataLen = r.uint32();
                        break;
                    case 2:
                        m.gsoSize = r.uint32();
                        break;
                    case 3:
                        m.gsoType = r.uint32();
                        break;
                    case 4:
                        m.hash = r.uint32();
                        break;
                    case 5:
                        m.ipSummed = r.uint32();
                        break;
                    case 6:
                        m.l4Hash = r.uint32();
                        break;
                    case 7:
                        m.len = r.uint32();
                        break;
                    case 8:
                        m.macHeader = r.int32();
                        break;
                    case 9:
                        m.macHeaderValid = r.uint32();
                        break;
                    case 10:
                        m.name = r.string();
                        break;
                    case 11:
                        m.napiId = r.uint32();
                        break;
                    case 12:
                        m.nrFrags = r.uint32();
                        break;
                    case 13:
                        m.protocol = r.uint32();
                        break;
                    case 14:
                        m.queueMapping = r.uint32();
                        break;
                    case 15:
                        m.skbaddr = r.uint64();
                        break;
                    case 16:
                        m.truesize = r.uint32();
                        break;
                    case 17:
                        m.vlanProto = r.uint32();
                        break;
                    case 18:
                        m.vlanTagged = r.uint32();
                        break;
                    case 19:
                        m.vlanTci = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a NapiGroReceiveEntryFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.NapiGroReceiveEntryFtraceEvent} NapiGroReceiveEntryFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            NapiGroReceiveEntryFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a NapiGroReceiveEntryFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            NapiGroReceiveEntryFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dataLen != null && m.hasOwnProperty("dataLen")) {
                    if (!$util.isInteger(m.dataLen))
                        return "dataLen: integer expected";
                }
                if (m.gsoSize != null && m.hasOwnProperty("gsoSize")) {
                    if (!$util.isInteger(m.gsoSize))
                        return "gsoSize: integer expected";
                }
                if (m.gsoType != null && m.hasOwnProperty("gsoType")) {
                    if (!$util.isInteger(m.gsoType))
                        return "gsoType: integer expected";
                }
                if (m.hash != null && m.hasOwnProperty("hash")) {
                    if (!$util.isInteger(m.hash))
                        return "hash: integer expected";
                }
                if (m.ipSummed != null && m.hasOwnProperty("ipSummed")) {
                    if (!$util.isInteger(m.ipSummed))
                        return "ipSummed: integer expected";
                }
                if (m.l4Hash != null && m.hasOwnProperty("l4Hash")) {
                    if (!$util.isInteger(m.l4Hash))
                        return "l4Hash: integer expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len))
                        return "len: integer expected";
                }
                if (m.macHeader != null && m.hasOwnProperty("macHeader")) {
                    if (!$util.isInteger(m.macHeader))
                        return "macHeader: integer expected";
                }
                if (m.macHeaderValid != null && m.hasOwnProperty("macHeaderValid")) {
                    if (!$util.isInteger(m.macHeaderValid))
                        return "macHeaderValid: integer expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.napiId != null && m.hasOwnProperty("napiId")) {
                    if (!$util.isInteger(m.napiId))
                        return "napiId: integer expected";
                }
                if (m.nrFrags != null && m.hasOwnProperty("nrFrags")) {
                    if (!$util.isInteger(m.nrFrags))
                        return "nrFrags: integer expected";
                }
                if (m.protocol != null && m.hasOwnProperty("protocol")) {
                    if (!$util.isInteger(m.protocol))
                        return "protocol: integer expected";
                }
                if (m.queueMapping != null && m.hasOwnProperty("queueMapping")) {
                    if (!$util.isInteger(m.queueMapping))
                        return "queueMapping: integer expected";
                }
                if (m.skbaddr != null && m.hasOwnProperty("skbaddr")) {
                    if (!$util.isInteger(m.skbaddr) && !(m.skbaddr && $util.isInteger(m.skbaddr.low) && $util.isInteger(m.skbaddr.high)))
                        return "skbaddr: integer|Long expected";
                }
                if (m.truesize != null && m.hasOwnProperty("truesize")) {
                    if (!$util.isInteger(m.truesize))
                        return "truesize: integer expected";
                }
                if (m.vlanProto != null && m.hasOwnProperty("vlanProto")) {
                    if (!$util.isInteger(m.vlanProto))
                        return "vlanProto: integer expected";
                }
                if (m.vlanTagged != null && m.hasOwnProperty("vlanTagged")) {
                    if (!$util.isInteger(m.vlanTagged))
                        return "vlanTagged: integer expected";
                }
                if (m.vlanTci != null && m.hasOwnProperty("vlanTci")) {
                    if (!$util.isInteger(m.vlanTci))
                        return "vlanTci: integer expected";
                }
                return null;
            };

            /**
             * Creates a NapiGroReceiveEntryFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.NapiGroReceiveEntryFtraceEvent} NapiGroReceiveEntryFtraceEvent
             */
            NapiGroReceiveEntryFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.NapiGroReceiveEntryFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.NapiGroReceiveEntryFtraceEvent();
                if (d.dataLen != null) {
                    m.dataLen = d.dataLen >>> 0;
                }
                if (d.gsoSize != null) {
                    m.gsoSize = d.gsoSize >>> 0;
                }
                if (d.gsoType != null) {
                    m.gsoType = d.gsoType >>> 0;
                }
                if (d.hash != null) {
                    m.hash = d.hash >>> 0;
                }
                if (d.ipSummed != null) {
                    m.ipSummed = d.ipSummed >>> 0;
                }
                if (d.l4Hash != null) {
                    m.l4Hash = d.l4Hash >>> 0;
                }
                if (d.len != null) {
                    m.len = d.len >>> 0;
                }
                if (d.macHeader != null) {
                    m.macHeader = d.macHeader | 0;
                }
                if (d.macHeaderValid != null) {
                    m.macHeaderValid = d.macHeaderValid >>> 0;
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.napiId != null) {
                    m.napiId = d.napiId >>> 0;
                }
                if (d.nrFrags != null) {
                    m.nrFrags = d.nrFrags >>> 0;
                }
                if (d.protocol != null) {
                    m.protocol = d.protocol >>> 0;
                }
                if (d.queueMapping != null) {
                    m.queueMapping = d.queueMapping >>> 0;
                }
                if (d.skbaddr != null) {
                    if ($util.Long)
                        (m.skbaddr = $util.Long.fromValue(d.skbaddr)).unsigned = true;
                    else if (typeof d.skbaddr === "string")
                        m.skbaddr = parseInt(d.skbaddr, 10);
                    else if (typeof d.skbaddr === "number")
                        m.skbaddr = d.skbaddr;
                    else if (typeof d.skbaddr === "object")
                        m.skbaddr = new $util.LongBits(d.skbaddr.low >>> 0, d.skbaddr.high >>> 0).toNumber(true);
                }
                if (d.truesize != null) {
                    m.truesize = d.truesize >>> 0;
                }
                if (d.vlanProto != null) {
                    m.vlanProto = d.vlanProto >>> 0;
                }
                if (d.vlanTagged != null) {
                    m.vlanTagged = d.vlanTagged >>> 0;
                }
                if (d.vlanTci != null) {
                    m.vlanTci = d.vlanTci >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a NapiGroReceiveEntryFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @static
             * @param {perfetto.protos.NapiGroReceiveEntryFtraceEvent} m NapiGroReceiveEntryFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            NapiGroReceiveEntryFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.dataLen = 0;
                    d.gsoSize = 0;
                    d.gsoType = 0;
                    d.hash = 0;
                    d.ipSummed = 0;
                    d.l4Hash = 0;
                    d.len = 0;
                    d.macHeader = 0;
                    d.macHeaderValid = 0;
                    d.name = "";
                    d.napiId = 0;
                    d.nrFrags = 0;
                    d.protocol = 0;
                    d.queueMapping = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.skbaddr = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.skbaddr = o.longs === String ? "0" : 0;
                    d.truesize = 0;
                    d.vlanProto = 0;
                    d.vlanTagged = 0;
                    d.vlanTci = 0;
                }
                if (m.dataLen != null && m.hasOwnProperty("dataLen")) {
                    d.dataLen = m.dataLen;
                }
                if (m.gsoSize != null && m.hasOwnProperty("gsoSize")) {
                    d.gsoSize = m.gsoSize;
                }
                if (m.gsoType != null && m.hasOwnProperty("gsoType")) {
                    d.gsoType = m.gsoType;
                }
                if (m.hash != null && m.hasOwnProperty("hash")) {
                    d.hash = m.hash;
                }
                if (m.ipSummed != null && m.hasOwnProperty("ipSummed")) {
                    d.ipSummed = m.ipSummed;
                }
                if (m.l4Hash != null && m.hasOwnProperty("l4Hash")) {
                    d.l4Hash = m.l4Hash;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    d.len = m.len;
                }
                if (m.macHeader != null && m.hasOwnProperty("macHeader")) {
                    d.macHeader = m.macHeader;
                }
                if (m.macHeaderValid != null && m.hasOwnProperty("macHeaderValid")) {
                    d.macHeaderValid = m.macHeaderValid;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.napiId != null && m.hasOwnProperty("napiId")) {
                    d.napiId = m.napiId;
                }
                if (m.nrFrags != null && m.hasOwnProperty("nrFrags")) {
                    d.nrFrags = m.nrFrags;
                }
                if (m.protocol != null && m.hasOwnProperty("protocol")) {
                    d.protocol = m.protocol;
                }
                if (m.queueMapping != null && m.hasOwnProperty("queueMapping")) {
                    d.queueMapping = m.queueMapping;
                }
                if (m.skbaddr != null && m.hasOwnProperty("skbaddr")) {
                    if (typeof m.skbaddr === "number")
                        d.skbaddr = o.longs === String ? String(m.skbaddr) : m.skbaddr;
                    else
                        d.skbaddr = o.longs === String ? $util.Long.prototype.toString.call(m.skbaddr) : o.longs === Number ? new $util.LongBits(m.skbaddr.low >>> 0, m.skbaddr.high >>> 0).toNumber(true) : m.skbaddr;
                }
                if (m.truesize != null && m.hasOwnProperty("truesize")) {
                    d.truesize = m.truesize;
                }
                if (m.vlanProto != null && m.hasOwnProperty("vlanProto")) {
                    d.vlanProto = m.vlanProto;
                }
                if (m.vlanTagged != null && m.hasOwnProperty("vlanTagged")) {
                    d.vlanTagged = m.vlanTagged;
                }
                if (m.vlanTci != null && m.hasOwnProperty("vlanTci")) {
                    d.vlanTci = m.vlanTci;
                }
                return d;
            };

            /**
             * Converts this NapiGroReceiveEntryFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.NapiGroReceiveEntryFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            NapiGroReceiveEntryFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return NapiGroReceiveEntryFtraceEvent;
        })();

        protos.NapiGroReceiveExitFtraceEvent = (function() {

            /**
             * Properties of a NapiGroReceiveExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface INapiGroReceiveExitFtraceEvent
             * @property {number|null} [ret] NapiGroReceiveExitFtraceEvent ret
             */

            /**
             * Constructs a new NapiGroReceiveExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a NapiGroReceiveExitFtraceEvent.
             * @implements INapiGroReceiveExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.INapiGroReceiveExitFtraceEvent=} [p] Properties to set
             */
            function NapiGroReceiveExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * NapiGroReceiveExitFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.NapiGroReceiveExitFtraceEvent
             * @instance
             */
            NapiGroReceiveExitFtraceEvent.prototype.ret = 0;

            /**
             * Creates a new NapiGroReceiveExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.NapiGroReceiveExitFtraceEvent
             * @static
             * @param {perfetto.protos.INapiGroReceiveExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.NapiGroReceiveExitFtraceEvent} NapiGroReceiveExitFtraceEvent instance
             */
            NapiGroReceiveExitFtraceEvent.create = function create(properties) {
                return new NapiGroReceiveExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified NapiGroReceiveExitFtraceEvent message. Does not implicitly {@link perfetto.protos.NapiGroReceiveExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.NapiGroReceiveExitFtraceEvent
             * @static
             * @param {perfetto.protos.INapiGroReceiveExitFtraceEvent} m NapiGroReceiveExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            NapiGroReceiveExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(8).int32(m.ret);
                return w;
            };

            /**
             * Encodes the specified NapiGroReceiveExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.NapiGroReceiveExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.NapiGroReceiveExitFtraceEvent
             * @static
             * @param {perfetto.protos.INapiGroReceiveExitFtraceEvent} message NapiGroReceiveExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            NapiGroReceiveExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a NapiGroReceiveExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.NapiGroReceiveExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.NapiGroReceiveExitFtraceEvent} NapiGroReceiveExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            NapiGroReceiveExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.NapiGroReceiveExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.ret = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a NapiGroReceiveExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.NapiGroReceiveExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.NapiGroReceiveExitFtraceEvent} NapiGroReceiveExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            NapiGroReceiveExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a NapiGroReceiveExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.NapiGroReceiveExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            NapiGroReceiveExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                return null;
            };

            /**
             * Creates a NapiGroReceiveExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.NapiGroReceiveExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.NapiGroReceiveExitFtraceEvent} NapiGroReceiveExitFtraceEvent
             */
            NapiGroReceiveExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.NapiGroReceiveExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.NapiGroReceiveExitFtraceEvent();
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a NapiGroReceiveExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.NapiGroReceiveExitFtraceEvent
             * @static
             * @param {perfetto.protos.NapiGroReceiveExitFtraceEvent} m NapiGroReceiveExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            NapiGroReceiveExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.ret = 0;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                return d;
            };

            /**
             * Converts this NapiGroReceiveExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.NapiGroReceiveExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            NapiGroReceiveExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return NapiGroReceiveExitFtraceEvent;
        })();

        protos.OomScoreAdjUpdateFtraceEvent = (function() {

            /**
             * Properties of an OomScoreAdjUpdateFtraceEvent.
             * @memberof perfetto.protos
             * @interface IOomScoreAdjUpdateFtraceEvent
             * @property {string|null} [comm] OomScoreAdjUpdateFtraceEvent comm
             * @property {number|null} [oomScoreAdj] OomScoreAdjUpdateFtraceEvent oomScoreAdj
             * @property {number|null} [pid] OomScoreAdjUpdateFtraceEvent pid
             */

            /**
             * Constructs a new OomScoreAdjUpdateFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an OomScoreAdjUpdateFtraceEvent.
             * @implements IOomScoreAdjUpdateFtraceEvent
             * @constructor
             * @param {perfetto.protos.IOomScoreAdjUpdateFtraceEvent=} [p] Properties to set
             */
            function OomScoreAdjUpdateFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * OomScoreAdjUpdateFtraceEvent comm.
             * @member {string} comm
             * @memberof perfetto.protos.OomScoreAdjUpdateFtraceEvent
             * @instance
             */
            OomScoreAdjUpdateFtraceEvent.prototype.comm = "";

            /**
             * OomScoreAdjUpdateFtraceEvent oomScoreAdj.
             * @member {number} oomScoreAdj
             * @memberof perfetto.protos.OomScoreAdjUpdateFtraceEvent
             * @instance
             */
            OomScoreAdjUpdateFtraceEvent.prototype.oomScoreAdj = 0;

            /**
             * OomScoreAdjUpdateFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.OomScoreAdjUpdateFtraceEvent
             * @instance
             */
            OomScoreAdjUpdateFtraceEvent.prototype.pid = 0;

            /**
             * Creates a new OomScoreAdjUpdateFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.OomScoreAdjUpdateFtraceEvent
             * @static
             * @param {perfetto.protos.IOomScoreAdjUpdateFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.OomScoreAdjUpdateFtraceEvent} OomScoreAdjUpdateFtraceEvent instance
             */
            OomScoreAdjUpdateFtraceEvent.create = function create(properties) {
                return new OomScoreAdjUpdateFtraceEvent(properties);
            };

            /**
             * Encodes the specified OomScoreAdjUpdateFtraceEvent message. Does not implicitly {@link perfetto.protos.OomScoreAdjUpdateFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.OomScoreAdjUpdateFtraceEvent
             * @static
             * @param {perfetto.protos.IOomScoreAdjUpdateFtraceEvent} m OomScoreAdjUpdateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            OomScoreAdjUpdateFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.comm != null && Object.hasOwnProperty.call(m, "comm"))
                    w.uint32(10).string(m.comm);
                if (m.oomScoreAdj != null && Object.hasOwnProperty.call(m, "oomScoreAdj"))
                    w.uint32(16).int32(m.oomScoreAdj);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(24).int32(m.pid);
                return w;
            };

            /**
             * Encodes the specified OomScoreAdjUpdateFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.OomScoreAdjUpdateFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.OomScoreAdjUpdateFtraceEvent
             * @static
             * @param {perfetto.protos.IOomScoreAdjUpdateFtraceEvent} message OomScoreAdjUpdateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            OomScoreAdjUpdateFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an OomScoreAdjUpdateFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.OomScoreAdjUpdateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.OomScoreAdjUpdateFtraceEvent} OomScoreAdjUpdateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            OomScoreAdjUpdateFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.OomScoreAdjUpdateFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.comm = r.string();
                        break;
                    case 2:
                        m.oomScoreAdj = r.int32();
                        break;
                    case 3:
                        m.pid = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an OomScoreAdjUpdateFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.OomScoreAdjUpdateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.OomScoreAdjUpdateFtraceEvent} OomScoreAdjUpdateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            OomScoreAdjUpdateFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an OomScoreAdjUpdateFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.OomScoreAdjUpdateFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            OomScoreAdjUpdateFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    if (!$util.isString(m.comm))
                        return "comm: string expected";
                }
                if (m.oomScoreAdj != null && m.hasOwnProperty("oomScoreAdj")) {
                    if (!$util.isInteger(m.oomScoreAdj))
                        return "oomScoreAdj: integer expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                return null;
            };

            /**
             * Creates an OomScoreAdjUpdateFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.OomScoreAdjUpdateFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.OomScoreAdjUpdateFtraceEvent} OomScoreAdjUpdateFtraceEvent
             */
            OomScoreAdjUpdateFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.OomScoreAdjUpdateFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.OomScoreAdjUpdateFtraceEvent();
                if (d.comm != null) {
                    m.comm = String(d.comm);
                }
                if (d.oomScoreAdj != null) {
                    m.oomScoreAdj = d.oomScoreAdj | 0;
                }
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an OomScoreAdjUpdateFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.OomScoreAdjUpdateFtraceEvent
             * @static
             * @param {perfetto.protos.OomScoreAdjUpdateFtraceEvent} m OomScoreAdjUpdateFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            OomScoreAdjUpdateFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.comm = "";
                    d.oomScoreAdj = 0;
                    d.pid = 0;
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    d.comm = m.comm;
                }
                if (m.oomScoreAdj != null && m.hasOwnProperty("oomScoreAdj")) {
                    d.oomScoreAdj = m.oomScoreAdj;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                return d;
            };

            /**
             * Converts this OomScoreAdjUpdateFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.OomScoreAdjUpdateFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            OomScoreAdjUpdateFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return OomScoreAdjUpdateFtraceEvent;
        })();

        protos.MarkVictimFtraceEvent = (function() {

            /**
             * Properties of a MarkVictimFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMarkVictimFtraceEvent
             * @property {number|null} [pid] MarkVictimFtraceEvent pid
             */

            /**
             * Constructs a new MarkVictimFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MarkVictimFtraceEvent.
             * @implements IMarkVictimFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMarkVictimFtraceEvent=} [p] Properties to set
             */
            function MarkVictimFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MarkVictimFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.MarkVictimFtraceEvent
             * @instance
             */
            MarkVictimFtraceEvent.prototype.pid = 0;

            /**
             * Creates a new MarkVictimFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MarkVictimFtraceEvent
             * @static
             * @param {perfetto.protos.IMarkVictimFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MarkVictimFtraceEvent} MarkVictimFtraceEvent instance
             */
            MarkVictimFtraceEvent.create = function create(properties) {
                return new MarkVictimFtraceEvent(properties);
            };

            /**
             * Encodes the specified MarkVictimFtraceEvent message. Does not implicitly {@link perfetto.protos.MarkVictimFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MarkVictimFtraceEvent
             * @static
             * @param {perfetto.protos.IMarkVictimFtraceEvent} m MarkVictimFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MarkVictimFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(8).int32(m.pid);
                return w;
            };

            /**
             * Encodes the specified MarkVictimFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MarkVictimFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MarkVictimFtraceEvent
             * @static
             * @param {perfetto.protos.IMarkVictimFtraceEvent} message MarkVictimFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MarkVictimFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MarkVictimFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MarkVictimFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MarkVictimFtraceEvent} MarkVictimFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MarkVictimFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MarkVictimFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.pid = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MarkVictimFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MarkVictimFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MarkVictimFtraceEvent} MarkVictimFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MarkVictimFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MarkVictimFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MarkVictimFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MarkVictimFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                return null;
            };

            /**
             * Creates a MarkVictimFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MarkVictimFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MarkVictimFtraceEvent} MarkVictimFtraceEvent
             */
            MarkVictimFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MarkVictimFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MarkVictimFtraceEvent();
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MarkVictimFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MarkVictimFtraceEvent
             * @static
             * @param {perfetto.protos.MarkVictimFtraceEvent} m MarkVictimFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MarkVictimFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.pid = 0;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                return d;
            };

            /**
             * Converts this MarkVictimFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MarkVictimFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MarkVictimFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MarkVictimFtraceEvent;
        })();

        protos.DsiCmdFifoStatusFtraceEvent = (function() {

            /**
             * Properties of a DsiCmdFifoStatusFtraceEvent.
             * @memberof perfetto.protos
             * @interface IDsiCmdFifoStatusFtraceEvent
             * @property {number|null} [header] DsiCmdFifoStatusFtraceEvent header
             * @property {number|null} [payload] DsiCmdFifoStatusFtraceEvent payload
             */

            /**
             * Constructs a new DsiCmdFifoStatusFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a DsiCmdFifoStatusFtraceEvent.
             * @implements IDsiCmdFifoStatusFtraceEvent
             * @constructor
             * @param {perfetto.protos.IDsiCmdFifoStatusFtraceEvent=} [p] Properties to set
             */
            function DsiCmdFifoStatusFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DsiCmdFifoStatusFtraceEvent header.
             * @member {number} header
             * @memberof perfetto.protos.DsiCmdFifoStatusFtraceEvent
             * @instance
             */
            DsiCmdFifoStatusFtraceEvent.prototype.header = 0;

            /**
             * DsiCmdFifoStatusFtraceEvent payload.
             * @member {number} payload
             * @memberof perfetto.protos.DsiCmdFifoStatusFtraceEvent
             * @instance
             */
            DsiCmdFifoStatusFtraceEvent.prototype.payload = 0;

            /**
             * Creates a new DsiCmdFifoStatusFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DsiCmdFifoStatusFtraceEvent
             * @static
             * @param {perfetto.protos.IDsiCmdFifoStatusFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.DsiCmdFifoStatusFtraceEvent} DsiCmdFifoStatusFtraceEvent instance
             */
            DsiCmdFifoStatusFtraceEvent.create = function create(properties) {
                return new DsiCmdFifoStatusFtraceEvent(properties);
            };

            /**
             * Encodes the specified DsiCmdFifoStatusFtraceEvent message. Does not implicitly {@link perfetto.protos.DsiCmdFifoStatusFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DsiCmdFifoStatusFtraceEvent
             * @static
             * @param {perfetto.protos.IDsiCmdFifoStatusFtraceEvent} m DsiCmdFifoStatusFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DsiCmdFifoStatusFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.header != null && Object.hasOwnProperty.call(m, "header"))
                    w.uint32(8).uint32(m.header);
                if (m.payload != null && Object.hasOwnProperty.call(m, "payload"))
                    w.uint32(16).uint32(m.payload);
                return w;
            };

            /**
             * Encodes the specified DsiCmdFifoStatusFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.DsiCmdFifoStatusFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DsiCmdFifoStatusFtraceEvent
             * @static
             * @param {perfetto.protos.IDsiCmdFifoStatusFtraceEvent} message DsiCmdFifoStatusFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DsiCmdFifoStatusFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DsiCmdFifoStatusFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DsiCmdFifoStatusFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DsiCmdFifoStatusFtraceEvent} DsiCmdFifoStatusFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DsiCmdFifoStatusFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DsiCmdFifoStatusFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.header = r.uint32();
                        break;
                    case 2:
                        m.payload = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DsiCmdFifoStatusFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DsiCmdFifoStatusFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DsiCmdFifoStatusFtraceEvent} DsiCmdFifoStatusFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DsiCmdFifoStatusFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DsiCmdFifoStatusFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.DsiCmdFifoStatusFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DsiCmdFifoStatusFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.header != null && m.hasOwnProperty("header")) {
                    if (!$util.isInteger(m.header))
                        return "header: integer expected";
                }
                if (m.payload != null && m.hasOwnProperty("payload")) {
                    if (!$util.isInteger(m.payload))
                        return "payload: integer expected";
                }
                return null;
            };

            /**
             * Creates a DsiCmdFifoStatusFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DsiCmdFifoStatusFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DsiCmdFifoStatusFtraceEvent} DsiCmdFifoStatusFtraceEvent
             */
            DsiCmdFifoStatusFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DsiCmdFifoStatusFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.DsiCmdFifoStatusFtraceEvent();
                if (d.header != null) {
                    m.header = d.header >>> 0;
                }
                if (d.payload != null) {
                    m.payload = d.payload >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a DsiCmdFifoStatusFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DsiCmdFifoStatusFtraceEvent
             * @static
             * @param {perfetto.protos.DsiCmdFifoStatusFtraceEvent} m DsiCmdFifoStatusFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DsiCmdFifoStatusFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.header = 0;
                    d.payload = 0;
                }
                if (m.header != null && m.hasOwnProperty("header")) {
                    d.header = m.header;
                }
                if (m.payload != null && m.hasOwnProperty("payload")) {
                    d.payload = m.payload;
                }
                return d;
            };

            /**
             * Converts this DsiCmdFifoStatusFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DsiCmdFifoStatusFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DsiCmdFifoStatusFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DsiCmdFifoStatusFtraceEvent;
        })();

        protos.DsiRxFtraceEvent = (function() {

            /**
             * Properties of a DsiRxFtraceEvent.
             * @memberof perfetto.protos
             * @interface IDsiRxFtraceEvent
             * @property {number|null} [cmd] DsiRxFtraceEvent cmd
             * @property {number|null} [rxBuf] DsiRxFtraceEvent rxBuf
             */

            /**
             * Constructs a new DsiRxFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a DsiRxFtraceEvent.
             * @implements IDsiRxFtraceEvent
             * @constructor
             * @param {perfetto.protos.IDsiRxFtraceEvent=} [p] Properties to set
             */
            function DsiRxFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DsiRxFtraceEvent cmd.
             * @member {number} cmd
             * @memberof perfetto.protos.DsiRxFtraceEvent
             * @instance
             */
            DsiRxFtraceEvent.prototype.cmd = 0;

            /**
             * DsiRxFtraceEvent rxBuf.
             * @member {number} rxBuf
             * @memberof perfetto.protos.DsiRxFtraceEvent
             * @instance
             */
            DsiRxFtraceEvent.prototype.rxBuf = 0;

            /**
             * Creates a new DsiRxFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DsiRxFtraceEvent
             * @static
             * @param {perfetto.protos.IDsiRxFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.DsiRxFtraceEvent} DsiRxFtraceEvent instance
             */
            DsiRxFtraceEvent.create = function create(properties) {
                return new DsiRxFtraceEvent(properties);
            };

            /**
             * Encodes the specified DsiRxFtraceEvent message. Does not implicitly {@link perfetto.protos.DsiRxFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DsiRxFtraceEvent
             * @static
             * @param {perfetto.protos.IDsiRxFtraceEvent} m DsiRxFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DsiRxFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.cmd != null && Object.hasOwnProperty.call(m, "cmd"))
                    w.uint32(8).uint32(m.cmd);
                if (m.rxBuf != null && Object.hasOwnProperty.call(m, "rxBuf"))
                    w.uint32(16).uint32(m.rxBuf);
                return w;
            };

            /**
             * Encodes the specified DsiRxFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.DsiRxFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DsiRxFtraceEvent
             * @static
             * @param {perfetto.protos.IDsiRxFtraceEvent} message DsiRxFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DsiRxFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DsiRxFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DsiRxFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DsiRxFtraceEvent} DsiRxFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DsiRxFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DsiRxFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.cmd = r.uint32();
                        break;
                    case 2:
                        m.rxBuf = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DsiRxFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DsiRxFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DsiRxFtraceEvent} DsiRxFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DsiRxFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DsiRxFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.DsiRxFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DsiRxFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.cmd != null && m.hasOwnProperty("cmd")) {
                    if (!$util.isInteger(m.cmd))
                        return "cmd: integer expected";
                }
                if (m.rxBuf != null && m.hasOwnProperty("rxBuf")) {
                    if (!$util.isInteger(m.rxBuf))
                        return "rxBuf: integer expected";
                }
                return null;
            };

            /**
             * Creates a DsiRxFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DsiRxFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DsiRxFtraceEvent} DsiRxFtraceEvent
             */
            DsiRxFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DsiRxFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.DsiRxFtraceEvent();
                if (d.cmd != null) {
                    m.cmd = d.cmd >>> 0;
                }
                if (d.rxBuf != null) {
                    m.rxBuf = d.rxBuf >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a DsiRxFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DsiRxFtraceEvent
             * @static
             * @param {perfetto.protos.DsiRxFtraceEvent} m DsiRxFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DsiRxFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.cmd = 0;
                    d.rxBuf = 0;
                }
                if (m.cmd != null && m.hasOwnProperty("cmd")) {
                    d.cmd = m.cmd;
                }
                if (m.rxBuf != null && m.hasOwnProperty("rxBuf")) {
                    d.rxBuf = m.rxBuf;
                }
                return d;
            };

            /**
             * Converts this DsiRxFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DsiRxFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DsiRxFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DsiRxFtraceEvent;
        })();

        protos.DsiTxFtraceEvent = (function() {

            /**
             * Properties of a DsiTxFtraceEvent.
             * @memberof perfetto.protos
             * @interface IDsiTxFtraceEvent
             * @property {number|null} [last] DsiTxFtraceEvent last
             * @property {number|null} [txBuf] DsiTxFtraceEvent txBuf
             * @property {number|null} [type] DsiTxFtraceEvent type
             */

            /**
             * Constructs a new DsiTxFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a DsiTxFtraceEvent.
             * @implements IDsiTxFtraceEvent
             * @constructor
             * @param {perfetto.protos.IDsiTxFtraceEvent=} [p] Properties to set
             */
            function DsiTxFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DsiTxFtraceEvent last.
             * @member {number} last
             * @memberof perfetto.protos.DsiTxFtraceEvent
             * @instance
             */
            DsiTxFtraceEvent.prototype.last = 0;

            /**
             * DsiTxFtraceEvent txBuf.
             * @member {number} txBuf
             * @memberof perfetto.protos.DsiTxFtraceEvent
             * @instance
             */
            DsiTxFtraceEvent.prototype.txBuf = 0;

            /**
             * DsiTxFtraceEvent type.
             * @member {number} type
             * @memberof perfetto.protos.DsiTxFtraceEvent
             * @instance
             */
            DsiTxFtraceEvent.prototype.type = 0;

            /**
             * Creates a new DsiTxFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DsiTxFtraceEvent
             * @static
             * @param {perfetto.protos.IDsiTxFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.DsiTxFtraceEvent} DsiTxFtraceEvent instance
             */
            DsiTxFtraceEvent.create = function create(properties) {
                return new DsiTxFtraceEvent(properties);
            };

            /**
             * Encodes the specified DsiTxFtraceEvent message. Does not implicitly {@link perfetto.protos.DsiTxFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DsiTxFtraceEvent
             * @static
             * @param {perfetto.protos.IDsiTxFtraceEvent} m DsiTxFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DsiTxFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.last != null && Object.hasOwnProperty.call(m, "last"))
                    w.uint32(8).uint32(m.last);
                if (m.txBuf != null && Object.hasOwnProperty.call(m, "txBuf"))
                    w.uint32(16).uint32(m.txBuf);
                if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                    w.uint32(24).uint32(m.type);
                return w;
            };

            /**
             * Encodes the specified DsiTxFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.DsiTxFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DsiTxFtraceEvent
             * @static
             * @param {perfetto.protos.IDsiTxFtraceEvent} message DsiTxFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DsiTxFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DsiTxFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DsiTxFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DsiTxFtraceEvent} DsiTxFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DsiTxFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DsiTxFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.last = r.uint32();
                        break;
                    case 2:
                        m.txBuf = r.uint32();
                        break;
                    case 3:
                        m.type = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DsiTxFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DsiTxFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DsiTxFtraceEvent} DsiTxFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DsiTxFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DsiTxFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.DsiTxFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DsiTxFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.last != null && m.hasOwnProperty("last")) {
                    if (!$util.isInteger(m.last))
                        return "last: integer expected";
                }
                if (m.txBuf != null && m.hasOwnProperty("txBuf")) {
                    if (!$util.isInteger(m.txBuf))
                        return "txBuf: integer expected";
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    if (!$util.isInteger(m.type))
                        return "type: integer expected";
                }
                return null;
            };

            /**
             * Creates a DsiTxFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DsiTxFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DsiTxFtraceEvent} DsiTxFtraceEvent
             */
            DsiTxFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DsiTxFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.DsiTxFtraceEvent();
                if (d.last != null) {
                    m.last = d.last >>> 0;
                }
                if (d.txBuf != null) {
                    m.txBuf = d.txBuf >>> 0;
                }
                if (d.type != null) {
                    m.type = d.type >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a DsiTxFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DsiTxFtraceEvent
             * @static
             * @param {perfetto.protos.DsiTxFtraceEvent} m DsiTxFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DsiTxFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.last = 0;
                    d.txBuf = 0;
                    d.type = 0;
                }
                if (m.last != null && m.hasOwnProperty("last")) {
                    d.last = m.last;
                }
                if (m.txBuf != null && m.hasOwnProperty("txBuf")) {
                    d.txBuf = m.txBuf;
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    d.type = m.type;
                }
                return d;
            };

            /**
             * Converts this DsiTxFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DsiTxFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DsiTxFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DsiTxFtraceEvent;
        })();

        protos.CpuFrequencyFtraceEvent = (function() {

            /**
             * Properties of a CpuFrequencyFtraceEvent.
             * @memberof perfetto.protos
             * @interface ICpuFrequencyFtraceEvent
             * @property {number|null} [state] CpuFrequencyFtraceEvent state
             * @property {number|null} [cpuId] CpuFrequencyFtraceEvent cpuId
             */

            /**
             * Constructs a new CpuFrequencyFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a CpuFrequencyFtraceEvent.
             * @implements ICpuFrequencyFtraceEvent
             * @constructor
             * @param {perfetto.protos.ICpuFrequencyFtraceEvent=} [p] Properties to set
             */
            function CpuFrequencyFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * CpuFrequencyFtraceEvent state.
             * @member {number} state
             * @memberof perfetto.protos.CpuFrequencyFtraceEvent
             * @instance
             */
            CpuFrequencyFtraceEvent.prototype.state = 0;

            /**
             * CpuFrequencyFtraceEvent cpuId.
             * @member {number} cpuId
             * @memberof perfetto.protos.CpuFrequencyFtraceEvent
             * @instance
             */
            CpuFrequencyFtraceEvent.prototype.cpuId = 0;

            /**
             * Creates a new CpuFrequencyFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.CpuFrequencyFtraceEvent
             * @static
             * @param {perfetto.protos.ICpuFrequencyFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.CpuFrequencyFtraceEvent} CpuFrequencyFtraceEvent instance
             */
            CpuFrequencyFtraceEvent.create = function create(properties) {
                return new CpuFrequencyFtraceEvent(properties);
            };

            /**
             * Encodes the specified CpuFrequencyFtraceEvent message. Does not implicitly {@link perfetto.protos.CpuFrequencyFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.CpuFrequencyFtraceEvent
             * @static
             * @param {perfetto.protos.ICpuFrequencyFtraceEvent} m CpuFrequencyFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CpuFrequencyFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.state != null && Object.hasOwnProperty.call(m, "state"))
                    w.uint32(8).uint32(m.state);
                if (m.cpuId != null && Object.hasOwnProperty.call(m, "cpuId"))
                    w.uint32(16).uint32(m.cpuId);
                return w;
            };

            /**
             * Encodes the specified CpuFrequencyFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.CpuFrequencyFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.CpuFrequencyFtraceEvent
             * @static
             * @param {perfetto.protos.ICpuFrequencyFtraceEvent} message CpuFrequencyFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CpuFrequencyFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CpuFrequencyFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.CpuFrequencyFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.CpuFrequencyFtraceEvent} CpuFrequencyFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CpuFrequencyFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.CpuFrequencyFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.state = r.uint32();
                        break;
                    case 2:
                        m.cpuId = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a CpuFrequencyFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.CpuFrequencyFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.CpuFrequencyFtraceEvent} CpuFrequencyFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CpuFrequencyFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CpuFrequencyFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.CpuFrequencyFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CpuFrequencyFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.state != null && m.hasOwnProperty("state")) {
                    if (!$util.isInteger(m.state))
                        return "state: integer expected";
                }
                if (m.cpuId != null && m.hasOwnProperty("cpuId")) {
                    if (!$util.isInteger(m.cpuId))
                        return "cpuId: integer expected";
                }
                return null;
            };

            /**
             * Creates a CpuFrequencyFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.CpuFrequencyFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.CpuFrequencyFtraceEvent} CpuFrequencyFtraceEvent
             */
            CpuFrequencyFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.CpuFrequencyFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.CpuFrequencyFtraceEvent();
                if (d.state != null) {
                    m.state = d.state >>> 0;
                }
                if (d.cpuId != null) {
                    m.cpuId = d.cpuId >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a CpuFrequencyFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.CpuFrequencyFtraceEvent
             * @static
             * @param {perfetto.protos.CpuFrequencyFtraceEvent} m CpuFrequencyFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CpuFrequencyFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.state = 0;
                    d.cpuId = 0;
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    d.state = m.state;
                }
                if (m.cpuId != null && m.hasOwnProperty("cpuId")) {
                    d.cpuId = m.cpuId;
                }
                return d;
            };

            /**
             * Converts this CpuFrequencyFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.CpuFrequencyFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CpuFrequencyFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return CpuFrequencyFtraceEvent;
        })();

        protos.CpuFrequencyLimitsFtraceEvent = (function() {

            /**
             * Properties of a CpuFrequencyLimitsFtraceEvent.
             * @memberof perfetto.protos
             * @interface ICpuFrequencyLimitsFtraceEvent
             * @property {number|null} [minFreq] CpuFrequencyLimitsFtraceEvent minFreq
             * @property {number|null} [maxFreq] CpuFrequencyLimitsFtraceEvent maxFreq
             * @property {number|null} [cpuId] CpuFrequencyLimitsFtraceEvent cpuId
             */

            /**
             * Constructs a new CpuFrequencyLimitsFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a CpuFrequencyLimitsFtraceEvent.
             * @implements ICpuFrequencyLimitsFtraceEvent
             * @constructor
             * @param {perfetto.protos.ICpuFrequencyLimitsFtraceEvent=} [p] Properties to set
             */
            function CpuFrequencyLimitsFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * CpuFrequencyLimitsFtraceEvent minFreq.
             * @member {number} minFreq
             * @memberof perfetto.protos.CpuFrequencyLimitsFtraceEvent
             * @instance
             */
            CpuFrequencyLimitsFtraceEvent.prototype.minFreq = 0;

            /**
             * CpuFrequencyLimitsFtraceEvent maxFreq.
             * @member {number} maxFreq
             * @memberof perfetto.protos.CpuFrequencyLimitsFtraceEvent
             * @instance
             */
            CpuFrequencyLimitsFtraceEvent.prototype.maxFreq = 0;

            /**
             * CpuFrequencyLimitsFtraceEvent cpuId.
             * @member {number} cpuId
             * @memberof perfetto.protos.CpuFrequencyLimitsFtraceEvent
             * @instance
             */
            CpuFrequencyLimitsFtraceEvent.prototype.cpuId = 0;

            /**
             * Creates a new CpuFrequencyLimitsFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.CpuFrequencyLimitsFtraceEvent
             * @static
             * @param {perfetto.protos.ICpuFrequencyLimitsFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.CpuFrequencyLimitsFtraceEvent} CpuFrequencyLimitsFtraceEvent instance
             */
            CpuFrequencyLimitsFtraceEvent.create = function create(properties) {
                return new CpuFrequencyLimitsFtraceEvent(properties);
            };

            /**
             * Encodes the specified CpuFrequencyLimitsFtraceEvent message. Does not implicitly {@link perfetto.protos.CpuFrequencyLimitsFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.CpuFrequencyLimitsFtraceEvent
             * @static
             * @param {perfetto.protos.ICpuFrequencyLimitsFtraceEvent} m CpuFrequencyLimitsFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CpuFrequencyLimitsFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.minFreq != null && Object.hasOwnProperty.call(m, "minFreq"))
                    w.uint32(8).uint32(m.minFreq);
                if (m.maxFreq != null && Object.hasOwnProperty.call(m, "maxFreq"))
                    w.uint32(16).uint32(m.maxFreq);
                if (m.cpuId != null && Object.hasOwnProperty.call(m, "cpuId"))
                    w.uint32(24).uint32(m.cpuId);
                return w;
            };

            /**
             * Encodes the specified CpuFrequencyLimitsFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.CpuFrequencyLimitsFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.CpuFrequencyLimitsFtraceEvent
             * @static
             * @param {perfetto.protos.ICpuFrequencyLimitsFtraceEvent} message CpuFrequencyLimitsFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CpuFrequencyLimitsFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CpuFrequencyLimitsFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.CpuFrequencyLimitsFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.CpuFrequencyLimitsFtraceEvent} CpuFrequencyLimitsFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CpuFrequencyLimitsFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.CpuFrequencyLimitsFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.minFreq = r.uint32();
                        break;
                    case 2:
                        m.maxFreq = r.uint32();
                        break;
                    case 3:
                        m.cpuId = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a CpuFrequencyLimitsFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.CpuFrequencyLimitsFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.CpuFrequencyLimitsFtraceEvent} CpuFrequencyLimitsFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CpuFrequencyLimitsFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CpuFrequencyLimitsFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.CpuFrequencyLimitsFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CpuFrequencyLimitsFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.minFreq != null && m.hasOwnProperty("minFreq")) {
                    if (!$util.isInteger(m.minFreq))
                        return "minFreq: integer expected";
                }
                if (m.maxFreq != null && m.hasOwnProperty("maxFreq")) {
                    if (!$util.isInteger(m.maxFreq))
                        return "maxFreq: integer expected";
                }
                if (m.cpuId != null && m.hasOwnProperty("cpuId")) {
                    if (!$util.isInteger(m.cpuId))
                        return "cpuId: integer expected";
                }
                return null;
            };

            /**
             * Creates a CpuFrequencyLimitsFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.CpuFrequencyLimitsFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.CpuFrequencyLimitsFtraceEvent} CpuFrequencyLimitsFtraceEvent
             */
            CpuFrequencyLimitsFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.CpuFrequencyLimitsFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.CpuFrequencyLimitsFtraceEvent();
                if (d.minFreq != null) {
                    m.minFreq = d.minFreq >>> 0;
                }
                if (d.maxFreq != null) {
                    m.maxFreq = d.maxFreq >>> 0;
                }
                if (d.cpuId != null) {
                    m.cpuId = d.cpuId >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a CpuFrequencyLimitsFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.CpuFrequencyLimitsFtraceEvent
             * @static
             * @param {perfetto.protos.CpuFrequencyLimitsFtraceEvent} m CpuFrequencyLimitsFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CpuFrequencyLimitsFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.minFreq = 0;
                    d.maxFreq = 0;
                    d.cpuId = 0;
                }
                if (m.minFreq != null && m.hasOwnProperty("minFreq")) {
                    d.minFreq = m.minFreq;
                }
                if (m.maxFreq != null && m.hasOwnProperty("maxFreq")) {
                    d.maxFreq = m.maxFreq;
                }
                if (m.cpuId != null && m.hasOwnProperty("cpuId")) {
                    d.cpuId = m.cpuId;
                }
                return d;
            };

            /**
             * Converts this CpuFrequencyLimitsFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.CpuFrequencyLimitsFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CpuFrequencyLimitsFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return CpuFrequencyLimitsFtraceEvent;
        })();

        protos.CpuIdleFtraceEvent = (function() {

            /**
             * Properties of a CpuIdleFtraceEvent.
             * @memberof perfetto.protos
             * @interface ICpuIdleFtraceEvent
             * @property {number|null} [state] CpuIdleFtraceEvent state
             * @property {number|null} [cpuId] CpuIdleFtraceEvent cpuId
             */

            /**
             * Constructs a new CpuIdleFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a CpuIdleFtraceEvent.
             * @implements ICpuIdleFtraceEvent
             * @constructor
             * @param {perfetto.protos.ICpuIdleFtraceEvent=} [p] Properties to set
             */
            function CpuIdleFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * CpuIdleFtraceEvent state.
             * @member {number} state
             * @memberof perfetto.protos.CpuIdleFtraceEvent
             * @instance
             */
            CpuIdleFtraceEvent.prototype.state = 0;

            /**
             * CpuIdleFtraceEvent cpuId.
             * @member {number} cpuId
             * @memberof perfetto.protos.CpuIdleFtraceEvent
             * @instance
             */
            CpuIdleFtraceEvent.prototype.cpuId = 0;

            /**
             * Creates a new CpuIdleFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.CpuIdleFtraceEvent
             * @static
             * @param {perfetto.protos.ICpuIdleFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.CpuIdleFtraceEvent} CpuIdleFtraceEvent instance
             */
            CpuIdleFtraceEvent.create = function create(properties) {
                return new CpuIdleFtraceEvent(properties);
            };

            /**
             * Encodes the specified CpuIdleFtraceEvent message. Does not implicitly {@link perfetto.protos.CpuIdleFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.CpuIdleFtraceEvent
             * @static
             * @param {perfetto.protos.ICpuIdleFtraceEvent} m CpuIdleFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CpuIdleFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.state != null && Object.hasOwnProperty.call(m, "state"))
                    w.uint32(8).uint32(m.state);
                if (m.cpuId != null && Object.hasOwnProperty.call(m, "cpuId"))
                    w.uint32(16).uint32(m.cpuId);
                return w;
            };

            /**
             * Encodes the specified CpuIdleFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.CpuIdleFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.CpuIdleFtraceEvent
             * @static
             * @param {perfetto.protos.ICpuIdleFtraceEvent} message CpuIdleFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CpuIdleFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CpuIdleFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.CpuIdleFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.CpuIdleFtraceEvent} CpuIdleFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CpuIdleFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.CpuIdleFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.state = r.uint32();
                        break;
                    case 2:
                        m.cpuId = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a CpuIdleFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.CpuIdleFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.CpuIdleFtraceEvent} CpuIdleFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CpuIdleFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CpuIdleFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.CpuIdleFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CpuIdleFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.state != null && m.hasOwnProperty("state")) {
                    if (!$util.isInteger(m.state))
                        return "state: integer expected";
                }
                if (m.cpuId != null && m.hasOwnProperty("cpuId")) {
                    if (!$util.isInteger(m.cpuId))
                        return "cpuId: integer expected";
                }
                return null;
            };

            /**
             * Creates a CpuIdleFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.CpuIdleFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.CpuIdleFtraceEvent} CpuIdleFtraceEvent
             */
            CpuIdleFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.CpuIdleFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.CpuIdleFtraceEvent();
                if (d.state != null) {
                    m.state = d.state >>> 0;
                }
                if (d.cpuId != null) {
                    m.cpuId = d.cpuId >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a CpuIdleFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.CpuIdleFtraceEvent
             * @static
             * @param {perfetto.protos.CpuIdleFtraceEvent} m CpuIdleFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CpuIdleFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.state = 0;
                    d.cpuId = 0;
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    d.state = m.state;
                }
                if (m.cpuId != null && m.hasOwnProperty("cpuId")) {
                    d.cpuId = m.cpuId;
                }
                return d;
            };

            /**
             * Converts this CpuIdleFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.CpuIdleFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CpuIdleFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return CpuIdleFtraceEvent;
        })();

        protos.ClockEnableFtraceEvent = (function() {

            /**
             * Properties of a ClockEnableFtraceEvent.
             * @memberof perfetto.protos
             * @interface IClockEnableFtraceEvent
             * @property {string|null} [name] ClockEnableFtraceEvent name
             * @property {number|null} [state] ClockEnableFtraceEvent state
             * @property {number|null} [cpuId] ClockEnableFtraceEvent cpuId
             */

            /**
             * Constructs a new ClockEnableFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a ClockEnableFtraceEvent.
             * @implements IClockEnableFtraceEvent
             * @constructor
             * @param {perfetto.protos.IClockEnableFtraceEvent=} [p] Properties to set
             */
            function ClockEnableFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ClockEnableFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.ClockEnableFtraceEvent
             * @instance
             */
            ClockEnableFtraceEvent.prototype.name = "";

            /**
             * ClockEnableFtraceEvent state.
             * @member {number} state
             * @memberof perfetto.protos.ClockEnableFtraceEvent
             * @instance
             */
            ClockEnableFtraceEvent.prototype.state = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * ClockEnableFtraceEvent cpuId.
             * @member {number} cpuId
             * @memberof perfetto.protos.ClockEnableFtraceEvent
             * @instance
             */
            ClockEnableFtraceEvent.prototype.cpuId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new ClockEnableFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ClockEnableFtraceEvent
             * @static
             * @param {perfetto.protos.IClockEnableFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.ClockEnableFtraceEvent} ClockEnableFtraceEvent instance
             */
            ClockEnableFtraceEvent.create = function create(properties) {
                return new ClockEnableFtraceEvent(properties);
            };

            /**
             * Encodes the specified ClockEnableFtraceEvent message. Does not implicitly {@link perfetto.protos.ClockEnableFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ClockEnableFtraceEvent
             * @static
             * @param {perfetto.protos.IClockEnableFtraceEvent} m ClockEnableFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ClockEnableFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                if (m.state != null && Object.hasOwnProperty.call(m, "state"))
                    w.uint32(16).uint64(m.state);
                if (m.cpuId != null && Object.hasOwnProperty.call(m, "cpuId"))
                    w.uint32(24).uint64(m.cpuId);
                return w;
            };

            /**
             * Encodes the specified ClockEnableFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.ClockEnableFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ClockEnableFtraceEvent
             * @static
             * @param {perfetto.protos.IClockEnableFtraceEvent} message ClockEnableFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ClockEnableFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ClockEnableFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ClockEnableFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ClockEnableFtraceEvent} ClockEnableFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ClockEnableFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ClockEnableFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    case 2:
                        m.state = r.uint64();
                        break;
                    case 3:
                        m.cpuId = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ClockEnableFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ClockEnableFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ClockEnableFtraceEvent} ClockEnableFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ClockEnableFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ClockEnableFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.ClockEnableFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ClockEnableFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    if (!$util.isInteger(m.state) && !(m.state && $util.isInteger(m.state.low) && $util.isInteger(m.state.high)))
                        return "state: integer|Long expected";
                }
                if (m.cpuId != null && m.hasOwnProperty("cpuId")) {
                    if (!$util.isInteger(m.cpuId) && !(m.cpuId && $util.isInteger(m.cpuId.low) && $util.isInteger(m.cpuId.high)))
                        return "cpuId: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a ClockEnableFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ClockEnableFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ClockEnableFtraceEvent} ClockEnableFtraceEvent
             */
            ClockEnableFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ClockEnableFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.ClockEnableFtraceEvent();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.state != null) {
                    if ($util.Long)
                        (m.state = $util.Long.fromValue(d.state)).unsigned = true;
                    else if (typeof d.state === "string")
                        m.state = parseInt(d.state, 10);
                    else if (typeof d.state === "number")
                        m.state = d.state;
                    else if (typeof d.state === "object")
                        m.state = new $util.LongBits(d.state.low >>> 0, d.state.high >>> 0).toNumber(true);
                }
                if (d.cpuId != null) {
                    if ($util.Long)
                        (m.cpuId = $util.Long.fromValue(d.cpuId)).unsigned = true;
                    else if (typeof d.cpuId === "string")
                        m.cpuId = parseInt(d.cpuId, 10);
                    else if (typeof d.cpuId === "number")
                        m.cpuId = d.cpuId;
                    else if (typeof d.cpuId === "object")
                        m.cpuId = new $util.LongBits(d.cpuId.low >>> 0, d.cpuId.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a ClockEnableFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ClockEnableFtraceEvent
             * @static
             * @param {perfetto.protos.ClockEnableFtraceEvent} m ClockEnableFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ClockEnableFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.state = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.state = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.cpuId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.cpuId = o.longs === String ? "0" : 0;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    if (typeof m.state === "number")
                        d.state = o.longs === String ? String(m.state) : m.state;
                    else
                        d.state = o.longs === String ? $util.Long.prototype.toString.call(m.state) : o.longs === Number ? new $util.LongBits(m.state.low >>> 0, m.state.high >>> 0).toNumber(true) : m.state;
                }
                if (m.cpuId != null && m.hasOwnProperty("cpuId")) {
                    if (typeof m.cpuId === "number")
                        d.cpuId = o.longs === String ? String(m.cpuId) : m.cpuId;
                    else
                        d.cpuId = o.longs === String ? $util.Long.prototype.toString.call(m.cpuId) : o.longs === Number ? new $util.LongBits(m.cpuId.low >>> 0, m.cpuId.high >>> 0).toNumber(true) : m.cpuId;
                }
                return d;
            };

            /**
             * Converts this ClockEnableFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ClockEnableFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ClockEnableFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ClockEnableFtraceEvent;
        })();

        protos.ClockDisableFtraceEvent = (function() {

            /**
             * Properties of a ClockDisableFtraceEvent.
             * @memberof perfetto.protos
             * @interface IClockDisableFtraceEvent
             * @property {string|null} [name] ClockDisableFtraceEvent name
             * @property {number|null} [state] ClockDisableFtraceEvent state
             * @property {number|null} [cpuId] ClockDisableFtraceEvent cpuId
             */

            /**
             * Constructs a new ClockDisableFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a ClockDisableFtraceEvent.
             * @implements IClockDisableFtraceEvent
             * @constructor
             * @param {perfetto.protos.IClockDisableFtraceEvent=} [p] Properties to set
             */
            function ClockDisableFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ClockDisableFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.ClockDisableFtraceEvent
             * @instance
             */
            ClockDisableFtraceEvent.prototype.name = "";

            /**
             * ClockDisableFtraceEvent state.
             * @member {number} state
             * @memberof perfetto.protos.ClockDisableFtraceEvent
             * @instance
             */
            ClockDisableFtraceEvent.prototype.state = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * ClockDisableFtraceEvent cpuId.
             * @member {number} cpuId
             * @memberof perfetto.protos.ClockDisableFtraceEvent
             * @instance
             */
            ClockDisableFtraceEvent.prototype.cpuId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new ClockDisableFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ClockDisableFtraceEvent
             * @static
             * @param {perfetto.protos.IClockDisableFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.ClockDisableFtraceEvent} ClockDisableFtraceEvent instance
             */
            ClockDisableFtraceEvent.create = function create(properties) {
                return new ClockDisableFtraceEvent(properties);
            };

            /**
             * Encodes the specified ClockDisableFtraceEvent message. Does not implicitly {@link perfetto.protos.ClockDisableFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ClockDisableFtraceEvent
             * @static
             * @param {perfetto.protos.IClockDisableFtraceEvent} m ClockDisableFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ClockDisableFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                if (m.state != null && Object.hasOwnProperty.call(m, "state"))
                    w.uint32(16).uint64(m.state);
                if (m.cpuId != null && Object.hasOwnProperty.call(m, "cpuId"))
                    w.uint32(24).uint64(m.cpuId);
                return w;
            };

            /**
             * Encodes the specified ClockDisableFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.ClockDisableFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ClockDisableFtraceEvent
             * @static
             * @param {perfetto.protos.IClockDisableFtraceEvent} message ClockDisableFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ClockDisableFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ClockDisableFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ClockDisableFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ClockDisableFtraceEvent} ClockDisableFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ClockDisableFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ClockDisableFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    case 2:
                        m.state = r.uint64();
                        break;
                    case 3:
                        m.cpuId = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ClockDisableFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ClockDisableFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ClockDisableFtraceEvent} ClockDisableFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ClockDisableFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ClockDisableFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.ClockDisableFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ClockDisableFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    if (!$util.isInteger(m.state) && !(m.state && $util.isInteger(m.state.low) && $util.isInteger(m.state.high)))
                        return "state: integer|Long expected";
                }
                if (m.cpuId != null && m.hasOwnProperty("cpuId")) {
                    if (!$util.isInteger(m.cpuId) && !(m.cpuId && $util.isInteger(m.cpuId.low) && $util.isInteger(m.cpuId.high)))
                        return "cpuId: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a ClockDisableFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ClockDisableFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ClockDisableFtraceEvent} ClockDisableFtraceEvent
             */
            ClockDisableFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ClockDisableFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.ClockDisableFtraceEvent();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.state != null) {
                    if ($util.Long)
                        (m.state = $util.Long.fromValue(d.state)).unsigned = true;
                    else if (typeof d.state === "string")
                        m.state = parseInt(d.state, 10);
                    else if (typeof d.state === "number")
                        m.state = d.state;
                    else if (typeof d.state === "object")
                        m.state = new $util.LongBits(d.state.low >>> 0, d.state.high >>> 0).toNumber(true);
                }
                if (d.cpuId != null) {
                    if ($util.Long)
                        (m.cpuId = $util.Long.fromValue(d.cpuId)).unsigned = true;
                    else if (typeof d.cpuId === "string")
                        m.cpuId = parseInt(d.cpuId, 10);
                    else if (typeof d.cpuId === "number")
                        m.cpuId = d.cpuId;
                    else if (typeof d.cpuId === "object")
                        m.cpuId = new $util.LongBits(d.cpuId.low >>> 0, d.cpuId.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a ClockDisableFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ClockDisableFtraceEvent
             * @static
             * @param {perfetto.protos.ClockDisableFtraceEvent} m ClockDisableFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ClockDisableFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.state = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.state = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.cpuId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.cpuId = o.longs === String ? "0" : 0;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    if (typeof m.state === "number")
                        d.state = o.longs === String ? String(m.state) : m.state;
                    else
                        d.state = o.longs === String ? $util.Long.prototype.toString.call(m.state) : o.longs === Number ? new $util.LongBits(m.state.low >>> 0, m.state.high >>> 0).toNumber(true) : m.state;
                }
                if (m.cpuId != null && m.hasOwnProperty("cpuId")) {
                    if (typeof m.cpuId === "number")
                        d.cpuId = o.longs === String ? String(m.cpuId) : m.cpuId;
                    else
                        d.cpuId = o.longs === String ? $util.Long.prototype.toString.call(m.cpuId) : o.longs === Number ? new $util.LongBits(m.cpuId.low >>> 0, m.cpuId.high >>> 0).toNumber(true) : m.cpuId;
                }
                return d;
            };

            /**
             * Converts this ClockDisableFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ClockDisableFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ClockDisableFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ClockDisableFtraceEvent;
        })();

        protos.ClockSetRateFtraceEvent = (function() {

            /**
             * Properties of a ClockSetRateFtraceEvent.
             * @memberof perfetto.protos
             * @interface IClockSetRateFtraceEvent
             * @property {string|null} [name] ClockSetRateFtraceEvent name
             * @property {number|null} [state] ClockSetRateFtraceEvent state
             * @property {number|null} [cpuId] ClockSetRateFtraceEvent cpuId
             */

            /**
             * Constructs a new ClockSetRateFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a ClockSetRateFtraceEvent.
             * @implements IClockSetRateFtraceEvent
             * @constructor
             * @param {perfetto.protos.IClockSetRateFtraceEvent=} [p] Properties to set
             */
            function ClockSetRateFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ClockSetRateFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.ClockSetRateFtraceEvent
             * @instance
             */
            ClockSetRateFtraceEvent.prototype.name = "";

            /**
             * ClockSetRateFtraceEvent state.
             * @member {number} state
             * @memberof perfetto.protos.ClockSetRateFtraceEvent
             * @instance
             */
            ClockSetRateFtraceEvent.prototype.state = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * ClockSetRateFtraceEvent cpuId.
             * @member {number} cpuId
             * @memberof perfetto.protos.ClockSetRateFtraceEvent
             * @instance
             */
            ClockSetRateFtraceEvent.prototype.cpuId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new ClockSetRateFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ClockSetRateFtraceEvent
             * @static
             * @param {perfetto.protos.IClockSetRateFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.ClockSetRateFtraceEvent} ClockSetRateFtraceEvent instance
             */
            ClockSetRateFtraceEvent.create = function create(properties) {
                return new ClockSetRateFtraceEvent(properties);
            };

            /**
             * Encodes the specified ClockSetRateFtraceEvent message. Does not implicitly {@link perfetto.protos.ClockSetRateFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ClockSetRateFtraceEvent
             * @static
             * @param {perfetto.protos.IClockSetRateFtraceEvent} m ClockSetRateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ClockSetRateFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                if (m.state != null && Object.hasOwnProperty.call(m, "state"))
                    w.uint32(16).uint64(m.state);
                if (m.cpuId != null && Object.hasOwnProperty.call(m, "cpuId"))
                    w.uint32(24).uint64(m.cpuId);
                return w;
            };

            /**
             * Encodes the specified ClockSetRateFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.ClockSetRateFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ClockSetRateFtraceEvent
             * @static
             * @param {perfetto.protos.IClockSetRateFtraceEvent} message ClockSetRateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ClockSetRateFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ClockSetRateFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ClockSetRateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ClockSetRateFtraceEvent} ClockSetRateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ClockSetRateFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ClockSetRateFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    case 2:
                        m.state = r.uint64();
                        break;
                    case 3:
                        m.cpuId = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ClockSetRateFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ClockSetRateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ClockSetRateFtraceEvent} ClockSetRateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ClockSetRateFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ClockSetRateFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.ClockSetRateFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ClockSetRateFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    if (!$util.isInteger(m.state) && !(m.state && $util.isInteger(m.state.low) && $util.isInteger(m.state.high)))
                        return "state: integer|Long expected";
                }
                if (m.cpuId != null && m.hasOwnProperty("cpuId")) {
                    if (!$util.isInteger(m.cpuId) && !(m.cpuId && $util.isInteger(m.cpuId.low) && $util.isInteger(m.cpuId.high)))
                        return "cpuId: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a ClockSetRateFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ClockSetRateFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ClockSetRateFtraceEvent} ClockSetRateFtraceEvent
             */
            ClockSetRateFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ClockSetRateFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.ClockSetRateFtraceEvent();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.state != null) {
                    if ($util.Long)
                        (m.state = $util.Long.fromValue(d.state)).unsigned = true;
                    else if (typeof d.state === "string")
                        m.state = parseInt(d.state, 10);
                    else if (typeof d.state === "number")
                        m.state = d.state;
                    else if (typeof d.state === "object")
                        m.state = new $util.LongBits(d.state.low >>> 0, d.state.high >>> 0).toNumber(true);
                }
                if (d.cpuId != null) {
                    if ($util.Long)
                        (m.cpuId = $util.Long.fromValue(d.cpuId)).unsigned = true;
                    else if (typeof d.cpuId === "string")
                        m.cpuId = parseInt(d.cpuId, 10);
                    else if (typeof d.cpuId === "number")
                        m.cpuId = d.cpuId;
                    else if (typeof d.cpuId === "object")
                        m.cpuId = new $util.LongBits(d.cpuId.low >>> 0, d.cpuId.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a ClockSetRateFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ClockSetRateFtraceEvent
             * @static
             * @param {perfetto.protos.ClockSetRateFtraceEvent} m ClockSetRateFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ClockSetRateFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.state = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.state = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.cpuId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.cpuId = o.longs === String ? "0" : 0;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    if (typeof m.state === "number")
                        d.state = o.longs === String ? String(m.state) : m.state;
                    else
                        d.state = o.longs === String ? $util.Long.prototype.toString.call(m.state) : o.longs === Number ? new $util.LongBits(m.state.low >>> 0, m.state.high >>> 0).toNumber(true) : m.state;
                }
                if (m.cpuId != null && m.hasOwnProperty("cpuId")) {
                    if (typeof m.cpuId === "number")
                        d.cpuId = o.longs === String ? String(m.cpuId) : m.cpuId;
                    else
                        d.cpuId = o.longs === String ? $util.Long.prototype.toString.call(m.cpuId) : o.longs === Number ? new $util.LongBits(m.cpuId.low >>> 0, m.cpuId.high >>> 0).toNumber(true) : m.cpuId;
                }
                return d;
            };

            /**
             * Converts this ClockSetRateFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ClockSetRateFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ClockSetRateFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ClockSetRateFtraceEvent;
        })();

        protos.SuspendResumeFtraceEvent = (function() {

            /**
             * Properties of a SuspendResumeFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISuspendResumeFtraceEvent
             * @property {string|null} [action] SuspendResumeFtraceEvent action
             * @property {number|null} [val] SuspendResumeFtraceEvent val
             * @property {number|null} [start] SuspendResumeFtraceEvent start
             */

            /**
             * Constructs a new SuspendResumeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SuspendResumeFtraceEvent.
             * @implements ISuspendResumeFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISuspendResumeFtraceEvent=} [p] Properties to set
             */
            function SuspendResumeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SuspendResumeFtraceEvent action.
             * @member {string} action
             * @memberof perfetto.protos.SuspendResumeFtraceEvent
             * @instance
             */
            SuspendResumeFtraceEvent.prototype.action = "";

            /**
             * SuspendResumeFtraceEvent val.
             * @member {number} val
             * @memberof perfetto.protos.SuspendResumeFtraceEvent
             * @instance
             */
            SuspendResumeFtraceEvent.prototype.val = 0;

            /**
             * SuspendResumeFtraceEvent start.
             * @member {number} start
             * @memberof perfetto.protos.SuspendResumeFtraceEvent
             * @instance
             */
            SuspendResumeFtraceEvent.prototype.start = 0;

            /**
             * Creates a new SuspendResumeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SuspendResumeFtraceEvent
             * @static
             * @param {perfetto.protos.ISuspendResumeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SuspendResumeFtraceEvent} SuspendResumeFtraceEvent instance
             */
            SuspendResumeFtraceEvent.create = function create(properties) {
                return new SuspendResumeFtraceEvent(properties);
            };

            /**
             * Encodes the specified SuspendResumeFtraceEvent message. Does not implicitly {@link perfetto.protos.SuspendResumeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SuspendResumeFtraceEvent
             * @static
             * @param {perfetto.protos.ISuspendResumeFtraceEvent} m SuspendResumeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SuspendResumeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.action != null && Object.hasOwnProperty.call(m, "action"))
                    w.uint32(10).string(m.action);
                if (m.val != null && Object.hasOwnProperty.call(m, "val"))
                    w.uint32(16).int32(m.val);
                if (m.start != null && Object.hasOwnProperty.call(m, "start"))
                    w.uint32(24).uint32(m.start);
                return w;
            };

            /**
             * Encodes the specified SuspendResumeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SuspendResumeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SuspendResumeFtraceEvent
             * @static
             * @param {perfetto.protos.ISuspendResumeFtraceEvent} message SuspendResumeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SuspendResumeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SuspendResumeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SuspendResumeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SuspendResumeFtraceEvent} SuspendResumeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SuspendResumeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SuspendResumeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.action = r.string();
                        break;
                    case 2:
                        m.val = r.int32();
                        break;
                    case 3:
                        m.start = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SuspendResumeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SuspendResumeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SuspendResumeFtraceEvent} SuspendResumeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SuspendResumeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SuspendResumeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SuspendResumeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SuspendResumeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.action != null && m.hasOwnProperty("action")) {
                    if (!$util.isString(m.action))
                        return "action: string expected";
                }
                if (m.val != null && m.hasOwnProperty("val")) {
                    if (!$util.isInteger(m.val))
                        return "val: integer expected";
                }
                if (m.start != null && m.hasOwnProperty("start")) {
                    if (!$util.isInteger(m.start))
                        return "start: integer expected";
                }
                return null;
            };

            /**
             * Creates a SuspendResumeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SuspendResumeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SuspendResumeFtraceEvent} SuspendResumeFtraceEvent
             */
            SuspendResumeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SuspendResumeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SuspendResumeFtraceEvent();
                if (d.action != null) {
                    m.action = String(d.action);
                }
                if (d.val != null) {
                    m.val = d.val | 0;
                }
                if (d.start != null) {
                    m.start = d.start >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SuspendResumeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SuspendResumeFtraceEvent
             * @static
             * @param {perfetto.protos.SuspendResumeFtraceEvent} m SuspendResumeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SuspendResumeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.action = "";
                    d.val = 0;
                    d.start = 0;
                }
                if (m.action != null && m.hasOwnProperty("action")) {
                    d.action = m.action;
                }
                if (m.val != null && m.hasOwnProperty("val")) {
                    d.val = m.val;
                }
                if (m.start != null && m.hasOwnProperty("start")) {
                    d.start = m.start;
                }
                return d;
            };

            /**
             * Converts this SuspendResumeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SuspendResumeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SuspendResumeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SuspendResumeFtraceEvent;
        })();

        protos.GpuFrequencyFtraceEvent = (function() {

            /**
             * Properties of a GpuFrequencyFtraceEvent.
             * @memberof perfetto.protos
             * @interface IGpuFrequencyFtraceEvent
             * @property {number|null} [gpuId] GpuFrequencyFtraceEvent gpuId
             * @property {number|null} [state] GpuFrequencyFtraceEvent state
             */

            /**
             * Constructs a new GpuFrequencyFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a GpuFrequencyFtraceEvent.
             * @implements IGpuFrequencyFtraceEvent
             * @constructor
             * @param {perfetto.protos.IGpuFrequencyFtraceEvent=} [p] Properties to set
             */
            function GpuFrequencyFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * GpuFrequencyFtraceEvent gpuId.
             * @member {number} gpuId
             * @memberof perfetto.protos.GpuFrequencyFtraceEvent
             * @instance
             */
            GpuFrequencyFtraceEvent.prototype.gpuId = 0;

            /**
             * GpuFrequencyFtraceEvent state.
             * @member {number} state
             * @memberof perfetto.protos.GpuFrequencyFtraceEvent
             * @instance
             */
            GpuFrequencyFtraceEvent.prototype.state = 0;

            /**
             * Creates a new GpuFrequencyFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.GpuFrequencyFtraceEvent
             * @static
             * @param {perfetto.protos.IGpuFrequencyFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.GpuFrequencyFtraceEvent} GpuFrequencyFtraceEvent instance
             */
            GpuFrequencyFtraceEvent.create = function create(properties) {
                return new GpuFrequencyFtraceEvent(properties);
            };

            /**
             * Encodes the specified GpuFrequencyFtraceEvent message. Does not implicitly {@link perfetto.protos.GpuFrequencyFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.GpuFrequencyFtraceEvent
             * @static
             * @param {perfetto.protos.IGpuFrequencyFtraceEvent} m GpuFrequencyFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GpuFrequencyFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.gpuId != null && Object.hasOwnProperty.call(m, "gpuId"))
                    w.uint32(8).uint32(m.gpuId);
                if (m.state != null && Object.hasOwnProperty.call(m, "state"))
                    w.uint32(16).uint32(m.state);
                return w;
            };

            /**
             * Encodes the specified GpuFrequencyFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.GpuFrequencyFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.GpuFrequencyFtraceEvent
             * @static
             * @param {perfetto.protos.IGpuFrequencyFtraceEvent} message GpuFrequencyFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GpuFrequencyFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a GpuFrequencyFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.GpuFrequencyFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.GpuFrequencyFtraceEvent} GpuFrequencyFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GpuFrequencyFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.GpuFrequencyFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.gpuId = r.uint32();
                        break;
                    case 2:
                        m.state = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a GpuFrequencyFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.GpuFrequencyFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.GpuFrequencyFtraceEvent} GpuFrequencyFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GpuFrequencyFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a GpuFrequencyFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.GpuFrequencyFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            GpuFrequencyFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.gpuId != null && m.hasOwnProperty("gpuId")) {
                    if (!$util.isInteger(m.gpuId))
                        return "gpuId: integer expected";
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    if (!$util.isInteger(m.state))
                        return "state: integer expected";
                }
                return null;
            };

            /**
             * Creates a GpuFrequencyFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.GpuFrequencyFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.GpuFrequencyFtraceEvent} GpuFrequencyFtraceEvent
             */
            GpuFrequencyFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.GpuFrequencyFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.GpuFrequencyFtraceEvent();
                if (d.gpuId != null) {
                    m.gpuId = d.gpuId >>> 0;
                }
                if (d.state != null) {
                    m.state = d.state >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a GpuFrequencyFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.GpuFrequencyFtraceEvent
             * @static
             * @param {perfetto.protos.GpuFrequencyFtraceEvent} m GpuFrequencyFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            GpuFrequencyFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.gpuId = 0;
                    d.state = 0;
                }
                if (m.gpuId != null && m.hasOwnProperty("gpuId")) {
                    d.gpuId = m.gpuId;
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    d.state = m.state;
                }
                return d;
            };

            /**
             * Converts this GpuFrequencyFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.GpuFrequencyFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            GpuFrequencyFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return GpuFrequencyFtraceEvent;
        })();

        protos.WakeupSourceActivateFtraceEvent = (function() {

            /**
             * Properties of a WakeupSourceActivateFtraceEvent.
             * @memberof perfetto.protos
             * @interface IWakeupSourceActivateFtraceEvent
             * @property {string|null} [name] WakeupSourceActivateFtraceEvent name
             * @property {number|null} [state] WakeupSourceActivateFtraceEvent state
             */

            /**
             * Constructs a new WakeupSourceActivateFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a WakeupSourceActivateFtraceEvent.
             * @implements IWakeupSourceActivateFtraceEvent
             * @constructor
             * @param {perfetto.protos.IWakeupSourceActivateFtraceEvent=} [p] Properties to set
             */
            function WakeupSourceActivateFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * WakeupSourceActivateFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.WakeupSourceActivateFtraceEvent
             * @instance
             */
            WakeupSourceActivateFtraceEvent.prototype.name = "";

            /**
             * WakeupSourceActivateFtraceEvent state.
             * @member {number} state
             * @memberof perfetto.protos.WakeupSourceActivateFtraceEvent
             * @instance
             */
            WakeupSourceActivateFtraceEvent.prototype.state = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new WakeupSourceActivateFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.WakeupSourceActivateFtraceEvent
             * @static
             * @param {perfetto.protos.IWakeupSourceActivateFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.WakeupSourceActivateFtraceEvent} WakeupSourceActivateFtraceEvent instance
             */
            WakeupSourceActivateFtraceEvent.create = function create(properties) {
                return new WakeupSourceActivateFtraceEvent(properties);
            };

            /**
             * Encodes the specified WakeupSourceActivateFtraceEvent message. Does not implicitly {@link perfetto.protos.WakeupSourceActivateFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.WakeupSourceActivateFtraceEvent
             * @static
             * @param {perfetto.protos.IWakeupSourceActivateFtraceEvent} m WakeupSourceActivateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            WakeupSourceActivateFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                if (m.state != null && Object.hasOwnProperty.call(m, "state"))
                    w.uint32(16).uint64(m.state);
                return w;
            };

            /**
             * Encodes the specified WakeupSourceActivateFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.WakeupSourceActivateFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.WakeupSourceActivateFtraceEvent
             * @static
             * @param {perfetto.protos.IWakeupSourceActivateFtraceEvent} message WakeupSourceActivateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            WakeupSourceActivateFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a WakeupSourceActivateFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.WakeupSourceActivateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.WakeupSourceActivateFtraceEvent} WakeupSourceActivateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            WakeupSourceActivateFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.WakeupSourceActivateFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    case 2:
                        m.state = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a WakeupSourceActivateFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.WakeupSourceActivateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.WakeupSourceActivateFtraceEvent} WakeupSourceActivateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            WakeupSourceActivateFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a WakeupSourceActivateFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.WakeupSourceActivateFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            WakeupSourceActivateFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    if (!$util.isInteger(m.state) && !(m.state && $util.isInteger(m.state.low) && $util.isInteger(m.state.high)))
                        return "state: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a WakeupSourceActivateFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.WakeupSourceActivateFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.WakeupSourceActivateFtraceEvent} WakeupSourceActivateFtraceEvent
             */
            WakeupSourceActivateFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.WakeupSourceActivateFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.WakeupSourceActivateFtraceEvent();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.state != null) {
                    if ($util.Long)
                        (m.state = $util.Long.fromValue(d.state)).unsigned = true;
                    else if (typeof d.state === "string")
                        m.state = parseInt(d.state, 10);
                    else if (typeof d.state === "number")
                        m.state = d.state;
                    else if (typeof d.state === "object")
                        m.state = new $util.LongBits(d.state.low >>> 0, d.state.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a WakeupSourceActivateFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.WakeupSourceActivateFtraceEvent
             * @static
             * @param {perfetto.protos.WakeupSourceActivateFtraceEvent} m WakeupSourceActivateFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            WakeupSourceActivateFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.state = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.state = o.longs === String ? "0" : 0;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    if (typeof m.state === "number")
                        d.state = o.longs === String ? String(m.state) : m.state;
                    else
                        d.state = o.longs === String ? $util.Long.prototype.toString.call(m.state) : o.longs === Number ? new $util.LongBits(m.state.low >>> 0, m.state.high >>> 0).toNumber(true) : m.state;
                }
                return d;
            };

            /**
             * Converts this WakeupSourceActivateFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.WakeupSourceActivateFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            WakeupSourceActivateFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return WakeupSourceActivateFtraceEvent;
        })();

        protos.WakeupSourceDeactivateFtraceEvent = (function() {

            /**
             * Properties of a WakeupSourceDeactivateFtraceEvent.
             * @memberof perfetto.protos
             * @interface IWakeupSourceDeactivateFtraceEvent
             * @property {string|null} [name] WakeupSourceDeactivateFtraceEvent name
             * @property {number|null} [state] WakeupSourceDeactivateFtraceEvent state
             */

            /**
             * Constructs a new WakeupSourceDeactivateFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a WakeupSourceDeactivateFtraceEvent.
             * @implements IWakeupSourceDeactivateFtraceEvent
             * @constructor
             * @param {perfetto.protos.IWakeupSourceDeactivateFtraceEvent=} [p] Properties to set
             */
            function WakeupSourceDeactivateFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * WakeupSourceDeactivateFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.WakeupSourceDeactivateFtraceEvent
             * @instance
             */
            WakeupSourceDeactivateFtraceEvent.prototype.name = "";

            /**
             * WakeupSourceDeactivateFtraceEvent state.
             * @member {number} state
             * @memberof perfetto.protos.WakeupSourceDeactivateFtraceEvent
             * @instance
             */
            WakeupSourceDeactivateFtraceEvent.prototype.state = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new WakeupSourceDeactivateFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.WakeupSourceDeactivateFtraceEvent
             * @static
             * @param {perfetto.protos.IWakeupSourceDeactivateFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.WakeupSourceDeactivateFtraceEvent} WakeupSourceDeactivateFtraceEvent instance
             */
            WakeupSourceDeactivateFtraceEvent.create = function create(properties) {
                return new WakeupSourceDeactivateFtraceEvent(properties);
            };

            /**
             * Encodes the specified WakeupSourceDeactivateFtraceEvent message. Does not implicitly {@link perfetto.protos.WakeupSourceDeactivateFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.WakeupSourceDeactivateFtraceEvent
             * @static
             * @param {perfetto.protos.IWakeupSourceDeactivateFtraceEvent} m WakeupSourceDeactivateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            WakeupSourceDeactivateFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                if (m.state != null && Object.hasOwnProperty.call(m, "state"))
                    w.uint32(16).uint64(m.state);
                return w;
            };

            /**
             * Encodes the specified WakeupSourceDeactivateFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.WakeupSourceDeactivateFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.WakeupSourceDeactivateFtraceEvent
             * @static
             * @param {perfetto.protos.IWakeupSourceDeactivateFtraceEvent} message WakeupSourceDeactivateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            WakeupSourceDeactivateFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a WakeupSourceDeactivateFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.WakeupSourceDeactivateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.WakeupSourceDeactivateFtraceEvent} WakeupSourceDeactivateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            WakeupSourceDeactivateFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.WakeupSourceDeactivateFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    case 2:
                        m.state = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a WakeupSourceDeactivateFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.WakeupSourceDeactivateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.WakeupSourceDeactivateFtraceEvent} WakeupSourceDeactivateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            WakeupSourceDeactivateFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a WakeupSourceDeactivateFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.WakeupSourceDeactivateFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            WakeupSourceDeactivateFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    if (!$util.isInteger(m.state) && !(m.state && $util.isInteger(m.state.low) && $util.isInteger(m.state.high)))
                        return "state: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a WakeupSourceDeactivateFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.WakeupSourceDeactivateFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.WakeupSourceDeactivateFtraceEvent} WakeupSourceDeactivateFtraceEvent
             */
            WakeupSourceDeactivateFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.WakeupSourceDeactivateFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.WakeupSourceDeactivateFtraceEvent();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.state != null) {
                    if ($util.Long)
                        (m.state = $util.Long.fromValue(d.state)).unsigned = true;
                    else if (typeof d.state === "string")
                        m.state = parseInt(d.state, 10);
                    else if (typeof d.state === "number")
                        m.state = d.state;
                    else if (typeof d.state === "object")
                        m.state = new $util.LongBits(d.state.low >>> 0, d.state.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a WakeupSourceDeactivateFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.WakeupSourceDeactivateFtraceEvent
             * @static
             * @param {perfetto.protos.WakeupSourceDeactivateFtraceEvent} m WakeupSourceDeactivateFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            WakeupSourceDeactivateFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.state = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.state = o.longs === String ? "0" : 0;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    if (typeof m.state === "number")
                        d.state = o.longs === String ? String(m.state) : m.state;
                    else
                        d.state = o.longs === String ? $util.Long.prototype.toString.call(m.state) : o.longs === Number ? new $util.LongBits(m.state.low >>> 0, m.state.high >>> 0).toNumber(true) : m.state;
                }
                return d;
            };

            /**
             * Converts this WakeupSourceDeactivateFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.WakeupSourceDeactivateFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            WakeupSourceDeactivateFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return WakeupSourceDeactivateFtraceEvent;
        })();

        protos.ConsoleFtraceEvent = (function() {

            /**
             * Properties of a ConsoleFtraceEvent.
             * @memberof perfetto.protos
             * @interface IConsoleFtraceEvent
             * @property {string|null} [msg] ConsoleFtraceEvent msg
             */

            /**
             * Constructs a new ConsoleFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a ConsoleFtraceEvent.
             * @implements IConsoleFtraceEvent
             * @constructor
             * @param {perfetto.protos.IConsoleFtraceEvent=} [p] Properties to set
             */
            function ConsoleFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ConsoleFtraceEvent msg.
             * @member {string} msg
             * @memberof perfetto.protos.ConsoleFtraceEvent
             * @instance
             */
            ConsoleFtraceEvent.prototype.msg = "";

            /**
             * Creates a new ConsoleFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ConsoleFtraceEvent
             * @static
             * @param {perfetto.protos.IConsoleFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.ConsoleFtraceEvent} ConsoleFtraceEvent instance
             */
            ConsoleFtraceEvent.create = function create(properties) {
                return new ConsoleFtraceEvent(properties);
            };

            /**
             * Encodes the specified ConsoleFtraceEvent message. Does not implicitly {@link perfetto.protos.ConsoleFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ConsoleFtraceEvent
             * @static
             * @param {perfetto.protos.IConsoleFtraceEvent} m ConsoleFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ConsoleFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.msg != null && Object.hasOwnProperty.call(m, "msg"))
                    w.uint32(10).string(m.msg);
                return w;
            };

            /**
             * Encodes the specified ConsoleFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.ConsoleFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ConsoleFtraceEvent
             * @static
             * @param {perfetto.protos.IConsoleFtraceEvent} message ConsoleFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ConsoleFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ConsoleFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ConsoleFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ConsoleFtraceEvent} ConsoleFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ConsoleFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ConsoleFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.msg = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ConsoleFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ConsoleFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ConsoleFtraceEvent} ConsoleFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ConsoleFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ConsoleFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.ConsoleFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ConsoleFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.msg != null && m.hasOwnProperty("msg")) {
                    if (!$util.isString(m.msg))
                        return "msg: string expected";
                }
                return null;
            };

            /**
             * Creates a ConsoleFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ConsoleFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ConsoleFtraceEvent} ConsoleFtraceEvent
             */
            ConsoleFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ConsoleFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.ConsoleFtraceEvent();
                if (d.msg != null) {
                    m.msg = String(d.msg);
                }
                return m;
            };

            /**
             * Creates a plain object from a ConsoleFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ConsoleFtraceEvent
             * @static
             * @param {perfetto.protos.ConsoleFtraceEvent} m ConsoleFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ConsoleFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.msg = "";
                }
                if (m.msg != null && m.hasOwnProperty("msg")) {
                    d.msg = m.msg;
                }
                return d;
            };

            /**
             * Converts this ConsoleFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ConsoleFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ConsoleFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ConsoleFtraceEvent;
        })();

        protos.SysEnterFtraceEvent = (function() {

            /**
             * Properties of a SysEnterFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISysEnterFtraceEvent
             * @property {number|null} [id] SysEnterFtraceEvent id
             */

            /**
             * Constructs a new SysEnterFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SysEnterFtraceEvent.
             * @implements ISysEnterFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISysEnterFtraceEvent=} [p] Properties to set
             */
            function SysEnterFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SysEnterFtraceEvent id.
             * @member {number} id
             * @memberof perfetto.protos.SysEnterFtraceEvent
             * @instance
             */
            SysEnterFtraceEvent.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new SysEnterFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SysEnterFtraceEvent
             * @static
             * @param {perfetto.protos.ISysEnterFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SysEnterFtraceEvent} SysEnterFtraceEvent instance
             */
            SysEnterFtraceEvent.create = function create(properties) {
                return new SysEnterFtraceEvent(properties);
            };

            /**
             * Encodes the specified SysEnterFtraceEvent message. Does not implicitly {@link perfetto.protos.SysEnterFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SysEnterFtraceEvent
             * @static
             * @param {perfetto.protos.ISysEnterFtraceEvent} m SysEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SysEnterFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.id != null && Object.hasOwnProperty.call(m, "id"))
                    w.uint32(8).int64(m.id);
                return w;
            };

            /**
             * Encodes the specified SysEnterFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SysEnterFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SysEnterFtraceEvent
             * @static
             * @param {perfetto.protos.ISysEnterFtraceEvent} message SysEnterFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SysEnterFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SysEnterFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SysEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SysEnterFtraceEvent} SysEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SysEnterFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SysEnterFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.id = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SysEnterFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SysEnterFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SysEnterFtraceEvent} SysEnterFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SysEnterFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SysEnterFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SysEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SysEnterFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.id != null && m.hasOwnProperty("id")) {
                    if (!$util.isInteger(m.id) && !(m.id && $util.isInteger(m.id.low) && $util.isInteger(m.id.high)))
                        return "id: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a SysEnterFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SysEnterFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SysEnterFtraceEvent} SysEnterFtraceEvent
             */
            SysEnterFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SysEnterFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SysEnterFtraceEvent();
                if (d.id != null) {
                    if ($util.Long)
                        (m.id = $util.Long.fromValue(d.id)).unsigned = false;
                    else if (typeof d.id === "string")
                        m.id = parseInt(d.id, 10);
                    else if (typeof d.id === "number")
                        m.id = d.id;
                    else if (typeof d.id === "object")
                        m.id = new $util.LongBits(d.id.low >>> 0, d.id.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from a SysEnterFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SysEnterFtraceEvent
             * @static
             * @param {perfetto.protos.SysEnterFtraceEvent} m SysEnterFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SysEnterFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.id = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.id = o.longs === String ? "0" : 0;
                }
                if (m.id != null && m.hasOwnProperty("id")) {
                    if (typeof m.id === "number")
                        d.id = o.longs === String ? String(m.id) : m.id;
                    else
                        d.id = o.longs === String ? $util.Long.prototype.toString.call(m.id) : o.longs === Number ? new $util.LongBits(m.id.low >>> 0, m.id.high >>> 0).toNumber() : m.id;
                }
                return d;
            };

            /**
             * Converts this SysEnterFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SysEnterFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SysEnterFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SysEnterFtraceEvent;
        })();

        protos.SysExitFtraceEvent = (function() {

            /**
             * Properties of a SysExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISysExitFtraceEvent
             * @property {number|null} [id] SysExitFtraceEvent id
             * @property {number|null} [ret] SysExitFtraceEvent ret
             */

            /**
             * Constructs a new SysExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SysExitFtraceEvent.
             * @implements ISysExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISysExitFtraceEvent=} [p] Properties to set
             */
            function SysExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SysExitFtraceEvent id.
             * @member {number} id
             * @memberof perfetto.protos.SysExitFtraceEvent
             * @instance
             */
            SysExitFtraceEvent.prototype.id = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * SysExitFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.SysExitFtraceEvent
             * @instance
             */
            SysExitFtraceEvent.prototype.ret = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new SysExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SysExitFtraceEvent
             * @static
             * @param {perfetto.protos.ISysExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SysExitFtraceEvent} SysExitFtraceEvent instance
             */
            SysExitFtraceEvent.create = function create(properties) {
                return new SysExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified SysExitFtraceEvent message. Does not implicitly {@link perfetto.protos.SysExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SysExitFtraceEvent
             * @static
             * @param {perfetto.protos.ISysExitFtraceEvent} m SysExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SysExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.id != null && Object.hasOwnProperty.call(m, "id"))
                    w.uint32(8).int64(m.id);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(16).int64(m.ret);
                return w;
            };

            /**
             * Encodes the specified SysExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SysExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SysExitFtraceEvent
             * @static
             * @param {perfetto.protos.ISysExitFtraceEvent} message SysExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SysExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SysExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SysExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SysExitFtraceEvent} SysExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SysExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SysExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.id = r.int64();
                        break;
                    case 2:
                        m.ret = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SysExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SysExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SysExitFtraceEvent} SysExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SysExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SysExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SysExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SysExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.id != null && m.hasOwnProperty("id")) {
                    if (!$util.isInteger(m.id) && !(m.id && $util.isInteger(m.id.low) && $util.isInteger(m.id.high)))
                        return "id: integer|Long expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret) && !(m.ret && $util.isInteger(m.ret.low) && $util.isInteger(m.ret.high)))
                        return "ret: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a SysExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SysExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SysExitFtraceEvent} SysExitFtraceEvent
             */
            SysExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SysExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SysExitFtraceEvent();
                if (d.id != null) {
                    if ($util.Long)
                        (m.id = $util.Long.fromValue(d.id)).unsigned = false;
                    else if (typeof d.id === "string")
                        m.id = parseInt(d.id, 10);
                    else if (typeof d.id === "number")
                        m.id = d.id;
                    else if (typeof d.id === "object")
                        m.id = new $util.LongBits(d.id.low >>> 0, d.id.high >>> 0).toNumber();
                }
                if (d.ret != null) {
                    if ($util.Long)
                        (m.ret = $util.Long.fromValue(d.ret)).unsigned = false;
                    else if (typeof d.ret === "string")
                        m.ret = parseInt(d.ret, 10);
                    else if (typeof d.ret === "number")
                        m.ret = d.ret;
                    else if (typeof d.ret === "object")
                        m.ret = new $util.LongBits(d.ret.low >>> 0, d.ret.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from a SysExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SysExitFtraceEvent
             * @static
             * @param {perfetto.protos.SysExitFtraceEvent} m SysExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SysExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.id = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.id = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.ret = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ret = o.longs === String ? "0" : 0;
                }
                if (m.id != null && m.hasOwnProperty("id")) {
                    if (typeof m.id === "number")
                        d.id = o.longs === String ? String(m.id) : m.id;
                    else
                        d.id = o.longs === String ? $util.Long.prototype.toString.call(m.id) : o.longs === Number ? new $util.LongBits(m.id.low >>> 0, m.id.high >>> 0).toNumber() : m.id;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (typeof m.ret === "number")
                        d.ret = o.longs === String ? String(m.ret) : m.ret;
                    else
                        d.ret = o.longs === String ? $util.Long.prototype.toString.call(m.ret) : o.longs === Number ? new $util.LongBits(m.ret.low >>> 0, m.ret.high >>> 0).toNumber() : m.ret;
                }
                return d;
            };

            /**
             * Converts this SysExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SysExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SysExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SysExitFtraceEvent;
        })();

        protos.RegulatorDisableFtraceEvent = (function() {

            /**
             * Properties of a RegulatorDisableFtraceEvent.
             * @memberof perfetto.protos
             * @interface IRegulatorDisableFtraceEvent
             * @property {string|null} [name] RegulatorDisableFtraceEvent name
             */

            /**
             * Constructs a new RegulatorDisableFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a RegulatorDisableFtraceEvent.
             * @implements IRegulatorDisableFtraceEvent
             * @constructor
             * @param {perfetto.protos.IRegulatorDisableFtraceEvent=} [p] Properties to set
             */
            function RegulatorDisableFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * RegulatorDisableFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.RegulatorDisableFtraceEvent
             * @instance
             */
            RegulatorDisableFtraceEvent.prototype.name = "";

            /**
             * Creates a new RegulatorDisableFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.RegulatorDisableFtraceEvent
             * @static
             * @param {perfetto.protos.IRegulatorDisableFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.RegulatorDisableFtraceEvent} RegulatorDisableFtraceEvent instance
             */
            RegulatorDisableFtraceEvent.create = function create(properties) {
                return new RegulatorDisableFtraceEvent(properties);
            };

            /**
             * Encodes the specified RegulatorDisableFtraceEvent message. Does not implicitly {@link perfetto.protos.RegulatorDisableFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.RegulatorDisableFtraceEvent
             * @static
             * @param {perfetto.protos.IRegulatorDisableFtraceEvent} m RegulatorDisableFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RegulatorDisableFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                return w;
            };

            /**
             * Encodes the specified RegulatorDisableFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.RegulatorDisableFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.RegulatorDisableFtraceEvent
             * @static
             * @param {perfetto.protos.IRegulatorDisableFtraceEvent} message RegulatorDisableFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RegulatorDisableFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a RegulatorDisableFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.RegulatorDisableFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.RegulatorDisableFtraceEvent} RegulatorDisableFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RegulatorDisableFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.RegulatorDisableFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a RegulatorDisableFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.RegulatorDisableFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.RegulatorDisableFtraceEvent} RegulatorDisableFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RegulatorDisableFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a RegulatorDisableFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.RegulatorDisableFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            RegulatorDisableFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                return null;
            };

            /**
             * Creates a RegulatorDisableFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.RegulatorDisableFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.RegulatorDisableFtraceEvent} RegulatorDisableFtraceEvent
             */
            RegulatorDisableFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.RegulatorDisableFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.RegulatorDisableFtraceEvent();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                return m;
            };

            /**
             * Creates a plain object from a RegulatorDisableFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.RegulatorDisableFtraceEvent
             * @static
             * @param {perfetto.protos.RegulatorDisableFtraceEvent} m RegulatorDisableFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            RegulatorDisableFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                return d;
            };

            /**
             * Converts this RegulatorDisableFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.RegulatorDisableFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            RegulatorDisableFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return RegulatorDisableFtraceEvent;
        })();

        protos.RegulatorDisableCompleteFtraceEvent = (function() {

            /**
             * Properties of a RegulatorDisableCompleteFtraceEvent.
             * @memberof perfetto.protos
             * @interface IRegulatorDisableCompleteFtraceEvent
             * @property {string|null} [name] RegulatorDisableCompleteFtraceEvent name
             */

            /**
             * Constructs a new RegulatorDisableCompleteFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a RegulatorDisableCompleteFtraceEvent.
             * @implements IRegulatorDisableCompleteFtraceEvent
             * @constructor
             * @param {perfetto.protos.IRegulatorDisableCompleteFtraceEvent=} [p] Properties to set
             */
            function RegulatorDisableCompleteFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * RegulatorDisableCompleteFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.RegulatorDisableCompleteFtraceEvent
             * @instance
             */
            RegulatorDisableCompleteFtraceEvent.prototype.name = "";

            /**
             * Creates a new RegulatorDisableCompleteFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.RegulatorDisableCompleteFtraceEvent
             * @static
             * @param {perfetto.protos.IRegulatorDisableCompleteFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.RegulatorDisableCompleteFtraceEvent} RegulatorDisableCompleteFtraceEvent instance
             */
            RegulatorDisableCompleteFtraceEvent.create = function create(properties) {
                return new RegulatorDisableCompleteFtraceEvent(properties);
            };

            /**
             * Encodes the specified RegulatorDisableCompleteFtraceEvent message. Does not implicitly {@link perfetto.protos.RegulatorDisableCompleteFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.RegulatorDisableCompleteFtraceEvent
             * @static
             * @param {perfetto.protos.IRegulatorDisableCompleteFtraceEvent} m RegulatorDisableCompleteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RegulatorDisableCompleteFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                return w;
            };

            /**
             * Encodes the specified RegulatorDisableCompleteFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.RegulatorDisableCompleteFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.RegulatorDisableCompleteFtraceEvent
             * @static
             * @param {perfetto.protos.IRegulatorDisableCompleteFtraceEvent} message RegulatorDisableCompleteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RegulatorDisableCompleteFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a RegulatorDisableCompleteFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.RegulatorDisableCompleteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.RegulatorDisableCompleteFtraceEvent} RegulatorDisableCompleteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RegulatorDisableCompleteFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.RegulatorDisableCompleteFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a RegulatorDisableCompleteFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.RegulatorDisableCompleteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.RegulatorDisableCompleteFtraceEvent} RegulatorDisableCompleteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RegulatorDisableCompleteFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a RegulatorDisableCompleteFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.RegulatorDisableCompleteFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            RegulatorDisableCompleteFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                return null;
            };

            /**
             * Creates a RegulatorDisableCompleteFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.RegulatorDisableCompleteFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.RegulatorDisableCompleteFtraceEvent} RegulatorDisableCompleteFtraceEvent
             */
            RegulatorDisableCompleteFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.RegulatorDisableCompleteFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.RegulatorDisableCompleteFtraceEvent();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                return m;
            };

            /**
             * Creates a plain object from a RegulatorDisableCompleteFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.RegulatorDisableCompleteFtraceEvent
             * @static
             * @param {perfetto.protos.RegulatorDisableCompleteFtraceEvent} m RegulatorDisableCompleteFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            RegulatorDisableCompleteFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                return d;
            };

            /**
             * Converts this RegulatorDisableCompleteFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.RegulatorDisableCompleteFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            RegulatorDisableCompleteFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return RegulatorDisableCompleteFtraceEvent;
        })();

        protos.RegulatorEnableFtraceEvent = (function() {

            /**
             * Properties of a RegulatorEnableFtraceEvent.
             * @memberof perfetto.protos
             * @interface IRegulatorEnableFtraceEvent
             * @property {string|null} [name] RegulatorEnableFtraceEvent name
             */

            /**
             * Constructs a new RegulatorEnableFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a RegulatorEnableFtraceEvent.
             * @implements IRegulatorEnableFtraceEvent
             * @constructor
             * @param {perfetto.protos.IRegulatorEnableFtraceEvent=} [p] Properties to set
             */
            function RegulatorEnableFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * RegulatorEnableFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.RegulatorEnableFtraceEvent
             * @instance
             */
            RegulatorEnableFtraceEvent.prototype.name = "";

            /**
             * Creates a new RegulatorEnableFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.RegulatorEnableFtraceEvent
             * @static
             * @param {perfetto.protos.IRegulatorEnableFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.RegulatorEnableFtraceEvent} RegulatorEnableFtraceEvent instance
             */
            RegulatorEnableFtraceEvent.create = function create(properties) {
                return new RegulatorEnableFtraceEvent(properties);
            };

            /**
             * Encodes the specified RegulatorEnableFtraceEvent message. Does not implicitly {@link perfetto.protos.RegulatorEnableFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.RegulatorEnableFtraceEvent
             * @static
             * @param {perfetto.protos.IRegulatorEnableFtraceEvent} m RegulatorEnableFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RegulatorEnableFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                return w;
            };

            /**
             * Encodes the specified RegulatorEnableFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.RegulatorEnableFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.RegulatorEnableFtraceEvent
             * @static
             * @param {perfetto.protos.IRegulatorEnableFtraceEvent} message RegulatorEnableFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RegulatorEnableFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a RegulatorEnableFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.RegulatorEnableFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.RegulatorEnableFtraceEvent} RegulatorEnableFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RegulatorEnableFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.RegulatorEnableFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a RegulatorEnableFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.RegulatorEnableFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.RegulatorEnableFtraceEvent} RegulatorEnableFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RegulatorEnableFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a RegulatorEnableFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.RegulatorEnableFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            RegulatorEnableFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                return null;
            };

            /**
             * Creates a RegulatorEnableFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.RegulatorEnableFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.RegulatorEnableFtraceEvent} RegulatorEnableFtraceEvent
             */
            RegulatorEnableFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.RegulatorEnableFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.RegulatorEnableFtraceEvent();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                return m;
            };

            /**
             * Creates a plain object from a RegulatorEnableFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.RegulatorEnableFtraceEvent
             * @static
             * @param {perfetto.protos.RegulatorEnableFtraceEvent} m RegulatorEnableFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            RegulatorEnableFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                return d;
            };

            /**
             * Converts this RegulatorEnableFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.RegulatorEnableFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            RegulatorEnableFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return RegulatorEnableFtraceEvent;
        })();

        protos.RegulatorEnableCompleteFtraceEvent = (function() {

            /**
             * Properties of a RegulatorEnableCompleteFtraceEvent.
             * @memberof perfetto.protos
             * @interface IRegulatorEnableCompleteFtraceEvent
             * @property {string|null} [name] RegulatorEnableCompleteFtraceEvent name
             */

            /**
             * Constructs a new RegulatorEnableCompleteFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a RegulatorEnableCompleteFtraceEvent.
             * @implements IRegulatorEnableCompleteFtraceEvent
             * @constructor
             * @param {perfetto.protos.IRegulatorEnableCompleteFtraceEvent=} [p] Properties to set
             */
            function RegulatorEnableCompleteFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * RegulatorEnableCompleteFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.RegulatorEnableCompleteFtraceEvent
             * @instance
             */
            RegulatorEnableCompleteFtraceEvent.prototype.name = "";

            /**
             * Creates a new RegulatorEnableCompleteFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.RegulatorEnableCompleteFtraceEvent
             * @static
             * @param {perfetto.protos.IRegulatorEnableCompleteFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.RegulatorEnableCompleteFtraceEvent} RegulatorEnableCompleteFtraceEvent instance
             */
            RegulatorEnableCompleteFtraceEvent.create = function create(properties) {
                return new RegulatorEnableCompleteFtraceEvent(properties);
            };

            /**
             * Encodes the specified RegulatorEnableCompleteFtraceEvent message. Does not implicitly {@link perfetto.protos.RegulatorEnableCompleteFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.RegulatorEnableCompleteFtraceEvent
             * @static
             * @param {perfetto.protos.IRegulatorEnableCompleteFtraceEvent} m RegulatorEnableCompleteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RegulatorEnableCompleteFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                return w;
            };

            /**
             * Encodes the specified RegulatorEnableCompleteFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.RegulatorEnableCompleteFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.RegulatorEnableCompleteFtraceEvent
             * @static
             * @param {perfetto.protos.IRegulatorEnableCompleteFtraceEvent} message RegulatorEnableCompleteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RegulatorEnableCompleteFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a RegulatorEnableCompleteFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.RegulatorEnableCompleteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.RegulatorEnableCompleteFtraceEvent} RegulatorEnableCompleteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RegulatorEnableCompleteFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.RegulatorEnableCompleteFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a RegulatorEnableCompleteFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.RegulatorEnableCompleteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.RegulatorEnableCompleteFtraceEvent} RegulatorEnableCompleteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RegulatorEnableCompleteFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a RegulatorEnableCompleteFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.RegulatorEnableCompleteFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            RegulatorEnableCompleteFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                return null;
            };

            /**
             * Creates a RegulatorEnableCompleteFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.RegulatorEnableCompleteFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.RegulatorEnableCompleteFtraceEvent} RegulatorEnableCompleteFtraceEvent
             */
            RegulatorEnableCompleteFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.RegulatorEnableCompleteFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.RegulatorEnableCompleteFtraceEvent();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                return m;
            };

            /**
             * Creates a plain object from a RegulatorEnableCompleteFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.RegulatorEnableCompleteFtraceEvent
             * @static
             * @param {perfetto.protos.RegulatorEnableCompleteFtraceEvent} m RegulatorEnableCompleteFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            RegulatorEnableCompleteFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                return d;
            };

            /**
             * Converts this RegulatorEnableCompleteFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.RegulatorEnableCompleteFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            RegulatorEnableCompleteFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return RegulatorEnableCompleteFtraceEvent;
        })();

        protos.RegulatorEnableDelayFtraceEvent = (function() {

            /**
             * Properties of a RegulatorEnableDelayFtraceEvent.
             * @memberof perfetto.protos
             * @interface IRegulatorEnableDelayFtraceEvent
             * @property {string|null} [name] RegulatorEnableDelayFtraceEvent name
             */

            /**
             * Constructs a new RegulatorEnableDelayFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a RegulatorEnableDelayFtraceEvent.
             * @implements IRegulatorEnableDelayFtraceEvent
             * @constructor
             * @param {perfetto.protos.IRegulatorEnableDelayFtraceEvent=} [p] Properties to set
             */
            function RegulatorEnableDelayFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * RegulatorEnableDelayFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.RegulatorEnableDelayFtraceEvent
             * @instance
             */
            RegulatorEnableDelayFtraceEvent.prototype.name = "";

            /**
             * Creates a new RegulatorEnableDelayFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.RegulatorEnableDelayFtraceEvent
             * @static
             * @param {perfetto.protos.IRegulatorEnableDelayFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.RegulatorEnableDelayFtraceEvent} RegulatorEnableDelayFtraceEvent instance
             */
            RegulatorEnableDelayFtraceEvent.create = function create(properties) {
                return new RegulatorEnableDelayFtraceEvent(properties);
            };

            /**
             * Encodes the specified RegulatorEnableDelayFtraceEvent message. Does not implicitly {@link perfetto.protos.RegulatorEnableDelayFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.RegulatorEnableDelayFtraceEvent
             * @static
             * @param {perfetto.protos.IRegulatorEnableDelayFtraceEvent} m RegulatorEnableDelayFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RegulatorEnableDelayFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                return w;
            };

            /**
             * Encodes the specified RegulatorEnableDelayFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.RegulatorEnableDelayFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.RegulatorEnableDelayFtraceEvent
             * @static
             * @param {perfetto.protos.IRegulatorEnableDelayFtraceEvent} message RegulatorEnableDelayFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RegulatorEnableDelayFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a RegulatorEnableDelayFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.RegulatorEnableDelayFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.RegulatorEnableDelayFtraceEvent} RegulatorEnableDelayFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RegulatorEnableDelayFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.RegulatorEnableDelayFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a RegulatorEnableDelayFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.RegulatorEnableDelayFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.RegulatorEnableDelayFtraceEvent} RegulatorEnableDelayFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RegulatorEnableDelayFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a RegulatorEnableDelayFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.RegulatorEnableDelayFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            RegulatorEnableDelayFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                return null;
            };

            /**
             * Creates a RegulatorEnableDelayFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.RegulatorEnableDelayFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.RegulatorEnableDelayFtraceEvent} RegulatorEnableDelayFtraceEvent
             */
            RegulatorEnableDelayFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.RegulatorEnableDelayFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.RegulatorEnableDelayFtraceEvent();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                return m;
            };

            /**
             * Creates a plain object from a RegulatorEnableDelayFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.RegulatorEnableDelayFtraceEvent
             * @static
             * @param {perfetto.protos.RegulatorEnableDelayFtraceEvent} m RegulatorEnableDelayFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            RegulatorEnableDelayFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                return d;
            };

            /**
             * Converts this RegulatorEnableDelayFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.RegulatorEnableDelayFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            RegulatorEnableDelayFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return RegulatorEnableDelayFtraceEvent;
        })();

        protos.RegulatorSetVoltageFtraceEvent = (function() {

            /**
             * Properties of a RegulatorSetVoltageFtraceEvent.
             * @memberof perfetto.protos
             * @interface IRegulatorSetVoltageFtraceEvent
             * @property {string|null} [name] RegulatorSetVoltageFtraceEvent name
             * @property {number|null} [min] RegulatorSetVoltageFtraceEvent min
             * @property {number|null} [max] RegulatorSetVoltageFtraceEvent max
             */

            /**
             * Constructs a new RegulatorSetVoltageFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a RegulatorSetVoltageFtraceEvent.
             * @implements IRegulatorSetVoltageFtraceEvent
             * @constructor
             * @param {perfetto.protos.IRegulatorSetVoltageFtraceEvent=} [p] Properties to set
             */
            function RegulatorSetVoltageFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * RegulatorSetVoltageFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.RegulatorSetVoltageFtraceEvent
             * @instance
             */
            RegulatorSetVoltageFtraceEvent.prototype.name = "";

            /**
             * RegulatorSetVoltageFtraceEvent min.
             * @member {number} min
             * @memberof perfetto.protos.RegulatorSetVoltageFtraceEvent
             * @instance
             */
            RegulatorSetVoltageFtraceEvent.prototype.min = 0;

            /**
             * RegulatorSetVoltageFtraceEvent max.
             * @member {number} max
             * @memberof perfetto.protos.RegulatorSetVoltageFtraceEvent
             * @instance
             */
            RegulatorSetVoltageFtraceEvent.prototype.max = 0;

            /**
             * Creates a new RegulatorSetVoltageFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.RegulatorSetVoltageFtraceEvent
             * @static
             * @param {perfetto.protos.IRegulatorSetVoltageFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.RegulatorSetVoltageFtraceEvent} RegulatorSetVoltageFtraceEvent instance
             */
            RegulatorSetVoltageFtraceEvent.create = function create(properties) {
                return new RegulatorSetVoltageFtraceEvent(properties);
            };

            /**
             * Encodes the specified RegulatorSetVoltageFtraceEvent message. Does not implicitly {@link perfetto.protos.RegulatorSetVoltageFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.RegulatorSetVoltageFtraceEvent
             * @static
             * @param {perfetto.protos.IRegulatorSetVoltageFtraceEvent} m RegulatorSetVoltageFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RegulatorSetVoltageFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                if (m.min != null && Object.hasOwnProperty.call(m, "min"))
                    w.uint32(16).int32(m.min);
                if (m.max != null && Object.hasOwnProperty.call(m, "max"))
                    w.uint32(24).int32(m.max);
                return w;
            };

            /**
             * Encodes the specified RegulatorSetVoltageFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.RegulatorSetVoltageFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.RegulatorSetVoltageFtraceEvent
             * @static
             * @param {perfetto.protos.IRegulatorSetVoltageFtraceEvent} message RegulatorSetVoltageFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RegulatorSetVoltageFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a RegulatorSetVoltageFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.RegulatorSetVoltageFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.RegulatorSetVoltageFtraceEvent} RegulatorSetVoltageFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RegulatorSetVoltageFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.RegulatorSetVoltageFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    case 2:
                        m.min = r.int32();
                        break;
                    case 3:
                        m.max = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a RegulatorSetVoltageFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.RegulatorSetVoltageFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.RegulatorSetVoltageFtraceEvent} RegulatorSetVoltageFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RegulatorSetVoltageFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a RegulatorSetVoltageFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.RegulatorSetVoltageFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            RegulatorSetVoltageFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.min != null && m.hasOwnProperty("min")) {
                    if (!$util.isInteger(m.min))
                        return "min: integer expected";
                }
                if (m.max != null && m.hasOwnProperty("max")) {
                    if (!$util.isInteger(m.max))
                        return "max: integer expected";
                }
                return null;
            };

            /**
             * Creates a RegulatorSetVoltageFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.RegulatorSetVoltageFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.RegulatorSetVoltageFtraceEvent} RegulatorSetVoltageFtraceEvent
             */
            RegulatorSetVoltageFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.RegulatorSetVoltageFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.RegulatorSetVoltageFtraceEvent();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.min != null) {
                    m.min = d.min | 0;
                }
                if (d.max != null) {
                    m.max = d.max | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a RegulatorSetVoltageFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.RegulatorSetVoltageFtraceEvent
             * @static
             * @param {perfetto.protos.RegulatorSetVoltageFtraceEvent} m RegulatorSetVoltageFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            RegulatorSetVoltageFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                    d.min = 0;
                    d.max = 0;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.min != null && m.hasOwnProperty("min")) {
                    d.min = m.min;
                }
                if (m.max != null && m.hasOwnProperty("max")) {
                    d.max = m.max;
                }
                return d;
            };

            /**
             * Converts this RegulatorSetVoltageFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.RegulatorSetVoltageFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            RegulatorSetVoltageFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return RegulatorSetVoltageFtraceEvent;
        })();

        protos.RegulatorSetVoltageCompleteFtraceEvent = (function() {

            /**
             * Properties of a RegulatorSetVoltageCompleteFtraceEvent.
             * @memberof perfetto.protos
             * @interface IRegulatorSetVoltageCompleteFtraceEvent
             * @property {string|null} [name] RegulatorSetVoltageCompleteFtraceEvent name
             * @property {number|null} [val] RegulatorSetVoltageCompleteFtraceEvent val
             */

            /**
             * Constructs a new RegulatorSetVoltageCompleteFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a RegulatorSetVoltageCompleteFtraceEvent.
             * @implements IRegulatorSetVoltageCompleteFtraceEvent
             * @constructor
             * @param {perfetto.protos.IRegulatorSetVoltageCompleteFtraceEvent=} [p] Properties to set
             */
            function RegulatorSetVoltageCompleteFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * RegulatorSetVoltageCompleteFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent
             * @instance
             */
            RegulatorSetVoltageCompleteFtraceEvent.prototype.name = "";

            /**
             * RegulatorSetVoltageCompleteFtraceEvent val.
             * @member {number} val
             * @memberof perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent
             * @instance
             */
            RegulatorSetVoltageCompleteFtraceEvent.prototype.val = 0;

            /**
             * Creates a new RegulatorSetVoltageCompleteFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent
             * @static
             * @param {perfetto.protos.IRegulatorSetVoltageCompleteFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent} RegulatorSetVoltageCompleteFtraceEvent instance
             */
            RegulatorSetVoltageCompleteFtraceEvent.create = function create(properties) {
                return new RegulatorSetVoltageCompleteFtraceEvent(properties);
            };

            /**
             * Encodes the specified RegulatorSetVoltageCompleteFtraceEvent message. Does not implicitly {@link perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent
             * @static
             * @param {perfetto.protos.IRegulatorSetVoltageCompleteFtraceEvent} m RegulatorSetVoltageCompleteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RegulatorSetVoltageCompleteFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                if (m.val != null && Object.hasOwnProperty.call(m, "val"))
                    w.uint32(16).uint32(m.val);
                return w;
            };

            /**
             * Encodes the specified RegulatorSetVoltageCompleteFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent
             * @static
             * @param {perfetto.protos.IRegulatorSetVoltageCompleteFtraceEvent} message RegulatorSetVoltageCompleteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RegulatorSetVoltageCompleteFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a RegulatorSetVoltageCompleteFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent} RegulatorSetVoltageCompleteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RegulatorSetVoltageCompleteFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    case 2:
                        m.val = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a RegulatorSetVoltageCompleteFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent} RegulatorSetVoltageCompleteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RegulatorSetVoltageCompleteFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a RegulatorSetVoltageCompleteFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            RegulatorSetVoltageCompleteFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.val != null && m.hasOwnProperty("val")) {
                    if (!$util.isInteger(m.val))
                        return "val: integer expected";
                }
                return null;
            };

            /**
             * Creates a RegulatorSetVoltageCompleteFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent} RegulatorSetVoltageCompleteFtraceEvent
             */
            RegulatorSetVoltageCompleteFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.val != null) {
                    m.val = d.val >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a RegulatorSetVoltageCompleteFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent
             * @static
             * @param {perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent} m RegulatorSetVoltageCompleteFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            RegulatorSetVoltageCompleteFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                    d.val = 0;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.val != null && m.hasOwnProperty("val")) {
                    d.val = m.val;
                }
                return d;
            };

            /**
             * Converts this RegulatorSetVoltageCompleteFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.RegulatorSetVoltageCompleteFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            RegulatorSetVoltageCompleteFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return RegulatorSetVoltageCompleteFtraceEvent;
        })();

        protos.SchedSwitchFtraceEvent = (function() {

            /**
             * Properties of a SchedSwitchFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISchedSwitchFtraceEvent
             * @property {string|null} [prevComm] SchedSwitchFtraceEvent prevComm
             * @property {number|null} [prevPid] SchedSwitchFtraceEvent prevPid
             * @property {number|null} [prevPrio] SchedSwitchFtraceEvent prevPrio
             * @property {number|null} [prevState] SchedSwitchFtraceEvent prevState
             * @property {string|null} [nextComm] SchedSwitchFtraceEvent nextComm
             * @property {number|null} [nextPid] SchedSwitchFtraceEvent nextPid
             * @property {number|null} [nextPrio] SchedSwitchFtraceEvent nextPrio
             */

            /**
             * Constructs a new SchedSwitchFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SchedSwitchFtraceEvent.
             * @implements ISchedSwitchFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISchedSwitchFtraceEvent=} [p] Properties to set
             */
            function SchedSwitchFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SchedSwitchFtraceEvent prevComm.
             * @member {string} prevComm
             * @memberof perfetto.protos.SchedSwitchFtraceEvent
             * @instance
             */
            SchedSwitchFtraceEvent.prototype.prevComm = "";

            /**
             * SchedSwitchFtraceEvent prevPid.
             * @member {number} prevPid
             * @memberof perfetto.protos.SchedSwitchFtraceEvent
             * @instance
             */
            SchedSwitchFtraceEvent.prototype.prevPid = 0;

            /**
             * SchedSwitchFtraceEvent prevPrio.
             * @member {number} prevPrio
             * @memberof perfetto.protos.SchedSwitchFtraceEvent
             * @instance
             */
            SchedSwitchFtraceEvent.prototype.prevPrio = 0;

            /**
             * SchedSwitchFtraceEvent prevState.
             * @member {number} prevState
             * @memberof perfetto.protos.SchedSwitchFtraceEvent
             * @instance
             */
            SchedSwitchFtraceEvent.prototype.prevState = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * SchedSwitchFtraceEvent nextComm.
             * @member {string} nextComm
             * @memberof perfetto.protos.SchedSwitchFtraceEvent
             * @instance
             */
            SchedSwitchFtraceEvent.prototype.nextComm = "";

            /**
             * SchedSwitchFtraceEvent nextPid.
             * @member {number} nextPid
             * @memberof perfetto.protos.SchedSwitchFtraceEvent
             * @instance
             */
            SchedSwitchFtraceEvent.prototype.nextPid = 0;

            /**
             * SchedSwitchFtraceEvent nextPrio.
             * @member {number} nextPrio
             * @memberof perfetto.protos.SchedSwitchFtraceEvent
             * @instance
             */
            SchedSwitchFtraceEvent.prototype.nextPrio = 0;

            /**
             * Creates a new SchedSwitchFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SchedSwitchFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedSwitchFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SchedSwitchFtraceEvent} SchedSwitchFtraceEvent instance
             */
            SchedSwitchFtraceEvent.create = function create(properties) {
                return new SchedSwitchFtraceEvent(properties);
            };

            /**
             * Encodes the specified SchedSwitchFtraceEvent message. Does not implicitly {@link perfetto.protos.SchedSwitchFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SchedSwitchFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedSwitchFtraceEvent} m SchedSwitchFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedSwitchFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.prevComm != null && Object.hasOwnProperty.call(m, "prevComm"))
                    w.uint32(10).string(m.prevComm);
                if (m.prevPid != null && Object.hasOwnProperty.call(m, "prevPid"))
                    w.uint32(16).int32(m.prevPid);
                if (m.prevPrio != null && Object.hasOwnProperty.call(m, "prevPrio"))
                    w.uint32(24).int32(m.prevPrio);
                if (m.prevState != null && Object.hasOwnProperty.call(m, "prevState"))
                    w.uint32(32).int64(m.prevState);
                if (m.nextComm != null && Object.hasOwnProperty.call(m, "nextComm"))
                    w.uint32(42).string(m.nextComm);
                if (m.nextPid != null && Object.hasOwnProperty.call(m, "nextPid"))
                    w.uint32(48).int32(m.nextPid);
                if (m.nextPrio != null && Object.hasOwnProperty.call(m, "nextPrio"))
                    w.uint32(56).int32(m.nextPrio);
                return w;
            };

            /**
             * Encodes the specified SchedSwitchFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SchedSwitchFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SchedSwitchFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedSwitchFtraceEvent} message SchedSwitchFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedSwitchFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SchedSwitchFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SchedSwitchFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SchedSwitchFtraceEvent} SchedSwitchFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedSwitchFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SchedSwitchFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.prevComm = r.string();
                        break;
                    case 2:
                        m.prevPid = r.int32();
                        break;
                    case 3:
                        m.prevPrio = r.int32();
                        break;
                    case 4:
                        m.prevState = r.int64();
                        break;
                    case 5:
                        m.nextComm = r.string();
                        break;
                    case 6:
                        m.nextPid = r.int32();
                        break;
                    case 7:
                        m.nextPrio = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SchedSwitchFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SchedSwitchFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SchedSwitchFtraceEvent} SchedSwitchFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedSwitchFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SchedSwitchFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SchedSwitchFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SchedSwitchFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.prevComm != null && m.hasOwnProperty("prevComm")) {
                    if (!$util.isString(m.prevComm))
                        return "prevComm: string expected";
                }
                if (m.prevPid != null && m.hasOwnProperty("prevPid")) {
                    if (!$util.isInteger(m.prevPid))
                        return "prevPid: integer expected";
                }
                if (m.prevPrio != null && m.hasOwnProperty("prevPrio")) {
                    if (!$util.isInteger(m.prevPrio))
                        return "prevPrio: integer expected";
                }
                if (m.prevState != null && m.hasOwnProperty("prevState")) {
                    if (!$util.isInteger(m.prevState) && !(m.prevState && $util.isInteger(m.prevState.low) && $util.isInteger(m.prevState.high)))
                        return "prevState: integer|Long expected";
                }
                if (m.nextComm != null && m.hasOwnProperty("nextComm")) {
                    if (!$util.isString(m.nextComm))
                        return "nextComm: string expected";
                }
                if (m.nextPid != null && m.hasOwnProperty("nextPid")) {
                    if (!$util.isInteger(m.nextPid))
                        return "nextPid: integer expected";
                }
                if (m.nextPrio != null && m.hasOwnProperty("nextPrio")) {
                    if (!$util.isInteger(m.nextPrio))
                        return "nextPrio: integer expected";
                }
                return null;
            };

            /**
             * Creates a SchedSwitchFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SchedSwitchFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SchedSwitchFtraceEvent} SchedSwitchFtraceEvent
             */
            SchedSwitchFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SchedSwitchFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SchedSwitchFtraceEvent();
                if (d.prevComm != null) {
                    m.prevComm = String(d.prevComm);
                }
                if (d.prevPid != null) {
                    m.prevPid = d.prevPid | 0;
                }
                if (d.prevPrio != null) {
                    m.prevPrio = d.prevPrio | 0;
                }
                if (d.prevState != null) {
                    if ($util.Long)
                        (m.prevState = $util.Long.fromValue(d.prevState)).unsigned = false;
                    else if (typeof d.prevState === "string")
                        m.prevState = parseInt(d.prevState, 10);
                    else if (typeof d.prevState === "number")
                        m.prevState = d.prevState;
                    else if (typeof d.prevState === "object")
                        m.prevState = new $util.LongBits(d.prevState.low >>> 0, d.prevState.high >>> 0).toNumber();
                }
                if (d.nextComm != null) {
                    m.nextComm = String(d.nextComm);
                }
                if (d.nextPid != null) {
                    m.nextPid = d.nextPid | 0;
                }
                if (d.nextPrio != null) {
                    m.nextPrio = d.nextPrio | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SchedSwitchFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SchedSwitchFtraceEvent
             * @static
             * @param {perfetto.protos.SchedSwitchFtraceEvent} m SchedSwitchFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SchedSwitchFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.prevComm = "";
                    d.prevPid = 0;
                    d.prevPrio = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.prevState = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.prevState = o.longs === String ? "0" : 0;
                    d.nextComm = "";
                    d.nextPid = 0;
                    d.nextPrio = 0;
                }
                if (m.prevComm != null && m.hasOwnProperty("prevComm")) {
                    d.prevComm = m.prevComm;
                }
                if (m.prevPid != null && m.hasOwnProperty("prevPid")) {
                    d.prevPid = m.prevPid;
                }
                if (m.prevPrio != null && m.hasOwnProperty("prevPrio")) {
                    d.prevPrio = m.prevPrio;
                }
                if (m.prevState != null && m.hasOwnProperty("prevState")) {
                    if (typeof m.prevState === "number")
                        d.prevState = o.longs === String ? String(m.prevState) : m.prevState;
                    else
                        d.prevState = o.longs === String ? $util.Long.prototype.toString.call(m.prevState) : o.longs === Number ? new $util.LongBits(m.prevState.low >>> 0, m.prevState.high >>> 0).toNumber() : m.prevState;
                }
                if (m.nextComm != null && m.hasOwnProperty("nextComm")) {
                    d.nextComm = m.nextComm;
                }
                if (m.nextPid != null && m.hasOwnProperty("nextPid")) {
                    d.nextPid = m.nextPid;
                }
                if (m.nextPrio != null && m.hasOwnProperty("nextPrio")) {
                    d.nextPrio = m.nextPrio;
                }
                return d;
            };

            /**
             * Converts this SchedSwitchFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SchedSwitchFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SchedSwitchFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SchedSwitchFtraceEvent;
        })();

        protos.SchedWakeupFtraceEvent = (function() {

            /**
             * Properties of a SchedWakeupFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISchedWakeupFtraceEvent
             * @property {string|null} [comm] SchedWakeupFtraceEvent comm
             * @property {number|null} [pid] SchedWakeupFtraceEvent pid
             * @property {number|null} [prio] SchedWakeupFtraceEvent prio
             * @property {number|null} [success] SchedWakeupFtraceEvent success
             * @property {number|null} [targetCpu] SchedWakeupFtraceEvent targetCpu
             */

            /**
             * Constructs a new SchedWakeupFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SchedWakeupFtraceEvent.
             * @implements ISchedWakeupFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISchedWakeupFtraceEvent=} [p] Properties to set
             */
            function SchedWakeupFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SchedWakeupFtraceEvent comm.
             * @member {string} comm
             * @memberof perfetto.protos.SchedWakeupFtraceEvent
             * @instance
             */
            SchedWakeupFtraceEvent.prototype.comm = "";

            /**
             * SchedWakeupFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.SchedWakeupFtraceEvent
             * @instance
             */
            SchedWakeupFtraceEvent.prototype.pid = 0;

            /**
             * SchedWakeupFtraceEvent prio.
             * @member {number} prio
             * @memberof perfetto.protos.SchedWakeupFtraceEvent
             * @instance
             */
            SchedWakeupFtraceEvent.prototype.prio = 0;

            /**
             * SchedWakeupFtraceEvent success.
             * @member {number} success
             * @memberof perfetto.protos.SchedWakeupFtraceEvent
             * @instance
             */
            SchedWakeupFtraceEvent.prototype.success = 0;

            /**
             * SchedWakeupFtraceEvent targetCpu.
             * @member {number} targetCpu
             * @memberof perfetto.protos.SchedWakeupFtraceEvent
             * @instance
             */
            SchedWakeupFtraceEvent.prototype.targetCpu = 0;

            /**
             * Creates a new SchedWakeupFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SchedWakeupFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedWakeupFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SchedWakeupFtraceEvent} SchedWakeupFtraceEvent instance
             */
            SchedWakeupFtraceEvent.create = function create(properties) {
                return new SchedWakeupFtraceEvent(properties);
            };

            /**
             * Encodes the specified SchedWakeupFtraceEvent message. Does not implicitly {@link perfetto.protos.SchedWakeupFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SchedWakeupFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedWakeupFtraceEvent} m SchedWakeupFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedWakeupFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.comm != null && Object.hasOwnProperty.call(m, "comm"))
                    w.uint32(10).string(m.comm);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(16).int32(m.pid);
                if (m.prio != null && Object.hasOwnProperty.call(m, "prio"))
                    w.uint32(24).int32(m.prio);
                if (m.success != null && Object.hasOwnProperty.call(m, "success"))
                    w.uint32(32).int32(m.success);
                if (m.targetCpu != null && Object.hasOwnProperty.call(m, "targetCpu"))
                    w.uint32(40).int32(m.targetCpu);
                return w;
            };

            /**
             * Encodes the specified SchedWakeupFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SchedWakeupFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SchedWakeupFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedWakeupFtraceEvent} message SchedWakeupFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedWakeupFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SchedWakeupFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SchedWakeupFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SchedWakeupFtraceEvent} SchedWakeupFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedWakeupFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SchedWakeupFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.comm = r.string();
                        break;
                    case 2:
                        m.pid = r.int32();
                        break;
                    case 3:
                        m.prio = r.int32();
                        break;
                    case 4:
                        m.success = r.int32();
                        break;
                    case 5:
                        m.targetCpu = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SchedWakeupFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SchedWakeupFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SchedWakeupFtraceEvent} SchedWakeupFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedWakeupFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SchedWakeupFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SchedWakeupFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SchedWakeupFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    if (!$util.isString(m.comm))
                        return "comm: string expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.prio != null && m.hasOwnProperty("prio")) {
                    if (!$util.isInteger(m.prio))
                        return "prio: integer expected";
                }
                if (m.success != null && m.hasOwnProperty("success")) {
                    if (!$util.isInteger(m.success))
                        return "success: integer expected";
                }
                if (m.targetCpu != null && m.hasOwnProperty("targetCpu")) {
                    if (!$util.isInteger(m.targetCpu))
                        return "targetCpu: integer expected";
                }
                return null;
            };

            /**
             * Creates a SchedWakeupFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SchedWakeupFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SchedWakeupFtraceEvent} SchedWakeupFtraceEvent
             */
            SchedWakeupFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SchedWakeupFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SchedWakeupFtraceEvent();
                if (d.comm != null) {
                    m.comm = String(d.comm);
                }
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                if (d.prio != null) {
                    m.prio = d.prio | 0;
                }
                if (d.success != null) {
                    m.success = d.success | 0;
                }
                if (d.targetCpu != null) {
                    m.targetCpu = d.targetCpu | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SchedWakeupFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SchedWakeupFtraceEvent
             * @static
             * @param {perfetto.protos.SchedWakeupFtraceEvent} m SchedWakeupFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SchedWakeupFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.comm = "";
                    d.pid = 0;
                    d.prio = 0;
                    d.success = 0;
                    d.targetCpu = 0;
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    d.comm = m.comm;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.prio != null && m.hasOwnProperty("prio")) {
                    d.prio = m.prio;
                }
                if (m.success != null && m.hasOwnProperty("success")) {
                    d.success = m.success;
                }
                if (m.targetCpu != null && m.hasOwnProperty("targetCpu")) {
                    d.targetCpu = m.targetCpu;
                }
                return d;
            };

            /**
             * Converts this SchedWakeupFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SchedWakeupFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SchedWakeupFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SchedWakeupFtraceEvent;
        })();

        protos.SchedBlockedReasonFtraceEvent = (function() {

            /**
             * Properties of a SchedBlockedReasonFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISchedBlockedReasonFtraceEvent
             * @property {number|null} [pid] SchedBlockedReasonFtraceEvent pid
             * @property {number|null} [caller] SchedBlockedReasonFtraceEvent caller
             * @property {number|null} [ioWait] SchedBlockedReasonFtraceEvent ioWait
             */

            /**
             * Constructs a new SchedBlockedReasonFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SchedBlockedReasonFtraceEvent.
             * @implements ISchedBlockedReasonFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISchedBlockedReasonFtraceEvent=} [p] Properties to set
             */
            function SchedBlockedReasonFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SchedBlockedReasonFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.SchedBlockedReasonFtraceEvent
             * @instance
             */
            SchedBlockedReasonFtraceEvent.prototype.pid = 0;

            /**
             * SchedBlockedReasonFtraceEvent caller.
             * @member {number} caller
             * @memberof perfetto.protos.SchedBlockedReasonFtraceEvent
             * @instance
             */
            SchedBlockedReasonFtraceEvent.prototype.caller = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SchedBlockedReasonFtraceEvent ioWait.
             * @member {number} ioWait
             * @memberof perfetto.protos.SchedBlockedReasonFtraceEvent
             * @instance
             */
            SchedBlockedReasonFtraceEvent.prototype.ioWait = 0;

            /**
             * Creates a new SchedBlockedReasonFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SchedBlockedReasonFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedBlockedReasonFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SchedBlockedReasonFtraceEvent} SchedBlockedReasonFtraceEvent instance
             */
            SchedBlockedReasonFtraceEvent.create = function create(properties) {
                return new SchedBlockedReasonFtraceEvent(properties);
            };

            /**
             * Encodes the specified SchedBlockedReasonFtraceEvent message. Does not implicitly {@link perfetto.protos.SchedBlockedReasonFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SchedBlockedReasonFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedBlockedReasonFtraceEvent} m SchedBlockedReasonFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedBlockedReasonFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(8).int32(m.pid);
                if (m.caller != null && Object.hasOwnProperty.call(m, "caller"))
                    w.uint32(16).uint64(m.caller);
                if (m.ioWait != null && Object.hasOwnProperty.call(m, "ioWait"))
                    w.uint32(24).uint32(m.ioWait);
                return w;
            };

            /**
             * Encodes the specified SchedBlockedReasonFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SchedBlockedReasonFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SchedBlockedReasonFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedBlockedReasonFtraceEvent} message SchedBlockedReasonFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedBlockedReasonFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SchedBlockedReasonFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SchedBlockedReasonFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SchedBlockedReasonFtraceEvent} SchedBlockedReasonFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedBlockedReasonFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SchedBlockedReasonFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.pid = r.int32();
                        break;
                    case 2:
                        m.caller = r.uint64();
                        break;
                    case 3:
                        m.ioWait = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SchedBlockedReasonFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SchedBlockedReasonFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SchedBlockedReasonFtraceEvent} SchedBlockedReasonFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedBlockedReasonFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SchedBlockedReasonFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SchedBlockedReasonFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SchedBlockedReasonFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.caller != null && m.hasOwnProperty("caller")) {
                    if (!$util.isInteger(m.caller) && !(m.caller && $util.isInteger(m.caller.low) && $util.isInteger(m.caller.high)))
                        return "caller: integer|Long expected";
                }
                if (m.ioWait != null && m.hasOwnProperty("ioWait")) {
                    if (!$util.isInteger(m.ioWait))
                        return "ioWait: integer expected";
                }
                return null;
            };

            /**
             * Creates a SchedBlockedReasonFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SchedBlockedReasonFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SchedBlockedReasonFtraceEvent} SchedBlockedReasonFtraceEvent
             */
            SchedBlockedReasonFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SchedBlockedReasonFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SchedBlockedReasonFtraceEvent();
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                if (d.caller != null) {
                    if ($util.Long)
                        (m.caller = $util.Long.fromValue(d.caller)).unsigned = true;
                    else if (typeof d.caller === "string")
                        m.caller = parseInt(d.caller, 10);
                    else if (typeof d.caller === "number")
                        m.caller = d.caller;
                    else if (typeof d.caller === "object")
                        m.caller = new $util.LongBits(d.caller.low >>> 0, d.caller.high >>> 0).toNumber(true);
                }
                if (d.ioWait != null) {
                    m.ioWait = d.ioWait >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SchedBlockedReasonFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SchedBlockedReasonFtraceEvent
             * @static
             * @param {perfetto.protos.SchedBlockedReasonFtraceEvent} m SchedBlockedReasonFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SchedBlockedReasonFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.pid = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.caller = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.caller = o.longs === String ? "0" : 0;
                    d.ioWait = 0;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.caller != null && m.hasOwnProperty("caller")) {
                    if (typeof m.caller === "number")
                        d.caller = o.longs === String ? String(m.caller) : m.caller;
                    else
                        d.caller = o.longs === String ? $util.Long.prototype.toString.call(m.caller) : o.longs === Number ? new $util.LongBits(m.caller.low >>> 0, m.caller.high >>> 0).toNumber(true) : m.caller;
                }
                if (m.ioWait != null && m.hasOwnProperty("ioWait")) {
                    d.ioWait = m.ioWait;
                }
                return d;
            };

            /**
             * Converts this SchedBlockedReasonFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SchedBlockedReasonFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SchedBlockedReasonFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SchedBlockedReasonFtraceEvent;
        })();

        protos.SchedCpuHotplugFtraceEvent = (function() {

            /**
             * Properties of a SchedCpuHotplugFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISchedCpuHotplugFtraceEvent
             * @property {number|null} [affectedCpu] SchedCpuHotplugFtraceEvent affectedCpu
             * @property {number|null} [error] SchedCpuHotplugFtraceEvent error
             * @property {number|null} [status] SchedCpuHotplugFtraceEvent status
             */

            /**
             * Constructs a new SchedCpuHotplugFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SchedCpuHotplugFtraceEvent.
             * @implements ISchedCpuHotplugFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISchedCpuHotplugFtraceEvent=} [p] Properties to set
             */
            function SchedCpuHotplugFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SchedCpuHotplugFtraceEvent affectedCpu.
             * @member {number} affectedCpu
             * @memberof perfetto.protos.SchedCpuHotplugFtraceEvent
             * @instance
             */
            SchedCpuHotplugFtraceEvent.prototype.affectedCpu = 0;

            /**
             * SchedCpuHotplugFtraceEvent error.
             * @member {number} error
             * @memberof perfetto.protos.SchedCpuHotplugFtraceEvent
             * @instance
             */
            SchedCpuHotplugFtraceEvent.prototype.error = 0;

            /**
             * SchedCpuHotplugFtraceEvent status.
             * @member {number} status
             * @memberof perfetto.protos.SchedCpuHotplugFtraceEvent
             * @instance
             */
            SchedCpuHotplugFtraceEvent.prototype.status = 0;

            /**
             * Creates a new SchedCpuHotplugFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SchedCpuHotplugFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedCpuHotplugFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SchedCpuHotplugFtraceEvent} SchedCpuHotplugFtraceEvent instance
             */
            SchedCpuHotplugFtraceEvent.create = function create(properties) {
                return new SchedCpuHotplugFtraceEvent(properties);
            };

            /**
             * Encodes the specified SchedCpuHotplugFtraceEvent message. Does not implicitly {@link perfetto.protos.SchedCpuHotplugFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SchedCpuHotplugFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedCpuHotplugFtraceEvent} m SchedCpuHotplugFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedCpuHotplugFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.affectedCpu != null && Object.hasOwnProperty.call(m, "affectedCpu"))
                    w.uint32(8).int32(m.affectedCpu);
                if (m.error != null && Object.hasOwnProperty.call(m, "error"))
                    w.uint32(16).int32(m.error);
                if (m.status != null && Object.hasOwnProperty.call(m, "status"))
                    w.uint32(24).int32(m.status);
                return w;
            };

            /**
             * Encodes the specified SchedCpuHotplugFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SchedCpuHotplugFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SchedCpuHotplugFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedCpuHotplugFtraceEvent} message SchedCpuHotplugFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedCpuHotplugFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SchedCpuHotplugFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SchedCpuHotplugFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SchedCpuHotplugFtraceEvent} SchedCpuHotplugFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedCpuHotplugFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SchedCpuHotplugFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.affectedCpu = r.int32();
                        break;
                    case 2:
                        m.error = r.int32();
                        break;
                    case 3:
                        m.status = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SchedCpuHotplugFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SchedCpuHotplugFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SchedCpuHotplugFtraceEvent} SchedCpuHotplugFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedCpuHotplugFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SchedCpuHotplugFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SchedCpuHotplugFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SchedCpuHotplugFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.affectedCpu != null && m.hasOwnProperty("affectedCpu")) {
                    if (!$util.isInteger(m.affectedCpu))
                        return "affectedCpu: integer expected";
                }
                if (m.error != null && m.hasOwnProperty("error")) {
                    if (!$util.isInteger(m.error))
                        return "error: integer expected";
                }
                if (m.status != null && m.hasOwnProperty("status")) {
                    if (!$util.isInteger(m.status))
                        return "status: integer expected";
                }
                return null;
            };

            /**
             * Creates a SchedCpuHotplugFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SchedCpuHotplugFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SchedCpuHotplugFtraceEvent} SchedCpuHotplugFtraceEvent
             */
            SchedCpuHotplugFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SchedCpuHotplugFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SchedCpuHotplugFtraceEvent();
                if (d.affectedCpu != null) {
                    m.affectedCpu = d.affectedCpu | 0;
                }
                if (d.error != null) {
                    m.error = d.error | 0;
                }
                if (d.status != null) {
                    m.status = d.status | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SchedCpuHotplugFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SchedCpuHotplugFtraceEvent
             * @static
             * @param {perfetto.protos.SchedCpuHotplugFtraceEvent} m SchedCpuHotplugFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SchedCpuHotplugFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.affectedCpu = 0;
                    d.error = 0;
                    d.status = 0;
                }
                if (m.affectedCpu != null && m.hasOwnProperty("affectedCpu")) {
                    d.affectedCpu = m.affectedCpu;
                }
                if (m.error != null && m.hasOwnProperty("error")) {
                    d.error = m.error;
                }
                if (m.status != null && m.hasOwnProperty("status")) {
                    d.status = m.status;
                }
                return d;
            };

            /**
             * Converts this SchedCpuHotplugFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SchedCpuHotplugFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SchedCpuHotplugFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SchedCpuHotplugFtraceEvent;
        })();

        protos.SchedWakingFtraceEvent = (function() {

            /**
             * Properties of a SchedWakingFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISchedWakingFtraceEvent
             * @property {string|null} [comm] SchedWakingFtraceEvent comm
             * @property {number|null} [pid] SchedWakingFtraceEvent pid
             * @property {number|null} [prio] SchedWakingFtraceEvent prio
             * @property {number|null} [success] SchedWakingFtraceEvent success
             * @property {number|null} [targetCpu] SchedWakingFtraceEvent targetCpu
             */

            /**
             * Constructs a new SchedWakingFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SchedWakingFtraceEvent.
             * @implements ISchedWakingFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISchedWakingFtraceEvent=} [p] Properties to set
             */
            function SchedWakingFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SchedWakingFtraceEvent comm.
             * @member {string} comm
             * @memberof perfetto.protos.SchedWakingFtraceEvent
             * @instance
             */
            SchedWakingFtraceEvent.prototype.comm = "";

            /**
             * SchedWakingFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.SchedWakingFtraceEvent
             * @instance
             */
            SchedWakingFtraceEvent.prototype.pid = 0;

            /**
             * SchedWakingFtraceEvent prio.
             * @member {number} prio
             * @memberof perfetto.protos.SchedWakingFtraceEvent
             * @instance
             */
            SchedWakingFtraceEvent.prototype.prio = 0;

            /**
             * SchedWakingFtraceEvent success.
             * @member {number} success
             * @memberof perfetto.protos.SchedWakingFtraceEvent
             * @instance
             */
            SchedWakingFtraceEvent.prototype.success = 0;

            /**
             * SchedWakingFtraceEvent targetCpu.
             * @member {number} targetCpu
             * @memberof perfetto.protos.SchedWakingFtraceEvent
             * @instance
             */
            SchedWakingFtraceEvent.prototype.targetCpu = 0;

            /**
             * Creates a new SchedWakingFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SchedWakingFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedWakingFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SchedWakingFtraceEvent} SchedWakingFtraceEvent instance
             */
            SchedWakingFtraceEvent.create = function create(properties) {
                return new SchedWakingFtraceEvent(properties);
            };

            /**
             * Encodes the specified SchedWakingFtraceEvent message. Does not implicitly {@link perfetto.protos.SchedWakingFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SchedWakingFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedWakingFtraceEvent} m SchedWakingFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedWakingFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.comm != null && Object.hasOwnProperty.call(m, "comm"))
                    w.uint32(10).string(m.comm);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(16).int32(m.pid);
                if (m.prio != null && Object.hasOwnProperty.call(m, "prio"))
                    w.uint32(24).int32(m.prio);
                if (m.success != null && Object.hasOwnProperty.call(m, "success"))
                    w.uint32(32).int32(m.success);
                if (m.targetCpu != null && Object.hasOwnProperty.call(m, "targetCpu"))
                    w.uint32(40).int32(m.targetCpu);
                return w;
            };

            /**
             * Encodes the specified SchedWakingFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SchedWakingFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SchedWakingFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedWakingFtraceEvent} message SchedWakingFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedWakingFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SchedWakingFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SchedWakingFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SchedWakingFtraceEvent} SchedWakingFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedWakingFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SchedWakingFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.comm = r.string();
                        break;
                    case 2:
                        m.pid = r.int32();
                        break;
                    case 3:
                        m.prio = r.int32();
                        break;
                    case 4:
                        m.success = r.int32();
                        break;
                    case 5:
                        m.targetCpu = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SchedWakingFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SchedWakingFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SchedWakingFtraceEvent} SchedWakingFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedWakingFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SchedWakingFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SchedWakingFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SchedWakingFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    if (!$util.isString(m.comm))
                        return "comm: string expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.prio != null && m.hasOwnProperty("prio")) {
                    if (!$util.isInteger(m.prio))
                        return "prio: integer expected";
                }
                if (m.success != null && m.hasOwnProperty("success")) {
                    if (!$util.isInteger(m.success))
                        return "success: integer expected";
                }
                if (m.targetCpu != null && m.hasOwnProperty("targetCpu")) {
                    if (!$util.isInteger(m.targetCpu))
                        return "targetCpu: integer expected";
                }
                return null;
            };

            /**
             * Creates a SchedWakingFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SchedWakingFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SchedWakingFtraceEvent} SchedWakingFtraceEvent
             */
            SchedWakingFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SchedWakingFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SchedWakingFtraceEvent();
                if (d.comm != null) {
                    m.comm = String(d.comm);
                }
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                if (d.prio != null) {
                    m.prio = d.prio | 0;
                }
                if (d.success != null) {
                    m.success = d.success | 0;
                }
                if (d.targetCpu != null) {
                    m.targetCpu = d.targetCpu | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SchedWakingFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SchedWakingFtraceEvent
             * @static
             * @param {perfetto.protos.SchedWakingFtraceEvent} m SchedWakingFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SchedWakingFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.comm = "";
                    d.pid = 0;
                    d.prio = 0;
                    d.success = 0;
                    d.targetCpu = 0;
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    d.comm = m.comm;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.prio != null && m.hasOwnProperty("prio")) {
                    d.prio = m.prio;
                }
                if (m.success != null && m.hasOwnProperty("success")) {
                    d.success = m.success;
                }
                if (m.targetCpu != null && m.hasOwnProperty("targetCpu")) {
                    d.targetCpu = m.targetCpu;
                }
                return d;
            };

            /**
             * Converts this SchedWakingFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SchedWakingFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SchedWakingFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SchedWakingFtraceEvent;
        })();

        protos.SchedWakeupNewFtraceEvent = (function() {

            /**
             * Properties of a SchedWakeupNewFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISchedWakeupNewFtraceEvent
             * @property {string|null} [comm] SchedWakeupNewFtraceEvent comm
             * @property {number|null} [pid] SchedWakeupNewFtraceEvent pid
             * @property {number|null} [prio] SchedWakeupNewFtraceEvent prio
             * @property {number|null} [success] SchedWakeupNewFtraceEvent success
             * @property {number|null} [targetCpu] SchedWakeupNewFtraceEvent targetCpu
             */

            /**
             * Constructs a new SchedWakeupNewFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SchedWakeupNewFtraceEvent.
             * @implements ISchedWakeupNewFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISchedWakeupNewFtraceEvent=} [p] Properties to set
             */
            function SchedWakeupNewFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SchedWakeupNewFtraceEvent comm.
             * @member {string} comm
             * @memberof perfetto.protos.SchedWakeupNewFtraceEvent
             * @instance
             */
            SchedWakeupNewFtraceEvent.prototype.comm = "";

            /**
             * SchedWakeupNewFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.SchedWakeupNewFtraceEvent
             * @instance
             */
            SchedWakeupNewFtraceEvent.prototype.pid = 0;

            /**
             * SchedWakeupNewFtraceEvent prio.
             * @member {number} prio
             * @memberof perfetto.protos.SchedWakeupNewFtraceEvent
             * @instance
             */
            SchedWakeupNewFtraceEvent.prototype.prio = 0;

            /**
             * SchedWakeupNewFtraceEvent success.
             * @member {number} success
             * @memberof perfetto.protos.SchedWakeupNewFtraceEvent
             * @instance
             */
            SchedWakeupNewFtraceEvent.prototype.success = 0;

            /**
             * SchedWakeupNewFtraceEvent targetCpu.
             * @member {number} targetCpu
             * @memberof perfetto.protos.SchedWakeupNewFtraceEvent
             * @instance
             */
            SchedWakeupNewFtraceEvent.prototype.targetCpu = 0;

            /**
             * Creates a new SchedWakeupNewFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SchedWakeupNewFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedWakeupNewFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SchedWakeupNewFtraceEvent} SchedWakeupNewFtraceEvent instance
             */
            SchedWakeupNewFtraceEvent.create = function create(properties) {
                return new SchedWakeupNewFtraceEvent(properties);
            };

            /**
             * Encodes the specified SchedWakeupNewFtraceEvent message. Does not implicitly {@link perfetto.protos.SchedWakeupNewFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SchedWakeupNewFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedWakeupNewFtraceEvent} m SchedWakeupNewFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedWakeupNewFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.comm != null && Object.hasOwnProperty.call(m, "comm"))
                    w.uint32(10).string(m.comm);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(16).int32(m.pid);
                if (m.prio != null && Object.hasOwnProperty.call(m, "prio"))
                    w.uint32(24).int32(m.prio);
                if (m.success != null && Object.hasOwnProperty.call(m, "success"))
                    w.uint32(32).int32(m.success);
                if (m.targetCpu != null && Object.hasOwnProperty.call(m, "targetCpu"))
                    w.uint32(40).int32(m.targetCpu);
                return w;
            };

            /**
             * Encodes the specified SchedWakeupNewFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SchedWakeupNewFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SchedWakeupNewFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedWakeupNewFtraceEvent} message SchedWakeupNewFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedWakeupNewFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SchedWakeupNewFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SchedWakeupNewFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SchedWakeupNewFtraceEvent} SchedWakeupNewFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedWakeupNewFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SchedWakeupNewFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.comm = r.string();
                        break;
                    case 2:
                        m.pid = r.int32();
                        break;
                    case 3:
                        m.prio = r.int32();
                        break;
                    case 4:
                        m.success = r.int32();
                        break;
                    case 5:
                        m.targetCpu = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SchedWakeupNewFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SchedWakeupNewFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SchedWakeupNewFtraceEvent} SchedWakeupNewFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedWakeupNewFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SchedWakeupNewFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SchedWakeupNewFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SchedWakeupNewFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    if (!$util.isString(m.comm))
                        return "comm: string expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.prio != null && m.hasOwnProperty("prio")) {
                    if (!$util.isInteger(m.prio))
                        return "prio: integer expected";
                }
                if (m.success != null && m.hasOwnProperty("success")) {
                    if (!$util.isInteger(m.success))
                        return "success: integer expected";
                }
                if (m.targetCpu != null && m.hasOwnProperty("targetCpu")) {
                    if (!$util.isInteger(m.targetCpu))
                        return "targetCpu: integer expected";
                }
                return null;
            };

            /**
             * Creates a SchedWakeupNewFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SchedWakeupNewFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SchedWakeupNewFtraceEvent} SchedWakeupNewFtraceEvent
             */
            SchedWakeupNewFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SchedWakeupNewFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SchedWakeupNewFtraceEvent();
                if (d.comm != null) {
                    m.comm = String(d.comm);
                }
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                if (d.prio != null) {
                    m.prio = d.prio | 0;
                }
                if (d.success != null) {
                    m.success = d.success | 0;
                }
                if (d.targetCpu != null) {
                    m.targetCpu = d.targetCpu | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SchedWakeupNewFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SchedWakeupNewFtraceEvent
             * @static
             * @param {perfetto.protos.SchedWakeupNewFtraceEvent} m SchedWakeupNewFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SchedWakeupNewFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.comm = "";
                    d.pid = 0;
                    d.prio = 0;
                    d.success = 0;
                    d.targetCpu = 0;
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    d.comm = m.comm;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.prio != null && m.hasOwnProperty("prio")) {
                    d.prio = m.prio;
                }
                if (m.success != null && m.hasOwnProperty("success")) {
                    d.success = m.success;
                }
                if (m.targetCpu != null && m.hasOwnProperty("targetCpu")) {
                    d.targetCpu = m.targetCpu;
                }
                return d;
            };

            /**
             * Converts this SchedWakeupNewFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SchedWakeupNewFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SchedWakeupNewFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SchedWakeupNewFtraceEvent;
        })();

        protos.SchedProcessExecFtraceEvent = (function() {

            /**
             * Properties of a SchedProcessExecFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISchedProcessExecFtraceEvent
             * @property {string|null} [filename] SchedProcessExecFtraceEvent filename
             * @property {number|null} [pid] SchedProcessExecFtraceEvent pid
             * @property {number|null} [oldPid] SchedProcessExecFtraceEvent oldPid
             */

            /**
             * Constructs a new SchedProcessExecFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SchedProcessExecFtraceEvent.
             * @implements ISchedProcessExecFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISchedProcessExecFtraceEvent=} [p] Properties to set
             */
            function SchedProcessExecFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SchedProcessExecFtraceEvent filename.
             * @member {string} filename
             * @memberof perfetto.protos.SchedProcessExecFtraceEvent
             * @instance
             */
            SchedProcessExecFtraceEvent.prototype.filename = "";

            /**
             * SchedProcessExecFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.SchedProcessExecFtraceEvent
             * @instance
             */
            SchedProcessExecFtraceEvent.prototype.pid = 0;

            /**
             * SchedProcessExecFtraceEvent oldPid.
             * @member {number} oldPid
             * @memberof perfetto.protos.SchedProcessExecFtraceEvent
             * @instance
             */
            SchedProcessExecFtraceEvent.prototype.oldPid = 0;

            /**
             * Creates a new SchedProcessExecFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SchedProcessExecFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedProcessExecFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SchedProcessExecFtraceEvent} SchedProcessExecFtraceEvent instance
             */
            SchedProcessExecFtraceEvent.create = function create(properties) {
                return new SchedProcessExecFtraceEvent(properties);
            };

            /**
             * Encodes the specified SchedProcessExecFtraceEvent message. Does not implicitly {@link perfetto.protos.SchedProcessExecFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SchedProcessExecFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedProcessExecFtraceEvent} m SchedProcessExecFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedProcessExecFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.filename != null && Object.hasOwnProperty.call(m, "filename"))
                    w.uint32(10).string(m.filename);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(16).int32(m.pid);
                if (m.oldPid != null && Object.hasOwnProperty.call(m, "oldPid"))
                    w.uint32(24).int32(m.oldPid);
                return w;
            };

            /**
             * Encodes the specified SchedProcessExecFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SchedProcessExecFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SchedProcessExecFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedProcessExecFtraceEvent} message SchedProcessExecFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedProcessExecFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SchedProcessExecFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SchedProcessExecFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SchedProcessExecFtraceEvent} SchedProcessExecFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedProcessExecFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SchedProcessExecFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.filename = r.string();
                        break;
                    case 2:
                        m.pid = r.int32();
                        break;
                    case 3:
                        m.oldPid = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SchedProcessExecFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SchedProcessExecFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SchedProcessExecFtraceEvent} SchedProcessExecFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedProcessExecFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SchedProcessExecFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SchedProcessExecFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SchedProcessExecFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.filename != null && m.hasOwnProperty("filename")) {
                    if (!$util.isString(m.filename))
                        return "filename: string expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.oldPid != null && m.hasOwnProperty("oldPid")) {
                    if (!$util.isInteger(m.oldPid))
                        return "oldPid: integer expected";
                }
                return null;
            };

            /**
             * Creates a SchedProcessExecFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SchedProcessExecFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SchedProcessExecFtraceEvent} SchedProcessExecFtraceEvent
             */
            SchedProcessExecFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SchedProcessExecFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SchedProcessExecFtraceEvent();
                if (d.filename != null) {
                    m.filename = String(d.filename);
                }
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                if (d.oldPid != null) {
                    m.oldPid = d.oldPid | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SchedProcessExecFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SchedProcessExecFtraceEvent
             * @static
             * @param {perfetto.protos.SchedProcessExecFtraceEvent} m SchedProcessExecFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SchedProcessExecFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.filename = "";
                    d.pid = 0;
                    d.oldPid = 0;
                }
                if (m.filename != null && m.hasOwnProperty("filename")) {
                    d.filename = m.filename;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.oldPid != null && m.hasOwnProperty("oldPid")) {
                    d.oldPid = m.oldPid;
                }
                return d;
            };

            /**
             * Converts this SchedProcessExecFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SchedProcessExecFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SchedProcessExecFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SchedProcessExecFtraceEvent;
        })();

        protos.SchedProcessExitFtraceEvent = (function() {

            /**
             * Properties of a SchedProcessExitFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISchedProcessExitFtraceEvent
             * @property {string|null} [comm] SchedProcessExitFtraceEvent comm
             * @property {number|null} [pid] SchedProcessExitFtraceEvent pid
             * @property {number|null} [tgid] SchedProcessExitFtraceEvent tgid
             * @property {number|null} [prio] SchedProcessExitFtraceEvent prio
             */

            /**
             * Constructs a new SchedProcessExitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SchedProcessExitFtraceEvent.
             * @implements ISchedProcessExitFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISchedProcessExitFtraceEvent=} [p] Properties to set
             */
            function SchedProcessExitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SchedProcessExitFtraceEvent comm.
             * @member {string} comm
             * @memberof perfetto.protos.SchedProcessExitFtraceEvent
             * @instance
             */
            SchedProcessExitFtraceEvent.prototype.comm = "";

            /**
             * SchedProcessExitFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.SchedProcessExitFtraceEvent
             * @instance
             */
            SchedProcessExitFtraceEvent.prototype.pid = 0;

            /**
             * SchedProcessExitFtraceEvent tgid.
             * @member {number} tgid
             * @memberof perfetto.protos.SchedProcessExitFtraceEvent
             * @instance
             */
            SchedProcessExitFtraceEvent.prototype.tgid = 0;

            /**
             * SchedProcessExitFtraceEvent prio.
             * @member {number} prio
             * @memberof perfetto.protos.SchedProcessExitFtraceEvent
             * @instance
             */
            SchedProcessExitFtraceEvent.prototype.prio = 0;

            /**
             * Creates a new SchedProcessExitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SchedProcessExitFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedProcessExitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SchedProcessExitFtraceEvent} SchedProcessExitFtraceEvent instance
             */
            SchedProcessExitFtraceEvent.create = function create(properties) {
                return new SchedProcessExitFtraceEvent(properties);
            };

            /**
             * Encodes the specified SchedProcessExitFtraceEvent message. Does not implicitly {@link perfetto.protos.SchedProcessExitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SchedProcessExitFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedProcessExitFtraceEvent} m SchedProcessExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedProcessExitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.comm != null && Object.hasOwnProperty.call(m, "comm"))
                    w.uint32(10).string(m.comm);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(16).int32(m.pid);
                if (m.tgid != null && Object.hasOwnProperty.call(m, "tgid"))
                    w.uint32(24).int32(m.tgid);
                if (m.prio != null && Object.hasOwnProperty.call(m, "prio"))
                    w.uint32(32).int32(m.prio);
                return w;
            };

            /**
             * Encodes the specified SchedProcessExitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SchedProcessExitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SchedProcessExitFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedProcessExitFtraceEvent} message SchedProcessExitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedProcessExitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SchedProcessExitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SchedProcessExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SchedProcessExitFtraceEvent} SchedProcessExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedProcessExitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SchedProcessExitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.comm = r.string();
                        break;
                    case 2:
                        m.pid = r.int32();
                        break;
                    case 3:
                        m.tgid = r.int32();
                        break;
                    case 4:
                        m.prio = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SchedProcessExitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SchedProcessExitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SchedProcessExitFtraceEvent} SchedProcessExitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedProcessExitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SchedProcessExitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SchedProcessExitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SchedProcessExitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    if (!$util.isString(m.comm))
                        return "comm: string expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.tgid != null && m.hasOwnProperty("tgid")) {
                    if (!$util.isInteger(m.tgid))
                        return "tgid: integer expected";
                }
                if (m.prio != null && m.hasOwnProperty("prio")) {
                    if (!$util.isInteger(m.prio))
                        return "prio: integer expected";
                }
                return null;
            };

            /**
             * Creates a SchedProcessExitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SchedProcessExitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SchedProcessExitFtraceEvent} SchedProcessExitFtraceEvent
             */
            SchedProcessExitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SchedProcessExitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SchedProcessExitFtraceEvent();
                if (d.comm != null) {
                    m.comm = String(d.comm);
                }
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                if (d.tgid != null) {
                    m.tgid = d.tgid | 0;
                }
                if (d.prio != null) {
                    m.prio = d.prio | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SchedProcessExitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SchedProcessExitFtraceEvent
             * @static
             * @param {perfetto.protos.SchedProcessExitFtraceEvent} m SchedProcessExitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SchedProcessExitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.comm = "";
                    d.pid = 0;
                    d.tgid = 0;
                    d.prio = 0;
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    d.comm = m.comm;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.tgid != null && m.hasOwnProperty("tgid")) {
                    d.tgid = m.tgid;
                }
                if (m.prio != null && m.hasOwnProperty("prio")) {
                    d.prio = m.prio;
                }
                return d;
            };

            /**
             * Converts this SchedProcessExitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SchedProcessExitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SchedProcessExitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SchedProcessExitFtraceEvent;
        })();

        protos.SchedProcessForkFtraceEvent = (function() {

            /**
             * Properties of a SchedProcessForkFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISchedProcessForkFtraceEvent
             * @property {string|null} [parentComm] SchedProcessForkFtraceEvent parentComm
             * @property {number|null} [parentPid] SchedProcessForkFtraceEvent parentPid
             * @property {string|null} [childComm] SchedProcessForkFtraceEvent childComm
             * @property {number|null} [childPid] SchedProcessForkFtraceEvent childPid
             */

            /**
             * Constructs a new SchedProcessForkFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SchedProcessForkFtraceEvent.
             * @implements ISchedProcessForkFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISchedProcessForkFtraceEvent=} [p] Properties to set
             */
            function SchedProcessForkFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SchedProcessForkFtraceEvent parentComm.
             * @member {string} parentComm
             * @memberof perfetto.protos.SchedProcessForkFtraceEvent
             * @instance
             */
            SchedProcessForkFtraceEvent.prototype.parentComm = "";

            /**
             * SchedProcessForkFtraceEvent parentPid.
             * @member {number} parentPid
             * @memberof perfetto.protos.SchedProcessForkFtraceEvent
             * @instance
             */
            SchedProcessForkFtraceEvent.prototype.parentPid = 0;

            /**
             * SchedProcessForkFtraceEvent childComm.
             * @member {string} childComm
             * @memberof perfetto.protos.SchedProcessForkFtraceEvent
             * @instance
             */
            SchedProcessForkFtraceEvent.prototype.childComm = "";

            /**
             * SchedProcessForkFtraceEvent childPid.
             * @member {number} childPid
             * @memberof perfetto.protos.SchedProcessForkFtraceEvent
             * @instance
             */
            SchedProcessForkFtraceEvent.prototype.childPid = 0;

            /**
             * Creates a new SchedProcessForkFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SchedProcessForkFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedProcessForkFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SchedProcessForkFtraceEvent} SchedProcessForkFtraceEvent instance
             */
            SchedProcessForkFtraceEvent.create = function create(properties) {
                return new SchedProcessForkFtraceEvent(properties);
            };

            /**
             * Encodes the specified SchedProcessForkFtraceEvent message. Does not implicitly {@link perfetto.protos.SchedProcessForkFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SchedProcessForkFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedProcessForkFtraceEvent} m SchedProcessForkFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedProcessForkFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.parentComm != null && Object.hasOwnProperty.call(m, "parentComm"))
                    w.uint32(10).string(m.parentComm);
                if (m.parentPid != null && Object.hasOwnProperty.call(m, "parentPid"))
                    w.uint32(16).int32(m.parentPid);
                if (m.childComm != null && Object.hasOwnProperty.call(m, "childComm"))
                    w.uint32(26).string(m.childComm);
                if (m.childPid != null && Object.hasOwnProperty.call(m, "childPid"))
                    w.uint32(32).int32(m.childPid);
                return w;
            };

            /**
             * Encodes the specified SchedProcessForkFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SchedProcessForkFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SchedProcessForkFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedProcessForkFtraceEvent} message SchedProcessForkFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedProcessForkFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SchedProcessForkFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SchedProcessForkFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SchedProcessForkFtraceEvent} SchedProcessForkFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedProcessForkFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SchedProcessForkFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.parentComm = r.string();
                        break;
                    case 2:
                        m.parentPid = r.int32();
                        break;
                    case 3:
                        m.childComm = r.string();
                        break;
                    case 4:
                        m.childPid = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SchedProcessForkFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SchedProcessForkFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SchedProcessForkFtraceEvent} SchedProcessForkFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedProcessForkFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SchedProcessForkFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SchedProcessForkFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SchedProcessForkFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.parentComm != null && m.hasOwnProperty("parentComm")) {
                    if (!$util.isString(m.parentComm))
                        return "parentComm: string expected";
                }
                if (m.parentPid != null && m.hasOwnProperty("parentPid")) {
                    if (!$util.isInteger(m.parentPid))
                        return "parentPid: integer expected";
                }
                if (m.childComm != null && m.hasOwnProperty("childComm")) {
                    if (!$util.isString(m.childComm))
                        return "childComm: string expected";
                }
                if (m.childPid != null && m.hasOwnProperty("childPid")) {
                    if (!$util.isInteger(m.childPid))
                        return "childPid: integer expected";
                }
                return null;
            };

            /**
             * Creates a SchedProcessForkFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SchedProcessForkFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SchedProcessForkFtraceEvent} SchedProcessForkFtraceEvent
             */
            SchedProcessForkFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SchedProcessForkFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SchedProcessForkFtraceEvent();
                if (d.parentComm != null) {
                    m.parentComm = String(d.parentComm);
                }
                if (d.parentPid != null) {
                    m.parentPid = d.parentPid | 0;
                }
                if (d.childComm != null) {
                    m.childComm = String(d.childComm);
                }
                if (d.childPid != null) {
                    m.childPid = d.childPid | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SchedProcessForkFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SchedProcessForkFtraceEvent
             * @static
             * @param {perfetto.protos.SchedProcessForkFtraceEvent} m SchedProcessForkFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SchedProcessForkFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.parentComm = "";
                    d.parentPid = 0;
                    d.childComm = "";
                    d.childPid = 0;
                }
                if (m.parentComm != null && m.hasOwnProperty("parentComm")) {
                    d.parentComm = m.parentComm;
                }
                if (m.parentPid != null && m.hasOwnProperty("parentPid")) {
                    d.parentPid = m.parentPid;
                }
                if (m.childComm != null && m.hasOwnProperty("childComm")) {
                    d.childComm = m.childComm;
                }
                if (m.childPid != null && m.hasOwnProperty("childPid")) {
                    d.childPid = m.childPid;
                }
                return d;
            };

            /**
             * Converts this SchedProcessForkFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SchedProcessForkFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SchedProcessForkFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SchedProcessForkFtraceEvent;
        })();

        protos.SchedProcessFreeFtraceEvent = (function() {

            /**
             * Properties of a SchedProcessFreeFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISchedProcessFreeFtraceEvent
             * @property {string|null} [comm] SchedProcessFreeFtraceEvent comm
             * @property {number|null} [pid] SchedProcessFreeFtraceEvent pid
             * @property {number|null} [prio] SchedProcessFreeFtraceEvent prio
             */

            /**
             * Constructs a new SchedProcessFreeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SchedProcessFreeFtraceEvent.
             * @implements ISchedProcessFreeFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISchedProcessFreeFtraceEvent=} [p] Properties to set
             */
            function SchedProcessFreeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SchedProcessFreeFtraceEvent comm.
             * @member {string} comm
             * @memberof perfetto.protos.SchedProcessFreeFtraceEvent
             * @instance
             */
            SchedProcessFreeFtraceEvent.prototype.comm = "";

            /**
             * SchedProcessFreeFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.SchedProcessFreeFtraceEvent
             * @instance
             */
            SchedProcessFreeFtraceEvent.prototype.pid = 0;

            /**
             * SchedProcessFreeFtraceEvent prio.
             * @member {number} prio
             * @memberof perfetto.protos.SchedProcessFreeFtraceEvent
             * @instance
             */
            SchedProcessFreeFtraceEvent.prototype.prio = 0;

            /**
             * Creates a new SchedProcessFreeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SchedProcessFreeFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedProcessFreeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SchedProcessFreeFtraceEvent} SchedProcessFreeFtraceEvent instance
             */
            SchedProcessFreeFtraceEvent.create = function create(properties) {
                return new SchedProcessFreeFtraceEvent(properties);
            };

            /**
             * Encodes the specified SchedProcessFreeFtraceEvent message. Does not implicitly {@link perfetto.protos.SchedProcessFreeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SchedProcessFreeFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedProcessFreeFtraceEvent} m SchedProcessFreeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedProcessFreeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.comm != null && Object.hasOwnProperty.call(m, "comm"))
                    w.uint32(10).string(m.comm);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(16).int32(m.pid);
                if (m.prio != null && Object.hasOwnProperty.call(m, "prio"))
                    w.uint32(24).int32(m.prio);
                return w;
            };

            /**
             * Encodes the specified SchedProcessFreeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SchedProcessFreeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SchedProcessFreeFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedProcessFreeFtraceEvent} message SchedProcessFreeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedProcessFreeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SchedProcessFreeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SchedProcessFreeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SchedProcessFreeFtraceEvent} SchedProcessFreeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedProcessFreeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SchedProcessFreeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.comm = r.string();
                        break;
                    case 2:
                        m.pid = r.int32();
                        break;
                    case 3:
                        m.prio = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SchedProcessFreeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SchedProcessFreeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SchedProcessFreeFtraceEvent} SchedProcessFreeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedProcessFreeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SchedProcessFreeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SchedProcessFreeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SchedProcessFreeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    if (!$util.isString(m.comm))
                        return "comm: string expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.prio != null && m.hasOwnProperty("prio")) {
                    if (!$util.isInteger(m.prio))
                        return "prio: integer expected";
                }
                return null;
            };

            /**
             * Creates a SchedProcessFreeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SchedProcessFreeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SchedProcessFreeFtraceEvent} SchedProcessFreeFtraceEvent
             */
            SchedProcessFreeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SchedProcessFreeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SchedProcessFreeFtraceEvent();
                if (d.comm != null) {
                    m.comm = String(d.comm);
                }
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                if (d.prio != null) {
                    m.prio = d.prio | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SchedProcessFreeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SchedProcessFreeFtraceEvent
             * @static
             * @param {perfetto.protos.SchedProcessFreeFtraceEvent} m SchedProcessFreeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SchedProcessFreeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.comm = "";
                    d.pid = 0;
                    d.prio = 0;
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    d.comm = m.comm;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.prio != null && m.hasOwnProperty("prio")) {
                    d.prio = m.prio;
                }
                return d;
            };

            /**
             * Converts this SchedProcessFreeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SchedProcessFreeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SchedProcessFreeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SchedProcessFreeFtraceEvent;
        })();

        protos.SchedProcessHangFtraceEvent = (function() {

            /**
             * Properties of a SchedProcessHangFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISchedProcessHangFtraceEvent
             * @property {string|null} [comm] SchedProcessHangFtraceEvent comm
             * @property {number|null} [pid] SchedProcessHangFtraceEvent pid
             */

            /**
             * Constructs a new SchedProcessHangFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SchedProcessHangFtraceEvent.
             * @implements ISchedProcessHangFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISchedProcessHangFtraceEvent=} [p] Properties to set
             */
            function SchedProcessHangFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SchedProcessHangFtraceEvent comm.
             * @member {string} comm
             * @memberof perfetto.protos.SchedProcessHangFtraceEvent
             * @instance
             */
            SchedProcessHangFtraceEvent.prototype.comm = "";

            /**
             * SchedProcessHangFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.SchedProcessHangFtraceEvent
             * @instance
             */
            SchedProcessHangFtraceEvent.prototype.pid = 0;

            /**
             * Creates a new SchedProcessHangFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SchedProcessHangFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedProcessHangFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SchedProcessHangFtraceEvent} SchedProcessHangFtraceEvent instance
             */
            SchedProcessHangFtraceEvent.create = function create(properties) {
                return new SchedProcessHangFtraceEvent(properties);
            };

            /**
             * Encodes the specified SchedProcessHangFtraceEvent message. Does not implicitly {@link perfetto.protos.SchedProcessHangFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SchedProcessHangFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedProcessHangFtraceEvent} m SchedProcessHangFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedProcessHangFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.comm != null && Object.hasOwnProperty.call(m, "comm"))
                    w.uint32(10).string(m.comm);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(16).int32(m.pid);
                return w;
            };

            /**
             * Encodes the specified SchedProcessHangFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SchedProcessHangFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SchedProcessHangFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedProcessHangFtraceEvent} message SchedProcessHangFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedProcessHangFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SchedProcessHangFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SchedProcessHangFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SchedProcessHangFtraceEvent} SchedProcessHangFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedProcessHangFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SchedProcessHangFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.comm = r.string();
                        break;
                    case 2:
                        m.pid = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SchedProcessHangFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SchedProcessHangFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SchedProcessHangFtraceEvent} SchedProcessHangFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedProcessHangFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SchedProcessHangFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SchedProcessHangFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SchedProcessHangFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    if (!$util.isString(m.comm))
                        return "comm: string expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                return null;
            };

            /**
             * Creates a SchedProcessHangFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SchedProcessHangFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SchedProcessHangFtraceEvent} SchedProcessHangFtraceEvent
             */
            SchedProcessHangFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SchedProcessHangFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SchedProcessHangFtraceEvent();
                if (d.comm != null) {
                    m.comm = String(d.comm);
                }
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SchedProcessHangFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SchedProcessHangFtraceEvent
             * @static
             * @param {perfetto.protos.SchedProcessHangFtraceEvent} m SchedProcessHangFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SchedProcessHangFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.comm = "";
                    d.pid = 0;
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    d.comm = m.comm;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                return d;
            };

            /**
             * Converts this SchedProcessHangFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SchedProcessHangFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SchedProcessHangFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SchedProcessHangFtraceEvent;
        })();

        protos.SchedProcessWaitFtraceEvent = (function() {

            /**
             * Properties of a SchedProcessWaitFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISchedProcessWaitFtraceEvent
             * @property {string|null} [comm] SchedProcessWaitFtraceEvent comm
             * @property {number|null} [pid] SchedProcessWaitFtraceEvent pid
             * @property {number|null} [prio] SchedProcessWaitFtraceEvent prio
             */

            /**
             * Constructs a new SchedProcessWaitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SchedProcessWaitFtraceEvent.
             * @implements ISchedProcessWaitFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISchedProcessWaitFtraceEvent=} [p] Properties to set
             */
            function SchedProcessWaitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SchedProcessWaitFtraceEvent comm.
             * @member {string} comm
             * @memberof perfetto.protos.SchedProcessWaitFtraceEvent
             * @instance
             */
            SchedProcessWaitFtraceEvent.prototype.comm = "";

            /**
             * SchedProcessWaitFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.SchedProcessWaitFtraceEvent
             * @instance
             */
            SchedProcessWaitFtraceEvent.prototype.pid = 0;

            /**
             * SchedProcessWaitFtraceEvent prio.
             * @member {number} prio
             * @memberof perfetto.protos.SchedProcessWaitFtraceEvent
             * @instance
             */
            SchedProcessWaitFtraceEvent.prototype.prio = 0;

            /**
             * Creates a new SchedProcessWaitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SchedProcessWaitFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedProcessWaitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SchedProcessWaitFtraceEvent} SchedProcessWaitFtraceEvent instance
             */
            SchedProcessWaitFtraceEvent.create = function create(properties) {
                return new SchedProcessWaitFtraceEvent(properties);
            };

            /**
             * Encodes the specified SchedProcessWaitFtraceEvent message. Does not implicitly {@link perfetto.protos.SchedProcessWaitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SchedProcessWaitFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedProcessWaitFtraceEvent} m SchedProcessWaitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedProcessWaitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.comm != null && Object.hasOwnProperty.call(m, "comm"))
                    w.uint32(10).string(m.comm);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(16).int32(m.pid);
                if (m.prio != null && Object.hasOwnProperty.call(m, "prio"))
                    w.uint32(24).int32(m.prio);
                return w;
            };

            /**
             * Encodes the specified SchedProcessWaitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SchedProcessWaitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SchedProcessWaitFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedProcessWaitFtraceEvent} message SchedProcessWaitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedProcessWaitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SchedProcessWaitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SchedProcessWaitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SchedProcessWaitFtraceEvent} SchedProcessWaitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedProcessWaitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SchedProcessWaitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.comm = r.string();
                        break;
                    case 2:
                        m.pid = r.int32();
                        break;
                    case 3:
                        m.prio = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SchedProcessWaitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SchedProcessWaitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SchedProcessWaitFtraceEvent} SchedProcessWaitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedProcessWaitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SchedProcessWaitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SchedProcessWaitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SchedProcessWaitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    if (!$util.isString(m.comm))
                        return "comm: string expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.prio != null && m.hasOwnProperty("prio")) {
                    if (!$util.isInteger(m.prio))
                        return "prio: integer expected";
                }
                return null;
            };

            /**
             * Creates a SchedProcessWaitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SchedProcessWaitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SchedProcessWaitFtraceEvent} SchedProcessWaitFtraceEvent
             */
            SchedProcessWaitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SchedProcessWaitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SchedProcessWaitFtraceEvent();
                if (d.comm != null) {
                    m.comm = String(d.comm);
                }
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                if (d.prio != null) {
                    m.prio = d.prio | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SchedProcessWaitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SchedProcessWaitFtraceEvent
             * @static
             * @param {perfetto.protos.SchedProcessWaitFtraceEvent} m SchedProcessWaitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SchedProcessWaitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.comm = "";
                    d.pid = 0;
                    d.prio = 0;
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    d.comm = m.comm;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.prio != null && m.hasOwnProperty("prio")) {
                    d.prio = m.prio;
                }
                return d;
            };

            /**
             * Converts this SchedProcessWaitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SchedProcessWaitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SchedProcessWaitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SchedProcessWaitFtraceEvent;
        })();

        protos.SchedPiSetprioFtraceEvent = (function() {

            /**
             * Properties of a SchedPiSetprioFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISchedPiSetprioFtraceEvent
             * @property {string|null} [comm] SchedPiSetprioFtraceEvent comm
             * @property {number|null} [newprio] SchedPiSetprioFtraceEvent newprio
             * @property {number|null} [oldprio] SchedPiSetprioFtraceEvent oldprio
             * @property {number|null} [pid] SchedPiSetprioFtraceEvent pid
             */

            /**
             * Constructs a new SchedPiSetprioFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SchedPiSetprioFtraceEvent.
             * @implements ISchedPiSetprioFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISchedPiSetprioFtraceEvent=} [p] Properties to set
             */
            function SchedPiSetprioFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SchedPiSetprioFtraceEvent comm.
             * @member {string} comm
             * @memberof perfetto.protos.SchedPiSetprioFtraceEvent
             * @instance
             */
            SchedPiSetprioFtraceEvent.prototype.comm = "";

            /**
             * SchedPiSetprioFtraceEvent newprio.
             * @member {number} newprio
             * @memberof perfetto.protos.SchedPiSetprioFtraceEvent
             * @instance
             */
            SchedPiSetprioFtraceEvent.prototype.newprio = 0;

            /**
             * SchedPiSetprioFtraceEvent oldprio.
             * @member {number} oldprio
             * @memberof perfetto.protos.SchedPiSetprioFtraceEvent
             * @instance
             */
            SchedPiSetprioFtraceEvent.prototype.oldprio = 0;

            /**
             * SchedPiSetprioFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.SchedPiSetprioFtraceEvent
             * @instance
             */
            SchedPiSetprioFtraceEvent.prototype.pid = 0;

            /**
             * Creates a new SchedPiSetprioFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SchedPiSetprioFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedPiSetprioFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SchedPiSetprioFtraceEvent} SchedPiSetprioFtraceEvent instance
             */
            SchedPiSetprioFtraceEvent.create = function create(properties) {
                return new SchedPiSetprioFtraceEvent(properties);
            };

            /**
             * Encodes the specified SchedPiSetprioFtraceEvent message. Does not implicitly {@link perfetto.protos.SchedPiSetprioFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SchedPiSetprioFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedPiSetprioFtraceEvent} m SchedPiSetprioFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedPiSetprioFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.comm != null && Object.hasOwnProperty.call(m, "comm"))
                    w.uint32(10).string(m.comm);
                if (m.newprio != null && Object.hasOwnProperty.call(m, "newprio"))
                    w.uint32(16).int32(m.newprio);
                if (m.oldprio != null && Object.hasOwnProperty.call(m, "oldprio"))
                    w.uint32(24).int32(m.oldprio);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(32).int32(m.pid);
                return w;
            };

            /**
             * Encodes the specified SchedPiSetprioFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SchedPiSetprioFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SchedPiSetprioFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedPiSetprioFtraceEvent} message SchedPiSetprioFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedPiSetprioFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SchedPiSetprioFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SchedPiSetprioFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SchedPiSetprioFtraceEvent} SchedPiSetprioFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedPiSetprioFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SchedPiSetprioFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.comm = r.string();
                        break;
                    case 2:
                        m.newprio = r.int32();
                        break;
                    case 3:
                        m.oldprio = r.int32();
                        break;
                    case 4:
                        m.pid = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SchedPiSetprioFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SchedPiSetprioFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SchedPiSetprioFtraceEvent} SchedPiSetprioFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedPiSetprioFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SchedPiSetprioFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SchedPiSetprioFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SchedPiSetprioFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    if (!$util.isString(m.comm))
                        return "comm: string expected";
                }
                if (m.newprio != null && m.hasOwnProperty("newprio")) {
                    if (!$util.isInteger(m.newprio))
                        return "newprio: integer expected";
                }
                if (m.oldprio != null && m.hasOwnProperty("oldprio")) {
                    if (!$util.isInteger(m.oldprio))
                        return "oldprio: integer expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                return null;
            };

            /**
             * Creates a SchedPiSetprioFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SchedPiSetprioFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SchedPiSetprioFtraceEvent} SchedPiSetprioFtraceEvent
             */
            SchedPiSetprioFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SchedPiSetprioFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SchedPiSetprioFtraceEvent();
                if (d.comm != null) {
                    m.comm = String(d.comm);
                }
                if (d.newprio != null) {
                    m.newprio = d.newprio | 0;
                }
                if (d.oldprio != null) {
                    m.oldprio = d.oldprio | 0;
                }
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SchedPiSetprioFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SchedPiSetprioFtraceEvent
             * @static
             * @param {perfetto.protos.SchedPiSetprioFtraceEvent} m SchedPiSetprioFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SchedPiSetprioFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.comm = "";
                    d.newprio = 0;
                    d.oldprio = 0;
                    d.pid = 0;
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    d.comm = m.comm;
                }
                if (m.newprio != null && m.hasOwnProperty("newprio")) {
                    d.newprio = m.newprio;
                }
                if (m.oldprio != null && m.hasOwnProperty("oldprio")) {
                    d.oldprio = m.oldprio;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                return d;
            };

            /**
             * Converts this SchedPiSetprioFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SchedPiSetprioFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SchedPiSetprioFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SchedPiSetprioFtraceEvent;
        })();

        protos.SchedCpuUtilCfsFtraceEvent = (function() {

            /**
             * Properties of a SchedCpuUtilCfsFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISchedCpuUtilCfsFtraceEvent
             * @property {number|null} [active] SchedCpuUtilCfsFtraceEvent active
             * @property {number|null} [capacity] SchedCpuUtilCfsFtraceEvent capacity
             * @property {number|null} [capacityOrig] SchedCpuUtilCfsFtraceEvent capacityOrig
             * @property {number|null} [cpu] SchedCpuUtilCfsFtraceEvent cpu
             * @property {number|null} [cpuImportance] SchedCpuUtilCfsFtraceEvent cpuImportance
             * @property {number|null} [cpuUtil] SchedCpuUtilCfsFtraceEvent cpuUtil
             * @property {number|null} [exitLat] SchedCpuUtilCfsFtraceEvent exitLat
             * @property {number|null} [groupCapacity] SchedCpuUtilCfsFtraceEvent groupCapacity
             * @property {number|null} [grpOverutilized] SchedCpuUtilCfsFtraceEvent grpOverutilized
             * @property {number|null} [idleCpu] SchedCpuUtilCfsFtraceEvent idleCpu
             * @property {number|null} [nrRunning] SchedCpuUtilCfsFtraceEvent nrRunning
             * @property {number|null} [spareCap] SchedCpuUtilCfsFtraceEvent spareCap
             * @property {number|null} [taskFits] SchedCpuUtilCfsFtraceEvent taskFits
             * @property {number|null} [wakeGroupUtil] SchedCpuUtilCfsFtraceEvent wakeGroupUtil
             * @property {number|null} [wakeUtil] SchedCpuUtilCfsFtraceEvent wakeUtil
             */

            /**
             * Constructs a new SchedCpuUtilCfsFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SchedCpuUtilCfsFtraceEvent.
             * @implements ISchedCpuUtilCfsFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISchedCpuUtilCfsFtraceEvent=} [p] Properties to set
             */
            function SchedCpuUtilCfsFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SchedCpuUtilCfsFtraceEvent active.
             * @member {number} active
             * @memberof perfetto.protos.SchedCpuUtilCfsFtraceEvent
             * @instance
             */
            SchedCpuUtilCfsFtraceEvent.prototype.active = 0;

            /**
             * SchedCpuUtilCfsFtraceEvent capacity.
             * @member {number} capacity
             * @memberof perfetto.protos.SchedCpuUtilCfsFtraceEvent
             * @instance
             */
            SchedCpuUtilCfsFtraceEvent.prototype.capacity = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SchedCpuUtilCfsFtraceEvent capacityOrig.
             * @member {number} capacityOrig
             * @memberof perfetto.protos.SchedCpuUtilCfsFtraceEvent
             * @instance
             */
            SchedCpuUtilCfsFtraceEvent.prototype.capacityOrig = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SchedCpuUtilCfsFtraceEvent cpu.
             * @member {number} cpu
             * @memberof perfetto.protos.SchedCpuUtilCfsFtraceEvent
             * @instance
             */
            SchedCpuUtilCfsFtraceEvent.prototype.cpu = 0;

            /**
             * SchedCpuUtilCfsFtraceEvent cpuImportance.
             * @member {number} cpuImportance
             * @memberof perfetto.protos.SchedCpuUtilCfsFtraceEvent
             * @instance
             */
            SchedCpuUtilCfsFtraceEvent.prototype.cpuImportance = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SchedCpuUtilCfsFtraceEvent cpuUtil.
             * @member {number} cpuUtil
             * @memberof perfetto.protos.SchedCpuUtilCfsFtraceEvent
             * @instance
             */
            SchedCpuUtilCfsFtraceEvent.prototype.cpuUtil = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SchedCpuUtilCfsFtraceEvent exitLat.
             * @member {number} exitLat
             * @memberof perfetto.protos.SchedCpuUtilCfsFtraceEvent
             * @instance
             */
            SchedCpuUtilCfsFtraceEvent.prototype.exitLat = 0;

            /**
             * SchedCpuUtilCfsFtraceEvent groupCapacity.
             * @member {number} groupCapacity
             * @memberof perfetto.protos.SchedCpuUtilCfsFtraceEvent
             * @instance
             */
            SchedCpuUtilCfsFtraceEvent.prototype.groupCapacity = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SchedCpuUtilCfsFtraceEvent grpOverutilized.
             * @member {number} grpOverutilized
             * @memberof perfetto.protos.SchedCpuUtilCfsFtraceEvent
             * @instance
             */
            SchedCpuUtilCfsFtraceEvent.prototype.grpOverutilized = 0;

            /**
             * SchedCpuUtilCfsFtraceEvent idleCpu.
             * @member {number} idleCpu
             * @memberof perfetto.protos.SchedCpuUtilCfsFtraceEvent
             * @instance
             */
            SchedCpuUtilCfsFtraceEvent.prototype.idleCpu = 0;

            /**
             * SchedCpuUtilCfsFtraceEvent nrRunning.
             * @member {number} nrRunning
             * @memberof perfetto.protos.SchedCpuUtilCfsFtraceEvent
             * @instance
             */
            SchedCpuUtilCfsFtraceEvent.prototype.nrRunning = 0;

            /**
             * SchedCpuUtilCfsFtraceEvent spareCap.
             * @member {number} spareCap
             * @memberof perfetto.protos.SchedCpuUtilCfsFtraceEvent
             * @instance
             */
            SchedCpuUtilCfsFtraceEvent.prototype.spareCap = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * SchedCpuUtilCfsFtraceEvent taskFits.
             * @member {number} taskFits
             * @memberof perfetto.protos.SchedCpuUtilCfsFtraceEvent
             * @instance
             */
            SchedCpuUtilCfsFtraceEvent.prototype.taskFits = 0;

            /**
             * SchedCpuUtilCfsFtraceEvent wakeGroupUtil.
             * @member {number} wakeGroupUtil
             * @memberof perfetto.protos.SchedCpuUtilCfsFtraceEvent
             * @instance
             */
            SchedCpuUtilCfsFtraceEvent.prototype.wakeGroupUtil = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SchedCpuUtilCfsFtraceEvent wakeUtil.
             * @member {number} wakeUtil
             * @memberof perfetto.protos.SchedCpuUtilCfsFtraceEvent
             * @instance
             */
            SchedCpuUtilCfsFtraceEvent.prototype.wakeUtil = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new SchedCpuUtilCfsFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SchedCpuUtilCfsFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedCpuUtilCfsFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SchedCpuUtilCfsFtraceEvent} SchedCpuUtilCfsFtraceEvent instance
             */
            SchedCpuUtilCfsFtraceEvent.create = function create(properties) {
                return new SchedCpuUtilCfsFtraceEvent(properties);
            };

            /**
             * Encodes the specified SchedCpuUtilCfsFtraceEvent message. Does not implicitly {@link perfetto.protos.SchedCpuUtilCfsFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SchedCpuUtilCfsFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedCpuUtilCfsFtraceEvent} m SchedCpuUtilCfsFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedCpuUtilCfsFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.active != null && Object.hasOwnProperty.call(m, "active"))
                    w.uint32(8).int32(m.active);
                if (m.capacity != null && Object.hasOwnProperty.call(m, "capacity"))
                    w.uint32(16).uint64(m.capacity);
                if (m.capacityOrig != null && Object.hasOwnProperty.call(m, "capacityOrig"))
                    w.uint32(24).uint64(m.capacityOrig);
                if (m.cpu != null && Object.hasOwnProperty.call(m, "cpu"))
                    w.uint32(32).uint32(m.cpu);
                if (m.cpuImportance != null && Object.hasOwnProperty.call(m, "cpuImportance"))
                    w.uint32(40).uint64(m.cpuImportance);
                if (m.cpuUtil != null && Object.hasOwnProperty.call(m, "cpuUtil"))
                    w.uint32(48).uint64(m.cpuUtil);
                if (m.exitLat != null && Object.hasOwnProperty.call(m, "exitLat"))
                    w.uint32(56).uint32(m.exitLat);
                if (m.groupCapacity != null && Object.hasOwnProperty.call(m, "groupCapacity"))
                    w.uint32(64).uint64(m.groupCapacity);
                if (m.grpOverutilized != null && Object.hasOwnProperty.call(m, "grpOverutilized"))
                    w.uint32(72).uint32(m.grpOverutilized);
                if (m.idleCpu != null && Object.hasOwnProperty.call(m, "idleCpu"))
                    w.uint32(80).uint32(m.idleCpu);
                if (m.nrRunning != null && Object.hasOwnProperty.call(m, "nrRunning"))
                    w.uint32(88).uint32(m.nrRunning);
                if (m.spareCap != null && Object.hasOwnProperty.call(m, "spareCap"))
                    w.uint32(96).int64(m.spareCap);
                if (m.taskFits != null && Object.hasOwnProperty.call(m, "taskFits"))
                    w.uint32(104).uint32(m.taskFits);
                if (m.wakeGroupUtil != null && Object.hasOwnProperty.call(m, "wakeGroupUtil"))
                    w.uint32(112).uint64(m.wakeGroupUtil);
                if (m.wakeUtil != null && Object.hasOwnProperty.call(m, "wakeUtil"))
                    w.uint32(120).uint64(m.wakeUtil);
                return w;
            };

            /**
             * Encodes the specified SchedCpuUtilCfsFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SchedCpuUtilCfsFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SchedCpuUtilCfsFtraceEvent
             * @static
             * @param {perfetto.protos.ISchedCpuUtilCfsFtraceEvent} message SchedCpuUtilCfsFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SchedCpuUtilCfsFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SchedCpuUtilCfsFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SchedCpuUtilCfsFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SchedCpuUtilCfsFtraceEvent} SchedCpuUtilCfsFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedCpuUtilCfsFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SchedCpuUtilCfsFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.active = r.int32();
                        break;
                    case 2:
                        m.capacity = r.uint64();
                        break;
                    case 3:
                        m.capacityOrig = r.uint64();
                        break;
                    case 4:
                        m.cpu = r.uint32();
                        break;
                    case 5:
                        m.cpuImportance = r.uint64();
                        break;
                    case 6:
                        m.cpuUtil = r.uint64();
                        break;
                    case 7:
                        m.exitLat = r.uint32();
                        break;
                    case 8:
                        m.groupCapacity = r.uint64();
                        break;
                    case 9:
                        m.grpOverutilized = r.uint32();
                        break;
                    case 10:
                        m.idleCpu = r.uint32();
                        break;
                    case 11:
                        m.nrRunning = r.uint32();
                        break;
                    case 12:
                        m.spareCap = r.int64();
                        break;
                    case 13:
                        m.taskFits = r.uint32();
                        break;
                    case 14:
                        m.wakeGroupUtil = r.uint64();
                        break;
                    case 15:
                        m.wakeUtil = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SchedCpuUtilCfsFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SchedCpuUtilCfsFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SchedCpuUtilCfsFtraceEvent} SchedCpuUtilCfsFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SchedCpuUtilCfsFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SchedCpuUtilCfsFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SchedCpuUtilCfsFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SchedCpuUtilCfsFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.active != null && m.hasOwnProperty("active")) {
                    if (!$util.isInteger(m.active))
                        return "active: integer expected";
                }
                if (m.capacity != null && m.hasOwnProperty("capacity")) {
                    if (!$util.isInteger(m.capacity) && !(m.capacity && $util.isInteger(m.capacity.low) && $util.isInteger(m.capacity.high)))
                        return "capacity: integer|Long expected";
                }
                if (m.capacityOrig != null && m.hasOwnProperty("capacityOrig")) {
                    if (!$util.isInteger(m.capacityOrig) && !(m.capacityOrig && $util.isInteger(m.capacityOrig.low) && $util.isInteger(m.capacityOrig.high)))
                        return "capacityOrig: integer|Long expected";
                }
                if (m.cpu != null && m.hasOwnProperty("cpu")) {
                    if (!$util.isInteger(m.cpu))
                        return "cpu: integer expected";
                }
                if (m.cpuImportance != null && m.hasOwnProperty("cpuImportance")) {
                    if (!$util.isInteger(m.cpuImportance) && !(m.cpuImportance && $util.isInteger(m.cpuImportance.low) && $util.isInteger(m.cpuImportance.high)))
                        return "cpuImportance: integer|Long expected";
                }
                if (m.cpuUtil != null && m.hasOwnProperty("cpuUtil")) {
                    if (!$util.isInteger(m.cpuUtil) && !(m.cpuUtil && $util.isInteger(m.cpuUtil.low) && $util.isInteger(m.cpuUtil.high)))
                        return "cpuUtil: integer|Long expected";
                }
                if (m.exitLat != null && m.hasOwnProperty("exitLat")) {
                    if (!$util.isInteger(m.exitLat))
                        return "exitLat: integer expected";
                }
                if (m.groupCapacity != null && m.hasOwnProperty("groupCapacity")) {
                    if (!$util.isInteger(m.groupCapacity) && !(m.groupCapacity && $util.isInteger(m.groupCapacity.low) && $util.isInteger(m.groupCapacity.high)))
                        return "groupCapacity: integer|Long expected";
                }
                if (m.grpOverutilized != null && m.hasOwnProperty("grpOverutilized")) {
                    if (!$util.isInteger(m.grpOverutilized))
                        return "grpOverutilized: integer expected";
                }
                if (m.idleCpu != null && m.hasOwnProperty("idleCpu")) {
                    if (!$util.isInteger(m.idleCpu))
                        return "idleCpu: integer expected";
                }
                if (m.nrRunning != null && m.hasOwnProperty("nrRunning")) {
                    if (!$util.isInteger(m.nrRunning))
                        return "nrRunning: integer expected";
                }
                if (m.spareCap != null && m.hasOwnProperty("spareCap")) {
                    if (!$util.isInteger(m.spareCap) && !(m.spareCap && $util.isInteger(m.spareCap.low) && $util.isInteger(m.spareCap.high)))
                        return "spareCap: integer|Long expected";
                }
                if (m.taskFits != null && m.hasOwnProperty("taskFits")) {
                    if (!$util.isInteger(m.taskFits))
                        return "taskFits: integer expected";
                }
                if (m.wakeGroupUtil != null && m.hasOwnProperty("wakeGroupUtil")) {
                    if (!$util.isInteger(m.wakeGroupUtil) && !(m.wakeGroupUtil && $util.isInteger(m.wakeGroupUtil.low) && $util.isInteger(m.wakeGroupUtil.high)))
                        return "wakeGroupUtil: integer|Long expected";
                }
                if (m.wakeUtil != null && m.hasOwnProperty("wakeUtil")) {
                    if (!$util.isInteger(m.wakeUtil) && !(m.wakeUtil && $util.isInteger(m.wakeUtil.low) && $util.isInteger(m.wakeUtil.high)))
                        return "wakeUtil: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a SchedCpuUtilCfsFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SchedCpuUtilCfsFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SchedCpuUtilCfsFtraceEvent} SchedCpuUtilCfsFtraceEvent
             */
            SchedCpuUtilCfsFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SchedCpuUtilCfsFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SchedCpuUtilCfsFtraceEvent();
                if (d.active != null) {
                    m.active = d.active | 0;
                }
                if (d.capacity != null) {
                    if ($util.Long)
                        (m.capacity = $util.Long.fromValue(d.capacity)).unsigned = true;
                    else if (typeof d.capacity === "string")
                        m.capacity = parseInt(d.capacity, 10);
                    else if (typeof d.capacity === "number")
                        m.capacity = d.capacity;
                    else if (typeof d.capacity === "object")
                        m.capacity = new $util.LongBits(d.capacity.low >>> 0, d.capacity.high >>> 0).toNumber(true);
                }
                if (d.capacityOrig != null) {
                    if ($util.Long)
                        (m.capacityOrig = $util.Long.fromValue(d.capacityOrig)).unsigned = true;
                    else if (typeof d.capacityOrig === "string")
                        m.capacityOrig = parseInt(d.capacityOrig, 10);
                    else if (typeof d.capacityOrig === "number")
                        m.capacityOrig = d.capacityOrig;
                    else if (typeof d.capacityOrig === "object")
                        m.capacityOrig = new $util.LongBits(d.capacityOrig.low >>> 0, d.capacityOrig.high >>> 0).toNumber(true);
                }
                if (d.cpu != null) {
                    m.cpu = d.cpu >>> 0;
                }
                if (d.cpuImportance != null) {
                    if ($util.Long)
                        (m.cpuImportance = $util.Long.fromValue(d.cpuImportance)).unsigned = true;
                    else if (typeof d.cpuImportance === "string")
                        m.cpuImportance = parseInt(d.cpuImportance, 10);
                    else if (typeof d.cpuImportance === "number")
                        m.cpuImportance = d.cpuImportance;
                    else if (typeof d.cpuImportance === "object")
                        m.cpuImportance = new $util.LongBits(d.cpuImportance.low >>> 0, d.cpuImportance.high >>> 0).toNumber(true);
                }
                if (d.cpuUtil != null) {
                    if ($util.Long)
                        (m.cpuUtil = $util.Long.fromValue(d.cpuUtil)).unsigned = true;
                    else if (typeof d.cpuUtil === "string")
                        m.cpuUtil = parseInt(d.cpuUtil, 10);
                    else if (typeof d.cpuUtil === "number")
                        m.cpuUtil = d.cpuUtil;
                    else if (typeof d.cpuUtil === "object")
                        m.cpuUtil = new $util.LongBits(d.cpuUtil.low >>> 0, d.cpuUtil.high >>> 0).toNumber(true);
                }
                if (d.exitLat != null) {
                    m.exitLat = d.exitLat >>> 0;
                }
                if (d.groupCapacity != null) {
                    if ($util.Long)
                        (m.groupCapacity = $util.Long.fromValue(d.groupCapacity)).unsigned = true;
                    else if (typeof d.groupCapacity === "string")
                        m.groupCapacity = parseInt(d.groupCapacity, 10);
                    else if (typeof d.groupCapacity === "number")
                        m.groupCapacity = d.groupCapacity;
                    else if (typeof d.groupCapacity === "object")
                        m.groupCapacity = new $util.LongBits(d.groupCapacity.low >>> 0, d.groupCapacity.high >>> 0).toNumber(true);
                }
                if (d.grpOverutilized != null) {
                    m.grpOverutilized = d.grpOverutilized >>> 0;
                }
                if (d.idleCpu != null) {
                    m.idleCpu = d.idleCpu >>> 0;
                }
                if (d.nrRunning != null) {
                    m.nrRunning = d.nrRunning >>> 0;
                }
                if (d.spareCap != null) {
                    if ($util.Long)
                        (m.spareCap = $util.Long.fromValue(d.spareCap)).unsigned = false;
                    else if (typeof d.spareCap === "string")
                        m.spareCap = parseInt(d.spareCap, 10);
                    else if (typeof d.spareCap === "number")
                        m.spareCap = d.spareCap;
                    else if (typeof d.spareCap === "object")
                        m.spareCap = new $util.LongBits(d.spareCap.low >>> 0, d.spareCap.high >>> 0).toNumber();
                }
                if (d.taskFits != null) {
                    m.taskFits = d.taskFits >>> 0;
                }
                if (d.wakeGroupUtil != null) {
                    if ($util.Long)
                        (m.wakeGroupUtil = $util.Long.fromValue(d.wakeGroupUtil)).unsigned = true;
                    else if (typeof d.wakeGroupUtil === "string")
                        m.wakeGroupUtil = parseInt(d.wakeGroupUtil, 10);
                    else if (typeof d.wakeGroupUtil === "number")
                        m.wakeGroupUtil = d.wakeGroupUtil;
                    else if (typeof d.wakeGroupUtil === "object")
                        m.wakeGroupUtil = new $util.LongBits(d.wakeGroupUtil.low >>> 0, d.wakeGroupUtil.high >>> 0).toNumber(true);
                }
                if (d.wakeUtil != null) {
                    if ($util.Long)
                        (m.wakeUtil = $util.Long.fromValue(d.wakeUtil)).unsigned = true;
                    else if (typeof d.wakeUtil === "string")
                        m.wakeUtil = parseInt(d.wakeUtil, 10);
                    else if (typeof d.wakeUtil === "number")
                        m.wakeUtil = d.wakeUtil;
                    else if (typeof d.wakeUtil === "object")
                        m.wakeUtil = new $util.LongBits(d.wakeUtil.low >>> 0, d.wakeUtil.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a SchedCpuUtilCfsFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SchedCpuUtilCfsFtraceEvent
             * @static
             * @param {perfetto.protos.SchedCpuUtilCfsFtraceEvent} m SchedCpuUtilCfsFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SchedCpuUtilCfsFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.active = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.capacity = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.capacity = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.capacityOrig = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.capacityOrig = o.longs === String ? "0" : 0;
                    d.cpu = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.cpuImportance = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.cpuImportance = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.cpuUtil = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.cpuUtil = o.longs === String ? "0" : 0;
                    d.exitLat = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.groupCapacity = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.groupCapacity = o.longs === String ? "0" : 0;
                    d.grpOverutilized = 0;
                    d.idleCpu = 0;
                    d.nrRunning = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.spareCap = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.spareCap = o.longs === String ? "0" : 0;
                    d.taskFits = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.wakeGroupUtil = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.wakeGroupUtil = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.wakeUtil = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.wakeUtil = o.longs === String ? "0" : 0;
                }
                if (m.active != null && m.hasOwnProperty("active")) {
                    d.active = m.active;
                }
                if (m.capacity != null && m.hasOwnProperty("capacity")) {
                    if (typeof m.capacity === "number")
                        d.capacity = o.longs === String ? String(m.capacity) : m.capacity;
                    else
                        d.capacity = o.longs === String ? $util.Long.prototype.toString.call(m.capacity) : o.longs === Number ? new $util.LongBits(m.capacity.low >>> 0, m.capacity.high >>> 0).toNumber(true) : m.capacity;
                }
                if (m.capacityOrig != null && m.hasOwnProperty("capacityOrig")) {
                    if (typeof m.capacityOrig === "number")
                        d.capacityOrig = o.longs === String ? String(m.capacityOrig) : m.capacityOrig;
                    else
                        d.capacityOrig = o.longs === String ? $util.Long.prototype.toString.call(m.capacityOrig) : o.longs === Number ? new $util.LongBits(m.capacityOrig.low >>> 0, m.capacityOrig.high >>> 0).toNumber(true) : m.capacityOrig;
                }
                if (m.cpu != null && m.hasOwnProperty("cpu")) {
                    d.cpu = m.cpu;
                }
                if (m.cpuImportance != null && m.hasOwnProperty("cpuImportance")) {
                    if (typeof m.cpuImportance === "number")
                        d.cpuImportance = o.longs === String ? String(m.cpuImportance) : m.cpuImportance;
                    else
                        d.cpuImportance = o.longs === String ? $util.Long.prototype.toString.call(m.cpuImportance) : o.longs === Number ? new $util.LongBits(m.cpuImportance.low >>> 0, m.cpuImportance.high >>> 0).toNumber(true) : m.cpuImportance;
                }
                if (m.cpuUtil != null && m.hasOwnProperty("cpuUtil")) {
                    if (typeof m.cpuUtil === "number")
                        d.cpuUtil = o.longs === String ? String(m.cpuUtil) : m.cpuUtil;
                    else
                        d.cpuUtil = o.longs === String ? $util.Long.prototype.toString.call(m.cpuUtil) : o.longs === Number ? new $util.LongBits(m.cpuUtil.low >>> 0, m.cpuUtil.high >>> 0).toNumber(true) : m.cpuUtil;
                }
                if (m.exitLat != null && m.hasOwnProperty("exitLat")) {
                    d.exitLat = m.exitLat;
                }
                if (m.groupCapacity != null && m.hasOwnProperty("groupCapacity")) {
                    if (typeof m.groupCapacity === "number")
                        d.groupCapacity = o.longs === String ? String(m.groupCapacity) : m.groupCapacity;
                    else
                        d.groupCapacity = o.longs === String ? $util.Long.prototype.toString.call(m.groupCapacity) : o.longs === Number ? new $util.LongBits(m.groupCapacity.low >>> 0, m.groupCapacity.high >>> 0).toNumber(true) : m.groupCapacity;
                }
                if (m.grpOverutilized != null && m.hasOwnProperty("grpOverutilized")) {
                    d.grpOverutilized = m.grpOverutilized;
                }
                if (m.idleCpu != null && m.hasOwnProperty("idleCpu")) {
                    d.idleCpu = m.idleCpu;
                }
                if (m.nrRunning != null && m.hasOwnProperty("nrRunning")) {
                    d.nrRunning = m.nrRunning;
                }
                if (m.spareCap != null && m.hasOwnProperty("spareCap")) {
                    if (typeof m.spareCap === "number")
                        d.spareCap = o.longs === String ? String(m.spareCap) : m.spareCap;
                    else
                        d.spareCap = o.longs === String ? $util.Long.prototype.toString.call(m.spareCap) : o.longs === Number ? new $util.LongBits(m.spareCap.low >>> 0, m.spareCap.high >>> 0).toNumber() : m.spareCap;
                }
                if (m.taskFits != null && m.hasOwnProperty("taskFits")) {
                    d.taskFits = m.taskFits;
                }
                if (m.wakeGroupUtil != null && m.hasOwnProperty("wakeGroupUtil")) {
                    if (typeof m.wakeGroupUtil === "number")
                        d.wakeGroupUtil = o.longs === String ? String(m.wakeGroupUtil) : m.wakeGroupUtil;
                    else
                        d.wakeGroupUtil = o.longs === String ? $util.Long.prototype.toString.call(m.wakeGroupUtil) : o.longs === Number ? new $util.LongBits(m.wakeGroupUtil.low >>> 0, m.wakeGroupUtil.high >>> 0).toNumber(true) : m.wakeGroupUtil;
                }
                if (m.wakeUtil != null && m.hasOwnProperty("wakeUtil")) {
                    if (typeof m.wakeUtil === "number")
                        d.wakeUtil = o.longs === String ? String(m.wakeUtil) : m.wakeUtil;
                    else
                        d.wakeUtil = o.longs === String ? $util.Long.prototype.toString.call(m.wakeUtil) : o.longs === Number ? new $util.LongBits(m.wakeUtil.low >>> 0, m.wakeUtil.high >>> 0).toNumber(true) : m.wakeUtil;
                }
                return d;
            };

            /**
             * Converts this SchedCpuUtilCfsFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SchedCpuUtilCfsFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SchedCpuUtilCfsFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SchedCpuUtilCfsFtraceEvent;
        })();

        protos.ScmCallStartFtraceEvent = (function() {

            /**
             * Properties of a ScmCallStartFtraceEvent.
             * @memberof perfetto.protos
             * @interface IScmCallStartFtraceEvent
             * @property {number|null} [arginfo] ScmCallStartFtraceEvent arginfo
             * @property {number|null} [x0] ScmCallStartFtraceEvent x0
             * @property {number|null} [x5] ScmCallStartFtraceEvent x5
             */

            /**
             * Constructs a new ScmCallStartFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a ScmCallStartFtraceEvent.
             * @implements IScmCallStartFtraceEvent
             * @constructor
             * @param {perfetto.protos.IScmCallStartFtraceEvent=} [p] Properties to set
             */
            function ScmCallStartFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ScmCallStartFtraceEvent arginfo.
             * @member {number} arginfo
             * @memberof perfetto.protos.ScmCallStartFtraceEvent
             * @instance
             */
            ScmCallStartFtraceEvent.prototype.arginfo = 0;

            /**
             * ScmCallStartFtraceEvent x0.
             * @member {number} x0
             * @memberof perfetto.protos.ScmCallStartFtraceEvent
             * @instance
             */
            ScmCallStartFtraceEvent.prototype.x0 = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * ScmCallStartFtraceEvent x5.
             * @member {number} x5
             * @memberof perfetto.protos.ScmCallStartFtraceEvent
             * @instance
             */
            ScmCallStartFtraceEvent.prototype.x5 = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new ScmCallStartFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ScmCallStartFtraceEvent
             * @static
             * @param {perfetto.protos.IScmCallStartFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.ScmCallStartFtraceEvent} ScmCallStartFtraceEvent instance
             */
            ScmCallStartFtraceEvent.create = function create(properties) {
                return new ScmCallStartFtraceEvent(properties);
            };

            /**
             * Encodes the specified ScmCallStartFtraceEvent message. Does not implicitly {@link perfetto.protos.ScmCallStartFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ScmCallStartFtraceEvent
             * @static
             * @param {perfetto.protos.IScmCallStartFtraceEvent} m ScmCallStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ScmCallStartFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.arginfo != null && Object.hasOwnProperty.call(m, "arginfo"))
                    w.uint32(8).uint32(m.arginfo);
                if (m.x0 != null && Object.hasOwnProperty.call(m, "x0"))
                    w.uint32(16).uint64(m.x0);
                if (m.x5 != null && Object.hasOwnProperty.call(m, "x5"))
                    w.uint32(24).uint64(m.x5);
                return w;
            };

            /**
             * Encodes the specified ScmCallStartFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.ScmCallStartFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ScmCallStartFtraceEvent
             * @static
             * @param {perfetto.protos.IScmCallStartFtraceEvent} message ScmCallStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ScmCallStartFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ScmCallStartFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ScmCallStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ScmCallStartFtraceEvent} ScmCallStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ScmCallStartFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ScmCallStartFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.arginfo = r.uint32();
                        break;
                    case 2:
                        m.x0 = r.uint64();
                        break;
                    case 3:
                        m.x5 = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ScmCallStartFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ScmCallStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ScmCallStartFtraceEvent} ScmCallStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ScmCallStartFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ScmCallStartFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.ScmCallStartFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ScmCallStartFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.arginfo != null && m.hasOwnProperty("arginfo")) {
                    if (!$util.isInteger(m.arginfo))
                        return "arginfo: integer expected";
                }
                if (m.x0 != null && m.hasOwnProperty("x0")) {
                    if (!$util.isInteger(m.x0) && !(m.x0 && $util.isInteger(m.x0.low) && $util.isInteger(m.x0.high)))
                        return "x0: integer|Long expected";
                }
                if (m.x5 != null && m.hasOwnProperty("x5")) {
                    if (!$util.isInteger(m.x5) && !(m.x5 && $util.isInteger(m.x5.low) && $util.isInteger(m.x5.high)))
                        return "x5: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a ScmCallStartFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ScmCallStartFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ScmCallStartFtraceEvent} ScmCallStartFtraceEvent
             */
            ScmCallStartFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ScmCallStartFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.ScmCallStartFtraceEvent();
                if (d.arginfo != null) {
                    m.arginfo = d.arginfo >>> 0;
                }
                if (d.x0 != null) {
                    if ($util.Long)
                        (m.x0 = $util.Long.fromValue(d.x0)).unsigned = true;
                    else if (typeof d.x0 === "string")
                        m.x0 = parseInt(d.x0, 10);
                    else if (typeof d.x0 === "number")
                        m.x0 = d.x0;
                    else if (typeof d.x0 === "object")
                        m.x0 = new $util.LongBits(d.x0.low >>> 0, d.x0.high >>> 0).toNumber(true);
                }
                if (d.x5 != null) {
                    if ($util.Long)
                        (m.x5 = $util.Long.fromValue(d.x5)).unsigned = true;
                    else if (typeof d.x5 === "string")
                        m.x5 = parseInt(d.x5, 10);
                    else if (typeof d.x5 === "number")
                        m.x5 = d.x5;
                    else if (typeof d.x5 === "object")
                        m.x5 = new $util.LongBits(d.x5.low >>> 0, d.x5.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a ScmCallStartFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ScmCallStartFtraceEvent
             * @static
             * @param {perfetto.protos.ScmCallStartFtraceEvent} m ScmCallStartFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ScmCallStartFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.arginfo = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.x0 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.x0 = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.x5 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.x5 = o.longs === String ? "0" : 0;
                }
                if (m.arginfo != null && m.hasOwnProperty("arginfo")) {
                    d.arginfo = m.arginfo;
                }
                if (m.x0 != null && m.hasOwnProperty("x0")) {
                    if (typeof m.x0 === "number")
                        d.x0 = o.longs === String ? String(m.x0) : m.x0;
                    else
                        d.x0 = o.longs === String ? $util.Long.prototype.toString.call(m.x0) : o.longs === Number ? new $util.LongBits(m.x0.low >>> 0, m.x0.high >>> 0).toNumber(true) : m.x0;
                }
                if (m.x5 != null && m.hasOwnProperty("x5")) {
                    if (typeof m.x5 === "number")
                        d.x5 = o.longs === String ? String(m.x5) : m.x5;
                    else
                        d.x5 = o.longs === String ? $util.Long.prototype.toString.call(m.x5) : o.longs === Number ? new $util.LongBits(m.x5.low >>> 0, m.x5.high >>> 0).toNumber(true) : m.x5;
                }
                return d;
            };

            /**
             * Converts this ScmCallStartFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ScmCallStartFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ScmCallStartFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ScmCallStartFtraceEvent;
        })();

        protos.ScmCallEndFtraceEvent = (function() {

            /**
             * Properties of a ScmCallEndFtraceEvent.
             * @memberof perfetto.protos
             * @interface IScmCallEndFtraceEvent
             */

            /**
             * Constructs a new ScmCallEndFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a ScmCallEndFtraceEvent.
             * @implements IScmCallEndFtraceEvent
             * @constructor
             * @param {perfetto.protos.IScmCallEndFtraceEvent=} [p] Properties to set
             */
            function ScmCallEndFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Creates a new ScmCallEndFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ScmCallEndFtraceEvent
             * @static
             * @param {perfetto.protos.IScmCallEndFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.ScmCallEndFtraceEvent} ScmCallEndFtraceEvent instance
             */
            ScmCallEndFtraceEvent.create = function create(properties) {
                return new ScmCallEndFtraceEvent(properties);
            };

            /**
             * Encodes the specified ScmCallEndFtraceEvent message. Does not implicitly {@link perfetto.protos.ScmCallEndFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ScmCallEndFtraceEvent
             * @static
             * @param {perfetto.protos.IScmCallEndFtraceEvent} m ScmCallEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ScmCallEndFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                return w;
            };

            /**
             * Encodes the specified ScmCallEndFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.ScmCallEndFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ScmCallEndFtraceEvent
             * @static
             * @param {perfetto.protos.IScmCallEndFtraceEvent} message ScmCallEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ScmCallEndFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ScmCallEndFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ScmCallEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ScmCallEndFtraceEvent} ScmCallEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ScmCallEndFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ScmCallEndFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ScmCallEndFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ScmCallEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ScmCallEndFtraceEvent} ScmCallEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ScmCallEndFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ScmCallEndFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.ScmCallEndFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ScmCallEndFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates a ScmCallEndFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ScmCallEndFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ScmCallEndFtraceEvent} ScmCallEndFtraceEvent
             */
            ScmCallEndFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ScmCallEndFtraceEvent)
                    return d;
                return new $root.perfetto.protos.ScmCallEndFtraceEvent();
            };

            /**
             * Creates a plain object from a ScmCallEndFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ScmCallEndFtraceEvent
             * @static
             * @param {perfetto.protos.ScmCallEndFtraceEvent} m ScmCallEndFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ScmCallEndFtraceEvent.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this ScmCallEndFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ScmCallEndFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ScmCallEndFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ScmCallEndFtraceEvent;
        })();

        protos.SdeTracingMarkWriteFtraceEvent = (function() {

            /**
             * Properties of a SdeTracingMarkWriteFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISdeTracingMarkWriteFtraceEvent
             * @property {number|null} [pid] SdeTracingMarkWriteFtraceEvent pid
             * @property {string|null} [traceName] SdeTracingMarkWriteFtraceEvent traceName
             * @property {number|null} [traceType] SdeTracingMarkWriteFtraceEvent traceType
             * @property {number|null} [value] SdeTracingMarkWriteFtraceEvent value
             * @property {number|null} [traceBegin] SdeTracingMarkWriteFtraceEvent traceBegin
             */

            /**
             * Constructs a new SdeTracingMarkWriteFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SdeTracingMarkWriteFtraceEvent.
             * @implements ISdeTracingMarkWriteFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISdeTracingMarkWriteFtraceEvent=} [p] Properties to set
             */
            function SdeTracingMarkWriteFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SdeTracingMarkWriteFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.SdeTracingMarkWriteFtraceEvent
             * @instance
             */
            SdeTracingMarkWriteFtraceEvent.prototype.pid = 0;

            /**
             * SdeTracingMarkWriteFtraceEvent traceName.
             * @member {string} traceName
             * @memberof perfetto.protos.SdeTracingMarkWriteFtraceEvent
             * @instance
             */
            SdeTracingMarkWriteFtraceEvent.prototype.traceName = "";

            /**
             * SdeTracingMarkWriteFtraceEvent traceType.
             * @member {number} traceType
             * @memberof perfetto.protos.SdeTracingMarkWriteFtraceEvent
             * @instance
             */
            SdeTracingMarkWriteFtraceEvent.prototype.traceType = 0;

            /**
             * SdeTracingMarkWriteFtraceEvent value.
             * @member {number} value
             * @memberof perfetto.protos.SdeTracingMarkWriteFtraceEvent
             * @instance
             */
            SdeTracingMarkWriteFtraceEvent.prototype.value = 0;

            /**
             * SdeTracingMarkWriteFtraceEvent traceBegin.
             * @member {number} traceBegin
             * @memberof perfetto.protos.SdeTracingMarkWriteFtraceEvent
             * @instance
             */
            SdeTracingMarkWriteFtraceEvent.prototype.traceBegin = 0;

            /**
             * Creates a new SdeTracingMarkWriteFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SdeTracingMarkWriteFtraceEvent
             * @static
             * @param {perfetto.protos.ISdeTracingMarkWriteFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SdeTracingMarkWriteFtraceEvent} SdeTracingMarkWriteFtraceEvent instance
             */
            SdeTracingMarkWriteFtraceEvent.create = function create(properties) {
                return new SdeTracingMarkWriteFtraceEvent(properties);
            };

            /**
             * Encodes the specified SdeTracingMarkWriteFtraceEvent message. Does not implicitly {@link perfetto.protos.SdeTracingMarkWriteFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SdeTracingMarkWriteFtraceEvent
             * @static
             * @param {perfetto.protos.ISdeTracingMarkWriteFtraceEvent} m SdeTracingMarkWriteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SdeTracingMarkWriteFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(8).int32(m.pid);
                if (m.traceName != null && Object.hasOwnProperty.call(m, "traceName"))
                    w.uint32(18).string(m.traceName);
                if (m.traceType != null && Object.hasOwnProperty.call(m, "traceType"))
                    w.uint32(24).uint32(m.traceType);
                if (m.value != null && Object.hasOwnProperty.call(m, "value"))
                    w.uint32(32).int32(m.value);
                if (m.traceBegin != null && Object.hasOwnProperty.call(m, "traceBegin"))
                    w.uint32(40).uint32(m.traceBegin);
                return w;
            };

            /**
             * Encodes the specified SdeTracingMarkWriteFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SdeTracingMarkWriteFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SdeTracingMarkWriteFtraceEvent
             * @static
             * @param {perfetto.protos.ISdeTracingMarkWriteFtraceEvent} message SdeTracingMarkWriteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SdeTracingMarkWriteFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SdeTracingMarkWriteFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SdeTracingMarkWriteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SdeTracingMarkWriteFtraceEvent} SdeTracingMarkWriteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SdeTracingMarkWriteFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SdeTracingMarkWriteFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.pid = r.int32();
                        break;
                    case 2:
                        m.traceName = r.string();
                        break;
                    case 3:
                        m.traceType = r.uint32();
                        break;
                    case 4:
                        m.value = r.int32();
                        break;
                    case 5:
                        m.traceBegin = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SdeTracingMarkWriteFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SdeTracingMarkWriteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SdeTracingMarkWriteFtraceEvent} SdeTracingMarkWriteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SdeTracingMarkWriteFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SdeTracingMarkWriteFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SdeTracingMarkWriteFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SdeTracingMarkWriteFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.traceName != null && m.hasOwnProperty("traceName")) {
                    if (!$util.isString(m.traceName))
                        return "traceName: string expected";
                }
                if (m.traceType != null && m.hasOwnProperty("traceType")) {
                    if (!$util.isInteger(m.traceType))
                        return "traceType: integer expected";
                }
                if (m.value != null && m.hasOwnProperty("value")) {
                    if (!$util.isInteger(m.value))
                        return "value: integer expected";
                }
                if (m.traceBegin != null && m.hasOwnProperty("traceBegin")) {
                    if (!$util.isInteger(m.traceBegin))
                        return "traceBegin: integer expected";
                }
                return null;
            };

            /**
             * Creates a SdeTracingMarkWriteFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SdeTracingMarkWriteFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SdeTracingMarkWriteFtraceEvent} SdeTracingMarkWriteFtraceEvent
             */
            SdeTracingMarkWriteFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SdeTracingMarkWriteFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SdeTracingMarkWriteFtraceEvent();
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                if (d.traceName != null) {
                    m.traceName = String(d.traceName);
                }
                if (d.traceType != null) {
                    m.traceType = d.traceType >>> 0;
                }
                if (d.value != null) {
                    m.value = d.value | 0;
                }
                if (d.traceBegin != null) {
                    m.traceBegin = d.traceBegin >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SdeTracingMarkWriteFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SdeTracingMarkWriteFtraceEvent
             * @static
             * @param {perfetto.protos.SdeTracingMarkWriteFtraceEvent} m SdeTracingMarkWriteFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SdeTracingMarkWriteFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.pid = 0;
                    d.traceName = "";
                    d.traceType = 0;
                    d.value = 0;
                    d.traceBegin = 0;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.traceName != null && m.hasOwnProperty("traceName")) {
                    d.traceName = m.traceName;
                }
                if (m.traceType != null && m.hasOwnProperty("traceType")) {
                    d.traceType = m.traceType;
                }
                if (m.value != null && m.hasOwnProperty("value")) {
                    d.value = m.value;
                }
                if (m.traceBegin != null && m.hasOwnProperty("traceBegin")) {
                    d.traceBegin = m.traceBegin;
                }
                return d;
            };

            /**
             * Converts this SdeTracingMarkWriteFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SdeTracingMarkWriteFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SdeTracingMarkWriteFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SdeTracingMarkWriteFtraceEvent;
        })();

        protos.SdeSdeEvtlogFtraceEvent = (function() {

            /**
             * Properties of a SdeSdeEvtlogFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISdeSdeEvtlogFtraceEvent
             * @property {string|null} [evtlogTag] SdeSdeEvtlogFtraceEvent evtlogTag
             * @property {number|null} [pid] SdeSdeEvtlogFtraceEvent pid
             * @property {number|null} [tagId] SdeSdeEvtlogFtraceEvent tagId
             */

            /**
             * Constructs a new SdeSdeEvtlogFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SdeSdeEvtlogFtraceEvent.
             * @implements ISdeSdeEvtlogFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISdeSdeEvtlogFtraceEvent=} [p] Properties to set
             */
            function SdeSdeEvtlogFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SdeSdeEvtlogFtraceEvent evtlogTag.
             * @member {string} evtlogTag
             * @memberof perfetto.protos.SdeSdeEvtlogFtraceEvent
             * @instance
             */
            SdeSdeEvtlogFtraceEvent.prototype.evtlogTag = "";

            /**
             * SdeSdeEvtlogFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.SdeSdeEvtlogFtraceEvent
             * @instance
             */
            SdeSdeEvtlogFtraceEvent.prototype.pid = 0;

            /**
             * SdeSdeEvtlogFtraceEvent tagId.
             * @member {number} tagId
             * @memberof perfetto.protos.SdeSdeEvtlogFtraceEvent
             * @instance
             */
            SdeSdeEvtlogFtraceEvent.prototype.tagId = 0;

            /**
             * Creates a new SdeSdeEvtlogFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SdeSdeEvtlogFtraceEvent
             * @static
             * @param {perfetto.protos.ISdeSdeEvtlogFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SdeSdeEvtlogFtraceEvent} SdeSdeEvtlogFtraceEvent instance
             */
            SdeSdeEvtlogFtraceEvent.create = function create(properties) {
                return new SdeSdeEvtlogFtraceEvent(properties);
            };

            /**
             * Encodes the specified SdeSdeEvtlogFtraceEvent message. Does not implicitly {@link perfetto.protos.SdeSdeEvtlogFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SdeSdeEvtlogFtraceEvent
             * @static
             * @param {perfetto.protos.ISdeSdeEvtlogFtraceEvent} m SdeSdeEvtlogFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SdeSdeEvtlogFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.evtlogTag != null && Object.hasOwnProperty.call(m, "evtlogTag"))
                    w.uint32(10).string(m.evtlogTag);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(16).int32(m.pid);
                if (m.tagId != null && Object.hasOwnProperty.call(m, "tagId"))
                    w.uint32(24).uint32(m.tagId);
                return w;
            };

            /**
             * Encodes the specified SdeSdeEvtlogFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SdeSdeEvtlogFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SdeSdeEvtlogFtraceEvent
             * @static
             * @param {perfetto.protos.ISdeSdeEvtlogFtraceEvent} message SdeSdeEvtlogFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SdeSdeEvtlogFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SdeSdeEvtlogFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SdeSdeEvtlogFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SdeSdeEvtlogFtraceEvent} SdeSdeEvtlogFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SdeSdeEvtlogFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SdeSdeEvtlogFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.evtlogTag = r.string();
                        break;
                    case 2:
                        m.pid = r.int32();
                        break;
                    case 3:
                        m.tagId = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SdeSdeEvtlogFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SdeSdeEvtlogFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SdeSdeEvtlogFtraceEvent} SdeSdeEvtlogFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SdeSdeEvtlogFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SdeSdeEvtlogFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SdeSdeEvtlogFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SdeSdeEvtlogFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.evtlogTag != null && m.hasOwnProperty("evtlogTag")) {
                    if (!$util.isString(m.evtlogTag))
                        return "evtlogTag: string expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.tagId != null && m.hasOwnProperty("tagId")) {
                    if (!$util.isInteger(m.tagId))
                        return "tagId: integer expected";
                }
                return null;
            };

            /**
             * Creates a SdeSdeEvtlogFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SdeSdeEvtlogFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SdeSdeEvtlogFtraceEvent} SdeSdeEvtlogFtraceEvent
             */
            SdeSdeEvtlogFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SdeSdeEvtlogFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SdeSdeEvtlogFtraceEvent();
                if (d.evtlogTag != null) {
                    m.evtlogTag = String(d.evtlogTag);
                }
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                if (d.tagId != null) {
                    m.tagId = d.tagId >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SdeSdeEvtlogFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SdeSdeEvtlogFtraceEvent
             * @static
             * @param {perfetto.protos.SdeSdeEvtlogFtraceEvent} m SdeSdeEvtlogFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SdeSdeEvtlogFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.evtlogTag = "";
                    d.pid = 0;
                    d.tagId = 0;
                }
                if (m.evtlogTag != null && m.hasOwnProperty("evtlogTag")) {
                    d.evtlogTag = m.evtlogTag;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.tagId != null && m.hasOwnProperty("tagId")) {
                    d.tagId = m.tagId;
                }
                return d;
            };

            /**
             * Converts this SdeSdeEvtlogFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SdeSdeEvtlogFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SdeSdeEvtlogFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SdeSdeEvtlogFtraceEvent;
        })();

        protos.SdeSdePerfCalcCrtcFtraceEvent = (function() {

            /**
             * Properties of a SdeSdePerfCalcCrtcFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISdeSdePerfCalcCrtcFtraceEvent
             * @property {number|null} [bwCtlEbi] SdeSdePerfCalcCrtcFtraceEvent bwCtlEbi
             * @property {number|null} [bwCtlLlcc] SdeSdePerfCalcCrtcFtraceEvent bwCtlLlcc
             * @property {number|null} [bwCtlMnoc] SdeSdePerfCalcCrtcFtraceEvent bwCtlMnoc
             * @property {number|null} [coreClkRate] SdeSdePerfCalcCrtcFtraceEvent coreClkRate
             * @property {number|null} [crtc] SdeSdePerfCalcCrtcFtraceEvent crtc
             * @property {number|null} [ibEbi] SdeSdePerfCalcCrtcFtraceEvent ibEbi
             * @property {number|null} [ibLlcc] SdeSdePerfCalcCrtcFtraceEvent ibLlcc
             * @property {number|null} [ibMnoc] SdeSdePerfCalcCrtcFtraceEvent ibMnoc
             */

            /**
             * Constructs a new SdeSdePerfCalcCrtcFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SdeSdePerfCalcCrtcFtraceEvent.
             * @implements ISdeSdePerfCalcCrtcFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISdeSdePerfCalcCrtcFtraceEvent=} [p] Properties to set
             */
            function SdeSdePerfCalcCrtcFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SdeSdePerfCalcCrtcFtraceEvent bwCtlEbi.
             * @member {number} bwCtlEbi
             * @memberof perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent
             * @instance
             */
            SdeSdePerfCalcCrtcFtraceEvent.prototype.bwCtlEbi = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SdeSdePerfCalcCrtcFtraceEvent bwCtlLlcc.
             * @member {number} bwCtlLlcc
             * @memberof perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent
             * @instance
             */
            SdeSdePerfCalcCrtcFtraceEvent.prototype.bwCtlLlcc = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SdeSdePerfCalcCrtcFtraceEvent bwCtlMnoc.
             * @member {number} bwCtlMnoc
             * @memberof perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent
             * @instance
             */
            SdeSdePerfCalcCrtcFtraceEvent.prototype.bwCtlMnoc = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SdeSdePerfCalcCrtcFtraceEvent coreClkRate.
             * @member {number} coreClkRate
             * @memberof perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent
             * @instance
             */
            SdeSdePerfCalcCrtcFtraceEvent.prototype.coreClkRate = 0;

            /**
             * SdeSdePerfCalcCrtcFtraceEvent crtc.
             * @member {number} crtc
             * @memberof perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent
             * @instance
             */
            SdeSdePerfCalcCrtcFtraceEvent.prototype.crtc = 0;

            /**
             * SdeSdePerfCalcCrtcFtraceEvent ibEbi.
             * @member {number} ibEbi
             * @memberof perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent
             * @instance
             */
            SdeSdePerfCalcCrtcFtraceEvent.prototype.ibEbi = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SdeSdePerfCalcCrtcFtraceEvent ibLlcc.
             * @member {number} ibLlcc
             * @memberof perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent
             * @instance
             */
            SdeSdePerfCalcCrtcFtraceEvent.prototype.ibLlcc = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SdeSdePerfCalcCrtcFtraceEvent ibMnoc.
             * @member {number} ibMnoc
             * @memberof perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent
             * @instance
             */
            SdeSdePerfCalcCrtcFtraceEvent.prototype.ibMnoc = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new SdeSdePerfCalcCrtcFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent
             * @static
             * @param {perfetto.protos.ISdeSdePerfCalcCrtcFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent} SdeSdePerfCalcCrtcFtraceEvent instance
             */
            SdeSdePerfCalcCrtcFtraceEvent.create = function create(properties) {
                return new SdeSdePerfCalcCrtcFtraceEvent(properties);
            };

            /**
             * Encodes the specified SdeSdePerfCalcCrtcFtraceEvent message. Does not implicitly {@link perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent
             * @static
             * @param {perfetto.protos.ISdeSdePerfCalcCrtcFtraceEvent} m SdeSdePerfCalcCrtcFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SdeSdePerfCalcCrtcFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.bwCtlEbi != null && Object.hasOwnProperty.call(m, "bwCtlEbi"))
                    w.uint32(8).uint64(m.bwCtlEbi);
                if (m.bwCtlLlcc != null && Object.hasOwnProperty.call(m, "bwCtlLlcc"))
                    w.uint32(16).uint64(m.bwCtlLlcc);
                if (m.bwCtlMnoc != null && Object.hasOwnProperty.call(m, "bwCtlMnoc"))
                    w.uint32(24).uint64(m.bwCtlMnoc);
                if (m.coreClkRate != null && Object.hasOwnProperty.call(m, "coreClkRate"))
                    w.uint32(32).uint32(m.coreClkRate);
                if (m.crtc != null && Object.hasOwnProperty.call(m, "crtc"))
                    w.uint32(40).uint32(m.crtc);
                if (m.ibEbi != null && Object.hasOwnProperty.call(m, "ibEbi"))
                    w.uint32(48).uint64(m.ibEbi);
                if (m.ibLlcc != null && Object.hasOwnProperty.call(m, "ibLlcc"))
                    w.uint32(56).uint64(m.ibLlcc);
                if (m.ibMnoc != null && Object.hasOwnProperty.call(m, "ibMnoc"))
                    w.uint32(64).uint64(m.ibMnoc);
                return w;
            };

            /**
             * Encodes the specified SdeSdePerfCalcCrtcFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent
             * @static
             * @param {perfetto.protos.ISdeSdePerfCalcCrtcFtraceEvent} message SdeSdePerfCalcCrtcFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SdeSdePerfCalcCrtcFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SdeSdePerfCalcCrtcFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent} SdeSdePerfCalcCrtcFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SdeSdePerfCalcCrtcFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.bwCtlEbi = r.uint64();
                        break;
                    case 2:
                        m.bwCtlLlcc = r.uint64();
                        break;
                    case 3:
                        m.bwCtlMnoc = r.uint64();
                        break;
                    case 4:
                        m.coreClkRate = r.uint32();
                        break;
                    case 5:
                        m.crtc = r.uint32();
                        break;
                    case 6:
                        m.ibEbi = r.uint64();
                        break;
                    case 7:
                        m.ibLlcc = r.uint64();
                        break;
                    case 8:
                        m.ibMnoc = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SdeSdePerfCalcCrtcFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent} SdeSdePerfCalcCrtcFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SdeSdePerfCalcCrtcFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SdeSdePerfCalcCrtcFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SdeSdePerfCalcCrtcFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.bwCtlEbi != null && m.hasOwnProperty("bwCtlEbi")) {
                    if (!$util.isInteger(m.bwCtlEbi) && !(m.bwCtlEbi && $util.isInteger(m.bwCtlEbi.low) && $util.isInteger(m.bwCtlEbi.high)))
                        return "bwCtlEbi: integer|Long expected";
                }
                if (m.bwCtlLlcc != null && m.hasOwnProperty("bwCtlLlcc")) {
                    if (!$util.isInteger(m.bwCtlLlcc) && !(m.bwCtlLlcc && $util.isInteger(m.bwCtlLlcc.low) && $util.isInteger(m.bwCtlLlcc.high)))
                        return "bwCtlLlcc: integer|Long expected";
                }
                if (m.bwCtlMnoc != null && m.hasOwnProperty("bwCtlMnoc")) {
                    if (!$util.isInteger(m.bwCtlMnoc) && !(m.bwCtlMnoc && $util.isInteger(m.bwCtlMnoc.low) && $util.isInteger(m.bwCtlMnoc.high)))
                        return "bwCtlMnoc: integer|Long expected";
                }
                if (m.coreClkRate != null && m.hasOwnProperty("coreClkRate")) {
                    if (!$util.isInteger(m.coreClkRate))
                        return "coreClkRate: integer expected";
                }
                if (m.crtc != null && m.hasOwnProperty("crtc")) {
                    if (!$util.isInteger(m.crtc))
                        return "crtc: integer expected";
                }
                if (m.ibEbi != null && m.hasOwnProperty("ibEbi")) {
                    if (!$util.isInteger(m.ibEbi) && !(m.ibEbi && $util.isInteger(m.ibEbi.low) && $util.isInteger(m.ibEbi.high)))
                        return "ibEbi: integer|Long expected";
                }
                if (m.ibLlcc != null && m.hasOwnProperty("ibLlcc")) {
                    if (!$util.isInteger(m.ibLlcc) && !(m.ibLlcc && $util.isInteger(m.ibLlcc.low) && $util.isInteger(m.ibLlcc.high)))
                        return "ibLlcc: integer|Long expected";
                }
                if (m.ibMnoc != null && m.hasOwnProperty("ibMnoc")) {
                    if (!$util.isInteger(m.ibMnoc) && !(m.ibMnoc && $util.isInteger(m.ibMnoc.low) && $util.isInteger(m.ibMnoc.high)))
                        return "ibMnoc: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a SdeSdePerfCalcCrtcFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent} SdeSdePerfCalcCrtcFtraceEvent
             */
            SdeSdePerfCalcCrtcFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent();
                if (d.bwCtlEbi != null) {
                    if ($util.Long)
                        (m.bwCtlEbi = $util.Long.fromValue(d.bwCtlEbi)).unsigned = true;
                    else if (typeof d.bwCtlEbi === "string")
                        m.bwCtlEbi = parseInt(d.bwCtlEbi, 10);
                    else if (typeof d.bwCtlEbi === "number")
                        m.bwCtlEbi = d.bwCtlEbi;
                    else if (typeof d.bwCtlEbi === "object")
                        m.bwCtlEbi = new $util.LongBits(d.bwCtlEbi.low >>> 0, d.bwCtlEbi.high >>> 0).toNumber(true);
                }
                if (d.bwCtlLlcc != null) {
                    if ($util.Long)
                        (m.bwCtlLlcc = $util.Long.fromValue(d.bwCtlLlcc)).unsigned = true;
                    else if (typeof d.bwCtlLlcc === "string")
                        m.bwCtlLlcc = parseInt(d.bwCtlLlcc, 10);
                    else if (typeof d.bwCtlLlcc === "number")
                        m.bwCtlLlcc = d.bwCtlLlcc;
                    else if (typeof d.bwCtlLlcc === "object")
                        m.bwCtlLlcc = new $util.LongBits(d.bwCtlLlcc.low >>> 0, d.bwCtlLlcc.high >>> 0).toNumber(true);
                }
                if (d.bwCtlMnoc != null) {
                    if ($util.Long)
                        (m.bwCtlMnoc = $util.Long.fromValue(d.bwCtlMnoc)).unsigned = true;
                    else if (typeof d.bwCtlMnoc === "string")
                        m.bwCtlMnoc = parseInt(d.bwCtlMnoc, 10);
                    else if (typeof d.bwCtlMnoc === "number")
                        m.bwCtlMnoc = d.bwCtlMnoc;
                    else if (typeof d.bwCtlMnoc === "object")
                        m.bwCtlMnoc = new $util.LongBits(d.bwCtlMnoc.low >>> 0, d.bwCtlMnoc.high >>> 0).toNumber(true);
                }
                if (d.coreClkRate != null) {
                    m.coreClkRate = d.coreClkRate >>> 0;
                }
                if (d.crtc != null) {
                    m.crtc = d.crtc >>> 0;
                }
                if (d.ibEbi != null) {
                    if ($util.Long)
                        (m.ibEbi = $util.Long.fromValue(d.ibEbi)).unsigned = true;
                    else if (typeof d.ibEbi === "string")
                        m.ibEbi = parseInt(d.ibEbi, 10);
                    else if (typeof d.ibEbi === "number")
                        m.ibEbi = d.ibEbi;
                    else if (typeof d.ibEbi === "object")
                        m.ibEbi = new $util.LongBits(d.ibEbi.low >>> 0, d.ibEbi.high >>> 0).toNumber(true);
                }
                if (d.ibLlcc != null) {
                    if ($util.Long)
                        (m.ibLlcc = $util.Long.fromValue(d.ibLlcc)).unsigned = true;
                    else if (typeof d.ibLlcc === "string")
                        m.ibLlcc = parseInt(d.ibLlcc, 10);
                    else if (typeof d.ibLlcc === "number")
                        m.ibLlcc = d.ibLlcc;
                    else if (typeof d.ibLlcc === "object")
                        m.ibLlcc = new $util.LongBits(d.ibLlcc.low >>> 0, d.ibLlcc.high >>> 0).toNumber(true);
                }
                if (d.ibMnoc != null) {
                    if ($util.Long)
                        (m.ibMnoc = $util.Long.fromValue(d.ibMnoc)).unsigned = true;
                    else if (typeof d.ibMnoc === "string")
                        m.ibMnoc = parseInt(d.ibMnoc, 10);
                    else if (typeof d.ibMnoc === "number")
                        m.ibMnoc = d.ibMnoc;
                    else if (typeof d.ibMnoc === "object")
                        m.ibMnoc = new $util.LongBits(d.ibMnoc.low >>> 0, d.ibMnoc.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a SdeSdePerfCalcCrtcFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent
             * @static
             * @param {perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent} m SdeSdePerfCalcCrtcFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SdeSdePerfCalcCrtcFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.bwCtlEbi = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.bwCtlEbi = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.bwCtlLlcc = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.bwCtlLlcc = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.bwCtlMnoc = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.bwCtlMnoc = o.longs === String ? "0" : 0;
                    d.coreClkRate = 0;
                    d.crtc = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ibEbi = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ibEbi = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ibLlcc = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ibLlcc = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ibMnoc = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ibMnoc = o.longs === String ? "0" : 0;
                }
                if (m.bwCtlEbi != null && m.hasOwnProperty("bwCtlEbi")) {
                    if (typeof m.bwCtlEbi === "number")
                        d.bwCtlEbi = o.longs === String ? String(m.bwCtlEbi) : m.bwCtlEbi;
                    else
                        d.bwCtlEbi = o.longs === String ? $util.Long.prototype.toString.call(m.bwCtlEbi) : o.longs === Number ? new $util.LongBits(m.bwCtlEbi.low >>> 0, m.bwCtlEbi.high >>> 0).toNumber(true) : m.bwCtlEbi;
                }
                if (m.bwCtlLlcc != null && m.hasOwnProperty("bwCtlLlcc")) {
                    if (typeof m.bwCtlLlcc === "number")
                        d.bwCtlLlcc = o.longs === String ? String(m.bwCtlLlcc) : m.bwCtlLlcc;
                    else
                        d.bwCtlLlcc = o.longs === String ? $util.Long.prototype.toString.call(m.bwCtlLlcc) : o.longs === Number ? new $util.LongBits(m.bwCtlLlcc.low >>> 0, m.bwCtlLlcc.high >>> 0).toNumber(true) : m.bwCtlLlcc;
                }
                if (m.bwCtlMnoc != null && m.hasOwnProperty("bwCtlMnoc")) {
                    if (typeof m.bwCtlMnoc === "number")
                        d.bwCtlMnoc = o.longs === String ? String(m.bwCtlMnoc) : m.bwCtlMnoc;
                    else
                        d.bwCtlMnoc = o.longs === String ? $util.Long.prototype.toString.call(m.bwCtlMnoc) : o.longs === Number ? new $util.LongBits(m.bwCtlMnoc.low >>> 0, m.bwCtlMnoc.high >>> 0).toNumber(true) : m.bwCtlMnoc;
                }
                if (m.coreClkRate != null && m.hasOwnProperty("coreClkRate")) {
                    d.coreClkRate = m.coreClkRate;
                }
                if (m.crtc != null && m.hasOwnProperty("crtc")) {
                    d.crtc = m.crtc;
                }
                if (m.ibEbi != null && m.hasOwnProperty("ibEbi")) {
                    if (typeof m.ibEbi === "number")
                        d.ibEbi = o.longs === String ? String(m.ibEbi) : m.ibEbi;
                    else
                        d.ibEbi = o.longs === String ? $util.Long.prototype.toString.call(m.ibEbi) : o.longs === Number ? new $util.LongBits(m.ibEbi.low >>> 0, m.ibEbi.high >>> 0).toNumber(true) : m.ibEbi;
                }
                if (m.ibLlcc != null && m.hasOwnProperty("ibLlcc")) {
                    if (typeof m.ibLlcc === "number")
                        d.ibLlcc = o.longs === String ? String(m.ibLlcc) : m.ibLlcc;
                    else
                        d.ibLlcc = o.longs === String ? $util.Long.prototype.toString.call(m.ibLlcc) : o.longs === Number ? new $util.LongBits(m.ibLlcc.low >>> 0, m.ibLlcc.high >>> 0).toNumber(true) : m.ibLlcc;
                }
                if (m.ibMnoc != null && m.hasOwnProperty("ibMnoc")) {
                    if (typeof m.ibMnoc === "number")
                        d.ibMnoc = o.longs === String ? String(m.ibMnoc) : m.ibMnoc;
                    else
                        d.ibMnoc = o.longs === String ? $util.Long.prototype.toString.call(m.ibMnoc) : o.longs === Number ? new $util.LongBits(m.ibMnoc.low >>> 0, m.ibMnoc.high >>> 0).toNumber(true) : m.ibMnoc;
                }
                return d;
            };

            /**
             * Converts this SdeSdePerfCalcCrtcFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SdeSdePerfCalcCrtcFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SdeSdePerfCalcCrtcFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SdeSdePerfCalcCrtcFtraceEvent;
        })();

        protos.SdeSdePerfCrtcUpdateFtraceEvent = (function() {

            /**
             * Properties of a SdeSdePerfCrtcUpdateFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISdeSdePerfCrtcUpdateFtraceEvent
             * @property {number|null} [bwCtlEbi] SdeSdePerfCrtcUpdateFtraceEvent bwCtlEbi
             * @property {number|null} [bwCtlLlcc] SdeSdePerfCrtcUpdateFtraceEvent bwCtlLlcc
             * @property {number|null} [bwCtlMnoc] SdeSdePerfCrtcUpdateFtraceEvent bwCtlMnoc
             * @property {number|null} [coreClkRate] SdeSdePerfCrtcUpdateFtraceEvent coreClkRate
             * @property {number|null} [crtc] SdeSdePerfCrtcUpdateFtraceEvent crtc
             * @property {number|null} [params] SdeSdePerfCrtcUpdateFtraceEvent params
             * @property {number|null} [perPipeIbEbi] SdeSdePerfCrtcUpdateFtraceEvent perPipeIbEbi
             * @property {number|null} [perPipeIbLlcc] SdeSdePerfCrtcUpdateFtraceEvent perPipeIbLlcc
             * @property {number|null} [perPipeIbMnoc] SdeSdePerfCrtcUpdateFtraceEvent perPipeIbMnoc
             * @property {number|null} [stopReq] SdeSdePerfCrtcUpdateFtraceEvent stopReq
             * @property {number|null} [updateBus] SdeSdePerfCrtcUpdateFtraceEvent updateBus
             * @property {number|null} [updateClk] SdeSdePerfCrtcUpdateFtraceEvent updateClk
             */

            /**
             * Constructs a new SdeSdePerfCrtcUpdateFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SdeSdePerfCrtcUpdateFtraceEvent.
             * @implements ISdeSdePerfCrtcUpdateFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISdeSdePerfCrtcUpdateFtraceEvent=} [p] Properties to set
             */
            function SdeSdePerfCrtcUpdateFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SdeSdePerfCrtcUpdateFtraceEvent bwCtlEbi.
             * @member {number} bwCtlEbi
             * @memberof perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent
             * @instance
             */
            SdeSdePerfCrtcUpdateFtraceEvent.prototype.bwCtlEbi = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SdeSdePerfCrtcUpdateFtraceEvent bwCtlLlcc.
             * @member {number} bwCtlLlcc
             * @memberof perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent
             * @instance
             */
            SdeSdePerfCrtcUpdateFtraceEvent.prototype.bwCtlLlcc = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SdeSdePerfCrtcUpdateFtraceEvent bwCtlMnoc.
             * @member {number} bwCtlMnoc
             * @memberof perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent
             * @instance
             */
            SdeSdePerfCrtcUpdateFtraceEvent.prototype.bwCtlMnoc = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SdeSdePerfCrtcUpdateFtraceEvent coreClkRate.
             * @member {number} coreClkRate
             * @memberof perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent
             * @instance
             */
            SdeSdePerfCrtcUpdateFtraceEvent.prototype.coreClkRate = 0;

            /**
             * SdeSdePerfCrtcUpdateFtraceEvent crtc.
             * @member {number} crtc
             * @memberof perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent
             * @instance
             */
            SdeSdePerfCrtcUpdateFtraceEvent.prototype.crtc = 0;

            /**
             * SdeSdePerfCrtcUpdateFtraceEvent params.
             * @member {number} params
             * @memberof perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent
             * @instance
             */
            SdeSdePerfCrtcUpdateFtraceEvent.prototype.params = 0;

            /**
             * SdeSdePerfCrtcUpdateFtraceEvent perPipeIbEbi.
             * @member {number} perPipeIbEbi
             * @memberof perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent
             * @instance
             */
            SdeSdePerfCrtcUpdateFtraceEvent.prototype.perPipeIbEbi = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SdeSdePerfCrtcUpdateFtraceEvent perPipeIbLlcc.
             * @member {number} perPipeIbLlcc
             * @memberof perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent
             * @instance
             */
            SdeSdePerfCrtcUpdateFtraceEvent.prototype.perPipeIbLlcc = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SdeSdePerfCrtcUpdateFtraceEvent perPipeIbMnoc.
             * @member {number} perPipeIbMnoc
             * @memberof perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent
             * @instance
             */
            SdeSdePerfCrtcUpdateFtraceEvent.prototype.perPipeIbMnoc = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SdeSdePerfCrtcUpdateFtraceEvent stopReq.
             * @member {number} stopReq
             * @memberof perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent
             * @instance
             */
            SdeSdePerfCrtcUpdateFtraceEvent.prototype.stopReq = 0;

            /**
             * SdeSdePerfCrtcUpdateFtraceEvent updateBus.
             * @member {number} updateBus
             * @memberof perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent
             * @instance
             */
            SdeSdePerfCrtcUpdateFtraceEvent.prototype.updateBus = 0;

            /**
             * SdeSdePerfCrtcUpdateFtraceEvent updateClk.
             * @member {number} updateClk
             * @memberof perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent
             * @instance
             */
            SdeSdePerfCrtcUpdateFtraceEvent.prototype.updateClk = 0;

            /**
             * Creates a new SdeSdePerfCrtcUpdateFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent
             * @static
             * @param {perfetto.protos.ISdeSdePerfCrtcUpdateFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent} SdeSdePerfCrtcUpdateFtraceEvent instance
             */
            SdeSdePerfCrtcUpdateFtraceEvent.create = function create(properties) {
                return new SdeSdePerfCrtcUpdateFtraceEvent(properties);
            };

            /**
             * Encodes the specified SdeSdePerfCrtcUpdateFtraceEvent message. Does not implicitly {@link perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent
             * @static
             * @param {perfetto.protos.ISdeSdePerfCrtcUpdateFtraceEvent} m SdeSdePerfCrtcUpdateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SdeSdePerfCrtcUpdateFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.bwCtlEbi != null && Object.hasOwnProperty.call(m, "bwCtlEbi"))
                    w.uint32(8).uint64(m.bwCtlEbi);
                if (m.bwCtlLlcc != null && Object.hasOwnProperty.call(m, "bwCtlLlcc"))
                    w.uint32(16).uint64(m.bwCtlLlcc);
                if (m.bwCtlMnoc != null && Object.hasOwnProperty.call(m, "bwCtlMnoc"))
                    w.uint32(24).uint64(m.bwCtlMnoc);
                if (m.coreClkRate != null && Object.hasOwnProperty.call(m, "coreClkRate"))
                    w.uint32(32).uint32(m.coreClkRate);
                if (m.crtc != null && Object.hasOwnProperty.call(m, "crtc"))
                    w.uint32(40).uint32(m.crtc);
                if (m.params != null && Object.hasOwnProperty.call(m, "params"))
                    w.uint32(48).int32(m.params);
                if (m.perPipeIbEbi != null && Object.hasOwnProperty.call(m, "perPipeIbEbi"))
                    w.uint32(56).uint64(m.perPipeIbEbi);
                if (m.perPipeIbLlcc != null && Object.hasOwnProperty.call(m, "perPipeIbLlcc"))
                    w.uint32(64).uint64(m.perPipeIbLlcc);
                if (m.perPipeIbMnoc != null && Object.hasOwnProperty.call(m, "perPipeIbMnoc"))
                    w.uint32(72).uint64(m.perPipeIbMnoc);
                if (m.stopReq != null && Object.hasOwnProperty.call(m, "stopReq"))
                    w.uint32(80).uint32(m.stopReq);
                if (m.updateBus != null && Object.hasOwnProperty.call(m, "updateBus"))
                    w.uint32(88).uint32(m.updateBus);
                if (m.updateClk != null && Object.hasOwnProperty.call(m, "updateClk"))
                    w.uint32(96).uint32(m.updateClk);
                return w;
            };

            /**
             * Encodes the specified SdeSdePerfCrtcUpdateFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent
             * @static
             * @param {perfetto.protos.ISdeSdePerfCrtcUpdateFtraceEvent} message SdeSdePerfCrtcUpdateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SdeSdePerfCrtcUpdateFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SdeSdePerfCrtcUpdateFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent} SdeSdePerfCrtcUpdateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SdeSdePerfCrtcUpdateFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.bwCtlEbi = r.uint64();
                        break;
                    case 2:
                        m.bwCtlLlcc = r.uint64();
                        break;
                    case 3:
                        m.bwCtlMnoc = r.uint64();
                        break;
                    case 4:
                        m.coreClkRate = r.uint32();
                        break;
                    case 5:
                        m.crtc = r.uint32();
                        break;
                    case 6:
                        m.params = r.int32();
                        break;
                    case 7:
                        m.perPipeIbEbi = r.uint64();
                        break;
                    case 8:
                        m.perPipeIbLlcc = r.uint64();
                        break;
                    case 9:
                        m.perPipeIbMnoc = r.uint64();
                        break;
                    case 10:
                        m.stopReq = r.uint32();
                        break;
                    case 11:
                        m.updateBus = r.uint32();
                        break;
                    case 12:
                        m.updateClk = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SdeSdePerfCrtcUpdateFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent} SdeSdePerfCrtcUpdateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SdeSdePerfCrtcUpdateFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SdeSdePerfCrtcUpdateFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SdeSdePerfCrtcUpdateFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.bwCtlEbi != null && m.hasOwnProperty("bwCtlEbi")) {
                    if (!$util.isInteger(m.bwCtlEbi) && !(m.bwCtlEbi && $util.isInteger(m.bwCtlEbi.low) && $util.isInteger(m.bwCtlEbi.high)))
                        return "bwCtlEbi: integer|Long expected";
                }
                if (m.bwCtlLlcc != null && m.hasOwnProperty("bwCtlLlcc")) {
                    if (!$util.isInteger(m.bwCtlLlcc) && !(m.bwCtlLlcc && $util.isInteger(m.bwCtlLlcc.low) && $util.isInteger(m.bwCtlLlcc.high)))
                        return "bwCtlLlcc: integer|Long expected";
                }
                if (m.bwCtlMnoc != null && m.hasOwnProperty("bwCtlMnoc")) {
                    if (!$util.isInteger(m.bwCtlMnoc) && !(m.bwCtlMnoc && $util.isInteger(m.bwCtlMnoc.low) && $util.isInteger(m.bwCtlMnoc.high)))
                        return "bwCtlMnoc: integer|Long expected";
                }
                if (m.coreClkRate != null && m.hasOwnProperty("coreClkRate")) {
                    if (!$util.isInteger(m.coreClkRate))
                        return "coreClkRate: integer expected";
                }
                if (m.crtc != null && m.hasOwnProperty("crtc")) {
                    if (!$util.isInteger(m.crtc))
                        return "crtc: integer expected";
                }
                if (m.params != null && m.hasOwnProperty("params")) {
                    if (!$util.isInteger(m.params))
                        return "params: integer expected";
                }
                if (m.perPipeIbEbi != null && m.hasOwnProperty("perPipeIbEbi")) {
                    if (!$util.isInteger(m.perPipeIbEbi) && !(m.perPipeIbEbi && $util.isInteger(m.perPipeIbEbi.low) && $util.isInteger(m.perPipeIbEbi.high)))
                        return "perPipeIbEbi: integer|Long expected";
                }
                if (m.perPipeIbLlcc != null && m.hasOwnProperty("perPipeIbLlcc")) {
                    if (!$util.isInteger(m.perPipeIbLlcc) && !(m.perPipeIbLlcc && $util.isInteger(m.perPipeIbLlcc.low) && $util.isInteger(m.perPipeIbLlcc.high)))
                        return "perPipeIbLlcc: integer|Long expected";
                }
                if (m.perPipeIbMnoc != null && m.hasOwnProperty("perPipeIbMnoc")) {
                    if (!$util.isInteger(m.perPipeIbMnoc) && !(m.perPipeIbMnoc && $util.isInteger(m.perPipeIbMnoc.low) && $util.isInteger(m.perPipeIbMnoc.high)))
                        return "perPipeIbMnoc: integer|Long expected";
                }
                if (m.stopReq != null && m.hasOwnProperty("stopReq")) {
                    if (!$util.isInteger(m.stopReq))
                        return "stopReq: integer expected";
                }
                if (m.updateBus != null && m.hasOwnProperty("updateBus")) {
                    if (!$util.isInteger(m.updateBus))
                        return "updateBus: integer expected";
                }
                if (m.updateClk != null && m.hasOwnProperty("updateClk")) {
                    if (!$util.isInteger(m.updateClk))
                        return "updateClk: integer expected";
                }
                return null;
            };

            /**
             * Creates a SdeSdePerfCrtcUpdateFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent} SdeSdePerfCrtcUpdateFtraceEvent
             */
            SdeSdePerfCrtcUpdateFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent();
                if (d.bwCtlEbi != null) {
                    if ($util.Long)
                        (m.bwCtlEbi = $util.Long.fromValue(d.bwCtlEbi)).unsigned = true;
                    else if (typeof d.bwCtlEbi === "string")
                        m.bwCtlEbi = parseInt(d.bwCtlEbi, 10);
                    else if (typeof d.bwCtlEbi === "number")
                        m.bwCtlEbi = d.bwCtlEbi;
                    else if (typeof d.bwCtlEbi === "object")
                        m.bwCtlEbi = new $util.LongBits(d.bwCtlEbi.low >>> 0, d.bwCtlEbi.high >>> 0).toNumber(true);
                }
                if (d.bwCtlLlcc != null) {
                    if ($util.Long)
                        (m.bwCtlLlcc = $util.Long.fromValue(d.bwCtlLlcc)).unsigned = true;
                    else if (typeof d.bwCtlLlcc === "string")
                        m.bwCtlLlcc = parseInt(d.bwCtlLlcc, 10);
                    else if (typeof d.bwCtlLlcc === "number")
                        m.bwCtlLlcc = d.bwCtlLlcc;
                    else if (typeof d.bwCtlLlcc === "object")
                        m.bwCtlLlcc = new $util.LongBits(d.bwCtlLlcc.low >>> 0, d.bwCtlLlcc.high >>> 0).toNumber(true);
                }
                if (d.bwCtlMnoc != null) {
                    if ($util.Long)
                        (m.bwCtlMnoc = $util.Long.fromValue(d.bwCtlMnoc)).unsigned = true;
                    else if (typeof d.bwCtlMnoc === "string")
                        m.bwCtlMnoc = parseInt(d.bwCtlMnoc, 10);
                    else if (typeof d.bwCtlMnoc === "number")
                        m.bwCtlMnoc = d.bwCtlMnoc;
                    else if (typeof d.bwCtlMnoc === "object")
                        m.bwCtlMnoc = new $util.LongBits(d.bwCtlMnoc.low >>> 0, d.bwCtlMnoc.high >>> 0).toNumber(true);
                }
                if (d.coreClkRate != null) {
                    m.coreClkRate = d.coreClkRate >>> 0;
                }
                if (d.crtc != null) {
                    m.crtc = d.crtc >>> 0;
                }
                if (d.params != null) {
                    m.params = d.params | 0;
                }
                if (d.perPipeIbEbi != null) {
                    if ($util.Long)
                        (m.perPipeIbEbi = $util.Long.fromValue(d.perPipeIbEbi)).unsigned = true;
                    else if (typeof d.perPipeIbEbi === "string")
                        m.perPipeIbEbi = parseInt(d.perPipeIbEbi, 10);
                    else if (typeof d.perPipeIbEbi === "number")
                        m.perPipeIbEbi = d.perPipeIbEbi;
                    else if (typeof d.perPipeIbEbi === "object")
                        m.perPipeIbEbi = new $util.LongBits(d.perPipeIbEbi.low >>> 0, d.perPipeIbEbi.high >>> 0).toNumber(true);
                }
                if (d.perPipeIbLlcc != null) {
                    if ($util.Long)
                        (m.perPipeIbLlcc = $util.Long.fromValue(d.perPipeIbLlcc)).unsigned = true;
                    else if (typeof d.perPipeIbLlcc === "string")
                        m.perPipeIbLlcc = parseInt(d.perPipeIbLlcc, 10);
                    else if (typeof d.perPipeIbLlcc === "number")
                        m.perPipeIbLlcc = d.perPipeIbLlcc;
                    else if (typeof d.perPipeIbLlcc === "object")
                        m.perPipeIbLlcc = new $util.LongBits(d.perPipeIbLlcc.low >>> 0, d.perPipeIbLlcc.high >>> 0).toNumber(true);
                }
                if (d.perPipeIbMnoc != null) {
                    if ($util.Long)
                        (m.perPipeIbMnoc = $util.Long.fromValue(d.perPipeIbMnoc)).unsigned = true;
                    else if (typeof d.perPipeIbMnoc === "string")
                        m.perPipeIbMnoc = parseInt(d.perPipeIbMnoc, 10);
                    else if (typeof d.perPipeIbMnoc === "number")
                        m.perPipeIbMnoc = d.perPipeIbMnoc;
                    else if (typeof d.perPipeIbMnoc === "object")
                        m.perPipeIbMnoc = new $util.LongBits(d.perPipeIbMnoc.low >>> 0, d.perPipeIbMnoc.high >>> 0).toNumber(true);
                }
                if (d.stopReq != null) {
                    m.stopReq = d.stopReq >>> 0;
                }
                if (d.updateBus != null) {
                    m.updateBus = d.updateBus >>> 0;
                }
                if (d.updateClk != null) {
                    m.updateClk = d.updateClk >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SdeSdePerfCrtcUpdateFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent
             * @static
             * @param {perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent} m SdeSdePerfCrtcUpdateFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SdeSdePerfCrtcUpdateFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.bwCtlEbi = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.bwCtlEbi = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.bwCtlLlcc = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.bwCtlLlcc = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.bwCtlMnoc = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.bwCtlMnoc = o.longs === String ? "0" : 0;
                    d.coreClkRate = 0;
                    d.crtc = 0;
                    d.params = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.perPipeIbEbi = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.perPipeIbEbi = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.perPipeIbLlcc = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.perPipeIbLlcc = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.perPipeIbMnoc = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.perPipeIbMnoc = o.longs === String ? "0" : 0;
                    d.stopReq = 0;
                    d.updateBus = 0;
                    d.updateClk = 0;
                }
                if (m.bwCtlEbi != null && m.hasOwnProperty("bwCtlEbi")) {
                    if (typeof m.bwCtlEbi === "number")
                        d.bwCtlEbi = o.longs === String ? String(m.bwCtlEbi) : m.bwCtlEbi;
                    else
                        d.bwCtlEbi = o.longs === String ? $util.Long.prototype.toString.call(m.bwCtlEbi) : o.longs === Number ? new $util.LongBits(m.bwCtlEbi.low >>> 0, m.bwCtlEbi.high >>> 0).toNumber(true) : m.bwCtlEbi;
                }
                if (m.bwCtlLlcc != null && m.hasOwnProperty("bwCtlLlcc")) {
                    if (typeof m.bwCtlLlcc === "number")
                        d.bwCtlLlcc = o.longs === String ? String(m.bwCtlLlcc) : m.bwCtlLlcc;
                    else
                        d.bwCtlLlcc = o.longs === String ? $util.Long.prototype.toString.call(m.bwCtlLlcc) : o.longs === Number ? new $util.LongBits(m.bwCtlLlcc.low >>> 0, m.bwCtlLlcc.high >>> 0).toNumber(true) : m.bwCtlLlcc;
                }
                if (m.bwCtlMnoc != null && m.hasOwnProperty("bwCtlMnoc")) {
                    if (typeof m.bwCtlMnoc === "number")
                        d.bwCtlMnoc = o.longs === String ? String(m.bwCtlMnoc) : m.bwCtlMnoc;
                    else
                        d.bwCtlMnoc = o.longs === String ? $util.Long.prototype.toString.call(m.bwCtlMnoc) : o.longs === Number ? new $util.LongBits(m.bwCtlMnoc.low >>> 0, m.bwCtlMnoc.high >>> 0).toNumber(true) : m.bwCtlMnoc;
                }
                if (m.coreClkRate != null && m.hasOwnProperty("coreClkRate")) {
                    d.coreClkRate = m.coreClkRate;
                }
                if (m.crtc != null && m.hasOwnProperty("crtc")) {
                    d.crtc = m.crtc;
                }
                if (m.params != null && m.hasOwnProperty("params")) {
                    d.params = m.params;
                }
                if (m.perPipeIbEbi != null && m.hasOwnProperty("perPipeIbEbi")) {
                    if (typeof m.perPipeIbEbi === "number")
                        d.perPipeIbEbi = o.longs === String ? String(m.perPipeIbEbi) : m.perPipeIbEbi;
                    else
                        d.perPipeIbEbi = o.longs === String ? $util.Long.prototype.toString.call(m.perPipeIbEbi) : o.longs === Number ? new $util.LongBits(m.perPipeIbEbi.low >>> 0, m.perPipeIbEbi.high >>> 0).toNumber(true) : m.perPipeIbEbi;
                }
                if (m.perPipeIbLlcc != null && m.hasOwnProperty("perPipeIbLlcc")) {
                    if (typeof m.perPipeIbLlcc === "number")
                        d.perPipeIbLlcc = o.longs === String ? String(m.perPipeIbLlcc) : m.perPipeIbLlcc;
                    else
                        d.perPipeIbLlcc = o.longs === String ? $util.Long.prototype.toString.call(m.perPipeIbLlcc) : o.longs === Number ? new $util.LongBits(m.perPipeIbLlcc.low >>> 0, m.perPipeIbLlcc.high >>> 0).toNumber(true) : m.perPipeIbLlcc;
                }
                if (m.perPipeIbMnoc != null && m.hasOwnProperty("perPipeIbMnoc")) {
                    if (typeof m.perPipeIbMnoc === "number")
                        d.perPipeIbMnoc = o.longs === String ? String(m.perPipeIbMnoc) : m.perPipeIbMnoc;
                    else
                        d.perPipeIbMnoc = o.longs === String ? $util.Long.prototype.toString.call(m.perPipeIbMnoc) : o.longs === Number ? new $util.LongBits(m.perPipeIbMnoc.low >>> 0, m.perPipeIbMnoc.high >>> 0).toNumber(true) : m.perPipeIbMnoc;
                }
                if (m.stopReq != null && m.hasOwnProperty("stopReq")) {
                    d.stopReq = m.stopReq;
                }
                if (m.updateBus != null && m.hasOwnProperty("updateBus")) {
                    d.updateBus = m.updateBus;
                }
                if (m.updateClk != null && m.hasOwnProperty("updateClk")) {
                    d.updateClk = m.updateClk;
                }
                return d;
            };

            /**
             * Converts this SdeSdePerfCrtcUpdateFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SdeSdePerfCrtcUpdateFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SdeSdePerfCrtcUpdateFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SdeSdePerfCrtcUpdateFtraceEvent;
        })();

        protos.SdeSdePerfSetQosLutsFtraceEvent = (function() {

            /**
             * Properties of a SdeSdePerfSetQosLutsFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISdeSdePerfSetQosLutsFtraceEvent
             * @property {number|null} [fl] SdeSdePerfSetQosLutsFtraceEvent fl
             * @property {number|null} [fmt] SdeSdePerfSetQosLutsFtraceEvent fmt
             * @property {number|null} [lut] SdeSdePerfSetQosLutsFtraceEvent lut
             * @property {number|null} [lutUsage] SdeSdePerfSetQosLutsFtraceEvent lutUsage
             * @property {number|null} [pnum] SdeSdePerfSetQosLutsFtraceEvent pnum
             * @property {number|null} [rt] SdeSdePerfSetQosLutsFtraceEvent rt
             */

            /**
             * Constructs a new SdeSdePerfSetQosLutsFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SdeSdePerfSetQosLutsFtraceEvent.
             * @implements ISdeSdePerfSetQosLutsFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISdeSdePerfSetQosLutsFtraceEvent=} [p] Properties to set
             */
            function SdeSdePerfSetQosLutsFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SdeSdePerfSetQosLutsFtraceEvent fl.
             * @member {number} fl
             * @memberof perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent
             * @instance
             */
            SdeSdePerfSetQosLutsFtraceEvent.prototype.fl = 0;

            /**
             * SdeSdePerfSetQosLutsFtraceEvent fmt.
             * @member {number} fmt
             * @memberof perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent
             * @instance
             */
            SdeSdePerfSetQosLutsFtraceEvent.prototype.fmt = 0;

            /**
             * SdeSdePerfSetQosLutsFtraceEvent lut.
             * @member {number} lut
             * @memberof perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent
             * @instance
             */
            SdeSdePerfSetQosLutsFtraceEvent.prototype.lut = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SdeSdePerfSetQosLutsFtraceEvent lutUsage.
             * @member {number} lutUsage
             * @memberof perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent
             * @instance
             */
            SdeSdePerfSetQosLutsFtraceEvent.prototype.lutUsage = 0;

            /**
             * SdeSdePerfSetQosLutsFtraceEvent pnum.
             * @member {number} pnum
             * @memberof perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent
             * @instance
             */
            SdeSdePerfSetQosLutsFtraceEvent.prototype.pnum = 0;

            /**
             * SdeSdePerfSetQosLutsFtraceEvent rt.
             * @member {number} rt
             * @memberof perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent
             * @instance
             */
            SdeSdePerfSetQosLutsFtraceEvent.prototype.rt = 0;

            /**
             * Creates a new SdeSdePerfSetQosLutsFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent
             * @static
             * @param {perfetto.protos.ISdeSdePerfSetQosLutsFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent} SdeSdePerfSetQosLutsFtraceEvent instance
             */
            SdeSdePerfSetQosLutsFtraceEvent.create = function create(properties) {
                return new SdeSdePerfSetQosLutsFtraceEvent(properties);
            };

            /**
             * Encodes the specified SdeSdePerfSetQosLutsFtraceEvent message. Does not implicitly {@link perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent
             * @static
             * @param {perfetto.protos.ISdeSdePerfSetQosLutsFtraceEvent} m SdeSdePerfSetQosLutsFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SdeSdePerfSetQosLutsFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.fl != null && Object.hasOwnProperty.call(m, "fl"))
                    w.uint32(8).uint32(m.fl);
                if (m.fmt != null && Object.hasOwnProperty.call(m, "fmt"))
                    w.uint32(16).uint32(m.fmt);
                if (m.lut != null && Object.hasOwnProperty.call(m, "lut"))
                    w.uint32(24).uint64(m.lut);
                if (m.lutUsage != null && Object.hasOwnProperty.call(m, "lutUsage"))
                    w.uint32(32).uint32(m.lutUsage);
                if (m.pnum != null && Object.hasOwnProperty.call(m, "pnum"))
                    w.uint32(40).uint32(m.pnum);
                if (m.rt != null && Object.hasOwnProperty.call(m, "rt"))
                    w.uint32(48).uint32(m.rt);
                return w;
            };

            /**
             * Encodes the specified SdeSdePerfSetQosLutsFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent
             * @static
             * @param {perfetto.protos.ISdeSdePerfSetQosLutsFtraceEvent} message SdeSdePerfSetQosLutsFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SdeSdePerfSetQosLutsFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SdeSdePerfSetQosLutsFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent} SdeSdePerfSetQosLutsFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SdeSdePerfSetQosLutsFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.fl = r.uint32();
                        break;
                    case 2:
                        m.fmt = r.uint32();
                        break;
                    case 3:
                        m.lut = r.uint64();
                        break;
                    case 4:
                        m.lutUsage = r.uint32();
                        break;
                    case 5:
                        m.pnum = r.uint32();
                        break;
                    case 6:
                        m.rt = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SdeSdePerfSetQosLutsFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent} SdeSdePerfSetQosLutsFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SdeSdePerfSetQosLutsFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SdeSdePerfSetQosLutsFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SdeSdePerfSetQosLutsFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.fl != null && m.hasOwnProperty("fl")) {
                    if (!$util.isInteger(m.fl))
                        return "fl: integer expected";
                }
                if (m.fmt != null && m.hasOwnProperty("fmt")) {
                    if (!$util.isInteger(m.fmt))
                        return "fmt: integer expected";
                }
                if (m.lut != null && m.hasOwnProperty("lut")) {
                    if (!$util.isInteger(m.lut) && !(m.lut && $util.isInteger(m.lut.low) && $util.isInteger(m.lut.high)))
                        return "lut: integer|Long expected";
                }
                if (m.lutUsage != null && m.hasOwnProperty("lutUsage")) {
                    if (!$util.isInteger(m.lutUsage))
                        return "lutUsage: integer expected";
                }
                if (m.pnum != null && m.hasOwnProperty("pnum")) {
                    if (!$util.isInteger(m.pnum))
                        return "pnum: integer expected";
                }
                if (m.rt != null && m.hasOwnProperty("rt")) {
                    if (!$util.isInteger(m.rt))
                        return "rt: integer expected";
                }
                return null;
            };

            /**
             * Creates a SdeSdePerfSetQosLutsFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent} SdeSdePerfSetQosLutsFtraceEvent
             */
            SdeSdePerfSetQosLutsFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent();
                if (d.fl != null) {
                    m.fl = d.fl >>> 0;
                }
                if (d.fmt != null) {
                    m.fmt = d.fmt >>> 0;
                }
                if (d.lut != null) {
                    if ($util.Long)
                        (m.lut = $util.Long.fromValue(d.lut)).unsigned = true;
                    else if (typeof d.lut === "string")
                        m.lut = parseInt(d.lut, 10);
                    else if (typeof d.lut === "number")
                        m.lut = d.lut;
                    else if (typeof d.lut === "object")
                        m.lut = new $util.LongBits(d.lut.low >>> 0, d.lut.high >>> 0).toNumber(true);
                }
                if (d.lutUsage != null) {
                    m.lutUsage = d.lutUsage >>> 0;
                }
                if (d.pnum != null) {
                    m.pnum = d.pnum >>> 0;
                }
                if (d.rt != null) {
                    m.rt = d.rt >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SdeSdePerfSetQosLutsFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent
             * @static
             * @param {perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent} m SdeSdePerfSetQosLutsFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SdeSdePerfSetQosLutsFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.fl = 0;
                    d.fmt = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.lut = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.lut = o.longs === String ? "0" : 0;
                    d.lutUsage = 0;
                    d.pnum = 0;
                    d.rt = 0;
                }
                if (m.fl != null && m.hasOwnProperty("fl")) {
                    d.fl = m.fl;
                }
                if (m.fmt != null && m.hasOwnProperty("fmt")) {
                    d.fmt = m.fmt;
                }
                if (m.lut != null && m.hasOwnProperty("lut")) {
                    if (typeof m.lut === "number")
                        d.lut = o.longs === String ? String(m.lut) : m.lut;
                    else
                        d.lut = o.longs === String ? $util.Long.prototype.toString.call(m.lut) : o.longs === Number ? new $util.LongBits(m.lut.low >>> 0, m.lut.high >>> 0).toNumber(true) : m.lut;
                }
                if (m.lutUsage != null && m.hasOwnProperty("lutUsage")) {
                    d.lutUsage = m.lutUsage;
                }
                if (m.pnum != null && m.hasOwnProperty("pnum")) {
                    d.pnum = m.pnum;
                }
                if (m.rt != null && m.hasOwnProperty("rt")) {
                    d.rt = m.rt;
                }
                return d;
            };

            /**
             * Converts this SdeSdePerfSetQosLutsFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SdeSdePerfSetQosLutsFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SdeSdePerfSetQosLutsFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SdeSdePerfSetQosLutsFtraceEvent;
        })();

        protos.SdeSdePerfUpdateBusFtraceEvent = (function() {

            /**
             * Properties of a SdeSdePerfUpdateBusFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISdeSdePerfUpdateBusFtraceEvent
             * @property {number|null} [abQuota] SdeSdePerfUpdateBusFtraceEvent abQuota
             * @property {number|null} [busId] SdeSdePerfUpdateBusFtraceEvent busId
             * @property {number|null} [client] SdeSdePerfUpdateBusFtraceEvent client
             * @property {number|null} [ibQuota] SdeSdePerfUpdateBusFtraceEvent ibQuota
             */

            /**
             * Constructs a new SdeSdePerfUpdateBusFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SdeSdePerfUpdateBusFtraceEvent.
             * @implements ISdeSdePerfUpdateBusFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISdeSdePerfUpdateBusFtraceEvent=} [p] Properties to set
             */
            function SdeSdePerfUpdateBusFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SdeSdePerfUpdateBusFtraceEvent abQuota.
             * @member {number} abQuota
             * @memberof perfetto.protos.SdeSdePerfUpdateBusFtraceEvent
             * @instance
             */
            SdeSdePerfUpdateBusFtraceEvent.prototype.abQuota = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SdeSdePerfUpdateBusFtraceEvent busId.
             * @member {number} busId
             * @memberof perfetto.protos.SdeSdePerfUpdateBusFtraceEvent
             * @instance
             */
            SdeSdePerfUpdateBusFtraceEvent.prototype.busId = 0;

            /**
             * SdeSdePerfUpdateBusFtraceEvent client.
             * @member {number} client
             * @memberof perfetto.protos.SdeSdePerfUpdateBusFtraceEvent
             * @instance
             */
            SdeSdePerfUpdateBusFtraceEvent.prototype.client = 0;

            /**
             * SdeSdePerfUpdateBusFtraceEvent ibQuota.
             * @member {number} ibQuota
             * @memberof perfetto.protos.SdeSdePerfUpdateBusFtraceEvent
             * @instance
             */
            SdeSdePerfUpdateBusFtraceEvent.prototype.ibQuota = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new SdeSdePerfUpdateBusFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SdeSdePerfUpdateBusFtraceEvent
             * @static
             * @param {perfetto.protos.ISdeSdePerfUpdateBusFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SdeSdePerfUpdateBusFtraceEvent} SdeSdePerfUpdateBusFtraceEvent instance
             */
            SdeSdePerfUpdateBusFtraceEvent.create = function create(properties) {
                return new SdeSdePerfUpdateBusFtraceEvent(properties);
            };

            /**
             * Encodes the specified SdeSdePerfUpdateBusFtraceEvent message. Does not implicitly {@link perfetto.protos.SdeSdePerfUpdateBusFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SdeSdePerfUpdateBusFtraceEvent
             * @static
             * @param {perfetto.protos.ISdeSdePerfUpdateBusFtraceEvent} m SdeSdePerfUpdateBusFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SdeSdePerfUpdateBusFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.abQuota != null && Object.hasOwnProperty.call(m, "abQuota"))
                    w.uint32(8).uint64(m.abQuota);
                if (m.busId != null && Object.hasOwnProperty.call(m, "busId"))
                    w.uint32(16).uint32(m.busId);
                if (m.client != null && Object.hasOwnProperty.call(m, "client"))
                    w.uint32(24).int32(m.client);
                if (m.ibQuota != null && Object.hasOwnProperty.call(m, "ibQuota"))
                    w.uint32(32).uint64(m.ibQuota);
                return w;
            };

            /**
             * Encodes the specified SdeSdePerfUpdateBusFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SdeSdePerfUpdateBusFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SdeSdePerfUpdateBusFtraceEvent
             * @static
             * @param {perfetto.protos.ISdeSdePerfUpdateBusFtraceEvent} message SdeSdePerfUpdateBusFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SdeSdePerfUpdateBusFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SdeSdePerfUpdateBusFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SdeSdePerfUpdateBusFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SdeSdePerfUpdateBusFtraceEvent} SdeSdePerfUpdateBusFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SdeSdePerfUpdateBusFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SdeSdePerfUpdateBusFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.abQuota = r.uint64();
                        break;
                    case 2:
                        m.busId = r.uint32();
                        break;
                    case 3:
                        m.client = r.int32();
                        break;
                    case 4:
                        m.ibQuota = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SdeSdePerfUpdateBusFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SdeSdePerfUpdateBusFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SdeSdePerfUpdateBusFtraceEvent} SdeSdePerfUpdateBusFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SdeSdePerfUpdateBusFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SdeSdePerfUpdateBusFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SdeSdePerfUpdateBusFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SdeSdePerfUpdateBusFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.abQuota != null && m.hasOwnProperty("abQuota")) {
                    if (!$util.isInteger(m.abQuota) && !(m.abQuota && $util.isInteger(m.abQuota.low) && $util.isInteger(m.abQuota.high)))
                        return "abQuota: integer|Long expected";
                }
                if (m.busId != null && m.hasOwnProperty("busId")) {
                    if (!$util.isInteger(m.busId))
                        return "busId: integer expected";
                }
                if (m.client != null && m.hasOwnProperty("client")) {
                    if (!$util.isInteger(m.client))
                        return "client: integer expected";
                }
                if (m.ibQuota != null && m.hasOwnProperty("ibQuota")) {
                    if (!$util.isInteger(m.ibQuota) && !(m.ibQuota && $util.isInteger(m.ibQuota.low) && $util.isInteger(m.ibQuota.high)))
                        return "ibQuota: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a SdeSdePerfUpdateBusFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SdeSdePerfUpdateBusFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SdeSdePerfUpdateBusFtraceEvent} SdeSdePerfUpdateBusFtraceEvent
             */
            SdeSdePerfUpdateBusFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SdeSdePerfUpdateBusFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SdeSdePerfUpdateBusFtraceEvent();
                if (d.abQuota != null) {
                    if ($util.Long)
                        (m.abQuota = $util.Long.fromValue(d.abQuota)).unsigned = true;
                    else if (typeof d.abQuota === "string")
                        m.abQuota = parseInt(d.abQuota, 10);
                    else if (typeof d.abQuota === "number")
                        m.abQuota = d.abQuota;
                    else if (typeof d.abQuota === "object")
                        m.abQuota = new $util.LongBits(d.abQuota.low >>> 0, d.abQuota.high >>> 0).toNumber(true);
                }
                if (d.busId != null) {
                    m.busId = d.busId >>> 0;
                }
                if (d.client != null) {
                    m.client = d.client | 0;
                }
                if (d.ibQuota != null) {
                    if ($util.Long)
                        (m.ibQuota = $util.Long.fromValue(d.ibQuota)).unsigned = true;
                    else if (typeof d.ibQuota === "string")
                        m.ibQuota = parseInt(d.ibQuota, 10);
                    else if (typeof d.ibQuota === "number")
                        m.ibQuota = d.ibQuota;
                    else if (typeof d.ibQuota === "object")
                        m.ibQuota = new $util.LongBits(d.ibQuota.low >>> 0, d.ibQuota.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a SdeSdePerfUpdateBusFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SdeSdePerfUpdateBusFtraceEvent
             * @static
             * @param {perfetto.protos.SdeSdePerfUpdateBusFtraceEvent} m SdeSdePerfUpdateBusFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SdeSdePerfUpdateBusFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.abQuota = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.abQuota = o.longs === String ? "0" : 0;
                    d.busId = 0;
                    d.client = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ibQuota = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ibQuota = o.longs === String ? "0" : 0;
                }
                if (m.abQuota != null && m.hasOwnProperty("abQuota")) {
                    if (typeof m.abQuota === "number")
                        d.abQuota = o.longs === String ? String(m.abQuota) : m.abQuota;
                    else
                        d.abQuota = o.longs === String ? $util.Long.prototype.toString.call(m.abQuota) : o.longs === Number ? new $util.LongBits(m.abQuota.low >>> 0, m.abQuota.high >>> 0).toNumber(true) : m.abQuota;
                }
                if (m.busId != null && m.hasOwnProperty("busId")) {
                    d.busId = m.busId;
                }
                if (m.client != null && m.hasOwnProperty("client")) {
                    d.client = m.client;
                }
                if (m.ibQuota != null && m.hasOwnProperty("ibQuota")) {
                    if (typeof m.ibQuota === "number")
                        d.ibQuota = o.longs === String ? String(m.ibQuota) : m.ibQuota;
                    else
                        d.ibQuota = o.longs === String ? $util.Long.prototype.toString.call(m.ibQuota) : o.longs === Number ? new $util.LongBits(m.ibQuota.low >>> 0, m.ibQuota.high >>> 0).toNumber(true) : m.ibQuota;
                }
                return d;
            };

            /**
             * Converts this SdeSdePerfUpdateBusFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SdeSdePerfUpdateBusFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SdeSdePerfUpdateBusFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SdeSdePerfUpdateBusFtraceEvent;
        })();

        protos.SignalDeliverFtraceEvent = (function() {

            /**
             * Properties of a SignalDeliverFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISignalDeliverFtraceEvent
             * @property {number|null} [code] SignalDeliverFtraceEvent code
             * @property {number|null} [saFlags] SignalDeliverFtraceEvent saFlags
             * @property {number|null} [sig] SignalDeliverFtraceEvent sig
             */

            /**
             * Constructs a new SignalDeliverFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SignalDeliverFtraceEvent.
             * @implements ISignalDeliverFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISignalDeliverFtraceEvent=} [p] Properties to set
             */
            function SignalDeliverFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SignalDeliverFtraceEvent code.
             * @member {number} code
             * @memberof perfetto.protos.SignalDeliverFtraceEvent
             * @instance
             */
            SignalDeliverFtraceEvent.prototype.code = 0;

            /**
             * SignalDeliverFtraceEvent saFlags.
             * @member {number} saFlags
             * @memberof perfetto.protos.SignalDeliverFtraceEvent
             * @instance
             */
            SignalDeliverFtraceEvent.prototype.saFlags = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SignalDeliverFtraceEvent sig.
             * @member {number} sig
             * @memberof perfetto.protos.SignalDeliverFtraceEvent
             * @instance
             */
            SignalDeliverFtraceEvent.prototype.sig = 0;

            /**
             * Creates a new SignalDeliverFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SignalDeliverFtraceEvent
             * @static
             * @param {perfetto.protos.ISignalDeliverFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SignalDeliverFtraceEvent} SignalDeliverFtraceEvent instance
             */
            SignalDeliverFtraceEvent.create = function create(properties) {
                return new SignalDeliverFtraceEvent(properties);
            };

            /**
             * Encodes the specified SignalDeliverFtraceEvent message. Does not implicitly {@link perfetto.protos.SignalDeliverFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SignalDeliverFtraceEvent
             * @static
             * @param {perfetto.protos.ISignalDeliverFtraceEvent} m SignalDeliverFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SignalDeliverFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.code != null && Object.hasOwnProperty.call(m, "code"))
                    w.uint32(8).int32(m.code);
                if (m.saFlags != null && Object.hasOwnProperty.call(m, "saFlags"))
                    w.uint32(16).uint64(m.saFlags);
                if (m.sig != null && Object.hasOwnProperty.call(m, "sig"))
                    w.uint32(24).int32(m.sig);
                return w;
            };

            /**
             * Encodes the specified SignalDeliverFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SignalDeliverFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SignalDeliverFtraceEvent
             * @static
             * @param {perfetto.protos.ISignalDeliverFtraceEvent} message SignalDeliverFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SignalDeliverFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SignalDeliverFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SignalDeliverFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SignalDeliverFtraceEvent} SignalDeliverFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SignalDeliverFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SignalDeliverFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.code = r.int32();
                        break;
                    case 2:
                        m.saFlags = r.uint64();
                        break;
                    case 3:
                        m.sig = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SignalDeliverFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SignalDeliverFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SignalDeliverFtraceEvent} SignalDeliverFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SignalDeliverFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SignalDeliverFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SignalDeliverFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SignalDeliverFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.code != null && m.hasOwnProperty("code")) {
                    if (!$util.isInteger(m.code))
                        return "code: integer expected";
                }
                if (m.saFlags != null && m.hasOwnProperty("saFlags")) {
                    if (!$util.isInteger(m.saFlags) && !(m.saFlags && $util.isInteger(m.saFlags.low) && $util.isInteger(m.saFlags.high)))
                        return "saFlags: integer|Long expected";
                }
                if (m.sig != null && m.hasOwnProperty("sig")) {
                    if (!$util.isInteger(m.sig))
                        return "sig: integer expected";
                }
                return null;
            };

            /**
             * Creates a SignalDeliverFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SignalDeliverFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SignalDeliverFtraceEvent} SignalDeliverFtraceEvent
             */
            SignalDeliverFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SignalDeliverFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SignalDeliverFtraceEvent();
                if (d.code != null) {
                    m.code = d.code | 0;
                }
                if (d.saFlags != null) {
                    if ($util.Long)
                        (m.saFlags = $util.Long.fromValue(d.saFlags)).unsigned = true;
                    else if (typeof d.saFlags === "string")
                        m.saFlags = parseInt(d.saFlags, 10);
                    else if (typeof d.saFlags === "number")
                        m.saFlags = d.saFlags;
                    else if (typeof d.saFlags === "object")
                        m.saFlags = new $util.LongBits(d.saFlags.low >>> 0, d.saFlags.high >>> 0).toNumber(true);
                }
                if (d.sig != null) {
                    m.sig = d.sig | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SignalDeliverFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SignalDeliverFtraceEvent
             * @static
             * @param {perfetto.protos.SignalDeliverFtraceEvent} m SignalDeliverFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SignalDeliverFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.code = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.saFlags = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.saFlags = o.longs === String ? "0" : 0;
                    d.sig = 0;
                }
                if (m.code != null && m.hasOwnProperty("code")) {
                    d.code = m.code;
                }
                if (m.saFlags != null && m.hasOwnProperty("saFlags")) {
                    if (typeof m.saFlags === "number")
                        d.saFlags = o.longs === String ? String(m.saFlags) : m.saFlags;
                    else
                        d.saFlags = o.longs === String ? $util.Long.prototype.toString.call(m.saFlags) : o.longs === Number ? new $util.LongBits(m.saFlags.low >>> 0, m.saFlags.high >>> 0).toNumber(true) : m.saFlags;
                }
                if (m.sig != null && m.hasOwnProperty("sig")) {
                    d.sig = m.sig;
                }
                return d;
            };

            /**
             * Converts this SignalDeliverFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SignalDeliverFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SignalDeliverFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SignalDeliverFtraceEvent;
        })();

        protos.SignalGenerateFtraceEvent = (function() {

            /**
             * Properties of a SignalGenerateFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISignalGenerateFtraceEvent
             * @property {number|null} [code] SignalGenerateFtraceEvent code
             * @property {string|null} [comm] SignalGenerateFtraceEvent comm
             * @property {number|null} [group] SignalGenerateFtraceEvent group
             * @property {number|null} [pid] SignalGenerateFtraceEvent pid
             * @property {number|null} [result] SignalGenerateFtraceEvent result
             * @property {number|null} [sig] SignalGenerateFtraceEvent sig
             */

            /**
             * Constructs a new SignalGenerateFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SignalGenerateFtraceEvent.
             * @implements ISignalGenerateFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISignalGenerateFtraceEvent=} [p] Properties to set
             */
            function SignalGenerateFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SignalGenerateFtraceEvent code.
             * @member {number} code
             * @memberof perfetto.protos.SignalGenerateFtraceEvent
             * @instance
             */
            SignalGenerateFtraceEvent.prototype.code = 0;

            /**
             * SignalGenerateFtraceEvent comm.
             * @member {string} comm
             * @memberof perfetto.protos.SignalGenerateFtraceEvent
             * @instance
             */
            SignalGenerateFtraceEvent.prototype.comm = "";

            /**
             * SignalGenerateFtraceEvent group.
             * @member {number} group
             * @memberof perfetto.protos.SignalGenerateFtraceEvent
             * @instance
             */
            SignalGenerateFtraceEvent.prototype.group = 0;

            /**
             * SignalGenerateFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.SignalGenerateFtraceEvent
             * @instance
             */
            SignalGenerateFtraceEvent.prototype.pid = 0;

            /**
             * SignalGenerateFtraceEvent result.
             * @member {number} result
             * @memberof perfetto.protos.SignalGenerateFtraceEvent
             * @instance
             */
            SignalGenerateFtraceEvent.prototype.result = 0;

            /**
             * SignalGenerateFtraceEvent sig.
             * @member {number} sig
             * @memberof perfetto.protos.SignalGenerateFtraceEvent
             * @instance
             */
            SignalGenerateFtraceEvent.prototype.sig = 0;

            /**
             * Creates a new SignalGenerateFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SignalGenerateFtraceEvent
             * @static
             * @param {perfetto.protos.ISignalGenerateFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SignalGenerateFtraceEvent} SignalGenerateFtraceEvent instance
             */
            SignalGenerateFtraceEvent.create = function create(properties) {
                return new SignalGenerateFtraceEvent(properties);
            };

            /**
             * Encodes the specified SignalGenerateFtraceEvent message. Does not implicitly {@link perfetto.protos.SignalGenerateFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SignalGenerateFtraceEvent
             * @static
             * @param {perfetto.protos.ISignalGenerateFtraceEvent} m SignalGenerateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SignalGenerateFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.code != null && Object.hasOwnProperty.call(m, "code"))
                    w.uint32(8).int32(m.code);
                if (m.comm != null && Object.hasOwnProperty.call(m, "comm"))
                    w.uint32(18).string(m.comm);
                if (m.group != null && Object.hasOwnProperty.call(m, "group"))
                    w.uint32(24).int32(m.group);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(32).int32(m.pid);
                if (m.result != null && Object.hasOwnProperty.call(m, "result"))
                    w.uint32(40).int32(m.result);
                if (m.sig != null && Object.hasOwnProperty.call(m, "sig"))
                    w.uint32(48).int32(m.sig);
                return w;
            };

            /**
             * Encodes the specified SignalGenerateFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SignalGenerateFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SignalGenerateFtraceEvent
             * @static
             * @param {perfetto.protos.ISignalGenerateFtraceEvent} message SignalGenerateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SignalGenerateFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SignalGenerateFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SignalGenerateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SignalGenerateFtraceEvent} SignalGenerateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SignalGenerateFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SignalGenerateFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.code = r.int32();
                        break;
                    case 2:
                        m.comm = r.string();
                        break;
                    case 3:
                        m.group = r.int32();
                        break;
                    case 4:
                        m.pid = r.int32();
                        break;
                    case 5:
                        m.result = r.int32();
                        break;
                    case 6:
                        m.sig = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SignalGenerateFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SignalGenerateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SignalGenerateFtraceEvent} SignalGenerateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SignalGenerateFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SignalGenerateFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SignalGenerateFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SignalGenerateFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.code != null && m.hasOwnProperty("code")) {
                    if (!$util.isInteger(m.code))
                        return "code: integer expected";
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    if (!$util.isString(m.comm))
                        return "comm: string expected";
                }
                if (m.group != null && m.hasOwnProperty("group")) {
                    if (!$util.isInteger(m.group))
                        return "group: integer expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.result != null && m.hasOwnProperty("result")) {
                    if (!$util.isInteger(m.result))
                        return "result: integer expected";
                }
                if (m.sig != null && m.hasOwnProperty("sig")) {
                    if (!$util.isInteger(m.sig))
                        return "sig: integer expected";
                }
                return null;
            };

            /**
             * Creates a SignalGenerateFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SignalGenerateFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SignalGenerateFtraceEvent} SignalGenerateFtraceEvent
             */
            SignalGenerateFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SignalGenerateFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SignalGenerateFtraceEvent();
                if (d.code != null) {
                    m.code = d.code | 0;
                }
                if (d.comm != null) {
                    m.comm = String(d.comm);
                }
                if (d.group != null) {
                    m.group = d.group | 0;
                }
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                if (d.result != null) {
                    m.result = d.result | 0;
                }
                if (d.sig != null) {
                    m.sig = d.sig | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SignalGenerateFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SignalGenerateFtraceEvent
             * @static
             * @param {perfetto.protos.SignalGenerateFtraceEvent} m SignalGenerateFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SignalGenerateFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.code = 0;
                    d.comm = "";
                    d.group = 0;
                    d.pid = 0;
                    d.result = 0;
                    d.sig = 0;
                }
                if (m.code != null && m.hasOwnProperty("code")) {
                    d.code = m.code;
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    d.comm = m.comm;
                }
                if (m.group != null && m.hasOwnProperty("group")) {
                    d.group = m.group;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.result != null && m.hasOwnProperty("result")) {
                    d.result = m.result;
                }
                if (m.sig != null && m.hasOwnProperty("sig")) {
                    d.sig = m.sig;
                }
                return d;
            };

            /**
             * Converts this SignalGenerateFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SignalGenerateFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SignalGenerateFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SignalGenerateFtraceEvent;
        })();

        protos.KfreeSkbFtraceEvent = (function() {

            /**
             * Properties of a KfreeSkbFtraceEvent.
             * @memberof perfetto.protos
             * @interface IKfreeSkbFtraceEvent
             * @property {number|null} [location] KfreeSkbFtraceEvent location
             * @property {number|null} [protocol] KfreeSkbFtraceEvent protocol
             * @property {number|null} [skbaddr] KfreeSkbFtraceEvent skbaddr
             */

            /**
             * Constructs a new KfreeSkbFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a KfreeSkbFtraceEvent.
             * @implements IKfreeSkbFtraceEvent
             * @constructor
             * @param {perfetto.protos.IKfreeSkbFtraceEvent=} [p] Properties to set
             */
            function KfreeSkbFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * KfreeSkbFtraceEvent location.
             * @member {number} location
             * @memberof perfetto.protos.KfreeSkbFtraceEvent
             * @instance
             */
            KfreeSkbFtraceEvent.prototype.location = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * KfreeSkbFtraceEvent protocol.
             * @member {number} protocol
             * @memberof perfetto.protos.KfreeSkbFtraceEvent
             * @instance
             */
            KfreeSkbFtraceEvent.prototype.protocol = 0;

            /**
             * KfreeSkbFtraceEvent skbaddr.
             * @member {number} skbaddr
             * @memberof perfetto.protos.KfreeSkbFtraceEvent
             * @instance
             */
            KfreeSkbFtraceEvent.prototype.skbaddr = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new KfreeSkbFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.KfreeSkbFtraceEvent
             * @static
             * @param {perfetto.protos.IKfreeSkbFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.KfreeSkbFtraceEvent} KfreeSkbFtraceEvent instance
             */
            KfreeSkbFtraceEvent.create = function create(properties) {
                return new KfreeSkbFtraceEvent(properties);
            };

            /**
             * Encodes the specified KfreeSkbFtraceEvent message. Does not implicitly {@link perfetto.protos.KfreeSkbFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.KfreeSkbFtraceEvent
             * @static
             * @param {perfetto.protos.IKfreeSkbFtraceEvent} m KfreeSkbFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KfreeSkbFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.location != null && Object.hasOwnProperty.call(m, "location"))
                    w.uint32(8).uint64(m.location);
                if (m.protocol != null && Object.hasOwnProperty.call(m, "protocol"))
                    w.uint32(16).uint32(m.protocol);
                if (m.skbaddr != null && Object.hasOwnProperty.call(m, "skbaddr"))
                    w.uint32(24).uint64(m.skbaddr);
                return w;
            };

            /**
             * Encodes the specified KfreeSkbFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.KfreeSkbFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.KfreeSkbFtraceEvent
             * @static
             * @param {perfetto.protos.IKfreeSkbFtraceEvent} message KfreeSkbFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            KfreeSkbFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a KfreeSkbFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.KfreeSkbFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.KfreeSkbFtraceEvent} KfreeSkbFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KfreeSkbFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.KfreeSkbFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.location = r.uint64();
                        break;
                    case 2:
                        m.protocol = r.uint32();
                        break;
                    case 3:
                        m.skbaddr = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a KfreeSkbFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.KfreeSkbFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.KfreeSkbFtraceEvent} KfreeSkbFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            KfreeSkbFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a KfreeSkbFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.KfreeSkbFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            KfreeSkbFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.location != null && m.hasOwnProperty("location")) {
                    if (!$util.isInteger(m.location) && !(m.location && $util.isInteger(m.location.low) && $util.isInteger(m.location.high)))
                        return "location: integer|Long expected";
                }
                if (m.protocol != null && m.hasOwnProperty("protocol")) {
                    if (!$util.isInteger(m.protocol))
                        return "protocol: integer expected";
                }
                if (m.skbaddr != null && m.hasOwnProperty("skbaddr")) {
                    if (!$util.isInteger(m.skbaddr) && !(m.skbaddr && $util.isInteger(m.skbaddr.low) && $util.isInteger(m.skbaddr.high)))
                        return "skbaddr: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a KfreeSkbFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.KfreeSkbFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.KfreeSkbFtraceEvent} KfreeSkbFtraceEvent
             */
            KfreeSkbFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.KfreeSkbFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.KfreeSkbFtraceEvent();
                if (d.location != null) {
                    if ($util.Long)
                        (m.location = $util.Long.fromValue(d.location)).unsigned = true;
                    else if (typeof d.location === "string")
                        m.location = parseInt(d.location, 10);
                    else if (typeof d.location === "number")
                        m.location = d.location;
                    else if (typeof d.location === "object")
                        m.location = new $util.LongBits(d.location.low >>> 0, d.location.high >>> 0).toNumber(true);
                }
                if (d.protocol != null) {
                    m.protocol = d.protocol >>> 0;
                }
                if (d.skbaddr != null) {
                    if ($util.Long)
                        (m.skbaddr = $util.Long.fromValue(d.skbaddr)).unsigned = true;
                    else if (typeof d.skbaddr === "string")
                        m.skbaddr = parseInt(d.skbaddr, 10);
                    else if (typeof d.skbaddr === "number")
                        m.skbaddr = d.skbaddr;
                    else if (typeof d.skbaddr === "object")
                        m.skbaddr = new $util.LongBits(d.skbaddr.low >>> 0, d.skbaddr.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a KfreeSkbFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.KfreeSkbFtraceEvent
             * @static
             * @param {perfetto.protos.KfreeSkbFtraceEvent} m KfreeSkbFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            KfreeSkbFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.location = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.location = o.longs === String ? "0" : 0;
                    d.protocol = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.skbaddr = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.skbaddr = o.longs === String ? "0" : 0;
                }
                if (m.location != null && m.hasOwnProperty("location")) {
                    if (typeof m.location === "number")
                        d.location = o.longs === String ? String(m.location) : m.location;
                    else
                        d.location = o.longs === String ? $util.Long.prototype.toString.call(m.location) : o.longs === Number ? new $util.LongBits(m.location.low >>> 0, m.location.high >>> 0).toNumber(true) : m.location;
                }
                if (m.protocol != null && m.hasOwnProperty("protocol")) {
                    d.protocol = m.protocol;
                }
                if (m.skbaddr != null && m.hasOwnProperty("skbaddr")) {
                    if (typeof m.skbaddr === "number")
                        d.skbaddr = o.longs === String ? String(m.skbaddr) : m.skbaddr;
                    else
                        d.skbaddr = o.longs === String ? $util.Long.prototype.toString.call(m.skbaddr) : o.longs === Number ? new $util.LongBits(m.skbaddr.low >>> 0, m.skbaddr.high >>> 0).toNumber(true) : m.skbaddr;
                }
                return d;
            };

            /**
             * Converts this KfreeSkbFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.KfreeSkbFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            KfreeSkbFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return KfreeSkbFtraceEvent;
        })();

        protos.InetSockSetStateFtraceEvent = (function() {

            /**
             * Properties of an InetSockSetStateFtraceEvent.
             * @memberof perfetto.protos
             * @interface IInetSockSetStateFtraceEvent
             * @property {number|null} [daddr] InetSockSetStateFtraceEvent daddr
             * @property {number|null} [dport] InetSockSetStateFtraceEvent dport
             * @property {number|null} [family] InetSockSetStateFtraceEvent family
             * @property {number|null} [newstate] InetSockSetStateFtraceEvent newstate
             * @property {number|null} [oldstate] InetSockSetStateFtraceEvent oldstate
             * @property {number|null} [protocol] InetSockSetStateFtraceEvent protocol
             * @property {number|null} [saddr] InetSockSetStateFtraceEvent saddr
             * @property {number|null} [skaddr] InetSockSetStateFtraceEvent skaddr
             * @property {number|null} [sport] InetSockSetStateFtraceEvent sport
             */

            /**
             * Constructs a new InetSockSetStateFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an InetSockSetStateFtraceEvent.
             * @implements IInetSockSetStateFtraceEvent
             * @constructor
             * @param {perfetto.protos.IInetSockSetStateFtraceEvent=} [p] Properties to set
             */
            function InetSockSetStateFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * InetSockSetStateFtraceEvent daddr.
             * @member {number} daddr
             * @memberof perfetto.protos.InetSockSetStateFtraceEvent
             * @instance
             */
            InetSockSetStateFtraceEvent.prototype.daddr = 0;

            /**
             * InetSockSetStateFtraceEvent dport.
             * @member {number} dport
             * @memberof perfetto.protos.InetSockSetStateFtraceEvent
             * @instance
             */
            InetSockSetStateFtraceEvent.prototype.dport = 0;

            /**
             * InetSockSetStateFtraceEvent family.
             * @member {number} family
             * @memberof perfetto.protos.InetSockSetStateFtraceEvent
             * @instance
             */
            InetSockSetStateFtraceEvent.prototype.family = 0;

            /**
             * InetSockSetStateFtraceEvent newstate.
             * @member {number} newstate
             * @memberof perfetto.protos.InetSockSetStateFtraceEvent
             * @instance
             */
            InetSockSetStateFtraceEvent.prototype.newstate = 0;

            /**
             * InetSockSetStateFtraceEvent oldstate.
             * @member {number} oldstate
             * @memberof perfetto.protos.InetSockSetStateFtraceEvent
             * @instance
             */
            InetSockSetStateFtraceEvent.prototype.oldstate = 0;

            /**
             * InetSockSetStateFtraceEvent protocol.
             * @member {number} protocol
             * @memberof perfetto.protos.InetSockSetStateFtraceEvent
             * @instance
             */
            InetSockSetStateFtraceEvent.prototype.protocol = 0;

            /**
             * InetSockSetStateFtraceEvent saddr.
             * @member {number} saddr
             * @memberof perfetto.protos.InetSockSetStateFtraceEvent
             * @instance
             */
            InetSockSetStateFtraceEvent.prototype.saddr = 0;

            /**
             * InetSockSetStateFtraceEvent skaddr.
             * @member {number} skaddr
             * @memberof perfetto.protos.InetSockSetStateFtraceEvent
             * @instance
             */
            InetSockSetStateFtraceEvent.prototype.skaddr = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * InetSockSetStateFtraceEvent sport.
             * @member {number} sport
             * @memberof perfetto.protos.InetSockSetStateFtraceEvent
             * @instance
             */
            InetSockSetStateFtraceEvent.prototype.sport = 0;

            /**
             * Creates a new InetSockSetStateFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.InetSockSetStateFtraceEvent
             * @static
             * @param {perfetto.protos.IInetSockSetStateFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.InetSockSetStateFtraceEvent} InetSockSetStateFtraceEvent instance
             */
            InetSockSetStateFtraceEvent.create = function create(properties) {
                return new InetSockSetStateFtraceEvent(properties);
            };

            /**
             * Encodes the specified InetSockSetStateFtraceEvent message. Does not implicitly {@link perfetto.protos.InetSockSetStateFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.InetSockSetStateFtraceEvent
             * @static
             * @param {perfetto.protos.IInetSockSetStateFtraceEvent} m InetSockSetStateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InetSockSetStateFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.daddr != null && Object.hasOwnProperty.call(m, "daddr"))
                    w.uint32(8).uint32(m.daddr);
                if (m.dport != null && Object.hasOwnProperty.call(m, "dport"))
                    w.uint32(16).uint32(m.dport);
                if (m.family != null && Object.hasOwnProperty.call(m, "family"))
                    w.uint32(24).uint32(m.family);
                if (m.newstate != null && Object.hasOwnProperty.call(m, "newstate"))
                    w.uint32(32).int32(m.newstate);
                if (m.oldstate != null && Object.hasOwnProperty.call(m, "oldstate"))
                    w.uint32(40).int32(m.oldstate);
                if (m.protocol != null && Object.hasOwnProperty.call(m, "protocol"))
                    w.uint32(48).uint32(m.protocol);
                if (m.saddr != null && Object.hasOwnProperty.call(m, "saddr"))
                    w.uint32(56).uint32(m.saddr);
                if (m.skaddr != null && Object.hasOwnProperty.call(m, "skaddr"))
                    w.uint32(64).uint64(m.skaddr);
                if (m.sport != null && Object.hasOwnProperty.call(m, "sport"))
                    w.uint32(72).uint32(m.sport);
                return w;
            };

            /**
             * Encodes the specified InetSockSetStateFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.InetSockSetStateFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.InetSockSetStateFtraceEvent
             * @static
             * @param {perfetto.protos.IInetSockSetStateFtraceEvent} message InetSockSetStateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InetSockSetStateFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an InetSockSetStateFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.InetSockSetStateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.InetSockSetStateFtraceEvent} InetSockSetStateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InetSockSetStateFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.InetSockSetStateFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.daddr = r.uint32();
                        break;
                    case 2:
                        m.dport = r.uint32();
                        break;
                    case 3:
                        m.family = r.uint32();
                        break;
                    case 4:
                        m.newstate = r.int32();
                        break;
                    case 5:
                        m.oldstate = r.int32();
                        break;
                    case 6:
                        m.protocol = r.uint32();
                        break;
                    case 7:
                        m.saddr = r.uint32();
                        break;
                    case 8:
                        m.skaddr = r.uint64();
                        break;
                    case 9:
                        m.sport = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an InetSockSetStateFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.InetSockSetStateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.InetSockSetStateFtraceEvent} InetSockSetStateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InetSockSetStateFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an InetSockSetStateFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.InetSockSetStateFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            InetSockSetStateFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.daddr != null && m.hasOwnProperty("daddr")) {
                    if (!$util.isInteger(m.daddr))
                        return "daddr: integer expected";
                }
                if (m.dport != null && m.hasOwnProperty("dport")) {
                    if (!$util.isInteger(m.dport))
                        return "dport: integer expected";
                }
                if (m.family != null && m.hasOwnProperty("family")) {
                    if (!$util.isInteger(m.family))
                        return "family: integer expected";
                }
                if (m.newstate != null && m.hasOwnProperty("newstate")) {
                    if (!$util.isInteger(m.newstate))
                        return "newstate: integer expected";
                }
                if (m.oldstate != null && m.hasOwnProperty("oldstate")) {
                    if (!$util.isInteger(m.oldstate))
                        return "oldstate: integer expected";
                }
                if (m.protocol != null && m.hasOwnProperty("protocol")) {
                    if (!$util.isInteger(m.protocol))
                        return "protocol: integer expected";
                }
                if (m.saddr != null && m.hasOwnProperty("saddr")) {
                    if (!$util.isInteger(m.saddr))
                        return "saddr: integer expected";
                }
                if (m.skaddr != null && m.hasOwnProperty("skaddr")) {
                    if (!$util.isInteger(m.skaddr) && !(m.skaddr && $util.isInteger(m.skaddr.low) && $util.isInteger(m.skaddr.high)))
                        return "skaddr: integer|Long expected";
                }
                if (m.sport != null && m.hasOwnProperty("sport")) {
                    if (!$util.isInteger(m.sport))
                        return "sport: integer expected";
                }
                return null;
            };

            /**
             * Creates an InetSockSetStateFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.InetSockSetStateFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.InetSockSetStateFtraceEvent} InetSockSetStateFtraceEvent
             */
            InetSockSetStateFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.InetSockSetStateFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.InetSockSetStateFtraceEvent();
                if (d.daddr != null) {
                    m.daddr = d.daddr >>> 0;
                }
                if (d.dport != null) {
                    m.dport = d.dport >>> 0;
                }
                if (d.family != null) {
                    m.family = d.family >>> 0;
                }
                if (d.newstate != null) {
                    m.newstate = d.newstate | 0;
                }
                if (d.oldstate != null) {
                    m.oldstate = d.oldstate | 0;
                }
                if (d.protocol != null) {
                    m.protocol = d.protocol >>> 0;
                }
                if (d.saddr != null) {
                    m.saddr = d.saddr >>> 0;
                }
                if (d.skaddr != null) {
                    if ($util.Long)
                        (m.skaddr = $util.Long.fromValue(d.skaddr)).unsigned = true;
                    else if (typeof d.skaddr === "string")
                        m.skaddr = parseInt(d.skaddr, 10);
                    else if (typeof d.skaddr === "number")
                        m.skaddr = d.skaddr;
                    else if (typeof d.skaddr === "object")
                        m.skaddr = new $util.LongBits(d.skaddr.low >>> 0, d.skaddr.high >>> 0).toNumber(true);
                }
                if (d.sport != null) {
                    m.sport = d.sport >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an InetSockSetStateFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.InetSockSetStateFtraceEvent
             * @static
             * @param {perfetto.protos.InetSockSetStateFtraceEvent} m InetSockSetStateFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            InetSockSetStateFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.daddr = 0;
                    d.dport = 0;
                    d.family = 0;
                    d.newstate = 0;
                    d.oldstate = 0;
                    d.protocol = 0;
                    d.saddr = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.skaddr = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.skaddr = o.longs === String ? "0" : 0;
                    d.sport = 0;
                }
                if (m.daddr != null && m.hasOwnProperty("daddr")) {
                    d.daddr = m.daddr;
                }
                if (m.dport != null && m.hasOwnProperty("dport")) {
                    d.dport = m.dport;
                }
                if (m.family != null && m.hasOwnProperty("family")) {
                    d.family = m.family;
                }
                if (m.newstate != null && m.hasOwnProperty("newstate")) {
                    d.newstate = m.newstate;
                }
                if (m.oldstate != null && m.hasOwnProperty("oldstate")) {
                    d.oldstate = m.oldstate;
                }
                if (m.protocol != null && m.hasOwnProperty("protocol")) {
                    d.protocol = m.protocol;
                }
                if (m.saddr != null && m.hasOwnProperty("saddr")) {
                    d.saddr = m.saddr;
                }
                if (m.skaddr != null && m.hasOwnProperty("skaddr")) {
                    if (typeof m.skaddr === "number")
                        d.skaddr = o.longs === String ? String(m.skaddr) : m.skaddr;
                    else
                        d.skaddr = o.longs === String ? $util.Long.prototype.toString.call(m.skaddr) : o.longs === Number ? new $util.LongBits(m.skaddr.low >>> 0, m.skaddr.high >>> 0).toNumber(true) : m.skaddr;
                }
                if (m.sport != null && m.hasOwnProperty("sport")) {
                    d.sport = m.sport;
                }
                return d;
            };

            /**
             * Converts this InetSockSetStateFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.InetSockSetStateFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            InetSockSetStateFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return InetSockSetStateFtraceEvent;
        })();

        protos.SyncPtFtraceEvent = (function() {

            /**
             * Properties of a SyncPtFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISyncPtFtraceEvent
             * @property {string|null} [timeline] SyncPtFtraceEvent timeline
             * @property {string|null} [value] SyncPtFtraceEvent value
             */

            /**
             * Constructs a new SyncPtFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SyncPtFtraceEvent.
             * @implements ISyncPtFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISyncPtFtraceEvent=} [p] Properties to set
             */
            function SyncPtFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SyncPtFtraceEvent timeline.
             * @member {string} timeline
             * @memberof perfetto.protos.SyncPtFtraceEvent
             * @instance
             */
            SyncPtFtraceEvent.prototype.timeline = "";

            /**
             * SyncPtFtraceEvent value.
             * @member {string} value
             * @memberof perfetto.protos.SyncPtFtraceEvent
             * @instance
             */
            SyncPtFtraceEvent.prototype.value = "";

            /**
             * Creates a new SyncPtFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SyncPtFtraceEvent
             * @static
             * @param {perfetto.protos.ISyncPtFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SyncPtFtraceEvent} SyncPtFtraceEvent instance
             */
            SyncPtFtraceEvent.create = function create(properties) {
                return new SyncPtFtraceEvent(properties);
            };

            /**
             * Encodes the specified SyncPtFtraceEvent message. Does not implicitly {@link perfetto.protos.SyncPtFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SyncPtFtraceEvent
             * @static
             * @param {perfetto.protos.ISyncPtFtraceEvent} m SyncPtFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SyncPtFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.timeline != null && Object.hasOwnProperty.call(m, "timeline"))
                    w.uint32(10).string(m.timeline);
                if (m.value != null && Object.hasOwnProperty.call(m, "value"))
                    w.uint32(18).string(m.value);
                return w;
            };

            /**
             * Encodes the specified SyncPtFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SyncPtFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SyncPtFtraceEvent
             * @static
             * @param {perfetto.protos.ISyncPtFtraceEvent} message SyncPtFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SyncPtFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SyncPtFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SyncPtFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SyncPtFtraceEvent} SyncPtFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SyncPtFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SyncPtFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.timeline = r.string();
                        break;
                    case 2:
                        m.value = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SyncPtFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SyncPtFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SyncPtFtraceEvent} SyncPtFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SyncPtFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SyncPtFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SyncPtFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SyncPtFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.timeline != null && m.hasOwnProperty("timeline")) {
                    if (!$util.isString(m.timeline))
                        return "timeline: string expected";
                }
                if (m.value != null && m.hasOwnProperty("value")) {
                    if (!$util.isString(m.value))
                        return "value: string expected";
                }
                return null;
            };

            /**
             * Creates a SyncPtFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SyncPtFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SyncPtFtraceEvent} SyncPtFtraceEvent
             */
            SyncPtFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SyncPtFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SyncPtFtraceEvent();
                if (d.timeline != null) {
                    m.timeline = String(d.timeline);
                }
                if (d.value != null) {
                    m.value = String(d.value);
                }
                return m;
            };

            /**
             * Creates a plain object from a SyncPtFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SyncPtFtraceEvent
             * @static
             * @param {perfetto.protos.SyncPtFtraceEvent} m SyncPtFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SyncPtFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.timeline = "";
                    d.value = "";
                }
                if (m.timeline != null && m.hasOwnProperty("timeline")) {
                    d.timeline = m.timeline;
                }
                if (m.value != null && m.hasOwnProperty("value")) {
                    d.value = m.value;
                }
                return d;
            };

            /**
             * Converts this SyncPtFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SyncPtFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SyncPtFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SyncPtFtraceEvent;
        })();

        protos.SyncTimelineFtraceEvent = (function() {

            /**
             * Properties of a SyncTimelineFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISyncTimelineFtraceEvent
             * @property {string|null} [name] SyncTimelineFtraceEvent name
             * @property {string|null} [value] SyncTimelineFtraceEvent value
             */

            /**
             * Constructs a new SyncTimelineFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SyncTimelineFtraceEvent.
             * @implements ISyncTimelineFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISyncTimelineFtraceEvent=} [p] Properties to set
             */
            function SyncTimelineFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SyncTimelineFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.SyncTimelineFtraceEvent
             * @instance
             */
            SyncTimelineFtraceEvent.prototype.name = "";

            /**
             * SyncTimelineFtraceEvent value.
             * @member {string} value
             * @memberof perfetto.protos.SyncTimelineFtraceEvent
             * @instance
             */
            SyncTimelineFtraceEvent.prototype.value = "";

            /**
             * Creates a new SyncTimelineFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SyncTimelineFtraceEvent
             * @static
             * @param {perfetto.protos.ISyncTimelineFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SyncTimelineFtraceEvent} SyncTimelineFtraceEvent instance
             */
            SyncTimelineFtraceEvent.create = function create(properties) {
                return new SyncTimelineFtraceEvent(properties);
            };

            /**
             * Encodes the specified SyncTimelineFtraceEvent message. Does not implicitly {@link perfetto.protos.SyncTimelineFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SyncTimelineFtraceEvent
             * @static
             * @param {perfetto.protos.ISyncTimelineFtraceEvent} m SyncTimelineFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SyncTimelineFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                if (m.value != null && Object.hasOwnProperty.call(m, "value"))
                    w.uint32(18).string(m.value);
                return w;
            };

            /**
             * Encodes the specified SyncTimelineFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SyncTimelineFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SyncTimelineFtraceEvent
             * @static
             * @param {perfetto.protos.ISyncTimelineFtraceEvent} message SyncTimelineFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SyncTimelineFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SyncTimelineFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SyncTimelineFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SyncTimelineFtraceEvent} SyncTimelineFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SyncTimelineFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SyncTimelineFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    case 2:
                        m.value = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SyncTimelineFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SyncTimelineFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SyncTimelineFtraceEvent} SyncTimelineFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SyncTimelineFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SyncTimelineFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SyncTimelineFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SyncTimelineFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.value != null && m.hasOwnProperty("value")) {
                    if (!$util.isString(m.value))
                        return "value: string expected";
                }
                return null;
            };

            /**
             * Creates a SyncTimelineFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SyncTimelineFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SyncTimelineFtraceEvent} SyncTimelineFtraceEvent
             */
            SyncTimelineFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SyncTimelineFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SyncTimelineFtraceEvent();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.value != null) {
                    m.value = String(d.value);
                }
                return m;
            };

            /**
             * Creates a plain object from a SyncTimelineFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SyncTimelineFtraceEvent
             * @static
             * @param {perfetto.protos.SyncTimelineFtraceEvent} m SyncTimelineFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SyncTimelineFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                    d.value = "";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.value != null && m.hasOwnProperty("value")) {
                    d.value = m.value;
                }
                return d;
            };

            /**
             * Converts this SyncTimelineFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SyncTimelineFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SyncTimelineFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SyncTimelineFtraceEvent;
        })();

        protos.SyncWaitFtraceEvent = (function() {

            /**
             * Properties of a SyncWaitFtraceEvent.
             * @memberof perfetto.protos
             * @interface ISyncWaitFtraceEvent
             * @property {string|null} [name] SyncWaitFtraceEvent name
             * @property {number|null} [status] SyncWaitFtraceEvent status
             * @property {number|null} [begin] SyncWaitFtraceEvent begin
             */

            /**
             * Constructs a new SyncWaitFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a SyncWaitFtraceEvent.
             * @implements ISyncWaitFtraceEvent
             * @constructor
             * @param {perfetto.protos.ISyncWaitFtraceEvent=} [p] Properties to set
             */
            function SyncWaitFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SyncWaitFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.SyncWaitFtraceEvent
             * @instance
             */
            SyncWaitFtraceEvent.prototype.name = "";

            /**
             * SyncWaitFtraceEvent status.
             * @member {number} status
             * @memberof perfetto.protos.SyncWaitFtraceEvent
             * @instance
             */
            SyncWaitFtraceEvent.prototype.status = 0;

            /**
             * SyncWaitFtraceEvent begin.
             * @member {number} begin
             * @memberof perfetto.protos.SyncWaitFtraceEvent
             * @instance
             */
            SyncWaitFtraceEvent.prototype.begin = 0;

            /**
             * Creates a new SyncWaitFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SyncWaitFtraceEvent
             * @static
             * @param {perfetto.protos.ISyncWaitFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.SyncWaitFtraceEvent} SyncWaitFtraceEvent instance
             */
            SyncWaitFtraceEvent.create = function create(properties) {
                return new SyncWaitFtraceEvent(properties);
            };

            /**
             * Encodes the specified SyncWaitFtraceEvent message. Does not implicitly {@link perfetto.protos.SyncWaitFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SyncWaitFtraceEvent
             * @static
             * @param {perfetto.protos.ISyncWaitFtraceEvent} m SyncWaitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SyncWaitFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                if (m.status != null && Object.hasOwnProperty.call(m, "status"))
                    w.uint32(16).int32(m.status);
                if (m.begin != null && Object.hasOwnProperty.call(m, "begin"))
                    w.uint32(24).uint32(m.begin);
                return w;
            };

            /**
             * Encodes the specified SyncWaitFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.SyncWaitFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SyncWaitFtraceEvent
             * @static
             * @param {perfetto.protos.ISyncWaitFtraceEvent} message SyncWaitFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SyncWaitFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SyncWaitFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SyncWaitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SyncWaitFtraceEvent} SyncWaitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SyncWaitFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SyncWaitFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    case 2:
                        m.status = r.int32();
                        break;
                    case 3:
                        m.begin = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SyncWaitFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SyncWaitFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SyncWaitFtraceEvent} SyncWaitFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SyncWaitFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SyncWaitFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.SyncWaitFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SyncWaitFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.status != null && m.hasOwnProperty("status")) {
                    if (!$util.isInteger(m.status))
                        return "status: integer expected";
                }
                if (m.begin != null && m.hasOwnProperty("begin")) {
                    if (!$util.isInteger(m.begin))
                        return "begin: integer expected";
                }
                return null;
            };

            /**
             * Creates a SyncWaitFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SyncWaitFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SyncWaitFtraceEvent} SyncWaitFtraceEvent
             */
            SyncWaitFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SyncWaitFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.SyncWaitFtraceEvent();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.status != null) {
                    m.status = d.status | 0;
                }
                if (d.begin != null) {
                    m.begin = d.begin >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SyncWaitFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SyncWaitFtraceEvent
             * @static
             * @param {perfetto.protos.SyncWaitFtraceEvent} m SyncWaitFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SyncWaitFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                    d.status = 0;
                    d.begin = 0;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.status != null && m.hasOwnProperty("status")) {
                    d.status = m.status;
                }
                if (m.begin != null && m.hasOwnProperty("begin")) {
                    d.begin = m.begin;
                }
                return d;
            };

            /**
             * Converts this SyncWaitFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SyncWaitFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SyncWaitFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SyncWaitFtraceEvent;
        })();

        protos.RssStatThrottledFtraceEvent = (function() {

            /**
             * Properties of a RssStatThrottledFtraceEvent.
             * @memberof perfetto.protos
             * @interface IRssStatThrottledFtraceEvent
             * @property {number|null} [curr] RssStatThrottledFtraceEvent curr
             * @property {number|null} [member] RssStatThrottledFtraceEvent member
             * @property {number|null} [mmId] RssStatThrottledFtraceEvent mmId
             * @property {number|null} [size] RssStatThrottledFtraceEvent size
             */

            /**
             * Constructs a new RssStatThrottledFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a RssStatThrottledFtraceEvent.
             * @implements IRssStatThrottledFtraceEvent
             * @constructor
             * @param {perfetto.protos.IRssStatThrottledFtraceEvent=} [p] Properties to set
             */
            function RssStatThrottledFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * RssStatThrottledFtraceEvent curr.
             * @member {number} curr
             * @memberof perfetto.protos.RssStatThrottledFtraceEvent
             * @instance
             */
            RssStatThrottledFtraceEvent.prototype.curr = 0;

            /**
             * RssStatThrottledFtraceEvent member.
             * @member {number} member
             * @memberof perfetto.protos.RssStatThrottledFtraceEvent
             * @instance
             */
            RssStatThrottledFtraceEvent.prototype.member = 0;

            /**
             * RssStatThrottledFtraceEvent mmId.
             * @member {number} mmId
             * @memberof perfetto.protos.RssStatThrottledFtraceEvent
             * @instance
             */
            RssStatThrottledFtraceEvent.prototype.mmId = 0;

            /**
             * RssStatThrottledFtraceEvent size.
             * @member {number} size
             * @memberof perfetto.protos.RssStatThrottledFtraceEvent
             * @instance
             */
            RssStatThrottledFtraceEvent.prototype.size = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new RssStatThrottledFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.RssStatThrottledFtraceEvent
             * @static
             * @param {perfetto.protos.IRssStatThrottledFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.RssStatThrottledFtraceEvent} RssStatThrottledFtraceEvent instance
             */
            RssStatThrottledFtraceEvent.create = function create(properties) {
                return new RssStatThrottledFtraceEvent(properties);
            };

            /**
             * Encodes the specified RssStatThrottledFtraceEvent message. Does not implicitly {@link perfetto.protos.RssStatThrottledFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.RssStatThrottledFtraceEvent
             * @static
             * @param {perfetto.protos.IRssStatThrottledFtraceEvent} m RssStatThrottledFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RssStatThrottledFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.curr != null && Object.hasOwnProperty.call(m, "curr"))
                    w.uint32(8).uint32(m.curr);
                if (m.member != null && Object.hasOwnProperty.call(m, "member"))
                    w.uint32(16).int32(m.member);
                if (m.mmId != null && Object.hasOwnProperty.call(m, "mmId"))
                    w.uint32(24).uint32(m.mmId);
                if (m.size != null && Object.hasOwnProperty.call(m, "size"))
                    w.uint32(32).int64(m.size);
                return w;
            };

            /**
             * Encodes the specified RssStatThrottledFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.RssStatThrottledFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.RssStatThrottledFtraceEvent
             * @static
             * @param {perfetto.protos.IRssStatThrottledFtraceEvent} message RssStatThrottledFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            RssStatThrottledFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a RssStatThrottledFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.RssStatThrottledFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.RssStatThrottledFtraceEvent} RssStatThrottledFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RssStatThrottledFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.RssStatThrottledFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.curr = r.uint32();
                        break;
                    case 2:
                        m.member = r.int32();
                        break;
                    case 3:
                        m.mmId = r.uint32();
                        break;
                    case 4:
                        m.size = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a RssStatThrottledFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.RssStatThrottledFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.RssStatThrottledFtraceEvent} RssStatThrottledFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            RssStatThrottledFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a RssStatThrottledFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.RssStatThrottledFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            RssStatThrottledFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.curr != null && m.hasOwnProperty("curr")) {
                    if (!$util.isInteger(m.curr))
                        return "curr: integer expected";
                }
                if (m.member != null && m.hasOwnProperty("member")) {
                    if (!$util.isInteger(m.member))
                        return "member: integer expected";
                }
                if (m.mmId != null && m.hasOwnProperty("mmId")) {
                    if (!$util.isInteger(m.mmId))
                        return "mmId: integer expected";
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (!$util.isInteger(m.size) && !(m.size && $util.isInteger(m.size.low) && $util.isInteger(m.size.high)))
                        return "size: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a RssStatThrottledFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.RssStatThrottledFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.RssStatThrottledFtraceEvent} RssStatThrottledFtraceEvent
             */
            RssStatThrottledFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.RssStatThrottledFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.RssStatThrottledFtraceEvent();
                if (d.curr != null) {
                    m.curr = d.curr >>> 0;
                }
                if (d.member != null) {
                    m.member = d.member | 0;
                }
                if (d.mmId != null) {
                    m.mmId = d.mmId >>> 0;
                }
                if (d.size != null) {
                    if ($util.Long)
                        (m.size = $util.Long.fromValue(d.size)).unsigned = false;
                    else if (typeof d.size === "string")
                        m.size = parseInt(d.size, 10);
                    else if (typeof d.size === "number")
                        m.size = d.size;
                    else if (typeof d.size === "object")
                        m.size = new $util.LongBits(d.size.low >>> 0, d.size.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from a RssStatThrottledFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.RssStatThrottledFtraceEvent
             * @static
             * @param {perfetto.protos.RssStatThrottledFtraceEvent} m RssStatThrottledFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            RssStatThrottledFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.curr = 0;
                    d.member = 0;
                    d.mmId = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.size = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.size = o.longs === String ? "0" : 0;
                }
                if (m.curr != null && m.hasOwnProperty("curr")) {
                    d.curr = m.curr;
                }
                if (m.member != null && m.hasOwnProperty("member")) {
                    d.member = m.member;
                }
                if (m.mmId != null && m.hasOwnProperty("mmId")) {
                    d.mmId = m.mmId;
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (typeof m.size === "number")
                        d.size = o.longs === String ? String(m.size) : m.size;
                    else
                        d.size = o.longs === String ? $util.Long.prototype.toString.call(m.size) : o.longs === Number ? new $util.LongBits(m.size.low >>> 0, m.size.high >>> 0).toNumber() : m.size;
                }
                return d;
            };

            /**
             * Converts this RssStatThrottledFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.RssStatThrottledFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            RssStatThrottledFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return RssStatThrottledFtraceEvent;
        })();

        protos.ZeroFtraceEvent = (function() {

            /**
             * Properties of a ZeroFtraceEvent.
             * @memberof perfetto.protos
             * @interface IZeroFtraceEvent
             * @property {number|null} [flag] ZeroFtraceEvent flag
             * @property {string|null} [name] ZeroFtraceEvent name
             * @property {number|null} [pid] ZeroFtraceEvent pid
             * @property {number|null} [value] ZeroFtraceEvent value
             */

            /**
             * Constructs a new ZeroFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a ZeroFtraceEvent.
             * @implements IZeroFtraceEvent
             * @constructor
             * @param {perfetto.protos.IZeroFtraceEvent=} [p] Properties to set
             */
            function ZeroFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ZeroFtraceEvent flag.
             * @member {number} flag
             * @memberof perfetto.protos.ZeroFtraceEvent
             * @instance
             */
            ZeroFtraceEvent.prototype.flag = 0;

            /**
             * ZeroFtraceEvent name.
             * @member {string} name
             * @memberof perfetto.protos.ZeroFtraceEvent
             * @instance
             */
            ZeroFtraceEvent.prototype.name = "";

            /**
             * ZeroFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.ZeroFtraceEvent
             * @instance
             */
            ZeroFtraceEvent.prototype.pid = 0;

            /**
             * ZeroFtraceEvent value.
             * @member {number} value
             * @memberof perfetto.protos.ZeroFtraceEvent
             * @instance
             */
            ZeroFtraceEvent.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new ZeroFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ZeroFtraceEvent
             * @static
             * @param {perfetto.protos.IZeroFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.ZeroFtraceEvent} ZeroFtraceEvent instance
             */
            ZeroFtraceEvent.create = function create(properties) {
                return new ZeroFtraceEvent(properties);
            };

            /**
             * Encodes the specified ZeroFtraceEvent message. Does not implicitly {@link perfetto.protos.ZeroFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ZeroFtraceEvent
             * @static
             * @param {perfetto.protos.IZeroFtraceEvent} m ZeroFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ZeroFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.flag != null && Object.hasOwnProperty.call(m, "flag"))
                    w.uint32(8).int32(m.flag);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(18).string(m.name);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(24).int32(m.pid);
                if (m.value != null && Object.hasOwnProperty.call(m, "value"))
                    w.uint32(32).int64(m.value);
                return w;
            };

            /**
             * Encodes the specified ZeroFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.ZeroFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ZeroFtraceEvent
             * @static
             * @param {perfetto.protos.IZeroFtraceEvent} message ZeroFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ZeroFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ZeroFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ZeroFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ZeroFtraceEvent} ZeroFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ZeroFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ZeroFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.flag = r.int32();
                        break;
                    case 2:
                        m.name = r.string();
                        break;
                    case 3:
                        m.pid = r.int32();
                        break;
                    case 4:
                        m.value = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ZeroFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ZeroFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ZeroFtraceEvent} ZeroFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ZeroFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ZeroFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.ZeroFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ZeroFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.flag != null && m.hasOwnProperty("flag")) {
                    if (!$util.isInteger(m.flag))
                        return "flag: integer expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.value != null && m.hasOwnProperty("value")) {
                    if (!$util.isInteger(m.value) && !(m.value && $util.isInteger(m.value.low) && $util.isInteger(m.value.high)))
                        return "value: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a ZeroFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ZeroFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ZeroFtraceEvent} ZeroFtraceEvent
             */
            ZeroFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ZeroFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.ZeroFtraceEvent();
                if (d.flag != null) {
                    m.flag = d.flag | 0;
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                if (d.value != null) {
                    if ($util.Long)
                        (m.value = $util.Long.fromValue(d.value)).unsigned = false;
                    else if (typeof d.value === "string")
                        m.value = parseInt(d.value, 10);
                    else if (typeof d.value === "number")
                        m.value = d.value;
                    else if (typeof d.value === "object")
                        m.value = new $util.LongBits(d.value.low >>> 0, d.value.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from a ZeroFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ZeroFtraceEvent
             * @static
             * @param {perfetto.protos.ZeroFtraceEvent} m ZeroFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ZeroFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.flag = 0;
                    d.name = "";
                    d.pid = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.value = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.value = o.longs === String ? "0" : 0;
                }
                if (m.flag != null && m.hasOwnProperty("flag")) {
                    d.flag = m.flag;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.value != null && m.hasOwnProperty("value")) {
                    if (typeof m.value === "number")
                        d.value = o.longs === String ? String(m.value) : m.value;
                    else
                        d.value = o.longs === String ? $util.Long.prototype.toString.call(m.value) : o.longs === Number ? new $util.LongBits(m.value.low >>> 0, m.value.high >>> 0).toNumber() : m.value;
                }
                return d;
            };

            /**
             * Converts this ZeroFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ZeroFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ZeroFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ZeroFtraceEvent;
        })();

        protos.TaskNewtaskFtraceEvent = (function() {

            /**
             * Properties of a TaskNewtaskFtraceEvent.
             * @memberof perfetto.protos
             * @interface ITaskNewtaskFtraceEvent
             * @property {number|null} [pid] TaskNewtaskFtraceEvent pid
             * @property {string|null} [comm] TaskNewtaskFtraceEvent comm
             * @property {number|null} [cloneFlags] TaskNewtaskFtraceEvent cloneFlags
             * @property {number|null} [oomScoreAdj] TaskNewtaskFtraceEvent oomScoreAdj
             */

            /**
             * Constructs a new TaskNewtaskFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TaskNewtaskFtraceEvent.
             * @implements ITaskNewtaskFtraceEvent
             * @constructor
             * @param {perfetto.protos.ITaskNewtaskFtraceEvent=} [p] Properties to set
             */
            function TaskNewtaskFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TaskNewtaskFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.TaskNewtaskFtraceEvent
             * @instance
             */
            TaskNewtaskFtraceEvent.prototype.pid = 0;

            /**
             * TaskNewtaskFtraceEvent comm.
             * @member {string} comm
             * @memberof perfetto.protos.TaskNewtaskFtraceEvent
             * @instance
             */
            TaskNewtaskFtraceEvent.prototype.comm = "";

            /**
             * TaskNewtaskFtraceEvent cloneFlags.
             * @member {number} cloneFlags
             * @memberof perfetto.protos.TaskNewtaskFtraceEvent
             * @instance
             */
            TaskNewtaskFtraceEvent.prototype.cloneFlags = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TaskNewtaskFtraceEvent oomScoreAdj.
             * @member {number} oomScoreAdj
             * @memberof perfetto.protos.TaskNewtaskFtraceEvent
             * @instance
             */
            TaskNewtaskFtraceEvent.prototype.oomScoreAdj = 0;

            /**
             * Creates a new TaskNewtaskFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TaskNewtaskFtraceEvent
             * @static
             * @param {perfetto.protos.ITaskNewtaskFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TaskNewtaskFtraceEvent} TaskNewtaskFtraceEvent instance
             */
            TaskNewtaskFtraceEvent.create = function create(properties) {
                return new TaskNewtaskFtraceEvent(properties);
            };

            /**
             * Encodes the specified TaskNewtaskFtraceEvent message. Does not implicitly {@link perfetto.protos.TaskNewtaskFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TaskNewtaskFtraceEvent
             * @static
             * @param {perfetto.protos.ITaskNewtaskFtraceEvent} m TaskNewtaskFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TaskNewtaskFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(8).int32(m.pid);
                if (m.comm != null && Object.hasOwnProperty.call(m, "comm"))
                    w.uint32(18).string(m.comm);
                if (m.cloneFlags != null && Object.hasOwnProperty.call(m, "cloneFlags"))
                    w.uint32(24).uint64(m.cloneFlags);
                if (m.oomScoreAdj != null && Object.hasOwnProperty.call(m, "oomScoreAdj"))
                    w.uint32(32).int32(m.oomScoreAdj);
                return w;
            };

            /**
             * Encodes the specified TaskNewtaskFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TaskNewtaskFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TaskNewtaskFtraceEvent
             * @static
             * @param {perfetto.protos.ITaskNewtaskFtraceEvent} message TaskNewtaskFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TaskNewtaskFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TaskNewtaskFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TaskNewtaskFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TaskNewtaskFtraceEvent} TaskNewtaskFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TaskNewtaskFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TaskNewtaskFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.pid = r.int32();
                        break;
                    case 2:
                        m.comm = r.string();
                        break;
                    case 3:
                        m.cloneFlags = r.uint64();
                        break;
                    case 4:
                        m.oomScoreAdj = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TaskNewtaskFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TaskNewtaskFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TaskNewtaskFtraceEvent} TaskNewtaskFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TaskNewtaskFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TaskNewtaskFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.TaskNewtaskFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TaskNewtaskFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    if (!$util.isString(m.comm))
                        return "comm: string expected";
                }
                if (m.cloneFlags != null && m.hasOwnProperty("cloneFlags")) {
                    if (!$util.isInteger(m.cloneFlags) && !(m.cloneFlags && $util.isInteger(m.cloneFlags.low) && $util.isInteger(m.cloneFlags.high)))
                        return "cloneFlags: integer|Long expected";
                }
                if (m.oomScoreAdj != null && m.hasOwnProperty("oomScoreAdj")) {
                    if (!$util.isInteger(m.oomScoreAdj))
                        return "oomScoreAdj: integer expected";
                }
                return null;
            };

            /**
             * Creates a TaskNewtaskFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TaskNewtaskFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TaskNewtaskFtraceEvent} TaskNewtaskFtraceEvent
             */
            TaskNewtaskFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TaskNewtaskFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.TaskNewtaskFtraceEvent();
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                if (d.comm != null) {
                    m.comm = String(d.comm);
                }
                if (d.cloneFlags != null) {
                    if ($util.Long)
                        (m.cloneFlags = $util.Long.fromValue(d.cloneFlags)).unsigned = true;
                    else if (typeof d.cloneFlags === "string")
                        m.cloneFlags = parseInt(d.cloneFlags, 10);
                    else if (typeof d.cloneFlags === "number")
                        m.cloneFlags = d.cloneFlags;
                    else if (typeof d.cloneFlags === "object")
                        m.cloneFlags = new $util.LongBits(d.cloneFlags.low >>> 0, d.cloneFlags.high >>> 0).toNumber(true);
                }
                if (d.oomScoreAdj != null) {
                    m.oomScoreAdj = d.oomScoreAdj | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a TaskNewtaskFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TaskNewtaskFtraceEvent
             * @static
             * @param {perfetto.protos.TaskNewtaskFtraceEvent} m TaskNewtaskFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TaskNewtaskFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.pid = 0;
                    d.comm = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.cloneFlags = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.cloneFlags = o.longs === String ? "0" : 0;
                    d.oomScoreAdj = 0;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.comm != null && m.hasOwnProperty("comm")) {
                    d.comm = m.comm;
                }
                if (m.cloneFlags != null && m.hasOwnProperty("cloneFlags")) {
                    if (typeof m.cloneFlags === "number")
                        d.cloneFlags = o.longs === String ? String(m.cloneFlags) : m.cloneFlags;
                    else
                        d.cloneFlags = o.longs === String ? $util.Long.prototype.toString.call(m.cloneFlags) : o.longs === Number ? new $util.LongBits(m.cloneFlags.low >>> 0, m.cloneFlags.high >>> 0).toNumber(true) : m.cloneFlags;
                }
                if (m.oomScoreAdj != null && m.hasOwnProperty("oomScoreAdj")) {
                    d.oomScoreAdj = m.oomScoreAdj;
                }
                return d;
            };

            /**
             * Converts this TaskNewtaskFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TaskNewtaskFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TaskNewtaskFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TaskNewtaskFtraceEvent;
        })();

        protos.TaskRenameFtraceEvent = (function() {

            /**
             * Properties of a TaskRenameFtraceEvent.
             * @memberof perfetto.protos
             * @interface ITaskRenameFtraceEvent
             * @property {number|null} [pid] TaskRenameFtraceEvent pid
             * @property {string|null} [oldcomm] TaskRenameFtraceEvent oldcomm
             * @property {string|null} [newcomm] TaskRenameFtraceEvent newcomm
             * @property {number|null} [oomScoreAdj] TaskRenameFtraceEvent oomScoreAdj
             */

            /**
             * Constructs a new TaskRenameFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TaskRenameFtraceEvent.
             * @implements ITaskRenameFtraceEvent
             * @constructor
             * @param {perfetto.protos.ITaskRenameFtraceEvent=} [p] Properties to set
             */
            function TaskRenameFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TaskRenameFtraceEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.TaskRenameFtraceEvent
             * @instance
             */
            TaskRenameFtraceEvent.prototype.pid = 0;

            /**
             * TaskRenameFtraceEvent oldcomm.
             * @member {string} oldcomm
             * @memberof perfetto.protos.TaskRenameFtraceEvent
             * @instance
             */
            TaskRenameFtraceEvent.prototype.oldcomm = "";

            /**
             * TaskRenameFtraceEvent newcomm.
             * @member {string} newcomm
             * @memberof perfetto.protos.TaskRenameFtraceEvent
             * @instance
             */
            TaskRenameFtraceEvent.prototype.newcomm = "";

            /**
             * TaskRenameFtraceEvent oomScoreAdj.
             * @member {number} oomScoreAdj
             * @memberof perfetto.protos.TaskRenameFtraceEvent
             * @instance
             */
            TaskRenameFtraceEvent.prototype.oomScoreAdj = 0;

            /**
             * Creates a new TaskRenameFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TaskRenameFtraceEvent
             * @static
             * @param {perfetto.protos.ITaskRenameFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TaskRenameFtraceEvent} TaskRenameFtraceEvent instance
             */
            TaskRenameFtraceEvent.create = function create(properties) {
                return new TaskRenameFtraceEvent(properties);
            };

            /**
             * Encodes the specified TaskRenameFtraceEvent message. Does not implicitly {@link perfetto.protos.TaskRenameFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TaskRenameFtraceEvent
             * @static
             * @param {perfetto.protos.ITaskRenameFtraceEvent} m TaskRenameFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TaskRenameFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(8).int32(m.pid);
                if (m.oldcomm != null && Object.hasOwnProperty.call(m, "oldcomm"))
                    w.uint32(18).string(m.oldcomm);
                if (m.newcomm != null && Object.hasOwnProperty.call(m, "newcomm"))
                    w.uint32(26).string(m.newcomm);
                if (m.oomScoreAdj != null && Object.hasOwnProperty.call(m, "oomScoreAdj"))
                    w.uint32(32).int32(m.oomScoreAdj);
                return w;
            };

            /**
             * Encodes the specified TaskRenameFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TaskRenameFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TaskRenameFtraceEvent
             * @static
             * @param {perfetto.protos.ITaskRenameFtraceEvent} message TaskRenameFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TaskRenameFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TaskRenameFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TaskRenameFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TaskRenameFtraceEvent} TaskRenameFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TaskRenameFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TaskRenameFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.pid = r.int32();
                        break;
                    case 2:
                        m.oldcomm = r.string();
                        break;
                    case 3:
                        m.newcomm = r.string();
                        break;
                    case 4:
                        m.oomScoreAdj = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TaskRenameFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TaskRenameFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TaskRenameFtraceEvent} TaskRenameFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TaskRenameFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TaskRenameFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.TaskRenameFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TaskRenameFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.oldcomm != null && m.hasOwnProperty("oldcomm")) {
                    if (!$util.isString(m.oldcomm))
                        return "oldcomm: string expected";
                }
                if (m.newcomm != null && m.hasOwnProperty("newcomm")) {
                    if (!$util.isString(m.newcomm))
                        return "newcomm: string expected";
                }
                if (m.oomScoreAdj != null && m.hasOwnProperty("oomScoreAdj")) {
                    if (!$util.isInteger(m.oomScoreAdj))
                        return "oomScoreAdj: integer expected";
                }
                return null;
            };

            /**
             * Creates a TaskRenameFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TaskRenameFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TaskRenameFtraceEvent} TaskRenameFtraceEvent
             */
            TaskRenameFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TaskRenameFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.TaskRenameFtraceEvent();
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                if (d.oldcomm != null) {
                    m.oldcomm = String(d.oldcomm);
                }
                if (d.newcomm != null) {
                    m.newcomm = String(d.newcomm);
                }
                if (d.oomScoreAdj != null) {
                    m.oomScoreAdj = d.oomScoreAdj | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a TaskRenameFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TaskRenameFtraceEvent
             * @static
             * @param {perfetto.protos.TaskRenameFtraceEvent} m TaskRenameFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TaskRenameFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.pid = 0;
                    d.oldcomm = "";
                    d.newcomm = "";
                    d.oomScoreAdj = 0;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.oldcomm != null && m.hasOwnProperty("oldcomm")) {
                    d.oldcomm = m.oldcomm;
                }
                if (m.newcomm != null && m.hasOwnProperty("newcomm")) {
                    d.newcomm = m.newcomm;
                }
                if (m.oomScoreAdj != null && m.hasOwnProperty("oomScoreAdj")) {
                    d.oomScoreAdj = m.oomScoreAdj;
                }
                return d;
            };

            /**
             * Converts this TaskRenameFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TaskRenameFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TaskRenameFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TaskRenameFtraceEvent;
        })();

        protos.TcpRetransmitSkbFtraceEvent = (function() {

            /**
             * Properties of a TcpRetransmitSkbFtraceEvent.
             * @memberof perfetto.protos
             * @interface ITcpRetransmitSkbFtraceEvent
             * @property {number|null} [daddr] TcpRetransmitSkbFtraceEvent daddr
             * @property {number|null} [dport] TcpRetransmitSkbFtraceEvent dport
             * @property {number|null} [saddr] TcpRetransmitSkbFtraceEvent saddr
             * @property {number|null} [skaddr] TcpRetransmitSkbFtraceEvent skaddr
             * @property {number|null} [skbaddr] TcpRetransmitSkbFtraceEvent skbaddr
             * @property {number|null} [sport] TcpRetransmitSkbFtraceEvent sport
             * @property {number|null} [state] TcpRetransmitSkbFtraceEvent state
             */

            /**
             * Constructs a new TcpRetransmitSkbFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TcpRetransmitSkbFtraceEvent.
             * @implements ITcpRetransmitSkbFtraceEvent
             * @constructor
             * @param {perfetto.protos.ITcpRetransmitSkbFtraceEvent=} [p] Properties to set
             */
            function TcpRetransmitSkbFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TcpRetransmitSkbFtraceEvent daddr.
             * @member {number} daddr
             * @memberof perfetto.protos.TcpRetransmitSkbFtraceEvent
             * @instance
             */
            TcpRetransmitSkbFtraceEvent.prototype.daddr = 0;

            /**
             * TcpRetransmitSkbFtraceEvent dport.
             * @member {number} dport
             * @memberof perfetto.protos.TcpRetransmitSkbFtraceEvent
             * @instance
             */
            TcpRetransmitSkbFtraceEvent.prototype.dport = 0;

            /**
             * TcpRetransmitSkbFtraceEvent saddr.
             * @member {number} saddr
             * @memberof perfetto.protos.TcpRetransmitSkbFtraceEvent
             * @instance
             */
            TcpRetransmitSkbFtraceEvent.prototype.saddr = 0;

            /**
             * TcpRetransmitSkbFtraceEvent skaddr.
             * @member {number} skaddr
             * @memberof perfetto.protos.TcpRetransmitSkbFtraceEvent
             * @instance
             */
            TcpRetransmitSkbFtraceEvent.prototype.skaddr = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TcpRetransmitSkbFtraceEvent skbaddr.
             * @member {number} skbaddr
             * @memberof perfetto.protos.TcpRetransmitSkbFtraceEvent
             * @instance
             */
            TcpRetransmitSkbFtraceEvent.prototype.skbaddr = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TcpRetransmitSkbFtraceEvent sport.
             * @member {number} sport
             * @memberof perfetto.protos.TcpRetransmitSkbFtraceEvent
             * @instance
             */
            TcpRetransmitSkbFtraceEvent.prototype.sport = 0;

            /**
             * TcpRetransmitSkbFtraceEvent state.
             * @member {number} state
             * @memberof perfetto.protos.TcpRetransmitSkbFtraceEvent
             * @instance
             */
            TcpRetransmitSkbFtraceEvent.prototype.state = 0;

            /**
             * Creates a new TcpRetransmitSkbFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TcpRetransmitSkbFtraceEvent
             * @static
             * @param {perfetto.protos.ITcpRetransmitSkbFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TcpRetransmitSkbFtraceEvent} TcpRetransmitSkbFtraceEvent instance
             */
            TcpRetransmitSkbFtraceEvent.create = function create(properties) {
                return new TcpRetransmitSkbFtraceEvent(properties);
            };

            /**
             * Encodes the specified TcpRetransmitSkbFtraceEvent message. Does not implicitly {@link perfetto.protos.TcpRetransmitSkbFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TcpRetransmitSkbFtraceEvent
             * @static
             * @param {perfetto.protos.ITcpRetransmitSkbFtraceEvent} m TcpRetransmitSkbFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TcpRetransmitSkbFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.daddr != null && Object.hasOwnProperty.call(m, "daddr"))
                    w.uint32(8).uint32(m.daddr);
                if (m.dport != null && Object.hasOwnProperty.call(m, "dport"))
                    w.uint32(16).uint32(m.dport);
                if (m.saddr != null && Object.hasOwnProperty.call(m, "saddr"))
                    w.uint32(24).uint32(m.saddr);
                if (m.skaddr != null && Object.hasOwnProperty.call(m, "skaddr"))
                    w.uint32(32).uint64(m.skaddr);
                if (m.skbaddr != null && Object.hasOwnProperty.call(m, "skbaddr"))
                    w.uint32(40).uint64(m.skbaddr);
                if (m.sport != null && Object.hasOwnProperty.call(m, "sport"))
                    w.uint32(48).uint32(m.sport);
                if (m.state != null && Object.hasOwnProperty.call(m, "state"))
                    w.uint32(56).int32(m.state);
                return w;
            };

            /**
             * Encodes the specified TcpRetransmitSkbFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TcpRetransmitSkbFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TcpRetransmitSkbFtraceEvent
             * @static
             * @param {perfetto.protos.ITcpRetransmitSkbFtraceEvent} message TcpRetransmitSkbFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TcpRetransmitSkbFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TcpRetransmitSkbFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TcpRetransmitSkbFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TcpRetransmitSkbFtraceEvent} TcpRetransmitSkbFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TcpRetransmitSkbFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TcpRetransmitSkbFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.daddr = r.uint32();
                        break;
                    case 2:
                        m.dport = r.uint32();
                        break;
                    case 3:
                        m.saddr = r.uint32();
                        break;
                    case 4:
                        m.skaddr = r.uint64();
                        break;
                    case 5:
                        m.skbaddr = r.uint64();
                        break;
                    case 6:
                        m.sport = r.uint32();
                        break;
                    case 7:
                        m.state = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TcpRetransmitSkbFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TcpRetransmitSkbFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TcpRetransmitSkbFtraceEvent} TcpRetransmitSkbFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TcpRetransmitSkbFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TcpRetransmitSkbFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.TcpRetransmitSkbFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TcpRetransmitSkbFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.daddr != null && m.hasOwnProperty("daddr")) {
                    if (!$util.isInteger(m.daddr))
                        return "daddr: integer expected";
                }
                if (m.dport != null && m.hasOwnProperty("dport")) {
                    if (!$util.isInteger(m.dport))
                        return "dport: integer expected";
                }
                if (m.saddr != null && m.hasOwnProperty("saddr")) {
                    if (!$util.isInteger(m.saddr))
                        return "saddr: integer expected";
                }
                if (m.skaddr != null && m.hasOwnProperty("skaddr")) {
                    if (!$util.isInteger(m.skaddr) && !(m.skaddr && $util.isInteger(m.skaddr.low) && $util.isInteger(m.skaddr.high)))
                        return "skaddr: integer|Long expected";
                }
                if (m.skbaddr != null && m.hasOwnProperty("skbaddr")) {
                    if (!$util.isInteger(m.skbaddr) && !(m.skbaddr && $util.isInteger(m.skbaddr.low) && $util.isInteger(m.skbaddr.high)))
                        return "skbaddr: integer|Long expected";
                }
                if (m.sport != null && m.hasOwnProperty("sport")) {
                    if (!$util.isInteger(m.sport))
                        return "sport: integer expected";
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    if (!$util.isInteger(m.state))
                        return "state: integer expected";
                }
                return null;
            };

            /**
             * Creates a TcpRetransmitSkbFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TcpRetransmitSkbFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TcpRetransmitSkbFtraceEvent} TcpRetransmitSkbFtraceEvent
             */
            TcpRetransmitSkbFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TcpRetransmitSkbFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.TcpRetransmitSkbFtraceEvent();
                if (d.daddr != null) {
                    m.daddr = d.daddr >>> 0;
                }
                if (d.dport != null) {
                    m.dport = d.dport >>> 0;
                }
                if (d.saddr != null) {
                    m.saddr = d.saddr >>> 0;
                }
                if (d.skaddr != null) {
                    if ($util.Long)
                        (m.skaddr = $util.Long.fromValue(d.skaddr)).unsigned = true;
                    else if (typeof d.skaddr === "string")
                        m.skaddr = parseInt(d.skaddr, 10);
                    else if (typeof d.skaddr === "number")
                        m.skaddr = d.skaddr;
                    else if (typeof d.skaddr === "object")
                        m.skaddr = new $util.LongBits(d.skaddr.low >>> 0, d.skaddr.high >>> 0).toNumber(true);
                }
                if (d.skbaddr != null) {
                    if ($util.Long)
                        (m.skbaddr = $util.Long.fromValue(d.skbaddr)).unsigned = true;
                    else if (typeof d.skbaddr === "string")
                        m.skbaddr = parseInt(d.skbaddr, 10);
                    else if (typeof d.skbaddr === "number")
                        m.skbaddr = d.skbaddr;
                    else if (typeof d.skbaddr === "object")
                        m.skbaddr = new $util.LongBits(d.skbaddr.low >>> 0, d.skbaddr.high >>> 0).toNumber(true);
                }
                if (d.sport != null) {
                    m.sport = d.sport >>> 0;
                }
                if (d.state != null) {
                    m.state = d.state | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a TcpRetransmitSkbFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TcpRetransmitSkbFtraceEvent
             * @static
             * @param {perfetto.protos.TcpRetransmitSkbFtraceEvent} m TcpRetransmitSkbFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TcpRetransmitSkbFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.daddr = 0;
                    d.dport = 0;
                    d.saddr = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.skaddr = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.skaddr = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.skbaddr = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.skbaddr = o.longs === String ? "0" : 0;
                    d.sport = 0;
                    d.state = 0;
                }
                if (m.daddr != null && m.hasOwnProperty("daddr")) {
                    d.daddr = m.daddr;
                }
                if (m.dport != null && m.hasOwnProperty("dport")) {
                    d.dport = m.dport;
                }
                if (m.saddr != null && m.hasOwnProperty("saddr")) {
                    d.saddr = m.saddr;
                }
                if (m.skaddr != null && m.hasOwnProperty("skaddr")) {
                    if (typeof m.skaddr === "number")
                        d.skaddr = o.longs === String ? String(m.skaddr) : m.skaddr;
                    else
                        d.skaddr = o.longs === String ? $util.Long.prototype.toString.call(m.skaddr) : o.longs === Number ? new $util.LongBits(m.skaddr.low >>> 0, m.skaddr.high >>> 0).toNumber(true) : m.skaddr;
                }
                if (m.skbaddr != null && m.hasOwnProperty("skbaddr")) {
                    if (typeof m.skbaddr === "number")
                        d.skbaddr = o.longs === String ? String(m.skbaddr) : m.skbaddr;
                    else
                        d.skbaddr = o.longs === String ? $util.Long.prototype.toString.call(m.skbaddr) : o.longs === Number ? new $util.LongBits(m.skbaddr.low >>> 0, m.skbaddr.high >>> 0).toNumber(true) : m.skbaddr;
                }
                if (m.sport != null && m.hasOwnProperty("sport")) {
                    d.sport = m.sport;
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    d.state = m.state;
                }
                return d;
            };

            /**
             * Converts this TcpRetransmitSkbFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TcpRetransmitSkbFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TcpRetransmitSkbFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TcpRetransmitSkbFtraceEvent;
        })();

        protos.ThermalTemperatureFtraceEvent = (function() {

            /**
             * Properties of a ThermalTemperatureFtraceEvent.
             * @memberof perfetto.protos
             * @interface IThermalTemperatureFtraceEvent
             * @property {number|null} [id] ThermalTemperatureFtraceEvent id
             * @property {number|null} [temp] ThermalTemperatureFtraceEvent temp
             * @property {number|null} [tempPrev] ThermalTemperatureFtraceEvent tempPrev
             * @property {string|null} [thermalZone] ThermalTemperatureFtraceEvent thermalZone
             */

            /**
             * Constructs a new ThermalTemperatureFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a ThermalTemperatureFtraceEvent.
             * @implements IThermalTemperatureFtraceEvent
             * @constructor
             * @param {perfetto.protos.IThermalTemperatureFtraceEvent=} [p] Properties to set
             */
            function ThermalTemperatureFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ThermalTemperatureFtraceEvent id.
             * @member {number} id
             * @memberof perfetto.protos.ThermalTemperatureFtraceEvent
             * @instance
             */
            ThermalTemperatureFtraceEvent.prototype.id = 0;

            /**
             * ThermalTemperatureFtraceEvent temp.
             * @member {number} temp
             * @memberof perfetto.protos.ThermalTemperatureFtraceEvent
             * @instance
             */
            ThermalTemperatureFtraceEvent.prototype.temp = 0;

            /**
             * ThermalTemperatureFtraceEvent tempPrev.
             * @member {number} tempPrev
             * @memberof perfetto.protos.ThermalTemperatureFtraceEvent
             * @instance
             */
            ThermalTemperatureFtraceEvent.prototype.tempPrev = 0;

            /**
             * ThermalTemperatureFtraceEvent thermalZone.
             * @member {string} thermalZone
             * @memberof perfetto.protos.ThermalTemperatureFtraceEvent
             * @instance
             */
            ThermalTemperatureFtraceEvent.prototype.thermalZone = "";

            /**
             * Creates a new ThermalTemperatureFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ThermalTemperatureFtraceEvent
             * @static
             * @param {perfetto.protos.IThermalTemperatureFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.ThermalTemperatureFtraceEvent} ThermalTemperatureFtraceEvent instance
             */
            ThermalTemperatureFtraceEvent.create = function create(properties) {
                return new ThermalTemperatureFtraceEvent(properties);
            };

            /**
             * Encodes the specified ThermalTemperatureFtraceEvent message. Does not implicitly {@link perfetto.protos.ThermalTemperatureFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ThermalTemperatureFtraceEvent
             * @static
             * @param {perfetto.protos.IThermalTemperatureFtraceEvent} m ThermalTemperatureFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ThermalTemperatureFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.id != null && Object.hasOwnProperty.call(m, "id"))
                    w.uint32(8).int32(m.id);
                if (m.temp != null && Object.hasOwnProperty.call(m, "temp"))
                    w.uint32(16).int32(m.temp);
                if (m.tempPrev != null && Object.hasOwnProperty.call(m, "tempPrev"))
                    w.uint32(24).int32(m.tempPrev);
                if (m.thermalZone != null && Object.hasOwnProperty.call(m, "thermalZone"))
                    w.uint32(34).string(m.thermalZone);
                return w;
            };

            /**
             * Encodes the specified ThermalTemperatureFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.ThermalTemperatureFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ThermalTemperatureFtraceEvent
             * @static
             * @param {perfetto.protos.IThermalTemperatureFtraceEvent} message ThermalTemperatureFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ThermalTemperatureFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ThermalTemperatureFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ThermalTemperatureFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ThermalTemperatureFtraceEvent} ThermalTemperatureFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ThermalTemperatureFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ThermalTemperatureFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.id = r.int32();
                        break;
                    case 2:
                        m.temp = r.int32();
                        break;
                    case 3:
                        m.tempPrev = r.int32();
                        break;
                    case 4:
                        m.thermalZone = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ThermalTemperatureFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ThermalTemperatureFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ThermalTemperatureFtraceEvent} ThermalTemperatureFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ThermalTemperatureFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ThermalTemperatureFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.ThermalTemperatureFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ThermalTemperatureFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.id != null && m.hasOwnProperty("id")) {
                    if (!$util.isInteger(m.id))
                        return "id: integer expected";
                }
                if (m.temp != null && m.hasOwnProperty("temp")) {
                    if (!$util.isInteger(m.temp))
                        return "temp: integer expected";
                }
                if (m.tempPrev != null && m.hasOwnProperty("tempPrev")) {
                    if (!$util.isInteger(m.tempPrev))
                        return "tempPrev: integer expected";
                }
                if (m.thermalZone != null && m.hasOwnProperty("thermalZone")) {
                    if (!$util.isString(m.thermalZone))
                        return "thermalZone: string expected";
                }
                return null;
            };

            /**
             * Creates a ThermalTemperatureFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ThermalTemperatureFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ThermalTemperatureFtraceEvent} ThermalTemperatureFtraceEvent
             */
            ThermalTemperatureFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ThermalTemperatureFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.ThermalTemperatureFtraceEvent();
                if (d.id != null) {
                    m.id = d.id | 0;
                }
                if (d.temp != null) {
                    m.temp = d.temp | 0;
                }
                if (d.tempPrev != null) {
                    m.tempPrev = d.tempPrev | 0;
                }
                if (d.thermalZone != null) {
                    m.thermalZone = String(d.thermalZone);
                }
                return m;
            };

            /**
             * Creates a plain object from a ThermalTemperatureFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ThermalTemperatureFtraceEvent
             * @static
             * @param {perfetto.protos.ThermalTemperatureFtraceEvent} m ThermalTemperatureFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ThermalTemperatureFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.id = 0;
                    d.temp = 0;
                    d.tempPrev = 0;
                    d.thermalZone = "";
                }
                if (m.id != null && m.hasOwnProperty("id")) {
                    d.id = m.id;
                }
                if (m.temp != null && m.hasOwnProperty("temp")) {
                    d.temp = m.temp;
                }
                if (m.tempPrev != null && m.hasOwnProperty("tempPrev")) {
                    d.tempPrev = m.tempPrev;
                }
                if (m.thermalZone != null && m.hasOwnProperty("thermalZone")) {
                    d.thermalZone = m.thermalZone;
                }
                return d;
            };

            /**
             * Converts this ThermalTemperatureFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ThermalTemperatureFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ThermalTemperatureFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ThermalTemperatureFtraceEvent;
        })();

        protos.CdevUpdateFtraceEvent = (function() {

            /**
             * Properties of a CdevUpdateFtraceEvent.
             * @memberof perfetto.protos
             * @interface ICdevUpdateFtraceEvent
             * @property {number|null} [target] CdevUpdateFtraceEvent target
             * @property {string|null} [type] CdevUpdateFtraceEvent type
             */

            /**
             * Constructs a new CdevUpdateFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a CdevUpdateFtraceEvent.
             * @implements ICdevUpdateFtraceEvent
             * @constructor
             * @param {perfetto.protos.ICdevUpdateFtraceEvent=} [p] Properties to set
             */
            function CdevUpdateFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * CdevUpdateFtraceEvent target.
             * @member {number} target
             * @memberof perfetto.protos.CdevUpdateFtraceEvent
             * @instance
             */
            CdevUpdateFtraceEvent.prototype.target = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * CdevUpdateFtraceEvent type.
             * @member {string} type
             * @memberof perfetto.protos.CdevUpdateFtraceEvent
             * @instance
             */
            CdevUpdateFtraceEvent.prototype.type = "";

            /**
             * Creates a new CdevUpdateFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.CdevUpdateFtraceEvent
             * @static
             * @param {perfetto.protos.ICdevUpdateFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.CdevUpdateFtraceEvent} CdevUpdateFtraceEvent instance
             */
            CdevUpdateFtraceEvent.create = function create(properties) {
                return new CdevUpdateFtraceEvent(properties);
            };

            /**
             * Encodes the specified CdevUpdateFtraceEvent message. Does not implicitly {@link perfetto.protos.CdevUpdateFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.CdevUpdateFtraceEvent
             * @static
             * @param {perfetto.protos.ICdevUpdateFtraceEvent} m CdevUpdateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CdevUpdateFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.target != null && Object.hasOwnProperty.call(m, "target"))
                    w.uint32(8).uint64(m.target);
                if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                    w.uint32(18).string(m.type);
                return w;
            };

            /**
             * Encodes the specified CdevUpdateFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.CdevUpdateFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.CdevUpdateFtraceEvent
             * @static
             * @param {perfetto.protos.ICdevUpdateFtraceEvent} message CdevUpdateFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CdevUpdateFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CdevUpdateFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.CdevUpdateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.CdevUpdateFtraceEvent} CdevUpdateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CdevUpdateFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.CdevUpdateFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.target = r.uint64();
                        break;
                    case 2:
                        m.type = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a CdevUpdateFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.CdevUpdateFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.CdevUpdateFtraceEvent} CdevUpdateFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CdevUpdateFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CdevUpdateFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.CdevUpdateFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CdevUpdateFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.target != null && m.hasOwnProperty("target")) {
                    if (!$util.isInteger(m.target) && !(m.target && $util.isInteger(m.target.low) && $util.isInteger(m.target.high)))
                        return "target: integer|Long expected";
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    if (!$util.isString(m.type))
                        return "type: string expected";
                }
                return null;
            };

            /**
             * Creates a CdevUpdateFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.CdevUpdateFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.CdevUpdateFtraceEvent} CdevUpdateFtraceEvent
             */
            CdevUpdateFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.CdevUpdateFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.CdevUpdateFtraceEvent();
                if (d.target != null) {
                    if ($util.Long)
                        (m.target = $util.Long.fromValue(d.target)).unsigned = true;
                    else if (typeof d.target === "string")
                        m.target = parseInt(d.target, 10);
                    else if (typeof d.target === "number")
                        m.target = d.target;
                    else if (typeof d.target === "object")
                        m.target = new $util.LongBits(d.target.low >>> 0, d.target.high >>> 0).toNumber(true);
                }
                if (d.type != null) {
                    m.type = String(d.type);
                }
                return m;
            };

            /**
             * Creates a plain object from a CdevUpdateFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.CdevUpdateFtraceEvent
             * @static
             * @param {perfetto.protos.CdevUpdateFtraceEvent} m CdevUpdateFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CdevUpdateFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.target = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.target = o.longs === String ? "0" : 0;
                    d.type = "";
                }
                if (m.target != null && m.hasOwnProperty("target")) {
                    if (typeof m.target === "number")
                        d.target = o.longs === String ? String(m.target) : m.target;
                    else
                        d.target = o.longs === String ? $util.Long.prototype.toString.call(m.target) : o.longs === Number ? new $util.LongBits(m.target.low >>> 0, m.target.high >>> 0).toNumber(true) : m.target;
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    d.type = m.type;
                }
                return d;
            };

            /**
             * Converts this CdevUpdateFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.CdevUpdateFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CdevUpdateFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return CdevUpdateFtraceEvent;
        })();

        protos.TrustySmcFtraceEvent = (function() {

            /**
             * Properties of a TrustySmcFtraceEvent.
             * @memberof perfetto.protos
             * @interface ITrustySmcFtraceEvent
             * @property {number|null} [r0] TrustySmcFtraceEvent r0
             * @property {number|null} [r1] TrustySmcFtraceEvent r1
             * @property {number|null} [r2] TrustySmcFtraceEvent r2
             * @property {number|null} [r3] TrustySmcFtraceEvent r3
             */

            /**
             * Constructs a new TrustySmcFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TrustySmcFtraceEvent.
             * @implements ITrustySmcFtraceEvent
             * @constructor
             * @param {perfetto.protos.ITrustySmcFtraceEvent=} [p] Properties to set
             */
            function TrustySmcFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TrustySmcFtraceEvent r0.
             * @member {number} r0
             * @memberof perfetto.protos.TrustySmcFtraceEvent
             * @instance
             */
            TrustySmcFtraceEvent.prototype.r0 = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TrustySmcFtraceEvent r1.
             * @member {number} r1
             * @memberof perfetto.protos.TrustySmcFtraceEvent
             * @instance
             */
            TrustySmcFtraceEvent.prototype.r1 = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TrustySmcFtraceEvent r2.
             * @member {number} r2
             * @memberof perfetto.protos.TrustySmcFtraceEvent
             * @instance
             */
            TrustySmcFtraceEvent.prototype.r2 = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TrustySmcFtraceEvent r3.
             * @member {number} r3
             * @memberof perfetto.protos.TrustySmcFtraceEvent
             * @instance
             */
            TrustySmcFtraceEvent.prototype.r3 = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new TrustySmcFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrustySmcFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustySmcFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TrustySmcFtraceEvent} TrustySmcFtraceEvent instance
             */
            TrustySmcFtraceEvent.create = function create(properties) {
                return new TrustySmcFtraceEvent(properties);
            };

            /**
             * Encodes the specified TrustySmcFtraceEvent message. Does not implicitly {@link perfetto.protos.TrustySmcFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrustySmcFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustySmcFtraceEvent} m TrustySmcFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustySmcFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.r0 != null && Object.hasOwnProperty.call(m, "r0"))
                    w.uint32(8).uint64(m.r0);
                if (m.r1 != null && Object.hasOwnProperty.call(m, "r1"))
                    w.uint32(16).uint64(m.r1);
                if (m.r2 != null && Object.hasOwnProperty.call(m, "r2"))
                    w.uint32(24).uint64(m.r2);
                if (m.r3 != null && Object.hasOwnProperty.call(m, "r3"))
                    w.uint32(32).uint64(m.r3);
                return w;
            };

            /**
             * Encodes the specified TrustySmcFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TrustySmcFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrustySmcFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustySmcFtraceEvent} message TrustySmcFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustySmcFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrustySmcFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrustySmcFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrustySmcFtraceEvent} TrustySmcFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustySmcFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrustySmcFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.r0 = r.uint64();
                        break;
                    case 2:
                        m.r1 = r.uint64();
                        break;
                    case 3:
                        m.r2 = r.uint64();
                        break;
                    case 4:
                        m.r3 = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrustySmcFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrustySmcFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrustySmcFtraceEvent} TrustySmcFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustySmcFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrustySmcFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.TrustySmcFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrustySmcFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.r0 != null && m.hasOwnProperty("r0")) {
                    if (!$util.isInteger(m.r0) && !(m.r0 && $util.isInteger(m.r0.low) && $util.isInteger(m.r0.high)))
                        return "r0: integer|Long expected";
                }
                if (m.r1 != null && m.hasOwnProperty("r1")) {
                    if (!$util.isInteger(m.r1) && !(m.r1 && $util.isInteger(m.r1.low) && $util.isInteger(m.r1.high)))
                        return "r1: integer|Long expected";
                }
                if (m.r2 != null && m.hasOwnProperty("r2")) {
                    if (!$util.isInteger(m.r2) && !(m.r2 && $util.isInteger(m.r2.low) && $util.isInteger(m.r2.high)))
                        return "r2: integer|Long expected";
                }
                if (m.r3 != null && m.hasOwnProperty("r3")) {
                    if (!$util.isInteger(m.r3) && !(m.r3 && $util.isInteger(m.r3.low) && $util.isInteger(m.r3.high)))
                        return "r3: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a TrustySmcFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrustySmcFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrustySmcFtraceEvent} TrustySmcFtraceEvent
             */
            TrustySmcFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrustySmcFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.TrustySmcFtraceEvent();
                if (d.r0 != null) {
                    if ($util.Long)
                        (m.r0 = $util.Long.fromValue(d.r0)).unsigned = true;
                    else if (typeof d.r0 === "string")
                        m.r0 = parseInt(d.r0, 10);
                    else if (typeof d.r0 === "number")
                        m.r0 = d.r0;
                    else if (typeof d.r0 === "object")
                        m.r0 = new $util.LongBits(d.r0.low >>> 0, d.r0.high >>> 0).toNumber(true);
                }
                if (d.r1 != null) {
                    if ($util.Long)
                        (m.r1 = $util.Long.fromValue(d.r1)).unsigned = true;
                    else if (typeof d.r1 === "string")
                        m.r1 = parseInt(d.r1, 10);
                    else if (typeof d.r1 === "number")
                        m.r1 = d.r1;
                    else if (typeof d.r1 === "object")
                        m.r1 = new $util.LongBits(d.r1.low >>> 0, d.r1.high >>> 0).toNumber(true);
                }
                if (d.r2 != null) {
                    if ($util.Long)
                        (m.r2 = $util.Long.fromValue(d.r2)).unsigned = true;
                    else if (typeof d.r2 === "string")
                        m.r2 = parseInt(d.r2, 10);
                    else if (typeof d.r2 === "number")
                        m.r2 = d.r2;
                    else if (typeof d.r2 === "object")
                        m.r2 = new $util.LongBits(d.r2.low >>> 0, d.r2.high >>> 0).toNumber(true);
                }
                if (d.r3 != null) {
                    if ($util.Long)
                        (m.r3 = $util.Long.fromValue(d.r3)).unsigned = true;
                    else if (typeof d.r3 === "string")
                        m.r3 = parseInt(d.r3, 10);
                    else if (typeof d.r3 === "number")
                        m.r3 = d.r3;
                    else if (typeof d.r3 === "object")
                        m.r3 = new $util.LongBits(d.r3.low >>> 0, d.r3.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a TrustySmcFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrustySmcFtraceEvent
             * @static
             * @param {perfetto.protos.TrustySmcFtraceEvent} m TrustySmcFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrustySmcFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.r0 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.r0 = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.r1 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.r1 = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.r2 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.r2 = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.r3 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.r3 = o.longs === String ? "0" : 0;
                }
                if (m.r0 != null && m.hasOwnProperty("r0")) {
                    if (typeof m.r0 === "number")
                        d.r0 = o.longs === String ? String(m.r0) : m.r0;
                    else
                        d.r0 = o.longs === String ? $util.Long.prototype.toString.call(m.r0) : o.longs === Number ? new $util.LongBits(m.r0.low >>> 0, m.r0.high >>> 0).toNumber(true) : m.r0;
                }
                if (m.r1 != null && m.hasOwnProperty("r1")) {
                    if (typeof m.r1 === "number")
                        d.r1 = o.longs === String ? String(m.r1) : m.r1;
                    else
                        d.r1 = o.longs === String ? $util.Long.prototype.toString.call(m.r1) : o.longs === Number ? new $util.LongBits(m.r1.low >>> 0, m.r1.high >>> 0).toNumber(true) : m.r1;
                }
                if (m.r2 != null && m.hasOwnProperty("r2")) {
                    if (typeof m.r2 === "number")
                        d.r2 = o.longs === String ? String(m.r2) : m.r2;
                    else
                        d.r2 = o.longs === String ? $util.Long.prototype.toString.call(m.r2) : o.longs === Number ? new $util.LongBits(m.r2.low >>> 0, m.r2.high >>> 0).toNumber(true) : m.r2;
                }
                if (m.r3 != null && m.hasOwnProperty("r3")) {
                    if (typeof m.r3 === "number")
                        d.r3 = o.longs === String ? String(m.r3) : m.r3;
                    else
                        d.r3 = o.longs === String ? $util.Long.prototype.toString.call(m.r3) : o.longs === Number ? new $util.LongBits(m.r3.low >>> 0, m.r3.high >>> 0).toNumber(true) : m.r3;
                }
                return d;
            };

            /**
             * Converts this TrustySmcFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrustySmcFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrustySmcFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrustySmcFtraceEvent;
        })();

        protos.TrustySmcDoneFtraceEvent = (function() {

            /**
             * Properties of a TrustySmcDoneFtraceEvent.
             * @memberof perfetto.protos
             * @interface ITrustySmcDoneFtraceEvent
             * @property {number|null} [ret] TrustySmcDoneFtraceEvent ret
             */

            /**
             * Constructs a new TrustySmcDoneFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TrustySmcDoneFtraceEvent.
             * @implements ITrustySmcDoneFtraceEvent
             * @constructor
             * @param {perfetto.protos.ITrustySmcDoneFtraceEvent=} [p] Properties to set
             */
            function TrustySmcDoneFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TrustySmcDoneFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.TrustySmcDoneFtraceEvent
             * @instance
             */
            TrustySmcDoneFtraceEvent.prototype.ret = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new TrustySmcDoneFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrustySmcDoneFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustySmcDoneFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TrustySmcDoneFtraceEvent} TrustySmcDoneFtraceEvent instance
             */
            TrustySmcDoneFtraceEvent.create = function create(properties) {
                return new TrustySmcDoneFtraceEvent(properties);
            };

            /**
             * Encodes the specified TrustySmcDoneFtraceEvent message. Does not implicitly {@link perfetto.protos.TrustySmcDoneFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrustySmcDoneFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustySmcDoneFtraceEvent} m TrustySmcDoneFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustySmcDoneFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(8).uint64(m.ret);
                return w;
            };

            /**
             * Encodes the specified TrustySmcDoneFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TrustySmcDoneFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrustySmcDoneFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustySmcDoneFtraceEvent} message TrustySmcDoneFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustySmcDoneFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrustySmcDoneFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrustySmcDoneFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrustySmcDoneFtraceEvent} TrustySmcDoneFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustySmcDoneFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrustySmcDoneFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.ret = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrustySmcDoneFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrustySmcDoneFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrustySmcDoneFtraceEvent} TrustySmcDoneFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustySmcDoneFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrustySmcDoneFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.TrustySmcDoneFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrustySmcDoneFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret) && !(m.ret && $util.isInteger(m.ret.low) && $util.isInteger(m.ret.high)))
                        return "ret: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a TrustySmcDoneFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrustySmcDoneFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrustySmcDoneFtraceEvent} TrustySmcDoneFtraceEvent
             */
            TrustySmcDoneFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrustySmcDoneFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.TrustySmcDoneFtraceEvent();
                if (d.ret != null) {
                    if ($util.Long)
                        (m.ret = $util.Long.fromValue(d.ret)).unsigned = true;
                    else if (typeof d.ret === "string")
                        m.ret = parseInt(d.ret, 10);
                    else if (typeof d.ret === "number")
                        m.ret = d.ret;
                    else if (typeof d.ret === "object")
                        m.ret = new $util.LongBits(d.ret.low >>> 0, d.ret.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a TrustySmcDoneFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrustySmcDoneFtraceEvent
             * @static
             * @param {perfetto.protos.TrustySmcDoneFtraceEvent} m TrustySmcDoneFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrustySmcDoneFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ret = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ret = o.longs === String ? "0" : 0;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (typeof m.ret === "number")
                        d.ret = o.longs === String ? String(m.ret) : m.ret;
                    else
                        d.ret = o.longs === String ? $util.Long.prototype.toString.call(m.ret) : o.longs === Number ? new $util.LongBits(m.ret.low >>> 0, m.ret.high >>> 0).toNumber(true) : m.ret;
                }
                return d;
            };

            /**
             * Converts this TrustySmcDoneFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrustySmcDoneFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrustySmcDoneFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrustySmcDoneFtraceEvent;
        })();

        protos.TrustyStdCall32FtraceEvent = (function() {

            /**
             * Properties of a TrustyStdCall32FtraceEvent.
             * @memberof perfetto.protos
             * @interface ITrustyStdCall32FtraceEvent
             * @property {number|null} [r0] TrustyStdCall32FtraceEvent r0
             * @property {number|null} [r1] TrustyStdCall32FtraceEvent r1
             * @property {number|null} [r2] TrustyStdCall32FtraceEvent r2
             * @property {number|null} [r3] TrustyStdCall32FtraceEvent r3
             */

            /**
             * Constructs a new TrustyStdCall32FtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TrustyStdCall32FtraceEvent.
             * @implements ITrustyStdCall32FtraceEvent
             * @constructor
             * @param {perfetto.protos.ITrustyStdCall32FtraceEvent=} [p] Properties to set
             */
            function TrustyStdCall32FtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TrustyStdCall32FtraceEvent r0.
             * @member {number} r0
             * @memberof perfetto.protos.TrustyStdCall32FtraceEvent
             * @instance
             */
            TrustyStdCall32FtraceEvent.prototype.r0 = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TrustyStdCall32FtraceEvent r1.
             * @member {number} r1
             * @memberof perfetto.protos.TrustyStdCall32FtraceEvent
             * @instance
             */
            TrustyStdCall32FtraceEvent.prototype.r1 = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TrustyStdCall32FtraceEvent r2.
             * @member {number} r2
             * @memberof perfetto.protos.TrustyStdCall32FtraceEvent
             * @instance
             */
            TrustyStdCall32FtraceEvent.prototype.r2 = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TrustyStdCall32FtraceEvent r3.
             * @member {number} r3
             * @memberof perfetto.protos.TrustyStdCall32FtraceEvent
             * @instance
             */
            TrustyStdCall32FtraceEvent.prototype.r3 = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new TrustyStdCall32FtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrustyStdCall32FtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyStdCall32FtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TrustyStdCall32FtraceEvent} TrustyStdCall32FtraceEvent instance
             */
            TrustyStdCall32FtraceEvent.create = function create(properties) {
                return new TrustyStdCall32FtraceEvent(properties);
            };

            /**
             * Encodes the specified TrustyStdCall32FtraceEvent message. Does not implicitly {@link perfetto.protos.TrustyStdCall32FtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrustyStdCall32FtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyStdCall32FtraceEvent} m TrustyStdCall32FtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyStdCall32FtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.r0 != null && Object.hasOwnProperty.call(m, "r0"))
                    w.uint32(8).uint64(m.r0);
                if (m.r1 != null && Object.hasOwnProperty.call(m, "r1"))
                    w.uint32(16).uint64(m.r1);
                if (m.r2 != null && Object.hasOwnProperty.call(m, "r2"))
                    w.uint32(24).uint64(m.r2);
                if (m.r3 != null && Object.hasOwnProperty.call(m, "r3"))
                    w.uint32(32).uint64(m.r3);
                return w;
            };

            /**
             * Encodes the specified TrustyStdCall32FtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TrustyStdCall32FtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrustyStdCall32FtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyStdCall32FtraceEvent} message TrustyStdCall32FtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyStdCall32FtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrustyStdCall32FtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrustyStdCall32FtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrustyStdCall32FtraceEvent} TrustyStdCall32FtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyStdCall32FtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrustyStdCall32FtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.r0 = r.uint64();
                        break;
                    case 2:
                        m.r1 = r.uint64();
                        break;
                    case 3:
                        m.r2 = r.uint64();
                        break;
                    case 4:
                        m.r3 = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrustyStdCall32FtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrustyStdCall32FtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrustyStdCall32FtraceEvent} TrustyStdCall32FtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyStdCall32FtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrustyStdCall32FtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.TrustyStdCall32FtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrustyStdCall32FtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.r0 != null && m.hasOwnProperty("r0")) {
                    if (!$util.isInteger(m.r0) && !(m.r0 && $util.isInteger(m.r0.low) && $util.isInteger(m.r0.high)))
                        return "r0: integer|Long expected";
                }
                if (m.r1 != null && m.hasOwnProperty("r1")) {
                    if (!$util.isInteger(m.r1) && !(m.r1 && $util.isInteger(m.r1.low) && $util.isInteger(m.r1.high)))
                        return "r1: integer|Long expected";
                }
                if (m.r2 != null && m.hasOwnProperty("r2")) {
                    if (!$util.isInteger(m.r2) && !(m.r2 && $util.isInteger(m.r2.low) && $util.isInteger(m.r2.high)))
                        return "r2: integer|Long expected";
                }
                if (m.r3 != null && m.hasOwnProperty("r3")) {
                    if (!$util.isInteger(m.r3) && !(m.r3 && $util.isInteger(m.r3.low) && $util.isInteger(m.r3.high)))
                        return "r3: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a TrustyStdCall32FtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrustyStdCall32FtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrustyStdCall32FtraceEvent} TrustyStdCall32FtraceEvent
             */
            TrustyStdCall32FtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrustyStdCall32FtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.TrustyStdCall32FtraceEvent();
                if (d.r0 != null) {
                    if ($util.Long)
                        (m.r0 = $util.Long.fromValue(d.r0)).unsigned = true;
                    else if (typeof d.r0 === "string")
                        m.r0 = parseInt(d.r0, 10);
                    else if (typeof d.r0 === "number")
                        m.r0 = d.r0;
                    else if (typeof d.r0 === "object")
                        m.r0 = new $util.LongBits(d.r0.low >>> 0, d.r0.high >>> 0).toNumber(true);
                }
                if (d.r1 != null) {
                    if ($util.Long)
                        (m.r1 = $util.Long.fromValue(d.r1)).unsigned = true;
                    else if (typeof d.r1 === "string")
                        m.r1 = parseInt(d.r1, 10);
                    else if (typeof d.r1 === "number")
                        m.r1 = d.r1;
                    else if (typeof d.r1 === "object")
                        m.r1 = new $util.LongBits(d.r1.low >>> 0, d.r1.high >>> 0).toNumber(true);
                }
                if (d.r2 != null) {
                    if ($util.Long)
                        (m.r2 = $util.Long.fromValue(d.r2)).unsigned = true;
                    else if (typeof d.r2 === "string")
                        m.r2 = parseInt(d.r2, 10);
                    else if (typeof d.r2 === "number")
                        m.r2 = d.r2;
                    else if (typeof d.r2 === "object")
                        m.r2 = new $util.LongBits(d.r2.low >>> 0, d.r2.high >>> 0).toNumber(true);
                }
                if (d.r3 != null) {
                    if ($util.Long)
                        (m.r3 = $util.Long.fromValue(d.r3)).unsigned = true;
                    else if (typeof d.r3 === "string")
                        m.r3 = parseInt(d.r3, 10);
                    else if (typeof d.r3 === "number")
                        m.r3 = d.r3;
                    else if (typeof d.r3 === "object")
                        m.r3 = new $util.LongBits(d.r3.low >>> 0, d.r3.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a TrustyStdCall32FtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrustyStdCall32FtraceEvent
             * @static
             * @param {perfetto.protos.TrustyStdCall32FtraceEvent} m TrustyStdCall32FtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrustyStdCall32FtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.r0 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.r0 = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.r1 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.r1 = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.r2 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.r2 = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.r3 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.r3 = o.longs === String ? "0" : 0;
                }
                if (m.r0 != null && m.hasOwnProperty("r0")) {
                    if (typeof m.r0 === "number")
                        d.r0 = o.longs === String ? String(m.r0) : m.r0;
                    else
                        d.r0 = o.longs === String ? $util.Long.prototype.toString.call(m.r0) : o.longs === Number ? new $util.LongBits(m.r0.low >>> 0, m.r0.high >>> 0).toNumber(true) : m.r0;
                }
                if (m.r1 != null && m.hasOwnProperty("r1")) {
                    if (typeof m.r1 === "number")
                        d.r1 = o.longs === String ? String(m.r1) : m.r1;
                    else
                        d.r1 = o.longs === String ? $util.Long.prototype.toString.call(m.r1) : o.longs === Number ? new $util.LongBits(m.r1.low >>> 0, m.r1.high >>> 0).toNumber(true) : m.r1;
                }
                if (m.r2 != null && m.hasOwnProperty("r2")) {
                    if (typeof m.r2 === "number")
                        d.r2 = o.longs === String ? String(m.r2) : m.r2;
                    else
                        d.r2 = o.longs === String ? $util.Long.prototype.toString.call(m.r2) : o.longs === Number ? new $util.LongBits(m.r2.low >>> 0, m.r2.high >>> 0).toNumber(true) : m.r2;
                }
                if (m.r3 != null && m.hasOwnProperty("r3")) {
                    if (typeof m.r3 === "number")
                        d.r3 = o.longs === String ? String(m.r3) : m.r3;
                    else
                        d.r3 = o.longs === String ? $util.Long.prototype.toString.call(m.r3) : o.longs === Number ? new $util.LongBits(m.r3.low >>> 0, m.r3.high >>> 0).toNumber(true) : m.r3;
                }
                return d;
            };

            /**
             * Converts this TrustyStdCall32FtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrustyStdCall32FtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrustyStdCall32FtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrustyStdCall32FtraceEvent;
        })();

        protos.TrustyStdCall32DoneFtraceEvent = (function() {

            /**
             * Properties of a TrustyStdCall32DoneFtraceEvent.
             * @memberof perfetto.protos
             * @interface ITrustyStdCall32DoneFtraceEvent
             * @property {number|null} [ret] TrustyStdCall32DoneFtraceEvent ret
             */

            /**
             * Constructs a new TrustyStdCall32DoneFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TrustyStdCall32DoneFtraceEvent.
             * @implements ITrustyStdCall32DoneFtraceEvent
             * @constructor
             * @param {perfetto.protos.ITrustyStdCall32DoneFtraceEvent=} [p] Properties to set
             */
            function TrustyStdCall32DoneFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TrustyStdCall32DoneFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.TrustyStdCall32DoneFtraceEvent
             * @instance
             */
            TrustyStdCall32DoneFtraceEvent.prototype.ret = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new TrustyStdCall32DoneFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrustyStdCall32DoneFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyStdCall32DoneFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TrustyStdCall32DoneFtraceEvent} TrustyStdCall32DoneFtraceEvent instance
             */
            TrustyStdCall32DoneFtraceEvent.create = function create(properties) {
                return new TrustyStdCall32DoneFtraceEvent(properties);
            };

            /**
             * Encodes the specified TrustyStdCall32DoneFtraceEvent message. Does not implicitly {@link perfetto.protos.TrustyStdCall32DoneFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrustyStdCall32DoneFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyStdCall32DoneFtraceEvent} m TrustyStdCall32DoneFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyStdCall32DoneFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(8).int64(m.ret);
                return w;
            };

            /**
             * Encodes the specified TrustyStdCall32DoneFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TrustyStdCall32DoneFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrustyStdCall32DoneFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyStdCall32DoneFtraceEvent} message TrustyStdCall32DoneFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyStdCall32DoneFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrustyStdCall32DoneFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrustyStdCall32DoneFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrustyStdCall32DoneFtraceEvent} TrustyStdCall32DoneFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyStdCall32DoneFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrustyStdCall32DoneFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.ret = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrustyStdCall32DoneFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrustyStdCall32DoneFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrustyStdCall32DoneFtraceEvent} TrustyStdCall32DoneFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyStdCall32DoneFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrustyStdCall32DoneFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.TrustyStdCall32DoneFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrustyStdCall32DoneFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret) && !(m.ret && $util.isInteger(m.ret.low) && $util.isInteger(m.ret.high)))
                        return "ret: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a TrustyStdCall32DoneFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrustyStdCall32DoneFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrustyStdCall32DoneFtraceEvent} TrustyStdCall32DoneFtraceEvent
             */
            TrustyStdCall32DoneFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrustyStdCall32DoneFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.TrustyStdCall32DoneFtraceEvent();
                if (d.ret != null) {
                    if ($util.Long)
                        (m.ret = $util.Long.fromValue(d.ret)).unsigned = false;
                    else if (typeof d.ret === "string")
                        m.ret = parseInt(d.ret, 10);
                    else if (typeof d.ret === "number")
                        m.ret = d.ret;
                    else if (typeof d.ret === "object")
                        m.ret = new $util.LongBits(d.ret.low >>> 0, d.ret.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from a TrustyStdCall32DoneFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrustyStdCall32DoneFtraceEvent
             * @static
             * @param {perfetto.protos.TrustyStdCall32DoneFtraceEvent} m TrustyStdCall32DoneFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrustyStdCall32DoneFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.ret = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ret = o.longs === String ? "0" : 0;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (typeof m.ret === "number")
                        d.ret = o.longs === String ? String(m.ret) : m.ret;
                    else
                        d.ret = o.longs === String ? $util.Long.prototype.toString.call(m.ret) : o.longs === Number ? new $util.LongBits(m.ret.low >>> 0, m.ret.high >>> 0).toNumber() : m.ret;
                }
                return d;
            };

            /**
             * Converts this TrustyStdCall32DoneFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrustyStdCall32DoneFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrustyStdCall32DoneFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrustyStdCall32DoneFtraceEvent;
        })();

        protos.TrustyShareMemoryFtraceEvent = (function() {

            /**
             * Properties of a TrustyShareMemoryFtraceEvent.
             * @memberof perfetto.protos
             * @interface ITrustyShareMemoryFtraceEvent
             * @property {number|null} [len] TrustyShareMemoryFtraceEvent len
             * @property {number|null} [lend] TrustyShareMemoryFtraceEvent lend
             * @property {number|null} [nents] TrustyShareMemoryFtraceEvent nents
             */

            /**
             * Constructs a new TrustyShareMemoryFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TrustyShareMemoryFtraceEvent.
             * @implements ITrustyShareMemoryFtraceEvent
             * @constructor
             * @param {perfetto.protos.ITrustyShareMemoryFtraceEvent=} [p] Properties to set
             */
            function TrustyShareMemoryFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TrustyShareMemoryFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.TrustyShareMemoryFtraceEvent
             * @instance
             */
            TrustyShareMemoryFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TrustyShareMemoryFtraceEvent lend.
             * @member {number} lend
             * @memberof perfetto.protos.TrustyShareMemoryFtraceEvent
             * @instance
             */
            TrustyShareMemoryFtraceEvent.prototype.lend = 0;

            /**
             * TrustyShareMemoryFtraceEvent nents.
             * @member {number} nents
             * @memberof perfetto.protos.TrustyShareMemoryFtraceEvent
             * @instance
             */
            TrustyShareMemoryFtraceEvent.prototype.nents = 0;

            /**
             * Creates a new TrustyShareMemoryFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrustyShareMemoryFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyShareMemoryFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TrustyShareMemoryFtraceEvent} TrustyShareMemoryFtraceEvent instance
             */
            TrustyShareMemoryFtraceEvent.create = function create(properties) {
                return new TrustyShareMemoryFtraceEvent(properties);
            };

            /**
             * Encodes the specified TrustyShareMemoryFtraceEvent message. Does not implicitly {@link perfetto.protos.TrustyShareMemoryFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrustyShareMemoryFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyShareMemoryFtraceEvent} m TrustyShareMemoryFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyShareMemoryFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(8).uint64(m.len);
                if (m.lend != null && Object.hasOwnProperty.call(m, "lend"))
                    w.uint32(16).uint32(m.lend);
                if (m.nents != null && Object.hasOwnProperty.call(m, "nents"))
                    w.uint32(24).uint32(m.nents);
                return w;
            };

            /**
             * Encodes the specified TrustyShareMemoryFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TrustyShareMemoryFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrustyShareMemoryFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyShareMemoryFtraceEvent} message TrustyShareMemoryFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyShareMemoryFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrustyShareMemoryFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrustyShareMemoryFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrustyShareMemoryFtraceEvent} TrustyShareMemoryFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyShareMemoryFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrustyShareMemoryFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.len = r.uint64();
                        break;
                    case 2:
                        m.lend = r.uint32();
                        break;
                    case 3:
                        m.nents = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrustyShareMemoryFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrustyShareMemoryFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrustyShareMemoryFtraceEvent} TrustyShareMemoryFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyShareMemoryFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrustyShareMemoryFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.TrustyShareMemoryFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrustyShareMemoryFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                if (m.lend != null && m.hasOwnProperty("lend")) {
                    if (!$util.isInteger(m.lend))
                        return "lend: integer expected";
                }
                if (m.nents != null && m.hasOwnProperty("nents")) {
                    if (!$util.isInteger(m.nents))
                        return "nents: integer expected";
                }
                return null;
            };

            /**
             * Creates a TrustyShareMemoryFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrustyShareMemoryFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrustyShareMemoryFtraceEvent} TrustyShareMemoryFtraceEvent
             */
            TrustyShareMemoryFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrustyShareMemoryFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.TrustyShareMemoryFtraceEvent();
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = true;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber(true);
                }
                if (d.lend != null) {
                    m.lend = d.lend >>> 0;
                }
                if (d.nents != null) {
                    m.nents = d.nents >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a TrustyShareMemoryFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrustyShareMemoryFtraceEvent
             * @static
             * @param {perfetto.protos.TrustyShareMemoryFtraceEvent} m TrustyShareMemoryFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrustyShareMemoryFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                    d.lend = 0;
                    d.nents = 0;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber(true) : m.len;
                }
                if (m.lend != null && m.hasOwnProperty("lend")) {
                    d.lend = m.lend;
                }
                if (m.nents != null && m.hasOwnProperty("nents")) {
                    d.nents = m.nents;
                }
                return d;
            };

            /**
             * Converts this TrustyShareMemoryFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrustyShareMemoryFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrustyShareMemoryFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrustyShareMemoryFtraceEvent;
        })();

        protos.TrustyShareMemoryDoneFtraceEvent = (function() {

            /**
             * Properties of a TrustyShareMemoryDoneFtraceEvent.
             * @memberof perfetto.protos
             * @interface ITrustyShareMemoryDoneFtraceEvent
             * @property {number|null} [handle] TrustyShareMemoryDoneFtraceEvent handle
             * @property {number|null} [len] TrustyShareMemoryDoneFtraceEvent len
             * @property {number|null} [lend] TrustyShareMemoryDoneFtraceEvent lend
             * @property {number|null} [nents] TrustyShareMemoryDoneFtraceEvent nents
             * @property {number|null} [ret] TrustyShareMemoryDoneFtraceEvent ret
             */

            /**
             * Constructs a new TrustyShareMemoryDoneFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TrustyShareMemoryDoneFtraceEvent.
             * @implements ITrustyShareMemoryDoneFtraceEvent
             * @constructor
             * @param {perfetto.protos.ITrustyShareMemoryDoneFtraceEvent=} [p] Properties to set
             */
            function TrustyShareMemoryDoneFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TrustyShareMemoryDoneFtraceEvent handle.
             * @member {number} handle
             * @memberof perfetto.protos.TrustyShareMemoryDoneFtraceEvent
             * @instance
             */
            TrustyShareMemoryDoneFtraceEvent.prototype.handle = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TrustyShareMemoryDoneFtraceEvent len.
             * @member {number} len
             * @memberof perfetto.protos.TrustyShareMemoryDoneFtraceEvent
             * @instance
             */
            TrustyShareMemoryDoneFtraceEvent.prototype.len = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TrustyShareMemoryDoneFtraceEvent lend.
             * @member {number} lend
             * @memberof perfetto.protos.TrustyShareMemoryDoneFtraceEvent
             * @instance
             */
            TrustyShareMemoryDoneFtraceEvent.prototype.lend = 0;

            /**
             * TrustyShareMemoryDoneFtraceEvent nents.
             * @member {number} nents
             * @memberof perfetto.protos.TrustyShareMemoryDoneFtraceEvent
             * @instance
             */
            TrustyShareMemoryDoneFtraceEvent.prototype.nents = 0;

            /**
             * TrustyShareMemoryDoneFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.TrustyShareMemoryDoneFtraceEvent
             * @instance
             */
            TrustyShareMemoryDoneFtraceEvent.prototype.ret = 0;

            /**
             * Creates a new TrustyShareMemoryDoneFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrustyShareMemoryDoneFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyShareMemoryDoneFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TrustyShareMemoryDoneFtraceEvent} TrustyShareMemoryDoneFtraceEvent instance
             */
            TrustyShareMemoryDoneFtraceEvent.create = function create(properties) {
                return new TrustyShareMemoryDoneFtraceEvent(properties);
            };

            /**
             * Encodes the specified TrustyShareMemoryDoneFtraceEvent message. Does not implicitly {@link perfetto.protos.TrustyShareMemoryDoneFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrustyShareMemoryDoneFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyShareMemoryDoneFtraceEvent} m TrustyShareMemoryDoneFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyShareMemoryDoneFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.handle != null && Object.hasOwnProperty.call(m, "handle"))
                    w.uint32(8).uint64(m.handle);
                if (m.len != null && Object.hasOwnProperty.call(m, "len"))
                    w.uint32(16).uint64(m.len);
                if (m.lend != null && Object.hasOwnProperty.call(m, "lend"))
                    w.uint32(24).uint32(m.lend);
                if (m.nents != null && Object.hasOwnProperty.call(m, "nents"))
                    w.uint32(32).uint32(m.nents);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(40).int32(m.ret);
                return w;
            };

            /**
             * Encodes the specified TrustyShareMemoryDoneFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TrustyShareMemoryDoneFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrustyShareMemoryDoneFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyShareMemoryDoneFtraceEvent} message TrustyShareMemoryDoneFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyShareMemoryDoneFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrustyShareMemoryDoneFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrustyShareMemoryDoneFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrustyShareMemoryDoneFtraceEvent} TrustyShareMemoryDoneFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyShareMemoryDoneFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrustyShareMemoryDoneFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.handle = r.uint64();
                        break;
                    case 2:
                        m.len = r.uint64();
                        break;
                    case 3:
                        m.lend = r.uint32();
                        break;
                    case 4:
                        m.nents = r.uint32();
                        break;
                    case 5:
                        m.ret = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrustyShareMemoryDoneFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrustyShareMemoryDoneFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrustyShareMemoryDoneFtraceEvent} TrustyShareMemoryDoneFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyShareMemoryDoneFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrustyShareMemoryDoneFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.TrustyShareMemoryDoneFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrustyShareMemoryDoneFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.handle != null && m.hasOwnProperty("handle")) {
                    if (!$util.isInteger(m.handle) && !(m.handle && $util.isInteger(m.handle.low) && $util.isInteger(m.handle.high)))
                        return "handle: integer|Long expected";
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (!$util.isInteger(m.len) && !(m.len && $util.isInteger(m.len.low) && $util.isInteger(m.len.high)))
                        return "len: integer|Long expected";
                }
                if (m.lend != null && m.hasOwnProperty("lend")) {
                    if (!$util.isInteger(m.lend))
                        return "lend: integer expected";
                }
                if (m.nents != null && m.hasOwnProperty("nents")) {
                    if (!$util.isInteger(m.nents))
                        return "nents: integer expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                return null;
            };

            /**
             * Creates a TrustyShareMemoryDoneFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrustyShareMemoryDoneFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrustyShareMemoryDoneFtraceEvent} TrustyShareMemoryDoneFtraceEvent
             */
            TrustyShareMemoryDoneFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrustyShareMemoryDoneFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.TrustyShareMemoryDoneFtraceEvent();
                if (d.handle != null) {
                    if ($util.Long)
                        (m.handle = $util.Long.fromValue(d.handle)).unsigned = true;
                    else if (typeof d.handle === "string")
                        m.handle = parseInt(d.handle, 10);
                    else if (typeof d.handle === "number")
                        m.handle = d.handle;
                    else if (typeof d.handle === "object")
                        m.handle = new $util.LongBits(d.handle.low >>> 0, d.handle.high >>> 0).toNumber(true);
                }
                if (d.len != null) {
                    if ($util.Long)
                        (m.len = $util.Long.fromValue(d.len)).unsigned = true;
                    else if (typeof d.len === "string")
                        m.len = parseInt(d.len, 10);
                    else if (typeof d.len === "number")
                        m.len = d.len;
                    else if (typeof d.len === "object")
                        m.len = new $util.LongBits(d.len.low >>> 0, d.len.high >>> 0).toNumber(true);
                }
                if (d.lend != null) {
                    m.lend = d.lend >>> 0;
                }
                if (d.nents != null) {
                    m.nents = d.nents >>> 0;
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a TrustyShareMemoryDoneFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrustyShareMemoryDoneFtraceEvent
             * @static
             * @param {perfetto.protos.TrustyShareMemoryDoneFtraceEvent} m TrustyShareMemoryDoneFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrustyShareMemoryDoneFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.handle = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.handle = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.len = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.len = o.longs === String ? "0" : 0;
                    d.lend = 0;
                    d.nents = 0;
                    d.ret = 0;
                }
                if (m.handle != null && m.hasOwnProperty("handle")) {
                    if (typeof m.handle === "number")
                        d.handle = o.longs === String ? String(m.handle) : m.handle;
                    else
                        d.handle = o.longs === String ? $util.Long.prototype.toString.call(m.handle) : o.longs === Number ? new $util.LongBits(m.handle.low >>> 0, m.handle.high >>> 0).toNumber(true) : m.handle;
                }
                if (m.len != null && m.hasOwnProperty("len")) {
                    if (typeof m.len === "number")
                        d.len = o.longs === String ? String(m.len) : m.len;
                    else
                        d.len = o.longs === String ? $util.Long.prototype.toString.call(m.len) : o.longs === Number ? new $util.LongBits(m.len.low >>> 0, m.len.high >>> 0).toNumber(true) : m.len;
                }
                if (m.lend != null && m.hasOwnProperty("lend")) {
                    d.lend = m.lend;
                }
                if (m.nents != null && m.hasOwnProperty("nents")) {
                    d.nents = m.nents;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                return d;
            };

            /**
             * Converts this TrustyShareMemoryDoneFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrustyShareMemoryDoneFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrustyShareMemoryDoneFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrustyShareMemoryDoneFtraceEvent;
        })();

        protos.TrustyReclaimMemoryFtraceEvent = (function() {

            /**
             * Properties of a TrustyReclaimMemoryFtraceEvent.
             * @memberof perfetto.protos
             * @interface ITrustyReclaimMemoryFtraceEvent
             * @property {number|null} [id] TrustyReclaimMemoryFtraceEvent id
             */

            /**
             * Constructs a new TrustyReclaimMemoryFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TrustyReclaimMemoryFtraceEvent.
             * @implements ITrustyReclaimMemoryFtraceEvent
             * @constructor
             * @param {perfetto.protos.ITrustyReclaimMemoryFtraceEvent=} [p] Properties to set
             */
            function TrustyReclaimMemoryFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TrustyReclaimMemoryFtraceEvent id.
             * @member {number} id
             * @memberof perfetto.protos.TrustyReclaimMemoryFtraceEvent
             * @instance
             */
            TrustyReclaimMemoryFtraceEvent.prototype.id = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new TrustyReclaimMemoryFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrustyReclaimMemoryFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyReclaimMemoryFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TrustyReclaimMemoryFtraceEvent} TrustyReclaimMemoryFtraceEvent instance
             */
            TrustyReclaimMemoryFtraceEvent.create = function create(properties) {
                return new TrustyReclaimMemoryFtraceEvent(properties);
            };

            /**
             * Encodes the specified TrustyReclaimMemoryFtraceEvent message. Does not implicitly {@link perfetto.protos.TrustyReclaimMemoryFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrustyReclaimMemoryFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyReclaimMemoryFtraceEvent} m TrustyReclaimMemoryFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyReclaimMemoryFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.id != null && Object.hasOwnProperty.call(m, "id"))
                    w.uint32(8).uint64(m.id);
                return w;
            };

            /**
             * Encodes the specified TrustyReclaimMemoryFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TrustyReclaimMemoryFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrustyReclaimMemoryFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyReclaimMemoryFtraceEvent} message TrustyReclaimMemoryFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyReclaimMemoryFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrustyReclaimMemoryFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrustyReclaimMemoryFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrustyReclaimMemoryFtraceEvent} TrustyReclaimMemoryFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyReclaimMemoryFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrustyReclaimMemoryFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.id = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrustyReclaimMemoryFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrustyReclaimMemoryFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrustyReclaimMemoryFtraceEvent} TrustyReclaimMemoryFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyReclaimMemoryFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrustyReclaimMemoryFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.TrustyReclaimMemoryFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrustyReclaimMemoryFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.id != null && m.hasOwnProperty("id")) {
                    if (!$util.isInteger(m.id) && !(m.id && $util.isInteger(m.id.low) && $util.isInteger(m.id.high)))
                        return "id: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a TrustyReclaimMemoryFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrustyReclaimMemoryFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrustyReclaimMemoryFtraceEvent} TrustyReclaimMemoryFtraceEvent
             */
            TrustyReclaimMemoryFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrustyReclaimMemoryFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.TrustyReclaimMemoryFtraceEvent();
                if (d.id != null) {
                    if ($util.Long)
                        (m.id = $util.Long.fromValue(d.id)).unsigned = true;
                    else if (typeof d.id === "string")
                        m.id = parseInt(d.id, 10);
                    else if (typeof d.id === "number")
                        m.id = d.id;
                    else if (typeof d.id === "object")
                        m.id = new $util.LongBits(d.id.low >>> 0, d.id.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a TrustyReclaimMemoryFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrustyReclaimMemoryFtraceEvent
             * @static
             * @param {perfetto.protos.TrustyReclaimMemoryFtraceEvent} m TrustyReclaimMemoryFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrustyReclaimMemoryFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.id = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.id = o.longs === String ? "0" : 0;
                }
                if (m.id != null && m.hasOwnProperty("id")) {
                    if (typeof m.id === "number")
                        d.id = o.longs === String ? String(m.id) : m.id;
                    else
                        d.id = o.longs === String ? $util.Long.prototype.toString.call(m.id) : o.longs === Number ? new $util.LongBits(m.id.low >>> 0, m.id.high >>> 0).toNumber(true) : m.id;
                }
                return d;
            };

            /**
             * Converts this TrustyReclaimMemoryFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrustyReclaimMemoryFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrustyReclaimMemoryFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrustyReclaimMemoryFtraceEvent;
        })();

        protos.TrustyReclaimMemoryDoneFtraceEvent = (function() {

            /**
             * Properties of a TrustyReclaimMemoryDoneFtraceEvent.
             * @memberof perfetto.protos
             * @interface ITrustyReclaimMemoryDoneFtraceEvent
             * @property {number|null} [id] TrustyReclaimMemoryDoneFtraceEvent id
             * @property {number|null} [ret] TrustyReclaimMemoryDoneFtraceEvent ret
             */

            /**
             * Constructs a new TrustyReclaimMemoryDoneFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TrustyReclaimMemoryDoneFtraceEvent.
             * @implements ITrustyReclaimMemoryDoneFtraceEvent
             * @constructor
             * @param {perfetto.protos.ITrustyReclaimMemoryDoneFtraceEvent=} [p] Properties to set
             */
            function TrustyReclaimMemoryDoneFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TrustyReclaimMemoryDoneFtraceEvent id.
             * @member {number} id
             * @memberof perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent
             * @instance
             */
            TrustyReclaimMemoryDoneFtraceEvent.prototype.id = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TrustyReclaimMemoryDoneFtraceEvent ret.
             * @member {number} ret
             * @memberof perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent
             * @instance
             */
            TrustyReclaimMemoryDoneFtraceEvent.prototype.ret = 0;

            /**
             * Creates a new TrustyReclaimMemoryDoneFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyReclaimMemoryDoneFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent} TrustyReclaimMemoryDoneFtraceEvent instance
             */
            TrustyReclaimMemoryDoneFtraceEvent.create = function create(properties) {
                return new TrustyReclaimMemoryDoneFtraceEvent(properties);
            };

            /**
             * Encodes the specified TrustyReclaimMemoryDoneFtraceEvent message. Does not implicitly {@link perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyReclaimMemoryDoneFtraceEvent} m TrustyReclaimMemoryDoneFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyReclaimMemoryDoneFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.id != null && Object.hasOwnProperty.call(m, "id"))
                    w.uint32(8).uint64(m.id);
                if (m.ret != null && Object.hasOwnProperty.call(m, "ret"))
                    w.uint32(16).int32(m.ret);
                return w;
            };

            /**
             * Encodes the specified TrustyReclaimMemoryDoneFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyReclaimMemoryDoneFtraceEvent} message TrustyReclaimMemoryDoneFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyReclaimMemoryDoneFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrustyReclaimMemoryDoneFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent} TrustyReclaimMemoryDoneFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyReclaimMemoryDoneFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.id = r.uint64();
                        break;
                    case 2:
                        m.ret = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrustyReclaimMemoryDoneFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent} TrustyReclaimMemoryDoneFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyReclaimMemoryDoneFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrustyReclaimMemoryDoneFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrustyReclaimMemoryDoneFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.id != null && m.hasOwnProperty("id")) {
                    if (!$util.isInteger(m.id) && !(m.id && $util.isInteger(m.id.low) && $util.isInteger(m.id.high)))
                        return "id: integer|Long expected";
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    if (!$util.isInteger(m.ret))
                        return "ret: integer expected";
                }
                return null;
            };

            /**
             * Creates a TrustyReclaimMemoryDoneFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent} TrustyReclaimMemoryDoneFtraceEvent
             */
            TrustyReclaimMemoryDoneFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent();
                if (d.id != null) {
                    if ($util.Long)
                        (m.id = $util.Long.fromValue(d.id)).unsigned = true;
                    else if (typeof d.id === "string")
                        m.id = parseInt(d.id, 10);
                    else if (typeof d.id === "number")
                        m.id = d.id;
                    else if (typeof d.id === "object")
                        m.id = new $util.LongBits(d.id.low >>> 0, d.id.high >>> 0).toNumber(true);
                }
                if (d.ret != null) {
                    m.ret = d.ret | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a TrustyReclaimMemoryDoneFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent
             * @static
             * @param {perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent} m TrustyReclaimMemoryDoneFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrustyReclaimMemoryDoneFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.id = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.id = o.longs === String ? "0" : 0;
                    d.ret = 0;
                }
                if (m.id != null && m.hasOwnProperty("id")) {
                    if (typeof m.id === "number")
                        d.id = o.longs === String ? String(m.id) : m.id;
                    else
                        d.id = o.longs === String ? $util.Long.prototype.toString.call(m.id) : o.longs === Number ? new $util.LongBits(m.id.low >>> 0, m.id.high >>> 0).toNumber(true) : m.id;
                }
                if (m.ret != null && m.hasOwnProperty("ret")) {
                    d.ret = m.ret;
                }
                return d;
            };

            /**
             * Converts this TrustyReclaimMemoryDoneFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrustyReclaimMemoryDoneFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrustyReclaimMemoryDoneFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrustyReclaimMemoryDoneFtraceEvent;
        })();

        protos.TrustyIrqFtraceEvent = (function() {

            /**
             * Properties of a TrustyIrqFtraceEvent.
             * @memberof perfetto.protos
             * @interface ITrustyIrqFtraceEvent
             * @property {number|null} [irq] TrustyIrqFtraceEvent irq
             */

            /**
             * Constructs a new TrustyIrqFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TrustyIrqFtraceEvent.
             * @implements ITrustyIrqFtraceEvent
             * @constructor
             * @param {perfetto.protos.ITrustyIrqFtraceEvent=} [p] Properties to set
             */
            function TrustyIrqFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TrustyIrqFtraceEvent irq.
             * @member {number} irq
             * @memberof perfetto.protos.TrustyIrqFtraceEvent
             * @instance
             */
            TrustyIrqFtraceEvent.prototype.irq = 0;

            /**
             * Creates a new TrustyIrqFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrustyIrqFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIrqFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TrustyIrqFtraceEvent} TrustyIrqFtraceEvent instance
             */
            TrustyIrqFtraceEvent.create = function create(properties) {
                return new TrustyIrqFtraceEvent(properties);
            };

            /**
             * Encodes the specified TrustyIrqFtraceEvent message. Does not implicitly {@link perfetto.protos.TrustyIrqFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrustyIrqFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIrqFtraceEvent} m TrustyIrqFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyIrqFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.irq != null && Object.hasOwnProperty.call(m, "irq"))
                    w.uint32(8).int32(m.irq);
                return w;
            };

            /**
             * Encodes the specified TrustyIrqFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TrustyIrqFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrustyIrqFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIrqFtraceEvent} message TrustyIrqFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyIrqFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrustyIrqFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrustyIrqFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrustyIrqFtraceEvent} TrustyIrqFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyIrqFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrustyIrqFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.irq = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrustyIrqFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrustyIrqFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrustyIrqFtraceEvent} TrustyIrqFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyIrqFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrustyIrqFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.TrustyIrqFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrustyIrqFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.irq != null && m.hasOwnProperty("irq")) {
                    if (!$util.isInteger(m.irq))
                        return "irq: integer expected";
                }
                return null;
            };

            /**
             * Creates a TrustyIrqFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrustyIrqFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrustyIrqFtraceEvent} TrustyIrqFtraceEvent
             */
            TrustyIrqFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrustyIrqFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.TrustyIrqFtraceEvent();
                if (d.irq != null) {
                    m.irq = d.irq | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a TrustyIrqFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrustyIrqFtraceEvent
             * @static
             * @param {perfetto.protos.TrustyIrqFtraceEvent} m TrustyIrqFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrustyIrqFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.irq = 0;
                }
                if (m.irq != null && m.hasOwnProperty("irq")) {
                    d.irq = m.irq;
                }
                return d;
            };

            /**
             * Converts this TrustyIrqFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrustyIrqFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrustyIrqFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrustyIrqFtraceEvent;
        })();

        protos.TrustyIpcHandleEventFtraceEvent = (function() {

            /**
             * Properties of a TrustyIpcHandleEventFtraceEvent.
             * @memberof perfetto.protos
             * @interface ITrustyIpcHandleEventFtraceEvent
             * @property {number|null} [chan] TrustyIpcHandleEventFtraceEvent chan
             * @property {number|null} [eventId] TrustyIpcHandleEventFtraceEvent eventId
             * @property {string|null} [srvName] TrustyIpcHandleEventFtraceEvent srvName
             */

            /**
             * Constructs a new TrustyIpcHandleEventFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TrustyIpcHandleEventFtraceEvent.
             * @implements ITrustyIpcHandleEventFtraceEvent
             * @constructor
             * @param {perfetto.protos.ITrustyIpcHandleEventFtraceEvent=} [p] Properties to set
             */
            function TrustyIpcHandleEventFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TrustyIpcHandleEventFtraceEvent chan.
             * @member {number} chan
             * @memberof perfetto.protos.TrustyIpcHandleEventFtraceEvent
             * @instance
             */
            TrustyIpcHandleEventFtraceEvent.prototype.chan = 0;

            /**
             * TrustyIpcHandleEventFtraceEvent eventId.
             * @member {number} eventId
             * @memberof perfetto.protos.TrustyIpcHandleEventFtraceEvent
             * @instance
             */
            TrustyIpcHandleEventFtraceEvent.prototype.eventId = 0;

            /**
             * TrustyIpcHandleEventFtraceEvent srvName.
             * @member {string} srvName
             * @memberof perfetto.protos.TrustyIpcHandleEventFtraceEvent
             * @instance
             */
            TrustyIpcHandleEventFtraceEvent.prototype.srvName = "";

            /**
             * Creates a new TrustyIpcHandleEventFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrustyIpcHandleEventFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcHandleEventFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TrustyIpcHandleEventFtraceEvent} TrustyIpcHandleEventFtraceEvent instance
             */
            TrustyIpcHandleEventFtraceEvent.create = function create(properties) {
                return new TrustyIpcHandleEventFtraceEvent(properties);
            };

            /**
             * Encodes the specified TrustyIpcHandleEventFtraceEvent message. Does not implicitly {@link perfetto.protos.TrustyIpcHandleEventFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrustyIpcHandleEventFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcHandleEventFtraceEvent} m TrustyIpcHandleEventFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyIpcHandleEventFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.chan != null && Object.hasOwnProperty.call(m, "chan"))
                    w.uint32(8).uint32(m.chan);
                if (m.eventId != null && Object.hasOwnProperty.call(m, "eventId"))
                    w.uint32(16).uint32(m.eventId);
                if (m.srvName != null && Object.hasOwnProperty.call(m, "srvName"))
                    w.uint32(26).string(m.srvName);
                return w;
            };

            /**
             * Encodes the specified TrustyIpcHandleEventFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TrustyIpcHandleEventFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrustyIpcHandleEventFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcHandleEventFtraceEvent} message TrustyIpcHandleEventFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyIpcHandleEventFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrustyIpcHandleEventFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrustyIpcHandleEventFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrustyIpcHandleEventFtraceEvent} TrustyIpcHandleEventFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyIpcHandleEventFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrustyIpcHandleEventFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.chan = r.uint32();
                        break;
                    case 2:
                        m.eventId = r.uint32();
                        break;
                    case 3:
                        m.srvName = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrustyIpcHandleEventFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrustyIpcHandleEventFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrustyIpcHandleEventFtraceEvent} TrustyIpcHandleEventFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyIpcHandleEventFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrustyIpcHandleEventFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.TrustyIpcHandleEventFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrustyIpcHandleEventFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.chan != null && m.hasOwnProperty("chan")) {
                    if (!$util.isInteger(m.chan))
                        return "chan: integer expected";
                }
                if (m.eventId != null && m.hasOwnProperty("eventId")) {
                    if (!$util.isInteger(m.eventId))
                        return "eventId: integer expected";
                }
                if (m.srvName != null && m.hasOwnProperty("srvName")) {
                    if (!$util.isString(m.srvName))
                        return "srvName: string expected";
                }
                return null;
            };

            /**
             * Creates a TrustyIpcHandleEventFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrustyIpcHandleEventFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrustyIpcHandleEventFtraceEvent} TrustyIpcHandleEventFtraceEvent
             */
            TrustyIpcHandleEventFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrustyIpcHandleEventFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.TrustyIpcHandleEventFtraceEvent();
                if (d.chan != null) {
                    m.chan = d.chan >>> 0;
                }
                if (d.eventId != null) {
                    m.eventId = d.eventId >>> 0;
                }
                if (d.srvName != null) {
                    m.srvName = String(d.srvName);
                }
                return m;
            };

            /**
             * Creates a plain object from a TrustyIpcHandleEventFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrustyIpcHandleEventFtraceEvent
             * @static
             * @param {perfetto.protos.TrustyIpcHandleEventFtraceEvent} m TrustyIpcHandleEventFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrustyIpcHandleEventFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.chan = 0;
                    d.eventId = 0;
                    d.srvName = "";
                }
                if (m.chan != null && m.hasOwnProperty("chan")) {
                    d.chan = m.chan;
                }
                if (m.eventId != null && m.hasOwnProperty("eventId")) {
                    d.eventId = m.eventId;
                }
                if (m.srvName != null && m.hasOwnProperty("srvName")) {
                    d.srvName = m.srvName;
                }
                return d;
            };

            /**
             * Converts this TrustyIpcHandleEventFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrustyIpcHandleEventFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrustyIpcHandleEventFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrustyIpcHandleEventFtraceEvent;
        })();

        protos.TrustyIpcConnectFtraceEvent = (function() {

            /**
             * Properties of a TrustyIpcConnectFtraceEvent.
             * @memberof perfetto.protos
             * @interface ITrustyIpcConnectFtraceEvent
             * @property {number|null} [chan] TrustyIpcConnectFtraceEvent chan
             * @property {string|null} [port] TrustyIpcConnectFtraceEvent port
             * @property {number|null} [state] TrustyIpcConnectFtraceEvent state
             */

            /**
             * Constructs a new TrustyIpcConnectFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TrustyIpcConnectFtraceEvent.
             * @implements ITrustyIpcConnectFtraceEvent
             * @constructor
             * @param {perfetto.protos.ITrustyIpcConnectFtraceEvent=} [p] Properties to set
             */
            function TrustyIpcConnectFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TrustyIpcConnectFtraceEvent chan.
             * @member {number} chan
             * @memberof perfetto.protos.TrustyIpcConnectFtraceEvent
             * @instance
             */
            TrustyIpcConnectFtraceEvent.prototype.chan = 0;

            /**
             * TrustyIpcConnectFtraceEvent port.
             * @member {string} port
             * @memberof perfetto.protos.TrustyIpcConnectFtraceEvent
             * @instance
             */
            TrustyIpcConnectFtraceEvent.prototype.port = "";

            /**
             * TrustyIpcConnectFtraceEvent state.
             * @member {number} state
             * @memberof perfetto.protos.TrustyIpcConnectFtraceEvent
             * @instance
             */
            TrustyIpcConnectFtraceEvent.prototype.state = 0;

            /**
             * Creates a new TrustyIpcConnectFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrustyIpcConnectFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcConnectFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TrustyIpcConnectFtraceEvent} TrustyIpcConnectFtraceEvent instance
             */
            TrustyIpcConnectFtraceEvent.create = function create(properties) {
                return new TrustyIpcConnectFtraceEvent(properties);
            };

            /**
             * Encodes the specified TrustyIpcConnectFtraceEvent message. Does not implicitly {@link perfetto.protos.TrustyIpcConnectFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrustyIpcConnectFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcConnectFtraceEvent} m TrustyIpcConnectFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyIpcConnectFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.chan != null && Object.hasOwnProperty.call(m, "chan"))
                    w.uint32(8).uint32(m.chan);
                if (m.port != null && Object.hasOwnProperty.call(m, "port"))
                    w.uint32(18).string(m.port);
                if (m.state != null && Object.hasOwnProperty.call(m, "state"))
                    w.uint32(24).int32(m.state);
                return w;
            };

            /**
             * Encodes the specified TrustyIpcConnectFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TrustyIpcConnectFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrustyIpcConnectFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcConnectFtraceEvent} message TrustyIpcConnectFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyIpcConnectFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrustyIpcConnectFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrustyIpcConnectFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrustyIpcConnectFtraceEvent} TrustyIpcConnectFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyIpcConnectFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrustyIpcConnectFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.chan = r.uint32();
                        break;
                    case 2:
                        m.port = r.string();
                        break;
                    case 3:
                        m.state = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrustyIpcConnectFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrustyIpcConnectFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrustyIpcConnectFtraceEvent} TrustyIpcConnectFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyIpcConnectFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrustyIpcConnectFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.TrustyIpcConnectFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrustyIpcConnectFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.chan != null && m.hasOwnProperty("chan")) {
                    if (!$util.isInteger(m.chan))
                        return "chan: integer expected";
                }
                if (m.port != null && m.hasOwnProperty("port")) {
                    if (!$util.isString(m.port))
                        return "port: string expected";
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    if (!$util.isInteger(m.state))
                        return "state: integer expected";
                }
                return null;
            };

            /**
             * Creates a TrustyIpcConnectFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrustyIpcConnectFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrustyIpcConnectFtraceEvent} TrustyIpcConnectFtraceEvent
             */
            TrustyIpcConnectFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrustyIpcConnectFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.TrustyIpcConnectFtraceEvent();
                if (d.chan != null) {
                    m.chan = d.chan >>> 0;
                }
                if (d.port != null) {
                    m.port = String(d.port);
                }
                if (d.state != null) {
                    m.state = d.state | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a TrustyIpcConnectFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrustyIpcConnectFtraceEvent
             * @static
             * @param {perfetto.protos.TrustyIpcConnectFtraceEvent} m TrustyIpcConnectFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrustyIpcConnectFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.chan = 0;
                    d.port = "";
                    d.state = 0;
                }
                if (m.chan != null && m.hasOwnProperty("chan")) {
                    d.chan = m.chan;
                }
                if (m.port != null && m.hasOwnProperty("port")) {
                    d.port = m.port;
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    d.state = m.state;
                }
                return d;
            };

            /**
             * Converts this TrustyIpcConnectFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrustyIpcConnectFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrustyIpcConnectFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrustyIpcConnectFtraceEvent;
        })();

        protos.TrustyIpcConnectEndFtraceEvent = (function() {

            /**
             * Properties of a TrustyIpcConnectEndFtraceEvent.
             * @memberof perfetto.protos
             * @interface ITrustyIpcConnectEndFtraceEvent
             * @property {number|null} [chan] TrustyIpcConnectEndFtraceEvent chan
             * @property {number|null} [err] TrustyIpcConnectEndFtraceEvent err
             * @property {number|null} [state] TrustyIpcConnectEndFtraceEvent state
             */

            /**
             * Constructs a new TrustyIpcConnectEndFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TrustyIpcConnectEndFtraceEvent.
             * @implements ITrustyIpcConnectEndFtraceEvent
             * @constructor
             * @param {perfetto.protos.ITrustyIpcConnectEndFtraceEvent=} [p] Properties to set
             */
            function TrustyIpcConnectEndFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TrustyIpcConnectEndFtraceEvent chan.
             * @member {number} chan
             * @memberof perfetto.protos.TrustyIpcConnectEndFtraceEvent
             * @instance
             */
            TrustyIpcConnectEndFtraceEvent.prototype.chan = 0;

            /**
             * TrustyIpcConnectEndFtraceEvent err.
             * @member {number} err
             * @memberof perfetto.protos.TrustyIpcConnectEndFtraceEvent
             * @instance
             */
            TrustyIpcConnectEndFtraceEvent.prototype.err = 0;

            /**
             * TrustyIpcConnectEndFtraceEvent state.
             * @member {number} state
             * @memberof perfetto.protos.TrustyIpcConnectEndFtraceEvent
             * @instance
             */
            TrustyIpcConnectEndFtraceEvent.prototype.state = 0;

            /**
             * Creates a new TrustyIpcConnectEndFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrustyIpcConnectEndFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcConnectEndFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TrustyIpcConnectEndFtraceEvent} TrustyIpcConnectEndFtraceEvent instance
             */
            TrustyIpcConnectEndFtraceEvent.create = function create(properties) {
                return new TrustyIpcConnectEndFtraceEvent(properties);
            };

            /**
             * Encodes the specified TrustyIpcConnectEndFtraceEvent message. Does not implicitly {@link perfetto.protos.TrustyIpcConnectEndFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrustyIpcConnectEndFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcConnectEndFtraceEvent} m TrustyIpcConnectEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyIpcConnectEndFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.chan != null && Object.hasOwnProperty.call(m, "chan"))
                    w.uint32(8).uint32(m.chan);
                if (m.err != null && Object.hasOwnProperty.call(m, "err"))
                    w.uint32(16).int32(m.err);
                if (m.state != null && Object.hasOwnProperty.call(m, "state"))
                    w.uint32(24).int32(m.state);
                return w;
            };

            /**
             * Encodes the specified TrustyIpcConnectEndFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TrustyIpcConnectEndFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrustyIpcConnectEndFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcConnectEndFtraceEvent} message TrustyIpcConnectEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyIpcConnectEndFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrustyIpcConnectEndFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrustyIpcConnectEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrustyIpcConnectEndFtraceEvent} TrustyIpcConnectEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyIpcConnectEndFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrustyIpcConnectEndFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.chan = r.uint32();
                        break;
                    case 2:
                        m.err = r.int32();
                        break;
                    case 3:
                        m.state = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrustyIpcConnectEndFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrustyIpcConnectEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrustyIpcConnectEndFtraceEvent} TrustyIpcConnectEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyIpcConnectEndFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrustyIpcConnectEndFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.TrustyIpcConnectEndFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrustyIpcConnectEndFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.chan != null && m.hasOwnProperty("chan")) {
                    if (!$util.isInteger(m.chan))
                        return "chan: integer expected";
                }
                if (m.err != null && m.hasOwnProperty("err")) {
                    if (!$util.isInteger(m.err))
                        return "err: integer expected";
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    if (!$util.isInteger(m.state))
                        return "state: integer expected";
                }
                return null;
            };

            /**
             * Creates a TrustyIpcConnectEndFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrustyIpcConnectEndFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrustyIpcConnectEndFtraceEvent} TrustyIpcConnectEndFtraceEvent
             */
            TrustyIpcConnectEndFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrustyIpcConnectEndFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.TrustyIpcConnectEndFtraceEvent();
                if (d.chan != null) {
                    m.chan = d.chan >>> 0;
                }
                if (d.err != null) {
                    m.err = d.err | 0;
                }
                if (d.state != null) {
                    m.state = d.state | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a TrustyIpcConnectEndFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrustyIpcConnectEndFtraceEvent
             * @static
             * @param {perfetto.protos.TrustyIpcConnectEndFtraceEvent} m TrustyIpcConnectEndFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrustyIpcConnectEndFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.chan = 0;
                    d.err = 0;
                    d.state = 0;
                }
                if (m.chan != null && m.hasOwnProperty("chan")) {
                    d.chan = m.chan;
                }
                if (m.err != null && m.hasOwnProperty("err")) {
                    d.err = m.err;
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    d.state = m.state;
                }
                return d;
            };

            /**
             * Converts this TrustyIpcConnectEndFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrustyIpcConnectEndFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrustyIpcConnectEndFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrustyIpcConnectEndFtraceEvent;
        })();

        protos.TrustyIpcWriteFtraceEvent = (function() {

            /**
             * Properties of a TrustyIpcWriteFtraceEvent.
             * @memberof perfetto.protos
             * @interface ITrustyIpcWriteFtraceEvent
             * @property {number|null} [bufId] TrustyIpcWriteFtraceEvent bufId
             * @property {number|null} [chan] TrustyIpcWriteFtraceEvent chan
             * @property {number|null} [kindShm] TrustyIpcWriteFtraceEvent kindShm
             * @property {number|null} [lenOrErr] TrustyIpcWriteFtraceEvent lenOrErr
             * @property {number|null} [shmCnt] TrustyIpcWriteFtraceEvent shmCnt
             * @property {string|null} [srvName] TrustyIpcWriteFtraceEvent srvName
             */

            /**
             * Constructs a new TrustyIpcWriteFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TrustyIpcWriteFtraceEvent.
             * @implements ITrustyIpcWriteFtraceEvent
             * @constructor
             * @param {perfetto.protos.ITrustyIpcWriteFtraceEvent=} [p] Properties to set
             */
            function TrustyIpcWriteFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TrustyIpcWriteFtraceEvent bufId.
             * @member {number} bufId
             * @memberof perfetto.protos.TrustyIpcWriteFtraceEvent
             * @instance
             */
            TrustyIpcWriteFtraceEvent.prototype.bufId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TrustyIpcWriteFtraceEvent chan.
             * @member {number} chan
             * @memberof perfetto.protos.TrustyIpcWriteFtraceEvent
             * @instance
             */
            TrustyIpcWriteFtraceEvent.prototype.chan = 0;

            /**
             * TrustyIpcWriteFtraceEvent kindShm.
             * @member {number} kindShm
             * @memberof perfetto.protos.TrustyIpcWriteFtraceEvent
             * @instance
             */
            TrustyIpcWriteFtraceEvent.prototype.kindShm = 0;

            /**
             * TrustyIpcWriteFtraceEvent lenOrErr.
             * @member {number} lenOrErr
             * @memberof perfetto.protos.TrustyIpcWriteFtraceEvent
             * @instance
             */
            TrustyIpcWriteFtraceEvent.prototype.lenOrErr = 0;

            /**
             * TrustyIpcWriteFtraceEvent shmCnt.
             * @member {number} shmCnt
             * @memberof perfetto.protos.TrustyIpcWriteFtraceEvent
             * @instance
             */
            TrustyIpcWriteFtraceEvent.prototype.shmCnt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TrustyIpcWriteFtraceEvent srvName.
             * @member {string} srvName
             * @memberof perfetto.protos.TrustyIpcWriteFtraceEvent
             * @instance
             */
            TrustyIpcWriteFtraceEvent.prototype.srvName = "";

            /**
             * Creates a new TrustyIpcWriteFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrustyIpcWriteFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcWriteFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TrustyIpcWriteFtraceEvent} TrustyIpcWriteFtraceEvent instance
             */
            TrustyIpcWriteFtraceEvent.create = function create(properties) {
                return new TrustyIpcWriteFtraceEvent(properties);
            };

            /**
             * Encodes the specified TrustyIpcWriteFtraceEvent message. Does not implicitly {@link perfetto.protos.TrustyIpcWriteFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrustyIpcWriteFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcWriteFtraceEvent} m TrustyIpcWriteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyIpcWriteFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.bufId != null && Object.hasOwnProperty.call(m, "bufId"))
                    w.uint32(8).uint64(m.bufId);
                if (m.chan != null && Object.hasOwnProperty.call(m, "chan"))
                    w.uint32(16).uint32(m.chan);
                if (m.kindShm != null && Object.hasOwnProperty.call(m, "kindShm"))
                    w.uint32(24).int32(m.kindShm);
                if (m.lenOrErr != null && Object.hasOwnProperty.call(m, "lenOrErr"))
                    w.uint32(32).int32(m.lenOrErr);
                if (m.shmCnt != null && Object.hasOwnProperty.call(m, "shmCnt"))
                    w.uint32(40).uint64(m.shmCnt);
                if (m.srvName != null && Object.hasOwnProperty.call(m, "srvName"))
                    w.uint32(50).string(m.srvName);
                return w;
            };

            /**
             * Encodes the specified TrustyIpcWriteFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TrustyIpcWriteFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrustyIpcWriteFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcWriteFtraceEvent} message TrustyIpcWriteFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyIpcWriteFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrustyIpcWriteFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrustyIpcWriteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrustyIpcWriteFtraceEvent} TrustyIpcWriteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyIpcWriteFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrustyIpcWriteFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.bufId = r.uint64();
                        break;
                    case 2:
                        m.chan = r.uint32();
                        break;
                    case 3:
                        m.kindShm = r.int32();
                        break;
                    case 4:
                        m.lenOrErr = r.int32();
                        break;
                    case 5:
                        m.shmCnt = r.uint64();
                        break;
                    case 6:
                        m.srvName = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrustyIpcWriteFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrustyIpcWriteFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrustyIpcWriteFtraceEvent} TrustyIpcWriteFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyIpcWriteFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrustyIpcWriteFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.TrustyIpcWriteFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrustyIpcWriteFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.bufId != null && m.hasOwnProperty("bufId")) {
                    if (!$util.isInteger(m.bufId) && !(m.bufId && $util.isInteger(m.bufId.low) && $util.isInteger(m.bufId.high)))
                        return "bufId: integer|Long expected";
                }
                if (m.chan != null && m.hasOwnProperty("chan")) {
                    if (!$util.isInteger(m.chan))
                        return "chan: integer expected";
                }
                if (m.kindShm != null && m.hasOwnProperty("kindShm")) {
                    if (!$util.isInteger(m.kindShm))
                        return "kindShm: integer expected";
                }
                if (m.lenOrErr != null && m.hasOwnProperty("lenOrErr")) {
                    if (!$util.isInteger(m.lenOrErr))
                        return "lenOrErr: integer expected";
                }
                if (m.shmCnt != null && m.hasOwnProperty("shmCnt")) {
                    if (!$util.isInteger(m.shmCnt) && !(m.shmCnt && $util.isInteger(m.shmCnt.low) && $util.isInteger(m.shmCnt.high)))
                        return "shmCnt: integer|Long expected";
                }
                if (m.srvName != null && m.hasOwnProperty("srvName")) {
                    if (!$util.isString(m.srvName))
                        return "srvName: string expected";
                }
                return null;
            };

            /**
             * Creates a TrustyIpcWriteFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrustyIpcWriteFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrustyIpcWriteFtraceEvent} TrustyIpcWriteFtraceEvent
             */
            TrustyIpcWriteFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrustyIpcWriteFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.TrustyIpcWriteFtraceEvent();
                if (d.bufId != null) {
                    if ($util.Long)
                        (m.bufId = $util.Long.fromValue(d.bufId)).unsigned = true;
                    else if (typeof d.bufId === "string")
                        m.bufId = parseInt(d.bufId, 10);
                    else if (typeof d.bufId === "number")
                        m.bufId = d.bufId;
                    else if (typeof d.bufId === "object")
                        m.bufId = new $util.LongBits(d.bufId.low >>> 0, d.bufId.high >>> 0).toNumber(true);
                }
                if (d.chan != null) {
                    m.chan = d.chan >>> 0;
                }
                if (d.kindShm != null) {
                    m.kindShm = d.kindShm | 0;
                }
                if (d.lenOrErr != null) {
                    m.lenOrErr = d.lenOrErr | 0;
                }
                if (d.shmCnt != null) {
                    if ($util.Long)
                        (m.shmCnt = $util.Long.fromValue(d.shmCnt)).unsigned = true;
                    else if (typeof d.shmCnt === "string")
                        m.shmCnt = parseInt(d.shmCnt, 10);
                    else if (typeof d.shmCnt === "number")
                        m.shmCnt = d.shmCnt;
                    else if (typeof d.shmCnt === "object")
                        m.shmCnt = new $util.LongBits(d.shmCnt.low >>> 0, d.shmCnt.high >>> 0).toNumber(true);
                }
                if (d.srvName != null) {
                    m.srvName = String(d.srvName);
                }
                return m;
            };

            /**
             * Creates a plain object from a TrustyIpcWriteFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrustyIpcWriteFtraceEvent
             * @static
             * @param {perfetto.protos.TrustyIpcWriteFtraceEvent} m TrustyIpcWriteFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrustyIpcWriteFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.bufId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.bufId = o.longs === String ? "0" : 0;
                    d.chan = 0;
                    d.kindShm = 0;
                    d.lenOrErr = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.shmCnt = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.shmCnt = o.longs === String ? "0" : 0;
                    d.srvName = "";
                }
                if (m.bufId != null && m.hasOwnProperty("bufId")) {
                    if (typeof m.bufId === "number")
                        d.bufId = o.longs === String ? String(m.bufId) : m.bufId;
                    else
                        d.bufId = o.longs === String ? $util.Long.prototype.toString.call(m.bufId) : o.longs === Number ? new $util.LongBits(m.bufId.low >>> 0, m.bufId.high >>> 0).toNumber(true) : m.bufId;
                }
                if (m.chan != null && m.hasOwnProperty("chan")) {
                    d.chan = m.chan;
                }
                if (m.kindShm != null && m.hasOwnProperty("kindShm")) {
                    d.kindShm = m.kindShm;
                }
                if (m.lenOrErr != null && m.hasOwnProperty("lenOrErr")) {
                    d.lenOrErr = m.lenOrErr;
                }
                if (m.shmCnt != null && m.hasOwnProperty("shmCnt")) {
                    if (typeof m.shmCnt === "number")
                        d.shmCnt = o.longs === String ? String(m.shmCnt) : m.shmCnt;
                    else
                        d.shmCnt = o.longs === String ? $util.Long.prototype.toString.call(m.shmCnt) : o.longs === Number ? new $util.LongBits(m.shmCnt.low >>> 0, m.shmCnt.high >>> 0).toNumber(true) : m.shmCnt;
                }
                if (m.srvName != null && m.hasOwnProperty("srvName")) {
                    d.srvName = m.srvName;
                }
                return d;
            };

            /**
             * Converts this TrustyIpcWriteFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrustyIpcWriteFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrustyIpcWriteFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrustyIpcWriteFtraceEvent;
        })();

        protos.TrustyIpcPollFtraceEvent = (function() {

            /**
             * Properties of a TrustyIpcPollFtraceEvent.
             * @memberof perfetto.protos
             * @interface ITrustyIpcPollFtraceEvent
             * @property {number|null} [chan] TrustyIpcPollFtraceEvent chan
             * @property {number|null} [pollMask] TrustyIpcPollFtraceEvent pollMask
             * @property {string|null} [srvName] TrustyIpcPollFtraceEvent srvName
             */

            /**
             * Constructs a new TrustyIpcPollFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TrustyIpcPollFtraceEvent.
             * @implements ITrustyIpcPollFtraceEvent
             * @constructor
             * @param {perfetto.protos.ITrustyIpcPollFtraceEvent=} [p] Properties to set
             */
            function TrustyIpcPollFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TrustyIpcPollFtraceEvent chan.
             * @member {number} chan
             * @memberof perfetto.protos.TrustyIpcPollFtraceEvent
             * @instance
             */
            TrustyIpcPollFtraceEvent.prototype.chan = 0;

            /**
             * TrustyIpcPollFtraceEvent pollMask.
             * @member {number} pollMask
             * @memberof perfetto.protos.TrustyIpcPollFtraceEvent
             * @instance
             */
            TrustyIpcPollFtraceEvent.prototype.pollMask = 0;

            /**
             * TrustyIpcPollFtraceEvent srvName.
             * @member {string} srvName
             * @memberof perfetto.protos.TrustyIpcPollFtraceEvent
             * @instance
             */
            TrustyIpcPollFtraceEvent.prototype.srvName = "";

            /**
             * Creates a new TrustyIpcPollFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrustyIpcPollFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcPollFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TrustyIpcPollFtraceEvent} TrustyIpcPollFtraceEvent instance
             */
            TrustyIpcPollFtraceEvent.create = function create(properties) {
                return new TrustyIpcPollFtraceEvent(properties);
            };

            /**
             * Encodes the specified TrustyIpcPollFtraceEvent message. Does not implicitly {@link perfetto.protos.TrustyIpcPollFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrustyIpcPollFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcPollFtraceEvent} m TrustyIpcPollFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyIpcPollFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.chan != null && Object.hasOwnProperty.call(m, "chan"))
                    w.uint32(8).uint32(m.chan);
                if (m.pollMask != null && Object.hasOwnProperty.call(m, "pollMask"))
                    w.uint32(16).uint32(m.pollMask);
                if (m.srvName != null && Object.hasOwnProperty.call(m, "srvName"))
                    w.uint32(26).string(m.srvName);
                return w;
            };

            /**
             * Encodes the specified TrustyIpcPollFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TrustyIpcPollFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrustyIpcPollFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcPollFtraceEvent} message TrustyIpcPollFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyIpcPollFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrustyIpcPollFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrustyIpcPollFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrustyIpcPollFtraceEvent} TrustyIpcPollFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyIpcPollFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrustyIpcPollFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.chan = r.uint32();
                        break;
                    case 2:
                        m.pollMask = r.uint32();
                        break;
                    case 3:
                        m.srvName = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrustyIpcPollFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrustyIpcPollFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrustyIpcPollFtraceEvent} TrustyIpcPollFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyIpcPollFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrustyIpcPollFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.TrustyIpcPollFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrustyIpcPollFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.chan != null && m.hasOwnProperty("chan")) {
                    if (!$util.isInteger(m.chan))
                        return "chan: integer expected";
                }
                if (m.pollMask != null && m.hasOwnProperty("pollMask")) {
                    if (!$util.isInteger(m.pollMask))
                        return "pollMask: integer expected";
                }
                if (m.srvName != null && m.hasOwnProperty("srvName")) {
                    if (!$util.isString(m.srvName))
                        return "srvName: string expected";
                }
                return null;
            };

            /**
             * Creates a TrustyIpcPollFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrustyIpcPollFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrustyIpcPollFtraceEvent} TrustyIpcPollFtraceEvent
             */
            TrustyIpcPollFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrustyIpcPollFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.TrustyIpcPollFtraceEvent();
                if (d.chan != null) {
                    m.chan = d.chan >>> 0;
                }
                if (d.pollMask != null) {
                    m.pollMask = d.pollMask >>> 0;
                }
                if (d.srvName != null) {
                    m.srvName = String(d.srvName);
                }
                return m;
            };

            /**
             * Creates a plain object from a TrustyIpcPollFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrustyIpcPollFtraceEvent
             * @static
             * @param {perfetto.protos.TrustyIpcPollFtraceEvent} m TrustyIpcPollFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrustyIpcPollFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.chan = 0;
                    d.pollMask = 0;
                    d.srvName = "";
                }
                if (m.chan != null && m.hasOwnProperty("chan")) {
                    d.chan = m.chan;
                }
                if (m.pollMask != null && m.hasOwnProperty("pollMask")) {
                    d.pollMask = m.pollMask;
                }
                if (m.srvName != null && m.hasOwnProperty("srvName")) {
                    d.srvName = m.srvName;
                }
                return d;
            };

            /**
             * Converts this TrustyIpcPollFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrustyIpcPollFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrustyIpcPollFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrustyIpcPollFtraceEvent;
        })();

        protos.TrustyIpcPollEndFtraceEvent = (function() {

            /**
             * Properties of a TrustyIpcPollEndFtraceEvent.
             * @memberof perfetto.protos
             * @interface ITrustyIpcPollEndFtraceEvent
             */

            /**
             * Constructs a new TrustyIpcPollEndFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TrustyIpcPollEndFtraceEvent.
             * @implements ITrustyIpcPollEndFtraceEvent
             * @constructor
             * @param {perfetto.protos.ITrustyIpcPollEndFtraceEvent=} [p] Properties to set
             */
            function TrustyIpcPollEndFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Creates a new TrustyIpcPollEndFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrustyIpcPollEndFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcPollEndFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TrustyIpcPollEndFtraceEvent} TrustyIpcPollEndFtraceEvent instance
             */
            TrustyIpcPollEndFtraceEvent.create = function create(properties) {
                return new TrustyIpcPollEndFtraceEvent(properties);
            };

            /**
             * Encodes the specified TrustyIpcPollEndFtraceEvent message. Does not implicitly {@link perfetto.protos.TrustyIpcPollEndFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrustyIpcPollEndFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcPollEndFtraceEvent} m TrustyIpcPollEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyIpcPollEndFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                return w;
            };

            /**
             * Encodes the specified TrustyIpcPollEndFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TrustyIpcPollEndFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrustyIpcPollEndFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcPollEndFtraceEvent} message TrustyIpcPollEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyIpcPollEndFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrustyIpcPollEndFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrustyIpcPollEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrustyIpcPollEndFtraceEvent} TrustyIpcPollEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyIpcPollEndFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrustyIpcPollEndFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrustyIpcPollEndFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrustyIpcPollEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrustyIpcPollEndFtraceEvent} TrustyIpcPollEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyIpcPollEndFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrustyIpcPollEndFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.TrustyIpcPollEndFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrustyIpcPollEndFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates a TrustyIpcPollEndFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrustyIpcPollEndFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrustyIpcPollEndFtraceEvent} TrustyIpcPollEndFtraceEvent
             */
            TrustyIpcPollEndFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrustyIpcPollEndFtraceEvent)
                    return d;
                return new $root.perfetto.protos.TrustyIpcPollEndFtraceEvent();
            };

            /**
             * Creates a plain object from a TrustyIpcPollEndFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrustyIpcPollEndFtraceEvent
             * @static
             * @param {perfetto.protos.TrustyIpcPollEndFtraceEvent} m TrustyIpcPollEndFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrustyIpcPollEndFtraceEvent.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this TrustyIpcPollEndFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrustyIpcPollEndFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrustyIpcPollEndFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrustyIpcPollEndFtraceEvent;
        })();

        protos.TrustyIpcReadFtraceEvent = (function() {

            /**
             * Properties of a TrustyIpcReadFtraceEvent.
             * @memberof perfetto.protos
             * @interface ITrustyIpcReadFtraceEvent
             * @property {number|null} [chan] TrustyIpcReadFtraceEvent chan
             * @property {string|null} [srvName] TrustyIpcReadFtraceEvent srvName
             */

            /**
             * Constructs a new TrustyIpcReadFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TrustyIpcReadFtraceEvent.
             * @implements ITrustyIpcReadFtraceEvent
             * @constructor
             * @param {perfetto.protos.ITrustyIpcReadFtraceEvent=} [p] Properties to set
             */
            function TrustyIpcReadFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TrustyIpcReadFtraceEvent chan.
             * @member {number} chan
             * @memberof perfetto.protos.TrustyIpcReadFtraceEvent
             * @instance
             */
            TrustyIpcReadFtraceEvent.prototype.chan = 0;

            /**
             * TrustyIpcReadFtraceEvent srvName.
             * @member {string} srvName
             * @memberof perfetto.protos.TrustyIpcReadFtraceEvent
             * @instance
             */
            TrustyIpcReadFtraceEvent.prototype.srvName = "";

            /**
             * Creates a new TrustyIpcReadFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrustyIpcReadFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcReadFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TrustyIpcReadFtraceEvent} TrustyIpcReadFtraceEvent instance
             */
            TrustyIpcReadFtraceEvent.create = function create(properties) {
                return new TrustyIpcReadFtraceEvent(properties);
            };

            /**
             * Encodes the specified TrustyIpcReadFtraceEvent message. Does not implicitly {@link perfetto.protos.TrustyIpcReadFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrustyIpcReadFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcReadFtraceEvent} m TrustyIpcReadFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyIpcReadFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.chan != null && Object.hasOwnProperty.call(m, "chan"))
                    w.uint32(8).uint32(m.chan);
                if (m.srvName != null && Object.hasOwnProperty.call(m, "srvName"))
                    w.uint32(18).string(m.srvName);
                return w;
            };

            /**
             * Encodes the specified TrustyIpcReadFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TrustyIpcReadFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrustyIpcReadFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcReadFtraceEvent} message TrustyIpcReadFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyIpcReadFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrustyIpcReadFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrustyIpcReadFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrustyIpcReadFtraceEvent} TrustyIpcReadFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyIpcReadFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrustyIpcReadFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.chan = r.uint32();
                        break;
                    case 2:
                        m.srvName = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrustyIpcReadFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrustyIpcReadFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrustyIpcReadFtraceEvent} TrustyIpcReadFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyIpcReadFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrustyIpcReadFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.TrustyIpcReadFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrustyIpcReadFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.chan != null && m.hasOwnProperty("chan")) {
                    if (!$util.isInteger(m.chan))
                        return "chan: integer expected";
                }
                if (m.srvName != null && m.hasOwnProperty("srvName")) {
                    if (!$util.isString(m.srvName))
                        return "srvName: string expected";
                }
                return null;
            };

            /**
             * Creates a TrustyIpcReadFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrustyIpcReadFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrustyIpcReadFtraceEvent} TrustyIpcReadFtraceEvent
             */
            TrustyIpcReadFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrustyIpcReadFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.TrustyIpcReadFtraceEvent();
                if (d.chan != null) {
                    m.chan = d.chan >>> 0;
                }
                if (d.srvName != null) {
                    m.srvName = String(d.srvName);
                }
                return m;
            };

            /**
             * Creates a plain object from a TrustyIpcReadFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrustyIpcReadFtraceEvent
             * @static
             * @param {perfetto.protos.TrustyIpcReadFtraceEvent} m TrustyIpcReadFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrustyIpcReadFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.chan = 0;
                    d.srvName = "";
                }
                if (m.chan != null && m.hasOwnProperty("chan")) {
                    d.chan = m.chan;
                }
                if (m.srvName != null && m.hasOwnProperty("srvName")) {
                    d.srvName = m.srvName;
                }
                return d;
            };

            /**
             * Converts this TrustyIpcReadFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrustyIpcReadFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrustyIpcReadFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrustyIpcReadFtraceEvent;
        })();

        protos.TrustyIpcReadEndFtraceEvent = (function() {

            /**
             * Properties of a TrustyIpcReadEndFtraceEvent.
             * @memberof perfetto.protos
             * @interface ITrustyIpcReadEndFtraceEvent
             * @property {number|null} [bufId] TrustyIpcReadEndFtraceEvent bufId
             * @property {number|null} [chan] TrustyIpcReadEndFtraceEvent chan
             * @property {number|null} [lenOrErr] TrustyIpcReadEndFtraceEvent lenOrErr
             * @property {number|null} [shmCnt] TrustyIpcReadEndFtraceEvent shmCnt
             * @property {string|null} [srvName] TrustyIpcReadEndFtraceEvent srvName
             */

            /**
             * Constructs a new TrustyIpcReadEndFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TrustyIpcReadEndFtraceEvent.
             * @implements ITrustyIpcReadEndFtraceEvent
             * @constructor
             * @param {perfetto.protos.ITrustyIpcReadEndFtraceEvent=} [p] Properties to set
             */
            function TrustyIpcReadEndFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TrustyIpcReadEndFtraceEvent bufId.
             * @member {number} bufId
             * @memberof perfetto.protos.TrustyIpcReadEndFtraceEvent
             * @instance
             */
            TrustyIpcReadEndFtraceEvent.prototype.bufId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TrustyIpcReadEndFtraceEvent chan.
             * @member {number} chan
             * @memberof perfetto.protos.TrustyIpcReadEndFtraceEvent
             * @instance
             */
            TrustyIpcReadEndFtraceEvent.prototype.chan = 0;

            /**
             * TrustyIpcReadEndFtraceEvent lenOrErr.
             * @member {number} lenOrErr
             * @memberof perfetto.protos.TrustyIpcReadEndFtraceEvent
             * @instance
             */
            TrustyIpcReadEndFtraceEvent.prototype.lenOrErr = 0;

            /**
             * TrustyIpcReadEndFtraceEvent shmCnt.
             * @member {number} shmCnt
             * @memberof perfetto.protos.TrustyIpcReadEndFtraceEvent
             * @instance
             */
            TrustyIpcReadEndFtraceEvent.prototype.shmCnt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TrustyIpcReadEndFtraceEvent srvName.
             * @member {string} srvName
             * @memberof perfetto.protos.TrustyIpcReadEndFtraceEvent
             * @instance
             */
            TrustyIpcReadEndFtraceEvent.prototype.srvName = "";

            /**
             * Creates a new TrustyIpcReadEndFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrustyIpcReadEndFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcReadEndFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TrustyIpcReadEndFtraceEvent} TrustyIpcReadEndFtraceEvent instance
             */
            TrustyIpcReadEndFtraceEvent.create = function create(properties) {
                return new TrustyIpcReadEndFtraceEvent(properties);
            };

            /**
             * Encodes the specified TrustyIpcReadEndFtraceEvent message. Does not implicitly {@link perfetto.protos.TrustyIpcReadEndFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrustyIpcReadEndFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcReadEndFtraceEvent} m TrustyIpcReadEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyIpcReadEndFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.bufId != null && Object.hasOwnProperty.call(m, "bufId"))
                    w.uint32(8).uint64(m.bufId);
                if (m.chan != null && Object.hasOwnProperty.call(m, "chan"))
                    w.uint32(16).uint32(m.chan);
                if (m.lenOrErr != null && Object.hasOwnProperty.call(m, "lenOrErr"))
                    w.uint32(24).int32(m.lenOrErr);
                if (m.shmCnt != null && Object.hasOwnProperty.call(m, "shmCnt"))
                    w.uint32(32).uint64(m.shmCnt);
                if (m.srvName != null && Object.hasOwnProperty.call(m, "srvName"))
                    w.uint32(42).string(m.srvName);
                return w;
            };

            /**
             * Encodes the specified TrustyIpcReadEndFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TrustyIpcReadEndFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrustyIpcReadEndFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcReadEndFtraceEvent} message TrustyIpcReadEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyIpcReadEndFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrustyIpcReadEndFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrustyIpcReadEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrustyIpcReadEndFtraceEvent} TrustyIpcReadEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyIpcReadEndFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrustyIpcReadEndFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.bufId = r.uint64();
                        break;
                    case 2:
                        m.chan = r.uint32();
                        break;
                    case 3:
                        m.lenOrErr = r.int32();
                        break;
                    case 4:
                        m.shmCnt = r.uint64();
                        break;
                    case 5:
                        m.srvName = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrustyIpcReadEndFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrustyIpcReadEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrustyIpcReadEndFtraceEvent} TrustyIpcReadEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyIpcReadEndFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrustyIpcReadEndFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.TrustyIpcReadEndFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrustyIpcReadEndFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.bufId != null && m.hasOwnProperty("bufId")) {
                    if (!$util.isInteger(m.bufId) && !(m.bufId && $util.isInteger(m.bufId.low) && $util.isInteger(m.bufId.high)))
                        return "bufId: integer|Long expected";
                }
                if (m.chan != null && m.hasOwnProperty("chan")) {
                    if (!$util.isInteger(m.chan))
                        return "chan: integer expected";
                }
                if (m.lenOrErr != null && m.hasOwnProperty("lenOrErr")) {
                    if (!$util.isInteger(m.lenOrErr))
                        return "lenOrErr: integer expected";
                }
                if (m.shmCnt != null && m.hasOwnProperty("shmCnt")) {
                    if (!$util.isInteger(m.shmCnt) && !(m.shmCnt && $util.isInteger(m.shmCnt.low) && $util.isInteger(m.shmCnt.high)))
                        return "shmCnt: integer|Long expected";
                }
                if (m.srvName != null && m.hasOwnProperty("srvName")) {
                    if (!$util.isString(m.srvName))
                        return "srvName: string expected";
                }
                return null;
            };

            /**
             * Creates a TrustyIpcReadEndFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrustyIpcReadEndFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrustyIpcReadEndFtraceEvent} TrustyIpcReadEndFtraceEvent
             */
            TrustyIpcReadEndFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrustyIpcReadEndFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.TrustyIpcReadEndFtraceEvent();
                if (d.bufId != null) {
                    if ($util.Long)
                        (m.bufId = $util.Long.fromValue(d.bufId)).unsigned = true;
                    else if (typeof d.bufId === "string")
                        m.bufId = parseInt(d.bufId, 10);
                    else if (typeof d.bufId === "number")
                        m.bufId = d.bufId;
                    else if (typeof d.bufId === "object")
                        m.bufId = new $util.LongBits(d.bufId.low >>> 0, d.bufId.high >>> 0).toNumber(true);
                }
                if (d.chan != null) {
                    m.chan = d.chan >>> 0;
                }
                if (d.lenOrErr != null) {
                    m.lenOrErr = d.lenOrErr | 0;
                }
                if (d.shmCnt != null) {
                    if ($util.Long)
                        (m.shmCnt = $util.Long.fromValue(d.shmCnt)).unsigned = true;
                    else if (typeof d.shmCnt === "string")
                        m.shmCnt = parseInt(d.shmCnt, 10);
                    else if (typeof d.shmCnt === "number")
                        m.shmCnt = d.shmCnt;
                    else if (typeof d.shmCnt === "object")
                        m.shmCnt = new $util.LongBits(d.shmCnt.low >>> 0, d.shmCnt.high >>> 0).toNumber(true);
                }
                if (d.srvName != null) {
                    m.srvName = String(d.srvName);
                }
                return m;
            };

            /**
             * Creates a plain object from a TrustyIpcReadEndFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrustyIpcReadEndFtraceEvent
             * @static
             * @param {perfetto.protos.TrustyIpcReadEndFtraceEvent} m TrustyIpcReadEndFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrustyIpcReadEndFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.bufId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.bufId = o.longs === String ? "0" : 0;
                    d.chan = 0;
                    d.lenOrErr = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.shmCnt = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.shmCnt = o.longs === String ? "0" : 0;
                    d.srvName = "";
                }
                if (m.bufId != null && m.hasOwnProperty("bufId")) {
                    if (typeof m.bufId === "number")
                        d.bufId = o.longs === String ? String(m.bufId) : m.bufId;
                    else
                        d.bufId = o.longs === String ? $util.Long.prototype.toString.call(m.bufId) : o.longs === Number ? new $util.LongBits(m.bufId.low >>> 0, m.bufId.high >>> 0).toNumber(true) : m.bufId;
                }
                if (m.chan != null && m.hasOwnProperty("chan")) {
                    d.chan = m.chan;
                }
                if (m.lenOrErr != null && m.hasOwnProperty("lenOrErr")) {
                    d.lenOrErr = m.lenOrErr;
                }
                if (m.shmCnt != null && m.hasOwnProperty("shmCnt")) {
                    if (typeof m.shmCnt === "number")
                        d.shmCnt = o.longs === String ? String(m.shmCnt) : m.shmCnt;
                    else
                        d.shmCnt = o.longs === String ? $util.Long.prototype.toString.call(m.shmCnt) : o.longs === Number ? new $util.LongBits(m.shmCnt.low >>> 0, m.shmCnt.high >>> 0).toNumber(true) : m.shmCnt;
                }
                if (m.srvName != null && m.hasOwnProperty("srvName")) {
                    d.srvName = m.srvName;
                }
                return d;
            };

            /**
             * Converts this TrustyIpcReadEndFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrustyIpcReadEndFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrustyIpcReadEndFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrustyIpcReadEndFtraceEvent;
        })();

        protos.TrustyIpcRxFtraceEvent = (function() {

            /**
             * Properties of a TrustyIpcRxFtraceEvent.
             * @memberof perfetto.protos
             * @interface ITrustyIpcRxFtraceEvent
             * @property {number|null} [bufId] TrustyIpcRxFtraceEvent bufId
             * @property {number|null} [chan] TrustyIpcRxFtraceEvent chan
             * @property {string|null} [srvName] TrustyIpcRxFtraceEvent srvName
             */

            /**
             * Constructs a new TrustyIpcRxFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TrustyIpcRxFtraceEvent.
             * @implements ITrustyIpcRxFtraceEvent
             * @constructor
             * @param {perfetto.protos.ITrustyIpcRxFtraceEvent=} [p] Properties to set
             */
            function TrustyIpcRxFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TrustyIpcRxFtraceEvent bufId.
             * @member {number} bufId
             * @memberof perfetto.protos.TrustyIpcRxFtraceEvent
             * @instance
             */
            TrustyIpcRxFtraceEvent.prototype.bufId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TrustyIpcRxFtraceEvent chan.
             * @member {number} chan
             * @memberof perfetto.protos.TrustyIpcRxFtraceEvent
             * @instance
             */
            TrustyIpcRxFtraceEvent.prototype.chan = 0;

            /**
             * TrustyIpcRxFtraceEvent srvName.
             * @member {string} srvName
             * @memberof perfetto.protos.TrustyIpcRxFtraceEvent
             * @instance
             */
            TrustyIpcRxFtraceEvent.prototype.srvName = "";

            /**
             * Creates a new TrustyIpcRxFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrustyIpcRxFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcRxFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TrustyIpcRxFtraceEvent} TrustyIpcRxFtraceEvent instance
             */
            TrustyIpcRxFtraceEvent.create = function create(properties) {
                return new TrustyIpcRxFtraceEvent(properties);
            };

            /**
             * Encodes the specified TrustyIpcRxFtraceEvent message. Does not implicitly {@link perfetto.protos.TrustyIpcRxFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrustyIpcRxFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcRxFtraceEvent} m TrustyIpcRxFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyIpcRxFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.bufId != null && Object.hasOwnProperty.call(m, "bufId"))
                    w.uint32(8).uint64(m.bufId);
                if (m.chan != null && Object.hasOwnProperty.call(m, "chan"))
                    w.uint32(16).uint32(m.chan);
                if (m.srvName != null && Object.hasOwnProperty.call(m, "srvName"))
                    w.uint32(26).string(m.srvName);
                return w;
            };

            /**
             * Encodes the specified TrustyIpcRxFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TrustyIpcRxFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrustyIpcRxFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcRxFtraceEvent} message TrustyIpcRxFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyIpcRxFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrustyIpcRxFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrustyIpcRxFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrustyIpcRxFtraceEvent} TrustyIpcRxFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyIpcRxFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrustyIpcRxFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.bufId = r.uint64();
                        break;
                    case 2:
                        m.chan = r.uint32();
                        break;
                    case 3:
                        m.srvName = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrustyIpcRxFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrustyIpcRxFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrustyIpcRxFtraceEvent} TrustyIpcRxFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyIpcRxFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrustyIpcRxFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.TrustyIpcRxFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrustyIpcRxFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.bufId != null && m.hasOwnProperty("bufId")) {
                    if (!$util.isInteger(m.bufId) && !(m.bufId && $util.isInteger(m.bufId.low) && $util.isInteger(m.bufId.high)))
                        return "bufId: integer|Long expected";
                }
                if (m.chan != null && m.hasOwnProperty("chan")) {
                    if (!$util.isInteger(m.chan))
                        return "chan: integer expected";
                }
                if (m.srvName != null && m.hasOwnProperty("srvName")) {
                    if (!$util.isString(m.srvName))
                        return "srvName: string expected";
                }
                return null;
            };

            /**
             * Creates a TrustyIpcRxFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrustyIpcRxFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrustyIpcRxFtraceEvent} TrustyIpcRxFtraceEvent
             */
            TrustyIpcRxFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrustyIpcRxFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.TrustyIpcRxFtraceEvent();
                if (d.bufId != null) {
                    if ($util.Long)
                        (m.bufId = $util.Long.fromValue(d.bufId)).unsigned = true;
                    else if (typeof d.bufId === "string")
                        m.bufId = parseInt(d.bufId, 10);
                    else if (typeof d.bufId === "number")
                        m.bufId = d.bufId;
                    else if (typeof d.bufId === "object")
                        m.bufId = new $util.LongBits(d.bufId.low >>> 0, d.bufId.high >>> 0).toNumber(true);
                }
                if (d.chan != null) {
                    m.chan = d.chan >>> 0;
                }
                if (d.srvName != null) {
                    m.srvName = String(d.srvName);
                }
                return m;
            };

            /**
             * Creates a plain object from a TrustyIpcRxFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrustyIpcRxFtraceEvent
             * @static
             * @param {perfetto.protos.TrustyIpcRxFtraceEvent} m TrustyIpcRxFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrustyIpcRxFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.bufId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.bufId = o.longs === String ? "0" : 0;
                    d.chan = 0;
                    d.srvName = "";
                }
                if (m.bufId != null && m.hasOwnProperty("bufId")) {
                    if (typeof m.bufId === "number")
                        d.bufId = o.longs === String ? String(m.bufId) : m.bufId;
                    else
                        d.bufId = o.longs === String ? $util.Long.prototype.toString.call(m.bufId) : o.longs === Number ? new $util.LongBits(m.bufId.low >>> 0, m.bufId.high >>> 0).toNumber(true) : m.bufId;
                }
                if (m.chan != null && m.hasOwnProperty("chan")) {
                    d.chan = m.chan;
                }
                if (m.srvName != null && m.hasOwnProperty("srvName")) {
                    d.srvName = m.srvName;
                }
                return d;
            };

            /**
             * Converts this TrustyIpcRxFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrustyIpcRxFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrustyIpcRxFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrustyIpcRxFtraceEvent;
        })();

        protos.TrustyIpcTxFtraceEvent = (function() {

            /**
             * Properties of a TrustyIpcTxFtraceEvent.
             * @memberof perfetto.protos
             * @interface ITrustyIpcTxFtraceEvent
             */

            /**
             * Constructs a new TrustyIpcTxFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TrustyIpcTxFtraceEvent.
             * @implements ITrustyIpcTxFtraceEvent
             * @constructor
             * @param {perfetto.protos.ITrustyIpcTxFtraceEvent=} [p] Properties to set
             */
            function TrustyIpcTxFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Creates a new TrustyIpcTxFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrustyIpcTxFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcTxFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TrustyIpcTxFtraceEvent} TrustyIpcTxFtraceEvent instance
             */
            TrustyIpcTxFtraceEvent.create = function create(properties) {
                return new TrustyIpcTxFtraceEvent(properties);
            };

            /**
             * Encodes the specified TrustyIpcTxFtraceEvent message. Does not implicitly {@link perfetto.protos.TrustyIpcTxFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrustyIpcTxFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcTxFtraceEvent} m TrustyIpcTxFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyIpcTxFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                return w;
            };

            /**
             * Encodes the specified TrustyIpcTxFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TrustyIpcTxFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrustyIpcTxFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyIpcTxFtraceEvent} message TrustyIpcTxFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyIpcTxFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrustyIpcTxFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrustyIpcTxFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrustyIpcTxFtraceEvent} TrustyIpcTxFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyIpcTxFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrustyIpcTxFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrustyIpcTxFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrustyIpcTxFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrustyIpcTxFtraceEvent} TrustyIpcTxFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyIpcTxFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrustyIpcTxFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.TrustyIpcTxFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrustyIpcTxFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates a TrustyIpcTxFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrustyIpcTxFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrustyIpcTxFtraceEvent} TrustyIpcTxFtraceEvent
             */
            TrustyIpcTxFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrustyIpcTxFtraceEvent)
                    return d;
                return new $root.perfetto.protos.TrustyIpcTxFtraceEvent();
            };

            /**
             * Creates a plain object from a TrustyIpcTxFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrustyIpcTxFtraceEvent
             * @static
             * @param {perfetto.protos.TrustyIpcTxFtraceEvent} m TrustyIpcTxFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrustyIpcTxFtraceEvent.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this TrustyIpcTxFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrustyIpcTxFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrustyIpcTxFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrustyIpcTxFtraceEvent;
        })();

        protos.TrustyEnqueueNopFtraceEvent = (function() {

            /**
             * Properties of a TrustyEnqueueNopFtraceEvent.
             * @memberof perfetto.protos
             * @interface ITrustyEnqueueNopFtraceEvent
             * @property {number|null} [arg1] TrustyEnqueueNopFtraceEvent arg1
             * @property {number|null} [arg2] TrustyEnqueueNopFtraceEvent arg2
             * @property {number|null} [arg3] TrustyEnqueueNopFtraceEvent arg3
             */

            /**
             * Constructs a new TrustyEnqueueNopFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TrustyEnqueueNopFtraceEvent.
             * @implements ITrustyEnqueueNopFtraceEvent
             * @constructor
             * @param {perfetto.protos.ITrustyEnqueueNopFtraceEvent=} [p] Properties to set
             */
            function TrustyEnqueueNopFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TrustyEnqueueNopFtraceEvent arg1.
             * @member {number} arg1
             * @memberof perfetto.protos.TrustyEnqueueNopFtraceEvent
             * @instance
             */
            TrustyEnqueueNopFtraceEvent.prototype.arg1 = 0;

            /**
             * TrustyEnqueueNopFtraceEvent arg2.
             * @member {number} arg2
             * @memberof perfetto.protos.TrustyEnqueueNopFtraceEvent
             * @instance
             */
            TrustyEnqueueNopFtraceEvent.prototype.arg2 = 0;

            /**
             * TrustyEnqueueNopFtraceEvent arg3.
             * @member {number} arg3
             * @memberof perfetto.protos.TrustyEnqueueNopFtraceEvent
             * @instance
             */
            TrustyEnqueueNopFtraceEvent.prototype.arg3 = 0;

            /**
             * Creates a new TrustyEnqueueNopFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrustyEnqueueNopFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyEnqueueNopFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TrustyEnqueueNopFtraceEvent} TrustyEnqueueNopFtraceEvent instance
             */
            TrustyEnqueueNopFtraceEvent.create = function create(properties) {
                return new TrustyEnqueueNopFtraceEvent(properties);
            };

            /**
             * Encodes the specified TrustyEnqueueNopFtraceEvent message. Does not implicitly {@link perfetto.protos.TrustyEnqueueNopFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrustyEnqueueNopFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyEnqueueNopFtraceEvent} m TrustyEnqueueNopFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyEnqueueNopFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.arg1 != null && Object.hasOwnProperty.call(m, "arg1"))
                    w.uint32(8).uint32(m.arg1);
                if (m.arg2 != null && Object.hasOwnProperty.call(m, "arg2"))
                    w.uint32(16).uint32(m.arg2);
                if (m.arg3 != null && Object.hasOwnProperty.call(m, "arg3"))
                    w.uint32(24).uint32(m.arg3);
                return w;
            };

            /**
             * Encodes the specified TrustyEnqueueNopFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TrustyEnqueueNopFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrustyEnqueueNopFtraceEvent
             * @static
             * @param {perfetto.protos.ITrustyEnqueueNopFtraceEvent} message TrustyEnqueueNopFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrustyEnqueueNopFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrustyEnqueueNopFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrustyEnqueueNopFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrustyEnqueueNopFtraceEvent} TrustyEnqueueNopFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyEnqueueNopFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrustyEnqueueNopFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.arg1 = r.uint32();
                        break;
                    case 2:
                        m.arg2 = r.uint32();
                        break;
                    case 3:
                        m.arg3 = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrustyEnqueueNopFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrustyEnqueueNopFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrustyEnqueueNopFtraceEvent} TrustyEnqueueNopFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrustyEnqueueNopFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrustyEnqueueNopFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.TrustyEnqueueNopFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrustyEnqueueNopFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.arg1 != null && m.hasOwnProperty("arg1")) {
                    if (!$util.isInteger(m.arg1))
                        return "arg1: integer expected";
                }
                if (m.arg2 != null && m.hasOwnProperty("arg2")) {
                    if (!$util.isInteger(m.arg2))
                        return "arg2: integer expected";
                }
                if (m.arg3 != null && m.hasOwnProperty("arg3")) {
                    if (!$util.isInteger(m.arg3))
                        return "arg3: integer expected";
                }
                return null;
            };

            /**
             * Creates a TrustyEnqueueNopFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrustyEnqueueNopFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrustyEnqueueNopFtraceEvent} TrustyEnqueueNopFtraceEvent
             */
            TrustyEnqueueNopFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrustyEnqueueNopFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.TrustyEnqueueNopFtraceEvent();
                if (d.arg1 != null) {
                    m.arg1 = d.arg1 >>> 0;
                }
                if (d.arg2 != null) {
                    m.arg2 = d.arg2 >>> 0;
                }
                if (d.arg3 != null) {
                    m.arg3 = d.arg3 >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a TrustyEnqueueNopFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrustyEnqueueNopFtraceEvent
             * @static
             * @param {perfetto.protos.TrustyEnqueueNopFtraceEvent} m TrustyEnqueueNopFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrustyEnqueueNopFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.arg1 = 0;
                    d.arg2 = 0;
                    d.arg3 = 0;
                }
                if (m.arg1 != null && m.hasOwnProperty("arg1")) {
                    d.arg1 = m.arg1;
                }
                if (m.arg2 != null && m.hasOwnProperty("arg2")) {
                    d.arg2 = m.arg2;
                }
                if (m.arg3 != null && m.hasOwnProperty("arg3")) {
                    d.arg3 = m.arg3;
                }
                return d;
            };

            /**
             * Converts this TrustyEnqueueNopFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrustyEnqueueNopFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrustyEnqueueNopFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrustyEnqueueNopFtraceEvent;
        })();

        protos.UfshcdCommandFtraceEvent = (function() {

            /**
             * Properties of an UfshcdCommandFtraceEvent.
             * @memberof perfetto.protos
             * @interface IUfshcdCommandFtraceEvent
             * @property {string|null} [devName] UfshcdCommandFtraceEvent devName
             * @property {number|null} [doorbell] UfshcdCommandFtraceEvent doorbell
             * @property {number|null} [intr] UfshcdCommandFtraceEvent intr
             * @property {number|null} [lba] UfshcdCommandFtraceEvent lba
             * @property {number|null} [opcode] UfshcdCommandFtraceEvent opcode
             * @property {string|null} [str] UfshcdCommandFtraceEvent str
             * @property {number|null} [tag] UfshcdCommandFtraceEvent tag
             * @property {number|null} [transferLen] UfshcdCommandFtraceEvent transferLen
             * @property {number|null} [groupId] UfshcdCommandFtraceEvent groupId
             * @property {number|null} [strT] UfshcdCommandFtraceEvent strT
             */

            /**
             * Constructs a new UfshcdCommandFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an UfshcdCommandFtraceEvent.
             * @implements IUfshcdCommandFtraceEvent
             * @constructor
             * @param {perfetto.protos.IUfshcdCommandFtraceEvent=} [p] Properties to set
             */
            function UfshcdCommandFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * UfshcdCommandFtraceEvent devName.
             * @member {string} devName
             * @memberof perfetto.protos.UfshcdCommandFtraceEvent
             * @instance
             */
            UfshcdCommandFtraceEvent.prototype.devName = "";

            /**
             * UfshcdCommandFtraceEvent doorbell.
             * @member {number} doorbell
             * @memberof perfetto.protos.UfshcdCommandFtraceEvent
             * @instance
             */
            UfshcdCommandFtraceEvent.prototype.doorbell = 0;

            /**
             * UfshcdCommandFtraceEvent intr.
             * @member {number} intr
             * @memberof perfetto.protos.UfshcdCommandFtraceEvent
             * @instance
             */
            UfshcdCommandFtraceEvent.prototype.intr = 0;

            /**
             * UfshcdCommandFtraceEvent lba.
             * @member {number} lba
             * @memberof perfetto.protos.UfshcdCommandFtraceEvent
             * @instance
             */
            UfshcdCommandFtraceEvent.prototype.lba = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * UfshcdCommandFtraceEvent opcode.
             * @member {number} opcode
             * @memberof perfetto.protos.UfshcdCommandFtraceEvent
             * @instance
             */
            UfshcdCommandFtraceEvent.prototype.opcode = 0;

            /**
             * UfshcdCommandFtraceEvent str.
             * @member {string} str
             * @memberof perfetto.protos.UfshcdCommandFtraceEvent
             * @instance
             */
            UfshcdCommandFtraceEvent.prototype.str = "";

            /**
             * UfshcdCommandFtraceEvent tag.
             * @member {number} tag
             * @memberof perfetto.protos.UfshcdCommandFtraceEvent
             * @instance
             */
            UfshcdCommandFtraceEvent.prototype.tag = 0;

            /**
             * UfshcdCommandFtraceEvent transferLen.
             * @member {number} transferLen
             * @memberof perfetto.protos.UfshcdCommandFtraceEvent
             * @instance
             */
            UfshcdCommandFtraceEvent.prototype.transferLen = 0;

            /**
             * UfshcdCommandFtraceEvent groupId.
             * @member {number} groupId
             * @memberof perfetto.protos.UfshcdCommandFtraceEvent
             * @instance
             */
            UfshcdCommandFtraceEvent.prototype.groupId = 0;

            /**
             * UfshcdCommandFtraceEvent strT.
             * @member {number} strT
             * @memberof perfetto.protos.UfshcdCommandFtraceEvent
             * @instance
             */
            UfshcdCommandFtraceEvent.prototype.strT = 0;

            /**
             * Creates a new UfshcdCommandFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.UfshcdCommandFtraceEvent
             * @static
             * @param {perfetto.protos.IUfshcdCommandFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.UfshcdCommandFtraceEvent} UfshcdCommandFtraceEvent instance
             */
            UfshcdCommandFtraceEvent.create = function create(properties) {
                return new UfshcdCommandFtraceEvent(properties);
            };

            /**
             * Encodes the specified UfshcdCommandFtraceEvent message. Does not implicitly {@link perfetto.protos.UfshcdCommandFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.UfshcdCommandFtraceEvent
             * @static
             * @param {perfetto.protos.IUfshcdCommandFtraceEvent} m UfshcdCommandFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            UfshcdCommandFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.devName != null && Object.hasOwnProperty.call(m, "devName"))
                    w.uint32(10).string(m.devName);
                if (m.doorbell != null && Object.hasOwnProperty.call(m, "doorbell"))
                    w.uint32(16).uint32(m.doorbell);
                if (m.intr != null && Object.hasOwnProperty.call(m, "intr"))
                    w.uint32(24).uint32(m.intr);
                if (m.lba != null && Object.hasOwnProperty.call(m, "lba"))
                    w.uint32(32).uint64(m.lba);
                if (m.opcode != null && Object.hasOwnProperty.call(m, "opcode"))
                    w.uint32(40).uint32(m.opcode);
                if (m.str != null && Object.hasOwnProperty.call(m, "str"))
                    w.uint32(50).string(m.str);
                if (m.tag != null && Object.hasOwnProperty.call(m, "tag"))
                    w.uint32(56).uint32(m.tag);
                if (m.transferLen != null && Object.hasOwnProperty.call(m, "transferLen"))
                    w.uint32(64).int32(m.transferLen);
                if (m.groupId != null && Object.hasOwnProperty.call(m, "groupId"))
                    w.uint32(72).uint32(m.groupId);
                if (m.strT != null && Object.hasOwnProperty.call(m, "strT"))
                    w.uint32(80).uint32(m.strT);
                return w;
            };

            /**
             * Encodes the specified UfshcdCommandFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.UfshcdCommandFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.UfshcdCommandFtraceEvent
             * @static
             * @param {perfetto.protos.IUfshcdCommandFtraceEvent} message UfshcdCommandFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            UfshcdCommandFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an UfshcdCommandFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.UfshcdCommandFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.UfshcdCommandFtraceEvent} UfshcdCommandFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            UfshcdCommandFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.UfshcdCommandFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.devName = r.string();
                        break;
                    case 2:
                        m.doorbell = r.uint32();
                        break;
                    case 3:
                        m.intr = r.uint32();
                        break;
                    case 4:
                        m.lba = r.uint64();
                        break;
                    case 5:
                        m.opcode = r.uint32();
                        break;
                    case 6:
                        m.str = r.string();
                        break;
                    case 7:
                        m.tag = r.uint32();
                        break;
                    case 8:
                        m.transferLen = r.int32();
                        break;
                    case 9:
                        m.groupId = r.uint32();
                        break;
                    case 10:
                        m.strT = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an UfshcdCommandFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.UfshcdCommandFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.UfshcdCommandFtraceEvent} UfshcdCommandFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            UfshcdCommandFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an UfshcdCommandFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.UfshcdCommandFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            UfshcdCommandFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.devName != null && m.hasOwnProperty("devName")) {
                    if (!$util.isString(m.devName))
                        return "devName: string expected";
                }
                if (m.doorbell != null && m.hasOwnProperty("doorbell")) {
                    if (!$util.isInteger(m.doorbell))
                        return "doorbell: integer expected";
                }
                if (m.intr != null && m.hasOwnProperty("intr")) {
                    if (!$util.isInteger(m.intr))
                        return "intr: integer expected";
                }
                if (m.lba != null && m.hasOwnProperty("lba")) {
                    if (!$util.isInteger(m.lba) && !(m.lba && $util.isInteger(m.lba.low) && $util.isInteger(m.lba.high)))
                        return "lba: integer|Long expected";
                }
                if (m.opcode != null && m.hasOwnProperty("opcode")) {
                    if (!$util.isInteger(m.opcode))
                        return "opcode: integer expected";
                }
                if (m.str != null && m.hasOwnProperty("str")) {
                    if (!$util.isString(m.str))
                        return "str: string expected";
                }
                if (m.tag != null && m.hasOwnProperty("tag")) {
                    if (!$util.isInteger(m.tag))
                        return "tag: integer expected";
                }
                if (m.transferLen != null && m.hasOwnProperty("transferLen")) {
                    if (!$util.isInteger(m.transferLen))
                        return "transferLen: integer expected";
                }
                if (m.groupId != null && m.hasOwnProperty("groupId")) {
                    if (!$util.isInteger(m.groupId))
                        return "groupId: integer expected";
                }
                if (m.strT != null && m.hasOwnProperty("strT")) {
                    if (!$util.isInteger(m.strT))
                        return "strT: integer expected";
                }
                return null;
            };

            /**
             * Creates an UfshcdCommandFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.UfshcdCommandFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.UfshcdCommandFtraceEvent} UfshcdCommandFtraceEvent
             */
            UfshcdCommandFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.UfshcdCommandFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.UfshcdCommandFtraceEvent();
                if (d.devName != null) {
                    m.devName = String(d.devName);
                }
                if (d.doorbell != null) {
                    m.doorbell = d.doorbell >>> 0;
                }
                if (d.intr != null) {
                    m.intr = d.intr >>> 0;
                }
                if (d.lba != null) {
                    if ($util.Long)
                        (m.lba = $util.Long.fromValue(d.lba)).unsigned = true;
                    else if (typeof d.lba === "string")
                        m.lba = parseInt(d.lba, 10);
                    else if (typeof d.lba === "number")
                        m.lba = d.lba;
                    else if (typeof d.lba === "object")
                        m.lba = new $util.LongBits(d.lba.low >>> 0, d.lba.high >>> 0).toNumber(true);
                }
                if (d.opcode != null) {
                    m.opcode = d.opcode >>> 0;
                }
                if (d.str != null) {
                    m.str = String(d.str);
                }
                if (d.tag != null) {
                    m.tag = d.tag >>> 0;
                }
                if (d.transferLen != null) {
                    m.transferLen = d.transferLen | 0;
                }
                if (d.groupId != null) {
                    m.groupId = d.groupId >>> 0;
                }
                if (d.strT != null) {
                    m.strT = d.strT >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an UfshcdCommandFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.UfshcdCommandFtraceEvent
             * @static
             * @param {perfetto.protos.UfshcdCommandFtraceEvent} m UfshcdCommandFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            UfshcdCommandFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.devName = "";
                    d.doorbell = 0;
                    d.intr = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.lba = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.lba = o.longs === String ? "0" : 0;
                    d.opcode = 0;
                    d.str = "";
                    d.tag = 0;
                    d.transferLen = 0;
                    d.groupId = 0;
                    d.strT = 0;
                }
                if (m.devName != null && m.hasOwnProperty("devName")) {
                    d.devName = m.devName;
                }
                if (m.doorbell != null && m.hasOwnProperty("doorbell")) {
                    d.doorbell = m.doorbell;
                }
                if (m.intr != null && m.hasOwnProperty("intr")) {
                    d.intr = m.intr;
                }
                if (m.lba != null && m.hasOwnProperty("lba")) {
                    if (typeof m.lba === "number")
                        d.lba = o.longs === String ? String(m.lba) : m.lba;
                    else
                        d.lba = o.longs === String ? $util.Long.prototype.toString.call(m.lba) : o.longs === Number ? new $util.LongBits(m.lba.low >>> 0, m.lba.high >>> 0).toNumber(true) : m.lba;
                }
                if (m.opcode != null && m.hasOwnProperty("opcode")) {
                    d.opcode = m.opcode;
                }
                if (m.str != null && m.hasOwnProperty("str")) {
                    d.str = m.str;
                }
                if (m.tag != null && m.hasOwnProperty("tag")) {
                    d.tag = m.tag;
                }
                if (m.transferLen != null && m.hasOwnProperty("transferLen")) {
                    d.transferLen = m.transferLen;
                }
                if (m.groupId != null && m.hasOwnProperty("groupId")) {
                    d.groupId = m.groupId;
                }
                if (m.strT != null && m.hasOwnProperty("strT")) {
                    d.strT = m.strT;
                }
                return d;
            };

            /**
             * Converts this UfshcdCommandFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.UfshcdCommandFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            UfshcdCommandFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return UfshcdCommandFtraceEvent;
        })();

        protos.UfshcdClkGatingFtraceEvent = (function() {

            /**
             * Properties of an UfshcdClkGatingFtraceEvent.
             * @memberof perfetto.protos
             * @interface IUfshcdClkGatingFtraceEvent
             * @property {string|null} [devName] UfshcdClkGatingFtraceEvent devName
             * @property {number|null} [state] UfshcdClkGatingFtraceEvent state
             */

            /**
             * Constructs a new UfshcdClkGatingFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents an UfshcdClkGatingFtraceEvent.
             * @implements IUfshcdClkGatingFtraceEvent
             * @constructor
             * @param {perfetto.protos.IUfshcdClkGatingFtraceEvent=} [p] Properties to set
             */
            function UfshcdClkGatingFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * UfshcdClkGatingFtraceEvent devName.
             * @member {string} devName
             * @memberof perfetto.protos.UfshcdClkGatingFtraceEvent
             * @instance
             */
            UfshcdClkGatingFtraceEvent.prototype.devName = "";

            /**
             * UfshcdClkGatingFtraceEvent state.
             * @member {number} state
             * @memberof perfetto.protos.UfshcdClkGatingFtraceEvent
             * @instance
             */
            UfshcdClkGatingFtraceEvent.prototype.state = 0;

            /**
             * Creates a new UfshcdClkGatingFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.UfshcdClkGatingFtraceEvent
             * @static
             * @param {perfetto.protos.IUfshcdClkGatingFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.UfshcdClkGatingFtraceEvent} UfshcdClkGatingFtraceEvent instance
             */
            UfshcdClkGatingFtraceEvent.create = function create(properties) {
                return new UfshcdClkGatingFtraceEvent(properties);
            };

            /**
             * Encodes the specified UfshcdClkGatingFtraceEvent message. Does not implicitly {@link perfetto.protos.UfshcdClkGatingFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.UfshcdClkGatingFtraceEvent
             * @static
             * @param {perfetto.protos.IUfshcdClkGatingFtraceEvent} m UfshcdClkGatingFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            UfshcdClkGatingFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.devName != null && Object.hasOwnProperty.call(m, "devName"))
                    w.uint32(10).string(m.devName);
                if (m.state != null && Object.hasOwnProperty.call(m, "state"))
                    w.uint32(16).int32(m.state);
                return w;
            };

            /**
             * Encodes the specified UfshcdClkGatingFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.UfshcdClkGatingFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.UfshcdClkGatingFtraceEvent
             * @static
             * @param {perfetto.protos.IUfshcdClkGatingFtraceEvent} message UfshcdClkGatingFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            UfshcdClkGatingFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an UfshcdClkGatingFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.UfshcdClkGatingFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.UfshcdClkGatingFtraceEvent} UfshcdClkGatingFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            UfshcdClkGatingFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.UfshcdClkGatingFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.devName = r.string();
                        break;
                    case 2:
                        m.state = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an UfshcdClkGatingFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.UfshcdClkGatingFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.UfshcdClkGatingFtraceEvent} UfshcdClkGatingFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            UfshcdClkGatingFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an UfshcdClkGatingFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.UfshcdClkGatingFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            UfshcdClkGatingFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.devName != null && m.hasOwnProperty("devName")) {
                    if (!$util.isString(m.devName))
                        return "devName: string expected";
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    if (!$util.isInteger(m.state))
                        return "state: integer expected";
                }
                return null;
            };

            /**
             * Creates an UfshcdClkGatingFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.UfshcdClkGatingFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.UfshcdClkGatingFtraceEvent} UfshcdClkGatingFtraceEvent
             */
            UfshcdClkGatingFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.UfshcdClkGatingFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.UfshcdClkGatingFtraceEvent();
                if (d.devName != null) {
                    m.devName = String(d.devName);
                }
                if (d.state != null) {
                    m.state = d.state | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from an UfshcdClkGatingFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.UfshcdClkGatingFtraceEvent
             * @static
             * @param {perfetto.protos.UfshcdClkGatingFtraceEvent} m UfshcdClkGatingFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            UfshcdClkGatingFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.devName = "";
                    d.state = 0;
                }
                if (m.devName != null && m.hasOwnProperty("devName")) {
                    d.devName = m.devName;
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    d.state = m.state;
                }
                return d;
            };

            /**
             * Converts this UfshcdClkGatingFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.UfshcdClkGatingFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            UfshcdClkGatingFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return UfshcdClkGatingFtraceEvent;
        })();

        protos.V4l2QbufFtraceEvent = (function() {

            /**
             * Properties of a V4l2QbufFtraceEvent.
             * @memberof perfetto.protos
             * @interface IV4l2QbufFtraceEvent
             * @property {number|null} [bytesused] V4l2QbufFtraceEvent bytesused
             * @property {number|null} [field] V4l2QbufFtraceEvent field
             * @property {number|null} [flags] V4l2QbufFtraceEvent flags
             * @property {number|null} [index] V4l2QbufFtraceEvent index
             * @property {number|null} [minor] V4l2QbufFtraceEvent minor
             * @property {number|null} [sequence] V4l2QbufFtraceEvent sequence
             * @property {number|null} [timecodeFlags] V4l2QbufFtraceEvent timecodeFlags
             * @property {number|null} [timecodeFrames] V4l2QbufFtraceEvent timecodeFrames
             * @property {number|null} [timecodeHours] V4l2QbufFtraceEvent timecodeHours
             * @property {number|null} [timecodeMinutes] V4l2QbufFtraceEvent timecodeMinutes
             * @property {number|null} [timecodeSeconds] V4l2QbufFtraceEvent timecodeSeconds
             * @property {number|null} [timecodeType] V4l2QbufFtraceEvent timecodeType
             * @property {number|null} [timecodeUserbits0] V4l2QbufFtraceEvent timecodeUserbits0
             * @property {number|null} [timecodeUserbits1] V4l2QbufFtraceEvent timecodeUserbits1
             * @property {number|null} [timecodeUserbits2] V4l2QbufFtraceEvent timecodeUserbits2
             * @property {number|null} [timecodeUserbits3] V4l2QbufFtraceEvent timecodeUserbits3
             * @property {number|null} [timestamp] V4l2QbufFtraceEvent timestamp
             * @property {number|null} [type] V4l2QbufFtraceEvent type
             */

            /**
             * Constructs a new V4l2QbufFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a V4l2QbufFtraceEvent.
             * @implements IV4l2QbufFtraceEvent
             * @constructor
             * @param {perfetto.protos.IV4l2QbufFtraceEvent=} [p] Properties to set
             */
            function V4l2QbufFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * V4l2QbufFtraceEvent bytesused.
             * @member {number} bytesused
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @instance
             */
            V4l2QbufFtraceEvent.prototype.bytesused = 0;

            /**
             * V4l2QbufFtraceEvent field.
             * @member {number} field
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @instance
             */
            V4l2QbufFtraceEvent.prototype.field = 0;

            /**
             * V4l2QbufFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @instance
             */
            V4l2QbufFtraceEvent.prototype.flags = 0;

            /**
             * V4l2QbufFtraceEvent index.
             * @member {number} index
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @instance
             */
            V4l2QbufFtraceEvent.prototype.index = 0;

            /**
             * V4l2QbufFtraceEvent minor.
             * @member {number} minor
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @instance
             */
            V4l2QbufFtraceEvent.prototype.minor = 0;

            /**
             * V4l2QbufFtraceEvent sequence.
             * @member {number} sequence
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @instance
             */
            V4l2QbufFtraceEvent.prototype.sequence = 0;

            /**
             * V4l2QbufFtraceEvent timecodeFlags.
             * @member {number} timecodeFlags
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @instance
             */
            V4l2QbufFtraceEvent.prototype.timecodeFlags = 0;

            /**
             * V4l2QbufFtraceEvent timecodeFrames.
             * @member {number} timecodeFrames
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @instance
             */
            V4l2QbufFtraceEvent.prototype.timecodeFrames = 0;

            /**
             * V4l2QbufFtraceEvent timecodeHours.
             * @member {number} timecodeHours
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @instance
             */
            V4l2QbufFtraceEvent.prototype.timecodeHours = 0;

            /**
             * V4l2QbufFtraceEvent timecodeMinutes.
             * @member {number} timecodeMinutes
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @instance
             */
            V4l2QbufFtraceEvent.prototype.timecodeMinutes = 0;

            /**
             * V4l2QbufFtraceEvent timecodeSeconds.
             * @member {number} timecodeSeconds
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @instance
             */
            V4l2QbufFtraceEvent.prototype.timecodeSeconds = 0;

            /**
             * V4l2QbufFtraceEvent timecodeType.
             * @member {number} timecodeType
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @instance
             */
            V4l2QbufFtraceEvent.prototype.timecodeType = 0;

            /**
             * V4l2QbufFtraceEvent timecodeUserbits0.
             * @member {number} timecodeUserbits0
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @instance
             */
            V4l2QbufFtraceEvent.prototype.timecodeUserbits0 = 0;

            /**
             * V4l2QbufFtraceEvent timecodeUserbits1.
             * @member {number} timecodeUserbits1
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @instance
             */
            V4l2QbufFtraceEvent.prototype.timecodeUserbits1 = 0;

            /**
             * V4l2QbufFtraceEvent timecodeUserbits2.
             * @member {number} timecodeUserbits2
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @instance
             */
            V4l2QbufFtraceEvent.prototype.timecodeUserbits2 = 0;

            /**
             * V4l2QbufFtraceEvent timecodeUserbits3.
             * @member {number} timecodeUserbits3
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @instance
             */
            V4l2QbufFtraceEvent.prototype.timecodeUserbits3 = 0;

            /**
             * V4l2QbufFtraceEvent timestamp.
             * @member {number} timestamp
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @instance
             */
            V4l2QbufFtraceEvent.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * V4l2QbufFtraceEvent type.
             * @member {number} type
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @instance
             */
            V4l2QbufFtraceEvent.prototype.type = 0;

            /**
             * Creates a new V4l2QbufFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @static
             * @param {perfetto.protos.IV4l2QbufFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.V4l2QbufFtraceEvent} V4l2QbufFtraceEvent instance
             */
            V4l2QbufFtraceEvent.create = function create(properties) {
                return new V4l2QbufFtraceEvent(properties);
            };

            /**
             * Encodes the specified V4l2QbufFtraceEvent message. Does not implicitly {@link perfetto.protos.V4l2QbufFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @static
             * @param {perfetto.protos.IV4l2QbufFtraceEvent} m V4l2QbufFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            V4l2QbufFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.bytesused != null && Object.hasOwnProperty.call(m, "bytesused"))
                    w.uint32(8).uint32(m.bytesused);
                if (m.field != null && Object.hasOwnProperty.call(m, "field"))
                    w.uint32(16).uint32(m.field);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(24).uint32(m.flags);
                if (m.index != null && Object.hasOwnProperty.call(m, "index"))
                    w.uint32(32).uint32(m.index);
                if (m.minor != null && Object.hasOwnProperty.call(m, "minor"))
                    w.uint32(40).int32(m.minor);
                if (m.sequence != null && Object.hasOwnProperty.call(m, "sequence"))
                    w.uint32(48).uint32(m.sequence);
                if (m.timecodeFlags != null && Object.hasOwnProperty.call(m, "timecodeFlags"))
                    w.uint32(56).uint32(m.timecodeFlags);
                if (m.timecodeFrames != null && Object.hasOwnProperty.call(m, "timecodeFrames"))
                    w.uint32(64).uint32(m.timecodeFrames);
                if (m.timecodeHours != null && Object.hasOwnProperty.call(m, "timecodeHours"))
                    w.uint32(72).uint32(m.timecodeHours);
                if (m.timecodeMinutes != null && Object.hasOwnProperty.call(m, "timecodeMinutes"))
                    w.uint32(80).uint32(m.timecodeMinutes);
                if (m.timecodeSeconds != null && Object.hasOwnProperty.call(m, "timecodeSeconds"))
                    w.uint32(88).uint32(m.timecodeSeconds);
                if (m.timecodeType != null && Object.hasOwnProperty.call(m, "timecodeType"))
                    w.uint32(96).uint32(m.timecodeType);
                if (m.timecodeUserbits0 != null && Object.hasOwnProperty.call(m, "timecodeUserbits0"))
                    w.uint32(104).uint32(m.timecodeUserbits0);
                if (m.timecodeUserbits1 != null && Object.hasOwnProperty.call(m, "timecodeUserbits1"))
                    w.uint32(112).uint32(m.timecodeUserbits1);
                if (m.timecodeUserbits2 != null && Object.hasOwnProperty.call(m, "timecodeUserbits2"))
                    w.uint32(120).uint32(m.timecodeUserbits2);
                if (m.timecodeUserbits3 != null && Object.hasOwnProperty.call(m, "timecodeUserbits3"))
                    w.uint32(128).uint32(m.timecodeUserbits3);
                if (m.timestamp != null && Object.hasOwnProperty.call(m, "timestamp"))
                    w.uint32(136).int64(m.timestamp);
                if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                    w.uint32(144).uint32(m.type);
                return w;
            };

            /**
             * Encodes the specified V4l2QbufFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.V4l2QbufFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @static
             * @param {perfetto.protos.IV4l2QbufFtraceEvent} message V4l2QbufFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            V4l2QbufFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a V4l2QbufFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.V4l2QbufFtraceEvent} V4l2QbufFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            V4l2QbufFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.V4l2QbufFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.bytesused = r.uint32();
                        break;
                    case 2:
                        m.field = r.uint32();
                        break;
                    case 3:
                        m.flags = r.uint32();
                        break;
                    case 4:
                        m.index = r.uint32();
                        break;
                    case 5:
                        m.minor = r.int32();
                        break;
                    case 6:
                        m.sequence = r.uint32();
                        break;
                    case 7:
                        m.timecodeFlags = r.uint32();
                        break;
                    case 8:
                        m.timecodeFrames = r.uint32();
                        break;
                    case 9:
                        m.timecodeHours = r.uint32();
                        break;
                    case 10:
                        m.timecodeMinutes = r.uint32();
                        break;
                    case 11:
                        m.timecodeSeconds = r.uint32();
                        break;
                    case 12:
                        m.timecodeType = r.uint32();
                        break;
                    case 13:
                        m.timecodeUserbits0 = r.uint32();
                        break;
                    case 14:
                        m.timecodeUserbits1 = r.uint32();
                        break;
                    case 15:
                        m.timecodeUserbits2 = r.uint32();
                        break;
                    case 16:
                        m.timecodeUserbits3 = r.uint32();
                        break;
                    case 17:
                        m.timestamp = r.int64();
                        break;
                    case 18:
                        m.type = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a V4l2QbufFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.V4l2QbufFtraceEvent} V4l2QbufFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            V4l2QbufFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a V4l2QbufFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            V4l2QbufFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.bytesused != null && m.hasOwnProperty("bytesused")) {
                    if (!$util.isInteger(m.bytesused))
                        return "bytesused: integer expected";
                }
                if (m.field != null && m.hasOwnProperty("field")) {
                    if (!$util.isInteger(m.field))
                        return "field: integer expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (!$util.isInteger(m.index))
                        return "index: integer expected";
                }
                if (m.minor != null && m.hasOwnProperty("minor")) {
                    if (!$util.isInteger(m.minor))
                        return "minor: integer expected";
                }
                if (m.sequence != null && m.hasOwnProperty("sequence")) {
                    if (!$util.isInteger(m.sequence))
                        return "sequence: integer expected";
                }
                if (m.timecodeFlags != null && m.hasOwnProperty("timecodeFlags")) {
                    if (!$util.isInteger(m.timecodeFlags))
                        return "timecodeFlags: integer expected";
                }
                if (m.timecodeFrames != null && m.hasOwnProperty("timecodeFrames")) {
                    if (!$util.isInteger(m.timecodeFrames))
                        return "timecodeFrames: integer expected";
                }
                if (m.timecodeHours != null && m.hasOwnProperty("timecodeHours")) {
                    if (!$util.isInteger(m.timecodeHours))
                        return "timecodeHours: integer expected";
                }
                if (m.timecodeMinutes != null && m.hasOwnProperty("timecodeMinutes")) {
                    if (!$util.isInteger(m.timecodeMinutes))
                        return "timecodeMinutes: integer expected";
                }
                if (m.timecodeSeconds != null && m.hasOwnProperty("timecodeSeconds")) {
                    if (!$util.isInteger(m.timecodeSeconds))
                        return "timecodeSeconds: integer expected";
                }
                if (m.timecodeType != null && m.hasOwnProperty("timecodeType")) {
                    if (!$util.isInteger(m.timecodeType))
                        return "timecodeType: integer expected";
                }
                if (m.timecodeUserbits0 != null && m.hasOwnProperty("timecodeUserbits0")) {
                    if (!$util.isInteger(m.timecodeUserbits0))
                        return "timecodeUserbits0: integer expected";
                }
                if (m.timecodeUserbits1 != null && m.hasOwnProperty("timecodeUserbits1")) {
                    if (!$util.isInteger(m.timecodeUserbits1))
                        return "timecodeUserbits1: integer expected";
                }
                if (m.timecodeUserbits2 != null && m.hasOwnProperty("timecodeUserbits2")) {
                    if (!$util.isInteger(m.timecodeUserbits2))
                        return "timecodeUserbits2: integer expected";
                }
                if (m.timecodeUserbits3 != null && m.hasOwnProperty("timecodeUserbits3")) {
                    if (!$util.isInteger(m.timecodeUserbits3))
                        return "timecodeUserbits3: integer expected";
                }
                if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                    if (!$util.isInteger(m.timestamp) && !(m.timestamp && $util.isInteger(m.timestamp.low) && $util.isInteger(m.timestamp.high)))
                        return "timestamp: integer|Long expected";
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    if (!$util.isInteger(m.type))
                        return "type: integer expected";
                }
                return null;
            };

            /**
             * Creates a V4l2QbufFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.V4l2QbufFtraceEvent} V4l2QbufFtraceEvent
             */
            V4l2QbufFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.V4l2QbufFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.V4l2QbufFtraceEvent();
                if (d.bytesused != null) {
                    m.bytesused = d.bytesused >>> 0;
                }
                if (d.field != null) {
                    m.field = d.field >>> 0;
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                if (d.index != null) {
                    m.index = d.index >>> 0;
                }
                if (d.minor != null) {
                    m.minor = d.minor | 0;
                }
                if (d.sequence != null) {
                    m.sequence = d.sequence >>> 0;
                }
                if (d.timecodeFlags != null) {
                    m.timecodeFlags = d.timecodeFlags >>> 0;
                }
                if (d.timecodeFrames != null) {
                    m.timecodeFrames = d.timecodeFrames >>> 0;
                }
                if (d.timecodeHours != null) {
                    m.timecodeHours = d.timecodeHours >>> 0;
                }
                if (d.timecodeMinutes != null) {
                    m.timecodeMinutes = d.timecodeMinutes >>> 0;
                }
                if (d.timecodeSeconds != null) {
                    m.timecodeSeconds = d.timecodeSeconds >>> 0;
                }
                if (d.timecodeType != null) {
                    m.timecodeType = d.timecodeType >>> 0;
                }
                if (d.timecodeUserbits0 != null) {
                    m.timecodeUserbits0 = d.timecodeUserbits0 >>> 0;
                }
                if (d.timecodeUserbits1 != null) {
                    m.timecodeUserbits1 = d.timecodeUserbits1 >>> 0;
                }
                if (d.timecodeUserbits2 != null) {
                    m.timecodeUserbits2 = d.timecodeUserbits2 >>> 0;
                }
                if (d.timecodeUserbits3 != null) {
                    m.timecodeUserbits3 = d.timecodeUserbits3 >>> 0;
                }
                if (d.timestamp != null) {
                    if ($util.Long)
                        (m.timestamp = $util.Long.fromValue(d.timestamp)).unsigned = false;
                    else if (typeof d.timestamp === "string")
                        m.timestamp = parseInt(d.timestamp, 10);
                    else if (typeof d.timestamp === "number")
                        m.timestamp = d.timestamp;
                    else if (typeof d.timestamp === "object")
                        m.timestamp = new $util.LongBits(d.timestamp.low >>> 0, d.timestamp.high >>> 0).toNumber();
                }
                if (d.type != null) {
                    m.type = d.type >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a V4l2QbufFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @static
             * @param {perfetto.protos.V4l2QbufFtraceEvent} m V4l2QbufFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            V4l2QbufFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.bytesused = 0;
                    d.field = 0;
                    d.flags = 0;
                    d.index = 0;
                    d.minor = 0;
                    d.sequence = 0;
                    d.timecodeFlags = 0;
                    d.timecodeFrames = 0;
                    d.timecodeHours = 0;
                    d.timecodeMinutes = 0;
                    d.timecodeSeconds = 0;
                    d.timecodeType = 0;
                    d.timecodeUserbits0 = 0;
                    d.timecodeUserbits1 = 0;
                    d.timecodeUserbits2 = 0;
                    d.timecodeUserbits3 = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.timestamp = o.longs === String ? "0" : 0;
                    d.type = 0;
                }
                if (m.bytesused != null && m.hasOwnProperty("bytesused")) {
                    d.bytesused = m.bytesused;
                }
                if (m.field != null && m.hasOwnProperty("field")) {
                    d.field = m.field;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    d.index = m.index;
                }
                if (m.minor != null && m.hasOwnProperty("minor")) {
                    d.minor = m.minor;
                }
                if (m.sequence != null && m.hasOwnProperty("sequence")) {
                    d.sequence = m.sequence;
                }
                if (m.timecodeFlags != null && m.hasOwnProperty("timecodeFlags")) {
                    d.timecodeFlags = m.timecodeFlags;
                }
                if (m.timecodeFrames != null && m.hasOwnProperty("timecodeFrames")) {
                    d.timecodeFrames = m.timecodeFrames;
                }
                if (m.timecodeHours != null && m.hasOwnProperty("timecodeHours")) {
                    d.timecodeHours = m.timecodeHours;
                }
                if (m.timecodeMinutes != null && m.hasOwnProperty("timecodeMinutes")) {
                    d.timecodeMinutes = m.timecodeMinutes;
                }
                if (m.timecodeSeconds != null && m.hasOwnProperty("timecodeSeconds")) {
                    d.timecodeSeconds = m.timecodeSeconds;
                }
                if (m.timecodeType != null && m.hasOwnProperty("timecodeType")) {
                    d.timecodeType = m.timecodeType;
                }
                if (m.timecodeUserbits0 != null && m.hasOwnProperty("timecodeUserbits0")) {
                    d.timecodeUserbits0 = m.timecodeUserbits0;
                }
                if (m.timecodeUserbits1 != null && m.hasOwnProperty("timecodeUserbits1")) {
                    d.timecodeUserbits1 = m.timecodeUserbits1;
                }
                if (m.timecodeUserbits2 != null && m.hasOwnProperty("timecodeUserbits2")) {
                    d.timecodeUserbits2 = m.timecodeUserbits2;
                }
                if (m.timecodeUserbits3 != null && m.hasOwnProperty("timecodeUserbits3")) {
                    d.timecodeUserbits3 = m.timecodeUserbits3;
                }
                if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                    if (typeof m.timestamp === "number")
                        d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp;
                    else
                        d.timestamp = o.longs === String ? $util.Long.prototype.toString.call(m.timestamp) : o.longs === Number ? new $util.LongBits(m.timestamp.low >>> 0, m.timestamp.high >>> 0).toNumber() : m.timestamp;
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    d.type = m.type;
                }
                return d;
            };

            /**
             * Converts this V4l2QbufFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.V4l2QbufFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            V4l2QbufFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return V4l2QbufFtraceEvent;
        })();

        protos.V4l2DqbufFtraceEvent = (function() {

            /**
             * Properties of a V4l2DqbufFtraceEvent.
             * @memberof perfetto.protos
             * @interface IV4l2DqbufFtraceEvent
             * @property {number|null} [bytesused] V4l2DqbufFtraceEvent bytesused
             * @property {number|null} [field] V4l2DqbufFtraceEvent field
             * @property {number|null} [flags] V4l2DqbufFtraceEvent flags
             * @property {number|null} [index] V4l2DqbufFtraceEvent index
             * @property {number|null} [minor] V4l2DqbufFtraceEvent minor
             * @property {number|null} [sequence] V4l2DqbufFtraceEvent sequence
             * @property {number|null} [timecodeFlags] V4l2DqbufFtraceEvent timecodeFlags
             * @property {number|null} [timecodeFrames] V4l2DqbufFtraceEvent timecodeFrames
             * @property {number|null} [timecodeHours] V4l2DqbufFtraceEvent timecodeHours
             * @property {number|null} [timecodeMinutes] V4l2DqbufFtraceEvent timecodeMinutes
             * @property {number|null} [timecodeSeconds] V4l2DqbufFtraceEvent timecodeSeconds
             * @property {number|null} [timecodeType] V4l2DqbufFtraceEvent timecodeType
             * @property {number|null} [timecodeUserbits0] V4l2DqbufFtraceEvent timecodeUserbits0
             * @property {number|null} [timecodeUserbits1] V4l2DqbufFtraceEvent timecodeUserbits1
             * @property {number|null} [timecodeUserbits2] V4l2DqbufFtraceEvent timecodeUserbits2
             * @property {number|null} [timecodeUserbits3] V4l2DqbufFtraceEvent timecodeUserbits3
             * @property {number|null} [timestamp] V4l2DqbufFtraceEvent timestamp
             * @property {number|null} [type] V4l2DqbufFtraceEvent type
             */

            /**
             * Constructs a new V4l2DqbufFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a V4l2DqbufFtraceEvent.
             * @implements IV4l2DqbufFtraceEvent
             * @constructor
             * @param {perfetto.protos.IV4l2DqbufFtraceEvent=} [p] Properties to set
             */
            function V4l2DqbufFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * V4l2DqbufFtraceEvent bytesused.
             * @member {number} bytesused
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @instance
             */
            V4l2DqbufFtraceEvent.prototype.bytesused = 0;

            /**
             * V4l2DqbufFtraceEvent field.
             * @member {number} field
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @instance
             */
            V4l2DqbufFtraceEvent.prototype.field = 0;

            /**
             * V4l2DqbufFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @instance
             */
            V4l2DqbufFtraceEvent.prototype.flags = 0;

            /**
             * V4l2DqbufFtraceEvent index.
             * @member {number} index
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @instance
             */
            V4l2DqbufFtraceEvent.prototype.index = 0;

            /**
             * V4l2DqbufFtraceEvent minor.
             * @member {number} minor
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @instance
             */
            V4l2DqbufFtraceEvent.prototype.minor = 0;

            /**
             * V4l2DqbufFtraceEvent sequence.
             * @member {number} sequence
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @instance
             */
            V4l2DqbufFtraceEvent.prototype.sequence = 0;

            /**
             * V4l2DqbufFtraceEvent timecodeFlags.
             * @member {number} timecodeFlags
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @instance
             */
            V4l2DqbufFtraceEvent.prototype.timecodeFlags = 0;

            /**
             * V4l2DqbufFtraceEvent timecodeFrames.
             * @member {number} timecodeFrames
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @instance
             */
            V4l2DqbufFtraceEvent.prototype.timecodeFrames = 0;

            /**
             * V4l2DqbufFtraceEvent timecodeHours.
             * @member {number} timecodeHours
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @instance
             */
            V4l2DqbufFtraceEvent.prototype.timecodeHours = 0;

            /**
             * V4l2DqbufFtraceEvent timecodeMinutes.
             * @member {number} timecodeMinutes
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @instance
             */
            V4l2DqbufFtraceEvent.prototype.timecodeMinutes = 0;

            /**
             * V4l2DqbufFtraceEvent timecodeSeconds.
             * @member {number} timecodeSeconds
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @instance
             */
            V4l2DqbufFtraceEvent.prototype.timecodeSeconds = 0;

            /**
             * V4l2DqbufFtraceEvent timecodeType.
             * @member {number} timecodeType
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @instance
             */
            V4l2DqbufFtraceEvent.prototype.timecodeType = 0;

            /**
             * V4l2DqbufFtraceEvent timecodeUserbits0.
             * @member {number} timecodeUserbits0
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @instance
             */
            V4l2DqbufFtraceEvent.prototype.timecodeUserbits0 = 0;

            /**
             * V4l2DqbufFtraceEvent timecodeUserbits1.
             * @member {number} timecodeUserbits1
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @instance
             */
            V4l2DqbufFtraceEvent.prototype.timecodeUserbits1 = 0;

            /**
             * V4l2DqbufFtraceEvent timecodeUserbits2.
             * @member {number} timecodeUserbits2
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @instance
             */
            V4l2DqbufFtraceEvent.prototype.timecodeUserbits2 = 0;

            /**
             * V4l2DqbufFtraceEvent timecodeUserbits3.
             * @member {number} timecodeUserbits3
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @instance
             */
            V4l2DqbufFtraceEvent.prototype.timecodeUserbits3 = 0;

            /**
             * V4l2DqbufFtraceEvent timestamp.
             * @member {number} timestamp
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @instance
             */
            V4l2DqbufFtraceEvent.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * V4l2DqbufFtraceEvent type.
             * @member {number} type
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @instance
             */
            V4l2DqbufFtraceEvent.prototype.type = 0;

            /**
             * Creates a new V4l2DqbufFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @static
             * @param {perfetto.protos.IV4l2DqbufFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.V4l2DqbufFtraceEvent} V4l2DqbufFtraceEvent instance
             */
            V4l2DqbufFtraceEvent.create = function create(properties) {
                return new V4l2DqbufFtraceEvent(properties);
            };

            /**
             * Encodes the specified V4l2DqbufFtraceEvent message. Does not implicitly {@link perfetto.protos.V4l2DqbufFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @static
             * @param {perfetto.protos.IV4l2DqbufFtraceEvent} m V4l2DqbufFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            V4l2DqbufFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.bytesused != null && Object.hasOwnProperty.call(m, "bytesused"))
                    w.uint32(8).uint32(m.bytesused);
                if (m.field != null && Object.hasOwnProperty.call(m, "field"))
                    w.uint32(16).uint32(m.field);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(24).uint32(m.flags);
                if (m.index != null && Object.hasOwnProperty.call(m, "index"))
                    w.uint32(32).uint32(m.index);
                if (m.minor != null && Object.hasOwnProperty.call(m, "minor"))
                    w.uint32(40).int32(m.minor);
                if (m.sequence != null && Object.hasOwnProperty.call(m, "sequence"))
                    w.uint32(48).uint32(m.sequence);
                if (m.timecodeFlags != null && Object.hasOwnProperty.call(m, "timecodeFlags"))
                    w.uint32(56).uint32(m.timecodeFlags);
                if (m.timecodeFrames != null && Object.hasOwnProperty.call(m, "timecodeFrames"))
                    w.uint32(64).uint32(m.timecodeFrames);
                if (m.timecodeHours != null && Object.hasOwnProperty.call(m, "timecodeHours"))
                    w.uint32(72).uint32(m.timecodeHours);
                if (m.timecodeMinutes != null && Object.hasOwnProperty.call(m, "timecodeMinutes"))
                    w.uint32(80).uint32(m.timecodeMinutes);
                if (m.timecodeSeconds != null && Object.hasOwnProperty.call(m, "timecodeSeconds"))
                    w.uint32(88).uint32(m.timecodeSeconds);
                if (m.timecodeType != null && Object.hasOwnProperty.call(m, "timecodeType"))
                    w.uint32(96).uint32(m.timecodeType);
                if (m.timecodeUserbits0 != null && Object.hasOwnProperty.call(m, "timecodeUserbits0"))
                    w.uint32(104).uint32(m.timecodeUserbits0);
                if (m.timecodeUserbits1 != null && Object.hasOwnProperty.call(m, "timecodeUserbits1"))
                    w.uint32(112).uint32(m.timecodeUserbits1);
                if (m.timecodeUserbits2 != null && Object.hasOwnProperty.call(m, "timecodeUserbits2"))
                    w.uint32(120).uint32(m.timecodeUserbits2);
                if (m.timecodeUserbits3 != null && Object.hasOwnProperty.call(m, "timecodeUserbits3"))
                    w.uint32(128).uint32(m.timecodeUserbits3);
                if (m.timestamp != null && Object.hasOwnProperty.call(m, "timestamp"))
                    w.uint32(136).int64(m.timestamp);
                if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                    w.uint32(144).uint32(m.type);
                return w;
            };

            /**
             * Encodes the specified V4l2DqbufFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.V4l2DqbufFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @static
             * @param {perfetto.protos.IV4l2DqbufFtraceEvent} message V4l2DqbufFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            V4l2DqbufFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a V4l2DqbufFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.V4l2DqbufFtraceEvent} V4l2DqbufFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            V4l2DqbufFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.V4l2DqbufFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.bytesused = r.uint32();
                        break;
                    case 2:
                        m.field = r.uint32();
                        break;
                    case 3:
                        m.flags = r.uint32();
                        break;
                    case 4:
                        m.index = r.uint32();
                        break;
                    case 5:
                        m.minor = r.int32();
                        break;
                    case 6:
                        m.sequence = r.uint32();
                        break;
                    case 7:
                        m.timecodeFlags = r.uint32();
                        break;
                    case 8:
                        m.timecodeFrames = r.uint32();
                        break;
                    case 9:
                        m.timecodeHours = r.uint32();
                        break;
                    case 10:
                        m.timecodeMinutes = r.uint32();
                        break;
                    case 11:
                        m.timecodeSeconds = r.uint32();
                        break;
                    case 12:
                        m.timecodeType = r.uint32();
                        break;
                    case 13:
                        m.timecodeUserbits0 = r.uint32();
                        break;
                    case 14:
                        m.timecodeUserbits1 = r.uint32();
                        break;
                    case 15:
                        m.timecodeUserbits2 = r.uint32();
                        break;
                    case 16:
                        m.timecodeUserbits3 = r.uint32();
                        break;
                    case 17:
                        m.timestamp = r.int64();
                        break;
                    case 18:
                        m.type = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a V4l2DqbufFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.V4l2DqbufFtraceEvent} V4l2DqbufFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            V4l2DqbufFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a V4l2DqbufFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            V4l2DqbufFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.bytesused != null && m.hasOwnProperty("bytesused")) {
                    if (!$util.isInteger(m.bytesused))
                        return "bytesused: integer expected";
                }
                if (m.field != null && m.hasOwnProperty("field")) {
                    if (!$util.isInteger(m.field))
                        return "field: integer expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (!$util.isInteger(m.index))
                        return "index: integer expected";
                }
                if (m.minor != null && m.hasOwnProperty("minor")) {
                    if (!$util.isInteger(m.minor))
                        return "minor: integer expected";
                }
                if (m.sequence != null && m.hasOwnProperty("sequence")) {
                    if (!$util.isInteger(m.sequence))
                        return "sequence: integer expected";
                }
                if (m.timecodeFlags != null && m.hasOwnProperty("timecodeFlags")) {
                    if (!$util.isInteger(m.timecodeFlags))
                        return "timecodeFlags: integer expected";
                }
                if (m.timecodeFrames != null && m.hasOwnProperty("timecodeFrames")) {
                    if (!$util.isInteger(m.timecodeFrames))
                        return "timecodeFrames: integer expected";
                }
                if (m.timecodeHours != null && m.hasOwnProperty("timecodeHours")) {
                    if (!$util.isInteger(m.timecodeHours))
                        return "timecodeHours: integer expected";
                }
                if (m.timecodeMinutes != null && m.hasOwnProperty("timecodeMinutes")) {
                    if (!$util.isInteger(m.timecodeMinutes))
                        return "timecodeMinutes: integer expected";
                }
                if (m.timecodeSeconds != null && m.hasOwnProperty("timecodeSeconds")) {
                    if (!$util.isInteger(m.timecodeSeconds))
                        return "timecodeSeconds: integer expected";
                }
                if (m.timecodeType != null && m.hasOwnProperty("timecodeType")) {
                    if (!$util.isInteger(m.timecodeType))
                        return "timecodeType: integer expected";
                }
                if (m.timecodeUserbits0 != null && m.hasOwnProperty("timecodeUserbits0")) {
                    if (!$util.isInteger(m.timecodeUserbits0))
                        return "timecodeUserbits0: integer expected";
                }
                if (m.timecodeUserbits1 != null && m.hasOwnProperty("timecodeUserbits1")) {
                    if (!$util.isInteger(m.timecodeUserbits1))
                        return "timecodeUserbits1: integer expected";
                }
                if (m.timecodeUserbits2 != null && m.hasOwnProperty("timecodeUserbits2")) {
                    if (!$util.isInteger(m.timecodeUserbits2))
                        return "timecodeUserbits2: integer expected";
                }
                if (m.timecodeUserbits3 != null && m.hasOwnProperty("timecodeUserbits3")) {
                    if (!$util.isInteger(m.timecodeUserbits3))
                        return "timecodeUserbits3: integer expected";
                }
                if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                    if (!$util.isInteger(m.timestamp) && !(m.timestamp && $util.isInteger(m.timestamp.low) && $util.isInteger(m.timestamp.high)))
                        return "timestamp: integer|Long expected";
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    if (!$util.isInteger(m.type))
                        return "type: integer expected";
                }
                return null;
            };

            /**
             * Creates a V4l2DqbufFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.V4l2DqbufFtraceEvent} V4l2DqbufFtraceEvent
             */
            V4l2DqbufFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.V4l2DqbufFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.V4l2DqbufFtraceEvent();
                if (d.bytesused != null) {
                    m.bytesused = d.bytesused >>> 0;
                }
                if (d.field != null) {
                    m.field = d.field >>> 0;
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                if (d.index != null) {
                    m.index = d.index >>> 0;
                }
                if (d.minor != null) {
                    m.minor = d.minor | 0;
                }
                if (d.sequence != null) {
                    m.sequence = d.sequence >>> 0;
                }
                if (d.timecodeFlags != null) {
                    m.timecodeFlags = d.timecodeFlags >>> 0;
                }
                if (d.timecodeFrames != null) {
                    m.timecodeFrames = d.timecodeFrames >>> 0;
                }
                if (d.timecodeHours != null) {
                    m.timecodeHours = d.timecodeHours >>> 0;
                }
                if (d.timecodeMinutes != null) {
                    m.timecodeMinutes = d.timecodeMinutes >>> 0;
                }
                if (d.timecodeSeconds != null) {
                    m.timecodeSeconds = d.timecodeSeconds >>> 0;
                }
                if (d.timecodeType != null) {
                    m.timecodeType = d.timecodeType >>> 0;
                }
                if (d.timecodeUserbits0 != null) {
                    m.timecodeUserbits0 = d.timecodeUserbits0 >>> 0;
                }
                if (d.timecodeUserbits1 != null) {
                    m.timecodeUserbits1 = d.timecodeUserbits1 >>> 0;
                }
                if (d.timecodeUserbits2 != null) {
                    m.timecodeUserbits2 = d.timecodeUserbits2 >>> 0;
                }
                if (d.timecodeUserbits3 != null) {
                    m.timecodeUserbits3 = d.timecodeUserbits3 >>> 0;
                }
                if (d.timestamp != null) {
                    if ($util.Long)
                        (m.timestamp = $util.Long.fromValue(d.timestamp)).unsigned = false;
                    else if (typeof d.timestamp === "string")
                        m.timestamp = parseInt(d.timestamp, 10);
                    else if (typeof d.timestamp === "number")
                        m.timestamp = d.timestamp;
                    else if (typeof d.timestamp === "object")
                        m.timestamp = new $util.LongBits(d.timestamp.low >>> 0, d.timestamp.high >>> 0).toNumber();
                }
                if (d.type != null) {
                    m.type = d.type >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a V4l2DqbufFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @static
             * @param {perfetto.protos.V4l2DqbufFtraceEvent} m V4l2DqbufFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            V4l2DqbufFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.bytesused = 0;
                    d.field = 0;
                    d.flags = 0;
                    d.index = 0;
                    d.minor = 0;
                    d.sequence = 0;
                    d.timecodeFlags = 0;
                    d.timecodeFrames = 0;
                    d.timecodeHours = 0;
                    d.timecodeMinutes = 0;
                    d.timecodeSeconds = 0;
                    d.timecodeType = 0;
                    d.timecodeUserbits0 = 0;
                    d.timecodeUserbits1 = 0;
                    d.timecodeUserbits2 = 0;
                    d.timecodeUserbits3 = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.timestamp = o.longs === String ? "0" : 0;
                    d.type = 0;
                }
                if (m.bytesused != null && m.hasOwnProperty("bytesused")) {
                    d.bytesused = m.bytesused;
                }
                if (m.field != null && m.hasOwnProperty("field")) {
                    d.field = m.field;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    d.index = m.index;
                }
                if (m.minor != null && m.hasOwnProperty("minor")) {
                    d.minor = m.minor;
                }
                if (m.sequence != null && m.hasOwnProperty("sequence")) {
                    d.sequence = m.sequence;
                }
                if (m.timecodeFlags != null && m.hasOwnProperty("timecodeFlags")) {
                    d.timecodeFlags = m.timecodeFlags;
                }
                if (m.timecodeFrames != null && m.hasOwnProperty("timecodeFrames")) {
                    d.timecodeFrames = m.timecodeFrames;
                }
                if (m.timecodeHours != null && m.hasOwnProperty("timecodeHours")) {
                    d.timecodeHours = m.timecodeHours;
                }
                if (m.timecodeMinutes != null && m.hasOwnProperty("timecodeMinutes")) {
                    d.timecodeMinutes = m.timecodeMinutes;
                }
                if (m.timecodeSeconds != null && m.hasOwnProperty("timecodeSeconds")) {
                    d.timecodeSeconds = m.timecodeSeconds;
                }
                if (m.timecodeType != null && m.hasOwnProperty("timecodeType")) {
                    d.timecodeType = m.timecodeType;
                }
                if (m.timecodeUserbits0 != null && m.hasOwnProperty("timecodeUserbits0")) {
                    d.timecodeUserbits0 = m.timecodeUserbits0;
                }
                if (m.timecodeUserbits1 != null && m.hasOwnProperty("timecodeUserbits1")) {
                    d.timecodeUserbits1 = m.timecodeUserbits1;
                }
                if (m.timecodeUserbits2 != null && m.hasOwnProperty("timecodeUserbits2")) {
                    d.timecodeUserbits2 = m.timecodeUserbits2;
                }
                if (m.timecodeUserbits3 != null && m.hasOwnProperty("timecodeUserbits3")) {
                    d.timecodeUserbits3 = m.timecodeUserbits3;
                }
                if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                    if (typeof m.timestamp === "number")
                        d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp;
                    else
                        d.timestamp = o.longs === String ? $util.Long.prototype.toString.call(m.timestamp) : o.longs === Number ? new $util.LongBits(m.timestamp.low >>> 0, m.timestamp.high >>> 0).toNumber() : m.timestamp;
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    d.type = m.type;
                }
                return d;
            };

            /**
             * Converts this V4l2DqbufFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.V4l2DqbufFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            V4l2DqbufFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return V4l2DqbufFtraceEvent;
        })();

        protos.Vb2V4l2BufQueueFtraceEvent = (function() {

            /**
             * Properties of a Vb2V4l2BufQueueFtraceEvent.
             * @memberof perfetto.protos
             * @interface IVb2V4l2BufQueueFtraceEvent
             * @property {number|null} [field] Vb2V4l2BufQueueFtraceEvent field
             * @property {number|null} [flags] Vb2V4l2BufQueueFtraceEvent flags
             * @property {number|null} [minor] Vb2V4l2BufQueueFtraceEvent minor
             * @property {number|null} [sequence] Vb2V4l2BufQueueFtraceEvent sequence
             * @property {number|null} [timecodeFlags] Vb2V4l2BufQueueFtraceEvent timecodeFlags
             * @property {number|null} [timecodeFrames] Vb2V4l2BufQueueFtraceEvent timecodeFrames
             * @property {number|null} [timecodeHours] Vb2V4l2BufQueueFtraceEvent timecodeHours
             * @property {number|null} [timecodeMinutes] Vb2V4l2BufQueueFtraceEvent timecodeMinutes
             * @property {number|null} [timecodeSeconds] Vb2V4l2BufQueueFtraceEvent timecodeSeconds
             * @property {number|null} [timecodeType] Vb2V4l2BufQueueFtraceEvent timecodeType
             * @property {number|null} [timecodeUserbits0] Vb2V4l2BufQueueFtraceEvent timecodeUserbits0
             * @property {number|null} [timecodeUserbits1] Vb2V4l2BufQueueFtraceEvent timecodeUserbits1
             * @property {number|null} [timecodeUserbits2] Vb2V4l2BufQueueFtraceEvent timecodeUserbits2
             * @property {number|null} [timecodeUserbits3] Vb2V4l2BufQueueFtraceEvent timecodeUserbits3
             * @property {number|null} [timestamp] Vb2V4l2BufQueueFtraceEvent timestamp
             */

            /**
             * Constructs a new Vb2V4l2BufQueueFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a Vb2V4l2BufQueueFtraceEvent.
             * @implements IVb2V4l2BufQueueFtraceEvent
             * @constructor
             * @param {perfetto.protos.IVb2V4l2BufQueueFtraceEvent=} [p] Properties to set
             */
            function Vb2V4l2BufQueueFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Vb2V4l2BufQueueFtraceEvent field.
             * @member {number} field
             * @memberof perfetto.protos.Vb2V4l2BufQueueFtraceEvent
             * @instance
             */
            Vb2V4l2BufQueueFtraceEvent.prototype.field = 0;

            /**
             * Vb2V4l2BufQueueFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.Vb2V4l2BufQueueFtraceEvent
             * @instance
             */
            Vb2V4l2BufQueueFtraceEvent.prototype.flags = 0;

            /**
             * Vb2V4l2BufQueueFtraceEvent minor.
             * @member {number} minor
             * @memberof perfetto.protos.Vb2V4l2BufQueueFtraceEvent
             * @instance
             */
            Vb2V4l2BufQueueFtraceEvent.prototype.minor = 0;

            /**
             * Vb2V4l2BufQueueFtraceEvent sequence.
             * @member {number} sequence
             * @memberof perfetto.protos.Vb2V4l2BufQueueFtraceEvent
             * @instance
             */
            Vb2V4l2BufQueueFtraceEvent.prototype.sequence = 0;

            /**
             * Vb2V4l2BufQueueFtraceEvent timecodeFlags.
             * @member {number} timecodeFlags
             * @memberof perfetto.protos.Vb2V4l2BufQueueFtraceEvent
             * @instance
             */
            Vb2V4l2BufQueueFtraceEvent.prototype.timecodeFlags = 0;

            /**
             * Vb2V4l2BufQueueFtraceEvent timecodeFrames.
             * @member {number} timecodeFrames
             * @memberof perfetto.protos.Vb2V4l2BufQueueFtraceEvent
             * @instance
             */
            Vb2V4l2BufQueueFtraceEvent.prototype.timecodeFrames = 0;

            /**
             * Vb2V4l2BufQueueFtraceEvent timecodeHours.
             * @member {number} timecodeHours
             * @memberof perfetto.protos.Vb2V4l2BufQueueFtraceEvent
             * @instance
             */
            Vb2V4l2BufQueueFtraceEvent.prototype.timecodeHours = 0;

            /**
             * Vb2V4l2BufQueueFtraceEvent timecodeMinutes.
             * @member {number} timecodeMinutes
             * @memberof perfetto.protos.Vb2V4l2BufQueueFtraceEvent
             * @instance
             */
            Vb2V4l2BufQueueFtraceEvent.prototype.timecodeMinutes = 0;

            /**
             * Vb2V4l2BufQueueFtraceEvent timecodeSeconds.
             * @member {number} timecodeSeconds
             * @memberof perfetto.protos.Vb2V4l2BufQueueFtraceEvent
             * @instance
             */
            Vb2V4l2BufQueueFtraceEvent.prototype.timecodeSeconds = 0;

            /**
             * Vb2V4l2BufQueueFtraceEvent timecodeType.
             * @member {number} timecodeType
             * @memberof perfetto.protos.Vb2V4l2BufQueueFtraceEvent
             * @instance
             */
            Vb2V4l2BufQueueFtraceEvent.prototype.timecodeType = 0;

            /**
             * Vb2V4l2BufQueueFtraceEvent timecodeUserbits0.
             * @member {number} timecodeUserbits0
             * @memberof perfetto.protos.Vb2V4l2BufQueueFtraceEvent
             * @instance
             */
            Vb2V4l2BufQueueFtraceEvent.prototype.timecodeUserbits0 = 0;

            /**
             * Vb2V4l2BufQueueFtraceEvent timecodeUserbits1.
             * @member {number} timecodeUserbits1
             * @memberof perfetto.protos.Vb2V4l2BufQueueFtraceEvent
             * @instance
             */
            Vb2V4l2BufQueueFtraceEvent.prototype.timecodeUserbits1 = 0;

            /**
             * Vb2V4l2BufQueueFtraceEvent timecodeUserbits2.
             * @member {number} timecodeUserbits2
             * @memberof perfetto.protos.Vb2V4l2BufQueueFtraceEvent
             * @instance
             */
            Vb2V4l2BufQueueFtraceEvent.prototype.timecodeUserbits2 = 0;

            /**
             * Vb2V4l2BufQueueFtraceEvent timecodeUserbits3.
             * @member {number} timecodeUserbits3
             * @memberof perfetto.protos.Vb2V4l2BufQueueFtraceEvent
             * @instance
             */
            Vb2V4l2BufQueueFtraceEvent.prototype.timecodeUserbits3 = 0;

            /**
             * Vb2V4l2BufQueueFtraceEvent timestamp.
             * @member {number} timestamp
             * @memberof perfetto.protos.Vb2V4l2BufQueueFtraceEvent
             * @instance
             */
            Vb2V4l2BufQueueFtraceEvent.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new Vb2V4l2BufQueueFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Vb2V4l2BufQueueFtraceEvent
             * @static
             * @param {perfetto.protos.IVb2V4l2BufQueueFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Vb2V4l2BufQueueFtraceEvent} Vb2V4l2BufQueueFtraceEvent instance
             */
            Vb2V4l2BufQueueFtraceEvent.create = function create(properties) {
                return new Vb2V4l2BufQueueFtraceEvent(properties);
            };

            /**
             * Encodes the specified Vb2V4l2BufQueueFtraceEvent message. Does not implicitly {@link perfetto.protos.Vb2V4l2BufQueueFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Vb2V4l2BufQueueFtraceEvent
             * @static
             * @param {perfetto.protos.IVb2V4l2BufQueueFtraceEvent} m Vb2V4l2BufQueueFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Vb2V4l2BufQueueFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.field != null && Object.hasOwnProperty.call(m, "field"))
                    w.uint32(8).uint32(m.field);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(16).uint32(m.flags);
                if (m.minor != null && Object.hasOwnProperty.call(m, "minor"))
                    w.uint32(24).int32(m.minor);
                if (m.sequence != null && Object.hasOwnProperty.call(m, "sequence"))
                    w.uint32(32).uint32(m.sequence);
                if (m.timecodeFlags != null && Object.hasOwnProperty.call(m, "timecodeFlags"))
                    w.uint32(40).uint32(m.timecodeFlags);
                if (m.timecodeFrames != null && Object.hasOwnProperty.call(m, "timecodeFrames"))
                    w.uint32(48).uint32(m.timecodeFrames);
                if (m.timecodeHours != null && Object.hasOwnProperty.call(m, "timecodeHours"))
                    w.uint32(56).uint32(m.timecodeHours);
                if (m.timecodeMinutes != null && Object.hasOwnProperty.call(m, "timecodeMinutes"))
                    w.uint32(64).uint32(m.timecodeMinutes);
                if (m.timecodeSeconds != null && Object.hasOwnProperty.call(m, "timecodeSeconds"))
                    w.uint32(72).uint32(m.timecodeSeconds);
                if (m.timecodeType != null && Object.hasOwnProperty.call(m, "timecodeType"))
                    w.uint32(80).uint32(m.timecodeType);
                if (m.timecodeUserbits0 != null && Object.hasOwnProperty.call(m, "timecodeUserbits0"))
                    w.uint32(88).uint32(m.timecodeUserbits0);
                if (m.timecodeUserbits1 != null && Object.hasOwnProperty.call(m, "timecodeUserbits1"))
                    w.uint32(96).uint32(m.timecodeUserbits1);
                if (m.timecodeUserbits2 != null && Object.hasOwnProperty.call(m, "timecodeUserbits2"))
                    w.uint32(104).uint32(m.timecodeUserbits2);
                if (m.timecodeUserbits3 != null && Object.hasOwnProperty.call(m, "timecodeUserbits3"))
                    w.uint32(112).uint32(m.timecodeUserbits3);
                if (m.timestamp != null && Object.hasOwnProperty.call(m, "timestamp"))
                    w.uint32(120).int64(m.timestamp);
                return w;
            };

            /**
             * Encodes the specified Vb2V4l2BufQueueFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Vb2V4l2BufQueueFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Vb2V4l2BufQueueFtraceEvent
             * @static
             * @param {perfetto.protos.IVb2V4l2BufQueueFtraceEvent} message Vb2V4l2BufQueueFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Vb2V4l2BufQueueFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a Vb2V4l2BufQueueFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Vb2V4l2BufQueueFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Vb2V4l2BufQueueFtraceEvent} Vb2V4l2BufQueueFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Vb2V4l2BufQueueFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Vb2V4l2BufQueueFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.field = r.uint32();
                        break;
                    case 2:
                        m.flags = r.uint32();
                        break;
                    case 3:
                        m.minor = r.int32();
                        break;
                    case 4:
                        m.sequence = r.uint32();
                        break;
                    case 5:
                        m.timecodeFlags = r.uint32();
                        break;
                    case 6:
                        m.timecodeFrames = r.uint32();
                        break;
                    case 7:
                        m.timecodeHours = r.uint32();
                        break;
                    case 8:
                        m.timecodeMinutes = r.uint32();
                        break;
                    case 9:
                        m.timecodeSeconds = r.uint32();
                        break;
                    case 10:
                        m.timecodeType = r.uint32();
                        break;
                    case 11:
                        m.timecodeUserbits0 = r.uint32();
                        break;
                    case 12:
                        m.timecodeUserbits1 = r.uint32();
                        break;
                    case 13:
                        m.timecodeUserbits2 = r.uint32();
                        break;
                    case 14:
                        m.timecodeUserbits3 = r.uint32();
                        break;
                    case 15:
                        m.timestamp = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a Vb2V4l2BufQueueFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Vb2V4l2BufQueueFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Vb2V4l2BufQueueFtraceEvent} Vb2V4l2BufQueueFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Vb2V4l2BufQueueFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a Vb2V4l2BufQueueFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Vb2V4l2BufQueueFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Vb2V4l2BufQueueFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.field != null && m.hasOwnProperty("field")) {
                    if (!$util.isInteger(m.field))
                        return "field: integer expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.minor != null && m.hasOwnProperty("minor")) {
                    if (!$util.isInteger(m.minor))
                        return "minor: integer expected";
                }
                if (m.sequence != null && m.hasOwnProperty("sequence")) {
                    if (!$util.isInteger(m.sequence))
                        return "sequence: integer expected";
                }
                if (m.timecodeFlags != null && m.hasOwnProperty("timecodeFlags")) {
                    if (!$util.isInteger(m.timecodeFlags))
                        return "timecodeFlags: integer expected";
                }
                if (m.timecodeFrames != null && m.hasOwnProperty("timecodeFrames")) {
                    if (!$util.isInteger(m.timecodeFrames))
                        return "timecodeFrames: integer expected";
                }
                if (m.timecodeHours != null && m.hasOwnProperty("timecodeHours")) {
                    if (!$util.isInteger(m.timecodeHours))
                        return "timecodeHours: integer expected";
                }
                if (m.timecodeMinutes != null && m.hasOwnProperty("timecodeMinutes")) {
                    if (!$util.isInteger(m.timecodeMinutes))
                        return "timecodeMinutes: integer expected";
                }
                if (m.timecodeSeconds != null && m.hasOwnProperty("timecodeSeconds")) {
                    if (!$util.isInteger(m.timecodeSeconds))
                        return "timecodeSeconds: integer expected";
                }
                if (m.timecodeType != null && m.hasOwnProperty("timecodeType")) {
                    if (!$util.isInteger(m.timecodeType))
                        return "timecodeType: integer expected";
                }
                if (m.timecodeUserbits0 != null && m.hasOwnProperty("timecodeUserbits0")) {
                    if (!$util.isInteger(m.timecodeUserbits0))
                        return "timecodeUserbits0: integer expected";
                }
                if (m.timecodeUserbits1 != null && m.hasOwnProperty("timecodeUserbits1")) {
                    if (!$util.isInteger(m.timecodeUserbits1))
                        return "timecodeUserbits1: integer expected";
                }
                if (m.timecodeUserbits2 != null && m.hasOwnProperty("timecodeUserbits2")) {
                    if (!$util.isInteger(m.timecodeUserbits2))
                        return "timecodeUserbits2: integer expected";
                }
                if (m.timecodeUserbits3 != null && m.hasOwnProperty("timecodeUserbits3")) {
                    if (!$util.isInteger(m.timecodeUserbits3))
                        return "timecodeUserbits3: integer expected";
                }
                if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                    if (!$util.isInteger(m.timestamp) && !(m.timestamp && $util.isInteger(m.timestamp.low) && $util.isInteger(m.timestamp.high)))
                        return "timestamp: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a Vb2V4l2BufQueueFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Vb2V4l2BufQueueFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Vb2V4l2BufQueueFtraceEvent} Vb2V4l2BufQueueFtraceEvent
             */
            Vb2V4l2BufQueueFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Vb2V4l2BufQueueFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Vb2V4l2BufQueueFtraceEvent();
                if (d.field != null) {
                    m.field = d.field >>> 0;
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                if (d.minor != null) {
                    m.minor = d.minor | 0;
                }
                if (d.sequence != null) {
                    m.sequence = d.sequence >>> 0;
                }
                if (d.timecodeFlags != null) {
                    m.timecodeFlags = d.timecodeFlags >>> 0;
                }
                if (d.timecodeFrames != null) {
                    m.timecodeFrames = d.timecodeFrames >>> 0;
                }
                if (d.timecodeHours != null) {
                    m.timecodeHours = d.timecodeHours >>> 0;
                }
                if (d.timecodeMinutes != null) {
                    m.timecodeMinutes = d.timecodeMinutes >>> 0;
                }
                if (d.timecodeSeconds != null) {
                    m.timecodeSeconds = d.timecodeSeconds >>> 0;
                }
                if (d.timecodeType != null) {
                    m.timecodeType = d.timecodeType >>> 0;
                }
                if (d.timecodeUserbits0 != null) {
                    m.timecodeUserbits0 = d.timecodeUserbits0 >>> 0;
                }
                if (d.timecodeUserbits1 != null) {
                    m.timecodeUserbits1 = d.timecodeUserbits1 >>> 0;
                }
                if (d.timecodeUserbits2 != null) {
                    m.timecodeUserbits2 = d.timecodeUserbits2 >>> 0;
                }
                if (d.timecodeUserbits3 != null) {
                    m.timecodeUserbits3 = d.timecodeUserbits3 >>> 0;
                }
                if (d.timestamp != null) {
                    if ($util.Long)
                        (m.timestamp = $util.Long.fromValue(d.timestamp)).unsigned = false;
                    else if (typeof d.timestamp === "string")
                        m.timestamp = parseInt(d.timestamp, 10);
                    else if (typeof d.timestamp === "number")
                        m.timestamp = d.timestamp;
                    else if (typeof d.timestamp === "object")
                        m.timestamp = new $util.LongBits(d.timestamp.low >>> 0, d.timestamp.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from a Vb2V4l2BufQueueFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Vb2V4l2BufQueueFtraceEvent
             * @static
             * @param {perfetto.protos.Vb2V4l2BufQueueFtraceEvent} m Vb2V4l2BufQueueFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Vb2V4l2BufQueueFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.field = 0;
                    d.flags = 0;
                    d.minor = 0;
                    d.sequence = 0;
                    d.timecodeFlags = 0;
                    d.timecodeFrames = 0;
                    d.timecodeHours = 0;
                    d.timecodeMinutes = 0;
                    d.timecodeSeconds = 0;
                    d.timecodeType = 0;
                    d.timecodeUserbits0 = 0;
                    d.timecodeUserbits1 = 0;
                    d.timecodeUserbits2 = 0;
                    d.timecodeUserbits3 = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.timestamp = o.longs === String ? "0" : 0;
                }
                if (m.field != null && m.hasOwnProperty("field")) {
                    d.field = m.field;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.minor != null && m.hasOwnProperty("minor")) {
                    d.minor = m.minor;
                }
                if (m.sequence != null && m.hasOwnProperty("sequence")) {
                    d.sequence = m.sequence;
                }
                if (m.timecodeFlags != null && m.hasOwnProperty("timecodeFlags")) {
                    d.timecodeFlags = m.timecodeFlags;
                }
                if (m.timecodeFrames != null && m.hasOwnProperty("timecodeFrames")) {
                    d.timecodeFrames = m.timecodeFrames;
                }
                if (m.timecodeHours != null && m.hasOwnProperty("timecodeHours")) {
                    d.timecodeHours = m.timecodeHours;
                }
                if (m.timecodeMinutes != null && m.hasOwnProperty("timecodeMinutes")) {
                    d.timecodeMinutes = m.timecodeMinutes;
                }
                if (m.timecodeSeconds != null && m.hasOwnProperty("timecodeSeconds")) {
                    d.timecodeSeconds = m.timecodeSeconds;
                }
                if (m.timecodeType != null && m.hasOwnProperty("timecodeType")) {
                    d.timecodeType = m.timecodeType;
                }
                if (m.timecodeUserbits0 != null && m.hasOwnProperty("timecodeUserbits0")) {
                    d.timecodeUserbits0 = m.timecodeUserbits0;
                }
                if (m.timecodeUserbits1 != null && m.hasOwnProperty("timecodeUserbits1")) {
                    d.timecodeUserbits1 = m.timecodeUserbits1;
                }
                if (m.timecodeUserbits2 != null && m.hasOwnProperty("timecodeUserbits2")) {
                    d.timecodeUserbits2 = m.timecodeUserbits2;
                }
                if (m.timecodeUserbits3 != null && m.hasOwnProperty("timecodeUserbits3")) {
                    d.timecodeUserbits3 = m.timecodeUserbits3;
                }
                if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                    if (typeof m.timestamp === "number")
                        d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp;
                    else
                        d.timestamp = o.longs === String ? $util.Long.prototype.toString.call(m.timestamp) : o.longs === Number ? new $util.LongBits(m.timestamp.low >>> 0, m.timestamp.high >>> 0).toNumber() : m.timestamp;
                }
                return d;
            };

            /**
             * Converts this Vb2V4l2BufQueueFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Vb2V4l2BufQueueFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Vb2V4l2BufQueueFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Vb2V4l2BufQueueFtraceEvent;
        })();

        protos.Vb2V4l2BufDoneFtraceEvent = (function() {

            /**
             * Properties of a Vb2V4l2BufDoneFtraceEvent.
             * @memberof perfetto.protos
             * @interface IVb2V4l2BufDoneFtraceEvent
             * @property {number|null} [field] Vb2V4l2BufDoneFtraceEvent field
             * @property {number|null} [flags] Vb2V4l2BufDoneFtraceEvent flags
             * @property {number|null} [minor] Vb2V4l2BufDoneFtraceEvent minor
             * @property {number|null} [sequence] Vb2V4l2BufDoneFtraceEvent sequence
             * @property {number|null} [timecodeFlags] Vb2V4l2BufDoneFtraceEvent timecodeFlags
             * @property {number|null} [timecodeFrames] Vb2V4l2BufDoneFtraceEvent timecodeFrames
             * @property {number|null} [timecodeHours] Vb2V4l2BufDoneFtraceEvent timecodeHours
             * @property {number|null} [timecodeMinutes] Vb2V4l2BufDoneFtraceEvent timecodeMinutes
             * @property {number|null} [timecodeSeconds] Vb2V4l2BufDoneFtraceEvent timecodeSeconds
             * @property {number|null} [timecodeType] Vb2V4l2BufDoneFtraceEvent timecodeType
             * @property {number|null} [timecodeUserbits0] Vb2V4l2BufDoneFtraceEvent timecodeUserbits0
             * @property {number|null} [timecodeUserbits1] Vb2V4l2BufDoneFtraceEvent timecodeUserbits1
             * @property {number|null} [timecodeUserbits2] Vb2V4l2BufDoneFtraceEvent timecodeUserbits2
             * @property {number|null} [timecodeUserbits3] Vb2V4l2BufDoneFtraceEvent timecodeUserbits3
             * @property {number|null} [timestamp] Vb2V4l2BufDoneFtraceEvent timestamp
             */

            /**
             * Constructs a new Vb2V4l2BufDoneFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a Vb2V4l2BufDoneFtraceEvent.
             * @implements IVb2V4l2BufDoneFtraceEvent
             * @constructor
             * @param {perfetto.protos.IVb2V4l2BufDoneFtraceEvent=} [p] Properties to set
             */
            function Vb2V4l2BufDoneFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Vb2V4l2BufDoneFtraceEvent field.
             * @member {number} field
             * @memberof perfetto.protos.Vb2V4l2BufDoneFtraceEvent
             * @instance
             */
            Vb2V4l2BufDoneFtraceEvent.prototype.field = 0;

            /**
             * Vb2V4l2BufDoneFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.Vb2V4l2BufDoneFtraceEvent
             * @instance
             */
            Vb2V4l2BufDoneFtraceEvent.prototype.flags = 0;

            /**
             * Vb2V4l2BufDoneFtraceEvent minor.
             * @member {number} minor
             * @memberof perfetto.protos.Vb2V4l2BufDoneFtraceEvent
             * @instance
             */
            Vb2V4l2BufDoneFtraceEvent.prototype.minor = 0;

            /**
             * Vb2V4l2BufDoneFtraceEvent sequence.
             * @member {number} sequence
             * @memberof perfetto.protos.Vb2V4l2BufDoneFtraceEvent
             * @instance
             */
            Vb2V4l2BufDoneFtraceEvent.prototype.sequence = 0;

            /**
             * Vb2V4l2BufDoneFtraceEvent timecodeFlags.
             * @member {number} timecodeFlags
             * @memberof perfetto.protos.Vb2V4l2BufDoneFtraceEvent
             * @instance
             */
            Vb2V4l2BufDoneFtraceEvent.prototype.timecodeFlags = 0;

            /**
             * Vb2V4l2BufDoneFtraceEvent timecodeFrames.
             * @member {number} timecodeFrames
             * @memberof perfetto.protos.Vb2V4l2BufDoneFtraceEvent
             * @instance
             */
            Vb2V4l2BufDoneFtraceEvent.prototype.timecodeFrames = 0;

            /**
             * Vb2V4l2BufDoneFtraceEvent timecodeHours.
             * @member {number} timecodeHours
             * @memberof perfetto.protos.Vb2V4l2BufDoneFtraceEvent
             * @instance
             */
            Vb2V4l2BufDoneFtraceEvent.prototype.timecodeHours = 0;

            /**
             * Vb2V4l2BufDoneFtraceEvent timecodeMinutes.
             * @member {number} timecodeMinutes
             * @memberof perfetto.protos.Vb2V4l2BufDoneFtraceEvent
             * @instance
             */
            Vb2V4l2BufDoneFtraceEvent.prototype.timecodeMinutes = 0;

            /**
             * Vb2V4l2BufDoneFtraceEvent timecodeSeconds.
             * @member {number} timecodeSeconds
             * @memberof perfetto.protos.Vb2V4l2BufDoneFtraceEvent
             * @instance
             */
            Vb2V4l2BufDoneFtraceEvent.prototype.timecodeSeconds = 0;

            /**
             * Vb2V4l2BufDoneFtraceEvent timecodeType.
             * @member {number} timecodeType
             * @memberof perfetto.protos.Vb2V4l2BufDoneFtraceEvent
             * @instance
             */
            Vb2V4l2BufDoneFtraceEvent.prototype.timecodeType = 0;

            /**
             * Vb2V4l2BufDoneFtraceEvent timecodeUserbits0.
             * @member {number} timecodeUserbits0
             * @memberof perfetto.protos.Vb2V4l2BufDoneFtraceEvent
             * @instance
             */
            Vb2V4l2BufDoneFtraceEvent.prototype.timecodeUserbits0 = 0;

            /**
             * Vb2V4l2BufDoneFtraceEvent timecodeUserbits1.
             * @member {number} timecodeUserbits1
             * @memberof perfetto.protos.Vb2V4l2BufDoneFtraceEvent
             * @instance
             */
            Vb2V4l2BufDoneFtraceEvent.prototype.timecodeUserbits1 = 0;

            /**
             * Vb2V4l2BufDoneFtraceEvent timecodeUserbits2.
             * @member {number} timecodeUserbits2
             * @memberof perfetto.protos.Vb2V4l2BufDoneFtraceEvent
             * @instance
             */
            Vb2V4l2BufDoneFtraceEvent.prototype.timecodeUserbits2 = 0;

            /**
             * Vb2V4l2BufDoneFtraceEvent timecodeUserbits3.
             * @member {number} timecodeUserbits3
             * @memberof perfetto.protos.Vb2V4l2BufDoneFtraceEvent
             * @instance
             */
            Vb2V4l2BufDoneFtraceEvent.prototype.timecodeUserbits3 = 0;

            /**
             * Vb2V4l2BufDoneFtraceEvent timestamp.
             * @member {number} timestamp
             * @memberof perfetto.protos.Vb2V4l2BufDoneFtraceEvent
             * @instance
             */
            Vb2V4l2BufDoneFtraceEvent.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new Vb2V4l2BufDoneFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Vb2V4l2BufDoneFtraceEvent
             * @static
             * @param {perfetto.protos.IVb2V4l2BufDoneFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Vb2V4l2BufDoneFtraceEvent} Vb2V4l2BufDoneFtraceEvent instance
             */
            Vb2V4l2BufDoneFtraceEvent.create = function create(properties) {
                return new Vb2V4l2BufDoneFtraceEvent(properties);
            };

            /**
             * Encodes the specified Vb2V4l2BufDoneFtraceEvent message. Does not implicitly {@link perfetto.protos.Vb2V4l2BufDoneFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Vb2V4l2BufDoneFtraceEvent
             * @static
             * @param {perfetto.protos.IVb2V4l2BufDoneFtraceEvent} m Vb2V4l2BufDoneFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Vb2V4l2BufDoneFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.field != null && Object.hasOwnProperty.call(m, "field"))
                    w.uint32(8).uint32(m.field);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(16).uint32(m.flags);
                if (m.minor != null && Object.hasOwnProperty.call(m, "minor"))
                    w.uint32(24).int32(m.minor);
                if (m.sequence != null && Object.hasOwnProperty.call(m, "sequence"))
                    w.uint32(32).uint32(m.sequence);
                if (m.timecodeFlags != null && Object.hasOwnProperty.call(m, "timecodeFlags"))
                    w.uint32(40).uint32(m.timecodeFlags);
                if (m.timecodeFrames != null && Object.hasOwnProperty.call(m, "timecodeFrames"))
                    w.uint32(48).uint32(m.timecodeFrames);
                if (m.timecodeHours != null && Object.hasOwnProperty.call(m, "timecodeHours"))
                    w.uint32(56).uint32(m.timecodeHours);
                if (m.timecodeMinutes != null && Object.hasOwnProperty.call(m, "timecodeMinutes"))
                    w.uint32(64).uint32(m.timecodeMinutes);
                if (m.timecodeSeconds != null && Object.hasOwnProperty.call(m, "timecodeSeconds"))
                    w.uint32(72).uint32(m.timecodeSeconds);
                if (m.timecodeType != null && Object.hasOwnProperty.call(m, "timecodeType"))
                    w.uint32(80).uint32(m.timecodeType);
                if (m.timecodeUserbits0 != null && Object.hasOwnProperty.call(m, "timecodeUserbits0"))
                    w.uint32(88).uint32(m.timecodeUserbits0);
                if (m.timecodeUserbits1 != null && Object.hasOwnProperty.call(m, "timecodeUserbits1"))
                    w.uint32(96).uint32(m.timecodeUserbits1);
                if (m.timecodeUserbits2 != null && Object.hasOwnProperty.call(m, "timecodeUserbits2"))
                    w.uint32(104).uint32(m.timecodeUserbits2);
                if (m.timecodeUserbits3 != null && Object.hasOwnProperty.call(m, "timecodeUserbits3"))
                    w.uint32(112).uint32(m.timecodeUserbits3);
                if (m.timestamp != null && Object.hasOwnProperty.call(m, "timestamp"))
                    w.uint32(120).int64(m.timestamp);
                return w;
            };

            /**
             * Encodes the specified Vb2V4l2BufDoneFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Vb2V4l2BufDoneFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Vb2V4l2BufDoneFtraceEvent
             * @static
             * @param {perfetto.protos.IVb2V4l2BufDoneFtraceEvent} message Vb2V4l2BufDoneFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Vb2V4l2BufDoneFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a Vb2V4l2BufDoneFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Vb2V4l2BufDoneFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Vb2V4l2BufDoneFtraceEvent} Vb2V4l2BufDoneFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Vb2V4l2BufDoneFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Vb2V4l2BufDoneFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.field = r.uint32();
                        break;
                    case 2:
                        m.flags = r.uint32();
                        break;
                    case 3:
                        m.minor = r.int32();
                        break;
                    case 4:
                        m.sequence = r.uint32();
                        break;
                    case 5:
                        m.timecodeFlags = r.uint32();
                        break;
                    case 6:
                        m.timecodeFrames = r.uint32();
                        break;
                    case 7:
                        m.timecodeHours = r.uint32();
                        break;
                    case 8:
                        m.timecodeMinutes = r.uint32();
                        break;
                    case 9:
                        m.timecodeSeconds = r.uint32();
                        break;
                    case 10:
                        m.timecodeType = r.uint32();
                        break;
                    case 11:
                        m.timecodeUserbits0 = r.uint32();
                        break;
                    case 12:
                        m.timecodeUserbits1 = r.uint32();
                        break;
                    case 13:
                        m.timecodeUserbits2 = r.uint32();
                        break;
                    case 14:
                        m.timecodeUserbits3 = r.uint32();
                        break;
                    case 15:
                        m.timestamp = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a Vb2V4l2BufDoneFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Vb2V4l2BufDoneFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Vb2V4l2BufDoneFtraceEvent} Vb2V4l2BufDoneFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Vb2V4l2BufDoneFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a Vb2V4l2BufDoneFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Vb2V4l2BufDoneFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Vb2V4l2BufDoneFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.field != null && m.hasOwnProperty("field")) {
                    if (!$util.isInteger(m.field))
                        return "field: integer expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.minor != null && m.hasOwnProperty("minor")) {
                    if (!$util.isInteger(m.minor))
                        return "minor: integer expected";
                }
                if (m.sequence != null && m.hasOwnProperty("sequence")) {
                    if (!$util.isInteger(m.sequence))
                        return "sequence: integer expected";
                }
                if (m.timecodeFlags != null && m.hasOwnProperty("timecodeFlags")) {
                    if (!$util.isInteger(m.timecodeFlags))
                        return "timecodeFlags: integer expected";
                }
                if (m.timecodeFrames != null && m.hasOwnProperty("timecodeFrames")) {
                    if (!$util.isInteger(m.timecodeFrames))
                        return "timecodeFrames: integer expected";
                }
                if (m.timecodeHours != null && m.hasOwnProperty("timecodeHours")) {
                    if (!$util.isInteger(m.timecodeHours))
                        return "timecodeHours: integer expected";
                }
                if (m.timecodeMinutes != null && m.hasOwnProperty("timecodeMinutes")) {
                    if (!$util.isInteger(m.timecodeMinutes))
                        return "timecodeMinutes: integer expected";
                }
                if (m.timecodeSeconds != null && m.hasOwnProperty("timecodeSeconds")) {
                    if (!$util.isInteger(m.timecodeSeconds))
                        return "timecodeSeconds: integer expected";
                }
                if (m.timecodeType != null && m.hasOwnProperty("timecodeType")) {
                    if (!$util.isInteger(m.timecodeType))
                        return "timecodeType: integer expected";
                }
                if (m.timecodeUserbits0 != null && m.hasOwnProperty("timecodeUserbits0")) {
                    if (!$util.isInteger(m.timecodeUserbits0))
                        return "timecodeUserbits0: integer expected";
                }
                if (m.timecodeUserbits1 != null && m.hasOwnProperty("timecodeUserbits1")) {
                    if (!$util.isInteger(m.timecodeUserbits1))
                        return "timecodeUserbits1: integer expected";
                }
                if (m.timecodeUserbits2 != null && m.hasOwnProperty("timecodeUserbits2")) {
                    if (!$util.isInteger(m.timecodeUserbits2))
                        return "timecodeUserbits2: integer expected";
                }
                if (m.timecodeUserbits3 != null && m.hasOwnProperty("timecodeUserbits3")) {
                    if (!$util.isInteger(m.timecodeUserbits3))
                        return "timecodeUserbits3: integer expected";
                }
                if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                    if (!$util.isInteger(m.timestamp) && !(m.timestamp && $util.isInteger(m.timestamp.low) && $util.isInteger(m.timestamp.high)))
                        return "timestamp: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a Vb2V4l2BufDoneFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Vb2V4l2BufDoneFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Vb2V4l2BufDoneFtraceEvent} Vb2V4l2BufDoneFtraceEvent
             */
            Vb2V4l2BufDoneFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Vb2V4l2BufDoneFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Vb2V4l2BufDoneFtraceEvent();
                if (d.field != null) {
                    m.field = d.field >>> 0;
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                if (d.minor != null) {
                    m.minor = d.minor | 0;
                }
                if (d.sequence != null) {
                    m.sequence = d.sequence >>> 0;
                }
                if (d.timecodeFlags != null) {
                    m.timecodeFlags = d.timecodeFlags >>> 0;
                }
                if (d.timecodeFrames != null) {
                    m.timecodeFrames = d.timecodeFrames >>> 0;
                }
                if (d.timecodeHours != null) {
                    m.timecodeHours = d.timecodeHours >>> 0;
                }
                if (d.timecodeMinutes != null) {
                    m.timecodeMinutes = d.timecodeMinutes >>> 0;
                }
                if (d.timecodeSeconds != null) {
                    m.timecodeSeconds = d.timecodeSeconds >>> 0;
                }
                if (d.timecodeType != null) {
                    m.timecodeType = d.timecodeType >>> 0;
                }
                if (d.timecodeUserbits0 != null) {
                    m.timecodeUserbits0 = d.timecodeUserbits0 >>> 0;
                }
                if (d.timecodeUserbits1 != null) {
                    m.timecodeUserbits1 = d.timecodeUserbits1 >>> 0;
                }
                if (d.timecodeUserbits2 != null) {
                    m.timecodeUserbits2 = d.timecodeUserbits2 >>> 0;
                }
                if (d.timecodeUserbits3 != null) {
                    m.timecodeUserbits3 = d.timecodeUserbits3 >>> 0;
                }
                if (d.timestamp != null) {
                    if ($util.Long)
                        (m.timestamp = $util.Long.fromValue(d.timestamp)).unsigned = false;
                    else if (typeof d.timestamp === "string")
                        m.timestamp = parseInt(d.timestamp, 10);
                    else if (typeof d.timestamp === "number")
                        m.timestamp = d.timestamp;
                    else if (typeof d.timestamp === "object")
                        m.timestamp = new $util.LongBits(d.timestamp.low >>> 0, d.timestamp.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from a Vb2V4l2BufDoneFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Vb2V4l2BufDoneFtraceEvent
             * @static
             * @param {perfetto.protos.Vb2V4l2BufDoneFtraceEvent} m Vb2V4l2BufDoneFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Vb2V4l2BufDoneFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.field = 0;
                    d.flags = 0;
                    d.minor = 0;
                    d.sequence = 0;
                    d.timecodeFlags = 0;
                    d.timecodeFrames = 0;
                    d.timecodeHours = 0;
                    d.timecodeMinutes = 0;
                    d.timecodeSeconds = 0;
                    d.timecodeType = 0;
                    d.timecodeUserbits0 = 0;
                    d.timecodeUserbits1 = 0;
                    d.timecodeUserbits2 = 0;
                    d.timecodeUserbits3 = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.timestamp = o.longs === String ? "0" : 0;
                }
                if (m.field != null && m.hasOwnProperty("field")) {
                    d.field = m.field;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.minor != null && m.hasOwnProperty("minor")) {
                    d.minor = m.minor;
                }
                if (m.sequence != null && m.hasOwnProperty("sequence")) {
                    d.sequence = m.sequence;
                }
                if (m.timecodeFlags != null && m.hasOwnProperty("timecodeFlags")) {
                    d.timecodeFlags = m.timecodeFlags;
                }
                if (m.timecodeFrames != null && m.hasOwnProperty("timecodeFrames")) {
                    d.timecodeFrames = m.timecodeFrames;
                }
                if (m.timecodeHours != null && m.hasOwnProperty("timecodeHours")) {
                    d.timecodeHours = m.timecodeHours;
                }
                if (m.timecodeMinutes != null && m.hasOwnProperty("timecodeMinutes")) {
                    d.timecodeMinutes = m.timecodeMinutes;
                }
                if (m.timecodeSeconds != null && m.hasOwnProperty("timecodeSeconds")) {
                    d.timecodeSeconds = m.timecodeSeconds;
                }
                if (m.timecodeType != null && m.hasOwnProperty("timecodeType")) {
                    d.timecodeType = m.timecodeType;
                }
                if (m.timecodeUserbits0 != null && m.hasOwnProperty("timecodeUserbits0")) {
                    d.timecodeUserbits0 = m.timecodeUserbits0;
                }
                if (m.timecodeUserbits1 != null && m.hasOwnProperty("timecodeUserbits1")) {
                    d.timecodeUserbits1 = m.timecodeUserbits1;
                }
                if (m.timecodeUserbits2 != null && m.hasOwnProperty("timecodeUserbits2")) {
                    d.timecodeUserbits2 = m.timecodeUserbits2;
                }
                if (m.timecodeUserbits3 != null && m.hasOwnProperty("timecodeUserbits3")) {
                    d.timecodeUserbits3 = m.timecodeUserbits3;
                }
                if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                    if (typeof m.timestamp === "number")
                        d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp;
                    else
                        d.timestamp = o.longs === String ? $util.Long.prototype.toString.call(m.timestamp) : o.longs === Number ? new $util.LongBits(m.timestamp.low >>> 0, m.timestamp.high >>> 0).toNumber() : m.timestamp;
                }
                return d;
            };

            /**
             * Converts this Vb2V4l2BufDoneFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Vb2V4l2BufDoneFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Vb2V4l2BufDoneFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Vb2V4l2BufDoneFtraceEvent;
        })();

        protos.Vb2V4l2QbufFtraceEvent = (function() {

            /**
             * Properties of a Vb2V4l2QbufFtraceEvent.
             * @memberof perfetto.protos
             * @interface IVb2V4l2QbufFtraceEvent
             * @property {number|null} [field] Vb2V4l2QbufFtraceEvent field
             * @property {number|null} [flags] Vb2V4l2QbufFtraceEvent flags
             * @property {number|null} [minor] Vb2V4l2QbufFtraceEvent minor
             * @property {number|null} [sequence] Vb2V4l2QbufFtraceEvent sequence
             * @property {number|null} [timecodeFlags] Vb2V4l2QbufFtraceEvent timecodeFlags
             * @property {number|null} [timecodeFrames] Vb2V4l2QbufFtraceEvent timecodeFrames
             * @property {number|null} [timecodeHours] Vb2V4l2QbufFtraceEvent timecodeHours
             * @property {number|null} [timecodeMinutes] Vb2V4l2QbufFtraceEvent timecodeMinutes
             * @property {number|null} [timecodeSeconds] Vb2V4l2QbufFtraceEvent timecodeSeconds
             * @property {number|null} [timecodeType] Vb2V4l2QbufFtraceEvent timecodeType
             * @property {number|null} [timecodeUserbits0] Vb2V4l2QbufFtraceEvent timecodeUserbits0
             * @property {number|null} [timecodeUserbits1] Vb2V4l2QbufFtraceEvent timecodeUserbits1
             * @property {number|null} [timecodeUserbits2] Vb2V4l2QbufFtraceEvent timecodeUserbits2
             * @property {number|null} [timecodeUserbits3] Vb2V4l2QbufFtraceEvent timecodeUserbits3
             * @property {number|null} [timestamp] Vb2V4l2QbufFtraceEvent timestamp
             */

            /**
             * Constructs a new Vb2V4l2QbufFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a Vb2V4l2QbufFtraceEvent.
             * @implements IVb2V4l2QbufFtraceEvent
             * @constructor
             * @param {perfetto.protos.IVb2V4l2QbufFtraceEvent=} [p] Properties to set
             */
            function Vb2V4l2QbufFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Vb2V4l2QbufFtraceEvent field.
             * @member {number} field
             * @memberof perfetto.protos.Vb2V4l2QbufFtraceEvent
             * @instance
             */
            Vb2V4l2QbufFtraceEvent.prototype.field = 0;

            /**
             * Vb2V4l2QbufFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.Vb2V4l2QbufFtraceEvent
             * @instance
             */
            Vb2V4l2QbufFtraceEvent.prototype.flags = 0;

            /**
             * Vb2V4l2QbufFtraceEvent minor.
             * @member {number} minor
             * @memberof perfetto.protos.Vb2V4l2QbufFtraceEvent
             * @instance
             */
            Vb2V4l2QbufFtraceEvent.prototype.minor = 0;

            /**
             * Vb2V4l2QbufFtraceEvent sequence.
             * @member {number} sequence
             * @memberof perfetto.protos.Vb2V4l2QbufFtraceEvent
             * @instance
             */
            Vb2V4l2QbufFtraceEvent.prototype.sequence = 0;

            /**
             * Vb2V4l2QbufFtraceEvent timecodeFlags.
             * @member {number} timecodeFlags
             * @memberof perfetto.protos.Vb2V4l2QbufFtraceEvent
             * @instance
             */
            Vb2V4l2QbufFtraceEvent.prototype.timecodeFlags = 0;

            /**
             * Vb2V4l2QbufFtraceEvent timecodeFrames.
             * @member {number} timecodeFrames
             * @memberof perfetto.protos.Vb2V4l2QbufFtraceEvent
             * @instance
             */
            Vb2V4l2QbufFtraceEvent.prototype.timecodeFrames = 0;

            /**
             * Vb2V4l2QbufFtraceEvent timecodeHours.
             * @member {number} timecodeHours
             * @memberof perfetto.protos.Vb2V4l2QbufFtraceEvent
             * @instance
             */
            Vb2V4l2QbufFtraceEvent.prototype.timecodeHours = 0;

            /**
             * Vb2V4l2QbufFtraceEvent timecodeMinutes.
             * @member {number} timecodeMinutes
             * @memberof perfetto.protos.Vb2V4l2QbufFtraceEvent
             * @instance
             */
            Vb2V4l2QbufFtraceEvent.prototype.timecodeMinutes = 0;

            /**
             * Vb2V4l2QbufFtraceEvent timecodeSeconds.
             * @member {number} timecodeSeconds
             * @memberof perfetto.protos.Vb2V4l2QbufFtraceEvent
             * @instance
             */
            Vb2V4l2QbufFtraceEvent.prototype.timecodeSeconds = 0;

            /**
             * Vb2V4l2QbufFtraceEvent timecodeType.
             * @member {number} timecodeType
             * @memberof perfetto.protos.Vb2V4l2QbufFtraceEvent
             * @instance
             */
            Vb2V4l2QbufFtraceEvent.prototype.timecodeType = 0;

            /**
             * Vb2V4l2QbufFtraceEvent timecodeUserbits0.
             * @member {number} timecodeUserbits0
             * @memberof perfetto.protos.Vb2V4l2QbufFtraceEvent
             * @instance
             */
            Vb2V4l2QbufFtraceEvent.prototype.timecodeUserbits0 = 0;

            /**
             * Vb2V4l2QbufFtraceEvent timecodeUserbits1.
             * @member {number} timecodeUserbits1
             * @memberof perfetto.protos.Vb2V4l2QbufFtraceEvent
             * @instance
             */
            Vb2V4l2QbufFtraceEvent.prototype.timecodeUserbits1 = 0;

            /**
             * Vb2V4l2QbufFtraceEvent timecodeUserbits2.
             * @member {number} timecodeUserbits2
             * @memberof perfetto.protos.Vb2V4l2QbufFtraceEvent
             * @instance
             */
            Vb2V4l2QbufFtraceEvent.prototype.timecodeUserbits2 = 0;

            /**
             * Vb2V4l2QbufFtraceEvent timecodeUserbits3.
             * @member {number} timecodeUserbits3
             * @memberof perfetto.protos.Vb2V4l2QbufFtraceEvent
             * @instance
             */
            Vb2V4l2QbufFtraceEvent.prototype.timecodeUserbits3 = 0;

            /**
             * Vb2V4l2QbufFtraceEvent timestamp.
             * @member {number} timestamp
             * @memberof perfetto.protos.Vb2V4l2QbufFtraceEvent
             * @instance
             */
            Vb2V4l2QbufFtraceEvent.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new Vb2V4l2QbufFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Vb2V4l2QbufFtraceEvent
             * @static
             * @param {perfetto.protos.IVb2V4l2QbufFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Vb2V4l2QbufFtraceEvent} Vb2V4l2QbufFtraceEvent instance
             */
            Vb2V4l2QbufFtraceEvent.create = function create(properties) {
                return new Vb2V4l2QbufFtraceEvent(properties);
            };

            /**
             * Encodes the specified Vb2V4l2QbufFtraceEvent message. Does not implicitly {@link perfetto.protos.Vb2V4l2QbufFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Vb2V4l2QbufFtraceEvent
             * @static
             * @param {perfetto.protos.IVb2V4l2QbufFtraceEvent} m Vb2V4l2QbufFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Vb2V4l2QbufFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.field != null && Object.hasOwnProperty.call(m, "field"))
                    w.uint32(8).uint32(m.field);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(16).uint32(m.flags);
                if (m.minor != null && Object.hasOwnProperty.call(m, "minor"))
                    w.uint32(24).int32(m.minor);
                if (m.sequence != null && Object.hasOwnProperty.call(m, "sequence"))
                    w.uint32(32).uint32(m.sequence);
                if (m.timecodeFlags != null && Object.hasOwnProperty.call(m, "timecodeFlags"))
                    w.uint32(40).uint32(m.timecodeFlags);
                if (m.timecodeFrames != null && Object.hasOwnProperty.call(m, "timecodeFrames"))
                    w.uint32(48).uint32(m.timecodeFrames);
                if (m.timecodeHours != null && Object.hasOwnProperty.call(m, "timecodeHours"))
                    w.uint32(56).uint32(m.timecodeHours);
                if (m.timecodeMinutes != null && Object.hasOwnProperty.call(m, "timecodeMinutes"))
                    w.uint32(64).uint32(m.timecodeMinutes);
                if (m.timecodeSeconds != null && Object.hasOwnProperty.call(m, "timecodeSeconds"))
                    w.uint32(72).uint32(m.timecodeSeconds);
                if (m.timecodeType != null && Object.hasOwnProperty.call(m, "timecodeType"))
                    w.uint32(80).uint32(m.timecodeType);
                if (m.timecodeUserbits0 != null && Object.hasOwnProperty.call(m, "timecodeUserbits0"))
                    w.uint32(88).uint32(m.timecodeUserbits0);
                if (m.timecodeUserbits1 != null && Object.hasOwnProperty.call(m, "timecodeUserbits1"))
                    w.uint32(96).uint32(m.timecodeUserbits1);
                if (m.timecodeUserbits2 != null && Object.hasOwnProperty.call(m, "timecodeUserbits2"))
                    w.uint32(104).uint32(m.timecodeUserbits2);
                if (m.timecodeUserbits3 != null && Object.hasOwnProperty.call(m, "timecodeUserbits3"))
                    w.uint32(112).uint32(m.timecodeUserbits3);
                if (m.timestamp != null && Object.hasOwnProperty.call(m, "timestamp"))
                    w.uint32(120).int64(m.timestamp);
                return w;
            };

            /**
             * Encodes the specified Vb2V4l2QbufFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Vb2V4l2QbufFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Vb2V4l2QbufFtraceEvent
             * @static
             * @param {perfetto.protos.IVb2V4l2QbufFtraceEvent} message Vb2V4l2QbufFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Vb2V4l2QbufFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a Vb2V4l2QbufFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Vb2V4l2QbufFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Vb2V4l2QbufFtraceEvent} Vb2V4l2QbufFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Vb2V4l2QbufFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Vb2V4l2QbufFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.field = r.uint32();
                        break;
                    case 2:
                        m.flags = r.uint32();
                        break;
                    case 3:
                        m.minor = r.int32();
                        break;
                    case 4:
                        m.sequence = r.uint32();
                        break;
                    case 5:
                        m.timecodeFlags = r.uint32();
                        break;
                    case 6:
                        m.timecodeFrames = r.uint32();
                        break;
                    case 7:
                        m.timecodeHours = r.uint32();
                        break;
                    case 8:
                        m.timecodeMinutes = r.uint32();
                        break;
                    case 9:
                        m.timecodeSeconds = r.uint32();
                        break;
                    case 10:
                        m.timecodeType = r.uint32();
                        break;
                    case 11:
                        m.timecodeUserbits0 = r.uint32();
                        break;
                    case 12:
                        m.timecodeUserbits1 = r.uint32();
                        break;
                    case 13:
                        m.timecodeUserbits2 = r.uint32();
                        break;
                    case 14:
                        m.timecodeUserbits3 = r.uint32();
                        break;
                    case 15:
                        m.timestamp = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a Vb2V4l2QbufFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Vb2V4l2QbufFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Vb2V4l2QbufFtraceEvent} Vb2V4l2QbufFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Vb2V4l2QbufFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a Vb2V4l2QbufFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Vb2V4l2QbufFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Vb2V4l2QbufFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.field != null && m.hasOwnProperty("field")) {
                    if (!$util.isInteger(m.field))
                        return "field: integer expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.minor != null && m.hasOwnProperty("minor")) {
                    if (!$util.isInteger(m.minor))
                        return "minor: integer expected";
                }
                if (m.sequence != null && m.hasOwnProperty("sequence")) {
                    if (!$util.isInteger(m.sequence))
                        return "sequence: integer expected";
                }
                if (m.timecodeFlags != null && m.hasOwnProperty("timecodeFlags")) {
                    if (!$util.isInteger(m.timecodeFlags))
                        return "timecodeFlags: integer expected";
                }
                if (m.timecodeFrames != null && m.hasOwnProperty("timecodeFrames")) {
                    if (!$util.isInteger(m.timecodeFrames))
                        return "timecodeFrames: integer expected";
                }
                if (m.timecodeHours != null && m.hasOwnProperty("timecodeHours")) {
                    if (!$util.isInteger(m.timecodeHours))
                        return "timecodeHours: integer expected";
                }
                if (m.timecodeMinutes != null && m.hasOwnProperty("timecodeMinutes")) {
                    if (!$util.isInteger(m.timecodeMinutes))
                        return "timecodeMinutes: integer expected";
                }
                if (m.timecodeSeconds != null && m.hasOwnProperty("timecodeSeconds")) {
                    if (!$util.isInteger(m.timecodeSeconds))
                        return "timecodeSeconds: integer expected";
                }
                if (m.timecodeType != null && m.hasOwnProperty("timecodeType")) {
                    if (!$util.isInteger(m.timecodeType))
                        return "timecodeType: integer expected";
                }
                if (m.timecodeUserbits0 != null && m.hasOwnProperty("timecodeUserbits0")) {
                    if (!$util.isInteger(m.timecodeUserbits0))
                        return "timecodeUserbits0: integer expected";
                }
                if (m.timecodeUserbits1 != null && m.hasOwnProperty("timecodeUserbits1")) {
                    if (!$util.isInteger(m.timecodeUserbits1))
                        return "timecodeUserbits1: integer expected";
                }
                if (m.timecodeUserbits2 != null && m.hasOwnProperty("timecodeUserbits2")) {
                    if (!$util.isInteger(m.timecodeUserbits2))
                        return "timecodeUserbits2: integer expected";
                }
                if (m.timecodeUserbits3 != null && m.hasOwnProperty("timecodeUserbits3")) {
                    if (!$util.isInteger(m.timecodeUserbits3))
                        return "timecodeUserbits3: integer expected";
                }
                if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                    if (!$util.isInteger(m.timestamp) && !(m.timestamp && $util.isInteger(m.timestamp.low) && $util.isInteger(m.timestamp.high)))
                        return "timestamp: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a Vb2V4l2QbufFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Vb2V4l2QbufFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Vb2V4l2QbufFtraceEvent} Vb2V4l2QbufFtraceEvent
             */
            Vb2V4l2QbufFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Vb2V4l2QbufFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Vb2V4l2QbufFtraceEvent();
                if (d.field != null) {
                    m.field = d.field >>> 0;
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                if (d.minor != null) {
                    m.minor = d.minor | 0;
                }
                if (d.sequence != null) {
                    m.sequence = d.sequence >>> 0;
                }
                if (d.timecodeFlags != null) {
                    m.timecodeFlags = d.timecodeFlags >>> 0;
                }
                if (d.timecodeFrames != null) {
                    m.timecodeFrames = d.timecodeFrames >>> 0;
                }
                if (d.timecodeHours != null) {
                    m.timecodeHours = d.timecodeHours >>> 0;
                }
                if (d.timecodeMinutes != null) {
                    m.timecodeMinutes = d.timecodeMinutes >>> 0;
                }
                if (d.timecodeSeconds != null) {
                    m.timecodeSeconds = d.timecodeSeconds >>> 0;
                }
                if (d.timecodeType != null) {
                    m.timecodeType = d.timecodeType >>> 0;
                }
                if (d.timecodeUserbits0 != null) {
                    m.timecodeUserbits0 = d.timecodeUserbits0 >>> 0;
                }
                if (d.timecodeUserbits1 != null) {
                    m.timecodeUserbits1 = d.timecodeUserbits1 >>> 0;
                }
                if (d.timecodeUserbits2 != null) {
                    m.timecodeUserbits2 = d.timecodeUserbits2 >>> 0;
                }
                if (d.timecodeUserbits3 != null) {
                    m.timecodeUserbits3 = d.timecodeUserbits3 >>> 0;
                }
                if (d.timestamp != null) {
                    if ($util.Long)
                        (m.timestamp = $util.Long.fromValue(d.timestamp)).unsigned = false;
                    else if (typeof d.timestamp === "string")
                        m.timestamp = parseInt(d.timestamp, 10);
                    else if (typeof d.timestamp === "number")
                        m.timestamp = d.timestamp;
                    else if (typeof d.timestamp === "object")
                        m.timestamp = new $util.LongBits(d.timestamp.low >>> 0, d.timestamp.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from a Vb2V4l2QbufFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Vb2V4l2QbufFtraceEvent
             * @static
             * @param {perfetto.protos.Vb2V4l2QbufFtraceEvent} m Vb2V4l2QbufFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Vb2V4l2QbufFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.field = 0;
                    d.flags = 0;
                    d.minor = 0;
                    d.sequence = 0;
                    d.timecodeFlags = 0;
                    d.timecodeFrames = 0;
                    d.timecodeHours = 0;
                    d.timecodeMinutes = 0;
                    d.timecodeSeconds = 0;
                    d.timecodeType = 0;
                    d.timecodeUserbits0 = 0;
                    d.timecodeUserbits1 = 0;
                    d.timecodeUserbits2 = 0;
                    d.timecodeUserbits3 = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.timestamp = o.longs === String ? "0" : 0;
                }
                if (m.field != null && m.hasOwnProperty("field")) {
                    d.field = m.field;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.minor != null && m.hasOwnProperty("minor")) {
                    d.minor = m.minor;
                }
                if (m.sequence != null && m.hasOwnProperty("sequence")) {
                    d.sequence = m.sequence;
                }
                if (m.timecodeFlags != null && m.hasOwnProperty("timecodeFlags")) {
                    d.timecodeFlags = m.timecodeFlags;
                }
                if (m.timecodeFrames != null && m.hasOwnProperty("timecodeFrames")) {
                    d.timecodeFrames = m.timecodeFrames;
                }
                if (m.timecodeHours != null && m.hasOwnProperty("timecodeHours")) {
                    d.timecodeHours = m.timecodeHours;
                }
                if (m.timecodeMinutes != null && m.hasOwnProperty("timecodeMinutes")) {
                    d.timecodeMinutes = m.timecodeMinutes;
                }
                if (m.timecodeSeconds != null && m.hasOwnProperty("timecodeSeconds")) {
                    d.timecodeSeconds = m.timecodeSeconds;
                }
                if (m.timecodeType != null && m.hasOwnProperty("timecodeType")) {
                    d.timecodeType = m.timecodeType;
                }
                if (m.timecodeUserbits0 != null && m.hasOwnProperty("timecodeUserbits0")) {
                    d.timecodeUserbits0 = m.timecodeUserbits0;
                }
                if (m.timecodeUserbits1 != null && m.hasOwnProperty("timecodeUserbits1")) {
                    d.timecodeUserbits1 = m.timecodeUserbits1;
                }
                if (m.timecodeUserbits2 != null && m.hasOwnProperty("timecodeUserbits2")) {
                    d.timecodeUserbits2 = m.timecodeUserbits2;
                }
                if (m.timecodeUserbits3 != null && m.hasOwnProperty("timecodeUserbits3")) {
                    d.timecodeUserbits3 = m.timecodeUserbits3;
                }
                if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                    if (typeof m.timestamp === "number")
                        d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp;
                    else
                        d.timestamp = o.longs === String ? $util.Long.prototype.toString.call(m.timestamp) : o.longs === Number ? new $util.LongBits(m.timestamp.low >>> 0, m.timestamp.high >>> 0).toNumber() : m.timestamp;
                }
                return d;
            };

            /**
             * Converts this Vb2V4l2QbufFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Vb2V4l2QbufFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Vb2V4l2QbufFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Vb2V4l2QbufFtraceEvent;
        })();

        protos.Vb2V4l2DqbufFtraceEvent = (function() {

            /**
             * Properties of a Vb2V4l2DqbufFtraceEvent.
             * @memberof perfetto.protos
             * @interface IVb2V4l2DqbufFtraceEvent
             * @property {number|null} [field] Vb2V4l2DqbufFtraceEvent field
             * @property {number|null} [flags] Vb2V4l2DqbufFtraceEvent flags
             * @property {number|null} [minor] Vb2V4l2DqbufFtraceEvent minor
             * @property {number|null} [sequence] Vb2V4l2DqbufFtraceEvent sequence
             * @property {number|null} [timecodeFlags] Vb2V4l2DqbufFtraceEvent timecodeFlags
             * @property {number|null} [timecodeFrames] Vb2V4l2DqbufFtraceEvent timecodeFrames
             * @property {number|null} [timecodeHours] Vb2V4l2DqbufFtraceEvent timecodeHours
             * @property {number|null} [timecodeMinutes] Vb2V4l2DqbufFtraceEvent timecodeMinutes
             * @property {number|null} [timecodeSeconds] Vb2V4l2DqbufFtraceEvent timecodeSeconds
             * @property {number|null} [timecodeType] Vb2V4l2DqbufFtraceEvent timecodeType
             * @property {number|null} [timecodeUserbits0] Vb2V4l2DqbufFtraceEvent timecodeUserbits0
             * @property {number|null} [timecodeUserbits1] Vb2V4l2DqbufFtraceEvent timecodeUserbits1
             * @property {number|null} [timecodeUserbits2] Vb2V4l2DqbufFtraceEvent timecodeUserbits2
             * @property {number|null} [timecodeUserbits3] Vb2V4l2DqbufFtraceEvent timecodeUserbits3
             * @property {number|null} [timestamp] Vb2V4l2DqbufFtraceEvent timestamp
             */

            /**
             * Constructs a new Vb2V4l2DqbufFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a Vb2V4l2DqbufFtraceEvent.
             * @implements IVb2V4l2DqbufFtraceEvent
             * @constructor
             * @param {perfetto.protos.IVb2V4l2DqbufFtraceEvent=} [p] Properties to set
             */
            function Vb2V4l2DqbufFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Vb2V4l2DqbufFtraceEvent field.
             * @member {number} field
             * @memberof perfetto.protos.Vb2V4l2DqbufFtraceEvent
             * @instance
             */
            Vb2V4l2DqbufFtraceEvent.prototype.field = 0;

            /**
             * Vb2V4l2DqbufFtraceEvent flags.
             * @member {number} flags
             * @memberof perfetto.protos.Vb2V4l2DqbufFtraceEvent
             * @instance
             */
            Vb2V4l2DqbufFtraceEvent.prototype.flags = 0;

            /**
             * Vb2V4l2DqbufFtraceEvent minor.
             * @member {number} minor
             * @memberof perfetto.protos.Vb2V4l2DqbufFtraceEvent
             * @instance
             */
            Vb2V4l2DqbufFtraceEvent.prototype.minor = 0;

            /**
             * Vb2V4l2DqbufFtraceEvent sequence.
             * @member {number} sequence
             * @memberof perfetto.protos.Vb2V4l2DqbufFtraceEvent
             * @instance
             */
            Vb2V4l2DqbufFtraceEvent.prototype.sequence = 0;

            /**
             * Vb2V4l2DqbufFtraceEvent timecodeFlags.
             * @member {number} timecodeFlags
             * @memberof perfetto.protos.Vb2V4l2DqbufFtraceEvent
             * @instance
             */
            Vb2V4l2DqbufFtraceEvent.prototype.timecodeFlags = 0;

            /**
             * Vb2V4l2DqbufFtraceEvent timecodeFrames.
             * @member {number} timecodeFrames
             * @memberof perfetto.protos.Vb2V4l2DqbufFtraceEvent
             * @instance
             */
            Vb2V4l2DqbufFtraceEvent.prototype.timecodeFrames = 0;

            /**
             * Vb2V4l2DqbufFtraceEvent timecodeHours.
             * @member {number} timecodeHours
             * @memberof perfetto.protos.Vb2V4l2DqbufFtraceEvent
             * @instance
             */
            Vb2V4l2DqbufFtraceEvent.prototype.timecodeHours = 0;

            /**
             * Vb2V4l2DqbufFtraceEvent timecodeMinutes.
             * @member {number} timecodeMinutes
             * @memberof perfetto.protos.Vb2V4l2DqbufFtraceEvent
             * @instance
             */
            Vb2V4l2DqbufFtraceEvent.prototype.timecodeMinutes = 0;

            /**
             * Vb2V4l2DqbufFtraceEvent timecodeSeconds.
             * @member {number} timecodeSeconds
             * @memberof perfetto.protos.Vb2V4l2DqbufFtraceEvent
             * @instance
             */
            Vb2V4l2DqbufFtraceEvent.prototype.timecodeSeconds = 0;

            /**
             * Vb2V4l2DqbufFtraceEvent timecodeType.
             * @member {number} timecodeType
             * @memberof perfetto.protos.Vb2V4l2DqbufFtraceEvent
             * @instance
             */
            Vb2V4l2DqbufFtraceEvent.prototype.timecodeType = 0;

            /**
             * Vb2V4l2DqbufFtraceEvent timecodeUserbits0.
             * @member {number} timecodeUserbits0
             * @memberof perfetto.protos.Vb2V4l2DqbufFtraceEvent
             * @instance
             */
            Vb2V4l2DqbufFtraceEvent.prototype.timecodeUserbits0 = 0;

            /**
             * Vb2V4l2DqbufFtraceEvent timecodeUserbits1.
             * @member {number} timecodeUserbits1
             * @memberof perfetto.protos.Vb2V4l2DqbufFtraceEvent
             * @instance
             */
            Vb2V4l2DqbufFtraceEvent.prototype.timecodeUserbits1 = 0;

            /**
             * Vb2V4l2DqbufFtraceEvent timecodeUserbits2.
             * @member {number} timecodeUserbits2
             * @memberof perfetto.protos.Vb2V4l2DqbufFtraceEvent
             * @instance
             */
            Vb2V4l2DqbufFtraceEvent.prototype.timecodeUserbits2 = 0;

            /**
             * Vb2V4l2DqbufFtraceEvent timecodeUserbits3.
             * @member {number} timecodeUserbits3
             * @memberof perfetto.protos.Vb2V4l2DqbufFtraceEvent
             * @instance
             */
            Vb2V4l2DqbufFtraceEvent.prototype.timecodeUserbits3 = 0;

            /**
             * Vb2V4l2DqbufFtraceEvent timestamp.
             * @member {number} timestamp
             * @memberof perfetto.protos.Vb2V4l2DqbufFtraceEvent
             * @instance
             */
            Vb2V4l2DqbufFtraceEvent.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new Vb2V4l2DqbufFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Vb2V4l2DqbufFtraceEvent
             * @static
             * @param {perfetto.protos.IVb2V4l2DqbufFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.Vb2V4l2DqbufFtraceEvent} Vb2V4l2DqbufFtraceEvent instance
             */
            Vb2V4l2DqbufFtraceEvent.create = function create(properties) {
                return new Vb2V4l2DqbufFtraceEvent(properties);
            };

            /**
             * Encodes the specified Vb2V4l2DqbufFtraceEvent message. Does not implicitly {@link perfetto.protos.Vb2V4l2DqbufFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Vb2V4l2DqbufFtraceEvent
             * @static
             * @param {perfetto.protos.IVb2V4l2DqbufFtraceEvent} m Vb2V4l2DqbufFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Vb2V4l2DqbufFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.field != null && Object.hasOwnProperty.call(m, "field"))
                    w.uint32(8).uint32(m.field);
                if (m.flags != null && Object.hasOwnProperty.call(m, "flags"))
                    w.uint32(16).uint32(m.flags);
                if (m.minor != null && Object.hasOwnProperty.call(m, "minor"))
                    w.uint32(24).int32(m.minor);
                if (m.sequence != null && Object.hasOwnProperty.call(m, "sequence"))
                    w.uint32(32).uint32(m.sequence);
                if (m.timecodeFlags != null && Object.hasOwnProperty.call(m, "timecodeFlags"))
                    w.uint32(40).uint32(m.timecodeFlags);
                if (m.timecodeFrames != null && Object.hasOwnProperty.call(m, "timecodeFrames"))
                    w.uint32(48).uint32(m.timecodeFrames);
                if (m.timecodeHours != null && Object.hasOwnProperty.call(m, "timecodeHours"))
                    w.uint32(56).uint32(m.timecodeHours);
                if (m.timecodeMinutes != null && Object.hasOwnProperty.call(m, "timecodeMinutes"))
                    w.uint32(64).uint32(m.timecodeMinutes);
                if (m.timecodeSeconds != null && Object.hasOwnProperty.call(m, "timecodeSeconds"))
                    w.uint32(72).uint32(m.timecodeSeconds);
                if (m.timecodeType != null && Object.hasOwnProperty.call(m, "timecodeType"))
                    w.uint32(80).uint32(m.timecodeType);
                if (m.timecodeUserbits0 != null && Object.hasOwnProperty.call(m, "timecodeUserbits0"))
                    w.uint32(88).uint32(m.timecodeUserbits0);
                if (m.timecodeUserbits1 != null && Object.hasOwnProperty.call(m, "timecodeUserbits1"))
                    w.uint32(96).uint32(m.timecodeUserbits1);
                if (m.timecodeUserbits2 != null && Object.hasOwnProperty.call(m, "timecodeUserbits2"))
                    w.uint32(104).uint32(m.timecodeUserbits2);
                if (m.timecodeUserbits3 != null && Object.hasOwnProperty.call(m, "timecodeUserbits3"))
                    w.uint32(112).uint32(m.timecodeUserbits3);
                if (m.timestamp != null && Object.hasOwnProperty.call(m, "timestamp"))
                    w.uint32(120).int64(m.timestamp);
                return w;
            };

            /**
             * Encodes the specified Vb2V4l2DqbufFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.Vb2V4l2DqbufFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Vb2V4l2DqbufFtraceEvent
             * @static
             * @param {perfetto.protos.IVb2V4l2DqbufFtraceEvent} message Vb2V4l2DqbufFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Vb2V4l2DqbufFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a Vb2V4l2DqbufFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Vb2V4l2DqbufFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Vb2V4l2DqbufFtraceEvent} Vb2V4l2DqbufFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Vb2V4l2DqbufFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Vb2V4l2DqbufFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.field = r.uint32();
                        break;
                    case 2:
                        m.flags = r.uint32();
                        break;
                    case 3:
                        m.minor = r.int32();
                        break;
                    case 4:
                        m.sequence = r.uint32();
                        break;
                    case 5:
                        m.timecodeFlags = r.uint32();
                        break;
                    case 6:
                        m.timecodeFrames = r.uint32();
                        break;
                    case 7:
                        m.timecodeHours = r.uint32();
                        break;
                    case 8:
                        m.timecodeMinutes = r.uint32();
                        break;
                    case 9:
                        m.timecodeSeconds = r.uint32();
                        break;
                    case 10:
                        m.timecodeType = r.uint32();
                        break;
                    case 11:
                        m.timecodeUserbits0 = r.uint32();
                        break;
                    case 12:
                        m.timecodeUserbits1 = r.uint32();
                        break;
                    case 13:
                        m.timecodeUserbits2 = r.uint32();
                        break;
                    case 14:
                        m.timecodeUserbits3 = r.uint32();
                        break;
                    case 15:
                        m.timestamp = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a Vb2V4l2DqbufFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Vb2V4l2DqbufFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Vb2V4l2DqbufFtraceEvent} Vb2V4l2DqbufFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Vb2V4l2DqbufFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a Vb2V4l2DqbufFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.Vb2V4l2DqbufFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Vb2V4l2DqbufFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.field != null && m.hasOwnProperty("field")) {
                    if (!$util.isInteger(m.field))
                        return "field: integer expected";
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    if (!$util.isInteger(m.flags))
                        return "flags: integer expected";
                }
                if (m.minor != null && m.hasOwnProperty("minor")) {
                    if (!$util.isInteger(m.minor))
                        return "minor: integer expected";
                }
                if (m.sequence != null && m.hasOwnProperty("sequence")) {
                    if (!$util.isInteger(m.sequence))
                        return "sequence: integer expected";
                }
                if (m.timecodeFlags != null && m.hasOwnProperty("timecodeFlags")) {
                    if (!$util.isInteger(m.timecodeFlags))
                        return "timecodeFlags: integer expected";
                }
                if (m.timecodeFrames != null && m.hasOwnProperty("timecodeFrames")) {
                    if (!$util.isInteger(m.timecodeFrames))
                        return "timecodeFrames: integer expected";
                }
                if (m.timecodeHours != null && m.hasOwnProperty("timecodeHours")) {
                    if (!$util.isInteger(m.timecodeHours))
                        return "timecodeHours: integer expected";
                }
                if (m.timecodeMinutes != null && m.hasOwnProperty("timecodeMinutes")) {
                    if (!$util.isInteger(m.timecodeMinutes))
                        return "timecodeMinutes: integer expected";
                }
                if (m.timecodeSeconds != null && m.hasOwnProperty("timecodeSeconds")) {
                    if (!$util.isInteger(m.timecodeSeconds))
                        return "timecodeSeconds: integer expected";
                }
                if (m.timecodeType != null && m.hasOwnProperty("timecodeType")) {
                    if (!$util.isInteger(m.timecodeType))
                        return "timecodeType: integer expected";
                }
                if (m.timecodeUserbits0 != null && m.hasOwnProperty("timecodeUserbits0")) {
                    if (!$util.isInteger(m.timecodeUserbits0))
                        return "timecodeUserbits0: integer expected";
                }
                if (m.timecodeUserbits1 != null && m.hasOwnProperty("timecodeUserbits1")) {
                    if (!$util.isInteger(m.timecodeUserbits1))
                        return "timecodeUserbits1: integer expected";
                }
                if (m.timecodeUserbits2 != null && m.hasOwnProperty("timecodeUserbits2")) {
                    if (!$util.isInteger(m.timecodeUserbits2))
                        return "timecodeUserbits2: integer expected";
                }
                if (m.timecodeUserbits3 != null && m.hasOwnProperty("timecodeUserbits3")) {
                    if (!$util.isInteger(m.timecodeUserbits3))
                        return "timecodeUserbits3: integer expected";
                }
                if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                    if (!$util.isInteger(m.timestamp) && !(m.timestamp && $util.isInteger(m.timestamp.low) && $util.isInteger(m.timestamp.high)))
                        return "timestamp: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a Vb2V4l2DqbufFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Vb2V4l2DqbufFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Vb2V4l2DqbufFtraceEvent} Vb2V4l2DqbufFtraceEvent
             */
            Vb2V4l2DqbufFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Vb2V4l2DqbufFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.Vb2V4l2DqbufFtraceEvent();
                if (d.field != null) {
                    m.field = d.field >>> 0;
                }
                if (d.flags != null) {
                    m.flags = d.flags >>> 0;
                }
                if (d.minor != null) {
                    m.minor = d.minor | 0;
                }
                if (d.sequence != null) {
                    m.sequence = d.sequence >>> 0;
                }
                if (d.timecodeFlags != null) {
                    m.timecodeFlags = d.timecodeFlags >>> 0;
                }
                if (d.timecodeFrames != null) {
                    m.timecodeFrames = d.timecodeFrames >>> 0;
                }
                if (d.timecodeHours != null) {
                    m.timecodeHours = d.timecodeHours >>> 0;
                }
                if (d.timecodeMinutes != null) {
                    m.timecodeMinutes = d.timecodeMinutes >>> 0;
                }
                if (d.timecodeSeconds != null) {
                    m.timecodeSeconds = d.timecodeSeconds >>> 0;
                }
                if (d.timecodeType != null) {
                    m.timecodeType = d.timecodeType >>> 0;
                }
                if (d.timecodeUserbits0 != null) {
                    m.timecodeUserbits0 = d.timecodeUserbits0 >>> 0;
                }
                if (d.timecodeUserbits1 != null) {
                    m.timecodeUserbits1 = d.timecodeUserbits1 >>> 0;
                }
                if (d.timecodeUserbits2 != null) {
                    m.timecodeUserbits2 = d.timecodeUserbits2 >>> 0;
                }
                if (d.timecodeUserbits3 != null) {
                    m.timecodeUserbits3 = d.timecodeUserbits3 >>> 0;
                }
                if (d.timestamp != null) {
                    if ($util.Long)
                        (m.timestamp = $util.Long.fromValue(d.timestamp)).unsigned = false;
                    else if (typeof d.timestamp === "string")
                        m.timestamp = parseInt(d.timestamp, 10);
                    else if (typeof d.timestamp === "number")
                        m.timestamp = d.timestamp;
                    else if (typeof d.timestamp === "object")
                        m.timestamp = new $util.LongBits(d.timestamp.low >>> 0, d.timestamp.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from a Vb2V4l2DqbufFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Vb2V4l2DqbufFtraceEvent
             * @static
             * @param {perfetto.protos.Vb2V4l2DqbufFtraceEvent} m Vb2V4l2DqbufFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Vb2V4l2DqbufFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.field = 0;
                    d.flags = 0;
                    d.minor = 0;
                    d.sequence = 0;
                    d.timecodeFlags = 0;
                    d.timecodeFrames = 0;
                    d.timecodeHours = 0;
                    d.timecodeMinutes = 0;
                    d.timecodeSeconds = 0;
                    d.timecodeType = 0;
                    d.timecodeUserbits0 = 0;
                    d.timecodeUserbits1 = 0;
                    d.timecodeUserbits2 = 0;
                    d.timecodeUserbits3 = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.timestamp = o.longs === String ? "0" : 0;
                }
                if (m.field != null && m.hasOwnProperty("field")) {
                    d.field = m.field;
                }
                if (m.flags != null && m.hasOwnProperty("flags")) {
                    d.flags = m.flags;
                }
                if (m.minor != null && m.hasOwnProperty("minor")) {
                    d.minor = m.minor;
                }
                if (m.sequence != null && m.hasOwnProperty("sequence")) {
                    d.sequence = m.sequence;
                }
                if (m.timecodeFlags != null && m.hasOwnProperty("timecodeFlags")) {
                    d.timecodeFlags = m.timecodeFlags;
                }
                if (m.timecodeFrames != null && m.hasOwnProperty("timecodeFrames")) {
                    d.timecodeFrames = m.timecodeFrames;
                }
                if (m.timecodeHours != null && m.hasOwnProperty("timecodeHours")) {
                    d.timecodeHours = m.timecodeHours;
                }
                if (m.timecodeMinutes != null && m.hasOwnProperty("timecodeMinutes")) {
                    d.timecodeMinutes = m.timecodeMinutes;
                }
                if (m.timecodeSeconds != null && m.hasOwnProperty("timecodeSeconds")) {
                    d.timecodeSeconds = m.timecodeSeconds;
                }
                if (m.timecodeType != null && m.hasOwnProperty("timecodeType")) {
                    d.timecodeType = m.timecodeType;
                }
                if (m.timecodeUserbits0 != null && m.hasOwnProperty("timecodeUserbits0")) {
                    d.timecodeUserbits0 = m.timecodeUserbits0;
                }
                if (m.timecodeUserbits1 != null && m.hasOwnProperty("timecodeUserbits1")) {
                    d.timecodeUserbits1 = m.timecodeUserbits1;
                }
                if (m.timecodeUserbits2 != null && m.hasOwnProperty("timecodeUserbits2")) {
                    d.timecodeUserbits2 = m.timecodeUserbits2;
                }
                if (m.timecodeUserbits3 != null && m.hasOwnProperty("timecodeUserbits3")) {
                    d.timecodeUserbits3 = m.timecodeUserbits3;
                }
                if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                    if (typeof m.timestamp === "number")
                        d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp;
                    else
                        d.timestamp = o.longs === String ? $util.Long.prototype.toString.call(m.timestamp) : o.longs === Number ? new $util.LongBits(m.timestamp.low >>> 0, m.timestamp.high >>> 0).toNumber() : m.timestamp;
                }
                return d;
            };

            /**
             * Converts this Vb2V4l2DqbufFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Vb2V4l2DqbufFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Vb2V4l2DqbufFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Vb2V4l2DqbufFtraceEvent;
        })();

        protos.VirtioVideoCmdFtraceEvent = (function() {

            /**
             * Properties of a VirtioVideoCmdFtraceEvent.
             * @memberof perfetto.protos
             * @interface IVirtioVideoCmdFtraceEvent
             * @property {number|null} [streamId] VirtioVideoCmdFtraceEvent streamId
             * @property {number|null} [type] VirtioVideoCmdFtraceEvent type
             */

            /**
             * Constructs a new VirtioVideoCmdFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a VirtioVideoCmdFtraceEvent.
             * @implements IVirtioVideoCmdFtraceEvent
             * @constructor
             * @param {perfetto.protos.IVirtioVideoCmdFtraceEvent=} [p] Properties to set
             */
            function VirtioVideoCmdFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * VirtioVideoCmdFtraceEvent streamId.
             * @member {number} streamId
             * @memberof perfetto.protos.VirtioVideoCmdFtraceEvent
             * @instance
             */
            VirtioVideoCmdFtraceEvent.prototype.streamId = 0;

            /**
             * VirtioVideoCmdFtraceEvent type.
             * @member {number} type
             * @memberof perfetto.protos.VirtioVideoCmdFtraceEvent
             * @instance
             */
            VirtioVideoCmdFtraceEvent.prototype.type = 0;

            /**
             * Creates a new VirtioVideoCmdFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.VirtioVideoCmdFtraceEvent
             * @static
             * @param {perfetto.protos.IVirtioVideoCmdFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.VirtioVideoCmdFtraceEvent} VirtioVideoCmdFtraceEvent instance
             */
            VirtioVideoCmdFtraceEvent.create = function create(properties) {
                return new VirtioVideoCmdFtraceEvent(properties);
            };

            /**
             * Encodes the specified VirtioVideoCmdFtraceEvent message. Does not implicitly {@link perfetto.protos.VirtioVideoCmdFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.VirtioVideoCmdFtraceEvent
             * @static
             * @param {perfetto.protos.IVirtioVideoCmdFtraceEvent} m VirtioVideoCmdFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            VirtioVideoCmdFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.streamId != null && Object.hasOwnProperty.call(m, "streamId"))
                    w.uint32(8).uint32(m.streamId);
                if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                    w.uint32(16).uint32(m.type);
                return w;
            };

            /**
             * Encodes the specified VirtioVideoCmdFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.VirtioVideoCmdFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.VirtioVideoCmdFtraceEvent
             * @static
             * @param {perfetto.protos.IVirtioVideoCmdFtraceEvent} message VirtioVideoCmdFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            VirtioVideoCmdFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a VirtioVideoCmdFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.VirtioVideoCmdFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.VirtioVideoCmdFtraceEvent} VirtioVideoCmdFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            VirtioVideoCmdFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.VirtioVideoCmdFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.streamId = r.uint32();
                        break;
                    case 2:
                        m.type = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a VirtioVideoCmdFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.VirtioVideoCmdFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.VirtioVideoCmdFtraceEvent} VirtioVideoCmdFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            VirtioVideoCmdFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a VirtioVideoCmdFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.VirtioVideoCmdFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            VirtioVideoCmdFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.streamId != null && m.hasOwnProperty("streamId")) {
                    if (!$util.isInteger(m.streamId))
                        return "streamId: integer expected";
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    if (!$util.isInteger(m.type))
                        return "type: integer expected";
                }
                return null;
            };

            /**
             * Creates a VirtioVideoCmdFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.VirtioVideoCmdFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.VirtioVideoCmdFtraceEvent} VirtioVideoCmdFtraceEvent
             */
            VirtioVideoCmdFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.VirtioVideoCmdFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.VirtioVideoCmdFtraceEvent();
                if (d.streamId != null) {
                    m.streamId = d.streamId >>> 0;
                }
                if (d.type != null) {
                    m.type = d.type >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a VirtioVideoCmdFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.VirtioVideoCmdFtraceEvent
             * @static
             * @param {perfetto.protos.VirtioVideoCmdFtraceEvent} m VirtioVideoCmdFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            VirtioVideoCmdFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.streamId = 0;
                    d.type = 0;
                }
                if (m.streamId != null && m.hasOwnProperty("streamId")) {
                    d.streamId = m.streamId;
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    d.type = m.type;
                }
                return d;
            };

            /**
             * Converts this VirtioVideoCmdFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.VirtioVideoCmdFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            VirtioVideoCmdFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return VirtioVideoCmdFtraceEvent;
        })();

        protos.VirtioVideoCmdDoneFtraceEvent = (function() {

            /**
             * Properties of a VirtioVideoCmdDoneFtraceEvent.
             * @memberof perfetto.protos
             * @interface IVirtioVideoCmdDoneFtraceEvent
             * @property {number|null} [streamId] VirtioVideoCmdDoneFtraceEvent streamId
             * @property {number|null} [type] VirtioVideoCmdDoneFtraceEvent type
             */

            /**
             * Constructs a new VirtioVideoCmdDoneFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a VirtioVideoCmdDoneFtraceEvent.
             * @implements IVirtioVideoCmdDoneFtraceEvent
             * @constructor
             * @param {perfetto.protos.IVirtioVideoCmdDoneFtraceEvent=} [p] Properties to set
             */
            function VirtioVideoCmdDoneFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * VirtioVideoCmdDoneFtraceEvent streamId.
             * @member {number} streamId
             * @memberof perfetto.protos.VirtioVideoCmdDoneFtraceEvent
             * @instance
             */
            VirtioVideoCmdDoneFtraceEvent.prototype.streamId = 0;

            /**
             * VirtioVideoCmdDoneFtraceEvent type.
             * @member {number} type
             * @memberof perfetto.protos.VirtioVideoCmdDoneFtraceEvent
             * @instance
             */
            VirtioVideoCmdDoneFtraceEvent.prototype.type = 0;

            /**
             * Creates a new VirtioVideoCmdDoneFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.VirtioVideoCmdDoneFtraceEvent
             * @static
             * @param {perfetto.protos.IVirtioVideoCmdDoneFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.VirtioVideoCmdDoneFtraceEvent} VirtioVideoCmdDoneFtraceEvent instance
             */
            VirtioVideoCmdDoneFtraceEvent.create = function create(properties) {
                return new VirtioVideoCmdDoneFtraceEvent(properties);
            };

            /**
             * Encodes the specified VirtioVideoCmdDoneFtraceEvent message. Does not implicitly {@link perfetto.protos.VirtioVideoCmdDoneFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.VirtioVideoCmdDoneFtraceEvent
             * @static
             * @param {perfetto.protos.IVirtioVideoCmdDoneFtraceEvent} m VirtioVideoCmdDoneFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            VirtioVideoCmdDoneFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.streamId != null && Object.hasOwnProperty.call(m, "streamId"))
                    w.uint32(8).uint32(m.streamId);
                if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                    w.uint32(16).uint32(m.type);
                return w;
            };

            /**
             * Encodes the specified VirtioVideoCmdDoneFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.VirtioVideoCmdDoneFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.VirtioVideoCmdDoneFtraceEvent
             * @static
             * @param {perfetto.protos.IVirtioVideoCmdDoneFtraceEvent} message VirtioVideoCmdDoneFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            VirtioVideoCmdDoneFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a VirtioVideoCmdDoneFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.VirtioVideoCmdDoneFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.VirtioVideoCmdDoneFtraceEvent} VirtioVideoCmdDoneFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            VirtioVideoCmdDoneFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.VirtioVideoCmdDoneFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.streamId = r.uint32();
                        break;
                    case 2:
                        m.type = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a VirtioVideoCmdDoneFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.VirtioVideoCmdDoneFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.VirtioVideoCmdDoneFtraceEvent} VirtioVideoCmdDoneFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            VirtioVideoCmdDoneFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a VirtioVideoCmdDoneFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.VirtioVideoCmdDoneFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            VirtioVideoCmdDoneFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.streamId != null && m.hasOwnProperty("streamId")) {
                    if (!$util.isInteger(m.streamId))
                        return "streamId: integer expected";
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    if (!$util.isInteger(m.type))
                        return "type: integer expected";
                }
                return null;
            };

            /**
             * Creates a VirtioVideoCmdDoneFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.VirtioVideoCmdDoneFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.VirtioVideoCmdDoneFtraceEvent} VirtioVideoCmdDoneFtraceEvent
             */
            VirtioVideoCmdDoneFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.VirtioVideoCmdDoneFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.VirtioVideoCmdDoneFtraceEvent();
                if (d.streamId != null) {
                    m.streamId = d.streamId >>> 0;
                }
                if (d.type != null) {
                    m.type = d.type >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a VirtioVideoCmdDoneFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.VirtioVideoCmdDoneFtraceEvent
             * @static
             * @param {perfetto.protos.VirtioVideoCmdDoneFtraceEvent} m VirtioVideoCmdDoneFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            VirtioVideoCmdDoneFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.streamId = 0;
                    d.type = 0;
                }
                if (m.streamId != null && m.hasOwnProperty("streamId")) {
                    d.streamId = m.streamId;
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    d.type = m.type;
                }
                return d;
            };

            /**
             * Converts this VirtioVideoCmdDoneFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.VirtioVideoCmdDoneFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            VirtioVideoCmdDoneFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return VirtioVideoCmdDoneFtraceEvent;
        })();

        protos.VirtioVideoResourceQueueFtraceEvent = (function() {

            /**
             * Properties of a VirtioVideoResourceQueueFtraceEvent.
             * @memberof perfetto.protos
             * @interface IVirtioVideoResourceQueueFtraceEvent
             * @property {number|null} [dataSize0] VirtioVideoResourceQueueFtraceEvent dataSize0
             * @property {number|null} [dataSize1] VirtioVideoResourceQueueFtraceEvent dataSize1
             * @property {number|null} [dataSize2] VirtioVideoResourceQueueFtraceEvent dataSize2
             * @property {number|null} [dataSize3] VirtioVideoResourceQueueFtraceEvent dataSize3
             * @property {number|null} [queueType] VirtioVideoResourceQueueFtraceEvent queueType
             * @property {number|null} [resourceId] VirtioVideoResourceQueueFtraceEvent resourceId
             * @property {number|null} [streamId] VirtioVideoResourceQueueFtraceEvent streamId
             * @property {number|null} [timestamp] VirtioVideoResourceQueueFtraceEvent timestamp
             */

            /**
             * Constructs a new VirtioVideoResourceQueueFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a VirtioVideoResourceQueueFtraceEvent.
             * @implements IVirtioVideoResourceQueueFtraceEvent
             * @constructor
             * @param {perfetto.protos.IVirtioVideoResourceQueueFtraceEvent=} [p] Properties to set
             */
            function VirtioVideoResourceQueueFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * VirtioVideoResourceQueueFtraceEvent dataSize0.
             * @member {number} dataSize0
             * @memberof perfetto.protos.VirtioVideoResourceQueueFtraceEvent
             * @instance
             */
            VirtioVideoResourceQueueFtraceEvent.prototype.dataSize0 = 0;

            /**
             * VirtioVideoResourceQueueFtraceEvent dataSize1.
             * @member {number} dataSize1
             * @memberof perfetto.protos.VirtioVideoResourceQueueFtraceEvent
             * @instance
             */
            VirtioVideoResourceQueueFtraceEvent.prototype.dataSize1 = 0;

            /**
             * VirtioVideoResourceQueueFtraceEvent dataSize2.
             * @member {number} dataSize2
             * @memberof perfetto.protos.VirtioVideoResourceQueueFtraceEvent
             * @instance
             */
            VirtioVideoResourceQueueFtraceEvent.prototype.dataSize2 = 0;

            /**
             * VirtioVideoResourceQueueFtraceEvent dataSize3.
             * @member {number} dataSize3
             * @memberof perfetto.protos.VirtioVideoResourceQueueFtraceEvent
             * @instance
             */
            VirtioVideoResourceQueueFtraceEvent.prototype.dataSize3 = 0;

            /**
             * VirtioVideoResourceQueueFtraceEvent queueType.
             * @member {number} queueType
             * @memberof perfetto.protos.VirtioVideoResourceQueueFtraceEvent
             * @instance
             */
            VirtioVideoResourceQueueFtraceEvent.prototype.queueType = 0;

            /**
             * VirtioVideoResourceQueueFtraceEvent resourceId.
             * @member {number} resourceId
             * @memberof perfetto.protos.VirtioVideoResourceQueueFtraceEvent
             * @instance
             */
            VirtioVideoResourceQueueFtraceEvent.prototype.resourceId = 0;

            /**
             * VirtioVideoResourceQueueFtraceEvent streamId.
             * @member {number} streamId
             * @memberof perfetto.protos.VirtioVideoResourceQueueFtraceEvent
             * @instance
             */
            VirtioVideoResourceQueueFtraceEvent.prototype.streamId = 0;

            /**
             * VirtioVideoResourceQueueFtraceEvent timestamp.
             * @member {number} timestamp
             * @memberof perfetto.protos.VirtioVideoResourceQueueFtraceEvent
             * @instance
             */
            VirtioVideoResourceQueueFtraceEvent.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new VirtioVideoResourceQueueFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.VirtioVideoResourceQueueFtraceEvent
             * @static
             * @param {perfetto.protos.IVirtioVideoResourceQueueFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.VirtioVideoResourceQueueFtraceEvent} VirtioVideoResourceQueueFtraceEvent instance
             */
            VirtioVideoResourceQueueFtraceEvent.create = function create(properties) {
                return new VirtioVideoResourceQueueFtraceEvent(properties);
            };

            /**
             * Encodes the specified VirtioVideoResourceQueueFtraceEvent message. Does not implicitly {@link perfetto.protos.VirtioVideoResourceQueueFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.VirtioVideoResourceQueueFtraceEvent
             * @static
             * @param {perfetto.protos.IVirtioVideoResourceQueueFtraceEvent} m VirtioVideoResourceQueueFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            VirtioVideoResourceQueueFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dataSize0 != null && Object.hasOwnProperty.call(m, "dataSize0"))
                    w.uint32(8).uint32(m.dataSize0);
                if (m.dataSize1 != null && Object.hasOwnProperty.call(m, "dataSize1"))
                    w.uint32(16).uint32(m.dataSize1);
                if (m.dataSize2 != null && Object.hasOwnProperty.call(m, "dataSize2"))
                    w.uint32(24).uint32(m.dataSize2);
                if (m.dataSize3 != null && Object.hasOwnProperty.call(m, "dataSize3"))
                    w.uint32(32).uint32(m.dataSize3);
                if (m.queueType != null && Object.hasOwnProperty.call(m, "queueType"))
                    w.uint32(40).uint32(m.queueType);
                if (m.resourceId != null && Object.hasOwnProperty.call(m, "resourceId"))
                    w.uint32(48).int32(m.resourceId);
                if (m.streamId != null && Object.hasOwnProperty.call(m, "streamId"))
                    w.uint32(56).int32(m.streamId);
                if (m.timestamp != null && Object.hasOwnProperty.call(m, "timestamp"))
                    w.uint32(64).uint64(m.timestamp);
                return w;
            };

            /**
             * Encodes the specified VirtioVideoResourceQueueFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.VirtioVideoResourceQueueFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.VirtioVideoResourceQueueFtraceEvent
             * @static
             * @param {perfetto.protos.IVirtioVideoResourceQueueFtraceEvent} message VirtioVideoResourceQueueFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            VirtioVideoResourceQueueFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a VirtioVideoResourceQueueFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.VirtioVideoResourceQueueFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.VirtioVideoResourceQueueFtraceEvent} VirtioVideoResourceQueueFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            VirtioVideoResourceQueueFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.VirtioVideoResourceQueueFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dataSize0 = r.uint32();
                        break;
                    case 2:
                        m.dataSize1 = r.uint32();
                        break;
                    case 3:
                        m.dataSize2 = r.uint32();
                        break;
                    case 4:
                        m.dataSize3 = r.uint32();
                        break;
                    case 5:
                        m.queueType = r.uint32();
                        break;
                    case 6:
                        m.resourceId = r.int32();
                        break;
                    case 7:
                        m.streamId = r.int32();
                        break;
                    case 8:
                        m.timestamp = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a VirtioVideoResourceQueueFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.VirtioVideoResourceQueueFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.VirtioVideoResourceQueueFtraceEvent} VirtioVideoResourceQueueFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            VirtioVideoResourceQueueFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a VirtioVideoResourceQueueFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.VirtioVideoResourceQueueFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            VirtioVideoResourceQueueFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dataSize0 != null && m.hasOwnProperty("dataSize0")) {
                    if (!$util.isInteger(m.dataSize0))
                        return "dataSize0: integer expected";
                }
                if (m.dataSize1 != null && m.hasOwnProperty("dataSize1")) {
                    if (!$util.isInteger(m.dataSize1))
                        return "dataSize1: integer expected";
                }
                if (m.dataSize2 != null && m.hasOwnProperty("dataSize2")) {
                    if (!$util.isInteger(m.dataSize2))
                        return "dataSize2: integer expected";
                }
                if (m.dataSize3 != null && m.hasOwnProperty("dataSize3")) {
                    if (!$util.isInteger(m.dataSize3))
                        return "dataSize3: integer expected";
                }
                if (m.queueType != null && m.hasOwnProperty("queueType")) {
                    if (!$util.isInteger(m.queueType))
                        return "queueType: integer expected";
                }
                if (m.resourceId != null && m.hasOwnProperty("resourceId")) {
                    if (!$util.isInteger(m.resourceId))
                        return "resourceId: integer expected";
                }
                if (m.streamId != null && m.hasOwnProperty("streamId")) {
                    if (!$util.isInteger(m.streamId))
                        return "streamId: integer expected";
                }
                if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                    if (!$util.isInteger(m.timestamp) && !(m.timestamp && $util.isInteger(m.timestamp.low) && $util.isInteger(m.timestamp.high)))
                        return "timestamp: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a VirtioVideoResourceQueueFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.VirtioVideoResourceQueueFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.VirtioVideoResourceQueueFtraceEvent} VirtioVideoResourceQueueFtraceEvent
             */
            VirtioVideoResourceQueueFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.VirtioVideoResourceQueueFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.VirtioVideoResourceQueueFtraceEvent();
                if (d.dataSize0 != null) {
                    m.dataSize0 = d.dataSize0 >>> 0;
                }
                if (d.dataSize1 != null) {
                    m.dataSize1 = d.dataSize1 >>> 0;
                }
                if (d.dataSize2 != null) {
                    m.dataSize2 = d.dataSize2 >>> 0;
                }
                if (d.dataSize3 != null) {
                    m.dataSize3 = d.dataSize3 >>> 0;
                }
                if (d.queueType != null) {
                    m.queueType = d.queueType >>> 0;
                }
                if (d.resourceId != null) {
                    m.resourceId = d.resourceId | 0;
                }
                if (d.streamId != null) {
                    m.streamId = d.streamId | 0;
                }
                if (d.timestamp != null) {
                    if ($util.Long)
                        (m.timestamp = $util.Long.fromValue(d.timestamp)).unsigned = true;
                    else if (typeof d.timestamp === "string")
                        m.timestamp = parseInt(d.timestamp, 10);
                    else if (typeof d.timestamp === "number")
                        m.timestamp = d.timestamp;
                    else if (typeof d.timestamp === "object")
                        m.timestamp = new $util.LongBits(d.timestamp.low >>> 0, d.timestamp.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a VirtioVideoResourceQueueFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.VirtioVideoResourceQueueFtraceEvent
             * @static
             * @param {perfetto.protos.VirtioVideoResourceQueueFtraceEvent} m VirtioVideoResourceQueueFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            VirtioVideoResourceQueueFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.dataSize0 = 0;
                    d.dataSize1 = 0;
                    d.dataSize2 = 0;
                    d.dataSize3 = 0;
                    d.queueType = 0;
                    d.resourceId = 0;
                    d.streamId = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.timestamp = o.longs === String ? "0" : 0;
                }
                if (m.dataSize0 != null && m.hasOwnProperty("dataSize0")) {
                    d.dataSize0 = m.dataSize0;
                }
                if (m.dataSize1 != null && m.hasOwnProperty("dataSize1")) {
                    d.dataSize1 = m.dataSize1;
                }
                if (m.dataSize2 != null && m.hasOwnProperty("dataSize2")) {
                    d.dataSize2 = m.dataSize2;
                }
                if (m.dataSize3 != null && m.hasOwnProperty("dataSize3")) {
                    d.dataSize3 = m.dataSize3;
                }
                if (m.queueType != null && m.hasOwnProperty("queueType")) {
                    d.queueType = m.queueType;
                }
                if (m.resourceId != null && m.hasOwnProperty("resourceId")) {
                    d.resourceId = m.resourceId;
                }
                if (m.streamId != null && m.hasOwnProperty("streamId")) {
                    d.streamId = m.streamId;
                }
                if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                    if (typeof m.timestamp === "number")
                        d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp;
                    else
                        d.timestamp = o.longs === String ? $util.Long.prototype.toString.call(m.timestamp) : o.longs === Number ? new $util.LongBits(m.timestamp.low >>> 0, m.timestamp.high >>> 0).toNumber(true) : m.timestamp;
                }
                return d;
            };

            /**
             * Converts this VirtioVideoResourceQueueFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.VirtioVideoResourceQueueFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            VirtioVideoResourceQueueFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return VirtioVideoResourceQueueFtraceEvent;
        })();

        protos.VirtioVideoResourceQueueDoneFtraceEvent = (function() {

            /**
             * Properties of a VirtioVideoResourceQueueDoneFtraceEvent.
             * @memberof perfetto.protos
             * @interface IVirtioVideoResourceQueueDoneFtraceEvent
             * @property {number|null} [dataSize0] VirtioVideoResourceQueueDoneFtraceEvent dataSize0
             * @property {number|null} [dataSize1] VirtioVideoResourceQueueDoneFtraceEvent dataSize1
             * @property {number|null} [dataSize2] VirtioVideoResourceQueueDoneFtraceEvent dataSize2
             * @property {number|null} [dataSize3] VirtioVideoResourceQueueDoneFtraceEvent dataSize3
             * @property {number|null} [queueType] VirtioVideoResourceQueueDoneFtraceEvent queueType
             * @property {number|null} [resourceId] VirtioVideoResourceQueueDoneFtraceEvent resourceId
             * @property {number|null} [streamId] VirtioVideoResourceQueueDoneFtraceEvent streamId
             * @property {number|null} [timestamp] VirtioVideoResourceQueueDoneFtraceEvent timestamp
             */

            /**
             * Constructs a new VirtioVideoResourceQueueDoneFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a VirtioVideoResourceQueueDoneFtraceEvent.
             * @implements IVirtioVideoResourceQueueDoneFtraceEvent
             * @constructor
             * @param {perfetto.protos.IVirtioVideoResourceQueueDoneFtraceEvent=} [p] Properties to set
             */
            function VirtioVideoResourceQueueDoneFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * VirtioVideoResourceQueueDoneFtraceEvent dataSize0.
             * @member {number} dataSize0
             * @memberof perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent
             * @instance
             */
            VirtioVideoResourceQueueDoneFtraceEvent.prototype.dataSize0 = 0;

            /**
             * VirtioVideoResourceQueueDoneFtraceEvent dataSize1.
             * @member {number} dataSize1
             * @memberof perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent
             * @instance
             */
            VirtioVideoResourceQueueDoneFtraceEvent.prototype.dataSize1 = 0;

            /**
             * VirtioVideoResourceQueueDoneFtraceEvent dataSize2.
             * @member {number} dataSize2
             * @memberof perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent
             * @instance
             */
            VirtioVideoResourceQueueDoneFtraceEvent.prototype.dataSize2 = 0;

            /**
             * VirtioVideoResourceQueueDoneFtraceEvent dataSize3.
             * @member {number} dataSize3
             * @memberof perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent
             * @instance
             */
            VirtioVideoResourceQueueDoneFtraceEvent.prototype.dataSize3 = 0;

            /**
             * VirtioVideoResourceQueueDoneFtraceEvent queueType.
             * @member {number} queueType
             * @memberof perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent
             * @instance
             */
            VirtioVideoResourceQueueDoneFtraceEvent.prototype.queueType = 0;

            /**
             * VirtioVideoResourceQueueDoneFtraceEvent resourceId.
             * @member {number} resourceId
             * @memberof perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent
             * @instance
             */
            VirtioVideoResourceQueueDoneFtraceEvent.prototype.resourceId = 0;

            /**
             * VirtioVideoResourceQueueDoneFtraceEvent streamId.
             * @member {number} streamId
             * @memberof perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent
             * @instance
             */
            VirtioVideoResourceQueueDoneFtraceEvent.prototype.streamId = 0;

            /**
             * VirtioVideoResourceQueueDoneFtraceEvent timestamp.
             * @member {number} timestamp
             * @memberof perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent
             * @instance
             */
            VirtioVideoResourceQueueDoneFtraceEvent.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new VirtioVideoResourceQueueDoneFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent
             * @static
             * @param {perfetto.protos.IVirtioVideoResourceQueueDoneFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent} VirtioVideoResourceQueueDoneFtraceEvent instance
             */
            VirtioVideoResourceQueueDoneFtraceEvent.create = function create(properties) {
                return new VirtioVideoResourceQueueDoneFtraceEvent(properties);
            };

            /**
             * Encodes the specified VirtioVideoResourceQueueDoneFtraceEvent message. Does not implicitly {@link perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent
             * @static
             * @param {perfetto.protos.IVirtioVideoResourceQueueDoneFtraceEvent} m VirtioVideoResourceQueueDoneFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            VirtioVideoResourceQueueDoneFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dataSize0 != null && Object.hasOwnProperty.call(m, "dataSize0"))
                    w.uint32(8).uint32(m.dataSize0);
                if (m.dataSize1 != null && Object.hasOwnProperty.call(m, "dataSize1"))
                    w.uint32(16).uint32(m.dataSize1);
                if (m.dataSize2 != null && Object.hasOwnProperty.call(m, "dataSize2"))
                    w.uint32(24).uint32(m.dataSize2);
                if (m.dataSize3 != null && Object.hasOwnProperty.call(m, "dataSize3"))
                    w.uint32(32).uint32(m.dataSize3);
                if (m.queueType != null && Object.hasOwnProperty.call(m, "queueType"))
                    w.uint32(40).uint32(m.queueType);
                if (m.resourceId != null && Object.hasOwnProperty.call(m, "resourceId"))
                    w.uint32(48).int32(m.resourceId);
                if (m.streamId != null && Object.hasOwnProperty.call(m, "streamId"))
                    w.uint32(56).int32(m.streamId);
                if (m.timestamp != null && Object.hasOwnProperty.call(m, "timestamp"))
                    w.uint32(64).uint64(m.timestamp);
                return w;
            };

            /**
             * Encodes the specified VirtioVideoResourceQueueDoneFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent
             * @static
             * @param {perfetto.protos.IVirtioVideoResourceQueueDoneFtraceEvent} message VirtioVideoResourceQueueDoneFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            VirtioVideoResourceQueueDoneFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a VirtioVideoResourceQueueDoneFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent} VirtioVideoResourceQueueDoneFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            VirtioVideoResourceQueueDoneFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dataSize0 = r.uint32();
                        break;
                    case 2:
                        m.dataSize1 = r.uint32();
                        break;
                    case 3:
                        m.dataSize2 = r.uint32();
                        break;
                    case 4:
                        m.dataSize3 = r.uint32();
                        break;
                    case 5:
                        m.queueType = r.uint32();
                        break;
                    case 6:
                        m.resourceId = r.int32();
                        break;
                    case 7:
                        m.streamId = r.int32();
                        break;
                    case 8:
                        m.timestamp = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a VirtioVideoResourceQueueDoneFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent} VirtioVideoResourceQueueDoneFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            VirtioVideoResourceQueueDoneFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a VirtioVideoResourceQueueDoneFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            VirtioVideoResourceQueueDoneFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dataSize0 != null && m.hasOwnProperty("dataSize0")) {
                    if (!$util.isInteger(m.dataSize0))
                        return "dataSize0: integer expected";
                }
                if (m.dataSize1 != null && m.hasOwnProperty("dataSize1")) {
                    if (!$util.isInteger(m.dataSize1))
                        return "dataSize1: integer expected";
                }
                if (m.dataSize2 != null && m.hasOwnProperty("dataSize2")) {
                    if (!$util.isInteger(m.dataSize2))
                        return "dataSize2: integer expected";
                }
                if (m.dataSize3 != null && m.hasOwnProperty("dataSize3")) {
                    if (!$util.isInteger(m.dataSize3))
                        return "dataSize3: integer expected";
                }
                if (m.queueType != null && m.hasOwnProperty("queueType")) {
                    if (!$util.isInteger(m.queueType))
                        return "queueType: integer expected";
                }
                if (m.resourceId != null && m.hasOwnProperty("resourceId")) {
                    if (!$util.isInteger(m.resourceId))
                        return "resourceId: integer expected";
                }
                if (m.streamId != null && m.hasOwnProperty("streamId")) {
                    if (!$util.isInteger(m.streamId))
                        return "streamId: integer expected";
                }
                if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                    if (!$util.isInteger(m.timestamp) && !(m.timestamp && $util.isInteger(m.timestamp.low) && $util.isInteger(m.timestamp.high)))
                        return "timestamp: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a VirtioVideoResourceQueueDoneFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent} VirtioVideoResourceQueueDoneFtraceEvent
             */
            VirtioVideoResourceQueueDoneFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent();
                if (d.dataSize0 != null) {
                    m.dataSize0 = d.dataSize0 >>> 0;
                }
                if (d.dataSize1 != null) {
                    m.dataSize1 = d.dataSize1 >>> 0;
                }
                if (d.dataSize2 != null) {
                    m.dataSize2 = d.dataSize2 >>> 0;
                }
                if (d.dataSize3 != null) {
                    m.dataSize3 = d.dataSize3 >>> 0;
                }
                if (d.queueType != null) {
                    m.queueType = d.queueType >>> 0;
                }
                if (d.resourceId != null) {
                    m.resourceId = d.resourceId | 0;
                }
                if (d.streamId != null) {
                    m.streamId = d.streamId | 0;
                }
                if (d.timestamp != null) {
                    if ($util.Long)
                        (m.timestamp = $util.Long.fromValue(d.timestamp)).unsigned = true;
                    else if (typeof d.timestamp === "string")
                        m.timestamp = parseInt(d.timestamp, 10);
                    else if (typeof d.timestamp === "number")
                        m.timestamp = d.timestamp;
                    else if (typeof d.timestamp === "object")
                        m.timestamp = new $util.LongBits(d.timestamp.low >>> 0, d.timestamp.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a VirtioVideoResourceQueueDoneFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent
             * @static
             * @param {perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent} m VirtioVideoResourceQueueDoneFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            VirtioVideoResourceQueueDoneFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.dataSize0 = 0;
                    d.dataSize1 = 0;
                    d.dataSize2 = 0;
                    d.dataSize3 = 0;
                    d.queueType = 0;
                    d.resourceId = 0;
                    d.streamId = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.timestamp = o.longs === String ? "0" : 0;
                }
                if (m.dataSize0 != null && m.hasOwnProperty("dataSize0")) {
                    d.dataSize0 = m.dataSize0;
                }
                if (m.dataSize1 != null && m.hasOwnProperty("dataSize1")) {
                    d.dataSize1 = m.dataSize1;
                }
                if (m.dataSize2 != null && m.hasOwnProperty("dataSize2")) {
                    d.dataSize2 = m.dataSize2;
                }
                if (m.dataSize3 != null && m.hasOwnProperty("dataSize3")) {
                    d.dataSize3 = m.dataSize3;
                }
                if (m.queueType != null && m.hasOwnProperty("queueType")) {
                    d.queueType = m.queueType;
                }
                if (m.resourceId != null && m.hasOwnProperty("resourceId")) {
                    d.resourceId = m.resourceId;
                }
                if (m.streamId != null && m.hasOwnProperty("streamId")) {
                    d.streamId = m.streamId;
                }
                if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                    if (typeof m.timestamp === "number")
                        d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp;
                    else
                        d.timestamp = o.longs === String ? $util.Long.prototype.toString.call(m.timestamp) : o.longs === Number ? new $util.LongBits(m.timestamp.low >>> 0, m.timestamp.high >>> 0).toNumber(true) : m.timestamp;
                }
                return d;
            };

            /**
             * Converts this VirtioVideoResourceQueueDoneFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.VirtioVideoResourceQueueDoneFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            VirtioVideoResourceQueueDoneFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return VirtioVideoResourceQueueDoneFtraceEvent;
        })();

        protos.MmVmscanDirectReclaimBeginFtraceEvent = (function() {

            /**
             * Properties of a MmVmscanDirectReclaimBeginFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmVmscanDirectReclaimBeginFtraceEvent
             * @property {number|null} [order] MmVmscanDirectReclaimBeginFtraceEvent order
             * @property {number|null} [mayWritepage] MmVmscanDirectReclaimBeginFtraceEvent mayWritepage
             * @property {number|null} [gfpFlags] MmVmscanDirectReclaimBeginFtraceEvent gfpFlags
             */

            /**
             * Constructs a new MmVmscanDirectReclaimBeginFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmVmscanDirectReclaimBeginFtraceEvent.
             * @implements IMmVmscanDirectReclaimBeginFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmVmscanDirectReclaimBeginFtraceEvent=} [p] Properties to set
             */
            function MmVmscanDirectReclaimBeginFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmVmscanDirectReclaimBeginFtraceEvent order.
             * @member {number} order
             * @memberof perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent
             * @instance
             */
            MmVmscanDirectReclaimBeginFtraceEvent.prototype.order = 0;

            /**
             * MmVmscanDirectReclaimBeginFtraceEvent mayWritepage.
             * @member {number} mayWritepage
             * @memberof perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent
             * @instance
             */
            MmVmscanDirectReclaimBeginFtraceEvent.prototype.mayWritepage = 0;

            /**
             * MmVmscanDirectReclaimBeginFtraceEvent gfpFlags.
             * @member {number} gfpFlags
             * @memberof perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent
             * @instance
             */
            MmVmscanDirectReclaimBeginFtraceEvent.prototype.gfpFlags = 0;

            /**
             * Creates a new MmVmscanDirectReclaimBeginFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent
             * @static
             * @param {perfetto.protos.IMmVmscanDirectReclaimBeginFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent} MmVmscanDirectReclaimBeginFtraceEvent instance
             */
            MmVmscanDirectReclaimBeginFtraceEvent.create = function create(properties) {
                return new MmVmscanDirectReclaimBeginFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmVmscanDirectReclaimBeginFtraceEvent message. Does not implicitly {@link perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent
             * @static
             * @param {perfetto.protos.IMmVmscanDirectReclaimBeginFtraceEvent} m MmVmscanDirectReclaimBeginFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmVmscanDirectReclaimBeginFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.order != null && Object.hasOwnProperty.call(m, "order"))
                    w.uint32(8).int32(m.order);
                if (m.mayWritepage != null && Object.hasOwnProperty.call(m, "mayWritepage"))
                    w.uint32(16).int32(m.mayWritepage);
                if (m.gfpFlags != null && Object.hasOwnProperty.call(m, "gfpFlags"))
                    w.uint32(24).uint32(m.gfpFlags);
                return w;
            };

            /**
             * Encodes the specified MmVmscanDirectReclaimBeginFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent
             * @static
             * @param {perfetto.protos.IMmVmscanDirectReclaimBeginFtraceEvent} message MmVmscanDirectReclaimBeginFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmVmscanDirectReclaimBeginFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmVmscanDirectReclaimBeginFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent} MmVmscanDirectReclaimBeginFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmVmscanDirectReclaimBeginFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.order = r.int32();
                        break;
                    case 2:
                        m.mayWritepage = r.int32();
                        break;
                    case 3:
                        m.gfpFlags = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmVmscanDirectReclaimBeginFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent} MmVmscanDirectReclaimBeginFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmVmscanDirectReclaimBeginFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmVmscanDirectReclaimBeginFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmVmscanDirectReclaimBeginFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.order != null && m.hasOwnProperty("order")) {
                    if (!$util.isInteger(m.order))
                        return "order: integer expected";
                }
                if (m.mayWritepage != null && m.hasOwnProperty("mayWritepage")) {
                    if (!$util.isInteger(m.mayWritepage))
                        return "mayWritepage: integer expected";
                }
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    if (!$util.isInteger(m.gfpFlags))
                        return "gfpFlags: integer expected";
                }
                return null;
            };

            /**
             * Creates a MmVmscanDirectReclaimBeginFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent} MmVmscanDirectReclaimBeginFtraceEvent
             */
            MmVmscanDirectReclaimBeginFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent();
                if (d.order != null) {
                    m.order = d.order | 0;
                }
                if (d.mayWritepage != null) {
                    m.mayWritepage = d.mayWritepage | 0;
                }
                if (d.gfpFlags != null) {
                    m.gfpFlags = d.gfpFlags >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MmVmscanDirectReclaimBeginFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent
             * @static
             * @param {perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent} m MmVmscanDirectReclaimBeginFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmVmscanDirectReclaimBeginFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.order = 0;
                    d.mayWritepage = 0;
                    d.gfpFlags = 0;
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    d.order = m.order;
                }
                if (m.mayWritepage != null && m.hasOwnProperty("mayWritepage")) {
                    d.mayWritepage = m.mayWritepage;
                }
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    d.gfpFlags = m.gfpFlags;
                }
                return d;
            };

            /**
             * Converts this MmVmscanDirectReclaimBeginFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmVmscanDirectReclaimBeginFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmVmscanDirectReclaimBeginFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmVmscanDirectReclaimBeginFtraceEvent;
        })();

        protos.MmVmscanDirectReclaimEndFtraceEvent = (function() {

            /**
             * Properties of a MmVmscanDirectReclaimEndFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmVmscanDirectReclaimEndFtraceEvent
             * @property {number|null} [nrReclaimed] MmVmscanDirectReclaimEndFtraceEvent nrReclaimed
             */

            /**
             * Constructs a new MmVmscanDirectReclaimEndFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmVmscanDirectReclaimEndFtraceEvent.
             * @implements IMmVmscanDirectReclaimEndFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmVmscanDirectReclaimEndFtraceEvent=} [p] Properties to set
             */
            function MmVmscanDirectReclaimEndFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmVmscanDirectReclaimEndFtraceEvent nrReclaimed.
             * @member {number} nrReclaimed
             * @memberof perfetto.protos.MmVmscanDirectReclaimEndFtraceEvent
             * @instance
             */
            MmVmscanDirectReclaimEndFtraceEvent.prototype.nrReclaimed = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new MmVmscanDirectReclaimEndFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmVmscanDirectReclaimEndFtraceEvent
             * @static
             * @param {perfetto.protos.IMmVmscanDirectReclaimEndFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmVmscanDirectReclaimEndFtraceEvent} MmVmscanDirectReclaimEndFtraceEvent instance
             */
            MmVmscanDirectReclaimEndFtraceEvent.create = function create(properties) {
                return new MmVmscanDirectReclaimEndFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmVmscanDirectReclaimEndFtraceEvent message. Does not implicitly {@link perfetto.protos.MmVmscanDirectReclaimEndFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmVmscanDirectReclaimEndFtraceEvent
             * @static
             * @param {perfetto.protos.IMmVmscanDirectReclaimEndFtraceEvent} m MmVmscanDirectReclaimEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmVmscanDirectReclaimEndFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.nrReclaimed != null && Object.hasOwnProperty.call(m, "nrReclaimed"))
                    w.uint32(8).uint64(m.nrReclaimed);
                return w;
            };

            /**
             * Encodes the specified MmVmscanDirectReclaimEndFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmVmscanDirectReclaimEndFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmVmscanDirectReclaimEndFtraceEvent
             * @static
             * @param {perfetto.protos.IMmVmscanDirectReclaimEndFtraceEvent} message MmVmscanDirectReclaimEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmVmscanDirectReclaimEndFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmVmscanDirectReclaimEndFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmVmscanDirectReclaimEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmVmscanDirectReclaimEndFtraceEvent} MmVmscanDirectReclaimEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmVmscanDirectReclaimEndFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmVmscanDirectReclaimEndFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.nrReclaimed = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmVmscanDirectReclaimEndFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmVmscanDirectReclaimEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmVmscanDirectReclaimEndFtraceEvent} MmVmscanDirectReclaimEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmVmscanDirectReclaimEndFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmVmscanDirectReclaimEndFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmVmscanDirectReclaimEndFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmVmscanDirectReclaimEndFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.nrReclaimed != null && m.hasOwnProperty("nrReclaimed")) {
                    if (!$util.isInteger(m.nrReclaimed) && !(m.nrReclaimed && $util.isInteger(m.nrReclaimed.low) && $util.isInteger(m.nrReclaimed.high)))
                        return "nrReclaimed: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a MmVmscanDirectReclaimEndFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmVmscanDirectReclaimEndFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmVmscanDirectReclaimEndFtraceEvent} MmVmscanDirectReclaimEndFtraceEvent
             */
            MmVmscanDirectReclaimEndFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmVmscanDirectReclaimEndFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmVmscanDirectReclaimEndFtraceEvent();
                if (d.nrReclaimed != null) {
                    if ($util.Long)
                        (m.nrReclaimed = $util.Long.fromValue(d.nrReclaimed)).unsigned = true;
                    else if (typeof d.nrReclaimed === "string")
                        m.nrReclaimed = parseInt(d.nrReclaimed, 10);
                    else if (typeof d.nrReclaimed === "number")
                        m.nrReclaimed = d.nrReclaimed;
                    else if (typeof d.nrReclaimed === "object")
                        m.nrReclaimed = new $util.LongBits(d.nrReclaimed.low >>> 0, d.nrReclaimed.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a MmVmscanDirectReclaimEndFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmVmscanDirectReclaimEndFtraceEvent
             * @static
             * @param {perfetto.protos.MmVmscanDirectReclaimEndFtraceEvent} m MmVmscanDirectReclaimEndFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmVmscanDirectReclaimEndFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.nrReclaimed = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.nrReclaimed = o.longs === String ? "0" : 0;
                }
                if (m.nrReclaimed != null && m.hasOwnProperty("nrReclaimed")) {
                    if (typeof m.nrReclaimed === "number")
                        d.nrReclaimed = o.longs === String ? String(m.nrReclaimed) : m.nrReclaimed;
                    else
                        d.nrReclaimed = o.longs === String ? $util.Long.prototype.toString.call(m.nrReclaimed) : o.longs === Number ? new $util.LongBits(m.nrReclaimed.low >>> 0, m.nrReclaimed.high >>> 0).toNumber(true) : m.nrReclaimed;
                }
                return d;
            };

            /**
             * Converts this MmVmscanDirectReclaimEndFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmVmscanDirectReclaimEndFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmVmscanDirectReclaimEndFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmVmscanDirectReclaimEndFtraceEvent;
        })();

        protos.MmVmscanKswapdWakeFtraceEvent = (function() {

            /**
             * Properties of a MmVmscanKswapdWakeFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmVmscanKswapdWakeFtraceEvent
             * @property {number|null} [nid] MmVmscanKswapdWakeFtraceEvent nid
             * @property {number|null} [order] MmVmscanKswapdWakeFtraceEvent order
             * @property {number|null} [zid] MmVmscanKswapdWakeFtraceEvent zid
             */

            /**
             * Constructs a new MmVmscanKswapdWakeFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmVmscanKswapdWakeFtraceEvent.
             * @implements IMmVmscanKswapdWakeFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmVmscanKswapdWakeFtraceEvent=} [p] Properties to set
             */
            function MmVmscanKswapdWakeFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmVmscanKswapdWakeFtraceEvent nid.
             * @member {number} nid
             * @memberof perfetto.protos.MmVmscanKswapdWakeFtraceEvent
             * @instance
             */
            MmVmscanKswapdWakeFtraceEvent.prototype.nid = 0;

            /**
             * MmVmscanKswapdWakeFtraceEvent order.
             * @member {number} order
             * @memberof perfetto.protos.MmVmscanKswapdWakeFtraceEvent
             * @instance
             */
            MmVmscanKswapdWakeFtraceEvent.prototype.order = 0;

            /**
             * MmVmscanKswapdWakeFtraceEvent zid.
             * @member {number} zid
             * @memberof perfetto.protos.MmVmscanKswapdWakeFtraceEvent
             * @instance
             */
            MmVmscanKswapdWakeFtraceEvent.prototype.zid = 0;

            /**
             * Creates a new MmVmscanKswapdWakeFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmVmscanKswapdWakeFtraceEvent
             * @static
             * @param {perfetto.protos.IMmVmscanKswapdWakeFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmVmscanKswapdWakeFtraceEvent} MmVmscanKswapdWakeFtraceEvent instance
             */
            MmVmscanKswapdWakeFtraceEvent.create = function create(properties) {
                return new MmVmscanKswapdWakeFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmVmscanKswapdWakeFtraceEvent message. Does not implicitly {@link perfetto.protos.MmVmscanKswapdWakeFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmVmscanKswapdWakeFtraceEvent
             * @static
             * @param {perfetto.protos.IMmVmscanKswapdWakeFtraceEvent} m MmVmscanKswapdWakeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmVmscanKswapdWakeFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.nid != null && Object.hasOwnProperty.call(m, "nid"))
                    w.uint32(8).int32(m.nid);
                if (m.order != null && Object.hasOwnProperty.call(m, "order"))
                    w.uint32(16).int32(m.order);
                if (m.zid != null && Object.hasOwnProperty.call(m, "zid"))
                    w.uint32(24).int32(m.zid);
                return w;
            };

            /**
             * Encodes the specified MmVmscanKswapdWakeFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmVmscanKswapdWakeFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmVmscanKswapdWakeFtraceEvent
             * @static
             * @param {perfetto.protos.IMmVmscanKswapdWakeFtraceEvent} message MmVmscanKswapdWakeFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmVmscanKswapdWakeFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmVmscanKswapdWakeFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmVmscanKswapdWakeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmVmscanKswapdWakeFtraceEvent} MmVmscanKswapdWakeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmVmscanKswapdWakeFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmVmscanKswapdWakeFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.nid = r.int32();
                        break;
                    case 2:
                        m.order = r.int32();
                        break;
                    case 3:
                        m.zid = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmVmscanKswapdWakeFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmVmscanKswapdWakeFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmVmscanKswapdWakeFtraceEvent} MmVmscanKswapdWakeFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmVmscanKswapdWakeFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmVmscanKswapdWakeFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmVmscanKswapdWakeFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmVmscanKswapdWakeFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    if (!$util.isInteger(m.nid))
                        return "nid: integer expected";
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    if (!$util.isInteger(m.order))
                        return "order: integer expected";
                }
                if (m.zid != null && m.hasOwnProperty("zid")) {
                    if (!$util.isInteger(m.zid))
                        return "zid: integer expected";
                }
                return null;
            };

            /**
             * Creates a MmVmscanKswapdWakeFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmVmscanKswapdWakeFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmVmscanKswapdWakeFtraceEvent} MmVmscanKswapdWakeFtraceEvent
             */
            MmVmscanKswapdWakeFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmVmscanKswapdWakeFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmVmscanKswapdWakeFtraceEvent();
                if (d.nid != null) {
                    m.nid = d.nid | 0;
                }
                if (d.order != null) {
                    m.order = d.order | 0;
                }
                if (d.zid != null) {
                    m.zid = d.zid | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MmVmscanKswapdWakeFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmVmscanKswapdWakeFtraceEvent
             * @static
             * @param {perfetto.protos.MmVmscanKswapdWakeFtraceEvent} m MmVmscanKswapdWakeFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmVmscanKswapdWakeFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.nid = 0;
                    d.order = 0;
                    d.zid = 0;
                }
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    d.nid = m.nid;
                }
                if (m.order != null && m.hasOwnProperty("order")) {
                    d.order = m.order;
                }
                if (m.zid != null && m.hasOwnProperty("zid")) {
                    d.zid = m.zid;
                }
                return d;
            };

            /**
             * Converts this MmVmscanKswapdWakeFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmVmscanKswapdWakeFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmVmscanKswapdWakeFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmVmscanKswapdWakeFtraceEvent;
        })();

        protos.MmVmscanKswapdSleepFtraceEvent = (function() {

            /**
             * Properties of a MmVmscanKswapdSleepFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmVmscanKswapdSleepFtraceEvent
             * @property {number|null} [nid] MmVmscanKswapdSleepFtraceEvent nid
             */

            /**
             * Constructs a new MmVmscanKswapdSleepFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmVmscanKswapdSleepFtraceEvent.
             * @implements IMmVmscanKswapdSleepFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmVmscanKswapdSleepFtraceEvent=} [p] Properties to set
             */
            function MmVmscanKswapdSleepFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmVmscanKswapdSleepFtraceEvent nid.
             * @member {number} nid
             * @memberof perfetto.protos.MmVmscanKswapdSleepFtraceEvent
             * @instance
             */
            MmVmscanKswapdSleepFtraceEvent.prototype.nid = 0;

            /**
             * Creates a new MmVmscanKswapdSleepFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmVmscanKswapdSleepFtraceEvent
             * @static
             * @param {perfetto.protos.IMmVmscanKswapdSleepFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmVmscanKswapdSleepFtraceEvent} MmVmscanKswapdSleepFtraceEvent instance
             */
            MmVmscanKswapdSleepFtraceEvent.create = function create(properties) {
                return new MmVmscanKswapdSleepFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmVmscanKswapdSleepFtraceEvent message. Does not implicitly {@link perfetto.protos.MmVmscanKswapdSleepFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmVmscanKswapdSleepFtraceEvent
             * @static
             * @param {perfetto.protos.IMmVmscanKswapdSleepFtraceEvent} m MmVmscanKswapdSleepFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmVmscanKswapdSleepFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.nid != null && Object.hasOwnProperty.call(m, "nid"))
                    w.uint32(8).int32(m.nid);
                return w;
            };

            /**
             * Encodes the specified MmVmscanKswapdSleepFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmVmscanKswapdSleepFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmVmscanKswapdSleepFtraceEvent
             * @static
             * @param {perfetto.protos.IMmVmscanKswapdSleepFtraceEvent} message MmVmscanKswapdSleepFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmVmscanKswapdSleepFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmVmscanKswapdSleepFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmVmscanKswapdSleepFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmVmscanKswapdSleepFtraceEvent} MmVmscanKswapdSleepFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmVmscanKswapdSleepFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmVmscanKswapdSleepFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.nid = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmVmscanKswapdSleepFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmVmscanKswapdSleepFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmVmscanKswapdSleepFtraceEvent} MmVmscanKswapdSleepFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmVmscanKswapdSleepFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmVmscanKswapdSleepFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmVmscanKswapdSleepFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmVmscanKswapdSleepFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    if (!$util.isInteger(m.nid))
                        return "nid: integer expected";
                }
                return null;
            };

            /**
             * Creates a MmVmscanKswapdSleepFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmVmscanKswapdSleepFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmVmscanKswapdSleepFtraceEvent} MmVmscanKswapdSleepFtraceEvent
             */
            MmVmscanKswapdSleepFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmVmscanKswapdSleepFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmVmscanKswapdSleepFtraceEvent();
                if (d.nid != null) {
                    m.nid = d.nid | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MmVmscanKswapdSleepFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmVmscanKswapdSleepFtraceEvent
             * @static
             * @param {perfetto.protos.MmVmscanKswapdSleepFtraceEvent} m MmVmscanKswapdSleepFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmVmscanKswapdSleepFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.nid = 0;
                }
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    d.nid = m.nid;
                }
                return d;
            };

            /**
             * Converts this MmVmscanKswapdSleepFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmVmscanKswapdSleepFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmVmscanKswapdSleepFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmVmscanKswapdSleepFtraceEvent;
        })();

        protos.MmShrinkSlabStartFtraceEvent = (function() {

            /**
             * Properties of a MmShrinkSlabStartFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmShrinkSlabStartFtraceEvent
             * @property {number|null} [cacheItems] MmShrinkSlabStartFtraceEvent cacheItems
             * @property {number|null} [delta] MmShrinkSlabStartFtraceEvent delta
             * @property {number|null} [gfpFlags] MmShrinkSlabStartFtraceEvent gfpFlags
             * @property {number|null} [lruPgs] MmShrinkSlabStartFtraceEvent lruPgs
             * @property {number|null} [nrObjectsToShrink] MmShrinkSlabStartFtraceEvent nrObjectsToShrink
             * @property {number|null} [pgsScanned] MmShrinkSlabStartFtraceEvent pgsScanned
             * @property {number|null} [shr] MmShrinkSlabStartFtraceEvent shr
             * @property {number|null} [shrink] MmShrinkSlabStartFtraceEvent shrink
             * @property {number|null} [totalScan] MmShrinkSlabStartFtraceEvent totalScan
             * @property {number|null} [nid] MmShrinkSlabStartFtraceEvent nid
             * @property {number|null} [priority] MmShrinkSlabStartFtraceEvent priority
             */

            /**
             * Constructs a new MmShrinkSlabStartFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmShrinkSlabStartFtraceEvent.
             * @implements IMmShrinkSlabStartFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmShrinkSlabStartFtraceEvent=} [p] Properties to set
             */
            function MmShrinkSlabStartFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmShrinkSlabStartFtraceEvent cacheItems.
             * @member {number} cacheItems
             * @memberof perfetto.protos.MmShrinkSlabStartFtraceEvent
             * @instance
             */
            MmShrinkSlabStartFtraceEvent.prototype.cacheItems = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmShrinkSlabStartFtraceEvent delta.
             * @member {number} delta
             * @memberof perfetto.protos.MmShrinkSlabStartFtraceEvent
             * @instance
             */
            MmShrinkSlabStartFtraceEvent.prototype.delta = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmShrinkSlabStartFtraceEvent gfpFlags.
             * @member {number} gfpFlags
             * @memberof perfetto.protos.MmShrinkSlabStartFtraceEvent
             * @instance
             */
            MmShrinkSlabStartFtraceEvent.prototype.gfpFlags = 0;

            /**
             * MmShrinkSlabStartFtraceEvent lruPgs.
             * @member {number} lruPgs
             * @memberof perfetto.protos.MmShrinkSlabStartFtraceEvent
             * @instance
             */
            MmShrinkSlabStartFtraceEvent.prototype.lruPgs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmShrinkSlabStartFtraceEvent nrObjectsToShrink.
             * @member {number} nrObjectsToShrink
             * @memberof perfetto.protos.MmShrinkSlabStartFtraceEvent
             * @instance
             */
            MmShrinkSlabStartFtraceEvent.prototype.nrObjectsToShrink = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * MmShrinkSlabStartFtraceEvent pgsScanned.
             * @member {number} pgsScanned
             * @memberof perfetto.protos.MmShrinkSlabStartFtraceEvent
             * @instance
             */
            MmShrinkSlabStartFtraceEvent.prototype.pgsScanned = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmShrinkSlabStartFtraceEvent shr.
             * @member {number} shr
             * @memberof perfetto.protos.MmShrinkSlabStartFtraceEvent
             * @instance
             */
            MmShrinkSlabStartFtraceEvent.prototype.shr = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmShrinkSlabStartFtraceEvent shrink.
             * @member {number} shrink
             * @memberof perfetto.protos.MmShrinkSlabStartFtraceEvent
             * @instance
             */
            MmShrinkSlabStartFtraceEvent.prototype.shrink = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmShrinkSlabStartFtraceEvent totalScan.
             * @member {number} totalScan
             * @memberof perfetto.protos.MmShrinkSlabStartFtraceEvent
             * @instance
             */
            MmShrinkSlabStartFtraceEvent.prototype.totalScan = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmShrinkSlabStartFtraceEvent nid.
             * @member {number} nid
             * @memberof perfetto.protos.MmShrinkSlabStartFtraceEvent
             * @instance
             */
            MmShrinkSlabStartFtraceEvent.prototype.nid = 0;

            /**
             * MmShrinkSlabStartFtraceEvent priority.
             * @member {number} priority
             * @memberof perfetto.protos.MmShrinkSlabStartFtraceEvent
             * @instance
             */
            MmShrinkSlabStartFtraceEvent.prototype.priority = 0;

            /**
             * Creates a new MmShrinkSlabStartFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmShrinkSlabStartFtraceEvent
             * @static
             * @param {perfetto.protos.IMmShrinkSlabStartFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmShrinkSlabStartFtraceEvent} MmShrinkSlabStartFtraceEvent instance
             */
            MmShrinkSlabStartFtraceEvent.create = function create(properties) {
                return new MmShrinkSlabStartFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmShrinkSlabStartFtraceEvent message. Does not implicitly {@link perfetto.protos.MmShrinkSlabStartFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmShrinkSlabStartFtraceEvent
             * @static
             * @param {perfetto.protos.IMmShrinkSlabStartFtraceEvent} m MmShrinkSlabStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmShrinkSlabStartFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.cacheItems != null && Object.hasOwnProperty.call(m, "cacheItems"))
                    w.uint32(8).uint64(m.cacheItems);
                if (m.delta != null && Object.hasOwnProperty.call(m, "delta"))
                    w.uint32(16).uint64(m.delta);
                if (m.gfpFlags != null && Object.hasOwnProperty.call(m, "gfpFlags"))
                    w.uint32(24).uint32(m.gfpFlags);
                if (m.lruPgs != null && Object.hasOwnProperty.call(m, "lruPgs"))
                    w.uint32(32).uint64(m.lruPgs);
                if (m.nrObjectsToShrink != null && Object.hasOwnProperty.call(m, "nrObjectsToShrink"))
                    w.uint32(40).int64(m.nrObjectsToShrink);
                if (m.pgsScanned != null && Object.hasOwnProperty.call(m, "pgsScanned"))
                    w.uint32(48).uint64(m.pgsScanned);
                if (m.shr != null && Object.hasOwnProperty.call(m, "shr"))
                    w.uint32(56).uint64(m.shr);
                if (m.shrink != null && Object.hasOwnProperty.call(m, "shrink"))
                    w.uint32(64).uint64(m.shrink);
                if (m.totalScan != null && Object.hasOwnProperty.call(m, "totalScan"))
                    w.uint32(72).uint64(m.totalScan);
                if (m.nid != null && Object.hasOwnProperty.call(m, "nid"))
                    w.uint32(80).int32(m.nid);
                if (m.priority != null && Object.hasOwnProperty.call(m, "priority"))
                    w.uint32(88).int32(m.priority);
                return w;
            };

            /**
             * Encodes the specified MmShrinkSlabStartFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmShrinkSlabStartFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmShrinkSlabStartFtraceEvent
             * @static
             * @param {perfetto.protos.IMmShrinkSlabStartFtraceEvent} message MmShrinkSlabStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmShrinkSlabStartFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmShrinkSlabStartFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmShrinkSlabStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmShrinkSlabStartFtraceEvent} MmShrinkSlabStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmShrinkSlabStartFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmShrinkSlabStartFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.cacheItems = r.uint64();
                        break;
                    case 2:
                        m.delta = r.uint64();
                        break;
                    case 3:
                        m.gfpFlags = r.uint32();
                        break;
                    case 4:
                        m.lruPgs = r.uint64();
                        break;
                    case 5:
                        m.nrObjectsToShrink = r.int64();
                        break;
                    case 6:
                        m.pgsScanned = r.uint64();
                        break;
                    case 7:
                        m.shr = r.uint64();
                        break;
                    case 8:
                        m.shrink = r.uint64();
                        break;
                    case 9:
                        m.totalScan = r.uint64();
                        break;
                    case 10:
                        m.nid = r.int32();
                        break;
                    case 11:
                        m.priority = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmShrinkSlabStartFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmShrinkSlabStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmShrinkSlabStartFtraceEvent} MmShrinkSlabStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmShrinkSlabStartFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmShrinkSlabStartFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmShrinkSlabStartFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmShrinkSlabStartFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.cacheItems != null && m.hasOwnProperty("cacheItems")) {
                    if (!$util.isInteger(m.cacheItems) && !(m.cacheItems && $util.isInteger(m.cacheItems.low) && $util.isInteger(m.cacheItems.high)))
                        return "cacheItems: integer|Long expected";
                }
                if (m.delta != null && m.hasOwnProperty("delta")) {
                    if (!$util.isInteger(m.delta) && !(m.delta && $util.isInteger(m.delta.low) && $util.isInteger(m.delta.high)))
                        return "delta: integer|Long expected";
                }
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    if (!$util.isInteger(m.gfpFlags))
                        return "gfpFlags: integer expected";
                }
                if (m.lruPgs != null && m.hasOwnProperty("lruPgs")) {
                    if (!$util.isInteger(m.lruPgs) && !(m.lruPgs && $util.isInteger(m.lruPgs.low) && $util.isInteger(m.lruPgs.high)))
                        return "lruPgs: integer|Long expected";
                }
                if (m.nrObjectsToShrink != null && m.hasOwnProperty("nrObjectsToShrink")) {
                    if (!$util.isInteger(m.nrObjectsToShrink) && !(m.nrObjectsToShrink && $util.isInteger(m.nrObjectsToShrink.low) && $util.isInteger(m.nrObjectsToShrink.high)))
                        return "nrObjectsToShrink: integer|Long expected";
                }
                if (m.pgsScanned != null && m.hasOwnProperty("pgsScanned")) {
                    if (!$util.isInteger(m.pgsScanned) && !(m.pgsScanned && $util.isInteger(m.pgsScanned.low) && $util.isInteger(m.pgsScanned.high)))
                        return "pgsScanned: integer|Long expected";
                }
                if (m.shr != null && m.hasOwnProperty("shr")) {
                    if (!$util.isInteger(m.shr) && !(m.shr && $util.isInteger(m.shr.low) && $util.isInteger(m.shr.high)))
                        return "shr: integer|Long expected";
                }
                if (m.shrink != null && m.hasOwnProperty("shrink")) {
                    if (!$util.isInteger(m.shrink) && !(m.shrink && $util.isInteger(m.shrink.low) && $util.isInteger(m.shrink.high)))
                        return "shrink: integer|Long expected";
                }
                if (m.totalScan != null && m.hasOwnProperty("totalScan")) {
                    if (!$util.isInteger(m.totalScan) && !(m.totalScan && $util.isInteger(m.totalScan.low) && $util.isInteger(m.totalScan.high)))
                        return "totalScan: integer|Long expected";
                }
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    if (!$util.isInteger(m.nid))
                        return "nid: integer expected";
                }
                if (m.priority != null && m.hasOwnProperty("priority")) {
                    if (!$util.isInteger(m.priority))
                        return "priority: integer expected";
                }
                return null;
            };

            /**
             * Creates a MmShrinkSlabStartFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmShrinkSlabStartFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmShrinkSlabStartFtraceEvent} MmShrinkSlabStartFtraceEvent
             */
            MmShrinkSlabStartFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmShrinkSlabStartFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmShrinkSlabStartFtraceEvent();
                if (d.cacheItems != null) {
                    if ($util.Long)
                        (m.cacheItems = $util.Long.fromValue(d.cacheItems)).unsigned = true;
                    else if (typeof d.cacheItems === "string")
                        m.cacheItems = parseInt(d.cacheItems, 10);
                    else if (typeof d.cacheItems === "number")
                        m.cacheItems = d.cacheItems;
                    else if (typeof d.cacheItems === "object")
                        m.cacheItems = new $util.LongBits(d.cacheItems.low >>> 0, d.cacheItems.high >>> 0).toNumber(true);
                }
                if (d.delta != null) {
                    if ($util.Long)
                        (m.delta = $util.Long.fromValue(d.delta)).unsigned = true;
                    else if (typeof d.delta === "string")
                        m.delta = parseInt(d.delta, 10);
                    else if (typeof d.delta === "number")
                        m.delta = d.delta;
                    else if (typeof d.delta === "object")
                        m.delta = new $util.LongBits(d.delta.low >>> 0, d.delta.high >>> 0).toNumber(true);
                }
                if (d.gfpFlags != null) {
                    m.gfpFlags = d.gfpFlags >>> 0;
                }
                if (d.lruPgs != null) {
                    if ($util.Long)
                        (m.lruPgs = $util.Long.fromValue(d.lruPgs)).unsigned = true;
                    else if (typeof d.lruPgs === "string")
                        m.lruPgs = parseInt(d.lruPgs, 10);
                    else if (typeof d.lruPgs === "number")
                        m.lruPgs = d.lruPgs;
                    else if (typeof d.lruPgs === "object")
                        m.lruPgs = new $util.LongBits(d.lruPgs.low >>> 0, d.lruPgs.high >>> 0).toNumber(true);
                }
                if (d.nrObjectsToShrink != null) {
                    if ($util.Long)
                        (m.nrObjectsToShrink = $util.Long.fromValue(d.nrObjectsToShrink)).unsigned = false;
                    else if (typeof d.nrObjectsToShrink === "string")
                        m.nrObjectsToShrink = parseInt(d.nrObjectsToShrink, 10);
                    else if (typeof d.nrObjectsToShrink === "number")
                        m.nrObjectsToShrink = d.nrObjectsToShrink;
                    else if (typeof d.nrObjectsToShrink === "object")
                        m.nrObjectsToShrink = new $util.LongBits(d.nrObjectsToShrink.low >>> 0, d.nrObjectsToShrink.high >>> 0).toNumber();
                }
                if (d.pgsScanned != null) {
                    if ($util.Long)
                        (m.pgsScanned = $util.Long.fromValue(d.pgsScanned)).unsigned = true;
                    else if (typeof d.pgsScanned === "string")
                        m.pgsScanned = parseInt(d.pgsScanned, 10);
                    else if (typeof d.pgsScanned === "number")
                        m.pgsScanned = d.pgsScanned;
                    else if (typeof d.pgsScanned === "object")
                        m.pgsScanned = new $util.LongBits(d.pgsScanned.low >>> 0, d.pgsScanned.high >>> 0).toNumber(true);
                }
                if (d.shr != null) {
                    if ($util.Long)
                        (m.shr = $util.Long.fromValue(d.shr)).unsigned = true;
                    else if (typeof d.shr === "string")
                        m.shr = parseInt(d.shr, 10);
                    else if (typeof d.shr === "number")
                        m.shr = d.shr;
                    else if (typeof d.shr === "object")
                        m.shr = new $util.LongBits(d.shr.low >>> 0, d.shr.high >>> 0).toNumber(true);
                }
                if (d.shrink != null) {
                    if ($util.Long)
                        (m.shrink = $util.Long.fromValue(d.shrink)).unsigned = true;
                    else if (typeof d.shrink === "string")
                        m.shrink = parseInt(d.shrink, 10);
                    else if (typeof d.shrink === "number")
                        m.shrink = d.shrink;
                    else if (typeof d.shrink === "object")
                        m.shrink = new $util.LongBits(d.shrink.low >>> 0, d.shrink.high >>> 0).toNumber(true);
                }
                if (d.totalScan != null) {
                    if ($util.Long)
                        (m.totalScan = $util.Long.fromValue(d.totalScan)).unsigned = true;
                    else if (typeof d.totalScan === "string")
                        m.totalScan = parseInt(d.totalScan, 10);
                    else if (typeof d.totalScan === "number")
                        m.totalScan = d.totalScan;
                    else if (typeof d.totalScan === "object")
                        m.totalScan = new $util.LongBits(d.totalScan.low >>> 0, d.totalScan.high >>> 0).toNumber(true);
                }
                if (d.nid != null) {
                    m.nid = d.nid | 0;
                }
                if (d.priority != null) {
                    m.priority = d.priority | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MmShrinkSlabStartFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmShrinkSlabStartFtraceEvent
             * @static
             * @param {perfetto.protos.MmShrinkSlabStartFtraceEvent} m MmShrinkSlabStartFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmShrinkSlabStartFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.cacheItems = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.cacheItems = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.delta = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.delta = o.longs === String ? "0" : 0;
                    d.gfpFlags = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.lruPgs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.lruPgs = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.nrObjectsToShrink = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.nrObjectsToShrink = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.pgsScanned = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.pgsScanned = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.shr = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.shr = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.shrink = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.shrink = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.totalScan = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.totalScan = o.longs === String ? "0" : 0;
                    d.nid = 0;
                    d.priority = 0;
                }
                if (m.cacheItems != null && m.hasOwnProperty("cacheItems")) {
                    if (typeof m.cacheItems === "number")
                        d.cacheItems = o.longs === String ? String(m.cacheItems) : m.cacheItems;
                    else
                        d.cacheItems = o.longs === String ? $util.Long.prototype.toString.call(m.cacheItems) : o.longs === Number ? new $util.LongBits(m.cacheItems.low >>> 0, m.cacheItems.high >>> 0).toNumber(true) : m.cacheItems;
                }
                if (m.delta != null && m.hasOwnProperty("delta")) {
                    if (typeof m.delta === "number")
                        d.delta = o.longs === String ? String(m.delta) : m.delta;
                    else
                        d.delta = o.longs === String ? $util.Long.prototype.toString.call(m.delta) : o.longs === Number ? new $util.LongBits(m.delta.low >>> 0, m.delta.high >>> 0).toNumber(true) : m.delta;
                }
                if (m.gfpFlags != null && m.hasOwnProperty("gfpFlags")) {
                    d.gfpFlags = m.gfpFlags;
                }
                if (m.lruPgs != null && m.hasOwnProperty("lruPgs")) {
                    if (typeof m.lruPgs === "number")
                        d.lruPgs = o.longs === String ? String(m.lruPgs) : m.lruPgs;
                    else
                        d.lruPgs = o.longs === String ? $util.Long.prototype.toString.call(m.lruPgs) : o.longs === Number ? new $util.LongBits(m.lruPgs.low >>> 0, m.lruPgs.high >>> 0).toNumber(true) : m.lruPgs;
                }
                if (m.nrObjectsToShrink != null && m.hasOwnProperty("nrObjectsToShrink")) {
                    if (typeof m.nrObjectsToShrink === "number")
                        d.nrObjectsToShrink = o.longs === String ? String(m.nrObjectsToShrink) : m.nrObjectsToShrink;
                    else
                        d.nrObjectsToShrink = o.longs === String ? $util.Long.prototype.toString.call(m.nrObjectsToShrink) : o.longs === Number ? new $util.LongBits(m.nrObjectsToShrink.low >>> 0, m.nrObjectsToShrink.high >>> 0).toNumber() : m.nrObjectsToShrink;
                }
                if (m.pgsScanned != null && m.hasOwnProperty("pgsScanned")) {
                    if (typeof m.pgsScanned === "number")
                        d.pgsScanned = o.longs === String ? String(m.pgsScanned) : m.pgsScanned;
                    else
                        d.pgsScanned = o.longs === String ? $util.Long.prototype.toString.call(m.pgsScanned) : o.longs === Number ? new $util.LongBits(m.pgsScanned.low >>> 0, m.pgsScanned.high >>> 0).toNumber(true) : m.pgsScanned;
                }
                if (m.shr != null && m.hasOwnProperty("shr")) {
                    if (typeof m.shr === "number")
                        d.shr = o.longs === String ? String(m.shr) : m.shr;
                    else
                        d.shr = o.longs === String ? $util.Long.prototype.toString.call(m.shr) : o.longs === Number ? new $util.LongBits(m.shr.low >>> 0, m.shr.high >>> 0).toNumber(true) : m.shr;
                }
                if (m.shrink != null && m.hasOwnProperty("shrink")) {
                    if (typeof m.shrink === "number")
                        d.shrink = o.longs === String ? String(m.shrink) : m.shrink;
                    else
                        d.shrink = o.longs === String ? $util.Long.prototype.toString.call(m.shrink) : o.longs === Number ? new $util.LongBits(m.shrink.low >>> 0, m.shrink.high >>> 0).toNumber(true) : m.shrink;
                }
                if (m.totalScan != null && m.hasOwnProperty("totalScan")) {
                    if (typeof m.totalScan === "number")
                        d.totalScan = o.longs === String ? String(m.totalScan) : m.totalScan;
                    else
                        d.totalScan = o.longs === String ? $util.Long.prototype.toString.call(m.totalScan) : o.longs === Number ? new $util.LongBits(m.totalScan.low >>> 0, m.totalScan.high >>> 0).toNumber(true) : m.totalScan;
                }
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    d.nid = m.nid;
                }
                if (m.priority != null && m.hasOwnProperty("priority")) {
                    d.priority = m.priority;
                }
                return d;
            };

            /**
             * Converts this MmShrinkSlabStartFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmShrinkSlabStartFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmShrinkSlabStartFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmShrinkSlabStartFtraceEvent;
        })();

        protos.MmShrinkSlabEndFtraceEvent = (function() {

            /**
             * Properties of a MmShrinkSlabEndFtraceEvent.
             * @memberof perfetto.protos
             * @interface IMmShrinkSlabEndFtraceEvent
             * @property {number|null} [newScan] MmShrinkSlabEndFtraceEvent newScan
             * @property {number|null} [retval] MmShrinkSlabEndFtraceEvent retval
             * @property {number|null} [shr] MmShrinkSlabEndFtraceEvent shr
             * @property {number|null} [shrink] MmShrinkSlabEndFtraceEvent shrink
             * @property {number|null} [totalScan] MmShrinkSlabEndFtraceEvent totalScan
             * @property {number|null} [unusedScan] MmShrinkSlabEndFtraceEvent unusedScan
             * @property {number|null} [nid] MmShrinkSlabEndFtraceEvent nid
             */

            /**
             * Constructs a new MmShrinkSlabEndFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a MmShrinkSlabEndFtraceEvent.
             * @implements IMmShrinkSlabEndFtraceEvent
             * @constructor
             * @param {perfetto.protos.IMmShrinkSlabEndFtraceEvent=} [p] Properties to set
             */
            function MmShrinkSlabEndFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MmShrinkSlabEndFtraceEvent newScan.
             * @member {number} newScan
             * @memberof perfetto.protos.MmShrinkSlabEndFtraceEvent
             * @instance
             */
            MmShrinkSlabEndFtraceEvent.prototype.newScan = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * MmShrinkSlabEndFtraceEvent retval.
             * @member {number} retval
             * @memberof perfetto.protos.MmShrinkSlabEndFtraceEvent
             * @instance
             */
            MmShrinkSlabEndFtraceEvent.prototype.retval = 0;

            /**
             * MmShrinkSlabEndFtraceEvent shr.
             * @member {number} shr
             * @memberof perfetto.protos.MmShrinkSlabEndFtraceEvent
             * @instance
             */
            MmShrinkSlabEndFtraceEvent.prototype.shr = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmShrinkSlabEndFtraceEvent shrink.
             * @member {number} shrink
             * @memberof perfetto.protos.MmShrinkSlabEndFtraceEvent
             * @instance
             */
            MmShrinkSlabEndFtraceEvent.prototype.shrink = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MmShrinkSlabEndFtraceEvent totalScan.
             * @member {number} totalScan
             * @memberof perfetto.protos.MmShrinkSlabEndFtraceEvent
             * @instance
             */
            MmShrinkSlabEndFtraceEvent.prototype.totalScan = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * MmShrinkSlabEndFtraceEvent unusedScan.
             * @member {number} unusedScan
             * @memberof perfetto.protos.MmShrinkSlabEndFtraceEvent
             * @instance
             */
            MmShrinkSlabEndFtraceEvent.prototype.unusedScan = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * MmShrinkSlabEndFtraceEvent nid.
             * @member {number} nid
             * @memberof perfetto.protos.MmShrinkSlabEndFtraceEvent
             * @instance
             */
            MmShrinkSlabEndFtraceEvent.prototype.nid = 0;

            /**
             * Creates a new MmShrinkSlabEndFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MmShrinkSlabEndFtraceEvent
             * @static
             * @param {perfetto.protos.IMmShrinkSlabEndFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.MmShrinkSlabEndFtraceEvent} MmShrinkSlabEndFtraceEvent instance
             */
            MmShrinkSlabEndFtraceEvent.create = function create(properties) {
                return new MmShrinkSlabEndFtraceEvent(properties);
            };

            /**
             * Encodes the specified MmShrinkSlabEndFtraceEvent message. Does not implicitly {@link perfetto.protos.MmShrinkSlabEndFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MmShrinkSlabEndFtraceEvent
             * @static
             * @param {perfetto.protos.IMmShrinkSlabEndFtraceEvent} m MmShrinkSlabEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmShrinkSlabEndFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.newScan != null && Object.hasOwnProperty.call(m, "newScan"))
                    w.uint32(8).int64(m.newScan);
                if (m.retval != null && Object.hasOwnProperty.call(m, "retval"))
                    w.uint32(16).int32(m.retval);
                if (m.shr != null && Object.hasOwnProperty.call(m, "shr"))
                    w.uint32(24).uint64(m.shr);
                if (m.shrink != null && Object.hasOwnProperty.call(m, "shrink"))
                    w.uint32(32).uint64(m.shrink);
                if (m.totalScan != null && Object.hasOwnProperty.call(m, "totalScan"))
                    w.uint32(40).int64(m.totalScan);
                if (m.unusedScan != null && Object.hasOwnProperty.call(m, "unusedScan"))
                    w.uint32(48).int64(m.unusedScan);
                if (m.nid != null && Object.hasOwnProperty.call(m, "nid"))
                    w.uint32(56).int32(m.nid);
                return w;
            };

            /**
             * Encodes the specified MmShrinkSlabEndFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.MmShrinkSlabEndFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MmShrinkSlabEndFtraceEvent
             * @static
             * @param {perfetto.protos.IMmShrinkSlabEndFtraceEvent} message MmShrinkSlabEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MmShrinkSlabEndFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MmShrinkSlabEndFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MmShrinkSlabEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MmShrinkSlabEndFtraceEvent} MmShrinkSlabEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmShrinkSlabEndFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MmShrinkSlabEndFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.newScan = r.int64();
                        break;
                    case 2:
                        m.retval = r.int32();
                        break;
                    case 3:
                        m.shr = r.uint64();
                        break;
                    case 4:
                        m.shrink = r.uint64();
                        break;
                    case 5:
                        m.totalScan = r.int64();
                        break;
                    case 6:
                        m.unusedScan = r.int64();
                        break;
                    case 7:
                        m.nid = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MmShrinkSlabEndFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MmShrinkSlabEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MmShrinkSlabEndFtraceEvent} MmShrinkSlabEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MmShrinkSlabEndFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MmShrinkSlabEndFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.MmShrinkSlabEndFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MmShrinkSlabEndFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.newScan != null && m.hasOwnProperty("newScan")) {
                    if (!$util.isInteger(m.newScan) && !(m.newScan && $util.isInteger(m.newScan.low) && $util.isInteger(m.newScan.high)))
                        return "newScan: integer|Long expected";
                }
                if (m.retval != null && m.hasOwnProperty("retval")) {
                    if (!$util.isInteger(m.retval))
                        return "retval: integer expected";
                }
                if (m.shr != null && m.hasOwnProperty("shr")) {
                    if (!$util.isInteger(m.shr) && !(m.shr && $util.isInteger(m.shr.low) && $util.isInteger(m.shr.high)))
                        return "shr: integer|Long expected";
                }
                if (m.shrink != null && m.hasOwnProperty("shrink")) {
                    if (!$util.isInteger(m.shrink) && !(m.shrink && $util.isInteger(m.shrink.low) && $util.isInteger(m.shrink.high)))
                        return "shrink: integer|Long expected";
                }
                if (m.totalScan != null && m.hasOwnProperty("totalScan")) {
                    if (!$util.isInteger(m.totalScan) && !(m.totalScan && $util.isInteger(m.totalScan.low) && $util.isInteger(m.totalScan.high)))
                        return "totalScan: integer|Long expected";
                }
                if (m.unusedScan != null && m.hasOwnProperty("unusedScan")) {
                    if (!$util.isInteger(m.unusedScan) && !(m.unusedScan && $util.isInteger(m.unusedScan.low) && $util.isInteger(m.unusedScan.high)))
                        return "unusedScan: integer|Long expected";
                }
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    if (!$util.isInteger(m.nid))
                        return "nid: integer expected";
                }
                return null;
            };

            /**
             * Creates a MmShrinkSlabEndFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MmShrinkSlabEndFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MmShrinkSlabEndFtraceEvent} MmShrinkSlabEndFtraceEvent
             */
            MmShrinkSlabEndFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MmShrinkSlabEndFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.MmShrinkSlabEndFtraceEvent();
                if (d.newScan != null) {
                    if ($util.Long)
                        (m.newScan = $util.Long.fromValue(d.newScan)).unsigned = false;
                    else if (typeof d.newScan === "string")
                        m.newScan = parseInt(d.newScan, 10);
                    else if (typeof d.newScan === "number")
                        m.newScan = d.newScan;
                    else if (typeof d.newScan === "object")
                        m.newScan = new $util.LongBits(d.newScan.low >>> 0, d.newScan.high >>> 0).toNumber();
                }
                if (d.retval != null) {
                    m.retval = d.retval | 0;
                }
                if (d.shr != null) {
                    if ($util.Long)
                        (m.shr = $util.Long.fromValue(d.shr)).unsigned = true;
                    else if (typeof d.shr === "string")
                        m.shr = parseInt(d.shr, 10);
                    else if (typeof d.shr === "number")
                        m.shr = d.shr;
                    else if (typeof d.shr === "object")
                        m.shr = new $util.LongBits(d.shr.low >>> 0, d.shr.high >>> 0).toNumber(true);
                }
                if (d.shrink != null) {
                    if ($util.Long)
                        (m.shrink = $util.Long.fromValue(d.shrink)).unsigned = true;
                    else if (typeof d.shrink === "string")
                        m.shrink = parseInt(d.shrink, 10);
                    else if (typeof d.shrink === "number")
                        m.shrink = d.shrink;
                    else if (typeof d.shrink === "object")
                        m.shrink = new $util.LongBits(d.shrink.low >>> 0, d.shrink.high >>> 0).toNumber(true);
                }
                if (d.totalScan != null) {
                    if ($util.Long)
                        (m.totalScan = $util.Long.fromValue(d.totalScan)).unsigned = false;
                    else if (typeof d.totalScan === "string")
                        m.totalScan = parseInt(d.totalScan, 10);
                    else if (typeof d.totalScan === "number")
                        m.totalScan = d.totalScan;
                    else if (typeof d.totalScan === "object")
                        m.totalScan = new $util.LongBits(d.totalScan.low >>> 0, d.totalScan.high >>> 0).toNumber();
                }
                if (d.unusedScan != null) {
                    if ($util.Long)
                        (m.unusedScan = $util.Long.fromValue(d.unusedScan)).unsigned = false;
                    else if (typeof d.unusedScan === "string")
                        m.unusedScan = parseInt(d.unusedScan, 10);
                    else if (typeof d.unusedScan === "number")
                        m.unusedScan = d.unusedScan;
                    else if (typeof d.unusedScan === "object")
                        m.unusedScan = new $util.LongBits(d.unusedScan.low >>> 0, d.unusedScan.high >>> 0).toNumber();
                }
                if (d.nid != null) {
                    m.nid = d.nid | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a MmShrinkSlabEndFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MmShrinkSlabEndFtraceEvent
             * @static
             * @param {perfetto.protos.MmShrinkSlabEndFtraceEvent} m MmShrinkSlabEndFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MmShrinkSlabEndFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.newScan = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.newScan = o.longs === String ? "0" : 0;
                    d.retval = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.shr = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.shr = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.shrink = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.shrink = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.totalScan = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.totalScan = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.unusedScan = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.unusedScan = o.longs === String ? "0" : 0;
                    d.nid = 0;
                }
                if (m.newScan != null && m.hasOwnProperty("newScan")) {
                    if (typeof m.newScan === "number")
                        d.newScan = o.longs === String ? String(m.newScan) : m.newScan;
                    else
                        d.newScan = o.longs === String ? $util.Long.prototype.toString.call(m.newScan) : o.longs === Number ? new $util.LongBits(m.newScan.low >>> 0, m.newScan.high >>> 0).toNumber() : m.newScan;
                }
                if (m.retval != null && m.hasOwnProperty("retval")) {
                    d.retval = m.retval;
                }
                if (m.shr != null && m.hasOwnProperty("shr")) {
                    if (typeof m.shr === "number")
                        d.shr = o.longs === String ? String(m.shr) : m.shr;
                    else
                        d.shr = o.longs === String ? $util.Long.prototype.toString.call(m.shr) : o.longs === Number ? new $util.LongBits(m.shr.low >>> 0, m.shr.high >>> 0).toNumber(true) : m.shr;
                }
                if (m.shrink != null && m.hasOwnProperty("shrink")) {
                    if (typeof m.shrink === "number")
                        d.shrink = o.longs === String ? String(m.shrink) : m.shrink;
                    else
                        d.shrink = o.longs === String ? $util.Long.prototype.toString.call(m.shrink) : o.longs === Number ? new $util.LongBits(m.shrink.low >>> 0, m.shrink.high >>> 0).toNumber(true) : m.shrink;
                }
                if (m.totalScan != null && m.hasOwnProperty("totalScan")) {
                    if (typeof m.totalScan === "number")
                        d.totalScan = o.longs === String ? String(m.totalScan) : m.totalScan;
                    else
                        d.totalScan = o.longs === String ? $util.Long.prototype.toString.call(m.totalScan) : o.longs === Number ? new $util.LongBits(m.totalScan.low >>> 0, m.totalScan.high >>> 0).toNumber() : m.totalScan;
                }
                if (m.unusedScan != null && m.hasOwnProperty("unusedScan")) {
                    if (typeof m.unusedScan === "number")
                        d.unusedScan = o.longs === String ? String(m.unusedScan) : m.unusedScan;
                    else
                        d.unusedScan = o.longs === String ? $util.Long.prototype.toString.call(m.unusedScan) : o.longs === Number ? new $util.LongBits(m.unusedScan.low >>> 0, m.unusedScan.high >>> 0).toNumber() : m.unusedScan;
                }
                if (m.nid != null && m.hasOwnProperty("nid")) {
                    d.nid = m.nid;
                }
                return d;
            };

            /**
             * Converts this MmShrinkSlabEndFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MmShrinkSlabEndFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MmShrinkSlabEndFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return MmShrinkSlabEndFtraceEvent;
        })();

        protos.WorkqueueActivateWorkFtraceEvent = (function() {

            /**
             * Properties of a WorkqueueActivateWorkFtraceEvent.
             * @memberof perfetto.protos
             * @interface IWorkqueueActivateWorkFtraceEvent
             * @property {number|null} [work] WorkqueueActivateWorkFtraceEvent work
             */

            /**
             * Constructs a new WorkqueueActivateWorkFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a WorkqueueActivateWorkFtraceEvent.
             * @implements IWorkqueueActivateWorkFtraceEvent
             * @constructor
             * @param {perfetto.protos.IWorkqueueActivateWorkFtraceEvent=} [p] Properties to set
             */
            function WorkqueueActivateWorkFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * WorkqueueActivateWorkFtraceEvent work.
             * @member {number} work
             * @memberof perfetto.protos.WorkqueueActivateWorkFtraceEvent
             * @instance
             */
            WorkqueueActivateWorkFtraceEvent.prototype.work = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new WorkqueueActivateWorkFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.WorkqueueActivateWorkFtraceEvent
             * @static
             * @param {perfetto.protos.IWorkqueueActivateWorkFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.WorkqueueActivateWorkFtraceEvent} WorkqueueActivateWorkFtraceEvent instance
             */
            WorkqueueActivateWorkFtraceEvent.create = function create(properties) {
                return new WorkqueueActivateWorkFtraceEvent(properties);
            };

            /**
             * Encodes the specified WorkqueueActivateWorkFtraceEvent message. Does not implicitly {@link perfetto.protos.WorkqueueActivateWorkFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.WorkqueueActivateWorkFtraceEvent
             * @static
             * @param {perfetto.protos.IWorkqueueActivateWorkFtraceEvent} m WorkqueueActivateWorkFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            WorkqueueActivateWorkFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.work != null && Object.hasOwnProperty.call(m, "work"))
                    w.uint32(8).uint64(m.work);
                return w;
            };

            /**
             * Encodes the specified WorkqueueActivateWorkFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.WorkqueueActivateWorkFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.WorkqueueActivateWorkFtraceEvent
             * @static
             * @param {perfetto.protos.IWorkqueueActivateWorkFtraceEvent} message WorkqueueActivateWorkFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            WorkqueueActivateWorkFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a WorkqueueActivateWorkFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.WorkqueueActivateWorkFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.WorkqueueActivateWorkFtraceEvent} WorkqueueActivateWorkFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            WorkqueueActivateWorkFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.WorkqueueActivateWorkFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.work = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a WorkqueueActivateWorkFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.WorkqueueActivateWorkFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.WorkqueueActivateWorkFtraceEvent} WorkqueueActivateWorkFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            WorkqueueActivateWorkFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a WorkqueueActivateWorkFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.WorkqueueActivateWorkFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            WorkqueueActivateWorkFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.work != null && m.hasOwnProperty("work")) {
                    if (!$util.isInteger(m.work) && !(m.work && $util.isInteger(m.work.low) && $util.isInteger(m.work.high)))
                        return "work: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a WorkqueueActivateWorkFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.WorkqueueActivateWorkFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.WorkqueueActivateWorkFtraceEvent} WorkqueueActivateWorkFtraceEvent
             */
            WorkqueueActivateWorkFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.WorkqueueActivateWorkFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.WorkqueueActivateWorkFtraceEvent();
                if (d.work != null) {
                    if ($util.Long)
                        (m.work = $util.Long.fromValue(d.work)).unsigned = true;
                    else if (typeof d.work === "string")
                        m.work = parseInt(d.work, 10);
                    else if (typeof d.work === "number")
                        m.work = d.work;
                    else if (typeof d.work === "object")
                        m.work = new $util.LongBits(d.work.low >>> 0, d.work.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a WorkqueueActivateWorkFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.WorkqueueActivateWorkFtraceEvent
             * @static
             * @param {perfetto.protos.WorkqueueActivateWorkFtraceEvent} m WorkqueueActivateWorkFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            WorkqueueActivateWorkFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.work = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.work = o.longs === String ? "0" : 0;
                }
                if (m.work != null && m.hasOwnProperty("work")) {
                    if (typeof m.work === "number")
                        d.work = o.longs === String ? String(m.work) : m.work;
                    else
                        d.work = o.longs === String ? $util.Long.prototype.toString.call(m.work) : o.longs === Number ? new $util.LongBits(m.work.low >>> 0, m.work.high >>> 0).toNumber(true) : m.work;
                }
                return d;
            };

            /**
             * Converts this WorkqueueActivateWorkFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.WorkqueueActivateWorkFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            WorkqueueActivateWorkFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return WorkqueueActivateWorkFtraceEvent;
        })();

        protos.WorkqueueExecuteEndFtraceEvent = (function() {

            /**
             * Properties of a WorkqueueExecuteEndFtraceEvent.
             * @memberof perfetto.protos
             * @interface IWorkqueueExecuteEndFtraceEvent
             * @property {number|null} [work] WorkqueueExecuteEndFtraceEvent work
             * @property {number|null} ["function"] WorkqueueExecuteEndFtraceEvent function
             */

            /**
             * Constructs a new WorkqueueExecuteEndFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a WorkqueueExecuteEndFtraceEvent.
             * @implements IWorkqueueExecuteEndFtraceEvent
             * @constructor
             * @param {perfetto.protos.IWorkqueueExecuteEndFtraceEvent=} [p] Properties to set
             */
            function WorkqueueExecuteEndFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * WorkqueueExecuteEndFtraceEvent work.
             * @member {number} work
             * @memberof perfetto.protos.WorkqueueExecuteEndFtraceEvent
             * @instance
             */
            WorkqueueExecuteEndFtraceEvent.prototype.work = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * WorkqueueExecuteEndFtraceEvent function.
             * @member {number} function
             * @memberof perfetto.protos.WorkqueueExecuteEndFtraceEvent
             * @instance
             */
            WorkqueueExecuteEndFtraceEvent.prototype["function"] = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new WorkqueueExecuteEndFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.WorkqueueExecuteEndFtraceEvent
             * @static
             * @param {perfetto.protos.IWorkqueueExecuteEndFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.WorkqueueExecuteEndFtraceEvent} WorkqueueExecuteEndFtraceEvent instance
             */
            WorkqueueExecuteEndFtraceEvent.create = function create(properties) {
                return new WorkqueueExecuteEndFtraceEvent(properties);
            };

            /**
             * Encodes the specified WorkqueueExecuteEndFtraceEvent message. Does not implicitly {@link perfetto.protos.WorkqueueExecuteEndFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.WorkqueueExecuteEndFtraceEvent
             * @static
             * @param {perfetto.protos.IWorkqueueExecuteEndFtraceEvent} m WorkqueueExecuteEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            WorkqueueExecuteEndFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.work != null && Object.hasOwnProperty.call(m, "work"))
                    w.uint32(8).uint64(m.work);
                if (m["function"] != null && Object.hasOwnProperty.call(m, "function"))
                    w.uint32(16).uint64(m["function"]);
                return w;
            };

            /**
             * Encodes the specified WorkqueueExecuteEndFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.WorkqueueExecuteEndFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.WorkqueueExecuteEndFtraceEvent
             * @static
             * @param {perfetto.protos.IWorkqueueExecuteEndFtraceEvent} message WorkqueueExecuteEndFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            WorkqueueExecuteEndFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a WorkqueueExecuteEndFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.WorkqueueExecuteEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.WorkqueueExecuteEndFtraceEvent} WorkqueueExecuteEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            WorkqueueExecuteEndFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.WorkqueueExecuteEndFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.work = r.uint64();
                        break;
                    case 2:
                        m["function"] = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a WorkqueueExecuteEndFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.WorkqueueExecuteEndFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.WorkqueueExecuteEndFtraceEvent} WorkqueueExecuteEndFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            WorkqueueExecuteEndFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a WorkqueueExecuteEndFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.WorkqueueExecuteEndFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            WorkqueueExecuteEndFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.work != null && m.hasOwnProperty("work")) {
                    if (!$util.isInteger(m.work) && !(m.work && $util.isInteger(m.work.low) && $util.isInteger(m.work.high)))
                        return "work: integer|Long expected";
                }
                if (m["function"] != null && m.hasOwnProperty("function")) {
                    if (!$util.isInteger(m["function"]) && !(m["function"] && $util.isInteger(m["function"].low) && $util.isInteger(m["function"].high)))
                        return "function: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a WorkqueueExecuteEndFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.WorkqueueExecuteEndFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.WorkqueueExecuteEndFtraceEvent} WorkqueueExecuteEndFtraceEvent
             */
            WorkqueueExecuteEndFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.WorkqueueExecuteEndFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.WorkqueueExecuteEndFtraceEvent();
                if (d.work != null) {
                    if ($util.Long)
                        (m.work = $util.Long.fromValue(d.work)).unsigned = true;
                    else if (typeof d.work === "string")
                        m.work = parseInt(d.work, 10);
                    else if (typeof d.work === "number")
                        m.work = d.work;
                    else if (typeof d.work === "object")
                        m.work = new $util.LongBits(d.work.low >>> 0, d.work.high >>> 0).toNumber(true);
                }
                if (d["function"] != null) {
                    if ($util.Long)
                        (m["function"] = $util.Long.fromValue(d["function"])).unsigned = true;
                    else if (typeof d["function"] === "string")
                        m["function"] = parseInt(d["function"], 10);
                    else if (typeof d["function"] === "number")
                        m["function"] = d["function"];
                    else if (typeof d["function"] === "object")
                        m["function"] = new $util.LongBits(d["function"].low >>> 0, d["function"].high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a WorkqueueExecuteEndFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.WorkqueueExecuteEndFtraceEvent
             * @static
             * @param {perfetto.protos.WorkqueueExecuteEndFtraceEvent} m WorkqueueExecuteEndFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            WorkqueueExecuteEndFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.work = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.work = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d["function"] = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d["function"] = o.longs === String ? "0" : 0;
                }
                if (m.work != null && m.hasOwnProperty("work")) {
                    if (typeof m.work === "number")
                        d.work = o.longs === String ? String(m.work) : m.work;
                    else
                        d.work = o.longs === String ? $util.Long.prototype.toString.call(m.work) : o.longs === Number ? new $util.LongBits(m.work.low >>> 0, m.work.high >>> 0).toNumber(true) : m.work;
                }
                if (m["function"] != null && m.hasOwnProperty("function")) {
                    if (typeof m["function"] === "number")
                        d["function"] = o.longs === String ? String(m["function"]) : m["function"];
                    else
                        d["function"] = o.longs === String ? $util.Long.prototype.toString.call(m["function"]) : o.longs === Number ? new $util.LongBits(m["function"].low >>> 0, m["function"].high >>> 0).toNumber(true) : m["function"];
                }
                return d;
            };

            /**
             * Converts this WorkqueueExecuteEndFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.WorkqueueExecuteEndFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            WorkqueueExecuteEndFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return WorkqueueExecuteEndFtraceEvent;
        })();

        protos.WorkqueueExecuteStartFtraceEvent = (function() {

            /**
             * Properties of a WorkqueueExecuteStartFtraceEvent.
             * @memberof perfetto.protos
             * @interface IWorkqueueExecuteStartFtraceEvent
             * @property {number|null} [work] WorkqueueExecuteStartFtraceEvent work
             * @property {number|null} ["function"] WorkqueueExecuteStartFtraceEvent function
             */

            /**
             * Constructs a new WorkqueueExecuteStartFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a WorkqueueExecuteStartFtraceEvent.
             * @implements IWorkqueueExecuteStartFtraceEvent
             * @constructor
             * @param {perfetto.protos.IWorkqueueExecuteStartFtraceEvent=} [p] Properties to set
             */
            function WorkqueueExecuteStartFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * WorkqueueExecuteStartFtraceEvent work.
             * @member {number} work
             * @memberof perfetto.protos.WorkqueueExecuteStartFtraceEvent
             * @instance
             */
            WorkqueueExecuteStartFtraceEvent.prototype.work = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * WorkqueueExecuteStartFtraceEvent function.
             * @member {number} function
             * @memberof perfetto.protos.WorkqueueExecuteStartFtraceEvent
             * @instance
             */
            WorkqueueExecuteStartFtraceEvent.prototype["function"] = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new WorkqueueExecuteStartFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.WorkqueueExecuteStartFtraceEvent
             * @static
             * @param {perfetto.protos.IWorkqueueExecuteStartFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.WorkqueueExecuteStartFtraceEvent} WorkqueueExecuteStartFtraceEvent instance
             */
            WorkqueueExecuteStartFtraceEvent.create = function create(properties) {
                return new WorkqueueExecuteStartFtraceEvent(properties);
            };

            /**
             * Encodes the specified WorkqueueExecuteStartFtraceEvent message. Does not implicitly {@link perfetto.protos.WorkqueueExecuteStartFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.WorkqueueExecuteStartFtraceEvent
             * @static
             * @param {perfetto.protos.IWorkqueueExecuteStartFtraceEvent} m WorkqueueExecuteStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            WorkqueueExecuteStartFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.work != null && Object.hasOwnProperty.call(m, "work"))
                    w.uint32(8).uint64(m.work);
                if (m["function"] != null && Object.hasOwnProperty.call(m, "function"))
                    w.uint32(16).uint64(m["function"]);
                return w;
            };

            /**
             * Encodes the specified WorkqueueExecuteStartFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.WorkqueueExecuteStartFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.WorkqueueExecuteStartFtraceEvent
             * @static
             * @param {perfetto.protos.IWorkqueueExecuteStartFtraceEvent} message WorkqueueExecuteStartFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            WorkqueueExecuteStartFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a WorkqueueExecuteStartFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.WorkqueueExecuteStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.WorkqueueExecuteStartFtraceEvent} WorkqueueExecuteStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            WorkqueueExecuteStartFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.WorkqueueExecuteStartFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.work = r.uint64();
                        break;
                    case 2:
                        m["function"] = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a WorkqueueExecuteStartFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.WorkqueueExecuteStartFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.WorkqueueExecuteStartFtraceEvent} WorkqueueExecuteStartFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            WorkqueueExecuteStartFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a WorkqueueExecuteStartFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.WorkqueueExecuteStartFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            WorkqueueExecuteStartFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.work != null && m.hasOwnProperty("work")) {
                    if (!$util.isInteger(m.work) && !(m.work && $util.isInteger(m.work.low) && $util.isInteger(m.work.high)))
                        return "work: integer|Long expected";
                }
                if (m["function"] != null && m.hasOwnProperty("function")) {
                    if (!$util.isInteger(m["function"]) && !(m["function"] && $util.isInteger(m["function"].low) && $util.isInteger(m["function"].high)))
                        return "function: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a WorkqueueExecuteStartFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.WorkqueueExecuteStartFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.WorkqueueExecuteStartFtraceEvent} WorkqueueExecuteStartFtraceEvent
             */
            WorkqueueExecuteStartFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.WorkqueueExecuteStartFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.WorkqueueExecuteStartFtraceEvent();
                if (d.work != null) {
                    if ($util.Long)
                        (m.work = $util.Long.fromValue(d.work)).unsigned = true;
                    else if (typeof d.work === "string")
                        m.work = parseInt(d.work, 10);
                    else if (typeof d.work === "number")
                        m.work = d.work;
                    else if (typeof d.work === "object")
                        m.work = new $util.LongBits(d.work.low >>> 0, d.work.high >>> 0).toNumber(true);
                }
                if (d["function"] != null) {
                    if ($util.Long)
                        (m["function"] = $util.Long.fromValue(d["function"])).unsigned = true;
                    else if (typeof d["function"] === "string")
                        m["function"] = parseInt(d["function"], 10);
                    else if (typeof d["function"] === "number")
                        m["function"] = d["function"];
                    else if (typeof d["function"] === "object")
                        m["function"] = new $util.LongBits(d["function"].low >>> 0, d["function"].high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a WorkqueueExecuteStartFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.WorkqueueExecuteStartFtraceEvent
             * @static
             * @param {perfetto.protos.WorkqueueExecuteStartFtraceEvent} m WorkqueueExecuteStartFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            WorkqueueExecuteStartFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.work = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.work = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d["function"] = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d["function"] = o.longs === String ? "0" : 0;
                }
                if (m.work != null && m.hasOwnProperty("work")) {
                    if (typeof m.work === "number")
                        d.work = o.longs === String ? String(m.work) : m.work;
                    else
                        d.work = o.longs === String ? $util.Long.prototype.toString.call(m.work) : o.longs === Number ? new $util.LongBits(m.work.low >>> 0, m.work.high >>> 0).toNumber(true) : m.work;
                }
                if (m["function"] != null && m.hasOwnProperty("function")) {
                    if (typeof m["function"] === "number")
                        d["function"] = o.longs === String ? String(m["function"]) : m["function"];
                    else
                        d["function"] = o.longs === String ? $util.Long.prototype.toString.call(m["function"]) : o.longs === Number ? new $util.LongBits(m["function"].low >>> 0, m["function"].high >>> 0).toNumber(true) : m["function"];
                }
                return d;
            };

            /**
             * Converts this WorkqueueExecuteStartFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.WorkqueueExecuteStartFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            WorkqueueExecuteStartFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return WorkqueueExecuteStartFtraceEvent;
        })();

        protos.WorkqueueQueueWorkFtraceEvent = (function() {

            /**
             * Properties of a WorkqueueQueueWorkFtraceEvent.
             * @memberof perfetto.protos
             * @interface IWorkqueueQueueWorkFtraceEvent
             * @property {number|null} [work] WorkqueueQueueWorkFtraceEvent work
             * @property {number|null} ["function"] WorkqueueQueueWorkFtraceEvent function
             * @property {number|null} [workqueue] WorkqueueQueueWorkFtraceEvent workqueue
             * @property {number|null} [reqCpu] WorkqueueQueueWorkFtraceEvent reqCpu
             * @property {number|null} [cpu] WorkqueueQueueWorkFtraceEvent cpu
             */

            /**
             * Constructs a new WorkqueueQueueWorkFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a WorkqueueQueueWorkFtraceEvent.
             * @implements IWorkqueueQueueWorkFtraceEvent
             * @constructor
             * @param {perfetto.protos.IWorkqueueQueueWorkFtraceEvent=} [p] Properties to set
             */
            function WorkqueueQueueWorkFtraceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * WorkqueueQueueWorkFtraceEvent work.
             * @member {number} work
             * @memberof perfetto.protos.WorkqueueQueueWorkFtraceEvent
             * @instance
             */
            WorkqueueQueueWorkFtraceEvent.prototype.work = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * WorkqueueQueueWorkFtraceEvent function.
             * @member {number} function
             * @memberof perfetto.protos.WorkqueueQueueWorkFtraceEvent
             * @instance
             */
            WorkqueueQueueWorkFtraceEvent.prototype["function"] = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * WorkqueueQueueWorkFtraceEvent workqueue.
             * @member {number} workqueue
             * @memberof perfetto.protos.WorkqueueQueueWorkFtraceEvent
             * @instance
             */
            WorkqueueQueueWorkFtraceEvent.prototype.workqueue = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * WorkqueueQueueWorkFtraceEvent reqCpu.
             * @member {number} reqCpu
             * @memberof perfetto.protos.WorkqueueQueueWorkFtraceEvent
             * @instance
             */
            WorkqueueQueueWorkFtraceEvent.prototype.reqCpu = 0;

            /**
             * WorkqueueQueueWorkFtraceEvent cpu.
             * @member {number} cpu
             * @memberof perfetto.protos.WorkqueueQueueWorkFtraceEvent
             * @instance
             */
            WorkqueueQueueWorkFtraceEvent.prototype.cpu = 0;

            /**
             * Creates a new WorkqueueQueueWorkFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.WorkqueueQueueWorkFtraceEvent
             * @static
             * @param {perfetto.protos.IWorkqueueQueueWorkFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.WorkqueueQueueWorkFtraceEvent} WorkqueueQueueWorkFtraceEvent instance
             */
            WorkqueueQueueWorkFtraceEvent.create = function create(properties) {
                return new WorkqueueQueueWorkFtraceEvent(properties);
            };

            /**
             * Encodes the specified WorkqueueQueueWorkFtraceEvent message. Does not implicitly {@link perfetto.protos.WorkqueueQueueWorkFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.WorkqueueQueueWorkFtraceEvent
             * @static
             * @param {perfetto.protos.IWorkqueueQueueWorkFtraceEvent} m WorkqueueQueueWorkFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            WorkqueueQueueWorkFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.work != null && Object.hasOwnProperty.call(m, "work"))
                    w.uint32(8).uint64(m.work);
                if (m["function"] != null && Object.hasOwnProperty.call(m, "function"))
                    w.uint32(16).uint64(m["function"]);
                if (m.workqueue != null && Object.hasOwnProperty.call(m, "workqueue"))
                    w.uint32(24).uint64(m.workqueue);
                if (m.reqCpu != null && Object.hasOwnProperty.call(m, "reqCpu"))
                    w.uint32(32).uint32(m.reqCpu);
                if (m.cpu != null && Object.hasOwnProperty.call(m, "cpu"))
                    w.uint32(40).uint32(m.cpu);
                return w;
            };

            /**
             * Encodes the specified WorkqueueQueueWorkFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.WorkqueueQueueWorkFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.WorkqueueQueueWorkFtraceEvent
             * @static
             * @param {perfetto.protos.IWorkqueueQueueWorkFtraceEvent} message WorkqueueQueueWorkFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            WorkqueueQueueWorkFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a WorkqueueQueueWorkFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.WorkqueueQueueWorkFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.WorkqueueQueueWorkFtraceEvent} WorkqueueQueueWorkFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            WorkqueueQueueWorkFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.WorkqueueQueueWorkFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.work = r.uint64();
                        break;
                    case 2:
                        m["function"] = r.uint64();
                        break;
                    case 3:
                        m.workqueue = r.uint64();
                        break;
                    case 4:
                        m.reqCpu = r.uint32();
                        break;
                    case 5:
                        m.cpu = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a WorkqueueQueueWorkFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.WorkqueueQueueWorkFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.WorkqueueQueueWorkFtraceEvent} WorkqueueQueueWorkFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            WorkqueueQueueWorkFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a WorkqueueQueueWorkFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.WorkqueueQueueWorkFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            WorkqueueQueueWorkFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.work != null && m.hasOwnProperty("work")) {
                    if (!$util.isInteger(m.work) && !(m.work && $util.isInteger(m.work.low) && $util.isInteger(m.work.high)))
                        return "work: integer|Long expected";
                }
                if (m["function"] != null && m.hasOwnProperty("function")) {
                    if (!$util.isInteger(m["function"]) && !(m["function"] && $util.isInteger(m["function"].low) && $util.isInteger(m["function"].high)))
                        return "function: integer|Long expected";
                }
                if (m.workqueue != null && m.hasOwnProperty("workqueue")) {
                    if (!$util.isInteger(m.workqueue) && !(m.workqueue && $util.isInteger(m.workqueue.low) && $util.isInteger(m.workqueue.high)))
                        return "workqueue: integer|Long expected";
                }
                if (m.reqCpu != null && m.hasOwnProperty("reqCpu")) {
                    if (!$util.isInteger(m.reqCpu))
                        return "reqCpu: integer expected";
                }
                if (m.cpu != null && m.hasOwnProperty("cpu")) {
                    if (!$util.isInteger(m.cpu))
                        return "cpu: integer expected";
                }
                return null;
            };

            /**
             * Creates a WorkqueueQueueWorkFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.WorkqueueQueueWorkFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.WorkqueueQueueWorkFtraceEvent} WorkqueueQueueWorkFtraceEvent
             */
            WorkqueueQueueWorkFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.WorkqueueQueueWorkFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.WorkqueueQueueWorkFtraceEvent();
                if (d.work != null) {
                    if ($util.Long)
                        (m.work = $util.Long.fromValue(d.work)).unsigned = true;
                    else if (typeof d.work === "string")
                        m.work = parseInt(d.work, 10);
                    else if (typeof d.work === "number")
                        m.work = d.work;
                    else if (typeof d.work === "object")
                        m.work = new $util.LongBits(d.work.low >>> 0, d.work.high >>> 0).toNumber(true);
                }
                if (d["function"] != null) {
                    if ($util.Long)
                        (m["function"] = $util.Long.fromValue(d["function"])).unsigned = true;
                    else if (typeof d["function"] === "string")
                        m["function"] = parseInt(d["function"], 10);
                    else if (typeof d["function"] === "number")
                        m["function"] = d["function"];
                    else if (typeof d["function"] === "object")
                        m["function"] = new $util.LongBits(d["function"].low >>> 0, d["function"].high >>> 0).toNumber(true);
                }
                if (d.workqueue != null) {
                    if ($util.Long)
                        (m.workqueue = $util.Long.fromValue(d.workqueue)).unsigned = true;
                    else if (typeof d.workqueue === "string")
                        m.workqueue = parseInt(d.workqueue, 10);
                    else if (typeof d.workqueue === "number")
                        m.workqueue = d.workqueue;
                    else if (typeof d.workqueue === "object")
                        m.workqueue = new $util.LongBits(d.workqueue.low >>> 0, d.workqueue.high >>> 0).toNumber(true);
                }
                if (d.reqCpu != null) {
                    m.reqCpu = d.reqCpu >>> 0;
                }
                if (d.cpu != null) {
                    m.cpu = d.cpu >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a WorkqueueQueueWorkFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.WorkqueueQueueWorkFtraceEvent
             * @static
             * @param {perfetto.protos.WorkqueueQueueWorkFtraceEvent} m WorkqueueQueueWorkFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            WorkqueueQueueWorkFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.work = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.work = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d["function"] = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d["function"] = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.workqueue = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.workqueue = o.longs === String ? "0" : 0;
                    d.reqCpu = 0;
                    d.cpu = 0;
                }
                if (m.work != null && m.hasOwnProperty("work")) {
                    if (typeof m.work === "number")
                        d.work = o.longs === String ? String(m.work) : m.work;
                    else
                        d.work = o.longs === String ? $util.Long.prototype.toString.call(m.work) : o.longs === Number ? new $util.LongBits(m.work.low >>> 0, m.work.high >>> 0).toNumber(true) : m.work;
                }
                if (m["function"] != null && m.hasOwnProperty("function")) {
                    if (typeof m["function"] === "number")
                        d["function"] = o.longs === String ? String(m["function"]) : m["function"];
                    else
                        d["function"] = o.longs === String ? $util.Long.prototype.toString.call(m["function"]) : o.longs === Number ? new $util.LongBits(m["function"].low >>> 0, m["function"].high >>> 0).toNumber(true) : m["function"];
                }
                if (m.workqueue != null && m.hasOwnProperty("workqueue")) {
                    if (typeof m.workqueue === "number")
                        d.workqueue = o.longs === String ? String(m.workqueue) : m.workqueue;
                    else
                        d.workqueue = o.longs === String ? $util.Long.prototype.toString.call(m.workqueue) : o.longs === Number ? new $util.LongBits(m.workqueue.low >>> 0, m.workqueue.high >>> 0).toNumber(true) : m.workqueue;
                }
                if (m.reqCpu != null && m.hasOwnProperty("reqCpu")) {
                    d.reqCpu = m.reqCpu;
                }
                if (m.cpu != null && m.hasOwnProperty("cpu")) {
                    d.cpu = m.cpu;
                }
                return d;
            };

            /**
             * Converts this WorkqueueQueueWorkFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.WorkqueueQueueWorkFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            WorkqueueQueueWorkFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return WorkqueueQueueWorkFtraceEvent;
        })();

        protos.GenericFtraceEvent = (function() {

            /**
             * Properties of a GenericFtraceEvent.
             * @memberof perfetto.protos
             * @interface IGenericFtraceEvent
             * @property {string|null} [eventName] GenericFtraceEvent eventName
             * @property {Array.<perfetto.protos.GenericFtraceEvent.IField>|null} [field] GenericFtraceEvent field
             */

            /**
             * Constructs a new GenericFtraceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a GenericFtraceEvent.
             * @implements IGenericFtraceEvent
             * @constructor
             * @param {perfetto.protos.IGenericFtraceEvent=} [p] Properties to set
             */
            function GenericFtraceEvent(p) {
                this.field = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * GenericFtraceEvent eventName.
             * @member {string} eventName
             * @memberof perfetto.protos.GenericFtraceEvent
             * @instance
             */
            GenericFtraceEvent.prototype.eventName = "";

            /**
             * GenericFtraceEvent field.
             * @member {Array.<perfetto.protos.GenericFtraceEvent.IField>} field
             * @memberof perfetto.protos.GenericFtraceEvent
             * @instance
             */
            GenericFtraceEvent.prototype.field = $util.emptyArray;

            /**
             * Creates a new GenericFtraceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.GenericFtraceEvent
             * @static
             * @param {perfetto.protos.IGenericFtraceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.GenericFtraceEvent} GenericFtraceEvent instance
             */
            GenericFtraceEvent.create = function create(properties) {
                return new GenericFtraceEvent(properties);
            };

            /**
             * Encodes the specified GenericFtraceEvent message. Does not implicitly {@link perfetto.protos.GenericFtraceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.GenericFtraceEvent
             * @static
             * @param {perfetto.protos.IGenericFtraceEvent} m GenericFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GenericFtraceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.eventName != null && Object.hasOwnProperty.call(m, "eventName"))
                    w.uint32(10).string(m.eventName);
                if (m.field != null && m.field.length) {
                    for (var i = 0; i < m.field.length; ++i)
                        $root.perfetto.protos.GenericFtraceEvent.Field.encode(m.field[i], w.uint32(18).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified GenericFtraceEvent message, length delimited. Does not implicitly {@link perfetto.protos.GenericFtraceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.GenericFtraceEvent
             * @static
             * @param {perfetto.protos.IGenericFtraceEvent} message GenericFtraceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GenericFtraceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a GenericFtraceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.GenericFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.GenericFtraceEvent} GenericFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GenericFtraceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.GenericFtraceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.eventName = r.string();
                        break;
                    case 2:
                        if (!(m.field && m.field.length))
                            m.field = [];
                        m.field.push($root.perfetto.protos.GenericFtraceEvent.Field.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a GenericFtraceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.GenericFtraceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.GenericFtraceEvent} GenericFtraceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GenericFtraceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a GenericFtraceEvent message.
             * @function verify
             * @memberof perfetto.protos.GenericFtraceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            GenericFtraceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.eventName != null && m.hasOwnProperty("eventName")) {
                    if (!$util.isString(m.eventName))
                        return "eventName: string expected";
                }
                if (m.field != null && m.hasOwnProperty("field")) {
                    if (!Array.isArray(m.field))
                        return "field: array expected";
                    for (var i = 0; i < m.field.length; ++i) {
                        {
                            var e = $root.perfetto.protos.GenericFtraceEvent.Field.verify(m.field[i]);
                            if (e)
                                return "field." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a GenericFtraceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.GenericFtraceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.GenericFtraceEvent} GenericFtraceEvent
             */
            GenericFtraceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.GenericFtraceEvent)
                    return d;
                var m = new $root.perfetto.protos.GenericFtraceEvent();
                if (d.eventName != null) {
                    m.eventName = String(d.eventName);
                }
                if (d.field) {
                    if (!Array.isArray(d.field))
                        throw TypeError(".perfetto.protos.GenericFtraceEvent.field: array expected");
                    m.field = [];
                    for (var i = 0; i < d.field.length; ++i) {
                        if (typeof d.field[i] !== "object")
                            throw TypeError(".perfetto.protos.GenericFtraceEvent.field: object expected");
                        m.field[i] = $root.perfetto.protos.GenericFtraceEvent.Field.fromObject(d.field[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a GenericFtraceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.GenericFtraceEvent
             * @static
             * @param {perfetto.protos.GenericFtraceEvent} m GenericFtraceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            GenericFtraceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.field = [];
                }
                if (o.defaults) {
                    d.eventName = "";
                }
                if (m.eventName != null && m.hasOwnProperty("eventName")) {
                    d.eventName = m.eventName;
                }
                if (m.field && m.field.length) {
                    d.field = [];
                    for (var j = 0; j < m.field.length; ++j) {
                        d.field[j] = $root.perfetto.protos.GenericFtraceEvent.Field.toObject(m.field[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this GenericFtraceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.GenericFtraceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            GenericFtraceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            GenericFtraceEvent.Field = (function() {

                /**
                 * Properties of a Field.
                 * @memberof perfetto.protos.GenericFtraceEvent
                 * @interface IField
                 * @property {string|null} [name] Field name
                 * @property {string|null} [strValue] Field strValue
                 * @property {number|null} [intValue] Field intValue
                 * @property {number|null} [uintValue] Field uintValue
                 */

                /**
                 * Constructs a new Field.
                 * @memberof perfetto.protos.GenericFtraceEvent
                 * @classdesc Represents a Field.
                 * @implements IField
                 * @constructor
                 * @param {perfetto.protos.GenericFtraceEvent.IField=} [p] Properties to set
                 */
                function Field(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Field name.
                 * @member {string} name
                 * @memberof perfetto.protos.GenericFtraceEvent.Field
                 * @instance
                 */
                Field.prototype.name = "";

                /**
                 * Field strValue.
                 * @member {string} strValue
                 * @memberof perfetto.protos.GenericFtraceEvent.Field
                 * @instance
                 */
                Field.prototype.strValue = "";

                /**
                 * Field intValue.
                 * @member {number} intValue
                 * @memberof perfetto.protos.GenericFtraceEvent.Field
                 * @instance
                 */
                Field.prototype.intValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Field uintValue.
                 * @member {number} uintValue
                 * @memberof perfetto.protos.GenericFtraceEvent.Field
                 * @instance
                 */
                Field.prototype.uintValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * Field value.
                 * @member {"strValue"|"intValue"|"uintValue"|undefined} value
                 * @memberof perfetto.protos.GenericFtraceEvent.Field
                 * @instance
                 */
                Object.defineProperty(Field.prototype, "value", {
                    get: $util.oneOfGetter($oneOfFields = ["strValue", "intValue", "uintValue"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new Field instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.GenericFtraceEvent.Field
                 * @static
                 * @param {perfetto.protos.GenericFtraceEvent.IField=} [properties] Properties to set
                 * @returns {perfetto.protos.GenericFtraceEvent.Field} Field instance
                 */
                Field.create = function create(properties) {
                    return new Field(properties);
                };

                /**
                 * Encodes the specified Field message. Does not implicitly {@link perfetto.protos.GenericFtraceEvent.Field.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.GenericFtraceEvent.Field
                 * @static
                 * @param {perfetto.protos.GenericFtraceEvent.IField} m Field message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Field.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(10).string(m.name);
                    if (m.strValue != null && Object.hasOwnProperty.call(m, "strValue"))
                        w.uint32(26).string(m.strValue);
                    if (m.intValue != null && Object.hasOwnProperty.call(m, "intValue"))
                        w.uint32(32).int64(m.intValue);
                    if (m.uintValue != null && Object.hasOwnProperty.call(m, "uintValue"))
                        w.uint32(40).uint64(m.uintValue);
                    return w;
                };

                /**
                 * Encodes the specified Field message, length delimited. Does not implicitly {@link perfetto.protos.GenericFtraceEvent.Field.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.GenericFtraceEvent.Field
                 * @static
                 * @param {perfetto.protos.GenericFtraceEvent.IField} message Field message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Field.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Field message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.GenericFtraceEvent.Field
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.GenericFtraceEvent.Field} Field
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Field.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.GenericFtraceEvent.Field();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.name = r.string();
                            break;
                        case 3:
                            m.strValue = r.string();
                            break;
                        case 4:
                            m.intValue = r.int64();
                            break;
                        case 5:
                            m.uintValue = r.uint64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Field message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.GenericFtraceEvent.Field
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.GenericFtraceEvent.Field} Field
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Field.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Field message.
                 * @function verify
                 * @memberof perfetto.protos.GenericFtraceEvent.Field
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Field.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    var p = {};
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    if (m.strValue != null && m.hasOwnProperty("strValue")) {
                        p.value = 1;
                        if (!$util.isString(m.strValue))
                            return "strValue: string expected";
                    }
                    if (m.intValue != null && m.hasOwnProperty("intValue")) {
                        if (p.value === 1)
                            return "value: multiple values";
                        p.value = 1;
                        if (!$util.isInteger(m.intValue) && !(m.intValue && $util.isInteger(m.intValue.low) && $util.isInteger(m.intValue.high)))
                            return "intValue: integer|Long expected";
                    }
                    if (m.uintValue != null && m.hasOwnProperty("uintValue")) {
                        if (p.value === 1)
                            return "value: multiple values";
                        p.value = 1;
                        if (!$util.isInteger(m.uintValue) && !(m.uintValue && $util.isInteger(m.uintValue.low) && $util.isInteger(m.uintValue.high)))
                            return "uintValue: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a Field message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.GenericFtraceEvent.Field
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.GenericFtraceEvent.Field} Field
                 */
                Field.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.GenericFtraceEvent.Field)
                        return d;
                    var m = new $root.perfetto.protos.GenericFtraceEvent.Field();
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    if (d.strValue != null) {
                        m.strValue = String(d.strValue);
                    }
                    if (d.intValue != null) {
                        if ($util.Long)
                            (m.intValue = $util.Long.fromValue(d.intValue)).unsigned = false;
                        else if (typeof d.intValue === "string")
                            m.intValue = parseInt(d.intValue, 10);
                        else if (typeof d.intValue === "number")
                            m.intValue = d.intValue;
                        else if (typeof d.intValue === "object")
                            m.intValue = new $util.LongBits(d.intValue.low >>> 0, d.intValue.high >>> 0).toNumber();
                    }
                    if (d.uintValue != null) {
                        if ($util.Long)
                            (m.uintValue = $util.Long.fromValue(d.uintValue)).unsigned = true;
                        else if (typeof d.uintValue === "string")
                            m.uintValue = parseInt(d.uintValue, 10);
                        else if (typeof d.uintValue === "number")
                            m.uintValue = d.uintValue;
                        else if (typeof d.uintValue === "object")
                            m.uintValue = new $util.LongBits(d.uintValue.low >>> 0, d.uintValue.high >>> 0).toNumber(true);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Field message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.GenericFtraceEvent.Field
                 * @static
                 * @param {perfetto.protos.GenericFtraceEvent.Field} m Field
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Field.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.name = "";
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    if (m.strValue != null && m.hasOwnProperty("strValue")) {
                        d.strValue = m.strValue;
                        if (o.oneofs)
                            d.value = "strValue";
                    }
                    if (m.intValue != null && m.hasOwnProperty("intValue")) {
                        if (typeof m.intValue === "number")
                            d.intValue = o.longs === String ? String(m.intValue) : m.intValue;
                        else
                            d.intValue = o.longs === String ? $util.Long.prototype.toString.call(m.intValue) : o.longs === Number ? new $util.LongBits(m.intValue.low >>> 0, m.intValue.high >>> 0).toNumber() : m.intValue;
                        if (o.oneofs)
                            d.value = "intValue";
                    }
                    if (m.uintValue != null && m.hasOwnProperty("uintValue")) {
                        if (typeof m.uintValue === "number")
                            d.uintValue = o.longs === String ? String(m.uintValue) : m.uintValue;
                        else
                            d.uintValue = o.longs === String ? $util.Long.prototype.toString.call(m.uintValue) : o.longs === Number ? new $util.LongBits(m.uintValue.low >>> 0, m.uintValue.high >>> 0).toNumber(true) : m.uintValue;
                        if (o.oneofs)
                            d.value = "uintValue";
                    }
                    return d;
                };

                /**
                 * Converts this Field to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.GenericFtraceEvent.Field
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Field.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Field;
            })();

            return GenericFtraceEvent;
        })();

        protos.FtraceCpuStats = (function() {

            /**
             * Properties of a FtraceCpuStats.
             * @memberof perfetto.protos
             * @interface IFtraceCpuStats
             * @property {number|null} [cpu] FtraceCpuStats cpu
             * @property {number|null} [entries] FtraceCpuStats entries
             * @property {number|null} [overrun] FtraceCpuStats overrun
             * @property {number|null} [commitOverrun] FtraceCpuStats commitOverrun
             * @property {number|null} [bytesRead] FtraceCpuStats bytesRead
             * @property {number|null} [oldestEventTs] FtraceCpuStats oldestEventTs
             * @property {number|null} [nowTs] FtraceCpuStats nowTs
             * @property {number|null} [droppedEvents] FtraceCpuStats droppedEvents
             * @property {number|null} [readEvents] FtraceCpuStats readEvents
             */

            /**
             * Constructs a new FtraceCpuStats.
             * @memberof perfetto.protos
             * @classdesc Represents a FtraceCpuStats.
             * @implements IFtraceCpuStats
             * @constructor
             * @param {perfetto.protos.IFtraceCpuStats=} [p] Properties to set
             */
            function FtraceCpuStats(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * FtraceCpuStats cpu.
             * @member {number} cpu
             * @memberof perfetto.protos.FtraceCpuStats
             * @instance
             */
            FtraceCpuStats.prototype.cpu = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * FtraceCpuStats entries.
             * @member {number} entries
             * @memberof perfetto.protos.FtraceCpuStats
             * @instance
             */
            FtraceCpuStats.prototype.entries = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * FtraceCpuStats overrun.
             * @member {number} overrun
             * @memberof perfetto.protos.FtraceCpuStats
             * @instance
             */
            FtraceCpuStats.prototype.overrun = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * FtraceCpuStats commitOverrun.
             * @member {number} commitOverrun
             * @memberof perfetto.protos.FtraceCpuStats
             * @instance
             */
            FtraceCpuStats.prototype.commitOverrun = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * FtraceCpuStats bytesRead.
             * @member {number} bytesRead
             * @memberof perfetto.protos.FtraceCpuStats
             * @instance
             */
            FtraceCpuStats.prototype.bytesRead = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * FtraceCpuStats oldestEventTs.
             * @member {number} oldestEventTs
             * @memberof perfetto.protos.FtraceCpuStats
             * @instance
             */
            FtraceCpuStats.prototype.oldestEventTs = 0;

            /**
             * FtraceCpuStats nowTs.
             * @member {number} nowTs
             * @memberof perfetto.protos.FtraceCpuStats
             * @instance
             */
            FtraceCpuStats.prototype.nowTs = 0;

            /**
             * FtraceCpuStats droppedEvents.
             * @member {number} droppedEvents
             * @memberof perfetto.protos.FtraceCpuStats
             * @instance
             */
            FtraceCpuStats.prototype.droppedEvents = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * FtraceCpuStats readEvents.
             * @member {number} readEvents
             * @memberof perfetto.protos.FtraceCpuStats
             * @instance
             */
            FtraceCpuStats.prototype.readEvents = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new FtraceCpuStats instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.FtraceCpuStats
             * @static
             * @param {perfetto.protos.IFtraceCpuStats=} [properties] Properties to set
             * @returns {perfetto.protos.FtraceCpuStats} FtraceCpuStats instance
             */
            FtraceCpuStats.create = function create(properties) {
                return new FtraceCpuStats(properties);
            };

            /**
             * Encodes the specified FtraceCpuStats message. Does not implicitly {@link perfetto.protos.FtraceCpuStats.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.FtraceCpuStats
             * @static
             * @param {perfetto.protos.IFtraceCpuStats} m FtraceCpuStats message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FtraceCpuStats.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.cpu != null && Object.hasOwnProperty.call(m, "cpu"))
                    w.uint32(8).uint64(m.cpu);
                if (m.entries != null && Object.hasOwnProperty.call(m, "entries"))
                    w.uint32(16).uint64(m.entries);
                if (m.overrun != null && Object.hasOwnProperty.call(m, "overrun"))
                    w.uint32(24).uint64(m.overrun);
                if (m.commitOverrun != null && Object.hasOwnProperty.call(m, "commitOverrun"))
                    w.uint32(32).uint64(m.commitOverrun);
                if (m.bytesRead != null && Object.hasOwnProperty.call(m, "bytesRead"))
                    w.uint32(40).uint64(m.bytesRead);
                if (m.oldestEventTs != null && Object.hasOwnProperty.call(m, "oldestEventTs"))
                    w.uint32(49).double(m.oldestEventTs);
                if (m.nowTs != null && Object.hasOwnProperty.call(m, "nowTs"))
                    w.uint32(57).double(m.nowTs);
                if (m.droppedEvents != null && Object.hasOwnProperty.call(m, "droppedEvents"))
                    w.uint32(64).uint64(m.droppedEvents);
                if (m.readEvents != null && Object.hasOwnProperty.call(m, "readEvents"))
                    w.uint32(72).uint64(m.readEvents);
                return w;
            };

            /**
             * Encodes the specified FtraceCpuStats message, length delimited. Does not implicitly {@link perfetto.protos.FtraceCpuStats.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.FtraceCpuStats
             * @static
             * @param {perfetto.protos.IFtraceCpuStats} message FtraceCpuStats message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FtraceCpuStats.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a FtraceCpuStats message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.FtraceCpuStats
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.FtraceCpuStats} FtraceCpuStats
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FtraceCpuStats.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FtraceCpuStats();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.cpu = r.uint64();
                        break;
                    case 2:
                        m.entries = r.uint64();
                        break;
                    case 3:
                        m.overrun = r.uint64();
                        break;
                    case 4:
                        m.commitOverrun = r.uint64();
                        break;
                    case 5:
                        m.bytesRead = r.uint64();
                        break;
                    case 6:
                        m.oldestEventTs = r.double();
                        break;
                    case 7:
                        m.nowTs = r.double();
                        break;
                    case 8:
                        m.droppedEvents = r.uint64();
                        break;
                    case 9:
                        m.readEvents = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a FtraceCpuStats message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.FtraceCpuStats
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.FtraceCpuStats} FtraceCpuStats
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FtraceCpuStats.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a FtraceCpuStats message.
             * @function verify
             * @memberof perfetto.protos.FtraceCpuStats
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            FtraceCpuStats.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.cpu != null && m.hasOwnProperty("cpu")) {
                    if (!$util.isInteger(m.cpu) && !(m.cpu && $util.isInteger(m.cpu.low) && $util.isInteger(m.cpu.high)))
                        return "cpu: integer|Long expected";
                }
                if (m.entries != null && m.hasOwnProperty("entries")) {
                    if (!$util.isInteger(m.entries) && !(m.entries && $util.isInteger(m.entries.low) && $util.isInteger(m.entries.high)))
                        return "entries: integer|Long expected";
                }
                if (m.overrun != null && m.hasOwnProperty("overrun")) {
                    if (!$util.isInteger(m.overrun) && !(m.overrun && $util.isInteger(m.overrun.low) && $util.isInteger(m.overrun.high)))
                        return "overrun: integer|Long expected";
                }
                if (m.commitOverrun != null && m.hasOwnProperty("commitOverrun")) {
                    if (!$util.isInteger(m.commitOverrun) && !(m.commitOverrun && $util.isInteger(m.commitOverrun.low) && $util.isInteger(m.commitOverrun.high)))
                        return "commitOverrun: integer|Long expected";
                }
                if (m.bytesRead != null && m.hasOwnProperty("bytesRead")) {
                    if (!$util.isInteger(m.bytesRead) && !(m.bytesRead && $util.isInteger(m.bytesRead.low) && $util.isInteger(m.bytesRead.high)))
                        return "bytesRead: integer|Long expected";
                }
                if (m.oldestEventTs != null && m.hasOwnProperty("oldestEventTs")) {
                    if (typeof m.oldestEventTs !== "number")
                        return "oldestEventTs: number expected";
                }
                if (m.nowTs != null && m.hasOwnProperty("nowTs")) {
                    if (typeof m.nowTs !== "number")
                        return "nowTs: number expected";
                }
                if (m.droppedEvents != null && m.hasOwnProperty("droppedEvents")) {
                    if (!$util.isInteger(m.droppedEvents) && !(m.droppedEvents && $util.isInteger(m.droppedEvents.low) && $util.isInteger(m.droppedEvents.high)))
                        return "droppedEvents: integer|Long expected";
                }
                if (m.readEvents != null && m.hasOwnProperty("readEvents")) {
                    if (!$util.isInteger(m.readEvents) && !(m.readEvents && $util.isInteger(m.readEvents.low) && $util.isInteger(m.readEvents.high)))
                        return "readEvents: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a FtraceCpuStats message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.FtraceCpuStats
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.FtraceCpuStats} FtraceCpuStats
             */
            FtraceCpuStats.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.FtraceCpuStats)
                    return d;
                var m = new $root.perfetto.protos.FtraceCpuStats();
                if (d.cpu != null) {
                    if ($util.Long)
                        (m.cpu = $util.Long.fromValue(d.cpu)).unsigned = true;
                    else if (typeof d.cpu === "string")
                        m.cpu = parseInt(d.cpu, 10);
                    else if (typeof d.cpu === "number")
                        m.cpu = d.cpu;
                    else if (typeof d.cpu === "object")
                        m.cpu = new $util.LongBits(d.cpu.low >>> 0, d.cpu.high >>> 0).toNumber(true);
                }
                if (d.entries != null) {
                    if ($util.Long)
                        (m.entries = $util.Long.fromValue(d.entries)).unsigned = true;
                    else if (typeof d.entries === "string")
                        m.entries = parseInt(d.entries, 10);
                    else if (typeof d.entries === "number")
                        m.entries = d.entries;
                    else if (typeof d.entries === "object")
                        m.entries = new $util.LongBits(d.entries.low >>> 0, d.entries.high >>> 0).toNumber(true);
                }
                if (d.overrun != null) {
                    if ($util.Long)
                        (m.overrun = $util.Long.fromValue(d.overrun)).unsigned = true;
                    else if (typeof d.overrun === "string")
                        m.overrun = parseInt(d.overrun, 10);
                    else if (typeof d.overrun === "number")
                        m.overrun = d.overrun;
                    else if (typeof d.overrun === "object")
                        m.overrun = new $util.LongBits(d.overrun.low >>> 0, d.overrun.high >>> 0).toNumber(true);
                }
                if (d.commitOverrun != null) {
                    if ($util.Long)
                        (m.commitOverrun = $util.Long.fromValue(d.commitOverrun)).unsigned = true;
                    else if (typeof d.commitOverrun === "string")
                        m.commitOverrun = parseInt(d.commitOverrun, 10);
                    else if (typeof d.commitOverrun === "number")
                        m.commitOverrun = d.commitOverrun;
                    else if (typeof d.commitOverrun === "object")
                        m.commitOverrun = new $util.LongBits(d.commitOverrun.low >>> 0, d.commitOverrun.high >>> 0).toNumber(true);
                }
                if (d.bytesRead != null) {
                    if ($util.Long)
                        (m.bytesRead = $util.Long.fromValue(d.bytesRead)).unsigned = true;
                    else if (typeof d.bytesRead === "string")
                        m.bytesRead = parseInt(d.bytesRead, 10);
                    else if (typeof d.bytesRead === "number")
                        m.bytesRead = d.bytesRead;
                    else if (typeof d.bytesRead === "object")
                        m.bytesRead = new $util.LongBits(d.bytesRead.low >>> 0, d.bytesRead.high >>> 0).toNumber(true);
                }
                if (d.oldestEventTs != null) {
                    m.oldestEventTs = Number(d.oldestEventTs);
                }
                if (d.nowTs != null) {
                    m.nowTs = Number(d.nowTs);
                }
                if (d.droppedEvents != null) {
                    if ($util.Long)
                        (m.droppedEvents = $util.Long.fromValue(d.droppedEvents)).unsigned = true;
                    else if (typeof d.droppedEvents === "string")
                        m.droppedEvents = parseInt(d.droppedEvents, 10);
                    else if (typeof d.droppedEvents === "number")
                        m.droppedEvents = d.droppedEvents;
                    else if (typeof d.droppedEvents === "object")
                        m.droppedEvents = new $util.LongBits(d.droppedEvents.low >>> 0, d.droppedEvents.high >>> 0).toNumber(true);
                }
                if (d.readEvents != null) {
                    if ($util.Long)
                        (m.readEvents = $util.Long.fromValue(d.readEvents)).unsigned = true;
                    else if (typeof d.readEvents === "string")
                        m.readEvents = parseInt(d.readEvents, 10);
                    else if (typeof d.readEvents === "number")
                        m.readEvents = d.readEvents;
                    else if (typeof d.readEvents === "object")
                        m.readEvents = new $util.LongBits(d.readEvents.low >>> 0, d.readEvents.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a FtraceCpuStats message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.FtraceCpuStats
             * @static
             * @param {perfetto.protos.FtraceCpuStats} m FtraceCpuStats
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            FtraceCpuStats.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.cpu = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.cpu = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.entries = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.entries = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.overrun = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.overrun = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.commitOverrun = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.commitOverrun = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.bytesRead = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.bytesRead = o.longs === String ? "0" : 0;
                    d.oldestEventTs = 0;
                    d.nowTs = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.droppedEvents = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.droppedEvents = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.readEvents = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.readEvents = o.longs === String ? "0" : 0;
                }
                if (m.cpu != null && m.hasOwnProperty("cpu")) {
                    if (typeof m.cpu === "number")
                        d.cpu = o.longs === String ? String(m.cpu) : m.cpu;
                    else
                        d.cpu = o.longs === String ? $util.Long.prototype.toString.call(m.cpu) : o.longs === Number ? new $util.LongBits(m.cpu.low >>> 0, m.cpu.high >>> 0).toNumber(true) : m.cpu;
                }
                if (m.entries != null && m.hasOwnProperty("entries")) {
                    if (typeof m.entries === "number")
                        d.entries = o.longs === String ? String(m.entries) : m.entries;
                    else
                        d.entries = o.longs === String ? $util.Long.prototype.toString.call(m.entries) : o.longs === Number ? new $util.LongBits(m.entries.low >>> 0, m.entries.high >>> 0).toNumber(true) : m.entries;
                }
                if (m.overrun != null && m.hasOwnProperty("overrun")) {
                    if (typeof m.overrun === "number")
                        d.overrun = o.longs === String ? String(m.overrun) : m.overrun;
                    else
                        d.overrun = o.longs === String ? $util.Long.prototype.toString.call(m.overrun) : o.longs === Number ? new $util.LongBits(m.overrun.low >>> 0, m.overrun.high >>> 0).toNumber(true) : m.overrun;
                }
                if (m.commitOverrun != null && m.hasOwnProperty("commitOverrun")) {
                    if (typeof m.commitOverrun === "number")
                        d.commitOverrun = o.longs === String ? String(m.commitOverrun) : m.commitOverrun;
                    else
                        d.commitOverrun = o.longs === String ? $util.Long.prototype.toString.call(m.commitOverrun) : o.longs === Number ? new $util.LongBits(m.commitOverrun.low >>> 0, m.commitOverrun.high >>> 0).toNumber(true) : m.commitOverrun;
                }
                if (m.bytesRead != null && m.hasOwnProperty("bytesRead")) {
                    if (typeof m.bytesRead === "number")
                        d.bytesRead = o.longs === String ? String(m.bytesRead) : m.bytesRead;
                    else
                        d.bytesRead = o.longs === String ? $util.Long.prototype.toString.call(m.bytesRead) : o.longs === Number ? new $util.LongBits(m.bytesRead.low >>> 0, m.bytesRead.high >>> 0).toNumber(true) : m.bytesRead;
                }
                if (m.oldestEventTs != null && m.hasOwnProperty("oldestEventTs")) {
                    d.oldestEventTs = o.json && !isFinite(m.oldestEventTs) ? String(m.oldestEventTs) : m.oldestEventTs;
                }
                if (m.nowTs != null && m.hasOwnProperty("nowTs")) {
                    d.nowTs = o.json && !isFinite(m.nowTs) ? String(m.nowTs) : m.nowTs;
                }
                if (m.droppedEvents != null && m.hasOwnProperty("droppedEvents")) {
                    if (typeof m.droppedEvents === "number")
                        d.droppedEvents = o.longs === String ? String(m.droppedEvents) : m.droppedEvents;
                    else
                        d.droppedEvents = o.longs === String ? $util.Long.prototype.toString.call(m.droppedEvents) : o.longs === Number ? new $util.LongBits(m.droppedEvents.low >>> 0, m.droppedEvents.high >>> 0).toNumber(true) : m.droppedEvents;
                }
                if (m.readEvents != null && m.hasOwnProperty("readEvents")) {
                    if (typeof m.readEvents === "number")
                        d.readEvents = o.longs === String ? String(m.readEvents) : m.readEvents;
                    else
                        d.readEvents = o.longs === String ? $util.Long.prototype.toString.call(m.readEvents) : o.longs === Number ? new $util.LongBits(m.readEvents.low >>> 0, m.readEvents.high >>> 0).toNumber(true) : m.readEvents;
                }
                return d;
            };

            /**
             * Converts this FtraceCpuStats to JSON.
             * @function toJSON
             * @memberof perfetto.protos.FtraceCpuStats
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            FtraceCpuStats.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return FtraceCpuStats;
        })();

        protos.FtraceStats = (function() {

            /**
             * Properties of a FtraceStats.
             * @memberof perfetto.protos
             * @interface IFtraceStats
             * @property {perfetto.protos.FtraceStats.Phase|null} [phase] FtraceStats phase
             * @property {Array.<perfetto.protos.IFtraceCpuStats>|null} [cpuStats] FtraceStats cpuStats
             * @property {number|null} [kernelSymbolsParsed] FtraceStats kernelSymbolsParsed
             * @property {number|null} [kernelSymbolsMemKb] FtraceStats kernelSymbolsMemKb
             * @property {string|null} [atraceErrors] FtraceStats atraceErrors
             * @property {Array.<string>|null} [unknownFtraceEvents] FtraceStats unknownFtraceEvents
             * @property {Array.<string>|null} [failedFtraceEvents] FtraceStats failedFtraceEvents
             */

            /**
             * Constructs a new FtraceStats.
             * @memberof perfetto.protos
             * @classdesc Represents a FtraceStats.
             * @implements IFtraceStats
             * @constructor
             * @param {perfetto.protos.IFtraceStats=} [p] Properties to set
             */
            function FtraceStats(p) {
                this.cpuStats = [];
                this.unknownFtraceEvents = [];
                this.failedFtraceEvents = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * FtraceStats phase.
             * @member {perfetto.protos.FtraceStats.Phase} phase
             * @memberof perfetto.protos.FtraceStats
             * @instance
             */
            FtraceStats.prototype.phase = 0;

            /**
             * FtraceStats cpuStats.
             * @member {Array.<perfetto.protos.IFtraceCpuStats>} cpuStats
             * @memberof perfetto.protos.FtraceStats
             * @instance
             */
            FtraceStats.prototype.cpuStats = $util.emptyArray;

            /**
             * FtraceStats kernelSymbolsParsed.
             * @member {number} kernelSymbolsParsed
             * @memberof perfetto.protos.FtraceStats
             * @instance
             */
            FtraceStats.prototype.kernelSymbolsParsed = 0;

            /**
             * FtraceStats kernelSymbolsMemKb.
             * @member {number} kernelSymbolsMemKb
             * @memberof perfetto.protos.FtraceStats
             * @instance
             */
            FtraceStats.prototype.kernelSymbolsMemKb = 0;

            /**
             * FtraceStats atraceErrors.
             * @member {string} atraceErrors
             * @memberof perfetto.protos.FtraceStats
             * @instance
             */
            FtraceStats.prototype.atraceErrors = "";

            /**
             * FtraceStats unknownFtraceEvents.
             * @member {Array.<string>} unknownFtraceEvents
             * @memberof perfetto.protos.FtraceStats
             * @instance
             */
            FtraceStats.prototype.unknownFtraceEvents = $util.emptyArray;

            /**
             * FtraceStats failedFtraceEvents.
             * @member {Array.<string>} failedFtraceEvents
             * @memberof perfetto.protos.FtraceStats
             * @instance
             */
            FtraceStats.prototype.failedFtraceEvents = $util.emptyArray;

            /**
             * Creates a new FtraceStats instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.FtraceStats
             * @static
             * @param {perfetto.protos.IFtraceStats=} [properties] Properties to set
             * @returns {perfetto.protos.FtraceStats} FtraceStats instance
             */
            FtraceStats.create = function create(properties) {
                return new FtraceStats(properties);
            };

            /**
             * Encodes the specified FtraceStats message. Does not implicitly {@link perfetto.protos.FtraceStats.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.FtraceStats
             * @static
             * @param {perfetto.protos.IFtraceStats} m FtraceStats message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FtraceStats.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.phase != null && Object.hasOwnProperty.call(m, "phase"))
                    w.uint32(8).int32(m.phase);
                if (m.cpuStats != null && m.cpuStats.length) {
                    for (var i = 0; i < m.cpuStats.length; ++i)
                        $root.perfetto.protos.FtraceCpuStats.encode(m.cpuStats[i], w.uint32(18).fork()).ldelim();
                }
                if (m.kernelSymbolsParsed != null && Object.hasOwnProperty.call(m, "kernelSymbolsParsed"))
                    w.uint32(24).uint32(m.kernelSymbolsParsed);
                if (m.kernelSymbolsMemKb != null && Object.hasOwnProperty.call(m, "kernelSymbolsMemKb"))
                    w.uint32(32).uint32(m.kernelSymbolsMemKb);
                if (m.atraceErrors != null && Object.hasOwnProperty.call(m, "atraceErrors"))
                    w.uint32(42).string(m.atraceErrors);
                if (m.unknownFtraceEvents != null && m.unknownFtraceEvents.length) {
                    for (var i = 0; i < m.unknownFtraceEvents.length; ++i)
                        w.uint32(50).string(m.unknownFtraceEvents[i]);
                }
                if (m.failedFtraceEvents != null && m.failedFtraceEvents.length) {
                    for (var i = 0; i < m.failedFtraceEvents.length; ++i)
                        w.uint32(58).string(m.failedFtraceEvents[i]);
                }
                return w;
            };

            /**
             * Encodes the specified FtraceStats message, length delimited. Does not implicitly {@link perfetto.protos.FtraceStats.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.FtraceStats
             * @static
             * @param {perfetto.protos.IFtraceStats} message FtraceStats message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            FtraceStats.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a FtraceStats message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.FtraceStats
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.FtraceStats} FtraceStats
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FtraceStats.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.FtraceStats();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.phase = r.int32();
                        break;
                    case 2:
                        if (!(m.cpuStats && m.cpuStats.length))
                            m.cpuStats = [];
                        m.cpuStats.push($root.perfetto.protos.FtraceCpuStats.decode(r, r.uint32()));
                        break;
                    case 3:
                        m.kernelSymbolsParsed = r.uint32();
                        break;
                    case 4:
                        m.kernelSymbolsMemKb = r.uint32();
                        break;
                    case 5:
                        m.atraceErrors = r.string();
                        break;
                    case 6:
                        if (!(m.unknownFtraceEvents && m.unknownFtraceEvents.length))
                            m.unknownFtraceEvents = [];
                        m.unknownFtraceEvents.push(r.string());
                        break;
                    case 7:
                        if (!(m.failedFtraceEvents && m.failedFtraceEvents.length))
                            m.failedFtraceEvents = [];
                        m.failedFtraceEvents.push(r.string());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a FtraceStats message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.FtraceStats
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.FtraceStats} FtraceStats
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            FtraceStats.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a FtraceStats message.
             * @function verify
             * @memberof perfetto.protos.FtraceStats
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            FtraceStats.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.phase != null && m.hasOwnProperty("phase")) {
                    switch (m.phase) {
                    default:
                        return "phase: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                }
                if (m.cpuStats != null && m.hasOwnProperty("cpuStats")) {
                    if (!Array.isArray(m.cpuStats))
                        return "cpuStats: array expected";
                    for (var i = 0; i < m.cpuStats.length; ++i) {
                        {
                            var e = $root.perfetto.protos.FtraceCpuStats.verify(m.cpuStats[i]);
                            if (e)
                                return "cpuStats." + e;
                        }
                    }
                }
                if (m.kernelSymbolsParsed != null && m.hasOwnProperty("kernelSymbolsParsed")) {
                    if (!$util.isInteger(m.kernelSymbolsParsed))
                        return "kernelSymbolsParsed: integer expected";
                }
                if (m.kernelSymbolsMemKb != null && m.hasOwnProperty("kernelSymbolsMemKb")) {
                    if (!$util.isInteger(m.kernelSymbolsMemKb))
                        return "kernelSymbolsMemKb: integer expected";
                }
                if (m.atraceErrors != null && m.hasOwnProperty("atraceErrors")) {
                    if (!$util.isString(m.atraceErrors))
                        return "atraceErrors: string expected";
                }
                if (m.unknownFtraceEvents != null && m.hasOwnProperty("unknownFtraceEvents")) {
                    if (!Array.isArray(m.unknownFtraceEvents))
                        return "unknownFtraceEvents: array expected";
                    for (var i = 0; i < m.unknownFtraceEvents.length; ++i) {
                        if (!$util.isString(m.unknownFtraceEvents[i]))
                            return "unknownFtraceEvents: string[] expected";
                    }
                }
                if (m.failedFtraceEvents != null && m.hasOwnProperty("failedFtraceEvents")) {
                    if (!Array.isArray(m.failedFtraceEvents))
                        return "failedFtraceEvents: array expected";
                    for (var i = 0; i < m.failedFtraceEvents.length; ++i) {
                        if (!$util.isString(m.failedFtraceEvents[i]))
                            return "failedFtraceEvents: string[] expected";
                    }
                }
                return null;
            };

            /**
             * Creates a FtraceStats message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.FtraceStats
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.FtraceStats} FtraceStats
             */
            FtraceStats.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.FtraceStats)
                    return d;
                var m = new $root.perfetto.protos.FtraceStats();
                switch (d.phase) {
                case "UNSPECIFIED":
                case 0:
                    m.phase = 0;
                    break;
                case "START_OF_TRACE":
                case 1:
                    m.phase = 1;
                    break;
                case "END_OF_TRACE":
                case 2:
                    m.phase = 2;
                    break;
                }
                if (d.cpuStats) {
                    if (!Array.isArray(d.cpuStats))
                        throw TypeError(".perfetto.protos.FtraceStats.cpuStats: array expected");
                    m.cpuStats = [];
                    for (var i = 0; i < d.cpuStats.length; ++i) {
                        if (typeof d.cpuStats[i] !== "object")
                            throw TypeError(".perfetto.protos.FtraceStats.cpuStats: object expected");
                        m.cpuStats[i] = $root.perfetto.protos.FtraceCpuStats.fromObject(d.cpuStats[i]);
                    }
                }
                if (d.kernelSymbolsParsed != null) {
                    m.kernelSymbolsParsed = d.kernelSymbolsParsed >>> 0;
                }
                if (d.kernelSymbolsMemKb != null) {
                    m.kernelSymbolsMemKb = d.kernelSymbolsMemKb >>> 0;
                }
                if (d.atraceErrors != null) {
                    m.atraceErrors = String(d.atraceErrors);
                }
                if (d.unknownFtraceEvents) {
                    if (!Array.isArray(d.unknownFtraceEvents))
                        throw TypeError(".perfetto.protos.FtraceStats.unknownFtraceEvents: array expected");
                    m.unknownFtraceEvents = [];
                    for (var i = 0; i < d.unknownFtraceEvents.length; ++i) {
                        m.unknownFtraceEvents[i] = String(d.unknownFtraceEvents[i]);
                    }
                }
                if (d.failedFtraceEvents) {
                    if (!Array.isArray(d.failedFtraceEvents))
                        throw TypeError(".perfetto.protos.FtraceStats.failedFtraceEvents: array expected");
                    m.failedFtraceEvents = [];
                    for (var i = 0; i < d.failedFtraceEvents.length; ++i) {
                        m.failedFtraceEvents[i] = String(d.failedFtraceEvents[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a FtraceStats message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.FtraceStats
             * @static
             * @param {perfetto.protos.FtraceStats} m FtraceStats
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            FtraceStats.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.cpuStats = [];
                    d.unknownFtraceEvents = [];
                    d.failedFtraceEvents = [];
                }
                if (o.defaults) {
                    d.phase = o.enums === String ? "UNSPECIFIED" : 0;
                    d.kernelSymbolsParsed = 0;
                    d.kernelSymbolsMemKb = 0;
                    d.atraceErrors = "";
                }
                if (m.phase != null && m.hasOwnProperty("phase")) {
                    d.phase = o.enums === String ? $root.perfetto.protos.FtraceStats.Phase[m.phase] : m.phase;
                }
                if (m.cpuStats && m.cpuStats.length) {
                    d.cpuStats = [];
                    for (var j = 0; j < m.cpuStats.length; ++j) {
                        d.cpuStats[j] = $root.perfetto.protos.FtraceCpuStats.toObject(m.cpuStats[j], o);
                    }
                }
                if (m.kernelSymbolsParsed != null && m.hasOwnProperty("kernelSymbolsParsed")) {
                    d.kernelSymbolsParsed = m.kernelSymbolsParsed;
                }
                if (m.kernelSymbolsMemKb != null && m.hasOwnProperty("kernelSymbolsMemKb")) {
                    d.kernelSymbolsMemKb = m.kernelSymbolsMemKb;
                }
                if (m.atraceErrors != null && m.hasOwnProperty("atraceErrors")) {
                    d.atraceErrors = m.atraceErrors;
                }
                if (m.unknownFtraceEvents && m.unknownFtraceEvents.length) {
                    d.unknownFtraceEvents = [];
                    for (var j = 0; j < m.unknownFtraceEvents.length; ++j) {
                        d.unknownFtraceEvents[j] = m.unknownFtraceEvents[j];
                    }
                }
                if (m.failedFtraceEvents && m.failedFtraceEvents.length) {
                    d.failedFtraceEvents = [];
                    for (var j = 0; j < m.failedFtraceEvents.length; ++j) {
                        d.failedFtraceEvents[j] = m.failedFtraceEvents[j];
                    }
                }
                return d;
            };

            /**
             * Converts this FtraceStats to JSON.
             * @function toJSON
             * @memberof perfetto.protos.FtraceStats
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            FtraceStats.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * Phase enum.
             * @name perfetto.protos.FtraceStats.Phase
             * @enum {number}
             * @property {number} UNSPECIFIED=0 UNSPECIFIED value
             * @property {number} START_OF_TRACE=1 START_OF_TRACE value
             * @property {number} END_OF_TRACE=2 END_OF_TRACE value
             */
            FtraceStats.Phase = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNSPECIFIED"] = 0;
                values[valuesById[1] = "START_OF_TRACE"] = 1;
                values[valuesById[2] = "END_OF_TRACE"] = 2;
                return values;
            })();

            return FtraceStats;
        })();

        protos.GpuCounterEvent = (function() {

            /**
             * Properties of a GpuCounterEvent.
             * @memberof perfetto.protos
             * @interface IGpuCounterEvent
             * @property {perfetto.protos.IGpuCounterDescriptor|null} [counterDescriptor] GpuCounterEvent counterDescriptor
             * @property {Array.<perfetto.protos.GpuCounterEvent.IGpuCounter>|null} [counters] GpuCounterEvent counters
             * @property {number|null} [gpuId] GpuCounterEvent gpuId
             */

            /**
             * Constructs a new GpuCounterEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a GpuCounterEvent.
             * @implements IGpuCounterEvent
             * @constructor
             * @param {perfetto.protos.IGpuCounterEvent=} [p] Properties to set
             */
            function GpuCounterEvent(p) {
                this.counters = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * GpuCounterEvent counterDescriptor.
             * @member {perfetto.protos.IGpuCounterDescriptor|null|undefined} counterDescriptor
             * @memberof perfetto.protos.GpuCounterEvent
             * @instance
             */
            GpuCounterEvent.prototype.counterDescriptor = null;

            /**
             * GpuCounterEvent counters.
             * @member {Array.<perfetto.protos.GpuCounterEvent.IGpuCounter>} counters
             * @memberof perfetto.protos.GpuCounterEvent
             * @instance
             */
            GpuCounterEvent.prototype.counters = $util.emptyArray;

            /**
             * GpuCounterEvent gpuId.
             * @member {number} gpuId
             * @memberof perfetto.protos.GpuCounterEvent
             * @instance
             */
            GpuCounterEvent.prototype.gpuId = 0;

            /**
             * Creates a new GpuCounterEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.GpuCounterEvent
             * @static
             * @param {perfetto.protos.IGpuCounterEvent=} [properties] Properties to set
             * @returns {perfetto.protos.GpuCounterEvent} GpuCounterEvent instance
             */
            GpuCounterEvent.create = function create(properties) {
                return new GpuCounterEvent(properties);
            };

            /**
             * Encodes the specified GpuCounterEvent message. Does not implicitly {@link perfetto.protos.GpuCounterEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.GpuCounterEvent
             * @static
             * @param {perfetto.protos.IGpuCounterEvent} m GpuCounterEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GpuCounterEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.counterDescriptor != null && Object.hasOwnProperty.call(m, "counterDescriptor"))
                    $root.perfetto.protos.GpuCounterDescriptor.encode(m.counterDescriptor, w.uint32(10).fork()).ldelim();
                if (m.counters != null && m.counters.length) {
                    for (var i = 0; i < m.counters.length; ++i)
                        $root.perfetto.protos.GpuCounterEvent.GpuCounter.encode(m.counters[i], w.uint32(18).fork()).ldelim();
                }
                if (m.gpuId != null && Object.hasOwnProperty.call(m, "gpuId"))
                    w.uint32(24).int32(m.gpuId);
                return w;
            };

            /**
             * Encodes the specified GpuCounterEvent message, length delimited. Does not implicitly {@link perfetto.protos.GpuCounterEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.GpuCounterEvent
             * @static
             * @param {perfetto.protos.IGpuCounterEvent} message GpuCounterEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GpuCounterEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a GpuCounterEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.GpuCounterEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.GpuCounterEvent} GpuCounterEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GpuCounterEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.GpuCounterEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.counterDescriptor = $root.perfetto.protos.GpuCounterDescriptor.decode(r, r.uint32());
                        break;
                    case 2:
                        if (!(m.counters && m.counters.length))
                            m.counters = [];
                        m.counters.push($root.perfetto.protos.GpuCounterEvent.GpuCounter.decode(r, r.uint32()));
                        break;
                    case 3:
                        m.gpuId = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a GpuCounterEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.GpuCounterEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.GpuCounterEvent} GpuCounterEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GpuCounterEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a GpuCounterEvent message.
             * @function verify
             * @memberof perfetto.protos.GpuCounterEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            GpuCounterEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.counterDescriptor != null && m.hasOwnProperty("counterDescriptor")) {
                    {
                        var e = $root.perfetto.protos.GpuCounterDescriptor.verify(m.counterDescriptor);
                        if (e)
                            return "counterDescriptor." + e;
                    }
                }
                if (m.counters != null && m.hasOwnProperty("counters")) {
                    if (!Array.isArray(m.counters))
                        return "counters: array expected";
                    for (var i = 0; i < m.counters.length; ++i) {
                        {
                            var e = $root.perfetto.protos.GpuCounterEvent.GpuCounter.verify(m.counters[i]);
                            if (e)
                                return "counters." + e;
                        }
                    }
                }
                if (m.gpuId != null && m.hasOwnProperty("gpuId")) {
                    if (!$util.isInteger(m.gpuId))
                        return "gpuId: integer expected";
                }
                return null;
            };

            /**
             * Creates a GpuCounterEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.GpuCounterEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.GpuCounterEvent} GpuCounterEvent
             */
            GpuCounterEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.GpuCounterEvent)
                    return d;
                var m = new $root.perfetto.protos.GpuCounterEvent();
                if (d.counterDescriptor != null) {
                    if (typeof d.counterDescriptor !== "object")
                        throw TypeError(".perfetto.protos.GpuCounterEvent.counterDescriptor: object expected");
                    m.counterDescriptor = $root.perfetto.protos.GpuCounterDescriptor.fromObject(d.counterDescriptor);
                }
                if (d.counters) {
                    if (!Array.isArray(d.counters))
                        throw TypeError(".perfetto.protos.GpuCounterEvent.counters: array expected");
                    m.counters = [];
                    for (var i = 0; i < d.counters.length; ++i) {
                        if (typeof d.counters[i] !== "object")
                            throw TypeError(".perfetto.protos.GpuCounterEvent.counters: object expected");
                        m.counters[i] = $root.perfetto.protos.GpuCounterEvent.GpuCounter.fromObject(d.counters[i]);
                    }
                }
                if (d.gpuId != null) {
                    m.gpuId = d.gpuId | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a GpuCounterEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.GpuCounterEvent
             * @static
             * @param {perfetto.protos.GpuCounterEvent} m GpuCounterEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            GpuCounterEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.counters = [];
                }
                if (o.defaults) {
                    d.counterDescriptor = null;
                    d.gpuId = 0;
                }
                if (m.counterDescriptor != null && m.hasOwnProperty("counterDescriptor")) {
                    d.counterDescriptor = $root.perfetto.protos.GpuCounterDescriptor.toObject(m.counterDescriptor, o);
                }
                if (m.counters && m.counters.length) {
                    d.counters = [];
                    for (var j = 0; j < m.counters.length; ++j) {
                        d.counters[j] = $root.perfetto.protos.GpuCounterEvent.GpuCounter.toObject(m.counters[j], o);
                    }
                }
                if (m.gpuId != null && m.hasOwnProperty("gpuId")) {
                    d.gpuId = m.gpuId;
                }
                return d;
            };

            /**
             * Converts this GpuCounterEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.GpuCounterEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            GpuCounterEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            GpuCounterEvent.GpuCounter = (function() {

                /**
                 * Properties of a GpuCounter.
                 * @memberof perfetto.protos.GpuCounterEvent
                 * @interface IGpuCounter
                 * @property {number|null} [counterId] GpuCounter counterId
                 * @property {number|null} [intValue] GpuCounter intValue
                 * @property {number|null} [doubleValue] GpuCounter doubleValue
                 */

                /**
                 * Constructs a new GpuCounter.
                 * @memberof perfetto.protos.GpuCounterEvent
                 * @classdesc Represents a GpuCounter.
                 * @implements IGpuCounter
                 * @constructor
                 * @param {perfetto.protos.GpuCounterEvent.IGpuCounter=} [p] Properties to set
                 */
                function GpuCounter(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * GpuCounter counterId.
                 * @member {number} counterId
                 * @memberof perfetto.protos.GpuCounterEvent.GpuCounter
                 * @instance
                 */
                GpuCounter.prototype.counterId = 0;

                /**
                 * GpuCounter intValue.
                 * @member {number} intValue
                 * @memberof perfetto.protos.GpuCounterEvent.GpuCounter
                 * @instance
                 */
                GpuCounter.prototype.intValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * GpuCounter doubleValue.
                 * @member {number} doubleValue
                 * @memberof perfetto.protos.GpuCounterEvent.GpuCounter
                 * @instance
                 */
                GpuCounter.prototype.doubleValue = 0;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * GpuCounter value.
                 * @member {"intValue"|"doubleValue"|undefined} value
                 * @memberof perfetto.protos.GpuCounterEvent.GpuCounter
                 * @instance
                 */
                Object.defineProperty(GpuCounter.prototype, "value", {
                    get: $util.oneOfGetter($oneOfFields = ["intValue", "doubleValue"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new GpuCounter instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.GpuCounterEvent.GpuCounter
                 * @static
                 * @param {perfetto.protos.GpuCounterEvent.IGpuCounter=} [properties] Properties to set
                 * @returns {perfetto.protos.GpuCounterEvent.GpuCounter} GpuCounter instance
                 */
                GpuCounter.create = function create(properties) {
                    return new GpuCounter(properties);
                };

                /**
                 * Encodes the specified GpuCounter message. Does not implicitly {@link perfetto.protos.GpuCounterEvent.GpuCounter.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.GpuCounterEvent.GpuCounter
                 * @static
                 * @param {perfetto.protos.GpuCounterEvent.IGpuCounter} m GpuCounter message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                GpuCounter.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.counterId != null && Object.hasOwnProperty.call(m, "counterId"))
                        w.uint32(8).uint32(m.counterId);
                    if (m.intValue != null && Object.hasOwnProperty.call(m, "intValue"))
                        w.uint32(16).int64(m.intValue);
                    if (m.doubleValue != null && Object.hasOwnProperty.call(m, "doubleValue"))
                        w.uint32(25).double(m.doubleValue);
                    return w;
                };

                /**
                 * Encodes the specified GpuCounter message, length delimited. Does not implicitly {@link perfetto.protos.GpuCounterEvent.GpuCounter.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.GpuCounterEvent.GpuCounter
                 * @static
                 * @param {perfetto.protos.GpuCounterEvent.IGpuCounter} message GpuCounter message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                GpuCounter.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a GpuCounter message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.GpuCounterEvent.GpuCounter
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.GpuCounterEvent.GpuCounter} GpuCounter
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                GpuCounter.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.GpuCounterEvent.GpuCounter();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.counterId = r.uint32();
                            break;
                        case 2:
                            m.intValue = r.int64();
                            break;
                        case 3:
                            m.doubleValue = r.double();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a GpuCounter message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.GpuCounterEvent.GpuCounter
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.GpuCounterEvent.GpuCounter} GpuCounter
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                GpuCounter.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a GpuCounter message.
                 * @function verify
                 * @memberof perfetto.protos.GpuCounterEvent.GpuCounter
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                GpuCounter.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    var p = {};
                    if (m.counterId != null && m.hasOwnProperty("counterId")) {
                        if (!$util.isInteger(m.counterId))
                            return "counterId: integer expected";
                    }
                    if (m.intValue != null && m.hasOwnProperty("intValue")) {
                        p.value = 1;
                        if (!$util.isInteger(m.intValue) && !(m.intValue && $util.isInteger(m.intValue.low) && $util.isInteger(m.intValue.high)))
                            return "intValue: integer|Long expected";
                    }
                    if (m.doubleValue != null && m.hasOwnProperty("doubleValue")) {
                        if (p.value === 1)
                            return "value: multiple values";
                        p.value = 1;
                        if (typeof m.doubleValue !== "number")
                            return "doubleValue: number expected";
                    }
                    return null;
                };

                /**
                 * Creates a GpuCounter message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.GpuCounterEvent.GpuCounter
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.GpuCounterEvent.GpuCounter} GpuCounter
                 */
                GpuCounter.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.GpuCounterEvent.GpuCounter)
                        return d;
                    var m = new $root.perfetto.protos.GpuCounterEvent.GpuCounter();
                    if (d.counterId != null) {
                        m.counterId = d.counterId >>> 0;
                    }
                    if (d.intValue != null) {
                        if ($util.Long)
                            (m.intValue = $util.Long.fromValue(d.intValue)).unsigned = false;
                        else if (typeof d.intValue === "string")
                            m.intValue = parseInt(d.intValue, 10);
                        else if (typeof d.intValue === "number")
                            m.intValue = d.intValue;
                        else if (typeof d.intValue === "object")
                            m.intValue = new $util.LongBits(d.intValue.low >>> 0, d.intValue.high >>> 0).toNumber();
                    }
                    if (d.doubleValue != null) {
                        m.doubleValue = Number(d.doubleValue);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a GpuCounter message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.GpuCounterEvent.GpuCounter
                 * @static
                 * @param {perfetto.protos.GpuCounterEvent.GpuCounter} m GpuCounter
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                GpuCounter.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.counterId = 0;
                    }
                    if (m.counterId != null && m.hasOwnProperty("counterId")) {
                        d.counterId = m.counterId;
                    }
                    if (m.intValue != null && m.hasOwnProperty("intValue")) {
                        if (typeof m.intValue === "number")
                            d.intValue = o.longs === String ? String(m.intValue) : m.intValue;
                        else
                            d.intValue = o.longs === String ? $util.Long.prototype.toString.call(m.intValue) : o.longs === Number ? new $util.LongBits(m.intValue.low >>> 0, m.intValue.high >>> 0).toNumber() : m.intValue;
                        if (o.oneofs)
                            d.value = "intValue";
                    }
                    if (m.doubleValue != null && m.hasOwnProperty("doubleValue")) {
                        d.doubleValue = o.json && !isFinite(m.doubleValue) ? String(m.doubleValue) : m.doubleValue;
                        if (o.oneofs)
                            d.value = "doubleValue";
                    }
                    return d;
                };

                /**
                 * Converts this GpuCounter to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.GpuCounterEvent.GpuCounter
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                GpuCounter.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return GpuCounter;
            })();

            return GpuCounterEvent;
        })();

        protos.GpuLog = (function() {

            /**
             * Properties of a GpuLog.
             * @memberof perfetto.protos
             * @interface IGpuLog
             * @property {perfetto.protos.GpuLog.Severity|null} [severity] GpuLog severity
             * @property {string|null} [tag] GpuLog tag
             * @property {string|null} [logMessage] GpuLog logMessage
             */

            /**
             * Constructs a new GpuLog.
             * @memberof perfetto.protos
             * @classdesc Represents a GpuLog.
             * @implements IGpuLog
             * @constructor
             * @param {perfetto.protos.IGpuLog=} [p] Properties to set
             */
            function GpuLog(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * GpuLog severity.
             * @member {perfetto.protos.GpuLog.Severity} severity
             * @memberof perfetto.protos.GpuLog
             * @instance
             */
            GpuLog.prototype.severity = 0;

            /**
             * GpuLog tag.
             * @member {string} tag
             * @memberof perfetto.protos.GpuLog
             * @instance
             */
            GpuLog.prototype.tag = "";

            /**
             * GpuLog logMessage.
             * @member {string} logMessage
             * @memberof perfetto.protos.GpuLog
             * @instance
             */
            GpuLog.prototype.logMessage = "";

            /**
             * Creates a new GpuLog instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.GpuLog
             * @static
             * @param {perfetto.protos.IGpuLog=} [properties] Properties to set
             * @returns {perfetto.protos.GpuLog} GpuLog instance
             */
            GpuLog.create = function create(properties) {
                return new GpuLog(properties);
            };

            /**
             * Encodes the specified GpuLog message. Does not implicitly {@link perfetto.protos.GpuLog.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.GpuLog
             * @static
             * @param {perfetto.protos.IGpuLog} m GpuLog message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GpuLog.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.severity != null && Object.hasOwnProperty.call(m, "severity"))
                    w.uint32(8).int32(m.severity);
                if (m.tag != null && Object.hasOwnProperty.call(m, "tag"))
                    w.uint32(18).string(m.tag);
                if (m.logMessage != null && Object.hasOwnProperty.call(m, "logMessage"))
                    w.uint32(26).string(m.logMessage);
                return w;
            };

            /**
             * Encodes the specified GpuLog message, length delimited. Does not implicitly {@link perfetto.protos.GpuLog.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.GpuLog
             * @static
             * @param {perfetto.protos.IGpuLog} message GpuLog message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GpuLog.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a GpuLog message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.GpuLog
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.GpuLog} GpuLog
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GpuLog.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.GpuLog();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.severity = r.int32();
                        break;
                    case 2:
                        m.tag = r.string();
                        break;
                    case 3:
                        m.logMessage = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a GpuLog message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.GpuLog
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.GpuLog} GpuLog
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GpuLog.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a GpuLog message.
             * @function verify
             * @memberof perfetto.protos.GpuLog
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            GpuLog.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.severity != null && m.hasOwnProperty("severity")) {
                    switch (m.severity) {
                    default:
                        return "severity: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                        break;
                    }
                }
                if (m.tag != null && m.hasOwnProperty("tag")) {
                    if (!$util.isString(m.tag))
                        return "tag: string expected";
                }
                if (m.logMessage != null && m.hasOwnProperty("logMessage")) {
                    if (!$util.isString(m.logMessage))
                        return "logMessage: string expected";
                }
                return null;
            };

            /**
             * Creates a GpuLog message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.GpuLog
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.GpuLog} GpuLog
             */
            GpuLog.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.GpuLog)
                    return d;
                var m = new $root.perfetto.protos.GpuLog();
                switch (d.severity) {
                case "LOG_SEVERITY_UNSPECIFIED":
                case 0:
                    m.severity = 0;
                    break;
                case "LOG_SEVERITY_VERBOSE":
                case 1:
                    m.severity = 1;
                    break;
                case "LOG_SEVERITY_DEBUG":
                case 2:
                    m.severity = 2;
                    break;
                case "LOG_SEVERITY_INFO":
                case 3:
                    m.severity = 3;
                    break;
                case "LOG_SEVERITY_WARNING":
                case 4:
                    m.severity = 4;
                    break;
                case "LOG_SEVERITY_ERROR":
                case 5:
                    m.severity = 5;
                    break;
                }
                if (d.tag != null) {
                    m.tag = String(d.tag);
                }
                if (d.logMessage != null) {
                    m.logMessage = String(d.logMessage);
                }
                return m;
            };

            /**
             * Creates a plain object from a GpuLog message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.GpuLog
             * @static
             * @param {perfetto.protos.GpuLog} m GpuLog
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            GpuLog.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.severity = o.enums === String ? "LOG_SEVERITY_UNSPECIFIED" : 0;
                    d.tag = "";
                    d.logMessage = "";
                }
                if (m.severity != null && m.hasOwnProperty("severity")) {
                    d.severity = o.enums === String ? $root.perfetto.protos.GpuLog.Severity[m.severity] : m.severity;
                }
                if (m.tag != null && m.hasOwnProperty("tag")) {
                    d.tag = m.tag;
                }
                if (m.logMessage != null && m.hasOwnProperty("logMessage")) {
                    d.logMessage = m.logMessage;
                }
                return d;
            };

            /**
             * Converts this GpuLog to JSON.
             * @function toJSON
             * @memberof perfetto.protos.GpuLog
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            GpuLog.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * Severity enum.
             * @name perfetto.protos.GpuLog.Severity
             * @enum {number}
             * @property {number} LOG_SEVERITY_UNSPECIFIED=0 LOG_SEVERITY_UNSPECIFIED value
             * @property {number} LOG_SEVERITY_VERBOSE=1 LOG_SEVERITY_VERBOSE value
             * @property {number} LOG_SEVERITY_DEBUG=2 LOG_SEVERITY_DEBUG value
             * @property {number} LOG_SEVERITY_INFO=3 LOG_SEVERITY_INFO value
             * @property {number} LOG_SEVERITY_WARNING=4 LOG_SEVERITY_WARNING value
             * @property {number} LOG_SEVERITY_ERROR=5 LOG_SEVERITY_ERROR value
             */
            GpuLog.Severity = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "LOG_SEVERITY_UNSPECIFIED"] = 0;
                values[valuesById[1] = "LOG_SEVERITY_VERBOSE"] = 1;
                values[valuesById[2] = "LOG_SEVERITY_DEBUG"] = 2;
                values[valuesById[3] = "LOG_SEVERITY_INFO"] = 3;
                values[valuesById[4] = "LOG_SEVERITY_WARNING"] = 4;
                values[valuesById[5] = "LOG_SEVERITY_ERROR"] = 5;
                return values;
            })();

            return GpuLog;
        })();

        protos.GpuRenderStageEvent = (function() {

            /**
             * Properties of a GpuRenderStageEvent.
             * @memberof perfetto.protos
             * @interface IGpuRenderStageEvent
             * @property {number|null} [eventId] GpuRenderStageEvent eventId
             * @property {number|null} [duration] GpuRenderStageEvent duration
             * @property {number|null} [hwQueueIid] GpuRenderStageEvent hwQueueIid
             * @property {number|null} [stageIid] GpuRenderStageEvent stageIid
             * @property {number|null} [gpuId] GpuRenderStageEvent gpuId
             * @property {number|null} [context] GpuRenderStageEvent context
             * @property {number|null} [renderTargetHandle] GpuRenderStageEvent renderTargetHandle
             * @property {number|null} [submissionId] GpuRenderStageEvent submissionId
             * @property {Array.<perfetto.protos.GpuRenderStageEvent.IExtraData>|null} [extraData] GpuRenderStageEvent extraData
             * @property {number|null} [renderPassHandle] GpuRenderStageEvent renderPassHandle
             * @property {Array.<number>|null} [renderSubpassIndexMask] GpuRenderStageEvent renderSubpassIndexMask
             * @property {number|null} [commandBufferHandle] GpuRenderStageEvent commandBufferHandle
             * @property {perfetto.protos.GpuRenderStageEvent.ISpecifications|null} [specifications] GpuRenderStageEvent specifications
             * @property {number|null} [hwQueueId] GpuRenderStageEvent hwQueueId
             * @property {number|null} [stageId] GpuRenderStageEvent stageId
             */

            /**
             * Constructs a new GpuRenderStageEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a GpuRenderStageEvent.
             * @implements IGpuRenderStageEvent
             * @constructor
             * @param {perfetto.protos.IGpuRenderStageEvent=} [p] Properties to set
             */
            function GpuRenderStageEvent(p) {
                this.extraData = [];
                this.renderSubpassIndexMask = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * GpuRenderStageEvent eventId.
             * @member {number} eventId
             * @memberof perfetto.protos.GpuRenderStageEvent
             * @instance
             */
            GpuRenderStageEvent.prototype.eventId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * GpuRenderStageEvent duration.
             * @member {number} duration
             * @memberof perfetto.protos.GpuRenderStageEvent
             * @instance
             */
            GpuRenderStageEvent.prototype.duration = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * GpuRenderStageEvent hwQueueIid.
             * @member {number} hwQueueIid
             * @memberof perfetto.protos.GpuRenderStageEvent
             * @instance
             */
            GpuRenderStageEvent.prototype.hwQueueIid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * GpuRenderStageEvent stageIid.
             * @member {number} stageIid
             * @memberof perfetto.protos.GpuRenderStageEvent
             * @instance
             */
            GpuRenderStageEvent.prototype.stageIid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * GpuRenderStageEvent gpuId.
             * @member {number} gpuId
             * @memberof perfetto.protos.GpuRenderStageEvent
             * @instance
             */
            GpuRenderStageEvent.prototype.gpuId = 0;

            /**
             * GpuRenderStageEvent context.
             * @member {number} context
             * @memberof perfetto.protos.GpuRenderStageEvent
             * @instance
             */
            GpuRenderStageEvent.prototype.context = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * GpuRenderStageEvent renderTargetHandle.
             * @member {number} renderTargetHandle
             * @memberof perfetto.protos.GpuRenderStageEvent
             * @instance
             */
            GpuRenderStageEvent.prototype.renderTargetHandle = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * GpuRenderStageEvent submissionId.
             * @member {number} submissionId
             * @memberof perfetto.protos.GpuRenderStageEvent
             * @instance
             */
            GpuRenderStageEvent.prototype.submissionId = 0;

            /**
             * GpuRenderStageEvent extraData.
             * @member {Array.<perfetto.protos.GpuRenderStageEvent.IExtraData>} extraData
             * @memberof perfetto.protos.GpuRenderStageEvent
             * @instance
             */
            GpuRenderStageEvent.prototype.extraData = $util.emptyArray;

            /**
             * GpuRenderStageEvent renderPassHandle.
             * @member {number} renderPassHandle
             * @memberof perfetto.protos.GpuRenderStageEvent
             * @instance
             */
            GpuRenderStageEvent.prototype.renderPassHandle = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * GpuRenderStageEvent renderSubpassIndexMask.
             * @member {Array.<number>} renderSubpassIndexMask
             * @memberof perfetto.protos.GpuRenderStageEvent
             * @instance
             */
            GpuRenderStageEvent.prototype.renderSubpassIndexMask = $util.emptyArray;

            /**
             * GpuRenderStageEvent commandBufferHandle.
             * @member {number} commandBufferHandle
             * @memberof perfetto.protos.GpuRenderStageEvent
             * @instance
             */
            GpuRenderStageEvent.prototype.commandBufferHandle = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * GpuRenderStageEvent specifications.
             * @member {perfetto.protos.GpuRenderStageEvent.ISpecifications|null|undefined} specifications
             * @memberof perfetto.protos.GpuRenderStageEvent
             * @instance
             */
            GpuRenderStageEvent.prototype.specifications = null;

            /**
             * GpuRenderStageEvent hwQueueId.
             * @member {number} hwQueueId
             * @memberof perfetto.protos.GpuRenderStageEvent
             * @instance
             */
            GpuRenderStageEvent.prototype.hwQueueId = 0;

            /**
             * GpuRenderStageEvent stageId.
             * @member {number} stageId
             * @memberof perfetto.protos.GpuRenderStageEvent
             * @instance
             */
            GpuRenderStageEvent.prototype.stageId = 0;

            /**
             * Creates a new GpuRenderStageEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.GpuRenderStageEvent
             * @static
             * @param {perfetto.protos.IGpuRenderStageEvent=} [properties] Properties to set
             * @returns {perfetto.protos.GpuRenderStageEvent} GpuRenderStageEvent instance
             */
            GpuRenderStageEvent.create = function create(properties) {
                return new GpuRenderStageEvent(properties);
            };

            /**
             * Encodes the specified GpuRenderStageEvent message. Does not implicitly {@link perfetto.protos.GpuRenderStageEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.GpuRenderStageEvent
             * @static
             * @param {perfetto.protos.IGpuRenderStageEvent} m GpuRenderStageEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GpuRenderStageEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.eventId != null && Object.hasOwnProperty.call(m, "eventId"))
                    w.uint32(8).uint64(m.eventId);
                if (m.duration != null && Object.hasOwnProperty.call(m, "duration"))
                    w.uint32(16).uint64(m.duration);
                if (m.hwQueueId != null && Object.hasOwnProperty.call(m, "hwQueueId"))
                    w.uint32(24).int32(m.hwQueueId);
                if (m.stageId != null && Object.hasOwnProperty.call(m, "stageId"))
                    w.uint32(32).int32(m.stageId);
                if (m.context != null && Object.hasOwnProperty.call(m, "context"))
                    w.uint32(40).uint64(m.context);
                if (m.extraData != null && m.extraData.length) {
                    for (var i = 0; i < m.extraData.length; ++i)
                        $root.perfetto.protos.GpuRenderStageEvent.ExtraData.encode(m.extraData[i], w.uint32(50).fork()).ldelim();
                }
                if (m.specifications != null && Object.hasOwnProperty.call(m, "specifications"))
                    $root.perfetto.protos.GpuRenderStageEvent.Specifications.encode(m.specifications, w.uint32(58).fork()).ldelim();
                if (m.renderTargetHandle != null && Object.hasOwnProperty.call(m, "renderTargetHandle"))
                    w.uint32(64).uint64(m.renderTargetHandle);
                if (m.renderPassHandle != null && Object.hasOwnProperty.call(m, "renderPassHandle"))
                    w.uint32(72).uint64(m.renderPassHandle);
                if (m.submissionId != null && Object.hasOwnProperty.call(m, "submissionId"))
                    w.uint32(80).uint32(m.submissionId);
                if (m.gpuId != null && Object.hasOwnProperty.call(m, "gpuId"))
                    w.uint32(88).int32(m.gpuId);
                if (m.commandBufferHandle != null && Object.hasOwnProperty.call(m, "commandBufferHandle"))
                    w.uint32(96).uint64(m.commandBufferHandle);
                if (m.hwQueueIid != null && Object.hasOwnProperty.call(m, "hwQueueIid"))
                    w.uint32(104).uint64(m.hwQueueIid);
                if (m.stageIid != null && Object.hasOwnProperty.call(m, "stageIid"))
                    w.uint32(112).uint64(m.stageIid);
                if (m.renderSubpassIndexMask != null && m.renderSubpassIndexMask.length) {
                    for (var i = 0; i < m.renderSubpassIndexMask.length; ++i)
                        w.uint32(120).uint64(m.renderSubpassIndexMask[i]);
                }
                return w;
            };

            /**
             * Encodes the specified GpuRenderStageEvent message, length delimited. Does not implicitly {@link perfetto.protos.GpuRenderStageEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.GpuRenderStageEvent
             * @static
             * @param {perfetto.protos.IGpuRenderStageEvent} message GpuRenderStageEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            GpuRenderStageEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a GpuRenderStageEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.GpuRenderStageEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.GpuRenderStageEvent} GpuRenderStageEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GpuRenderStageEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.GpuRenderStageEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.eventId = r.uint64();
                        break;
                    case 2:
                        m.duration = r.uint64();
                        break;
                    case 13:
                        m.hwQueueIid = r.uint64();
                        break;
                    case 14:
                        m.stageIid = r.uint64();
                        break;
                    case 11:
                        m.gpuId = r.int32();
                        break;
                    case 5:
                        m.context = r.uint64();
                        break;
                    case 8:
                        m.renderTargetHandle = r.uint64();
                        break;
                    case 10:
                        m.submissionId = r.uint32();
                        break;
                    case 6:
                        if (!(m.extraData && m.extraData.length))
                            m.extraData = [];
                        m.extraData.push($root.perfetto.protos.GpuRenderStageEvent.ExtraData.decode(r, r.uint32()));
                        break;
                    case 9:
                        m.renderPassHandle = r.uint64();
                        break;
                    case 15:
                        if (!(m.renderSubpassIndexMask && m.renderSubpassIndexMask.length))
                            m.renderSubpassIndexMask = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.renderSubpassIndexMask.push(r.uint64());
                        } else
                            m.renderSubpassIndexMask.push(r.uint64());
                        break;
                    case 12:
                        m.commandBufferHandle = r.uint64();
                        break;
                    case 7:
                        m.specifications = $root.perfetto.protos.GpuRenderStageEvent.Specifications.decode(r, r.uint32());
                        break;
                    case 3:
                        m.hwQueueId = r.int32();
                        break;
                    case 4:
                        m.stageId = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a GpuRenderStageEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.GpuRenderStageEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.GpuRenderStageEvent} GpuRenderStageEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            GpuRenderStageEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a GpuRenderStageEvent message.
             * @function verify
             * @memberof perfetto.protos.GpuRenderStageEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            GpuRenderStageEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.eventId != null && m.hasOwnProperty("eventId")) {
                    if (!$util.isInteger(m.eventId) && !(m.eventId && $util.isInteger(m.eventId.low) && $util.isInteger(m.eventId.high)))
                        return "eventId: integer|Long expected";
                }
                if (m.duration != null && m.hasOwnProperty("duration")) {
                    if (!$util.isInteger(m.duration) && !(m.duration && $util.isInteger(m.duration.low) && $util.isInteger(m.duration.high)))
                        return "duration: integer|Long expected";
                }
                if (m.hwQueueIid != null && m.hasOwnProperty("hwQueueIid")) {
                    if (!$util.isInteger(m.hwQueueIid) && !(m.hwQueueIid && $util.isInteger(m.hwQueueIid.low) && $util.isInteger(m.hwQueueIid.high)))
                        return "hwQueueIid: integer|Long expected";
                }
                if (m.stageIid != null && m.hasOwnProperty("stageIid")) {
                    if (!$util.isInteger(m.stageIid) && !(m.stageIid && $util.isInteger(m.stageIid.low) && $util.isInteger(m.stageIid.high)))
                        return "stageIid: integer|Long expected";
                }
                if (m.gpuId != null && m.hasOwnProperty("gpuId")) {
                    if (!$util.isInteger(m.gpuId))
                        return "gpuId: integer expected";
                }
                if (m.context != null && m.hasOwnProperty("context")) {
                    if (!$util.isInteger(m.context) && !(m.context && $util.isInteger(m.context.low) && $util.isInteger(m.context.high)))
                        return "context: integer|Long expected";
                }
                if (m.renderTargetHandle != null && m.hasOwnProperty("renderTargetHandle")) {
                    if (!$util.isInteger(m.renderTargetHandle) && !(m.renderTargetHandle && $util.isInteger(m.renderTargetHandle.low) && $util.isInteger(m.renderTargetHandle.high)))
                        return "renderTargetHandle: integer|Long expected";
                }
                if (m.submissionId != null && m.hasOwnProperty("submissionId")) {
                    if (!$util.isInteger(m.submissionId))
                        return "submissionId: integer expected";
                }
                if (m.extraData != null && m.hasOwnProperty("extraData")) {
                    if (!Array.isArray(m.extraData))
                        return "extraData: array expected";
                    for (var i = 0; i < m.extraData.length; ++i) {
                        {
                            var e = $root.perfetto.protos.GpuRenderStageEvent.ExtraData.verify(m.extraData[i]);
                            if (e)
                                return "extraData." + e;
                        }
                    }
                }
                if (m.renderPassHandle != null && m.hasOwnProperty("renderPassHandle")) {
                    if (!$util.isInteger(m.renderPassHandle) && !(m.renderPassHandle && $util.isInteger(m.renderPassHandle.low) && $util.isInteger(m.renderPassHandle.high)))
                        return "renderPassHandle: integer|Long expected";
                }
                if (m.renderSubpassIndexMask != null && m.hasOwnProperty("renderSubpassIndexMask")) {
                    if (!Array.isArray(m.renderSubpassIndexMask))
                        return "renderSubpassIndexMask: array expected";
                    for (var i = 0; i < m.renderSubpassIndexMask.length; ++i) {
                        if (!$util.isInteger(m.renderSubpassIndexMask[i]) && !(m.renderSubpassIndexMask[i] && $util.isInteger(m.renderSubpassIndexMask[i].low) && $util.isInteger(m.renderSubpassIndexMask[i].high)))
                            return "renderSubpassIndexMask: integer|Long[] expected";
                    }
                }
                if (m.commandBufferHandle != null && m.hasOwnProperty("commandBufferHandle")) {
                    if (!$util.isInteger(m.commandBufferHandle) && !(m.commandBufferHandle && $util.isInteger(m.commandBufferHandle.low) && $util.isInteger(m.commandBufferHandle.high)))
                        return "commandBufferHandle: integer|Long expected";
                }
                if (m.specifications != null && m.hasOwnProperty("specifications")) {
                    {
                        var e = $root.perfetto.protos.GpuRenderStageEvent.Specifications.verify(m.specifications);
                        if (e)
                            return "specifications." + e;
                    }
                }
                if (m.hwQueueId != null && m.hasOwnProperty("hwQueueId")) {
                    if (!$util.isInteger(m.hwQueueId))
                        return "hwQueueId: integer expected";
                }
                if (m.stageId != null && m.hasOwnProperty("stageId")) {
                    if (!$util.isInteger(m.stageId))
                        return "stageId: integer expected";
                }
                return null;
            };

            /**
             * Creates a GpuRenderStageEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.GpuRenderStageEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.GpuRenderStageEvent} GpuRenderStageEvent
             */
            GpuRenderStageEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.GpuRenderStageEvent)
                    return d;
                var m = new $root.perfetto.protos.GpuRenderStageEvent();
                if (d.eventId != null) {
                    if ($util.Long)
                        (m.eventId = $util.Long.fromValue(d.eventId)).unsigned = true;
                    else if (typeof d.eventId === "string")
                        m.eventId = parseInt(d.eventId, 10);
                    else if (typeof d.eventId === "number")
                        m.eventId = d.eventId;
                    else if (typeof d.eventId === "object")
                        m.eventId = new $util.LongBits(d.eventId.low >>> 0, d.eventId.high >>> 0).toNumber(true);
                }
                if (d.duration != null) {
                    if ($util.Long)
                        (m.duration = $util.Long.fromValue(d.duration)).unsigned = true;
                    else if (typeof d.duration === "string")
                        m.duration = parseInt(d.duration, 10);
                    else if (typeof d.duration === "number")
                        m.duration = d.duration;
                    else if (typeof d.duration === "object")
                        m.duration = new $util.LongBits(d.duration.low >>> 0, d.duration.high >>> 0).toNumber(true);
                }
                if (d.hwQueueIid != null) {
                    if ($util.Long)
                        (m.hwQueueIid = $util.Long.fromValue(d.hwQueueIid)).unsigned = true;
                    else if (typeof d.hwQueueIid === "string")
                        m.hwQueueIid = parseInt(d.hwQueueIid, 10);
                    else if (typeof d.hwQueueIid === "number")
                        m.hwQueueIid = d.hwQueueIid;
                    else if (typeof d.hwQueueIid === "object")
                        m.hwQueueIid = new $util.LongBits(d.hwQueueIid.low >>> 0, d.hwQueueIid.high >>> 0).toNumber(true);
                }
                if (d.stageIid != null) {
                    if ($util.Long)
                        (m.stageIid = $util.Long.fromValue(d.stageIid)).unsigned = true;
                    else if (typeof d.stageIid === "string")
                        m.stageIid = parseInt(d.stageIid, 10);
                    else if (typeof d.stageIid === "number")
                        m.stageIid = d.stageIid;
                    else if (typeof d.stageIid === "object")
                        m.stageIid = new $util.LongBits(d.stageIid.low >>> 0, d.stageIid.high >>> 0).toNumber(true);
                }
                if (d.gpuId != null) {
                    m.gpuId = d.gpuId | 0;
                }
                if (d.context != null) {
                    if ($util.Long)
                        (m.context = $util.Long.fromValue(d.context)).unsigned = true;
                    else if (typeof d.context === "string")
                        m.context = parseInt(d.context, 10);
                    else if (typeof d.context === "number")
                        m.context = d.context;
                    else if (typeof d.context === "object")
                        m.context = new $util.LongBits(d.context.low >>> 0, d.context.high >>> 0).toNumber(true);
                }
                if (d.renderTargetHandle != null) {
                    if ($util.Long)
                        (m.renderTargetHandle = $util.Long.fromValue(d.renderTargetHandle)).unsigned = true;
                    else if (typeof d.renderTargetHandle === "string")
                        m.renderTargetHandle = parseInt(d.renderTargetHandle, 10);
                    else if (typeof d.renderTargetHandle === "number")
                        m.renderTargetHandle = d.renderTargetHandle;
                    else if (typeof d.renderTargetHandle === "object")
                        m.renderTargetHandle = new $util.LongBits(d.renderTargetHandle.low >>> 0, d.renderTargetHandle.high >>> 0).toNumber(true);
                }
                if (d.submissionId != null) {
                    m.submissionId = d.submissionId >>> 0;
                }
                if (d.extraData) {
                    if (!Array.isArray(d.extraData))
                        throw TypeError(".perfetto.protos.GpuRenderStageEvent.extraData: array expected");
                    m.extraData = [];
                    for (var i = 0; i < d.extraData.length; ++i) {
                        if (typeof d.extraData[i] !== "object")
                            throw TypeError(".perfetto.protos.GpuRenderStageEvent.extraData: object expected");
                        m.extraData[i] = $root.perfetto.protos.GpuRenderStageEvent.ExtraData.fromObject(d.extraData[i]);
                    }
                }
                if (d.renderPassHandle != null) {
                    if ($util.Long)
                        (m.renderPassHandle = $util.Long.fromValue(d.renderPassHandle)).unsigned = true;
                    else if (typeof d.renderPassHandle === "string")
                        m.renderPassHandle = parseInt(d.renderPassHandle, 10);
                    else if (typeof d.renderPassHandle === "number")
                        m.renderPassHandle = d.renderPassHandle;
                    else if (typeof d.renderPassHandle === "object")
                        m.renderPassHandle = new $util.LongBits(d.renderPassHandle.low >>> 0, d.renderPassHandle.high >>> 0).toNumber(true);
                }
                if (d.renderSubpassIndexMask) {
                    if (!Array.isArray(d.renderSubpassIndexMask))
                        throw TypeError(".perfetto.protos.GpuRenderStageEvent.renderSubpassIndexMask: array expected");
                    m.renderSubpassIndexMask = [];
                    for (var i = 0; i < d.renderSubpassIndexMask.length; ++i) {
                        if ($util.Long)
                            (m.renderSubpassIndexMask[i] = $util.Long.fromValue(d.renderSubpassIndexMask[i])).unsigned = true;
                        else if (typeof d.renderSubpassIndexMask[i] === "string")
                            m.renderSubpassIndexMask[i] = parseInt(d.renderSubpassIndexMask[i], 10);
                        else if (typeof d.renderSubpassIndexMask[i] === "number")
                            m.renderSubpassIndexMask[i] = d.renderSubpassIndexMask[i];
                        else if (typeof d.renderSubpassIndexMask[i] === "object")
                            m.renderSubpassIndexMask[i] = new $util.LongBits(d.renderSubpassIndexMask[i].low >>> 0, d.renderSubpassIndexMask[i].high >>> 0).toNumber(true);
                    }
                }
                if (d.commandBufferHandle != null) {
                    if ($util.Long)
                        (m.commandBufferHandle = $util.Long.fromValue(d.commandBufferHandle)).unsigned = true;
                    else if (typeof d.commandBufferHandle === "string")
                        m.commandBufferHandle = parseInt(d.commandBufferHandle, 10);
                    else if (typeof d.commandBufferHandle === "number")
                        m.commandBufferHandle = d.commandBufferHandle;
                    else if (typeof d.commandBufferHandle === "object")
                        m.commandBufferHandle = new $util.LongBits(d.commandBufferHandle.low >>> 0, d.commandBufferHandle.high >>> 0).toNumber(true);
                }
                if (d.specifications != null) {
                    if (typeof d.specifications !== "object")
                        throw TypeError(".perfetto.protos.GpuRenderStageEvent.specifications: object expected");
                    m.specifications = $root.perfetto.protos.GpuRenderStageEvent.Specifications.fromObject(d.specifications);
                }
                if (d.hwQueueId != null) {
                    m.hwQueueId = d.hwQueueId | 0;
                }
                if (d.stageId != null) {
                    m.stageId = d.stageId | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a GpuRenderStageEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.GpuRenderStageEvent
             * @static
             * @param {perfetto.protos.GpuRenderStageEvent} m GpuRenderStageEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            GpuRenderStageEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.extraData = [];
                    d.renderSubpassIndexMask = [];
                }
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.eventId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.eventId = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.duration = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.duration = o.longs === String ? "0" : 0;
                    d.hwQueueId = 0;
                    d.stageId = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.context = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.context = o.longs === String ? "0" : 0;
                    d.specifications = null;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.renderTargetHandle = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.renderTargetHandle = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.renderPassHandle = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.renderPassHandle = o.longs === String ? "0" : 0;
                    d.submissionId = 0;
                    d.gpuId = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.commandBufferHandle = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.commandBufferHandle = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.hwQueueIid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.hwQueueIid = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.stageIid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.stageIid = o.longs === String ? "0" : 0;
                }
                if (m.eventId != null && m.hasOwnProperty("eventId")) {
                    if (typeof m.eventId === "number")
                        d.eventId = o.longs === String ? String(m.eventId) : m.eventId;
                    else
                        d.eventId = o.longs === String ? $util.Long.prototype.toString.call(m.eventId) : o.longs === Number ? new $util.LongBits(m.eventId.low >>> 0, m.eventId.high >>> 0).toNumber(true) : m.eventId;
                }
                if (m.duration != null && m.hasOwnProperty("duration")) {
                    if (typeof m.duration === "number")
                        d.duration = o.longs === String ? String(m.duration) : m.duration;
                    else
                        d.duration = o.longs === String ? $util.Long.prototype.toString.call(m.duration) : o.longs === Number ? new $util.LongBits(m.duration.low >>> 0, m.duration.high >>> 0).toNumber(true) : m.duration;
                }
                if (m.hwQueueId != null && m.hasOwnProperty("hwQueueId")) {
                    d.hwQueueId = m.hwQueueId;
                }
                if (m.stageId != null && m.hasOwnProperty("stageId")) {
                    d.stageId = m.stageId;
                }
                if (m.context != null && m.hasOwnProperty("context")) {
                    if (typeof m.context === "number")
                        d.context = o.longs === String ? String(m.context) : m.context;
                    else
                        d.context = o.longs === String ? $util.Long.prototype.toString.call(m.context) : o.longs === Number ? new $util.LongBits(m.context.low >>> 0, m.context.high >>> 0).toNumber(true) : m.context;
                }
                if (m.extraData && m.extraData.length) {
                    d.extraData = [];
                    for (var j = 0; j < m.extraData.length; ++j) {
                        d.extraData[j] = $root.perfetto.protos.GpuRenderStageEvent.ExtraData.toObject(m.extraData[j], o);
                    }
                }
                if (m.specifications != null && m.hasOwnProperty("specifications")) {
                    d.specifications = $root.perfetto.protos.GpuRenderStageEvent.Specifications.toObject(m.specifications, o);
                }
                if (m.renderTargetHandle != null && m.hasOwnProperty("renderTargetHandle")) {
                    if (typeof m.renderTargetHandle === "number")
                        d.renderTargetHandle = o.longs === String ? String(m.renderTargetHandle) : m.renderTargetHandle;
                    else
                        d.renderTargetHandle = o.longs === String ? $util.Long.prototype.toString.call(m.renderTargetHandle) : o.longs === Number ? new $util.LongBits(m.renderTargetHandle.low >>> 0, m.renderTargetHandle.high >>> 0).toNumber(true) : m.renderTargetHandle;
                }
                if (m.renderPassHandle != null && m.hasOwnProperty("renderPassHandle")) {
                    if (typeof m.renderPassHandle === "number")
                        d.renderPassHandle = o.longs === String ? String(m.renderPassHandle) : m.renderPassHandle;
                    else
                        d.renderPassHandle = o.longs === String ? $util.Long.prototype.toString.call(m.renderPassHandle) : o.longs === Number ? new $util.LongBits(m.renderPassHandle.low >>> 0, m.renderPassHandle.high >>> 0).toNumber(true) : m.renderPassHandle;
                }
                if (m.submissionId != null && m.hasOwnProperty("submissionId")) {
                    d.submissionId = m.submissionId;
                }
                if (m.gpuId != null && m.hasOwnProperty("gpuId")) {
                    d.gpuId = m.gpuId;
                }
                if (m.commandBufferHandle != null && m.hasOwnProperty("commandBufferHandle")) {
                    if (typeof m.commandBufferHandle === "number")
                        d.commandBufferHandle = o.longs === String ? String(m.commandBufferHandle) : m.commandBufferHandle;
                    else
                        d.commandBufferHandle = o.longs === String ? $util.Long.prototype.toString.call(m.commandBufferHandle) : o.longs === Number ? new $util.LongBits(m.commandBufferHandle.low >>> 0, m.commandBufferHandle.high >>> 0).toNumber(true) : m.commandBufferHandle;
                }
                if (m.hwQueueIid != null && m.hasOwnProperty("hwQueueIid")) {
                    if (typeof m.hwQueueIid === "number")
                        d.hwQueueIid = o.longs === String ? String(m.hwQueueIid) : m.hwQueueIid;
                    else
                        d.hwQueueIid = o.longs === String ? $util.Long.prototype.toString.call(m.hwQueueIid) : o.longs === Number ? new $util.LongBits(m.hwQueueIid.low >>> 0, m.hwQueueIid.high >>> 0).toNumber(true) : m.hwQueueIid;
                }
                if (m.stageIid != null && m.hasOwnProperty("stageIid")) {
                    if (typeof m.stageIid === "number")
                        d.stageIid = o.longs === String ? String(m.stageIid) : m.stageIid;
                    else
                        d.stageIid = o.longs === String ? $util.Long.prototype.toString.call(m.stageIid) : o.longs === Number ? new $util.LongBits(m.stageIid.low >>> 0, m.stageIid.high >>> 0).toNumber(true) : m.stageIid;
                }
                if (m.renderSubpassIndexMask && m.renderSubpassIndexMask.length) {
                    d.renderSubpassIndexMask = [];
                    for (var j = 0; j < m.renderSubpassIndexMask.length; ++j) {
                        if (typeof m.renderSubpassIndexMask[j] === "number")
                            d.renderSubpassIndexMask[j] = o.longs === String ? String(m.renderSubpassIndexMask[j]) : m.renderSubpassIndexMask[j];
                        else
                            d.renderSubpassIndexMask[j] = o.longs === String ? $util.Long.prototype.toString.call(m.renderSubpassIndexMask[j]) : o.longs === Number ? new $util.LongBits(m.renderSubpassIndexMask[j].low >>> 0, m.renderSubpassIndexMask[j].high >>> 0).toNumber(true) : m.renderSubpassIndexMask[j];
                    }
                }
                return d;
            };

            /**
             * Converts this GpuRenderStageEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.GpuRenderStageEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            GpuRenderStageEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            GpuRenderStageEvent.ExtraData = (function() {

                /**
                 * Properties of an ExtraData.
                 * @memberof perfetto.protos.GpuRenderStageEvent
                 * @interface IExtraData
                 * @property {string|null} [name] ExtraData name
                 * @property {string|null} [value] ExtraData value
                 */

                /**
                 * Constructs a new ExtraData.
                 * @memberof perfetto.protos.GpuRenderStageEvent
                 * @classdesc Represents an ExtraData.
                 * @implements IExtraData
                 * @constructor
                 * @param {perfetto.protos.GpuRenderStageEvent.IExtraData=} [p] Properties to set
                 */
                function ExtraData(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * ExtraData name.
                 * @member {string} name
                 * @memberof perfetto.protos.GpuRenderStageEvent.ExtraData
                 * @instance
                 */
                ExtraData.prototype.name = "";

                /**
                 * ExtraData value.
                 * @member {string} value
                 * @memberof perfetto.protos.GpuRenderStageEvent.ExtraData
                 * @instance
                 */
                ExtraData.prototype.value = "";

                /**
                 * Creates a new ExtraData instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.GpuRenderStageEvent.ExtraData
                 * @static
                 * @param {perfetto.protos.GpuRenderStageEvent.IExtraData=} [properties] Properties to set
                 * @returns {perfetto.protos.GpuRenderStageEvent.ExtraData} ExtraData instance
                 */
                ExtraData.create = function create(properties) {
                    return new ExtraData(properties);
                };

                /**
                 * Encodes the specified ExtraData message. Does not implicitly {@link perfetto.protos.GpuRenderStageEvent.ExtraData.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.GpuRenderStageEvent.ExtraData
                 * @static
                 * @param {perfetto.protos.GpuRenderStageEvent.IExtraData} m ExtraData message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ExtraData.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(10).string(m.name);
                    if (m.value != null && Object.hasOwnProperty.call(m, "value"))
                        w.uint32(18).string(m.value);
                    return w;
                };

                /**
                 * Encodes the specified ExtraData message, length delimited. Does not implicitly {@link perfetto.protos.GpuRenderStageEvent.ExtraData.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.GpuRenderStageEvent.ExtraData
                 * @static
                 * @param {perfetto.protos.GpuRenderStageEvent.IExtraData} message ExtraData message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ExtraData.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an ExtraData message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.GpuRenderStageEvent.ExtraData
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.GpuRenderStageEvent.ExtraData} ExtraData
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ExtraData.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.GpuRenderStageEvent.ExtraData();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.name = r.string();
                            break;
                        case 2:
                            m.value = r.string();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an ExtraData message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.GpuRenderStageEvent.ExtraData
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.GpuRenderStageEvent.ExtraData} ExtraData
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ExtraData.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an ExtraData message.
                 * @function verify
                 * @memberof perfetto.protos.GpuRenderStageEvent.ExtraData
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ExtraData.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    if (m.value != null && m.hasOwnProperty("value")) {
                        if (!$util.isString(m.value))
                            return "value: string expected";
                    }
                    return null;
                };

                /**
                 * Creates an ExtraData message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.GpuRenderStageEvent.ExtraData
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.GpuRenderStageEvent.ExtraData} ExtraData
                 */
                ExtraData.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.GpuRenderStageEvent.ExtraData)
                        return d;
                    var m = new $root.perfetto.protos.GpuRenderStageEvent.ExtraData();
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    if (d.value != null) {
                        m.value = String(d.value);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an ExtraData message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.GpuRenderStageEvent.ExtraData
                 * @static
                 * @param {perfetto.protos.GpuRenderStageEvent.ExtraData} m ExtraData
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ExtraData.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.name = "";
                        d.value = "";
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    if (m.value != null && m.hasOwnProperty("value")) {
                        d.value = m.value;
                    }
                    return d;
                };

                /**
                 * Converts this ExtraData to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.GpuRenderStageEvent.ExtraData
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ExtraData.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return ExtraData;
            })();

            GpuRenderStageEvent.Specifications = (function() {

                /**
                 * Properties of a Specifications.
                 * @memberof perfetto.protos.GpuRenderStageEvent
                 * @interface ISpecifications
                 * @property {perfetto.protos.GpuRenderStageEvent.Specifications.IContextSpec|null} [contextSpec] Specifications contextSpec
                 * @property {Array.<perfetto.protos.GpuRenderStageEvent.Specifications.IDescription>|null} [hwQueue] Specifications hwQueue
                 * @property {Array.<perfetto.protos.GpuRenderStageEvent.Specifications.IDescription>|null} [stage] Specifications stage
                 */

                /**
                 * Constructs a new Specifications.
                 * @memberof perfetto.protos.GpuRenderStageEvent
                 * @classdesc Represents a Specifications.
                 * @implements ISpecifications
                 * @constructor
                 * @param {perfetto.protos.GpuRenderStageEvent.ISpecifications=} [p] Properties to set
                 */
                function Specifications(p) {
                    this.hwQueue = [];
                    this.stage = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Specifications contextSpec.
                 * @member {perfetto.protos.GpuRenderStageEvent.Specifications.IContextSpec|null|undefined} contextSpec
                 * @memberof perfetto.protos.GpuRenderStageEvent.Specifications
                 * @instance
                 */
                Specifications.prototype.contextSpec = null;

                /**
                 * Specifications hwQueue.
                 * @member {Array.<perfetto.protos.GpuRenderStageEvent.Specifications.IDescription>} hwQueue
                 * @memberof perfetto.protos.GpuRenderStageEvent.Specifications
                 * @instance
                 */
                Specifications.prototype.hwQueue = $util.emptyArray;

                /**
                 * Specifications stage.
                 * @member {Array.<perfetto.protos.GpuRenderStageEvent.Specifications.IDescription>} stage
                 * @memberof perfetto.protos.GpuRenderStageEvent.Specifications
                 * @instance
                 */
                Specifications.prototype.stage = $util.emptyArray;

                /**
                 * Creates a new Specifications instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.GpuRenderStageEvent.Specifications
                 * @static
                 * @param {perfetto.protos.GpuRenderStageEvent.ISpecifications=} [properties] Properties to set
                 * @returns {perfetto.protos.GpuRenderStageEvent.Specifications} Specifications instance
                 */
                Specifications.create = function create(properties) {
                    return new Specifications(properties);
                };

                /**
                 * Encodes the specified Specifications message. Does not implicitly {@link perfetto.protos.GpuRenderStageEvent.Specifications.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.GpuRenderStageEvent.Specifications
                 * @static
                 * @param {perfetto.protos.GpuRenderStageEvent.ISpecifications} m Specifications message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Specifications.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.contextSpec != null && Object.hasOwnProperty.call(m, "contextSpec"))
                        $root.perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec.encode(m.contextSpec, w.uint32(10).fork()).ldelim();
                    if (m.hwQueue != null && m.hwQueue.length) {
                        for (var i = 0; i < m.hwQueue.length; ++i)
                            $root.perfetto.protos.GpuRenderStageEvent.Specifications.Description.encode(m.hwQueue[i], w.uint32(18).fork()).ldelim();
                    }
                    if (m.stage != null && m.stage.length) {
                        for (var i = 0; i < m.stage.length; ++i)
                            $root.perfetto.protos.GpuRenderStageEvent.Specifications.Description.encode(m.stage[i], w.uint32(26).fork()).ldelim();
                    }
                    return w;
                };

                /**
                 * Encodes the specified Specifications message, length delimited. Does not implicitly {@link perfetto.protos.GpuRenderStageEvent.Specifications.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.GpuRenderStageEvent.Specifications
                 * @static
                 * @param {perfetto.protos.GpuRenderStageEvent.ISpecifications} message Specifications message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Specifications.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Specifications message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.GpuRenderStageEvent.Specifications
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.GpuRenderStageEvent.Specifications} Specifications
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Specifications.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.GpuRenderStageEvent.Specifications();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.contextSpec = $root.perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec.decode(r, r.uint32());
                            break;
                        case 2:
                            if (!(m.hwQueue && m.hwQueue.length))
                                m.hwQueue = [];
                            m.hwQueue.push($root.perfetto.protos.GpuRenderStageEvent.Specifications.Description.decode(r, r.uint32()));
                            break;
                        case 3:
                            if (!(m.stage && m.stage.length))
                                m.stage = [];
                            m.stage.push($root.perfetto.protos.GpuRenderStageEvent.Specifications.Description.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Specifications message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.GpuRenderStageEvent.Specifications
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.GpuRenderStageEvent.Specifications} Specifications
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Specifications.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Specifications message.
                 * @function verify
                 * @memberof perfetto.protos.GpuRenderStageEvent.Specifications
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Specifications.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.contextSpec != null && m.hasOwnProperty("contextSpec")) {
                        {
                            var e = $root.perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec.verify(m.contextSpec);
                            if (e)
                                return "contextSpec." + e;
                        }
                    }
                    if (m.hwQueue != null && m.hasOwnProperty("hwQueue")) {
                        if (!Array.isArray(m.hwQueue))
                            return "hwQueue: array expected";
                        for (var i = 0; i < m.hwQueue.length; ++i) {
                            {
                                var e = $root.perfetto.protos.GpuRenderStageEvent.Specifications.Description.verify(m.hwQueue[i]);
                                if (e)
                                    return "hwQueue." + e;
                            }
                        }
                    }
                    if (m.stage != null && m.hasOwnProperty("stage")) {
                        if (!Array.isArray(m.stage))
                            return "stage: array expected";
                        for (var i = 0; i < m.stage.length; ++i) {
                            {
                                var e = $root.perfetto.protos.GpuRenderStageEvent.Specifications.Description.verify(m.stage[i]);
                                if (e)
                                    return "stage." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates a Specifications message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.GpuRenderStageEvent.Specifications
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.GpuRenderStageEvent.Specifications} Specifications
                 */
                Specifications.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.GpuRenderStageEvent.Specifications)
                        return d;
                    var m = new $root.perfetto.protos.GpuRenderStageEvent.Specifications();
                    if (d.contextSpec != null) {
                        if (typeof d.contextSpec !== "object")
                            throw TypeError(".perfetto.protos.GpuRenderStageEvent.Specifications.contextSpec: object expected");
                        m.contextSpec = $root.perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec.fromObject(d.contextSpec);
                    }
                    if (d.hwQueue) {
                        if (!Array.isArray(d.hwQueue))
                            throw TypeError(".perfetto.protos.GpuRenderStageEvent.Specifications.hwQueue: array expected");
                        m.hwQueue = [];
                        for (var i = 0; i < d.hwQueue.length; ++i) {
                            if (typeof d.hwQueue[i] !== "object")
                                throw TypeError(".perfetto.protos.GpuRenderStageEvent.Specifications.hwQueue: object expected");
                            m.hwQueue[i] = $root.perfetto.protos.GpuRenderStageEvent.Specifications.Description.fromObject(d.hwQueue[i]);
                        }
                    }
                    if (d.stage) {
                        if (!Array.isArray(d.stage))
                            throw TypeError(".perfetto.protos.GpuRenderStageEvent.Specifications.stage: array expected");
                        m.stage = [];
                        for (var i = 0; i < d.stage.length; ++i) {
                            if (typeof d.stage[i] !== "object")
                                throw TypeError(".perfetto.protos.GpuRenderStageEvent.Specifications.stage: object expected");
                            m.stage[i] = $root.perfetto.protos.GpuRenderStageEvent.Specifications.Description.fromObject(d.stage[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Specifications message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.GpuRenderStageEvent.Specifications
                 * @static
                 * @param {perfetto.protos.GpuRenderStageEvent.Specifications} m Specifications
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Specifications.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.hwQueue = [];
                        d.stage = [];
                    }
                    if (o.defaults) {
                        d.contextSpec = null;
                    }
                    if (m.contextSpec != null && m.hasOwnProperty("contextSpec")) {
                        d.contextSpec = $root.perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec.toObject(m.contextSpec, o);
                    }
                    if (m.hwQueue && m.hwQueue.length) {
                        d.hwQueue = [];
                        for (var j = 0; j < m.hwQueue.length; ++j) {
                            d.hwQueue[j] = $root.perfetto.protos.GpuRenderStageEvent.Specifications.Description.toObject(m.hwQueue[j], o);
                        }
                    }
                    if (m.stage && m.stage.length) {
                        d.stage = [];
                        for (var j = 0; j < m.stage.length; ++j) {
                            d.stage[j] = $root.perfetto.protos.GpuRenderStageEvent.Specifications.Description.toObject(m.stage[j], o);
                        }
                    }
                    return d;
                };

                /**
                 * Converts this Specifications to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.GpuRenderStageEvent.Specifications
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Specifications.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                Specifications.ContextSpec = (function() {

                    /**
                     * Properties of a ContextSpec.
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications
                     * @interface IContextSpec
                     * @property {number|null} [context] ContextSpec context
                     * @property {number|null} [pid] ContextSpec pid
                     */

                    /**
                     * Constructs a new ContextSpec.
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications
                     * @classdesc Represents a ContextSpec.
                     * @implements IContextSpec
                     * @constructor
                     * @param {perfetto.protos.GpuRenderStageEvent.Specifications.IContextSpec=} [p] Properties to set
                     */
                    function ContextSpec(p) {
                        if (p)
                            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                                if (p[ks[i]] != null)
                                    this[ks[i]] = p[ks[i]];
                    }

                    /**
                     * ContextSpec context.
                     * @member {number} context
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec
                     * @instance
                     */
                    ContextSpec.prototype.context = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                    /**
                     * ContextSpec pid.
                     * @member {number} pid
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec
                     * @instance
                     */
                    ContextSpec.prototype.pid = 0;

                    /**
                     * Creates a new ContextSpec instance using the specified properties.
                     * @function create
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec
                     * @static
                     * @param {perfetto.protos.GpuRenderStageEvent.Specifications.IContextSpec=} [properties] Properties to set
                     * @returns {perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec} ContextSpec instance
                     */
                    ContextSpec.create = function create(properties) {
                        return new ContextSpec(properties);
                    };

                    /**
                     * Encodes the specified ContextSpec message. Does not implicitly {@link perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec.verify|verify} messages.
                     * @function encode
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec
                     * @static
                     * @param {perfetto.protos.GpuRenderStageEvent.Specifications.IContextSpec} m ContextSpec message or plain object to encode
                     * @param {$protobuf.Writer} [w] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    ContextSpec.encode = function encode(m, w) {
                        if (!w)
                            w = $Writer.create();
                        if (m.context != null && Object.hasOwnProperty.call(m, "context"))
                            w.uint32(8).uint64(m.context);
                        if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                            w.uint32(16).int32(m.pid);
                        return w;
                    };

                    /**
                     * Encodes the specified ContextSpec message, length delimited. Does not implicitly {@link perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec
                     * @static
                     * @param {perfetto.protos.GpuRenderStageEvent.Specifications.IContextSpec} message ContextSpec message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    ContextSpec.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a ContextSpec message from the specified reader or buffer.
                     * @function decode
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                     * @param {number} [l] Message length if known beforehand
                     * @returns {perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec} ContextSpec
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    ContextSpec.decode = function decode(r, l) {
                        if (!(r instanceof $Reader))
                            r = $Reader.create(r);
                        var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec();
                        while (r.pos < c) {
                            var t = r.uint32();
                            switch (t >>> 3) {
                            case 1:
                                m.context = r.uint64();
                                break;
                            case 2:
                                m.pid = r.int32();
                                break;
                            default:
                                r.skipType(t & 7);
                                break;
                            }
                        }
                        return m;
                    };

                    /**
                     * Decodes a ContextSpec message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec} ContextSpec
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    ContextSpec.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a ContextSpec message.
                     * @function verify
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec
                     * @static
                     * @param {Object.<string,*>} m Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    ContextSpec.verify = function verify(m) {
                        if (typeof m !== "object" || m === null)
                            return "object expected";
                        if (m.context != null && m.hasOwnProperty("context")) {
                            if (!$util.isInteger(m.context) && !(m.context && $util.isInteger(m.context.low) && $util.isInteger(m.context.high)))
                                return "context: integer|Long expected";
                        }
                        if (m.pid != null && m.hasOwnProperty("pid")) {
                            if (!$util.isInteger(m.pid))
                                return "pid: integer expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a ContextSpec message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec
                     * @static
                     * @param {Object.<string,*>} d Plain object
                     * @returns {perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec} ContextSpec
                     */
                    ContextSpec.fromObject = function fromObject(d) {
                        if (d instanceof $root.perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec)
                            return d;
                        var m = new $root.perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec();
                        if (d.context != null) {
                            if ($util.Long)
                                (m.context = $util.Long.fromValue(d.context)).unsigned = true;
                            else if (typeof d.context === "string")
                                m.context = parseInt(d.context, 10);
                            else if (typeof d.context === "number")
                                m.context = d.context;
                            else if (typeof d.context === "object")
                                m.context = new $util.LongBits(d.context.low >>> 0, d.context.high >>> 0).toNumber(true);
                        }
                        if (d.pid != null) {
                            m.pid = d.pid | 0;
                        }
                        return m;
                    };

                    /**
                     * Creates a plain object from a ContextSpec message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec
                     * @static
                     * @param {perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec} m ContextSpec
                     * @param {$protobuf.IConversionOptions} [o] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    ContextSpec.toObject = function toObject(m, o) {
                        if (!o)
                            o = {};
                        var d = {};
                        if (o.defaults) {
                            if ($util.Long) {
                                var n = new $util.Long(0, 0, true);
                                d.context = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                            } else
                                d.context = o.longs === String ? "0" : 0;
                            d.pid = 0;
                        }
                        if (m.context != null && m.hasOwnProperty("context")) {
                            if (typeof m.context === "number")
                                d.context = o.longs === String ? String(m.context) : m.context;
                            else
                                d.context = o.longs === String ? $util.Long.prototype.toString.call(m.context) : o.longs === Number ? new $util.LongBits(m.context.low >>> 0, m.context.high >>> 0).toNumber(true) : m.context;
                        }
                        if (m.pid != null && m.hasOwnProperty("pid")) {
                            d.pid = m.pid;
                        }
                        return d;
                    };

                    /**
                     * Converts this ContextSpec to JSON.
                     * @function toJSON
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications.ContextSpec
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    ContextSpec.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                    };

                    return ContextSpec;
                })();

                Specifications.Description = (function() {

                    /**
                     * Properties of a Description.
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications
                     * @interface IDescription
                     * @property {string|null} [name] Description name
                     * @property {string|null} [description] Description description
                     */

                    /**
                     * Constructs a new Description.
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications
                     * @classdesc Represents a Description.
                     * @implements IDescription
                     * @constructor
                     * @param {perfetto.protos.GpuRenderStageEvent.Specifications.IDescription=} [p] Properties to set
                     */
                    function Description(p) {
                        if (p)
                            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                                if (p[ks[i]] != null)
                                    this[ks[i]] = p[ks[i]];
                    }

                    /**
                     * Description name.
                     * @member {string} name
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications.Description
                     * @instance
                     */
                    Description.prototype.name = "";

                    /**
                     * Description description.
                     * @member {string} description
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications.Description
                     * @instance
                     */
                    Description.prototype.description = "";

                    /**
                     * Creates a new Description instance using the specified properties.
                     * @function create
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications.Description
                     * @static
                     * @param {perfetto.protos.GpuRenderStageEvent.Specifications.IDescription=} [properties] Properties to set
                     * @returns {perfetto.protos.GpuRenderStageEvent.Specifications.Description} Description instance
                     */
                    Description.create = function create(properties) {
                        return new Description(properties);
                    };

                    /**
                     * Encodes the specified Description message. Does not implicitly {@link perfetto.protos.GpuRenderStageEvent.Specifications.Description.verify|verify} messages.
                     * @function encode
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications.Description
                     * @static
                     * @param {perfetto.protos.GpuRenderStageEvent.Specifications.IDescription} m Description message or plain object to encode
                     * @param {$protobuf.Writer} [w] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Description.encode = function encode(m, w) {
                        if (!w)
                            w = $Writer.create();
                        if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                            w.uint32(10).string(m.name);
                        if (m.description != null && Object.hasOwnProperty.call(m, "description"))
                            w.uint32(18).string(m.description);
                        return w;
                    };

                    /**
                     * Encodes the specified Description message, length delimited. Does not implicitly {@link perfetto.protos.GpuRenderStageEvent.Specifications.Description.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications.Description
                     * @static
                     * @param {perfetto.protos.GpuRenderStageEvent.Specifications.IDescription} message Description message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Description.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a Description message from the specified reader or buffer.
                     * @function decode
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications.Description
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                     * @param {number} [l] Message length if known beforehand
                     * @returns {perfetto.protos.GpuRenderStageEvent.Specifications.Description} Description
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Description.decode = function decode(r, l) {
                        if (!(r instanceof $Reader))
                            r = $Reader.create(r);
                        var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.GpuRenderStageEvent.Specifications.Description();
                        while (r.pos < c) {
                            var t = r.uint32();
                            switch (t >>> 3) {
                            case 1:
                                m.name = r.string();
                                break;
                            case 2:
                                m.description = r.string();
                                break;
                            default:
                                r.skipType(t & 7);
                                break;
                            }
                        }
                        return m;
                    };

                    /**
                     * Decodes a Description message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications.Description
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {perfetto.protos.GpuRenderStageEvent.Specifications.Description} Description
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Description.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a Description message.
                     * @function verify
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications.Description
                     * @static
                     * @param {Object.<string,*>} m Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    Description.verify = function verify(m) {
                        if (typeof m !== "object" || m === null)
                            return "object expected";
                        if (m.name != null && m.hasOwnProperty("name")) {
                            if (!$util.isString(m.name))
                                return "name: string expected";
                        }
                        if (m.description != null && m.hasOwnProperty("description")) {
                            if (!$util.isString(m.description))
                                return "description: string expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a Description message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications.Description
                     * @static
                     * @param {Object.<string,*>} d Plain object
                     * @returns {perfetto.protos.GpuRenderStageEvent.Specifications.Description} Description
                     */
                    Description.fromObject = function fromObject(d) {
                        if (d instanceof $root.perfetto.protos.GpuRenderStageEvent.Specifications.Description)
                            return d;
                        var m = new $root.perfetto.protos.GpuRenderStageEvent.Specifications.Description();
                        if (d.name != null) {
                            m.name = String(d.name);
                        }
                        if (d.description != null) {
                            m.description = String(d.description);
                        }
                        return m;
                    };

                    /**
                     * Creates a plain object from a Description message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications.Description
                     * @static
                     * @param {perfetto.protos.GpuRenderStageEvent.Specifications.Description} m Description
                     * @param {$protobuf.IConversionOptions} [o] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    Description.toObject = function toObject(m, o) {
                        if (!o)
                            o = {};
                        var d = {};
                        if (o.defaults) {
                            d.name = "";
                            d.description = "";
                        }
                        if (m.name != null && m.hasOwnProperty("name")) {
                            d.name = m.name;
                        }
                        if (m.description != null && m.hasOwnProperty("description")) {
                            d.description = m.description;
                        }
                        return d;
                    };

                    /**
                     * Converts this Description to JSON.
                     * @function toJSON
                     * @memberof perfetto.protos.GpuRenderStageEvent.Specifications.Description
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    Description.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                    };

                    return Description;
                })();

                return Specifications;
            })();

            return GpuRenderStageEvent;
        })();

        protos.InternedGraphicsContext = (function() {

            /**
             * Properties of an InternedGraphicsContext.
             * @memberof perfetto.protos
             * @interface IInternedGraphicsContext
             * @property {number|null} [iid] InternedGraphicsContext iid
             * @property {number|null} [pid] InternedGraphicsContext pid
             * @property {perfetto.protos.InternedGraphicsContext.Api|null} [api] InternedGraphicsContext api
             */

            /**
             * Constructs a new InternedGraphicsContext.
             * @memberof perfetto.protos
             * @classdesc Represents an InternedGraphicsContext.
             * @implements IInternedGraphicsContext
             * @constructor
             * @param {perfetto.protos.IInternedGraphicsContext=} [p] Properties to set
             */
            function InternedGraphicsContext(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * InternedGraphicsContext iid.
             * @member {number} iid
             * @memberof perfetto.protos.InternedGraphicsContext
             * @instance
             */
            InternedGraphicsContext.prototype.iid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * InternedGraphicsContext pid.
             * @member {number} pid
             * @memberof perfetto.protos.InternedGraphicsContext
             * @instance
             */
            InternedGraphicsContext.prototype.pid = 0;

            /**
             * InternedGraphicsContext api.
             * @member {perfetto.protos.InternedGraphicsContext.Api} api
             * @memberof perfetto.protos.InternedGraphicsContext
             * @instance
             */
            InternedGraphicsContext.prototype.api = 0;

            /**
             * Creates a new InternedGraphicsContext instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.InternedGraphicsContext
             * @static
             * @param {perfetto.protos.IInternedGraphicsContext=} [properties] Properties to set
             * @returns {perfetto.protos.InternedGraphicsContext} InternedGraphicsContext instance
             */
            InternedGraphicsContext.create = function create(properties) {
                return new InternedGraphicsContext(properties);
            };

            /**
             * Encodes the specified InternedGraphicsContext message. Does not implicitly {@link perfetto.protos.InternedGraphicsContext.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.InternedGraphicsContext
             * @static
             * @param {perfetto.protos.IInternedGraphicsContext} m InternedGraphicsContext message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InternedGraphicsContext.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.iid != null && Object.hasOwnProperty.call(m, "iid"))
                    w.uint32(8).uint64(m.iid);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(16).int32(m.pid);
                if (m.api != null && Object.hasOwnProperty.call(m, "api"))
                    w.uint32(24).int32(m.api);
                return w;
            };

            /**
             * Encodes the specified InternedGraphicsContext message, length delimited. Does not implicitly {@link perfetto.protos.InternedGraphicsContext.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.InternedGraphicsContext
             * @static
             * @param {perfetto.protos.IInternedGraphicsContext} message InternedGraphicsContext message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InternedGraphicsContext.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an InternedGraphicsContext message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.InternedGraphicsContext
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.InternedGraphicsContext} InternedGraphicsContext
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InternedGraphicsContext.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.InternedGraphicsContext();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.iid = r.uint64();
                        break;
                    case 2:
                        m.pid = r.int32();
                        break;
                    case 3:
                        m.api = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an InternedGraphicsContext message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.InternedGraphicsContext
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.InternedGraphicsContext} InternedGraphicsContext
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InternedGraphicsContext.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an InternedGraphicsContext message.
             * @function verify
             * @memberof perfetto.protos.InternedGraphicsContext
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            InternedGraphicsContext.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (!$util.isInteger(m.iid) && !(m.iid && $util.isInteger(m.iid.low) && $util.isInteger(m.iid.high)))
                        return "iid: integer|Long expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.api != null && m.hasOwnProperty("api")) {
                    switch (m.api) {
                    default:
                        return "api: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates an InternedGraphicsContext message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.InternedGraphicsContext
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.InternedGraphicsContext} InternedGraphicsContext
             */
            InternedGraphicsContext.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.InternedGraphicsContext)
                    return d;
                var m = new $root.perfetto.protos.InternedGraphicsContext();
                if (d.iid != null) {
                    if ($util.Long)
                        (m.iid = $util.Long.fromValue(d.iid)).unsigned = true;
                    else if (typeof d.iid === "string")
                        m.iid = parseInt(d.iid, 10);
                    else if (typeof d.iid === "number")
                        m.iid = d.iid;
                    else if (typeof d.iid === "object")
                        m.iid = new $util.LongBits(d.iid.low >>> 0, d.iid.high >>> 0).toNumber(true);
                }
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                switch (d.api) {
                case "UNDEFINED":
                case 0:
                    m.api = 0;
                    break;
                case "OPEN_GL":
                case 1:
                    m.api = 1;
                    break;
                case "VULKAN":
                case 2:
                    m.api = 2;
                    break;
                case "OPEN_CL":
                case 3:
                    m.api = 3;
                    break;
                }
                return m;
            };

            /**
             * Creates a plain object from an InternedGraphicsContext message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.InternedGraphicsContext
             * @static
             * @param {perfetto.protos.InternedGraphicsContext} m InternedGraphicsContext
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            InternedGraphicsContext.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.iid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.iid = o.longs === String ? "0" : 0;
                    d.pid = 0;
                    d.api = o.enums === String ? "UNDEFINED" : 0;
                }
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (typeof m.iid === "number")
                        d.iid = o.longs === String ? String(m.iid) : m.iid;
                    else
                        d.iid = o.longs === String ? $util.Long.prototype.toString.call(m.iid) : o.longs === Number ? new $util.LongBits(m.iid.low >>> 0, m.iid.high >>> 0).toNumber(true) : m.iid;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.api != null && m.hasOwnProperty("api")) {
                    d.api = o.enums === String ? $root.perfetto.protos.InternedGraphicsContext.Api[m.api] : m.api;
                }
                return d;
            };

            /**
             * Converts this InternedGraphicsContext to JSON.
             * @function toJSON
             * @memberof perfetto.protos.InternedGraphicsContext
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            InternedGraphicsContext.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * Api enum.
             * @name perfetto.protos.InternedGraphicsContext.Api
             * @enum {number}
             * @property {number} UNDEFINED=0 UNDEFINED value
             * @property {number} OPEN_GL=1 OPEN_GL value
             * @property {number} VULKAN=2 VULKAN value
             * @property {number} OPEN_CL=3 OPEN_CL value
             */
            InternedGraphicsContext.Api = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNDEFINED"] = 0;
                values[valuesById[1] = "OPEN_GL"] = 1;
                values[valuesById[2] = "VULKAN"] = 2;
                values[valuesById[3] = "OPEN_CL"] = 3;
                return values;
            })();

            return InternedGraphicsContext;
        })();

        protos.InternedGpuRenderStageSpecification = (function() {

            /**
             * Properties of an InternedGpuRenderStageSpecification.
             * @memberof perfetto.protos
             * @interface IInternedGpuRenderStageSpecification
             * @property {number|null} [iid] InternedGpuRenderStageSpecification iid
             * @property {string|null} [name] InternedGpuRenderStageSpecification name
             * @property {string|null} [description] InternedGpuRenderStageSpecification description
             * @property {perfetto.protos.InternedGpuRenderStageSpecification.RenderStageCategory|null} [category] InternedGpuRenderStageSpecification category
             */

            /**
             * Constructs a new InternedGpuRenderStageSpecification.
             * @memberof perfetto.protos
             * @classdesc Represents an InternedGpuRenderStageSpecification.
             * @implements IInternedGpuRenderStageSpecification
             * @constructor
             * @param {perfetto.protos.IInternedGpuRenderStageSpecification=} [p] Properties to set
             */
            function InternedGpuRenderStageSpecification(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * InternedGpuRenderStageSpecification iid.
             * @member {number} iid
             * @memberof perfetto.protos.InternedGpuRenderStageSpecification
             * @instance
             */
            InternedGpuRenderStageSpecification.prototype.iid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * InternedGpuRenderStageSpecification name.
             * @member {string} name
             * @memberof perfetto.protos.InternedGpuRenderStageSpecification
             * @instance
             */
            InternedGpuRenderStageSpecification.prototype.name = "";

            /**
             * InternedGpuRenderStageSpecification description.
             * @member {string} description
             * @memberof perfetto.protos.InternedGpuRenderStageSpecification
             * @instance
             */
            InternedGpuRenderStageSpecification.prototype.description = "";

            /**
             * InternedGpuRenderStageSpecification category.
             * @member {perfetto.protos.InternedGpuRenderStageSpecification.RenderStageCategory} category
             * @memberof perfetto.protos.InternedGpuRenderStageSpecification
             * @instance
             */
            InternedGpuRenderStageSpecification.prototype.category = 0;

            /**
             * Creates a new InternedGpuRenderStageSpecification instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.InternedGpuRenderStageSpecification
             * @static
             * @param {perfetto.protos.IInternedGpuRenderStageSpecification=} [properties] Properties to set
             * @returns {perfetto.protos.InternedGpuRenderStageSpecification} InternedGpuRenderStageSpecification instance
             */
            InternedGpuRenderStageSpecification.create = function create(properties) {
                return new InternedGpuRenderStageSpecification(properties);
            };

            /**
             * Encodes the specified InternedGpuRenderStageSpecification message. Does not implicitly {@link perfetto.protos.InternedGpuRenderStageSpecification.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.InternedGpuRenderStageSpecification
             * @static
             * @param {perfetto.protos.IInternedGpuRenderStageSpecification} m InternedGpuRenderStageSpecification message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InternedGpuRenderStageSpecification.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.iid != null && Object.hasOwnProperty.call(m, "iid"))
                    w.uint32(8).uint64(m.iid);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(18).string(m.name);
                if (m.description != null && Object.hasOwnProperty.call(m, "description"))
                    w.uint32(26).string(m.description);
                if (m.category != null && Object.hasOwnProperty.call(m, "category"))
                    w.uint32(32).int32(m.category);
                return w;
            };

            /**
             * Encodes the specified InternedGpuRenderStageSpecification message, length delimited. Does not implicitly {@link perfetto.protos.InternedGpuRenderStageSpecification.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.InternedGpuRenderStageSpecification
             * @static
             * @param {perfetto.protos.IInternedGpuRenderStageSpecification} message InternedGpuRenderStageSpecification message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InternedGpuRenderStageSpecification.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an InternedGpuRenderStageSpecification message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.InternedGpuRenderStageSpecification
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.InternedGpuRenderStageSpecification} InternedGpuRenderStageSpecification
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InternedGpuRenderStageSpecification.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.InternedGpuRenderStageSpecification();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.iid = r.uint64();
                        break;
                    case 2:
                        m.name = r.string();
                        break;
                    case 3:
                        m.description = r.string();
                        break;
                    case 4:
                        m.category = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an InternedGpuRenderStageSpecification message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.InternedGpuRenderStageSpecification
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.InternedGpuRenderStageSpecification} InternedGpuRenderStageSpecification
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InternedGpuRenderStageSpecification.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an InternedGpuRenderStageSpecification message.
             * @function verify
             * @memberof perfetto.protos.InternedGpuRenderStageSpecification
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            InternedGpuRenderStageSpecification.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (!$util.isInteger(m.iid) && !(m.iid && $util.isInteger(m.iid.low) && $util.isInteger(m.iid.high)))
                        return "iid: integer|Long expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.description != null && m.hasOwnProperty("description")) {
                    if (!$util.isString(m.description))
                        return "description: string expected";
                }
                if (m.category != null && m.hasOwnProperty("category")) {
                    switch (m.category) {
                    default:
                        return "category: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates an InternedGpuRenderStageSpecification message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.InternedGpuRenderStageSpecification
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.InternedGpuRenderStageSpecification} InternedGpuRenderStageSpecification
             */
            InternedGpuRenderStageSpecification.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.InternedGpuRenderStageSpecification)
                    return d;
                var m = new $root.perfetto.protos.InternedGpuRenderStageSpecification();
                if (d.iid != null) {
                    if ($util.Long)
                        (m.iid = $util.Long.fromValue(d.iid)).unsigned = true;
                    else if (typeof d.iid === "string")
                        m.iid = parseInt(d.iid, 10);
                    else if (typeof d.iid === "number")
                        m.iid = d.iid;
                    else if (typeof d.iid === "object")
                        m.iid = new $util.LongBits(d.iid.low >>> 0, d.iid.high >>> 0).toNumber(true);
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.description != null) {
                    m.description = String(d.description);
                }
                switch (d.category) {
                case "OTHER":
                case 0:
                    m.category = 0;
                    break;
                case "GRAPHICS":
                case 1:
                    m.category = 1;
                    break;
                case "COMPUTE":
                case 2:
                    m.category = 2;
                    break;
                }
                return m;
            };

            /**
             * Creates a plain object from an InternedGpuRenderStageSpecification message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.InternedGpuRenderStageSpecification
             * @static
             * @param {perfetto.protos.InternedGpuRenderStageSpecification} m InternedGpuRenderStageSpecification
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            InternedGpuRenderStageSpecification.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.iid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.iid = o.longs === String ? "0" : 0;
                    d.name = "";
                    d.description = "";
                    d.category = o.enums === String ? "OTHER" : 0;
                }
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (typeof m.iid === "number")
                        d.iid = o.longs === String ? String(m.iid) : m.iid;
                    else
                        d.iid = o.longs === String ? $util.Long.prototype.toString.call(m.iid) : o.longs === Number ? new $util.LongBits(m.iid.low >>> 0, m.iid.high >>> 0).toNumber(true) : m.iid;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.description != null && m.hasOwnProperty("description")) {
                    d.description = m.description;
                }
                if (m.category != null && m.hasOwnProperty("category")) {
                    d.category = o.enums === String ? $root.perfetto.protos.InternedGpuRenderStageSpecification.RenderStageCategory[m.category] : m.category;
                }
                return d;
            };

            /**
             * Converts this InternedGpuRenderStageSpecification to JSON.
             * @function toJSON
             * @memberof perfetto.protos.InternedGpuRenderStageSpecification
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            InternedGpuRenderStageSpecification.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * RenderStageCategory enum.
             * @name perfetto.protos.InternedGpuRenderStageSpecification.RenderStageCategory
             * @enum {number}
             * @property {number} OTHER=0 OTHER value
             * @property {number} GRAPHICS=1 GRAPHICS value
             * @property {number} COMPUTE=2 COMPUTE value
             */
            InternedGpuRenderStageSpecification.RenderStageCategory = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "OTHER"] = 0;
                values[valuesById[1] = "GRAPHICS"] = 1;
                values[valuesById[2] = "COMPUTE"] = 2;
                return values;
            })();

            return InternedGpuRenderStageSpecification;
        })();

        protos.VulkanMemoryEventAnnotation = (function() {

            /**
             * Properties of a VulkanMemoryEventAnnotation.
             * @memberof perfetto.protos
             * @interface IVulkanMemoryEventAnnotation
             * @property {number|null} [keyIid] VulkanMemoryEventAnnotation keyIid
             * @property {number|null} [intValue] VulkanMemoryEventAnnotation intValue
             * @property {number|null} [doubleValue] VulkanMemoryEventAnnotation doubleValue
             * @property {number|null} [stringIid] VulkanMemoryEventAnnotation stringIid
             */

            /**
             * Constructs a new VulkanMemoryEventAnnotation.
             * @memberof perfetto.protos
             * @classdesc Represents a VulkanMemoryEventAnnotation.
             * @implements IVulkanMemoryEventAnnotation
             * @constructor
             * @param {perfetto.protos.IVulkanMemoryEventAnnotation=} [p] Properties to set
             */
            function VulkanMemoryEventAnnotation(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * VulkanMemoryEventAnnotation keyIid.
             * @member {number} keyIid
             * @memberof perfetto.protos.VulkanMemoryEventAnnotation
             * @instance
             */
            VulkanMemoryEventAnnotation.prototype.keyIid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * VulkanMemoryEventAnnotation intValue.
             * @member {number} intValue
             * @memberof perfetto.protos.VulkanMemoryEventAnnotation
             * @instance
             */
            VulkanMemoryEventAnnotation.prototype.intValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * VulkanMemoryEventAnnotation doubleValue.
             * @member {number} doubleValue
             * @memberof perfetto.protos.VulkanMemoryEventAnnotation
             * @instance
             */
            VulkanMemoryEventAnnotation.prototype.doubleValue = 0;

            /**
             * VulkanMemoryEventAnnotation stringIid.
             * @member {number} stringIid
             * @memberof perfetto.protos.VulkanMemoryEventAnnotation
             * @instance
             */
            VulkanMemoryEventAnnotation.prototype.stringIid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * VulkanMemoryEventAnnotation value.
             * @member {"intValue"|"doubleValue"|"stringIid"|undefined} value
             * @memberof perfetto.protos.VulkanMemoryEventAnnotation
             * @instance
             */
            Object.defineProperty(VulkanMemoryEventAnnotation.prototype, "value", {
                get: $util.oneOfGetter($oneOfFields = ["intValue", "doubleValue", "stringIid"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new VulkanMemoryEventAnnotation instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.VulkanMemoryEventAnnotation
             * @static
             * @param {perfetto.protos.IVulkanMemoryEventAnnotation=} [properties] Properties to set
             * @returns {perfetto.protos.VulkanMemoryEventAnnotation} VulkanMemoryEventAnnotation instance
             */
            VulkanMemoryEventAnnotation.create = function create(properties) {
                return new VulkanMemoryEventAnnotation(properties);
            };

            /**
             * Encodes the specified VulkanMemoryEventAnnotation message. Does not implicitly {@link perfetto.protos.VulkanMemoryEventAnnotation.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.VulkanMemoryEventAnnotation
             * @static
             * @param {perfetto.protos.IVulkanMemoryEventAnnotation} m VulkanMemoryEventAnnotation message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            VulkanMemoryEventAnnotation.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.keyIid != null && Object.hasOwnProperty.call(m, "keyIid"))
                    w.uint32(8).uint64(m.keyIid);
                if (m.intValue != null && Object.hasOwnProperty.call(m, "intValue"))
                    w.uint32(16).int64(m.intValue);
                if (m.doubleValue != null && Object.hasOwnProperty.call(m, "doubleValue"))
                    w.uint32(25).double(m.doubleValue);
                if (m.stringIid != null && Object.hasOwnProperty.call(m, "stringIid"))
                    w.uint32(32).uint64(m.stringIid);
                return w;
            };

            /**
             * Encodes the specified VulkanMemoryEventAnnotation message, length delimited. Does not implicitly {@link perfetto.protos.VulkanMemoryEventAnnotation.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.VulkanMemoryEventAnnotation
             * @static
             * @param {perfetto.protos.IVulkanMemoryEventAnnotation} message VulkanMemoryEventAnnotation message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            VulkanMemoryEventAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a VulkanMemoryEventAnnotation message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.VulkanMemoryEventAnnotation
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.VulkanMemoryEventAnnotation} VulkanMemoryEventAnnotation
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            VulkanMemoryEventAnnotation.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.VulkanMemoryEventAnnotation();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.keyIid = r.uint64();
                        break;
                    case 2:
                        m.intValue = r.int64();
                        break;
                    case 3:
                        m.doubleValue = r.double();
                        break;
                    case 4:
                        m.stringIid = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a VulkanMemoryEventAnnotation message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.VulkanMemoryEventAnnotation
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.VulkanMemoryEventAnnotation} VulkanMemoryEventAnnotation
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            VulkanMemoryEventAnnotation.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a VulkanMemoryEventAnnotation message.
             * @function verify
             * @memberof perfetto.protos.VulkanMemoryEventAnnotation
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            VulkanMemoryEventAnnotation.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                var p = {};
                if (m.keyIid != null && m.hasOwnProperty("keyIid")) {
                    if (!$util.isInteger(m.keyIid) && !(m.keyIid && $util.isInteger(m.keyIid.low) && $util.isInteger(m.keyIid.high)))
                        return "keyIid: integer|Long expected";
                }
                if (m.intValue != null && m.hasOwnProperty("intValue")) {
                    p.value = 1;
                    if (!$util.isInteger(m.intValue) && !(m.intValue && $util.isInteger(m.intValue.low) && $util.isInteger(m.intValue.high)))
                        return "intValue: integer|Long expected";
                }
                if (m.doubleValue != null && m.hasOwnProperty("doubleValue")) {
                    if (p.value === 1)
                        return "value: multiple values";
                    p.value = 1;
                    if (typeof m.doubleValue !== "number")
                        return "doubleValue: number expected";
                }
                if (m.stringIid != null && m.hasOwnProperty("stringIid")) {
                    if (p.value === 1)
                        return "value: multiple values";
                    p.value = 1;
                    if (!$util.isInteger(m.stringIid) && !(m.stringIid && $util.isInteger(m.stringIid.low) && $util.isInteger(m.stringIid.high)))
                        return "stringIid: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a VulkanMemoryEventAnnotation message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.VulkanMemoryEventAnnotation
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.VulkanMemoryEventAnnotation} VulkanMemoryEventAnnotation
             */
            VulkanMemoryEventAnnotation.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.VulkanMemoryEventAnnotation)
                    return d;
                var m = new $root.perfetto.protos.VulkanMemoryEventAnnotation();
                if (d.keyIid != null) {
                    if ($util.Long)
                        (m.keyIid = $util.Long.fromValue(d.keyIid)).unsigned = true;
                    else if (typeof d.keyIid === "string")
                        m.keyIid = parseInt(d.keyIid, 10);
                    else if (typeof d.keyIid === "number")
                        m.keyIid = d.keyIid;
                    else if (typeof d.keyIid === "object")
                        m.keyIid = new $util.LongBits(d.keyIid.low >>> 0, d.keyIid.high >>> 0).toNumber(true);
                }
                if (d.intValue != null) {
                    if ($util.Long)
                        (m.intValue = $util.Long.fromValue(d.intValue)).unsigned = false;
                    else if (typeof d.intValue === "string")
                        m.intValue = parseInt(d.intValue, 10);
                    else if (typeof d.intValue === "number")
                        m.intValue = d.intValue;
                    else if (typeof d.intValue === "object")
                        m.intValue = new $util.LongBits(d.intValue.low >>> 0, d.intValue.high >>> 0).toNumber();
                }
                if (d.doubleValue != null) {
                    m.doubleValue = Number(d.doubleValue);
                }
                if (d.stringIid != null) {
                    if ($util.Long)
                        (m.stringIid = $util.Long.fromValue(d.stringIid)).unsigned = true;
                    else if (typeof d.stringIid === "string")
                        m.stringIid = parseInt(d.stringIid, 10);
                    else if (typeof d.stringIid === "number")
                        m.stringIid = d.stringIid;
                    else if (typeof d.stringIid === "object")
                        m.stringIid = new $util.LongBits(d.stringIid.low >>> 0, d.stringIid.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a VulkanMemoryEventAnnotation message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.VulkanMemoryEventAnnotation
             * @static
             * @param {perfetto.protos.VulkanMemoryEventAnnotation} m VulkanMemoryEventAnnotation
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            VulkanMemoryEventAnnotation.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.keyIid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.keyIid = o.longs === String ? "0" : 0;
                }
                if (m.keyIid != null && m.hasOwnProperty("keyIid")) {
                    if (typeof m.keyIid === "number")
                        d.keyIid = o.longs === String ? String(m.keyIid) : m.keyIid;
                    else
                        d.keyIid = o.longs === String ? $util.Long.prototype.toString.call(m.keyIid) : o.longs === Number ? new $util.LongBits(m.keyIid.low >>> 0, m.keyIid.high >>> 0).toNumber(true) : m.keyIid;
                }
                if (m.intValue != null && m.hasOwnProperty("intValue")) {
                    if (typeof m.intValue === "number")
                        d.intValue = o.longs === String ? String(m.intValue) : m.intValue;
                    else
                        d.intValue = o.longs === String ? $util.Long.prototype.toString.call(m.intValue) : o.longs === Number ? new $util.LongBits(m.intValue.low >>> 0, m.intValue.high >>> 0).toNumber() : m.intValue;
                    if (o.oneofs)
                        d.value = "intValue";
                }
                if (m.doubleValue != null && m.hasOwnProperty("doubleValue")) {
                    d.doubleValue = o.json && !isFinite(m.doubleValue) ? String(m.doubleValue) : m.doubleValue;
                    if (o.oneofs)
                        d.value = "doubleValue";
                }
                if (m.stringIid != null && m.hasOwnProperty("stringIid")) {
                    if (typeof m.stringIid === "number")
                        d.stringIid = o.longs === String ? String(m.stringIid) : m.stringIid;
                    else
                        d.stringIid = o.longs === String ? $util.Long.prototype.toString.call(m.stringIid) : o.longs === Number ? new $util.LongBits(m.stringIid.low >>> 0, m.stringIid.high >>> 0).toNumber(true) : m.stringIid;
                    if (o.oneofs)
                        d.value = "stringIid";
                }
                return d;
            };

            /**
             * Converts this VulkanMemoryEventAnnotation to JSON.
             * @function toJSON
             * @memberof perfetto.protos.VulkanMemoryEventAnnotation
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            VulkanMemoryEventAnnotation.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return VulkanMemoryEventAnnotation;
        })();

        protos.VulkanMemoryEvent = (function() {

            /**
             * Properties of a VulkanMemoryEvent.
             * @memberof perfetto.protos
             * @interface IVulkanMemoryEvent
             * @property {perfetto.protos.VulkanMemoryEvent.Source|null} [source] VulkanMemoryEvent source
             * @property {perfetto.protos.VulkanMemoryEvent.Operation|null} [operation] VulkanMemoryEvent operation
             * @property {number|null} [timestamp] VulkanMemoryEvent timestamp
             * @property {number|null} [pid] VulkanMemoryEvent pid
             * @property {number|null} [memoryAddress] VulkanMemoryEvent memoryAddress
             * @property {number|null} [memorySize] VulkanMemoryEvent memorySize
             * @property {number|null} [callerIid] VulkanMemoryEvent callerIid
             * @property {perfetto.protos.VulkanMemoryEvent.AllocationScope|null} [allocationScope] VulkanMemoryEvent allocationScope
             * @property {Array.<perfetto.protos.IVulkanMemoryEventAnnotation>|null} [annotations] VulkanMemoryEvent annotations
             * @property {number|null} [device] VulkanMemoryEvent device
             * @property {number|null} [deviceMemory] VulkanMemoryEvent deviceMemory
             * @property {number|null} [memoryType] VulkanMemoryEvent memoryType
             * @property {number|null} [heap] VulkanMemoryEvent heap
             * @property {number|null} [objectHandle] VulkanMemoryEvent objectHandle
             */

            /**
             * Constructs a new VulkanMemoryEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a VulkanMemoryEvent.
             * @implements IVulkanMemoryEvent
             * @constructor
             * @param {perfetto.protos.IVulkanMemoryEvent=} [p] Properties to set
             */
            function VulkanMemoryEvent(p) {
                this.annotations = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * VulkanMemoryEvent source.
             * @member {perfetto.protos.VulkanMemoryEvent.Source} source
             * @memberof perfetto.protos.VulkanMemoryEvent
             * @instance
             */
            VulkanMemoryEvent.prototype.source = 0;

            /**
             * VulkanMemoryEvent operation.
             * @member {perfetto.protos.VulkanMemoryEvent.Operation} operation
             * @memberof perfetto.protos.VulkanMemoryEvent
             * @instance
             */
            VulkanMemoryEvent.prototype.operation = 0;

            /**
             * VulkanMemoryEvent timestamp.
             * @member {number} timestamp
             * @memberof perfetto.protos.VulkanMemoryEvent
             * @instance
             */
            VulkanMemoryEvent.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * VulkanMemoryEvent pid.
             * @member {number} pid
             * @memberof perfetto.protos.VulkanMemoryEvent
             * @instance
             */
            VulkanMemoryEvent.prototype.pid = 0;

            /**
             * VulkanMemoryEvent memoryAddress.
             * @member {number} memoryAddress
             * @memberof perfetto.protos.VulkanMemoryEvent
             * @instance
             */
            VulkanMemoryEvent.prototype.memoryAddress = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * VulkanMemoryEvent memorySize.
             * @member {number} memorySize
             * @memberof perfetto.protos.VulkanMemoryEvent
             * @instance
             */
            VulkanMemoryEvent.prototype.memorySize = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * VulkanMemoryEvent callerIid.
             * @member {number} callerIid
             * @memberof perfetto.protos.VulkanMemoryEvent
             * @instance
             */
            VulkanMemoryEvent.prototype.callerIid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * VulkanMemoryEvent allocationScope.
             * @member {perfetto.protos.VulkanMemoryEvent.AllocationScope} allocationScope
             * @memberof perfetto.protos.VulkanMemoryEvent
             * @instance
             */
            VulkanMemoryEvent.prototype.allocationScope = 0;

            /**
             * VulkanMemoryEvent annotations.
             * @member {Array.<perfetto.protos.IVulkanMemoryEventAnnotation>} annotations
             * @memberof perfetto.protos.VulkanMemoryEvent
             * @instance
             */
            VulkanMemoryEvent.prototype.annotations = $util.emptyArray;

            /**
             * VulkanMemoryEvent device.
             * @member {number} device
             * @memberof perfetto.protos.VulkanMemoryEvent
             * @instance
             */
            VulkanMemoryEvent.prototype.device = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * VulkanMemoryEvent deviceMemory.
             * @member {number} deviceMemory
             * @memberof perfetto.protos.VulkanMemoryEvent
             * @instance
             */
            VulkanMemoryEvent.prototype.deviceMemory = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * VulkanMemoryEvent memoryType.
             * @member {number} memoryType
             * @memberof perfetto.protos.VulkanMemoryEvent
             * @instance
             */
            VulkanMemoryEvent.prototype.memoryType = 0;

            /**
             * VulkanMemoryEvent heap.
             * @member {number} heap
             * @memberof perfetto.protos.VulkanMemoryEvent
             * @instance
             */
            VulkanMemoryEvent.prototype.heap = 0;

            /**
             * VulkanMemoryEvent objectHandle.
             * @member {number} objectHandle
             * @memberof perfetto.protos.VulkanMemoryEvent
             * @instance
             */
            VulkanMemoryEvent.prototype.objectHandle = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new VulkanMemoryEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.VulkanMemoryEvent
             * @static
             * @param {perfetto.protos.IVulkanMemoryEvent=} [properties] Properties to set
             * @returns {perfetto.protos.VulkanMemoryEvent} VulkanMemoryEvent instance
             */
            VulkanMemoryEvent.create = function create(properties) {
                return new VulkanMemoryEvent(properties);
            };

            /**
             * Encodes the specified VulkanMemoryEvent message. Does not implicitly {@link perfetto.protos.VulkanMemoryEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.VulkanMemoryEvent
             * @static
             * @param {perfetto.protos.IVulkanMemoryEvent} m VulkanMemoryEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            VulkanMemoryEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.source != null && Object.hasOwnProperty.call(m, "source"))
                    w.uint32(8).int32(m.source);
                if (m.operation != null && Object.hasOwnProperty.call(m, "operation"))
                    w.uint32(16).int32(m.operation);
                if (m.timestamp != null && Object.hasOwnProperty.call(m, "timestamp"))
                    w.uint32(24).int64(m.timestamp);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(32).uint32(m.pid);
                if (m.memoryAddress != null && Object.hasOwnProperty.call(m, "memoryAddress"))
                    w.uint32(41).fixed64(m.memoryAddress);
                if (m.memorySize != null && Object.hasOwnProperty.call(m, "memorySize"))
                    w.uint32(48).uint64(m.memorySize);
                if (m.callerIid != null && Object.hasOwnProperty.call(m, "callerIid"))
                    w.uint32(56).uint64(m.callerIid);
                if (m.allocationScope != null && Object.hasOwnProperty.call(m, "allocationScope"))
                    w.uint32(64).int32(m.allocationScope);
                if (m.annotations != null && m.annotations.length) {
                    for (var i = 0; i < m.annotations.length; ++i)
                        $root.perfetto.protos.VulkanMemoryEventAnnotation.encode(m.annotations[i], w.uint32(74).fork()).ldelim();
                }
                if (m.device != null && Object.hasOwnProperty.call(m, "device"))
                    w.uint32(129).fixed64(m.device);
                if (m.deviceMemory != null && Object.hasOwnProperty.call(m, "deviceMemory"))
                    w.uint32(137).fixed64(m.deviceMemory);
                if (m.memoryType != null && Object.hasOwnProperty.call(m, "memoryType"))
                    w.uint32(144).uint32(m.memoryType);
                if (m.heap != null && Object.hasOwnProperty.call(m, "heap"))
                    w.uint32(152).uint32(m.heap);
                if (m.objectHandle != null && Object.hasOwnProperty.call(m, "objectHandle"))
                    w.uint32(161).fixed64(m.objectHandle);
                return w;
            };

            /**
             * Encodes the specified VulkanMemoryEvent message, length delimited. Does not implicitly {@link perfetto.protos.VulkanMemoryEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.VulkanMemoryEvent
             * @static
             * @param {perfetto.protos.IVulkanMemoryEvent} message VulkanMemoryEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            VulkanMemoryEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a VulkanMemoryEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.VulkanMemoryEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.VulkanMemoryEvent} VulkanMemoryEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            VulkanMemoryEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.VulkanMemoryEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.source = r.int32();
                        break;
                    case 2:
                        m.operation = r.int32();
                        break;
                    case 3:
                        m.timestamp = r.int64();
                        break;
                    case 4:
                        m.pid = r.uint32();
                        break;
                    case 5:
                        m.memoryAddress = r.fixed64();
                        break;
                    case 6:
                        m.memorySize = r.uint64();
                        break;
                    case 7:
                        m.callerIid = r.uint64();
                        break;
                    case 8:
                        m.allocationScope = r.int32();
                        break;
                    case 9:
                        if (!(m.annotations && m.annotations.length))
                            m.annotations = [];
                        m.annotations.push($root.perfetto.protos.VulkanMemoryEventAnnotation.decode(r, r.uint32()));
                        break;
                    case 16:
                        m.device = r.fixed64();
                        break;
                    case 17:
                        m.deviceMemory = r.fixed64();
                        break;
                    case 18:
                        m.memoryType = r.uint32();
                        break;
                    case 19:
                        m.heap = r.uint32();
                        break;
                    case 20:
                        m.objectHandle = r.fixed64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a VulkanMemoryEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.VulkanMemoryEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.VulkanMemoryEvent} VulkanMemoryEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            VulkanMemoryEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a VulkanMemoryEvent message.
             * @function verify
             * @memberof perfetto.protos.VulkanMemoryEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            VulkanMemoryEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.source != null && m.hasOwnProperty("source")) {
                    switch (m.source) {
                    default:
                        return "source: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                        break;
                    }
                }
                if (m.operation != null && m.hasOwnProperty("operation")) {
                    switch (m.operation) {
                    default:
                        return "operation: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                        break;
                    }
                }
                if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                    if (!$util.isInteger(m.timestamp) && !(m.timestamp && $util.isInteger(m.timestamp.low) && $util.isInteger(m.timestamp.high)))
                        return "timestamp: integer|Long expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.memoryAddress != null && m.hasOwnProperty("memoryAddress")) {
                    if (!$util.isInteger(m.memoryAddress) && !(m.memoryAddress && $util.isInteger(m.memoryAddress.low) && $util.isInteger(m.memoryAddress.high)))
                        return "memoryAddress: integer|Long expected";
                }
                if (m.memorySize != null && m.hasOwnProperty("memorySize")) {
                    if (!$util.isInteger(m.memorySize) && !(m.memorySize && $util.isInteger(m.memorySize.low) && $util.isInteger(m.memorySize.high)))
                        return "memorySize: integer|Long expected";
                }
                if (m.callerIid != null && m.hasOwnProperty("callerIid")) {
                    if (!$util.isInteger(m.callerIid) && !(m.callerIid && $util.isInteger(m.callerIid.low) && $util.isInteger(m.callerIid.high)))
                        return "callerIid: integer|Long expected";
                }
                if (m.allocationScope != null && m.hasOwnProperty("allocationScope")) {
                    switch (m.allocationScope) {
                    default:
                        return "allocationScope: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                        break;
                    }
                }
                if (m.annotations != null && m.hasOwnProperty("annotations")) {
                    if (!Array.isArray(m.annotations))
                        return "annotations: array expected";
                    for (var i = 0; i < m.annotations.length; ++i) {
                        {
                            var e = $root.perfetto.protos.VulkanMemoryEventAnnotation.verify(m.annotations[i]);
                            if (e)
                                return "annotations." + e;
                        }
                    }
                }
                if (m.device != null && m.hasOwnProperty("device")) {
                    if (!$util.isInteger(m.device) && !(m.device && $util.isInteger(m.device.low) && $util.isInteger(m.device.high)))
                        return "device: integer|Long expected";
                }
                if (m.deviceMemory != null && m.hasOwnProperty("deviceMemory")) {
                    if (!$util.isInteger(m.deviceMemory) && !(m.deviceMemory && $util.isInteger(m.deviceMemory.low) && $util.isInteger(m.deviceMemory.high)))
                        return "deviceMemory: integer|Long expected";
                }
                if (m.memoryType != null && m.hasOwnProperty("memoryType")) {
                    if (!$util.isInteger(m.memoryType))
                        return "memoryType: integer expected";
                }
                if (m.heap != null && m.hasOwnProperty("heap")) {
                    if (!$util.isInteger(m.heap))
                        return "heap: integer expected";
                }
                if (m.objectHandle != null && m.hasOwnProperty("objectHandle")) {
                    if (!$util.isInteger(m.objectHandle) && !(m.objectHandle && $util.isInteger(m.objectHandle.low) && $util.isInteger(m.objectHandle.high)))
                        return "objectHandle: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a VulkanMemoryEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.VulkanMemoryEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.VulkanMemoryEvent} VulkanMemoryEvent
             */
            VulkanMemoryEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.VulkanMemoryEvent)
                    return d;
                var m = new $root.perfetto.protos.VulkanMemoryEvent();
                switch (d.source) {
                case "SOURCE_UNSPECIFIED":
                case 0:
                    m.source = 0;
                    break;
                case "SOURCE_DRIVER":
                case 1:
                    m.source = 1;
                    break;
                case "SOURCE_DEVICE":
                case 2:
                    m.source = 2;
                    break;
                case "SOURCE_DEVICE_MEMORY":
                case 3:
                    m.source = 3;
                    break;
                case "SOURCE_BUFFER":
                case 4:
                    m.source = 4;
                    break;
                case "SOURCE_IMAGE":
                case 5:
                    m.source = 5;
                    break;
                }
                switch (d.operation) {
                case "OP_UNSPECIFIED":
                case 0:
                    m.operation = 0;
                    break;
                case "OP_CREATE":
                case 1:
                    m.operation = 1;
                    break;
                case "OP_DESTROY":
                case 2:
                    m.operation = 2;
                    break;
                case "OP_BIND":
                case 3:
                    m.operation = 3;
                    break;
                case "OP_DESTROY_BOUND":
                case 4:
                    m.operation = 4;
                    break;
                case "OP_ANNOTATIONS":
                case 5:
                    m.operation = 5;
                    break;
                }
                if (d.timestamp != null) {
                    if ($util.Long)
                        (m.timestamp = $util.Long.fromValue(d.timestamp)).unsigned = false;
                    else if (typeof d.timestamp === "string")
                        m.timestamp = parseInt(d.timestamp, 10);
                    else if (typeof d.timestamp === "number")
                        m.timestamp = d.timestamp;
                    else if (typeof d.timestamp === "object")
                        m.timestamp = new $util.LongBits(d.timestamp.low >>> 0, d.timestamp.high >>> 0).toNumber();
                }
                if (d.pid != null) {
                    m.pid = d.pid >>> 0;
                }
                if (d.memoryAddress != null) {
                    if ($util.Long)
                        (m.memoryAddress = $util.Long.fromValue(d.memoryAddress)).unsigned = false;
                    else if (typeof d.memoryAddress === "string")
                        m.memoryAddress = parseInt(d.memoryAddress, 10);
                    else if (typeof d.memoryAddress === "number")
                        m.memoryAddress = d.memoryAddress;
                    else if (typeof d.memoryAddress === "object")
                        m.memoryAddress = new $util.LongBits(d.memoryAddress.low >>> 0, d.memoryAddress.high >>> 0).toNumber();
                }
                if (d.memorySize != null) {
                    if ($util.Long)
                        (m.memorySize = $util.Long.fromValue(d.memorySize)).unsigned = true;
                    else if (typeof d.memorySize === "string")
                        m.memorySize = parseInt(d.memorySize, 10);
                    else if (typeof d.memorySize === "number")
                        m.memorySize = d.memorySize;
                    else if (typeof d.memorySize === "object")
                        m.memorySize = new $util.LongBits(d.memorySize.low >>> 0, d.memorySize.high >>> 0).toNumber(true);
                }
                if (d.callerIid != null) {
                    if ($util.Long)
                        (m.callerIid = $util.Long.fromValue(d.callerIid)).unsigned = true;
                    else if (typeof d.callerIid === "string")
                        m.callerIid = parseInt(d.callerIid, 10);
                    else if (typeof d.callerIid === "number")
                        m.callerIid = d.callerIid;
                    else if (typeof d.callerIid === "object")
                        m.callerIid = new $util.LongBits(d.callerIid.low >>> 0, d.callerIid.high >>> 0).toNumber(true);
                }
                switch (d.allocationScope) {
                case "SCOPE_UNSPECIFIED":
                case 0:
                    m.allocationScope = 0;
                    break;
                case "SCOPE_COMMAND":
                case 1:
                    m.allocationScope = 1;
                    break;
                case "SCOPE_OBJECT":
                case 2:
                    m.allocationScope = 2;
                    break;
                case "SCOPE_CACHE":
                case 3:
                    m.allocationScope = 3;
                    break;
                case "SCOPE_DEVICE":
                case 4:
                    m.allocationScope = 4;
                    break;
                case "SCOPE_INSTANCE":
                case 5:
                    m.allocationScope = 5;
                    break;
                }
                if (d.annotations) {
                    if (!Array.isArray(d.annotations))
                        throw TypeError(".perfetto.protos.VulkanMemoryEvent.annotations: array expected");
                    m.annotations = [];
                    for (var i = 0; i < d.annotations.length; ++i) {
                        if (typeof d.annotations[i] !== "object")
                            throw TypeError(".perfetto.protos.VulkanMemoryEvent.annotations: object expected");
                        m.annotations[i] = $root.perfetto.protos.VulkanMemoryEventAnnotation.fromObject(d.annotations[i]);
                    }
                }
                if (d.device != null) {
                    if ($util.Long)
                        (m.device = $util.Long.fromValue(d.device)).unsigned = false;
                    else if (typeof d.device === "string")
                        m.device = parseInt(d.device, 10);
                    else if (typeof d.device === "number")
                        m.device = d.device;
                    else if (typeof d.device === "object")
                        m.device = new $util.LongBits(d.device.low >>> 0, d.device.high >>> 0).toNumber();
                }
                if (d.deviceMemory != null) {
                    if ($util.Long)
                        (m.deviceMemory = $util.Long.fromValue(d.deviceMemory)).unsigned = false;
                    else if (typeof d.deviceMemory === "string")
                        m.deviceMemory = parseInt(d.deviceMemory, 10);
                    else if (typeof d.deviceMemory === "number")
                        m.deviceMemory = d.deviceMemory;
                    else if (typeof d.deviceMemory === "object")
                        m.deviceMemory = new $util.LongBits(d.deviceMemory.low >>> 0, d.deviceMemory.high >>> 0).toNumber();
                }
                if (d.memoryType != null) {
                    m.memoryType = d.memoryType >>> 0;
                }
                if (d.heap != null) {
                    m.heap = d.heap >>> 0;
                }
                if (d.objectHandle != null) {
                    if ($util.Long)
                        (m.objectHandle = $util.Long.fromValue(d.objectHandle)).unsigned = false;
                    else if (typeof d.objectHandle === "string")
                        m.objectHandle = parseInt(d.objectHandle, 10);
                    else if (typeof d.objectHandle === "number")
                        m.objectHandle = d.objectHandle;
                    else if (typeof d.objectHandle === "object")
                        m.objectHandle = new $util.LongBits(d.objectHandle.low >>> 0, d.objectHandle.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from a VulkanMemoryEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.VulkanMemoryEvent
             * @static
             * @param {perfetto.protos.VulkanMemoryEvent} m VulkanMemoryEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            VulkanMemoryEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.annotations = [];
                }
                if (o.defaults) {
                    d.source = o.enums === String ? "SOURCE_UNSPECIFIED" : 0;
                    d.operation = o.enums === String ? "OP_UNSPECIFIED" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.timestamp = o.longs === String ? "0" : 0;
                    d.pid = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.memoryAddress = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.memoryAddress = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.memorySize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.memorySize = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.callerIid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.callerIid = o.longs === String ? "0" : 0;
                    d.allocationScope = o.enums === String ? "SCOPE_UNSPECIFIED" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.device = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.device = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.deviceMemory = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.deviceMemory = o.longs === String ? "0" : 0;
                    d.memoryType = 0;
                    d.heap = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.objectHandle = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.objectHandle = o.longs === String ? "0" : 0;
                }
                if (m.source != null && m.hasOwnProperty("source")) {
                    d.source = o.enums === String ? $root.perfetto.protos.VulkanMemoryEvent.Source[m.source] : m.source;
                }
                if (m.operation != null && m.hasOwnProperty("operation")) {
                    d.operation = o.enums === String ? $root.perfetto.protos.VulkanMemoryEvent.Operation[m.operation] : m.operation;
                }
                if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                    if (typeof m.timestamp === "number")
                        d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp;
                    else
                        d.timestamp = o.longs === String ? $util.Long.prototype.toString.call(m.timestamp) : o.longs === Number ? new $util.LongBits(m.timestamp.low >>> 0, m.timestamp.high >>> 0).toNumber() : m.timestamp;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.memoryAddress != null && m.hasOwnProperty("memoryAddress")) {
                    if (typeof m.memoryAddress === "number")
                        d.memoryAddress = o.longs === String ? String(m.memoryAddress) : m.memoryAddress;
                    else
                        d.memoryAddress = o.longs === String ? $util.Long.prototype.toString.call(m.memoryAddress) : o.longs === Number ? new $util.LongBits(m.memoryAddress.low >>> 0, m.memoryAddress.high >>> 0).toNumber() : m.memoryAddress;
                }
                if (m.memorySize != null && m.hasOwnProperty("memorySize")) {
                    if (typeof m.memorySize === "number")
                        d.memorySize = o.longs === String ? String(m.memorySize) : m.memorySize;
                    else
                        d.memorySize = o.longs === String ? $util.Long.prototype.toString.call(m.memorySize) : o.longs === Number ? new $util.LongBits(m.memorySize.low >>> 0, m.memorySize.high >>> 0).toNumber(true) : m.memorySize;
                }
                if (m.callerIid != null && m.hasOwnProperty("callerIid")) {
                    if (typeof m.callerIid === "number")
                        d.callerIid = o.longs === String ? String(m.callerIid) : m.callerIid;
                    else
                        d.callerIid = o.longs === String ? $util.Long.prototype.toString.call(m.callerIid) : o.longs === Number ? new $util.LongBits(m.callerIid.low >>> 0, m.callerIid.high >>> 0).toNumber(true) : m.callerIid;
                }
                if (m.allocationScope != null && m.hasOwnProperty("allocationScope")) {
                    d.allocationScope = o.enums === String ? $root.perfetto.protos.VulkanMemoryEvent.AllocationScope[m.allocationScope] : m.allocationScope;
                }
                if (m.annotations && m.annotations.length) {
                    d.annotations = [];
                    for (var j = 0; j < m.annotations.length; ++j) {
                        d.annotations[j] = $root.perfetto.protos.VulkanMemoryEventAnnotation.toObject(m.annotations[j], o);
                    }
                }
                if (m.device != null && m.hasOwnProperty("device")) {
                    if (typeof m.device === "number")
                        d.device = o.longs === String ? String(m.device) : m.device;
                    else
                        d.device = o.longs === String ? $util.Long.prototype.toString.call(m.device) : o.longs === Number ? new $util.LongBits(m.device.low >>> 0, m.device.high >>> 0).toNumber() : m.device;
                }
                if (m.deviceMemory != null && m.hasOwnProperty("deviceMemory")) {
                    if (typeof m.deviceMemory === "number")
                        d.deviceMemory = o.longs === String ? String(m.deviceMemory) : m.deviceMemory;
                    else
                        d.deviceMemory = o.longs === String ? $util.Long.prototype.toString.call(m.deviceMemory) : o.longs === Number ? new $util.LongBits(m.deviceMemory.low >>> 0, m.deviceMemory.high >>> 0).toNumber() : m.deviceMemory;
                }
                if (m.memoryType != null && m.hasOwnProperty("memoryType")) {
                    d.memoryType = m.memoryType;
                }
                if (m.heap != null && m.hasOwnProperty("heap")) {
                    d.heap = m.heap;
                }
                if (m.objectHandle != null && m.hasOwnProperty("objectHandle")) {
                    if (typeof m.objectHandle === "number")
                        d.objectHandle = o.longs === String ? String(m.objectHandle) : m.objectHandle;
                    else
                        d.objectHandle = o.longs === String ? $util.Long.prototype.toString.call(m.objectHandle) : o.longs === Number ? new $util.LongBits(m.objectHandle.low >>> 0, m.objectHandle.high >>> 0).toNumber() : m.objectHandle;
                }
                return d;
            };

            /**
             * Converts this VulkanMemoryEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.VulkanMemoryEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            VulkanMemoryEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * Source enum.
             * @name perfetto.protos.VulkanMemoryEvent.Source
             * @enum {number}
             * @property {number} SOURCE_UNSPECIFIED=0 SOURCE_UNSPECIFIED value
             * @property {number} SOURCE_DRIVER=1 SOURCE_DRIVER value
             * @property {number} SOURCE_DEVICE=2 SOURCE_DEVICE value
             * @property {number} SOURCE_DEVICE_MEMORY=3 SOURCE_DEVICE_MEMORY value
             * @property {number} SOURCE_BUFFER=4 SOURCE_BUFFER value
             * @property {number} SOURCE_IMAGE=5 SOURCE_IMAGE value
             */
            VulkanMemoryEvent.Source = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "SOURCE_UNSPECIFIED"] = 0;
                values[valuesById[1] = "SOURCE_DRIVER"] = 1;
                values[valuesById[2] = "SOURCE_DEVICE"] = 2;
                values[valuesById[3] = "SOURCE_DEVICE_MEMORY"] = 3;
                values[valuesById[4] = "SOURCE_BUFFER"] = 4;
                values[valuesById[5] = "SOURCE_IMAGE"] = 5;
                return values;
            })();

            /**
             * Operation enum.
             * @name perfetto.protos.VulkanMemoryEvent.Operation
             * @enum {number}
             * @property {number} OP_UNSPECIFIED=0 OP_UNSPECIFIED value
             * @property {number} OP_CREATE=1 OP_CREATE value
             * @property {number} OP_DESTROY=2 OP_DESTROY value
             * @property {number} OP_BIND=3 OP_BIND value
             * @property {number} OP_DESTROY_BOUND=4 OP_DESTROY_BOUND value
             * @property {number} OP_ANNOTATIONS=5 OP_ANNOTATIONS value
             */
            VulkanMemoryEvent.Operation = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "OP_UNSPECIFIED"] = 0;
                values[valuesById[1] = "OP_CREATE"] = 1;
                values[valuesById[2] = "OP_DESTROY"] = 2;
                values[valuesById[3] = "OP_BIND"] = 3;
                values[valuesById[4] = "OP_DESTROY_BOUND"] = 4;
                values[valuesById[5] = "OP_ANNOTATIONS"] = 5;
                return values;
            })();

            /**
             * AllocationScope enum.
             * @name perfetto.protos.VulkanMemoryEvent.AllocationScope
             * @enum {number}
             * @property {number} SCOPE_UNSPECIFIED=0 SCOPE_UNSPECIFIED value
             * @property {number} SCOPE_COMMAND=1 SCOPE_COMMAND value
             * @property {number} SCOPE_OBJECT=2 SCOPE_OBJECT value
             * @property {number} SCOPE_CACHE=3 SCOPE_CACHE value
             * @property {number} SCOPE_DEVICE=4 SCOPE_DEVICE value
             * @property {number} SCOPE_INSTANCE=5 SCOPE_INSTANCE value
             */
            VulkanMemoryEvent.AllocationScope = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "SCOPE_UNSPECIFIED"] = 0;
                values[valuesById[1] = "SCOPE_COMMAND"] = 1;
                values[valuesById[2] = "SCOPE_OBJECT"] = 2;
                values[valuesById[3] = "SCOPE_CACHE"] = 3;
                values[valuesById[4] = "SCOPE_DEVICE"] = 4;
                values[valuesById[5] = "SCOPE_INSTANCE"] = 5;
                return values;
            })();

            return VulkanMemoryEvent;
        })();

        protos.VulkanApiEvent = (function() {

            /**
             * Properties of a VulkanApiEvent.
             * @memberof perfetto.protos
             * @interface IVulkanApiEvent
             * @property {perfetto.protos.VulkanApiEvent.IVkDebugUtilsObjectName|null} [vkDebugUtilsObjectName] VulkanApiEvent vkDebugUtilsObjectName
             * @property {perfetto.protos.VulkanApiEvent.IVkQueueSubmit|null} [vkQueueSubmit] VulkanApiEvent vkQueueSubmit
             */

            /**
             * Constructs a new VulkanApiEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a VulkanApiEvent.
             * @implements IVulkanApiEvent
             * @constructor
             * @param {perfetto.protos.IVulkanApiEvent=} [p] Properties to set
             */
            function VulkanApiEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * VulkanApiEvent vkDebugUtilsObjectName.
             * @member {perfetto.protos.VulkanApiEvent.IVkDebugUtilsObjectName|null|undefined} vkDebugUtilsObjectName
             * @memberof perfetto.protos.VulkanApiEvent
             * @instance
             */
            VulkanApiEvent.prototype.vkDebugUtilsObjectName = null;

            /**
             * VulkanApiEvent vkQueueSubmit.
             * @member {perfetto.protos.VulkanApiEvent.IVkQueueSubmit|null|undefined} vkQueueSubmit
             * @memberof perfetto.protos.VulkanApiEvent
             * @instance
             */
            VulkanApiEvent.prototype.vkQueueSubmit = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * VulkanApiEvent event.
             * @member {"vkDebugUtilsObjectName"|"vkQueueSubmit"|undefined} event
             * @memberof perfetto.protos.VulkanApiEvent
             * @instance
             */
            Object.defineProperty(VulkanApiEvent.prototype, "event", {
                get: $util.oneOfGetter($oneOfFields = ["vkDebugUtilsObjectName", "vkQueueSubmit"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new VulkanApiEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.VulkanApiEvent
             * @static
             * @param {perfetto.protos.IVulkanApiEvent=} [properties] Properties to set
             * @returns {perfetto.protos.VulkanApiEvent} VulkanApiEvent instance
             */
            VulkanApiEvent.create = function create(properties) {
                return new VulkanApiEvent(properties);
            };

            /**
             * Encodes the specified VulkanApiEvent message. Does not implicitly {@link perfetto.protos.VulkanApiEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.VulkanApiEvent
             * @static
             * @param {perfetto.protos.IVulkanApiEvent} m VulkanApiEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            VulkanApiEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.vkDebugUtilsObjectName != null && Object.hasOwnProperty.call(m, "vkDebugUtilsObjectName"))
                    $root.perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName.encode(m.vkDebugUtilsObjectName, w.uint32(10).fork()).ldelim();
                if (m.vkQueueSubmit != null && Object.hasOwnProperty.call(m, "vkQueueSubmit"))
                    $root.perfetto.protos.VulkanApiEvent.VkQueueSubmit.encode(m.vkQueueSubmit, w.uint32(18).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified VulkanApiEvent message, length delimited. Does not implicitly {@link perfetto.protos.VulkanApiEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.VulkanApiEvent
             * @static
             * @param {perfetto.protos.IVulkanApiEvent} message VulkanApiEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            VulkanApiEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a VulkanApiEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.VulkanApiEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.VulkanApiEvent} VulkanApiEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            VulkanApiEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.VulkanApiEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.vkDebugUtilsObjectName = $root.perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName.decode(r, r.uint32());
                        break;
                    case 2:
                        m.vkQueueSubmit = $root.perfetto.protos.VulkanApiEvent.VkQueueSubmit.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a VulkanApiEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.VulkanApiEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.VulkanApiEvent} VulkanApiEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            VulkanApiEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a VulkanApiEvent message.
             * @function verify
             * @memberof perfetto.protos.VulkanApiEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            VulkanApiEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                var p = {};
                if (m.vkDebugUtilsObjectName != null && m.hasOwnProperty("vkDebugUtilsObjectName")) {
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName.verify(m.vkDebugUtilsObjectName);
                        if (e)
                            return "vkDebugUtilsObjectName." + e;
                    }
                }
                if (m.vkQueueSubmit != null && m.hasOwnProperty("vkQueueSubmit")) {
                    if (p.event === 1)
                        return "event: multiple values";
                    p.event = 1;
                    {
                        var e = $root.perfetto.protos.VulkanApiEvent.VkQueueSubmit.verify(m.vkQueueSubmit);
                        if (e)
                            return "vkQueueSubmit." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a VulkanApiEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.VulkanApiEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.VulkanApiEvent} VulkanApiEvent
             */
            VulkanApiEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.VulkanApiEvent)
                    return d;
                var m = new $root.perfetto.protos.VulkanApiEvent();
                if (d.vkDebugUtilsObjectName != null) {
                    if (typeof d.vkDebugUtilsObjectName !== "object")
                        throw TypeError(".perfetto.protos.VulkanApiEvent.vkDebugUtilsObjectName: object expected");
                    m.vkDebugUtilsObjectName = $root.perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName.fromObject(d.vkDebugUtilsObjectName);
                }
                if (d.vkQueueSubmit != null) {
                    if (typeof d.vkQueueSubmit !== "object")
                        throw TypeError(".perfetto.protos.VulkanApiEvent.vkQueueSubmit: object expected");
                    m.vkQueueSubmit = $root.perfetto.protos.VulkanApiEvent.VkQueueSubmit.fromObject(d.vkQueueSubmit);
                }
                return m;
            };

            /**
             * Creates a plain object from a VulkanApiEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.VulkanApiEvent
             * @static
             * @param {perfetto.protos.VulkanApiEvent} m VulkanApiEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            VulkanApiEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (m.vkDebugUtilsObjectName != null && m.hasOwnProperty("vkDebugUtilsObjectName")) {
                    d.vkDebugUtilsObjectName = $root.perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName.toObject(m.vkDebugUtilsObjectName, o);
                    if (o.oneofs)
                        d.event = "vkDebugUtilsObjectName";
                }
                if (m.vkQueueSubmit != null && m.hasOwnProperty("vkQueueSubmit")) {
                    d.vkQueueSubmit = $root.perfetto.protos.VulkanApiEvent.VkQueueSubmit.toObject(m.vkQueueSubmit, o);
                    if (o.oneofs)
                        d.event = "vkQueueSubmit";
                }
                return d;
            };

            /**
             * Converts this VulkanApiEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.VulkanApiEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            VulkanApiEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            VulkanApiEvent.VkDebugUtilsObjectName = (function() {

                /**
                 * Properties of a VkDebugUtilsObjectName.
                 * @memberof perfetto.protos.VulkanApiEvent
                 * @interface IVkDebugUtilsObjectName
                 * @property {number|null} [pid] VkDebugUtilsObjectName pid
                 * @property {number|null} [vkDevice] VkDebugUtilsObjectName vkDevice
                 * @property {number|null} [objectType] VkDebugUtilsObjectName objectType
                 * @property {number|null} [object] VkDebugUtilsObjectName object
                 * @property {string|null} [objectName] VkDebugUtilsObjectName objectName
                 */

                /**
                 * Constructs a new VkDebugUtilsObjectName.
                 * @memberof perfetto.protos.VulkanApiEvent
                 * @classdesc Represents a VkDebugUtilsObjectName.
                 * @implements IVkDebugUtilsObjectName
                 * @constructor
                 * @param {perfetto.protos.VulkanApiEvent.IVkDebugUtilsObjectName=} [p] Properties to set
                 */
                function VkDebugUtilsObjectName(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * VkDebugUtilsObjectName pid.
                 * @member {number} pid
                 * @memberof perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName
                 * @instance
                 */
                VkDebugUtilsObjectName.prototype.pid = 0;

                /**
                 * VkDebugUtilsObjectName vkDevice.
                 * @member {number} vkDevice
                 * @memberof perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName
                 * @instance
                 */
                VkDebugUtilsObjectName.prototype.vkDevice = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * VkDebugUtilsObjectName objectType.
                 * @member {number} objectType
                 * @memberof perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName
                 * @instance
                 */
                VkDebugUtilsObjectName.prototype.objectType = 0;

                /**
                 * VkDebugUtilsObjectName object.
                 * @member {number} object
                 * @memberof perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName
                 * @instance
                 */
                VkDebugUtilsObjectName.prototype.object = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * VkDebugUtilsObjectName objectName.
                 * @member {string} objectName
                 * @memberof perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName
                 * @instance
                 */
                VkDebugUtilsObjectName.prototype.objectName = "";

                /**
                 * Creates a new VkDebugUtilsObjectName instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName
                 * @static
                 * @param {perfetto.protos.VulkanApiEvent.IVkDebugUtilsObjectName=} [properties] Properties to set
                 * @returns {perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName} VkDebugUtilsObjectName instance
                 */
                VkDebugUtilsObjectName.create = function create(properties) {
                    return new VkDebugUtilsObjectName(properties);
                };

                /**
                 * Encodes the specified VkDebugUtilsObjectName message. Does not implicitly {@link perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName
                 * @static
                 * @param {perfetto.protos.VulkanApiEvent.IVkDebugUtilsObjectName} m VkDebugUtilsObjectName message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                VkDebugUtilsObjectName.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                        w.uint32(8).uint32(m.pid);
                    if (m.vkDevice != null && Object.hasOwnProperty.call(m, "vkDevice"))
                        w.uint32(16).uint64(m.vkDevice);
                    if (m.objectType != null && Object.hasOwnProperty.call(m, "objectType"))
                        w.uint32(24).int32(m.objectType);
                    if (m.object != null && Object.hasOwnProperty.call(m, "object"))
                        w.uint32(32).uint64(m.object);
                    if (m.objectName != null && Object.hasOwnProperty.call(m, "objectName"))
                        w.uint32(42).string(m.objectName);
                    return w;
                };

                /**
                 * Encodes the specified VkDebugUtilsObjectName message, length delimited. Does not implicitly {@link perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName
                 * @static
                 * @param {perfetto.protos.VulkanApiEvent.IVkDebugUtilsObjectName} message VkDebugUtilsObjectName message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                VkDebugUtilsObjectName.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a VkDebugUtilsObjectName message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName} VkDebugUtilsObjectName
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                VkDebugUtilsObjectName.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.pid = r.uint32();
                            break;
                        case 2:
                            m.vkDevice = r.uint64();
                            break;
                        case 3:
                            m.objectType = r.int32();
                            break;
                        case 4:
                            m.object = r.uint64();
                            break;
                        case 5:
                            m.objectName = r.string();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a VkDebugUtilsObjectName message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName} VkDebugUtilsObjectName
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                VkDebugUtilsObjectName.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a VkDebugUtilsObjectName message.
                 * @function verify
                 * @memberof perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                VkDebugUtilsObjectName.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        if (!$util.isInteger(m.pid))
                            return "pid: integer expected";
                    }
                    if (m.vkDevice != null && m.hasOwnProperty("vkDevice")) {
                        if (!$util.isInteger(m.vkDevice) && !(m.vkDevice && $util.isInteger(m.vkDevice.low) && $util.isInteger(m.vkDevice.high)))
                            return "vkDevice: integer|Long expected";
                    }
                    if (m.objectType != null && m.hasOwnProperty("objectType")) {
                        if (!$util.isInteger(m.objectType))
                            return "objectType: integer expected";
                    }
                    if (m.object != null && m.hasOwnProperty("object")) {
                        if (!$util.isInteger(m.object) && !(m.object && $util.isInteger(m.object.low) && $util.isInteger(m.object.high)))
                            return "object: integer|Long expected";
                    }
                    if (m.objectName != null && m.hasOwnProperty("objectName")) {
                        if (!$util.isString(m.objectName))
                            return "objectName: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a VkDebugUtilsObjectName message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName} VkDebugUtilsObjectName
                 */
                VkDebugUtilsObjectName.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName)
                        return d;
                    var m = new $root.perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName();
                    if (d.pid != null) {
                        m.pid = d.pid >>> 0;
                    }
                    if (d.vkDevice != null) {
                        if ($util.Long)
                            (m.vkDevice = $util.Long.fromValue(d.vkDevice)).unsigned = true;
                        else if (typeof d.vkDevice === "string")
                            m.vkDevice = parseInt(d.vkDevice, 10);
                        else if (typeof d.vkDevice === "number")
                            m.vkDevice = d.vkDevice;
                        else if (typeof d.vkDevice === "object")
                            m.vkDevice = new $util.LongBits(d.vkDevice.low >>> 0, d.vkDevice.high >>> 0).toNumber(true);
                    }
                    if (d.objectType != null) {
                        m.objectType = d.objectType | 0;
                    }
                    if (d.object != null) {
                        if ($util.Long)
                            (m.object = $util.Long.fromValue(d.object)).unsigned = true;
                        else if (typeof d.object === "string")
                            m.object = parseInt(d.object, 10);
                        else if (typeof d.object === "number")
                            m.object = d.object;
                        else if (typeof d.object === "object")
                            m.object = new $util.LongBits(d.object.low >>> 0, d.object.high >>> 0).toNumber(true);
                    }
                    if (d.objectName != null) {
                        m.objectName = String(d.objectName);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a VkDebugUtilsObjectName message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName
                 * @static
                 * @param {perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName} m VkDebugUtilsObjectName
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                VkDebugUtilsObjectName.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.pid = 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.vkDevice = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.vkDevice = o.longs === String ? "0" : 0;
                        d.objectType = 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.object = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.object = o.longs === String ? "0" : 0;
                        d.objectName = "";
                    }
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        d.pid = m.pid;
                    }
                    if (m.vkDevice != null && m.hasOwnProperty("vkDevice")) {
                        if (typeof m.vkDevice === "number")
                            d.vkDevice = o.longs === String ? String(m.vkDevice) : m.vkDevice;
                        else
                            d.vkDevice = o.longs === String ? $util.Long.prototype.toString.call(m.vkDevice) : o.longs === Number ? new $util.LongBits(m.vkDevice.low >>> 0, m.vkDevice.high >>> 0).toNumber(true) : m.vkDevice;
                    }
                    if (m.objectType != null && m.hasOwnProperty("objectType")) {
                        d.objectType = m.objectType;
                    }
                    if (m.object != null && m.hasOwnProperty("object")) {
                        if (typeof m.object === "number")
                            d.object = o.longs === String ? String(m.object) : m.object;
                        else
                            d.object = o.longs === String ? $util.Long.prototype.toString.call(m.object) : o.longs === Number ? new $util.LongBits(m.object.low >>> 0, m.object.high >>> 0).toNumber(true) : m.object;
                    }
                    if (m.objectName != null && m.hasOwnProperty("objectName")) {
                        d.objectName = m.objectName;
                    }
                    return d;
                };

                /**
                 * Converts this VkDebugUtilsObjectName to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.VulkanApiEvent.VkDebugUtilsObjectName
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                VkDebugUtilsObjectName.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return VkDebugUtilsObjectName;
            })();

            VulkanApiEvent.VkQueueSubmit = (function() {

                /**
                 * Properties of a VkQueueSubmit.
                 * @memberof perfetto.protos.VulkanApiEvent
                 * @interface IVkQueueSubmit
                 * @property {number|null} [durationNs] VkQueueSubmit durationNs
                 * @property {number|null} [pid] VkQueueSubmit pid
                 * @property {number|null} [tid] VkQueueSubmit tid
                 * @property {number|null} [vkQueue] VkQueueSubmit vkQueue
                 * @property {Array.<number>|null} [vkCommandBuffers] VkQueueSubmit vkCommandBuffers
                 * @property {number|null} [submissionId] VkQueueSubmit submissionId
                 */

                /**
                 * Constructs a new VkQueueSubmit.
                 * @memberof perfetto.protos.VulkanApiEvent
                 * @classdesc Represents a VkQueueSubmit.
                 * @implements IVkQueueSubmit
                 * @constructor
                 * @param {perfetto.protos.VulkanApiEvent.IVkQueueSubmit=} [p] Properties to set
                 */
                function VkQueueSubmit(p) {
                    this.vkCommandBuffers = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * VkQueueSubmit durationNs.
                 * @member {number} durationNs
                 * @memberof perfetto.protos.VulkanApiEvent.VkQueueSubmit
                 * @instance
                 */
                VkQueueSubmit.prototype.durationNs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * VkQueueSubmit pid.
                 * @member {number} pid
                 * @memberof perfetto.protos.VulkanApiEvent.VkQueueSubmit
                 * @instance
                 */
                VkQueueSubmit.prototype.pid = 0;

                /**
                 * VkQueueSubmit tid.
                 * @member {number} tid
                 * @memberof perfetto.protos.VulkanApiEvent.VkQueueSubmit
                 * @instance
                 */
                VkQueueSubmit.prototype.tid = 0;

                /**
                 * VkQueueSubmit vkQueue.
                 * @member {number} vkQueue
                 * @memberof perfetto.protos.VulkanApiEvent.VkQueueSubmit
                 * @instance
                 */
                VkQueueSubmit.prototype.vkQueue = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * VkQueueSubmit vkCommandBuffers.
                 * @member {Array.<number>} vkCommandBuffers
                 * @memberof perfetto.protos.VulkanApiEvent.VkQueueSubmit
                 * @instance
                 */
                VkQueueSubmit.prototype.vkCommandBuffers = $util.emptyArray;

                /**
                 * VkQueueSubmit submissionId.
                 * @member {number} submissionId
                 * @memberof perfetto.protos.VulkanApiEvent.VkQueueSubmit
                 * @instance
                 */
                VkQueueSubmit.prototype.submissionId = 0;

                /**
                 * Creates a new VkQueueSubmit instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.VulkanApiEvent.VkQueueSubmit
                 * @static
                 * @param {perfetto.protos.VulkanApiEvent.IVkQueueSubmit=} [properties] Properties to set
                 * @returns {perfetto.protos.VulkanApiEvent.VkQueueSubmit} VkQueueSubmit instance
                 */
                VkQueueSubmit.create = function create(properties) {
                    return new VkQueueSubmit(properties);
                };

                /**
                 * Encodes the specified VkQueueSubmit message. Does not implicitly {@link perfetto.protos.VulkanApiEvent.VkQueueSubmit.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.VulkanApiEvent.VkQueueSubmit
                 * @static
                 * @param {perfetto.protos.VulkanApiEvent.IVkQueueSubmit} m VkQueueSubmit message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                VkQueueSubmit.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.durationNs != null && Object.hasOwnProperty.call(m, "durationNs"))
                        w.uint32(8).uint64(m.durationNs);
                    if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                        w.uint32(16).uint32(m.pid);
                    if (m.tid != null && Object.hasOwnProperty.call(m, "tid"))
                        w.uint32(24).uint32(m.tid);
                    if (m.vkQueue != null && Object.hasOwnProperty.call(m, "vkQueue"))
                        w.uint32(32).uint64(m.vkQueue);
                    if (m.vkCommandBuffers != null && m.vkCommandBuffers.length) {
                        for (var i = 0; i < m.vkCommandBuffers.length; ++i)
                            w.uint32(40).uint64(m.vkCommandBuffers[i]);
                    }
                    if (m.submissionId != null && Object.hasOwnProperty.call(m, "submissionId"))
                        w.uint32(48).uint32(m.submissionId);
                    return w;
                };

                /**
                 * Encodes the specified VkQueueSubmit message, length delimited. Does not implicitly {@link perfetto.protos.VulkanApiEvent.VkQueueSubmit.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.VulkanApiEvent.VkQueueSubmit
                 * @static
                 * @param {perfetto.protos.VulkanApiEvent.IVkQueueSubmit} message VkQueueSubmit message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                VkQueueSubmit.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a VkQueueSubmit message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.VulkanApiEvent.VkQueueSubmit
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.VulkanApiEvent.VkQueueSubmit} VkQueueSubmit
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                VkQueueSubmit.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.VulkanApiEvent.VkQueueSubmit();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.durationNs = r.uint64();
                            break;
                        case 2:
                            m.pid = r.uint32();
                            break;
                        case 3:
                            m.tid = r.uint32();
                            break;
                        case 4:
                            m.vkQueue = r.uint64();
                            break;
                        case 5:
                            if (!(m.vkCommandBuffers && m.vkCommandBuffers.length))
                                m.vkCommandBuffers = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.vkCommandBuffers.push(r.uint64());
                            } else
                                m.vkCommandBuffers.push(r.uint64());
                            break;
                        case 6:
                            m.submissionId = r.uint32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a VkQueueSubmit message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.VulkanApiEvent.VkQueueSubmit
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.VulkanApiEvent.VkQueueSubmit} VkQueueSubmit
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                VkQueueSubmit.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a VkQueueSubmit message.
                 * @function verify
                 * @memberof perfetto.protos.VulkanApiEvent.VkQueueSubmit
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                VkQueueSubmit.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.durationNs != null && m.hasOwnProperty("durationNs")) {
                        if (!$util.isInteger(m.durationNs) && !(m.durationNs && $util.isInteger(m.durationNs.low) && $util.isInteger(m.durationNs.high)))
                            return "durationNs: integer|Long expected";
                    }
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        if (!$util.isInteger(m.pid))
                            return "pid: integer expected";
                    }
                    if (m.tid != null && m.hasOwnProperty("tid")) {
                        if (!$util.isInteger(m.tid))
                            return "tid: integer expected";
                    }
                    if (m.vkQueue != null && m.hasOwnProperty("vkQueue")) {
                        if (!$util.isInteger(m.vkQueue) && !(m.vkQueue && $util.isInteger(m.vkQueue.low) && $util.isInteger(m.vkQueue.high)))
                            return "vkQueue: integer|Long expected";
                    }
                    if (m.vkCommandBuffers != null && m.hasOwnProperty("vkCommandBuffers")) {
                        if (!Array.isArray(m.vkCommandBuffers))
                            return "vkCommandBuffers: array expected";
                        for (var i = 0; i < m.vkCommandBuffers.length; ++i) {
                            if (!$util.isInteger(m.vkCommandBuffers[i]) && !(m.vkCommandBuffers[i] && $util.isInteger(m.vkCommandBuffers[i].low) && $util.isInteger(m.vkCommandBuffers[i].high)))
                                return "vkCommandBuffers: integer|Long[] expected";
                        }
                    }
                    if (m.submissionId != null && m.hasOwnProperty("submissionId")) {
                        if (!$util.isInteger(m.submissionId))
                            return "submissionId: integer expected";
                    }
                    return null;
                };

                /**
                 * Creates a VkQueueSubmit message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.VulkanApiEvent.VkQueueSubmit
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.VulkanApiEvent.VkQueueSubmit} VkQueueSubmit
                 */
                VkQueueSubmit.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.VulkanApiEvent.VkQueueSubmit)
                        return d;
                    var m = new $root.perfetto.protos.VulkanApiEvent.VkQueueSubmit();
                    if (d.durationNs != null) {
                        if ($util.Long)
                            (m.durationNs = $util.Long.fromValue(d.durationNs)).unsigned = true;
                        else if (typeof d.durationNs === "string")
                            m.durationNs = parseInt(d.durationNs, 10);
                        else if (typeof d.durationNs === "number")
                            m.durationNs = d.durationNs;
                        else if (typeof d.durationNs === "object")
                            m.durationNs = new $util.LongBits(d.durationNs.low >>> 0, d.durationNs.high >>> 0).toNumber(true);
                    }
                    if (d.pid != null) {
                        m.pid = d.pid >>> 0;
                    }
                    if (d.tid != null) {
                        m.tid = d.tid >>> 0;
                    }
                    if (d.vkQueue != null) {
                        if ($util.Long)
                            (m.vkQueue = $util.Long.fromValue(d.vkQueue)).unsigned = true;
                        else if (typeof d.vkQueue === "string")
                            m.vkQueue = parseInt(d.vkQueue, 10);
                        else if (typeof d.vkQueue === "number")
                            m.vkQueue = d.vkQueue;
                        else if (typeof d.vkQueue === "object")
                            m.vkQueue = new $util.LongBits(d.vkQueue.low >>> 0, d.vkQueue.high >>> 0).toNumber(true);
                    }
                    if (d.vkCommandBuffers) {
                        if (!Array.isArray(d.vkCommandBuffers))
                            throw TypeError(".perfetto.protos.VulkanApiEvent.VkQueueSubmit.vkCommandBuffers: array expected");
                        m.vkCommandBuffers = [];
                        for (var i = 0; i < d.vkCommandBuffers.length; ++i) {
                            if ($util.Long)
                                (m.vkCommandBuffers[i] = $util.Long.fromValue(d.vkCommandBuffers[i])).unsigned = true;
                            else if (typeof d.vkCommandBuffers[i] === "string")
                                m.vkCommandBuffers[i] = parseInt(d.vkCommandBuffers[i], 10);
                            else if (typeof d.vkCommandBuffers[i] === "number")
                                m.vkCommandBuffers[i] = d.vkCommandBuffers[i];
                            else if (typeof d.vkCommandBuffers[i] === "object")
                                m.vkCommandBuffers[i] = new $util.LongBits(d.vkCommandBuffers[i].low >>> 0, d.vkCommandBuffers[i].high >>> 0).toNumber(true);
                        }
                    }
                    if (d.submissionId != null) {
                        m.submissionId = d.submissionId >>> 0;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a VkQueueSubmit message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.VulkanApiEvent.VkQueueSubmit
                 * @static
                 * @param {perfetto.protos.VulkanApiEvent.VkQueueSubmit} m VkQueueSubmit
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                VkQueueSubmit.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.vkCommandBuffers = [];
                    }
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.durationNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.durationNs = o.longs === String ? "0" : 0;
                        d.pid = 0;
                        d.tid = 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.vkQueue = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.vkQueue = o.longs === String ? "0" : 0;
                        d.submissionId = 0;
                    }
                    if (m.durationNs != null && m.hasOwnProperty("durationNs")) {
                        if (typeof m.durationNs === "number")
                            d.durationNs = o.longs === String ? String(m.durationNs) : m.durationNs;
                        else
                            d.durationNs = o.longs === String ? $util.Long.prototype.toString.call(m.durationNs) : o.longs === Number ? new $util.LongBits(m.durationNs.low >>> 0, m.durationNs.high >>> 0).toNumber(true) : m.durationNs;
                    }
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        d.pid = m.pid;
                    }
                    if (m.tid != null && m.hasOwnProperty("tid")) {
                        d.tid = m.tid;
                    }
                    if (m.vkQueue != null && m.hasOwnProperty("vkQueue")) {
                        if (typeof m.vkQueue === "number")
                            d.vkQueue = o.longs === String ? String(m.vkQueue) : m.vkQueue;
                        else
                            d.vkQueue = o.longs === String ? $util.Long.prototype.toString.call(m.vkQueue) : o.longs === Number ? new $util.LongBits(m.vkQueue.low >>> 0, m.vkQueue.high >>> 0).toNumber(true) : m.vkQueue;
                    }
                    if (m.vkCommandBuffers && m.vkCommandBuffers.length) {
                        d.vkCommandBuffers = [];
                        for (var j = 0; j < m.vkCommandBuffers.length; ++j) {
                            if (typeof m.vkCommandBuffers[j] === "number")
                                d.vkCommandBuffers[j] = o.longs === String ? String(m.vkCommandBuffers[j]) : m.vkCommandBuffers[j];
                            else
                                d.vkCommandBuffers[j] = o.longs === String ? $util.Long.prototype.toString.call(m.vkCommandBuffers[j]) : o.longs === Number ? new $util.LongBits(m.vkCommandBuffers[j].low >>> 0, m.vkCommandBuffers[j].high >>> 0).toNumber(true) : m.vkCommandBuffers[j];
                        }
                    }
                    if (m.submissionId != null && m.hasOwnProperty("submissionId")) {
                        d.submissionId = m.submissionId;
                    }
                    return d;
                };

                /**
                 * Converts this VkQueueSubmit to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.VulkanApiEvent.VkQueueSubmit
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                VkQueueSubmit.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return VkQueueSubmit;
            })();

            return VulkanApiEvent;
        })();

        protos.InternedData = (function() {

            /**
             * Properties of an InternedData.
             * @memberof perfetto.protos
             * @interface IInternedData
             * @property {Array.<perfetto.protos.IEventCategory>|null} [eventCategories] InternedData eventCategories
             * @property {Array.<perfetto.protos.IEventName>|null} [eventNames] InternedData eventNames
             * @property {Array.<perfetto.protos.IDebugAnnotationName>|null} [debugAnnotationNames] InternedData debugAnnotationNames
             * @property {Array.<perfetto.protos.IDebugAnnotationValueTypeName>|null} [debugAnnotationValueTypeNames] InternedData debugAnnotationValueTypeNames
             * @property {Array.<perfetto.protos.ISourceLocation>|null} [sourceLocations] InternedData sourceLocations
             * @property {Array.<perfetto.protos.IUnsymbolizedSourceLocation>|null} [unsymbolizedSourceLocations] InternedData unsymbolizedSourceLocations
             * @property {Array.<perfetto.protos.ILogMessageBody>|null} [logMessageBody] InternedData logMessageBody
             * @property {Array.<perfetto.protos.IHistogramName>|null} [histogramNames] InternedData histogramNames
             * @property {Array.<perfetto.protos.IInternedString>|null} [buildIds] InternedData buildIds
             * @property {Array.<perfetto.protos.IInternedString>|null} [mappingPaths] InternedData mappingPaths
             * @property {Array.<perfetto.protos.IInternedString>|null} [sourcePaths] InternedData sourcePaths
             * @property {Array.<perfetto.protos.IInternedString>|null} [functionNames] InternedData functionNames
             * @property {Array.<perfetto.protos.IProfiledFrameSymbols>|null} [profiledFrameSymbols] InternedData profiledFrameSymbols
             * @property {Array.<perfetto.protos.IMapping>|null} [mappings] InternedData mappings
             * @property {Array.<perfetto.protos.IFrame>|null} [frames] InternedData frames
             * @property {Array.<perfetto.protos.ICallstack>|null} [callstacks] InternedData callstacks
             * @property {Array.<perfetto.protos.IInternedString>|null} [vulkanMemoryKeys] InternedData vulkanMemoryKeys
             * @property {Array.<perfetto.protos.IInternedGraphicsContext>|null} [graphicsContexts] InternedData graphicsContexts
             * @property {Array.<perfetto.protos.IInternedGpuRenderStageSpecification>|null} [gpuSpecifications] InternedData gpuSpecifications
             * @property {Array.<perfetto.protos.IInternedString>|null} [kernelSymbols] InternedData kernelSymbols
             */

            /**
             * Constructs a new InternedData.
             * @memberof perfetto.protos
             * @classdesc Represents an InternedData.
             * @implements IInternedData
             * @constructor
             * @param {perfetto.protos.IInternedData=} [p] Properties to set
             */
            function InternedData(p) {
                this.eventCategories = [];
                this.eventNames = [];
                this.debugAnnotationNames = [];
                this.debugAnnotationValueTypeNames = [];
                this.sourceLocations = [];
                this.unsymbolizedSourceLocations = [];
                this.logMessageBody = [];
                this.histogramNames = [];
                this.buildIds = [];
                this.mappingPaths = [];
                this.sourcePaths = [];
                this.functionNames = [];
                this.profiledFrameSymbols = [];
                this.mappings = [];
                this.frames = [];
                this.callstacks = [];
                this.vulkanMemoryKeys = [];
                this.graphicsContexts = [];
                this.gpuSpecifications = [];
                this.kernelSymbols = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * InternedData eventCategories.
             * @member {Array.<perfetto.protos.IEventCategory>} eventCategories
             * @memberof perfetto.protos.InternedData
             * @instance
             */
            InternedData.prototype.eventCategories = $util.emptyArray;

            /**
             * InternedData eventNames.
             * @member {Array.<perfetto.protos.IEventName>} eventNames
             * @memberof perfetto.protos.InternedData
             * @instance
             */
            InternedData.prototype.eventNames = $util.emptyArray;

            /**
             * InternedData debugAnnotationNames.
             * @member {Array.<perfetto.protos.IDebugAnnotationName>} debugAnnotationNames
             * @memberof perfetto.protos.InternedData
             * @instance
             */
            InternedData.prototype.debugAnnotationNames = $util.emptyArray;

            /**
             * InternedData debugAnnotationValueTypeNames.
             * @member {Array.<perfetto.protos.IDebugAnnotationValueTypeName>} debugAnnotationValueTypeNames
             * @memberof perfetto.protos.InternedData
             * @instance
             */
            InternedData.prototype.debugAnnotationValueTypeNames = $util.emptyArray;

            /**
             * InternedData sourceLocations.
             * @member {Array.<perfetto.protos.ISourceLocation>} sourceLocations
             * @memberof perfetto.protos.InternedData
             * @instance
             */
            InternedData.prototype.sourceLocations = $util.emptyArray;

            /**
             * InternedData unsymbolizedSourceLocations.
             * @member {Array.<perfetto.protos.IUnsymbolizedSourceLocation>} unsymbolizedSourceLocations
             * @memberof perfetto.protos.InternedData
             * @instance
             */
            InternedData.prototype.unsymbolizedSourceLocations = $util.emptyArray;

            /**
             * InternedData logMessageBody.
             * @member {Array.<perfetto.protos.ILogMessageBody>} logMessageBody
             * @memberof perfetto.protos.InternedData
             * @instance
             */
            InternedData.prototype.logMessageBody = $util.emptyArray;

            /**
             * InternedData histogramNames.
             * @member {Array.<perfetto.protos.IHistogramName>} histogramNames
             * @memberof perfetto.protos.InternedData
             * @instance
             */
            InternedData.prototype.histogramNames = $util.emptyArray;

            /**
             * InternedData buildIds.
             * @member {Array.<perfetto.protos.IInternedString>} buildIds
             * @memberof perfetto.protos.InternedData
             * @instance
             */
            InternedData.prototype.buildIds = $util.emptyArray;

            /**
             * InternedData mappingPaths.
             * @member {Array.<perfetto.protos.IInternedString>} mappingPaths
             * @memberof perfetto.protos.InternedData
             * @instance
             */
            InternedData.prototype.mappingPaths = $util.emptyArray;

            /**
             * InternedData sourcePaths.
             * @member {Array.<perfetto.protos.IInternedString>} sourcePaths
             * @memberof perfetto.protos.InternedData
             * @instance
             */
            InternedData.prototype.sourcePaths = $util.emptyArray;

            /**
             * InternedData functionNames.
             * @member {Array.<perfetto.protos.IInternedString>} functionNames
             * @memberof perfetto.protos.InternedData
             * @instance
             */
            InternedData.prototype.functionNames = $util.emptyArray;

            /**
             * InternedData profiledFrameSymbols.
             * @member {Array.<perfetto.protos.IProfiledFrameSymbols>} profiledFrameSymbols
             * @memberof perfetto.protos.InternedData
             * @instance
             */
            InternedData.prototype.profiledFrameSymbols = $util.emptyArray;

            /**
             * InternedData mappings.
             * @member {Array.<perfetto.protos.IMapping>} mappings
             * @memberof perfetto.protos.InternedData
             * @instance
             */
            InternedData.prototype.mappings = $util.emptyArray;

            /**
             * InternedData frames.
             * @member {Array.<perfetto.protos.IFrame>} frames
             * @memberof perfetto.protos.InternedData
             * @instance
             */
            InternedData.prototype.frames = $util.emptyArray;

            /**
             * InternedData callstacks.
             * @member {Array.<perfetto.protos.ICallstack>} callstacks
             * @memberof perfetto.protos.InternedData
             * @instance
             */
            InternedData.prototype.callstacks = $util.emptyArray;

            /**
             * InternedData vulkanMemoryKeys.
             * @member {Array.<perfetto.protos.IInternedString>} vulkanMemoryKeys
             * @memberof perfetto.protos.InternedData
             * @instance
             */
            InternedData.prototype.vulkanMemoryKeys = $util.emptyArray;

            /**
             * InternedData graphicsContexts.
             * @member {Array.<perfetto.protos.IInternedGraphicsContext>} graphicsContexts
             * @memberof perfetto.protos.InternedData
             * @instance
             */
            InternedData.prototype.graphicsContexts = $util.emptyArray;

            /**
             * InternedData gpuSpecifications.
             * @member {Array.<perfetto.protos.IInternedGpuRenderStageSpecification>} gpuSpecifications
             * @memberof perfetto.protos.InternedData
             * @instance
             */
            InternedData.prototype.gpuSpecifications = $util.emptyArray;

            /**
             * InternedData kernelSymbols.
             * @member {Array.<perfetto.protos.IInternedString>} kernelSymbols
             * @memberof perfetto.protos.InternedData
             * @instance
             */
            InternedData.prototype.kernelSymbols = $util.emptyArray;

            /**
             * Creates a new InternedData instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.InternedData
             * @static
             * @param {perfetto.protos.IInternedData=} [properties] Properties to set
             * @returns {perfetto.protos.InternedData} InternedData instance
             */
            InternedData.create = function create(properties) {
                return new InternedData(properties);
            };

            /**
             * Encodes the specified InternedData message. Does not implicitly {@link perfetto.protos.InternedData.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.InternedData
             * @static
             * @param {perfetto.protos.IInternedData} m InternedData message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InternedData.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.eventCategories != null && m.eventCategories.length) {
                    for (var i = 0; i < m.eventCategories.length; ++i)
                        $root.perfetto.protos.EventCategory.encode(m.eventCategories[i], w.uint32(10).fork()).ldelim();
                }
                if (m.eventNames != null && m.eventNames.length) {
                    for (var i = 0; i < m.eventNames.length; ++i)
                        $root.perfetto.protos.EventName.encode(m.eventNames[i], w.uint32(18).fork()).ldelim();
                }
                if (m.debugAnnotationNames != null && m.debugAnnotationNames.length) {
                    for (var i = 0; i < m.debugAnnotationNames.length; ++i)
                        $root.perfetto.protos.DebugAnnotationName.encode(m.debugAnnotationNames[i], w.uint32(26).fork()).ldelim();
                }
                if (m.sourceLocations != null && m.sourceLocations.length) {
                    for (var i = 0; i < m.sourceLocations.length; ++i)
                        $root.perfetto.protos.SourceLocation.encode(m.sourceLocations[i], w.uint32(34).fork()).ldelim();
                }
                if (m.functionNames != null && m.functionNames.length) {
                    for (var i = 0; i < m.functionNames.length; ++i)
                        $root.perfetto.protos.InternedString.encode(m.functionNames[i], w.uint32(42).fork()).ldelim();
                }
                if (m.frames != null && m.frames.length) {
                    for (var i = 0; i < m.frames.length; ++i)
                        $root.perfetto.protos.Frame.encode(m.frames[i], w.uint32(50).fork()).ldelim();
                }
                if (m.callstacks != null && m.callstacks.length) {
                    for (var i = 0; i < m.callstacks.length; ++i)
                        $root.perfetto.protos.Callstack.encode(m.callstacks[i], w.uint32(58).fork()).ldelim();
                }
                if (m.buildIds != null && m.buildIds.length) {
                    for (var i = 0; i < m.buildIds.length; ++i)
                        $root.perfetto.protos.InternedString.encode(m.buildIds[i], w.uint32(130).fork()).ldelim();
                }
                if (m.mappingPaths != null && m.mappingPaths.length) {
                    for (var i = 0; i < m.mappingPaths.length; ++i)
                        $root.perfetto.protos.InternedString.encode(m.mappingPaths[i], w.uint32(138).fork()).ldelim();
                }
                if (m.sourcePaths != null && m.sourcePaths.length) {
                    for (var i = 0; i < m.sourcePaths.length; ++i)
                        $root.perfetto.protos.InternedString.encode(m.sourcePaths[i], w.uint32(146).fork()).ldelim();
                }
                if (m.mappings != null && m.mappings.length) {
                    for (var i = 0; i < m.mappings.length; ++i)
                        $root.perfetto.protos.Mapping.encode(m.mappings[i], w.uint32(154).fork()).ldelim();
                }
                if (m.logMessageBody != null && m.logMessageBody.length) {
                    for (var i = 0; i < m.logMessageBody.length; ++i)
                        $root.perfetto.protos.LogMessageBody.encode(m.logMessageBody[i], w.uint32(162).fork()).ldelim();
                }
                if (m.profiledFrameSymbols != null && m.profiledFrameSymbols.length) {
                    for (var i = 0; i < m.profiledFrameSymbols.length; ++i)
                        $root.perfetto.protos.ProfiledFrameSymbols.encode(m.profiledFrameSymbols[i], w.uint32(170).fork()).ldelim();
                }
                if (m.vulkanMemoryKeys != null && m.vulkanMemoryKeys.length) {
                    for (var i = 0; i < m.vulkanMemoryKeys.length; ++i)
                        $root.perfetto.protos.InternedString.encode(m.vulkanMemoryKeys[i], w.uint32(178).fork()).ldelim();
                }
                if (m.graphicsContexts != null && m.graphicsContexts.length) {
                    for (var i = 0; i < m.graphicsContexts.length; ++i)
                        $root.perfetto.protos.InternedGraphicsContext.encode(m.graphicsContexts[i], w.uint32(186).fork()).ldelim();
                }
                if (m.gpuSpecifications != null && m.gpuSpecifications.length) {
                    for (var i = 0; i < m.gpuSpecifications.length; ++i)
                        $root.perfetto.protos.InternedGpuRenderStageSpecification.encode(m.gpuSpecifications[i], w.uint32(194).fork()).ldelim();
                }
                if (m.histogramNames != null && m.histogramNames.length) {
                    for (var i = 0; i < m.histogramNames.length; ++i)
                        $root.perfetto.protos.HistogramName.encode(m.histogramNames[i], w.uint32(202).fork()).ldelim();
                }
                if (m.kernelSymbols != null && m.kernelSymbols.length) {
                    for (var i = 0; i < m.kernelSymbols.length; ++i)
                        $root.perfetto.protos.InternedString.encode(m.kernelSymbols[i], w.uint32(210).fork()).ldelim();
                }
                if (m.debugAnnotationValueTypeNames != null && m.debugAnnotationValueTypeNames.length) {
                    for (var i = 0; i < m.debugAnnotationValueTypeNames.length; ++i)
                        $root.perfetto.protos.DebugAnnotationValueTypeName.encode(m.debugAnnotationValueTypeNames[i], w.uint32(218).fork()).ldelim();
                }
                if (m.unsymbolizedSourceLocations != null && m.unsymbolizedSourceLocations.length) {
                    for (var i = 0; i < m.unsymbolizedSourceLocations.length; ++i)
                        $root.perfetto.protos.UnsymbolizedSourceLocation.encode(m.unsymbolizedSourceLocations[i], w.uint32(226).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified InternedData message, length delimited. Does not implicitly {@link perfetto.protos.InternedData.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.InternedData
             * @static
             * @param {perfetto.protos.IInternedData} message InternedData message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InternedData.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an InternedData message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.InternedData
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.InternedData} InternedData
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InternedData.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.InternedData();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.eventCategories && m.eventCategories.length))
                            m.eventCategories = [];
                        m.eventCategories.push($root.perfetto.protos.EventCategory.decode(r, r.uint32()));
                        break;
                    case 2:
                        if (!(m.eventNames && m.eventNames.length))
                            m.eventNames = [];
                        m.eventNames.push($root.perfetto.protos.EventName.decode(r, r.uint32()));
                        break;
                    case 3:
                        if (!(m.debugAnnotationNames && m.debugAnnotationNames.length))
                            m.debugAnnotationNames = [];
                        m.debugAnnotationNames.push($root.perfetto.protos.DebugAnnotationName.decode(r, r.uint32()));
                        break;
                    case 27:
                        if (!(m.debugAnnotationValueTypeNames && m.debugAnnotationValueTypeNames.length))
                            m.debugAnnotationValueTypeNames = [];
                        m.debugAnnotationValueTypeNames.push($root.perfetto.protos.DebugAnnotationValueTypeName.decode(r, r.uint32()));
                        break;
                    case 4:
                        if (!(m.sourceLocations && m.sourceLocations.length))
                            m.sourceLocations = [];
                        m.sourceLocations.push($root.perfetto.protos.SourceLocation.decode(r, r.uint32()));
                        break;
                    case 28:
                        if (!(m.unsymbolizedSourceLocations && m.unsymbolizedSourceLocations.length))
                            m.unsymbolizedSourceLocations = [];
                        m.unsymbolizedSourceLocations.push($root.perfetto.protos.UnsymbolizedSourceLocation.decode(r, r.uint32()));
                        break;
                    case 20:
                        if (!(m.logMessageBody && m.logMessageBody.length))
                            m.logMessageBody = [];
                        m.logMessageBody.push($root.perfetto.protos.LogMessageBody.decode(r, r.uint32()));
                        break;
                    case 25:
                        if (!(m.histogramNames && m.histogramNames.length))
                            m.histogramNames = [];
                        m.histogramNames.push($root.perfetto.protos.HistogramName.decode(r, r.uint32()));
                        break;
                    case 16:
                        if (!(m.buildIds && m.buildIds.length))
                            m.buildIds = [];
                        m.buildIds.push($root.perfetto.protos.InternedString.decode(r, r.uint32()));
                        break;
                    case 17:
                        if (!(m.mappingPaths && m.mappingPaths.length))
                            m.mappingPaths = [];
                        m.mappingPaths.push($root.perfetto.protos.InternedString.decode(r, r.uint32()));
                        break;
                    case 18:
                        if (!(m.sourcePaths && m.sourcePaths.length))
                            m.sourcePaths = [];
                        m.sourcePaths.push($root.perfetto.protos.InternedString.decode(r, r.uint32()));
                        break;
                    case 5:
                        if (!(m.functionNames && m.functionNames.length))
                            m.functionNames = [];
                        m.functionNames.push($root.perfetto.protos.InternedString.decode(r, r.uint32()));
                        break;
                    case 21:
                        if (!(m.profiledFrameSymbols && m.profiledFrameSymbols.length))
                            m.profiledFrameSymbols = [];
                        m.profiledFrameSymbols.push($root.perfetto.protos.ProfiledFrameSymbols.decode(r, r.uint32()));
                        break;
                    case 19:
                        if (!(m.mappings && m.mappings.length))
                            m.mappings = [];
                        m.mappings.push($root.perfetto.protos.Mapping.decode(r, r.uint32()));
                        break;
                    case 6:
                        if (!(m.frames && m.frames.length))
                            m.frames = [];
                        m.frames.push($root.perfetto.protos.Frame.decode(r, r.uint32()));
                        break;
                    case 7:
                        if (!(m.callstacks && m.callstacks.length))
                            m.callstacks = [];
                        m.callstacks.push($root.perfetto.protos.Callstack.decode(r, r.uint32()));
                        break;
                    case 22:
                        if (!(m.vulkanMemoryKeys && m.vulkanMemoryKeys.length))
                            m.vulkanMemoryKeys = [];
                        m.vulkanMemoryKeys.push($root.perfetto.protos.InternedString.decode(r, r.uint32()));
                        break;
                    case 23:
                        if (!(m.graphicsContexts && m.graphicsContexts.length))
                            m.graphicsContexts = [];
                        m.graphicsContexts.push($root.perfetto.protos.InternedGraphicsContext.decode(r, r.uint32()));
                        break;
                    case 24:
                        if (!(m.gpuSpecifications && m.gpuSpecifications.length))
                            m.gpuSpecifications = [];
                        m.gpuSpecifications.push($root.perfetto.protos.InternedGpuRenderStageSpecification.decode(r, r.uint32()));
                        break;
                    case 26:
                        if (!(m.kernelSymbols && m.kernelSymbols.length))
                            m.kernelSymbols = [];
                        m.kernelSymbols.push($root.perfetto.protos.InternedString.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an InternedData message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.InternedData
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.InternedData} InternedData
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InternedData.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an InternedData message.
             * @function verify
             * @memberof perfetto.protos.InternedData
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            InternedData.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.eventCategories != null && m.hasOwnProperty("eventCategories")) {
                    if (!Array.isArray(m.eventCategories))
                        return "eventCategories: array expected";
                    for (var i = 0; i < m.eventCategories.length; ++i) {
                        {
                            var e = $root.perfetto.protos.EventCategory.verify(m.eventCategories[i]);
                            if (e)
                                return "eventCategories." + e;
                        }
                    }
                }
                if (m.eventNames != null && m.hasOwnProperty("eventNames")) {
                    if (!Array.isArray(m.eventNames))
                        return "eventNames: array expected";
                    for (var i = 0; i < m.eventNames.length; ++i) {
                        {
                            var e = $root.perfetto.protos.EventName.verify(m.eventNames[i]);
                            if (e)
                                return "eventNames." + e;
                        }
                    }
                }
                if (m.debugAnnotationNames != null && m.hasOwnProperty("debugAnnotationNames")) {
                    if (!Array.isArray(m.debugAnnotationNames))
                        return "debugAnnotationNames: array expected";
                    for (var i = 0; i < m.debugAnnotationNames.length; ++i) {
                        {
                            var e = $root.perfetto.protos.DebugAnnotationName.verify(m.debugAnnotationNames[i]);
                            if (e)
                                return "debugAnnotationNames." + e;
                        }
                    }
                }
                if (m.debugAnnotationValueTypeNames != null && m.hasOwnProperty("debugAnnotationValueTypeNames")) {
                    if (!Array.isArray(m.debugAnnotationValueTypeNames))
                        return "debugAnnotationValueTypeNames: array expected";
                    for (var i = 0; i < m.debugAnnotationValueTypeNames.length; ++i) {
                        {
                            var e = $root.perfetto.protos.DebugAnnotationValueTypeName.verify(m.debugAnnotationValueTypeNames[i]);
                            if (e)
                                return "debugAnnotationValueTypeNames." + e;
                        }
                    }
                }
                if (m.sourceLocations != null && m.hasOwnProperty("sourceLocations")) {
                    if (!Array.isArray(m.sourceLocations))
                        return "sourceLocations: array expected";
                    for (var i = 0; i < m.sourceLocations.length; ++i) {
                        {
                            var e = $root.perfetto.protos.SourceLocation.verify(m.sourceLocations[i]);
                            if (e)
                                return "sourceLocations." + e;
                        }
                    }
                }
                if (m.unsymbolizedSourceLocations != null && m.hasOwnProperty("unsymbolizedSourceLocations")) {
                    if (!Array.isArray(m.unsymbolizedSourceLocations))
                        return "unsymbolizedSourceLocations: array expected";
                    for (var i = 0; i < m.unsymbolizedSourceLocations.length; ++i) {
                        {
                            var e = $root.perfetto.protos.UnsymbolizedSourceLocation.verify(m.unsymbolizedSourceLocations[i]);
                            if (e)
                                return "unsymbolizedSourceLocations." + e;
                        }
                    }
                }
                if (m.logMessageBody != null && m.hasOwnProperty("logMessageBody")) {
                    if (!Array.isArray(m.logMessageBody))
                        return "logMessageBody: array expected";
                    for (var i = 0; i < m.logMessageBody.length; ++i) {
                        {
                            var e = $root.perfetto.protos.LogMessageBody.verify(m.logMessageBody[i]);
                            if (e)
                                return "logMessageBody." + e;
                        }
                    }
                }
                if (m.histogramNames != null && m.hasOwnProperty("histogramNames")) {
                    if (!Array.isArray(m.histogramNames))
                        return "histogramNames: array expected";
                    for (var i = 0; i < m.histogramNames.length; ++i) {
                        {
                            var e = $root.perfetto.protos.HistogramName.verify(m.histogramNames[i]);
                            if (e)
                                return "histogramNames." + e;
                        }
                    }
                }
                if (m.buildIds != null && m.hasOwnProperty("buildIds")) {
                    if (!Array.isArray(m.buildIds))
                        return "buildIds: array expected";
                    for (var i = 0; i < m.buildIds.length; ++i) {
                        {
                            var e = $root.perfetto.protos.InternedString.verify(m.buildIds[i]);
                            if (e)
                                return "buildIds." + e;
                        }
                    }
                }
                if (m.mappingPaths != null && m.hasOwnProperty("mappingPaths")) {
                    if (!Array.isArray(m.mappingPaths))
                        return "mappingPaths: array expected";
                    for (var i = 0; i < m.mappingPaths.length; ++i) {
                        {
                            var e = $root.perfetto.protos.InternedString.verify(m.mappingPaths[i]);
                            if (e)
                                return "mappingPaths." + e;
                        }
                    }
                }
                if (m.sourcePaths != null && m.hasOwnProperty("sourcePaths")) {
                    if (!Array.isArray(m.sourcePaths))
                        return "sourcePaths: array expected";
                    for (var i = 0; i < m.sourcePaths.length; ++i) {
                        {
                            var e = $root.perfetto.protos.InternedString.verify(m.sourcePaths[i]);
                            if (e)
                                return "sourcePaths." + e;
                        }
                    }
                }
                if (m.functionNames != null && m.hasOwnProperty("functionNames")) {
                    if (!Array.isArray(m.functionNames))
                        return "functionNames: array expected";
                    for (var i = 0; i < m.functionNames.length; ++i) {
                        {
                            var e = $root.perfetto.protos.InternedString.verify(m.functionNames[i]);
                            if (e)
                                return "functionNames." + e;
                        }
                    }
                }
                if (m.profiledFrameSymbols != null && m.hasOwnProperty("profiledFrameSymbols")) {
                    if (!Array.isArray(m.profiledFrameSymbols))
                        return "profiledFrameSymbols: array expected";
                    for (var i = 0; i < m.profiledFrameSymbols.length; ++i) {
                        {
                            var e = $root.perfetto.protos.ProfiledFrameSymbols.verify(m.profiledFrameSymbols[i]);
                            if (e)
                                return "profiledFrameSymbols." + e;
                        }
                    }
                }
                if (m.mappings != null && m.hasOwnProperty("mappings")) {
                    if (!Array.isArray(m.mappings))
                        return "mappings: array expected";
                    for (var i = 0; i < m.mappings.length; ++i) {
                        {
                            var e = $root.perfetto.protos.Mapping.verify(m.mappings[i]);
                            if (e)
                                return "mappings." + e;
                        }
                    }
                }
                if (m.frames != null && m.hasOwnProperty("frames")) {
                    if (!Array.isArray(m.frames))
                        return "frames: array expected";
                    for (var i = 0; i < m.frames.length; ++i) {
                        {
                            var e = $root.perfetto.protos.Frame.verify(m.frames[i]);
                            if (e)
                                return "frames." + e;
                        }
                    }
                }
                if (m.callstacks != null && m.hasOwnProperty("callstacks")) {
                    if (!Array.isArray(m.callstacks))
                        return "callstacks: array expected";
                    for (var i = 0; i < m.callstacks.length; ++i) {
                        {
                            var e = $root.perfetto.protos.Callstack.verify(m.callstacks[i]);
                            if (e)
                                return "callstacks." + e;
                        }
                    }
                }
                if (m.vulkanMemoryKeys != null && m.hasOwnProperty("vulkanMemoryKeys")) {
                    if (!Array.isArray(m.vulkanMemoryKeys))
                        return "vulkanMemoryKeys: array expected";
                    for (var i = 0; i < m.vulkanMemoryKeys.length; ++i) {
                        {
                            var e = $root.perfetto.protos.InternedString.verify(m.vulkanMemoryKeys[i]);
                            if (e)
                                return "vulkanMemoryKeys." + e;
                        }
                    }
                }
                if (m.graphicsContexts != null && m.hasOwnProperty("graphicsContexts")) {
                    if (!Array.isArray(m.graphicsContexts))
                        return "graphicsContexts: array expected";
                    for (var i = 0; i < m.graphicsContexts.length; ++i) {
                        {
                            var e = $root.perfetto.protos.InternedGraphicsContext.verify(m.graphicsContexts[i]);
                            if (e)
                                return "graphicsContexts." + e;
                        }
                    }
                }
                if (m.gpuSpecifications != null && m.hasOwnProperty("gpuSpecifications")) {
                    if (!Array.isArray(m.gpuSpecifications))
                        return "gpuSpecifications: array expected";
                    for (var i = 0; i < m.gpuSpecifications.length; ++i) {
                        {
                            var e = $root.perfetto.protos.InternedGpuRenderStageSpecification.verify(m.gpuSpecifications[i]);
                            if (e)
                                return "gpuSpecifications." + e;
                        }
                    }
                }
                if (m.kernelSymbols != null && m.hasOwnProperty("kernelSymbols")) {
                    if (!Array.isArray(m.kernelSymbols))
                        return "kernelSymbols: array expected";
                    for (var i = 0; i < m.kernelSymbols.length; ++i) {
                        {
                            var e = $root.perfetto.protos.InternedString.verify(m.kernelSymbols[i]);
                            if (e)
                                return "kernelSymbols." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an InternedData message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.InternedData
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.InternedData} InternedData
             */
            InternedData.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.InternedData)
                    return d;
                var m = new $root.perfetto.protos.InternedData();
                if (d.eventCategories) {
                    if (!Array.isArray(d.eventCategories))
                        throw TypeError(".perfetto.protos.InternedData.eventCategories: array expected");
                    m.eventCategories = [];
                    for (var i = 0; i < d.eventCategories.length; ++i) {
                        if (typeof d.eventCategories[i] !== "object")
                            throw TypeError(".perfetto.protos.InternedData.eventCategories: object expected");
                        m.eventCategories[i] = $root.perfetto.protos.EventCategory.fromObject(d.eventCategories[i]);
                    }
                }
                if (d.eventNames) {
                    if (!Array.isArray(d.eventNames))
                        throw TypeError(".perfetto.protos.InternedData.eventNames: array expected");
                    m.eventNames = [];
                    for (var i = 0; i < d.eventNames.length; ++i) {
                        if (typeof d.eventNames[i] !== "object")
                            throw TypeError(".perfetto.protos.InternedData.eventNames: object expected");
                        m.eventNames[i] = $root.perfetto.protos.EventName.fromObject(d.eventNames[i]);
                    }
                }
                if (d.debugAnnotationNames) {
                    if (!Array.isArray(d.debugAnnotationNames))
                        throw TypeError(".perfetto.protos.InternedData.debugAnnotationNames: array expected");
                    m.debugAnnotationNames = [];
                    for (var i = 0; i < d.debugAnnotationNames.length; ++i) {
                        if (typeof d.debugAnnotationNames[i] !== "object")
                            throw TypeError(".perfetto.protos.InternedData.debugAnnotationNames: object expected");
                        m.debugAnnotationNames[i] = $root.perfetto.protos.DebugAnnotationName.fromObject(d.debugAnnotationNames[i]);
                    }
                }
                if (d.debugAnnotationValueTypeNames) {
                    if (!Array.isArray(d.debugAnnotationValueTypeNames))
                        throw TypeError(".perfetto.protos.InternedData.debugAnnotationValueTypeNames: array expected");
                    m.debugAnnotationValueTypeNames = [];
                    for (var i = 0; i < d.debugAnnotationValueTypeNames.length; ++i) {
                        if (typeof d.debugAnnotationValueTypeNames[i] !== "object")
                            throw TypeError(".perfetto.protos.InternedData.debugAnnotationValueTypeNames: object expected");
                        m.debugAnnotationValueTypeNames[i] = $root.perfetto.protos.DebugAnnotationValueTypeName.fromObject(d.debugAnnotationValueTypeNames[i]);
                    }
                }
                if (d.sourceLocations) {
                    if (!Array.isArray(d.sourceLocations))
                        throw TypeError(".perfetto.protos.InternedData.sourceLocations: array expected");
                    m.sourceLocations = [];
                    for (var i = 0; i < d.sourceLocations.length; ++i) {
                        if (typeof d.sourceLocations[i] !== "object")
                            throw TypeError(".perfetto.protos.InternedData.sourceLocations: object expected");
                        m.sourceLocations[i] = $root.perfetto.protos.SourceLocation.fromObject(d.sourceLocations[i]);
                    }
                }
                if (d.unsymbolizedSourceLocations) {
                    if (!Array.isArray(d.unsymbolizedSourceLocations))
                        throw TypeError(".perfetto.protos.InternedData.unsymbolizedSourceLocations: array expected");
                    m.unsymbolizedSourceLocations = [];
                    for (var i = 0; i < d.unsymbolizedSourceLocations.length; ++i) {
                        if (typeof d.unsymbolizedSourceLocations[i] !== "object")
                            throw TypeError(".perfetto.protos.InternedData.unsymbolizedSourceLocations: object expected");
                        m.unsymbolizedSourceLocations[i] = $root.perfetto.protos.UnsymbolizedSourceLocation.fromObject(d.unsymbolizedSourceLocations[i]);
                    }
                }
                if (d.logMessageBody) {
                    if (!Array.isArray(d.logMessageBody))
                        throw TypeError(".perfetto.protos.InternedData.logMessageBody: array expected");
                    m.logMessageBody = [];
                    for (var i = 0; i < d.logMessageBody.length; ++i) {
                        if (typeof d.logMessageBody[i] !== "object")
                            throw TypeError(".perfetto.protos.InternedData.logMessageBody: object expected");
                        m.logMessageBody[i] = $root.perfetto.protos.LogMessageBody.fromObject(d.logMessageBody[i]);
                    }
                }
                if (d.histogramNames) {
                    if (!Array.isArray(d.histogramNames))
                        throw TypeError(".perfetto.protos.InternedData.histogramNames: array expected");
                    m.histogramNames = [];
                    for (var i = 0; i < d.histogramNames.length; ++i) {
                        if (typeof d.histogramNames[i] !== "object")
                            throw TypeError(".perfetto.protos.InternedData.histogramNames: object expected");
                        m.histogramNames[i] = $root.perfetto.protos.HistogramName.fromObject(d.histogramNames[i]);
                    }
                }
                if (d.buildIds) {
                    if (!Array.isArray(d.buildIds))
                        throw TypeError(".perfetto.protos.InternedData.buildIds: array expected");
                    m.buildIds = [];
                    for (var i = 0; i < d.buildIds.length; ++i) {
                        if (typeof d.buildIds[i] !== "object")
                            throw TypeError(".perfetto.protos.InternedData.buildIds: object expected");
                        m.buildIds[i] = $root.perfetto.protos.InternedString.fromObject(d.buildIds[i]);
                    }
                }
                if (d.mappingPaths) {
                    if (!Array.isArray(d.mappingPaths))
                        throw TypeError(".perfetto.protos.InternedData.mappingPaths: array expected");
                    m.mappingPaths = [];
                    for (var i = 0; i < d.mappingPaths.length; ++i) {
                        if (typeof d.mappingPaths[i] !== "object")
                            throw TypeError(".perfetto.protos.InternedData.mappingPaths: object expected");
                        m.mappingPaths[i] = $root.perfetto.protos.InternedString.fromObject(d.mappingPaths[i]);
                    }
                }
                if (d.sourcePaths) {
                    if (!Array.isArray(d.sourcePaths))
                        throw TypeError(".perfetto.protos.InternedData.sourcePaths: array expected");
                    m.sourcePaths = [];
                    for (var i = 0; i < d.sourcePaths.length; ++i) {
                        if (typeof d.sourcePaths[i] !== "object")
                            throw TypeError(".perfetto.protos.InternedData.sourcePaths: object expected");
                        m.sourcePaths[i] = $root.perfetto.protos.InternedString.fromObject(d.sourcePaths[i]);
                    }
                }
                if (d.functionNames) {
                    if (!Array.isArray(d.functionNames))
                        throw TypeError(".perfetto.protos.InternedData.functionNames: array expected");
                    m.functionNames = [];
                    for (var i = 0; i < d.functionNames.length; ++i) {
                        if (typeof d.functionNames[i] !== "object")
                            throw TypeError(".perfetto.protos.InternedData.functionNames: object expected");
                        m.functionNames[i] = $root.perfetto.protos.InternedString.fromObject(d.functionNames[i]);
                    }
                }
                if (d.profiledFrameSymbols) {
                    if (!Array.isArray(d.profiledFrameSymbols))
                        throw TypeError(".perfetto.protos.InternedData.profiledFrameSymbols: array expected");
                    m.profiledFrameSymbols = [];
                    for (var i = 0; i < d.profiledFrameSymbols.length; ++i) {
                        if (typeof d.profiledFrameSymbols[i] !== "object")
                            throw TypeError(".perfetto.protos.InternedData.profiledFrameSymbols: object expected");
                        m.profiledFrameSymbols[i] = $root.perfetto.protos.ProfiledFrameSymbols.fromObject(d.profiledFrameSymbols[i]);
                    }
                }
                if (d.mappings) {
                    if (!Array.isArray(d.mappings))
                        throw TypeError(".perfetto.protos.InternedData.mappings: array expected");
                    m.mappings = [];
                    for (var i = 0; i < d.mappings.length; ++i) {
                        if (typeof d.mappings[i] !== "object")
                            throw TypeError(".perfetto.protos.InternedData.mappings: object expected");
                        m.mappings[i] = $root.perfetto.protos.Mapping.fromObject(d.mappings[i]);
                    }
                }
                if (d.frames) {
                    if (!Array.isArray(d.frames))
                        throw TypeError(".perfetto.protos.InternedData.frames: array expected");
                    m.frames = [];
                    for (var i = 0; i < d.frames.length; ++i) {
                        if (typeof d.frames[i] !== "object")
                            throw TypeError(".perfetto.protos.InternedData.frames: object expected");
                        m.frames[i] = $root.perfetto.protos.Frame.fromObject(d.frames[i]);
                    }
                }
                if (d.callstacks) {
                    if (!Array.isArray(d.callstacks))
                        throw TypeError(".perfetto.protos.InternedData.callstacks: array expected");
                    m.callstacks = [];
                    for (var i = 0; i < d.callstacks.length; ++i) {
                        if (typeof d.callstacks[i] !== "object")
                            throw TypeError(".perfetto.protos.InternedData.callstacks: object expected");
                        m.callstacks[i] = $root.perfetto.protos.Callstack.fromObject(d.callstacks[i]);
                    }
                }
                if (d.vulkanMemoryKeys) {
                    if (!Array.isArray(d.vulkanMemoryKeys))
                        throw TypeError(".perfetto.protos.InternedData.vulkanMemoryKeys: array expected");
                    m.vulkanMemoryKeys = [];
                    for (var i = 0; i < d.vulkanMemoryKeys.length; ++i) {
                        if (typeof d.vulkanMemoryKeys[i] !== "object")
                            throw TypeError(".perfetto.protos.InternedData.vulkanMemoryKeys: object expected");
                        m.vulkanMemoryKeys[i] = $root.perfetto.protos.InternedString.fromObject(d.vulkanMemoryKeys[i]);
                    }
                }
                if (d.graphicsContexts) {
                    if (!Array.isArray(d.graphicsContexts))
                        throw TypeError(".perfetto.protos.InternedData.graphicsContexts: array expected");
                    m.graphicsContexts = [];
                    for (var i = 0; i < d.graphicsContexts.length; ++i) {
                        if (typeof d.graphicsContexts[i] !== "object")
                            throw TypeError(".perfetto.protos.InternedData.graphicsContexts: object expected");
                        m.graphicsContexts[i] = $root.perfetto.protos.InternedGraphicsContext.fromObject(d.graphicsContexts[i]);
                    }
                }
                if (d.gpuSpecifications) {
                    if (!Array.isArray(d.gpuSpecifications))
                        throw TypeError(".perfetto.protos.InternedData.gpuSpecifications: array expected");
                    m.gpuSpecifications = [];
                    for (var i = 0; i < d.gpuSpecifications.length; ++i) {
                        if (typeof d.gpuSpecifications[i] !== "object")
                            throw TypeError(".perfetto.protos.InternedData.gpuSpecifications: object expected");
                        m.gpuSpecifications[i] = $root.perfetto.protos.InternedGpuRenderStageSpecification.fromObject(d.gpuSpecifications[i]);
                    }
                }
                if (d.kernelSymbols) {
                    if (!Array.isArray(d.kernelSymbols))
                        throw TypeError(".perfetto.protos.InternedData.kernelSymbols: array expected");
                    m.kernelSymbols = [];
                    for (var i = 0; i < d.kernelSymbols.length; ++i) {
                        if (typeof d.kernelSymbols[i] !== "object")
                            throw TypeError(".perfetto.protos.InternedData.kernelSymbols: object expected");
                        m.kernelSymbols[i] = $root.perfetto.protos.InternedString.fromObject(d.kernelSymbols[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an InternedData message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.InternedData
             * @static
             * @param {perfetto.protos.InternedData} m InternedData
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            InternedData.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.eventCategories = [];
                    d.eventNames = [];
                    d.debugAnnotationNames = [];
                    d.sourceLocations = [];
                    d.functionNames = [];
                    d.frames = [];
                    d.callstacks = [];
                    d.buildIds = [];
                    d.mappingPaths = [];
                    d.sourcePaths = [];
                    d.mappings = [];
                    d.logMessageBody = [];
                    d.profiledFrameSymbols = [];
                    d.vulkanMemoryKeys = [];
                    d.graphicsContexts = [];
                    d.gpuSpecifications = [];
                    d.histogramNames = [];
                    d.kernelSymbols = [];
                    d.debugAnnotationValueTypeNames = [];
                    d.unsymbolizedSourceLocations = [];
                }
                if (m.eventCategories && m.eventCategories.length) {
                    d.eventCategories = [];
                    for (var j = 0; j < m.eventCategories.length; ++j) {
                        d.eventCategories[j] = $root.perfetto.protos.EventCategory.toObject(m.eventCategories[j], o);
                    }
                }
                if (m.eventNames && m.eventNames.length) {
                    d.eventNames = [];
                    for (var j = 0; j < m.eventNames.length; ++j) {
                        d.eventNames[j] = $root.perfetto.protos.EventName.toObject(m.eventNames[j], o);
                    }
                }
                if (m.debugAnnotationNames && m.debugAnnotationNames.length) {
                    d.debugAnnotationNames = [];
                    for (var j = 0; j < m.debugAnnotationNames.length; ++j) {
                        d.debugAnnotationNames[j] = $root.perfetto.protos.DebugAnnotationName.toObject(m.debugAnnotationNames[j], o);
                    }
                }
                if (m.sourceLocations && m.sourceLocations.length) {
                    d.sourceLocations = [];
                    for (var j = 0; j < m.sourceLocations.length; ++j) {
                        d.sourceLocations[j] = $root.perfetto.protos.SourceLocation.toObject(m.sourceLocations[j], o);
                    }
                }
                if (m.functionNames && m.functionNames.length) {
                    d.functionNames = [];
                    for (var j = 0; j < m.functionNames.length; ++j) {
                        d.functionNames[j] = $root.perfetto.protos.InternedString.toObject(m.functionNames[j], o);
                    }
                }
                if (m.frames && m.frames.length) {
                    d.frames = [];
                    for (var j = 0; j < m.frames.length; ++j) {
                        d.frames[j] = $root.perfetto.protos.Frame.toObject(m.frames[j], o);
                    }
                }
                if (m.callstacks && m.callstacks.length) {
                    d.callstacks = [];
                    for (var j = 0; j < m.callstacks.length; ++j) {
                        d.callstacks[j] = $root.perfetto.protos.Callstack.toObject(m.callstacks[j], o);
                    }
                }
                if (m.buildIds && m.buildIds.length) {
                    d.buildIds = [];
                    for (var j = 0; j < m.buildIds.length; ++j) {
                        d.buildIds[j] = $root.perfetto.protos.InternedString.toObject(m.buildIds[j], o);
                    }
                }
                if (m.mappingPaths && m.mappingPaths.length) {
                    d.mappingPaths = [];
                    for (var j = 0; j < m.mappingPaths.length; ++j) {
                        d.mappingPaths[j] = $root.perfetto.protos.InternedString.toObject(m.mappingPaths[j], o);
                    }
                }
                if (m.sourcePaths && m.sourcePaths.length) {
                    d.sourcePaths = [];
                    for (var j = 0; j < m.sourcePaths.length; ++j) {
                        d.sourcePaths[j] = $root.perfetto.protos.InternedString.toObject(m.sourcePaths[j], o);
                    }
                }
                if (m.mappings && m.mappings.length) {
                    d.mappings = [];
                    for (var j = 0; j < m.mappings.length; ++j) {
                        d.mappings[j] = $root.perfetto.protos.Mapping.toObject(m.mappings[j], o);
                    }
                }
                if (m.logMessageBody && m.logMessageBody.length) {
                    d.logMessageBody = [];
                    for (var j = 0; j < m.logMessageBody.length; ++j) {
                        d.logMessageBody[j] = $root.perfetto.protos.LogMessageBody.toObject(m.logMessageBody[j], o);
                    }
                }
                if (m.profiledFrameSymbols && m.profiledFrameSymbols.length) {
                    d.profiledFrameSymbols = [];
                    for (var j = 0; j < m.profiledFrameSymbols.length; ++j) {
                        d.profiledFrameSymbols[j] = $root.perfetto.protos.ProfiledFrameSymbols.toObject(m.profiledFrameSymbols[j], o);
                    }
                }
                if (m.vulkanMemoryKeys && m.vulkanMemoryKeys.length) {
                    d.vulkanMemoryKeys = [];
                    for (var j = 0; j < m.vulkanMemoryKeys.length; ++j) {
                        d.vulkanMemoryKeys[j] = $root.perfetto.protos.InternedString.toObject(m.vulkanMemoryKeys[j], o);
                    }
                }
                if (m.graphicsContexts && m.graphicsContexts.length) {
                    d.graphicsContexts = [];
                    for (var j = 0; j < m.graphicsContexts.length; ++j) {
                        d.graphicsContexts[j] = $root.perfetto.protos.InternedGraphicsContext.toObject(m.graphicsContexts[j], o);
                    }
                }
                if (m.gpuSpecifications && m.gpuSpecifications.length) {
                    d.gpuSpecifications = [];
                    for (var j = 0; j < m.gpuSpecifications.length; ++j) {
                        d.gpuSpecifications[j] = $root.perfetto.protos.InternedGpuRenderStageSpecification.toObject(m.gpuSpecifications[j], o);
                    }
                }
                if (m.histogramNames && m.histogramNames.length) {
                    d.histogramNames = [];
                    for (var j = 0; j < m.histogramNames.length; ++j) {
                        d.histogramNames[j] = $root.perfetto.protos.HistogramName.toObject(m.histogramNames[j], o);
                    }
                }
                if (m.kernelSymbols && m.kernelSymbols.length) {
                    d.kernelSymbols = [];
                    for (var j = 0; j < m.kernelSymbols.length; ++j) {
                        d.kernelSymbols[j] = $root.perfetto.protos.InternedString.toObject(m.kernelSymbols[j], o);
                    }
                }
                if (m.debugAnnotationValueTypeNames && m.debugAnnotationValueTypeNames.length) {
                    d.debugAnnotationValueTypeNames = [];
                    for (var j = 0; j < m.debugAnnotationValueTypeNames.length; ++j) {
                        d.debugAnnotationValueTypeNames[j] = $root.perfetto.protos.DebugAnnotationValueTypeName.toObject(m.debugAnnotationValueTypeNames[j], o);
                    }
                }
                if (m.unsymbolizedSourceLocations && m.unsymbolizedSourceLocations.length) {
                    d.unsymbolizedSourceLocations = [];
                    for (var j = 0; j < m.unsymbolizedSourceLocations.length; ++j) {
                        d.unsymbolizedSourceLocations[j] = $root.perfetto.protos.UnsymbolizedSourceLocation.toObject(m.unsymbolizedSourceLocations[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this InternedData to JSON.
             * @function toJSON
             * @memberof perfetto.protos.InternedData
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            InternedData.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return InternedData;
        })();

        protos.HistogramName = (function() {

            /**
             * Properties of a HistogramName.
             * @memberof perfetto.protos
             * @interface IHistogramName
             * @property {number|null} [iid] HistogramName iid
             * @property {string|null} [name] HistogramName name
             */

            /**
             * Constructs a new HistogramName.
             * @memberof perfetto.protos
             * @classdesc Represents a HistogramName.
             * @implements IHistogramName
             * @constructor
             * @param {perfetto.protos.IHistogramName=} [p] Properties to set
             */
            function HistogramName(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * HistogramName iid.
             * @member {number} iid
             * @memberof perfetto.protos.HistogramName
             * @instance
             */
            HistogramName.prototype.iid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * HistogramName name.
             * @member {string} name
             * @memberof perfetto.protos.HistogramName
             * @instance
             */
            HistogramName.prototype.name = "";

            /**
             * Creates a new HistogramName instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.HistogramName
             * @static
             * @param {perfetto.protos.IHistogramName=} [properties] Properties to set
             * @returns {perfetto.protos.HistogramName} HistogramName instance
             */
            HistogramName.create = function create(properties) {
                return new HistogramName(properties);
            };

            /**
             * Encodes the specified HistogramName message. Does not implicitly {@link perfetto.protos.HistogramName.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.HistogramName
             * @static
             * @param {perfetto.protos.IHistogramName} m HistogramName message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HistogramName.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.iid != null && Object.hasOwnProperty.call(m, "iid"))
                    w.uint32(8).uint64(m.iid);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(18).string(m.name);
                return w;
            };

            /**
             * Encodes the specified HistogramName message, length delimited. Does not implicitly {@link perfetto.protos.HistogramName.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.HistogramName
             * @static
             * @param {perfetto.protos.IHistogramName} message HistogramName message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HistogramName.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a HistogramName message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.HistogramName
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.HistogramName} HistogramName
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HistogramName.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.HistogramName();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.iid = r.uint64();
                        break;
                    case 2:
                        m.name = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a HistogramName message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.HistogramName
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.HistogramName} HistogramName
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HistogramName.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a HistogramName message.
             * @function verify
             * @memberof perfetto.protos.HistogramName
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            HistogramName.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (!$util.isInteger(m.iid) && !(m.iid && $util.isInteger(m.iid.low) && $util.isInteger(m.iid.high)))
                        return "iid: integer|Long expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                return null;
            };

            /**
             * Creates a HistogramName message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.HistogramName
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.HistogramName} HistogramName
             */
            HistogramName.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.HistogramName)
                    return d;
                var m = new $root.perfetto.protos.HistogramName();
                if (d.iid != null) {
                    if ($util.Long)
                        (m.iid = $util.Long.fromValue(d.iid)).unsigned = true;
                    else if (typeof d.iid === "string")
                        m.iid = parseInt(d.iid, 10);
                    else if (typeof d.iid === "number")
                        m.iid = d.iid;
                    else if (typeof d.iid === "object")
                        m.iid = new $util.LongBits(d.iid.low >>> 0, d.iid.high >>> 0).toNumber(true);
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                return m;
            };

            /**
             * Creates a plain object from a HistogramName message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.HistogramName
             * @static
             * @param {perfetto.protos.HistogramName} m HistogramName
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            HistogramName.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.iid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.iid = o.longs === String ? "0" : 0;
                    d.name = "";
                }
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (typeof m.iid === "number")
                        d.iid = o.longs === String ? String(m.iid) : m.iid;
                    else
                        d.iid = o.longs === String ? $util.Long.prototype.toString.call(m.iid) : o.longs === Number ? new $util.LongBits(m.iid.low >>> 0, m.iid.high >>> 0).toNumber(true) : m.iid;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                return d;
            };

            /**
             * Converts this HistogramName to JSON.
             * @function toJSON
             * @memberof perfetto.protos.HistogramName
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            HistogramName.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return HistogramName;
        })();

        protos.ChromeHistogramSample = (function() {

            /**
             * Properties of a ChromeHistogramSample.
             * @memberof perfetto.protos
             * @interface IChromeHistogramSample
             * @property {number|null} [nameHash] ChromeHistogramSample nameHash
             * @property {string|null} [name] ChromeHistogramSample name
             * @property {number|null} [sample] ChromeHistogramSample sample
             * @property {number|null} [nameIid] ChromeHistogramSample nameIid
             */

            /**
             * Constructs a new ChromeHistogramSample.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeHistogramSample.
             * @implements IChromeHistogramSample
             * @constructor
             * @param {perfetto.protos.IChromeHistogramSample=} [p] Properties to set
             */
            function ChromeHistogramSample(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeHistogramSample nameHash.
             * @member {number} nameHash
             * @memberof perfetto.protos.ChromeHistogramSample
             * @instance
             */
            ChromeHistogramSample.prototype.nameHash = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * ChromeHistogramSample name.
             * @member {string} name
             * @memberof perfetto.protos.ChromeHistogramSample
             * @instance
             */
            ChromeHistogramSample.prototype.name = "";

            /**
             * ChromeHistogramSample sample.
             * @member {number} sample
             * @memberof perfetto.protos.ChromeHistogramSample
             * @instance
             */
            ChromeHistogramSample.prototype.sample = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ChromeHistogramSample nameIid.
             * @member {number} nameIid
             * @memberof perfetto.protos.ChromeHistogramSample
             * @instance
             */
            ChromeHistogramSample.prototype.nameIid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new ChromeHistogramSample instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeHistogramSample
             * @static
             * @param {perfetto.protos.IChromeHistogramSample=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeHistogramSample} ChromeHistogramSample instance
             */
            ChromeHistogramSample.create = function create(properties) {
                return new ChromeHistogramSample(properties);
            };

            /**
             * Encodes the specified ChromeHistogramSample message. Does not implicitly {@link perfetto.protos.ChromeHistogramSample.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeHistogramSample
             * @static
             * @param {perfetto.protos.IChromeHistogramSample} m ChromeHistogramSample message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeHistogramSample.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.nameHash != null && Object.hasOwnProperty.call(m, "nameHash"))
                    w.uint32(8).uint64(m.nameHash);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(18).string(m.name);
                if (m.sample != null && Object.hasOwnProperty.call(m, "sample"))
                    w.uint32(24).int64(m.sample);
                if (m.nameIid != null && Object.hasOwnProperty.call(m, "nameIid"))
                    w.uint32(32).uint64(m.nameIid);
                return w;
            };

            /**
             * Encodes the specified ChromeHistogramSample message, length delimited. Does not implicitly {@link perfetto.protos.ChromeHistogramSample.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeHistogramSample
             * @static
             * @param {perfetto.protos.IChromeHistogramSample} message ChromeHistogramSample message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeHistogramSample.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeHistogramSample message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeHistogramSample
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeHistogramSample} ChromeHistogramSample
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeHistogramSample.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeHistogramSample();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.nameHash = r.uint64();
                        break;
                    case 2:
                        m.name = r.string();
                        break;
                    case 3:
                        m.sample = r.int64();
                        break;
                    case 4:
                        m.nameIid = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeHistogramSample message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeHistogramSample
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeHistogramSample} ChromeHistogramSample
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeHistogramSample.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeHistogramSample message.
             * @function verify
             * @memberof perfetto.protos.ChromeHistogramSample
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeHistogramSample.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.nameHash != null && m.hasOwnProperty("nameHash")) {
                    if (!$util.isInteger(m.nameHash) && !(m.nameHash && $util.isInteger(m.nameHash.low) && $util.isInteger(m.nameHash.high)))
                        return "nameHash: integer|Long expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.sample != null && m.hasOwnProperty("sample")) {
                    if (!$util.isInteger(m.sample) && !(m.sample && $util.isInteger(m.sample.low) && $util.isInteger(m.sample.high)))
                        return "sample: integer|Long expected";
                }
                if (m.nameIid != null && m.hasOwnProperty("nameIid")) {
                    if (!$util.isInteger(m.nameIid) && !(m.nameIid && $util.isInteger(m.nameIid.low) && $util.isInteger(m.nameIid.high)))
                        return "nameIid: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a ChromeHistogramSample message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeHistogramSample
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeHistogramSample} ChromeHistogramSample
             */
            ChromeHistogramSample.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeHistogramSample)
                    return d;
                var m = new $root.perfetto.protos.ChromeHistogramSample();
                if (d.nameHash != null) {
                    if ($util.Long)
                        (m.nameHash = $util.Long.fromValue(d.nameHash)).unsigned = true;
                    else if (typeof d.nameHash === "string")
                        m.nameHash = parseInt(d.nameHash, 10);
                    else if (typeof d.nameHash === "number")
                        m.nameHash = d.nameHash;
                    else if (typeof d.nameHash === "object")
                        m.nameHash = new $util.LongBits(d.nameHash.low >>> 0, d.nameHash.high >>> 0).toNumber(true);
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.sample != null) {
                    if ($util.Long)
                        (m.sample = $util.Long.fromValue(d.sample)).unsigned = false;
                    else if (typeof d.sample === "string")
                        m.sample = parseInt(d.sample, 10);
                    else if (typeof d.sample === "number")
                        m.sample = d.sample;
                    else if (typeof d.sample === "object")
                        m.sample = new $util.LongBits(d.sample.low >>> 0, d.sample.high >>> 0).toNumber();
                }
                if (d.nameIid != null) {
                    if ($util.Long)
                        (m.nameIid = $util.Long.fromValue(d.nameIid)).unsigned = true;
                    else if (typeof d.nameIid === "string")
                        m.nameIid = parseInt(d.nameIid, 10);
                    else if (typeof d.nameIid === "number")
                        m.nameIid = d.nameIid;
                    else if (typeof d.nameIid === "object")
                        m.nameIid = new $util.LongBits(d.nameIid.low >>> 0, d.nameIid.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeHistogramSample message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeHistogramSample
             * @static
             * @param {perfetto.protos.ChromeHistogramSample} m ChromeHistogramSample
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeHistogramSample.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.nameHash = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.nameHash = o.longs === String ? "0" : 0;
                    d.name = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.sample = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sample = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.nameIid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.nameIid = o.longs === String ? "0" : 0;
                }
                if (m.nameHash != null && m.hasOwnProperty("nameHash")) {
                    if (typeof m.nameHash === "number")
                        d.nameHash = o.longs === String ? String(m.nameHash) : m.nameHash;
                    else
                        d.nameHash = o.longs === String ? $util.Long.prototype.toString.call(m.nameHash) : o.longs === Number ? new $util.LongBits(m.nameHash.low >>> 0, m.nameHash.high >>> 0).toNumber(true) : m.nameHash;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.sample != null && m.hasOwnProperty("sample")) {
                    if (typeof m.sample === "number")
                        d.sample = o.longs === String ? String(m.sample) : m.sample;
                    else
                        d.sample = o.longs === String ? $util.Long.prototype.toString.call(m.sample) : o.longs === Number ? new $util.LongBits(m.sample.low >>> 0, m.sample.high >>> 0).toNumber() : m.sample;
                }
                if (m.nameIid != null && m.hasOwnProperty("nameIid")) {
                    if (typeof m.nameIid === "number")
                        d.nameIid = o.longs === String ? String(m.nameIid) : m.nameIid;
                    else
                        d.nameIid = o.longs === String ? $util.Long.prototype.toString.call(m.nameIid) : o.longs === Number ? new $util.LongBits(m.nameIid.low >>> 0, m.nameIid.high >>> 0).toNumber(true) : m.nameIid;
                }
                return d;
            };

            /**
             * Converts this ChromeHistogramSample to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeHistogramSample
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeHistogramSample.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ChromeHistogramSample;
        })();

        protos.DebugAnnotation = (function() {

            /**
             * Properties of a DebugAnnotation.
             * @memberof perfetto.protos
             * @interface IDebugAnnotation
             * @property {number|null} [nameIid] DebugAnnotation nameIid
             * @property {string|null} [name] DebugAnnotation name
             * @property {boolean|null} [boolValue] DebugAnnotation boolValue
             * @property {number|null} [uintValue] DebugAnnotation uintValue
             * @property {number|null} [intValue] DebugAnnotation intValue
             * @property {number|null} [doubleValue] DebugAnnotation doubleValue
             * @property {string|null} [stringValue] DebugAnnotation stringValue
             * @property {number|null} [pointerValue] DebugAnnotation pointerValue
             * @property {perfetto.protos.DebugAnnotation.INestedValue|null} [nestedValue] DebugAnnotation nestedValue
             * @property {string|null} [legacyJsonValue] DebugAnnotation legacyJsonValue
             * @property {string|null} [protoTypeName] DebugAnnotation protoTypeName
             * @property {number|null} [protoTypeNameIid] DebugAnnotation protoTypeNameIid
             * @property {Uint8Array|null} [protoValue] DebugAnnotation protoValue
             * @property {Array.<perfetto.protos.IDebugAnnotation>|null} [dictEntries] DebugAnnotation dictEntries
             * @property {Array.<perfetto.protos.IDebugAnnotation>|null} [arrayValues] DebugAnnotation arrayValues
             */

            /**
             * Constructs a new DebugAnnotation.
             * @memberof perfetto.protos
             * @classdesc Represents a DebugAnnotation.
             * @implements IDebugAnnotation
             * @constructor
             * @param {perfetto.protos.IDebugAnnotation=} [p] Properties to set
             */
            function DebugAnnotation(p) {
                this.dictEntries = [];
                this.arrayValues = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DebugAnnotation nameIid.
             * @member {number} nameIid
             * @memberof perfetto.protos.DebugAnnotation
             * @instance
             */
            DebugAnnotation.prototype.nameIid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * DebugAnnotation name.
             * @member {string} name
             * @memberof perfetto.protos.DebugAnnotation
             * @instance
             */
            DebugAnnotation.prototype.name = "";

            /**
             * DebugAnnotation boolValue.
             * @member {boolean} boolValue
             * @memberof perfetto.protos.DebugAnnotation
             * @instance
             */
            DebugAnnotation.prototype.boolValue = false;

            /**
             * DebugAnnotation uintValue.
             * @member {number} uintValue
             * @memberof perfetto.protos.DebugAnnotation
             * @instance
             */
            DebugAnnotation.prototype.uintValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * DebugAnnotation intValue.
             * @member {number} intValue
             * @memberof perfetto.protos.DebugAnnotation
             * @instance
             */
            DebugAnnotation.prototype.intValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * DebugAnnotation doubleValue.
             * @member {number} doubleValue
             * @memberof perfetto.protos.DebugAnnotation
             * @instance
             */
            DebugAnnotation.prototype.doubleValue = 0;

            /**
             * DebugAnnotation stringValue.
             * @member {string} stringValue
             * @memberof perfetto.protos.DebugAnnotation
             * @instance
             */
            DebugAnnotation.prototype.stringValue = "";

            /**
             * DebugAnnotation pointerValue.
             * @member {number} pointerValue
             * @memberof perfetto.protos.DebugAnnotation
             * @instance
             */
            DebugAnnotation.prototype.pointerValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * DebugAnnotation nestedValue.
             * @member {perfetto.protos.DebugAnnotation.INestedValue|null|undefined} nestedValue
             * @memberof perfetto.protos.DebugAnnotation
             * @instance
             */
            DebugAnnotation.prototype.nestedValue = null;

            /**
             * DebugAnnotation legacyJsonValue.
             * @member {string} legacyJsonValue
             * @memberof perfetto.protos.DebugAnnotation
             * @instance
             */
            DebugAnnotation.prototype.legacyJsonValue = "";

            /**
             * DebugAnnotation protoTypeName.
             * @member {string} protoTypeName
             * @memberof perfetto.protos.DebugAnnotation
             * @instance
             */
            DebugAnnotation.prototype.protoTypeName = "";

            /**
             * DebugAnnotation protoTypeNameIid.
             * @member {number} protoTypeNameIid
             * @memberof perfetto.protos.DebugAnnotation
             * @instance
             */
            DebugAnnotation.prototype.protoTypeNameIid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * DebugAnnotation protoValue.
             * @member {Uint8Array} protoValue
             * @memberof perfetto.protos.DebugAnnotation
             * @instance
             */
            DebugAnnotation.prototype.protoValue = $util.newBuffer([]);

            /**
             * DebugAnnotation dictEntries.
             * @member {Array.<perfetto.protos.IDebugAnnotation>} dictEntries
             * @memberof perfetto.protos.DebugAnnotation
             * @instance
             */
            DebugAnnotation.prototype.dictEntries = $util.emptyArray;

            /**
             * DebugAnnotation arrayValues.
             * @member {Array.<perfetto.protos.IDebugAnnotation>} arrayValues
             * @memberof perfetto.protos.DebugAnnotation
             * @instance
             */
            DebugAnnotation.prototype.arrayValues = $util.emptyArray;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * DebugAnnotation nameField.
             * @member {"nameIid"|"name"|undefined} nameField
             * @memberof perfetto.protos.DebugAnnotation
             * @instance
             */
            Object.defineProperty(DebugAnnotation.prototype, "nameField", {
                get: $util.oneOfGetter($oneOfFields = ["nameIid", "name"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DebugAnnotation value.
             * @member {"boolValue"|"uintValue"|"intValue"|"doubleValue"|"stringValue"|"pointerValue"|"nestedValue"|"legacyJsonValue"|undefined} value
             * @memberof perfetto.protos.DebugAnnotation
             * @instance
             */
            Object.defineProperty(DebugAnnotation.prototype, "value", {
                get: $util.oneOfGetter($oneOfFields = ["boolValue", "uintValue", "intValue", "doubleValue", "stringValue", "pointerValue", "nestedValue", "legacyJsonValue"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * DebugAnnotation protoTypeDescriptor.
             * @member {"protoTypeName"|"protoTypeNameIid"|undefined} protoTypeDescriptor
             * @memberof perfetto.protos.DebugAnnotation
             * @instance
             */
            Object.defineProperty(DebugAnnotation.prototype, "protoTypeDescriptor", {
                get: $util.oneOfGetter($oneOfFields = ["protoTypeName", "protoTypeNameIid"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new DebugAnnotation instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DebugAnnotation
             * @static
             * @param {perfetto.protos.IDebugAnnotation=} [properties] Properties to set
             * @returns {perfetto.protos.DebugAnnotation} DebugAnnotation instance
             */
            DebugAnnotation.create = function create(properties) {
                return new DebugAnnotation(properties);
            };

            /**
             * Encodes the specified DebugAnnotation message. Does not implicitly {@link perfetto.protos.DebugAnnotation.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DebugAnnotation
             * @static
             * @param {perfetto.protos.IDebugAnnotation} m DebugAnnotation message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DebugAnnotation.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.nameIid != null && Object.hasOwnProperty.call(m, "nameIid"))
                    w.uint32(8).uint64(m.nameIid);
                if (m.boolValue != null && Object.hasOwnProperty.call(m, "boolValue"))
                    w.uint32(16).bool(m.boolValue);
                if (m.uintValue != null && Object.hasOwnProperty.call(m, "uintValue"))
                    w.uint32(24).uint64(m.uintValue);
                if (m.intValue != null && Object.hasOwnProperty.call(m, "intValue"))
                    w.uint32(32).int64(m.intValue);
                if (m.doubleValue != null && Object.hasOwnProperty.call(m, "doubleValue"))
                    w.uint32(41).double(m.doubleValue);
                if (m.stringValue != null && Object.hasOwnProperty.call(m, "stringValue"))
                    w.uint32(50).string(m.stringValue);
                if (m.pointerValue != null && Object.hasOwnProperty.call(m, "pointerValue"))
                    w.uint32(56).uint64(m.pointerValue);
                if (m.nestedValue != null && Object.hasOwnProperty.call(m, "nestedValue"))
                    $root.perfetto.protos.DebugAnnotation.NestedValue.encode(m.nestedValue, w.uint32(66).fork()).ldelim();
                if (m.legacyJsonValue != null && Object.hasOwnProperty.call(m, "legacyJsonValue"))
                    w.uint32(74).string(m.legacyJsonValue);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(82).string(m.name);
                if (m.dictEntries != null && m.dictEntries.length) {
                    for (var i = 0; i < m.dictEntries.length; ++i)
                        $root.perfetto.protos.DebugAnnotation.encode(m.dictEntries[i], w.uint32(90).fork()).ldelim();
                }
                if (m.arrayValues != null && m.arrayValues.length) {
                    for (var i = 0; i < m.arrayValues.length; ++i)
                        $root.perfetto.protos.DebugAnnotation.encode(m.arrayValues[i], w.uint32(98).fork()).ldelim();
                }
                if (m.protoTypeNameIid != null && Object.hasOwnProperty.call(m, "protoTypeNameIid"))
                    w.uint32(104).uint64(m.protoTypeNameIid);
                if (m.protoValue != null && Object.hasOwnProperty.call(m, "protoValue"))
                    w.uint32(114).bytes(m.protoValue);
                if (m.protoTypeName != null && Object.hasOwnProperty.call(m, "protoTypeName"))
                    w.uint32(130).string(m.protoTypeName);
                return w;
            };

            /**
             * Encodes the specified DebugAnnotation message, length delimited. Does not implicitly {@link perfetto.protos.DebugAnnotation.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DebugAnnotation
             * @static
             * @param {perfetto.protos.IDebugAnnotation} message DebugAnnotation message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DebugAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DebugAnnotation message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DebugAnnotation
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DebugAnnotation} DebugAnnotation
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DebugAnnotation.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DebugAnnotation();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.nameIid = r.uint64();
                        break;
                    case 10:
                        m.name = r.string();
                        break;
                    case 2:
                        m.boolValue = r.bool();
                        break;
                    case 3:
                        m.uintValue = r.uint64();
                        break;
                    case 4:
                        m.intValue = r.int64();
                        break;
                    case 5:
                        m.doubleValue = r.double();
                        break;
                    case 6:
                        m.stringValue = r.string();
                        break;
                    case 7:
                        m.pointerValue = r.uint64();
                        break;
                    case 8:
                        m.nestedValue = $root.perfetto.protos.DebugAnnotation.NestedValue.decode(r, r.uint32());
                        break;
                    case 9:
                        m.legacyJsonValue = r.string();
                        break;
                    case 16:
                        m.protoTypeName = r.string();
                        break;
                    case 13:
                        m.protoTypeNameIid = r.uint64();
                        break;
                    case 14:
                        m.protoValue = r.bytes();
                        break;
                    case 11:
                        if (!(m.dictEntries && m.dictEntries.length))
                            m.dictEntries = [];
                        m.dictEntries.push($root.perfetto.protos.DebugAnnotation.decode(r, r.uint32()));
                        break;
                    case 12:
                        if (!(m.arrayValues && m.arrayValues.length))
                            m.arrayValues = [];
                        m.arrayValues.push($root.perfetto.protos.DebugAnnotation.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DebugAnnotation message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DebugAnnotation
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DebugAnnotation} DebugAnnotation
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DebugAnnotation.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DebugAnnotation message.
             * @function verify
             * @memberof perfetto.protos.DebugAnnotation
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DebugAnnotation.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                var p = {};
                if (m.nameIid != null && m.hasOwnProperty("nameIid")) {
                    p.nameField = 1;
                    if (!$util.isInteger(m.nameIid) && !(m.nameIid && $util.isInteger(m.nameIid.low) && $util.isInteger(m.nameIid.high)))
                        return "nameIid: integer|Long expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (p.nameField === 1)
                        return "nameField: multiple values";
                    p.nameField = 1;
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.boolValue != null && m.hasOwnProperty("boolValue")) {
                    p.value = 1;
                    if (typeof m.boolValue !== "boolean")
                        return "boolValue: boolean expected";
                }
                if (m.uintValue != null && m.hasOwnProperty("uintValue")) {
                    if (p.value === 1)
                        return "value: multiple values";
                    p.value = 1;
                    if (!$util.isInteger(m.uintValue) && !(m.uintValue && $util.isInteger(m.uintValue.low) && $util.isInteger(m.uintValue.high)))
                        return "uintValue: integer|Long expected";
                }
                if (m.intValue != null && m.hasOwnProperty("intValue")) {
                    if (p.value === 1)
                        return "value: multiple values";
                    p.value = 1;
                    if (!$util.isInteger(m.intValue) && !(m.intValue && $util.isInteger(m.intValue.low) && $util.isInteger(m.intValue.high)))
                        return "intValue: integer|Long expected";
                }
                if (m.doubleValue != null && m.hasOwnProperty("doubleValue")) {
                    if (p.value === 1)
                        return "value: multiple values";
                    p.value = 1;
                    if (typeof m.doubleValue !== "number")
                        return "doubleValue: number expected";
                }
                if (m.stringValue != null && m.hasOwnProperty("stringValue")) {
                    if (p.value === 1)
                        return "value: multiple values";
                    p.value = 1;
                    if (!$util.isString(m.stringValue))
                        return "stringValue: string expected";
                }
                if (m.pointerValue != null && m.hasOwnProperty("pointerValue")) {
                    if (p.value === 1)
                        return "value: multiple values";
                    p.value = 1;
                    if (!$util.isInteger(m.pointerValue) && !(m.pointerValue && $util.isInteger(m.pointerValue.low) && $util.isInteger(m.pointerValue.high)))
                        return "pointerValue: integer|Long expected";
                }
                if (m.nestedValue != null && m.hasOwnProperty("nestedValue")) {
                    if (p.value === 1)
                        return "value: multiple values";
                    p.value = 1;
                    {
                        var e = $root.perfetto.protos.DebugAnnotation.NestedValue.verify(m.nestedValue);
                        if (e)
                            return "nestedValue." + e;
                    }
                }
                if (m.legacyJsonValue != null && m.hasOwnProperty("legacyJsonValue")) {
                    if (p.value === 1)
                        return "value: multiple values";
                    p.value = 1;
                    if (!$util.isString(m.legacyJsonValue))
                        return "legacyJsonValue: string expected";
                }
                if (m.protoTypeName != null && m.hasOwnProperty("protoTypeName")) {
                    p.protoTypeDescriptor = 1;
                    if (!$util.isString(m.protoTypeName))
                        return "protoTypeName: string expected";
                }
                if (m.protoTypeNameIid != null && m.hasOwnProperty("protoTypeNameIid")) {
                    if (p.protoTypeDescriptor === 1)
                        return "protoTypeDescriptor: multiple values";
                    p.protoTypeDescriptor = 1;
                    if (!$util.isInteger(m.protoTypeNameIid) && !(m.protoTypeNameIid && $util.isInteger(m.protoTypeNameIid.low) && $util.isInteger(m.protoTypeNameIid.high)))
                        return "protoTypeNameIid: integer|Long expected";
                }
                if (m.protoValue != null && m.hasOwnProperty("protoValue")) {
                    if (!(m.protoValue && typeof m.protoValue.length === "number" || $util.isString(m.protoValue)))
                        return "protoValue: buffer expected";
                }
                if (m.dictEntries != null && m.hasOwnProperty("dictEntries")) {
                    if (!Array.isArray(m.dictEntries))
                        return "dictEntries: array expected";
                    for (var i = 0; i < m.dictEntries.length; ++i) {
                        {
                            var e = $root.perfetto.protos.DebugAnnotation.verify(m.dictEntries[i]);
                            if (e)
                                return "dictEntries." + e;
                        }
                    }
                }
                if (m.arrayValues != null && m.hasOwnProperty("arrayValues")) {
                    if (!Array.isArray(m.arrayValues))
                        return "arrayValues: array expected";
                    for (var i = 0; i < m.arrayValues.length; ++i) {
                        {
                            var e = $root.perfetto.protos.DebugAnnotation.verify(m.arrayValues[i]);
                            if (e)
                                return "arrayValues." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a DebugAnnotation message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DebugAnnotation
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DebugAnnotation} DebugAnnotation
             */
            DebugAnnotation.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DebugAnnotation)
                    return d;
                var m = new $root.perfetto.protos.DebugAnnotation();
                if (d.nameIid != null) {
                    if ($util.Long)
                        (m.nameIid = $util.Long.fromValue(d.nameIid)).unsigned = true;
                    else if (typeof d.nameIid === "string")
                        m.nameIid = parseInt(d.nameIid, 10);
                    else if (typeof d.nameIid === "number")
                        m.nameIid = d.nameIid;
                    else if (typeof d.nameIid === "object")
                        m.nameIid = new $util.LongBits(d.nameIid.low >>> 0, d.nameIid.high >>> 0).toNumber(true);
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.boolValue != null) {
                    m.boolValue = Boolean(d.boolValue);
                }
                if (d.uintValue != null) {
                    if ($util.Long)
                        (m.uintValue = $util.Long.fromValue(d.uintValue)).unsigned = true;
                    else if (typeof d.uintValue === "string")
                        m.uintValue = parseInt(d.uintValue, 10);
                    else if (typeof d.uintValue === "number")
                        m.uintValue = d.uintValue;
                    else if (typeof d.uintValue === "object")
                        m.uintValue = new $util.LongBits(d.uintValue.low >>> 0, d.uintValue.high >>> 0).toNumber(true);
                }
                if (d.intValue != null) {
                    if ($util.Long)
                        (m.intValue = $util.Long.fromValue(d.intValue)).unsigned = false;
                    else if (typeof d.intValue === "string")
                        m.intValue = parseInt(d.intValue, 10);
                    else if (typeof d.intValue === "number")
                        m.intValue = d.intValue;
                    else if (typeof d.intValue === "object")
                        m.intValue = new $util.LongBits(d.intValue.low >>> 0, d.intValue.high >>> 0).toNumber();
                }
                if (d.doubleValue != null) {
                    m.doubleValue = Number(d.doubleValue);
                }
                if (d.stringValue != null) {
                    m.stringValue = String(d.stringValue);
                }
                if (d.pointerValue != null) {
                    if ($util.Long)
                        (m.pointerValue = $util.Long.fromValue(d.pointerValue)).unsigned = true;
                    else if (typeof d.pointerValue === "string")
                        m.pointerValue = parseInt(d.pointerValue, 10);
                    else if (typeof d.pointerValue === "number")
                        m.pointerValue = d.pointerValue;
                    else if (typeof d.pointerValue === "object")
                        m.pointerValue = new $util.LongBits(d.pointerValue.low >>> 0, d.pointerValue.high >>> 0).toNumber(true);
                }
                if (d.nestedValue != null) {
                    if (typeof d.nestedValue !== "object")
                        throw TypeError(".perfetto.protos.DebugAnnotation.nestedValue: object expected");
                    m.nestedValue = $root.perfetto.protos.DebugAnnotation.NestedValue.fromObject(d.nestedValue);
                }
                if (d.legacyJsonValue != null) {
                    m.legacyJsonValue = String(d.legacyJsonValue);
                }
                if (d.protoTypeName != null) {
                    m.protoTypeName = String(d.protoTypeName);
                }
                if (d.protoTypeNameIid != null) {
                    if ($util.Long)
                        (m.protoTypeNameIid = $util.Long.fromValue(d.protoTypeNameIid)).unsigned = true;
                    else if (typeof d.protoTypeNameIid === "string")
                        m.protoTypeNameIid = parseInt(d.protoTypeNameIid, 10);
                    else if (typeof d.protoTypeNameIid === "number")
                        m.protoTypeNameIid = d.protoTypeNameIid;
                    else if (typeof d.protoTypeNameIid === "object")
                        m.protoTypeNameIid = new $util.LongBits(d.protoTypeNameIid.low >>> 0, d.protoTypeNameIid.high >>> 0).toNumber(true);
                }
                if (d.protoValue != null) {
                    if (typeof d.protoValue === "string")
                        $util.base64.decode(d.protoValue, m.protoValue = $util.newBuffer($util.base64.length(d.protoValue)), 0);
                    else if (d.protoValue.length)
                        m.protoValue = d.protoValue;
                }
                if (d.dictEntries) {
                    if (!Array.isArray(d.dictEntries))
                        throw TypeError(".perfetto.protos.DebugAnnotation.dictEntries: array expected");
                    m.dictEntries = [];
                    for (var i = 0; i < d.dictEntries.length; ++i) {
                        if (typeof d.dictEntries[i] !== "object")
                            throw TypeError(".perfetto.protos.DebugAnnotation.dictEntries: object expected");
                        m.dictEntries[i] = $root.perfetto.protos.DebugAnnotation.fromObject(d.dictEntries[i]);
                    }
                }
                if (d.arrayValues) {
                    if (!Array.isArray(d.arrayValues))
                        throw TypeError(".perfetto.protos.DebugAnnotation.arrayValues: array expected");
                    m.arrayValues = [];
                    for (var i = 0; i < d.arrayValues.length; ++i) {
                        if (typeof d.arrayValues[i] !== "object")
                            throw TypeError(".perfetto.protos.DebugAnnotation.arrayValues: object expected");
                        m.arrayValues[i] = $root.perfetto.protos.DebugAnnotation.fromObject(d.arrayValues[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a DebugAnnotation message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DebugAnnotation
             * @static
             * @param {perfetto.protos.DebugAnnotation} m DebugAnnotation
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DebugAnnotation.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.dictEntries = [];
                    d.arrayValues = [];
                }
                if (o.defaults) {
                    if (o.bytes === String)
                        d.protoValue = "";
                    else {
                        d.protoValue = [];
                        if (o.bytes !== Array)
                            d.protoValue = $util.newBuffer(d.protoValue);
                    }
                }
                if (m.nameIid != null && m.hasOwnProperty("nameIid")) {
                    if (typeof m.nameIid === "number")
                        d.nameIid = o.longs === String ? String(m.nameIid) : m.nameIid;
                    else
                        d.nameIid = o.longs === String ? $util.Long.prototype.toString.call(m.nameIid) : o.longs === Number ? new $util.LongBits(m.nameIid.low >>> 0, m.nameIid.high >>> 0).toNumber(true) : m.nameIid;
                    if (o.oneofs)
                        d.nameField = "nameIid";
                }
                if (m.boolValue != null && m.hasOwnProperty("boolValue")) {
                    d.boolValue = m.boolValue;
                    if (o.oneofs)
                        d.value = "boolValue";
                }
                if (m.uintValue != null && m.hasOwnProperty("uintValue")) {
                    if (typeof m.uintValue === "number")
                        d.uintValue = o.longs === String ? String(m.uintValue) : m.uintValue;
                    else
                        d.uintValue = o.longs === String ? $util.Long.prototype.toString.call(m.uintValue) : o.longs === Number ? new $util.LongBits(m.uintValue.low >>> 0, m.uintValue.high >>> 0).toNumber(true) : m.uintValue;
                    if (o.oneofs)
                        d.value = "uintValue";
                }
                if (m.intValue != null && m.hasOwnProperty("intValue")) {
                    if (typeof m.intValue === "number")
                        d.intValue = o.longs === String ? String(m.intValue) : m.intValue;
                    else
                        d.intValue = o.longs === String ? $util.Long.prototype.toString.call(m.intValue) : o.longs === Number ? new $util.LongBits(m.intValue.low >>> 0, m.intValue.high >>> 0).toNumber() : m.intValue;
                    if (o.oneofs)
                        d.value = "intValue";
                }
                if (m.doubleValue != null && m.hasOwnProperty("doubleValue")) {
                    d.doubleValue = o.json && !isFinite(m.doubleValue) ? String(m.doubleValue) : m.doubleValue;
                    if (o.oneofs)
                        d.value = "doubleValue";
                }
                if (m.stringValue != null && m.hasOwnProperty("stringValue")) {
                    d.stringValue = m.stringValue;
                    if (o.oneofs)
                        d.value = "stringValue";
                }
                if (m.pointerValue != null && m.hasOwnProperty("pointerValue")) {
                    if (typeof m.pointerValue === "number")
                        d.pointerValue = o.longs === String ? String(m.pointerValue) : m.pointerValue;
                    else
                        d.pointerValue = o.longs === String ? $util.Long.prototype.toString.call(m.pointerValue) : o.longs === Number ? new $util.LongBits(m.pointerValue.low >>> 0, m.pointerValue.high >>> 0).toNumber(true) : m.pointerValue;
                    if (o.oneofs)
                        d.value = "pointerValue";
                }
                if (m.nestedValue != null && m.hasOwnProperty("nestedValue")) {
                    d.nestedValue = $root.perfetto.protos.DebugAnnotation.NestedValue.toObject(m.nestedValue, o);
                    if (o.oneofs)
                        d.value = "nestedValue";
                }
                if (m.legacyJsonValue != null && m.hasOwnProperty("legacyJsonValue")) {
                    d.legacyJsonValue = m.legacyJsonValue;
                    if (o.oneofs)
                        d.value = "legacyJsonValue";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                    if (o.oneofs)
                        d.nameField = "name";
                }
                if (m.dictEntries && m.dictEntries.length) {
                    d.dictEntries = [];
                    for (var j = 0; j < m.dictEntries.length; ++j) {
                        d.dictEntries[j] = $root.perfetto.protos.DebugAnnotation.toObject(m.dictEntries[j], o);
                    }
                }
                if (m.arrayValues && m.arrayValues.length) {
                    d.arrayValues = [];
                    for (var j = 0; j < m.arrayValues.length; ++j) {
                        d.arrayValues[j] = $root.perfetto.protos.DebugAnnotation.toObject(m.arrayValues[j], o);
                    }
                }
                if (m.protoTypeNameIid != null && m.hasOwnProperty("protoTypeNameIid")) {
                    if (typeof m.protoTypeNameIid === "number")
                        d.protoTypeNameIid = o.longs === String ? String(m.protoTypeNameIid) : m.protoTypeNameIid;
                    else
                        d.protoTypeNameIid = o.longs === String ? $util.Long.prototype.toString.call(m.protoTypeNameIid) : o.longs === Number ? new $util.LongBits(m.protoTypeNameIid.low >>> 0, m.protoTypeNameIid.high >>> 0).toNumber(true) : m.protoTypeNameIid;
                    if (o.oneofs)
                        d.protoTypeDescriptor = "protoTypeNameIid";
                }
                if (m.protoValue != null && m.hasOwnProperty("protoValue")) {
                    d.protoValue = o.bytes === String ? $util.base64.encode(m.protoValue, 0, m.protoValue.length) : o.bytes === Array ? Array.prototype.slice.call(m.protoValue) : m.protoValue;
                }
                if (m.protoTypeName != null && m.hasOwnProperty("protoTypeName")) {
                    d.protoTypeName = m.protoTypeName;
                    if (o.oneofs)
                        d.protoTypeDescriptor = "protoTypeName";
                }
                return d;
            };

            /**
             * Converts this DebugAnnotation to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DebugAnnotation
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DebugAnnotation.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            DebugAnnotation.NestedValue = (function() {

                /**
                 * Properties of a NestedValue.
                 * @memberof perfetto.protos.DebugAnnotation
                 * @interface INestedValue
                 * @property {perfetto.protos.DebugAnnotation.NestedValue.NestedType|null} [nestedType] NestedValue nestedType
                 * @property {Array.<string>|null} [dictKeys] NestedValue dictKeys
                 * @property {Array.<perfetto.protos.DebugAnnotation.INestedValue>|null} [dictValues] NestedValue dictValues
                 * @property {Array.<perfetto.protos.DebugAnnotation.INestedValue>|null} [arrayValues] NestedValue arrayValues
                 * @property {number|null} [intValue] NestedValue intValue
                 * @property {number|null} [doubleValue] NestedValue doubleValue
                 * @property {boolean|null} [boolValue] NestedValue boolValue
                 * @property {string|null} [stringValue] NestedValue stringValue
                 */

                /**
                 * Constructs a new NestedValue.
                 * @memberof perfetto.protos.DebugAnnotation
                 * @classdesc Represents a NestedValue.
                 * @implements INestedValue
                 * @constructor
                 * @param {perfetto.protos.DebugAnnotation.INestedValue=} [p] Properties to set
                 */
                function NestedValue(p) {
                    this.dictKeys = [];
                    this.dictValues = [];
                    this.arrayValues = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * NestedValue nestedType.
                 * @member {perfetto.protos.DebugAnnotation.NestedValue.NestedType} nestedType
                 * @memberof perfetto.protos.DebugAnnotation.NestedValue
                 * @instance
                 */
                NestedValue.prototype.nestedType = 0;

                /**
                 * NestedValue dictKeys.
                 * @member {Array.<string>} dictKeys
                 * @memberof perfetto.protos.DebugAnnotation.NestedValue
                 * @instance
                 */
                NestedValue.prototype.dictKeys = $util.emptyArray;

                /**
                 * NestedValue dictValues.
                 * @member {Array.<perfetto.protos.DebugAnnotation.INestedValue>} dictValues
                 * @memberof perfetto.protos.DebugAnnotation.NestedValue
                 * @instance
                 */
                NestedValue.prototype.dictValues = $util.emptyArray;

                /**
                 * NestedValue arrayValues.
                 * @member {Array.<perfetto.protos.DebugAnnotation.INestedValue>} arrayValues
                 * @memberof perfetto.protos.DebugAnnotation.NestedValue
                 * @instance
                 */
                NestedValue.prototype.arrayValues = $util.emptyArray;

                /**
                 * NestedValue intValue.
                 * @member {number} intValue
                 * @memberof perfetto.protos.DebugAnnotation.NestedValue
                 * @instance
                 */
                NestedValue.prototype.intValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * NestedValue doubleValue.
                 * @member {number} doubleValue
                 * @memberof perfetto.protos.DebugAnnotation.NestedValue
                 * @instance
                 */
                NestedValue.prototype.doubleValue = 0;

                /**
                 * NestedValue boolValue.
                 * @member {boolean} boolValue
                 * @memberof perfetto.protos.DebugAnnotation.NestedValue
                 * @instance
                 */
                NestedValue.prototype.boolValue = false;

                /**
                 * NestedValue stringValue.
                 * @member {string} stringValue
                 * @memberof perfetto.protos.DebugAnnotation.NestedValue
                 * @instance
                 */
                NestedValue.prototype.stringValue = "";

                /**
                 * Creates a new NestedValue instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.DebugAnnotation.NestedValue
                 * @static
                 * @param {perfetto.protos.DebugAnnotation.INestedValue=} [properties] Properties to set
                 * @returns {perfetto.protos.DebugAnnotation.NestedValue} NestedValue instance
                 */
                NestedValue.create = function create(properties) {
                    return new NestedValue(properties);
                };

                /**
                 * Encodes the specified NestedValue message. Does not implicitly {@link perfetto.protos.DebugAnnotation.NestedValue.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.DebugAnnotation.NestedValue
                 * @static
                 * @param {perfetto.protos.DebugAnnotation.INestedValue} m NestedValue message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                NestedValue.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.nestedType != null && Object.hasOwnProperty.call(m, "nestedType"))
                        w.uint32(8).int32(m.nestedType);
                    if (m.dictKeys != null && m.dictKeys.length) {
                        for (var i = 0; i < m.dictKeys.length; ++i)
                            w.uint32(18).string(m.dictKeys[i]);
                    }
                    if (m.dictValues != null && m.dictValues.length) {
                        for (var i = 0; i < m.dictValues.length; ++i)
                            $root.perfetto.protos.DebugAnnotation.NestedValue.encode(m.dictValues[i], w.uint32(26).fork()).ldelim();
                    }
                    if (m.arrayValues != null && m.arrayValues.length) {
                        for (var i = 0; i < m.arrayValues.length; ++i)
                            $root.perfetto.protos.DebugAnnotation.NestedValue.encode(m.arrayValues[i], w.uint32(34).fork()).ldelim();
                    }
                    if (m.intValue != null && Object.hasOwnProperty.call(m, "intValue"))
                        w.uint32(40).int64(m.intValue);
                    if (m.doubleValue != null && Object.hasOwnProperty.call(m, "doubleValue"))
                        w.uint32(49).double(m.doubleValue);
                    if (m.boolValue != null && Object.hasOwnProperty.call(m, "boolValue"))
                        w.uint32(56).bool(m.boolValue);
                    if (m.stringValue != null && Object.hasOwnProperty.call(m, "stringValue"))
                        w.uint32(66).string(m.stringValue);
                    return w;
                };

                /**
                 * Encodes the specified NestedValue message, length delimited. Does not implicitly {@link perfetto.protos.DebugAnnotation.NestedValue.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.DebugAnnotation.NestedValue
                 * @static
                 * @param {perfetto.protos.DebugAnnotation.INestedValue} message NestedValue message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                NestedValue.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a NestedValue message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.DebugAnnotation.NestedValue
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.DebugAnnotation.NestedValue} NestedValue
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                NestedValue.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DebugAnnotation.NestedValue();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.nestedType = r.int32();
                            break;
                        case 2:
                            if (!(m.dictKeys && m.dictKeys.length))
                                m.dictKeys = [];
                            m.dictKeys.push(r.string());
                            break;
                        case 3:
                            if (!(m.dictValues && m.dictValues.length))
                                m.dictValues = [];
                            m.dictValues.push($root.perfetto.protos.DebugAnnotation.NestedValue.decode(r, r.uint32()));
                            break;
                        case 4:
                            if (!(m.arrayValues && m.arrayValues.length))
                                m.arrayValues = [];
                            m.arrayValues.push($root.perfetto.protos.DebugAnnotation.NestedValue.decode(r, r.uint32()));
                            break;
                        case 5:
                            m.intValue = r.int64();
                            break;
                        case 6:
                            m.doubleValue = r.double();
                            break;
                        case 7:
                            m.boolValue = r.bool();
                            break;
                        case 8:
                            m.stringValue = r.string();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a NestedValue message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.DebugAnnotation.NestedValue
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.DebugAnnotation.NestedValue} NestedValue
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                NestedValue.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a NestedValue message.
                 * @function verify
                 * @memberof perfetto.protos.DebugAnnotation.NestedValue
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                NestedValue.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.nestedType != null && m.hasOwnProperty("nestedType")) {
                        switch (m.nestedType) {
                        default:
                            return "nestedType: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                            break;
                        }
                    }
                    if (m.dictKeys != null && m.hasOwnProperty("dictKeys")) {
                        if (!Array.isArray(m.dictKeys))
                            return "dictKeys: array expected";
                        for (var i = 0; i < m.dictKeys.length; ++i) {
                            if (!$util.isString(m.dictKeys[i]))
                                return "dictKeys: string[] expected";
                        }
                    }
                    if (m.dictValues != null && m.hasOwnProperty("dictValues")) {
                        if (!Array.isArray(m.dictValues))
                            return "dictValues: array expected";
                        for (var i = 0; i < m.dictValues.length; ++i) {
                            {
                                var e = $root.perfetto.protos.DebugAnnotation.NestedValue.verify(m.dictValues[i]);
                                if (e)
                                    return "dictValues." + e;
                            }
                        }
                    }
                    if (m.arrayValues != null && m.hasOwnProperty("arrayValues")) {
                        if (!Array.isArray(m.arrayValues))
                            return "arrayValues: array expected";
                        for (var i = 0; i < m.arrayValues.length; ++i) {
                            {
                                var e = $root.perfetto.protos.DebugAnnotation.NestedValue.verify(m.arrayValues[i]);
                                if (e)
                                    return "arrayValues." + e;
                            }
                        }
                    }
                    if (m.intValue != null && m.hasOwnProperty("intValue")) {
                        if (!$util.isInteger(m.intValue) && !(m.intValue && $util.isInteger(m.intValue.low) && $util.isInteger(m.intValue.high)))
                            return "intValue: integer|Long expected";
                    }
                    if (m.doubleValue != null && m.hasOwnProperty("doubleValue")) {
                        if (typeof m.doubleValue !== "number")
                            return "doubleValue: number expected";
                    }
                    if (m.boolValue != null && m.hasOwnProperty("boolValue")) {
                        if (typeof m.boolValue !== "boolean")
                            return "boolValue: boolean expected";
                    }
                    if (m.stringValue != null && m.hasOwnProperty("stringValue")) {
                        if (!$util.isString(m.stringValue))
                            return "stringValue: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a NestedValue message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.DebugAnnotation.NestedValue
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.DebugAnnotation.NestedValue} NestedValue
                 */
                NestedValue.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.DebugAnnotation.NestedValue)
                        return d;
                    var m = new $root.perfetto.protos.DebugAnnotation.NestedValue();
                    switch (d.nestedType) {
                    case "UNSPECIFIED":
                    case 0:
                        m.nestedType = 0;
                        break;
                    case "DICT":
                    case 1:
                        m.nestedType = 1;
                        break;
                    case "ARRAY":
                    case 2:
                        m.nestedType = 2;
                        break;
                    }
                    if (d.dictKeys) {
                        if (!Array.isArray(d.dictKeys))
                            throw TypeError(".perfetto.protos.DebugAnnotation.NestedValue.dictKeys: array expected");
                        m.dictKeys = [];
                        for (var i = 0; i < d.dictKeys.length; ++i) {
                            m.dictKeys[i] = String(d.dictKeys[i]);
                        }
                    }
                    if (d.dictValues) {
                        if (!Array.isArray(d.dictValues))
                            throw TypeError(".perfetto.protos.DebugAnnotation.NestedValue.dictValues: array expected");
                        m.dictValues = [];
                        for (var i = 0; i < d.dictValues.length; ++i) {
                            if (typeof d.dictValues[i] !== "object")
                                throw TypeError(".perfetto.protos.DebugAnnotation.NestedValue.dictValues: object expected");
                            m.dictValues[i] = $root.perfetto.protos.DebugAnnotation.NestedValue.fromObject(d.dictValues[i]);
                        }
                    }
                    if (d.arrayValues) {
                        if (!Array.isArray(d.arrayValues))
                            throw TypeError(".perfetto.protos.DebugAnnotation.NestedValue.arrayValues: array expected");
                        m.arrayValues = [];
                        for (var i = 0; i < d.arrayValues.length; ++i) {
                            if (typeof d.arrayValues[i] !== "object")
                                throw TypeError(".perfetto.protos.DebugAnnotation.NestedValue.arrayValues: object expected");
                            m.arrayValues[i] = $root.perfetto.protos.DebugAnnotation.NestedValue.fromObject(d.arrayValues[i]);
                        }
                    }
                    if (d.intValue != null) {
                        if ($util.Long)
                            (m.intValue = $util.Long.fromValue(d.intValue)).unsigned = false;
                        else if (typeof d.intValue === "string")
                            m.intValue = parseInt(d.intValue, 10);
                        else if (typeof d.intValue === "number")
                            m.intValue = d.intValue;
                        else if (typeof d.intValue === "object")
                            m.intValue = new $util.LongBits(d.intValue.low >>> 0, d.intValue.high >>> 0).toNumber();
                    }
                    if (d.doubleValue != null) {
                        m.doubleValue = Number(d.doubleValue);
                    }
                    if (d.boolValue != null) {
                        m.boolValue = Boolean(d.boolValue);
                    }
                    if (d.stringValue != null) {
                        m.stringValue = String(d.stringValue);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a NestedValue message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.DebugAnnotation.NestedValue
                 * @static
                 * @param {perfetto.protos.DebugAnnotation.NestedValue} m NestedValue
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                NestedValue.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.dictKeys = [];
                        d.dictValues = [];
                        d.arrayValues = [];
                    }
                    if (o.defaults) {
                        d.nestedType = o.enums === String ? "UNSPECIFIED" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.intValue = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.intValue = o.longs === String ? "0" : 0;
                        d.doubleValue = 0;
                        d.boolValue = false;
                        d.stringValue = "";
                    }
                    if (m.nestedType != null && m.hasOwnProperty("nestedType")) {
                        d.nestedType = o.enums === String ? $root.perfetto.protos.DebugAnnotation.NestedValue.NestedType[m.nestedType] : m.nestedType;
                    }
                    if (m.dictKeys && m.dictKeys.length) {
                        d.dictKeys = [];
                        for (var j = 0; j < m.dictKeys.length; ++j) {
                            d.dictKeys[j] = m.dictKeys[j];
                        }
                    }
                    if (m.dictValues && m.dictValues.length) {
                        d.dictValues = [];
                        for (var j = 0; j < m.dictValues.length; ++j) {
                            d.dictValues[j] = $root.perfetto.protos.DebugAnnotation.NestedValue.toObject(m.dictValues[j], o);
                        }
                    }
                    if (m.arrayValues && m.arrayValues.length) {
                        d.arrayValues = [];
                        for (var j = 0; j < m.arrayValues.length; ++j) {
                            d.arrayValues[j] = $root.perfetto.protos.DebugAnnotation.NestedValue.toObject(m.arrayValues[j], o);
                        }
                    }
                    if (m.intValue != null && m.hasOwnProperty("intValue")) {
                        if (typeof m.intValue === "number")
                            d.intValue = o.longs === String ? String(m.intValue) : m.intValue;
                        else
                            d.intValue = o.longs === String ? $util.Long.prototype.toString.call(m.intValue) : o.longs === Number ? new $util.LongBits(m.intValue.low >>> 0, m.intValue.high >>> 0).toNumber() : m.intValue;
                    }
                    if (m.doubleValue != null && m.hasOwnProperty("doubleValue")) {
                        d.doubleValue = o.json && !isFinite(m.doubleValue) ? String(m.doubleValue) : m.doubleValue;
                    }
                    if (m.boolValue != null && m.hasOwnProperty("boolValue")) {
                        d.boolValue = m.boolValue;
                    }
                    if (m.stringValue != null && m.hasOwnProperty("stringValue")) {
                        d.stringValue = m.stringValue;
                    }
                    return d;
                };

                /**
                 * Converts this NestedValue to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.DebugAnnotation.NestedValue
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                NestedValue.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                /**
                 * NestedType enum.
                 * @name perfetto.protos.DebugAnnotation.NestedValue.NestedType
                 * @enum {number}
                 * @property {number} UNSPECIFIED=0 UNSPECIFIED value
                 * @property {number} DICT=1 DICT value
                 * @property {number} ARRAY=2 ARRAY value
                 */
                NestedValue.NestedType = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "UNSPECIFIED"] = 0;
                    values[valuesById[1] = "DICT"] = 1;
                    values[valuesById[2] = "ARRAY"] = 2;
                    return values;
                })();

                return NestedValue;
            })();

            return DebugAnnotation;
        })();

        protos.DebugAnnotationName = (function() {

            /**
             * Properties of a DebugAnnotationName.
             * @memberof perfetto.protos
             * @interface IDebugAnnotationName
             * @property {number|null} [iid] DebugAnnotationName iid
             * @property {string|null} [name] DebugAnnotationName name
             */

            /**
             * Constructs a new DebugAnnotationName.
             * @memberof perfetto.protos
             * @classdesc Represents a DebugAnnotationName.
             * @implements IDebugAnnotationName
             * @constructor
             * @param {perfetto.protos.IDebugAnnotationName=} [p] Properties to set
             */
            function DebugAnnotationName(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DebugAnnotationName iid.
             * @member {number} iid
             * @memberof perfetto.protos.DebugAnnotationName
             * @instance
             */
            DebugAnnotationName.prototype.iid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * DebugAnnotationName name.
             * @member {string} name
             * @memberof perfetto.protos.DebugAnnotationName
             * @instance
             */
            DebugAnnotationName.prototype.name = "";

            /**
             * Creates a new DebugAnnotationName instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DebugAnnotationName
             * @static
             * @param {perfetto.protos.IDebugAnnotationName=} [properties] Properties to set
             * @returns {perfetto.protos.DebugAnnotationName} DebugAnnotationName instance
             */
            DebugAnnotationName.create = function create(properties) {
                return new DebugAnnotationName(properties);
            };

            /**
             * Encodes the specified DebugAnnotationName message. Does not implicitly {@link perfetto.protos.DebugAnnotationName.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DebugAnnotationName
             * @static
             * @param {perfetto.protos.IDebugAnnotationName} m DebugAnnotationName message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DebugAnnotationName.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.iid != null && Object.hasOwnProperty.call(m, "iid"))
                    w.uint32(8).uint64(m.iid);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(18).string(m.name);
                return w;
            };

            /**
             * Encodes the specified DebugAnnotationName message, length delimited. Does not implicitly {@link perfetto.protos.DebugAnnotationName.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DebugAnnotationName
             * @static
             * @param {perfetto.protos.IDebugAnnotationName} message DebugAnnotationName message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DebugAnnotationName.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DebugAnnotationName message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DebugAnnotationName
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DebugAnnotationName} DebugAnnotationName
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DebugAnnotationName.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DebugAnnotationName();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.iid = r.uint64();
                        break;
                    case 2:
                        m.name = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DebugAnnotationName message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DebugAnnotationName
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DebugAnnotationName} DebugAnnotationName
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DebugAnnotationName.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DebugAnnotationName message.
             * @function verify
             * @memberof perfetto.protos.DebugAnnotationName
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DebugAnnotationName.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (!$util.isInteger(m.iid) && !(m.iid && $util.isInteger(m.iid.low) && $util.isInteger(m.iid.high)))
                        return "iid: integer|Long expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                return null;
            };

            /**
             * Creates a DebugAnnotationName message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DebugAnnotationName
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DebugAnnotationName} DebugAnnotationName
             */
            DebugAnnotationName.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DebugAnnotationName)
                    return d;
                var m = new $root.perfetto.protos.DebugAnnotationName();
                if (d.iid != null) {
                    if ($util.Long)
                        (m.iid = $util.Long.fromValue(d.iid)).unsigned = true;
                    else if (typeof d.iid === "string")
                        m.iid = parseInt(d.iid, 10);
                    else if (typeof d.iid === "number")
                        m.iid = d.iid;
                    else if (typeof d.iid === "object")
                        m.iid = new $util.LongBits(d.iid.low >>> 0, d.iid.high >>> 0).toNumber(true);
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                return m;
            };

            /**
             * Creates a plain object from a DebugAnnotationName message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DebugAnnotationName
             * @static
             * @param {perfetto.protos.DebugAnnotationName} m DebugAnnotationName
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DebugAnnotationName.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.iid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.iid = o.longs === String ? "0" : 0;
                    d.name = "";
                }
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (typeof m.iid === "number")
                        d.iid = o.longs === String ? String(m.iid) : m.iid;
                    else
                        d.iid = o.longs === String ? $util.Long.prototype.toString.call(m.iid) : o.longs === Number ? new $util.LongBits(m.iid.low >>> 0, m.iid.high >>> 0).toNumber(true) : m.iid;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                return d;
            };

            /**
             * Converts this DebugAnnotationName to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DebugAnnotationName
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DebugAnnotationName.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DebugAnnotationName;
        })();

        protos.DebugAnnotationValueTypeName = (function() {

            /**
             * Properties of a DebugAnnotationValueTypeName.
             * @memberof perfetto.protos
             * @interface IDebugAnnotationValueTypeName
             * @property {number|null} [iid] DebugAnnotationValueTypeName iid
             * @property {string|null} [name] DebugAnnotationValueTypeName name
             */

            /**
             * Constructs a new DebugAnnotationValueTypeName.
             * @memberof perfetto.protos
             * @classdesc Represents a DebugAnnotationValueTypeName.
             * @implements IDebugAnnotationValueTypeName
             * @constructor
             * @param {perfetto.protos.IDebugAnnotationValueTypeName=} [p] Properties to set
             */
            function DebugAnnotationValueTypeName(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DebugAnnotationValueTypeName iid.
             * @member {number} iid
             * @memberof perfetto.protos.DebugAnnotationValueTypeName
             * @instance
             */
            DebugAnnotationValueTypeName.prototype.iid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * DebugAnnotationValueTypeName name.
             * @member {string} name
             * @memberof perfetto.protos.DebugAnnotationValueTypeName
             * @instance
             */
            DebugAnnotationValueTypeName.prototype.name = "";

            /**
             * Creates a new DebugAnnotationValueTypeName instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DebugAnnotationValueTypeName
             * @static
             * @param {perfetto.protos.IDebugAnnotationValueTypeName=} [properties] Properties to set
             * @returns {perfetto.protos.DebugAnnotationValueTypeName} DebugAnnotationValueTypeName instance
             */
            DebugAnnotationValueTypeName.create = function create(properties) {
                return new DebugAnnotationValueTypeName(properties);
            };

            /**
             * Encodes the specified DebugAnnotationValueTypeName message. Does not implicitly {@link perfetto.protos.DebugAnnotationValueTypeName.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DebugAnnotationValueTypeName
             * @static
             * @param {perfetto.protos.IDebugAnnotationValueTypeName} m DebugAnnotationValueTypeName message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DebugAnnotationValueTypeName.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.iid != null && Object.hasOwnProperty.call(m, "iid"))
                    w.uint32(8).uint64(m.iid);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(18).string(m.name);
                return w;
            };

            /**
             * Encodes the specified DebugAnnotationValueTypeName message, length delimited. Does not implicitly {@link perfetto.protos.DebugAnnotationValueTypeName.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DebugAnnotationValueTypeName
             * @static
             * @param {perfetto.protos.IDebugAnnotationValueTypeName} message DebugAnnotationValueTypeName message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DebugAnnotationValueTypeName.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DebugAnnotationValueTypeName message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DebugAnnotationValueTypeName
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DebugAnnotationValueTypeName} DebugAnnotationValueTypeName
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DebugAnnotationValueTypeName.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DebugAnnotationValueTypeName();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.iid = r.uint64();
                        break;
                    case 2:
                        m.name = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DebugAnnotationValueTypeName message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DebugAnnotationValueTypeName
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DebugAnnotationValueTypeName} DebugAnnotationValueTypeName
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DebugAnnotationValueTypeName.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DebugAnnotationValueTypeName message.
             * @function verify
             * @memberof perfetto.protos.DebugAnnotationValueTypeName
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DebugAnnotationValueTypeName.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (!$util.isInteger(m.iid) && !(m.iid && $util.isInteger(m.iid.low) && $util.isInteger(m.iid.high)))
                        return "iid: integer|Long expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                return null;
            };

            /**
             * Creates a DebugAnnotationValueTypeName message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DebugAnnotationValueTypeName
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DebugAnnotationValueTypeName} DebugAnnotationValueTypeName
             */
            DebugAnnotationValueTypeName.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DebugAnnotationValueTypeName)
                    return d;
                var m = new $root.perfetto.protos.DebugAnnotationValueTypeName();
                if (d.iid != null) {
                    if ($util.Long)
                        (m.iid = $util.Long.fromValue(d.iid)).unsigned = true;
                    else if (typeof d.iid === "string")
                        m.iid = parseInt(d.iid, 10);
                    else if (typeof d.iid === "number")
                        m.iid = d.iid;
                    else if (typeof d.iid === "object")
                        m.iid = new $util.LongBits(d.iid.low >>> 0, d.iid.high >>> 0).toNumber(true);
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                return m;
            };

            /**
             * Creates a plain object from a DebugAnnotationValueTypeName message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DebugAnnotationValueTypeName
             * @static
             * @param {perfetto.protos.DebugAnnotationValueTypeName} m DebugAnnotationValueTypeName
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DebugAnnotationValueTypeName.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.iid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.iid = o.longs === String ? "0" : 0;
                    d.name = "";
                }
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (typeof m.iid === "number")
                        d.iid = o.longs === String ? String(m.iid) : m.iid;
                    else
                        d.iid = o.longs === String ? $util.Long.prototype.toString.call(m.iid) : o.longs === Number ? new $util.LongBits(m.iid.low >>> 0, m.iid.high >>> 0).toNumber(true) : m.iid;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                return d;
            };

            /**
             * Converts this DebugAnnotationValueTypeName to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DebugAnnotationValueTypeName
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DebugAnnotationValueTypeName.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DebugAnnotationValueTypeName;
        })();

        protos.LogMessage = (function() {

            /**
             * Properties of a LogMessage.
             * @memberof perfetto.protos
             * @interface ILogMessage
             * @property {number|null} [sourceLocationIid] LogMessage sourceLocationIid
             * @property {number|null} [bodyIid] LogMessage bodyIid
             */

            /**
             * Constructs a new LogMessage.
             * @memberof perfetto.protos
             * @classdesc Represents a LogMessage.
             * @implements ILogMessage
             * @constructor
             * @param {perfetto.protos.ILogMessage=} [p] Properties to set
             */
            function LogMessage(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * LogMessage sourceLocationIid.
             * @member {number} sourceLocationIid
             * @memberof perfetto.protos.LogMessage
             * @instance
             */
            LogMessage.prototype.sourceLocationIid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * LogMessage bodyIid.
             * @member {number} bodyIid
             * @memberof perfetto.protos.LogMessage
             * @instance
             */
            LogMessage.prototype.bodyIid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new LogMessage instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.LogMessage
             * @static
             * @param {perfetto.protos.ILogMessage=} [properties] Properties to set
             * @returns {perfetto.protos.LogMessage} LogMessage instance
             */
            LogMessage.create = function create(properties) {
                return new LogMessage(properties);
            };

            /**
             * Encodes the specified LogMessage message. Does not implicitly {@link perfetto.protos.LogMessage.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.LogMessage
             * @static
             * @param {perfetto.protos.ILogMessage} m LogMessage message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LogMessage.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.sourceLocationIid != null && Object.hasOwnProperty.call(m, "sourceLocationIid"))
                    w.uint32(8).uint64(m.sourceLocationIid);
                if (m.bodyIid != null && Object.hasOwnProperty.call(m, "bodyIid"))
                    w.uint32(16).uint64(m.bodyIid);
                return w;
            };

            /**
             * Encodes the specified LogMessage message, length delimited. Does not implicitly {@link perfetto.protos.LogMessage.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.LogMessage
             * @static
             * @param {perfetto.protos.ILogMessage} message LogMessage message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LogMessage.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a LogMessage message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.LogMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.LogMessage} LogMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LogMessage.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.LogMessage();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.sourceLocationIid = r.uint64();
                        break;
                    case 2:
                        m.bodyIid = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a LogMessage message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.LogMessage
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.LogMessage} LogMessage
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LogMessage.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a LogMessage message.
             * @function verify
             * @memberof perfetto.protos.LogMessage
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            LogMessage.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.sourceLocationIid != null && m.hasOwnProperty("sourceLocationIid")) {
                    if (!$util.isInteger(m.sourceLocationIid) && !(m.sourceLocationIid && $util.isInteger(m.sourceLocationIid.low) && $util.isInteger(m.sourceLocationIid.high)))
                        return "sourceLocationIid: integer|Long expected";
                }
                if (m.bodyIid != null && m.hasOwnProperty("bodyIid")) {
                    if (!$util.isInteger(m.bodyIid) && !(m.bodyIid && $util.isInteger(m.bodyIid.low) && $util.isInteger(m.bodyIid.high)))
                        return "bodyIid: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a LogMessage message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.LogMessage
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.LogMessage} LogMessage
             */
            LogMessage.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.LogMessage)
                    return d;
                var m = new $root.perfetto.protos.LogMessage();
                if (d.sourceLocationIid != null) {
                    if ($util.Long)
                        (m.sourceLocationIid = $util.Long.fromValue(d.sourceLocationIid)).unsigned = true;
                    else if (typeof d.sourceLocationIid === "string")
                        m.sourceLocationIid = parseInt(d.sourceLocationIid, 10);
                    else if (typeof d.sourceLocationIid === "number")
                        m.sourceLocationIid = d.sourceLocationIid;
                    else if (typeof d.sourceLocationIid === "object")
                        m.sourceLocationIid = new $util.LongBits(d.sourceLocationIid.low >>> 0, d.sourceLocationIid.high >>> 0).toNumber(true);
                }
                if (d.bodyIid != null) {
                    if ($util.Long)
                        (m.bodyIid = $util.Long.fromValue(d.bodyIid)).unsigned = true;
                    else if (typeof d.bodyIid === "string")
                        m.bodyIid = parseInt(d.bodyIid, 10);
                    else if (typeof d.bodyIid === "number")
                        m.bodyIid = d.bodyIid;
                    else if (typeof d.bodyIid === "object")
                        m.bodyIid = new $util.LongBits(d.bodyIid.low >>> 0, d.bodyIid.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a LogMessage message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.LogMessage
             * @static
             * @param {perfetto.protos.LogMessage} m LogMessage
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            LogMessage.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sourceLocationIid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sourceLocationIid = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.bodyIid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.bodyIid = o.longs === String ? "0" : 0;
                }
                if (m.sourceLocationIid != null && m.hasOwnProperty("sourceLocationIid")) {
                    if (typeof m.sourceLocationIid === "number")
                        d.sourceLocationIid = o.longs === String ? String(m.sourceLocationIid) : m.sourceLocationIid;
                    else
                        d.sourceLocationIid = o.longs === String ? $util.Long.prototype.toString.call(m.sourceLocationIid) : o.longs === Number ? new $util.LongBits(m.sourceLocationIid.low >>> 0, m.sourceLocationIid.high >>> 0).toNumber(true) : m.sourceLocationIid;
                }
                if (m.bodyIid != null && m.hasOwnProperty("bodyIid")) {
                    if (typeof m.bodyIid === "number")
                        d.bodyIid = o.longs === String ? String(m.bodyIid) : m.bodyIid;
                    else
                        d.bodyIid = o.longs === String ? $util.Long.prototype.toString.call(m.bodyIid) : o.longs === Number ? new $util.LongBits(m.bodyIid.low >>> 0, m.bodyIid.high >>> 0).toNumber(true) : m.bodyIid;
                }
                return d;
            };

            /**
             * Converts this LogMessage to JSON.
             * @function toJSON
             * @memberof perfetto.protos.LogMessage
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            LogMessage.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return LogMessage;
        })();

        protos.LogMessageBody = (function() {

            /**
             * Properties of a LogMessageBody.
             * @memberof perfetto.protos
             * @interface ILogMessageBody
             * @property {number|null} [iid] LogMessageBody iid
             * @property {string|null} [body] LogMessageBody body
             */

            /**
             * Constructs a new LogMessageBody.
             * @memberof perfetto.protos
             * @classdesc Represents a LogMessageBody.
             * @implements ILogMessageBody
             * @constructor
             * @param {perfetto.protos.ILogMessageBody=} [p] Properties to set
             */
            function LogMessageBody(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * LogMessageBody iid.
             * @member {number} iid
             * @memberof perfetto.protos.LogMessageBody
             * @instance
             */
            LogMessageBody.prototype.iid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * LogMessageBody body.
             * @member {string} body
             * @memberof perfetto.protos.LogMessageBody
             * @instance
             */
            LogMessageBody.prototype.body = "";

            /**
             * Creates a new LogMessageBody instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.LogMessageBody
             * @static
             * @param {perfetto.protos.ILogMessageBody=} [properties] Properties to set
             * @returns {perfetto.protos.LogMessageBody} LogMessageBody instance
             */
            LogMessageBody.create = function create(properties) {
                return new LogMessageBody(properties);
            };

            /**
             * Encodes the specified LogMessageBody message. Does not implicitly {@link perfetto.protos.LogMessageBody.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.LogMessageBody
             * @static
             * @param {perfetto.protos.ILogMessageBody} m LogMessageBody message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LogMessageBody.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.iid != null && Object.hasOwnProperty.call(m, "iid"))
                    w.uint32(8).uint64(m.iid);
                if (m.body != null && Object.hasOwnProperty.call(m, "body"))
                    w.uint32(18).string(m.body);
                return w;
            };

            /**
             * Encodes the specified LogMessageBody message, length delimited. Does not implicitly {@link perfetto.protos.LogMessageBody.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.LogMessageBody
             * @static
             * @param {perfetto.protos.ILogMessageBody} message LogMessageBody message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            LogMessageBody.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a LogMessageBody message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.LogMessageBody
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.LogMessageBody} LogMessageBody
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LogMessageBody.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.LogMessageBody();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.iid = r.uint64();
                        break;
                    case 2:
                        m.body = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a LogMessageBody message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.LogMessageBody
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.LogMessageBody} LogMessageBody
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            LogMessageBody.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a LogMessageBody message.
             * @function verify
             * @memberof perfetto.protos.LogMessageBody
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            LogMessageBody.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (!$util.isInteger(m.iid) && !(m.iid && $util.isInteger(m.iid.low) && $util.isInteger(m.iid.high)))
                        return "iid: integer|Long expected";
                }
                if (m.body != null && m.hasOwnProperty("body")) {
                    if (!$util.isString(m.body))
                        return "body: string expected";
                }
                return null;
            };

            /**
             * Creates a LogMessageBody message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.LogMessageBody
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.LogMessageBody} LogMessageBody
             */
            LogMessageBody.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.LogMessageBody)
                    return d;
                var m = new $root.perfetto.protos.LogMessageBody();
                if (d.iid != null) {
                    if ($util.Long)
                        (m.iid = $util.Long.fromValue(d.iid)).unsigned = true;
                    else if (typeof d.iid === "string")
                        m.iid = parseInt(d.iid, 10);
                    else if (typeof d.iid === "number")
                        m.iid = d.iid;
                    else if (typeof d.iid === "object")
                        m.iid = new $util.LongBits(d.iid.low >>> 0, d.iid.high >>> 0).toNumber(true);
                }
                if (d.body != null) {
                    m.body = String(d.body);
                }
                return m;
            };

            /**
             * Creates a plain object from a LogMessageBody message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.LogMessageBody
             * @static
             * @param {perfetto.protos.LogMessageBody} m LogMessageBody
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            LogMessageBody.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.iid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.iid = o.longs === String ? "0" : 0;
                    d.body = "";
                }
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (typeof m.iid === "number")
                        d.iid = o.longs === String ? String(m.iid) : m.iid;
                    else
                        d.iid = o.longs === String ? $util.Long.prototype.toString.call(m.iid) : o.longs === Number ? new $util.LongBits(m.iid.low >>> 0, m.iid.high >>> 0).toNumber(true) : m.iid;
                }
                if (m.body != null && m.hasOwnProperty("body")) {
                    d.body = m.body;
                }
                return d;
            };

            /**
             * Converts this LogMessageBody to JSON.
             * @function toJSON
             * @memberof perfetto.protos.LogMessageBody
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            LogMessageBody.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return LogMessageBody;
        })();

        protos.TrackEvent = (function() {

            /**
             * Properties of a TrackEvent.
             * @memberof perfetto.protos
             * @interface ITrackEvent
             * @property {Array.<number>|null} [categoryIids] TrackEvent categoryIids
             * @property {Array.<string>|null} [categories] TrackEvent categories
             * @property {number|null} [nameIid] TrackEvent nameIid
             * @property {string|null} [name] TrackEvent name
             * @property {perfetto.protos.TrackEvent.Type|null} [type] TrackEvent type
             * @property {number|null} [trackUuid] TrackEvent trackUuid
             * @property {number|null} [counterValue] TrackEvent counterValue
             * @property {number|null} [doubleCounterValue] TrackEvent doubleCounterValue
             * @property {Array.<number>|null} [extraCounterTrackUuids] TrackEvent extraCounterTrackUuids
             * @property {Array.<number>|null} [extraCounterValues] TrackEvent extraCounterValues
             * @property {Array.<number>|null} [extraDoubleCounterTrackUuids] TrackEvent extraDoubleCounterTrackUuids
             * @property {Array.<number>|null} [extraDoubleCounterValues] TrackEvent extraDoubleCounterValues
             * @property {Array.<number>|null} [flowIdsOld] TrackEvent flowIdsOld
             * @property {Array.<number>|null} [flowIds] TrackEvent flowIds
             * @property {Array.<number>|null} [terminatingFlowIdsOld] TrackEvent terminatingFlowIdsOld
             * @property {Array.<number>|null} [terminatingFlowIds] TrackEvent terminatingFlowIds
             * @property {Array.<perfetto.protos.IDebugAnnotation>|null} [debugAnnotations] TrackEvent debugAnnotations
             * @property {perfetto.protos.ITaskExecution|null} [taskExecution] TrackEvent taskExecution
             * @property {perfetto.protos.ILogMessage|null} [logMessage] TrackEvent logMessage
             * @property {perfetto.protos.IChromeCompositorSchedulerState|null} [ccSchedulerState] TrackEvent ccSchedulerState
             * @property {perfetto.protos.IChromeUserEvent|null} [chromeUserEvent] TrackEvent chromeUserEvent
             * @property {perfetto.protos.IChromeKeyedService|null} [chromeKeyedService] TrackEvent chromeKeyedService
             * @property {perfetto.protos.IChromeLegacyIpc|null} [chromeLegacyIpc] TrackEvent chromeLegacyIpc
             * @property {perfetto.protos.IChromeHistogramSample|null} [chromeHistogramSample] TrackEvent chromeHistogramSample
             * @property {perfetto.protos.IChromeLatencyInfo|null} [chromeLatencyInfo] TrackEvent chromeLatencyInfo
             * @property {perfetto.protos.IChromeFrameReporter|null} [chromeFrameReporter] TrackEvent chromeFrameReporter
             * @property {perfetto.protos.IChromeApplicationStateInfo|null} [chromeApplicationStateInfo] TrackEvent chromeApplicationStateInfo
             * @property {perfetto.protos.IChromeRendererSchedulerState|null} [chromeRendererSchedulerState] TrackEvent chromeRendererSchedulerState
             * @property {perfetto.protos.IChromeWindowHandleEventInfo|null} [chromeWindowHandleEventInfo] TrackEvent chromeWindowHandleEventInfo
             * @property {perfetto.protos.IChromeContentSettingsEventInfo|null} [chromeContentSettingsEventInfo] TrackEvent chromeContentSettingsEventInfo
             * @property {perfetto.protos.IChromeActiveProcesses|null} [chromeActiveProcesses] TrackEvent chromeActiveProcesses
             * @property {perfetto.protos.ISourceLocation|null} [sourceLocation] TrackEvent sourceLocation
             * @property {number|null} [sourceLocationIid] TrackEvent sourceLocationIid
             * @property {perfetto.protos.IChromeMessagePump|null} [chromeMessagePump] TrackEvent chromeMessagePump
             * @property {perfetto.protos.IChromeMojoEventInfo|null} [chromeMojoEventInfo] TrackEvent chromeMojoEventInfo
             * @property {number|null} [timestampDeltaUs] TrackEvent timestampDeltaUs
             * @property {number|null} [timestampAbsoluteUs] TrackEvent timestampAbsoluteUs
             * @property {number|null} [threadTimeDeltaUs] TrackEvent threadTimeDeltaUs
             * @property {number|null} [threadTimeAbsoluteUs] TrackEvent threadTimeAbsoluteUs
             * @property {number|null} [threadInstructionCountDelta] TrackEvent threadInstructionCountDelta
             * @property {number|null} [threadInstructionCountAbsolute] TrackEvent threadInstructionCountAbsolute
             * @property {perfetto.protos.TrackEvent.ILegacyEvent|null} [legacyEvent] TrackEvent legacyEvent
             */

            /**
             * Constructs a new TrackEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TrackEvent.
             * @implements ITrackEvent
             * @constructor
             * @param {perfetto.protos.ITrackEvent=} [p] Properties to set
             */
            function TrackEvent(p) {
                this.categoryIids = [];
                this.categories = [];
                this.extraCounterTrackUuids = [];
                this.extraCounterValues = [];
                this.extraDoubleCounterTrackUuids = [];
                this.extraDoubleCounterValues = [];
                this.flowIdsOld = [];
                this.flowIds = [];
                this.terminatingFlowIdsOld = [];
                this.terminatingFlowIds = [];
                this.debugAnnotations = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TrackEvent categoryIids.
             * @member {Array.<number>} categoryIids
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.categoryIids = $util.emptyArray;

            /**
             * TrackEvent categories.
             * @member {Array.<string>} categories
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.categories = $util.emptyArray;

            /**
             * TrackEvent nameIid.
             * @member {number} nameIid
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.nameIid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TrackEvent name.
             * @member {string} name
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.name = "";

            /**
             * TrackEvent type.
             * @member {perfetto.protos.TrackEvent.Type} type
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.type = 0;

            /**
             * TrackEvent trackUuid.
             * @member {number} trackUuid
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.trackUuid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TrackEvent counterValue.
             * @member {number} counterValue
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.counterValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * TrackEvent doubleCounterValue.
             * @member {number} doubleCounterValue
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.doubleCounterValue = 0;

            /**
             * TrackEvent extraCounterTrackUuids.
             * @member {Array.<number>} extraCounterTrackUuids
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.extraCounterTrackUuids = $util.emptyArray;

            /**
             * TrackEvent extraCounterValues.
             * @member {Array.<number>} extraCounterValues
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.extraCounterValues = $util.emptyArray;

            /**
             * TrackEvent extraDoubleCounterTrackUuids.
             * @member {Array.<number>} extraDoubleCounterTrackUuids
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.extraDoubleCounterTrackUuids = $util.emptyArray;

            /**
             * TrackEvent extraDoubleCounterValues.
             * @member {Array.<number>} extraDoubleCounterValues
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.extraDoubleCounterValues = $util.emptyArray;

            /**
             * TrackEvent flowIdsOld.
             * @member {Array.<number>} flowIdsOld
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.flowIdsOld = $util.emptyArray;

            /**
             * TrackEvent flowIds.
             * @member {Array.<number>} flowIds
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.flowIds = $util.emptyArray;

            /**
             * TrackEvent terminatingFlowIdsOld.
             * @member {Array.<number>} terminatingFlowIdsOld
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.terminatingFlowIdsOld = $util.emptyArray;

            /**
             * TrackEvent terminatingFlowIds.
             * @member {Array.<number>} terminatingFlowIds
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.terminatingFlowIds = $util.emptyArray;

            /**
             * TrackEvent debugAnnotations.
             * @member {Array.<perfetto.protos.IDebugAnnotation>} debugAnnotations
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.debugAnnotations = $util.emptyArray;

            /**
             * TrackEvent taskExecution.
             * @member {perfetto.protos.ITaskExecution|null|undefined} taskExecution
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.taskExecution = null;

            /**
             * TrackEvent logMessage.
             * @member {perfetto.protos.ILogMessage|null|undefined} logMessage
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.logMessage = null;

            /**
             * TrackEvent ccSchedulerState.
             * @member {perfetto.protos.IChromeCompositorSchedulerState|null|undefined} ccSchedulerState
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.ccSchedulerState = null;

            /**
             * TrackEvent chromeUserEvent.
             * @member {perfetto.protos.IChromeUserEvent|null|undefined} chromeUserEvent
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.chromeUserEvent = null;

            /**
             * TrackEvent chromeKeyedService.
             * @member {perfetto.protos.IChromeKeyedService|null|undefined} chromeKeyedService
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.chromeKeyedService = null;

            /**
             * TrackEvent chromeLegacyIpc.
             * @member {perfetto.protos.IChromeLegacyIpc|null|undefined} chromeLegacyIpc
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.chromeLegacyIpc = null;

            /**
             * TrackEvent chromeHistogramSample.
             * @member {perfetto.protos.IChromeHistogramSample|null|undefined} chromeHistogramSample
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.chromeHistogramSample = null;

            /**
             * TrackEvent chromeLatencyInfo.
             * @member {perfetto.protos.IChromeLatencyInfo|null|undefined} chromeLatencyInfo
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.chromeLatencyInfo = null;

            /**
             * TrackEvent chromeFrameReporter.
             * @member {perfetto.protos.IChromeFrameReporter|null|undefined} chromeFrameReporter
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.chromeFrameReporter = null;

            /**
             * TrackEvent chromeApplicationStateInfo.
             * @member {perfetto.protos.IChromeApplicationStateInfo|null|undefined} chromeApplicationStateInfo
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.chromeApplicationStateInfo = null;

            /**
             * TrackEvent chromeRendererSchedulerState.
             * @member {perfetto.protos.IChromeRendererSchedulerState|null|undefined} chromeRendererSchedulerState
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.chromeRendererSchedulerState = null;

            /**
             * TrackEvent chromeWindowHandleEventInfo.
             * @member {perfetto.protos.IChromeWindowHandleEventInfo|null|undefined} chromeWindowHandleEventInfo
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.chromeWindowHandleEventInfo = null;

            /**
             * TrackEvent chromeContentSettingsEventInfo.
             * @member {perfetto.protos.IChromeContentSettingsEventInfo|null|undefined} chromeContentSettingsEventInfo
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.chromeContentSettingsEventInfo = null;

            /**
             * TrackEvent chromeActiveProcesses.
             * @member {perfetto.protos.IChromeActiveProcesses|null|undefined} chromeActiveProcesses
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.chromeActiveProcesses = null;

            /**
             * TrackEvent sourceLocation.
             * @member {perfetto.protos.ISourceLocation|null|undefined} sourceLocation
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.sourceLocation = null;

            /**
             * TrackEvent sourceLocationIid.
             * @member {number} sourceLocationIid
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.sourceLocationIid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TrackEvent chromeMessagePump.
             * @member {perfetto.protos.IChromeMessagePump|null|undefined} chromeMessagePump
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.chromeMessagePump = null;

            /**
             * TrackEvent chromeMojoEventInfo.
             * @member {perfetto.protos.IChromeMojoEventInfo|null|undefined} chromeMojoEventInfo
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.chromeMojoEventInfo = null;

            /**
             * TrackEvent timestampDeltaUs.
             * @member {number} timestampDeltaUs
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.timestampDeltaUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * TrackEvent timestampAbsoluteUs.
             * @member {number} timestampAbsoluteUs
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.timestampAbsoluteUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * TrackEvent threadTimeDeltaUs.
             * @member {number} threadTimeDeltaUs
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.threadTimeDeltaUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * TrackEvent threadTimeAbsoluteUs.
             * @member {number} threadTimeAbsoluteUs
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.threadTimeAbsoluteUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * TrackEvent threadInstructionCountDelta.
             * @member {number} threadInstructionCountDelta
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.threadInstructionCountDelta = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * TrackEvent threadInstructionCountAbsolute.
             * @member {number} threadInstructionCountAbsolute
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.threadInstructionCountAbsolute = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * TrackEvent legacyEvent.
             * @member {perfetto.protos.TrackEvent.ILegacyEvent|null|undefined} legacyEvent
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            TrackEvent.prototype.legacyEvent = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * TrackEvent nameField.
             * @member {"nameIid"|"name"|undefined} nameField
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            Object.defineProperty(TrackEvent.prototype, "nameField", {
                get: $util.oneOfGetter($oneOfFields = ["nameIid", "name"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * TrackEvent counterValueField.
             * @member {"counterValue"|"doubleCounterValue"|undefined} counterValueField
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            Object.defineProperty(TrackEvent.prototype, "counterValueField", {
                get: $util.oneOfGetter($oneOfFields = ["counterValue", "doubleCounterValue"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * TrackEvent sourceLocationField.
             * @member {"sourceLocation"|"sourceLocationIid"|undefined} sourceLocationField
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            Object.defineProperty(TrackEvent.prototype, "sourceLocationField", {
                get: $util.oneOfGetter($oneOfFields = ["sourceLocation", "sourceLocationIid"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * TrackEvent timestamp.
             * @member {"timestampDeltaUs"|"timestampAbsoluteUs"|undefined} timestamp
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            Object.defineProperty(TrackEvent.prototype, "timestamp", {
                get: $util.oneOfGetter($oneOfFields = ["timestampDeltaUs", "timestampAbsoluteUs"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * TrackEvent threadTime.
             * @member {"threadTimeDeltaUs"|"threadTimeAbsoluteUs"|undefined} threadTime
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            Object.defineProperty(TrackEvent.prototype, "threadTime", {
                get: $util.oneOfGetter($oneOfFields = ["threadTimeDeltaUs", "threadTimeAbsoluteUs"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * TrackEvent threadInstructionCount.
             * @member {"threadInstructionCountDelta"|"threadInstructionCountAbsolute"|undefined} threadInstructionCount
             * @memberof perfetto.protos.TrackEvent
             * @instance
             */
            Object.defineProperty(TrackEvent.prototype, "threadInstructionCount", {
                get: $util.oneOfGetter($oneOfFields = ["threadInstructionCountDelta", "threadInstructionCountAbsolute"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new TrackEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrackEvent
             * @static
             * @param {perfetto.protos.ITrackEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TrackEvent} TrackEvent instance
             */
            TrackEvent.create = function create(properties) {
                return new TrackEvent(properties);
            };

            /**
             * Encodes the specified TrackEvent message. Does not implicitly {@link perfetto.protos.TrackEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrackEvent
             * @static
             * @param {perfetto.protos.ITrackEvent} m TrackEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrackEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.timestampDeltaUs != null && Object.hasOwnProperty.call(m, "timestampDeltaUs"))
                    w.uint32(8).int64(m.timestampDeltaUs);
                if (m.threadTimeDeltaUs != null && Object.hasOwnProperty.call(m, "threadTimeDeltaUs"))
                    w.uint32(16).int64(m.threadTimeDeltaUs);
                if (m.categoryIids != null && m.categoryIids.length) {
                    for (var i = 0; i < m.categoryIids.length; ++i)
                        w.uint32(24).uint64(m.categoryIids[i]);
                }
                if (m.debugAnnotations != null && m.debugAnnotations.length) {
                    for (var i = 0; i < m.debugAnnotations.length; ++i)
                        $root.perfetto.protos.DebugAnnotation.encode(m.debugAnnotations[i], w.uint32(34).fork()).ldelim();
                }
                if (m.taskExecution != null && Object.hasOwnProperty.call(m, "taskExecution"))
                    $root.perfetto.protos.TaskExecution.encode(m.taskExecution, w.uint32(42).fork()).ldelim();
                if (m.legacyEvent != null && Object.hasOwnProperty.call(m, "legacyEvent"))
                    $root.perfetto.protos.TrackEvent.LegacyEvent.encode(m.legacyEvent, w.uint32(50).fork()).ldelim();
                if (m.threadInstructionCountDelta != null && Object.hasOwnProperty.call(m, "threadInstructionCountDelta"))
                    w.uint32(64).int64(m.threadInstructionCountDelta);
                if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                    w.uint32(72).int32(m.type);
                if (m.nameIid != null && Object.hasOwnProperty.call(m, "nameIid"))
                    w.uint32(80).uint64(m.nameIid);
                if (m.trackUuid != null && Object.hasOwnProperty.call(m, "trackUuid"))
                    w.uint32(88).uint64(m.trackUuid);
                if (m.extraCounterValues != null && m.extraCounterValues.length) {
                    for (var i = 0; i < m.extraCounterValues.length; ++i)
                        w.uint32(96).int64(m.extraCounterValues[i]);
                }
                if (m.timestampAbsoluteUs != null && Object.hasOwnProperty.call(m, "timestampAbsoluteUs"))
                    w.uint32(128).int64(m.timestampAbsoluteUs);
                if (m.threadTimeAbsoluteUs != null && Object.hasOwnProperty.call(m, "threadTimeAbsoluteUs"))
                    w.uint32(136).int64(m.threadTimeAbsoluteUs);
                if (m.threadInstructionCountAbsolute != null && Object.hasOwnProperty.call(m, "threadInstructionCountAbsolute"))
                    w.uint32(160).int64(m.threadInstructionCountAbsolute);
                if (m.logMessage != null && Object.hasOwnProperty.call(m, "logMessage"))
                    $root.perfetto.protos.LogMessage.encode(m.logMessage, w.uint32(170).fork()).ldelim();
                if (m.categories != null && m.categories.length) {
                    for (var i = 0; i < m.categories.length; ++i)
                        w.uint32(178).string(m.categories[i]);
                }
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(186).string(m.name);
                if (m.ccSchedulerState != null && Object.hasOwnProperty.call(m, "ccSchedulerState"))
                    $root.perfetto.protos.ChromeCompositorSchedulerState.encode(m.ccSchedulerState, w.uint32(194).fork()).ldelim();
                if (m.chromeUserEvent != null && Object.hasOwnProperty.call(m, "chromeUserEvent"))
                    $root.perfetto.protos.ChromeUserEvent.encode(m.chromeUserEvent, w.uint32(202).fork()).ldelim();
                if (m.chromeKeyedService != null && Object.hasOwnProperty.call(m, "chromeKeyedService"))
                    $root.perfetto.protos.ChromeKeyedService.encode(m.chromeKeyedService, w.uint32(210).fork()).ldelim();
                if (m.chromeLegacyIpc != null && Object.hasOwnProperty.call(m, "chromeLegacyIpc"))
                    $root.perfetto.protos.ChromeLegacyIpc.encode(m.chromeLegacyIpc, w.uint32(218).fork()).ldelim();
                if (m.chromeHistogramSample != null && Object.hasOwnProperty.call(m, "chromeHistogramSample"))
                    $root.perfetto.protos.ChromeHistogramSample.encode(m.chromeHistogramSample, w.uint32(226).fork()).ldelim();
                if (m.chromeLatencyInfo != null && Object.hasOwnProperty.call(m, "chromeLatencyInfo"))
                    $root.perfetto.protos.ChromeLatencyInfo.encode(m.chromeLatencyInfo, w.uint32(234).fork()).ldelim();
                if (m.counterValue != null && Object.hasOwnProperty.call(m, "counterValue"))
                    w.uint32(240).int64(m.counterValue);
                if (m.extraCounterTrackUuids != null && m.extraCounterTrackUuids.length) {
                    for (var i = 0; i < m.extraCounterTrackUuids.length; ++i)
                        w.uint32(248).uint64(m.extraCounterTrackUuids[i]);
                }
                if (m.chromeFrameReporter != null && Object.hasOwnProperty.call(m, "chromeFrameReporter"))
                    $root.perfetto.protos.ChromeFrameReporter.encode(m.chromeFrameReporter, w.uint32(258).fork()).ldelim();
                if (m.sourceLocation != null && Object.hasOwnProperty.call(m, "sourceLocation"))
                    $root.perfetto.protos.SourceLocation.encode(m.sourceLocation, w.uint32(266).fork()).ldelim();
                if (m.sourceLocationIid != null && Object.hasOwnProperty.call(m, "sourceLocationIid"))
                    w.uint32(272).uint64(m.sourceLocationIid);
                if (m.chromeMessagePump != null && Object.hasOwnProperty.call(m, "chromeMessagePump"))
                    $root.perfetto.protos.ChromeMessagePump.encode(m.chromeMessagePump, w.uint32(282).fork()).ldelim();
                if (m.flowIdsOld != null && m.flowIdsOld.length) {
                    for (var i = 0; i < m.flowIdsOld.length; ++i)
                        w.uint32(288).uint64(m.flowIdsOld[i]);
                }
                if (m.chromeMojoEventInfo != null && Object.hasOwnProperty.call(m, "chromeMojoEventInfo"))
                    $root.perfetto.protos.ChromeMojoEventInfo.encode(m.chromeMojoEventInfo, w.uint32(306).fork()).ldelim();
                if (m.chromeApplicationStateInfo != null && Object.hasOwnProperty.call(m, "chromeApplicationStateInfo"))
                    $root.perfetto.protos.ChromeApplicationStateInfo.encode(m.chromeApplicationStateInfo, w.uint32(314).fork()).ldelim();
                if (m.chromeRendererSchedulerState != null && Object.hasOwnProperty.call(m, "chromeRendererSchedulerState"))
                    $root.perfetto.protos.ChromeRendererSchedulerState.encode(m.chromeRendererSchedulerState, w.uint32(322).fork()).ldelim();
                if (m.chromeWindowHandleEventInfo != null && Object.hasOwnProperty.call(m, "chromeWindowHandleEventInfo"))
                    $root.perfetto.protos.ChromeWindowHandleEventInfo.encode(m.chromeWindowHandleEventInfo, w.uint32(330).fork()).ldelim();
                if (m.terminatingFlowIdsOld != null && m.terminatingFlowIdsOld.length) {
                    for (var i = 0; i < m.terminatingFlowIdsOld.length; ++i)
                        w.uint32(336).uint64(m.terminatingFlowIdsOld[i]);
                }
                if (m.chromeContentSettingsEventInfo != null && Object.hasOwnProperty.call(m, "chromeContentSettingsEventInfo"))
                    $root.perfetto.protos.ChromeContentSettingsEventInfo.encode(m.chromeContentSettingsEventInfo, w.uint32(346).fork()).ldelim();
                if (m.doubleCounterValue != null && Object.hasOwnProperty.call(m, "doubleCounterValue"))
                    w.uint32(353).double(m.doubleCounterValue);
                if (m.extraDoubleCounterTrackUuids != null && m.extraDoubleCounterTrackUuids.length) {
                    for (var i = 0; i < m.extraDoubleCounterTrackUuids.length; ++i)
                        w.uint32(360).uint64(m.extraDoubleCounterTrackUuids[i]);
                }
                if (m.extraDoubleCounterValues != null && m.extraDoubleCounterValues.length) {
                    for (var i = 0; i < m.extraDoubleCounterValues.length; ++i)
                        w.uint32(369).double(m.extraDoubleCounterValues[i]);
                }
                if (m.flowIds != null && m.flowIds.length) {
                    for (var i = 0; i < m.flowIds.length; ++i)
                        w.uint32(377).fixed64(m.flowIds[i]);
                }
                if (m.terminatingFlowIds != null && m.terminatingFlowIds.length) {
                    for (var i = 0; i < m.terminatingFlowIds.length; ++i)
                        w.uint32(385).fixed64(m.terminatingFlowIds[i]);
                }
                if (m.chromeActiveProcesses != null && Object.hasOwnProperty.call(m, "chromeActiveProcesses"))
                    $root.perfetto.protos.ChromeActiveProcesses.encode(m.chromeActiveProcesses, w.uint32(394).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified TrackEvent message, length delimited. Does not implicitly {@link perfetto.protos.TrackEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrackEvent
             * @static
             * @param {perfetto.protos.ITrackEvent} message TrackEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrackEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrackEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrackEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrackEvent} TrackEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrackEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrackEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 3:
                        if (!(m.categoryIids && m.categoryIids.length))
                            m.categoryIids = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.categoryIids.push(r.uint64());
                        } else
                            m.categoryIids.push(r.uint64());
                        break;
                    case 22:
                        if (!(m.categories && m.categories.length))
                            m.categories = [];
                        m.categories.push(r.string());
                        break;
                    case 10:
                        m.nameIid = r.uint64();
                        break;
                    case 23:
                        m.name = r.string();
                        break;
                    case 9:
                        m.type = r.int32();
                        break;
                    case 11:
                        m.trackUuid = r.uint64();
                        break;
                    case 30:
                        m.counterValue = r.int64();
                        break;
                    case 44:
                        m.doubleCounterValue = r.double();
                        break;
                    case 31:
                        if (!(m.extraCounterTrackUuids && m.extraCounterTrackUuids.length))
                            m.extraCounterTrackUuids = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.extraCounterTrackUuids.push(r.uint64());
                        } else
                            m.extraCounterTrackUuids.push(r.uint64());
                        break;
                    case 12:
                        if (!(m.extraCounterValues && m.extraCounterValues.length))
                            m.extraCounterValues = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.extraCounterValues.push(r.int64());
                        } else
                            m.extraCounterValues.push(r.int64());
                        break;
                    case 45:
                        if (!(m.extraDoubleCounterTrackUuids && m.extraDoubleCounterTrackUuids.length))
                            m.extraDoubleCounterTrackUuids = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.extraDoubleCounterTrackUuids.push(r.uint64());
                        } else
                            m.extraDoubleCounterTrackUuids.push(r.uint64());
                        break;
                    case 46:
                        if (!(m.extraDoubleCounterValues && m.extraDoubleCounterValues.length))
                            m.extraDoubleCounterValues = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.extraDoubleCounterValues.push(r.double());
                        } else
                            m.extraDoubleCounterValues.push(r.double());
                        break;
                    case 36:
                        if (!(m.flowIdsOld && m.flowIdsOld.length))
                            m.flowIdsOld = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.flowIdsOld.push(r.uint64());
                        } else
                            m.flowIdsOld.push(r.uint64());
                        break;
                    case 47:
                        if (!(m.flowIds && m.flowIds.length))
                            m.flowIds = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.flowIds.push(r.fixed64());
                        } else
                            m.flowIds.push(r.fixed64());
                        break;
                    case 42:
                        if (!(m.terminatingFlowIdsOld && m.terminatingFlowIdsOld.length))
                            m.terminatingFlowIdsOld = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.terminatingFlowIdsOld.push(r.uint64());
                        } else
                            m.terminatingFlowIdsOld.push(r.uint64());
                        break;
                    case 48:
                        if (!(m.terminatingFlowIds && m.terminatingFlowIds.length))
                            m.terminatingFlowIds = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.terminatingFlowIds.push(r.fixed64());
                        } else
                            m.terminatingFlowIds.push(r.fixed64());
                        break;
                    case 4:
                        if (!(m.debugAnnotations && m.debugAnnotations.length))
                            m.debugAnnotations = [];
                        m.debugAnnotations.push($root.perfetto.protos.DebugAnnotation.decode(r, r.uint32()));
                        break;
                    case 5:
                        m.taskExecution = $root.perfetto.protos.TaskExecution.decode(r, r.uint32());
                        break;
                    case 21:
                        m.logMessage = $root.perfetto.protos.LogMessage.decode(r, r.uint32());
                        break;
                    case 24:
                        m.ccSchedulerState = $root.perfetto.protos.ChromeCompositorSchedulerState.decode(r, r.uint32());
                        break;
                    case 25:
                        m.chromeUserEvent = $root.perfetto.protos.ChromeUserEvent.decode(r, r.uint32());
                        break;
                    case 26:
                        m.chromeKeyedService = $root.perfetto.protos.ChromeKeyedService.decode(r, r.uint32());
                        break;
                    case 27:
                        m.chromeLegacyIpc = $root.perfetto.protos.ChromeLegacyIpc.decode(r, r.uint32());
                        break;
                    case 28:
                        m.chromeHistogramSample = $root.perfetto.protos.ChromeHistogramSample.decode(r, r.uint32());
                        break;
                    case 29:
                        m.chromeLatencyInfo = $root.perfetto.protos.ChromeLatencyInfo.decode(r, r.uint32());
                        break;
                    case 32:
                        m.chromeFrameReporter = $root.perfetto.protos.ChromeFrameReporter.decode(r, r.uint32());
                        break;
                    case 39:
                        m.chromeApplicationStateInfo = $root.perfetto.protos.ChromeApplicationStateInfo.decode(r, r.uint32());
                        break;
                    case 40:
                        m.chromeRendererSchedulerState = $root.perfetto.protos.ChromeRendererSchedulerState.decode(r, r.uint32());
                        break;
                    case 41:
                        m.chromeWindowHandleEventInfo = $root.perfetto.protos.ChromeWindowHandleEventInfo.decode(r, r.uint32());
                        break;
                    case 43:
                        m.chromeContentSettingsEventInfo = $root.perfetto.protos.ChromeContentSettingsEventInfo.decode(r, r.uint32());
                        break;
                    case 49:
                        m.chromeActiveProcesses = $root.perfetto.protos.ChromeActiveProcesses.decode(r, r.uint32());
                        break;
                    case 33:
                        m.sourceLocation = $root.perfetto.protos.SourceLocation.decode(r, r.uint32());
                        break;
                    case 34:
                        m.sourceLocationIid = r.uint64();
                        break;
                    case 35:
                        m.chromeMessagePump = $root.perfetto.protos.ChromeMessagePump.decode(r, r.uint32());
                        break;
                    case 38:
                        m.chromeMojoEventInfo = $root.perfetto.protos.ChromeMojoEventInfo.decode(r, r.uint32());
                        break;
                    case 1:
                        m.timestampDeltaUs = r.int64();
                        break;
                    case 16:
                        m.timestampAbsoluteUs = r.int64();
                        break;
                    case 2:
                        m.threadTimeDeltaUs = r.int64();
                        break;
                    case 17:
                        m.threadTimeAbsoluteUs = r.int64();
                        break;
                    case 8:
                        m.threadInstructionCountDelta = r.int64();
                        break;
                    case 20:
                        m.threadInstructionCountAbsolute = r.int64();
                        break;
                    case 6:
                        m.legacyEvent = $root.perfetto.protos.TrackEvent.LegacyEvent.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrackEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrackEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrackEvent} TrackEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrackEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrackEvent message.
             * @function verify
             * @memberof perfetto.protos.TrackEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrackEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                var p = {};
                if (m.categoryIids != null && m.hasOwnProperty("categoryIids")) {
                    if (!Array.isArray(m.categoryIids))
                        return "categoryIids: array expected";
                    for (var i = 0; i < m.categoryIids.length; ++i) {
                        if (!$util.isInteger(m.categoryIids[i]) && !(m.categoryIids[i] && $util.isInteger(m.categoryIids[i].low) && $util.isInteger(m.categoryIids[i].high)))
                            return "categoryIids: integer|Long[] expected";
                    }
                }
                if (m.categories != null && m.hasOwnProperty("categories")) {
                    if (!Array.isArray(m.categories))
                        return "categories: array expected";
                    for (var i = 0; i < m.categories.length; ++i) {
                        if (!$util.isString(m.categories[i]))
                            return "categories: string[] expected";
                    }
                }
                if (m.nameIid != null && m.hasOwnProperty("nameIid")) {
                    p.nameField = 1;
                    if (!$util.isInteger(m.nameIid) && !(m.nameIid && $util.isInteger(m.nameIid.low) && $util.isInteger(m.nameIid.high)))
                        return "nameIid: integer|Long expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (p.nameField === 1)
                        return "nameField: multiple values";
                    p.nameField = 1;
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    switch (m.type) {
                    default:
                        return "type: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                        break;
                    }
                }
                if (m.trackUuid != null && m.hasOwnProperty("trackUuid")) {
                    if (!$util.isInteger(m.trackUuid) && !(m.trackUuid && $util.isInteger(m.trackUuid.low) && $util.isInteger(m.trackUuid.high)))
                        return "trackUuid: integer|Long expected";
                }
                if (m.counterValue != null && m.hasOwnProperty("counterValue")) {
                    p.counterValueField = 1;
                    if (!$util.isInteger(m.counterValue) && !(m.counterValue && $util.isInteger(m.counterValue.low) && $util.isInteger(m.counterValue.high)))
                        return "counterValue: integer|Long expected";
                }
                if (m.doubleCounterValue != null && m.hasOwnProperty("doubleCounterValue")) {
                    if (p.counterValueField === 1)
                        return "counterValueField: multiple values";
                    p.counterValueField = 1;
                    if (typeof m.doubleCounterValue !== "number")
                        return "doubleCounterValue: number expected";
                }
                if (m.extraCounterTrackUuids != null && m.hasOwnProperty("extraCounterTrackUuids")) {
                    if (!Array.isArray(m.extraCounterTrackUuids))
                        return "extraCounterTrackUuids: array expected";
                    for (var i = 0; i < m.extraCounterTrackUuids.length; ++i) {
                        if (!$util.isInteger(m.extraCounterTrackUuids[i]) && !(m.extraCounterTrackUuids[i] && $util.isInteger(m.extraCounterTrackUuids[i].low) && $util.isInteger(m.extraCounterTrackUuids[i].high)))
                            return "extraCounterTrackUuids: integer|Long[] expected";
                    }
                }
                if (m.extraCounterValues != null && m.hasOwnProperty("extraCounterValues")) {
                    if (!Array.isArray(m.extraCounterValues))
                        return "extraCounterValues: array expected";
                    for (var i = 0; i < m.extraCounterValues.length; ++i) {
                        if (!$util.isInteger(m.extraCounterValues[i]) && !(m.extraCounterValues[i] && $util.isInteger(m.extraCounterValues[i].low) && $util.isInteger(m.extraCounterValues[i].high)))
                            return "extraCounterValues: integer|Long[] expected";
                    }
                }
                if (m.extraDoubleCounterTrackUuids != null && m.hasOwnProperty("extraDoubleCounterTrackUuids")) {
                    if (!Array.isArray(m.extraDoubleCounterTrackUuids))
                        return "extraDoubleCounterTrackUuids: array expected";
                    for (var i = 0; i < m.extraDoubleCounterTrackUuids.length; ++i) {
                        if (!$util.isInteger(m.extraDoubleCounterTrackUuids[i]) && !(m.extraDoubleCounterTrackUuids[i] && $util.isInteger(m.extraDoubleCounterTrackUuids[i].low) && $util.isInteger(m.extraDoubleCounterTrackUuids[i].high)))
                            return "extraDoubleCounterTrackUuids: integer|Long[] expected";
                    }
                }
                if (m.extraDoubleCounterValues != null && m.hasOwnProperty("extraDoubleCounterValues")) {
                    if (!Array.isArray(m.extraDoubleCounterValues))
                        return "extraDoubleCounterValues: array expected";
                    for (var i = 0; i < m.extraDoubleCounterValues.length; ++i) {
                        if (typeof m.extraDoubleCounterValues[i] !== "number")
                            return "extraDoubleCounterValues: number[] expected";
                    }
                }
                if (m.flowIdsOld != null && m.hasOwnProperty("flowIdsOld")) {
                    if (!Array.isArray(m.flowIdsOld))
                        return "flowIdsOld: array expected";
                    for (var i = 0; i < m.flowIdsOld.length; ++i) {
                        if (!$util.isInteger(m.flowIdsOld[i]) && !(m.flowIdsOld[i] && $util.isInteger(m.flowIdsOld[i].low) && $util.isInteger(m.flowIdsOld[i].high)))
                            return "flowIdsOld: integer|Long[] expected";
                    }
                }
                if (m.flowIds != null && m.hasOwnProperty("flowIds")) {
                    if (!Array.isArray(m.flowIds))
                        return "flowIds: array expected";
                    for (var i = 0; i < m.flowIds.length; ++i) {
                        if (!$util.isInteger(m.flowIds[i]) && !(m.flowIds[i] && $util.isInteger(m.flowIds[i].low) && $util.isInteger(m.flowIds[i].high)))
                            return "flowIds: integer|Long[] expected";
                    }
                }
                if (m.terminatingFlowIdsOld != null && m.hasOwnProperty("terminatingFlowIdsOld")) {
                    if (!Array.isArray(m.terminatingFlowIdsOld))
                        return "terminatingFlowIdsOld: array expected";
                    for (var i = 0; i < m.terminatingFlowIdsOld.length; ++i) {
                        if (!$util.isInteger(m.terminatingFlowIdsOld[i]) && !(m.terminatingFlowIdsOld[i] && $util.isInteger(m.terminatingFlowIdsOld[i].low) && $util.isInteger(m.terminatingFlowIdsOld[i].high)))
                            return "terminatingFlowIdsOld: integer|Long[] expected";
                    }
                }
                if (m.terminatingFlowIds != null && m.hasOwnProperty("terminatingFlowIds")) {
                    if (!Array.isArray(m.terminatingFlowIds))
                        return "terminatingFlowIds: array expected";
                    for (var i = 0; i < m.terminatingFlowIds.length; ++i) {
                        if (!$util.isInteger(m.terminatingFlowIds[i]) && !(m.terminatingFlowIds[i] && $util.isInteger(m.terminatingFlowIds[i].low) && $util.isInteger(m.terminatingFlowIds[i].high)))
                            return "terminatingFlowIds: integer|Long[] expected";
                    }
                }
                if (m.debugAnnotations != null && m.hasOwnProperty("debugAnnotations")) {
                    if (!Array.isArray(m.debugAnnotations))
                        return "debugAnnotations: array expected";
                    for (var i = 0; i < m.debugAnnotations.length; ++i) {
                        {
                            var e = $root.perfetto.protos.DebugAnnotation.verify(m.debugAnnotations[i]);
                            if (e)
                                return "debugAnnotations." + e;
                        }
                    }
                }
                if (m.taskExecution != null && m.hasOwnProperty("taskExecution")) {
                    {
                        var e = $root.perfetto.protos.TaskExecution.verify(m.taskExecution);
                        if (e)
                            return "taskExecution." + e;
                    }
                }
                if (m.logMessage != null && m.hasOwnProperty("logMessage")) {
                    {
                        var e = $root.perfetto.protos.LogMessage.verify(m.logMessage);
                        if (e)
                            return "logMessage." + e;
                    }
                }
                if (m.ccSchedulerState != null && m.hasOwnProperty("ccSchedulerState")) {
                    {
                        var e = $root.perfetto.protos.ChromeCompositorSchedulerState.verify(m.ccSchedulerState);
                        if (e)
                            return "ccSchedulerState." + e;
                    }
                }
                if (m.chromeUserEvent != null && m.hasOwnProperty("chromeUserEvent")) {
                    {
                        var e = $root.perfetto.protos.ChromeUserEvent.verify(m.chromeUserEvent);
                        if (e)
                            return "chromeUserEvent." + e;
                    }
                }
                if (m.chromeKeyedService != null && m.hasOwnProperty("chromeKeyedService")) {
                    {
                        var e = $root.perfetto.protos.ChromeKeyedService.verify(m.chromeKeyedService);
                        if (e)
                            return "chromeKeyedService." + e;
                    }
                }
                if (m.chromeLegacyIpc != null && m.hasOwnProperty("chromeLegacyIpc")) {
                    {
                        var e = $root.perfetto.protos.ChromeLegacyIpc.verify(m.chromeLegacyIpc);
                        if (e)
                            return "chromeLegacyIpc." + e;
                    }
                }
                if (m.chromeHistogramSample != null && m.hasOwnProperty("chromeHistogramSample")) {
                    {
                        var e = $root.perfetto.protos.ChromeHistogramSample.verify(m.chromeHistogramSample);
                        if (e)
                            return "chromeHistogramSample." + e;
                    }
                }
                if (m.chromeLatencyInfo != null && m.hasOwnProperty("chromeLatencyInfo")) {
                    {
                        var e = $root.perfetto.protos.ChromeLatencyInfo.verify(m.chromeLatencyInfo);
                        if (e)
                            return "chromeLatencyInfo." + e;
                    }
                }
                if (m.chromeFrameReporter != null && m.hasOwnProperty("chromeFrameReporter")) {
                    {
                        var e = $root.perfetto.protos.ChromeFrameReporter.verify(m.chromeFrameReporter);
                        if (e)
                            return "chromeFrameReporter." + e;
                    }
                }
                if (m.chromeApplicationStateInfo != null && m.hasOwnProperty("chromeApplicationStateInfo")) {
                    {
                        var e = $root.perfetto.protos.ChromeApplicationStateInfo.verify(m.chromeApplicationStateInfo);
                        if (e)
                            return "chromeApplicationStateInfo." + e;
                    }
                }
                if (m.chromeRendererSchedulerState != null && m.hasOwnProperty("chromeRendererSchedulerState")) {
                    {
                        var e = $root.perfetto.protos.ChromeRendererSchedulerState.verify(m.chromeRendererSchedulerState);
                        if (e)
                            return "chromeRendererSchedulerState." + e;
                    }
                }
                if (m.chromeWindowHandleEventInfo != null && m.hasOwnProperty("chromeWindowHandleEventInfo")) {
                    {
                        var e = $root.perfetto.protos.ChromeWindowHandleEventInfo.verify(m.chromeWindowHandleEventInfo);
                        if (e)
                            return "chromeWindowHandleEventInfo." + e;
                    }
                }
                if (m.chromeContentSettingsEventInfo != null && m.hasOwnProperty("chromeContentSettingsEventInfo")) {
                    {
                        var e = $root.perfetto.protos.ChromeContentSettingsEventInfo.verify(m.chromeContentSettingsEventInfo);
                        if (e)
                            return "chromeContentSettingsEventInfo." + e;
                    }
                }
                if (m.chromeActiveProcesses != null && m.hasOwnProperty("chromeActiveProcesses")) {
                    {
                        var e = $root.perfetto.protos.ChromeActiveProcesses.verify(m.chromeActiveProcesses);
                        if (e)
                            return "chromeActiveProcesses." + e;
                    }
                }
                if (m.sourceLocation != null && m.hasOwnProperty("sourceLocation")) {
                    p.sourceLocationField = 1;
                    {
                        var e = $root.perfetto.protos.SourceLocation.verify(m.sourceLocation);
                        if (e)
                            return "sourceLocation." + e;
                    }
                }
                if (m.sourceLocationIid != null && m.hasOwnProperty("sourceLocationIid")) {
                    if (p.sourceLocationField === 1)
                        return "sourceLocationField: multiple values";
                    p.sourceLocationField = 1;
                    if (!$util.isInteger(m.sourceLocationIid) && !(m.sourceLocationIid && $util.isInteger(m.sourceLocationIid.low) && $util.isInteger(m.sourceLocationIid.high)))
                        return "sourceLocationIid: integer|Long expected";
                }
                if (m.chromeMessagePump != null && m.hasOwnProperty("chromeMessagePump")) {
                    {
                        var e = $root.perfetto.protos.ChromeMessagePump.verify(m.chromeMessagePump);
                        if (e)
                            return "chromeMessagePump." + e;
                    }
                }
                if (m.chromeMojoEventInfo != null && m.hasOwnProperty("chromeMojoEventInfo")) {
                    {
                        var e = $root.perfetto.protos.ChromeMojoEventInfo.verify(m.chromeMojoEventInfo);
                        if (e)
                            return "chromeMojoEventInfo." + e;
                    }
                }
                if (m.timestampDeltaUs != null && m.hasOwnProperty("timestampDeltaUs")) {
                    p.timestamp = 1;
                    if (!$util.isInteger(m.timestampDeltaUs) && !(m.timestampDeltaUs && $util.isInteger(m.timestampDeltaUs.low) && $util.isInteger(m.timestampDeltaUs.high)))
                        return "timestampDeltaUs: integer|Long expected";
                }
                if (m.timestampAbsoluteUs != null && m.hasOwnProperty("timestampAbsoluteUs")) {
                    if (p.timestamp === 1)
                        return "timestamp: multiple values";
                    p.timestamp = 1;
                    if (!$util.isInteger(m.timestampAbsoluteUs) && !(m.timestampAbsoluteUs && $util.isInteger(m.timestampAbsoluteUs.low) && $util.isInteger(m.timestampAbsoluteUs.high)))
                        return "timestampAbsoluteUs: integer|Long expected";
                }
                if (m.threadTimeDeltaUs != null && m.hasOwnProperty("threadTimeDeltaUs")) {
                    p.threadTime = 1;
                    if (!$util.isInteger(m.threadTimeDeltaUs) && !(m.threadTimeDeltaUs && $util.isInteger(m.threadTimeDeltaUs.low) && $util.isInteger(m.threadTimeDeltaUs.high)))
                        return "threadTimeDeltaUs: integer|Long expected";
                }
                if (m.threadTimeAbsoluteUs != null && m.hasOwnProperty("threadTimeAbsoluteUs")) {
                    if (p.threadTime === 1)
                        return "threadTime: multiple values";
                    p.threadTime = 1;
                    if (!$util.isInteger(m.threadTimeAbsoluteUs) && !(m.threadTimeAbsoluteUs && $util.isInteger(m.threadTimeAbsoluteUs.low) && $util.isInteger(m.threadTimeAbsoluteUs.high)))
                        return "threadTimeAbsoluteUs: integer|Long expected";
                }
                if (m.threadInstructionCountDelta != null && m.hasOwnProperty("threadInstructionCountDelta")) {
                    p.threadInstructionCount = 1;
                    if (!$util.isInteger(m.threadInstructionCountDelta) && !(m.threadInstructionCountDelta && $util.isInteger(m.threadInstructionCountDelta.low) && $util.isInteger(m.threadInstructionCountDelta.high)))
                        return "threadInstructionCountDelta: integer|Long expected";
                }
                if (m.threadInstructionCountAbsolute != null && m.hasOwnProperty("threadInstructionCountAbsolute")) {
                    if (p.threadInstructionCount === 1)
                        return "threadInstructionCount: multiple values";
                    p.threadInstructionCount = 1;
                    if (!$util.isInteger(m.threadInstructionCountAbsolute) && !(m.threadInstructionCountAbsolute && $util.isInteger(m.threadInstructionCountAbsolute.low) && $util.isInteger(m.threadInstructionCountAbsolute.high)))
                        return "threadInstructionCountAbsolute: integer|Long expected";
                }
                if (m.legacyEvent != null && m.hasOwnProperty("legacyEvent")) {
                    {
                        var e = $root.perfetto.protos.TrackEvent.LegacyEvent.verify(m.legacyEvent);
                        if (e)
                            return "legacyEvent." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a TrackEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrackEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrackEvent} TrackEvent
             */
            TrackEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrackEvent)
                    return d;
                var m = new $root.perfetto.protos.TrackEvent();
                if (d.categoryIids) {
                    if (!Array.isArray(d.categoryIids))
                        throw TypeError(".perfetto.protos.TrackEvent.categoryIids: array expected");
                    m.categoryIids = [];
                    for (var i = 0; i < d.categoryIids.length; ++i) {
                        if ($util.Long)
                            (m.categoryIids[i] = $util.Long.fromValue(d.categoryIids[i])).unsigned = true;
                        else if (typeof d.categoryIids[i] === "string")
                            m.categoryIids[i] = parseInt(d.categoryIids[i], 10);
                        else if (typeof d.categoryIids[i] === "number")
                            m.categoryIids[i] = d.categoryIids[i];
                        else if (typeof d.categoryIids[i] === "object")
                            m.categoryIids[i] = new $util.LongBits(d.categoryIids[i].low >>> 0, d.categoryIids[i].high >>> 0).toNumber(true);
                    }
                }
                if (d.categories) {
                    if (!Array.isArray(d.categories))
                        throw TypeError(".perfetto.protos.TrackEvent.categories: array expected");
                    m.categories = [];
                    for (var i = 0; i < d.categories.length; ++i) {
                        m.categories[i] = String(d.categories[i]);
                    }
                }
                if (d.nameIid != null) {
                    if ($util.Long)
                        (m.nameIid = $util.Long.fromValue(d.nameIid)).unsigned = true;
                    else if (typeof d.nameIid === "string")
                        m.nameIid = parseInt(d.nameIid, 10);
                    else if (typeof d.nameIid === "number")
                        m.nameIid = d.nameIid;
                    else if (typeof d.nameIid === "object")
                        m.nameIid = new $util.LongBits(d.nameIid.low >>> 0, d.nameIid.high >>> 0).toNumber(true);
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                switch (d.type) {
                case "TYPE_UNSPECIFIED":
                case 0:
                    m.type = 0;
                    break;
                case "TYPE_SLICE_BEGIN":
                case 1:
                    m.type = 1;
                    break;
                case "TYPE_SLICE_END":
                case 2:
                    m.type = 2;
                    break;
                case "TYPE_INSTANT":
                case 3:
                    m.type = 3;
                    break;
                case "TYPE_COUNTER":
                case 4:
                    m.type = 4;
                    break;
                }
                if (d.trackUuid != null) {
                    if ($util.Long)
                        (m.trackUuid = $util.Long.fromValue(d.trackUuid)).unsigned = true;
                    else if (typeof d.trackUuid === "string")
                        m.trackUuid = parseInt(d.trackUuid, 10);
                    else if (typeof d.trackUuid === "number")
                        m.trackUuid = d.trackUuid;
                    else if (typeof d.trackUuid === "object")
                        m.trackUuid = new $util.LongBits(d.trackUuid.low >>> 0, d.trackUuid.high >>> 0).toNumber(true);
                }
                if (d.counterValue != null) {
                    if ($util.Long)
                        (m.counterValue = $util.Long.fromValue(d.counterValue)).unsigned = false;
                    else if (typeof d.counterValue === "string")
                        m.counterValue = parseInt(d.counterValue, 10);
                    else if (typeof d.counterValue === "number")
                        m.counterValue = d.counterValue;
                    else if (typeof d.counterValue === "object")
                        m.counterValue = new $util.LongBits(d.counterValue.low >>> 0, d.counterValue.high >>> 0).toNumber();
                }
                if (d.doubleCounterValue != null) {
                    m.doubleCounterValue = Number(d.doubleCounterValue);
                }
                if (d.extraCounterTrackUuids) {
                    if (!Array.isArray(d.extraCounterTrackUuids))
                        throw TypeError(".perfetto.protos.TrackEvent.extraCounterTrackUuids: array expected");
                    m.extraCounterTrackUuids = [];
                    for (var i = 0; i < d.extraCounterTrackUuids.length; ++i) {
                        if ($util.Long)
                            (m.extraCounterTrackUuids[i] = $util.Long.fromValue(d.extraCounterTrackUuids[i])).unsigned = true;
                        else if (typeof d.extraCounterTrackUuids[i] === "string")
                            m.extraCounterTrackUuids[i] = parseInt(d.extraCounterTrackUuids[i], 10);
                        else if (typeof d.extraCounterTrackUuids[i] === "number")
                            m.extraCounterTrackUuids[i] = d.extraCounterTrackUuids[i];
                        else if (typeof d.extraCounterTrackUuids[i] === "object")
                            m.extraCounterTrackUuids[i] = new $util.LongBits(d.extraCounterTrackUuids[i].low >>> 0, d.extraCounterTrackUuids[i].high >>> 0).toNumber(true);
                    }
                }
                if (d.extraCounterValues) {
                    if (!Array.isArray(d.extraCounterValues))
                        throw TypeError(".perfetto.protos.TrackEvent.extraCounterValues: array expected");
                    m.extraCounterValues = [];
                    for (var i = 0; i < d.extraCounterValues.length; ++i) {
                        if ($util.Long)
                            (m.extraCounterValues[i] = $util.Long.fromValue(d.extraCounterValues[i])).unsigned = false;
                        else if (typeof d.extraCounterValues[i] === "string")
                            m.extraCounterValues[i] = parseInt(d.extraCounterValues[i], 10);
                        else if (typeof d.extraCounterValues[i] === "number")
                            m.extraCounterValues[i] = d.extraCounterValues[i];
                        else if (typeof d.extraCounterValues[i] === "object")
                            m.extraCounterValues[i] = new $util.LongBits(d.extraCounterValues[i].low >>> 0, d.extraCounterValues[i].high >>> 0).toNumber();
                    }
                }
                if (d.extraDoubleCounterTrackUuids) {
                    if (!Array.isArray(d.extraDoubleCounterTrackUuids))
                        throw TypeError(".perfetto.protos.TrackEvent.extraDoubleCounterTrackUuids: array expected");
                    m.extraDoubleCounterTrackUuids = [];
                    for (var i = 0; i < d.extraDoubleCounterTrackUuids.length; ++i) {
                        if ($util.Long)
                            (m.extraDoubleCounterTrackUuids[i] = $util.Long.fromValue(d.extraDoubleCounterTrackUuids[i])).unsigned = true;
                        else if (typeof d.extraDoubleCounterTrackUuids[i] === "string")
                            m.extraDoubleCounterTrackUuids[i] = parseInt(d.extraDoubleCounterTrackUuids[i], 10);
                        else if (typeof d.extraDoubleCounterTrackUuids[i] === "number")
                            m.extraDoubleCounterTrackUuids[i] = d.extraDoubleCounterTrackUuids[i];
                        else if (typeof d.extraDoubleCounterTrackUuids[i] === "object")
                            m.extraDoubleCounterTrackUuids[i] = new $util.LongBits(d.extraDoubleCounterTrackUuids[i].low >>> 0, d.extraDoubleCounterTrackUuids[i].high >>> 0).toNumber(true);
                    }
                }
                if (d.extraDoubleCounterValues) {
                    if (!Array.isArray(d.extraDoubleCounterValues))
                        throw TypeError(".perfetto.protos.TrackEvent.extraDoubleCounterValues: array expected");
                    m.extraDoubleCounterValues = [];
                    for (var i = 0; i < d.extraDoubleCounterValues.length; ++i) {
                        m.extraDoubleCounterValues[i] = Number(d.extraDoubleCounterValues[i]);
                    }
                }
                if (d.flowIdsOld) {
                    if (!Array.isArray(d.flowIdsOld))
                        throw TypeError(".perfetto.protos.TrackEvent.flowIdsOld: array expected");
                    m.flowIdsOld = [];
                    for (var i = 0; i < d.flowIdsOld.length; ++i) {
                        if ($util.Long)
                            (m.flowIdsOld[i] = $util.Long.fromValue(d.flowIdsOld[i])).unsigned = true;
                        else if (typeof d.flowIdsOld[i] === "string")
                            m.flowIdsOld[i] = parseInt(d.flowIdsOld[i], 10);
                        else if (typeof d.flowIdsOld[i] === "number")
                            m.flowIdsOld[i] = d.flowIdsOld[i];
                        else if (typeof d.flowIdsOld[i] === "object")
                            m.flowIdsOld[i] = new $util.LongBits(d.flowIdsOld[i].low >>> 0, d.flowIdsOld[i].high >>> 0).toNumber(true);
                    }
                }
                if (d.flowIds) {
                    if (!Array.isArray(d.flowIds))
                        throw TypeError(".perfetto.protos.TrackEvent.flowIds: array expected");
                    m.flowIds = [];
                    for (var i = 0; i < d.flowIds.length; ++i) {
                        if ($util.Long)
                            (m.flowIds[i] = $util.Long.fromValue(d.flowIds[i])).unsigned = false;
                        else if (typeof d.flowIds[i] === "string")
                            m.flowIds[i] = parseInt(d.flowIds[i], 10);
                        else if (typeof d.flowIds[i] === "number")
                            m.flowIds[i] = d.flowIds[i];
                        else if (typeof d.flowIds[i] === "object")
                            m.flowIds[i] = new $util.LongBits(d.flowIds[i].low >>> 0, d.flowIds[i].high >>> 0).toNumber();
                    }
                }
                if (d.terminatingFlowIdsOld) {
                    if (!Array.isArray(d.terminatingFlowIdsOld))
                        throw TypeError(".perfetto.protos.TrackEvent.terminatingFlowIdsOld: array expected");
                    m.terminatingFlowIdsOld = [];
                    for (var i = 0; i < d.terminatingFlowIdsOld.length; ++i) {
                        if ($util.Long)
                            (m.terminatingFlowIdsOld[i] = $util.Long.fromValue(d.terminatingFlowIdsOld[i])).unsigned = true;
                        else if (typeof d.terminatingFlowIdsOld[i] === "string")
                            m.terminatingFlowIdsOld[i] = parseInt(d.terminatingFlowIdsOld[i], 10);
                        else if (typeof d.terminatingFlowIdsOld[i] === "number")
                            m.terminatingFlowIdsOld[i] = d.terminatingFlowIdsOld[i];
                        else if (typeof d.terminatingFlowIdsOld[i] === "object")
                            m.terminatingFlowIdsOld[i] = new $util.LongBits(d.terminatingFlowIdsOld[i].low >>> 0, d.terminatingFlowIdsOld[i].high >>> 0).toNumber(true);
                    }
                }
                if (d.terminatingFlowIds) {
                    if (!Array.isArray(d.terminatingFlowIds))
                        throw TypeError(".perfetto.protos.TrackEvent.terminatingFlowIds: array expected");
                    m.terminatingFlowIds = [];
                    for (var i = 0; i < d.terminatingFlowIds.length; ++i) {
                        if ($util.Long)
                            (m.terminatingFlowIds[i] = $util.Long.fromValue(d.terminatingFlowIds[i])).unsigned = false;
                        else if (typeof d.terminatingFlowIds[i] === "string")
                            m.terminatingFlowIds[i] = parseInt(d.terminatingFlowIds[i], 10);
                        else if (typeof d.terminatingFlowIds[i] === "number")
                            m.terminatingFlowIds[i] = d.terminatingFlowIds[i];
                        else if (typeof d.terminatingFlowIds[i] === "object")
                            m.terminatingFlowIds[i] = new $util.LongBits(d.terminatingFlowIds[i].low >>> 0, d.terminatingFlowIds[i].high >>> 0).toNumber();
                    }
                }
                if (d.debugAnnotations) {
                    if (!Array.isArray(d.debugAnnotations))
                        throw TypeError(".perfetto.protos.TrackEvent.debugAnnotations: array expected");
                    m.debugAnnotations = [];
                    for (var i = 0; i < d.debugAnnotations.length; ++i) {
                        if (typeof d.debugAnnotations[i] !== "object")
                            throw TypeError(".perfetto.protos.TrackEvent.debugAnnotations: object expected");
                        m.debugAnnotations[i] = $root.perfetto.protos.DebugAnnotation.fromObject(d.debugAnnotations[i]);
                    }
                }
                if (d.taskExecution != null) {
                    if (typeof d.taskExecution !== "object")
                        throw TypeError(".perfetto.protos.TrackEvent.taskExecution: object expected");
                    m.taskExecution = $root.perfetto.protos.TaskExecution.fromObject(d.taskExecution);
                }
                if (d.logMessage != null) {
                    if (typeof d.logMessage !== "object")
                        throw TypeError(".perfetto.protos.TrackEvent.logMessage: object expected");
                    m.logMessage = $root.perfetto.protos.LogMessage.fromObject(d.logMessage);
                }
                if (d.ccSchedulerState != null) {
                    if (typeof d.ccSchedulerState !== "object")
                        throw TypeError(".perfetto.protos.TrackEvent.ccSchedulerState: object expected");
                    m.ccSchedulerState = $root.perfetto.protos.ChromeCompositorSchedulerState.fromObject(d.ccSchedulerState);
                }
                if (d.chromeUserEvent != null) {
                    if (typeof d.chromeUserEvent !== "object")
                        throw TypeError(".perfetto.protos.TrackEvent.chromeUserEvent: object expected");
                    m.chromeUserEvent = $root.perfetto.protos.ChromeUserEvent.fromObject(d.chromeUserEvent);
                }
                if (d.chromeKeyedService != null) {
                    if (typeof d.chromeKeyedService !== "object")
                        throw TypeError(".perfetto.protos.TrackEvent.chromeKeyedService: object expected");
                    m.chromeKeyedService = $root.perfetto.protos.ChromeKeyedService.fromObject(d.chromeKeyedService);
                }
                if (d.chromeLegacyIpc != null) {
                    if (typeof d.chromeLegacyIpc !== "object")
                        throw TypeError(".perfetto.protos.TrackEvent.chromeLegacyIpc: object expected");
                    m.chromeLegacyIpc = $root.perfetto.protos.ChromeLegacyIpc.fromObject(d.chromeLegacyIpc);
                }
                if (d.chromeHistogramSample != null) {
                    if (typeof d.chromeHistogramSample !== "object")
                        throw TypeError(".perfetto.protos.TrackEvent.chromeHistogramSample: object expected");
                    m.chromeHistogramSample = $root.perfetto.protos.ChromeHistogramSample.fromObject(d.chromeHistogramSample);
                }
                if (d.chromeLatencyInfo != null) {
                    if (typeof d.chromeLatencyInfo !== "object")
                        throw TypeError(".perfetto.protos.TrackEvent.chromeLatencyInfo: object expected");
                    m.chromeLatencyInfo = $root.perfetto.protos.ChromeLatencyInfo.fromObject(d.chromeLatencyInfo);
                }
                if (d.chromeFrameReporter != null) {
                    if (typeof d.chromeFrameReporter !== "object")
                        throw TypeError(".perfetto.protos.TrackEvent.chromeFrameReporter: object expected");
                    m.chromeFrameReporter = $root.perfetto.protos.ChromeFrameReporter.fromObject(d.chromeFrameReporter);
                }
                if (d.chromeApplicationStateInfo != null) {
                    if (typeof d.chromeApplicationStateInfo !== "object")
                        throw TypeError(".perfetto.protos.TrackEvent.chromeApplicationStateInfo: object expected");
                    m.chromeApplicationStateInfo = $root.perfetto.protos.ChromeApplicationStateInfo.fromObject(d.chromeApplicationStateInfo);
                }
                if (d.chromeRendererSchedulerState != null) {
                    if (typeof d.chromeRendererSchedulerState !== "object")
                        throw TypeError(".perfetto.protos.TrackEvent.chromeRendererSchedulerState: object expected");
                    m.chromeRendererSchedulerState = $root.perfetto.protos.ChromeRendererSchedulerState.fromObject(d.chromeRendererSchedulerState);
                }
                if (d.chromeWindowHandleEventInfo != null) {
                    if (typeof d.chromeWindowHandleEventInfo !== "object")
                        throw TypeError(".perfetto.protos.TrackEvent.chromeWindowHandleEventInfo: object expected");
                    m.chromeWindowHandleEventInfo = $root.perfetto.protos.ChromeWindowHandleEventInfo.fromObject(d.chromeWindowHandleEventInfo);
                }
                if (d.chromeContentSettingsEventInfo != null) {
                    if (typeof d.chromeContentSettingsEventInfo !== "object")
                        throw TypeError(".perfetto.protos.TrackEvent.chromeContentSettingsEventInfo: object expected");
                    m.chromeContentSettingsEventInfo = $root.perfetto.protos.ChromeContentSettingsEventInfo.fromObject(d.chromeContentSettingsEventInfo);
                }
                if (d.chromeActiveProcesses != null) {
                    if (typeof d.chromeActiveProcesses !== "object")
                        throw TypeError(".perfetto.protos.TrackEvent.chromeActiveProcesses: object expected");
                    m.chromeActiveProcesses = $root.perfetto.protos.ChromeActiveProcesses.fromObject(d.chromeActiveProcesses);
                }
                if (d.sourceLocation != null) {
                    if (typeof d.sourceLocation !== "object")
                        throw TypeError(".perfetto.protos.TrackEvent.sourceLocation: object expected");
                    m.sourceLocation = $root.perfetto.protos.SourceLocation.fromObject(d.sourceLocation);
                }
                if (d.sourceLocationIid != null) {
                    if ($util.Long)
                        (m.sourceLocationIid = $util.Long.fromValue(d.sourceLocationIid)).unsigned = true;
                    else if (typeof d.sourceLocationIid === "string")
                        m.sourceLocationIid = parseInt(d.sourceLocationIid, 10);
                    else if (typeof d.sourceLocationIid === "number")
                        m.sourceLocationIid = d.sourceLocationIid;
                    else if (typeof d.sourceLocationIid === "object")
                        m.sourceLocationIid = new $util.LongBits(d.sourceLocationIid.low >>> 0, d.sourceLocationIid.high >>> 0).toNumber(true);
                }
                if (d.chromeMessagePump != null) {
                    if (typeof d.chromeMessagePump !== "object")
                        throw TypeError(".perfetto.protos.TrackEvent.chromeMessagePump: object expected");
                    m.chromeMessagePump = $root.perfetto.protos.ChromeMessagePump.fromObject(d.chromeMessagePump);
                }
                if (d.chromeMojoEventInfo != null) {
                    if (typeof d.chromeMojoEventInfo !== "object")
                        throw TypeError(".perfetto.protos.TrackEvent.chromeMojoEventInfo: object expected");
                    m.chromeMojoEventInfo = $root.perfetto.protos.ChromeMojoEventInfo.fromObject(d.chromeMojoEventInfo);
                }
                if (d.timestampDeltaUs != null) {
                    if ($util.Long)
                        (m.timestampDeltaUs = $util.Long.fromValue(d.timestampDeltaUs)).unsigned = false;
                    else if (typeof d.timestampDeltaUs === "string")
                        m.timestampDeltaUs = parseInt(d.timestampDeltaUs, 10);
                    else if (typeof d.timestampDeltaUs === "number")
                        m.timestampDeltaUs = d.timestampDeltaUs;
                    else if (typeof d.timestampDeltaUs === "object")
                        m.timestampDeltaUs = new $util.LongBits(d.timestampDeltaUs.low >>> 0, d.timestampDeltaUs.high >>> 0).toNumber();
                }
                if (d.timestampAbsoluteUs != null) {
                    if ($util.Long)
                        (m.timestampAbsoluteUs = $util.Long.fromValue(d.timestampAbsoluteUs)).unsigned = false;
                    else if (typeof d.timestampAbsoluteUs === "string")
                        m.timestampAbsoluteUs = parseInt(d.timestampAbsoluteUs, 10);
                    else if (typeof d.timestampAbsoluteUs === "number")
                        m.timestampAbsoluteUs = d.timestampAbsoluteUs;
                    else if (typeof d.timestampAbsoluteUs === "object")
                        m.timestampAbsoluteUs = new $util.LongBits(d.timestampAbsoluteUs.low >>> 0, d.timestampAbsoluteUs.high >>> 0).toNumber();
                }
                if (d.threadTimeDeltaUs != null) {
                    if ($util.Long)
                        (m.threadTimeDeltaUs = $util.Long.fromValue(d.threadTimeDeltaUs)).unsigned = false;
                    else if (typeof d.threadTimeDeltaUs === "string")
                        m.threadTimeDeltaUs = parseInt(d.threadTimeDeltaUs, 10);
                    else if (typeof d.threadTimeDeltaUs === "number")
                        m.threadTimeDeltaUs = d.threadTimeDeltaUs;
                    else if (typeof d.threadTimeDeltaUs === "object")
                        m.threadTimeDeltaUs = new $util.LongBits(d.threadTimeDeltaUs.low >>> 0, d.threadTimeDeltaUs.high >>> 0).toNumber();
                }
                if (d.threadTimeAbsoluteUs != null) {
                    if ($util.Long)
                        (m.threadTimeAbsoluteUs = $util.Long.fromValue(d.threadTimeAbsoluteUs)).unsigned = false;
                    else if (typeof d.threadTimeAbsoluteUs === "string")
                        m.threadTimeAbsoluteUs = parseInt(d.threadTimeAbsoluteUs, 10);
                    else if (typeof d.threadTimeAbsoluteUs === "number")
                        m.threadTimeAbsoluteUs = d.threadTimeAbsoluteUs;
                    else if (typeof d.threadTimeAbsoluteUs === "object")
                        m.threadTimeAbsoluteUs = new $util.LongBits(d.threadTimeAbsoluteUs.low >>> 0, d.threadTimeAbsoluteUs.high >>> 0).toNumber();
                }
                if (d.threadInstructionCountDelta != null) {
                    if ($util.Long)
                        (m.threadInstructionCountDelta = $util.Long.fromValue(d.threadInstructionCountDelta)).unsigned = false;
                    else if (typeof d.threadInstructionCountDelta === "string")
                        m.threadInstructionCountDelta = parseInt(d.threadInstructionCountDelta, 10);
                    else if (typeof d.threadInstructionCountDelta === "number")
                        m.threadInstructionCountDelta = d.threadInstructionCountDelta;
                    else if (typeof d.threadInstructionCountDelta === "object")
                        m.threadInstructionCountDelta = new $util.LongBits(d.threadInstructionCountDelta.low >>> 0, d.threadInstructionCountDelta.high >>> 0).toNumber();
                }
                if (d.threadInstructionCountAbsolute != null) {
                    if ($util.Long)
                        (m.threadInstructionCountAbsolute = $util.Long.fromValue(d.threadInstructionCountAbsolute)).unsigned = false;
                    else if (typeof d.threadInstructionCountAbsolute === "string")
                        m.threadInstructionCountAbsolute = parseInt(d.threadInstructionCountAbsolute, 10);
                    else if (typeof d.threadInstructionCountAbsolute === "number")
                        m.threadInstructionCountAbsolute = d.threadInstructionCountAbsolute;
                    else if (typeof d.threadInstructionCountAbsolute === "object")
                        m.threadInstructionCountAbsolute = new $util.LongBits(d.threadInstructionCountAbsolute.low >>> 0, d.threadInstructionCountAbsolute.high >>> 0).toNumber();
                }
                if (d.legacyEvent != null) {
                    if (typeof d.legacyEvent !== "object")
                        throw TypeError(".perfetto.protos.TrackEvent.legacyEvent: object expected");
                    m.legacyEvent = $root.perfetto.protos.TrackEvent.LegacyEvent.fromObject(d.legacyEvent);
                }
                return m;
            };

            /**
             * Creates a plain object from a TrackEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrackEvent
             * @static
             * @param {perfetto.protos.TrackEvent} m TrackEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrackEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.categoryIids = [];
                    d.debugAnnotations = [];
                    d.extraCounterValues = [];
                    d.categories = [];
                    d.extraCounterTrackUuids = [];
                    d.flowIdsOld = [];
                    d.terminatingFlowIdsOld = [];
                    d.extraDoubleCounterTrackUuids = [];
                    d.extraDoubleCounterValues = [];
                    d.flowIds = [];
                    d.terminatingFlowIds = [];
                }
                if (o.defaults) {
                    d.taskExecution = null;
                    d.legacyEvent = null;
                    d.type = o.enums === String ? "TYPE_UNSPECIFIED" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.trackUuid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.trackUuid = o.longs === String ? "0" : 0;
                    d.logMessage = null;
                    d.ccSchedulerState = null;
                    d.chromeUserEvent = null;
                    d.chromeKeyedService = null;
                    d.chromeLegacyIpc = null;
                    d.chromeHistogramSample = null;
                    d.chromeLatencyInfo = null;
                    d.chromeFrameReporter = null;
                    d.chromeMessagePump = null;
                    d.chromeMojoEventInfo = null;
                    d.chromeApplicationStateInfo = null;
                    d.chromeRendererSchedulerState = null;
                    d.chromeWindowHandleEventInfo = null;
                    d.chromeContentSettingsEventInfo = null;
                    d.chromeActiveProcesses = null;
                }
                if (m.timestampDeltaUs != null && m.hasOwnProperty("timestampDeltaUs")) {
                    if (typeof m.timestampDeltaUs === "number")
                        d.timestampDeltaUs = o.longs === String ? String(m.timestampDeltaUs) : m.timestampDeltaUs;
                    else
                        d.timestampDeltaUs = o.longs === String ? $util.Long.prototype.toString.call(m.timestampDeltaUs) : o.longs === Number ? new $util.LongBits(m.timestampDeltaUs.low >>> 0, m.timestampDeltaUs.high >>> 0).toNumber() : m.timestampDeltaUs;
                    if (o.oneofs)
                        d.timestamp = "timestampDeltaUs";
                }
                if (m.threadTimeDeltaUs != null && m.hasOwnProperty("threadTimeDeltaUs")) {
                    if (typeof m.threadTimeDeltaUs === "number")
                        d.threadTimeDeltaUs = o.longs === String ? String(m.threadTimeDeltaUs) : m.threadTimeDeltaUs;
                    else
                        d.threadTimeDeltaUs = o.longs === String ? $util.Long.prototype.toString.call(m.threadTimeDeltaUs) : o.longs === Number ? new $util.LongBits(m.threadTimeDeltaUs.low >>> 0, m.threadTimeDeltaUs.high >>> 0).toNumber() : m.threadTimeDeltaUs;
                    if (o.oneofs)
                        d.threadTime = "threadTimeDeltaUs";
                }
                if (m.categoryIids && m.categoryIids.length) {
                    d.categoryIids = [];
                    for (var j = 0; j < m.categoryIids.length; ++j) {
                        if (typeof m.categoryIids[j] === "number")
                            d.categoryIids[j] = o.longs === String ? String(m.categoryIids[j]) : m.categoryIids[j];
                        else
                            d.categoryIids[j] = o.longs === String ? $util.Long.prototype.toString.call(m.categoryIids[j]) : o.longs === Number ? new $util.LongBits(m.categoryIids[j].low >>> 0, m.categoryIids[j].high >>> 0).toNumber(true) : m.categoryIids[j];
                    }
                }
                if (m.debugAnnotations && m.debugAnnotations.length) {
                    d.debugAnnotations = [];
                    for (var j = 0; j < m.debugAnnotations.length; ++j) {
                        d.debugAnnotations[j] = $root.perfetto.protos.DebugAnnotation.toObject(m.debugAnnotations[j], o);
                    }
                }
                if (m.taskExecution != null && m.hasOwnProperty("taskExecution")) {
                    d.taskExecution = $root.perfetto.protos.TaskExecution.toObject(m.taskExecution, o);
                }
                if (m.legacyEvent != null && m.hasOwnProperty("legacyEvent")) {
                    d.legacyEvent = $root.perfetto.protos.TrackEvent.LegacyEvent.toObject(m.legacyEvent, o);
                }
                if (m.threadInstructionCountDelta != null && m.hasOwnProperty("threadInstructionCountDelta")) {
                    if (typeof m.threadInstructionCountDelta === "number")
                        d.threadInstructionCountDelta = o.longs === String ? String(m.threadInstructionCountDelta) : m.threadInstructionCountDelta;
                    else
                        d.threadInstructionCountDelta = o.longs === String ? $util.Long.prototype.toString.call(m.threadInstructionCountDelta) : o.longs === Number ? new $util.LongBits(m.threadInstructionCountDelta.low >>> 0, m.threadInstructionCountDelta.high >>> 0).toNumber() : m.threadInstructionCountDelta;
                    if (o.oneofs)
                        d.threadInstructionCount = "threadInstructionCountDelta";
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    d.type = o.enums === String ? $root.perfetto.protos.TrackEvent.Type[m.type] : m.type;
                }
                if (m.nameIid != null && m.hasOwnProperty("nameIid")) {
                    if (typeof m.nameIid === "number")
                        d.nameIid = o.longs === String ? String(m.nameIid) : m.nameIid;
                    else
                        d.nameIid = o.longs === String ? $util.Long.prototype.toString.call(m.nameIid) : o.longs === Number ? new $util.LongBits(m.nameIid.low >>> 0, m.nameIid.high >>> 0).toNumber(true) : m.nameIid;
                    if (o.oneofs)
                        d.nameField = "nameIid";
                }
                if (m.trackUuid != null && m.hasOwnProperty("trackUuid")) {
                    if (typeof m.trackUuid === "number")
                        d.trackUuid = o.longs === String ? String(m.trackUuid) : m.trackUuid;
                    else
                        d.trackUuid = o.longs === String ? $util.Long.prototype.toString.call(m.trackUuid) : o.longs === Number ? new $util.LongBits(m.trackUuid.low >>> 0, m.trackUuid.high >>> 0).toNumber(true) : m.trackUuid;
                }
                if (m.extraCounterValues && m.extraCounterValues.length) {
                    d.extraCounterValues = [];
                    for (var j = 0; j < m.extraCounterValues.length; ++j) {
                        if (typeof m.extraCounterValues[j] === "number")
                            d.extraCounterValues[j] = o.longs === String ? String(m.extraCounterValues[j]) : m.extraCounterValues[j];
                        else
                            d.extraCounterValues[j] = o.longs === String ? $util.Long.prototype.toString.call(m.extraCounterValues[j]) : o.longs === Number ? new $util.LongBits(m.extraCounterValues[j].low >>> 0, m.extraCounterValues[j].high >>> 0).toNumber() : m.extraCounterValues[j];
                    }
                }
                if (m.timestampAbsoluteUs != null && m.hasOwnProperty("timestampAbsoluteUs")) {
                    if (typeof m.timestampAbsoluteUs === "number")
                        d.timestampAbsoluteUs = o.longs === String ? String(m.timestampAbsoluteUs) : m.timestampAbsoluteUs;
                    else
                        d.timestampAbsoluteUs = o.longs === String ? $util.Long.prototype.toString.call(m.timestampAbsoluteUs) : o.longs === Number ? new $util.LongBits(m.timestampAbsoluteUs.low >>> 0, m.timestampAbsoluteUs.high >>> 0).toNumber() : m.timestampAbsoluteUs;
                    if (o.oneofs)
                        d.timestamp = "timestampAbsoluteUs";
                }
                if (m.threadTimeAbsoluteUs != null && m.hasOwnProperty("threadTimeAbsoluteUs")) {
                    if (typeof m.threadTimeAbsoluteUs === "number")
                        d.threadTimeAbsoluteUs = o.longs === String ? String(m.threadTimeAbsoluteUs) : m.threadTimeAbsoluteUs;
                    else
                        d.threadTimeAbsoluteUs = o.longs === String ? $util.Long.prototype.toString.call(m.threadTimeAbsoluteUs) : o.longs === Number ? new $util.LongBits(m.threadTimeAbsoluteUs.low >>> 0, m.threadTimeAbsoluteUs.high >>> 0).toNumber() : m.threadTimeAbsoluteUs;
                    if (o.oneofs)
                        d.threadTime = "threadTimeAbsoluteUs";
                }
                if (m.threadInstructionCountAbsolute != null && m.hasOwnProperty("threadInstructionCountAbsolute")) {
                    if (typeof m.threadInstructionCountAbsolute === "number")
                        d.threadInstructionCountAbsolute = o.longs === String ? String(m.threadInstructionCountAbsolute) : m.threadInstructionCountAbsolute;
                    else
                        d.threadInstructionCountAbsolute = o.longs === String ? $util.Long.prototype.toString.call(m.threadInstructionCountAbsolute) : o.longs === Number ? new $util.LongBits(m.threadInstructionCountAbsolute.low >>> 0, m.threadInstructionCountAbsolute.high >>> 0).toNumber() : m.threadInstructionCountAbsolute;
                    if (o.oneofs)
                        d.threadInstructionCount = "threadInstructionCountAbsolute";
                }
                if (m.logMessage != null && m.hasOwnProperty("logMessage")) {
                    d.logMessage = $root.perfetto.protos.LogMessage.toObject(m.logMessage, o);
                }
                if (m.categories && m.categories.length) {
                    d.categories = [];
                    for (var j = 0; j < m.categories.length; ++j) {
                        d.categories[j] = m.categories[j];
                    }
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                    if (o.oneofs)
                        d.nameField = "name";
                }
                if (m.ccSchedulerState != null && m.hasOwnProperty("ccSchedulerState")) {
                    d.ccSchedulerState = $root.perfetto.protos.ChromeCompositorSchedulerState.toObject(m.ccSchedulerState, o);
                }
                if (m.chromeUserEvent != null && m.hasOwnProperty("chromeUserEvent")) {
                    d.chromeUserEvent = $root.perfetto.protos.ChromeUserEvent.toObject(m.chromeUserEvent, o);
                }
                if (m.chromeKeyedService != null && m.hasOwnProperty("chromeKeyedService")) {
                    d.chromeKeyedService = $root.perfetto.protos.ChromeKeyedService.toObject(m.chromeKeyedService, o);
                }
                if (m.chromeLegacyIpc != null && m.hasOwnProperty("chromeLegacyIpc")) {
                    d.chromeLegacyIpc = $root.perfetto.protos.ChromeLegacyIpc.toObject(m.chromeLegacyIpc, o);
                }
                if (m.chromeHistogramSample != null && m.hasOwnProperty("chromeHistogramSample")) {
                    d.chromeHistogramSample = $root.perfetto.protos.ChromeHistogramSample.toObject(m.chromeHistogramSample, o);
                }
                if (m.chromeLatencyInfo != null && m.hasOwnProperty("chromeLatencyInfo")) {
                    d.chromeLatencyInfo = $root.perfetto.protos.ChromeLatencyInfo.toObject(m.chromeLatencyInfo, o);
                }
                if (m.counterValue != null && m.hasOwnProperty("counterValue")) {
                    if (typeof m.counterValue === "number")
                        d.counterValue = o.longs === String ? String(m.counterValue) : m.counterValue;
                    else
                        d.counterValue = o.longs === String ? $util.Long.prototype.toString.call(m.counterValue) : o.longs === Number ? new $util.LongBits(m.counterValue.low >>> 0, m.counterValue.high >>> 0).toNumber() : m.counterValue;
                    if (o.oneofs)
                        d.counterValueField = "counterValue";
                }
                if (m.extraCounterTrackUuids && m.extraCounterTrackUuids.length) {
                    d.extraCounterTrackUuids = [];
                    for (var j = 0; j < m.extraCounterTrackUuids.length; ++j) {
                        if (typeof m.extraCounterTrackUuids[j] === "number")
                            d.extraCounterTrackUuids[j] = o.longs === String ? String(m.extraCounterTrackUuids[j]) : m.extraCounterTrackUuids[j];
                        else
                            d.extraCounterTrackUuids[j] = o.longs === String ? $util.Long.prototype.toString.call(m.extraCounterTrackUuids[j]) : o.longs === Number ? new $util.LongBits(m.extraCounterTrackUuids[j].low >>> 0, m.extraCounterTrackUuids[j].high >>> 0).toNumber(true) : m.extraCounterTrackUuids[j];
                    }
                }
                if (m.chromeFrameReporter != null && m.hasOwnProperty("chromeFrameReporter")) {
                    d.chromeFrameReporter = $root.perfetto.protos.ChromeFrameReporter.toObject(m.chromeFrameReporter, o);
                }
                if (m.sourceLocation != null && m.hasOwnProperty("sourceLocation")) {
                    d.sourceLocation = $root.perfetto.protos.SourceLocation.toObject(m.sourceLocation, o);
                    if (o.oneofs)
                        d.sourceLocationField = "sourceLocation";
                }
                if (m.sourceLocationIid != null && m.hasOwnProperty("sourceLocationIid")) {
                    if (typeof m.sourceLocationIid === "number")
                        d.sourceLocationIid = o.longs === String ? String(m.sourceLocationIid) : m.sourceLocationIid;
                    else
                        d.sourceLocationIid = o.longs === String ? $util.Long.prototype.toString.call(m.sourceLocationIid) : o.longs === Number ? new $util.LongBits(m.sourceLocationIid.low >>> 0, m.sourceLocationIid.high >>> 0).toNumber(true) : m.sourceLocationIid;
                    if (o.oneofs)
                        d.sourceLocationField = "sourceLocationIid";
                }
                if (m.chromeMessagePump != null && m.hasOwnProperty("chromeMessagePump")) {
                    d.chromeMessagePump = $root.perfetto.protos.ChromeMessagePump.toObject(m.chromeMessagePump, o);
                }
                if (m.flowIdsOld && m.flowIdsOld.length) {
                    d.flowIdsOld = [];
                    for (var j = 0; j < m.flowIdsOld.length; ++j) {
                        if (typeof m.flowIdsOld[j] === "number")
                            d.flowIdsOld[j] = o.longs === String ? String(m.flowIdsOld[j]) : m.flowIdsOld[j];
                        else
                            d.flowIdsOld[j] = o.longs === String ? $util.Long.prototype.toString.call(m.flowIdsOld[j]) : o.longs === Number ? new $util.LongBits(m.flowIdsOld[j].low >>> 0, m.flowIdsOld[j].high >>> 0).toNumber(true) : m.flowIdsOld[j];
                    }
                }
                if (m.chromeMojoEventInfo != null && m.hasOwnProperty("chromeMojoEventInfo")) {
                    d.chromeMojoEventInfo = $root.perfetto.protos.ChromeMojoEventInfo.toObject(m.chromeMojoEventInfo, o);
                }
                if (m.chromeApplicationStateInfo != null && m.hasOwnProperty("chromeApplicationStateInfo")) {
                    d.chromeApplicationStateInfo = $root.perfetto.protos.ChromeApplicationStateInfo.toObject(m.chromeApplicationStateInfo, o);
                }
                if (m.chromeRendererSchedulerState != null && m.hasOwnProperty("chromeRendererSchedulerState")) {
                    d.chromeRendererSchedulerState = $root.perfetto.protos.ChromeRendererSchedulerState.toObject(m.chromeRendererSchedulerState, o);
                }
                if (m.chromeWindowHandleEventInfo != null && m.hasOwnProperty("chromeWindowHandleEventInfo")) {
                    d.chromeWindowHandleEventInfo = $root.perfetto.protos.ChromeWindowHandleEventInfo.toObject(m.chromeWindowHandleEventInfo, o);
                }
                if (m.terminatingFlowIdsOld && m.terminatingFlowIdsOld.length) {
                    d.terminatingFlowIdsOld = [];
                    for (var j = 0; j < m.terminatingFlowIdsOld.length; ++j) {
                        if (typeof m.terminatingFlowIdsOld[j] === "number")
                            d.terminatingFlowIdsOld[j] = o.longs === String ? String(m.terminatingFlowIdsOld[j]) : m.terminatingFlowIdsOld[j];
                        else
                            d.terminatingFlowIdsOld[j] = o.longs === String ? $util.Long.prototype.toString.call(m.terminatingFlowIdsOld[j]) : o.longs === Number ? new $util.LongBits(m.terminatingFlowIdsOld[j].low >>> 0, m.terminatingFlowIdsOld[j].high >>> 0).toNumber(true) : m.terminatingFlowIdsOld[j];
                    }
                }
                if (m.chromeContentSettingsEventInfo != null && m.hasOwnProperty("chromeContentSettingsEventInfo")) {
                    d.chromeContentSettingsEventInfo = $root.perfetto.protos.ChromeContentSettingsEventInfo.toObject(m.chromeContentSettingsEventInfo, o);
                }
                if (m.doubleCounterValue != null && m.hasOwnProperty("doubleCounterValue")) {
                    d.doubleCounterValue = o.json && !isFinite(m.doubleCounterValue) ? String(m.doubleCounterValue) : m.doubleCounterValue;
                    if (o.oneofs)
                        d.counterValueField = "doubleCounterValue";
                }
                if (m.extraDoubleCounterTrackUuids && m.extraDoubleCounterTrackUuids.length) {
                    d.extraDoubleCounterTrackUuids = [];
                    for (var j = 0; j < m.extraDoubleCounterTrackUuids.length; ++j) {
                        if (typeof m.extraDoubleCounterTrackUuids[j] === "number")
                            d.extraDoubleCounterTrackUuids[j] = o.longs === String ? String(m.extraDoubleCounterTrackUuids[j]) : m.extraDoubleCounterTrackUuids[j];
                        else
                            d.extraDoubleCounterTrackUuids[j] = o.longs === String ? $util.Long.prototype.toString.call(m.extraDoubleCounterTrackUuids[j]) : o.longs === Number ? new $util.LongBits(m.extraDoubleCounterTrackUuids[j].low >>> 0, m.extraDoubleCounterTrackUuids[j].high >>> 0).toNumber(true) : m.extraDoubleCounterTrackUuids[j];
                    }
                }
                if (m.extraDoubleCounterValues && m.extraDoubleCounterValues.length) {
                    d.extraDoubleCounterValues = [];
                    for (var j = 0; j < m.extraDoubleCounterValues.length; ++j) {
                        d.extraDoubleCounterValues[j] = o.json && !isFinite(m.extraDoubleCounterValues[j]) ? String(m.extraDoubleCounterValues[j]) : m.extraDoubleCounterValues[j];
                    }
                }
                if (m.flowIds && m.flowIds.length) {
                    d.flowIds = [];
                    for (var j = 0; j < m.flowIds.length; ++j) {
                        if (typeof m.flowIds[j] === "number")
                            d.flowIds[j] = o.longs === String ? String(m.flowIds[j]) : m.flowIds[j];
                        else
                            d.flowIds[j] = o.longs === String ? $util.Long.prototype.toString.call(m.flowIds[j]) : o.longs === Number ? new $util.LongBits(m.flowIds[j].low >>> 0, m.flowIds[j].high >>> 0).toNumber() : m.flowIds[j];
                    }
                }
                if (m.terminatingFlowIds && m.terminatingFlowIds.length) {
                    d.terminatingFlowIds = [];
                    for (var j = 0; j < m.terminatingFlowIds.length; ++j) {
                        if (typeof m.terminatingFlowIds[j] === "number")
                            d.terminatingFlowIds[j] = o.longs === String ? String(m.terminatingFlowIds[j]) : m.terminatingFlowIds[j];
                        else
                            d.terminatingFlowIds[j] = o.longs === String ? $util.Long.prototype.toString.call(m.terminatingFlowIds[j]) : o.longs === Number ? new $util.LongBits(m.terminatingFlowIds[j].low >>> 0, m.terminatingFlowIds[j].high >>> 0).toNumber() : m.terminatingFlowIds[j];
                    }
                }
                if (m.chromeActiveProcesses != null && m.hasOwnProperty("chromeActiveProcesses")) {
                    d.chromeActiveProcesses = $root.perfetto.protos.ChromeActiveProcesses.toObject(m.chromeActiveProcesses, o);
                }
                return d;
            };

            /**
             * Converts this TrackEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrackEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrackEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * Type enum.
             * @name perfetto.protos.TrackEvent.Type
             * @enum {number}
             * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value
             * @property {number} TYPE_SLICE_BEGIN=1 TYPE_SLICE_BEGIN value
             * @property {number} TYPE_SLICE_END=2 TYPE_SLICE_END value
             * @property {number} TYPE_INSTANT=3 TYPE_INSTANT value
             * @property {number} TYPE_COUNTER=4 TYPE_COUNTER value
             */
            TrackEvent.Type = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0;
                values[valuesById[1] = "TYPE_SLICE_BEGIN"] = 1;
                values[valuesById[2] = "TYPE_SLICE_END"] = 2;
                values[valuesById[3] = "TYPE_INSTANT"] = 3;
                values[valuesById[4] = "TYPE_COUNTER"] = 4;
                return values;
            })();

            TrackEvent.LegacyEvent = (function() {

                /**
                 * Properties of a LegacyEvent.
                 * @memberof perfetto.protos.TrackEvent
                 * @interface ILegacyEvent
                 * @property {number|null} [nameIid] LegacyEvent nameIid
                 * @property {number|null} [phase] LegacyEvent phase
                 * @property {number|null} [durationUs] LegacyEvent durationUs
                 * @property {number|null} [threadDurationUs] LegacyEvent threadDurationUs
                 * @property {number|null} [threadInstructionDelta] LegacyEvent threadInstructionDelta
                 * @property {number|null} [unscopedId] LegacyEvent unscopedId
                 * @property {number|null} [localId] LegacyEvent localId
                 * @property {number|null} [globalId] LegacyEvent globalId
                 * @property {string|null} [idScope] LegacyEvent idScope
                 * @property {boolean|null} [useAsyncTts] LegacyEvent useAsyncTts
                 * @property {number|null} [bindId] LegacyEvent bindId
                 * @property {boolean|null} [bindToEnclosing] LegacyEvent bindToEnclosing
                 * @property {perfetto.protos.TrackEvent.LegacyEvent.FlowDirection|null} [flowDirection] LegacyEvent flowDirection
                 * @property {perfetto.protos.TrackEvent.LegacyEvent.InstantEventScope|null} [instantEventScope] LegacyEvent instantEventScope
                 * @property {number|null} [pidOverride] LegacyEvent pidOverride
                 * @property {number|null} [tidOverride] LegacyEvent tidOverride
                 */

                /**
                 * Constructs a new LegacyEvent.
                 * @memberof perfetto.protos.TrackEvent
                 * @classdesc Represents a LegacyEvent.
                 * @implements ILegacyEvent
                 * @constructor
                 * @param {perfetto.protos.TrackEvent.ILegacyEvent=} [p] Properties to set
                 */
                function LegacyEvent(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * LegacyEvent nameIid.
                 * @member {number} nameIid
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @instance
                 */
                LegacyEvent.prototype.nameIid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * LegacyEvent phase.
                 * @member {number} phase
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @instance
                 */
                LegacyEvent.prototype.phase = 0;

                /**
                 * LegacyEvent durationUs.
                 * @member {number} durationUs
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @instance
                 */
                LegacyEvent.prototype.durationUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * LegacyEvent threadDurationUs.
                 * @member {number} threadDurationUs
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @instance
                 */
                LegacyEvent.prototype.threadDurationUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * LegacyEvent threadInstructionDelta.
                 * @member {number} threadInstructionDelta
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @instance
                 */
                LegacyEvent.prototype.threadInstructionDelta = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * LegacyEvent unscopedId.
                 * @member {number} unscopedId
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @instance
                 */
                LegacyEvent.prototype.unscopedId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * LegacyEvent localId.
                 * @member {number} localId
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @instance
                 */
                LegacyEvent.prototype.localId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * LegacyEvent globalId.
                 * @member {number} globalId
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @instance
                 */
                LegacyEvent.prototype.globalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * LegacyEvent idScope.
                 * @member {string} idScope
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @instance
                 */
                LegacyEvent.prototype.idScope = "";

                /**
                 * LegacyEvent useAsyncTts.
                 * @member {boolean} useAsyncTts
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @instance
                 */
                LegacyEvent.prototype.useAsyncTts = false;

                /**
                 * LegacyEvent bindId.
                 * @member {number} bindId
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @instance
                 */
                LegacyEvent.prototype.bindId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * LegacyEvent bindToEnclosing.
                 * @member {boolean} bindToEnclosing
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @instance
                 */
                LegacyEvent.prototype.bindToEnclosing = false;

                /**
                 * LegacyEvent flowDirection.
                 * @member {perfetto.protos.TrackEvent.LegacyEvent.FlowDirection} flowDirection
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @instance
                 */
                LegacyEvent.prototype.flowDirection = 0;

                /**
                 * LegacyEvent instantEventScope.
                 * @member {perfetto.protos.TrackEvent.LegacyEvent.InstantEventScope} instantEventScope
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @instance
                 */
                LegacyEvent.prototype.instantEventScope = 0;

                /**
                 * LegacyEvent pidOverride.
                 * @member {number} pidOverride
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @instance
                 */
                LegacyEvent.prototype.pidOverride = 0;

                /**
                 * LegacyEvent tidOverride.
                 * @member {number} tidOverride
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @instance
                 */
                LegacyEvent.prototype.tidOverride = 0;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * LegacyEvent id.
                 * @member {"unscopedId"|"localId"|"globalId"|undefined} id
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @instance
                 */
                Object.defineProperty(LegacyEvent.prototype, "id", {
                    get: $util.oneOfGetter($oneOfFields = ["unscopedId", "localId", "globalId"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new LegacyEvent instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @static
                 * @param {perfetto.protos.TrackEvent.ILegacyEvent=} [properties] Properties to set
                 * @returns {perfetto.protos.TrackEvent.LegacyEvent} LegacyEvent instance
                 */
                LegacyEvent.create = function create(properties) {
                    return new LegacyEvent(properties);
                };

                /**
                 * Encodes the specified LegacyEvent message. Does not implicitly {@link perfetto.protos.TrackEvent.LegacyEvent.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @static
                 * @param {perfetto.protos.TrackEvent.ILegacyEvent} m LegacyEvent message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                LegacyEvent.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.nameIid != null && Object.hasOwnProperty.call(m, "nameIid"))
                        w.uint32(8).uint64(m.nameIid);
                    if (m.phase != null && Object.hasOwnProperty.call(m, "phase"))
                        w.uint32(16).int32(m.phase);
                    if (m.durationUs != null && Object.hasOwnProperty.call(m, "durationUs"))
                        w.uint32(24).int64(m.durationUs);
                    if (m.threadDurationUs != null && Object.hasOwnProperty.call(m, "threadDurationUs"))
                        w.uint32(32).int64(m.threadDurationUs);
                    if (m.unscopedId != null && Object.hasOwnProperty.call(m, "unscopedId"))
                        w.uint32(48).uint64(m.unscopedId);
                    if (m.idScope != null && Object.hasOwnProperty.call(m, "idScope"))
                        w.uint32(58).string(m.idScope);
                    if (m.bindId != null && Object.hasOwnProperty.call(m, "bindId"))
                        w.uint32(64).uint64(m.bindId);
                    if (m.useAsyncTts != null && Object.hasOwnProperty.call(m, "useAsyncTts"))
                        w.uint32(72).bool(m.useAsyncTts);
                    if (m.localId != null && Object.hasOwnProperty.call(m, "localId"))
                        w.uint32(80).uint64(m.localId);
                    if (m.globalId != null && Object.hasOwnProperty.call(m, "globalId"))
                        w.uint32(88).uint64(m.globalId);
                    if (m.bindToEnclosing != null && Object.hasOwnProperty.call(m, "bindToEnclosing"))
                        w.uint32(96).bool(m.bindToEnclosing);
                    if (m.flowDirection != null && Object.hasOwnProperty.call(m, "flowDirection"))
                        w.uint32(104).int32(m.flowDirection);
                    if (m.instantEventScope != null && Object.hasOwnProperty.call(m, "instantEventScope"))
                        w.uint32(112).int32(m.instantEventScope);
                    if (m.threadInstructionDelta != null && Object.hasOwnProperty.call(m, "threadInstructionDelta"))
                        w.uint32(120).int64(m.threadInstructionDelta);
                    if (m.pidOverride != null && Object.hasOwnProperty.call(m, "pidOverride"))
                        w.uint32(144).int32(m.pidOverride);
                    if (m.tidOverride != null && Object.hasOwnProperty.call(m, "tidOverride"))
                        w.uint32(152).int32(m.tidOverride);
                    return w;
                };

                /**
                 * Encodes the specified LegacyEvent message, length delimited. Does not implicitly {@link perfetto.protos.TrackEvent.LegacyEvent.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @static
                 * @param {perfetto.protos.TrackEvent.ILegacyEvent} message LegacyEvent message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                LegacyEvent.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a LegacyEvent message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.TrackEvent.LegacyEvent} LegacyEvent
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                LegacyEvent.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrackEvent.LegacyEvent();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.nameIid = r.uint64();
                            break;
                        case 2:
                            m.phase = r.int32();
                            break;
                        case 3:
                            m.durationUs = r.int64();
                            break;
                        case 4:
                            m.threadDurationUs = r.int64();
                            break;
                        case 15:
                            m.threadInstructionDelta = r.int64();
                            break;
                        case 6:
                            m.unscopedId = r.uint64();
                            break;
                        case 10:
                            m.localId = r.uint64();
                            break;
                        case 11:
                            m.globalId = r.uint64();
                            break;
                        case 7:
                            m.idScope = r.string();
                            break;
                        case 9:
                            m.useAsyncTts = r.bool();
                            break;
                        case 8:
                            m.bindId = r.uint64();
                            break;
                        case 12:
                            m.bindToEnclosing = r.bool();
                            break;
                        case 13:
                            m.flowDirection = r.int32();
                            break;
                        case 14:
                            m.instantEventScope = r.int32();
                            break;
                        case 18:
                            m.pidOverride = r.int32();
                            break;
                        case 19:
                            m.tidOverride = r.int32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a LegacyEvent message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.TrackEvent.LegacyEvent} LegacyEvent
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                LegacyEvent.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a LegacyEvent message.
                 * @function verify
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                LegacyEvent.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    var p = {};
                    if (m.nameIid != null && m.hasOwnProperty("nameIid")) {
                        if (!$util.isInteger(m.nameIid) && !(m.nameIid && $util.isInteger(m.nameIid.low) && $util.isInteger(m.nameIid.high)))
                            return "nameIid: integer|Long expected";
                    }
                    if (m.phase != null && m.hasOwnProperty("phase")) {
                        if (!$util.isInteger(m.phase))
                            return "phase: integer expected";
                    }
                    if (m.durationUs != null && m.hasOwnProperty("durationUs")) {
                        if (!$util.isInteger(m.durationUs) && !(m.durationUs && $util.isInteger(m.durationUs.low) && $util.isInteger(m.durationUs.high)))
                            return "durationUs: integer|Long expected";
                    }
                    if (m.threadDurationUs != null && m.hasOwnProperty("threadDurationUs")) {
                        if (!$util.isInteger(m.threadDurationUs) && !(m.threadDurationUs && $util.isInteger(m.threadDurationUs.low) && $util.isInteger(m.threadDurationUs.high)))
                            return "threadDurationUs: integer|Long expected";
                    }
                    if (m.threadInstructionDelta != null && m.hasOwnProperty("threadInstructionDelta")) {
                        if (!$util.isInteger(m.threadInstructionDelta) && !(m.threadInstructionDelta && $util.isInteger(m.threadInstructionDelta.low) && $util.isInteger(m.threadInstructionDelta.high)))
                            return "threadInstructionDelta: integer|Long expected";
                    }
                    if (m.unscopedId != null && m.hasOwnProperty("unscopedId")) {
                        p.id = 1;
                        if (!$util.isInteger(m.unscopedId) && !(m.unscopedId && $util.isInteger(m.unscopedId.low) && $util.isInteger(m.unscopedId.high)))
                            return "unscopedId: integer|Long expected";
                    }
                    if (m.localId != null && m.hasOwnProperty("localId")) {
                        if (p.id === 1)
                            return "id: multiple values";
                        p.id = 1;
                        if (!$util.isInteger(m.localId) && !(m.localId && $util.isInteger(m.localId.low) && $util.isInteger(m.localId.high)))
                            return "localId: integer|Long expected";
                    }
                    if (m.globalId != null && m.hasOwnProperty("globalId")) {
                        if (p.id === 1)
                            return "id: multiple values";
                        p.id = 1;
                        if (!$util.isInteger(m.globalId) && !(m.globalId && $util.isInteger(m.globalId.low) && $util.isInteger(m.globalId.high)))
                            return "globalId: integer|Long expected";
                    }
                    if (m.idScope != null && m.hasOwnProperty("idScope")) {
                        if (!$util.isString(m.idScope))
                            return "idScope: string expected";
                    }
                    if (m.useAsyncTts != null && m.hasOwnProperty("useAsyncTts")) {
                        if (typeof m.useAsyncTts !== "boolean")
                            return "useAsyncTts: boolean expected";
                    }
                    if (m.bindId != null && m.hasOwnProperty("bindId")) {
                        if (!$util.isInteger(m.bindId) && !(m.bindId && $util.isInteger(m.bindId.low) && $util.isInteger(m.bindId.high)))
                            return "bindId: integer|Long expected";
                    }
                    if (m.bindToEnclosing != null && m.hasOwnProperty("bindToEnclosing")) {
                        if (typeof m.bindToEnclosing !== "boolean")
                            return "bindToEnclosing: boolean expected";
                    }
                    if (m.flowDirection != null && m.hasOwnProperty("flowDirection")) {
                        switch (m.flowDirection) {
                        default:
                            return "flowDirection: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                            break;
                        }
                    }
                    if (m.instantEventScope != null && m.hasOwnProperty("instantEventScope")) {
                        switch (m.instantEventScope) {
                        default:
                            return "instantEventScope: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                            break;
                        }
                    }
                    if (m.pidOverride != null && m.hasOwnProperty("pidOverride")) {
                        if (!$util.isInteger(m.pidOverride))
                            return "pidOverride: integer expected";
                    }
                    if (m.tidOverride != null && m.hasOwnProperty("tidOverride")) {
                        if (!$util.isInteger(m.tidOverride))
                            return "tidOverride: integer expected";
                    }
                    return null;
                };

                /**
                 * Creates a LegacyEvent message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.TrackEvent.LegacyEvent} LegacyEvent
                 */
                LegacyEvent.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.TrackEvent.LegacyEvent)
                        return d;
                    var m = new $root.perfetto.protos.TrackEvent.LegacyEvent();
                    if (d.nameIid != null) {
                        if ($util.Long)
                            (m.nameIid = $util.Long.fromValue(d.nameIid)).unsigned = true;
                        else if (typeof d.nameIid === "string")
                            m.nameIid = parseInt(d.nameIid, 10);
                        else if (typeof d.nameIid === "number")
                            m.nameIid = d.nameIid;
                        else if (typeof d.nameIid === "object")
                            m.nameIid = new $util.LongBits(d.nameIid.low >>> 0, d.nameIid.high >>> 0).toNumber(true);
                    }
                    if (d.phase != null) {
                        m.phase = d.phase | 0;
                    }
                    if (d.durationUs != null) {
                        if ($util.Long)
                            (m.durationUs = $util.Long.fromValue(d.durationUs)).unsigned = false;
                        else if (typeof d.durationUs === "string")
                            m.durationUs = parseInt(d.durationUs, 10);
                        else if (typeof d.durationUs === "number")
                            m.durationUs = d.durationUs;
                        else if (typeof d.durationUs === "object")
                            m.durationUs = new $util.LongBits(d.durationUs.low >>> 0, d.durationUs.high >>> 0).toNumber();
                    }
                    if (d.threadDurationUs != null) {
                        if ($util.Long)
                            (m.threadDurationUs = $util.Long.fromValue(d.threadDurationUs)).unsigned = false;
                        else if (typeof d.threadDurationUs === "string")
                            m.threadDurationUs = parseInt(d.threadDurationUs, 10);
                        else if (typeof d.threadDurationUs === "number")
                            m.threadDurationUs = d.threadDurationUs;
                        else if (typeof d.threadDurationUs === "object")
                            m.threadDurationUs = new $util.LongBits(d.threadDurationUs.low >>> 0, d.threadDurationUs.high >>> 0).toNumber();
                    }
                    if (d.threadInstructionDelta != null) {
                        if ($util.Long)
                            (m.threadInstructionDelta = $util.Long.fromValue(d.threadInstructionDelta)).unsigned = false;
                        else if (typeof d.threadInstructionDelta === "string")
                            m.threadInstructionDelta = parseInt(d.threadInstructionDelta, 10);
                        else if (typeof d.threadInstructionDelta === "number")
                            m.threadInstructionDelta = d.threadInstructionDelta;
                        else if (typeof d.threadInstructionDelta === "object")
                            m.threadInstructionDelta = new $util.LongBits(d.threadInstructionDelta.low >>> 0, d.threadInstructionDelta.high >>> 0).toNumber();
                    }
                    if (d.unscopedId != null) {
                        if ($util.Long)
                            (m.unscopedId = $util.Long.fromValue(d.unscopedId)).unsigned = true;
                        else if (typeof d.unscopedId === "string")
                            m.unscopedId = parseInt(d.unscopedId, 10);
                        else if (typeof d.unscopedId === "number")
                            m.unscopedId = d.unscopedId;
                        else if (typeof d.unscopedId === "object")
                            m.unscopedId = new $util.LongBits(d.unscopedId.low >>> 0, d.unscopedId.high >>> 0).toNumber(true);
                    }
                    if (d.localId != null) {
                        if ($util.Long)
                            (m.localId = $util.Long.fromValue(d.localId)).unsigned = true;
                        else if (typeof d.localId === "string")
                            m.localId = parseInt(d.localId, 10);
                        else if (typeof d.localId === "number")
                            m.localId = d.localId;
                        else if (typeof d.localId === "object")
                            m.localId = new $util.LongBits(d.localId.low >>> 0, d.localId.high >>> 0).toNumber(true);
                    }
                    if (d.globalId != null) {
                        if ($util.Long)
                            (m.globalId = $util.Long.fromValue(d.globalId)).unsigned = true;
                        else if (typeof d.globalId === "string")
                            m.globalId = parseInt(d.globalId, 10);
                        else if (typeof d.globalId === "number")
                            m.globalId = d.globalId;
                        else if (typeof d.globalId === "object")
                            m.globalId = new $util.LongBits(d.globalId.low >>> 0, d.globalId.high >>> 0).toNumber(true);
                    }
                    if (d.idScope != null) {
                        m.idScope = String(d.idScope);
                    }
                    if (d.useAsyncTts != null) {
                        m.useAsyncTts = Boolean(d.useAsyncTts);
                    }
                    if (d.bindId != null) {
                        if ($util.Long)
                            (m.bindId = $util.Long.fromValue(d.bindId)).unsigned = true;
                        else if (typeof d.bindId === "string")
                            m.bindId = parseInt(d.bindId, 10);
                        else if (typeof d.bindId === "number")
                            m.bindId = d.bindId;
                        else if (typeof d.bindId === "object")
                            m.bindId = new $util.LongBits(d.bindId.low >>> 0, d.bindId.high >>> 0).toNumber(true);
                    }
                    if (d.bindToEnclosing != null) {
                        m.bindToEnclosing = Boolean(d.bindToEnclosing);
                    }
                    switch (d.flowDirection) {
                    case "FLOW_UNSPECIFIED":
                    case 0:
                        m.flowDirection = 0;
                        break;
                    case "FLOW_IN":
                    case 1:
                        m.flowDirection = 1;
                        break;
                    case "FLOW_OUT":
                    case 2:
                        m.flowDirection = 2;
                        break;
                    case "FLOW_INOUT":
                    case 3:
                        m.flowDirection = 3;
                        break;
                    }
                    switch (d.instantEventScope) {
                    case "SCOPE_UNSPECIFIED":
                    case 0:
                        m.instantEventScope = 0;
                        break;
                    case "SCOPE_GLOBAL":
                    case 1:
                        m.instantEventScope = 1;
                        break;
                    case "SCOPE_PROCESS":
                    case 2:
                        m.instantEventScope = 2;
                        break;
                    case "SCOPE_THREAD":
                    case 3:
                        m.instantEventScope = 3;
                        break;
                    }
                    if (d.pidOverride != null) {
                        m.pidOverride = d.pidOverride | 0;
                    }
                    if (d.tidOverride != null) {
                        m.tidOverride = d.tidOverride | 0;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a LegacyEvent message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @static
                 * @param {perfetto.protos.TrackEvent.LegacyEvent} m LegacyEvent
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                LegacyEvent.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.nameIid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.nameIid = o.longs === String ? "0" : 0;
                        d.phase = 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.durationUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.durationUs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.threadDurationUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.threadDurationUs = o.longs === String ? "0" : 0;
                        d.idScope = "";
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.bindId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.bindId = o.longs === String ? "0" : 0;
                        d.useAsyncTts = false;
                        d.bindToEnclosing = false;
                        d.flowDirection = o.enums === String ? "FLOW_UNSPECIFIED" : 0;
                        d.instantEventScope = o.enums === String ? "SCOPE_UNSPECIFIED" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.threadInstructionDelta = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.threadInstructionDelta = o.longs === String ? "0" : 0;
                        d.pidOverride = 0;
                        d.tidOverride = 0;
                    }
                    if (m.nameIid != null && m.hasOwnProperty("nameIid")) {
                        if (typeof m.nameIid === "number")
                            d.nameIid = o.longs === String ? String(m.nameIid) : m.nameIid;
                        else
                            d.nameIid = o.longs === String ? $util.Long.prototype.toString.call(m.nameIid) : o.longs === Number ? new $util.LongBits(m.nameIid.low >>> 0, m.nameIid.high >>> 0).toNumber(true) : m.nameIid;
                    }
                    if (m.phase != null && m.hasOwnProperty("phase")) {
                        d.phase = m.phase;
                    }
                    if (m.durationUs != null && m.hasOwnProperty("durationUs")) {
                        if (typeof m.durationUs === "number")
                            d.durationUs = o.longs === String ? String(m.durationUs) : m.durationUs;
                        else
                            d.durationUs = o.longs === String ? $util.Long.prototype.toString.call(m.durationUs) : o.longs === Number ? new $util.LongBits(m.durationUs.low >>> 0, m.durationUs.high >>> 0).toNumber() : m.durationUs;
                    }
                    if (m.threadDurationUs != null && m.hasOwnProperty("threadDurationUs")) {
                        if (typeof m.threadDurationUs === "number")
                            d.threadDurationUs = o.longs === String ? String(m.threadDurationUs) : m.threadDurationUs;
                        else
                            d.threadDurationUs = o.longs === String ? $util.Long.prototype.toString.call(m.threadDurationUs) : o.longs === Number ? new $util.LongBits(m.threadDurationUs.low >>> 0, m.threadDurationUs.high >>> 0).toNumber() : m.threadDurationUs;
                    }
                    if (m.unscopedId != null && m.hasOwnProperty("unscopedId")) {
                        if (typeof m.unscopedId === "number")
                            d.unscopedId = o.longs === String ? String(m.unscopedId) : m.unscopedId;
                        else
                            d.unscopedId = o.longs === String ? $util.Long.prototype.toString.call(m.unscopedId) : o.longs === Number ? new $util.LongBits(m.unscopedId.low >>> 0, m.unscopedId.high >>> 0).toNumber(true) : m.unscopedId;
                        if (o.oneofs)
                            d.id = "unscopedId";
                    }
                    if (m.idScope != null && m.hasOwnProperty("idScope")) {
                        d.idScope = m.idScope;
                    }
                    if (m.bindId != null && m.hasOwnProperty("bindId")) {
                        if (typeof m.bindId === "number")
                            d.bindId = o.longs === String ? String(m.bindId) : m.bindId;
                        else
                            d.bindId = o.longs === String ? $util.Long.prototype.toString.call(m.bindId) : o.longs === Number ? new $util.LongBits(m.bindId.low >>> 0, m.bindId.high >>> 0).toNumber(true) : m.bindId;
                    }
                    if (m.useAsyncTts != null && m.hasOwnProperty("useAsyncTts")) {
                        d.useAsyncTts = m.useAsyncTts;
                    }
                    if (m.localId != null && m.hasOwnProperty("localId")) {
                        if (typeof m.localId === "number")
                            d.localId = o.longs === String ? String(m.localId) : m.localId;
                        else
                            d.localId = o.longs === String ? $util.Long.prototype.toString.call(m.localId) : o.longs === Number ? new $util.LongBits(m.localId.low >>> 0, m.localId.high >>> 0).toNumber(true) : m.localId;
                        if (o.oneofs)
                            d.id = "localId";
                    }
                    if (m.globalId != null && m.hasOwnProperty("globalId")) {
                        if (typeof m.globalId === "number")
                            d.globalId = o.longs === String ? String(m.globalId) : m.globalId;
                        else
                            d.globalId = o.longs === String ? $util.Long.prototype.toString.call(m.globalId) : o.longs === Number ? new $util.LongBits(m.globalId.low >>> 0, m.globalId.high >>> 0).toNumber(true) : m.globalId;
                        if (o.oneofs)
                            d.id = "globalId";
                    }
                    if (m.bindToEnclosing != null && m.hasOwnProperty("bindToEnclosing")) {
                        d.bindToEnclosing = m.bindToEnclosing;
                    }
                    if (m.flowDirection != null && m.hasOwnProperty("flowDirection")) {
                        d.flowDirection = o.enums === String ? $root.perfetto.protos.TrackEvent.LegacyEvent.FlowDirection[m.flowDirection] : m.flowDirection;
                    }
                    if (m.instantEventScope != null && m.hasOwnProperty("instantEventScope")) {
                        d.instantEventScope = o.enums === String ? $root.perfetto.protos.TrackEvent.LegacyEvent.InstantEventScope[m.instantEventScope] : m.instantEventScope;
                    }
                    if (m.threadInstructionDelta != null && m.hasOwnProperty("threadInstructionDelta")) {
                        if (typeof m.threadInstructionDelta === "number")
                            d.threadInstructionDelta = o.longs === String ? String(m.threadInstructionDelta) : m.threadInstructionDelta;
                        else
                            d.threadInstructionDelta = o.longs === String ? $util.Long.prototype.toString.call(m.threadInstructionDelta) : o.longs === Number ? new $util.LongBits(m.threadInstructionDelta.low >>> 0, m.threadInstructionDelta.high >>> 0).toNumber() : m.threadInstructionDelta;
                    }
                    if (m.pidOverride != null && m.hasOwnProperty("pidOverride")) {
                        d.pidOverride = m.pidOverride;
                    }
                    if (m.tidOverride != null && m.hasOwnProperty("tidOverride")) {
                        d.tidOverride = m.tidOverride;
                    }
                    return d;
                };

                /**
                 * Converts this LegacyEvent to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.TrackEvent.LegacyEvent
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                LegacyEvent.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                /**
                 * FlowDirection enum.
                 * @name perfetto.protos.TrackEvent.LegacyEvent.FlowDirection
                 * @enum {number}
                 * @property {number} FLOW_UNSPECIFIED=0 FLOW_UNSPECIFIED value
                 * @property {number} FLOW_IN=1 FLOW_IN value
                 * @property {number} FLOW_OUT=2 FLOW_OUT value
                 * @property {number} FLOW_INOUT=3 FLOW_INOUT value
                 */
                LegacyEvent.FlowDirection = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "FLOW_UNSPECIFIED"] = 0;
                    values[valuesById[1] = "FLOW_IN"] = 1;
                    values[valuesById[2] = "FLOW_OUT"] = 2;
                    values[valuesById[3] = "FLOW_INOUT"] = 3;
                    return values;
                })();

                /**
                 * InstantEventScope enum.
                 * @name perfetto.protos.TrackEvent.LegacyEvent.InstantEventScope
                 * @enum {number}
                 * @property {number} SCOPE_UNSPECIFIED=0 SCOPE_UNSPECIFIED value
                 * @property {number} SCOPE_GLOBAL=1 SCOPE_GLOBAL value
                 * @property {number} SCOPE_PROCESS=2 SCOPE_PROCESS value
                 * @property {number} SCOPE_THREAD=3 SCOPE_THREAD value
                 */
                LegacyEvent.InstantEventScope = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "SCOPE_UNSPECIFIED"] = 0;
                    values[valuesById[1] = "SCOPE_GLOBAL"] = 1;
                    values[valuesById[2] = "SCOPE_PROCESS"] = 2;
                    values[valuesById[3] = "SCOPE_THREAD"] = 3;
                    return values;
                })();

                return LegacyEvent;
            })();

            return TrackEvent;
        })();

        protos.TrackEventDefaults = (function() {

            /**
             * Properties of a TrackEventDefaults.
             * @memberof perfetto.protos
             * @interface ITrackEventDefaults
             * @property {number|null} [trackUuid] TrackEventDefaults trackUuid
             * @property {Array.<number>|null} [extraCounterTrackUuids] TrackEventDefaults extraCounterTrackUuids
             * @property {Array.<number>|null} [extraDoubleCounterTrackUuids] TrackEventDefaults extraDoubleCounterTrackUuids
             */

            /**
             * Constructs a new TrackEventDefaults.
             * @memberof perfetto.protos
             * @classdesc Represents a TrackEventDefaults.
             * @implements ITrackEventDefaults
             * @constructor
             * @param {perfetto.protos.ITrackEventDefaults=} [p] Properties to set
             */
            function TrackEventDefaults(p) {
                this.extraCounterTrackUuids = [];
                this.extraDoubleCounterTrackUuids = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TrackEventDefaults trackUuid.
             * @member {number} trackUuid
             * @memberof perfetto.protos.TrackEventDefaults
             * @instance
             */
            TrackEventDefaults.prototype.trackUuid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TrackEventDefaults extraCounterTrackUuids.
             * @member {Array.<number>} extraCounterTrackUuids
             * @memberof perfetto.protos.TrackEventDefaults
             * @instance
             */
            TrackEventDefaults.prototype.extraCounterTrackUuids = $util.emptyArray;

            /**
             * TrackEventDefaults extraDoubleCounterTrackUuids.
             * @member {Array.<number>} extraDoubleCounterTrackUuids
             * @memberof perfetto.protos.TrackEventDefaults
             * @instance
             */
            TrackEventDefaults.prototype.extraDoubleCounterTrackUuids = $util.emptyArray;

            /**
             * Creates a new TrackEventDefaults instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrackEventDefaults
             * @static
             * @param {perfetto.protos.ITrackEventDefaults=} [properties] Properties to set
             * @returns {perfetto.protos.TrackEventDefaults} TrackEventDefaults instance
             */
            TrackEventDefaults.create = function create(properties) {
                return new TrackEventDefaults(properties);
            };

            /**
             * Encodes the specified TrackEventDefaults message. Does not implicitly {@link perfetto.protos.TrackEventDefaults.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrackEventDefaults
             * @static
             * @param {perfetto.protos.ITrackEventDefaults} m TrackEventDefaults message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrackEventDefaults.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.trackUuid != null && Object.hasOwnProperty.call(m, "trackUuid"))
                    w.uint32(88).uint64(m.trackUuid);
                if (m.extraCounterTrackUuids != null && m.extraCounterTrackUuids.length) {
                    for (var i = 0; i < m.extraCounterTrackUuids.length; ++i)
                        w.uint32(248).uint64(m.extraCounterTrackUuids[i]);
                }
                if (m.extraDoubleCounterTrackUuids != null && m.extraDoubleCounterTrackUuids.length) {
                    for (var i = 0; i < m.extraDoubleCounterTrackUuids.length; ++i)
                        w.uint32(360).uint64(m.extraDoubleCounterTrackUuids[i]);
                }
                return w;
            };

            /**
             * Encodes the specified TrackEventDefaults message, length delimited. Does not implicitly {@link perfetto.protos.TrackEventDefaults.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrackEventDefaults
             * @static
             * @param {perfetto.protos.ITrackEventDefaults} message TrackEventDefaults message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrackEventDefaults.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrackEventDefaults message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrackEventDefaults
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrackEventDefaults} TrackEventDefaults
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrackEventDefaults.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrackEventDefaults();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 11:
                        m.trackUuid = r.uint64();
                        break;
                    case 31:
                        if (!(m.extraCounterTrackUuids && m.extraCounterTrackUuids.length))
                            m.extraCounterTrackUuids = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.extraCounterTrackUuids.push(r.uint64());
                        } else
                            m.extraCounterTrackUuids.push(r.uint64());
                        break;
                    case 45:
                        if (!(m.extraDoubleCounterTrackUuids && m.extraDoubleCounterTrackUuids.length))
                            m.extraDoubleCounterTrackUuids = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.extraDoubleCounterTrackUuids.push(r.uint64());
                        } else
                            m.extraDoubleCounterTrackUuids.push(r.uint64());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrackEventDefaults message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrackEventDefaults
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrackEventDefaults} TrackEventDefaults
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrackEventDefaults.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrackEventDefaults message.
             * @function verify
             * @memberof perfetto.protos.TrackEventDefaults
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrackEventDefaults.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.trackUuid != null && m.hasOwnProperty("trackUuid")) {
                    if (!$util.isInteger(m.trackUuid) && !(m.trackUuid && $util.isInteger(m.trackUuid.low) && $util.isInteger(m.trackUuid.high)))
                        return "trackUuid: integer|Long expected";
                }
                if (m.extraCounterTrackUuids != null && m.hasOwnProperty("extraCounterTrackUuids")) {
                    if (!Array.isArray(m.extraCounterTrackUuids))
                        return "extraCounterTrackUuids: array expected";
                    for (var i = 0; i < m.extraCounterTrackUuids.length; ++i) {
                        if (!$util.isInteger(m.extraCounterTrackUuids[i]) && !(m.extraCounterTrackUuids[i] && $util.isInteger(m.extraCounterTrackUuids[i].low) && $util.isInteger(m.extraCounterTrackUuids[i].high)))
                            return "extraCounterTrackUuids: integer|Long[] expected";
                    }
                }
                if (m.extraDoubleCounterTrackUuids != null && m.hasOwnProperty("extraDoubleCounterTrackUuids")) {
                    if (!Array.isArray(m.extraDoubleCounterTrackUuids))
                        return "extraDoubleCounterTrackUuids: array expected";
                    for (var i = 0; i < m.extraDoubleCounterTrackUuids.length; ++i) {
                        if (!$util.isInteger(m.extraDoubleCounterTrackUuids[i]) && !(m.extraDoubleCounterTrackUuids[i] && $util.isInteger(m.extraDoubleCounterTrackUuids[i].low) && $util.isInteger(m.extraDoubleCounterTrackUuids[i].high)))
                            return "extraDoubleCounterTrackUuids: integer|Long[] expected";
                    }
                }
                return null;
            };

            /**
             * Creates a TrackEventDefaults message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrackEventDefaults
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrackEventDefaults} TrackEventDefaults
             */
            TrackEventDefaults.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrackEventDefaults)
                    return d;
                var m = new $root.perfetto.protos.TrackEventDefaults();
                if (d.trackUuid != null) {
                    if ($util.Long)
                        (m.trackUuid = $util.Long.fromValue(d.trackUuid)).unsigned = true;
                    else if (typeof d.trackUuid === "string")
                        m.trackUuid = parseInt(d.trackUuid, 10);
                    else if (typeof d.trackUuid === "number")
                        m.trackUuid = d.trackUuid;
                    else if (typeof d.trackUuid === "object")
                        m.trackUuid = new $util.LongBits(d.trackUuid.low >>> 0, d.trackUuid.high >>> 0).toNumber(true);
                }
                if (d.extraCounterTrackUuids) {
                    if (!Array.isArray(d.extraCounterTrackUuids))
                        throw TypeError(".perfetto.protos.TrackEventDefaults.extraCounterTrackUuids: array expected");
                    m.extraCounterTrackUuids = [];
                    for (var i = 0; i < d.extraCounterTrackUuids.length; ++i) {
                        if ($util.Long)
                            (m.extraCounterTrackUuids[i] = $util.Long.fromValue(d.extraCounterTrackUuids[i])).unsigned = true;
                        else if (typeof d.extraCounterTrackUuids[i] === "string")
                            m.extraCounterTrackUuids[i] = parseInt(d.extraCounterTrackUuids[i], 10);
                        else if (typeof d.extraCounterTrackUuids[i] === "number")
                            m.extraCounterTrackUuids[i] = d.extraCounterTrackUuids[i];
                        else if (typeof d.extraCounterTrackUuids[i] === "object")
                            m.extraCounterTrackUuids[i] = new $util.LongBits(d.extraCounterTrackUuids[i].low >>> 0, d.extraCounterTrackUuids[i].high >>> 0).toNumber(true);
                    }
                }
                if (d.extraDoubleCounterTrackUuids) {
                    if (!Array.isArray(d.extraDoubleCounterTrackUuids))
                        throw TypeError(".perfetto.protos.TrackEventDefaults.extraDoubleCounterTrackUuids: array expected");
                    m.extraDoubleCounterTrackUuids = [];
                    for (var i = 0; i < d.extraDoubleCounterTrackUuids.length; ++i) {
                        if ($util.Long)
                            (m.extraDoubleCounterTrackUuids[i] = $util.Long.fromValue(d.extraDoubleCounterTrackUuids[i])).unsigned = true;
                        else if (typeof d.extraDoubleCounterTrackUuids[i] === "string")
                            m.extraDoubleCounterTrackUuids[i] = parseInt(d.extraDoubleCounterTrackUuids[i], 10);
                        else if (typeof d.extraDoubleCounterTrackUuids[i] === "number")
                            m.extraDoubleCounterTrackUuids[i] = d.extraDoubleCounterTrackUuids[i];
                        else if (typeof d.extraDoubleCounterTrackUuids[i] === "object")
                            m.extraDoubleCounterTrackUuids[i] = new $util.LongBits(d.extraDoubleCounterTrackUuids[i].low >>> 0, d.extraDoubleCounterTrackUuids[i].high >>> 0).toNumber(true);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a TrackEventDefaults message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrackEventDefaults
             * @static
             * @param {perfetto.protos.TrackEventDefaults} m TrackEventDefaults
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrackEventDefaults.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.extraCounterTrackUuids = [];
                    d.extraDoubleCounterTrackUuids = [];
                }
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.trackUuid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.trackUuid = o.longs === String ? "0" : 0;
                }
                if (m.trackUuid != null && m.hasOwnProperty("trackUuid")) {
                    if (typeof m.trackUuid === "number")
                        d.trackUuid = o.longs === String ? String(m.trackUuid) : m.trackUuid;
                    else
                        d.trackUuid = o.longs === String ? $util.Long.prototype.toString.call(m.trackUuid) : o.longs === Number ? new $util.LongBits(m.trackUuid.low >>> 0, m.trackUuid.high >>> 0).toNumber(true) : m.trackUuid;
                }
                if (m.extraCounterTrackUuids && m.extraCounterTrackUuids.length) {
                    d.extraCounterTrackUuids = [];
                    for (var j = 0; j < m.extraCounterTrackUuids.length; ++j) {
                        if (typeof m.extraCounterTrackUuids[j] === "number")
                            d.extraCounterTrackUuids[j] = o.longs === String ? String(m.extraCounterTrackUuids[j]) : m.extraCounterTrackUuids[j];
                        else
                            d.extraCounterTrackUuids[j] = o.longs === String ? $util.Long.prototype.toString.call(m.extraCounterTrackUuids[j]) : o.longs === Number ? new $util.LongBits(m.extraCounterTrackUuids[j].low >>> 0, m.extraCounterTrackUuids[j].high >>> 0).toNumber(true) : m.extraCounterTrackUuids[j];
                    }
                }
                if (m.extraDoubleCounterTrackUuids && m.extraDoubleCounterTrackUuids.length) {
                    d.extraDoubleCounterTrackUuids = [];
                    for (var j = 0; j < m.extraDoubleCounterTrackUuids.length; ++j) {
                        if (typeof m.extraDoubleCounterTrackUuids[j] === "number")
                            d.extraDoubleCounterTrackUuids[j] = o.longs === String ? String(m.extraDoubleCounterTrackUuids[j]) : m.extraDoubleCounterTrackUuids[j];
                        else
                            d.extraDoubleCounterTrackUuids[j] = o.longs === String ? $util.Long.prototype.toString.call(m.extraDoubleCounterTrackUuids[j]) : o.longs === Number ? new $util.LongBits(m.extraDoubleCounterTrackUuids[j].low >>> 0, m.extraDoubleCounterTrackUuids[j].high >>> 0).toNumber(true) : m.extraDoubleCounterTrackUuids[j];
                    }
                }
                return d;
            };

            /**
             * Converts this TrackEventDefaults to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrackEventDefaults
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrackEventDefaults.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrackEventDefaults;
        })();

        protos.EventCategory = (function() {

            /**
             * Properties of an EventCategory.
             * @memberof perfetto.protos
             * @interface IEventCategory
             * @property {number|null} [iid] EventCategory iid
             * @property {string|null} [name] EventCategory name
             */

            /**
             * Constructs a new EventCategory.
             * @memberof perfetto.protos
             * @classdesc Represents an EventCategory.
             * @implements IEventCategory
             * @constructor
             * @param {perfetto.protos.IEventCategory=} [p] Properties to set
             */
            function EventCategory(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * EventCategory iid.
             * @member {number} iid
             * @memberof perfetto.protos.EventCategory
             * @instance
             */
            EventCategory.prototype.iid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * EventCategory name.
             * @member {string} name
             * @memberof perfetto.protos.EventCategory
             * @instance
             */
            EventCategory.prototype.name = "";

            /**
             * Creates a new EventCategory instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.EventCategory
             * @static
             * @param {perfetto.protos.IEventCategory=} [properties] Properties to set
             * @returns {perfetto.protos.EventCategory} EventCategory instance
             */
            EventCategory.create = function create(properties) {
                return new EventCategory(properties);
            };

            /**
             * Encodes the specified EventCategory message. Does not implicitly {@link perfetto.protos.EventCategory.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.EventCategory
             * @static
             * @param {perfetto.protos.IEventCategory} m EventCategory message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EventCategory.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.iid != null && Object.hasOwnProperty.call(m, "iid"))
                    w.uint32(8).uint64(m.iid);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(18).string(m.name);
                return w;
            };

            /**
             * Encodes the specified EventCategory message, length delimited. Does not implicitly {@link perfetto.protos.EventCategory.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.EventCategory
             * @static
             * @param {perfetto.protos.IEventCategory} message EventCategory message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EventCategory.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an EventCategory message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.EventCategory
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.EventCategory} EventCategory
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EventCategory.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.EventCategory();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.iid = r.uint64();
                        break;
                    case 2:
                        m.name = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an EventCategory message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.EventCategory
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.EventCategory} EventCategory
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EventCategory.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an EventCategory message.
             * @function verify
             * @memberof perfetto.protos.EventCategory
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            EventCategory.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (!$util.isInteger(m.iid) && !(m.iid && $util.isInteger(m.iid.low) && $util.isInteger(m.iid.high)))
                        return "iid: integer|Long expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                return null;
            };

            /**
             * Creates an EventCategory message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.EventCategory
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.EventCategory} EventCategory
             */
            EventCategory.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.EventCategory)
                    return d;
                var m = new $root.perfetto.protos.EventCategory();
                if (d.iid != null) {
                    if ($util.Long)
                        (m.iid = $util.Long.fromValue(d.iid)).unsigned = true;
                    else if (typeof d.iid === "string")
                        m.iid = parseInt(d.iid, 10);
                    else if (typeof d.iid === "number")
                        m.iid = d.iid;
                    else if (typeof d.iid === "object")
                        m.iid = new $util.LongBits(d.iid.low >>> 0, d.iid.high >>> 0).toNumber(true);
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                return m;
            };

            /**
             * Creates a plain object from an EventCategory message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.EventCategory
             * @static
             * @param {perfetto.protos.EventCategory} m EventCategory
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            EventCategory.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.iid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.iid = o.longs === String ? "0" : 0;
                    d.name = "";
                }
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (typeof m.iid === "number")
                        d.iid = o.longs === String ? String(m.iid) : m.iid;
                    else
                        d.iid = o.longs === String ? $util.Long.prototype.toString.call(m.iid) : o.longs === Number ? new $util.LongBits(m.iid.low >>> 0, m.iid.high >>> 0).toNumber(true) : m.iid;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                return d;
            };

            /**
             * Converts this EventCategory to JSON.
             * @function toJSON
             * @memberof perfetto.protos.EventCategory
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            EventCategory.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return EventCategory;
        })();

        protos.EventName = (function() {

            /**
             * Properties of an EventName.
             * @memberof perfetto.protos
             * @interface IEventName
             * @property {number|null} [iid] EventName iid
             * @property {string|null} [name] EventName name
             */

            /**
             * Constructs a new EventName.
             * @memberof perfetto.protos
             * @classdesc Represents an EventName.
             * @implements IEventName
             * @constructor
             * @param {perfetto.protos.IEventName=} [p] Properties to set
             */
            function EventName(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * EventName iid.
             * @member {number} iid
             * @memberof perfetto.protos.EventName
             * @instance
             */
            EventName.prototype.iid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * EventName name.
             * @member {string} name
             * @memberof perfetto.protos.EventName
             * @instance
             */
            EventName.prototype.name = "";

            /**
             * Creates a new EventName instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.EventName
             * @static
             * @param {perfetto.protos.IEventName=} [properties] Properties to set
             * @returns {perfetto.protos.EventName} EventName instance
             */
            EventName.create = function create(properties) {
                return new EventName(properties);
            };

            /**
             * Encodes the specified EventName message. Does not implicitly {@link perfetto.protos.EventName.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.EventName
             * @static
             * @param {perfetto.protos.IEventName} m EventName message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EventName.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.iid != null && Object.hasOwnProperty.call(m, "iid"))
                    w.uint32(8).uint64(m.iid);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(18).string(m.name);
                return w;
            };

            /**
             * Encodes the specified EventName message, length delimited. Does not implicitly {@link perfetto.protos.EventName.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.EventName
             * @static
             * @param {perfetto.protos.IEventName} message EventName message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EventName.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an EventName message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.EventName
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.EventName} EventName
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EventName.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.EventName();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.iid = r.uint64();
                        break;
                    case 2:
                        m.name = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an EventName message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.EventName
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.EventName} EventName
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EventName.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an EventName message.
             * @function verify
             * @memberof perfetto.protos.EventName
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            EventName.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (!$util.isInteger(m.iid) && !(m.iid && $util.isInteger(m.iid.low) && $util.isInteger(m.iid.high)))
                        return "iid: integer|Long expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                return null;
            };

            /**
             * Creates an EventName message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.EventName
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.EventName} EventName
             */
            EventName.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.EventName)
                    return d;
                var m = new $root.perfetto.protos.EventName();
                if (d.iid != null) {
                    if ($util.Long)
                        (m.iid = $util.Long.fromValue(d.iid)).unsigned = true;
                    else if (typeof d.iid === "string")
                        m.iid = parseInt(d.iid, 10);
                    else if (typeof d.iid === "number")
                        m.iid = d.iid;
                    else if (typeof d.iid === "object")
                        m.iid = new $util.LongBits(d.iid.low >>> 0, d.iid.high >>> 0).toNumber(true);
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                return m;
            };

            /**
             * Creates a plain object from an EventName message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.EventName
             * @static
             * @param {perfetto.protos.EventName} m EventName
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            EventName.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.iid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.iid = o.longs === String ? "0" : 0;
                    d.name = "";
                }
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (typeof m.iid === "number")
                        d.iid = o.longs === String ? String(m.iid) : m.iid;
                    else
                        d.iid = o.longs === String ? $util.Long.prototype.toString.call(m.iid) : o.longs === Number ? new $util.LongBits(m.iid.low >>> 0, m.iid.high >>> 0).toNumber(true) : m.iid;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                return d;
            };

            /**
             * Converts this EventName to JSON.
             * @function toJSON
             * @memberof perfetto.protos.EventName
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            EventName.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return EventName;
        })();

        protos.TaskExecution = (function() {

            /**
             * Properties of a TaskExecution.
             * @memberof perfetto.protos
             * @interface ITaskExecution
             * @property {number|null} [postedFromIid] TaskExecution postedFromIid
             */

            /**
             * Constructs a new TaskExecution.
             * @memberof perfetto.protos
             * @classdesc Represents a TaskExecution.
             * @implements ITaskExecution
             * @constructor
             * @param {perfetto.protos.ITaskExecution=} [p] Properties to set
             */
            function TaskExecution(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TaskExecution postedFromIid.
             * @member {number} postedFromIid
             * @memberof perfetto.protos.TaskExecution
             * @instance
             */
            TaskExecution.prototype.postedFromIid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new TaskExecution instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TaskExecution
             * @static
             * @param {perfetto.protos.ITaskExecution=} [properties] Properties to set
             * @returns {perfetto.protos.TaskExecution} TaskExecution instance
             */
            TaskExecution.create = function create(properties) {
                return new TaskExecution(properties);
            };

            /**
             * Encodes the specified TaskExecution message. Does not implicitly {@link perfetto.protos.TaskExecution.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TaskExecution
             * @static
             * @param {perfetto.protos.ITaskExecution} m TaskExecution message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TaskExecution.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.postedFromIid != null && Object.hasOwnProperty.call(m, "postedFromIid"))
                    w.uint32(8).uint64(m.postedFromIid);
                return w;
            };

            /**
             * Encodes the specified TaskExecution message, length delimited. Does not implicitly {@link perfetto.protos.TaskExecution.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TaskExecution
             * @static
             * @param {perfetto.protos.ITaskExecution} message TaskExecution message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TaskExecution.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TaskExecution message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TaskExecution
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TaskExecution} TaskExecution
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TaskExecution.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TaskExecution();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.postedFromIid = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TaskExecution message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TaskExecution
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TaskExecution} TaskExecution
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TaskExecution.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TaskExecution message.
             * @function verify
             * @memberof perfetto.protos.TaskExecution
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TaskExecution.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.postedFromIid != null && m.hasOwnProperty("postedFromIid")) {
                    if (!$util.isInteger(m.postedFromIid) && !(m.postedFromIid && $util.isInteger(m.postedFromIid.low) && $util.isInteger(m.postedFromIid.high)))
                        return "postedFromIid: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a TaskExecution message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TaskExecution
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TaskExecution} TaskExecution
             */
            TaskExecution.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TaskExecution)
                    return d;
                var m = new $root.perfetto.protos.TaskExecution();
                if (d.postedFromIid != null) {
                    if ($util.Long)
                        (m.postedFromIid = $util.Long.fromValue(d.postedFromIid)).unsigned = true;
                    else if (typeof d.postedFromIid === "string")
                        m.postedFromIid = parseInt(d.postedFromIid, 10);
                    else if (typeof d.postedFromIid === "number")
                        m.postedFromIid = d.postedFromIid;
                    else if (typeof d.postedFromIid === "object")
                        m.postedFromIid = new $util.LongBits(d.postedFromIid.low >>> 0, d.postedFromIid.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a TaskExecution message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TaskExecution
             * @static
             * @param {perfetto.protos.TaskExecution} m TaskExecution
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TaskExecution.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.postedFromIid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.postedFromIid = o.longs === String ? "0" : 0;
                }
                if (m.postedFromIid != null && m.hasOwnProperty("postedFromIid")) {
                    if (typeof m.postedFromIid === "number")
                        d.postedFromIid = o.longs === String ? String(m.postedFromIid) : m.postedFromIid;
                    else
                        d.postedFromIid = o.longs === String ? $util.Long.prototype.toString.call(m.postedFromIid) : o.longs === Number ? new $util.LongBits(m.postedFromIid.low >>> 0, m.postedFromIid.high >>> 0).toNumber(true) : m.postedFromIid;
                }
                return d;
            };

            /**
             * Converts this TaskExecution to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TaskExecution
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TaskExecution.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TaskExecution;
        })();

        protos.ChromeActiveProcesses = (function() {

            /**
             * Properties of a ChromeActiveProcesses.
             * @memberof perfetto.protos
             * @interface IChromeActiveProcesses
             * @property {Array.<number>|null} [pid] ChromeActiveProcesses pid
             */

            /**
             * Constructs a new ChromeActiveProcesses.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeActiveProcesses.
             * @implements IChromeActiveProcesses
             * @constructor
             * @param {perfetto.protos.IChromeActiveProcesses=} [p] Properties to set
             */
            function ChromeActiveProcesses(p) {
                this.pid = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeActiveProcesses pid.
             * @member {Array.<number>} pid
             * @memberof perfetto.protos.ChromeActiveProcesses
             * @instance
             */
            ChromeActiveProcesses.prototype.pid = $util.emptyArray;

            /**
             * Creates a new ChromeActiveProcesses instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeActiveProcesses
             * @static
             * @param {perfetto.protos.IChromeActiveProcesses=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeActiveProcesses} ChromeActiveProcesses instance
             */
            ChromeActiveProcesses.create = function create(properties) {
                return new ChromeActiveProcesses(properties);
            };

            /**
             * Encodes the specified ChromeActiveProcesses message. Does not implicitly {@link perfetto.protos.ChromeActiveProcesses.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeActiveProcesses
             * @static
             * @param {perfetto.protos.IChromeActiveProcesses} m ChromeActiveProcesses message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeActiveProcesses.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.pid != null && m.pid.length) {
                    for (var i = 0; i < m.pid.length; ++i)
                        w.uint32(8).int32(m.pid[i]);
                }
                return w;
            };

            /**
             * Encodes the specified ChromeActiveProcesses message, length delimited. Does not implicitly {@link perfetto.protos.ChromeActiveProcesses.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeActiveProcesses
             * @static
             * @param {perfetto.protos.IChromeActiveProcesses} message ChromeActiveProcesses message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeActiveProcesses.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeActiveProcesses message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeActiveProcesses
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeActiveProcesses} ChromeActiveProcesses
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeActiveProcesses.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeActiveProcesses();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.pid && m.pid.length))
                            m.pid = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.pid.push(r.int32());
                        } else
                            m.pid.push(r.int32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeActiveProcesses message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeActiveProcesses
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeActiveProcesses} ChromeActiveProcesses
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeActiveProcesses.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeActiveProcesses message.
             * @function verify
             * @memberof perfetto.protos.ChromeActiveProcesses
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeActiveProcesses.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!Array.isArray(m.pid))
                        return "pid: array expected";
                    for (var i = 0; i < m.pid.length; ++i) {
                        if (!$util.isInteger(m.pid[i]))
                            return "pid: integer[] expected";
                    }
                }
                return null;
            };

            /**
             * Creates a ChromeActiveProcesses message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeActiveProcesses
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeActiveProcesses} ChromeActiveProcesses
             */
            ChromeActiveProcesses.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeActiveProcesses)
                    return d;
                var m = new $root.perfetto.protos.ChromeActiveProcesses();
                if (d.pid) {
                    if (!Array.isArray(d.pid))
                        throw TypeError(".perfetto.protos.ChromeActiveProcesses.pid: array expected");
                    m.pid = [];
                    for (var i = 0; i < d.pid.length; ++i) {
                        m.pid[i] = d.pid[i] | 0;
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeActiveProcesses message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeActiveProcesses
             * @static
             * @param {perfetto.protos.ChromeActiveProcesses} m ChromeActiveProcesses
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeActiveProcesses.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.pid = [];
                }
                if (m.pid && m.pid.length) {
                    d.pid = [];
                    for (var j = 0; j < m.pid.length; ++j) {
                        d.pid[j] = m.pid[j];
                    }
                }
                return d;
            };

            /**
             * Converts this ChromeActiveProcesses to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeActiveProcesses
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeActiveProcesses.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ChromeActiveProcesses;
        })();

        protos.ChromeApplicationStateInfo = (function() {

            /**
             * Properties of a ChromeApplicationStateInfo.
             * @memberof perfetto.protos
             * @interface IChromeApplicationStateInfo
             * @property {perfetto.protos.ChromeApplicationStateInfo.ChromeApplicationState|null} [applicationState] ChromeApplicationStateInfo applicationState
             */

            /**
             * Constructs a new ChromeApplicationStateInfo.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeApplicationStateInfo.
             * @implements IChromeApplicationStateInfo
             * @constructor
             * @param {perfetto.protos.IChromeApplicationStateInfo=} [p] Properties to set
             */
            function ChromeApplicationStateInfo(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeApplicationStateInfo applicationState.
             * @member {perfetto.protos.ChromeApplicationStateInfo.ChromeApplicationState} applicationState
             * @memberof perfetto.protos.ChromeApplicationStateInfo
             * @instance
             */
            ChromeApplicationStateInfo.prototype.applicationState = 0;

            /**
             * Creates a new ChromeApplicationStateInfo instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeApplicationStateInfo
             * @static
             * @param {perfetto.protos.IChromeApplicationStateInfo=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeApplicationStateInfo} ChromeApplicationStateInfo instance
             */
            ChromeApplicationStateInfo.create = function create(properties) {
                return new ChromeApplicationStateInfo(properties);
            };

            /**
             * Encodes the specified ChromeApplicationStateInfo message. Does not implicitly {@link perfetto.protos.ChromeApplicationStateInfo.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeApplicationStateInfo
             * @static
             * @param {perfetto.protos.IChromeApplicationStateInfo} m ChromeApplicationStateInfo message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeApplicationStateInfo.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.applicationState != null && Object.hasOwnProperty.call(m, "applicationState"))
                    w.uint32(8).int32(m.applicationState);
                return w;
            };

            /**
             * Encodes the specified ChromeApplicationStateInfo message, length delimited. Does not implicitly {@link perfetto.protos.ChromeApplicationStateInfo.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeApplicationStateInfo
             * @static
             * @param {perfetto.protos.IChromeApplicationStateInfo} message ChromeApplicationStateInfo message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeApplicationStateInfo.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeApplicationStateInfo message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeApplicationStateInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeApplicationStateInfo} ChromeApplicationStateInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeApplicationStateInfo.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeApplicationStateInfo();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.applicationState = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeApplicationStateInfo message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeApplicationStateInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeApplicationStateInfo} ChromeApplicationStateInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeApplicationStateInfo.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeApplicationStateInfo message.
             * @function verify
             * @memberof perfetto.protos.ChromeApplicationStateInfo
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeApplicationStateInfo.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.applicationState != null && m.hasOwnProperty("applicationState")) {
                    switch (m.applicationState) {
                    default:
                        return "applicationState: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates a ChromeApplicationStateInfo message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeApplicationStateInfo
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeApplicationStateInfo} ChromeApplicationStateInfo
             */
            ChromeApplicationStateInfo.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeApplicationStateInfo)
                    return d;
                var m = new $root.perfetto.protos.ChromeApplicationStateInfo();
                switch (d.applicationState) {
                case "APPLICATION_STATE_UNKNOWN":
                case 0:
                    m.applicationState = 0;
                    break;
                case "APPLICATION_STATE_HAS_RUNNING_ACTIVITIES":
                case 1:
                    m.applicationState = 1;
                    break;
                case "APPLICATION_STATE_HAS_PAUSED_ACTIVITIES":
                case 2:
                    m.applicationState = 2;
                    break;
                case "APPLICATION_STATE_HAS_STOPPED_ACTIVITIES":
                case 3:
                    m.applicationState = 3;
                    break;
                case "APPLICATION_STATE_HAS_DESTROYED_ACTIVITIES":
                case 4:
                    m.applicationState = 4;
                    break;
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeApplicationStateInfo message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeApplicationStateInfo
             * @static
             * @param {perfetto.protos.ChromeApplicationStateInfo} m ChromeApplicationStateInfo
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeApplicationStateInfo.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.applicationState = o.enums === String ? "APPLICATION_STATE_UNKNOWN" : 0;
                }
                if (m.applicationState != null && m.hasOwnProperty("applicationState")) {
                    d.applicationState = o.enums === String ? $root.perfetto.protos.ChromeApplicationStateInfo.ChromeApplicationState[m.applicationState] : m.applicationState;
                }
                return d;
            };

            /**
             * Converts this ChromeApplicationStateInfo to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeApplicationStateInfo
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeApplicationStateInfo.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * ChromeApplicationState enum.
             * @name perfetto.protos.ChromeApplicationStateInfo.ChromeApplicationState
             * @enum {number}
             * @property {number} APPLICATION_STATE_UNKNOWN=0 APPLICATION_STATE_UNKNOWN value
             * @property {number} APPLICATION_STATE_HAS_RUNNING_ACTIVITIES=1 APPLICATION_STATE_HAS_RUNNING_ACTIVITIES value
             * @property {number} APPLICATION_STATE_HAS_PAUSED_ACTIVITIES=2 APPLICATION_STATE_HAS_PAUSED_ACTIVITIES value
             * @property {number} APPLICATION_STATE_HAS_STOPPED_ACTIVITIES=3 APPLICATION_STATE_HAS_STOPPED_ACTIVITIES value
             * @property {number} APPLICATION_STATE_HAS_DESTROYED_ACTIVITIES=4 APPLICATION_STATE_HAS_DESTROYED_ACTIVITIES value
             */
            ChromeApplicationStateInfo.ChromeApplicationState = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "APPLICATION_STATE_UNKNOWN"] = 0;
                values[valuesById[1] = "APPLICATION_STATE_HAS_RUNNING_ACTIVITIES"] = 1;
                values[valuesById[2] = "APPLICATION_STATE_HAS_PAUSED_ACTIVITIES"] = 2;
                values[valuesById[3] = "APPLICATION_STATE_HAS_STOPPED_ACTIVITIES"] = 3;
                values[valuesById[4] = "APPLICATION_STATE_HAS_DESTROYED_ACTIVITIES"] = 4;
                return values;
            })();

            return ChromeApplicationStateInfo;
        })();

        /**
         * ChromeCompositorSchedulerAction enum.
         * @name perfetto.protos.ChromeCompositorSchedulerAction
         * @enum {number}
         * @property {number} CC_SCHEDULER_ACTION_UNSPECIFIED=0 CC_SCHEDULER_ACTION_UNSPECIFIED value
         * @property {number} CC_SCHEDULER_ACTION_NONE=1 CC_SCHEDULER_ACTION_NONE value
         * @property {number} CC_SCHEDULER_ACTION_SEND_BEGIN_MAIN_FRAME=2 CC_SCHEDULER_ACTION_SEND_BEGIN_MAIN_FRAME value
         * @property {number} CC_SCHEDULER_ACTION_COMMIT=3 CC_SCHEDULER_ACTION_COMMIT value
         * @property {number} CC_SCHEDULER_ACTION_ACTIVATE_SYNC_TREE=4 CC_SCHEDULER_ACTION_ACTIVATE_SYNC_TREE value
         * @property {number} CC_SCHEDULER_ACTION_DRAW_IF_POSSIBLE=5 CC_SCHEDULER_ACTION_DRAW_IF_POSSIBLE value
         * @property {number} CC_SCHEDULER_ACTION_DRAW_FORCED=6 CC_SCHEDULER_ACTION_DRAW_FORCED value
         * @property {number} CC_SCHEDULER_ACTION_DRAW_ABORT=7 CC_SCHEDULER_ACTION_DRAW_ABORT value
         * @property {number} CC_SCHEDULER_ACTION_BEGIN_LAYER_TREE_FRAME_SINK_CREATION=8 CC_SCHEDULER_ACTION_BEGIN_LAYER_TREE_FRAME_SINK_CREATION value
         * @property {number} CC_SCHEDULER_ACTION_PREPARE_TILES=9 CC_SCHEDULER_ACTION_PREPARE_TILES value
         * @property {number} CC_SCHEDULER_ACTION_INVALIDATE_LAYER_TREE_FRAME_SINK=10 CC_SCHEDULER_ACTION_INVALIDATE_LAYER_TREE_FRAME_SINK value
         * @property {number} CC_SCHEDULER_ACTION_PERFORM_IMPL_SIDE_INVALIDATION=11 CC_SCHEDULER_ACTION_PERFORM_IMPL_SIDE_INVALIDATION value
         * @property {number} CC_SCHEDULER_ACTION_NOTIFY_BEGIN_MAIN_FRAME_NOT_EXPECTED_UNTIL=12 CC_SCHEDULER_ACTION_NOTIFY_BEGIN_MAIN_FRAME_NOT_EXPECTED_UNTIL value
         * @property {number} CC_SCHEDULER_ACTION_NOTIFY_BEGIN_MAIN_FRAME_NOT_EXPECTED_SOON=13 CC_SCHEDULER_ACTION_NOTIFY_BEGIN_MAIN_FRAME_NOT_EXPECTED_SOON value
         */
        protos.ChromeCompositorSchedulerAction = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "CC_SCHEDULER_ACTION_UNSPECIFIED"] = 0;
            values[valuesById[1] = "CC_SCHEDULER_ACTION_NONE"] = 1;
            values[valuesById[2] = "CC_SCHEDULER_ACTION_SEND_BEGIN_MAIN_FRAME"] = 2;
            values[valuesById[3] = "CC_SCHEDULER_ACTION_COMMIT"] = 3;
            values[valuesById[4] = "CC_SCHEDULER_ACTION_ACTIVATE_SYNC_TREE"] = 4;
            values[valuesById[5] = "CC_SCHEDULER_ACTION_DRAW_IF_POSSIBLE"] = 5;
            values[valuesById[6] = "CC_SCHEDULER_ACTION_DRAW_FORCED"] = 6;
            values[valuesById[7] = "CC_SCHEDULER_ACTION_DRAW_ABORT"] = 7;
            values[valuesById[8] = "CC_SCHEDULER_ACTION_BEGIN_LAYER_TREE_FRAME_SINK_CREATION"] = 8;
            values[valuesById[9] = "CC_SCHEDULER_ACTION_PREPARE_TILES"] = 9;
            values[valuesById[10] = "CC_SCHEDULER_ACTION_INVALIDATE_LAYER_TREE_FRAME_SINK"] = 10;
            values[valuesById[11] = "CC_SCHEDULER_ACTION_PERFORM_IMPL_SIDE_INVALIDATION"] = 11;
            values[valuesById[12] = "CC_SCHEDULER_ACTION_NOTIFY_BEGIN_MAIN_FRAME_NOT_EXPECTED_UNTIL"] = 12;
            values[valuesById[13] = "CC_SCHEDULER_ACTION_NOTIFY_BEGIN_MAIN_FRAME_NOT_EXPECTED_SOON"] = 13;
            return values;
        })();

        protos.ChromeCompositorSchedulerState = (function() {

            /**
             * Properties of a ChromeCompositorSchedulerState.
             * @memberof perfetto.protos
             * @interface IChromeCompositorSchedulerState
             * @property {perfetto.protos.IChromeCompositorStateMachine|null} [stateMachine] ChromeCompositorSchedulerState stateMachine
             * @property {boolean|null} [observingBeginFrameSource] ChromeCompositorSchedulerState observingBeginFrameSource
             * @property {boolean|null} [beginImplFrameDeadlineTask] ChromeCompositorSchedulerState beginImplFrameDeadlineTask
             * @property {boolean|null} [pendingBeginFrameTask] ChromeCompositorSchedulerState pendingBeginFrameTask
             * @property {boolean|null} [skippedLastFrameMissedExceededDeadline] ChromeCompositorSchedulerState skippedLastFrameMissedExceededDeadline
             * @property {perfetto.protos.ChromeCompositorSchedulerAction|null} [insideAction] ChromeCompositorSchedulerState insideAction
             * @property {perfetto.protos.ChromeCompositorSchedulerState.BeginImplFrameDeadlineMode|null} [deadlineMode] ChromeCompositorSchedulerState deadlineMode
             * @property {number|null} [deadlineUs] ChromeCompositorSchedulerState deadlineUs
             * @property {number|null} [deadlineScheduledAtUs] ChromeCompositorSchedulerState deadlineScheduledAtUs
             * @property {number|null} [nowUs] ChromeCompositorSchedulerState nowUs
             * @property {number|null} [nowToDeadlineDeltaUs] ChromeCompositorSchedulerState nowToDeadlineDeltaUs
             * @property {number|null} [nowToDeadlineScheduledAtDeltaUs] ChromeCompositorSchedulerState nowToDeadlineScheduledAtDeltaUs
             * @property {perfetto.protos.IBeginImplFrameArgs|null} [beginImplFrameArgs] ChromeCompositorSchedulerState beginImplFrameArgs
             * @property {perfetto.protos.IBeginFrameObserverState|null} [beginFrameObserverState] ChromeCompositorSchedulerState beginFrameObserverState
             * @property {perfetto.protos.IBeginFrameSourceState|null} [beginFrameSourceState] ChromeCompositorSchedulerState beginFrameSourceState
             * @property {perfetto.protos.ICompositorTimingHistory|null} [compositorTimingHistory] ChromeCompositorSchedulerState compositorTimingHistory
             */

            /**
             * Constructs a new ChromeCompositorSchedulerState.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeCompositorSchedulerState.
             * @implements IChromeCompositorSchedulerState
             * @constructor
             * @param {perfetto.protos.IChromeCompositorSchedulerState=} [p] Properties to set
             */
            function ChromeCompositorSchedulerState(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeCompositorSchedulerState stateMachine.
             * @member {perfetto.protos.IChromeCompositorStateMachine|null|undefined} stateMachine
             * @memberof perfetto.protos.ChromeCompositorSchedulerState
             * @instance
             */
            ChromeCompositorSchedulerState.prototype.stateMachine = null;

            /**
             * ChromeCompositorSchedulerState observingBeginFrameSource.
             * @member {boolean} observingBeginFrameSource
             * @memberof perfetto.protos.ChromeCompositorSchedulerState
             * @instance
             */
            ChromeCompositorSchedulerState.prototype.observingBeginFrameSource = false;

            /**
             * ChromeCompositorSchedulerState beginImplFrameDeadlineTask.
             * @member {boolean} beginImplFrameDeadlineTask
             * @memberof perfetto.protos.ChromeCompositorSchedulerState
             * @instance
             */
            ChromeCompositorSchedulerState.prototype.beginImplFrameDeadlineTask = false;

            /**
             * ChromeCompositorSchedulerState pendingBeginFrameTask.
             * @member {boolean} pendingBeginFrameTask
             * @memberof perfetto.protos.ChromeCompositorSchedulerState
             * @instance
             */
            ChromeCompositorSchedulerState.prototype.pendingBeginFrameTask = false;

            /**
             * ChromeCompositorSchedulerState skippedLastFrameMissedExceededDeadline.
             * @member {boolean} skippedLastFrameMissedExceededDeadline
             * @memberof perfetto.protos.ChromeCompositorSchedulerState
             * @instance
             */
            ChromeCompositorSchedulerState.prototype.skippedLastFrameMissedExceededDeadline = false;

            /**
             * ChromeCompositorSchedulerState insideAction.
             * @member {perfetto.protos.ChromeCompositorSchedulerAction} insideAction
             * @memberof perfetto.protos.ChromeCompositorSchedulerState
             * @instance
             */
            ChromeCompositorSchedulerState.prototype.insideAction = 0;

            /**
             * ChromeCompositorSchedulerState deadlineMode.
             * @member {perfetto.protos.ChromeCompositorSchedulerState.BeginImplFrameDeadlineMode} deadlineMode
             * @memberof perfetto.protos.ChromeCompositorSchedulerState
             * @instance
             */
            ChromeCompositorSchedulerState.prototype.deadlineMode = 0;

            /**
             * ChromeCompositorSchedulerState deadlineUs.
             * @member {number} deadlineUs
             * @memberof perfetto.protos.ChromeCompositorSchedulerState
             * @instance
             */
            ChromeCompositorSchedulerState.prototype.deadlineUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ChromeCompositorSchedulerState deadlineScheduledAtUs.
             * @member {number} deadlineScheduledAtUs
             * @memberof perfetto.protos.ChromeCompositorSchedulerState
             * @instance
             */
            ChromeCompositorSchedulerState.prototype.deadlineScheduledAtUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ChromeCompositorSchedulerState nowUs.
             * @member {number} nowUs
             * @memberof perfetto.protos.ChromeCompositorSchedulerState
             * @instance
             */
            ChromeCompositorSchedulerState.prototype.nowUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ChromeCompositorSchedulerState nowToDeadlineDeltaUs.
             * @member {number} nowToDeadlineDeltaUs
             * @memberof perfetto.protos.ChromeCompositorSchedulerState
             * @instance
             */
            ChromeCompositorSchedulerState.prototype.nowToDeadlineDeltaUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ChromeCompositorSchedulerState nowToDeadlineScheduledAtDeltaUs.
             * @member {number} nowToDeadlineScheduledAtDeltaUs
             * @memberof perfetto.protos.ChromeCompositorSchedulerState
             * @instance
             */
            ChromeCompositorSchedulerState.prototype.nowToDeadlineScheduledAtDeltaUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ChromeCompositorSchedulerState beginImplFrameArgs.
             * @member {perfetto.protos.IBeginImplFrameArgs|null|undefined} beginImplFrameArgs
             * @memberof perfetto.protos.ChromeCompositorSchedulerState
             * @instance
             */
            ChromeCompositorSchedulerState.prototype.beginImplFrameArgs = null;

            /**
             * ChromeCompositorSchedulerState beginFrameObserverState.
             * @member {perfetto.protos.IBeginFrameObserverState|null|undefined} beginFrameObserverState
             * @memberof perfetto.protos.ChromeCompositorSchedulerState
             * @instance
             */
            ChromeCompositorSchedulerState.prototype.beginFrameObserverState = null;

            /**
             * ChromeCompositorSchedulerState beginFrameSourceState.
             * @member {perfetto.protos.IBeginFrameSourceState|null|undefined} beginFrameSourceState
             * @memberof perfetto.protos.ChromeCompositorSchedulerState
             * @instance
             */
            ChromeCompositorSchedulerState.prototype.beginFrameSourceState = null;

            /**
             * ChromeCompositorSchedulerState compositorTimingHistory.
             * @member {perfetto.protos.ICompositorTimingHistory|null|undefined} compositorTimingHistory
             * @memberof perfetto.protos.ChromeCompositorSchedulerState
             * @instance
             */
            ChromeCompositorSchedulerState.prototype.compositorTimingHistory = null;

            /**
             * Creates a new ChromeCompositorSchedulerState instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeCompositorSchedulerState
             * @static
             * @param {perfetto.protos.IChromeCompositorSchedulerState=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeCompositorSchedulerState} ChromeCompositorSchedulerState instance
             */
            ChromeCompositorSchedulerState.create = function create(properties) {
                return new ChromeCompositorSchedulerState(properties);
            };

            /**
             * Encodes the specified ChromeCompositorSchedulerState message. Does not implicitly {@link perfetto.protos.ChromeCompositorSchedulerState.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeCompositorSchedulerState
             * @static
             * @param {perfetto.protos.IChromeCompositorSchedulerState} m ChromeCompositorSchedulerState message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeCompositorSchedulerState.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.stateMachine != null && Object.hasOwnProperty.call(m, "stateMachine"))
                    $root.perfetto.protos.ChromeCompositorStateMachine.encode(m.stateMachine, w.uint32(10).fork()).ldelim();
                if (m.observingBeginFrameSource != null && Object.hasOwnProperty.call(m, "observingBeginFrameSource"))
                    w.uint32(16).bool(m.observingBeginFrameSource);
                if (m.beginImplFrameDeadlineTask != null && Object.hasOwnProperty.call(m, "beginImplFrameDeadlineTask"))
                    w.uint32(24).bool(m.beginImplFrameDeadlineTask);
                if (m.pendingBeginFrameTask != null && Object.hasOwnProperty.call(m, "pendingBeginFrameTask"))
                    w.uint32(32).bool(m.pendingBeginFrameTask);
                if (m.skippedLastFrameMissedExceededDeadline != null && Object.hasOwnProperty.call(m, "skippedLastFrameMissedExceededDeadline"))
                    w.uint32(40).bool(m.skippedLastFrameMissedExceededDeadline);
                if (m.insideAction != null && Object.hasOwnProperty.call(m, "insideAction"))
                    w.uint32(56).int32(m.insideAction);
                if (m.deadlineMode != null && Object.hasOwnProperty.call(m, "deadlineMode"))
                    w.uint32(64).int32(m.deadlineMode);
                if (m.deadlineUs != null && Object.hasOwnProperty.call(m, "deadlineUs"))
                    w.uint32(72).int64(m.deadlineUs);
                if (m.deadlineScheduledAtUs != null && Object.hasOwnProperty.call(m, "deadlineScheduledAtUs"))
                    w.uint32(80).int64(m.deadlineScheduledAtUs);
                if (m.nowUs != null && Object.hasOwnProperty.call(m, "nowUs"))
                    w.uint32(88).int64(m.nowUs);
                if (m.nowToDeadlineDeltaUs != null && Object.hasOwnProperty.call(m, "nowToDeadlineDeltaUs"))
                    w.uint32(96).int64(m.nowToDeadlineDeltaUs);
                if (m.nowToDeadlineScheduledAtDeltaUs != null && Object.hasOwnProperty.call(m, "nowToDeadlineScheduledAtDeltaUs"))
                    w.uint32(104).int64(m.nowToDeadlineScheduledAtDeltaUs);
                if (m.beginImplFrameArgs != null && Object.hasOwnProperty.call(m, "beginImplFrameArgs"))
                    $root.perfetto.protos.BeginImplFrameArgs.encode(m.beginImplFrameArgs, w.uint32(114).fork()).ldelim();
                if (m.beginFrameObserverState != null && Object.hasOwnProperty.call(m, "beginFrameObserverState"))
                    $root.perfetto.protos.BeginFrameObserverState.encode(m.beginFrameObserverState, w.uint32(122).fork()).ldelim();
                if (m.beginFrameSourceState != null && Object.hasOwnProperty.call(m, "beginFrameSourceState"))
                    $root.perfetto.protos.BeginFrameSourceState.encode(m.beginFrameSourceState, w.uint32(130).fork()).ldelim();
                if (m.compositorTimingHistory != null && Object.hasOwnProperty.call(m, "compositorTimingHistory"))
                    $root.perfetto.protos.CompositorTimingHistory.encode(m.compositorTimingHistory, w.uint32(138).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified ChromeCompositorSchedulerState message, length delimited. Does not implicitly {@link perfetto.protos.ChromeCompositorSchedulerState.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeCompositorSchedulerState
             * @static
             * @param {perfetto.protos.IChromeCompositorSchedulerState} message ChromeCompositorSchedulerState message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeCompositorSchedulerState.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeCompositorSchedulerState message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeCompositorSchedulerState
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeCompositorSchedulerState} ChromeCompositorSchedulerState
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeCompositorSchedulerState.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeCompositorSchedulerState();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.stateMachine = $root.perfetto.protos.ChromeCompositorStateMachine.decode(r, r.uint32());
                        break;
                    case 2:
                        m.observingBeginFrameSource = r.bool();
                        break;
                    case 3:
                        m.beginImplFrameDeadlineTask = r.bool();
                        break;
                    case 4:
                        m.pendingBeginFrameTask = r.bool();
                        break;
                    case 5:
                        m.skippedLastFrameMissedExceededDeadline = r.bool();
                        break;
                    case 7:
                        m.insideAction = r.int32();
                        break;
                    case 8:
                        m.deadlineMode = r.int32();
                        break;
                    case 9:
                        m.deadlineUs = r.int64();
                        break;
                    case 10:
                        m.deadlineScheduledAtUs = r.int64();
                        break;
                    case 11:
                        m.nowUs = r.int64();
                        break;
                    case 12:
                        m.nowToDeadlineDeltaUs = r.int64();
                        break;
                    case 13:
                        m.nowToDeadlineScheduledAtDeltaUs = r.int64();
                        break;
                    case 14:
                        m.beginImplFrameArgs = $root.perfetto.protos.BeginImplFrameArgs.decode(r, r.uint32());
                        break;
                    case 15:
                        m.beginFrameObserverState = $root.perfetto.protos.BeginFrameObserverState.decode(r, r.uint32());
                        break;
                    case 16:
                        m.beginFrameSourceState = $root.perfetto.protos.BeginFrameSourceState.decode(r, r.uint32());
                        break;
                    case 17:
                        m.compositorTimingHistory = $root.perfetto.protos.CompositorTimingHistory.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeCompositorSchedulerState message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeCompositorSchedulerState
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeCompositorSchedulerState} ChromeCompositorSchedulerState
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeCompositorSchedulerState.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeCompositorSchedulerState message.
             * @function verify
             * @memberof perfetto.protos.ChromeCompositorSchedulerState
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeCompositorSchedulerState.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.stateMachine != null && m.hasOwnProperty("stateMachine")) {
                    {
                        var e = $root.perfetto.protos.ChromeCompositorStateMachine.verify(m.stateMachine);
                        if (e)
                            return "stateMachine." + e;
                    }
                }
                if (m.observingBeginFrameSource != null && m.hasOwnProperty("observingBeginFrameSource")) {
                    if (typeof m.observingBeginFrameSource !== "boolean")
                        return "observingBeginFrameSource: boolean expected";
                }
                if (m.beginImplFrameDeadlineTask != null && m.hasOwnProperty("beginImplFrameDeadlineTask")) {
                    if (typeof m.beginImplFrameDeadlineTask !== "boolean")
                        return "beginImplFrameDeadlineTask: boolean expected";
                }
                if (m.pendingBeginFrameTask != null && m.hasOwnProperty("pendingBeginFrameTask")) {
                    if (typeof m.pendingBeginFrameTask !== "boolean")
                        return "pendingBeginFrameTask: boolean expected";
                }
                if (m.skippedLastFrameMissedExceededDeadline != null && m.hasOwnProperty("skippedLastFrameMissedExceededDeadline")) {
                    if (typeof m.skippedLastFrameMissedExceededDeadline !== "boolean")
                        return "skippedLastFrameMissedExceededDeadline: boolean expected";
                }
                if (m.insideAction != null && m.hasOwnProperty("insideAction")) {
                    switch (m.insideAction) {
                    default:
                        return "insideAction: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                    case 6:
                    case 7:
                    case 8:
                    case 9:
                    case 10:
                    case 11:
                    case 12:
                    case 13:
                        break;
                    }
                }
                if (m.deadlineMode != null && m.hasOwnProperty("deadlineMode")) {
                    switch (m.deadlineMode) {
                    default:
                        return "deadlineMode: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                        break;
                    }
                }
                if (m.deadlineUs != null && m.hasOwnProperty("deadlineUs")) {
                    if (!$util.isInteger(m.deadlineUs) && !(m.deadlineUs && $util.isInteger(m.deadlineUs.low) && $util.isInteger(m.deadlineUs.high)))
                        return "deadlineUs: integer|Long expected";
                }
                if (m.deadlineScheduledAtUs != null && m.hasOwnProperty("deadlineScheduledAtUs")) {
                    if (!$util.isInteger(m.deadlineScheduledAtUs) && !(m.deadlineScheduledAtUs && $util.isInteger(m.deadlineScheduledAtUs.low) && $util.isInteger(m.deadlineScheduledAtUs.high)))
                        return "deadlineScheduledAtUs: integer|Long expected";
                }
                if (m.nowUs != null && m.hasOwnProperty("nowUs")) {
                    if (!$util.isInteger(m.nowUs) && !(m.nowUs && $util.isInteger(m.nowUs.low) && $util.isInteger(m.nowUs.high)))
                        return "nowUs: integer|Long expected";
                }
                if (m.nowToDeadlineDeltaUs != null && m.hasOwnProperty("nowToDeadlineDeltaUs")) {
                    if (!$util.isInteger(m.nowToDeadlineDeltaUs) && !(m.nowToDeadlineDeltaUs && $util.isInteger(m.nowToDeadlineDeltaUs.low) && $util.isInteger(m.nowToDeadlineDeltaUs.high)))
                        return "nowToDeadlineDeltaUs: integer|Long expected";
                }
                if (m.nowToDeadlineScheduledAtDeltaUs != null && m.hasOwnProperty("nowToDeadlineScheduledAtDeltaUs")) {
                    if (!$util.isInteger(m.nowToDeadlineScheduledAtDeltaUs) && !(m.nowToDeadlineScheduledAtDeltaUs && $util.isInteger(m.nowToDeadlineScheduledAtDeltaUs.low) && $util.isInteger(m.nowToDeadlineScheduledAtDeltaUs.high)))
                        return "nowToDeadlineScheduledAtDeltaUs: integer|Long expected";
                }
                if (m.beginImplFrameArgs != null && m.hasOwnProperty("beginImplFrameArgs")) {
                    {
                        var e = $root.perfetto.protos.BeginImplFrameArgs.verify(m.beginImplFrameArgs);
                        if (e)
                            return "beginImplFrameArgs." + e;
                    }
                }
                if (m.beginFrameObserverState != null && m.hasOwnProperty("beginFrameObserverState")) {
                    {
                        var e = $root.perfetto.protos.BeginFrameObserverState.verify(m.beginFrameObserverState);
                        if (e)
                            return "beginFrameObserverState." + e;
                    }
                }
                if (m.beginFrameSourceState != null && m.hasOwnProperty("beginFrameSourceState")) {
                    {
                        var e = $root.perfetto.protos.BeginFrameSourceState.verify(m.beginFrameSourceState);
                        if (e)
                            return "beginFrameSourceState." + e;
                    }
                }
                if (m.compositorTimingHistory != null && m.hasOwnProperty("compositorTimingHistory")) {
                    {
                        var e = $root.perfetto.protos.CompositorTimingHistory.verify(m.compositorTimingHistory);
                        if (e)
                            return "compositorTimingHistory." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a ChromeCompositorSchedulerState message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeCompositorSchedulerState
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeCompositorSchedulerState} ChromeCompositorSchedulerState
             */
            ChromeCompositorSchedulerState.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeCompositorSchedulerState)
                    return d;
                var m = new $root.perfetto.protos.ChromeCompositorSchedulerState();
                if (d.stateMachine != null) {
                    if (typeof d.stateMachine !== "object")
                        throw TypeError(".perfetto.protos.ChromeCompositorSchedulerState.stateMachine: object expected");
                    m.stateMachine = $root.perfetto.protos.ChromeCompositorStateMachine.fromObject(d.stateMachine);
                }
                if (d.observingBeginFrameSource != null) {
                    m.observingBeginFrameSource = Boolean(d.observingBeginFrameSource);
                }
                if (d.beginImplFrameDeadlineTask != null) {
                    m.beginImplFrameDeadlineTask = Boolean(d.beginImplFrameDeadlineTask);
                }
                if (d.pendingBeginFrameTask != null) {
                    m.pendingBeginFrameTask = Boolean(d.pendingBeginFrameTask);
                }
                if (d.skippedLastFrameMissedExceededDeadline != null) {
                    m.skippedLastFrameMissedExceededDeadline = Boolean(d.skippedLastFrameMissedExceededDeadline);
                }
                switch (d.insideAction) {
                case "CC_SCHEDULER_ACTION_UNSPECIFIED":
                case 0:
                    m.insideAction = 0;
                    break;
                case "CC_SCHEDULER_ACTION_NONE":
                case 1:
                    m.insideAction = 1;
                    break;
                case "CC_SCHEDULER_ACTION_SEND_BEGIN_MAIN_FRAME":
                case 2:
                    m.insideAction = 2;
                    break;
                case "CC_SCHEDULER_ACTION_COMMIT":
                case 3:
                    m.insideAction = 3;
                    break;
                case "CC_SCHEDULER_ACTION_ACTIVATE_SYNC_TREE":
                case 4:
                    m.insideAction = 4;
                    break;
                case "CC_SCHEDULER_ACTION_DRAW_IF_POSSIBLE":
                case 5:
                    m.insideAction = 5;
                    break;
                case "CC_SCHEDULER_ACTION_DRAW_FORCED":
                case 6:
                    m.insideAction = 6;
                    break;
                case "CC_SCHEDULER_ACTION_DRAW_ABORT":
                case 7:
                    m.insideAction = 7;
                    break;
                case "CC_SCHEDULER_ACTION_BEGIN_LAYER_TREE_FRAME_SINK_CREATION":
                case 8:
                    m.insideAction = 8;
                    break;
                case "CC_SCHEDULER_ACTION_PREPARE_TILES":
                case 9:
                    m.insideAction = 9;
                    break;
                case "CC_SCHEDULER_ACTION_INVALIDATE_LAYER_TREE_FRAME_SINK":
                case 10:
                    m.insideAction = 10;
                    break;
                case "CC_SCHEDULER_ACTION_PERFORM_IMPL_SIDE_INVALIDATION":
                case 11:
                    m.insideAction = 11;
                    break;
                case "CC_SCHEDULER_ACTION_NOTIFY_BEGIN_MAIN_FRAME_NOT_EXPECTED_UNTIL":
                case 12:
                    m.insideAction = 12;
                    break;
                case "CC_SCHEDULER_ACTION_NOTIFY_BEGIN_MAIN_FRAME_NOT_EXPECTED_SOON":
                case 13:
                    m.insideAction = 13;
                    break;
                }
                switch (d.deadlineMode) {
                case "DEADLINE_MODE_UNSPECIFIED":
                case 0:
                    m.deadlineMode = 0;
                    break;
                case "DEADLINE_MODE_NONE":
                case 1:
                    m.deadlineMode = 1;
                    break;
                case "DEADLINE_MODE_IMMEDIATE":
                case 2:
                    m.deadlineMode = 2;
                    break;
                case "DEADLINE_MODE_REGULAR":
                case 3:
                    m.deadlineMode = 3;
                    break;
                case "DEADLINE_MODE_LATE":
                case 4:
                    m.deadlineMode = 4;
                    break;
                case "DEADLINE_MODE_BLOCKED":
                case 5:
                    m.deadlineMode = 5;
                    break;
                }
                if (d.deadlineUs != null) {
                    if ($util.Long)
                        (m.deadlineUs = $util.Long.fromValue(d.deadlineUs)).unsigned = false;
                    else if (typeof d.deadlineUs === "string")
                        m.deadlineUs = parseInt(d.deadlineUs, 10);
                    else if (typeof d.deadlineUs === "number")
                        m.deadlineUs = d.deadlineUs;
                    else if (typeof d.deadlineUs === "object")
                        m.deadlineUs = new $util.LongBits(d.deadlineUs.low >>> 0, d.deadlineUs.high >>> 0).toNumber();
                }
                if (d.deadlineScheduledAtUs != null) {
                    if ($util.Long)
                        (m.deadlineScheduledAtUs = $util.Long.fromValue(d.deadlineScheduledAtUs)).unsigned = false;
                    else if (typeof d.deadlineScheduledAtUs === "string")
                        m.deadlineScheduledAtUs = parseInt(d.deadlineScheduledAtUs, 10);
                    else if (typeof d.deadlineScheduledAtUs === "number")
                        m.deadlineScheduledAtUs = d.deadlineScheduledAtUs;
                    else if (typeof d.deadlineScheduledAtUs === "object")
                        m.deadlineScheduledAtUs = new $util.LongBits(d.deadlineScheduledAtUs.low >>> 0, d.deadlineScheduledAtUs.high >>> 0).toNumber();
                }
                if (d.nowUs != null) {
                    if ($util.Long)
                        (m.nowUs = $util.Long.fromValue(d.nowUs)).unsigned = false;
                    else if (typeof d.nowUs === "string")
                        m.nowUs = parseInt(d.nowUs, 10);
                    else if (typeof d.nowUs === "number")
                        m.nowUs = d.nowUs;
                    else if (typeof d.nowUs === "object")
                        m.nowUs = new $util.LongBits(d.nowUs.low >>> 0, d.nowUs.high >>> 0).toNumber();
                }
                if (d.nowToDeadlineDeltaUs != null) {
                    if ($util.Long)
                        (m.nowToDeadlineDeltaUs = $util.Long.fromValue(d.nowToDeadlineDeltaUs)).unsigned = false;
                    else if (typeof d.nowToDeadlineDeltaUs === "string")
                        m.nowToDeadlineDeltaUs = parseInt(d.nowToDeadlineDeltaUs, 10);
                    else if (typeof d.nowToDeadlineDeltaUs === "number")
                        m.nowToDeadlineDeltaUs = d.nowToDeadlineDeltaUs;
                    else if (typeof d.nowToDeadlineDeltaUs === "object")
                        m.nowToDeadlineDeltaUs = new $util.LongBits(d.nowToDeadlineDeltaUs.low >>> 0, d.nowToDeadlineDeltaUs.high >>> 0).toNumber();
                }
                if (d.nowToDeadlineScheduledAtDeltaUs != null) {
                    if ($util.Long)
                        (m.nowToDeadlineScheduledAtDeltaUs = $util.Long.fromValue(d.nowToDeadlineScheduledAtDeltaUs)).unsigned = false;
                    else if (typeof d.nowToDeadlineScheduledAtDeltaUs === "string")
                        m.nowToDeadlineScheduledAtDeltaUs = parseInt(d.nowToDeadlineScheduledAtDeltaUs, 10);
                    else if (typeof d.nowToDeadlineScheduledAtDeltaUs === "number")
                        m.nowToDeadlineScheduledAtDeltaUs = d.nowToDeadlineScheduledAtDeltaUs;
                    else if (typeof d.nowToDeadlineScheduledAtDeltaUs === "object")
                        m.nowToDeadlineScheduledAtDeltaUs = new $util.LongBits(d.nowToDeadlineScheduledAtDeltaUs.low >>> 0, d.nowToDeadlineScheduledAtDeltaUs.high >>> 0).toNumber();
                }
                if (d.beginImplFrameArgs != null) {
                    if (typeof d.beginImplFrameArgs !== "object")
                        throw TypeError(".perfetto.protos.ChromeCompositorSchedulerState.beginImplFrameArgs: object expected");
                    m.beginImplFrameArgs = $root.perfetto.protos.BeginImplFrameArgs.fromObject(d.beginImplFrameArgs);
                }
                if (d.beginFrameObserverState != null) {
                    if (typeof d.beginFrameObserverState !== "object")
                        throw TypeError(".perfetto.protos.ChromeCompositorSchedulerState.beginFrameObserverState: object expected");
                    m.beginFrameObserverState = $root.perfetto.protos.BeginFrameObserverState.fromObject(d.beginFrameObserverState);
                }
                if (d.beginFrameSourceState != null) {
                    if (typeof d.beginFrameSourceState !== "object")
                        throw TypeError(".perfetto.protos.ChromeCompositorSchedulerState.beginFrameSourceState: object expected");
                    m.beginFrameSourceState = $root.perfetto.protos.BeginFrameSourceState.fromObject(d.beginFrameSourceState);
                }
                if (d.compositorTimingHistory != null) {
                    if (typeof d.compositorTimingHistory !== "object")
                        throw TypeError(".perfetto.protos.ChromeCompositorSchedulerState.compositorTimingHistory: object expected");
                    m.compositorTimingHistory = $root.perfetto.protos.CompositorTimingHistory.fromObject(d.compositorTimingHistory);
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeCompositorSchedulerState message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeCompositorSchedulerState
             * @static
             * @param {perfetto.protos.ChromeCompositorSchedulerState} m ChromeCompositorSchedulerState
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeCompositorSchedulerState.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.stateMachine = null;
                    d.observingBeginFrameSource = false;
                    d.beginImplFrameDeadlineTask = false;
                    d.pendingBeginFrameTask = false;
                    d.skippedLastFrameMissedExceededDeadline = false;
                    d.insideAction = o.enums === String ? "CC_SCHEDULER_ACTION_UNSPECIFIED" : 0;
                    d.deadlineMode = o.enums === String ? "DEADLINE_MODE_UNSPECIFIED" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.deadlineUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.deadlineUs = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.deadlineScheduledAtUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.deadlineScheduledAtUs = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.nowUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.nowUs = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.nowToDeadlineDeltaUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.nowToDeadlineDeltaUs = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.nowToDeadlineScheduledAtDeltaUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.nowToDeadlineScheduledAtDeltaUs = o.longs === String ? "0" : 0;
                    d.beginImplFrameArgs = null;
                    d.beginFrameObserverState = null;
                    d.beginFrameSourceState = null;
                    d.compositorTimingHistory = null;
                }
                if (m.stateMachine != null && m.hasOwnProperty("stateMachine")) {
                    d.stateMachine = $root.perfetto.protos.ChromeCompositorStateMachine.toObject(m.stateMachine, o);
                }
                if (m.observingBeginFrameSource != null && m.hasOwnProperty("observingBeginFrameSource")) {
                    d.observingBeginFrameSource = m.observingBeginFrameSource;
                }
                if (m.beginImplFrameDeadlineTask != null && m.hasOwnProperty("beginImplFrameDeadlineTask")) {
                    d.beginImplFrameDeadlineTask = m.beginImplFrameDeadlineTask;
                }
                if (m.pendingBeginFrameTask != null && m.hasOwnProperty("pendingBeginFrameTask")) {
                    d.pendingBeginFrameTask = m.pendingBeginFrameTask;
                }
                if (m.skippedLastFrameMissedExceededDeadline != null && m.hasOwnProperty("skippedLastFrameMissedExceededDeadline")) {
                    d.skippedLastFrameMissedExceededDeadline = m.skippedLastFrameMissedExceededDeadline;
                }
                if (m.insideAction != null && m.hasOwnProperty("insideAction")) {
                    d.insideAction = o.enums === String ? $root.perfetto.protos.ChromeCompositorSchedulerAction[m.insideAction] : m.insideAction;
                }
                if (m.deadlineMode != null && m.hasOwnProperty("deadlineMode")) {
                    d.deadlineMode = o.enums === String ? $root.perfetto.protos.ChromeCompositorSchedulerState.BeginImplFrameDeadlineMode[m.deadlineMode] : m.deadlineMode;
                }
                if (m.deadlineUs != null && m.hasOwnProperty("deadlineUs")) {
                    if (typeof m.deadlineUs === "number")
                        d.deadlineUs = o.longs === String ? String(m.deadlineUs) : m.deadlineUs;
                    else
                        d.deadlineUs = o.longs === String ? $util.Long.prototype.toString.call(m.deadlineUs) : o.longs === Number ? new $util.LongBits(m.deadlineUs.low >>> 0, m.deadlineUs.high >>> 0).toNumber() : m.deadlineUs;
                }
                if (m.deadlineScheduledAtUs != null && m.hasOwnProperty("deadlineScheduledAtUs")) {
                    if (typeof m.deadlineScheduledAtUs === "number")
                        d.deadlineScheduledAtUs = o.longs === String ? String(m.deadlineScheduledAtUs) : m.deadlineScheduledAtUs;
                    else
                        d.deadlineScheduledAtUs = o.longs === String ? $util.Long.prototype.toString.call(m.deadlineScheduledAtUs) : o.longs === Number ? new $util.LongBits(m.deadlineScheduledAtUs.low >>> 0, m.deadlineScheduledAtUs.high >>> 0).toNumber() : m.deadlineScheduledAtUs;
                }
                if (m.nowUs != null && m.hasOwnProperty("nowUs")) {
                    if (typeof m.nowUs === "number")
                        d.nowUs = o.longs === String ? String(m.nowUs) : m.nowUs;
                    else
                        d.nowUs = o.longs === String ? $util.Long.prototype.toString.call(m.nowUs) : o.longs === Number ? new $util.LongBits(m.nowUs.low >>> 0, m.nowUs.high >>> 0).toNumber() : m.nowUs;
                }
                if (m.nowToDeadlineDeltaUs != null && m.hasOwnProperty("nowToDeadlineDeltaUs")) {
                    if (typeof m.nowToDeadlineDeltaUs === "number")
                        d.nowToDeadlineDeltaUs = o.longs === String ? String(m.nowToDeadlineDeltaUs) : m.nowToDeadlineDeltaUs;
                    else
                        d.nowToDeadlineDeltaUs = o.longs === String ? $util.Long.prototype.toString.call(m.nowToDeadlineDeltaUs) : o.longs === Number ? new $util.LongBits(m.nowToDeadlineDeltaUs.low >>> 0, m.nowToDeadlineDeltaUs.high >>> 0).toNumber() : m.nowToDeadlineDeltaUs;
                }
                if (m.nowToDeadlineScheduledAtDeltaUs != null && m.hasOwnProperty("nowToDeadlineScheduledAtDeltaUs")) {
                    if (typeof m.nowToDeadlineScheduledAtDeltaUs === "number")
                        d.nowToDeadlineScheduledAtDeltaUs = o.longs === String ? String(m.nowToDeadlineScheduledAtDeltaUs) : m.nowToDeadlineScheduledAtDeltaUs;
                    else
                        d.nowToDeadlineScheduledAtDeltaUs = o.longs === String ? $util.Long.prototype.toString.call(m.nowToDeadlineScheduledAtDeltaUs) : o.longs === Number ? new $util.LongBits(m.nowToDeadlineScheduledAtDeltaUs.low >>> 0, m.nowToDeadlineScheduledAtDeltaUs.high >>> 0).toNumber() : m.nowToDeadlineScheduledAtDeltaUs;
                }
                if (m.beginImplFrameArgs != null && m.hasOwnProperty("beginImplFrameArgs")) {
                    d.beginImplFrameArgs = $root.perfetto.protos.BeginImplFrameArgs.toObject(m.beginImplFrameArgs, o);
                }
                if (m.beginFrameObserverState != null && m.hasOwnProperty("beginFrameObserverState")) {
                    d.beginFrameObserverState = $root.perfetto.protos.BeginFrameObserverState.toObject(m.beginFrameObserverState, o);
                }
                if (m.beginFrameSourceState != null && m.hasOwnProperty("beginFrameSourceState")) {
                    d.beginFrameSourceState = $root.perfetto.protos.BeginFrameSourceState.toObject(m.beginFrameSourceState, o);
                }
                if (m.compositorTimingHistory != null && m.hasOwnProperty("compositorTimingHistory")) {
                    d.compositorTimingHistory = $root.perfetto.protos.CompositorTimingHistory.toObject(m.compositorTimingHistory, o);
                }
                return d;
            };

            /**
             * Converts this ChromeCompositorSchedulerState to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeCompositorSchedulerState
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeCompositorSchedulerState.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * BeginImplFrameDeadlineMode enum.
             * @name perfetto.protos.ChromeCompositorSchedulerState.BeginImplFrameDeadlineMode
             * @enum {number}
             * @property {number} DEADLINE_MODE_UNSPECIFIED=0 DEADLINE_MODE_UNSPECIFIED value
             * @property {number} DEADLINE_MODE_NONE=1 DEADLINE_MODE_NONE value
             * @property {number} DEADLINE_MODE_IMMEDIATE=2 DEADLINE_MODE_IMMEDIATE value
             * @property {number} DEADLINE_MODE_REGULAR=3 DEADLINE_MODE_REGULAR value
             * @property {number} DEADLINE_MODE_LATE=4 DEADLINE_MODE_LATE value
             * @property {number} DEADLINE_MODE_BLOCKED=5 DEADLINE_MODE_BLOCKED value
             */
            ChromeCompositorSchedulerState.BeginImplFrameDeadlineMode = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "DEADLINE_MODE_UNSPECIFIED"] = 0;
                values[valuesById[1] = "DEADLINE_MODE_NONE"] = 1;
                values[valuesById[2] = "DEADLINE_MODE_IMMEDIATE"] = 2;
                values[valuesById[3] = "DEADLINE_MODE_REGULAR"] = 3;
                values[valuesById[4] = "DEADLINE_MODE_LATE"] = 4;
                values[valuesById[5] = "DEADLINE_MODE_BLOCKED"] = 5;
                return values;
            })();

            return ChromeCompositorSchedulerState;
        })();

        protos.ChromeCompositorStateMachine = (function() {

            /**
             * Properties of a ChromeCompositorStateMachine.
             * @memberof perfetto.protos
             * @interface IChromeCompositorStateMachine
             * @property {perfetto.protos.ChromeCompositorStateMachine.IMajorState|null} [majorState] ChromeCompositorStateMachine majorState
             * @property {perfetto.protos.ChromeCompositorStateMachine.IMinorState|null} [minorState] ChromeCompositorStateMachine minorState
             */

            /**
             * Constructs a new ChromeCompositorStateMachine.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeCompositorStateMachine.
             * @implements IChromeCompositorStateMachine
             * @constructor
             * @param {perfetto.protos.IChromeCompositorStateMachine=} [p] Properties to set
             */
            function ChromeCompositorStateMachine(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeCompositorStateMachine majorState.
             * @member {perfetto.protos.ChromeCompositorStateMachine.IMajorState|null|undefined} majorState
             * @memberof perfetto.protos.ChromeCompositorStateMachine
             * @instance
             */
            ChromeCompositorStateMachine.prototype.majorState = null;

            /**
             * ChromeCompositorStateMachine minorState.
             * @member {perfetto.protos.ChromeCompositorStateMachine.IMinorState|null|undefined} minorState
             * @memberof perfetto.protos.ChromeCompositorStateMachine
             * @instance
             */
            ChromeCompositorStateMachine.prototype.minorState = null;

            /**
             * Creates a new ChromeCompositorStateMachine instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeCompositorStateMachine
             * @static
             * @param {perfetto.protos.IChromeCompositorStateMachine=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeCompositorStateMachine} ChromeCompositorStateMachine instance
             */
            ChromeCompositorStateMachine.create = function create(properties) {
                return new ChromeCompositorStateMachine(properties);
            };

            /**
             * Encodes the specified ChromeCompositorStateMachine message. Does not implicitly {@link perfetto.protos.ChromeCompositorStateMachine.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeCompositorStateMachine
             * @static
             * @param {perfetto.protos.IChromeCompositorStateMachine} m ChromeCompositorStateMachine message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeCompositorStateMachine.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.majorState != null && Object.hasOwnProperty.call(m, "majorState"))
                    $root.perfetto.protos.ChromeCompositorStateMachine.MajorState.encode(m.majorState, w.uint32(10).fork()).ldelim();
                if (m.minorState != null && Object.hasOwnProperty.call(m, "minorState"))
                    $root.perfetto.protos.ChromeCompositorStateMachine.MinorState.encode(m.minorState, w.uint32(18).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified ChromeCompositorStateMachine message, length delimited. Does not implicitly {@link perfetto.protos.ChromeCompositorStateMachine.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeCompositorStateMachine
             * @static
             * @param {perfetto.protos.IChromeCompositorStateMachine} message ChromeCompositorStateMachine message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeCompositorStateMachine.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeCompositorStateMachine message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeCompositorStateMachine
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeCompositorStateMachine} ChromeCompositorStateMachine
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeCompositorStateMachine.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeCompositorStateMachine();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.majorState = $root.perfetto.protos.ChromeCompositorStateMachine.MajorState.decode(r, r.uint32());
                        break;
                    case 2:
                        m.minorState = $root.perfetto.protos.ChromeCompositorStateMachine.MinorState.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeCompositorStateMachine message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeCompositorStateMachine
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeCompositorStateMachine} ChromeCompositorStateMachine
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeCompositorStateMachine.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeCompositorStateMachine message.
             * @function verify
             * @memberof perfetto.protos.ChromeCompositorStateMachine
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeCompositorStateMachine.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.majorState != null && m.hasOwnProperty("majorState")) {
                    {
                        var e = $root.perfetto.protos.ChromeCompositorStateMachine.MajorState.verify(m.majorState);
                        if (e)
                            return "majorState." + e;
                    }
                }
                if (m.minorState != null && m.hasOwnProperty("minorState")) {
                    {
                        var e = $root.perfetto.protos.ChromeCompositorStateMachine.MinorState.verify(m.minorState);
                        if (e)
                            return "minorState." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a ChromeCompositorStateMachine message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeCompositorStateMachine
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeCompositorStateMachine} ChromeCompositorStateMachine
             */
            ChromeCompositorStateMachine.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeCompositorStateMachine)
                    return d;
                var m = new $root.perfetto.protos.ChromeCompositorStateMachine();
                if (d.majorState != null) {
                    if (typeof d.majorState !== "object")
                        throw TypeError(".perfetto.protos.ChromeCompositorStateMachine.majorState: object expected");
                    m.majorState = $root.perfetto.protos.ChromeCompositorStateMachine.MajorState.fromObject(d.majorState);
                }
                if (d.minorState != null) {
                    if (typeof d.minorState !== "object")
                        throw TypeError(".perfetto.protos.ChromeCompositorStateMachine.minorState: object expected");
                    m.minorState = $root.perfetto.protos.ChromeCompositorStateMachine.MinorState.fromObject(d.minorState);
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeCompositorStateMachine message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeCompositorStateMachine
             * @static
             * @param {perfetto.protos.ChromeCompositorStateMachine} m ChromeCompositorStateMachine
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeCompositorStateMachine.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.majorState = null;
                    d.minorState = null;
                }
                if (m.majorState != null && m.hasOwnProperty("majorState")) {
                    d.majorState = $root.perfetto.protos.ChromeCompositorStateMachine.MajorState.toObject(m.majorState, o);
                }
                if (m.minorState != null && m.hasOwnProperty("minorState")) {
                    d.minorState = $root.perfetto.protos.ChromeCompositorStateMachine.MinorState.toObject(m.minorState, o);
                }
                return d;
            };

            /**
             * Converts this ChromeCompositorStateMachine to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeCompositorStateMachine
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeCompositorStateMachine.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            ChromeCompositorStateMachine.MajorState = (function() {

                /**
                 * Properties of a MajorState.
                 * @memberof perfetto.protos.ChromeCompositorStateMachine
                 * @interface IMajorState
                 * @property {perfetto.protos.ChromeCompositorSchedulerAction|null} [nextAction] MajorState nextAction
                 * @property {perfetto.protos.ChromeCompositorStateMachine.MajorState.BeginImplFrameState|null} [beginImplFrameState] MajorState beginImplFrameState
                 * @property {perfetto.protos.ChromeCompositorStateMachine.MajorState.BeginMainFrameState|null} [beginMainFrameState] MajorState beginMainFrameState
                 * @property {perfetto.protos.ChromeCompositorStateMachine.MajorState.LayerTreeFrameSinkState|null} [layerTreeFrameSinkState] MajorState layerTreeFrameSinkState
                 * @property {perfetto.protos.ChromeCompositorStateMachine.MajorState.ForcedRedrawOnTimeoutState|null} [forcedRedrawState] MajorState forcedRedrawState
                 */

                /**
                 * Constructs a new MajorState.
                 * @memberof perfetto.protos.ChromeCompositorStateMachine
                 * @classdesc Represents a MajorState.
                 * @implements IMajorState
                 * @constructor
                 * @param {perfetto.protos.ChromeCompositorStateMachine.IMajorState=} [p] Properties to set
                 */
                function MajorState(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * MajorState nextAction.
                 * @member {perfetto.protos.ChromeCompositorSchedulerAction} nextAction
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MajorState
                 * @instance
                 */
                MajorState.prototype.nextAction = 0;

                /**
                 * MajorState beginImplFrameState.
                 * @member {perfetto.protos.ChromeCompositorStateMachine.MajorState.BeginImplFrameState} beginImplFrameState
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MajorState
                 * @instance
                 */
                MajorState.prototype.beginImplFrameState = 0;

                /**
                 * MajorState beginMainFrameState.
                 * @member {perfetto.protos.ChromeCompositorStateMachine.MajorState.BeginMainFrameState} beginMainFrameState
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MajorState
                 * @instance
                 */
                MajorState.prototype.beginMainFrameState = 0;

                /**
                 * MajorState layerTreeFrameSinkState.
                 * @member {perfetto.protos.ChromeCompositorStateMachine.MajorState.LayerTreeFrameSinkState} layerTreeFrameSinkState
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MajorState
                 * @instance
                 */
                MajorState.prototype.layerTreeFrameSinkState = 0;

                /**
                 * MajorState forcedRedrawState.
                 * @member {perfetto.protos.ChromeCompositorStateMachine.MajorState.ForcedRedrawOnTimeoutState} forcedRedrawState
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MajorState
                 * @instance
                 */
                MajorState.prototype.forcedRedrawState = 0;

                /**
                 * Creates a new MajorState instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MajorState
                 * @static
                 * @param {perfetto.protos.ChromeCompositorStateMachine.IMajorState=} [properties] Properties to set
                 * @returns {perfetto.protos.ChromeCompositorStateMachine.MajorState} MajorState instance
                 */
                MajorState.create = function create(properties) {
                    return new MajorState(properties);
                };

                /**
                 * Encodes the specified MajorState message. Does not implicitly {@link perfetto.protos.ChromeCompositorStateMachine.MajorState.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MajorState
                 * @static
                 * @param {perfetto.protos.ChromeCompositorStateMachine.IMajorState} m MajorState message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                MajorState.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.nextAction != null && Object.hasOwnProperty.call(m, "nextAction"))
                        w.uint32(8).int32(m.nextAction);
                    if (m.beginImplFrameState != null && Object.hasOwnProperty.call(m, "beginImplFrameState"))
                        w.uint32(16).int32(m.beginImplFrameState);
                    if (m.beginMainFrameState != null && Object.hasOwnProperty.call(m, "beginMainFrameState"))
                        w.uint32(24).int32(m.beginMainFrameState);
                    if (m.layerTreeFrameSinkState != null && Object.hasOwnProperty.call(m, "layerTreeFrameSinkState"))
                        w.uint32(32).int32(m.layerTreeFrameSinkState);
                    if (m.forcedRedrawState != null && Object.hasOwnProperty.call(m, "forcedRedrawState"))
                        w.uint32(40).int32(m.forcedRedrawState);
                    return w;
                };

                /**
                 * Encodes the specified MajorState message, length delimited. Does not implicitly {@link perfetto.protos.ChromeCompositorStateMachine.MajorState.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MajorState
                 * @static
                 * @param {perfetto.protos.ChromeCompositorStateMachine.IMajorState} message MajorState message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                MajorState.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a MajorState message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MajorState
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.ChromeCompositorStateMachine.MajorState} MajorState
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                MajorState.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeCompositorStateMachine.MajorState();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.nextAction = r.int32();
                            break;
                        case 2:
                            m.beginImplFrameState = r.int32();
                            break;
                        case 3:
                            m.beginMainFrameState = r.int32();
                            break;
                        case 4:
                            m.layerTreeFrameSinkState = r.int32();
                            break;
                        case 5:
                            m.forcedRedrawState = r.int32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a MajorState message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MajorState
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.ChromeCompositorStateMachine.MajorState} MajorState
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                MajorState.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a MajorState message.
                 * @function verify
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MajorState
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                MajorState.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.nextAction != null && m.hasOwnProperty("nextAction")) {
                        switch (m.nextAction) {
                        default:
                            return "nextAction: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                        case 6:
                        case 7:
                        case 8:
                        case 9:
                        case 10:
                        case 11:
                        case 12:
                        case 13:
                            break;
                        }
                    }
                    if (m.beginImplFrameState != null && m.hasOwnProperty("beginImplFrameState")) {
                        switch (m.beginImplFrameState) {
                        default:
                            return "beginImplFrameState: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                            break;
                        }
                    }
                    if (m.beginMainFrameState != null && m.hasOwnProperty("beginMainFrameState")) {
                        switch (m.beginMainFrameState) {
                        default:
                            return "beginMainFrameState: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                            break;
                        }
                    }
                    if (m.layerTreeFrameSinkState != null && m.hasOwnProperty("layerTreeFrameSinkState")) {
                        switch (m.layerTreeFrameSinkState) {
                        default:
                            return "layerTreeFrameSinkState: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                            break;
                        }
                    }
                    if (m.forcedRedrawState != null && m.hasOwnProperty("forcedRedrawState")) {
                        switch (m.forcedRedrawState) {
                        default:
                            return "forcedRedrawState: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                            break;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a MajorState message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MajorState
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.ChromeCompositorStateMachine.MajorState} MajorState
                 */
                MajorState.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.ChromeCompositorStateMachine.MajorState)
                        return d;
                    var m = new $root.perfetto.protos.ChromeCompositorStateMachine.MajorState();
                    switch (d.nextAction) {
                    case "CC_SCHEDULER_ACTION_UNSPECIFIED":
                    case 0:
                        m.nextAction = 0;
                        break;
                    case "CC_SCHEDULER_ACTION_NONE":
                    case 1:
                        m.nextAction = 1;
                        break;
                    case "CC_SCHEDULER_ACTION_SEND_BEGIN_MAIN_FRAME":
                    case 2:
                        m.nextAction = 2;
                        break;
                    case "CC_SCHEDULER_ACTION_COMMIT":
                    case 3:
                        m.nextAction = 3;
                        break;
                    case "CC_SCHEDULER_ACTION_ACTIVATE_SYNC_TREE":
                    case 4:
                        m.nextAction = 4;
                        break;
                    case "CC_SCHEDULER_ACTION_DRAW_IF_POSSIBLE":
                    case 5:
                        m.nextAction = 5;
                        break;
                    case "CC_SCHEDULER_ACTION_DRAW_FORCED":
                    case 6:
                        m.nextAction = 6;
                        break;
                    case "CC_SCHEDULER_ACTION_DRAW_ABORT":
                    case 7:
                        m.nextAction = 7;
                        break;
                    case "CC_SCHEDULER_ACTION_BEGIN_LAYER_TREE_FRAME_SINK_CREATION":
                    case 8:
                        m.nextAction = 8;
                        break;
                    case "CC_SCHEDULER_ACTION_PREPARE_TILES":
                    case 9:
                        m.nextAction = 9;
                        break;
                    case "CC_SCHEDULER_ACTION_INVALIDATE_LAYER_TREE_FRAME_SINK":
                    case 10:
                        m.nextAction = 10;
                        break;
                    case "CC_SCHEDULER_ACTION_PERFORM_IMPL_SIDE_INVALIDATION":
                    case 11:
                        m.nextAction = 11;
                        break;
                    case "CC_SCHEDULER_ACTION_NOTIFY_BEGIN_MAIN_FRAME_NOT_EXPECTED_UNTIL":
                    case 12:
                        m.nextAction = 12;
                        break;
                    case "CC_SCHEDULER_ACTION_NOTIFY_BEGIN_MAIN_FRAME_NOT_EXPECTED_SOON":
                    case 13:
                        m.nextAction = 13;
                        break;
                    }
                    switch (d.beginImplFrameState) {
                    case "BEGIN_IMPL_FRAME_UNSPECIFIED":
                    case 0:
                        m.beginImplFrameState = 0;
                        break;
                    case "BEGIN_IMPL_FRAME_IDLE":
                    case 1:
                        m.beginImplFrameState = 1;
                        break;
                    case "BEGIN_IMPL_FRAME_INSIDE_BEGIN_FRAME":
                    case 2:
                        m.beginImplFrameState = 2;
                        break;
                    case "BEGIN_IMPL_FRAME_INSIDE_DEADLINE":
                    case 3:
                        m.beginImplFrameState = 3;
                        break;
                    }
                    switch (d.beginMainFrameState) {
                    case "BEGIN_MAIN_FRAME_UNSPECIFIED":
                    case 0:
                        m.beginMainFrameState = 0;
                        break;
                    case "BEGIN_MAIN_FRAME_IDLE":
                    case 1:
                        m.beginMainFrameState = 1;
                        break;
                    case "BEGIN_MAIN_FRAME_SENT":
                    case 2:
                        m.beginMainFrameState = 2;
                        break;
                    case "BEGIN_MAIN_FRAME_READY_TO_COMMIT":
                    case 3:
                        m.beginMainFrameState = 3;
                        break;
                    }
                    switch (d.layerTreeFrameSinkState) {
                    case "LAYER_TREE_FRAME_UNSPECIFIED":
                    case 0:
                        m.layerTreeFrameSinkState = 0;
                        break;
                    case "LAYER_TREE_FRAME_NONE":
                    case 1:
                        m.layerTreeFrameSinkState = 1;
                        break;
                    case "LAYER_TREE_FRAME_ACTIVE":
                    case 2:
                        m.layerTreeFrameSinkState = 2;
                        break;
                    case "LAYER_TREE_FRAME_CREATING":
                    case 3:
                        m.layerTreeFrameSinkState = 3;
                        break;
                    case "LAYER_TREE_FRAME_WAITING_FOR_FIRST_COMMIT":
                    case 4:
                        m.layerTreeFrameSinkState = 4;
                        break;
                    case "LAYER_TREE_FRAME_WAITING_FOR_FIRST_ACTIVATION":
                    case 5:
                        m.layerTreeFrameSinkState = 5;
                        break;
                    }
                    switch (d.forcedRedrawState) {
                    case "FORCED_REDRAW_UNSPECIFIED":
                    case 0:
                        m.forcedRedrawState = 0;
                        break;
                    case "FORCED_REDRAW_IDLE":
                    case 1:
                        m.forcedRedrawState = 1;
                        break;
                    case "FORCED_REDRAW_WAITING_FOR_COMMIT":
                    case 2:
                        m.forcedRedrawState = 2;
                        break;
                    case "FORCED_REDRAW_WAITING_FOR_ACTIVATION":
                    case 3:
                        m.forcedRedrawState = 3;
                        break;
                    case "FORCED_REDRAW_WAITING_FOR_DRAW":
                    case 4:
                        m.forcedRedrawState = 4;
                        break;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a MajorState message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MajorState
                 * @static
                 * @param {perfetto.protos.ChromeCompositorStateMachine.MajorState} m MajorState
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                MajorState.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.nextAction = o.enums === String ? "CC_SCHEDULER_ACTION_UNSPECIFIED" : 0;
                        d.beginImplFrameState = o.enums === String ? "BEGIN_IMPL_FRAME_UNSPECIFIED" : 0;
                        d.beginMainFrameState = o.enums === String ? "BEGIN_MAIN_FRAME_UNSPECIFIED" : 0;
                        d.layerTreeFrameSinkState = o.enums === String ? "LAYER_TREE_FRAME_UNSPECIFIED" : 0;
                        d.forcedRedrawState = o.enums === String ? "FORCED_REDRAW_UNSPECIFIED" : 0;
                    }
                    if (m.nextAction != null && m.hasOwnProperty("nextAction")) {
                        d.nextAction = o.enums === String ? $root.perfetto.protos.ChromeCompositorSchedulerAction[m.nextAction] : m.nextAction;
                    }
                    if (m.beginImplFrameState != null && m.hasOwnProperty("beginImplFrameState")) {
                        d.beginImplFrameState = o.enums === String ? $root.perfetto.protos.ChromeCompositorStateMachine.MajorState.BeginImplFrameState[m.beginImplFrameState] : m.beginImplFrameState;
                    }
                    if (m.beginMainFrameState != null && m.hasOwnProperty("beginMainFrameState")) {
                        d.beginMainFrameState = o.enums === String ? $root.perfetto.protos.ChromeCompositorStateMachine.MajorState.BeginMainFrameState[m.beginMainFrameState] : m.beginMainFrameState;
                    }
                    if (m.layerTreeFrameSinkState != null && m.hasOwnProperty("layerTreeFrameSinkState")) {
                        d.layerTreeFrameSinkState = o.enums === String ? $root.perfetto.protos.ChromeCompositorStateMachine.MajorState.LayerTreeFrameSinkState[m.layerTreeFrameSinkState] : m.layerTreeFrameSinkState;
                    }
                    if (m.forcedRedrawState != null && m.hasOwnProperty("forcedRedrawState")) {
                        d.forcedRedrawState = o.enums === String ? $root.perfetto.protos.ChromeCompositorStateMachine.MajorState.ForcedRedrawOnTimeoutState[m.forcedRedrawState] : m.forcedRedrawState;
                    }
                    return d;
                };

                /**
                 * Converts this MajorState to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MajorState
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                MajorState.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                /**
                 * BeginImplFrameState enum.
                 * @name perfetto.protos.ChromeCompositorStateMachine.MajorState.BeginImplFrameState
                 * @enum {number}
                 * @property {number} BEGIN_IMPL_FRAME_UNSPECIFIED=0 BEGIN_IMPL_FRAME_UNSPECIFIED value
                 * @property {number} BEGIN_IMPL_FRAME_IDLE=1 BEGIN_IMPL_FRAME_IDLE value
                 * @property {number} BEGIN_IMPL_FRAME_INSIDE_BEGIN_FRAME=2 BEGIN_IMPL_FRAME_INSIDE_BEGIN_FRAME value
                 * @property {number} BEGIN_IMPL_FRAME_INSIDE_DEADLINE=3 BEGIN_IMPL_FRAME_INSIDE_DEADLINE value
                 */
                MajorState.BeginImplFrameState = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "BEGIN_IMPL_FRAME_UNSPECIFIED"] = 0;
                    values[valuesById[1] = "BEGIN_IMPL_FRAME_IDLE"] = 1;
                    values[valuesById[2] = "BEGIN_IMPL_FRAME_INSIDE_BEGIN_FRAME"] = 2;
                    values[valuesById[3] = "BEGIN_IMPL_FRAME_INSIDE_DEADLINE"] = 3;
                    return values;
                })();

                /**
                 * BeginMainFrameState enum.
                 * @name perfetto.protos.ChromeCompositorStateMachine.MajorState.BeginMainFrameState
                 * @enum {number}
                 * @property {number} BEGIN_MAIN_FRAME_UNSPECIFIED=0 BEGIN_MAIN_FRAME_UNSPECIFIED value
                 * @property {number} BEGIN_MAIN_FRAME_IDLE=1 BEGIN_MAIN_FRAME_IDLE value
                 * @property {number} BEGIN_MAIN_FRAME_SENT=2 BEGIN_MAIN_FRAME_SENT value
                 * @property {number} BEGIN_MAIN_FRAME_READY_TO_COMMIT=3 BEGIN_MAIN_FRAME_READY_TO_COMMIT value
                 */
                MajorState.BeginMainFrameState = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "BEGIN_MAIN_FRAME_UNSPECIFIED"] = 0;
                    values[valuesById[1] = "BEGIN_MAIN_FRAME_IDLE"] = 1;
                    values[valuesById[2] = "BEGIN_MAIN_FRAME_SENT"] = 2;
                    values[valuesById[3] = "BEGIN_MAIN_FRAME_READY_TO_COMMIT"] = 3;
                    return values;
                })();

                /**
                 * LayerTreeFrameSinkState enum.
                 * @name perfetto.protos.ChromeCompositorStateMachine.MajorState.LayerTreeFrameSinkState
                 * @enum {number}
                 * @property {number} LAYER_TREE_FRAME_UNSPECIFIED=0 LAYER_TREE_FRAME_UNSPECIFIED value
                 * @property {number} LAYER_TREE_FRAME_NONE=1 LAYER_TREE_FRAME_NONE value
                 * @property {number} LAYER_TREE_FRAME_ACTIVE=2 LAYER_TREE_FRAME_ACTIVE value
                 * @property {number} LAYER_TREE_FRAME_CREATING=3 LAYER_TREE_FRAME_CREATING value
                 * @property {number} LAYER_TREE_FRAME_WAITING_FOR_FIRST_COMMIT=4 LAYER_TREE_FRAME_WAITING_FOR_FIRST_COMMIT value
                 * @property {number} LAYER_TREE_FRAME_WAITING_FOR_FIRST_ACTIVATION=5 LAYER_TREE_FRAME_WAITING_FOR_FIRST_ACTIVATION value
                 */
                MajorState.LayerTreeFrameSinkState = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "LAYER_TREE_FRAME_UNSPECIFIED"] = 0;
                    values[valuesById[1] = "LAYER_TREE_FRAME_NONE"] = 1;
                    values[valuesById[2] = "LAYER_TREE_FRAME_ACTIVE"] = 2;
                    values[valuesById[3] = "LAYER_TREE_FRAME_CREATING"] = 3;
                    values[valuesById[4] = "LAYER_TREE_FRAME_WAITING_FOR_FIRST_COMMIT"] = 4;
                    values[valuesById[5] = "LAYER_TREE_FRAME_WAITING_FOR_FIRST_ACTIVATION"] = 5;
                    return values;
                })();

                /**
                 * ForcedRedrawOnTimeoutState enum.
                 * @name perfetto.protos.ChromeCompositorStateMachine.MajorState.ForcedRedrawOnTimeoutState
                 * @enum {number}
                 * @property {number} FORCED_REDRAW_UNSPECIFIED=0 FORCED_REDRAW_UNSPECIFIED value
                 * @property {number} FORCED_REDRAW_IDLE=1 FORCED_REDRAW_IDLE value
                 * @property {number} FORCED_REDRAW_WAITING_FOR_COMMIT=2 FORCED_REDRAW_WAITING_FOR_COMMIT value
                 * @property {number} FORCED_REDRAW_WAITING_FOR_ACTIVATION=3 FORCED_REDRAW_WAITING_FOR_ACTIVATION value
                 * @property {number} FORCED_REDRAW_WAITING_FOR_DRAW=4 FORCED_REDRAW_WAITING_FOR_DRAW value
                 */
                MajorState.ForcedRedrawOnTimeoutState = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "FORCED_REDRAW_UNSPECIFIED"] = 0;
                    values[valuesById[1] = "FORCED_REDRAW_IDLE"] = 1;
                    values[valuesById[2] = "FORCED_REDRAW_WAITING_FOR_COMMIT"] = 2;
                    values[valuesById[3] = "FORCED_REDRAW_WAITING_FOR_ACTIVATION"] = 3;
                    values[valuesById[4] = "FORCED_REDRAW_WAITING_FOR_DRAW"] = 4;
                    return values;
                })();

                return MajorState;
            })();

            ChromeCompositorStateMachine.MinorState = (function() {

                /**
                 * Properties of a MinorState.
                 * @memberof perfetto.protos.ChromeCompositorStateMachine
                 * @interface IMinorState
                 * @property {number|null} [commitCount] MinorState commitCount
                 * @property {number|null} [currentFrameNumber] MinorState currentFrameNumber
                 * @property {number|null} [lastFrameNumberSubmitPerformed] MinorState lastFrameNumberSubmitPerformed
                 * @property {number|null} [lastFrameNumberDrawPerformed] MinorState lastFrameNumberDrawPerformed
                 * @property {number|null} [lastFrameNumberBeginMainFrameSent] MinorState lastFrameNumberBeginMainFrameSent
                 * @property {boolean|null} [didDraw] MinorState didDraw
                 * @property {boolean|null} [didSendBeginMainFrameForCurrentFrame] MinorState didSendBeginMainFrameForCurrentFrame
                 * @property {boolean|null} [didNotifyBeginMainFrameNotExpectedUntil] MinorState didNotifyBeginMainFrameNotExpectedUntil
                 * @property {boolean|null} [didNotifyBeginMainFrameNotExpectedSoon] MinorState didNotifyBeginMainFrameNotExpectedSoon
                 * @property {boolean|null} [wantsBeginMainFrameNotExpected] MinorState wantsBeginMainFrameNotExpected
                 * @property {boolean|null} [didCommitDuringFrame] MinorState didCommitDuringFrame
                 * @property {boolean|null} [didInvalidateLayerTreeFrameSink] MinorState didInvalidateLayerTreeFrameSink
                 * @property {boolean|null} [didPerformImplSideInvalidaion] MinorState didPerformImplSideInvalidaion
                 * @property {boolean|null} [didPrepareTiles] MinorState didPrepareTiles
                 * @property {number|null} [consecutiveCheckerboardAnimations] MinorState consecutiveCheckerboardAnimations
                 * @property {number|null} [pendingSubmitFrames] MinorState pendingSubmitFrames
                 * @property {number|null} [submitFramesWithCurrentLayerTreeFrameSink] MinorState submitFramesWithCurrentLayerTreeFrameSink
                 * @property {boolean|null} [needsRedraw] MinorState needsRedraw
                 * @property {boolean|null} [needsPrepareTiles] MinorState needsPrepareTiles
                 * @property {boolean|null} [needsBeginMainFrame] MinorState needsBeginMainFrame
                 * @property {boolean|null} [needsOneBeginImplFrame] MinorState needsOneBeginImplFrame
                 * @property {boolean|null} [visible] MinorState visible
                 * @property {boolean|null} [beginFrameSourcePaused] MinorState beginFrameSourcePaused
                 * @property {boolean|null} [canDraw] MinorState canDraw
                 * @property {boolean|null} [resourcelessDraw] MinorState resourcelessDraw
                 * @property {boolean|null} [hasPendingTree] MinorState hasPendingTree
                 * @property {boolean|null} [pendingTreeIsReadyForActivation] MinorState pendingTreeIsReadyForActivation
                 * @property {boolean|null} [activeTreeNeedsFirstDraw] MinorState activeTreeNeedsFirstDraw
                 * @property {boolean|null} [activeTreeIsReadyToDraw] MinorState activeTreeIsReadyToDraw
                 * @property {boolean|null} [didCreateAndInitializeFirstLayerTreeFrameSink] MinorState didCreateAndInitializeFirstLayerTreeFrameSink
                 * @property {perfetto.protos.ChromeCompositorStateMachine.MinorState.TreePriority|null} [treePriority] MinorState treePriority
                 * @property {perfetto.protos.ChromeCompositorStateMachine.MinorState.ScrollHandlerState|null} [scrollHandlerState] MinorState scrollHandlerState
                 * @property {boolean|null} [criticalBeginMainFrameToActivateIsFast] MinorState criticalBeginMainFrameToActivateIsFast
                 * @property {boolean|null} [mainThreadMissedLastDeadline] MinorState mainThreadMissedLastDeadline
                 * @property {boolean|null} [videoNeedsBeginFrames] MinorState videoNeedsBeginFrames
                 * @property {boolean|null} [deferBeginMainFrame] MinorState deferBeginMainFrame
                 * @property {boolean|null} [lastCommitHadNoUpdates] MinorState lastCommitHadNoUpdates
                 * @property {boolean|null} [didDrawInLastFrame] MinorState didDrawInLastFrame
                 * @property {boolean|null} [didSubmitInLastFrame] MinorState didSubmitInLastFrame
                 * @property {boolean|null} [needsImplSideInvalidation] MinorState needsImplSideInvalidation
                 * @property {boolean|null} [currentPendingTreeIsImplSide] MinorState currentPendingTreeIsImplSide
                 * @property {boolean|null} [previousPendingTreeWasImplSide] MinorState previousPendingTreeWasImplSide
                 * @property {boolean|null} [processingAnimationWorkletsForActiveTree] MinorState processingAnimationWorkletsForActiveTree
                 * @property {boolean|null} [processingAnimationWorkletsForPendingTree] MinorState processingAnimationWorkletsForPendingTree
                 * @property {boolean|null} [processingPaintWorkletsForPendingTree] MinorState processingPaintWorkletsForPendingTree
                 */

                /**
                 * Constructs a new MinorState.
                 * @memberof perfetto.protos.ChromeCompositorStateMachine
                 * @classdesc Represents a MinorState.
                 * @implements IMinorState
                 * @constructor
                 * @param {perfetto.protos.ChromeCompositorStateMachine.IMinorState=} [p] Properties to set
                 */
                function MinorState(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * MinorState commitCount.
                 * @member {number} commitCount
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.commitCount = 0;

                /**
                 * MinorState currentFrameNumber.
                 * @member {number} currentFrameNumber
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.currentFrameNumber = 0;

                /**
                 * MinorState lastFrameNumberSubmitPerformed.
                 * @member {number} lastFrameNumberSubmitPerformed
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.lastFrameNumberSubmitPerformed = 0;

                /**
                 * MinorState lastFrameNumberDrawPerformed.
                 * @member {number} lastFrameNumberDrawPerformed
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.lastFrameNumberDrawPerformed = 0;

                /**
                 * MinorState lastFrameNumberBeginMainFrameSent.
                 * @member {number} lastFrameNumberBeginMainFrameSent
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.lastFrameNumberBeginMainFrameSent = 0;

                /**
                 * MinorState didDraw.
                 * @member {boolean} didDraw
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.didDraw = false;

                /**
                 * MinorState didSendBeginMainFrameForCurrentFrame.
                 * @member {boolean} didSendBeginMainFrameForCurrentFrame
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.didSendBeginMainFrameForCurrentFrame = false;

                /**
                 * MinorState didNotifyBeginMainFrameNotExpectedUntil.
                 * @member {boolean} didNotifyBeginMainFrameNotExpectedUntil
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.didNotifyBeginMainFrameNotExpectedUntil = false;

                /**
                 * MinorState didNotifyBeginMainFrameNotExpectedSoon.
                 * @member {boolean} didNotifyBeginMainFrameNotExpectedSoon
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.didNotifyBeginMainFrameNotExpectedSoon = false;

                /**
                 * MinorState wantsBeginMainFrameNotExpected.
                 * @member {boolean} wantsBeginMainFrameNotExpected
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.wantsBeginMainFrameNotExpected = false;

                /**
                 * MinorState didCommitDuringFrame.
                 * @member {boolean} didCommitDuringFrame
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.didCommitDuringFrame = false;

                /**
                 * MinorState didInvalidateLayerTreeFrameSink.
                 * @member {boolean} didInvalidateLayerTreeFrameSink
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.didInvalidateLayerTreeFrameSink = false;

                /**
                 * MinorState didPerformImplSideInvalidaion.
                 * @member {boolean} didPerformImplSideInvalidaion
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.didPerformImplSideInvalidaion = false;

                /**
                 * MinorState didPrepareTiles.
                 * @member {boolean} didPrepareTiles
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.didPrepareTiles = false;

                /**
                 * MinorState consecutiveCheckerboardAnimations.
                 * @member {number} consecutiveCheckerboardAnimations
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.consecutiveCheckerboardAnimations = 0;

                /**
                 * MinorState pendingSubmitFrames.
                 * @member {number} pendingSubmitFrames
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.pendingSubmitFrames = 0;

                /**
                 * MinorState submitFramesWithCurrentLayerTreeFrameSink.
                 * @member {number} submitFramesWithCurrentLayerTreeFrameSink
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.submitFramesWithCurrentLayerTreeFrameSink = 0;

                /**
                 * MinorState needsRedraw.
                 * @member {boolean} needsRedraw
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.needsRedraw = false;

                /**
                 * MinorState needsPrepareTiles.
                 * @member {boolean} needsPrepareTiles
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.needsPrepareTiles = false;

                /**
                 * MinorState needsBeginMainFrame.
                 * @member {boolean} needsBeginMainFrame
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.needsBeginMainFrame = false;

                /**
                 * MinorState needsOneBeginImplFrame.
                 * @member {boolean} needsOneBeginImplFrame
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.needsOneBeginImplFrame = false;

                /**
                 * MinorState visible.
                 * @member {boolean} visible
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.visible = false;

                /**
                 * MinorState beginFrameSourcePaused.
                 * @member {boolean} beginFrameSourcePaused
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.beginFrameSourcePaused = false;

                /**
                 * MinorState canDraw.
                 * @member {boolean} canDraw
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.canDraw = false;

                /**
                 * MinorState resourcelessDraw.
                 * @member {boolean} resourcelessDraw
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.resourcelessDraw = false;

                /**
                 * MinorState hasPendingTree.
                 * @member {boolean} hasPendingTree
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.hasPendingTree = false;

                /**
                 * MinorState pendingTreeIsReadyForActivation.
                 * @member {boolean} pendingTreeIsReadyForActivation
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.pendingTreeIsReadyForActivation = false;

                /**
                 * MinorState activeTreeNeedsFirstDraw.
                 * @member {boolean} activeTreeNeedsFirstDraw
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.activeTreeNeedsFirstDraw = false;

                /**
                 * MinorState activeTreeIsReadyToDraw.
                 * @member {boolean} activeTreeIsReadyToDraw
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.activeTreeIsReadyToDraw = false;

                /**
                 * MinorState didCreateAndInitializeFirstLayerTreeFrameSink.
                 * @member {boolean} didCreateAndInitializeFirstLayerTreeFrameSink
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.didCreateAndInitializeFirstLayerTreeFrameSink = false;

                /**
                 * MinorState treePriority.
                 * @member {perfetto.protos.ChromeCompositorStateMachine.MinorState.TreePriority} treePriority
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.treePriority = 0;

                /**
                 * MinorState scrollHandlerState.
                 * @member {perfetto.protos.ChromeCompositorStateMachine.MinorState.ScrollHandlerState} scrollHandlerState
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.scrollHandlerState = 0;

                /**
                 * MinorState criticalBeginMainFrameToActivateIsFast.
                 * @member {boolean} criticalBeginMainFrameToActivateIsFast
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.criticalBeginMainFrameToActivateIsFast = false;

                /**
                 * MinorState mainThreadMissedLastDeadline.
                 * @member {boolean} mainThreadMissedLastDeadline
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.mainThreadMissedLastDeadline = false;

                /**
                 * MinorState videoNeedsBeginFrames.
                 * @member {boolean} videoNeedsBeginFrames
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.videoNeedsBeginFrames = false;

                /**
                 * MinorState deferBeginMainFrame.
                 * @member {boolean} deferBeginMainFrame
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.deferBeginMainFrame = false;

                /**
                 * MinorState lastCommitHadNoUpdates.
                 * @member {boolean} lastCommitHadNoUpdates
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.lastCommitHadNoUpdates = false;

                /**
                 * MinorState didDrawInLastFrame.
                 * @member {boolean} didDrawInLastFrame
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.didDrawInLastFrame = false;

                /**
                 * MinorState didSubmitInLastFrame.
                 * @member {boolean} didSubmitInLastFrame
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.didSubmitInLastFrame = false;

                /**
                 * MinorState needsImplSideInvalidation.
                 * @member {boolean} needsImplSideInvalidation
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.needsImplSideInvalidation = false;

                /**
                 * MinorState currentPendingTreeIsImplSide.
                 * @member {boolean} currentPendingTreeIsImplSide
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.currentPendingTreeIsImplSide = false;

                /**
                 * MinorState previousPendingTreeWasImplSide.
                 * @member {boolean} previousPendingTreeWasImplSide
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.previousPendingTreeWasImplSide = false;

                /**
                 * MinorState processingAnimationWorkletsForActiveTree.
                 * @member {boolean} processingAnimationWorkletsForActiveTree
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.processingAnimationWorkletsForActiveTree = false;

                /**
                 * MinorState processingAnimationWorkletsForPendingTree.
                 * @member {boolean} processingAnimationWorkletsForPendingTree
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.processingAnimationWorkletsForPendingTree = false;

                /**
                 * MinorState processingPaintWorkletsForPendingTree.
                 * @member {boolean} processingPaintWorkletsForPendingTree
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 */
                MinorState.prototype.processingPaintWorkletsForPendingTree = false;

                /**
                 * Creates a new MinorState instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @static
                 * @param {perfetto.protos.ChromeCompositorStateMachine.IMinorState=} [properties] Properties to set
                 * @returns {perfetto.protos.ChromeCompositorStateMachine.MinorState} MinorState instance
                 */
                MinorState.create = function create(properties) {
                    return new MinorState(properties);
                };

                /**
                 * Encodes the specified MinorState message. Does not implicitly {@link perfetto.protos.ChromeCompositorStateMachine.MinorState.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @static
                 * @param {perfetto.protos.ChromeCompositorStateMachine.IMinorState} m MinorState message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                MinorState.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.commitCount != null && Object.hasOwnProperty.call(m, "commitCount"))
                        w.uint32(8).int32(m.commitCount);
                    if (m.currentFrameNumber != null && Object.hasOwnProperty.call(m, "currentFrameNumber"))
                        w.uint32(16).int32(m.currentFrameNumber);
                    if (m.lastFrameNumberSubmitPerformed != null && Object.hasOwnProperty.call(m, "lastFrameNumberSubmitPerformed"))
                        w.uint32(24).int32(m.lastFrameNumberSubmitPerformed);
                    if (m.lastFrameNumberDrawPerformed != null && Object.hasOwnProperty.call(m, "lastFrameNumberDrawPerformed"))
                        w.uint32(32).int32(m.lastFrameNumberDrawPerformed);
                    if (m.lastFrameNumberBeginMainFrameSent != null && Object.hasOwnProperty.call(m, "lastFrameNumberBeginMainFrameSent"))
                        w.uint32(40).int32(m.lastFrameNumberBeginMainFrameSent);
                    if (m.didDraw != null && Object.hasOwnProperty.call(m, "didDraw"))
                        w.uint32(48).bool(m.didDraw);
                    if (m.didSendBeginMainFrameForCurrentFrame != null && Object.hasOwnProperty.call(m, "didSendBeginMainFrameForCurrentFrame"))
                        w.uint32(56).bool(m.didSendBeginMainFrameForCurrentFrame);
                    if (m.didNotifyBeginMainFrameNotExpectedUntil != null && Object.hasOwnProperty.call(m, "didNotifyBeginMainFrameNotExpectedUntil"))
                        w.uint32(64).bool(m.didNotifyBeginMainFrameNotExpectedUntil);
                    if (m.didNotifyBeginMainFrameNotExpectedSoon != null && Object.hasOwnProperty.call(m, "didNotifyBeginMainFrameNotExpectedSoon"))
                        w.uint32(72).bool(m.didNotifyBeginMainFrameNotExpectedSoon);
                    if (m.wantsBeginMainFrameNotExpected != null && Object.hasOwnProperty.call(m, "wantsBeginMainFrameNotExpected"))
                        w.uint32(80).bool(m.wantsBeginMainFrameNotExpected);
                    if (m.didCommitDuringFrame != null && Object.hasOwnProperty.call(m, "didCommitDuringFrame"))
                        w.uint32(88).bool(m.didCommitDuringFrame);
                    if (m.didInvalidateLayerTreeFrameSink != null && Object.hasOwnProperty.call(m, "didInvalidateLayerTreeFrameSink"))
                        w.uint32(96).bool(m.didInvalidateLayerTreeFrameSink);
                    if (m.didPerformImplSideInvalidaion != null && Object.hasOwnProperty.call(m, "didPerformImplSideInvalidaion"))
                        w.uint32(104).bool(m.didPerformImplSideInvalidaion);
                    if (m.didPrepareTiles != null && Object.hasOwnProperty.call(m, "didPrepareTiles"))
                        w.uint32(112).bool(m.didPrepareTiles);
                    if (m.consecutiveCheckerboardAnimations != null && Object.hasOwnProperty.call(m, "consecutiveCheckerboardAnimations"))
                        w.uint32(120).int32(m.consecutiveCheckerboardAnimations);
                    if (m.pendingSubmitFrames != null && Object.hasOwnProperty.call(m, "pendingSubmitFrames"))
                        w.uint32(128).int32(m.pendingSubmitFrames);
                    if (m.submitFramesWithCurrentLayerTreeFrameSink != null && Object.hasOwnProperty.call(m, "submitFramesWithCurrentLayerTreeFrameSink"))
                        w.uint32(136).int32(m.submitFramesWithCurrentLayerTreeFrameSink);
                    if (m.needsRedraw != null && Object.hasOwnProperty.call(m, "needsRedraw"))
                        w.uint32(144).bool(m.needsRedraw);
                    if (m.needsPrepareTiles != null && Object.hasOwnProperty.call(m, "needsPrepareTiles"))
                        w.uint32(152).bool(m.needsPrepareTiles);
                    if (m.needsBeginMainFrame != null && Object.hasOwnProperty.call(m, "needsBeginMainFrame"))
                        w.uint32(160).bool(m.needsBeginMainFrame);
                    if (m.needsOneBeginImplFrame != null && Object.hasOwnProperty.call(m, "needsOneBeginImplFrame"))
                        w.uint32(168).bool(m.needsOneBeginImplFrame);
                    if (m.visible != null && Object.hasOwnProperty.call(m, "visible"))
                        w.uint32(176).bool(m.visible);
                    if (m.beginFrameSourcePaused != null && Object.hasOwnProperty.call(m, "beginFrameSourcePaused"))
                        w.uint32(184).bool(m.beginFrameSourcePaused);
                    if (m.canDraw != null && Object.hasOwnProperty.call(m, "canDraw"))
                        w.uint32(192).bool(m.canDraw);
                    if (m.resourcelessDraw != null && Object.hasOwnProperty.call(m, "resourcelessDraw"))
                        w.uint32(200).bool(m.resourcelessDraw);
                    if (m.hasPendingTree != null && Object.hasOwnProperty.call(m, "hasPendingTree"))
                        w.uint32(208).bool(m.hasPendingTree);
                    if (m.pendingTreeIsReadyForActivation != null && Object.hasOwnProperty.call(m, "pendingTreeIsReadyForActivation"))
                        w.uint32(216).bool(m.pendingTreeIsReadyForActivation);
                    if (m.activeTreeNeedsFirstDraw != null && Object.hasOwnProperty.call(m, "activeTreeNeedsFirstDraw"))
                        w.uint32(224).bool(m.activeTreeNeedsFirstDraw);
                    if (m.activeTreeIsReadyToDraw != null && Object.hasOwnProperty.call(m, "activeTreeIsReadyToDraw"))
                        w.uint32(232).bool(m.activeTreeIsReadyToDraw);
                    if (m.didCreateAndInitializeFirstLayerTreeFrameSink != null && Object.hasOwnProperty.call(m, "didCreateAndInitializeFirstLayerTreeFrameSink"))
                        w.uint32(240).bool(m.didCreateAndInitializeFirstLayerTreeFrameSink);
                    if (m.treePriority != null && Object.hasOwnProperty.call(m, "treePriority"))
                        w.uint32(248).int32(m.treePriority);
                    if (m.scrollHandlerState != null && Object.hasOwnProperty.call(m, "scrollHandlerState"))
                        w.uint32(256).int32(m.scrollHandlerState);
                    if (m.criticalBeginMainFrameToActivateIsFast != null && Object.hasOwnProperty.call(m, "criticalBeginMainFrameToActivateIsFast"))
                        w.uint32(264).bool(m.criticalBeginMainFrameToActivateIsFast);
                    if (m.mainThreadMissedLastDeadline != null && Object.hasOwnProperty.call(m, "mainThreadMissedLastDeadline"))
                        w.uint32(272).bool(m.mainThreadMissedLastDeadline);
                    if (m.videoNeedsBeginFrames != null && Object.hasOwnProperty.call(m, "videoNeedsBeginFrames"))
                        w.uint32(288).bool(m.videoNeedsBeginFrames);
                    if (m.deferBeginMainFrame != null && Object.hasOwnProperty.call(m, "deferBeginMainFrame"))
                        w.uint32(296).bool(m.deferBeginMainFrame);
                    if (m.lastCommitHadNoUpdates != null && Object.hasOwnProperty.call(m, "lastCommitHadNoUpdates"))
                        w.uint32(304).bool(m.lastCommitHadNoUpdates);
                    if (m.didDrawInLastFrame != null && Object.hasOwnProperty.call(m, "didDrawInLastFrame"))
                        w.uint32(312).bool(m.didDrawInLastFrame);
                    if (m.didSubmitInLastFrame != null && Object.hasOwnProperty.call(m, "didSubmitInLastFrame"))
                        w.uint32(320).bool(m.didSubmitInLastFrame);
                    if (m.needsImplSideInvalidation != null && Object.hasOwnProperty.call(m, "needsImplSideInvalidation"))
                        w.uint32(328).bool(m.needsImplSideInvalidation);
                    if (m.currentPendingTreeIsImplSide != null && Object.hasOwnProperty.call(m, "currentPendingTreeIsImplSide"))
                        w.uint32(336).bool(m.currentPendingTreeIsImplSide);
                    if (m.previousPendingTreeWasImplSide != null && Object.hasOwnProperty.call(m, "previousPendingTreeWasImplSide"))
                        w.uint32(344).bool(m.previousPendingTreeWasImplSide);
                    if (m.processingAnimationWorkletsForActiveTree != null && Object.hasOwnProperty.call(m, "processingAnimationWorkletsForActiveTree"))
                        w.uint32(352).bool(m.processingAnimationWorkletsForActiveTree);
                    if (m.processingAnimationWorkletsForPendingTree != null && Object.hasOwnProperty.call(m, "processingAnimationWorkletsForPendingTree"))
                        w.uint32(360).bool(m.processingAnimationWorkletsForPendingTree);
                    if (m.processingPaintWorkletsForPendingTree != null && Object.hasOwnProperty.call(m, "processingPaintWorkletsForPendingTree"))
                        w.uint32(368).bool(m.processingPaintWorkletsForPendingTree);
                    return w;
                };

                /**
                 * Encodes the specified MinorState message, length delimited. Does not implicitly {@link perfetto.protos.ChromeCompositorStateMachine.MinorState.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @static
                 * @param {perfetto.protos.ChromeCompositorStateMachine.IMinorState} message MinorState message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                MinorState.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a MinorState message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.ChromeCompositorStateMachine.MinorState} MinorState
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                MinorState.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeCompositorStateMachine.MinorState();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.commitCount = r.int32();
                            break;
                        case 2:
                            m.currentFrameNumber = r.int32();
                            break;
                        case 3:
                            m.lastFrameNumberSubmitPerformed = r.int32();
                            break;
                        case 4:
                            m.lastFrameNumberDrawPerformed = r.int32();
                            break;
                        case 5:
                            m.lastFrameNumberBeginMainFrameSent = r.int32();
                            break;
                        case 6:
                            m.didDraw = r.bool();
                            break;
                        case 7:
                            m.didSendBeginMainFrameForCurrentFrame = r.bool();
                            break;
                        case 8:
                            m.didNotifyBeginMainFrameNotExpectedUntil = r.bool();
                            break;
                        case 9:
                            m.didNotifyBeginMainFrameNotExpectedSoon = r.bool();
                            break;
                        case 10:
                            m.wantsBeginMainFrameNotExpected = r.bool();
                            break;
                        case 11:
                            m.didCommitDuringFrame = r.bool();
                            break;
                        case 12:
                            m.didInvalidateLayerTreeFrameSink = r.bool();
                            break;
                        case 13:
                            m.didPerformImplSideInvalidaion = r.bool();
                            break;
                        case 14:
                            m.didPrepareTiles = r.bool();
                            break;
                        case 15:
                            m.consecutiveCheckerboardAnimations = r.int32();
                            break;
                        case 16:
                            m.pendingSubmitFrames = r.int32();
                            break;
                        case 17:
                            m.submitFramesWithCurrentLayerTreeFrameSink = r.int32();
                            break;
                        case 18:
                            m.needsRedraw = r.bool();
                            break;
                        case 19:
                            m.needsPrepareTiles = r.bool();
                            break;
                        case 20:
                            m.needsBeginMainFrame = r.bool();
                            break;
                        case 21:
                            m.needsOneBeginImplFrame = r.bool();
                            break;
                        case 22:
                            m.visible = r.bool();
                            break;
                        case 23:
                            m.beginFrameSourcePaused = r.bool();
                            break;
                        case 24:
                            m.canDraw = r.bool();
                            break;
                        case 25:
                            m.resourcelessDraw = r.bool();
                            break;
                        case 26:
                            m.hasPendingTree = r.bool();
                            break;
                        case 27:
                            m.pendingTreeIsReadyForActivation = r.bool();
                            break;
                        case 28:
                            m.activeTreeNeedsFirstDraw = r.bool();
                            break;
                        case 29:
                            m.activeTreeIsReadyToDraw = r.bool();
                            break;
                        case 30:
                            m.didCreateAndInitializeFirstLayerTreeFrameSink = r.bool();
                            break;
                        case 31:
                            m.treePriority = r.int32();
                            break;
                        case 32:
                            m.scrollHandlerState = r.int32();
                            break;
                        case 33:
                            m.criticalBeginMainFrameToActivateIsFast = r.bool();
                            break;
                        case 34:
                            m.mainThreadMissedLastDeadline = r.bool();
                            break;
                        case 36:
                            m.videoNeedsBeginFrames = r.bool();
                            break;
                        case 37:
                            m.deferBeginMainFrame = r.bool();
                            break;
                        case 38:
                            m.lastCommitHadNoUpdates = r.bool();
                            break;
                        case 39:
                            m.didDrawInLastFrame = r.bool();
                            break;
                        case 40:
                            m.didSubmitInLastFrame = r.bool();
                            break;
                        case 41:
                            m.needsImplSideInvalidation = r.bool();
                            break;
                        case 42:
                            m.currentPendingTreeIsImplSide = r.bool();
                            break;
                        case 43:
                            m.previousPendingTreeWasImplSide = r.bool();
                            break;
                        case 44:
                            m.processingAnimationWorkletsForActiveTree = r.bool();
                            break;
                        case 45:
                            m.processingAnimationWorkletsForPendingTree = r.bool();
                            break;
                        case 46:
                            m.processingPaintWorkletsForPendingTree = r.bool();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a MinorState message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.ChromeCompositorStateMachine.MinorState} MinorState
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                MinorState.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a MinorState message.
                 * @function verify
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                MinorState.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.commitCount != null && m.hasOwnProperty("commitCount")) {
                        if (!$util.isInteger(m.commitCount))
                            return "commitCount: integer expected";
                    }
                    if (m.currentFrameNumber != null && m.hasOwnProperty("currentFrameNumber")) {
                        if (!$util.isInteger(m.currentFrameNumber))
                            return "currentFrameNumber: integer expected";
                    }
                    if (m.lastFrameNumberSubmitPerformed != null && m.hasOwnProperty("lastFrameNumberSubmitPerformed")) {
                        if (!$util.isInteger(m.lastFrameNumberSubmitPerformed))
                            return "lastFrameNumberSubmitPerformed: integer expected";
                    }
                    if (m.lastFrameNumberDrawPerformed != null && m.hasOwnProperty("lastFrameNumberDrawPerformed")) {
                        if (!$util.isInteger(m.lastFrameNumberDrawPerformed))
                            return "lastFrameNumberDrawPerformed: integer expected";
                    }
                    if (m.lastFrameNumberBeginMainFrameSent != null && m.hasOwnProperty("lastFrameNumberBeginMainFrameSent")) {
                        if (!$util.isInteger(m.lastFrameNumberBeginMainFrameSent))
                            return "lastFrameNumberBeginMainFrameSent: integer expected";
                    }
                    if (m.didDraw != null && m.hasOwnProperty("didDraw")) {
                        if (typeof m.didDraw !== "boolean")
                            return "didDraw: boolean expected";
                    }
                    if (m.didSendBeginMainFrameForCurrentFrame != null && m.hasOwnProperty("didSendBeginMainFrameForCurrentFrame")) {
                        if (typeof m.didSendBeginMainFrameForCurrentFrame !== "boolean")
                            return "didSendBeginMainFrameForCurrentFrame: boolean expected";
                    }
                    if (m.didNotifyBeginMainFrameNotExpectedUntil != null && m.hasOwnProperty("didNotifyBeginMainFrameNotExpectedUntil")) {
                        if (typeof m.didNotifyBeginMainFrameNotExpectedUntil !== "boolean")
                            return "didNotifyBeginMainFrameNotExpectedUntil: boolean expected";
                    }
                    if (m.didNotifyBeginMainFrameNotExpectedSoon != null && m.hasOwnProperty("didNotifyBeginMainFrameNotExpectedSoon")) {
                        if (typeof m.didNotifyBeginMainFrameNotExpectedSoon !== "boolean")
                            return "didNotifyBeginMainFrameNotExpectedSoon: boolean expected";
                    }
                    if (m.wantsBeginMainFrameNotExpected != null && m.hasOwnProperty("wantsBeginMainFrameNotExpected")) {
                        if (typeof m.wantsBeginMainFrameNotExpected !== "boolean")
                            return "wantsBeginMainFrameNotExpected: boolean expected";
                    }
                    if (m.didCommitDuringFrame != null && m.hasOwnProperty("didCommitDuringFrame")) {
                        if (typeof m.didCommitDuringFrame !== "boolean")
                            return "didCommitDuringFrame: boolean expected";
                    }
                    if (m.didInvalidateLayerTreeFrameSink != null && m.hasOwnProperty("didInvalidateLayerTreeFrameSink")) {
                        if (typeof m.didInvalidateLayerTreeFrameSink !== "boolean")
                            return "didInvalidateLayerTreeFrameSink: boolean expected";
                    }
                    if (m.didPerformImplSideInvalidaion != null && m.hasOwnProperty("didPerformImplSideInvalidaion")) {
                        if (typeof m.didPerformImplSideInvalidaion !== "boolean")
                            return "didPerformImplSideInvalidaion: boolean expected";
                    }
                    if (m.didPrepareTiles != null && m.hasOwnProperty("didPrepareTiles")) {
                        if (typeof m.didPrepareTiles !== "boolean")
                            return "didPrepareTiles: boolean expected";
                    }
                    if (m.consecutiveCheckerboardAnimations != null && m.hasOwnProperty("consecutiveCheckerboardAnimations")) {
                        if (!$util.isInteger(m.consecutiveCheckerboardAnimations))
                            return "consecutiveCheckerboardAnimations: integer expected";
                    }
                    if (m.pendingSubmitFrames != null && m.hasOwnProperty("pendingSubmitFrames")) {
                        if (!$util.isInteger(m.pendingSubmitFrames))
                            return "pendingSubmitFrames: integer expected";
                    }
                    if (m.submitFramesWithCurrentLayerTreeFrameSink != null && m.hasOwnProperty("submitFramesWithCurrentLayerTreeFrameSink")) {
                        if (!$util.isInteger(m.submitFramesWithCurrentLayerTreeFrameSink))
                            return "submitFramesWithCurrentLayerTreeFrameSink: integer expected";
                    }
                    if (m.needsRedraw != null && m.hasOwnProperty("needsRedraw")) {
                        if (typeof m.needsRedraw !== "boolean")
                            return "needsRedraw: boolean expected";
                    }
                    if (m.needsPrepareTiles != null && m.hasOwnProperty("needsPrepareTiles")) {
                        if (typeof m.needsPrepareTiles !== "boolean")
                            return "needsPrepareTiles: boolean expected";
                    }
                    if (m.needsBeginMainFrame != null && m.hasOwnProperty("needsBeginMainFrame")) {
                        if (typeof m.needsBeginMainFrame !== "boolean")
                            return "needsBeginMainFrame: boolean expected";
                    }
                    if (m.needsOneBeginImplFrame != null && m.hasOwnProperty("needsOneBeginImplFrame")) {
                        if (typeof m.needsOneBeginImplFrame !== "boolean")
                            return "needsOneBeginImplFrame: boolean expected";
                    }
                    if (m.visible != null && m.hasOwnProperty("visible")) {
                        if (typeof m.visible !== "boolean")
                            return "visible: boolean expected";
                    }
                    if (m.beginFrameSourcePaused != null && m.hasOwnProperty("beginFrameSourcePaused")) {
                        if (typeof m.beginFrameSourcePaused !== "boolean")
                            return "beginFrameSourcePaused: boolean expected";
                    }
                    if (m.canDraw != null && m.hasOwnProperty("canDraw")) {
                        if (typeof m.canDraw !== "boolean")
                            return "canDraw: boolean expected";
                    }
                    if (m.resourcelessDraw != null && m.hasOwnProperty("resourcelessDraw")) {
                        if (typeof m.resourcelessDraw !== "boolean")
                            return "resourcelessDraw: boolean expected";
                    }
                    if (m.hasPendingTree != null && m.hasOwnProperty("hasPendingTree")) {
                        if (typeof m.hasPendingTree !== "boolean")
                            return "hasPendingTree: boolean expected";
                    }
                    if (m.pendingTreeIsReadyForActivation != null && m.hasOwnProperty("pendingTreeIsReadyForActivation")) {
                        if (typeof m.pendingTreeIsReadyForActivation !== "boolean")
                            return "pendingTreeIsReadyForActivation: boolean expected";
                    }
                    if (m.activeTreeNeedsFirstDraw != null && m.hasOwnProperty("activeTreeNeedsFirstDraw")) {
                        if (typeof m.activeTreeNeedsFirstDraw !== "boolean")
                            return "activeTreeNeedsFirstDraw: boolean expected";
                    }
                    if (m.activeTreeIsReadyToDraw != null && m.hasOwnProperty("activeTreeIsReadyToDraw")) {
                        if (typeof m.activeTreeIsReadyToDraw !== "boolean")
                            return "activeTreeIsReadyToDraw: boolean expected";
                    }
                    if (m.didCreateAndInitializeFirstLayerTreeFrameSink != null && m.hasOwnProperty("didCreateAndInitializeFirstLayerTreeFrameSink")) {
                        if (typeof m.didCreateAndInitializeFirstLayerTreeFrameSink !== "boolean")
                            return "didCreateAndInitializeFirstLayerTreeFrameSink: boolean expected";
                    }
                    if (m.treePriority != null && m.hasOwnProperty("treePriority")) {
                        switch (m.treePriority) {
                        default:
                            return "treePriority: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                            break;
                        }
                    }
                    if (m.scrollHandlerState != null && m.hasOwnProperty("scrollHandlerState")) {
                        switch (m.scrollHandlerState) {
                        default:
                            return "scrollHandlerState: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                            break;
                        }
                    }
                    if (m.criticalBeginMainFrameToActivateIsFast != null && m.hasOwnProperty("criticalBeginMainFrameToActivateIsFast")) {
                        if (typeof m.criticalBeginMainFrameToActivateIsFast !== "boolean")
                            return "criticalBeginMainFrameToActivateIsFast: boolean expected";
                    }
                    if (m.mainThreadMissedLastDeadline != null && m.hasOwnProperty("mainThreadMissedLastDeadline")) {
                        if (typeof m.mainThreadMissedLastDeadline !== "boolean")
                            return "mainThreadMissedLastDeadline: boolean expected";
                    }
                    if (m.videoNeedsBeginFrames != null && m.hasOwnProperty("videoNeedsBeginFrames")) {
                        if (typeof m.videoNeedsBeginFrames !== "boolean")
                            return "videoNeedsBeginFrames: boolean expected";
                    }
                    if (m.deferBeginMainFrame != null && m.hasOwnProperty("deferBeginMainFrame")) {
                        if (typeof m.deferBeginMainFrame !== "boolean")
                            return "deferBeginMainFrame: boolean expected";
                    }
                    if (m.lastCommitHadNoUpdates != null && m.hasOwnProperty("lastCommitHadNoUpdates")) {
                        if (typeof m.lastCommitHadNoUpdates !== "boolean")
                            return "lastCommitHadNoUpdates: boolean expected";
                    }
                    if (m.didDrawInLastFrame != null && m.hasOwnProperty("didDrawInLastFrame")) {
                        if (typeof m.didDrawInLastFrame !== "boolean")
                            return "didDrawInLastFrame: boolean expected";
                    }
                    if (m.didSubmitInLastFrame != null && m.hasOwnProperty("didSubmitInLastFrame")) {
                        if (typeof m.didSubmitInLastFrame !== "boolean")
                            return "didSubmitInLastFrame: boolean expected";
                    }
                    if (m.needsImplSideInvalidation != null && m.hasOwnProperty("needsImplSideInvalidation")) {
                        if (typeof m.needsImplSideInvalidation !== "boolean")
                            return "needsImplSideInvalidation: boolean expected";
                    }
                    if (m.currentPendingTreeIsImplSide != null && m.hasOwnProperty("currentPendingTreeIsImplSide")) {
                        if (typeof m.currentPendingTreeIsImplSide !== "boolean")
                            return "currentPendingTreeIsImplSide: boolean expected";
                    }
                    if (m.previousPendingTreeWasImplSide != null && m.hasOwnProperty("previousPendingTreeWasImplSide")) {
                        if (typeof m.previousPendingTreeWasImplSide !== "boolean")
                            return "previousPendingTreeWasImplSide: boolean expected";
                    }
                    if (m.processingAnimationWorkletsForActiveTree != null && m.hasOwnProperty("processingAnimationWorkletsForActiveTree")) {
                        if (typeof m.processingAnimationWorkletsForActiveTree !== "boolean")
                            return "processingAnimationWorkletsForActiveTree: boolean expected";
                    }
                    if (m.processingAnimationWorkletsForPendingTree != null && m.hasOwnProperty("processingAnimationWorkletsForPendingTree")) {
                        if (typeof m.processingAnimationWorkletsForPendingTree !== "boolean")
                            return "processingAnimationWorkletsForPendingTree: boolean expected";
                    }
                    if (m.processingPaintWorkletsForPendingTree != null && m.hasOwnProperty("processingPaintWorkletsForPendingTree")) {
                        if (typeof m.processingPaintWorkletsForPendingTree !== "boolean")
                            return "processingPaintWorkletsForPendingTree: boolean expected";
                    }
                    return null;
                };

                /**
                 * Creates a MinorState message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.ChromeCompositorStateMachine.MinorState} MinorState
                 */
                MinorState.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.ChromeCompositorStateMachine.MinorState)
                        return d;
                    var m = new $root.perfetto.protos.ChromeCompositorStateMachine.MinorState();
                    if (d.commitCount != null) {
                        m.commitCount = d.commitCount | 0;
                    }
                    if (d.currentFrameNumber != null) {
                        m.currentFrameNumber = d.currentFrameNumber | 0;
                    }
                    if (d.lastFrameNumberSubmitPerformed != null) {
                        m.lastFrameNumberSubmitPerformed = d.lastFrameNumberSubmitPerformed | 0;
                    }
                    if (d.lastFrameNumberDrawPerformed != null) {
                        m.lastFrameNumberDrawPerformed = d.lastFrameNumberDrawPerformed | 0;
                    }
                    if (d.lastFrameNumberBeginMainFrameSent != null) {
                        m.lastFrameNumberBeginMainFrameSent = d.lastFrameNumberBeginMainFrameSent | 0;
                    }
                    if (d.didDraw != null) {
                        m.didDraw = Boolean(d.didDraw);
                    }
                    if (d.didSendBeginMainFrameForCurrentFrame != null) {
                        m.didSendBeginMainFrameForCurrentFrame = Boolean(d.didSendBeginMainFrameForCurrentFrame);
                    }
                    if (d.didNotifyBeginMainFrameNotExpectedUntil != null) {
                        m.didNotifyBeginMainFrameNotExpectedUntil = Boolean(d.didNotifyBeginMainFrameNotExpectedUntil);
                    }
                    if (d.didNotifyBeginMainFrameNotExpectedSoon != null) {
                        m.didNotifyBeginMainFrameNotExpectedSoon = Boolean(d.didNotifyBeginMainFrameNotExpectedSoon);
                    }
                    if (d.wantsBeginMainFrameNotExpected != null) {
                        m.wantsBeginMainFrameNotExpected = Boolean(d.wantsBeginMainFrameNotExpected);
                    }
                    if (d.didCommitDuringFrame != null) {
                        m.didCommitDuringFrame = Boolean(d.didCommitDuringFrame);
                    }
                    if (d.didInvalidateLayerTreeFrameSink != null) {
                        m.didInvalidateLayerTreeFrameSink = Boolean(d.didInvalidateLayerTreeFrameSink);
                    }
                    if (d.didPerformImplSideInvalidaion != null) {
                        m.didPerformImplSideInvalidaion = Boolean(d.didPerformImplSideInvalidaion);
                    }
                    if (d.didPrepareTiles != null) {
                        m.didPrepareTiles = Boolean(d.didPrepareTiles);
                    }
                    if (d.consecutiveCheckerboardAnimations != null) {
                        m.consecutiveCheckerboardAnimations = d.consecutiveCheckerboardAnimations | 0;
                    }
                    if (d.pendingSubmitFrames != null) {
                        m.pendingSubmitFrames = d.pendingSubmitFrames | 0;
                    }
                    if (d.submitFramesWithCurrentLayerTreeFrameSink != null) {
                        m.submitFramesWithCurrentLayerTreeFrameSink = d.submitFramesWithCurrentLayerTreeFrameSink | 0;
                    }
                    if (d.needsRedraw != null) {
                        m.needsRedraw = Boolean(d.needsRedraw);
                    }
                    if (d.needsPrepareTiles != null) {
                        m.needsPrepareTiles = Boolean(d.needsPrepareTiles);
                    }
                    if (d.needsBeginMainFrame != null) {
                        m.needsBeginMainFrame = Boolean(d.needsBeginMainFrame);
                    }
                    if (d.needsOneBeginImplFrame != null) {
                        m.needsOneBeginImplFrame = Boolean(d.needsOneBeginImplFrame);
                    }
                    if (d.visible != null) {
                        m.visible = Boolean(d.visible);
                    }
                    if (d.beginFrameSourcePaused != null) {
                        m.beginFrameSourcePaused = Boolean(d.beginFrameSourcePaused);
                    }
                    if (d.canDraw != null) {
                        m.canDraw = Boolean(d.canDraw);
                    }
                    if (d.resourcelessDraw != null) {
                        m.resourcelessDraw = Boolean(d.resourcelessDraw);
                    }
                    if (d.hasPendingTree != null) {
                        m.hasPendingTree = Boolean(d.hasPendingTree);
                    }
                    if (d.pendingTreeIsReadyForActivation != null) {
                        m.pendingTreeIsReadyForActivation = Boolean(d.pendingTreeIsReadyForActivation);
                    }
                    if (d.activeTreeNeedsFirstDraw != null) {
                        m.activeTreeNeedsFirstDraw = Boolean(d.activeTreeNeedsFirstDraw);
                    }
                    if (d.activeTreeIsReadyToDraw != null) {
                        m.activeTreeIsReadyToDraw = Boolean(d.activeTreeIsReadyToDraw);
                    }
                    if (d.didCreateAndInitializeFirstLayerTreeFrameSink != null) {
                        m.didCreateAndInitializeFirstLayerTreeFrameSink = Boolean(d.didCreateAndInitializeFirstLayerTreeFrameSink);
                    }
                    switch (d.treePriority) {
                    case "TREE_PRIORITY_UNSPECIFIED":
                    case 0:
                        m.treePriority = 0;
                        break;
                    case "TREE_PRIORITY_SAME_PRIORITY_FOR_BOTH_TREES":
                    case 1:
                        m.treePriority = 1;
                        break;
                    case "TREE_PRIORITY_SMOOTHNESS_TAKES_PRIORITY":
                    case 2:
                        m.treePriority = 2;
                        break;
                    case "TREE_PRIORITY_NEW_CONTENT_TAKES_PRIORITY":
                    case 3:
                        m.treePriority = 3;
                        break;
                    }
                    switch (d.scrollHandlerState) {
                    case "SCROLL_HANDLER_UNSPECIFIED":
                    case 0:
                        m.scrollHandlerState = 0;
                        break;
                    case "SCROLL_AFFECTS_SCROLL_HANDLER":
                    case 1:
                        m.scrollHandlerState = 1;
                        break;
                    case "SCROLL_DOES_NOT_AFFECT_SCROLL_HANDLER":
                    case 2:
                        m.scrollHandlerState = 2;
                        break;
                    }
                    if (d.criticalBeginMainFrameToActivateIsFast != null) {
                        m.criticalBeginMainFrameToActivateIsFast = Boolean(d.criticalBeginMainFrameToActivateIsFast);
                    }
                    if (d.mainThreadMissedLastDeadline != null) {
                        m.mainThreadMissedLastDeadline = Boolean(d.mainThreadMissedLastDeadline);
                    }
                    if (d.videoNeedsBeginFrames != null) {
                        m.videoNeedsBeginFrames = Boolean(d.videoNeedsBeginFrames);
                    }
                    if (d.deferBeginMainFrame != null) {
                        m.deferBeginMainFrame = Boolean(d.deferBeginMainFrame);
                    }
                    if (d.lastCommitHadNoUpdates != null) {
                        m.lastCommitHadNoUpdates = Boolean(d.lastCommitHadNoUpdates);
                    }
                    if (d.didDrawInLastFrame != null) {
                        m.didDrawInLastFrame = Boolean(d.didDrawInLastFrame);
                    }
                    if (d.didSubmitInLastFrame != null) {
                        m.didSubmitInLastFrame = Boolean(d.didSubmitInLastFrame);
                    }
                    if (d.needsImplSideInvalidation != null) {
                        m.needsImplSideInvalidation = Boolean(d.needsImplSideInvalidation);
                    }
                    if (d.currentPendingTreeIsImplSide != null) {
                        m.currentPendingTreeIsImplSide = Boolean(d.currentPendingTreeIsImplSide);
                    }
                    if (d.previousPendingTreeWasImplSide != null) {
                        m.previousPendingTreeWasImplSide = Boolean(d.previousPendingTreeWasImplSide);
                    }
                    if (d.processingAnimationWorkletsForActiveTree != null) {
                        m.processingAnimationWorkletsForActiveTree = Boolean(d.processingAnimationWorkletsForActiveTree);
                    }
                    if (d.processingAnimationWorkletsForPendingTree != null) {
                        m.processingAnimationWorkletsForPendingTree = Boolean(d.processingAnimationWorkletsForPendingTree);
                    }
                    if (d.processingPaintWorkletsForPendingTree != null) {
                        m.processingPaintWorkletsForPendingTree = Boolean(d.processingPaintWorkletsForPendingTree);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a MinorState message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @static
                 * @param {perfetto.protos.ChromeCompositorStateMachine.MinorState} m MinorState
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                MinorState.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.commitCount = 0;
                        d.currentFrameNumber = 0;
                        d.lastFrameNumberSubmitPerformed = 0;
                        d.lastFrameNumberDrawPerformed = 0;
                        d.lastFrameNumberBeginMainFrameSent = 0;
                        d.didDraw = false;
                        d.didSendBeginMainFrameForCurrentFrame = false;
                        d.didNotifyBeginMainFrameNotExpectedUntil = false;
                        d.didNotifyBeginMainFrameNotExpectedSoon = false;
                        d.wantsBeginMainFrameNotExpected = false;
                        d.didCommitDuringFrame = false;
                        d.didInvalidateLayerTreeFrameSink = false;
                        d.didPerformImplSideInvalidaion = false;
                        d.didPrepareTiles = false;
                        d.consecutiveCheckerboardAnimations = 0;
                        d.pendingSubmitFrames = 0;
                        d.submitFramesWithCurrentLayerTreeFrameSink = 0;
                        d.needsRedraw = false;
                        d.needsPrepareTiles = false;
                        d.needsBeginMainFrame = false;
                        d.needsOneBeginImplFrame = false;
                        d.visible = false;
                        d.beginFrameSourcePaused = false;
                        d.canDraw = false;
                        d.resourcelessDraw = false;
                        d.hasPendingTree = false;
                        d.pendingTreeIsReadyForActivation = false;
                        d.activeTreeNeedsFirstDraw = false;
                        d.activeTreeIsReadyToDraw = false;
                        d.didCreateAndInitializeFirstLayerTreeFrameSink = false;
                        d.treePriority = o.enums === String ? "TREE_PRIORITY_UNSPECIFIED" : 0;
                        d.scrollHandlerState = o.enums === String ? "SCROLL_HANDLER_UNSPECIFIED" : 0;
                        d.criticalBeginMainFrameToActivateIsFast = false;
                        d.mainThreadMissedLastDeadline = false;
                        d.videoNeedsBeginFrames = false;
                        d.deferBeginMainFrame = false;
                        d.lastCommitHadNoUpdates = false;
                        d.didDrawInLastFrame = false;
                        d.didSubmitInLastFrame = false;
                        d.needsImplSideInvalidation = false;
                        d.currentPendingTreeIsImplSide = false;
                        d.previousPendingTreeWasImplSide = false;
                        d.processingAnimationWorkletsForActiveTree = false;
                        d.processingAnimationWorkletsForPendingTree = false;
                        d.processingPaintWorkletsForPendingTree = false;
                    }
                    if (m.commitCount != null && m.hasOwnProperty("commitCount")) {
                        d.commitCount = m.commitCount;
                    }
                    if (m.currentFrameNumber != null && m.hasOwnProperty("currentFrameNumber")) {
                        d.currentFrameNumber = m.currentFrameNumber;
                    }
                    if (m.lastFrameNumberSubmitPerformed != null && m.hasOwnProperty("lastFrameNumberSubmitPerformed")) {
                        d.lastFrameNumberSubmitPerformed = m.lastFrameNumberSubmitPerformed;
                    }
                    if (m.lastFrameNumberDrawPerformed != null && m.hasOwnProperty("lastFrameNumberDrawPerformed")) {
                        d.lastFrameNumberDrawPerformed = m.lastFrameNumberDrawPerformed;
                    }
                    if (m.lastFrameNumberBeginMainFrameSent != null && m.hasOwnProperty("lastFrameNumberBeginMainFrameSent")) {
                        d.lastFrameNumberBeginMainFrameSent = m.lastFrameNumberBeginMainFrameSent;
                    }
                    if (m.didDraw != null && m.hasOwnProperty("didDraw")) {
                        d.didDraw = m.didDraw;
                    }
                    if (m.didSendBeginMainFrameForCurrentFrame != null && m.hasOwnProperty("didSendBeginMainFrameForCurrentFrame")) {
                        d.didSendBeginMainFrameForCurrentFrame = m.didSendBeginMainFrameForCurrentFrame;
                    }
                    if (m.didNotifyBeginMainFrameNotExpectedUntil != null && m.hasOwnProperty("didNotifyBeginMainFrameNotExpectedUntil")) {
                        d.didNotifyBeginMainFrameNotExpectedUntil = m.didNotifyBeginMainFrameNotExpectedUntil;
                    }
                    if (m.didNotifyBeginMainFrameNotExpectedSoon != null && m.hasOwnProperty("didNotifyBeginMainFrameNotExpectedSoon")) {
                        d.didNotifyBeginMainFrameNotExpectedSoon = m.didNotifyBeginMainFrameNotExpectedSoon;
                    }
                    if (m.wantsBeginMainFrameNotExpected != null && m.hasOwnProperty("wantsBeginMainFrameNotExpected")) {
                        d.wantsBeginMainFrameNotExpected = m.wantsBeginMainFrameNotExpected;
                    }
                    if (m.didCommitDuringFrame != null && m.hasOwnProperty("didCommitDuringFrame")) {
                        d.didCommitDuringFrame = m.didCommitDuringFrame;
                    }
                    if (m.didInvalidateLayerTreeFrameSink != null && m.hasOwnProperty("didInvalidateLayerTreeFrameSink")) {
                        d.didInvalidateLayerTreeFrameSink = m.didInvalidateLayerTreeFrameSink;
                    }
                    if (m.didPerformImplSideInvalidaion != null && m.hasOwnProperty("didPerformImplSideInvalidaion")) {
                        d.didPerformImplSideInvalidaion = m.didPerformImplSideInvalidaion;
                    }
                    if (m.didPrepareTiles != null && m.hasOwnProperty("didPrepareTiles")) {
                        d.didPrepareTiles = m.didPrepareTiles;
                    }
                    if (m.consecutiveCheckerboardAnimations != null && m.hasOwnProperty("consecutiveCheckerboardAnimations")) {
                        d.consecutiveCheckerboardAnimations = m.consecutiveCheckerboardAnimations;
                    }
                    if (m.pendingSubmitFrames != null && m.hasOwnProperty("pendingSubmitFrames")) {
                        d.pendingSubmitFrames = m.pendingSubmitFrames;
                    }
                    if (m.submitFramesWithCurrentLayerTreeFrameSink != null && m.hasOwnProperty("submitFramesWithCurrentLayerTreeFrameSink")) {
                        d.submitFramesWithCurrentLayerTreeFrameSink = m.submitFramesWithCurrentLayerTreeFrameSink;
                    }
                    if (m.needsRedraw != null && m.hasOwnProperty("needsRedraw")) {
                        d.needsRedraw = m.needsRedraw;
                    }
                    if (m.needsPrepareTiles != null && m.hasOwnProperty("needsPrepareTiles")) {
                        d.needsPrepareTiles = m.needsPrepareTiles;
                    }
                    if (m.needsBeginMainFrame != null && m.hasOwnProperty("needsBeginMainFrame")) {
                        d.needsBeginMainFrame = m.needsBeginMainFrame;
                    }
                    if (m.needsOneBeginImplFrame != null && m.hasOwnProperty("needsOneBeginImplFrame")) {
                        d.needsOneBeginImplFrame = m.needsOneBeginImplFrame;
                    }
                    if (m.visible != null && m.hasOwnProperty("visible")) {
                        d.visible = m.visible;
                    }
                    if (m.beginFrameSourcePaused != null && m.hasOwnProperty("beginFrameSourcePaused")) {
                        d.beginFrameSourcePaused = m.beginFrameSourcePaused;
                    }
                    if (m.canDraw != null && m.hasOwnProperty("canDraw")) {
                        d.canDraw = m.canDraw;
                    }
                    if (m.resourcelessDraw != null && m.hasOwnProperty("resourcelessDraw")) {
                        d.resourcelessDraw = m.resourcelessDraw;
                    }
                    if (m.hasPendingTree != null && m.hasOwnProperty("hasPendingTree")) {
                        d.hasPendingTree = m.hasPendingTree;
                    }
                    if (m.pendingTreeIsReadyForActivation != null && m.hasOwnProperty("pendingTreeIsReadyForActivation")) {
                        d.pendingTreeIsReadyForActivation = m.pendingTreeIsReadyForActivation;
                    }
                    if (m.activeTreeNeedsFirstDraw != null && m.hasOwnProperty("activeTreeNeedsFirstDraw")) {
                        d.activeTreeNeedsFirstDraw = m.activeTreeNeedsFirstDraw;
                    }
                    if (m.activeTreeIsReadyToDraw != null && m.hasOwnProperty("activeTreeIsReadyToDraw")) {
                        d.activeTreeIsReadyToDraw = m.activeTreeIsReadyToDraw;
                    }
                    if (m.didCreateAndInitializeFirstLayerTreeFrameSink != null && m.hasOwnProperty("didCreateAndInitializeFirstLayerTreeFrameSink")) {
                        d.didCreateAndInitializeFirstLayerTreeFrameSink = m.didCreateAndInitializeFirstLayerTreeFrameSink;
                    }
                    if (m.treePriority != null && m.hasOwnProperty("treePriority")) {
                        d.treePriority = o.enums === String ? $root.perfetto.protos.ChromeCompositorStateMachine.MinorState.TreePriority[m.treePriority] : m.treePriority;
                    }
                    if (m.scrollHandlerState != null && m.hasOwnProperty("scrollHandlerState")) {
                        d.scrollHandlerState = o.enums === String ? $root.perfetto.protos.ChromeCompositorStateMachine.MinorState.ScrollHandlerState[m.scrollHandlerState] : m.scrollHandlerState;
                    }
                    if (m.criticalBeginMainFrameToActivateIsFast != null && m.hasOwnProperty("criticalBeginMainFrameToActivateIsFast")) {
                        d.criticalBeginMainFrameToActivateIsFast = m.criticalBeginMainFrameToActivateIsFast;
                    }
                    if (m.mainThreadMissedLastDeadline != null && m.hasOwnProperty("mainThreadMissedLastDeadline")) {
                        d.mainThreadMissedLastDeadline = m.mainThreadMissedLastDeadline;
                    }
                    if (m.videoNeedsBeginFrames != null && m.hasOwnProperty("videoNeedsBeginFrames")) {
                        d.videoNeedsBeginFrames = m.videoNeedsBeginFrames;
                    }
                    if (m.deferBeginMainFrame != null && m.hasOwnProperty("deferBeginMainFrame")) {
                        d.deferBeginMainFrame = m.deferBeginMainFrame;
                    }
                    if (m.lastCommitHadNoUpdates != null && m.hasOwnProperty("lastCommitHadNoUpdates")) {
                        d.lastCommitHadNoUpdates = m.lastCommitHadNoUpdates;
                    }
                    if (m.didDrawInLastFrame != null && m.hasOwnProperty("didDrawInLastFrame")) {
                        d.didDrawInLastFrame = m.didDrawInLastFrame;
                    }
                    if (m.didSubmitInLastFrame != null && m.hasOwnProperty("didSubmitInLastFrame")) {
                        d.didSubmitInLastFrame = m.didSubmitInLastFrame;
                    }
                    if (m.needsImplSideInvalidation != null && m.hasOwnProperty("needsImplSideInvalidation")) {
                        d.needsImplSideInvalidation = m.needsImplSideInvalidation;
                    }
                    if (m.currentPendingTreeIsImplSide != null && m.hasOwnProperty("currentPendingTreeIsImplSide")) {
                        d.currentPendingTreeIsImplSide = m.currentPendingTreeIsImplSide;
                    }
                    if (m.previousPendingTreeWasImplSide != null && m.hasOwnProperty("previousPendingTreeWasImplSide")) {
                        d.previousPendingTreeWasImplSide = m.previousPendingTreeWasImplSide;
                    }
                    if (m.processingAnimationWorkletsForActiveTree != null && m.hasOwnProperty("processingAnimationWorkletsForActiveTree")) {
                        d.processingAnimationWorkletsForActiveTree = m.processingAnimationWorkletsForActiveTree;
                    }
                    if (m.processingAnimationWorkletsForPendingTree != null && m.hasOwnProperty("processingAnimationWorkletsForPendingTree")) {
                        d.processingAnimationWorkletsForPendingTree = m.processingAnimationWorkletsForPendingTree;
                    }
                    if (m.processingPaintWorkletsForPendingTree != null && m.hasOwnProperty("processingPaintWorkletsForPendingTree")) {
                        d.processingPaintWorkletsForPendingTree = m.processingPaintWorkletsForPendingTree;
                    }
                    return d;
                };

                /**
                 * Converts this MinorState to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.ChromeCompositorStateMachine.MinorState
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                MinorState.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                /**
                 * TreePriority enum.
                 * @name perfetto.protos.ChromeCompositorStateMachine.MinorState.TreePriority
                 * @enum {number}
                 * @property {number} TREE_PRIORITY_UNSPECIFIED=0 TREE_PRIORITY_UNSPECIFIED value
                 * @property {number} TREE_PRIORITY_SAME_PRIORITY_FOR_BOTH_TREES=1 TREE_PRIORITY_SAME_PRIORITY_FOR_BOTH_TREES value
                 * @property {number} TREE_PRIORITY_SMOOTHNESS_TAKES_PRIORITY=2 TREE_PRIORITY_SMOOTHNESS_TAKES_PRIORITY value
                 * @property {number} TREE_PRIORITY_NEW_CONTENT_TAKES_PRIORITY=3 TREE_PRIORITY_NEW_CONTENT_TAKES_PRIORITY value
                 */
                MinorState.TreePriority = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "TREE_PRIORITY_UNSPECIFIED"] = 0;
                    values[valuesById[1] = "TREE_PRIORITY_SAME_PRIORITY_FOR_BOTH_TREES"] = 1;
                    values[valuesById[2] = "TREE_PRIORITY_SMOOTHNESS_TAKES_PRIORITY"] = 2;
                    values[valuesById[3] = "TREE_PRIORITY_NEW_CONTENT_TAKES_PRIORITY"] = 3;
                    return values;
                })();

                /**
                 * ScrollHandlerState enum.
                 * @name perfetto.protos.ChromeCompositorStateMachine.MinorState.ScrollHandlerState
                 * @enum {number}
                 * @property {number} SCROLL_HANDLER_UNSPECIFIED=0 SCROLL_HANDLER_UNSPECIFIED value
                 * @property {number} SCROLL_AFFECTS_SCROLL_HANDLER=1 SCROLL_AFFECTS_SCROLL_HANDLER value
                 * @property {number} SCROLL_DOES_NOT_AFFECT_SCROLL_HANDLER=2 SCROLL_DOES_NOT_AFFECT_SCROLL_HANDLER value
                 */
                MinorState.ScrollHandlerState = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "SCROLL_HANDLER_UNSPECIFIED"] = 0;
                    values[valuesById[1] = "SCROLL_AFFECTS_SCROLL_HANDLER"] = 1;
                    values[valuesById[2] = "SCROLL_DOES_NOT_AFFECT_SCROLL_HANDLER"] = 2;
                    return values;
                })();

                return MinorState;
            })();

            return ChromeCompositorStateMachine;
        })();

        protos.BeginFrameArgs = (function() {

            /**
             * Properties of a BeginFrameArgs.
             * @memberof perfetto.protos
             * @interface IBeginFrameArgs
             * @property {perfetto.protos.BeginFrameArgs.BeginFrameArgsType|null} [type] BeginFrameArgs type
             * @property {number|null} [sourceId] BeginFrameArgs sourceId
             * @property {number|null} [sequenceNumber] BeginFrameArgs sequenceNumber
             * @property {number|null} [frameTimeUs] BeginFrameArgs frameTimeUs
             * @property {number|null} [deadlineUs] BeginFrameArgs deadlineUs
             * @property {number|null} [intervalDeltaUs] BeginFrameArgs intervalDeltaUs
             * @property {boolean|null} [onCriticalPath] BeginFrameArgs onCriticalPath
             * @property {boolean|null} [animateOnly] BeginFrameArgs animateOnly
             * @property {number|null} [sourceLocationIid] BeginFrameArgs sourceLocationIid
             * @property {perfetto.protos.ISourceLocation|null} [sourceLocation] BeginFrameArgs sourceLocation
             * @property {number|null} [framesThrottledSinceLast] BeginFrameArgs framesThrottledSinceLast
             */

            /**
             * Constructs a new BeginFrameArgs.
             * @memberof perfetto.protos
             * @classdesc Represents a BeginFrameArgs.
             * @implements IBeginFrameArgs
             * @constructor
             * @param {perfetto.protos.IBeginFrameArgs=} [p] Properties to set
             */
            function BeginFrameArgs(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BeginFrameArgs type.
             * @member {perfetto.protos.BeginFrameArgs.BeginFrameArgsType} type
             * @memberof perfetto.protos.BeginFrameArgs
             * @instance
             */
            BeginFrameArgs.prototype.type = 0;

            /**
             * BeginFrameArgs sourceId.
             * @member {number} sourceId
             * @memberof perfetto.protos.BeginFrameArgs
             * @instance
             */
            BeginFrameArgs.prototype.sourceId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BeginFrameArgs sequenceNumber.
             * @member {number} sequenceNumber
             * @memberof perfetto.protos.BeginFrameArgs
             * @instance
             */
            BeginFrameArgs.prototype.sequenceNumber = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BeginFrameArgs frameTimeUs.
             * @member {number} frameTimeUs
             * @memberof perfetto.protos.BeginFrameArgs
             * @instance
             */
            BeginFrameArgs.prototype.frameTimeUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * BeginFrameArgs deadlineUs.
             * @member {number} deadlineUs
             * @memberof perfetto.protos.BeginFrameArgs
             * @instance
             */
            BeginFrameArgs.prototype.deadlineUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * BeginFrameArgs intervalDeltaUs.
             * @member {number} intervalDeltaUs
             * @memberof perfetto.protos.BeginFrameArgs
             * @instance
             */
            BeginFrameArgs.prototype.intervalDeltaUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * BeginFrameArgs onCriticalPath.
             * @member {boolean} onCriticalPath
             * @memberof perfetto.protos.BeginFrameArgs
             * @instance
             */
            BeginFrameArgs.prototype.onCriticalPath = false;

            /**
             * BeginFrameArgs animateOnly.
             * @member {boolean} animateOnly
             * @memberof perfetto.protos.BeginFrameArgs
             * @instance
             */
            BeginFrameArgs.prototype.animateOnly = false;

            /**
             * BeginFrameArgs sourceLocationIid.
             * @member {number} sourceLocationIid
             * @memberof perfetto.protos.BeginFrameArgs
             * @instance
             */
            BeginFrameArgs.prototype.sourceLocationIid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * BeginFrameArgs sourceLocation.
             * @member {perfetto.protos.ISourceLocation|null|undefined} sourceLocation
             * @memberof perfetto.protos.BeginFrameArgs
             * @instance
             */
            BeginFrameArgs.prototype.sourceLocation = null;

            /**
             * BeginFrameArgs framesThrottledSinceLast.
             * @member {number} framesThrottledSinceLast
             * @memberof perfetto.protos.BeginFrameArgs
             * @instance
             */
            BeginFrameArgs.prototype.framesThrottledSinceLast = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * BeginFrameArgs createdFrom.
             * @member {"sourceLocationIid"|"sourceLocation"|undefined} createdFrom
             * @memberof perfetto.protos.BeginFrameArgs
             * @instance
             */
            Object.defineProperty(BeginFrameArgs.prototype, "createdFrom", {
                get: $util.oneOfGetter($oneOfFields = ["sourceLocationIid", "sourceLocation"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new BeginFrameArgs instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BeginFrameArgs
             * @static
             * @param {perfetto.protos.IBeginFrameArgs=} [properties] Properties to set
             * @returns {perfetto.protos.BeginFrameArgs} BeginFrameArgs instance
             */
            BeginFrameArgs.create = function create(properties) {
                return new BeginFrameArgs(properties);
            };

            /**
             * Encodes the specified BeginFrameArgs message. Does not implicitly {@link perfetto.protos.BeginFrameArgs.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BeginFrameArgs
             * @static
             * @param {perfetto.protos.IBeginFrameArgs} m BeginFrameArgs message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BeginFrameArgs.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                    w.uint32(8).int32(m.type);
                if (m.sourceId != null && Object.hasOwnProperty.call(m, "sourceId"))
                    w.uint32(16).uint64(m.sourceId);
                if (m.sequenceNumber != null && Object.hasOwnProperty.call(m, "sequenceNumber"))
                    w.uint32(24).uint64(m.sequenceNumber);
                if (m.frameTimeUs != null && Object.hasOwnProperty.call(m, "frameTimeUs"))
                    w.uint32(32).int64(m.frameTimeUs);
                if (m.deadlineUs != null && Object.hasOwnProperty.call(m, "deadlineUs"))
                    w.uint32(40).int64(m.deadlineUs);
                if (m.intervalDeltaUs != null && Object.hasOwnProperty.call(m, "intervalDeltaUs"))
                    w.uint32(48).int64(m.intervalDeltaUs);
                if (m.onCriticalPath != null && Object.hasOwnProperty.call(m, "onCriticalPath"))
                    w.uint32(56).bool(m.onCriticalPath);
                if (m.animateOnly != null && Object.hasOwnProperty.call(m, "animateOnly"))
                    w.uint32(64).bool(m.animateOnly);
                if (m.sourceLocationIid != null && Object.hasOwnProperty.call(m, "sourceLocationIid"))
                    w.uint32(72).uint64(m.sourceLocationIid);
                if (m.sourceLocation != null && Object.hasOwnProperty.call(m, "sourceLocation"))
                    $root.perfetto.protos.SourceLocation.encode(m.sourceLocation, w.uint32(82).fork()).ldelim();
                if (m.framesThrottledSinceLast != null && Object.hasOwnProperty.call(m, "framesThrottledSinceLast"))
                    w.uint32(96).int64(m.framesThrottledSinceLast);
                return w;
            };

            /**
             * Encodes the specified BeginFrameArgs message, length delimited. Does not implicitly {@link perfetto.protos.BeginFrameArgs.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BeginFrameArgs
             * @static
             * @param {perfetto.protos.IBeginFrameArgs} message BeginFrameArgs message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BeginFrameArgs.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BeginFrameArgs message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BeginFrameArgs
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BeginFrameArgs} BeginFrameArgs
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BeginFrameArgs.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BeginFrameArgs();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.type = r.int32();
                        break;
                    case 2:
                        m.sourceId = r.uint64();
                        break;
                    case 3:
                        m.sequenceNumber = r.uint64();
                        break;
                    case 4:
                        m.frameTimeUs = r.int64();
                        break;
                    case 5:
                        m.deadlineUs = r.int64();
                        break;
                    case 6:
                        m.intervalDeltaUs = r.int64();
                        break;
                    case 7:
                        m.onCriticalPath = r.bool();
                        break;
                    case 8:
                        m.animateOnly = r.bool();
                        break;
                    case 9:
                        m.sourceLocationIid = r.uint64();
                        break;
                    case 10:
                        m.sourceLocation = $root.perfetto.protos.SourceLocation.decode(r, r.uint32());
                        break;
                    case 12:
                        m.framesThrottledSinceLast = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BeginFrameArgs message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BeginFrameArgs
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BeginFrameArgs} BeginFrameArgs
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BeginFrameArgs.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BeginFrameArgs message.
             * @function verify
             * @memberof perfetto.protos.BeginFrameArgs
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BeginFrameArgs.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                var p = {};
                if (m.type != null && m.hasOwnProperty("type")) {
                    switch (m.type) {
                    default:
                        return "type: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                }
                if (m.sourceId != null && m.hasOwnProperty("sourceId")) {
                    if (!$util.isInteger(m.sourceId) && !(m.sourceId && $util.isInteger(m.sourceId.low) && $util.isInteger(m.sourceId.high)))
                        return "sourceId: integer|Long expected";
                }
                if (m.sequenceNumber != null && m.hasOwnProperty("sequenceNumber")) {
                    if (!$util.isInteger(m.sequenceNumber) && !(m.sequenceNumber && $util.isInteger(m.sequenceNumber.low) && $util.isInteger(m.sequenceNumber.high)))
                        return "sequenceNumber: integer|Long expected";
                }
                if (m.frameTimeUs != null && m.hasOwnProperty("frameTimeUs")) {
                    if (!$util.isInteger(m.frameTimeUs) && !(m.frameTimeUs && $util.isInteger(m.frameTimeUs.low) && $util.isInteger(m.frameTimeUs.high)))
                        return "frameTimeUs: integer|Long expected";
                }
                if (m.deadlineUs != null && m.hasOwnProperty("deadlineUs")) {
                    if (!$util.isInteger(m.deadlineUs) && !(m.deadlineUs && $util.isInteger(m.deadlineUs.low) && $util.isInteger(m.deadlineUs.high)))
                        return "deadlineUs: integer|Long expected";
                }
                if (m.intervalDeltaUs != null && m.hasOwnProperty("intervalDeltaUs")) {
                    if (!$util.isInteger(m.intervalDeltaUs) && !(m.intervalDeltaUs && $util.isInteger(m.intervalDeltaUs.low) && $util.isInteger(m.intervalDeltaUs.high)))
                        return "intervalDeltaUs: integer|Long expected";
                }
                if (m.onCriticalPath != null && m.hasOwnProperty("onCriticalPath")) {
                    if (typeof m.onCriticalPath !== "boolean")
                        return "onCriticalPath: boolean expected";
                }
                if (m.animateOnly != null && m.hasOwnProperty("animateOnly")) {
                    if (typeof m.animateOnly !== "boolean")
                        return "animateOnly: boolean expected";
                }
                if (m.sourceLocationIid != null && m.hasOwnProperty("sourceLocationIid")) {
                    p.createdFrom = 1;
                    if (!$util.isInteger(m.sourceLocationIid) && !(m.sourceLocationIid && $util.isInteger(m.sourceLocationIid.low) && $util.isInteger(m.sourceLocationIid.high)))
                        return "sourceLocationIid: integer|Long expected";
                }
                if (m.sourceLocation != null && m.hasOwnProperty("sourceLocation")) {
                    if (p.createdFrom === 1)
                        return "createdFrom: multiple values";
                    p.createdFrom = 1;
                    {
                        var e = $root.perfetto.protos.SourceLocation.verify(m.sourceLocation);
                        if (e)
                            return "sourceLocation." + e;
                    }
                }
                if (m.framesThrottledSinceLast != null && m.hasOwnProperty("framesThrottledSinceLast")) {
                    if (!$util.isInteger(m.framesThrottledSinceLast) && !(m.framesThrottledSinceLast && $util.isInteger(m.framesThrottledSinceLast.low) && $util.isInteger(m.framesThrottledSinceLast.high)))
                        return "framesThrottledSinceLast: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a BeginFrameArgs message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BeginFrameArgs
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BeginFrameArgs} BeginFrameArgs
             */
            BeginFrameArgs.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BeginFrameArgs)
                    return d;
                var m = new $root.perfetto.protos.BeginFrameArgs();
                switch (d.type) {
                case "BEGIN_FRAME_ARGS_TYPE_UNSPECIFIED":
                case 0:
                    m.type = 0;
                    break;
                case "BEGIN_FRAME_ARGS_TYPE_INVALID":
                case 1:
                    m.type = 1;
                    break;
                case "BEGIN_FRAME_ARGS_TYPE_NORMAL":
                case 2:
                    m.type = 2;
                    break;
                case "BEGIN_FRAME_ARGS_TYPE_MISSED":
                case 3:
                    m.type = 3;
                    break;
                }
                if (d.sourceId != null) {
                    if ($util.Long)
                        (m.sourceId = $util.Long.fromValue(d.sourceId)).unsigned = true;
                    else if (typeof d.sourceId === "string")
                        m.sourceId = parseInt(d.sourceId, 10);
                    else if (typeof d.sourceId === "number")
                        m.sourceId = d.sourceId;
                    else if (typeof d.sourceId === "object")
                        m.sourceId = new $util.LongBits(d.sourceId.low >>> 0, d.sourceId.high >>> 0).toNumber(true);
                }
                if (d.sequenceNumber != null) {
                    if ($util.Long)
                        (m.sequenceNumber = $util.Long.fromValue(d.sequenceNumber)).unsigned = true;
                    else if (typeof d.sequenceNumber === "string")
                        m.sequenceNumber = parseInt(d.sequenceNumber, 10);
                    else if (typeof d.sequenceNumber === "number")
                        m.sequenceNumber = d.sequenceNumber;
                    else if (typeof d.sequenceNumber === "object")
                        m.sequenceNumber = new $util.LongBits(d.sequenceNumber.low >>> 0, d.sequenceNumber.high >>> 0).toNumber(true);
                }
                if (d.frameTimeUs != null) {
                    if ($util.Long)
                        (m.frameTimeUs = $util.Long.fromValue(d.frameTimeUs)).unsigned = false;
                    else if (typeof d.frameTimeUs === "string")
                        m.frameTimeUs = parseInt(d.frameTimeUs, 10);
                    else if (typeof d.frameTimeUs === "number")
                        m.frameTimeUs = d.frameTimeUs;
                    else if (typeof d.frameTimeUs === "object")
                        m.frameTimeUs = new $util.LongBits(d.frameTimeUs.low >>> 0, d.frameTimeUs.high >>> 0).toNumber();
                }
                if (d.deadlineUs != null) {
                    if ($util.Long)
                        (m.deadlineUs = $util.Long.fromValue(d.deadlineUs)).unsigned = false;
                    else if (typeof d.deadlineUs === "string")
                        m.deadlineUs = parseInt(d.deadlineUs, 10);
                    else if (typeof d.deadlineUs === "number")
                        m.deadlineUs = d.deadlineUs;
                    else if (typeof d.deadlineUs === "object")
                        m.deadlineUs = new $util.LongBits(d.deadlineUs.low >>> 0, d.deadlineUs.high >>> 0).toNumber();
                }
                if (d.intervalDeltaUs != null) {
                    if ($util.Long)
                        (m.intervalDeltaUs = $util.Long.fromValue(d.intervalDeltaUs)).unsigned = false;
                    else if (typeof d.intervalDeltaUs === "string")
                        m.intervalDeltaUs = parseInt(d.intervalDeltaUs, 10);
                    else if (typeof d.intervalDeltaUs === "number")
                        m.intervalDeltaUs = d.intervalDeltaUs;
                    else if (typeof d.intervalDeltaUs === "object")
                        m.intervalDeltaUs = new $util.LongBits(d.intervalDeltaUs.low >>> 0, d.intervalDeltaUs.high >>> 0).toNumber();
                }
                if (d.onCriticalPath != null) {
                    m.onCriticalPath = Boolean(d.onCriticalPath);
                }
                if (d.animateOnly != null) {
                    m.animateOnly = Boolean(d.animateOnly);
                }
                if (d.sourceLocationIid != null) {
                    if ($util.Long)
                        (m.sourceLocationIid = $util.Long.fromValue(d.sourceLocationIid)).unsigned = true;
                    else if (typeof d.sourceLocationIid === "string")
                        m.sourceLocationIid = parseInt(d.sourceLocationIid, 10);
                    else if (typeof d.sourceLocationIid === "number")
                        m.sourceLocationIid = d.sourceLocationIid;
                    else if (typeof d.sourceLocationIid === "object")
                        m.sourceLocationIid = new $util.LongBits(d.sourceLocationIid.low >>> 0, d.sourceLocationIid.high >>> 0).toNumber(true);
                }
                if (d.sourceLocation != null) {
                    if (typeof d.sourceLocation !== "object")
                        throw TypeError(".perfetto.protos.BeginFrameArgs.sourceLocation: object expected");
                    m.sourceLocation = $root.perfetto.protos.SourceLocation.fromObject(d.sourceLocation);
                }
                if (d.framesThrottledSinceLast != null) {
                    if ($util.Long)
                        (m.framesThrottledSinceLast = $util.Long.fromValue(d.framesThrottledSinceLast)).unsigned = false;
                    else if (typeof d.framesThrottledSinceLast === "string")
                        m.framesThrottledSinceLast = parseInt(d.framesThrottledSinceLast, 10);
                    else if (typeof d.framesThrottledSinceLast === "number")
                        m.framesThrottledSinceLast = d.framesThrottledSinceLast;
                    else if (typeof d.framesThrottledSinceLast === "object")
                        m.framesThrottledSinceLast = new $util.LongBits(d.framesThrottledSinceLast.low >>> 0, d.framesThrottledSinceLast.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from a BeginFrameArgs message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BeginFrameArgs
             * @static
             * @param {perfetto.protos.BeginFrameArgs} m BeginFrameArgs
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BeginFrameArgs.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.type = o.enums === String ? "BEGIN_FRAME_ARGS_TYPE_UNSPECIFIED" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sourceId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sourceId = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sequenceNumber = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sequenceNumber = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.frameTimeUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.frameTimeUs = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.deadlineUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.deadlineUs = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.intervalDeltaUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.intervalDeltaUs = o.longs === String ? "0" : 0;
                    d.onCriticalPath = false;
                    d.animateOnly = false;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.framesThrottledSinceLast = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.framesThrottledSinceLast = o.longs === String ? "0" : 0;
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    d.type = o.enums === String ? $root.perfetto.protos.BeginFrameArgs.BeginFrameArgsType[m.type] : m.type;
                }
                if (m.sourceId != null && m.hasOwnProperty("sourceId")) {
                    if (typeof m.sourceId === "number")
                        d.sourceId = o.longs === String ? String(m.sourceId) : m.sourceId;
                    else
                        d.sourceId = o.longs === String ? $util.Long.prototype.toString.call(m.sourceId) : o.longs === Number ? new $util.LongBits(m.sourceId.low >>> 0, m.sourceId.high >>> 0).toNumber(true) : m.sourceId;
                }
                if (m.sequenceNumber != null && m.hasOwnProperty("sequenceNumber")) {
                    if (typeof m.sequenceNumber === "number")
                        d.sequenceNumber = o.longs === String ? String(m.sequenceNumber) : m.sequenceNumber;
                    else
                        d.sequenceNumber = o.longs === String ? $util.Long.prototype.toString.call(m.sequenceNumber) : o.longs === Number ? new $util.LongBits(m.sequenceNumber.low >>> 0, m.sequenceNumber.high >>> 0).toNumber(true) : m.sequenceNumber;
                }
                if (m.frameTimeUs != null && m.hasOwnProperty("frameTimeUs")) {
                    if (typeof m.frameTimeUs === "number")
                        d.frameTimeUs = o.longs === String ? String(m.frameTimeUs) : m.frameTimeUs;
                    else
                        d.frameTimeUs = o.longs === String ? $util.Long.prototype.toString.call(m.frameTimeUs) : o.longs === Number ? new $util.LongBits(m.frameTimeUs.low >>> 0, m.frameTimeUs.high >>> 0).toNumber() : m.frameTimeUs;
                }
                if (m.deadlineUs != null && m.hasOwnProperty("deadlineUs")) {
                    if (typeof m.deadlineUs === "number")
                        d.deadlineUs = o.longs === String ? String(m.deadlineUs) : m.deadlineUs;
                    else
                        d.deadlineUs = o.longs === String ? $util.Long.prototype.toString.call(m.deadlineUs) : o.longs === Number ? new $util.LongBits(m.deadlineUs.low >>> 0, m.deadlineUs.high >>> 0).toNumber() : m.deadlineUs;
                }
                if (m.intervalDeltaUs != null && m.hasOwnProperty("intervalDeltaUs")) {
                    if (typeof m.intervalDeltaUs === "number")
                        d.intervalDeltaUs = o.longs === String ? String(m.intervalDeltaUs) : m.intervalDeltaUs;
                    else
                        d.intervalDeltaUs = o.longs === String ? $util.Long.prototype.toString.call(m.intervalDeltaUs) : o.longs === Number ? new $util.LongBits(m.intervalDeltaUs.low >>> 0, m.intervalDeltaUs.high >>> 0).toNumber() : m.intervalDeltaUs;
                }
                if (m.onCriticalPath != null && m.hasOwnProperty("onCriticalPath")) {
                    d.onCriticalPath = m.onCriticalPath;
                }
                if (m.animateOnly != null && m.hasOwnProperty("animateOnly")) {
                    d.animateOnly = m.animateOnly;
                }
                if (m.sourceLocationIid != null && m.hasOwnProperty("sourceLocationIid")) {
                    if (typeof m.sourceLocationIid === "number")
                        d.sourceLocationIid = o.longs === String ? String(m.sourceLocationIid) : m.sourceLocationIid;
                    else
                        d.sourceLocationIid = o.longs === String ? $util.Long.prototype.toString.call(m.sourceLocationIid) : o.longs === Number ? new $util.LongBits(m.sourceLocationIid.low >>> 0, m.sourceLocationIid.high >>> 0).toNumber(true) : m.sourceLocationIid;
                    if (o.oneofs)
                        d.createdFrom = "sourceLocationIid";
                }
                if (m.sourceLocation != null && m.hasOwnProperty("sourceLocation")) {
                    d.sourceLocation = $root.perfetto.protos.SourceLocation.toObject(m.sourceLocation, o);
                    if (o.oneofs)
                        d.createdFrom = "sourceLocation";
                }
                if (m.framesThrottledSinceLast != null && m.hasOwnProperty("framesThrottledSinceLast")) {
                    if (typeof m.framesThrottledSinceLast === "number")
                        d.framesThrottledSinceLast = o.longs === String ? String(m.framesThrottledSinceLast) : m.framesThrottledSinceLast;
                    else
                        d.framesThrottledSinceLast = o.longs === String ? $util.Long.prototype.toString.call(m.framesThrottledSinceLast) : o.longs === Number ? new $util.LongBits(m.framesThrottledSinceLast.low >>> 0, m.framesThrottledSinceLast.high >>> 0).toNumber() : m.framesThrottledSinceLast;
                }
                return d;
            };

            /**
             * Converts this BeginFrameArgs to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BeginFrameArgs
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BeginFrameArgs.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * BeginFrameArgsType enum.
             * @name perfetto.protos.BeginFrameArgs.BeginFrameArgsType
             * @enum {number}
             * @property {number} BEGIN_FRAME_ARGS_TYPE_UNSPECIFIED=0 BEGIN_FRAME_ARGS_TYPE_UNSPECIFIED value
             * @property {number} BEGIN_FRAME_ARGS_TYPE_INVALID=1 BEGIN_FRAME_ARGS_TYPE_INVALID value
             * @property {number} BEGIN_FRAME_ARGS_TYPE_NORMAL=2 BEGIN_FRAME_ARGS_TYPE_NORMAL value
             * @property {number} BEGIN_FRAME_ARGS_TYPE_MISSED=3 BEGIN_FRAME_ARGS_TYPE_MISSED value
             */
            BeginFrameArgs.BeginFrameArgsType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "BEGIN_FRAME_ARGS_TYPE_UNSPECIFIED"] = 0;
                values[valuesById[1] = "BEGIN_FRAME_ARGS_TYPE_INVALID"] = 1;
                values[valuesById[2] = "BEGIN_FRAME_ARGS_TYPE_NORMAL"] = 2;
                values[valuesById[3] = "BEGIN_FRAME_ARGS_TYPE_MISSED"] = 3;
                return values;
            })();

            return BeginFrameArgs;
        })();

        protos.BeginImplFrameArgs = (function() {

            /**
             * Properties of a BeginImplFrameArgs.
             * @memberof perfetto.protos
             * @interface IBeginImplFrameArgs
             * @property {number|null} [updatedAtUs] BeginImplFrameArgs updatedAtUs
             * @property {number|null} [finishedAtUs] BeginImplFrameArgs finishedAtUs
             * @property {perfetto.protos.BeginImplFrameArgs.State|null} [state] BeginImplFrameArgs state
             * @property {perfetto.protos.IBeginFrameArgs|null} [currentArgs] BeginImplFrameArgs currentArgs
             * @property {perfetto.protos.IBeginFrameArgs|null} [lastArgs] BeginImplFrameArgs lastArgs
             * @property {perfetto.protos.BeginImplFrameArgs.ITimestampsInUs|null} [timestampsInUs] BeginImplFrameArgs timestampsInUs
             */

            /**
             * Constructs a new BeginImplFrameArgs.
             * @memberof perfetto.protos
             * @classdesc Represents a BeginImplFrameArgs.
             * @implements IBeginImplFrameArgs
             * @constructor
             * @param {perfetto.protos.IBeginImplFrameArgs=} [p] Properties to set
             */
            function BeginImplFrameArgs(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BeginImplFrameArgs updatedAtUs.
             * @member {number} updatedAtUs
             * @memberof perfetto.protos.BeginImplFrameArgs
             * @instance
             */
            BeginImplFrameArgs.prototype.updatedAtUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * BeginImplFrameArgs finishedAtUs.
             * @member {number} finishedAtUs
             * @memberof perfetto.protos.BeginImplFrameArgs
             * @instance
             */
            BeginImplFrameArgs.prototype.finishedAtUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * BeginImplFrameArgs state.
             * @member {perfetto.protos.BeginImplFrameArgs.State} state
             * @memberof perfetto.protos.BeginImplFrameArgs
             * @instance
             */
            BeginImplFrameArgs.prototype.state = 0;

            /**
             * BeginImplFrameArgs currentArgs.
             * @member {perfetto.protos.IBeginFrameArgs|null|undefined} currentArgs
             * @memberof perfetto.protos.BeginImplFrameArgs
             * @instance
             */
            BeginImplFrameArgs.prototype.currentArgs = null;

            /**
             * BeginImplFrameArgs lastArgs.
             * @member {perfetto.protos.IBeginFrameArgs|null|undefined} lastArgs
             * @memberof perfetto.protos.BeginImplFrameArgs
             * @instance
             */
            BeginImplFrameArgs.prototype.lastArgs = null;

            /**
             * BeginImplFrameArgs timestampsInUs.
             * @member {perfetto.protos.BeginImplFrameArgs.ITimestampsInUs|null|undefined} timestampsInUs
             * @memberof perfetto.protos.BeginImplFrameArgs
             * @instance
             */
            BeginImplFrameArgs.prototype.timestampsInUs = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * BeginImplFrameArgs args.
             * @member {"currentArgs"|"lastArgs"|undefined} args
             * @memberof perfetto.protos.BeginImplFrameArgs
             * @instance
             */
            Object.defineProperty(BeginImplFrameArgs.prototype, "args", {
                get: $util.oneOfGetter($oneOfFields = ["currentArgs", "lastArgs"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new BeginImplFrameArgs instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BeginImplFrameArgs
             * @static
             * @param {perfetto.protos.IBeginImplFrameArgs=} [properties] Properties to set
             * @returns {perfetto.protos.BeginImplFrameArgs} BeginImplFrameArgs instance
             */
            BeginImplFrameArgs.create = function create(properties) {
                return new BeginImplFrameArgs(properties);
            };

            /**
             * Encodes the specified BeginImplFrameArgs message. Does not implicitly {@link perfetto.protos.BeginImplFrameArgs.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BeginImplFrameArgs
             * @static
             * @param {perfetto.protos.IBeginImplFrameArgs} m BeginImplFrameArgs message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BeginImplFrameArgs.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.updatedAtUs != null && Object.hasOwnProperty.call(m, "updatedAtUs"))
                    w.uint32(8).int64(m.updatedAtUs);
                if (m.finishedAtUs != null && Object.hasOwnProperty.call(m, "finishedAtUs"))
                    w.uint32(16).int64(m.finishedAtUs);
                if (m.state != null && Object.hasOwnProperty.call(m, "state"))
                    w.uint32(24).int32(m.state);
                if (m.currentArgs != null && Object.hasOwnProperty.call(m, "currentArgs"))
                    $root.perfetto.protos.BeginFrameArgs.encode(m.currentArgs, w.uint32(34).fork()).ldelim();
                if (m.lastArgs != null && Object.hasOwnProperty.call(m, "lastArgs"))
                    $root.perfetto.protos.BeginFrameArgs.encode(m.lastArgs, w.uint32(42).fork()).ldelim();
                if (m.timestampsInUs != null && Object.hasOwnProperty.call(m, "timestampsInUs"))
                    $root.perfetto.protos.BeginImplFrameArgs.TimestampsInUs.encode(m.timestampsInUs, w.uint32(50).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified BeginImplFrameArgs message, length delimited. Does not implicitly {@link perfetto.protos.BeginImplFrameArgs.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BeginImplFrameArgs
             * @static
             * @param {perfetto.protos.IBeginImplFrameArgs} message BeginImplFrameArgs message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BeginImplFrameArgs.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BeginImplFrameArgs message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BeginImplFrameArgs
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BeginImplFrameArgs} BeginImplFrameArgs
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BeginImplFrameArgs.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BeginImplFrameArgs();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.updatedAtUs = r.int64();
                        break;
                    case 2:
                        m.finishedAtUs = r.int64();
                        break;
                    case 3:
                        m.state = r.int32();
                        break;
                    case 4:
                        m.currentArgs = $root.perfetto.protos.BeginFrameArgs.decode(r, r.uint32());
                        break;
                    case 5:
                        m.lastArgs = $root.perfetto.protos.BeginFrameArgs.decode(r, r.uint32());
                        break;
                    case 6:
                        m.timestampsInUs = $root.perfetto.protos.BeginImplFrameArgs.TimestampsInUs.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BeginImplFrameArgs message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BeginImplFrameArgs
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BeginImplFrameArgs} BeginImplFrameArgs
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BeginImplFrameArgs.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BeginImplFrameArgs message.
             * @function verify
             * @memberof perfetto.protos.BeginImplFrameArgs
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BeginImplFrameArgs.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                var p = {};
                if (m.updatedAtUs != null && m.hasOwnProperty("updatedAtUs")) {
                    if (!$util.isInteger(m.updatedAtUs) && !(m.updatedAtUs && $util.isInteger(m.updatedAtUs.low) && $util.isInteger(m.updatedAtUs.high)))
                        return "updatedAtUs: integer|Long expected";
                }
                if (m.finishedAtUs != null && m.hasOwnProperty("finishedAtUs")) {
                    if (!$util.isInteger(m.finishedAtUs) && !(m.finishedAtUs && $util.isInteger(m.finishedAtUs.low) && $util.isInteger(m.finishedAtUs.high)))
                        return "finishedAtUs: integer|Long expected";
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    switch (m.state) {
                    default:
                        return "state: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                }
                if (m.currentArgs != null && m.hasOwnProperty("currentArgs")) {
                    p.args = 1;
                    {
                        var e = $root.perfetto.protos.BeginFrameArgs.verify(m.currentArgs);
                        if (e)
                            return "currentArgs." + e;
                    }
                }
                if (m.lastArgs != null && m.hasOwnProperty("lastArgs")) {
                    if (p.args === 1)
                        return "args: multiple values";
                    p.args = 1;
                    {
                        var e = $root.perfetto.protos.BeginFrameArgs.verify(m.lastArgs);
                        if (e)
                            return "lastArgs." + e;
                    }
                }
                if (m.timestampsInUs != null && m.hasOwnProperty("timestampsInUs")) {
                    {
                        var e = $root.perfetto.protos.BeginImplFrameArgs.TimestampsInUs.verify(m.timestampsInUs);
                        if (e)
                            return "timestampsInUs." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a BeginImplFrameArgs message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BeginImplFrameArgs
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BeginImplFrameArgs} BeginImplFrameArgs
             */
            BeginImplFrameArgs.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BeginImplFrameArgs)
                    return d;
                var m = new $root.perfetto.protos.BeginImplFrameArgs();
                if (d.updatedAtUs != null) {
                    if ($util.Long)
                        (m.updatedAtUs = $util.Long.fromValue(d.updatedAtUs)).unsigned = false;
                    else if (typeof d.updatedAtUs === "string")
                        m.updatedAtUs = parseInt(d.updatedAtUs, 10);
                    else if (typeof d.updatedAtUs === "number")
                        m.updatedAtUs = d.updatedAtUs;
                    else if (typeof d.updatedAtUs === "object")
                        m.updatedAtUs = new $util.LongBits(d.updatedAtUs.low >>> 0, d.updatedAtUs.high >>> 0).toNumber();
                }
                if (d.finishedAtUs != null) {
                    if ($util.Long)
                        (m.finishedAtUs = $util.Long.fromValue(d.finishedAtUs)).unsigned = false;
                    else if (typeof d.finishedAtUs === "string")
                        m.finishedAtUs = parseInt(d.finishedAtUs, 10);
                    else if (typeof d.finishedAtUs === "number")
                        m.finishedAtUs = d.finishedAtUs;
                    else if (typeof d.finishedAtUs === "object")
                        m.finishedAtUs = new $util.LongBits(d.finishedAtUs.low >>> 0, d.finishedAtUs.high >>> 0).toNumber();
                }
                switch (d.state) {
                case "BEGIN_FRAME_FINISHED":
                case 0:
                    m.state = 0;
                    break;
                case "BEGIN_FRAME_USING":
                case 1:
                    m.state = 1;
                    break;
                }
                if (d.currentArgs != null) {
                    if (typeof d.currentArgs !== "object")
                        throw TypeError(".perfetto.protos.BeginImplFrameArgs.currentArgs: object expected");
                    m.currentArgs = $root.perfetto.protos.BeginFrameArgs.fromObject(d.currentArgs);
                }
                if (d.lastArgs != null) {
                    if (typeof d.lastArgs !== "object")
                        throw TypeError(".perfetto.protos.BeginImplFrameArgs.lastArgs: object expected");
                    m.lastArgs = $root.perfetto.protos.BeginFrameArgs.fromObject(d.lastArgs);
                }
                if (d.timestampsInUs != null) {
                    if (typeof d.timestampsInUs !== "object")
                        throw TypeError(".perfetto.protos.BeginImplFrameArgs.timestampsInUs: object expected");
                    m.timestampsInUs = $root.perfetto.protos.BeginImplFrameArgs.TimestampsInUs.fromObject(d.timestampsInUs);
                }
                return m;
            };

            /**
             * Creates a plain object from a BeginImplFrameArgs message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BeginImplFrameArgs
             * @static
             * @param {perfetto.protos.BeginImplFrameArgs} m BeginImplFrameArgs
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BeginImplFrameArgs.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.updatedAtUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.updatedAtUs = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.finishedAtUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.finishedAtUs = o.longs === String ? "0" : 0;
                    d.state = o.enums === String ? "BEGIN_FRAME_FINISHED" : 0;
                    d.timestampsInUs = null;
                }
                if (m.updatedAtUs != null && m.hasOwnProperty("updatedAtUs")) {
                    if (typeof m.updatedAtUs === "number")
                        d.updatedAtUs = o.longs === String ? String(m.updatedAtUs) : m.updatedAtUs;
                    else
                        d.updatedAtUs = o.longs === String ? $util.Long.prototype.toString.call(m.updatedAtUs) : o.longs === Number ? new $util.LongBits(m.updatedAtUs.low >>> 0, m.updatedAtUs.high >>> 0).toNumber() : m.updatedAtUs;
                }
                if (m.finishedAtUs != null && m.hasOwnProperty("finishedAtUs")) {
                    if (typeof m.finishedAtUs === "number")
                        d.finishedAtUs = o.longs === String ? String(m.finishedAtUs) : m.finishedAtUs;
                    else
                        d.finishedAtUs = o.longs === String ? $util.Long.prototype.toString.call(m.finishedAtUs) : o.longs === Number ? new $util.LongBits(m.finishedAtUs.low >>> 0, m.finishedAtUs.high >>> 0).toNumber() : m.finishedAtUs;
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    d.state = o.enums === String ? $root.perfetto.protos.BeginImplFrameArgs.State[m.state] : m.state;
                }
                if (m.currentArgs != null && m.hasOwnProperty("currentArgs")) {
                    d.currentArgs = $root.perfetto.protos.BeginFrameArgs.toObject(m.currentArgs, o);
                    if (o.oneofs)
                        d.args = "currentArgs";
                }
                if (m.lastArgs != null && m.hasOwnProperty("lastArgs")) {
                    d.lastArgs = $root.perfetto.protos.BeginFrameArgs.toObject(m.lastArgs, o);
                    if (o.oneofs)
                        d.args = "lastArgs";
                }
                if (m.timestampsInUs != null && m.hasOwnProperty("timestampsInUs")) {
                    d.timestampsInUs = $root.perfetto.protos.BeginImplFrameArgs.TimestampsInUs.toObject(m.timestampsInUs, o);
                }
                return d;
            };

            /**
             * Converts this BeginImplFrameArgs to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BeginImplFrameArgs
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BeginImplFrameArgs.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * State enum.
             * @name perfetto.protos.BeginImplFrameArgs.State
             * @enum {number}
             * @property {number} BEGIN_FRAME_FINISHED=0 BEGIN_FRAME_FINISHED value
             * @property {number} BEGIN_FRAME_USING=1 BEGIN_FRAME_USING value
             */
            BeginImplFrameArgs.State = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "BEGIN_FRAME_FINISHED"] = 0;
                values[valuesById[1] = "BEGIN_FRAME_USING"] = 1;
                return values;
            })();

            BeginImplFrameArgs.TimestampsInUs = (function() {

                /**
                 * Properties of a TimestampsInUs.
                 * @memberof perfetto.protos.BeginImplFrameArgs
                 * @interface ITimestampsInUs
                 * @property {number|null} [intervalDelta] TimestampsInUs intervalDelta
                 * @property {number|null} [nowToDeadlineDelta] TimestampsInUs nowToDeadlineDelta
                 * @property {number|null} [frameTimeToNowDelta] TimestampsInUs frameTimeToNowDelta
                 * @property {number|null} [frameTimeToDeadlineDelta] TimestampsInUs frameTimeToDeadlineDelta
                 * @property {number|null} [now] TimestampsInUs now
                 * @property {number|null} [frameTime] TimestampsInUs frameTime
                 * @property {number|null} [deadline] TimestampsInUs deadline
                 */

                /**
                 * Constructs a new TimestampsInUs.
                 * @memberof perfetto.protos.BeginImplFrameArgs
                 * @classdesc Represents a TimestampsInUs.
                 * @implements ITimestampsInUs
                 * @constructor
                 * @param {perfetto.protos.BeginImplFrameArgs.ITimestampsInUs=} [p] Properties to set
                 */
                function TimestampsInUs(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * TimestampsInUs intervalDelta.
                 * @member {number} intervalDelta
                 * @memberof perfetto.protos.BeginImplFrameArgs.TimestampsInUs
                 * @instance
                 */
                TimestampsInUs.prototype.intervalDelta = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * TimestampsInUs nowToDeadlineDelta.
                 * @member {number} nowToDeadlineDelta
                 * @memberof perfetto.protos.BeginImplFrameArgs.TimestampsInUs
                 * @instance
                 */
                TimestampsInUs.prototype.nowToDeadlineDelta = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * TimestampsInUs frameTimeToNowDelta.
                 * @member {number} frameTimeToNowDelta
                 * @memberof perfetto.protos.BeginImplFrameArgs.TimestampsInUs
                 * @instance
                 */
                TimestampsInUs.prototype.frameTimeToNowDelta = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * TimestampsInUs frameTimeToDeadlineDelta.
                 * @member {number} frameTimeToDeadlineDelta
                 * @memberof perfetto.protos.BeginImplFrameArgs.TimestampsInUs
                 * @instance
                 */
                TimestampsInUs.prototype.frameTimeToDeadlineDelta = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * TimestampsInUs now.
                 * @member {number} now
                 * @memberof perfetto.protos.BeginImplFrameArgs.TimestampsInUs
                 * @instance
                 */
                TimestampsInUs.prototype.now = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * TimestampsInUs frameTime.
                 * @member {number} frameTime
                 * @memberof perfetto.protos.BeginImplFrameArgs.TimestampsInUs
                 * @instance
                 */
                TimestampsInUs.prototype.frameTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * TimestampsInUs deadline.
                 * @member {number} deadline
                 * @memberof perfetto.protos.BeginImplFrameArgs.TimestampsInUs
                 * @instance
                 */
                TimestampsInUs.prototype.deadline = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new TimestampsInUs instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.BeginImplFrameArgs.TimestampsInUs
                 * @static
                 * @param {perfetto.protos.BeginImplFrameArgs.ITimestampsInUs=} [properties] Properties to set
                 * @returns {perfetto.protos.BeginImplFrameArgs.TimestampsInUs} TimestampsInUs instance
                 */
                TimestampsInUs.create = function create(properties) {
                    return new TimestampsInUs(properties);
                };

                /**
                 * Encodes the specified TimestampsInUs message. Does not implicitly {@link perfetto.protos.BeginImplFrameArgs.TimestampsInUs.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.BeginImplFrameArgs.TimestampsInUs
                 * @static
                 * @param {perfetto.protos.BeginImplFrameArgs.ITimestampsInUs} m TimestampsInUs message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                TimestampsInUs.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.intervalDelta != null && Object.hasOwnProperty.call(m, "intervalDelta"))
                        w.uint32(8).int64(m.intervalDelta);
                    if (m.nowToDeadlineDelta != null && Object.hasOwnProperty.call(m, "nowToDeadlineDelta"))
                        w.uint32(16).int64(m.nowToDeadlineDelta);
                    if (m.frameTimeToNowDelta != null && Object.hasOwnProperty.call(m, "frameTimeToNowDelta"))
                        w.uint32(24).int64(m.frameTimeToNowDelta);
                    if (m.frameTimeToDeadlineDelta != null && Object.hasOwnProperty.call(m, "frameTimeToDeadlineDelta"))
                        w.uint32(32).int64(m.frameTimeToDeadlineDelta);
                    if (m.now != null && Object.hasOwnProperty.call(m, "now"))
                        w.uint32(40).int64(m.now);
                    if (m.frameTime != null && Object.hasOwnProperty.call(m, "frameTime"))
                        w.uint32(48).int64(m.frameTime);
                    if (m.deadline != null && Object.hasOwnProperty.call(m, "deadline"))
                        w.uint32(56).int64(m.deadline);
                    return w;
                };

                /**
                 * Encodes the specified TimestampsInUs message, length delimited. Does not implicitly {@link perfetto.protos.BeginImplFrameArgs.TimestampsInUs.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.BeginImplFrameArgs.TimestampsInUs
                 * @static
                 * @param {perfetto.protos.BeginImplFrameArgs.ITimestampsInUs} message TimestampsInUs message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                TimestampsInUs.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a TimestampsInUs message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.BeginImplFrameArgs.TimestampsInUs
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.BeginImplFrameArgs.TimestampsInUs} TimestampsInUs
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                TimestampsInUs.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BeginImplFrameArgs.TimestampsInUs();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.intervalDelta = r.int64();
                            break;
                        case 2:
                            m.nowToDeadlineDelta = r.int64();
                            break;
                        case 3:
                            m.frameTimeToNowDelta = r.int64();
                            break;
                        case 4:
                            m.frameTimeToDeadlineDelta = r.int64();
                            break;
                        case 5:
                            m.now = r.int64();
                            break;
                        case 6:
                            m.frameTime = r.int64();
                            break;
                        case 7:
                            m.deadline = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a TimestampsInUs message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.BeginImplFrameArgs.TimestampsInUs
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.BeginImplFrameArgs.TimestampsInUs} TimestampsInUs
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                TimestampsInUs.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a TimestampsInUs message.
                 * @function verify
                 * @memberof perfetto.protos.BeginImplFrameArgs.TimestampsInUs
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                TimestampsInUs.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.intervalDelta != null && m.hasOwnProperty("intervalDelta")) {
                        if (!$util.isInteger(m.intervalDelta) && !(m.intervalDelta && $util.isInteger(m.intervalDelta.low) && $util.isInteger(m.intervalDelta.high)))
                            return "intervalDelta: integer|Long expected";
                    }
                    if (m.nowToDeadlineDelta != null && m.hasOwnProperty("nowToDeadlineDelta")) {
                        if (!$util.isInteger(m.nowToDeadlineDelta) && !(m.nowToDeadlineDelta && $util.isInteger(m.nowToDeadlineDelta.low) && $util.isInteger(m.nowToDeadlineDelta.high)))
                            return "nowToDeadlineDelta: integer|Long expected";
                    }
                    if (m.frameTimeToNowDelta != null && m.hasOwnProperty("frameTimeToNowDelta")) {
                        if (!$util.isInteger(m.frameTimeToNowDelta) && !(m.frameTimeToNowDelta && $util.isInteger(m.frameTimeToNowDelta.low) && $util.isInteger(m.frameTimeToNowDelta.high)))
                            return "frameTimeToNowDelta: integer|Long expected";
                    }
                    if (m.frameTimeToDeadlineDelta != null && m.hasOwnProperty("frameTimeToDeadlineDelta")) {
                        if (!$util.isInteger(m.frameTimeToDeadlineDelta) && !(m.frameTimeToDeadlineDelta && $util.isInteger(m.frameTimeToDeadlineDelta.low) && $util.isInteger(m.frameTimeToDeadlineDelta.high)))
                            return "frameTimeToDeadlineDelta: integer|Long expected";
                    }
                    if (m.now != null && m.hasOwnProperty("now")) {
                        if (!$util.isInteger(m.now) && !(m.now && $util.isInteger(m.now.low) && $util.isInteger(m.now.high)))
                            return "now: integer|Long expected";
                    }
                    if (m.frameTime != null && m.hasOwnProperty("frameTime")) {
                        if (!$util.isInteger(m.frameTime) && !(m.frameTime && $util.isInteger(m.frameTime.low) && $util.isInteger(m.frameTime.high)))
                            return "frameTime: integer|Long expected";
                    }
                    if (m.deadline != null && m.hasOwnProperty("deadline")) {
                        if (!$util.isInteger(m.deadline) && !(m.deadline && $util.isInteger(m.deadline.low) && $util.isInteger(m.deadline.high)))
                            return "deadline: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a TimestampsInUs message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.BeginImplFrameArgs.TimestampsInUs
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.BeginImplFrameArgs.TimestampsInUs} TimestampsInUs
                 */
                TimestampsInUs.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.BeginImplFrameArgs.TimestampsInUs)
                        return d;
                    var m = new $root.perfetto.protos.BeginImplFrameArgs.TimestampsInUs();
                    if (d.intervalDelta != null) {
                        if ($util.Long)
                            (m.intervalDelta = $util.Long.fromValue(d.intervalDelta)).unsigned = false;
                        else if (typeof d.intervalDelta === "string")
                            m.intervalDelta = parseInt(d.intervalDelta, 10);
                        else if (typeof d.intervalDelta === "number")
                            m.intervalDelta = d.intervalDelta;
                        else if (typeof d.intervalDelta === "object")
                            m.intervalDelta = new $util.LongBits(d.intervalDelta.low >>> 0, d.intervalDelta.high >>> 0).toNumber();
                    }
                    if (d.nowToDeadlineDelta != null) {
                        if ($util.Long)
                            (m.nowToDeadlineDelta = $util.Long.fromValue(d.nowToDeadlineDelta)).unsigned = false;
                        else if (typeof d.nowToDeadlineDelta === "string")
                            m.nowToDeadlineDelta = parseInt(d.nowToDeadlineDelta, 10);
                        else if (typeof d.nowToDeadlineDelta === "number")
                            m.nowToDeadlineDelta = d.nowToDeadlineDelta;
                        else if (typeof d.nowToDeadlineDelta === "object")
                            m.nowToDeadlineDelta = new $util.LongBits(d.nowToDeadlineDelta.low >>> 0, d.nowToDeadlineDelta.high >>> 0).toNumber();
                    }
                    if (d.frameTimeToNowDelta != null) {
                        if ($util.Long)
                            (m.frameTimeToNowDelta = $util.Long.fromValue(d.frameTimeToNowDelta)).unsigned = false;
                        else if (typeof d.frameTimeToNowDelta === "string")
                            m.frameTimeToNowDelta = parseInt(d.frameTimeToNowDelta, 10);
                        else if (typeof d.frameTimeToNowDelta === "number")
                            m.frameTimeToNowDelta = d.frameTimeToNowDelta;
                        else if (typeof d.frameTimeToNowDelta === "object")
                            m.frameTimeToNowDelta = new $util.LongBits(d.frameTimeToNowDelta.low >>> 0, d.frameTimeToNowDelta.high >>> 0).toNumber();
                    }
                    if (d.frameTimeToDeadlineDelta != null) {
                        if ($util.Long)
                            (m.frameTimeToDeadlineDelta = $util.Long.fromValue(d.frameTimeToDeadlineDelta)).unsigned = false;
                        else if (typeof d.frameTimeToDeadlineDelta === "string")
                            m.frameTimeToDeadlineDelta = parseInt(d.frameTimeToDeadlineDelta, 10);
                        else if (typeof d.frameTimeToDeadlineDelta === "number")
                            m.frameTimeToDeadlineDelta = d.frameTimeToDeadlineDelta;
                        else if (typeof d.frameTimeToDeadlineDelta === "object")
                            m.frameTimeToDeadlineDelta = new $util.LongBits(d.frameTimeToDeadlineDelta.low >>> 0, d.frameTimeToDeadlineDelta.high >>> 0).toNumber();
                    }
                    if (d.now != null) {
                        if ($util.Long)
                            (m.now = $util.Long.fromValue(d.now)).unsigned = false;
                        else if (typeof d.now === "string")
                            m.now = parseInt(d.now, 10);
                        else if (typeof d.now === "number")
                            m.now = d.now;
                        else if (typeof d.now === "object")
                            m.now = new $util.LongBits(d.now.low >>> 0, d.now.high >>> 0).toNumber();
                    }
                    if (d.frameTime != null) {
                        if ($util.Long)
                            (m.frameTime = $util.Long.fromValue(d.frameTime)).unsigned = false;
                        else if (typeof d.frameTime === "string")
                            m.frameTime = parseInt(d.frameTime, 10);
                        else if (typeof d.frameTime === "number")
                            m.frameTime = d.frameTime;
                        else if (typeof d.frameTime === "object")
                            m.frameTime = new $util.LongBits(d.frameTime.low >>> 0, d.frameTime.high >>> 0).toNumber();
                    }
                    if (d.deadline != null) {
                        if ($util.Long)
                            (m.deadline = $util.Long.fromValue(d.deadline)).unsigned = false;
                        else if (typeof d.deadline === "string")
                            m.deadline = parseInt(d.deadline, 10);
                        else if (typeof d.deadline === "number")
                            m.deadline = d.deadline;
                        else if (typeof d.deadline === "object")
                            m.deadline = new $util.LongBits(d.deadline.low >>> 0, d.deadline.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a TimestampsInUs message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.BeginImplFrameArgs.TimestampsInUs
                 * @static
                 * @param {perfetto.protos.BeginImplFrameArgs.TimestampsInUs} m TimestampsInUs
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                TimestampsInUs.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.intervalDelta = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.intervalDelta = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.nowToDeadlineDelta = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.nowToDeadlineDelta = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.frameTimeToNowDelta = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.frameTimeToNowDelta = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.frameTimeToDeadlineDelta = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.frameTimeToDeadlineDelta = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.now = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.now = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.frameTime = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.frameTime = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.deadline = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.deadline = o.longs === String ? "0" : 0;
                    }
                    if (m.intervalDelta != null && m.hasOwnProperty("intervalDelta")) {
                        if (typeof m.intervalDelta === "number")
                            d.intervalDelta = o.longs === String ? String(m.intervalDelta) : m.intervalDelta;
                        else
                            d.intervalDelta = o.longs === String ? $util.Long.prototype.toString.call(m.intervalDelta) : o.longs === Number ? new $util.LongBits(m.intervalDelta.low >>> 0, m.intervalDelta.high >>> 0).toNumber() : m.intervalDelta;
                    }
                    if (m.nowToDeadlineDelta != null && m.hasOwnProperty("nowToDeadlineDelta")) {
                        if (typeof m.nowToDeadlineDelta === "number")
                            d.nowToDeadlineDelta = o.longs === String ? String(m.nowToDeadlineDelta) : m.nowToDeadlineDelta;
                        else
                            d.nowToDeadlineDelta = o.longs === String ? $util.Long.prototype.toString.call(m.nowToDeadlineDelta) : o.longs === Number ? new $util.LongBits(m.nowToDeadlineDelta.low >>> 0, m.nowToDeadlineDelta.high >>> 0).toNumber() : m.nowToDeadlineDelta;
                    }
                    if (m.frameTimeToNowDelta != null && m.hasOwnProperty("frameTimeToNowDelta")) {
                        if (typeof m.frameTimeToNowDelta === "number")
                            d.frameTimeToNowDelta = o.longs === String ? String(m.frameTimeToNowDelta) : m.frameTimeToNowDelta;
                        else
                            d.frameTimeToNowDelta = o.longs === String ? $util.Long.prototype.toString.call(m.frameTimeToNowDelta) : o.longs === Number ? new $util.LongBits(m.frameTimeToNowDelta.low >>> 0, m.frameTimeToNowDelta.high >>> 0).toNumber() : m.frameTimeToNowDelta;
                    }
                    if (m.frameTimeToDeadlineDelta != null && m.hasOwnProperty("frameTimeToDeadlineDelta")) {
                        if (typeof m.frameTimeToDeadlineDelta === "number")
                            d.frameTimeToDeadlineDelta = o.longs === String ? String(m.frameTimeToDeadlineDelta) : m.frameTimeToDeadlineDelta;
                        else
                            d.frameTimeToDeadlineDelta = o.longs === String ? $util.Long.prototype.toString.call(m.frameTimeToDeadlineDelta) : o.longs === Number ? new $util.LongBits(m.frameTimeToDeadlineDelta.low >>> 0, m.frameTimeToDeadlineDelta.high >>> 0).toNumber() : m.frameTimeToDeadlineDelta;
                    }
                    if (m.now != null && m.hasOwnProperty("now")) {
                        if (typeof m.now === "number")
                            d.now = o.longs === String ? String(m.now) : m.now;
                        else
                            d.now = o.longs === String ? $util.Long.prototype.toString.call(m.now) : o.longs === Number ? new $util.LongBits(m.now.low >>> 0, m.now.high >>> 0).toNumber() : m.now;
                    }
                    if (m.frameTime != null && m.hasOwnProperty("frameTime")) {
                        if (typeof m.frameTime === "number")
                            d.frameTime = o.longs === String ? String(m.frameTime) : m.frameTime;
                        else
                            d.frameTime = o.longs === String ? $util.Long.prototype.toString.call(m.frameTime) : o.longs === Number ? new $util.LongBits(m.frameTime.low >>> 0, m.frameTime.high >>> 0).toNumber() : m.frameTime;
                    }
                    if (m.deadline != null && m.hasOwnProperty("deadline")) {
                        if (typeof m.deadline === "number")
                            d.deadline = o.longs === String ? String(m.deadline) : m.deadline;
                        else
                            d.deadline = o.longs === String ? $util.Long.prototype.toString.call(m.deadline) : o.longs === Number ? new $util.LongBits(m.deadline.low >>> 0, m.deadline.high >>> 0).toNumber() : m.deadline;
                    }
                    return d;
                };

                /**
                 * Converts this TimestampsInUs to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.BeginImplFrameArgs.TimestampsInUs
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                TimestampsInUs.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return TimestampsInUs;
            })();

            return BeginImplFrameArgs;
        })();

        protos.BeginFrameObserverState = (function() {

            /**
             * Properties of a BeginFrameObserverState.
             * @memberof perfetto.protos
             * @interface IBeginFrameObserverState
             * @property {number|null} [droppedBeginFrameArgs] BeginFrameObserverState droppedBeginFrameArgs
             * @property {perfetto.protos.IBeginFrameArgs|null} [lastBeginFrameArgs] BeginFrameObserverState lastBeginFrameArgs
             */

            /**
             * Constructs a new BeginFrameObserverState.
             * @memberof perfetto.protos
             * @classdesc Represents a BeginFrameObserverState.
             * @implements IBeginFrameObserverState
             * @constructor
             * @param {perfetto.protos.IBeginFrameObserverState=} [p] Properties to set
             */
            function BeginFrameObserverState(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BeginFrameObserverState droppedBeginFrameArgs.
             * @member {number} droppedBeginFrameArgs
             * @memberof perfetto.protos.BeginFrameObserverState
             * @instance
             */
            BeginFrameObserverState.prototype.droppedBeginFrameArgs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * BeginFrameObserverState lastBeginFrameArgs.
             * @member {perfetto.protos.IBeginFrameArgs|null|undefined} lastBeginFrameArgs
             * @memberof perfetto.protos.BeginFrameObserverState
             * @instance
             */
            BeginFrameObserverState.prototype.lastBeginFrameArgs = null;

            /**
             * Creates a new BeginFrameObserverState instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BeginFrameObserverState
             * @static
             * @param {perfetto.protos.IBeginFrameObserverState=} [properties] Properties to set
             * @returns {perfetto.protos.BeginFrameObserverState} BeginFrameObserverState instance
             */
            BeginFrameObserverState.create = function create(properties) {
                return new BeginFrameObserverState(properties);
            };

            /**
             * Encodes the specified BeginFrameObserverState message. Does not implicitly {@link perfetto.protos.BeginFrameObserverState.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BeginFrameObserverState
             * @static
             * @param {perfetto.protos.IBeginFrameObserverState} m BeginFrameObserverState message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BeginFrameObserverState.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.droppedBeginFrameArgs != null && Object.hasOwnProperty.call(m, "droppedBeginFrameArgs"))
                    w.uint32(8).int64(m.droppedBeginFrameArgs);
                if (m.lastBeginFrameArgs != null && Object.hasOwnProperty.call(m, "lastBeginFrameArgs"))
                    $root.perfetto.protos.BeginFrameArgs.encode(m.lastBeginFrameArgs, w.uint32(18).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified BeginFrameObserverState message, length delimited. Does not implicitly {@link perfetto.protos.BeginFrameObserverState.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BeginFrameObserverState
             * @static
             * @param {perfetto.protos.IBeginFrameObserverState} message BeginFrameObserverState message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BeginFrameObserverState.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BeginFrameObserverState message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BeginFrameObserverState
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BeginFrameObserverState} BeginFrameObserverState
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BeginFrameObserverState.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BeginFrameObserverState();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.droppedBeginFrameArgs = r.int64();
                        break;
                    case 2:
                        m.lastBeginFrameArgs = $root.perfetto.protos.BeginFrameArgs.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BeginFrameObserverState message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BeginFrameObserverState
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BeginFrameObserverState} BeginFrameObserverState
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BeginFrameObserverState.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BeginFrameObserverState message.
             * @function verify
             * @memberof perfetto.protos.BeginFrameObserverState
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BeginFrameObserverState.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.droppedBeginFrameArgs != null && m.hasOwnProperty("droppedBeginFrameArgs")) {
                    if (!$util.isInteger(m.droppedBeginFrameArgs) && !(m.droppedBeginFrameArgs && $util.isInteger(m.droppedBeginFrameArgs.low) && $util.isInteger(m.droppedBeginFrameArgs.high)))
                        return "droppedBeginFrameArgs: integer|Long expected";
                }
                if (m.lastBeginFrameArgs != null && m.hasOwnProperty("lastBeginFrameArgs")) {
                    {
                        var e = $root.perfetto.protos.BeginFrameArgs.verify(m.lastBeginFrameArgs);
                        if (e)
                            return "lastBeginFrameArgs." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a BeginFrameObserverState message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BeginFrameObserverState
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BeginFrameObserverState} BeginFrameObserverState
             */
            BeginFrameObserverState.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BeginFrameObserverState)
                    return d;
                var m = new $root.perfetto.protos.BeginFrameObserverState();
                if (d.droppedBeginFrameArgs != null) {
                    if ($util.Long)
                        (m.droppedBeginFrameArgs = $util.Long.fromValue(d.droppedBeginFrameArgs)).unsigned = false;
                    else if (typeof d.droppedBeginFrameArgs === "string")
                        m.droppedBeginFrameArgs = parseInt(d.droppedBeginFrameArgs, 10);
                    else if (typeof d.droppedBeginFrameArgs === "number")
                        m.droppedBeginFrameArgs = d.droppedBeginFrameArgs;
                    else if (typeof d.droppedBeginFrameArgs === "object")
                        m.droppedBeginFrameArgs = new $util.LongBits(d.droppedBeginFrameArgs.low >>> 0, d.droppedBeginFrameArgs.high >>> 0).toNumber();
                }
                if (d.lastBeginFrameArgs != null) {
                    if (typeof d.lastBeginFrameArgs !== "object")
                        throw TypeError(".perfetto.protos.BeginFrameObserverState.lastBeginFrameArgs: object expected");
                    m.lastBeginFrameArgs = $root.perfetto.protos.BeginFrameArgs.fromObject(d.lastBeginFrameArgs);
                }
                return m;
            };

            /**
             * Creates a plain object from a BeginFrameObserverState message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BeginFrameObserverState
             * @static
             * @param {perfetto.protos.BeginFrameObserverState} m BeginFrameObserverState
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BeginFrameObserverState.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.droppedBeginFrameArgs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.droppedBeginFrameArgs = o.longs === String ? "0" : 0;
                    d.lastBeginFrameArgs = null;
                }
                if (m.droppedBeginFrameArgs != null && m.hasOwnProperty("droppedBeginFrameArgs")) {
                    if (typeof m.droppedBeginFrameArgs === "number")
                        d.droppedBeginFrameArgs = o.longs === String ? String(m.droppedBeginFrameArgs) : m.droppedBeginFrameArgs;
                    else
                        d.droppedBeginFrameArgs = o.longs === String ? $util.Long.prototype.toString.call(m.droppedBeginFrameArgs) : o.longs === Number ? new $util.LongBits(m.droppedBeginFrameArgs.low >>> 0, m.droppedBeginFrameArgs.high >>> 0).toNumber() : m.droppedBeginFrameArgs;
                }
                if (m.lastBeginFrameArgs != null && m.hasOwnProperty("lastBeginFrameArgs")) {
                    d.lastBeginFrameArgs = $root.perfetto.protos.BeginFrameArgs.toObject(m.lastBeginFrameArgs, o);
                }
                return d;
            };

            /**
             * Converts this BeginFrameObserverState to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BeginFrameObserverState
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BeginFrameObserverState.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BeginFrameObserverState;
        })();

        protos.BeginFrameSourceState = (function() {

            /**
             * Properties of a BeginFrameSourceState.
             * @memberof perfetto.protos
             * @interface IBeginFrameSourceState
             * @property {number|null} [sourceId] BeginFrameSourceState sourceId
             * @property {boolean|null} [paused] BeginFrameSourceState paused
             * @property {number|null} [numObservers] BeginFrameSourceState numObservers
             * @property {perfetto.protos.IBeginFrameArgs|null} [lastBeginFrameArgs] BeginFrameSourceState lastBeginFrameArgs
             */

            /**
             * Constructs a new BeginFrameSourceState.
             * @memberof perfetto.protos
             * @classdesc Represents a BeginFrameSourceState.
             * @implements IBeginFrameSourceState
             * @constructor
             * @param {perfetto.protos.IBeginFrameSourceState=} [p] Properties to set
             */
            function BeginFrameSourceState(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BeginFrameSourceState sourceId.
             * @member {number} sourceId
             * @memberof perfetto.protos.BeginFrameSourceState
             * @instance
             */
            BeginFrameSourceState.prototype.sourceId = 0;

            /**
             * BeginFrameSourceState paused.
             * @member {boolean} paused
             * @memberof perfetto.protos.BeginFrameSourceState
             * @instance
             */
            BeginFrameSourceState.prototype.paused = false;

            /**
             * BeginFrameSourceState numObservers.
             * @member {number} numObservers
             * @memberof perfetto.protos.BeginFrameSourceState
             * @instance
             */
            BeginFrameSourceState.prototype.numObservers = 0;

            /**
             * BeginFrameSourceState lastBeginFrameArgs.
             * @member {perfetto.protos.IBeginFrameArgs|null|undefined} lastBeginFrameArgs
             * @memberof perfetto.protos.BeginFrameSourceState
             * @instance
             */
            BeginFrameSourceState.prototype.lastBeginFrameArgs = null;

            /**
             * Creates a new BeginFrameSourceState instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BeginFrameSourceState
             * @static
             * @param {perfetto.protos.IBeginFrameSourceState=} [properties] Properties to set
             * @returns {perfetto.protos.BeginFrameSourceState} BeginFrameSourceState instance
             */
            BeginFrameSourceState.create = function create(properties) {
                return new BeginFrameSourceState(properties);
            };

            /**
             * Encodes the specified BeginFrameSourceState message. Does not implicitly {@link perfetto.protos.BeginFrameSourceState.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BeginFrameSourceState
             * @static
             * @param {perfetto.protos.IBeginFrameSourceState} m BeginFrameSourceState message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BeginFrameSourceState.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.sourceId != null && Object.hasOwnProperty.call(m, "sourceId"))
                    w.uint32(8).uint32(m.sourceId);
                if (m.paused != null && Object.hasOwnProperty.call(m, "paused"))
                    w.uint32(16).bool(m.paused);
                if (m.numObservers != null && Object.hasOwnProperty.call(m, "numObservers"))
                    w.uint32(24).uint32(m.numObservers);
                if (m.lastBeginFrameArgs != null && Object.hasOwnProperty.call(m, "lastBeginFrameArgs"))
                    $root.perfetto.protos.BeginFrameArgs.encode(m.lastBeginFrameArgs, w.uint32(34).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified BeginFrameSourceState message, length delimited. Does not implicitly {@link perfetto.protos.BeginFrameSourceState.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BeginFrameSourceState
             * @static
             * @param {perfetto.protos.IBeginFrameSourceState} message BeginFrameSourceState message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BeginFrameSourceState.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BeginFrameSourceState message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BeginFrameSourceState
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BeginFrameSourceState} BeginFrameSourceState
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BeginFrameSourceState.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BeginFrameSourceState();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.sourceId = r.uint32();
                        break;
                    case 2:
                        m.paused = r.bool();
                        break;
                    case 3:
                        m.numObservers = r.uint32();
                        break;
                    case 4:
                        m.lastBeginFrameArgs = $root.perfetto.protos.BeginFrameArgs.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BeginFrameSourceState message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BeginFrameSourceState
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BeginFrameSourceState} BeginFrameSourceState
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BeginFrameSourceState.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BeginFrameSourceState message.
             * @function verify
             * @memberof perfetto.protos.BeginFrameSourceState
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BeginFrameSourceState.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.sourceId != null && m.hasOwnProperty("sourceId")) {
                    if (!$util.isInteger(m.sourceId))
                        return "sourceId: integer expected";
                }
                if (m.paused != null && m.hasOwnProperty("paused")) {
                    if (typeof m.paused !== "boolean")
                        return "paused: boolean expected";
                }
                if (m.numObservers != null && m.hasOwnProperty("numObservers")) {
                    if (!$util.isInteger(m.numObservers))
                        return "numObservers: integer expected";
                }
                if (m.lastBeginFrameArgs != null && m.hasOwnProperty("lastBeginFrameArgs")) {
                    {
                        var e = $root.perfetto.protos.BeginFrameArgs.verify(m.lastBeginFrameArgs);
                        if (e)
                            return "lastBeginFrameArgs." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a BeginFrameSourceState message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BeginFrameSourceState
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BeginFrameSourceState} BeginFrameSourceState
             */
            BeginFrameSourceState.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BeginFrameSourceState)
                    return d;
                var m = new $root.perfetto.protos.BeginFrameSourceState();
                if (d.sourceId != null) {
                    m.sourceId = d.sourceId >>> 0;
                }
                if (d.paused != null) {
                    m.paused = Boolean(d.paused);
                }
                if (d.numObservers != null) {
                    m.numObservers = d.numObservers >>> 0;
                }
                if (d.lastBeginFrameArgs != null) {
                    if (typeof d.lastBeginFrameArgs !== "object")
                        throw TypeError(".perfetto.protos.BeginFrameSourceState.lastBeginFrameArgs: object expected");
                    m.lastBeginFrameArgs = $root.perfetto.protos.BeginFrameArgs.fromObject(d.lastBeginFrameArgs);
                }
                return m;
            };

            /**
             * Creates a plain object from a BeginFrameSourceState message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BeginFrameSourceState
             * @static
             * @param {perfetto.protos.BeginFrameSourceState} m BeginFrameSourceState
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BeginFrameSourceState.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.sourceId = 0;
                    d.paused = false;
                    d.numObservers = 0;
                    d.lastBeginFrameArgs = null;
                }
                if (m.sourceId != null && m.hasOwnProperty("sourceId")) {
                    d.sourceId = m.sourceId;
                }
                if (m.paused != null && m.hasOwnProperty("paused")) {
                    d.paused = m.paused;
                }
                if (m.numObservers != null && m.hasOwnProperty("numObservers")) {
                    d.numObservers = m.numObservers;
                }
                if (m.lastBeginFrameArgs != null && m.hasOwnProperty("lastBeginFrameArgs")) {
                    d.lastBeginFrameArgs = $root.perfetto.protos.BeginFrameArgs.toObject(m.lastBeginFrameArgs, o);
                }
                return d;
            };

            /**
             * Converts this BeginFrameSourceState to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BeginFrameSourceState
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BeginFrameSourceState.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BeginFrameSourceState;
        })();

        protos.CompositorTimingHistory = (function() {

            /**
             * Properties of a CompositorTimingHistory.
             * @memberof perfetto.protos
             * @interface ICompositorTimingHistory
             * @property {number|null} [beginMainFrameQueueCriticalEstimateDeltaUs] CompositorTimingHistory beginMainFrameQueueCriticalEstimateDeltaUs
             * @property {number|null} [beginMainFrameQueueNotCriticalEstimateDeltaUs] CompositorTimingHistory beginMainFrameQueueNotCriticalEstimateDeltaUs
             * @property {number|null} [beginMainFrameStartToReadyToCommitEstimateDeltaUs] CompositorTimingHistory beginMainFrameStartToReadyToCommitEstimateDeltaUs
             * @property {number|null} [commitToReadyToActivateEstimateDeltaUs] CompositorTimingHistory commitToReadyToActivateEstimateDeltaUs
             * @property {number|null} [prepareTilesEstimateDeltaUs] CompositorTimingHistory prepareTilesEstimateDeltaUs
             * @property {number|null} [activateEstimateDeltaUs] CompositorTimingHistory activateEstimateDeltaUs
             * @property {number|null} [drawEstimateDeltaUs] CompositorTimingHistory drawEstimateDeltaUs
             */

            /**
             * Constructs a new CompositorTimingHistory.
             * @memberof perfetto.protos
             * @classdesc Represents a CompositorTimingHistory.
             * @implements ICompositorTimingHistory
             * @constructor
             * @param {perfetto.protos.ICompositorTimingHistory=} [p] Properties to set
             */
            function CompositorTimingHistory(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * CompositorTimingHistory beginMainFrameQueueCriticalEstimateDeltaUs.
             * @member {number} beginMainFrameQueueCriticalEstimateDeltaUs
             * @memberof perfetto.protos.CompositorTimingHistory
             * @instance
             */
            CompositorTimingHistory.prototype.beginMainFrameQueueCriticalEstimateDeltaUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * CompositorTimingHistory beginMainFrameQueueNotCriticalEstimateDeltaUs.
             * @member {number} beginMainFrameQueueNotCriticalEstimateDeltaUs
             * @memberof perfetto.protos.CompositorTimingHistory
             * @instance
             */
            CompositorTimingHistory.prototype.beginMainFrameQueueNotCriticalEstimateDeltaUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * CompositorTimingHistory beginMainFrameStartToReadyToCommitEstimateDeltaUs.
             * @member {number} beginMainFrameStartToReadyToCommitEstimateDeltaUs
             * @memberof perfetto.protos.CompositorTimingHistory
             * @instance
             */
            CompositorTimingHistory.prototype.beginMainFrameStartToReadyToCommitEstimateDeltaUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * CompositorTimingHistory commitToReadyToActivateEstimateDeltaUs.
             * @member {number} commitToReadyToActivateEstimateDeltaUs
             * @memberof perfetto.protos.CompositorTimingHistory
             * @instance
             */
            CompositorTimingHistory.prototype.commitToReadyToActivateEstimateDeltaUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * CompositorTimingHistory prepareTilesEstimateDeltaUs.
             * @member {number} prepareTilesEstimateDeltaUs
             * @memberof perfetto.protos.CompositorTimingHistory
             * @instance
             */
            CompositorTimingHistory.prototype.prepareTilesEstimateDeltaUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * CompositorTimingHistory activateEstimateDeltaUs.
             * @member {number} activateEstimateDeltaUs
             * @memberof perfetto.protos.CompositorTimingHistory
             * @instance
             */
            CompositorTimingHistory.prototype.activateEstimateDeltaUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * CompositorTimingHistory drawEstimateDeltaUs.
             * @member {number} drawEstimateDeltaUs
             * @memberof perfetto.protos.CompositorTimingHistory
             * @instance
             */
            CompositorTimingHistory.prototype.drawEstimateDeltaUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new CompositorTimingHistory instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.CompositorTimingHistory
             * @static
             * @param {perfetto.protos.ICompositorTimingHistory=} [properties] Properties to set
             * @returns {perfetto.protos.CompositorTimingHistory} CompositorTimingHistory instance
             */
            CompositorTimingHistory.create = function create(properties) {
                return new CompositorTimingHistory(properties);
            };

            /**
             * Encodes the specified CompositorTimingHistory message. Does not implicitly {@link perfetto.protos.CompositorTimingHistory.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.CompositorTimingHistory
             * @static
             * @param {perfetto.protos.ICompositorTimingHistory} m CompositorTimingHistory message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CompositorTimingHistory.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.beginMainFrameQueueCriticalEstimateDeltaUs != null && Object.hasOwnProperty.call(m, "beginMainFrameQueueCriticalEstimateDeltaUs"))
                    w.uint32(8).int64(m.beginMainFrameQueueCriticalEstimateDeltaUs);
                if (m.beginMainFrameQueueNotCriticalEstimateDeltaUs != null && Object.hasOwnProperty.call(m, "beginMainFrameQueueNotCriticalEstimateDeltaUs"))
                    w.uint32(16).int64(m.beginMainFrameQueueNotCriticalEstimateDeltaUs);
                if (m.beginMainFrameStartToReadyToCommitEstimateDeltaUs != null && Object.hasOwnProperty.call(m, "beginMainFrameStartToReadyToCommitEstimateDeltaUs"))
                    w.uint32(24).int64(m.beginMainFrameStartToReadyToCommitEstimateDeltaUs);
                if (m.commitToReadyToActivateEstimateDeltaUs != null && Object.hasOwnProperty.call(m, "commitToReadyToActivateEstimateDeltaUs"))
                    w.uint32(32).int64(m.commitToReadyToActivateEstimateDeltaUs);
                if (m.prepareTilesEstimateDeltaUs != null && Object.hasOwnProperty.call(m, "prepareTilesEstimateDeltaUs"))
                    w.uint32(40).int64(m.prepareTilesEstimateDeltaUs);
                if (m.activateEstimateDeltaUs != null && Object.hasOwnProperty.call(m, "activateEstimateDeltaUs"))
                    w.uint32(48).int64(m.activateEstimateDeltaUs);
                if (m.drawEstimateDeltaUs != null && Object.hasOwnProperty.call(m, "drawEstimateDeltaUs"))
                    w.uint32(56).int64(m.drawEstimateDeltaUs);
                return w;
            };

            /**
             * Encodes the specified CompositorTimingHistory message, length delimited. Does not implicitly {@link perfetto.protos.CompositorTimingHistory.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.CompositorTimingHistory
             * @static
             * @param {perfetto.protos.ICompositorTimingHistory} message CompositorTimingHistory message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CompositorTimingHistory.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CompositorTimingHistory message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.CompositorTimingHistory
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.CompositorTimingHistory} CompositorTimingHistory
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CompositorTimingHistory.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.CompositorTimingHistory();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.beginMainFrameQueueCriticalEstimateDeltaUs = r.int64();
                        break;
                    case 2:
                        m.beginMainFrameQueueNotCriticalEstimateDeltaUs = r.int64();
                        break;
                    case 3:
                        m.beginMainFrameStartToReadyToCommitEstimateDeltaUs = r.int64();
                        break;
                    case 4:
                        m.commitToReadyToActivateEstimateDeltaUs = r.int64();
                        break;
                    case 5:
                        m.prepareTilesEstimateDeltaUs = r.int64();
                        break;
                    case 6:
                        m.activateEstimateDeltaUs = r.int64();
                        break;
                    case 7:
                        m.drawEstimateDeltaUs = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a CompositorTimingHistory message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.CompositorTimingHistory
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.CompositorTimingHistory} CompositorTimingHistory
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CompositorTimingHistory.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CompositorTimingHistory message.
             * @function verify
             * @memberof perfetto.protos.CompositorTimingHistory
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CompositorTimingHistory.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.beginMainFrameQueueCriticalEstimateDeltaUs != null && m.hasOwnProperty("beginMainFrameQueueCriticalEstimateDeltaUs")) {
                    if (!$util.isInteger(m.beginMainFrameQueueCriticalEstimateDeltaUs) && !(m.beginMainFrameQueueCriticalEstimateDeltaUs && $util.isInteger(m.beginMainFrameQueueCriticalEstimateDeltaUs.low) && $util.isInteger(m.beginMainFrameQueueCriticalEstimateDeltaUs.high)))
                        return "beginMainFrameQueueCriticalEstimateDeltaUs: integer|Long expected";
                }
                if (m.beginMainFrameQueueNotCriticalEstimateDeltaUs != null && m.hasOwnProperty("beginMainFrameQueueNotCriticalEstimateDeltaUs")) {
                    if (!$util.isInteger(m.beginMainFrameQueueNotCriticalEstimateDeltaUs) && !(m.beginMainFrameQueueNotCriticalEstimateDeltaUs && $util.isInteger(m.beginMainFrameQueueNotCriticalEstimateDeltaUs.low) && $util.isInteger(m.beginMainFrameQueueNotCriticalEstimateDeltaUs.high)))
                        return "beginMainFrameQueueNotCriticalEstimateDeltaUs: integer|Long expected";
                }
                if (m.beginMainFrameStartToReadyToCommitEstimateDeltaUs != null && m.hasOwnProperty("beginMainFrameStartToReadyToCommitEstimateDeltaUs")) {
                    if (!$util.isInteger(m.beginMainFrameStartToReadyToCommitEstimateDeltaUs) && !(m.beginMainFrameStartToReadyToCommitEstimateDeltaUs && $util.isInteger(m.beginMainFrameStartToReadyToCommitEstimateDeltaUs.low) && $util.isInteger(m.beginMainFrameStartToReadyToCommitEstimateDeltaUs.high)))
                        return "beginMainFrameStartToReadyToCommitEstimateDeltaUs: integer|Long expected";
                }
                if (m.commitToReadyToActivateEstimateDeltaUs != null && m.hasOwnProperty("commitToReadyToActivateEstimateDeltaUs")) {
                    if (!$util.isInteger(m.commitToReadyToActivateEstimateDeltaUs) && !(m.commitToReadyToActivateEstimateDeltaUs && $util.isInteger(m.commitToReadyToActivateEstimateDeltaUs.low) && $util.isInteger(m.commitToReadyToActivateEstimateDeltaUs.high)))
                        return "commitToReadyToActivateEstimateDeltaUs: integer|Long expected";
                }
                if (m.prepareTilesEstimateDeltaUs != null && m.hasOwnProperty("prepareTilesEstimateDeltaUs")) {
                    if (!$util.isInteger(m.prepareTilesEstimateDeltaUs) && !(m.prepareTilesEstimateDeltaUs && $util.isInteger(m.prepareTilesEstimateDeltaUs.low) && $util.isInteger(m.prepareTilesEstimateDeltaUs.high)))
                        return "prepareTilesEstimateDeltaUs: integer|Long expected";
                }
                if (m.activateEstimateDeltaUs != null && m.hasOwnProperty("activateEstimateDeltaUs")) {
                    if (!$util.isInteger(m.activateEstimateDeltaUs) && !(m.activateEstimateDeltaUs && $util.isInteger(m.activateEstimateDeltaUs.low) && $util.isInteger(m.activateEstimateDeltaUs.high)))
                        return "activateEstimateDeltaUs: integer|Long expected";
                }
                if (m.drawEstimateDeltaUs != null && m.hasOwnProperty("drawEstimateDeltaUs")) {
                    if (!$util.isInteger(m.drawEstimateDeltaUs) && !(m.drawEstimateDeltaUs && $util.isInteger(m.drawEstimateDeltaUs.low) && $util.isInteger(m.drawEstimateDeltaUs.high)))
                        return "drawEstimateDeltaUs: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a CompositorTimingHistory message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.CompositorTimingHistory
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.CompositorTimingHistory} CompositorTimingHistory
             */
            CompositorTimingHistory.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.CompositorTimingHistory)
                    return d;
                var m = new $root.perfetto.protos.CompositorTimingHistory();
                if (d.beginMainFrameQueueCriticalEstimateDeltaUs != null) {
                    if ($util.Long)
                        (m.beginMainFrameQueueCriticalEstimateDeltaUs = $util.Long.fromValue(d.beginMainFrameQueueCriticalEstimateDeltaUs)).unsigned = false;
                    else if (typeof d.beginMainFrameQueueCriticalEstimateDeltaUs === "string")
                        m.beginMainFrameQueueCriticalEstimateDeltaUs = parseInt(d.beginMainFrameQueueCriticalEstimateDeltaUs, 10);
                    else if (typeof d.beginMainFrameQueueCriticalEstimateDeltaUs === "number")
                        m.beginMainFrameQueueCriticalEstimateDeltaUs = d.beginMainFrameQueueCriticalEstimateDeltaUs;
                    else if (typeof d.beginMainFrameQueueCriticalEstimateDeltaUs === "object")
                        m.beginMainFrameQueueCriticalEstimateDeltaUs = new $util.LongBits(d.beginMainFrameQueueCriticalEstimateDeltaUs.low >>> 0, d.beginMainFrameQueueCriticalEstimateDeltaUs.high >>> 0).toNumber();
                }
                if (d.beginMainFrameQueueNotCriticalEstimateDeltaUs != null) {
                    if ($util.Long)
                        (m.beginMainFrameQueueNotCriticalEstimateDeltaUs = $util.Long.fromValue(d.beginMainFrameQueueNotCriticalEstimateDeltaUs)).unsigned = false;
                    else if (typeof d.beginMainFrameQueueNotCriticalEstimateDeltaUs === "string")
                        m.beginMainFrameQueueNotCriticalEstimateDeltaUs = parseInt(d.beginMainFrameQueueNotCriticalEstimateDeltaUs, 10);
                    else if (typeof d.beginMainFrameQueueNotCriticalEstimateDeltaUs === "number")
                        m.beginMainFrameQueueNotCriticalEstimateDeltaUs = d.beginMainFrameQueueNotCriticalEstimateDeltaUs;
                    else if (typeof d.beginMainFrameQueueNotCriticalEstimateDeltaUs === "object")
                        m.beginMainFrameQueueNotCriticalEstimateDeltaUs = new $util.LongBits(d.beginMainFrameQueueNotCriticalEstimateDeltaUs.low >>> 0, d.beginMainFrameQueueNotCriticalEstimateDeltaUs.high >>> 0).toNumber();
                }
                if (d.beginMainFrameStartToReadyToCommitEstimateDeltaUs != null) {
                    if ($util.Long)
                        (m.beginMainFrameStartToReadyToCommitEstimateDeltaUs = $util.Long.fromValue(d.beginMainFrameStartToReadyToCommitEstimateDeltaUs)).unsigned = false;
                    else if (typeof d.beginMainFrameStartToReadyToCommitEstimateDeltaUs === "string")
                        m.beginMainFrameStartToReadyToCommitEstimateDeltaUs = parseInt(d.beginMainFrameStartToReadyToCommitEstimateDeltaUs, 10);
                    else if (typeof d.beginMainFrameStartToReadyToCommitEstimateDeltaUs === "number")
                        m.beginMainFrameStartToReadyToCommitEstimateDeltaUs = d.beginMainFrameStartToReadyToCommitEstimateDeltaUs;
                    else if (typeof d.beginMainFrameStartToReadyToCommitEstimateDeltaUs === "object")
                        m.beginMainFrameStartToReadyToCommitEstimateDeltaUs = new $util.LongBits(d.beginMainFrameStartToReadyToCommitEstimateDeltaUs.low >>> 0, d.beginMainFrameStartToReadyToCommitEstimateDeltaUs.high >>> 0).toNumber();
                }
                if (d.commitToReadyToActivateEstimateDeltaUs != null) {
                    if ($util.Long)
                        (m.commitToReadyToActivateEstimateDeltaUs = $util.Long.fromValue(d.commitToReadyToActivateEstimateDeltaUs)).unsigned = false;
                    else if (typeof d.commitToReadyToActivateEstimateDeltaUs === "string")
                        m.commitToReadyToActivateEstimateDeltaUs = parseInt(d.commitToReadyToActivateEstimateDeltaUs, 10);
                    else if (typeof d.commitToReadyToActivateEstimateDeltaUs === "number")
                        m.commitToReadyToActivateEstimateDeltaUs = d.commitToReadyToActivateEstimateDeltaUs;
                    else if (typeof d.commitToReadyToActivateEstimateDeltaUs === "object")
                        m.commitToReadyToActivateEstimateDeltaUs = new $util.LongBits(d.commitToReadyToActivateEstimateDeltaUs.low >>> 0, d.commitToReadyToActivateEstimateDeltaUs.high >>> 0).toNumber();
                }
                if (d.prepareTilesEstimateDeltaUs != null) {
                    if ($util.Long)
                        (m.prepareTilesEstimateDeltaUs = $util.Long.fromValue(d.prepareTilesEstimateDeltaUs)).unsigned = false;
                    else if (typeof d.prepareTilesEstimateDeltaUs === "string")
                        m.prepareTilesEstimateDeltaUs = parseInt(d.prepareTilesEstimateDeltaUs, 10);
                    else if (typeof d.prepareTilesEstimateDeltaUs === "number")
                        m.prepareTilesEstimateDeltaUs = d.prepareTilesEstimateDeltaUs;
                    else if (typeof d.prepareTilesEstimateDeltaUs === "object")
                        m.prepareTilesEstimateDeltaUs = new $util.LongBits(d.prepareTilesEstimateDeltaUs.low >>> 0, d.prepareTilesEstimateDeltaUs.high >>> 0).toNumber();
                }
                if (d.activateEstimateDeltaUs != null) {
                    if ($util.Long)
                        (m.activateEstimateDeltaUs = $util.Long.fromValue(d.activateEstimateDeltaUs)).unsigned = false;
                    else if (typeof d.activateEstimateDeltaUs === "string")
                        m.activateEstimateDeltaUs = parseInt(d.activateEstimateDeltaUs, 10);
                    else if (typeof d.activateEstimateDeltaUs === "number")
                        m.activateEstimateDeltaUs = d.activateEstimateDeltaUs;
                    else if (typeof d.activateEstimateDeltaUs === "object")
                        m.activateEstimateDeltaUs = new $util.LongBits(d.activateEstimateDeltaUs.low >>> 0, d.activateEstimateDeltaUs.high >>> 0).toNumber();
                }
                if (d.drawEstimateDeltaUs != null) {
                    if ($util.Long)
                        (m.drawEstimateDeltaUs = $util.Long.fromValue(d.drawEstimateDeltaUs)).unsigned = false;
                    else if (typeof d.drawEstimateDeltaUs === "string")
                        m.drawEstimateDeltaUs = parseInt(d.drawEstimateDeltaUs, 10);
                    else if (typeof d.drawEstimateDeltaUs === "number")
                        m.drawEstimateDeltaUs = d.drawEstimateDeltaUs;
                    else if (typeof d.drawEstimateDeltaUs === "object")
                        m.drawEstimateDeltaUs = new $util.LongBits(d.drawEstimateDeltaUs.low >>> 0, d.drawEstimateDeltaUs.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from a CompositorTimingHistory message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.CompositorTimingHistory
             * @static
             * @param {perfetto.protos.CompositorTimingHistory} m CompositorTimingHistory
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CompositorTimingHistory.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.beginMainFrameQueueCriticalEstimateDeltaUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.beginMainFrameQueueCriticalEstimateDeltaUs = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.beginMainFrameQueueNotCriticalEstimateDeltaUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.beginMainFrameQueueNotCriticalEstimateDeltaUs = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.beginMainFrameStartToReadyToCommitEstimateDeltaUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.beginMainFrameStartToReadyToCommitEstimateDeltaUs = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.commitToReadyToActivateEstimateDeltaUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.commitToReadyToActivateEstimateDeltaUs = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.prepareTilesEstimateDeltaUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.prepareTilesEstimateDeltaUs = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.activateEstimateDeltaUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.activateEstimateDeltaUs = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.drawEstimateDeltaUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.drawEstimateDeltaUs = o.longs === String ? "0" : 0;
                }
                if (m.beginMainFrameQueueCriticalEstimateDeltaUs != null && m.hasOwnProperty("beginMainFrameQueueCriticalEstimateDeltaUs")) {
                    if (typeof m.beginMainFrameQueueCriticalEstimateDeltaUs === "number")
                        d.beginMainFrameQueueCriticalEstimateDeltaUs = o.longs === String ? String(m.beginMainFrameQueueCriticalEstimateDeltaUs) : m.beginMainFrameQueueCriticalEstimateDeltaUs;
                    else
                        d.beginMainFrameQueueCriticalEstimateDeltaUs = o.longs === String ? $util.Long.prototype.toString.call(m.beginMainFrameQueueCriticalEstimateDeltaUs) : o.longs === Number ? new $util.LongBits(m.beginMainFrameQueueCriticalEstimateDeltaUs.low >>> 0, m.beginMainFrameQueueCriticalEstimateDeltaUs.high >>> 0).toNumber() : m.beginMainFrameQueueCriticalEstimateDeltaUs;
                }
                if (m.beginMainFrameQueueNotCriticalEstimateDeltaUs != null && m.hasOwnProperty("beginMainFrameQueueNotCriticalEstimateDeltaUs")) {
                    if (typeof m.beginMainFrameQueueNotCriticalEstimateDeltaUs === "number")
                        d.beginMainFrameQueueNotCriticalEstimateDeltaUs = o.longs === String ? String(m.beginMainFrameQueueNotCriticalEstimateDeltaUs) : m.beginMainFrameQueueNotCriticalEstimateDeltaUs;
                    else
                        d.beginMainFrameQueueNotCriticalEstimateDeltaUs = o.longs === String ? $util.Long.prototype.toString.call(m.beginMainFrameQueueNotCriticalEstimateDeltaUs) : o.longs === Number ? new $util.LongBits(m.beginMainFrameQueueNotCriticalEstimateDeltaUs.low >>> 0, m.beginMainFrameQueueNotCriticalEstimateDeltaUs.high >>> 0).toNumber() : m.beginMainFrameQueueNotCriticalEstimateDeltaUs;
                }
                if (m.beginMainFrameStartToReadyToCommitEstimateDeltaUs != null && m.hasOwnProperty("beginMainFrameStartToReadyToCommitEstimateDeltaUs")) {
                    if (typeof m.beginMainFrameStartToReadyToCommitEstimateDeltaUs === "number")
                        d.beginMainFrameStartToReadyToCommitEstimateDeltaUs = o.longs === String ? String(m.beginMainFrameStartToReadyToCommitEstimateDeltaUs) : m.beginMainFrameStartToReadyToCommitEstimateDeltaUs;
                    else
                        d.beginMainFrameStartToReadyToCommitEstimateDeltaUs = o.longs === String ? $util.Long.prototype.toString.call(m.beginMainFrameStartToReadyToCommitEstimateDeltaUs) : o.longs === Number ? new $util.LongBits(m.beginMainFrameStartToReadyToCommitEstimateDeltaUs.low >>> 0, m.beginMainFrameStartToReadyToCommitEstimateDeltaUs.high >>> 0).toNumber() : m.beginMainFrameStartToReadyToCommitEstimateDeltaUs;
                }
                if (m.commitToReadyToActivateEstimateDeltaUs != null && m.hasOwnProperty("commitToReadyToActivateEstimateDeltaUs")) {
                    if (typeof m.commitToReadyToActivateEstimateDeltaUs === "number")
                        d.commitToReadyToActivateEstimateDeltaUs = o.longs === String ? String(m.commitToReadyToActivateEstimateDeltaUs) : m.commitToReadyToActivateEstimateDeltaUs;
                    else
                        d.commitToReadyToActivateEstimateDeltaUs = o.longs === String ? $util.Long.prototype.toString.call(m.commitToReadyToActivateEstimateDeltaUs) : o.longs === Number ? new $util.LongBits(m.commitToReadyToActivateEstimateDeltaUs.low >>> 0, m.commitToReadyToActivateEstimateDeltaUs.high >>> 0).toNumber() : m.commitToReadyToActivateEstimateDeltaUs;
                }
                if (m.prepareTilesEstimateDeltaUs != null && m.hasOwnProperty("prepareTilesEstimateDeltaUs")) {
                    if (typeof m.prepareTilesEstimateDeltaUs === "number")
                        d.prepareTilesEstimateDeltaUs = o.longs === String ? String(m.prepareTilesEstimateDeltaUs) : m.prepareTilesEstimateDeltaUs;
                    else
                        d.prepareTilesEstimateDeltaUs = o.longs === String ? $util.Long.prototype.toString.call(m.prepareTilesEstimateDeltaUs) : o.longs === Number ? new $util.LongBits(m.prepareTilesEstimateDeltaUs.low >>> 0, m.prepareTilesEstimateDeltaUs.high >>> 0).toNumber() : m.prepareTilesEstimateDeltaUs;
                }
                if (m.activateEstimateDeltaUs != null && m.hasOwnProperty("activateEstimateDeltaUs")) {
                    if (typeof m.activateEstimateDeltaUs === "number")
                        d.activateEstimateDeltaUs = o.longs === String ? String(m.activateEstimateDeltaUs) : m.activateEstimateDeltaUs;
                    else
                        d.activateEstimateDeltaUs = o.longs === String ? $util.Long.prototype.toString.call(m.activateEstimateDeltaUs) : o.longs === Number ? new $util.LongBits(m.activateEstimateDeltaUs.low >>> 0, m.activateEstimateDeltaUs.high >>> 0).toNumber() : m.activateEstimateDeltaUs;
                }
                if (m.drawEstimateDeltaUs != null && m.hasOwnProperty("drawEstimateDeltaUs")) {
                    if (typeof m.drawEstimateDeltaUs === "number")
                        d.drawEstimateDeltaUs = o.longs === String ? String(m.drawEstimateDeltaUs) : m.drawEstimateDeltaUs;
                    else
                        d.drawEstimateDeltaUs = o.longs === String ? $util.Long.prototype.toString.call(m.drawEstimateDeltaUs) : o.longs === Number ? new $util.LongBits(m.drawEstimateDeltaUs.low >>> 0, m.drawEstimateDeltaUs.high >>> 0).toNumber() : m.drawEstimateDeltaUs;
                }
                return d;
            };

            /**
             * Converts this CompositorTimingHistory to JSON.
             * @function toJSON
             * @memberof perfetto.protos.CompositorTimingHistory
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CompositorTimingHistory.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return CompositorTimingHistory;
        })();

        protos.UnsymbolizedSourceLocation = (function() {

            /**
             * Properties of an UnsymbolizedSourceLocation.
             * @memberof perfetto.protos
             * @interface IUnsymbolizedSourceLocation
             * @property {number|null} [iid] UnsymbolizedSourceLocation iid
             * @property {number|null} [mappingId] UnsymbolizedSourceLocation mappingId
             * @property {number|null} [relPc] UnsymbolizedSourceLocation relPc
             */

            /**
             * Constructs a new UnsymbolizedSourceLocation.
             * @memberof perfetto.protos
             * @classdesc Represents an UnsymbolizedSourceLocation.
             * @implements IUnsymbolizedSourceLocation
             * @constructor
             * @param {perfetto.protos.IUnsymbolizedSourceLocation=} [p] Properties to set
             */
            function UnsymbolizedSourceLocation(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * UnsymbolizedSourceLocation iid.
             * @member {number} iid
             * @memberof perfetto.protos.UnsymbolizedSourceLocation
             * @instance
             */
            UnsymbolizedSourceLocation.prototype.iid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * UnsymbolizedSourceLocation mappingId.
             * @member {number} mappingId
             * @memberof perfetto.protos.UnsymbolizedSourceLocation
             * @instance
             */
            UnsymbolizedSourceLocation.prototype.mappingId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * UnsymbolizedSourceLocation relPc.
             * @member {number} relPc
             * @memberof perfetto.protos.UnsymbolizedSourceLocation
             * @instance
             */
            UnsymbolizedSourceLocation.prototype.relPc = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new UnsymbolizedSourceLocation instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.UnsymbolizedSourceLocation
             * @static
             * @param {perfetto.protos.IUnsymbolizedSourceLocation=} [properties] Properties to set
             * @returns {perfetto.protos.UnsymbolizedSourceLocation} UnsymbolizedSourceLocation instance
             */
            UnsymbolizedSourceLocation.create = function create(properties) {
                return new UnsymbolizedSourceLocation(properties);
            };

            /**
             * Encodes the specified UnsymbolizedSourceLocation message. Does not implicitly {@link perfetto.protos.UnsymbolizedSourceLocation.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.UnsymbolizedSourceLocation
             * @static
             * @param {perfetto.protos.IUnsymbolizedSourceLocation} m UnsymbolizedSourceLocation message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            UnsymbolizedSourceLocation.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.iid != null && Object.hasOwnProperty.call(m, "iid"))
                    w.uint32(8).uint64(m.iid);
                if (m.mappingId != null && Object.hasOwnProperty.call(m, "mappingId"))
                    w.uint32(16).uint64(m.mappingId);
                if (m.relPc != null && Object.hasOwnProperty.call(m, "relPc"))
                    w.uint32(24).uint64(m.relPc);
                return w;
            };

            /**
             * Encodes the specified UnsymbolizedSourceLocation message, length delimited. Does not implicitly {@link perfetto.protos.UnsymbolizedSourceLocation.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.UnsymbolizedSourceLocation
             * @static
             * @param {perfetto.protos.IUnsymbolizedSourceLocation} message UnsymbolizedSourceLocation message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            UnsymbolizedSourceLocation.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an UnsymbolizedSourceLocation message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.UnsymbolizedSourceLocation
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.UnsymbolizedSourceLocation} UnsymbolizedSourceLocation
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            UnsymbolizedSourceLocation.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.UnsymbolizedSourceLocation();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.iid = r.uint64();
                        break;
                    case 2:
                        m.mappingId = r.uint64();
                        break;
                    case 3:
                        m.relPc = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an UnsymbolizedSourceLocation message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.UnsymbolizedSourceLocation
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.UnsymbolizedSourceLocation} UnsymbolizedSourceLocation
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            UnsymbolizedSourceLocation.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an UnsymbolizedSourceLocation message.
             * @function verify
             * @memberof perfetto.protos.UnsymbolizedSourceLocation
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            UnsymbolizedSourceLocation.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (!$util.isInteger(m.iid) && !(m.iid && $util.isInteger(m.iid.low) && $util.isInteger(m.iid.high)))
                        return "iid: integer|Long expected";
                }
                if (m.mappingId != null && m.hasOwnProperty("mappingId")) {
                    if (!$util.isInteger(m.mappingId) && !(m.mappingId && $util.isInteger(m.mappingId.low) && $util.isInteger(m.mappingId.high)))
                        return "mappingId: integer|Long expected";
                }
                if (m.relPc != null && m.hasOwnProperty("relPc")) {
                    if (!$util.isInteger(m.relPc) && !(m.relPc && $util.isInteger(m.relPc.low) && $util.isInteger(m.relPc.high)))
                        return "relPc: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates an UnsymbolizedSourceLocation message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.UnsymbolizedSourceLocation
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.UnsymbolizedSourceLocation} UnsymbolizedSourceLocation
             */
            UnsymbolizedSourceLocation.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.UnsymbolizedSourceLocation)
                    return d;
                var m = new $root.perfetto.protos.UnsymbolizedSourceLocation();
                if (d.iid != null) {
                    if ($util.Long)
                        (m.iid = $util.Long.fromValue(d.iid)).unsigned = true;
                    else if (typeof d.iid === "string")
                        m.iid = parseInt(d.iid, 10);
                    else if (typeof d.iid === "number")
                        m.iid = d.iid;
                    else if (typeof d.iid === "object")
                        m.iid = new $util.LongBits(d.iid.low >>> 0, d.iid.high >>> 0).toNumber(true);
                }
                if (d.mappingId != null) {
                    if ($util.Long)
                        (m.mappingId = $util.Long.fromValue(d.mappingId)).unsigned = true;
                    else if (typeof d.mappingId === "string")
                        m.mappingId = parseInt(d.mappingId, 10);
                    else if (typeof d.mappingId === "number")
                        m.mappingId = d.mappingId;
                    else if (typeof d.mappingId === "object")
                        m.mappingId = new $util.LongBits(d.mappingId.low >>> 0, d.mappingId.high >>> 0).toNumber(true);
                }
                if (d.relPc != null) {
                    if ($util.Long)
                        (m.relPc = $util.Long.fromValue(d.relPc)).unsigned = true;
                    else if (typeof d.relPc === "string")
                        m.relPc = parseInt(d.relPc, 10);
                    else if (typeof d.relPc === "number")
                        m.relPc = d.relPc;
                    else if (typeof d.relPc === "object")
                        m.relPc = new $util.LongBits(d.relPc.low >>> 0, d.relPc.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from an UnsymbolizedSourceLocation message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.UnsymbolizedSourceLocation
             * @static
             * @param {perfetto.protos.UnsymbolizedSourceLocation} m UnsymbolizedSourceLocation
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            UnsymbolizedSourceLocation.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.iid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.iid = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.mappingId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.mappingId = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.relPc = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.relPc = o.longs === String ? "0" : 0;
                }
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (typeof m.iid === "number")
                        d.iid = o.longs === String ? String(m.iid) : m.iid;
                    else
                        d.iid = o.longs === String ? $util.Long.prototype.toString.call(m.iid) : o.longs === Number ? new $util.LongBits(m.iid.low >>> 0, m.iid.high >>> 0).toNumber(true) : m.iid;
                }
                if (m.mappingId != null && m.hasOwnProperty("mappingId")) {
                    if (typeof m.mappingId === "number")
                        d.mappingId = o.longs === String ? String(m.mappingId) : m.mappingId;
                    else
                        d.mappingId = o.longs === String ? $util.Long.prototype.toString.call(m.mappingId) : o.longs === Number ? new $util.LongBits(m.mappingId.low >>> 0, m.mappingId.high >>> 0).toNumber(true) : m.mappingId;
                }
                if (m.relPc != null && m.hasOwnProperty("relPc")) {
                    if (typeof m.relPc === "number")
                        d.relPc = o.longs === String ? String(m.relPc) : m.relPc;
                    else
                        d.relPc = o.longs === String ? $util.Long.prototype.toString.call(m.relPc) : o.longs === Number ? new $util.LongBits(m.relPc.low >>> 0, m.relPc.high >>> 0).toNumber(true) : m.relPc;
                }
                return d;
            };

            /**
             * Converts this UnsymbolizedSourceLocation to JSON.
             * @function toJSON
             * @memberof perfetto.protos.UnsymbolizedSourceLocation
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            UnsymbolizedSourceLocation.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return UnsymbolizedSourceLocation;
        })();

        protos.SourceLocation = (function() {

            /**
             * Properties of a SourceLocation.
             * @memberof perfetto.protos
             * @interface ISourceLocation
             * @property {number|null} [iid] SourceLocation iid
             * @property {string|null} [fileName] SourceLocation fileName
             * @property {string|null} [functionName] SourceLocation functionName
             * @property {number|null} [lineNumber] SourceLocation lineNumber
             */

            /**
             * Constructs a new SourceLocation.
             * @memberof perfetto.protos
             * @classdesc Represents a SourceLocation.
             * @implements ISourceLocation
             * @constructor
             * @param {perfetto.protos.ISourceLocation=} [p] Properties to set
             */
            function SourceLocation(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SourceLocation iid.
             * @member {number} iid
             * @memberof perfetto.protos.SourceLocation
             * @instance
             */
            SourceLocation.prototype.iid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SourceLocation fileName.
             * @member {string} fileName
             * @memberof perfetto.protos.SourceLocation
             * @instance
             */
            SourceLocation.prototype.fileName = "";

            /**
             * SourceLocation functionName.
             * @member {string} functionName
             * @memberof perfetto.protos.SourceLocation
             * @instance
             */
            SourceLocation.prototype.functionName = "";

            /**
             * SourceLocation lineNumber.
             * @member {number} lineNumber
             * @memberof perfetto.protos.SourceLocation
             * @instance
             */
            SourceLocation.prototype.lineNumber = 0;

            /**
             * Creates a new SourceLocation instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SourceLocation
             * @static
             * @param {perfetto.protos.ISourceLocation=} [properties] Properties to set
             * @returns {perfetto.protos.SourceLocation} SourceLocation instance
             */
            SourceLocation.create = function create(properties) {
                return new SourceLocation(properties);
            };

            /**
             * Encodes the specified SourceLocation message. Does not implicitly {@link perfetto.protos.SourceLocation.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SourceLocation
             * @static
             * @param {perfetto.protos.ISourceLocation} m SourceLocation message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SourceLocation.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.iid != null && Object.hasOwnProperty.call(m, "iid"))
                    w.uint32(8).uint64(m.iid);
                if (m.fileName != null && Object.hasOwnProperty.call(m, "fileName"))
                    w.uint32(18).string(m.fileName);
                if (m.functionName != null && Object.hasOwnProperty.call(m, "functionName"))
                    w.uint32(26).string(m.functionName);
                if (m.lineNumber != null && Object.hasOwnProperty.call(m, "lineNumber"))
                    w.uint32(32).uint32(m.lineNumber);
                return w;
            };

            /**
             * Encodes the specified SourceLocation message, length delimited. Does not implicitly {@link perfetto.protos.SourceLocation.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SourceLocation
             * @static
             * @param {perfetto.protos.ISourceLocation} message SourceLocation message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SourceLocation.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SourceLocation message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SourceLocation
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SourceLocation} SourceLocation
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SourceLocation.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SourceLocation();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.iid = r.uint64();
                        break;
                    case 2:
                        m.fileName = r.string();
                        break;
                    case 3:
                        m.functionName = r.string();
                        break;
                    case 4:
                        m.lineNumber = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SourceLocation message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SourceLocation
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SourceLocation} SourceLocation
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SourceLocation.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SourceLocation message.
             * @function verify
             * @memberof perfetto.protos.SourceLocation
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SourceLocation.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (!$util.isInteger(m.iid) && !(m.iid && $util.isInteger(m.iid.low) && $util.isInteger(m.iid.high)))
                        return "iid: integer|Long expected";
                }
                if (m.fileName != null && m.hasOwnProperty("fileName")) {
                    if (!$util.isString(m.fileName))
                        return "fileName: string expected";
                }
                if (m.functionName != null && m.hasOwnProperty("functionName")) {
                    if (!$util.isString(m.functionName))
                        return "functionName: string expected";
                }
                if (m.lineNumber != null && m.hasOwnProperty("lineNumber")) {
                    if (!$util.isInteger(m.lineNumber))
                        return "lineNumber: integer expected";
                }
                return null;
            };

            /**
             * Creates a SourceLocation message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SourceLocation
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SourceLocation} SourceLocation
             */
            SourceLocation.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SourceLocation)
                    return d;
                var m = new $root.perfetto.protos.SourceLocation();
                if (d.iid != null) {
                    if ($util.Long)
                        (m.iid = $util.Long.fromValue(d.iid)).unsigned = true;
                    else if (typeof d.iid === "string")
                        m.iid = parseInt(d.iid, 10);
                    else if (typeof d.iid === "number")
                        m.iid = d.iid;
                    else if (typeof d.iid === "object")
                        m.iid = new $util.LongBits(d.iid.low >>> 0, d.iid.high >>> 0).toNumber(true);
                }
                if (d.fileName != null) {
                    m.fileName = String(d.fileName);
                }
                if (d.functionName != null) {
                    m.functionName = String(d.functionName);
                }
                if (d.lineNumber != null) {
                    m.lineNumber = d.lineNumber >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SourceLocation message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SourceLocation
             * @static
             * @param {perfetto.protos.SourceLocation} m SourceLocation
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SourceLocation.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.iid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.iid = o.longs === String ? "0" : 0;
                    d.fileName = "";
                    d.functionName = "";
                    d.lineNumber = 0;
                }
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (typeof m.iid === "number")
                        d.iid = o.longs === String ? String(m.iid) : m.iid;
                    else
                        d.iid = o.longs === String ? $util.Long.prototype.toString.call(m.iid) : o.longs === Number ? new $util.LongBits(m.iid.low >>> 0, m.iid.high >>> 0).toNumber(true) : m.iid;
                }
                if (m.fileName != null && m.hasOwnProperty("fileName")) {
                    d.fileName = m.fileName;
                }
                if (m.functionName != null && m.hasOwnProperty("functionName")) {
                    d.functionName = m.functionName;
                }
                if (m.lineNumber != null && m.hasOwnProperty("lineNumber")) {
                    d.lineNumber = m.lineNumber;
                }
                return d;
            };

            /**
             * Converts this SourceLocation to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SourceLocation
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SourceLocation.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SourceLocation;
        })();

        protos.ChromeContentSettingsEventInfo = (function() {

            /**
             * Properties of a ChromeContentSettingsEventInfo.
             * @memberof perfetto.protos
             * @interface IChromeContentSettingsEventInfo
             * @property {number|null} [numberOfExceptions] ChromeContentSettingsEventInfo numberOfExceptions
             */

            /**
             * Constructs a new ChromeContentSettingsEventInfo.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeContentSettingsEventInfo.
             * @implements IChromeContentSettingsEventInfo
             * @constructor
             * @param {perfetto.protos.IChromeContentSettingsEventInfo=} [p] Properties to set
             */
            function ChromeContentSettingsEventInfo(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeContentSettingsEventInfo numberOfExceptions.
             * @member {number} numberOfExceptions
             * @memberof perfetto.protos.ChromeContentSettingsEventInfo
             * @instance
             */
            ChromeContentSettingsEventInfo.prototype.numberOfExceptions = 0;

            /**
             * Creates a new ChromeContentSettingsEventInfo instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeContentSettingsEventInfo
             * @static
             * @param {perfetto.protos.IChromeContentSettingsEventInfo=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeContentSettingsEventInfo} ChromeContentSettingsEventInfo instance
             */
            ChromeContentSettingsEventInfo.create = function create(properties) {
                return new ChromeContentSettingsEventInfo(properties);
            };

            /**
             * Encodes the specified ChromeContentSettingsEventInfo message. Does not implicitly {@link perfetto.protos.ChromeContentSettingsEventInfo.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeContentSettingsEventInfo
             * @static
             * @param {perfetto.protos.IChromeContentSettingsEventInfo} m ChromeContentSettingsEventInfo message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeContentSettingsEventInfo.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.numberOfExceptions != null && Object.hasOwnProperty.call(m, "numberOfExceptions"))
                    w.uint32(8).uint32(m.numberOfExceptions);
                return w;
            };

            /**
             * Encodes the specified ChromeContentSettingsEventInfo message, length delimited. Does not implicitly {@link perfetto.protos.ChromeContentSettingsEventInfo.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeContentSettingsEventInfo
             * @static
             * @param {perfetto.protos.IChromeContentSettingsEventInfo} message ChromeContentSettingsEventInfo message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeContentSettingsEventInfo.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeContentSettingsEventInfo message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeContentSettingsEventInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeContentSettingsEventInfo} ChromeContentSettingsEventInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeContentSettingsEventInfo.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeContentSettingsEventInfo();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.numberOfExceptions = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeContentSettingsEventInfo message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeContentSettingsEventInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeContentSettingsEventInfo} ChromeContentSettingsEventInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeContentSettingsEventInfo.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeContentSettingsEventInfo message.
             * @function verify
             * @memberof perfetto.protos.ChromeContentSettingsEventInfo
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeContentSettingsEventInfo.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.numberOfExceptions != null && m.hasOwnProperty("numberOfExceptions")) {
                    if (!$util.isInteger(m.numberOfExceptions))
                        return "numberOfExceptions: integer expected";
                }
                return null;
            };

            /**
             * Creates a ChromeContentSettingsEventInfo message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeContentSettingsEventInfo
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeContentSettingsEventInfo} ChromeContentSettingsEventInfo
             */
            ChromeContentSettingsEventInfo.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeContentSettingsEventInfo)
                    return d;
                var m = new $root.perfetto.protos.ChromeContentSettingsEventInfo();
                if (d.numberOfExceptions != null) {
                    m.numberOfExceptions = d.numberOfExceptions >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeContentSettingsEventInfo message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeContentSettingsEventInfo
             * @static
             * @param {perfetto.protos.ChromeContentSettingsEventInfo} m ChromeContentSettingsEventInfo
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeContentSettingsEventInfo.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.numberOfExceptions = 0;
                }
                if (m.numberOfExceptions != null && m.hasOwnProperty("numberOfExceptions")) {
                    d.numberOfExceptions = m.numberOfExceptions;
                }
                return d;
            };

            /**
             * Converts this ChromeContentSettingsEventInfo to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeContentSettingsEventInfo
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeContentSettingsEventInfo.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ChromeContentSettingsEventInfo;
        })();

        protos.ChromeFrameReporter = (function() {

            /**
             * Properties of a ChromeFrameReporter.
             * @memberof perfetto.protos
             * @interface IChromeFrameReporter
             * @property {perfetto.protos.ChromeFrameReporter.State|null} [state] ChromeFrameReporter state
             * @property {perfetto.protos.ChromeFrameReporter.FrameDropReason|null} [reason] ChromeFrameReporter reason
             * @property {number|null} [frameSource] ChromeFrameReporter frameSource
             * @property {number|null} [frameSequence] ChromeFrameReporter frameSequence
             * @property {boolean|null} [affectsSmoothness] ChromeFrameReporter affectsSmoothness
             * @property {perfetto.protos.ChromeFrameReporter.ScrollState|null} [scrollState] ChromeFrameReporter scrollState
             * @property {boolean|null} [hasMainAnimation] ChromeFrameReporter hasMainAnimation
             * @property {boolean|null} [hasCompositorAnimation] ChromeFrameReporter hasCompositorAnimation
             * @property {boolean|null} [hasSmoothInputMain] ChromeFrameReporter hasSmoothInputMain
             * @property {boolean|null} [hasMissingContent] ChromeFrameReporter hasMissingContent
             * @property {number|null} [layerTreeHostId] ChromeFrameReporter layerTreeHostId
             * @property {boolean|null} [hasHighLatency] ChromeFrameReporter hasHighLatency
             * @property {perfetto.protos.ChromeFrameReporter.FrameType|null} [frameType] ChromeFrameReporter frameType
             * @property {Array.<string>|null} [highLatencyContributionStage] ChromeFrameReporter highLatencyContributionStage
             */

            /**
             * Constructs a new ChromeFrameReporter.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeFrameReporter.
             * @implements IChromeFrameReporter
             * @constructor
             * @param {perfetto.protos.IChromeFrameReporter=} [p] Properties to set
             */
            function ChromeFrameReporter(p) {
                this.highLatencyContributionStage = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeFrameReporter state.
             * @member {perfetto.protos.ChromeFrameReporter.State} state
             * @memberof perfetto.protos.ChromeFrameReporter
             * @instance
             */
            ChromeFrameReporter.prototype.state = 0;

            /**
             * ChromeFrameReporter reason.
             * @member {perfetto.protos.ChromeFrameReporter.FrameDropReason} reason
             * @memberof perfetto.protos.ChromeFrameReporter
             * @instance
             */
            ChromeFrameReporter.prototype.reason = 0;

            /**
             * ChromeFrameReporter frameSource.
             * @member {number} frameSource
             * @memberof perfetto.protos.ChromeFrameReporter
             * @instance
             */
            ChromeFrameReporter.prototype.frameSource = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * ChromeFrameReporter frameSequence.
             * @member {number} frameSequence
             * @memberof perfetto.protos.ChromeFrameReporter
             * @instance
             */
            ChromeFrameReporter.prototype.frameSequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * ChromeFrameReporter affectsSmoothness.
             * @member {boolean} affectsSmoothness
             * @memberof perfetto.protos.ChromeFrameReporter
             * @instance
             */
            ChromeFrameReporter.prototype.affectsSmoothness = false;

            /**
             * ChromeFrameReporter scrollState.
             * @member {perfetto.protos.ChromeFrameReporter.ScrollState} scrollState
             * @memberof perfetto.protos.ChromeFrameReporter
             * @instance
             */
            ChromeFrameReporter.prototype.scrollState = 0;

            /**
             * ChromeFrameReporter hasMainAnimation.
             * @member {boolean} hasMainAnimation
             * @memberof perfetto.protos.ChromeFrameReporter
             * @instance
             */
            ChromeFrameReporter.prototype.hasMainAnimation = false;

            /**
             * ChromeFrameReporter hasCompositorAnimation.
             * @member {boolean} hasCompositorAnimation
             * @memberof perfetto.protos.ChromeFrameReporter
             * @instance
             */
            ChromeFrameReporter.prototype.hasCompositorAnimation = false;

            /**
             * ChromeFrameReporter hasSmoothInputMain.
             * @member {boolean} hasSmoothInputMain
             * @memberof perfetto.protos.ChromeFrameReporter
             * @instance
             */
            ChromeFrameReporter.prototype.hasSmoothInputMain = false;

            /**
             * ChromeFrameReporter hasMissingContent.
             * @member {boolean} hasMissingContent
             * @memberof perfetto.protos.ChromeFrameReporter
             * @instance
             */
            ChromeFrameReporter.prototype.hasMissingContent = false;

            /**
             * ChromeFrameReporter layerTreeHostId.
             * @member {number} layerTreeHostId
             * @memberof perfetto.protos.ChromeFrameReporter
             * @instance
             */
            ChromeFrameReporter.prototype.layerTreeHostId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * ChromeFrameReporter hasHighLatency.
             * @member {boolean} hasHighLatency
             * @memberof perfetto.protos.ChromeFrameReporter
             * @instance
             */
            ChromeFrameReporter.prototype.hasHighLatency = false;

            /**
             * ChromeFrameReporter frameType.
             * @member {perfetto.protos.ChromeFrameReporter.FrameType} frameType
             * @memberof perfetto.protos.ChromeFrameReporter
             * @instance
             */
            ChromeFrameReporter.prototype.frameType = 0;

            /**
             * ChromeFrameReporter highLatencyContributionStage.
             * @member {Array.<string>} highLatencyContributionStage
             * @memberof perfetto.protos.ChromeFrameReporter
             * @instance
             */
            ChromeFrameReporter.prototype.highLatencyContributionStage = $util.emptyArray;

            /**
             * Creates a new ChromeFrameReporter instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeFrameReporter
             * @static
             * @param {perfetto.protos.IChromeFrameReporter=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeFrameReporter} ChromeFrameReporter instance
             */
            ChromeFrameReporter.create = function create(properties) {
                return new ChromeFrameReporter(properties);
            };

            /**
             * Encodes the specified ChromeFrameReporter message. Does not implicitly {@link perfetto.protos.ChromeFrameReporter.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeFrameReporter
             * @static
             * @param {perfetto.protos.IChromeFrameReporter} m ChromeFrameReporter message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeFrameReporter.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.state != null && Object.hasOwnProperty.call(m, "state"))
                    w.uint32(8).int32(m.state);
                if (m.reason != null && Object.hasOwnProperty.call(m, "reason"))
                    w.uint32(16).int32(m.reason);
                if (m.frameSource != null && Object.hasOwnProperty.call(m, "frameSource"))
                    w.uint32(24).uint64(m.frameSource);
                if (m.frameSequence != null && Object.hasOwnProperty.call(m, "frameSequence"))
                    w.uint32(32).uint64(m.frameSequence);
                if (m.affectsSmoothness != null && Object.hasOwnProperty.call(m, "affectsSmoothness"))
                    w.uint32(40).bool(m.affectsSmoothness);
                if (m.scrollState != null && Object.hasOwnProperty.call(m, "scrollState"))
                    w.uint32(48).int32(m.scrollState);
                if (m.hasMainAnimation != null && Object.hasOwnProperty.call(m, "hasMainAnimation"))
                    w.uint32(56).bool(m.hasMainAnimation);
                if (m.hasCompositorAnimation != null && Object.hasOwnProperty.call(m, "hasCompositorAnimation"))
                    w.uint32(64).bool(m.hasCompositorAnimation);
                if (m.hasSmoothInputMain != null && Object.hasOwnProperty.call(m, "hasSmoothInputMain"))
                    w.uint32(72).bool(m.hasSmoothInputMain);
                if (m.hasMissingContent != null && Object.hasOwnProperty.call(m, "hasMissingContent"))
                    w.uint32(80).bool(m.hasMissingContent);
                if (m.layerTreeHostId != null && Object.hasOwnProperty.call(m, "layerTreeHostId"))
                    w.uint32(88).uint64(m.layerTreeHostId);
                if (m.hasHighLatency != null && Object.hasOwnProperty.call(m, "hasHighLatency"))
                    w.uint32(96).bool(m.hasHighLatency);
                if (m.frameType != null && Object.hasOwnProperty.call(m, "frameType"))
                    w.uint32(104).int32(m.frameType);
                if (m.highLatencyContributionStage != null && m.highLatencyContributionStage.length) {
                    for (var i = 0; i < m.highLatencyContributionStage.length; ++i)
                        w.uint32(114).string(m.highLatencyContributionStage[i]);
                }
                return w;
            };

            /**
             * Encodes the specified ChromeFrameReporter message, length delimited. Does not implicitly {@link perfetto.protos.ChromeFrameReporter.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeFrameReporter
             * @static
             * @param {perfetto.protos.IChromeFrameReporter} message ChromeFrameReporter message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeFrameReporter.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeFrameReporter message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeFrameReporter
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeFrameReporter} ChromeFrameReporter
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeFrameReporter.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeFrameReporter();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.state = r.int32();
                        break;
                    case 2:
                        m.reason = r.int32();
                        break;
                    case 3:
                        m.frameSource = r.uint64();
                        break;
                    case 4:
                        m.frameSequence = r.uint64();
                        break;
                    case 5:
                        m.affectsSmoothness = r.bool();
                        break;
                    case 6:
                        m.scrollState = r.int32();
                        break;
                    case 7:
                        m.hasMainAnimation = r.bool();
                        break;
                    case 8:
                        m.hasCompositorAnimation = r.bool();
                        break;
                    case 9:
                        m.hasSmoothInputMain = r.bool();
                        break;
                    case 10:
                        m.hasMissingContent = r.bool();
                        break;
                    case 11:
                        m.layerTreeHostId = r.uint64();
                        break;
                    case 12:
                        m.hasHighLatency = r.bool();
                        break;
                    case 13:
                        m.frameType = r.int32();
                        break;
                    case 14:
                        if (!(m.highLatencyContributionStage && m.highLatencyContributionStage.length))
                            m.highLatencyContributionStage = [];
                        m.highLatencyContributionStage.push(r.string());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeFrameReporter message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeFrameReporter
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeFrameReporter} ChromeFrameReporter
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeFrameReporter.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeFrameReporter message.
             * @function verify
             * @memberof perfetto.protos.ChromeFrameReporter
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeFrameReporter.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.state != null && m.hasOwnProperty("state")) {
                    switch (m.state) {
                    default:
                        return "state: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                }
                if (m.reason != null && m.hasOwnProperty("reason")) {
                    switch (m.reason) {
                    default:
                        return "reason: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                }
                if (m.frameSource != null && m.hasOwnProperty("frameSource")) {
                    if (!$util.isInteger(m.frameSource) && !(m.frameSource && $util.isInteger(m.frameSource.low) && $util.isInteger(m.frameSource.high)))
                        return "frameSource: integer|Long expected";
                }
                if (m.frameSequence != null && m.hasOwnProperty("frameSequence")) {
                    if (!$util.isInteger(m.frameSequence) && !(m.frameSequence && $util.isInteger(m.frameSequence.low) && $util.isInteger(m.frameSequence.high)))
                        return "frameSequence: integer|Long expected";
                }
                if (m.affectsSmoothness != null && m.hasOwnProperty("affectsSmoothness")) {
                    if (typeof m.affectsSmoothness !== "boolean")
                        return "affectsSmoothness: boolean expected";
                }
                if (m.scrollState != null && m.hasOwnProperty("scrollState")) {
                    switch (m.scrollState) {
                    default:
                        return "scrollState: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                }
                if (m.hasMainAnimation != null && m.hasOwnProperty("hasMainAnimation")) {
                    if (typeof m.hasMainAnimation !== "boolean")
                        return "hasMainAnimation: boolean expected";
                }
                if (m.hasCompositorAnimation != null && m.hasOwnProperty("hasCompositorAnimation")) {
                    if (typeof m.hasCompositorAnimation !== "boolean")
                        return "hasCompositorAnimation: boolean expected";
                }
                if (m.hasSmoothInputMain != null && m.hasOwnProperty("hasSmoothInputMain")) {
                    if (typeof m.hasSmoothInputMain !== "boolean")
                        return "hasSmoothInputMain: boolean expected";
                }
                if (m.hasMissingContent != null && m.hasOwnProperty("hasMissingContent")) {
                    if (typeof m.hasMissingContent !== "boolean")
                        return "hasMissingContent: boolean expected";
                }
                if (m.layerTreeHostId != null && m.hasOwnProperty("layerTreeHostId")) {
                    if (!$util.isInteger(m.layerTreeHostId) && !(m.layerTreeHostId && $util.isInteger(m.layerTreeHostId.low) && $util.isInteger(m.layerTreeHostId.high)))
                        return "layerTreeHostId: integer|Long expected";
                }
                if (m.hasHighLatency != null && m.hasOwnProperty("hasHighLatency")) {
                    if (typeof m.hasHighLatency !== "boolean")
                        return "hasHighLatency: boolean expected";
                }
                if (m.frameType != null && m.hasOwnProperty("frameType")) {
                    switch (m.frameType) {
                    default:
                        return "frameType: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                }
                if (m.highLatencyContributionStage != null && m.hasOwnProperty("highLatencyContributionStage")) {
                    if (!Array.isArray(m.highLatencyContributionStage))
                        return "highLatencyContributionStage: array expected";
                    for (var i = 0; i < m.highLatencyContributionStage.length; ++i) {
                        if (!$util.isString(m.highLatencyContributionStage[i]))
                            return "highLatencyContributionStage: string[] expected";
                    }
                }
                return null;
            };

            /**
             * Creates a ChromeFrameReporter message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeFrameReporter
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeFrameReporter} ChromeFrameReporter
             */
            ChromeFrameReporter.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeFrameReporter)
                    return d;
                var m = new $root.perfetto.protos.ChromeFrameReporter();
                switch (d.state) {
                case "STATE_NO_UPDATE_DESIRED":
                case 0:
                    m.state = 0;
                    break;
                case "STATE_PRESENTED_ALL":
                case 1:
                    m.state = 1;
                    break;
                case "STATE_PRESENTED_PARTIAL":
                case 2:
                    m.state = 2;
                    break;
                case "STATE_DROPPED":
                case 3:
                    m.state = 3;
                    break;
                }
                switch (d.reason) {
                case "REASON_UNSPECIFIED":
                case 0:
                    m.reason = 0;
                    break;
                case "REASON_DISPLAY_COMPOSITOR":
                case 1:
                    m.reason = 1;
                    break;
                case "REASON_MAIN_THREAD":
                case 2:
                    m.reason = 2;
                    break;
                case "REASON_CLIENT_COMPOSITOR":
                case 3:
                    m.reason = 3;
                    break;
                }
                if (d.frameSource != null) {
                    if ($util.Long)
                        (m.frameSource = $util.Long.fromValue(d.frameSource)).unsigned = true;
                    else if (typeof d.frameSource === "string")
                        m.frameSource = parseInt(d.frameSource, 10);
                    else if (typeof d.frameSource === "number")
                        m.frameSource = d.frameSource;
                    else if (typeof d.frameSource === "object")
                        m.frameSource = new $util.LongBits(d.frameSource.low >>> 0, d.frameSource.high >>> 0).toNumber(true);
                }
                if (d.frameSequence != null) {
                    if ($util.Long)
                        (m.frameSequence = $util.Long.fromValue(d.frameSequence)).unsigned = true;
                    else if (typeof d.frameSequence === "string")
                        m.frameSequence = parseInt(d.frameSequence, 10);
                    else if (typeof d.frameSequence === "number")
                        m.frameSequence = d.frameSequence;
                    else if (typeof d.frameSequence === "object")
                        m.frameSequence = new $util.LongBits(d.frameSequence.low >>> 0, d.frameSequence.high >>> 0).toNumber(true);
                }
                if (d.affectsSmoothness != null) {
                    m.affectsSmoothness = Boolean(d.affectsSmoothness);
                }
                switch (d.scrollState) {
                case "SCROLL_NONE":
                case 0:
                    m.scrollState = 0;
                    break;
                case "SCROLL_MAIN_THREAD":
                case 1:
                    m.scrollState = 1;
                    break;
                case "SCROLL_COMPOSITOR_THREAD":
                case 2:
                    m.scrollState = 2;
                    break;
                case "SCROLL_UNKNOWN":
                case 3:
                    m.scrollState = 3;
                    break;
                }
                if (d.hasMainAnimation != null) {
                    m.hasMainAnimation = Boolean(d.hasMainAnimation);
                }
                if (d.hasCompositorAnimation != null) {
                    m.hasCompositorAnimation = Boolean(d.hasCompositorAnimation);
                }
                if (d.hasSmoothInputMain != null) {
                    m.hasSmoothInputMain = Boolean(d.hasSmoothInputMain);
                }
                if (d.hasMissingContent != null) {
                    m.hasMissingContent = Boolean(d.hasMissingContent);
                }
                if (d.layerTreeHostId != null) {
                    if ($util.Long)
                        (m.layerTreeHostId = $util.Long.fromValue(d.layerTreeHostId)).unsigned = true;
                    else if (typeof d.layerTreeHostId === "string")
                        m.layerTreeHostId = parseInt(d.layerTreeHostId, 10);
                    else if (typeof d.layerTreeHostId === "number")
                        m.layerTreeHostId = d.layerTreeHostId;
                    else if (typeof d.layerTreeHostId === "object")
                        m.layerTreeHostId = new $util.LongBits(d.layerTreeHostId.low >>> 0, d.layerTreeHostId.high >>> 0).toNumber(true);
                }
                if (d.hasHighLatency != null) {
                    m.hasHighLatency = Boolean(d.hasHighLatency);
                }
                switch (d.frameType) {
                case "FORKED":
                case 0:
                    m.frameType = 0;
                    break;
                case "BACKFILL":
                case 1:
                    m.frameType = 1;
                    break;
                }
                if (d.highLatencyContributionStage) {
                    if (!Array.isArray(d.highLatencyContributionStage))
                        throw TypeError(".perfetto.protos.ChromeFrameReporter.highLatencyContributionStage: array expected");
                    m.highLatencyContributionStage = [];
                    for (var i = 0; i < d.highLatencyContributionStage.length; ++i) {
                        m.highLatencyContributionStage[i] = String(d.highLatencyContributionStage[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeFrameReporter message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeFrameReporter
             * @static
             * @param {perfetto.protos.ChromeFrameReporter} m ChromeFrameReporter
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeFrameReporter.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.highLatencyContributionStage = [];
                }
                if (o.defaults) {
                    d.state = o.enums === String ? "STATE_NO_UPDATE_DESIRED" : 0;
                    d.reason = o.enums === String ? "REASON_UNSPECIFIED" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.frameSource = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.frameSource = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.frameSequence = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.frameSequence = o.longs === String ? "0" : 0;
                    d.affectsSmoothness = false;
                    d.scrollState = o.enums === String ? "SCROLL_NONE" : 0;
                    d.hasMainAnimation = false;
                    d.hasCompositorAnimation = false;
                    d.hasSmoothInputMain = false;
                    d.hasMissingContent = false;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.layerTreeHostId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.layerTreeHostId = o.longs === String ? "0" : 0;
                    d.hasHighLatency = false;
                    d.frameType = o.enums === String ? "FORKED" : 0;
                }
                if (m.state != null && m.hasOwnProperty("state")) {
                    d.state = o.enums === String ? $root.perfetto.protos.ChromeFrameReporter.State[m.state] : m.state;
                }
                if (m.reason != null && m.hasOwnProperty("reason")) {
                    d.reason = o.enums === String ? $root.perfetto.protos.ChromeFrameReporter.FrameDropReason[m.reason] : m.reason;
                }
                if (m.frameSource != null && m.hasOwnProperty("frameSource")) {
                    if (typeof m.frameSource === "number")
                        d.frameSource = o.longs === String ? String(m.frameSource) : m.frameSource;
                    else
                        d.frameSource = o.longs === String ? $util.Long.prototype.toString.call(m.frameSource) : o.longs === Number ? new $util.LongBits(m.frameSource.low >>> 0, m.frameSource.high >>> 0).toNumber(true) : m.frameSource;
                }
                if (m.frameSequence != null && m.hasOwnProperty("frameSequence")) {
                    if (typeof m.frameSequence === "number")
                        d.frameSequence = o.longs === String ? String(m.frameSequence) : m.frameSequence;
                    else
                        d.frameSequence = o.longs === String ? $util.Long.prototype.toString.call(m.frameSequence) : o.longs === Number ? new $util.LongBits(m.frameSequence.low >>> 0, m.frameSequence.high >>> 0).toNumber(true) : m.frameSequence;
                }
                if (m.affectsSmoothness != null && m.hasOwnProperty("affectsSmoothness")) {
                    d.affectsSmoothness = m.affectsSmoothness;
                }
                if (m.scrollState != null && m.hasOwnProperty("scrollState")) {
                    d.scrollState = o.enums === String ? $root.perfetto.protos.ChromeFrameReporter.ScrollState[m.scrollState] : m.scrollState;
                }
                if (m.hasMainAnimation != null && m.hasOwnProperty("hasMainAnimation")) {
                    d.hasMainAnimation = m.hasMainAnimation;
                }
                if (m.hasCompositorAnimation != null && m.hasOwnProperty("hasCompositorAnimation")) {
                    d.hasCompositorAnimation = m.hasCompositorAnimation;
                }
                if (m.hasSmoothInputMain != null && m.hasOwnProperty("hasSmoothInputMain")) {
                    d.hasSmoothInputMain = m.hasSmoothInputMain;
                }
                if (m.hasMissingContent != null && m.hasOwnProperty("hasMissingContent")) {
                    d.hasMissingContent = m.hasMissingContent;
                }
                if (m.layerTreeHostId != null && m.hasOwnProperty("layerTreeHostId")) {
                    if (typeof m.layerTreeHostId === "number")
                        d.layerTreeHostId = o.longs === String ? String(m.layerTreeHostId) : m.layerTreeHostId;
                    else
                        d.layerTreeHostId = o.longs === String ? $util.Long.prototype.toString.call(m.layerTreeHostId) : o.longs === Number ? new $util.LongBits(m.layerTreeHostId.low >>> 0, m.layerTreeHostId.high >>> 0).toNumber(true) : m.layerTreeHostId;
                }
                if (m.hasHighLatency != null && m.hasOwnProperty("hasHighLatency")) {
                    d.hasHighLatency = m.hasHighLatency;
                }
                if (m.frameType != null && m.hasOwnProperty("frameType")) {
                    d.frameType = o.enums === String ? $root.perfetto.protos.ChromeFrameReporter.FrameType[m.frameType] : m.frameType;
                }
                if (m.highLatencyContributionStage && m.highLatencyContributionStage.length) {
                    d.highLatencyContributionStage = [];
                    for (var j = 0; j < m.highLatencyContributionStage.length; ++j) {
                        d.highLatencyContributionStage[j] = m.highLatencyContributionStage[j];
                    }
                }
                return d;
            };

            /**
             * Converts this ChromeFrameReporter to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeFrameReporter
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeFrameReporter.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * State enum.
             * @name perfetto.protos.ChromeFrameReporter.State
             * @enum {number}
             * @property {number} STATE_NO_UPDATE_DESIRED=0 STATE_NO_UPDATE_DESIRED value
             * @property {number} STATE_PRESENTED_ALL=1 STATE_PRESENTED_ALL value
             * @property {number} STATE_PRESENTED_PARTIAL=2 STATE_PRESENTED_PARTIAL value
             * @property {number} STATE_DROPPED=3 STATE_DROPPED value
             */
            ChromeFrameReporter.State = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "STATE_NO_UPDATE_DESIRED"] = 0;
                values[valuesById[1] = "STATE_PRESENTED_ALL"] = 1;
                values[valuesById[2] = "STATE_PRESENTED_PARTIAL"] = 2;
                values[valuesById[3] = "STATE_DROPPED"] = 3;
                return values;
            })();

            /**
             * FrameDropReason enum.
             * @name perfetto.protos.ChromeFrameReporter.FrameDropReason
             * @enum {number}
             * @property {number} REASON_UNSPECIFIED=0 REASON_UNSPECIFIED value
             * @property {number} REASON_DISPLAY_COMPOSITOR=1 REASON_DISPLAY_COMPOSITOR value
             * @property {number} REASON_MAIN_THREAD=2 REASON_MAIN_THREAD value
             * @property {number} REASON_CLIENT_COMPOSITOR=3 REASON_CLIENT_COMPOSITOR value
             */
            ChromeFrameReporter.FrameDropReason = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "REASON_UNSPECIFIED"] = 0;
                values[valuesById[1] = "REASON_DISPLAY_COMPOSITOR"] = 1;
                values[valuesById[2] = "REASON_MAIN_THREAD"] = 2;
                values[valuesById[3] = "REASON_CLIENT_COMPOSITOR"] = 3;
                return values;
            })();

            /**
             * ScrollState enum.
             * @name perfetto.protos.ChromeFrameReporter.ScrollState
             * @enum {number}
             * @property {number} SCROLL_NONE=0 SCROLL_NONE value
             * @property {number} SCROLL_MAIN_THREAD=1 SCROLL_MAIN_THREAD value
             * @property {number} SCROLL_COMPOSITOR_THREAD=2 SCROLL_COMPOSITOR_THREAD value
             * @property {number} SCROLL_UNKNOWN=3 SCROLL_UNKNOWN value
             */
            ChromeFrameReporter.ScrollState = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "SCROLL_NONE"] = 0;
                values[valuesById[1] = "SCROLL_MAIN_THREAD"] = 1;
                values[valuesById[2] = "SCROLL_COMPOSITOR_THREAD"] = 2;
                values[valuesById[3] = "SCROLL_UNKNOWN"] = 3;
                return values;
            })();

            /**
             * FrameType enum.
             * @name perfetto.protos.ChromeFrameReporter.FrameType
             * @enum {number}
             * @property {number} FORKED=0 FORKED value
             * @property {number} BACKFILL=1 BACKFILL value
             */
            ChromeFrameReporter.FrameType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "FORKED"] = 0;
                values[valuesById[1] = "BACKFILL"] = 1;
                return values;
            })();

            return ChromeFrameReporter;
        })();

        protos.ChromeKeyedService = (function() {

            /**
             * Properties of a ChromeKeyedService.
             * @memberof perfetto.protos
             * @interface IChromeKeyedService
             * @property {string|null} [name] ChromeKeyedService name
             */

            /**
             * Constructs a new ChromeKeyedService.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeKeyedService.
             * @implements IChromeKeyedService
             * @constructor
             * @param {perfetto.protos.IChromeKeyedService=} [p] Properties to set
             */
            function ChromeKeyedService(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeKeyedService name.
             * @member {string} name
             * @memberof perfetto.protos.ChromeKeyedService
             * @instance
             */
            ChromeKeyedService.prototype.name = "";

            /**
             * Creates a new ChromeKeyedService instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeKeyedService
             * @static
             * @param {perfetto.protos.IChromeKeyedService=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeKeyedService} ChromeKeyedService instance
             */
            ChromeKeyedService.create = function create(properties) {
                return new ChromeKeyedService(properties);
            };

            /**
             * Encodes the specified ChromeKeyedService message. Does not implicitly {@link perfetto.protos.ChromeKeyedService.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeKeyedService
             * @static
             * @param {perfetto.protos.IChromeKeyedService} m ChromeKeyedService message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeKeyedService.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(10).string(m.name);
                return w;
            };

            /**
             * Encodes the specified ChromeKeyedService message, length delimited. Does not implicitly {@link perfetto.protos.ChromeKeyedService.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeKeyedService
             * @static
             * @param {perfetto.protos.IChromeKeyedService} message ChromeKeyedService message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeKeyedService.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeKeyedService message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeKeyedService
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeKeyedService} ChromeKeyedService
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeKeyedService.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeKeyedService();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.name = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeKeyedService message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeKeyedService
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeKeyedService} ChromeKeyedService
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeKeyedService.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeKeyedService message.
             * @function verify
             * @memberof perfetto.protos.ChromeKeyedService
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeKeyedService.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                return null;
            };

            /**
             * Creates a ChromeKeyedService message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeKeyedService
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeKeyedService} ChromeKeyedService
             */
            ChromeKeyedService.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeKeyedService)
                    return d;
                var m = new $root.perfetto.protos.ChromeKeyedService();
                if (d.name != null) {
                    m.name = String(d.name);
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeKeyedService message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeKeyedService
             * @static
             * @param {perfetto.protos.ChromeKeyedService} m ChromeKeyedService
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeKeyedService.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.name = "";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                return d;
            };

            /**
             * Converts this ChromeKeyedService to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeKeyedService
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeKeyedService.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ChromeKeyedService;
        })();

        protos.ChromeLatencyInfo = (function() {

            /**
             * Properties of a ChromeLatencyInfo.
             * @memberof perfetto.protos
             * @interface IChromeLatencyInfo
             * @property {number|null} [traceId] ChromeLatencyInfo traceId
             * @property {perfetto.protos.ChromeLatencyInfo.Step|null} [step] ChromeLatencyInfo step
             * @property {number|null} [frameTreeNodeId] ChromeLatencyInfo frameTreeNodeId
             * @property {Array.<perfetto.protos.ChromeLatencyInfo.IComponentInfo>|null} [componentInfo] ChromeLatencyInfo componentInfo
             * @property {boolean|null} [isCoalesced] ChromeLatencyInfo isCoalesced
             * @property {number|null} [gestureScrollId] ChromeLatencyInfo gestureScrollId
             * @property {number|null} [touchId] ChromeLatencyInfo touchId
             */

            /**
             * Constructs a new ChromeLatencyInfo.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeLatencyInfo.
             * @implements IChromeLatencyInfo
             * @constructor
             * @param {perfetto.protos.IChromeLatencyInfo=} [p] Properties to set
             */
            function ChromeLatencyInfo(p) {
                this.componentInfo = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeLatencyInfo traceId.
             * @member {number} traceId
             * @memberof perfetto.protos.ChromeLatencyInfo
             * @instance
             */
            ChromeLatencyInfo.prototype.traceId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ChromeLatencyInfo step.
             * @member {perfetto.protos.ChromeLatencyInfo.Step} step
             * @memberof perfetto.protos.ChromeLatencyInfo
             * @instance
             */
            ChromeLatencyInfo.prototype.step = 0;

            /**
             * ChromeLatencyInfo frameTreeNodeId.
             * @member {number} frameTreeNodeId
             * @memberof perfetto.protos.ChromeLatencyInfo
             * @instance
             */
            ChromeLatencyInfo.prototype.frameTreeNodeId = 0;

            /**
             * ChromeLatencyInfo componentInfo.
             * @member {Array.<perfetto.protos.ChromeLatencyInfo.IComponentInfo>} componentInfo
             * @memberof perfetto.protos.ChromeLatencyInfo
             * @instance
             */
            ChromeLatencyInfo.prototype.componentInfo = $util.emptyArray;

            /**
             * ChromeLatencyInfo isCoalesced.
             * @member {boolean} isCoalesced
             * @memberof perfetto.protos.ChromeLatencyInfo
             * @instance
             */
            ChromeLatencyInfo.prototype.isCoalesced = false;

            /**
             * ChromeLatencyInfo gestureScrollId.
             * @member {number} gestureScrollId
             * @memberof perfetto.protos.ChromeLatencyInfo
             * @instance
             */
            ChromeLatencyInfo.prototype.gestureScrollId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ChromeLatencyInfo touchId.
             * @member {number} touchId
             * @memberof perfetto.protos.ChromeLatencyInfo
             * @instance
             */
            ChromeLatencyInfo.prototype.touchId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new ChromeLatencyInfo instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeLatencyInfo
             * @static
             * @param {perfetto.protos.IChromeLatencyInfo=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeLatencyInfo} ChromeLatencyInfo instance
             */
            ChromeLatencyInfo.create = function create(properties) {
                return new ChromeLatencyInfo(properties);
            };

            /**
             * Encodes the specified ChromeLatencyInfo message. Does not implicitly {@link perfetto.protos.ChromeLatencyInfo.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeLatencyInfo
             * @static
             * @param {perfetto.protos.IChromeLatencyInfo} m ChromeLatencyInfo message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeLatencyInfo.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.traceId != null && Object.hasOwnProperty.call(m, "traceId"))
                    w.uint32(8).int64(m.traceId);
                if (m.step != null && Object.hasOwnProperty.call(m, "step"))
                    w.uint32(16).int32(m.step);
                if (m.frameTreeNodeId != null && Object.hasOwnProperty.call(m, "frameTreeNodeId"))
                    w.uint32(24).int32(m.frameTreeNodeId);
                if (m.componentInfo != null && m.componentInfo.length) {
                    for (var i = 0; i < m.componentInfo.length; ++i)
                        $root.perfetto.protos.ChromeLatencyInfo.ComponentInfo.encode(m.componentInfo[i], w.uint32(34).fork()).ldelim();
                }
                if (m.isCoalesced != null && Object.hasOwnProperty.call(m, "isCoalesced"))
                    w.uint32(40).bool(m.isCoalesced);
                if (m.gestureScrollId != null && Object.hasOwnProperty.call(m, "gestureScrollId"))
                    w.uint32(48).int64(m.gestureScrollId);
                if (m.touchId != null && Object.hasOwnProperty.call(m, "touchId"))
                    w.uint32(56).int64(m.touchId);
                return w;
            };

            /**
             * Encodes the specified ChromeLatencyInfo message, length delimited. Does not implicitly {@link perfetto.protos.ChromeLatencyInfo.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeLatencyInfo
             * @static
             * @param {perfetto.protos.IChromeLatencyInfo} message ChromeLatencyInfo message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeLatencyInfo.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeLatencyInfo message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeLatencyInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeLatencyInfo} ChromeLatencyInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeLatencyInfo.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeLatencyInfo();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.traceId = r.int64();
                        break;
                    case 2:
                        m.step = r.int32();
                        break;
                    case 3:
                        m.frameTreeNodeId = r.int32();
                        break;
                    case 4:
                        if (!(m.componentInfo && m.componentInfo.length))
                            m.componentInfo = [];
                        m.componentInfo.push($root.perfetto.protos.ChromeLatencyInfo.ComponentInfo.decode(r, r.uint32()));
                        break;
                    case 5:
                        m.isCoalesced = r.bool();
                        break;
                    case 6:
                        m.gestureScrollId = r.int64();
                        break;
                    case 7:
                        m.touchId = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeLatencyInfo message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeLatencyInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeLatencyInfo} ChromeLatencyInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeLatencyInfo.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeLatencyInfo message.
             * @function verify
             * @memberof perfetto.protos.ChromeLatencyInfo
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeLatencyInfo.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.traceId != null && m.hasOwnProperty("traceId")) {
                    if (!$util.isInteger(m.traceId) && !(m.traceId && $util.isInteger(m.traceId.low) && $util.isInteger(m.traceId.high)))
                        return "traceId: integer|Long expected";
                }
                if (m.step != null && m.hasOwnProperty("step")) {
                    switch (m.step) {
                    default:
                        return "step: enum value expected";
                    case 0:
                    case 3:
                    case 5:
                    case 8:
                    case 4:
                    case 2:
                    case 1:
                    case 9:
                    case 10:
                    case 6:
                    case 7:
                    case 11:
                        break;
                    }
                }
                if (m.frameTreeNodeId != null && m.hasOwnProperty("frameTreeNodeId")) {
                    if (!$util.isInteger(m.frameTreeNodeId))
                        return "frameTreeNodeId: integer expected";
                }
                if (m.componentInfo != null && m.hasOwnProperty("componentInfo")) {
                    if (!Array.isArray(m.componentInfo))
                        return "componentInfo: array expected";
                    for (var i = 0; i < m.componentInfo.length; ++i) {
                        {
                            var e = $root.perfetto.protos.ChromeLatencyInfo.ComponentInfo.verify(m.componentInfo[i]);
                            if (e)
                                return "componentInfo." + e;
                        }
                    }
                }
                if (m.isCoalesced != null && m.hasOwnProperty("isCoalesced")) {
                    if (typeof m.isCoalesced !== "boolean")
                        return "isCoalesced: boolean expected";
                }
                if (m.gestureScrollId != null && m.hasOwnProperty("gestureScrollId")) {
                    if (!$util.isInteger(m.gestureScrollId) && !(m.gestureScrollId && $util.isInteger(m.gestureScrollId.low) && $util.isInteger(m.gestureScrollId.high)))
                        return "gestureScrollId: integer|Long expected";
                }
                if (m.touchId != null && m.hasOwnProperty("touchId")) {
                    if (!$util.isInteger(m.touchId) && !(m.touchId && $util.isInteger(m.touchId.low) && $util.isInteger(m.touchId.high)))
                        return "touchId: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a ChromeLatencyInfo message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeLatencyInfo
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeLatencyInfo} ChromeLatencyInfo
             */
            ChromeLatencyInfo.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeLatencyInfo)
                    return d;
                var m = new $root.perfetto.protos.ChromeLatencyInfo();
                if (d.traceId != null) {
                    if ($util.Long)
                        (m.traceId = $util.Long.fromValue(d.traceId)).unsigned = false;
                    else if (typeof d.traceId === "string")
                        m.traceId = parseInt(d.traceId, 10);
                    else if (typeof d.traceId === "number")
                        m.traceId = d.traceId;
                    else if (typeof d.traceId === "object")
                        m.traceId = new $util.LongBits(d.traceId.low >>> 0, d.traceId.high >>> 0).toNumber();
                }
                switch (d.step) {
                case "STEP_UNSPECIFIED":
                case 0:
                    m.step = 0;
                    break;
                case "STEP_SEND_INPUT_EVENT_UI":
                case 3:
                    m.step = 3;
                    break;
                case "STEP_HANDLE_INPUT_EVENT_IMPL":
                case 5:
                    m.step = 5;
                    break;
                case "STEP_DID_HANDLE_INPUT_AND_OVERSCROLL":
                case 8:
                    m.step = 8;
                    break;
                case "STEP_HANDLE_INPUT_EVENT_MAIN":
                case 4:
                    m.step = 4;
                    break;
                case "STEP_MAIN_THREAD_SCROLL_UPDATE":
                case 2:
                    m.step = 2;
                    break;
                case "STEP_HANDLE_INPUT_EVENT_MAIN_COMMIT":
                case 1:
                    m.step = 1;
                    break;
                case "STEP_HANDLED_INPUT_EVENT_MAIN_OR_IMPL":
                case 9:
                    m.step = 9;
                    break;
                case "STEP_HANDLED_INPUT_EVENT_IMPL":
                case 10:
                    m.step = 10;
                    break;
                case "STEP_SWAP_BUFFERS":
                case 6:
                    m.step = 6;
                    break;
                case "STEP_DRAW_AND_SWAP":
                case 7:
                    m.step = 7;
                    break;
                case "STEP_FINISHED_SWAP_BUFFERS":
                case 11:
                    m.step = 11;
                    break;
                }
                if (d.frameTreeNodeId != null) {
                    m.frameTreeNodeId = d.frameTreeNodeId | 0;
                }
                if (d.componentInfo) {
                    if (!Array.isArray(d.componentInfo))
                        throw TypeError(".perfetto.protos.ChromeLatencyInfo.componentInfo: array expected");
                    m.componentInfo = [];
                    for (var i = 0; i < d.componentInfo.length; ++i) {
                        if (typeof d.componentInfo[i] !== "object")
                            throw TypeError(".perfetto.protos.ChromeLatencyInfo.componentInfo: object expected");
                        m.componentInfo[i] = $root.perfetto.protos.ChromeLatencyInfo.ComponentInfo.fromObject(d.componentInfo[i]);
                    }
                }
                if (d.isCoalesced != null) {
                    m.isCoalesced = Boolean(d.isCoalesced);
                }
                if (d.gestureScrollId != null) {
                    if ($util.Long)
                        (m.gestureScrollId = $util.Long.fromValue(d.gestureScrollId)).unsigned = false;
                    else if (typeof d.gestureScrollId === "string")
                        m.gestureScrollId = parseInt(d.gestureScrollId, 10);
                    else if (typeof d.gestureScrollId === "number")
                        m.gestureScrollId = d.gestureScrollId;
                    else if (typeof d.gestureScrollId === "object")
                        m.gestureScrollId = new $util.LongBits(d.gestureScrollId.low >>> 0, d.gestureScrollId.high >>> 0).toNumber();
                }
                if (d.touchId != null) {
                    if ($util.Long)
                        (m.touchId = $util.Long.fromValue(d.touchId)).unsigned = false;
                    else if (typeof d.touchId === "string")
                        m.touchId = parseInt(d.touchId, 10);
                    else if (typeof d.touchId === "number")
                        m.touchId = d.touchId;
                    else if (typeof d.touchId === "object")
                        m.touchId = new $util.LongBits(d.touchId.low >>> 0, d.touchId.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeLatencyInfo message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeLatencyInfo
             * @static
             * @param {perfetto.protos.ChromeLatencyInfo} m ChromeLatencyInfo
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeLatencyInfo.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.componentInfo = [];
                }
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.traceId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.traceId = o.longs === String ? "0" : 0;
                    d.step = o.enums === String ? "STEP_UNSPECIFIED" : 0;
                    d.frameTreeNodeId = 0;
                    d.isCoalesced = false;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.gestureScrollId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.gestureScrollId = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.touchId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.touchId = o.longs === String ? "0" : 0;
                }
                if (m.traceId != null && m.hasOwnProperty("traceId")) {
                    if (typeof m.traceId === "number")
                        d.traceId = o.longs === String ? String(m.traceId) : m.traceId;
                    else
                        d.traceId = o.longs === String ? $util.Long.prototype.toString.call(m.traceId) : o.longs === Number ? new $util.LongBits(m.traceId.low >>> 0, m.traceId.high >>> 0).toNumber() : m.traceId;
                }
                if (m.step != null && m.hasOwnProperty("step")) {
                    d.step = o.enums === String ? $root.perfetto.protos.ChromeLatencyInfo.Step[m.step] : m.step;
                }
                if (m.frameTreeNodeId != null && m.hasOwnProperty("frameTreeNodeId")) {
                    d.frameTreeNodeId = m.frameTreeNodeId;
                }
                if (m.componentInfo && m.componentInfo.length) {
                    d.componentInfo = [];
                    for (var j = 0; j < m.componentInfo.length; ++j) {
                        d.componentInfo[j] = $root.perfetto.protos.ChromeLatencyInfo.ComponentInfo.toObject(m.componentInfo[j], o);
                    }
                }
                if (m.isCoalesced != null && m.hasOwnProperty("isCoalesced")) {
                    d.isCoalesced = m.isCoalesced;
                }
                if (m.gestureScrollId != null && m.hasOwnProperty("gestureScrollId")) {
                    if (typeof m.gestureScrollId === "number")
                        d.gestureScrollId = o.longs === String ? String(m.gestureScrollId) : m.gestureScrollId;
                    else
                        d.gestureScrollId = o.longs === String ? $util.Long.prototype.toString.call(m.gestureScrollId) : o.longs === Number ? new $util.LongBits(m.gestureScrollId.low >>> 0, m.gestureScrollId.high >>> 0).toNumber() : m.gestureScrollId;
                }
                if (m.touchId != null && m.hasOwnProperty("touchId")) {
                    if (typeof m.touchId === "number")
                        d.touchId = o.longs === String ? String(m.touchId) : m.touchId;
                    else
                        d.touchId = o.longs === String ? $util.Long.prototype.toString.call(m.touchId) : o.longs === Number ? new $util.LongBits(m.touchId.low >>> 0, m.touchId.high >>> 0).toNumber() : m.touchId;
                }
                return d;
            };

            /**
             * Converts this ChromeLatencyInfo to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeLatencyInfo
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeLatencyInfo.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * Step enum.
             * @name perfetto.protos.ChromeLatencyInfo.Step
             * @enum {number}
             * @property {number} STEP_UNSPECIFIED=0 STEP_UNSPECIFIED value
             * @property {number} STEP_SEND_INPUT_EVENT_UI=3 STEP_SEND_INPUT_EVENT_UI value
             * @property {number} STEP_HANDLE_INPUT_EVENT_IMPL=5 STEP_HANDLE_INPUT_EVENT_IMPL value
             * @property {number} STEP_DID_HANDLE_INPUT_AND_OVERSCROLL=8 STEP_DID_HANDLE_INPUT_AND_OVERSCROLL value
             * @property {number} STEP_HANDLE_INPUT_EVENT_MAIN=4 STEP_HANDLE_INPUT_EVENT_MAIN value
             * @property {number} STEP_MAIN_THREAD_SCROLL_UPDATE=2 STEP_MAIN_THREAD_SCROLL_UPDATE value
             * @property {number} STEP_HANDLE_INPUT_EVENT_MAIN_COMMIT=1 STEP_HANDLE_INPUT_EVENT_MAIN_COMMIT value
             * @property {number} STEP_HANDLED_INPUT_EVENT_MAIN_OR_IMPL=9 STEP_HANDLED_INPUT_EVENT_MAIN_OR_IMPL value
             * @property {number} STEP_HANDLED_INPUT_EVENT_IMPL=10 STEP_HANDLED_INPUT_EVENT_IMPL value
             * @property {number} STEP_SWAP_BUFFERS=6 STEP_SWAP_BUFFERS value
             * @property {number} STEP_DRAW_AND_SWAP=7 STEP_DRAW_AND_SWAP value
             * @property {number} STEP_FINISHED_SWAP_BUFFERS=11 STEP_FINISHED_SWAP_BUFFERS value
             */
            ChromeLatencyInfo.Step = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "STEP_UNSPECIFIED"] = 0;
                values[valuesById[3] = "STEP_SEND_INPUT_EVENT_UI"] = 3;
                values[valuesById[5] = "STEP_HANDLE_INPUT_EVENT_IMPL"] = 5;
                values[valuesById[8] = "STEP_DID_HANDLE_INPUT_AND_OVERSCROLL"] = 8;
                values[valuesById[4] = "STEP_HANDLE_INPUT_EVENT_MAIN"] = 4;
                values[valuesById[2] = "STEP_MAIN_THREAD_SCROLL_UPDATE"] = 2;
                values[valuesById[1] = "STEP_HANDLE_INPUT_EVENT_MAIN_COMMIT"] = 1;
                values[valuesById[9] = "STEP_HANDLED_INPUT_EVENT_MAIN_OR_IMPL"] = 9;
                values[valuesById[10] = "STEP_HANDLED_INPUT_EVENT_IMPL"] = 10;
                values[valuesById[6] = "STEP_SWAP_BUFFERS"] = 6;
                values[valuesById[7] = "STEP_DRAW_AND_SWAP"] = 7;
                values[valuesById[11] = "STEP_FINISHED_SWAP_BUFFERS"] = 11;
                return values;
            })();

            /**
             * LatencyComponentType enum.
             * @name perfetto.protos.ChromeLatencyInfo.LatencyComponentType
             * @enum {number}
             * @property {number} COMPONENT_UNSPECIFIED=0 COMPONENT_UNSPECIFIED value
             * @property {number} COMPONENT_INPUT_EVENT_LATENCY_BEGIN_RWH=1 COMPONENT_INPUT_EVENT_LATENCY_BEGIN_RWH value
             * @property {number} COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL=2 COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL value
             * @property {number} COMPONENT_INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL=3 COMPONENT_INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL value
             * @property {number} COMPONENT_INPUT_EVENT_LATENCY_ORIGINAL=4 COMPONENT_INPUT_EVENT_LATENCY_ORIGINAL value
             * @property {number} COMPONENT_INPUT_EVENT_LATENCY_UI=5 COMPONENT_INPUT_EVENT_LATENCY_UI value
             * @property {number} COMPONENT_INPUT_EVENT_LATENCY_RENDERER_MAIN=6 COMPONENT_INPUT_EVENT_LATENCY_RENDERER_MAIN value
             * @property {number} COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN=7 COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN value
             * @property {number} COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_IMPL=8 COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_IMPL value
             * @property {number} COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_LAST_EVENT=9 COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_LAST_EVENT value
             * @property {number} COMPONENT_INPUT_EVENT_LATENCY_ACK_RWH=10 COMPONENT_INPUT_EVENT_LATENCY_ACK_RWH value
             * @property {number} COMPONENT_INPUT_EVENT_LATENCY_RENDERER_SWAP=11 COMPONENT_INPUT_EVENT_LATENCY_RENDERER_SWAP value
             * @property {number} COMPONENT_DISPLAY_COMPOSITOR_RECEIVED_FRAME=12 COMPONENT_DISPLAY_COMPOSITOR_RECEIVED_FRAME value
             * @property {number} COMPONENT_INPUT_EVENT_GPU_SWAP_BUFFER=13 COMPONENT_INPUT_EVENT_GPU_SWAP_BUFFER value
             * @property {number} COMPONENT_INPUT_EVENT_LATENCY_FRAME_SWAP=14 COMPONENT_INPUT_EVENT_LATENCY_FRAME_SWAP value
             */
            ChromeLatencyInfo.LatencyComponentType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "COMPONENT_UNSPECIFIED"] = 0;
                values[valuesById[1] = "COMPONENT_INPUT_EVENT_LATENCY_BEGIN_RWH"] = 1;
                values[valuesById[2] = "COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL"] = 2;
                values[valuesById[3] = "COMPONENT_INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL"] = 3;
                values[valuesById[4] = "COMPONENT_INPUT_EVENT_LATENCY_ORIGINAL"] = 4;
                values[valuesById[5] = "COMPONENT_INPUT_EVENT_LATENCY_UI"] = 5;
                values[valuesById[6] = "COMPONENT_INPUT_EVENT_LATENCY_RENDERER_MAIN"] = 6;
                values[valuesById[7] = "COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN"] = 7;
                values[valuesById[8] = "COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_IMPL"] = 8;
                values[valuesById[9] = "COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_LAST_EVENT"] = 9;
                values[valuesById[10] = "COMPONENT_INPUT_EVENT_LATENCY_ACK_RWH"] = 10;
                values[valuesById[11] = "COMPONENT_INPUT_EVENT_LATENCY_RENDERER_SWAP"] = 11;
                values[valuesById[12] = "COMPONENT_DISPLAY_COMPOSITOR_RECEIVED_FRAME"] = 12;
                values[valuesById[13] = "COMPONENT_INPUT_EVENT_GPU_SWAP_BUFFER"] = 13;
                values[valuesById[14] = "COMPONENT_INPUT_EVENT_LATENCY_FRAME_SWAP"] = 14;
                return values;
            })();

            ChromeLatencyInfo.ComponentInfo = (function() {

                /**
                 * Properties of a ComponentInfo.
                 * @memberof perfetto.protos.ChromeLatencyInfo
                 * @interface IComponentInfo
                 * @property {perfetto.protos.ChromeLatencyInfo.LatencyComponentType|null} [componentType] ComponentInfo componentType
                 * @property {number|null} [timeUs] ComponentInfo timeUs
                 */

                /**
                 * Constructs a new ComponentInfo.
                 * @memberof perfetto.protos.ChromeLatencyInfo
                 * @classdesc Represents a ComponentInfo.
                 * @implements IComponentInfo
                 * @constructor
                 * @param {perfetto.protos.ChromeLatencyInfo.IComponentInfo=} [p] Properties to set
                 */
                function ComponentInfo(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * ComponentInfo componentType.
                 * @member {perfetto.protos.ChromeLatencyInfo.LatencyComponentType} componentType
                 * @memberof perfetto.protos.ChromeLatencyInfo.ComponentInfo
                 * @instance
                 */
                ComponentInfo.prototype.componentType = 0;

                /**
                 * ComponentInfo timeUs.
                 * @member {number} timeUs
                 * @memberof perfetto.protos.ChromeLatencyInfo.ComponentInfo
                 * @instance
                 */
                ComponentInfo.prototype.timeUs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Creates a new ComponentInfo instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.ChromeLatencyInfo.ComponentInfo
                 * @static
                 * @param {perfetto.protos.ChromeLatencyInfo.IComponentInfo=} [properties] Properties to set
                 * @returns {perfetto.protos.ChromeLatencyInfo.ComponentInfo} ComponentInfo instance
                 */
                ComponentInfo.create = function create(properties) {
                    return new ComponentInfo(properties);
                };

                /**
                 * Encodes the specified ComponentInfo message. Does not implicitly {@link perfetto.protos.ChromeLatencyInfo.ComponentInfo.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.ChromeLatencyInfo.ComponentInfo
                 * @static
                 * @param {perfetto.protos.ChromeLatencyInfo.IComponentInfo} m ComponentInfo message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ComponentInfo.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.componentType != null && Object.hasOwnProperty.call(m, "componentType"))
                        w.uint32(8).int32(m.componentType);
                    if (m.timeUs != null && Object.hasOwnProperty.call(m, "timeUs"))
                        w.uint32(16).uint64(m.timeUs);
                    return w;
                };

                /**
                 * Encodes the specified ComponentInfo message, length delimited. Does not implicitly {@link perfetto.protos.ChromeLatencyInfo.ComponentInfo.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.ChromeLatencyInfo.ComponentInfo
                 * @static
                 * @param {perfetto.protos.ChromeLatencyInfo.IComponentInfo} message ComponentInfo message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ComponentInfo.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a ComponentInfo message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.ChromeLatencyInfo.ComponentInfo
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.ChromeLatencyInfo.ComponentInfo} ComponentInfo
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ComponentInfo.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeLatencyInfo.ComponentInfo();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.componentType = r.int32();
                            break;
                        case 2:
                            m.timeUs = r.uint64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a ComponentInfo message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.ChromeLatencyInfo.ComponentInfo
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.ChromeLatencyInfo.ComponentInfo} ComponentInfo
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ComponentInfo.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a ComponentInfo message.
                 * @function verify
                 * @memberof perfetto.protos.ChromeLatencyInfo.ComponentInfo
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ComponentInfo.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.componentType != null && m.hasOwnProperty("componentType")) {
                        switch (m.componentType) {
                        default:
                            return "componentType: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                        case 6:
                        case 7:
                        case 8:
                        case 9:
                        case 10:
                        case 11:
                        case 12:
                        case 13:
                        case 14:
                            break;
                        }
                    }
                    if (m.timeUs != null && m.hasOwnProperty("timeUs")) {
                        if (!$util.isInteger(m.timeUs) && !(m.timeUs && $util.isInteger(m.timeUs.low) && $util.isInteger(m.timeUs.high)))
                            return "timeUs: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a ComponentInfo message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.ChromeLatencyInfo.ComponentInfo
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.ChromeLatencyInfo.ComponentInfo} ComponentInfo
                 */
                ComponentInfo.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.ChromeLatencyInfo.ComponentInfo)
                        return d;
                    var m = new $root.perfetto.protos.ChromeLatencyInfo.ComponentInfo();
                    switch (d.componentType) {
                    case "COMPONENT_UNSPECIFIED":
                    case 0:
                        m.componentType = 0;
                        break;
                    case "COMPONENT_INPUT_EVENT_LATENCY_BEGIN_RWH":
                    case 1:
                        m.componentType = 1;
                        break;
                    case "COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL":
                    case 2:
                        m.componentType = 2;
                        break;
                    case "COMPONENT_INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL":
                    case 3:
                        m.componentType = 3;
                        break;
                    case "COMPONENT_INPUT_EVENT_LATENCY_ORIGINAL":
                    case 4:
                        m.componentType = 4;
                        break;
                    case "COMPONENT_INPUT_EVENT_LATENCY_UI":
                    case 5:
                        m.componentType = 5;
                        break;
                    case "COMPONENT_INPUT_EVENT_LATENCY_RENDERER_MAIN":
                    case 6:
                        m.componentType = 6;
                        break;
                    case "COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN":
                    case 7:
                        m.componentType = 7;
                        break;
                    case "COMPONENT_INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_IMPL":
                    case 8:
                        m.componentType = 8;
                        break;
                    case "COMPONENT_INPUT_EVENT_LATENCY_SCROLL_UPDATE_LAST_EVENT":
                    case 9:
                        m.componentType = 9;
                        break;
                    case "COMPONENT_INPUT_EVENT_LATENCY_ACK_RWH":
                    case 10:
                        m.componentType = 10;
                        break;
                    case "COMPONENT_INPUT_EVENT_LATENCY_RENDERER_SWAP":
                    case 11:
                        m.componentType = 11;
                        break;
                    case "COMPONENT_DISPLAY_COMPOSITOR_RECEIVED_FRAME":
                    case 12:
                        m.componentType = 12;
                        break;
                    case "COMPONENT_INPUT_EVENT_GPU_SWAP_BUFFER":
                    case 13:
                        m.componentType = 13;
                        break;
                    case "COMPONENT_INPUT_EVENT_LATENCY_FRAME_SWAP":
                    case 14:
                        m.componentType = 14;
                        break;
                    }
                    if (d.timeUs != null) {
                        if ($util.Long)
                            (m.timeUs = $util.Long.fromValue(d.timeUs)).unsigned = true;
                        else if (typeof d.timeUs === "string")
                            m.timeUs = parseInt(d.timeUs, 10);
                        else if (typeof d.timeUs === "number")
                            m.timeUs = d.timeUs;
                        else if (typeof d.timeUs === "object")
                            m.timeUs = new $util.LongBits(d.timeUs.low >>> 0, d.timeUs.high >>> 0).toNumber(true);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a ComponentInfo message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.ChromeLatencyInfo.ComponentInfo
                 * @static
                 * @param {perfetto.protos.ChromeLatencyInfo.ComponentInfo} m ComponentInfo
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ComponentInfo.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.componentType = o.enums === String ? "COMPONENT_UNSPECIFIED" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.timeUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.timeUs = o.longs === String ? "0" : 0;
                    }
                    if (m.componentType != null && m.hasOwnProperty("componentType")) {
                        d.componentType = o.enums === String ? $root.perfetto.protos.ChromeLatencyInfo.LatencyComponentType[m.componentType] : m.componentType;
                    }
                    if (m.timeUs != null && m.hasOwnProperty("timeUs")) {
                        if (typeof m.timeUs === "number")
                            d.timeUs = o.longs === String ? String(m.timeUs) : m.timeUs;
                        else
                            d.timeUs = o.longs === String ? $util.Long.prototype.toString.call(m.timeUs) : o.longs === Number ? new $util.LongBits(m.timeUs.low >>> 0, m.timeUs.high >>> 0).toNumber(true) : m.timeUs;
                    }
                    return d;
                };

                /**
                 * Converts this ComponentInfo to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.ChromeLatencyInfo.ComponentInfo
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ComponentInfo.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return ComponentInfo;
            })();

            return ChromeLatencyInfo;
        })();

        protos.ChromeLegacyIpc = (function() {

            /**
             * Properties of a ChromeLegacyIpc.
             * @memberof perfetto.protos
             * @interface IChromeLegacyIpc
             * @property {perfetto.protos.ChromeLegacyIpc.MessageClass|null} [messageClass] ChromeLegacyIpc messageClass
             * @property {number|null} [messageLine] ChromeLegacyIpc messageLine
             */

            /**
             * Constructs a new ChromeLegacyIpc.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeLegacyIpc.
             * @implements IChromeLegacyIpc
             * @constructor
             * @param {perfetto.protos.IChromeLegacyIpc=} [p] Properties to set
             */
            function ChromeLegacyIpc(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeLegacyIpc messageClass.
             * @member {perfetto.protos.ChromeLegacyIpc.MessageClass} messageClass
             * @memberof perfetto.protos.ChromeLegacyIpc
             * @instance
             */
            ChromeLegacyIpc.prototype.messageClass = 0;

            /**
             * ChromeLegacyIpc messageLine.
             * @member {number} messageLine
             * @memberof perfetto.protos.ChromeLegacyIpc
             * @instance
             */
            ChromeLegacyIpc.prototype.messageLine = 0;

            /**
             * Creates a new ChromeLegacyIpc instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeLegacyIpc
             * @static
             * @param {perfetto.protos.IChromeLegacyIpc=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeLegacyIpc} ChromeLegacyIpc instance
             */
            ChromeLegacyIpc.create = function create(properties) {
                return new ChromeLegacyIpc(properties);
            };

            /**
             * Encodes the specified ChromeLegacyIpc message. Does not implicitly {@link perfetto.protos.ChromeLegacyIpc.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeLegacyIpc
             * @static
             * @param {perfetto.protos.IChromeLegacyIpc} m ChromeLegacyIpc message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeLegacyIpc.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.messageClass != null && Object.hasOwnProperty.call(m, "messageClass"))
                    w.uint32(8).int32(m.messageClass);
                if (m.messageLine != null && Object.hasOwnProperty.call(m, "messageLine"))
                    w.uint32(16).uint32(m.messageLine);
                return w;
            };

            /**
             * Encodes the specified ChromeLegacyIpc message, length delimited. Does not implicitly {@link perfetto.protos.ChromeLegacyIpc.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeLegacyIpc
             * @static
             * @param {perfetto.protos.IChromeLegacyIpc} message ChromeLegacyIpc message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeLegacyIpc.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeLegacyIpc message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeLegacyIpc
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeLegacyIpc} ChromeLegacyIpc
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeLegacyIpc.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeLegacyIpc();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.messageClass = r.int32();
                        break;
                    case 2:
                        m.messageLine = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeLegacyIpc message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeLegacyIpc
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeLegacyIpc} ChromeLegacyIpc
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeLegacyIpc.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeLegacyIpc message.
             * @function verify
             * @memberof perfetto.protos.ChromeLegacyIpc
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeLegacyIpc.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.messageClass != null && m.hasOwnProperty("messageClass")) {
                    switch (m.messageClass) {
                    default:
                        return "messageClass: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                    case 6:
                    case 7:
                    case 8:
                    case 9:
                    case 10:
                    case 11:
                    case 12:
                    case 13:
                    case 14:
                    case 15:
                    case 16:
                    case 17:
                    case 18:
                    case 19:
                    case 20:
                    case 21:
                    case 22:
                    case 23:
                    case 24:
                    case 25:
                    case 26:
                    case 27:
                    case 28:
                    case 29:
                    case 30:
                    case 31:
                    case 32:
                    case 33:
                    case 34:
                    case 35:
                    case 36:
                    case 37:
                        break;
                    }
                }
                if (m.messageLine != null && m.hasOwnProperty("messageLine")) {
                    if (!$util.isInteger(m.messageLine))
                        return "messageLine: integer expected";
                }
                return null;
            };

            /**
             * Creates a ChromeLegacyIpc message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeLegacyIpc
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeLegacyIpc} ChromeLegacyIpc
             */
            ChromeLegacyIpc.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeLegacyIpc)
                    return d;
                var m = new $root.perfetto.protos.ChromeLegacyIpc();
                switch (d.messageClass) {
                case "CLASS_UNSPECIFIED":
                case 0:
                    m.messageClass = 0;
                    break;
                case "CLASS_AUTOMATION":
                case 1:
                    m.messageClass = 1;
                    break;
                case "CLASS_FRAME":
                case 2:
                    m.messageClass = 2;
                    break;
                case "CLASS_PAGE":
                case 3:
                    m.messageClass = 3;
                    break;
                case "CLASS_VIEW":
                case 4:
                    m.messageClass = 4;
                    break;
                case "CLASS_WIDGET":
                case 5:
                    m.messageClass = 5;
                    break;
                case "CLASS_INPUT":
                case 6:
                    m.messageClass = 6;
                    break;
                case "CLASS_TEST":
                case 7:
                    m.messageClass = 7;
                    break;
                case "CLASS_WORKER":
                case 8:
                    m.messageClass = 8;
                    break;
                case "CLASS_NACL":
                case 9:
                    m.messageClass = 9;
                    break;
                case "CLASS_GPU_CHANNEL":
                case 10:
                    m.messageClass = 10;
                    break;
                case "CLASS_MEDIA":
                case 11:
                    m.messageClass = 11;
                    break;
                case "CLASS_PPAPI":
                case 12:
                    m.messageClass = 12;
                    break;
                case "CLASS_CHROME":
                case 13:
                    m.messageClass = 13;
                    break;
                case "CLASS_DRAG":
                case 14:
                    m.messageClass = 14;
                    break;
                case "CLASS_PRINT":
                case 15:
                    m.messageClass = 15;
                    break;
                case "CLASS_EXTENSION":
                case 16:
                    m.messageClass = 16;
                    break;
                case "CLASS_TEXT_INPUT_CLIENT":
                case 17:
                    m.messageClass = 17;
                    break;
                case "CLASS_BLINK_TEST":
                case 18:
                    m.messageClass = 18;
                    break;
                case "CLASS_ACCESSIBILITY":
                case 19:
                    m.messageClass = 19;
                    break;
                case "CLASS_PRERENDER":
                case 20:
                    m.messageClass = 20;
                    break;
                case "CLASS_CHROMOTING":
                case 21:
                    m.messageClass = 21;
                    break;
                case "CLASS_BROWSER_PLUGIN":
                case 22:
                    m.messageClass = 22;
                    break;
                case "CLASS_ANDROID_WEB_VIEW":
                case 23:
                    m.messageClass = 23;
                    break;
                case "CLASS_NACL_HOST":
                case 24:
                    m.messageClass = 24;
                    break;
                case "CLASS_ENCRYPTED_MEDIA":
                case 25:
                    m.messageClass = 25;
                    break;
                case "CLASS_CAST":
                case 26:
                    m.messageClass = 26;
                    break;
                case "CLASS_GIN_JAVA_BRIDGE":
                case 27:
                    m.messageClass = 27;
                    break;
                case "CLASS_CHROME_UTILITY_PRINTING":
                case 28:
                    m.messageClass = 28;
                    break;
                case "CLASS_OZONE_GPU":
                case 29:
                    m.messageClass = 29;
                    break;
                case "CLASS_WEB_TEST":
                case 30:
                    m.messageClass = 30;
                    break;
                case "CLASS_NETWORK_HINTS":
                case 31:
                    m.messageClass = 31;
                    break;
                case "CLASS_EXTENSIONS_GUEST_VIEW":
                case 32:
                    m.messageClass = 32;
                    break;
                case "CLASS_GUEST_VIEW":
                case 33:
                    m.messageClass = 33;
                    break;
                case "CLASS_MEDIA_PLAYER_DELEGATE":
                case 34:
                    m.messageClass = 34;
                    break;
                case "CLASS_EXTENSION_WORKER":
                case 35:
                    m.messageClass = 35;
                    break;
                case "CLASS_SUBRESOURCE_FILTER":
                case 36:
                    m.messageClass = 36;
                    break;
                case "CLASS_UNFREEZABLE_FRAME":
                case 37:
                    m.messageClass = 37;
                    break;
                }
                if (d.messageLine != null) {
                    m.messageLine = d.messageLine >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeLegacyIpc message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeLegacyIpc
             * @static
             * @param {perfetto.protos.ChromeLegacyIpc} m ChromeLegacyIpc
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeLegacyIpc.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.messageClass = o.enums === String ? "CLASS_UNSPECIFIED" : 0;
                    d.messageLine = 0;
                }
                if (m.messageClass != null && m.hasOwnProperty("messageClass")) {
                    d.messageClass = o.enums === String ? $root.perfetto.protos.ChromeLegacyIpc.MessageClass[m.messageClass] : m.messageClass;
                }
                if (m.messageLine != null && m.hasOwnProperty("messageLine")) {
                    d.messageLine = m.messageLine;
                }
                return d;
            };

            /**
             * Converts this ChromeLegacyIpc to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeLegacyIpc
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeLegacyIpc.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * MessageClass enum.
             * @name perfetto.protos.ChromeLegacyIpc.MessageClass
             * @enum {number}
             * @property {number} CLASS_UNSPECIFIED=0 CLASS_UNSPECIFIED value
             * @property {number} CLASS_AUTOMATION=1 CLASS_AUTOMATION value
             * @property {number} CLASS_FRAME=2 CLASS_FRAME value
             * @property {number} CLASS_PAGE=3 CLASS_PAGE value
             * @property {number} CLASS_VIEW=4 CLASS_VIEW value
             * @property {number} CLASS_WIDGET=5 CLASS_WIDGET value
             * @property {number} CLASS_INPUT=6 CLASS_INPUT value
             * @property {number} CLASS_TEST=7 CLASS_TEST value
             * @property {number} CLASS_WORKER=8 CLASS_WORKER value
             * @property {number} CLASS_NACL=9 CLASS_NACL value
             * @property {number} CLASS_GPU_CHANNEL=10 CLASS_GPU_CHANNEL value
             * @property {number} CLASS_MEDIA=11 CLASS_MEDIA value
             * @property {number} CLASS_PPAPI=12 CLASS_PPAPI value
             * @property {number} CLASS_CHROME=13 CLASS_CHROME value
             * @property {number} CLASS_DRAG=14 CLASS_DRAG value
             * @property {number} CLASS_PRINT=15 CLASS_PRINT value
             * @property {number} CLASS_EXTENSION=16 CLASS_EXTENSION value
             * @property {number} CLASS_TEXT_INPUT_CLIENT=17 CLASS_TEXT_INPUT_CLIENT value
             * @property {number} CLASS_BLINK_TEST=18 CLASS_BLINK_TEST value
             * @property {number} CLASS_ACCESSIBILITY=19 CLASS_ACCESSIBILITY value
             * @property {number} CLASS_PRERENDER=20 CLASS_PRERENDER value
             * @property {number} CLASS_CHROMOTING=21 CLASS_CHROMOTING value
             * @property {number} CLASS_BROWSER_PLUGIN=22 CLASS_BROWSER_PLUGIN value
             * @property {number} CLASS_ANDROID_WEB_VIEW=23 CLASS_ANDROID_WEB_VIEW value
             * @property {number} CLASS_NACL_HOST=24 CLASS_NACL_HOST value
             * @property {number} CLASS_ENCRYPTED_MEDIA=25 CLASS_ENCRYPTED_MEDIA value
             * @property {number} CLASS_CAST=26 CLASS_CAST value
             * @property {number} CLASS_GIN_JAVA_BRIDGE=27 CLASS_GIN_JAVA_BRIDGE value
             * @property {number} CLASS_CHROME_UTILITY_PRINTING=28 CLASS_CHROME_UTILITY_PRINTING value
             * @property {number} CLASS_OZONE_GPU=29 CLASS_OZONE_GPU value
             * @property {number} CLASS_WEB_TEST=30 CLASS_WEB_TEST value
             * @property {number} CLASS_NETWORK_HINTS=31 CLASS_NETWORK_HINTS value
             * @property {number} CLASS_EXTENSIONS_GUEST_VIEW=32 CLASS_EXTENSIONS_GUEST_VIEW value
             * @property {number} CLASS_GUEST_VIEW=33 CLASS_GUEST_VIEW value
             * @property {number} CLASS_MEDIA_PLAYER_DELEGATE=34 CLASS_MEDIA_PLAYER_DELEGATE value
             * @property {number} CLASS_EXTENSION_WORKER=35 CLASS_EXTENSION_WORKER value
             * @property {number} CLASS_SUBRESOURCE_FILTER=36 CLASS_SUBRESOURCE_FILTER value
             * @property {number} CLASS_UNFREEZABLE_FRAME=37 CLASS_UNFREEZABLE_FRAME value
             */
            ChromeLegacyIpc.MessageClass = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "CLASS_UNSPECIFIED"] = 0;
                values[valuesById[1] = "CLASS_AUTOMATION"] = 1;
                values[valuesById[2] = "CLASS_FRAME"] = 2;
                values[valuesById[3] = "CLASS_PAGE"] = 3;
                values[valuesById[4] = "CLASS_VIEW"] = 4;
                values[valuesById[5] = "CLASS_WIDGET"] = 5;
                values[valuesById[6] = "CLASS_INPUT"] = 6;
                values[valuesById[7] = "CLASS_TEST"] = 7;
                values[valuesById[8] = "CLASS_WORKER"] = 8;
                values[valuesById[9] = "CLASS_NACL"] = 9;
                values[valuesById[10] = "CLASS_GPU_CHANNEL"] = 10;
                values[valuesById[11] = "CLASS_MEDIA"] = 11;
                values[valuesById[12] = "CLASS_PPAPI"] = 12;
                values[valuesById[13] = "CLASS_CHROME"] = 13;
                values[valuesById[14] = "CLASS_DRAG"] = 14;
                values[valuesById[15] = "CLASS_PRINT"] = 15;
                values[valuesById[16] = "CLASS_EXTENSION"] = 16;
                values[valuesById[17] = "CLASS_TEXT_INPUT_CLIENT"] = 17;
                values[valuesById[18] = "CLASS_BLINK_TEST"] = 18;
                values[valuesById[19] = "CLASS_ACCESSIBILITY"] = 19;
                values[valuesById[20] = "CLASS_PRERENDER"] = 20;
                values[valuesById[21] = "CLASS_CHROMOTING"] = 21;
                values[valuesById[22] = "CLASS_BROWSER_PLUGIN"] = 22;
                values[valuesById[23] = "CLASS_ANDROID_WEB_VIEW"] = 23;
                values[valuesById[24] = "CLASS_NACL_HOST"] = 24;
                values[valuesById[25] = "CLASS_ENCRYPTED_MEDIA"] = 25;
                values[valuesById[26] = "CLASS_CAST"] = 26;
                values[valuesById[27] = "CLASS_GIN_JAVA_BRIDGE"] = 27;
                values[valuesById[28] = "CLASS_CHROME_UTILITY_PRINTING"] = 28;
                values[valuesById[29] = "CLASS_OZONE_GPU"] = 29;
                values[valuesById[30] = "CLASS_WEB_TEST"] = 30;
                values[valuesById[31] = "CLASS_NETWORK_HINTS"] = 31;
                values[valuesById[32] = "CLASS_EXTENSIONS_GUEST_VIEW"] = 32;
                values[valuesById[33] = "CLASS_GUEST_VIEW"] = 33;
                values[valuesById[34] = "CLASS_MEDIA_PLAYER_DELEGATE"] = 34;
                values[valuesById[35] = "CLASS_EXTENSION_WORKER"] = 35;
                values[valuesById[36] = "CLASS_SUBRESOURCE_FILTER"] = 36;
                values[valuesById[37] = "CLASS_UNFREEZABLE_FRAME"] = 37;
                return values;
            })();

            return ChromeLegacyIpc;
        })();

        protos.ChromeMessagePump = (function() {

            /**
             * Properties of a ChromeMessagePump.
             * @memberof perfetto.protos
             * @interface IChromeMessagePump
             * @property {boolean|null} [sentMessagesInQueue] ChromeMessagePump sentMessagesInQueue
             * @property {number|null} [ioHandlerLocationIid] ChromeMessagePump ioHandlerLocationIid
             */

            /**
             * Constructs a new ChromeMessagePump.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeMessagePump.
             * @implements IChromeMessagePump
             * @constructor
             * @param {perfetto.protos.IChromeMessagePump=} [p] Properties to set
             */
            function ChromeMessagePump(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeMessagePump sentMessagesInQueue.
             * @member {boolean} sentMessagesInQueue
             * @memberof perfetto.protos.ChromeMessagePump
             * @instance
             */
            ChromeMessagePump.prototype.sentMessagesInQueue = false;

            /**
             * ChromeMessagePump ioHandlerLocationIid.
             * @member {number} ioHandlerLocationIid
             * @memberof perfetto.protos.ChromeMessagePump
             * @instance
             */
            ChromeMessagePump.prototype.ioHandlerLocationIid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new ChromeMessagePump instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeMessagePump
             * @static
             * @param {perfetto.protos.IChromeMessagePump=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeMessagePump} ChromeMessagePump instance
             */
            ChromeMessagePump.create = function create(properties) {
                return new ChromeMessagePump(properties);
            };

            /**
             * Encodes the specified ChromeMessagePump message. Does not implicitly {@link perfetto.protos.ChromeMessagePump.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeMessagePump
             * @static
             * @param {perfetto.protos.IChromeMessagePump} m ChromeMessagePump message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeMessagePump.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.sentMessagesInQueue != null && Object.hasOwnProperty.call(m, "sentMessagesInQueue"))
                    w.uint32(8).bool(m.sentMessagesInQueue);
                if (m.ioHandlerLocationIid != null && Object.hasOwnProperty.call(m, "ioHandlerLocationIid"))
                    w.uint32(16).uint64(m.ioHandlerLocationIid);
                return w;
            };

            /**
             * Encodes the specified ChromeMessagePump message, length delimited. Does not implicitly {@link perfetto.protos.ChromeMessagePump.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeMessagePump
             * @static
             * @param {perfetto.protos.IChromeMessagePump} message ChromeMessagePump message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeMessagePump.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeMessagePump message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeMessagePump
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeMessagePump} ChromeMessagePump
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeMessagePump.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeMessagePump();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.sentMessagesInQueue = r.bool();
                        break;
                    case 2:
                        m.ioHandlerLocationIid = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeMessagePump message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeMessagePump
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeMessagePump} ChromeMessagePump
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeMessagePump.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeMessagePump message.
             * @function verify
             * @memberof perfetto.protos.ChromeMessagePump
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeMessagePump.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.sentMessagesInQueue != null && m.hasOwnProperty("sentMessagesInQueue")) {
                    if (typeof m.sentMessagesInQueue !== "boolean")
                        return "sentMessagesInQueue: boolean expected";
                }
                if (m.ioHandlerLocationIid != null && m.hasOwnProperty("ioHandlerLocationIid")) {
                    if (!$util.isInteger(m.ioHandlerLocationIid) && !(m.ioHandlerLocationIid && $util.isInteger(m.ioHandlerLocationIid.low) && $util.isInteger(m.ioHandlerLocationIid.high)))
                        return "ioHandlerLocationIid: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a ChromeMessagePump message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeMessagePump
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeMessagePump} ChromeMessagePump
             */
            ChromeMessagePump.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeMessagePump)
                    return d;
                var m = new $root.perfetto.protos.ChromeMessagePump();
                if (d.sentMessagesInQueue != null) {
                    m.sentMessagesInQueue = Boolean(d.sentMessagesInQueue);
                }
                if (d.ioHandlerLocationIid != null) {
                    if ($util.Long)
                        (m.ioHandlerLocationIid = $util.Long.fromValue(d.ioHandlerLocationIid)).unsigned = true;
                    else if (typeof d.ioHandlerLocationIid === "string")
                        m.ioHandlerLocationIid = parseInt(d.ioHandlerLocationIid, 10);
                    else if (typeof d.ioHandlerLocationIid === "number")
                        m.ioHandlerLocationIid = d.ioHandlerLocationIid;
                    else if (typeof d.ioHandlerLocationIid === "object")
                        m.ioHandlerLocationIid = new $util.LongBits(d.ioHandlerLocationIid.low >>> 0, d.ioHandlerLocationIid.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeMessagePump message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeMessagePump
             * @static
             * @param {perfetto.protos.ChromeMessagePump} m ChromeMessagePump
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeMessagePump.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.sentMessagesInQueue = false;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.ioHandlerLocationIid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.ioHandlerLocationIid = o.longs === String ? "0" : 0;
                }
                if (m.sentMessagesInQueue != null && m.hasOwnProperty("sentMessagesInQueue")) {
                    d.sentMessagesInQueue = m.sentMessagesInQueue;
                }
                if (m.ioHandlerLocationIid != null && m.hasOwnProperty("ioHandlerLocationIid")) {
                    if (typeof m.ioHandlerLocationIid === "number")
                        d.ioHandlerLocationIid = o.longs === String ? String(m.ioHandlerLocationIid) : m.ioHandlerLocationIid;
                    else
                        d.ioHandlerLocationIid = o.longs === String ? $util.Long.prototype.toString.call(m.ioHandlerLocationIid) : o.longs === Number ? new $util.LongBits(m.ioHandlerLocationIid.low >>> 0, m.ioHandlerLocationIid.high >>> 0).toNumber(true) : m.ioHandlerLocationIid;
                }
                return d;
            };

            /**
             * Converts this ChromeMessagePump to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeMessagePump
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeMessagePump.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ChromeMessagePump;
        })();

        protos.ChromeMojoEventInfo = (function() {

            /**
             * Properties of a ChromeMojoEventInfo.
             * @memberof perfetto.protos
             * @interface IChromeMojoEventInfo
             * @property {string|null} [watcherNotifyInterfaceTag] ChromeMojoEventInfo watcherNotifyInterfaceTag
             * @property {number|null} [ipcHash] ChromeMojoEventInfo ipcHash
             * @property {string|null} [mojoInterfaceTag] ChromeMojoEventInfo mojoInterfaceTag
             * @property {number|null} [mojoInterfaceMethodIid] ChromeMojoEventInfo mojoInterfaceMethodIid
             */

            /**
             * Constructs a new ChromeMojoEventInfo.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeMojoEventInfo.
             * @implements IChromeMojoEventInfo
             * @constructor
             * @param {perfetto.protos.IChromeMojoEventInfo=} [p] Properties to set
             */
            function ChromeMojoEventInfo(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeMojoEventInfo watcherNotifyInterfaceTag.
             * @member {string} watcherNotifyInterfaceTag
             * @memberof perfetto.protos.ChromeMojoEventInfo
             * @instance
             */
            ChromeMojoEventInfo.prototype.watcherNotifyInterfaceTag = "";

            /**
             * ChromeMojoEventInfo ipcHash.
             * @member {number} ipcHash
             * @memberof perfetto.protos.ChromeMojoEventInfo
             * @instance
             */
            ChromeMojoEventInfo.prototype.ipcHash = 0;

            /**
             * ChromeMojoEventInfo mojoInterfaceTag.
             * @member {string} mojoInterfaceTag
             * @memberof perfetto.protos.ChromeMojoEventInfo
             * @instance
             */
            ChromeMojoEventInfo.prototype.mojoInterfaceTag = "";

            /**
             * ChromeMojoEventInfo mojoInterfaceMethodIid.
             * @member {number} mojoInterfaceMethodIid
             * @memberof perfetto.protos.ChromeMojoEventInfo
             * @instance
             */
            ChromeMojoEventInfo.prototype.mojoInterfaceMethodIid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new ChromeMojoEventInfo instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeMojoEventInfo
             * @static
             * @param {perfetto.protos.IChromeMojoEventInfo=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeMojoEventInfo} ChromeMojoEventInfo instance
             */
            ChromeMojoEventInfo.create = function create(properties) {
                return new ChromeMojoEventInfo(properties);
            };

            /**
             * Encodes the specified ChromeMojoEventInfo message. Does not implicitly {@link perfetto.protos.ChromeMojoEventInfo.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeMojoEventInfo
             * @static
             * @param {perfetto.protos.IChromeMojoEventInfo} m ChromeMojoEventInfo message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeMojoEventInfo.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.watcherNotifyInterfaceTag != null && Object.hasOwnProperty.call(m, "watcherNotifyInterfaceTag"))
                    w.uint32(10).string(m.watcherNotifyInterfaceTag);
                if (m.ipcHash != null && Object.hasOwnProperty.call(m, "ipcHash"))
                    w.uint32(16).uint32(m.ipcHash);
                if (m.mojoInterfaceTag != null && Object.hasOwnProperty.call(m, "mojoInterfaceTag"))
                    w.uint32(26).string(m.mojoInterfaceTag);
                if (m.mojoInterfaceMethodIid != null && Object.hasOwnProperty.call(m, "mojoInterfaceMethodIid"))
                    w.uint32(32).uint64(m.mojoInterfaceMethodIid);
                return w;
            };

            /**
             * Encodes the specified ChromeMojoEventInfo message, length delimited. Does not implicitly {@link perfetto.protos.ChromeMojoEventInfo.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeMojoEventInfo
             * @static
             * @param {perfetto.protos.IChromeMojoEventInfo} message ChromeMojoEventInfo message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeMojoEventInfo.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeMojoEventInfo message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeMojoEventInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeMojoEventInfo} ChromeMojoEventInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeMojoEventInfo.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeMojoEventInfo();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.watcherNotifyInterfaceTag = r.string();
                        break;
                    case 2:
                        m.ipcHash = r.uint32();
                        break;
                    case 3:
                        m.mojoInterfaceTag = r.string();
                        break;
                    case 4:
                        m.mojoInterfaceMethodIid = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeMojoEventInfo message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeMojoEventInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeMojoEventInfo} ChromeMojoEventInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeMojoEventInfo.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeMojoEventInfo message.
             * @function verify
             * @memberof perfetto.protos.ChromeMojoEventInfo
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeMojoEventInfo.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.watcherNotifyInterfaceTag != null && m.hasOwnProperty("watcherNotifyInterfaceTag")) {
                    if (!$util.isString(m.watcherNotifyInterfaceTag))
                        return "watcherNotifyInterfaceTag: string expected";
                }
                if (m.ipcHash != null && m.hasOwnProperty("ipcHash")) {
                    if (!$util.isInteger(m.ipcHash))
                        return "ipcHash: integer expected";
                }
                if (m.mojoInterfaceTag != null && m.hasOwnProperty("mojoInterfaceTag")) {
                    if (!$util.isString(m.mojoInterfaceTag))
                        return "mojoInterfaceTag: string expected";
                }
                if (m.mojoInterfaceMethodIid != null && m.hasOwnProperty("mojoInterfaceMethodIid")) {
                    if (!$util.isInteger(m.mojoInterfaceMethodIid) && !(m.mojoInterfaceMethodIid && $util.isInteger(m.mojoInterfaceMethodIid.low) && $util.isInteger(m.mojoInterfaceMethodIid.high)))
                        return "mojoInterfaceMethodIid: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a ChromeMojoEventInfo message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeMojoEventInfo
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeMojoEventInfo} ChromeMojoEventInfo
             */
            ChromeMojoEventInfo.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeMojoEventInfo)
                    return d;
                var m = new $root.perfetto.protos.ChromeMojoEventInfo();
                if (d.watcherNotifyInterfaceTag != null) {
                    m.watcherNotifyInterfaceTag = String(d.watcherNotifyInterfaceTag);
                }
                if (d.ipcHash != null) {
                    m.ipcHash = d.ipcHash >>> 0;
                }
                if (d.mojoInterfaceTag != null) {
                    m.mojoInterfaceTag = String(d.mojoInterfaceTag);
                }
                if (d.mojoInterfaceMethodIid != null) {
                    if ($util.Long)
                        (m.mojoInterfaceMethodIid = $util.Long.fromValue(d.mojoInterfaceMethodIid)).unsigned = true;
                    else if (typeof d.mojoInterfaceMethodIid === "string")
                        m.mojoInterfaceMethodIid = parseInt(d.mojoInterfaceMethodIid, 10);
                    else if (typeof d.mojoInterfaceMethodIid === "number")
                        m.mojoInterfaceMethodIid = d.mojoInterfaceMethodIid;
                    else if (typeof d.mojoInterfaceMethodIid === "object")
                        m.mojoInterfaceMethodIid = new $util.LongBits(d.mojoInterfaceMethodIid.low >>> 0, d.mojoInterfaceMethodIid.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeMojoEventInfo message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeMojoEventInfo
             * @static
             * @param {perfetto.protos.ChromeMojoEventInfo} m ChromeMojoEventInfo
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeMojoEventInfo.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.watcherNotifyInterfaceTag = "";
                    d.ipcHash = 0;
                    d.mojoInterfaceTag = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.mojoInterfaceMethodIid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.mojoInterfaceMethodIid = o.longs === String ? "0" : 0;
                }
                if (m.watcherNotifyInterfaceTag != null && m.hasOwnProperty("watcherNotifyInterfaceTag")) {
                    d.watcherNotifyInterfaceTag = m.watcherNotifyInterfaceTag;
                }
                if (m.ipcHash != null && m.hasOwnProperty("ipcHash")) {
                    d.ipcHash = m.ipcHash;
                }
                if (m.mojoInterfaceTag != null && m.hasOwnProperty("mojoInterfaceTag")) {
                    d.mojoInterfaceTag = m.mojoInterfaceTag;
                }
                if (m.mojoInterfaceMethodIid != null && m.hasOwnProperty("mojoInterfaceMethodIid")) {
                    if (typeof m.mojoInterfaceMethodIid === "number")
                        d.mojoInterfaceMethodIid = o.longs === String ? String(m.mojoInterfaceMethodIid) : m.mojoInterfaceMethodIid;
                    else
                        d.mojoInterfaceMethodIid = o.longs === String ? $util.Long.prototype.toString.call(m.mojoInterfaceMethodIid) : o.longs === Number ? new $util.LongBits(m.mojoInterfaceMethodIid.low >>> 0, m.mojoInterfaceMethodIid.high >>> 0).toNumber(true) : m.mojoInterfaceMethodIid;
                }
                return d;
            };

            /**
             * Converts this ChromeMojoEventInfo to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeMojoEventInfo
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeMojoEventInfo.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ChromeMojoEventInfo;
        })();

        /**
         * ChromeRAILMode enum.
         * @name perfetto.protos.ChromeRAILMode
         * @enum {number}
         * @property {number} RAIL_MODE_NONE=0 RAIL_MODE_NONE value
         * @property {number} RAIL_MODE_RESPONSE=1 RAIL_MODE_RESPONSE value
         * @property {number} RAIL_MODE_ANIMATION=2 RAIL_MODE_ANIMATION value
         * @property {number} RAIL_MODE_IDLE=3 RAIL_MODE_IDLE value
         * @property {number} RAIL_MODE_LOAD=4 RAIL_MODE_LOAD value
         */
        protos.ChromeRAILMode = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[0] = "RAIL_MODE_NONE"] = 0;
            values[valuesById[1] = "RAIL_MODE_RESPONSE"] = 1;
            values[valuesById[2] = "RAIL_MODE_ANIMATION"] = 2;
            values[valuesById[3] = "RAIL_MODE_IDLE"] = 3;
            values[valuesById[4] = "RAIL_MODE_LOAD"] = 4;
            return values;
        })();

        protos.ChromeRendererSchedulerState = (function() {

            /**
             * Properties of a ChromeRendererSchedulerState.
             * @memberof perfetto.protos
             * @interface IChromeRendererSchedulerState
             * @property {perfetto.protos.ChromeRAILMode|null} [railMode] ChromeRendererSchedulerState railMode
             * @property {boolean|null} [isBackgrounded] ChromeRendererSchedulerState isBackgrounded
             * @property {boolean|null} [isHidden] ChromeRendererSchedulerState isHidden
             */

            /**
             * Constructs a new ChromeRendererSchedulerState.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeRendererSchedulerState.
             * @implements IChromeRendererSchedulerState
             * @constructor
             * @param {perfetto.protos.IChromeRendererSchedulerState=} [p] Properties to set
             */
            function ChromeRendererSchedulerState(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeRendererSchedulerState railMode.
             * @member {perfetto.protos.ChromeRAILMode} railMode
             * @memberof perfetto.protos.ChromeRendererSchedulerState
             * @instance
             */
            ChromeRendererSchedulerState.prototype.railMode = 0;

            /**
             * ChromeRendererSchedulerState isBackgrounded.
             * @member {boolean} isBackgrounded
             * @memberof perfetto.protos.ChromeRendererSchedulerState
             * @instance
             */
            ChromeRendererSchedulerState.prototype.isBackgrounded = false;

            /**
             * ChromeRendererSchedulerState isHidden.
             * @member {boolean} isHidden
             * @memberof perfetto.protos.ChromeRendererSchedulerState
             * @instance
             */
            ChromeRendererSchedulerState.prototype.isHidden = false;

            /**
             * Creates a new ChromeRendererSchedulerState instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeRendererSchedulerState
             * @static
             * @param {perfetto.protos.IChromeRendererSchedulerState=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeRendererSchedulerState} ChromeRendererSchedulerState instance
             */
            ChromeRendererSchedulerState.create = function create(properties) {
                return new ChromeRendererSchedulerState(properties);
            };

            /**
             * Encodes the specified ChromeRendererSchedulerState message. Does not implicitly {@link perfetto.protos.ChromeRendererSchedulerState.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeRendererSchedulerState
             * @static
             * @param {perfetto.protos.IChromeRendererSchedulerState} m ChromeRendererSchedulerState message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeRendererSchedulerState.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.railMode != null && Object.hasOwnProperty.call(m, "railMode"))
                    w.uint32(8).int32(m.railMode);
                if (m.isBackgrounded != null && Object.hasOwnProperty.call(m, "isBackgrounded"))
                    w.uint32(16).bool(m.isBackgrounded);
                if (m.isHidden != null && Object.hasOwnProperty.call(m, "isHidden"))
                    w.uint32(24).bool(m.isHidden);
                return w;
            };

            /**
             * Encodes the specified ChromeRendererSchedulerState message, length delimited. Does not implicitly {@link perfetto.protos.ChromeRendererSchedulerState.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeRendererSchedulerState
             * @static
             * @param {perfetto.protos.IChromeRendererSchedulerState} message ChromeRendererSchedulerState message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeRendererSchedulerState.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeRendererSchedulerState message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeRendererSchedulerState
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeRendererSchedulerState} ChromeRendererSchedulerState
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeRendererSchedulerState.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeRendererSchedulerState();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.railMode = r.int32();
                        break;
                    case 2:
                        m.isBackgrounded = r.bool();
                        break;
                    case 3:
                        m.isHidden = r.bool();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeRendererSchedulerState message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeRendererSchedulerState
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeRendererSchedulerState} ChromeRendererSchedulerState
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeRendererSchedulerState.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeRendererSchedulerState message.
             * @function verify
             * @memberof perfetto.protos.ChromeRendererSchedulerState
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeRendererSchedulerState.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.railMode != null && m.hasOwnProperty("railMode")) {
                    switch (m.railMode) {
                    default:
                        return "railMode: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                        break;
                    }
                }
                if (m.isBackgrounded != null && m.hasOwnProperty("isBackgrounded")) {
                    if (typeof m.isBackgrounded !== "boolean")
                        return "isBackgrounded: boolean expected";
                }
                if (m.isHidden != null && m.hasOwnProperty("isHidden")) {
                    if (typeof m.isHidden !== "boolean")
                        return "isHidden: boolean expected";
                }
                return null;
            };

            /**
             * Creates a ChromeRendererSchedulerState message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeRendererSchedulerState
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeRendererSchedulerState} ChromeRendererSchedulerState
             */
            ChromeRendererSchedulerState.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeRendererSchedulerState)
                    return d;
                var m = new $root.perfetto.protos.ChromeRendererSchedulerState();
                switch (d.railMode) {
                case "RAIL_MODE_NONE":
                case 0:
                    m.railMode = 0;
                    break;
                case "RAIL_MODE_RESPONSE":
                case 1:
                    m.railMode = 1;
                    break;
                case "RAIL_MODE_ANIMATION":
                case 2:
                    m.railMode = 2;
                    break;
                case "RAIL_MODE_IDLE":
                case 3:
                    m.railMode = 3;
                    break;
                case "RAIL_MODE_LOAD":
                case 4:
                    m.railMode = 4;
                    break;
                }
                if (d.isBackgrounded != null) {
                    m.isBackgrounded = Boolean(d.isBackgrounded);
                }
                if (d.isHidden != null) {
                    m.isHidden = Boolean(d.isHidden);
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeRendererSchedulerState message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeRendererSchedulerState
             * @static
             * @param {perfetto.protos.ChromeRendererSchedulerState} m ChromeRendererSchedulerState
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeRendererSchedulerState.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.railMode = o.enums === String ? "RAIL_MODE_NONE" : 0;
                    d.isBackgrounded = false;
                    d.isHidden = false;
                }
                if (m.railMode != null && m.hasOwnProperty("railMode")) {
                    d.railMode = o.enums === String ? $root.perfetto.protos.ChromeRAILMode[m.railMode] : m.railMode;
                }
                if (m.isBackgrounded != null && m.hasOwnProperty("isBackgrounded")) {
                    d.isBackgrounded = m.isBackgrounded;
                }
                if (m.isHidden != null && m.hasOwnProperty("isHidden")) {
                    d.isHidden = m.isHidden;
                }
                return d;
            };

            /**
             * Converts this ChromeRendererSchedulerState to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeRendererSchedulerState
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeRendererSchedulerState.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ChromeRendererSchedulerState;
        })();

        protos.ChromeUserEvent = (function() {

            /**
             * Properties of a ChromeUserEvent.
             * @memberof perfetto.protos
             * @interface IChromeUserEvent
             * @property {string|null} [action] ChromeUserEvent action
             * @property {number|null} [actionHash] ChromeUserEvent actionHash
             */

            /**
             * Constructs a new ChromeUserEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeUserEvent.
             * @implements IChromeUserEvent
             * @constructor
             * @param {perfetto.protos.IChromeUserEvent=} [p] Properties to set
             */
            function ChromeUserEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeUserEvent action.
             * @member {string} action
             * @memberof perfetto.protos.ChromeUserEvent
             * @instance
             */
            ChromeUserEvent.prototype.action = "";

            /**
             * ChromeUserEvent actionHash.
             * @member {number} actionHash
             * @memberof perfetto.protos.ChromeUserEvent
             * @instance
             */
            ChromeUserEvent.prototype.actionHash = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new ChromeUserEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeUserEvent
             * @static
             * @param {perfetto.protos.IChromeUserEvent=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeUserEvent} ChromeUserEvent instance
             */
            ChromeUserEvent.create = function create(properties) {
                return new ChromeUserEvent(properties);
            };

            /**
             * Encodes the specified ChromeUserEvent message. Does not implicitly {@link perfetto.protos.ChromeUserEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeUserEvent
             * @static
             * @param {perfetto.protos.IChromeUserEvent} m ChromeUserEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeUserEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.action != null && Object.hasOwnProperty.call(m, "action"))
                    w.uint32(10).string(m.action);
                if (m.actionHash != null && Object.hasOwnProperty.call(m, "actionHash"))
                    w.uint32(16).uint64(m.actionHash);
                return w;
            };

            /**
             * Encodes the specified ChromeUserEvent message, length delimited. Does not implicitly {@link perfetto.protos.ChromeUserEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeUserEvent
             * @static
             * @param {perfetto.protos.IChromeUserEvent} message ChromeUserEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeUserEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeUserEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeUserEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeUserEvent} ChromeUserEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeUserEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeUserEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.action = r.string();
                        break;
                    case 2:
                        m.actionHash = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeUserEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeUserEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeUserEvent} ChromeUserEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeUserEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeUserEvent message.
             * @function verify
             * @memberof perfetto.protos.ChromeUserEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeUserEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.action != null && m.hasOwnProperty("action")) {
                    if (!$util.isString(m.action))
                        return "action: string expected";
                }
                if (m.actionHash != null && m.hasOwnProperty("actionHash")) {
                    if (!$util.isInteger(m.actionHash) && !(m.actionHash && $util.isInteger(m.actionHash.low) && $util.isInteger(m.actionHash.high)))
                        return "actionHash: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a ChromeUserEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeUserEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeUserEvent} ChromeUserEvent
             */
            ChromeUserEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeUserEvent)
                    return d;
                var m = new $root.perfetto.protos.ChromeUserEvent();
                if (d.action != null) {
                    m.action = String(d.action);
                }
                if (d.actionHash != null) {
                    if ($util.Long)
                        (m.actionHash = $util.Long.fromValue(d.actionHash)).unsigned = true;
                    else if (typeof d.actionHash === "string")
                        m.actionHash = parseInt(d.actionHash, 10);
                    else if (typeof d.actionHash === "number")
                        m.actionHash = d.actionHash;
                    else if (typeof d.actionHash === "object")
                        m.actionHash = new $util.LongBits(d.actionHash.low >>> 0, d.actionHash.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeUserEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeUserEvent
             * @static
             * @param {perfetto.protos.ChromeUserEvent} m ChromeUserEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeUserEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.action = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.actionHash = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.actionHash = o.longs === String ? "0" : 0;
                }
                if (m.action != null && m.hasOwnProperty("action")) {
                    d.action = m.action;
                }
                if (m.actionHash != null && m.hasOwnProperty("actionHash")) {
                    if (typeof m.actionHash === "number")
                        d.actionHash = o.longs === String ? String(m.actionHash) : m.actionHash;
                    else
                        d.actionHash = o.longs === String ? $util.Long.prototype.toString.call(m.actionHash) : o.longs === Number ? new $util.LongBits(m.actionHash.low >>> 0, m.actionHash.high >>> 0).toNumber(true) : m.actionHash;
                }
                return d;
            };

            /**
             * Converts this ChromeUserEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeUserEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeUserEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ChromeUserEvent;
        })();

        protos.ChromeWindowHandleEventInfo = (function() {

            /**
             * Properties of a ChromeWindowHandleEventInfo.
             * @memberof perfetto.protos
             * @interface IChromeWindowHandleEventInfo
             * @property {number|null} [dpi] ChromeWindowHandleEventInfo dpi
             * @property {number|null} [messageId] ChromeWindowHandleEventInfo messageId
             * @property {number|null} [hwndPtr] ChromeWindowHandleEventInfo hwndPtr
             */

            /**
             * Constructs a new ChromeWindowHandleEventInfo.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeWindowHandleEventInfo.
             * @implements IChromeWindowHandleEventInfo
             * @constructor
             * @param {perfetto.protos.IChromeWindowHandleEventInfo=} [p] Properties to set
             */
            function ChromeWindowHandleEventInfo(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeWindowHandleEventInfo dpi.
             * @member {number} dpi
             * @memberof perfetto.protos.ChromeWindowHandleEventInfo
             * @instance
             */
            ChromeWindowHandleEventInfo.prototype.dpi = 0;

            /**
             * ChromeWindowHandleEventInfo messageId.
             * @member {number} messageId
             * @memberof perfetto.protos.ChromeWindowHandleEventInfo
             * @instance
             */
            ChromeWindowHandleEventInfo.prototype.messageId = 0;

            /**
             * ChromeWindowHandleEventInfo hwndPtr.
             * @member {number} hwndPtr
             * @memberof perfetto.protos.ChromeWindowHandleEventInfo
             * @instance
             */
            ChromeWindowHandleEventInfo.prototype.hwndPtr = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * Creates a new ChromeWindowHandleEventInfo instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeWindowHandleEventInfo
             * @static
             * @param {perfetto.protos.IChromeWindowHandleEventInfo=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeWindowHandleEventInfo} ChromeWindowHandleEventInfo instance
             */
            ChromeWindowHandleEventInfo.create = function create(properties) {
                return new ChromeWindowHandleEventInfo(properties);
            };

            /**
             * Encodes the specified ChromeWindowHandleEventInfo message. Does not implicitly {@link perfetto.protos.ChromeWindowHandleEventInfo.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeWindowHandleEventInfo
             * @static
             * @param {perfetto.protos.IChromeWindowHandleEventInfo} m ChromeWindowHandleEventInfo message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeWindowHandleEventInfo.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.dpi != null && Object.hasOwnProperty.call(m, "dpi"))
                    w.uint32(8).uint32(m.dpi);
                if (m.messageId != null && Object.hasOwnProperty.call(m, "messageId"))
                    w.uint32(16).uint32(m.messageId);
                if (m.hwndPtr != null && Object.hasOwnProperty.call(m, "hwndPtr"))
                    w.uint32(25).fixed64(m.hwndPtr);
                return w;
            };

            /**
             * Encodes the specified ChromeWindowHandleEventInfo message, length delimited. Does not implicitly {@link perfetto.protos.ChromeWindowHandleEventInfo.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeWindowHandleEventInfo
             * @static
             * @param {perfetto.protos.IChromeWindowHandleEventInfo} message ChromeWindowHandleEventInfo message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeWindowHandleEventInfo.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeWindowHandleEventInfo message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeWindowHandleEventInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeWindowHandleEventInfo} ChromeWindowHandleEventInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeWindowHandleEventInfo.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeWindowHandleEventInfo();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.dpi = r.uint32();
                        break;
                    case 2:
                        m.messageId = r.uint32();
                        break;
                    case 3:
                        m.hwndPtr = r.fixed64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeWindowHandleEventInfo message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeWindowHandleEventInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeWindowHandleEventInfo} ChromeWindowHandleEventInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeWindowHandleEventInfo.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeWindowHandleEventInfo message.
             * @function verify
             * @memberof perfetto.protos.ChromeWindowHandleEventInfo
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeWindowHandleEventInfo.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.dpi != null && m.hasOwnProperty("dpi")) {
                    if (!$util.isInteger(m.dpi))
                        return "dpi: integer expected";
                }
                if (m.messageId != null && m.hasOwnProperty("messageId")) {
                    if (!$util.isInteger(m.messageId))
                        return "messageId: integer expected";
                }
                if (m.hwndPtr != null && m.hasOwnProperty("hwndPtr")) {
                    if (!$util.isInteger(m.hwndPtr) && !(m.hwndPtr && $util.isInteger(m.hwndPtr.low) && $util.isInteger(m.hwndPtr.high)))
                        return "hwndPtr: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a ChromeWindowHandleEventInfo message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeWindowHandleEventInfo
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeWindowHandleEventInfo} ChromeWindowHandleEventInfo
             */
            ChromeWindowHandleEventInfo.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeWindowHandleEventInfo)
                    return d;
                var m = new $root.perfetto.protos.ChromeWindowHandleEventInfo();
                if (d.dpi != null) {
                    m.dpi = d.dpi >>> 0;
                }
                if (d.messageId != null) {
                    m.messageId = d.messageId >>> 0;
                }
                if (d.hwndPtr != null) {
                    if ($util.Long)
                        (m.hwndPtr = $util.Long.fromValue(d.hwndPtr)).unsigned = false;
                    else if (typeof d.hwndPtr === "string")
                        m.hwndPtr = parseInt(d.hwndPtr, 10);
                    else if (typeof d.hwndPtr === "number")
                        m.hwndPtr = d.hwndPtr;
                    else if (typeof d.hwndPtr === "object")
                        m.hwndPtr = new $util.LongBits(d.hwndPtr.low >>> 0, d.hwndPtr.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeWindowHandleEventInfo message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeWindowHandleEventInfo
             * @static
             * @param {perfetto.protos.ChromeWindowHandleEventInfo} m ChromeWindowHandleEventInfo
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeWindowHandleEventInfo.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.dpi = 0;
                    d.messageId = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.hwndPtr = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.hwndPtr = o.longs === String ? "0" : 0;
                }
                if (m.dpi != null && m.hasOwnProperty("dpi")) {
                    d.dpi = m.dpi;
                }
                if (m.messageId != null && m.hasOwnProperty("messageId")) {
                    d.messageId = m.messageId;
                }
                if (m.hwndPtr != null && m.hasOwnProperty("hwndPtr")) {
                    if (typeof m.hwndPtr === "number")
                        d.hwndPtr = o.longs === String ? String(m.hwndPtr) : m.hwndPtr;
                    else
                        d.hwndPtr = o.longs === String ? $util.Long.prototype.toString.call(m.hwndPtr) : o.longs === Number ? new $util.LongBits(m.hwndPtr.low >>> 0, m.hwndPtr.high >>> 0).toNumber() : m.hwndPtr;
                }
                return d;
            };

            /**
             * Converts this ChromeWindowHandleEventInfo to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeWindowHandleEventInfo
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeWindowHandleEventInfo.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ChromeWindowHandleEventInfo;
        })();

        protos.InternedString = (function() {

            /**
             * Properties of an InternedString.
             * @memberof perfetto.protos
             * @interface IInternedString
             * @property {number|null} [iid] InternedString iid
             * @property {Uint8Array|null} [str] InternedString str
             */

            /**
             * Constructs a new InternedString.
             * @memberof perfetto.protos
             * @classdesc Represents an InternedString.
             * @implements IInternedString
             * @constructor
             * @param {perfetto.protos.IInternedString=} [p] Properties to set
             */
            function InternedString(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * InternedString iid.
             * @member {number} iid
             * @memberof perfetto.protos.InternedString
             * @instance
             */
            InternedString.prototype.iid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * InternedString str.
             * @member {Uint8Array} str
             * @memberof perfetto.protos.InternedString
             * @instance
             */
            InternedString.prototype.str = $util.newBuffer([]);

            /**
             * Creates a new InternedString instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.InternedString
             * @static
             * @param {perfetto.protos.IInternedString=} [properties] Properties to set
             * @returns {perfetto.protos.InternedString} InternedString instance
             */
            InternedString.create = function create(properties) {
                return new InternedString(properties);
            };

            /**
             * Encodes the specified InternedString message. Does not implicitly {@link perfetto.protos.InternedString.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.InternedString
             * @static
             * @param {perfetto.protos.IInternedString} m InternedString message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InternedString.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.iid != null && Object.hasOwnProperty.call(m, "iid"))
                    w.uint32(8).uint64(m.iid);
                if (m.str != null && Object.hasOwnProperty.call(m, "str"))
                    w.uint32(18).bytes(m.str);
                return w;
            };

            /**
             * Encodes the specified InternedString message, length delimited. Does not implicitly {@link perfetto.protos.InternedString.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.InternedString
             * @static
             * @param {perfetto.protos.IInternedString} message InternedString message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            InternedString.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an InternedString message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.InternedString
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.InternedString} InternedString
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InternedString.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.InternedString();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.iid = r.uint64();
                        break;
                    case 2:
                        m.str = r.bytes();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an InternedString message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.InternedString
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.InternedString} InternedString
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            InternedString.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an InternedString message.
             * @function verify
             * @memberof perfetto.protos.InternedString
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            InternedString.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (!$util.isInteger(m.iid) && !(m.iid && $util.isInteger(m.iid.low) && $util.isInteger(m.iid.high)))
                        return "iid: integer|Long expected";
                }
                if (m.str != null && m.hasOwnProperty("str")) {
                    if (!(m.str && typeof m.str.length === "number" || $util.isString(m.str)))
                        return "str: buffer expected";
                }
                return null;
            };

            /**
             * Creates an InternedString message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.InternedString
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.InternedString} InternedString
             */
            InternedString.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.InternedString)
                    return d;
                var m = new $root.perfetto.protos.InternedString();
                if (d.iid != null) {
                    if ($util.Long)
                        (m.iid = $util.Long.fromValue(d.iid)).unsigned = true;
                    else if (typeof d.iid === "string")
                        m.iid = parseInt(d.iid, 10);
                    else if (typeof d.iid === "number")
                        m.iid = d.iid;
                    else if (typeof d.iid === "object")
                        m.iid = new $util.LongBits(d.iid.low >>> 0, d.iid.high >>> 0).toNumber(true);
                }
                if (d.str != null) {
                    if (typeof d.str === "string")
                        $util.base64.decode(d.str, m.str = $util.newBuffer($util.base64.length(d.str)), 0);
                    else if (d.str.length)
                        m.str = d.str;
                }
                return m;
            };

            /**
             * Creates a plain object from an InternedString message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.InternedString
             * @static
             * @param {perfetto.protos.InternedString} m InternedString
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            InternedString.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.iid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.iid = o.longs === String ? "0" : 0;
                    if (o.bytes === String)
                        d.str = "";
                    else {
                        d.str = [];
                        if (o.bytes !== Array)
                            d.str = $util.newBuffer(d.str);
                    }
                }
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (typeof m.iid === "number")
                        d.iid = o.longs === String ? String(m.iid) : m.iid;
                    else
                        d.iid = o.longs === String ? $util.Long.prototype.toString.call(m.iid) : o.longs === Number ? new $util.LongBits(m.iid.low >>> 0, m.iid.high >>> 0).toNumber(true) : m.iid;
                }
                if (m.str != null && m.hasOwnProperty("str")) {
                    d.str = o.bytes === String ? $util.base64.encode(m.str, 0, m.str.length) : o.bytes === Array ? Array.prototype.slice.call(m.str) : m.str;
                }
                return d;
            };

            /**
             * Converts this InternedString to JSON.
             * @function toJSON
             * @memberof perfetto.protos.InternedString
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            InternedString.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return InternedString;
        })();

        protos.ProfiledFrameSymbols = (function() {

            /**
             * Properties of a ProfiledFrameSymbols.
             * @memberof perfetto.protos
             * @interface IProfiledFrameSymbols
             * @property {number|null} [frameIid] ProfiledFrameSymbols frameIid
             * @property {Array.<number>|null} [functionNameId] ProfiledFrameSymbols functionNameId
             * @property {Array.<number>|null} [fileNameId] ProfiledFrameSymbols fileNameId
             * @property {Array.<number>|null} [lineNumber] ProfiledFrameSymbols lineNumber
             */

            /**
             * Constructs a new ProfiledFrameSymbols.
             * @memberof perfetto.protos
             * @classdesc Represents a ProfiledFrameSymbols.
             * @implements IProfiledFrameSymbols
             * @constructor
             * @param {perfetto.protos.IProfiledFrameSymbols=} [p] Properties to set
             */
            function ProfiledFrameSymbols(p) {
                this.functionNameId = [];
                this.fileNameId = [];
                this.lineNumber = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ProfiledFrameSymbols frameIid.
             * @member {number} frameIid
             * @memberof perfetto.protos.ProfiledFrameSymbols
             * @instance
             */
            ProfiledFrameSymbols.prototype.frameIid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * ProfiledFrameSymbols functionNameId.
             * @member {Array.<number>} functionNameId
             * @memberof perfetto.protos.ProfiledFrameSymbols
             * @instance
             */
            ProfiledFrameSymbols.prototype.functionNameId = $util.emptyArray;

            /**
             * ProfiledFrameSymbols fileNameId.
             * @member {Array.<number>} fileNameId
             * @memberof perfetto.protos.ProfiledFrameSymbols
             * @instance
             */
            ProfiledFrameSymbols.prototype.fileNameId = $util.emptyArray;

            /**
             * ProfiledFrameSymbols lineNumber.
             * @member {Array.<number>} lineNumber
             * @memberof perfetto.protos.ProfiledFrameSymbols
             * @instance
             */
            ProfiledFrameSymbols.prototype.lineNumber = $util.emptyArray;

            /**
             * Creates a new ProfiledFrameSymbols instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ProfiledFrameSymbols
             * @static
             * @param {perfetto.protos.IProfiledFrameSymbols=} [properties] Properties to set
             * @returns {perfetto.protos.ProfiledFrameSymbols} ProfiledFrameSymbols instance
             */
            ProfiledFrameSymbols.create = function create(properties) {
                return new ProfiledFrameSymbols(properties);
            };

            /**
             * Encodes the specified ProfiledFrameSymbols message. Does not implicitly {@link perfetto.protos.ProfiledFrameSymbols.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ProfiledFrameSymbols
             * @static
             * @param {perfetto.protos.IProfiledFrameSymbols} m ProfiledFrameSymbols message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ProfiledFrameSymbols.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.frameIid != null && Object.hasOwnProperty.call(m, "frameIid"))
                    w.uint32(8).uint64(m.frameIid);
                if (m.functionNameId != null && m.functionNameId.length) {
                    for (var i = 0; i < m.functionNameId.length; ++i)
                        w.uint32(16).uint64(m.functionNameId[i]);
                }
                if (m.fileNameId != null && m.fileNameId.length) {
                    for (var i = 0; i < m.fileNameId.length; ++i)
                        w.uint32(24).uint64(m.fileNameId[i]);
                }
                if (m.lineNumber != null && m.lineNumber.length) {
                    for (var i = 0; i < m.lineNumber.length; ++i)
                        w.uint32(32).uint32(m.lineNumber[i]);
                }
                return w;
            };

            /**
             * Encodes the specified ProfiledFrameSymbols message, length delimited. Does not implicitly {@link perfetto.protos.ProfiledFrameSymbols.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ProfiledFrameSymbols
             * @static
             * @param {perfetto.protos.IProfiledFrameSymbols} message ProfiledFrameSymbols message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ProfiledFrameSymbols.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ProfiledFrameSymbols message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ProfiledFrameSymbols
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ProfiledFrameSymbols} ProfiledFrameSymbols
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ProfiledFrameSymbols.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ProfiledFrameSymbols();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.frameIid = r.uint64();
                        break;
                    case 2:
                        if (!(m.functionNameId && m.functionNameId.length))
                            m.functionNameId = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.functionNameId.push(r.uint64());
                        } else
                            m.functionNameId.push(r.uint64());
                        break;
                    case 3:
                        if (!(m.fileNameId && m.fileNameId.length))
                            m.fileNameId = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.fileNameId.push(r.uint64());
                        } else
                            m.fileNameId.push(r.uint64());
                        break;
                    case 4:
                        if (!(m.lineNumber && m.lineNumber.length))
                            m.lineNumber = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.lineNumber.push(r.uint32());
                        } else
                            m.lineNumber.push(r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ProfiledFrameSymbols message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ProfiledFrameSymbols
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ProfiledFrameSymbols} ProfiledFrameSymbols
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ProfiledFrameSymbols.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ProfiledFrameSymbols message.
             * @function verify
             * @memberof perfetto.protos.ProfiledFrameSymbols
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ProfiledFrameSymbols.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.frameIid != null && m.hasOwnProperty("frameIid")) {
                    if (!$util.isInteger(m.frameIid) && !(m.frameIid && $util.isInteger(m.frameIid.low) && $util.isInteger(m.frameIid.high)))
                        return "frameIid: integer|Long expected";
                }
                if (m.functionNameId != null && m.hasOwnProperty("functionNameId")) {
                    if (!Array.isArray(m.functionNameId))
                        return "functionNameId: array expected";
                    for (var i = 0; i < m.functionNameId.length; ++i) {
                        if (!$util.isInteger(m.functionNameId[i]) && !(m.functionNameId[i] && $util.isInteger(m.functionNameId[i].low) && $util.isInteger(m.functionNameId[i].high)))
                            return "functionNameId: integer|Long[] expected";
                    }
                }
                if (m.fileNameId != null && m.hasOwnProperty("fileNameId")) {
                    if (!Array.isArray(m.fileNameId))
                        return "fileNameId: array expected";
                    for (var i = 0; i < m.fileNameId.length; ++i) {
                        if (!$util.isInteger(m.fileNameId[i]) && !(m.fileNameId[i] && $util.isInteger(m.fileNameId[i].low) && $util.isInteger(m.fileNameId[i].high)))
                            return "fileNameId: integer|Long[] expected";
                    }
                }
                if (m.lineNumber != null && m.hasOwnProperty("lineNumber")) {
                    if (!Array.isArray(m.lineNumber))
                        return "lineNumber: array expected";
                    for (var i = 0; i < m.lineNumber.length; ++i) {
                        if (!$util.isInteger(m.lineNumber[i]))
                            return "lineNumber: integer[] expected";
                    }
                }
                return null;
            };

            /**
             * Creates a ProfiledFrameSymbols message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ProfiledFrameSymbols
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ProfiledFrameSymbols} ProfiledFrameSymbols
             */
            ProfiledFrameSymbols.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ProfiledFrameSymbols)
                    return d;
                var m = new $root.perfetto.protos.ProfiledFrameSymbols();
                if (d.frameIid != null) {
                    if ($util.Long)
                        (m.frameIid = $util.Long.fromValue(d.frameIid)).unsigned = true;
                    else if (typeof d.frameIid === "string")
                        m.frameIid = parseInt(d.frameIid, 10);
                    else if (typeof d.frameIid === "number")
                        m.frameIid = d.frameIid;
                    else if (typeof d.frameIid === "object")
                        m.frameIid = new $util.LongBits(d.frameIid.low >>> 0, d.frameIid.high >>> 0).toNumber(true);
                }
                if (d.functionNameId) {
                    if (!Array.isArray(d.functionNameId))
                        throw TypeError(".perfetto.protos.ProfiledFrameSymbols.functionNameId: array expected");
                    m.functionNameId = [];
                    for (var i = 0; i < d.functionNameId.length; ++i) {
                        if ($util.Long)
                            (m.functionNameId[i] = $util.Long.fromValue(d.functionNameId[i])).unsigned = true;
                        else if (typeof d.functionNameId[i] === "string")
                            m.functionNameId[i] = parseInt(d.functionNameId[i], 10);
                        else if (typeof d.functionNameId[i] === "number")
                            m.functionNameId[i] = d.functionNameId[i];
                        else if (typeof d.functionNameId[i] === "object")
                            m.functionNameId[i] = new $util.LongBits(d.functionNameId[i].low >>> 0, d.functionNameId[i].high >>> 0).toNumber(true);
                    }
                }
                if (d.fileNameId) {
                    if (!Array.isArray(d.fileNameId))
                        throw TypeError(".perfetto.protos.ProfiledFrameSymbols.fileNameId: array expected");
                    m.fileNameId = [];
                    for (var i = 0; i < d.fileNameId.length; ++i) {
                        if ($util.Long)
                            (m.fileNameId[i] = $util.Long.fromValue(d.fileNameId[i])).unsigned = true;
                        else if (typeof d.fileNameId[i] === "string")
                            m.fileNameId[i] = parseInt(d.fileNameId[i], 10);
                        else if (typeof d.fileNameId[i] === "number")
                            m.fileNameId[i] = d.fileNameId[i];
                        else if (typeof d.fileNameId[i] === "object")
                            m.fileNameId[i] = new $util.LongBits(d.fileNameId[i].low >>> 0, d.fileNameId[i].high >>> 0).toNumber(true);
                    }
                }
                if (d.lineNumber) {
                    if (!Array.isArray(d.lineNumber))
                        throw TypeError(".perfetto.protos.ProfiledFrameSymbols.lineNumber: array expected");
                    m.lineNumber = [];
                    for (var i = 0; i < d.lineNumber.length; ++i) {
                        m.lineNumber[i] = d.lineNumber[i] >>> 0;
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a ProfiledFrameSymbols message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ProfiledFrameSymbols
             * @static
             * @param {perfetto.protos.ProfiledFrameSymbols} m ProfiledFrameSymbols
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ProfiledFrameSymbols.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.functionNameId = [];
                    d.fileNameId = [];
                    d.lineNumber = [];
                }
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.frameIid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.frameIid = o.longs === String ? "0" : 0;
                }
                if (m.frameIid != null && m.hasOwnProperty("frameIid")) {
                    if (typeof m.frameIid === "number")
                        d.frameIid = o.longs === String ? String(m.frameIid) : m.frameIid;
                    else
                        d.frameIid = o.longs === String ? $util.Long.prototype.toString.call(m.frameIid) : o.longs === Number ? new $util.LongBits(m.frameIid.low >>> 0, m.frameIid.high >>> 0).toNumber(true) : m.frameIid;
                }
                if (m.functionNameId && m.functionNameId.length) {
                    d.functionNameId = [];
                    for (var j = 0; j < m.functionNameId.length; ++j) {
                        if (typeof m.functionNameId[j] === "number")
                            d.functionNameId[j] = o.longs === String ? String(m.functionNameId[j]) : m.functionNameId[j];
                        else
                            d.functionNameId[j] = o.longs === String ? $util.Long.prototype.toString.call(m.functionNameId[j]) : o.longs === Number ? new $util.LongBits(m.functionNameId[j].low >>> 0, m.functionNameId[j].high >>> 0).toNumber(true) : m.functionNameId[j];
                    }
                }
                if (m.fileNameId && m.fileNameId.length) {
                    d.fileNameId = [];
                    for (var j = 0; j < m.fileNameId.length; ++j) {
                        if (typeof m.fileNameId[j] === "number")
                            d.fileNameId[j] = o.longs === String ? String(m.fileNameId[j]) : m.fileNameId[j];
                        else
                            d.fileNameId[j] = o.longs === String ? $util.Long.prototype.toString.call(m.fileNameId[j]) : o.longs === Number ? new $util.LongBits(m.fileNameId[j].low >>> 0, m.fileNameId[j].high >>> 0).toNumber(true) : m.fileNameId[j];
                    }
                }
                if (m.lineNumber && m.lineNumber.length) {
                    d.lineNumber = [];
                    for (var j = 0; j < m.lineNumber.length; ++j) {
                        d.lineNumber[j] = m.lineNumber[j];
                    }
                }
                return d;
            };

            /**
             * Converts this ProfiledFrameSymbols to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ProfiledFrameSymbols
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ProfiledFrameSymbols.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ProfiledFrameSymbols;
        })();

        protos.Line = (function() {

            /**
             * Properties of a Line.
             * @memberof perfetto.protos
             * @interface ILine
             * @property {string|null} [functionName] Line functionName
             * @property {string|null} [sourceFileName] Line sourceFileName
             * @property {number|null} [lineNumber] Line lineNumber
             */

            /**
             * Constructs a new Line.
             * @memberof perfetto.protos
             * @classdesc Represents a Line.
             * @implements ILine
             * @constructor
             * @param {perfetto.protos.ILine=} [p] Properties to set
             */
            function Line(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Line functionName.
             * @member {string} functionName
             * @memberof perfetto.protos.Line
             * @instance
             */
            Line.prototype.functionName = "";

            /**
             * Line sourceFileName.
             * @member {string} sourceFileName
             * @memberof perfetto.protos.Line
             * @instance
             */
            Line.prototype.sourceFileName = "";

            /**
             * Line lineNumber.
             * @member {number} lineNumber
             * @memberof perfetto.protos.Line
             * @instance
             */
            Line.prototype.lineNumber = 0;

            /**
             * Creates a new Line instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Line
             * @static
             * @param {perfetto.protos.ILine=} [properties] Properties to set
             * @returns {perfetto.protos.Line} Line instance
             */
            Line.create = function create(properties) {
                return new Line(properties);
            };

            /**
             * Encodes the specified Line message. Does not implicitly {@link perfetto.protos.Line.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Line
             * @static
             * @param {perfetto.protos.ILine} m Line message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Line.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.functionName != null && Object.hasOwnProperty.call(m, "functionName"))
                    w.uint32(10).string(m.functionName);
                if (m.sourceFileName != null && Object.hasOwnProperty.call(m, "sourceFileName"))
                    w.uint32(18).string(m.sourceFileName);
                if (m.lineNumber != null && Object.hasOwnProperty.call(m, "lineNumber"))
                    w.uint32(24).uint32(m.lineNumber);
                return w;
            };

            /**
             * Encodes the specified Line message, length delimited. Does not implicitly {@link perfetto.protos.Line.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Line
             * @static
             * @param {perfetto.protos.ILine} message Line message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Line.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a Line message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Line
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Line} Line
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Line.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Line();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.functionName = r.string();
                        break;
                    case 2:
                        m.sourceFileName = r.string();
                        break;
                    case 3:
                        m.lineNumber = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a Line message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Line
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Line} Line
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Line.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a Line message.
             * @function verify
             * @memberof perfetto.protos.Line
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Line.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.functionName != null && m.hasOwnProperty("functionName")) {
                    if (!$util.isString(m.functionName))
                        return "functionName: string expected";
                }
                if (m.sourceFileName != null && m.hasOwnProperty("sourceFileName")) {
                    if (!$util.isString(m.sourceFileName))
                        return "sourceFileName: string expected";
                }
                if (m.lineNumber != null && m.hasOwnProperty("lineNumber")) {
                    if (!$util.isInteger(m.lineNumber))
                        return "lineNumber: integer expected";
                }
                return null;
            };

            /**
             * Creates a Line message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Line
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Line} Line
             */
            Line.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Line)
                    return d;
                var m = new $root.perfetto.protos.Line();
                if (d.functionName != null) {
                    m.functionName = String(d.functionName);
                }
                if (d.sourceFileName != null) {
                    m.sourceFileName = String(d.sourceFileName);
                }
                if (d.lineNumber != null) {
                    m.lineNumber = d.lineNumber >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a Line message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Line
             * @static
             * @param {perfetto.protos.Line} m Line
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Line.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.functionName = "";
                    d.sourceFileName = "";
                    d.lineNumber = 0;
                }
                if (m.functionName != null && m.hasOwnProperty("functionName")) {
                    d.functionName = m.functionName;
                }
                if (m.sourceFileName != null && m.hasOwnProperty("sourceFileName")) {
                    d.sourceFileName = m.sourceFileName;
                }
                if (m.lineNumber != null && m.hasOwnProperty("lineNumber")) {
                    d.lineNumber = m.lineNumber;
                }
                return d;
            };

            /**
             * Converts this Line to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Line
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Line.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Line;
        })();

        protos.AddressSymbols = (function() {

            /**
             * Properties of an AddressSymbols.
             * @memberof perfetto.protos
             * @interface IAddressSymbols
             * @property {number|null} [address] AddressSymbols address
             * @property {Array.<perfetto.protos.ILine>|null} [lines] AddressSymbols lines
             */

            /**
             * Constructs a new AddressSymbols.
             * @memberof perfetto.protos
             * @classdesc Represents an AddressSymbols.
             * @implements IAddressSymbols
             * @constructor
             * @param {perfetto.protos.IAddressSymbols=} [p] Properties to set
             */
            function AddressSymbols(p) {
                this.lines = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AddressSymbols address.
             * @member {number} address
             * @memberof perfetto.protos.AddressSymbols
             * @instance
             */
            AddressSymbols.prototype.address = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * AddressSymbols lines.
             * @member {Array.<perfetto.protos.ILine>} lines
             * @memberof perfetto.protos.AddressSymbols
             * @instance
             */
            AddressSymbols.prototype.lines = $util.emptyArray;

            /**
             * Creates a new AddressSymbols instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AddressSymbols
             * @static
             * @param {perfetto.protos.IAddressSymbols=} [properties] Properties to set
             * @returns {perfetto.protos.AddressSymbols} AddressSymbols instance
             */
            AddressSymbols.create = function create(properties) {
                return new AddressSymbols(properties);
            };

            /**
             * Encodes the specified AddressSymbols message. Does not implicitly {@link perfetto.protos.AddressSymbols.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AddressSymbols
             * @static
             * @param {perfetto.protos.IAddressSymbols} m AddressSymbols message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AddressSymbols.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.address != null && Object.hasOwnProperty.call(m, "address"))
                    w.uint32(8).uint64(m.address);
                if (m.lines != null && m.lines.length) {
                    for (var i = 0; i < m.lines.length; ++i)
                        $root.perfetto.protos.Line.encode(m.lines[i], w.uint32(18).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified AddressSymbols message, length delimited. Does not implicitly {@link perfetto.protos.AddressSymbols.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AddressSymbols
             * @static
             * @param {perfetto.protos.IAddressSymbols} message AddressSymbols message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AddressSymbols.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AddressSymbols message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AddressSymbols
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AddressSymbols} AddressSymbols
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AddressSymbols.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AddressSymbols();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.address = r.uint64();
                        break;
                    case 2:
                        if (!(m.lines && m.lines.length))
                            m.lines = [];
                        m.lines.push($root.perfetto.protos.Line.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AddressSymbols message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AddressSymbols
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AddressSymbols} AddressSymbols
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AddressSymbols.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AddressSymbols message.
             * @function verify
             * @memberof perfetto.protos.AddressSymbols
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AddressSymbols.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.address != null && m.hasOwnProperty("address")) {
                    if (!$util.isInteger(m.address) && !(m.address && $util.isInteger(m.address.low) && $util.isInteger(m.address.high)))
                        return "address: integer|Long expected";
                }
                if (m.lines != null && m.hasOwnProperty("lines")) {
                    if (!Array.isArray(m.lines))
                        return "lines: array expected";
                    for (var i = 0; i < m.lines.length; ++i) {
                        {
                            var e = $root.perfetto.protos.Line.verify(m.lines[i]);
                            if (e)
                                return "lines." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AddressSymbols message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AddressSymbols
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AddressSymbols} AddressSymbols
             */
            AddressSymbols.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AddressSymbols)
                    return d;
                var m = new $root.perfetto.protos.AddressSymbols();
                if (d.address != null) {
                    if ($util.Long)
                        (m.address = $util.Long.fromValue(d.address)).unsigned = true;
                    else if (typeof d.address === "string")
                        m.address = parseInt(d.address, 10);
                    else if (typeof d.address === "number")
                        m.address = d.address;
                    else if (typeof d.address === "object")
                        m.address = new $util.LongBits(d.address.low >>> 0, d.address.high >>> 0).toNumber(true);
                }
                if (d.lines) {
                    if (!Array.isArray(d.lines))
                        throw TypeError(".perfetto.protos.AddressSymbols.lines: array expected");
                    m.lines = [];
                    for (var i = 0; i < d.lines.length; ++i) {
                        if (typeof d.lines[i] !== "object")
                            throw TypeError(".perfetto.protos.AddressSymbols.lines: object expected");
                        m.lines[i] = $root.perfetto.protos.Line.fromObject(d.lines[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AddressSymbols message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AddressSymbols
             * @static
             * @param {perfetto.protos.AddressSymbols} m AddressSymbols
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AddressSymbols.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.lines = [];
                }
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.address = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.address = o.longs === String ? "0" : 0;
                }
                if (m.address != null && m.hasOwnProperty("address")) {
                    if (typeof m.address === "number")
                        d.address = o.longs === String ? String(m.address) : m.address;
                    else
                        d.address = o.longs === String ? $util.Long.prototype.toString.call(m.address) : o.longs === Number ? new $util.LongBits(m.address.low >>> 0, m.address.high >>> 0).toNumber(true) : m.address;
                }
                if (m.lines && m.lines.length) {
                    d.lines = [];
                    for (var j = 0; j < m.lines.length; ++j) {
                        d.lines[j] = $root.perfetto.protos.Line.toObject(m.lines[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this AddressSymbols to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AddressSymbols
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AddressSymbols.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AddressSymbols;
        })();

        protos.ModuleSymbols = (function() {

            /**
             * Properties of a ModuleSymbols.
             * @memberof perfetto.protos
             * @interface IModuleSymbols
             * @property {string|null} [path] ModuleSymbols path
             * @property {string|null} [buildId] ModuleSymbols buildId
             * @property {Array.<perfetto.protos.IAddressSymbols>|null} [addressSymbols] ModuleSymbols addressSymbols
             */

            /**
             * Constructs a new ModuleSymbols.
             * @memberof perfetto.protos
             * @classdesc Represents a ModuleSymbols.
             * @implements IModuleSymbols
             * @constructor
             * @param {perfetto.protos.IModuleSymbols=} [p] Properties to set
             */
            function ModuleSymbols(p) {
                this.addressSymbols = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ModuleSymbols path.
             * @member {string} path
             * @memberof perfetto.protos.ModuleSymbols
             * @instance
             */
            ModuleSymbols.prototype.path = "";

            /**
             * ModuleSymbols buildId.
             * @member {string} buildId
             * @memberof perfetto.protos.ModuleSymbols
             * @instance
             */
            ModuleSymbols.prototype.buildId = "";

            /**
             * ModuleSymbols addressSymbols.
             * @member {Array.<perfetto.protos.IAddressSymbols>} addressSymbols
             * @memberof perfetto.protos.ModuleSymbols
             * @instance
             */
            ModuleSymbols.prototype.addressSymbols = $util.emptyArray;

            /**
             * Creates a new ModuleSymbols instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ModuleSymbols
             * @static
             * @param {perfetto.protos.IModuleSymbols=} [properties] Properties to set
             * @returns {perfetto.protos.ModuleSymbols} ModuleSymbols instance
             */
            ModuleSymbols.create = function create(properties) {
                return new ModuleSymbols(properties);
            };

            /**
             * Encodes the specified ModuleSymbols message. Does not implicitly {@link perfetto.protos.ModuleSymbols.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ModuleSymbols
             * @static
             * @param {perfetto.protos.IModuleSymbols} m ModuleSymbols message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ModuleSymbols.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.path != null && Object.hasOwnProperty.call(m, "path"))
                    w.uint32(10).string(m.path);
                if (m.buildId != null && Object.hasOwnProperty.call(m, "buildId"))
                    w.uint32(18).string(m.buildId);
                if (m.addressSymbols != null && m.addressSymbols.length) {
                    for (var i = 0; i < m.addressSymbols.length; ++i)
                        $root.perfetto.protos.AddressSymbols.encode(m.addressSymbols[i], w.uint32(26).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified ModuleSymbols message, length delimited. Does not implicitly {@link perfetto.protos.ModuleSymbols.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ModuleSymbols
             * @static
             * @param {perfetto.protos.IModuleSymbols} message ModuleSymbols message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ModuleSymbols.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ModuleSymbols message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ModuleSymbols
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ModuleSymbols} ModuleSymbols
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ModuleSymbols.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ModuleSymbols();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.path = r.string();
                        break;
                    case 2:
                        m.buildId = r.string();
                        break;
                    case 3:
                        if (!(m.addressSymbols && m.addressSymbols.length))
                            m.addressSymbols = [];
                        m.addressSymbols.push($root.perfetto.protos.AddressSymbols.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ModuleSymbols message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ModuleSymbols
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ModuleSymbols} ModuleSymbols
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ModuleSymbols.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ModuleSymbols message.
             * @function verify
             * @memberof perfetto.protos.ModuleSymbols
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ModuleSymbols.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.path != null && m.hasOwnProperty("path")) {
                    if (!$util.isString(m.path))
                        return "path: string expected";
                }
                if (m.buildId != null && m.hasOwnProperty("buildId")) {
                    if (!$util.isString(m.buildId))
                        return "buildId: string expected";
                }
                if (m.addressSymbols != null && m.hasOwnProperty("addressSymbols")) {
                    if (!Array.isArray(m.addressSymbols))
                        return "addressSymbols: array expected";
                    for (var i = 0; i < m.addressSymbols.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AddressSymbols.verify(m.addressSymbols[i]);
                            if (e)
                                return "addressSymbols." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a ModuleSymbols message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ModuleSymbols
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ModuleSymbols} ModuleSymbols
             */
            ModuleSymbols.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ModuleSymbols)
                    return d;
                var m = new $root.perfetto.protos.ModuleSymbols();
                if (d.path != null) {
                    m.path = String(d.path);
                }
                if (d.buildId != null) {
                    m.buildId = String(d.buildId);
                }
                if (d.addressSymbols) {
                    if (!Array.isArray(d.addressSymbols))
                        throw TypeError(".perfetto.protos.ModuleSymbols.addressSymbols: array expected");
                    m.addressSymbols = [];
                    for (var i = 0; i < d.addressSymbols.length; ++i) {
                        if (typeof d.addressSymbols[i] !== "object")
                            throw TypeError(".perfetto.protos.ModuleSymbols.addressSymbols: object expected");
                        m.addressSymbols[i] = $root.perfetto.protos.AddressSymbols.fromObject(d.addressSymbols[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a ModuleSymbols message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ModuleSymbols
             * @static
             * @param {perfetto.protos.ModuleSymbols} m ModuleSymbols
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ModuleSymbols.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.addressSymbols = [];
                }
                if (o.defaults) {
                    d.path = "";
                    d.buildId = "";
                }
                if (m.path != null && m.hasOwnProperty("path")) {
                    d.path = m.path;
                }
                if (m.buildId != null && m.hasOwnProperty("buildId")) {
                    d.buildId = m.buildId;
                }
                if (m.addressSymbols && m.addressSymbols.length) {
                    d.addressSymbols = [];
                    for (var j = 0; j < m.addressSymbols.length; ++j) {
                        d.addressSymbols[j] = $root.perfetto.protos.AddressSymbols.toObject(m.addressSymbols[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this ModuleSymbols to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ModuleSymbols
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ModuleSymbols.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ModuleSymbols;
        })();

        protos.Mapping = (function() {

            /**
             * Properties of a Mapping.
             * @memberof perfetto.protos
             * @interface IMapping
             * @property {number|null} [iid] Mapping iid
             * @property {number|null} [buildId] Mapping buildId
             * @property {number|null} [exactOffset] Mapping exactOffset
             * @property {number|null} [startOffset] Mapping startOffset
             * @property {number|null} [start] Mapping start
             * @property {number|null} [end] Mapping end
             * @property {number|null} [loadBias] Mapping loadBias
             * @property {Array.<number>|null} [pathStringIds] Mapping pathStringIds
             */

            /**
             * Constructs a new Mapping.
             * @memberof perfetto.protos
             * @classdesc Represents a Mapping.
             * @implements IMapping
             * @constructor
             * @param {perfetto.protos.IMapping=} [p] Properties to set
             */
            function Mapping(p) {
                this.pathStringIds = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Mapping iid.
             * @member {number} iid
             * @memberof perfetto.protos.Mapping
             * @instance
             */
            Mapping.prototype.iid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Mapping buildId.
             * @member {number} buildId
             * @memberof perfetto.protos.Mapping
             * @instance
             */
            Mapping.prototype.buildId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Mapping exactOffset.
             * @member {number} exactOffset
             * @memberof perfetto.protos.Mapping
             * @instance
             */
            Mapping.prototype.exactOffset = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Mapping startOffset.
             * @member {number} startOffset
             * @memberof perfetto.protos.Mapping
             * @instance
             */
            Mapping.prototype.startOffset = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Mapping start.
             * @member {number} start
             * @memberof perfetto.protos.Mapping
             * @instance
             */
            Mapping.prototype.start = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Mapping end.
             * @member {number} end
             * @memberof perfetto.protos.Mapping
             * @instance
             */
            Mapping.prototype.end = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Mapping loadBias.
             * @member {number} loadBias
             * @memberof perfetto.protos.Mapping
             * @instance
             */
            Mapping.prototype.loadBias = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Mapping pathStringIds.
             * @member {Array.<number>} pathStringIds
             * @memberof perfetto.protos.Mapping
             * @instance
             */
            Mapping.prototype.pathStringIds = $util.emptyArray;

            /**
             * Creates a new Mapping instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Mapping
             * @static
             * @param {perfetto.protos.IMapping=} [properties] Properties to set
             * @returns {perfetto.protos.Mapping} Mapping instance
             */
            Mapping.create = function create(properties) {
                return new Mapping(properties);
            };

            /**
             * Encodes the specified Mapping message. Does not implicitly {@link perfetto.protos.Mapping.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Mapping
             * @static
             * @param {perfetto.protos.IMapping} m Mapping message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Mapping.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.iid != null && Object.hasOwnProperty.call(m, "iid"))
                    w.uint32(8).uint64(m.iid);
                if (m.buildId != null && Object.hasOwnProperty.call(m, "buildId"))
                    w.uint32(16).uint64(m.buildId);
                if (m.startOffset != null && Object.hasOwnProperty.call(m, "startOffset"))
                    w.uint32(24).uint64(m.startOffset);
                if (m.start != null && Object.hasOwnProperty.call(m, "start"))
                    w.uint32(32).uint64(m.start);
                if (m.end != null && Object.hasOwnProperty.call(m, "end"))
                    w.uint32(40).uint64(m.end);
                if (m.loadBias != null && Object.hasOwnProperty.call(m, "loadBias"))
                    w.uint32(48).uint64(m.loadBias);
                if (m.pathStringIds != null && m.pathStringIds.length) {
                    for (var i = 0; i < m.pathStringIds.length; ++i)
                        w.uint32(56).uint64(m.pathStringIds[i]);
                }
                if (m.exactOffset != null && Object.hasOwnProperty.call(m, "exactOffset"))
                    w.uint32(64).uint64(m.exactOffset);
                return w;
            };

            /**
             * Encodes the specified Mapping message, length delimited. Does not implicitly {@link perfetto.protos.Mapping.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Mapping
             * @static
             * @param {perfetto.protos.IMapping} message Mapping message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Mapping.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a Mapping message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Mapping
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Mapping} Mapping
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Mapping.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Mapping();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.iid = r.uint64();
                        break;
                    case 2:
                        m.buildId = r.uint64();
                        break;
                    case 8:
                        m.exactOffset = r.uint64();
                        break;
                    case 3:
                        m.startOffset = r.uint64();
                        break;
                    case 4:
                        m.start = r.uint64();
                        break;
                    case 5:
                        m.end = r.uint64();
                        break;
                    case 6:
                        m.loadBias = r.uint64();
                        break;
                    case 7:
                        if (!(m.pathStringIds && m.pathStringIds.length))
                            m.pathStringIds = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.pathStringIds.push(r.uint64());
                        } else
                            m.pathStringIds.push(r.uint64());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a Mapping message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Mapping
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Mapping} Mapping
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Mapping.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a Mapping message.
             * @function verify
             * @memberof perfetto.protos.Mapping
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Mapping.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (!$util.isInteger(m.iid) && !(m.iid && $util.isInteger(m.iid.low) && $util.isInteger(m.iid.high)))
                        return "iid: integer|Long expected";
                }
                if (m.buildId != null && m.hasOwnProperty("buildId")) {
                    if (!$util.isInteger(m.buildId) && !(m.buildId && $util.isInteger(m.buildId.low) && $util.isInteger(m.buildId.high)))
                        return "buildId: integer|Long expected";
                }
                if (m.exactOffset != null && m.hasOwnProperty("exactOffset")) {
                    if (!$util.isInteger(m.exactOffset) && !(m.exactOffset && $util.isInteger(m.exactOffset.low) && $util.isInteger(m.exactOffset.high)))
                        return "exactOffset: integer|Long expected";
                }
                if (m.startOffset != null && m.hasOwnProperty("startOffset")) {
                    if (!$util.isInteger(m.startOffset) && !(m.startOffset && $util.isInteger(m.startOffset.low) && $util.isInteger(m.startOffset.high)))
                        return "startOffset: integer|Long expected";
                }
                if (m.start != null && m.hasOwnProperty("start")) {
                    if (!$util.isInteger(m.start) && !(m.start && $util.isInteger(m.start.low) && $util.isInteger(m.start.high)))
                        return "start: integer|Long expected";
                }
                if (m.end != null && m.hasOwnProperty("end")) {
                    if (!$util.isInteger(m.end) && !(m.end && $util.isInteger(m.end.low) && $util.isInteger(m.end.high)))
                        return "end: integer|Long expected";
                }
                if (m.loadBias != null && m.hasOwnProperty("loadBias")) {
                    if (!$util.isInteger(m.loadBias) && !(m.loadBias && $util.isInteger(m.loadBias.low) && $util.isInteger(m.loadBias.high)))
                        return "loadBias: integer|Long expected";
                }
                if (m.pathStringIds != null && m.hasOwnProperty("pathStringIds")) {
                    if (!Array.isArray(m.pathStringIds))
                        return "pathStringIds: array expected";
                    for (var i = 0; i < m.pathStringIds.length; ++i) {
                        if (!$util.isInteger(m.pathStringIds[i]) && !(m.pathStringIds[i] && $util.isInteger(m.pathStringIds[i].low) && $util.isInteger(m.pathStringIds[i].high)))
                            return "pathStringIds: integer|Long[] expected";
                    }
                }
                return null;
            };

            /**
             * Creates a Mapping message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Mapping
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Mapping} Mapping
             */
            Mapping.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Mapping)
                    return d;
                var m = new $root.perfetto.protos.Mapping();
                if (d.iid != null) {
                    if ($util.Long)
                        (m.iid = $util.Long.fromValue(d.iid)).unsigned = true;
                    else if (typeof d.iid === "string")
                        m.iid = parseInt(d.iid, 10);
                    else if (typeof d.iid === "number")
                        m.iid = d.iid;
                    else if (typeof d.iid === "object")
                        m.iid = new $util.LongBits(d.iid.low >>> 0, d.iid.high >>> 0).toNumber(true);
                }
                if (d.buildId != null) {
                    if ($util.Long)
                        (m.buildId = $util.Long.fromValue(d.buildId)).unsigned = true;
                    else if (typeof d.buildId === "string")
                        m.buildId = parseInt(d.buildId, 10);
                    else if (typeof d.buildId === "number")
                        m.buildId = d.buildId;
                    else if (typeof d.buildId === "object")
                        m.buildId = new $util.LongBits(d.buildId.low >>> 0, d.buildId.high >>> 0).toNumber(true);
                }
                if (d.exactOffset != null) {
                    if ($util.Long)
                        (m.exactOffset = $util.Long.fromValue(d.exactOffset)).unsigned = true;
                    else if (typeof d.exactOffset === "string")
                        m.exactOffset = parseInt(d.exactOffset, 10);
                    else if (typeof d.exactOffset === "number")
                        m.exactOffset = d.exactOffset;
                    else if (typeof d.exactOffset === "object")
                        m.exactOffset = new $util.LongBits(d.exactOffset.low >>> 0, d.exactOffset.high >>> 0).toNumber(true);
                }
                if (d.startOffset != null) {
                    if ($util.Long)
                        (m.startOffset = $util.Long.fromValue(d.startOffset)).unsigned = true;
                    else if (typeof d.startOffset === "string")
                        m.startOffset = parseInt(d.startOffset, 10);
                    else if (typeof d.startOffset === "number")
                        m.startOffset = d.startOffset;
                    else if (typeof d.startOffset === "object")
                        m.startOffset = new $util.LongBits(d.startOffset.low >>> 0, d.startOffset.high >>> 0).toNumber(true);
                }
                if (d.start != null) {
                    if ($util.Long)
                        (m.start = $util.Long.fromValue(d.start)).unsigned = true;
                    else if (typeof d.start === "string")
                        m.start = parseInt(d.start, 10);
                    else if (typeof d.start === "number")
                        m.start = d.start;
                    else if (typeof d.start === "object")
                        m.start = new $util.LongBits(d.start.low >>> 0, d.start.high >>> 0).toNumber(true);
                }
                if (d.end != null) {
                    if ($util.Long)
                        (m.end = $util.Long.fromValue(d.end)).unsigned = true;
                    else if (typeof d.end === "string")
                        m.end = parseInt(d.end, 10);
                    else if (typeof d.end === "number")
                        m.end = d.end;
                    else if (typeof d.end === "object")
                        m.end = new $util.LongBits(d.end.low >>> 0, d.end.high >>> 0).toNumber(true);
                }
                if (d.loadBias != null) {
                    if ($util.Long)
                        (m.loadBias = $util.Long.fromValue(d.loadBias)).unsigned = true;
                    else if (typeof d.loadBias === "string")
                        m.loadBias = parseInt(d.loadBias, 10);
                    else if (typeof d.loadBias === "number")
                        m.loadBias = d.loadBias;
                    else if (typeof d.loadBias === "object")
                        m.loadBias = new $util.LongBits(d.loadBias.low >>> 0, d.loadBias.high >>> 0).toNumber(true);
                }
                if (d.pathStringIds) {
                    if (!Array.isArray(d.pathStringIds))
                        throw TypeError(".perfetto.protos.Mapping.pathStringIds: array expected");
                    m.pathStringIds = [];
                    for (var i = 0; i < d.pathStringIds.length; ++i) {
                        if ($util.Long)
                            (m.pathStringIds[i] = $util.Long.fromValue(d.pathStringIds[i])).unsigned = true;
                        else if (typeof d.pathStringIds[i] === "string")
                            m.pathStringIds[i] = parseInt(d.pathStringIds[i], 10);
                        else if (typeof d.pathStringIds[i] === "number")
                            m.pathStringIds[i] = d.pathStringIds[i];
                        else if (typeof d.pathStringIds[i] === "object")
                            m.pathStringIds[i] = new $util.LongBits(d.pathStringIds[i].low >>> 0, d.pathStringIds[i].high >>> 0).toNumber(true);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a Mapping message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Mapping
             * @static
             * @param {perfetto.protos.Mapping} m Mapping
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Mapping.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.pathStringIds = [];
                }
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.iid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.iid = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.buildId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.buildId = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.startOffset = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.startOffset = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.start = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.start = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.end = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.end = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.loadBias = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.loadBias = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.exactOffset = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.exactOffset = o.longs === String ? "0" : 0;
                }
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (typeof m.iid === "number")
                        d.iid = o.longs === String ? String(m.iid) : m.iid;
                    else
                        d.iid = o.longs === String ? $util.Long.prototype.toString.call(m.iid) : o.longs === Number ? new $util.LongBits(m.iid.low >>> 0, m.iid.high >>> 0).toNumber(true) : m.iid;
                }
                if (m.buildId != null && m.hasOwnProperty("buildId")) {
                    if (typeof m.buildId === "number")
                        d.buildId = o.longs === String ? String(m.buildId) : m.buildId;
                    else
                        d.buildId = o.longs === String ? $util.Long.prototype.toString.call(m.buildId) : o.longs === Number ? new $util.LongBits(m.buildId.low >>> 0, m.buildId.high >>> 0).toNumber(true) : m.buildId;
                }
                if (m.startOffset != null && m.hasOwnProperty("startOffset")) {
                    if (typeof m.startOffset === "number")
                        d.startOffset = o.longs === String ? String(m.startOffset) : m.startOffset;
                    else
                        d.startOffset = o.longs === String ? $util.Long.prototype.toString.call(m.startOffset) : o.longs === Number ? new $util.LongBits(m.startOffset.low >>> 0, m.startOffset.high >>> 0).toNumber(true) : m.startOffset;
                }
                if (m.start != null && m.hasOwnProperty("start")) {
                    if (typeof m.start === "number")
                        d.start = o.longs === String ? String(m.start) : m.start;
                    else
                        d.start = o.longs === String ? $util.Long.prototype.toString.call(m.start) : o.longs === Number ? new $util.LongBits(m.start.low >>> 0, m.start.high >>> 0).toNumber(true) : m.start;
                }
                if (m.end != null && m.hasOwnProperty("end")) {
                    if (typeof m.end === "number")
                        d.end = o.longs === String ? String(m.end) : m.end;
                    else
                        d.end = o.longs === String ? $util.Long.prototype.toString.call(m.end) : o.longs === Number ? new $util.LongBits(m.end.low >>> 0, m.end.high >>> 0).toNumber(true) : m.end;
                }
                if (m.loadBias != null && m.hasOwnProperty("loadBias")) {
                    if (typeof m.loadBias === "number")
                        d.loadBias = o.longs === String ? String(m.loadBias) : m.loadBias;
                    else
                        d.loadBias = o.longs === String ? $util.Long.prototype.toString.call(m.loadBias) : o.longs === Number ? new $util.LongBits(m.loadBias.low >>> 0, m.loadBias.high >>> 0).toNumber(true) : m.loadBias;
                }
                if (m.pathStringIds && m.pathStringIds.length) {
                    d.pathStringIds = [];
                    for (var j = 0; j < m.pathStringIds.length; ++j) {
                        if (typeof m.pathStringIds[j] === "number")
                            d.pathStringIds[j] = o.longs === String ? String(m.pathStringIds[j]) : m.pathStringIds[j];
                        else
                            d.pathStringIds[j] = o.longs === String ? $util.Long.prototype.toString.call(m.pathStringIds[j]) : o.longs === Number ? new $util.LongBits(m.pathStringIds[j].low >>> 0, m.pathStringIds[j].high >>> 0).toNumber(true) : m.pathStringIds[j];
                    }
                }
                if (m.exactOffset != null && m.hasOwnProperty("exactOffset")) {
                    if (typeof m.exactOffset === "number")
                        d.exactOffset = o.longs === String ? String(m.exactOffset) : m.exactOffset;
                    else
                        d.exactOffset = o.longs === String ? $util.Long.prototype.toString.call(m.exactOffset) : o.longs === Number ? new $util.LongBits(m.exactOffset.low >>> 0, m.exactOffset.high >>> 0).toNumber(true) : m.exactOffset;
                }
                return d;
            };

            /**
             * Converts this Mapping to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Mapping
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Mapping.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Mapping;
        })();

        protos.Frame = (function() {

            /**
             * Properties of a Frame.
             * @memberof perfetto.protos
             * @interface IFrame
             * @property {number|null} [iid] Frame iid
             * @property {number|null} [functionNameId] Frame functionNameId
             * @property {number|null} [mappingId] Frame mappingId
             * @property {number|null} [relPc] Frame relPc
             */

            /**
             * Constructs a new Frame.
             * @memberof perfetto.protos
             * @classdesc Represents a Frame.
             * @implements IFrame
             * @constructor
             * @param {perfetto.protos.IFrame=} [p] Properties to set
             */
            function Frame(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Frame iid.
             * @member {number} iid
             * @memberof perfetto.protos.Frame
             * @instance
             */
            Frame.prototype.iid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Frame functionNameId.
             * @member {number} functionNameId
             * @memberof perfetto.protos.Frame
             * @instance
             */
            Frame.prototype.functionNameId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Frame mappingId.
             * @member {number} mappingId
             * @memberof perfetto.protos.Frame
             * @instance
             */
            Frame.prototype.mappingId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Frame relPc.
             * @member {number} relPc
             * @memberof perfetto.protos.Frame
             * @instance
             */
            Frame.prototype.relPc = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new Frame instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Frame
             * @static
             * @param {perfetto.protos.IFrame=} [properties] Properties to set
             * @returns {perfetto.protos.Frame} Frame instance
             */
            Frame.create = function create(properties) {
                return new Frame(properties);
            };

            /**
             * Encodes the specified Frame message. Does not implicitly {@link perfetto.protos.Frame.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Frame
             * @static
             * @param {perfetto.protos.IFrame} m Frame message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Frame.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.iid != null && Object.hasOwnProperty.call(m, "iid"))
                    w.uint32(8).uint64(m.iid);
                if (m.functionNameId != null && Object.hasOwnProperty.call(m, "functionNameId"))
                    w.uint32(16).uint64(m.functionNameId);
                if (m.mappingId != null && Object.hasOwnProperty.call(m, "mappingId"))
                    w.uint32(24).uint64(m.mappingId);
                if (m.relPc != null && Object.hasOwnProperty.call(m, "relPc"))
                    w.uint32(32).uint64(m.relPc);
                return w;
            };

            /**
             * Encodes the specified Frame message, length delimited. Does not implicitly {@link perfetto.protos.Frame.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Frame
             * @static
             * @param {perfetto.protos.IFrame} message Frame message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Frame.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a Frame message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Frame
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Frame} Frame
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Frame.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Frame();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.iid = r.uint64();
                        break;
                    case 2:
                        m.functionNameId = r.uint64();
                        break;
                    case 3:
                        m.mappingId = r.uint64();
                        break;
                    case 4:
                        m.relPc = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a Frame message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Frame
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Frame} Frame
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Frame.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a Frame message.
             * @function verify
             * @memberof perfetto.protos.Frame
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Frame.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (!$util.isInteger(m.iid) && !(m.iid && $util.isInteger(m.iid.low) && $util.isInteger(m.iid.high)))
                        return "iid: integer|Long expected";
                }
                if (m.functionNameId != null && m.hasOwnProperty("functionNameId")) {
                    if (!$util.isInteger(m.functionNameId) && !(m.functionNameId && $util.isInteger(m.functionNameId.low) && $util.isInteger(m.functionNameId.high)))
                        return "functionNameId: integer|Long expected";
                }
                if (m.mappingId != null && m.hasOwnProperty("mappingId")) {
                    if (!$util.isInteger(m.mappingId) && !(m.mappingId && $util.isInteger(m.mappingId.low) && $util.isInteger(m.mappingId.high)))
                        return "mappingId: integer|Long expected";
                }
                if (m.relPc != null && m.hasOwnProperty("relPc")) {
                    if (!$util.isInteger(m.relPc) && !(m.relPc && $util.isInteger(m.relPc.low) && $util.isInteger(m.relPc.high)))
                        return "relPc: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a Frame message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Frame
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Frame} Frame
             */
            Frame.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Frame)
                    return d;
                var m = new $root.perfetto.protos.Frame();
                if (d.iid != null) {
                    if ($util.Long)
                        (m.iid = $util.Long.fromValue(d.iid)).unsigned = true;
                    else if (typeof d.iid === "string")
                        m.iid = parseInt(d.iid, 10);
                    else if (typeof d.iid === "number")
                        m.iid = d.iid;
                    else if (typeof d.iid === "object")
                        m.iid = new $util.LongBits(d.iid.low >>> 0, d.iid.high >>> 0).toNumber(true);
                }
                if (d.functionNameId != null) {
                    if ($util.Long)
                        (m.functionNameId = $util.Long.fromValue(d.functionNameId)).unsigned = true;
                    else if (typeof d.functionNameId === "string")
                        m.functionNameId = parseInt(d.functionNameId, 10);
                    else if (typeof d.functionNameId === "number")
                        m.functionNameId = d.functionNameId;
                    else if (typeof d.functionNameId === "object")
                        m.functionNameId = new $util.LongBits(d.functionNameId.low >>> 0, d.functionNameId.high >>> 0).toNumber(true);
                }
                if (d.mappingId != null) {
                    if ($util.Long)
                        (m.mappingId = $util.Long.fromValue(d.mappingId)).unsigned = true;
                    else if (typeof d.mappingId === "string")
                        m.mappingId = parseInt(d.mappingId, 10);
                    else if (typeof d.mappingId === "number")
                        m.mappingId = d.mappingId;
                    else if (typeof d.mappingId === "object")
                        m.mappingId = new $util.LongBits(d.mappingId.low >>> 0, d.mappingId.high >>> 0).toNumber(true);
                }
                if (d.relPc != null) {
                    if ($util.Long)
                        (m.relPc = $util.Long.fromValue(d.relPc)).unsigned = true;
                    else if (typeof d.relPc === "string")
                        m.relPc = parseInt(d.relPc, 10);
                    else if (typeof d.relPc === "number")
                        m.relPc = d.relPc;
                    else if (typeof d.relPc === "object")
                        m.relPc = new $util.LongBits(d.relPc.low >>> 0, d.relPc.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a Frame message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Frame
             * @static
             * @param {perfetto.protos.Frame} m Frame
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Frame.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.iid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.iid = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.functionNameId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.functionNameId = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.mappingId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.mappingId = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.relPc = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.relPc = o.longs === String ? "0" : 0;
                }
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (typeof m.iid === "number")
                        d.iid = o.longs === String ? String(m.iid) : m.iid;
                    else
                        d.iid = o.longs === String ? $util.Long.prototype.toString.call(m.iid) : o.longs === Number ? new $util.LongBits(m.iid.low >>> 0, m.iid.high >>> 0).toNumber(true) : m.iid;
                }
                if (m.functionNameId != null && m.hasOwnProperty("functionNameId")) {
                    if (typeof m.functionNameId === "number")
                        d.functionNameId = o.longs === String ? String(m.functionNameId) : m.functionNameId;
                    else
                        d.functionNameId = o.longs === String ? $util.Long.prototype.toString.call(m.functionNameId) : o.longs === Number ? new $util.LongBits(m.functionNameId.low >>> 0, m.functionNameId.high >>> 0).toNumber(true) : m.functionNameId;
                }
                if (m.mappingId != null && m.hasOwnProperty("mappingId")) {
                    if (typeof m.mappingId === "number")
                        d.mappingId = o.longs === String ? String(m.mappingId) : m.mappingId;
                    else
                        d.mappingId = o.longs === String ? $util.Long.prototype.toString.call(m.mappingId) : o.longs === Number ? new $util.LongBits(m.mappingId.low >>> 0, m.mappingId.high >>> 0).toNumber(true) : m.mappingId;
                }
                if (m.relPc != null && m.hasOwnProperty("relPc")) {
                    if (typeof m.relPc === "number")
                        d.relPc = o.longs === String ? String(m.relPc) : m.relPc;
                    else
                        d.relPc = o.longs === String ? $util.Long.prototype.toString.call(m.relPc) : o.longs === Number ? new $util.LongBits(m.relPc.low >>> 0, m.relPc.high >>> 0).toNumber(true) : m.relPc;
                }
                return d;
            };

            /**
             * Converts this Frame to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Frame
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Frame.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Frame;
        })();

        protos.Callstack = (function() {

            /**
             * Properties of a Callstack.
             * @memberof perfetto.protos
             * @interface ICallstack
             * @property {number|null} [iid] Callstack iid
             * @property {Array.<number>|null} [frameIds] Callstack frameIds
             */

            /**
             * Constructs a new Callstack.
             * @memberof perfetto.protos
             * @classdesc Represents a Callstack.
             * @implements ICallstack
             * @constructor
             * @param {perfetto.protos.ICallstack=} [p] Properties to set
             */
            function Callstack(p) {
                this.frameIds = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Callstack iid.
             * @member {number} iid
             * @memberof perfetto.protos.Callstack
             * @instance
             */
            Callstack.prototype.iid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Callstack frameIds.
             * @member {Array.<number>} frameIds
             * @memberof perfetto.protos.Callstack
             * @instance
             */
            Callstack.prototype.frameIds = $util.emptyArray;

            /**
             * Creates a new Callstack instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Callstack
             * @static
             * @param {perfetto.protos.ICallstack=} [properties] Properties to set
             * @returns {perfetto.protos.Callstack} Callstack instance
             */
            Callstack.create = function create(properties) {
                return new Callstack(properties);
            };

            /**
             * Encodes the specified Callstack message. Does not implicitly {@link perfetto.protos.Callstack.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Callstack
             * @static
             * @param {perfetto.protos.ICallstack} m Callstack message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Callstack.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.iid != null && Object.hasOwnProperty.call(m, "iid"))
                    w.uint32(8).uint64(m.iid);
                if (m.frameIds != null && m.frameIds.length) {
                    for (var i = 0; i < m.frameIds.length; ++i)
                        w.uint32(16).uint64(m.frameIds[i]);
                }
                return w;
            };

            /**
             * Encodes the specified Callstack message, length delimited. Does not implicitly {@link perfetto.protos.Callstack.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Callstack
             * @static
             * @param {perfetto.protos.ICallstack} message Callstack message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Callstack.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a Callstack message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Callstack
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Callstack} Callstack
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Callstack.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Callstack();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.iid = r.uint64();
                        break;
                    case 2:
                        if (!(m.frameIds && m.frameIds.length))
                            m.frameIds = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.frameIds.push(r.uint64());
                        } else
                            m.frameIds.push(r.uint64());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a Callstack message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Callstack
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Callstack} Callstack
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Callstack.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a Callstack message.
             * @function verify
             * @memberof perfetto.protos.Callstack
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Callstack.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (!$util.isInteger(m.iid) && !(m.iid && $util.isInteger(m.iid.low) && $util.isInteger(m.iid.high)))
                        return "iid: integer|Long expected";
                }
                if (m.frameIds != null && m.hasOwnProperty("frameIds")) {
                    if (!Array.isArray(m.frameIds))
                        return "frameIds: array expected";
                    for (var i = 0; i < m.frameIds.length; ++i) {
                        if (!$util.isInteger(m.frameIds[i]) && !(m.frameIds[i] && $util.isInteger(m.frameIds[i].low) && $util.isInteger(m.frameIds[i].high)))
                            return "frameIds: integer|Long[] expected";
                    }
                }
                return null;
            };

            /**
             * Creates a Callstack message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Callstack
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Callstack} Callstack
             */
            Callstack.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Callstack)
                    return d;
                var m = new $root.perfetto.protos.Callstack();
                if (d.iid != null) {
                    if ($util.Long)
                        (m.iid = $util.Long.fromValue(d.iid)).unsigned = true;
                    else if (typeof d.iid === "string")
                        m.iid = parseInt(d.iid, 10);
                    else if (typeof d.iid === "number")
                        m.iid = d.iid;
                    else if (typeof d.iid === "object")
                        m.iid = new $util.LongBits(d.iid.low >>> 0, d.iid.high >>> 0).toNumber(true);
                }
                if (d.frameIds) {
                    if (!Array.isArray(d.frameIds))
                        throw TypeError(".perfetto.protos.Callstack.frameIds: array expected");
                    m.frameIds = [];
                    for (var i = 0; i < d.frameIds.length; ++i) {
                        if ($util.Long)
                            (m.frameIds[i] = $util.Long.fromValue(d.frameIds[i])).unsigned = true;
                        else if (typeof d.frameIds[i] === "string")
                            m.frameIds[i] = parseInt(d.frameIds[i], 10);
                        else if (typeof d.frameIds[i] === "number")
                            m.frameIds[i] = d.frameIds[i];
                        else if (typeof d.frameIds[i] === "object")
                            m.frameIds[i] = new $util.LongBits(d.frameIds[i].low >>> 0, d.frameIds[i].high >>> 0).toNumber(true);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a Callstack message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Callstack
             * @static
             * @param {perfetto.protos.Callstack} m Callstack
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Callstack.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.frameIds = [];
                }
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.iid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.iid = o.longs === String ? "0" : 0;
                }
                if (m.iid != null && m.hasOwnProperty("iid")) {
                    if (typeof m.iid === "number")
                        d.iid = o.longs === String ? String(m.iid) : m.iid;
                    else
                        d.iid = o.longs === String ? $util.Long.prototype.toString.call(m.iid) : o.longs === Number ? new $util.LongBits(m.iid.low >>> 0, m.iid.high >>> 0).toNumber(true) : m.iid;
                }
                if (m.frameIds && m.frameIds.length) {
                    d.frameIds = [];
                    for (var j = 0; j < m.frameIds.length; ++j) {
                        if (typeof m.frameIds[j] === "number")
                            d.frameIds[j] = o.longs === String ? String(m.frameIds[j]) : m.frameIds[j];
                        else
                            d.frameIds[j] = o.longs === String ? $util.Long.prototype.toString.call(m.frameIds[j]) : o.longs === Number ? new $util.LongBits(m.frameIds[j].low >>> 0, m.frameIds[j].high >>> 0).toNumber(true) : m.frameIds[j];
                    }
                }
                return d;
            };

            /**
             * Converts this Callstack to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Callstack
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Callstack.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Callstack;
        })();

        protos.MemoryTrackerSnapshot = (function() {

            /**
             * Properties of a MemoryTrackerSnapshot.
             * @memberof perfetto.protos
             * @interface IMemoryTrackerSnapshot
             * @property {number|null} [globalDumpId] MemoryTrackerSnapshot globalDumpId
             * @property {perfetto.protos.MemoryTrackerSnapshot.LevelOfDetail|null} [levelOfDetail] MemoryTrackerSnapshot levelOfDetail
             * @property {Array.<perfetto.protos.MemoryTrackerSnapshot.IProcessSnapshot>|null} [processMemoryDumps] MemoryTrackerSnapshot processMemoryDumps
             */

            /**
             * Constructs a new MemoryTrackerSnapshot.
             * @memberof perfetto.protos
             * @classdesc Represents a MemoryTrackerSnapshot.
             * @implements IMemoryTrackerSnapshot
             * @constructor
             * @param {perfetto.protos.IMemoryTrackerSnapshot=} [p] Properties to set
             */
            function MemoryTrackerSnapshot(p) {
                this.processMemoryDumps = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * MemoryTrackerSnapshot globalDumpId.
             * @member {number} globalDumpId
             * @memberof perfetto.protos.MemoryTrackerSnapshot
             * @instance
             */
            MemoryTrackerSnapshot.prototype.globalDumpId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * MemoryTrackerSnapshot levelOfDetail.
             * @member {perfetto.protos.MemoryTrackerSnapshot.LevelOfDetail} levelOfDetail
             * @memberof perfetto.protos.MemoryTrackerSnapshot
             * @instance
             */
            MemoryTrackerSnapshot.prototype.levelOfDetail = 0;

            /**
             * MemoryTrackerSnapshot processMemoryDumps.
             * @member {Array.<perfetto.protos.MemoryTrackerSnapshot.IProcessSnapshot>} processMemoryDumps
             * @memberof perfetto.protos.MemoryTrackerSnapshot
             * @instance
             */
            MemoryTrackerSnapshot.prototype.processMemoryDumps = $util.emptyArray;

            /**
             * Creates a new MemoryTrackerSnapshot instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.MemoryTrackerSnapshot
             * @static
             * @param {perfetto.protos.IMemoryTrackerSnapshot=} [properties] Properties to set
             * @returns {perfetto.protos.MemoryTrackerSnapshot} MemoryTrackerSnapshot instance
             */
            MemoryTrackerSnapshot.create = function create(properties) {
                return new MemoryTrackerSnapshot(properties);
            };

            /**
             * Encodes the specified MemoryTrackerSnapshot message. Does not implicitly {@link perfetto.protos.MemoryTrackerSnapshot.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.MemoryTrackerSnapshot
             * @static
             * @param {perfetto.protos.IMemoryTrackerSnapshot} m MemoryTrackerSnapshot message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MemoryTrackerSnapshot.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.globalDumpId != null && Object.hasOwnProperty.call(m, "globalDumpId"))
                    w.uint32(8).uint64(m.globalDumpId);
                if (m.levelOfDetail != null && Object.hasOwnProperty.call(m, "levelOfDetail"))
                    w.uint32(16).int32(m.levelOfDetail);
                if (m.processMemoryDumps != null && m.processMemoryDumps.length) {
                    for (var i = 0; i < m.processMemoryDumps.length; ++i)
                        $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.encode(m.processMemoryDumps[i], w.uint32(26).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified MemoryTrackerSnapshot message, length delimited. Does not implicitly {@link perfetto.protos.MemoryTrackerSnapshot.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.MemoryTrackerSnapshot
             * @static
             * @param {perfetto.protos.IMemoryTrackerSnapshot} message MemoryTrackerSnapshot message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            MemoryTrackerSnapshot.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a MemoryTrackerSnapshot message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.MemoryTrackerSnapshot
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.MemoryTrackerSnapshot} MemoryTrackerSnapshot
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MemoryTrackerSnapshot.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MemoryTrackerSnapshot();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.globalDumpId = r.uint64();
                        break;
                    case 2:
                        m.levelOfDetail = r.int32();
                        break;
                    case 3:
                        if (!(m.processMemoryDumps && m.processMemoryDumps.length))
                            m.processMemoryDumps = [];
                        m.processMemoryDumps.push($root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a MemoryTrackerSnapshot message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.MemoryTrackerSnapshot
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.MemoryTrackerSnapshot} MemoryTrackerSnapshot
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            MemoryTrackerSnapshot.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a MemoryTrackerSnapshot message.
             * @function verify
             * @memberof perfetto.protos.MemoryTrackerSnapshot
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            MemoryTrackerSnapshot.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.globalDumpId != null && m.hasOwnProperty("globalDumpId")) {
                    if (!$util.isInteger(m.globalDumpId) && !(m.globalDumpId && $util.isInteger(m.globalDumpId.low) && $util.isInteger(m.globalDumpId.high)))
                        return "globalDumpId: integer|Long expected";
                }
                if (m.levelOfDetail != null && m.hasOwnProperty("levelOfDetail")) {
                    switch (m.levelOfDetail) {
                    default:
                        return "levelOfDetail: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                }
                if (m.processMemoryDumps != null && m.hasOwnProperty("processMemoryDumps")) {
                    if (!Array.isArray(m.processMemoryDumps))
                        return "processMemoryDumps: array expected";
                    for (var i = 0; i < m.processMemoryDumps.length; ++i) {
                        {
                            var e = $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.verify(m.processMemoryDumps[i]);
                            if (e)
                                return "processMemoryDumps." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a MemoryTrackerSnapshot message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.MemoryTrackerSnapshot
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.MemoryTrackerSnapshot} MemoryTrackerSnapshot
             */
            MemoryTrackerSnapshot.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.MemoryTrackerSnapshot)
                    return d;
                var m = new $root.perfetto.protos.MemoryTrackerSnapshot();
                if (d.globalDumpId != null) {
                    if ($util.Long)
                        (m.globalDumpId = $util.Long.fromValue(d.globalDumpId)).unsigned = true;
                    else if (typeof d.globalDumpId === "string")
                        m.globalDumpId = parseInt(d.globalDumpId, 10);
                    else if (typeof d.globalDumpId === "number")
                        m.globalDumpId = d.globalDumpId;
                    else if (typeof d.globalDumpId === "object")
                        m.globalDumpId = new $util.LongBits(d.globalDumpId.low >>> 0, d.globalDumpId.high >>> 0).toNumber(true);
                }
                switch (d.levelOfDetail) {
                case "DETAIL_FULL":
                case 0:
                    m.levelOfDetail = 0;
                    break;
                case "DETAIL_LIGHT":
                case 1:
                    m.levelOfDetail = 1;
                    break;
                case "DETAIL_BACKGROUND":
                case 2:
                    m.levelOfDetail = 2;
                    break;
                }
                if (d.processMemoryDumps) {
                    if (!Array.isArray(d.processMemoryDumps))
                        throw TypeError(".perfetto.protos.MemoryTrackerSnapshot.processMemoryDumps: array expected");
                    m.processMemoryDumps = [];
                    for (var i = 0; i < d.processMemoryDumps.length; ++i) {
                        if (typeof d.processMemoryDumps[i] !== "object")
                            throw TypeError(".perfetto.protos.MemoryTrackerSnapshot.processMemoryDumps: object expected");
                        m.processMemoryDumps[i] = $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.fromObject(d.processMemoryDumps[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a MemoryTrackerSnapshot message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.MemoryTrackerSnapshot
             * @static
             * @param {perfetto.protos.MemoryTrackerSnapshot} m MemoryTrackerSnapshot
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            MemoryTrackerSnapshot.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.processMemoryDumps = [];
                }
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.globalDumpId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.globalDumpId = o.longs === String ? "0" : 0;
                    d.levelOfDetail = o.enums === String ? "DETAIL_FULL" : 0;
                }
                if (m.globalDumpId != null && m.hasOwnProperty("globalDumpId")) {
                    if (typeof m.globalDumpId === "number")
                        d.globalDumpId = o.longs === String ? String(m.globalDumpId) : m.globalDumpId;
                    else
                        d.globalDumpId = o.longs === String ? $util.Long.prototype.toString.call(m.globalDumpId) : o.longs === Number ? new $util.LongBits(m.globalDumpId.low >>> 0, m.globalDumpId.high >>> 0).toNumber(true) : m.globalDumpId;
                }
                if (m.levelOfDetail != null && m.hasOwnProperty("levelOfDetail")) {
                    d.levelOfDetail = o.enums === String ? $root.perfetto.protos.MemoryTrackerSnapshot.LevelOfDetail[m.levelOfDetail] : m.levelOfDetail;
                }
                if (m.processMemoryDumps && m.processMemoryDumps.length) {
                    d.processMemoryDumps = [];
                    for (var j = 0; j < m.processMemoryDumps.length; ++j) {
                        d.processMemoryDumps[j] = $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.toObject(m.processMemoryDumps[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this MemoryTrackerSnapshot to JSON.
             * @function toJSON
             * @memberof perfetto.protos.MemoryTrackerSnapshot
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            MemoryTrackerSnapshot.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            MemoryTrackerSnapshot.ProcessSnapshot = (function() {

                /**
                 * Properties of a ProcessSnapshot.
                 * @memberof perfetto.protos.MemoryTrackerSnapshot
                 * @interface IProcessSnapshot
                 * @property {number|null} [pid] ProcessSnapshot pid
                 * @property {Array.<perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.IMemoryNode>|null} [allocatorDumps] ProcessSnapshot allocatorDumps
                 * @property {Array.<perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.IMemoryEdge>|null} [memoryEdges] ProcessSnapshot memoryEdges
                 */

                /**
                 * Constructs a new ProcessSnapshot.
                 * @memberof perfetto.protos.MemoryTrackerSnapshot
                 * @classdesc Represents a ProcessSnapshot.
                 * @implements IProcessSnapshot
                 * @constructor
                 * @param {perfetto.protos.MemoryTrackerSnapshot.IProcessSnapshot=} [p] Properties to set
                 */
                function ProcessSnapshot(p) {
                    this.allocatorDumps = [];
                    this.memoryEdges = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * ProcessSnapshot pid.
                 * @member {number} pid
                 * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot
                 * @instance
                 */
                ProcessSnapshot.prototype.pid = 0;

                /**
                 * ProcessSnapshot allocatorDumps.
                 * @member {Array.<perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.IMemoryNode>} allocatorDumps
                 * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot
                 * @instance
                 */
                ProcessSnapshot.prototype.allocatorDumps = $util.emptyArray;

                /**
                 * ProcessSnapshot memoryEdges.
                 * @member {Array.<perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.IMemoryEdge>} memoryEdges
                 * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot
                 * @instance
                 */
                ProcessSnapshot.prototype.memoryEdges = $util.emptyArray;

                /**
                 * Creates a new ProcessSnapshot instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot
                 * @static
                 * @param {perfetto.protos.MemoryTrackerSnapshot.IProcessSnapshot=} [properties] Properties to set
                 * @returns {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot} ProcessSnapshot instance
                 */
                ProcessSnapshot.create = function create(properties) {
                    return new ProcessSnapshot(properties);
                };

                /**
                 * Encodes the specified ProcessSnapshot message. Does not implicitly {@link perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot
                 * @static
                 * @param {perfetto.protos.MemoryTrackerSnapshot.IProcessSnapshot} m ProcessSnapshot message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProcessSnapshot.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                        w.uint32(8).int32(m.pid);
                    if (m.allocatorDumps != null && m.allocatorDumps.length) {
                        for (var i = 0; i < m.allocatorDumps.length; ++i)
                            $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.encode(m.allocatorDumps[i], w.uint32(18).fork()).ldelim();
                    }
                    if (m.memoryEdges != null && m.memoryEdges.length) {
                        for (var i = 0; i < m.memoryEdges.length; ++i)
                            $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge.encode(m.memoryEdges[i], w.uint32(26).fork()).ldelim();
                    }
                    return w;
                };

                /**
                 * Encodes the specified ProcessSnapshot message, length delimited. Does not implicitly {@link perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot
                 * @static
                 * @param {perfetto.protos.MemoryTrackerSnapshot.IProcessSnapshot} message ProcessSnapshot message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProcessSnapshot.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a ProcessSnapshot message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot} ProcessSnapshot
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProcessSnapshot.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.pid = r.int32();
                            break;
                        case 2:
                            if (!(m.allocatorDumps && m.allocatorDumps.length))
                                m.allocatorDumps = [];
                            m.allocatorDumps.push($root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.decode(r, r.uint32()));
                            break;
                        case 3:
                            if (!(m.memoryEdges && m.memoryEdges.length))
                                m.memoryEdges = [];
                            m.memoryEdges.push($root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a ProcessSnapshot message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot} ProcessSnapshot
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProcessSnapshot.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a ProcessSnapshot message.
                 * @function verify
                 * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ProcessSnapshot.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        if (!$util.isInteger(m.pid))
                            return "pid: integer expected";
                    }
                    if (m.allocatorDumps != null && m.hasOwnProperty("allocatorDumps")) {
                        if (!Array.isArray(m.allocatorDumps))
                            return "allocatorDumps: array expected";
                        for (var i = 0; i < m.allocatorDumps.length; ++i) {
                            {
                                var e = $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.verify(m.allocatorDumps[i]);
                                if (e)
                                    return "allocatorDumps." + e;
                            }
                        }
                    }
                    if (m.memoryEdges != null && m.hasOwnProperty("memoryEdges")) {
                        if (!Array.isArray(m.memoryEdges))
                            return "memoryEdges: array expected";
                        for (var i = 0; i < m.memoryEdges.length; ++i) {
                            {
                                var e = $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge.verify(m.memoryEdges[i]);
                                if (e)
                                    return "memoryEdges." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates a ProcessSnapshot message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot} ProcessSnapshot
                 */
                ProcessSnapshot.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot)
                        return d;
                    var m = new $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot();
                    if (d.pid != null) {
                        m.pid = d.pid | 0;
                    }
                    if (d.allocatorDumps) {
                        if (!Array.isArray(d.allocatorDumps))
                            throw TypeError(".perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.allocatorDumps: array expected");
                        m.allocatorDumps = [];
                        for (var i = 0; i < d.allocatorDumps.length; ++i) {
                            if (typeof d.allocatorDumps[i] !== "object")
                                throw TypeError(".perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.allocatorDumps: object expected");
                            m.allocatorDumps[i] = $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.fromObject(d.allocatorDumps[i]);
                        }
                    }
                    if (d.memoryEdges) {
                        if (!Array.isArray(d.memoryEdges))
                            throw TypeError(".perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.memoryEdges: array expected");
                        m.memoryEdges = [];
                        for (var i = 0; i < d.memoryEdges.length; ++i) {
                            if (typeof d.memoryEdges[i] !== "object")
                                throw TypeError(".perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.memoryEdges: object expected");
                            m.memoryEdges[i] = $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge.fromObject(d.memoryEdges[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a ProcessSnapshot message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot
                 * @static
                 * @param {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot} m ProcessSnapshot
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ProcessSnapshot.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.allocatorDumps = [];
                        d.memoryEdges = [];
                    }
                    if (o.defaults) {
                        d.pid = 0;
                    }
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        d.pid = m.pid;
                    }
                    if (m.allocatorDumps && m.allocatorDumps.length) {
                        d.allocatorDumps = [];
                        for (var j = 0; j < m.allocatorDumps.length; ++j) {
                            d.allocatorDumps[j] = $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.toObject(m.allocatorDumps[j], o);
                        }
                    }
                    if (m.memoryEdges && m.memoryEdges.length) {
                        d.memoryEdges = [];
                        for (var j = 0; j < m.memoryEdges.length; ++j) {
                            d.memoryEdges[j] = $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge.toObject(m.memoryEdges[j], o);
                        }
                    }
                    return d;
                };

                /**
                 * Converts this ProcessSnapshot to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ProcessSnapshot.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                ProcessSnapshot.MemoryNode = (function() {

                    /**
                     * Properties of a MemoryNode.
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot
                     * @interface IMemoryNode
                     * @property {number|null} [id] MemoryNode id
                     * @property {string|null} [absoluteName] MemoryNode absoluteName
                     * @property {boolean|null} [weak] MemoryNode weak
                     * @property {number|null} [sizeBytes] MemoryNode sizeBytes
                     * @property {Array.<perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.IMemoryNodeEntry>|null} [entries] MemoryNode entries
                     */

                    /**
                     * Constructs a new MemoryNode.
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot
                     * @classdesc Represents a MemoryNode.
                     * @implements IMemoryNode
                     * @constructor
                     * @param {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.IMemoryNode=} [p] Properties to set
                     */
                    function MemoryNode(p) {
                        this.entries = [];
                        if (p)
                            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                                if (p[ks[i]] != null)
                                    this[ks[i]] = p[ks[i]];
                    }

                    /**
                     * MemoryNode id.
                     * @member {number} id
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode
                     * @instance
                     */
                    MemoryNode.prototype.id = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                    /**
                     * MemoryNode absoluteName.
                     * @member {string} absoluteName
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode
                     * @instance
                     */
                    MemoryNode.prototype.absoluteName = "";

                    /**
                     * MemoryNode weak.
                     * @member {boolean} weak
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode
                     * @instance
                     */
                    MemoryNode.prototype.weak = false;

                    /**
                     * MemoryNode sizeBytes.
                     * @member {number} sizeBytes
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode
                     * @instance
                     */
                    MemoryNode.prototype.sizeBytes = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                    /**
                     * MemoryNode entries.
                     * @member {Array.<perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.IMemoryNodeEntry>} entries
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode
                     * @instance
                     */
                    MemoryNode.prototype.entries = $util.emptyArray;

                    /**
                     * Creates a new MemoryNode instance using the specified properties.
                     * @function create
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode
                     * @static
                     * @param {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.IMemoryNode=} [properties] Properties to set
                     * @returns {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode} MemoryNode instance
                     */
                    MemoryNode.create = function create(properties) {
                        return new MemoryNode(properties);
                    };

                    /**
                     * Encodes the specified MemoryNode message. Does not implicitly {@link perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.verify|verify} messages.
                     * @function encode
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode
                     * @static
                     * @param {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.IMemoryNode} m MemoryNode message or plain object to encode
                     * @param {$protobuf.Writer} [w] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    MemoryNode.encode = function encode(m, w) {
                        if (!w)
                            w = $Writer.create();
                        if (m.id != null && Object.hasOwnProperty.call(m, "id"))
                            w.uint32(8).uint64(m.id);
                        if (m.absoluteName != null && Object.hasOwnProperty.call(m, "absoluteName"))
                            w.uint32(18).string(m.absoluteName);
                        if (m.weak != null && Object.hasOwnProperty.call(m, "weak"))
                            w.uint32(24).bool(m.weak);
                        if (m.sizeBytes != null && Object.hasOwnProperty.call(m, "sizeBytes"))
                            w.uint32(32).uint64(m.sizeBytes);
                        if (m.entries != null && m.entries.length) {
                            for (var i = 0; i < m.entries.length; ++i)
                                $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry.encode(m.entries[i], w.uint32(42).fork()).ldelim();
                        }
                        return w;
                    };

                    /**
                     * Encodes the specified MemoryNode message, length delimited. Does not implicitly {@link perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode
                     * @static
                     * @param {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.IMemoryNode} message MemoryNode message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    MemoryNode.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a MemoryNode message from the specified reader or buffer.
                     * @function decode
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                     * @param {number} [l] Message length if known beforehand
                     * @returns {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode} MemoryNode
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    MemoryNode.decode = function decode(r, l) {
                        if (!(r instanceof $Reader))
                            r = $Reader.create(r);
                        var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode();
                        while (r.pos < c) {
                            var t = r.uint32();
                            switch (t >>> 3) {
                            case 1:
                                m.id = r.uint64();
                                break;
                            case 2:
                                m.absoluteName = r.string();
                                break;
                            case 3:
                                m.weak = r.bool();
                                break;
                            case 4:
                                m.sizeBytes = r.uint64();
                                break;
                            case 5:
                                if (!(m.entries && m.entries.length))
                                    m.entries = [];
                                m.entries.push($root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry.decode(r, r.uint32()));
                                break;
                            default:
                                r.skipType(t & 7);
                                break;
                            }
                        }
                        return m;
                    };

                    /**
                     * Decodes a MemoryNode message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode} MemoryNode
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    MemoryNode.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a MemoryNode message.
                     * @function verify
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode
                     * @static
                     * @param {Object.<string,*>} m Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    MemoryNode.verify = function verify(m) {
                        if (typeof m !== "object" || m === null)
                            return "object expected";
                        if (m.id != null && m.hasOwnProperty("id")) {
                            if (!$util.isInteger(m.id) && !(m.id && $util.isInteger(m.id.low) && $util.isInteger(m.id.high)))
                                return "id: integer|Long expected";
                        }
                        if (m.absoluteName != null && m.hasOwnProperty("absoluteName")) {
                            if (!$util.isString(m.absoluteName))
                                return "absoluteName: string expected";
                        }
                        if (m.weak != null && m.hasOwnProperty("weak")) {
                            if (typeof m.weak !== "boolean")
                                return "weak: boolean expected";
                        }
                        if (m.sizeBytes != null && m.hasOwnProperty("sizeBytes")) {
                            if (!$util.isInteger(m.sizeBytes) && !(m.sizeBytes && $util.isInteger(m.sizeBytes.low) && $util.isInteger(m.sizeBytes.high)))
                                return "sizeBytes: integer|Long expected";
                        }
                        if (m.entries != null && m.hasOwnProperty("entries")) {
                            if (!Array.isArray(m.entries))
                                return "entries: array expected";
                            for (var i = 0; i < m.entries.length; ++i) {
                                {
                                    var e = $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry.verify(m.entries[i]);
                                    if (e)
                                        return "entries." + e;
                                }
                            }
                        }
                        return null;
                    };

                    /**
                     * Creates a MemoryNode message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode
                     * @static
                     * @param {Object.<string,*>} d Plain object
                     * @returns {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode} MemoryNode
                     */
                    MemoryNode.fromObject = function fromObject(d) {
                        if (d instanceof $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode)
                            return d;
                        var m = new $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode();
                        if (d.id != null) {
                            if ($util.Long)
                                (m.id = $util.Long.fromValue(d.id)).unsigned = true;
                            else if (typeof d.id === "string")
                                m.id = parseInt(d.id, 10);
                            else if (typeof d.id === "number")
                                m.id = d.id;
                            else if (typeof d.id === "object")
                                m.id = new $util.LongBits(d.id.low >>> 0, d.id.high >>> 0).toNumber(true);
                        }
                        if (d.absoluteName != null) {
                            m.absoluteName = String(d.absoluteName);
                        }
                        if (d.weak != null) {
                            m.weak = Boolean(d.weak);
                        }
                        if (d.sizeBytes != null) {
                            if ($util.Long)
                                (m.sizeBytes = $util.Long.fromValue(d.sizeBytes)).unsigned = true;
                            else if (typeof d.sizeBytes === "string")
                                m.sizeBytes = parseInt(d.sizeBytes, 10);
                            else if (typeof d.sizeBytes === "number")
                                m.sizeBytes = d.sizeBytes;
                            else if (typeof d.sizeBytes === "object")
                                m.sizeBytes = new $util.LongBits(d.sizeBytes.low >>> 0, d.sizeBytes.high >>> 0).toNumber(true);
                        }
                        if (d.entries) {
                            if (!Array.isArray(d.entries))
                                throw TypeError(".perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.entries: array expected");
                            m.entries = [];
                            for (var i = 0; i < d.entries.length; ++i) {
                                if (typeof d.entries[i] !== "object")
                                    throw TypeError(".perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.entries: object expected");
                                m.entries[i] = $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry.fromObject(d.entries[i]);
                            }
                        }
                        return m;
                    };

                    /**
                     * Creates a plain object from a MemoryNode message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode
                     * @static
                     * @param {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode} m MemoryNode
                     * @param {$protobuf.IConversionOptions} [o] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    MemoryNode.toObject = function toObject(m, o) {
                        if (!o)
                            o = {};
                        var d = {};
                        if (o.arrays || o.defaults) {
                            d.entries = [];
                        }
                        if (o.defaults) {
                            if ($util.Long) {
                                var n = new $util.Long(0, 0, true);
                                d.id = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                            } else
                                d.id = o.longs === String ? "0" : 0;
                            d.absoluteName = "";
                            d.weak = false;
                            if ($util.Long) {
                                var n = new $util.Long(0, 0, true);
                                d.sizeBytes = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                            } else
                                d.sizeBytes = o.longs === String ? "0" : 0;
                        }
                        if (m.id != null && m.hasOwnProperty("id")) {
                            if (typeof m.id === "number")
                                d.id = o.longs === String ? String(m.id) : m.id;
                            else
                                d.id = o.longs === String ? $util.Long.prototype.toString.call(m.id) : o.longs === Number ? new $util.LongBits(m.id.low >>> 0, m.id.high >>> 0).toNumber(true) : m.id;
                        }
                        if (m.absoluteName != null && m.hasOwnProperty("absoluteName")) {
                            d.absoluteName = m.absoluteName;
                        }
                        if (m.weak != null && m.hasOwnProperty("weak")) {
                            d.weak = m.weak;
                        }
                        if (m.sizeBytes != null && m.hasOwnProperty("sizeBytes")) {
                            if (typeof m.sizeBytes === "number")
                                d.sizeBytes = o.longs === String ? String(m.sizeBytes) : m.sizeBytes;
                            else
                                d.sizeBytes = o.longs === String ? $util.Long.prototype.toString.call(m.sizeBytes) : o.longs === Number ? new $util.LongBits(m.sizeBytes.low >>> 0, m.sizeBytes.high >>> 0).toNumber(true) : m.sizeBytes;
                        }
                        if (m.entries && m.entries.length) {
                            d.entries = [];
                            for (var j = 0; j < m.entries.length; ++j) {
                                d.entries[j] = $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry.toObject(m.entries[j], o);
                            }
                        }
                        return d;
                    };

                    /**
                     * Converts this MemoryNode to JSON.
                     * @function toJSON
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    MemoryNode.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                    };

                    MemoryNode.MemoryNodeEntry = (function() {

                        /**
                         * Properties of a MemoryNodeEntry.
                         * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode
                         * @interface IMemoryNodeEntry
                         * @property {string|null} [name] MemoryNodeEntry name
                         * @property {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry.Units|null} [units] MemoryNodeEntry units
                         * @property {number|null} [valueUint64] MemoryNodeEntry valueUint64
                         * @property {string|null} [valueString] MemoryNodeEntry valueString
                         */

                        /**
                         * Constructs a new MemoryNodeEntry.
                         * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode
                         * @classdesc Represents a MemoryNodeEntry.
                         * @implements IMemoryNodeEntry
                         * @constructor
                         * @param {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.IMemoryNodeEntry=} [p] Properties to set
                         */
                        function MemoryNodeEntry(p) {
                            if (p)
                                for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                                    if (p[ks[i]] != null)
                                        this[ks[i]] = p[ks[i]];
                        }

                        /**
                         * MemoryNodeEntry name.
                         * @member {string} name
                         * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry
                         * @instance
                         */
                        MemoryNodeEntry.prototype.name = "";

                        /**
                         * MemoryNodeEntry units.
                         * @member {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry.Units} units
                         * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry
                         * @instance
                         */
                        MemoryNodeEntry.prototype.units = 0;

                        /**
                         * MemoryNodeEntry valueUint64.
                         * @member {number} valueUint64
                         * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry
                         * @instance
                         */
                        MemoryNodeEntry.prototype.valueUint64 = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                        /**
                         * MemoryNodeEntry valueString.
                         * @member {string} valueString
                         * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry
                         * @instance
                         */
                        MemoryNodeEntry.prototype.valueString = "";

                        /**
                         * Creates a new MemoryNodeEntry instance using the specified properties.
                         * @function create
                         * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry
                         * @static
                         * @param {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.IMemoryNodeEntry=} [properties] Properties to set
                         * @returns {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry} MemoryNodeEntry instance
                         */
                        MemoryNodeEntry.create = function create(properties) {
                            return new MemoryNodeEntry(properties);
                        };

                        /**
                         * Encodes the specified MemoryNodeEntry message. Does not implicitly {@link perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry.verify|verify} messages.
                         * @function encode
                         * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry
                         * @static
                         * @param {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.IMemoryNodeEntry} m MemoryNodeEntry message or plain object to encode
                         * @param {$protobuf.Writer} [w] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        MemoryNodeEntry.encode = function encode(m, w) {
                            if (!w)
                                w = $Writer.create();
                            if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                                w.uint32(10).string(m.name);
                            if (m.units != null && Object.hasOwnProperty.call(m, "units"))
                                w.uint32(16).int32(m.units);
                            if (m.valueUint64 != null && Object.hasOwnProperty.call(m, "valueUint64"))
                                w.uint32(24).uint64(m.valueUint64);
                            if (m.valueString != null && Object.hasOwnProperty.call(m, "valueString"))
                                w.uint32(34).string(m.valueString);
                            return w;
                        };

                        /**
                         * Encodes the specified MemoryNodeEntry message, length delimited. Does not implicitly {@link perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry
                         * @static
                         * @param {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.IMemoryNodeEntry} message MemoryNodeEntry message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        MemoryNodeEntry.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };

                        /**
                         * Decodes a MemoryNodeEntry message from the specified reader or buffer.
                         * @function decode
                         * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                         * @param {number} [l] Message length if known beforehand
                         * @returns {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry} MemoryNodeEntry
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        MemoryNodeEntry.decode = function decode(r, l) {
                            if (!(r instanceof $Reader))
                                r = $Reader.create(r);
                            var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry();
                            while (r.pos < c) {
                                var t = r.uint32();
                                switch (t >>> 3) {
                                case 1:
                                    m.name = r.string();
                                    break;
                                case 2:
                                    m.units = r.int32();
                                    break;
                                case 3:
                                    m.valueUint64 = r.uint64();
                                    break;
                                case 4:
                                    m.valueString = r.string();
                                    break;
                                default:
                                    r.skipType(t & 7);
                                    break;
                                }
                            }
                            return m;
                        };

                        /**
                         * Decodes a MemoryNodeEntry message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry} MemoryNodeEntry
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        MemoryNodeEntry.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };

                        /**
                         * Verifies a MemoryNodeEntry message.
                         * @function verify
                         * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry
                         * @static
                         * @param {Object.<string,*>} m Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        MemoryNodeEntry.verify = function verify(m) {
                            if (typeof m !== "object" || m === null)
                                return "object expected";
                            if (m.name != null && m.hasOwnProperty("name")) {
                                if (!$util.isString(m.name))
                                    return "name: string expected";
                            }
                            if (m.units != null && m.hasOwnProperty("units")) {
                                switch (m.units) {
                                default:
                                    return "units: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                    break;
                                }
                            }
                            if (m.valueUint64 != null && m.hasOwnProperty("valueUint64")) {
                                if (!$util.isInteger(m.valueUint64) && !(m.valueUint64 && $util.isInteger(m.valueUint64.low) && $util.isInteger(m.valueUint64.high)))
                                    return "valueUint64: integer|Long expected";
                            }
                            if (m.valueString != null && m.hasOwnProperty("valueString")) {
                                if (!$util.isString(m.valueString))
                                    return "valueString: string expected";
                            }
                            return null;
                        };

                        /**
                         * Creates a MemoryNodeEntry message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry
                         * @static
                         * @param {Object.<string,*>} d Plain object
                         * @returns {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry} MemoryNodeEntry
                         */
                        MemoryNodeEntry.fromObject = function fromObject(d) {
                            if (d instanceof $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry)
                                return d;
                            var m = new $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry();
                            if (d.name != null) {
                                m.name = String(d.name);
                            }
                            switch (d.units) {
                            case "UNSPECIFIED":
                            case 0:
                                m.units = 0;
                                break;
                            case "BYTES":
                            case 1:
                                m.units = 1;
                                break;
                            case "COUNT":
                            case 2:
                                m.units = 2;
                                break;
                            }
                            if (d.valueUint64 != null) {
                                if ($util.Long)
                                    (m.valueUint64 = $util.Long.fromValue(d.valueUint64)).unsigned = true;
                                else if (typeof d.valueUint64 === "string")
                                    m.valueUint64 = parseInt(d.valueUint64, 10);
                                else if (typeof d.valueUint64 === "number")
                                    m.valueUint64 = d.valueUint64;
                                else if (typeof d.valueUint64 === "object")
                                    m.valueUint64 = new $util.LongBits(d.valueUint64.low >>> 0, d.valueUint64.high >>> 0).toNumber(true);
                            }
                            if (d.valueString != null) {
                                m.valueString = String(d.valueString);
                            }
                            return m;
                        };

                        /**
                         * Creates a plain object from a MemoryNodeEntry message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry
                         * @static
                         * @param {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry} m MemoryNodeEntry
                         * @param {$protobuf.IConversionOptions} [o] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        MemoryNodeEntry.toObject = function toObject(m, o) {
                            if (!o)
                                o = {};
                            var d = {};
                            if (o.defaults) {
                                d.name = "";
                                d.units = o.enums === String ? "UNSPECIFIED" : 0;
                                if ($util.Long) {
                                    var n = new $util.Long(0, 0, true);
                                    d.valueUint64 = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                                } else
                                    d.valueUint64 = o.longs === String ? "0" : 0;
                                d.valueString = "";
                            }
                            if (m.name != null && m.hasOwnProperty("name")) {
                                d.name = m.name;
                            }
                            if (m.units != null && m.hasOwnProperty("units")) {
                                d.units = o.enums === String ? $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry.Units[m.units] : m.units;
                            }
                            if (m.valueUint64 != null && m.hasOwnProperty("valueUint64")) {
                                if (typeof m.valueUint64 === "number")
                                    d.valueUint64 = o.longs === String ? String(m.valueUint64) : m.valueUint64;
                                else
                                    d.valueUint64 = o.longs === String ? $util.Long.prototype.toString.call(m.valueUint64) : o.longs === Number ? new $util.LongBits(m.valueUint64.low >>> 0, m.valueUint64.high >>> 0).toNumber(true) : m.valueUint64;
                            }
                            if (m.valueString != null && m.hasOwnProperty("valueString")) {
                                d.valueString = m.valueString;
                            }
                            return d;
                        };

                        /**
                         * Converts this MemoryNodeEntry to JSON.
                         * @function toJSON
                         * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        MemoryNodeEntry.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                        };

                        /**
                         * Units enum.
                         * @name perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryNode.MemoryNodeEntry.Units
                         * @enum {number}
                         * @property {number} UNSPECIFIED=0 UNSPECIFIED value
                         * @property {number} BYTES=1 BYTES value
                         * @property {number} COUNT=2 COUNT value
                         */
                        MemoryNodeEntry.Units = (function() {
                            var valuesById = {}, values = Object.create(valuesById);
                            values[valuesById[0] = "UNSPECIFIED"] = 0;
                            values[valuesById[1] = "BYTES"] = 1;
                            values[valuesById[2] = "COUNT"] = 2;
                            return values;
                        })();

                        return MemoryNodeEntry;
                    })();

                    return MemoryNode;
                })();

                ProcessSnapshot.MemoryEdge = (function() {

                    /**
                     * Properties of a MemoryEdge.
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot
                     * @interface IMemoryEdge
                     * @property {number|null} [sourceId] MemoryEdge sourceId
                     * @property {number|null} [targetId] MemoryEdge targetId
                     * @property {number|null} [importance] MemoryEdge importance
                     * @property {boolean|null} [overridable] MemoryEdge overridable
                     */

                    /**
                     * Constructs a new MemoryEdge.
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot
                     * @classdesc Represents a MemoryEdge.
                     * @implements IMemoryEdge
                     * @constructor
                     * @param {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.IMemoryEdge=} [p] Properties to set
                     */
                    function MemoryEdge(p) {
                        if (p)
                            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                                if (p[ks[i]] != null)
                                    this[ks[i]] = p[ks[i]];
                    }

                    /**
                     * MemoryEdge sourceId.
                     * @member {number} sourceId
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge
                     * @instance
                     */
                    MemoryEdge.prototype.sourceId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                    /**
                     * MemoryEdge targetId.
                     * @member {number} targetId
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge
                     * @instance
                     */
                    MemoryEdge.prototype.targetId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                    /**
                     * MemoryEdge importance.
                     * @member {number} importance
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge
                     * @instance
                     */
                    MemoryEdge.prototype.importance = 0;

                    /**
                     * MemoryEdge overridable.
                     * @member {boolean} overridable
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge
                     * @instance
                     */
                    MemoryEdge.prototype.overridable = false;

                    /**
                     * Creates a new MemoryEdge instance using the specified properties.
                     * @function create
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge
                     * @static
                     * @param {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.IMemoryEdge=} [properties] Properties to set
                     * @returns {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge} MemoryEdge instance
                     */
                    MemoryEdge.create = function create(properties) {
                        return new MemoryEdge(properties);
                    };

                    /**
                     * Encodes the specified MemoryEdge message. Does not implicitly {@link perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge.verify|verify} messages.
                     * @function encode
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge
                     * @static
                     * @param {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.IMemoryEdge} m MemoryEdge message or plain object to encode
                     * @param {$protobuf.Writer} [w] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    MemoryEdge.encode = function encode(m, w) {
                        if (!w)
                            w = $Writer.create();
                        if (m.sourceId != null && Object.hasOwnProperty.call(m, "sourceId"))
                            w.uint32(8).uint64(m.sourceId);
                        if (m.targetId != null && Object.hasOwnProperty.call(m, "targetId"))
                            w.uint32(16).uint64(m.targetId);
                        if (m.importance != null && Object.hasOwnProperty.call(m, "importance"))
                            w.uint32(24).uint32(m.importance);
                        if (m.overridable != null && Object.hasOwnProperty.call(m, "overridable"))
                            w.uint32(32).bool(m.overridable);
                        return w;
                    };

                    /**
                     * Encodes the specified MemoryEdge message, length delimited. Does not implicitly {@link perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge
                     * @static
                     * @param {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.IMemoryEdge} message MemoryEdge message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    MemoryEdge.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a MemoryEdge message from the specified reader or buffer.
                     * @function decode
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                     * @param {number} [l] Message length if known beforehand
                     * @returns {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge} MemoryEdge
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    MemoryEdge.decode = function decode(r, l) {
                        if (!(r instanceof $Reader))
                            r = $Reader.create(r);
                        var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge();
                        while (r.pos < c) {
                            var t = r.uint32();
                            switch (t >>> 3) {
                            case 1:
                                m.sourceId = r.uint64();
                                break;
                            case 2:
                                m.targetId = r.uint64();
                                break;
                            case 3:
                                m.importance = r.uint32();
                                break;
                            case 4:
                                m.overridable = r.bool();
                                break;
                            default:
                                r.skipType(t & 7);
                                break;
                            }
                        }
                        return m;
                    };

                    /**
                     * Decodes a MemoryEdge message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge} MemoryEdge
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    MemoryEdge.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a MemoryEdge message.
                     * @function verify
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge
                     * @static
                     * @param {Object.<string,*>} m Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    MemoryEdge.verify = function verify(m) {
                        if (typeof m !== "object" || m === null)
                            return "object expected";
                        if (m.sourceId != null && m.hasOwnProperty("sourceId")) {
                            if (!$util.isInteger(m.sourceId) && !(m.sourceId && $util.isInteger(m.sourceId.low) && $util.isInteger(m.sourceId.high)))
                                return "sourceId: integer|Long expected";
                        }
                        if (m.targetId != null && m.hasOwnProperty("targetId")) {
                            if (!$util.isInteger(m.targetId) && !(m.targetId && $util.isInteger(m.targetId.low) && $util.isInteger(m.targetId.high)))
                                return "targetId: integer|Long expected";
                        }
                        if (m.importance != null && m.hasOwnProperty("importance")) {
                            if (!$util.isInteger(m.importance))
                                return "importance: integer expected";
                        }
                        if (m.overridable != null && m.hasOwnProperty("overridable")) {
                            if (typeof m.overridable !== "boolean")
                                return "overridable: boolean expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a MemoryEdge message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge
                     * @static
                     * @param {Object.<string,*>} d Plain object
                     * @returns {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge} MemoryEdge
                     */
                    MemoryEdge.fromObject = function fromObject(d) {
                        if (d instanceof $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge)
                            return d;
                        var m = new $root.perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge();
                        if (d.sourceId != null) {
                            if ($util.Long)
                                (m.sourceId = $util.Long.fromValue(d.sourceId)).unsigned = true;
                            else if (typeof d.sourceId === "string")
                                m.sourceId = parseInt(d.sourceId, 10);
                            else if (typeof d.sourceId === "number")
                                m.sourceId = d.sourceId;
                            else if (typeof d.sourceId === "object")
                                m.sourceId = new $util.LongBits(d.sourceId.low >>> 0, d.sourceId.high >>> 0).toNumber(true);
                        }
                        if (d.targetId != null) {
                            if ($util.Long)
                                (m.targetId = $util.Long.fromValue(d.targetId)).unsigned = true;
                            else if (typeof d.targetId === "string")
                                m.targetId = parseInt(d.targetId, 10);
                            else if (typeof d.targetId === "number")
                                m.targetId = d.targetId;
                            else if (typeof d.targetId === "object")
                                m.targetId = new $util.LongBits(d.targetId.low >>> 0, d.targetId.high >>> 0).toNumber(true);
                        }
                        if (d.importance != null) {
                            m.importance = d.importance >>> 0;
                        }
                        if (d.overridable != null) {
                            m.overridable = Boolean(d.overridable);
                        }
                        return m;
                    };

                    /**
                     * Creates a plain object from a MemoryEdge message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge
                     * @static
                     * @param {perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge} m MemoryEdge
                     * @param {$protobuf.IConversionOptions} [o] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    MemoryEdge.toObject = function toObject(m, o) {
                        if (!o)
                            o = {};
                        var d = {};
                        if (o.defaults) {
                            if ($util.Long) {
                                var n = new $util.Long(0, 0, true);
                                d.sourceId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                            } else
                                d.sourceId = o.longs === String ? "0" : 0;
                            if ($util.Long) {
                                var n = new $util.Long(0, 0, true);
                                d.targetId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                            } else
                                d.targetId = o.longs === String ? "0" : 0;
                            d.importance = 0;
                            d.overridable = false;
                        }
                        if (m.sourceId != null && m.hasOwnProperty("sourceId")) {
                            if (typeof m.sourceId === "number")
                                d.sourceId = o.longs === String ? String(m.sourceId) : m.sourceId;
                            else
                                d.sourceId = o.longs === String ? $util.Long.prototype.toString.call(m.sourceId) : o.longs === Number ? new $util.LongBits(m.sourceId.low >>> 0, m.sourceId.high >>> 0).toNumber(true) : m.sourceId;
                        }
                        if (m.targetId != null && m.hasOwnProperty("targetId")) {
                            if (typeof m.targetId === "number")
                                d.targetId = o.longs === String ? String(m.targetId) : m.targetId;
                            else
                                d.targetId = o.longs === String ? $util.Long.prototype.toString.call(m.targetId) : o.longs === Number ? new $util.LongBits(m.targetId.low >>> 0, m.targetId.high >>> 0).toNumber(true) : m.targetId;
                        }
                        if (m.importance != null && m.hasOwnProperty("importance")) {
                            d.importance = m.importance;
                        }
                        if (m.overridable != null && m.hasOwnProperty("overridable")) {
                            d.overridable = m.overridable;
                        }
                        return d;
                    };

                    /**
                     * Converts this MemoryEdge to JSON.
                     * @function toJSON
                     * @memberof perfetto.protos.MemoryTrackerSnapshot.ProcessSnapshot.MemoryEdge
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    MemoryEdge.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                    };

                    return MemoryEdge;
                })();

                return ProcessSnapshot;
            })();

            /**
             * LevelOfDetail enum.
             * @name perfetto.protos.MemoryTrackerSnapshot.LevelOfDetail
             * @enum {number}
             * @property {number} DETAIL_FULL=0 DETAIL_FULL value
             * @property {number} DETAIL_LIGHT=1 DETAIL_LIGHT value
             * @property {number} DETAIL_BACKGROUND=2 DETAIL_BACKGROUND value
             */
            MemoryTrackerSnapshot.LevelOfDetail = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "DETAIL_FULL"] = 0;
                values[valuesById[1] = "DETAIL_LIGHT"] = 1;
                values[valuesById[2] = "DETAIL_BACKGROUND"] = 2;
                return values;
            })();

            return MemoryTrackerSnapshot;
        })();

        protos.TracingServiceEvent = (function() {

            /**
             * Properties of a TracingServiceEvent.
             * @memberof perfetto.protos
             * @interface ITracingServiceEvent
             * @property {boolean|null} [tracingStarted] TracingServiceEvent tracingStarted
             * @property {boolean|null} [allDataSourcesStarted] TracingServiceEvent allDataSourcesStarted
             * @property {boolean|null} [allDataSourcesFlushed] TracingServiceEvent allDataSourcesFlushed
             * @property {boolean|null} [readTracingBuffersCompleted] TracingServiceEvent readTracingBuffersCompleted
             * @property {boolean|null} [tracingDisabled] TracingServiceEvent tracingDisabled
             * @property {boolean|null} [seizedForBugreport] TracingServiceEvent seizedForBugreport
             */

            /**
             * Constructs a new TracingServiceEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TracingServiceEvent.
             * @implements ITracingServiceEvent
             * @constructor
             * @param {perfetto.protos.ITracingServiceEvent=} [p] Properties to set
             */
            function TracingServiceEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TracingServiceEvent tracingStarted.
             * @member {boolean} tracingStarted
             * @memberof perfetto.protos.TracingServiceEvent
             * @instance
             */
            TracingServiceEvent.prototype.tracingStarted = false;

            /**
             * TracingServiceEvent allDataSourcesStarted.
             * @member {boolean} allDataSourcesStarted
             * @memberof perfetto.protos.TracingServiceEvent
             * @instance
             */
            TracingServiceEvent.prototype.allDataSourcesStarted = false;

            /**
             * TracingServiceEvent allDataSourcesFlushed.
             * @member {boolean} allDataSourcesFlushed
             * @memberof perfetto.protos.TracingServiceEvent
             * @instance
             */
            TracingServiceEvent.prototype.allDataSourcesFlushed = false;

            /**
             * TracingServiceEvent readTracingBuffersCompleted.
             * @member {boolean} readTracingBuffersCompleted
             * @memberof perfetto.protos.TracingServiceEvent
             * @instance
             */
            TracingServiceEvent.prototype.readTracingBuffersCompleted = false;

            /**
             * TracingServiceEvent tracingDisabled.
             * @member {boolean} tracingDisabled
             * @memberof perfetto.protos.TracingServiceEvent
             * @instance
             */
            TracingServiceEvent.prototype.tracingDisabled = false;

            /**
             * TracingServiceEvent seizedForBugreport.
             * @member {boolean} seizedForBugreport
             * @memberof perfetto.protos.TracingServiceEvent
             * @instance
             */
            TracingServiceEvent.prototype.seizedForBugreport = false;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * TracingServiceEvent eventType.
             * @member {"tracingStarted"|"allDataSourcesStarted"|"allDataSourcesFlushed"|"readTracingBuffersCompleted"|"tracingDisabled"|"seizedForBugreport"|undefined} eventType
             * @memberof perfetto.protos.TracingServiceEvent
             * @instance
             */
            Object.defineProperty(TracingServiceEvent.prototype, "eventType", {
                get: $util.oneOfGetter($oneOfFields = ["tracingStarted", "allDataSourcesStarted", "allDataSourcesFlushed", "readTracingBuffersCompleted", "tracingDisabled", "seizedForBugreport"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new TracingServiceEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TracingServiceEvent
             * @static
             * @param {perfetto.protos.ITracingServiceEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TracingServiceEvent} TracingServiceEvent instance
             */
            TracingServiceEvent.create = function create(properties) {
                return new TracingServiceEvent(properties);
            };

            /**
             * Encodes the specified TracingServiceEvent message. Does not implicitly {@link perfetto.protos.TracingServiceEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TracingServiceEvent
             * @static
             * @param {perfetto.protos.ITracingServiceEvent} m TracingServiceEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TracingServiceEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.allDataSourcesStarted != null && Object.hasOwnProperty.call(m, "allDataSourcesStarted"))
                    w.uint32(8).bool(m.allDataSourcesStarted);
                if (m.tracingStarted != null && Object.hasOwnProperty.call(m, "tracingStarted"))
                    w.uint32(16).bool(m.tracingStarted);
                if (m.allDataSourcesFlushed != null && Object.hasOwnProperty.call(m, "allDataSourcesFlushed"))
                    w.uint32(24).bool(m.allDataSourcesFlushed);
                if (m.readTracingBuffersCompleted != null && Object.hasOwnProperty.call(m, "readTracingBuffersCompleted"))
                    w.uint32(32).bool(m.readTracingBuffersCompleted);
                if (m.tracingDisabled != null && Object.hasOwnProperty.call(m, "tracingDisabled"))
                    w.uint32(40).bool(m.tracingDisabled);
                if (m.seizedForBugreport != null && Object.hasOwnProperty.call(m, "seizedForBugreport"))
                    w.uint32(48).bool(m.seizedForBugreport);
                return w;
            };

            /**
             * Encodes the specified TracingServiceEvent message, length delimited. Does not implicitly {@link perfetto.protos.TracingServiceEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TracingServiceEvent
             * @static
             * @param {perfetto.protos.ITracingServiceEvent} message TracingServiceEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TracingServiceEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TracingServiceEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TracingServiceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TracingServiceEvent} TracingServiceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TracingServiceEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TracingServiceEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 2:
                        m.tracingStarted = r.bool();
                        break;
                    case 1:
                        m.allDataSourcesStarted = r.bool();
                        break;
                    case 3:
                        m.allDataSourcesFlushed = r.bool();
                        break;
                    case 4:
                        m.readTracingBuffersCompleted = r.bool();
                        break;
                    case 5:
                        m.tracingDisabled = r.bool();
                        break;
                    case 6:
                        m.seizedForBugreport = r.bool();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TracingServiceEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TracingServiceEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TracingServiceEvent} TracingServiceEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TracingServiceEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TracingServiceEvent message.
             * @function verify
             * @memberof perfetto.protos.TracingServiceEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TracingServiceEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                var p = {};
                if (m.tracingStarted != null && m.hasOwnProperty("tracingStarted")) {
                    p.eventType = 1;
                    if (typeof m.tracingStarted !== "boolean")
                        return "tracingStarted: boolean expected";
                }
                if (m.allDataSourcesStarted != null && m.hasOwnProperty("allDataSourcesStarted")) {
                    if (p.eventType === 1)
                        return "eventType: multiple values";
                    p.eventType = 1;
                    if (typeof m.allDataSourcesStarted !== "boolean")
                        return "allDataSourcesStarted: boolean expected";
                }
                if (m.allDataSourcesFlushed != null && m.hasOwnProperty("allDataSourcesFlushed")) {
                    if (p.eventType === 1)
                        return "eventType: multiple values";
                    p.eventType = 1;
                    if (typeof m.allDataSourcesFlushed !== "boolean")
                        return "allDataSourcesFlushed: boolean expected";
                }
                if (m.readTracingBuffersCompleted != null && m.hasOwnProperty("readTracingBuffersCompleted")) {
                    if (p.eventType === 1)
                        return "eventType: multiple values";
                    p.eventType = 1;
                    if (typeof m.readTracingBuffersCompleted !== "boolean")
                        return "readTracingBuffersCompleted: boolean expected";
                }
                if (m.tracingDisabled != null && m.hasOwnProperty("tracingDisabled")) {
                    if (p.eventType === 1)
                        return "eventType: multiple values";
                    p.eventType = 1;
                    if (typeof m.tracingDisabled !== "boolean")
                        return "tracingDisabled: boolean expected";
                }
                if (m.seizedForBugreport != null && m.hasOwnProperty("seizedForBugreport")) {
                    if (p.eventType === 1)
                        return "eventType: multiple values";
                    p.eventType = 1;
                    if (typeof m.seizedForBugreport !== "boolean")
                        return "seizedForBugreport: boolean expected";
                }
                return null;
            };

            /**
             * Creates a TracingServiceEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TracingServiceEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TracingServiceEvent} TracingServiceEvent
             */
            TracingServiceEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TracingServiceEvent)
                    return d;
                var m = new $root.perfetto.protos.TracingServiceEvent();
                if (d.tracingStarted != null) {
                    m.tracingStarted = Boolean(d.tracingStarted);
                }
                if (d.allDataSourcesStarted != null) {
                    m.allDataSourcesStarted = Boolean(d.allDataSourcesStarted);
                }
                if (d.allDataSourcesFlushed != null) {
                    m.allDataSourcesFlushed = Boolean(d.allDataSourcesFlushed);
                }
                if (d.readTracingBuffersCompleted != null) {
                    m.readTracingBuffersCompleted = Boolean(d.readTracingBuffersCompleted);
                }
                if (d.tracingDisabled != null) {
                    m.tracingDisabled = Boolean(d.tracingDisabled);
                }
                if (d.seizedForBugreport != null) {
                    m.seizedForBugreport = Boolean(d.seizedForBugreport);
                }
                return m;
            };

            /**
             * Creates a plain object from a TracingServiceEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TracingServiceEvent
             * @static
             * @param {perfetto.protos.TracingServiceEvent} m TracingServiceEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TracingServiceEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (m.allDataSourcesStarted != null && m.hasOwnProperty("allDataSourcesStarted")) {
                    d.allDataSourcesStarted = m.allDataSourcesStarted;
                    if (o.oneofs)
                        d.eventType = "allDataSourcesStarted";
                }
                if (m.tracingStarted != null && m.hasOwnProperty("tracingStarted")) {
                    d.tracingStarted = m.tracingStarted;
                    if (o.oneofs)
                        d.eventType = "tracingStarted";
                }
                if (m.allDataSourcesFlushed != null && m.hasOwnProperty("allDataSourcesFlushed")) {
                    d.allDataSourcesFlushed = m.allDataSourcesFlushed;
                    if (o.oneofs)
                        d.eventType = "allDataSourcesFlushed";
                }
                if (m.readTracingBuffersCompleted != null && m.hasOwnProperty("readTracingBuffersCompleted")) {
                    d.readTracingBuffersCompleted = m.readTracingBuffersCompleted;
                    if (o.oneofs)
                        d.eventType = "readTracingBuffersCompleted";
                }
                if (m.tracingDisabled != null && m.hasOwnProperty("tracingDisabled")) {
                    d.tracingDisabled = m.tracingDisabled;
                    if (o.oneofs)
                        d.eventType = "tracingDisabled";
                }
                if (m.seizedForBugreport != null && m.hasOwnProperty("seizedForBugreport")) {
                    d.seizedForBugreport = m.seizedForBugreport;
                    if (o.oneofs)
                        d.eventType = "seizedForBugreport";
                }
                return d;
            };

            /**
             * Converts this TracingServiceEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TracingServiceEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TracingServiceEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TracingServiceEvent;
        })();

        protos.AndroidEnergyEstimationBreakdown = (function() {

            /**
             * Properties of an AndroidEnergyEstimationBreakdown.
             * @memberof perfetto.protos
             * @interface IAndroidEnergyEstimationBreakdown
             * @property {perfetto.protos.IAndroidEnergyConsumerDescriptor|null} [energyConsumerDescriptor] AndroidEnergyEstimationBreakdown energyConsumerDescriptor
             * @property {number|null} [energyConsumerId] AndroidEnergyEstimationBreakdown energyConsumerId
             * @property {number|null} [energyUws] AndroidEnergyEstimationBreakdown energyUws
             * @property {Array.<perfetto.protos.AndroidEnergyEstimationBreakdown.IEnergyUidBreakdown>|null} [perUidBreakdown] AndroidEnergyEstimationBreakdown perUidBreakdown
             */

            /**
             * Constructs a new AndroidEnergyEstimationBreakdown.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidEnergyEstimationBreakdown.
             * @implements IAndroidEnergyEstimationBreakdown
             * @constructor
             * @param {perfetto.protos.IAndroidEnergyEstimationBreakdown=} [p] Properties to set
             */
            function AndroidEnergyEstimationBreakdown(p) {
                this.perUidBreakdown = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidEnergyEstimationBreakdown energyConsumerDescriptor.
             * @member {perfetto.protos.IAndroidEnergyConsumerDescriptor|null|undefined} energyConsumerDescriptor
             * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown
             * @instance
             */
            AndroidEnergyEstimationBreakdown.prototype.energyConsumerDescriptor = null;

            /**
             * AndroidEnergyEstimationBreakdown energyConsumerId.
             * @member {number} energyConsumerId
             * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown
             * @instance
             */
            AndroidEnergyEstimationBreakdown.prototype.energyConsumerId = 0;

            /**
             * AndroidEnergyEstimationBreakdown energyUws.
             * @member {number} energyUws
             * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown
             * @instance
             */
            AndroidEnergyEstimationBreakdown.prototype.energyUws = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * AndroidEnergyEstimationBreakdown perUidBreakdown.
             * @member {Array.<perfetto.protos.AndroidEnergyEstimationBreakdown.IEnergyUidBreakdown>} perUidBreakdown
             * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown
             * @instance
             */
            AndroidEnergyEstimationBreakdown.prototype.perUidBreakdown = $util.emptyArray;

            /**
             * Creates a new AndroidEnergyEstimationBreakdown instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown
             * @static
             * @param {perfetto.protos.IAndroidEnergyEstimationBreakdown=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidEnergyEstimationBreakdown} AndroidEnergyEstimationBreakdown instance
             */
            AndroidEnergyEstimationBreakdown.create = function create(properties) {
                return new AndroidEnergyEstimationBreakdown(properties);
            };

            /**
             * Encodes the specified AndroidEnergyEstimationBreakdown message. Does not implicitly {@link perfetto.protos.AndroidEnergyEstimationBreakdown.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown
             * @static
             * @param {perfetto.protos.IAndroidEnergyEstimationBreakdown} m AndroidEnergyEstimationBreakdown message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidEnergyEstimationBreakdown.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.energyConsumerDescriptor != null && Object.hasOwnProperty.call(m, "energyConsumerDescriptor"))
                    $root.perfetto.protos.AndroidEnergyConsumerDescriptor.encode(m.energyConsumerDescriptor, w.uint32(10).fork()).ldelim();
                if (m.energyConsumerId != null && Object.hasOwnProperty.call(m, "energyConsumerId"))
                    w.uint32(16).int32(m.energyConsumerId);
                if (m.energyUws != null && Object.hasOwnProperty.call(m, "energyUws"))
                    w.uint32(24).int64(m.energyUws);
                if (m.perUidBreakdown != null && m.perUidBreakdown.length) {
                    for (var i = 0; i < m.perUidBreakdown.length; ++i)
                        $root.perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown.encode(m.perUidBreakdown[i], w.uint32(34).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified AndroidEnergyEstimationBreakdown message, length delimited. Does not implicitly {@link perfetto.protos.AndroidEnergyEstimationBreakdown.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown
             * @static
             * @param {perfetto.protos.IAndroidEnergyEstimationBreakdown} message AndroidEnergyEstimationBreakdown message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidEnergyEstimationBreakdown.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidEnergyEstimationBreakdown message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidEnergyEstimationBreakdown} AndroidEnergyEstimationBreakdown
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidEnergyEstimationBreakdown.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidEnergyEstimationBreakdown();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.energyConsumerDescriptor = $root.perfetto.protos.AndroidEnergyConsumerDescriptor.decode(r, r.uint32());
                        break;
                    case 2:
                        m.energyConsumerId = r.int32();
                        break;
                    case 3:
                        m.energyUws = r.int64();
                        break;
                    case 4:
                        if (!(m.perUidBreakdown && m.perUidBreakdown.length))
                            m.perUidBreakdown = [];
                        m.perUidBreakdown.push($root.perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidEnergyEstimationBreakdown message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidEnergyEstimationBreakdown} AndroidEnergyEstimationBreakdown
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidEnergyEstimationBreakdown.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidEnergyEstimationBreakdown message.
             * @function verify
             * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidEnergyEstimationBreakdown.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.energyConsumerDescriptor != null && m.hasOwnProperty("energyConsumerDescriptor")) {
                    {
                        var e = $root.perfetto.protos.AndroidEnergyConsumerDescriptor.verify(m.energyConsumerDescriptor);
                        if (e)
                            return "energyConsumerDescriptor." + e;
                    }
                }
                if (m.energyConsumerId != null && m.hasOwnProperty("energyConsumerId")) {
                    if (!$util.isInteger(m.energyConsumerId))
                        return "energyConsumerId: integer expected";
                }
                if (m.energyUws != null && m.hasOwnProperty("energyUws")) {
                    if (!$util.isInteger(m.energyUws) && !(m.energyUws && $util.isInteger(m.energyUws.low) && $util.isInteger(m.energyUws.high)))
                        return "energyUws: integer|Long expected";
                }
                if (m.perUidBreakdown != null && m.hasOwnProperty("perUidBreakdown")) {
                    if (!Array.isArray(m.perUidBreakdown))
                        return "perUidBreakdown: array expected";
                    for (var i = 0; i < m.perUidBreakdown.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown.verify(m.perUidBreakdown[i]);
                            if (e)
                                return "perUidBreakdown." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidEnergyEstimationBreakdown message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidEnergyEstimationBreakdown} AndroidEnergyEstimationBreakdown
             */
            AndroidEnergyEstimationBreakdown.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidEnergyEstimationBreakdown)
                    return d;
                var m = new $root.perfetto.protos.AndroidEnergyEstimationBreakdown();
                if (d.energyConsumerDescriptor != null) {
                    if (typeof d.energyConsumerDescriptor !== "object")
                        throw TypeError(".perfetto.protos.AndroidEnergyEstimationBreakdown.energyConsumerDescriptor: object expected");
                    m.energyConsumerDescriptor = $root.perfetto.protos.AndroidEnergyConsumerDescriptor.fromObject(d.energyConsumerDescriptor);
                }
                if (d.energyConsumerId != null) {
                    m.energyConsumerId = d.energyConsumerId | 0;
                }
                if (d.energyUws != null) {
                    if ($util.Long)
                        (m.energyUws = $util.Long.fromValue(d.energyUws)).unsigned = false;
                    else if (typeof d.energyUws === "string")
                        m.energyUws = parseInt(d.energyUws, 10);
                    else if (typeof d.energyUws === "number")
                        m.energyUws = d.energyUws;
                    else if (typeof d.energyUws === "object")
                        m.energyUws = new $util.LongBits(d.energyUws.low >>> 0, d.energyUws.high >>> 0).toNumber();
                }
                if (d.perUidBreakdown) {
                    if (!Array.isArray(d.perUidBreakdown))
                        throw TypeError(".perfetto.protos.AndroidEnergyEstimationBreakdown.perUidBreakdown: array expected");
                    m.perUidBreakdown = [];
                    for (var i = 0; i < d.perUidBreakdown.length; ++i) {
                        if (typeof d.perUidBreakdown[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidEnergyEstimationBreakdown.perUidBreakdown: object expected");
                        m.perUidBreakdown[i] = $root.perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown.fromObject(d.perUidBreakdown[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidEnergyEstimationBreakdown message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown
             * @static
             * @param {perfetto.protos.AndroidEnergyEstimationBreakdown} m AndroidEnergyEstimationBreakdown
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidEnergyEstimationBreakdown.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.perUidBreakdown = [];
                }
                if (o.defaults) {
                    d.energyConsumerDescriptor = null;
                    d.energyConsumerId = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.energyUws = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.energyUws = o.longs === String ? "0" : 0;
                }
                if (m.energyConsumerDescriptor != null && m.hasOwnProperty("energyConsumerDescriptor")) {
                    d.energyConsumerDescriptor = $root.perfetto.protos.AndroidEnergyConsumerDescriptor.toObject(m.energyConsumerDescriptor, o);
                }
                if (m.energyConsumerId != null && m.hasOwnProperty("energyConsumerId")) {
                    d.energyConsumerId = m.energyConsumerId;
                }
                if (m.energyUws != null && m.hasOwnProperty("energyUws")) {
                    if (typeof m.energyUws === "number")
                        d.energyUws = o.longs === String ? String(m.energyUws) : m.energyUws;
                    else
                        d.energyUws = o.longs === String ? $util.Long.prototype.toString.call(m.energyUws) : o.longs === Number ? new $util.LongBits(m.energyUws.low >>> 0, m.energyUws.high >>> 0).toNumber() : m.energyUws;
                }
                if (m.perUidBreakdown && m.perUidBreakdown.length) {
                    d.perUidBreakdown = [];
                    for (var j = 0; j < m.perUidBreakdown.length; ++j) {
                        d.perUidBreakdown[j] = $root.perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown.toObject(m.perUidBreakdown[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidEnergyEstimationBreakdown to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidEnergyEstimationBreakdown.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            AndroidEnergyEstimationBreakdown.EnergyUidBreakdown = (function() {

                /**
                 * Properties of an EnergyUidBreakdown.
                 * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown
                 * @interface IEnergyUidBreakdown
                 * @property {number|null} [uid] EnergyUidBreakdown uid
                 * @property {number|null} [energyUws] EnergyUidBreakdown energyUws
                 */

                /**
                 * Constructs a new EnergyUidBreakdown.
                 * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown
                 * @classdesc Represents an EnergyUidBreakdown.
                 * @implements IEnergyUidBreakdown
                 * @constructor
                 * @param {perfetto.protos.AndroidEnergyEstimationBreakdown.IEnergyUidBreakdown=} [p] Properties to set
                 */
                function EnergyUidBreakdown(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * EnergyUidBreakdown uid.
                 * @member {number} uid
                 * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown
                 * @instance
                 */
                EnergyUidBreakdown.prototype.uid = 0;

                /**
                 * EnergyUidBreakdown energyUws.
                 * @member {number} energyUws
                 * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown
                 * @instance
                 */
                EnergyUidBreakdown.prototype.energyUws = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Creates a new EnergyUidBreakdown instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown
                 * @static
                 * @param {perfetto.protos.AndroidEnergyEstimationBreakdown.IEnergyUidBreakdown=} [properties] Properties to set
                 * @returns {perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown} EnergyUidBreakdown instance
                 */
                EnergyUidBreakdown.create = function create(properties) {
                    return new EnergyUidBreakdown(properties);
                };

                /**
                 * Encodes the specified EnergyUidBreakdown message. Does not implicitly {@link perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown
                 * @static
                 * @param {perfetto.protos.AndroidEnergyEstimationBreakdown.IEnergyUidBreakdown} m EnergyUidBreakdown message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                EnergyUidBreakdown.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.uid != null && Object.hasOwnProperty.call(m, "uid"))
                        w.uint32(8).int32(m.uid);
                    if (m.energyUws != null && Object.hasOwnProperty.call(m, "energyUws"))
                        w.uint32(16).int64(m.energyUws);
                    return w;
                };

                /**
                 * Encodes the specified EnergyUidBreakdown message, length delimited. Does not implicitly {@link perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown
                 * @static
                 * @param {perfetto.protos.AndroidEnergyEstimationBreakdown.IEnergyUidBreakdown} message EnergyUidBreakdown message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                EnergyUidBreakdown.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an EnergyUidBreakdown message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown} EnergyUidBreakdown
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                EnergyUidBreakdown.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.uid = r.int32();
                            break;
                        case 2:
                            m.energyUws = r.int64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an EnergyUidBreakdown message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown} EnergyUidBreakdown
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                EnergyUidBreakdown.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an EnergyUidBreakdown message.
                 * @function verify
                 * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                EnergyUidBreakdown.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.uid != null && m.hasOwnProperty("uid")) {
                        if (!$util.isInteger(m.uid))
                            return "uid: integer expected";
                    }
                    if (m.energyUws != null && m.hasOwnProperty("energyUws")) {
                        if (!$util.isInteger(m.energyUws) && !(m.energyUws && $util.isInteger(m.energyUws.low) && $util.isInteger(m.energyUws.high)))
                            return "energyUws: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates an EnergyUidBreakdown message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown} EnergyUidBreakdown
                 */
                EnergyUidBreakdown.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown)
                        return d;
                    var m = new $root.perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown();
                    if (d.uid != null) {
                        m.uid = d.uid | 0;
                    }
                    if (d.energyUws != null) {
                        if ($util.Long)
                            (m.energyUws = $util.Long.fromValue(d.energyUws)).unsigned = false;
                        else if (typeof d.energyUws === "string")
                            m.energyUws = parseInt(d.energyUws, 10);
                        else if (typeof d.energyUws === "number")
                            m.energyUws = d.energyUws;
                        else if (typeof d.energyUws === "object")
                            m.energyUws = new $util.LongBits(d.energyUws.low >>> 0, d.energyUws.high >>> 0).toNumber();
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an EnergyUidBreakdown message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown
                 * @static
                 * @param {perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown} m EnergyUidBreakdown
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                EnergyUidBreakdown.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.uid = 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.energyUws = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.energyUws = o.longs === String ? "0" : 0;
                    }
                    if (m.uid != null && m.hasOwnProperty("uid")) {
                        d.uid = m.uid;
                    }
                    if (m.energyUws != null && m.hasOwnProperty("energyUws")) {
                        if (typeof m.energyUws === "number")
                            d.energyUws = o.longs === String ? String(m.energyUws) : m.energyUws;
                        else
                            d.energyUws = o.longs === String ? $util.Long.prototype.toString.call(m.energyUws) : o.longs === Number ? new $util.LongBits(m.energyUws.low >>> 0, m.energyUws.high >>> 0).toNumber() : m.energyUws;
                    }
                    return d;
                };

                /**
                 * Converts this EnergyUidBreakdown to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.AndroidEnergyEstimationBreakdown.EnergyUidBreakdown
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                EnergyUidBreakdown.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return EnergyUidBreakdown;
            })();

            return AndroidEnergyEstimationBreakdown;
        })();

        protos.AndroidEnergyConsumer = (function() {

            /**
             * Properties of an AndroidEnergyConsumer.
             * @memberof perfetto.protos
             * @interface IAndroidEnergyConsumer
             * @property {number|null} [energyConsumerId] AndroidEnergyConsumer energyConsumerId
             * @property {number|null} [ordinal] AndroidEnergyConsumer ordinal
             * @property {string|null} [type] AndroidEnergyConsumer type
             * @property {string|null} [name] AndroidEnergyConsumer name
             */

            /**
             * Constructs a new AndroidEnergyConsumer.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidEnergyConsumer.
             * @implements IAndroidEnergyConsumer
             * @constructor
             * @param {perfetto.protos.IAndroidEnergyConsumer=} [p] Properties to set
             */
            function AndroidEnergyConsumer(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidEnergyConsumer energyConsumerId.
             * @member {number} energyConsumerId
             * @memberof perfetto.protos.AndroidEnergyConsumer
             * @instance
             */
            AndroidEnergyConsumer.prototype.energyConsumerId = 0;

            /**
             * AndroidEnergyConsumer ordinal.
             * @member {number} ordinal
             * @memberof perfetto.protos.AndroidEnergyConsumer
             * @instance
             */
            AndroidEnergyConsumer.prototype.ordinal = 0;

            /**
             * AndroidEnergyConsumer type.
             * @member {string} type
             * @memberof perfetto.protos.AndroidEnergyConsumer
             * @instance
             */
            AndroidEnergyConsumer.prototype.type = "";

            /**
             * AndroidEnergyConsumer name.
             * @member {string} name
             * @memberof perfetto.protos.AndroidEnergyConsumer
             * @instance
             */
            AndroidEnergyConsumer.prototype.name = "";

            /**
             * Creates a new AndroidEnergyConsumer instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidEnergyConsumer
             * @static
             * @param {perfetto.protos.IAndroidEnergyConsumer=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidEnergyConsumer} AndroidEnergyConsumer instance
             */
            AndroidEnergyConsumer.create = function create(properties) {
                return new AndroidEnergyConsumer(properties);
            };

            /**
             * Encodes the specified AndroidEnergyConsumer message. Does not implicitly {@link perfetto.protos.AndroidEnergyConsumer.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidEnergyConsumer
             * @static
             * @param {perfetto.protos.IAndroidEnergyConsumer} m AndroidEnergyConsumer message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidEnergyConsumer.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.energyConsumerId != null && Object.hasOwnProperty.call(m, "energyConsumerId"))
                    w.uint32(8).int32(m.energyConsumerId);
                if (m.ordinal != null && Object.hasOwnProperty.call(m, "ordinal"))
                    w.uint32(16).int32(m.ordinal);
                if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                    w.uint32(26).string(m.type);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(34).string(m.name);
                return w;
            };

            /**
             * Encodes the specified AndroidEnergyConsumer message, length delimited. Does not implicitly {@link perfetto.protos.AndroidEnergyConsumer.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidEnergyConsumer
             * @static
             * @param {perfetto.protos.IAndroidEnergyConsumer} message AndroidEnergyConsumer message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidEnergyConsumer.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidEnergyConsumer message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidEnergyConsumer
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidEnergyConsumer} AndroidEnergyConsumer
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidEnergyConsumer.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidEnergyConsumer();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.energyConsumerId = r.int32();
                        break;
                    case 2:
                        m.ordinal = r.int32();
                        break;
                    case 3:
                        m.type = r.string();
                        break;
                    case 4:
                        m.name = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidEnergyConsumer message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidEnergyConsumer
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidEnergyConsumer} AndroidEnergyConsumer
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidEnergyConsumer.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidEnergyConsumer message.
             * @function verify
             * @memberof perfetto.protos.AndroidEnergyConsumer
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidEnergyConsumer.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.energyConsumerId != null && m.hasOwnProperty("energyConsumerId")) {
                    if (!$util.isInteger(m.energyConsumerId))
                        return "energyConsumerId: integer expected";
                }
                if (m.ordinal != null && m.hasOwnProperty("ordinal")) {
                    if (!$util.isInteger(m.ordinal))
                        return "ordinal: integer expected";
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    if (!$util.isString(m.type))
                        return "type: string expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                return null;
            };

            /**
             * Creates an AndroidEnergyConsumer message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidEnergyConsumer
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidEnergyConsumer} AndroidEnergyConsumer
             */
            AndroidEnergyConsumer.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidEnergyConsumer)
                    return d;
                var m = new $root.perfetto.protos.AndroidEnergyConsumer();
                if (d.energyConsumerId != null) {
                    m.energyConsumerId = d.energyConsumerId | 0;
                }
                if (d.ordinal != null) {
                    m.ordinal = d.ordinal | 0;
                }
                if (d.type != null) {
                    m.type = String(d.type);
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidEnergyConsumer message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidEnergyConsumer
             * @static
             * @param {perfetto.protos.AndroidEnergyConsumer} m AndroidEnergyConsumer
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidEnergyConsumer.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.energyConsumerId = 0;
                    d.ordinal = 0;
                    d.type = "";
                    d.name = "";
                }
                if (m.energyConsumerId != null && m.hasOwnProperty("energyConsumerId")) {
                    d.energyConsumerId = m.energyConsumerId;
                }
                if (m.ordinal != null && m.hasOwnProperty("ordinal")) {
                    d.ordinal = m.ordinal;
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    d.type = m.type;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                return d;
            };

            /**
             * Converts this AndroidEnergyConsumer to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidEnergyConsumer
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidEnergyConsumer.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AndroidEnergyConsumer;
        })();

        protos.AndroidEnergyConsumerDescriptor = (function() {

            /**
             * Properties of an AndroidEnergyConsumerDescriptor.
             * @memberof perfetto.protos
             * @interface IAndroidEnergyConsumerDescriptor
             * @property {Array.<perfetto.protos.IAndroidEnergyConsumer>|null} [energyConsumers] AndroidEnergyConsumerDescriptor energyConsumers
             */

            /**
             * Constructs a new AndroidEnergyConsumerDescriptor.
             * @memberof perfetto.protos
             * @classdesc Represents an AndroidEnergyConsumerDescriptor.
             * @implements IAndroidEnergyConsumerDescriptor
             * @constructor
             * @param {perfetto.protos.IAndroidEnergyConsumerDescriptor=} [p] Properties to set
             */
            function AndroidEnergyConsumerDescriptor(p) {
                this.energyConsumers = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AndroidEnergyConsumerDescriptor energyConsumers.
             * @member {Array.<perfetto.protos.IAndroidEnergyConsumer>} energyConsumers
             * @memberof perfetto.protos.AndroidEnergyConsumerDescriptor
             * @instance
             */
            AndroidEnergyConsumerDescriptor.prototype.energyConsumers = $util.emptyArray;

            /**
             * Creates a new AndroidEnergyConsumerDescriptor instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AndroidEnergyConsumerDescriptor
             * @static
             * @param {perfetto.protos.IAndroidEnergyConsumerDescriptor=} [properties] Properties to set
             * @returns {perfetto.protos.AndroidEnergyConsumerDescriptor} AndroidEnergyConsumerDescriptor instance
             */
            AndroidEnergyConsumerDescriptor.create = function create(properties) {
                return new AndroidEnergyConsumerDescriptor(properties);
            };

            /**
             * Encodes the specified AndroidEnergyConsumerDescriptor message. Does not implicitly {@link perfetto.protos.AndroidEnergyConsumerDescriptor.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AndroidEnergyConsumerDescriptor
             * @static
             * @param {perfetto.protos.IAndroidEnergyConsumerDescriptor} m AndroidEnergyConsumerDescriptor message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidEnergyConsumerDescriptor.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.energyConsumers != null && m.energyConsumers.length) {
                    for (var i = 0; i < m.energyConsumers.length; ++i)
                        $root.perfetto.protos.AndroidEnergyConsumer.encode(m.energyConsumers[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified AndroidEnergyConsumerDescriptor message, length delimited. Does not implicitly {@link perfetto.protos.AndroidEnergyConsumerDescriptor.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AndroidEnergyConsumerDescriptor
             * @static
             * @param {perfetto.protos.IAndroidEnergyConsumerDescriptor} message AndroidEnergyConsumerDescriptor message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AndroidEnergyConsumerDescriptor.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AndroidEnergyConsumerDescriptor message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AndroidEnergyConsumerDescriptor
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AndroidEnergyConsumerDescriptor} AndroidEnergyConsumerDescriptor
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidEnergyConsumerDescriptor.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AndroidEnergyConsumerDescriptor();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.energyConsumers && m.energyConsumers.length))
                            m.energyConsumers = [];
                        m.energyConsumers.push($root.perfetto.protos.AndroidEnergyConsumer.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AndroidEnergyConsumerDescriptor message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AndroidEnergyConsumerDescriptor
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AndroidEnergyConsumerDescriptor} AndroidEnergyConsumerDescriptor
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AndroidEnergyConsumerDescriptor.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AndroidEnergyConsumerDescriptor message.
             * @function verify
             * @memberof perfetto.protos.AndroidEnergyConsumerDescriptor
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AndroidEnergyConsumerDescriptor.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.energyConsumers != null && m.hasOwnProperty("energyConsumers")) {
                    if (!Array.isArray(m.energyConsumers))
                        return "energyConsumers: array expected";
                    for (var i = 0; i < m.energyConsumers.length; ++i) {
                        {
                            var e = $root.perfetto.protos.AndroidEnergyConsumer.verify(m.energyConsumers[i]);
                            if (e)
                                return "energyConsumers." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an AndroidEnergyConsumerDescriptor message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AndroidEnergyConsumerDescriptor
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AndroidEnergyConsumerDescriptor} AndroidEnergyConsumerDescriptor
             */
            AndroidEnergyConsumerDescriptor.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AndroidEnergyConsumerDescriptor)
                    return d;
                var m = new $root.perfetto.protos.AndroidEnergyConsumerDescriptor();
                if (d.energyConsumers) {
                    if (!Array.isArray(d.energyConsumers))
                        throw TypeError(".perfetto.protos.AndroidEnergyConsumerDescriptor.energyConsumers: array expected");
                    m.energyConsumers = [];
                    for (var i = 0; i < d.energyConsumers.length; ++i) {
                        if (typeof d.energyConsumers[i] !== "object")
                            throw TypeError(".perfetto.protos.AndroidEnergyConsumerDescriptor.energyConsumers: object expected");
                        m.energyConsumers[i] = $root.perfetto.protos.AndroidEnergyConsumer.fromObject(d.energyConsumers[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an AndroidEnergyConsumerDescriptor message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AndroidEnergyConsumerDescriptor
             * @static
             * @param {perfetto.protos.AndroidEnergyConsumerDescriptor} m AndroidEnergyConsumerDescriptor
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AndroidEnergyConsumerDescriptor.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.energyConsumers = [];
                }
                if (m.energyConsumers && m.energyConsumers.length) {
                    d.energyConsumers = [];
                    for (var j = 0; j < m.energyConsumers.length; ++j) {
                        d.energyConsumers[j] = $root.perfetto.protos.AndroidEnergyConsumer.toObject(m.energyConsumers[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this AndroidEnergyConsumerDescriptor to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AndroidEnergyConsumerDescriptor
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AndroidEnergyConsumerDescriptor.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AndroidEnergyConsumerDescriptor;
        })();

        protos.BatteryCounters = (function() {

            /**
             * Properties of a BatteryCounters.
             * @memberof perfetto.protos
             * @interface IBatteryCounters
             * @property {number|null} [chargeCounterUah] BatteryCounters chargeCounterUah
             * @property {number|null} [capacityPercent] BatteryCounters capacityPercent
             * @property {number|null} [currentUa] BatteryCounters currentUa
             * @property {number|null} [currentAvgUa] BatteryCounters currentAvgUa
             * @property {string|null} [name] BatteryCounters name
             */

            /**
             * Constructs a new BatteryCounters.
             * @memberof perfetto.protos
             * @classdesc Represents a BatteryCounters.
             * @implements IBatteryCounters
             * @constructor
             * @param {perfetto.protos.IBatteryCounters=} [p] Properties to set
             */
            function BatteryCounters(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * BatteryCounters chargeCounterUah.
             * @member {number} chargeCounterUah
             * @memberof perfetto.protos.BatteryCounters
             * @instance
             */
            BatteryCounters.prototype.chargeCounterUah = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * BatteryCounters capacityPercent.
             * @member {number} capacityPercent
             * @memberof perfetto.protos.BatteryCounters
             * @instance
             */
            BatteryCounters.prototype.capacityPercent = 0;

            /**
             * BatteryCounters currentUa.
             * @member {number} currentUa
             * @memberof perfetto.protos.BatteryCounters
             * @instance
             */
            BatteryCounters.prototype.currentUa = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * BatteryCounters currentAvgUa.
             * @member {number} currentAvgUa
             * @memberof perfetto.protos.BatteryCounters
             * @instance
             */
            BatteryCounters.prototype.currentAvgUa = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * BatteryCounters name.
             * @member {string} name
             * @memberof perfetto.protos.BatteryCounters
             * @instance
             */
            BatteryCounters.prototype.name = "";

            /**
             * Creates a new BatteryCounters instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.BatteryCounters
             * @static
             * @param {perfetto.protos.IBatteryCounters=} [properties] Properties to set
             * @returns {perfetto.protos.BatteryCounters} BatteryCounters instance
             */
            BatteryCounters.create = function create(properties) {
                return new BatteryCounters(properties);
            };

            /**
             * Encodes the specified BatteryCounters message. Does not implicitly {@link perfetto.protos.BatteryCounters.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.BatteryCounters
             * @static
             * @param {perfetto.protos.IBatteryCounters} m BatteryCounters message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BatteryCounters.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.chargeCounterUah != null && Object.hasOwnProperty.call(m, "chargeCounterUah"))
                    w.uint32(8).int64(m.chargeCounterUah);
                if (m.capacityPercent != null && Object.hasOwnProperty.call(m, "capacityPercent"))
                    w.uint32(21).float(m.capacityPercent);
                if (m.currentUa != null && Object.hasOwnProperty.call(m, "currentUa"))
                    w.uint32(24).int64(m.currentUa);
                if (m.currentAvgUa != null && Object.hasOwnProperty.call(m, "currentAvgUa"))
                    w.uint32(32).int64(m.currentAvgUa);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(42).string(m.name);
                return w;
            };

            /**
             * Encodes the specified BatteryCounters message, length delimited. Does not implicitly {@link perfetto.protos.BatteryCounters.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.BatteryCounters
             * @static
             * @param {perfetto.protos.IBatteryCounters} message BatteryCounters message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            BatteryCounters.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a BatteryCounters message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.BatteryCounters
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.BatteryCounters} BatteryCounters
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BatteryCounters.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.BatteryCounters();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.chargeCounterUah = r.int64();
                        break;
                    case 2:
                        m.capacityPercent = r.float();
                        break;
                    case 3:
                        m.currentUa = r.int64();
                        break;
                    case 4:
                        m.currentAvgUa = r.int64();
                        break;
                    case 5:
                        m.name = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a BatteryCounters message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.BatteryCounters
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.BatteryCounters} BatteryCounters
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            BatteryCounters.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a BatteryCounters message.
             * @function verify
             * @memberof perfetto.protos.BatteryCounters
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            BatteryCounters.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.chargeCounterUah != null && m.hasOwnProperty("chargeCounterUah")) {
                    if (!$util.isInteger(m.chargeCounterUah) && !(m.chargeCounterUah && $util.isInteger(m.chargeCounterUah.low) && $util.isInteger(m.chargeCounterUah.high)))
                        return "chargeCounterUah: integer|Long expected";
                }
                if (m.capacityPercent != null && m.hasOwnProperty("capacityPercent")) {
                    if (typeof m.capacityPercent !== "number")
                        return "capacityPercent: number expected";
                }
                if (m.currentUa != null && m.hasOwnProperty("currentUa")) {
                    if (!$util.isInteger(m.currentUa) && !(m.currentUa && $util.isInteger(m.currentUa.low) && $util.isInteger(m.currentUa.high)))
                        return "currentUa: integer|Long expected";
                }
                if (m.currentAvgUa != null && m.hasOwnProperty("currentAvgUa")) {
                    if (!$util.isInteger(m.currentAvgUa) && !(m.currentAvgUa && $util.isInteger(m.currentAvgUa.low) && $util.isInteger(m.currentAvgUa.high)))
                        return "currentAvgUa: integer|Long expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                return null;
            };

            /**
             * Creates a BatteryCounters message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.BatteryCounters
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.BatteryCounters} BatteryCounters
             */
            BatteryCounters.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.BatteryCounters)
                    return d;
                var m = new $root.perfetto.protos.BatteryCounters();
                if (d.chargeCounterUah != null) {
                    if ($util.Long)
                        (m.chargeCounterUah = $util.Long.fromValue(d.chargeCounterUah)).unsigned = false;
                    else if (typeof d.chargeCounterUah === "string")
                        m.chargeCounterUah = parseInt(d.chargeCounterUah, 10);
                    else if (typeof d.chargeCounterUah === "number")
                        m.chargeCounterUah = d.chargeCounterUah;
                    else if (typeof d.chargeCounterUah === "object")
                        m.chargeCounterUah = new $util.LongBits(d.chargeCounterUah.low >>> 0, d.chargeCounterUah.high >>> 0).toNumber();
                }
                if (d.capacityPercent != null) {
                    m.capacityPercent = Number(d.capacityPercent);
                }
                if (d.currentUa != null) {
                    if ($util.Long)
                        (m.currentUa = $util.Long.fromValue(d.currentUa)).unsigned = false;
                    else if (typeof d.currentUa === "string")
                        m.currentUa = parseInt(d.currentUa, 10);
                    else if (typeof d.currentUa === "number")
                        m.currentUa = d.currentUa;
                    else if (typeof d.currentUa === "object")
                        m.currentUa = new $util.LongBits(d.currentUa.low >>> 0, d.currentUa.high >>> 0).toNumber();
                }
                if (d.currentAvgUa != null) {
                    if ($util.Long)
                        (m.currentAvgUa = $util.Long.fromValue(d.currentAvgUa)).unsigned = false;
                    else if (typeof d.currentAvgUa === "string")
                        m.currentAvgUa = parseInt(d.currentAvgUa, 10);
                    else if (typeof d.currentAvgUa === "number")
                        m.currentAvgUa = d.currentAvgUa;
                    else if (typeof d.currentAvgUa === "object")
                        m.currentAvgUa = new $util.LongBits(d.currentAvgUa.low >>> 0, d.currentAvgUa.high >>> 0).toNumber();
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                return m;
            };

            /**
             * Creates a plain object from a BatteryCounters message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.BatteryCounters
             * @static
             * @param {perfetto.protos.BatteryCounters} m BatteryCounters
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            BatteryCounters.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.chargeCounterUah = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.chargeCounterUah = o.longs === String ? "0" : 0;
                    d.capacityPercent = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.currentUa = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.currentUa = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.currentAvgUa = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.currentAvgUa = o.longs === String ? "0" : 0;
                    d.name = "";
                }
                if (m.chargeCounterUah != null && m.hasOwnProperty("chargeCounterUah")) {
                    if (typeof m.chargeCounterUah === "number")
                        d.chargeCounterUah = o.longs === String ? String(m.chargeCounterUah) : m.chargeCounterUah;
                    else
                        d.chargeCounterUah = o.longs === String ? $util.Long.prototype.toString.call(m.chargeCounterUah) : o.longs === Number ? new $util.LongBits(m.chargeCounterUah.low >>> 0, m.chargeCounterUah.high >>> 0).toNumber() : m.chargeCounterUah;
                }
                if (m.capacityPercent != null && m.hasOwnProperty("capacityPercent")) {
                    d.capacityPercent = o.json && !isFinite(m.capacityPercent) ? String(m.capacityPercent) : m.capacityPercent;
                }
                if (m.currentUa != null && m.hasOwnProperty("currentUa")) {
                    if (typeof m.currentUa === "number")
                        d.currentUa = o.longs === String ? String(m.currentUa) : m.currentUa;
                    else
                        d.currentUa = o.longs === String ? $util.Long.prototype.toString.call(m.currentUa) : o.longs === Number ? new $util.LongBits(m.currentUa.low >>> 0, m.currentUa.high >>> 0).toNumber() : m.currentUa;
                }
                if (m.currentAvgUa != null && m.hasOwnProperty("currentAvgUa")) {
                    if (typeof m.currentAvgUa === "number")
                        d.currentAvgUa = o.longs === String ? String(m.currentAvgUa) : m.currentAvgUa;
                    else
                        d.currentAvgUa = o.longs === String ? $util.Long.prototype.toString.call(m.currentAvgUa) : o.longs === Number ? new $util.LongBits(m.currentAvgUa.low >>> 0, m.currentAvgUa.high >>> 0).toNumber() : m.currentAvgUa;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                return d;
            };

            /**
             * Converts this BatteryCounters to JSON.
             * @function toJSON
             * @memberof perfetto.protos.BatteryCounters
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            BatteryCounters.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return BatteryCounters;
        })();

        protos.PowerRails = (function() {

            /**
             * Properties of a PowerRails.
             * @memberof perfetto.protos
             * @interface IPowerRails
             * @property {Array.<perfetto.protos.PowerRails.IRailDescriptor>|null} [railDescriptor] PowerRails railDescriptor
             * @property {Array.<perfetto.protos.PowerRails.IEnergyData>|null} [energyData] PowerRails energyData
             */

            /**
             * Constructs a new PowerRails.
             * @memberof perfetto.protos
             * @classdesc Represents a PowerRails.
             * @implements IPowerRails
             * @constructor
             * @param {perfetto.protos.IPowerRails=} [p] Properties to set
             */
            function PowerRails(p) {
                this.railDescriptor = [];
                this.energyData = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * PowerRails railDescriptor.
             * @member {Array.<perfetto.protos.PowerRails.IRailDescriptor>} railDescriptor
             * @memberof perfetto.protos.PowerRails
             * @instance
             */
            PowerRails.prototype.railDescriptor = $util.emptyArray;

            /**
             * PowerRails energyData.
             * @member {Array.<perfetto.protos.PowerRails.IEnergyData>} energyData
             * @memberof perfetto.protos.PowerRails
             * @instance
             */
            PowerRails.prototype.energyData = $util.emptyArray;

            /**
             * Creates a new PowerRails instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.PowerRails
             * @static
             * @param {perfetto.protos.IPowerRails=} [properties] Properties to set
             * @returns {perfetto.protos.PowerRails} PowerRails instance
             */
            PowerRails.create = function create(properties) {
                return new PowerRails(properties);
            };

            /**
             * Encodes the specified PowerRails message. Does not implicitly {@link perfetto.protos.PowerRails.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.PowerRails
             * @static
             * @param {perfetto.protos.IPowerRails} m PowerRails message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PowerRails.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.railDescriptor != null && m.railDescriptor.length) {
                    for (var i = 0; i < m.railDescriptor.length; ++i)
                        $root.perfetto.protos.PowerRails.RailDescriptor.encode(m.railDescriptor[i], w.uint32(10).fork()).ldelim();
                }
                if (m.energyData != null && m.energyData.length) {
                    for (var i = 0; i < m.energyData.length; ++i)
                        $root.perfetto.protos.PowerRails.EnergyData.encode(m.energyData[i], w.uint32(18).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified PowerRails message, length delimited. Does not implicitly {@link perfetto.protos.PowerRails.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.PowerRails
             * @static
             * @param {perfetto.protos.IPowerRails} message PowerRails message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PowerRails.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a PowerRails message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.PowerRails
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.PowerRails} PowerRails
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PowerRails.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.PowerRails();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.railDescriptor && m.railDescriptor.length))
                            m.railDescriptor = [];
                        m.railDescriptor.push($root.perfetto.protos.PowerRails.RailDescriptor.decode(r, r.uint32()));
                        break;
                    case 2:
                        if (!(m.energyData && m.energyData.length))
                            m.energyData = [];
                        m.energyData.push($root.perfetto.protos.PowerRails.EnergyData.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a PowerRails message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.PowerRails
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.PowerRails} PowerRails
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PowerRails.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a PowerRails message.
             * @function verify
             * @memberof perfetto.protos.PowerRails
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            PowerRails.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.railDescriptor != null && m.hasOwnProperty("railDescriptor")) {
                    if (!Array.isArray(m.railDescriptor))
                        return "railDescriptor: array expected";
                    for (var i = 0; i < m.railDescriptor.length; ++i) {
                        {
                            var e = $root.perfetto.protos.PowerRails.RailDescriptor.verify(m.railDescriptor[i]);
                            if (e)
                                return "railDescriptor." + e;
                        }
                    }
                }
                if (m.energyData != null && m.hasOwnProperty("energyData")) {
                    if (!Array.isArray(m.energyData))
                        return "energyData: array expected";
                    for (var i = 0; i < m.energyData.length; ++i) {
                        {
                            var e = $root.perfetto.protos.PowerRails.EnergyData.verify(m.energyData[i]);
                            if (e)
                                return "energyData." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a PowerRails message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.PowerRails
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.PowerRails} PowerRails
             */
            PowerRails.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.PowerRails)
                    return d;
                var m = new $root.perfetto.protos.PowerRails();
                if (d.railDescriptor) {
                    if (!Array.isArray(d.railDescriptor))
                        throw TypeError(".perfetto.protos.PowerRails.railDescriptor: array expected");
                    m.railDescriptor = [];
                    for (var i = 0; i < d.railDescriptor.length; ++i) {
                        if (typeof d.railDescriptor[i] !== "object")
                            throw TypeError(".perfetto.protos.PowerRails.railDescriptor: object expected");
                        m.railDescriptor[i] = $root.perfetto.protos.PowerRails.RailDescriptor.fromObject(d.railDescriptor[i]);
                    }
                }
                if (d.energyData) {
                    if (!Array.isArray(d.energyData))
                        throw TypeError(".perfetto.protos.PowerRails.energyData: array expected");
                    m.energyData = [];
                    for (var i = 0; i < d.energyData.length; ++i) {
                        if (typeof d.energyData[i] !== "object")
                            throw TypeError(".perfetto.protos.PowerRails.energyData: object expected");
                        m.energyData[i] = $root.perfetto.protos.PowerRails.EnergyData.fromObject(d.energyData[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a PowerRails message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.PowerRails
             * @static
             * @param {perfetto.protos.PowerRails} m PowerRails
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            PowerRails.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.railDescriptor = [];
                    d.energyData = [];
                }
                if (m.railDescriptor && m.railDescriptor.length) {
                    d.railDescriptor = [];
                    for (var j = 0; j < m.railDescriptor.length; ++j) {
                        d.railDescriptor[j] = $root.perfetto.protos.PowerRails.RailDescriptor.toObject(m.railDescriptor[j], o);
                    }
                }
                if (m.energyData && m.energyData.length) {
                    d.energyData = [];
                    for (var j = 0; j < m.energyData.length; ++j) {
                        d.energyData[j] = $root.perfetto.protos.PowerRails.EnergyData.toObject(m.energyData[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this PowerRails to JSON.
             * @function toJSON
             * @memberof perfetto.protos.PowerRails
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            PowerRails.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            PowerRails.RailDescriptor = (function() {

                /**
                 * Properties of a RailDescriptor.
                 * @memberof perfetto.protos.PowerRails
                 * @interface IRailDescriptor
                 * @property {number|null} [index] RailDescriptor index
                 * @property {string|null} [railName] RailDescriptor railName
                 * @property {string|null} [subsysName] RailDescriptor subsysName
                 * @property {number|null} [samplingRate] RailDescriptor samplingRate
                 */

                /**
                 * Constructs a new RailDescriptor.
                 * @memberof perfetto.protos.PowerRails
                 * @classdesc Represents a RailDescriptor.
                 * @implements IRailDescriptor
                 * @constructor
                 * @param {perfetto.protos.PowerRails.IRailDescriptor=} [p] Properties to set
                 */
                function RailDescriptor(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * RailDescriptor index.
                 * @member {number} index
                 * @memberof perfetto.protos.PowerRails.RailDescriptor
                 * @instance
                 */
                RailDescriptor.prototype.index = 0;

                /**
                 * RailDescriptor railName.
                 * @member {string} railName
                 * @memberof perfetto.protos.PowerRails.RailDescriptor
                 * @instance
                 */
                RailDescriptor.prototype.railName = "";

                /**
                 * RailDescriptor subsysName.
                 * @member {string} subsysName
                 * @memberof perfetto.protos.PowerRails.RailDescriptor
                 * @instance
                 */
                RailDescriptor.prototype.subsysName = "";

                /**
                 * RailDescriptor samplingRate.
                 * @member {number} samplingRate
                 * @memberof perfetto.protos.PowerRails.RailDescriptor
                 * @instance
                 */
                RailDescriptor.prototype.samplingRate = 0;

                /**
                 * Creates a new RailDescriptor instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.PowerRails.RailDescriptor
                 * @static
                 * @param {perfetto.protos.PowerRails.IRailDescriptor=} [properties] Properties to set
                 * @returns {perfetto.protos.PowerRails.RailDescriptor} RailDescriptor instance
                 */
                RailDescriptor.create = function create(properties) {
                    return new RailDescriptor(properties);
                };

                /**
                 * Encodes the specified RailDescriptor message. Does not implicitly {@link perfetto.protos.PowerRails.RailDescriptor.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.PowerRails.RailDescriptor
                 * @static
                 * @param {perfetto.protos.PowerRails.IRailDescriptor} m RailDescriptor message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                RailDescriptor.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.index != null && Object.hasOwnProperty.call(m, "index"))
                        w.uint32(8).uint32(m.index);
                    if (m.railName != null && Object.hasOwnProperty.call(m, "railName"))
                        w.uint32(18).string(m.railName);
                    if (m.subsysName != null && Object.hasOwnProperty.call(m, "subsysName"))
                        w.uint32(26).string(m.subsysName);
                    if (m.samplingRate != null && Object.hasOwnProperty.call(m, "samplingRate"))
                        w.uint32(32).uint32(m.samplingRate);
                    return w;
                };

                /**
                 * Encodes the specified RailDescriptor message, length delimited. Does not implicitly {@link perfetto.protos.PowerRails.RailDescriptor.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.PowerRails.RailDescriptor
                 * @static
                 * @param {perfetto.protos.PowerRails.IRailDescriptor} message RailDescriptor message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                RailDescriptor.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a RailDescriptor message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.PowerRails.RailDescriptor
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.PowerRails.RailDescriptor} RailDescriptor
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                RailDescriptor.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.PowerRails.RailDescriptor();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.index = r.uint32();
                            break;
                        case 2:
                            m.railName = r.string();
                            break;
                        case 3:
                            m.subsysName = r.string();
                            break;
                        case 4:
                            m.samplingRate = r.uint32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a RailDescriptor message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.PowerRails.RailDescriptor
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.PowerRails.RailDescriptor} RailDescriptor
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                RailDescriptor.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a RailDescriptor message.
                 * @function verify
                 * @memberof perfetto.protos.PowerRails.RailDescriptor
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                RailDescriptor.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.index != null && m.hasOwnProperty("index")) {
                        if (!$util.isInteger(m.index))
                            return "index: integer expected";
                    }
                    if (m.railName != null && m.hasOwnProperty("railName")) {
                        if (!$util.isString(m.railName))
                            return "railName: string expected";
                    }
                    if (m.subsysName != null && m.hasOwnProperty("subsysName")) {
                        if (!$util.isString(m.subsysName))
                            return "subsysName: string expected";
                    }
                    if (m.samplingRate != null && m.hasOwnProperty("samplingRate")) {
                        if (!$util.isInteger(m.samplingRate))
                            return "samplingRate: integer expected";
                    }
                    return null;
                };

                /**
                 * Creates a RailDescriptor message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.PowerRails.RailDescriptor
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.PowerRails.RailDescriptor} RailDescriptor
                 */
                RailDescriptor.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.PowerRails.RailDescriptor)
                        return d;
                    var m = new $root.perfetto.protos.PowerRails.RailDescriptor();
                    if (d.index != null) {
                        m.index = d.index >>> 0;
                    }
                    if (d.railName != null) {
                        m.railName = String(d.railName);
                    }
                    if (d.subsysName != null) {
                        m.subsysName = String(d.subsysName);
                    }
                    if (d.samplingRate != null) {
                        m.samplingRate = d.samplingRate >>> 0;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a RailDescriptor message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.PowerRails.RailDescriptor
                 * @static
                 * @param {perfetto.protos.PowerRails.RailDescriptor} m RailDescriptor
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                RailDescriptor.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.index = 0;
                        d.railName = "";
                        d.subsysName = "";
                        d.samplingRate = 0;
                    }
                    if (m.index != null && m.hasOwnProperty("index")) {
                        d.index = m.index;
                    }
                    if (m.railName != null && m.hasOwnProperty("railName")) {
                        d.railName = m.railName;
                    }
                    if (m.subsysName != null && m.hasOwnProperty("subsysName")) {
                        d.subsysName = m.subsysName;
                    }
                    if (m.samplingRate != null && m.hasOwnProperty("samplingRate")) {
                        d.samplingRate = m.samplingRate;
                    }
                    return d;
                };

                /**
                 * Converts this RailDescriptor to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.PowerRails.RailDescriptor
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                RailDescriptor.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return RailDescriptor;
            })();

            PowerRails.EnergyData = (function() {

                /**
                 * Properties of an EnergyData.
                 * @memberof perfetto.protos.PowerRails
                 * @interface IEnergyData
                 * @property {number|null} [index] EnergyData index
                 * @property {number|null} [timestampMs] EnergyData timestampMs
                 * @property {number|null} [energy] EnergyData energy
                 */

                /**
                 * Constructs a new EnergyData.
                 * @memberof perfetto.protos.PowerRails
                 * @classdesc Represents an EnergyData.
                 * @implements IEnergyData
                 * @constructor
                 * @param {perfetto.protos.PowerRails.IEnergyData=} [p] Properties to set
                 */
                function EnergyData(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * EnergyData index.
                 * @member {number} index
                 * @memberof perfetto.protos.PowerRails.EnergyData
                 * @instance
                 */
                EnergyData.prototype.index = 0;

                /**
                 * EnergyData timestampMs.
                 * @member {number} timestampMs
                 * @memberof perfetto.protos.PowerRails.EnergyData
                 * @instance
                 */
                EnergyData.prototype.timestampMs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * EnergyData energy.
                 * @member {number} energy
                 * @memberof perfetto.protos.PowerRails.EnergyData
                 * @instance
                 */
                EnergyData.prototype.energy = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Creates a new EnergyData instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.PowerRails.EnergyData
                 * @static
                 * @param {perfetto.protos.PowerRails.IEnergyData=} [properties] Properties to set
                 * @returns {perfetto.protos.PowerRails.EnergyData} EnergyData instance
                 */
                EnergyData.create = function create(properties) {
                    return new EnergyData(properties);
                };

                /**
                 * Encodes the specified EnergyData message. Does not implicitly {@link perfetto.protos.PowerRails.EnergyData.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.PowerRails.EnergyData
                 * @static
                 * @param {perfetto.protos.PowerRails.IEnergyData} m EnergyData message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                EnergyData.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.index != null && Object.hasOwnProperty.call(m, "index"))
                        w.uint32(8).uint32(m.index);
                    if (m.timestampMs != null && Object.hasOwnProperty.call(m, "timestampMs"))
                        w.uint32(16).uint64(m.timestampMs);
                    if (m.energy != null && Object.hasOwnProperty.call(m, "energy"))
                        w.uint32(24).uint64(m.energy);
                    return w;
                };

                /**
                 * Encodes the specified EnergyData message, length delimited. Does not implicitly {@link perfetto.protos.PowerRails.EnergyData.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.PowerRails.EnergyData
                 * @static
                 * @param {perfetto.protos.PowerRails.IEnergyData} message EnergyData message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                EnergyData.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an EnergyData message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.PowerRails.EnergyData
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.PowerRails.EnergyData} EnergyData
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                EnergyData.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.PowerRails.EnergyData();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.index = r.uint32();
                            break;
                        case 2:
                            m.timestampMs = r.uint64();
                            break;
                        case 3:
                            m.energy = r.uint64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an EnergyData message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.PowerRails.EnergyData
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.PowerRails.EnergyData} EnergyData
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                EnergyData.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an EnergyData message.
                 * @function verify
                 * @memberof perfetto.protos.PowerRails.EnergyData
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                EnergyData.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.index != null && m.hasOwnProperty("index")) {
                        if (!$util.isInteger(m.index))
                            return "index: integer expected";
                    }
                    if (m.timestampMs != null && m.hasOwnProperty("timestampMs")) {
                        if (!$util.isInteger(m.timestampMs) && !(m.timestampMs && $util.isInteger(m.timestampMs.low) && $util.isInteger(m.timestampMs.high)))
                            return "timestampMs: integer|Long expected";
                    }
                    if (m.energy != null && m.hasOwnProperty("energy")) {
                        if (!$util.isInteger(m.energy) && !(m.energy && $util.isInteger(m.energy.low) && $util.isInteger(m.energy.high)))
                            return "energy: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates an EnergyData message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.PowerRails.EnergyData
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.PowerRails.EnergyData} EnergyData
                 */
                EnergyData.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.PowerRails.EnergyData)
                        return d;
                    var m = new $root.perfetto.protos.PowerRails.EnergyData();
                    if (d.index != null) {
                        m.index = d.index >>> 0;
                    }
                    if (d.timestampMs != null) {
                        if ($util.Long)
                            (m.timestampMs = $util.Long.fromValue(d.timestampMs)).unsigned = true;
                        else if (typeof d.timestampMs === "string")
                            m.timestampMs = parseInt(d.timestampMs, 10);
                        else if (typeof d.timestampMs === "number")
                            m.timestampMs = d.timestampMs;
                        else if (typeof d.timestampMs === "object")
                            m.timestampMs = new $util.LongBits(d.timestampMs.low >>> 0, d.timestampMs.high >>> 0).toNumber(true);
                    }
                    if (d.energy != null) {
                        if ($util.Long)
                            (m.energy = $util.Long.fromValue(d.energy)).unsigned = true;
                        else if (typeof d.energy === "string")
                            m.energy = parseInt(d.energy, 10);
                        else if (typeof d.energy === "number")
                            m.energy = d.energy;
                        else if (typeof d.energy === "object")
                            m.energy = new $util.LongBits(d.energy.low >>> 0, d.energy.high >>> 0).toNumber(true);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an EnergyData message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.PowerRails.EnergyData
                 * @static
                 * @param {perfetto.protos.PowerRails.EnergyData} m EnergyData
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                EnergyData.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.index = 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.timestampMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.timestampMs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.energy = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.energy = o.longs === String ? "0" : 0;
                    }
                    if (m.index != null && m.hasOwnProperty("index")) {
                        d.index = m.index;
                    }
                    if (m.timestampMs != null && m.hasOwnProperty("timestampMs")) {
                        if (typeof m.timestampMs === "number")
                            d.timestampMs = o.longs === String ? String(m.timestampMs) : m.timestampMs;
                        else
                            d.timestampMs = o.longs === String ? $util.Long.prototype.toString.call(m.timestampMs) : o.longs === Number ? new $util.LongBits(m.timestampMs.low >>> 0, m.timestampMs.high >>> 0).toNumber(true) : m.timestampMs;
                    }
                    if (m.energy != null && m.hasOwnProperty("energy")) {
                        if (typeof m.energy === "number")
                            d.energy = o.longs === String ? String(m.energy) : m.energy;
                        else
                            d.energy = o.longs === String ? $util.Long.prototype.toString.call(m.energy) : o.longs === Number ? new $util.LongBits(m.energy.low >>> 0, m.energy.high >>> 0).toNumber(true) : m.energy;
                    }
                    return d;
                };

                /**
                 * Converts this EnergyData to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.PowerRails.EnergyData
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                EnergyData.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return EnergyData;
            })();

            return PowerRails;
        })();

        protos.OpaqueAtom = (function() {

            /**
             * Properties of an OpaqueAtom.
             * @memberof perfetto.protos
             * @interface IOpaqueAtom
             */

            /**
             * Constructs a new OpaqueAtom.
             * @memberof perfetto.protos
             * @classdesc Represents an OpaqueAtom.
             * @implements IOpaqueAtom
             * @constructor
             * @param {perfetto.protos.IOpaqueAtom=} [p] Properties to set
             */
            function OpaqueAtom(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Creates a new OpaqueAtom instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.OpaqueAtom
             * @static
             * @param {perfetto.protos.IOpaqueAtom=} [properties] Properties to set
             * @returns {perfetto.protos.OpaqueAtom} OpaqueAtom instance
             */
            OpaqueAtom.create = function create(properties) {
                return new OpaqueAtom(properties);
            };

            /**
             * Encodes the specified OpaqueAtom message. Does not implicitly {@link perfetto.protos.OpaqueAtom.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.OpaqueAtom
             * @static
             * @param {perfetto.protos.IOpaqueAtom} m OpaqueAtom message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            OpaqueAtom.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                return w;
            };

            /**
             * Encodes the specified OpaqueAtom message, length delimited. Does not implicitly {@link perfetto.protos.OpaqueAtom.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.OpaqueAtom
             * @static
             * @param {perfetto.protos.IOpaqueAtom} message OpaqueAtom message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            OpaqueAtom.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an OpaqueAtom message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.OpaqueAtom
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.OpaqueAtom} OpaqueAtom
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            OpaqueAtom.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.OpaqueAtom();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an OpaqueAtom message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.OpaqueAtom
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.OpaqueAtom} OpaqueAtom
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            OpaqueAtom.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an OpaqueAtom message.
             * @function verify
             * @memberof perfetto.protos.OpaqueAtom
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            OpaqueAtom.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates an OpaqueAtom message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.OpaqueAtom
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.OpaqueAtom} OpaqueAtom
             */
            OpaqueAtom.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.OpaqueAtom)
                    return d;
                return new $root.perfetto.protos.OpaqueAtom();
            };

            /**
             * Creates a plain object from an OpaqueAtom message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.OpaqueAtom
             * @static
             * @param {perfetto.protos.OpaqueAtom} m OpaqueAtom
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            OpaqueAtom.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this OpaqueAtom to JSON.
             * @function toJSON
             * @memberof perfetto.protos.OpaqueAtom
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            OpaqueAtom.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return OpaqueAtom;
        })();

        protos.StatsdAtom = (function() {

            /**
             * Properties of a StatsdAtom.
             * @memberof perfetto.protos
             * @interface IStatsdAtom
             * @property {Array.<perfetto.protos.IOpaqueAtom>|null} [nested] StatsdAtom nested
             */

            /**
             * Constructs a new StatsdAtom.
             * @memberof perfetto.protos
             * @classdesc Represents a StatsdAtom.
             * @implements IStatsdAtom
             * @constructor
             * @param {perfetto.protos.IStatsdAtom=} [p] Properties to set
             */
            function StatsdAtom(p) {
                this.nested = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * StatsdAtom nested.
             * @member {Array.<perfetto.protos.IOpaqueAtom>} nested
             * @memberof perfetto.protos.StatsdAtom
             * @instance
             */
            StatsdAtom.prototype.nested = $util.emptyArray;

            /**
             * Creates a new StatsdAtom instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.StatsdAtom
             * @static
             * @param {perfetto.protos.IStatsdAtom=} [properties] Properties to set
             * @returns {perfetto.protos.StatsdAtom} StatsdAtom instance
             */
            StatsdAtom.create = function create(properties) {
                return new StatsdAtom(properties);
            };

            /**
             * Encodes the specified StatsdAtom message. Does not implicitly {@link perfetto.protos.StatsdAtom.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.StatsdAtom
             * @static
             * @param {perfetto.protos.IStatsdAtom} m StatsdAtom message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StatsdAtom.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.nested != null && m.nested.length) {
                    for (var i = 0; i < m.nested.length; ++i)
                        $root.perfetto.protos.OpaqueAtom.encode(m.nested[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified StatsdAtom message, length delimited. Does not implicitly {@link perfetto.protos.StatsdAtom.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.StatsdAtom
             * @static
             * @param {perfetto.protos.IStatsdAtom} message StatsdAtom message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StatsdAtom.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a StatsdAtom message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.StatsdAtom
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.StatsdAtom} StatsdAtom
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatsdAtom.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.StatsdAtom();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.nested && m.nested.length))
                            m.nested = [];
                        m.nested.push($root.perfetto.protos.OpaqueAtom.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a StatsdAtom message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.StatsdAtom
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.StatsdAtom} StatsdAtom
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatsdAtom.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a StatsdAtom message.
             * @function verify
             * @memberof perfetto.protos.StatsdAtom
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            StatsdAtom.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.nested != null && m.hasOwnProperty("nested")) {
                    if (!Array.isArray(m.nested))
                        return "nested: array expected";
                    for (var i = 0; i < m.nested.length; ++i) {
                        {
                            var e = $root.perfetto.protos.OpaqueAtom.verify(m.nested[i]);
                            if (e)
                                return "nested." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a StatsdAtom message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.StatsdAtom
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.StatsdAtom} StatsdAtom
             */
            StatsdAtom.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.StatsdAtom)
                    return d;
                var m = new $root.perfetto.protos.StatsdAtom();
                if (d.nested) {
                    if (!Array.isArray(d.nested))
                        throw TypeError(".perfetto.protos.StatsdAtom.nested: array expected");
                    m.nested = [];
                    for (var i = 0; i < d.nested.length; ++i) {
                        if (typeof d.nested[i] !== "object")
                            throw TypeError(".perfetto.protos.StatsdAtom.nested: object expected");
                        m.nested[i] = $root.perfetto.protos.OpaqueAtom.fromObject(d.nested[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a StatsdAtom message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.StatsdAtom
             * @static
             * @param {perfetto.protos.StatsdAtom} m StatsdAtom
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            StatsdAtom.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.nested = [];
                }
                if (m.nested && m.nested.length) {
                    d.nested = [];
                    for (var j = 0; j < m.nested.length; ++j) {
                        d.nested[j] = $root.perfetto.protos.OpaqueAtom.toObject(m.nested[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this StatsdAtom to JSON.
             * @function toJSON
             * @memberof perfetto.protos.StatsdAtom
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            StatsdAtom.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return StatsdAtom;
        })();

        protos.ObfuscatedMember = (function() {

            /**
             * Properties of an ObfuscatedMember.
             * @memberof perfetto.protos
             * @interface IObfuscatedMember
             * @property {string|null} [obfuscatedName] ObfuscatedMember obfuscatedName
             * @property {string|null} [deobfuscatedName] ObfuscatedMember deobfuscatedName
             */

            /**
             * Constructs a new ObfuscatedMember.
             * @memberof perfetto.protos
             * @classdesc Represents an ObfuscatedMember.
             * @implements IObfuscatedMember
             * @constructor
             * @param {perfetto.protos.IObfuscatedMember=} [p] Properties to set
             */
            function ObfuscatedMember(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ObfuscatedMember obfuscatedName.
             * @member {string} obfuscatedName
             * @memberof perfetto.protos.ObfuscatedMember
             * @instance
             */
            ObfuscatedMember.prototype.obfuscatedName = "";

            /**
             * ObfuscatedMember deobfuscatedName.
             * @member {string} deobfuscatedName
             * @memberof perfetto.protos.ObfuscatedMember
             * @instance
             */
            ObfuscatedMember.prototype.deobfuscatedName = "";

            /**
             * Creates a new ObfuscatedMember instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ObfuscatedMember
             * @static
             * @param {perfetto.protos.IObfuscatedMember=} [properties] Properties to set
             * @returns {perfetto.protos.ObfuscatedMember} ObfuscatedMember instance
             */
            ObfuscatedMember.create = function create(properties) {
                return new ObfuscatedMember(properties);
            };

            /**
             * Encodes the specified ObfuscatedMember message. Does not implicitly {@link perfetto.protos.ObfuscatedMember.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ObfuscatedMember
             * @static
             * @param {perfetto.protos.IObfuscatedMember} m ObfuscatedMember message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ObfuscatedMember.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.obfuscatedName != null && Object.hasOwnProperty.call(m, "obfuscatedName"))
                    w.uint32(10).string(m.obfuscatedName);
                if (m.deobfuscatedName != null && Object.hasOwnProperty.call(m, "deobfuscatedName"))
                    w.uint32(18).string(m.deobfuscatedName);
                return w;
            };

            /**
             * Encodes the specified ObfuscatedMember message, length delimited. Does not implicitly {@link perfetto.protos.ObfuscatedMember.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ObfuscatedMember
             * @static
             * @param {perfetto.protos.IObfuscatedMember} message ObfuscatedMember message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ObfuscatedMember.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an ObfuscatedMember message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ObfuscatedMember
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ObfuscatedMember} ObfuscatedMember
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ObfuscatedMember.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ObfuscatedMember();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.obfuscatedName = r.string();
                        break;
                    case 2:
                        m.deobfuscatedName = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an ObfuscatedMember message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ObfuscatedMember
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ObfuscatedMember} ObfuscatedMember
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ObfuscatedMember.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an ObfuscatedMember message.
             * @function verify
             * @memberof perfetto.protos.ObfuscatedMember
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ObfuscatedMember.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.obfuscatedName != null && m.hasOwnProperty("obfuscatedName")) {
                    if (!$util.isString(m.obfuscatedName))
                        return "obfuscatedName: string expected";
                }
                if (m.deobfuscatedName != null && m.hasOwnProperty("deobfuscatedName")) {
                    if (!$util.isString(m.deobfuscatedName))
                        return "deobfuscatedName: string expected";
                }
                return null;
            };

            /**
             * Creates an ObfuscatedMember message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ObfuscatedMember
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ObfuscatedMember} ObfuscatedMember
             */
            ObfuscatedMember.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ObfuscatedMember)
                    return d;
                var m = new $root.perfetto.protos.ObfuscatedMember();
                if (d.obfuscatedName != null) {
                    m.obfuscatedName = String(d.obfuscatedName);
                }
                if (d.deobfuscatedName != null) {
                    m.deobfuscatedName = String(d.deobfuscatedName);
                }
                return m;
            };

            /**
             * Creates a plain object from an ObfuscatedMember message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ObfuscatedMember
             * @static
             * @param {perfetto.protos.ObfuscatedMember} m ObfuscatedMember
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ObfuscatedMember.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.obfuscatedName = "";
                    d.deobfuscatedName = "";
                }
                if (m.obfuscatedName != null && m.hasOwnProperty("obfuscatedName")) {
                    d.obfuscatedName = m.obfuscatedName;
                }
                if (m.deobfuscatedName != null && m.hasOwnProperty("deobfuscatedName")) {
                    d.deobfuscatedName = m.deobfuscatedName;
                }
                return d;
            };

            /**
             * Converts this ObfuscatedMember to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ObfuscatedMember
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ObfuscatedMember.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ObfuscatedMember;
        })();

        protos.ObfuscatedClass = (function() {

            /**
             * Properties of an ObfuscatedClass.
             * @memberof perfetto.protos
             * @interface IObfuscatedClass
             * @property {string|null} [obfuscatedName] ObfuscatedClass obfuscatedName
             * @property {string|null} [deobfuscatedName] ObfuscatedClass deobfuscatedName
             * @property {Array.<perfetto.protos.IObfuscatedMember>|null} [obfuscatedMembers] ObfuscatedClass obfuscatedMembers
             * @property {Array.<perfetto.protos.IObfuscatedMember>|null} [obfuscatedMethods] ObfuscatedClass obfuscatedMethods
             */

            /**
             * Constructs a new ObfuscatedClass.
             * @memberof perfetto.protos
             * @classdesc Represents an ObfuscatedClass.
             * @implements IObfuscatedClass
             * @constructor
             * @param {perfetto.protos.IObfuscatedClass=} [p] Properties to set
             */
            function ObfuscatedClass(p) {
                this.obfuscatedMembers = [];
                this.obfuscatedMethods = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ObfuscatedClass obfuscatedName.
             * @member {string} obfuscatedName
             * @memberof perfetto.protos.ObfuscatedClass
             * @instance
             */
            ObfuscatedClass.prototype.obfuscatedName = "";

            /**
             * ObfuscatedClass deobfuscatedName.
             * @member {string} deobfuscatedName
             * @memberof perfetto.protos.ObfuscatedClass
             * @instance
             */
            ObfuscatedClass.prototype.deobfuscatedName = "";

            /**
             * ObfuscatedClass obfuscatedMembers.
             * @member {Array.<perfetto.protos.IObfuscatedMember>} obfuscatedMembers
             * @memberof perfetto.protos.ObfuscatedClass
             * @instance
             */
            ObfuscatedClass.prototype.obfuscatedMembers = $util.emptyArray;

            /**
             * ObfuscatedClass obfuscatedMethods.
             * @member {Array.<perfetto.protos.IObfuscatedMember>} obfuscatedMethods
             * @memberof perfetto.protos.ObfuscatedClass
             * @instance
             */
            ObfuscatedClass.prototype.obfuscatedMethods = $util.emptyArray;

            /**
             * Creates a new ObfuscatedClass instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ObfuscatedClass
             * @static
             * @param {perfetto.protos.IObfuscatedClass=} [properties] Properties to set
             * @returns {perfetto.protos.ObfuscatedClass} ObfuscatedClass instance
             */
            ObfuscatedClass.create = function create(properties) {
                return new ObfuscatedClass(properties);
            };

            /**
             * Encodes the specified ObfuscatedClass message. Does not implicitly {@link perfetto.protos.ObfuscatedClass.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ObfuscatedClass
             * @static
             * @param {perfetto.protos.IObfuscatedClass} m ObfuscatedClass message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ObfuscatedClass.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.obfuscatedName != null && Object.hasOwnProperty.call(m, "obfuscatedName"))
                    w.uint32(10).string(m.obfuscatedName);
                if (m.deobfuscatedName != null && Object.hasOwnProperty.call(m, "deobfuscatedName"))
                    w.uint32(18).string(m.deobfuscatedName);
                if (m.obfuscatedMembers != null && m.obfuscatedMembers.length) {
                    for (var i = 0; i < m.obfuscatedMembers.length; ++i)
                        $root.perfetto.protos.ObfuscatedMember.encode(m.obfuscatedMembers[i], w.uint32(26).fork()).ldelim();
                }
                if (m.obfuscatedMethods != null && m.obfuscatedMethods.length) {
                    for (var i = 0; i < m.obfuscatedMethods.length; ++i)
                        $root.perfetto.protos.ObfuscatedMember.encode(m.obfuscatedMethods[i], w.uint32(34).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified ObfuscatedClass message, length delimited. Does not implicitly {@link perfetto.protos.ObfuscatedClass.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ObfuscatedClass
             * @static
             * @param {perfetto.protos.IObfuscatedClass} message ObfuscatedClass message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ObfuscatedClass.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an ObfuscatedClass message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ObfuscatedClass
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ObfuscatedClass} ObfuscatedClass
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ObfuscatedClass.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ObfuscatedClass();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.obfuscatedName = r.string();
                        break;
                    case 2:
                        m.deobfuscatedName = r.string();
                        break;
                    case 3:
                        if (!(m.obfuscatedMembers && m.obfuscatedMembers.length))
                            m.obfuscatedMembers = [];
                        m.obfuscatedMembers.push($root.perfetto.protos.ObfuscatedMember.decode(r, r.uint32()));
                        break;
                    case 4:
                        if (!(m.obfuscatedMethods && m.obfuscatedMethods.length))
                            m.obfuscatedMethods = [];
                        m.obfuscatedMethods.push($root.perfetto.protos.ObfuscatedMember.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an ObfuscatedClass message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ObfuscatedClass
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ObfuscatedClass} ObfuscatedClass
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ObfuscatedClass.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an ObfuscatedClass message.
             * @function verify
             * @memberof perfetto.protos.ObfuscatedClass
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ObfuscatedClass.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.obfuscatedName != null && m.hasOwnProperty("obfuscatedName")) {
                    if (!$util.isString(m.obfuscatedName))
                        return "obfuscatedName: string expected";
                }
                if (m.deobfuscatedName != null && m.hasOwnProperty("deobfuscatedName")) {
                    if (!$util.isString(m.deobfuscatedName))
                        return "deobfuscatedName: string expected";
                }
                if (m.obfuscatedMembers != null && m.hasOwnProperty("obfuscatedMembers")) {
                    if (!Array.isArray(m.obfuscatedMembers))
                        return "obfuscatedMembers: array expected";
                    for (var i = 0; i < m.obfuscatedMembers.length; ++i) {
                        {
                            var e = $root.perfetto.protos.ObfuscatedMember.verify(m.obfuscatedMembers[i]);
                            if (e)
                                return "obfuscatedMembers." + e;
                        }
                    }
                }
                if (m.obfuscatedMethods != null && m.hasOwnProperty("obfuscatedMethods")) {
                    if (!Array.isArray(m.obfuscatedMethods))
                        return "obfuscatedMethods: array expected";
                    for (var i = 0; i < m.obfuscatedMethods.length; ++i) {
                        {
                            var e = $root.perfetto.protos.ObfuscatedMember.verify(m.obfuscatedMethods[i]);
                            if (e)
                                return "obfuscatedMethods." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates an ObfuscatedClass message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ObfuscatedClass
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ObfuscatedClass} ObfuscatedClass
             */
            ObfuscatedClass.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ObfuscatedClass)
                    return d;
                var m = new $root.perfetto.protos.ObfuscatedClass();
                if (d.obfuscatedName != null) {
                    m.obfuscatedName = String(d.obfuscatedName);
                }
                if (d.deobfuscatedName != null) {
                    m.deobfuscatedName = String(d.deobfuscatedName);
                }
                if (d.obfuscatedMembers) {
                    if (!Array.isArray(d.obfuscatedMembers))
                        throw TypeError(".perfetto.protos.ObfuscatedClass.obfuscatedMembers: array expected");
                    m.obfuscatedMembers = [];
                    for (var i = 0; i < d.obfuscatedMembers.length; ++i) {
                        if (typeof d.obfuscatedMembers[i] !== "object")
                            throw TypeError(".perfetto.protos.ObfuscatedClass.obfuscatedMembers: object expected");
                        m.obfuscatedMembers[i] = $root.perfetto.protos.ObfuscatedMember.fromObject(d.obfuscatedMembers[i]);
                    }
                }
                if (d.obfuscatedMethods) {
                    if (!Array.isArray(d.obfuscatedMethods))
                        throw TypeError(".perfetto.protos.ObfuscatedClass.obfuscatedMethods: array expected");
                    m.obfuscatedMethods = [];
                    for (var i = 0; i < d.obfuscatedMethods.length; ++i) {
                        if (typeof d.obfuscatedMethods[i] !== "object")
                            throw TypeError(".perfetto.protos.ObfuscatedClass.obfuscatedMethods: object expected");
                        m.obfuscatedMethods[i] = $root.perfetto.protos.ObfuscatedMember.fromObject(d.obfuscatedMethods[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from an ObfuscatedClass message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ObfuscatedClass
             * @static
             * @param {perfetto.protos.ObfuscatedClass} m ObfuscatedClass
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ObfuscatedClass.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.obfuscatedMembers = [];
                    d.obfuscatedMethods = [];
                }
                if (o.defaults) {
                    d.obfuscatedName = "";
                    d.deobfuscatedName = "";
                }
                if (m.obfuscatedName != null && m.hasOwnProperty("obfuscatedName")) {
                    d.obfuscatedName = m.obfuscatedName;
                }
                if (m.deobfuscatedName != null && m.hasOwnProperty("deobfuscatedName")) {
                    d.deobfuscatedName = m.deobfuscatedName;
                }
                if (m.obfuscatedMembers && m.obfuscatedMembers.length) {
                    d.obfuscatedMembers = [];
                    for (var j = 0; j < m.obfuscatedMembers.length; ++j) {
                        d.obfuscatedMembers[j] = $root.perfetto.protos.ObfuscatedMember.toObject(m.obfuscatedMembers[j], o);
                    }
                }
                if (m.obfuscatedMethods && m.obfuscatedMethods.length) {
                    d.obfuscatedMethods = [];
                    for (var j = 0; j < m.obfuscatedMethods.length; ++j) {
                        d.obfuscatedMethods[j] = $root.perfetto.protos.ObfuscatedMember.toObject(m.obfuscatedMethods[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this ObfuscatedClass to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ObfuscatedClass
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ObfuscatedClass.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ObfuscatedClass;
        })();

        protos.DeobfuscationMapping = (function() {

            /**
             * Properties of a DeobfuscationMapping.
             * @memberof perfetto.protos
             * @interface IDeobfuscationMapping
             * @property {string|null} [packageName] DeobfuscationMapping packageName
             * @property {number|null} [versionCode] DeobfuscationMapping versionCode
             * @property {Array.<perfetto.protos.IObfuscatedClass>|null} [obfuscatedClasses] DeobfuscationMapping obfuscatedClasses
             */

            /**
             * Constructs a new DeobfuscationMapping.
             * @memberof perfetto.protos
             * @classdesc Represents a DeobfuscationMapping.
             * @implements IDeobfuscationMapping
             * @constructor
             * @param {perfetto.protos.IDeobfuscationMapping=} [p] Properties to set
             */
            function DeobfuscationMapping(p) {
                this.obfuscatedClasses = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DeobfuscationMapping packageName.
             * @member {string} packageName
             * @memberof perfetto.protos.DeobfuscationMapping
             * @instance
             */
            DeobfuscationMapping.prototype.packageName = "";

            /**
             * DeobfuscationMapping versionCode.
             * @member {number} versionCode
             * @memberof perfetto.protos.DeobfuscationMapping
             * @instance
             */
            DeobfuscationMapping.prototype.versionCode = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * DeobfuscationMapping obfuscatedClasses.
             * @member {Array.<perfetto.protos.IObfuscatedClass>} obfuscatedClasses
             * @memberof perfetto.protos.DeobfuscationMapping
             * @instance
             */
            DeobfuscationMapping.prototype.obfuscatedClasses = $util.emptyArray;

            /**
             * Creates a new DeobfuscationMapping instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DeobfuscationMapping
             * @static
             * @param {perfetto.protos.IDeobfuscationMapping=} [properties] Properties to set
             * @returns {perfetto.protos.DeobfuscationMapping} DeobfuscationMapping instance
             */
            DeobfuscationMapping.create = function create(properties) {
                return new DeobfuscationMapping(properties);
            };

            /**
             * Encodes the specified DeobfuscationMapping message. Does not implicitly {@link perfetto.protos.DeobfuscationMapping.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DeobfuscationMapping
             * @static
             * @param {perfetto.protos.IDeobfuscationMapping} m DeobfuscationMapping message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DeobfuscationMapping.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.packageName != null && Object.hasOwnProperty.call(m, "packageName"))
                    w.uint32(10).string(m.packageName);
                if (m.versionCode != null && Object.hasOwnProperty.call(m, "versionCode"))
                    w.uint32(16).int64(m.versionCode);
                if (m.obfuscatedClasses != null && m.obfuscatedClasses.length) {
                    for (var i = 0; i < m.obfuscatedClasses.length; ++i)
                        $root.perfetto.protos.ObfuscatedClass.encode(m.obfuscatedClasses[i], w.uint32(26).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified DeobfuscationMapping message, length delimited. Does not implicitly {@link perfetto.protos.DeobfuscationMapping.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DeobfuscationMapping
             * @static
             * @param {perfetto.protos.IDeobfuscationMapping} message DeobfuscationMapping message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DeobfuscationMapping.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DeobfuscationMapping message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DeobfuscationMapping
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DeobfuscationMapping} DeobfuscationMapping
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DeobfuscationMapping.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DeobfuscationMapping();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.packageName = r.string();
                        break;
                    case 2:
                        m.versionCode = r.int64();
                        break;
                    case 3:
                        if (!(m.obfuscatedClasses && m.obfuscatedClasses.length))
                            m.obfuscatedClasses = [];
                        m.obfuscatedClasses.push($root.perfetto.protos.ObfuscatedClass.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DeobfuscationMapping message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DeobfuscationMapping
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DeobfuscationMapping} DeobfuscationMapping
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DeobfuscationMapping.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DeobfuscationMapping message.
             * @function verify
             * @memberof perfetto.protos.DeobfuscationMapping
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DeobfuscationMapping.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.packageName != null && m.hasOwnProperty("packageName")) {
                    if (!$util.isString(m.packageName))
                        return "packageName: string expected";
                }
                if (m.versionCode != null && m.hasOwnProperty("versionCode")) {
                    if (!$util.isInteger(m.versionCode) && !(m.versionCode && $util.isInteger(m.versionCode.low) && $util.isInteger(m.versionCode.high)))
                        return "versionCode: integer|Long expected";
                }
                if (m.obfuscatedClasses != null && m.hasOwnProperty("obfuscatedClasses")) {
                    if (!Array.isArray(m.obfuscatedClasses))
                        return "obfuscatedClasses: array expected";
                    for (var i = 0; i < m.obfuscatedClasses.length; ++i) {
                        {
                            var e = $root.perfetto.protos.ObfuscatedClass.verify(m.obfuscatedClasses[i]);
                            if (e)
                                return "obfuscatedClasses." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a DeobfuscationMapping message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DeobfuscationMapping
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DeobfuscationMapping} DeobfuscationMapping
             */
            DeobfuscationMapping.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DeobfuscationMapping)
                    return d;
                var m = new $root.perfetto.protos.DeobfuscationMapping();
                if (d.packageName != null) {
                    m.packageName = String(d.packageName);
                }
                if (d.versionCode != null) {
                    if ($util.Long)
                        (m.versionCode = $util.Long.fromValue(d.versionCode)).unsigned = false;
                    else if (typeof d.versionCode === "string")
                        m.versionCode = parseInt(d.versionCode, 10);
                    else if (typeof d.versionCode === "number")
                        m.versionCode = d.versionCode;
                    else if (typeof d.versionCode === "object")
                        m.versionCode = new $util.LongBits(d.versionCode.low >>> 0, d.versionCode.high >>> 0).toNumber();
                }
                if (d.obfuscatedClasses) {
                    if (!Array.isArray(d.obfuscatedClasses))
                        throw TypeError(".perfetto.protos.DeobfuscationMapping.obfuscatedClasses: array expected");
                    m.obfuscatedClasses = [];
                    for (var i = 0; i < d.obfuscatedClasses.length; ++i) {
                        if (typeof d.obfuscatedClasses[i] !== "object")
                            throw TypeError(".perfetto.protos.DeobfuscationMapping.obfuscatedClasses: object expected");
                        m.obfuscatedClasses[i] = $root.perfetto.protos.ObfuscatedClass.fromObject(d.obfuscatedClasses[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a DeobfuscationMapping message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DeobfuscationMapping
             * @static
             * @param {perfetto.protos.DeobfuscationMapping} m DeobfuscationMapping
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DeobfuscationMapping.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.obfuscatedClasses = [];
                }
                if (o.defaults) {
                    d.packageName = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.versionCode = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.versionCode = o.longs === String ? "0" : 0;
                }
                if (m.packageName != null && m.hasOwnProperty("packageName")) {
                    d.packageName = m.packageName;
                }
                if (m.versionCode != null && m.hasOwnProperty("versionCode")) {
                    if (typeof m.versionCode === "number")
                        d.versionCode = o.longs === String ? String(m.versionCode) : m.versionCode;
                    else
                        d.versionCode = o.longs === String ? $util.Long.prototype.toString.call(m.versionCode) : o.longs === Number ? new $util.LongBits(m.versionCode.low >>> 0, m.versionCode.high >>> 0).toNumber() : m.versionCode;
                }
                if (m.obfuscatedClasses && m.obfuscatedClasses.length) {
                    d.obfuscatedClasses = [];
                    for (var j = 0; j < m.obfuscatedClasses.length; ++j) {
                        d.obfuscatedClasses[j] = $root.perfetto.protos.ObfuscatedClass.toObject(m.obfuscatedClasses[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this DeobfuscationMapping to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DeobfuscationMapping
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DeobfuscationMapping.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DeobfuscationMapping;
        })();

        protos.HeapGraphRoot = (function() {

            /**
             * Properties of a HeapGraphRoot.
             * @memberof perfetto.protos
             * @interface IHeapGraphRoot
             * @property {Array.<number>|null} [objectIds] HeapGraphRoot objectIds
             * @property {perfetto.protos.HeapGraphRoot.Type|null} [rootType] HeapGraphRoot rootType
             */

            /**
             * Constructs a new HeapGraphRoot.
             * @memberof perfetto.protos
             * @classdesc Represents a HeapGraphRoot.
             * @implements IHeapGraphRoot
             * @constructor
             * @param {perfetto.protos.IHeapGraphRoot=} [p] Properties to set
             */
            function HeapGraphRoot(p) {
                this.objectIds = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * HeapGraphRoot objectIds.
             * @member {Array.<number>} objectIds
             * @memberof perfetto.protos.HeapGraphRoot
             * @instance
             */
            HeapGraphRoot.prototype.objectIds = $util.emptyArray;

            /**
             * HeapGraphRoot rootType.
             * @member {perfetto.protos.HeapGraphRoot.Type} rootType
             * @memberof perfetto.protos.HeapGraphRoot
             * @instance
             */
            HeapGraphRoot.prototype.rootType = 0;

            /**
             * Creates a new HeapGraphRoot instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.HeapGraphRoot
             * @static
             * @param {perfetto.protos.IHeapGraphRoot=} [properties] Properties to set
             * @returns {perfetto.protos.HeapGraphRoot} HeapGraphRoot instance
             */
            HeapGraphRoot.create = function create(properties) {
                return new HeapGraphRoot(properties);
            };

            /**
             * Encodes the specified HeapGraphRoot message. Does not implicitly {@link perfetto.protos.HeapGraphRoot.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.HeapGraphRoot
             * @static
             * @param {perfetto.protos.IHeapGraphRoot} m HeapGraphRoot message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HeapGraphRoot.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.objectIds != null && m.objectIds.length) {
                    w.uint32(10).fork();
                    for (var i = 0; i < m.objectIds.length; ++i)
                        w.uint64(m.objectIds[i]);
                    w.ldelim();
                }
                if (m.rootType != null && Object.hasOwnProperty.call(m, "rootType"))
                    w.uint32(16).int32(m.rootType);
                return w;
            };

            /**
             * Encodes the specified HeapGraphRoot message, length delimited. Does not implicitly {@link perfetto.protos.HeapGraphRoot.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.HeapGraphRoot
             * @static
             * @param {perfetto.protos.IHeapGraphRoot} message HeapGraphRoot message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HeapGraphRoot.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a HeapGraphRoot message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.HeapGraphRoot
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.HeapGraphRoot} HeapGraphRoot
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HeapGraphRoot.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.HeapGraphRoot();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.objectIds && m.objectIds.length))
                            m.objectIds = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.objectIds.push(r.uint64());
                        } else
                            m.objectIds.push(r.uint64());
                        break;
                    case 2:
                        m.rootType = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a HeapGraphRoot message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.HeapGraphRoot
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.HeapGraphRoot} HeapGraphRoot
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HeapGraphRoot.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a HeapGraphRoot message.
             * @function verify
             * @memberof perfetto.protos.HeapGraphRoot
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            HeapGraphRoot.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.objectIds != null && m.hasOwnProperty("objectIds")) {
                    if (!Array.isArray(m.objectIds))
                        return "objectIds: array expected";
                    for (var i = 0; i < m.objectIds.length; ++i) {
                        if (!$util.isInteger(m.objectIds[i]) && !(m.objectIds[i] && $util.isInteger(m.objectIds[i].low) && $util.isInteger(m.objectIds[i].high)))
                            return "objectIds: integer|Long[] expected";
                    }
                }
                if (m.rootType != null && m.hasOwnProperty("rootType")) {
                    switch (m.rootType) {
                    default:
                        return "rootType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                    case 6:
                    case 7:
                    case 8:
                    case 9:
                    case 10:
                    case 11:
                    case 12:
                    case 13:
                    case 14:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates a HeapGraphRoot message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.HeapGraphRoot
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.HeapGraphRoot} HeapGraphRoot
             */
            HeapGraphRoot.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.HeapGraphRoot)
                    return d;
                var m = new $root.perfetto.protos.HeapGraphRoot();
                if (d.objectIds) {
                    if (!Array.isArray(d.objectIds))
                        throw TypeError(".perfetto.protos.HeapGraphRoot.objectIds: array expected");
                    m.objectIds = [];
                    for (var i = 0; i < d.objectIds.length; ++i) {
                        if ($util.Long)
                            (m.objectIds[i] = $util.Long.fromValue(d.objectIds[i])).unsigned = true;
                        else if (typeof d.objectIds[i] === "string")
                            m.objectIds[i] = parseInt(d.objectIds[i], 10);
                        else if (typeof d.objectIds[i] === "number")
                            m.objectIds[i] = d.objectIds[i];
                        else if (typeof d.objectIds[i] === "object")
                            m.objectIds[i] = new $util.LongBits(d.objectIds[i].low >>> 0, d.objectIds[i].high >>> 0).toNumber(true);
                    }
                }
                switch (d.rootType) {
                case "ROOT_UNKNOWN":
                case 0:
                    m.rootType = 0;
                    break;
                case "ROOT_JNI_GLOBAL":
                case 1:
                    m.rootType = 1;
                    break;
                case "ROOT_JNI_LOCAL":
                case 2:
                    m.rootType = 2;
                    break;
                case "ROOT_JAVA_FRAME":
                case 3:
                    m.rootType = 3;
                    break;
                case "ROOT_NATIVE_STACK":
                case 4:
                    m.rootType = 4;
                    break;
                case "ROOT_STICKY_CLASS":
                case 5:
                    m.rootType = 5;
                    break;
                case "ROOT_THREAD_BLOCK":
                case 6:
                    m.rootType = 6;
                    break;
                case "ROOT_MONITOR_USED":
                case 7:
                    m.rootType = 7;
                    break;
                case "ROOT_THREAD_OBJECT":
                case 8:
                    m.rootType = 8;
                    break;
                case "ROOT_INTERNED_STRING":
                case 9:
                    m.rootType = 9;
                    break;
                case "ROOT_FINALIZING":
                case 10:
                    m.rootType = 10;
                    break;
                case "ROOT_DEBUGGER":
                case 11:
                    m.rootType = 11;
                    break;
                case "ROOT_REFERENCE_CLEANUP":
                case 12:
                    m.rootType = 12;
                    break;
                case "ROOT_VM_INTERNAL":
                case 13:
                    m.rootType = 13;
                    break;
                case "ROOT_JNI_MONITOR":
                case 14:
                    m.rootType = 14;
                    break;
                }
                return m;
            };

            /**
             * Creates a plain object from a HeapGraphRoot message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.HeapGraphRoot
             * @static
             * @param {perfetto.protos.HeapGraphRoot} m HeapGraphRoot
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            HeapGraphRoot.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.objectIds = [];
                }
                if (o.defaults) {
                    d.rootType = o.enums === String ? "ROOT_UNKNOWN" : 0;
                }
                if (m.objectIds && m.objectIds.length) {
                    d.objectIds = [];
                    for (var j = 0; j < m.objectIds.length; ++j) {
                        if (typeof m.objectIds[j] === "number")
                            d.objectIds[j] = o.longs === String ? String(m.objectIds[j]) : m.objectIds[j];
                        else
                            d.objectIds[j] = o.longs === String ? $util.Long.prototype.toString.call(m.objectIds[j]) : o.longs === Number ? new $util.LongBits(m.objectIds[j].low >>> 0, m.objectIds[j].high >>> 0).toNumber(true) : m.objectIds[j];
                    }
                }
                if (m.rootType != null && m.hasOwnProperty("rootType")) {
                    d.rootType = o.enums === String ? $root.perfetto.protos.HeapGraphRoot.Type[m.rootType] : m.rootType;
                }
                return d;
            };

            /**
             * Converts this HeapGraphRoot to JSON.
             * @function toJSON
             * @memberof perfetto.protos.HeapGraphRoot
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            HeapGraphRoot.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * Type enum.
             * @name perfetto.protos.HeapGraphRoot.Type
             * @enum {number}
             * @property {number} ROOT_UNKNOWN=0 ROOT_UNKNOWN value
             * @property {number} ROOT_JNI_GLOBAL=1 ROOT_JNI_GLOBAL value
             * @property {number} ROOT_JNI_LOCAL=2 ROOT_JNI_LOCAL value
             * @property {number} ROOT_JAVA_FRAME=3 ROOT_JAVA_FRAME value
             * @property {number} ROOT_NATIVE_STACK=4 ROOT_NATIVE_STACK value
             * @property {number} ROOT_STICKY_CLASS=5 ROOT_STICKY_CLASS value
             * @property {number} ROOT_THREAD_BLOCK=6 ROOT_THREAD_BLOCK value
             * @property {number} ROOT_MONITOR_USED=7 ROOT_MONITOR_USED value
             * @property {number} ROOT_THREAD_OBJECT=8 ROOT_THREAD_OBJECT value
             * @property {number} ROOT_INTERNED_STRING=9 ROOT_INTERNED_STRING value
             * @property {number} ROOT_FINALIZING=10 ROOT_FINALIZING value
             * @property {number} ROOT_DEBUGGER=11 ROOT_DEBUGGER value
             * @property {number} ROOT_REFERENCE_CLEANUP=12 ROOT_REFERENCE_CLEANUP value
             * @property {number} ROOT_VM_INTERNAL=13 ROOT_VM_INTERNAL value
             * @property {number} ROOT_JNI_MONITOR=14 ROOT_JNI_MONITOR value
             */
            HeapGraphRoot.Type = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "ROOT_UNKNOWN"] = 0;
                values[valuesById[1] = "ROOT_JNI_GLOBAL"] = 1;
                values[valuesById[2] = "ROOT_JNI_LOCAL"] = 2;
                values[valuesById[3] = "ROOT_JAVA_FRAME"] = 3;
                values[valuesById[4] = "ROOT_NATIVE_STACK"] = 4;
                values[valuesById[5] = "ROOT_STICKY_CLASS"] = 5;
                values[valuesById[6] = "ROOT_THREAD_BLOCK"] = 6;
                values[valuesById[7] = "ROOT_MONITOR_USED"] = 7;
                values[valuesById[8] = "ROOT_THREAD_OBJECT"] = 8;
                values[valuesById[9] = "ROOT_INTERNED_STRING"] = 9;
                values[valuesById[10] = "ROOT_FINALIZING"] = 10;
                values[valuesById[11] = "ROOT_DEBUGGER"] = 11;
                values[valuesById[12] = "ROOT_REFERENCE_CLEANUP"] = 12;
                values[valuesById[13] = "ROOT_VM_INTERNAL"] = 13;
                values[valuesById[14] = "ROOT_JNI_MONITOR"] = 14;
                return values;
            })();

            return HeapGraphRoot;
        })();

        protos.HeapGraphType = (function() {

            /**
             * Properties of a HeapGraphType.
             * @memberof perfetto.protos
             * @interface IHeapGraphType
             * @property {number|null} [id] HeapGraphType id
             * @property {number|null} [locationId] HeapGraphType locationId
             * @property {string|null} [className] HeapGraphType className
             * @property {number|null} [objectSize] HeapGraphType objectSize
             * @property {number|null} [superclassId] HeapGraphType superclassId
             * @property {Array.<number>|null} [referenceFieldId] HeapGraphType referenceFieldId
             * @property {perfetto.protos.HeapGraphType.Kind|null} [kind] HeapGraphType kind
             * @property {number|null} [classloaderId] HeapGraphType classloaderId
             */

            /**
             * Constructs a new HeapGraphType.
             * @memberof perfetto.protos
             * @classdesc Represents a HeapGraphType.
             * @implements IHeapGraphType
             * @constructor
             * @param {perfetto.protos.IHeapGraphType=} [p] Properties to set
             */
            function HeapGraphType(p) {
                this.referenceFieldId = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * HeapGraphType id.
             * @member {number} id
             * @memberof perfetto.protos.HeapGraphType
             * @instance
             */
            HeapGraphType.prototype.id = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * HeapGraphType locationId.
             * @member {number} locationId
             * @memberof perfetto.protos.HeapGraphType
             * @instance
             */
            HeapGraphType.prototype.locationId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * HeapGraphType className.
             * @member {string} className
             * @memberof perfetto.protos.HeapGraphType
             * @instance
             */
            HeapGraphType.prototype.className = "";

            /**
             * HeapGraphType objectSize.
             * @member {number} objectSize
             * @memberof perfetto.protos.HeapGraphType
             * @instance
             */
            HeapGraphType.prototype.objectSize = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * HeapGraphType superclassId.
             * @member {number} superclassId
             * @memberof perfetto.protos.HeapGraphType
             * @instance
             */
            HeapGraphType.prototype.superclassId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * HeapGraphType referenceFieldId.
             * @member {Array.<number>} referenceFieldId
             * @memberof perfetto.protos.HeapGraphType
             * @instance
             */
            HeapGraphType.prototype.referenceFieldId = $util.emptyArray;

            /**
             * HeapGraphType kind.
             * @member {perfetto.protos.HeapGraphType.Kind} kind
             * @memberof perfetto.protos.HeapGraphType
             * @instance
             */
            HeapGraphType.prototype.kind = 0;

            /**
             * HeapGraphType classloaderId.
             * @member {number} classloaderId
             * @memberof perfetto.protos.HeapGraphType
             * @instance
             */
            HeapGraphType.prototype.classloaderId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new HeapGraphType instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.HeapGraphType
             * @static
             * @param {perfetto.protos.IHeapGraphType=} [properties] Properties to set
             * @returns {perfetto.protos.HeapGraphType} HeapGraphType instance
             */
            HeapGraphType.create = function create(properties) {
                return new HeapGraphType(properties);
            };

            /**
             * Encodes the specified HeapGraphType message. Does not implicitly {@link perfetto.protos.HeapGraphType.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.HeapGraphType
             * @static
             * @param {perfetto.protos.IHeapGraphType} m HeapGraphType message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HeapGraphType.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.id != null && Object.hasOwnProperty.call(m, "id"))
                    w.uint32(8).uint64(m.id);
                if (m.locationId != null && Object.hasOwnProperty.call(m, "locationId"))
                    w.uint32(16).uint64(m.locationId);
                if (m.className != null && Object.hasOwnProperty.call(m, "className"))
                    w.uint32(26).string(m.className);
                if (m.objectSize != null && Object.hasOwnProperty.call(m, "objectSize"))
                    w.uint32(32).uint64(m.objectSize);
                if (m.superclassId != null && Object.hasOwnProperty.call(m, "superclassId"))
                    w.uint32(40).uint64(m.superclassId);
                if (m.referenceFieldId != null && m.referenceFieldId.length) {
                    w.uint32(50).fork();
                    for (var i = 0; i < m.referenceFieldId.length; ++i)
                        w.uint64(m.referenceFieldId[i]);
                    w.ldelim();
                }
                if (m.kind != null && Object.hasOwnProperty.call(m, "kind"))
                    w.uint32(56).int32(m.kind);
                if (m.classloaderId != null && Object.hasOwnProperty.call(m, "classloaderId"))
                    w.uint32(64).uint64(m.classloaderId);
                return w;
            };

            /**
             * Encodes the specified HeapGraphType message, length delimited. Does not implicitly {@link perfetto.protos.HeapGraphType.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.HeapGraphType
             * @static
             * @param {perfetto.protos.IHeapGraphType} message HeapGraphType message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HeapGraphType.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a HeapGraphType message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.HeapGraphType
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.HeapGraphType} HeapGraphType
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HeapGraphType.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.HeapGraphType();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.id = r.uint64();
                        break;
                    case 2:
                        m.locationId = r.uint64();
                        break;
                    case 3:
                        m.className = r.string();
                        break;
                    case 4:
                        m.objectSize = r.uint64();
                        break;
                    case 5:
                        m.superclassId = r.uint64();
                        break;
                    case 6:
                        if (!(m.referenceFieldId && m.referenceFieldId.length))
                            m.referenceFieldId = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.referenceFieldId.push(r.uint64());
                        } else
                            m.referenceFieldId.push(r.uint64());
                        break;
                    case 7:
                        m.kind = r.int32();
                        break;
                    case 8:
                        m.classloaderId = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a HeapGraphType message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.HeapGraphType
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.HeapGraphType} HeapGraphType
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HeapGraphType.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a HeapGraphType message.
             * @function verify
             * @memberof perfetto.protos.HeapGraphType
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            HeapGraphType.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.id != null && m.hasOwnProperty("id")) {
                    if (!$util.isInteger(m.id) && !(m.id && $util.isInteger(m.id.low) && $util.isInteger(m.id.high)))
                        return "id: integer|Long expected";
                }
                if (m.locationId != null && m.hasOwnProperty("locationId")) {
                    if (!$util.isInteger(m.locationId) && !(m.locationId && $util.isInteger(m.locationId.low) && $util.isInteger(m.locationId.high)))
                        return "locationId: integer|Long expected";
                }
                if (m.className != null && m.hasOwnProperty("className")) {
                    if (!$util.isString(m.className))
                        return "className: string expected";
                }
                if (m.objectSize != null && m.hasOwnProperty("objectSize")) {
                    if (!$util.isInteger(m.objectSize) && !(m.objectSize && $util.isInteger(m.objectSize.low) && $util.isInteger(m.objectSize.high)))
                        return "objectSize: integer|Long expected";
                }
                if (m.superclassId != null && m.hasOwnProperty("superclassId")) {
                    if (!$util.isInteger(m.superclassId) && !(m.superclassId && $util.isInteger(m.superclassId.low) && $util.isInteger(m.superclassId.high)))
                        return "superclassId: integer|Long expected";
                }
                if (m.referenceFieldId != null && m.hasOwnProperty("referenceFieldId")) {
                    if (!Array.isArray(m.referenceFieldId))
                        return "referenceFieldId: array expected";
                    for (var i = 0; i < m.referenceFieldId.length; ++i) {
                        if (!$util.isInteger(m.referenceFieldId[i]) && !(m.referenceFieldId[i] && $util.isInteger(m.referenceFieldId[i].low) && $util.isInteger(m.referenceFieldId[i].high)))
                            return "referenceFieldId: integer|Long[] expected";
                    }
                }
                if (m.kind != null && m.hasOwnProperty("kind")) {
                    switch (m.kind) {
                    default:
                        return "kind: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                    case 6:
                    case 7:
                    case 8:
                    case 9:
                    case 10:
                    case 11:
                        break;
                    }
                }
                if (m.classloaderId != null && m.hasOwnProperty("classloaderId")) {
                    if (!$util.isInteger(m.classloaderId) && !(m.classloaderId && $util.isInteger(m.classloaderId.low) && $util.isInteger(m.classloaderId.high)))
                        return "classloaderId: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a HeapGraphType message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.HeapGraphType
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.HeapGraphType} HeapGraphType
             */
            HeapGraphType.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.HeapGraphType)
                    return d;
                var m = new $root.perfetto.protos.HeapGraphType();
                if (d.id != null) {
                    if ($util.Long)
                        (m.id = $util.Long.fromValue(d.id)).unsigned = true;
                    else if (typeof d.id === "string")
                        m.id = parseInt(d.id, 10);
                    else if (typeof d.id === "number")
                        m.id = d.id;
                    else if (typeof d.id === "object")
                        m.id = new $util.LongBits(d.id.low >>> 0, d.id.high >>> 0).toNumber(true);
                }
                if (d.locationId != null) {
                    if ($util.Long)
                        (m.locationId = $util.Long.fromValue(d.locationId)).unsigned = true;
                    else if (typeof d.locationId === "string")
                        m.locationId = parseInt(d.locationId, 10);
                    else if (typeof d.locationId === "number")
                        m.locationId = d.locationId;
                    else if (typeof d.locationId === "object")
                        m.locationId = new $util.LongBits(d.locationId.low >>> 0, d.locationId.high >>> 0).toNumber(true);
                }
                if (d.className != null) {
                    m.className = String(d.className);
                }
                if (d.objectSize != null) {
                    if ($util.Long)
                        (m.objectSize = $util.Long.fromValue(d.objectSize)).unsigned = true;
                    else if (typeof d.objectSize === "string")
                        m.objectSize = parseInt(d.objectSize, 10);
                    else if (typeof d.objectSize === "number")
                        m.objectSize = d.objectSize;
                    else if (typeof d.objectSize === "object")
                        m.objectSize = new $util.LongBits(d.objectSize.low >>> 0, d.objectSize.high >>> 0).toNumber(true);
                }
                if (d.superclassId != null) {
                    if ($util.Long)
                        (m.superclassId = $util.Long.fromValue(d.superclassId)).unsigned = true;
                    else if (typeof d.superclassId === "string")
                        m.superclassId = parseInt(d.superclassId, 10);
                    else if (typeof d.superclassId === "number")
                        m.superclassId = d.superclassId;
                    else if (typeof d.superclassId === "object")
                        m.superclassId = new $util.LongBits(d.superclassId.low >>> 0, d.superclassId.high >>> 0).toNumber(true);
                }
                if (d.referenceFieldId) {
                    if (!Array.isArray(d.referenceFieldId))
                        throw TypeError(".perfetto.protos.HeapGraphType.referenceFieldId: array expected");
                    m.referenceFieldId = [];
                    for (var i = 0; i < d.referenceFieldId.length; ++i) {
                        if ($util.Long)
                            (m.referenceFieldId[i] = $util.Long.fromValue(d.referenceFieldId[i])).unsigned = true;
                        else if (typeof d.referenceFieldId[i] === "string")
                            m.referenceFieldId[i] = parseInt(d.referenceFieldId[i], 10);
                        else if (typeof d.referenceFieldId[i] === "number")
                            m.referenceFieldId[i] = d.referenceFieldId[i];
                        else if (typeof d.referenceFieldId[i] === "object")
                            m.referenceFieldId[i] = new $util.LongBits(d.referenceFieldId[i].low >>> 0, d.referenceFieldId[i].high >>> 0).toNumber(true);
                    }
                }
                switch (d.kind) {
                case "KIND_UNKNOWN":
                case 0:
                    m.kind = 0;
                    break;
                case "KIND_NORMAL":
                case 1:
                    m.kind = 1;
                    break;
                case "KIND_NOREFERENCES":
                case 2:
                    m.kind = 2;
                    break;
                case "KIND_STRING":
                case 3:
                    m.kind = 3;
                    break;
                case "KIND_ARRAY":
                case 4:
                    m.kind = 4;
                    break;
                case "KIND_CLASS":
                case 5:
                    m.kind = 5;
                    break;
                case "KIND_CLASSLOADER":
                case 6:
                    m.kind = 6;
                    break;
                case "KIND_DEXCACHE":
                case 7:
                    m.kind = 7;
                    break;
                case "KIND_SOFT_REFERENCE":
                case 8:
                    m.kind = 8;
                    break;
                case "KIND_WEAK_REFERENCE":
                case 9:
                    m.kind = 9;
                    break;
                case "KIND_FINALIZER_REFERENCE":
                case 10:
                    m.kind = 10;
                    break;
                case "KIND_PHANTOM_REFERENCE":
                case 11:
                    m.kind = 11;
                    break;
                }
                if (d.classloaderId != null) {
                    if ($util.Long)
                        (m.classloaderId = $util.Long.fromValue(d.classloaderId)).unsigned = true;
                    else if (typeof d.classloaderId === "string")
                        m.classloaderId = parseInt(d.classloaderId, 10);
                    else if (typeof d.classloaderId === "number")
                        m.classloaderId = d.classloaderId;
                    else if (typeof d.classloaderId === "object")
                        m.classloaderId = new $util.LongBits(d.classloaderId.low >>> 0, d.classloaderId.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a HeapGraphType message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.HeapGraphType
             * @static
             * @param {perfetto.protos.HeapGraphType} m HeapGraphType
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            HeapGraphType.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.referenceFieldId = [];
                }
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.id = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.id = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.locationId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.locationId = o.longs === String ? "0" : 0;
                    d.className = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.objectSize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.objectSize = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.superclassId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.superclassId = o.longs === String ? "0" : 0;
                    d.kind = o.enums === String ? "KIND_UNKNOWN" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.classloaderId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.classloaderId = o.longs === String ? "0" : 0;
                }
                if (m.id != null && m.hasOwnProperty("id")) {
                    if (typeof m.id === "number")
                        d.id = o.longs === String ? String(m.id) : m.id;
                    else
                        d.id = o.longs === String ? $util.Long.prototype.toString.call(m.id) : o.longs === Number ? new $util.LongBits(m.id.low >>> 0, m.id.high >>> 0).toNumber(true) : m.id;
                }
                if (m.locationId != null && m.hasOwnProperty("locationId")) {
                    if (typeof m.locationId === "number")
                        d.locationId = o.longs === String ? String(m.locationId) : m.locationId;
                    else
                        d.locationId = o.longs === String ? $util.Long.prototype.toString.call(m.locationId) : o.longs === Number ? new $util.LongBits(m.locationId.low >>> 0, m.locationId.high >>> 0).toNumber(true) : m.locationId;
                }
                if (m.className != null && m.hasOwnProperty("className")) {
                    d.className = m.className;
                }
                if (m.objectSize != null && m.hasOwnProperty("objectSize")) {
                    if (typeof m.objectSize === "number")
                        d.objectSize = o.longs === String ? String(m.objectSize) : m.objectSize;
                    else
                        d.objectSize = o.longs === String ? $util.Long.prototype.toString.call(m.objectSize) : o.longs === Number ? new $util.LongBits(m.objectSize.low >>> 0, m.objectSize.high >>> 0).toNumber(true) : m.objectSize;
                }
                if (m.superclassId != null && m.hasOwnProperty("superclassId")) {
                    if (typeof m.superclassId === "number")
                        d.superclassId = o.longs === String ? String(m.superclassId) : m.superclassId;
                    else
                        d.superclassId = o.longs === String ? $util.Long.prototype.toString.call(m.superclassId) : o.longs === Number ? new $util.LongBits(m.superclassId.low >>> 0, m.superclassId.high >>> 0).toNumber(true) : m.superclassId;
                }
                if (m.referenceFieldId && m.referenceFieldId.length) {
                    d.referenceFieldId = [];
                    for (var j = 0; j < m.referenceFieldId.length; ++j) {
                        if (typeof m.referenceFieldId[j] === "number")
                            d.referenceFieldId[j] = o.longs === String ? String(m.referenceFieldId[j]) : m.referenceFieldId[j];
                        else
                            d.referenceFieldId[j] = o.longs === String ? $util.Long.prototype.toString.call(m.referenceFieldId[j]) : o.longs === Number ? new $util.LongBits(m.referenceFieldId[j].low >>> 0, m.referenceFieldId[j].high >>> 0).toNumber(true) : m.referenceFieldId[j];
                    }
                }
                if (m.kind != null && m.hasOwnProperty("kind")) {
                    d.kind = o.enums === String ? $root.perfetto.protos.HeapGraphType.Kind[m.kind] : m.kind;
                }
                if (m.classloaderId != null && m.hasOwnProperty("classloaderId")) {
                    if (typeof m.classloaderId === "number")
                        d.classloaderId = o.longs === String ? String(m.classloaderId) : m.classloaderId;
                    else
                        d.classloaderId = o.longs === String ? $util.Long.prototype.toString.call(m.classloaderId) : o.longs === Number ? new $util.LongBits(m.classloaderId.low >>> 0, m.classloaderId.high >>> 0).toNumber(true) : m.classloaderId;
                }
                return d;
            };

            /**
             * Converts this HeapGraphType to JSON.
             * @function toJSON
             * @memberof perfetto.protos.HeapGraphType
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            HeapGraphType.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * Kind enum.
             * @name perfetto.protos.HeapGraphType.Kind
             * @enum {number}
             * @property {number} KIND_UNKNOWN=0 KIND_UNKNOWN value
             * @property {number} KIND_NORMAL=1 KIND_NORMAL value
             * @property {number} KIND_NOREFERENCES=2 KIND_NOREFERENCES value
             * @property {number} KIND_STRING=3 KIND_STRING value
             * @property {number} KIND_ARRAY=4 KIND_ARRAY value
             * @property {number} KIND_CLASS=5 KIND_CLASS value
             * @property {number} KIND_CLASSLOADER=6 KIND_CLASSLOADER value
             * @property {number} KIND_DEXCACHE=7 KIND_DEXCACHE value
             * @property {number} KIND_SOFT_REFERENCE=8 KIND_SOFT_REFERENCE value
             * @property {number} KIND_WEAK_REFERENCE=9 KIND_WEAK_REFERENCE value
             * @property {number} KIND_FINALIZER_REFERENCE=10 KIND_FINALIZER_REFERENCE value
             * @property {number} KIND_PHANTOM_REFERENCE=11 KIND_PHANTOM_REFERENCE value
             */
            HeapGraphType.Kind = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "KIND_UNKNOWN"] = 0;
                values[valuesById[1] = "KIND_NORMAL"] = 1;
                values[valuesById[2] = "KIND_NOREFERENCES"] = 2;
                values[valuesById[3] = "KIND_STRING"] = 3;
                values[valuesById[4] = "KIND_ARRAY"] = 4;
                values[valuesById[5] = "KIND_CLASS"] = 5;
                values[valuesById[6] = "KIND_CLASSLOADER"] = 6;
                values[valuesById[7] = "KIND_DEXCACHE"] = 7;
                values[valuesById[8] = "KIND_SOFT_REFERENCE"] = 8;
                values[valuesById[9] = "KIND_WEAK_REFERENCE"] = 9;
                values[valuesById[10] = "KIND_FINALIZER_REFERENCE"] = 10;
                values[valuesById[11] = "KIND_PHANTOM_REFERENCE"] = 11;
                return values;
            })();

            return HeapGraphType;
        })();

        protos.HeapGraphObject = (function() {

            /**
             * Properties of a HeapGraphObject.
             * @memberof perfetto.protos
             * @interface IHeapGraphObject
             * @property {number|null} [id] HeapGraphObject id
             * @property {number|null} [idDelta] HeapGraphObject idDelta
             * @property {number|null} [typeId] HeapGraphObject typeId
             * @property {number|null} [selfSize] HeapGraphObject selfSize
             * @property {number|null} [referenceFieldIdBase] HeapGraphObject referenceFieldIdBase
             * @property {Array.<number>|null} [referenceFieldId] HeapGraphObject referenceFieldId
             * @property {Array.<number>|null} [referenceObjectId] HeapGraphObject referenceObjectId
             * @property {number|null} [nativeAllocationRegistrySizeField] HeapGraphObject nativeAllocationRegistrySizeField
             */

            /**
             * Constructs a new HeapGraphObject.
             * @memberof perfetto.protos
             * @classdesc Represents a HeapGraphObject.
             * @implements IHeapGraphObject
             * @constructor
             * @param {perfetto.protos.IHeapGraphObject=} [p] Properties to set
             */
            function HeapGraphObject(p) {
                this.referenceFieldId = [];
                this.referenceObjectId = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * HeapGraphObject id.
             * @member {number} id
             * @memberof perfetto.protos.HeapGraphObject
             * @instance
             */
            HeapGraphObject.prototype.id = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * HeapGraphObject idDelta.
             * @member {number} idDelta
             * @memberof perfetto.protos.HeapGraphObject
             * @instance
             */
            HeapGraphObject.prototype.idDelta = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * HeapGraphObject typeId.
             * @member {number} typeId
             * @memberof perfetto.protos.HeapGraphObject
             * @instance
             */
            HeapGraphObject.prototype.typeId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * HeapGraphObject selfSize.
             * @member {number} selfSize
             * @memberof perfetto.protos.HeapGraphObject
             * @instance
             */
            HeapGraphObject.prototype.selfSize = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * HeapGraphObject referenceFieldIdBase.
             * @member {number} referenceFieldIdBase
             * @memberof perfetto.protos.HeapGraphObject
             * @instance
             */
            HeapGraphObject.prototype.referenceFieldIdBase = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * HeapGraphObject referenceFieldId.
             * @member {Array.<number>} referenceFieldId
             * @memberof perfetto.protos.HeapGraphObject
             * @instance
             */
            HeapGraphObject.prototype.referenceFieldId = $util.emptyArray;

            /**
             * HeapGraphObject referenceObjectId.
             * @member {Array.<number>} referenceObjectId
             * @memberof perfetto.protos.HeapGraphObject
             * @instance
             */
            HeapGraphObject.prototype.referenceObjectId = $util.emptyArray;

            /**
             * HeapGraphObject nativeAllocationRegistrySizeField.
             * @member {number} nativeAllocationRegistrySizeField
             * @memberof perfetto.protos.HeapGraphObject
             * @instance
             */
            HeapGraphObject.prototype.nativeAllocationRegistrySizeField = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * HeapGraphObject identifier.
             * @member {"id"|"idDelta"|undefined} identifier
             * @memberof perfetto.protos.HeapGraphObject
             * @instance
             */
            Object.defineProperty(HeapGraphObject.prototype, "identifier", {
                get: $util.oneOfGetter($oneOfFields = ["id", "idDelta"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new HeapGraphObject instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.HeapGraphObject
             * @static
             * @param {perfetto.protos.IHeapGraphObject=} [properties] Properties to set
             * @returns {perfetto.protos.HeapGraphObject} HeapGraphObject instance
             */
            HeapGraphObject.create = function create(properties) {
                return new HeapGraphObject(properties);
            };

            /**
             * Encodes the specified HeapGraphObject message. Does not implicitly {@link perfetto.protos.HeapGraphObject.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.HeapGraphObject
             * @static
             * @param {perfetto.protos.IHeapGraphObject} m HeapGraphObject message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HeapGraphObject.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.id != null && Object.hasOwnProperty.call(m, "id"))
                    w.uint32(8).uint64(m.id);
                if (m.typeId != null && Object.hasOwnProperty.call(m, "typeId"))
                    w.uint32(16).uint64(m.typeId);
                if (m.selfSize != null && Object.hasOwnProperty.call(m, "selfSize"))
                    w.uint32(24).uint64(m.selfSize);
                if (m.referenceFieldId != null && m.referenceFieldId.length) {
                    w.uint32(34).fork();
                    for (var i = 0; i < m.referenceFieldId.length; ++i)
                        w.uint64(m.referenceFieldId[i]);
                    w.ldelim();
                }
                if (m.referenceObjectId != null && m.referenceObjectId.length) {
                    w.uint32(42).fork();
                    for (var i = 0; i < m.referenceObjectId.length; ++i)
                        w.uint64(m.referenceObjectId[i]);
                    w.ldelim();
                }
                if (m.referenceFieldIdBase != null && Object.hasOwnProperty.call(m, "referenceFieldIdBase"))
                    w.uint32(48).uint64(m.referenceFieldIdBase);
                if (m.idDelta != null && Object.hasOwnProperty.call(m, "idDelta"))
                    w.uint32(56).uint64(m.idDelta);
                if (m.nativeAllocationRegistrySizeField != null && Object.hasOwnProperty.call(m, "nativeAllocationRegistrySizeField"))
                    w.uint32(64).int64(m.nativeAllocationRegistrySizeField);
                return w;
            };

            /**
             * Encodes the specified HeapGraphObject message, length delimited. Does not implicitly {@link perfetto.protos.HeapGraphObject.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.HeapGraphObject
             * @static
             * @param {perfetto.protos.IHeapGraphObject} message HeapGraphObject message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HeapGraphObject.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a HeapGraphObject message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.HeapGraphObject
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.HeapGraphObject} HeapGraphObject
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HeapGraphObject.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.HeapGraphObject();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.id = r.uint64();
                        break;
                    case 7:
                        m.idDelta = r.uint64();
                        break;
                    case 2:
                        m.typeId = r.uint64();
                        break;
                    case 3:
                        m.selfSize = r.uint64();
                        break;
                    case 6:
                        m.referenceFieldIdBase = r.uint64();
                        break;
                    case 4:
                        if (!(m.referenceFieldId && m.referenceFieldId.length))
                            m.referenceFieldId = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.referenceFieldId.push(r.uint64());
                        } else
                            m.referenceFieldId.push(r.uint64());
                        break;
                    case 5:
                        if (!(m.referenceObjectId && m.referenceObjectId.length))
                            m.referenceObjectId = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.referenceObjectId.push(r.uint64());
                        } else
                            m.referenceObjectId.push(r.uint64());
                        break;
                    case 8:
                        m.nativeAllocationRegistrySizeField = r.int64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a HeapGraphObject message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.HeapGraphObject
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.HeapGraphObject} HeapGraphObject
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HeapGraphObject.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a HeapGraphObject message.
             * @function verify
             * @memberof perfetto.protos.HeapGraphObject
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            HeapGraphObject.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                var p = {};
                if (m.id != null && m.hasOwnProperty("id")) {
                    p.identifier = 1;
                    if (!$util.isInteger(m.id) && !(m.id && $util.isInteger(m.id.low) && $util.isInteger(m.id.high)))
                        return "id: integer|Long expected";
                }
                if (m.idDelta != null && m.hasOwnProperty("idDelta")) {
                    if (p.identifier === 1)
                        return "identifier: multiple values";
                    p.identifier = 1;
                    if (!$util.isInteger(m.idDelta) && !(m.idDelta && $util.isInteger(m.idDelta.low) && $util.isInteger(m.idDelta.high)))
                        return "idDelta: integer|Long expected";
                }
                if (m.typeId != null && m.hasOwnProperty("typeId")) {
                    if (!$util.isInteger(m.typeId) && !(m.typeId && $util.isInteger(m.typeId.low) && $util.isInteger(m.typeId.high)))
                        return "typeId: integer|Long expected";
                }
                if (m.selfSize != null && m.hasOwnProperty("selfSize")) {
                    if (!$util.isInteger(m.selfSize) && !(m.selfSize && $util.isInteger(m.selfSize.low) && $util.isInteger(m.selfSize.high)))
                        return "selfSize: integer|Long expected";
                }
                if (m.referenceFieldIdBase != null && m.hasOwnProperty("referenceFieldIdBase")) {
                    if (!$util.isInteger(m.referenceFieldIdBase) && !(m.referenceFieldIdBase && $util.isInteger(m.referenceFieldIdBase.low) && $util.isInteger(m.referenceFieldIdBase.high)))
                        return "referenceFieldIdBase: integer|Long expected";
                }
                if (m.referenceFieldId != null && m.hasOwnProperty("referenceFieldId")) {
                    if (!Array.isArray(m.referenceFieldId))
                        return "referenceFieldId: array expected";
                    for (var i = 0; i < m.referenceFieldId.length; ++i) {
                        if (!$util.isInteger(m.referenceFieldId[i]) && !(m.referenceFieldId[i] && $util.isInteger(m.referenceFieldId[i].low) && $util.isInteger(m.referenceFieldId[i].high)))
                            return "referenceFieldId: integer|Long[] expected";
                    }
                }
                if (m.referenceObjectId != null && m.hasOwnProperty("referenceObjectId")) {
                    if (!Array.isArray(m.referenceObjectId))
                        return "referenceObjectId: array expected";
                    for (var i = 0; i < m.referenceObjectId.length; ++i) {
                        if (!$util.isInteger(m.referenceObjectId[i]) && !(m.referenceObjectId[i] && $util.isInteger(m.referenceObjectId[i].low) && $util.isInteger(m.referenceObjectId[i].high)))
                            return "referenceObjectId: integer|Long[] expected";
                    }
                }
                if (m.nativeAllocationRegistrySizeField != null && m.hasOwnProperty("nativeAllocationRegistrySizeField")) {
                    if (!$util.isInteger(m.nativeAllocationRegistrySizeField) && !(m.nativeAllocationRegistrySizeField && $util.isInteger(m.nativeAllocationRegistrySizeField.low) && $util.isInteger(m.nativeAllocationRegistrySizeField.high)))
                        return "nativeAllocationRegistrySizeField: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a HeapGraphObject message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.HeapGraphObject
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.HeapGraphObject} HeapGraphObject
             */
            HeapGraphObject.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.HeapGraphObject)
                    return d;
                var m = new $root.perfetto.protos.HeapGraphObject();
                if (d.id != null) {
                    if ($util.Long)
                        (m.id = $util.Long.fromValue(d.id)).unsigned = true;
                    else if (typeof d.id === "string")
                        m.id = parseInt(d.id, 10);
                    else if (typeof d.id === "number")
                        m.id = d.id;
                    else if (typeof d.id === "object")
                        m.id = new $util.LongBits(d.id.low >>> 0, d.id.high >>> 0).toNumber(true);
                }
                if (d.idDelta != null) {
                    if ($util.Long)
                        (m.idDelta = $util.Long.fromValue(d.idDelta)).unsigned = true;
                    else if (typeof d.idDelta === "string")
                        m.idDelta = parseInt(d.idDelta, 10);
                    else if (typeof d.idDelta === "number")
                        m.idDelta = d.idDelta;
                    else if (typeof d.idDelta === "object")
                        m.idDelta = new $util.LongBits(d.idDelta.low >>> 0, d.idDelta.high >>> 0).toNumber(true);
                }
                if (d.typeId != null) {
                    if ($util.Long)
                        (m.typeId = $util.Long.fromValue(d.typeId)).unsigned = true;
                    else if (typeof d.typeId === "string")
                        m.typeId = parseInt(d.typeId, 10);
                    else if (typeof d.typeId === "number")
                        m.typeId = d.typeId;
                    else if (typeof d.typeId === "object")
                        m.typeId = new $util.LongBits(d.typeId.low >>> 0, d.typeId.high >>> 0).toNumber(true);
                }
                if (d.selfSize != null) {
                    if ($util.Long)
                        (m.selfSize = $util.Long.fromValue(d.selfSize)).unsigned = true;
                    else if (typeof d.selfSize === "string")
                        m.selfSize = parseInt(d.selfSize, 10);
                    else if (typeof d.selfSize === "number")
                        m.selfSize = d.selfSize;
                    else if (typeof d.selfSize === "object")
                        m.selfSize = new $util.LongBits(d.selfSize.low >>> 0, d.selfSize.high >>> 0).toNumber(true);
                }
                if (d.referenceFieldIdBase != null) {
                    if ($util.Long)
                        (m.referenceFieldIdBase = $util.Long.fromValue(d.referenceFieldIdBase)).unsigned = true;
                    else if (typeof d.referenceFieldIdBase === "string")
                        m.referenceFieldIdBase = parseInt(d.referenceFieldIdBase, 10);
                    else if (typeof d.referenceFieldIdBase === "number")
                        m.referenceFieldIdBase = d.referenceFieldIdBase;
                    else if (typeof d.referenceFieldIdBase === "object")
                        m.referenceFieldIdBase = new $util.LongBits(d.referenceFieldIdBase.low >>> 0, d.referenceFieldIdBase.high >>> 0).toNumber(true);
                }
                if (d.referenceFieldId) {
                    if (!Array.isArray(d.referenceFieldId))
                        throw TypeError(".perfetto.protos.HeapGraphObject.referenceFieldId: array expected");
                    m.referenceFieldId = [];
                    for (var i = 0; i < d.referenceFieldId.length; ++i) {
                        if ($util.Long)
                            (m.referenceFieldId[i] = $util.Long.fromValue(d.referenceFieldId[i])).unsigned = true;
                        else if (typeof d.referenceFieldId[i] === "string")
                            m.referenceFieldId[i] = parseInt(d.referenceFieldId[i], 10);
                        else if (typeof d.referenceFieldId[i] === "number")
                            m.referenceFieldId[i] = d.referenceFieldId[i];
                        else if (typeof d.referenceFieldId[i] === "object")
                            m.referenceFieldId[i] = new $util.LongBits(d.referenceFieldId[i].low >>> 0, d.referenceFieldId[i].high >>> 0).toNumber(true);
                    }
                }
                if (d.referenceObjectId) {
                    if (!Array.isArray(d.referenceObjectId))
                        throw TypeError(".perfetto.protos.HeapGraphObject.referenceObjectId: array expected");
                    m.referenceObjectId = [];
                    for (var i = 0; i < d.referenceObjectId.length; ++i) {
                        if ($util.Long)
                            (m.referenceObjectId[i] = $util.Long.fromValue(d.referenceObjectId[i])).unsigned = true;
                        else if (typeof d.referenceObjectId[i] === "string")
                            m.referenceObjectId[i] = parseInt(d.referenceObjectId[i], 10);
                        else if (typeof d.referenceObjectId[i] === "number")
                            m.referenceObjectId[i] = d.referenceObjectId[i];
                        else if (typeof d.referenceObjectId[i] === "object")
                            m.referenceObjectId[i] = new $util.LongBits(d.referenceObjectId[i].low >>> 0, d.referenceObjectId[i].high >>> 0).toNumber(true);
                    }
                }
                if (d.nativeAllocationRegistrySizeField != null) {
                    if ($util.Long)
                        (m.nativeAllocationRegistrySizeField = $util.Long.fromValue(d.nativeAllocationRegistrySizeField)).unsigned = false;
                    else if (typeof d.nativeAllocationRegistrySizeField === "string")
                        m.nativeAllocationRegistrySizeField = parseInt(d.nativeAllocationRegistrySizeField, 10);
                    else if (typeof d.nativeAllocationRegistrySizeField === "number")
                        m.nativeAllocationRegistrySizeField = d.nativeAllocationRegistrySizeField;
                    else if (typeof d.nativeAllocationRegistrySizeField === "object")
                        m.nativeAllocationRegistrySizeField = new $util.LongBits(d.nativeAllocationRegistrySizeField.low >>> 0, d.nativeAllocationRegistrySizeField.high >>> 0).toNumber();
                }
                return m;
            };

            /**
             * Creates a plain object from a HeapGraphObject message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.HeapGraphObject
             * @static
             * @param {perfetto.protos.HeapGraphObject} m HeapGraphObject
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            HeapGraphObject.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.referenceFieldId = [];
                    d.referenceObjectId = [];
                }
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.typeId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.typeId = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.selfSize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.selfSize = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.referenceFieldIdBase = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.referenceFieldIdBase = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.nativeAllocationRegistrySizeField = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.nativeAllocationRegistrySizeField = o.longs === String ? "0" : 0;
                }
                if (m.id != null && m.hasOwnProperty("id")) {
                    if (typeof m.id === "number")
                        d.id = o.longs === String ? String(m.id) : m.id;
                    else
                        d.id = o.longs === String ? $util.Long.prototype.toString.call(m.id) : o.longs === Number ? new $util.LongBits(m.id.low >>> 0, m.id.high >>> 0).toNumber(true) : m.id;
                    if (o.oneofs)
                        d.identifier = "id";
                }
                if (m.typeId != null && m.hasOwnProperty("typeId")) {
                    if (typeof m.typeId === "number")
                        d.typeId = o.longs === String ? String(m.typeId) : m.typeId;
                    else
                        d.typeId = o.longs === String ? $util.Long.prototype.toString.call(m.typeId) : o.longs === Number ? new $util.LongBits(m.typeId.low >>> 0, m.typeId.high >>> 0).toNumber(true) : m.typeId;
                }
                if (m.selfSize != null && m.hasOwnProperty("selfSize")) {
                    if (typeof m.selfSize === "number")
                        d.selfSize = o.longs === String ? String(m.selfSize) : m.selfSize;
                    else
                        d.selfSize = o.longs === String ? $util.Long.prototype.toString.call(m.selfSize) : o.longs === Number ? new $util.LongBits(m.selfSize.low >>> 0, m.selfSize.high >>> 0).toNumber(true) : m.selfSize;
                }
                if (m.referenceFieldId && m.referenceFieldId.length) {
                    d.referenceFieldId = [];
                    for (var j = 0; j < m.referenceFieldId.length; ++j) {
                        if (typeof m.referenceFieldId[j] === "number")
                            d.referenceFieldId[j] = o.longs === String ? String(m.referenceFieldId[j]) : m.referenceFieldId[j];
                        else
                            d.referenceFieldId[j] = o.longs === String ? $util.Long.prototype.toString.call(m.referenceFieldId[j]) : o.longs === Number ? new $util.LongBits(m.referenceFieldId[j].low >>> 0, m.referenceFieldId[j].high >>> 0).toNumber(true) : m.referenceFieldId[j];
                    }
                }
                if (m.referenceObjectId && m.referenceObjectId.length) {
                    d.referenceObjectId = [];
                    for (var j = 0; j < m.referenceObjectId.length; ++j) {
                        if (typeof m.referenceObjectId[j] === "number")
                            d.referenceObjectId[j] = o.longs === String ? String(m.referenceObjectId[j]) : m.referenceObjectId[j];
                        else
                            d.referenceObjectId[j] = o.longs === String ? $util.Long.prototype.toString.call(m.referenceObjectId[j]) : o.longs === Number ? new $util.LongBits(m.referenceObjectId[j].low >>> 0, m.referenceObjectId[j].high >>> 0).toNumber(true) : m.referenceObjectId[j];
                    }
                }
                if (m.referenceFieldIdBase != null && m.hasOwnProperty("referenceFieldIdBase")) {
                    if (typeof m.referenceFieldIdBase === "number")
                        d.referenceFieldIdBase = o.longs === String ? String(m.referenceFieldIdBase) : m.referenceFieldIdBase;
                    else
                        d.referenceFieldIdBase = o.longs === String ? $util.Long.prototype.toString.call(m.referenceFieldIdBase) : o.longs === Number ? new $util.LongBits(m.referenceFieldIdBase.low >>> 0, m.referenceFieldIdBase.high >>> 0).toNumber(true) : m.referenceFieldIdBase;
                }
                if (m.idDelta != null && m.hasOwnProperty("idDelta")) {
                    if (typeof m.idDelta === "number")
                        d.idDelta = o.longs === String ? String(m.idDelta) : m.idDelta;
                    else
                        d.idDelta = o.longs === String ? $util.Long.prototype.toString.call(m.idDelta) : o.longs === Number ? new $util.LongBits(m.idDelta.low >>> 0, m.idDelta.high >>> 0).toNumber(true) : m.idDelta;
                    if (o.oneofs)
                        d.identifier = "idDelta";
                }
                if (m.nativeAllocationRegistrySizeField != null && m.hasOwnProperty("nativeAllocationRegistrySizeField")) {
                    if (typeof m.nativeAllocationRegistrySizeField === "number")
                        d.nativeAllocationRegistrySizeField = o.longs === String ? String(m.nativeAllocationRegistrySizeField) : m.nativeAllocationRegistrySizeField;
                    else
                        d.nativeAllocationRegistrySizeField = o.longs === String ? $util.Long.prototype.toString.call(m.nativeAllocationRegistrySizeField) : o.longs === Number ? new $util.LongBits(m.nativeAllocationRegistrySizeField.low >>> 0, m.nativeAllocationRegistrySizeField.high >>> 0).toNumber() : m.nativeAllocationRegistrySizeField;
                }
                return d;
            };

            /**
             * Converts this HeapGraphObject to JSON.
             * @function toJSON
             * @memberof perfetto.protos.HeapGraphObject
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            HeapGraphObject.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return HeapGraphObject;
        })();

        protos.HeapGraph = (function() {

            /**
             * Properties of a HeapGraph.
             * @memberof perfetto.protos
             * @interface IHeapGraph
             * @property {number|null} [pid] HeapGraph pid
             * @property {Array.<perfetto.protos.IHeapGraphObject>|null} [objects] HeapGraph objects
             * @property {Array.<perfetto.protos.IHeapGraphRoot>|null} [roots] HeapGraph roots
             * @property {Array.<perfetto.protos.IHeapGraphType>|null} [types] HeapGraph types
             * @property {Array.<perfetto.protos.IInternedString>|null} [fieldNames] HeapGraph fieldNames
             * @property {Array.<perfetto.protos.IInternedString>|null} [locationNames] HeapGraph locationNames
             * @property {boolean|null} [continued] HeapGraph continued
             * @property {number|null} [index] HeapGraph index
             */

            /**
             * Constructs a new HeapGraph.
             * @memberof perfetto.protos
             * @classdesc Represents a HeapGraph.
             * @implements IHeapGraph
             * @constructor
             * @param {perfetto.protos.IHeapGraph=} [p] Properties to set
             */
            function HeapGraph(p) {
                this.objects = [];
                this.roots = [];
                this.types = [];
                this.fieldNames = [];
                this.locationNames = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * HeapGraph pid.
             * @member {number} pid
             * @memberof perfetto.protos.HeapGraph
             * @instance
             */
            HeapGraph.prototype.pid = 0;

            /**
             * HeapGraph objects.
             * @member {Array.<perfetto.protos.IHeapGraphObject>} objects
             * @memberof perfetto.protos.HeapGraph
             * @instance
             */
            HeapGraph.prototype.objects = $util.emptyArray;

            /**
             * HeapGraph roots.
             * @member {Array.<perfetto.protos.IHeapGraphRoot>} roots
             * @memberof perfetto.protos.HeapGraph
             * @instance
             */
            HeapGraph.prototype.roots = $util.emptyArray;

            /**
             * HeapGraph types.
             * @member {Array.<perfetto.protos.IHeapGraphType>} types
             * @memberof perfetto.protos.HeapGraph
             * @instance
             */
            HeapGraph.prototype.types = $util.emptyArray;

            /**
             * HeapGraph fieldNames.
             * @member {Array.<perfetto.protos.IInternedString>} fieldNames
             * @memberof perfetto.protos.HeapGraph
             * @instance
             */
            HeapGraph.prototype.fieldNames = $util.emptyArray;

            /**
             * HeapGraph locationNames.
             * @member {Array.<perfetto.protos.IInternedString>} locationNames
             * @memberof perfetto.protos.HeapGraph
             * @instance
             */
            HeapGraph.prototype.locationNames = $util.emptyArray;

            /**
             * HeapGraph continued.
             * @member {boolean} continued
             * @memberof perfetto.protos.HeapGraph
             * @instance
             */
            HeapGraph.prototype.continued = false;

            /**
             * HeapGraph index.
             * @member {number} index
             * @memberof perfetto.protos.HeapGraph
             * @instance
             */
            HeapGraph.prototype.index = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new HeapGraph instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.HeapGraph
             * @static
             * @param {perfetto.protos.IHeapGraph=} [properties] Properties to set
             * @returns {perfetto.protos.HeapGraph} HeapGraph instance
             */
            HeapGraph.create = function create(properties) {
                return new HeapGraph(properties);
            };

            /**
             * Encodes the specified HeapGraph message. Does not implicitly {@link perfetto.protos.HeapGraph.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.HeapGraph
             * @static
             * @param {perfetto.protos.IHeapGraph} m HeapGraph message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HeapGraph.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(8).int32(m.pid);
                if (m.objects != null && m.objects.length) {
                    for (var i = 0; i < m.objects.length; ++i)
                        $root.perfetto.protos.HeapGraphObject.encode(m.objects[i], w.uint32(18).fork()).ldelim();
                }
                if (m.fieldNames != null && m.fieldNames.length) {
                    for (var i = 0; i < m.fieldNames.length; ++i)
                        $root.perfetto.protos.InternedString.encode(m.fieldNames[i], w.uint32(34).fork()).ldelim();
                }
                if (m.continued != null && Object.hasOwnProperty.call(m, "continued"))
                    w.uint32(40).bool(m.continued);
                if (m.index != null && Object.hasOwnProperty.call(m, "index"))
                    w.uint32(48).uint64(m.index);
                if (m.roots != null && m.roots.length) {
                    for (var i = 0; i < m.roots.length; ++i)
                        $root.perfetto.protos.HeapGraphRoot.encode(m.roots[i], w.uint32(58).fork()).ldelim();
                }
                if (m.locationNames != null && m.locationNames.length) {
                    for (var i = 0; i < m.locationNames.length; ++i)
                        $root.perfetto.protos.InternedString.encode(m.locationNames[i], w.uint32(66).fork()).ldelim();
                }
                if (m.types != null && m.types.length) {
                    for (var i = 0; i < m.types.length; ++i)
                        $root.perfetto.protos.HeapGraphType.encode(m.types[i], w.uint32(74).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified HeapGraph message, length delimited. Does not implicitly {@link perfetto.protos.HeapGraph.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.HeapGraph
             * @static
             * @param {perfetto.protos.IHeapGraph} message HeapGraph message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            HeapGraph.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a HeapGraph message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.HeapGraph
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.HeapGraph} HeapGraph
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HeapGraph.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.HeapGraph();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.pid = r.int32();
                        break;
                    case 2:
                        if (!(m.objects && m.objects.length))
                            m.objects = [];
                        m.objects.push($root.perfetto.protos.HeapGraphObject.decode(r, r.uint32()));
                        break;
                    case 7:
                        if (!(m.roots && m.roots.length))
                            m.roots = [];
                        m.roots.push($root.perfetto.protos.HeapGraphRoot.decode(r, r.uint32()));
                        break;
                    case 9:
                        if (!(m.types && m.types.length))
                            m.types = [];
                        m.types.push($root.perfetto.protos.HeapGraphType.decode(r, r.uint32()));
                        break;
                    case 4:
                        if (!(m.fieldNames && m.fieldNames.length))
                            m.fieldNames = [];
                        m.fieldNames.push($root.perfetto.protos.InternedString.decode(r, r.uint32()));
                        break;
                    case 8:
                        if (!(m.locationNames && m.locationNames.length))
                            m.locationNames = [];
                        m.locationNames.push($root.perfetto.protos.InternedString.decode(r, r.uint32()));
                        break;
                    case 5:
                        m.continued = r.bool();
                        break;
                    case 6:
                        m.index = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a HeapGraph message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.HeapGraph
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.HeapGraph} HeapGraph
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            HeapGraph.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a HeapGraph message.
             * @function verify
             * @memberof perfetto.protos.HeapGraph
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            HeapGraph.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.objects != null && m.hasOwnProperty("objects")) {
                    if (!Array.isArray(m.objects))
                        return "objects: array expected";
                    for (var i = 0; i < m.objects.length; ++i) {
                        {
                            var e = $root.perfetto.protos.HeapGraphObject.verify(m.objects[i]);
                            if (e)
                                return "objects." + e;
                        }
                    }
                }
                if (m.roots != null && m.hasOwnProperty("roots")) {
                    if (!Array.isArray(m.roots))
                        return "roots: array expected";
                    for (var i = 0; i < m.roots.length; ++i) {
                        {
                            var e = $root.perfetto.protos.HeapGraphRoot.verify(m.roots[i]);
                            if (e)
                                return "roots." + e;
                        }
                    }
                }
                if (m.types != null && m.hasOwnProperty("types")) {
                    if (!Array.isArray(m.types))
                        return "types: array expected";
                    for (var i = 0; i < m.types.length; ++i) {
                        {
                            var e = $root.perfetto.protos.HeapGraphType.verify(m.types[i]);
                            if (e)
                                return "types." + e;
                        }
                    }
                }
                if (m.fieldNames != null && m.hasOwnProperty("fieldNames")) {
                    if (!Array.isArray(m.fieldNames))
                        return "fieldNames: array expected";
                    for (var i = 0; i < m.fieldNames.length; ++i) {
                        {
                            var e = $root.perfetto.protos.InternedString.verify(m.fieldNames[i]);
                            if (e)
                                return "fieldNames." + e;
                        }
                    }
                }
                if (m.locationNames != null && m.hasOwnProperty("locationNames")) {
                    if (!Array.isArray(m.locationNames))
                        return "locationNames: array expected";
                    for (var i = 0; i < m.locationNames.length; ++i) {
                        {
                            var e = $root.perfetto.protos.InternedString.verify(m.locationNames[i]);
                            if (e)
                                return "locationNames." + e;
                        }
                    }
                }
                if (m.continued != null && m.hasOwnProperty("continued")) {
                    if (typeof m.continued !== "boolean")
                        return "continued: boolean expected";
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (!$util.isInteger(m.index) && !(m.index && $util.isInteger(m.index.low) && $util.isInteger(m.index.high)))
                        return "index: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a HeapGraph message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.HeapGraph
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.HeapGraph} HeapGraph
             */
            HeapGraph.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.HeapGraph)
                    return d;
                var m = new $root.perfetto.protos.HeapGraph();
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                if (d.objects) {
                    if (!Array.isArray(d.objects))
                        throw TypeError(".perfetto.protos.HeapGraph.objects: array expected");
                    m.objects = [];
                    for (var i = 0; i < d.objects.length; ++i) {
                        if (typeof d.objects[i] !== "object")
                            throw TypeError(".perfetto.protos.HeapGraph.objects: object expected");
                        m.objects[i] = $root.perfetto.protos.HeapGraphObject.fromObject(d.objects[i]);
                    }
                }
                if (d.roots) {
                    if (!Array.isArray(d.roots))
                        throw TypeError(".perfetto.protos.HeapGraph.roots: array expected");
                    m.roots = [];
                    for (var i = 0; i < d.roots.length; ++i) {
                        if (typeof d.roots[i] !== "object")
                            throw TypeError(".perfetto.protos.HeapGraph.roots: object expected");
                        m.roots[i] = $root.perfetto.protos.HeapGraphRoot.fromObject(d.roots[i]);
                    }
                }
                if (d.types) {
                    if (!Array.isArray(d.types))
                        throw TypeError(".perfetto.protos.HeapGraph.types: array expected");
                    m.types = [];
                    for (var i = 0; i < d.types.length; ++i) {
                        if (typeof d.types[i] !== "object")
                            throw TypeError(".perfetto.protos.HeapGraph.types: object expected");
                        m.types[i] = $root.perfetto.protos.HeapGraphType.fromObject(d.types[i]);
                    }
                }
                if (d.fieldNames) {
                    if (!Array.isArray(d.fieldNames))
                        throw TypeError(".perfetto.protos.HeapGraph.fieldNames: array expected");
                    m.fieldNames = [];
                    for (var i = 0; i < d.fieldNames.length; ++i) {
                        if (typeof d.fieldNames[i] !== "object")
                            throw TypeError(".perfetto.protos.HeapGraph.fieldNames: object expected");
                        m.fieldNames[i] = $root.perfetto.protos.InternedString.fromObject(d.fieldNames[i]);
                    }
                }
                if (d.locationNames) {
                    if (!Array.isArray(d.locationNames))
                        throw TypeError(".perfetto.protos.HeapGraph.locationNames: array expected");
                    m.locationNames = [];
                    for (var i = 0; i < d.locationNames.length; ++i) {
                        if (typeof d.locationNames[i] !== "object")
                            throw TypeError(".perfetto.protos.HeapGraph.locationNames: object expected");
                        m.locationNames[i] = $root.perfetto.protos.InternedString.fromObject(d.locationNames[i]);
                    }
                }
                if (d.continued != null) {
                    m.continued = Boolean(d.continued);
                }
                if (d.index != null) {
                    if ($util.Long)
                        (m.index = $util.Long.fromValue(d.index)).unsigned = true;
                    else if (typeof d.index === "string")
                        m.index = parseInt(d.index, 10);
                    else if (typeof d.index === "number")
                        m.index = d.index;
                    else if (typeof d.index === "object")
                        m.index = new $util.LongBits(d.index.low >>> 0, d.index.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a HeapGraph message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.HeapGraph
             * @static
             * @param {perfetto.protos.HeapGraph} m HeapGraph
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            HeapGraph.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.objects = [];
                    d.fieldNames = [];
                    d.roots = [];
                    d.locationNames = [];
                    d.types = [];
                }
                if (o.defaults) {
                    d.pid = 0;
                    d.continued = false;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.index = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.index = o.longs === String ? "0" : 0;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.objects && m.objects.length) {
                    d.objects = [];
                    for (var j = 0; j < m.objects.length; ++j) {
                        d.objects[j] = $root.perfetto.protos.HeapGraphObject.toObject(m.objects[j], o);
                    }
                }
                if (m.fieldNames && m.fieldNames.length) {
                    d.fieldNames = [];
                    for (var j = 0; j < m.fieldNames.length; ++j) {
                        d.fieldNames[j] = $root.perfetto.protos.InternedString.toObject(m.fieldNames[j], o);
                    }
                }
                if (m.continued != null && m.hasOwnProperty("continued")) {
                    d.continued = m.continued;
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (typeof m.index === "number")
                        d.index = o.longs === String ? String(m.index) : m.index;
                    else
                        d.index = o.longs === String ? $util.Long.prototype.toString.call(m.index) : o.longs === Number ? new $util.LongBits(m.index.low >>> 0, m.index.high >>> 0).toNumber(true) : m.index;
                }
                if (m.roots && m.roots.length) {
                    d.roots = [];
                    for (var j = 0; j < m.roots.length; ++j) {
                        d.roots[j] = $root.perfetto.protos.HeapGraphRoot.toObject(m.roots[j], o);
                    }
                }
                if (m.locationNames && m.locationNames.length) {
                    d.locationNames = [];
                    for (var j = 0; j < m.locationNames.length; ++j) {
                        d.locationNames[j] = $root.perfetto.protos.InternedString.toObject(m.locationNames[j], o);
                    }
                }
                if (m.types && m.types.length) {
                    d.types = [];
                    for (var j = 0; j < m.types.length; ++j) {
                        d.types[j] = $root.perfetto.protos.HeapGraphType.toObject(m.types[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this HeapGraph to JSON.
             * @function toJSON
             * @memberof perfetto.protos.HeapGraph
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            HeapGraph.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return HeapGraph;
        })();

        protos.ProfilePacket = (function() {

            /**
             * Properties of a ProfilePacket.
             * @memberof perfetto.protos
             * @interface IProfilePacket
             * @property {Array.<perfetto.protos.IInternedString>|null} [strings] ProfilePacket strings
             * @property {Array.<perfetto.protos.IMapping>|null} [mappings] ProfilePacket mappings
             * @property {Array.<perfetto.protos.IFrame>|null} [frames] ProfilePacket frames
             * @property {Array.<perfetto.protos.ICallstack>|null} [callstacks] ProfilePacket callstacks
             * @property {Array.<perfetto.protos.ProfilePacket.IProcessHeapSamples>|null} [processDumps] ProfilePacket processDumps
             * @property {boolean|null} [continued] ProfilePacket continued
             * @property {number|null} [index] ProfilePacket index
             */

            /**
             * Constructs a new ProfilePacket.
             * @memberof perfetto.protos
             * @classdesc Represents a ProfilePacket.
             * @implements IProfilePacket
             * @constructor
             * @param {perfetto.protos.IProfilePacket=} [p] Properties to set
             */
            function ProfilePacket(p) {
                this.strings = [];
                this.mappings = [];
                this.frames = [];
                this.callstacks = [];
                this.processDumps = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ProfilePacket strings.
             * @member {Array.<perfetto.protos.IInternedString>} strings
             * @memberof perfetto.protos.ProfilePacket
             * @instance
             */
            ProfilePacket.prototype.strings = $util.emptyArray;

            /**
             * ProfilePacket mappings.
             * @member {Array.<perfetto.protos.IMapping>} mappings
             * @memberof perfetto.protos.ProfilePacket
             * @instance
             */
            ProfilePacket.prototype.mappings = $util.emptyArray;

            /**
             * ProfilePacket frames.
             * @member {Array.<perfetto.protos.IFrame>} frames
             * @memberof perfetto.protos.ProfilePacket
             * @instance
             */
            ProfilePacket.prototype.frames = $util.emptyArray;

            /**
             * ProfilePacket callstacks.
             * @member {Array.<perfetto.protos.ICallstack>} callstacks
             * @memberof perfetto.protos.ProfilePacket
             * @instance
             */
            ProfilePacket.prototype.callstacks = $util.emptyArray;

            /**
             * ProfilePacket processDumps.
             * @member {Array.<perfetto.protos.ProfilePacket.IProcessHeapSamples>} processDumps
             * @memberof perfetto.protos.ProfilePacket
             * @instance
             */
            ProfilePacket.prototype.processDumps = $util.emptyArray;

            /**
             * ProfilePacket continued.
             * @member {boolean} continued
             * @memberof perfetto.protos.ProfilePacket
             * @instance
             */
            ProfilePacket.prototype.continued = false;

            /**
             * ProfilePacket index.
             * @member {number} index
             * @memberof perfetto.protos.ProfilePacket
             * @instance
             */
            ProfilePacket.prototype.index = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new ProfilePacket instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ProfilePacket
             * @static
             * @param {perfetto.protos.IProfilePacket=} [properties] Properties to set
             * @returns {perfetto.protos.ProfilePacket} ProfilePacket instance
             */
            ProfilePacket.create = function create(properties) {
                return new ProfilePacket(properties);
            };

            /**
             * Encodes the specified ProfilePacket message. Does not implicitly {@link perfetto.protos.ProfilePacket.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ProfilePacket
             * @static
             * @param {perfetto.protos.IProfilePacket} m ProfilePacket message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ProfilePacket.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.strings != null && m.strings.length) {
                    for (var i = 0; i < m.strings.length; ++i)
                        $root.perfetto.protos.InternedString.encode(m.strings[i], w.uint32(10).fork()).ldelim();
                }
                if (m.frames != null && m.frames.length) {
                    for (var i = 0; i < m.frames.length; ++i)
                        $root.perfetto.protos.Frame.encode(m.frames[i], w.uint32(18).fork()).ldelim();
                }
                if (m.callstacks != null && m.callstacks.length) {
                    for (var i = 0; i < m.callstacks.length; ++i)
                        $root.perfetto.protos.Callstack.encode(m.callstacks[i], w.uint32(26).fork()).ldelim();
                }
                if (m.mappings != null && m.mappings.length) {
                    for (var i = 0; i < m.mappings.length; ++i)
                        $root.perfetto.protos.Mapping.encode(m.mappings[i], w.uint32(34).fork()).ldelim();
                }
                if (m.processDumps != null && m.processDumps.length) {
                    for (var i = 0; i < m.processDumps.length; ++i)
                        $root.perfetto.protos.ProfilePacket.ProcessHeapSamples.encode(m.processDumps[i], w.uint32(42).fork()).ldelim();
                }
                if (m.continued != null && Object.hasOwnProperty.call(m, "continued"))
                    w.uint32(48).bool(m.continued);
                if (m.index != null && Object.hasOwnProperty.call(m, "index"))
                    w.uint32(56).uint64(m.index);
                return w;
            };

            /**
             * Encodes the specified ProfilePacket message, length delimited. Does not implicitly {@link perfetto.protos.ProfilePacket.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ProfilePacket
             * @static
             * @param {perfetto.protos.IProfilePacket} message ProfilePacket message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ProfilePacket.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ProfilePacket message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ProfilePacket
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ProfilePacket} ProfilePacket
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ProfilePacket.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ProfilePacket();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.strings && m.strings.length))
                            m.strings = [];
                        m.strings.push($root.perfetto.protos.InternedString.decode(r, r.uint32()));
                        break;
                    case 4:
                        if (!(m.mappings && m.mappings.length))
                            m.mappings = [];
                        m.mappings.push($root.perfetto.protos.Mapping.decode(r, r.uint32()));
                        break;
                    case 2:
                        if (!(m.frames && m.frames.length))
                            m.frames = [];
                        m.frames.push($root.perfetto.protos.Frame.decode(r, r.uint32()));
                        break;
                    case 3:
                        if (!(m.callstacks && m.callstacks.length))
                            m.callstacks = [];
                        m.callstacks.push($root.perfetto.protos.Callstack.decode(r, r.uint32()));
                        break;
                    case 5:
                        if (!(m.processDumps && m.processDumps.length))
                            m.processDumps = [];
                        m.processDumps.push($root.perfetto.protos.ProfilePacket.ProcessHeapSamples.decode(r, r.uint32()));
                        break;
                    case 6:
                        m.continued = r.bool();
                        break;
                    case 7:
                        m.index = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ProfilePacket message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ProfilePacket
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ProfilePacket} ProfilePacket
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ProfilePacket.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ProfilePacket message.
             * @function verify
             * @memberof perfetto.protos.ProfilePacket
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ProfilePacket.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.strings != null && m.hasOwnProperty("strings")) {
                    if (!Array.isArray(m.strings))
                        return "strings: array expected";
                    for (var i = 0; i < m.strings.length; ++i) {
                        {
                            var e = $root.perfetto.protos.InternedString.verify(m.strings[i]);
                            if (e)
                                return "strings." + e;
                        }
                    }
                }
                if (m.mappings != null && m.hasOwnProperty("mappings")) {
                    if (!Array.isArray(m.mappings))
                        return "mappings: array expected";
                    for (var i = 0; i < m.mappings.length; ++i) {
                        {
                            var e = $root.perfetto.protos.Mapping.verify(m.mappings[i]);
                            if (e)
                                return "mappings." + e;
                        }
                    }
                }
                if (m.frames != null && m.hasOwnProperty("frames")) {
                    if (!Array.isArray(m.frames))
                        return "frames: array expected";
                    for (var i = 0; i < m.frames.length; ++i) {
                        {
                            var e = $root.perfetto.protos.Frame.verify(m.frames[i]);
                            if (e)
                                return "frames." + e;
                        }
                    }
                }
                if (m.callstacks != null && m.hasOwnProperty("callstacks")) {
                    if (!Array.isArray(m.callstacks))
                        return "callstacks: array expected";
                    for (var i = 0; i < m.callstacks.length; ++i) {
                        {
                            var e = $root.perfetto.protos.Callstack.verify(m.callstacks[i]);
                            if (e)
                                return "callstacks." + e;
                        }
                    }
                }
                if (m.processDumps != null && m.hasOwnProperty("processDumps")) {
                    if (!Array.isArray(m.processDumps))
                        return "processDumps: array expected";
                    for (var i = 0; i < m.processDumps.length; ++i) {
                        {
                            var e = $root.perfetto.protos.ProfilePacket.ProcessHeapSamples.verify(m.processDumps[i]);
                            if (e)
                                return "processDumps." + e;
                        }
                    }
                }
                if (m.continued != null && m.hasOwnProperty("continued")) {
                    if (typeof m.continued !== "boolean")
                        return "continued: boolean expected";
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (!$util.isInteger(m.index) && !(m.index && $util.isInteger(m.index.low) && $util.isInteger(m.index.high)))
                        return "index: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a ProfilePacket message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ProfilePacket
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ProfilePacket} ProfilePacket
             */
            ProfilePacket.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ProfilePacket)
                    return d;
                var m = new $root.perfetto.protos.ProfilePacket();
                if (d.strings) {
                    if (!Array.isArray(d.strings))
                        throw TypeError(".perfetto.protos.ProfilePacket.strings: array expected");
                    m.strings = [];
                    for (var i = 0; i < d.strings.length; ++i) {
                        if (typeof d.strings[i] !== "object")
                            throw TypeError(".perfetto.protos.ProfilePacket.strings: object expected");
                        m.strings[i] = $root.perfetto.protos.InternedString.fromObject(d.strings[i]);
                    }
                }
                if (d.mappings) {
                    if (!Array.isArray(d.mappings))
                        throw TypeError(".perfetto.protos.ProfilePacket.mappings: array expected");
                    m.mappings = [];
                    for (var i = 0; i < d.mappings.length; ++i) {
                        if (typeof d.mappings[i] !== "object")
                            throw TypeError(".perfetto.protos.ProfilePacket.mappings: object expected");
                        m.mappings[i] = $root.perfetto.protos.Mapping.fromObject(d.mappings[i]);
                    }
                }
                if (d.frames) {
                    if (!Array.isArray(d.frames))
                        throw TypeError(".perfetto.protos.ProfilePacket.frames: array expected");
                    m.frames = [];
                    for (var i = 0; i < d.frames.length; ++i) {
                        if (typeof d.frames[i] !== "object")
                            throw TypeError(".perfetto.protos.ProfilePacket.frames: object expected");
                        m.frames[i] = $root.perfetto.protos.Frame.fromObject(d.frames[i]);
                    }
                }
                if (d.callstacks) {
                    if (!Array.isArray(d.callstacks))
                        throw TypeError(".perfetto.protos.ProfilePacket.callstacks: array expected");
                    m.callstacks = [];
                    for (var i = 0; i < d.callstacks.length; ++i) {
                        if (typeof d.callstacks[i] !== "object")
                            throw TypeError(".perfetto.protos.ProfilePacket.callstacks: object expected");
                        m.callstacks[i] = $root.perfetto.protos.Callstack.fromObject(d.callstacks[i]);
                    }
                }
                if (d.processDumps) {
                    if (!Array.isArray(d.processDumps))
                        throw TypeError(".perfetto.protos.ProfilePacket.processDumps: array expected");
                    m.processDumps = [];
                    for (var i = 0; i < d.processDumps.length; ++i) {
                        if (typeof d.processDumps[i] !== "object")
                            throw TypeError(".perfetto.protos.ProfilePacket.processDumps: object expected");
                        m.processDumps[i] = $root.perfetto.protos.ProfilePacket.ProcessHeapSamples.fromObject(d.processDumps[i]);
                    }
                }
                if (d.continued != null) {
                    m.continued = Boolean(d.continued);
                }
                if (d.index != null) {
                    if ($util.Long)
                        (m.index = $util.Long.fromValue(d.index)).unsigned = true;
                    else if (typeof d.index === "string")
                        m.index = parseInt(d.index, 10);
                    else if (typeof d.index === "number")
                        m.index = d.index;
                    else if (typeof d.index === "object")
                        m.index = new $util.LongBits(d.index.low >>> 0, d.index.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a ProfilePacket message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ProfilePacket
             * @static
             * @param {perfetto.protos.ProfilePacket} m ProfilePacket
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ProfilePacket.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.strings = [];
                    d.frames = [];
                    d.callstacks = [];
                    d.mappings = [];
                    d.processDumps = [];
                }
                if (o.defaults) {
                    d.continued = false;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.index = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.index = o.longs === String ? "0" : 0;
                }
                if (m.strings && m.strings.length) {
                    d.strings = [];
                    for (var j = 0; j < m.strings.length; ++j) {
                        d.strings[j] = $root.perfetto.protos.InternedString.toObject(m.strings[j], o);
                    }
                }
                if (m.frames && m.frames.length) {
                    d.frames = [];
                    for (var j = 0; j < m.frames.length; ++j) {
                        d.frames[j] = $root.perfetto.protos.Frame.toObject(m.frames[j], o);
                    }
                }
                if (m.callstacks && m.callstacks.length) {
                    d.callstacks = [];
                    for (var j = 0; j < m.callstacks.length; ++j) {
                        d.callstacks[j] = $root.perfetto.protos.Callstack.toObject(m.callstacks[j], o);
                    }
                }
                if (m.mappings && m.mappings.length) {
                    d.mappings = [];
                    for (var j = 0; j < m.mappings.length; ++j) {
                        d.mappings[j] = $root.perfetto.protos.Mapping.toObject(m.mappings[j], o);
                    }
                }
                if (m.processDumps && m.processDumps.length) {
                    d.processDumps = [];
                    for (var j = 0; j < m.processDumps.length; ++j) {
                        d.processDumps[j] = $root.perfetto.protos.ProfilePacket.ProcessHeapSamples.toObject(m.processDumps[j], o);
                    }
                }
                if (m.continued != null && m.hasOwnProperty("continued")) {
                    d.continued = m.continued;
                }
                if (m.index != null && m.hasOwnProperty("index")) {
                    if (typeof m.index === "number")
                        d.index = o.longs === String ? String(m.index) : m.index;
                    else
                        d.index = o.longs === String ? $util.Long.prototype.toString.call(m.index) : o.longs === Number ? new $util.LongBits(m.index.low >>> 0, m.index.high >>> 0).toNumber(true) : m.index;
                }
                return d;
            };

            /**
             * Converts this ProfilePacket to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ProfilePacket
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ProfilePacket.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            ProfilePacket.HeapSample = (function() {

                /**
                 * Properties of a HeapSample.
                 * @memberof perfetto.protos.ProfilePacket
                 * @interface IHeapSample
                 * @property {number|null} [callstackId] HeapSample callstackId
                 * @property {number|null} [selfAllocated] HeapSample selfAllocated
                 * @property {number|null} [selfFreed] HeapSample selfFreed
                 * @property {number|null} [selfMax] HeapSample selfMax
                 * @property {number|null} [selfMaxCount] HeapSample selfMaxCount
                 * @property {number|null} [timestamp] HeapSample timestamp
                 * @property {number|null} [allocCount] HeapSample allocCount
                 * @property {number|null} [freeCount] HeapSample freeCount
                 */

                /**
                 * Constructs a new HeapSample.
                 * @memberof perfetto.protos.ProfilePacket
                 * @classdesc Represents a HeapSample.
                 * @implements IHeapSample
                 * @constructor
                 * @param {perfetto.protos.ProfilePacket.IHeapSample=} [p] Properties to set
                 */
                function HeapSample(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * HeapSample callstackId.
                 * @member {number} callstackId
                 * @memberof perfetto.protos.ProfilePacket.HeapSample
                 * @instance
                 */
                HeapSample.prototype.callstackId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * HeapSample selfAllocated.
                 * @member {number} selfAllocated
                 * @memberof perfetto.protos.ProfilePacket.HeapSample
                 * @instance
                 */
                HeapSample.prototype.selfAllocated = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * HeapSample selfFreed.
                 * @member {number} selfFreed
                 * @memberof perfetto.protos.ProfilePacket.HeapSample
                 * @instance
                 */
                HeapSample.prototype.selfFreed = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * HeapSample selfMax.
                 * @member {number} selfMax
                 * @memberof perfetto.protos.ProfilePacket.HeapSample
                 * @instance
                 */
                HeapSample.prototype.selfMax = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * HeapSample selfMaxCount.
                 * @member {number} selfMaxCount
                 * @memberof perfetto.protos.ProfilePacket.HeapSample
                 * @instance
                 */
                HeapSample.prototype.selfMaxCount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * HeapSample timestamp.
                 * @member {number} timestamp
                 * @memberof perfetto.protos.ProfilePacket.HeapSample
                 * @instance
                 */
                HeapSample.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * HeapSample allocCount.
                 * @member {number} allocCount
                 * @memberof perfetto.protos.ProfilePacket.HeapSample
                 * @instance
                 */
                HeapSample.prototype.allocCount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * HeapSample freeCount.
                 * @member {number} freeCount
                 * @memberof perfetto.protos.ProfilePacket.HeapSample
                 * @instance
                 */
                HeapSample.prototype.freeCount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Creates a new HeapSample instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.ProfilePacket.HeapSample
                 * @static
                 * @param {perfetto.protos.ProfilePacket.IHeapSample=} [properties] Properties to set
                 * @returns {perfetto.protos.ProfilePacket.HeapSample} HeapSample instance
                 */
                HeapSample.create = function create(properties) {
                    return new HeapSample(properties);
                };

                /**
                 * Encodes the specified HeapSample message. Does not implicitly {@link perfetto.protos.ProfilePacket.HeapSample.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.ProfilePacket.HeapSample
                 * @static
                 * @param {perfetto.protos.ProfilePacket.IHeapSample} m HeapSample message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                HeapSample.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.callstackId != null && Object.hasOwnProperty.call(m, "callstackId"))
                        w.uint32(8).uint64(m.callstackId);
                    if (m.selfAllocated != null && Object.hasOwnProperty.call(m, "selfAllocated"))
                        w.uint32(16).uint64(m.selfAllocated);
                    if (m.selfFreed != null && Object.hasOwnProperty.call(m, "selfFreed"))
                        w.uint32(24).uint64(m.selfFreed);
                    if (m.timestamp != null && Object.hasOwnProperty.call(m, "timestamp"))
                        w.uint32(32).uint64(m.timestamp);
                    if (m.allocCount != null && Object.hasOwnProperty.call(m, "allocCount"))
                        w.uint32(40).uint64(m.allocCount);
                    if (m.freeCount != null && Object.hasOwnProperty.call(m, "freeCount"))
                        w.uint32(48).uint64(m.freeCount);
                    if (m.selfMax != null && Object.hasOwnProperty.call(m, "selfMax"))
                        w.uint32(64).uint64(m.selfMax);
                    if (m.selfMaxCount != null && Object.hasOwnProperty.call(m, "selfMaxCount"))
                        w.uint32(72).uint64(m.selfMaxCount);
                    return w;
                };

                /**
                 * Encodes the specified HeapSample message, length delimited. Does not implicitly {@link perfetto.protos.ProfilePacket.HeapSample.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.ProfilePacket.HeapSample
                 * @static
                 * @param {perfetto.protos.ProfilePacket.IHeapSample} message HeapSample message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                HeapSample.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a HeapSample message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.ProfilePacket.HeapSample
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.ProfilePacket.HeapSample} HeapSample
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                HeapSample.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ProfilePacket.HeapSample();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.callstackId = r.uint64();
                            break;
                        case 2:
                            m.selfAllocated = r.uint64();
                            break;
                        case 3:
                            m.selfFreed = r.uint64();
                            break;
                        case 8:
                            m.selfMax = r.uint64();
                            break;
                        case 9:
                            m.selfMaxCount = r.uint64();
                            break;
                        case 4:
                            m.timestamp = r.uint64();
                            break;
                        case 5:
                            m.allocCount = r.uint64();
                            break;
                        case 6:
                            m.freeCount = r.uint64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a HeapSample message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.ProfilePacket.HeapSample
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.ProfilePacket.HeapSample} HeapSample
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                HeapSample.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a HeapSample message.
                 * @function verify
                 * @memberof perfetto.protos.ProfilePacket.HeapSample
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                HeapSample.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.callstackId != null && m.hasOwnProperty("callstackId")) {
                        if (!$util.isInteger(m.callstackId) && !(m.callstackId && $util.isInteger(m.callstackId.low) && $util.isInteger(m.callstackId.high)))
                            return "callstackId: integer|Long expected";
                    }
                    if (m.selfAllocated != null && m.hasOwnProperty("selfAllocated")) {
                        if (!$util.isInteger(m.selfAllocated) && !(m.selfAllocated && $util.isInteger(m.selfAllocated.low) && $util.isInteger(m.selfAllocated.high)))
                            return "selfAllocated: integer|Long expected";
                    }
                    if (m.selfFreed != null && m.hasOwnProperty("selfFreed")) {
                        if (!$util.isInteger(m.selfFreed) && !(m.selfFreed && $util.isInteger(m.selfFreed.low) && $util.isInteger(m.selfFreed.high)))
                            return "selfFreed: integer|Long expected";
                    }
                    if (m.selfMax != null && m.hasOwnProperty("selfMax")) {
                        if (!$util.isInteger(m.selfMax) && !(m.selfMax && $util.isInteger(m.selfMax.low) && $util.isInteger(m.selfMax.high)))
                            return "selfMax: integer|Long expected";
                    }
                    if (m.selfMaxCount != null && m.hasOwnProperty("selfMaxCount")) {
                        if (!$util.isInteger(m.selfMaxCount) && !(m.selfMaxCount && $util.isInteger(m.selfMaxCount.low) && $util.isInteger(m.selfMaxCount.high)))
                            return "selfMaxCount: integer|Long expected";
                    }
                    if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                        if (!$util.isInteger(m.timestamp) && !(m.timestamp && $util.isInteger(m.timestamp.low) && $util.isInteger(m.timestamp.high)))
                            return "timestamp: integer|Long expected";
                    }
                    if (m.allocCount != null && m.hasOwnProperty("allocCount")) {
                        if (!$util.isInteger(m.allocCount) && !(m.allocCount && $util.isInteger(m.allocCount.low) && $util.isInteger(m.allocCount.high)))
                            return "allocCount: integer|Long expected";
                    }
                    if (m.freeCount != null && m.hasOwnProperty("freeCount")) {
                        if (!$util.isInteger(m.freeCount) && !(m.freeCount && $util.isInteger(m.freeCount.low) && $util.isInteger(m.freeCount.high)))
                            return "freeCount: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a HeapSample message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.ProfilePacket.HeapSample
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.ProfilePacket.HeapSample} HeapSample
                 */
                HeapSample.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.ProfilePacket.HeapSample)
                        return d;
                    var m = new $root.perfetto.protos.ProfilePacket.HeapSample();
                    if (d.callstackId != null) {
                        if ($util.Long)
                            (m.callstackId = $util.Long.fromValue(d.callstackId)).unsigned = true;
                        else if (typeof d.callstackId === "string")
                            m.callstackId = parseInt(d.callstackId, 10);
                        else if (typeof d.callstackId === "number")
                            m.callstackId = d.callstackId;
                        else if (typeof d.callstackId === "object")
                            m.callstackId = new $util.LongBits(d.callstackId.low >>> 0, d.callstackId.high >>> 0).toNumber(true);
                    }
                    if (d.selfAllocated != null) {
                        if ($util.Long)
                            (m.selfAllocated = $util.Long.fromValue(d.selfAllocated)).unsigned = true;
                        else if (typeof d.selfAllocated === "string")
                            m.selfAllocated = parseInt(d.selfAllocated, 10);
                        else if (typeof d.selfAllocated === "number")
                            m.selfAllocated = d.selfAllocated;
                        else if (typeof d.selfAllocated === "object")
                            m.selfAllocated = new $util.LongBits(d.selfAllocated.low >>> 0, d.selfAllocated.high >>> 0).toNumber(true);
                    }
                    if (d.selfFreed != null) {
                        if ($util.Long)
                            (m.selfFreed = $util.Long.fromValue(d.selfFreed)).unsigned = true;
                        else if (typeof d.selfFreed === "string")
                            m.selfFreed = parseInt(d.selfFreed, 10);
                        else if (typeof d.selfFreed === "number")
                            m.selfFreed = d.selfFreed;
                        else if (typeof d.selfFreed === "object")
                            m.selfFreed = new $util.LongBits(d.selfFreed.low >>> 0, d.selfFreed.high >>> 0).toNumber(true);
                    }
                    if (d.selfMax != null) {
                        if ($util.Long)
                            (m.selfMax = $util.Long.fromValue(d.selfMax)).unsigned = true;
                        else if (typeof d.selfMax === "string")
                            m.selfMax = parseInt(d.selfMax, 10);
                        else if (typeof d.selfMax === "number")
                            m.selfMax = d.selfMax;
                        else if (typeof d.selfMax === "object")
                            m.selfMax = new $util.LongBits(d.selfMax.low >>> 0, d.selfMax.high >>> 0).toNumber(true);
                    }
                    if (d.selfMaxCount != null) {
                        if ($util.Long)
                            (m.selfMaxCount = $util.Long.fromValue(d.selfMaxCount)).unsigned = true;
                        else if (typeof d.selfMaxCount === "string")
                            m.selfMaxCount = parseInt(d.selfMaxCount, 10);
                        else if (typeof d.selfMaxCount === "number")
                            m.selfMaxCount = d.selfMaxCount;
                        else if (typeof d.selfMaxCount === "object")
                            m.selfMaxCount = new $util.LongBits(d.selfMaxCount.low >>> 0, d.selfMaxCount.high >>> 0).toNumber(true);
                    }
                    if (d.timestamp != null) {
                        if ($util.Long)
                            (m.timestamp = $util.Long.fromValue(d.timestamp)).unsigned = true;
                        else if (typeof d.timestamp === "string")
                            m.timestamp = parseInt(d.timestamp, 10);
                        else if (typeof d.timestamp === "number")
                            m.timestamp = d.timestamp;
                        else if (typeof d.timestamp === "object")
                            m.timestamp = new $util.LongBits(d.timestamp.low >>> 0, d.timestamp.high >>> 0).toNumber(true);
                    }
                    if (d.allocCount != null) {
                        if ($util.Long)
                            (m.allocCount = $util.Long.fromValue(d.allocCount)).unsigned = true;
                        else if (typeof d.allocCount === "string")
                            m.allocCount = parseInt(d.allocCount, 10);
                        else if (typeof d.allocCount === "number")
                            m.allocCount = d.allocCount;
                        else if (typeof d.allocCount === "object")
                            m.allocCount = new $util.LongBits(d.allocCount.low >>> 0, d.allocCount.high >>> 0).toNumber(true);
                    }
                    if (d.freeCount != null) {
                        if ($util.Long)
                            (m.freeCount = $util.Long.fromValue(d.freeCount)).unsigned = true;
                        else if (typeof d.freeCount === "string")
                            m.freeCount = parseInt(d.freeCount, 10);
                        else if (typeof d.freeCount === "number")
                            m.freeCount = d.freeCount;
                        else if (typeof d.freeCount === "object")
                            m.freeCount = new $util.LongBits(d.freeCount.low >>> 0, d.freeCount.high >>> 0).toNumber(true);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a HeapSample message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.ProfilePacket.HeapSample
                 * @static
                 * @param {perfetto.protos.ProfilePacket.HeapSample} m HeapSample
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                HeapSample.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.callstackId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.callstackId = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.selfAllocated = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.selfAllocated = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.selfFreed = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.selfFreed = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.timestamp = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.allocCount = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.allocCount = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.freeCount = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.freeCount = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.selfMax = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.selfMax = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.selfMaxCount = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.selfMaxCount = o.longs === String ? "0" : 0;
                    }
                    if (m.callstackId != null && m.hasOwnProperty("callstackId")) {
                        if (typeof m.callstackId === "number")
                            d.callstackId = o.longs === String ? String(m.callstackId) : m.callstackId;
                        else
                            d.callstackId = o.longs === String ? $util.Long.prototype.toString.call(m.callstackId) : o.longs === Number ? new $util.LongBits(m.callstackId.low >>> 0, m.callstackId.high >>> 0).toNumber(true) : m.callstackId;
                    }
                    if (m.selfAllocated != null && m.hasOwnProperty("selfAllocated")) {
                        if (typeof m.selfAllocated === "number")
                            d.selfAllocated = o.longs === String ? String(m.selfAllocated) : m.selfAllocated;
                        else
                            d.selfAllocated = o.longs === String ? $util.Long.prototype.toString.call(m.selfAllocated) : o.longs === Number ? new $util.LongBits(m.selfAllocated.low >>> 0, m.selfAllocated.high >>> 0).toNumber(true) : m.selfAllocated;
                    }
                    if (m.selfFreed != null && m.hasOwnProperty("selfFreed")) {
                        if (typeof m.selfFreed === "number")
                            d.selfFreed = o.longs === String ? String(m.selfFreed) : m.selfFreed;
                        else
                            d.selfFreed = o.longs === String ? $util.Long.prototype.toString.call(m.selfFreed) : o.longs === Number ? new $util.LongBits(m.selfFreed.low >>> 0, m.selfFreed.high >>> 0).toNumber(true) : m.selfFreed;
                    }
                    if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                        if (typeof m.timestamp === "number")
                            d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp;
                        else
                            d.timestamp = o.longs === String ? $util.Long.prototype.toString.call(m.timestamp) : o.longs === Number ? new $util.LongBits(m.timestamp.low >>> 0, m.timestamp.high >>> 0).toNumber(true) : m.timestamp;
                    }
                    if (m.allocCount != null && m.hasOwnProperty("allocCount")) {
                        if (typeof m.allocCount === "number")
                            d.allocCount = o.longs === String ? String(m.allocCount) : m.allocCount;
                        else
                            d.allocCount = o.longs === String ? $util.Long.prototype.toString.call(m.allocCount) : o.longs === Number ? new $util.LongBits(m.allocCount.low >>> 0, m.allocCount.high >>> 0).toNumber(true) : m.allocCount;
                    }
                    if (m.freeCount != null && m.hasOwnProperty("freeCount")) {
                        if (typeof m.freeCount === "number")
                            d.freeCount = o.longs === String ? String(m.freeCount) : m.freeCount;
                        else
                            d.freeCount = o.longs === String ? $util.Long.prototype.toString.call(m.freeCount) : o.longs === Number ? new $util.LongBits(m.freeCount.low >>> 0, m.freeCount.high >>> 0).toNumber(true) : m.freeCount;
                    }
                    if (m.selfMax != null && m.hasOwnProperty("selfMax")) {
                        if (typeof m.selfMax === "number")
                            d.selfMax = o.longs === String ? String(m.selfMax) : m.selfMax;
                        else
                            d.selfMax = o.longs === String ? $util.Long.prototype.toString.call(m.selfMax) : o.longs === Number ? new $util.LongBits(m.selfMax.low >>> 0, m.selfMax.high >>> 0).toNumber(true) : m.selfMax;
                    }
                    if (m.selfMaxCount != null && m.hasOwnProperty("selfMaxCount")) {
                        if (typeof m.selfMaxCount === "number")
                            d.selfMaxCount = o.longs === String ? String(m.selfMaxCount) : m.selfMaxCount;
                        else
                            d.selfMaxCount = o.longs === String ? $util.Long.prototype.toString.call(m.selfMaxCount) : o.longs === Number ? new $util.LongBits(m.selfMaxCount.low >>> 0, m.selfMaxCount.high >>> 0).toNumber(true) : m.selfMaxCount;
                    }
                    return d;
                };

                /**
                 * Converts this HeapSample to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.ProfilePacket.HeapSample
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                HeapSample.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return HeapSample;
            })();

            ProfilePacket.Histogram = (function() {

                /**
                 * Properties of a Histogram.
                 * @memberof perfetto.protos.ProfilePacket
                 * @interface IHistogram
                 * @property {Array.<perfetto.protos.ProfilePacket.Histogram.IBucket>|null} [buckets] Histogram buckets
                 */

                /**
                 * Constructs a new Histogram.
                 * @memberof perfetto.protos.ProfilePacket
                 * @classdesc Represents a Histogram.
                 * @implements IHistogram
                 * @constructor
                 * @param {perfetto.protos.ProfilePacket.IHistogram=} [p] Properties to set
                 */
                function Histogram(p) {
                    this.buckets = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Histogram buckets.
                 * @member {Array.<perfetto.protos.ProfilePacket.Histogram.IBucket>} buckets
                 * @memberof perfetto.protos.ProfilePacket.Histogram
                 * @instance
                 */
                Histogram.prototype.buckets = $util.emptyArray;

                /**
                 * Creates a new Histogram instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.ProfilePacket.Histogram
                 * @static
                 * @param {perfetto.protos.ProfilePacket.IHistogram=} [properties] Properties to set
                 * @returns {perfetto.protos.ProfilePacket.Histogram} Histogram instance
                 */
                Histogram.create = function create(properties) {
                    return new Histogram(properties);
                };

                /**
                 * Encodes the specified Histogram message. Does not implicitly {@link perfetto.protos.ProfilePacket.Histogram.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.ProfilePacket.Histogram
                 * @static
                 * @param {perfetto.protos.ProfilePacket.IHistogram} m Histogram message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Histogram.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.buckets != null && m.buckets.length) {
                        for (var i = 0; i < m.buckets.length; ++i)
                            $root.perfetto.protos.ProfilePacket.Histogram.Bucket.encode(m.buckets[i], w.uint32(10).fork()).ldelim();
                    }
                    return w;
                };

                /**
                 * Encodes the specified Histogram message, length delimited. Does not implicitly {@link perfetto.protos.ProfilePacket.Histogram.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.ProfilePacket.Histogram
                 * @static
                 * @param {perfetto.protos.ProfilePacket.IHistogram} message Histogram message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Histogram.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Histogram message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.ProfilePacket.Histogram
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.ProfilePacket.Histogram} Histogram
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Histogram.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ProfilePacket.Histogram();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            if (!(m.buckets && m.buckets.length))
                                m.buckets = [];
                            m.buckets.push($root.perfetto.protos.ProfilePacket.Histogram.Bucket.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Histogram message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.ProfilePacket.Histogram
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.ProfilePacket.Histogram} Histogram
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Histogram.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Histogram message.
                 * @function verify
                 * @memberof perfetto.protos.ProfilePacket.Histogram
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Histogram.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.buckets != null && m.hasOwnProperty("buckets")) {
                        if (!Array.isArray(m.buckets))
                            return "buckets: array expected";
                        for (var i = 0; i < m.buckets.length; ++i) {
                            {
                                var e = $root.perfetto.protos.ProfilePacket.Histogram.Bucket.verify(m.buckets[i]);
                                if (e)
                                    return "buckets." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates a Histogram message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.ProfilePacket.Histogram
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.ProfilePacket.Histogram} Histogram
                 */
                Histogram.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.ProfilePacket.Histogram)
                        return d;
                    var m = new $root.perfetto.protos.ProfilePacket.Histogram();
                    if (d.buckets) {
                        if (!Array.isArray(d.buckets))
                            throw TypeError(".perfetto.protos.ProfilePacket.Histogram.buckets: array expected");
                        m.buckets = [];
                        for (var i = 0; i < d.buckets.length; ++i) {
                            if (typeof d.buckets[i] !== "object")
                                throw TypeError(".perfetto.protos.ProfilePacket.Histogram.buckets: object expected");
                            m.buckets[i] = $root.perfetto.protos.ProfilePacket.Histogram.Bucket.fromObject(d.buckets[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Histogram message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.ProfilePacket.Histogram
                 * @static
                 * @param {perfetto.protos.ProfilePacket.Histogram} m Histogram
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Histogram.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.buckets = [];
                    }
                    if (m.buckets && m.buckets.length) {
                        d.buckets = [];
                        for (var j = 0; j < m.buckets.length; ++j) {
                            d.buckets[j] = $root.perfetto.protos.ProfilePacket.Histogram.Bucket.toObject(m.buckets[j], o);
                        }
                    }
                    return d;
                };

                /**
                 * Converts this Histogram to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.ProfilePacket.Histogram
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Histogram.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                Histogram.Bucket = (function() {

                    /**
                     * Properties of a Bucket.
                     * @memberof perfetto.protos.ProfilePacket.Histogram
                     * @interface IBucket
                     * @property {number|null} [upperLimit] Bucket upperLimit
                     * @property {boolean|null} [maxBucket] Bucket maxBucket
                     * @property {number|null} [count] Bucket count
                     */

                    /**
                     * Constructs a new Bucket.
                     * @memberof perfetto.protos.ProfilePacket.Histogram
                     * @classdesc Represents a Bucket.
                     * @implements IBucket
                     * @constructor
                     * @param {perfetto.protos.ProfilePacket.Histogram.IBucket=} [p] Properties to set
                     */
                    function Bucket(p) {
                        if (p)
                            for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                                if (p[ks[i]] != null)
                                    this[ks[i]] = p[ks[i]];
                    }

                    /**
                     * Bucket upperLimit.
                     * @member {number} upperLimit
                     * @memberof perfetto.protos.ProfilePacket.Histogram.Bucket
                     * @instance
                     */
                    Bucket.prototype.upperLimit = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                    /**
                     * Bucket maxBucket.
                     * @member {boolean} maxBucket
                     * @memberof perfetto.protos.ProfilePacket.Histogram.Bucket
                     * @instance
                     */
                    Bucket.prototype.maxBucket = false;

                    /**
                     * Bucket count.
                     * @member {number} count
                     * @memberof perfetto.protos.ProfilePacket.Histogram.Bucket
                     * @instance
                     */
                    Bucket.prototype.count = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                    /**
                     * Creates a new Bucket instance using the specified properties.
                     * @function create
                     * @memberof perfetto.protos.ProfilePacket.Histogram.Bucket
                     * @static
                     * @param {perfetto.protos.ProfilePacket.Histogram.IBucket=} [properties] Properties to set
                     * @returns {perfetto.protos.ProfilePacket.Histogram.Bucket} Bucket instance
                     */
                    Bucket.create = function create(properties) {
                        return new Bucket(properties);
                    };

                    /**
                     * Encodes the specified Bucket message. Does not implicitly {@link perfetto.protos.ProfilePacket.Histogram.Bucket.verify|verify} messages.
                     * @function encode
                     * @memberof perfetto.protos.ProfilePacket.Histogram.Bucket
                     * @static
                     * @param {perfetto.protos.ProfilePacket.Histogram.IBucket} m Bucket message or plain object to encode
                     * @param {$protobuf.Writer} [w] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Bucket.encode = function encode(m, w) {
                        if (!w)
                            w = $Writer.create();
                        if (m.upperLimit != null && Object.hasOwnProperty.call(m, "upperLimit"))
                            w.uint32(8).uint64(m.upperLimit);
                        if (m.maxBucket != null && Object.hasOwnProperty.call(m, "maxBucket"))
                            w.uint32(16).bool(m.maxBucket);
                        if (m.count != null && Object.hasOwnProperty.call(m, "count"))
                            w.uint32(24).uint64(m.count);
                        return w;
                    };

                    /**
                     * Encodes the specified Bucket message, length delimited. Does not implicitly {@link perfetto.protos.ProfilePacket.Histogram.Bucket.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof perfetto.protos.ProfilePacket.Histogram.Bucket
                     * @static
                     * @param {perfetto.protos.ProfilePacket.Histogram.IBucket} message Bucket message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Bucket.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };

                    /**
                     * Decodes a Bucket message from the specified reader or buffer.
                     * @function decode
                     * @memberof perfetto.protos.ProfilePacket.Histogram.Bucket
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                     * @param {number} [l] Message length if known beforehand
                     * @returns {perfetto.protos.ProfilePacket.Histogram.Bucket} Bucket
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Bucket.decode = function decode(r, l) {
                        if (!(r instanceof $Reader))
                            r = $Reader.create(r);
                        var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ProfilePacket.Histogram.Bucket();
                        while (r.pos < c) {
                            var t = r.uint32();
                            switch (t >>> 3) {
                            case 1:
                                m.upperLimit = r.uint64();
                                break;
                            case 2:
                                m.maxBucket = r.bool();
                                break;
                            case 3:
                                m.count = r.uint64();
                                break;
                            default:
                                r.skipType(t & 7);
                                break;
                            }
                        }
                        return m;
                    };

                    /**
                     * Decodes a Bucket message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof perfetto.protos.ProfilePacket.Histogram.Bucket
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {perfetto.protos.ProfilePacket.Histogram.Bucket} Bucket
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Bucket.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };

                    /**
                     * Verifies a Bucket message.
                     * @function verify
                     * @memberof perfetto.protos.ProfilePacket.Histogram.Bucket
                     * @static
                     * @param {Object.<string,*>} m Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    Bucket.verify = function verify(m) {
                        if (typeof m !== "object" || m === null)
                            return "object expected";
                        if (m.upperLimit != null && m.hasOwnProperty("upperLimit")) {
                            if (!$util.isInteger(m.upperLimit) && !(m.upperLimit && $util.isInteger(m.upperLimit.low) && $util.isInteger(m.upperLimit.high)))
                                return "upperLimit: integer|Long expected";
                        }
                        if (m.maxBucket != null && m.hasOwnProperty("maxBucket")) {
                            if (typeof m.maxBucket !== "boolean")
                                return "maxBucket: boolean expected";
                        }
                        if (m.count != null && m.hasOwnProperty("count")) {
                            if (!$util.isInteger(m.count) && !(m.count && $util.isInteger(m.count.low) && $util.isInteger(m.count.high)))
                                return "count: integer|Long expected";
                        }
                        return null;
                    };

                    /**
                     * Creates a Bucket message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof perfetto.protos.ProfilePacket.Histogram.Bucket
                     * @static
                     * @param {Object.<string,*>} d Plain object
                     * @returns {perfetto.protos.ProfilePacket.Histogram.Bucket} Bucket
                     */
                    Bucket.fromObject = function fromObject(d) {
                        if (d instanceof $root.perfetto.protos.ProfilePacket.Histogram.Bucket)
                            return d;
                        var m = new $root.perfetto.protos.ProfilePacket.Histogram.Bucket();
                        if (d.upperLimit != null) {
                            if ($util.Long)
                                (m.upperLimit = $util.Long.fromValue(d.upperLimit)).unsigned = true;
                            else if (typeof d.upperLimit === "string")
                                m.upperLimit = parseInt(d.upperLimit, 10);
                            else if (typeof d.upperLimit === "number")
                                m.upperLimit = d.upperLimit;
                            else if (typeof d.upperLimit === "object")
                                m.upperLimit = new $util.LongBits(d.upperLimit.low >>> 0, d.upperLimit.high >>> 0).toNumber(true);
                        }
                        if (d.maxBucket != null) {
                            m.maxBucket = Boolean(d.maxBucket);
                        }
                        if (d.count != null) {
                            if ($util.Long)
                                (m.count = $util.Long.fromValue(d.count)).unsigned = true;
                            else if (typeof d.count === "string")
                                m.count = parseInt(d.count, 10);
                            else if (typeof d.count === "number")
                                m.count = d.count;
                            else if (typeof d.count === "object")
                                m.count = new $util.LongBits(d.count.low >>> 0, d.count.high >>> 0).toNumber(true);
                        }
                        return m;
                    };

                    /**
                     * Creates a plain object from a Bucket message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof perfetto.protos.ProfilePacket.Histogram.Bucket
                     * @static
                     * @param {perfetto.protos.ProfilePacket.Histogram.Bucket} m Bucket
                     * @param {$protobuf.IConversionOptions} [o] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    Bucket.toObject = function toObject(m, o) {
                        if (!o)
                            o = {};
                        var d = {};
                        if (o.defaults) {
                            if ($util.Long) {
                                var n = new $util.Long(0, 0, true);
                                d.upperLimit = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                            } else
                                d.upperLimit = o.longs === String ? "0" : 0;
                            d.maxBucket = false;
                            if ($util.Long) {
                                var n = new $util.Long(0, 0, true);
                                d.count = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                            } else
                                d.count = o.longs === String ? "0" : 0;
                        }
                        if (m.upperLimit != null && m.hasOwnProperty("upperLimit")) {
                            if (typeof m.upperLimit === "number")
                                d.upperLimit = o.longs === String ? String(m.upperLimit) : m.upperLimit;
                            else
                                d.upperLimit = o.longs === String ? $util.Long.prototype.toString.call(m.upperLimit) : o.longs === Number ? new $util.LongBits(m.upperLimit.low >>> 0, m.upperLimit.high >>> 0).toNumber(true) : m.upperLimit;
                        }
                        if (m.maxBucket != null && m.hasOwnProperty("maxBucket")) {
                            d.maxBucket = m.maxBucket;
                        }
                        if (m.count != null && m.hasOwnProperty("count")) {
                            if (typeof m.count === "number")
                                d.count = o.longs === String ? String(m.count) : m.count;
                            else
                                d.count = o.longs === String ? $util.Long.prototype.toString.call(m.count) : o.longs === Number ? new $util.LongBits(m.count.low >>> 0, m.count.high >>> 0).toNumber(true) : m.count;
                        }
                        return d;
                    };

                    /**
                     * Converts this Bucket to JSON.
                     * @function toJSON
                     * @memberof perfetto.protos.ProfilePacket.Histogram.Bucket
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    Bucket.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                    };

                    return Bucket;
                })();

                return Histogram;
            })();

            ProfilePacket.ProcessStats = (function() {

                /**
                 * Properties of a ProcessStats.
                 * @memberof perfetto.protos.ProfilePacket
                 * @interface IProcessStats
                 * @property {number|null} [unwindingErrors] ProcessStats unwindingErrors
                 * @property {number|null} [heapSamples] ProcessStats heapSamples
                 * @property {number|null} [mapReparses] ProcessStats mapReparses
                 * @property {perfetto.protos.ProfilePacket.IHistogram|null} [unwindingTimeUs] ProcessStats unwindingTimeUs
                 * @property {number|null} [totalUnwindingTimeUs] ProcessStats totalUnwindingTimeUs
                 * @property {number|null} [clientSpinlockBlockedUs] ProcessStats clientSpinlockBlockedUs
                 */

                /**
                 * Constructs a new ProcessStats.
                 * @memberof perfetto.protos.ProfilePacket
                 * @classdesc Represents a ProcessStats.
                 * @implements IProcessStats
                 * @constructor
                 * @param {perfetto.protos.ProfilePacket.IProcessStats=} [p] Properties to set
                 */
                function ProcessStats(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * ProcessStats unwindingErrors.
                 * @member {number} unwindingErrors
                 * @memberof perfetto.protos.ProfilePacket.ProcessStats
                 * @instance
                 */
                ProcessStats.prototype.unwindingErrors = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * ProcessStats heapSamples.
                 * @member {number} heapSamples
                 * @memberof perfetto.protos.ProfilePacket.ProcessStats
                 * @instance
                 */
                ProcessStats.prototype.heapSamples = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * ProcessStats mapReparses.
                 * @member {number} mapReparses
                 * @memberof perfetto.protos.ProfilePacket.ProcessStats
                 * @instance
                 */
                ProcessStats.prototype.mapReparses = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * ProcessStats unwindingTimeUs.
                 * @member {perfetto.protos.ProfilePacket.IHistogram|null|undefined} unwindingTimeUs
                 * @memberof perfetto.protos.ProfilePacket.ProcessStats
                 * @instance
                 */
                ProcessStats.prototype.unwindingTimeUs = null;

                /**
                 * ProcessStats totalUnwindingTimeUs.
                 * @member {number} totalUnwindingTimeUs
                 * @memberof perfetto.protos.ProfilePacket.ProcessStats
                 * @instance
                 */
                ProcessStats.prototype.totalUnwindingTimeUs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * ProcessStats clientSpinlockBlockedUs.
                 * @member {number} clientSpinlockBlockedUs
                 * @memberof perfetto.protos.ProfilePacket.ProcessStats
                 * @instance
                 */
                ProcessStats.prototype.clientSpinlockBlockedUs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Creates a new ProcessStats instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.ProfilePacket.ProcessStats
                 * @static
                 * @param {perfetto.protos.ProfilePacket.IProcessStats=} [properties] Properties to set
                 * @returns {perfetto.protos.ProfilePacket.ProcessStats} ProcessStats instance
                 */
                ProcessStats.create = function create(properties) {
                    return new ProcessStats(properties);
                };

                /**
                 * Encodes the specified ProcessStats message. Does not implicitly {@link perfetto.protos.ProfilePacket.ProcessStats.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.ProfilePacket.ProcessStats
                 * @static
                 * @param {perfetto.protos.ProfilePacket.IProcessStats} m ProcessStats message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProcessStats.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.unwindingErrors != null && Object.hasOwnProperty.call(m, "unwindingErrors"))
                        w.uint32(8).uint64(m.unwindingErrors);
                    if (m.heapSamples != null && Object.hasOwnProperty.call(m, "heapSamples"))
                        w.uint32(16).uint64(m.heapSamples);
                    if (m.mapReparses != null && Object.hasOwnProperty.call(m, "mapReparses"))
                        w.uint32(24).uint64(m.mapReparses);
                    if (m.unwindingTimeUs != null && Object.hasOwnProperty.call(m, "unwindingTimeUs"))
                        $root.perfetto.protos.ProfilePacket.Histogram.encode(m.unwindingTimeUs, w.uint32(34).fork()).ldelim();
                    if (m.totalUnwindingTimeUs != null && Object.hasOwnProperty.call(m, "totalUnwindingTimeUs"))
                        w.uint32(40).uint64(m.totalUnwindingTimeUs);
                    if (m.clientSpinlockBlockedUs != null && Object.hasOwnProperty.call(m, "clientSpinlockBlockedUs"))
                        w.uint32(48).uint64(m.clientSpinlockBlockedUs);
                    return w;
                };

                /**
                 * Encodes the specified ProcessStats message, length delimited. Does not implicitly {@link perfetto.protos.ProfilePacket.ProcessStats.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.ProfilePacket.ProcessStats
                 * @static
                 * @param {perfetto.protos.ProfilePacket.IProcessStats} message ProcessStats message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProcessStats.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a ProcessStats message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.ProfilePacket.ProcessStats
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.ProfilePacket.ProcessStats} ProcessStats
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProcessStats.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ProfilePacket.ProcessStats();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.unwindingErrors = r.uint64();
                            break;
                        case 2:
                            m.heapSamples = r.uint64();
                            break;
                        case 3:
                            m.mapReparses = r.uint64();
                            break;
                        case 4:
                            m.unwindingTimeUs = $root.perfetto.protos.ProfilePacket.Histogram.decode(r, r.uint32());
                            break;
                        case 5:
                            m.totalUnwindingTimeUs = r.uint64();
                            break;
                        case 6:
                            m.clientSpinlockBlockedUs = r.uint64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a ProcessStats message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.ProfilePacket.ProcessStats
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.ProfilePacket.ProcessStats} ProcessStats
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProcessStats.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a ProcessStats message.
                 * @function verify
                 * @memberof perfetto.protos.ProfilePacket.ProcessStats
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ProcessStats.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.unwindingErrors != null && m.hasOwnProperty("unwindingErrors")) {
                        if (!$util.isInteger(m.unwindingErrors) && !(m.unwindingErrors && $util.isInteger(m.unwindingErrors.low) && $util.isInteger(m.unwindingErrors.high)))
                            return "unwindingErrors: integer|Long expected";
                    }
                    if (m.heapSamples != null && m.hasOwnProperty("heapSamples")) {
                        if (!$util.isInteger(m.heapSamples) && !(m.heapSamples && $util.isInteger(m.heapSamples.low) && $util.isInteger(m.heapSamples.high)))
                            return "heapSamples: integer|Long expected";
                    }
                    if (m.mapReparses != null && m.hasOwnProperty("mapReparses")) {
                        if (!$util.isInteger(m.mapReparses) && !(m.mapReparses && $util.isInteger(m.mapReparses.low) && $util.isInteger(m.mapReparses.high)))
                            return "mapReparses: integer|Long expected";
                    }
                    if (m.unwindingTimeUs != null && m.hasOwnProperty("unwindingTimeUs")) {
                        {
                            var e = $root.perfetto.protos.ProfilePacket.Histogram.verify(m.unwindingTimeUs);
                            if (e)
                                return "unwindingTimeUs." + e;
                        }
                    }
                    if (m.totalUnwindingTimeUs != null && m.hasOwnProperty("totalUnwindingTimeUs")) {
                        if (!$util.isInteger(m.totalUnwindingTimeUs) && !(m.totalUnwindingTimeUs && $util.isInteger(m.totalUnwindingTimeUs.low) && $util.isInteger(m.totalUnwindingTimeUs.high)))
                            return "totalUnwindingTimeUs: integer|Long expected";
                    }
                    if (m.clientSpinlockBlockedUs != null && m.hasOwnProperty("clientSpinlockBlockedUs")) {
                        if (!$util.isInteger(m.clientSpinlockBlockedUs) && !(m.clientSpinlockBlockedUs && $util.isInteger(m.clientSpinlockBlockedUs.low) && $util.isInteger(m.clientSpinlockBlockedUs.high)))
                            return "clientSpinlockBlockedUs: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a ProcessStats message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.ProfilePacket.ProcessStats
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.ProfilePacket.ProcessStats} ProcessStats
                 */
                ProcessStats.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.ProfilePacket.ProcessStats)
                        return d;
                    var m = new $root.perfetto.protos.ProfilePacket.ProcessStats();
                    if (d.unwindingErrors != null) {
                        if ($util.Long)
                            (m.unwindingErrors = $util.Long.fromValue(d.unwindingErrors)).unsigned = true;
                        else if (typeof d.unwindingErrors === "string")
                            m.unwindingErrors = parseInt(d.unwindingErrors, 10);
                        else if (typeof d.unwindingErrors === "number")
                            m.unwindingErrors = d.unwindingErrors;
                        else if (typeof d.unwindingErrors === "object")
                            m.unwindingErrors = new $util.LongBits(d.unwindingErrors.low >>> 0, d.unwindingErrors.high >>> 0).toNumber(true);
                    }
                    if (d.heapSamples != null) {
                        if ($util.Long)
                            (m.heapSamples = $util.Long.fromValue(d.heapSamples)).unsigned = true;
                        else if (typeof d.heapSamples === "string")
                            m.heapSamples = parseInt(d.heapSamples, 10);
                        else if (typeof d.heapSamples === "number")
                            m.heapSamples = d.heapSamples;
                        else if (typeof d.heapSamples === "object")
                            m.heapSamples = new $util.LongBits(d.heapSamples.low >>> 0, d.heapSamples.high >>> 0).toNumber(true);
                    }
                    if (d.mapReparses != null) {
                        if ($util.Long)
                            (m.mapReparses = $util.Long.fromValue(d.mapReparses)).unsigned = true;
                        else if (typeof d.mapReparses === "string")
                            m.mapReparses = parseInt(d.mapReparses, 10);
                        else if (typeof d.mapReparses === "number")
                            m.mapReparses = d.mapReparses;
                        else if (typeof d.mapReparses === "object")
                            m.mapReparses = new $util.LongBits(d.mapReparses.low >>> 0, d.mapReparses.high >>> 0).toNumber(true);
                    }
                    if (d.unwindingTimeUs != null) {
                        if (typeof d.unwindingTimeUs !== "object")
                            throw TypeError(".perfetto.protos.ProfilePacket.ProcessStats.unwindingTimeUs: object expected");
                        m.unwindingTimeUs = $root.perfetto.protos.ProfilePacket.Histogram.fromObject(d.unwindingTimeUs);
                    }
                    if (d.totalUnwindingTimeUs != null) {
                        if ($util.Long)
                            (m.totalUnwindingTimeUs = $util.Long.fromValue(d.totalUnwindingTimeUs)).unsigned = true;
                        else if (typeof d.totalUnwindingTimeUs === "string")
                            m.totalUnwindingTimeUs = parseInt(d.totalUnwindingTimeUs, 10);
                        else if (typeof d.totalUnwindingTimeUs === "number")
                            m.totalUnwindingTimeUs = d.totalUnwindingTimeUs;
                        else if (typeof d.totalUnwindingTimeUs === "object")
                            m.totalUnwindingTimeUs = new $util.LongBits(d.totalUnwindingTimeUs.low >>> 0, d.totalUnwindingTimeUs.high >>> 0).toNumber(true);
                    }
                    if (d.clientSpinlockBlockedUs != null) {
                        if ($util.Long)
                            (m.clientSpinlockBlockedUs = $util.Long.fromValue(d.clientSpinlockBlockedUs)).unsigned = true;
                        else if (typeof d.clientSpinlockBlockedUs === "string")
                            m.clientSpinlockBlockedUs = parseInt(d.clientSpinlockBlockedUs, 10);
                        else if (typeof d.clientSpinlockBlockedUs === "number")
                            m.clientSpinlockBlockedUs = d.clientSpinlockBlockedUs;
                        else if (typeof d.clientSpinlockBlockedUs === "object")
                            m.clientSpinlockBlockedUs = new $util.LongBits(d.clientSpinlockBlockedUs.low >>> 0, d.clientSpinlockBlockedUs.high >>> 0).toNumber(true);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a ProcessStats message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.ProfilePacket.ProcessStats
                 * @static
                 * @param {perfetto.protos.ProfilePacket.ProcessStats} m ProcessStats
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ProcessStats.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.unwindingErrors = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.unwindingErrors = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.heapSamples = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.heapSamples = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.mapReparses = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.mapReparses = o.longs === String ? "0" : 0;
                        d.unwindingTimeUs = null;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.totalUnwindingTimeUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.totalUnwindingTimeUs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.clientSpinlockBlockedUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.clientSpinlockBlockedUs = o.longs === String ? "0" : 0;
                    }
                    if (m.unwindingErrors != null && m.hasOwnProperty("unwindingErrors")) {
                        if (typeof m.unwindingErrors === "number")
                            d.unwindingErrors = o.longs === String ? String(m.unwindingErrors) : m.unwindingErrors;
                        else
                            d.unwindingErrors = o.longs === String ? $util.Long.prototype.toString.call(m.unwindingErrors) : o.longs === Number ? new $util.LongBits(m.unwindingErrors.low >>> 0, m.unwindingErrors.high >>> 0).toNumber(true) : m.unwindingErrors;
                    }
                    if (m.heapSamples != null && m.hasOwnProperty("heapSamples")) {
                        if (typeof m.heapSamples === "number")
                            d.heapSamples = o.longs === String ? String(m.heapSamples) : m.heapSamples;
                        else
                            d.heapSamples = o.longs === String ? $util.Long.prototype.toString.call(m.heapSamples) : o.longs === Number ? new $util.LongBits(m.heapSamples.low >>> 0, m.heapSamples.high >>> 0).toNumber(true) : m.heapSamples;
                    }
                    if (m.mapReparses != null && m.hasOwnProperty("mapReparses")) {
                        if (typeof m.mapReparses === "number")
                            d.mapReparses = o.longs === String ? String(m.mapReparses) : m.mapReparses;
                        else
                            d.mapReparses = o.longs === String ? $util.Long.prototype.toString.call(m.mapReparses) : o.longs === Number ? new $util.LongBits(m.mapReparses.low >>> 0, m.mapReparses.high >>> 0).toNumber(true) : m.mapReparses;
                    }
                    if (m.unwindingTimeUs != null && m.hasOwnProperty("unwindingTimeUs")) {
                        d.unwindingTimeUs = $root.perfetto.protos.ProfilePacket.Histogram.toObject(m.unwindingTimeUs, o);
                    }
                    if (m.totalUnwindingTimeUs != null && m.hasOwnProperty("totalUnwindingTimeUs")) {
                        if (typeof m.totalUnwindingTimeUs === "number")
                            d.totalUnwindingTimeUs = o.longs === String ? String(m.totalUnwindingTimeUs) : m.totalUnwindingTimeUs;
                        else
                            d.totalUnwindingTimeUs = o.longs === String ? $util.Long.prototype.toString.call(m.totalUnwindingTimeUs) : o.longs === Number ? new $util.LongBits(m.totalUnwindingTimeUs.low >>> 0, m.totalUnwindingTimeUs.high >>> 0).toNumber(true) : m.totalUnwindingTimeUs;
                    }
                    if (m.clientSpinlockBlockedUs != null && m.hasOwnProperty("clientSpinlockBlockedUs")) {
                        if (typeof m.clientSpinlockBlockedUs === "number")
                            d.clientSpinlockBlockedUs = o.longs === String ? String(m.clientSpinlockBlockedUs) : m.clientSpinlockBlockedUs;
                        else
                            d.clientSpinlockBlockedUs = o.longs === String ? $util.Long.prototype.toString.call(m.clientSpinlockBlockedUs) : o.longs === Number ? new $util.LongBits(m.clientSpinlockBlockedUs.low >>> 0, m.clientSpinlockBlockedUs.high >>> 0).toNumber(true) : m.clientSpinlockBlockedUs;
                    }
                    return d;
                };

                /**
                 * Converts this ProcessStats to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.ProfilePacket.ProcessStats
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ProcessStats.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return ProcessStats;
            })();

            ProfilePacket.ProcessHeapSamples = (function() {

                /**
                 * Properties of a ProcessHeapSamples.
                 * @memberof perfetto.protos.ProfilePacket
                 * @interface IProcessHeapSamples
                 * @property {number|null} [pid] ProcessHeapSamples pid
                 * @property {boolean|null} [fromStartup] ProcessHeapSamples fromStartup
                 * @property {boolean|null} [rejectedConcurrent] ProcessHeapSamples rejectedConcurrent
                 * @property {boolean|null} [disconnected] ProcessHeapSamples disconnected
                 * @property {boolean|null} [bufferOverran] ProcessHeapSamples bufferOverran
                 * @property {perfetto.protos.ProfilePacket.ProcessHeapSamples.ClientError|null} [clientError] ProcessHeapSamples clientError
                 * @property {boolean|null} [bufferCorrupted] ProcessHeapSamples bufferCorrupted
                 * @property {boolean|null} [hitGuardrail] ProcessHeapSamples hitGuardrail
                 * @property {string|null} [heapName] ProcessHeapSamples heapName
                 * @property {number|null} [samplingIntervalBytes] ProcessHeapSamples samplingIntervalBytes
                 * @property {number|null} [origSamplingIntervalBytes] ProcessHeapSamples origSamplingIntervalBytes
                 * @property {number|null} [timestamp] ProcessHeapSamples timestamp
                 * @property {perfetto.protos.ProfilePacket.IProcessStats|null} [stats] ProcessHeapSamples stats
                 * @property {Array.<perfetto.protos.ProfilePacket.IHeapSample>|null} [samples] ProcessHeapSamples samples
                 */

                /**
                 * Constructs a new ProcessHeapSamples.
                 * @memberof perfetto.protos.ProfilePacket
                 * @classdesc Represents a ProcessHeapSamples.
                 * @implements IProcessHeapSamples
                 * @constructor
                 * @param {perfetto.protos.ProfilePacket.IProcessHeapSamples=} [p] Properties to set
                 */
                function ProcessHeapSamples(p) {
                    this.samples = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * ProcessHeapSamples pid.
                 * @member {number} pid
                 * @memberof perfetto.protos.ProfilePacket.ProcessHeapSamples
                 * @instance
                 */
                ProcessHeapSamples.prototype.pid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * ProcessHeapSamples fromStartup.
                 * @member {boolean} fromStartup
                 * @memberof perfetto.protos.ProfilePacket.ProcessHeapSamples
                 * @instance
                 */
                ProcessHeapSamples.prototype.fromStartup = false;

                /**
                 * ProcessHeapSamples rejectedConcurrent.
                 * @member {boolean} rejectedConcurrent
                 * @memberof perfetto.protos.ProfilePacket.ProcessHeapSamples
                 * @instance
                 */
                ProcessHeapSamples.prototype.rejectedConcurrent = false;

                /**
                 * ProcessHeapSamples disconnected.
                 * @member {boolean} disconnected
                 * @memberof perfetto.protos.ProfilePacket.ProcessHeapSamples
                 * @instance
                 */
                ProcessHeapSamples.prototype.disconnected = false;

                /**
                 * ProcessHeapSamples bufferOverran.
                 * @member {boolean} bufferOverran
                 * @memberof perfetto.protos.ProfilePacket.ProcessHeapSamples
                 * @instance
                 */
                ProcessHeapSamples.prototype.bufferOverran = false;

                /**
                 * ProcessHeapSamples clientError.
                 * @member {perfetto.protos.ProfilePacket.ProcessHeapSamples.ClientError} clientError
                 * @memberof perfetto.protos.ProfilePacket.ProcessHeapSamples
                 * @instance
                 */
                ProcessHeapSamples.prototype.clientError = 0;

                /**
                 * ProcessHeapSamples bufferCorrupted.
                 * @member {boolean} bufferCorrupted
                 * @memberof perfetto.protos.ProfilePacket.ProcessHeapSamples
                 * @instance
                 */
                ProcessHeapSamples.prototype.bufferCorrupted = false;

                /**
                 * ProcessHeapSamples hitGuardrail.
                 * @member {boolean} hitGuardrail
                 * @memberof perfetto.protos.ProfilePacket.ProcessHeapSamples
                 * @instance
                 */
                ProcessHeapSamples.prototype.hitGuardrail = false;

                /**
                 * ProcessHeapSamples heapName.
                 * @member {string} heapName
                 * @memberof perfetto.protos.ProfilePacket.ProcessHeapSamples
                 * @instance
                 */
                ProcessHeapSamples.prototype.heapName = "";

                /**
                 * ProcessHeapSamples samplingIntervalBytes.
                 * @member {number} samplingIntervalBytes
                 * @memberof perfetto.protos.ProfilePacket.ProcessHeapSamples
                 * @instance
                 */
                ProcessHeapSamples.prototype.samplingIntervalBytes = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * ProcessHeapSamples origSamplingIntervalBytes.
                 * @member {number} origSamplingIntervalBytes
                 * @memberof perfetto.protos.ProfilePacket.ProcessHeapSamples
                 * @instance
                 */
                ProcessHeapSamples.prototype.origSamplingIntervalBytes = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * ProcessHeapSamples timestamp.
                 * @member {number} timestamp
                 * @memberof perfetto.protos.ProfilePacket.ProcessHeapSamples
                 * @instance
                 */
                ProcessHeapSamples.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * ProcessHeapSamples stats.
                 * @member {perfetto.protos.ProfilePacket.IProcessStats|null|undefined} stats
                 * @memberof perfetto.protos.ProfilePacket.ProcessHeapSamples
                 * @instance
                 */
                ProcessHeapSamples.prototype.stats = null;

                /**
                 * ProcessHeapSamples samples.
                 * @member {Array.<perfetto.protos.ProfilePacket.IHeapSample>} samples
                 * @memberof perfetto.protos.ProfilePacket.ProcessHeapSamples
                 * @instance
                 */
                ProcessHeapSamples.prototype.samples = $util.emptyArray;

                /**
                 * Creates a new ProcessHeapSamples instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.ProfilePacket.ProcessHeapSamples
                 * @static
                 * @param {perfetto.protos.ProfilePacket.IProcessHeapSamples=} [properties] Properties to set
                 * @returns {perfetto.protos.ProfilePacket.ProcessHeapSamples} ProcessHeapSamples instance
                 */
                ProcessHeapSamples.create = function create(properties) {
                    return new ProcessHeapSamples(properties);
                };

                /**
                 * Encodes the specified ProcessHeapSamples message. Does not implicitly {@link perfetto.protos.ProfilePacket.ProcessHeapSamples.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.ProfilePacket.ProcessHeapSamples
                 * @static
                 * @param {perfetto.protos.ProfilePacket.IProcessHeapSamples} m ProcessHeapSamples message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProcessHeapSamples.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                        w.uint32(8).uint64(m.pid);
                    if (m.samples != null && m.samples.length) {
                        for (var i = 0; i < m.samples.length; ++i)
                            $root.perfetto.protos.ProfilePacket.HeapSample.encode(m.samples[i], w.uint32(18).fork()).ldelim();
                    }
                    if (m.fromStartup != null && Object.hasOwnProperty.call(m, "fromStartup"))
                        w.uint32(24).bool(m.fromStartup);
                    if (m.rejectedConcurrent != null && Object.hasOwnProperty.call(m, "rejectedConcurrent"))
                        w.uint32(32).bool(m.rejectedConcurrent);
                    if (m.stats != null && Object.hasOwnProperty.call(m, "stats"))
                        $root.perfetto.protos.ProfilePacket.ProcessStats.encode(m.stats, w.uint32(42).fork()).ldelim();
                    if (m.disconnected != null && Object.hasOwnProperty.call(m, "disconnected"))
                        w.uint32(48).bool(m.disconnected);
                    if (m.bufferOverran != null && Object.hasOwnProperty.call(m, "bufferOverran"))
                        w.uint32(56).bool(m.bufferOverran);
                    if (m.bufferCorrupted != null && Object.hasOwnProperty.call(m, "bufferCorrupted"))
                        w.uint32(64).bool(m.bufferCorrupted);
                    if (m.timestamp != null && Object.hasOwnProperty.call(m, "timestamp"))
                        w.uint32(72).uint64(m.timestamp);
                    if (m.hitGuardrail != null && Object.hasOwnProperty.call(m, "hitGuardrail"))
                        w.uint32(80).bool(m.hitGuardrail);
                    if (m.heapName != null && Object.hasOwnProperty.call(m, "heapName"))
                        w.uint32(90).string(m.heapName);
                    if (m.samplingIntervalBytes != null && Object.hasOwnProperty.call(m, "samplingIntervalBytes"))
                        w.uint32(96).uint64(m.samplingIntervalBytes);
                    if (m.origSamplingIntervalBytes != null && Object.hasOwnProperty.call(m, "origSamplingIntervalBytes"))
                        w.uint32(104).uint64(m.origSamplingIntervalBytes);
                    if (m.clientError != null && Object.hasOwnProperty.call(m, "clientError"))
                        w.uint32(112).int32(m.clientError);
                    return w;
                };

                /**
                 * Encodes the specified ProcessHeapSamples message, length delimited. Does not implicitly {@link perfetto.protos.ProfilePacket.ProcessHeapSamples.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.ProfilePacket.ProcessHeapSamples
                 * @static
                 * @param {perfetto.protos.ProfilePacket.IProcessHeapSamples} message ProcessHeapSamples message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProcessHeapSamples.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a ProcessHeapSamples message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.ProfilePacket.ProcessHeapSamples
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.ProfilePacket.ProcessHeapSamples} ProcessHeapSamples
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProcessHeapSamples.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ProfilePacket.ProcessHeapSamples();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.pid = r.uint64();
                            break;
                        case 3:
                            m.fromStartup = r.bool();
                            break;
                        case 4:
                            m.rejectedConcurrent = r.bool();
                            break;
                        case 6:
                            m.disconnected = r.bool();
                            break;
                        case 7:
                            m.bufferOverran = r.bool();
                            break;
                        case 14:
                            m.clientError = r.int32();
                            break;
                        case 8:
                            m.bufferCorrupted = r.bool();
                            break;
                        case 10:
                            m.hitGuardrail = r.bool();
                            break;
                        case 11:
                            m.heapName = r.string();
                            break;
                        case 12:
                            m.samplingIntervalBytes = r.uint64();
                            break;
                        case 13:
                            m.origSamplingIntervalBytes = r.uint64();
                            break;
                        case 9:
                            m.timestamp = r.uint64();
                            break;
                        case 5:
                            m.stats = $root.perfetto.protos.ProfilePacket.ProcessStats.decode(r, r.uint32());
                            break;
                        case 2:
                            if (!(m.samples && m.samples.length))
                                m.samples = [];
                            m.samples.push($root.perfetto.protos.ProfilePacket.HeapSample.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a ProcessHeapSamples message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.ProfilePacket.ProcessHeapSamples
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.ProfilePacket.ProcessHeapSamples} ProcessHeapSamples
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProcessHeapSamples.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a ProcessHeapSamples message.
                 * @function verify
                 * @memberof perfetto.protos.ProfilePacket.ProcessHeapSamples
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ProcessHeapSamples.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        if (!$util.isInteger(m.pid) && !(m.pid && $util.isInteger(m.pid.low) && $util.isInteger(m.pid.high)))
                            return "pid: integer|Long expected";
                    }
                    if (m.fromStartup != null && m.hasOwnProperty("fromStartup")) {
                        if (typeof m.fromStartup !== "boolean")
                            return "fromStartup: boolean expected";
                    }
                    if (m.rejectedConcurrent != null && m.hasOwnProperty("rejectedConcurrent")) {
                        if (typeof m.rejectedConcurrent !== "boolean")
                            return "rejectedConcurrent: boolean expected";
                    }
                    if (m.disconnected != null && m.hasOwnProperty("disconnected")) {
                        if (typeof m.disconnected !== "boolean")
                            return "disconnected: boolean expected";
                    }
                    if (m.bufferOverran != null && m.hasOwnProperty("bufferOverran")) {
                        if (typeof m.bufferOverran !== "boolean")
                            return "bufferOverran: boolean expected";
                    }
                    if (m.clientError != null && m.hasOwnProperty("clientError")) {
                        switch (m.clientError) {
                        default:
                            return "clientError: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                            break;
                        }
                    }
                    if (m.bufferCorrupted != null && m.hasOwnProperty("bufferCorrupted")) {
                        if (typeof m.bufferCorrupted !== "boolean")
                            return "bufferCorrupted: boolean expected";
                    }
                    if (m.hitGuardrail != null && m.hasOwnProperty("hitGuardrail")) {
                        if (typeof m.hitGuardrail !== "boolean")
                            return "hitGuardrail: boolean expected";
                    }
                    if (m.heapName != null && m.hasOwnProperty("heapName")) {
                        if (!$util.isString(m.heapName))
                            return "heapName: string expected";
                    }
                    if (m.samplingIntervalBytes != null && m.hasOwnProperty("samplingIntervalBytes")) {
                        if (!$util.isInteger(m.samplingIntervalBytes) && !(m.samplingIntervalBytes && $util.isInteger(m.samplingIntervalBytes.low) && $util.isInteger(m.samplingIntervalBytes.high)))
                            return "samplingIntervalBytes: integer|Long expected";
                    }
                    if (m.origSamplingIntervalBytes != null && m.hasOwnProperty("origSamplingIntervalBytes")) {
                        if (!$util.isInteger(m.origSamplingIntervalBytes) && !(m.origSamplingIntervalBytes && $util.isInteger(m.origSamplingIntervalBytes.low) && $util.isInteger(m.origSamplingIntervalBytes.high)))
                            return "origSamplingIntervalBytes: integer|Long expected";
                    }
                    if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                        if (!$util.isInteger(m.timestamp) && !(m.timestamp && $util.isInteger(m.timestamp.low) && $util.isInteger(m.timestamp.high)))
                            return "timestamp: integer|Long expected";
                    }
                    if (m.stats != null && m.hasOwnProperty("stats")) {
                        {
                            var e = $root.perfetto.protos.ProfilePacket.ProcessStats.verify(m.stats);
                            if (e)
                                return "stats." + e;
                        }
                    }
                    if (m.samples != null && m.hasOwnProperty("samples")) {
                        if (!Array.isArray(m.samples))
                            return "samples: array expected";
                        for (var i = 0; i < m.samples.length; ++i) {
                            {
                                var e = $root.perfetto.protos.ProfilePacket.HeapSample.verify(m.samples[i]);
                                if (e)
                                    return "samples." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates a ProcessHeapSamples message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.ProfilePacket.ProcessHeapSamples
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.ProfilePacket.ProcessHeapSamples} ProcessHeapSamples
                 */
                ProcessHeapSamples.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.ProfilePacket.ProcessHeapSamples)
                        return d;
                    var m = new $root.perfetto.protos.ProfilePacket.ProcessHeapSamples();
                    if (d.pid != null) {
                        if ($util.Long)
                            (m.pid = $util.Long.fromValue(d.pid)).unsigned = true;
                        else if (typeof d.pid === "string")
                            m.pid = parseInt(d.pid, 10);
                        else if (typeof d.pid === "number")
                            m.pid = d.pid;
                        else if (typeof d.pid === "object")
                            m.pid = new $util.LongBits(d.pid.low >>> 0, d.pid.high >>> 0).toNumber(true);
                    }
                    if (d.fromStartup != null) {
                        m.fromStartup = Boolean(d.fromStartup);
                    }
                    if (d.rejectedConcurrent != null) {
                        m.rejectedConcurrent = Boolean(d.rejectedConcurrent);
                    }
                    if (d.disconnected != null) {
                        m.disconnected = Boolean(d.disconnected);
                    }
                    if (d.bufferOverran != null) {
                        m.bufferOverran = Boolean(d.bufferOverran);
                    }
                    switch (d.clientError) {
                    case "CLIENT_ERROR_NONE":
                    case 0:
                        m.clientError = 0;
                        break;
                    case "CLIENT_ERROR_HIT_TIMEOUT":
                    case 1:
                        m.clientError = 1;
                        break;
                    case "CLIENT_ERROR_INVALID_STACK_BOUNDS":
                    case 2:
                        m.clientError = 2;
                        break;
                    }
                    if (d.bufferCorrupted != null) {
                        m.bufferCorrupted = Boolean(d.bufferCorrupted);
                    }
                    if (d.hitGuardrail != null) {
                        m.hitGuardrail = Boolean(d.hitGuardrail);
                    }
                    if (d.heapName != null) {
                        m.heapName = String(d.heapName);
                    }
                    if (d.samplingIntervalBytes != null) {
                        if ($util.Long)
                            (m.samplingIntervalBytes = $util.Long.fromValue(d.samplingIntervalBytes)).unsigned = true;
                        else if (typeof d.samplingIntervalBytes === "string")
                            m.samplingIntervalBytes = parseInt(d.samplingIntervalBytes, 10);
                        else if (typeof d.samplingIntervalBytes === "number")
                            m.samplingIntervalBytes = d.samplingIntervalBytes;
                        else if (typeof d.samplingIntervalBytes === "object")
                            m.samplingIntervalBytes = new $util.LongBits(d.samplingIntervalBytes.low >>> 0, d.samplingIntervalBytes.high >>> 0).toNumber(true);
                    }
                    if (d.origSamplingIntervalBytes != null) {
                        if ($util.Long)
                            (m.origSamplingIntervalBytes = $util.Long.fromValue(d.origSamplingIntervalBytes)).unsigned = true;
                        else if (typeof d.origSamplingIntervalBytes === "string")
                            m.origSamplingIntervalBytes = parseInt(d.origSamplingIntervalBytes, 10);
                        else if (typeof d.origSamplingIntervalBytes === "number")
                            m.origSamplingIntervalBytes = d.origSamplingIntervalBytes;
                        else if (typeof d.origSamplingIntervalBytes === "object")
                            m.origSamplingIntervalBytes = new $util.LongBits(d.origSamplingIntervalBytes.low >>> 0, d.origSamplingIntervalBytes.high >>> 0).toNumber(true);
                    }
                    if (d.timestamp != null) {
                        if ($util.Long)
                            (m.timestamp = $util.Long.fromValue(d.timestamp)).unsigned = true;
                        else if (typeof d.timestamp === "string")
                            m.timestamp = parseInt(d.timestamp, 10);
                        else if (typeof d.timestamp === "number")
                            m.timestamp = d.timestamp;
                        else if (typeof d.timestamp === "object")
                            m.timestamp = new $util.LongBits(d.timestamp.low >>> 0, d.timestamp.high >>> 0).toNumber(true);
                    }
                    if (d.stats != null) {
                        if (typeof d.stats !== "object")
                            throw TypeError(".perfetto.protos.ProfilePacket.ProcessHeapSamples.stats: object expected");
                        m.stats = $root.perfetto.protos.ProfilePacket.ProcessStats.fromObject(d.stats);
                    }
                    if (d.samples) {
                        if (!Array.isArray(d.samples))
                            throw TypeError(".perfetto.protos.ProfilePacket.ProcessHeapSamples.samples: array expected");
                        m.samples = [];
                        for (var i = 0; i < d.samples.length; ++i) {
                            if (typeof d.samples[i] !== "object")
                                throw TypeError(".perfetto.protos.ProfilePacket.ProcessHeapSamples.samples: object expected");
                            m.samples[i] = $root.perfetto.protos.ProfilePacket.HeapSample.fromObject(d.samples[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a ProcessHeapSamples message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.ProfilePacket.ProcessHeapSamples
                 * @static
                 * @param {perfetto.protos.ProfilePacket.ProcessHeapSamples} m ProcessHeapSamples
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ProcessHeapSamples.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.samples = [];
                    }
                    if (o.defaults) {
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.pid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.pid = o.longs === String ? "0" : 0;
                        d.fromStartup = false;
                        d.rejectedConcurrent = false;
                        d.stats = null;
                        d.disconnected = false;
                        d.bufferOverran = false;
                        d.bufferCorrupted = false;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.timestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.timestamp = o.longs === String ? "0" : 0;
                        d.hitGuardrail = false;
                        d.heapName = "";
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.samplingIntervalBytes = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.samplingIntervalBytes = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.origSamplingIntervalBytes = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.origSamplingIntervalBytes = o.longs === String ? "0" : 0;
                        d.clientError = o.enums === String ? "CLIENT_ERROR_NONE" : 0;
                    }
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        if (typeof m.pid === "number")
                            d.pid = o.longs === String ? String(m.pid) : m.pid;
                        else
                            d.pid = o.longs === String ? $util.Long.prototype.toString.call(m.pid) : o.longs === Number ? new $util.LongBits(m.pid.low >>> 0, m.pid.high >>> 0).toNumber(true) : m.pid;
                    }
                    if (m.samples && m.samples.length) {
                        d.samples = [];
                        for (var j = 0; j < m.samples.length; ++j) {
                            d.samples[j] = $root.perfetto.protos.ProfilePacket.HeapSample.toObject(m.samples[j], o);
                        }
                    }
                    if (m.fromStartup != null && m.hasOwnProperty("fromStartup")) {
                        d.fromStartup = m.fromStartup;
                    }
                    if (m.rejectedConcurrent != null && m.hasOwnProperty("rejectedConcurrent")) {
                        d.rejectedConcurrent = m.rejectedConcurrent;
                    }
                    if (m.stats != null && m.hasOwnProperty("stats")) {
                        d.stats = $root.perfetto.protos.ProfilePacket.ProcessStats.toObject(m.stats, o);
                    }
                    if (m.disconnected != null && m.hasOwnProperty("disconnected")) {
                        d.disconnected = m.disconnected;
                    }
                    if (m.bufferOverran != null && m.hasOwnProperty("bufferOverran")) {
                        d.bufferOverran = m.bufferOverran;
                    }
                    if (m.bufferCorrupted != null && m.hasOwnProperty("bufferCorrupted")) {
                        d.bufferCorrupted = m.bufferCorrupted;
                    }
                    if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
                        if (typeof m.timestamp === "number")
                            d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp;
                        else
                            d.timestamp = o.longs === String ? $util.Long.prototype.toString.call(m.timestamp) : o.longs === Number ? new $util.LongBits(m.timestamp.low >>> 0, m.timestamp.high >>> 0).toNumber(true) : m.timestamp;
                    }
                    if (m.hitGuardrail != null && m.hasOwnProperty("hitGuardrail")) {
                        d.hitGuardrail = m.hitGuardrail;
                    }
                    if (m.heapName != null && m.hasOwnProperty("heapName")) {
                        d.heapName = m.heapName;
                    }
                    if (m.samplingIntervalBytes != null && m.hasOwnProperty("samplingIntervalBytes")) {
                        if (typeof m.samplingIntervalBytes === "number")
                            d.samplingIntervalBytes = o.longs === String ? String(m.samplingIntervalBytes) : m.samplingIntervalBytes;
                        else
                            d.samplingIntervalBytes = o.longs === String ? $util.Long.prototype.toString.call(m.samplingIntervalBytes) : o.longs === Number ? new $util.LongBits(m.samplingIntervalBytes.low >>> 0, m.samplingIntervalBytes.high >>> 0).toNumber(true) : m.samplingIntervalBytes;
                    }
                    if (m.origSamplingIntervalBytes != null && m.hasOwnProperty("origSamplingIntervalBytes")) {
                        if (typeof m.origSamplingIntervalBytes === "number")
                            d.origSamplingIntervalBytes = o.longs === String ? String(m.origSamplingIntervalBytes) : m.origSamplingIntervalBytes;
                        else
                            d.origSamplingIntervalBytes = o.longs === String ? $util.Long.prototype.toString.call(m.origSamplingIntervalBytes) : o.longs === Number ? new $util.LongBits(m.origSamplingIntervalBytes.low >>> 0, m.origSamplingIntervalBytes.high >>> 0).toNumber(true) : m.origSamplingIntervalBytes;
                    }
                    if (m.clientError != null && m.hasOwnProperty("clientError")) {
                        d.clientError = o.enums === String ? $root.perfetto.protos.ProfilePacket.ProcessHeapSamples.ClientError[m.clientError] : m.clientError;
                    }
                    return d;
                };

                /**
                 * Converts this ProcessHeapSamples to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.ProfilePacket.ProcessHeapSamples
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ProcessHeapSamples.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                /**
                 * ClientError enum.
                 * @name perfetto.protos.ProfilePacket.ProcessHeapSamples.ClientError
                 * @enum {number}
                 * @property {number} CLIENT_ERROR_NONE=0 CLIENT_ERROR_NONE value
                 * @property {number} CLIENT_ERROR_HIT_TIMEOUT=1 CLIENT_ERROR_HIT_TIMEOUT value
                 * @property {number} CLIENT_ERROR_INVALID_STACK_BOUNDS=2 CLIENT_ERROR_INVALID_STACK_BOUNDS value
                 */
                ProcessHeapSamples.ClientError = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "CLIENT_ERROR_NONE"] = 0;
                    values[valuesById[1] = "CLIENT_ERROR_HIT_TIMEOUT"] = 1;
                    values[valuesById[2] = "CLIENT_ERROR_INVALID_STACK_BOUNDS"] = 2;
                    return values;
                })();

                return ProcessHeapSamples;
            })();

            return ProfilePacket;
        })();

        protos.StreamingAllocation = (function() {

            /**
             * Properties of a StreamingAllocation.
             * @memberof perfetto.protos
             * @interface IStreamingAllocation
             * @property {Array.<number>|null} [address] StreamingAllocation address
             * @property {Array.<number>|null} [size] StreamingAllocation size
             * @property {Array.<number>|null} [sampleSize] StreamingAllocation sampleSize
             * @property {Array.<number>|null} [clockMonotonicCoarseTimestamp] StreamingAllocation clockMonotonicCoarseTimestamp
             * @property {Array.<number>|null} [heapId] StreamingAllocation heapId
             * @property {Array.<number>|null} [sequenceNumber] StreamingAllocation sequenceNumber
             */

            /**
             * Constructs a new StreamingAllocation.
             * @memberof perfetto.protos
             * @classdesc Represents a StreamingAllocation.
             * @implements IStreamingAllocation
             * @constructor
             * @param {perfetto.protos.IStreamingAllocation=} [p] Properties to set
             */
            function StreamingAllocation(p) {
                this.address = [];
                this.size = [];
                this.sampleSize = [];
                this.clockMonotonicCoarseTimestamp = [];
                this.heapId = [];
                this.sequenceNumber = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * StreamingAllocation address.
             * @member {Array.<number>} address
             * @memberof perfetto.protos.StreamingAllocation
             * @instance
             */
            StreamingAllocation.prototype.address = $util.emptyArray;

            /**
             * StreamingAllocation size.
             * @member {Array.<number>} size
             * @memberof perfetto.protos.StreamingAllocation
             * @instance
             */
            StreamingAllocation.prototype.size = $util.emptyArray;

            /**
             * StreamingAllocation sampleSize.
             * @member {Array.<number>} sampleSize
             * @memberof perfetto.protos.StreamingAllocation
             * @instance
             */
            StreamingAllocation.prototype.sampleSize = $util.emptyArray;

            /**
             * StreamingAllocation clockMonotonicCoarseTimestamp.
             * @member {Array.<number>} clockMonotonicCoarseTimestamp
             * @memberof perfetto.protos.StreamingAllocation
             * @instance
             */
            StreamingAllocation.prototype.clockMonotonicCoarseTimestamp = $util.emptyArray;

            /**
             * StreamingAllocation heapId.
             * @member {Array.<number>} heapId
             * @memberof perfetto.protos.StreamingAllocation
             * @instance
             */
            StreamingAllocation.prototype.heapId = $util.emptyArray;

            /**
             * StreamingAllocation sequenceNumber.
             * @member {Array.<number>} sequenceNumber
             * @memberof perfetto.protos.StreamingAllocation
             * @instance
             */
            StreamingAllocation.prototype.sequenceNumber = $util.emptyArray;

            /**
             * Creates a new StreamingAllocation instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.StreamingAllocation
             * @static
             * @param {perfetto.protos.IStreamingAllocation=} [properties] Properties to set
             * @returns {perfetto.protos.StreamingAllocation} StreamingAllocation instance
             */
            StreamingAllocation.create = function create(properties) {
                return new StreamingAllocation(properties);
            };

            /**
             * Encodes the specified StreamingAllocation message. Does not implicitly {@link perfetto.protos.StreamingAllocation.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.StreamingAllocation
             * @static
             * @param {perfetto.protos.IStreamingAllocation} m StreamingAllocation message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StreamingAllocation.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.address != null && m.address.length) {
                    for (var i = 0; i < m.address.length; ++i)
                        w.uint32(8).uint64(m.address[i]);
                }
                if (m.size != null && m.size.length) {
                    for (var i = 0; i < m.size.length; ++i)
                        w.uint32(16).uint64(m.size[i]);
                }
                if (m.sampleSize != null && m.sampleSize.length) {
                    for (var i = 0; i < m.sampleSize.length; ++i)
                        w.uint32(24).uint64(m.sampleSize[i]);
                }
                if (m.clockMonotonicCoarseTimestamp != null && m.clockMonotonicCoarseTimestamp.length) {
                    for (var i = 0; i < m.clockMonotonicCoarseTimestamp.length; ++i)
                        w.uint32(32).uint64(m.clockMonotonicCoarseTimestamp[i]);
                }
                if (m.heapId != null && m.heapId.length) {
                    for (var i = 0; i < m.heapId.length; ++i)
                        w.uint32(40).uint32(m.heapId[i]);
                }
                if (m.sequenceNumber != null && m.sequenceNumber.length) {
                    for (var i = 0; i < m.sequenceNumber.length; ++i)
                        w.uint32(48).uint64(m.sequenceNumber[i]);
                }
                return w;
            };

            /**
             * Encodes the specified StreamingAllocation message, length delimited. Does not implicitly {@link perfetto.protos.StreamingAllocation.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.StreamingAllocation
             * @static
             * @param {perfetto.protos.IStreamingAllocation} message StreamingAllocation message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StreamingAllocation.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a StreamingAllocation message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.StreamingAllocation
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.StreamingAllocation} StreamingAllocation
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StreamingAllocation.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.StreamingAllocation();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.address && m.address.length))
                            m.address = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.address.push(r.uint64());
                        } else
                            m.address.push(r.uint64());
                        break;
                    case 2:
                        if (!(m.size && m.size.length))
                            m.size = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.size.push(r.uint64());
                        } else
                            m.size.push(r.uint64());
                        break;
                    case 3:
                        if (!(m.sampleSize && m.sampleSize.length))
                            m.sampleSize = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.sampleSize.push(r.uint64());
                        } else
                            m.sampleSize.push(r.uint64());
                        break;
                    case 4:
                        if (!(m.clockMonotonicCoarseTimestamp && m.clockMonotonicCoarseTimestamp.length))
                            m.clockMonotonicCoarseTimestamp = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.clockMonotonicCoarseTimestamp.push(r.uint64());
                        } else
                            m.clockMonotonicCoarseTimestamp.push(r.uint64());
                        break;
                    case 5:
                        if (!(m.heapId && m.heapId.length))
                            m.heapId = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.heapId.push(r.uint32());
                        } else
                            m.heapId.push(r.uint32());
                        break;
                    case 6:
                        if (!(m.sequenceNumber && m.sequenceNumber.length))
                            m.sequenceNumber = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.sequenceNumber.push(r.uint64());
                        } else
                            m.sequenceNumber.push(r.uint64());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a StreamingAllocation message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.StreamingAllocation
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.StreamingAllocation} StreamingAllocation
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StreamingAllocation.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a StreamingAllocation message.
             * @function verify
             * @memberof perfetto.protos.StreamingAllocation
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            StreamingAllocation.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.address != null && m.hasOwnProperty("address")) {
                    if (!Array.isArray(m.address))
                        return "address: array expected";
                    for (var i = 0; i < m.address.length; ++i) {
                        if (!$util.isInteger(m.address[i]) && !(m.address[i] && $util.isInteger(m.address[i].low) && $util.isInteger(m.address[i].high)))
                            return "address: integer|Long[] expected";
                    }
                }
                if (m.size != null && m.hasOwnProperty("size")) {
                    if (!Array.isArray(m.size))
                        return "size: array expected";
                    for (var i = 0; i < m.size.length; ++i) {
                        if (!$util.isInteger(m.size[i]) && !(m.size[i] && $util.isInteger(m.size[i].low) && $util.isInteger(m.size[i].high)))
                            return "size: integer|Long[] expected";
                    }
                }
                if (m.sampleSize != null && m.hasOwnProperty("sampleSize")) {
                    if (!Array.isArray(m.sampleSize))
                        return "sampleSize: array expected";
                    for (var i = 0; i < m.sampleSize.length; ++i) {
                        if (!$util.isInteger(m.sampleSize[i]) && !(m.sampleSize[i] && $util.isInteger(m.sampleSize[i].low) && $util.isInteger(m.sampleSize[i].high)))
                            return "sampleSize: integer|Long[] expected";
                    }
                }
                if (m.clockMonotonicCoarseTimestamp != null && m.hasOwnProperty("clockMonotonicCoarseTimestamp")) {
                    if (!Array.isArray(m.clockMonotonicCoarseTimestamp))
                        return "clockMonotonicCoarseTimestamp: array expected";
                    for (var i = 0; i < m.clockMonotonicCoarseTimestamp.length; ++i) {
                        if (!$util.isInteger(m.clockMonotonicCoarseTimestamp[i]) && !(m.clockMonotonicCoarseTimestamp[i] && $util.isInteger(m.clockMonotonicCoarseTimestamp[i].low) && $util.isInteger(m.clockMonotonicCoarseTimestamp[i].high)))
                            return "clockMonotonicCoarseTimestamp: integer|Long[] expected";
                    }
                }
                if (m.heapId != null && m.hasOwnProperty("heapId")) {
                    if (!Array.isArray(m.heapId))
                        return "heapId: array expected";
                    for (var i = 0; i < m.heapId.length; ++i) {
                        if (!$util.isInteger(m.heapId[i]))
                            return "heapId: integer[] expected";
                    }
                }
                if (m.sequenceNumber != null && m.hasOwnProperty("sequenceNumber")) {
                    if (!Array.isArray(m.sequenceNumber))
                        return "sequenceNumber: array expected";
                    for (var i = 0; i < m.sequenceNumber.length; ++i) {
                        if (!$util.isInteger(m.sequenceNumber[i]) && !(m.sequenceNumber[i] && $util.isInteger(m.sequenceNumber[i].low) && $util.isInteger(m.sequenceNumber[i].high)))
                            return "sequenceNumber: integer|Long[] expected";
                    }
                }
                return null;
            };

            /**
             * Creates a StreamingAllocation message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.StreamingAllocation
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.StreamingAllocation} StreamingAllocation
             */
            StreamingAllocation.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.StreamingAllocation)
                    return d;
                var m = new $root.perfetto.protos.StreamingAllocation();
                if (d.address) {
                    if (!Array.isArray(d.address))
                        throw TypeError(".perfetto.protos.StreamingAllocation.address: array expected");
                    m.address = [];
                    for (var i = 0; i < d.address.length; ++i) {
                        if ($util.Long)
                            (m.address[i] = $util.Long.fromValue(d.address[i])).unsigned = true;
                        else if (typeof d.address[i] === "string")
                            m.address[i] = parseInt(d.address[i], 10);
                        else if (typeof d.address[i] === "number")
                            m.address[i] = d.address[i];
                        else if (typeof d.address[i] === "object")
                            m.address[i] = new $util.LongBits(d.address[i].low >>> 0, d.address[i].high >>> 0).toNumber(true);
                    }
                }
                if (d.size) {
                    if (!Array.isArray(d.size))
                        throw TypeError(".perfetto.protos.StreamingAllocation.size: array expected");
                    m.size = [];
                    for (var i = 0; i < d.size.length; ++i) {
                        if ($util.Long)
                            (m.size[i] = $util.Long.fromValue(d.size[i])).unsigned = true;
                        else if (typeof d.size[i] === "string")
                            m.size[i] = parseInt(d.size[i], 10);
                        else if (typeof d.size[i] === "number")
                            m.size[i] = d.size[i];
                        else if (typeof d.size[i] === "object")
                            m.size[i] = new $util.LongBits(d.size[i].low >>> 0, d.size[i].high >>> 0).toNumber(true);
                    }
                }
                if (d.sampleSize) {
                    if (!Array.isArray(d.sampleSize))
                        throw TypeError(".perfetto.protos.StreamingAllocation.sampleSize: array expected");
                    m.sampleSize = [];
                    for (var i = 0; i < d.sampleSize.length; ++i) {
                        if ($util.Long)
                            (m.sampleSize[i] = $util.Long.fromValue(d.sampleSize[i])).unsigned = true;
                        else if (typeof d.sampleSize[i] === "string")
                            m.sampleSize[i] = parseInt(d.sampleSize[i], 10);
                        else if (typeof d.sampleSize[i] === "number")
                            m.sampleSize[i] = d.sampleSize[i];
                        else if (typeof d.sampleSize[i] === "object")
                            m.sampleSize[i] = new $util.LongBits(d.sampleSize[i].low >>> 0, d.sampleSize[i].high >>> 0).toNumber(true);
                    }
                }
                if (d.clockMonotonicCoarseTimestamp) {
                    if (!Array.isArray(d.clockMonotonicCoarseTimestamp))
                        throw TypeError(".perfetto.protos.StreamingAllocation.clockMonotonicCoarseTimestamp: array expected");
                    m.clockMonotonicCoarseTimestamp = [];
                    for (var i = 0; i < d.clockMonotonicCoarseTimestamp.length; ++i) {
                        if ($util.Long)
                            (m.clockMonotonicCoarseTimestamp[i] = $util.Long.fromValue(d.clockMonotonicCoarseTimestamp[i])).unsigned = true;
                        else if (typeof d.clockMonotonicCoarseTimestamp[i] === "string")
                            m.clockMonotonicCoarseTimestamp[i] = parseInt(d.clockMonotonicCoarseTimestamp[i], 10);
                        else if (typeof d.clockMonotonicCoarseTimestamp[i] === "number")
                            m.clockMonotonicCoarseTimestamp[i] = d.clockMonotonicCoarseTimestamp[i];
                        else if (typeof d.clockMonotonicCoarseTimestamp[i] === "object")
                            m.clockMonotonicCoarseTimestamp[i] = new $util.LongBits(d.clockMonotonicCoarseTimestamp[i].low >>> 0, d.clockMonotonicCoarseTimestamp[i].high >>> 0).toNumber(true);
                    }
                }
                if (d.heapId) {
                    if (!Array.isArray(d.heapId))
                        throw TypeError(".perfetto.protos.StreamingAllocation.heapId: array expected");
                    m.heapId = [];
                    for (var i = 0; i < d.heapId.length; ++i) {
                        m.heapId[i] = d.heapId[i] >>> 0;
                    }
                }
                if (d.sequenceNumber) {
                    if (!Array.isArray(d.sequenceNumber))
                        throw TypeError(".perfetto.protos.StreamingAllocation.sequenceNumber: array expected");
                    m.sequenceNumber = [];
                    for (var i = 0; i < d.sequenceNumber.length; ++i) {
                        if ($util.Long)
                            (m.sequenceNumber[i] = $util.Long.fromValue(d.sequenceNumber[i])).unsigned = true;
                        else if (typeof d.sequenceNumber[i] === "string")
                            m.sequenceNumber[i] = parseInt(d.sequenceNumber[i], 10);
                        else if (typeof d.sequenceNumber[i] === "number")
                            m.sequenceNumber[i] = d.sequenceNumber[i];
                        else if (typeof d.sequenceNumber[i] === "object")
                            m.sequenceNumber[i] = new $util.LongBits(d.sequenceNumber[i].low >>> 0, d.sequenceNumber[i].high >>> 0).toNumber(true);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a StreamingAllocation message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.StreamingAllocation
             * @static
             * @param {perfetto.protos.StreamingAllocation} m StreamingAllocation
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            StreamingAllocation.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.address = [];
                    d.size = [];
                    d.sampleSize = [];
                    d.clockMonotonicCoarseTimestamp = [];
                    d.heapId = [];
                    d.sequenceNumber = [];
                }
                if (m.address && m.address.length) {
                    d.address = [];
                    for (var j = 0; j < m.address.length; ++j) {
                        if (typeof m.address[j] === "number")
                            d.address[j] = o.longs === String ? String(m.address[j]) : m.address[j];
                        else
                            d.address[j] = o.longs === String ? $util.Long.prototype.toString.call(m.address[j]) : o.longs === Number ? new $util.LongBits(m.address[j].low >>> 0, m.address[j].high >>> 0).toNumber(true) : m.address[j];
                    }
                }
                if (m.size && m.size.length) {
                    d.size = [];
                    for (var j = 0; j < m.size.length; ++j) {
                        if (typeof m.size[j] === "number")
                            d.size[j] = o.longs === String ? String(m.size[j]) : m.size[j];
                        else
                            d.size[j] = o.longs === String ? $util.Long.prototype.toString.call(m.size[j]) : o.longs === Number ? new $util.LongBits(m.size[j].low >>> 0, m.size[j].high >>> 0).toNumber(true) : m.size[j];
                    }
                }
                if (m.sampleSize && m.sampleSize.length) {
                    d.sampleSize = [];
                    for (var j = 0; j < m.sampleSize.length; ++j) {
                        if (typeof m.sampleSize[j] === "number")
                            d.sampleSize[j] = o.longs === String ? String(m.sampleSize[j]) : m.sampleSize[j];
                        else
                            d.sampleSize[j] = o.longs === String ? $util.Long.prototype.toString.call(m.sampleSize[j]) : o.longs === Number ? new $util.LongBits(m.sampleSize[j].low >>> 0, m.sampleSize[j].high >>> 0).toNumber(true) : m.sampleSize[j];
                    }
                }
                if (m.clockMonotonicCoarseTimestamp && m.clockMonotonicCoarseTimestamp.length) {
                    d.clockMonotonicCoarseTimestamp = [];
                    for (var j = 0; j < m.clockMonotonicCoarseTimestamp.length; ++j) {
                        if (typeof m.clockMonotonicCoarseTimestamp[j] === "number")
                            d.clockMonotonicCoarseTimestamp[j] = o.longs === String ? String(m.clockMonotonicCoarseTimestamp[j]) : m.clockMonotonicCoarseTimestamp[j];
                        else
                            d.clockMonotonicCoarseTimestamp[j] = o.longs === String ? $util.Long.prototype.toString.call(m.clockMonotonicCoarseTimestamp[j]) : o.longs === Number ? new $util.LongBits(m.clockMonotonicCoarseTimestamp[j].low >>> 0, m.clockMonotonicCoarseTimestamp[j].high >>> 0).toNumber(true) : m.clockMonotonicCoarseTimestamp[j];
                    }
                }
                if (m.heapId && m.heapId.length) {
                    d.heapId = [];
                    for (var j = 0; j < m.heapId.length; ++j) {
                        d.heapId[j] = m.heapId[j];
                    }
                }
                if (m.sequenceNumber && m.sequenceNumber.length) {
                    d.sequenceNumber = [];
                    for (var j = 0; j < m.sequenceNumber.length; ++j) {
                        if (typeof m.sequenceNumber[j] === "number")
                            d.sequenceNumber[j] = o.longs === String ? String(m.sequenceNumber[j]) : m.sequenceNumber[j];
                        else
                            d.sequenceNumber[j] = o.longs === String ? $util.Long.prototype.toString.call(m.sequenceNumber[j]) : o.longs === Number ? new $util.LongBits(m.sequenceNumber[j].low >>> 0, m.sequenceNumber[j].high >>> 0).toNumber(true) : m.sequenceNumber[j];
                    }
                }
                return d;
            };

            /**
             * Converts this StreamingAllocation to JSON.
             * @function toJSON
             * @memberof perfetto.protos.StreamingAllocation
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            StreamingAllocation.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return StreamingAllocation;
        })();

        protos.StreamingFree = (function() {

            /**
             * Properties of a StreamingFree.
             * @memberof perfetto.protos
             * @interface IStreamingFree
             * @property {Array.<number>|null} [address] StreamingFree address
             * @property {Array.<number>|null} [heapId] StreamingFree heapId
             * @property {Array.<number>|null} [sequenceNumber] StreamingFree sequenceNumber
             */

            /**
             * Constructs a new StreamingFree.
             * @memberof perfetto.protos
             * @classdesc Represents a StreamingFree.
             * @implements IStreamingFree
             * @constructor
             * @param {perfetto.protos.IStreamingFree=} [p] Properties to set
             */
            function StreamingFree(p) {
                this.address = [];
                this.heapId = [];
                this.sequenceNumber = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * StreamingFree address.
             * @member {Array.<number>} address
             * @memberof perfetto.protos.StreamingFree
             * @instance
             */
            StreamingFree.prototype.address = $util.emptyArray;

            /**
             * StreamingFree heapId.
             * @member {Array.<number>} heapId
             * @memberof perfetto.protos.StreamingFree
             * @instance
             */
            StreamingFree.prototype.heapId = $util.emptyArray;

            /**
             * StreamingFree sequenceNumber.
             * @member {Array.<number>} sequenceNumber
             * @memberof perfetto.protos.StreamingFree
             * @instance
             */
            StreamingFree.prototype.sequenceNumber = $util.emptyArray;

            /**
             * Creates a new StreamingFree instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.StreamingFree
             * @static
             * @param {perfetto.protos.IStreamingFree=} [properties] Properties to set
             * @returns {perfetto.protos.StreamingFree} StreamingFree instance
             */
            StreamingFree.create = function create(properties) {
                return new StreamingFree(properties);
            };

            /**
             * Encodes the specified StreamingFree message. Does not implicitly {@link perfetto.protos.StreamingFree.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.StreamingFree
             * @static
             * @param {perfetto.protos.IStreamingFree} m StreamingFree message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StreamingFree.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.address != null && m.address.length) {
                    for (var i = 0; i < m.address.length; ++i)
                        w.uint32(8).uint64(m.address[i]);
                }
                if (m.heapId != null && m.heapId.length) {
                    for (var i = 0; i < m.heapId.length; ++i)
                        w.uint32(16).uint32(m.heapId[i]);
                }
                if (m.sequenceNumber != null && m.sequenceNumber.length) {
                    for (var i = 0; i < m.sequenceNumber.length; ++i)
                        w.uint32(24).uint64(m.sequenceNumber[i]);
                }
                return w;
            };

            /**
             * Encodes the specified StreamingFree message, length delimited. Does not implicitly {@link perfetto.protos.StreamingFree.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.StreamingFree
             * @static
             * @param {perfetto.protos.IStreamingFree} message StreamingFree message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StreamingFree.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a StreamingFree message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.StreamingFree
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.StreamingFree} StreamingFree
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StreamingFree.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.StreamingFree();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.address && m.address.length))
                            m.address = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.address.push(r.uint64());
                        } else
                            m.address.push(r.uint64());
                        break;
                    case 2:
                        if (!(m.heapId && m.heapId.length))
                            m.heapId = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.heapId.push(r.uint32());
                        } else
                            m.heapId.push(r.uint32());
                        break;
                    case 3:
                        if (!(m.sequenceNumber && m.sequenceNumber.length))
                            m.sequenceNumber = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.sequenceNumber.push(r.uint64());
                        } else
                            m.sequenceNumber.push(r.uint64());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a StreamingFree message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.StreamingFree
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.StreamingFree} StreamingFree
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StreamingFree.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a StreamingFree message.
             * @function verify
             * @memberof perfetto.protos.StreamingFree
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            StreamingFree.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.address != null && m.hasOwnProperty("address")) {
                    if (!Array.isArray(m.address))
                        return "address: array expected";
                    for (var i = 0; i < m.address.length; ++i) {
                        if (!$util.isInteger(m.address[i]) && !(m.address[i] && $util.isInteger(m.address[i].low) && $util.isInteger(m.address[i].high)))
                            return "address: integer|Long[] expected";
                    }
                }
                if (m.heapId != null && m.hasOwnProperty("heapId")) {
                    if (!Array.isArray(m.heapId))
                        return "heapId: array expected";
                    for (var i = 0; i < m.heapId.length; ++i) {
                        if (!$util.isInteger(m.heapId[i]))
                            return "heapId: integer[] expected";
                    }
                }
                if (m.sequenceNumber != null && m.hasOwnProperty("sequenceNumber")) {
                    if (!Array.isArray(m.sequenceNumber))
                        return "sequenceNumber: array expected";
                    for (var i = 0; i < m.sequenceNumber.length; ++i) {
                        if (!$util.isInteger(m.sequenceNumber[i]) && !(m.sequenceNumber[i] && $util.isInteger(m.sequenceNumber[i].low) && $util.isInteger(m.sequenceNumber[i].high)))
                            return "sequenceNumber: integer|Long[] expected";
                    }
                }
                return null;
            };

            /**
             * Creates a StreamingFree message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.StreamingFree
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.StreamingFree} StreamingFree
             */
            StreamingFree.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.StreamingFree)
                    return d;
                var m = new $root.perfetto.protos.StreamingFree();
                if (d.address) {
                    if (!Array.isArray(d.address))
                        throw TypeError(".perfetto.protos.StreamingFree.address: array expected");
                    m.address = [];
                    for (var i = 0; i < d.address.length; ++i) {
                        if ($util.Long)
                            (m.address[i] = $util.Long.fromValue(d.address[i])).unsigned = true;
                        else if (typeof d.address[i] === "string")
                            m.address[i] = parseInt(d.address[i], 10);
                        else if (typeof d.address[i] === "number")
                            m.address[i] = d.address[i];
                        else if (typeof d.address[i] === "object")
                            m.address[i] = new $util.LongBits(d.address[i].low >>> 0, d.address[i].high >>> 0).toNumber(true);
                    }
                }
                if (d.heapId) {
                    if (!Array.isArray(d.heapId))
                        throw TypeError(".perfetto.protos.StreamingFree.heapId: array expected");
                    m.heapId = [];
                    for (var i = 0; i < d.heapId.length; ++i) {
                        m.heapId[i] = d.heapId[i] >>> 0;
                    }
                }
                if (d.sequenceNumber) {
                    if (!Array.isArray(d.sequenceNumber))
                        throw TypeError(".perfetto.protos.StreamingFree.sequenceNumber: array expected");
                    m.sequenceNumber = [];
                    for (var i = 0; i < d.sequenceNumber.length; ++i) {
                        if ($util.Long)
                            (m.sequenceNumber[i] = $util.Long.fromValue(d.sequenceNumber[i])).unsigned = true;
                        else if (typeof d.sequenceNumber[i] === "string")
                            m.sequenceNumber[i] = parseInt(d.sequenceNumber[i], 10);
                        else if (typeof d.sequenceNumber[i] === "number")
                            m.sequenceNumber[i] = d.sequenceNumber[i];
                        else if (typeof d.sequenceNumber[i] === "object")
                            m.sequenceNumber[i] = new $util.LongBits(d.sequenceNumber[i].low >>> 0, d.sequenceNumber[i].high >>> 0).toNumber(true);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a StreamingFree message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.StreamingFree
             * @static
             * @param {perfetto.protos.StreamingFree} m StreamingFree
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            StreamingFree.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.address = [];
                    d.heapId = [];
                    d.sequenceNumber = [];
                }
                if (m.address && m.address.length) {
                    d.address = [];
                    for (var j = 0; j < m.address.length; ++j) {
                        if (typeof m.address[j] === "number")
                            d.address[j] = o.longs === String ? String(m.address[j]) : m.address[j];
                        else
                            d.address[j] = o.longs === String ? $util.Long.prototype.toString.call(m.address[j]) : o.longs === Number ? new $util.LongBits(m.address[j].low >>> 0, m.address[j].high >>> 0).toNumber(true) : m.address[j];
                    }
                }
                if (m.heapId && m.heapId.length) {
                    d.heapId = [];
                    for (var j = 0; j < m.heapId.length; ++j) {
                        d.heapId[j] = m.heapId[j];
                    }
                }
                if (m.sequenceNumber && m.sequenceNumber.length) {
                    d.sequenceNumber = [];
                    for (var j = 0; j < m.sequenceNumber.length; ++j) {
                        if (typeof m.sequenceNumber[j] === "number")
                            d.sequenceNumber[j] = o.longs === String ? String(m.sequenceNumber[j]) : m.sequenceNumber[j];
                        else
                            d.sequenceNumber[j] = o.longs === String ? $util.Long.prototype.toString.call(m.sequenceNumber[j]) : o.longs === Number ? new $util.LongBits(m.sequenceNumber[j].low >>> 0, m.sequenceNumber[j].high >>> 0).toNumber(true) : m.sequenceNumber[j];
                    }
                }
                return d;
            };

            /**
             * Converts this StreamingFree to JSON.
             * @function toJSON
             * @memberof perfetto.protos.StreamingFree
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            StreamingFree.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return StreamingFree;
        })();

        protos.StreamingProfilePacket = (function() {

            /**
             * Properties of a StreamingProfilePacket.
             * @memberof perfetto.protos
             * @interface IStreamingProfilePacket
             * @property {Array.<number>|null} [callstackIid] StreamingProfilePacket callstackIid
             * @property {Array.<number>|null} [timestampDeltaUs] StreamingProfilePacket timestampDeltaUs
             * @property {number|null} [processPriority] StreamingProfilePacket processPriority
             */

            /**
             * Constructs a new StreamingProfilePacket.
             * @memberof perfetto.protos
             * @classdesc Represents a StreamingProfilePacket.
             * @implements IStreamingProfilePacket
             * @constructor
             * @param {perfetto.protos.IStreamingProfilePacket=} [p] Properties to set
             */
            function StreamingProfilePacket(p) {
                this.callstackIid = [];
                this.timestampDeltaUs = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * StreamingProfilePacket callstackIid.
             * @member {Array.<number>} callstackIid
             * @memberof perfetto.protos.StreamingProfilePacket
             * @instance
             */
            StreamingProfilePacket.prototype.callstackIid = $util.emptyArray;

            /**
             * StreamingProfilePacket timestampDeltaUs.
             * @member {Array.<number>} timestampDeltaUs
             * @memberof perfetto.protos.StreamingProfilePacket
             * @instance
             */
            StreamingProfilePacket.prototype.timestampDeltaUs = $util.emptyArray;

            /**
             * StreamingProfilePacket processPriority.
             * @member {number} processPriority
             * @memberof perfetto.protos.StreamingProfilePacket
             * @instance
             */
            StreamingProfilePacket.prototype.processPriority = 0;

            /**
             * Creates a new StreamingProfilePacket instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.StreamingProfilePacket
             * @static
             * @param {perfetto.protos.IStreamingProfilePacket=} [properties] Properties to set
             * @returns {perfetto.protos.StreamingProfilePacket} StreamingProfilePacket instance
             */
            StreamingProfilePacket.create = function create(properties) {
                return new StreamingProfilePacket(properties);
            };

            /**
             * Encodes the specified StreamingProfilePacket message. Does not implicitly {@link perfetto.protos.StreamingProfilePacket.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.StreamingProfilePacket
             * @static
             * @param {perfetto.protos.IStreamingProfilePacket} m StreamingProfilePacket message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StreamingProfilePacket.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.callstackIid != null && m.callstackIid.length) {
                    for (var i = 0; i < m.callstackIid.length; ++i)
                        w.uint32(8).uint64(m.callstackIid[i]);
                }
                if (m.timestampDeltaUs != null && m.timestampDeltaUs.length) {
                    for (var i = 0; i < m.timestampDeltaUs.length; ++i)
                        w.uint32(16).int64(m.timestampDeltaUs[i]);
                }
                if (m.processPriority != null && Object.hasOwnProperty.call(m, "processPriority"))
                    w.uint32(24).int32(m.processPriority);
                return w;
            };

            /**
             * Encodes the specified StreamingProfilePacket message, length delimited. Does not implicitly {@link perfetto.protos.StreamingProfilePacket.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.StreamingProfilePacket
             * @static
             * @param {perfetto.protos.IStreamingProfilePacket} message StreamingProfilePacket message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StreamingProfilePacket.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a StreamingProfilePacket message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.StreamingProfilePacket
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.StreamingProfilePacket} StreamingProfilePacket
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StreamingProfilePacket.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.StreamingProfilePacket();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.callstackIid && m.callstackIid.length))
                            m.callstackIid = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.callstackIid.push(r.uint64());
                        } else
                            m.callstackIid.push(r.uint64());
                        break;
                    case 2:
                        if (!(m.timestampDeltaUs && m.timestampDeltaUs.length))
                            m.timestampDeltaUs = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.timestampDeltaUs.push(r.int64());
                        } else
                            m.timestampDeltaUs.push(r.int64());
                        break;
                    case 3:
                        m.processPriority = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a StreamingProfilePacket message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.StreamingProfilePacket
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.StreamingProfilePacket} StreamingProfilePacket
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StreamingProfilePacket.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a StreamingProfilePacket message.
             * @function verify
             * @memberof perfetto.protos.StreamingProfilePacket
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            StreamingProfilePacket.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.callstackIid != null && m.hasOwnProperty("callstackIid")) {
                    if (!Array.isArray(m.callstackIid))
                        return "callstackIid: array expected";
                    for (var i = 0; i < m.callstackIid.length; ++i) {
                        if (!$util.isInteger(m.callstackIid[i]) && !(m.callstackIid[i] && $util.isInteger(m.callstackIid[i].low) && $util.isInteger(m.callstackIid[i].high)))
                            return "callstackIid: integer|Long[] expected";
                    }
                }
                if (m.timestampDeltaUs != null && m.hasOwnProperty("timestampDeltaUs")) {
                    if (!Array.isArray(m.timestampDeltaUs))
                        return "timestampDeltaUs: array expected";
                    for (var i = 0; i < m.timestampDeltaUs.length; ++i) {
                        if (!$util.isInteger(m.timestampDeltaUs[i]) && !(m.timestampDeltaUs[i] && $util.isInteger(m.timestampDeltaUs[i].low) && $util.isInteger(m.timestampDeltaUs[i].high)))
                            return "timestampDeltaUs: integer|Long[] expected";
                    }
                }
                if (m.processPriority != null && m.hasOwnProperty("processPriority")) {
                    if (!$util.isInteger(m.processPriority))
                        return "processPriority: integer expected";
                }
                return null;
            };

            /**
             * Creates a StreamingProfilePacket message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.StreamingProfilePacket
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.StreamingProfilePacket} StreamingProfilePacket
             */
            StreamingProfilePacket.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.StreamingProfilePacket)
                    return d;
                var m = new $root.perfetto.protos.StreamingProfilePacket();
                if (d.callstackIid) {
                    if (!Array.isArray(d.callstackIid))
                        throw TypeError(".perfetto.protos.StreamingProfilePacket.callstackIid: array expected");
                    m.callstackIid = [];
                    for (var i = 0; i < d.callstackIid.length; ++i) {
                        if ($util.Long)
                            (m.callstackIid[i] = $util.Long.fromValue(d.callstackIid[i])).unsigned = true;
                        else if (typeof d.callstackIid[i] === "string")
                            m.callstackIid[i] = parseInt(d.callstackIid[i], 10);
                        else if (typeof d.callstackIid[i] === "number")
                            m.callstackIid[i] = d.callstackIid[i];
                        else if (typeof d.callstackIid[i] === "object")
                            m.callstackIid[i] = new $util.LongBits(d.callstackIid[i].low >>> 0, d.callstackIid[i].high >>> 0).toNumber(true);
                    }
                }
                if (d.timestampDeltaUs) {
                    if (!Array.isArray(d.timestampDeltaUs))
                        throw TypeError(".perfetto.protos.StreamingProfilePacket.timestampDeltaUs: array expected");
                    m.timestampDeltaUs = [];
                    for (var i = 0; i < d.timestampDeltaUs.length; ++i) {
                        if ($util.Long)
                            (m.timestampDeltaUs[i] = $util.Long.fromValue(d.timestampDeltaUs[i])).unsigned = false;
                        else if (typeof d.timestampDeltaUs[i] === "string")
                            m.timestampDeltaUs[i] = parseInt(d.timestampDeltaUs[i], 10);
                        else if (typeof d.timestampDeltaUs[i] === "number")
                            m.timestampDeltaUs[i] = d.timestampDeltaUs[i];
                        else if (typeof d.timestampDeltaUs[i] === "object")
                            m.timestampDeltaUs[i] = new $util.LongBits(d.timestampDeltaUs[i].low >>> 0, d.timestampDeltaUs[i].high >>> 0).toNumber();
                    }
                }
                if (d.processPriority != null) {
                    m.processPriority = d.processPriority | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a StreamingProfilePacket message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.StreamingProfilePacket
             * @static
             * @param {perfetto.protos.StreamingProfilePacket} m StreamingProfilePacket
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            StreamingProfilePacket.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.callstackIid = [];
                    d.timestampDeltaUs = [];
                }
                if (o.defaults) {
                    d.processPriority = 0;
                }
                if (m.callstackIid && m.callstackIid.length) {
                    d.callstackIid = [];
                    for (var j = 0; j < m.callstackIid.length; ++j) {
                        if (typeof m.callstackIid[j] === "number")
                            d.callstackIid[j] = o.longs === String ? String(m.callstackIid[j]) : m.callstackIid[j];
                        else
                            d.callstackIid[j] = o.longs === String ? $util.Long.prototype.toString.call(m.callstackIid[j]) : o.longs === Number ? new $util.LongBits(m.callstackIid[j].low >>> 0, m.callstackIid[j].high >>> 0).toNumber(true) : m.callstackIid[j];
                    }
                }
                if (m.timestampDeltaUs && m.timestampDeltaUs.length) {
                    d.timestampDeltaUs = [];
                    for (var j = 0; j < m.timestampDeltaUs.length; ++j) {
                        if (typeof m.timestampDeltaUs[j] === "number")
                            d.timestampDeltaUs[j] = o.longs === String ? String(m.timestampDeltaUs[j]) : m.timestampDeltaUs[j];
                        else
                            d.timestampDeltaUs[j] = o.longs === String ? $util.Long.prototype.toString.call(m.timestampDeltaUs[j]) : o.longs === Number ? new $util.LongBits(m.timestampDeltaUs[j].low >>> 0, m.timestampDeltaUs[j].high >>> 0).toNumber() : m.timestampDeltaUs[j];
                    }
                }
                if (m.processPriority != null && m.hasOwnProperty("processPriority")) {
                    d.processPriority = m.processPriority;
                }
                return d;
            };

            /**
             * Converts this StreamingProfilePacket to JSON.
             * @function toJSON
             * @memberof perfetto.protos.StreamingProfilePacket
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            StreamingProfilePacket.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return StreamingProfilePacket;
        })();

        protos.Profiling = (function() {

            /**
             * Properties of a Profiling.
             * @memberof perfetto.protos
             * @interface IProfiling
             */

            /**
             * Constructs a new Profiling.
             * @memberof perfetto.protos
             * @classdesc Represents a Profiling.
             * @implements IProfiling
             * @constructor
             * @param {perfetto.protos.IProfiling=} [p] Properties to set
             */
            function Profiling(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Creates a new Profiling instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Profiling
             * @static
             * @param {perfetto.protos.IProfiling=} [properties] Properties to set
             * @returns {perfetto.protos.Profiling} Profiling instance
             */
            Profiling.create = function create(properties) {
                return new Profiling(properties);
            };

            /**
             * Encodes the specified Profiling message. Does not implicitly {@link perfetto.protos.Profiling.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Profiling
             * @static
             * @param {perfetto.protos.IProfiling} m Profiling message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Profiling.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                return w;
            };

            /**
             * Encodes the specified Profiling message, length delimited. Does not implicitly {@link perfetto.protos.Profiling.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Profiling
             * @static
             * @param {perfetto.protos.IProfiling} message Profiling message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Profiling.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a Profiling message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Profiling
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Profiling} Profiling
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Profiling.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Profiling();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a Profiling message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Profiling
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Profiling} Profiling
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Profiling.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a Profiling message.
             * @function verify
             * @memberof perfetto.protos.Profiling
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Profiling.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates a Profiling message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Profiling
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Profiling} Profiling
             */
            Profiling.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Profiling)
                    return d;
                return new $root.perfetto.protos.Profiling();
            };

            /**
             * Creates a plain object from a Profiling message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Profiling
             * @static
             * @param {perfetto.protos.Profiling} m Profiling
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Profiling.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this Profiling to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Profiling
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Profiling.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * CpuMode enum.
             * @name perfetto.protos.Profiling.CpuMode
             * @enum {number}
             * @property {number} MODE_UNKNOWN=0 MODE_UNKNOWN value
             * @property {number} MODE_KERNEL=1 MODE_KERNEL value
             * @property {number} MODE_USER=2 MODE_USER value
             * @property {number} MODE_HYPERVISOR=3 MODE_HYPERVISOR value
             * @property {number} MODE_GUEST_KERNEL=4 MODE_GUEST_KERNEL value
             * @property {number} MODE_GUEST_USER=5 MODE_GUEST_USER value
             */
            Profiling.CpuMode = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "MODE_UNKNOWN"] = 0;
                values[valuesById[1] = "MODE_KERNEL"] = 1;
                values[valuesById[2] = "MODE_USER"] = 2;
                values[valuesById[3] = "MODE_HYPERVISOR"] = 3;
                values[valuesById[4] = "MODE_GUEST_KERNEL"] = 4;
                values[valuesById[5] = "MODE_GUEST_USER"] = 5;
                return values;
            })();

            /**
             * StackUnwindError enum.
             * @name perfetto.protos.Profiling.StackUnwindError
             * @enum {number}
             * @property {number} UNWIND_ERROR_UNKNOWN=0 UNWIND_ERROR_UNKNOWN value
             * @property {number} UNWIND_ERROR_NONE=1 UNWIND_ERROR_NONE value
             * @property {number} UNWIND_ERROR_MEMORY_INVALID=2 UNWIND_ERROR_MEMORY_INVALID value
             * @property {number} UNWIND_ERROR_UNWIND_INFO=3 UNWIND_ERROR_UNWIND_INFO value
             * @property {number} UNWIND_ERROR_UNSUPPORTED=4 UNWIND_ERROR_UNSUPPORTED value
             * @property {number} UNWIND_ERROR_INVALID_MAP=5 UNWIND_ERROR_INVALID_MAP value
             * @property {number} UNWIND_ERROR_MAX_FRAMES_EXCEEDED=6 UNWIND_ERROR_MAX_FRAMES_EXCEEDED value
             * @property {number} UNWIND_ERROR_REPEATED_FRAME=7 UNWIND_ERROR_REPEATED_FRAME value
             * @property {number} UNWIND_ERROR_INVALID_ELF=8 UNWIND_ERROR_INVALID_ELF value
             * @property {number} UNWIND_ERROR_SYSTEM_CALL=9 UNWIND_ERROR_SYSTEM_CALL value
             * @property {number} UNWIND_ERROR_THREAD_TIMEOUT=10 UNWIND_ERROR_THREAD_TIMEOUT value
             * @property {number} UNWIND_ERROR_THREAD_DOES_NOT_EXIST=11 UNWIND_ERROR_THREAD_DOES_NOT_EXIST value
             * @property {number} UNWIND_ERROR_BAD_ARCH=12 UNWIND_ERROR_BAD_ARCH value
             * @property {number} UNWIND_ERROR_MAPS_PARSE=13 UNWIND_ERROR_MAPS_PARSE value
             * @property {number} UNWIND_ERROR_INVALID_PARAMETER=14 UNWIND_ERROR_INVALID_PARAMETER value
             * @property {number} UNWIND_ERROR_PTRACE_CALL=15 UNWIND_ERROR_PTRACE_CALL value
             */
            Profiling.StackUnwindError = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNWIND_ERROR_UNKNOWN"] = 0;
                values[valuesById[1] = "UNWIND_ERROR_NONE"] = 1;
                values[valuesById[2] = "UNWIND_ERROR_MEMORY_INVALID"] = 2;
                values[valuesById[3] = "UNWIND_ERROR_UNWIND_INFO"] = 3;
                values[valuesById[4] = "UNWIND_ERROR_UNSUPPORTED"] = 4;
                values[valuesById[5] = "UNWIND_ERROR_INVALID_MAP"] = 5;
                values[valuesById[6] = "UNWIND_ERROR_MAX_FRAMES_EXCEEDED"] = 6;
                values[valuesById[7] = "UNWIND_ERROR_REPEATED_FRAME"] = 7;
                values[valuesById[8] = "UNWIND_ERROR_INVALID_ELF"] = 8;
                values[valuesById[9] = "UNWIND_ERROR_SYSTEM_CALL"] = 9;
                values[valuesById[10] = "UNWIND_ERROR_THREAD_TIMEOUT"] = 10;
                values[valuesById[11] = "UNWIND_ERROR_THREAD_DOES_NOT_EXIST"] = 11;
                values[valuesById[12] = "UNWIND_ERROR_BAD_ARCH"] = 12;
                values[valuesById[13] = "UNWIND_ERROR_MAPS_PARSE"] = 13;
                values[valuesById[14] = "UNWIND_ERROR_INVALID_PARAMETER"] = 14;
                values[valuesById[15] = "UNWIND_ERROR_PTRACE_CALL"] = 15;
                return values;
            })();

            return Profiling;
        })();

        protos.PerfSample = (function() {

            /**
             * Properties of a PerfSample.
             * @memberof perfetto.protos
             * @interface IPerfSample
             * @property {number|null} [cpu] PerfSample cpu
             * @property {number|null} [pid] PerfSample pid
             * @property {number|null} [tid] PerfSample tid
             * @property {perfetto.protos.Profiling.CpuMode|null} [cpuMode] PerfSample cpuMode
             * @property {number|null} [timebaseCount] PerfSample timebaseCount
             * @property {number|null} [callstackIid] PerfSample callstackIid
             * @property {perfetto.protos.Profiling.StackUnwindError|null} [unwindError] PerfSample unwindError
             * @property {number|null} [kernelRecordsLost] PerfSample kernelRecordsLost
             * @property {perfetto.protos.PerfSample.SampleSkipReason|null} [sampleSkippedReason] PerfSample sampleSkippedReason
             * @property {perfetto.protos.PerfSample.IProducerEvent|null} [producerEvent] PerfSample producerEvent
             */

            /**
             * Constructs a new PerfSample.
             * @memberof perfetto.protos
             * @classdesc Represents a PerfSample.
             * @implements IPerfSample
             * @constructor
             * @param {perfetto.protos.IPerfSample=} [p] Properties to set
             */
            function PerfSample(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * PerfSample cpu.
             * @member {number} cpu
             * @memberof perfetto.protos.PerfSample
             * @instance
             */
            PerfSample.prototype.cpu = 0;

            /**
             * PerfSample pid.
             * @member {number} pid
             * @memberof perfetto.protos.PerfSample
             * @instance
             */
            PerfSample.prototype.pid = 0;

            /**
             * PerfSample tid.
             * @member {number} tid
             * @memberof perfetto.protos.PerfSample
             * @instance
             */
            PerfSample.prototype.tid = 0;

            /**
             * PerfSample cpuMode.
             * @member {perfetto.protos.Profiling.CpuMode} cpuMode
             * @memberof perfetto.protos.PerfSample
             * @instance
             */
            PerfSample.prototype.cpuMode = 0;

            /**
             * PerfSample timebaseCount.
             * @member {number} timebaseCount
             * @memberof perfetto.protos.PerfSample
             * @instance
             */
            PerfSample.prototype.timebaseCount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * PerfSample callstackIid.
             * @member {number} callstackIid
             * @memberof perfetto.protos.PerfSample
             * @instance
             */
            PerfSample.prototype.callstackIid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * PerfSample unwindError.
             * @member {perfetto.protos.Profiling.StackUnwindError} unwindError
             * @memberof perfetto.protos.PerfSample
             * @instance
             */
            PerfSample.prototype.unwindError = 0;

            /**
             * PerfSample kernelRecordsLost.
             * @member {number} kernelRecordsLost
             * @memberof perfetto.protos.PerfSample
             * @instance
             */
            PerfSample.prototype.kernelRecordsLost = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * PerfSample sampleSkippedReason.
             * @member {perfetto.protos.PerfSample.SampleSkipReason} sampleSkippedReason
             * @memberof perfetto.protos.PerfSample
             * @instance
             */
            PerfSample.prototype.sampleSkippedReason = 0;

            /**
             * PerfSample producerEvent.
             * @member {perfetto.protos.PerfSample.IProducerEvent|null|undefined} producerEvent
             * @memberof perfetto.protos.PerfSample
             * @instance
             */
            PerfSample.prototype.producerEvent = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * PerfSample optionalUnwindError.
             * @member {"unwindError"|undefined} optionalUnwindError
             * @memberof perfetto.protos.PerfSample
             * @instance
             */
            Object.defineProperty(PerfSample.prototype, "optionalUnwindError", {
                get: $util.oneOfGetter($oneOfFields = ["unwindError"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * PerfSample optionalSampleSkippedReason.
             * @member {"sampleSkippedReason"|undefined} optionalSampleSkippedReason
             * @memberof perfetto.protos.PerfSample
             * @instance
             */
            Object.defineProperty(PerfSample.prototype, "optionalSampleSkippedReason", {
                get: $util.oneOfGetter($oneOfFields = ["sampleSkippedReason"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new PerfSample instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.PerfSample
             * @static
             * @param {perfetto.protos.IPerfSample=} [properties] Properties to set
             * @returns {perfetto.protos.PerfSample} PerfSample instance
             */
            PerfSample.create = function create(properties) {
                return new PerfSample(properties);
            };

            /**
             * Encodes the specified PerfSample message. Does not implicitly {@link perfetto.protos.PerfSample.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.PerfSample
             * @static
             * @param {perfetto.protos.IPerfSample} m PerfSample message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PerfSample.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.cpu != null && Object.hasOwnProperty.call(m, "cpu"))
                    w.uint32(8).uint32(m.cpu);
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(16).uint32(m.pid);
                if (m.tid != null && Object.hasOwnProperty.call(m, "tid"))
                    w.uint32(24).uint32(m.tid);
                if (m.callstackIid != null && Object.hasOwnProperty.call(m, "callstackIid"))
                    w.uint32(32).uint64(m.callstackIid);
                if (m.cpuMode != null && Object.hasOwnProperty.call(m, "cpuMode"))
                    w.uint32(40).int32(m.cpuMode);
                if (m.timebaseCount != null && Object.hasOwnProperty.call(m, "timebaseCount"))
                    w.uint32(48).uint64(m.timebaseCount);
                if (m.unwindError != null && Object.hasOwnProperty.call(m, "unwindError"))
                    w.uint32(128).int32(m.unwindError);
                if (m.kernelRecordsLost != null && Object.hasOwnProperty.call(m, "kernelRecordsLost"))
                    w.uint32(136).uint64(m.kernelRecordsLost);
                if (m.sampleSkippedReason != null && Object.hasOwnProperty.call(m, "sampleSkippedReason"))
                    w.uint32(144).int32(m.sampleSkippedReason);
                if (m.producerEvent != null && Object.hasOwnProperty.call(m, "producerEvent"))
                    $root.perfetto.protos.PerfSample.ProducerEvent.encode(m.producerEvent, w.uint32(154).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified PerfSample message, length delimited. Does not implicitly {@link perfetto.protos.PerfSample.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.PerfSample
             * @static
             * @param {perfetto.protos.IPerfSample} message PerfSample message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PerfSample.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a PerfSample message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.PerfSample
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.PerfSample} PerfSample
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PerfSample.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.PerfSample();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.cpu = r.uint32();
                        break;
                    case 2:
                        m.pid = r.uint32();
                        break;
                    case 3:
                        m.tid = r.uint32();
                        break;
                    case 5:
                        m.cpuMode = r.int32();
                        break;
                    case 6:
                        m.timebaseCount = r.uint64();
                        break;
                    case 4:
                        m.callstackIid = r.uint64();
                        break;
                    case 16:
                        m.unwindError = r.int32();
                        break;
                    case 17:
                        m.kernelRecordsLost = r.uint64();
                        break;
                    case 18:
                        m.sampleSkippedReason = r.int32();
                        break;
                    case 19:
                        m.producerEvent = $root.perfetto.protos.PerfSample.ProducerEvent.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a PerfSample message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.PerfSample
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.PerfSample} PerfSample
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PerfSample.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a PerfSample message.
             * @function verify
             * @memberof perfetto.protos.PerfSample
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            PerfSample.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.cpu != null && m.hasOwnProperty("cpu")) {
                    if (!$util.isInteger(m.cpu))
                        return "cpu: integer expected";
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.tid != null && m.hasOwnProperty("tid")) {
                    if (!$util.isInteger(m.tid))
                        return "tid: integer expected";
                }
                if (m.cpuMode != null && m.hasOwnProperty("cpuMode")) {
                    switch (m.cpuMode) {
                    default:
                        return "cpuMode: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                        break;
                    }
                }
                if (m.timebaseCount != null && m.hasOwnProperty("timebaseCount")) {
                    if (!$util.isInteger(m.timebaseCount) && !(m.timebaseCount && $util.isInteger(m.timebaseCount.low) && $util.isInteger(m.timebaseCount.high)))
                        return "timebaseCount: integer|Long expected";
                }
                if (m.callstackIid != null && m.hasOwnProperty("callstackIid")) {
                    if (!$util.isInteger(m.callstackIid) && !(m.callstackIid && $util.isInteger(m.callstackIid.low) && $util.isInteger(m.callstackIid.high)))
                        return "callstackIid: integer|Long expected";
                }
                if (m.unwindError != null && m.hasOwnProperty("unwindError")) {
                    switch (m.unwindError) {
                    default:
                        return "unwindError: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                    case 6:
                    case 7:
                    case 8:
                    case 9:
                    case 10:
                    case 11:
                    case 12:
                    case 13:
                    case 14:
                    case 15:
                        break;
                    }
                }
                if (m.kernelRecordsLost != null && m.hasOwnProperty("kernelRecordsLost")) {
                    if (!$util.isInteger(m.kernelRecordsLost) && !(m.kernelRecordsLost && $util.isInteger(m.kernelRecordsLost.low) && $util.isInteger(m.kernelRecordsLost.high)))
                        return "kernelRecordsLost: integer|Long expected";
                }
                if (m.sampleSkippedReason != null && m.hasOwnProperty("sampleSkippedReason")) {
                    switch (m.sampleSkippedReason) {
                    default:
                        return "sampleSkippedReason: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                }
                if (m.producerEvent != null && m.hasOwnProperty("producerEvent")) {
                    {
                        var e = $root.perfetto.protos.PerfSample.ProducerEvent.verify(m.producerEvent);
                        if (e)
                            return "producerEvent." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a PerfSample message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.PerfSample
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.PerfSample} PerfSample
             */
            PerfSample.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.PerfSample)
                    return d;
                var m = new $root.perfetto.protos.PerfSample();
                if (d.cpu != null) {
                    m.cpu = d.cpu >>> 0;
                }
                if (d.pid != null) {
                    m.pid = d.pid >>> 0;
                }
                if (d.tid != null) {
                    m.tid = d.tid >>> 0;
                }
                switch (d.cpuMode) {
                case "MODE_UNKNOWN":
                case 0:
                    m.cpuMode = 0;
                    break;
                case "MODE_KERNEL":
                case 1:
                    m.cpuMode = 1;
                    break;
                case "MODE_USER":
                case 2:
                    m.cpuMode = 2;
                    break;
                case "MODE_HYPERVISOR":
                case 3:
                    m.cpuMode = 3;
                    break;
                case "MODE_GUEST_KERNEL":
                case 4:
                    m.cpuMode = 4;
                    break;
                case "MODE_GUEST_USER":
                case 5:
                    m.cpuMode = 5;
                    break;
                }
                if (d.timebaseCount != null) {
                    if ($util.Long)
                        (m.timebaseCount = $util.Long.fromValue(d.timebaseCount)).unsigned = true;
                    else if (typeof d.timebaseCount === "string")
                        m.timebaseCount = parseInt(d.timebaseCount, 10);
                    else if (typeof d.timebaseCount === "number")
                        m.timebaseCount = d.timebaseCount;
                    else if (typeof d.timebaseCount === "object")
                        m.timebaseCount = new $util.LongBits(d.timebaseCount.low >>> 0, d.timebaseCount.high >>> 0).toNumber(true);
                }
                if (d.callstackIid != null) {
                    if ($util.Long)
                        (m.callstackIid = $util.Long.fromValue(d.callstackIid)).unsigned = true;
                    else if (typeof d.callstackIid === "string")
                        m.callstackIid = parseInt(d.callstackIid, 10);
                    else if (typeof d.callstackIid === "number")
                        m.callstackIid = d.callstackIid;
                    else if (typeof d.callstackIid === "object")
                        m.callstackIid = new $util.LongBits(d.callstackIid.low >>> 0, d.callstackIid.high >>> 0).toNumber(true);
                }
                switch (d.unwindError) {
                case "UNWIND_ERROR_UNKNOWN":
                case 0:
                    m.unwindError = 0;
                    break;
                case "UNWIND_ERROR_NONE":
                case 1:
                    m.unwindError = 1;
                    break;
                case "UNWIND_ERROR_MEMORY_INVALID":
                case 2:
                    m.unwindError = 2;
                    break;
                case "UNWIND_ERROR_UNWIND_INFO":
                case 3:
                    m.unwindError = 3;
                    break;
                case "UNWIND_ERROR_UNSUPPORTED":
                case 4:
                    m.unwindError = 4;
                    break;
                case "UNWIND_ERROR_INVALID_MAP":
                case 5:
                    m.unwindError = 5;
                    break;
                case "UNWIND_ERROR_MAX_FRAMES_EXCEEDED":
                case 6:
                    m.unwindError = 6;
                    break;
                case "UNWIND_ERROR_REPEATED_FRAME":
                case 7:
                    m.unwindError = 7;
                    break;
                case "UNWIND_ERROR_INVALID_ELF":
                case 8:
                    m.unwindError = 8;
                    break;
                case "UNWIND_ERROR_SYSTEM_CALL":
                case 9:
                    m.unwindError = 9;
                    break;
                case "UNWIND_ERROR_THREAD_TIMEOUT":
                case 10:
                    m.unwindError = 10;
                    break;
                case "UNWIND_ERROR_THREAD_DOES_NOT_EXIST":
                case 11:
                    m.unwindError = 11;
                    break;
                case "UNWIND_ERROR_BAD_ARCH":
                case 12:
                    m.unwindError = 12;
                    break;
                case "UNWIND_ERROR_MAPS_PARSE":
                case 13:
                    m.unwindError = 13;
                    break;
                case "UNWIND_ERROR_INVALID_PARAMETER":
                case 14:
                    m.unwindError = 14;
                    break;
                case "UNWIND_ERROR_PTRACE_CALL":
                case 15:
                    m.unwindError = 15;
                    break;
                }
                if (d.kernelRecordsLost != null) {
                    if ($util.Long)
                        (m.kernelRecordsLost = $util.Long.fromValue(d.kernelRecordsLost)).unsigned = true;
                    else if (typeof d.kernelRecordsLost === "string")
                        m.kernelRecordsLost = parseInt(d.kernelRecordsLost, 10);
                    else if (typeof d.kernelRecordsLost === "number")
                        m.kernelRecordsLost = d.kernelRecordsLost;
                    else if (typeof d.kernelRecordsLost === "object")
                        m.kernelRecordsLost = new $util.LongBits(d.kernelRecordsLost.low >>> 0, d.kernelRecordsLost.high >>> 0).toNumber(true);
                }
                switch (d.sampleSkippedReason) {
                case "PROFILER_SKIP_UNKNOWN":
                case 0:
                    m.sampleSkippedReason = 0;
                    break;
                case "PROFILER_SKIP_READ_STAGE":
                case 1:
                    m.sampleSkippedReason = 1;
                    break;
                case "PROFILER_SKIP_UNWIND_STAGE":
                case 2:
                    m.sampleSkippedReason = 2;
                    break;
                case "PROFILER_SKIP_UNWIND_ENQUEUE":
                case 3:
                    m.sampleSkippedReason = 3;
                    break;
                }
                if (d.producerEvent != null) {
                    if (typeof d.producerEvent !== "object")
                        throw TypeError(".perfetto.protos.PerfSample.producerEvent: object expected");
                    m.producerEvent = $root.perfetto.protos.PerfSample.ProducerEvent.fromObject(d.producerEvent);
                }
                return m;
            };

            /**
             * Creates a plain object from a PerfSample message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.PerfSample
             * @static
             * @param {perfetto.protos.PerfSample} m PerfSample
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            PerfSample.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.cpu = 0;
                    d.pid = 0;
                    d.tid = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.callstackIid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.callstackIid = o.longs === String ? "0" : 0;
                    d.cpuMode = o.enums === String ? "MODE_UNKNOWN" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.timebaseCount = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.timebaseCount = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.kernelRecordsLost = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.kernelRecordsLost = o.longs === String ? "0" : 0;
                    d.producerEvent = null;
                }
                if (m.cpu != null && m.hasOwnProperty("cpu")) {
                    d.cpu = m.cpu;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.tid != null && m.hasOwnProperty("tid")) {
                    d.tid = m.tid;
                }
                if (m.callstackIid != null && m.hasOwnProperty("callstackIid")) {
                    if (typeof m.callstackIid === "number")
                        d.callstackIid = o.longs === String ? String(m.callstackIid) : m.callstackIid;
                    else
                        d.callstackIid = o.longs === String ? $util.Long.prototype.toString.call(m.callstackIid) : o.longs === Number ? new $util.LongBits(m.callstackIid.low >>> 0, m.callstackIid.high >>> 0).toNumber(true) : m.callstackIid;
                }
                if (m.cpuMode != null && m.hasOwnProperty("cpuMode")) {
                    d.cpuMode = o.enums === String ? $root.perfetto.protos.Profiling.CpuMode[m.cpuMode] : m.cpuMode;
                }
                if (m.timebaseCount != null && m.hasOwnProperty("timebaseCount")) {
                    if (typeof m.timebaseCount === "number")
                        d.timebaseCount = o.longs === String ? String(m.timebaseCount) : m.timebaseCount;
                    else
                        d.timebaseCount = o.longs === String ? $util.Long.prototype.toString.call(m.timebaseCount) : o.longs === Number ? new $util.LongBits(m.timebaseCount.low >>> 0, m.timebaseCount.high >>> 0).toNumber(true) : m.timebaseCount;
                }
                if (m.unwindError != null && m.hasOwnProperty("unwindError")) {
                    d.unwindError = o.enums === String ? $root.perfetto.protos.Profiling.StackUnwindError[m.unwindError] : m.unwindError;
                    if (o.oneofs)
                        d.optionalUnwindError = "unwindError";
                }
                if (m.kernelRecordsLost != null && m.hasOwnProperty("kernelRecordsLost")) {
                    if (typeof m.kernelRecordsLost === "number")
                        d.kernelRecordsLost = o.longs === String ? String(m.kernelRecordsLost) : m.kernelRecordsLost;
                    else
                        d.kernelRecordsLost = o.longs === String ? $util.Long.prototype.toString.call(m.kernelRecordsLost) : o.longs === Number ? new $util.LongBits(m.kernelRecordsLost.low >>> 0, m.kernelRecordsLost.high >>> 0).toNumber(true) : m.kernelRecordsLost;
                }
                if (m.sampleSkippedReason != null && m.hasOwnProperty("sampleSkippedReason")) {
                    d.sampleSkippedReason = o.enums === String ? $root.perfetto.protos.PerfSample.SampleSkipReason[m.sampleSkippedReason] : m.sampleSkippedReason;
                    if (o.oneofs)
                        d.optionalSampleSkippedReason = "sampleSkippedReason";
                }
                if (m.producerEvent != null && m.hasOwnProperty("producerEvent")) {
                    d.producerEvent = $root.perfetto.protos.PerfSample.ProducerEvent.toObject(m.producerEvent, o);
                }
                return d;
            };

            /**
             * Converts this PerfSample to JSON.
             * @function toJSON
             * @memberof perfetto.protos.PerfSample
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            PerfSample.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * SampleSkipReason enum.
             * @name perfetto.protos.PerfSample.SampleSkipReason
             * @enum {number}
             * @property {number} PROFILER_SKIP_UNKNOWN=0 PROFILER_SKIP_UNKNOWN value
             * @property {number} PROFILER_SKIP_READ_STAGE=1 PROFILER_SKIP_READ_STAGE value
             * @property {number} PROFILER_SKIP_UNWIND_STAGE=2 PROFILER_SKIP_UNWIND_STAGE value
             * @property {number} PROFILER_SKIP_UNWIND_ENQUEUE=3 PROFILER_SKIP_UNWIND_ENQUEUE value
             */
            PerfSample.SampleSkipReason = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "PROFILER_SKIP_UNKNOWN"] = 0;
                values[valuesById[1] = "PROFILER_SKIP_READ_STAGE"] = 1;
                values[valuesById[2] = "PROFILER_SKIP_UNWIND_STAGE"] = 2;
                values[valuesById[3] = "PROFILER_SKIP_UNWIND_ENQUEUE"] = 3;
                return values;
            })();

            PerfSample.ProducerEvent = (function() {

                /**
                 * Properties of a ProducerEvent.
                 * @memberof perfetto.protos.PerfSample
                 * @interface IProducerEvent
                 * @property {perfetto.protos.PerfSample.ProducerEvent.DataSourceStopReason|null} [sourceStopReason] ProducerEvent sourceStopReason
                 */

                /**
                 * Constructs a new ProducerEvent.
                 * @memberof perfetto.protos.PerfSample
                 * @classdesc Represents a ProducerEvent.
                 * @implements IProducerEvent
                 * @constructor
                 * @param {perfetto.protos.PerfSample.IProducerEvent=} [p] Properties to set
                 */
                function ProducerEvent(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * ProducerEvent sourceStopReason.
                 * @member {perfetto.protos.PerfSample.ProducerEvent.DataSourceStopReason} sourceStopReason
                 * @memberof perfetto.protos.PerfSample.ProducerEvent
                 * @instance
                 */
                ProducerEvent.prototype.sourceStopReason = 0;

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * ProducerEvent optionalSourceStopReason.
                 * @member {"sourceStopReason"|undefined} optionalSourceStopReason
                 * @memberof perfetto.protos.PerfSample.ProducerEvent
                 * @instance
                 */
                Object.defineProperty(ProducerEvent.prototype, "optionalSourceStopReason", {
                    get: $util.oneOfGetter($oneOfFields = ["sourceStopReason"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new ProducerEvent instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.PerfSample.ProducerEvent
                 * @static
                 * @param {perfetto.protos.PerfSample.IProducerEvent=} [properties] Properties to set
                 * @returns {perfetto.protos.PerfSample.ProducerEvent} ProducerEvent instance
                 */
                ProducerEvent.create = function create(properties) {
                    return new ProducerEvent(properties);
                };

                /**
                 * Encodes the specified ProducerEvent message. Does not implicitly {@link perfetto.protos.PerfSample.ProducerEvent.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.PerfSample.ProducerEvent
                 * @static
                 * @param {perfetto.protos.PerfSample.IProducerEvent} m ProducerEvent message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProducerEvent.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.sourceStopReason != null && Object.hasOwnProperty.call(m, "sourceStopReason"))
                        w.uint32(8).int32(m.sourceStopReason);
                    return w;
                };

                /**
                 * Encodes the specified ProducerEvent message, length delimited. Does not implicitly {@link perfetto.protos.PerfSample.ProducerEvent.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.PerfSample.ProducerEvent
                 * @static
                 * @param {perfetto.protos.PerfSample.IProducerEvent} message ProducerEvent message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ProducerEvent.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a ProducerEvent message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.PerfSample.ProducerEvent
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.PerfSample.ProducerEvent} ProducerEvent
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProducerEvent.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.PerfSample.ProducerEvent();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.sourceStopReason = r.int32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a ProducerEvent message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.PerfSample.ProducerEvent
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.PerfSample.ProducerEvent} ProducerEvent
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ProducerEvent.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a ProducerEvent message.
                 * @function verify
                 * @memberof perfetto.protos.PerfSample.ProducerEvent
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ProducerEvent.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.sourceStopReason != null && m.hasOwnProperty("sourceStopReason")) {
                        switch (m.sourceStopReason) {
                        default:
                            return "sourceStopReason: enum value expected";
                        case 0:
                        case 1:
                            break;
                        }
                    }
                    return null;
                };

                /**
                 * Creates a ProducerEvent message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.PerfSample.ProducerEvent
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.PerfSample.ProducerEvent} ProducerEvent
                 */
                ProducerEvent.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.PerfSample.ProducerEvent)
                        return d;
                    var m = new $root.perfetto.protos.PerfSample.ProducerEvent();
                    switch (d.sourceStopReason) {
                    case "PROFILER_STOP_UNKNOWN":
                    case 0:
                        m.sourceStopReason = 0;
                        break;
                    case "PROFILER_STOP_GUARDRAIL":
                    case 1:
                        m.sourceStopReason = 1;
                        break;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a ProducerEvent message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.PerfSample.ProducerEvent
                 * @static
                 * @param {perfetto.protos.PerfSample.ProducerEvent} m ProducerEvent
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ProducerEvent.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (m.sourceStopReason != null && m.hasOwnProperty("sourceStopReason")) {
                        d.sourceStopReason = o.enums === String ? $root.perfetto.protos.PerfSample.ProducerEvent.DataSourceStopReason[m.sourceStopReason] : m.sourceStopReason;
                        if (o.oneofs)
                            d.optionalSourceStopReason = "sourceStopReason";
                    }
                    return d;
                };

                /**
                 * Converts this ProducerEvent to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.PerfSample.ProducerEvent
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ProducerEvent.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                /**
                 * DataSourceStopReason enum.
                 * @name perfetto.protos.PerfSample.ProducerEvent.DataSourceStopReason
                 * @enum {number}
                 * @property {number} PROFILER_STOP_UNKNOWN=0 PROFILER_STOP_UNKNOWN value
                 * @property {number} PROFILER_STOP_GUARDRAIL=1 PROFILER_STOP_GUARDRAIL value
                 */
                ProducerEvent.DataSourceStopReason = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "PROFILER_STOP_UNKNOWN"] = 0;
                    values[valuesById[1] = "PROFILER_STOP_GUARDRAIL"] = 1;
                    return values;
                })();

                return ProducerEvent;
            })();

            return PerfSample;
        })();

        protos.PerfSampleDefaults = (function() {

            /**
             * Properties of a PerfSampleDefaults.
             * @memberof perfetto.protos
             * @interface IPerfSampleDefaults
             * @property {perfetto.protos.PerfEvents.ITimebase|null} [timebase] PerfSampleDefaults timebase
             * @property {number|null} [processShardCount] PerfSampleDefaults processShardCount
             * @property {number|null} [chosenProcessShard] PerfSampleDefaults chosenProcessShard
             */

            /**
             * Constructs a new PerfSampleDefaults.
             * @memberof perfetto.protos
             * @classdesc Represents a PerfSampleDefaults.
             * @implements IPerfSampleDefaults
             * @constructor
             * @param {perfetto.protos.IPerfSampleDefaults=} [p] Properties to set
             */
            function PerfSampleDefaults(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * PerfSampleDefaults timebase.
             * @member {perfetto.protos.PerfEvents.ITimebase|null|undefined} timebase
             * @memberof perfetto.protos.PerfSampleDefaults
             * @instance
             */
            PerfSampleDefaults.prototype.timebase = null;

            /**
             * PerfSampleDefaults processShardCount.
             * @member {number} processShardCount
             * @memberof perfetto.protos.PerfSampleDefaults
             * @instance
             */
            PerfSampleDefaults.prototype.processShardCount = 0;

            /**
             * PerfSampleDefaults chosenProcessShard.
             * @member {number} chosenProcessShard
             * @memberof perfetto.protos.PerfSampleDefaults
             * @instance
             */
            PerfSampleDefaults.prototype.chosenProcessShard = 0;

            /**
             * Creates a new PerfSampleDefaults instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.PerfSampleDefaults
             * @static
             * @param {perfetto.protos.IPerfSampleDefaults=} [properties] Properties to set
             * @returns {perfetto.protos.PerfSampleDefaults} PerfSampleDefaults instance
             */
            PerfSampleDefaults.create = function create(properties) {
                return new PerfSampleDefaults(properties);
            };

            /**
             * Encodes the specified PerfSampleDefaults message. Does not implicitly {@link perfetto.protos.PerfSampleDefaults.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.PerfSampleDefaults
             * @static
             * @param {perfetto.protos.IPerfSampleDefaults} m PerfSampleDefaults message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PerfSampleDefaults.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.timebase != null && Object.hasOwnProperty.call(m, "timebase"))
                    $root.perfetto.protos.PerfEvents.Timebase.encode(m.timebase, w.uint32(10).fork()).ldelim();
                if (m.processShardCount != null && Object.hasOwnProperty.call(m, "processShardCount"))
                    w.uint32(16).uint32(m.processShardCount);
                if (m.chosenProcessShard != null && Object.hasOwnProperty.call(m, "chosenProcessShard"))
                    w.uint32(24).uint32(m.chosenProcessShard);
                return w;
            };

            /**
             * Encodes the specified PerfSampleDefaults message, length delimited. Does not implicitly {@link perfetto.protos.PerfSampleDefaults.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.PerfSampleDefaults
             * @static
             * @param {perfetto.protos.IPerfSampleDefaults} message PerfSampleDefaults message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            PerfSampleDefaults.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a PerfSampleDefaults message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.PerfSampleDefaults
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.PerfSampleDefaults} PerfSampleDefaults
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PerfSampleDefaults.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.PerfSampleDefaults();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.timebase = $root.perfetto.protos.PerfEvents.Timebase.decode(r, r.uint32());
                        break;
                    case 2:
                        m.processShardCount = r.uint32();
                        break;
                    case 3:
                        m.chosenProcessShard = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a PerfSampleDefaults message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.PerfSampleDefaults
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.PerfSampleDefaults} PerfSampleDefaults
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            PerfSampleDefaults.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a PerfSampleDefaults message.
             * @function verify
             * @memberof perfetto.protos.PerfSampleDefaults
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            PerfSampleDefaults.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.timebase != null && m.hasOwnProperty("timebase")) {
                    {
                        var e = $root.perfetto.protos.PerfEvents.Timebase.verify(m.timebase);
                        if (e)
                            return "timebase." + e;
                    }
                }
                if (m.processShardCount != null && m.hasOwnProperty("processShardCount")) {
                    if (!$util.isInteger(m.processShardCount))
                        return "processShardCount: integer expected";
                }
                if (m.chosenProcessShard != null && m.hasOwnProperty("chosenProcessShard")) {
                    if (!$util.isInteger(m.chosenProcessShard))
                        return "chosenProcessShard: integer expected";
                }
                return null;
            };

            /**
             * Creates a PerfSampleDefaults message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.PerfSampleDefaults
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.PerfSampleDefaults} PerfSampleDefaults
             */
            PerfSampleDefaults.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.PerfSampleDefaults)
                    return d;
                var m = new $root.perfetto.protos.PerfSampleDefaults();
                if (d.timebase != null) {
                    if (typeof d.timebase !== "object")
                        throw TypeError(".perfetto.protos.PerfSampleDefaults.timebase: object expected");
                    m.timebase = $root.perfetto.protos.PerfEvents.Timebase.fromObject(d.timebase);
                }
                if (d.processShardCount != null) {
                    m.processShardCount = d.processShardCount >>> 0;
                }
                if (d.chosenProcessShard != null) {
                    m.chosenProcessShard = d.chosenProcessShard >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a PerfSampleDefaults message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.PerfSampleDefaults
             * @static
             * @param {perfetto.protos.PerfSampleDefaults} m PerfSampleDefaults
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            PerfSampleDefaults.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.timebase = null;
                    d.processShardCount = 0;
                    d.chosenProcessShard = 0;
                }
                if (m.timebase != null && m.hasOwnProperty("timebase")) {
                    d.timebase = $root.perfetto.protos.PerfEvents.Timebase.toObject(m.timebase, o);
                }
                if (m.processShardCount != null && m.hasOwnProperty("processShardCount")) {
                    d.processShardCount = m.processShardCount;
                }
                if (m.chosenProcessShard != null && m.hasOwnProperty("chosenProcessShard")) {
                    d.chosenProcessShard = m.chosenProcessShard;
                }
                return d;
            };

            /**
             * Converts this PerfSampleDefaults to JSON.
             * @function toJSON
             * @memberof perfetto.protos.PerfSampleDefaults
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            PerfSampleDefaults.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return PerfSampleDefaults;
        })();

        protos.SmapsEntry = (function() {

            /**
             * Properties of a SmapsEntry.
             * @memberof perfetto.protos
             * @interface ISmapsEntry
             * @property {string|null} [path] SmapsEntry path
             * @property {number|null} [sizeKb] SmapsEntry sizeKb
             * @property {number|null} [privateDirtyKb] SmapsEntry privateDirtyKb
             * @property {number|null} [swapKb] SmapsEntry swapKb
             * @property {string|null} [fileName] SmapsEntry fileName
             * @property {number|null} [startAddress] SmapsEntry startAddress
             * @property {number|null} [moduleTimestamp] SmapsEntry moduleTimestamp
             * @property {string|null} [moduleDebugid] SmapsEntry moduleDebugid
             * @property {string|null} [moduleDebugPath] SmapsEntry moduleDebugPath
             * @property {number|null} [protectionFlags] SmapsEntry protectionFlags
             * @property {number|null} [privateCleanResidentKb] SmapsEntry privateCleanResidentKb
             * @property {number|null} [sharedDirtyResidentKb] SmapsEntry sharedDirtyResidentKb
             * @property {number|null} [sharedCleanResidentKb] SmapsEntry sharedCleanResidentKb
             * @property {number|null} [lockedKb] SmapsEntry lockedKb
             * @property {number|null} [proportionalResidentKb] SmapsEntry proportionalResidentKb
             */

            /**
             * Constructs a new SmapsEntry.
             * @memberof perfetto.protos
             * @classdesc Represents a SmapsEntry.
             * @implements ISmapsEntry
             * @constructor
             * @param {perfetto.protos.ISmapsEntry=} [p] Properties to set
             */
            function SmapsEntry(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SmapsEntry path.
             * @member {string} path
             * @memberof perfetto.protos.SmapsEntry
             * @instance
             */
            SmapsEntry.prototype.path = "";

            /**
             * SmapsEntry sizeKb.
             * @member {number} sizeKb
             * @memberof perfetto.protos.SmapsEntry
             * @instance
             */
            SmapsEntry.prototype.sizeKb = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SmapsEntry privateDirtyKb.
             * @member {number} privateDirtyKb
             * @memberof perfetto.protos.SmapsEntry
             * @instance
             */
            SmapsEntry.prototype.privateDirtyKb = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SmapsEntry swapKb.
             * @member {number} swapKb
             * @memberof perfetto.protos.SmapsEntry
             * @instance
             */
            SmapsEntry.prototype.swapKb = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SmapsEntry fileName.
             * @member {string} fileName
             * @memberof perfetto.protos.SmapsEntry
             * @instance
             */
            SmapsEntry.prototype.fileName = "";

            /**
             * SmapsEntry startAddress.
             * @member {number} startAddress
             * @memberof perfetto.protos.SmapsEntry
             * @instance
             */
            SmapsEntry.prototype.startAddress = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SmapsEntry moduleTimestamp.
             * @member {number} moduleTimestamp
             * @memberof perfetto.protos.SmapsEntry
             * @instance
             */
            SmapsEntry.prototype.moduleTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SmapsEntry moduleDebugid.
             * @member {string} moduleDebugid
             * @memberof perfetto.protos.SmapsEntry
             * @instance
             */
            SmapsEntry.prototype.moduleDebugid = "";

            /**
             * SmapsEntry moduleDebugPath.
             * @member {string} moduleDebugPath
             * @memberof perfetto.protos.SmapsEntry
             * @instance
             */
            SmapsEntry.prototype.moduleDebugPath = "";

            /**
             * SmapsEntry protectionFlags.
             * @member {number} protectionFlags
             * @memberof perfetto.protos.SmapsEntry
             * @instance
             */
            SmapsEntry.prototype.protectionFlags = 0;

            /**
             * SmapsEntry privateCleanResidentKb.
             * @member {number} privateCleanResidentKb
             * @memberof perfetto.protos.SmapsEntry
             * @instance
             */
            SmapsEntry.prototype.privateCleanResidentKb = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SmapsEntry sharedDirtyResidentKb.
             * @member {number} sharedDirtyResidentKb
             * @memberof perfetto.protos.SmapsEntry
             * @instance
             */
            SmapsEntry.prototype.sharedDirtyResidentKb = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SmapsEntry sharedCleanResidentKb.
             * @member {number} sharedCleanResidentKb
             * @memberof perfetto.protos.SmapsEntry
             * @instance
             */
            SmapsEntry.prototype.sharedCleanResidentKb = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SmapsEntry lockedKb.
             * @member {number} lockedKb
             * @memberof perfetto.protos.SmapsEntry
             * @instance
             */
            SmapsEntry.prototype.lockedKb = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SmapsEntry proportionalResidentKb.
             * @member {number} proportionalResidentKb
             * @memberof perfetto.protos.SmapsEntry
             * @instance
             */
            SmapsEntry.prototype.proportionalResidentKb = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new SmapsEntry instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SmapsEntry
             * @static
             * @param {perfetto.protos.ISmapsEntry=} [properties] Properties to set
             * @returns {perfetto.protos.SmapsEntry} SmapsEntry instance
             */
            SmapsEntry.create = function create(properties) {
                return new SmapsEntry(properties);
            };

            /**
             * Encodes the specified SmapsEntry message. Does not implicitly {@link perfetto.protos.SmapsEntry.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SmapsEntry
             * @static
             * @param {perfetto.protos.ISmapsEntry} m SmapsEntry message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SmapsEntry.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.path != null && Object.hasOwnProperty.call(m, "path"))
                    w.uint32(10).string(m.path);
                if (m.sizeKb != null && Object.hasOwnProperty.call(m, "sizeKb"))
                    w.uint32(16).uint64(m.sizeKb);
                if (m.privateDirtyKb != null && Object.hasOwnProperty.call(m, "privateDirtyKb"))
                    w.uint32(24).uint64(m.privateDirtyKb);
                if (m.swapKb != null && Object.hasOwnProperty.call(m, "swapKb"))
                    w.uint32(32).uint64(m.swapKb);
                if (m.fileName != null && Object.hasOwnProperty.call(m, "fileName"))
                    w.uint32(42).string(m.fileName);
                if (m.startAddress != null && Object.hasOwnProperty.call(m, "startAddress"))
                    w.uint32(48).uint64(m.startAddress);
                if (m.moduleTimestamp != null && Object.hasOwnProperty.call(m, "moduleTimestamp"))
                    w.uint32(56).uint64(m.moduleTimestamp);
                if (m.moduleDebugid != null && Object.hasOwnProperty.call(m, "moduleDebugid"))
                    w.uint32(66).string(m.moduleDebugid);
                if (m.moduleDebugPath != null && Object.hasOwnProperty.call(m, "moduleDebugPath"))
                    w.uint32(74).string(m.moduleDebugPath);
                if (m.protectionFlags != null && Object.hasOwnProperty.call(m, "protectionFlags"))
                    w.uint32(80).uint32(m.protectionFlags);
                if (m.privateCleanResidentKb != null && Object.hasOwnProperty.call(m, "privateCleanResidentKb"))
                    w.uint32(88).uint64(m.privateCleanResidentKb);
                if (m.sharedDirtyResidentKb != null && Object.hasOwnProperty.call(m, "sharedDirtyResidentKb"))
                    w.uint32(96).uint64(m.sharedDirtyResidentKb);
                if (m.sharedCleanResidentKb != null && Object.hasOwnProperty.call(m, "sharedCleanResidentKb"))
                    w.uint32(104).uint64(m.sharedCleanResidentKb);
                if (m.lockedKb != null && Object.hasOwnProperty.call(m, "lockedKb"))
                    w.uint32(112).uint64(m.lockedKb);
                if (m.proportionalResidentKb != null && Object.hasOwnProperty.call(m, "proportionalResidentKb"))
                    w.uint32(120).uint64(m.proportionalResidentKb);
                return w;
            };

            /**
             * Encodes the specified SmapsEntry message, length delimited. Does not implicitly {@link perfetto.protos.SmapsEntry.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SmapsEntry
             * @static
             * @param {perfetto.protos.ISmapsEntry} message SmapsEntry message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SmapsEntry.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SmapsEntry message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SmapsEntry
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SmapsEntry} SmapsEntry
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SmapsEntry.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SmapsEntry();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.path = r.string();
                        break;
                    case 2:
                        m.sizeKb = r.uint64();
                        break;
                    case 3:
                        m.privateDirtyKb = r.uint64();
                        break;
                    case 4:
                        m.swapKb = r.uint64();
                        break;
                    case 5:
                        m.fileName = r.string();
                        break;
                    case 6:
                        m.startAddress = r.uint64();
                        break;
                    case 7:
                        m.moduleTimestamp = r.uint64();
                        break;
                    case 8:
                        m.moduleDebugid = r.string();
                        break;
                    case 9:
                        m.moduleDebugPath = r.string();
                        break;
                    case 10:
                        m.protectionFlags = r.uint32();
                        break;
                    case 11:
                        m.privateCleanResidentKb = r.uint64();
                        break;
                    case 12:
                        m.sharedDirtyResidentKb = r.uint64();
                        break;
                    case 13:
                        m.sharedCleanResidentKb = r.uint64();
                        break;
                    case 14:
                        m.lockedKb = r.uint64();
                        break;
                    case 15:
                        m.proportionalResidentKb = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SmapsEntry message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SmapsEntry
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SmapsEntry} SmapsEntry
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SmapsEntry.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SmapsEntry message.
             * @function verify
             * @memberof perfetto.protos.SmapsEntry
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SmapsEntry.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.path != null && m.hasOwnProperty("path")) {
                    if (!$util.isString(m.path))
                        return "path: string expected";
                }
                if (m.sizeKb != null && m.hasOwnProperty("sizeKb")) {
                    if (!$util.isInteger(m.sizeKb) && !(m.sizeKb && $util.isInteger(m.sizeKb.low) && $util.isInteger(m.sizeKb.high)))
                        return "sizeKb: integer|Long expected";
                }
                if (m.privateDirtyKb != null && m.hasOwnProperty("privateDirtyKb")) {
                    if (!$util.isInteger(m.privateDirtyKb) && !(m.privateDirtyKb && $util.isInteger(m.privateDirtyKb.low) && $util.isInteger(m.privateDirtyKb.high)))
                        return "privateDirtyKb: integer|Long expected";
                }
                if (m.swapKb != null && m.hasOwnProperty("swapKb")) {
                    if (!$util.isInteger(m.swapKb) && !(m.swapKb && $util.isInteger(m.swapKb.low) && $util.isInteger(m.swapKb.high)))
                        return "swapKb: integer|Long expected";
                }
                if (m.fileName != null && m.hasOwnProperty("fileName")) {
                    if (!$util.isString(m.fileName))
                        return "fileName: string expected";
                }
                if (m.startAddress != null && m.hasOwnProperty("startAddress")) {
                    if (!$util.isInteger(m.startAddress) && !(m.startAddress && $util.isInteger(m.startAddress.low) && $util.isInteger(m.startAddress.high)))
                        return "startAddress: integer|Long expected";
                }
                if (m.moduleTimestamp != null && m.hasOwnProperty("moduleTimestamp")) {
                    if (!$util.isInteger(m.moduleTimestamp) && !(m.moduleTimestamp && $util.isInteger(m.moduleTimestamp.low) && $util.isInteger(m.moduleTimestamp.high)))
                        return "moduleTimestamp: integer|Long expected";
                }
                if (m.moduleDebugid != null && m.hasOwnProperty("moduleDebugid")) {
                    if (!$util.isString(m.moduleDebugid))
                        return "moduleDebugid: string expected";
                }
                if (m.moduleDebugPath != null && m.hasOwnProperty("moduleDebugPath")) {
                    if (!$util.isString(m.moduleDebugPath))
                        return "moduleDebugPath: string expected";
                }
                if (m.protectionFlags != null && m.hasOwnProperty("protectionFlags")) {
                    if (!$util.isInteger(m.protectionFlags))
                        return "protectionFlags: integer expected";
                }
                if (m.privateCleanResidentKb != null && m.hasOwnProperty("privateCleanResidentKb")) {
                    if (!$util.isInteger(m.privateCleanResidentKb) && !(m.privateCleanResidentKb && $util.isInteger(m.privateCleanResidentKb.low) && $util.isInteger(m.privateCleanResidentKb.high)))
                        return "privateCleanResidentKb: integer|Long expected";
                }
                if (m.sharedDirtyResidentKb != null && m.hasOwnProperty("sharedDirtyResidentKb")) {
                    if (!$util.isInteger(m.sharedDirtyResidentKb) && !(m.sharedDirtyResidentKb && $util.isInteger(m.sharedDirtyResidentKb.low) && $util.isInteger(m.sharedDirtyResidentKb.high)))
                        return "sharedDirtyResidentKb: integer|Long expected";
                }
                if (m.sharedCleanResidentKb != null && m.hasOwnProperty("sharedCleanResidentKb")) {
                    if (!$util.isInteger(m.sharedCleanResidentKb) && !(m.sharedCleanResidentKb && $util.isInteger(m.sharedCleanResidentKb.low) && $util.isInteger(m.sharedCleanResidentKb.high)))
                        return "sharedCleanResidentKb: integer|Long expected";
                }
                if (m.lockedKb != null && m.hasOwnProperty("lockedKb")) {
                    if (!$util.isInteger(m.lockedKb) && !(m.lockedKb && $util.isInteger(m.lockedKb.low) && $util.isInteger(m.lockedKb.high)))
                        return "lockedKb: integer|Long expected";
                }
                if (m.proportionalResidentKb != null && m.hasOwnProperty("proportionalResidentKb")) {
                    if (!$util.isInteger(m.proportionalResidentKb) && !(m.proportionalResidentKb && $util.isInteger(m.proportionalResidentKb.low) && $util.isInteger(m.proportionalResidentKb.high)))
                        return "proportionalResidentKb: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a SmapsEntry message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SmapsEntry
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SmapsEntry} SmapsEntry
             */
            SmapsEntry.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SmapsEntry)
                    return d;
                var m = new $root.perfetto.protos.SmapsEntry();
                if (d.path != null) {
                    m.path = String(d.path);
                }
                if (d.sizeKb != null) {
                    if ($util.Long)
                        (m.sizeKb = $util.Long.fromValue(d.sizeKb)).unsigned = true;
                    else if (typeof d.sizeKb === "string")
                        m.sizeKb = parseInt(d.sizeKb, 10);
                    else if (typeof d.sizeKb === "number")
                        m.sizeKb = d.sizeKb;
                    else if (typeof d.sizeKb === "object")
                        m.sizeKb = new $util.LongBits(d.sizeKb.low >>> 0, d.sizeKb.high >>> 0).toNumber(true);
                }
                if (d.privateDirtyKb != null) {
                    if ($util.Long)
                        (m.privateDirtyKb = $util.Long.fromValue(d.privateDirtyKb)).unsigned = true;
                    else if (typeof d.privateDirtyKb === "string")
                        m.privateDirtyKb = parseInt(d.privateDirtyKb, 10);
                    else if (typeof d.privateDirtyKb === "number")
                        m.privateDirtyKb = d.privateDirtyKb;
                    else if (typeof d.privateDirtyKb === "object")
                        m.privateDirtyKb = new $util.LongBits(d.privateDirtyKb.low >>> 0, d.privateDirtyKb.high >>> 0).toNumber(true);
                }
                if (d.swapKb != null) {
                    if ($util.Long)
                        (m.swapKb = $util.Long.fromValue(d.swapKb)).unsigned = true;
                    else if (typeof d.swapKb === "string")
                        m.swapKb = parseInt(d.swapKb, 10);
                    else if (typeof d.swapKb === "number")
                        m.swapKb = d.swapKb;
                    else if (typeof d.swapKb === "object")
                        m.swapKb = new $util.LongBits(d.swapKb.low >>> 0, d.swapKb.high >>> 0).toNumber(true);
                }
                if (d.fileName != null) {
                    m.fileName = String(d.fileName);
                }
                if (d.startAddress != null) {
                    if ($util.Long)
                        (m.startAddress = $util.Long.fromValue(d.startAddress)).unsigned = true;
                    else if (typeof d.startAddress === "string")
                        m.startAddress = parseInt(d.startAddress, 10);
                    else if (typeof d.startAddress === "number")
                        m.startAddress = d.startAddress;
                    else if (typeof d.startAddress === "object")
                        m.startAddress = new $util.LongBits(d.startAddress.low >>> 0, d.startAddress.high >>> 0).toNumber(true);
                }
                if (d.moduleTimestamp != null) {
                    if ($util.Long)
                        (m.moduleTimestamp = $util.Long.fromValue(d.moduleTimestamp)).unsigned = true;
                    else if (typeof d.moduleTimestamp === "string")
                        m.moduleTimestamp = parseInt(d.moduleTimestamp, 10);
                    else if (typeof d.moduleTimestamp === "number")
                        m.moduleTimestamp = d.moduleTimestamp;
                    else if (typeof d.moduleTimestamp === "object")
                        m.moduleTimestamp = new $util.LongBits(d.moduleTimestamp.low >>> 0, d.moduleTimestamp.high >>> 0).toNumber(true);
                }
                if (d.moduleDebugid != null) {
                    m.moduleDebugid = String(d.moduleDebugid);
                }
                if (d.moduleDebugPath != null) {
                    m.moduleDebugPath = String(d.moduleDebugPath);
                }
                if (d.protectionFlags != null) {
                    m.protectionFlags = d.protectionFlags >>> 0;
                }
                if (d.privateCleanResidentKb != null) {
                    if ($util.Long)
                        (m.privateCleanResidentKb = $util.Long.fromValue(d.privateCleanResidentKb)).unsigned = true;
                    else if (typeof d.privateCleanResidentKb === "string")
                        m.privateCleanResidentKb = parseInt(d.privateCleanResidentKb, 10);
                    else if (typeof d.privateCleanResidentKb === "number")
                        m.privateCleanResidentKb = d.privateCleanResidentKb;
                    else if (typeof d.privateCleanResidentKb === "object")
                        m.privateCleanResidentKb = new $util.LongBits(d.privateCleanResidentKb.low >>> 0, d.privateCleanResidentKb.high >>> 0).toNumber(true);
                }
                if (d.sharedDirtyResidentKb != null) {
                    if ($util.Long)
                        (m.sharedDirtyResidentKb = $util.Long.fromValue(d.sharedDirtyResidentKb)).unsigned = true;
                    else if (typeof d.sharedDirtyResidentKb === "string")
                        m.sharedDirtyResidentKb = parseInt(d.sharedDirtyResidentKb, 10);
                    else if (typeof d.sharedDirtyResidentKb === "number")
                        m.sharedDirtyResidentKb = d.sharedDirtyResidentKb;
                    else if (typeof d.sharedDirtyResidentKb === "object")
                        m.sharedDirtyResidentKb = new $util.LongBits(d.sharedDirtyResidentKb.low >>> 0, d.sharedDirtyResidentKb.high >>> 0).toNumber(true);
                }
                if (d.sharedCleanResidentKb != null) {
                    if ($util.Long)
                        (m.sharedCleanResidentKb = $util.Long.fromValue(d.sharedCleanResidentKb)).unsigned = true;
                    else if (typeof d.sharedCleanResidentKb === "string")
                        m.sharedCleanResidentKb = parseInt(d.sharedCleanResidentKb, 10);
                    else if (typeof d.sharedCleanResidentKb === "number")
                        m.sharedCleanResidentKb = d.sharedCleanResidentKb;
                    else if (typeof d.sharedCleanResidentKb === "object")
                        m.sharedCleanResidentKb = new $util.LongBits(d.sharedCleanResidentKb.low >>> 0, d.sharedCleanResidentKb.high >>> 0).toNumber(true);
                }
                if (d.lockedKb != null) {
                    if ($util.Long)
                        (m.lockedKb = $util.Long.fromValue(d.lockedKb)).unsigned = true;
                    else if (typeof d.lockedKb === "string")
                        m.lockedKb = parseInt(d.lockedKb, 10);
                    else if (typeof d.lockedKb === "number")
                        m.lockedKb = d.lockedKb;
                    else if (typeof d.lockedKb === "object")
                        m.lockedKb = new $util.LongBits(d.lockedKb.low >>> 0, d.lockedKb.high >>> 0).toNumber(true);
                }
                if (d.proportionalResidentKb != null) {
                    if ($util.Long)
                        (m.proportionalResidentKb = $util.Long.fromValue(d.proportionalResidentKb)).unsigned = true;
                    else if (typeof d.proportionalResidentKb === "string")
                        m.proportionalResidentKb = parseInt(d.proportionalResidentKb, 10);
                    else if (typeof d.proportionalResidentKb === "number")
                        m.proportionalResidentKb = d.proportionalResidentKb;
                    else if (typeof d.proportionalResidentKb === "object")
                        m.proportionalResidentKb = new $util.LongBits(d.proportionalResidentKb.low >>> 0, d.proportionalResidentKb.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a SmapsEntry message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SmapsEntry
             * @static
             * @param {perfetto.protos.SmapsEntry} m SmapsEntry
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SmapsEntry.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.path = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sizeKb = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sizeKb = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.privateDirtyKb = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.privateDirtyKb = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.swapKb = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.swapKb = o.longs === String ? "0" : 0;
                    d.fileName = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.startAddress = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.startAddress = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.moduleTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.moduleTimestamp = o.longs === String ? "0" : 0;
                    d.moduleDebugid = "";
                    d.moduleDebugPath = "";
                    d.protectionFlags = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.privateCleanResidentKb = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.privateCleanResidentKb = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sharedDirtyResidentKb = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sharedDirtyResidentKb = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.sharedCleanResidentKb = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.sharedCleanResidentKb = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.lockedKb = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.lockedKb = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.proportionalResidentKb = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.proportionalResidentKb = o.longs === String ? "0" : 0;
                }
                if (m.path != null && m.hasOwnProperty("path")) {
                    d.path = m.path;
                }
                if (m.sizeKb != null && m.hasOwnProperty("sizeKb")) {
                    if (typeof m.sizeKb === "number")
                        d.sizeKb = o.longs === String ? String(m.sizeKb) : m.sizeKb;
                    else
                        d.sizeKb = o.longs === String ? $util.Long.prototype.toString.call(m.sizeKb) : o.longs === Number ? new $util.LongBits(m.sizeKb.low >>> 0, m.sizeKb.high >>> 0).toNumber(true) : m.sizeKb;
                }
                if (m.privateDirtyKb != null && m.hasOwnProperty("privateDirtyKb")) {
                    if (typeof m.privateDirtyKb === "number")
                        d.privateDirtyKb = o.longs === String ? String(m.privateDirtyKb) : m.privateDirtyKb;
                    else
                        d.privateDirtyKb = o.longs === String ? $util.Long.prototype.toString.call(m.privateDirtyKb) : o.longs === Number ? new $util.LongBits(m.privateDirtyKb.low >>> 0, m.privateDirtyKb.high >>> 0).toNumber(true) : m.privateDirtyKb;
                }
                if (m.swapKb != null && m.hasOwnProperty("swapKb")) {
                    if (typeof m.swapKb === "number")
                        d.swapKb = o.longs === String ? String(m.swapKb) : m.swapKb;
                    else
                        d.swapKb = o.longs === String ? $util.Long.prototype.toString.call(m.swapKb) : o.longs === Number ? new $util.LongBits(m.swapKb.low >>> 0, m.swapKb.high >>> 0).toNumber(true) : m.swapKb;
                }
                if (m.fileName != null && m.hasOwnProperty("fileName")) {
                    d.fileName = m.fileName;
                }
                if (m.startAddress != null && m.hasOwnProperty("startAddress")) {
                    if (typeof m.startAddress === "number")
                        d.startAddress = o.longs === String ? String(m.startAddress) : m.startAddress;
                    else
                        d.startAddress = o.longs === String ? $util.Long.prototype.toString.call(m.startAddress) : o.longs === Number ? new $util.LongBits(m.startAddress.low >>> 0, m.startAddress.high >>> 0).toNumber(true) : m.startAddress;
                }
                if (m.moduleTimestamp != null && m.hasOwnProperty("moduleTimestamp")) {
                    if (typeof m.moduleTimestamp === "number")
                        d.moduleTimestamp = o.longs === String ? String(m.moduleTimestamp) : m.moduleTimestamp;
                    else
                        d.moduleTimestamp = o.longs === String ? $util.Long.prototype.toString.call(m.moduleTimestamp) : o.longs === Number ? new $util.LongBits(m.moduleTimestamp.low >>> 0, m.moduleTimestamp.high >>> 0).toNumber(true) : m.moduleTimestamp;
                }
                if (m.moduleDebugid != null && m.hasOwnProperty("moduleDebugid")) {
                    d.moduleDebugid = m.moduleDebugid;
                }
                if (m.moduleDebugPath != null && m.hasOwnProperty("moduleDebugPath")) {
                    d.moduleDebugPath = m.moduleDebugPath;
                }
                if (m.protectionFlags != null && m.hasOwnProperty("protectionFlags")) {
                    d.protectionFlags = m.protectionFlags;
                }
                if (m.privateCleanResidentKb != null && m.hasOwnProperty("privateCleanResidentKb")) {
                    if (typeof m.privateCleanResidentKb === "number")
                        d.privateCleanResidentKb = o.longs === String ? String(m.privateCleanResidentKb) : m.privateCleanResidentKb;
                    else
                        d.privateCleanResidentKb = o.longs === String ? $util.Long.prototype.toString.call(m.privateCleanResidentKb) : o.longs === Number ? new $util.LongBits(m.privateCleanResidentKb.low >>> 0, m.privateCleanResidentKb.high >>> 0).toNumber(true) : m.privateCleanResidentKb;
                }
                if (m.sharedDirtyResidentKb != null && m.hasOwnProperty("sharedDirtyResidentKb")) {
                    if (typeof m.sharedDirtyResidentKb === "number")
                        d.sharedDirtyResidentKb = o.longs === String ? String(m.sharedDirtyResidentKb) : m.sharedDirtyResidentKb;
                    else
                        d.sharedDirtyResidentKb = o.longs === String ? $util.Long.prototype.toString.call(m.sharedDirtyResidentKb) : o.longs === Number ? new $util.LongBits(m.sharedDirtyResidentKb.low >>> 0, m.sharedDirtyResidentKb.high >>> 0).toNumber(true) : m.sharedDirtyResidentKb;
                }
                if (m.sharedCleanResidentKb != null && m.hasOwnProperty("sharedCleanResidentKb")) {
                    if (typeof m.sharedCleanResidentKb === "number")
                        d.sharedCleanResidentKb = o.longs === String ? String(m.sharedCleanResidentKb) : m.sharedCleanResidentKb;
                    else
                        d.sharedCleanResidentKb = o.longs === String ? $util.Long.prototype.toString.call(m.sharedCleanResidentKb) : o.longs === Number ? new $util.LongBits(m.sharedCleanResidentKb.low >>> 0, m.sharedCleanResidentKb.high >>> 0).toNumber(true) : m.sharedCleanResidentKb;
                }
                if (m.lockedKb != null && m.hasOwnProperty("lockedKb")) {
                    if (typeof m.lockedKb === "number")
                        d.lockedKb = o.longs === String ? String(m.lockedKb) : m.lockedKb;
                    else
                        d.lockedKb = o.longs === String ? $util.Long.prototype.toString.call(m.lockedKb) : o.longs === Number ? new $util.LongBits(m.lockedKb.low >>> 0, m.lockedKb.high >>> 0).toNumber(true) : m.lockedKb;
                }
                if (m.proportionalResidentKb != null && m.hasOwnProperty("proportionalResidentKb")) {
                    if (typeof m.proportionalResidentKb === "number")
                        d.proportionalResidentKb = o.longs === String ? String(m.proportionalResidentKb) : m.proportionalResidentKb;
                    else
                        d.proportionalResidentKb = o.longs === String ? $util.Long.prototype.toString.call(m.proportionalResidentKb) : o.longs === Number ? new $util.LongBits(m.proportionalResidentKb.low >>> 0, m.proportionalResidentKb.high >>> 0).toNumber(true) : m.proportionalResidentKb;
                }
                return d;
            };

            /**
             * Converts this SmapsEntry to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SmapsEntry
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SmapsEntry.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SmapsEntry;
        })();

        protos.SmapsPacket = (function() {

            /**
             * Properties of a SmapsPacket.
             * @memberof perfetto.protos
             * @interface ISmapsPacket
             * @property {number|null} [pid] SmapsPacket pid
             * @property {Array.<perfetto.protos.ISmapsEntry>|null} [entries] SmapsPacket entries
             */

            /**
             * Constructs a new SmapsPacket.
             * @memberof perfetto.protos
             * @classdesc Represents a SmapsPacket.
             * @implements ISmapsPacket
             * @constructor
             * @param {perfetto.protos.ISmapsPacket=} [p] Properties to set
             */
            function SmapsPacket(p) {
                this.entries = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SmapsPacket pid.
             * @member {number} pid
             * @memberof perfetto.protos.SmapsPacket
             * @instance
             */
            SmapsPacket.prototype.pid = 0;

            /**
             * SmapsPacket entries.
             * @member {Array.<perfetto.protos.ISmapsEntry>} entries
             * @memberof perfetto.protos.SmapsPacket
             * @instance
             */
            SmapsPacket.prototype.entries = $util.emptyArray;

            /**
             * Creates a new SmapsPacket instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SmapsPacket
             * @static
             * @param {perfetto.protos.ISmapsPacket=} [properties] Properties to set
             * @returns {perfetto.protos.SmapsPacket} SmapsPacket instance
             */
            SmapsPacket.create = function create(properties) {
                return new SmapsPacket(properties);
            };

            /**
             * Encodes the specified SmapsPacket message. Does not implicitly {@link perfetto.protos.SmapsPacket.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SmapsPacket
             * @static
             * @param {perfetto.protos.ISmapsPacket} m SmapsPacket message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SmapsPacket.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(8).uint32(m.pid);
                if (m.entries != null && m.entries.length) {
                    for (var i = 0; i < m.entries.length; ++i)
                        $root.perfetto.protos.SmapsEntry.encode(m.entries[i], w.uint32(18).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified SmapsPacket message, length delimited. Does not implicitly {@link perfetto.protos.SmapsPacket.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SmapsPacket
             * @static
             * @param {perfetto.protos.ISmapsPacket} message SmapsPacket message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SmapsPacket.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SmapsPacket message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SmapsPacket
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SmapsPacket} SmapsPacket
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SmapsPacket.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SmapsPacket();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.pid = r.uint32();
                        break;
                    case 2:
                        if (!(m.entries && m.entries.length))
                            m.entries = [];
                        m.entries.push($root.perfetto.protos.SmapsEntry.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SmapsPacket message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SmapsPacket
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SmapsPacket} SmapsPacket
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SmapsPacket.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SmapsPacket message.
             * @function verify
             * @memberof perfetto.protos.SmapsPacket
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SmapsPacket.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.entries != null && m.hasOwnProperty("entries")) {
                    if (!Array.isArray(m.entries))
                        return "entries: array expected";
                    for (var i = 0; i < m.entries.length; ++i) {
                        {
                            var e = $root.perfetto.protos.SmapsEntry.verify(m.entries[i]);
                            if (e)
                                return "entries." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a SmapsPacket message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SmapsPacket
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SmapsPacket} SmapsPacket
             */
            SmapsPacket.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SmapsPacket)
                    return d;
                var m = new $root.perfetto.protos.SmapsPacket();
                if (d.pid != null) {
                    m.pid = d.pid >>> 0;
                }
                if (d.entries) {
                    if (!Array.isArray(d.entries))
                        throw TypeError(".perfetto.protos.SmapsPacket.entries: array expected");
                    m.entries = [];
                    for (var i = 0; i < d.entries.length; ++i) {
                        if (typeof d.entries[i] !== "object")
                            throw TypeError(".perfetto.protos.SmapsPacket.entries: object expected");
                        m.entries[i] = $root.perfetto.protos.SmapsEntry.fromObject(d.entries[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a SmapsPacket message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SmapsPacket
             * @static
             * @param {perfetto.protos.SmapsPacket} m SmapsPacket
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SmapsPacket.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.entries = [];
                }
                if (o.defaults) {
                    d.pid = 0;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.entries && m.entries.length) {
                    d.entries = [];
                    for (var j = 0; j < m.entries.length; ++j) {
                        d.entries[j] = $root.perfetto.protos.SmapsEntry.toObject(m.entries[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this SmapsPacket to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SmapsPacket
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SmapsPacket.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SmapsPacket;
        })();

        protos.ProcessStats = (function() {

            /**
             * Properties of a ProcessStats.
             * @memberof perfetto.protos
             * @interface IProcessStats
             * @property {Array.<perfetto.protos.ProcessStats.IProcess>|null} [processes] ProcessStats processes
             * @property {number|null} [collectionEndTimestamp] ProcessStats collectionEndTimestamp
             */

            /**
             * Constructs a new ProcessStats.
             * @memberof perfetto.protos
             * @classdesc Represents a ProcessStats.
             * @implements IProcessStats
             * @constructor
             * @param {perfetto.protos.IProcessStats=} [p] Properties to set
             */
            function ProcessStats(p) {
                this.processes = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ProcessStats processes.
             * @member {Array.<perfetto.protos.ProcessStats.IProcess>} processes
             * @memberof perfetto.protos.ProcessStats
             * @instance
             */
            ProcessStats.prototype.processes = $util.emptyArray;

            /**
             * ProcessStats collectionEndTimestamp.
             * @member {number} collectionEndTimestamp
             * @memberof perfetto.protos.ProcessStats
             * @instance
             */
            ProcessStats.prototype.collectionEndTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new ProcessStats instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ProcessStats
             * @static
             * @param {perfetto.protos.IProcessStats=} [properties] Properties to set
             * @returns {perfetto.protos.ProcessStats} ProcessStats instance
             */
            ProcessStats.create = function create(properties) {
                return new ProcessStats(properties);
            };

            /**
             * Encodes the specified ProcessStats message. Does not implicitly {@link perfetto.protos.ProcessStats.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ProcessStats
             * @static
             * @param {perfetto.protos.IProcessStats} m ProcessStats message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ProcessStats.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.processes != null && m.processes.length) {
                    for (var i = 0; i < m.processes.length; ++i)
                        $root.perfetto.protos.ProcessStats.Process.encode(m.processes[i], w.uint32(10).fork()).ldelim();
                }
                if (m.collectionEndTimestamp != null && Object.hasOwnProperty.call(m, "collectionEndTimestamp"))
                    w.uint32(16).uint64(m.collectionEndTimestamp);
                return w;
            };

            /**
             * Encodes the specified ProcessStats message, length delimited. Does not implicitly {@link perfetto.protos.ProcessStats.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ProcessStats
             * @static
             * @param {perfetto.protos.IProcessStats} message ProcessStats message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ProcessStats.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ProcessStats message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ProcessStats
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ProcessStats} ProcessStats
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ProcessStats.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ProcessStats();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.processes && m.processes.length))
                            m.processes = [];
                        m.processes.push($root.perfetto.protos.ProcessStats.Process.decode(r, r.uint32()));
                        break;
                    case 2:
                        m.collectionEndTimestamp = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ProcessStats message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ProcessStats
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ProcessStats} ProcessStats
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ProcessStats.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ProcessStats message.
             * @function verify
             * @memberof perfetto.protos.ProcessStats
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ProcessStats.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.processes != null && m.hasOwnProperty("processes")) {
                    if (!Array.isArray(m.processes))
                        return "processes: array expected";
                    for (var i = 0; i < m.processes.length; ++i) {
                        {
                            var e = $root.perfetto.protos.ProcessStats.Process.verify(m.processes[i]);
                            if (e)
                                return "processes." + e;
                        }
                    }
                }
                if (m.collectionEndTimestamp != null && m.hasOwnProperty("collectionEndTimestamp")) {
                    if (!$util.isInteger(m.collectionEndTimestamp) && !(m.collectionEndTimestamp && $util.isInteger(m.collectionEndTimestamp.low) && $util.isInteger(m.collectionEndTimestamp.high)))
                        return "collectionEndTimestamp: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a ProcessStats message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ProcessStats
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ProcessStats} ProcessStats
             */
            ProcessStats.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ProcessStats)
                    return d;
                var m = new $root.perfetto.protos.ProcessStats();
                if (d.processes) {
                    if (!Array.isArray(d.processes))
                        throw TypeError(".perfetto.protos.ProcessStats.processes: array expected");
                    m.processes = [];
                    for (var i = 0; i < d.processes.length; ++i) {
                        if (typeof d.processes[i] !== "object")
                            throw TypeError(".perfetto.protos.ProcessStats.processes: object expected");
                        m.processes[i] = $root.perfetto.protos.ProcessStats.Process.fromObject(d.processes[i]);
                    }
                }
                if (d.collectionEndTimestamp != null) {
                    if ($util.Long)
                        (m.collectionEndTimestamp = $util.Long.fromValue(d.collectionEndTimestamp)).unsigned = true;
                    else if (typeof d.collectionEndTimestamp === "string")
                        m.collectionEndTimestamp = parseInt(d.collectionEndTimestamp, 10);
                    else if (typeof d.collectionEndTimestamp === "number")
                        m.collectionEndTimestamp = d.collectionEndTimestamp;
                    else if (typeof d.collectionEndTimestamp === "object")
                        m.collectionEndTimestamp = new $util.LongBits(d.collectionEndTimestamp.low >>> 0, d.collectionEndTimestamp.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a ProcessStats message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ProcessStats
             * @static
             * @param {perfetto.protos.ProcessStats} m ProcessStats
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ProcessStats.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.processes = [];
                }
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.collectionEndTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.collectionEndTimestamp = o.longs === String ? "0" : 0;
                }
                if (m.processes && m.processes.length) {
                    d.processes = [];
                    for (var j = 0; j < m.processes.length; ++j) {
                        d.processes[j] = $root.perfetto.protos.ProcessStats.Process.toObject(m.processes[j], o);
                    }
                }
                if (m.collectionEndTimestamp != null && m.hasOwnProperty("collectionEndTimestamp")) {
                    if (typeof m.collectionEndTimestamp === "number")
                        d.collectionEndTimestamp = o.longs === String ? String(m.collectionEndTimestamp) : m.collectionEndTimestamp;
                    else
                        d.collectionEndTimestamp = o.longs === String ? $util.Long.prototype.toString.call(m.collectionEndTimestamp) : o.longs === Number ? new $util.LongBits(m.collectionEndTimestamp.low >>> 0, m.collectionEndTimestamp.high >>> 0).toNumber(true) : m.collectionEndTimestamp;
                }
                return d;
            };

            /**
             * Converts this ProcessStats to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ProcessStats
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ProcessStats.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            ProcessStats.Thread = (function() {

                /**
                 * Properties of a Thread.
                 * @memberof perfetto.protos.ProcessStats
                 * @interface IThread
                 * @property {number|null} [tid] Thread tid
                 */

                /**
                 * Constructs a new Thread.
                 * @memberof perfetto.protos.ProcessStats
                 * @classdesc Represents a Thread.
                 * @implements IThread
                 * @constructor
                 * @param {perfetto.protos.ProcessStats.IThread=} [p] Properties to set
                 */
                function Thread(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Thread tid.
                 * @member {number} tid
                 * @memberof perfetto.protos.ProcessStats.Thread
                 * @instance
                 */
                Thread.prototype.tid = 0;

                /**
                 * Creates a new Thread instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.ProcessStats.Thread
                 * @static
                 * @param {perfetto.protos.ProcessStats.IThread=} [properties] Properties to set
                 * @returns {perfetto.protos.ProcessStats.Thread} Thread instance
                 */
                Thread.create = function create(properties) {
                    return new Thread(properties);
                };

                /**
                 * Encodes the specified Thread message. Does not implicitly {@link perfetto.protos.ProcessStats.Thread.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.ProcessStats.Thread
                 * @static
                 * @param {perfetto.protos.ProcessStats.IThread} m Thread message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Thread.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.tid != null && Object.hasOwnProperty.call(m, "tid"))
                        w.uint32(8).int32(m.tid);
                    return w;
                };

                /**
                 * Encodes the specified Thread message, length delimited. Does not implicitly {@link perfetto.protos.ProcessStats.Thread.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.ProcessStats.Thread
                 * @static
                 * @param {perfetto.protos.ProcessStats.IThread} message Thread message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Thread.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Thread message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.ProcessStats.Thread
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.ProcessStats.Thread} Thread
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Thread.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ProcessStats.Thread();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.tid = r.int32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Thread message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.ProcessStats.Thread
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.ProcessStats.Thread} Thread
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Thread.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Thread message.
                 * @function verify
                 * @memberof perfetto.protos.ProcessStats.Thread
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Thread.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.tid != null && m.hasOwnProperty("tid")) {
                        if (!$util.isInteger(m.tid))
                            return "tid: integer expected";
                    }
                    return null;
                };

                /**
                 * Creates a Thread message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.ProcessStats.Thread
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.ProcessStats.Thread} Thread
                 */
                Thread.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.ProcessStats.Thread)
                        return d;
                    var m = new $root.perfetto.protos.ProcessStats.Thread();
                    if (d.tid != null) {
                        m.tid = d.tid | 0;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Thread message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.ProcessStats.Thread
                 * @static
                 * @param {perfetto.protos.ProcessStats.Thread} m Thread
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Thread.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.tid = 0;
                    }
                    if (m.tid != null && m.hasOwnProperty("tid")) {
                        d.tid = m.tid;
                    }
                    return d;
                };

                /**
                 * Converts this Thread to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.ProcessStats.Thread
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Thread.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Thread;
            })();

            ProcessStats.Process = (function() {

                /**
                 * Properties of a Process.
                 * @memberof perfetto.protos.ProcessStats
                 * @interface IProcess
                 * @property {number|null} [pid] Process pid
                 * @property {number|null} [vmSizeKb] Process vmSizeKb
                 * @property {number|null} [vmRssKb] Process vmRssKb
                 * @property {number|null} [rssAnonKb] Process rssAnonKb
                 * @property {number|null} [rssFileKb] Process rssFileKb
                 * @property {number|null} [rssShmemKb] Process rssShmemKb
                 * @property {number|null} [vmSwapKb] Process vmSwapKb
                 * @property {number|null} [vmLockedKb] Process vmLockedKb
                 * @property {number|null} [vmHwmKb] Process vmHwmKb
                 * @property {number|null} [oomScoreAdj] Process oomScoreAdj
                 * @property {Array.<perfetto.protos.ProcessStats.IThread>|null} [threads] Process threads
                 * @property {boolean|null} [isPeakRssResettable] Process isPeakRssResettable
                 * @property {number|null} [chromePrivateFootprintKb] Process chromePrivateFootprintKb
                 * @property {number|null} [chromePeakResidentSetKb] Process chromePeakResidentSetKb
                 */

                /**
                 * Constructs a new Process.
                 * @memberof perfetto.protos.ProcessStats
                 * @classdesc Represents a Process.
                 * @implements IProcess
                 * @constructor
                 * @param {perfetto.protos.ProcessStats.IProcess=} [p] Properties to set
                 */
                function Process(p) {
                    this.threads = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Process pid.
                 * @member {number} pid
                 * @memberof perfetto.protos.ProcessStats.Process
                 * @instance
                 */
                Process.prototype.pid = 0;

                /**
                 * Process vmSizeKb.
                 * @member {number} vmSizeKb
                 * @memberof perfetto.protos.ProcessStats.Process
                 * @instance
                 */
                Process.prototype.vmSizeKb = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Process vmRssKb.
                 * @member {number} vmRssKb
                 * @memberof perfetto.protos.ProcessStats.Process
                 * @instance
                 */
                Process.prototype.vmRssKb = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Process rssAnonKb.
                 * @member {number} rssAnonKb
                 * @memberof perfetto.protos.ProcessStats.Process
                 * @instance
                 */
                Process.prototype.rssAnonKb = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Process rssFileKb.
                 * @member {number} rssFileKb
                 * @memberof perfetto.protos.ProcessStats.Process
                 * @instance
                 */
                Process.prototype.rssFileKb = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Process rssShmemKb.
                 * @member {number} rssShmemKb
                 * @memberof perfetto.protos.ProcessStats.Process
                 * @instance
                 */
                Process.prototype.rssShmemKb = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Process vmSwapKb.
                 * @member {number} vmSwapKb
                 * @memberof perfetto.protos.ProcessStats.Process
                 * @instance
                 */
                Process.prototype.vmSwapKb = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Process vmLockedKb.
                 * @member {number} vmLockedKb
                 * @memberof perfetto.protos.ProcessStats.Process
                 * @instance
                 */
                Process.prototype.vmLockedKb = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Process vmHwmKb.
                 * @member {number} vmHwmKb
                 * @memberof perfetto.protos.ProcessStats.Process
                 * @instance
                 */
                Process.prototype.vmHwmKb = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Process oomScoreAdj.
                 * @member {number} oomScoreAdj
                 * @memberof perfetto.protos.ProcessStats.Process
                 * @instance
                 */
                Process.prototype.oomScoreAdj = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

                /**
                 * Process threads.
                 * @member {Array.<perfetto.protos.ProcessStats.IThread>} threads
                 * @memberof perfetto.protos.ProcessStats.Process
                 * @instance
                 */
                Process.prototype.threads = $util.emptyArray;

                /**
                 * Process isPeakRssResettable.
                 * @member {boolean} isPeakRssResettable
                 * @memberof perfetto.protos.ProcessStats.Process
                 * @instance
                 */
                Process.prototype.isPeakRssResettable = false;

                /**
                 * Process chromePrivateFootprintKb.
                 * @member {number} chromePrivateFootprintKb
                 * @memberof perfetto.protos.ProcessStats.Process
                 * @instance
                 */
                Process.prototype.chromePrivateFootprintKb = 0;

                /**
                 * Process chromePeakResidentSetKb.
                 * @member {number} chromePeakResidentSetKb
                 * @memberof perfetto.protos.ProcessStats.Process
                 * @instance
                 */
                Process.prototype.chromePeakResidentSetKb = 0;

                /**
                 * Creates a new Process instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.ProcessStats.Process
                 * @static
                 * @param {perfetto.protos.ProcessStats.IProcess=} [properties] Properties to set
                 * @returns {perfetto.protos.ProcessStats.Process} Process instance
                 */
                Process.create = function create(properties) {
                    return new Process(properties);
                };

                /**
                 * Encodes the specified Process message. Does not implicitly {@link perfetto.protos.ProcessStats.Process.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.ProcessStats.Process
                 * @static
                 * @param {perfetto.protos.ProcessStats.IProcess} m Process message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Process.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                        w.uint32(8).int32(m.pid);
                    if (m.vmSizeKb != null && Object.hasOwnProperty.call(m, "vmSizeKb"))
                        w.uint32(16).uint64(m.vmSizeKb);
                    if (m.vmRssKb != null && Object.hasOwnProperty.call(m, "vmRssKb"))
                        w.uint32(24).uint64(m.vmRssKb);
                    if (m.rssAnonKb != null && Object.hasOwnProperty.call(m, "rssAnonKb"))
                        w.uint32(32).uint64(m.rssAnonKb);
                    if (m.rssFileKb != null && Object.hasOwnProperty.call(m, "rssFileKb"))
                        w.uint32(40).uint64(m.rssFileKb);
                    if (m.rssShmemKb != null && Object.hasOwnProperty.call(m, "rssShmemKb"))
                        w.uint32(48).uint64(m.rssShmemKb);
                    if (m.vmSwapKb != null && Object.hasOwnProperty.call(m, "vmSwapKb"))
                        w.uint32(56).uint64(m.vmSwapKb);
                    if (m.vmLockedKb != null && Object.hasOwnProperty.call(m, "vmLockedKb"))
                        w.uint32(64).uint64(m.vmLockedKb);
                    if (m.vmHwmKb != null && Object.hasOwnProperty.call(m, "vmHwmKb"))
                        w.uint32(72).uint64(m.vmHwmKb);
                    if (m.oomScoreAdj != null && Object.hasOwnProperty.call(m, "oomScoreAdj"))
                        w.uint32(80).int64(m.oomScoreAdj);
                    if (m.threads != null && m.threads.length) {
                        for (var i = 0; i < m.threads.length; ++i)
                            $root.perfetto.protos.ProcessStats.Thread.encode(m.threads[i], w.uint32(90).fork()).ldelim();
                    }
                    if (m.isPeakRssResettable != null && Object.hasOwnProperty.call(m, "isPeakRssResettable"))
                        w.uint32(96).bool(m.isPeakRssResettable);
                    if (m.chromePrivateFootprintKb != null && Object.hasOwnProperty.call(m, "chromePrivateFootprintKb"))
                        w.uint32(104).uint32(m.chromePrivateFootprintKb);
                    if (m.chromePeakResidentSetKb != null && Object.hasOwnProperty.call(m, "chromePeakResidentSetKb"))
                        w.uint32(112).uint32(m.chromePeakResidentSetKb);
                    return w;
                };

                /**
                 * Encodes the specified Process message, length delimited. Does not implicitly {@link perfetto.protos.ProcessStats.Process.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.ProcessStats.Process
                 * @static
                 * @param {perfetto.protos.ProcessStats.IProcess} message Process message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Process.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Process message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.ProcessStats.Process
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.ProcessStats.Process} Process
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Process.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ProcessStats.Process();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.pid = r.int32();
                            break;
                        case 2:
                            m.vmSizeKb = r.uint64();
                            break;
                        case 3:
                            m.vmRssKb = r.uint64();
                            break;
                        case 4:
                            m.rssAnonKb = r.uint64();
                            break;
                        case 5:
                            m.rssFileKb = r.uint64();
                            break;
                        case 6:
                            m.rssShmemKb = r.uint64();
                            break;
                        case 7:
                            m.vmSwapKb = r.uint64();
                            break;
                        case 8:
                            m.vmLockedKb = r.uint64();
                            break;
                        case 9:
                            m.vmHwmKb = r.uint64();
                            break;
                        case 10:
                            m.oomScoreAdj = r.int64();
                            break;
                        case 11:
                            if (!(m.threads && m.threads.length))
                                m.threads = [];
                            m.threads.push($root.perfetto.protos.ProcessStats.Thread.decode(r, r.uint32()));
                            break;
                        case 12:
                            m.isPeakRssResettable = r.bool();
                            break;
                        case 13:
                            m.chromePrivateFootprintKb = r.uint32();
                            break;
                        case 14:
                            m.chromePeakResidentSetKb = r.uint32();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Process message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.ProcessStats.Process
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.ProcessStats.Process} Process
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Process.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Process message.
                 * @function verify
                 * @memberof perfetto.protos.ProcessStats.Process
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Process.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        if (!$util.isInteger(m.pid))
                            return "pid: integer expected";
                    }
                    if (m.vmSizeKb != null && m.hasOwnProperty("vmSizeKb")) {
                        if (!$util.isInteger(m.vmSizeKb) && !(m.vmSizeKb && $util.isInteger(m.vmSizeKb.low) && $util.isInteger(m.vmSizeKb.high)))
                            return "vmSizeKb: integer|Long expected";
                    }
                    if (m.vmRssKb != null && m.hasOwnProperty("vmRssKb")) {
                        if (!$util.isInteger(m.vmRssKb) && !(m.vmRssKb && $util.isInteger(m.vmRssKb.low) && $util.isInteger(m.vmRssKb.high)))
                            return "vmRssKb: integer|Long expected";
                    }
                    if (m.rssAnonKb != null && m.hasOwnProperty("rssAnonKb")) {
                        if (!$util.isInteger(m.rssAnonKb) && !(m.rssAnonKb && $util.isInteger(m.rssAnonKb.low) && $util.isInteger(m.rssAnonKb.high)))
                            return "rssAnonKb: integer|Long expected";
                    }
                    if (m.rssFileKb != null && m.hasOwnProperty("rssFileKb")) {
                        if (!$util.isInteger(m.rssFileKb) && !(m.rssFileKb && $util.isInteger(m.rssFileKb.low) && $util.isInteger(m.rssFileKb.high)))
                            return "rssFileKb: integer|Long expected";
                    }
                    if (m.rssShmemKb != null && m.hasOwnProperty("rssShmemKb")) {
                        if (!$util.isInteger(m.rssShmemKb) && !(m.rssShmemKb && $util.isInteger(m.rssShmemKb.low) && $util.isInteger(m.rssShmemKb.high)))
                            return "rssShmemKb: integer|Long expected";
                    }
                    if (m.vmSwapKb != null && m.hasOwnProperty("vmSwapKb")) {
                        if (!$util.isInteger(m.vmSwapKb) && !(m.vmSwapKb && $util.isInteger(m.vmSwapKb.low) && $util.isInteger(m.vmSwapKb.high)))
                            return "vmSwapKb: integer|Long expected";
                    }
                    if (m.vmLockedKb != null && m.hasOwnProperty("vmLockedKb")) {
                        if (!$util.isInteger(m.vmLockedKb) && !(m.vmLockedKb && $util.isInteger(m.vmLockedKb.low) && $util.isInteger(m.vmLockedKb.high)))
                            return "vmLockedKb: integer|Long expected";
                    }
                    if (m.vmHwmKb != null && m.hasOwnProperty("vmHwmKb")) {
                        if (!$util.isInteger(m.vmHwmKb) && !(m.vmHwmKb && $util.isInteger(m.vmHwmKb.low) && $util.isInteger(m.vmHwmKb.high)))
                            return "vmHwmKb: integer|Long expected";
                    }
                    if (m.oomScoreAdj != null && m.hasOwnProperty("oomScoreAdj")) {
                        if (!$util.isInteger(m.oomScoreAdj) && !(m.oomScoreAdj && $util.isInteger(m.oomScoreAdj.low) && $util.isInteger(m.oomScoreAdj.high)))
                            return "oomScoreAdj: integer|Long expected";
                    }
                    if (m.threads != null && m.hasOwnProperty("threads")) {
                        if (!Array.isArray(m.threads))
                            return "threads: array expected";
                        for (var i = 0; i < m.threads.length; ++i) {
                            {
                                var e = $root.perfetto.protos.ProcessStats.Thread.verify(m.threads[i]);
                                if (e)
                                    return "threads." + e;
                            }
                        }
                    }
                    if (m.isPeakRssResettable != null && m.hasOwnProperty("isPeakRssResettable")) {
                        if (typeof m.isPeakRssResettable !== "boolean")
                            return "isPeakRssResettable: boolean expected";
                    }
                    if (m.chromePrivateFootprintKb != null && m.hasOwnProperty("chromePrivateFootprintKb")) {
                        if (!$util.isInteger(m.chromePrivateFootprintKb))
                            return "chromePrivateFootprintKb: integer expected";
                    }
                    if (m.chromePeakResidentSetKb != null && m.hasOwnProperty("chromePeakResidentSetKb")) {
                        if (!$util.isInteger(m.chromePeakResidentSetKb))
                            return "chromePeakResidentSetKb: integer expected";
                    }
                    return null;
                };

                /**
                 * Creates a Process message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.ProcessStats.Process
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.ProcessStats.Process} Process
                 */
                Process.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.ProcessStats.Process)
                        return d;
                    var m = new $root.perfetto.protos.ProcessStats.Process();
                    if (d.pid != null) {
                        m.pid = d.pid | 0;
                    }
                    if (d.vmSizeKb != null) {
                        if ($util.Long)
                            (m.vmSizeKb = $util.Long.fromValue(d.vmSizeKb)).unsigned = true;
                        else if (typeof d.vmSizeKb === "string")
                            m.vmSizeKb = parseInt(d.vmSizeKb, 10);
                        else if (typeof d.vmSizeKb === "number")
                            m.vmSizeKb = d.vmSizeKb;
                        else if (typeof d.vmSizeKb === "object")
                            m.vmSizeKb = new $util.LongBits(d.vmSizeKb.low >>> 0, d.vmSizeKb.high >>> 0).toNumber(true);
                    }
                    if (d.vmRssKb != null) {
                        if ($util.Long)
                            (m.vmRssKb = $util.Long.fromValue(d.vmRssKb)).unsigned = true;
                        else if (typeof d.vmRssKb === "string")
                            m.vmRssKb = parseInt(d.vmRssKb, 10);
                        else if (typeof d.vmRssKb === "number")
                            m.vmRssKb = d.vmRssKb;
                        else if (typeof d.vmRssKb === "object")
                            m.vmRssKb = new $util.LongBits(d.vmRssKb.low >>> 0, d.vmRssKb.high >>> 0).toNumber(true);
                    }
                    if (d.rssAnonKb != null) {
                        if ($util.Long)
                            (m.rssAnonKb = $util.Long.fromValue(d.rssAnonKb)).unsigned = true;
                        else if (typeof d.rssAnonKb === "string")
                            m.rssAnonKb = parseInt(d.rssAnonKb, 10);
                        else if (typeof d.rssAnonKb === "number")
                            m.rssAnonKb = d.rssAnonKb;
                        else if (typeof d.rssAnonKb === "object")
                            m.rssAnonKb = new $util.LongBits(d.rssAnonKb.low >>> 0, d.rssAnonKb.high >>> 0).toNumber(true);
                    }
                    if (d.rssFileKb != null) {
                        if ($util.Long)
                            (m.rssFileKb = $util.Long.fromValue(d.rssFileKb)).unsigned = true;
                        else if (typeof d.rssFileKb === "string")
                            m.rssFileKb = parseInt(d.rssFileKb, 10);
                        else if (typeof d.rssFileKb === "number")
                            m.rssFileKb = d.rssFileKb;
                        else if (typeof d.rssFileKb === "object")
                            m.rssFileKb = new $util.LongBits(d.rssFileKb.low >>> 0, d.rssFileKb.high >>> 0).toNumber(true);
                    }
                    if (d.rssShmemKb != null) {
                        if ($util.Long)
                            (m.rssShmemKb = $util.Long.fromValue(d.rssShmemKb)).unsigned = true;
                        else if (typeof d.rssShmemKb === "string")
                            m.rssShmemKb = parseInt(d.rssShmemKb, 10);
                        else if (typeof d.rssShmemKb === "number")
                            m.rssShmemKb = d.rssShmemKb;
                        else if (typeof d.rssShmemKb === "object")
                            m.rssShmemKb = new $util.LongBits(d.rssShmemKb.low >>> 0, d.rssShmemKb.high >>> 0).toNumber(true);
                    }
                    if (d.vmSwapKb != null) {
                        if ($util.Long)
                            (m.vmSwapKb = $util.Long.fromValue(d.vmSwapKb)).unsigned = true;
                        else if (typeof d.vmSwapKb === "string")
                            m.vmSwapKb = parseInt(d.vmSwapKb, 10);
                        else if (typeof d.vmSwapKb === "number")
                            m.vmSwapKb = d.vmSwapKb;
                        else if (typeof d.vmSwapKb === "object")
                            m.vmSwapKb = new $util.LongBits(d.vmSwapKb.low >>> 0, d.vmSwapKb.high >>> 0).toNumber(true);
                    }
                    if (d.vmLockedKb != null) {
                        if ($util.Long)
                            (m.vmLockedKb = $util.Long.fromValue(d.vmLockedKb)).unsigned = true;
                        else if (typeof d.vmLockedKb === "string")
                            m.vmLockedKb = parseInt(d.vmLockedKb, 10);
                        else if (typeof d.vmLockedKb === "number")
                            m.vmLockedKb = d.vmLockedKb;
                        else if (typeof d.vmLockedKb === "object")
                            m.vmLockedKb = new $util.LongBits(d.vmLockedKb.low >>> 0, d.vmLockedKb.high >>> 0).toNumber(true);
                    }
                    if (d.vmHwmKb != null) {
                        if ($util.Long)
                            (m.vmHwmKb = $util.Long.fromValue(d.vmHwmKb)).unsigned = true;
                        else if (typeof d.vmHwmKb === "string")
                            m.vmHwmKb = parseInt(d.vmHwmKb, 10);
                        else if (typeof d.vmHwmKb === "number")
                            m.vmHwmKb = d.vmHwmKb;
                        else if (typeof d.vmHwmKb === "object")
                            m.vmHwmKb = new $util.LongBits(d.vmHwmKb.low >>> 0, d.vmHwmKb.high >>> 0).toNumber(true);
                    }
                    if (d.oomScoreAdj != null) {
                        if ($util.Long)
                            (m.oomScoreAdj = $util.Long.fromValue(d.oomScoreAdj)).unsigned = false;
                        else if (typeof d.oomScoreAdj === "string")
                            m.oomScoreAdj = parseInt(d.oomScoreAdj, 10);
                        else if (typeof d.oomScoreAdj === "number")
                            m.oomScoreAdj = d.oomScoreAdj;
                        else if (typeof d.oomScoreAdj === "object")
                            m.oomScoreAdj = new $util.LongBits(d.oomScoreAdj.low >>> 0, d.oomScoreAdj.high >>> 0).toNumber();
                    }
                    if (d.threads) {
                        if (!Array.isArray(d.threads))
                            throw TypeError(".perfetto.protos.ProcessStats.Process.threads: array expected");
                        m.threads = [];
                        for (var i = 0; i < d.threads.length; ++i) {
                            if (typeof d.threads[i] !== "object")
                                throw TypeError(".perfetto.protos.ProcessStats.Process.threads: object expected");
                            m.threads[i] = $root.perfetto.protos.ProcessStats.Thread.fromObject(d.threads[i]);
                        }
                    }
                    if (d.isPeakRssResettable != null) {
                        m.isPeakRssResettable = Boolean(d.isPeakRssResettable);
                    }
                    if (d.chromePrivateFootprintKb != null) {
                        m.chromePrivateFootprintKb = d.chromePrivateFootprintKb >>> 0;
                    }
                    if (d.chromePeakResidentSetKb != null) {
                        m.chromePeakResidentSetKb = d.chromePeakResidentSetKb >>> 0;
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Process message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.ProcessStats.Process
                 * @static
                 * @param {perfetto.protos.ProcessStats.Process} m Process
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Process.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.threads = [];
                    }
                    if (o.defaults) {
                        d.pid = 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.vmSizeKb = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.vmSizeKb = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.vmRssKb = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.vmRssKb = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.rssAnonKb = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.rssAnonKb = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.rssFileKb = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.rssFileKb = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.rssShmemKb = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.rssShmemKb = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.vmSwapKb = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.vmSwapKb = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.vmLockedKb = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.vmLockedKb = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.vmHwmKb = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.vmHwmKb = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, false);
                            d.oomScoreAdj = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.oomScoreAdj = o.longs === String ? "0" : 0;
                        d.isPeakRssResettable = false;
                        d.chromePrivateFootprintKb = 0;
                        d.chromePeakResidentSetKb = 0;
                    }
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        d.pid = m.pid;
                    }
                    if (m.vmSizeKb != null && m.hasOwnProperty("vmSizeKb")) {
                        if (typeof m.vmSizeKb === "number")
                            d.vmSizeKb = o.longs === String ? String(m.vmSizeKb) : m.vmSizeKb;
                        else
                            d.vmSizeKb = o.longs === String ? $util.Long.prototype.toString.call(m.vmSizeKb) : o.longs === Number ? new $util.LongBits(m.vmSizeKb.low >>> 0, m.vmSizeKb.high >>> 0).toNumber(true) : m.vmSizeKb;
                    }
                    if (m.vmRssKb != null && m.hasOwnProperty("vmRssKb")) {
                        if (typeof m.vmRssKb === "number")
                            d.vmRssKb = o.longs === String ? String(m.vmRssKb) : m.vmRssKb;
                        else
                            d.vmRssKb = o.longs === String ? $util.Long.prototype.toString.call(m.vmRssKb) : o.longs === Number ? new $util.LongBits(m.vmRssKb.low >>> 0, m.vmRssKb.high >>> 0).toNumber(true) : m.vmRssKb;
                    }
                    if (m.rssAnonKb != null && m.hasOwnProperty("rssAnonKb")) {
                        if (typeof m.rssAnonKb === "number")
                            d.rssAnonKb = o.longs === String ? String(m.rssAnonKb) : m.rssAnonKb;
                        else
                            d.rssAnonKb = o.longs === String ? $util.Long.prototype.toString.call(m.rssAnonKb) : o.longs === Number ? new $util.LongBits(m.rssAnonKb.low >>> 0, m.rssAnonKb.high >>> 0).toNumber(true) : m.rssAnonKb;
                    }
                    if (m.rssFileKb != null && m.hasOwnProperty("rssFileKb")) {
                        if (typeof m.rssFileKb === "number")
                            d.rssFileKb = o.longs === String ? String(m.rssFileKb) : m.rssFileKb;
                        else
                            d.rssFileKb = o.longs === String ? $util.Long.prototype.toString.call(m.rssFileKb) : o.longs === Number ? new $util.LongBits(m.rssFileKb.low >>> 0, m.rssFileKb.high >>> 0).toNumber(true) : m.rssFileKb;
                    }
                    if (m.rssShmemKb != null && m.hasOwnProperty("rssShmemKb")) {
                        if (typeof m.rssShmemKb === "number")
                            d.rssShmemKb = o.longs === String ? String(m.rssShmemKb) : m.rssShmemKb;
                        else
                            d.rssShmemKb = o.longs === String ? $util.Long.prototype.toString.call(m.rssShmemKb) : o.longs === Number ? new $util.LongBits(m.rssShmemKb.low >>> 0, m.rssShmemKb.high >>> 0).toNumber(true) : m.rssShmemKb;
                    }
                    if (m.vmSwapKb != null && m.hasOwnProperty("vmSwapKb")) {
                        if (typeof m.vmSwapKb === "number")
                            d.vmSwapKb = o.longs === String ? String(m.vmSwapKb) : m.vmSwapKb;
                        else
                            d.vmSwapKb = o.longs === String ? $util.Long.prototype.toString.call(m.vmSwapKb) : o.longs === Number ? new $util.LongBits(m.vmSwapKb.low >>> 0, m.vmSwapKb.high >>> 0).toNumber(true) : m.vmSwapKb;
                    }
                    if (m.vmLockedKb != null && m.hasOwnProperty("vmLockedKb")) {
                        if (typeof m.vmLockedKb === "number")
                            d.vmLockedKb = o.longs === String ? String(m.vmLockedKb) : m.vmLockedKb;
                        else
                            d.vmLockedKb = o.longs === String ? $util.Long.prototype.toString.call(m.vmLockedKb) : o.longs === Number ? new $util.LongBits(m.vmLockedKb.low >>> 0, m.vmLockedKb.high >>> 0).toNumber(true) : m.vmLockedKb;
                    }
                    if (m.vmHwmKb != null && m.hasOwnProperty("vmHwmKb")) {
                        if (typeof m.vmHwmKb === "number")
                            d.vmHwmKb = o.longs === String ? String(m.vmHwmKb) : m.vmHwmKb;
                        else
                            d.vmHwmKb = o.longs === String ? $util.Long.prototype.toString.call(m.vmHwmKb) : o.longs === Number ? new $util.LongBits(m.vmHwmKb.low >>> 0, m.vmHwmKb.high >>> 0).toNumber(true) : m.vmHwmKb;
                    }
                    if (m.oomScoreAdj != null && m.hasOwnProperty("oomScoreAdj")) {
                        if (typeof m.oomScoreAdj === "number")
                            d.oomScoreAdj = o.longs === String ? String(m.oomScoreAdj) : m.oomScoreAdj;
                        else
                            d.oomScoreAdj = o.longs === String ? $util.Long.prototype.toString.call(m.oomScoreAdj) : o.longs === Number ? new $util.LongBits(m.oomScoreAdj.low >>> 0, m.oomScoreAdj.high >>> 0).toNumber() : m.oomScoreAdj;
                    }
                    if (m.threads && m.threads.length) {
                        d.threads = [];
                        for (var j = 0; j < m.threads.length; ++j) {
                            d.threads[j] = $root.perfetto.protos.ProcessStats.Thread.toObject(m.threads[j], o);
                        }
                    }
                    if (m.isPeakRssResettable != null && m.hasOwnProperty("isPeakRssResettable")) {
                        d.isPeakRssResettable = m.isPeakRssResettable;
                    }
                    if (m.chromePrivateFootprintKb != null && m.hasOwnProperty("chromePrivateFootprintKb")) {
                        d.chromePrivateFootprintKb = m.chromePrivateFootprintKb;
                    }
                    if (m.chromePeakResidentSetKb != null && m.hasOwnProperty("chromePeakResidentSetKb")) {
                        d.chromePeakResidentSetKb = m.chromePeakResidentSetKb;
                    }
                    return d;
                };

                /**
                 * Converts this Process to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.ProcessStats.Process
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Process.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Process;
            })();

            return ProcessStats;
        })();

        protos.ProcessTree = (function() {

            /**
             * Properties of a ProcessTree.
             * @memberof perfetto.protos
             * @interface IProcessTree
             * @property {Array.<perfetto.protos.ProcessTree.IProcess>|null} [processes] ProcessTree processes
             * @property {Array.<perfetto.protos.ProcessTree.IThread>|null} [threads] ProcessTree threads
             * @property {number|null} [collectionEndTimestamp] ProcessTree collectionEndTimestamp
             */

            /**
             * Constructs a new ProcessTree.
             * @memberof perfetto.protos
             * @classdesc Represents a ProcessTree.
             * @implements IProcessTree
             * @constructor
             * @param {perfetto.protos.IProcessTree=} [p] Properties to set
             */
            function ProcessTree(p) {
                this.processes = [];
                this.threads = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ProcessTree processes.
             * @member {Array.<perfetto.protos.ProcessTree.IProcess>} processes
             * @memberof perfetto.protos.ProcessTree
             * @instance
             */
            ProcessTree.prototype.processes = $util.emptyArray;

            /**
             * ProcessTree threads.
             * @member {Array.<perfetto.protos.ProcessTree.IThread>} threads
             * @memberof perfetto.protos.ProcessTree
             * @instance
             */
            ProcessTree.prototype.threads = $util.emptyArray;

            /**
             * ProcessTree collectionEndTimestamp.
             * @member {number} collectionEndTimestamp
             * @memberof perfetto.protos.ProcessTree
             * @instance
             */
            ProcessTree.prototype.collectionEndTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new ProcessTree instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ProcessTree
             * @static
             * @param {perfetto.protos.IProcessTree=} [properties] Properties to set
             * @returns {perfetto.protos.ProcessTree} ProcessTree instance
             */
            ProcessTree.create = function create(properties) {
                return new ProcessTree(properties);
            };

            /**
             * Encodes the specified ProcessTree message. Does not implicitly {@link perfetto.protos.ProcessTree.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ProcessTree
             * @static
             * @param {perfetto.protos.IProcessTree} m ProcessTree message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ProcessTree.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.processes != null && m.processes.length) {
                    for (var i = 0; i < m.processes.length; ++i)
                        $root.perfetto.protos.ProcessTree.Process.encode(m.processes[i], w.uint32(10).fork()).ldelim();
                }
                if (m.threads != null && m.threads.length) {
                    for (var i = 0; i < m.threads.length; ++i)
                        $root.perfetto.protos.ProcessTree.Thread.encode(m.threads[i], w.uint32(18).fork()).ldelim();
                }
                if (m.collectionEndTimestamp != null && Object.hasOwnProperty.call(m, "collectionEndTimestamp"))
                    w.uint32(24).uint64(m.collectionEndTimestamp);
                return w;
            };

            /**
             * Encodes the specified ProcessTree message, length delimited. Does not implicitly {@link perfetto.protos.ProcessTree.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ProcessTree
             * @static
             * @param {perfetto.protos.IProcessTree} message ProcessTree message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ProcessTree.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ProcessTree message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ProcessTree
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ProcessTree} ProcessTree
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ProcessTree.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ProcessTree();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.processes && m.processes.length))
                            m.processes = [];
                        m.processes.push($root.perfetto.protos.ProcessTree.Process.decode(r, r.uint32()));
                        break;
                    case 2:
                        if (!(m.threads && m.threads.length))
                            m.threads = [];
                        m.threads.push($root.perfetto.protos.ProcessTree.Thread.decode(r, r.uint32()));
                        break;
                    case 3:
                        m.collectionEndTimestamp = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ProcessTree message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ProcessTree
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ProcessTree} ProcessTree
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ProcessTree.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ProcessTree message.
             * @function verify
             * @memberof perfetto.protos.ProcessTree
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ProcessTree.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.processes != null && m.hasOwnProperty("processes")) {
                    if (!Array.isArray(m.processes))
                        return "processes: array expected";
                    for (var i = 0; i < m.processes.length; ++i) {
                        {
                            var e = $root.perfetto.protos.ProcessTree.Process.verify(m.processes[i]);
                            if (e)
                                return "processes." + e;
                        }
                    }
                }
                if (m.threads != null && m.hasOwnProperty("threads")) {
                    if (!Array.isArray(m.threads))
                        return "threads: array expected";
                    for (var i = 0; i < m.threads.length; ++i) {
                        {
                            var e = $root.perfetto.protos.ProcessTree.Thread.verify(m.threads[i]);
                            if (e)
                                return "threads." + e;
                        }
                    }
                }
                if (m.collectionEndTimestamp != null && m.hasOwnProperty("collectionEndTimestamp")) {
                    if (!$util.isInteger(m.collectionEndTimestamp) && !(m.collectionEndTimestamp && $util.isInteger(m.collectionEndTimestamp.low) && $util.isInteger(m.collectionEndTimestamp.high)))
                        return "collectionEndTimestamp: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a ProcessTree message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ProcessTree
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ProcessTree} ProcessTree
             */
            ProcessTree.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ProcessTree)
                    return d;
                var m = new $root.perfetto.protos.ProcessTree();
                if (d.processes) {
                    if (!Array.isArray(d.processes))
                        throw TypeError(".perfetto.protos.ProcessTree.processes: array expected");
                    m.processes = [];
                    for (var i = 0; i < d.processes.length; ++i) {
                        if (typeof d.processes[i] !== "object")
                            throw TypeError(".perfetto.protos.ProcessTree.processes: object expected");
                        m.processes[i] = $root.perfetto.protos.ProcessTree.Process.fromObject(d.processes[i]);
                    }
                }
                if (d.threads) {
                    if (!Array.isArray(d.threads))
                        throw TypeError(".perfetto.protos.ProcessTree.threads: array expected");
                    m.threads = [];
                    for (var i = 0; i < d.threads.length; ++i) {
                        if (typeof d.threads[i] !== "object")
                            throw TypeError(".perfetto.protos.ProcessTree.threads: object expected");
                        m.threads[i] = $root.perfetto.protos.ProcessTree.Thread.fromObject(d.threads[i]);
                    }
                }
                if (d.collectionEndTimestamp != null) {
                    if ($util.Long)
                        (m.collectionEndTimestamp = $util.Long.fromValue(d.collectionEndTimestamp)).unsigned = true;
                    else if (typeof d.collectionEndTimestamp === "string")
                        m.collectionEndTimestamp = parseInt(d.collectionEndTimestamp, 10);
                    else if (typeof d.collectionEndTimestamp === "number")
                        m.collectionEndTimestamp = d.collectionEndTimestamp;
                    else if (typeof d.collectionEndTimestamp === "object")
                        m.collectionEndTimestamp = new $util.LongBits(d.collectionEndTimestamp.low >>> 0, d.collectionEndTimestamp.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a ProcessTree message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ProcessTree
             * @static
             * @param {perfetto.protos.ProcessTree} m ProcessTree
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ProcessTree.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.processes = [];
                    d.threads = [];
                }
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.collectionEndTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.collectionEndTimestamp = o.longs === String ? "0" : 0;
                }
                if (m.processes && m.processes.length) {
                    d.processes = [];
                    for (var j = 0; j < m.processes.length; ++j) {
                        d.processes[j] = $root.perfetto.protos.ProcessTree.Process.toObject(m.processes[j], o);
                    }
                }
                if (m.threads && m.threads.length) {
                    d.threads = [];
                    for (var j = 0; j < m.threads.length; ++j) {
                        d.threads[j] = $root.perfetto.protos.ProcessTree.Thread.toObject(m.threads[j], o);
                    }
                }
                if (m.collectionEndTimestamp != null && m.hasOwnProperty("collectionEndTimestamp")) {
                    if (typeof m.collectionEndTimestamp === "number")
                        d.collectionEndTimestamp = o.longs === String ? String(m.collectionEndTimestamp) : m.collectionEndTimestamp;
                    else
                        d.collectionEndTimestamp = o.longs === String ? $util.Long.prototype.toString.call(m.collectionEndTimestamp) : o.longs === Number ? new $util.LongBits(m.collectionEndTimestamp.low >>> 0, m.collectionEndTimestamp.high >>> 0).toNumber(true) : m.collectionEndTimestamp;
                }
                return d;
            };

            /**
             * Converts this ProcessTree to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ProcessTree
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ProcessTree.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            ProcessTree.Thread = (function() {

                /**
                 * Properties of a Thread.
                 * @memberof perfetto.protos.ProcessTree
                 * @interface IThread
                 * @property {number|null} [tid] Thread tid
                 * @property {number|null} [tgid] Thread tgid
                 * @property {string|null} [name] Thread name
                 * @property {Array.<number>|null} [nstid] Thread nstid
                 */

                /**
                 * Constructs a new Thread.
                 * @memberof perfetto.protos.ProcessTree
                 * @classdesc Represents a Thread.
                 * @implements IThread
                 * @constructor
                 * @param {perfetto.protos.ProcessTree.IThread=} [p] Properties to set
                 */
                function Thread(p) {
                    this.nstid = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Thread tid.
                 * @member {number} tid
                 * @memberof perfetto.protos.ProcessTree.Thread
                 * @instance
                 */
                Thread.prototype.tid = 0;

                /**
                 * Thread tgid.
                 * @member {number} tgid
                 * @memberof perfetto.protos.ProcessTree.Thread
                 * @instance
                 */
                Thread.prototype.tgid = 0;

                /**
                 * Thread name.
                 * @member {string} name
                 * @memberof perfetto.protos.ProcessTree.Thread
                 * @instance
                 */
                Thread.prototype.name = "";

                /**
                 * Thread nstid.
                 * @member {Array.<number>} nstid
                 * @memberof perfetto.protos.ProcessTree.Thread
                 * @instance
                 */
                Thread.prototype.nstid = $util.emptyArray;

                /**
                 * Creates a new Thread instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.ProcessTree.Thread
                 * @static
                 * @param {perfetto.protos.ProcessTree.IThread=} [properties] Properties to set
                 * @returns {perfetto.protos.ProcessTree.Thread} Thread instance
                 */
                Thread.create = function create(properties) {
                    return new Thread(properties);
                };

                /**
                 * Encodes the specified Thread message. Does not implicitly {@link perfetto.protos.ProcessTree.Thread.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.ProcessTree.Thread
                 * @static
                 * @param {perfetto.protos.ProcessTree.IThread} m Thread message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Thread.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.tid != null && Object.hasOwnProperty.call(m, "tid"))
                        w.uint32(8).int32(m.tid);
                    if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                        w.uint32(18).string(m.name);
                    if (m.tgid != null && Object.hasOwnProperty.call(m, "tgid"))
                        w.uint32(24).int32(m.tgid);
                    if (m.nstid != null && m.nstid.length) {
                        for (var i = 0; i < m.nstid.length; ++i)
                            w.uint32(32).int32(m.nstid[i]);
                    }
                    return w;
                };

                /**
                 * Encodes the specified Thread message, length delimited. Does not implicitly {@link perfetto.protos.ProcessTree.Thread.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.ProcessTree.Thread
                 * @static
                 * @param {perfetto.protos.ProcessTree.IThread} message Thread message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Thread.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Thread message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.ProcessTree.Thread
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.ProcessTree.Thread} Thread
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Thread.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ProcessTree.Thread();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.tid = r.int32();
                            break;
                        case 3:
                            m.tgid = r.int32();
                            break;
                        case 2:
                            m.name = r.string();
                            break;
                        case 4:
                            if (!(m.nstid && m.nstid.length))
                                m.nstid = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.nstid.push(r.int32());
                            } else
                                m.nstid.push(r.int32());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Thread message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.ProcessTree.Thread
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.ProcessTree.Thread} Thread
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Thread.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Thread message.
                 * @function verify
                 * @memberof perfetto.protos.ProcessTree.Thread
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Thread.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.tid != null && m.hasOwnProperty("tid")) {
                        if (!$util.isInteger(m.tid))
                            return "tid: integer expected";
                    }
                    if (m.tgid != null && m.hasOwnProperty("tgid")) {
                        if (!$util.isInteger(m.tgid))
                            return "tgid: integer expected";
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        if (!$util.isString(m.name))
                            return "name: string expected";
                    }
                    if (m.nstid != null && m.hasOwnProperty("nstid")) {
                        if (!Array.isArray(m.nstid))
                            return "nstid: array expected";
                        for (var i = 0; i < m.nstid.length; ++i) {
                            if (!$util.isInteger(m.nstid[i]))
                                return "nstid: integer[] expected";
                        }
                    }
                    return null;
                };

                /**
                 * Creates a Thread message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.ProcessTree.Thread
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.ProcessTree.Thread} Thread
                 */
                Thread.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.ProcessTree.Thread)
                        return d;
                    var m = new $root.perfetto.protos.ProcessTree.Thread();
                    if (d.tid != null) {
                        m.tid = d.tid | 0;
                    }
                    if (d.tgid != null) {
                        m.tgid = d.tgid | 0;
                    }
                    if (d.name != null) {
                        m.name = String(d.name);
                    }
                    if (d.nstid) {
                        if (!Array.isArray(d.nstid))
                            throw TypeError(".perfetto.protos.ProcessTree.Thread.nstid: array expected");
                        m.nstid = [];
                        for (var i = 0; i < d.nstid.length; ++i) {
                            m.nstid[i] = d.nstid[i] | 0;
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Thread message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.ProcessTree.Thread
                 * @static
                 * @param {perfetto.protos.ProcessTree.Thread} m Thread
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Thread.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.nstid = [];
                    }
                    if (o.defaults) {
                        d.tid = 0;
                        d.name = "";
                        d.tgid = 0;
                    }
                    if (m.tid != null && m.hasOwnProperty("tid")) {
                        d.tid = m.tid;
                    }
                    if (m.name != null && m.hasOwnProperty("name")) {
                        d.name = m.name;
                    }
                    if (m.tgid != null && m.hasOwnProperty("tgid")) {
                        d.tgid = m.tgid;
                    }
                    if (m.nstid && m.nstid.length) {
                        d.nstid = [];
                        for (var j = 0; j < m.nstid.length; ++j) {
                            d.nstid[j] = m.nstid[j];
                        }
                    }
                    return d;
                };

                /**
                 * Converts this Thread to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.ProcessTree.Thread
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Thread.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Thread;
            })();

            ProcessTree.Process = (function() {

                /**
                 * Properties of a Process.
                 * @memberof perfetto.protos.ProcessTree
                 * @interface IProcess
                 * @property {number|null} [pid] Process pid
                 * @property {number|null} [ppid] Process ppid
                 * @property {Array.<string>|null} [cmdline] Process cmdline
                 * @property {Array.<perfetto.protos.ProcessTree.IThread>|null} [threadsDeprecated] Process threadsDeprecated
                 * @property {number|null} [uid] Process uid
                 * @property {Array.<number>|null} [nspid] Process nspid
                 */

                /**
                 * Constructs a new Process.
                 * @memberof perfetto.protos.ProcessTree
                 * @classdesc Represents a Process.
                 * @implements IProcess
                 * @constructor
                 * @param {perfetto.protos.ProcessTree.IProcess=} [p] Properties to set
                 */
                function Process(p) {
                    this.cmdline = [];
                    this.threadsDeprecated = [];
                    this.nspid = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Process pid.
                 * @member {number} pid
                 * @memberof perfetto.protos.ProcessTree.Process
                 * @instance
                 */
                Process.prototype.pid = 0;

                /**
                 * Process ppid.
                 * @member {number} ppid
                 * @memberof perfetto.protos.ProcessTree.Process
                 * @instance
                 */
                Process.prototype.ppid = 0;

                /**
                 * Process cmdline.
                 * @member {Array.<string>} cmdline
                 * @memberof perfetto.protos.ProcessTree.Process
                 * @instance
                 */
                Process.prototype.cmdline = $util.emptyArray;

                /**
                 * Process threadsDeprecated.
                 * @member {Array.<perfetto.protos.ProcessTree.IThread>} threadsDeprecated
                 * @memberof perfetto.protos.ProcessTree.Process
                 * @instance
                 */
                Process.prototype.threadsDeprecated = $util.emptyArray;

                /**
                 * Process uid.
                 * @member {number} uid
                 * @memberof perfetto.protos.ProcessTree.Process
                 * @instance
                 */
                Process.prototype.uid = 0;

                /**
                 * Process nspid.
                 * @member {Array.<number>} nspid
                 * @memberof perfetto.protos.ProcessTree.Process
                 * @instance
                 */
                Process.prototype.nspid = $util.emptyArray;

                /**
                 * Creates a new Process instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.ProcessTree.Process
                 * @static
                 * @param {perfetto.protos.ProcessTree.IProcess=} [properties] Properties to set
                 * @returns {perfetto.protos.ProcessTree.Process} Process instance
                 */
                Process.create = function create(properties) {
                    return new Process(properties);
                };

                /**
                 * Encodes the specified Process message. Does not implicitly {@link perfetto.protos.ProcessTree.Process.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.ProcessTree.Process
                 * @static
                 * @param {perfetto.protos.ProcessTree.IProcess} m Process message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Process.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                        w.uint32(8).int32(m.pid);
                    if (m.ppid != null && Object.hasOwnProperty.call(m, "ppid"))
                        w.uint32(16).int32(m.ppid);
                    if (m.cmdline != null && m.cmdline.length) {
                        for (var i = 0; i < m.cmdline.length; ++i)
                            w.uint32(26).string(m.cmdline[i]);
                    }
                    if (m.threadsDeprecated != null && m.threadsDeprecated.length) {
                        for (var i = 0; i < m.threadsDeprecated.length; ++i)
                            $root.perfetto.protos.ProcessTree.Thread.encode(m.threadsDeprecated[i], w.uint32(34).fork()).ldelim();
                    }
                    if (m.uid != null && Object.hasOwnProperty.call(m, "uid"))
                        w.uint32(40).int32(m.uid);
                    if (m.nspid != null && m.nspid.length) {
                        for (var i = 0; i < m.nspid.length; ++i)
                            w.uint32(48).int32(m.nspid[i]);
                    }
                    return w;
                };

                /**
                 * Encodes the specified Process message, length delimited. Does not implicitly {@link perfetto.protos.ProcessTree.Process.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.ProcessTree.Process
                 * @static
                 * @param {perfetto.protos.ProcessTree.IProcess} message Process message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Process.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Process message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.ProcessTree.Process
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.ProcessTree.Process} Process
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Process.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ProcessTree.Process();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.pid = r.int32();
                            break;
                        case 2:
                            m.ppid = r.int32();
                            break;
                        case 3:
                            if (!(m.cmdline && m.cmdline.length))
                                m.cmdline = [];
                            m.cmdline.push(r.string());
                            break;
                        case 4:
                            if (!(m.threadsDeprecated && m.threadsDeprecated.length))
                                m.threadsDeprecated = [];
                            m.threadsDeprecated.push($root.perfetto.protos.ProcessTree.Thread.decode(r, r.uint32()));
                            break;
                        case 5:
                            m.uid = r.int32();
                            break;
                        case 6:
                            if (!(m.nspid && m.nspid.length))
                                m.nspid = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.nspid.push(r.int32());
                            } else
                                m.nspid.push(r.int32());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Process message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.ProcessTree.Process
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.ProcessTree.Process} Process
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Process.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Process message.
                 * @function verify
                 * @memberof perfetto.protos.ProcessTree.Process
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Process.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        if (!$util.isInteger(m.pid))
                            return "pid: integer expected";
                    }
                    if (m.ppid != null && m.hasOwnProperty("ppid")) {
                        if (!$util.isInteger(m.ppid))
                            return "ppid: integer expected";
                    }
                    if (m.cmdline != null && m.hasOwnProperty("cmdline")) {
                        if (!Array.isArray(m.cmdline))
                            return "cmdline: array expected";
                        for (var i = 0; i < m.cmdline.length; ++i) {
                            if (!$util.isString(m.cmdline[i]))
                                return "cmdline: string[] expected";
                        }
                    }
                    if (m.threadsDeprecated != null && m.hasOwnProperty("threadsDeprecated")) {
                        if (!Array.isArray(m.threadsDeprecated))
                            return "threadsDeprecated: array expected";
                        for (var i = 0; i < m.threadsDeprecated.length; ++i) {
                            {
                                var e = $root.perfetto.protos.ProcessTree.Thread.verify(m.threadsDeprecated[i]);
                                if (e)
                                    return "threadsDeprecated." + e;
                            }
                        }
                    }
                    if (m.uid != null && m.hasOwnProperty("uid")) {
                        if (!$util.isInteger(m.uid))
                            return "uid: integer expected";
                    }
                    if (m.nspid != null && m.hasOwnProperty("nspid")) {
                        if (!Array.isArray(m.nspid))
                            return "nspid: array expected";
                        for (var i = 0; i < m.nspid.length; ++i) {
                            if (!$util.isInteger(m.nspid[i]))
                                return "nspid: integer[] expected";
                        }
                    }
                    return null;
                };

                /**
                 * Creates a Process message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.ProcessTree.Process
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.ProcessTree.Process} Process
                 */
                Process.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.ProcessTree.Process)
                        return d;
                    var m = new $root.perfetto.protos.ProcessTree.Process();
                    if (d.pid != null) {
                        m.pid = d.pid | 0;
                    }
                    if (d.ppid != null) {
                        m.ppid = d.ppid | 0;
                    }
                    if (d.cmdline) {
                        if (!Array.isArray(d.cmdline))
                            throw TypeError(".perfetto.protos.ProcessTree.Process.cmdline: array expected");
                        m.cmdline = [];
                        for (var i = 0; i < d.cmdline.length; ++i) {
                            m.cmdline[i] = String(d.cmdline[i]);
                        }
                    }
                    if (d.threadsDeprecated) {
                        if (!Array.isArray(d.threadsDeprecated))
                            throw TypeError(".perfetto.protos.ProcessTree.Process.threadsDeprecated: array expected");
                        m.threadsDeprecated = [];
                        for (var i = 0; i < d.threadsDeprecated.length; ++i) {
                            if (typeof d.threadsDeprecated[i] !== "object")
                                throw TypeError(".perfetto.protos.ProcessTree.Process.threadsDeprecated: object expected");
                            m.threadsDeprecated[i] = $root.perfetto.protos.ProcessTree.Thread.fromObject(d.threadsDeprecated[i]);
                        }
                    }
                    if (d.uid != null) {
                        m.uid = d.uid | 0;
                    }
                    if (d.nspid) {
                        if (!Array.isArray(d.nspid))
                            throw TypeError(".perfetto.protos.ProcessTree.Process.nspid: array expected");
                        m.nspid = [];
                        for (var i = 0; i < d.nspid.length; ++i) {
                            m.nspid[i] = d.nspid[i] | 0;
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Process message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.ProcessTree.Process
                 * @static
                 * @param {perfetto.protos.ProcessTree.Process} m Process
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Process.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.cmdline = [];
                        d.threadsDeprecated = [];
                        d.nspid = [];
                    }
                    if (o.defaults) {
                        d.pid = 0;
                        d.ppid = 0;
                        d.uid = 0;
                    }
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        d.pid = m.pid;
                    }
                    if (m.ppid != null && m.hasOwnProperty("ppid")) {
                        d.ppid = m.ppid;
                    }
                    if (m.cmdline && m.cmdline.length) {
                        d.cmdline = [];
                        for (var j = 0; j < m.cmdline.length; ++j) {
                            d.cmdline[j] = m.cmdline[j];
                        }
                    }
                    if (m.threadsDeprecated && m.threadsDeprecated.length) {
                        d.threadsDeprecated = [];
                        for (var j = 0; j < m.threadsDeprecated.length; ++j) {
                            d.threadsDeprecated[j] = $root.perfetto.protos.ProcessTree.Thread.toObject(m.threadsDeprecated[j], o);
                        }
                    }
                    if (m.uid != null && m.hasOwnProperty("uid")) {
                        d.uid = m.uid;
                    }
                    if (m.nspid && m.nspid.length) {
                        d.nspid = [];
                        for (var j = 0; j < m.nspid.length; ++j) {
                            d.nspid[j] = m.nspid[j];
                        }
                    }
                    return d;
                };

                /**
                 * Converts this Process to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.ProcessTree.Process
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Process.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Process;
            })();

            return ProcessTree;
        })();

        protos.SysStats = (function() {

            /**
             * Properties of a SysStats.
             * @memberof perfetto.protos
             * @interface ISysStats
             * @property {Array.<perfetto.protos.SysStats.IMeminfoValue>|null} [meminfo] SysStats meminfo
             * @property {Array.<perfetto.protos.SysStats.IVmstatValue>|null} [vmstat] SysStats vmstat
             * @property {Array.<perfetto.protos.SysStats.ICpuTimes>|null} [cpuStat] SysStats cpuStat
             * @property {number|null} [numForks] SysStats numForks
             * @property {number|null} [numIrqTotal] SysStats numIrqTotal
             * @property {Array.<perfetto.protos.SysStats.IInterruptCount>|null} [numIrq] SysStats numIrq
             * @property {number|null} [numSoftirqTotal] SysStats numSoftirqTotal
             * @property {Array.<perfetto.protos.SysStats.IInterruptCount>|null} [numSoftirq] SysStats numSoftirq
             * @property {number|null} [collectionEndTimestamp] SysStats collectionEndTimestamp
             * @property {Array.<perfetto.protos.SysStats.IDevfreqValue>|null} [devfreq] SysStats devfreq
             * @property {Array.<number>|null} [cpufreqKhz] SysStats cpufreqKhz
             * @property {Array.<perfetto.protos.SysStats.IBuddyInfo>|null} [buddyInfo] SysStats buddyInfo
             * @property {Array.<perfetto.protos.SysStats.IDiskStat>|null} [diskStat] SysStats diskStat
             */

            /**
             * Constructs a new SysStats.
             * @memberof perfetto.protos
             * @classdesc Represents a SysStats.
             * @implements ISysStats
             * @constructor
             * @param {perfetto.protos.ISysStats=} [p] Properties to set
             */
            function SysStats(p) {
                this.meminfo = [];
                this.vmstat = [];
                this.cpuStat = [];
                this.numIrq = [];
                this.numSoftirq = [];
                this.devfreq = [];
                this.cpufreqKhz = [];
                this.buddyInfo = [];
                this.diskStat = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SysStats meminfo.
             * @member {Array.<perfetto.protos.SysStats.IMeminfoValue>} meminfo
             * @memberof perfetto.protos.SysStats
             * @instance
             */
            SysStats.prototype.meminfo = $util.emptyArray;

            /**
             * SysStats vmstat.
             * @member {Array.<perfetto.protos.SysStats.IVmstatValue>} vmstat
             * @memberof perfetto.protos.SysStats
             * @instance
             */
            SysStats.prototype.vmstat = $util.emptyArray;

            /**
             * SysStats cpuStat.
             * @member {Array.<perfetto.protos.SysStats.ICpuTimes>} cpuStat
             * @memberof perfetto.protos.SysStats
             * @instance
             */
            SysStats.prototype.cpuStat = $util.emptyArray;

            /**
             * SysStats numForks.
             * @member {number} numForks
             * @memberof perfetto.protos.SysStats
             * @instance
             */
            SysStats.prototype.numForks = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SysStats numIrqTotal.
             * @member {number} numIrqTotal
             * @memberof perfetto.protos.SysStats
             * @instance
             */
            SysStats.prototype.numIrqTotal = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SysStats numIrq.
             * @member {Array.<perfetto.protos.SysStats.IInterruptCount>} numIrq
             * @memberof perfetto.protos.SysStats
             * @instance
             */
            SysStats.prototype.numIrq = $util.emptyArray;

            /**
             * SysStats numSoftirqTotal.
             * @member {number} numSoftirqTotal
             * @memberof perfetto.protos.SysStats
             * @instance
             */
            SysStats.prototype.numSoftirqTotal = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SysStats numSoftirq.
             * @member {Array.<perfetto.protos.SysStats.IInterruptCount>} numSoftirq
             * @memberof perfetto.protos.SysStats
             * @instance
             */
            SysStats.prototype.numSoftirq = $util.emptyArray;

            /**
             * SysStats collectionEndTimestamp.
             * @member {number} collectionEndTimestamp
             * @memberof perfetto.protos.SysStats
             * @instance
             */
            SysStats.prototype.collectionEndTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SysStats devfreq.
             * @member {Array.<perfetto.protos.SysStats.IDevfreqValue>} devfreq
             * @memberof perfetto.protos.SysStats
             * @instance
             */
            SysStats.prototype.devfreq = $util.emptyArray;

            /**
             * SysStats cpufreqKhz.
             * @member {Array.<number>} cpufreqKhz
             * @memberof perfetto.protos.SysStats
             * @instance
             */
            SysStats.prototype.cpufreqKhz = $util.emptyArray;

            /**
             * SysStats buddyInfo.
             * @member {Array.<perfetto.protos.SysStats.IBuddyInfo>} buddyInfo
             * @memberof perfetto.protos.SysStats
             * @instance
             */
            SysStats.prototype.buddyInfo = $util.emptyArray;

            /**
             * SysStats diskStat.
             * @member {Array.<perfetto.protos.SysStats.IDiskStat>} diskStat
             * @memberof perfetto.protos.SysStats
             * @instance
             */
            SysStats.prototype.diskStat = $util.emptyArray;

            /**
             * Creates a new SysStats instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SysStats
             * @static
             * @param {perfetto.protos.ISysStats=} [properties] Properties to set
             * @returns {perfetto.protos.SysStats} SysStats instance
             */
            SysStats.create = function create(properties) {
                return new SysStats(properties);
            };

            /**
             * Encodes the specified SysStats message. Does not implicitly {@link perfetto.protos.SysStats.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SysStats
             * @static
             * @param {perfetto.protos.ISysStats} m SysStats message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SysStats.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.meminfo != null && m.meminfo.length) {
                    for (var i = 0; i < m.meminfo.length; ++i)
                        $root.perfetto.protos.SysStats.MeminfoValue.encode(m.meminfo[i], w.uint32(10).fork()).ldelim();
                }
                if (m.vmstat != null && m.vmstat.length) {
                    for (var i = 0; i < m.vmstat.length; ++i)
                        $root.perfetto.protos.SysStats.VmstatValue.encode(m.vmstat[i], w.uint32(18).fork()).ldelim();
                }
                if (m.cpuStat != null && m.cpuStat.length) {
                    for (var i = 0; i < m.cpuStat.length; ++i)
                        $root.perfetto.protos.SysStats.CpuTimes.encode(m.cpuStat[i], w.uint32(26).fork()).ldelim();
                }
                if (m.numForks != null && Object.hasOwnProperty.call(m, "numForks"))
                    w.uint32(32).uint64(m.numForks);
                if (m.numIrqTotal != null && Object.hasOwnProperty.call(m, "numIrqTotal"))
                    w.uint32(40).uint64(m.numIrqTotal);
                if (m.numIrq != null && m.numIrq.length) {
                    for (var i = 0; i < m.numIrq.length; ++i)
                        $root.perfetto.protos.SysStats.InterruptCount.encode(m.numIrq[i], w.uint32(50).fork()).ldelim();
                }
                if (m.numSoftirqTotal != null && Object.hasOwnProperty.call(m, "numSoftirqTotal"))
                    w.uint32(56).uint64(m.numSoftirqTotal);
                if (m.numSoftirq != null && m.numSoftirq.length) {
                    for (var i = 0; i < m.numSoftirq.length; ++i)
                        $root.perfetto.protos.SysStats.InterruptCount.encode(m.numSoftirq[i], w.uint32(66).fork()).ldelim();
                }
                if (m.collectionEndTimestamp != null && Object.hasOwnProperty.call(m, "collectionEndTimestamp"))
                    w.uint32(72).uint64(m.collectionEndTimestamp);
                if (m.devfreq != null && m.devfreq.length) {
                    for (var i = 0; i < m.devfreq.length; ++i)
                        $root.perfetto.protos.SysStats.DevfreqValue.encode(m.devfreq[i], w.uint32(82).fork()).ldelim();
                }
                if (m.cpufreqKhz != null && m.cpufreqKhz.length) {
                    for (var i = 0; i < m.cpufreqKhz.length; ++i)
                        w.uint32(88).uint32(m.cpufreqKhz[i]);
                }
                if (m.buddyInfo != null && m.buddyInfo.length) {
                    for (var i = 0; i < m.buddyInfo.length; ++i)
                        $root.perfetto.protos.SysStats.BuddyInfo.encode(m.buddyInfo[i], w.uint32(98).fork()).ldelim();
                }
                if (m.diskStat != null && m.diskStat.length) {
                    for (var i = 0; i < m.diskStat.length; ++i)
                        $root.perfetto.protos.SysStats.DiskStat.encode(m.diskStat[i], w.uint32(106).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified SysStats message, length delimited. Does not implicitly {@link perfetto.protos.SysStats.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SysStats
             * @static
             * @param {perfetto.protos.ISysStats} message SysStats message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SysStats.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SysStats message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SysStats
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SysStats} SysStats
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SysStats.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SysStats();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.meminfo && m.meminfo.length))
                            m.meminfo = [];
                        m.meminfo.push($root.perfetto.protos.SysStats.MeminfoValue.decode(r, r.uint32()));
                        break;
                    case 2:
                        if (!(m.vmstat && m.vmstat.length))
                            m.vmstat = [];
                        m.vmstat.push($root.perfetto.protos.SysStats.VmstatValue.decode(r, r.uint32()));
                        break;
                    case 3:
                        if (!(m.cpuStat && m.cpuStat.length))
                            m.cpuStat = [];
                        m.cpuStat.push($root.perfetto.protos.SysStats.CpuTimes.decode(r, r.uint32()));
                        break;
                    case 4:
                        m.numForks = r.uint64();
                        break;
                    case 5:
                        m.numIrqTotal = r.uint64();
                        break;
                    case 6:
                        if (!(m.numIrq && m.numIrq.length))
                            m.numIrq = [];
                        m.numIrq.push($root.perfetto.protos.SysStats.InterruptCount.decode(r, r.uint32()));
                        break;
                    case 7:
                        m.numSoftirqTotal = r.uint64();
                        break;
                    case 8:
                        if (!(m.numSoftirq && m.numSoftirq.length))
                            m.numSoftirq = [];
                        m.numSoftirq.push($root.perfetto.protos.SysStats.InterruptCount.decode(r, r.uint32()));
                        break;
                    case 9:
                        m.collectionEndTimestamp = r.uint64();
                        break;
                    case 10:
                        if (!(m.devfreq && m.devfreq.length))
                            m.devfreq = [];
                        m.devfreq.push($root.perfetto.protos.SysStats.DevfreqValue.decode(r, r.uint32()));
                        break;
                    case 11:
                        if (!(m.cpufreqKhz && m.cpufreqKhz.length))
                            m.cpufreqKhz = [];
                        if ((t & 7) === 2) {
                            var c2 = r.uint32() + r.pos;
                            while (r.pos < c2)
                                m.cpufreqKhz.push(r.uint32());
                        } else
                            m.cpufreqKhz.push(r.uint32());
                        break;
                    case 12:
                        if (!(m.buddyInfo && m.buddyInfo.length))
                            m.buddyInfo = [];
                        m.buddyInfo.push($root.perfetto.protos.SysStats.BuddyInfo.decode(r, r.uint32()));
                        break;
                    case 13:
                        if (!(m.diskStat && m.diskStat.length))
                            m.diskStat = [];
                        m.diskStat.push($root.perfetto.protos.SysStats.DiskStat.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SysStats message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SysStats
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SysStats} SysStats
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SysStats.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SysStats message.
             * @function verify
             * @memberof perfetto.protos.SysStats
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SysStats.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.meminfo != null && m.hasOwnProperty("meminfo")) {
                    if (!Array.isArray(m.meminfo))
                        return "meminfo: array expected";
                    for (var i = 0; i < m.meminfo.length; ++i) {
                        {
                            var e = $root.perfetto.protos.SysStats.MeminfoValue.verify(m.meminfo[i]);
                            if (e)
                                return "meminfo." + e;
                        }
                    }
                }
                if (m.vmstat != null && m.hasOwnProperty("vmstat")) {
                    if (!Array.isArray(m.vmstat))
                        return "vmstat: array expected";
                    for (var i = 0; i < m.vmstat.length; ++i) {
                        {
                            var e = $root.perfetto.protos.SysStats.VmstatValue.verify(m.vmstat[i]);
                            if (e)
                                return "vmstat." + e;
                        }
                    }
                }
                if (m.cpuStat != null && m.hasOwnProperty("cpuStat")) {
                    if (!Array.isArray(m.cpuStat))
                        return "cpuStat: array expected";
                    for (var i = 0; i < m.cpuStat.length; ++i) {
                        {
                            var e = $root.perfetto.protos.SysStats.CpuTimes.verify(m.cpuStat[i]);
                            if (e)
                                return "cpuStat." + e;
                        }
                    }
                }
                if (m.numForks != null && m.hasOwnProperty("numForks")) {
                    if (!$util.isInteger(m.numForks) && !(m.numForks && $util.isInteger(m.numForks.low) && $util.isInteger(m.numForks.high)))
                        return "numForks: integer|Long expected";
                }
                if (m.numIrqTotal != null && m.hasOwnProperty("numIrqTotal")) {
                    if (!$util.isInteger(m.numIrqTotal) && !(m.numIrqTotal && $util.isInteger(m.numIrqTotal.low) && $util.isInteger(m.numIrqTotal.high)))
                        return "numIrqTotal: integer|Long expected";
                }
                if (m.numIrq != null && m.hasOwnProperty("numIrq")) {
                    if (!Array.isArray(m.numIrq))
                        return "numIrq: array expected";
                    for (var i = 0; i < m.numIrq.length; ++i) {
                        {
                            var e = $root.perfetto.protos.SysStats.InterruptCount.verify(m.numIrq[i]);
                            if (e)
                                return "numIrq." + e;
                        }
                    }
                }
                if (m.numSoftirqTotal != null && m.hasOwnProperty("numSoftirqTotal")) {
                    if (!$util.isInteger(m.numSoftirqTotal) && !(m.numSoftirqTotal && $util.isInteger(m.numSoftirqTotal.low) && $util.isInteger(m.numSoftirqTotal.high)))
                        return "numSoftirqTotal: integer|Long expected";
                }
                if (m.numSoftirq != null && m.hasOwnProperty("numSoftirq")) {
                    if (!Array.isArray(m.numSoftirq))
                        return "numSoftirq: array expected";
                    for (var i = 0; i < m.numSoftirq.length; ++i) {
                        {
                            var e = $root.perfetto.protos.SysStats.InterruptCount.verify(m.numSoftirq[i]);
                            if (e)
                                return "numSoftirq." + e;
                        }
                    }
                }
                if (m.collectionEndTimestamp != null && m.hasOwnProperty("collectionEndTimestamp")) {
                    if (!$util.isInteger(m.collectionEndTimestamp) && !(m.collectionEndTimestamp && $util.isInteger(m.collectionEndTimestamp.low) && $util.isInteger(m.collectionEndTimestamp.high)))
                        return "collectionEndTimestamp: integer|Long expected";
                }
                if (m.devfreq != null && m.hasOwnProperty("devfreq")) {
                    if (!Array.isArray(m.devfreq))
                        return "devfreq: array expected";
                    for (var i = 0; i < m.devfreq.length; ++i) {
                        {
                            var e = $root.perfetto.protos.SysStats.DevfreqValue.verify(m.devfreq[i]);
                            if (e)
                                return "devfreq." + e;
                        }
                    }
                }
                if (m.cpufreqKhz != null && m.hasOwnProperty("cpufreqKhz")) {
                    if (!Array.isArray(m.cpufreqKhz))
                        return "cpufreqKhz: array expected";
                    for (var i = 0; i < m.cpufreqKhz.length; ++i) {
                        if (!$util.isInteger(m.cpufreqKhz[i]))
                            return "cpufreqKhz: integer[] expected";
                    }
                }
                if (m.buddyInfo != null && m.hasOwnProperty("buddyInfo")) {
                    if (!Array.isArray(m.buddyInfo))
                        return "buddyInfo: array expected";
                    for (var i = 0; i < m.buddyInfo.length; ++i) {
                        {
                            var e = $root.perfetto.protos.SysStats.BuddyInfo.verify(m.buddyInfo[i]);
                            if (e)
                                return "buddyInfo." + e;
                        }
                    }
                }
                if (m.diskStat != null && m.hasOwnProperty("diskStat")) {
                    if (!Array.isArray(m.diskStat))
                        return "diskStat: array expected";
                    for (var i = 0; i < m.diskStat.length; ++i) {
                        {
                            var e = $root.perfetto.protos.SysStats.DiskStat.verify(m.diskStat[i]);
                            if (e)
                                return "diskStat." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a SysStats message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SysStats
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SysStats} SysStats
             */
            SysStats.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SysStats)
                    return d;
                var m = new $root.perfetto.protos.SysStats();
                if (d.meminfo) {
                    if (!Array.isArray(d.meminfo))
                        throw TypeError(".perfetto.protos.SysStats.meminfo: array expected");
                    m.meminfo = [];
                    for (var i = 0; i < d.meminfo.length; ++i) {
                        if (typeof d.meminfo[i] !== "object")
                            throw TypeError(".perfetto.protos.SysStats.meminfo: object expected");
                        m.meminfo[i] = $root.perfetto.protos.SysStats.MeminfoValue.fromObject(d.meminfo[i]);
                    }
                }
                if (d.vmstat) {
                    if (!Array.isArray(d.vmstat))
                        throw TypeError(".perfetto.protos.SysStats.vmstat: array expected");
                    m.vmstat = [];
                    for (var i = 0; i < d.vmstat.length; ++i) {
                        if (typeof d.vmstat[i] !== "object")
                            throw TypeError(".perfetto.protos.SysStats.vmstat: object expected");
                        m.vmstat[i] = $root.perfetto.protos.SysStats.VmstatValue.fromObject(d.vmstat[i]);
                    }
                }
                if (d.cpuStat) {
                    if (!Array.isArray(d.cpuStat))
                        throw TypeError(".perfetto.protos.SysStats.cpuStat: array expected");
                    m.cpuStat = [];
                    for (var i = 0; i < d.cpuStat.length; ++i) {
                        if (typeof d.cpuStat[i] !== "object")
                            throw TypeError(".perfetto.protos.SysStats.cpuStat: object expected");
                        m.cpuStat[i] = $root.perfetto.protos.SysStats.CpuTimes.fromObject(d.cpuStat[i]);
                    }
                }
                if (d.numForks != null) {
                    if ($util.Long)
                        (m.numForks = $util.Long.fromValue(d.numForks)).unsigned = true;
                    else if (typeof d.numForks === "string")
                        m.numForks = parseInt(d.numForks, 10);
                    else if (typeof d.numForks === "number")
                        m.numForks = d.numForks;
                    else if (typeof d.numForks === "object")
                        m.numForks = new $util.LongBits(d.numForks.low >>> 0, d.numForks.high >>> 0).toNumber(true);
                }
                if (d.numIrqTotal != null) {
                    if ($util.Long)
                        (m.numIrqTotal = $util.Long.fromValue(d.numIrqTotal)).unsigned = true;
                    else if (typeof d.numIrqTotal === "string")
                        m.numIrqTotal = parseInt(d.numIrqTotal, 10);
                    else if (typeof d.numIrqTotal === "number")
                        m.numIrqTotal = d.numIrqTotal;
                    else if (typeof d.numIrqTotal === "object")
                        m.numIrqTotal = new $util.LongBits(d.numIrqTotal.low >>> 0, d.numIrqTotal.high >>> 0).toNumber(true);
                }
                if (d.numIrq) {
                    if (!Array.isArray(d.numIrq))
                        throw TypeError(".perfetto.protos.SysStats.numIrq: array expected");
                    m.numIrq = [];
                    for (var i = 0; i < d.numIrq.length; ++i) {
                        if (typeof d.numIrq[i] !== "object")
                            throw TypeError(".perfetto.protos.SysStats.numIrq: object expected");
                        m.numIrq[i] = $root.perfetto.protos.SysStats.InterruptCount.fromObject(d.numIrq[i]);
                    }
                }
                if (d.numSoftirqTotal != null) {
                    if ($util.Long)
                        (m.numSoftirqTotal = $util.Long.fromValue(d.numSoftirqTotal)).unsigned = true;
                    else if (typeof d.numSoftirqTotal === "string")
                        m.numSoftirqTotal = parseInt(d.numSoftirqTotal, 10);
                    else if (typeof d.numSoftirqTotal === "number")
                        m.numSoftirqTotal = d.numSoftirqTotal;
                    else if (typeof d.numSoftirqTotal === "object")
                        m.numSoftirqTotal = new $util.LongBits(d.numSoftirqTotal.low >>> 0, d.numSoftirqTotal.high >>> 0).toNumber(true);
                }
                if (d.numSoftirq) {
                    if (!Array.isArray(d.numSoftirq))
                        throw TypeError(".perfetto.protos.SysStats.numSoftirq: array expected");
                    m.numSoftirq = [];
                    for (var i = 0; i < d.numSoftirq.length; ++i) {
                        if (typeof d.numSoftirq[i] !== "object")
                            throw TypeError(".perfetto.protos.SysStats.numSoftirq: object expected");
                        m.numSoftirq[i] = $root.perfetto.protos.SysStats.InterruptCount.fromObject(d.numSoftirq[i]);
                    }
                }
                if (d.collectionEndTimestamp != null) {
                    if ($util.Long)
                        (m.collectionEndTimestamp = $util.Long.fromValue(d.collectionEndTimestamp)).unsigned = true;
                    else if (typeof d.collectionEndTimestamp === "string")
                        m.collectionEndTimestamp = parseInt(d.collectionEndTimestamp, 10);
                    else if (typeof d.collectionEndTimestamp === "number")
                        m.collectionEndTimestamp = d.collectionEndTimestamp;
                    else if (typeof d.collectionEndTimestamp === "object")
                        m.collectionEndTimestamp = new $util.LongBits(d.collectionEndTimestamp.low >>> 0, d.collectionEndTimestamp.high >>> 0).toNumber(true);
                }
                if (d.devfreq) {
                    if (!Array.isArray(d.devfreq))
                        throw TypeError(".perfetto.protos.SysStats.devfreq: array expected");
                    m.devfreq = [];
                    for (var i = 0; i < d.devfreq.length; ++i) {
                        if (typeof d.devfreq[i] !== "object")
                            throw TypeError(".perfetto.protos.SysStats.devfreq: object expected");
                        m.devfreq[i] = $root.perfetto.protos.SysStats.DevfreqValue.fromObject(d.devfreq[i]);
                    }
                }
                if (d.cpufreqKhz) {
                    if (!Array.isArray(d.cpufreqKhz))
                        throw TypeError(".perfetto.protos.SysStats.cpufreqKhz: array expected");
                    m.cpufreqKhz = [];
                    for (var i = 0; i < d.cpufreqKhz.length; ++i) {
                        m.cpufreqKhz[i] = d.cpufreqKhz[i] >>> 0;
                    }
                }
                if (d.buddyInfo) {
                    if (!Array.isArray(d.buddyInfo))
                        throw TypeError(".perfetto.protos.SysStats.buddyInfo: array expected");
                    m.buddyInfo = [];
                    for (var i = 0; i < d.buddyInfo.length; ++i) {
                        if (typeof d.buddyInfo[i] !== "object")
                            throw TypeError(".perfetto.protos.SysStats.buddyInfo: object expected");
                        m.buddyInfo[i] = $root.perfetto.protos.SysStats.BuddyInfo.fromObject(d.buddyInfo[i]);
                    }
                }
                if (d.diskStat) {
                    if (!Array.isArray(d.diskStat))
                        throw TypeError(".perfetto.protos.SysStats.diskStat: array expected");
                    m.diskStat = [];
                    for (var i = 0; i < d.diskStat.length; ++i) {
                        if (typeof d.diskStat[i] !== "object")
                            throw TypeError(".perfetto.protos.SysStats.diskStat: object expected");
                        m.diskStat[i] = $root.perfetto.protos.SysStats.DiskStat.fromObject(d.diskStat[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a SysStats message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SysStats
             * @static
             * @param {perfetto.protos.SysStats} m SysStats
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SysStats.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.meminfo = [];
                    d.vmstat = [];
                    d.cpuStat = [];
                    d.numIrq = [];
                    d.numSoftirq = [];
                    d.devfreq = [];
                    d.cpufreqKhz = [];
                    d.buddyInfo = [];
                    d.diskStat = [];
                }
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.numForks = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.numForks = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.numIrqTotal = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.numIrqTotal = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.numSoftirqTotal = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.numSoftirqTotal = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.collectionEndTimestamp = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.collectionEndTimestamp = o.longs === String ? "0" : 0;
                }
                if (m.meminfo && m.meminfo.length) {
                    d.meminfo = [];
                    for (var j = 0; j < m.meminfo.length; ++j) {
                        d.meminfo[j] = $root.perfetto.protos.SysStats.MeminfoValue.toObject(m.meminfo[j], o);
                    }
                }
                if (m.vmstat && m.vmstat.length) {
                    d.vmstat = [];
                    for (var j = 0; j < m.vmstat.length; ++j) {
                        d.vmstat[j] = $root.perfetto.protos.SysStats.VmstatValue.toObject(m.vmstat[j], o);
                    }
                }
                if (m.cpuStat && m.cpuStat.length) {
                    d.cpuStat = [];
                    for (var j = 0; j < m.cpuStat.length; ++j) {
                        d.cpuStat[j] = $root.perfetto.protos.SysStats.CpuTimes.toObject(m.cpuStat[j], o);
                    }
                }
                if (m.numForks != null && m.hasOwnProperty("numForks")) {
                    if (typeof m.numForks === "number")
                        d.numForks = o.longs === String ? String(m.numForks) : m.numForks;
                    else
                        d.numForks = o.longs === String ? $util.Long.prototype.toString.call(m.numForks) : o.longs === Number ? new $util.LongBits(m.numForks.low >>> 0, m.numForks.high >>> 0).toNumber(true) : m.numForks;
                }
                if (m.numIrqTotal != null && m.hasOwnProperty("numIrqTotal")) {
                    if (typeof m.numIrqTotal === "number")
                        d.numIrqTotal = o.longs === String ? String(m.numIrqTotal) : m.numIrqTotal;
                    else
                        d.numIrqTotal = o.longs === String ? $util.Long.prototype.toString.call(m.numIrqTotal) : o.longs === Number ? new $util.LongBits(m.numIrqTotal.low >>> 0, m.numIrqTotal.high >>> 0).toNumber(true) : m.numIrqTotal;
                }
                if (m.numIrq && m.numIrq.length) {
                    d.numIrq = [];
                    for (var j = 0; j < m.numIrq.length; ++j) {
                        d.numIrq[j] = $root.perfetto.protos.SysStats.InterruptCount.toObject(m.numIrq[j], o);
                    }
                }
                if (m.numSoftirqTotal != null && m.hasOwnProperty("numSoftirqTotal")) {
                    if (typeof m.numSoftirqTotal === "number")
                        d.numSoftirqTotal = o.longs === String ? String(m.numSoftirqTotal) : m.numSoftirqTotal;
                    else
                        d.numSoftirqTotal = o.longs === String ? $util.Long.prototype.toString.call(m.numSoftirqTotal) : o.longs === Number ? new $util.LongBits(m.numSoftirqTotal.low >>> 0, m.numSoftirqTotal.high >>> 0).toNumber(true) : m.numSoftirqTotal;
                }
                if (m.numSoftirq && m.numSoftirq.length) {
                    d.numSoftirq = [];
                    for (var j = 0; j < m.numSoftirq.length; ++j) {
                        d.numSoftirq[j] = $root.perfetto.protos.SysStats.InterruptCount.toObject(m.numSoftirq[j], o);
                    }
                }
                if (m.collectionEndTimestamp != null && m.hasOwnProperty("collectionEndTimestamp")) {
                    if (typeof m.collectionEndTimestamp === "number")
                        d.collectionEndTimestamp = o.longs === String ? String(m.collectionEndTimestamp) : m.collectionEndTimestamp;
                    else
                        d.collectionEndTimestamp = o.longs === String ? $util.Long.prototype.toString.call(m.collectionEndTimestamp) : o.longs === Number ? new $util.LongBits(m.collectionEndTimestamp.low >>> 0, m.collectionEndTimestamp.high >>> 0).toNumber(true) : m.collectionEndTimestamp;
                }
                if (m.devfreq && m.devfreq.length) {
                    d.devfreq = [];
                    for (var j = 0; j < m.devfreq.length; ++j) {
                        d.devfreq[j] = $root.perfetto.protos.SysStats.DevfreqValue.toObject(m.devfreq[j], o);
                    }
                }
                if (m.cpufreqKhz && m.cpufreqKhz.length) {
                    d.cpufreqKhz = [];
                    for (var j = 0; j < m.cpufreqKhz.length; ++j) {
                        d.cpufreqKhz[j] = m.cpufreqKhz[j];
                    }
                }
                if (m.buddyInfo && m.buddyInfo.length) {
                    d.buddyInfo = [];
                    for (var j = 0; j < m.buddyInfo.length; ++j) {
                        d.buddyInfo[j] = $root.perfetto.protos.SysStats.BuddyInfo.toObject(m.buddyInfo[j], o);
                    }
                }
                if (m.diskStat && m.diskStat.length) {
                    d.diskStat = [];
                    for (var j = 0; j < m.diskStat.length; ++j) {
                        d.diskStat[j] = $root.perfetto.protos.SysStats.DiskStat.toObject(m.diskStat[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this SysStats to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SysStats
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SysStats.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            SysStats.MeminfoValue = (function() {

                /**
                 * Properties of a MeminfoValue.
                 * @memberof perfetto.protos.SysStats
                 * @interface IMeminfoValue
                 * @property {perfetto.protos.MeminfoCounters|null} [key] MeminfoValue key
                 * @property {number|null} [value] MeminfoValue value
                 */

                /**
                 * Constructs a new MeminfoValue.
                 * @memberof perfetto.protos.SysStats
                 * @classdesc Represents a MeminfoValue.
                 * @implements IMeminfoValue
                 * @constructor
                 * @param {perfetto.protos.SysStats.IMeminfoValue=} [p] Properties to set
                 */
                function MeminfoValue(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * MeminfoValue key.
                 * @member {perfetto.protos.MeminfoCounters} key
                 * @memberof perfetto.protos.SysStats.MeminfoValue
                 * @instance
                 */
                MeminfoValue.prototype.key = 0;

                /**
                 * MeminfoValue value.
                 * @member {number} value
                 * @memberof perfetto.protos.SysStats.MeminfoValue
                 * @instance
                 */
                MeminfoValue.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Creates a new MeminfoValue instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.SysStats.MeminfoValue
                 * @static
                 * @param {perfetto.protos.SysStats.IMeminfoValue=} [properties] Properties to set
                 * @returns {perfetto.protos.SysStats.MeminfoValue} MeminfoValue instance
                 */
                MeminfoValue.create = function create(properties) {
                    return new MeminfoValue(properties);
                };

                /**
                 * Encodes the specified MeminfoValue message. Does not implicitly {@link perfetto.protos.SysStats.MeminfoValue.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.SysStats.MeminfoValue
                 * @static
                 * @param {perfetto.protos.SysStats.IMeminfoValue} m MeminfoValue message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                MeminfoValue.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.key != null && Object.hasOwnProperty.call(m, "key"))
                        w.uint32(8).int32(m.key);
                    if (m.value != null && Object.hasOwnProperty.call(m, "value"))
                        w.uint32(16).uint64(m.value);
                    return w;
                };

                /**
                 * Encodes the specified MeminfoValue message, length delimited. Does not implicitly {@link perfetto.protos.SysStats.MeminfoValue.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.SysStats.MeminfoValue
                 * @static
                 * @param {perfetto.protos.SysStats.IMeminfoValue} message MeminfoValue message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                MeminfoValue.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a MeminfoValue message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.SysStats.MeminfoValue
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.SysStats.MeminfoValue} MeminfoValue
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                MeminfoValue.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SysStats.MeminfoValue();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.key = r.int32();
                            break;
                        case 2:
                            m.value = r.uint64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a MeminfoValue message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.SysStats.MeminfoValue
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.SysStats.MeminfoValue} MeminfoValue
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                MeminfoValue.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a MeminfoValue message.
                 * @function verify
                 * @memberof perfetto.protos.SysStats.MeminfoValue
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                MeminfoValue.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.key != null && m.hasOwnProperty("key")) {
                        switch (m.key) {
                        default:
                            return "key: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                        case 6:
                        case 7:
                        case 8:
                        case 9:
                        case 10:
                        case 11:
                        case 12:
                        case 13:
                        case 14:
                        case 15:
                        case 16:
                        case 17:
                        case 18:
                        case 19:
                        case 20:
                        case 21:
                        case 22:
                        case 23:
                        case 24:
                        case 25:
                        case 26:
                        case 27:
                        case 28:
                        case 29:
                        case 30:
                        case 31:
                        case 32:
                        case 33:
                            break;
                        }
                    }
                    if (m.value != null && m.hasOwnProperty("value")) {
                        if (!$util.isInteger(m.value) && !(m.value && $util.isInteger(m.value.low) && $util.isInteger(m.value.high)))
                            return "value: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a MeminfoValue message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.SysStats.MeminfoValue
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.SysStats.MeminfoValue} MeminfoValue
                 */
                MeminfoValue.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.SysStats.MeminfoValue)
                        return d;
                    var m = new $root.perfetto.protos.SysStats.MeminfoValue();
                    switch (d.key) {
                    case "MEMINFO_UNSPECIFIED":
                    case 0:
                        m.key = 0;
                        break;
                    case "MEMINFO_MEM_TOTAL":
                    case 1:
                        m.key = 1;
                        break;
                    case "MEMINFO_MEM_FREE":
                    case 2:
                        m.key = 2;
                        break;
                    case "MEMINFO_MEM_AVAILABLE":
                    case 3:
                        m.key = 3;
                        break;
                    case "MEMINFO_BUFFERS":
                    case 4:
                        m.key = 4;
                        break;
                    case "MEMINFO_CACHED":
                    case 5:
                        m.key = 5;
                        break;
                    case "MEMINFO_SWAP_CACHED":
                    case 6:
                        m.key = 6;
                        break;
                    case "MEMINFO_ACTIVE":
                    case 7:
                        m.key = 7;
                        break;
                    case "MEMINFO_INACTIVE":
                    case 8:
                        m.key = 8;
                        break;
                    case "MEMINFO_ACTIVE_ANON":
                    case 9:
                        m.key = 9;
                        break;
                    case "MEMINFO_INACTIVE_ANON":
                    case 10:
                        m.key = 10;
                        break;
                    case "MEMINFO_ACTIVE_FILE":
                    case 11:
                        m.key = 11;
                        break;
                    case "MEMINFO_INACTIVE_FILE":
                    case 12:
                        m.key = 12;
                        break;
                    case "MEMINFO_UNEVICTABLE":
                    case 13:
                        m.key = 13;
                        break;
                    case "MEMINFO_MLOCKED":
                    case 14:
                        m.key = 14;
                        break;
                    case "MEMINFO_SWAP_TOTAL":
                    case 15:
                        m.key = 15;
                        break;
                    case "MEMINFO_SWAP_FREE":
                    case 16:
                        m.key = 16;
                        break;
                    case "MEMINFO_DIRTY":
                    case 17:
                        m.key = 17;
                        break;
                    case "MEMINFO_WRITEBACK":
                    case 18:
                        m.key = 18;
                        break;
                    case "MEMINFO_ANON_PAGES":
                    case 19:
                        m.key = 19;
                        break;
                    case "MEMINFO_MAPPED":
                    case 20:
                        m.key = 20;
                        break;
                    case "MEMINFO_SHMEM":
                    case 21:
                        m.key = 21;
                        break;
                    case "MEMINFO_SLAB":
                    case 22:
                        m.key = 22;
                        break;
                    case "MEMINFO_SLAB_RECLAIMABLE":
                    case 23:
                        m.key = 23;
                        break;
                    case "MEMINFO_SLAB_UNRECLAIMABLE":
                    case 24:
                        m.key = 24;
                        break;
                    case "MEMINFO_KERNEL_STACK":
                    case 25:
                        m.key = 25;
                        break;
                    case "MEMINFO_PAGE_TABLES":
                    case 26:
                        m.key = 26;
                        break;
                    case "MEMINFO_COMMIT_LIMIT":
                    case 27:
                        m.key = 27;
                        break;
                    case "MEMINFO_COMMITED_AS":
                    case 28:
                        m.key = 28;
                        break;
                    case "MEMINFO_VMALLOC_TOTAL":
                    case 29:
                        m.key = 29;
                        break;
                    case "MEMINFO_VMALLOC_USED":
                    case 30:
                        m.key = 30;
                        break;
                    case "MEMINFO_VMALLOC_CHUNK":
                    case 31:
                        m.key = 31;
                        break;
                    case "MEMINFO_CMA_TOTAL":
                    case 32:
                        m.key = 32;
                        break;
                    case "MEMINFO_CMA_FREE":
                    case 33:
                        m.key = 33;
                        break;
                    }
                    if (d.value != null) {
                        if ($util.Long)
                            (m.value = $util.Long.fromValue(d.value)).unsigned = true;
                        else if (typeof d.value === "string")
                            m.value = parseInt(d.value, 10);
                        else if (typeof d.value === "number")
                            m.value = d.value;
                        else if (typeof d.value === "object")
                            m.value = new $util.LongBits(d.value.low >>> 0, d.value.high >>> 0).toNumber(true);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a MeminfoValue message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.SysStats.MeminfoValue
                 * @static
                 * @param {perfetto.protos.SysStats.MeminfoValue} m MeminfoValue
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                MeminfoValue.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.key = o.enums === String ? "MEMINFO_UNSPECIFIED" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.value = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.value = o.longs === String ? "0" : 0;
                    }
                    if (m.key != null && m.hasOwnProperty("key")) {
                        d.key = o.enums === String ? $root.perfetto.protos.MeminfoCounters[m.key] : m.key;
                    }
                    if (m.value != null && m.hasOwnProperty("value")) {
                        if (typeof m.value === "number")
                            d.value = o.longs === String ? String(m.value) : m.value;
                        else
                            d.value = o.longs === String ? $util.Long.prototype.toString.call(m.value) : o.longs === Number ? new $util.LongBits(m.value.low >>> 0, m.value.high >>> 0).toNumber(true) : m.value;
                    }
                    return d;
                };

                /**
                 * Converts this MeminfoValue to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.SysStats.MeminfoValue
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                MeminfoValue.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return MeminfoValue;
            })();

            SysStats.VmstatValue = (function() {

                /**
                 * Properties of a VmstatValue.
                 * @memberof perfetto.protos.SysStats
                 * @interface IVmstatValue
                 * @property {perfetto.protos.VmstatCounters|null} [key] VmstatValue key
                 * @property {number|null} [value] VmstatValue value
                 */

                /**
                 * Constructs a new VmstatValue.
                 * @memberof perfetto.protos.SysStats
                 * @classdesc Represents a VmstatValue.
                 * @implements IVmstatValue
                 * @constructor
                 * @param {perfetto.protos.SysStats.IVmstatValue=} [p] Properties to set
                 */
                function VmstatValue(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * VmstatValue key.
                 * @member {perfetto.protos.VmstatCounters} key
                 * @memberof perfetto.protos.SysStats.VmstatValue
                 * @instance
                 */
                VmstatValue.prototype.key = 0;

                /**
                 * VmstatValue value.
                 * @member {number} value
                 * @memberof perfetto.protos.SysStats.VmstatValue
                 * @instance
                 */
                VmstatValue.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Creates a new VmstatValue instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.SysStats.VmstatValue
                 * @static
                 * @param {perfetto.protos.SysStats.IVmstatValue=} [properties] Properties to set
                 * @returns {perfetto.protos.SysStats.VmstatValue} VmstatValue instance
                 */
                VmstatValue.create = function create(properties) {
                    return new VmstatValue(properties);
                };

                /**
                 * Encodes the specified VmstatValue message. Does not implicitly {@link perfetto.protos.SysStats.VmstatValue.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.SysStats.VmstatValue
                 * @static
                 * @param {perfetto.protos.SysStats.IVmstatValue} m VmstatValue message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                VmstatValue.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.key != null && Object.hasOwnProperty.call(m, "key"))
                        w.uint32(8).int32(m.key);
                    if (m.value != null && Object.hasOwnProperty.call(m, "value"))
                        w.uint32(16).uint64(m.value);
                    return w;
                };

                /**
                 * Encodes the specified VmstatValue message, length delimited. Does not implicitly {@link perfetto.protos.SysStats.VmstatValue.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.SysStats.VmstatValue
                 * @static
                 * @param {perfetto.protos.SysStats.IVmstatValue} message VmstatValue message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                VmstatValue.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a VmstatValue message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.SysStats.VmstatValue
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.SysStats.VmstatValue} VmstatValue
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                VmstatValue.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SysStats.VmstatValue();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.key = r.int32();
                            break;
                        case 2:
                            m.value = r.uint64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a VmstatValue message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.SysStats.VmstatValue
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.SysStats.VmstatValue} VmstatValue
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                VmstatValue.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a VmstatValue message.
                 * @function verify
                 * @memberof perfetto.protos.SysStats.VmstatValue
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                VmstatValue.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.key != null && m.hasOwnProperty("key")) {
                        switch (m.key) {
                        default:
                            return "key: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                        case 6:
                        case 7:
                        case 8:
                        case 9:
                        case 10:
                        case 11:
                        case 12:
                        case 13:
                        case 14:
                        case 15:
                        case 16:
                        case 17:
                        case 18:
                        case 19:
                        case 20:
                        case 21:
                        case 22:
                        case 23:
                        case 24:
                        case 25:
                        case 26:
                        case 27:
                        case 28:
                        case 29:
                        case 30:
                        case 31:
                        case 32:
                        case 33:
                        case 34:
                        case 35:
                        case 36:
                        case 37:
                        case 38:
                        case 39:
                        case 40:
                        case 41:
                        case 42:
                        case 43:
                        case 44:
                        case 45:
                        case 46:
                        case 47:
                        case 48:
                        case 49:
                        case 50:
                        case 51:
                        case 52:
                        case 53:
                        case 54:
                        case 55:
                        case 56:
                        case 57:
                        case 58:
                        case 59:
                        case 60:
                        case 61:
                        case 62:
                        case 63:
                        case 64:
                        case 65:
                        case 66:
                        case 67:
                        case 68:
                        case 69:
                        case 70:
                        case 71:
                        case 72:
                        case 73:
                        case 74:
                        case 75:
                        case 76:
                        case 77:
                        case 78:
                        case 79:
                        case 80:
                        case 81:
                        case 82:
                        case 83:
                        case 84:
                        case 85:
                        case 86:
                        case 87:
                        case 88:
                        case 89:
                        case 90:
                        case 91:
                        case 92:
                        case 93:
                        case 94:
                        case 95:
                        case 96:
                        case 97:
                        case 98:
                        case 99:
                        case 100:
                        case 101:
                        case 102:
                        case 103:
                        case 104:
                        case 105:
                        case 106:
                        case 107:
                        case 108:
                        case 109:
                        case 110:
                        case 111:
                        case 112:
                        case 113:
                        case 114:
                        case 115:
                        case 116:
                        case 117:
                        case 118:
                        case 119:
                        case 120:
                        case 121:
                        case 122:
                        case 123:
                        case 124:
                        case 125:
                        case 126:
                        case 127:
                        case 128:
                            break;
                        }
                    }
                    if (m.value != null && m.hasOwnProperty("value")) {
                        if (!$util.isInteger(m.value) && !(m.value && $util.isInteger(m.value.low) && $util.isInteger(m.value.high)))
                            return "value: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a VmstatValue message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.SysStats.VmstatValue
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.SysStats.VmstatValue} VmstatValue
                 */
                VmstatValue.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.SysStats.VmstatValue)
                        return d;
                    var m = new $root.perfetto.protos.SysStats.VmstatValue();
                    switch (d.key) {
                    case "VMSTAT_UNSPECIFIED":
                    case 0:
                        m.key = 0;
                        break;
                    case "VMSTAT_NR_FREE_PAGES":
                    case 1:
                        m.key = 1;
                        break;
                    case "VMSTAT_NR_ALLOC_BATCH":
                    case 2:
                        m.key = 2;
                        break;
                    case "VMSTAT_NR_INACTIVE_ANON":
                    case 3:
                        m.key = 3;
                        break;
                    case "VMSTAT_NR_ACTIVE_ANON":
                    case 4:
                        m.key = 4;
                        break;
                    case "VMSTAT_NR_INACTIVE_FILE":
                    case 5:
                        m.key = 5;
                        break;
                    case "VMSTAT_NR_ACTIVE_FILE":
                    case 6:
                        m.key = 6;
                        break;
                    case "VMSTAT_NR_UNEVICTABLE":
                    case 7:
                        m.key = 7;
                        break;
                    case "VMSTAT_NR_MLOCK":
                    case 8:
                        m.key = 8;
                        break;
                    case "VMSTAT_NR_ANON_PAGES":
                    case 9:
                        m.key = 9;
                        break;
                    case "VMSTAT_NR_MAPPED":
                    case 10:
                        m.key = 10;
                        break;
                    case "VMSTAT_NR_FILE_PAGES":
                    case 11:
                        m.key = 11;
                        break;
                    case "VMSTAT_NR_DIRTY":
                    case 12:
                        m.key = 12;
                        break;
                    case "VMSTAT_NR_WRITEBACK":
                    case 13:
                        m.key = 13;
                        break;
                    case "VMSTAT_NR_SLAB_RECLAIMABLE":
                    case 14:
                        m.key = 14;
                        break;
                    case "VMSTAT_NR_SLAB_UNRECLAIMABLE":
                    case 15:
                        m.key = 15;
                        break;
                    case "VMSTAT_NR_PAGE_TABLE_PAGES":
                    case 16:
                        m.key = 16;
                        break;
                    case "VMSTAT_NR_KERNEL_STACK":
                    case 17:
                        m.key = 17;
                        break;
                    case "VMSTAT_NR_OVERHEAD":
                    case 18:
                        m.key = 18;
                        break;
                    case "VMSTAT_NR_UNSTABLE":
                    case 19:
                        m.key = 19;
                        break;
                    case "VMSTAT_NR_BOUNCE":
                    case 20:
                        m.key = 20;
                        break;
                    case "VMSTAT_NR_VMSCAN_WRITE":
                    case 21:
                        m.key = 21;
                        break;
                    case "VMSTAT_NR_VMSCAN_IMMEDIATE_RECLAIM":
                    case 22:
                        m.key = 22;
                        break;
                    case "VMSTAT_NR_WRITEBACK_TEMP":
                    case 23:
                        m.key = 23;
                        break;
                    case "VMSTAT_NR_ISOLATED_ANON":
                    case 24:
                        m.key = 24;
                        break;
                    case "VMSTAT_NR_ISOLATED_FILE":
                    case 25:
                        m.key = 25;
                        break;
                    case "VMSTAT_NR_SHMEM":
                    case 26:
                        m.key = 26;
                        break;
                    case "VMSTAT_NR_DIRTIED":
                    case 27:
                        m.key = 27;
                        break;
                    case "VMSTAT_NR_WRITTEN":
                    case 28:
                        m.key = 28;
                        break;
                    case "VMSTAT_NR_PAGES_SCANNED":
                    case 29:
                        m.key = 29;
                        break;
                    case "VMSTAT_WORKINGSET_REFAULT":
                    case 30:
                        m.key = 30;
                        break;
                    case "VMSTAT_WORKINGSET_ACTIVATE":
                    case 31:
                        m.key = 31;
                        break;
                    case "VMSTAT_WORKINGSET_NODERECLAIM":
                    case 32:
                        m.key = 32;
                        break;
                    case "VMSTAT_NR_ANON_TRANSPARENT_HUGEPAGES":
                    case 33:
                        m.key = 33;
                        break;
                    case "VMSTAT_NR_FREE_CMA":
                    case 34:
                        m.key = 34;
                        break;
                    case "VMSTAT_NR_SWAPCACHE":
                    case 35:
                        m.key = 35;
                        break;
                    case "VMSTAT_NR_DIRTY_THRESHOLD":
                    case 36:
                        m.key = 36;
                        break;
                    case "VMSTAT_NR_DIRTY_BACKGROUND_THRESHOLD":
                    case 37:
                        m.key = 37;
                        break;
                    case "VMSTAT_PGPGIN":
                    case 38:
                        m.key = 38;
                        break;
                    case "VMSTAT_PGPGOUT":
                    case 39:
                        m.key = 39;
                        break;
                    case "VMSTAT_PGPGOUTCLEAN":
                    case 40:
                        m.key = 40;
                        break;
                    case "VMSTAT_PSWPIN":
                    case 41:
                        m.key = 41;
                        break;
                    case "VMSTAT_PSWPOUT":
                    case 42:
                        m.key = 42;
                        break;
                    case "VMSTAT_PGALLOC_DMA":
                    case 43:
                        m.key = 43;
                        break;
                    case "VMSTAT_PGALLOC_NORMAL":
                    case 44:
                        m.key = 44;
                        break;
                    case "VMSTAT_PGALLOC_MOVABLE":
                    case 45:
                        m.key = 45;
                        break;
                    case "VMSTAT_PGFREE":
                    case 46:
                        m.key = 46;
                        break;
                    case "VMSTAT_PGACTIVATE":
                    case 47:
                        m.key = 47;
                        break;
                    case "VMSTAT_PGDEACTIVATE":
                    case 48:
                        m.key = 48;
                        break;
                    case "VMSTAT_PGFAULT":
                    case 49:
                        m.key = 49;
                        break;
                    case "VMSTAT_PGMAJFAULT":
                    case 50:
                        m.key = 50;
                        break;
                    case "VMSTAT_PGREFILL_DMA":
                    case 51:
                        m.key = 51;
                        break;
                    case "VMSTAT_PGREFILL_NORMAL":
                    case 52:
                        m.key = 52;
                        break;
                    case "VMSTAT_PGREFILL_MOVABLE":
                    case 53:
                        m.key = 53;
                        break;
                    case "VMSTAT_PGSTEAL_KSWAPD_DMA":
                    case 54:
                        m.key = 54;
                        break;
                    case "VMSTAT_PGSTEAL_KSWAPD_NORMAL":
                    case 55:
                        m.key = 55;
                        break;
                    case "VMSTAT_PGSTEAL_KSWAPD_MOVABLE":
                    case 56:
                        m.key = 56;
                        break;
                    case "VMSTAT_PGSTEAL_DIRECT_DMA":
                    case 57:
                        m.key = 57;
                        break;
                    case "VMSTAT_PGSTEAL_DIRECT_NORMAL":
                    case 58:
                        m.key = 58;
                        break;
                    case "VMSTAT_PGSTEAL_DIRECT_MOVABLE":
                    case 59:
                        m.key = 59;
                        break;
                    case "VMSTAT_PGSCAN_KSWAPD_DMA":
                    case 60:
                        m.key = 60;
                        break;
                    case "VMSTAT_PGSCAN_KSWAPD_NORMAL":
                    case 61:
                        m.key = 61;
                        break;
                    case "VMSTAT_PGSCAN_KSWAPD_MOVABLE":
                    case 62:
                        m.key = 62;
                        break;
                    case "VMSTAT_PGSCAN_DIRECT_DMA":
                    case 63:
                        m.key = 63;
                        break;
                    case "VMSTAT_PGSCAN_DIRECT_NORMAL":
                    case 64:
                        m.key = 64;
                        break;
                    case "VMSTAT_PGSCAN_DIRECT_MOVABLE":
                    case 65:
                        m.key = 65;
                        break;
                    case "VMSTAT_PGSCAN_DIRECT_THROTTLE":
                    case 66:
                        m.key = 66;
                        break;
                    case "VMSTAT_PGINODESTEAL":
                    case 67:
                        m.key = 67;
                        break;
                    case "VMSTAT_SLABS_SCANNED":
                    case 68:
                        m.key = 68;
                        break;
                    case "VMSTAT_KSWAPD_INODESTEAL":
                    case 69:
                        m.key = 69;
                        break;
                    case "VMSTAT_KSWAPD_LOW_WMARK_HIT_QUICKLY":
                    case 70:
                        m.key = 70;
                        break;
                    case "VMSTAT_KSWAPD_HIGH_WMARK_HIT_QUICKLY":
                    case 71:
                        m.key = 71;
                        break;
                    case "VMSTAT_PAGEOUTRUN":
                    case 72:
                        m.key = 72;
                        break;
                    case "VMSTAT_ALLOCSTALL":
                    case 73:
                        m.key = 73;
                        break;
                    case "VMSTAT_PGROTATED":
                    case 74:
                        m.key = 74;
                        break;
                    case "VMSTAT_DROP_PAGECACHE":
                    case 75:
                        m.key = 75;
                        break;
                    case "VMSTAT_DROP_SLAB":
                    case 76:
                        m.key = 76;
                        break;
                    case "VMSTAT_PGMIGRATE_SUCCESS":
                    case 77:
                        m.key = 77;
                        break;
                    case "VMSTAT_PGMIGRATE_FAIL":
                    case 78:
                        m.key = 78;
                        break;
                    case "VMSTAT_COMPACT_MIGRATE_SCANNED":
                    case 79:
                        m.key = 79;
                        break;
                    case "VMSTAT_COMPACT_FREE_SCANNED":
                    case 80:
                        m.key = 80;
                        break;
                    case "VMSTAT_COMPACT_ISOLATED":
                    case 81:
                        m.key = 81;
                        break;
                    case "VMSTAT_COMPACT_STALL":
                    case 82:
                        m.key = 82;
                        break;
                    case "VMSTAT_COMPACT_FAIL":
                    case 83:
                        m.key = 83;
                        break;
                    case "VMSTAT_COMPACT_SUCCESS":
                    case 84:
                        m.key = 84;
                        break;
                    case "VMSTAT_COMPACT_DAEMON_WAKE":
                    case 85:
                        m.key = 85;
                        break;
                    case "VMSTAT_UNEVICTABLE_PGS_CULLED":
                    case 86:
                        m.key = 86;
                        break;
                    case "VMSTAT_UNEVICTABLE_PGS_SCANNED":
                    case 87:
                        m.key = 87;
                        break;
                    case "VMSTAT_UNEVICTABLE_PGS_RESCUED":
                    case 88:
                        m.key = 88;
                        break;
                    case "VMSTAT_UNEVICTABLE_PGS_MLOCKED":
                    case 89:
                        m.key = 89;
                        break;
                    case "VMSTAT_UNEVICTABLE_PGS_MUNLOCKED":
                    case 90:
                        m.key = 90;
                        break;
                    case "VMSTAT_UNEVICTABLE_PGS_CLEARED":
                    case 91:
                        m.key = 91;
                        break;
                    case "VMSTAT_UNEVICTABLE_PGS_STRANDED":
                    case 92:
                        m.key = 92;
                        break;
                    case "VMSTAT_NR_ZSPAGES":
                    case 93:
                        m.key = 93;
                        break;
                    case "VMSTAT_NR_ION_HEAP":
                    case 94:
                        m.key = 94;
                        break;
                    case "VMSTAT_NR_GPU_HEAP":
                    case 95:
                        m.key = 95;
                        break;
                    case "VMSTAT_ALLOCSTALL_DMA":
                    case 96:
                        m.key = 96;
                        break;
                    case "VMSTAT_ALLOCSTALL_MOVABLE":
                    case 97:
                        m.key = 97;
                        break;
                    case "VMSTAT_ALLOCSTALL_NORMAL":
                    case 98:
                        m.key = 98;
                        break;
                    case "VMSTAT_COMPACT_DAEMON_FREE_SCANNED":
                    case 99:
                        m.key = 99;
                        break;
                    case "VMSTAT_COMPACT_DAEMON_MIGRATE_SCANNED":
                    case 100:
                        m.key = 100;
                        break;
                    case "VMSTAT_NR_FASTRPC":
                    case 101:
                        m.key = 101;
                        break;
                    case "VMSTAT_NR_INDIRECTLY_RECLAIMABLE":
                    case 102:
                        m.key = 102;
                        break;
                    case "VMSTAT_NR_ION_HEAP_POOL":
                    case 103:
                        m.key = 103;
                        break;
                    case "VMSTAT_NR_KERNEL_MISC_RECLAIMABLE":
                    case 104:
                        m.key = 104;
                        break;
                    case "VMSTAT_NR_SHADOW_CALL_STACK_BYTES":
                    case 105:
                        m.key = 105;
                        break;
                    case "VMSTAT_NR_SHMEM_HUGEPAGES":
                    case 106:
                        m.key = 106;
                        break;
                    case "VMSTAT_NR_SHMEM_PMDMAPPED":
                    case 107:
                        m.key = 107;
                        break;
                    case "VMSTAT_NR_UNRECLAIMABLE_PAGES":
                    case 108:
                        m.key = 108;
                        break;
                    case "VMSTAT_NR_ZONE_ACTIVE_ANON":
                    case 109:
                        m.key = 109;
                        break;
                    case "VMSTAT_NR_ZONE_ACTIVE_FILE":
                    case 110:
                        m.key = 110;
                        break;
                    case "VMSTAT_NR_ZONE_INACTIVE_ANON":
                    case 111:
                        m.key = 111;
                        break;
                    case "VMSTAT_NR_ZONE_INACTIVE_FILE":
                    case 112:
                        m.key = 112;
                        break;
                    case "VMSTAT_NR_ZONE_UNEVICTABLE":
                    case 113:
                        m.key = 113;
                        break;
                    case "VMSTAT_NR_ZONE_WRITE_PENDING":
                    case 114:
                        m.key = 114;
                        break;
                    case "VMSTAT_OOM_KILL":
                    case 115:
                        m.key = 115;
                        break;
                    case "VMSTAT_PGLAZYFREE":
                    case 116:
                        m.key = 116;
                        break;
                    case "VMSTAT_PGLAZYFREED":
                    case 117:
                        m.key = 117;
                        break;
                    case "VMSTAT_PGREFILL":
                    case 118:
                        m.key = 118;
                        break;
                    case "VMSTAT_PGSCAN_DIRECT":
                    case 119:
                        m.key = 119;
                        break;
                    case "VMSTAT_PGSCAN_KSWAPD":
                    case 120:
                        m.key = 120;
                        break;
                    case "VMSTAT_PGSKIP_DMA":
                    case 121:
                        m.key = 121;
                        break;
                    case "VMSTAT_PGSKIP_MOVABLE":
                    case 122:
                        m.key = 122;
                        break;
                    case "VMSTAT_PGSKIP_NORMAL":
                    case 123:
                        m.key = 123;
                        break;
                    case "VMSTAT_PGSTEAL_DIRECT":
                    case 124:
                        m.key = 124;
                        break;
                    case "VMSTAT_PGSTEAL_KSWAPD":
                    case 125:
                        m.key = 125;
                        break;
                    case "VMSTAT_SWAP_RA":
                    case 126:
                        m.key = 126;
                        break;
                    case "VMSTAT_SWAP_RA_HIT":
                    case 127:
                        m.key = 127;
                        break;
                    case "VMSTAT_WORKINGSET_RESTORE":
                    case 128:
                        m.key = 128;
                        break;
                    }
                    if (d.value != null) {
                        if ($util.Long)
                            (m.value = $util.Long.fromValue(d.value)).unsigned = true;
                        else if (typeof d.value === "string")
                            m.value = parseInt(d.value, 10);
                        else if (typeof d.value === "number")
                            m.value = d.value;
                        else if (typeof d.value === "object")
                            m.value = new $util.LongBits(d.value.low >>> 0, d.value.high >>> 0).toNumber(true);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a VmstatValue message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.SysStats.VmstatValue
                 * @static
                 * @param {perfetto.protos.SysStats.VmstatValue} m VmstatValue
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                VmstatValue.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.key = o.enums === String ? "VMSTAT_UNSPECIFIED" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.value = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.value = o.longs === String ? "0" : 0;
                    }
                    if (m.key != null && m.hasOwnProperty("key")) {
                        d.key = o.enums === String ? $root.perfetto.protos.VmstatCounters[m.key] : m.key;
                    }
                    if (m.value != null && m.hasOwnProperty("value")) {
                        if (typeof m.value === "number")
                            d.value = o.longs === String ? String(m.value) : m.value;
                        else
                            d.value = o.longs === String ? $util.Long.prototype.toString.call(m.value) : o.longs === Number ? new $util.LongBits(m.value.low >>> 0, m.value.high >>> 0).toNumber(true) : m.value;
                    }
                    return d;
                };

                /**
                 * Converts this VmstatValue to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.SysStats.VmstatValue
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                VmstatValue.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return VmstatValue;
            })();

            SysStats.CpuTimes = (function() {

                /**
                 * Properties of a CpuTimes.
                 * @memberof perfetto.protos.SysStats
                 * @interface ICpuTimes
                 * @property {number|null} [cpuId] CpuTimes cpuId
                 * @property {number|null} [userNs] CpuTimes userNs
                 * @property {number|null} [userIceNs] CpuTimes userIceNs
                 * @property {number|null} [systemModeNs] CpuTimes systemModeNs
                 * @property {number|null} [idleNs] CpuTimes idleNs
                 * @property {number|null} [ioWaitNs] CpuTimes ioWaitNs
                 * @property {number|null} [irqNs] CpuTimes irqNs
                 * @property {number|null} [softirqNs] CpuTimes softirqNs
                 */

                /**
                 * Constructs a new CpuTimes.
                 * @memberof perfetto.protos.SysStats
                 * @classdesc Represents a CpuTimes.
                 * @implements ICpuTimes
                 * @constructor
                 * @param {perfetto.protos.SysStats.ICpuTimes=} [p] Properties to set
                 */
                function CpuTimes(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * CpuTimes cpuId.
                 * @member {number} cpuId
                 * @memberof perfetto.protos.SysStats.CpuTimes
                 * @instance
                 */
                CpuTimes.prototype.cpuId = 0;

                /**
                 * CpuTimes userNs.
                 * @member {number} userNs
                 * @memberof perfetto.protos.SysStats.CpuTimes
                 * @instance
                 */
                CpuTimes.prototype.userNs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * CpuTimes userIceNs.
                 * @member {number} userIceNs
                 * @memberof perfetto.protos.SysStats.CpuTimes
                 * @instance
                 */
                CpuTimes.prototype.userIceNs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * CpuTimes systemModeNs.
                 * @member {number} systemModeNs
                 * @memberof perfetto.protos.SysStats.CpuTimes
                 * @instance
                 */
                CpuTimes.prototype.systemModeNs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * CpuTimes idleNs.
                 * @member {number} idleNs
                 * @memberof perfetto.protos.SysStats.CpuTimes
                 * @instance
                 */
                CpuTimes.prototype.idleNs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * CpuTimes ioWaitNs.
                 * @member {number} ioWaitNs
                 * @memberof perfetto.protos.SysStats.CpuTimes
                 * @instance
                 */
                CpuTimes.prototype.ioWaitNs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * CpuTimes irqNs.
                 * @member {number} irqNs
                 * @memberof perfetto.protos.SysStats.CpuTimes
                 * @instance
                 */
                CpuTimes.prototype.irqNs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * CpuTimes softirqNs.
                 * @member {number} softirqNs
                 * @memberof perfetto.protos.SysStats.CpuTimes
                 * @instance
                 */
                CpuTimes.prototype.softirqNs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Creates a new CpuTimes instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.SysStats.CpuTimes
                 * @static
                 * @param {perfetto.protos.SysStats.ICpuTimes=} [properties] Properties to set
                 * @returns {perfetto.protos.SysStats.CpuTimes} CpuTimes instance
                 */
                CpuTimes.create = function create(properties) {
                    return new CpuTimes(properties);
                };

                /**
                 * Encodes the specified CpuTimes message. Does not implicitly {@link perfetto.protos.SysStats.CpuTimes.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.SysStats.CpuTimes
                 * @static
                 * @param {perfetto.protos.SysStats.ICpuTimes} m CpuTimes message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CpuTimes.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.cpuId != null && Object.hasOwnProperty.call(m, "cpuId"))
                        w.uint32(8).uint32(m.cpuId);
                    if (m.userNs != null && Object.hasOwnProperty.call(m, "userNs"))
                        w.uint32(16).uint64(m.userNs);
                    if (m.userIceNs != null && Object.hasOwnProperty.call(m, "userIceNs"))
                        w.uint32(24).uint64(m.userIceNs);
                    if (m.systemModeNs != null && Object.hasOwnProperty.call(m, "systemModeNs"))
                        w.uint32(32).uint64(m.systemModeNs);
                    if (m.idleNs != null && Object.hasOwnProperty.call(m, "idleNs"))
                        w.uint32(40).uint64(m.idleNs);
                    if (m.ioWaitNs != null && Object.hasOwnProperty.call(m, "ioWaitNs"))
                        w.uint32(48).uint64(m.ioWaitNs);
                    if (m.irqNs != null && Object.hasOwnProperty.call(m, "irqNs"))
                        w.uint32(56).uint64(m.irqNs);
                    if (m.softirqNs != null && Object.hasOwnProperty.call(m, "softirqNs"))
                        w.uint32(64).uint64(m.softirqNs);
                    return w;
                };

                /**
                 * Encodes the specified CpuTimes message, length delimited. Does not implicitly {@link perfetto.protos.SysStats.CpuTimes.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.SysStats.CpuTimes
                 * @static
                 * @param {perfetto.protos.SysStats.ICpuTimes} message CpuTimes message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CpuTimes.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a CpuTimes message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.SysStats.CpuTimes
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.SysStats.CpuTimes} CpuTimes
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CpuTimes.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SysStats.CpuTimes();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.cpuId = r.uint32();
                            break;
                        case 2:
                            m.userNs = r.uint64();
                            break;
                        case 3:
                            m.userIceNs = r.uint64();
                            break;
                        case 4:
                            m.systemModeNs = r.uint64();
                            break;
                        case 5:
                            m.idleNs = r.uint64();
                            break;
                        case 6:
                            m.ioWaitNs = r.uint64();
                            break;
                        case 7:
                            m.irqNs = r.uint64();
                            break;
                        case 8:
                            m.softirqNs = r.uint64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a CpuTimes message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.SysStats.CpuTimes
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.SysStats.CpuTimes} CpuTimes
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CpuTimes.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a CpuTimes message.
                 * @function verify
                 * @memberof perfetto.protos.SysStats.CpuTimes
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                CpuTimes.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.cpuId != null && m.hasOwnProperty("cpuId")) {
                        if (!$util.isInteger(m.cpuId))
                            return "cpuId: integer expected";
                    }
                    if (m.userNs != null && m.hasOwnProperty("userNs")) {
                        if (!$util.isInteger(m.userNs) && !(m.userNs && $util.isInteger(m.userNs.low) && $util.isInteger(m.userNs.high)))
                            return "userNs: integer|Long expected";
                    }
                    if (m.userIceNs != null && m.hasOwnProperty("userIceNs")) {
                        if (!$util.isInteger(m.userIceNs) && !(m.userIceNs && $util.isInteger(m.userIceNs.low) && $util.isInteger(m.userIceNs.high)))
                            return "userIceNs: integer|Long expected";
                    }
                    if (m.systemModeNs != null && m.hasOwnProperty("systemModeNs")) {
                        if (!$util.isInteger(m.systemModeNs) && !(m.systemModeNs && $util.isInteger(m.systemModeNs.low) && $util.isInteger(m.systemModeNs.high)))
                            return "systemModeNs: integer|Long expected";
                    }
                    if (m.idleNs != null && m.hasOwnProperty("idleNs")) {
                        if (!$util.isInteger(m.idleNs) && !(m.idleNs && $util.isInteger(m.idleNs.low) && $util.isInteger(m.idleNs.high)))
                            return "idleNs: integer|Long expected";
                    }
                    if (m.ioWaitNs != null && m.hasOwnProperty("ioWaitNs")) {
                        if (!$util.isInteger(m.ioWaitNs) && !(m.ioWaitNs && $util.isInteger(m.ioWaitNs.low) && $util.isInteger(m.ioWaitNs.high)))
                            return "ioWaitNs: integer|Long expected";
                    }
                    if (m.irqNs != null && m.hasOwnProperty("irqNs")) {
                        if (!$util.isInteger(m.irqNs) && !(m.irqNs && $util.isInteger(m.irqNs.low) && $util.isInteger(m.irqNs.high)))
                            return "irqNs: integer|Long expected";
                    }
                    if (m.softirqNs != null && m.hasOwnProperty("softirqNs")) {
                        if (!$util.isInteger(m.softirqNs) && !(m.softirqNs && $util.isInteger(m.softirqNs.low) && $util.isInteger(m.softirqNs.high)))
                            return "softirqNs: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a CpuTimes message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.SysStats.CpuTimes
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.SysStats.CpuTimes} CpuTimes
                 */
                CpuTimes.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.SysStats.CpuTimes)
                        return d;
                    var m = new $root.perfetto.protos.SysStats.CpuTimes();
                    if (d.cpuId != null) {
                        m.cpuId = d.cpuId >>> 0;
                    }
                    if (d.userNs != null) {
                        if ($util.Long)
                            (m.userNs = $util.Long.fromValue(d.userNs)).unsigned = true;
                        else if (typeof d.userNs === "string")
                            m.userNs = parseInt(d.userNs, 10);
                        else if (typeof d.userNs === "number")
                            m.userNs = d.userNs;
                        else if (typeof d.userNs === "object")
                            m.userNs = new $util.LongBits(d.userNs.low >>> 0, d.userNs.high >>> 0).toNumber(true);
                    }
                    if (d.userIceNs != null) {
                        if ($util.Long)
                            (m.userIceNs = $util.Long.fromValue(d.userIceNs)).unsigned = true;
                        else if (typeof d.userIceNs === "string")
                            m.userIceNs = parseInt(d.userIceNs, 10);
                        else if (typeof d.userIceNs === "number")
                            m.userIceNs = d.userIceNs;
                        else if (typeof d.userIceNs === "object")
                            m.userIceNs = new $util.LongBits(d.userIceNs.low >>> 0, d.userIceNs.high >>> 0).toNumber(true);
                    }
                    if (d.systemModeNs != null) {
                        if ($util.Long)
                            (m.systemModeNs = $util.Long.fromValue(d.systemModeNs)).unsigned = true;
                        else if (typeof d.systemModeNs === "string")
                            m.systemModeNs = parseInt(d.systemModeNs, 10);
                        else if (typeof d.systemModeNs === "number")
                            m.systemModeNs = d.systemModeNs;
                        else if (typeof d.systemModeNs === "object")
                            m.systemModeNs = new $util.LongBits(d.systemModeNs.low >>> 0, d.systemModeNs.high >>> 0).toNumber(true);
                    }
                    if (d.idleNs != null) {
                        if ($util.Long)
                            (m.idleNs = $util.Long.fromValue(d.idleNs)).unsigned = true;
                        else if (typeof d.idleNs === "string")
                            m.idleNs = parseInt(d.idleNs, 10);
                        else if (typeof d.idleNs === "number")
                            m.idleNs = d.idleNs;
                        else if (typeof d.idleNs === "object")
                            m.idleNs = new $util.LongBits(d.idleNs.low >>> 0, d.idleNs.high >>> 0).toNumber(true);
                    }
                    if (d.ioWaitNs != null) {
                        if ($util.Long)
                            (m.ioWaitNs = $util.Long.fromValue(d.ioWaitNs)).unsigned = true;
                        else if (typeof d.ioWaitNs === "string")
                            m.ioWaitNs = parseInt(d.ioWaitNs, 10);
                        else if (typeof d.ioWaitNs === "number")
                            m.ioWaitNs = d.ioWaitNs;
                        else if (typeof d.ioWaitNs === "object")
                            m.ioWaitNs = new $util.LongBits(d.ioWaitNs.low >>> 0, d.ioWaitNs.high >>> 0).toNumber(true);
                    }
                    if (d.irqNs != null) {
                        if ($util.Long)
                            (m.irqNs = $util.Long.fromValue(d.irqNs)).unsigned = true;
                        else if (typeof d.irqNs === "string")
                            m.irqNs = parseInt(d.irqNs, 10);
                        else if (typeof d.irqNs === "number")
                            m.irqNs = d.irqNs;
                        else if (typeof d.irqNs === "object")
                            m.irqNs = new $util.LongBits(d.irqNs.low >>> 0, d.irqNs.high >>> 0).toNumber(true);
                    }
                    if (d.softirqNs != null) {
                        if ($util.Long)
                            (m.softirqNs = $util.Long.fromValue(d.softirqNs)).unsigned = true;
                        else if (typeof d.softirqNs === "string")
                            m.softirqNs = parseInt(d.softirqNs, 10);
                        else if (typeof d.softirqNs === "number")
                            m.softirqNs = d.softirqNs;
                        else if (typeof d.softirqNs === "object")
                            m.softirqNs = new $util.LongBits(d.softirqNs.low >>> 0, d.softirqNs.high >>> 0).toNumber(true);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a CpuTimes message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.SysStats.CpuTimes
                 * @static
                 * @param {perfetto.protos.SysStats.CpuTimes} m CpuTimes
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                CpuTimes.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.cpuId = 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.userNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.userNs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.userIceNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.userIceNs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.systemModeNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.systemModeNs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.idleNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.idleNs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.ioWaitNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.ioWaitNs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.irqNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.irqNs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.softirqNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.softirqNs = o.longs === String ? "0" : 0;
                    }
                    if (m.cpuId != null && m.hasOwnProperty("cpuId")) {
                        d.cpuId = m.cpuId;
                    }
                    if (m.userNs != null && m.hasOwnProperty("userNs")) {
                        if (typeof m.userNs === "number")
                            d.userNs = o.longs === String ? String(m.userNs) : m.userNs;
                        else
                            d.userNs = o.longs === String ? $util.Long.prototype.toString.call(m.userNs) : o.longs === Number ? new $util.LongBits(m.userNs.low >>> 0, m.userNs.high >>> 0).toNumber(true) : m.userNs;
                    }
                    if (m.userIceNs != null && m.hasOwnProperty("userIceNs")) {
                        if (typeof m.userIceNs === "number")
                            d.userIceNs = o.longs === String ? String(m.userIceNs) : m.userIceNs;
                        else
                            d.userIceNs = o.longs === String ? $util.Long.prototype.toString.call(m.userIceNs) : o.longs === Number ? new $util.LongBits(m.userIceNs.low >>> 0, m.userIceNs.high >>> 0).toNumber(true) : m.userIceNs;
                    }
                    if (m.systemModeNs != null && m.hasOwnProperty("systemModeNs")) {
                        if (typeof m.systemModeNs === "number")
                            d.systemModeNs = o.longs === String ? String(m.systemModeNs) : m.systemModeNs;
                        else
                            d.systemModeNs = o.longs === String ? $util.Long.prototype.toString.call(m.systemModeNs) : o.longs === Number ? new $util.LongBits(m.systemModeNs.low >>> 0, m.systemModeNs.high >>> 0).toNumber(true) : m.systemModeNs;
                    }
                    if (m.idleNs != null && m.hasOwnProperty("idleNs")) {
                        if (typeof m.idleNs === "number")
                            d.idleNs = o.longs === String ? String(m.idleNs) : m.idleNs;
                        else
                            d.idleNs = o.longs === String ? $util.Long.prototype.toString.call(m.idleNs) : o.longs === Number ? new $util.LongBits(m.idleNs.low >>> 0, m.idleNs.high >>> 0).toNumber(true) : m.idleNs;
                    }
                    if (m.ioWaitNs != null && m.hasOwnProperty("ioWaitNs")) {
                        if (typeof m.ioWaitNs === "number")
                            d.ioWaitNs = o.longs === String ? String(m.ioWaitNs) : m.ioWaitNs;
                        else
                            d.ioWaitNs = o.longs === String ? $util.Long.prototype.toString.call(m.ioWaitNs) : o.longs === Number ? new $util.LongBits(m.ioWaitNs.low >>> 0, m.ioWaitNs.high >>> 0).toNumber(true) : m.ioWaitNs;
                    }
                    if (m.irqNs != null && m.hasOwnProperty("irqNs")) {
                        if (typeof m.irqNs === "number")
                            d.irqNs = o.longs === String ? String(m.irqNs) : m.irqNs;
                        else
                            d.irqNs = o.longs === String ? $util.Long.prototype.toString.call(m.irqNs) : o.longs === Number ? new $util.LongBits(m.irqNs.low >>> 0, m.irqNs.high >>> 0).toNumber(true) : m.irqNs;
                    }
                    if (m.softirqNs != null && m.hasOwnProperty("softirqNs")) {
                        if (typeof m.softirqNs === "number")
                            d.softirqNs = o.longs === String ? String(m.softirqNs) : m.softirqNs;
                        else
                            d.softirqNs = o.longs === String ? $util.Long.prototype.toString.call(m.softirqNs) : o.longs === Number ? new $util.LongBits(m.softirqNs.low >>> 0, m.softirqNs.high >>> 0).toNumber(true) : m.softirqNs;
                    }
                    return d;
                };

                /**
                 * Converts this CpuTimes to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.SysStats.CpuTimes
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                CpuTimes.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return CpuTimes;
            })();

            SysStats.InterruptCount = (function() {

                /**
                 * Properties of an InterruptCount.
                 * @memberof perfetto.protos.SysStats
                 * @interface IInterruptCount
                 * @property {number|null} [irq] InterruptCount irq
                 * @property {number|null} [count] InterruptCount count
                 */

                /**
                 * Constructs a new InterruptCount.
                 * @memberof perfetto.protos.SysStats
                 * @classdesc Represents an InterruptCount.
                 * @implements IInterruptCount
                 * @constructor
                 * @param {perfetto.protos.SysStats.IInterruptCount=} [p] Properties to set
                 */
                function InterruptCount(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * InterruptCount irq.
                 * @member {number} irq
                 * @memberof perfetto.protos.SysStats.InterruptCount
                 * @instance
                 */
                InterruptCount.prototype.irq = 0;

                /**
                 * InterruptCount count.
                 * @member {number} count
                 * @memberof perfetto.protos.SysStats.InterruptCount
                 * @instance
                 */
                InterruptCount.prototype.count = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Creates a new InterruptCount instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.SysStats.InterruptCount
                 * @static
                 * @param {perfetto.protos.SysStats.IInterruptCount=} [properties] Properties to set
                 * @returns {perfetto.protos.SysStats.InterruptCount} InterruptCount instance
                 */
                InterruptCount.create = function create(properties) {
                    return new InterruptCount(properties);
                };

                /**
                 * Encodes the specified InterruptCount message. Does not implicitly {@link perfetto.protos.SysStats.InterruptCount.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.SysStats.InterruptCount
                 * @static
                 * @param {perfetto.protos.SysStats.IInterruptCount} m InterruptCount message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                InterruptCount.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.irq != null && Object.hasOwnProperty.call(m, "irq"))
                        w.uint32(8).int32(m.irq);
                    if (m.count != null && Object.hasOwnProperty.call(m, "count"))
                        w.uint32(16).uint64(m.count);
                    return w;
                };

                /**
                 * Encodes the specified InterruptCount message, length delimited. Does not implicitly {@link perfetto.protos.SysStats.InterruptCount.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.SysStats.InterruptCount
                 * @static
                 * @param {perfetto.protos.SysStats.IInterruptCount} message InterruptCount message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                InterruptCount.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes an InterruptCount message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.SysStats.InterruptCount
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.SysStats.InterruptCount} InterruptCount
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                InterruptCount.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SysStats.InterruptCount();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.irq = r.int32();
                            break;
                        case 2:
                            m.count = r.uint64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes an InterruptCount message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.SysStats.InterruptCount
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.SysStats.InterruptCount} InterruptCount
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                InterruptCount.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies an InterruptCount message.
                 * @function verify
                 * @memberof perfetto.protos.SysStats.InterruptCount
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                InterruptCount.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.irq != null && m.hasOwnProperty("irq")) {
                        if (!$util.isInteger(m.irq))
                            return "irq: integer expected";
                    }
                    if (m.count != null && m.hasOwnProperty("count")) {
                        if (!$util.isInteger(m.count) && !(m.count && $util.isInteger(m.count.low) && $util.isInteger(m.count.high)))
                            return "count: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates an InterruptCount message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.SysStats.InterruptCount
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.SysStats.InterruptCount} InterruptCount
                 */
                InterruptCount.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.SysStats.InterruptCount)
                        return d;
                    var m = new $root.perfetto.protos.SysStats.InterruptCount();
                    if (d.irq != null) {
                        m.irq = d.irq | 0;
                    }
                    if (d.count != null) {
                        if ($util.Long)
                            (m.count = $util.Long.fromValue(d.count)).unsigned = true;
                        else if (typeof d.count === "string")
                            m.count = parseInt(d.count, 10);
                        else if (typeof d.count === "number")
                            m.count = d.count;
                        else if (typeof d.count === "object")
                            m.count = new $util.LongBits(d.count.low >>> 0, d.count.high >>> 0).toNumber(true);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from an InterruptCount message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.SysStats.InterruptCount
                 * @static
                 * @param {perfetto.protos.SysStats.InterruptCount} m InterruptCount
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                InterruptCount.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.irq = 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.count = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.count = o.longs === String ? "0" : 0;
                    }
                    if (m.irq != null && m.hasOwnProperty("irq")) {
                        d.irq = m.irq;
                    }
                    if (m.count != null && m.hasOwnProperty("count")) {
                        if (typeof m.count === "number")
                            d.count = o.longs === String ? String(m.count) : m.count;
                        else
                            d.count = o.longs === String ? $util.Long.prototype.toString.call(m.count) : o.longs === Number ? new $util.LongBits(m.count.low >>> 0, m.count.high >>> 0).toNumber(true) : m.count;
                    }
                    return d;
                };

                /**
                 * Converts this InterruptCount to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.SysStats.InterruptCount
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                InterruptCount.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return InterruptCount;
            })();

            SysStats.DevfreqValue = (function() {

                /**
                 * Properties of a DevfreqValue.
                 * @memberof perfetto.protos.SysStats
                 * @interface IDevfreqValue
                 * @property {string|null} [key] DevfreqValue key
                 * @property {number|null} [value] DevfreqValue value
                 */

                /**
                 * Constructs a new DevfreqValue.
                 * @memberof perfetto.protos.SysStats
                 * @classdesc Represents a DevfreqValue.
                 * @implements IDevfreqValue
                 * @constructor
                 * @param {perfetto.protos.SysStats.IDevfreqValue=} [p] Properties to set
                 */
                function DevfreqValue(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * DevfreqValue key.
                 * @member {string} key
                 * @memberof perfetto.protos.SysStats.DevfreqValue
                 * @instance
                 */
                DevfreqValue.prototype.key = "";

                /**
                 * DevfreqValue value.
                 * @member {number} value
                 * @memberof perfetto.protos.SysStats.DevfreqValue
                 * @instance
                 */
                DevfreqValue.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Creates a new DevfreqValue instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.SysStats.DevfreqValue
                 * @static
                 * @param {perfetto.protos.SysStats.IDevfreqValue=} [properties] Properties to set
                 * @returns {perfetto.protos.SysStats.DevfreqValue} DevfreqValue instance
                 */
                DevfreqValue.create = function create(properties) {
                    return new DevfreqValue(properties);
                };

                /**
                 * Encodes the specified DevfreqValue message. Does not implicitly {@link perfetto.protos.SysStats.DevfreqValue.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.SysStats.DevfreqValue
                 * @static
                 * @param {perfetto.protos.SysStats.IDevfreqValue} m DevfreqValue message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                DevfreqValue.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.key != null && Object.hasOwnProperty.call(m, "key"))
                        w.uint32(10).string(m.key);
                    if (m.value != null && Object.hasOwnProperty.call(m, "value"))
                        w.uint32(16).uint64(m.value);
                    return w;
                };

                /**
                 * Encodes the specified DevfreqValue message, length delimited. Does not implicitly {@link perfetto.protos.SysStats.DevfreqValue.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.SysStats.DevfreqValue
                 * @static
                 * @param {perfetto.protos.SysStats.IDevfreqValue} message DevfreqValue message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                DevfreqValue.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a DevfreqValue message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.SysStats.DevfreqValue
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.SysStats.DevfreqValue} DevfreqValue
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                DevfreqValue.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SysStats.DevfreqValue();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.key = r.string();
                            break;
                        case 2:
                            m.value = r.uint64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a DevfreqValue message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.SysStats.DevfreqValue
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.SysStats.DevfreqValue} DevfreqValue
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                DevfreqValue.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a DevfreqValue message.
                 * @function verify
                 * @memberof perfetto.protos.SysStats.DevfreqValue
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                DevfreqValue.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.key != null && m.hasOwnProperty("key")) {
                        if (!$util.isString(m.key))
                            return "key: string expected";
                    }
                    if (m.value != null && m.hasOwnProperty("value")) {
                        if (!$util.isInteger(m.value) && !(m.value && $util.isInteger(m.value.low) && $util.isInteger(m.value.high)))
                            return "value: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a DevfreqValue message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.SysStats.DevfreqValue
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.SysStats.DevfreqValue} DevfreqValue
                 */
                DevfreqValue.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.SysStats.DevfreqValue)
                        return d;
                    var m = new $root.perfetto.protos.SysStats.DevfreqValue();
                    if (d.key != null) {
                        m.key = String(d.key);
                    }
                    if (d.value != null) {
                        if ($util.Long)
                            (m.value = $util.Long.fromValue(d.value)).unsigned = true;
                        else if (typeof d.value === "string")
                            m.value = parseInt(d.value, 10);
                        else if (typeof d.value === "number")
                            m.value = d.value;
                        else if (typeof d.value === "object")
                            m.value = new $util.LongBits(d.value.low >>> 0, d.value.high >>> 0).toNumber(true);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a DevfreqValue message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.SysStats.DevfreqValue
                 * @static
                 * @param {perfetto.protos.SysStats.DevfreqValue} m DevfreqValue
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                DevfreqValue.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.key = "";
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.value = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.value = o.longs === String ? "0" : 0;
                    }
                    if (m.key != null && m.hasOwnProperty("key")) {
                        d.key = m.key;
                    }
                    if (m.value != null && m.hasOwnProperty("value")) {
                        if (typeof m.value === "number")
                            d.value = o.longs === String ? String(m.value) : m.value;
                        else
                            d.value = o.longs === String ? $util.Long.prototype.toString.call(m.value) : o.longs === Number ? new $util.LongBits(m.value.low >>> 0, m.value.high >>> 0).toNumber(true) : m.value;
                    }
                    return d;
                };

                /**
                 * Converts this DevfreqValue to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.SysStats.DevfreqValue
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                DevfreqValue.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return DevfreqValue;
            })();

            SysStats.BuddyInfo = (function() {

                /**
                 * Properties of a BuddyInfo.
                 * @memberof perfetto.protos.SysStats
                 * @interface IBuddyInfo
                 * @property {string|null} [node] BuddyInfo node
                 * @property {string|null} [zone] BuddyInfo zone
                 * @property {Array.<number>|null} [orderPages] BuddyInfo orderPages
                 */

                /**
                 * Constructs a new BuddyInfo.
                 * @memberof perfetto.protos.SysStats
                 * @classdesc Represents a BuddyInfo.
                 * @implements IBuddyInfo
                 * @constructor
                 * @param {perfetto.protos.SysStats.IBuddyInfo=} [p] Properties to set
                 */
                function BuddyInfo(p) {
                    this.orderPages = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * BuddyInfo node.
                 * @member {string} node
                 * @memberof perfetto.protos.SysStats.BuddyInfo
                 * @instance
                 */
                BuddyInfo.prototype.node = "";

                /**
                 * BuddyInfo zone.
                 * @member {string} zone
                 * @memberof perfetto.protos.SysStats.BuddyInfo
                 * @instance
                 */
                BuddyInfo.prototype.zone = "";

                /**
                 * BuddyInfo orderPages.
                 * @member {Array.<number>} orderPages
                 * @memberof perfetto.protos.SysStats.BuddyInfo
                 * @instance
                 */
                BuddyInfo.prototype.orderPages = $util.emptyArray;

                /**
                 * Creates a new BuddyInfo instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.SysStats.BuddyInfo
                 * @static
                 * @param {perfetto.protos.SysStats.IBuddyInfo=} [properties] Properties to set
                 * @returns {perfetto.protos.SysStats.BuddyInfo} BuddyInfo instance
                 */
                BuddyInfo.create = function create(properties) {
                    return new BuddyInfo(properties);
                };

                /**
                 * Encodes the specified BuddyInfo message. Does not implicitly {@link perfetto.protos.SysStats.BuddyInfo.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.SysStats.BuddyInfo
                 * @static
                 * @param {perfetto.protos.SysStats.IBuddyInfo} m BuddyInfo message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BuddyInfo.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.node != null && Object.hasOwnProperty.call(m, "node"))
                        w.uint32(10).string(m.node);
                    if (m.zone != null && Object.hasOwnProperty.call(m, "zone"))
                        w.uint32(18).string(m.zone);
                    if (m.orderPages != null && m.orderPages.length) {
                        for (var i = 0; i < m.orderPages.length; ++i)
                            w.uint32(24).uint32(m.orderPages[i]);
                    }
                    return w;
                };

                /**
                 * Encodes the specified BuddyInfo message, length delimited. Does not implicitly {@link perfetto.protos.SysStats.BuddyInfo.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.SysStats.BuddyInfo
                 * @static
                 * @param {perfetto.protos.SysStats.IBuddyInfo} message BuddyInfo message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BuddyInfo.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a BuddyInfo message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.SysStats.BuddyInfo
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.SysStats.BuddyInfo} BuddyInfo
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BuddyInfo.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SysStats.BuddyInfo();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.node = r.string();
                            break;
                        case 2:
                            m.zone = r.string();
                            break;
                        case 3:
                            if (!(m.orderPages && m.orderPages.length))
                                m.orderPages = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.orderPages.push(r.uint32());
                            } else
                                m.orderPages.push(r.uint32());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a BuddyInfo message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.SysStats.BuddyInfo
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.SysStats.BuddyInfo} BuddyInfo
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BuddyInfo.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a BuddyInfo message.
                 * @function verify
                 * @memberof perfetto.protos.SysStats.BuddyInfo
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                BuddyInfo.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.node != null && m.hasOwnProperty("node")) {
                        if (!$util.isString(m.node))
                            return "node: string expected";
                    }
                    if (m.zone != null && m.hasOwnProperty("zone")) {
                        if (!$util.isString(m.zone))
                            return "zone: string expected";
                    }
                    if (m.orderPages != null && m.hasOwnProperty("orderPages")) {
                        if (!Array.isArray(m.orderPages))
                            return "orderPages: array expected";
                        for (var i = 0; i < m.orderPages.length; ++i) {
                            if (!$util.isInteger(m.orderPages[i]))
                                return "orderPages: integer[] expected";
                        }
                    }
                    return null;
                };

                /**
                 * Creates a BuddyInfo message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.SysStats.BuddyInfo
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.SysStats.BuddyInfo} BuddyInfo
                 */
                BuddyInfo.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.SysStats.BuddyInfo)
                        return d;
                    var m = new $root.perfetto.protos.SysStats.BuddyInfo();
                    if (d.node != null) {
                        m.node = String(d.node);
                    }
                    if (d.zone != null) {
                        m.zone = String(d.zone);
                    }
                    if (d.orderPages) {
                        if (!Array.isArray(d.orderPages))
                            throw TypeError(".perfetto.protos.SysStats.BuddyInfo.orderPages: array expected");
                        m.orderPages = [];
                        for (var i = 0; i < d.orderPages.length; ++i) {
                            m.orderPages[i] = d.orderPages[i] >>> 0;
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a BuddyInfo message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.SysStats.BuddyInfo
                 * @static
                 * @param {perfetto.protos.SysStats.BuddyInfo} m BuddyInfo
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                BuddyInfo.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.orderPages = [];
                    }
                    if (o.defaults) {
                        d.node = "";
                        d.zone = "";
                    }
                    if (m.node != null && m.hasOwnProperty("node")) {
                        d.node = m.node;
                    }
                    if (m.zone != null && m.hasOwnProperty("zone")) {
                        d.zone = m.zone;
                    }
                    if (m.orderPages && m.orderPages.length) {
                        d.orderPages = [];
                        for (var j = 0; j < m.orderPages.length; ++j) {
                            d.orderPages[j] = m.orderPages[j];
                        }
                    }
                    return d;
                };

                /**
                 * Converts this BuddyInfo to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.SysStats.BuddyInfo
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                BuddyInfo.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return BuddyInfo;
            })();

            SysStats.DiskStat = (function() {

                /**
                 * Properties of a DiskStat.
                 * @memberof perfetto.protos.SysStats
                 * @interface IDiskStat
                 * @property {string|null} [deviceName] DiskStat deviceName
                 * @property {number|null} [readSectors] DiskStat readSectors
                 * @property {number|null} [readTimeMs] DiskStat readTimeMs
                 * @property {number|null} [writeSectors] DiskStat writeSectors
                 * @property {number|null} [writeTimeMs] DiskStat writeTimeMs
                 * @property {number|null} [discardSectors] DiskStat discardSectors
                 * @property {number|null} [discardTimeMs] DiskStat discardTimeMs
                 * @property {number|null} [flushCount] DiskStat flushCount
                 * @property {number|null} [flushTimeMs] DiskStat flushTimeMs
                 */

                /**
                 * Constructs a new DiskStat.
                 * @memberof perfetto.protos.SysStats
                 * @classdesc Represents a DiskStat.
                 * @implements IDiskStat
                 * @constructor
                 * @param {perfetto.protos.SysStats.IDiskStat=} [p] Properties to set
                 */
                function DiskStat(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * DiskStat deviceName.
                 * @member {string} deviceName
                 * @memberof perfetto.protos.SysStats.DiskStat
                 * @instance
                 */
                DiskStat.prototype.deviceName = "";

                /**
                 * DiskStat readSectors.
                 * @member {number} readSectors
                 * @memberof perfetto.protos.SysStats.DiskStat
                 * @instance
                 */
                DiskStat.prototype.readSectors = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * DiskStat readTimeMs.
                 * @member {number} readTimeMs
                 * @memberof perfetto.protos.SysStats.DiskStat
                 * @instance
                 */
                DiskStat.prototype.readTimeMs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * DiskStat writeSectors.
                 * @member {number} writeSectors
                 * @memberof perfetto.protos.SysStats.DiskStat
                 * @instance
                 */
                DiskStat.prototype.writeSectors = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * DiskStat writeTimeMs.
                 * @member {number} writeTimeMs
                 * @memberof perfetto.protos.SysStats.DiskStat
                 * @instance
                 */
                DiskStat.prototype.writeTimeMs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * DiskStat discardSectors.
                 * @member {number} discardSectors
                 * @memberof perfetto.protos.SysStats.DiskStat
                 * @instance
                 */
                DiskStat.prototype.discardSectors = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * DiskStat discardTimeMs.
                 * @member {number} discardTimeMs
                 * @memberof perfetto.protos.SysStats.DiskStat
                 * @instance
                 */
                DiskStat.prototype.discardTimeMs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * DiskStat flushCount.
                 * @member {number} flushCount
                 * @memberof perfetto.protos.SysStats.DiskStat
                 * @instance
                 */
                DiskStat.prototype.flushCount = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * DiskStat flushTimeMs.
                 * @member {number} flushTimeMs
                 * @memberof perfetto.protos.SysStats.DiskStat
                 * @instance
                 */
                DiskStat.prototype.flushTimeMs = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

                /**
                 * Creates a new DiskStat instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.SysStats.DiskStat
                 * @static
                 * @param {perfetto.protos.SysStats.IDiskStat=} [properties] Properties to set
                 * @returns {perfetto.protos.SysStats.DiskStat} DiskStat instance
                 */
                DiskStat.create = function create(properties) {
                    return new DiskStat(properties);
                };

                /**
                 * Encodes the specified DiskStat message. Does not implicitly {@link perfetto.protos.SysStats.DiskStat.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.SysStats.DiskStat
                 * @static
                 * @param {perfetto.protos.SysStats.IDiskStat} m DiskStat message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                DiskStat.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.deviceName != null && Object.hasOwnProperty.call(m, "deviceName"))
                        w.uint32(10).string(m.deviceName);
                    if (m.readSectors != null && Object.hasOwnProperty.call(m, "readSectors"))
                        w.uint32(16).uint64(m.readSectors);
                    if (m.readTimeMs != null && Object.hasOwnProperty.call(m, "readTimeMs"))
                        w.uint32(24).uint64(m.readTimeMs);
                    if (m.writeSectors != null && Object.hasOwnProperty.call(m, "writeSectors"))
                        w.uint32(32).uint64(m.writeSectors);
                    if (m.writeTimeMs != null && Object.hasOwnProperty.call(m, "writeTimeMs"))
                        w.uint32(40).uint64(m.writeTimeMs);
                    if (m.discardSectors != null && Object.hasOwnProperty.call(m, "discardSectors"))
                        w.uint32(48).uint64(m.discardSectors);
                    if (m.discardTimeMs != null && Object.hasOwnProperty.call(m, "discardTimeMs"))
                        w.uint32(56).uint64(m.discardTimeMs);
                    if (m.flushCount != null && Object.hasOwnProperty.call(m, "flushCount"))
                        w.uint32(64).uint64(m.flushCount);
                    if (m.flushTimeMs != null && Object.hasOwnProperty.call(m, "flushTimeMs"))
                        w.uint32(72).uint64(m.flushTimeMs);
                    return w;
                };

                /**
                 * Encodes the specified DiskStat message, length delimited. Does not implicitly {@link perfetto.protos.SysStats.DiskStat.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.SysStats.DiskStat
                 * @static
                 * @param {perfetto.protos.SysStats.IDiskStat} message DiskStat message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                DiskStat.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a DiskStat message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.SysStats.DiskStat
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.SysStats.DiskStat} DiskStat
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                DiskStat.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SysStats.DiskStat();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.deviceName = r.string();
                            break;
                        case 2:
                            m.readSectors = r.uint64();
                            break;
                        case 3:
                            m.readTimeMs = r.uint64();
                            break;
                        case 4:
                            m.writeSectors = r.uint64();
                            break;
                        case 5:
                            m.writeTimeMs = r.uint64();
                            break;
                        case 6:
                            m.discardSectors = r.uint64();
                            break;
                        case 7:
                            m.discardTimeMs = r.uint64();
                            break;
                        case 8:
                            m.flushCount = r.uint64();
                            break;
                        case 9:
                            m.flushTimeMs = r.uint64();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a DiskStat message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.SysStats.DiskStat
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.SysStats.DiskStat} DiskStat
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                DiskStat.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a DiskStat message.
                 * @function verify
                 * @memberof perfetto.protos.SysStats.DiskStat
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                DiskStat.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.deviceName != null && m.hasOwnProperty("deviceName")) {
                        if (!$util.isString(m.deviceName))
                            return "deviceName: string expected";
                    }
                    if (m.readSectors != null && m.hasOwnProperty("readSectors")) {
                        if (!$util.isInteger(m.readSectors) && !(m.readSectors && $util.isInteger(m.readSectors.low) && $util.isInteger(m.readSectors.high)))
                            return "readSectors: integer|Long expected";
                    }
                    if (m.readTimeMs != null && m.hasOwnProperty("readTimeMs")) {
                        if (!$util.isInteger(m.readTimeMs) && !(m.readTimeMs && $util.isInteger(m.readTimeMs.low) && $util.isInteger(m.readTimeMs.high)))
                            return "readTimeMs: integer|Long expected";
                    }
                    if (m.writeSectors != null && m.hasOwnProperty("writeSectors")) {
                        if (!$util.isInteger(m.writeSectors) && !(m.writeSectors && $util.isInteger(m.writeSectors.low) && $util.isInteger(m.writeSectors.high)))
                            return "writeSectors: integer|Long expected";
                    }
                    if (m.writeTimeMs != null && m.hasOwnProperty("writeTimeMs")) {
                        if (!$util.isInteger(m.writeTimeMs) && !(m.writeTimeMs && $util.isInteger(m.writeTimeMs.low) && $util.isInteger(m.writeTimeMs.high)))
                            return "writeTimeMs: integer|Long expected";
                    }
                    if (m.discardSectors != null && m.hasOwnProperty("discardSectors")) {
                        if (!$util.isInteger(m.discardSectors) && !(m.discardSectors && $util.isInteger(m.discardSectors.low) && $util.isInteger(m.discardSectors.high)))
                            return "discardSectors: integer|Long expected";
                    }
                    if (m.discardTimeMs != null && m.hasOwnProperty("discardTimeMs")) {
                        if (!$util.isInteger(m.discardTimeMs) && !(m.discardTimeMs && $util.isInteger(m.discardTimeMs.low) && $util.isInteger(m.discardTimeMs.high)))
                            return "discardTimeMs: integer|Long expected";
                    }
                    if (m.flushCount != null && m.hasOwnProperty("flushCount")) {
                        if (!$util.isInteger(m.flushCount) && !(m.flushCount && $util.isInteger(m.flushCount.low) && $util.isInteger(m.flushCount.high)))
                            return "flushCount: integer|Long expected";
                    }
                    if (m.flushTimeMs != null && m.hasOwnProperty("flushTimeMs")) {
                        if (!$util.isInteger(m.flushTimeMs) && !(m.flushTimeMs && $util.isInteger(m.flushTimeMs.low) && $util.isInteger(m.flushTimeMs.high)))
                            return "flushTimeMs: integer|Long expected";
                    }
                    return null;
                };

                /**
                 * Creates a DiskStat message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.SysStats.DiskStat
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.SysStats.DiskStat} DiskStat
                 */
                DiskStat.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.SysStats.DiskStat)
                        return d;
                    var m = new $root.perfetto.protos.SysStats.DiskStat();
                    if (d.deviceName != null) {
                        m.deviceName = String(d.deviceName);
                    }
                    if (d.readSectors != null) {
                        if ($util.Long)
                            (m.readSectors = $util.Long.fromValue(d.readSectors)).unsigned = true;
                        else if (typeof d.readSectors === "string")
                            m.readSectors = parseInt(d.readSectors, 10);
                        else if (typeof d.readSectors === "number")
                            m.readSectors = d.readSectors;
                        else if (typeof d.readSectors === "object")
                            m.readSectors = new $util.LongBits(d.readSectors.low >>> 0, d.readSectors.high >>> 0).toNumber(true);
                    }
                    if (d.readTimeMs != null) {
                        if ($util.Long)
                            (m.readTimeMs = $util.Long.fromValue(d.readTimeMs)).unsigned = true;
                        else if (typeof d.readTimeMs === "string")
                            m.readTimeMs = parseInt(d.readTimeMs, 10);
                        else if (typeof d.readTimeMs === "number")
                            m.readTimeMs = d.readTimeMs;
                        else if (typeof d.readTimeMs === "object")
                            m.readTimeMs = new $util.LongBits(d.readTimeMs.low >>> 0, d.readTimeMs.high >>> 0).toNumber(true);
                    }
                    if (d.writeSectors != null) {
                        if ($util.Long)
                            (m.writeSectors = $util.Long.fromValue(d.writeSectors)).unsigned = true;
                        else if (typeof d.writeSectors === "string")
                            m.writeSectors = parseInt(d.writeSectors, 10);
                        else if (typeof d.writeSectors === "number")
                            m.writeSectors = d.writeSectors;
                        else if (typeof d.writeSectors === "object")
                            m.writeSectors = new $util.LongBits(d.writeSectors.low >>> 0, d.writeSectors.high >>> 0).toNumber(true);
                    }
                    if (d.writeTimeMs != null) {
                        if ($util.Long)
                            (m.writeTimeMs = $util.Long.fromValue(d.writeTimeMs)).unsigned = true;
                        else if (typeof d.writeTimeMs === "string")
                            m.writeTimeMs = parseInt(d.writeTimeMs, 10);
                        else if (typeof d.writeTimeMs === "number")
                            m.writeTimeMs = d.writeTimeMs;
                        else if (typeof d.writeTimeMs === "object")
                            m.writeTimeMs = new $util.LongBits(d.writeTimeMs.low >>> 0, d.writeTimeMs.high >>> 0).toNumber(true);
                    }
                    if (d.discardSectors != null) {
                        if ($util.Long)
                            (m.discardSectors = $util.Long.fromValue(d.discardSectors)).unsigned = true;
                        else if (typeof d.discardSectors === "string")
                            m.discardSectors = parseInt(d.discardSectors, 10);
                        else if (typeof d.discardSectors === "number")
                            m.discardSectors = d.discardSectors;
                        else if (typeof d.discardSectors === "object")
                            m.discardSectors = new $util.LongBits(d.discardSectors.low >>> 0, d.discardSectors.high >>> 0).toNumber(true);
                    }
                    if (d.discardTimeMs != null) {
                        if ($util.Long)
                            (m.discardTimeMs = $util.Long.fromValue(d.discardTimeMs)).unsigned = true;
                        else if (typeof d.discardTimeMs === "string")
                            m.discardTimeMs = parseInt(d.discardTimeMs, 10);
                        else if (typeof d.discardTimeMs === "number")
                            m.discardTimeMs = d.discardTimeMs;
                        else if (typeof d.discardTimeMs === "object")
                            m.discardTimeMs = new $util.LongBits(d.discardTimeMs.low >>> 0, d.discardTimeMs.high >>> 0).toNumber(true);
                    }
                    if (d.flushCount != null) {
                        if ($util.Long)
                            (m.flushCount = $util.Long.fromValue(d.flushCount)).unsigned = true;
                        else if (typeof d.flushCount === "string")
                            m.flushCount = parseInt(d.flushCount, 10);
                        else if (typeof d.flushCount === "number")
                            m.flushCount = d.flushCount;
                        else if (typeof d.flushCount === "object")
                            m.flushCount = new $util.LongBits(d.flushCount.low >>> 0, d.flushCount.high >>> 0).toNumber(true);
                    }
                    if (d.flushTimeMs != null) {
                        if ($util.Long)
                            (m.flushTimeMs = $util.Long.fromValue(d.flushTimeMs)).unsigned = true;
                        else if (typeof d.flushTimeMs === "string")
                            m.flushTimeMs = parseInt(d.flushTimeMs, 10);
                        else if (typeof d.flushTimeMs === "number")
                            m.flushTimeMs = d.flushTimeMs;
                        else if (typeof d.flushTimeMs === "object")
                            m.flushTimeMs = new $util.LongBits(d.flushTimeMs.low >>> 0, d.flushTimeMs.high >>> 0).toNumber(true);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a DiskStat message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.SysStats.DiskStat
                 * @static
                 * @param {perfetto.protos.SysStats.DiskStat} m DiskStat
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                DiskStat.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.defaults) {
                        d.deviceName = "";
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.readSectors = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.readSectors = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.readTimeMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.readTimeMs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.writeSectors = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.writeSectors = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.writeTimeMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.writeTimeMs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.discardSectors = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.discardSectors = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.discardTimeMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.discardTimeMs = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.flushCount = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.flushCount = o.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var n = new $util.Long(0, 0, true);
                            d.flushTimeMs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                        } else
                            d.flushTimeMs = o.longs === String ? "0" : 0;
                    }
                    if (m.deviceName != null && m.hasOwnProperty("deviceName")) {
                        d.deviceName = m.deviceName;
                    }
                    if (m.readSectors != null && m.hasOwnProperty("readSectors")) {
                        if (typeof m.readSectors === "number")
                            d.readSectors = o.longs === String ? String(m.readSectors) : m.readSectors;
                        else
                            d.readSectors = o.longs === String ? $util.Long.prototype.toString.call(m.readSectors) : o.longs === Number ? new $util.LongBits(m.readSectors.low >>> 0, m.readSectors.high >>> 0).toNumber(true) : m.readSectors;
                    }
                    if (m.readTimeMs != null && m.hasOwnProperty("readTimeMs")) {
                        if (typeof m.readTimeMs === "number")
                            d.readTimeMs = o.longs === String ? String(m.readTimeMs) : m.readTimeMs;
                        else
                            d.readTimeMs = o.longs === String ? $util.Long.prototype.toString.call(m.readTimeMs) : o.longs === Number ? new $util.LongBits(m.readTimeMs.low >>> 0, m.readTimeMs.high >>> 0).toNumber(true) : m.readTimeMs;
                    }
                    if (m.writeSectors != null && m.hasOwnProperty("writeSectors")) {
                        if (typeof m.writeSectors === "number")
                            d.writeSectors = o.longs === String ? String(m.writeSectors) : m.writeSectors;
                        else
                            d.writeSectors = o.longs === String ? $util.Long.prototype.toString.call(m.writeSectors) : o.longs === Number ? new $util.LongBits(m.writeSectors.low >>> 0, m.writeSectors.high >>> 0).toNumber(true) : m.writeSectors;
                    }
                    if (m.writeTimeMs != null && m.hasOwnProperty("writeTimeMs")) {
                        if (typeof m.writeTimeMs === "number")
                            d.writeTimeMs = o.longs === String ? String(m.writeTimeMs) : m.writeTimeMs;
                        else
                            d.writeTimeMs = o.longs === String ? $util.Long.prototype.toString.call(m.writeTimeMs) : o.longs === Number ? new $util.LongBits(m.writeTimeMs.low >>> 0, m.writeTimeMs.high >>> 0).toNumber(true) : m.writeTimeMs;
                    }
                    if (m.discardSectors != null && m.hasOwnProperty("discardSectors")) {
                        if (typeof m.discardSectors === "number")
                            d.discardSectors = o.longs === String ? String(m.discardSectors) : m.discardSectors;
                        else
                            d.discardSectors = o.longs === String ? $util.Long.prototype.toString.call(m.discardSectors) : o.longs === Number ? new $util.LongBits(m.discardSectors.low >>> 0, m.discardSectors.high >>> 0).toNumber(true) : m.discardSectors;
                    }
                    if (m.discardTimeMs != null && m.hasOwnProperty("discardTimeMs")) {
                        if (typeof m.discardTimeMs === "number")
                            d.discardTimeMs = o.longs === String ? String(m.discardTimeMs) : m.discardTimeMs;
                        else
                            d.discardTimeMs = o.longs === String ? $util.Long.prototype.toString.call(m.discardTimeMs) : o.longs === Number ? new $util.LongBits(m.discardTimeMs.low >>> 0, m.discardTimeMs.high >>> 0).toNumber(true) : m.discardTimeMs;
                    }
                    if (m.flushCount != null && m.hasOwnProperty("flushCount")) {
                        if (typeof m.flushCount === "number")
                            d.flushCount = o.longs === String ? String(m.flushCount) : m.flushCount;
                        else
                            d.flushCount = o.longs === String ? $util.Long.prototype.toString.call(m.flushCount) : o.longs === Number ? new $util.LongBits(m.flushCount.low >>> 0, m.flushCount.high >>> 0).toNumber(true) : m.flushCount;
                    }
                    if (m.flushTimeMs != null && m.hasOwnProperty("flushTimeMs")) {
                        if (typeof m.flushTimeMs === "number")
                            d.flushTimeMs = o.longs === String ? String(m.flushTimeMs) : m.flushTimeMs;
                        else
                            d.flushTimeMs = o.longs === String ? $util.Long.prototype.toString.call(m.flushTimeMs) : o.longs === Number ? new $util.LongBits(m.flushTimeMs.low >>> 0, m.flushTimeMs.high >>> 0).toNumber(true) : m.flushTimeMs;
                    }
                    return d;
                };

                /**
                 * Converts this DiskStat to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.SysStats.DiskStat
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                DiskStat.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return DiskStat;
            })();

            return SysStats;
        })();

        protos.Utsname = (function() {

            /**
             * Properties of an Utsname.
             * @memberof perfetto.protos
             * @interface IUtsname
             * @property {string|null} [sysname] Utsname sysname
             * @property {string|null} [version] Utsname version
             * @property {string|null} [release] Utsname release
             * @property {string|null} [machine] Utsname machine
             */

            /**
             * Constructs a new Utsname.
             * @memberof perfetto.protos
             * @classdesc Represents an Utsname.
             * @implements IUtsname
             * @constructor
             * @param {perfetto.protos.IUtsname=} [p] Properties to set
             */
            function Utsname(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Utsname sysname.
             * @member {string} sysname
             * @memberof perfetto.protos.Utsname
             * @instance
             */
            Utsname.prototype.sysname = "";

            /**
             * Utsname version.
             * @member {string} version
             * @memberof perfetto.protos.Utsname
             * @instance
             */
            Utsname.prototype.version = "";

            /**
             * Utsname release.
             * @member {string} release
             * @memberof perfetto.protos.Utsname
             * @instance
             */
            Utsname.prototype.release = "";

            /**
             * Utsname machine.
             * @member {string} machine
             * @memberof perfetto.protos.Utsname
             * @instance
             */
            Utsname.prototype.machine = "";

            /**
             * Creates a new Utsname instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Utsname
             * @static
             * @param {perfetto.protos.IUtsname=} [properties] Properties to set
             * @returns {perfetto.protos.Utsname} Utsname instance
             */
            Utsname.create = function create(properties) {
                return new Utsname(properties);
            };

            /**
             * Encodes the specified Utsname message. Does not implicitly {@link perfetto.protos.Utsname.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Utsname
             * @static
             * @param {perfetto.protos.IUtsname} m Utsname message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Utsname.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.sysname != null && Object.hasOwnProperty.call(m, "sysname"))
                    w.uint32(10).string(m.sysname);
                if (m.version != null && Object.hasOwnProperty.call(m, "version"))
                    w.uint32(18).string(m.version);
                if (m.release != null && Object.hasOwnProperty.call(m, "release"))
                    w.uint32(26).string(m.release);
                if (m.machine != null && Object.hasOwnProperty.call(m, "machine"))
                    w.uint32(34).string(m.machine);
                return w;
            };

            /**
             * Encodes the specified Utsname message, length delimited. Does not implicitly {@link perfetto.protos.Utsname.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Utsname
             * @static
             * @param {perfetto.protos.IUtsname} message Utsname message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Utsname.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an Utsname message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Utsname
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Utsname} Utsname
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Utsname.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Utsname();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.sysname = r.string();
                        break;
                    case 2:
                        m.version = r.string();
                        break;
                    case 3:
                        m.release = r.string();
                        break;
                    case 4:
                        m.machine = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an Utsname message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Utsname
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Utsname} Utsname
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Utsname.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an Utsname message.
             * @function verify
             * @memberof perfetto.protos.Utsname
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Utsname.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.sysname != null && m.hasOwnProperty("sysname")) {
                    if (!$util.isString(m.sysname))
                        return "sysname: string expected";
                }
                if (m.version != null && m.hasOwnProperty("version")) {
                    if (!$util.isString(m.version))
                        return "version: string expected";
                }
                if (m.release != null && m.hasOwnProperty("release")) {
                    if (!$util.isString(m.release))
                        return "release: string expected";
                }
                if (m.machine != null && m.hasOwnProperty("machine")) {
                    if (!$util.isString(m.machine))
                        return "machine: string expected";
                }
                return null;
            };

            /**
             * Creates an Utsname message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Utsname
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Utsname} Utsname
             */
            Utsname.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Utsname)
                    return d;
                var m = new $root.perfetto.protos.Utsname();
                if (d.sysname != null) {
                    m.sysname = String(d.sysname);
                }
                if (d.version != null) {
                    m.version = String(d.version);
                }
                if (d.release != null) {
                    m.release = String(d.release);
                }
                if (d.machine != null) {
                    m.machine = String(d.machine);
                }
                return m;
            };

            /**
             * Creates a plain object from an Utsname message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Utsname
             * @static
             * @param {perfetto.protos.Utsname} m Utsname
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Utsname.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.sysname = "";
                    d.version = "";
                    d.release = "";
                    d.machine = "";
                }
                if (m.sysname != null && m.hasOwnProperty("sysname")) {
                    d.sysname = m.sysname;
                }
                if (m.version != null && m.hasOwnProperty("version")) {
                    d.version = m.version;
                }
                if (m.release != null && m.hasOwnProperty("release")) {
                    d.release = m.release;
                }
                if (m.machine != null && m.hasOwnProperty("machine")) {
                    d.machine = m.machine;
                }
                return d;
            };

            /**
             * Converts this Utsname to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Utsname
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Utsname.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Utsname;
        })();

        protos.SystemInfo = (function() {

            /**
             * Properties of a SystemInfo.
             * @memberof perfetto.protos
             * @interface ISystemInfo
             * @property {perfetto.protos.IUtsname|null} [utsname] SystemInfo utsname
             * @property {string|null} [androidBuildFingerprint] SystemInfo androidBuildFingerprint
             * @property {number|null} [hz] SystemInfo hz
             * @property {string|null} [tracingServiceVersion] SystemInfo tracingServiceVersion
             * @property {number|null} [androidSdkVersion] SystemInfo androidSdkVersion
             * @property {number|null} [pageSize] SystemInfo pageSize
             */

            /**
             * Constructs a new SystemInfo.
             * @memberof perfetto.protos
             * @classdesc Represents a SystemInfo.
             * @implements ISystemInfo
             * @constructor
             * @param {perfetto.protos.ISystemInfo=} [p] Properties to set
             */
            function SystemInfo(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SystemInfo utsname.
             * @member {perfetto.protos.IUtsname|null|undefined} utsname
             * @memberof perfetto.protos.SystemInfo
             * @instance
             */
            SystemInfo.prototype.utsname = null;

            /**
             * SystemInfo androidBuildFingerprint.
             * @member {string} androidBuildFingerprint
             * @memberof perfetto.protos.SystemInfo
             * @instance
             */
            SystemInfo.prototype.androidBuildFingerprint = "";

            /**
             * SystemInfo hz.
             * @member {number} hz
             * @memberof perfetto.protos.SystemInfo
             * @instance
             */
            SystemInfo.prototype.hz = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * SystemInfo tracingServiceVersion.
             * @member {string} tracingServiceVersion
             * @memberof perfetto.protos.SystemInfo
             * @instance
             */
            SystemInfo.prototype.tracingServiceVersion = "";

            /**
             * SystemInfo androidSdkVersion.
             * @member {number} androidSdkVersion
             * @memberof perfetto.protos.SystemInfo
             * @instance
             */
            SystemInfo.prototype.androidSdkVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * SystemInfo pageSize.
             * @member {number} pageSize
             * @memberof perfetto.protos.SystemInfo
             * @instance
             */
            SystemInfo.prototype.pageSize = 0;

            /**
             * Creates a new SystemInfo instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SystemInfo
             * @static
             * @param {perfetto.protos.ISystemInfo=} [properties] Properties to set
             * @returns {perfetto.protos.SystemInfo} SystemInfo instance
             */
            SystemInfo.create = function create(properties) {
                return new SystemInfo(properties);
            };

            /**
             * Encodes the specified SystemInfo message. Does not implicitly {@link perfetto.protos.SystemInfo.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SystemInfo
             * @static
             * @param {perfetto.protos.ISystemInfo} m SystemInfo message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SystemInfo.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.utsname != null && Object.hasOwnProperty.call(m, "utsname"))
                    $root.perfetto.protos.Utsname.encode(m.utsname, w.uint32(10).fork()).ldelim();
                if (m.androidBuildFingerprint != null && Object.hasOwnProperty.call(m, "androidBuildFingerprint"))
                    w.uint32(18).string(m.androidBuildFingerprint);
                if (m.hz != null && Object.hasOwnProperty.call(m, "hz"))
                    w.uint32(24).int64(m.hz);
                if (m.tracingServiceVersion != null && Object.hasOwnProperty.call(m, "tracingServiceVersion"))
                    w.uint32(34).string(m.tracingServiceVersion);
                if (m.androidSdkVersion != null && Object.hasOwnProperty.call(m, "androidSdkVersion"))
                    w.uint32(40).uint64(m.androidSdkVersion);
                if (m.pageSize != null && Object.hasOwnProperty.call(m, "pageSize"))
                    w.uint32(48).uint32(m.pageSize);
                return w;
            };

            /**
             * Encodes the specified SystemInfo message, length delimited. Does not implicitly {@link perfetto.protos.SystemInfo.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SystemInfo
             * @static
             * @param {perfetto.protos.ISystemInfo} message SystemInfo message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SystemInfo.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SystemInfo message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SystemInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SystemInfo} SystemInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SystemInfo.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SystemInfo();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.utsname = $root.perfetto.protos.Utsname.decode(r, r.uint32());
                        break;
                    case 2:
                        m.androidBuildFingerprint = r.string();
                        break;
                    case 3:
                        m.hz = r.int64();
                        break;
                    case 4:
                        m.tracingServiceVersion = r.string();
                        break;
                    case 5:
                        m.androidSdkVersion = r.uint64();
                        break;
                    case 6:
                        m.pageSize = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SystemInfo message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SystemInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SystemInfo} SystemInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SystemInfo.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SystemInfo message.
             * @function verify
             * @memberof perfetto.protos.SystemInfo
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SystemInfo.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.utsname != null && m.hasOwnProperty("utsname")) {
                    {
                        var e = $root.perfetto.protos.Utsname.verify(m.utsname);
                        if (e)
                            return "utsname." + e;
                    }
                }
                if (m.androidBuildFingerprint != null && m.hasOwnProperty("androidBuildFingerprint")) {
                    if (!$util.isString(m.androidBuildFingerprint))
                        return "androidBuildFingerprint: string expected";
                }
                if (m.hz != null && m.hasOwnProperty("hz")) {
                    if (!$util.isInteger(m.hz) && !(m.hz && $util.isInteger(m.hz.low) && $util.isInteger(m.hz.high)))
                        return "hz: integer|Long expected";
                }
                if (m.tracingServiceVersion != null && m.hasOwnProperty("tracingServiceVersion")) {
                    if (!$util.isString(m.tracingServiceVersion))
                        return "tracingServiceVersion: string expected";
                }
                if (m.androidSdkVersion != null && m.hasOwnProperty("androidSdkVersion")) {
                    if (!$util.isInteger(m.androidSdkVersion) && !(m.androidSdkVersion && $util.isInteger(m.androidSdkVersion.low) && $util.isInteger(m.androidSdkVersion.high)))
                        return "androidSdkVersion: integer|Long expected";
                }
                if (m.pageSize != null && m.hasOwnProperty("pageSize")) {
                    if (!$util.isInteger(m.pageSize))
                        return "pageSize: integer expected";
                }
                return null;
            };

            /**
             * Creates a SystemInfo message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SystemInfo
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SystemInfo} SystemInfo
             */
            SystemInfo.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SystemInfo)
                    return d;
                var m = new $root.perfetto.protos.SystemInfo();
                if (d.utsname != null) {
                    if (typeof d.utsname !== "object")
                        throw TypeError(".perfetto.protos.SystemInfo.utsname: object expected");
                    m.utsname = $root.perfetto.protos.Utsname.fromObject(d.utsname);
                }
                if (d.androidBuildFingerprint != null) {
                    m.androidBuildFingerprint = String(d.androidBuildFingerprint);
                }
                if (d.hz != null) {
                    if ($util.Long)
                        (m.hz = $util.Long.fromValue(d.hz)).unsigned = false;
                    else if (typeof d.hz === "string")
                        m.hz = parseInt(d.hz, 10);
                    else if (typeof d.hz === "number")
                        m.hz = d.hz;
                    else if (typeof d.hz === "object")
                        m.hz = new $util.LongBits(d.hz.low >>> 0, d.hz.high >>> 0).toNumber();
                }
                if (d.tracingServiceVersion != null) {
                    m.tracingServiceVersion = String(d.tracingServiceVersion);
                }
                if (d.androidSdkVersion != null) {
                    if ($util.Long)
                        (m.androidSdkVersion = $util.Long.fromValue(d.androidSdkVersion)).unsigned = true;
                    else if (typeof d.androidSdkVersion === "string")
                        m.androidSdkVersion = parseInt(d.androidSdkVersion, 10);
                    else if (typeof d.androidSdkVersion === "number")
                        m.androidSdkVersion = d.androidSdkVersion;
                    else if (typeof d.androidSdkVersion === "object")
                        m.androidSdkVersion = new $util.LongBits(d.androidSdkVersion.low >>> 0, d.androidSdkVersion.high >>> 0).toNumber(true);
                }
                if (d.pageSize != null) {
                    m.pageSize = d.pageSize >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a SystemInfo message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SystemInfo
             * @static
             * @param {perfetto.protos.SystemInfo} m SystemInfo
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SystemInfo.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.utsname = null;
                    d.androidBuildFingerprint = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.hz = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.hz = o.longs === String ? "0" : 0;
                    d.tracingServiceVersion = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.androidSdkVersion = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.androidSdkVersion = o.longs === String ? "0" : 0;
                    d.pageSize = 0;
                }
                if (m.utsname != null && m.hasOwnProperty("utsname")) {
                    d.utsname = $root.perfetto.protos.Utsname.toObject(m.utsname, o);
                }
                if (m.androidBuildFingerprint != null && m.hasOwnProperty("androidBuildFingerprint")) {
                    d.androidBuildFingerprint = m.androidBuildFingerprint;
                }
                if (m.hz != null && m.hasOwnProperty("hz")) {
                    if (typeof m.hz === "number")
                        d.hz = o.longs === String ? String(m.hz) : m.hz;
                    else
                        d.hz = o.longs === String ? $util.Long.prototype.toString.call(m.hz) : o.longs === Number ? new $util.LongBits(m.hz.low >>> 0, m.hz.high >>> 0).toNumber() : m.hz;
                }
                if (m.tracingServiceVersion != null && m.hasOwnProperty("tracingServiceVersion")) {
                    d.tracingServiceVersion = m.tracingServiceVersion;
                }
                if (m.androidSdkVersion != null && m.hasOwnProperty("androidSdkVersion")) {
                    if (typeof m.androidSdkVersion === "number")
                        d.androidSdkVersion = o.longs === String ? String(m.androidSdkVersion) : m.androidSdkVersion;
                    else
                        d.androidSdkVersion = o.longs === String ? $util.Long.prototype.toString.call(m.androidSdkVersion) : o.longs === Number ? new $util.LongBits(m.androidSdkVersion.low >>> 0, m.androidSdkVersion.high >>> 0).toNumber(true) : m.androidSdkVersion;
                }
                if (m.pageSize != null && m.hasOwnProperty("pageSize")) {
                    d.pageSize = m.pageSize;
                }
                return d;
            };

            /**
             * Converts this SystemInfo to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SystemInfo
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SystemInfo.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SystemInfo;
        })();

        protos.CpuInfo = (function() {

            /**
             * Properties of a CpuInfo.
             * @memberof perfetto.protos
             * @interface ICpuInfo
             * @property {Array.<perfetto.protos.CpuInfo.ICpu>|null} [cpus] CpuInfo cpus
             */

            /**
             * Constructs a new CpuInfo.
             * @memberof perfetto.protos
             * @classdesc Represents a CpuInfo.
             * @implements ICpuInfo
             * @constructor
             * @param {perfetto.protos.ICpuInfo=} [p] Properties to set
             */
            function CpuInfo(p) {
                this.cpus = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * CpuInfo cpus.
             * @member {Array.<perfetto.protos.CpuInfo.ICpu>} cpus
             * @memberof perfetto.protos.CpuInfo
             * @instance
             */
            CpuInfo.prototype.cpus = $util.emptyArray;

            /**
             * Creates a new CpuInfo instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.CpuInfo
             * @static
             * @param {perfetto.protos.ICpuInfo=} [properties] Properties to set
             * @returns {perfetto.protos.CpuInfo} CpuInfo instance
             */
            CpuInfo.create = function create(properties) {
                return new CpuInfo(properties);
            };

            /**
             * Encodes the specified CpuInfo message. Does not implicitly {@link perfetto.protos.CpuInfo.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.CpuInfo
             * @static
             * @param {perfetto.protos.ICpuInfo} m CpuInfo message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CpuInfo.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.cpus != null && m.cpus.length) {
                    for (var i = 0; i < m.cpus.length; ++i)
                        $root.perfetto.protos.CpuInfo.Cpu.encode(m.cpus[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified CpuInfo message, length delimited. Does not implicitly {@link perfetto.protos.CpuInfo.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.CpuInfo
             * @static
             * @param {perfetto.protos.ICpuInfo} message CpuInfo message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CpuInfo.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CpuInfo message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.CpuInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.CpuInfo} CpuInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CpuInfo.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.CpuInfo();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.cpus && m.cpus.length))
                            m.cpus = [];
                        m.cpus.push($root.perfetto.protos.CpuInfo.Cpu.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a CpuInfo message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.CpuInfo
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.CpuInfo} CpuInfo
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CpuInfo.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CpuInfo message.
             * @function verify
             * @memberof perfetto.protos.CpuInfo
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CpuInfo.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.cpus != null && m.hasOwnProperty("cpus")) {
                    if (!Array.isArray(m.cpus))
                        return "cpus: array expected";
                    for (var i = 0; i < m.cpus.length; ++i) {
                        {
                            var e = $root.perfetto.protos.CpuInfo.Cpu.verify(m.cpus[i]);
                            if (e)
                                return "cpus." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a CpuInfo message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.CpuInfo
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.CpuInfo} CpuInfo
             */
            CpuInfo.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.CpuInfo)
                    return d;
                var m = new $root.perfetto.protos.CpuInfo();
                if (d.cpus) {
                    if (!Array.isArray(d.cpus))
                        throw TypeError(".perfetto.protos.CpuInfo.cpus: array expected");
                    m.cpus = [];
                    for (var i = 0; i < d.cpus.length; ++i) {
                        if (typeof d.cpus[i] !== "object")
                            throw TypeError(".perfetto.protos.CpuInfo.cpus: object expected");
                        m.cpus[i] = $root.perfetto.protos.CpuInfo.Cpu.fromObject(d.cpus[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a CpuInfo message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.CpuInfo
             * @static
             * @param {perfetto.protos.CpuInfo} m CpuInfo
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CpuInfo.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.cpus = [];
                }
                if (m.cpus && m.cpus.length) {
                    d.cpus = [];
                    for (var j = 0; j < m.cpus.length; ++j) {
                        d.cpus[j] = $root.perfetto.protos.CpuInfo.Cpu.toObject(m.cpus[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this CpuInfo to JSON.
             * @function toJSON
             * @memberof perfetto.protos.CpuInfo
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CpuInfo.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            CpuInfo.Cpu = (function() {

                /**
                 * Properties of a Cpu.
                 * @memberof perfetto.protos.CpuInfo
                 * @interface ICpu
                 * @property {string|null} [processor] Cpu processor
                 * @property {Array.<number>|null} [frequencies] Cpu frequencies
                 */

                /**
                 * Constructs a new Cpu.
                 * @memberof perfetto.protos.CpuInfo
                 * @classdesc Represents a Cpu.
                 * @implements ICpu
                 * @constructor
                 * @param {perfetto.protos.CpuInfo.ICpu=} [p] Properties to set
                 */
                function Cpu(p) {
                    this.frequencies = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * Cpu processor.
                 * @member {string} processor
                 * @memberof perfetto.protos.CpuInfo.Cpu
                 * @instance
                 */
                Cpu.prototype.processor = "";

                /**
                 * Cpu frequencies.
                 * @member {Array.<number>} frequencies
                 * @memberof perfetto.protos.CpuInfo.Cpu
                 * @instance
                 */
                Cpu.prototype.frequencies = $util.emptyArray;

                /**
                 * Creates a new Cpu instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.CpuInfo.Cpu
                 * @static
                 * @param {perfetto.protos.CpuInfo.ICpu=} [properties] Properties to set
                 * @returns {perfetto.protos.CpuInfo.Cpu} Cpu instance
                 */
                Cpu.create = function create(properties) {
                    return new Cpu(properties);
                };

                /**
                 * Encodes the specified Cpu message. Does not implicitly {@link perfetto.protos.CpuInfo.Cpu.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.CpuInfo.Cpu
                 * @static
                 * @param {perfetto.protos.CpuInfo.ICpu} m Cpu message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Cpu.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.processor != null && Object.hasOwnProperty.call(m, "processor"))
                        w.uint32(10).string(m.processor);
                    if (m.frequencies != null && m.frequencies.length) {
                        for (var i = 0; i < m.frequencies.length; ++i)
                            w.uint32(16).uint32(m.frequencies[i]);
                    }
                    return w;
                };

                /**
                 * Encodes the specified Cpu message, length delimited. Does not implicitly {@link perfetto.protos.CpuInfo.Cpu.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.CpuInfo.Cpu
                 * @static
                 * @param {perfetto.protos.CpuInfo.ICpu} message Cpu message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Cpu.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a Cpu message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.CpuInfo.Cpu
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.CpuInfo.Cpu} Cpu
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Cpu.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.CpuInfo.Cpu();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.processor = r.string();
                            break;
                        case 2:
                            if (!(m.frequencies && m.frequencies.length))
                                m.frequencies = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.frequencies.push(r.uint32());
                            } else
                                m.frequencies.push(r.uint32());
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a Cpu message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.CpuInfo.Cpu
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.CpuInfo.Cpu} Cpu
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Cpu.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a Cpu message.
                 * @function verify
                 * @memberof perfetto.protos.CpuInfo.Cpu
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Cpu.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.processor != null && m.hasOwnProperty("processor")) {
                        if (!$util.isString(m.processor))
                            return "processor: string expected";
                    }
                    if (m.frequencies != null && m.hasOwnProperty("frequencies")) {
                        if (!Array.isArray(m.frequencies))
                            return "frequencies: array expected";
                        for (var i = 0; i < m.frequencies.length; ++i) {
                            if (!$util.isInteger(m.frequencies[i]))
                                return "frequencies: integer[] expected";
                        }
                    }
                    return null;
                };

                /**
                 * Creates a Cpu message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.CpuInfo.Cpu
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.CpuInfo.Cpu} Cpu
                 */
                Cpu.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.CpuInfo.Cpu)
                        return d;
                    var m = new $root.perfetto.protos.CpuInfo.Cpu();
                    if (d.processor != null) {
                        m.processor = String(d.processor);
                    }
                    if (d.frequencies) {
                        if (!Array.isArray(d.frequencies))
                            throw TypeError(".perfetto.protos.CpuInfo.Cpu.frequencies: array expected");
                        m.frequencies = [];
                        for (var i = 0; i < d.frequencies.length; ++i) {
                            m.frequencies[i] = d.frequencies[i] >>> 0;
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a Cpu message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.CpuInfo.Cpu
                 * @static
                 * @param {perfetto.protos.CpuInfo.Cpu} m Cpu
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Cpu.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.frequencies = [];
                    }
                    if (o.defaults) {
                        d.processor = "";
                    }
                    if (m.processor != null && m.hasOwnProperty("processor")) {
                        d.processor = m.processor;
                    }
                    if (m.frequencies && m.frequencies.length) {
                        d.frequencies = [];
                        for (var j = 0; j < m.frequencies.length; ++j) {
                            d.frequencies[j] = m.frequencies[j];
                        }
                    }
                    return d;
                };

                /**
                 * Converts this Cpu to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.CpuInfo.Cpu
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Cpu.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return Cpu;
            })();

            return CpuInfo;
        })();

        protos.TracePacketDefaults = (function() {

            /**
             * Properties of a TracePacketDefaults.
             * @memberof perfetto.protos
             * @interface ITracePacketDefaults
             * @property {number|null} [timestampClockId] TracePacketDefaults timestampClockId
             * @property {perfetto.protos.ITrackEventDefaults|null} [trackEventDefaults] TracePacketDefaults trackEventDefaults
             * @property {perfetto.protos.IPerfSampleDefaults|null} [perfSampleDefaults] TracePacketDefaults perfSampleDefaults
             */

            /**
             * Constructs a new TracePacketDefaults.
             * @memberof perfetto.protos
             * @classdesc Represents a TracePacketDefaults.
             * @implements ITracePacketDefaults
             * @constructor
             * @param {perfetto.protos.ITracePacketDefaults=} [p] Properties to set
             */
            function TracePacketDefaults(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TracePacketDefaults timestampClockId.
             * @member {number} timestampClockId
             * @memberof perfetto.protos.TracePacketDefaults
             * @instance
             */
            TracePacketDefaults.prototype.timestampClockId = 0;

            /**
             * TracePacketDefaults trackEventDefaults.
             * @member {perfetto.protos.ITrackEventDefaults|null|undefined} trackEventDefaults
             * @memberof perfetto.protos.TracePacketDefaults
             * @instance
             */
            TracePacketDefaults.prototype.trackEventDefaults = null;

            /**
             * TracePacketDefaults perfSampleDefaults.
             * @member {perfetto.protos.IPerfSampleDefaults|null|undefined} perfSampleDefaults
             * @memberof perfetto.protos.TracePacketDefaults
             * @instance
             */
            TracePacketDefaults.prototype.perfSampleDefaults = null;

            /**
             * Creates a new TracePacketDefaults instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TracePacketDefaults
             * @static
             * @param {perfetto.protos.ITracePacketDefaults=} [properties] Properties to set
             * @returns {perfetto.protos.TracePacketDefaults} TracePacketDefaults instance
             */
            TracePacketDefaults.create = function create(properties) {
                return new TracePacketDefaults(properties);
            };

            /**
             * Encodes the specified TracePacketDefaults message. Does not implicitly {@link perfetto.protos.TracePacketDefaults.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TracePacketDefaults
             * @static
             * @param {perfetto.protos.ITracePacketDefaults} m TracePacketDefaults message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TracePacketDefaults.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.trackEventDefaults != null && Object.hasOwnProperty.call(m, "trackEventDefaults"))
                    $root.perfetto.protos.TrackEventDefaults.encode(m.trackEventDefaults, w.uint32(90).fork()).ldelim();
                if (m.perfSampleDefaults != null && Object.hasOwnProperty.call(m, "perfSampleDefaults"))
                    $root.perfetto.protos.PerfSampleDefaults.encode(m.perfSampleDefaults, w.uint32(98).fork()).ldelim();
                if (m.timestampClockId != null && Object.hasOwnProperty.call(m, "timestampClockId"))
                    w.uint32(464).uint32(m.timestampClockId);
                return w;
            };

            /**
             * Encodes the specified TracePacketDefaults message, length delimited. Does not implicitly {@link perfetto.protos.TracePacketDefaults.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TracePacketDefaults
             * @static
             * @param {perfetto.protos.ITracePacketDefaults} message TracePacketDefaults message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TracePacketDefaults.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TracePacketDefaults message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TracePacketDefaults
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TracePacketDefaults} TracePacketDefaults
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TracePacketDefaults.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TracePacketDefaults();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 58:
                        m.timestampClockId = r.uint32();
                        break;
                    case 11:
                        m.trackEventDefaults = $root.perfetto.protos.TrackEventDefaults.decode(r, r.uint32());
                        break;
                    case 12:
                        m.perfSampleDefaults = $root.perfetto.protos.PerfSampleDefaults.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TracePacketDefaults message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TracePacketDefaults
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TracePacketDefaults} TracePacketDefaults
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TracePacketDefaults.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TracePacketDefaults message.
             * @function verify
             * @memberof perfetto.protos.TracePacketDefaults
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TracePacketDefaults.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.timestampClockId != null && m.hasOwnProperty("timestampClockId")) {
                    if (!$util.isInteger(m.timestampClockId))
                        return "timestampClockId: integer expected";
                }
                if (m.trackEventDefaults != null && m.hasOwnProperty("trackEventDefaults")) {
                    {
                        var e = $root.perfetto.protos.TrackEventDefaults.verify(m.trackEventDefaults);
                        if (e)
                            return "trackEventDefaults." + e;
                    }
                }
                if (m.perfSampleDefaults != null && m.hasOwnProperty("perfSampleDefaults")) {
                    {
                        var e = $root.perfetto.protos.PerfSampleDefaults.verify(m.perfSampleDefaults);
                        if (e)
                            return "perfSampleDefaults." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a TracePacketDefaults message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TracePacketDefaults
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TracePacketDefaults} TracePacketDefaults
             */
            TracePacketDefaults.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TracePacketDefaults)
                    return d;
                var m = new $root.perfetto.protos.TracePacketDefaults();
                if (d.timestampClockId != null) {
                    m.timestampClockId = d.timestampClockId >>> 0;
                }
                if (d.trackEventDefaults != null) {
                    if (typeof d.trackEventDefaults !== "object")
                        throw TypeError(".perfetto.protos.TracePacketDefaults.trackEventDefaults: object expected");
                    m.trackEventDefaults = $root.perfetto.protos.TrackEventDefaults.fromObject(d.trackEventDefaults);
                }
                if (d.perfSampleDefaults != null) {
                    if (typeof d.perfSampleDefaults !== "object")
                        throw TypeError(".perfetto.protos.TracePacketDefaults.perfSampleDefaults: object expected");
                    m.perfSampleDefaults = $root.perfetto.protos.PerfSampleDefaults.fromObject(d.perfSampleDefaults);
                }
                return m;
            };

            /**
             * Creates a plain object from a TracePacketDefaults message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TracePacketDefaults
             * @static
             * @param {perfetto.protos.TracePacketDefaults} m TracePacketDefaults
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TracePacketDefaults.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.trackEventDefaults = null;
                    d.perfSampleDefaults = null;
                    d.timestampClockId = 0;
                }
                if (m.trackEventDefaults != null && m.hasOwnProperty("trackEventDefaults")) {
                    d.trackEventDefaults = $root.perfetto.protos.TrackEventDefaults.toObject(m.trackEventDefaults, o);
                }
                if (m.perfSampleDefaults != null && m.hasOwnProperty("perfSampleDefaults")) {
                    d.perfSampleDefaults = $root.perfetto.protos.PerfSampleDefaults.toObject(m.perfSampleDefaults, o);
                }
                if (m.timestampClockId != null && m.hasOwnProperty("timestampClockId")) {
                    d.timestampClockId = m.timestampClockId;
                }
                return d;
            };

            /**
             * Converts this TracePacketDefaults to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TracePacketDefaults
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TracePacketDefaults.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TracePacketDefaults;
        })();

        protos.ProcessDescriptor = (function() {

            /**
             * Properties of a ProcessDescriptor.
             * @memberof perfetto.protos
             * @interface IProcessDescriptor
             * @property {number|null} [pid] ProcessDescriptor pid
             * @property {Array.<string>|null} [cmdline] ProcessDescriptor cmdline
             * @property {string|null} [processName] ProcessDescriptor processName
             * @property {number|null} [processPriority] ProcessDescriptor processPriority
             * @property {number|null} [startTimestampNs] ProcessDescriptor startTimestampNs
             * @property {perfetto.protos.ProcessDescriptor.ChromeProcessType|null} [chromeProcessType] ProcessDescriptor chromeProcessType
             * @property {number|null} [legacySortIndex] ProcessDescriptor legacySortIndex
             * @property {Array.<string>|null} [processLabels] ProcessDescriptor processLabels
             */

            /**
             * Constructs a new ProcessDescriptor.
             * @memberof perfetto.protos
             * @classdesc Represents a ProcessDescriptor.
             * @implements IProcessDescriptor
             * @constructor
             * @param {perfetto.protos.IProcessDescriptor=} [p] Properties to set
             */
            function ProcessDescriptor(p) {
                this.cmdline = [];
                this.processLabels = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ProcessDescriptor pid.
             * @member {number} pid
             * @memberof perfetto.protos.ProcessDescriptor
             * @instance
             */
            ProcessDescriptor.prototype.pid = 0;

            /**
             * ProcessDescriptor cmdline.
             * @member {Array.<string>} cmdline
             * @memberof perfetto.protos.ProcessDescriptor
             * @instance
             */
            ProcessDescriptor.prototype.cmdline = $util.emptyArray;

            /**
             * ProcessDescriptor processName.
             * @member {string} processName
             * @memberof perfetto.protos.ProcessDescriptor
             * @instance
             */
            ProcessDescriptor.prototype.processName = "";

            /**
             * ProcessDescriptor processPriority.
             * @member {number} processPriority
             * @memberof perfetto.protos.ProcessDescriptor
             * @instance
             */
            ProcessDescriptor.prototype.processPriority = 0;

            /**
             * ProcessDescriptor startTimestampNs.
             * @member {number} startTimestampNs
             * @memberof perfetto.protos.ProcessDescriptor
             * @instance
             */
            ProcessDescriptor.prototype.startTimestampNs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ProcessDescriptor chromeProcessType.
             * @member {perfetto.protos.ProcessDescriptor.ChromeProcessType} chromeProcessType
             * @memberof perfetto.protos.ProcessDescriptor
             * @instance
             */
            ProcessDescriptor.prototype.chromeProcessType = 0;

            /**
             * ProcessDescriptor legacySortIndex.
             * @member {number} legacySortIndex
             * @memberof perfetto.protos.ProcessDescriptor
             * @instance
             */
            ProcessDescriptor.prototype.legacySortIndex = 0;

            /**
             * ProcessDescriptor processLabels.
             * @member {Array.<string>} processLabels
             * @memberof perfetto.protos.ProcessDescriptor
             * @instance
             */
            ProcessDescriptor.prototype.processLabels = $util.emptyArray;

            /**
             * Creates a new ProcessDescriptor instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ProcessDescriptor
             * @static
             * @param {perfetto.protos.IProcessDescriptor=} [properties] Properties to set
             * @returns {perfetto.protos.ProcessDescriptor} ProcessDescriptor instance
             */
            ProcessDescriptor.create = function create(properties) {
                return new ProcessDescriptor(properties);
            };

            /**
             * Encodes the specified ProcessDescriptor message. Does not implicitly {@link perfetto.protos.ProcessDescriptor.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ProcessDescriptor
             * @static
             * @param {perfetto.protos.IProcessDescriptor} m ProcessDescriptor message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ProcessDescriptor.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(8).int32(m.pid);
                if (m.cmdline != null && m.cmdline.length) {
                    for (var i = 0; i < m.cmdline.length; ++i)
                        w.uint32(18).string(m.cmdline[i]);
                }
                if (m.legacySortIndex != null && Object.hasOwnProperty.call(m, "legacySortIndex"))
                    w.uint32(24).int32(m.legacySortIndex);
                if (m.chromeProcessType != null && Object.hasOwnProperty.call(m, "chromeProcessType"))
                    w.uint32(32).int32(m.chromeProcessType);
                if (m.processPriority != null && Object.hasOwnProperty.call(m, "processPriority"))
                    w.uint32(40).int32(m.processPriority);
                if (m.processName != null && Object.hasOwnProperty.call(m, "processName"))
                    w.uint32(50).string(m.processName);
                if (m.startTimestampNs != null && Object.hasOwnProperty.call(m, "startTimestampNs"))
                    w.uint32(56).int64(m.startTimestampNs);
                if (m.processLabels != null && m.processLabels.length) {
                    for (var i = 0; i < m.processLabels.length; ++i)
                        w.uint32(66).string(m.processLabels[i]);
                }
                return w;
            };

            /**
             * Encodes the specified ProcessDescriptor message, length delimited. Does not implicitly {@link perfetto.protos.ProcessDescriptor.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ProcessDescriptor
             * @static
             * @param {perfetto.protos.IProcessDescriptor} message ProcessDescriptor message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ProcessDescriptor.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ProcessDescriptor message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ProcessDescriptor
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ProcessDescriptor} ProcessDescriptor
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ProcessDescriptor.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ProcessDescriptor();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.pid = r.int32();
                        break;
                    case 2:
                        if (!(m.cmdline && m.cmdline.length))
                            m.cmdline = [];
                        m.cmdline.push(r.string());
                        break;
                    case 6:
                        m.processName = r.string();
                        break;
                    case 5:
                        m.processPriority = r.int32();
                        break;
                    case 7:
                        m.startTimestampNs = r.int64();
                        break;
                    case 4:
                        m.chromeProcessType = r.int32();
                        break;
                    case 3:
                        m.legacySortIndex = r.int32();
                        break;
                    case 8:
                        if (!(m.processLabels && m.processLabels.length))
                            m.processLabels = [];
                        m.processLabels.push(r.string());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ProcessDescriptor message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ProcessDescriptor
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ProcessDescriptor} ProcessDescriptor
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ProcessDescriptor.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ProcessDescriptor message.
             * @function verify
             * @memberof perfetto.protos.ProcessDescriptor
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ProcessDescriptor.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.cmdline != null && m.hasOwnProperty("cmdline")) {
                    if (!Array.isArray(m.cmdline))
                        return "cmdline: array expected";
                    for (var i = 0; i < m.cmdline.length; ++i) {
                        if (!$util.isString(m.cmdline[i]))
                            return "cmdline: string[] expected";
                    }
                }
                if (m.processName != null && m.hasOwnProperty("processName")) {
                    if (!$util.isString(m.processName))
                        return "processName: string expected";
                }
                if (m.processPriority != null && m.hasOwnProperty("processPriority")) {
                    if (!$util.isInteger(m.processPriority))
                        return "processPriority: integer expected";
                }
                if (m.startTimestampNs != null && m.hasOwnProperty("startTimestampNs")) {
                    if (!$util.isInteger(m.startTimestampNs) && !(m.startTimestampNs && $util.isInteger(m.startTimestampNs.low) && $util.isInteger(m.startTimestampNs.high)))
                        return "startTimestampNs: integer|Long expected";
                }
                if (m.chromeProcessType != null && m.hasOwnProperty("chromeProcessType")) {
                    switch (m.chromeProcessType) {
                    default:
                        return "chromeProcessType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                    case 6:
                    case 7:
                    case 8:
                        break;
                    }
                }
                if (m.legacySortIndex != null && m.hasOwnProperty("legacySortIndex")) {
                    if (!$util.isInteger(m.legacySortIndex))
                        return "legacySortIndex: integer expected";
                }
                if (m.processLabels != null && m.hasOwnProperty("processLabels")) {
                    if (!Array.isArray(m.processLabels))
                        return "processLabels: array expected";
                    for (var i = 0; i < m.processLabels.length; ++i) {
                        if (!$util.isString(m.processLabels[i]))
                            return "processLabels: string[] expected";
                    }
                }
                return null;
            };

            /**
             * Creates a ProcessDescriptor message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ProcessDescriptor
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ProcessDescriptor} ProcessDescriptor
             */
            ProcessDescriptor.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ProcessDescriptor)
                    return d;
                var m = new $root.perfetto.protos.ProcessDescriptor();
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                if (d.cmdline) {
                    if (!Array.isArray(d.cmdline))
                        throw TypeError(".perfetto.protos.ProcessDescriptor.cmdline: array expected");
                    m.cmdline = [];
                    for (var i = 0; i < d.cmdline.length; ++i) {
                        m.cmdline[i] = String(d.cmdline[i]);
                    }
                }
                if (d.processName != null) {
                    m.processName = String(d.processName);
                }
                if (d.processPriority != null) {
                    m.processPriority = d.processPriority | 0;
                }
                if (d.startTimestampNs != null) {
                    if ($util.Long)
                        (m.startTimestampNs = $util.Long.fromValue(d.startTimestampNs)).unsigned = false;
                    else if (typeof d.startTimestampNs === "string")
                        m.startTimestampNs = parseInt(d.startTimestampNs, 10);
                    else if (typeof d.startTimestampNs === "number")
                        m.startTimestampNs = d.startTimestampNs;
                    else if (typeof d.startTimestampNs === "object")
                        m.startTimestampNs = new $util.LongBits(d.startTimestampNs.low >>> 0, d.startTimestampNs.high >>> 0).toNumber();
                }
                switch (d.chromeProcessType) {
                case "PROCESS_UNSPECIFIED":
                case 0:
                    m.chromeProcessType = 0;
                    break;
                case "PROCESS_BROWSER":
                case 1:
                    m.chromeProcessType = 1;
                    break;
                case "PROCESS_RENDERER":
                case 2:
                    m.chromeProcessType = 2;
                    break;
                case "PROCESS_UTILITY":
                case 3:
                    m.chromeProcessType = 3;
                    break;
                case "PROCESS_ZYGOTE":
                case 4:
                    m.chromeProcessType = 4;
                    break;
                case "PROCESS_SANDBOX_HELPER":
                case 5:
                    m.chromeProcessType = 5;
                    break;
                case "PROCESS_GPU":
                case 6:
                    m.chromeProcessType = 6;
                    break;
                case "PROCESS_PPAPI_PLUGIN":
                case 7:
                    m.chromeProcessType = 7;
                    break;
                case "PROCESS_PPAPI_BROKER":
                case 8:
                    m.chromeProcessType = 8;
                    break;
                }
                if (d.legacySortIndex != null) {
                    m.legacySortIndex = d.legacySortIndex | 0;
                }
                if (d.processLabels) {
                    if (!Array.isArray(d.processLabels))
                        throw TypeError(".perfetto.protos.ProcessDescriptor.processLabels: array expected");
                    m.processLabels = [];
                    for (var i = 0; i < d.processLabels.length; ++i) {
                        m.processLabels[i] = String(d.processLabels[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a ProcessDescriptor message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ProcessDescriptor
             * @static
             * @param {perfetto.protos.ProcessDescriptor} m ProcessDescriptor
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ProcessDescriptor.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.cmdline = [];
                    d.processLabels = [];
                }
                if (o.defaults) {
                    d.pid = 0;
                    d.legacySortIndex = 0;
                    d.chromeProcessType = o.enums === String ? "PROCESS_UNSPECIFIED" : 0;
                    d.processPriority = 0;
                    d.processName = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.startTimestampNs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.startTimestampNs = o.longs === String ? "0" : 0;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.cmdline && m.cmdline.length) {
                    d.cmdline = [];
                    for (var j = 0; j < m.cmdline.length; ++j) {
                        d.cmdline[j] = m.cmdline[j];
                    }
                }
                if (m.legacySortIndex != null && m.hasOwnProperty("legacySortIndex")) {
                    d.legacySortIndex = m.legacySortIndex;
                }
                if (m.chromeProcessType != null && m.hasOwnProperty("chromeProcessType")) {
                    d.chromeProcessType = o.enums === String ? $root.perfetto.protos.ProcessDescriptor.ChromeProcessType[m.chromeProcessType] : m.chromeProcessType;
                }
                if (m.processPriority != null && m.hasOwnProperty("processPriority")) {
                    d.processPriority = m.processPriority;
                }
                if (m.processName != null && m.hasOwnProperty("processName")) {
                    d.processName = m.processName;
                }
                if (m.startTimestampNs != null && m.hasOwnProperty("startTimestampNs")) {
                    if (typeof m.startTimestampNs === "number")
                        d.startTimestampNs = o.longs === String ? String(m.startTimestampNs) : m.startTimestampNs;
                    else
                        d.startTimestampNs = o.longs === String ? $util.Long.prototype.toString.call(m.startTimestampNs) : o.longs === Number ? new $util.LongBits(m.startTimestampNs.low >>> 0, m.startTimestampNs.high >>> 0).toNumber() : m.startTimestampNs;
                }
                if (m.processLabels && m.processLabels.length) {
                    d.processLabels = [];
                    for (var j = 0; j < m.processLabels.length; ++j) {
                        d.processLabels[j] = m.processLabels[j];
                    }
                }
                return d;
            };

            /**
             * Converts this ProcessDescriptor to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ProcessDescriptor
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ProcessDescriptor.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * ChromeProcessType enum.
             * @name perfetto.protos.ProcessDescriptor.ChromeProcessType
             * @enum {number}
             * @property {number} PROCESS_UNSPECIFIED=0 PROCESS_UNSPECIFIED value
             * @property {number} PROCESS_BROWSER=1 PROCESS_BROWSER value
             * @property {number} PROCESS_RENDERER=2 PROCESS_RENDERER value
             * @property {number} PROCESS_UTILITY=3 PROCESS_UTILITY value
             * @property {number} PROCESS_ZYGOTE=4 PROCESS_ZYGOTE value
             * @property {number} PROCESS_SANDBOX_HELPER=5 PROCESS_SANDBOX_HELPER value
             * @property {number} PROCESS_GPU=6 PROCESS_GPU value
             * @property {number} PROCESS_PPAPI_PLUGIN=7 PROCESS_PPAPI_PLUGIN value
             * @property {number} PROCESS_PPAPI_BROKER=8 PROCESS_PPAPI_BROKER value
             */
            ProcessDescriptor.ChromeProcessType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "PROCESS_UNSPECIFIED"] = 0;
                values[valuesById[1] = "PROCESS_BROWSER"] = 1;
                values[valuesById[2] = "PROCESS_RENDERER"] = 2;
                values[valuesById[3] = "PROCESS_UTILITY"] = 3;
                values[valuesById[4] = "PROCESS_ZYGOTE"] = 4;
                values[valuesById[5] = "PROCESS_SANDBOX_HELPER"] = 5;
                values[valuesById[6] = "PROCESS_GPU"] = 6;
                values[valuesById[7] = "PROCESS_PPAPI_PLUGIN"] = 7;
                values[valuesById[8] = "PROCESS_PPAPI_BROKER"] = 8;
                return values;
            })();

            return ProcessDescriptor;
        })();

        protos.ThreadDescriptor = (function() {

            /**
             * Properties of a ThreadDescriptor.
             * @memberof perfetto.protos
             * @interface IThreadDescriptor
             * @property {number|null} [pid] ThreadDescriptor pid
             * @property {number|null} [tid] ThreadDescriptor tid
             * @property {string|null} [threadName] ThreadDescriptor threadName
             * @property {perfetto.protos.ThreadDescriptor.ChromeThreadType|null} [chromeThreadType] ThreadDescriptor chromeThreadType
             * @property {number|null} [referenceTimestampUs] ThreadDescriptor referenceTimestampUs
             * @property {number|null} [referenceThreadTimeUs] ThreadDescriptor referenceThreadTimeUs
             * @property {number|null} [referenceThreadInstructionCount] ThreadDescriptor referenceThreadInstructionCount
             * @property {number|null} [legacySortIndex] ThreadDescriptor legacySortIndex
             */

            /**
             * Constructs a new ThreadDescriptor.
             * @memberof perfetto.protos
             * @classdesc Represents a ThreadDescriptor.
             * @implements IThreadDescriptor
             * @constructor
             * @param {perfetto.protos.IThreadDescriptor=} [p] Properties to set
             */
            function ThreadDescriptor(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ThreadDescriptor pid.
             * @member {number} pid
             * @memberof perfetto.protos.ThreadDescriptor
             * @instance
             */
            ThreadDescriptor.prototype.pid = 0;

            /**
             * ThreadDescriptor tid.
             * @member {number} tid
             * @memberof perfetto.protos.ThreadDescriptor
             * @instance
             */
            ThreadDescriptor.prototype.tid = 0;

            /**
             * ThreadDescriptor threadName.
             * @member {string} threadName
             * @memberof perfetto.protos.ThreadDescriptor
             * @instance
             */
            ThreadDescriptor.prototype.threadName = "";

            /**
             * ThreadDescriptor chromeThreadType.
             * @member {perfetto.protos.ThreadDescriptor.ChromeThreadType} chromeThreadType
             * @memberof perfetto.protos.ThreadDescriptor
             * @instance
             */
            ThreadDescriptor.prototype.chromeThreadType = 0;

            /**
             * ThreadDescriptor referenceTimestampUs.
             * @member {number} referenceTimestampUs
             * @memberof perfetto.protos.ThreadDescriptor
             * @instance
             */
            ThreadDescriptor.prototype.referenceTimestampUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ThreadDescriptor referenceThreadTimeUs.
             * @member {number} referenceThreadTimeUs
             * @memberof perfetto.protos.ThreadDescriptor
             * @instance
             */
            ThreadDescriptor.prototype.referenceThreadTimeUs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ThreadDescriptor referenceThreadInstructionCount.
             * @member {number} referenceThreadInstructionCount
             * @memberof perfetto.protos.ThreadDescriptor
             * @instance
             */
            ThreadDescriptor.prototype.referenceThreadInstructionCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * ThreadDescriptor legacySortIndex.
             * @member {number} legacySortIndex
             * @memberof perfetto.protos.ThreadDescriptor
             * @instance
             */
            ThreadDescriptor.prototype.legacySortIndex = 0;

            /**
             * Creates a new ThreadDescriptor instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ThreadDescriptor
             * @static
             * @param {perfetto.protos.IThreadDescriptor=} [properties] Properties to set
             * @returns {perfetto.protos.ThreadDescriptor} ThreadDescriptor instance
             */
            ThreadDescriptor.create = function create(properties) {
                return new ThreadDescriptor(properties);
            };

            /**
             * Encodes the specified ThreadDescriptor message. Does not implicitly {@link perfetto.protos.ThreadDescriptor.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ThreadDescriptor
             * @static
             * @param {perfetto.protos.IThreadDescriptor} m ThreadDescriptor message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ThreadDescriptor.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                    w.uint32(8).int32(m.pid);
                if (m.tid != null && Object.hasOwnProperty.call(m, "tid"))
                    w.uint32(16).int32(m.tid);
                if (m.legacySortIndex != null && Object.hasOwnProperty.call(m, "legacySortIndex"))
                    w.uint32(24).int32(m.legacySortIndex);
                if (m.chromeThreadType != null && Object.hasOwnProperty.call(m, "chromeThreadType"))
                    w.uint32(32).int32(m.chromeThreadType);
                if (m.threadName != null && Object.hasOwnProperty.call(m, "threadName"))
                    w.uint32(42).string(m.threadName);
                if (m.referenceTimestampUs != null && Object.hasOwnProperty.call(m, "referenceTimestampUs"))
                    w.uint32(48).int64(m.referenceTimestampUs);
                if (m.referenceThreadTimeUs != null && Object.hasOwnProperty.call(m, "referenceThreadTimeUs"))
                    w.uint32(56).int64(m.referenceThreadTimeUs);
                if (m.referenceThreadInstructionCount != null && Object.hasOwnProperty.call(m, "referenceThreadInstructionCount"))
                    w.uint32(64).int64(m.referenceThreadInstructionCount);
                return w;
            };

            /**
             * Encodes the specified ThreadDescriptor message, length delimited. Does not implicitly {@link perfetto.protos.ThreadDescriptor.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ThreadDescriptor
             * @static
             * @param {perfetto.protos.IThreadDescriptor} message ThreadDescriptor message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ThreadDescriptor.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ThreadDescriptor message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ThreadDescriptor
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ThreadDescriptor} ThreadDescriptor
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ThreadDescriptor.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ThreadDescriptor();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.pid = r.int32();
                        break;
                    case 2:
                        m.tid = r.int32();
                        break;
                    case 5:
                        m.threadName = r.string();
                        break;
                    case 4:
                        m.chromeThreadType = r.int32();
                        break;
                    case 6:
                        m.referenceTimestampUs = r.int64();
                        break;
                    case 7:
                        m.referenceThreadTimeUs = r.int64();
                        break;
                    case 8:
                        m.referenceThreadInstructionCount = r.int64();
                        break;
                    case 3:
                        m.legacySortIndex = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ThreadDescriptor message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ThreadDescriptor
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ThreadDescriptor} ThreadDescriptor
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ThreadDescriptor.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ThreadDescriptor message.
             * @function verify
             * @memberof perfetto.protos.ThreadDescriptor
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ThreadDescriptor.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    if (!$util.isInteger(m.pid))
                        return "pid: integer expected";
                }
                if (m.tid != null && m.hasOwnProperty("tid")) {
                    if (!$util.isInteger(m.tid))
                        return "tid: integer expected";
                }
                if (m.threadName != null && m.hasOwnProperty("threadName")) {
                    if (!$util.isString(m.threadName))
                        return "threadName: string expected";
                }
                if (m.chromeThreadType != null && m.hasOwnProperty("chromeThreadType")) {
                    switch (m.chromeThreadType) {
                    default:
                        return "chromeThreadType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                    case 6:
                    case 7:
                    case 8:
                    case 9:
                    case 10:
                    case 11:
                    case 50:
                    case 51:
                        break;
                    }
                }
                if (m.referenceTimestampUs != null && m.hasOwnProperty("referenceTimestampUs")) {
                    if (!$util.isInteger(m.referenceTimestampUs) && !(m.referenceTimestampUs && $util.isInteger(m.referenceTimestampUs.low) && $util.isInteger(m.referenceTimestampUs.high)))
                        return "referenceTimestampUs: integer|Long expected";
                }
                if (m.referenceThreadTimeUs != null && m.hasOwnProperty("referenceThreadTimeUs")) {
                    if (!$util.isInteger(m.referenceThreadTimeUs) && !(m.referenceThreadTimeUs && $util.isInteger(m.referenceThreadTimeUs.low) && $util.isInteger(m.referenceThreadTimeUs.high)))
                        return "referenceThreadTimeUs: integer|Long expected";
                }
                if (m.referenceThreadInstructionCount != null && m.hasOwnProperty("referenceThreadInstructionCount")) {
                    if (!$util.isInteger(m.referenceThreadInstructionCount) && !(m.referenceThreadInstructionCount && $util.isInteger(m.referenceThreadInstructionCount.low) && $util.isInteger(m.referenceThreadInstructionCount.high)))
                        return "referenceThreadInstructionCount: integer|Long expected";
                }
                if (m.legacySortIndex != null && m.hasOwnProperty("legacySortIndex")) {
                    if (!$util.isInteger(m.legacySortIndex))
                        return "legacySortIndex: integer expected";
                }
                return null;
            };

            /**
             * Creates a ThreadDescriptor message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ThreadDescriptor
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ThreadDescriptor} ThreadDescriptor
             */
            ThreadDescriptor.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ThreadDescriptor)
                    return d;
                var m = new $root.perfetto.protos.ThreadDescriptor();
                if (d.pid != null) {
                    m.pid = d.pid | 0;
                }
                if (d.tid != null) {
                    m.tid = d.tid | 0;
                }
                if (d.threadName != null) {
                    m.threadName = String(d.threadName);
                }
                switch (d.chromeThreadType) {
                case "CHROME_THREAD_UNSPECIFIED":
                case 0:
                    m.chromeThreadType = 0;
                    break;
                case "CHROME_THREAD_MAIN":
                case 1:
                    m.chromeThreadType = 1;
                    break;
                case "CHROME_THREAD_IO":
                case 2:
                    m.chromeThreadType = 2;
                    break;
                case "CHROME_THREAD_POOL_BG_WORKER":
                case 3:
                    m.chromeThreadType = 3;
                    break;
                case "CHROME_THREAD_POOL_FG_WORKER":
                case 4:
                    m.chromeThreadType = 4;
                    break;
                case "CHROME_THREAD_POOL_FB_BLOCKING":
                case 5:
                    m.chromeThreadType = 5;
                    break;
                case "CHROME_THREAD_POOL_BG_BLOCKING":
                case 6:
                    m.chromeThreadType = 6;
                    break;
                case "CHROME_THREAD_POOL_SERVICE":
                case 7:
                    m.chromeThreadType = 7;
                    break;
                case "CHROME_THREAD_COMPOSITOR":
                case 8:
                    m.chromeThreadType = 8;
                    break;
                case "CHROME_THREAD_VIZ_COMPOSITOR":
                case 9:
                    m.chromeThreadType = 9;
                    break;
                case "CHROME_THREAD_COMPOSITOR_WORKER":
                case 10:
                    m.chromeThreadType = 10;
                    break;
                case "CHROME_THREAD_SERVICE_WORKER":
                case 11:
                    m.chromeThreadType = 11;
                    break;
                case "CHROME_THREAD_MEMORY_INFRA":
                case 50:
                    m.chromeThreadType = 50;
                    break;
                case "CHROME_THREAD_SAMPLING_PROFILER":
                case 51:
                    m.chromeThreadType = 51;
                    break;
                }
                if (d.referenceTimestampUs != null) {
                    if ($util.Long)
                        (m.referenceTimestampUs = $util.Long.fromValue(d.referenceTimestampUs)).unsigned = false;
                    else if (typeof d.referenceTimestampUs === "string")
                        m.referenceTimestampUs = parseInt(d.referenceTimestampUs, 10);
                    else if (typeof d.referenceTimestampUs === "number")
                        m.referenceTimestampUs = d.referenceTimestampUs;
                    else if (typeof d.referenceTimestampUs === "object")
                        m.referenceTimestampUs = new $util.LongBits(d.referenceTimestampUs.low >>> 0, d.referenceTimestampUs.high >>> 0).toNumber();
                }
                if (d.referenceThreadTimeUs != null) {
                    if ($util.Long)
                        (m.referenceThreadTimeUs = $util.Long.fromValue(d.referenceThreadTimeUs)).unsigned = false;
                    else if (typeof d.referenceThreadTimeUs === "string")
                        m.referenceThreadTimeUs = parseInt(d.referenceThreadTimeUs, 10);
                    else if (typeof d.referenceThreadTimeUs === "number")
                        m.referenceThreadTimeUs = d.referenceThreadTimeUs;
                    else if (typeof d.referenceThreadTimeUs === "object")
                        m.referenceThreadTimeUs = new $util.LongBits(d.referenceThreadTimeUs.low >>> 0, d.referenceThreadTimeUs.high >>> 0).toNumber();
                }
                if (d.referenceThreadInstructionCount != null) {
                    if ($util.Long)
                        (m.referenceThreadInstructionCount = $util.Long.fromValue(d.referenceThreadInstructionCount)).unsigned = false;
                    else if (typeof d.referenceThreadInstructionCount === "string")
                        m.referenceThreadInstructionCount = parseInt(d.referenceThreadInstructionCount, 10);
                    else if (typeof d.referenceThreadInstructionCount === "number")
                        m.referenceThreadInstructionCount = d.referenceThreadInstructionCount;
                    else if (typeof d.referenceThreadInstructionCount === "object")
                        m.referenceThreadInstructionCount = new $util.LongBits(d.referenceThreadInstructionCount.low >>> 0, d.referenceThreadInstructionCount.high >>> 0).toNumber();
                }
                if (d.legacySortIndex != null) {
                    m.legacySortIndex = d.legacySortIndex | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a ThreadDescriptor message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ThreadDescriptor
             * @static
             * @param {perfetto.protos.ThreadDescriptor} m ThreadDescriptor
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ThreadDescriptor.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.pid = 0;
                    d.tid = 0;
                    d.legacySortIndex = 0;
                    d.chromeThreadType = o.enums === String ? "CHROME_THREAD_UNSPECIFIED" : 0;
                    d.threadName = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.referenceTimestampUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.referenceTimestampUs = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.referenceThreadTimeUs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.referenceThreadTimeUs = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.referenceThreadInstructionCount = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.referenceThreadInstructionCount = o.longs === String ? "0" : 0;
                }
                if (m.pid != null && m.hasOwnProperty("pid")) {
                    d.pid = m.pid;
                }
                if (m.tid != null && m.hasOwnProperty("tid")) {
                    d.tid = m.tid;
                }
                if (m.legacySortIndex != null && m.hasOwnProperty("legacySortIndex")) {
                    d.legacySortIndex = m.legacySortIndex;
                }
                if (m.chromeThreadType != null && m.hasOwnProperty("chromeThreadType")) {
                    d.chromeThreadType = o.enums === String ? $root.perfetto.protos.ThreadDescriptor.ChromeThreadType[m.chromeThreadType] : m.chromeThreadType;
                }
                if (m.threadName != null && m.hasOwnProperty("threadName")) {
                    d.threadName = m.threadName;
                }
                if (m.referenceTimestampUs != null && m.hasOwnProperty("referenceTimestampUs")) {
                    if (typeof m.referenceTimestampUs === "number")
                        d.referenceTimestampUs = o.longs === String ? String(m.referenceTimestampUs) : m.referenceTimestampUs;
                    else
                        d.referenceTimestampUs = o.longs === String ? $util.Long.prototype.toString.call(m.referenceTimestampUs) : o.longs === Number ? new $util.LongBits(m.referenceTimestampUs.low >>> 0, m.referenceTimestampUs.high >>> 0).toNumber() : m.referenceTimestampUs;
                }
                if (m.referenceThreadTimeUs != null && m.hasOwnProperty("referenceThreadTimeUs")) {
                    if (typeof m.referenceThreadTimeUs === "number")
                        d.referenceThreadTimeUs = o.longs === String ? String(m.referenceThreadTimeUs) : m.referenceThreadTimeUs;
                    else
                        d.referenceThreadTimeUs = o.longs === String ? $util.Long.prototype.toString.call(m.referenceThreadTimeUs) : o.longs === Number ? new $util.LongBits(m.referenceThreadTimeUs.low >>> 0, m.referenceThreadTimeUs.high >>> 0).toNumber() : m.referenceThreadTimeUs;
                }
                if (m.referenceThreadInstructionCount != null && m.hasOwnProperty("referenceThreadInstructionCount")) {
                    if (typeof m.referenceThreadInstructionCount === "number")
                        d.referenceThreadInstructionCount = o.longs === String ? String(m.referenceThreadInstructionCount) : m.referenceThreadInstructionCount;
                    else
                        d.referenceThreadInstructionCount = o.longs === String ? $util.Long.prototype.toString.call(m.referenceThreadInstructionCount) : o.longs === Number ? new $util.LongBits(m.referenceThreadInstructionCount.low >>> 0, m.referenceThreadInstructionCount.high >>> 0).toNumber() : m.referenceThreadInstructionCount;
                }
                return d;
            };

            /**
             * Converts this ThreadDescriptor to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ThreadDescriptor
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ThreadDescriptor.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * ChromeThreadType enum.
             * @name perfetto.protos.ThreadDescriptor.ChromeThreadType
             * @enum {number}
             * @property {number} CHROME_THREAD_UNSPECIFIED=0 CHROME_THREAD_UNSPECIFIED value
             * @property {number} CHROME_THREAD_MAIN=1 CHROME_THREAD_MAIN value
             * @property {number} CHROME_THREAD_IO=2 CHROME_THREAD_IO value
             * @property {number} CHROME_THREAD_POOL_BG_WORKER=3 CHROME_THREAD_POOL_BG_WORKER value
             * @property {number} CHROME_THREAD_POOL_FG_WORKER=4 CHROME_THREAD_POOL_FG_WORKER value
             * @property {number} CHROME_THREAD_POOL_FB_BLOCKING=5 CHROME_THREAD_POOL_FB_BLOCKING value
             * @property {number} CHROME_THREAD_POOL_BG_BLOCKING=6 CHROME_THREAD_POOL_BG_BLOCKING value
             * @property {number} CHROME_THREAD_POOL_SERVICE=7 CHROME_THREAD_POOL_SERVICE value
             * @property {number} CHROME_THREAD_COMPOSITOR=8 CHROME_THREAD_COMPOSITOR value
             * @property {number} CHROME_THREAD_VIZ_COMPOSITOR=9 CHROME_THREAD_VIZ_COMPOSITOR value
             * @property {number} CHROME_THREAD_COMPOSITOR_WORKER=10 CHROME_THREAD_COMPOSITOR_WORKER value
             * @property {number} CHROME_THREAD_SERVICE_WORKER=11 CHROME_THREAD_SERVICE_WORKER value
             * @property {number} CHROME_THREAD_MEMORY_INFRA=50 CHROME_THREAD_MEMORY_INFRA value
             * @property {number} CHROME_THREAD_SAMPLING_PROFILER=51 CHROME_THREAD_SAMPLING_PROFILER value
             */
            ThreadDescriptor.ChromeThreadType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "CHROME_THREAD_UNSPECIFIED"] = 0;
                values[valuesById[1] = "CHROME_THREAD_MAIN"] = 1;
                values[valuesById[2] = "CHROME_THREAD_IO"] = 2;
                values[valuesById[3] = "CHROME_THREAD_POOL_BG_WORKER"] = 3;
                values[valuesById[4] = "CHROME_THREAD_POOL_FG_WORKER"] = 4;
                values[valuesById[5] = "CHROME_THREAD_POOL_FB_BLOCKING"] = 5;
                values[valuesById[6] = "CHROME_THREAD_POOL_BG_BLOCKING"] = 6;
                values[valuesById[7] = "CHROME_THREAD_POOL_SERVICE"] = 7;
                values[valuesById[8] = "CHROME_THREAD_COMPOSITOR"] = 8;
                values[valuesById[9] = "CHROME_THREAD_VIZ_COMPOSITOR"] = 9;
                values[valuesById[10] = "CHROME_THREAD_COMPOSITOR_WORKER"] = 10;
                values[valuesById[11] = "CHROME_THREAD_SERVICE_WORKER"] = 11;
                values[valuesById[50] = "CHROME_THREAD_MEMORY_INFRA"] = 50;
                values[valuesById[51] = "CHROME_THREAD_SAMPLING_PROFILER"] = 51;
                return values;
            })();

            return ThreadDescriptor;
        })();

        protos.TrackDescriptor = (function() {

            /**
             * Properties of a TrackDescriptor.
             * @memberof perfetto.protos
             * @interface ITrackDescriptor
             * @property {number|null} [uuid] TrackDescriptor uuid
             * @property {number|null} [parentUuid] TrackDescriptor parentUuid
             * @property {string|null} [name] TrackDescriptor name
             * @property {perfetto.protos.IProcessDescriptor|null} [process] TrackDescriptor process
             * @property {perfetto.protos.IChromeProcessDescriptor|null} [chromeProcess] TrackDescriptor chromeProcess
             * @property {perfetto.protos.IThreadDescriptor|null} [thread] TrackDescriptor thread
             * @property {perfetto.protos.IChromeThreadDescriptor|null} [chromeThread] TrackDescriptor chromeThread
             * @property {perfetto.protos.ICounterDescriptor|null} [counter] TrackDescriptor counter
             */

            /**
             * Constructs a new TrackDescriptor.
             * @memberof perfetto.protos
             * @classdesc Represents a TrackDescriptor.
             * @implements ITrackDescriptor
             * @constructor
             * @param {perfetto.protos.ITrackDescriptor=} [p] Properties to set
             */
            function TrackDescriptor(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TrackDescriptor uuid.
             * @member {number} uuid
             * @memberof perfetto.protos.TrackDescriptor
             * @instance
             */
            TrackDescriptor.prototype.uuid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TrackDescriptor parentUuid.
             * @member {number} parentUuid
             * @memberof perfetto.protos.TrackDescriptor
             * @instance
             */
            TrackDescriptor.prototype.parentUuid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TrackDescriptor name.
             * @member {string} name
             * @memberof perfetto.protos.TrackDescriptor
             * @instance
             */
            TrackDescriptor.prototype.name = "";

            /**
             * TrackDescriptor process.
             * @member {perfetto.protos.IProcessDescriptor|null|undefined} process
             * @memberof perfetto.protos.TrackDescriptor
             * @instance
             */
            TrackDescriptor.prototype.process = null;

            /**
             * TrackDescriptor chromeProcess.
             * @member {perfetto.protos.IChromeProcessDescriptor|null|undefined} chromeProcess
             * @memberof perfetto.protos.TrackDescriptor
             * @instance
             */
            TrackDescriptor.prototype.chromeProcess = null;

            /**
             * TrackDescriptor thread.
             * @member {perfetto.protos.IThreadDescriptor|null|undefined} thread
             * @memberof perfetto.protos.TrackDescriptor
             * @instance
             */
            TrackDescriptor.prototype.thread = null;

            /**
             * TrackDescriptor chromeThread.
             * @member {perfetto.protos.IChromeThreadDescriptor|null|undefined} chromeThread
             * @memberof perfetto.protos.TrackDescriptor
             * @instance
             */
            TrackDescriptor.prototype.chromeThread = null;

            /**
             * TrackDescriptor counter.
             * @member {perfetto.protos.ICounterDescriptor|null|undefined} counter
             * @memberof perfetto.protos.TrackDescriptor
             * @instance
             */
            TrackDescriptor.prototype.counter = null;

            /**
             * Creates a new TrackDescriptor instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TrackDescriptor
             * @static
             * @param {perfetto.protos.ITrackDescriptor=} [properties] Properties to set
             * @returns {perfetto.protos.TrackDescriptor} TrackDescriptor instance
             */
            TrackDescriptor.create = function create(properties) {
                return new TrackDescriptor(properties);
            };

            /**
             * Encodes the specified TrackDescriptor message. Does not implicitly {@link perfetto.protos.TrackDescriptor.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TrackDescriptor
             * @static
             * @param {perfetto.protos.ITrackDescriptor} m TrackDescriptor message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrackDescriptor.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.uuid != null && Object.hasOwnProperty.call(m, "uuid"))
                    w.uint32(8).uint64(m.uuid);
                if (m.name != null && Object.hasOwnProperty.call(m, "name"))
                    w.uint32(18).string(m.name);
                if (m.process != null && Object.hasOwnProperty.call(m, "process"))
                    $root.perfetto.protos.ProcessDescriptor.encode(m.process, w.uint32(26).fork()).ldelim();
                if (m.thread != null && Object.hasOwnProperty.call(m, "thread"))
                    $root.perfetto.protos.ThreadDescriptor.encode(m.thread, w.uint32(34).fork()).ldelim();
                if (m.parentUuid != null && Object.hasOwnProperty.call(m, "parentUuid"))
                    w.uint32(40).uint64(m.parentUuid);
                if (m.chromeProcess != null && Object.hasOwnProperty.call(m, "chromeProcess"))
                    $root.perfetto.protos.ChromeProcessDescriptor.encode(m.chromeProcess, w.uint32(50).fork()).ldelim();
                if (m.chromeThread != null && Object.hasOwnProperty.call(m, "chromeThread"))
                    $root.perfetto.protos.ChromeThreadDescriptor.encode(m.chromeThread, w.uint32(58).fork()).ldelim();
                if (m.counter != null && Object.hasOwnProperty.call(m, "counter"))
                    $root.perfetto.protos.CounterDescriptor.encode(m.counter, w.uint32(66).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified TrackDescriptor message, length delimited. Does not implicitly {@link perfetto.protos.TrackDescriptor.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TrackDescriptor
             * @static
             * @param {perfetto.protos.ITrackDescriptor} message TrackDescriptor message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TrackDescriptor.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TrackDescriptor message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TrackDescriptor
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TrackDescriptor} TrackDescriptor
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrackDescriptor.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TrackDescriptor();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.uuid = r.uint64();
                        break;
                    case 5:
                        m.parentUuid = r.uint64();
                        break;
                    case 2:
                        m.name = r.string();
                        break;
                    case 3:
                        m.process = $root.perfetto.protos.ProcessDescriptor.decode(r, r.uint32());
                        break;
                    case 6:
                        m.chromeProcess = $root.perfetto.protos.ChromeProcessDescriptor.decode(r, r.uint32());
                        break;
                    case 4:
                        m.thread = $root.perfetto.protos.ThreadDescriptor.decode(r, r.uint32());
                        break;
                    case 7:
                        m.chromeThread = $root.perfetto.protos.ChromeThreadDescriptor.decode(r, r.uint32());
                        break;
                    case 8:
                        m.counter = $root.perfetto.protos.CounterDescriptor.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TrackDescriptor message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TrackDescriptor
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TrackDescriptor} TrackDescriptor
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TrackDescriptor.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TrackDescriptor message.
             * @function verify
             * @memberof perfetto.protos.TrackDescriptor
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TrackDescriptor.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.uuid != null && m.hasOwnProperty("uuid")) {
                    if (!$util.isInteger(m.uuid) && !(m.uuid && $util.isInteger(m.uuid.low) && $util.isInteger(m.uuid.high)))
                        return "uuid: integer|Long expected";
                }
                if (m.parentUuid != null && m.hasOwnProperty("parentUuid")) {
                    if (!$util.isInteger(m.parentUuid) && !(m.parentUuid && $util.isInteger(m.parentUuid.low) && $util.isInteger(m.parentUuid.high)))
                        return "parentUuid: integer|Long expected";
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    if (!$util.isString(m.name))
                        return "name: string expected";
                }
                if (m.process != null && m.hasOwnProperty("process")) {
                    {
                        var e = $root.perfetto.protos.ProcessDescriptor.verify(m.process);
                        if (e)
                            return "process." + e;
                    }
                }
                if (m.chromeProcess != null && m.hasOwnProperty("chromeProcess")) {
                    {
                        var e = $root.perfetto.protos.ChromeProcessDescriptor.verify(m.chromeProcess);
                        if (e)
                            return "chromeProcess." + e;
                    }
                }
                if (m.thread != null && m.hasOwnProperty("thread")) {
                    {
                        var e = $root.perfetto.protos.ThreadDescriptor.verify(m.thread);
                        if (e)
                            return "thread." + e;
                    }
                }
                if (m.chromeThread != null && m.hasOwnProperty("chromeThread")) {
                    {
                        var e = $root.perfetto.protos.ChromeThreadDescriptor.verify(m.chromeThread);
                        if (e)
                            return "chromeThread." + e;
                    }
                }
                if (m.counter != null && m.hasOwnProperty("counter")) {
                    {
                        var e = $root.perfetto.protos.CounterDescriptor.verify(m.counter);
                        if (e)
                            return "counter." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a TrackDescriptor message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TrackDescriptor
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TrackDescriptor} TrackDescriptor
             */
            TrackDescriptor.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TrackDescriptor)
                    return d;
                var m = new $root.perfetto.protos.TrackDescriptor();
                if (d.uuid != null) {
                    if ($util.Long)
                        (m.uuid = $util.Long.fromValue(d.uuid)).unsigned = true;
                    else if (typeof d.uuid === "string")
                        m.uuid = parseInt(d.uuid, 10);
                    else if (typeof d.uuid === "number")
                        m.uuid = d.uuid;
                    else if (typeof d.uuid === "object")
                        m.uuid = new $util.LongBits(d.uuid.low >>> 0, d.uuid.high >>> 0).toNumber(true);
                }
                if (d.parentUuid != null) {
                    if ($util.Long)
                        (m.parentUuid = $util.Long.fromValue(d.parentUuid)).unsigned = true;
                    else if (typeof d.parentUuid === "string")
                        m.parentUuid = parseInt(d.parentUuid, 10);
                    else if (typeof d.parentUuid === "number")
                        m.parentUuid = d.parentUuid;
                    else if (typeof d.parentUuid === "object")
                        m.parentUuid = new $util.LongBits(d.parentUuid.low >>> 0, d.parentUuid.high >>> 0).toNumber(true);
                }
                if (d.name != null) {
                    m.name = String(d.name);
                }
                if (d.process != null) {
                    if (typeof d.process !== "object")
                        throw TypeError(".perfetto.protos.TrackDescriptor.process: object expected");
                    m.process = $root.perfetto.protos.ProcessDescriptor.fromObject(d.process);
                }
                if (d.chromeProcess != null) {
                    if (typeof d.chromeProcess !== "object")
                        throw TypeError(".perfetto.protos.TrackDescriptor.chromeProcess: object expected");
                    m.chromeProcess = $root.perfetto.protos.ChromeProcessDescriptor.fromObject(d.chromeProcess);
                }
                if (d.thread != null) {
                    if (typeof d.thread !== "object")
                        throw TypeError(".perfetto.protos.TrackDescriptor.thread: object expected");
                    m.thread = $root.perfetto.protos.ThreadDescriptor.fromObject(d.thread);
                }
                if (d.chromeThread != null) {
                    if (typeof d.chromeThread !== "object")
                        throw TypeError(".perfetto.protos.TrackDescriptor.chromeThread: object expected");
                    m.chromeThread = $root.perfetto.protos.ChromeThreadDescriptor.fromObject(d.chromeThread);
                }
                if (d.counter != null) {
                    if (typeof d.counter !== "object")
                        throw TypeError(".perfetto.protos.TrackDescriptor.counter: object expected");
                    m.counter = $root.perfetto.protos.CounterDescriptor.fromObject(d.counter);
                }
                return m;
            };

            /**
             * Creates a plain object from a TrackDescriptor message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TrackDescriptor
             * @static
             * @param {perfetto.protos.TrackDescriptor} m TrackDescriptor
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TrackDescriptor.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.uuid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.uuid = o.longs === String ? "0" : 0;
                    d.name = "";
                    d.process = null;
                    d.thread = null;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.parentUuid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.parentUuid = o.longs === String ? "0" : 0;
                    d.chromeProcess = null;
                    d.chromeThread = null;
                    d.counter = null;
                }
                if (m.uuid != null && m.hasOwnProperty("uuid")) {
                    if (typeof m.uuid === "number")
                        d.uuid = o.longs === String ? String(m.uuid) : m.uuid;
                    else
                        d.uuid = o.longs === String ? $util.Long.prototype.toString.call(m.uuid) : o.longs === Number ? new $util.LongBits(m.uuid.low >>> 0, m.uuid.high >>> 0).toNumber(true) : m.uuid;
                }
                if (m.name != null && m.hasOwnProperty("name")) {
                    d.name = m.name;
                }
                if (m.process != null && m.hasOwnProperty("process")) {
                    d.process = $root.perfetto.protos.ProcessDescriptor.toObject(m.process, o);
                }
                if (m.thread != null && m.hasOwnProperty("thread")) {
                    d.thread = $root.perfetto.protos.ThreadDescriptor.toObject(m.thread, o);
                }
                if (m.parentUuid != null && m.hasOwnProperty("parentUuid")) {
                    if (typeof m.parentUuid === "number")
                        d.parentUuid = o.longs === String ? String(m.parentUuid) : m.parentUuid;
                    else
                        d.parentUuid = o.longs === String ? $util.Long.prototype.toString.call(m.parentUuid) : o.longs === Number ? new $util.LongBits(m.parentUuid.low >>> 0, m.parentUuid.high >>> 0).toNumber(true) : m.parentUuid;
                }
                if (m.chromeProcess != null && m.hasOwnProperty("chromeProcess")) {
                    d.chromeProcess = $root.perfetto.protos.ChromeProcessDescriptor.toObject(m.chromeProcess, o);
                }
                if (m.chromeThread != null && m.hasOwnProperty("chromeThread")) {
                    d.chromeThread = $root.perfetto.protos.ChromeThreadDescriptor.toObject(m.chromeThread, o);
                }
                if (m.counter != null && m.hasOwnProperty("counter")) {
                    d.counter = $root.perfetto.protos.CounterDescriptor.toObject(m.counter, o);
                }
                return d;
            };

            /**
             * Converts this TrackDescriptor to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TrackDescriptor
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TrackDescriptor.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TrackDescriptor;
        })();

        protos.ChromeProcessDescriptor = (function() {

            /**
             * Properties of a ChromeProcessDescriptor.
             * @memberof perfetto.protos
             * @interface IChromeProcessDescriptor
             * @property {perfetto.protos.ChromeProcessDescriptor.ProcessType|null} [processType] ChromeProcessDescriptor processType
             * @property {number|null} [processPriority] ChromeProcessDescriptor processPriority
             * @property {number|null} [legacySortIndex] ChromeProcessDescriptor legacySortIndex
             * @property {string|null} [hostAppPackageName] ChromeProcessDescriptor hostAppPackageName
             * @property {number|null} [crashTraceId] ChromeProcessDescriptor crashTraceId
             */

            /**
             * Constructs a new ChromeProcessDescriptor.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeProcessDescriptor.
             * @implements IChromeProcessDescriptor
             * @constructor
             * @param {perfetto.protos.IChromeProcessDescriptor=} [p] Properties to set
             */
            function ChromeProcessDescriptor(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeProcessDescriptor processType.
             * @member {perfetto.protos.ChromeProcessDescriptor.ProcessType} processType
             * @memberof perfetto.protos.ChromeProcessDescriptor
             * @instance
             */
            ChromeProcessDescriptor.prototype.processType = 0;

            /**
             * ChromeProcessDescriptor processPriority.
             * @member {number} processPriority
             * @memberof perfetto.protos.ChromeProcessDescriptor
             * @instance
             */
            ChromeProcessDescriptor.prototype.processPriority = 0;

            /**
             * ChromeProcessDescriptor legacySortIndex.
             * @member {number} legacySortIndex
             * @memberof perfetto.protos.ChromeProcessDescriptor
             * @instance
             */
            ChromeProcessDescriptor.prototype.legacySortIndex = 0;

            /**
             * ChromeProcessDescriptor hostAppPackageName.
             * @member {string} hostAppPackageName
             * @memberof perfetto.protos.ChromeProcessDescriptor
             * @instance
             */
            ChromeProcessDescriptor.prototype.hostAppPackageName = "";

            /**
             * ChromeProcessDescriptor crashTraceId.
             * @member {number} crashTraceId
             * @memberof perfetto.protos.ChromeProcessDescriptor
             * @instance
             */
            ChromeProcessDescriptor.prototype.crashTraceId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * Creates a new ChromeProcessDescriptor instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeProcessDescriptor
             * @static
             * @param {perfetto.protos.IChromeProcessDescriptor=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeProcessDescriptor} ChromeProcessDescriptor instance
             */
            ChromeProcessDescriptor.create = function create(properties) {
                return new ChromeProcessDescriptor(properties);
            };

            /**
             * Encodes the specified ChromeProcessDescriptor message. Does not implicitly {@link perfetto.protos.ChromeProcessDescriptor.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeProcessDescriptor
             * @static
             * @param {perfetto.protos.IChromeProcessDescriptor} m ChromeProcessDescriptor message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeProcessDescriptor.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.processType != null && Object.hasOwnProperty.call(m, "processType"))
                    w.uint32(8).int32(m.processType);
                if (m.processPriority != null && Object.hasOwnProperty.call(m, "processPriority"))
                    w.uint32(16).int32(m.processPriority);
                if (m.legacySortIndex != null && Object.hasOwnProperty.call(m, "legacySortIndex"))
                    w.uint32(24).int32(m.legacySortIndex);
                if (m.hostAppPackageName != null && Object.hasOwnProperty.call(m, "hostAppPackageName"))
                    w.uint32(34).string(m.hostAppPackageName);
                if (m.crashTraceId != null && Object.hasOwnProperty.call(m, "crashTraceId"))
                    w.uint32(40).uint64(m.crashTraceId);
                return w;
            };

            /**
             * Encodes the specified ChromeProcessDescriptor message, length delimited. Does not implicitly {@link perfetto.protos.ChromeProcessDescriptor.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeProcessDescriptor
             * @static
             * @param {perfetto.protos.IChromeProcessDescriptor} message ChromeProcessDescriptor message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeProcessDescriptor.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeProcessDescriptor message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeProcessDescriptor
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeProcessDescriptor} ChromeProcessDescriptor
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeProcessDescriptor.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeProcessDescriptor();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.processType = r.int32();
                        break;
                    case 2:
                        m.processPriority = r.int32();
                        break;
                    case 3:
                        m.legacySortIndex = r.int32();
                        break;
                    case 4:
                        m.hostAppPackageName = r.string();
                        break;
                    case 5:
                        m.crashTraceId = r.uint64();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeProcessDescriptor message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeProcessDescriptor
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeProcessDescriptor} ChromeProcessDescriptor
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeProcessDescriptor.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeProcessDescriptor message.
             * @function verify
             * @memberof perfetto.protos.ChromeProcessDescriptor
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeProcessDescriptor.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.processType != null && m.hasOwnProperty("processType")) {
                    switch (m.processType) {
                    default:
                        return "processType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                    case 6:
                    case 7:
                    case 8:
                    case 9:
                    case 10:
                    case 11:
                    case 12:
                    case 13:
                    case 14:
                    case 15:
                    case 16:
                    case 17:
                    case 18:
                    case 19:
                    case 20:
                    case 21:
                    case 22:
                    case 23:
                    case 24:
                    case 25:
                    case 26:
                    case 27:
                    case 28:
                    case 29:
                    case 30:
                    case 31:
                    case 32:
                    case 33:
                    case 34:
                    case 35:
                    case 36:
                    case 37:
                    case 38:
                    case 39:
                    case 40:
                        break;
                    }
                }
                if (m.processPriority != null && m.hasOwnProperty("processPriority")) {
                    if (!$util.isInteger(m.processPriority))
                        return "processPriority: integer expected";
                }
                if (m.legacySortIndex != null && m.hasOwnProperty("legacySortIndex")) {
                    if (!$util.isInteger(m.legacySortIndex))
                        return "legacySortIndex: integer expected";
                }
                if (m.hostAppPackageName != null && m.hasOwnProperty("hostAppPackageName")) {
                    if (!$util.isString(m.hostAppPackageName))
                        return "hostAppPackageName: string expected";
                }
                if (m.crashTraceId != null && m.hasOwnProperty("crashTraceId")) {
                    if (!$util.isInteger(m.crashTraceId) && !(m.crashTraceId && $util.isInteger(m.crashTraceId.low) && $util.isInteger(m.crashTraceId.high)))
                        return "crashTraceId: integer|Long expected";
                }
                return null;
            };

            /**
             * Creates a ChromeProcessDescriptor message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeProcessDescriptor
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeProcessDescriptor} ChromeProcessDescriptor
             */
            ChromeProcessDescriptor.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeProcessDescriptor)
                    return d;
                var m = new $root.perfetto.protos.ChromeProcessDescriptor();
                switch (d.processType) {
                case "PROCESS_UNSPECIFIED":
                case 0:
                    m.processType = 0;
                    break;
                case "PROCESS_BROWSER":
                case 1:
                    m.processType = 1;
                    break;
                case "PROCESS_RENDERER":
                case 2:
                    m.processType = 2;
                    break;
                case "PROCESS_UTILITY":
                case 3:
                    m.processType = 3;
                    break;
                case "PROCESS_ZYGOTE":
                case 4:
                    m.processType = 4;
                    break;
                case "PROCESS_SANDBOX_HELPER":
                case 5:
                    m.processType = 5;
                    break;
                case "PROCESS_GPU":
                case 6:
                    m.processType = 6;
                    break;
                case "PROCESS_PPAPI_PLUGIN":
                case 7:
                    m.processType = 7;
                    break;
                case "PROCESS_PPAPI_BROKER":
                case 8:
                    m.processType = 8;
                    break;
                case "PROCESS_SERVICE_NETWORK":
                case 9:
                    m.processType = 9;
                    break;
                case "PROCESS_SERVICE_TRACING":
                case 10:
                    m.processType = 10;
                    break;
                case "PROCESS_SERVICE_STORAGE":
                case 11:
                    m.processType = 11;
                    break;
                case "PROCESS_SERVICE_AUDIO":
                case 12:
                    m.processType = 12;
                    break;
                case "PROCESS_SERVICE_DATA_DECODER":
                case 13:
                    m.processType = 13;
                    break;
                case "PROCESS_SERVICE_UTIL_WIN":
                case 14:
                    m.processType = 14;
                    break;
                case "PROCESS_SERVICE_PROXY_RESOLVER":
                case 15:
                    m.processType = 15;
                    break;
                case "PROCESS_SERVICE_CDM":
                case 16:
                    m.processType = 16;
                    break;
                case "PROCESS_SERVICE_VIDEO_CAPTURE":
                case 17:
                    m.processType = 17;
                    break;
                case "PROCESS_SERVICE_UNZIPPER":
                case 18:
                    m.processType = 18;
                    break;
                case "PROCESS_SERVICE_MIRRORING":
                case 19:
                    m.processType = 19;
                    break;
                case "PROCESS_SERVICE_FILEPATCHER":
                case 20:
                    m.processType = 20;
                    break;
                case "PROCESS_SERVICE_TTS":
                case 21:
                    m.processType = 21;
                    break;
                case "PROCESS_SERVICE_PRINTING":
                case 22:
                    m.processType = 22;
                    break;
                case "PROCESS_SERVICE_QUARANTINE":
                case 23:
                    m.processType = 23;
                    break;
                case "PROCESS_SERVICE_CROS_LOCALSEARCH":
                case 24:
                    m.processType = 24;
                    break;
                case "PROCESS_SERVICE_CROS_ASSISTANT_AUDIO_DECODER":
                case 25:
                    m.processType = 25;
                    break;
                case "PROCESS_SERVICE_FILEUTIL":
                case 26:
                    m.processType = 26;
                    break;
                case "PROCESS_SERVICE_PRINTCOMPOSITOR":
                case 27:
                    m.processType = 27;
                    break;
                case "PROCESS_SERVICE_PAINTPREVIEW":
                case 28:
                    m.processType = 28;
                    break;
                case "PROCESS_SERVICE_SPEECHRECOGNITION":
                case 29:
                    m.processType = 29;
                    break;
                case "PROCESS_SERVICE_XRDEVICE":
                case 30:
                    m.processType = 30;
                    break;
                case "PROCESS_SERVICE_READICON":
                case 31:
                    m.processType = 31;
                    break;
                case "PROCESS_SERVICE_LANGUAGEDETECTION":
                case 32:
                    m.processType = 32;
                    break;
                case "PROCESS_SERVICE_SHARING":
                case 33:
                    m.processType = 33;
                    break;
                case "PROCESS_SERVICE_MEDIAPARSER":
                case 34:
                    m.processType = 34;
                    break;
                case "PROCESS_SERVICE_QRCODEGENERATOR":
                case 35:
                    m.processType = 35;
                    break;
                case "PROCESS_SERVICE_PROFILEIMPORT":
                case 36:
                    m.processType = 36;
                    break;
                case "PROCESS_SERVICE_IME":
                case 37:
                    m.processType = 37;
                    break;
                case "PROCESS_SERVICE_RECORDING":
                case 38:
                    m.processType = 38;
                    break;
                case "PROCESS_SERVICE_SHAPEDETECTION":
                case 39:
                    m.processType = 39;
                    break;
                case "PROCESS_RENDERER_EXTENSION":
                case 40:
                    m.processType = 40;
                    break;
                }
                if (d.processPriority != null) {
                    m.processPriority = d.processPriority | 0;
                }
                if (d.legacySortIndex != null) {
                    m.legacySortIndex = d.legacySortIndex | 0;
                }
                if (d.hostAppPackageName != null) {
                    m.hostAppPackageName = String(d.hostAppPackageName);
                }
                if (d.crashTraceId != null) {
                    if ($util.Long)
                        (m.crashTraceId = $util.Long.fromValue(d.crashTraceId)).unsigned = true;
                    else if (typeof d.crashTraceId === "string")
                        m.crashTraceId = parseInt(d.crashTraceId, 10);
                    else if (typeof d.crashTraceId === "number")
                        m.crashTraceId = d.crashTraceId;
                    else if (typeof d.crashTraceId === "object")
                        m.crashTraceId = new $util.LongBits(d.crashTraceId.low >>> 0, d.crashTraceId.high >>> 0).toNumber(true);
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeProcessDescriptor message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeProcessDescriptor
             * @static
             * @param {perfetto.protos.ChromeProcessDescriptor} m ChromeProcessDescriptor
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeProcessDescriptor.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.processType = o.enums === String ? "PROCESS_UNSPECIFIED" : 0;
                    d.processPriority = 0;
                    d.legacySortIndex = 0;
                    d.hostAppPackageName = "";
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.crashTraceId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.crashTraceId = o.longs === String ? "0" : 0;
                }
                if (m.processType != null && m.hasOwnProperty("processType")) {
                    d.processType = o.enums === String ? $root.perfetto.protos.ChromeProcessDescriptor.ProcessType[m.processType] : m.processType;
                }
                if (m.processPriority != null && m.hasOwnProperty("processPriority")) {
                    d.processPriority = m.processPriority;
                }
                if (m.legacySortIndex != null && m.hasOwnProperty("legacySortIndex")) {
                    d.legacySortIndex = m.legacySortIndex;
                }
                if (m.hostAppPackageName != null && m.hasOwnProperty("hostAppPackageName")) {
                    d.hostAppPackageName = m.hostAppPackageName;
                }
                if (m.crashTraceId != null && m.hasOwnProperty("crashTraceId")) {
                    if (typeof m.crashTraceId === "number")
                        d.crashTraceId = o.longs === String ? String(m.crashTraceId) : m.crashTraceId;
                    else
                        d.crashTraceId = o.longs === String ? $util.Long.prototype.toString.call(m.crashTraceId) : o.longs === Number ? new $util.LongBits(m.crashTraceId.low >>> 0, m.crashTraceId.high >>> 0).toNumber(true) : m.crashTraceId;
                }
                return d;
            };

            /**
             * Converts this ChromeProcessDescriptor to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeProcessDescriptor
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeProcessDescriptor.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * ProcessType enum.
             * @name perfetto.protos.ChromeProcessDescriptor.ProcessType
             * @enum {number}
             * @property {number} PROCESS_UNSPECIFIED=0 PROCESS_UNSPECIFIED value
             * @property {number} PROCESS_BROWSER=1 PROCESS_BROWSER value
             * @property {number} PROCESS_RENDERER=2 PROCESS_RENDERER value
             * @property {number} PROCESS_UTILITY=3 PROCESS_UTILITY value
             * @property {number} PROCESS_ZYGOTE=4 PROCESS_ZYGOTE value
             * @property {number} PROCESS_SANDBOX_HELPER=5 PROCESS_SANDBOX_HELPER value
             * @property {number} PROCESS_GPU=6 PROCESS_GPU value
             * @property {number} PROCESS_PPAPI_PLUGIN=7 PROCESS_PPAPI_PLUGIN value
             * @property {number} PROCESS_PPAPI_BROKER=8 PROCESS_PPAPI_BROKER value
             * @property {number} PROCESS_SERVICE_NETWORK=9 PROCESS_SERVICE_NETWORK value
             * @property {number} PROCESS_SERVICE_TRACING=10 PROCESS_SERVICE_TRACING value
             * @property {number} PROCESS_SERVICE_STORAGE=11 PROCESS_SERVICE_STORAGE value
             * @property {number} PROCESS_SERVICE_AUDIO=12 PROCESS_SERVICE_AUDIO value
             * @property {number} PROCESS_SERVICE_DATA_DECODER=13 PROCESS_SERVICE_DATA_DECODER value
             * @property {number} PROCESS_SERVICE_UTIL_WIN=14 PROCESS_SERVICE_UTIL_WIN value
             * @property {number} PROCESS_SERVICE_PROXY_RESOLVER=15 PROCESS_SERVICE_PROXY_RESOLVER value
             * @property {number} PROCESS_SERVICE_CDM=16 PROCESS_SERVICE_CDM value
             * @property {number} PROCESS_SERVICE_VIDEO_CAPTURE=17 PROCESS_SERVICE_VIDEO_CAPTURE value
             * @property {number} PROCESS_SERVICE_UNZIPPER=18 PROCESS_SERVICE_UNZIPPER value
             * @property {number} PROCESS_SERVICE_MIRRORING=19 PROCESS_SERVICE_MIRRORING value
             * @property {number} PROCESS_SERVICE_FILEPATCHER=20 PROCESS_SERVICE_FILEPATCHER value
             * @property {number} PROCESS_SERVICE_TTS=21 PROCESS_SERVICE_TTS value
             * @property {number} PROCESS_SERVICE_PRINTING=22 PROCESS_SERVICE_PRINTING value
             * @property {number} PROCESS_SERVICE_QUARANTINE=23 PROCESS_SERVICE_QUARANTINE value
             * @property {number} PROCESS_SERVICE_CROS_LOCALSEARCH=24 PROCESS_SERVICE_CROS_LOCALSEARCH value
             * @property {number} PROCESS_SERVICE_CROS_ASSISTANT_AUDIO_DECODER=25 PROCESS_SERVICE_CROS_ASSISTANT_AUDIO_DECODER value
             * @property {number} PROCESS_SERVICE_FILEUTIL=26 PROCESS_SERVICE_FILEUTIL value
             * @property {number} PROCESS_SERVICE_PRINTCOMPOSITOR=27 PROCESS_SERVICE_PRINTCOMPOSITOR value
             * @property {number} PROCESS_SERVICE_PAINTPREVIEW=28 PROCESS_SERVICE_PAINTPREVIEW value
             * @property {number} PROCESS_SERVICE_SPEECHRECOGNITION=29 PROCESS_SERVICE_SPEECHRECOGNITION value
             * @property {number} PROCESS_SERVICE_XRDEVICE=30 PROCESS_SERVICE_XRDEVICE value
             * @property {number} PROCESS_SERVICE_READICON=31 PROCESS_SERVICE_READICON value
             * @property {number} PROCESS_SERVICE_LANGUAGEDETECTION=32 PROCESS_SERVICE_LANGUAGEDETECTION value
             * @property {number} PROCESS_SERVICE_SHARING=33 PROCESS_SERVICE_SHARING value
             * @property {number} PROCESS_SERVICE_MEDIAPARSER=34 PROCESS_SERVICE_MEDIAPARSER value
             * @property {number} PROCESS_SERVICE_QRCODEGENERATOR=35 PROCESS_SERVICE_QRCODEGENERATOR value
             * @property {number} PROCESS_SERVICE_PROFILEIMPORT=36 PROCESS_SERVICE_PROFILEIMPORT value
             * @property {number} PROCESS_SERVICE_IME=37 PROCESS_SERVICE_IME value
             * @property {number} PROCESS_SERVICE_RECORDING=38 PROCESS_SERVICE_RECORDING value
             * @property {number} PROCESS_SERVICE_SHAPEDETECTION=39 PROCESS_SERVICE_SHAPEDETECTION value
             * @property {number} PROCESS_RENDERER_EXTENSION=40 PROCESS_RENDERER_EXTENSION value
             */
            ChromeProcessDescriptor.ProcessType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "PROCESS_UNSPECIFIED"] = 0;
                values[valuesById[1] = "PROCESS_BROWSER"] = 1;
                values[valuesById[2] = "PROCESS_RENDERER"] = 2;
                values[valuesById[3] = "PROCESS_UTILITY"] = 3;
                values[valuesById[4] = "PROCESS_ZYGOTE"] = 4;
                values[valuesById[5] = "PROCESS_SANDBOX_HELPER"] = 5;
                values[valuesById[6] = "PROCESS_GPU"] = 6;
                values[valuesById[7] = "PROCESS_PPAPI_PLUGIN"] = 7;
                values[valuesById[8] = "PROCESS_PPAPI_BROKER"] = 8;
                values[valuesById[9] = "PROCESS_SERVICE_NETWORK"] = 9;
                values[valuesById[10] = "PROCESS_SERVICE_TRACING"] = 10;
                values[valuesById[11] = "PROCESS_SERVICE_STORAGE"] = 11;
                values[valuesById[12] = "PROCESS_SERVICE_AUDIO"] = 12;
                values[valuesById[13] = "PROCESS_SERVICE_DATA_DECODER"] = 13;
                values[valuesById[14] = "PROCESS_SERVICE_UTIL_WIN"] = 14;
                values[valuesById[15] = "PROCESS_SERVICE_PROXY_RESOLVER"] = 15;
                values[valuesById[16] = "PROCESS_SERVICE_CDM"] = 16;
                values[valuesById[17] = "PROCESS_SERVICE_VIDEO_CAPTURE"] = 17;
                values[valuesById[18] = "PROCESS_SERVICE_UNZIPPER"] = 18;
                values[valuesById[19] = "PROCESS_SERVICE_MIRRORING"] = 19;
                values[valuesById[20] = "PROCESS_SERVICE_FILEPATCHER"] = 20;
                values[valuesById[21] = "PROCESS_SERVICE_TTS"] = 21;
                values[valuesById[22] = "PROCESS_SERVICE_PRINTING"] = 22;
                values[valuesById[23] = "PROCESS_SERVICE_QUARANTINE"] = 23;
                values[valuesById[24] = "PROCESS_SERVICE_CROS_LOCALSEARCH"] = 24;
                values[valuesById[25] = "PROCESS_SERVICE_CROS_ASSISTANT_AUDIO_DECODER"] = 25;
                values[valuesById[26] = "PROCESS_SERVICE_FILEUTIL"] = 26;
                values[valuesById[27] = "PROCESS_SERVICE_PRINTCOMPOSITOR"] = 27;
                values[valuesById[28] = "PROCESS_SERVICE_PAINTPREVIEW"] = 28;
                values[valuesById[29] = "PROCESS_SERVICE_SPEECHRECOGNITION"] = 29;
                values[valuesById[30] = "PROCESS_SERVICE_XRDEVICE"] = 30;
                values[valuesById[31] = "PROCESS_SERVICE_READICON"] = 31;
                values[valuesById[32] = "PROCESS_SERVICE_LANGUAGEDETECTION"] = 32;
                values[valuesById[33] = "PROCESS_SERVICE_SHARING"] = 33;
                values[valuesById[34] = "PROCESS_SERVICE_MEDIAPARSER"] = 34;
                values[valuesById[35] = "PROCESS_SERVICE_QRCODEGENERATOR"] = 35;
                values[valuesById[36] = "PROCESS_SERVICE_PROFILEIMPORT"] = 36;
                values[valuesById[37] = "PROCESS_SERVICE_IME"] = 37;
                values[valuesById[38] = "PROCESS_SERVICE_RECORDING"] = 38;
                values[valuesById[39] = "PROCESS_SERVICE_SHAPEDETECTION"] = 39;
                values[valuesById[40] = "PROCESS_RENDERER_EXTENSION"] = 40;
                return values;
            })();

            return ChromeProcessDescriptor;
        })();

        protos.ChromeThreadDescriptor = (function() {

            /**
             * Properties of a ChromeThreadDescriptor.
             * @memberof perfetto.protos
             * @interface IChromeThreadDescriptor
             * @property {perfetto.protos.ChromeThreadDescriptor.ThreadType|null} [threadType] ChromeThreadDescriptor threadType
             * @property {number|null} [legacySortIndex] ChromeThreadDescriptor legacySortIndex
             */

            /**
             * Constructs a new ChromeThreadDescriptor.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeThreadDescriptor.
             * @implements IChromeThreadDescriptor
             * @constructor
             * @param {perfetto.protos.IChromeThreadDescriptor=} [p] Properties to set
             */
            function ChromeThreadDescriptor(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeThreadDescriptor threadType.
             * @member {perfetto.protos.ChromeThreadDescriptor.ThreadType} threadType
             * @memberof perfetto.protos.ChromeThreadDescriptor
             * @instance
             */
            ChromeThreadDescriptor.prototype.threadType = 0;

            /**
             * ChromeThreadDescriptor legacySortIndex.
             * @member {number} legacySortIndex
             * @memberof perfetto.protos.ChromeThreadDescriptor
             * @instance
             */
            ChromeThreadDescriptor.prototype.legacySortIndex = 0;

            /**
             * Creates a new ChromeThreadDescriptor instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeThreadDescriptor
             * @static
             * @param {perfetto.protos.IChromeThreadDescriptor=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeThreadDescriptor} ChromeThreadDescriptor instance
             */
            ChromeThreadDescriptor.create = function create(properties) {
                return new ChromeThreadDescriptor(properties);
            };

            /**
             * Encodes the specified ChromeThreadDescriptor message. Does not implicitly {@link perfetto.protos.ChromeThreadDescriptor.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeThreadDescriptor
             * @static
             * @param {perfetto.protos.IChromeThreadDescriptor} m ChromeThreadDescriptor message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeThreadDescriptor.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.threadType != null && Object.hasOwnProperty.call(m, "threadType"))
                    w.uint32(8).int32(m.threadType);
                if (m.legacySortIndex != null && Object.hasOwnProperty.call(m, "legacySortIndex"))
                    w.uint32(16).int32(m.legacySortIndex);
                return w;
            };

            /**
             * Encodes the specified ChromeThreadDescriptor message, length delimited. Does not implicitly {@link perfetto.protos.ChromeThreadDescriptor.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeThreadDescriptor
             * @static
             * @param {perfetto.protos.IChromeThreadDescriptor} message ChromeThreadDescriptor message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeThreadDescriptor.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeThreadDescriptor message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeThreadDescriptor
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeThreadDescriptor} ChromeThreadDescriptor
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeThreadDescriptor.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeThreadDescriptor();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.threadType = r.int32();
                        break;
                    case 2:
                        m.legacySortIndex = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeThreadDescriptor message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeThreadDescriptor
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeThreadDescriptor} ChromeThreadDescriptor
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeThreadDescriptor.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeThreadDescriptor message.
             * @function verify
             * @memberof perfetto.protos.ChromeThreadDescriptor
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeThreadDescriptor.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.threadType != null && m.hasOwnProperty("threadType")) {
                    switch (m.threadType) {
                    default:
                        return "threadType: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                    case 6:
                    case 7:
                    case 8:
                    case 9:
                    case 10:
                    case 11:
                    case 12:
                    case 13:
                    case 14:
                    case 15:
                    case 16:
                    case 17:
                    case 18:
                    case 19:
                    case 20:
                    case 21:
                    case 22:
                    case 23:
                    case 24:
                    case 25:
                    case 26:
                    case 27:
                    case 28:
                    case 29:
                    case 30:
                    case 31:
                    case 32:
                    case 33:
                    case 34:
                    case 35:
                    case 36:
                    case 37:
                    case 38:
                    case 39:
                    case 40:
                    case 41:
                    case 50:
                    case 51:
                        break;
                    }
                }
                if (m.legacySortIndex != null && m.hasOwnProperty("legacySortIndex")) {
                    if (!$util.isInteger(m.legacySortIndex))
                        return "legacySortIndex: integer expected";
                }
                return null;
            };

            /**
             * Creates a ChromeThreadDescriptor message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeThreadDescriptor
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeThreadDescriptor} ChromeThreadDescriptor
             */
            ChromeThreadDescriptor.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeThreadDescriptor)
                    return d;
                var m = new $root.perfetto.protos.ChromeThreadDescriptor();
                switch (d.threadType) {
                case "THREAD_UNSPECIFIED":
                case 0:
                    m.threadType = 0;
                    break;
                case "THREAD_MAIN":
                case 1:
                    m.threadType = 1;
                    break;
                case "THREAD_IO":
                case 2:
                    m.threadType = 2;
                    break;
                case "THREAD_POOL_BG_WORKER":
                case 3:
                    m.threadType = 3;
                    break;
                case "THREAD_POOL_FG_WORKER":
                case 4:
                    m.threadType = 4;
                    break;
                case "THREAD_POOL_FG_BLOCKING":
                case 5:
                    m.threadType = 5;
                    break;
                case "THREAD_POOL_BG_BLOCKING":
                case 6:
                    m.threadType = 6;
                    break;
                case "THREAD_POOL_SERVICE":
                case 7:
                    m.threadType = 7;
                    break;
                case "THREAD_COMPOSITOR":
                case 8:
                    m.threadType = 8;
                    break;
                case "THREAD_VIZ_COMPOSITOR":
                case 9:
                    m.threadType = 9;
                    break;
                case "THREAD_COMPOSITOR_WORKER":
                case 10:
                    m.threadType = 10;
                    break;
                case "THREAD_SERVICE_WORKER":
                case 11:
                    m.threadType = 11;
                    break;
                case "THREAD_NETWORK_SERVICE":
                case 12:
                    m.threadType = 12;
                    break;
                case "THREAD_CHILD_IO":
                case 13:
                    m.threadType = 13;
                    break;
                case "THREAD_BROWSER_IO":
                case 14:
                    m.threadType = 14;
                    break;
                case "THREAD_BROWSER_MAIN":
                case 15:
                    m.threadType = 15;
                    break;
                case "THREAD_RENDERER_MAIN":
                case 16:
                    m.threadType = 16;
                    break;
                case "THREAD_UTILITY_MAIN":
                case 17:
                    m.threadType = 17;
                    break;
                case "THREAD_GPU_MAIN":
                case 18:
                    m.threadType = 18;
                    break;
                case "THREAD_CACHE_BLOCKFILE":
                case 19:
                    m.threadType = 19;
                    break;
                case "THREAD_MEDIA":
                case 20:
                    m.threadType = 20;
                    break;
                case "THREAD_AUDIO_OUTPUTDEVICE":
                case 21:
                    m.threadType = 21;
                    break;
                case "THREAD_AUDIO_INPUTDEVICE":
                case 22:
                    m.threadType = 22;
                    break;
                case "THREAD_GPU_MEMORY":
                case 23:
                    m.threadType = 23;
                    break;
                case "THREAD_GPU_VSYNC":
                case 24:
                    m.threadType = 24;
                    break;
                case "THREAD_DXA_VIDEODECODER":
                case 25:
                    m.threadType = 25;
                    break;
                case "THREAD_BROWSER_WATCHDOG":
                case 26:
                    m.threadType = 26;
                    break;
                case "THREAD_WEBRTC_NETWORK":
                case 27:
                    m.threadType = 27;
                    break;
                case "THREAD_WINDOW_OWNER":
                case 28:
                    m.threadType = 28;
                    break;
                case "THREAD_WEBRTC_SIGNALING":
                case 29:
                    m.threadType = 29;
                    break;
                case "THREAD_WEBRTC_WORKER":
                case 30:
                    m.threadType = 30;
                    break;
                case "THREAD_PPAPI_MAIN":
                case 31:
                    m.threadType = 31;
                    break;
                case "THREAD_GPU_WATCHDOG":
                case 32:
                    m.threadType = 32;
                    break;
                case "THREAD_SWAPPER":
                case 33:
                    m.threadType = 33;
                    break;
                case "THREAD_GAMEPAD_POLLING":
                case 34:
                    m.threadType = 34;
                    break;
                case "THREAD_WEBCRYPTO":
                case 35:
                    m.threadType = 35;
                    break;
                case "THREAD_DATABASE":
                case 36:
                    m.threadType = 36;
                    break;
                case "THREAD_PROXYRESOLVER":
                case 37:
                    m.threadType = 37;
                    break;
                case "THREAD_DEVTOOLSADB":
                case 38:
                    m.threadType = 38;
                    break;
                case "THREAD_NETWORKCONFIGWATCHER":
                case 39:
                    m.threadType = 39;
                    break;
                case "THREAD_WASAPI_RENDER":
                case 40:
                    m.threadType = 40;
                    break;
                case "THREAD_LOADER_LOCK_SAMPLER":
                case 41:
                    m.threadType = 41;
                    break;
                case "THREAD_MEMORY_INFRA":
                case 50:
                    m.threadType = 50;
                    break;
                case "THREAD_SAMPLING_PROFILER":
                case 51:
                    m.threadType = 51;
                    break;
                }
                if (d.legacySortIndex != null) {
                    m.legacySortIndex = d.legacySortIndex | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeThreadDescriptor message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeThreadDescriptor
             * @static
             * @param {perfetto.protos.ChromeThreadDescriptor} m ChromeThreadDescriptor
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeThreadDescriptor.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.threadType = o.enums === String ? "THREAD_UNSPECIFIED" : 0;
                    d.legacySortIndex = 0;
                }
                if (m.threadType != null && m.hasOwnProperty("threadType")) {
                    d.threadType = o.enums === String ? $root.perfetto.protos.ChromeThreadDescriptor.ThreadType[m.threadType] : m.threadType;
                }
                if (m.legacySortIndex != null && m.hasOwnProperty("legacySortIndex")) {
                    d.legacySortIndex = m.legacySortIndex;
                }
                return d;
            };

            /**
             * Converts this ChromeThreadDescriptor to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeThreadDescriptor
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeThreadDescriptor.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * ThreadType enum.
             * @name perfetto.protos.ChromeThreadDescriptor.ThreadType
             * @enum {number}
             * @property {number} THREAD_UNSPECIFIED=0 THREAD_UNSPECIFIED value
             * @property {number} THREAD_MAIN=1 THREAD_MAIN value
             * @property {number} THREAD_IO=2 THREAD_IO value
             * @property {number} THREAD_POOL_BG_WORKER=3 THREAD_POOL_BG_WORKER value
             * @property {number} THREAD_POOL_FG_WORKER=4 THREAD_POOL_FG_WORKER value
             * @property {number} THREAD_POOL_FG_BLOCKING=5 THREAD_POOL_FG_BLOCKING value
             * @property {number} THREAD_POOL_BG_BLOCKING=6 THREAD_POOL_BG_BLOCKING value
             * @property {number} THREAD_POOL_SERVICE=7 THREAD_POOL_SERVICE value
             * @property {number} THREAD_COMPOSITOR=8 THREAD_COMPOSITOR value
             * @property {number} THREAD_VIZ_COMPOSITOR=9 THREAD_VIZ_COMPOSITOR value
             * @property {number} THREAD_COMPOSITOR_WORKER=10 THREAD_COMPOSITOR_WORKER value
             * @property {number} THREAD_SERVICE_WORKER=11 THREAD_SERVICE_WORKER value
             * @property {number} THREAD_NETWORK_SERVICE=12 THREAD_NETWORK_SERVICE value
             * @property {number} THREAD_CHILD_IO=13 THREAD_CHILD_IO value
             * @property {number} THREAD_BROWSER_IO=14 THREAD_BROWSER_IO value
             * @property {number} THREAD_BROWSER_MAIN=15 THREAD_BROWSER_MAIN value
             * @property {number} THREAD_RENDERER_MAIN=16 THREAD_RENDERER_MAIN value
             * @property {number} THREAD_UTILITY_MAIN=17 THREAD_UTILITY_MAIN value
             * @property {number} THREAD_GPU_MAIN=18 THREAD_GPU_MAIN value
             * @property {number} THREAD_CACHE_BLOCKFILE=19 THREAD_CACHE_BLOCKFILE value
             * @property {number} THREAD_MEDIA=20 THREAD_MEDIA value
             * @property {number} THREAD_AUDIO_OUTPUTDEVICE=21 THREAD_AUDIO_OUTPUTDEVICE value
             * @property {number} THREAD_AUDIO_INPUTDEVICE=22 THREAD_AUDIO_INPUTDEVICE value
             * @property {number} THREAD_GPU_MEMORY=23 THREAD_GPU_MEMORY value
             * @property {number} THREAD_GPU_VSYNC=24 THREAD_GPU_VSYNC value
             * @property {number} THREAD_DXA_VIDEODECODER=25 THREAD_DXA_VIDEODECODER value
             * @property {number} THREAD_BROWSER_WATCHDOG=26 THREAD_BROWSER_WATCHDOG value
             * @property {number} THREAD_WEBRTC_NETWORK=27 THREAD_WEBRTC_NETWORK value
             * @property {number} THREAD_WINDOW_OWNER=28 THREAD_WINDOW_OWNER value
             * @property {number} THREAD_WEBRTC_SIGNALING=29 THREAD_WEBRTC_SIGNALING value
             * @property {number} THREAD_WEBRTC_WORKER=30 THREAD_WEBRTC_WORKER value
             * @property {number} THREAD_PPAPI_MAIN=31 THREAD_PPAPI_MAIN value
             * @property {number} THREAD_GPU_WATCHDOG=32 THREAD_GPU_WATCHDOG value
             * @property {number} THREAD_SWAPPER=33 THREAD_SWAPPER value
             * @property {number} THREAD_GAMEPAD_POLLING=34 THREAD_GAMEPAD_POLLING value
             * @property {number} THREAD_WEBCRYPTO=35 THREAD_WEBCRYPTO value
             * @property {number} THREAD_DATABASE=36 THREAD_DATABASE value
             * @property {number} THREAD_PROXYRESOLVER=37 THREAD_PROXYRESOLVER value
             * @property {number} THREAD_DEVTOOLSADB=38 THREAD_DEVTOOLSADB value
             * @property {number} THREAD_NETWORKCONFIGWATCHER=39 THREAD_NETWORKCONFIGWATCHER value
             * @property {number} THREAD_WASAPI_RENDER=40 THREAD_WASAPI_RENDER value
             * @property {number} THREAD_LOADER_LOCK_SAMPLER=41 THREAD_LOADER_LOCK_SAMPLER value
             * @property {number} THREAD_MEMORY_INFRA=50 THREAD_MEMORY_INFRA value
             * @property {number} THREAD_SAMPLING_PROFILER=51 THREAD_SAMPLING_PROFILER value
             */
            ChromeThreadDescriptor.ThreadType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "THREAD_UNSPECIFIED"] = 0;
                values[valuesById[1] = "THREAD_MAIN"] = 1;
                values[valuesById[2] = "THREAD_IO"] = 2;
                values[valuesById[3] = "THREAD_POOL_BG_WORKER"] = 3;
                values[valuesById[4] = "THREAD_POOL_FG_WORKER"] = 4;
                values[valuesById[5] = "THREAD_POOL_FG_BLOCKING"] = 5;
                values[valuesById[6] = "THREAD_POOL_BG_BLOCKING"] = 6;
                values[valuesById[7] = "THREAD_POOL_SERVICE"] = 7;
                values[valuesById[8] = "THREAD_COMPOSITOR"] = 8;
                values[valuesById[9] = "THREAD_VIZ_COMPOSITOR"] = 9;
                values[valuesById[10] = "THREAD_COMPOSITOR_WORKER"] = 10;
                values[valuesById[11] = "THREAD_SERVICE_WORKER"] = 11;
                values[valuesById[12] = "THREAD_NETWORK_SERVICE"] = 12;
                values[valuesById[13] = "THREAD_CHILD_IO"] = 13;
                values[valuesById[14] = "THREAD_BROWSER_IO"] = 14;
                values[valuesById[15] = "THREAD_BROWSER_MAIN"] = 15;
                values[valuesById[16] = "THREAD_RENDERER_MAIN"] = 16;
                values[valuesById[17] = "THREAD_UTILITY_MAIN"] = 17;
                values[valuesById[18] = "THREAD_GPU_MAIN"] = 18;
                values[valuesById[19] = "THREAD_CACHE_BLOCKFILE"] = 19;
                values[valuesById[20] = "THREAD_MEDIA"] = 20;
                values[valuesById[21] = "THREAD_AUDIO_OUTPUTDEVICE"] = 21;
                values[valuesById[22] = "THREAD_AUDIO_INPUTDEVICE"] = 22;
                values[valuesById[23] = "THREAD_GPU_MEMORY"] = 23;
                values[valuesById[24] = "THREAD_GPU_VSYNC"] = 24;
                values[valuesById[25] = "THREAD_DXA_VIDEODECODER"] = 25;
                values[valuesById[26] = "THREAD_BROWSER_WATCHDOG"] = 26;
                values[valuesById[27] = "THREAD_WEBRTC_NETWORK"] = 27;
                values[valuesById[28] = "THREAD_WINDOW_OWNER"] = 28;
                values[valuesById[29] = "THREAD_WEBRTC_SIGNALING"] = 29;
                values[valuesById[30] = "THREAD_WEBRTC_WORKER"] = 30;
                values[valuesById[31] = "THREAD_PPAPI_MAIN"] = 31;
                values[valuesById[32] = "THREAD_GPU_WATCHDOG"] = 32;
                values[valuesById[33] = "THREAD_SWAPPER"] = 33;
                values[valuesById[34] = "THREAD_GAMEPAD_POLLING"] = 34;
                values[valuesById[35] = "THREAD_WEBCRYPTO"] = 35;
                values[valuesById[36] = "THREAD_DATABASE"] = 36;
                values[valuesById[37] = "THREAD_PROXYRESOLVER"] = 37;
                values[valuesById[38] = "THREAD_DEVTOOLSADB"] = 38;
                values[valuesById[39] = "THREAD_NETWORKCONFIGWATCHER"] = 39;
                values[valuesById[40] = "THREAD_WASAPI_RENDER"] = 40;
                values[valuesById[41] = "THREAD_LOADER_LOCK_SAMPLER"] = 41;
                values[valuesById[50] = "THREAD_MEMORY_INFRA"] = 50;
                values[valuesById[51] = "THREAD_SAMPLING_PROFILER"] = 51;
                return values;
            })();

            return ChromeThreadDescriptor;
        })();

        protos.CounterDescriptor = (function() {

            /**
             * Properties of a CounterDescriptor.
             * @memberof perfetto.protos
             * @interface ICounterDescriptor
             * @property {perfetto.protos.CounterDescriptor.BuiltinCounterType|null} [type] CounterDescriptor type
             * @property {Array.<string>|null} [categories] CounterDescriptor categories
             * @property {perfetto.protos.CounterDescriptor.Unit|null} [unit] CounterDescriptor unit
             * @property {string|null} [unitName] CounterDescriptor unitName
             * @property {number|null} [unitMultiplier] CounterDescriptor unitMultiplier
             * @property {boolean|null} [isIncremental] CounterDescriptor isIncremental
             */

            /**
             * Constructs a new CounterDescriptor.
             * @memberof perfetto.protos
             * @classdesc Represents a CounterDescriptor.
             * @implements ICounterDescriptor
             * @constructor
             * @param {perfetto.protos.ICounterDescriptor=} [p] Properties to set
             */
            function CounterDescriptor(p) {
                this.categories = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * CounterDescriptor type.
             * @member {perfetto.protos.CounterDescriptor.BuiltinCounterType} type
             * @memberof perfetto.protos.CounterDescriptor
             * @instance
             */
            CounterDescriptor.prototype.type = 0;

            /**
             * CounterDescriptor categories.
             * @member {Array.<string>} categories
             * @memberof perfetto.protos.CounterDescriptor
             * @instance
             */
            CounterDescriptor.prototype.categories = $util.emptyArray;

            /**
             * CounterDescriptor unit.
             * @member {perfetto.protos.CounterDescriptor.Unit} unit
             * @memberof perfetto.protos.CounterDescriptor
             * @instance
             */
            CounterDescriptor.prototype.unit = 0;

            /**
             * CounterDescriptor unitName.
             * @member {string} unitName
             * @memberof perfetto.protos.CounterDescriptor
             * @instance
             */
            CounterDescriptor.prototype.unitName = "";

            /**
             * CounterDescriptor unitMultiplier.
             * @member {number} unitMultiplier
             * @memberof perfetto.protos.CounterDescriptor
             * @instance
             */
            CounterDescriptor.prototype.unitMultiplier = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * CounterDescriptor isIncremental.
             * @member {boolean} isIncremental
             * @memberof perfetto.protos.CounterDescriptor
             * @instance
             */
            CounterDescriptor.prototype.isIncremental = false;

            /**
             * Creates a new CounterDescriptor instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.CounterDescriptor
             * @static
             * @param {perfetto.protos.ICounterDescriptor=} [properties] Properties to set
             * @returns {perfetto.protos.CounterDescriptor} CounterDescriptor instance
             */
            CounterDescriptor.create = function create(properties) {
                return new CounterDescriptor(properties);
            };

            /**
             * Encodes the specified CounterDescriptor message. Does not implicitly {@link perfetto.protos.CounterDescriptor.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.CounterDescriptor
             * @static
             * @param {perfetto.protos.ICounterDescriptor} m CounterDescriptor message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CounterDescriptor.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.type != null && Object.hasOwnProperty.call(m, "type"))
                    w.uint32(8).int32(m.type);
                if (m.categories != null && m.categories.length) {
                    for (var i = 0; i < m.categories.length; ++i)
                        w.uint32(18).string(m.categories[i]);
                }
                if (m.unit != null && Object.hasOwnProperty.call(m, "unit"))
                    w.uint32(24).int32(m.unit);
                if (m.unitMultiplier != null && Object.hasOwnProperty.call(m, "unitMultiplier"))
                    w.uint32(32).int64(m.unitMultiplier);
                if (m.isIncremental != null && Object.hasOwnProperty.call(m, "isIncremental"))
                    w.uint32(40).bool(m.isIncremental);
                if (m.unitName != null && Object.hasOwnProperty.call(m, "unitName"))
                    w.uint32(50).string(m.unitName);
                return w;
            };

            /**
             * Encodes the specified CounterDescriptor message, length delimited. Does not implicitly {@link perfetto.protos.CounterDescriptor.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.CounterDescriptor
             * @static
             * @param {perfetto.protos.ICounterDescriptor} message CounterDescriptor message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            CounterDescriptor.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a CounterDescriptor message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.CounterDescriptor
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.CounterDescriptor} CounterDescriptor
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CounterDescriptor.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.CounterDescriptor();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.type = r.int32();
                        break;
                    case 2:
                        if (!(m.categories && m.categories.length))
                            m.categories = [];
                        m.categories.push(r.string());
                        break;
                    case 3:
                        m.unit = r.int32();
                        break;
                    case 6:
                        m.unitName = r.string();
                        break;
                    case 4:
                        m.unitMultiplier = r.int64();
                        break;
                    case 5:
                        m.isIncremental = r.bool();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a CounterDescriptor message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.CounterDescriptor
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.CounterDescriptor} CounterDescriptor
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            CounterDescriptor.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a CounterDescriptor message.
             * @function verify
             * @memberof perfetto.protos.CounterDescriptor
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            CounterDescriptor.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.type != null && m.hasOwnProperty("type")) {
                    switch (m.type) {
                    default:
                        return "type: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                        break;
                    }
                }
                if (m.categories != null && m.hasOwnProperty("categories")) {
                    if (!Array.isArray(m.categories))
                        return "categories: array expected";
                    for (var i = 0; i < m.categories.length; ++i) {
                        if (!$util.isString(m.categories[i]))
                            return "categories: string[] expected";
                    }
                }
                if (m.unit != null && m.hasOwnProperty("unit")) {
                    switch (m.unit) {
                    default:
                        return "unit: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                        break;
                    }
                }
                if (m.unitName != null && m.hasOwnProperty("unitName")) {
                    if (!$util.isString(m.unitName))
                        return "unitName: string expected";
                }
                if (m.unitMultiplier != null && m.hasOwnProperty("unitMultiplier")) {
                    if (!$util.isInteger(m.unitMultiplier) && !(m.unitMultiplier && $util.isInteger(m.unitMultiplier.low) && $util.isInteger(m.unitMultiplier.high)))
                        return "unitMultiplier: integer|Long expected";
                }
                if (m.isIncremental != null && m.hasOwnProperty("isIncremental")) {
                    if (typeof m.isIncremental !== "boolean")
                        return "isIncremental: boolean expected";
                }
                return null;
            };

            /**
             * Creates a CounterDescriptor message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.CounterDescriptor
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.CounterDescriptor} CounterDescriptor
             */
            CounterDescriptor.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.CounterDescriptor)
                    return d;
                var m = new $root.perfetto.protos.CounterDescriptor();
                switch (d.type) {
                case "COUNTER_UNSPECIFIED":
                case 0:
                    m.type = 0;
                    break;
                case "COUNTER_THREAD_TIME_NS":
                case 1:
                    m.type = 1;
                    break;
                case "COUNTER_THREAD_INSTRUCTION_COUNT":
                case 2:
                    m.type = 2;
                    break;
                }
                if (d.categories) {
                    if (!Array.isArray(d.categories))
                        throw TypeError(".perfetto.protos.CounterDescriptor.categories: array expected");
                    m.categories = [];
                    for (var i = 0; i < d.categories.length; ++i) {
                        m.categories[i] = String(d.categories[i]);
                    }
                }
                switch (d.unit) {
                case "UNIT_UNSPECIFIED":
                case 0:
                    m.unit = 0;
                    break;
                case "UNIT_TIME_NS":
                case 1:
                    m.unit = 1;
                    break;
                case "UNIT_COUNT":
                case 2:
                    m.unit = 2;
                    break;
                case "UNIT_SIZE_BYTES":
                case 3:
                    m.unit = 3;
                    break;
                }
                if (d.unitName != null) {
                    m.unitName = String(d.unitName);
                }
                if (d.unitMultiplier != null) {
                    if ($util.Long)
                        (m.unitMultiplier = $util.Long.fromValue(d.unitMultiplier)).unsigned = false;
                    else if (typeof d.unitMultiplier === "string")
                        m.unitMultiplier = parseInt(d.unitMultiplier, 10);
                    else if (typeof d.unitMultiplier === "number")
                        m.unitMultiplier = d.unitMultiplier;
                    else if (typeof d.unitMultiplier === "object")
                        m.unitMultiplier = new $util.LongBits(d.unitMultiplier.low >>> 0, d.unitMultiplier.high >>> 0).toNumber();
                }
                if (d.isIncremental != null) {
                    m.isIncremental = Boolean(d.isIncremental);
                }
                return m;
            };

            /**
             * Creates a plain object from a CounterDescriptor message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.CounterDescriptor
             * @static
             * @param {perfetto.protos.CounterDescriptor} m CounterDescriptor
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            CounterDescriptor.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.categories = [];
                }
                if (o.defaults) {
                    d.type = o.enums === String ? "COUNTER_UNSPECIFIED" : 0;
                    d.unit = o.enums === String ? "UNIT_UNSPECIFIED" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.unitMultiplier = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.unitMultiplier = o.longs === String ? "0" : 0;
                    d.isIncremental = false;
                    d.unitName = "";
                }
                if (m.type != null && m.hasOwnProperty("type")) {
                    d.type = o.enums === String ? $root.perfetto.protos.CounterDescriptor.BuiltinCounterType[m.type] : m.type;
                }
                if (m.categories && m.categories.length) {
                    d.categories = [];
                    for (var j = 0; j < m.categories.length; ++j) {
                        d.categories[j] = m.categories[j];
                    }
                }
                if (m.unit != null && m.hasOwnProperty("unit")) {
                    d.unit = o.enums === String ? $root.perfetto.protos.CounterDescriptor.Unit[m.unit] : m.unit;
                }
                if (m.unitMultiplier != null && m.hasOwnProperty("unitMultiplier")) {
                    if (typeof m.unitMultiplier === "number")
                        d.unitMultiplier = o.longs === String ? String(m.unitMultiplier) : m.unitMultiplier;
                    else
                        d.unitMultiplier = o.longs === String ? $util.Long.prototype.toString.call(m.unitMultiplier) : o.longs === Number ? new $util.LongBits(m.unitMultiplier.low >>> 0, m.unitMultiplier.high >>> 0).toNumber() : m.unitMultiplier;
                }
                if (m.isIncremental != null && m.hasOwnProperty("isIncremental")) {
                    d.isIncremental = m.isIncremental;
                }
                if (m.unitName != null && m.hasOwnProperty("unitName")) {
                    d.unitName = m.unitName;
                }
                return d;
            };

            /**
             * Converts this CounterDescriptor to JSON.
             * @function toJSON
             * @memberof perfetto.protos.CounterDescriptor
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            CounterDescriptor.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * BuiltinCounterType enum.
             * @name perfetto.protos.CounterDescriptor.BuiltinCounterType
             * @enum {number}
             * @property {number} COUNTER_UNSPECIFIED=0 COUNTER_UNSPECIFIED value
             * @property {number} COUNTER_THREAD_TIME_NS=1 COUNTER_THREAD_TIME_NS value
             * @property {number} COUNTER_THREAD_INSTRUCTION_COUNT=2 COUNTER_THREAD_INSTRUCTION_COUNT value
             */
            CounterDescriptor.BuiltinCounterType = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "COUNTER_UNSPECIFIED"] = 0;
                values[valuesById[1] = "COUNTER_THREAD_TIME_NS"] = 1;
                values[valuesById[2] = "COUNTER_THREAD_INSTRUCTION_COUNT"] = 2;
                return values;
            })();

            /**
             * Unit enum.
             * @name perfetto.protos.CounterDescriptor.Unit
             * @enum {number}
             * @property {number} UNIT_UNSPECIFIED=0 UNIT_UNSPECIFIED value
             * @property {number} UNIT_TIME_NS=1 UNIT_TIME_NS value
             * @property {number} UNIT_COUNT=2 UNIT_COUNT value
             * @property {number} UNIT_SIZE_BYTES=3 UNIT_SIZE_BYTES value
             */
            CounterDescriptor.Unit = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "UNIT_UNSPECIFIED"] = 0;
                values[valuesById[1] = "UNIT_TIME_NS"] = 1;
                values[valuesById[2] = "UNIT_COUNT"] = 2;
                values[valuesById[3] = "UNIT_SIZE_BYTES"] = 3;
                return values;
            })();

            return CounterDescriptor;
        })();

        protos.TranslationTable = (function() {

            /**
             * Properties of a TranslationTable.
             * @memberof perfetto.protos
             * @interface ITranslationTable
             * @property {perfetto.protos.IChromeHistorgramTranslationTable|null} [chromeHistogram] TranslationTable chromeHistogram
             * @property {perfetto.protos.IChromeUserEventTranslationTable|null} [chromeUserEvent] TranslationTable chromeUserEvent
             * @property {perfetto.protos.IChromePerformanceMarkTranslationTable|null} [chromePerformanceMark] TranslationTable chromePerformanceMark
             * @property {perfetto.protos.ISliceNameTranslationTable|null} [sliceName] TranslationTable sliceName
             */

            /**
             * Constructs a new TranslationTable.
             * @memberof perfetto.protos
             * @classdesc Represents a TranslationTable.
             * @implements ITranslationTable
             * @constructor
             * @param {perfetto.protos.ITranslationTable=} [p] Properties to set
             */
            function TranslationTable(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TranslationTable chromeHistogram.
             * @member {perfetto.protos.IChromeHistorgramTranslationTable|null|undefined} chromeHistogram
             * @memberof perfetto.protos.TranslationTable
             * @instance
             */
            TranslationTable.prototype.chromeHistogram = null;

            /**
             * TranslationTable chromeUserEvent.
             * @member {perfetto.protos.IChromeUserEventTranslationTable|null|undefined} chromeUserEvent
             * @memberof perfetto.protos.TranslationTable
             * @instance
             */
            TranslationTable.prototype.chromeUserEvent = null;

            /**
             * TranslationTable chromePerformanceMark.
             * @member {perfetto.protos.IChromePerformanceMarkTranslationTable|null|undefined} chromePerformanceMark
             * @memberof perfetto.protos.TranslationTable
             * @instance
             */
            TranslationTable.prototype.chromePerformanceMark = null;

            /**
             * TranslationTable sliceName.
             * @member {perfetto.protos.ISliceNameTranslationTable|null|undefined} sliceName
             * @memberof perfetto.protos.TranslationTable
             * @instance
             */
            TranslationTable.prototype.sliceName = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * TranslationTable table.
             * @member {"chromeHistogram"|"chromeUserEvent"|"chromePerformanceMark"|"sliceName"|undefined} table
             * @memberof perfetto.protos.TranslationTable
             * @instance
             */
            Object.defineProperty(TranslationTable.prototype, "table", {
                get: $util.oneOfGetter($oneOfFields = ["chromeHistogram", "chromeUserEvent", "chromePerformanceMark", "sliceName"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new TranslationTable instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TranslationTable
             * @static
             * @param {perfetto.protos.ITranslationTable=} [properties] Properties to set
             * @returns {perfetto.protos.TranslationTable} TranslationTable instance
             */
            TranslationTable.create = function create(properties) {
                return new TranslationTable(properties);
            };

            /**
             * Encodes the specified TranslationTable message. Does not implicitly {@link perfetto.protos.TranslationTable.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TranslationTable
             * @static
             * @param {perfetto.protos.ITranslationTable} m TranslationTable message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TranslationTable.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.chromeHistogram != null && Object.hasOwnProperty.call(m, "chromeHistogram"))
                    $root.perfetto.protos.ChromeHistorgramTranslationTable.encode(m.chromeHistogram, w.uint32(10).fork()).ldelim();
                if (m.chromeUserEvent != null && Object.hasOwnProperty.call(m, "chromeUserEvent"))
                    $root.perfetto.protos.ChromeUserEventTranslationTable.encode(m.chromeUserEvent, w.uint32(18).fork()).ldelim();
                if (m.chromePerformanceMark != null && Object.hasOwnProperty.call(m, "chromePerformanceMark"))
                    $root.perfetto.protos.ChromePerformanceMarkTranslationTable.encode(m.chromePerformanceMark, w.uint32(26).fork()).ldelim();
                if (m.sliceName != null && Object.hasOwnProperty.call(m, "sliceName"))
                    $root.perfetto.protos.SliceNameTranslationTable.encode(m.sliceName, w.uint32(34).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified TranslationTable message, length delimited. Does not implicitly {@link perfetto.protos.TranslationTable.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TranslationTable
             * @static
             * @param {perfetto.protos.ITranslationTable} message TranslationTable message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TranslationTable.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TranslationTable message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TranslationTable
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TranslationTable} TranslationTable
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TranslationTable.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TranslationTable();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.chromeHistogram = $root.perfetto.protos.ChromeHistorgramTranslationTable.decode(r, r.uint32());
                        break;
                    case 2:
                        m.chromeUserEvent = $root.perfetto.protos.ChromeUserEventTranslationTable.decode(r, r.uint32());
                        break;
                    case 3:
                        m.chromePerformanceMark = $root.perfetto.protos.ChromePerformanceMarkTranslationTable.decode(r, r.uint32());
                        break;
                    case 4:
                        m.sliceName = $root.perfetto.protos.SliceNameTranslationTable.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TranslationTable message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TranslationTable
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TranslationTable} TranslationTable
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TranslationTable.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TranslationTable message.
             * @function verify
             * @memberof perfetto.protos.TranslationTable
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TranslationTable.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                var p = {};
                if (m.chromeHistogram != null && m.hasOwnProperty("chromeHistogram")) {
                    p.table = 1;
                    {
                        var e = $root.perfetto.protos.ChromeHistorgramTranslationTable.verify(m.chromeHistogram);
                        if (e)
                            return "chromeHistogram." + e;
                    }
                }
                if (m.chromeUserEvent != null && m.hasOwnProperty("chromeUserEvent")) {
                    if (p.table === 1)
                        return "table: multiple values";
                    p.table = 1;
                    {
                        var e = $root.perfetto.protos.ChromeUserEventTranslationTable.verify(m.chromeUserEvent);
                        if (e)
                            return "chromeUserEvent." + e;
                    }
                }
                if (m.chromePerformanceMark != null && m.hasOwnProperty("chromePerformanceMark")) {
                    if (p.table === 1)
                        return "table: multiple values";
                    p.table = 1;
                    {
                        var e = $root.perfetto.protos.ChromePerformanceMarkTranslationTable.verify(m.chromePerformanceMark);
                        if (e)
                            return "chromePerformanceMark." + e;
                    }
                }
                if (m.sliceName != null && m.hasOwnProperty("sliceName")) {
                    if (p.table === 1)
                        return "table: multiple values";
                    p.table = 1;
                    {
                        var e = $root.perfetto.protos.SliceNameTranslationTable.verify(m.sliceName);
                        if (e)
                            return "sliceName." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a TranslationTable message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TranslationTable
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TranslationTable} TranslationTable
             */
            TranslationTable.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TranslationTable)
                    return d;
                var m = new $root.perfetto.protos.TranslationTable();
                if (d.chromeHistogram != null) {
                    if (typeof d.chromeHistogram !== "object")
                        throw TypeError(".perfetto.protos.TranslationTable.chromeHistogram: object expected");
                    m.chromeHistogram = $root.perfetto.protos.ChromeHistorgramTranslationTable.fromObject(d.chromeHistogram);
                }
                if (d.chromeUserEvent != null) {
                    if (typeof d.chromeUserEvent !== "object")
                        throw TypeError(".perfetto.protos.TranslationTable.chromeUserEvent: object expected");
                    m.chromeUserEvent = $root.perfetto.protos.ChromeUserEventTranslationTable.fromObject(d.chromeUserEvent);
                }
                if (d.chromePerformanceMark != null) {
                    if (typeof d.chromePerformanceMark !== "object")
                        throw TypeError(".perfetto.protos.TranslationTable.chromePerformanceMark: object expected");
                    m.chromePerformanceMark = $root.perfetto.protos.ChromePerformanceMarkTranslationTable.fromObject(d.chromePerformanceMark);
                }
                if (d.sliceName != null) {
                    if (typeof d.sliceName !== "object")
                        throw TypeError(".perfetto.protos.TranslationTable.sliceName: object expected");
                    m.sliceName = $root.perfetto.protos.SliceNameTranslationTable.fromObject(d.sliceName);
                }
                return m;
            };

            /**
             * Creates a plain object from a TranslationTable message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TranslationTable
             * @static
             * @param {perfetto.protos.TranslationTable} m TranslationTable
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TranslationTable.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (m.chromeHistogram != null && m.hasOwnProperty("chromeHistogram")) {
                    d.chromeHistogram = $root.perfetto.protos.ChromeHistorgramTranslationTable.toObject(m.chromeHistogram, o);
                    if (o.oneofs)
                        d.table = "chromeHistogram";
                }
                if (m.chromeUserEvent != null && m.hasOwnProperty("chromeUserEvent")) {
                    d.chromeUserEvent = $root.perfetto.protos.ChromeUserEventTranslationTable.toObject(m.chromeUserEvent, o);
                    if (o.oneofs)
                        d.table = "chromeUserEvent";
                }
                if (m.chromePerformanceMark != null && m.hasOwnProperty("chromePerformanceMark")) {
                    d.chromePerformanceMark = $root.perfetto.protos.ChromePerformanceMarkTranslationTable.toObject(m.chromePerformanceMark, o);
                    if (o.oneofs)
                        d.table = "chromePerformanceMark";
                }
                if (m.sliceName != null && m.hasOwnProperty("sliceName")) {
                    d.sliceName = $root.perfetto.protos.SliceNameTranslationTable.toObject(m.sliceName, o);
                    if (o.oneofs)
                        d.table = "sliceName";
                }
                return d;
            };

            /**
             * Converts this TranslationTable to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TranslationTable
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TranslationTable.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TranslationTable;
        })();

        protos.ChromeHistorgramTranslationTable = (function() {

            /**
             * Properties of a ChromeHistorgramTranslationTable.
             * @memberof perfetto.protos
             * @interface IChromeHistorgramTranslationTable
             * @property {Object.<string,string>|null} [hashToName] ChromeHistorgramTranslationTable hashToName
             */

            /**
             * Constructs a new ChromeHistorgramTranslationTable.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeHistorgramTranslationTable.
             * @implements IChromeHistorgramTranslationTable
             * @constructor
             * @param {perfetto.protos.IChromeHistorgramTranslationTable=} [p] Properties to set
             */
            function ChromeHistorgramTranslationTable(p) {
                this.hashToName = {};
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeHistorgramTranslationTable hashToName.
             * @member {Object.<string,string>} hashToName
             * @memberof perfetto.protos.ChromeHistorgramTranslationTable
             * @instance
             */
            ChromeHistorgramTranslationTable.prototype.hashToName = $util.emptyObject;

            /**
             * Creates a new ChromeHistorgramTranslationTable instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeHistorgramTranslationTable
             * @static
             * @param {perfetto.protos.IChromeHistorgramTranslationTable=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeHistorgramTranslationTable} ChromeHistorgramTranslationTable instance
             */
            ChromeHistorgramTranslationTable.create = function create(properties) {
                return new ChromeHistorgramTranslationTable(properties);
            };

            /**
             * Encodes the specified ChromeHistorgramTranslationTable message. Does not implicitly {@link perfetto.protos.ChromeHistorgramTranslationTable.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeHistorgramTranslationTable
             * @static
             * @param {perfetto.protos.IChromeHistorgramTranslationTable} m ChromeHistorgramTranslationTable message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeHistorgramTranslationTable.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.hashToName != null && Object.hasOwnProperty.call(m, "hashToName")) {
                    for (var ks = Object.keys(m.hashToName), i = 0; i < ks.length; ++i) {
                        w.uint32(10).fork().uint32(8).uint64(ks[i]).uint32(18).string(m.hashToName[ks[i]]).ldelim();
                    }
                }
                return w;
            };

            /**
             * Encodes the specified ChromeHistorgramTranslationTable message, length delimited. Does not implicitly {@link perfetto.protos.ChromeHistorgramTranslationTable.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeHistorgramTranslationTable
             * @static
             * @param {perfetto.protos.IChromeHistorgramTranslationTable} message ChromeHistorgramTranslationTable message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeHistorgramTranslationTable.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeHistorgramTranslationTable message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeHistorgramTranslationTable
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeHistorgramTranslationTable} ChromeHistorgramTranslationTable
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeHistorgramTranslationTable.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeHistorgramTranslationTable(), k, value;
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (m.hashToName === $util.emptyObject)
                            m.hashToName = {};
                        var c2 = r.uint32() + r.pos;
                        k = 0;
                        value = "";
                        while (r.pos < c2) {
                            var tag2 = r.uint32();
                            switch (tag2 >>> 3) {
                            case 1:
                                k = r.uint64();
                                break;
                            case 2:
                                value = r.string();
                                break;
                            default:
                                r.skipType(tag2 & 7);
                                break;
                            }
                        }
                        m.hashToName[typeof k === "object" ? $util.longToHash(k) : k] = value;
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeHistorgramTranslationTable message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeHistorgramTranslationTable
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeHistorgramTranslationTable} ChromeHistorgramTranslationTable
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeHistorgramTranslationTable.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeHistorgramTranslationTable message.
             * @function verify
             * @memberof perfetto.protos.ChromeHistorgramTranslationTable
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeHistorgramTranslationTable.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.hashToName != null && m.hasOwnProperty("hashToName")) {
                    if (!$util.isObject(m.hashToName))
                        return "hashToName: object expected";
                    var k = Object.keys(m.hashToName);
                    for (var i = 0; i < k.length; ++i) {
                        if (!$util.key64Re.test(k[i]))
                            return "hashToName: integer|Long key{k:uint64} expected";
                        if (!$util.isString(m.hashToName[k[i]]))
                            return "hashToName: string{k:uint64} expected";
                    }
                }
                return null;
            };

            /**
             * Creates a ChromeHistorgramTranslationTable message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeHistorgramTranslationTable
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeHistorgramTranslationTable} ChromeHistorgramTranslationTable
             */
            ChromeHistorgramTranslationTable.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeHistorgramTranslationTable)
                    return d;
                var m = new $root.perfetto.protos.ChromeHistorgramTranslationTable();
                if (d.hashToName) {
                    if (typeof d.hashToName !== "object")
                        throw TypeError(".perfetto.protos.ChromeHistorgramTranslationTable.hashToName: object expected");
                    m.hashToName = {};
                    for (var ks = Object.keys(d.hashToName), i = 0; i < ks.length; ++i) {
                        m.hashToName[ks[i]] = String(d.hashToName[ks[i]]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeHistorgramTranslationTable message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeHistorgramTranslationTable
             * @static
             * @param {perfetto.protos.ChromeHistorgramTranslationTable} m ChromeHistorgramTranslationTable
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeHistorgramTranslationTable.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.objects || o.defaults) {
                    d.hashToName = {};
                }
                var ks2;
                if (m.hashToName && (ks2 = Object.keys(m.hashToName)).length) {
                    d.hashToName = {};
                    for (var j = 0; j < ks2.length; ++j) {
                        d.hashToName[ks2[j]] = m.hashToName[ks2[j]];
                    }
                }
                return d;
            };

            /**
             * Converts this ChromeHistorgramTranslationTable to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeHistorgramTranslationTable
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeHistorgramTranslationTable.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ChromeHistorgramTranslationTable;
        })();

        protos.ChromeUserEventTranslationTable = (function() {

            /**
             * Properties of a ChromeUserEventTranslationTable.
             * @memberof perfetto.protos
             * @interface IChromeUserEventTranslationTable
             * @property {Object.<string,string>|null} [actionHashToName] ChromeUserEventTranslationTable actionHashToName
             */

            /**
             * Constructs a new ChromeUserEventTranslationTable.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromeUserEventTranslationTable.
             * @implements IChromeUserEventTranslationTable
             * @constructor
             * @param {perfetto.protos.IChromeUserEventTranslationTable=} [p] Properties to set
             */
            function ChromeUserEventTranslationTable(p) {
                this.actionHashToName = {};
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromeUserEventTranslationTable actionHashToName.
             * @member {Object.<string,string>} actionHashToName
             * @memberof perfetto.protos.ChromeUserEventTranslationTable
             * @instance
             */
            ChromeUserEventTranslationTable.prototype.actionHashToName = $util.emptyObject;

            /**
             * Creates a new ChromeUserEventTranslationTable instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromeUserEventTranslationTable
             * @static
             * @param {perfetto.protos.IChromeUserEventTranslationTable=} [properties] Properties to set
             * @returns {perfetto.protos.ChromeUserEventTranslationTable} ChromeUserEventTranslationTable instance
             */
            ChromeUserEventTranslationTable.create = function create(properties) {
                return new ChromeUserEventTranslationTable(properties);
            };

            /**
             * Encodes the specified ChromeUserEventTranslationTable message. Does not implicitly {@link perfetto.protos.ChromeUserEventTranslationTable.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromeUserEventTranslationTable
             * @static
             * @param {perfetto.protos.IChromeUserEventTranslationTable} m ChromeUserEventTranslationTable message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeUserEventTranslationTable.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.actionHashToName != null && Object.hasOwnProperty.call(m, "actionHashToName")) {
                    for (var ks = Object.keys(m.actionHashToName), i = 0; i < ks.length; ++i) {
                        w.uint32(10).fork().uint32(8).uint64(ks[i]).uint32(18).string(m.actionHashToName[ks[i]]).ldelim();
                    }
                }
                return w;
            };

            /**
             * Encodes the specified ChromeUserEventTranslationTable message, length delimited. Does not implicitly {@link perfetto.protos.ChromeUserEventTranslationTable.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromeUserEventTranslationTable
             * @static
             * @param {perfetto.protos.IChromeUserEventTranslationTable} message ChromeUserEventTranslationTable message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromeUserEventTranslationTable.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromeUserEventTranslationTable message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromeUserEventTranslationTable
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromeUserEventTranslationTable} ChromeUserEventTranslationTable
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeUserEventTranslationTable.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromeUserEventTranslationTable(), k, value;
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (m.actionHashToName === $util.emptyObject)
                            m.actionHashToName = {};
                        var c2 = r.uint32() + r.pos;
                        k = 0;
                        value = "";
                        while (r.pos < c2) {
                            var tag2 = r.uint32();
                            switch (tag2 >>> 3) {
                            case 1:
                                k = r.uint64();
                                break;
                            case 2:
                                value = r.string();
                                break;
                            default:
                                r.skipType(tag2 & 7);
                                break;
                            }
                        }
                        m.actionHashToName[typeof k === "object" ? $util.longToHash(k) : k] = value;
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromeUserEventTranslationTable message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromeUserEventTranslationTable
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromeUserEventTranslationTable} ChromeUserEventTranslationTable
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromeUserEventTranslationTable.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromeUserEventTranslationTable message.
             * @function verify
             * @memberof perfetto.protos.ChromeUserEventTranslationTable
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromeUserEventTranslationTable.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.actionHashToName != null && m.hasOwnProperty("actionHashToName")) {
                    if (!$util.isObject(m.actionHashToName))
                        return "actionHashToName: object expected";
                    var k = Object.keys(m.actionHashToName);
                    for (var i = 0; i < k.length; ++i) {
                        if (!$util.key64Re.test(k[i]))
                            return "actionHashToName: integer|Long key{k:uint64} expected";
                        if (!$util.isString(m.actionHashToName[k[i]]))
                            return "actionHashToName: string{k:uint64} expected";
                    }
                }
                return null;
            };

            /**
             * Creates a ChromeUserEventTranslationTable message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromeUserEventTranslationTable
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromeUserEventTranslationTable} ChromeUserEventTranslationTable
             */
            ChromeUserEventTranslationTable.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromeUserEventTranslationTable)
                    return d;
                var m = new $root.perfetto.protos.ChromeUserEventTranslationTable();
                if (d.actionHashToName) {
                    if (typeof d.actionHashToName !== "object")
                        throw TypeError(".perfetto.protos.ChromeUserEventTranslationTable.actionHashToName: object expected");
                    m.actionHashToName = {};
                    for (var ks = Object.keys(d.actionHashToName), i = 0; i < ks.length; ++i) {
                        m.actionHashToName[ks[i]] = String(d.actionHashToName[ks[i]]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromeUserEventTranslationTable message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromeUserEventTranslationTable
             * @static
             * @param {perfetto.protos.ChromeUserEventTranslationTable} m ChromeUserEventTranslationTable
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromeUserEventTranslationTable.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.objects || o.defaults) {
                    d.actionHashToName = {};
                }
                var ks2;
                if (m.actionHashToName && (ks2 = Object.keys(m.actionHashToName)).length) {
                    d.actionHashToName = {};
                    for (var j = 0; j < ks2.length; ++j) {
                        d.actionHashToName[ks2[j]] = m.actionHashToName[ks2[j]];
                    }
                }
                return d;
            };

            /**
             * Converts this ChromeUserEventTranslationTable to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromeUserEventTranslationTable
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromeUserEventTranslationTable.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ChromeUserEventTranslationTable;
        })();

        protos.ChromePerformanceMarkTranslationTable = (function() {

            /**
             * Properties of a ChromePerformanceMarkTranslationTable.
             * @memberof perfetto.protos
             * @interface IChromePerformanceMarkTranslationTable
             * @property {Object.<string,string>|null} [siteHashToName] ChromePerformanceMarkTranslationTable siteHashToName
             * @property {Object.<string,string>|null} [markHashToName] ChromePerformanceMarkTranslationTable markHashToName
             */

            /**
             * Constructs a new ChromePerformanceMarkTranslationTable.
             * @memberof perfetto.protos
             * @classdesc Represents a ChromePerformanceMarkTranslationTable.
             * @implements IChromePerformanceMarkTranslationTable
             * @constructor
             * @param {perfetto.protos.IChromePerformanceMarkTranslationTable=} [p] Properties to set
             */
            function ChromePerformanceMarkTranslationTable(p) {
                this.siteHashToName = {};
                this.markHashToName = {};
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ChromePerformanceMarkTranslationTable siteHashToName.
             * @member {Object.<string,string>} siteHashToName
             * @memberof perfetto.protos.ChromePerformanceMarkTranslationTable
             * @instance
             */
            ChromePerformanceMarkTranslationTable.prototype.siteHashToName = $util.emptyObject;

            /**
             * ChromePerformanceMarkTranslationTable markHashToName.
             * @member {Object.<string,string>} markHashToName
             * @memberof perfetto.protos.ChromePerformanceMarkTranslationTable
             * @instance
             */
            ChromePerformanceMarkTranslationTable.prototype.markHashToName = $util.emptyObject;

            /**
             * Creates a new ChromePerformanceMarkTranslationTable instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ChromePerformanceMarkTranslationTable
             * @static
             * @param {perfetto.protos.IChromePerformanceMarkTranslationTable=} [properties] Properties to set
             * @returns {perfetto.protos.ChromePerformanceMarkTranslationTable} ChromePerformanceMarkTranslationTable instance
             */
            ChromePerformanceMarkTranslationTable.create = function create(properties) {
                return new ChromePerformanceMarkTranslationTable(properties);
            };

            /**
             * Encodes the specified ChromePerformanceMarkTranslationTable message. Does not implicitly {@link perfetto.protos.ChromePerformanceMarkTranslationTable.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ChromePerformanceMarkTranslationTable
             * @static
             * @param {perfetto.protos.IChromePerformanceMarkTranslationTable} m ChromePerformanceMarkTranslationTable message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromePerformanceMarkTranslationTable.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.siteHashToName != null && Object.hasOwnProperty.call(m, "siteHashToName")) {
                    for (var ks = Object.keys(m.siteHashToName), i = 0; i < ks.length; ++i) {
                        w.uint32(10).fork().uint32(8).uint32(ks[i]).uint32(18).string(m.siteHashToName[ks[i]]).ldelim();
                    }
                }
                if (m.markHashToName != null && Object.hasOwnProperty.call(m, "markHashToName")) {
                    for (var ks = Object.keys(m.markHashToName), i = 0; i < ks.length; ++i) {
                        w.uint32(18).fork().uint32(8).uint32(ks[i]).uint32(18).string(m.markHashToName[ks[i]]).ldelim();
                    }
                }
                return w;
            };

            /**
             * Encodes the specified ChromePerformanceMarkTranslationTable message, length delimited. Does not implicitly {@link perfetto.protos.ChromePerformanceMarkTranslationTable.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ChromePerformanceMarkTranslationTable
             * @static
             * @param {perfetto.protos.IChromePerformanceMarkTranslationTable} message ChromePerformanceMarkTranslationTable message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ChromePerformanceMarkTranslationTable.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ChromePerformanceMarkTranslationTable message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ChromePerformanceMarkTranslationTable
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ChromePerformanceMarkTranslationTable} ChromePerformanceMarkTranslationTable
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromePerformanceMarkTranslationTable.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ChromePerformanceMarkTranslationTable(), k, value;
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (m.siteHashToName === $util.emptyObject)
                            m.siteHashToName = {};
                        var c2 = r.uint32() + r.pos;
                        k = 0;
                        value = "";
                        while (r.pos < c2) {
                            var tag2 = r.uint32();
                            switch (tag2 >>> 3) {
                            case 1:
                                k = r.uint32();
                                break;
                            case 2:
                                value = r.string();
                                break;
                            default:
                                r.skipType(tag2 & 7);
                                break;
                            }
                        }
                        m.siteHashToName[k] = value;
                        break;
                    case 2:
                        if (m.markHashToName === $util.emptyObject)
                            m.markHashToName = {};
                        var c2 = r.uint32() + r.pos;
                        k = 0;
                        value = "";
                        while (r.pos < c2) {
                            var tag2 = r.uint32();
                            switch (tag2 >>> 3) {
                            case 1:
                                k = r.uint32();
                                break;
                            case 2:
                                value = r.string();
                                break;
                            default:
                                r.skipType(tag2 & 7);
                                break;
                            }
                        }
                        m.markHashToName[k] = value;
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ChromePerformanceMarkTranslationTable message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ChromePerformanceMarkTranslationTable
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ChromePerformanceMarkTranslationTable} ChromePerformanceMarkTranslationTable
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ChromePerformanceMarkTranslationTable.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ChromePerformanceMarkTranslationTable message.
             * @function verify
             * @memberof perfetto.protos.ChromePerformanceMarkTranslationTable
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ChromePerformanceMarkTranslationTable.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.siteHashToName != null && m.hasOwnProperty("siteHashToName")) {
                    if (!$util.isObject(m.siteHashToName))
                        return "siteHashToName: object expected";
                    var k = Object.keys(m.siteHashToName);
                    for (var i = 0; i < k.length; ++i) {
                        if (!$util.key32Re.test(k[i]))
                            return "siteHashToName: integer key{k:uint32} expected";
                        if (!$util.isString(m.siteHashToName[k[i]]))
                            return "siteHashToName: string{k:uint32} expected";
                    }
                }
                if (m.markHashToName != null && m.hasOwnProperty("markHashToName")) {
                    if (!$util.isObject(m.markHashToName))
                        return "markHashToName: object expected";
                    var k = Object.keys(m.markHashToName);
                    for (var i = 0; i < k.length; ++i) {
                        if (!$util.key32Re.test(k[i]))
                            return "markHashToName: integer key{k:uint32} expected";
                        if (!$util.isString(m.markHashToName[k[i]]))
                            return "markHashToName: string{k:uint32} expected";
                    }
                }
                return null;
            };

            /**
             * Creates a ChromePerformanceMarkTranslationTable message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ChromePerformanceMarkTranslationTable
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ChromePerformanceMarkTranslationTable} ChromePerformanceMarkTranslationTable
             */
            ChromePerformanceMarkTranslationTable.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ChromePerformanceMarkTranslationTable)
                    return d;
                var m = new $root.perfetto.protos.ChromePerformanceMarkTranslationTable();
                if (d.siteHashToName) {
                    if (typeof d.siteHashToName !== "object")
                        throw TypeError(".perfetto.protos.ChromePerformanceMarkTranslationTable.siteHashToName: object expected");
                    m.siteHashToName = {};
                    for (var ks = Object.keys(d.siteHashToName), i = 0; i < ks.length; ++i) {
                        m.siteHashToName[ks[i]] = String(d.siteHashToName[ks[i]]);
                    }
                }
                if (d.markHashToName) {
                    if (typeof d.markHashToName !== "object")
                        throw TypeError(".perfetto.protos.ChromePerformanceMarkTranslationTable.markHashToName: object expected");
                    m.markHashToName = {};
                    for (var ks = Object.keys(d.markHashToName), i = 0; i < ks.length; ++i) {
                        m.markHashToName[ks[i]] = String(d.markHashToName[ks[i]]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a ChromePerformanceMarkTranslationTable message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ChromePerformanceMarkTranslationTable
             * @static
             * @param {perfetto.protos.ChromePerformanceMarkTranslationTable} m ChromePerformanceMarkTranslationTable
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ChromePerformanceMarkTranslationTable.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.objects || o.defaults) {
                    d.siteHashToName = {};
                    d.markHashToName = {};
                }
                var ks2;
                if (m.siteHashToName && (ks2 = Object.keys(m.siteHashToName)).length) {
                    d.siteHashToName = {};
                    for (var j = 0; j < ks2.length; ++j) {
                        d.siteHashToName[ks2[j]] = m.siteHashToName[ks2[j]];
                    }
                }
                if (m.markHashToName && (ks2 = Object.keys(m.markHashToName)).length) {
                    d.markHashToName = {};
                    for (var j = 0; j < ks2.length; ++j) {
                        d.markHashToName[ks2[j]] = m.markHashToName[ks2[j]];
                    }
                }
                return d;
            };

            /**
             * Converts this ChromePerformanceMarkTranslationTable to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ChromePerformanceMarkTranslationTable
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ChromePerformanceMarkTranslationTable.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ChromePerformanceMarkTranslationTable;
        })();

        protos.SliceNameTranslationTable = (function() {

            /**
             * Properties of a SliceNameTranslationTable.
             * @memberof perfetto.protos
             * @interface ISliceNameTranslationTable
             * @property {Object.<string,string>|null} [rawToDeobfuscatedName] SliceNameTranslationTable rawToDeobfuscatedName
             */

            /**
             * Constructs a new SliceNameTranslationTable.
             * @memberof perfetto.protos
             * @classdesc Represents a SliceNameTranslationTable.
             * @implements ISliceNameTranslationTable
             * @constructor
             * @param {perfetto.protos.ISliceNameTranslationTable=} [p] Properties to set
             */
            function SliceNameTranslationTable(p) {
                this.rawToDeobfuscatedName = {};
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * SliceNameTranslationTable rawToDeobfuscatedName.
             * @member {Object.<string,string>} rawToDeobfuscatedName
             * @memberof perfetto.protos.SliceNameTranslationTable
             * @instance
             */
            SliceNameTranslationTable.prototype.rawToDeobfuscatedName = $util.emptyObject;

            /**
             * Creates a new SliceNameTranslationTable instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.SliceNameTranslationTable
             * @static
             * @param {perfetto.protos.ISliceNameTranslationTable=} [properties] Properties to set
             * @returns {perfetto.protos.SliceNameTranslationTable} SliceNameTranslationTable instance
             */
            SliceNameTranslationTable.create = function create(properties) {
                return new SliceNameTranslationTable(properties);
            };

            /**
             * Encodes the specified SliceNameTranslationTable message. Does not implicitly {@link perfetto.protos.SliceNameTranslationTable.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.SliceNameTranslationTable
             * @static
             * @param {perfetto.protos.ISliceNameTranslationTable} m SliceNameTranslationTable message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SliceNameTranslationTable.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.rawToDeobfuscatedName != null && Object.hasOwnProperty.call(m, "rawToDeobfuscatedName")) {
                    for (var ks = Object.keys(m.rawToDeobfuscatedName), i = 0; i < ks.length; ++i) {
                        w.uint32(10).fork().uint32(10).string(ks[i]).uint32(18).string(m.rawToDeobfuscatedName[ks[i]]).ldelim();
                    }
                }
                return w;
            };

            /**
             * Encodes the specified SliceNameTranslationTable message, length delimited. Does not implicitly {@link perfetto.protos.SliceNameTranslationTable.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.SliceNameTranslationTable
             * @static
             * @param {perfetto.protos.ISliceNameTranslationTable} message SliceNameTranslationTable message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            SliceNameTranslationTable.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a SliceNameTranslationTable message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.SliceNameTranslationTable
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.SliceNameTranslationTable} SliceNameTranslationTable
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SliceNameTranslationTable.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.SliceNameTranslationTable(), k, value;
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (m.rawToDeobfuscatedName === $util.emptyObject)
                            m.rawToDeobfuscatedName = {};
                        var c2 = r.uint32() + r.pos;
                        k = "";
                        value = "";
                        while (r.pos < c2) {
                            var tag2 = r.uint32();
                            switch (tag2 >>> 3) {
                            case 1:
                                k = r.string();
                                break;
                            case 2:
                                value = r.string();
                                break;
                            default:
                                r.skipType(tag2 & 7);
                                break;
                            }
                        }
                        m.rawToDeobfuscatedName[k] = value;
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a SliceNameTranslationTable message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.SliceNameTranslationTable
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.SliceNameTranslationTable} SliceNameTranslationTable
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            SliceNameTranslationTable.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a SliceNameTranslationTable message.
             * @function verify
             * @memberof perfetto.protos.SliceNameTranslationTable
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            SliceNameTranslationTable.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.rawToDeobfuscatedName != null && m.hasOwnProperty("rawToDeobfuscatedName")) {
                    if (!$util.isObject(m.rawToDeobfuscatedName))
                        return "rawToDeobfuscatedName: object expected";
                    var k = Object.keys(m.rawToDeobfuscatedName);
                    for (var i = 0; i < k.length; ++i) {
                        if (!$util.isString(m.rawToDeobfuscatedName[k[i]]))
                            return "rawToDeobfuscatedName: string{k:string} expected";
                    }
                }
                return null;
            };

            /**
             * Creates a SliceNameTranslationTable message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.SliceNameTranslationTable
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.SliceNameTranslationTable} SliceNameTranslationTable
             */
            SliceNameTranslationTable.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.SliceNameTranslationTable)
                    return d;
                var m = new $root.perfetto.protos.SliceNameTranslationTable();
                if (d.rawToDeobfuscatedName) {
                    if (typeof d.rawToDeobfuscatedName !== "object")
                        throw TypeError(".perfetto.protos.SliceNameTranslationTable.rawToDeobfuscatedName: object expected");
                    m.rawToDeobfuscatedName = {};
                    for (var ks = Object.keys(d.rawToDeobfuscatedName), i = 0; i < ks.length; ++i) {
                        m.rawToDeobfuscatedName[ks[i]] = String(d.rawToDeobfuscatedName[ks[i]]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a SliceNameTranslationTable message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.SliceNameTranslationTable
             * @static
             * @param {perfetto.protos.SliceNameTranslationTable} m SliceNameTranslationTable
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            SliceNameTranslationTable.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.objects || o.defaults) {
                    d.rawToDeobfuscatedName = {};
                }
                var ks2;
                if (m.rawToDeobfuscatedName && (ks2 = Object.keys(m.rawToDeobfuscatedName)).length) {
                    d.rawToDeobfuscatedName = {};
                    for (var j = 0; j < ks2.length; ++j) {
                        d.rawToDeobfuscatedName[ks2[j]] = m.rawToDeobfuscatedName[ks2[j]];
                    }
                }
                return d;
            };

            /**
             * Converts this SliceNameTranslationTable to JSON.
             * @function toJSON
             * @memberof perfetto.protos.SliceNameTranslationTable
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            SliceNameTranslationTable.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return SliceNameTranslationTable;
        })();

        protos.Trigger = (function() {

            /**
             * Properties of a Trigger.
             * @memberof perfetto.protos
             * @interface ITrigger
             * @property {string|null} [triggerName] Trigger triggerName
             * @property {string|null} [producerName] Trigger producerName
             * @property {number|null} [trustedProducerUid] Trigger trustedProducerUid
             */

            /**
             * Constructs a new Trigger.
             * @memberof perfetto.protos
             * @classdesc Represents a Trigger.
             * @implements ITrigger
             * @constructor
             * @param {perfetto.protos.ITrigger=} [p] Properties to set
             */
            function Trigger(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Trigger triggerName.
             * @member {string} triggerName
             * @memberof perfetto.protos.Trigger
             * @instance
             */
            Trigger.prototype.triggerName = "";

            /**
             * Trigger producerName.
             * @member {string} producerName
             * @memberof perfetto.protos.Trigger
             * @instance
             */
            Trigger.prototype.producerName = "";

            /**
             * Trigger trustedProducerUid.
             * @member {number} trustedProducerUid
             * @memberof perfetto.protos.Trigger
             * @instance
             */
            Trigger.prototype.trustedProducerUid = 0;

            /**
             * Creates a new Trigger instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.Trigger
             * @static
             * @param {perfetto.protos.ITrigger=} [properties] Properties to set
             * @returns {perfetto.protos.Trigger} Trigger instance
             */
            Trigger.create = function create(properties) {
                return new Trigger(properties);
            };

            /**
             * Encodes the specified Trigger message. Does not implicitly {@link perfetto.protos.Trigger.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.Trigger
             * @static
             * @param {perfetto.protos.ITrigger} m Trigger message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Trigger.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.triggerName != null && Object.hasOwnProperty.call(m, "triggerName"))
                    w.uint32(10).string(m.triggerName);
                if (m.producerName != null && Object.hasOwnProperty.call(m, "producerName"))
                    w.uint32(18).string(m.producerName);
                if (m.trustedProducerUid != null && Object.hasOwnProperty.call(m, "trustedProducerUid"))
                    w.uint32(24).int32(m.trustedProducerUid);
                return w;
            };

            /**
             * Encodes the specified Trigger message, length delimited. Does not implicitly {@link perfetto.protos.Trigger.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.Trigger
             * @static
             * @param {perfetto.protos.ITrigger} message Trigger message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Trigger.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a Trigger message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.Trigger
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.Trigger} Trigger
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Trigger.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.Trigger();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.triggerName = r.string();
                        break;
                    case 2:
                        m.producerName = r.string();
                        break;
                    case 3:
                        m.trustedProducerUid = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a Trigger message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.Trigger
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.Trigger} Trigger
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Trigger.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a Trigger message.
             * @function verify
             * @memberof perfetto.protos.Trigger
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Trigger.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.triggerName != null && m.hasOwnProperty("triggerName")) {
                    if (!$util.isString(m.triggerName))
                        return "triggerName: string expected";
                }
                if (m.producerName != null && m.hasOwnProperty("producerName")) {
                    if (!$util.isString(m.producerName))
                        return "producerName: string expected";
                }
                if (m.trustedProducerUid != null && m.hasOwnProperty("trustedProducerUid")) {
                    if (!$util.isInteger(m.trustedProducerUid))
                        return "trustedProducerUid: integer expected";
                }
                return null;
            };

            /**
             * Creates a Trigger message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.Trigger
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.Trigger} Trigger
             */
            Trigger.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.Trigger)
                    return d;
                var m = new $root.perfetto.protos.Trigger();
                if (d.triggerName != null) {
                    m.triggerName = String(d.triggerName);
                }
                if (d.producerName != null) {
                    m.producerName = String(d.producerName);
                }
                if (d.trustedProducerUid != null) {
                    m.trustedProducerUid = d.trustedProducerUid | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a Trigger message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.Trigger
             * @static
             * @param {perfetto.protos.Trigger} m Trigger
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Trigger.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.triggerName = "";
                    d.producerName = "";
                    d.trustedProducerUid = 0;
                }
                if (m.triggerName != null && m.hasOwnProperty("triggerName")) {
                    d.triggerName = m.triggerName;
                }
                if (m.producerName != null && m.hasOwnProperty("producerName")) {
                    d.producerName = m.producerName;
                }
                if (m.trustedProducerUid != null && m.hasOwnProperty("trustedProducerUid")) {
                    d.trustedProducerUid = m.trustedProducerUid;
                }
                return d;
            };

            /**
             * Converts this Trigger to JSON.
             * @function toJSON
             * @memberof perfetto.protos.Trigger
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Trigger.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return Trigger;
        })();

        protos.TestEvent = (function() {

            /**
             * Properties of a TestEvent.
             * @memberof perfetto.protos
             * @interface ITestEvent
             * @property {string|null} [str] TestEvent str
             * @property {number|null} [seqValue] TestEvent seqValue
             * @property {number|null} [counter] TestEvent counter
             * @property {boolean|null} [isLast] TestEvent isLast
             * @property {perfetto.protos.TestEvent.ITestPayload|null} [payload] TestEvent payload
             */

            /**
             * Constructs a new TestEvent.
             * @memberof perfetto.protos
             * @classdesc Represents a TestEvent.
             * @implements ITestEvent
             * @constructor
             * @param {perfetto.protos.ITestEvent=} [p] Properties to set
             */
            function TestEvent(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TestEvent str.
             * @member {string} str
             * @memberof perfetto.protos.TestEvent
             * @instance
             */
            TestEvent.prototype.str = "";

            /**
             * TestEvent seqValue.
             * @member {number} seqValue
             * @memberof perfetto.protos.TestEvent
             * @instance
             */
            TestEvent.prototype.seqValue = 0;

            /**
             * TestEvent counter.
             * @member {number} counter
             * @memberof perfetto.protos.TestEvent
             * @instance
             */
            TestEvent.prototype.counter = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

            /**
             * TestEvent isLast.
             * @member {boolean} isLast
             * @memberof perfetto.protos.TestEvent
             * @instance
             */
            TestEvent.prototype.isLast = false;

            /**
             * TestEvent payload.
             * @member {perfetto.protos.TestEvent.ITestPayload|null|undefined} payload
             * @memberof perfetto.protos.TestEvent
             * @instance
             */
            TestEvent.prototype.payload = null;

            /**
             * Creates a new TestEvent instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TestEvent
             * @static
             * @param {perfetto.protos.ITestEvent=} [properties] Properties to set
             * @returns {perfetto.protos.TestEvent} TestEvent instance
             */
            TestEvent.create = function create(properties) {
                return new TestEvent(properties);
            };

            /**
             * Encodes the specified TestEvent message. Does not implicitly {@link perfetto.protos.TestEvent.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TestEvent
             * @static
             * @param {perfetto.protos.ITestEvent} m TestEvent message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TestEvent.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.str != null && Object.hasOwnProperty.call(m, "str"))
                    w.uint32(10).string(m.str);
                if (m.seqValue != null && Object.hasOwnProperty.call(m, "seqValue"))
                    w.uint32(16).uint32(m.seqValue);
                if (m.counter != null && Object.hasOwnProperty.call(m, "counter"))
                    w.uint32(24).uint64(m.counter);
                if (m.isLast != null && Object.hasOwnProperty.call(m, "isLast"))
                    w.uint32(32).bool(m.isLast);
                if (m.payload != null && Object.hasOwnProperty.call(m, "payload"))
                    $root.perfetto.protos.TestEvent.TestPayload.encode(m.payload, w.uint32(42).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified TestEvent message, length delimited. Does not implicitly {@link perfetto.protos.TestEvent.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TestEvent
             * @static
             * @param {perfetto.protos.ITestEvent} message TestEvent message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TestEvent.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TestEvent message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TestEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TestEvent} TestEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TestEvent.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TestEvent();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.str = r.string();
                        break;
                    case 2:
                        m.seqValue = r.uint32();
                        break;
                    case 3:
                        m.counter = r.uint64();
                        break;
                    case 4:
                        m.isLast = r.bool();
                        break;
                    case 5:
                        m.payload = $root.perfetto.protos.TestEvent.TestPayload.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TestEvent message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TestEvent
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TestEvent} TestEvent
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TestEvent.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TestEvent message.
             * @function verify
             * @memberof perfetto.protos.TestEvent
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TestEvent.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.str != null && m.hasOwnProperty("str")) {
                    if (!$util.isString(m.str))
                        return "str: string expected";
                }
                if (m.seqValue != null && m.hasOwnProperty("seqValue")) {
                    if (!$util.isInteger(m.seqValue))
                        return "seqValue: integer expected";
                }
                if (m.counter != null && m.hasOwnProperty("counter")) {
                    if (!$util.isInteger(m.counter) && !(m.counter && $util.isInteger(m.counter.low) && $util.isInteger(m.counter.high)))
                        return "counter: integer|Long expected";
                }
                if (m.isLast != null && m.hasOwnProperty("isLast")) {
                    if (typeof m.isLast !== "boolean")
                        return "isLast: boolean expected";
                }
                if (m.payload != null && m.hasOwnProperty("payload")) {
                    {
                        var e = $root.perfetto.protos.TestEvent.TestPayload.verify(m.payload);
                        if (e)
                            return "payload." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a TestEvent message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TestEvent
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TestEvent} TestEvent
             */
            TestEvent.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TestEvent)
                    return d;
                var m = new $root.perfetto.protos.TestEvent();
                if (d.str != null) {
                    m.str = String(d.str);
                }
                if (d.seqValue != null) {
                    m.seqValue = d.seqValue >>> 0;
                }
                if (d.counter != null) {
                    if ($util.Long)
                        (m.counter = $util.Long.fromValue(d.counter)).unsigned = true;
                    else if (typeof d.counter === "string")
                        m.counter = parseInt(d.counter, 10);
                    else if (typeof d.counter === "number")
                        m.counter = d.counter;
                    else if (typeof d.counter === "object")
                        m.counter = new $util.LongBits(d.counter.low >>> 0, d.counter.high >>> 0).toNumber(true);
                }
                if (d.isLast != null) {
                    m.isLast = Boolean(d.isLast);
                }
                if (d.payload != null) {
                    if (typeof d.payload !== "object")
                        throw TypeError(".perfetto.protos.TestEvent.payload: object expected");
                    m.payload = $root.perfetto.protos.TestEvent.TestPayload.fromObject(d.payload);
                }
                return m;
            };

            /**
             * Creates a plain object from a TestEvent message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TestEvent
             * @static
             * @param {perfetto.protos.TestEvent} m TestEvent
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TestEvent.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.str = "";
                    d.seqValue = 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, true);
                        d.counter = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.counter = o.longs === String ? "0" : 0;
                    d.isLast = false;
                    d.payload = null;
                }
                if (m.str != null && m.hasOwnProperty("str")) {
                    d.str = m.str;
                }
                if (m.seqValue != null && m.hasOwnProperty("seqValue")) {
                    d.seqValue = m.seqValue;
                }
                if (m.counter != null && m.hasOwnProperty("counter")) {
                    if (typeof m.counter === "number")
                        d.counter = o.longs === String ? String(m.counter) : m.counter;
                    else
                        d.counter = o.longs === String ? $util.Long.prototype.toString.call(m.counter) : o.longs === Number ? new $util.LongBits(m.counter.low >>> 0, m.counter.high >>> 0).toNumber(true) : m.counter;
                }
                if (m.isLast != null && m.hasOwnProperty("isLast")) {
                    d.isLast = m.isLast;
                }
                if (m.payload != null && m.hasOwnProperty("payload")) {
                    d.payload = $root.perfetto.protos.TestEvent.TestPayload.toObject(m.payload, o);
                }
                return d;
            };

            /**
             * Converts this TestEvent to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TestEvent
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TestEvent.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            TestEvent.TestPayload = (function() {

                /**
                 * Properties of a TestPayload.
                 * @memberof perfetto.protos.TestEvent
                 * @interface ITestPayload
                 * @property {Array.<string>|null} [str] TestPayload str
                 * @property {Array.<perfetto.protos.TestEvent.ITestPayload>|null} [nested] TestPayload nested
                 * @property {string|null} [singleString] TestPayload singleString
                 * @property {number|null} [singleInt] TestPayload singleInt
                 * @property {Array.<number>|null} [repeatedInts] TestPayload repeatedInts
                 * @property {number|null} [remainingNestingDepth] TestPayload remainingNestingDepth
                 * @property {Array.<perfetto.protos.IDebugAnnotation>|null} [debugAnnotations] TestPayload debugAnnotations
                 */

                /**
                 * Constructs a new TestPayload.
                 * @memberof perfetto.protos.TestEvent
                 * @classdesc Represents a TestPayload.
                 * @implements ITestPayload
                 * @constructor
                 * @param {perfetto.protos.TestEvent.ITestPayload=} [p] Properties to set
                 */
                function TestPayload(p) {
                    this.str = [];
                    this.nested = [];
                    this.repeatedInts = [];
                    this.debugAnnotations = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * TestPayload str.
                 * @member {Array.<string>} str
                 * @memberof perfetto.protos.TestEvent.TestPayload
                 * @instance
                 */
                TestPayload.prototype.str = $util.emptyArray;

                /**
                 * TestPayload nested.
                 * @member {Array.<perfetto.protos.TestEvent.ITestPayload>} nested
                 * @memberof perfetto.protos.TestEvent.TestPayload
                 * @instance
                 */
                TestPayload.prototype.nested = $util.emptyArray;

                /**
                 * TestPayload singleString.
                 * @member {string} singleString
                 * @memberof perfetto.protos.TestEvent.TestPayload
                 * @instance
                 */
                TestPayload.prototype.singleString = "";

                /**
                 * TestPayload singleInt.
                 * @member {number} singleInt
                 * @memberof perfetto.protos.TestEvent.TestPayload
                 * @instance
                 */
                TestPayload.prototype.singleInt = 0;

                /**
                 * TestPayload repeatedInts.
                 * @member {Array.<number>} repeatedInts
                 * @memberof perfetto.protos.TestEvent.TestPayload
                 * @instance
                 */
                TestPayload.prototype.repeatedInts = $util.emptyArray;

                /**
                 * TestPayload remainingNestingDepth.
                 * @member {number} remainingNestingDepth
                 * @memberof perfetto.protos.TestEvent.TestPayload
                 * @instance
                 */
                TestPayload.prototype.remainingNestingDepth = 0;

                /**
                 * TestPayload debugAnnotations.
                 * @member {Array.<perfetto.protos.IDebugAnnotation>} debugAnnotations
                 * @memberof perfetto.protos.TestEvent.TestPayload
                 * @instance
                 */
                TestPayload.prototype.debugAnnotations = $util.emptyArray;

                /**
                 * Creates a new TestPayload instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.TestEvent.TestPayload
                 * @static
                 * @param {perfetto.protos.TestEvent.ITestPayload=} [properties] Properties to set
                 * @returns {perfetto.protos.TestEvent.TestPayload} TestPayload instance
                 */
                TestPayload.create = function create(properties) {
                    return new TestPayload(properties);
                };

                /**
                 * Encodes the specified TestPayload message. Does not implicitly {@link perfetto.protos.TestEvent.TestPayload.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.TestEvent.TestPayload
                 * @static
                 * @param {perfetto.protos.TestEvent.ITestPayload} m TestPayload message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                TestPayload.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.str != null && m.str.length) {
                        for (var i = 0; i < m.str.length; ++i)
                            w.uint32(10).string(m.str[i]);
                    }
                    if (m.nested != null && m.nested.length) {
                        for (var i = 0; i < m.nested.length; ++i)
                            $root.perfetto.protos.TestEvent.TestPayload.encode(m.nested[i], w.uint32(18).fork()).ldelim();
                    }
                    if (m.remainingNestingDepth != null && Object.hasOwnProperty.call(m, "remainingNestingDepth"))
                        w.uint32(24).uint32(m.remainingNestingDepth);
                    if (m.singleString != null && Object.hasOwnProperty.call(m, "singleString"))
                        w.uint32(34).string(m.singleString);
                    if (m.singleInt != null && Object.hasOwnProperty.call(m, "singleInt"))
                        w.uint32(40).int32(m.singleInt);
                    if (m.repeatedInts != null && m.repeatedInts.length) {
                        for (var i = 0; i < m.repeatedInts.length; ++i)
                            w.uint32(48).int32(m.repeatedInts[i]);
                    }
                    if (m.debugAnnotations != null && m.debugAnnotations.length) {
                        for (var i = 0; i < m.debugAnnotations.length; ++i)
                            $root.perfetto.protos.DebugAnnotation.encode(m.debugAnnotations[i], w.uint32(58).fork()).ldelim();
                    }
                    return w;
                };

                /**
                 * Encodes the specified TestPayload message, length delimited. Does not implicitly {@link perfetto.protos.TestEvent.TestPayload.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.TestEvent.TestPayload
                 * @static
                 * @param {perfetto.protos.TestEvent.ITestPayload} message TestPayload message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                TestPayload.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a TestPayload message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.TestEvent.TestPayload
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.TestEvent.TestPayload} TestPayload
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                TestPayload.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TestEvent.TestPayload();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            if (!(m.str && m.str.length))
                                m.str = [];
                            m.str.push(r.string());
                            break;
                        case 2:
                            if (!(m.nested && m.nested.length))
                                m.nested = [];
                            m.nested.push($root.perfetto.protos.TestEvent.TestPayload.decode(r, r.uint32()));
                            break;
                        case 4:
                            m.singleString = r.string();
                            break;
                        case 5:
                            m.singleInt = r.int32();
                            break;
                        case 6:
                            if (!(m.repeatedInts && m.repeatedInts.length))
                                m.repeatedInts = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.repeatedInts.push(r.int32());
                            } else
                                m.repeatedInts.push(r.int32());
                            break;
                        case 3:
                            m.remainingNestingDepth = r.uint32();
                            break;
                        case 7:
                            if (!(m.debugAnnotations && m.debugAnnotations.length))
                                m.debugAnnotations = [];
                            m.debugAnnotations.push($root.perfetto.protos.DebugAnnotation.decode(r, r.uint32()));
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a TestPayload message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.TestEvent.TestPayload
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.TestEvent.TestPayload} TestPayload
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                TestPayload.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a TestPayload message.
                 * @function verify
                 * @memberof perfetto.protos.TestEvent.TestPayload
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                TestPayload.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.str != null && m.hasOwnProperty("str")) {
                        if (!Array.isArray(m.str))
                            return "str: array expected";
                        for (var i = 0; i < m.str.length; ++i) {
                            if (!$util.isString(m.str[i]))
                                return "str: string[] expected";
                        }
                    }
                    if (m.nested != null && m.hasOwnProperty("nested")) {
                        if (!Array.isArray(m.nested))
                            return "nested: array expected";
                        for (var i = 0; i < m.nested.length; ++i) {
                            {
                                var e = $root.perfetto.protos.TestEvent.TestPayload.verify(m.nested[i]);
                                if (e)
                                    return "nested." + e;
                            }
                        }
                    }
                    if (m.singleString != null && m.hasOwnProperty("singleString")) {
                        if (!$util.isString(m.singleString))
                            return "singleString: string expected";
                    }
                    if (m.singleInt != null && m.hasOwnProperty("singleInt")) {
                        if (!$util.isInteger(m.singleInt))
                            return "singleInt: integer expected";
                    }
                    if (m.repeatedInts != null && m.hasOwnProperty("repeatedInts")) {
                        if (!Array.isArray(m.repeatedInts))
                            return "repeatedInts: array expected";
                        for (var i = 0; i < m.repeatedInts.length; ++i) {
                            if (!$util.isInteger(m.repeatedInts[i]))
                                return "repeatedInts: integer[] expected";
                        }
                    }
                    if (m.remainingNestingDepth != null && m.hasOwnProperty("remainingNestingDepth")) {
                        if (!$util.isInteger(m.remainingNestingDepth))
                            return "remainingNestingDepth: integer expected";
                    }
                    if (m.debugAnnotations != null && m.hasOwnProperty("debugAnnotations")) {
                        if (!Array.isArray(m.debugAnnotations))
                            return "debugAnnotations: array expected";
                        for (var i = 0; i < m.debugAnnotations.length; ++i) {
                            {
                                var e = $root.perfetto.protos.DebugAnnotation.verify(m.debugAnnotations[i]);
                                if (e)
                                    return "debugAnnotations." + e;
                            }
                        }
                    }
                    return null;
                };

                /**
                 * Creates a TestPayload message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.TestEvent.TestPayload
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.TestEvent.TestPayload} TestPayload
                 */
                TestPayload.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.TestEvent.TestPayload)
                        return d;
                    var m = new $root.perfetto.protos.TestEvent.TestPayload();
                    if (d.str) {
                        if (!Array.isArray(d.str))
                            throw TypeError(".perfetto.protos.TestEvent.TestPayload.str: array expected");
                        m.str = [];
                        for (var i = 0; i < d.str.length; ++i) {
                            m.str[i] = String(d.str[i]);
                        }
                    }
                    if (d.nested) {
                        if (!Array.isArray(d.nested))
                            throw TypeError(".perfetto.protos.TestEvent.TestPayload.nested: array expected");
                        m.nested = [];
                        for (var i = 0; i < d.nested.length; ++i) {
                            if (typeof d.nested[i] !== "object")
                                throw TypeError(".perfetto.protos.TestEvent.TestPayload.nested: object expected");
                            m.nested[i] = $root.perfetto.protos.TestEvent.TestPayload.fromObject(d.nested[i]);
                        }
                    }
                    if (d.singleString != null) {
                        m.singleString = String(d.singleString);
                    }
                    if (d.singleInt != null) {
                        m.singleInt = d.singleInt | 0;
                    }
                    if (d.repeatedInts) {
                        if (!Array.isArray(d.repeatedInts))
                            throw TypeError(".perfetto.protos.TestEvent.TestPayload.repeatedInts: array expected");
                        m.repeatedInts = [];
                        for (var i = 0; i < d.repeatedInts.length; ++i) {
                            m.repeatedInts[i] = d.repeatedInts[i] | 0;
                        }
                    }
                    if (d.remainingNestingDepth != null) {
                        m.remainingNestingDepth = d.remainingNestingDepth >>> 0;
                    }
                    if (d.debugAnnotations) {
                        if (!Array.isArray(d.debugAnnotations))
                            throw TypeError(".perfetto.protos.TestEvent.TestPayload.debugAnnotations: array expected");
                        m.debugAnnotations = [];
                        for (var i = 0; i < d.debugAnnotations.length; ++i) {
                            if (typeof d.debugAnnotations[i] !== "object")
                                throw TypeError(".perfetto.protos.TestEvent.TestPayload.debugAnnotations: object expected");
                            m.debugAnnotations[i] = $root.perfetto.protos.DebugAnnotation.fromObject(d.debugAnnotations[i]);
                        }
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a TestPayload message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.TestEvent.TestPayload
                 * @static
                 * @param {perfetto.protos.TestEvent.TestPayload} m TestPayload
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                TestPayload.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.str = [];
                        d.nested = [];
                        d.repeatedInts = [];
                        d.debugAnnotations = [];
                    }
                    if (o.defaults) {
                        d.remainingNestingDepth = 0;
                        d.singleString = "";
                        d.singleInt = 0;
                    }
                    if (m.str && m.str.length) {
                        d.str = [];
                        for (var j = 0; j < m.str.length; ++j) {
                            d.str[j] = m.str[j];
                        }
                    }
                    if (m.nested && m.nested.length) {
                        d.nested = [];
                        for (var j = 0; j < m.nested.length; ++j) {
                            d.nested[j] = $root.perfetto.protos.TestEvent.TestPayload.toObject(m.nested[j], o);
                        }
                    }
                    if (m.remainingNestingDepth != null && m.hasOwnProperty("remainingNestingDepth")) {
                        d.remainingNestingDepth = m.remainingNestingDepth;
                    }
                    if (m.singleString != null && m.hasOwnProperty("singleString")) {
                        d.singleString = m.singleString;
                    }
                    if (m.singleInt != null && m.hasOwnProperty("singleInt")) {
                        d.singleInt = m.singleInt;
                    }
                    if (m.repeatedInts && m.repeatedInts.length) {
                        d.repeatedInts = [];
                        for (var j = 0; j < m.repeatedInts.length; ++j) {
                            d.repeatedInts[j] = m.repeatedInts[j];
                        }
                    }
                    if (m.debugAnnotations && m.debugAnnotations.length) {
                        d.debugAnnotations = [];
                        for (var j = 0; j < m.debugAnnotations.length; ++j) {
                            d.debugAnnotations[j] = $root.perfetto.protos.DebugAnnotation.toObject(m.debugAnnotations[j], o);
                        }
                    }
                    return d;
                };

                /**
                 * Converts this TestPayload to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.TestEvent.TestPayload
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                TestPayload.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return TestPayload;
            })();

            return TestEvent;
        })();

        protos.UiState = (function() {

            /**
             * Properties of an UiState.
             * @memberof perfetto.protos
             * @interface IUiState
             * @property {number|null} [timelineStartTs] UiState timelineStartTs
             * @property {number|null} [timelineEndTs] UiState timelineEndTs
             * @property {perfetto.protos.UiState.IHighlightProcess|null} [highlightProcess] UiState highlightProcess
             */

            /**
             * Constructs a new UiState.
             * @memberof perfetto.protos
             * @classdesc Represents an UiState.
             * @implements IUiState
             * @constructor
             * @param {perfetto.protos.IUiState=} [p] Properties to set
             */
            function UiState(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * UiState timelineStartTs.
             * @member {number} timelineStartTs
             * @memberof perfetto.protos.UiState
             * @instance
             */
            UiState.prototype.timelineStartTs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * UiState timelineEndTs.
             * @member {number} timelineEndTs
             * @memberof perfetto.protos.UiState
             * @instance
             */
            UiState.prototype.timelineEndTs = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * UiState highlightProcess.
             * @member {perfetto.protos.UiState.IHighlightProcess|null|undefined} highlightProcess
             * @memberof perfetto.protos.UiState
             * @instance
             */
            UiState.prototype.highlightProcess = null;

            /**
             * Creates a new UiState instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.UiState
             * @static
             * @param {perfetto.protos.IUiState=} [properties] Properties to set
             * @returns {perfetto.protos.UiState} UiState instance
             */
            UiState.create = function create(properties) {
                return new UiState(properties);
            };

            /**
             * Encodes the specified UiState message. Does not implicitly {@link perfetto.protos.UiState.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.UiState
             * @static
             * @param {perfetto.protos.IUiState} m UiState message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            UiState.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.timelineStartTs != null && Object.hasOwnProperty.call(m, "timelineStartTs"))
                    w.uint32(8).int64(m.timelineStartTs);
                if (m.timelineEndTs != null && Object.hasOwnProperty.call(m, "timelineEndTs"))
                    w.uint32(16).int64(m.timelineEndTs);
                if (m.highlightProcess != null && Object.hasOwnProperty.call(m, "highlightProcess"))
                    $root.perfetto.protos.UiState.HighlightProcess.encode(m.highlightProcess, w.uint32(26).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified UiState message, length delimited. Does not implicitly {@link perfetto.protos.UiState.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.UiState
             * @static
             * @param {perfetto.protos.IUiState} message UiState message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            UiState.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an UiState message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.UiState
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.UiState} UiState
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            UiState.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.UiState();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.timelineStartTs = r.int64();
                        break;
                    case 2:
                        m.timelineEndTs = r.int64();
                        break;
                    case 3:
                        m.highlightProcess = $root.perfetto.protos.UiState.HighlightProcess.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an UiState message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.UiState
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.UiState} UiState
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            UiState.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an UiState message.
             * @function verify
             * @memberof perfetto.protos.UiState
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            UiState.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.timelineStartTs != null && m.hasOwnProperty("timelineStartTs")) {
                    if (!$util.isInteger(m.timelineStartTs) && !(m.timelineStartTs && $util.isInteger(m.timelineStartTs.low) && $util.isInteger(m.timelineStartTs.high)))
                        return "timelineStartTs: integer|Long expected";
                }
                if (m.timelineEndTs != null && m.hasOwnProperty("timelineEndTs")) {
                    if (!$util.isInteger(m.timelineEndTs) && !(m.timelineEndTs && $util.isInteger(m.timelineEndTs.low) && $util.isInteger(m.timelineEndTs.high)))
                        return "timelineEndTs: integer|Long expected";
                }
                if (m.highlightProcess != null && m.hasOwnProperty("highlightProcess")) {
                    {
                        var e = $root.perfetto.protos.UiState.HighlightProcess.verify(m.highlightProcess);
                        if (e)
                            return "highlightProcess." + e;
                    }
                }
                return null;
            };

            /**
             * Creates an UiState message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.UiState
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.UiState} UiState
             */
            UiState.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.UiState)
                    return d;
                var m = new $root.perfetto.protos.UiState();
                if (d.timelineStartTs != null) {
                    if ($util.Long)
                        (m.timelineStartTs = $util.Long.fromValue(d.timelineStartTs)).unsigned = false;
                    else if (typeof d.timelineStartTs === "string")
                        m.timelineStartTs = parseInt(d.timelineStartTs, 10);
                    else if (typeof d.timelineStartTs === "number")
                        m.timelineStartTs = d.timelineStartTs;
                    else if (typeof d.timelineStartTs === "object")
                        m.timelineStartTs = new $util.LongBits(d.timelineStartTs.low >>> 0, d.timelineStartTs.high >>> 0).toNumber();
                }
                if (d.timelineEndTs != null) {
                    if ($util.Long)
                        (m.timelineEndTs = $util.Long.fromValue(d.timelineEndTs)).unsigned = false;
                    else if (typeof d.timelineEndTs === "string")
                        m.timelineEndTs = parseInt(d.timelineEndTs, 10);
                    else if (typeof d.timelineEndTs === "number")
                        m.timelineEndTs = d.timelineEndTs;
                    else if (typeof d.timelineEndTs === "object")
                        m.timelineEndTs = new $util.LongBits(d.timelineEndTs.low >>> 0, d.timelineEndTs.high >>> 0).toNumber();
                }
                if (d.highlightProcess != null) {
                    if (typeof d.highlightProcess !== "object")
                        throw TypeError(".perfetto.protos.UiState.highlightProcess: object expected");
                    m.highlightProcess = $root.perfetto.protos.UiState.HighlightProcess.fromObject(d.highlightProcess);
                }
                return m;
            };

            /**
             * Creates a plain object from an UiState message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.UiState
             * @static
             * @param {perfetto.protos.UiState} m UiState
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            UiState.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.timelineStartTs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.timelineStartTs = o.longs === String ? "0" : 0;
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.timelineEndTs = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.timelineEndTs = o.longs === String ? "0" : 0;
                    d.highlightProcess = null;
                }
                if (m.timelineStartTs != null && m.hasOwnProperty("timelineStartTs")) {
                    if (typeof m.timelineStartTs === "number")
                        d.timelineStartTs = o.longs === String ? String(m.timelineStartTs) : m.timelineStartTs;
                    else
                        d.timelineStartTs = o.longs === String ? $util.Long.prototype.toString.call(m.timelineStartTs) : o.longs === Number ? new $util.LongBits(m.timelineStartTs.low >>> 0, m.timelineStartTs.high >>> 0).toNumber() : m.timelineStartTs;
                }
                if (m.timelineEndTs != null && m.hasOwnProperty("timelineEndTs")) {
                    if (typeof m.timelineEndTs === "number")
                        d.timelineEndTs = o.longs === String ? String(m.timelineEndTs) : m.timelineEndTs;
                    else
                        d.timelineEndTs = o.longs === String ? $util.Long.prototype.toString.call(m.timelineEndTs) : o.longs === Number ? new $util.LongBits(m.timelineEndTs.low >>> 0, m.timelineEndTs.high >>> 0).toNumber() : m.timelineEndTs;
                }
                if (m.highlightProcess != null && m.hasOwnProperty("highlightProcess")) {
                    d.highlightProcess = $root.perfetto.protos.UiState.HighlightProcess.toObject(m.highlightProcess, o);
                }
                return d;
            };

            /**
             * Converts this UiState to JSON.
             * @function toJSON
             * @memberof perfetto.protos.UiState
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            UiState.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            UiState.HighlightProcess = (function() {

                /**
                 * Properties of a HighlightProcess.
                 * @memberof perfetto.protos.UiState
                 * @interface IHighlightProcess
                 * @property {number|null} [pid] HighlightProcess pid
                 * @property {string|null} [cmdline] HighlightProcess cmdline
                 */

                /**
                 * Constructs a new HighlightProcess.
                 * @memberof perfetto.protos.UiState
                 * @classdesc Represents a HighlightProcess.
                 * @implements IHighlightProcess
                 * @constructor
                 * @param {perfetto.protos.UiState.IHighlightProcess=} [p] Properties to set
                 */
                function HighlightProcess(p) {
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * HighlightProcess pid.
                 * @member {number} pid
                 * @memberof perfetto.protos.UiState.HighlightProcess
                 * @instance
                 */
                HighlightProcess.prototype.pid = 0;

                /**
                 * HighlightProcess cmdline.
                 * @member {string} cmdline
                 * @memberof perfetto.protos.UiState.HighlightProcess
                 * @instance
                 */
                HighlightProcess.prototype.cmdline = "";

                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;

                /**
                 * HighlightProcess selector.
                 * @member {"pid"|"cmdline"|undefined} selector
                 * @memberof perfetto.protos.UiState.HighlightProcess
                 * @instance
                 */
                Object.defineProperty(HighlightProcess.prototype, "selector", {
                    get: $util.oneOfGetter($oneOfFields = ["pid", "cmdline"]),
                    set: $util.oneOfSetter($oneOfFields)
                });

                /**
                 * Creates a new HighlightProcess instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.UiState.HighlightProcess
                 * @static
                 * @param {perfetto.protos.UiState.IHighlightProcess=} [properties] Properties to set
                 * @returns {perfetto.protos.UiState.HighlightProcess} HighlightProcess instance
                 */
                HighlightProcess.create = function create(properties) {
                    return new HighlightProcess(properties);
                };

                /**
                 * Encodes the specified HighlightProcess message. Does not implicitly {@link perfetto.protos.UiState.HighlightProcess.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.UiState.HighlightProcess
                 * @static
                 * @param {perfetto.protos.UiState.IHighlightProcess} m HighlightProcess message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                HighlightProcess.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.pid != null && Object.hasOwnProperty.call(m, "pid"))
                        w.uint32(8).uint32(m.pid);
                    if (m.cmdline != null && Object.hasOwnProperty.call(m, "cmdline"))
                        w.uint32(18).string(m.cmdline);
                    return w;
                };

                /**
                 * Encodes the specified HighlightProcess message, length delimited. Does not implicitly {@link perfetto.protos.UiState.HighlightProcess.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.UiState.HighlightProcess
                 * @static
                 * @param {perfetto.protos.UiState.IHighlightProcess} message HighlightProcess message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                HighlightProcess.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a HighlightProcess message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.UiState.HighlightProcess
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.UiState.HighlightProcess} HighlightProcess
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                HighlightProcess.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.UiState.HighlightProcess();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            m.pid = r.uint32();
                            break;
                        case 2:
                            m.cmdline = r.string();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a HighlightProcess message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.UiState.HighlightProcess
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.UiState.HighlightProcess} HighlightProcess
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                HighlightProcess.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a HighlightProcess message.
                 * @function verify
                 * @memberof perfetto.protos.UiState.HighlightProcess
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                HighlightProcess.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    var p = {};
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        p.selector = 1;
                        if (!$util.isInteger(m.pid))
                            return "pid: integer expected";
                    }
                    if (m.cmdline != null && m.hasOwnProperty("cmdline")) {
                        if (p.selector === 1)
                            return "selector: multiple values";
                        p.selector = 1;
                        if (!$util.isString(m.cmdline))
                            return "cmdline: string expected";
                    }
                    return null;
                };

                /**
                 * Creates a HighlightProcess message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.UiState.HighlightProcess
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.UiState.HighlightProcess} HighlightProcess
                 */
                HighlightProcess.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.UiState.HighlightProcess)
                        return d;
                    var m = new $root.perfetto.protos.UiState.HighlightProcess();
                    if (d.pid != null) {
                        m.pid = d.pid >>> 0;
                    }
                    if (d.cmdline != null) {
                        m.cmdline = String(d.cmdline);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a HighlightProcess message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.UiState.HighlightProcess
                 * @static
                 * @param {perfetto.protos.UiState.HighlightProcess} m HighlightProcess
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                HighlightProcess.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (m.pid != null && m.hasOwnProperty("pid")) {
                        d.pid = m.pid;
                        if (o.oneofs)
                            d.selector = "pid";
                    }
                    if (m.cmdline != null && m.hasOwnProperty("cmdline")) {
                        d.cmdline = m.cmdline;
                        if (o.oneofs)
                            d.selector = "cmdline";
                    }
                    return d;
                };

                /**
                 * Converts this HighlightProcess to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.UiState.HighlightProcess
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                HighlightProcess.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                return HighlightProcess;
            })();

            return UiState;
        })();

        /**
         * TraceProcessorApiVersion enum.
         * @name perfetto.protos.TraceProcessorApiVersion
         * @enum {number}
         * @property {number} TRACE_PROCESSOR_CURRENT_API_VERSION=6 TRACE_PROCESSOR_CURRENT_API_VERSION value
         */
        protos.TraceProcessorApiVersion = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[6] = "TRACE_PROCESSOR_CURRENT_API_VERSION"] = 6;
            return values;
        })();

        protos.TraceProcessorRpcStream = (function() {

            /**
             * Properties of a TraceProcessorRpcStream.
             * @memberof perfetto.protos
             * @interface ITraceProcessorRpcStream
             * @property {Array.<perfetto.protos.ITraceProcessorRpc>|null} [msg] TraceProcessorRpcStream msg
             */

            /**
             * Constructs a new TraceProcessorRpcStream.
             * @memberof perfetto.protos
             * @classdesc Represents a TraceProcessorRpcStream.
             * @implements ITraceProcessorRpcStream
             * @constructor
             * @param {perfetto.protos.ITraceProcessorRpcStream=} [p] Properties to set
             */
            function TraceProcessorRpcStream(p) {
                this.msg = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TraceProcessorRpcStream msg.
             * @member {Array.<perfetto.protos.ITraceProcessorRpc>} msg
             * @memberof perfetto.protos.TraceProcessorRpcStream
             * @instance
             */
            TraceProcessorRpcStream.prototype.msg = $util.emptyArray;

            /**
             * Creates a new TraceProcessorRpcStream instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TraceProcessorRpcStream
             * @static
             * @param {perfetto.protos.ITraceProcessorRpcStream=} [properties] Properties to set
             * @returns {perfetto.protos.TraceProcessorRpcStream} TraceProcessorRpcStream instance
             */
            TraceProcessorRpcStream.create = function create(properties) {
                return new TraceProcessorRpcStream(properties);
            };

            /**
             * Encodes the specified TraceProcessorRpcStream message. Does not implicitly {@link perfetto.protos.TraceProcessorRpcStream.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TraceProcessorRpcStream
             * @static
             * @param {perfetto.protos.ITraceProcessorRpcStream} m TraceProcessorRpcStream message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TraceProcessorRpcStream.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.msg != null && m.msg.length) {
                    for (var i = 0; i < m.msg.length; ++i)
                        $root.perfetto.protos.TraceProcessorRpc.encode(m.msg[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified TraceProcessorRpcStream message, length delimited. Does not implicitly {@link perfetto.protos.TraceProcessorRpcStream.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TraceProcessorRpcStream
             * @static
             * @param {perfetto.protos.ITraceProcessorRpcStream} message TraceProcessorRpcStream message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TraceProcessorRpcStream.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TraceProcessorRpcStream message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TraceProcessorRpcStream
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TraceProcessorRpcStream} TraceProcessorRpcStream
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TraceProcessorRpcStream.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TraceProcessorRpcStream();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.msg && m.msg.length))
                            m.msg = [];
                        m.msg.push($root.perfetto.protos.TraceProcessorRpc.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TraceProcessorRpcStream message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TraceProcessorRpcStream
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TraceProcessorRpcStream} TraceProcessorRpcStream
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TraceProcessorRpcStream.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TraceProcessorRpcStream message.
             * @function verify
             * @memberof perfetto.protos.TraceProcessorRpcStream
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TraceProcessorRpcStream.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.msg != null && m.hasOwnProperty("msg")) {
                    if (!Array.isArray(m.msg))
                        return "msg: array expected";
                    for (var i = 0; i < m.msg.length; ++i) {
                        {
                            var e = $root.perfetto.protos.TraceProcessorRpc.verify(m.msg[i]);
                            if (e)
                                return "msg." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a TraceProcessorRpcStream message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TraceProcessorRpcStream
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TraceProcessorRpcStream} TraceProcessorRpcStream
             */
            TraceProcessorRpcStream.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TraceProcessorRpcStream)
                    return d;
                var m = new $root.perfetto.protos.TraceProcessorRpcStream();
                if (d.msg) {
                    if (!Array.isArray(d.msg))
                        throw TypeError(".perfetto.protos.TraceProcessorRpcStream.msg: array expected");
                    m.msg = [];
                    for (var i = 0; i < d.msg.length; ++i) {
                        if (typeof d.msg[i] !== "object")
                            throw TypeError(".perfetto.protos.TraceProcessorRpcStream.msg: object expected");
                        m.msg[i] = $root.perfetto.protos.TraceProcessorRpc.fromObject(d.msg[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a TraceProcessorRpcStream message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TraceProcessorRpcStream
             * @static
             * @param {perfetto.protos.TraceProcessorRpcStream} m TraceProcessorRpcStream
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TraceProcessorRpcStream.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.msg = [];
                }
                if (m.msg && m.msg.length) {
                    d.msg = [];
                    for (var j = 0; j < m.msg.length; ++j) {
                        d.msg[j] = $root.perfetto.protos.TraceProcessorRpc.toObject(m.msg[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this TraceProcessorRpcStream to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TraceProcessorRpcStream
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TraceProcessorRpcStream.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return TraceProcessorRpcStream;
        })();

        protos.TraceProcessorRpc = (function() {

            /**
             * Properties of a TraceProcessorRpc.
             * @memberof perfetto.protos
             * @interface ITraceProcessorRpc
             * @property {number|null} [seq] TraceProcessorRpc seq
             * @property {string|null} [fatalError] TraceProcessorRpc fatalError
             * @property {perfetto.protos.TraceProcessorRpc.TraceProcessorMethod|null} [request] TraceProcessorRpc request
             * @property {perfetto.protos.TraceProcessorRpc.TraceProcessorMethod|null} [response] TraceProcessorRpc response
             * @property {perfetto.protos.TraceProcessorRpc.TraceProcessorMethod|null} [invalidRequest] TraceProcessorRpc invalidRequest
             * @property {Uint8Array|null} [appendTraceData] TraceProcessorRpc appendTraceData
             * @property {perfetto.protos.IQueryArgs|null} [queryArgs] TraceProcessorRpc queryArgs
             * @property {perfetto.protos.IComputeMetricArgs|null} [computeMetricArgs] TraceProcessorRpc computeMetricArgs
             * @property {perfetto.protos.IEnableMetatraceArgs|null} [enableMetatraceArgs] TraceProcessorRpc enableMetatraceArgs
             * @property {perfetto.protos.IAppendTraceDataResult|null} [appendResult] TraceProcessorRpc appendResult
             * @property {perfetto.protos.IQueryResult|null} [queryResult] TraceProcessorRpc queryResult
             * @property {perfetto.protos.IComputeMetricResult|null} [metricResult] TraceProcessorRpc metricResult
             * @property {perfetto.protos.IDescriptorSet|null} [metricDescriptors] TraceProcessorRpc metricDescriptors
             * @property {perfetto.protos.IDisableAndReadMetatraceResult|null} [metatrace] TraceProcessorRpc metatrace
             * @property {perfetto.protos.IStatusResult|null} [status] TraceProcessorRpc status
             */

            /**
             * Constructs a new TraceProcessorRpc.
             * @memberof perfetto.protos
             * @classdesc Represents a TraceProcessorRpc.
             * @implements ITraceProcessorRpc
             * @constructor
             * @param {perfetto.protos.ITraceProcessorRpc=} [p] Properties to set
             */
            function TraceProcessorRpc(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * TraceProcessorRpc seq.
             * @member {number} seq
             * @memberof perfetto.protos.TraceProcessorRpc
             * @instance
             */
            TraceProcessorRpc.prototype.seq = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * TraceProcessorRpc fatalError.
             * @member {string} fatalError
             * @memberof perfetto.protos.TraceProcessorRpc
             * @instance
             */
            TraceProcessorRpc.prototype.fatalError = "";

            /**
             * TraceProcessorRpc request.
             * @member {perfetto.protos.TraceProcessorRpc.TraceProcessorMethod} request
             * @memberof perfetto.protos.TraceProcessorRpc
             * @instance
             */
            TraceProcessorRpc.prototype.request = 0;

            /**
             * TraceProcessorRpc response.
             * @member {perfetto.protos.TraceProcessorRpc.TraceProcessorMethod} response
             * @memberof perfetto.protos.TraceProcessorRpc
             * @instance
             */
            TraceProcessorRpc.prototype.response = 0;

            /**
             * TraceProcessorRpc invalidRequest.
             * @member {perfetto.protos.TraceProcessorRpc.TraceProcessorMethod} invalidRequest
             * @memberof perfetto.protos.TraceProcessorRpc
             * @instance
             */
            TraceProcessorRpc.prototype.invalidRequest = 0;

            /**
             * TraceProcessorRpc appendTraceData.
             * @member {Uint8Array} appendTraceData
             * @memberof perfetto.protos.TraceProcessorRpc
             * @instance
             */
            TraceProcessorRpc.prototype.appendTraceData = $util.newBuffer([]);

            /**
             * TraceProcessorRpc queryArgs.
             * @member {perfetto.protos.IQueryArgs|null|undefined} queryArgs
             * @memberof perfetto.protos.TraceProcessorRpc
             * @instance
             */
            TraceProcessorRpc.prototype.queryArgs = null;

            /**
             * TraceProcessorRpc computeMetricArgs.
             * @member {perfetto.protos.IComputeMetricArgs|null|undefined} computeMetricArgs
             * @memberof perfetto.protos.TraceProcessorRpc
             * @instance
             */
            TraceProcessorRpc.prototype.computeMetricArgs = null;

            /**
             * TraceProcessorRpc enableMetatraceArgs.
             * @member {perfetto.protos.IEnableMetatraceArgs|null|undefined} enableMetatraceArgs
             * @memberof perfetto.protos.TraceProcessorRpc
             * @instance
             */
            TraceProcessorRpc.prototype.enableMetatraceArgs = null;

            /**
             * TraceProcessorRpc appendResult.
             * @member {perfetto.protos.IAppendTraceDataResult|null|undefined} appendResult
             * @memberof perfetto.protos.TraceProcessorRpc
             * @instance
             */
            TraceProcessorRpc.prototype.appendResult = null;

            /**
             * TraceProcessorRpc queryResult.
             * @member {perfetto.protos.IQueryResult|null|undefined} queryResult
             * @memberof perfetto.protos.TraceProcessorRpc
             * @instance
             */
            TraceProcessorRpc.prototype.queryResult = null;

            /**
             * TraceProcessorRpc metricResult.
             * @member {perfetto.protos.IComputeMetricResult|null|undefined} metricResult
             * @memberof perfetto.protos.TraceProcessorRpc
             * @instance
             */
            TraceProcessorRpc.prototype.metricResult = null;

            /**
             * TraceProcessorRpc metricDescriptors.
             * @member {perfetto.protos.IDescriptorSet|null|undefined} metricDescriptors
             * @memberof perfetto.protos.TraceProcessorRpc
             * @instance
             */
            TraceProcessorRpc.prototype.metricDescriptors = null;

            /**
             * TraceProcessorRpc metatrace.
             * @member {perfetto.protos.IDisableAndReadMetatraceResult|null|undefined} metatrace
             * @memberof perfetto.protos.TraceProcessorRpc
             * @instance
             */
            TraceProcessorRpc.prototype.metatrace = null;

            /**
             * TraceProcessorRpc status.
             * @member {perfetto.protos.IStatusResult|null|undefined} status
             * @memberof perfetto.protos.TraceProcessorRpc
             * @instance
             */
            TraceProcessorRpc.prototype.status = null;

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * TraceProcessorRpc type.
             * @member {"request"|"response"|"invalidRequest"|undefined} type
             * @memberof perfetto.protos.TraceProcessorRpc
             * @instance
             */
            Object.defineProperty(TraceProcessorRpc.prototype, "type", {
                get: $util.oneOfGetter($oneOfFields = ["request", "response", "invalidRequest"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * TraceProcessorRpc args.
             * @member {"appendTraceData"|"queryArgs"|"computeMetricArgs"|"enableMetatraceArgs"|"appendResult"|"queryResult"|"metricResult"|"metricDescriptors"|"metatrace"|"status"|undefined} args
             * @memberof perfetto.protos.TraceProcessorRpc
             * @instance
             */
            Object.defineProperty(TraceProcessorRpc.prototype, "args", {
                get: $util.oneOfGetter($oneOfFields = ["appendTraceData", "queryArgs", "computeMetricArgs", "enableMetatraceArgs", "appendResult", "queryResult", "metricResult", "metricDescriptors", "metatrace", "status"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new TraceProcessorRpc instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.TraceProcessorRpc
             * @static
             * @param {perfetto.protos.ITraceProcessorRpc=} [properties] Properties to set
             * @returns {perfetto.protos.TraceProcessorRpc} TraceProcessorRpc instance
             */
            TraceProcessorRpc.create = function create(properties) {
                return new TraceProcessorRpc(properties);
            };

            /**
             * Encodes the specified TraceProcessorRpc message. Does not implicitly {@link perfetto.protos.TraceProcessorRpc.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.TraceProcessorRpc
             * @static
             * @param {perfetto.protos.ITraceProcessorRpc} m TraceProcessorRpc message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TraceProcessorRpc.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.seq != null && Object.hasOwnProperty.call(m, "seq"))
                    w.uint32(8).int64(m.seq);
                if (m.request != null && Object.hasOwnProperty.call(m, "request"))
                    w.uint32(16).int32(m.request);
                if (m.response != null && Object.hasOwnProperty.call(m, "response"))
                    w.uint32(24).int32(m.response);
                if (m.invalidRequest != null && Object.hasOwnProperty.call(m, "invalidRequest"))
                    w.uint32(32).int32(m.invalidRequest);
                if (m.fatalError != null && Object.hasOwnProperty.call(m, "fatalError"))
                    w.uint32(42).string(m.fatalError);
                if (m.appendTraceData != null && Object.hasOwnProperty.call(m, "appendTraceData"))
                    w.uint32(810).bytes(m.appendTraceData);
                if (m.queryArgs != null && Object.hasOwnProperty.call(m, "queryArgs"))
                    $root.perfetto.protos.QueryArgs.encode(m.queryArgs, w.uint32(826).fork()).ldelim();
                if (m.computeMetricArgs != null && Object.hasOwnProperty.call(m, "computeMetricArgs"))
                    $root.perfetto.protos.ComputeMetricArgs.encode(m.computeMetricArgs, w.uint32(842).fork()).ldelim();
                if (m.enableMetatraceArgs != null && Object.hasOwnProperty.call(m, "enableMetatraceArgs"))
                    $root.perfetto.protos.EnableMetatraceArgs.encode(m.enableMetatraceArgs, w.uint32(850).fork()).ldelim();
                if (m.appendResult != null && Object.hasOwnProperty.call(m, "appendResult"))
                    $root.perfetto.protos.AppendTraceDataResult.encode(m.appendResult, w.uint32(1610).fork()).ldelim();
                if (m.queryResult != null && Object.hasOwnProperty.call(m, "queryResult"))
                    $root.perfetto.protos.QueryResult.encode(m.queryResult, w.uint32(1626).fork()).ldelim();
                if (m.metricResult != null && Object.hasOwnProperty.call(m, "metricResult"))
                    $root.perfetto.protos.ComputeMetricResult.encode(m.metricResult, w.uint32(1642).fork()).ldelim();
                if (m.metricDescriptors != null && Object.hasOwnProperty.call(m, "metricDescriptors"))
                    $root.perfetto.protos.DescriptorSet.encode(m.metricDescriptors, w.uint32(1650).fork()).ldelim();
                if (m.metatrace != null && Object.hasOwnProperty.call(m, "metatrace"))
                    $root.perfetto.protos.DisableAndReadMetatraceResult.encode(m.metatrace, w.uint32(1674).fork()).ldelim();
                if (m.status != null && Object.hasOwnProperty.call(m, "status"))
                    $root.perfetto.protos.StatusResult.encode(m.status, w.uint32(1682).fork()).ldelim();
                return w;
            };

            /**
             * Encodes the specified TraceProcessorRpc message, length delimited. Does not implicitly {@link perfetto.protos.TraceProcessorRpc.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.TraceProcessorRpc
             * @static
             * @param {perfetto.protos.ITraceProcessorRpc} message TraceProcessorRpc message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            TraceProcessorRpc.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a TraceProcessorRpc message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.TraceProcessorRpc
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.TraceProcessorRpc} TraceProcessorRpc
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TraceProcessorRpc.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.TraceProcessorRpc();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.seq = r.int64();
                        break;
                    case 5:
                        m.fatalError = r.string();
                        break;
                    case 2:
                        m.request = r.int32();
                        break;
                    case 3:
                        m.response = r.int32();
                        break;
                    case 4:
                        m.invalidRequest = r.int32();
                        break;
                    case 101:
                        m.appendTraceData = r.bytes();
                        break;
                    case 103:
                        m.queryArgs = $root.perfetto.protos.QueryArgs.decode(r, r.uint32());
                        break;
                    case 105:
                        m.computeMetricArgs = $root.perfetto.protos.ComputeMetricArgs.decode(r, r.uint32());
                        break;
                    case 106:
                        m.enableMetatraceArgs = $root.perfetto.protos.EnableMetatraceArgs.decode(r, r.uint32());
                        break;
                    case 201:
                        m.appendResult = $root.perfetto.protos.AppendTraceDataResult.decode(r, r.uint32());
                        break;
                    case 203:
                        m.queryResult = $root.perfetto.protos.QueryResult.decode(r, r.uint32());
                        break;
                    case 205:
                        m.metricResult = $root.perfetto.protos.ComputeMetricResult.decode(r, r.uint32());
                        break;
                    case 206:
                        m.metricDescriptors = $root.perfetto.protos.DescriptorSet.decode(r, r.uint32());
                        break;
                    case 209:
                        m.metatrace = $root.perfetto.protos.DisableAndReadMetatraceResult.decode(r, r.uint32());
                        break;
                    case 210:
                        m.status = $root.perfetto.protos.StatusResult.decode(r, r.uint32());
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a TraceProcessorRpc message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.TraceProcessorRpc
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.TraceProcessorRpc} TraceProcessorRpc
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            TraceProcessorRpc.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a TraceProcessorRpc message.
             * @function verify
             * @memberof perfetto.protos.TraceProcessorRpc
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            TraceProcessorRpc.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                var p = {};
                if (m.seq != null && m.hasOwnProperty("seq")) {
                    if (!$util.isInteger(m.seq) && !(m.seq && $util.isInteger(m.seq.low) && $util.isInteger(m.seq.high)))
                        return "seq: integer|Long expected";
                }
                if (m.fatalError != null && m.hasOwnProperty("fatalError")) {
                    if (!$util.isString(m.fatalError))
                        return "fatalError: string expected";
                }
                if (m.request != null && m.hasOwnProperty("request")) {
                    p.type = 1;
                    switch (m.request) {
                    default:
                        return "request: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 5:
                    case 6:
                    case 7:
                    case 8:
                    case 9:
                    case 10:
                        break;
                    }
                }
                if (m.response != null && m.hasOwnProperty("response")) {
                    if (p.type === 1)
                        return "type: multiple values";
                    p.type = 1;
                    switch (m.response) {
                    default:
                        return "response: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 5:
                    case 6:
                    case 7:
                    case 8:
                    case 9:
                    case 10:
                        break;
                    }
                }
                if (m.invalidRequest != null && m.hasOwnProperty("invalidRequest")) {
                    if (p.type === 1)
                        return "type: multiple values";
                    p.type = 1;
                    switch (m.invalidRequest) {
                    default:
                        return "invalidRequest: enum value expected";
                    case 0:
                    case 1:
                    case 2:
                    case 3:
                    case 5:
                    case 6:
                    case 7:
                    case 8:
                    case 9:
                    case 10:
                        break;
                    }
                }
                if (m.appendTraceData != null && m.hasOwnProperty("appendTraceData")) {
                    p.args = 1;
                    if (!(m.appendTraceData && typeof m.appendTraceData.length === "number" || $util.isString(m.appendTraceData)))
                        return "appendTraceData: buffer expected";
                }
                if (m.queryArgs != null && m.hasOwnProperty("queryArgs")) {
                    if (p.args === 1)
                        return "args: multiple values";
                    p.args = 1;
                    {
                        var e = $root.perfetto.protos.QueryArgs.verify(m.queryArgs);
                        if (e)
                            return "queryArgs." + e;
                    }
                }
                if (m.computeMetricArgs != null && m.hasOwnProperty("computeMetricArgs")) {
                    if (p.args === 1)
                        return "args: multiple values";
                    p.args = 1;
                    {
                        var e = $root.perfetto.protos.ComputeMetricArgs.verify(m.computeMetricArgs);
                        if (e)
                            return "computeMetricArgs." + e;
                    }
                }
                if (m.enableMetatraceArgs != null && m.hasOwnProperty("enableMetatraceArgs")) {
                    if (p.args === 1)
                        return "args: multiple values";
                    p.args = 1;
                    {
                        var e = $root.perfetto.protos.EnableMetatraceArgs.verify(m.enableMetatraceArgs);
                        if (e)
                            return "enableMetatraceArgs." + e;
                    }
                }
                if (m.appendResult != null && m.hasOwnProperty("appendResult")) {
                    if (p.args === 1)
                        return "args: multiple values";
                    p.args = 1;
                    {
                        var e = $root.perfetto.protos.AppendTraceDataResult.verify(m.appendResult);
                        if (e)
                            return "appendResult." + e;
                    }
                }
                if (m.queryResult != null && m.hasOwnProperty("queryResult")) {
                    if (p.args === 1)
                        return "args: multiple values";
                    p.args = 1;
                    {
                        var e = $root.perfetto.protos.QueryResult.verify(m.queryResult);
                        if (e)
                            return "queryResult." + e;
                    }
                }
                if (m.metricResult != null && m.hasOwnProperty("metricResult")) {
                    if (p.args === 1)
                        return "args: multiple values";
                    p.args = 1;
                    {
                        var e = $root.perfetto.protos.ComputeMetricResult.verify(m.metricResult);
                        if (e)
                            return "metricResult." + e;
                    }
                }
                if (m.metricDescriptors != null && m.hasOwnProperty("metricDescriptors")) {
                    if (p.args === 1)
                        return "args: multiple values";
                    p.args = 1;
                    {
                        var e = $root.perfetto.protos.DescriptorSet.verify(m.metricDescriptors);
                        if (e)
                            return "metricDescriptors." + e;
                    }
                }
                if (m.metatrace != null && m.hasOwnProperty("metatrace")) {
                    if (p.args === 1)
                        return "args: multiple values";
                    p.args = 1;
                    {
                        var e = $root.perfetto.protos.DisableAndReadMetatraceResult.verify(m.metatrace);
                        if (e)
                            return "metatrace." + e;
                    }
                }
                if (m.status != null && m.hasOwnProperty("status")) {
                    if (p.args === 1)
                        return "args: multiple values";
                    p.args = 1;
                    {
                        var e = $root.perfetto.protos.StatusResult.verify(m.status);
                        if (e)
                            return "status." + e;
                    }
                }
                return null;
            };

            /**
             * Creates a TraceProcessorRpc message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.TraceProcessorRpc
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.TraceProcessorRpc} TraceProcessorRpc
             */
            TraceProcessorRpc.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.TraceProcessorRpc)
                    return d;
                var m = new $root.perfetto.protos.TraceProcessorRpc();
                if (d.seq != null) {
                    if ($util.Long)
                        (m.seq = $util.Long.fromValue(d.seq)).unsigned = false;
                    else if (typeof d.seq === "string")
                        m.seq = parseInt(d.seq, 10);
                    else if (typeof d.seq === "number")
                        m.seq = d.seq;
                    else if (typeof d.seq === "object")
                        m.seq = new $util.LongBits(d.seq.low >>> 0, d.seq.high >>> 0).toNumber();
                }
                if (d.fatalError != null) {
                    m.fatalError = String(d.fatalError);
                }
                switch (d.request) {
                case "TPM_UNSPECIFIED":
                case 0:
                    m.request = 0;
                    break;
                case "TPM_APPEND_TRACE_DATA":
                case 1:
                    m.request = 1;
                    break;
                case "TPM_FINALIZE_TRACE_DATA":
                case 2:
                    m.request = 2;
                    break;
                case "TPM_QUERY_STREAMING":
                case 3:
                    m.request = 3;
                    break;
                case "TPM_COMPUTE_METRIC":
                case 5:
                    m.request = 5;
                    break;
                case "TPM_GET_METRIC_DESCRIPTORS":
                case 6:
                    m.request = 6;
                    break;
                case "TPM_RESTORE_INITIAL_TABLES":
                case 7:
                    m.request = 7;
                    break;
                case "TPM_ENABLE_METATRACE":
                case 8:
                    m.request = 8;
                    break;
                case "TPM_DISABLE_AND_READ_METATRACE":
                case 9:
                    m.request = 9;
                    break;
                case "TPM_GET_STATUS":
                case 10:
                    m.request = 10;
                    break;
                }
                switch (d.response) {
                case "TPM_UNSPECIFIED":
                case 0:
                    m.response = 0;
                    break;
                case "TPM_APPEND_TRACE_DATA":
                case 1:
                    m.response = 1;
                    break;
                case "TPM_FINALIZE_TRACE_DATA":
                case 2:
                    m.response = 2;
                    break;
                case "TPM_QUERY_STREAMING":
                case 3:
                    m.response = 3;
                    break;
                case "TPM_COMPUTE_METRIC":
                case 5:
                    m.response = 5;
                    break;
                case "TPM_GET_METRIC_DESCRIPTORS":
                case 6:
                    m.response = 6;
                    break;
                case "TPM_RESTORE_INITIAL_TABLES":
                case 7:
                    m.response = 7;
                    break;
                case "TPM_ENABLE_METATRACE":
                case 8:
                    m.response = 8;
                    break;
                case "TPM_DISABLE_AND_READ_METATRACE":
                case 9:
                    m.response = 9;
                    break;
                case "TPM_GET_STATUS":
                case 10:
                    m.response = 10;
                    break;
                }
                switch (d.invalidRequest) {
                case "TPM_UNSPECIFIED":
                case 0:
                    m.invalidRequest = 0;
                    break;
                case "TPM_APPEND_TRACE_DATA":
                case 1:
                    m.invalidRequest = 1;
                    break;
                case "TPM_FINALIZE_TRACE_DATA":
                case 2:
                    m.invalidRequest = 2;
                    break;
                case "TPM_QUERY_STREAMING":
                case 3:
                    m.invalidRequest = 3;
                    break;
                case "TPM_COMPUTE_METRIC":
                case 5:
                    m.invalidRequest = 5;
                    break;
                case "TPM_GET_METRIC_DESCRIPTORS":
                case 6:
                    m.invalidRequest = 6;
                    break;
                case "TPM_RESTORE_INITIAL_TABLES":
                case 7:
                    m.invalidRequest = 7;
                    break;
                case "TPM_ENABLE_METATRACE":
                case 8:
                    m.invalidRequest = 8;
                    break;
                case "TPM_DISABLE_AND_READ_METATRACE":
                case 9:
                    m.invalidRequest = 9;
                    break;
                case "TPM_GET_STATUS":
                case 10:
                    m.invalidRequest = 10;
                    break;
                }
                if (d.appendTraceData != null) {
                    if (typeof d.appendTraceData === "string")
                        $util.base64.decode(d.appendTraceData, m.appendTraceData = $util.newBuffer($util.base64.length(d.appendTraceData)), 0);
                    else if (d.appendTraceData.length)
                        m.appendTraceData = d.appendTraceData;
                }
                if (d.queryArgs != null) {
                    if (typeof d.queryArgs !== "object")
                        throw TypeError(".perfetto.protos.TraceProcessorRpc.queryArgs: object expected");
                    m.queryArgs = $root.perfetto.protos.QueryArgs.fromObject(d.queryArgs);
                }
                if (d.computeMetricArgs != null) {
                    if (typeof d.computeMetricArgs !== "object")
                        throw TypeError(".perfetto.protos.TraceProcessorRpc.computeMetricArgs: object expected");
                    m.computeMetricArgs = $root.perfetto.protos.ComputeMetricArgs.fromObject(d.computeMetricArgs);
                }
                if (d.enableMetatraceArgs != null) {
                    if (typeof d.enableMetatraceArgs !== "object")
                        throw TypeError(".perfetto.protos.TraceProcessorRpc.enableMetatraceArgs: object expected");
                    m.enableMetatraceArgs = $root.perfetto.protos.EnableMetatraceArgs.fromObject(d.enableMetatraceArgs);
                }
                if (d.appendResult != null) {
                    if (typeof d.appendResult !== "object")
                        throw TypeError(".perfetto.protos.TraceProcessorRpc.appendResult: object expected");
                    m.appendResult = $root.perfetto.protos.AppendTraceDataResult.fromObject(d.appendResult);
                }
                if (d.queryResult != null) {
                    if (typeof d.queryResult !== "object")
                        throw TypeError(".perfetto.protos.TraceProcessorRpc.queryResult: object expected");
                    m.queryResult = $root.perfetto.protos.QueryResult.fromObject(d.queryResult);
                }
                if (d.metricResult != null) {
                    if (typeof d.metricResult !== "object")
                        throw TypeError(".perfetto.protos.TraceProcessorRpc.metricResult: object expected");
                    m.metricResult = $root.perfetto.protos.ComputeMetricResult.fromObject(d.metricResult);
                }
                if (d.metricDescriptors != null) {
                    if (typeof d.metricDescriptors !== "object")
                        throw TypeError(".perfetto.protos.TraceProcessorRpc.metricDescriptors: object expected");
                    m.metricDescriptors = $root.perfetto.protos.DescriptorSet.fromObject(d.metricDescriptors);
                }
                if (d.metatrace != null) {
                    if (typeof d.metatrace !== "object")
                        throw TypeError(".perfetto.protos.TraceProcessorRpc.metatrace: object expected");
                    m.metatrace = $root.perfetto.protos.DisableAndReadMetatraceResult.fromObject(d.metatrace);
                }
                if (d.status != null) {
                    if (typeof d.status !== "object")
                        throw TypeError(".perfetto.protos.TraceProcessorRpc.status: object expected");
                    m.status = $root.perfetto.protos.StatusResult.fromObject(d.status);
                }
                return m;
            };

            /**
             * Creates a plain object from a TraceProcessorRpc message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.TraceProcessorRpc
             * @static
             * @param {perfetto.protos.TraceProcessorRpc} m TraceProcessorRpc
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            TraceProcessorRpc.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.seq = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.seq = o.longs === String ? "0" : 0;
                    d.fatalError = "";
                }
                if (m.seq != null && m.hasOwnProperty("seq")) {
                    if (typeof m.seq === "number")
                        d.seq = o.longs === String ? String(m.seq) : m.seq;
                    else
                        d.seq = o.longs === String ? $util.Long.prototype.toString.call(m.seq) : o.longs === Number ? new $util.LongBits(m.seq.low >>> 0, m.seq.high >>> 0).toNumber() : m.seq;
                }
                if (m.request != null && m.hasOwnProperty("request")) {
                    d.request = o.enums === String ? $root.perfetto.protos.TraceProcessorRpc.TraceProcessorMethod[m.request] : m.request;
                    if (o.oneofs)
                        d.type = "request";
                }
                if (m.response != null && m.hasOwnProperty("response")) {
                    d.response = o.enums === String ? $root.perfetto.protos.TraceProcessorRpc.TraceProcessorMethod[m.response] : m.response;
                    if (o.oneofs)
                        d.type = "response";
                }
                if (m.invalidRequest != null && m.hasOwnProperty("invalidRequest")) {
                    d.invalidRequest = o.enums === String ? $root.perfetto.protos.TraceProcessorRpc.TraceProcessorMethod[m.invalidRequest] : m.invalidRequest;
                    if (o.oneofs)
                        d.type = "invalidRequest";
                }
                if (m.fatalError != null && m.hasOwnProperty("fatalError")) {
                    d.fatalError = m.fatalError;
                }
                if (m.appendTraceData != null && m.hasOwnProperty("appendTraceData")) {
                    d.appendTraceData = o.bytes === String ? $util.base64.encode(m.appendTraceData, 0, m.appendTraceData.length) : o.bytes === Array ? Array.prototype.slice.call(m.appendTraceData) : m.appendTraceData;
                    if (o.oneofs)
                        d.args = "appendTraceData";
                }
                if (m.queryArgs != null && m.hasOwnProperty("queryArgs")) {
                    d.queryArgs = $root.perfetto.protos.QueryArgs.toObject(m.queryArgs, o);
                    if (o.oneofs)
                        d.args = "queryArgs";
                }
                if (m.computeMetricArgs != null && m.hasOwnProperty("computeMetricArgs")) {
                    d.computeMetricArgs = $root.perfetto.protos.ComputeMetricArgs.toObject(m.computeMetricArgs, o);
                    if (o.oneofs)
                        d.args = "computeMetricArgs";
                }
                if (m.enableMetatraceArgs != null && m.hasOwnProperty("enableMetatraceArgs")) {
                    d.enableMetatraceArgs = $root.perfetto.protos.EnableMetatraceArgs.toObject(m.enableMetatraceArgs, o);
                    if (o.oneofs)
                        d.args = "enableMetatraceArgs";
                }
                if (m.appendResult != null && m.hasOwnProperty("appendResult")) {
                    d.appendResult = $root.perfetto.protos.AppendTraceDataResult.toObject(m.appendResult, o);
                    if (o.oneofs)
                        d.args = "appendResult";
                }
                if (m.queryResult != null && m.hasOwnProperty("queryResult")) {
                    d.queryResult = $root.perfetto.protos.QueryResult.toObject(m.queryResult, o);
                    if (o.oneofs)
                        d.args = "queryResult";
                }
                if (m.metricResult != null && m.hasOwnProperty("metricResult")) {
                    d.metricResult = $root.perfetto.protos.ComputeMetricResult.toObject(m.metricResult, o);
                    if (o.oneofs)
                        d.args = "metricResult";
                }
                if (m.metricDescriptors != null && m.hasOwnProperty("metricDescriptors")) {
                    d.metricDescriptors = $root.perfetto.protos.DescriptorSet.toObject(m.metricDescriptors, o);
                    if (o.oneofs)
                        d.args = "metricDescriptors";
                }
                if (m.metatrace != null && m.hasOwnProperty("metatrace")) {
                    d.metatrace = $root.perfetto.protos.DisableAndReadMetatraceResult.toObject(m.metatrace, o);
                    if (o.oneofs)
                        d.args = "metatrace";
                }
                if (m.status != null && m.hasOwnProperty("status")) {
                    d.status = $root.perfetto.protos.StatusResult.toObject(m.status, o);
                    if (o.oneofs)
                        d.args = "status";
                }
                return d;
            };

            /**
             * Converts this TraceProcessorRpc to JSON.
             * @function toJSON
             * @memberof perfetto.protos.TraceProcessorRpc
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            TraceProcessorRpc.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * TraceProcessorMethod enum.
             * @name perfetto.protos.TraceProcessorRpc.TraceProcessorMethod
             * @enum {number}
             * @property {number} TPM_UNSPECIFIED=0 TPM_UNSPECIFIED value
             * @property {number} TPM_APPEND_TRACE_DATA=1 TPM_APPEND_TRACE_DATA value
             * @property {number} TPM_FINALIZE_TRACE_DATA=2 TPM_FINALIZE_TRACE_DATA value
             * @property {number} TPM_QUERY_STREAMING=3 TPM_QUERY_STREAMING value
             * @property {number} TPM_COMPUTE_METRIC=5 TPM_COMPUTE_METRIC value
             * @property {number} TPM_GET_METRIC_DESCRIPTORS=6 TPM_GET_METRIC_DESCRIPTORS value
             * @property {number} TPM_RESTORE_INITIAL_TABLES=7 TPM_RESTORE_INITIAL_TABLES value
             * @property {number} TPM_ENABLE_METATRACE=8 TPM_ENABLE_METATRACE value
             * @property {number} TPM_DISABLE_AND_READ_METATRACE=9 TPM_DISABLE_AND_READ_METATRACE value
             * @property {number} TPM_GET_STATUS=10 TPM_GET_STATUS value
             */
            TraceProcessorRpc.TraceProcessorMethod = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "TPM_UNSPECIFIED"] = 0;
                values[valuesById[1] = "TPM_APPEND_TRACE_DATA"] = 1;
                values[valuesById[2] = "TPM_FINALIZE_TRACE_DATA"] = 2;
                values[valuesById[3] = "TPM_QUERY_STREAMING"] = 3;
                values[valuesById[5] = "TPM_COMPUTE_METRIC"] = 5;
                values[valuesById[6] = "TPM_GET_METRIC_DESCRIPTORS"] = 6;
                values[valuesById[7] = "TPM_RESTORE_INITIAL_TABLES"] = 7;
                values[valuesById[8] = "TPM_ENABLE_METATRACE"] = 8;
                values[valuesById[9] = "TPM_DISABLE_AND_READ_METATRACE"] = 9;
                values[valuesById[10] = "TPM_GET_STATUS"] = 10;
                return values;
            })();

            return TraceProcessorRpc;
        })();

        protos.AppendTraceDataResult = (function() {

            /**
             * Properties of an AppendTraceDataResult.
             * @memberof perfetto.protos
             * @interface IAppendTraceDataResult
             * @property {number|null} [totalBytesParsed] AppendTraceDataResult totalBytesParsed
             * @property {string|null} [error] AppendTraceDataResult error
             */

            /**
             * Constructs a new AppendTraceDataResult.
             * @memberof perfetto.protos
             * @classdesc Represents an AppendTraceDataResult.
             * @implements IAppendTraceDataResult
             * @constructor
             * @param {perfetto.protos.IAppendTraceDataResult=} [p] Properties to set
             */
            function AppendTraceDataResult(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * AppendTraceDataResult totalBytesParsed.
             * @member {number} totalBytesParsed
             * @memberof perfetto.protos.AppendTraceDataResult
             * @instance
             */
            AppendTraceDataResult.prototype.totalBytesParsed = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

            /**
             * AppendTraceDataResult error.
             * @member {string} error
             * @memberof perfetto.protos.AppendTraceDataResult
             * @instance
             */
            AppendTraceDataResult.prototype.error = "";

            /**
             * Creates a new AppendTraceDataResult instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.AppendTraceDataResult
             * @static
             * @param {perfetto.protos.IAppendTraceDataResult=} [properties] Properties to set
             * @returns {perfetto.protos.AppendTraceDataResult} AppendTraceDataResult instance
             */
            AppendTraceDataResult.create = function create(properties) {
                return new AppendTraceDataResult(properties);
            };

            /**
             * Encodes the specified AppendTraceDataResult message. Does not implicitly {@link perfetto.protos.AppendTraceDataResult.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.AppendTraceDataResult
             * @static
             * @param {perfetto.protos.IAppendTraceDataResult} m AppendTraceDataResult message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AppendTraceDataResult.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.totalBytesParsed != null && Object.hasOwnProperty.call(m, "totalBytesParsed"))
                    w.uint32(8).int64(m.totalBytesParsed);
                if (m.error != null && Object.hasOwnProperty.call(m, "error"))
                    w.uint32(18).string(m.error);
                return w;
            };

            /**
             * Encodes the specified AppendTraceDataResult message, length delimited. Does not implicitly {@link perfetto.protos.AppendTraceDataResult.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.AppendTraceDataResult
             * @static
             * @param {perfetto.protos.IAppendTraceDataResult} message AppendTraceDataResult message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            AppendTraceDataResult.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an AppendTraceDataResult message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.AppendTraceDataResult
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.AppendTraceDataResult} AppendTraceDataResult
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AppendTraceDataResult.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.AppendTraceDataResult();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.totalBytesParsed = r.int64();
                        break;
                    case 2:
                        m.error = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an AppendTraceDataResult message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.AppendTraceDataResult
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.AppendTraceDataResult} AppendTraceDataResult
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            AppendTraceDataResult.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an AppendTraceDataResult message.
             * @function verify
             * @memberof perfetto.protos.AppendTraceDataResult
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            AppendTraceDataResult.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.totalBytesParsed != null && m.hasOwnProperty("totalBytesParsed")) {
                    if (!$util.isInteger(m.totalBytesParsed) && !(m.totalBytesParsed && $util.isInteger(m.totalBytesParsed.low) && $util.isInteger(m.totalBytesParsed.high)))
                        return "totalBytesParsed: integer|Long expected";
                }
                if (m.error != null && m.hasOwnProperty("error")) {
                    if (!$util.isString(m.error))
                        return "error: string expected";
                }
                return null;
            };

            /**
             * Creates an AppendTraceDataResult message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.AppendTraceDataResult
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.AppendTraceDataResult} AppendTraceDataResult
             */
            AppendTraceDataResult.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.AppendTraceDataResult)
                    return d;
                var m = new $root.perfetto.protos.AppendTraceDataResult();
                if (d.totalBytesParsed != null) {
                    if ($util.Long)
                        (m.totalBytesParsed = $util.Long.fromValue(d.totalBytesParsed)).unsigned = false;
                    else if (typeof d.totalBytesParsed === "string")
                        m.totalBytesParsed = parseInt(d.totalBytesParsed, 10);
                    else if (typeof d.totalBytesParsed === "number")
                        m.totalBytesParsed = d.totalBytesParsed;
                    else if (typeof d.totalBytesParsed === "object")
                        m.totalBytesParsed = new $util.LongBits(d.totalBytesParsed.low >>> 0, d.totalBytesParsed.high >>> 0).toNumber();
                }
                if (d.error != null) {
                    m.error = String(d.error);
                }
                return m;
            };

            /**
             * Creates a plain object from an AppendTraceDataResult message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.AppendTraceDataResult
             * @static
             * @param {perfetto.protos.AppendTraceDataResult} m AppendTraceDataResult
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            AppendTraceDataResult.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if ($util.Long) {
                        var n = new $util.Long(0, 0, false);
                        d.totalBytesParsed = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
                    } else
                        d.totalBytesParsed = o.longs === String ? "0" : 0;
                    d.error = "";
                }
                if (m.totalBytesParsed != null && m.hasOwnProperty("totalBytesParsed")) {
                    if (typeof m.totalBytesParsed === "number")
                        d.totalBytesParsed = o.longs === String ? String(m.totalBytesParsed) : m.totalBytesParsed;
                    else
                        d.totalBytesParsed = o.longs === String ? $util.Long.prototype.toString.call(m.totalBytesParsed) : o.longs === Number ? new $util.LongBits(m.totalBytesParsed.low >>> 0, m.totalBytesParsed.high >>> 0).toNumber() : m.totalBytesParsed;
                }
                if (m.error != null && m.hasOwnProperty("error")) {
                    d.error = m.error;
                }
                return d;
            };

            /**
             * Converts this AppendTraceDataResult to JSON.
             * @function toJSON
             * @memberof perfetto.protos.AppendTraceDataResult
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            AppendTraceDataResult.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return AppendTraceDataResult;
        })();

        protos.QueryArgs = (function() {

            /**
             * Properties of a QueryArgs.
             * @memberof perfetto.protos
             * @interface IQueryArgs
             * @property {string|null} [sqlQuery] QueryArgs sqlQuery
             * @property {string|null} [tag] QueryArgs tag
             */

            /**
             * Constructs a new QueryArgs.
             * @memberof perfetto.protos
             * @classdesc Represents a QueryArgs.
             * @implements IQueryArgs
             * @constructor
             * @param {perfetto.protos.IQueryArgs=} [p] Properties to set
             */
            function QueryArgs(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * QueryArgs sqlQuery.
             * @member {string} sqlQuery
             * @memberof perfetto.protos.QueryArgs
             * @instance
             */
            QueryArgs.prototype.sqlQuery = "";

            /**
             * QueryArgs tag.
             * @member {string} tag
             * @memberof perfetto.protos.QueryArgs
             * @instance
             */
            QueryArgs.prototype.tag = "";

            /**
             * Creates a new QueryArgs instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.QueryArgs
             * @static
             * @param {perfetto.protos.IQueryArgs=} [properties] Properties to set
             * @returns {perfetto.protos.QueryArgs} QueryArgs instance
             */
            QueryArgs.create = function create(properties) {
                return new QueryArgs(properties);
            };

            /**
             * Encodes the specified QueryArgs message. Does not implicitly {@link perfetto.protos.QueryArgs.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.QueryArgs
             * @static
             * @param {perfetto.protos.IQueryArgs} m QueryArgs message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            QueryArgs.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.sqlQuery != null && Object.hasOwnProperty.call(m, "sqlQuery"))
                    w.uint32(10).string(m.sqlQuery);
                if (m.tag != null && Object.hasOwnProperty.call(m, "tag"))
                    w.uint32(26).string(m.tag);
                return w;
            };

            /**
             * Encodes the specified QueryArgs message, length delimited. Does not implicitly {@link perfetto.protos.QueryArgs.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.QueryArgs
             * @static
             * @param {perfetto.protos.IQueryArgs} message QueryArgs message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            QueryArgs.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a QueryArgs message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.QueryArgs
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.QueryArgs} QueryArgs
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            QueryArgs.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.QueryArgs();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.sqlQuery = r.string();
                        break;
                    case 3:
                        m.tag = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a QueryArgs message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.QueryArgs
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.QueryArgs} QueryArgs
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            QueryArgs.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a QueryArgs message.
             * @function verify
             * @memberof perfetto.protos.QueryArgs
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            QueryArgs.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.sqlQuery != null && m.hasOwnProperty("sqlQuery")) {
                    if (!$util.isString(m.sqlQuery))
                        return "sqlQuery: string expected";
                }
                if (m.tag != null && m.hasOwnProperty("tag")) {
                    if (!$util.isString(m.tag))
                        return "tag: string expected";
                }
                return null;
            };

            /**
             * Creates a QueryArgs message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.QueryArgs
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.QueryArgs} QueryArgs
             */
            QueryArgs.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.QueryArgs)
                    return d;
                var m = new $root.perfetto.protos.QueryArgs();
                if (d.sqlQuery != null) {
                    m.sqlQuery = String(d.sqlQuery);
                }
                if (d.tag != null) {
                    m.tag = String(d.tag);
                }
                return m;
            };

            /**
             * Creates a plain object from a QueryArgs message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.QueryArgs
             * @static
             * @param {perfetto.protos.QueryArgs} m QueryArgs
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            QueryArgs.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.sqlQuery = "";
                    d.tag = "";
                }
                if (m.sqlQuery != null && m.hasOwnProperty("sqlQuery")) {
                    d.sqlQuery = m.sqlQuery;
                }
                if (m.tag != null && m.hasOwnProperty("tag")) {
                    d.tag = m.tag;
                }
                return d;
            };

            /**
             * Converts this QueryArgs to JSON.
             * @function toJSON
             * @memberof perfetto.protos.QueryArgs
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            QueryArgs.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return QueryArgs;
        })();

        protos.QueryResult = (function() {

            /**
             * Properties of a QueryResult.
             * @memberof perfetto.protos
             * @interface IQueryResult
             * @property {Array.<string>|null} [columnNames] QueryResult columnNames
             * @property {string|null} [error] QueryResult error
             * @property {Array.<perfetto.protos.QueryResult.ICellsBatch>|null} [batch] QueryResult batch
             * @property {number|null} [statementCount] QueryResult statementCount
             * @property {number|null} [statementWithOutputCount] QueryResult statementWithOutputCount
             */

            /**
             * Constructs a new QueryResult.
             * @memberof perfetto.protos
             * @classdesc Represents a QueryResult.
             * @implements IQueryResult
             * @constructor
             * @param {perfetto.protos.IQueryResult=} [p] Properties to set
             */
            function QueryResult(p) {
                this.columnNames = [];
                this.batch = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * QueryResult columnNames.
             * @member {Array.<string>} columnNames
             * @memberof perfetto.protos.QueryResult
             * @instance
             */
            QueryResult.prototype.columnNames = $util.emptyArray;

            /**
             * QueryResult error.
             * @member {string} error
             * @memberof perfetto.protos.QueryResult
             * @instance
             */
            QueryResult.prototype.error = "";

            /**
             * QueryResult batch.
             * @member {Array.<perfetto.protos.QueryResult.ICellsBatch>} batch
             * @memberof perfetto.protos.QueryResult
             * @instance
             */
            QueryResult.prototype.batch = $util.emptyArray;

            /**
             * QueryResult statementCount.
             * @member {number} statementCount
             * @memberof perfetto.protos.QueryResult
             * @instance
             */
            QueryResult.prototype.statementCount = 0;

            /**
             * QueryResult statementWithOutputCount.
             * @member {number} statementWithOutputCount
             * @memberof perfetto.protos.QueryResult
             * @instance
             */
            QueryResult.prototype.statementWithOutputCount = 0;

            /**
             * Creates a new QueryResult instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.QueryResult
             * @static
             * @param {perfetto.protos.IQueryResult=} [properties] Properties to set
             * @returns {perfetto.protos.QueryResult} QueryResult instance
             */
            QueryResult.create = function create(properties) {
                return new QueryResult(properties);
            };

            /**
             * Encodes the specified QueryResult message. Does not implicitly {@link perfetto.protos.QueryResult.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.QueryResult
             * @static
             * @param {perfetto.protos.IQueryResult} m QueryResult message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            QueryResult.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.columnNames != null && m.columnNames.length) {
                    for (var i = 0; i < m.columnNames.length; ++i)
                        w.uint32(10).string(m.columnNames[i]);
                }
                if (m.error != null && Object.hasOwnProperty.call(m, "error"))
                    w.uint32(18).string(m.error);
                if (m.batch != null && m.batch.length) {
                    for (var i = 0; i < m.batch.length; ++i)
                        $root.perfetto.protos.QueryResult.CellsBatch.encode(m.batch[i], w.uint32(26).fork()).ldelim();
                }
                if (m.statementCount != null && Object.hasOwnProperty.call(m, "statementCount"))
                    w.uint32(32).uint32(m.statementCount);
                if (m.statementWithOutputCount != null && Object.hasOwnProperty.call(m, "statementWithOutputCount"))
                    w.uint32(40).uint32(m.statementWithOutputCount);
                return w;
            };

            /**
             * Encodes the specified QueryResult message, length delimited. Does not implicitly {@link perfetto.protos.QueryResult.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.QueryResult
             * @static
             * @param {perfetto.protos.IQueryResult} message QueryResult message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            QueryResult.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a QueryResult message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.QueryResult
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.QueryResult} QueryResult
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            QueryResult.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.QueryResult();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.columnNames && m.columnNames.length))
                            m.columnNames = [];
                        m.columnNames.push(r.string());
                        break;
                    case 2:
                        m.error = r.string();
                        break;
                    case 3:
                        if (!(m.batch && m.batch.length))
                            m.batch = [];
                        m.batch.push($root.perfetto.protos.QueryResult.CellsBatch.decode(r, r.uint32()));
                        break;
                    case 4:
                        m.statementCount = r.uint32();
                        break;
                    case 5:
                        m.statementWithOutputCount = r.uint32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a QueryResult message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.QueryResult
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.QueryResult} QueryResult
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            QueryResult.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a QueryResult message.
             * @function verify
             * @memberof perfetto.protos.QueryResult
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            QueryResult.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.columnNames != null && m.hasOwnProperty("columnNames")) {
                    if (!Array.isArray(m.columnNames))
                        return "columnNames: array expected";
                    for (var i = 0; i < m.columnNames.length; ++i) {
                        if (!$util.isString(m.columnNames[i]))
                            return "columnNames: string[] expected";
                    }
                }
                if (m.error != null && m.hasOwnProperty("error")) {
                    if (!$util.isString(m.error))
                        return "error: string expected";
                }
                if (m.batch != null && m.hasOwnProperty("batch")) {
                    if (!Array.isArray(m.batch))
                        return "batch: array expected";
                    for (var i = 0; i < m.batch.length; ++i) {
                        {
                            var e = $root.perfetto.protos.QueryResult.CellsBatch.verify(m.batch[i]);
                            if (e)
                                return "batch." + e;
                        }
                    }
                }
                if (m.statementCount != null && m.hasOwnProperty("statementCount")) {
                    if (!$util.isInteger(m.statementCount))
                        return "statementCount: integer expected";
                }
                if (m.statementWithOutputCount != null && m.hasOwnProperty("statementWithOutputCount")) {
                    if (!$util.isInteger(m.statementWithOutputCount))
                        return "statementWithOutputCount: integer expected";
                }
                return null;
            };

            /**
             * Creates a QueryResult message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.QueryResult
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.QueryResult} QueryResult
             */
            QueryResult.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.QueryResult)
                    return d;
                var m = new $root.perfetto.protos.QueryResult();
                if (d.columnNames) {
                    if (!Array.isArray(d.columnNames))
                        throw TypeError(".perfetto.protos.QueryResult.columnNames: array expected");
                    m.columnNames = [];
                    for (var i = 0; i < d.columnNames.length; ++i) {
                        m.columnNames[i] = String(d.columnNames[i]);
                    }
                }
                if (d.error != null) {
                    m.error = String(d.error);
                }
                if (d.batch) {
                    if (!Array.isArray(d.batch))
                        throw TypeError(".perfetto.protos.QueryResult.batch: array expected");
                    m.batch = [];
                    for (var i = 0; i < d.batch.length; ++i) {
                        if (typeof d.batch[i] !== "object")
                            throw TypeError(".perfetto.protos.QueryResult.batch: object expected");
                        m.batch[i] = $root.perfetto.protos.QueryResult.CellsBatch.fromObject(d.batch[i]);
                    }
                }
                if (d.statementCount != null) {
                    m.statementCount = d.statementCount >>> 0;
                }
                if (d.statementWithOutputCount != null) {
                    m.statementWithOutputCount = d.statementWithOutputCount >>> 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a QueryResult message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.QueryResult
             * @static
             * @param {perfetto.protos.QueryResult} m QueryResult
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            QueryResult.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.columnNames = [];
                    d.batch = [];
                }
                if (o.defaults) {
                    d.error = "";
                    d.statementCount = 0;
                    d.statementWithOutputCount = 0;
                }
                if (m.columnNames && m.columnNames.length) {
                    d.columnNames = [];
                    for (var j = 0; j < m.columnNames.length; ++j) {
                        d.columnNames[j] = m.columnNames[j];
                    }
                }
                if (m.error != null && m.hasOwnProperty("error")) {
                    d.error = m.error;
                }
                if (m.batch && m.batch.length) {
                    d.batch = [];
                    for (var j = 0; j < m.batch.length; ++j) {
                        d.batch[j] = $root.perfetto.protos.QueryResult.CellsBatch.toObject(m.batch[j], o);
                    }
                }
                if (m.statementCount != null && m.hasOwnProperty("statementCount")) {
                    d.statementCount = m.statementCount;
                }
                if (m.statementWithOutputCount != null && m.hasOwnProperty("statementWithOutputCount")) {
                    d.statementWithOutputCount = m.statementWithOutputCount;
                }
                return d;
            };

            /**
             * Converts this QueryResult to JSON.
             * @function toJSON
             * @memberof perfetto.protos.QueryResult
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            QueryResult.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            QueryResult.CellsBatch = (function() {

                /**
                 * Properties of a CellsBatch.
                 * @memberof perfetto.protos.QueryResult
                 * @interface ICellsBatch
                 * @property {Array.<perfetto.protos.QueryResult.CellsBatch.CellType>|null} [cells] CellsBatch cells
                 * @property {Array.<number>|null} [varintCells] CellsBatch varintCells
                 * @property {Array.<number>|null} [float64Cells] CellsBatch float64Cells
                 * @property {Array.<Uint8Array>|null} [blobCells] CellsBatch blobCells
                 * @property {string|null} [stringCells] CellsBatch stringCells
                 * @property {boolean|null} [isLastBatch] CellsBatch isLastBatch
                 */

                /**
                 * Constructs a new CellsBatch.
                 * @memberof perfetto.protos.QueryResult
                 * @classdesc Represents a CellsBatch.
                 * @implements ICellsBatch
                 * @constructor
                 * @param {perfetto.protos.QueryResult.ICellsBatch=} [p] Properties to set
                 */
                function CellsBatch(p) {
                    this.cells = [];
                    this.varintCells = [];
                    this.float64Cells = [];
                    this.blobCells = [];
                    if (p)
                        for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                            if (p[ks[i]] != null)
                                this[ks[i]] = p[ks[i]];
                }

                /**
                 * CellsBatch cells.
                 * @member {Array.<perfetto.protos.QueryResult.CellsBatch.CellType>} cells
                 * @memberof perfetto.protos.QueryResult.CellsBatch
                 * @instance
                 */
                CellsBatch.prototype.cells = $util.emptyArray;

                /**
                 * CellsBatch varintCells.
                 * @member {Array.<number>} varintCells
                 * @memberof perfetto.protos.QueryResult.CellsBatch
                 * @instance
                 */
                CellsBatch.prototype.varintCells = $util.emptyArray;

                /**
                 * CellsBatch float64Cells.
                 * @member {Array.<number>} float64Cells
                 * @memberof perfetto.protos.QueryResult.CellsBatch
                 * @instance
                 */
                CellsBatch.prototype.float64Cells = $util.emptyArray;

                /**
                 * CellsBatch blobCells.
                 * @member {Array.<Uint8Array>} blobCells
                 * @memberof perfetto.protos.QueryResult.CellsBatch
                 * @instance
                 */
                CellsBatch.prototype.blobCells = $util.emptyArray;

                /**
                 * CellsBatch stringCells.
                 * @member {string} stringCells
                 * @memberof perfetto.protos.QueryResult.CellsBatch
                 * @instance
                 */
                CellsBatch.prototype.stringCells = "";

                /**
                 * CellsBatch isLastBatch.
                 * @member {boolean} isLastBatch
                 * @memberof perfetto.protos.QueryResult.CellsBatch
                 * @instance
                 */
                CellsBatch.prototype.isLastBatch = false;

                /**
                 * Creates a new CellsBatch instance using the specified properties.
                 * @function create
                 * @memberof perfetto.protos.QueryResult.CellsBatch
                 * @static
                 * @param {perfetto.protos.QueryResult.ICellsBatch=} [properties] Properties to set
                 * @returns {perfetto.protos.QueryResult.CellsBatch} CellsBatch instance
                 */
                CellsBatch.create = function create(properties) {
                    return new CellsBatch(properties);
                };

                /**
                 * Encodes the specified CellsBatch message. Does not implicitly {@link perfetto.protos.QueryResult.CellsBatch.verify|verify} messages.
                 * @function encode
                 * @memberof perfetto.protos.QueryResult.CellsBatch
                 * @static
                 * @param {perfetto.protos.QueryResult.ICellsBatch} m CellsBatch message or plain object to encode
                 * @param {$protobuf.Writer} [w] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CellsBatch.encode = function encode(m, w) {
                    if (!w)
                        w = $Writer.create();
                    if (m.cells != null && m.cells.length) {
                        w.uint32(10).fork();
                        for (var i = 0; i < m.cells.length; ++i)
                            w.int32(m.cells[i]);
                        w.ldelim();
                    }
                    if (m.varintCells != null && m.varintCells.length) {
                        w.uint32(18).fork();
                        for (var i = 0; i < m.varintCells.length; ++i)
                            w.int64(m.varintCells[i]);
                        w.ldelim();
                    }
                    if (m.float64Cells != null && m.float64Cells.length) {
                        w.uint32(26).fork();
                        for (var i = 0; i < m.float64Cells.length; ++i)
                            w.double(m.float64Cells[i]);
                        w.ldelim();
                    }
                    if (m.blobCells != null && m.blobCells.length) {
                        for (var i = 0; i < m.blobCells.length; ++i)
                            w.uint32(34).bytes(m.blobCells[i]);
                    }
                    if (m.stringCells != null && Object.hasOwnProperty.call(m, "stringCells"))
                        w.uint32(42).string(m.stringCells);
                    if (m.isLastBatch != null && Object.hasOwnProperty.call(m, "isLastBatch"))
                        w.uint32(48).bool(m.isLastBatch);
                    return w;
                };

                /**
                 * Encodes the specified CellsBatch message, length delimited. Does not implicitly {@link perfetto.protos.QueryResult.CellsBatch.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof perfetto.protos.QueryResult.CellsBatch
                 * @static
                 * @param {perfetto.protos.QueryResult.ICellsBatch} message CellsBatch message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CellsBatch.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };

                /**
                 * Decodes a CellsBatch message from the specified reader or buffer.
                 * @function decode
                 * @memberof perfetto.protos.QueryResult.CellsBatch
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
                 * @param {number} [l] Message length if known beforehand
                 * @returns {perfetto.protos.QueryResult.CellsBatch} CellsBatch
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CellsBatch.decode = function decode(r, l) {
                    if (!(r instanceof $Reader))
                        r = $Reader.create(r);
                    var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.QueryResult.CellsBatch();
                    while (r.pos < c) {
                        var t = r.uint32();
                        switch (t >>> 3) {
                        case 1:
                            if (!(m.cells && m.cells.length))
                                m.cells = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.cells.push(r.int32());
                            } else
                                m.cells.push(r.int32());
                            break;
                        case 2:
                            if (!(m.varintCells && m.varintCells.length))
                                m.varintCells = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.varintCells.push(r.int64());
                            } else
                                m.varintCells.push(r.int64());
                            break;
                        case 3:
                            if (!(m.float64Cells && m.float64Cells.length))
                                m.float64Cells = [];
                            if ((t & 7) === 2) {
                                var c2 = r.uint32() + r.pos;
                                while (r.pos < c2)
                                    m.float64Cells.push(r.double());
                            } else
                                m.float64Cells.push(r.double());
                            break;
                        case 4:
                            if (!(m.blobCells && m.blobCells.length))
                                m.blobCells = [];
                            m.blobCells.push(r.bytes());
                            break;
                        case 5:
                            m.stringCells = r.string();
                            break;
                        case 6:
                            m.isLastBatch = r.bool();
                            break;
                        default:
                            r.skipType(t & 7);
                            break;
                        }
                    }
                    return m;
                };

                /**
                 * Decodes a CellsBatch message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof perfetto.protos.QueryResult.CellsBatch
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {perfetto.protos.QueryResult.CellsBatch} CellsBatch
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CellsBatch.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };

                /**
                 * Verifies a CellsBatch message.
                 * @function verify
                 * @memberof perfetto.protos.QueryResult.CellsBatch
                 * @static
                 * @param {Object.<string,*>} m Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                CellsBatch.verify = function verify(m) {
                    if (typeof m !== "object" || m === null)
                        return "object expected";
                    if (m.cells != null && m.hasOwnProperty("cells")) {
                        if (!Array.isArray(m.cells))
                            return "cells: array expected";
                        for (var i = 0; i < m.cells.length; ++i) {
                            switch (m.cells[i]) {
                            default:
                                return "cells: enum value[] expected";
                            case 0:
                            case 1:
                            case 2:
                            case 3:
                            case 4:
                            case 5:
                                break;
                            }
                        }
                    }
                    if (m.varintCells != null && m.hasOwnProperty("varintCells")) {
                        if (!Array.isArray(m.varintCells))
                            return "varintCells: array expected";
                        for (var i = 0; i < m.varintCells.length; ++i) {
                            if (!$util.isInteger(m.varintCells[i]) && !(m.varintCells[i] && $util.isInteger(m.varintCells[i].low) && $util.isInteger(m.varintCells[i].high)))
                                return "varintCells: integer|Long[] expected";
                        }
                    }
                    if (m.float64Cells != null && m.hasOwnProperty("float64Cells")) {
                        if (!Array.isArray(m.float64Cells))
                            return "float64Cells: array expected";
                        for (var i = 0; i < m.float64Cells.length; ++i) {
                            if (typeof m.float64Cells[i] !== "number")
                                return "float64Cells: number[] expected";
                        }
                    }
                    if (m.blobCells != null && m.hasOwnProperty("blobCells")) {
                        if (!Array.isArray(m.blobCells))
                            return "blobCells: array expected";
                        for (var i = 0; i < m.blobCells.length; ++i) {
                            if (!(m.blobCells[i] && typeof m.blobCells[i].length === "number" || $util.isString(m.blobCells[i])))
                                return "blobCells: buffer[] expected";
                        }
                    }
                    if (m.stringCells != null && m.hasOwnProperty("stringCells")) {
                        if (!$util.isString(m.stringCells))
                            return "stringCells: string expected";
                    }
                    if (m.isLastBatch != null && m.hasOwnProperty("isLastBatch")) {
                        if (typeof m.isLastBatch !== "boolean")
                            return "isLastBatch: boolean expected";
                    }
                    return null;
                };

                /**
                 * Creates a CellsBatch message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof perfetto.protos.QueryResult.CellsBatch
                 * @static
                 * @param {Object.<string,*>} d Plain object
                 * @returns {perfetto.protos.QueryResult.CellsBatch} CellsBatch
                 */
                CellsBatch.fromObject = function fromObject(d) {
                    if (d instanceof $root.perfetto.protos.QueryResult.CellsBatch)
                        return d;
                    var m = new $root.perfetto.protos.QueryResult.CellsBatch();
                    if (d.cells) {
                        if (!Array.isArray(d.cells))
                            throw TypeError(".perfetto.protos.QueryResult.CellsBatch.cells: array expected");
                        m.cells = [];
                        for (var i = 0; i < d.cells.length; ++i) {
                            switch (d.cells[i]) {
                            default:
                            case "CELL_INVALID":
                            case 0:
                                m.cells[i] = 0;
                                break;
                            case "CELL_NULL":
                            case 1:
                                m.cells[i] = 1;
                                break;
                            case "CELL_VARINT":
                            case 2:
                                m.cells[i] = 2;
                                break;
                            case "CELL_FLOAT64":
                            case 3:
                                m.cells[i] = 3;
                                break;
                            case "CELL_STRING":
                            case 4:
                                m.cells[i] = 4;
                                break;
                            case "CELL_BLOB":
                            case 5:
                                m.cells[i] = 5;
                                break;
                            }
                        }
                    }
                    if (d.varintCells) {
                        if (!Array.isArray(d.varintCells))
                            throw TypeError(".perfetto.protos.QueryResult.CellsBatch.varintCells: array expected");
                        m.varintCells = [];
                        for (var i = 0; i < d.varintCells.length; ++i) {
                            if ($util.Long)
                                (m.varintCells[i] = $util.Long.fromValue(d.varintCells[i])).unsigned = false;
                            else if (typeof d.varintCells[i] === "string")
                                m.varintCells[i] = parseInt(d.varintCells[i], 10);
                            else if (typeof d.varintCells[i] === "number")
                                m.varintCells[i] = d.varintCells[i];
                            else if (typeof d.varintCells[i] === "object")
                                m.varintCells[i] = new $util.LongBits(d.varintCells[i].low >>> 0, d.varintCells[i].high >>> 0).toNumber();
                        }
                    }
                    if (d.float64Cells) {
                        if (!Array.isArray(d.float64Cells))
                            throw TypeError(".perfetto.protos.QueryResult.CellsBatch.float64Cells: array expected");
                        m.float64Cells = [];
                        for (var i = 0; i < d.float64Cells.length; ++i) {
                            m.float64Cells[i] = Number(d.float64Cells[i]);
                        }
                    }
                    if (d.blobCells) {
                        if (!Array.isArray(d.blobCells))
                            throw TypeError(".perfetto.protos.QueryResult.CellsBatch.blobCells: array expected");
                        m.blobCells = [];
                        for (var i = 0; i < d.blobCells.length; ++i) {
                            if (typeof d.blobCells[i] === "string")
                                $util.base64.decode(d.blobCells[i], m.blobCells[i] = $util.newBuffer($util.base64.length(d.blobCells[i])), 0);
                            else if (d.blobCells[i].length)
                                m.blobCells[i] = d.blobCells[i];
                        }
                    }
                    if (d.stringCells != null) {
                        m.stringCells = String(d.stringCells);
                    }
                    if (d.isLastBatch != null) {
                        m.isLastBatch = Boolean(d.isLastBatch);
                    }
                    return m;
                };

                /**
                 * Creates a plain object from a CellsBatch message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof perfetto.protos.QueryResult.CellsBatch
                 * @static
                 * @param {perfetto.protos.QueryResult.CellsBatch} m CellsBatch
                 * @param {$protobuf.IConversionOptions} [o] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                CellsBatch.toObject = function toObject(m, o) {
                    if (!o)
                        o = {};
                    var d = {};
                    if (o.arrays || o.defaults) {
                        d.cells = [];
                        d.varintCells = [];
                        d.float64Cells = [];
                        d.blobCells = [];
                    }
                    if (o.defaults) {
                        d.stringCells = "";
                        d.isLastBatch = false;
                    }
                    if (m.cells && m.cells.length) {
                        d.cells = [];
                        for (var j = 0; j < m.cells.length; ++j) {
                            d.cells[j] = o.enums === String ? $root.perfetto.protos.QueryResult.CellsBatch.CellType[m.cells[j]] : m.cells[j];
                        }
                    }
                    if (m.varintCells && m.varintCells.length) {
                        d.varintCells = [];
                        for (var j = 0; j < m.varintCells.length; ++j) {
                            if (typeof m.varintCells[j] === "number")
                                d.varintCells[j] = o.longs === String ? String(m.varintCells[j]) : m.varintCells[j];
                            else
                                d.varintCells[j] = o.longs === String ? $util.Long.prototype.toString.call(m.varintCells[j]) : o.longs === Number ? new $util.LongBits(m.varintCells[j].low >>> 0, m.varintCells[j].high >>> 0).toNumber() : m.varintCells[j];
                        }
                    }
                    if (m.float64Cells && m.float64Cells.length) {
                        d.float64Cells = [];
                        for (var j = 0; j < m.float64Cells.length; ++j) {
                            d.float64Cells[j] = o.json && !isFinite(m.float64Cells[j]) ? String(m.float64Cells[j]) : m.float64Cells[j];
                        }
                    }
                    if (m.blobCells && m.blobCells.length) {
                        d.blobCells = [];
                        for (var j = 0; j < m.blobCells.length; ++j) {
                            d.blobCells[j] = o.bytes === String ? $util.base64.encode(m.blobCells[j], 0, m.blobCells[j].length) : o.bytes === Array ? Array.prototype.slice.call(m.blobCells[j]) : m.blobCells[j];
                        }
                    }
                    if (m.stringCells != null && m.hasOwnProperty("stringCells")) {
                        d.stringCells = m.stringCells;
                    }
                    if (m.isLastBatch != null && m.hasOwnProperty("isLastBatch")) {
                        d.isLastBatch = m.isLastBatch;
                    }
                    return d;
                };

                /**
                 * Converts this CellsBatch to JSON.
                 * @function toJSON
                 * @memberof perfetto.protos.QueryResult.CellsBatch
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                CellsBatch.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
                };

                /**
                 * CellType enum.
                 * @name perfetto.protos.QueryResult.CellsBatch.CellType
                 * @enum {number}
                 * @property {number} CELL_INVALID=0 CELL_INVALID value
                 * @property {number} CELL_NULL=1 CELL_NULL value
                 * @property {number} CELL_VARINT=2 CELL_VARINT value
                 * @property {number} CELL_FLOAT64=3 CELL_FLOAT64 value
                 * @property {number} CELL_STRING=4 CELL_STRING value
                 * @property {number} CELL_BLOB=5 CELL_BLOB value
                 */
                CellsBatch.CellType = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "CELL_INVALID"] = 0;
                    values[valuesById[1] = "CELL_NULL"] = 1;
                    values[valuesById[2] = "CELL_VARINT"] = 2;
                    values[valuesById[3] = "CELL_FLOAT64"] = 3;
                    values[valuesById[4] = "CELL_STRING"] = 4;
                    values[valuesById[5] = "CELL_BLOB"] = 5;
                    return values;
                })();

                return CellsBatch;
            })();

            return QueryResult;
        })();

        protos.StatusArgs = (function() {

            /**
             * Properties of a StatusArgs.
             * @memberof perfetto.protos
             * @interface IStatusArgs
             */

            /**
             * Constructs a new StatusArgs.
             * @memberof perfetto.protos
             * @classdesc Represents a StatusArgs.
             * @implements IStatusArgs
             * @constructor
             * @param {perfetto.protos.IStatusArgs=} [p] Properties to set
             */
            function StatusArgs(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Creates a new StatusArgs instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.StatusArgs
             * @static
             * @param {perfetto.protos.IStatusArgs=} [properties] Properties to set
             * @returns {perfetto.protos.StatusArgs} StatusArgs instance
             */
            StatusArgs.create = function create(properties) {
                return new StatusArgs(properties);
            };

            /**
             * Encodes the specified StatusArgs message. Does not implicitly {@link perfetto.protos.StatusArgs.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.StatusArgs
             * @static
             * @param {perfetto.protos.IStatusArgs} m StatusArgs message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StatusArgs.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                return w;
            };

            /**
             * Encodes the specified StatusArgs message, length delimited. Does not implicitly {@link perfetto.protos.StatusArgs.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.StatusArgs
             * @static
             * @param {perfetto.protos.IStatusArgs} message StatusArgs message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StatusArgs.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a StatusArgs message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.StatusArgs
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.StatusArgs} StatusArgs
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatusArgs.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.StatusArgs();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a StatusArgs message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.StatusArgs
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.StatusArgs} StatusArgs
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatusArgs.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a StatusArgs message.
             * @function verify
             * @memberof perfetto.protos.StatusArgs
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            StatusArgs.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates a StatusArgs message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.StatusArgs
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.StatusArgs} StatusArgs
             */
            StatusArgs.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.StatusArgs)
                    return d;
                return new $root.perfetto.protos.StatusArgs();
            };

            /**
             * Creates a plain object from a StatusArgs message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.StatusArgs
             * @static
             * @param {perfetto.protos.StatusArgs} m StatusArgs
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            StatusArgs.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this StatusArgs to JSON.
             * @function toJSON
             * @memberof perfetto.protos.StatusArgs
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            StatusArgs.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return StatusArgs;
        })();

        protos.StatusResult = (function() {

            /**
             * Properties of a StatusResult.
             * @memberof perfetto.protos
             * @interface IStatusResult
             * @property {string|null} [loadedTraceName] StatusResult loadedTraceName
             * @property {string|null} [humanReadableVersion] StatusResult humanReadableVersion
             * @property {number|null} [apiVersion] StatusResult apiVersion
             */

            /**
             * Constructs a new StatusResult.
             * @memberof perfetto.protos
             * @classdesc Represents a StatusResult.
             * @implements IStatusResult
             * @constructor
             * @param {perfetto.protos.IStatusResult=} [p] Properties to set
             */
            function StatusResult(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * StatusResult loadedTraceName.
             * @member {string} loadedTraceName
             * @memberof perfetto.protos.StatusResult
             * @instance
             */
            StatusResult.prototype.loadedTraceName = "";

            /**
             * StatusResult humanReadableVersion.
             * @member {string} humanReadableVersion
             * @memberof perfetto.protos.StatusResult
             * @instance
             */
            StatusResult.prototype.humanReadableVersion = "";

            /**
             * StatusResult apiVersion.
             * @member {number} apiVersion
             * @memberof perfetto.protos.StatusResult
             * @instance
             */
            StatusResult.prototype.apiVersion = 0;

            /**
             * Creates a new StatusResult instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.StatusResult
             * @static
             * @param {perfetto.protos.IStatusResult=} [properties] Properties to set
             * @returns {perfetto.protos.StatusResult} StatusResult instance
             */
            StatusResult.create = function create(properties) {
                return new StatusResult(properties);
            };

            /**
             * Encodes the specified StatusResult message. Does not implicitly {@link perfetto.protos.StatusResult.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.StatusResult
             * @static
             * @param {perfetto.protos.IStatusResult} m StatusResult message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StatusResult.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.loadedTraceName != null && Object.hasOwnProperty.call(m, "loadedTraceName"))
                    w.uint32(10).string(m.loadedTraceName);
                if (m.humanReadableVersion != null && Object.hasOwnProperty.call(m, "humanReadableVersion"))
                    w.uint32(18).string(m.humanReadableVersion);
                if (m.apiVersion != null && Object.hasOwnProperty.call(m, "apiVersion"))
                    w.uint32(24).int32(m.apiVersion);
                return w;
            };

            /**
             * Encodes the specified StatusResult message, length delimited. Does not implicitly {@link perfetto.protos.StatusResult.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.StatusResult
             * @static
             * @param {perfetto.protos.IStatusResult} message StatusResult message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            StatusResult.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a StatusResult message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.StatusResult
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.StatusResult} StatusResult
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatusResult.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.StatusResult();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.loadedTraceName = r.string();
                        break;
                    case 2:
                        m.humanReadableVersion = r.string();
                        break;
                    case 3:
                        m.apiVersion = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a StatusResult message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.StatusResult
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.StatusResult} StatusResult
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            StatusResult.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a StatusResult message.
             * @function verify
             * @memberof perfetto.protos.StatusResult
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            StatusResult.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.loadedTraceName != null && m.hasOwnProperty("loadedTraceName")) {
                    if (!$util.isString(m.loadedTraceName))
                        return "loadedTraceName: string expected";
                }
                if (m.humanReadableVersion != null && m.hasOwnProperty("humanReadableVersion")) {
                    if (!$util.isString(m.humanReadableVersion))
                        return "humanReadableVersion: string expected";
                }
                if (m.apiVersion != null && m.hasOwnProperty("apiVersion")) {
                    if (!$util.isInteger(m.apiVersion))
                        return "apiVersion: integer expected";
                }
                return null;
            };

            /**
             * Creates a StatusResult message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.StatusResult
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.StatusResult} StatusResult
             */
            StatusResult.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.StatusResult)
                    return d;
                var m = new $root.perfetto.protos.StatusResult();
                if (d.loadedTraceName != null) {
                    m.loadedTraceName = String(d.loadedTraceName);
                }
                if (d.humanReadableVersion != null) {
                    m.humanReadableVersion = String(d.humanReadableVersion);
                }
                if (d.apiVersion != null) {
                    m.apiVersion = d.apiVersion | 0;
                }
                return m;
            };

            /**
             * Creates a plain object from a StatusResult message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.StatusResult
             * @static
             * @param {perfetto.protos.StatusResult} m StatusResult
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            StatusResult.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.loadedTraceName = "";
                    d.humanReadableVersion = "";
                    d.apiVersion = 0;
                }
                if (m.loadedTraceName != null && m.hasOwnProperty("loadedTraceName")) {
                    d.loadedTraceName = m.loadedTraceName;
                }
                if (m.humanReadableVersion != null && m.hasOwnProperty("humanReadableVersion")) {
                    d.humanReadableVersion = m.humanReadableVersion;
                }
                if (m.apiVersion != null && m.hasOwnProperty("apiVersion")) {
                    d.apiVersion = m.apiVersion;
                }
                return d;
            };

            /**
             * Converts this StatusResult to JSON.
             * @function toJSON
             * @memberof perfetto.protos.StatusResult
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            StatusResult.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return StatusResult;
        })();

        protos.ComputeMetricArgs = (function() {

            /**
             * Properties of a ComputeMetricArgs.
             * @memberof perfetto.protos
             * @interface IComputeMetricArgs
             * @property {Array.<string>|null} [metricNames] ComputeMetricArgs metricNames
             * @property {perfetto.protos.ComputeMetricArgs.ResultFormat|null} [format] ComputeMetricArgs format
             */

            /**
             * Constructs a new ComputeMetricArgs.
             * @memberof perfetto.protos
             * @classdesc Represents a ComputeMetricArgs.
             * @implements IComputeMetricArgs
             * @constructor
             * @param {perfetto.protos.IComputeMetricArgs=} [p] Properties to set
             */
            function ComputeMetricArgs(p) {
                this.metricNames = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ComputeMetricArgs metricNames.
             * @member {Array.<string>} metricNames
             * @memberof perfetto.protos.ComputeMetricArgs
             * @instance
             */
            ComputeMetricArgs.prototype.metricNames = $util.emptyArray;

            /**
             * ComputeMetricArgs format.
             * @member {perfetto.protos.ComputeMetricArgs.ResultFormat} format
             * @memberof perfetto.protos.ComputeMetricArgs
             * @instance
             */
            ComputeMetricArgs.prototype.format = 0;

            /**
             * Creates a new ComputeMetricArgs instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ComputeMetricArgs
             * @static
             * @param {perfetto.protos.IComputeMetricArgs=} [properties] Properties to set
             * @returns {perfetto.protos.ComputeMetricArgs} ComputeMetricArgs instance
             */
            ComputeMetricArgs.create = function create(properties) {
                return new ComputeMetricArgs(properties);
            };

            /**
             * Encodes the specified ComputeMetricArgs message. Does not implicitly {@link perfetto.protos.ComputeMetricArgs.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ComputeMetricArgs
             * @static
             * @param {perfetto.protos.IComputeMetricArgs} m ComputeMetricArgs message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ComputeMetricArgs.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.metricNames != null && m.metricNames.length) {
                    for (var i = 0; i < m.metricNames.length; ++i)
                        w.uint32(10).string(m.metricNames[i]);
                }
                if (m.format != null && Object.hasOwnProperty.call(m, "format"))
                    w.uint32(16).int32(m.format);
                return w;
            };

            /**
             * Encodes the specified ComputeMetricArgs message, length delimited. Does not implicitly {@link perfetto.protos.ComputeMetricArgs.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ComputeMetricArgs
             * @static
             * @param {perfetto.protos.IComputeMetricArgs} message ComputeMetricArgs message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ComputeMetricArgs.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ComputeMetricArgs message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ComputeMetricArgs
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ComputeMetricArgs} ComputeMetricArgs
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ComputeMetricArgs.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ComputeMetricArgs();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.metricNames && m.metricNames.length))
                            m.metricNames = [];
                        m.metricNames.push(r.string());
                        break;
                    case 2:
                        m.format = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ComputeMetricArgs message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ComputeMetricArgs
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ComputeMetricArgs} ComputeMetricArgs
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ComputeMetricArgs.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ComputeMetricArgs message.
             * @function verify
             * @memberof perfetto.protos.ComputeMetricArgs
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ComputeMetricArgs.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.metricNames != null && m.hasOwnProperty("metricNames")) {
                    if (!Array.isArray(m.metricNames))
                        return "metricNames: array expected";
                    for (var i = 0; i < m.metricNames.length; ++i) {
                        if (!$util.isString(m.metricNames[i]))
                            return "metricNames: string[] expected";
                    }
                }
                if (m.format != null && m.hasOwnProperty("format")) {
                    switch (m.format) {
                    default:
                        return "format: enum value expected";
                    case 0:
                    case 1:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates a ComputeMetricArgs message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ComputeMetricArgs
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ComputeMetricArgs} ComputeMetricArgs
             */
            ComputeMetricArgs.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ComputeMetricArgs)
                    return d;
                var m = new $root.perfetto.protos.ComputeMetricArgs();
                if (d.metricNames) {
                    if (!Array.isArray(d.metricNames))
                        throw TypeError(".perfetto.protos.ComputeMetricArgs.metricNames: array expected");
                    m.metricNames = [];
                    for (var i = 0; i < d.metricNames.length; ++i) {
                        m.metricNames[i] = String(d.metricNames[i]);
                    }
                }
                switch (d.format) {
                case "BINARY_PROTOBUF":
                case 0:
                    m.format = 0;
                    break;
                case "TEXTPROTO":
                case 1:
                    m.format = 1;
                    break;
                }
                return m;
            };

            /**
             * Creates a plain object from a ComputeMetricArgs message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ComputeMetricArgs
             * @static
             * @param {perfetto.protos.ComputeMetricArgs} m ComputeMetricArgs
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ComputeMetricArgs.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.metricNames = [];
                }
                if (o.defaults) {
                    d.format = o.enums === String ? "BINARY_PROTOBUF" : 0;
                }
                if (m.metricNames && m.metricNames.length) {
                    d.metricNames = [];
                    for (var j = 0; j < m.metricNames.length; ++j) {
                        d.metricNames[j] = m.metricNames[j];
                    }
                }
                if (m.format != null && m.hasOwnProperty("format")) {
                    d.format = o.enums === String ? $root.perfetto.protos.ComputeMetricArgs.ResultFormat[m.format] : m.format;
                }
                return d;
            };

            /**
             * Converts this ComputeMetricArgs to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ComputeMetricArgs
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ComputeMetricArgs.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            /**
             * ResultFormat enum.
             * @name perfetto.protos.ComputeMetricArgs.ResultFormat
             * @enum {number}
             * @property {number} BINARY_PROTOBUF=0 BINARY_PROTOBUF value
             * @property {number} TEXTPROTO=1 TEXTPROTO value
             */
            ComputeMetricArgs.ResultFormat = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "BINARY_PROTOBUF"] = 0;
                values[valuesById[1] = "TEXTPROTO"] = 1;
                return values;
            })();

            return ComputeMetricArgs;
        })();

        protos.ComputeMetricResult = (function() {

            /**
             * Properties of a ComputeMetricResult.
             * @memberof perfetto.protos
             * @interface IComputeMetricResult
             * @property {Uint8Array|null} [metrics] ComputeMetricResult metrics
             * @property {string|null} [metricsAsPrototext] ComputeMetricResult metricsAsPrototext
             * @property {string|null} [error] ComputeMetricResult error
             */

            /**
             * Constructs a new ComputeMetricResult.
             * @memberof perfetto.protos
             * @classdesc Represents a ComputeMetricResult.
             * @implements IComputeMetricResult
             * @constructor
             * @param {perfetto.protos.IComputeMetricResult=} [p] Properties to set
             */
            function ComputeMetricResult(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * ComputeMetricResult metrics.
             * @member {Uint8Array} metrics
             * @memberof perfetto.protos.ComputeMetricResult
             * @instance
             */
            ComputeMetricResult.prototype.metrics = $util.newBuffer([]);

            /**
             * ComputeMetricResult metricsAsPrototext.
             * @member {string} metricsAsPrototext
             * @memberof perfetto.protos.ComputeMetricResult
             * @instance
             */
            ComputeMetricResult.prototype.metricsAsPrototext = "";

            /**
             * ComputeMetricResult error.
             * @member {string} error
             * @memberof perfetto.protos.ComputeMetricResult
             * @instance
             */
            ComputeMetricResult.prototype.error = "";

            // OneOf field names bound to virtual getters and setters
            var $oneOfFields;

            /**
             * ComputeMetricResult result.
             * @member {"metrics"|"metricsAsPrototext"|undefined} result
             * @memberof perfetto.protos.ComputeMetricResult
             * @instance
             */
            Object.defineProperty(ComputeMetricResult.prototype, "result", {
                get: $util.oneOfGetter($oneOfFields = ["metrics", "metricsAsPrototext"]),
                set: $util.oneOfSetter($oneOfFields)
            });

            /**
             * Creates a new ComputeMetricResult instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.ComputeMetricResult
             * @static
             * @param {perfetto.protos.IComputeMetricResult=} [properties] Properties to set
             * @returns {perfetto.protos.ComputeMetricResult} ComputeMetricResult instance
             */
            ComputeMetricResult.create = function create(properties) {
                return new ComputeMetricResult(properties);
            };

            /**
             * Encodes the specified ComputeMetricResult message. Does not implicitly {@link perfetto.protos.ComputeMetricResult.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.ComputeMetricResult
             * @static
             * @param {perfetto.protos.IComputeMetricResult} m ComputeMetricResult message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ComputeMetricResult.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.metrics != null && Object.hasOwnProperty.call(m, "metrics"))
                    w.uint32(10).bytes(m.metrics);
                if (m.error != null && Object.hasOwnProperty.call(m, "error"))
                    w.uint32(18).string(m.error);
                if (m.metricsAsPrototext != null && Object.hasOwnProperty.call(m, "metricsAsPrototext"))
                    w.uint32(26).string(m.metricsAsPrototext);
                return w;
            };

            /**
             * Encodes the specified ComputeMetricResult message, length delimited. Does not implicitly {@link perfetto.protos.ComputeMetricResult.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.ComputeMetricResult
             * @static
             * @param {perfetto.protos.IComputeMetricResult} message ComputeMetricResult message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            ComputeMetricResult.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a ComputeMetricResult message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.ComputeMetricResult
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.ComputeMetricResult} ComputeMetricResult
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ComputeMetricResult.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.ComputeMetricResult();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.metrics = r.bytes();
                        break;
                    case 3:
                        m.metricsAsPrototext = r.string();
                        break;
                    case 2:
                        m.error = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a ComputeMetricResult message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.ComputeMetricResult
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.ComputeMetricResult} ComputeMetricResult
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            ComputeMetricResult.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a ComputeMetricResult message.
             * @function verify
             * @memberof perfetto.protos.ComputeMetricResult
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            ComputeMetricResult.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                var p = {};
                if (m.metrics != null && m.hasOwnProperty("metrics")) {
                    p.result = 1;
                    if (!(m.metrics && typeof m.metrics.length === "number" || $util.isString(m.metrics)))
                        return "metrics: buffer expected";
                }
                if (m.metricsAsPrototext != null && m.hasOwnProperty("metricsAsPrototext")) {
                    if (p.result === 1)
                        return "result: multiple values";
                    p.result = 1;
                    if (!$util.isString(m.metricsAsPrototext))
                        return "metricsAsPrototext: string expected";
                }
                if (m.error != null && m.hasOwnProperty("error")) {
                    if (!$util.isString(m.error))
                        return "error: string expected";
                }
                return null;
            };

            /**
             * Creates a ComputeMetricResult message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.ComputeMetricResult
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.ComputeMetricResult} ComputeMetricResult
             */
            ComputeMetricResult.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.ComputeMetricResult)
                    return d;
                var m = new $root.perfetto.protos.ComputeMetricResult();
                if (d.metrics != null) {
                    if (typeof d.metrics === "string")
                        $util.base64.decode(d.metrics, m.metrics = $util.newBuffer($util.base64.length(d.metrics)), 0);
                    else if (d.metrics.length)
                        m.metrics = d.metrics;
                }
                if (d.metricsAsPrototext != null) {
                    m.metricsAsPrototext = String(d.metricsAsPrototext);
                }
                if (d.error != null) {
                    m.error = String(d.error);
                }
                return m;
            };

            /**
             * Creates a plain object from a ComputeMetricResult message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.ComputeMetricResult
             * @static
             * @param {perfetto.protos.ComputeMetricResult} m ComputeMetricResult
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            ComputeMetricResult.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.error = "";
                }
                if (m.metrics != null && m.hasOwnProperty("metrics")) {
                    d.metrics = o.bytes === String ? $util.base64.encode(m.metrics, 0, m.metrics.length) : o.bytes === Array ? Array.prototype.slice.call(m.metrics) : m.metrics;
                    if (o.oneofs)
                        d.result = "metrics";
                }
                if (m.error != null && m.hasOwnProperty("error")) {
                    d.error = m.error;
                }
                if (m.metricsAsPrototext != null && m.hasOwnProperty("metricsAsPrototext")) {
                    d.metricsAsPrototext = m.metricsAsPrototext;
                    if (o.oneofs)
                        d.result = "metricsAsPrototext";
                }
                return d;
            };

            /**
             * Converts this ComputeMetricResult to JSON.
             * @function toJSON
             * @memberof perfetto.protos.ComputeMetricResult
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            ComputeMetricResult.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return ComputeMetricResult;
        })();

        protos.EnableMetatraceArgs = (function() {

            /**
             * Properties of an EnableMetatraceArgs.
             * @memberof perfetto.protos
             * @interface IEnableMetatraceArgs
             * @property {perfetto.protos.MetatraceCategories|null} [categories] EnableMetatraceArgs categories
             */

            /**
             * Constructs a new EnableMetatraceArgs.
             * @memberof perfetto.protos
             * @classdesc Represents an EnableMetatraceArgs.
             * @implements IEnableMetatraceArgs
             * @constructor
             * @param {perfetto.protos.IEnableMetatraceArgs=} [p] Properties to set
             */
            function EnableMetatraceArgs(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * EnableMetatraceArgs categories.
             * @member {perfetto.protos.MetatraceCategories} categories
             * @memberof perfetto.protos.EnableMetatraceArgs
             * @instance
             */
            EnableMetatraceArgs.prototype.categories = 1;

            /**
             * Creates a new EnableMetatraceArgs instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.EnableMetatraceArgs
             * @static
             * @param {perfetto.protos.IEnableMetatraceArgs=} [properties] Properties to set
             * @returns {perfetto.protos.EnableMetatraceArgs} EnableMetatraceArgs instance
             */
            EnableMetatraceArgs.create = function create(properties) {
                return new EnableMetatraceArgs(properties);
            };

            /**
             * Encodes the specified EnableMetatraceArgs message. Does not implicitly {@link perfetto.protos.EnableMetatraceArgs.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.EnableMetatraceArgs
             * @static
             * @param {perfetto.protos.IEnableMetatraceArgs} m EnableMetatraceArgs message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EnableMetatraceArgs.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.categories != null && Object.hasOwnProperty.call(m, "categories"))
                    w.uint32(8).int32(m.categories);
                return w;
            };

            /**
             * Encodes the specified EnableMetatraceArgs message, length delimited. Does not implicitly {@link perfetto.protos.EnableMetatraceArgs.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.EnableMetatraceArgs
             * @static
             * @param {perfetto.protos.IEnableMetatraceArgs} message EnableMetatraceArgs message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EnableMetatraceArgs.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an EnableMetatraceArgs message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.EnableMetatraceArgs
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.EnableMetatraceArgs} EnableMetatraceArgs
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EnableMetatraceArgs.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.EnableMetatraceArgs();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.categories = r.int32();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an EnableMetatraceArgs message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.EnableMetatraceArgs
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.EnableMetatraceArgs} EnableMetatraceArgs
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EnableMetatraceArgs.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an EnableMetatraceArgs message.
             * @function verify
             * @memberof perfetto.protos.EnableMetatraceArgs
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            EnableMetatraceArgs.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.categories != null && m.hasOwnProperty("categories")) {
                    switch (m.categories) {
                    default:
                        return "categories: enum value expected";
                    case 1:
                    case 2:
                    case 4:
                    case 0:
                    case 7:
                        break;
                    }
                }
                return null;
            };

            /**
             * Creates an EnableMetatraceArgs message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.EnableMetatraceArgs
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.EnableMetatraceArgs} EnableMetatraceArgs
             */
            EnableMetatraceArgs.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.EnableMetatraceArgs)
                    return d;
                var m = new $root.perfetto.protos.EnableMetatraceArgs();
                switch (d.categories) {
                case "TOPLEVEL":
                case 1:
                    m.categories = 1;
                    break;
                case "QUERY":
                case 2:
                    m.categories = 2;
                    break;
                case "FUNCTION":
                case 4:
                    m.categories = 4;
                    break;
                case "NONE":
                case 0:
                    m.categories = 0;
                    break;
                case "ALL":
                case 7:
                    m.categories = 7;
                    break;
                }
                return m;
            };

            /**
             * Creates a plain object from an EnableMetatraceArgs message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.EnableMetatraceArgs
             * @static
             * @param {perfetto.protos.EnableMetatraceArgs} m EnableMetatraceArgs
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            EnableMetatraceArgs.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    d.categories = o.enums === String ? "TOPLEVEL" : 1;
                }
                if (m.categories != null && m.hasOwnProperty("categories")) {
                    d.categories = o.enums === String ? $root.perfetto.protos.MetatraceCategories[m.categories] : m.categories;
                }
                return d;
            };

            /**
             * Converts this EnableMetatraceArgs to JSON.
             * @function toJSON
             * @memberof perfetto.protos.EnableMetatraceArgs
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            EnableMetatraceArgs.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return EnableMetatraceArgs;
        })();

        protos.EnableMetatraceResult = (function() {

            /**
             * Properties of an EnableMetatraceResult.
             * @memberof perfetto.protos
             * @interface IEnableMetatraceResult
             */

            /**
             * Constructs a new EnableMetatraceResult.
             * @memberof perfetto.protos
             * @classdesc Represents an EnableMetatraceResult.
             * @implements IEnableMetatraceResult
             * @constructor
             * @param {perfetto.protos.IEnableMetatraceResult=} [p] Properties to set
             */
            function EnableMetatraceResult(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Creates a new EnableMetatraceResult instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.EnableMetatraceResult
             * @static
             * @param {perfetto.protos.IEnableMetatraceResult=} [properties] Properties to set
             * @returns {perfetto.protos.EnableMetatraceResult} EnableMetatraceResult instance
             */
            EnableMetatraceResult.create = function create(properties) {
                return new EnableMetatraceResult(properties);
            };

            /**
             * Encodes the specified EnableMetatraceResult message. Does not implicitly {@link perfetto.protos.EnableMetatraceResult.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.EnableMetatraceResult
             * @static
             * @param {perfetto.protos.IEnableMetatraceResult} m EnableMetatraceResult message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EnableMetatraceResult.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                return w;
            };

            /**
             * Encodes the specified EnableMetatraceResult message, length delimited. Does not implicitly {@link perfetto.protos.EnableMetatraceResult.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.EnableMetatraceResult
             * @static
             * @param {perfetto.protos.IEnableMetatraceResult} message EnableMetatraceResult message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            EnableMetatraceResult.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes an EnableMetatraceResult message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.EnableMetatraceResult
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.EnableMetatraceResult} EnableMetatraceResult
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EnableMetatraceResult.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.EnableMetatraceResult();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes an EnableMetatraceResult message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.EnableMetatraceResult
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.EnableMetatraceResult} EnableMetatraceResult
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            EnableMetatraceResult.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies an EnableMetatraceResult message.
             * @function verify
             * @memberof perfetto.protos.EnableMetatraceResult
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            EnableMetatraceResult.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates an EnableMetatraceResult message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.EnableMetatraceResult
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.EnableMetatraceResult} EnableMetatraceResult
             */
            EnableMetatraceResult.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.EnableMetatraceResult)
                    return d;
                return new $root.perfetto.protos.EnableMetatraceResult();
            };

            /**
             * Creates a plain object from an EnableMetatraceResult message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.EnableMetatraceResult
             * @static
             * @param {perfetto.protos.EnableMetatraceResult} m EnableMetatraceResult
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            EnableMetatraceResult.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this EnableMetatraceResult to JSON.
             * @function toJSON
             * @memberof perfetto.protos.EnableMetatraceResult
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            EnableMetatraceResult.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return EnableMetatraceResult;
        })();

        protos.DisableAndReadMetatraceArgs = (function() {

            /**
             * Properties of a DisableAndReadMetatraceArgs.
             * @memberof perfetto.protos
             * @interface IDisableAndReadMetatraceArgs
             */

            /**
             * Constructs a new DisableAndReadMetatraceArgs.
             * @memberof perfetto.protos
             * @classdesc Represents a DisableAndReadMetatraceArgs.
             * @implements IDisableAndReadMetatraceArgs
             * @constructor
             * @param {perfetto.protos.IDisableAndReadMetatraceArgs=} [p] Properties to set
             */
            function DisableAndReadMetatraceArgs(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * Creates a new DisableAndReadMetatraceArgs instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DisableAndReadMetatraceArgs
             * @static
             * @param {perfetto.protos.IDisableAndReadMetatraceArgs=} [properties] Properties to set
             * @returns {perfetto.protos.DisableAndReadMetatraceArgs} DisableAndReadMetatraceArgs instance
             */
            DisableAndReadMetatraceArgs.create = function create(properties) {
                return new DisableAndReadMetatraceArgs(properties);
            };

            /**
             * Encodes the specified DisableAndReadMetatraceArgs message. Does not implicitly {@link perfetto.protos.DisableAndReadMetatraceArgs.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DisableAndReadMetatraceArgs
             * @static
             * @param {perfetto.protos.IDisableAndReadMetatraceArgs} m DisableAndReadMetatraceArgs message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DisableAndReadMetatraceArgs.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                return w;
            };

            /**
             * Encodes the specified DisableAndReadMetatraceArgs message, length delimited. Does not implicitly {@link perfetto.protos.DisableAndReadMetatraceArgs.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DisableAndReadMetatraceArgs
             * @static
             * @param {perfetto.protos.IDisableAndReadMetatraceArgs} message DisableAndReadMetatraceArgs message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DisableAndReadMetatraceArgs.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DisableAndReadMetatraceArgs message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DisableAndReadMetatraceArgs
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DisableAndReadMetatraceArgs} DisableAndReadMetatraceArgs
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DisableAndReadMetatraceArgs.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DisableAndReadMetatraceArgs();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DisableAndReadMetatraceArgs message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DisableAndReadMetatraceArgs
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DisableAndReadMetatraceArgs} DisableAndReadMetatraceArgs
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DisableAndReadMetatraceArgs.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DisableAndReadMetatraceArgs message.
             * @function verify
             * @memberof perfetto.protos.DisableAndReadMetatraceArgs
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DisableAndReadMetatraceArgs.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                return null;
            };

            /**
             * Creates a DisableAndReadMetatraceArgs message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DisableAndReadMetatraceArgs
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DisableAndReadMetatraceArgs} DisableAndReadMetatraceArgs
             */
            DisableAndReadMetatraceArgs.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DisableAndReadMetatraceArgs)
                    return d;
                return new $root.perfetto.protos.DisableAndReadMetatraceArgs();
            };

            /**
             * Creates a plain object from a DisableAndReadMetatraceArgs message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DisableAndReadMetatraceArgs
             * @static
             * @param {perfetto.protos.DisableAndReadMetatraceArgs} m DisableAndReadMetatraceArgs
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DisableAndReadMetatraceArgs.toObject = function toObject() {
                return {};
            };

            /**
             * Converts this DisableAndReadMetatraceArgs to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DisableAndReadMetatraceArgs
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DisableAndReadMetatraceArgs.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DisableAndReadMetatraceArgs;
        })();

        protos.DisableAndReadMetatraceResult = (function() {

            /**
             * Properties of a DisableAndReadMetatraceResult.
             * @memberof perfetto.protos
             * @interface IDisableAndReadMetatraceResult
             * @property {Uint8Array|null} [metatrace] DisableAndReadMetatraceResult metatrace
             * @property {string|null} [error] DisableAndReadMetatraceResult error
             */

            /**
             * Constructs a new DisableAndReadMetatraceResult.
             * @memberof perfetto.protos
             * @classdesc Represents a DisableAndReadMetatraceResult.
             * @implements IDisableAndReadMetatraceResult
             * @constructor
             * @param {perfetto.protos.IDisableAndReadMetatraceResult=} [p] Properties to set
             */
            function DisableAndReadMetatraceResult(p) {
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DisableAndReadMetatraceResult metatrace.
             * @member {Uint8Array} metatrace
             * @memberof perfetto.protos.DisableAndReadMetatraceResult
             * @instance
             */
            DisableAndReadMetatraceResult.prototype.metatrace = $util.newBuffer([]);

            /**
             * DisableAndReadMetatraceResult error.
             * @member {string} error
             * @memberof perfetto.protos.DisableAndReadMetatraceResult
             * @instance
             */
            DisableAndReadMetatraceResult.prototype.error = "";

            /**
             * Creates a new DisableAndReadMetatraceResult instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DisableAndReadMetatraceResult
             * @static
             * @param {perfetto.protos.IDisableAndReadMetatraceResult=} [properties] Properties to set
             * @returns {perfetto.protos.DisableAndReadMetatraceResult} DisableAndReadMetatraceResult instance
             */
            DisableAndReadMetatraceResult.create = function create(properties) {
                return new DisableAndReadMetatraceResult(properties);
            };

            /**
             * Encodes the specified DisableAndReadMetatraceResult message. Does not implicitly {@link perfetto.protos.DisableAndReadMetatraceResult.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DisableAndReadMetatraceResult
             * @static
             * @param {perfetto.protos.IDisableAndReadMetatraceResult} m DisableAndReadMetatraceResult message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DisableAndReadMetatraceResult.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.metatrace != null && Object.hasOwnProperty.call(m, "metatrace"))
                    w.uint32(10).bytes(m.metatrace);
                if (m.error != null && Object.hasOwnProperty.call(m, "error"))
                    w.uint32(18).string(m.error);
                return w;
            };

            /**
             * Encodes the specified DisableAndReadMetatraceResult message, length delimited. Does not implicitly {@link perfetto.protos.DisableAndReadMetatraceResult.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DisableAndReadMetatraceResult
             * @static
             * @param {perfetto.protos.IDisableAndReadMetatraceResult} message DisableAndReadMetatraceResult message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DisableAndReadMetatraceResult.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DisableAndReadMetatraceResult message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DisableAndReadMetatraceResult
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DisableAndReadMetatraceResult} DisableAndReadMetatraceResult
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DisableAndReadMetatraceResult.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DisableAndReadMetatraceResult();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        m.metatrace = r.bytes();
                        break;
                    case 2:
                        m.error = r.string();
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DisableAndReadMetatraceResult message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DisableAndReadMetatraceResult
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DisableAndReadMetatraceResult} DisableAndReadMetatraceResult
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DisableAndReadMetatraceResult.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DisableAndReadMetatraceResult message.
             * @function verify
             * @memberof perfetto.protos.DisableAndReadMetatraceResult
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DisableAndReadMetatraceResult.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.metatrace != null && m.hasOwnProperty("metatrace")) {
                    if (!(m.metatrace && typeof m.metatrace.length === "number" || $util.isString(m.metatrace)))
                        return "metatrace: buffer expected";
                }
                if (m.error != null && m.hasOwnProperty("error")) {
                    if (!$util.isString(m.error))
                        return "error: string expected";
                }
                return null;
            };

            /**
             * Creates a DisableAndReadMetatraceResult message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DisableAndReadMetatraceResult
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DisableAndReadMetatraceResult} DisableAndReadMetatraceResult
             */
            DisableAndReadMetatraceResult.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DisableAndReadMetatraceResult)
                    return d;
                var m = new $root.perfetto.protos.DisableAndReadMetatraceResult();
                if (d.metatrace != null) {
                    if (typeof d.metatrace === "string")
                        $util.base64.decode(d.metatrace, m.metatrace = $util.newBuffer($util.base64.length(d.metatrace)), 0);
                    else if (d.metatrace.length)
                        m.metatrace = d.metatrace;
                }
                if (d.error != null) {
                    m.error = String(d.error);
                }
                return m;
            };

            /**
             * Creates a plain object from a DisableAndReadMetatraceResult message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DisableAndReadMetatraceResult
             * @static
             * @param {perfetto.protos.DisableAndReadMetatraceResult} m DisableAndReadMetatraceResult
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DisableAndReadMetatraceResult.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.defaults) {
                    if (o.bytes === String)
                        d.metatrace = "";
                    else {
                        d.metatrace = [];
                        if (o.bytes !== Array)
                            d.metatrace = $util.newBuffer(d.metatrace);
                    }
                    d.error = "";
                }
                if (m.metatrace != null && m.hasOwnProperty("metatrace")) {
                    d.metatrace = o.bytes === String ? $util.base64.encode(m.metatrace, 0, m.metatrace.length) : o.bytes === Array ? Array.prototype.slice.call(m.metatrace) : m.metatrace;
                }
                if (m.error != null && m.hasOwnProperty("error")) {
                    d.error = m.error;
                }
                return d;
            };

            /**
             * Converts this DisableAndReadMetatraceResult to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DisableAndReadMetatraceResult
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DisableAndReadMetatraceResult.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DisableAndReadMetatraceResult;
        })();

        protos.DescriptorSet = (function() {

            /**
             * Properties of a DescriptorSet.
             * @memberof perfetto.protos
             * @interface IDescriptorSet
             * @property {Array.<perfetto.protos.IDescriptorProto>|null} [descriptors] DescriptorSet descriptors
             */

            /**
             * Constructs a new DescriptorSet.
             * @memberof perfetto.protos
             * @classdesc Represents a DescriptorSet.
             * @implements IDescriptorSet
             * @constructor
             * @param {perfetto.protos.IDescriptorSet=} [p] Properties to set
             */
            function DescriptorSet(p) {
                this.descriptors = [];
                if (p)
                    for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
                        if (p[ks[i]] != null)
                            this[ks[i]] = p[ks[i]];
            }

            /**
             * DescriptorSet descriptors.
             * @member {Array.<perfetto.protos.IDescriptorProto>} descriptors
             * @memberof perfetto.protos.DescriptorSet
             * @instance
             */
            DescriptorSet.prototype.descriptors = $util.emptyArray;

            /**
             * Creates a new DescriptorSet instance using the specified properties.
             * @function create
             * @memberof perfetto.protos.DescriptorSet
             * @static
             * @param {perfetto.protos.IDescriptorSet=} [properties] Properties to set
             * @returns {perfetto.protos.DescriptorSet} DescriptorSet instance
             */
            DescriptorSet.create = function create(properties) {
                return new DescriptorSet(properties);
            };

            /**
             * Encodes the specified DescriptorSet message. Does not implicitly {@link perfetto.protos.DescriptorSet.verify|verify} messages.
             * @function encode
             * @memberof perfetto.protos.DescriptorSet
             * @static
             * @param {perfetto.protos.IDescriptorSet} m DescriptorSet message or plain object to encode
             * @param {$protobuf.Writer} [w] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DescriptorSet.encode = function encode(m, w) {
                if (!w)
                    w = $Writer.create();
                if (m.descriptors != null && m.descriptors.length) {
                    for (var i = 0; i < m.descriptors.length; ++i)
                        $root.perfetto.protos.DescriptorProto.encode(m.descriptors[i], w.uint32(10).fork()).ldelim();
                }
                return w;
            };

            /**
             * Encodes the specified DescriptorSet message, length delimited. Does not implicitly {@link perfetto.protos.DescriptorSet.verify|verify} messages.
             * @function encodeDelimited
             * @memberof perfetto.protos.DescriptorSet
             * @static
             * @param {perfetto.protos.IDescriptorSet} message DescriptorSet message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            DescriptorSet.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a DescriptorSet message from the specified reader or buffer.
             * @function decode
             * @memberof perfetto.protos.DescriptorSet
             * @static
             * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from
             * @param {number} [l] Message length if known beforehand
             * @returns {perfetto.protos.DescriptorSet} DescriptorSet
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DescriptorSet.decode = function decode(r, l) {
                if (!(r instanceof $Reader))
                    r = $Reader.create(r);
                var c = l === undefined ? r.len : r.pos + l, m = new $root.perfetto.protos.DescriptorSet();
                while (r.pos < c) {
                    var t = r.uint32();
                    switch (t >>> 3) {
                    case 1:
                        if (!(m.descriptors && m.descriptors.length))
                            m.descriptors = [];
                        m.descriptors.push($root.perfetto.protos.DescriptorProto.decode(r, r.uint32()));
                        break;
                    default:
                        r.skipType(t & 7);
                        break;
                    }
                }
                return m;
            };

            /**
             * Decodes a DescriptorSet message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof perfetto.protos.DescriptorSet
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {perfetto.protos.DescriptorSet} DescriptorSet
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            DescriptorSet.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a DescriptorSet message.
             * @function verify
             * @memberof perfetto.protos.DescriptorSet
             * @static
             * @param {Object.<string,*>} m Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            DescriptorSet.verify = function verify(m) {
                if (typeof m !== "object" || m === null)
                    return "object expected";
                if (m.descriptors != null && m.hasOwnProperty("descriptors")) {
                    if (!Array.isArray(m.descriptors))
                        return "descriptors: array expected";
                    for (var i = 0; i < m.descriptors.length; ++i) {
                        {
                            var e = $root.perfetto.protos.DescriptorProto.verify(m.descriptors[i]);
                            if (e)
                                return "descriptors." + e;
                        }
                    }
                }
                return null;
            };

            /**
             * Creates a DescriptorSet message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof perfetto.protos.DescriptorSet
             * @static
             * @param {Object.<string,*>} d Plain object
             * @returns {perfetto.protos.DescriptorSet} DescriptorSet
             */
            DescriptorSet.fromObject = function fromObject(d) {
                if (d instanceof $root.perfetto.protos.DescriptorSet)
                    return d;
                var m = new $root.perfetto.protos.DescriptorSet();
                if (d.descriptors) {
                    if (!Array.isArray(d.descriptors))
                        throw TypeError(".perfetto.protos.DescriptorSet.descriptors: array expected");
                    m.descriptors = [];
                    for (var i = 0; i < d.descriptors.length; ++i) {
                        if (typeof d.descriptors[i] !== "object")
                            throw TypeError(".perfetto.protos.DescriptorSet.descriptors: object expected");
                        m.descriptors[i] = $root.perfetto.protos.DescriptorProto.fromObject(d.descriptors[i]);
                    }
                }
                return m;
            };

            /**
             * Creates a plain object from a DescriptorSet message. Also converts values to other types if specified.
             * @function toObject
             * @memberof perfetto.protos.DescriptorSet
             * @static
             * @param {perfetto.protos.DescriptorSet} m DescriptorSet
             * @param {$protobuf.IConversionOptions} [o] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            DescriptorSet.toObject = function toObject(m, o) {
                if (!o)
                    o = {};
                var d = {};
                if (o.arrays || o.defaults) {
                    d.descriptors = [];
                }
                if (m.descriptors && m.descriptors.length) {
                    d.descriptors = [];
                    for (var j = 0; j < m.descriptors.length; ++j) {
                        d.descriptors[j] = $root.perfetto.protos.DescriptorProto.toObject(m.descriptors[j], o);
                    }
                }
                return d;
            };

            /**
             * Converts this DescriptorSet to JSON.
             * @function toJSON
             * @memberof perfetto.protos.DescriptorSet
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            DescriptorSet.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, minimal$1.util.toJSONOptions);
            };

            return DescriptorSet;
        })();

        /**
         * MetatraceCategories enum.
         * @name perfetto.protos.MetatraceCategories
         * @enum {number}
         * @property {number} TOPLEVEL=1 TOPLEVEL value
         * @property {number} QUERY=2 QUERY value
         * @property {number} FUNCTION=4 FUNCTION value
         * @property {number} NONE=0 NONE value
         * @property {number} ALL=7 ALL value
         */
        protos.MetatraceCategories = (function() {
            var valuesById = {}, values = Object.create(valuesById);
            values[valuesById[1] = "TOPLEVEL"] = 1;
            values[valuesById[2] = "QUERY"] = 2;
            values[valuesById[4] = "FUNCTION"] = 4;
            values[valuesById[0] = "NONE"] = 0;
            values[valuesById[7] = "ALL"] = 7;
            return values;
        })();

        return protos;
    })();

    return perfetto;
})();

var protos = $root;

var protos_1 = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.VmstatCounters = exports.TracePacket = exports.TrackEventConfig = exports.TraceConfig = exports.Trace = exports.SysStatsConfig = exports.StatusResult = exports.StatCounters = exports.QueryArgs = exports.QueryServiceStateResponse = exports.QueryServiceStateRequest = exports.ReadBuffersResponse = exports.ReadBuffersRequest = exports.PerfettoMetatrace = exports.ProcessStatsConfig = exports.NativeContinuousDumpConfig = exports.MeminfoCounters = exports.JavaHprofConfig = exports.JavaContinuousDumpConfig = exports.IPCFrame = exports.HeapprofdConfig = exports.GetTraceStatsResponse = exports.GetTraceStatsRequest = exports.FtraceConfig = exports.FreeBuffersResponse = exports.FreeBuffersRequest = exports.EnableTracingResponse = exports.EnableTracingRequest = exports.DisableTracingResponse = exports.DisableTracingRequest = exports.DataSourceDescriptor = exports.DisableAndReadMetatraceResult = exports.DataSourceConfig = exports.ComputeMetricResult = exports.ComputeMetricArgs = exports.ConsumerPort = exports.ChromeConfig = exports.BufferConfig = exports.BatteryCounters = exports.AndroidPowerConfig = exports.AndroidLogId = exports.AndroidLogConfig = void 0;

// Aliases protos to avoid the super nested namespaces.
// See https://www.typescriptlang.org/docs/handbook/namespaces.html#aliases
var AndroidLogConfig = protos.perfetto.protos.AndroidLogConfig;
exports.AndroidLogConfig = AndroidLogConfig;
var AndroidPowerConfig = protos.perfetto.protos.AndroidPowerConfig;
exports.AndroidPowerConfig = AndroidPowerConfig;
var AndroidLogId = protos.perfetto.protos.AndroidLogId;
exports.AndroidLogId = AndroidLogId;
var BatteryCounters = protos.perfetto.protos.AndroidPowerConfig.BatteryCounters;
exports.BatteryCounters = BatteryCounters;
var BufferConfig = protos.perfetto.protos.TraceConfig.BufferConfig;
exports.BufferConfig = BufferConfig;
var ChromeConfig = protos.perfetto.protos.ChromeConfig;
exports.ChromeConfig = ChromeConfig;
var TrackEventConfig = protos.perfetto.protos.TrackEventConfig;
exports.TrackEventConfig = TrackEventConfig;
var ConsumerPort = protos.perfetto.protos.ConsumerPort;
exports.ConsumerPort = ConsumerPort;
var NativeContinuousDumpConfig = protos.perfetto.protos.HeapprofdConfig.ContinuousDumpConfig;
exports.NativeContinuousDumpConfig = NativeContinuousDumpConfig;
var JavaContinuousDumpConfig = protos.perfetto.protos.JavaHprofConfig.ContinuousDumpConfig;
exports.JavaContinuousDumpConfig = JavaContinuousDumpConfig;
var DataSourceConfig = protos.perfetto.protos.DataSourceConfig;
exports.DataSourceConfig = DataSourceConfig;
var DataSourceDescriptor = protos.perfetto.protos.DataSourceDescriptor;
exports.DataSourceDescriptor = DataSourceDescriptor;
var FtraceConfig = protos.perfetto.protos.FtraceConfig;
exports.FtraceConfig = FtraceConfig;
var HeapprofdConfig = protos.perfetto.protos.HeapprofdConfig;
exports.HeapprofdConfig = HeapprofdConfig;
var JavaHprofConfig = protos.perfetto.protos.JavaHprofConfig;
exports.JavaHprofConfig = JavaHprofConfig;
var MeminfoCounters = protos.perfetto.protos.MeminfoCounters;
exports.MeminfoCounters = MeminfoCounters;
var ProcessStatsConfig = protos.perfetto.protos.ProcessStatsConfig;
exports.ProcessStatsConfig = ProcessStatsConfig;
var StatCounters = protos.perfetto.protos.SysStatsConfig.StatCounters;
exports.StatCounters = StatCounters;
var SysStatsConfig = protos.perfetto.protos.SysStatsConfig;
exports.SysStatsConfig = SysStatsConfig;
var TraceConfig = protos.perfetto.protos.TraceConfig;
exports.TraceConfig = TraceConfig;
var VmstatCounters = protos.perfetto.protos.VmstatCounters;
exports.VmstatCounters = VmstatCounters;
var IPCFrame = protos.perfetto.protos.IPCFrame;
exports.IPCFrame = IPCFrame;
var EnableTracingRequest = protos.perfetto.protos.EnableTracingRequest;
exports.EnableTracingRequest = EnableTracingRequest;
var DisableTracingRequest = protos.perfetto.protos.DisableTracingRequest;
exports.DisableTracingRequest = DisableTracingRequest;
var GetTraceStatsRequest = protos.perfetto.protos.GetTraceStatsRequest;
exports.GetTraceStatsRequest = GetTraceStatsRequest;
var FreeBuffersRequest = protos.perfetto.protos.FreeBuffersRequest;
exports.FreeBuffersRequest = FreeBuffersRequest;
var ReadBuffersRequest = protos.perfetto.protos.ReadBuffersRequest;
exports.ReadBuffersRequest = ReadBuffersRequest;
var QueryServiceStateRequest = protos.perfetto.protos.QueryServiceStateRequest;
exports.QueryServiceStateRequest = QueryServiceStateRequest;
var EnableTracingResponse = protos.perfetto.protos.EnableTracingResponse;
exports.EnableTracingResponse = EnableTracingResponse;
var DisableTracingResponse = protos.perfetto.protos.DisableTracingResponse;
exports.DisableTracingResponse = DisableTracingResponse;
var GetTraceStatsResponse = protos.perfetto.protos.GetTraceStatsResponse;
exports.GetTraceStatsResponse = GetTraceStatsResponse;
var FreeBuffersResponse = protos.perfetto.protos.FreeBuffersResponse;
exports.FreeBuffersResponse = FreeBuffersResponse;
var ReadBuffersResponse = protos.perfetto.protos.ReadBuffersResponse;
exports.ReadBuffersResponse = ReadBuffersResponse;
var QueryServiceStateResponse = protos.perfetto.protos.QueryServiceStateResponse;
exports.QueryServiceStateResponse = QueryServiceStateResponse;
// Trace Processor protos.
var QueryArgs = protos.perfetto.protos.QueryArgs;
exports.QueryArgs = QueryArgs;
var StatusResult = protos.perfetto.protos.StatusResult;
exports.StatusResult = StatusResult;
var ComputeMetricArgs = protos.perfetto.protos.ComputeMetricArgs;
exports.ComputeMetricArgs = ComputeMetricArgs;
var ComputeMetricResult = protos.perfetto.protos.ComputeMetricResult;
exports.ComputeMetricResult = ComputeMetricResult;
var DisableAndReadMetatraceResult = protos.perfetto.protos.DisableAndReadMetatraceResult;
exports.DisableAndReadMetatraceResult = DisableAndReadMetatraceResult;
var Trace = protos.perfetto.protos.Trace;
exports.Trace = Trace;
var TracePacket = protos.perfetto.protos.TracePacket;
exports.TracePacket = TracePacket;
var PerfettoMetatrace = protos.perfetto.protos.PerfettoMetatrace;
exports.PerfettoMetatrace = PerfettoMetatrace;

});

var metatracing = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022  The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.traceEventEnd = exports.traceEventBegin = exports.getEnabledMetatracingCategories = exports.isMetatracingEnabled = exports.disableMetatracingAndGetTrace = exports.enableMetatracing = void 0;




const METATRACING_BUFFER_SIZE = 100000;
const JS_THREAD_ID = 2;
var MetatraceCategories = protos.perfetto.protos.MetatraceCategories;
const AOMT_FLAG = feature_flags.featureFlags.register({
    id: 'alwaysOnMetatracing',
    name: 'Enable always-on-metatracing',
    description: 'Enables trace events in the UI and trace processor',
    defaultValue: false,
});
const AOMT_DETAILED_FLAG = feature_flags.featureFlags.register({
    id: 'alwaysOnMetatracing_detailed',
    name: 'Detailed always-on-metatracing',
    description: 'Enables recording additional events for trace event',
    defaultValue: false,
});
function getInitialCategories() {
    if (!AOMT_FLAG.get())
        return undefined;
    if (AOMT_DETAILED_FLAG.get())
        return MetatraceCategories.ALL;
    return MetatraceCategories.TOPLEVEL;
}
let enabledCategories = getInitialCategories();
function enableMetatracing(categories) {
    enabledCategories = categories || MetatraceCategories.ALL;
}
exports.enableMetatracing = enableMetatracing;
function disableMetatracingAndGetTrace() {
    enabledCategories = undefined;
    return readMetatrace();
}
exports.disableMetatracingAndGetTrace = disableMetatracingAndGetTrace;
function isMetatracingEnabled() {
    return enabledCategories !== undefined;
}
exports.isMetatracingEnabled = isMetatracingEnabled;
function getEnabledMetatracingCategories() {
    return enabledCategories;
}
exports.getEnabledMetatracingCategories = getEnabledMetatracingCategories;
const traceEvents = [];
function readMetatrace() {
    const eventToPacket = (e) => {
        return protos_1.TracePacket.create({
            timestamp: e.startNs,
            timestampClockId: 1,
            perfettoMetatrace: protos_1.PerfettoMetatrace.create({
                eventName: e.eventName,
                threadId: JS_THREAD_ID,
                eventDurationNs: e.durNs,
            }),
        });
    };
    const packets = [];
    for (const event of traceEvents) {
        packets.push(eventToPacket(event));
    }
    const trace = protos_1.Trace.create({
        packet: packets,
    });
    return protos_1.Trace.encode(trace).finish();
}
function now() {
    return (0, time.toNs)((performance.timeOrigin + performance.now()) / 1000);
}
function traceEventBegin(eventName) {
    return {
        eventName,
        startNs: now(),
    };
}
exports.traceEventBegin = traceEventBegin;
function traceEventEnd(traceEvent) {
    if (!isMetatracingEnabled())
        return;
    traceEvents.push({
        eventName: traceEvent.eventName,
        startNs: traceEvent.startNs,
        durNs: now() - traceEvent.startNs,
    });
    while (traceEvents.length > METATRACING_BUFFER_SIZE) {
        traceEvents.shift();
    }
}
exports.traceEventEnd = traceEventEnd;

});

var actions = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Actions = exports.StateActions = void 0;









const DEBUG_SLICE_TRACK_KIND = 'DebugSliceTrack';
function clearTraceState(state) {
    const nextId = state.nextId;
    const recordConfig = state.recordConfig;
    const recordingTarget = state.recordingTarget;
    const fetchChromeCategories = state.fetchChromeCategories;
    const extensionInstalled = state.extensionInstalled;
    const availableAdbDevices = state.availableAdbDevices;
    const chromeCategories = state.chromeCategories;
    const newEngineMode = state.newEngineMode;
    Object.assign(state, (0, empty_state.createEmptyState)());
    state.nextId = nextId;
    state.recordConfig = recordConfig;
    state.recordingTarget = recordingTarget;
    state.fetchChromeCategories = fetchChromeCategories;
    state.extensionInstalled = extensionInstalled;
    state.availableAdbDevices = availableAdbDevices;
    state.chromeCategories = chromeCategories;
    state.newEngineMode = newEngineMode;
}
function generateNextId(draft) {
    const nextId = String(Number(draft.nextId) + 1);
    draft.nextId = nextId;
    return nextId;
}
// A helper to clean the state for a given removeable track.
// This is not exported as action to make it clear that not all
// tracks are removeable.
function removeTrack(state$1, trackId) {
    const track = state$1.tracks[trackId];
    delete state$1.tracks[trackId];
    const removeTrackId = (arr) => {
        const index = arr.indexOf(trackId);
        if (index !== -1)
            arr.splice(index, 1);
    };
    if (track.trackGroup === state.SCROLLING_TRACK_GROUP) {
        removeTrackId(state$1.scrollingTracks);
    }
    else if (track.trackGroup !== undefined) {
        removeTrackId(state$1.trackGroups[track.trackGroup].tracks);
    }
    state$1.pinnedTracks = state$1.pinnedTracks.filter((id) => id !== trackId);
}
let statusTraceEvent;
exports.StateActions = {
    openTraceFromFile(state, args) {
        clearTraceState(state);
        const id = generateNextId(state);
        state.currentEngineId = id;
        state.engines[id] = {
            id,
            ready: false,
            source: { type: 'FILE', file: args.file },
        };
    },
    openTraceFromBuffer(state, args) {
        clearTraceState(state);
        const id = generateNextId(state);
        state.currentEngineId = id;
        state.engines[id] = {
            id,
            ready: false,
            source: Object.assign({ type: 'ARRAY_BUFFER' }, args),
        };
    },
    openTraceFromUrl(state, args) {
        clearTraceState(state);
        const id = generateNextId(state);
        state.currentEngineId = id;
        state.engines[id] = {
            id,
            ready: false,
            source: { type: 'URL', url: args.url },
        };
    },
    openTraceFromHttpRpc(state, _args) {
        clearTraceState(state);
        const id = generateNextId(state);
        state.currentEngineId = id;
        state.engines[id] = {
            id,
            ready: false,
            source: { type: 'HTTP_RPC' },
        };
    },
    setTraceUuid(state, args) {
        state.traceUuid = args.traceUuid;
    },
    fillUiTrackIdByTraceTrackId(state, trackState, uiTrackId) {
        const namespace = trackState.config.namespace;
        if (namespace !== undefined)
            return;
        const setUiTrackId = (trackId, uiTrackId) => {
            if (state.uiTrackIdByTraceTrackId[trackId] !== undefined &&
                state.uiTrackIdByTraceTrackId[trackId] !== uiTrackId) {
                throw new Error(`Trying to map track id ${trackId} to UI track ${uiTrackId}, already mapped to ${state.uiTrackIdByTraceTrackId[trackId]}`);
            }
            state.uiTrackIdByTraceTrackId[trackId] = uiTrackId;
        };
        const config = trackState.config;
        if (config.trackId !== undefined) {
            setUiTrackId(config.trackId, uiTrackId);
            return;
        }
        const multiple = trackState.config;
        if (multiple.trackIds !== undefined) {
            for (const trackId of multiple.trackIds) {
                setUiTrackId(trackId, uiTrackId);
            }
        }
    },
    addTracks(state$1, args) {
        args.tracks.forEach((track) => {
            const id = track.id === undefined ? generateNextId(state$1) : track.id;
            track.id = id;
            state$1.tracks[id] = track;
            this.fillUiTrackIdByTraceTrackId(state$1, track, id);
            if (track.trackGroup === state.SCROLLING_TRACK_GROUP) {
                state$1.scrollingTracks.push(id);
            }
            else if (track.trackGroup !== undefined) {
                (0, logging.assertExists)(state$1.trackGroups[track.trackGroup]).tracks.push(id);
            }
        });
    },
    setUtidToTrackSortKey(state, args) {
        state.utidToThreadSortKey = args.threadOrderingMetadata;
    },
    addTrack(state$1, args) {
        const id = args.id !== undefined ? args.id : generateNextId(state$1);
        state$1.tracks[id] = {
            id,
            engineId: args.engineId,
            kind: args.kind,
            name: args.name,
            trackSortKey: args.trackSortKey,
            trackGroup: args.trackGroup,
            config: args.config,
        };
        this.fillUiTrackIdByTraceTrackId(state$1, state$1.tracks[id], id);
        if (args.trackGroup === state.SCROLLING_TRACK_GROUP) {
            state$1.scrollingTracks.push(id);
        }
        else if (args.trackGroup !== undefined) {
            (0, logging.assertExists)(state$1.trackGroups[args.trackGroup]).tracks.push(id);
        }
    },
    addTrackGroup(state, 
    // Define ID in action so a track group can be referred to without running
    // the reducer.
    args) {
        state.trackGroups[args.id] = {
            engineId: args.engineId,
            name: args.name,
            id: args.id,
            collapsed: args.collapsed,
            tracks: [args.summaryTrackId],
        };
    },
    addDebugTrack(state$1, args) {
        if (state$1.debugTrackId !== undefined)
            return;
        const trackId = generateNextId(state$1);
        state$1.debugTrackId = trackId;
        this.addTrack(state$1, {
            id: trackId,
            engineId: args.engineId,
            kind: DEBUG_SLICE_TRACK_KIND,
            name: args.name,
            trackSortKey: state.PrimaryTrackSortKey.DEBUG_SLICE_TRACK,
            trackGroup: state.SCROLLING_TRACK_GROUP,
            config: {
                maxDepth: 1,
            },
        });
        this.toggleTrackPinned(state$1, { trackId });
    },
    removeDebugTrack(state, _) {
        const { debugTrackId } = state;
        if (debugTrackId === undefined)
            return;
        removeTrack(state, debugTrackId);
        state.debugTrackId = undefined;
    },
    removeVisualisedArgTracks(state, args) {
        for (const trackId of args.trackIds) {
            const track = state.tracks[trackId];
            const namespace = track.config.namespace;
            if (namespace === undefined) {
                throw new Error('All visualised arg tracks should have non-empty namespace');
            }
            removeTrack(state, trackId);
        }
    },
    maybeExpandOnlyTrackGroup(state, _) {
        const trackGroups = Object.values(state.trackGroups);
        if (trackGroups.length === 1) {
            trackGroups[0].collapsed = false;
        }
    },
    sortThreadTracks(state$1, _) {
        const getFullKey = (a) => {
            const track = state$1.tracks[a];
            const threadTrackSortKey = track.trackSortKey;
            if (threadTrackSortKey.utid === undefined) {
                const sortKey = track.trackSortKey;
                return [
                    sortKey,
                    0,
                    0,
                    0,
                ];
            }
            const threadSortKey = state$1.utidToThreadSortKey[threadTrackSortKey.utid];
            return [
                threadSortKey ? threadSortKey.sortKey :
                    state.PrimaryTrackSortKey.ORDINARY_THREAD,
                threadSortKey && threadSortKey.tid !== undefined ? threadSortKey.tid :
                    Number.MAX_VALUE,
                threadTrackSortKey.utid,
                threadTrackSortKey.priority,
            ];
        };
        // Use a numeric collator so threads are sorted as T1, T2, ..., T10, T11,
        // rather than T1, T10, T11, ..., T2, T20, T21 .
        const coll = new Intl.Collator([], { sensitivity: 'base', numeric: true });
        for (const group of Object.values(state$1.trackGroups)) {
            group.tracks.sort((a, b) => {
                const aRank = getFullKey(a);
                const bRank = getFullKey(b);
                for (let i = 0; i < aRank.length; i++) {
                    if (aRank[i] !== bRank[i])
                        return aRank[i] - bRank[i];
                }
                const aName = state$1.tracks[a].name.toLocaleLowerCase();
                const bName = state$1.tracks[b].name.toLocaleLowerCase();
                return coll.compare(aName, bName);
            });
        }
    },
    updateAggregateSorting(state, args) {
        let prefs = state.aggregatePreferences[args.id];
        if (!prefs) {
            prefs = { id: args.id };
            state.aggregatePreferences[args.id] = prefs;
        }
        if (!prefs.sorting || prefs.sorting.column !== args.column) {
            // No sorting set for current column.
            state.aggregatePreferences[args.id].sorting = {
                column: args.column,
                direction: 'DESC',
            };
        }
        else if (prefs.sorting.direction === 'DESC') {
            // Toggle the direction if the column is currently sorted.
            state.aggregatePreferences[args.id].sorting = {
                column: args.column,
                direction: 'ASC',
            };
        }
        else {
            // If direction is currently 'ASC' toggle to no sorting.
            state.aggregatePreferences[args.id].sorting = undefined;
        }
    },
    setVisibleTracks(state, args) {
        state.visibleTracks = args.tracks;
    },
    updateTrackConfig(state, args) {
        if (state.tracks[args.id] === undefined)
            return;
        state.tracks[args.id].config = args.config;
    },
    executeQuery(state, args) {
        state.queries[args.queryId] = {
            id: args.queryId,
            query: args.query,
            engineId: args.engineId,
        };
    },
    deleteQuery(state, args) {
        delete state.queries[args.queryId];
    },
    moveTrack(state, args) {
        const moveWithinTrackList = (trackList) => {
            const newList = [];
            for (let i = 0; i < trackList.length; i++) {
                const curTrackId = trackList[i];
                if (curTrackId === args.dstId && args.op === 'before') {
                    newList.push(args.srcId);
                }
                if (curTrackId !== args.srcId) {
                    newList.push(curTrackId);
                }
                if (curTrackId === args.dstId && args.op === 'after') {
                    newList.push(args.srcId);
                }
            }
            trackList.splice(0);
            newList.forEach((x) => {
                trackList.push(x);
            });
        };
        moveWithinTrackList(state.pinnedTracks);
        moveWithinTrackList(state.scrollingTracks);
    },
    toggleTrackPinned(state$1, args) {
        const id = args.trackId;
        const isPinned = state$1.pinnedTracks.includes(id);
        const trackGroup = (0, logging.assertExists)(state$1.tracks[id]).trackGroup;
        if (isPinned) {
            state$1.pinnedTracks.splice(state$1.pinnedTracks.indexOf(id), 1);
            if (trackGroup === state.SCROLLING_TRACK_GROUP) {
                state$1.scrollingTracks.unshift(id);
            }
        }
        else {
            if (trackGroup === state.SCROLLING_TRACK_GROUP) {
                state$1.scrollingTracks.splice(state$1.scrollingTracks.indexOf(id), 1);
            }
            state$1.pinnedTracks.push(id);
        }
    },
    toggleTrackGroupCollapsed(state, args) {
        const id = args.trackGroupId;
        const trackGroup = (0, logging.assertExists)(state.trackGroups[id]);
        trackGroup.collapsed = !trackGroup.collapsed;
    },
    requestTrackReload(state, _) {
        if (state.lastTrackReloadRequest) {
            state.lastTrackReloadRequest++;
        }
        else {
            state.lastTrackReloadRequest = 1;
        }
    },
    // TODO(hjd): engine.ready should be a published thing. If it's part
    // of the state it interacts badly with permalinks.
    setEngineReady(state, args) {
        const engine = state.engines[args.engineId];
        if (engine === undefined) {
            return;
        }
        engine.ready = args.ready;
        engine.mode = args.mode;
    },
    setNewEngineMode(state, args) {
        state.newEngineMode = args.mode;
    },
    // Marks all engines matching the given |mode| as failed.
    setEngineFailed(state, args) {
        for (const engine of Object.values(state.engines)) {
            if (engine.mode === args.mode)
                engine.failed = args.failure;
        }
    },
    createPermalink(state, args) {
        state.permalink = {
            requestId: generateNextId(state),
            hash: undefined,
            isRecordingConfig: args.isRecordingConfig,
        };
    },
    setPermalink(state, args) {
        // Drop any links for old requests.
        if (state.permalink.requestId !== args.requestId)
            return;
        state.permalink = args;
    },
    loadPermalink(state, args) {
        state.permalink = { requestId: generateNextId(state), hash: args.hash };
    },
    clearPermalink(state, _) {
        state.permalink = {};
    },
    setTraceTime(state, args) {
        state.traceTime = args;
    },
    updateStatus(state, args) {
        if (statusTraceEvent) {
            (0, metatracing.traceEventEnd)(statusTraceEvent);
        }
        statusTraceEvent = (0, metatracing.traceEventBegin)(args.msg);
        state.status = args;
    },
    // TODO(hjd): Remove setState - it causes problems due to reuse of ids.
    setState(state, args) {
        for (const key of Object.keys(state)) {
            delete state[key];
        }
        for (const key of Object.keys(args.newState)) {
            state[key] = args.newState[key];
        }
        // If we're loading from a permalink then none of the engines can
        // possibly be ready:
        for (const engine of Object.values(state.engines)) {
            engine.ready = false;
        }
    },
    setRecordConfig(state, args) {
        state.recordConfig = args.config;
        state.lastLoadedConfig = args.configType || { type: 'NONE' };
    },
    selectNote(state, args) {
        if (args.id) {
            state.currentSelection = {
                kind: 'NOTE',
                id: args.id,
            };
        }
    },
    addAutomaticNote(state, args) {
        const id = generateNextId(state);
        state.notes[id] = {
            noteType: 'DEFAULT',
            id,
            timestamp: args.timestamp,
            color: args.color,
            text: args.text,
        };
    },
    addNote(state, args) {
        const id = generateNextId(state);
        state.notes[id] = {
            noteType: 'DEFAULT',
            id,
            timestamp: args.timestamp,
            color: args.color,
            text: '',
        };
        this.selectNote(state, { id });
    },
    markCurrentArea(state, args) {
        if (state.currentSelection === null ||
            state.currentSelection.kind !== 'AREA') {
            return;
        }
        const id = args.persistent ? generateNextId(state) : '0';
        const color = args.persistent ? args.color : '#344596';
        state.notes[id] = {
            noteType: 'AREA',
            id,
            areaId: state.currentSelection.areaId,
            color,
            text: '',
        };
        state.currentSelection.noteId = id;
    },
    toggleMarkCurrentArea(state, args) {
        const selection = state.currentSelection;
        if (selection != null && selection.kind === 'AREA' &&
            selection.noteId !== undefined) {
            this.removeNote(state, { id: selection.noteId });
        }
        else {
            const color = (0, colorizer.randomColor)();
            this.markCurrentArea(state, { color, persistent: args.persistent });
        }
    },
    markArea(state, args) {
        const areaId = generateNextId(state);
        (0, logging.assertTrue)(args.area.endSec >= args.area.startSec);
        state.areas[areaId] = {
            id: areaId,
            startSec: args.area.startSec,
            endSec: args.area.endSec,
            tracks: args.area.tracks,
        };
        const noteId = args.persistent ? generateNextId(state) : '0';
        const color = args.persistent ? (0, colorizer.randomColor)() : '#344596';
        state.notes[noteId] = {
            noteType: 'AREA',
            id: noteId,
            areaId,
            color,
            text: '',
        };
    },
    changeNoteColor(state, args) {
        const note = state.notes[args.id];
        if (note === undefined)
            return;
        note.color = args.newColor;
    },
    changeNoteText(state, args) {
        const note = state.notes[args.id];
        if (note === undefined)
            return;
        note.text = args.newText;
    },
    removeNote(state, args) {
        if (state.notes[args.id] === undefined)
            return;
        delete state.notes[args.id];
        // For regular notes, we clear the current selection but for an area note
        // we only want to clear the note/marking and leave the area selected.
        if (state.currentSelection === null)
            return;
        if (state.currentSelection.kind === 'NOTE' &&
            state.currentSelection.id === args.id) {
            state.currentSelection = null;
        }
        else if (state.currentSelection.kind === 'AREA' &&
            state.currentSelection.noteId === args.id) {
            state.currentSelection.noteId = undefined;
        }
    },
    selectSlice(state, args) {
        state.currentSelection = {
            kind: 'SLICE',
            id: args.id,
            trackId: args.trackId,
        };
        state.pendingScrollId = args.scroll ? args.id : undefined;
    },
    selectCounter(state, args) {
        state.currentSelection = {
            kind: 'COUNTER',
            leftTs: args.leftTs,
            rightTs: args.rightTs,
            id: args.id,
            trackId: args.trackId,
        };
    },
    selectHeapProfile(state, args) {
        state.currentSelection = {
            kind: 'HEAP_PROFILE',
            id: args.id,
            upid: args.upid,
            ts: args.ts,
            type: args.type,
        };
        this.openFlamegraph(state, {
            type: args.type,
            startNs: (0, time.toNs)(state.traceTime.startSec),
            endNs: args.ts,
            upids: [args.upid],
            viewingOption: flamegraph_util.DEFAULT_VIEWING_OPTION,
        });
    },
    selectPerfSamples(state, args) {
        state.currentSelection = {
            kind: 'PERF_SAMPLES',
            id: args.id,
            upid: args.upid,
            leftTs: args.leftTs,
            rightTs: args.rightTs,
            type: args.type,
        };
        this.openFlamegraph(state, {
            type: args.type,
            startNs: args.leftTs,
            endNs: args.rightTs,
            upids: [args.upid],
            viewingOption: flamegraph_util.PERF_SAMPLES_KEY,
        });
    },
    openFlamegraph(state, args) {
        state.currentFlamegraphState = {
            kind: 'FLAMEGRAPH_STATE',
            upids: args.upids,
            startNs: args.startNs,
            endNs: args.endNs,
            type: args.type,
            viewingOption: args.viewingOption,
            focusRegex: '',
        };
    },
    selectCpuProfileSample(state, args) {
        state.currentSelection = {
            kind: 'CPU_PROFILE_SAMPLE',
            id: args.id,
            utid: args.utid,
            ts: args.ts,
        };
    },
    expandFlamegraphState(state, args) {
        if (state.currentFlamegraphState === null)
            return;
        state.currentFlamegraphState.expandedCallsite = args.expandedCallsite;
    },
    changeViewFlamegraphState(state, args) {
        if (state.currentFlamegraphState === null)
            return;
        state.currentFlamegraphState.viewingOption = args.viewingOption;
    },
    changeFocusFlamegraphState(state, args) {
        if (state.currentFlamegraphState === null)
            return;
        state.currentFlamegraphState.focusRegex = args.focusRegex;
    },
    selectChromeSlice(state, args) {
        state.currentSelection = {
            kind: 'CHROME_SLICE',
            id: args.id,
            trackId: args.trackId,
            table: args.table,
        };
        state.pendingScrollId = args.scroll ? args.id : undefined;
    },
    clearPendingScrollId(state, _) {
        state.pendingScrollId = undefined;
    },
    selectThreadState(state, args) {
        state.currentSelection = {
            kind: 'THREAD_STATE',
            id: args.id,
            trackId: args.trackId,
        };
    },
    selectLog(state, args) {
        state.currentSelection = {
            kind: 'LOG',
            id: args.id,
            trackId: args.trackId,
        };
        state.pendingScrollId = args.scroll ? args.id : undefined;
    },
    deselect(state, _) {
        state.currentSelection = null;
    },
    updateLogsPagination(state, args) {
        state.logsPagination = args;
    },
    startRecording(state, _) {
        state.recordingInProgress = true;
        state.lastRecordingError = undefined;
        state.recordingCancelled = false;
    },
    stopRecording(state, _) {
        state.recordingInProgress = false;
    },
    cancelRecording(state, _) {
        state.recordingInProgress = false;
        state.recordingCancelled = true;
    },
    setExtensionAvailable(state, args) {
        state.extensionInstalled = args.available;
    },
    setRecordingTarget(state, args) {
        state.recordingTarget = args.target;
    },
    setFetchChromeCategories(state, args) {
        state.fetchChromeCategories = args.fetch;
    },
    setAvailableAdbDevices(state, args) {
        state.availableAdbDevices = args.devices;
    },
    setOmnibox(state, args) {
        state.frontendLocalState.omniboxState = args;
    },
    selectArea(state, args) {
        const areaId = generateNextId(state);
        (0, logging.assertTrue)(args.area.endSec >= args.area.startSec);
        state.areas[areaId] = {
            id: areaId,
            startSec: args.area.startSec,
            endSec: args.area.endSec,
            tracks: args.area.tracks,
        };
        state.currentSelection = { kind: 'AREA', areaId };
    },
    editArea(state, args) {
        (0, logging.assertTrue)(args.area.endSec >= args.area.startSec);
        state.areas[args.areaId] = {
            id: args.areaId,
            startSec: args.area.startSec,
            endSec: args.area.endSec,
            tracks: args.area.tracks,
        };
    },
    reSelectArea(state, args) {
        state.currentSelection = {
            kind: 'AREA',
            areaId: args.areaId,
            noteId: args.noteId,
        };
    },
    toggleTrackSelection(state, args) {
        const selection = state.currentSelection;
        if (selection === null || selection.kind !== 'AREA')
            return;
        const areaId = selection.areaId;
        const index = state.areas[areaId].tracks.indexOf(args.id);
        if (index > -1) {
            state.areas[areaId].tracks.splice(index, 1);
            if (args.isTrackGroup) { // Also remove all child tracks.
                for (const childTrack of state.trackGroups[args.id].tracks) {
                    const childIndex = state.areas[areaId].tracks.indexOf(childTrack);
                    if (childIndex > -1) {
                        state.areas[areaId].tracks.splice(childIndex, 1);
                    }
                }
            }
        }
        else {
            state.areas[areaId].tracks.push(args.id);
            if (args.isTrackGroup) { // Also add all child tracks.
                for (const childTrack of state.trackGroups[args.id].tracks) {
                    if (!state.areas[areaId].tracks.includes(childTrack)) {
                        state.areas[areaId].tracks.push(childTrack);
                    }
                }
            }
        }
    },
    setVisibleTraceTime(state, args) {
        state.frontendLocalState.visibleState = Object.assign({}, args);
    },
    setChromeCategories(state, args) {
        state.chromeCategories = args.categories;
    },
    setLastRecordingError(state, args) {
        state.lastRecordingError = args.error;
        state.recordingStatus = undefined;
    },
    setRecordingStatus(state, args) {
        state.recordingStatus = args.status;
        state.lastRecordingError = undefined;
    },
    setAnalyzePageQuery(state, args) {
        state.analyzePageQuery = args.query;
    },
    requestSelectedMetric(state, _) {
        if (!state.metrics.availableMetrics)
            throw Error('No metrics available');
        if (state.metrics.selectedIndex === undefined) {
            throw Error('No metric selected');
        }
        state.metrics.requestedMetric =
            state.metrics.availableMetrics[state.metrics.selectedIndex];
    },
    resetMetricRequest(state, args) {
        if (state.metrics.requestedMetric !== args.name)
            return;
        state.metrics.requestedMetric = undefined;
    },
    setAvailableMetrics(state, args) {
        state.metrics.availableMetrics = args.availableMetrics;
        if (args.availableMetrics.length > 0)
            state.metrics.selectedIndex = 0;
    },
    setMetricSelectedIndex(state, args) {
        if (!state.metrics.availableMetrics ||
            args.index >= state.metrics.availableMetrics.length) {
            throw Error('metric selection out of bounds');
        }
        state.metrics.selectedIndex = args.index;
    },
    togglePerfDebug(state, _) {
        state.perfDebug = !state.perfDebug;
    },
    toggleSidebar(state, _) {
        state.sidebarVisible = !state.sidebarVisible;
    },
    setHoveredUtidAndPid(state, args) {
        state.hoveredPid = args.pid;
        state.hoveredUtid = args.utid;
    },
    setHighlightedSliceId(state, args) {
        state.highlightedSliceId = args.sliceId;
    },
    setHighlightedFlowLeftId(state, args) {
        state.focusedFlowIdLeft = args.flowId;
    },
    setHighlightedFlowRightId(state, args) {
        state.focusedFlowIdRight = args.flowId;
    },
    setSearchIndex(state, args) {
        state.searchIndex = args.index;
    },
    setHoveredLogsTimestamp(state, args) {
        state.hoveredLogsTimestamp = args.ts;
    },
    setHoveredNoteTimestamp(state, args) {
        state.hoveredNoteTimestamp = args.ts;
    },
    setCurrentTab(state, args) {
        state.currentTab = args.tab;
    },
    toggleAllTrackGroups(state, args) {
        for (const group of Object.values(state.trackGroups)) {
            group.collapsed = args.collapsed;
        }
    },
    togglePivotTableRedux(state, args) {
        var _a;
        state.nonSerializableState.pivotTableRedux.selectionArea =
            args.areaId === null ?
                undefined :
                { areaId: args.areaId, tracks: globals.globals.state.areas[args.areaId].tracks };
        if (args.areaId !==
            ((_a = state.nonSerializableState.pivotTableRedux.selectionArea) === null || _a === void 0 ? void 0 : _a.areaId)) {
            state.nonSerializableState.pivotTableRedux.queryResult = null;
        }
    },
    setPivotStateQueryResult(state, args) {
        state.nonSerializableState.pivotTableRedux.queryResult = args.queryResult;
    },
    setPivotTableReduxConstrainToArea(state, args) {
        state.nonSerializableState.pivotTableRedux.constrainToArea = args.constrain;
    },
    dismissFlamegraphModal(state, _) {
        state.flamegraphModalDismissed = true;
    },
    setPivotTableQueryRequested(state, args) {
        state.nonSerializableState.pivotTableRedux.queryRequested =
            args.queryRequested;
    },
    setPivotTablePivotSelected(state, args) {
        if (args.column.kind === 'argument' || args.column.table === 'slice') {
            (0, pivot_table_redux_types.toggleEnabled)(pivot_table_redux_types.tableColumnEquals, state.nonSerializableState.pivotTableRedux.selectedSlicePivots, args.column, args.selected);
        }
        else {
            (0, pivot_table_redux_types.toggleEnabled)(pivot_table_redux_types.tableColumnEquals, state.nonSerializableState.pivotTableRedux.selectedPivots, args.column, args.selected);
        }
    },
    setPivotTableAggregationSelected(state, args) {
        (0, pivot_table_redux_types.toggleEnabled)(pivot_table_redux_types.aggregationEquals, state.nonSerializableState.pivotTableRedux.selectedAggregations, args.column, args.selected);
    },
    setPivotTableAggregationFunction(state, args) {
        state.nonSerializableState.pivotTableRedux.selectedAggregations[args.index]
            .aggregationFunction = args.function;
    },
    setPivotTableSortColumn(state, args) {
        state.nonSerializableState.pivotTableRedux.sortCriteria = {
            column: args.column,
            order: args.order,
        };
    },
    addVisualisedArg(state, args) {
        if (!state.visualisedArgs.includes(args.argName)) {
            state.visualisedArgs.push(args.argName);
        }
    },
    removeVisualisedArg(state, args) {
        state.visualisedArgs =
            state.visualisedArgs.filter((val) => val !== args.argName);
    },
    setPivotTableArgumentNames(state, args) {
        state.nonSerializableState.pivotTableRedux.argumentNames =
            args.argumentNames;
    },
    changePivotTablePivotOrder(state, args) {
        moveElement(state.nonSerializableState.pivotTableRedux.selectedPivots, args.from, args.to, args.direction);
    },
    changePivotTableSlicePivotOrder(state, args) {
        moveElement(state.nonSerializableState.pivotTableRedux.selectedSlicePivots, args.from, args.to, args.direction);
    },
    changePivotTableAggregationOrder(state, args) {
        moveElement(state.nonSerializableState.pivotTableRedux.selectedAggregations, args.from, args.to, args.direction);
    },
};
// Move element at `from` index to `direction` of `to` element.
// Implements logic for reordering table columns via drag'n'drop.
function moveElement(array, from, to, direction) {
    // New location of the "to" element: would be shifted by minus one if "from"
    // element comes before it.
    const newTo = to - ((from < to) ? 1 : 0);
    // The resulting index where the "from" element has to be spliced in to.
    const insertionPoint = newTo + ((direction === 'right') ? 1 : 0);
    const fromElement = array[from];
    array.splice(from, 1);
    array.splice(insertionPoint, 0, fromElement);
}
// Actions is an implementation of DeferredActions<typeof StateActions>.
// (since StateActions is a variable not a type we have to do
// 'typeof StateActions' to access the (unnamed) type of StateActions).
// It's a Proxy such that any attribute access returns a function:
// (args) => {return {type: ATTRIBUTE_NAME, args};}
exports.Actions = new Proxy({}, {
    get(_, prop, _2) {
        return (args) => {
            return {
                type: prop,
                args,
            };
        };
    },
});

});

var aggregation_data = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.isEmptyData = void 0;
function isEmptyData(data) {
    return data.columns.length === 0 || data.columns[0].data.length === 0;
}
exports.isEmptyData = isEmptyData;

});

var logs = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.LogEntriesKey = exports.LogBoundsKey = exports.LogExistsKey = void 0;
exports.LogExistsKey = 'log-exists';
exports.LogBoundsKey = 'log-bounds';
exports.LogEntriesKey = 'log-entries';

});

var deferred = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.defer = void 0;
// Create a promise with exposed resolve and reject callbacks.
function defer() {
    let resolve = null;
    let reject = null;
    const p = new Promise((res, rej) => [resolve, reject] = [res, rej]);
    return Object.assign(p, { resolve, reject });
}
exports.defer = defer;

});

var modal = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.showModal = exports.fullscreenModalContainer = exports.ModalContainer = exports.Modal = void 0;

// This module deals with modal dialogs. Unlike most components, here we want to
// render the DOM elements outside of the corresponding vdom tree. For instance
// we might want to instantiate a modal dialog all the way down from a nested
// Mithril sub-component, but we want the result dom element to be nested under
// the root <body>.
//
// This is achieved by splitting:
// 1. ModalContainer: it's the placeholder (e.g., the thing that should be added
//    under <body>) where the DOM elements will be rendered into. This is NOT
//    a mithril component itself.
// 2. Modal: is the Mithril component with the actual VDOM->DOM handling.
//    This can be used directly in the cases where the modal DOM should be
//    placed presicely where the corresponding Mithril VDOM is.
//    In turn this is split into Modal and ModalImpl, to deal with fade-out, see
//    comments around onbeforeremove.
// Usage (in the case of DOM not matching VDOM):
// - Create a ModalContainer instance somewhere (e.g. a singleton for the case
//   of the full-screen modal dialog).
// - In the view() method of the component that should host the DOM elements
//   (e.g. in the root pages.ts) do the following:
//   view() {
//     return m('main',
//        m('h2', ...)
//        m(modalContainerInstance.mithrilComponent);
//   }
//
// - In the view() method of the nested component that wants to show the modal
//   dialog do the following:
//   view() {
//     if (shouldShowModalDialog) {
//       modalContainerInstance.update({title: 'Foo', content, buttons: ...});
//     }
//     return m('.nested-widget',
//       m('div', ...));
//   }
//
// For one-show use-cases it's still possible to just use:
// showModal({title: 'Foo', content, buttons: ...});




// The component that handles the actual modal dialog. Note that this uses
// position: absolute, so the modal dialog will be relative to the surrounding
// DOM.
// We need to split this into two components (Modal and ModalImpl) so that we
// can handle the fade-out animation via onbeforeremove. The problem here is
// that onbeforeremove is emitted only when the *parent* component removes the
// children from the vdom hierarchy. So we need a parent/child in our control to
// trigger this.
class Modal {
    constructor() {
        this.requestClose = false;
    }
    close() {
        // The next view pass will kick-off the modalFadeOut CSS animation by
        // appending the .modal-hidden CSS class.
        this.requestClose = true;
        globals.globals.rafScheduler.scheduleFullRedraw();
    }
    view(vnode) {
        if (this.requestClose || vnode.attrs.close) {
            return null;
        }
        return mithril(ModalImpl, Object.assign(Object.assign({}, vnode.attrs), { parent: this }));
    }
}
exports.Modal = Modal;
// The component that handles the actual modal dialog. Note that this uses
// position: absolute, so the modal dialog will be relative to the surrounding
// DOM.
class ModalImpl {
    view({ attrs }) {
        this.onClose = attrs.onClose;
        this.parent = attrs.parent;
        const buttons = [];
        for (const button of attrs.buttons || []) {
            buttons.push(mithril('button.modal-btn', {
                class: button.primary ? 'modal-btn-primary' : '',
                id: button.id,
                onclick: () => {
                    attrs.parent.close();
                    if (button.action !== undefined)
                        button.action();
                },
            }, button.text));
        }
        const aria = '[aria-labelledby=mm-title][aria-model][role=dialog]';
        const align = attrs.vAlign === 'TOP' ? '.modal-dialog-valign-top' : '';
        return mithril('.modal-backdrop', {
            onclick: this.onclick.bind(this),
            onkeyup: this.onkeyupdown.bind(this),
            onkeydown: this.onkeyupdown.bind(this),
            // onanimationend: this.onanimationend.bind(this),
            tabIndex: 0,
        }, mithril(`.modal-dialog${align}${aria}`, mithril('header', mithril('h2', { id: 'mm-title' }, attrs.title), mithril('button[aria-label=Close Modal]', { onclick: () => attrs.parent.close() }, mithril.trust('&#x2715'))), mithril('main', attrs.content), mithril('footer', buttons)));
    }
    oncreate(vnode) {
        if (vnode.dom instanceof HTMLElement) {
            // Focus the newly created dialog, so that we react to Escape keydown
            // even if the user has not clicked yet on any element.
            // If there is a primary button, focus that, so Enter does the default
            // action. If not just focus the whole dialog.
            const primaryBtn = vnode.dom.querySelector('.modal-btn-primary');
            if (primaryBtn) {
                primaryBtn.focus();
            }
            else {
                vnode.dom.focus();
            }
            // If the modal dialog is instantiated in a tall scrollable container,
            // make sure to scroll it into the view.
            vnode.dom.scrollIntoView({ 'block': 'center' });
        }
    }
    onbeforeremove(vnode) {
        const removePromise = (0, deferred.defer)();
        vnode.dom.addEventListener('animationend', () => removePromise.resolve());
        vnode.dom.classList.add('modal-fadeout');
        // Retuning `removePromise` will cause Mithril to defer the actual component
        // removal until the fade-out animation is done.
        return removePromise;
    }
    onremove() {
        if (this.onClose !== undefined) {
            this.onClose();
            globals.globals.rafScheduler.scheduleFullRedraw();
        }
    }
    onclick(e) {
        e.stopPropagation();
        // Only react when clicking on the backdrop. Don't close if the user clicks
        // on the dialog itself.
        const t = e.target;
        if (t instanceof Element && t.classList.contains('modal-backdrop')) {
            (0, logging.assertExists)(this.parent).close();
        }
    }
    onkeyupdown(e) {
        e.stopPropagation();
        if (e.key === 'Escape' && e.type !== 'keyup') {
            (0, logging.assertExists)(this.parent).close();
        }
    }
}
// This is deliberately NOT a Mithril component. We want to manage the lifetime
// independently (outside of Mithril), so we can render from outside the current
// vdom sub-tree. ModalContainer instances should be singletons / globals.
class ModalContainer {
    constructor() {
        this.generation = 1; // Start with a generation > `closeGeneration`.
        this.closeGeneration = 0;
        // This is the mithril component that is exposed to the embedder (e.g. see
        // pages.ts). The caller is supposed to hyperscript this while building the
        // vdom tree that should host the modal dialog.
        this.mithrilComponent = {
            container: this,
            view: function () {
                const thiz = this.container;
                const attrs = thiz.attrs;
                if (attrs === undefined) {
                    return null;
                }
                return [mithril(Modal, Object.assign(Object.assign({}, attrs), { onClose: () => {
                            var _a;
                            // Remember the fact that the dialog was dismissed, in case the
                            // whole ModalContainer gets instantiated from a different page
                            // (which would cause the Modal to be destroyed and recreated).
                            thiz.closeGeneration = thiz.generation;
                            if (((_a = thiz.attrs) === null || _a === void 0 ? void 0 : _a.onClose) !== undefined) {
                                thiz.attrs.onClose();
                                globals.globals.rafScheduler.scheduleFullRedraw();
                            }
                        }, close: thiz.closeGeneration === thiz.generation ? true :
                            attrs.close, key: thiz.generation }))];
            },
        };
    }
    // This should be called to show a new modal dialog. The modal dialog will
    // be shown the next time something calls render() in a Mithril draw pass.
    // This enforces the creation of a new dialog.
    createNew(attrs) {
        this.generation++;
        this.updateVdom(attrs);
    }
    // Updates the current dialog or creates a new one if not existing. If a
    // dialog exists already, this will update the DOM of the existing dialog.
    // This should be called in at view() time by a nested Mithril component which
    // wants to display a modal dialog (but wants it to render outside).
    updateVdom(attrs) {
        this.attrs = attrs;
    }
    close() {
        this.closeGeneration = this.generation;
        globals.globals.rafScheduler.scheduleFullRedraw();
    }
}
exports.ModalContainer = ModalContainer;
// This is the default instance used for full-screen modal dialogs.
// page.ts calls `m(fullscreenModalContainer.mithrilComponent)` in its view().
exports.fullscreenModalContainer = new ModalContainer();
function showModal(attrs) {
    return tslib.__awaiter(this, void 0, void 0, function* () {
        // When using showModal, the caller cannot pass an onClose promise. It should
        // use the returned promised instead. onClose is only for clients using the
        // Mithril component directly.
        (0, logging.assertTrue)(attrs.onClose === undefined);
        const promise = (0, deferred.defer)();
        exports.fullscreenModalContainer.createNew(Object.assign(Object.assign({}, attrs), { onClose: () => promise.resolve() }));
        globals.globals.rafScheduler.scheduleFullRedraw();
        return promise;
    });
}
exports.showModal = showModal;

});

var help_modal = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.toggleHelp = void 0;



function toggleHelp() {
    globals.globals.logging.logEvent('User Actions', 'Show help');
    showHelp();
}
exports.toggleHelp = toggleHelp;
function keycap(key) {
    return mithril('.keycap', key);
}
function showHelp() {
    const ctrlOrCmd = window.navigator.platform.indexOf('Mac') !== -1 ? 'Cmd' : 'Ctrl';
    (0, modal.showModal)({
        title: 'Perfetto Help',
        content: mithril('.help', mithril('h2', 'Navigation'), mithril('table', mithril('tr', mithril('td', keycap('w'), '/', keycap('s')), mithril('td', 'Zoom in/out')), mithril('tr', mithril('td', keycap('a'), '/', keycap('d')), mithril('td', 'Pan left/right'))), mithril('h2', 'Mouse Controls'), mithril('table', mithril('tr', mithril('td', 'Click'), mithril('td', 'Select event')), mithril('tr', mithril('td', 'Ctrl + Scroll wheel'), mithril('td', 'Zoom in/out')), mithril('tr', mithril('td', 'Click + Drag'), mithril('td', 'Select area')), mithril('tr', mithril('td', 'Shift + Click + Drag'), mithril('td', 'Pan left/right'))), mithril('h2', 'Making SQL queries from the viewer page'), mithril('table', mithril('tr', mithril('td', keycap(':'), ' in the (empty) search box'), mithril('td', 'Switch to query input')), mithril('tr', mithril('td', keycap('Enter')), mithril('td', 'Execute query')), mithril('tr', mithril('td', keycap('Ctrl'), ' + ', keycap('Enter')), mithril('td', 'Execute query and pin output ' +
            '(output will not be replaced by regular query input)'))), mithril('h2', 'Making SQL queries from the query page'), mithril('table', mithril('tr', mithril('td', keycap('Ctrl'), ' + ', keycap('Enter')), mithril('td', 'Execute query')), mithril('tr', mithril('td', keycap('Ctrl'), ' + ', keycap('Enter'), ' (with selection)'), mithril('td', 'Execute selection'))), mithril('h2', 'Other'), mithril('table', mithril('tr', mithril('td', keycap('f'), ' (with event selected)'), mithril('td', 'Scroll + zoom to current selection')), mithril('tr', mithril('td', keycap('['), '/', keycap(']'), ' (with event selected)'), mithril('td', 'Select next/previous slice that is connected by a flow.', mithril('br'), 'If there are multiple flows,' +
            'the one that is in focus (bold) is selected')), mithril('tr', mithril('td', keycap(ctrlOrCmd), ' + ', keycap('['), '/', keycap(']'), ' (with event selected)'), mithril('td', 'Switch focus to another flow')), mithril('tr', mithril('td', keycap('m'), ' (with event or area selected)'), mithril('td', 'Mark the area (temporarily)')), mithril('tr', mithril('td', keycap('Shift'), ' + ', keycap('m'), ' (with event or area selected)'), mithril('td', 'Mark the area (persistently)')), mithril('tr', mithril('td', keycap(ctrlOrCmd), ' + ', keycap('a')), mithril('td', 'Select all')), mithril('tr', mithril('td', keycap(ctrlOrCmd), ' + ', keycap('b')), mithril('td', 'Toggle display of sidebar')), mithril('tr', mithril('td', keycap('?')), mithril('td', 'Show help')))),
        buttons: [],
    });
}

});

var scroll_helper = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.scrollToTrackAndTs = exports.verticalScrollToTrack = exports.focusHorizontalRange = exports.horizontalScrollToTs = void 0;




const INCOMPLETE_SLICE_TIME_S = 0.00003;
// Given a timestamp, if |ts| is not currently in view move the view to
// center |ts|, keeping the same zoom level.
function horizontalScrollToTs(ts) {
    const startNs = (0, time.toNs)(globals.globals.frontendLocalState.visibleWindowTime.start);
    const endNs = (0, time.toNs)(globals.globals.frontendLocalState.visibleWindowTime.end);
    const currentViewNs = endNs - startNs;
    if (ts < startNs || ts > endNs) {
        // TODO(hjd): This is an ugly jump, we should do a smooth pan instead.
        globals.globals.frontendLocalState.updateVisibleTime(new time.TimeSpan((0, time.fromNs)(ts - currentViewNs / 2), (0, time.fromNs)(ts + currentViewNs / 2)));
    }
}
exports.horizontalScrollToTs = horizontalScrollToTs;
// Given a start and end timestamp (in ns), move the viewport to center this
// range and zoom if necessary:
// - If [viewPercentage] is specified, the viewport will be zoomed so that
//   the given time range takes up this percentage of the viewport.
// The following scenarios assume [viewPercentage] is undefined.
// - If the new range is more than 50% of the viewport, zoom out to a level
// where
//   the range is 1/5 of the viewport.
// - If the new range is already centered, update the zoom level for the
// viewport
//   to cover 1/5 of the viewport.
// - Otherwise, preserve the zoom range.
function focusHorizontalRange(startTs, endTs, viewPercentage) {
    const visibleDur = globals.globals.frontendLocalState.visibleWindowTime.end -
        globals.globals.frontendLocalState.visibleWindowTime.start;
    let selectDur = endTs - startTs;
    // TODO(altimin): We go from `ts` and `dur` to `startTs` and `endTs` and back
    // to `dur`. We should fix that.
    if ((0, time.toNs)(selectDur) === -1) { // Unfinished slice
        selectDur = INCOMPLETE_SLICE_TIME_S;
        endTs = startTs;
    }
    if (viewPercentage !== undefined) {
        if (viewPercentage <= 0.0 || viewPercentage > 1.0) {
            console.warn('Invalid value for [viewPercentage]. ' +
                'Value must be between 0.0 (exclusive) and 1.0 (inclusive).');
            // Default to 50%.
            viewPercentage = 0.5;
        }
        const paddingPercentage = 1.0 - viewPercentage;
        const paddingTime = selectDur * paddingPercentage;
        const halfPaddingTime = paddingTime / 2;
        globals.globals.frontendLocalState.updateVisibleTime(new time.TimeSpan(startTs - halfPaddingTime, endTs + halfPaddingTime));
        return;
    }
    // If the range is too large to fit on the current zoom level, resize.
    if (selectDur > 0.5 * visibleDur) {
        globals.globals.frontendLocalState.updateVisibleTime(new time.TimeSpan(startTs - (selectDur * 2), endTs + (selectDur * 2)));
        return;
    }
    const midpointTs = (endTs + startTs) / 2;
    // Calculate the new visible window preserving the zoom level.
    let newStartTs = midpointTs - visibleDur / 2;
    let newEndTs = midpointTs + visibleDur / 2;
    // Adjust the new visible window if it intersects with the trace boundaries.
    // It's needed to make the "update the zoom level if visible window doesn't
    // change" logic reliable.
    if (newEndTs > globals.globals.state.traceTime.endSec) {
        newStartTs = globals.globals.state.traceTime.endSec - visibleDur;
        newEndTs = globals.globals.state.traceTime.endSec;
    }
    if (newStartTs < globals.globals.state.traceTime.startSec) {
        newStartTs = globals.globals.state.traceTime.startSec;
        newEndTs = globals.globals.state.traceTime.startSec + visibleDur;
    }
    const newStartNs = (0, time.toNs)(newStartTs);
    const newEndNs = (0, time.toNs)(newEndTs);
    const viewStartNs = (0, time.toNs)(globals.globals.frontendLocalState.visibleWindowTime.start);
    const viewEndNs = (0, time.toNs)(globals.globals.frontendLocalState.visibleWindowTime.end);
    // If preserving the zoom doesn't change the visible window, update the zoom
    // level.
    if (newStartNs === viewStartNs && newEndNs === viewEndNs) {
        globals.globals.frontendLocalState.updateVisibleTime(new time.TimeSpan(startTs - (selectDur * 2), endTs + (selectDur * 2)));
        return;
    }
    globals.globals.frontendLocalState.updateVisibleTime(new time.TimeSpan(newStartTs, newEndTs));
}
exports.focusHorizontalRange = focusHorizontalRange;
// Given a track id, find a track with that id and scroll it into view. If the
// track is nested inside a track group, scroll to that track group instead.
// If |openGroup| then open the track group and scroll to the track.
function verticalScrollToTrack(trackId, openGroup = false) {
    const trackIdString = `${trackId}`;
    const track = document.querySelector('#track_' + trackIdString);
    if (track) {
        // block: 'nearest' means that it will only scroll if the track is not
        // currently in view.
        track.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
        return;
    }
    let trackGroup = null;
    const trackGroupId = (0, state.getContainingTrackId)(globals.globals.state, trackIdString);
    if (trackGroupId) {
        trackGroup = document.querySelector('#track_' + trackGroupId);
    }
    if (!trackGroupId || !trackGroup) {
        console.error(`Can't scroll, track (${trackIdString}) not found.`);
        return;
    }
    // The requested track is inside a closed track group, either open the track
    // group and scroll to the track or just scroll to the track group.
    if (openGroup) {
        // After the track exists in the dom, it will be scrolled to.
        globals.globals.frontendLocalState.scrollToTrackId = trackId;
        globals.globals.dispatch(actions.Actions.toggleTrackGroupCollapsed({ trackGroupId }));
        return;
    }
    else {
        trackGroup.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
    }
}
exports.verticalScrollToTrack = verticalScrollToTrack;
// Scroll vertically and horizontally to reach track (|trackId|) at |ts|.
function scrollToTrackAndTs(trackId, ts, openGroup = false) {
    if (trackId !== undefined) {
        verticalScrollToTrack(trackId, openGroup);
    }
    horizontalScrollToTs(ts);
}
exports.scrollToTrackAndTs = scrollToTrackAndTs;

});

var binary_search = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.searchSegment = exports.searchRange = exports.searchEq = exports.search = void 0;
function searchImpl(haystack, needle, i, j) {
    if (i === j)
        return -1;
    if (i + 1 === j) {
        return (needle >= haystack[i]) ? i : -1;
    }
    const mid = Math.floor((j - i) / 2) + i;
    const midValue = haystack[mid];
    if (needle < midValue) {
        return searchImpl(haystack, needle, i, mid);
    }
    else {
        return searchImpl(haystack, needle, mid, j);
    }
}
function searchRangeImpl(haystack, needle, i, j) {
    if (i === j)
        return [i, j];
    if (i + 1 === j) {
        if (haystack[i] <= needle) {
            return [i, j];
        }
        else {
            return [i, i];
        }
    }
    const mid = Math.floor((j - i) / 2) + i;
    const midValue = haystack[mid];
    if (needle < midValue) {
        return searchRangeImpl(haystack, needle, i, mid);
    }
    else if (needle > midValue) {
        return searchRangeImpl(haystack, needle, mid, j);
    }
    else {
        while (haystack[i] !== needle)
            i++;
        while (haystack[j - 1] !== needle)
            j--;
        return [i, j];
    }
}
function search(haystack, needle) {
    return searchImpl(haystack, needle, 0, haystack.length);
}
exports.search = search;
// Given a sorted array of numbers (|haystack|) and a |needle| return the
// half open range [i, j) of indexes where |haystack| is equal to needle.
function searchEq(haystack, needle, optRange) {
    const range = searchRange(haystack, needle, optRange);
    const [i, j] = range;
    if (haystack[i] === needle)
        return range;
    return [j, j];
}
exports.searchEq = searchEq;
// Given a sorted array of numbers (|haystack|) and a |needle| return the
// smallest half open range [i, j) of indexes which contains |needle|.
function searchRange(haystack, needle, optRange) {
    const [left, right] = optRange ? optRange : [0, haystack.length];
    return searchRangeImpl(haystack, needle, left, right);
}
exports.searchRange = searchRange;
// Given a sorted array of numbers (|haystack|) and a |needle| return a
// pair of indexes [i, j] such that:
// If there is at least one element in |haystack| smaller than |needle|
// i is the index of the largest such number otherwise -1;
// If there is at least one element in |haystack| larger than |needle|
// j is the index of the smallest such element otherwise -1.
//
// So we try to get the indexes of the two data points around needle
// or -1 if there is no such datapoint.
function searchSegment(haystack, needle) {
    if (!haystack.length)
        return [-1, -1];
    const left = search(haystack, needle);
    if (left === -1) {
        return [left, 0];
    }
    else if (left + 1 === haystack.length) {
        return [left, -1];
    }
    else {
        return [left, left + 1];
    }
}
exports.searchSegment = searchSegment;

});

var search_handler = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.executeSearch = void 0;




function setToPrevious(current) {
    const index = Math.max(current - 1, 0);
    globals.globals.dispatch(actions.Actions.setSearchIndex({ index }));
}
function setToNext(current) {
    const index = Math.min(current + 1, globals.globals.currentSearchResults.totalResults - 1);
    globals.globals.dispatch(actions.Actions.setSearchIndex({ index }));
}
function executeSearch(reverse = false) {
    const index = globals.globals.state.searchIndex;
    const startNs = (0, time.toNs)(globals.globals.frontendLocalState.visibleWindowTime.start);
    const endNs = (0, time.toNs)(globals.globals.frontendLocalState.visibleWindowTime.end);
    const currentTs = globals.globals.currentSearchResults.tsStarts[index];
    // If this is a new search or the currentTs is not in the viewport,
    // select the first/last item in the viewport.
    if (index === -1 || currentTs < startNs || currentTs > endNs) {
        if (reverse) {
            const [smaller] = (0, binary_search.searchSegment)(globals.globals.currentSearchResults.tsStarts, endNs);
            // If there is no item in the viewport just go to the previous.
            if (smaller === -1) {
                setToPrevious(index);
            }
            else {
                globals.globals.dispatch(actions.Actions.setSearchIndex({ index: smaller }));
            }
        }
        else {
            const [, larger] = (0, binary_search.searchSegment)(globals.globals.currentSearchResults.tsStarts, startNs);
            // If there is no item in the viewport just go to the next.
            if (larger === -1) {
                setToNext(index);
            }
            else {
                globals.globals.dispatch(actions.Actions.setSearchIndex({ index: larger }));
            }
        }
    }
    else {
        // If the currentTs is in the viewport, increment the index.
        if (reverse) {
            setToPrevious(index);
        }
        else {
            setToNext(index);
        }
    }
    selectCurrentSearchResult();
}
exports.executeSearch = executeSearch;
function selectCurrentSearchResult() {
    const searchIndex = globals.globals.state.searchIndex;
    const source = globals.globals.currentSearchResults.sources[searchIndex];
    const currentId = globals.globals.currentSearchResults.sliceIds[searchIndex];
    const trackId = globals.globals.currentSearchResults.trackIds[searchIndex];
    if (currentId === undefined)
        return;
    if (source === 'cpu') {
        globals.globals.dispatch(actions.Actions.selectSlice({ id: currentId, trackId, scroll: true }));
    }
    else if (source === 'log') {
        globals.globals.dispatch(actions.Actions.selectLog({ id: currentId, trackId, scroll: true }));
    }
    else {
        // Search results only include slices from the slice table for now.
        // When we include annotations we need to pass the correct table.
        globals.globals.dispatch(actions.Actions.selectChromeSlice({ id: currentId, trackId, table: 'slice', scroll: true }));
    }
}

});

var keyboard_event_handler = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.findCurrentSelection = exports.handleKey = void 0;





const INSTANT_FOCUS_DURATION_S = 1 / 1e9; // 1 ns.
// Handles all key events than are not handled by the
// pan and zoom handler. Returns true if the event was handled.
function handleKey(e, down) {
    const key = e.key.toLowerCase();
    const selection = globals.globals.state.currentSelection;
    const noModifiers = !(e.ctrlKey || e.metaKey || e.altKey || e.shiftKey);
    const ctrlOrMeta = (e.ctrlKey || e.metaKey) && !(e.altKey || e.shiftKey);
    // No other modifiers other than possibly Shift.
    const maybeShift = !(e.ctrlKey || e.metaKey || e.altKey);
    if (down && 'm' === key && maybeShift) {
        if (selection && selection.kind === 'AREA') {
            globals.globals.dispatch(actions.Actions.toggleMarkCurrentArea({ persistent: e.shiftKey }));
        }
        else if (selection) {
            lockSliceSpan(e.shiftKey);
        }
        return true;
    }
    if (down && 'f' === key && noModifiers) {
        findCurrentSelection();
        return true;
    }
    if (down && 'a' === key && ctrlOrMeta) {
        let tracksToSelect = [];
        const selection = globals.globals.state.currentSelection;
        if (selection !== null && selection.kind === 'AREA') {
            const area = globals.globals.state.areas[selection.areaId];
            const coversEntireTimeRange = globals.globals.state.traceTime.startSec === area.startSec &&
                globals.globals.state.traceTime.endSec === area.endSec;
            if (!coversEntireTimeRange) {
                // If the current selection is an area which does not cover the entire
                // time range, preserve the list of selected tracks and expand the time
                // range.
                tracksToSelect = area.tracks;
            }
            else {
                // If the entire time range is already covered, update the selection to
                // cover all tracks.
                tracksToSelect = Object.keys(globals.globals.state.tracks);
            }
        }
        else {
            // If the current selection is not an area, select all.
            tracksToSelect = Object.keys(globals.globals.state.tracks);
        }
        globals.globals.dispatch(actions.Actions.selectArea({
            area: {
                startSec: globals.globals.state.traceTime.startSec,
                endSec: globals.globals.state.traceTime.endSec,
                tracks: tracksToSelect,
            },
        }));
        e.preventDefault();
        return true;
    }
    if (down && 'b' === key && ctrlOrMeta) {
        globals.globals.dispatch(actions.Actions.toggleSidebar({}));
        return true;
    }
    if (down && '?' === key && maybeShift) {
        (0, help_modal.toggleHelp)();
        return true;
    }
    if (down && 'enter' === key && maybeShift) {
        e.preventDefault();
        (0, search_handler.executeSearch)(e.shiftKey);
        return true;
    }
    if (down && 'escape' === key) {
        globals.globals.frontendLocalState.deselectArea();
        globals.globals.makeSelection(actions.Actions.deselect({}));
        globals.globals.dispatch(actions.Actions.removeNote({ id: '0' }));
        return true;
    }
    if (down && ']' === key && ctrlOrMeta) {
        focusOtherFlow('Forward');
        return true;
    }
    if (down && ']' === key && noModifiers) {
        moveByFocusedFlow('Forward');
        return true;
    }
    if (down && '[' === key && ctrlOrMeta) {
        focusOtherFlow('Backward');
        return true;
    }
    if (down && '[' === key && noModifiers) {
        moveByFocusedFlow('Backward');
        return true;
    }
    return false;
}
exports.handleKey = handleKey;
// Search |boundFlows| for |flowId| and return the id following it.
// Returns the first flow id if nothing was found or |flowId| was the last flow
// in |boundFlows|, and -1 if |boundFlows| is empty
function findAnotherFlowExcept(boundFlows, flowId) {
    let selectedFlowFound = false;
    if (boundFlows.length === 0) {
        return -1;
    }
    for (const flow of boundFlows) {
        if (selectedFlowFound) {
            return flow.id;
        }
        if (flow.id === flowId) {
            selectedFlowFound = true;
        }
    }
    return boundFlows[0].id;
}
// Change focus to the next flow event (matching the direction)
function focusOtherFlow(direction) {
    if (!globals.globals.state.currentSelection ||
        globals.globals.state.currentSelection.kind !== 'CHROME_SLICE') {
        return;
    }
    const sliceId = globals.globals.state.currentSelection.id;
    if (sliceId === -1) {
        return;
    }
    const boundFlows = globals.globals.connectedFlows.filter((flow) => flow.begin.sliceId === sliceId && direction === 'Forward' ||
        flow.end.sliceId === sliceId && direction === 'Backward');
    if (direction === 'Backward') {
        const nextFlowId = findAnotherFlowExcept(boundFlows, globals.globals.state.focusedFlowIdLeft);
        globals.globals.dispatch(actions.Actions.setHighlightedFlowLeftId({ flowId: nextFlowId }));
    }
    else {
        const nextFlowId = findAnotherFlowExcept(boundFlows, globals.globals.state.focusedFlowIdRight);
        globals.globals.dispatch(actions.Actions.setHighlightedFlowRightId({ flowId: nextFlowId }));
    }
}
// Select the slice connected to the flow in focus
function moveByFocusedFlow(direction) {
    if (!globals.globals.state.currentSelection ||
        globals.globals.state.currentSelection.kind !== 'CHROME_SLICE') {
        return;
    }
    const sliceId = globals.globals.state.currentSelection.id;
    const flowId = (direction === 'Backward' ? globals.globals.state.focusedFlowIdLeft :
        globals.globals.state.focusedFlowIdRight);
    if (sliceId === -1 || flowId === -1) {
        return;
    }
    // Find flow that is in focus and select corresponding slice
    for (const flow of globals.globals.connectedFlows) {
        if (flow.id === flowId) {
            const flowPoint = (direction === 'Backward' ? flow.begin : flow.end);
            const uiTrackId = globals.globals.state.uiTrackIdByTraceTrackId[flowPoint.trackId];
            if (uiTrackId) {
                globals.globals.makeSelection(actions.Actions.selectChromeSlice({
                    id: flowPoint.sliceId,
                    trackId: uiTrackId,
                    table: 'slice',
                    scroll: true,
                }));
            }
        }
    }
}
function findTimeRangeOfSelection() {
    const selection = globals.globals.state.currentSelection;
    let startTs = -1;
    let endTs = -1;
    if (selection === null) {
        return { startTs, endTs };
    }
    else if (selection.kind === 'SLICE' || selection.kind === 'CHROME_SLICE') {
        const slice = globals.globals.sliceDetails;
        if (slice.ts && slice.dur !== undefined && slice.dur > 0) {
            startTs = slice.ts + globals.globals.state.traceTime.startSec;
            endTs = startTs + slice.dur;
        }
        else if (slice.ts) {
            startTs = slice.ts + globals.globals.state.traceTime.startSec;
            // This will handle either:
            // a)slice.dur === -1 -> unfinished slice
            // b)slice.dur === 0  -> instant event
            endTs = slice.dur === -1 ? globals.globals.state.traceTime.endSec :
                startTs + INSTANT_FOCUS_DURATION_S;
        }
    }
    else if (selection.kind === 'THREAD_STATE') {
        const threadState = globals.globals.threadStateDetails;
        if (threadState.ts && threadState.dur) {
            startTs = threadState.ts + globals.globals.state.traceTime.startSec;
            endTs = startTs + threadState.dur;
        }
    }
    else if (selection.kind === 'COUNTER') {
        startTs = selection.leftTs;
        endTs = selection.rightTs;
    }
    else if (selection.kind === 'AREA') {
        const selectedArea = globals.globals.state.areas[selection.areaId];
        if (selectedArea) {
            startTs = selectedArea.startSec;
            endTs = selectedArea.endSec;
        }
    }
    else if (selection.kind === 'NOTE') {
        const selectedNote = globals.globals.state.notes[selection.id];
        // Notes can either be default or area notes. Area notes are handled
        // above in the AREA case.
        if (selectedNote && selectedNote.noteType === 'DEFAULT') {
            startTs = selectedNote.timestamp;
            endTs = selectedNote.timestamp + INSTANT_FOCUS_DURATION_S;
        }
    }
    else if (selection.kind === 'LOG') ;
    return { startTs, endTs };
}
function lockSliceSpan(persistent = false) {
    const range = findTimeRangeOfSelection();
    if (range.startTs !== -1 && range.endTs !== -1 &&
        globals.globals.state.currentSelection !== null) {
        const tracks = globals.globals.state.currentSelection.trackId ?
            [globals.globals.state.currentSelection.trackId] :
            [];
        const area = { startSec: range.startTs, endSec: range.endTs, tracks };
        globals.globals.dispatch(actions.Actions.markArea({ area, persistent }));
    }
}
function findCurrentSelection() {
    const selection = globals.globals.state.currentSelection;
    if (selection === null)
        return;
    const range = findTimeRangeOfSelection();
    if (range.startTs !== -1 && range.endTs !== -1) {
        (0, scroll_helper.focusHorizontalRange)(range.startTs, range.endTs);
    }
    if (selection.trackId) {
        (0, scroll_helper.verticalScrollToTrack)(selection.trackId, true);
    }
}
exports.findCurrentSelection = findCurrentSelection;

});

var publish = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.publishConnectedFlows = exports.publishThreadStateDetails = exports.publishSliceDetails = exports.publishThreads = exports.publishQueryResult = exports.publishAggregateData = exports.publishMetricError = exports.publishTraceErrors = exports.publishRecordingLog = exports.publishSearchResult = exports.publishSearch = exports.publishBufferUsage = exports.publishLoading = exports.publishConversionJobStatusUpdate = exports.publishHasFtrace = exports.publishCpuProfileDetails = exports.publishFlamegraphDetails = exports.publishCounterDetails = exports.publishSelectedFlows = exports.publishMetricResult = exports.publishTrackData = exports.publishOverviewData = void 0;





function publishOverviewData(data) {
    for (const [key, value] of Object.entries(data)) {
        if (!globals.globals.overviewStore.has(key)) {
            globals.globals.overviewStore.set(key, []);
        }
        if (value instanceof Array) {
            globals.globals.overviewStore.get(key).push(...value);
        }
        else {
            globals.globals.overviewStore.get(key).push(value);
        }
    }
    globals.globals.rafScheduler.scheduleRedraw();
}
exports.publishOverviewData = publishOverviewData;
function publishTrackData(args) {
    globals.globals.setTrackData(args.id, args.data);
    if ([logs.LogExistsKey, logs.LogBoundsKey, logs.LogEntriesKey].includes(args.id)) {
        const data = globals.globals.trackDataStore.get(logs.LogExistsKey);
        if (data && data.exists)
            globals.globals.rafScheduler.scheduleFullRedraw();
    }
    else {
        globals.globals.rafScheduler.scheduleRedraw();
    }
}
exports.publishTrackData = publishTrackData;
function publishMetricResult(metricResult) {
    globals.globals.setMetricResult(metricResult);
    globals.globals.publishRedraw();
}
exports.publishMetricResult = publishMetricResult;
function publishSelectedFlows(selectedFlows) {
    globals.globals.selectedFlows = selectedFlows;
    globals.globals.publishRedraw();
}
exports.publishSelectedFlows = publishSelectedFlows;
function publishCounterDetails(click) {
    globals.globals.counterDetails = click;
    globals.globals.publishRedraw();
}
exports.publishCounterDetails = publishCounterDetails;
function publishFlamegraphDetails(click) {
    globals.globals.flamegraphDetails = click;
    globals.globals.publishRedraw();
}
exports.publishFlamegraphDetails = publishFlamegraphDetails;
function publishCpuProfileDetails(details) {
    globals.globals.cpuProfileDetails = details;
    globals.globals.publishRedraw();
}
exports.publishCpuProfileDetails = publishCpuProfileDetails;
function publishHasFtrace(hasFtrace) {
    globals.globals.hasFtrace = hasFtrace;
    globals.globals.publishRedraw();
}
exports.publishHasFtrace = publishHasFtrace;
function publishConversionJobStatusUpdate(job) {
    globals.globals.setConversionJobStatus(job.jobName, job.jobStatus);
    globals.globals.publishRedraw();
}
exports.publishConversionJobStatusUpdate = publishConversionJobStatusUpdate;
function publishLoading(numQueuedQueries) {
    globals.globals.numQueuedQueries = numQueuedQueries;
    // TODO(hjd): Clean up loadingAnimation given that this now causes a full
    // redraw anyways. Also this should probably just go via the global state.
    globals.globals.rafScheduler.scheduleFullRedraw();
}
exports.publishLoading = publishLoading;
function publishBufferUsage(args) {
    globals.globals.setBufferUsage(args.percentage);
    globals.globals.publishRedraw();
}
exports.publishBufferUsage = publishBufferUsage;
function publishSearch(args) {
    globals.globals.searchSummary = args;
    globals.globals.publishRedraw();
}
exports.publishSearch = publishSearch;
function publishSearchResult(args) {
    globals.globals.currentSearchResults = args;
    globals.globals.publishRedraw();
}
exports.publishSearchResult = publishSearchResult;
function publishRecordingLog(args) {
    globals.globals.setRecordingLog(args.logs);
    globals.globals.publishRedraw();
}
exports.publishRecordingLog = publishRecordingLog;
function publishTraceErrors(numErrors) {
    globals.globals.setTraceErrors(numErrors);
    globals.globals.publishRedraw();
}
exports.publishTraceErrors = publishTraceErrors;
function publishMetricError(error) {
    globals.globals.setMetricError(error);
    globals.globals.logging.logError(error, false);
    globals.globals.publishRedraw();
}
exports.publishMetricError = publishMetricError;
function publishAggregateData(args) {
    globals.globals.setAggregateData(args.kind, args.data);
    if (!(0, aggregation_data.isEmptyData)(args.data)) {
        globals.globals.dispatch(actions.Actions.setCurrentTab({ tab: args.data.tabName }));
    }
    globals.globals.publishRedraw();
}
exports.publishAggregateData = publishAggregateData;
function publishQueryResult(args) {
    globals.globals.queryResults.set(args.id, args.data);
    globals.globals.dispatch(actions.Actions.setCurrentTab({ tab: `query_result_${args.id}` }));
    globals.globals.publishRedraw();
}
exports.publishQueryResult = publishQueryResult;
function publishThreads(data) {
    globals.globals.threads.clear();
    data.forEach((thread) => {
        globals.globals.threads.set(thread.utid, thread);
    });
    globals.globals.publishRedraw();
}
exports.publishThreads = publishThreads;
function publishSliceDetails(click) {
    globals.globals.sliceDetails = click;
    const id = click.id;
    if (id !== undefined && id === globals.globals.state.pendingScrollId) {
        (0, keyboard_event_handler.findCurrentSelection)();
        globals.globals.dispatch(actions.Actions.setCurrentTab({ tab: 'slice' }));
        globals.globals.dispatch(actions.Actions.clearPendingScrollId({ id: undefined }));
    }
    globals.globals.publishRedraw();
}
exports.publishSliceDetails = publishSliceDetails;
function publishThreadStateDetails(click) {
    globals.globals.threadStateDetails = click;
    globals.globals.publishRedraw();
}
exports.publishThreadStateDetails = publishThreadStateDetails;
function publishConnectedFlows(connectedFlows) {
    var _a;
    globals.globals.connectedFlows = connectedFlows;
    // If a chrome slice is selected and we have any flows in connectedFlows
    // we will find the flows on the right and left of that slice to set a default
    // focus. In all other cases the focusedFlowId(Left|Right) will be set to -1.
    globals.globals.dispatch(actions.Actions.setHighlightedFlowLeftId({ flowId: -1 }));
    globals.globals.dispatch(actions.Actions.setHighlightedFlowRightId({ flowId: -1 }));
    if (((_a = globals.globals.state.currentSelection) === null || _a === void 0 ? void 0 : _a.kind) === 'CHROME_SLICE') {
        const sliceId = globals.globals.state.currentSelection.id;
        for (const flow of globals.globals.connectedFlows) {
            if (flow.begin.sliceId === sliceId) {
                globals.globals.dispatch(actions.Actions.setHighlightedFlowRightId({ flowId: flow.id }));
            }
            if (flow.end.sliceId === sliceId) {
                globals.globals.dispatch(actions.Actions.setHighlightedFlowLeftId({ flowId: flow.id }));
            }
        }
    }
    globals.globals.publishRedraw();
}
exports.publishConnectedFlows = publishConnectedFlows;

});

var controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Controller = exports.Child = void 0;
function Child(id, factory, args) {
    return { id, factory, args };
}
exports.Child = Child;
class Controller {
    constructor(initialState) {
        // This is about the local FSM state, has nothing to do with the global
        // app state.
        this._stateChanged = false;
        this._inRunner = false;
        this._children = new Map();
        this._state = initialState;
    }
    onDestroy() { }
    // Invokes the current controller subtree, recursing into children.
    // While doing so handles lifecycle of child controllers.
    // This method should be called only by the runControllers() method in
    // globals.ts. Exposed publicly for testing.
    invoke() {
        if (this._inRunner)
            throw new Error('Reentrancy in Controller');
        this._stateChanged = false;
        this._inRunner = true;
        const resArray = this.run();
        let triggerAnotherRun = this._stateChanged;
        this._stateChanged = false;
        const nextChildren = new Map();
        if (resArray !== undefined) {
            for (const childConfig of resArray) {
                if (nextChildren.has(childConfig.id)) {
                    throw new Error(`Duplicate children controller ${childConfig.id}`);
                }
                nextChildren.set(childConfig.id, childConfig);
            }
        }
        const dtors = new Array();
        const runners = new Array();
        for (const key of this._children.keys()) {
            if (nextChildren.has(key))
                continue;
            const instance = this._children.get(key);
            this._children.delete(key);
            dtors.push(() => instance.onDestroy());
        }
        for (const nextChild of nextChildren.values()) {
            if (!this._children.has(nextChild.id)) {
                const instance = new nextChild.factory(nextChild.args);
                this._children.set(nextChild.id, instance);
            }
            const instance = this._children.get(nextChild.id);
            runners.push(() => instance.invoke());
        }
        for (const dtor of dtors)
            dtor(); // Invoke all onDestroy()s.
        // Invoke all runner()s.
        for (const runner of runners) {
            const recursiveRes = runner();
            triggerAnotherRun = triggerAnotherRun || recursiveRes;
        }
        this._inRunner = false;
        return triggerAnotherRun;
    }
    setState(state) {
        if (!this._inRunner) {
            throw new Error('Cannot setState() outside of the run() method');
        }
        this._stateChanged = state !== this._state;
        this._state = state;
    }
    get state() {
        return this._state;
    }
}
exports.Controller = Controller;

});

var immer_cjs_production_min = createCommonjsModule(function (module, exports) {
function n(n){for(var t=arguments.length,r=Array(t>1?t-1:0),e=1;e<t;e++)r[e-1]=arguments[e];throw Error("[Immer] minified error nr: "+n+(r.length?" "+r.map((function(n){return "'"+n+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function t(n){return !!n&&!!n[H]}function r(n){return !!n&&(function(n){if(!n||"object"!=typeof n)return !1;var t=Object.getPrototypeOf(n);if(null===t)return !0;var r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===Q}(n)||Array.isArray(n)||!!n[G]||!!n.constructor[G]||c(n)||v(n))}function e(n,t,r){void 0===r&&(r=!1),0===i(n)?(r?Object.keys:T)(n).forEach((function(e){r&&"symbol"==typeof e||t(e,n[e],n);})):n.forEach((function(r,e){return t(e,r,n)}));}function i(n){var t=n[H];return t?t.t>3?t.t-4:t.t:Array.isArray(n)?1:c(n)?2:v(n)?3:0}function u(n,t){return 2===i(n)?n.has(t):Object.prototype.hasOwnProperty.call(n,t)}function o(n,t){return 2===i(n)?n.get(t):n[t]}function f(n,t,r){var e=i(n);2===e?n.set(t,r):3===e?(n.delete(t),n.add(r)):n[t]=r;}function a(n,t){return n===t?0!==n||1/n==1/t:n!=n&&t!=t}function c(n){return W&&n instanceof Map}function v(n){return X&&n instanceof Set}function s(n){return n.i||n.u}function p(n){if(Array.isArray(n))return Array.prototype.slice.call(n);var t=U(n);delete t[H];for(var r=T(t),e=0;e<r.length;e++){var i=r[e],u=t[i];!1===u.writable&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(t[i]={configurable:!0,writable:!0,enumerable:u.enumerable,value:n[i]});}return Object.create(Object.getPrototypeOf(n),t)}function l(n,u){return void 0===u&&(u=!1),h(n)||t(n)||!r(n)?n:(i(n)>1&&(n.set=n.add=n.clear=n.delete=d),Object.freeze(n),u&&e(n,(function(n,t){return l(t,!0)}),!0),n)}function d(){n(2);}function h(n){return null==n||"object"!=typeof n||Object.isFrozen(n)}function y(t){var r=V[t];return r||n(18,t),r}function _(n,t){V[n]||(V[n]=t);}function b(){return J}function m(n,t){t&&(y("Patches"),n.o=[],n.v=[],n.s=t);}function j(n){O(n),n.p.forEach(w),n.p=null;}function O(n){n===J&&(J=n.l);}function x(n){return J={p:[],l:J,h:n,_:!0,m:0}}function w(n){var t=n[H];0===t.t||1===t.t?t.j():t.O=!0;}function S(t,e){e.m=e.p.length;var i=e.p[0],u=void 0!==t&&t!==i;return e.h.S||y("ES5").P(e,t,u),u?(i[H].M&&(j(e),n(4)),r(t)&&(t=P(e,t),e.l||g(e,t)),e.o&&y("Patches").g(i[H].u,t,e.o,e.v)):t=P(e,i,[]),j(e),e.o&&e.s(e.o,e.v),t!==B?t:void 0}function P(n,t,r){if(h(t))return t;var i=t[H];if(!i)return e(t,(function(e,u){return M(n,i,t,e,u,r)}),!0),t;if(i.A!==n)return t;if(!i.M)return g(n,i.u,!0),i.u;if(!i.R){i.R=!0,i.A.m--;var u=4===i.t||5===i.t?i.i=p(i.k):i.i;e(3===i.t?new Set(u):u,(function(t,e){return M(n,i,u,t,e,r)})),g(n,u,!1),r&&n.o&&y("Patches").F(i,r,n.o,n.v);}return i.i}function M(n,e,i,o,a,c){if(t(a)){var v=P(n,a,c&&e&&3!==e.t&&!u(e.D,o)?c.concat(o):void 0);if(f(i,o,v),!t(v))return;n._=!1;}if(r(a)&&!h(a)){if(!n.h.K&&n.m<1)return;P(n,a),e&&e.A.l||g(n,a);}}function g(n,t,r){void 0===r&&(r=!1),n.h.K&&n._&&l(t,r);}function A(n,t){var r=n[H];return (r?s(r):n)[t]}function z(n,t){if(t in n)for(var r=Object.getPrototypeOf(n);r;){var e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=Object.getPrototypeOf(r);}}function E(n){n.M||(n.M=!0,n.l&&E(n.l));}function R(n){n.i||(n.i=p(n.u));}function k(n,t,r){var e=c(t)?y("MapSet").$(t,r):v(t)?y("MapSet").C(t,r):n.S?function(n,t){var r=Array.isArray(n),e={t:r?1:0,A:t?t.A:b(),M:!1,R:!1,D:{},l:t,u:n,k:null,i:null,j:null,I:!1},i=e,u=Y;r&&(i=[e],u=Z);var o=Proxy.revocable(i,u),f=o.revoke,a=o.proxy;return e.k=a,e.j=f,a}(t,r):y("ES5").J(t,r);return (r?r.A:b()).p.push(e),e}function F(u){return t(u)||n(22,u),function n(t){if(!r(t))return t;var u,a=t[H],c=i(t);if(a){if(!a.M&&(a.t<4||!y("ES5").N(a)))return a.u;a.R=!0,u=D(t,c),a.R=!1;}else u=D(t,c);return e(u,(function(t,r){a&&o(a.u,t)===r||f(u,t,n(r));})),3===c?new Set(u):u}(u)}function D(n,t){switch(t){case 2:return new Map(n);case 3:return Array.from(n)}return p(n)}function K(){function n(n,t){var r=f[n];return r?r.enumerable=t:f[n]=r={configurable:!0,enumerable:t,get:function(){return Y.get(this[H],n)},set:function(t){Y.set(this[H],n,t);}},r}function r(n){for(var t=n.length-1;t>=0;t--){var r=n[t][H];if(!r.M)switch(r.t){case 5:o(r)&&E(r);break;case 4:i(r)&&E(r);}}}function i(n){for(var t=n.u,r=n.k,e=T(r),i=e.length-1;i>=0;i--){var o=e[i];if(o!==H){var f=t[o];if(void 0===f&&!u(t,o))return !0;var c=r[o],v=c&&c[H];if(v?v.u!==f:!a(c,f))return !0}}var s=!!t[H];return e.length!==T(t).length+(s?0:1)}function o(n){var t=n.k;if(t.length!==n.u.length)return !0;var r=Object.getOwnPropertyDescriptor(t,t.length-1);if(r&&!r.get)return !0;for(var e=0;e<t.length;e++)if(!t.hasOwnProperty(e))return !0;return !1}var f={};_("ES5",{J:function(t,r){var e=Array.isArray(t),i=function(t,r){if(t){for(var e=Array(r.length),i=0;i<r.length;i++)Object.defineProperty(e,""+i,n(i,!0));return e}var u=U(r);delete u[H];for(var o=T(u),f=0;f<o.length;f++){var a=o[f];u[a]=n(a,t||!!u[a].enumerable);}return Object.create(Object.getPrototypeOf(r),u)}(e,t),u={t:e?5:4,A:r?r.A:b(),M:!1,R:!1,D:{},l:r,u:t,k:i,i:null,O:!1,I:!1};return Object.defineProperty(i,H,{value:u,writable:!0}),i},P:function(n,i,f){f?t(i)&&i[H].A===n&&r(n.p):(n.o&&function n(t){if(t&&"object"==typeof t){var r=t[H];if(r){var i=r.u,f=r.k,a=r.D,c=r.t;if(4===c)e(f,(function(t){t!==H&&(void 0!==i[t]||u(i,t)?a[t]||n(f[t]):(a[t]=!0,E(r)));})),e(i,(function(n){void 0!==f[n]||u(f,n)||(a[n]=!1,E(r));}));else if(5===c){if(o(r)&&(E(r),a.length=!0),f.length<i.length)for(var v=f.length;v<i.length;v++)a[v]=!1;else for(var s=i.length;s<f.length;s++)a[s]=!0;for(var p=Math.min(f.length,i.length),l=0;l<p;l++)f.hasOwnProperty(l)||(a[l]=!0),void 0===a[l]&&n(f[l]);}}}}(n.p[0]),r(n.p));},N:function(n){return 4===n.t?i(n):o(n)}});}function $(){function f(n){if(!r(n))return n;if(Array.isArray(n))return n.map(f);if(c(n))return new Map(Array.from(n.entries()).map((function(n){return [n[0],f(n[1])]})));if(v(n))return new Set(Array.from(n).map(f));var t=Object.create(Object.getPrototypeOf(n));for(var e in n)t[e]=f(n[e]);return u(n,G)&&(t[G]=n[G]),t}function a(n){return t(n)?f(n):n}var s="add";_("Patches",{W:function(t,r){return r.forEach((function(r){for(var e=r.path,u=r.op,a=t,c=0;c<e.length-1;c++){var v=i(a),p=""+e[c];0!==v&&1!==v||"__proto__"!==p&&"constructor"!==p||n(24),"function"==typeof a&&"prototype"===p&&n(24),"object"!=typeof(a=o(a,p))&&n(15,e.join("/"));}var l=i(a),d=f(r.value),h=e[e.length-1];switch(u){case"replace":switch(l){case 2:return a.set(h,d);case 3:n(16);default:return a[h]=d}case s:switch(l){case 1:return "-"===h?a.push(d):a.splice(h,0,d);case 2:return a.set(h,d);case 3:return a.add(d);default:return a[h]=d}case"remove":switch(l){case 1:return a.splice(h,1);case 2:return a.delete(h);case 3:return a.delete(r.value);default:return delete a[h]}default:n(17,u);}})),t},F:function(n,t,r,i){switch(n.t){case 0:case 4:case 2:return function(n,t,r,i){var f=n.u,c=n.i;e(n.D,(function(n,e){var v=o(f,n),p=o(c,n),l=e?u(f,n)?"replace":s:"remove";if(v!==p||"replace"!==l){var d=t.concat(n);r.push("remove"===l?{op:l,path:d}:{op:l,path:d,value:p}),i.push(l===s?{op:"remove",path:d}:"remove"===l?{op:s,path:d,value:a(v)}:{op:"replace",path:d,value:a(v)});}}));}(n,t,r,i);case 5:case 1:return function(n,t,r,e){var i=n.u,u=n.D,o=n.i;if(o.length<i.length){var f=[o,i];i=f[0],o=f[1];var c=[e,r];r=c[0],e=c[1];}for(var v=0;v<i.length;v++)if(u[v]&&o[v]!==i[v]){var p=t.concat([v]);r.push({op:"replace",path:p,value:a(o[v])}),e.push({op:"replace",path:p,value:a(i[v])});}for(var l=i.length;l<o.length;l++){var d=t.concat([l]);r.push({op:s,path:d,value:a(o[l])});}i.length<o.length&&e.push({op:"replace",path:t.concat(["length"]),value:i.length});}(n,t,r,i);case 3:return function(n,t,r,e){var i=n.u,u=n.i,o=0;i.forEach((function(n){if(!u.has(n)){var i=t.concat([o]);r.push({op:"remove",path:i,value:n}),e.unshift({op:s,path:i,value:n});}o++;})),o=0,u.forEach((function(n){if(!i.has(n)){var u=t.concat([o]);r.push({op:s,path:u,value:n}),e.unshift({op:"remove",path:u,value:n});}o++;}));}(n,t,r,i)}},g:function(n,t,r,e){r.push({op:"replace",path:[],value:t===B?void 0:t}),e.push({op:"replace",path:[],value:n});}});}function C(){function t(n,t){function r(){this.constructor=n;}f(n,t),n.prototype=(r.prototype=t.prototype,new r);}function i(n){n.i||(n.D=new Map,n.i=new Map(n.u));}function u(n){n.i||(n.i=new Set,n.u.forEach((function(t){if(r(t)){var e=k(n.A.h,t,n);n.p.set(t,e),n.i.add(e);}else n.i.add(t);})));}function o(t){t.O&&n(3,JSON.stringify(s(t)));}var f=function(n,t){return (f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t;}||function(n,t){for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);})(n,t)},a=function(){function n(n,t){return this[H]={t:2,l:t,A:t?t.A:b(),M:!1,R:!1,i:void 0,D:void 0,u:n,k:this,I:!1,O:!1},this}t(n,Map);var u=n.prototype;return Object.defineProperty(u,"size",{get:function(){return s(this[H]).size}}),u.has=function(n){return s(this[H]).has(n)},u.set=function(n,t){var r=this[H];return o(r),s(r).has(n)&&s(r).get(n)===t||(i(r),E(r),r.D.set(n,!0),r.i.set(n,t),r.D.set(n,!0)),this},u.delete=function(n){if(!this.has(n))return !1;var t=this[H];return o(t),i(t),E(t),t.u.has(n)?t.D.set(n,!1):t.D.delete(n),t.i.delete(n),!0},u.clear=function(){var n=this[H];o(n),s(n).size&&(i(n),E(n),n.D=new Map,e(n.u,(function(t){n.D.set(t,!1);})),n.i.clear());},u.forEach=function(n,t){var r=this;s(this[H]).forEach((function(e,i){n.call(t,r.get(i),i,r);}));},u.get=function(n){var t=this[H];o(t);var e=s(t).get(n);if(t.R||!r(e))return e;if(e!==t.u.get(n))return e;var u=k(t.A.h,e,t);return i(t),t.i.set(n,u),u},u.keys=function(){return s(this[H]).keys()},u.values=function(){var n,t=this,r=this.keys();return (n={})[L]=function(){return t.values()},n.next=function(){var n=r.next();return n.done?n:{done:!1,value:t.get(n.value)}},n},u.entries=function(){var n,t=this,r=this.keys();return (n={})[L]=function(){return t.entries()},n.next=function(){var n=r.next();if(n.done)return n;var e=t.get(n.value);return {done:!1,value:[n.value,e]}},n},u[L]=function(){return this.entries()},n}(),c=function(){function n(n,t){return this[H]={t:3,l:t,A:t?t.A:b(),M:!1,R:!1,i:void 0,u:n,k:this,p:new Map,O:!1,I:!1},this}t(n,Set);var r=n.prototype;return Object.defineProperty(r,"size",{get:function(){return s(this[H]).size}}),r.has=function(n){var t=this[H];return o(t),t.i?!!t.i.has(n)||!(!t.p.has(n)||!t.i.has(t.p.get(n))):t.u.has(n)},r.add=function(n){var t=this[H];return o(t),this.has(n)||(u(t),E(t),t.i.add(n)),this},r.delete=function(n){if(!this.has(n))return !1;var t=this[H];return o(t),u(t),E(t),t.i.delete(n)||!!t.p.has(n)&&t.i.delete(t.p.get(n))},r.clear=function(){var n=this[H];o(n),s(n).size&&(u(n),E(n),n.i.clear());},r.values=function(){var n=this[H];return o(n),u(n),n.i.values()},r.entries=function(){var n=this[H];return o(n),u(n),n.i.entries()},r.keys=function(){return this.values()},r[L]=function(){return this.values()},r.forEach=function(n,t){for(var r=this.values(),e=r.next();!e.done;)n.call(t,e.value,e.value,this),e=r.next();},n}();_("MapSet",{$:function(n,t){return new a(n,t)},C:function(n,t){return new c(n,t)}});}var I;Object.defineProperty(exports,"__esModule",{value:!0});var J,N="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),W="undefined"!=typeof Map,X="undefined"!=typeof Set,q="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,B=N?Symbol.for("immer-nothing"):((I={})["immer-nothing"]=!0,I),G=N?Symbol.for("immer-draftable"):"__$immer_draftable",H=N?Symbol.for("immer-state"):"__$immer_state",L="undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator",Q=""+Object.prototype.constructor,T="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Object.getOwnPropertyNames,U=Object.getOwnPropertyDescriptors||function(n){var t={};return T(n).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(n,r);})),t},V={},Y={get:function(n,t){if(t===H)return n;var e=s(n);if(!u(e,t))return function(n,t,r){var e,i=z(t,r);return i?"value"in i?i.value:null===(e=i.get)||void 0===e?void 0:e.call(n.k):void 0}(n,e,t);var i=e[t];return n.R||!r(i)?i:i===A(n.u,t)?(R(n),n.i[t]=k(n.A.h,i,n)):i},has:function(n,t){return t in s(n)},ownKeys:function(n){return Reflect.ownKeys(s(n))},set:function(n,t,r){var e=z(s(n),t);if(null==e?void 0:e.set)return e.set.call(n.k,r),!0;if(!n.M){var i=A(s(n),t),o=null==i?void 0:i[H];if(o&&o.u===r)return n.i[t]=r,n.D[t]=!1,!0;if(a(r,i)&&(void 0!==r||u(n.u,t)))return !0;R(n),E(n);}return n.i[t]===r&&"number"!=typeof r&&(void 0!==r||t in n.i)||(n.i[t]=r,n.D[t]=!0,!0)},deleteProperty:function(n,t){return void 0!==A(n.u,t)||t in n.u?(n.D[t]=!1,R(n),E(n)):delete n.D[t],n.i&&delete n.i[t],!0},getOwnPropertyDescriptor:function(n,t){var r=s(n),e=Reflect.getOwnPropertyDescriptor(r,t);return e?{writable:!0,configurable:1!==n.t||"length"!==t,enumerable:e.enumerable,value:r[t]}:e},defineProperty:function(){n(11);},getPrototypeOf:function(n){return Object.getPrototypeOf(n.u)},setPrototypeOf:function(){n(12);}},Z={};e(Y,(function(n,t){Z[n]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)};})),Z.deleteProperty=function(n,t){return Z.set.call(this,n,t,void 0)},Z.set=function(n,t,r){return Y.set.call(this,n[0],t,r,n[0])};var nn=function(){function e(t){var e=this;this.S=q,this.K=!0,this.produce=function(t,i,u){if("function"==typeof t&&"function"!=typeof i){var o=i;i=t;var f=e;return function(n){var t=this;void 0===n&&(n=o);for(var r=arguments.length,e=Array(r>1?r-1:0),u=1;u<r;u++)e[u-1]=arguments[u];return f.produce(n,(function(n){var r;return (r=i).call.apply(r,[t,n].concat(e))}))}}var a;if("function"!=typeof i&&n(6),void 0!==u&&"function"!=typeof u&&n(7),r(t)){var c=x(e),v=k(e,t,void 0),s=!0;try{a=i(v),s=!1;}finally{s?j(c):O(c);}return "undefined"!=typeof Promise&&a instanceof Promise?a.then((function(n){return m(c,u),S(n,c)}),(function(n){throw j(c),n})):(m(c,u),S(a,c))}if(!t||"object"!=typeof t){if(void 0===(a=i(t))&&(a=t),a===B&&(a=void 0),e.K&&l(a,!0),u){var p=[],d=[];y("Patches").g(t,a,p,d),u(p,d);}return a}n(21,t);},this.produceWithPatches=function(n,t){if("function"==typeof n)return function(t){for(var r=arguments.length,i=Array(r>1?r-1:0),u=1;u<r;u++)i[u-1]=arguments[u];return e.produceWithPatches(t,(function(t){return n.apply(void 0,[t].concat(i))}))};var r,i,u=e.produce(n,t,(function(n,t){r=n,i=t;}));return "undefined"!=typeof Promise&&u instanceof Promise?u.then((function(n){return [n,r,i]})):[u,r,i]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze);}var i=e.prototype;return i.createDraft=function(e){r(e)||n(8),t(e)&&(e=F(e));var i=x(this),u=k(this,e,void 0);return u[H].I=!0,O(i),u},i.finishDraft=function(n,t){var r=(n&&n[H]).A;return m(r,t),S(void 0,r)},i.setAutoFreeze=function(n){this.K=n;},i.setUseProxies=function(t){t&&!q&&n(20),this.S=t;},i.applyPatches=function(n,r){var e;for(e=r.length-1;e>=0;e--){var i=r[e];if(0===i.path.length&&"replace"===i.op){n=i.value;break}}e>-1&&(r=r.slice(e+1));var u=y("Patches").W;return t(n)?u(n,r):this.produce(n,(function(n){return u(n,r)}))},e}(),tn=new nn,rn=tn.produce,en=tn.produceWithPatches.bind(tn),un=tn.setAutoFreeze.bind(tn),on=tn.setUseProxies.bind(tn),fn=tn.applyPatches.bind(tn),an=tn.createDraft.bind(tn),cn=tn.finishDraft.bind(tn);exports.Immer=nn,exports.applyPatches=fn,exports.castDraft=function(n){return n},exports.castImmutable=function(n){return n},exports.createDraft=an,exports.current=F,exports.default=rn,exports.enableAllPlugins=function(){K(),C(),$();},exports.enableES5=K,exports.enableMapSet=C,exports.enablePatches=$,exports.finishDraft=cn,exports.freeze=l,exports.immerable=G,exports.isDraft=t,exports.isDraftable=r,exports.nothing=B,exports.original=function(r){return t(r)||n(23,r),r[H].u},exports.produce=rn,exports.produceWithPatches=en,exports.setAutoFreeze=un,exports.setUseProxies=on;

});

var dist = createCommonjsModule(function (module) {

{
  module.exports = immer_cjs_production_min;
}
});

var globals$1 = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.globals = void 0;




/**
 * Global accessors for state/dispatch in the controller.
 */
class Globals {
    constructor() {
        this._runningControllers = false;
    }
    initialize(rootController) {
        this._rootController = rootController;
        this._state = (0, empty_state.createEmptyState)();
    }
    dispatch(action) {
        globals.globals.dispatch(action);
    }
    // Send the passed dispatch actions to the frontend. The frontend logic
    // will run the actions, compute the new state and invoke patchState() so
    // our copy is updated.
    dispatchMultiple(actions) {
        for (const action of actions) {
            this.dispatch(action);
        }
    }
    // This is called by the frontend logic which now owns and handle the
    // source-of-truth state, to give us an update on the newer state updates.
    patchState(patches) {
        this._state = (0, dist.applyPatches)((0, logging.assertExists)(this._state), patches);
        this.runControllers();
    }
    runControllers() {
        if (this._runningControllers)
            throw new Error('Re-entrant call detected');
        // Run controllers locally until all state machines reach quiescence.
        let runAgain = true;
        for (let iter = 0; runAgain; iter++) {
            if (iter > 100)
                throw new Error('Controllers are stuck in a livelock');
            this._runningControllers = true;
            try {
                runAgain = (0, logging.assertExists)(this._rootController).invoke();
            }
            finally {
                this._runningControllers = false;
            }
        }
    }
    get state() {
        return (0, logging.assertExists)(this._state);
    }
    resetForTesting() {
        this._state = undefined;
        this._rootController = undefined;
    }
}
exports.globals = new Globals();

});

var track_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.trackControllerRegistry = exports.TrackController = void 0;








// Allow to override via devtools for testing (note, needs to be done in the
// controller-thread).
self.quantPx = 1;
// TrackController is a base class overridden by track implementations (e.g.,
// sched slices, nestable slices, counters).
class TrackController extends controller.Controller {
    constructor(args) {
        super('main');
        this.requestingData = false;
        this.queuedRequest = false;
        this.isSetup = false;
        this.lastReloadHandled = 0;
        this.trackId = args.trackId;
        this.engine = args.engine;
    }
    pxSize() {
        return self.quantPx;
    }
    // Can be overriden by the track implementation to allow one time setup work
    // to be performed before the first onBoundsChange invcation.
    onSetup() {
        return tslib.__awaiter(this, void 0, void 0, function* () { });
    }
    // Can be overriden by the track implementation to allow some one-off work
    // when requested reload (e.g. recalculating height).
    onReload() {
        return tslib.__awaiter(this, void 0, void 0, function* () { });
    }
    get trackState() {
        return (0, logging.assertExists)(globals$1.globals.state.tracks[this.trackId]);
    }
    get config() {
        return this.trackState.config;
    }
    configHasNamespace(config) {
        return 'namespace' in config;
    }
    namespaceTable(tableName) {
        if (this.configHasNamespace(this.config)) {
            return this.config.namespace + '_' + tableName;
        }
        else {
            return tableName;
        }
    }
    publish(data) {
        this.data = data;
        (0, publish.publishTrackData)({ id: this.trackId, data });
    }
    // Returns a valid SQL table name with the given prefix that should be unique
    // for each track.
    tableName(prefix) {
        // Derive table name from, since that is unique for each track.
        // Track ID can be UUID but '-' is not valid for sql table name.
        const idSuffix = this.trackId.split('-').join('_');
        return `${prefix}_${idSuffix}`;
    }
    shouldSummarize(resolution) {
        // |resolution| is in s/px (to nearest power of 10) assuming a display
        // of ~1000px 0.0008 is 0.8s.
        return resolution >= 0.0008;
    }
    query(query) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const result = yield this.engine.query(query);
            return result;
        });
    }
    shouldReload() {
        const { lastTrackReloadRequest } = globals$1.globals.state;
        return !!lastTrackReloadRequest &&
            this.lastReloadHandled < lastTrackReloadRequest;
    }
    markReloadHandled() {
        this.lastReloadHandled = globals$1.globals.state.lastTrackReloadRequest || 0;
    }
    shouldRequestData(traceTime) {
        if (this.data === undefined)
            return true;
        if (this.shouldReload())
            return true;
        // If at the limit only request more data if the view has moved.
        const atLimit = this.data.length === track_data.LIMIT;
        if (atLimit) {
            // We request more data than the window, so add window duration to find
            // the previous window.
            const prevWindowStart = this.data.start + (traceTime.startSec - traceTime.endSec);
            return traceTime.startSec !== prevWindowStart;
        }
        // Otherwise request more data only when out of range of current data or
        // resolution has changed.
        const inRange = traceTime.startSec >= this.data.start &&
            traceTime.endSec <= this.data.end;
        return !inRange ||
            this.data.resolution !==
                globals$1.globals.state.frontendLocalState.visibleState.resolution;
    }
    // Decides, based on the length of the trace and the number of rows
    // provided whether a TrackController subclass should cache its quantized
    // data. Returns the bucket size (in ns) if caching should happen and
    // undefined otherwise.
    // Subclasses should call this in their setup function
    cachedBucketSizeNs(numRows) {
        // Ensure that we're not caching when the table size isn't even that big.
        if (numRows < TrackController.MIN_TABLE_SIZE_TO_CACHE) {
            return undefined;
        }
        const bounds = globals$1.globals.state.traceTime;
        const traceDurNs = (0, time.toNs)(bounds.endSec - bounds.startSec);
        // For large traces, going through the raw table in the most zoomed-out
        // states can be very expensive as this can involve going through O(millions
        // of rows). The cost of this becomes high even for just iteration but is
        // especially slow as quantization involves a SQLite sort on the quantized
        // timestamp (for the group by).
        //
        // To get around this, we can cache a pre-quantized table which we can then
        // in zoomed-out situations and fall back to the real table when zoomed in
        // (which naturally constrains the amount of data by virtue of the window
        // covering a smaller timespan)
        //
        // This method computes that cached table by computing an approximation for
        // the bucket size we would use when totally zoomed out and then going a few
        // resolution levels down which ensures that our cached table works for more
        // than the literally most zoomed out state. Moving down a resolution level
        // is defined as moving down a power of 2; this matches the logic in
        // |globals.getCurResolution|.
        //
        // TODO(lalitm): in the future, we should consider having a whole set of
        // quantized tables each of which cover some portion of resolution lvel
        // range. As each table covers a large number of resolution levels, even 3-4
        // tables should really cover the all concievable trace sizes. This set
        // could be computed by looking at the number of events being processed one
        // level below the cached table and computing another layer of caching if
        // that count is too high (with respect to MIN_TABLE_SIZE_TO_CACHE).
        // 4k monitors have 3840 horizontal pixels so use that for a worst case
        // approximation of the window width.
        const approxWidthPx = 3840;
        // Compute the outermost bucket size. This acts as a starting point for
        // computing the cached size.
        const outermostResolutionLevel = Math.ceil(Math.log2(traceDurNs / approxWidthPx));
        const outermostBucketNs = Math.pow(2, outermostResolutionLevel);
        // This constant decides how many resolution levels down from our outermost
        // bucket computation we want to be able to use the cached table.
        // We've chosen 7 as it seems to be empircally seems to be a good fit for
        // trace data.
        const resolutionLevelsCovered = 7;
        // If we've got less resolution levels in the trace than the number of
        // resolution levels we want to go down, bail out because this cached
        // table is really not going to be used enough.
        if (outermostResolutionLevel < resolutionLevelsCovered) {
            return Number.MAX_SAFE_INTEGER;
        }
        // Another way to look at moving down resolution levels is to consider how
        // many sub-intervals we are splitting the bucket into.
        const bucketSubIntervals = Math.pow(2, resolutionLevelsCovered);
        // Calculate the smallest bucket we want our table to be able to handle by
        // dividing the outermsot bucket by the number of subintervals we should
        // divide by.
        const cachedBucketSizeNs = outermostBucketNs / bucketSubIntervals;
        // Our logic above should make sure this is an integer but double check that
        // here as an assertion before returning.
        (0, logging.assertTrue)(Number.isInteger(cachedBucketSizeNs));
        return cachedBucketSizeNs;
    }
    run() {
        const visibleState = globals$1.globals.state.frontendLocalState.visibleState;
        if (visibleState === undefined || visibleState.resolution === undefined ||
            visibleState.resolution === Infinity) {
            return;
        }
        const dur = visibleState.endSec - visibleState.startSec;
        if (globals$1.globals.state.visibleTracks.includes(this.trackId) &&
            this.shouldRequestData(visibleState)) {
            if (this.requestingData) {
                this.queuedRequest = true;
            }
            else {
                this.requestingData = true;
                let promise = Promise.resolve();
                if (!this.isSetup) {
                    promise = this.onSetup();
                }
                else if (this.shouldReload()) {
                    promise = this.onReload().then(() => this.markReloadHandled());
                }
                promise
                    .then(() => {
                    this.isSetup = true;
                    let resolution = visibleState.resolution;
                    // TODO(hjd): We shouldn't have to be so defensive here.
                    if (Math.log2((0, time.toNs)(resolution)) % 1 !== 0) {
                        // resolution is in pixels per second so 1000 means
                        // 1px = 1ms.
                        resolution =
                            (0, time.fromNs)(Math.pow(2, Math.floor(Math.log2((0, time.toNs)(1000)))));
                    }
                    return this.onBoundsChange(visibleState.startSec - dur, visibleState.endSec + dur, resolution);
                })
                    .then((data) => {
                    this.publish(data);
                })
                    .finally(() => {
                    this.requestingData = false;
                    if (this.queuedRequest) {
                        this.queuedRequest = false;
                        this.run();
                    }
                });
            }
        }
    }
}
exports.TrackController = TrackController;
// We choose 100000 as the table size to cache as this is roughly the point
// where SQLite sorts start to become expensive.
TrackController.MIN_TABLE_SIZE_TO_CACHE = 100000;
exports.trackControllerRegistry = registry.Registry.kindRegistry();

});

var track_registry = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.trackRegistry = void 0;

/**
 * Global registry that maps types to TrackCreator.
 */
exports.trackRegistry = registry.Registry.kindRegistry();

});

var plugins = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.pluginRegistry = exports.PluginContextImpl = void 0;



// Every plugin gets its own PluginContext. This is how we keep track
// what each plugin is doing and how we can blame issues on particular
// plugins.
class PluginContextImpl {
    constructor(pluginName) {
        this.pluginName = pluginName;
    }
    registerTrackController(track) {
        track_controller.trackControllerRegistry.register(track);
    }
    registerTrack(track) {
        track_registry.trackRegistry.register(track);
    }
}
exports.PluginContextImpl = PluginContextImpl;
exports.pluginRegistry = new registry.Registry((info) => {
    return info.pluginId;
});

});

var string_utils = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.sqliteString = exports.binaryDecode = exports.binaryEncode = exports.utf8Decode = exports.utf8Encode = exports.hexEncode = exports.base64Decode = exports.base64Encode = void 0;



// TextDecoder/Decoder requires the full DOM and isn't available in all types
// of tests. Use fallback implementation from protbufjs.
let Utf8Decoder;
let Utf8Encoder;
try {
    Utf8Decoder = new TextDecoder('utf-8');
    Utf8Encoder = new TextEncoder();
}
catch (_) {
    if (typeof process === 'undefined') {
        // Silence the warning when we know we are running under NodeJS.
        console.warn('Using fallback UTF8 Encoder/Decoder, This should happen only in ' +
            'tests and NodeJS-based environments, not in browsers.');
    }
    Utf8Decoder = { decode: (buf) => (0, utf8_1.read)(buf, 0, buf.length) };
    Utf8Encoder = {
        encode: (str) => {
            const arr = new Uint8Array((0, utf8_1.length)(str));
            const written = (0, utf8_1.write)(str, arr, 0);
            (0, logging.assertTrue)(written === arr.length);
            return arr;
        },
    };
}
function base64Encode(buffer) {
    return (0, base64_1.encode)(buffer, 0, buffer.length);
}
exports.base64Encode = base64Encode;
function base64Decode(str) {
    // if the string is in base64url format, convert to base64
    const b64 = str.replace(/-/g, '+').replace(/_/g, '/');
    const arr = new Uint8Array((0, base64_1.length)(b64));
    const written = (0, base64_1.decode)(b64, arr, 0);
    (0, logging.assertTrue)(written === arr.length);
    return arr;
}
exports.base64Decode = base64Decode;
// encode binary array to hex string
function hexEncode(bytes) {
    return bytes.reduce((prev, cur) => prev + ('0' + cur.toString(16)).slice(-2), '');
}
exports.hexEncode = hexEncode;
function utf8Encode(str) {
    return Utf8Encoder.encode(str);
}
exports.utf8Encode = utf8Encode;
// Note: not all byte sequences can be converted to<>from UTF8. This can be
// used only with valid unicode strings, not arbitrary byte buffers.
function utf8Decode(buffer) {
    return Utf8Decoder.decode(buffer);
}
exports.utf8Decode = utf8Decode;
// The binaryEncode/Decode functions below allow to encode an arbitrary binary
// buffer into a string that can be JSON-encoded. binaryEncode() applies
// UTF-16 encoding to each byte individually.
// Unlike utf8Encode/Decode, any arbitrary byte sequence can be converted into a
// valid string, and viceversa.
// This should be only used when a byte array needs to be transmitted over an
// interface that supports only JSON serialization (e.g., postmessage to a
// chrome extension).
function binaryEncode(buf) {
    let str = '';
    for (let i = 0; i < buf.length; i++) {
        str += String.fromCharCode(buf[i]);
    }
    return str;
}
exports.binaryEncode = binaryEncode;
function binaryDecode(str) {
    const buf = new Uint8Array(str.length);
    const strLen = str.length;
    for (let i = 0; i < strLen; i++) {
        buf[i] = str.charCodeAt(i);
    }
    return buf;
}
exports.binaryDecode = binaryDecode;
// A function used to interpolate strings into SQL query. The only replacement
// is done is that single quote replaced with two single quotes, according to
// SQLite documentation:
// https://www.sqlite.org/lang_expr.html#literal_values_constants_
//
// The purpose of this function is to use in simple comparisons, to escape
// strings used in GLOB clauses see escapeQuery function.
function sqliteString(str) {
    return `'${str.replace(/'/g, '\'\'')}'`;
}
exports.sqliteString = sqliteString;

});

var query_result = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.createQueryResult = exports.QueryError = exports.STR_NULL = exports.NUM_NULL = exports.STR = exports.NUM = void 0;
// This file deals with deserialization and iteration of the proto-encoded
// byte buffer that is returned by TraceProcessor when invoking the
// TPM_QUERY_STREAMING method. The returned |query_result| buffer is optimized
// for being moved cheaply across workers and decoded on-the-flight as we step
// through the iterator.
// See comments around QueryResult in trace_processor.proto for more details.
// The classes in this file are organized as follows:
//
// QueryResultImpl:
// The object returned by the Engine.query(sql) method.
// This object is a holder of row data. Batches of raw get appended
// incrementally as they are received by the remote TraceProcessor instance.
// QueryResultImpl also deals with asynchronicity of queries and allows callers
// to obtain a promise that waits for more (or all) rows.
// At any point in time the following objects hold a reference to QueryResult:
// - The Engine: for appending row batches.
// - UI code, typically controllers, who make queries.
//
// ResultBatch:
// Hold the data, returned by the remote TraceProcessor instance, for a number
// of rows (TP typically chunks the results in batches of 128KB).
// A QueryResultImpl holds exclusively ResultBatches for a given query.
// ResultBatch is not exposed externally, it's just an internal representation
// that helps with proto decoding. ResultBatch is immutable after it gets
// appended and decoded. The iteration state is held by the RowIteratorImpl.
//
// RowIteratorImpl:
// Decouples the data owned by QueryResultImpl (and its ResultBatch(es)) from
// the iteration state. The iterator effectively is the union of a ResultBatch
// and the row number in it. Rows within the batch are decoded as the user calls
// next(). When getting at the end of the batch, it takes care of switching to
// the next batch (if any) within the QueryResultImpl.
// This object is part of the API exposed to tracks / controllers.




exports.NUM = 0;
exports.STR = 'str';
exports.NUM_NULL = 1;
exports.STR_NULL = 'str_null';
class QueryError extends Error {
    constructor(message, info) {
        super(message);
        this.query = info.query;
    }
    toString() {
        return `Query: ${this.query}\n` + super.toString();
    }
}
exports.QueryError = QueryError;
function columnTypeToString(t) {
    switch (t) {
        case exports.NUM:
            return 'NUM';
        case exports.NUM_NULL:
            return 'NUM_NULL';
        case exports.STR:
            return 'STR';
        case exports.STR_NULL:
            return 'STR_NULL';
        default:
            return `INVALID(${t})`;
    }
}
// Disable Long.js support in protobuf. This seems to be enabled only in tests
// but not in production code. In any case, for now we want casting to number
// accepting the 2**53 limitation. This is consistent with passing
// --force-number in the protobuf.js codegen invocation in //ui/BUILD.gn .
// See also https://github.com/protobufjs/protobuf.js/issues/1253 .
minimal$1.util.Long = undefined;
minimal$1.configure();
// This has to match CellType in trace_processor.proto.
var CellType;
(function (CellType) {
    CellType[CellType["CELL_NULL"] = 1] = "CELL_NULL";
    CellType[CellType["CELL_VARINT"] = 2] = "CELL_VARINT";
    CellType[CellType["CELL_FLOAT64"] = 3] = "CELL_FLOAT64";
    CellType[CellType["CELL_STRING"] = 4] = "CELL_STRING";
    CellType[CellType["CELL_BLOB"] = 5] = "CELL_BLOB";
})(CellType || (CellType = {}));
const CELL_TYPE_NAMES = ['UNKNOWN', 'NULL', 'VARINT', 'FLOAT64', 'STRING', 'BLOB'];
const TAG_LEN_DELIM = 2;
// The actual implementation, which bridges together the reader side and the
// writer side (the one exposed to the Engine). This is the same object so that
// when the engine pumps new row batches we can resolve pending promises that
// readers (e.g. track code) are waiting for.
class QueryResultImpl {
    constructor(errorInfo) {
        this.columnNames = [];
        this._numRows = 0;
        this._isComplete = false;
        this._statementCount = 0;
        this._statementWithOutputCount = 0;
        // --- QueryResult implementation.
        // TODO(primiano): for the moment new batches are appended but old batches
        // are never removed. This won't work with abnormally large result sets, as
        // it will stash all rows in memory. We could switch to a model where the
        // iterator is destructive and deletes batch objects once iterating past the
        // end of each batch. If we do that, than we need to assign monotonic IDs to
        // batches. Also if we do that, we should prevent creating more than one
        // iterator for a QueryResult.
        this.batches = [];
        this._errorInfo = errorInfo;
    }
    isComplete() {
        return this._isComplete;
    }
    numRows() {
        return this._numRows;
    }
    error() {
        return this._error;
    }
    columns() {
        return this.columnNames;
    }
    statementCount() {
        return this._statementCount;
    }
    statementWithOutputCount() {
        return this._statementWithOutputCount;
    }
    iter(spec) {
        const impl = new RowIteratorImplWithRowData(spec, this);
        return impl;
    }
    firstRow(spec) {
        const impl = new RowIteratorImplWithRowData(spec, this);
        (0, logging.assertTrue)(impl.valid());
        return impl;
    }
    // Can be called only once.
    waitAllRows() {
        (0, logging.assertTrue)(this.allRowsPromise === undefined);
        this.allRowsPromise = (0, deferred.defer)();
        if (this._isComplete) {
            this.resolveOrReject(this.allRowsPromise, this);
        }
        return this.allRowsPromise;
    }
    // --- WritableQueryResult implementation.
    // Called by the engine when a new QueryResult is available. Note that a
    // single Query() call can yield >1 QueryResult due to result batching
    // if more than ~64K of data are returned, e.g. when returning O(M) rows.
    // |resBytes| is a proto-encoded trace_processor.QueryResult message.
    // It is fine to retain the resBytes without slicing a copy, because
    // ProtoRingBuffer does the slice() for us (or passes through the buffer
    // coming from postMessage() (Wasm case) of fetch() (HTTP+RPC case).
    appendResultBatch(resBytes) {
        const reader = minimal$1.Reader.create(resBytes);
        (0, logging.assertTrue)(reader.pos === 0);
        const columnNamesEmptyAtStartOfBatch = this.columnNames.length === 0;
        const columnNamesSet = new Set();
        while (reader.pos < reader.len) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: // column_names
                    // Only the first batch should contain the column names. If this fires
                    // something is going wrong in the handling of the batch stream.
                    (0, logging.assertTrue)(columnNamesEmptyAtStartOfBatch);
                    const origColName = reader.string();
                    let colName = origColName;
                    // In some rare cases two columns can have the same name (b/194891824)
                    // e.g. `select 1 as x, 2 as x`. These queries don't happen in the
                    // UI code, but they can happen when the user types a query (e.g.
                    // with a join). The most practical thing we can do here is renaming
                    // the columns with a suffix. Keeping the same name will break when
                    // iterating, because column names become iterator object keys.
                    for (let i = 1; columnNamesSet.has(colName); ++i) {
                        colName = `${origColName}_${i}`;
                        (0, logging.assertTrue)(i < 100); // Give up at some point;
                    }
                    columnNamesSet.add(colName);
                    this.columnNames.push(colName);
                    break;
                case 2: // error
                    // The query has errored only if the |error| field is non-empty.
                    // In protos, we don't distinguish between non-present and empty.
                    // Make sure we don't propagate ambiguous empty strings to JS.
                    const err = reader.string();
                    this._error = (err !== undefined && err.length) ? err : undefined;
                    break;
                case 3: // batch
                    const batchLen = reader.uint32();
                    const batchRaw = resBytes.subarray(reader.pos, reader.pos + batchLen);
                    reader.pos += batchLen;
                    // The ResultBatch ctor parses the CellsBatch submessage.
                    const parsedBatch = new ResultBatch(batchRaw);
                    this.batches.push(parsedBatch);
                    this._isComplete = parsedBatch.isLastBatch;
                    // In theory one could construct a valid proto serializing the column
                    // names after the cell batches. In practice the QueryResultSerializer
                    // doesn't do that so it's not worth complicating the code.
                    const numColumns = this.columnNames.length;
                    if (numColumns !== 0) {
                        (0, logging.assertTrue)(parsedBatch.numCells % numColumns === 0);
                        this._numRows += parsedBatch.numCells / numColumns;
                    }
                    else {
                        // numColumns == 0 is  plausible for queries like CREATE TABLE ... .
                        (0, logging.assertTrue)(parsedBatch.numCells === 0);
                    }
                    break;
                case 4:
                    this._statementCount = reader.uint32();
                    break;
                case 5:
                    this._statementWithOutputCount = reader.uint32();
                    break;
                default:
                    console.warn(`Unexpected QueryResult field ${tag >>> 3}`);
                    reader.skipType(tag & 7);
                    break;
            } // switch (tag)
        } // while (pos < end)
        if (this._isComplete && this.allRowsPromise !== undefined) {
            this.resolveOrReject(this.allRowsPromise, this);
        }
    }
    ensureAllRowsPromise() {
        if (this.allRowsPromise === undefined) {
            this.waitAllRows(); // Will populate |this.allRowsPromise|.
        }
        return (0, logging.assertExists)(this.allRowsPromise);
    }
    resolveOrReject(promise, arg) {
        if (this._error === undefined) {
            promise.resolve(arg);
        }
        else {
            promise.reject(new QueryError(this._error, this._errorInfo));
        }
    }
}
// This class holds onto a received result batch (a Uint8Array) and does some
// partial parsing to tokenize the various cell groups. This parsing mainly
// consists of identifying and caching the offsets of each cell group and
// initializing the varint decoders. This half parsing is done to keep the
// iterator's next() fast, without decoding everything into memory.
// This is an internal implementation detail and is not exposed outside. The
// RowIteratorImpl uses this class to iterate through batches (this class takes
// care of iterating within a batch, RowIteratorImpl takes care of switching
// batches when needed).
// Note: at any point in time there can be more than one ResultIterator
// referencing the same batch. The batch must be immutable.
class ResultBatch {
    // batchBytes is a trace_processor.QueryResult.CellsBatch proto.
    constructor(batchBytes) {
        this.isLastBatch = false;
        this.cellTypesOff = 0;
        this.cellTypesLen = 0;
        this.varintOff = 0;
        this.varintLen = 0;
        this.float64Cells = new Float64Array();
        this.blobCells = [];
        this.stringCells = [];
        this.batchBytes = batchBytes;
        const reader = minimal$1.Reader.create(batchBytes);
        (0, logging.assertTrue)(reader.pos === 0);
        const end = reader.len;
        // Here we deconstruct the proto by hand. The CellsBatch is carefully
        // designed to allow a very fast parsing from the TS side. We pack all cells
        // of the same types together, so we can do only one call (per batch) to
        // TextDecoder.decode(), we can overlay a memory-aligned typedarray for
        // float values and can quickly tell and type-check the cell types.
        // One row = N cells (we know the number upfront from the outer message).
        // Each bach contains always an integer multiple of N cells (i.e. rows are
        // never fragmented across different batches).
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1: // cell types, a packed array containing one CellType per cell.
                    (0, logging.assertTrue)((tag & 7) === TAG_LEN_DELIM); // Must be packed varint.
                    this.cellTypesLen = reader.uint32();
                    this.cellTypesOff = reader.pos;
                    reader.pos += this.cellTypesLen;
                    break;
                case 2: // varint_cells, a packed varint buffer.
                    (0, logging.assertTrue)((tag & 7) === TAG_LEN_DELIM); // Must be packed varint.
                    const packLen = reader.uint32();
                    this.varintOff = reader.pos;
                    this.varintLen = packLen;
                    (0, logging.assertTrue)(reader.buf === batchBytes);
                    (0, logging.assertTrue)(this.varintOff + this.varintLen <=
                        batchBytes.byteOffset + batchBytes.byteLength);
                    reader.pos += packLen;
                    break;
                case 3: // float64_cells, a 64-bit aligned packed fixed64 buffer.
                    (0, logging.assertTrue)((tag & 7) === TAG_LEN_DELIM); // Must be packed varint.
                    const f64Len = reader.uint32();
                    (0, logging.assertTrue)(f64Len % 8 === 0);
                    // Float64Array's constructor is evil: the offset is in bytes but the
                    // length is in 8-byte words.
                    const f64Words = f64Len / 8;
                    const f64Off = batchBytes.byteOffset + reader.pos;
                    if (f64Off % 8 === 0) {
                        this.float64Cells =
                            new Float64Array(batchBytes.buffer, f64Off, f64Words);
                    }
                    else {
                        // When using the production code in trace_processor's rpc.cc, the
                        // float64 should be 8-bytes aligned. The slow-path case is only for
                        // tests.
                        const slice = batchBytes.buffer.slice(f64Off, f64Off + f64Len);
                        this.float64Cells = new Float64Array(slice);
                    }
                    reader.pos += f64Len;
                    break;
                case 4: // blob_cells: one entry per blob.
                    (0, logging.assertTrue)((tag & 7) === TAG_LEN_DELIM);
                    // protobufjs's bytes() under the hoods calls slice() and creates
                    // a copy. Fine here as blobs are rare and not a fastpath.
                    this.blobCells.push(new Uint8Array(reader.bytes()));
                    break;
                case 5: // string_cells: all the string cells concatenated with \0s.
                    (0, logging.assertTrue)((tag & 7) === TAG_LEN_DELIM);
                    const strLen = reader.uint32();
                    (0, logging.assertTrue)(reader.pos + strLen <= end);
                    const subArr = batchBytes.subarray(reader.pos, reader.pos + strLen);
                    (0, logging.assertTrue)(subArr.length === strLen);
                    // The reason why we do this split rather than creating one string
                    // per entry is that utf8 decoding has some non-negligible cost. See
                    // go/postmessage-benchmark .
                    this.stringCells = (0, string_utils.utf8Decode)(subArr).split('\0');
                    reader.pos += strLen;
                    break;
                case 6: // is_last_batch (boolean).
                    this.isLastBatch = !!reader.bool();
                    break;
                case 7: // padding for realignment, skip silently.
                    reader.skipType(tag & 7);
                    break;
                default:
                    console.warn(`Unexpected QueryResult.CellsBatch field ${tag >>> 3}`);
                    reader.skipType(tag & 7);
                    break;
            } // switch(tag)
        } // while (pos < end)
    }
    get numCells() {
        return this.cellTypesLen;
    }
}
class RowIteratorImpl {
    constructor(querySpec, rowData, res) {
        // All the member variables in the group below point to the identically-named
        // members in result.batch[batchIdx]. This is to avoid indirection layers in
        // the next() hotpath, so we can do this.float64Cells vs
        // this.resultObj.batch[this.batchIdx].float64Cells.
        // These are re-set every time tryMoveToNextBatch() is called (and succeeds).
        this.batchIdx = -1; // The batch index within |result.batches[]|.
        this.batchBytes = new Uint8Array();
        this.columnNames = [];
        this.numColumns = 0;
        this.cellTypesEnd = -1; // -1 so the 1st next() hits tryMoveToNextBatch().
        this.float64Cells = new Float64Array();
        this.varIntReader = minimal$1.Reader.create(this.batchBytes);
        this.blobCells = [];
        this.stringCells = [];
        // These members instead are incremented as we read cells from next(). They
        // are the mutable state of the iterator.
        this.nextCellTypeOff = 0;
        this.nextFloat64Cell = 0;
        this.nextStringCell = 0;
        this.nextBlobCell = 0;
        this.isValid = false;
        Object.assign(this, querySpec);
        this.rowData = rowData;
        this.rowSpec = Object.assign({}, querySpec); // ... -> Copy all the key/value pairs.
        this.resultObj = res;
        this.next();
    }
    valid() {
        return this.isValid;
    }
    get(columnName) {
        const res = this.rowData[columnName];
        if (res === undefined) {
            throw new Error(`Column '${columnName}' doesn't exist. ` +
                `Actual columns: [${this.columnNames.join(',')}]`);
        }
        return res;
    }
    // Moves the cursor next by one row and updates |isValid|.
    // When this fails to move, two cases are possible:
    // 1. We reached the end of the result set (this is the case if
    //    QueryResult.isComplete() == true when this fails).
    // 2. We reached the end of the current batch, but more rows might come later
    //    (if QueryResult.isComplete() == false).
    next() {
        // At some point we might reach the end of the current batch, but the next
        // batch might be available already. In this case we want next() to
        // transparently move on to the next batch.
        while (this.nextCellTypeOff + this.numColumns > this.cellTypesEnd) {
            // If TraceProcessor is behaving well, we should never end up in a
            // situation where we have leftover cells. TP is expected to serialize
            // whole rows in each QueryResult batch and NOT truncate them midway.
            // If this assert fires the TP RPC logic has a bug.
            (0, logging.assertTrue)(this.nextCellTypeOff === this.cellTypesEnd ||
                this.cellTypesEnd === -1);
            if (!this.tryMoveToNextBatch()) {
                this.isValid = false;
                return;
            }
        }
        const rowData = this.rowData;
        const numColumns = this.numColumns;
        // Read the current row.
        for (let i = 0; i < numColumns; i++) {
            const cellType = this.batchBytes[this.nextCellTypeOff++];
            const colName = this.columnNames[i];
            switch (cellType) {
                case CellType.CELL_NULL:
                    rowData[colName] = null;
                    break;
                case CellType.CELL_VARINT:
                    const val = this.varIntReader.int64();
                    // This is very subtle. The return type of int64 can be either a
                    // number or a Long.js {high:number, low:number} if Long.js support is
                    // enabled. The default state seems different in node and browser.
                    // We force-disable Long.js support in the top of this source file.
                    rowData[colName] = val;
                    break;
                case CellType.CELL_FLOAT64:
                    rowData[colName] = this.float64Cells[this.nextFloat64Cell++];
                    break;
                case CellType.CELL_STRING:
                    rowData[colName] = this.stringCells[this.nextStringCell++];
                    break;
                case CellType.CELL_BLOB:
                    const blob = this.blobCells[this.nextBlobCell++];
                    throw new Error(`TODO implement BLOB support (${blob})`);
                default:
                    throw new Error(`Invalid cell type ${cellType}`);
            }
        } // For (cells)
        this.isValid = true;
    }
    tryMoveToNextBatch() {
        const nextBatchIdx = this.batchIdx + 1;
        if (nextBatchIdx >= this.resultObj.batches.length) {
            return false;
        }
        this.columnNames = this.resultObj.columnNames;
        this.numColumns = this.columnNames.length;
        this.batchIdx = nextBatchIdx;
        const batch = (0, logging.assertExists)(this.resultObj.batches[nextBatchIdx]);
        this.batchBytes = batch.batchBytes;
        this.nextCellTypeOff = batch.cellTypesOff;
        this.cellTypesEnd = batch.cellTypesOff + batch.cellTypesLen;
        this.float64Cells = batch.float64Cells;
        this.blobCells = batch.blobCells;
        this.stringCells = batch.stringCells;
        this.varIntReader = minimal$1.Reader.create(batch.batchBytes);
        this.varIntReader.pos = batch.varintOff;
        this.varIntReader.len = batch.varintOff + batch.varintLen;
        this.nextFloat64Cell = 0;
        this.nextStringCell = 0;
        this.nextBlobCell = 0;
        // Check that all the expected columns are present.
        for (const expectedCol of Object.keys(this.rowSpec)) {
            if (this.columnNames.indexOf(expectedCol) < 0) {
                throw new Error(`Column ${expectedCol} not found in the SQL result ` +
                    `set {${this.columnNames.join(' ')}}`);
            }
        }
        // Check that the cells types are consistent.
        const numColumns = this.numColumns;
        if (batch.numCells === 0) {
            // This can happen if the query result contains just an error. In this
            // an empty batch with isLastBatch=true is appended as an EOF marker.
            // In theory TraceProcessor could return an empty batch in the middle and
            // that would be fine from a protocol viewpoint. In practice, no code path
            // does that today so it doesn't make sense trying supporting it with a
            // recursive call to tryMoveToNextBatch().
            (0, logging.assertTrue)(batch.isLastBatch);
            return false;
        }
        (0, logging.assertTrue)(numColumns > 0);
        for (let i = this.nextCellTypeOff; i < this.cellTypesEnd; i++) {
            const col = (i - this.nextCellTypeOff) % numColumns;
            const colName = this.columnNames[col];
            const actualType = this.batchBytes[i];
            const expType = this.rowSpec[colName];
            // If undefined, the caller doesn't want to read this column at all, so
            // it can be whatever.
            if (expType === undefined)
                continue;
            let err = '';
            if (actualType === CellType.CELL_NULL &&
                (expType !== exports.STR_NULL && expType !== exports.NUM_NULL)) {
                err = 'SQL value is NULL but that was not expected' +
                    ` (expected type: ${columnTypeToString(expType)}). ` +
                    'Did you intend to use NUM_NULL or STR_NULL?';
            }
            else if (((actualType === CellType.CELL_VARINT ||
                actualType === CellType.CELL_FLOAT64) &&
                (expType !== exports.NUM && expType !== exports.NUM_NULL)) ||
                ((actualType === CellType.CELL_STRING) &&
                    (expType !== exports.STR && expType !== exports.STR_NULL))) {
                err = `Incompatible cell type. Expected: ${columnTypeToString(expType)} actual: ${CELL_TYPE_NAMES[actualType]}`;
            }
            if (err.length > 0) {
                throw new Error(`Error @ row: ${Math.floor(i / numColumns)} col: '` +
                    `${colName}': ${err}`);
            }
        }
        return true;
    }
}
// This is the object ultimately returned to the client when calling
// QueryResult.iter(...).
// The only reason why this is disjoint from RowIteratorImpl is to avoid
// naming collisions between the members variables required by RowIteratorImpl
// and the column names returned by the iterator.
class RowIteratorImplWithRowData {
    constructor(querySpec, res) {
        const thisAsRow = this;
        Object.assign(thisAsRow, querySpec);
        this._impl = new RowIteratorImpl(querySpec, thisAsRow, res);
        this.next = this._impl.next.bind(this._impl);
        this.valid = this._impl.valid.bind(this._impl);
        this.get = this._impl.get.bind(this._impl);
    }
}
// This is a proxy object that wraps QueryResultImpl, adding await-ability.
// This is so that:
// 1. Clients that just want to await for the full result set can just call
//    await engine.query('...') and will get a QueryResult that is guaranteed
//    to be complete.
// 2. Clients that know how to handle the streaming can use it straight away.
class WaitableQueryResultImpl {
    constructor(errorInfo) {
        this.thenCalled = false;
        this.impl = new QueryResultImpl(errorInfo);
    }
    // QueryResult implementation. Proxies all calls to the impl object.
    iter(spec) {
        return this.impl.iter(spec);
    }
    firstRow(spec) {
        return this.impl.firstRow(spec);
    }
    waitAllRows() {
        return this.impl.waitAllRows();
    }
    isComplete() {
        return this.impl.isComplete();
    }
    numRows() {
        return this.impl.numRows();
    }
    columns() {
        return this.impl.columns();
    }
    error() {
        return this.impl.error();
    }
    statementCount() {
        return this.impl.statementCount();
    }
    statementWithOutputCount() {
        return this.impl.statementWithOutputCount();
    }
    // WritableQueryResult implementation.
    appendResultBatch(resBytes) {
        return this.impl.appendResultBatch(resBytes);
    }
    // PromiseLike<QueryResult> implementaton.
    then(onfulfilled, onrejected) {
        (0, logging.assertFalse)(this.thenCalled);
        this.thenCalled = true;
        return this.impl.ensureAllRowsPromise().then(onfulfilled, onrejected);
    }
    catch(error) {
        return this.impl.ensureAllRowsPromise().catch(error);
    }
    finally(callback) {
        return this.impl.ensureAllRowsPromise().finally(callback);
    }
    // eslint and clang-format disagree on how to format get[foo](). Let
    // clang-format win:
    // eslint-disable-next-line keyword-spacing
    get [Symbol.toStringTag]() {
        return 'Promise<WaitableQueryResult>';
    }
}
function createQueryResult(errorInfo) {
    return new WaitableQueryResultImpl(errorInfo);
}
exports.createQueryResult = createQueryResult;

});

var canvas_utils = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.drawIncompleteSlice = exports.drawDoubleHeadedArrow = exports.cropText = void 0;
function cropText(str, charWidth, rectWidth) {
    let displayText = '';
    const maxLength = Math.floor(rectWidth / charWidth) - 1;
    if (str.length <= maxLength) {
        displayText = str;
    }
    else {
        let limit = maxLength;
        let maybeTripleDot = '';
        if (maxLength > 1) {
            limit = maxLength - 1;
            maybeTripleDot = '\u2026';
        }
        // Javascript strings are UTF-16. |limit| could point in the middle of a
        // 32-bit double-wchar codepoint (e.g., an emoji). Here we detect if the
        // |limit|-th wchar is a leading surrogate and attach the trailing one.
        const lastCharCode = str.charCodeAt(limit - 1);
        limit += (lastCharCode >= 0xD800 && lastCharCode < 0xDC00) ? 1 : 0;
        displayText = str.substring(0, limit) + maybeTripleDot;
    }
    return displayText;
}
exports.cropText = cropText;
function drawDoubleHeadedArrow(ctx, x, y, length, showArrowHeads, width = 2, color = 'black') {
    ctx.beginPath();
    ctx.lineWidth = width;
    ctx.lineCap = 'round';
    ctx.strokeStyle = color;
    ctx.moveTo(x, y);
    ctx.lineTo(x + length, y);
    ctx.stroke();
    ctx.closePath();
    // Arrowheads on the each end of the line.
    if (showArrowHeads) {
        ctx.beginPath();
        ctx.moveTo(x + length - 8, y - 4);
        ctx.lineTo(x + length, y);
        ctx.lineTo(x + length - 8, y + 4);
        ctx.stroke();
        ctx.closePath();
        ctx.beginPath();
        ctx.moveTo(x + 8, y - 4);
        ctx.lineTo(x, y);
        ctx.lineTo(x + 8, y + 4);
        ctx.stroke();
        ctx.closePath();
    }
}
exports.drawDoubleHeadedArrow = drawDoubleHeadedArrow;
function drawIncompleteSlice(ctx, x, y, width, height) {
    ctx.beginPath();
    const triangleSize = height / 4;
    ctx.moveTo(x, y);
    ctx.lineTo(x + width, y);
    ctx.lineTo(x + width - 3, y + triangleSize * 0.5);
    ctx.lineTo(x + width, y + triangleSize);
    ctx.lineTo(x + width - 3, y + (triangleSize * 1.5));
    ctx.lineTo(x + width, y + 2 * triangleSize);
    ctx.lineTo(x + width - 3, y + (triangleSize * 2.5));
    ctx.lineTo(x + width, y + 3 * triangleSize);
    ctx.lineTo(x + width - 3, y + (triangleSize * 3.5));
    ctx.lineTo(x + width, y + 4 * triangleSize);
    ctx.lineTo(x, y + height);
    ctx.fill();
}
exports.drawIncompleteSlice = drawIncompleteSlice;

});

var constants = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.TRACE_MARGIN_TIME_S = exports.TRACE_SUFFIX = void 0;
exports.TRACE_SUFFIX = '.perfetto-trace';
exports.TRACE_MARGIN_TIME_S = 1 / 1e7;

});

var checkerboard_1 = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkerboardExcept = exports.checkerboard = void 0;
const LOADING_TEXT = 'Loading...';
let LOADING_TEXT_WIDTH = 0;
// Checker board the range [leftPx, rightPx].
function checkerboard(ctx, heightPx, leftPx, rightPx) {
    const widthPx = rightPx - leftPx;
    ctx.font = '12px Roboto Condensed';
    ctx.fillStyle = '#eee';
    ctx.fillRect(leftPx, 0, widthPx, heightPx);
    ctx.fillStyle = '#666';
    const oldBaseline = ctx.textBaseline;
    ctx.textBaseline = 'middle';
    if (LOADING_TEXT_WIDTH === 0) {
        LOADING_TEXT_WIDTH = ctx.measureText(LOADING_TEXT).width;
    }
    if (LOADING_TEXT_WIDTH <= widthPx) {
        ctx.fillText(LOADING_TEXT, leftPx + widthPx / 2 - LOADING_TEXT_WIDTH / 2, heightPx / 2);
    }
    ctx.textBaseline = oldBaseline;
}
exports.checkerboard = checkerboard;
// Checker board everything between [startPx, endPx] except [leftPx, rightPx].
function checkerboardExcept(ctx, heightPx, startPx, endPx, leftPx, rightPx) {
    // [leftPx, rightPx] doesn't overlap [startPx, endPx] at all:
    if (rightPx <= startPx || leftPx >= endPx) {
        checkerboard(ctx, heightPx, startPx, endPx);
        return;
    }
    // Checkerboard [startPx, leftPx]:
    if (leftPx > startPx) {
        checkerboard(ctx, heightPx, startPx, leftPx);
    }
    // Checkerboard [rightPx, endPx]:
    if (rightPx < endPx) {
        checkerboard(ctx, heightPx, rightPx, endPx);
    }
}
exports.checkerboardExcept = checkerboardExcept;

});

var track = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Track = void 0;



// The abstract class that needs to be implemented by all tracks.
class Track {
    constructor(args) {
        // When true this is a new controller-less track type.
        // TODO(hjd): eventually all tracks will be controller-less and this
        // should be removed then.
        this.frontendOnly = false;
        this.trackId = args.trackId;
        this.engine = args.engine;
        this.lastTrackState = (0, logging.assertExists)(globals.globals.state.tracks[this.trackId]);
    }
    // Last call the track will receive. Called just before the last reference to
    // this object is removed.
    onDestroy() { }
    get trackState() {
        // We can end up in a state where a Track is still in the mithril renderer
        // tree but its corresponding state has been deleted. This can happen in the
        // interval of time between a track being removed from the state and the
        // next animation frame that would remove the Track object. If a mouse event
        // is dispatched in the meanwhile (or a promise is resolved), we need to be
        // able to access the state. Hence the caching logic here.
        const trackState = globals.globals.state.tracks[this.trackId];
        if (trackState === undefined) {
            return this.lastTrackState;
        }
        this.lastTrackState = trackState;
        return trackState;
    }
    get config() {
        return this.trackState.config;
    }
    data() {
        if (this.frontendOnly) {
            return undefined;
        }
        return globals.globals.trackDataStore.get(this.trackId);
    }
    getHeight() {
        return 40;
    }
    getTrackShellButtons() {
        return [];
    }
    getContextMenu() {
        return null;
    }
    onMouseMove(_position) { }
    // Returns whether the mouse click has selected something.
    // Used to prevent further propagation if necessary.
    onMouseClick(_position) {
        return false;
    }
    onMouseOut() { }
    onFullRedraw() { }
    render(ctx) {
        globals.globals.frontendLocalState.addVisibleTrack(this.trackState.id);
        if (this.data() === undefined && !this.frontendOnly) {
            const { visibleWindowTime, timeScale } = globals.globals.frontendLocalState;
            const startPx = Math.floor(timeScale.timeToPx(visibleWindowTime.start));
            const endPx = Math.ceil(timeScale.timeToPx(visibleWindowTime.end));
            (0, checkerboard_1.checkerboard)(ctx, this.getHeight(), startPx, endPx);
        }
        else {
            this.renderCanvas(ctx);
        }
    }
    drawTrackHoverTooltip(ctx, pos, text, text2) {
        ctx.font = '10px Roboto Condensed';
        ctx.textBaseline = 'middle';
        ctx.textAlign = 'left';
        // TODO(hjd): Avoid measuring text all the time (just use monospace?)
        const textMetrics = ctx.measureText(text);
        const text2Metrics = ctx.measureText(text2 || '');
        // Padding on each side of the box containing the tooltip:
        const paddingPx = 4;
        // Figure out the width of the tool tip box:
        let width = Math.max(textMetrics.width, text2Metrics.width);
        width += paddingPx * 2;
        // and the height:
        let height = 0;
        height += textMetrics.fontBoundingBoxAscent;
        height += textMetrics.fontBoundingBoxDescent;
        if (text2 !== undefined) {
            height += text2Metrics.fontBoundingBoxAscent;
            height += text2Metrics.fontBoundingBoxDescent;
        }
        height += paddingPx * 2;
        let x = pos.x;
        let y = pos.y;
        // Move box to the top right of the mouse:
        x += 10;
        y -= 10;
        // Ensure the box is on screen:
        const endPx = globals.globals.frontendLocalState.timeScale.endPx;
        if (x + width > endPx) {
            x -= x + width - endPx;
        }
        if (y < 0) {
            y = 0;
        }
        if (y + height > this.getHeight()) {
            y -= y + height - this.getHeight();
        }
        // Draw everything:
        ctx.fillStyle = 'rgba(255, 255, 255, 0.9)';
        ctx.fillRect(x, y, width, height);
        ctx.fillStyle = 'hsl(200, 50%, 40%)';
        ctx.fillText(text, x + paddingPx, y + paddingPx + textMetrics.fontBoundingBoxAscent);
        if (text2 !== undefined) {
            const yOffsetPx = textMetrics.fontBoundingBoxAscent +
                textMetrics.fontBoundingBoxDescent +
                text2Metrics.fontBoundingBoxAscent;
            ctx.fillText(text2, x + paddingPx, y + paddingPx + yOffsetPx);
        }
    }
    // Returns a place where a given slice should be drawn. Should be implemented
    // only for track types that support slices e.g. chrome_slice, async_slices
    // tStart - slice start time in seconds, tEnd - slice end time in seconds,
    // depth - slice depth
    getSliceRect(_tStart, _tEnd, _depth) {
        return undefined;
    }
}
exports.Track = Track;

});

var chrome_slices = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.plugin = exports.ChromeSliceTrack = exports.ChromeSliceTrackController = exports.SLICE_TRACK_KIND = void 0;












exports.SLICE_TRACK_KIND = 'ChromeSliceTrack';
const SLICE_HEIGHT = 18;
const TRACK_PADDING = 4;
const CHEVRON_WIDTH_PX = 10;
const HALF_CHEVRON_WIDTH_PX = CHEVRON_WIDTH_PX / 2;
const INNER_CHEVRON_OFFSET = -3;
const INNER_CHEVRON_SCALE = (SLICE_HEIGHT - 2 * INNER_CHEVRON_OFFSET) / SLICE_HEIGHT;
// the lowest bucketNs gets is 2, but add some room in case of fp error
const MIN_QUANT_NS = 3;
class ChromeSliceTrackController extends track_controller.TrackController {
    constructor() {
        super(...arguments);
        this.maxDurNs = 0;
    }
    onBoundsChange(start, end, resolution) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const startNs = (0, time.toNs)(start);
            const endNs = (0, time.toNs)(end);
            const pxSize = this.pxSize();
            // ns per quantization bucket (i.e. ns per pixel). /2 * 2 is to force it to
            // be an even number, so we can snap in the middle.
            const bucketNs = Math.max(Math.round(resolution * 1e9 * pxSize / 2) * 2, 1);
            const tableName = this.namespaceTable('slice');
            if (this.maxDurNs === 0) {
                const query = `
          SELECT max(iif(dur = -1, (SELECT end_ts FROM trace_bounds) - ts, dur))
          AS maxDur FROM ${tableName} WHERE track_id = ${this.config.trackId}`;
                const queryRes = yield this.query(query);
                this.maxDurNs = queryRes.firstRow({ maxDur: query_result.NUM_NULL }).maxDur || 0;
            }
            // Buckets are always even and positive, don't quantize once we zoom to
            // nanosecond-scale, so that we can see exact sizes.
            let tsq = `ts`;
            if (bucketNs > MIN_QUANT_NS) {
                tsq = `(ts + ${bucketNs / 2}) / ${bucketNs} * ${bucketNs}`;
            }
            const query = `
      SELECT
        ${tsq} as tsq,
        ts,
        max(iif(dur = -1, (SELECT end_ts FROM trace_bounds) - ts, dur)) as dur,
        depth,
        id as sliceId,
        ifnull(name, '[null]') as name,
        dur = 0 as isInstant,
        dur = -1 as isIncomplete,
        thread_dur as threadDur
      FROM ${tableName}
      WHERE track_id = ${this.config.trackId} AND
        ts >= (${startNs - this.maxDurNs}) AND
        ts <= ${endNs}
      GROUP BY depth, tsq`;
            const queryRes = yield this.query(query);
            const numRows = queryRes.numRows();
            const slices = {
                start,
                end,
                resolution,
                length: numRows,
                strings: [],
                sliceIds: new Float64Array(numRows),
                starts: new Float64Array(numRows),
                ends: new Float64Array(numRows),
                depths: new Uint16Array(numRows),
                titles: new Uint16Array(numRows),
                isInstant: new Uint16Array(numRows),
                isIncomplete: new Uint16Array(numRows),
                cpuTimeRatio: new Float64Array(numRows),
            };
            const stringIndexes = new Map();
            function internString(str) {
                let idx = stringIndexes.get(str);
                if (idx !== undefined)
                    return idx;
                idx = slices.strings.length;
                slices.strings.push(str);
                stringIndexes.set(str, idx);
                return idx;
            }
            const it = queryRes.iter({
                tsq: query_result.NUM,
                ts: query_result.NUM,
                dur: query_result.NUM,
                depth: query_result.NUM,
                sliceId: query_result.NUM,
                name: query_result.STR,
                isInstant: query_result.NUM,
                isIncomplete: query_result.NUM,
                threadDur: query_result.NUM_NULL,
            });
            for (let row = 0; it.valid(); it.next(), row++) {
                const startNsQ = it.tsq;
                const startNs = it.ts;
                const durNs = it.dur;
                const endNs = startNs + durNs;
                let endNsQ = endNs;
                if (bucketNs > MIN_QUANT_NS) {
                    endNsQ = Math.floor((endNs + bucketNs / 2 - 1) / bucketNs) * bucketNs;
                    endNsQ = Math.max(endNsQ, startNsQ + bucketNs);
                }
                let isInstant = it.isInstant;
                // Floating point rounding with large numbers of nanoseconds can mean
                // there isn't enough precision to distinguish the start and end of a very
                // short event so we just display the event as an instant when zoomed in
                // rather than fail completely if the start and end time are the same.
                if (startNsQ === endNsQ) {
                    isInstant = 1;
                }
                slices.starts[row] = (0, time.fromNs)(startNsQ);
                slices.ends[row] = (0, time.fromNs)(endNsQ);
                slices.depths[row] = it.depth;
                slices.sliceIds[row] = it.sliceId;
                slices.titles[row] = internString(it.name);
                slices.isInstant[row] = isInstant;
                slices.isIncomplete[row] = it.isIncomplete;
                let cpuTimeRatio = 1;
                if (!isInstant && !it.isIncomplete && it.threadDur !== null) {
                    // Rounding the CPU time ratio to two decimal places and ensuring
                    // it is less than or equal to one, incase the thread duration exceeds
                    // the total duration.
                    cpuTimeRatio =
                        Math.min(Math.round((it.threadDur / it.dur) * 100) / 100, 1);
                }
                slices.cpuTimeRatio[row] = cpuTimeRatio;
            }
            return slices;
        });
    }
}
exports.ChromeSliceTrackController = ChromeSliceTrackController;
ChromeSliceTrackController.kind = exports.SLICE_TRACK_KIND;
class ChromeSliceTrack extends track.Track {
    constructor(args) {
        super(args);
        this.hoveredTitleId = -1;
    }
    static create(args) {
        return new ChromeSliceTrack(args);
    }
    // Font used to render the slice name on the current track.
    getFont() {
        return '12px Roboto Condensed';
    }
    renderCanvas(ctx) {
        // TODO: fonts and colors should come from the CSS and not hardcoded here.
        const { timeScale, visibleWindowTime } = globals.globals.frontendLocalState;
        const data = this.data();
        if (data === undefined)
            return; // Can't possibly draw anything.
        // If the cached trace slices don't fully cover the visible time range,
        // show a gray rectangle with a "Loading..." label.
        (0, checkerboard_1.checkerboardExcept)(ctx, this.getHeight(), timeScale.timeToPx(visibleWindowTime.start), timeScale.timeToPx(visibleWindowTime.end), timeScale.timeToPx(data.start), timeScale.timeToPx(data.end));
        ctx.textAlign = 'center';
        // measuretext is expensive so we only use it once.
        const charWidth = ctx.measureText('ACBDLqsdfg').width / 10;
        // The draw of the rect on the selected slice must happen after the other
        // drawings, otherwise it would result under another rect.
        let drawRectOnSelected = () => { };
        for (let i = 0; i < data.starts.length; i++) {
            const tStart = data.starts[i];
            let tEnd = data.ends[i];
            const depth = data.depths[i];
            const titleId = data.titles[i];
            const sliceId = data.sliceIds[i];
            const isInstant = data.isInstant[i];
            const isIncomplete = data.isIncomplete[i];
            const title = data.strings[titleId];
            const colorOverride = data.colors && data.strings[data.colors[i]];
            if (isIncomplete) { // incomplete slice
                tEnd = visibleWindowTime.end;
            }
            const rect = this.getSliceRect(tStart, tEnd, depth);
            if (!rect || !rect.visible) {
                continue;
            }
            const currentSelection = globals.globals.state.currentSelection;
            const isSelected = currentSelection &&
                currentSelection.kind === 'CHROME_SLICE' &&
                currentSelection.id !== undefined && currentSelection.id === sliceId;
            const name = title.replace(/( )?\d+/g, '');
            const highlighted = titleId === this.hoveredTitleId ||
                globals.globals.state.highlightedSliceId === sliceId;
            const hasFocus = highlighted || isSelected;
            const [hue, saturation, lightness] = (0, colorizer.hslForSlice)(name, hasFocus);
            let color;
            if (colorOverride === undefined) {
                color = (0, hsluv_cache.cachedHsluvToHex)(hue, saturation, lightness);
            }
            else {
                color = colorOverride;
            }
            ctx.fillStyle = color;
            // We draw instant events as upward facing chevrons starting at A:
            //     A
            //    ###
            //   ##C##
            //  ##   ##
            // D       B
            // Then B, C, D and back to A:
            if (isInstant) {
                if (isSelected) {
                    drawRectOnSelected = () => {
                        ctx.save();
                        ctx.translate(rect.left, rect.top);
                        // Draw outer chevron as dark border
                        ctx.save();
                        ctx.translate(0, INNER_CHEVRON_OFFSET);
                        ctx.scale(INNER_CHEVRON_SCALE, INNER_CHEVRON_SCALE);
                        ctx.fillStyle = (0, hsluv_cache.cachedHsluvToHex)(hue, 100, 10);
                        this.drawChevron(ctx);
                        ctx.restore();
                        // Draw inner chevron as interior
                        ctx.fillStyle = color;
                        this.drawChevron(ctx);
                        ctx.restore();
                    };
                }
                else {
                    ctx.save();
                    ctx.translate(rect.left, rect.top);
                    this.drawChevron(ctx);
                    ctx.restore();
                }
                continue;
            }
            if (isIncomplete && rect.width > SLICE_HEIGHT / 4) {
                (0, canvas_utils.drawIncompleteSlice)(ctx, rect.left, rect.top, rect.width, SLICE_HEIGHT);
            }
            else if (data.cpuTimeRatio !== undefined && data.cpuTimeRatio[i] < 1 - 1e-9) {
                // We draw two rectangles, representing the ratio between wall time and
                // time spent on cpu.
                const cpuTimeRatio = data.cpuTimeRatio[i];
                const firstPartWidth = rect.width * cpuTimeRatio;
                const secondPartWidth = rect.width * (1 - cpuTimeRatio);
                ctx.fillRect(rect.left, rect.top, firstPartWidth, SLICE_HEIGHT);
                ctx.fillStyle =
                    (0, colorizer.colorForThreadIdleSlice)(hue, saturation, lightness, hasFocus);
                ctx.fillRect(rect.left + firstPartWidth, rect.top, secondPartWidth, SLICE_HEIGHT);
            }
            else {
                ctx.fillRect(rect.left, rect.top, rect.width, SLICE_HEIGHT);
            }
            // Selected case
            if (isSelected) {
                drawRectOnSelected = () => {
                    ctx.strokeStyle = (0, hsluv_cache.cachedHsluvToHex)(hue, 100, 10);
                    ctx.beginPath();
                    ctx.lineWidth = 3;
                    ctx.strokeRect(rect.left, rect.top - 1.5, rect.width, SLICE_HEIGHT + 3);
                    ctx.closePath();
                };
            }
            ctx.fillStyle = lightness > 65 ? '#404040' : 'white';
            const displayText = (0, canvas_utils.cropText)(title, charWidth, rect.width);
            const rectXCenter = rect.left + rect.width / 2;
            ctx.textBaseline = 'middle';
            ctx.font = this.getFont();
            ctx.fillText(displayText, rectXCenter, rect.top + SLICE_HEIGHT / 2);
        }
        drawRectOnSelected();
    }
    drawChevron(ctx) {
        // Draw a chevron at a fixed location and size. Should be used with
        // ctx.translate and ctx.scale to alter location and size.
        ctx.beginPath();
        ctx.moveTo(0, 0);
        ctx.lineTo(HALF_CHEVRON_WIDTH_PX, SLICE_HEIGHT);
        ctx.lineTo(0, SLICE_HEIGHT - HALF_CHEVRON_WIDTH_PX);
        ctx.lineTo(-HALF_CHEVRON_WIDTH_PX, SLICE_HEIGHT);
        ctx.lineTo(0, 0);
        ctx.fill();
    }
    getSliceIndex({ x, y }) {
        const data = this.data();
        if (data === undefined)
            return;
        const { timeScale } = globals.globals.frontendLocalState;
        if (y < TRACK_PADDING)
            return;
        const instantWidthTime = timeScale.deltaPxToDuration(HALF_CHEVRON_WIDTH_PX);
        const t = timeScale.pxToTime(x);
        const depth = Math.floor((y - TRACK_PADDING) / SLICE_HEIGHT);
        for (let i = 0; i < data.starts.length; i++) {
            if (depth !== data.depths[i]) {
                continue;
            }
            const tStart = data.starts[i];
            if (data.isInstant[i]) {
                if (Math.abs(tStart - t) < instantWidthTime) {
                    return i;
                }
            }
            else {
                let tEnd = data.ends[i];
                if (data.isIncomplete[i]) {
                    tEnd = globals.globals.frontendLocalState.visibleWindowTime.end;
                }
                if (tStart <= t && t <= tEnd) {
                    return i;
                }
            }
        }
    }
    onMouseMove({ x, y }) {
        this.hoveredTitleId = -1;
        globals.globals.dispatch(actions.Actions.setHighlightedSliceId({ sliceId: -1 }));
        const sliceIndex = this.getSliceIndex({ x, y });
        if (sliceIndex === undefined)
            return;
        const data = this.data();
        if (data === undefined)
            return;
        this.hoveredTitleId = data.titles[sliceIndex];
        const sliceId = data.sliceIds[sliceIndex];
        globals.globals.dispatch(actions.Actions.setHighlightedSliceId({ sliceId }));
    }
    onMouseOut() {
        this.hoveredTitleId = -1;
        globals.globals.dispatch(actions.Actions.setHighlightedSliceId({ sliceId: -1 }));
    }
    onMouseClick({ x, y }) {
        const sliceIndex = this.getSliceIndex({ x, y });
        if (sliceIndex === undefined)
            return false;
        const data = this.data();
        if (data === undefined)
            return false;
        const sliceId = data.sliceIds[sliceIndex];
        if (sliceId !== undefined && sliceId !== -1) {
            globals.globals.makeSelection(actions.Actions.selectChromeSlice({
                id: sliceId,
                trackId: this.trackState.id,
                table: this.config.namespace,
            }));
            return true;
        }
        return false;
    }
    getHeight() {
        return SLICE_HEIGHT * (this.config.maxDepth + 1) + 2 * TRACK_PADDING;
    }
    getSliceRect(tStart, tEnd, depth) {
        const { timeScale, visibleWindowTime } = globals.globals.frontendLocalState;
        const pxEnd = timeScale.timeToPx(visibleWindowTime.end);
        const left = Math.max(timeScale.timeToPx(tStart), -constants.TRACE_MARGIN_TIME_S);
        const right = Math.min(timeScale.timeToPx(tEnd), pxEnd);
        return {
            left,
            width: Math.max(right - left, 1),
            top: TRACK_PADDING + depth * SLICE_HEIGHT,
            height: SLICE_HEIGHT,
            visible: !(tEnd <= visibleWindowTime.start || tStart >= visibleWindowTime.end),
        };
    }
}
exports.ChromeSliceTrack = ChromeSliceTrack;
ChromeSliceTrack.kind = exports.SLICE_TRACK_KIND;
function activate(ctx) {
    ctx.registerTrackController(ChromeSliceTrackController);
    ctx.registerTrack(ChromeSliceTrack);
}
exports.plugin = {
    pluginId: 'perfetto.ChromeSlices',
    activate,
};

});

var actual_frames = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.plugin = exports.activate = exports.ActualFramesSliceTrack = exports.ACTUAL_FRAMES_SLICE_TRACK_KIND = void 0;





exports.ACTUAL_FRAMES_SLICE_TRACK_KIND = 'ActualFramesSliceTrack';
const BLUE_COLOR = '#03A9F4'; // Blue 500
const GREEN_COLOR = '#4CAF50'; // Green 500
const YELLOW_COLOR = '#FFEB3B'; // Yellow 500
const RED_COLOR = '#FF5722'; // Red 500
const LIGHT_GREEN_COLOR = '#C0D588'; // Light Green 500
const PINK_COLOR = '#F515E0'; // Pink 500
class ActualFramesSliceTrackController extends track_controller.TrackController {
    constructor() {
        super(...arguments);
        this.maxDurNs = 0;
    }
    onBoundsChange(start, end, resolution) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const startNs = (0, time.toNs)(start);
            const endNs = (0, time.toNs)(end);
            const pxSize = this.pxSize();
            // ns per quantization bucket (i.e. ns per pixel). /2 * 2 is to force it to
            // be an even number, so we can snap in the middle.
            const bucketNs = Math.max(Math.round(resolution * 1e9 * pxSize / 2) * 2, 1);
            if (this.maxDurNs === 0) {
                const maxDurResult = yield this.query(`
        select
          max(iif(dur = -1, (SELECT end_ts FROM trace_bounds) - ts, dur))
            as maxDur
        from experimental_slice_layout
        where filter_track_ids = '${this.config.trackIds.join(',')}'
      `);
                this.maxDurNs = maxDurResult.firstRow({ maxDur: query_result.NUM_NULL }).maxDur || 0;
            }
            const rawResult = yield this.query(`
      SELECT
        (s.ts + ${bucketNs / 2}) / ${bucketNs} * ${bucketNs} as tsq,
        s.ts as ts,
        max(iif(s.dur = -1, (SELECT end_ts FROM trace_bounds) - s.ts, s.dur))
            as dur,
        s.layout_depth as layoutDepth,
        s.name as name,
        s.id as id,
        s.dur = 0 as isInstant,
        s.dur = -1 as isIncomplete,
        CASE afs.jank_tag
          WHEN 'Self Jank' THEN '${RED_COLOR}'
          WHEN 'Other Jank' THEN '${YELLOW_COLOR}'
          WHEN 'Dropped Frame' THEN '${BLUE_COLOR}'
          WHEN 'Buffer Stuffing' THEN '${LIGHT_GREEN_COLOR}'
          WHEN 'SurfaceFlinger Stuffing' THEN '${LIGHT_GREEN_COLOR}'
          WHEN 'No Jank' THEN '${GREEN_COLOR}'
          ELSE '${PINK_COLOR}'
        END as color
      from experimental_slice_layout s
      join actual_frame_timeline_slice afs using(id)
      where
        filter_track_ids = '${this.config.trackIds.join(',')}' and
        s.ts >= ${startNs - this.maxDurNs} and
        s.ts <= ${endNs}
      group by tsq, s.layout_depth
      order by tsq, s.layout_depth
    `);
            const numRows = rawResult.numRows();
            const slices = {
                start,
                end,
                resolution,
                length: numRows,
                strings: [],
                sliceIds: new Float64Array(numRows),
                starts: new Float64Array(numRows),
                ends: new Float64Array(numRows),
                depths: new Uint16Array(numRows),
                titles: new Uint16Array(numRows),
                colors: new Uint16Array(numRows),
                isInstant: new Uint16Array(numRows),
                isIncomplete: new Uint16Array(numRows),
            };
            const stringIndexes = new Map();
            function internString(str) {
                let idx = stringIndexes.get(str);
                if (idx !== undefined)
                    return idx;
                idx = slices.strings.length;
                slices.strings.push(str);
                stringIndexes.set(str, idx);
                return idx;
            }
            const it = rawResult.iter({
                'tsq': query_result.NUM,
                'ts': query_result.NUM,
                'dur': query_result.NUM,
                'layoutDepth': query_result.NUM,
                'id': query_result.NUM,
                'name': query_result.STR,
                'isInstant': query_result.NUM,
                'isIncomplete': query_result.NUM,
                'color': query_result.STR,
            });
            for (let i = 0; it.valid(); i++, it.next()) {
                const startNsQ = it.tsq;
                const startNs = it.ts;
                const durNs = it.dur;
                const endNs = startNs + durNs;
                let endNsQ = Math.floor((endNs + bucketNs / 2 - 1) / bucketNs) * bucketNs;
                endNsQ = Math.max(endNsQ, startNsQ + bucketNs);
                slices.starts[i] = (0, time.fromNs)(startNsQ);
                slices.ends[i] = (0, time.fromNs)(endNsQ);
                slices.depths[i] = it.layoutDepth;
                slices.titles[i] = internString(it.name);
                slices.colors[i] = internString(it.color);
                slices.sliceIds[i] = it.id;
                slices.isInstant[i] = it.isInstant;
                slices.isIncomplete[i] = it.isIncomplete;
            }
            return slices;
        });
    }
}
ActualFramesSliceTrackController.kind = exports.ACTUAL_FRAMES_SLICE_TRACK_KIND;
class ActualFramesSliceTrack extends chrome_slices.ChromeSliceTrack {
    static create(args) {
        return new ActualFramesSliceTrack(args);
    }
}
exports.ActualFramesSliceTrack = ActualFramesSliceTrack;
ActualFramesSliceTrack.kind = exports.ACTUAL_FRAMES_SLICE_TRACK_KIND;
function activate(ctx) {
    ctx.registerTrackController(ActualFramesSliceTrackController);
    ctx.registerTrack(ActualFramesSliceTrack);
}
exports.activate = activate;
exports.plugin = {
    pluginId: 'perfetto.ActualFrames',
    activate,
};

});

var android_log = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.plugin = exports.ANDROID_LOGS_TRACK_KIND = void 0;








exports.ANDROID_LOGS_TRACK_KIND = 'AndroidLogTrack';
const LEVELS = [
    { color: 'hsl(122, 39%, 49%)', prios: [0, 1, 2, 3] },
    { color: 'hsl(0, 0%, 70%)', prios: [4] },
    { color: 'hsl(45, 100%, 51%)', prios: [5] },
    { color: 'hsl(4, 90%, 58%)', prios: [6] },
    { color: 'hsl(291, 64%, 42%)', prios: [7] }, // 7 (FATAL) -> Purple
];
const MARGIN_TOP = 2;
const RECT_HEIGHT = 35;
const EVT_PX = 2; // Width of an event tick in pixels.
class AndroidLogTrackController extends track_controller.TrackController {
    onBoundsChange(start, end, resolution) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const startNs = (0, time.toNsFloor)(start);
            const endNs = (0, time.toNsCeil)(end);
            // |resolution| is in s/px the frontend wants.
            const quantNs = (0, time.toNsCeil)(resolution);
            const queryRes = yield this.query(`
      select
        cast(ts / ${quantNs} as integer) * ${quantNs} as tsQuant,
        prio,
        count(prio) as numEvents
      from android_logs
      where ts >= ${startNs} and ts <= ${endNs}
      group by tsQuant, prio
      order by tsQuant, prio limit ${track_data.LIMIT};`);
            const rowCount = queryRes.numRows();
            const result = {
                start,
                end,
                resolution,
                length: rowCount,
                numEvents: 0,
                timestamps: new Float64Array(rowCount),
                priorities: new Uint8Array(rowCount),
            };
            const it = queryRes.iter({ tsQuant: query_result.NUM, prio: query_result.NUM, numEvents: query_result.NUM });
            for (let row = 0; it.valid(); it.next(), row++) {
                result.timestamps[row] = (0, time.fromNs)(it.tsQuant);
                const prio = Math.min(it.prio, 7);
                result.priorities[row] |= (1 << prio);
                result.numEvents += it.numEvents;
            }
            return result;
        });
    }
}
AndroidLogTrackController.kind = exports.ANDROID_LOGS_TRACK_KIND;
class AndroidLogTrack extends track.Track {
    constructor(args) {
        super(args);
    }
    static create(args) {
        return new AndroidLogTrack(args);
    }
    renderCanvas(ctx) {
        const { timeScale, visibleWindowTime } = globals.globals.frontendLocalState;
        const data = this.data();
        if (data === undefined)
            return; // Can't possibly draw anything.
        const dataStartPx = timeScale.timeToPx(data.start);
        const dataEndPx = timeScale.timeToPx(data.end);
        const visibleStartPx = timeScale.timeToPx(visibleWindowTime.start);
        const visibleEndPx = timeScale.timeToPx(visibleWindowTime.end);
        (0, checkerboard_1.checkerboardExcept)(ctx, this.getHeight(), visibleStartPx, visibleEndPx, dataStartPx, dataEndPx);
        const quantWidth = Math.max(EVT_PX, timeScale.deltaTimeToPx(data.resolution));
        const blockH = RECT_HEIGHT / LEVELS.length;
        for (let i = 0; i < data.timestamps.length; i++) {
            for (let lev = 0; lev < LEVELS.length; lev++) {
                let hasEventsForCurColor = false;
                for (const prio of LEVELS[lev].prios) {
                    if (data.priorities[i] & (1 << prio))
                        hasEventsForCurColor = true;
                }
                if (!hasEventsForCurColor)
                    continue;
                ctx.fillStyle = LEVELS[lev].color;
                const px = Math.floor(timeScale.timeToPx(data.timestamps[i]));
                ctx.fillRect(px, MARGIN_TOP + blockH * lev, quantWidth, blockH);
            } // for(lev)
        } // for (timestamps)
    }
}
AndroidLogTrack.kind = exports.ANDROID_LOGS_TRACK_KIND;
function activate(ctx) {
    ctx.registerTrack(AndroidLogTrack);
    ctx.registerTrackController(AndroidLogTrackController);
}
exports.plugin = {
    pluginId: 'perfetto.AndroidLog',
    activate,
};

});

var async_slices = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.plugin = exports.AsyncSliceTrack = exports.ASYNC_SLICE_TRACK_KIND = void 0;





exports.ASYNC_SLICE_TRACK_KIND = 'AsyncSliceTrack';
class AsyncSliceTrackController extends track_controller.TrackController {
    constructor() {
        super(...arguments);
        this.maxDurNs = 0;
    }
    onBoundsChange(start, end, resolution) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const startNs = (0, time.toNs)(start);
            const endNs = (0, time.toNs)(end);
            const pxSize = this.pxSize();
            // ns per quantization bucket (i.e. ns per pixel). /2 * 2 is to force it to
            // be an even number, so we can snap in the middle.
            const bucketNs = Math.max(Math.round(resolution * 1e9 * pxSize / 2) * 2, 1);
            if (this.maxDurNs === 0) {
                const maxDurResult = yield this.query(`
        select max(iif(dur = -1, (SELECT end_ts FROM trace_bounds) - ts, dur))
        as maxDur from experimental_slice_layout
        where filter_track_ids = '${this.config.trackIds.join(',')}'
      `);
                this.maxDurNs = maxDurResult.firstRow({ maxDur: query_result.NUM_NULL }).maxDur || 0;
            }
            const queryRes = yield this.query(`
      SELECT
        (ts + ${bucketNs / 2}) / ${bucketNs} * ${bucketNs} as tsq,
        ts,
        max(iif(dur = -1, (SELECT end_ts FROM trace_bounds) - ts, dur)) as dur,
        layout_depth as depth,
        ifnull(name, '[null]') as name,
        id,
        dur = 0 as isInstant,
        dur = -1 as isIncomplete
      from experimental_slice_layout
      where
        filter_track_ids = '${this.config.trackIds.join(',')}' and
        ts >= ${startNs - this.maxDurNs} and
        ts <= ${endNs}
      group by tsq, layout_depth
      order by tsq, layout_depth
    `);
            const numRows = queryRes.numRows();
            const slices = {
                start,
                end,
                resolution,
                length: numRows,
                strings: [],
                sliceIds: new Float64Array(numRows),
                starts: new Float64Array(numRows),
                ends: new Float64Array(numRows),
                depths: new Uint16Array(numRows),
                titles: new Uint16Array(numRows),
                isInstant: new Uint16Array(numRows),
                isIncomplete: new Uint16Array(numRows),
            };
            const stringIndexes = new Map();
            function internString(str) {
                let idx = stringIndexes.get(str);
                if (idx !== undefined)
                    return idx;
                idx = slices.strings.length;
                slices.strings.push(str);
                stringIndexes.set(str, idx);
                return idx;
            }
            const it = queryRes.iter({
                tsq: query_result.NUM,
                ts: query_result.NUM,
                dur: query_result.NUM,
                depth: query_result.NUM,
                name: query_result.STR,
                id: query_result.NUM,
                isInstant: query_result.NUM,
                isIncomplete: query_result.NUM,
            });
            for (let row = 0; it.valid(); it.next(), row++) {
                const startNsQ = it.tsq;
                const startNs = it.ts;
                const durNs = it.dur;
                const endNs = startNs + durNs;
                let endNsQ = Math.floor((endNs + bucketNs / 2 - 1) / bucketNs) * bucketNs;
                endNsQ = Math.max(endNsQ, startNsQ + bucketNs);
                slices.starts[row] = (0, time.fromNs)(startNsQ);
                slices.ends[row] = (0, time.fromNs)(endNsQ);
                slices.depths[row] = it.depth;
                slices.titles[row] = internString(it.name);
                slices.sliceIds[row] = it.id;
                slices.isInstant[row] = it.isInstant;
                slices.isIncomplete[row] = it.isIncomplete;
            }
            return slices;
        });
    }
}
AsyncSliceTrackController.kind = exports.ASYNC_SLICE_TRACK_KIND;
class AsyncSliceTrack extends chrome_slices.ChromeSliceTrack {
    static create(args) {
        return new AsyncSliceTrack(args);
    }
}
exports.AsyncSliceTrack = AsyncSliceTrack;
AsyncSliceTrack.kind = exports.ASYNC_SLICE_TRACK_KIND;
function activate(ctx) {
    ctx.registerTrackController(AsyncSliceTrackController);
    ctx.registerTrack(AsyncSliceTrack);
}
exports.plugin = {
    pluginId: 'perfetto.AsyncSlices',
    activate,
};

});

var rngBrowser = createCommonjsModule(function (module, exports) {

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = rng;
// Unique ID creation requires a high quality random # generator. In the browser we therefore
// require the crypto API and do not support built-in fallback to lower quality random number
// generators (like Math.random()).
let getRandomValues;
const rnds8 = new Uint8Array(16);

function rng() {
  // lazy load so that environments that need to polyfill have a chance to do so
  if (!getRandomValues) {
    // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
    // find the complete implementation of crypto (msCrypto) on IE11.
    getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);

    if (!getRandomValues) {
      throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
    }
  }

  return getRandomValues(rnds8);
}
});

var regex = createCommonjsModule(function (module, exports) {

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
exports.default = _default;
});

var validate_1 = createCommonjsModule(function (module, exports) {

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _regex = _interopRequireDefault(regex);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function validate(uuid) {
  return typeof uuid === 'string' && _regex.default.test(uuid);
}

var _default = validate;
exports.default = _default;
});

var stringify_1 = createCommonjsModule(function (module, exports) {

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _validate = _interopRequireDefault(validate_1);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/**
 * Convert array of 16 byte values to UUID string format of the form:
 * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
 */
const byteToHex = [];

for (let i = 0; i < 256; ++i) {
  byteToHex.push((i + 0x100).toString(16).substr(1));
}

function stringify(arr, offset = 0) {
  // Note: Be careful editing this code!  It's been tuned for performance
  // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
  const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID.  If this throws, it's likely due to one
  // of the following:
  // - One or more input array values don't map to a hex octet (leading to
  // "undefined" in the uuid)
  // - Invalid input values for the RFC `version` or `variant` fields

  if (!(0, _validate.default)(uuid)) {
    throw TypeError('Stringified UUID is invalid');
  }

  return uuid;
}

var _default = stringify;
exports.default = _default;
});

var v1_1 = createCommonjsModule(function (module, exports) {

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _rng = _interopRequireDefault(rngBrowser);

var _stringify = _interopRequireDefault(stringify_1);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

// **`v1()` - Generate time-based UUID**
//
// Inspired by https://github.com/LiosK/UUID.js
// and http://docs.python.org/library/uuid.html
let _nodeId;

let _clockseq; // Previous uuid creation time


let _lastMSecs = 0;
let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details

function v1(options, buf, offset) {
  let i = buf && offset || 0;
  const b = buf || new Array(16);
  options = options || {};
  let node = options.node || _nodeId;
  let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not
  // specified.  We do this lazily to minimize issues related to insufficient
  // system entropy.  See #189

  if (node == null || clockseq == null) {
    const seedBytes = options.random || (options.rng || _rng.default)();

    if (node == null) {
      // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
      node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
    }

    if (clockseq == null) {
      // Per 4.2.2, randomize (14 bit) clockseq
      clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
    }
  } // UUID timestamps are 100 nano-second units since the Gregorian epoch,
  // (1582-10-15 00:00).  JSNumbers aren't precise enough for this, so
  // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
  // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.


  let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock
  // cycle to simulate higher resolution clock

  let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)

  const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression

  if (dt < 0 && options.clockseq === undefined) {
    clockseq = clockseq + 1 & 0x3fff;
  } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
  // time interval


  if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
    nsecs = 0;
  } // Per 4.2.1.2 Throw error if too many uuids are requested


  if (nsecs >= 10000) {
    throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
  }

  _lastMSecs = msecs;
  _lastNSecs = nsecs;
  _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch

  msecs += 12219292800000; // `time_low`

  const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
  b[i++] = tl >>> 24 & 0xff;
  b[i++] = tl >>> 16 & 0xff;
  b[i++] = tl >>> 8 & 0xff;
  b[i++] = tl & 0xff; // `time_mid`

  const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;
  b[i++] = tmh >>> 8 & 0xff;
  b[i++] = tmh & 0xff; // `time_high_and_version`

  b[i++] = tmh >>> 24 & 0xf | 0x10; // include version

  b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)

  b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`

  b[i++] = clockseq & 0xff; // `node`

  for (let n = 0; n < 6; ++n) {
    b[i + n] = node[n];
  }

  return buf || (0, _stringify.default)(b);
}

var _default = v1;
exports.default = _default;
});

var parse_1 = createCommonjsModule(function (module, exports) {

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _validate = _interopRequireDefault(validate_1);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function parse(uuid) {
  if (!(0, _validate.default)(uuid)) {
    throw TypeError('Invalid UUID');
  }

  let v;
  const arr = new Uint8Array(16); // Parse ########-....-....-....-............

  arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
  arr[1] = v >>> 16 & 0xff;
  arr[2] = v >>> 8 & 0xff;
  arr[3] = v & 0xff; // Parse ........-####-....-....-............

  arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
  arr[5] = v & 0xff; // Parse ........-....-####-....-............

  arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
  arr[7] = v & 0xff; // Parse ........-....-....-####-............

  arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
  arr[9] = v & 0xff; // Parse ........-....-....-....-############
  // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes)

  arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;
  arr[11] = v / 0x100000000 & 0xff;
  arr[12] = v >>> 24 & 0xff;
  arr[13] = v >>> 16 & 0xff;
  arr[14] = v >>> 8 & 0xff;
  arr[15] = v & 0xff;
  return arr;
}

var _default = parse;
exports.default = _default;
});

var v35 = createCommonjsModule(function (module, exports) {

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = _default;
exports.URL = exports.DNS = void 0;

var _stringify = _interopRequireDefault(stringify_1);

var _parse = _interopRequireDefault(parse_1);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function stringToBytes(str) {
  str = unescape(encodeURIComponent(str)); // UTF8 escape

  const bytes = [];

  for (let i = 0; i < str.length; ++i) {
    bytes.push(str.charCodeAt(i));
  }

  return bytes;
}

const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
exports.DNS = DNS;
const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
exports.URL = URL;

function _default(name, version, hashfunc) {
  function generateUUID(value, namespace, buf, offset) {
    if (typeof value === 'string') {
      value = stringToBytes(value);
    }

    if (typeof namespace === 'string') {
      namespace = (0, _parse.default)(namespace);
    }

    if (namespace.length !== 16) {
      throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
    } // Compute hash of namespace and value, Per 4.3
    // Future: Use spread syntax when supported on all platforms, e.g. `bytes =
    // hashfunc([...namespace, ... value])`


    let bytes = new Uint8Array(16 + value.length);
    bytes.set(namespace);
    bytes.set(value, namespace.length);
    bytes = hashfunc(bytes);
    bytes[6] = bytes[6] & 0x0f | version;
    bytes[8] = bytes[8] & 0x3f | 0x80;

    if (buf) {
      offset = offset || 0;

      for (let i = 0; i < 16; ++i) {
        buf[offset + i] = bytes[i];
      }

      return buf;
    }

    return (0, _stringify.default)(bytes);
  } // Function#name is not settable on some platforms (#270)


  try {
    generateUUID.name = name; // eslint-disable-next-line no-empty
  } catch (err) {} // For CommonJS default export support


  generateUUID.DNS = DNS;
  generateUUID.URL = URL;
  return generateUUID;
}
});

var md5Browser = createCommonjsModule(function (module, exports) {

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

/*
 * Browser-compatible JavaScript MD5
 *
 * Modification of JavaScript MD5
 * https://github.com/blueimp/JavaScript-MD5
 *
 * Copyright 2011, Sebastian Tschan
 * https://blueimp.net
 *
 * Licensed under the MIT license:
 * https://opensource.org/licenses/MIT
 *
 * Based on
 * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
 * Digest Algorithm, as defined in RFC 1321.
 * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
 * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
 * Distributed under the BSD License
 * See http://pajhome.org.uk/crypt/md5 for more info.
 */
function md5(bytes) {
  if (typeof bytes === 'string') {
    const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape

    bytes = new Uint8Array(msg.length);

    for (let i = 0; i < msg.length; ++i) {
      bytes[i] = msg.charCodeAt(i);
    }
  }

  return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));
}
/*
 * Convert an array of little-endian words to an array of bytes
 */


function md5ToHexEncodedArray(input) {
  const output = [];
  const length32 = input.length * 32;
  const hexTab = '0123456789abcdef';

  for (let i = 0; i < length32; i += 8) {
    const x = input[i >> 5] >>> i % 32 & 0xff;
    const hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);
    output.push(hex);
  }

  return output;
}
/**
 * Calculate output length with padding and bit length
 */


function getOutputLength(inputLength8) {
  return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;
}
/*
 * Calculate the MD5 of an array of little-endian words, and a bit length.
 */


function wordsToMd5(x, len) {
  /* append padding */
  x[len >> 5] |= 0x80 << len % 32;
  x[getOutputLength(len) - 1] = len;
  let a = 1732584193;
  let b = -271733879;
  let c = -1732584194;
  let d = 271733878;

  for (let i = 0; i < x.length; i += 16) {
    const olda = a;
    const oldb = b;
    const oldc = c;
    const oldd = d;
    a = md5ff(a, b, c, d, x[i], 7, -680876936);
    d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);
    c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);
    b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);
    a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);
    d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);
    c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);
    b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);
    a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);
    d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);
    c = md5ff(c, d, a, b, x[i + 10], 17, -42063);
    b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);
    a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);
    d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);
    c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);
    b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);
    a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);
    d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);
    c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);
    b = md5gg(b, c, d, a, x[i], 20, -373897302);
    a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);
    d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);
    c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);
    b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);
    a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);
    d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);
    c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);
    b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);
    a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);
    d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);
    c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);
    b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);
    a = md5hh(a, b, c, d, x[i + 5], 4, -378558);
    d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);
    c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);
    b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);
    a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);
    d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);
    c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);
    b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);
    a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);
    d = md5hh(d, a, b, c, x[i], 11, -358537222);
    c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);
    b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);
    a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);
    d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);
    c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);
    b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);
    a = md5ii(a, b, c, d, x[i], 6, -198630844);
    d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);
    c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);
    b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);
    a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);
    d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);
    c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);
    b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);
    a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);
    d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);
    c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);
    b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);
    a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);
    d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);
    c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);
    b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);
    a = safeAdd(a, olda);
    b = safeAdd(b, oldb);
    c = safeAdd(c, oldc);
    d = safeAdd(d, oldd);
  }

  return [a, b, c, d];
}
/*
 * Convert an array bytes to an array of little-endian words
 * Characters >255 have their high-byte silently ignored.
 */


function bytesToWords(input) {
  if (input.length === 0) {
    return [];
  }

  const length8 = input.length * 8;
  const output = new Uint32Array(getOutputLength(length8));

  for (let i = 0; i < length8; i += 8) {
    output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;
  }

  return output;
}
/*
 * Add integers, wrapping at 2^32. This uses 16-bit operations internally
 * to work around bugs in some JS interpreters.
 */


function safeAdd(x, y) {
  const lsw = (x & 0xffff) + (y & 0xffff);
  const msw = (x >> 16) + (y >> 16) + (lsw >> 16);
  return msw << 16 | lsw & 0xffff;
}
/*
 * Bitwise rotate a 32-bit number to the left.
 */


function bitRotateLeft(num, cnt) {
  return num << cnt | num >>> 32 - cnt;
}
/*
 * These functions implement the four basic operations the algorithm uses.
 */


function md5cmn(q, a, b, x, s, t) {
  return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
}

function md5ff(a, b, c, d, x, s, t) {
  return md5cmn(b & c | ~b & d, a, b, x, s, t);
}

function md5gg(a, b, c, d, x, s, t) {
  return md5cmn(b & d | c & ~d, a, b, x, s, t);
}

function md5hh(a, b, c, d, x, s, t) {
  return md5cmn(b ^ c ^ d, a, b, x, s, t);
}

function md5ii(a, b, c, d, x, s, t) {
  return md5cmn(c ^ (b | ~d), a, b, x, s, t);
}

var _default = md5;
exports.default = _default;
});

var v3_1 = createCommonjsModule(function (module, exports) {

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _v = _interopRequireDefault(v35);

var _md = _interopRequireDefault(md5Browser);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

const v3 = (0, _v.default)('v3', 0x30, _md.default);
var _default = v3;
exports.default = _default;
});

var v4_1 = createCommonjsModule(function (module, exports) {

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _rng = _interopRequireDefault(rngBrowser);

var _stringify = _interopRequireDefault(stringify_1);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function v4(options, buf, offset) {
  options = options || {};

  const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`


  rnds[6] = rnds[6] & 0x0f | 0x40;
  rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided

  if (buf) {
    offset = offset || 0;

    for (let i = 0; i < 16; ++i) {
      buf[offset + i] = rnds[i];
    }

    return buf;
  }

  return (0, _stringify.default)(rnds);
}

var _default = v4;
exports.default = _default;
});

var sha1Browser = createCommonjsModule(function (module, exports) {

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

// Adapted from Chris Veness' SHA1 code at
// http://www.movable-type.co.uk/scripts/sha1.html
function f(s, x, y, z) {
  switch (s) {
    case 0:
      return x & y ^ ~x & z;

    case 1:
      return x ^ y ^ z;

    case 2:
      return x & y ^ x & z ^ y & z;

    case 3:
      return x ^ y ^ z;
  }
}

function ROTL(x, n) {
  return x << n | x >>> 32 - n;
}

function sha1(bytes) {
  const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];
  const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];

  if (typeof bytes === 'string') {
    const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape

    bytes = [];

    for (let i = 0; i < msg.length; ++i) {
      bytes.push(msg.charCodeAt(i));
    }
  } else if (!Array.isArray(bytes)) {
    // Convert Array-like to Array
    bytes = Array.prototype.slice.call(bytes);
  }

  bytes.push(0x80);
  const l = bytes.length / 4 + 2;
  const N = Math.ceil(l / 16);
  const M = new Array(N);

  for (let i = 0; i < N; ++i) {
    const arr = new Uint32Array(16);

    for (let j = 0; j < 16; ++j) {
      arr[j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3];
    }

    M[i] = arr;
  }

  M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);
  M[N - 1][14] = Math.floor(M[N - 1][14]);
  M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;

  for (let i = 0; i < N; ++i) {
    const W = new Uint32Array(80);

    for (let t = 0; t < 16; ++t) {
      W[t] = M[i][t];
    }

    for (let t = 16; t < 80; ++t) {
      W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1);
    }

    let a = H[0];
    let b = H[1];
    let c = H[2];
    let d = H[3];
    let e = H[4];

    for (let t = 0; t < 80; ++t) {
      const s = Math.floor(t / 20);
      const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0;
      e = d;
      d = c;
      c = ROTL(b, 30) >>> 0;
      b = a;
      a = T;
    }

    H[0] = H[0] + a >>> 0;
    H[1] = H[1] + b >>> 0;
    H[2] = H[2] + c >>> 0;
    H[3] = H[3] + d >>> 0;
    H[4] = H[4] + e >>> 0;
  }

  return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];
}

var _default = sha1;
exports.default = _default;
});

var v5_1 = createCommonjsModule(function (module, exports) {

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _v = _interopRequireDefault(v35);

var _sha = _interopRequireDefault(sha1Browser);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

const v5 = (0, _v.default)('v5', 0x50, _sha.default);
var _default = v5;
exports.default = _default;
});

var nil = createCommonjsModule(function (module, exports) {

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _default = '00000000-0000-0000-0000-000000000000';
exports.default = _default;
});

var version_1 = createCommonjsModule(function (module, exports) {

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _validate = _interopRequireDefault(validate_1);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function version(uuid) {
  if (!(0, _validate.default)(uuid)) {
    throw TypeError('Invalid UUID');
  }

  return parseInt(uuid.substr(14, 1), 16);
}

var _default = version;
exports.default = _default;
});

var dist$1 = createCommonjsModule(function (module, exports) {

Object.defineProperty(exports, "__esModule", {
  value: true
});
Object.defineProperty(exports, "v1", {
  enumerable: true,
  get: function () {
    return _v.default;
  }
});
Object.defineProperty(exports, "v3", {
  enumerable: true,
  get: function () {
    return _v2.default;
  }
});
Object.defineProperty(exports, "v4", {
  enumerable: true,
  get: function () {
    return _v3.default;
  }
});
Object.defineProperty(exports, "v5", {
  enumerable: true,
  get: function () {
    return _v4.default;
  }
});
Object.defineProperty(exports, "NIL", {
  enumerable: true,
  get: function () {
    return _nil.default;
  }
});
Object.defineProperty(exports, "version", {
  enumerable: true,
  get: function () {
    return _version.default;
  }
});
Object.defineProperty(exports, "validate", {
  enumerable: true,
  get: function () {
    return _validate.default;
  }
});
Object.defineProperty(exports, "stringify", {
  enumerable: true,
  get: function () {
    return _stringify.default;
  }
});
Object.defineProperty(exports, "parse", {
  enumerable: true,
  get: function () {
    return _parse.default;
  }
});

var _v = _interopRequireDefault(v1_1);

var _v2 = _interopRequireDefault(v3_1);

var _v3 = _interopRequireDefault(v4_1);

var _v4 = _interopRequireDefault(v5_1);

var _nil = _interopRequireDefault(nil);

var _version = _interopRequireDefault(version_1);

var _validate = _interopRequireDefault(validate_1);

var _stringify = _interopRequireDefault(stringify_1);

var _parse = _interopRequireDefault(parse_1);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
});

var slice_layout = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.DEFAULT_SLICE_LAYOUT = exports.SLICE_LAYOUT_FLAT_DEFAULTS = exports.SLICE_LAYOUT_FIT_CONTENT_DEFAULTS = exports.SLICE_LAYOUT_FIXED_DEFAULTS = exports.SLICE_LAYOUT_BASE_DEFAULTS = void 0;
exports.SLICE_LAYOUT_BASE_DEFAULTS = Object.freeze({
    padding: 3,
    rowSpacing: 0,
    minDepth: 0,
    // A realistic bound to avoid tracks with unlimited height. If somebody wants
    // extremely deep tracks they need to change this explicitly.
    maxDepth: 128,
});
exports.SLICE_LAYOUT_FIXED_DEFAULTS = Object.freeze(Object.assign(Object.assign({}, exports.SLICE_LAYOUT_BASE_DEFAULTS), { heightMode: 'FIXED', fixedHeight: 30 }));
exports.SLICE_LAYOUT_FIT_CONTENT_DEFAULTS = Object.freeze(Object.assign(Object.assign({}, exports.SLICE_LAYOUT_BASE_DEFAULTS), { heightMode: 'FIT_CONTENT', sliceHeight: 18 }));
exports.SLICE_LAYOUT_FLAT_DEFAULTS = Object.freeze(Object.assign(Object.assign({}, exports.SLICE_LAYOUT_BASE_DEFAULTS), { minDepth: 0, maxDepth: 1, heightMode: 'FIXED', fixedHeight: 30 }));
exports.DEFAULT_SLICE_LAYOUT = exports.SLICE_LAYOUT_FIT_CONTENT_DEFAULTS;

});

var base_slice_track = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseSliceTrack = exports.BASE_SLICE_ROW = exports.filterVisibleSlicesForTesting = exports.SLICE_FLAGS_INSTANT = exports.SLICE_FLAGS_INCOMPLETE = void 0;











// The common class that underpins all tracks drawing slices.
exports.SLICE_FLAGS_INCOMPLETE = 1;
exports.SLICE_FLAGS_INSTANT = 2;
// Slices smaller than this don't get any text:
const SLICE_MIN_WIDTH_FOR_TEXT_PX = 5;
// Slices smaller than this aren't rendered at all.
const SLICE_MIN_WIDTH_PX = 0.1;
const CHEVRON_WIDTH_PX = 10;
const DEFAULT_SLICE_COLOR = colorizer.GRAY_COLOR;
// TODO(hjd): Implement caching.
// Exposed and standalone to allow for testing without making this
// visible to subclasses.
function filterVisibleSlices(slices, startS, endS) {
    // Here we aim to reduce the number of slices we have to draw
    // by ignoring those that are not visible. A slice is visible iff:
    //   slice.start + slice.duration >= start && slice.start <= end
    // It's allowable to include slices which aren't visible but we
    // must not exclude visible slices.
    // We could filter this.slices using this condition but since most
    // often we should have the case where there are:
    // - First a bunch of non-visible slices to the left of the viewport
    // - Then a bunch of visible slices within the viewport
    // - Finally a second bunch of non-visible slices to the right of the
    //   viewport.
    // It seems more sensible to identify the left-most and right-most
    // visible slices then 'slice' to select these slices and everything
    // between.
    // We do not need to handle non-ending slices (where dur = -1
    // but the slice is drawn as 'infinite' length) as this is handled
    // by a special code path.
    // TODO(hjd): Implement special code path.
    // While the slices are guaranteed to be ordered by timestamp we must
    // consider async slices (which are not perfectly nested). This is to
    // say if we see slice A then B it is guaranteed the A.start <= B.start
    // but there is no guarantee that (A.end < B.start XOR A.end >= B.end).
    // Due to this is not possible to use binary search to find the first
    // visible slice. Consider the following situation:
    //         start V            V end
    //     AAA  CCC       DDD   EEEEEEE
    //      BBBBBBBBBBBB            GGG
    //                           FFFFFFF
    // B is visible but A and C are not. In general there could be
    // arbitrarily many slices between B and D which are not visible.
    // You could binary search to find D (i.e. the first slice which
    // starts after |start|) then work backwards to find B.
    // The last visible slice is simpler, since the slices are sorted
    // by timestamp you can binary search for the last slice such
    // that slice.start <= end.
    // One specific edge case that will come up often is when:
    // For all slice in slices: slice.startS > endS (e.g. all slices are to the
    // right). Since the slices are sorted by startS we can check this easily:
    const maybeFirstSlice = slices[0];
    if (maybeFirstSlice && maybeFirstSlice.startS > endS) {
        return [];
    }
    // It's not possible to easily check the analogous edge case where all slices
    // are to the left:
    // For all slice in slices: slice.startS + slice.durationS < startS
    // as the slices are not ordered by 'endS'.
    // As described above you could do some clever binary search combined with
    // iteration however that seems quite complicated and error prone so instead
    // the idea of the code below is that we iterate forward though the
    // array incrementing startIdx until we find the first visible slice
    // then backwards through the array decrementing endIdx until we find the
    // last visible slice. In the worst case we end up doing one full pass on
    // the array. This code is robust to slices not being sorted.
    let startIdx = 0;
    let endIdx = slices.length;
    for (; startIdx < endIdx; ++startIdx) {
        const slice = slices[startIdx];
        const sliceEndS = slice.startS + slice.durationS;
        if (sliceEndS >= startS && slice.startS <= endS) {
            break;
        }
    }
    for (; startIdx < endIdx; --endIdx) {
        const slice = slices[endIdx - 1];
        const sliceEndS = slice.startS + slice.durationS;
        if (sliceEndS >= startS && slice.startS <= endS) {
            break;
        }
    }
    return slices.slice(startIdx, endIdx);
}
exports.filterVisibleSlicesForTesting = filterVisibleSlices;
// The minimal set of columns that any table/view must expose to render tracks.
// Note: this class assumes that, at the SQL level, slices are:
// - Not temporally overlapping (unless they are nested at inner depth).
// - Strictly stacked (i.e. a slice at depth N+1 cannot be larger than any
//   slices at depth 0..N.
// If you need temporally overlapping slices, look at AsyncSliceTrack, which
// merges several tracks into one visual track.
exports.BASE_SLICE_ROW = {
    id: query_result.NUM,
    tsq: query_result.NUM,
    ts: query_result.NUM,
    dur: query_result.NUM,
    depth: query_result.NUM, // Vertical depth.
};
class BaseSliceTrack extends track.Track {
    constructor(args) {
        super(args);
        // This is the slice cache.
        this.slices = new Array();
        this.sliceLayout = Object.assign({}, slice_layout.DEFAULT_SLICE_LAYOUT);
        // These are the over-skirted cached bounds.
        this.slicesStartNs = -1;
        this.slicesEndNs = -1;
        this.slicesBucketNs = -1;
        this.maxDurNs = 0;
        this.sqlState = 'UNINITIALIZED';
        this.charWidth = -1;
        this.hoverTooltip = [];
        this.maxDataDepth = 0;
        // Computed layout.
        this.computedTrackHeight = 0;
        this.computedSliceHeight = 0;
        this.computedRowSpacing = 0;
        // True if this track (and any views tables it might have created) has been
        // destroyed. This is unfortunately error prone (since we must manually check
        // this between each query).
        // TODO(hjd): Replace once we have cancellable query sequences.
        this.isDestroyed = false;
        // TODO(hjd): Remove when updating selection.
        // We shouldn't know here about CHROME_SLICE. Maybe should be set by
        // whatever deals with that. Dunno the namespace of selection is weird. For
        // most cases in non-ambiguous (because most things are a 'slice'). But some
        // others (e.g. THREAD_SLICE) have their own ID namespace so we need this.
        this.selectionKinds = ['SLICE', 'CHROME_SLICE'];
        this.frontendOnly = true; // Disable auto checkerboarding.
        this.tableName = `track_${this.trackId}`.replace(/[^a-zA-Z0-9_]+/g, '_');
        // Work out the extra columns.
        // This is the union of the embedder-defined columns and the base columns
        // we know about (ts, dur, ...).
        const allCols = Object.keys(this.getRowSpec());
        const baseCols = Object.keys(exports.BASE_SLICE_ROW);
        this.extraSqlColumns = allCols.filter((key) => !baseCols.includes(key));
    }
    getRowSpec() {
        return exports.BASE_SLICE_ROW;
    }
    onSliceOver(_args) { }
    onSliceOut(_args) { }
    onSliceClick(_args) { }
    prepareSlices(slices) {
        this.highlightHovererdAndSameTitle(slices);
    }
    // TODO(hjd): Remove.
    drawSchedLatencyArrow(_, _selectedSlice) { }
    setSliceLayout(sliceLayout) {
        if (sliceLayout.minDepth > sliceLayout.maxDepth) {
            const { maxDepth, minDepth } = sliceLayout;
            throw new Error(`minDepth ${minDepth} must be <= maxDepth ${maxDepth}`);
        }
        this.sliceLayout = sliceLayout;
    }
    onFullRedraw() {
        // TODO(hjd): Call this only when cache changes. See discussion:
        // What we want to do here is give the Impl a chance to colour the slice,
        // e.g. depending on the currently selected thread or process.
        // Here's an interesting thought. We have two options here:
        //   A) We could pass only the vizSlices, but then we'd have to call this
        //      @ 60FPS (because vizSlices changes as we pan).
        //   B) We could call this only on full redraws (when the state changes),
        //      but then the track needs to process *all* cached slices, not just
        //      the visible ones. It's okay now (it's a 2x factor) but might get
        //      worse if we cache several layers of slices at various resolutions.
        // But there's an escape, I think. I think the right thing to do is:
        // - For now call it on the full slices, but only on full redraws.
        // - When we get caching, call it every time we switch "cached quantization
        //  level", which is a way in the middle between 60FPS and full redraws..
        // Overall the API contract of this prepareSlices() call is:
        //  - I am going to draw these slices in the near future.
        //  - I am not going to draw any slice that I haven't passed here first.
        //  - This is guaranteed to be called at least on every state change.
        //  - This is NOT guaranteed to be called on every frame. For instance you
        //    cannot use this to do some colour-based animation.
        // Give a chance to the embedder to change colors and other stuff.
        this.prepareSlices(this.slices);
    }
    renderCanvas(ctx) {
        // TODO(hjd): fonts and colors should come from the CSS and not hardcoded
        // here.
        const { timeScale } = globals.globals.frontendLocalState;
        const vizTime = globals.globals.frontendLocalState.visibleWindowTime;
        // If the visible time range is outside the cached area, requests
        // asynchronously new data from the SQL engine.
        this.maybeRequestData();
        // In any case, draw whatever we have (which might be stale/incomplete).
        // If the cached trace slices don't fully cover the visible time range,
        // show a gray rectangle with a "Loading..." label.
        (0, checkerboard_1.checkerboardExcept)(ctx, this.getHeight(), timeScale.timeToPx(vizTime.start), timeScale.timeToPx(vizTime.end), timeScale.timeToPx((0, time.fromNs)(this.slicesStartNs)), timeScale.timeToPx((0, time.fromNs)(this.slicesEndNs)));
        let charWidth = this.charWidth;
        if (charWidth < 0) {
            // TODO(hjd): Centralize font measurement/invalidation.
            ctx.font = '12px Roboto Condensed';
            charWidth = this.charWidth = ctx.measureText('dbpqaouk').width / 8;
        }
        // Filter only the visible slices. |this.slices| will have more slices than
        // needed because maybeRequestData() over-fetches to handle small pan/zooms.
        // We don't want to waste time drawing slices that are off screen.
        const vizSlices = this.getVisibleSlicesInternal(vizTime.start, vizTime.end);
        let selection = globals.globals.state.currentSelection;
        if (!selection || !this.selectionKinds.includes(selection.kind)) {
            selection = null;
        }
        // Believe it or not, doing 4xO(N) passes is ~2x faster than trying to draw
        // everything in one go. The key is that state changes operations on the
        // canvas (e.g., color, fonts) dominate any number crunching we do in JS.
        this.updateSliceAndTrackHeight();
        const sliceHeight = this.computedSliceHeight;
        const padding = this.sliceLayout.padding;
        const rowSpacing = this.computedRowSpacing;
        // First pass: compute geometry of slices.
        let selSlice;
        // pxEnd is the last visible pixel in the visible viewport. Drawing
        // anything < 0 or > pxEnd doesn't produce any visible effect as it goes
        // beyond the visible portion of the canvas.
        const pxEnd = Math.floor(timeScale.timeToPx(vizTime.end));
        for (const slice of vizSlices) {
            // Compute the basic geometry for any visible slice, even if only
            // partially visible. This might end up with a negative x if the
            // slice starts before the visible time or with a width that overflows
            // pxEnd.
            slice.x = timeScale.timeToPx(slice.startS);
            slice.w = timeScale.deltaTimeToPx(slice.durationS);
            if (slice.flags & exports.SLICE_FLAGS_INSTANT) {
                // In the case of an instant slice, set the slice geometry on the
                // bounding box that will contain the chevron.
                slice.x -= CHEVRON_WIDTH_PX / 2;
                slice.w = CHEVRON_WIDTH_PX;
            }
            else {
                // If the slice is an actual slice, intersect the slice geometry with
                // the visible viewport (this affects only the first and last slice).
                // This is so that text is always centered even if we are zoomed in.
                // Visually if we have
                //                   [    visible viewport   ]
                //  [         slice         ]
                // The resulting geometry will be:
                //                   [slice]
                // So that the slice title stays within the visible region.
                const sliceVizLimit = Math.min(slice.x + slice.w, pxEnd);
                slice.x = Math.max(slice.x, 0);
                slice.w = sliceVizLimit - slice.x;
            }
            if (selection && selection.id === slice.id) {
                selSlice = slice;
            }
        }
        // Second pass: fill slices by color.
        // The .slice() turned out to be an unintended pun.
        const vizSlicesByColor = vizSlices.slice();
        vizSlicesByColor.sort((a, b) => (0, colorizer.colorCompare)(a.color, b.color));
        let lastColor = undefined;
        for (const slice of vizSlicesByColor) {
            if (slice.color !== lastColor) {
                lastColor = slice.color;
                ctx.fillStyle = (0, colorizer.colorToStr)(slice.color);
            }
            const y = padding + slice.depth * (sliceHeight + rowSpacing);
            if (slice.flags & exports.SLICE_FLAGS_INSTANT) {
                this.drawChevron(ctx, slice.x, y, sliceHeight);
            }
            else if (slice.flags & exports.SLICE_FLAGS_INCOMPLETE) {
                const w = Math.max(slice.w - 2, 2);
                (0, canvas_utils.drawIncompleteSlice)(ctx, slice.x, y, w, sliceHeight);
            }
            else if (slice.w > SLICE_MIN_WIDTH_PX) {
                ctx.fillRect(slice.x, y, slice.w, sliceHeight);
            }
        }
        // Third pass, draw the titles (e.g., process name for sched slices).
        ctx.fillStyle = '#fff';
        ctx.textAlign = 'center';
        ctx.font = '12px Roboto Condensed';
        ctx.textBaseline = 'middle';
        for (const slice of vizSlices) {
            if ((slice.flags & exports.SLICE_FLAGS_INSTANT) || !slice.title ||
                slice.w < SLICE_MIN_WIDTH_FOR_TEXT_PX) {
                continue;
            }
            const title = (0, canvas_utils.cropText)(slice.title, charWidth, slice.w);
            const rectXCenter = slice.x + slice.w / 2;
            const y = padding + slice.depth * (sliceHeight + rowSpacing);
            const yDiv = slice.subTitle ? 3 : 2;
            const yMidPoint = Math.floor(y + sliceHeight / yDiv) - 0.5;
            ctx.fillText(title, rectXCenter, yMidPoint);
        }
        // Fourth pass, draw the subtitles (e.g., thread name for sched slices).
        ctx.fillStyle = 'rgba(255, 255, 255, 0.6)';
        ctx.font = '10px Roboto Condensed';
        for (const slice of vizSlices) {
            if (slice.w < SLICE_MIN_WIDTH_FOR_TEXT_PX || !slice.subTitle ||
                (slice.flags & exports.SLICE_FLAGS_INSTANT)) {
                continue;
            }
            const rectXCenter = slice.x + slice.w / 2;
            const subTitle = (0, canvas_utils.cropText)(slice.subTitle, charWidth, slice.w);
            const y = padding + slice.depth * (sliceHeight + rowSpacing);
            const yMidPoint = Math.ceil(y + sliceHeight * 2 / 3) + 1.5;
            ctx.fillText(subTitle, rectXCenter, yMidPoint);
        }
        // Draw a thicker border around the selected slice (or chevron).
        if (selSlice !== undefined) {
            const color = selSlice.color;
            const y = padding + selSlice.depth * (sliceHeight + rowSpacing);
            ctx.strokeStyle = `hsl(${color.h}, ${color.s}%, 30%)`;
            ctx.beginPath();
            const THICKNESS = 3;
            ctx.lineWidth = THICKNESS;
            ctx.strokeRect(selSlice.x, y - THICKNESS / 2, selSlice.w, sliceHeight + THICKNESS);
            ctx.closePath();
        }
        // TODO(hjd): Remove this.
        // The only thing this does is drawing the sched latency arrow. We should
        // have some abstraction for that arrow (ideally the same we'd use for
        // flows).
        this.drawSchedLatencyArrow(ctx, selSlice);
        // If a slice is hovered, draw the tooltip.
        const tooltip = this.hoverTooltip;
        if (this.hoveredSlice !== undefined && tooltip.length > 0 &&
            this.hoverPos !== undefined) {
            if (tooltip.length === 1) {
                this.drawTrackHoverTooltip(ctx, this.hoverPos, tooltip[0]);
            }
            else {
                this.drawTrackHoverTooltip(ctx, this.hoverPos, tooltip[0], tooltip[1]);
            }
        } // if (howSlice)
    }
    onDestroy() {
        super.onDestroy();
        this.isDestroyed = true;
        this.engine.query(`DROP VIEW IF EXISTS ${this.tableName}`);
    }
    // This method figures out if the visible window is outside the bounds of
    // the cached data and if so issues new queries (i.e. sorta subsumes the
    // onBoundsChange).
    maybeRequestData() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            // Important: this method is async and is invoked on every frame. Care
            // must be taken to avoid piling up queries on every frame, hence the FSM.
            if (this.sqlState === 'UNINITIALIZED') {
                this.sqlState = 'INITIALIZING';
                if (this.isDestroyed) {
                    return;
                }
                yield this.initSqlTable(this.tableName);
                if (this.isDestroyed) {
                    return;
                }
                const queryRes = yield this.engine.query(`select
          ifnull(max(dur), 0) as maxDur, count(1) as rowCount
          from ${this.tableName}`);
                const row = queryRes.firstRow({ maxDur: query_result.NUM, rowCount: query_result.NUM });
                this.maxDurNs = row.maxDur;
                this.sqlState = 'QUERY_DONE';
            }
            else if (this.sqlState === 'INITIALIZING' || this.sqlState === 'QUERY_PENDING') {
                return;
            }
            const resolutionNs = (0, time.toNs)(globals.globals.getCurResolution());
            const vizTime = globals.globals.frontendLocalState.visibleWindowTime;
            const startNs = (0, time.toNs)(vizTime.start);
            const endNs = (0, time.toNs)(vizTime.end);
            // TODO(hjd): figure out / centralize the resolution steps.
            // Will handle this at the same time as cacheing.
            const bucketNs = resolutionNs;
            if (startNs >= this.slicesStartNs && endNs <= this.slicesEndNs &&
                bucketNs === this.slicesBucketNs) {
                return; // We have the data already, no need to re-query
            }
            this.sqlState = 'QUERY_PENDING';
            const queryTsq = `(ts + ${bucketNs / 2}) / ${bucketNs} * ${bucketNs}`;
            const extraCols = this.extraSqlColumns.join(',');
            let depthCol = 'depth';
            let maybeGroupByDepth = 'depth, ';
            const layout = this.sliceLayout;
            const isFlat = (layout.maxDepth - layout.minDepth) <= 1;
            // maxDepth === minDepth only makes sense if track is empty which on the
            // one hand isn't very useful (and so maybe should be an error) on the
            // other hand I can see it happening if someone does:
            // minDepth = min(slices.depth); maxDepth = max(slices.depth);
            // and slices is empty, so we treat that as flat.
            if (isFlat) {
                depthCol = `${this.sliceLayout.minDepth} as depth`;
                maybeGroupByDepth = '';
            }
            // TODO(hjd): Re-reason and improve this query:
            // - Materialize the unfinished slices one off.
            // - Avoid the union if we know we don't have any -1 slices.
            // - Maybe we don't need the union at all and can deal in TS?
            if (this.isDestroyed) {
                return;
            }
            const queryRes = yield this.engine.query(`
    with q1 as (
      select
        ${queryTsq} as tsq,
        ts,
        max(dur) as dur,
        id,
        ${depthCol}
        ${extraCols ? ',' + extraCols : ''}
      from ${this.tableName}
      where
        ts >= ${startNs - this.maxDurNs /* - durNs */} and
        ts <= ${endNs /* + durNs */}
      group by ${maybeGroupByDepth} tsq
      order by tsq),
    q2 as (
      select
        ${queryTsq} as tsq,
        ts,
        -1 as dur,
        id,
        ${depthCol}
        ${extraCols ? ',' + extraCols : ''}
      from ${this.tableName}
      where dur = -1
      group by ${maybeGroupByDepth} tsq
      )
      select min(dur) as _unused, * from
      (select * from q1 union all select * from q2)
      group by ${maybeGroupByDepth} tsq
      order by tsq
    `);
            this.convertQueryResultToSlices(queryRes, startNs, endNs, bucketNs);
            this.sqlState = 'QUERY_DONE';
            globals.globals.rafScheduler.scheduleRedraw();
        });
    }
    // Here convert each row to a Slice. We do what we can do generically
    // in the base class, and delegate the rest to the impl via that rowToSlice()
    // abstract call.
    convertQueryResultToSlices(queryRes, startNs, endNs, bucketNs) {
        const slices = new Array(queryRes.numRows());
        const it = queryRes.iter(this.getRowSpec());
        let maxDataDepth = this.maxDataDepth;
        this.slicesStartNs = startNs;
        this.slicesEndNs = endNs;
        this.slicesBucketNs = bucketNs;
        for (let i = 0; it.valid(); it.next(), ++i) {
            maxDataDepth = Math.max(maxDataDepth, it.depth);
            // Construct the base slice. The Impl will construct and return the full
            // derived T["slice"] (e.g. CpuSlice) in the rowToSlice() method.
            slices[i] = this.rowToSliceInternal(it);
        }
        this.maxDataDepth = maxDataDepth;
        this.slices = slices;
    }
    rowToSliceInternal(row) {
        const slice = this.rowToSlice(row);
        slice.x = -1;
        slice.w = -1;
        return slice;
    }
    rowToSlice(row) {
        const startNsQ = row.tsq;
        const startNs = row.ts;
        let flags = 0;
        let durNs;
        if (row.dur === -1) {
            durNs = (0, time.toNs)(globals.globals.state.traceTime.endSec) - startNs;
            flags |= exports.SLICE_FLAGS_INCOMPLETE;
        }
        else {
            flags |= (row.dur === 0) ? exports.SLICE_FLAGS_INSTANT : 0;
            durNs = row.dur;
        }
        const endNs = startNs + durNs;
        const bucketNs = this.slicesBucketNs;
        let endNsQ = Math.floor((endNs + bucketNs / 2 - 1) / bucketNs) * bucketNs;
        endNsQ = Math.max(endNsQ, startNsQ + bucketNs);
        return {
            id: row.id,
            startS: (0, time.fromNs)(startNsQ),
            durationS: (0, time.fromNs)(endNsQ - startNsQ),
            flags,
            depth: row.depth,
            title: '',
            subTitle: '',
            // The derived class doesn't need to initialize these. They are
            // rewritten on every renderCanvas() call. We just need to initialize
            // them to something.
            baseColor: DEFAULT_SLICE_COLOR,
            color: DEFAULT_SLICE_COLOR,
        };
    }
    findSlice({ x, y }) {
        const trackHeight = this.computedTrackHeight;
        const sliceHeight = this.computedSliceHeight;
        const padding = this.sliceLayout.padding;
        const rowSpacing = this.computedRowSpacing;
        // Need at least a draw pass to resolve the slice layout.
        if (sliceHeight === 0) {
            return undefined;
        }
        if (y >= padding && y <= trackHeight - padding) {
            const depth = Math.floor((y - padding) / (sliceHeight + rowSpacing));
            for (const slice of this.slices) {
                if (slice.depth === depth && slice.x <= x && x <= slice.x + slice.w) {
                    return slice;
                }
            }
        }
        return undefined;
    }
    onMouseMove(position) {
        this.hoverPos = position;
        this.updateHoveredSlice(this.findSlice(position));
    }
    onMouseOut() {
        this.updateHoveredSlice(undefined);
    }
    updateHoveredSlice(slice) {
        const lastHoveredSlice = this.hoveredSlice;
        this.hoveredSlice = slice;
        // Only notify the Impl if the hovered slice changes:
        if (slice === lastHoveredSlice)
            return;
        if (this.hoveredSlice === undefined) {
            globals.globals.dispatch(actions.Actions.setHighlightedSliceId({ sliceId: -1 }));
            this.onSliceOut({ slice: (0, logging.assertExists)(lastHoveredSlice) });
            this.hoverTooltip = [];
            this.hoverPos = undefined;
        }
        else {
            const args = { slice: this.hoveredSlice };
            globals.globals.dispatch(actions.Actions.setHighlightedSliceId({ sliceId: this.hoveredSlice.id }));
            this.onSliceOver(args);
            this.hoverTooltip = args.tooltip || [];
        }
    }
    onMouseClick(position) {
        const slice = this.findSlice(position);
        if (slice === undefined) {
            return false;
        }
        const args = { slice };
        this.onSliceClick(args);
        return true;
    }
    getVisibleSlicesInternal(startS, endS) {
        return filterVisibleSlices(this.slices, startS, endS);
    }
    updateSliceAndTrackHeight() {
        const lay = this.sliceLayout;
        const rows = Math.min(Math.max(this.maxDataDepth + 1, lay.minDepth), lay.maxDepth);
        // Compute the track height.
        let trackHeight;
        if (lay.heightMode === 'FIXED') {
            trackHeight = lay.fixedHeight;
        }
        else {
            trackHeight = 2 * lay.padding + rows * (lay.sliceHeight + lay.rowSpacing);
        }
        // Compute the slice height.
        let sliceHeight;
        let rowSpacing = lay.rowSpacing;
        if (lay.heightMode === 'FIXED') {
            const rowHeight = (trackHeight - 2 * lay.padding) / rows;
            sliceHeight = Math.floor(Math.max(rowHeight - lay.rowSpacing, 0.5));
            rowSpacing = Math.max(lay.rowSpacing, rowHeight - sliceHeight);
            rowSpacing = Math.floor(rowSpacing * 2) / 2;
        }
        else {
            sliceHeight = lay.sliceHeight;
        }
        this.computedSliceHeight = sliceHeight;
        this.computedTrackHeight = trackHeight;
        this.computedRowSpacing = rowSpacing;
    }
    drawChevron(ctx, x, y, h) {
        // Draw an upward facing chevrons, in order: A, B, C, D, and back to A.
        // . (x, y)
        //      A
        //     ###
        //    ##C##
        //   ##   ##
        //  D       B
        //            . (x + CHEVRON_WIDTH_PX, y + h)
        const HALF_CHEVRON_WIDTH_PX = CHEVRON_WIDTH_PX / 2;
        const midX = x + HALF_CHEVRON_WIDTH_PX;
        ctx.beginPath();
        ctx.moveTo(midX, y); // A.
        ctx.lineTo(x + CHEVRON_WIDTH_PX, y + h); // B.
        ctx.lineTo(midX, y + h - HALF_CHEVRON_WIDTH_PX); // C.
        ctx.lineTo(x, y + h); // D.
        ctx.lineTo(midX, y); // Back to A.
        ctx.closePath();
        ctx.fill();
    }
    // This is a good default implemenation for highlighting slices. By default
    // prepareSlices() calls this. However, if the XxxSliceTrack impl overrides
    // prepareSlices() this gives them a chance to call the highlighting witout
    // having to reimplement it.
    highlightHovererdAndSameTitle(slices) {
        for (const slice of slices) {
            const isHovering = globals.globals.state.highlightedSliceId === slice.id ||
                (this.hoveredSlice && this.hoveredSlice.title === slice.title);
            if (isHovering) {
                slice.color = {
                    c: slice.baseColor.c,
                    h: slice.baseColor.h,
                    s: slice.baseColor.s,
                    l: 30,
                };
            }
            else {
                slice.color = slice.baseColor;
            }
        }
    }
    getHeight() {
        this.updateSliceAndTrackHeight();
        return this.computedTrackHeight;
    }
    getSliceRect(_tStart, _tEnd, _depth) {
        // TODO(hjd): Implement this as part of updating flow events.
        return undefined;
    }
}
exports.BaseSliceTrack = BaseSliceTrack;

});

var named_slice_track = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.NamedSliceTrack = exports.NAMED_SLICE_ROW = void 0;





exports.NAMED_SLICE_ROW = Object.assign(Object.assign({}, base_slice_track.BASE_SLICE_ROW), { 
    // Impl-specific columns.
    name: query_result.STR_NULL });
class NamedSliceTrack extends base_slice_track.BaseSliceTrack {
    constructor(args) {
        super(args);
    }
    // This is used by the base class to call iter().
    getRowSpec() {
        return exports.NAMED_SLICE_ROW;
    }
    // Converts a SQL result row to an "Impl" Slice.
    rowToSlice(row) {
        const baseSlice = super.rowToSlice(row);
        // Ignore PIDs or numeric arguments when hashing.
        const name = row.name || '';
        const nameForHashing = name.replace(/\s?\d+/g, '');
        const hsl = (0, colorizer.hslForSlice)(nameForHashing, /* isSelected=*/ false);
        // We cache the color so we hash only once per query.
        const baseColor = { c: '', h: hsl[0], s: hsl[1], l: hsl[2] };
        return Object.assign(Object.assign({}, baseSlice), { title: name, baseColor });
    }
    onSliceOver(args) {
        const name = args.slice.title;
        args.tooltip = [name];
    }
    onSliceClick(args) {
        globals.globals.makeSelection(actions.Actions.selectChromeSlice({
            id: args.slice.id,
            trackId: this.trackId,
            // |table| here can be either 'slice' or 'annotation'. The
            // AnnotationSliceTrack overrides the onSliceClick and sets this to
            // 'annotation'
            table: 'slice',
        }));
    }
}
exports.NamedSliceTrack = NamedSliceTrack;

});

var chrome_scroll_jank = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.plugin = exports.decideTracks = void 0;








const ENABLE_CHROME_SCROLL_JANK_PLUGIN = feature_flags.featureFlags.register({
    id: 'enableChromeScrollJankPlugin',
    name: 'Enable Chrome Scroll Jank plugin',
    description: 'Adds new tracks for scroll jank in Chrome',
    defaultValue: false,
});
class ChromeScrollJankTrack extends named_slice_track.NamedSliceTrack {
    static create(args) {
        return new ChromeScrollJankTrack(args);
    }
    initSqlTable(tableName) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            yield this.engine.query(`
create view ${tableName} as
select s2.ts, s2.dur, s2.id, 0 as depth, s1.full_name as name
from chrome_tasks_delaying_input_processing s1
join slice s2 on s2.id=s1.slice_id
    `);
        });
    }
}
ChromeScrollJankTrack.kind = 'org.chromium.ScrollJank.BrowserUIThreadLongTasks';
function decideTracks(engine, getTrackGroupUuid) {
    return tslib.__awaiter(this, void 0, void 0, function* () {
        const result = {
            tracksToAdd: [],
        };
        if (!ENABLE_CHROME_SCROLL_JANK_PLUGIN.get()) {
            return result;
        }
        const queryResult = yield engine.query(`
    select utid, upid
    from thread
    where name='CrBrowserMain'
    `);
        const it = queryResult.iter({
            utid: query_result.NUM,
            upid: query_result.NUM,
        });
        if (!it.valid()) {
            return result;
        }
        result.tracksToAdd.push({
            id: (0, dist$1.v4)(),
            engineId: engine.id,
            kind: ChromeScrollJankTrack.kind,
            trackSortKey: {
                utid: it.utid,
                priority: state.InThreadTrackSortKey.ORDINARY,
            },
            name: 'Scroll Jank causes - long tasks',
            config: {},
            trackGroup: getTrackGroupUuid(it.utid, it.upid),
        });
        // Initialise the chrome_tasks_delaying_input_processing table. It will be
        // used in the sql table above.
        yield engine.query(`
select RUN_METRIC(
   'chrome/chrome_tasks_delaying_input_processing.sql',
   'duration_causing_jank_ms',
   /* duration_causing_jank_ms = */ '8');`);
        globals.globals.dispatch(actions.Actions.executeQuery({
            queryId: 'chrome_scroll_jank_long_tasks',
            query: `
     select
       s1.full_name,
       s1.duration_ms,
       s1.slice_id,
       s1.thread_dur_ms,
       s2.id,
       s2.ts,
       s2.dur,
       s2.track_id
     from chrome_tasks_delaying_input_processing s1
     join slice s2 on s1.slice_id=s2.id
     `,
        }));
        return result;
    });
}
exports.decideTracks = decideTracks;
function activate(ctx) {
    ctx.registerTrack(ChromeScrollJankTrack);
}
exports.plugin = {
    pluginId: 'perfetto.ChromeScrollJank',
    activate,
};

});

var popup_menu = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.PopupMenuButton = void 0;


// To ensure having at most one popup menu on the screen at a time, we need to
// listen to click events on the whole page and close currently opened popup, if
// there's any. This class, used as a singleton, does exactly that.
class PopupHolder {
    constructor() {
        // Invariant: global listener should be register if and only if this.popup is
        // not undefined.
        this.popup = undefined;
        this.initialized = false;
        this.listener = (e) => {
            // Only handle those events that are not part of dropdown menu themselves.
            const hasDropdown = e.composedPath().find(PopupHolder.isDropdownElement) !== undefined;
            if (!hasDropdown) {
                this.ensureHidden();
            }
        };
    }
    static isDropdownElement(target) {
        if (target instanceof HTMLElement) {
            return target.tagName === 'DIV' && target.classList.contains('dropdown');
        }
        return false;
    }
    ensureHidden() {
        if (this.popup !== undefined) {
            this.popup.setVisible(false);
        }
    }
    clear() {
        if (this.popup !== undefined) {
            this.popup = undefined;
            window.removeEventListener('click', this.listener);
        }
    }
    showPopup(popup) {
        this.ensureHidden();
        this.popup = popup;
        window.addEventListener('click', this.listener);
    }
}
// Singleton instance of PopupHolder
const popupHolder = new PopupHolder();
// Component that displays a button that shows a popup menu on click.
class PopupMenuButton {
    constructor() {
        this.popupShown = false;
        this.expandedGroups = new Set();
    }
    setVisible(visible) {
        this.popupShown = visible;
        if (this.popupShown) {
            popupHolder.showPopup(this);
        }
        else {
            popupHolder.clear();
        }
        globals.globals.rafScheduler.scheduleFullRedraw();
    }
    renderItem(item) {
        switch (item.itemType) {
            case 'regular':
                return mithril('button.open-menu', {
                    onclick: () => {
                        item.callback();
                        // Hide the menu item after the action has been invoked
                        this.setVisible(false);
                    },
                }, item.text);
            case 'group':
                const isExpanded = this.expandedGroups.has(item.itemId);
                return mithril('div', mithril('button.open-menu.disallow-selection', {
                    onclick: () => {
                        if (this.expandedGroups.has(item.itemId)) {
                            this.expandedGroups.delete(item.itemId);
                        }
                        else {
                            this.expandedGroups.add(item.itemId);
                        }
                        globals.globals.rafScheduler.scheduleFullRedraw();
                    },
                }, 
                // Show text with up/down arrow, depending on expanded state.
                item.text + (isExpanded ? ' \u25B2' : ' \u25BC')), isExpanded ? mithril('div.nested-menu', item.children.map((item) => this.renderItem(item))) :
                    null);
        }
    }
    view(vnode) {
        return mithril('.dropdown', mithril('i.material-icons', {
            onclick: () => {
                this.setVisible(!this.popupShown);
            },
        }, vnode.attrs.icon), mithril(this.popupShown ? '.popup-menu.opened' : '.popup-menu.closed', vnode.attrs.items.map((item) => this.renderItem(item))));
    }
}
exports.PopupMenuButton = PopupMenuButton;

});

var counter = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.plugin = exports.activate = exports.COUNTER_TRACK_KIND = void 0;












exports.COUNTER_TRACK_KIND = 'CounterTrack';
class CounterTrackController extends track_controller.TrackController {
    constructor() {
        super(...arguments);
        this.setup = false;
        this.maximumValueSeen = 0;
        this.minimumValueSeen = 0;
        this.maximumDeltaSeen = 0;
        this.minimumDeltaSeen = 0;
        this.maxDurNs = 0;
    }
    onBoundsChange(start, end, resolution) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const startNs = (0, time.toNs)(start);
            const endNs = (0, time.toNs)(end);
            const pxSize = this.pxSize();
            // ns per quantization bucket (i.e. ns per pixel). /2 * 2 is to force it to
            // be an even number, so we can snap in the middle.
            const bucketNs = Math.max(Math.round(resolution * 1e9 * pxSize / 2) * 2, 1);
            if (!this.setup) {
                if (this.config.namespace === undefined) {
                    yield this.query(`
          create view ${this.tableName('counter_view')} as
          select
            id,
            ts,
            dur,
            value,
            delta
          from experimental_counter_dur
          where track_id = ${this.config.trackId};
        `);
                }
                else {
                    yield this.query(`
          create view ${this.tableName('counter_view')} as
          select
            id,
            ts,
            lead(ts, 1, ts) over (order by ts) - ts as dur,
            lead(value, 1, value) over (order by ts) - value as delta,
            value
          from ${this.namespaceTable('counter')}
          where track_id = ${this.config.trackId};
        `);
                }
                const maxDurResult = yield this.query(`
          select
            max(
              iif(dur != -1, dur, (select end_ts from trace_bounds) - ts)
            ) as maxDur
          from ${this.tableName('counter_view')}
      `);
                this.maxDurNs = maxDurResult.firstRow({ maxDur: query_result.NUM_NULL }).maxDur || 0;
                const queryRes = yield this.query(`
        select
          ifnull(max(value), 0) as maxValue,
          ifnull(min(value), 0) as minValue,
          ifnull(max(delta), 0) as maxDelta,
          ifnull(min(delta), 0) as minDelta
        from ${this.tableName('counter_view')}`);
                const row = queryRes.firstRow({ maxValue: query_result.NUM, minValue: query_result.NUM, maxDelta: query_result.NUM, minDelta: query_result.NUM });
                this.maximumValueSeen = row.maxValue;
                this.minimumValueSeen = row.minValue;
                this.maximumDeltaSeen = row.maxDelta;
                this.minimumDeltaSeen = row.minDelta;
                this.setup = true;
            }
            const queryRes = yield this.query(`
      select
        (ts + ${bucketNs / 2}) / ${bucketNs} * ${bucketNs} as tsq,
        min(value) as minValue,
        max(value) as maxValue,
        sum(delta) as totalDelta,
        value_at_max_ts(ts, id) as lastId,
        value_at_max_ts(ts, value) as lastValue
      from ${this.tableName('counter_view')}
      where ts >= ${startNs - this.maxDurNs} and ts <= ${endNs}
      group by tsq
      order by tsq
    `);
            const numRows = queryRes.numRows();
            const data = {
                start,
                end,
                length: numRows,
                maximumValue: this.maximumValue(),
                minimumValue: this.minimumValue(),
                maximumDelta: this.maximumDeltaSeen,
                minimumDelta: this.minimumDeltaSeen,
                maximumRate: 0,
                minimumRate: 0,
                resolution,
                timestamps: new Float64Array(numRows),
                lastIds: new Float64Array(numRows),
                minValues: new Float64Array(numRows),
                maxValues: new Float64Array(numRows),
                lastValues: new Float64Array(numRows),
                totalDeltas: new Float64Array(numRows),
                rate: new Float64Array(numRows),
            };
            const it = queryRes.iter({
                'tsq': query_result.NUM,
                'lastId': query_result.NUM,
                'minValue': query_result.NUM,
                'maxValue': query_result.NUM,
                'lastValue': query_result.NUM,
                'totalDelta': query_result.NUM,
            });
            let lastValue = 0;
            let lastTs = 0;
            for (let row = 0; it.valid(); it.next(), row++) {
                const ts = (0, time.fromNs)(it.tsq);
                const value = it.lastValue;
                const rate = (value - lastValue) / (ts - lastTs);
                lastTs = ts;
                lastValue = value;
                data.timestamps[row] = ts;
                data.lastIds[row] = it.lastId;
                data.minValues[row] = it.minValue;
                data.maxValues[row] = it.maxValue;
                data.lastValues[row] = value;
                data.totalDeltas[row] = it.totalDelta;
                data.rate[row] = rate;
                if (row > 0) {
                    data.rate[row - 1] = rate;
                    data.maximumRate = Math.max(data.maximumRate, rate);
                    data.minimumRate = Math.min(data.minimumRate, rate);
                }
            }
            return data;
        });
    }
    maximumValue() {
        if (this.config.maximumValue === undefined) {
            return this.maximumValueSeen;
        }
        else {
            return this.config.maximumValue;
        }
    }
    minimumValue() {
        if (this.config.minimumValue === undefined) {
            return this.minimumValueSeen;
        }
        else {
            return this.config.minimumValue;
        }
    }
}
CounterTrackController.kind = exports.COUNTER_TRACK_KIND;
// 0.5 Makes the horizontal lines sharp.
const MARGIN_TOP = 3.5;
const RECT_HEIGHT = 24.5;
class CounterTrack extends track.Track {
    constructor(args) {
        super(args);
        this.mousePos = { x: 0, y: 0 };
        this.hoveredValue = undefined;
        this.hoveredTs = undefined;
        this.hoveredTsEnd = undefined;
    }
    static create(args) {
        return new CounterTrack(args);
    }
    getHeight() {
        return MARGIN_TOP + RECT_HEIGHT;
    }
    getContextMenu() {
        const currentScale = this.config.scale;
        const scales = [
            { name: 'ZERO_BASED', humanName: 'Zero based' },
            { name: 'MIN_MAX', humanName: 'Min/Max' },
            { name: 'DELTA_FROM_PREVIOUS', humanName: 'Delta' },
            { name: 'RATE', humanName: 'Rate' },
        ];
        const items = [];
        for (const scale of scales) {
            let text;
            if (currentScale === scale.name) {
                text = `*${scale.humanName}*`;
            }
            else {
                text = scale.humanName;
            }
            items.push({
                itemType: 'regular',
                text,
                callback: () => {
                    this.config.scale = scale.name;
                    actions.Actions.updateTrackConfig({
                        id: this.trackState.id,
                        config: this.config,
                    });
                },
            });
        }
        return mithril(popup_menu.PopupMenuButton, {
            icon: 'show_chart',
            items,
        });
    }
    renderCanvas(ctx) {
        // TODO: fonts and colors should come from the CSS and not hardcoded here.
        const { timeScale, visibleWindowTime } = globals.globals.frontendLocalState;
        const data = this.data();
        // Can't possibly draw anything.
        if (data === undefined || data.timestamps.length === 0) {
            return;
        }
        (0, logging.assertTrue)(data.timestamps.length === data.minValues.length);
        (0, logging.assertTrue)(data.timestamps.length === data.maxValues.length);
        (0, logging.assertTrue)(data.timestamps.length === data.lastValues.length);
        (0, logging.assertTrue)(data.timestamps.length === data.totalDeltas.length);
        (0, logging.assertTrue)(data.timestamps.length === data.rate.length);
        const scale = this.config.scale || 'ZERO_BASED';
        let minValues = data.minValues;
        let maxValues = data.maxValues;
        let lastValues = data.lastValues;
        let maximumValue = data.maximumValue;
        let minimumValue = data.minimumValue;
        if (scale === 'DELTA_FROM_PREVIOUS') {
            lastValues = data.totalDeltas;
            minValues = data.totalDeltas;
            maxValues = data.totalDeltas;
            maximumValue = data.maximumDelta;
            minimumValue = data.minimumDelta;
        }
        if (scale === 'RATE') {
            lastValues = data.rate;
            minValues = data.rate;
            maxValues = data.rate;
            maximumValue = data.maximumRate;
            minimumValue = data.minimumRate;
        }
        const endPx = Math.floor(timeScale.timeToPx(visibleWindowTime.end));
        const zeroY = MARGIN_TOP + RECT_HEIGHT / (minimumValue < 0 ? 2 : 1);
        // Quantize the Y axis to quarters of powers of tens (7.5K, 10K, 12.5K).
        const maxValue = Math.max(maximumValue, 0);
        let yMax = Math.max(Math.abs(minimumValue), maxValue);
        const kUnits = ['', 'K', 'M', 'G', 'T', 'E'];
        const exp = Math.ceil(Math.log10(Math.max(yMax, 1)));
        const pow10 = Math.pow(10, exp);
        yMax = Math.ceil(yMax / (pow10 / 4)) * (pow10 / 4);
        let yRange = 0;
        const unitGroup = Math.floor(exp / 3);
        let yMin = 0;
        let yLabel = '';
        if (scale === 'MIN_MAX') {
            yRange = maximumValue - minimumValue;
            yMin = minimumValue;
            yLabel = 'min - max';
        }
        else {
            yRange = minimumValue < 0 ? yMax * 2 : yMax;
            yMin = minimumValue < 0 ? -yMax : 0;
            yLabel = `${yMax / Math.pow(10, unitGroup * 3)} ${kUnits[unitGroup]}`;
            if (scale === 'DELTA_FROM_PREVIOUS') {
                yLabel += '\u0394';
            }
            else if (scale === 'RATE') {
                yLabel += '\u0394/t';
            }
        }
        // There are 360deg of hue. We want a scale that starts at green with
        // exp <= 3 (<= 1KB), goes orange around exp = 6 (~1MB) and red/violet
        // around exp >= 9 (1GB).
        // The hue scale looks like this:
        // 0                              180                                 360
        // Red        orange         green | blue         purple          magenta
        // So we want to start @ 180deg with pow=0, go down to 0deg and then wrap
        // back from 360deg back to 180deg.
        const expCapped = Math.min(Math.max(exp - 3), 9);
        const hue = (180 - Math.floor(expCapped * (180 / 6)) + 360) % 360;
        ctx.fillStyle = `hsl(${hue}, 45%, 75%)`;
        ctx.strokeStyle = `hsl(${hue}, 45%, 45%)`;
        const calculateX = (ts) => {
            return Math.floor(timeScale.timeToPx(ts));
        };
        const calculateY = (value) => {
            return MARGIN_TOP + RECT_HEIGHT -
                Math.round(((value - yMin) / yRange) * RECT_HEIGHT);
        };
        ctx.beginPath();
        ctx.moveTo(calculateX(data.timestamps[0]), zeroY);
        let lastDrawnY = zeroY;
        for (let i = 0; i < data.timestamps.length; i++) {
            const x = calculateX(data.timestamps[i]);
            const minY = calculateY(minValues[i]);
            const maxY = calculateY(maxValues[i]);
            const lastY = calculateY(lastValues[i]);
            ctx.lineTo(x, lastDrawnY);
            if (minY === maxY) {
                (0, logging.assertTrue)(lastY === minY);
                ctx.lineTo(x, lastY);
            }
            else {
                ctx.lineTo(x, minY);
                ctx.lineTo(x, maxY);
                ctx.lineTo(x, lastY);
            }
            lastDrawnY = lastY;
        }
        ctx.lineTo(endPx, lastDrawnY);
        ctx.lineTo(endPx, zeroY);
        ctx.closePath();
        ctx.fill();
        ctx.stroke();
        // Draw the Y=0 dashed line.
        ctx.strokeStyle = `hsl(${hue}, 10%, 71%)`;
        ctx.beginPath();
        ctx.setLineDash([2, 4]);
        ctx.moveTo(0, zeroY);
        ctx.lineTo(endPx, zeroY);
        ctx.closePath();
        ctx.stroke();
        ctx.setLineDash([]);
        ctx.font = '10px Roboto Condensed';
        if (this.hoveredValue !== undefined && this.hoveredTs !== undefined) {
            // TODO(hjd): Add units.
            let text;
            if (scale === 'DELTA_FROM_PREVIOUS') {
                text = 'delta: ';
            }
            else if (scale === 'RATE') {
                text = 'delta/t: ';
            }
            else {
                text = 'value: ';
            }
            text += `${this.hoveredValue.toLocaleString()}`;
            ctx.fillStyle = `hsl(${hue}, 45%, 75%)`;
            ctx.strokeStyle = `hsl(${hue}, 45%, 45%)`;
            const xStart = Math.floor(timeScale.timeToPx(this.hoveredTs));
            const xEnd = this.hoveredTsEnd === undefined ?
                endPx :
                Math.floor(timeScale.timeToPx(this.hoveredTsEnd));
            const y = MARGIN_TOP + RECT_HEIGHT -
                Math.round(((this.hoveredValue - yMin) / yRange) * RECT_HEIGHT);
            // Highlight line.
            ctx.beginPath();
            ctx.moveTo(xStart, y);
            ctx.lineTo(xEnd, y);
            ctx.lineWidth = 3;
            ctx.stroke();
            ctx.lineWidth = 1;
            // Draw change marker.
            ctx.beginPath();
            ctx.arc(xStart, y, 3 /* r*/, 0 /* start angle*/, 2 * Math.PI /* end angle*/);
            ctx.fill();
            ctx.stroke();
            // Draw the tooltip.
            this.drawTrackHoverTooltip(ctx, this.mousePos, text);
        }
        // Write the Y scale on the top left corner.
        ctx.fillStyle = 'rgba(255, 255, 255, 0.6)';
        ctx.fillRect(0, 0, 42, 16);
        ctx.fillStyle = '#666';
        ctx.textAlign = 'left';
        ctx.textBaseline = 'alphabetic';
        ctx.fillText(`${yLabel}`, 5, 14);
        // TODO(hjd): Refactor this into checkerboardExcept
        {
            const endPx = timeScale.timeToPx(visibleWindowTime.end);
            const counterEndPx = Math.min(timeScale.timeToPx(this.config.endTs || Infinity), endPx);
            // Grey out RHS.
            if (counterEndPx < endPx) {
                ctx.fillStyle = '#0000001f';
                ctx.fillRect(counterEndPx, 0, endPx - counterEndPx, this.getHeight());
            }
        }
        // If the cached trace slices don't fully cover the visible time range,
        // show a gray rectangle with a "Loading..." label.
        (0, checkerboard_1.checkerboardExcept)(ctx, this.getHeight(), timeScale.timeToPx(visibleWindowTime.start), timeScale.timeToPx(visibleWindowTime.end), timeScale.timeToPx(data.start), timeScale.timeToPx(data.end));
    }
    onMouseMove(pos) {
        const data = this.data();
        if (data === undefined)
            return;
        this.mousePos = pos;
        const { timeScale } = globals.globals.frontendLocalState;
        const time = timeScale.pxToTime(pos.x);
        const values = this.config.scale === 'DELTA_FROM_PREVIOUS' ?
            data.totalDeltas :
            data.lastValues;
        const [left, right] = (0, binary_search.searchSegment)(data.timestamps, time);
        this.hoveredTs = left === -1 ? undefined : data.timestamps[left];
        this.hoveredTsEnd = right === -1 ? undefined : data.timestamps[right];
        this.hoveredValue = left === -1 ? undefined : values[left];
    }
    onMouseOut() {
        this.hoveredValue = undefined;
        this.hoveredTs = undefined;
    }
    onMouseClick({ x }) {
        const data = this.data();
        if (data === undefined)
            return false;
        const { timeScale } = globals.globals.frontendLocalState;
        const time$1 = timeScale.pxToTime(x);
        const [left, right] = (0, binary_search.searchSegment)(data.timestamps, time$1);
        if (left === -1) {
            return false;
        }
        else {
            const counterId = data.lastIds[left];
            if (counterId === -1)
                return true;
            globals.globals.makeSelection(actions.Actions.selectCounter({
                leftTs: (0, time.toNs)(data.timestamps[left]),
                rightTs: right !== -1 ? (0, time.toNs)(data.timestamps[right]) : -1,
                id: counterId,
                trackId: this.trackState.id,
            }));
            return true;
        }
    }
}
CounterTrack.kind = exports.COUNTER_TRACK_KIND;
function activate(ctx) {
    ctx.registerTrackController(CounterTrackController);
    ctx.registerTrack(CounterTrack);
}
exports.activate = activate;
exports.plugin = {
    pluginId: 'perfetto.Counter',
    activate,
};

});

var cpu_freq = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.plugin = exports.CPU_FREQ_TRACK_KIND = void 0;










exports.CPU_FREQ_TRACK_KIND = 'CpuFreqTrack';
class CpuFreqTrackController extends track_controller.TrackController {
    constructor() {
        super(...arguments);
        this.maxDurNs = 0;
        this.maxTsEndNs = 0;
        this.maximumValueSeen = 0;
        this.cachedBucketNs = Number.MAX_SAFE_INTEGER;
    }
    onSetup() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            yield this.createFreqIdleViews();
            this.maximumValueSeen = yield this.queryMaxFrequency();
            this.maxDurNs = yield this.queryMaxSourceDur();
            const iter = (yield this.query(`
      select max(ts) as maxTs, dur, count(1) as rowCount
      from ${this.tableName('freq_idle')}
    `)).firstRow({ maxTs: query_result.NUM_NULL, dur: query_result.NUM_NULL, rowCount: query_result.NUM });
            if (iter.maxTs === null || iter.dur === null) {
                // We shoulnd't really hit this because trackDecider shouldn't create
                // the track in the first place if there are no entries. But could happen
                // if only one cpu has no cpufreq data.
                return;
            }
            this.maxTsEndNs = iter.maxTs + iter.dur;
            const rowCount = iter.rowCount;
            const bucketNs = this.cachedBucketSizeNs(rowCount);
            if (bucketNs === undefined) {
                return;
            }
            yield this.query(`
      create table ${this.tableName('freq_idle_cached')} as
      select
        (ts + ${bucketNs / 2}) / ${bucketNs} * ${bucketNs} as cachedTsq,
        min(freqValue) as minFreq,
        max(freqValue) as maxFreq,
        value_at_max_ts(ts, freqValue) as lastFreq,
        value_at_max_ts(ts, idleValue) as lastIdleValue
      from ${this.tableName('freq_idle')}
      group by cachedTsq
      order by cachedTsq
    `);
            this.cachedBucketNs = bucketNs;
        });
    }
    onBoundsChange(start, end, resolution) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            // The resolution should always be a power of two for the logic of this
            // function to make sense.
            const resolutionNs = (0, time.toNs)(resolution);
            (0, logging.assertTrue)(Math.log2(resolutionNs) % 1 === 0);
            const startNs = (0, time.toNs)(start);
            const endNs = (0, time.toNs)(end);
            // ns per quantization bucket (i.e. ns per pixel). /2 * 2 is to force it to
            // be an even number, so we can snap in the middle.
            const bucketNs = Math.max(Math.round(resolutionNs * this.pxSize() / 2) * 2, 1);
            const freqResult = yield this.queryData(startNs, endNs, bucketNs);
            (0, logging.assertTrue)(freqResult.isComplete());
            const numRows = freqResult.numRows();
            const data = {
                start,
                end,
                resolution,
                length: numRows,
                maximumValue: this.maximumValue(),
                maxTsEnd: this.maxTsEndNs,
                timestamps: new Float64Array(numRows),
                minFreqKHz: new Uint32Array(numRows),
                maxFreqKHz: new Uint32Array(numRows),
                lastFreqKHz: new Uint32Array(numRows),
                lastIdleValues: new Int8Array(numRows),
            };
            const it = freqResult.iter({
                'tsq': query_result.NUM,
                'minFreq': query_result.NUM,
                'maxFreq': query_result.NUM,
                'lastFreq': query_result.NUM,
                'lastIdleValue': query_result.NUM,
            });
            for (let i = 0; it.valid(); ++i, it.next()) {
                data.timestamps[i] = (0, time.fromNs)(it.tsq);
                data.minFreqKHz[i] = it.minFreq;
                data.maxFreqKHz[i] = it.maxFreq;
                data.lastFreqKHz[i] = it.lastFreq;
                data.lastIdleValues[i] = it.lastIdleValue;
            }
            return data;
        });
    }
    queryData(startNs, endNs, bucketNs) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const isCached = this.cachedBucketNs <= bucketNs;
            if (isCached) {
                return this.query(`
        select
          cachedTsq / ${bucketNs} * ${bucketNs} as tsq,
          min(minFreq) as minFreq,
          max(maxFreq) as maxFreq,
          value_at_max_ts(cachedTsq, lastFreq) as lastFreq,
          value_at_max_ts(cachedTsq, lastIdleValue) as lastIdleValue
        from ${this.tableName('freq_idle_cached')}
        where
          cachedTsq >= ${startNs - this.maxDurNs} and
          cachedTsq <= ${endNs}
        group by tsq
        order by tsq
      `);
            }
            const minTsFreq = yield this.query(`
      select ifnull(max(ts), 0) as minTs from ${this.tableName('freq')}
      where ts < ${startNs}
    `);
            let minTs = minTsFreq.iter({ minTs: query_result.NUM }).minTs;
            if (this.config.idleTrackId !== undefined) {
                const minTsIdle = yield this.query(`
        select ifnull(max(ts), 0) as minTs from ${this.tableName('idle')}
        where ts < ${startNs}
      `);
                minTs = Math.min(minTsIdle.iter({ minTs: query_result.NUM }).minTs, minTs);
            }
            const geqConstraint = this.config.idleTrackId === undefined ?
                `ts >= ${minTs}` :
                `source_geq(ts, ${minTs})`;
            return this.query(`
      select
        (ts + ${bucketNs / 2}) / ${bucketNs} * ${bucketNs} as tsq,
        min(freqValue) as minFreq,
        max(freqValue) as maxFreq,
        value_at_max_ts(ts, freqValue) as lastFreq,
        value_at_max_ts(ts, idleValue) as lastIdleValue
      from ${this.tableName('freq_idle')}
      where
        ${geqConstraint} and
        ts <= ${endNs}
      group by tsq
      order by tsq
    `);
        });
    }
    queryMaxFrequency() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const result = yield this.query(`
      select max(freqValue) as maxFreq
      from ${this.tableName('freq')}
    `);
            return result.firstRow({ 'maxFreq': query_result.NUM_NULL }).maxFreq || 0;
        });
    }
    queryMaxSourceDur() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const maxDurFreqResult = yield this.query(`select ifnull(max(dur), 0) as maxDur from ${this.tableName('freq')}`);
            const maxDurNs = maxDurFreqResult.firstRow({ 'maxDur': query_result.NUM }).maxDur;
            if (this.config.idleTrackId === undefined) {
                return maxDurNs;
            }
            const maxDurIdleResult = yield this.query(`select ifnull(max(dur), 0) as maxDur from ${this.tableName('idle')}`);
            return Math.max(maxDurNs, maxDurIdleResult.firstRow({ maxDur: query_result.NUM }).maxDur);
        });
    }
    createFreqIdleViews() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            yield this.query(`create view ${this.tableName('freq')} as
      select
        ts,
        dur,
        value as freqValue
      from experimental_counter_dur c
      where track_id = ${this.config.freqTrackId};
    `);
            if (this.config.idleTrackId === undefined) {
                yield this.query(`create view ${this.tableName('freq_idle')} as
        select
          ts,
          dur,
          -1 as idleValue,
          freqValue
        from ${this.tableName('freq')};
      `);
                return;
            }
            yield this.query(`
      create view ${this.tableName('idle')} as
      select
        ts,
        dur,
        iif(value = 4294967295, -1, cast(value as int)) as idleValue
      from experimental_counter_dur c
      where track_id = ${this.config.idleTrackId};
    `);
            yield this.query(`
      create virtual table ${this.tableName('freq_idle')}
      using span_join(${this.tableName('freq')}, ${this.tableName('idle')});
    `);
        });
    }
    maximumValue() {
        return Math.max(this.config.maximumValue || 0, this.maximumValueSeen);
    }
}
CpuFreqTrackController.kind = exports.CPU_FREQ_TRACK_KIND;
// 0.5 Makes the horizontal lines sharp.
const MARGIN_TOP = 4.5;
const RECT_HEIGHT = 20;
class CpuFreqTrack extends track.Track {
    constructor(args) {
        super(args);
        this.mousePos = { x: 0, y: 0 };
        this.hoveredValue = undefined;
        this.hoveredTs = undefined;
        this.hoveredTsEnd = undefined;
        this.hoveredIdle = undefined;
    }
    static create(args) {
        return new CpuFreqTrack(args);
    }
    getHeight() {
        return MARGIN_TOP + RECT_HEIGHT;
    }
    renderCanvas(ctx) {
        // TODO: fonts and colors should come from the CSS and not hardcoded here.
        const { timeScale, visibleWindowTime } = globals.globals.frontendLocalState;
        const data = this.data();
        if (data === undefined || data.timestamps.length === 0) {
            // Can't possibly draw anything.
            return;
        }
        (0, logging.assertTrue)(data.timestamps.length === data.lastFreqKHz.length);
        (0, logging.assertTrue)(data.timestamps.length === data.minFreqKHz.length);
        (0, logging.assertTrue)(data.timestamps.length === data.maxFreqKHz.length);
        (0, logging.assertTrue)(data.timestamps.length === data.lastIdleValues.length);
        const endPx = timeScale.timeToPx(visibleWindowTime.end);
        const zeroY = MARGIN_TOP + RECT_HEIGHT;
        // Quantize the Y axis to quarters of powers of tens (7.5K, 10K, 12.5K).
        let yMax = data.maximumValue;
        const kUnits = ['', 'K', 'M', 'G', 'T', 'E'];
        const exp = Math.ceil(Math.log10(Math.max(yMax, 1)));
        const pow10 = Math.pow(10, exp);
        yMax = Math.ceil(yMax / (pow10 / 4)) * (pow10 / 4);
        const unitGroup = Math.floor(exp / 3);
        const num = yMax / Math.pow(10, unitGroup * 3);
        // The values we have for cpufreq are in kHz so +1 to unitGroup.
        const yLabel = `${num} ${kUnits[unitGroup + 1]}Hz`;
        // Draw the CPU frequency graph.
        const hue = (0, colorizer.hueForCpu)(this.config.cpu);
        let saturation = 45;
        if (globals.globals.state.hoveredUtid !== -1) {
            saturation = 0;
        }
        ctx.fillStyle = `hsl(${hue}, ${saturation}%, 70%)`;
        ctx.strokeStyle = `hsl(${hue}, ${saturation}%, 55%)`;
        const calculateX = (timestamp) => {
            return Math.floor(timeScale.timeToPx(timestamp));
        };
        const calculateY = (value) => {
            return zeroY - Math.round((value / yMax) * RECT_HEIGHT);
        };
        const [rawStartIdx] = (0, binary_search.searchSegment)(data.timestamps, visibleWindowTime.start);
        const startIdx = rawStartIdx === -1 ? 0 : rawStartIdx;
        const [, rawEndIdx] = (0, binary_search.searchSegment)(data.timestamps, visibleWindowTime.end);
        const endIdx = rawEndIdx === -1 ? data.timestamps.length : rawEndIdx;
        ctx.beginPath();
        ctx.moveTo(Math.max(calculateX(data.timestamps[startIdx]), 0), zeroY);
        let lastDrawnY = zeroY;
        for (let i = startIdx; i < endIdx; i++) {
            const x = calculateX(data.timestamps[i]);
            const minY = calculateY(data.minFreqKHz[i]);
            const maxY = calculateY(data.maxFreqKHz[i]);
            const lastY = calculateY(data.lastFreqKHz[i]);
            ctx.lineTo(x, lastDrawnY);
            if (minY === maxY) {
                (0, logging.assertTrue)(lastY === minY);
                ctx.lineTo(x, lastY);
            }
            else {
                ctx.lineTo(x, minY);
                ctx.lineTo(x, maxY);
                ctx.lineTo(x, lastY);
            }
            lastDrawnY = lastY;
        }
        // Find the end time for the last frequency event and then draw
        // down to zero to show that we do not have data after that point.
        const finalX = Math.min(calculateX(data.maxTsEnd), endPx);
        ctx.lineTo(finalX, lastDrawnY);
        ctx.lineTo(finalX, zeroY);
        ctx.lineTo(endPx, zeroY);
        ctx.closePath();
        ctx.fill();
        ctx.stroke();
        // Draw CPU idle rectangles that overlay the CPU freq graph.
        ctx.fillStyle = `rgba(240, 240, 240, 1)`;
        for (let i = 0; i < data.lastIdleValues.length; i++) {
            if (data.lastIdleValues[i] < 0) {
                continue;
            }
            // We intentionally don't use the floor function here when computing x
            // coordinates. Instead we use floating point which prevents flickering as
            // we pan and zoom; this relies on the browser anti-aliasing pixels
            // correctly.
            const x = timeScale.timeToPx(data.timestamps[i]);
            const xEnd = i === data.lastIdleValues.length - 1 ?
                finalX :
                timeScale.timeToPx(data.timestamps[i + 1]);
            const width = xEnd - x;
            const height = calculateY(data.lastFreqKHz[i]) - zeroY;
            ctx.fillRect(x, zeroY, width, height);
        }
        ctx.font = '10px Roboto Condensed';
        if (this.hoveredValue !== undefined && this.hoveredTs !== undefined) {
            let text = `${this.hoveredValue.toLocaleString()}kHz`;
            ctx.fillStyle = `hsl(${hue}, 45%, 75%)`;
            ctx.strokeStyle = `hsl(${hue}, 45%, 45%)`;
            const xStart = Math.floor(timeScale.timeToPx(this.hoveredTs));
            const xEnd = this.hoveredTsEnd === undefined ?
                endPx :
                Math.floor(timeScale.timeToPx(this.hoveredTsEnd));
            const y = zeroY - Math.round((this.hoveredValue / yMax) * RECT_HEIGHT);
            // Highlight line.
            ctx.beginPath();
            ctx.moveTo(xStart, y);
            ctx.lineTo(xEnd, y);
            ctx.lineWidth = 3;
            ctx.stroke();
            ctx.lineWidth = 1;
            // Draw change marker.
            ctx.beginPath();
            ctx.arc(xStart, y, 3 /* r*/, 0 /* start angle*/, 2 * Math.PI /* end angle*/);
            ctx.fill();
            ctx.stroke();
            // Display idle value if current hover is idle.
            if (this.hoveredIdle !== undefined && this.hoveredIdle !== -1) {
                // Display the idle value +1 to be consistent with catapult.
                text += ` (Idle: ${(this.hoveredIdle + 1).toLocaleString()})`;
            }
            // Draw the tooltip.
            this.drawTrackHoverTooltip(ctx, this.mousePos, text);
        }
        // Write the Y scale on the top left corner.
        ctx.textBaseline = 'alphabetic';
        ctx.fillStyle = 'rgba(255, 255, 255, 0.6)';
        ctx.fillRect(0, 0, 42, 18);
        ctx.fillStyle = '#666';
        ctx.textAlign = 'left';
        ctx.fillText(`${yLabel}`, 4, 14);
        // If the cached trace slices don't fully cover the visible time range,
        // show a gray rectangle with a "Loading..." label.
        (0, checkerboard_1.checkerboardExcept)(ctx, this.getHeight(), timeScale.timeToPx(visibleWindowTime.start), timeScale.timeToPx(visibleWindowTime.end), timeScale.timeToPx(data.start), timeScale.timeToPx(data.end));
    }
    onMouseMove(pos) {
        const data = this.data();
        if (data === undefined)
            return;
        this.mousePos = pos;
        const { timeScale } = globals.globals.frontendLocalState;
        const time = timeScale.pxToTime(pos.x);
        const [left, right] = (0, binary_search.searchSegment)(data.timestamps, time);
        this.hoveredTs = left === -1 ? undefined : data.timestamps[left];
        this.hoveredTsEnd = right === -1 ? undefined : data.timestamps[right];
        this.hoveredValue = left === -1 ? undefined : data.lastFreqKHz[left];
        this.hoveredIdle = left === -1 ? undefined : data.lastIdleValues[left];
    }
    onMouseOut() {
        this.hoveredValue = undefined;
        this.hoveredTs = undefined;
        this.hoveredTsEnd = undefined;
        this.hoveredIdle = undefined;
    }
}
CpuFreqTrack.kind = exports.CPU_FREQ_TRACK_KIND;
function activate(ctx) {
    ctx.registerTrackController(CpuFreqTrackController);
    ctx.registerTrack(CpuFreqTrack);
}
exports.plugin = {
    pluginId: 'perfetto.CpuFreq',
    activate,
};

});

var cpu_profile = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.plugin = exports.CPU_PROFILE_TRACK_KIND = void 0;










const BAR_HEIGHT = 3;
const MARGIN_TOP = 4.5;
const RECT_HEIGHT = 30.5;
exports.CPU_PROFILE_TRACK_KIND = 'CpuProfileTrack';
class CpuProfileTrackController extends track_controller.TrackController {
    onBoundsChange(start, end, resolution) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const query = `select
        id,
        ts,
        callsite_id as callsiteId
      from cpu_profile_stack_sample
      where utid = ${this.config.utid}
      order by ts`;
            const result = yield this.query(query);
            const numRows = result.numRows();
            const data = {
                start,
                end,
                resolution,
                length: numRows,
                ids: new Float64Array(numRows),
                tsStarts: new Float64Array(numRows),
                callsiteId: new Uint32Array(numRows),
            };
            const it = result.iter({ id: query_result.NUM, ts: query_result.NUM, callsiteId: query_result.NUM });
            for (let row = 0; it.valid(); it.next(), ++row) {
                data.ids[row] = it.id;
                data.tsStarts[row] = it.ts;
                data.callsiteId[row] = it.callsiteId;
            }
            return data;
        });
    }
}
CpuProfileTrackController.kind = exports.CPU_PROFILE_TRACK_KIND;
function colorForSample(callsiteId, isHovered) {
    const [hue, saturation, lightness] = (0, colorizer.hslForSlice)(String(callsiteId), isHovered);
    return (0, hsluv_cache.cachedHsluvToHex)(hue, saturation, lightness);
}
class CpuProfileTrack extends track.Track {
    constructor(args) {
        super(args);
        this.centerY = this.getHeight() / 2 + BAR_HEIGHT;
        this.markerWidth = (this.getHeight() - MARGIN_TOP - BAR_HEIGHT) / 2;
        this.hoveredTs = undefined;
    }
    static create(args) {
        return new CpuProfileTrack(args);
    }
    getHeight() {
        return MARGIN_TOP + RECT_HEIGHT - 1;
    }
    renderCanvas(ctx) {
        const { timeScale, } = globals.globals.frontendLocalState;
        const data = this.data();
        if (data === undefined)
            return;
        for (let i = 0; i < data.tsStarts.length; i++) {
            const centerX = data.tsStarts[i];
            const selection = globals.globals.state.currentSelection;
            const isHovered = this.hoveredTs === centerX;
            const isSelected = selection !== null &&
                selection.kind === 'CPU_PROFILE_SAMPLE' && selection.ts === centerX;
            const strokeWidth = isSelected ? 3 : 0;
            this.drawMarker(ctx, timeScale.timeToPx((0, time.fromNs)(centerX)), this.centerY, isHovered, strokeWidth, data.callsiteId[i]);
        }
        // Group together identical identical CPU profile samples by connecting them
        // with an horizontal bar.
        let clusterStartIndex = 0;
        while (clusterStartIndex < data.tsStarts.length) {
            const callsiteId = data.callsiteId[clusterStartIndex];
            // Find the end of the cluster by searching for the next different CPU
            // sample. The resulting range [clusterStartIndex, clusterEndIndex] is
            // inclusive and within array bounds.
            let clusterEndIndex = clusterStartIndex;
            while (clusterEndIndex + 1 < data.tsStarts.length &&
                data.callsiteId[clusterEndIndex + 1] === callsiteId) {
                clusterEndIndex++;
            }
            // If there are multiple CPU samples in the cluster, draw a line.
            if (clusterStartIndex !== clusterEndIndex) {
                const startX = data.tsStarts[clusterStartIndex];
                const endX = data.tsStarts[clusterEndIndex];
                const leftPx = timeScale.timeToPx((0, time.fromNs)(startX)) - this.markerWidth;
                const rightPx = timeScale.timeToPx((0, time.fromNs)(endX)) + this.markerWidth;
                const width = rightPx - leftPx;
                ctx.fillStyle = colorForSample(callsiteId, false);
                ctx.fillRect(leftPx, MARGIN_TOP, width, BAR_HEIGHT);
            }
            // Move to the next cluster.
            clusterStartIndex = clusterEndIndex + 1;
        }
    }
    drawMarker(ctx, x, y, isHovered, strokeWidth, callsiteId) {
        ctx.beginPath();
        ctx.moveTo(x - this.markerWidth, y - this.markerWidth);
        ctx.lineTo(x, y + this.markerWidth);
        ctx.lineTo(x + this.markerWidth, y - this.markerWidth);
        ctx.lineTo(x - this.markerWidth, y - this.markerWidth);
        ctx.closePath();
        ctx.fillStyle = colorForSample(callsiteId, isHovered);
        ctx.fill();
        if (strokeWidth > 0) {
            ctx.strokeStyle = colorForSample(callsiteId, false);
            ctx.lineWidth = strokeWidth;
            ctx.stroke();
        }
    }
    onMouseMove({ x, y }) {
        const data = this.data();
        if (data === undefined)
            return;
        const { timeScale } = globals.globals.frontendLocalState;
        const time$1 = (0, time.toNs)(timeScale.pxToTime(x));
        const [left, right] = (0, binary_search.searchSegment)(data.tsStarts, time$1);
        const index = this.findTimestampIndex(left, timeScale, data, x, y, right);
        this.hoveredTs = index === -1 ? undefined : data.tsStarts[index];
    }
    onMouseOut() {
        this.hoveredTs = undefined;
    }
    onMouseClick({ x, y }) {
        const data = this.data();
        if (data === undefined)
            return false;
        const { timeScale } = globals.globals.frontendLocalState;
        const time$1 = (0, time.toNs)(timeScale.pxToTime(x));
        const [left, right] = (0, binary_search.searchSegment)(data.tsStarts, time$1);
        const index = this.findTimestampIndex(left, timeScale, data, x, y, right);
        if (index !== -1) {
            const id = data.ids[index];
            const ts = data.tsStarts[index];
            globals.globals.makeSelection(actions.Actions.selectCpuProfileSample({ id, utid: this.config.utid, ts }));
            return true;
        }
        return false;
    }
    // If the markers overlap the rightmost one will be selected.
    findTimestampIndex(left, timeScale, data, x, y, right) {
        let index = -1;
        if (left !== -1) {
            const centerX = timeScale.timeToPx((0, time.fromNs)(data.tsStarts[left]));
            if (this.isInMarker(x, y, centerX)) {
                index = left;
            }
        }
        if (right !== -1) {
            const centerX = timeScale.timeToPx((0, time.fromNs)(data.tsStarts[right]));
            if (this.isInMarker(x, y, centerX)) {
                index = right;
            }
        }
        return index;
    }
    isInMarker(x, y, centerX) {
        return Math.abs(x - centerX) + Math.abs(y - this.centerY) <=
            this.markerWidth;
    }
}
CpuProfileTrack.kind = exports.CPU_PROFILE_TRACK_KIND;
function activate(ctx) {
    ctx.registerTrackController(CpuProfileTrackController);
    ctx.registerTrack(CpuProfileTrack);
}
exports.plugin = {
    pluginId: 'perfetto.CpuProfile',
    activate,
};

});

var cpu_slices = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.plugin = exports.CPU_SLICE_TRACK_KIND = void 0;












exports.CPU_SLICE_TRACK_KIND = 'CpuSliceTrack';
class CpuSliceTrackController extends track_controller.TrackController {
    constructor() {
        super(...arguments);
        this.cachedBucketNs = Number.MAX_SAFE_INTEGER;
        this.maxDurNs = 0;
        this.lastRowId = -1;
    }
    onSetup() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            yield this.query(`
      create view ${this.tableName('sched')} as
      select
        ts,
        dur,
        utid,
        id,
        dur = -1 as isIncomplete
      from sched
      where cpu = ${this.config.cpu} and utid != 0
    `);
            const queryRes = yield this.query(`
      select ifnull(max(dur), 0) as maxDur, count(1) as rowCount
      from ${this.tableName('sched')}
    `);
            const queryLastSlice = yield this.query(`
    select max(id) as lastSliceId from ${this.tableName('sched')}
    `);
            this.lastRowId = queryLastSlice.firstRow({ lastSliceId: query_result.NUM }).lastSliceId;
            const row = queryRes.firstRow({ maxDur: query_result.NUM, rowCount: query_result.NUM });
            this.maxDurNs = row.maxDur;
            const rowCount = row.rowCount;
            const bucketNs = this.cachedBucketSizeNs(rowCount);
            if (bucketNs === undefined) {
                return;
            }
            yield this.query(`
      create table ${this.tableName('sched_cached')} as
      select
        (ts + ${bucketNs / 2}) / ${bucketNs} * ${bucketNs} as cached_tsq,
        ts,
        max(dur) as dur,
        utid,
        id,
        isIncomplete
      from ${this.tableName('sched')}
      group by cached_tsq, isIncomplete
      order by cached_tsq
    `);
            this.cachedBucketNs = bucketNs;
        });
    }
    onBoundsChange(start, end, resolution) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const resolutionNs = (0, time.toNs)(resolution);
            // The resolution should always be a power of two for the logic of this
            // function to make sense.
            (0, logging.assertTrue)(Math.log2(resolutionNs) % 1 === 0);
            const boundStartNs = (0, time.toNs)(start);
            const boundEndNs = (0, time.toNs)(end);
            // ns per quantization bucket (i.e. ns per pixel). /2 * 2 is to force it to
            // be an even number, so we can snap in the middle.
            const bucketNs = Math.max(Math.round(resolutionNs * this.pxSize() / 2) * 2, 1);
            const isCached = this.cachedBucketNs <= bucketNs;
            const queryTsq = isCached ?
                `cached_tsq / ${bucketNs} * ${bucketNs}` :
                `(ts + ${bucketNs / 2}) / ${bucketNs} * ${bucketNs}`;
            const queryTable = isCached ? this.tableName('sched_cached') : this.tableName('sched');
            const constraintColumn = isCached ? 'cached_tsq' : 'ts';
            const queryRes = yield this.query(`
      select
        ${queryTsq} as tsq,
        ts,
        max(dur) as dur,
        utid,
        id,
        isIncomplete
      from ${queryTable}
      where
        ${constraintColumn} >= ${boundStartNs - this.maxDurNs} and
        ${constraintColumn} <= ${boundEndNs}
      group by tsq, isIncomplete
      order by tsq
    `);
            const numRows = queryRes.numRows();
            const slices = {
                start,
                end,
                resolution,
                length: numRows,
                lastRowId: this.lastRowId,
                ids: new Float64Array(numRows),
                starts: new Float64Array(numRows),
                ends: new Float64Array(numRows),
                utids: new Uint32Array(numRows),
                isIncomplete: new Uint8Array(numRows),
            };
            const it = queryRes.iter({ tsq: query_result.NUM, ts: query_result.NUM, dur: query_result.NUM, utid: query_result.NUM, id: query_result.NUM, isIncomplete: query_result.NUM });
            for (let row = 0; it.valid(); it.next(), row++) {
                const startNsQ = it.tsq;
                const startNs = it.ts;
                const durNs = it.dur;
                const endNs = startNs + durNs;
                // If the slice is incomplete, the end calculated later.
                if (!it.isIncomplete) {
                    let endNsQ = Math.floor((endNs + bucketNs / 2 - 1) / bucketNs) * bucketNs;
                    endNsQ = Math.max(endNsQ, startNsQ + bucketNs);
                    slices.ends[row] = (0, time.fromNs)(endNsQ);
                }
                slices.starts[row] = (0, time.fromNs)(startNsQ);
                slices.utids[row] = it.utid;
                slices.ids[row] = it.id;
                slices.isIncomplete[row] = it.isIncomplete;
            }
            // If the slice is incomplete and it is the last slice in the track, the end
            // of the slice would be the end of the visible window. Otherwise we end the
            // slice with the beginning the next one.
            for (let row = 0; row < slices.length; row++) {
                if (!slices.isIncomplete[row]) {
                    continue;
                }
                const endNs = row === slices.length - 1 ? boundEndNs : (0, time.toNs)(slices.starts[row + 1]);
                let endNsQ = Math.floor((endNs + bucketNs / 2 - 1) / bucketNs) * bucketNs;
                endNsQ = Math.max(endNsQ, (0, time.toNs)(slices.starts[row]) + bucketNs);
                slices.ends[row] = (0, time.fromNs)(endNsQ);
            }
            return slices;
        });
    }
    onDestroy() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            yield this.query(`drop table if exists ${this.tableName('sched_cached')}`);
        });
    }
}
CpuSliceTrackController.kind = exports.CPU_SLICE_TRACK_KIND;
const MARGIN_TOP = 3;
const RECT_HEIGHT = 24;
const TRACK_HEIGHT = MARGIN_TOP * 2 + RECT_HEIGHT;
class CpuSliceTrack extends track.Track {
    constructor(args) {
        super(args);
        this.utidHoveredInThisTrack = -1;
    }
    static create(args) {
        return new CpuSliceTrack(args);
    }
    getHeight() {
        return TRACK_HEIGHT;
    }
    renderCanvas(ctx) {
        // TODO: fonts and colors should come from the CSS and not hardcoded here.
        const { timeScale, visibleWindowTime } = globals.globals.frontendLocalState;
        const data = this.data();
        if (data === undefined)
            return; // Can't possibly draw anything.
        // If the cached trace slices don't fully cover the visible time range,
        // show a gray rectangle with a "Loading..." label.
        (0, checkerboard_1.checkerboardExcept)(ctx, this.getHeight(), timeScale.timeToPx(visibleWindowTime.start), timeScale.timeToPx(visibleWindowTime.end), timeScale.timeToPx(data.start), timeScale.timeToPx(data.end));
        this.renderSlices(ctx, data);
    }
    renderSlices(ctx, data) {
        const { timeScale, visibleWindowTime } = globals.globals.frontendLocalState;
        (0, logging.assertTrue)(data.starts.length === data.ends.length);
        (0, logging.assertTrue)(data.starts.length === data.utids.length);
        ctx.textAlign = 'center';
        ctx.font = '12px Roboto Condensed';
        const charWidth = ctx.measureText('dbpqaouk').width / 8;
        const rawStartIdx = data.ends.findIndex((end) => end >= visibleWindowTime.start);
        const startIdx = rawStartIdx === -1 ? 0 : rawStartIdx;
        const [, rawEndIdx] = (0, binary_search.searchSegment)(data.starts, visibleWindowTime.end);
        const endIdx = rawEndIdx === -1 ? data.starts.length : rawEndIdx;
        for (let i = startIdx; i < endIdx; i++) {
            const tStart = data.starts[i];
            let tEnd = data.ends[i];
            const utid = data.utids[i];
            // If the last slice is incomplete, it should end with the end of the
            // window, else it might spill over the window and the end would not be
            // visible as a zigzag line.
            if (data.ids[i] === data.lastRowId && data.isIncomplete[i]) {
                tEnd = visibleWindowTime.end;
            }
            const rectStart = timeScale.timeToPx(tStart);
            const rectEnd = timeScale.timeToPx(tEnd);
            const rectWidth = Math.max(1, rectEnd - rectStart);
            const threadInfo = globals.globals.threads.get(utid);
            const pid = threadInfo && threadInfo.pid ? threadInfo.pid : -1;
            const isHovering = globals.globals.state.hoveredUtid !== -1;
            const isThreadHovered = globals.globals.state.hoveredUtid === utid;
            const isProcessHovered = globals.globals.state.hoveredPid === pid;
            const color = (0, colorizer.colorForThread)(threadInfo);
            if (isHovering && !isThreadHovered) {
                if (!isProcessHovered) {
                    color.l = 90;
                    color.s = 0;
                }
                else {
                    color.l = Math.min(color.l + 30, 80);
                    color.s -= 20;
                }
            }
            else {
                color.l = Math.min(color.l + 10, 60);
                color.s -= 20;
            }
            ctx.fillStyle = `hsl(${color.h}, ${color.s}%, ${color.l}%)`;
            if (data.isIncomplete[i]) {
                (0, canvas_utils.drawIncompleteSlice)(ctx, rectStart, MARGIN_TOP, rectWidth, RECT_HEIGHT);
            }
            else {
                ctx.fillRect(rectStart, MARGIN_TOP, rectWidth, RECT_HEIGHT);
            }
            // Don't render text when we have less than 5px to play with.
            if (rectWidth < 5)
                continue;
            // TODO: consider de-duplicating this code with the copied one from
            // chrome_slices/frontend.ts.
            let title = `[utid:${utid}]`;
            let subTitle = '';
            if (threadInfo) {
                if (threadInfo.pid) {
                    let procName = threadInfo.procName || '';
                    if (procName.startsWith('/')) { // Remove folder paths from name
                        procName = procName.substring(procName.lastIndexOf('/') + 1);
                    }
                    title = `${procName} [${threadInfo.pid}]`;
                    subTitle = `${threadInfo.threadName} [${threadInfo.tid}]`;
                }
                else {
                    title = `${threadInfo.threadName} [${threadInfo.tid}]`;
                }
            }
            title = (0, canvas_utils.cropText)(title, charWidth, rectWidth);
            subTitle = (0, canvas_utils.cropText)(subTitle, charWidth, rectWidth);
            const rectXCenter = rectStart + rectWidth / 2;
            ctx.fillStyle = '#fff';
            ctx.font = '12px Roboto Condensed';
            ctx.fillText(title, rectXCenter, MARGIN_TOP + RECT_HEIGHT / 2 - 1);
            ctx.fillStyle = 'rgba(255, 255, 255, 0.6)';
            ctx.font = '10px Roboto Condensed';
            ctx.fillText(subTitle, rectXCenter, MARGIN_TOP + RECT_HEIGHT / 2 + 9);
        }
        const selection = globals.globals.state.currentSelection;
        const details = globals.globals.sliceDetails;
        if (selection !== null && selection.kind === 'SLICE') {
            const [startIndex, endIndex] = (0, binary_search.searchEq)(data.ids, selection.id);
            if (startIndex !== endIndex) {
                const tStart = data.starts[startIndex];
                const tEnd = data.ends[startIndex];
                const utid = data.utids[startIndex];
                const color = (0, colorizer.colorForThread)(globals.globals.threads.get(utid));
                const rectStart = timeScale.timeToPx(tStart);
                const rectEnd = timeScale.timeToPx(tEnd);
                const rectWidth = Math.max(1, rectEnd - rectStart);
                // Draw a rectangle around the slice that is currently selected.
                ctx.strokeStyle = `hsl(${color.h}, ${color.s}%, 30%)`;
                ctx.beginPath();
                ctx.lineWidth = 3;
                ctx.strokeRect(rectStart, MARGIN_TOP - 1.5, rectWidth, RECT_HEIGHT + 3);
                ctx.closePath();
                // Draw arrow from wakeup time of current slice.
                if (details.wakeupTs) {
                    const wakeupPos = timeScale.timeToPx(details.wakeupTs);
                    const latencyWidth = rectStart - wakeupPos;
                    (0, canvas_utils.drawDoubleHeadedArrow)(ctx, wakeupPos, MARGIN_TOP + RECT_HEIGHT, latencyWidth, latencyWidth >= 20);
                    // Latency time with a white semi-transparent background.
                    const displayText = (0, time.timeToString)(tStart - details.wakeupTs);
                    const measured = ctx.measureText(displayText);
                    if (latencyWidth >= measured.width + 2) {
                        ctx.fillStyle = 'rgba(255,255,255,0.7)';
                        ctx.fillRect(wakeupPos + latencyWidth / 2 - measured.width / 2 - 1, MARGIN_TOP + RECT_HEIGHT - 12, measured.width + 2, 11);
                        ctx.textBaseline = 'bottom';
                        ctx.fillStyle = 'black';
                        ctx.fillText(displayText, wakeupPos + (latencyWidth) / 2, MARGIN_TOP + RECT_HEIGHT - 1);
                    }
                }
            }
            // Draw diamond if the track being drawn is the cpu of the waker.
            if (this.config.cpu === details.wakerCpu && details.wakeupTs) {
                const wakeupPos = Math.floor(timeScale.timeToPx(details.wakeupTs));
                ctx.beginPath();
                ctx.moveTo(wakeupPos, MARGIN_TOP + RECT_HEIGHT / 2 + 8);
                ctx.fillStyle = 'black';
                ctx.lineTo(wakeupPos + 6, MARGIN_TOP + RECT_HEIGHT / 2);
                ctx.lineTo(wakeupPos, MARGIN_TOP + RECT_HEIGHT / 2 - 8);
                ctx.lineTo(wakeupPos - 6, MARGIN_TOP + RECT_HEIGHT / 2);
                ctx.fill();
                ctx.closePath();
            }
        }
        const hoveredThread = globals.globals.threads.get(this.utidHoveredInThisTrack);
        if (hoveredThread !== undefined && this.mousePos !== undefined) {
            const tidText = `T: ${hoveredThread.threadName} [${hoveredThread.tid}]`;
            if (hoveredThread.pid) {
                const pidText = `P: ${hoveredThread.procName} [${hoveredThread.pid}]`;
                this.drawTrackHoverTooltip(ctx, this.mousePos, pidText, tidText);
            }
            else {
                this.drawTrackHoverTooltip(ctx, this.mousePos, tidText);
            }
        }
    }
    onMouseMove(pos) {
        const data = this.data();
        this.mousePos = pos;
        if (data === undefined)
            return;
        const { timeScale } = globals.globals.frontendLocalState;
        if (pos.y < MARGIN_TOP || pos.y > MARGIN_TOP + RECT_HEIGHT) {
            this.utidHoveredInThisTrack = -1;
            globals.globals.dispatch(actions.Actions.setHoveredUtidAndPid({ utid: -1, pid: -1 }));
            return;
        }
        const t = timeScale.pxToTime(pos.x);
        let hoveredUtid = -1;
        for (let i = 0; i < data.starts.length; i++) {
            const tStart = data.starts[i];
            const tEnd = data.ends[i];
            const utid = data.utids[i];
            if (tStart <= t && t <= tEnd) {
                hoveredUtid = utid;
                break;
            }
        }
        this.utidHoveredInThisTrack = hoveredUtid;
        const threadInfo = globals.globals.threads.get(hoveredUtid);
        const hoveredPid = threadInfo ? (threadInfo.pid ? threadInfo.pid : -1) : -1;
        globals.globals.dispatch(actions.Actions.setHoveredUtidAndPid({ utid: hoveredUtid, pid: hoveredPid }));
    }
    onMouseOut() {
        this.utidHoveredInThisTrack = -1;
        globals.globals.dispatch(actions.Actions.setHoveredUtidAndPid({ utid: -1, pid: -1 }));
        this.mousePos = undefined;
    }
    onMouseClick({ x }) {
        const data = this.data();
        if (data === undefined)
            return false;
        const { timeScale } = globals.globals.frontendLocalState;
        const time = timeScale.pxToTime(x);
        const index = (0, binary_search.search)(data.starts, time);
        const id = index === -1 ? undefined : data.ids[index];
        if (!id || this.utidHoveredInThisTrack === -1)
            return false;
        globals.globals.makeSelection(actions.Actions.selectSlice({ id, trackId: this.trackState.id }));
        return true;
    }
}
CpuSliceTrack.kind = exports.CPU_SLICE_TRACK_KIND;
function activate(ctx) {
    ctx.registerTrackController(CpuSliceTrackController);
    ctx.registerTrack(CpuSliceTrack);
}
exports.plugin = {
    pluginId: 'perfetto.CpuSlices',
    activate,
};

});

var css_constants = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.initCssConstants = exports.DEFAULT_DETAILS_CONTENT_HEIGHT = exports.OVERVIEW_TIMELINE_NON_VISIBLE_COLOR = exports.SELECTION_FILL_COLOR = exports.SELECTION_STROKE_COLOR = exports.TOPBAR_HEIGHT = exports.TRACK_BORDER_COLOR = exports.SIDEBAR_WIDTH = exports.TRACK_SHELL_WIDTH = void 0;
// This code can be used in unittests where we can't read CSS variables.
// Also we cannot have global constructors beacause when the javascript is
// loaded, the CSS might not be ready yet.
exports.TRACK_SHELL_WIDTH = 100;
exports.SIDEBAR_WIDTH = 100;
exports.TRACK_BORDER_COLOR = '#ffc0cb';
exports.TOPBAR_HEIGHT = 48;
exports.SELECTION_STROKE_COLOR = '#00344596';
exports.SELECTION_FILL_COLOR = '#8398e64d';
exports.OVERVIEW_TIMELINE_NON_VISIBLE_COLOR = '#c8c8c8cc';
exports.DEFAULT_DETAILS_CONTENT_HEIGHT = 280;
function initCssConstants() {
    exports.TRACK_SHELL_WIDTH = getCssNum('--track-shell-width') || exports.TRACK_SHELL_WIDTH;
    exports.SIDEBAR_WIDTH = getCssNum('--sidebar-width') || exports.SIDEBAR_WIDTH;
    exports.TRACK_BORDER_COLOR = getCssStr('--track-border-color') || exports.TRACK_BORDER_COLOR;
    exports.TOPBAR_HEIGHT = getCssNum('--topbar-height') || exports.TOPBAR_HEIGHT;
    exports.SELECTION_STROKE_COLOR =
        getCssStr('--selection-stroke-color') || exports.SELECTION_STROKE_COLOR;
    exports.SELECTION_FILL_COLOR =
        getCssStr('--selection-fill-color') || exports.SELECTION_FILL_COLOR;
    exports.OVERVIEW_TIMELINE_NON_VISIBLE_COLOR =
        getCssStr('--overview-timeline-non-visible-color') ||
            exports.OVERVIEW_TIMELINE_NON_VISIBLE_COLOR;
    exports.DEFAULT_DETAILS_CONTENT_HEIGHT =
        getCssNum('--details-content-height') || exports.DEFAULT_DETAILS_CONTENT_HEIGHT;
}
exports.initCssConstants = initCssConstants;
function getCssStr(prop) {
    if (typeof window === 'undefined')
        return undefined;
    const body = window.document.body;
    return window.getComputedStyle(body).getPropertyValue(prop);
}
function getCssNum(prop) {
    const str = getCssStr(prop);
    if (str === undefined)
        return undefined;
    const match = str.match(/^\W*(\d+)px(|\!important')$/);
    if (!match)
        throw Error(`Could not parse CSS property "${str}" as a number`);
    return Number(match[1]);
}

});

var gridline_helper = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.drawGridLines = exports.gridlines = exports.getGridStepSize = exports.DESIRED_PX_PER_STEP = void 0;

exports.DESIRED_PX_PER_STEP = 80;
// Returns the step size of a grid line in seconds.
// The returned step size has two properties:
// (1) It is 1, 2, or 5, multiplied by some integer power of 10.
// (2) The number steps in |range| produced by |stepSize| is as close as
//     possible to |desiredSteps|.
function getGridStepSize(range, desiredSteps) {
    // First, get the largest possible power of 10 that is smaller than the
    // desired step size, and set it to the current step size.
    // For example, if the range is 2345ms and the desired steps is 10, then the
    // desired step size is 234.5 and the step size will be set to 100.
    const desiredStepSize = range / desiredSteps;
    const zeros = Math.floor(Math.log10(desiredStepSize));
    const initialStepSize = Math.pow(10, zeros);
    // This function first calculates how many steps within the range a certain
    // stepSize will produce, and returns the difference between that and
    // desiredSteps.
    const distToDesired = (evaluatedStepSize) => Math.abs(range / evaluatedStepSize - desiredSteps);
    // We know that |initialStepSize| is a power of 10, and
    // initialStepSize <= desiredStepSize <= 10 * initialStepSize. There are four
    // possible candidates for final step size: 1, 2, 5 or 10 * initialStepSize.
    // We pick the candidate that minimizes distToDesired(stepSize).
    const stepSizeMultipliers = [2, 5, 10];
    let minimalDistance = distToDesired(initialStepSize);
    let minimizingStepSize = initialStepSize;
    for (const multiplier of stepSizeMultipliers) {
        const newStepSize = multiplier * initialStepSize;
        const newDistance = distToDesired(newStepSize);
        if (newDistance < minimalDistance) {
            minimalDistance = newDistance;
            minimizingStepSize = newStepSize;
        }
    }
    return minimizingStepSize;
}
exports.getGridStepSize = getGridStepSize;
// Generator that returns that (given a width im px, span, and scale) returns
// pairs of [xInPx, timestampInS] pairs describing where gridlines should be
// drawn.
function gridlines(width, span, timescale) {
    const desiredSteps = width / exports.DESIRED_PX_PER_STEP;
    const step = getGridStepSize(span.duration, desiredSteps);
    const actualSteps = Math.floor(span.duration / step);
    const start = Math.round(span.start / step) * step;
    const lines = [];
    let previousTimestamp = Number.NEGATIVE_INFINITY;
    // Iterating over the number of steps instead of
    // for (let s = start; s < span.end; s += step) because if start is very large
    // number and step very small, s will never reach end.
    for (let i = 0; i <= actualSteps; i++) {
        let xPos = css_constants.TRACK_SHELL_WIDTH;
        const timestamp = start + i * step;
        xPos += Math.floor(timescale.timeToPx(timestamp));
        if (xPos < css_constants.TRACK_SHELL_WIDTH)
            continue;
        if (xPos > width)
            break;
        if (Math.abs(timestamp - previousTimestamp) > Number.EPSILON) {
            previousTimestamp = timestamp;
            lines.push([xPos, timestamp]);
        }
    }
    return lines;
}
exports.gridlines = gridlines;
function drawGridLines(ctx, x, timeSpan, width, height) {
    ctx.strokeStyle = css_constants.TRACK_BORDER_COLOR;
    ctx.lineWidth = 1;
    for (const xAndTime of gridlines(width, timeSpan, x)) {
        ctx.beginPath();
        ctx.moveTo(xAndTime[0] + 0.5, 0);
        ctx.lineTo(xAndTime[0] + 0.5, height);
        ctx.stroke();
    }
}
exports.drawGridLines = drawGridLines;

});

var icons = createCommonjsModule(function (module, exports) {
// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.STAR_BORDER = exports.STAR = exports.EXPAND_UP = exports.EXPAND_DOWN = exports.INDETERMINATE_CHECKBOX = exports.CHECKBOX = exports.BLANK_CHECKBOX = void 0;
exports.BLANK_CHECKBOX = 'check_box_outline_blank';
exports.CHECKBOX = 'check_box';
exports.INDETERMINATE_CHECKBOX = 'indeterminate_check_box';
exports.EXPAND_DOWN = 'expand_more';
exports.EXPAND_UP = 'expand_less';
exports.STAR = 'star';
exports.STAR_BORDER = 'star_border';

});

var panel = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.isPanelVNode = exports.Panel = void 0;
class Panel {
}
exports.Panel = Panel;
function isPanelVNode(vnode) {
    const tag = vnode.tag;
    return (typeof tag === 'function' && 'prototype' in tag &&
        tag.prototype instanceof Panel);
}
exports.isPanelVNode = isPanelVNode;

});

var vertical_line_helper = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.drawVerticalLineAtTime = void 0;

function drawVerticalLineAtTime(ctx, timeScale, time, height, color, lineWidth = 2) {
    const xPos = css_constants.TRACK_SHELL_WIDTH + Math.floor(timeScale.timeToPx(time));
    drawVerticalLine(ctx, xPos, height, color, lineWidth);
}
exports.drawVerticalLineAtTime = drawVerticalLineAtTime;
function drawVerticalLine(ctx, xPos, height, color, lineWidth = 2) {
    ctx.beginPath();
    ctx.strokeStyle = color;
    const prevLineWidth = ctx.lineWidth;
    ctx.lineWidth = lineWidth;
    ctx.moveTo(xPos, 0);
    ctx.lineTo(xPos, height);
    ctx.stroke();
    ctx.closePath();
    ctx.lineWidth = prevLineWidth;
}

});

var track_panel = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.TrackPanel = exports.TrackButton = exports.TrackContent = void 0;











function isPinned(id) {
    return globals.globals.state.pinnedTracks.indexOf(id) !== -1;
}
function isSelected(id) {
    const selection = globals.globals.state.currentSelection;
    if (selection === null || selection.kind !== 'AREA')
        return false;
    const selectedArea = globals.globals.state.areas[selection.areaId];
    return selectedArea.tracks.includes(id);
}
class TrackShell {
    constructor() {
        // Set to true when we click down and drag the
        this.dragging = false;
        this.dropping = undefined;
    }
    oninit(vnode) {
        this.attrs = vnode.attrs;
    }
    view({ attrs }) {
        // The shell should be highlighted if the current search result is inside
        // this track.
        let highlightClass = '';
        const searchIndex = globals.globals.state.searchIndex;
        if (searchIndex !== -1) {
            const trackId = globals.globals.currentSearchResults.trackIds[searchIndex];
            if (trackId === attrs.trackState.id) {
                highlightClass = 'flash';
            }
        }
        const dragClass = this.dragging ? `drag` : '';
        const dropClass = this.dropping ? `drop-${this.dropping}` : '';
        return mithril(`.track-shell[draggable=true]`, {
            class: `${highlightClass} ${dragClass} ${dropClass}`,
            onmousedown: this.onmousedown.bind(this),
            ondragstart: this.ondragstart.bind(this),
            ondragend: this.ondragend.bind(this),
            ondragover: this.ondragover.bind(this),
            ondragleave: this.ondragleave.bind(this),
            ondrop: this.ondrop.bind(this),
        }, mithril('h1', {
            title: attrs.trackState.name,
        }, attrs.trackState.name, ('namespace' in attrs.trackState.config) &&
            mithril('span.chip', 'metric')), mithril('.track-buttons', attrs.track.getTrackShellButtons(), attrs.track.getContextMenu(), mithril(TrackButton, {
            action: () => {
                globals.globals.dispatch(actions.Actions.toggleTrackPinned({ trackId: attrs.trackState.id }));
            },
            i: isPinned(attrs.trackState.id) ? icons.STAR : icons.STAR_BORDER,
            tooltip: isPinned(attrs.trackState.id) ? 'Unpin' : 'Pin to top',
            showButton: isPinned(attrs.trackState.id),
            fullHeight: true,
        }), globals.globals.state.currentSelection !== null &&
            globals.globals.state.currentSelection.kind === 'AREA' ?
            mithril(TrackButton, {
                action: (e) => {
                    globals.globals.dispatch(actions.Actions.toggleTrackSelection({ id: attrs.trackState.id, isTrackGroup: false }));
                    e.stopPropagation();
                },
                i: isSelected(attrs.trackState.id) ? icons.CHECKBOX : icons.BLANK_CHECKBOX,
                tooltip: isSelected(attrs.trackState.id) ?
                    'Remove track' :
                    'Add track to selection',
                showButton: true,
            }) :
            ''));
    }
    onmousedown(e) {
        // Prevent that the click is intercepted by the PanAndZoomHandler and that
        // we start panning while dragging.
        e.stopPropagation();
    }
    ondragstart(e) {
        const dataTransfer = e.dataTransfer;
        if (dataTransfer === null)
            return;
        this.dragging = true;
        globals.globals.rafScheduler.scheduleFullRedraw();
        dataTransfer.setData('perfetto/track', `${this.attrs.trackState.id}`);
        dataTransfer.setDragImage(new Image(), 0, 0);
        e.stopImmediatePropagation();
    }
    ondragend() {
        this.dragging = false;
        globals.globals.rafScheduler.scheduleFullRedraw();
    }
    ondragover(e) {
        if (this.dragging)
            return;
        if (!(e.target instanceof HTMLElement))
            return;
        const dataTransfer = e.dataTransfer;
        if (dataTransfer === null)
            return;
        if (!dataTransfer.types.includes('perfetto/track'))
            return;
        dataTransfer.dropEffect = 'move';
        e.preventDefault();
        // Apply some hysteresis to the drop logic so that the lightened border
        // changes only when we get close enough to the border.
        if (e.offsetY < e.target.scrollHeight / 3) {
            this.dropping = 'before';
        }
        else if (e.offsetY > e.target.scrollHeight / 3 * 2) {
            this.dropping = 'after';
        }
        globals.globals.rafScheduler.scheduleFullRedraw();
    }
    ondragleave() {
        this.dropping = undefined;
        globals.globals.rafScheduler.scheduleFullRedraw();
    }
    ondrop(e) {
        if (this.dropping === undefined)
            return;
        const dataTransfer = e.dataTransfer;
        if (dataTransfer === null)
            return;
        globals.globals.rafScheduler.scheduleFullRedraw();
        const srcId = dataTransfer.getData('perfetto/track');
        const dstId = this.attrs.trackState.id;
        globals.globals.dispatch(actions.Actions.moveTrack({ srcId, op: this.dropping, dstId }));
        this.dropping = undefined;
    }
}
class TrackContent {
    constructor() {
        this.selectionOccurred = false;
    }
    view(node) {
        const attrs = node.attrs;
        return mithril('.track-content', {
            onmousemove: (e) => {
                attrs.track.onMouseMove({ x: e.layerX - css_constants.TRACK_SHELL_WIDTH, y: e.layerY });
                globals.globals.rafScheduler.scheduleRedraw();
            },
            onmouseout: () => {
                attrs.track.onMouseOut();
                globals.globals.rafScheduler.scheduleRedraw();
            },
            onmousedown: (e) => {
                this.mouseDownX = e.layerX;
                this.mouseDownY = e.layerY;
            },
            onmouseup: (e) => {
                if (this.mouseDownX === undefined ||
                    this.mouseDownY === undefined) {
                    return;
                }
                if (Math.abs(e.layerX - this.mouseDownX) > 1 ||
                    Math.abs(e.layerY - this.mouseDownY) > 1) {
                    this.selectionOccurred = true;
                }
                this.mouseDownX = undefined;
                this.mouseDownY = undefined;
            },
            onclick: (e) => {
                // This click event occurs after any selection mouse up/drag events
                // so we have to look if the mouse moved during this click to know
                // if a selection occurred.
                if (this.selectionOccurred) {
                    this.selectionOccurred = false;
                    return;
                }
                // Returns true if something was selected, so stop propagation.
                if (attrs.track.onMouseClick({ x: e.layerX - css_constants.TRACK_SHELL_WIDTH, y: e.layerY })) {
                    e.stopPropagation();
                }
                globals.globals.rafScheduler.scheduleRedraw();
            },
        }, node.children);
    }
}
exports.TrackContent = TrackContent;
class TrackComponent {
    view({ attrs }) {
        return mithril('.track', {
            style: {
                height: `${Math.max(24, attrs.track.getHeight())}px`,
            },
            id: 'track_' + attrs.trackState.id,
        }, [
            mithril(TrackShell, { track: attrs.track, trackState: attrs.trackState }),
            mithril(TrackContent, { track: attrs.track }),
        ]);
    }
    oncreate({ attrs }) {
        if (globals.globals.frontendLocalState.scrollToTrackId === attrs.trackState.id) {
            (0, scroll_helper.verticalScrollToTrack)(attrs.trackState.id);
            globals.globals.frontendLocalState.scrollToTrackId = undefined;
        }
    }
}
class TrackButton {
    view({ attrs }) {
        return mithril('i.material-icons.track-button', {
            class: [
                (attrs.showButton ? 'show' : ''),
                (attrs.fullHeight ? 'full-height' : ''),
            ].filter(Boolean)
                .join(' '),
            onclick: attrs.action,
            title: attrs.tooltip,
        }, attrs.i);
    }
}
exports.TrackButton = TrackButton;
class TrackPanel extends panel.Panel {
    constructor(vnode) {
        super();
        const trackId = vnode.attrs.id;
        const trackState = globals.globals.state.tracks[trackId];
        if (trackState === undefined) {
            return;
        }
        const engine = globals.globals.engines.get(trackState.engineId);
        if (engine === undefined) {
            return;
        }
        const trackCreator = track_registry.trackRegistry.get(trackState.kind);
        this.track = trackCreator.create({ trackId, engine });
        this.trackState = trackState;
    }
    view() {
        if (this.track === undefined || this.trackState === undefined) {
            return mithril('div', 'No such track');
        }
        return mithril(TrackComponent, { trackState: this.trackState, track: this.track });
    }
    oncreate() {
        if (this.track !== undefined) {
            this.track.onFullRedraw();
        }
    }
    onupdate() {
        if (this.track !== undefined) {
            this.track.onFullRedraw();
        }
    }
    onremove() {
        if (this.track !== undefined) {
            this.track.onDestroy();
            this.track = undefined;
        }
    }
    highlightIfTrackSelected(ctx, size) {
        const localState = globals.globals.frontendLocalState;
        const selection = globals.globals.state.currentSelection;
        const trackState = this.trackState;
        if (!selection || selection.kind !== 'AREA' || trackState === undefined) {
            return;
        }
        const selectedArea = globals.globals.state.areas[selection.areaId];
        if (selectedArea.tracks.includes(trackState.id)) {
            const timeScale = localState.timeScale;
            ctx.fillStyle = css_constants.SELECTION_FILL_COLOR;
            ctx.fillRect(timeScale.timeToPx(selectedArea.startSec) + css_constants.TRACK_SHELL_WIDTH, 0, timeScale.deltaTimeToPx(selectedArea.endSec - selectedArea.startSec), size.height);
        }
    }
    renderCanvas(ctx, size) {
        ctx.save();
        (0, gridline_helper.drawGridLines)(ctx, globals.globals.frontendLocalState.timeScale, globals.globals.frontendLocalState.visibleWindowTime, size.width, size.height);
        ctx.translate(css_constants.TRACK_SHELL_WIDTH, 0);
        if (this.track !== undefined) {
            this.track.render(ctx);
        }
        ctx.restore();
        this.highlightIfTrackSelected(ctx, size);
        const localState = globals.globals.frontendLocalState;
        // Draw vertical line when hovering on the notes panel.
        if (globals.globals.state.hoveredNoteTimestamp !== -1) {
            (0, vertical_line_helper.drawVerticalLineAtTime)(ctx, localState.timeScale, globals.globals.state.hoveredNoteTimestamp, size.height, `#aaa`);
        }
        if (globals.globals.state.hoveredLogsTimestamp !== -1) {
            (0, vertical_line_helper.drawVerticalLineAtTime)(ctx, localState.timeScale, globals.globals.state.hoveredLogsTimestamp, size.height, `#344596`);
        }
        if (globals.globals.state.currentSelection !== null) {
            if (globals.globals.state.currentSelection.kind === 'NOTE') {
                const note = globals.globals.state.notes[globals.globals.state.currentSelection.id];
                if (note.noteType === 'DEFAULT') {
                    (0, vertical_line_helper.drawVerticalLineAtTime)(ctx, localState.timeScale, note.timestamp, size.height, note.color);
                }
            }
            if (globals.globals.state.currentSelection.kind === 'SLICE' &&
                globals.globals.sliceDetails.wakeupTs !== undefined) {
                (0, vertical_line_helper.drawVerticalLineAtTime)(ctx, localState.timeScale, globals.globals.sliceDetails.wakeupTs, size.height, `black`);
            }
        }
        // All marked areas should have semi-transparent vertical lines
        // marking the start and end.
        for (const note of Object.values(globals.globals.state.notes)) {
            if (note.noteType === 'AREA') {
                const transparentNoteColor = 'rgba(' + colorConvert.hex.rgb(note.color.substr(1)).toString() + ', 0.65)';
                (0, vertical_line_helper.drawVerticalLineAtTime)(ctx, localState.timeScale, globals.globals.state.areas[note.areaId].startSec, size.height, transparentNoteColor, 1);
                (0, vertical_line_helper.drawVerticalLineAtTime)(ctx, localState.timeScale, globals.globals.state.areas[note.areaId].endSec, size.height, transparentNoteColor, 1);
            }
        }
    }
    getSliceRect(tStart, tDur, depth) {
        if (this.track === undefined) {
            return undefined;
        }
        return this.track.getSliceRect(tStart, tDur, depth);
    }
}
exports.TrackPanel = TrackPanel;

});

var debug_slices = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.plugin = exports.DebugSliceTrack = exports.DEBUG_SLICE_TRACK_KIND = void 0;









exports.DEBUG_SLICE_TRACK_KIND = 'DebugSliceTrack';
class DebugSliceTrackController extends track_controller.TrackController {
    onReload() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const rawResult = yield this.query(`select ifnull(max(depth), 1) as maxDepth from debug_slices`);
            const maxDepth = rawResult.firstRow({ maxDepth: query_result.NUM }).maxDepth;
            globals.globals.dispatch(actions.Actions.updateTrackConfig({ id: this.trackId, config: { maxDepth } }));
        });
    }
    onBoundsChange(start, end, resolution) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const queryRes = yield this.query(`select
      ifnull(id, -1) as id,
      CAST(ifnull(name, '[null]') AS text) as name,
      ts,
      iif(dur = -1, (SELECT end_ts FROM trace_bounds) - ts, dur) as dur,
      ifnull(depth, 0) as depth
      from debug_slices
      where (ts + dur) >= ${(0, time.toNs)(start)} and ts <= ${(0, time.toNs)(end)}`);
            const numRows = queryRes.numRows();
            const slices = {
                start,
                end,
                resolution,
                length: numRows,
                strings: [],
                sliceIds: new Float64Array(numRows),
                starts: new Float64Array(numRows),
                ends: new Float64Array(numRows),
                depths: new Uint16Array(numRows),
                titles: new Uint16Array(numRows),
                isInstant: new Uint16Array(numRows),
                isIncomplete: new Uint16Array(numRows),
            };
            const stringIndexes = new Map();
            function internString(str) {
                let idx = stringIndexes.get(str);
                if (idx !== undefined)
                    return idx;
                idx = slices.strings.length;
                slices.strings.push(str);
                stringIndexes.set(str, idx);
                return idx;
            }
            const it = queryRes.iter({ id: query_result.NUM, name: query_result.STR, ts: query_result.NUM_NULL, dur: query_result.NUM_NULL, depth: query_result.NUM });
            for (let row = 0; it.valid(); it.next(), row++) {
                let sliceStart;
                let sliceEnd;
                if (it.ts === null || it.dur === null) {
                    sliceStart = sliceEnd = -1;
                }
                else {
                    sliceStart = it.ts;
                    sliceEnd = sliceStart + it.dur;
                }
                slices.sliceIds[row] = it.id;
                slices.starts[row] = (0, time.fromNs)(sliceStart);
                slices.ends[row] = (0, time.fromNs)(sliceEnd);
                slices.depths[row] = it.depth;
                const sliceName = it.name;
                slices.titles[row] = internString(sliceName);
                slices.isInstant[row] = 0;
                slices.isIncomplete[row] = 0;
            }
            return slices;
        });
    }
}
DebugSliceTrackController.kind = exports.DEBUG_SLICE_TRACK_KIND;
class DebugSliceTrack extends chrome_slices.ChromeSliceTrack {
    static create(args) {
        return new DebugSliceTrack(args);
    }
    getTrackShellButtons() {
        const buttons = [];
        buttons.push(mithril(track_panel.TrackButton, {
            action: () => {
                globals.globals.dispatch(actions.Actions.requestTrackReload({}));
            },
            i: 'refresh',
            tooltip: 'Refresh tracks',
            showButton: true,
        }));
        buttons.push(mithril(track_panel.TrackButton, {
            action: () => {
                globals.globals.dispatch(actions.Actions.removeDebugTrack({}));
            },
            i: 'close',
            tooltip: 'Close',
            showButton: true,
        }));
        return buttons;
    }
}
exports.DebugSliceTrack = DebugSliceTrack;
DebugSliceTrack.kind = exports.DEBUG_SLICE_TRACK_KIND;
function activate(ctx) {
    ctx.registerTrack(DebugSliceTrack);
    ctx.registerTrackController(DebugSliceTrackController);
}
exports.plugin = {
    pluginId: 'perfetto.DebugSlices',
    activate,
};

});

var expected_frames = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.plugin = exports.ExpectedFramesSliceTrack = exports.EXPECTED_FRAMES_SLICE_TRACK_KIND = void 0;

exports.EXPECTED_FRAMES_SLICE_TRACK_KIND = 'ExpectedFramesSliceTrack';




class ExpectedFramesSliceTrackController extends track_controller.TrackController {
    constructor() {
        super(...arguments);
        this.maxDurNs = 0;
    }
    onBoundsChange(start, end, resolution) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const startNs = (0, time.toNs)(start);
            const endNs = (0, time.toNs)(end);
            const pxSize = this.pxSize();
            // ns per quantization bucket (i.e. ns per pixel). /2 * 2 is to force it to
            // be an even number, so we can snap in the middle.
            const bucketNs = Math.max(Math.round(resolution * 1e9 * pxSize / 2) * 2, 1);
            if (this.maxDurNs === 0) {
                const maxDurResult = yield this.query(`
        select max(iif(dur = -1, (SELECT end_ts FROM trace_bounds) - ts, dur))
          as maxDur
        from experimental_slice_layout
        where filter_track_ids = '${this.config.trackIds.join(',')}'
      `);
                this.maxDurNs = maxDurResult.firstRow({ maxDur: query_result.NUM_NULL }).maxDur || 0;
            }
            const queryRes = yield this.query(`
      SELECT
        (ts + ${bucketNs / 2}) / ${bucketNs} * ${bucketNs} as tsq,
        ts,
        max(iif(dur = -1, (SELECT end_ts FROM trace_bounds) - ts, dur)) as dur,
        layout_depth as layoutDepth,
        name,
        id,
        dur = 0 as isInstant,
        dur = -1 as isIncomplete
      from experimental_slice_layout
      where
        filter_track_ids = '${this.config.trackIds.join(',')}' and
        ts >= ${startNs - this.maxDurNs} and
        ts <= ${endNs}
      group by tsq, layout_depth
      order by tsq, layout_depth
    `);
            const numRows = queryRes.numRows();
            const slices = {
                start,
                end,
                resolution,
                length: numRows,
                strings: [],
                sliceIds: new Float64Array(numRows),
                starts: new Float64Array(numRows),
                ends: new Float64Array(numRows),
                depths: new Uint16Array(numRows),
                titles: new Uint16Array(numRows),
                colors: new Uint16Array(numRows),
                isInstant: new Uint16Array(numRows),
                isIncomplete: new Uint16Array(numRows),
            };
            const stringIndexes = new Map();
            function internString(str) {
                let idx = stringIndexes.get(str);
                if (idx !== undefined)
                    return idx;
                idx = slices.strings.length;
                slices.strings.push(str);
                stringIndexes.set(str, idx);
                return idx;
            }
            const greenIndex = internString('#4CAF50');
            const it = queryRes.iter({
                tsq: query_result.NUM,
                ts: query_result.NUM,
                dur: query_result.NUM,
                layoutDepth: query_result.NUM,
                id: query_result.NUM,
                name: query_result.STR,
                isInstant: query_result.NUM,
                isIncomplete: query_result.NUM,
            });
            for (let row = 0; it.valid(); it.next(), ++row) {
                const startNsQ = it.tsq;
                const startNs = it.ts;
                const durNs = it.dur;
                const endNs = startNs + durNs;
                let endNsQ = Math.floor((endNs + bucketNs / 2 - 1) / bucketNs) * bucketNs;
                endNsQ = Math.max(endNsQ, startNsQ + bucketNs);
                slices.starts[row] = (0, time.fromNs)(startNsQ);
                slices.ends[row] = (0, time.fromNs)(endNsQ);
                slices.depths[row] = it.layoutDepth;
                slices.titles[row] = internString(it.name);
                slices.sliceIds[row] = it.id;
                slices.isInstant[row] = it.isInstant;
                slices.isIncomplete[row] = it.isIncomplete;
                slices.colors[row] = greenIndex;
            }
            return slices;
        });
    }
}
ExpectedFramesSliceTrackController.kind = exports.EXPECTED_FRAMES_SLICE_TRACK_KIND;
class ExpectedFramesSliceTrack extends chrome_slices.ChromeSliceTrack {
    static create(args) {
        return new ExpectedFramesSliceTrack(args);
    }
}
exports.ExpectedFramesSliceTrack = ExpectedFramesSliceTrack;
ExpectedFramesSliceTrack.kind = exports.EXPECTED_FRAMES_SLICE_TRACK_KIND;
function activate(ctx) {
    ctx.registerTrackController(ExpectedFramesSliceTrackController);
    ctx.registerTrack(ExpectedFramesSliceTrack);
}
exports.plugin = {
    pluginId: 'perfetto.ExpectedFrames',
    activate,
};

});

var generic_slice_track = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.plugin = exports.GenericSliceTrack = void 0;


class GenericSliceTrack extends named_slice_track.NamedSliceTrack {
    constructor(args) {
        super(args);
    }
    static create(args) {
        return new GenericSliceTrack(args);
    }
    initSqlTable(tableName) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const sql = `create view ${tableName} as
    select ts, dur, id, depth, ifnull(name, '') as name
    from slice where track_id = ${this.config.sqlTrackId}`;
            yield this.engine.query(sql);
        });
    }
}
exports.GenericSliceTrack = GenericSliceTrack;
GenericSliceTrack.kind = 'GenericSliceTrack';
function activate(ctx) {
    ctx.registerTrack(GenericSliceTrack);
}
exports.plugin = {
    pluginId: 'perfetto.GenericSliceTrack',
    activate,
};

});

var flamegraph = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.splitIfTooBig = exports.Flamegraph = exports.findRootSize = exports.FLAMEGRAPH_HOVERED_COLOR = void 0;


// Height of one 'row' on the flame chart including 1px of whitespace
// below the box.
const NODE_HEIGHT = 18;
exports.FLAMEGRAPH_HOVERED_COLOR = 'hsl(224, 45%, 55%)';
function findRootSize(data) {
    let totalSize = 0;
    let i = 0;
    while (i < data.length && data[i].depth === 0) {
        totalSize += data[i].totalSize;
        i++;
    }
    return totalSize;
}
exports.findRootSize = findRootSize;
class Flamegraph {
    constructor(flamegraphData) {
        this.nodeRendering = {};
        this.highlightSomeNodes = false;
        this.maxDepth = -1;
        this.totalSize = -1;
        // Initialised on first draw() call
        this.labelCharWidth = 0;
        this.labelFontStyle = '12px Roboto Mono';
        this.rolloverFontStyle = '12px Roboto Condensed';
        // Key for the map is depth followed by x coordinate - `depth;x`
        this.graphData = new Map();
        this.xStartsPerDepth = new Map();
        this.hoveredX = -1;
        this.hoveredY = -1;
        this.startingY = 0;
        this.flamegraphData = flamegraphData;
        this.findMaxDepth();
    }
    findMaxDepth() {
        this.maxDepth =
            Math.max(...this.flamegraphData.map((value) => value.depth));
    }
    // Instead of highlighting the interesting nodes, we actually want to
    // de-emphasize the non-highlighted nodes. Returns true if there
    // are any highlighted nodes in the flamegraph.
    highlightingExists() {
        this.highlightSomeNodes = this.flamegraphData.some((e) => e.highlighted);
    }
    generateColor(name, isGreyedOut = false, highlighted) {
        if (isGreyedOut) {
            return '#d9d9d9';
        }
        if (name === 'unknown' || name === 'root') {
            return '#c0c0c0';
        }
        let x = 0;
        for (let i = 0; i < name.length; i += 1) {
            x += name.charCodeAt(i) % 64;
        }
        x = x % 360;
        let l = '76';
        // Make non-highlighted node lighter.
        if (this.highlightSomeNodes && !highlighted) {
            l = '90';
        }
        return `hsl(${x}deg, 45%, ${l}%)`;
    }
    // Caller will have to call draw method after updating data to have updated
    // graph.
    updateDataIfChanged(nodeRendering, flamegraphData, clickedCallsite) {
        this.nodeRendering = nodeRendering;
        this.clickedCallsite = clickedCallsite;
        if (this.flamegraphData === flamegraphData) {
            return;
        }
        this.flamegraphData = flamegraphData;
        this.clickedCallsite = clickedCallsite;
        this.findMaxDepth();
        this.highlightingExists();
        // Finding total size of roots.
        this.totalSize = findRootSize(flamegraphData);
    }
    draw(ctx, width, height, x = 0, y = 0, unit = 'B') {
        if (this.flamegraphData === undefined) {
            return;
        }
        ctx.font = this.labelFontStyle;
        ctx.textBaseline = 'middle';
        if (this.labelCharWidth === 0) {
            this.labelCharWidth = ctx.measureText('_').width;
        }
        this.startingY = y;
        // For each node, we use this map to get information about it's parent
        // (total size of it, width and where it starts in graph) so we can
        // calculate it's own position in graph.
        const nodesMap = new Map();
        let currentY = y;
        nodesMap.set(-1, { width, nextXForChildren: x, size: this.totalSize, x });
        // Initialize data needed for click/hover behavior.
        this.graphData = new Map();
        this.xStartsPerDepth = new Map();
        // Draw root node.
        ctx.fillStyle = this.generateColor('root', false, false);
        ctx.fillRect(x, currentY, width, NODE_HEIGHT - 1);
        const text = (0, canvas_utils.cropText)(`root: ${this.displaySize(this.totalSize, unit, unit === 'B' ? 1024 : 1000)}`, this.labelCharWidth, width - 2);
        ctx.fillStyle = 'black';
        ctx.fillText(text, x + 5, currentY + (NODE_HEIGHT - 1) / 2);
        currentY += NODE_HEIGHT;
        // Set style for borders.
        ctx.strokeStyle = 'white';
        ctx.lineWidth = 0.5;
        for (let i = 0; i < this.flamegraphData.length; i++) {
            if (currentY > height) {
                break;
            }
            const value = this.flamegraphData[i];
            const parentNode = nodesMap.get(value.parentId);
            if (parentNode === undefined) {
                continue;
            }
            const isClicked = this.clickedCallsite !== undefined;
            const isFullWidth = isClicked && value.depth <= this.clickedCallsite.depth;
            const isGreyedOut = isClicked && value.depth < this.clickedCallsite.depth;
            const parent = value.parentId;
            const parentSize = parent === -1 ? this.totalSize : parentNode.size;
            // Calculate node's width based on its proportion in parent.
            const width = (isFullWidth ? 1 : value.totalSize / parentSize) * parentNode.width;
            const currentX = parentNode.nextXForChildren;
            currentY = y + NODE_HEIGHT * (value.depth + 1);
            // Draw node.
            const name = this.getCallsiteName(value);
            ctx.fillStyle = this.generateColor(name, isGreyedOut, value.highlighted);
            ctx.fillRect(currentX, currentY, width, NODE_HEIGHT - 1);
            // Set current node's data in map for children to use.
            nodesMap.set(value.id, {
                width,
                nextXForChildren: currentX,
                size: value.totalSize,
                x: currentX,
            });
            // Update next x coordinate in parent.
            nodesMap.set(value.parentId, {
                width: parentNode.width,
                nextXForChildren: currentX + width,
                size: parentNode.size,
                x: parentNode.x,
            });
            // Draw name.
            const labelPaddingPx = 5;
            const maxLabelWidth = width - labelPaddingPx * 2;
            let text = (0, canvas_utils.cropText)(name, this.labelCharWidth, maxLabelWidth);
            // If cropped text and the original text are within 20% we keep the
            // original text and just squish it a bit.
            if (text.length * 1.2 > name.length) {
                text = name;
            }
            ctx.fillStyle = 'black';
            ctx.fillText(text, currentX + labelPaddingPx, currentY + (NODE_HEIGHT - 1) / 2, maxLabelWidth);
            // Draw border on the right of node.
            ctx.beginPath();
            ctx.moveTo(currentX + width, currentY);
            ctx.lineTo(currentX + width, currentY + NODE_HEIGHT);
            ctx.stroke();
            // Add this node for recognizing in click/hover.
            // Map graphData contains one callsite which is on that depth and X
            // start. Map xStartsPerDepth for each depth contains all X start
            // coordinates that callsites on that level have.
            this.graphData.set(`${value.depth};${currentX}`, { callsite: value, width });
            const xStarts = this.xStartsPerDepth.get(value.depth);
            if (xStarts === undefined) {
                this.xStartsPerDepth.set(value.depth, [currentX]);
            }
            else {
                xStarts.push(currentX);
            }
        }
        // Draw the tooltip.
        if (this.hoveredX > -1 && this.hoveredY > -1 && this.hoveredCallsite) {
            // Must set these before measureText below.
            ctx.font = this.rolloverFontStyle;
            ctx.textBaseline = 'top';
            // Size in px of the border around the text and the edge of the rollover
            // background.
            const paddingPx = 8;
            // Size in px of the x and y offset between the mouse and the top left
            // corner of the rollover box.
            const offsetPx = 4;
            const lines = [];
            let textWidth = this.addToTooltip(this.getCallsiteName(this.hoveredCallsite), width - paddingPx, ctx, lines);
            if (this.hoveredCallsite.location != null) {
                textWidth = Math.max(textWidth, this.addToTooltip(this.hoveredCallsite.location, width, ctx, lines));
            }
            textWidth = Math.max(textWidth, this.addToTooltip(this.hoveredCallsite.mapping, width, ctx, lines));
            if (this.nodeRendering.totalSize !== undefined) {
                const percentage = this.hoveredCallsite.totalSize / this.totalSize * 100;
                const totalSizeText = `${this.nodeRendering.totalSize}: ${this.displaySize(this.hoveredCallsite.totalSize, unit, unit === 'B' ? 1024 : 1000)} (${percentage.toFixed(2)}%)`;
                textWidth = Math.max(textWidth, this.addToTooltip(totalSizeText, width, ctx, lines));
            }
            if (this.nodeRendering.selfSize !== undefined &&
                this.hoveredCallsite.selfSize > 0) {
                const selfPercentage = this.hoveredCallsite.selfSize / this.totalSize * 100;
                const selfSizeText = `${this.nodeRendering.selfSize}: ${this.displaySize(this.hoveredCallsite.selfSize, unit, unit === 'B' ? 1024 : 1000)} (${selfPercentage.toFixed(2)}%)`;
                textWidth = Math.max(textWidth, this.addToTooltip(selfSizeText, width, ctx, lines));
            }
            // Compute a line height as the bounding box height + 50%:
            const heightSample = ctx.measureText('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');
            const lineHeight = Math.round(heightSample.actualBoundingBoxDescent * 1.5);
            const rectWidth = textWidth + 2 * paddingPx;
            const rectHeight = lineHeight * lines.length + 2 * paddingPx;
            let rectXStart = this.hoveredX + offsetPx;
            let rectYStart = this.hoveredY + offsetPx;
            if (rectXStart + rectWidth > width) {
                rectXStart = width - rectWidth;
            }
            if (rectYStart + rectHeight > height) {
                rectYStart = height - rectHeight;
            }
            ctx.fillStyle = 'rgba(255, 255, 255, 0.9)';
            ctx.fillRect(rectXStart, rectYStart, rectWidth, rectHeight);
            ctx.fillStyle = 'hsl(200, 50%, 40%)';
            ctx.textAlign = 'left';
            for (let i = 0; i < lines.length; i++) {
                const line = lines[i];
                ctx.fillText(line, rectXStart + paddingPx, rectYStart + paddingPx + i * lineHeight);
            }
        }
    }
    addToTooltip(text, width, ctx, lines) {
        const lineSplitter = splitIfTooBig(text, width, ctx.measureText(text).width);
        lines.push(...lineSplitter.lines);
        return lineSplitter.lineWidth;
    }
    getCallsiteName(value) {
        return value.name === undefined || value.name === '' ? 'unknown' :
            value.name;
    }
    displaySize(totalSize, unit, step = 1024) {
        if (unit === '')
            return totalSize.toLocaleString();
        if (totalSize === 0)
            return `0 ${unit}`;
        const units = [
            ['', 1],
            ['K', step],
            ['M', Math.pow(step, 2)],
            ['G', Math.pow(step, 3)],
        ];
        let unitsIndex = Math.trunc(Math.log(totalSize) / Math.log(step));
        unitsIndex = unitsIndex > units.length - 1 ? units.length - 1 : unitsIndex;
        const result = totalSize / +units[unitsIndex][1];
        const resultString = totalSize % +units[unitsIndex][1] === 0 ?
            result.toString() :
            result.toFixed(2);
        return `${resultString} ${units[unitsIndex][0]}${unit}`;
    }
    onMouseMove({ x, y }) {
        this.hoveredX = x;
        this.hoveredY = y;
        this.hoveredCallsite = this.findSelectedCallsite(x, y);
        const isCallsiteSelected = this.hoveredCallsite !== undefined;
        if (!isCallsiteSelected) {
            this.onMouseOut();
        }
        return isCallsiteSelected;
    }
    onMouseOut() {
        this.hoveredX = -1;
        this.hoveredY = -1;
        this.hoveredCallsite = undefined;
    }
    onMouseClick({ x, y }) {
        const clickedCallsite = this.findSelectedCallsite(x, y);
        // TODO(b/148596659): Allow to expand [merged] callsites. Currently,
        // this expands to the biggest of the nodes that were merged, which
        // is confusing, so we disallow clicking on them.
        if (clickedCallsite === undefined || clickedCallsite.merged) {
            return undefined;
        }
        return clickedCallsite;
    }
    findSelectedCallsite(x, y) {
        const depth = Math.trunc((y - this.startingY) / NODE_HEIGHT) - 1; // at 0 is root
        if (depth >= 0 && this.xStartsPerDepth.has(depth)) {
            const startX = this.searchSmallest(this.xStartsPerDepth.get(depth), x);
            const result = this.graphData.get(`${depth};${startX}`);
            if (result !== undefined) {
                const width = result.width;
                return startX + width >= x ? result.callsite : undefined;
            }
        }
        return undefined;
    }
    searchSmallest(haystack, needle) {
        haystack = haystack.sort((n1, n2) => n1 - n2);
        const [left] = (0, binary_search.searchSegment)(haystack, needle);
        return left === -1 ? -1 : haystack[left];
    }
    getHeight() {
        return this.flamegraphData.length === 0 ? 0 :
            (this.maxDepth + 2) * NODE_HEIGHT;
    }
}
exports.Flamegraph = Flamegraph;
function splitIfTooBig(line, width, lineWidth) {
    if (line === '')
        return { lineWidth, lines: [] };
    const lines = [];
    const charWidth = lineWidth / line.length;
    const maxWidth = width - 32;
    const maxLineLen = Math.trunc(maxWidth / charWidth);
    while (line.length > 0) {
        lines.push(line.slice(0, maxLineLen));
        line = line.slice(maxLineLen);
    }
    lineWidth = Math.min(maxLineLen * charWidth, lineWidth);
    return { lineWidth, lines };
}
exports.splitIfTooBig = splitIfTooBig;

});

var perf_samples_profile = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.plugin = exports.activate = exports.PERF_SAMPLES_PROFILE_TRACK_KIND = void 0;










exports.PERF_SAMPLES_PROFILE_TRACK_KIND = 'PerfSamplesProfileTrack';
class PerfSamplesProfileTrackController extends track_controller.TrackController {
    onBoundsChange(start, end, resolution) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            if (this.config.upid === undefined) {
                return {
                    start,
                    end,
                    resolution,
                    length: 0,
                    tsStartsNs: new Float64Array(),
                };
            }
            const queryRes = yield this.query(`
     select ts, upid from perf_sample
     join thread using (utid)
     where upid = ${this.config.upid}
     and callsite_id is not null
     order by ts`);
            const numRows = queryRes.numRows();
            const data = {
                start,
                end,
                resolution,
                length: numRows,
                tsStartsNs: new Float64Array(numRows),
            };
            const it = queryRes.iter({ ts: query_result.NUM });
            for (let row = 0; it.valid(); it.next(), row++) {
                data.tsStartsNs[row] = it.ts;
            }
            return data;
        });
    }
}
PerfSamplesProfileTrackController.kind = exports.PERF_SAMPLES_PROFILE_TRACK_KIND;
const PERP_SAMPLE_COLOR = 'hsl(224, 45%, 70%)';
// 0.5 Makes the horizontal lines sharp.
const MARGIN_TOP = 4.5;
const RECT_HEIGHT = 30.5;
class PerfSamplesProfileTrack extends track.Track {
    constructor(args) {
        super(args);
        this.centerY = this.getHeight() / 2;
        this.markerWidth = (this.getHeight() - MARGIN_TOP) / 2;
        this.hoveredTs = undefined;
    }
    static create(args) {
        return new PerfSamplesProfileTrack(args);
    }
    getHeight() {
        return MARGIN_TOP + RECT_HEIGHT - 1;
    }
    renderCanvas(ctx) {
        const { timeScale, } = globals.globals.frontendLocalState;
        const data = this.data();
        if (data === undefined)
            return;
        for (let i = 0; i < data.tsStartsNs.length; i++) {
            const centerX = data.tsStartsNs[i];
            const selection = globals.globals.state.currentSelection;
            const isHovered = this.hoveredTs === centerX;
            const isSelected = selection !== null &&
                selection.kind === 'PERF_SAMPLES' &&
                selection.leftTs <= centerX && selection.rightTs >= centerX;
            const strokeWidth = isSelected ? 3 : 0;
            this.drawMarker(ctx, timeScale.timeToPx((0, time.fromNs)(centerX)), this.centerY, isHovered, strokeWidth);
        }
    }
    drawMarker(ctx, x, y, isHovered, strokeWidth) {
        ctx.beginPath();
        ctx.moveTo(x, y - this.markerWidth);
        ctx.lineTo(x - this.markerWidth, y);
        ctx.lineTo(x, y + this.markerWidth);
        ctx.lineTo(x + this.markerWidth, y);
        ctx.lineTo(x, y - this.markerWidth);
        ctx.closePath();
        ctx.fillStyle = isHovered ? flamegraph.FLAMEGRAPH_HOVERED_COLOR : PERP_SAMPLE_COLOR;
        ctx.fill();
        if (strokeWidth > 0) {
            ctx.strokeStyle = flamegraph.FLAMEGRAPH_HOVERED_COLOR;
            ctx.lineWidth = strokeWidth;
            ctx.stroke();
        }
    }
    onMouseMove({ x, y }) {
        const data = this.data();
        if (data === undefined)
            return;
        const { timeScale } = globals.globals.frontendLocalState;
        const time$1 = (0, time.toNs)(timeScale.pxToTime(x));
        const [left, right] = (0, binary_search.searchSegment)(data.tsStartsNs, time$1);
        const index = this.findTimestampIndex(left, timeScale, data, x, y, right);
        this.hoveredTs = index === -1 ? undefined : data.tsStartsNs[index];
    }
    onMouseOut() {
        this.hoveredTs = undefined;
    }
    onMouseClick({ x, y }) {
        const data = this.data();
        if (data === undefined)
            return false;
        const { timeScale } = globals.globals.frontendLocalState;
        const time$1 = (0, time.toNs)(timeScale.pxToTime(x));
        const [left, right] = (0, binary_search.searchSegment)(data.tsStartsNs, time$1);
        const index = this.findTimestampIndex(left, timeScale, data, x, y, right);
        if (index !== -1) {
            const ts = data.tsStartsNs[index];
            globals.globals.makeSelection(actions.Actions.selectPerfSamples({
                id: index,
                upid: this.config.upid,
                leftTs: ts,
                rightTs: ts,
                type: state.ProfileType.PERF_SAMPLE,
            }));
            return true;
        }
        return false;
    }
    // If the markers overlap the rightmost one will be selected.
    findTimestampIndex(left, timeScale, data, x, y, right) {
        let index = -1;
        if (left !== -1) {
            const centerX = timeScale.timeToPx((0, time.fromNs)(data.tsStartsNs[left]));
            if (this.isInMarker(x, y, centerX)) {
                index = left;
            }
        }
        if (right !== -1) {
            const centerX = timeScale.timeToPx((0, time.fromNs)(data.tsStartsNs[right]));
            if (this.isInMarker(x, y, centerX)) {
                index = right;
            }
        }
        return index;
    }
    isInMarker(x, y, centerX) {
        return Math.abs(x - centerX) + Math.abs(y - this.centerY) <=
            this.markerWidth;
    }
}
PerfSamplesProfileTrack.kind = exports.PERF_SAMPLES_PROFILE_TRACK_KIND;
function activate(ctx) {
    ctx.registerTrackController(PerfSamplesProfileTrackController);
    ctx.registerTrack(PerfSamplesProfileTrack);
}
exports.activate = activate;
exports.plugin = {
    pluginId: 'perfetto.PerfSamplesProfile',
    activate,
};

});

var area_selection_handler = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AreaSelectionHandler = void 0;

class AreaSelectionHandler {
    getAreaChange() {
        const currentSelection = globals.globals.state.currentSelection;
        if (currentSelection === null || currentSelection.kind !== 'AREA') {
            return [false, undefined];
        }
        const selectedArea = globals.globals.state.areas[currentSelection.areaId];
        // Area is considered changed if:
        // 1. The new area is defined and the old area undefined.
        // 2. The new area is undefined and the old area defined (viceversa from 1).
        // 3. Both areas are defined but their start or end times differ.
        // 4. Both areas are defined but their tracks differ.
        let hasAreaChanged = (!!this.previousArea !== !!selectedArea);
        if (selectedArea && this.previousArea) {
            // There seems to be an issue with clang-format http://shortn/_Pt98d5MCjG
            // where `a ||= b` is formatted to `a || = b`, by inserting a space which
            // breaks the operator.
            // Therefore, we are using the pattern `a = a || b` instead.
            hasAreaChanged = hasAreaChanged ||
                selectedArea.startSec !== this.previousArea.startSec;
            hasAreaChanged =
                hasAreaChanged || selectedArea.endSec !== this.previousArea.endSec;
            hasAreaChanged = hasAreaChanged ||
                selectedArea.tracks.length !== this.previousArea.tracks.length;
            for (let i = 0; i < selectedArea.tracks.length; ++i) {
                hasAreaChanged = hasAreaChanged ||
                    selectedArea.tracks[i] !== this.previousArea.tracks[i];
            }
        }
        if (hasAreaChanged) {
            this.previousArea = selectedArea;
        }
        return [hasAreaChanged, selectedArea];
    }
}
exports.AreaSelectionHandler = AreaSelectionHandler;

});

var flamegraph_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.FlamegraphController = exports.profileType = void 0;












function profileType(s) {
    if (isProfileType(s)) {
        return s;
    }
    if (s.startsWith('heap_profile')) {
        return state.ProfileType.HEAP_PROFILE;
    }
    throw new Error('Unknown type ${s}');
}
exports.profileType = profileType;
function isProfileType(s) {
    return Object.values(state.ProfileType).includes(s);
}
function getFlamegraphType(type) {
    switch (type) {
        case state.ProfileType.HEAP_PROFILE:
        case state.ProfileType.NATIVE_HEAP_PROFILE:
        case state.ProfileType.JAVA_HEAP_PROFILE:
            return 'native';
        case state.ProfileType.JAVA_HEAP_GRAPH:
            return 'graph';
        case state.ProfileType.PERF_SAMPLE:
            return 'perf';
        default:
            throw new Error(`Unexpected profile type ${profileType}`);
    }
}
const MIN_PIXEL_DISPLAYED = 1;
class TablesCache {
    constructor(engine, prefix) {
        this.engine = engine;
        this.cache = new Map();
        this.prefix = prefix;
        this.tableId = 0;
        this.cacheSizeLimit = 10;
    }
    getTableName(query) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            let tableName = this.cache.get(query);
            if (tableName === undefined) {
                // TODO(hjd): This should be LRU.
                if (this.cache.size > this.cacheSizeLimit) {
                    for (const name of this.cache.values()) {
                        yield this.engine.query(`drop table ${name}`);
                    }
                    this.cache.clear();
                }
                tableName = `${this.prefix}_${this.tableId++}`;
                yield this.engine.query(`create temp table if not exists ${tableName} as ${query}`);
                this.cache.set(query, tableName);
            }
            return tableName;
        });
    }
}
class FlamegraphController extends controller.Controller {
    constructor(args) {
        super('main');
        this.args = args;
        this.flamegraphDatasets = new Map();
        this.requestingData = false;
        this.queuedRequest = false;
        this.flamegraphDetails = {};
        this.cache = new TablesCache(args.engine, 'grouped_callsites');
        this.areaSelectionHandler = new area_selection_handler.AreaSelectionHandler();
    }
    run() {
        const [hasAreaChanged, area] = this.areaSelectionHandler.getAreaChange();
        if (hasAreaChanged) {
            const upids = [];
            if (!area) {
                this.checkCompletionAndPublishFlamegraph(Object.assign(Object.assign({}, globals.globals.flamegraphDetails), { isInAreaSelection: false }));
                return;
            }
            for (const trackId of area.tracks) {
                const trackState = globals.globals.state.tracks[trackId];
                if (!trackState ||
                    trackState.kind !== perf_samples_profile.PERF_SAMPLES_PROFILE_TRACK_KIND) {
                    continue;
                }
                upids.push(trackState.config.upid);
            }
            if (upids.length === 0) {
                this.checkCompletionAndPublishFlamegraph(Object.assign(Object.assign({}, globals.globals.flamegraphDetails), { isInAreaSelection: false }));
                return;
            }
            globals.globals.dispatch(actions.Actions.openFlamegraph({
                upids,
                startNs: (0, time.toNs)(area.startSec),
                endNs: (0, time.toNs)(area.endSec),
                type: state.ProfileType.PERF_SAMPLE,
                viewingOption: flamegraph_util.PERF_SAMPLES_KEY,
            }));
        }
        const selection = globals.globals.state.currentFlamegraphState;
        if (!selection || !this.shouldRequestData(selection)) {
            return;
        }
        if (this.requestingData) {
            this.queuedRequest = true;
            return;
        }
        this.requestingData = true;
        this.assembleFlamegraphDetails(selection, area !== undefined);
    }
    assembleFlamegraphDetails(selection, isInAreaSelection) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const selectedFlamegraphState = Object.assign({}, selection);
            const flamegraphMetadata = yield this.getFlamegraphMetadata(selection.type, selectedFlamegraphState.startNs, selectedFlamegraphState.endNs, selectedFlamegraphState.upids);
            if (flamegraphMetadata !== undefined) {
                Object.assign(this.flamegraphDetails, flamegraphMetadata);
            }
            // TODO(hjd): Clean this up.
            if (this.lastSelectedFlamegraphState &&
                this.lastSelectedFlamegraphState.focusRegex !== selection.focusRegex) {
                this.flamegraphDatasets.clear();
            }
            this.lastSelectedFlamegraphState = Object.assign({}, selection);
            const expandedId = selectedFlamegraphState.expandedCallsite ?
                selectedFlamegraphState.expandedCallsite.id :
                -1;
            const rootSize = selectedFlamegraphState.expandedCallsite === undefined ?
                undefined :
                selectedFlamegraphState.expandedCallsite.totalSize;
            const key = `${selectedFlamegraphState.upids};${selectedFlamegraphState.startNs};${selectedFlamegraphState.endNs}`;
            try {
                const flamegraphData = yield this.getFlamegraphData(key, selectedFlamegraphState.viewingOption ?
                    selectedFlamegraphState.viewingOption :
                    flamegraph_util.DEFAULT_VIEWING_OPTION, selection.startNs, selection.endNs, selectedFlamegraphState.upids, selectedFlamegraphState.type, selectedFlamegraphState.focusRegex);
                if (flamegraphData !== undefined && selection &&
                    selection.kind === selectedFlamegraphState.kind &&
                    selection.startNs === selectedFlamegraphState.startNs &&
                    selection.endNs === selectedFlamegraphState.endNs) {
                    const expandedFlamegraphData = (0, flamegraph_util.expandCallsites)(flamegraphData, expandedId);
                    this.prepareAndMergeCallsites(expandedFlamegraphData, this.lastSelectedFlamegraphState.viewingOption, isInAreaSelection, rootSize, this.lastSelectedFlamegraphState.expandedCallsite);
                }
            }
            finally {
                this.requestingData = false;
                if (this.queuedRequest) {
                    this.queuedRequest = false;
                    this.run();
                }
            }
        });
    }
    shouldRequestData(selection) {
        return selection.kind === 'FLAMEGRAPH_STATE' &&
            (this.lastSelectedFlamegraphState === undefined ||
                (this.lastSelectedFlamegraphState.startNs !== selection.startNs ||
                    this.lastSelectedFlamegraphState.endNs !== selection.endNs ||
                    this.lastSelectedFlamegraphState.type !== selection.type ||
                    !FlamegraphController.areArraysEqual(this.lastSelectedFlamegraphState.upids, selection.upids) ||
                    this.lastSelectedFlamegraphState.viewingOption !==
                        selection.viewingOption ||
                    this.lastSelectedFlamegraphState.focusRegex !==
                        selection.focusRegex ||
                    this.lastSelectedFlamegraphState.expandedCallsite !==
                        selection.expandedCallsite));
    }
    prepareAndMergeCallsites(flamegraphData, viewingOption = flamegraph_util.DEFAULT_VIEWING_OPTION, isInAreaSelection, rootSize, expandedCallsite) {
        this.flamegraphDetails.flamegraph = (0, flamegraph_util.mergeCallsites)(flamegraphData, this.getMinSizeDisplayed(flamegraphData, rootSize));
        this.flamegraphDetails.expandedCallsite = expandedCallsite;
        this.flamegraphDetails.viewingOption = viewingOption;
        this.flamegraphDetails.isInAreaSelection = isInAreaSelection;
        this.checkCompletionAndPublishFlamegraph(this.flamegraphDetails);
    }
    checkCompletionAndPublishFlamegraph(flamegraphDetails) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            flamegraphDetails.graphIncomplete =
                (yield this.args.engine.query(`select value from stats
       where severity = 'error' and name = 'heap_graph_non_finalized_graph'`))
                    .firstRow({ value: query_result.NUM })
                    .value > 0;
            (0, publish.publishFlamegraphDetails)(flamegraphDetails);
        });
    }
    getFlamegraphData(baseKey, viewingOption, startNs, endNs, upids, type, focusRegex) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            let currentData;
            const key = `${baseKey}-${viewingOption}`;
            if (this.flamegraphDatasets.has(key)) {
                currentData = this.flamegraphDatasets.get(key);
            }
            else {
                // TODO(hjd): Show loading state.
                // Collecting data for drawing flamegraph for selected profile.
                // Data needs to be in following format:
                // id, name, parent_id, depth, total_size
                const tableName = yield this.prepareViewsAndTables(startNs, endNs, upids, type, focusRegex);
                currentData = yield this.getFlamegraphDataFromTables(tableName, viewingOption, focusRegex);
                this.flamegraphDatasets.set(key, currentData);
            }
            return currentData;
        });
    }
    getFlamegraphDataFromTables(tableName, viewingOption = flamegraph_util.DEFAULT_VIEWING_OPTION, focusRegex) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            let orderBy = '';
            let totalColumnName = 'cumulativeSize';
            let selfColumnName = 'size';
            // TODO(fmayer): Improve performance so this is no longer necessary.
            // Alternatively consider collapsing frames of the same label.
            const maxDepth = 100;
            switch (viewingOption) {
                case flamegraph_util.ALLOC_SPACE_MEMORY_ALLOCATED_KEY:
                    orderBy = `where cumulative_alloc_size > 0 and depth < ${maxDepth} order by depth, parent_id,
            cumulative_alloc_size desc, name`;
                    totalColumnName = 'cumulativeAllocSize';
                    selfColumnName = 'size';
                    break;
                case flamegraph_util.OBJECTS_ALLOCATED_NOT_FREED_KEY:
                    orderBy = `where cumulative_count > 0 and depth < ${maxDepth} order by depth, parent_id,
            cumulative_count desc, name`;
                    totalColumnName = 'cumulativeCount';
                    selfColumnName = 'count';
                    break;
                case flamegraph_util.OBJECTS_ALLOCATED_KEY:
                    orderBy = `where cumulative_alloc_count > 0 and depth < ${maxDepth} order by depth, parent_id,
            cumulative_alloc_count desc, name`;
                    totalColumnName = 'cumulativeAllocCount';
                    selfColumnName = 'count';
                    break;
                case flamegraph_util.PERF_SAMPLES_KEY:
                case flamegraph_util.SPACE_MEMORY_ALLOCATED_NOT_FREED_KEY:
                    orderBy = `where cumulative_size > 0 and depth < ${maxDepth} order by depth, parent_id,
            cumulative_size desc, name`;
                    totalColumnName = 'cumulativeSize';
                    selfColumnName = 'size';
                    break;
            }
            const callsites = yield this.args.engine.query(`
        SELECT
        id as hash,
        IFNULL(IFNULL(DEMANGLE(name), name), '[NULL]') as name,
        IFNULL(parent_id, -1) as parentHash,
        depth,
        cumulative_size as cumulativeSize,
        cumulative_alloc_size as cumulativeAllocSize,
        cumulative_count as cumulativeCount,
        cumulative_alloc_count as cumulativeAllocCount,
        map_name as mapping,
        size,
        count,
        IFNULL(source_file, '') as sourceFile,
        IFNULL(line_number, -1) as lineNumber
        from ${tableName} ${orderBy}`);
            const flamegraphData = [];
            const hashToindex = new Map();
            const it = callsites.iter({
                hash: query_result.NUM,
                name: query_result.STR,
                parentHash: query_result.NUM,
                depth: query_result.NUM,
                cumulativeSize: query_result.NUM,
                cumulativeAllocSize: query_result.NUM,
                cumulativeCount: query_result.NUM,
                cumulativeAllocCount: query_result.NUM,
                mapping: query_result.STR,
                sourceFile: query_result.STR,
                lineNumber: query_result.NUM,
                size: query_result.NUM,
                count: query_result.NUM,
            });
            for (let i = 0; it.valid(); ++i, it.next()) {
                const hash = it.hash;
                let name = it.name;
                const parentHash = it.parentHash;
                const depth = it.depth;
                const totalSize = it[totalColumnName];
                const selfSize = it[selfColumnName];
                const mapping = it.mapping;
                const highlighted = focusRegex !== '' &&
                    name.toLocaleLowerCase().includes(focusRegex.toLocaleLowerCase());
                const parentId = hashToindex.has(+parentHash) ? hashToindex.get(+parentHash) : -1;
                let location;
                if (/[a-zA-Z]/i.test(it.sourceFile)) {
                    location = it.sourceFile;
                    if (it.lineNumber !== -1) {
                        location += `:${it.lineNumber}`;
                    }
                }
                if (depth === maxDepth - 1) {
                    name += ' [tree truncated]';
                }
                // Instead of hash, we will store index of callsite in this original array
                // as an id of callsite. That way, we have quicker access to parent and it
                // will stay unique:
                hashToindex.set(hash, i);
                flamegraphData.push({
                    id: i,
                    totalSize,
                    depth,
                    parentId,
                    name,
                    selfSize,
                    mapping,
                    merged: false,
                    highlighted,
                    location,
                });
            }
            return flamegraphData;
        });
    }
    prepareViewsAndTables(startNs, endNs, upids, type, focusRegex) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            // Creating unique names for views so we can reuse and not delete them
            // for each marker.
            let focusRegexConditional = '';
            if (focusRegex !== '') {
                focusRegexConditional = `and focus_str = '${focusRegex}'`;
            }
            const flamegraphType = getFlamegraphType(type);
            /*
             * TODO(octaviant) this branching should be eliminated for simplicity.
             */
            if (type === state.ProfileType.PERF_SAMPLE) {
                let upidConditional = `upid = ${upids[0]}`;
                if (upids.length > 1) {
                    upidConditional =
                        `upid_group = '${FlamegraphController.serializeUpidGroup(upids)}'`;
                }
                return this.cache.getTableName(`select id, name, map_name, parent_id, depth, cumulative_size,
          cumulative_alloc_size, cumulative_count, cumulative_alloc_count,
          size, alloc_size, count, alloc_count, source_file, line_number
          from experimental_flamegraph
          where profile_type = '${flamegraphType}' and ${startNs} <= ts and
              ts <= ${endNs} and ${upidConditional}
          ${focusRegexConditional}`);
            }
            return this.cache.getTableName(`select id, name, map_name, parent_id, depth, cumulative_size,
          cumulative_alloc_size, cumulative_count, cumulative_alloc_count,
          size, alloc_size, count, alloc_count, source_file, line_number
          from experimental_flamegraph
          where profile_type = '${flamegraphType}'
            and ts = ${endNs}
            and upid = ${upids[0]}
            ${focusRegexConditional}`);
        });
    }
    getMinSizeDisplayed(flamegraphData, rootSize) {
        const timeState = globals$1.globals.state.frontendLocalState.visibleState;
        let width = (timeState.endSec - timeState.startSec) / timeState.resolution;
        // TODO(168048193): Remove screen size hack:
        width = Math.max(width, 800);
        if (rootSize === undefined) {
            rootSize = (0, flamegraph_util.findRootSize)(flamegraphData);
        }
        return MIN_PIXEL_DISPLAYED * rootSize / width;
    }
    getFlamegraphMetadata(type, startNs, endNs, upids) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            // Don't do anything if selection of the marker stayed the same.
            if ((this.lastSelectedFlamegraphState !== undefined &&
                ((this.lastSelectedFlamegraphState.startNs === startNs &&
                    this.lastSelectedFlamegraphState.endNs === endNs &&
                    FlamegraphController.areArraysEqual(this.lastSelectedFlamegraphState.upids, upids))))) {
                return undefined;
            }
            // Collecting data for more information about profile, such as:
            // total memory allocated, memory that is allocated and not freed.
            const upidGroup = FlamegraphController.serializeUpidGroup(upids);
            const result = yield this.args.engine.query(`select pid from process where upid in (${upidGroup})`);
            const it = result.iter({ pid: query_result.NUM });
            const pids = [];
            for (; it.valid(); it.next()) {
                pids.push(it.pid);
            }
            return { startNs, durNs: endNs - startNs, pids, upids, type };
        });
    }
    static areArraysEqual(a, b) {
        if (a.length !== b.length) {
            return false;
        }
        for (let i = 0; i < a.length; i++) {
            if (a[i] !== b[i]) {
                return false;
            }
        }
        return true;
    }
    static serializeUpidGroup(upids) {
        return new Array(upids).join();
    }
}
exports.FlamegraphController = FlamegraphController;

});

var heap_profile = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.plugin = exports.HEAP_PROFILE_TRACK_KIND = void 0;










exports.HEAP_PROFILE_TRACK_KIND = 'HeapProfileTrack';
class HeapProfileTrackController extends track_controller.TrackController {
    onBoundsChange(start, end, resolution) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            if (this.config.upid === undefined) {
                return {
                    start,
                    end,
                    resolution,
                    length: 0,
                    tsStarts: new Float64Array(),
                    types: new Array(),
                };
            }
            const queryRes = yield this.query(`
    select * from (
      select distinct
        ts,
        'heap_profile:' ||
          (select group_concat(distinct heap_name) from heap_profile_allocation
            where upid = ${this.config.upid}) AS type
      from heap_profile_allocation
      where upid = ${this.config.upid}
      union
      select distinct graph_sample_ts as ts, 'graph' as type
      from heap_graph_object
      where upid = ${this.config.upid}) order by ts`);
            const numRows = queryRes.numRows();
            const data = {
                start,
                end,
                resolution,
                length: numRows,
                tsStarts: new Float64Array(numRows),
                types: new Array(numRows),
            };
            const it = queryRes.iter({ ts: query_result.NUM, type: query_result.STR });
            for (let row = 0; it.valid(); it.next(), row++) {
                data.tsStarts[row] = it.ts;
                data.types[row] = (0, flamegraph_controller.profileType)(it.type);
            }
            return data;
        });
    }
}
HeapProfileTrackController.kind = exports.HEAP_PROFILE_TRACK_KIND;
const HEAP_PROFILE_COLOR = 'hsl(224, 45%, 70%)';
// 0.5 Makes the horizontal lines sharp.
const MARGIN_TOP = 4.5;
const RECT_HEIGHT = 30.5;
class HeapProfileTrack extends track.Track {
    constructor(args) {
        super(args);
        this.centerY = this.getHeight() / 2;
        this.markerWidth = (this.getHeight() - MARGIN_TOP) / 2;
        this.hoveredTs = undefined;
    }
    static create(args) {
        return new HeapProfileTrack(args);
    }
    getHeight() {
        return MARGIN_TOP + RECT_HEIGHT - 1;
    }
    renderCanvas(ctx) {
        const { timeScale, } = globals.globals.frontendLocalState;
        const data = this.data();
        if (data === undefined)
            return;
        for (let i = 0; i < data.tsStarts.length; i++) {
            const centerX = data.tsStarts[i];
            const selection = globals.globals.state.currentSelection;
            const isHovered = this.hoveredTs === centerX;
            const isSelected = selection !== null &&
                selection.kind === 'HEAP_PROFILE' && selection.ts === centerX;
            const strokeWidth = isSelected ? 3 : 0;
            this.drawMarker(ctx, timeScale.timeToPx((0, time.fromNs)(centerX)), this.centerY, isHovered, strokeWidth);
        }
    }
    drawMarker(ctx, x, y, isHovered, strokeWidth) {
        ctx.beginPath();
        ctx.moveTo(x, y - this.markerWidth);
        ctx.lineTo(x - this.markerWidth, y);
        ctx.lineTo(x, y + this.markerWidth);
        ctx.lineTo(x + this.markerWidth, y);
        ctx.lineTo(x, y - this.markerWidth);
        ctx.closePath();
        ctx.fillStyle = isHovered ? flamegraph.FLAMEGRAPH_HOVERED_COLOR : HEAP_PROFILE_COLOR;
        ctx.fill();
        if (strokeWidth > 0) {
            ctx.strokeStyle = flamegraph.FLAMEGRAPH_HOVERED_COLOR;
            ctx.lineWidth = strokeWidth;
            ctx.stroke();
        }
    }
    onMouseMove({ x, y }) {
        const data = this.data();
        if (data === undefined)
            return;
        const { timeScale } = globals.globals.frontendLocalState;
        const time$1 = (0, time.toNs)(timeScale.pxToTime(x));
        const [left, right] = (0, binary_search.searchSegment)(data.tsStarts, time$1);
        const index = this.findTimestampIndex(left, timeScale, data, x, y, right);
        this.hoveredTs = index === -1 ? undefined : data.tsStarts[index];
    }
    onMouseOut() {
        this.hoveredTs = undefined;
    }
    onMouseClick({ x, y }) {
        const data = this.data();
        if (data === undefined)
            return false;
        const { timeScale } = globals.globals.frontendLocalState;
        const time$1 = (0, time.toNs)(timeScale.pxToTime(x));
        const [left, right] = (0, binary_search.searchSegment)(data.tsStarts, time$1);
        const index = this.findTimestampIndex(left, timeScale, data, x, y, right);
        if (index !== -1) {
            const ts = data.tsStarts[index];
            const type = data.types[index];
            globals.globals.makeSelection(actions.Actions.selectHeapProfile({ id: index, upid: this.config.upid, ts, type }));
            return true;
        }
        return false;
    }
    // If the markers overlap the rightmost one will be selected.
    findTimestampIndex(left, timeScale, data, x, y, right) {
        let index = -1;
        if (left !== -1) {
            const centerX = timeScale.timeToPx((0, time.fromNs)(data.tsStarts[left]));
            if (this.isInMarker(x, y, centerX)) {
                index = left;
            }
        }
        if (right !== -1) {
            const centerX = timeScale.timeToPx((0, time.fromNs)(data.tsStarts[right]));
            if (this.isInMarker(x, y, centerX)) {
                index = right;
            }
        }
        return index;
    }
    isInMarker(x, y, centerX) {
        return Math.abs(x - centerX) + Math.abs(y - this.centerY) <=
            this.markerWidth;
    }
}
HeapProfileTrack.kind = exports.HEAP_PROFILE_TRACK_KIND;
function activate(ctx) {
    ctx.registerTrackController(HeapProfileTrackController);
    ctx.registerTrack(HeapProfileTrack);
}
exports.plugin = {
    pluginId: 'perfetto.HeapProfile',
    activate,
};

});

var null_track = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.plugin = exports.NullTrack = exports.NULL_TRACK_KIND = void 0;

exports.NULL_TRACK_KIND = 'NullTrack';
class NullTrack extends track.Track {
    constructor(args) {
        super(args);
        this.frontendOnly = true;
    }
    static create(args) {
        return new NullTrack(args);
    }
    getHeight() {
        return 30;
    }
    renderCanvas(_) { }
}
exports.NullTrack = NullTrack;
NullTrack.kind = exports.NULL_TRACK_KIND;
function activate(ctx) {
    ctx.registerTrack(NullTrack);
}
exports.plugin = {
    pluginId: 'perfetto.NullTrack',
    activate,
};

});

var process_scheduling = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.plugin = exports.activate = exports.PROCESS_SCHEDULING_TRACK_KIND = void 0;











exports.PROCESS_SCHEDULING_TRACK_KIND = 'ProcessSchedulingTrack';
// This summary is displayed for any processes that have CPU scheduling activity
// associated with them.
class ProcessSchedulingTrackController extends track_controller.TrackController {
    constructor() {
        super(...arguments);
        this.maxCpu = 0;
        this.maxDurNs = 0;
        this.cachedBucketNs = Number.MAX_SAFE_INTEGER;
    }
    onSetup() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            yield this.createSchedView();
            const cpus = yield this.engine.getCpus();
            // A process scheduling track should only exist in a trace that has cpus.
            (0, logging.assertTrue)(cpus.length > 0);
            this.maxCpu = Math.max(...cpus) + 1;
            const result = (yield this.query(`
      select ifnull(max(dur), 0) as maxDur, count(1) as count
      from ${this.tableName('process_sched')}
    `)).iter({ maxDur: query_result.NUM, count: query_result.NUM });
            (0, logging.assertTrue)(result.valid());
            this.maxDurNs = result.maxDur;
            const rowCount = result.count;
            const bucketNs = this.cachedBucketSizeNs(rowCount);
            if (bucketNs === undefined) {
                return;
            }
            yield this.query(`
      create table ${this.tableName('process_sched_cached')} as
      select
        (ts + ${bucketNs / 2}) / ${bucketNs} * ${bucketNs} as cached_tsq,
        ts,
        max(dur) as dur,
        cpu,
        utid
      from ${this.tableName('process_sched')}
      group by cached_tsq, cpu
      order by cached_tsq, cpu
    `);
            this.cachedBucketNs = bucketNs;
        });
    }
    onBoundsChange(start, end, resolution) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            (0, logging.assertTrue)(this.config.upid !== null);
            // The resolution should always be a power of two for the logic of this
            // function to make sense.
            const resolutionNs = (0, time.toNs)(resolution);
            (0, logging.assertTrue)(Math.log2(resolutionNs) % 1 === 0);
            const startNs = (0, time.toNs)(start);
            const endNs = (0, time.toNs)(end);
            // ns per quantization bucket (i.e. ns per pixel). /2 * 2 is to force it to
            // be an even number, so we can snap in the middle.
            const bucketNs = Math.max(Math.round(resolutionNs * this.pxSize() / 2) * 2, 1);
            const queryRes = yield this.queryData(startNs, endNs, bucketNs);
            const numRows = queryRes.numRows();
            const slices = {
                kind: 'slice',
                start,
                end,
                resolution,
                length: numRows,
                maxCpu: this.maxCpu,
                starts: new Float64Array(numRows),
                ends: new Float64Array(numRows),
                cpus: new Uint32Array(numRows),
                utids: new Uint32Array(numRows),
            };
            const it = queryRes.iter({
                tsq: query_result.NUM,
                ts: query_result.NUM,
                dur: query_result.NUM,
                cpu: query_result.NUM,
                utid: query_result.NUM,
            });
            for (let row = 0; it.valid(); it.next(), row++) {
                const startNsQ = it.tsq;
                const startNs = it.ts;
                const durNs = it.dur;
                const endNs = startNs + durNs;
                let endNsQ = Math.floor((endNs + bucketNs / 2 - 1) / bucketNs) * bucketNs;
                endNsQ = Math.max(endNsQ, startNsQ + bucketNs);
                slices.starts[row] = (0, time.fromNs)(startNsQ);
                slices.ends[row] = (0, time.fromNs)(endNsQ);
                slices.cpus[row] = it.cpu;
                slices.utids[row] = it.utid;
                slices.end = Math.max(slices.ends[row], slices.end);
            }
            return slices;
        });
    }
    queryData(startNs, endNs, bucketNs) {
        const isCached = this.cachedBucketNs <= bucketNs;
        const tsq = isCached ? `cached_tsq / ${bucketNs} * ${bucketNs}` :
            `(ts + ${bucketNs / 2}) / ${bucketNs} * ${bucketNs}`;
        const queryTable = isCached ? this.tableName('process_sched_cached') :
            this.tableName('process_sched');
        const constraintColumn = isCached ? 'cached_tsq' : 'ts';
        return this.query(`
      select
        ${tsq} as tsq,
        ts,
        max(dur) as dur,
        cpu,
        utid
      from ${queryTable}
      where
        ${constraintColumn} >= ${startNs - this.maxDurNs} and
        ${constraintColumn} <= ${endNs}
      group by tsq, cpu
      order by tsq, cpu
    `);
    }
    createSchedView() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            yield this.query(`
      create view ${this.tableName('process_sched')} as
      select ts, dur, cpu, utid
      from experimental_sched_upid
      where
        utid != 0 and
        upid = ${this.config.upid}
    `);
        });
    }
}
ProcessSchedulingTrackController.kind = exports.PROCESS_SCHEDULING_TRACK_KIND;
const MARGIN_TOP = 5;
const RECT_HEIGHT = 30;
const TRACK_HEIGHT = MARGIN_TOP * 2 + RECT_HEIGHT;
class ProcessSchedulingTrack extends track.Track {
    constructor(args) {
        super(args);
        this.utidHoveredInThisTrack = -1;
    }
    static create(args) {
        return new ProcessSchedulingTrack(args);
    }
    getHeight() {
        return TRACK_HEIGHT;
    }
    renderCanvas(ctx) {
        // TODO: fonts and colors should come from the CSS and not hardcoded here.
        const { timeScale, visibleWindowTime } = globals.globals.frontendLocalState;
        const data = this.data();
        if (data === undefined)
            return; // Can't possibly draw anything.
        // If the cached trace slices don't fully cover the visible time range,
        // show a gray rectangle with a "Loading..." label.
        (0, checkerboard_1.checkerboardExcept)(ctx, this.getHeight(), timeScale.timeToPx(visibleWindowTime.start), timeScale.timeToPx(visibleWindowTime.end), timeScale.timeToPx(data.start), timeScale.timeToPx(data.end));
        (0, logging.assertTrue)(data.starts.length === data.ends.length);
        (0, logging.assertTrue)(data.starts.length === data.utids.length);
        const rawStartIdx = data.ends.findIndex((end) => end >= visibleWindowTime.start);
        const startIdx = rawStartIdx === -1 ? data.starts.length : rawStartIdx;
        const [, rawEndIdx] = (0, binary_search.searchSegment)(data.starts, visibleWindowTime.end);
        const endIdx = rawEndIdx === -1 ? data.starts.length : rawEndIdx;
        const cpuTrackHeight = Math.floor(RECT_HEIGHT / data.maxCpu);
        for (let i = startIdx; i < endIdx; i++) {
            const tStart = data.starts[i];
            const tEnd = data.ends[i];
            const utid = data.utids[i];
            const cpu = data.cpus[i];
            const rectStart = timeScale.timeToPx(tStart);
            const rectEnd = timeScale.timeToPx(tEnd);
            const rectWidth = rectEnd - rectStart;
            if (rectWidth < 0.3)
                continue;
            const threadInfo = globals.globals.threads.get(utid);
            const pid = (threadInfo ? threadInfo.pid : -1) || -1;
            const isHovering = globals.globals.state.hoveredUtid !== -1;
            const isThreadHovered = globals.globals.state.hoveredUtid === utid;
            const isProcessHovered = globals.globals.state.hoveredPid === pid;
            const color = (0, colorizer.colorForThread)(threadInfo);
            if (isHovering && !isThreadHovered) {
                if (!isProcessHovered) {
                    color.l = 90;
                    color.s = 0;
                }
                else {
                    color.l = Math.min(color.l + 30, 80);
                    color.s -= 20;
                }
            }
            else {
                color.l = Math.min(color.l + 10, 60);
                color.s -= 20;
            }
            ctx.fillStyle = `hsl(${color.h}, ${color.s}%, ${color.l}%)`;
            const y = MARGIN_TOP + cpuTrackHeight * cpu + cpu;
            ctx.fillRect(rectStart, y, rectEnd - rectStart, cpuTrackHeight);
        }
        const hoveredThread = globals.globals.threads.get(this.utidHoveredInThisTrack);
        if (hoveredThread !== undefined && this.mousePos !== undefined) {
            const tidText = `T: ${hoveredThread.threadName} [${hoveredThread.tid}]`;
            if (hoveredThread.pid) {
                const pidText = `P: ${hoveredThread.procName} [${hoveredThread.pid}]`;
                this.drawTrackHoverTooltip(ctx, this.mousePos, pidText, tidText);
            }
            else {
                this.drawTrackHoverTooltip(ctx, this.mousePos, tidText);
            }
        }
    }
    onMouseMove(pos) {
        const data = this.data();
        this.mousePos = pos;
        if (data === undefined)
            return;
        if (pos.y < MARGIN_TOP || pos.y > MARGIN_TOP + RECT_HEIGHT) {
            this.utidHoveredInThisTrack = -1;
            globals.globals.dispatch(actions.Actions.setHoveredUtidAndPid({ utid: -1, pid: -1 }));
            return;
        }
        const cpuTrackHeight = Math.floor(RECT_HEIGHT / data.maxCpu);
        const cpu = Math.floor((pos.y - MARGIN_TOP) / (cpuTrackHeight + 1));
        const { timeScale } = globals.globals.frontendLocalState;
        const t = timeScale.pxToTime(pos.x);
        const [i, j] = (0, binary_search.searchRange)(data.starts, t, (0, binary_search.searchEq)(data.cpus, cpu));
        if (i === j || i >= data.starts.length || t > data.ends[i]) {
            this.utidHoveredInThisTrack = -1;
            globals.globals.dispatch(actions.Actions.setHoveredUtidAndPid({ utid: -1, pid: -1 }));
            return;
        }
        const utid = data.utids[i];
        this.utidHoveredInThisTrack = utid;
        const threadInfo = globals.globals.threads.get(utid);
        const pid = threadInfo ? (threadInfo.pid ? threadInfo.pid : -1) : -1;
        globals.globals.dispatch(actions.Actions.setHoveredUtidAndPid({ utid, pid }));
    }
    onMouseOut() {
        this.utidHoveredInThisTrack = -1;
        globals.globals.dispatch(actions.Actions.setHoveredUtidAndPid({ utid: -1, pid: -1 }));
        this.mousePos = undefined;
    }
}
ProcessSchedulingTrack.kind = exports.PROCESS_SCHEDULING_TRACK_KIND;
function activate(ctx) {
    ctx.registerTrackController(ProcessSchedulingTrackController);
    ctx.registerTrack(ProcessSchedulingTrack);
}
exports.activate = activate;
exports.plugin = {
    pluginId: 'perfetto.ProcessScheduling',
    activate,
};

});

var process_summary = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.plugin = exports.activate = exports.PROCESS_SUMMARY_TRACK = void 0;









exports.PROCESS_SUMMARY_TRACK = 'ProcessSummaryTrack';
// This is the summary displayed when a process only contains chrome slices
// and no cpu scheduling.
class ProcessSummaryTrackController extends track_controller.TrackController {
    constructor() {
        super(...arguments);
        this.setup = false;
    }
    onBoundsChange(start, end, resolution) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const startNs = (0, time.toNs)(start);
            const endNs = (0, time.toNs)(end);
            if (this.setup === false) {
                yield this.query(`create virtual table ${this.tableName('window')} using window;`);
                let utids = [this.config.utid];
                if (this.config.upid) {
                    const threadQuery = yield this.query(`select utid from thread where upid=${this.config.upid}`);
                    utids = [];
                    for (const it = threadQuery.iter({ utid: query_result.NUM }); it.valid(); it.next()) {
                        utids.push(it.utid);
                    }
                }
                const trackQuery = yield this.query(`select id from thread_track where utid in (${utids.join(',')})`);
                const tracks = [];
                for (const it = trackQuery.iter({ id: query_result.NUM }); it.valid(); it.next()) {
                    tracks.push(it.id);
                }
                const processSliceView = this.tableName('process_slice_view');
                yield this.query(`create view ${processSliceView} as ` +
                    // 0 as cpu is a dummy column to perform span join on.
                    `select ts, dur/${utids.length} as dur ` +
                    `from slice s ` +
                    `where depth = 0 and track_id in ` +
                    `(${tracks.join(',')})`);
                yield this.query(`create virtual table ${this.tableName('span')}
          using span_join(${processSliceView},
                          ${this.tableName('window')});`);
                this.setup = true;
            }
            // |resolution| is in s/px we want # ns for 10px window:
            // Max value with 1 so we don't end up with resolution 0.
            const bucketSizeNs = Math.max(1, Math.round(resolution * 10 * 1e9));
            const windowStartNs = Math.floor(startNs / bucketSizeNs) * bucketSizeNs;
            const windowDurNs = Math.max(1, endNs - windowStartNs);
            yield this.query(`update ${this.tableName('window')} set
      window_start=${windowStartNs},
      window_dur=${windowDurNs},
      quantum=${bucketSizeNs}
      where rowid = 0;`);
            return this.computeSummary((0, time.fromNs)(windowStartNs), end, resolution, bucketSizeNs);
        });
    }
    computeSummary(start, end, resolution, bucketSizeNs) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const startNs = (0, time.toNs)(start);
            const endNs = (0, time.toNs)(end);
            const numBuckets = Math.min(Math.ceil((endNs - startNs) / bucketSizeNs), track_data.LIMIT);
            const query = `select
      quantum_ts as bucket,
      sum(dur)/cast(${bucketSizeNs} as float) as utilization
      from ${this.tableName('span')}
      group by quantum_ts
      limit ${track_data.LIMIT}`;
            const summary = {
                start,
                end,
                resolution,
                length: numBuckets,
                bucketSizeSeconds: (0, time.fromNs)(bucketSizeNs),
                utilizations: new Float64Array(numBuckets),
            };
            const queryRes = yield this.query(query);
            const it = queryRes.iter({ bucket: query_result.NUM, utilization: query_result.NUM });
            for (; it.valid(); it.next()) {
                const bucket = it.bucket;
                if (bucket > numBuckets) {
                    continue;
                }
                summary.utilizations[bucket] = it.utilization;
            }
            return summary;
        });
    }
    onDestroy() {
        if (this.setup) {
            this.query(`drop table ${this.tableName('window')}`);
            this.query(`drop table ${this.tableName('span')}`);
            this.setup = false;
        }
    }
}
ProcessSummaryTrackController.kind = exports.PROCESS_SUMMARY_TRACK;
const MARGIN_TOP = 5;
const RECT_HEIGHT = 30;
const TRACK_HEIGHT = MARGIN_TOP * 2 + RECT_HEIGHT;
const SUMMARY_HEIGHT = TRACK_HEIGHT - MARGIN_TOP;
class ProcessSummaryTrack extends track.Track {
    constructor(args) {
        super(args);
    }
    static create(args) {
        return new ProcessSummaryTrack(args);
    }
    getHeight() {
        return TRACK_HEIGHT;
    }
    renderCanvas(ctx) {
        const { timeScale, visibleWindowTime } = globals.globals.frontendLocalState;
        const data = this.data();
        if (data === undefined)
            return; // Can't possibly draw anything.
        (0, checkerboard_1.checkerboardExcept)(ctx, this.getHeight(), timeScale.timeToPx(visibleWindowTime.start), timeScale.timeToPx(visibleWindowTime.end), timeScale.timeToPx(data.start), timeScale.timeToPx(data.end));
        this.renderSummary(ctx, data);
    }
    // TODO(dproy): Dedup with CPU slices.
    renderSummary(ctx, data) {
        const { timeScale, visibleWindowTime } = globals.globals.frontendLocalState;
        const startPx = Math.floor(timeScale.timeToPx(visibleWindowTime.start));
        const bottomY = TRACK_HEIGHT;
        let lastX = startPx;
        let lastY = bottomY;
        // TODO(hjd): Dedupe this math.
        const color = (0, colorizer.colorForTid)(this.config.pidForColor);
        color.l = Math.min(color.l + 10, 60);
        color.s -= 20;
        ctx.fillStyle = `hsl(${color.h}, ${color.s}%, ${color.l}%)`;
        ctx.beginPath();
        ctx.moveTo(lastX, lastY);
        for (let i = 0; i < data.utilizations.length; i++) {
            // TODO(dproy): Investigate why utilization is > 1 sometimes.
            const utilization = Math.min(data.utilizations[i], 1);
            const startTime = i * data.bucketSizeSeconds + data.start;
            lastX = Math.floor(timeScale.timeToPx(startTime));
            ctx.lineTo(lastX, lastY);
            lastY = MARGIN_TOP + Math.round(SUMMARY_HEIGHT * (1 - utilization));
            ctx.lineTo(lastX, lastY);
        }
        ctx.lineTo(lastX, bottomY);
        ctx.closePath();
        ctx.fill();
    }
}
ProcessSummaryTrack.kind = exports.PROCESS_SUMMARY_TRACK;
function activate(ctx) {
    ctx.registerTrack(ProcessSummaryTrack);
    ctx.registerTrackController(ProcessSummaryTrackController);
}
exports.activate = activate;
exports.plugin = {
    pluginId: 'perfetto.ProcessSummary',
    activate,
};

});

var thread_state = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.translateState = void 0;
const states = {
    'R': 'Runnable',
    'S': 'Sleeping',
    'D': 'Uninterruptible Sleep',
    'T': 'Stopped',
    't': 'Traced',
    'X': 'Exit (Dead)',
    'Z': 'Exit (Zombie)',
    'x': 'Task Dead',
    'I': 'Idle',
    'K': 'Wake Kill',
    'W': 'Waking',
    'P': 'Parked',
    'N': 'No Load',
    '+': '(Preempted)',
};
function translateState(state, ioWait = undefined) {
    if (state === undefined)
        return '';
    if (state === 'Running') {
        return state;
    }
    if (state === null) {
        return 'Unknown';
    }
    let result = states[state[0]];
    if (ioWait === true) {
        result += ' (IO)';
    }
    else if (ioWait === false) {
        result += ' (non-IO)';
    }
    for (let i = 1; i < state.length; i++) {
        result += state[i] === '+' ? ' ' : ' + ';
        result += states[state[i]];
    }
    // state is some string we don't know how to translate.
    if (result === undefined)
        return state;
    return result;
}
exports.translateState = translateState;

});

var thread_state$1 = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.plugin = exports.THREAD_STATE_TRACK_KIND = void 0;













exports.THREAD_STATE_TRACK_KIND = 'ThreadStateTrack';
class ThreadStateTrackController extends track_controller.TrackController {
    constructor() {
        super(...arguments);
        this.maxDurNs = 0;
    }
    onSetup() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            yield this.query(`
      create view ${this.tableName('thread_state')} as
      select
        id,
        ts,
        dur,
        cpu,
        state,
        io_wait as ioWait
      from thread_state
      where utid = ${this.config.utid} and utid != 0
    `);
            const queryRes = yield this.query(`
      select ifnull(max(dur), 0) as maxDur
      from ${this.tableName('thread_state')}
    `);
            this.maxDurNs = queryRes.firstRow({ maxDur: query_result.NUM }).maxDur;
        });
    }
    onBoundsChange(start, end, resolution) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const resolutionNs = (0, time.toNs)(resolution);
            const startNs = (0, time.toNs)(start);
            const endNs = (0, time.toNs)(end);
            // ns per quantization bucket (i.e. ns per pixel). /2 * 2 is to force it to
            // be an even number, so we can snap in the middle.
            const bucketNs = Math.max(Math.round(resolutionNs * this.pxSize() / 2) * 2, 1);
            const query = `
      select
        (ts + ${bucketNs / 2}) / ${bucketNs} * ${bucketNs} as tsq,
        ts,
        state = 'S' as is_sleep,
        max(dur) as dur,
        ifnull(cast(cpu as integer), -1) as cpu,
        state,
        ioWait,
        ifnull(id, -1) as id
      from ${this.tableName('thread_state')}
      where
        ts >= ${startNs - this.maxDurNs} and
        ts <= ${endNs}
      group by tsq, is_sleep
      order by tsq
    `;
            const queryRes = yield this.query(query);
            const numRows = queryRes.numRows();
            const data = {
                start,
                end,
                resolution,
                length: numRows,
                ids: new Float64Array(numRows),
                starts: new Float64Array(numRows),
                ends: new Float64Array(numRows),
                strings: [],
                state: new Uint16Array(numRows),
                cpu: new Int8Array(numRows),
            };
            const stringIndexes = new Map();
            function internState(shortState, ioWait) {
                let idx = stringIndexes.get({ shortState, ioWait });
                if (idx !== undefined)
                    return idx;
                idx = data.strings.length;
                data.strings.push((0, thread_state.translateState)(shortState, ioWait));
                stringIndexes.set({ shortState, ioWait }, idx);
                return idx;
            }
            const it = queryRes.iter({
                'tsq': query_result.NUM,
                'ts': query_result.NUM,
                'dur': query_result.NUM,
                'cpu': query_result.NUM,
                'state': query_result.STR_NULL,
                'ioWait': query_result.NUM_NULL,
                'id': query_result.NUM,
            });
            for (let row = 0; it.valid(); it.next(), row++) {
                const startNsQ = it.tsq;
                const startNs = it.ts;
                const durNs = it.dur;
                const endNs = startNs + durNs;
                let endNsQ = Math.floor((endNs + bucketNs / 2 - 1) / bucketNs) * bucketNs;
                endNsQ = Math.max(endNsQ, startNsQ + bucketNs);
                const cpu = it.cpu;
                const state = it.state || undefined;
                const ioWait = it.ioWait === null ? undefined : !!it.ioWait;
                const id = it.id;
                // We should never have the end timestamp being the same as the bucket
                // start.
                (0, logging.assertFalse)(startNsQ === endNsQ);
                data.starts[row] = (0, time.fromNs)(startNsQ);
                data.ends[row] = (0, time.fromNs)(endNsQ);
                data.state[row] = internState(state, ioWait);
                data.ids[row] = id;
                data.cpu[row] = cpu;
            }
            return data;
        });
    }
    onDestroy() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            yield this.query(`drop view if exists ${this.tableName('thread_state')}`);
        });
    }
}
ThreadStateTrackController.kind = exports.THREAD_STATE_TRACK_KIND;
const MARGIN_TOP = 4;
const RECT_HEIGHT = 14;
const EXCESS_WIDTH = 10;
class ThreadStateTrack extends track.Track {
    constructor(args) {
        super(args);
    }
    static create(args) {
        return new ThreadStateTrack(args);
    }
    getHeight() {
        return 2 * MARGIN_TOP + RECT_HEIGHT;
    }
    renderCanvas(ctx) {
        const { timeScale, visibleWindowTime } = globals.globals.frontendLocalState;
        const data = this.data();
        const charWidth = ctx.measureText('dbpqaouk').width / 8;
        if (data === undefined)
            return; // Can't possibly draw anything.
        // The draw of the rect on the selected slice must happen after the other
        // drawings, otherwise it would result under another rect.
        let drawRectOnSelected = () => { };
        (0, checkerboard_1.checkerboardExcept)(ctx, this.getHeight(), timeScale.timeToPx(visibleWindowTime.start), timeScale.timeToPx(visibleWindowTime.end), timeScale.timeToPx(data.start), timeScale.timeToPx(data.end));
        ctx.textAlign = 'center';
        ctx.font = '10px Roboto Condensed';
        for (let i = 0; i < data.starts.length; i++) {
            // NOTE: Unlike userspace and scheduling slices, thread state slices are
            // allowed to overlap; specifically, sleeping slices are allowed to
            // overlap with non-sleeping slices. We do this because otherwise
            // sleeping slices generally dominate traces making it seem like there are
            // no running/runnable etc. slices until you zoom in. By drawing both,
            // we get a more accurate representation of the trace and prevent weird
            // artifacts when zooming.
            // See b/201793731 for an example of why we do this.
            const tStart = data.starts[i];
            const tEnd = data.ends[i];
            const state = data.strings[data.state[i]];
            if (tEnd <= visibleWindowTime.start || tStart >= visibleWindowTime.end) {
                continue;
            }
            // Don't display a slice for Task Dead.
            if (state === 'x')
                continue;
            const rectStart = timeScale.timeToPx(tStart);
            const rectEnd = timeScale.timeToPx(tEnd);
            const rectWidth = rectEnd - rectStart;
            const currentSelection = globals.globals.state.currentSelection;
            const isSelected = currentSelection &&
                currentSelection.kind === 'THREAD_STATE' &&
                currentSelection.id === data.ids[i];
            const color = (0, colorizer.colorForState)(state);
            let colorStr = `hsl(${color.h},${color.s}%,${color.l}%)`;
            if (color.a) {
                colorStr = `hsla(${color.h},${color.s}%,${color.l}%, ${color.a})`;
            }
            ctx.fillStyle = colorStr;
            ctx.fillRect(rectStart, MARGIN_TOP, rectWidth, RECT_HEIGHT);
            // Don't render text when we have less than 10px to play with.
            if (rectWidth < 10 || state === 'Sleeping')
                continue;
            const title = (0, canvas_utils.cropText)(state, charWidth, rectWidth);
            const rectXCenter = rectStart + rectWidth / 2;
            ctx.fillStyle = color.l > 80 ? '#404040' : '#fff';
            ctx.fillText(title, rectXCenter, MARGIN_TOP + RECT_HEIGHT / 2 + 3);
            if (isSelected) {
                drawRectOnSelected = () => {
                    const rectStart = Math.max(0 - EXCESS_WIDTH, timeScale.timeToPx(tStart));
                    const rectEnd = Math.min(timeScale.timeToPx(visibleWindowTime.end) + EXCESS_WIDTH, timeScale.timeToPx(tEnd));
                    const color = (0, colorizer.colorForState)(state);
                    ctx.strokeStyle = `hsl(${color.h},${color.s}%,${color.l * 0.7}%)`;
                    ctx.beginPath();
                    ctx.lineWidth = 3;
                    ctx.strokeRect(rectStart, MARGIN_TOP - 1.5, rectEnd - rectStart, RECT_HEIGHT + 3);
                    ctx.closePath();
                };
            }
        }
        drawRectOnSelected();
    }
    onMouseClick({ x }) {
        const data = this.data();
        if (data === undefined)
            return false;
        const { timeScale } = globals.globals.frontendLocalState;
        const time = timeScale.pxToTime(x);
        const index = (0, binary_search.search)(data.starts, time);
        if (index === -1)
            return false;
        const id = data.ids[index];
        globals.globals.makeSelection(actions.Actions.selectThreadState({ id, trackId: this.trackState.id }));
        return true;
    }
}
ThreadStateTrack.kind = exports.THREAD_STATE_TRACK_KIND;
function activate(ctx) {
    ctx.registerTrack(ThreadStateTrack);
    ctx.registerTrackController(ThreadStateTrackController);
}
exports.plugin = {
    pluginId: 'perfetto.ThreadState',
    activate,
};

});

var visualised_args = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.plugin = exports.VisualisedArgsTrack = exports.VISUALISED_ARGS_SLICE_TRACK_KIND = void 0;





exports.VISUALISED_ARGS_SLICE_TRACK_KIND = 'VisualisedArgsTrack';
// The controller for arg visualisation is exactly the same as the controller
// for Chrome slices. All customisation is done on the frontend.
class VisualisedArgsTrackController extends chrome_slices.ChromeSliceTrackController {
}
VisualisedArgsTrackController.kind = exports.VISUALISED_ARGS_SLICE_TRACK_KIND;
class VisualisedArgsTrack extends chrome_slices.ChromeSliceTrack {
    static create(args) {
        return new VisualisedArgsTrack(args);
    }
    getFont() {
        return 'italic 11px Roboto';
    }
    getTrackShellButtons() {
        const config = this.config;
        const buttons = [];
        buttons.push(mithril(track_panel.TrackButton, {
            action: () => {
                globals.globals.dispatch(actions.Actions.removeVisualisedArg({ argName: config.argName }));
            },
            i: 'close',
            tooltip: 'Close',
            showButton: true,
        }));
        return buttons;
    }
}
exports.VisualisedArgsTrack = VisualisedArgsTrack;
VisualisedArgsTrack.kind = exports.VISUALISED_ARGS_SLICE_TRACK_KIND;
function activate(ctx) {
    ctx.registerTrackController(VisualisedArgsTrackController);
    ctx.registerTrack(VisualisedArgsTrack);
}
exports.plugin = {
    pluginId: 'perfetto.VisualisedArgs',
    activate,
};

});

createCommonjsModule(function (module, exports) {
Object.defineProperty(exports, "__esModule", { value: true });




















plugins.pluginRegistry.register(actual_frames.plugin);
plugins.pluginRegistry.register(android_log.plugin);
plugins.pluginRegistry.register(async_slices.plugin);
plugins.pluginRegistry.register(chrome_scroll_jank.plugin);
plugins.pluginRegistry.register(chrome_slices.plugin);
plugins.pluginRegistry.register(counter.plugin);
plugins.pluginRegistry.register(cpu_freq.plugin);
plugins.pluginRegistry.register(cpu_profile.plugin);
plugins.pluginRegistry.register(cpu_slices.plugin);
plugins.pluginRegistry.register(debug_slices.plugin);
plugins.pluginRegistry.register(expected_frames.plugin);
plugins.pluginRegistry.register(generic_slice_track.plugin);
plugins.pluginRegistry.register(heap_profile.plugin);
plugins.pluginRegistry.register(null_track.plugin);
plugins.pluginRegistry.register(perf_samples_profile.plugin);
plugins.pluginRegistry.register(process_scheduling.plugin);
plugins.pluginRegistry.register(process_summary.plugin);
plugins.pluginRegistry.register(thread_state$1.plugin);
plugins.pluginRegistry.register(visualised_args.plugin);

});

var errors = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.getErrorMessage = void 0;
// Attempt to coerce an error object into a string message.
// Sometimes an error message is wrapped in an Error object, sometimes not.
function getErrorMessage(e) {
    var _a;
    if (e && typeof e === 'object') {
        const errorObject = e;
        if (errorObject.message) { // regular Error Object
            return String(errorObject.message);
        }
        else if ((_a = errorObject.error) === null || _a === void 0 ? void 0 : _a.message) { // API result
            return String(errorObject.error.message);
        }
    }
    const asString = String(e);
    if (asString === '[object Object]') {
        try {
            return JSON.stringify(e);
        }
        catch (stringifyError) {
            // ignore failures and just fall through
        }
    }
    return asString;
}
exports.getErrorMessage = getErrorMessage;

});

var jsbn = createCommonjsModule(function (module, exports) {
(function() {

// Copyright (c) 2005  Tom Wu
// All Rights Reserved.
// See "LICENSE" for details.

// Basic JavaScript BN library - subset useful for RSA encryption.

var inBrowser =
    typeof navigator !== 'undefined' && typeof window !== 'undefined';

// Bits per digit
var dbits;

// JavaScript engine analysis
var canary = 0xdeadbeefcafe;
var j_lm = ((canary & 0xffffff) == 0xefcafe);

// (public) Constructor
function BigInteger(a, b, c) {
  if (a != null)
    if ('number' == typeof a)
      this.fromNumber(a, b, c);
    else if (b == null && 'string' != typeof a)
      this.fromString(a, 256);
    else
      this.fromString(a, b);
}

// return new, unset BigInteger
function nbi() {
  return new BigInteger(null);
}

// am: Compute w_j += (x*this_i), propagate carries,
// c is initial carry, returns final carry.
// c < 3*dvalue, x < 2*dvalue, this_i < dvalue
// We need to select the fastest one that works in this environment.

// am1: use a single mult and divide to get the high bits,
// max digit bits should be 26 because
// max internal value = 2*dvalue^2-2*dvalue (< 2^53)
function am1(i, x, w, j, c, n) {
  while (--n >= 0) {
    var v = x * this[i++] + w[j] + c;
    c = Math.floor(v / 0x4000000);
    w[j++] = v & 0x3ffffff;
  }
  return c;
}
// am2 avoids a big mult-and-extract completely.
// Max digit bits should be <= 30 because we do bitwise ops
// on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)
function am2(i, x, w, j, c, n) {
  var xl = x & 0x7fff, xh = x >> 15;
  while (--n >= 0) {
    var l = this[i] & 0x7fff;
    var h = this[i++] >> 15;
    var m = xh * l + h * xl;
    l = xl * l + ((m & 0x7fff) << 15) + w[j] + (c & 0x3fffffff);
    c = (l >>> 30) + (m >>> 15) + xh * h + (c >>> 30);
    w[j++] = l & 0x3fffffff;
  }
  return c;
}
// Alternately, set max digit bits to 28 since some
// browsers slow down when dealing with 32-bit numbers.
function am3(i, x, w, j, c, n) {
  var xl = x & 0x3fff, xh = x >> 14;
  while (--n >= 0) {
    var l = this[i] & 0x3fff;
    var h = this[i++] >> 14;
    var m = xh * l + h * xl;
    l = xl * l + ((m & 0x3fff) << 14) + w[j] + c;
    c = (l >> 28) + (m >> 14) + xh * h;
    w[j++] = l & 0xfffffff;
  }
  return c;
}
if (inBrowser && j_lm && (navigator.appName == 'Microsoft Internet Explorer')) {
  BigInteger.prototype.am = am2;
  dbits = 30;
} else if (inBrowser && j_lm && (navigator.appName != 'Netscape')) {
  BigInteger.prototype.am = am1;
  dbits = 26;
} else {  // Mozilla/Netscape seems to prefer am3
  BigInteger.prototype.am = am3;
  dbits = 28;
}

BigInteger.prototype.DB = dbits;
BigInteger.prototype.DM = ((1 << dbits) - 1);
BigInteger.prototype.DV = (1 << dbits);

var BI_FP = 52;
BigInteger.prototype.FV = Math.pow(2, BI_FP);
BigInteger.prototype.F1 = BI_FP - dbits;
BigInteger.prototype.F2 = 2 * dbits - BI_FP;

// Digit conversions
var BI_RM = '0123456789abcdefghijklmnopqrstuvwxyz';
var BI_RC = new Array();
var rr, vv;
rr = '0'.charCodeAt(0);
for (vv = 0; vv <= 9; ++vv) BI_RC[rr++] = vv;
rr = 'a'.charCodeAt(0);
for (vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;
rr = 'A'.charCodeAt(0);
for (vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;

function int2char(n) {
  return BI_RM.charAt(n);
}
function intAt(s, i) {
  var c = BI_RC[s.charCodeAt(i)];
  return (c == null) ? -1 : c;
}

// (protected) copy this to r
function bnpCopyTo(r) {
  for (var i = this.t - 1; i >= 0; --i) r[i] = this[i];
  r.t = this.t;
  r.s = this.s;
}

// (protected) set from integer value x, -DV <= x < DV
function bnpFromInt(x) {
  this.t = 1;
  this.s = (x < 0) ? -1 : 0;
  if (x > 0)
    this[0] = x;
  else if (x < -1)
    this[0] = x + this.DV;
  else
    this.t = 0;
}

// return bigint initialized to value
function nbv(i) {
  var r = nbi();
  r.fromInt(i);
  return r;
}

// (protected) set from string and radix
function bnpFromString(s, b) {
  var k;
  if (b == 16)
    k = 4;
  else if (b == 8)
    k = 3;
  else if (b == 256)
    k = 8;  // byte array
  else if (b == 2)
    k = 1;
  else if (b == 32)
    k = 5;
  else if (b == 4)
    k = 2;
  else {
    this.fromRadix(s, b);
    return;
  }
  this.t = 0;
  this.s = 0;
  var i = s.length, mi = false, sh = 0;
  while (--i >= 0) {
    var x = (k == 8) ? s[i] & 0xff : intAt(s, i);
    if (x < 0) {
      if (s.charAt(i) == '-') mi = true;
      continue;
    }
    mi = false;
    if (sh == 0)
      this[this.t++] = x;
    else if (sh + k > this.DB) {
      this[this.t - 1] |= (x & ((1 << (this.DB - sh)) - 1)) << sh;
      this[this.t++] = (x >> (this.DB - sh));
    } else
      this[this.t - 1] |= x << sh;
    sh += k;
    if (sh >= this.DB) sh -= this.DB;
  }
  if (k == 8 && (s[0] & 0x80) != 0) {
    this.s = -1;
    if (sh > 0) this[this.t - 1] |= ((1 << (this.DB - sh)) - 1) << sh;
  }
  this.clamp();
  if (mi) BigInteger.ZERO.subTo(this, this);
}

// (protected) clamp off excess high words
function bnpClamp() {
  var c = this.s & this.DM;
  while (this.t > 0 && this[this.t - 1] == c) --this.t;
}

// (public) return string representation in given radix
function bnToString(b) {
  if (this.s < 0) return '-' + this.negate().toString(b);
  var k;
  if (b == 16)
    k = 4;
  else if (b == 8)
    k = 3;
  else if (b == 2)
    k = 1;
  else if (b == 32)
    k = 5;
  else if (b == 4)
    k = 2;
  else
    return this.toRadix(b);
  var km = (1 << k) - 1, d, m = false, r = '', i = this.t;
  var p = this.DB - (i * this.DB) % k;
  if (i-- > 0) {
    if (p < this.DB && (d = this[i] >> p) > 0) {
      m = true;
      r = int2char(d);
    }
    while (i >= 0) {
      if (p < k) {
        d = (this[i] & ((1 << p) - 1)) << (k - p);
        d |= this[--i] >> (p += this.DB - k);
      } else {
        d = (this[i] >> (p -= k)) & km;
        if (p <= 0) {
          p += this.DB;
          --i;
        }
      }
      if (d > 0) m = true;
      if (m) r += int2char(d);
    }
  }
  return m ? r : '0';
}

// (public) -this
function bnNegate() {
  var r = nbi();
  BigInteger.ZERO.subTo(this, r);
  return r;
}

// (public) |this|
function bnAbs() {
  return (this.s < 0) ? this.negate() : this;
}

// (public) return + if this > a, - if this < a, 0 if equal
function bnCompareTo(a) {
  var r = this.s - a.s;
  if (r != 0) return r;
  var i = this.t;
  r = i - a.t;
  if (r != 0) return (this.s < 0) ? -r : r;
  while (--i >= 0)
    if ((r = this[i] - a[i]) != 0) return r;
  return 0;
}

// returns bit length of the integer x
function nbits(x) {
  var r = 1, t;
  if ((t = x >>> 16) != 0) {
    x = t;
    r += 16;
  }
  if ((t = x >> 8) != 0) {
    x = t;
    r += 8;
  }
  if ((t = x >> 4) != 0) {
    x = t;
    r += 4;
  }
  if ((t = x >> 2) != 0) {
    x = t;
    r += 2;
  }
  if ((t = x >> 1) != 0) {
    x = t;
    r += 1;
  }
  return r;
}

// (public) return the number of bits in "this"
function bnBitLength() {
  if (this.t <= 0) return 0;
  return this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ (this.s & this.DM));
}

// (protected) r = this << n*DB
function bnpDLShiftTo(n, r) {
  var i;
  for (i = this.t - 1; i >= 0; --i) r[i + n] = this[i];
  for (i = n - 1; i >= 0; --i) r[i] = 0;
  r.t = this.t + n;
  r.s = this.s;
}

// (protected) r = this >> n*DB
function bnpDRShiftTo(n, r) {
  for (var i = n; i < this.t; ++i) r[i - n] = this[i];
  r.t = Math.max(this.t - n, 0);
  r.s = this.s;
}

// (protected) r = this << n
function bnpLShiftTo(n, r) {
  var bs = n % this.DB;
  var cbs = this.DB - bs;
  var bm = (1 << cbs) - 1;
  var ds = Math.floor(n / this.DB), c = (this.s << bs) & this.DM, i;
  for (i = this.t - 1; i >= 0; --i) {
    r[i + ds + 1] = (this[i] >> cbs) | c;
    c = (this[i] & bm) << bs;
  }
  for (i = ds - 1; i >= 0; --i) r[i] = 0;
  r[ds] = c;
  r.t = this.t + ds + 1;
  r.s = this.s;
  r.clamp();
}

// (protected) r = this >> n
function bnpRShiftTo(n, r) {
  r.s = this.s;
  var ds = Math.floor(n / this.DB);
  if (ds >= this.t) {
    r.t = 0;
    return;
  }
  var bs = n % this.DB;
  var cbs = this.DB - bs;
  var bm = (1 << bs) - 1;
  r[0] = this[ds] >> bs;
  for (var i = ds + 1; i < this.t; ++i) {
    r[i - ds - 1] |= (this[i] & bm) << cbs;
    r[i - ds] = this[i] >> bs;
  }
  if (bs > 0) r[this.t - ds - 1] |= (this.s & bm) << cbs;
  r.t = this.t - ds;
  r.clamp();
}

// (protected) r = this - a
function bnpSubTo(a, r) {
  var i = 0, c = 0, m = Math.min(a.t, this.t);
  while (i < m) {
    c += this[i] - a[i];
    r[i++] = c & this.DM;
    c >>= this.DB;
  }
  if (a.t < this.t) {
    c -= a.s;
    while (i < this.t) {
      c += this[i];
      r[i++] = c & this.DM;
      c >>= this.DB;
    }
    c += this.s;
  } else {
    c += this.s;
    while (i < a.t) {
      c -= a[i];
      r[i++] = c & this.DM;
      c >>= this.DB;
    }
    c -= a.s;
  }
  r.s = (c < 0) ? -1 : 0;
  if (c < -1)
    r[i++] = this.DV + c;
  else if (c > 0)
    r[i++] = c;
  r.t = i;
  r.clamp();
}

// (protected) r = this * a, r != this,a (HAC 14.12)
// "this" should be the larger one if appropriate.
function bnpMultiplyTo(a, r) {
  var x = this.abs(), y = a.abs();
  var i = x.t;
  r.t = i + y.t;
  while (--i >= 0) r[i] = 0;
  for (i = 0; i < y.t; ++i) r[i + x.t] = x.am(0, y[i], r, i, 0, x.t);
  r.s = 0;
  r.clamp();
  if (this.s != a.s) BigInteger.ZERO.subTo(r, r);
}

// (protected) r = this^2, r != this (HAC 14.16)
function bnpSquareTo(r) {
  var x = this.abs();
  var i = r.t = 2 * x.t;
  while (--i >= 0) r[i] = 0;
  for (i = 0; i < x.t - 1; ++i) {
    var c = x.am(i, x[i], r, 2 * i, 0, 1);
    if ((r[i + x.t] += x.am(i + 1, 2 * x[i], r, 2 * i + 1, c, x.t - i - 1)) >=
        x.DV) {
      r[i + x.t] -= x.DV;
      r[i + x.t + 1] = 1;
    }
  }
  if (r.t > 0) r[r.t - 1] += x.am(i, x[i], r, 2 * i, 0, 1);
  r.s = 0;
  r.clamp();
}

// (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)
// r != q, this != m.  q or r may be null.
function bnpDivRemTo(m, q, r) {
  var pm = m.abs();
  if (pm.t <= 0) return;
  var pt = this.abs();
  if (pt.t < pm.t) {
    if (q != null) q.fromInt(0);
    if (r != null) this.copyTo(r);
    return;
  }
  if (r == null) r = nbi();
  var y = nbi(), ts = this.s, ms = m.s;
  var nsh = this.DB - nbits(pm[pm.t - 1]);  // normalize modulus
  if (nsh > 0) {
    pm.lShiftTo(nsh, y);
    pt.lShiftTo(nsh, r);
  } else {
    pm.copyTo(y);
    pt.copyTo(r);
  }
  var ys = y.t;
  var y0 = y[ys - 1];
  if (y0 == 0) return;
  var yt = y0 * (1 << this.F1) + ((ys > 1) ? y[ys - 2] >> this.F2 : 0);
  var d1 = this.FV / yt, d2 = (1 << this.F1) / yt, e = 1 << this.F2;
  var i = r.t, j = i - ys, t = (q == null) ? nbi() : q;
  y.dlShiftTo(j, t);
  if (r.compareTo(t) >= 0) {
    r[r.t++] = 1;
    r.subTo(t, r);
  }
  BigInteger.ONE.dlShiftTo(ys, t);
  t.subTo(y, y);  // "negative" y so we can replace sub with am later
  while (y.t < ys) y[y.t++] = 0;
  while (--j >= 0) {
    // Estimate quotient digit
    var qd =
        (r[--i] == y0) ? this.DM : Math.floor(r[i] * d1 + (r[i - 1] + e) * d2);
    if ((r[i] += y.am(0, qd, r, j, 0, ys)) < qd) {  // Try it out
      y.dlShiftTo(j, t);
      r.subTo(t, r);
      while (r[i] < --qd) r.subTo(t, r);
    }
  }
  if (q != null) {
    r.drShiftTo(ys, q);
    if (ts != ms) BigInteger.ZERO.subTo(q, q);
  }
  r.t = ys;
  r.clamp();
  if (nsh > 0) r.rShiftTo(nsh, r);  // Denormalize remainder
  if (ts < 0) BigInteger.ZERO.subTo(r, r);
}

// (public) this mod a
function bnMod(a) {
  var r = nbi();
  this.abs().divRemTo(a, null, r);
  if (this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r, r);
  return r;
}

// Modular reduction using "classic" algorithm
function Classic(m) {
  this.m = m;
}
function cConvert(x) {
  if (x.s < 0 || x.compareTo(this.m) >= 0)
    return x.mod(this.m);
  else
    return x;
}
function cRevert(x) {
  return x;
}
function cReduce(x) {
  x.divRemTo(this.m, null, x);
}
function cMulTo(x, y, r) {
  x.multiplyTo(y, r);
  this.reduce(r);
}
function cSqrTo(x, r) {
  x.squareTo(r);
  this.reduce(r);
}

Classic.prototype.convert = cConvert;
Classic.prototype.revert = cRevert;
Classic.prototype.reduce = cReduce;
Classic.prototype.mulTo = cMulTo;
Classic.prototype.sqrTo = cSqrTo;

// (protected) return "-1/this % 2^DB"; useful for Mont. reduction
// justification:
//         xy == 1 (mod m)
//         xy =  1+km
//   xy(2-xy) = (1+km)(1-km)
// x[y(2-xy)] = 1-k^2m^2
// x[y(2-xy)] == 1 (mod m^2)
// if y is 1/x mod m, then y(2-xy) is 1/x mod m^2
// should reduce x and y(2-xy) by m^2 at each step to keep size bounded.
// JS multiply "overflows" differently from C/C++, so care is needed here.
function bnpInvDigit() {
  if (this.t < 1) return 0;
  var x = this[0];
  if ((x & 1) == 0) return 0;
  var y = x & 3;                                           // y == 1/x mod 2^2
  y = (y * (2 - (x & 0xf) * y)) & 0xf;                     // y == 1/x mod 2^4
  y = (y * (2 - (x & 0xff) * y)) & 0xff;                   // y == 1/x mod 2^8
  y = (y * (2 - (((x & 0xffff) * y) & 0xffff))) & 0xffff;  // y == 1/x mod 2^16
  // last step - calculate inverse mod DV directly;
  // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints
  y = (y * (2 - x * y % this.DV)) % this.DV;  // y == 1/x mod 2^dbits
  // we really want the negative inverse, and -DV < y < DV
  return (y > 0) ? this.DV - y : -y;
}

// Montgomery reduction
function Montgomery(m) {
  this.m = m;
  this.mp = m.invDigit();
  this.mpl = this.mp & 0x7fff;
  this.mph = this.mp >> 15;
  this.um = (1 << (m.DB - 15)) - 1;
  this.mt2 = 2 * m.t;
}

// xR mod m
function montConvert(x) {
  var r = nbi();
  x.abs().dlShiftTo(this.m.t, r);
  r.divRemTo(this.m, null, r);
  if (x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r, r);
  return r;
}

// x/R mod m
function montRevert(x) {
  var r = nbi();
  x.copyTo(r);
  this.reduce(r);
  return r;
}

// x = x/R mod m (HAC 14.32)
function montReduce(x) {
  while (x.t <= this.mt2)  // pad x so am has enough room later
    x[x.t++] = 0;
  for (var i = 0; i < this.m.t; ++i) {
    // faster way of calculating u0 = x[i]*mp mod DV
    var j = x[i] & 0x7fff;
    var u0 = (j * this.mpl +
              (((j * this.mph + (x[i] >> 15) * this.mpl) & this.um) << 15)) &
        x.DM;
    // use am to combine the multiply-shift-add into one call
    j = i + this.m.t;
    x[j] += this.m.am(0, u0, x, i, 0, this.m.t);
    // propagate carry
    while (x[j] >= x.DV) {
      x[j] -= x.DV;
      x[++j]++;
    }
  }
  x.clamp();
  x.drShiftTo(this.m.t, x);
  if (x.compareTo(this.m) >= 0) x.subTo(this.m, x);
}

// r = "x^2/R mod m"; x != r
function montSqrTo(x, r) {
  x.squareTo(r);
  this.reduce(r);
}

// r = "xy/R mod m"; x,y != r
function montMulTo(x, y, r) {
  x.multiplyTo(y, r);
  this.reduce(r);
}

Montgomery.prototype.convert = montConvert;
Montgomery.prototype.revert = montRevert;
Montgomery.prototype.reduce = montReduce;
Montgomery.prototype.mulTo = montMulTo;
Montgomery.prototype.sqrTo = montSqrTo;

// (protected) true iff this is even
function bnpIsEven() {
  return ((this.t > 0) ? (this[0] & 1) : this.s) == 0;
}

// (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79)
function bnpExp(e, z) {
  if (e > 0xffffffff || e < 1) return BigInteger.ONE;
  var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e) - 1;
  g.copyTo(r);
  while (--i >= 0) {
    z.sqrTo(r, r2);
    if ((e & (1 << i)) > 0)
      z.mulTo(r2, g, r);
    else {
      var t = r;
      r = r2;
      r2 = t;
    }
  }
  return z.revert(r);
}

// (public) this^e % m, 0 <= e < 2^32
function bnModPowInt(e, m) {
  var z;
  if (e < 256 || m.isEven())
    z = new Classic(m);
  else
    z = new Montgomery(m);
  return this.exp(e, z);
}

// protected
BigInteger.prototype.copyTo = bnpCopyTo;
BigInteger.prototype.fromInt = bnpFromInt;
BigInteger.prototype.fromString = bnpFromString;
BigInteger.prototype.clamp = bnpClamp;
BigInteger.prototype.dlShiftTo = bnpDLShiftTo;
BigInteger.prototype.drShiftTo = bnpDRShiftTo;
BigInteger.prototype.lShiftTo = bnpLShiftTo;
BigInteger.prototype.rShiftTo = bnpRShiftTo;
BigInteger.prototype.subTo = bnpSubTo;
BigInteger.prototype.multiplyTo = bnpMultiplyTo;
BigInteger.prototype.squareTo = bnpSquareTo;
BigInteger.prototype.divRemTo = bnpDivRemTo;
BigInteger.prototype.invDigit = bnpInvDigit;
BigInteger.prototype.isEven = bnpIsEven;
BigInteger.prototype.exp = bnpExp;

// public
BigInteger.prototype.toString = bnToString;
BigInteger.prototype.negate = bnNegate;
BigInteger.prototype.abs = bnAbs;
BigInteger.prototype.compareTo = bnCompareTo;
BigInteger.prototype.bitLength = bnBitLength;
BigInteger.prototype.mod = bnMod;
BigInteger.prototype.modPowInt = bnModPowInt;

// "constants"
BigInteger.ZERO = nbv(0);
BigInteger.ONE = nbv(1);

// Pool size must be a multiple of 4 and greater than 32.
// An array of bytes the size of the pool will be passed to init()
var rng_psize = 256;

{
  module.exports = {
    default: BigInteger,
    BigInteger: BigInteger,
  };
}

// Copyright (c) 2005-2009  Tom Wu
// All Rights Reserved.
// See "LICENSE" for details.

// Extended JavaScript BN functions, required for RSA private ops.

// Version 1.1: new BigInteger("0", 10) returns "proper" zero
// Version 1.2: square() API, isProbablePrime fix

// (public)
function bnClone() {
  var r = nbi();
  this.copyTo(r);
  return r;
}

// (public) return value as integer
function bnIntValue() {
  if (this.s < 0) {
    if (this.t == 1)
      return this[0] - this.DV;
    else if (this.t == 0)
      return -1;
  } else if (this.t == 1)
    return this[0];
  else if (this.t == 0)
    return 0;
  // assumes 16 < DB < 32
  return ((this[1] & ((1 << (32 - this.DB)) - 1)) << this.DB) | this[0];
}

// (public) return value as byte
function bnByteValue() {
  return (this.t == 0) ? this.s : (this[0] << 24) >> 24;
}

// (public) return value as short (assumes DB>=16)
function bnShortValue() {
  return (this.t == 0) ? this.s : (this[0] << 16) >> 16;
}

// (protected) return x s.t. r^x < DV
function bnpChunkSize(r) {
  return Math.floor(Math.LN2 * this.DB / Math.log(r));
}

// (public) 0 if this == 0, 1 if this > 0
function bnSigNum() {
  if (this.s < 0)
    return -1;
  else if (this.t <= 0 || (this.t == 1 && this[0] <= 0))
    return 0;
  else
    return 1;
}

// (protected) convert to radix string
function bnpToRadix(b) {
  if (b == null) b = 10;
  if (this.signum() == 0 || b < 2 || b > 36) return '0';
  var cs = this.chunkSize(b);
  var a = Math.pow(b, cs);
  var d = nbv(a), y = nbi(), z = nbi(), r = '';
  this.divRemTo(d, y, z);
  while (y.signum() > 0) {
    r = (a + z.intValue()).toString(b).substr(1) + r;
    y.divRemTo(d, y, z);
  }
  return z.intValue().toString(b) + r;
}

// (protected) convert from radix string
function bnpFromRadix(s, b) {
  this.fromInt(0);
  if (b == null) b = 10;
  var cs = this.chunkSize(b);
  var d = Math.pow(b, cs), mi = false, j = 0, w = 0;
  for (var i = 0; i < s.length; ++i) {
    var x = intAt(s, i);
    if (x < 0) {
      if (s.charAt(i) == '-' && this.signum() == 0) mi = true;
      continue;
    }
    w = b * w + x;
    if (++j >= cs) {
      this.dMultiply(d);
      this.dAddOffset(w, 0);
      j = 0;
      w = 0;
    }
  }
  if (j > 0) {
    this.dMultiply(Math.pow(b, j));
    this.dAddOffset(w, 0);
  }
  if (mi) BigInteger.ZERO.subTo(this, this);
}

// (protected) alternate constructor
function bnpFromNumber(a, b, c) {
  if ('number' == typeof b) {
    // new BigInteger(int,int,RNG)
    if (a < 2)
      this.fromInt(1);
    else {
      this.fromNumber(a, c);
      if (!this.testBit(a - 1))  // force MSB set
        this.bitwiseTo(BigInteger.ONE.shiftLeft(a - 1), op_or, this);
      if (this.isEven()) this.dAddOffset(1, 0);  // force odd
      while (!this.isProbablePrime(b)) {
        this.dAddOffset(2, 0);
        if (this.bitLength() > a)
          this.subTo(BigInteger.ONE.shiftLeft(a - 1), this);
      }
    }
  } else {
    // new BigInteger(int,RNG)
    var x = new Array(), t = a & 7;
    x.length = (a >> 3) + 1;
    b.nextBytes(x);
    if (t > 0)
      x[0] &= ((1 << t) - 1);
    else
      x[0] = 0;
    this.fromString(x, 256);
  }
}

// (public) convert to bigendian byte array
function bnToByteArray() {
  var i = this.t, r = new Array();
  r[0] = this.s;
  var p = this.DB - (i * this.DB) % 8, d, k = 0;
  if (i-- > 0) {
    if (p < this.DB && (d = this[i] >> p) != (this.s & this.DM) >> p)
      r[k++] = d | (this.s << (this.DB - p));
    while (i >= 0) {
      if (p < 8) {
        d = (this[i] & ((1 << p) - 1)) << (8 - p);
        d |= this[--i] >> (p += this.DB - 8);
      } else {
        d = (this[i] >> (p -= 8)) & 0xff;
        if (p <= 0) {
          p += this.DB;
          --i;
        }
      }
      if ((d & 0x80) != 0) d |= -256;
      if (k == 0 && (this.s & 0x80) != (d & 0x80)) ++k;
      if (k > 0 || d != this.s) r[k++] = d;
    }
  }
  return r;
}

function bnEquals(a) {
  return (this.compareTo(a) == 0);
}
function bnMin(a) {
  return (this.compareTo(a) < 0) ? this : a;
}
function bnMax(a) {
  return (this.compareTo(a) > 0) ? this : a;
}

// (protected) r = this op a (bitwise)
function bnpBitwiseTo(a, op, r) {
  var i, f, m = Math.min(a.t, this.t);
  for (i = 0; i < m; ++i) r[i] = op(this[i], a[i]);
  if (a.t < this.t) {
    f = a.s & this.DM;
    for (i = m; i < this.t; ++i) r[i] = op(this[i], f);
    r.t = this.t;
  } else {
    f = this.s & this.DM;
    for (i = m; i < a.t; ++i) r[i] = op(f, a[i]);
    r.t = a.t;
  }
  r.s = op(this.s, a.s);
  r.clamp();
}

// (public) this & a
function op_and(x, y) {
  return x & y;
}
function bnAnd(a) {
  var r = nbi();
  this.bitwiseTo(a, op_and, r);
  return r;
}

// (public) this | a
function op_or(x, y) {
  return x | y;
}
function bnOr(a) {
  var r = nbi();
  this.bitwiseTo(a, op_or, r);
  return r;
}

// (public) this ^ a
function op_xor(x, y) {
  return x ^ y;
}
function bnXor(a) {
  var r = nbi();
  this.bitwiseTo(a, op_xor, r);
  return r;
}

// (public) this & ~a
function op_andnot(x, y) {
  return x & ~y;
}
function bnAndNot(a) {
  var r = nbi();
  this.bitwiseTo(a, op_andnot, r);
  return r;
}

// (public) ~this
function bnNot() {
  var r = nbi();
  for (var i = 0; i < this.t; ++i) r[i] = this.DM & ~this[i];
  r.t = this.t;
  r.s = ~this.s;
  return r;
}

// (public) this << n
function bnShiftLeft(n) {
  var r = nbi();
  if (n < 0)
    this.rShiftTo(-n, r);
  else
    this.lShiftTo(n, r);
  return r;
}

// (public) this >> n
function bnShiftRight(n) {
  var r = nbi();
  if (n < 0)
    this.lShiftTo(-n, r);
  else
    this.rShiftTo(n, r);
  return r;
}

// return index of lowest 1-bit in x, x < 2^31
function lbit(x) {
  if (x == 0) return -1;
  var r = 0;
  if ((x & 0xffff) == 0) {
    x >>= 16;
    r += 16;
  }
  if ((x & 0xff) == 0) {
    x >>= 8;
    r += 8;
  }
  if ((x & 0xf) == 0) {
    x >>= 4;
    r += 4;
  }
  if ((x & 3) == 0) {
    x >>= 2;
    r += 2;
  }
  if ((x & 1) == 0) ++r;
  return r;
}

// (public) returns index of lowest 1-bit (or -1 if none)
function bnGetLowestSetBit() {
  for (var i = 0; i < this.t; ++i)
    if (this[i] != 0) return i * this.DB + lbit(this[i]);
  if (this.s < 0) return this.t * this.DB;
  return -1;
}

// return number of 1 bits in x
function cbit(x) {
  var r = 0;
  while (x != 0) {
    x &= x - 1;
    ++r;
  }
  return r;
}

// (public) return number of set bits
function bnBitCount() {
  var r = 0, x = this.s & this.DM;
  for (var i = 0; i < this.t; ++i) r += cbit(this[i] ^ x);
  return r;
}

// (public) true iff nth bit is set
function bnTestBit(n) {
  var j = Math.floor(n / this.DB);
  if (j >= this.t) return (this.s != 0);
  return ((this[j] & (1 << (n % this.DB))) != 0);
}

// (protected) this op (1<<n)
function bnpChangeBit(n, op) {
  var r = BigInteger.ONE.shiftLeft(n);
  this.bitwiseTo(r, op, r);
  return r;
}

// (public) this | (1<<n)
function bnSetBit(n) {
  return this.changeBit(n, op_or);
}

// (public) this & ~(1<<n)
function bnClearBit(n) {
  return this.changeBit(n, op_andnot);
}

// (public) this ^ (1<<n)
function bnFlipBit(n) {
  return this.changeBit(n, op_xor);
}

// (protected) r = this + a
function bnpAddTo(a, r) {
  var i = 0, c = 0, m = Math.min(a.t, this.t);
  while (i < m) {
    c += this[i] + a[i];
    r[i++] = c & this.DM;
    c >>= this.DB;
  }
  if (a.t < this.t) {
    c += a.s;
    while (i < this.t) {
      c += this[i];
      r[i++] = c & this.DM;
      c >>= this.DB;
    }
    c += this.s;
  } else {
    c += this.s;
    while (i < a.t) {
      c += a[i];
      r[i++] = c & this.DM;
      c >>= this.DB;
    }
    c += a.s;
  }
  r.s = (c < 0) ? -1 : 0;
  if (c > 0)
    r[i++] = c;
  else if (c < -1)
    r[i++] = this.DV + c;
  r.t = i;
  r.clamp();
}

// (public) this + a
function bnAdd(a) {
  var r = nbi();
  this.addTo(a, r);
  return r;
}

// (public) this - a
function bnSubtract(a) {
  var r = nbi();
  this.subTo(a, r);
  return r;
}

// (public) this * a
function bnMultiply(a) {
  var r = nbi();
  this.multiplyTo(a, r);
  return r;
}

// (public) this^2
function bnSquare() {
  var r = nbi();
  this.squareTo(r);
  return r;
}

// (public) this / a
function bnDivide(a) {
  var r = nbi();
  this.divRemTo(a, r, null);
  return r;
}

// (public) this % a
function bnRemainder(a) {
  var r = nbi();
  this.divRemTo(a, null, r);
  return r;
}

// (public) [this/a,this%a]
function bnDivideAndRemainder(a) {
  var q = nbi(), r = nbi();
  this.divRemTo(a, q, r);
  return new Array(q, r);
}

// (protected) this *= n, this >= 0, 1 < n < DV
function bnpDMultiply(n) {
  this[this.t] = this.am(0, n - 1, this, 0, 0, this.t);
  ++this.t;
  this.clamp();
}

// (protected) this += n << w words, this >= 0
function bnpDAddOffset(n, w) {
  if (n == 0) return;
  while (this.t <= w) this[this.t++] = 0;
  this[w] += n;
  while (this[w] >= this.DV) {
    this[w] -= this.DV;
    if (++w >= this.t) this[this.t++] = 0;
    ++this[w];
  }
}

// A "null" reducer
// tslint:disable-next-line
function NullExp() {}
function nNop(x) {
  return x;
}
function nMulTo(x, y, r) {
  x.multiplyTo(y, r);
}
function nSqrTo(x, r) {
  x.squareTo(r);
}

NullExp.prototype.convert = nNop;
NullExp.prototype.revert = nNop;
NullExp.prototype.mulTo = nMulTo;
NullExp.prototype.sqrTo = nSqrTo;

// (public) this^e
function bnPow(e) {
  return this.exp(e, new NullExp());
}

// (protected) r = lower n words of "this * a", a.t <= n
// "this" should be the larger one if appropriate.
function bnpMultiplyLowerTo(a, n, r) {
  var i = Math.min(this.t + a.t, n);
  r.s = 0;  // assumes a,this >= 0
  r.t = i;
  while (i > 0) r[--i] = 0;
  var j;
  for (j = r.t - this.t; i < j; ++i)
    r[i + this.t] = this.am(0, a[i], r, i, 0, this.t);
  for (j = Math.min(a.t, n); i < j; ++i) this.am(0, a[i], r, i, 0, n - i);
  r.clamp();
}

// (protected) r = "this * a" without lower n words, n > 0
// "this" should be the larger one if appropriate.
function bnpMultiplyUpperTo(a, n, r) {
  --n;
  var i = r.t = this.t + a.t - n;
  r.s = 0;  // assumes a,this >= 0
  while (--i >= 0) r[i] = 0;
  for (i = Math.max(n - this.t, 0); i < a.t; ++i)
    r[this.t + i - n] = this.am(n - i, a[i], r, 0, 0, this.t + i - n);
  r.clamp();
  r.drShiftTo(1, r);
}

// Barrett modular reduction
function Barrett(m) {
  // setup Barrett
  this.r2 = nbi();
  this.q3 = nbi();
  BigInteger.ONE.dlShiftTo(2 * m.t, this.r2);
  this.mu = this.r2.divide(m);
  this.m = m;
}

function barrettConvert(x) {
  if (x.s < 0 || x.t > 2 * this.m.t)
    return x.mod(this.m);
  else if (x.compareTo(this.m) < 0)
    return x;
  else {
    var r = nbi();
    x.copyTo(r);
    this.reduce(r);
    return r;
  }
}

function barrettRevert(x) {
  return x;
}

// x = x mod m (HAC 14.42)
function barrettReduce(x) {
  x.drShiftTo(this.m.t - 1, this.r2);
  if (x.t > this.m.t + 1) {
    x.t = this.m.t + 1;
    x.clamp();
  }
  this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3);
  this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2);
  while (x.compareTo(this.r2) < 0) x.dAddOffset(1, this.m.t + 1);
  x.subTo(this.r2, x);
  while (x.compareTo(this.m) >= 0) x.subTo(this.m, x);
}

// r = x^2 mod m; x != r
function barrettSqrTo(x, r) {
  x.squareTo(r);
  this.reduce(r);
}

// r = x*y mod m; x,y != r
function barrettMulTo(x, y, r) {
  x.multiplyTo(y, r);
  this.reduce(r);
}

Barrett.prototype.convert = barrettConvert;
Barrett.prototype.revert = barrettRevert;
Barrett.prototype.reduce = barrettReduce;
Barrett.prototype.mulTo = barrettMulTo;
Barrett.prototype.sqrTo = barrettSqrTo;

// (public) this^e % m (HAC 14.85)
function bnModPow(e, m) {
  var i = e.bitLength(), k, r = nbv(1), z;
  if (i <= 0)
    return r;
  else if (i < 18)
    k = 1;
  else if (i < 48)
    k = 3;
  else if (i < 144)
    k = 4;
  else if (i < 768)
    k = 5;
  else
    k = 6;
  if (i < 8)
    z = new Classic(m);
  else if (m.isEven())
    z = new Barrett(m);
  else
    z = new Montgomery(m);

  // precomputation
  var g = new Array(), n = 3, k1 = k - 1, km = (1 << k) - 1;
  g[1] = z.convert(this);
  if (k > 1) {
    var g2 = nbi();
    z.sqrTo(g[1], g2);
    while (n <= km) {
      g[n] = nbi();
      z.mulTo(g2, g[n - 2], g[n]);
      n += 2;
    }
  }

  var j = e.t - 1, w, is1 = true, r2 = nbi(), t;
  i = nbits(e[j]) - 1;
  while (j >= 0) {
    if (i >= k1)
      w = (e[j] >> (i - k1)) & km;
    else {
      w = (e[j] & ((1 << (i + 1)) - 1)) << (k1 - i);
      if (j > 0) w |= e[j - 1] >> (this.DB + i - k1);
    }

    n = k;
    while ((w & 1) == 0) {
      w >>= 1;
      --n;
    }
    if ((i -= n) < 0) {
      i += this.DB;
      --j;
    }
    if (is1) {  // ret == 1, don't bother squaring or multiplying it
      g[w].copyTo(r);
      is1 = false;
    } else {
      while (n > 1) {
        z.sqrTo(r, r2);
        z.sqrTo(r2, r);
        n -= 2;
      }
      if (n > 0)
        z.sqrTo(r, r2);
      else {
        t = r;
        r = r2;
        r2 = t;
      }
      z.mulTo(r2, g[w], r);
    }

    while (j >= 0 && (e[j] & (1 << i)) == 0) {
      z.sqrTo(r, r2);
      t = r;
      r = r2;
      r2 = t;
      if (--i < 0) {
        i = this.DB - 1;
        --j;
      }
    }
  }
  return z.revert(r);
}

// (public) gcd(this,a) (HAC 14.54)
function bnGCD(a) {
  var x = (this.s < 0) ? this.negate() : this.clone();
  var y = (a.s < 0) ? a.negate() : a.clone();
  if (x.compareTo(y) < 0) {
    var t = x;
    x = y;
    y = t;
  }
  var i = x.getLowestSetBit(), g = y.getLowestSetBit();
  if (g < 0) return x;
  if (i < g) g = i;
  if (g > 0) {
    x.rShiftTo(g, x);
    y.rShiftTo(g, y);
  }
  while (x.signum() > 0) {
    if ((i = x.getLowestSetBit()) > 0) x.rShiftTo(i, x);
    if ((i = y.getLowestSetBit()) > 0) y.rShiftTo(i, y);
    if (x.compareTo(y) >= 0) {
      x.subTo(y, x);
      x.rShiftTo(1, x);
    } else {
      y.subTo(x, y);
      y.rShiftTo(1, y);
    }
  }
  if (g > 0) y.lShiftTo(g, y);
  return y;
}

// (protected) this % n, n < 2^26
function bnpModInt(n) {
  if (n <= 0) return 0;
  var d = this.DV % n, r = (this.s < 0) ? n - 1 : 0;
  if (this.t > 0)
    if (d == 0)
      r = this[0] % n;
    else
      for (var i = this.t - 1; i >= 0; --i) r = (d * r + this[i]) % n;
  return r;
}

// (public) 1/this % m (HAC 14.61)
function bnModInverse(m) {
  var ac = m.isEven();
  if ((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO;
  var u = m.clone(), v = this.clone();
  var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1);
  while (u.signum() != 0) {
    while (u.isEven()) {
      u.rShiftTo(1, u);
      if (ac) {
        if (!a.isEven() || !b.isEven()) {
          a.addTo(this, a);
          b.subTo(m, b);
        }
        a.rShiftTo(1, a);
      } else if (!b.isEven())
        b.subTo(m, b);
      b.rShiftTo(1, b);
    }
    while (v.isEven()) {
      v.rShiftTo(1, v);
      if (ac) {
        if (!c.isEven() || !d.isEven()) {
          c.addTo(this, c);
          d.subTo(m, d);
        }
        c.rShiftTo(1, c);
      } else if (!d.isEven())
        d.subTo(m, d);
      d.rShiftTo(1, d);
    }
    if (u.compareTo(v) >= 0) {
      u.subTo(v, u);
      if (ac) a.subTo(c, a);
      b.subTo(d, b);
    } else {
      v.subTo(u, v);
      if (ac) c.subTo(a, c);
      d.subTo(b, d);
    }
  }
  if (v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO;
  if (d.compareTo(m) >= 0) return d.subtract(m);
  if (d.signum() < 0)
    d.addTo(m, d);
  else
    return d;
  if (d.signum() < 0)
    return d.add(m);
  else
    return d;
}

var lowprimes = [
  2,   3,   5,   7,   11,  13,  17,  19,  23,  29,  31,  37,  41,  43,
  47,  53,  59,  61,  67,  71,  73,  79,  83,  89,  97,  101, 103, 107,
  109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181,
  191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263,
  269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349,
  353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433,
  439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521,
  523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613,
  617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701,
  709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809,
  811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887,
  907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997
];
var lplim = (1 << 26) / lowprimes[lowprimes.length - 1];

// (public) test primality with certainty >= 1-.5^t
function bnIsProbablePrime(t) {
  var i, x = this.abs();
  if (x.t == 1 && x[0] <= lowprimes[lowprimes.length - 1]) {
    for (i = 0; i < lowprimes.length; ++i)
      if (x[0] == lowprimes[i]) return true;
    return false;
  }
  if (x.isEven()) return false;
  i = 1;
  while (i < lowprimes.length) {
    var m = lowprimes[i], j = i + 1;
    while (j < lowprimes.length && m < lplim) m *= lowprimes[j++];
    m = x.modInt(m);
    while (i < j)
      if (m % lowprimes[i++] == 0) return false;
  }
  return x.millerRabin(t);
}

// (protected) true if probably prime (HAC 4.24, Miller-Rabin)
function bnpMillerRabin(t) {
  var n1 = this.subtract(BigInteger.ONE);
  var k = n1.getLowestSetBit();
  if (k <= 0) return false;
  var r = n1.shiftRight(k);
  t = (t + 1) >> 1;
  if (t > lowprimes.length) t = lowprimes.length;
  var a = nbi();
  for (var i = 0; i < t; ++i) {
    // Pick bases at random, instead of starting at 2
    a.fromInt(lowprimes[Math.floor(Math.random() * lowprimes.length)]);
    var y = a.modPow(r, this);
    if (y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {
      var j = 1;
      while (j++ < k && y.compareTo(n1) != 0) {
        y = y.modPowInt(2, this);
        if (y.compareTo(BigInteger.ONE) == 0) return false;
      }
      if (y.compareTo(n1) != 0) return false;
    }
  }
  return true;
}

// protected
BigInteger.prototype.chunkSize = bnpChunkSize;
BigInteger.prototype.toRadix = bnpToRadix;
BigInteger.prototype.fromRadix = bnpFromRadix;
BigInteger.prototype.fromNumber = bnpFromNumber;
BigInteger.prototype.bitwiseTo = bnpBitwiseTo;
BigInteger.prototype.changeBit = bnpChangeBit;
BigInteger.prototype.addTo = bnpAddTo;
BigInteger.prototype.dMultiply = bnpDMultiply;
BigInteger.prototype.dAddOffset = bnpDAddOffset;
BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;
BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;
BigInteger.prototype.modInt = bnpModInt;
BigInteger.prototype.millerRabin = bnpMillerRabin;

// public
BigInteger.prototype.clone = bnClone;
BigInteger.prototype.intValue = bnIntValue;
BigInteger.prototype.byteValue = bnByteValue;
BigInteger.prototype.shortValue = bnShortValue;
BigInteger.prototype.signum = bnSigNum;
BigInteger.prototype.toByteArray = bnToByteArray;
BigInteger.prototype.equals = bnEquals;
BigInteger.prototype.min = bnMin;
BigInteger.prototype.max = bnMax;
BigInteger.prototype.and = bnAnd;
BigInteger.prototype.or = bnOr;
BigInteger.prototype.xor = bnXor;
BigInteger.prototype.andNot = bnAndNot;
BigInteger.prototype.not = bnNot;
BigInteger.prototype.shiftLeft = bnShiftLeft;
BigInteger.prototype.shiftRight = bnShiftRight;
BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;
BigInteger.prototype.bitCount = bnBitCount;
BigInteger.prototype.testBit = bnTestBit;
BigInteger.prototype.setBit = bnSetBit;
BigInteger.prototype.clearBit = bnClearBit;
BigInteger.prototype.flipBit = bnFlipBit;
BigInteger.prototype.add = bnAdd;
BigInteger.prototype.subtract = bnSubtract;
BigInteger.prototype.multiply = bnMultiply;
BigInteger.prototype.divide = bnDivide;
BigInteger.prototype.remainder = bnRemainder;
BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;
BigInteger.prototype.modPow = bnModPow;
BigInteger.prototype.modInverse = bnModInverse;
BigInteger.prototype.pow = bnPow;
BigInteger.prototype.gcd = bnGCD;
BigInteger.prototype.isProbablePrime = bnIsProbablePrime;

// JSBN-specific extension
BigInteger.prototype.square = bnSquare;

// BigInteger interfaces not implemented in jsbn:

// BigInteger(int signum, byte[] magnitude)
// double doubleValue()
// float floatValue()
// int hashCode()
// long longValue()
// static BigInteger valueOf(long val)

// Depends on jsbn.js and rng.js

// Version 1.1: support utf-8 encoding in pkcs1pad2

// convert a (hex) string to a bignum object
function parseBigInt(str, r) {
  return new BigInteger(str, r);
}

// PKCS#1 (type 2, random) pad input string s to n bytes, and return a bigint
function pkcs1pad2(s, n) {
  if (n < s.length + 11) {  // TODO: fix for utf-8
    alert('Message too long for RSA');
    return null;
  }
  var ba = new Array();
  var i = s.length - 1;
  while (i >= 0 && n > 0) {
    var c = s.charCodeAt(i--);
    if (c < 128) {  // encode using utf-8
      ba[--n] = c;
    } else if ((c > 127) && (c < 2048)) {
      ba[--n] = (c & 63) | 128;
      ba[--n] = (c >> 6) | 192;
    } else {
      ba[--n] = (c & 63) | 128;
      ba[--n] = ((c >> 6) & 63) | 128;
      ba[--n] = (c >> 12) | 224;
    }
  }
  ba[--n] = 0;
  var rng = new SecureRandom();
  var x = new Array();
  while (n > 2) {  // random non-zero pad
    x[0] = 0;
    while (x[0] == 0) rng.nextBytes(x);
    ba[--n] = x[0];
  }
  ba[--n] = 2;
  ba[--n] = 0;
  return new BigInteger(ba);
}

// "empty" RSA key constructor
function RSAKey() {
  this.n = null;
  this.e = 0;
  this.d = null;
  this.p = null;
  this.q = null;
  this.dmp1 = null;
  this.dmq1 = null;
  this.coeff = null;
}

// Set the public key fields N and e from hex strings
function RSASetPublic(N, E) {
  if (N != null && E != null && N.length > 0 && E.length > 0) {
    this.n = parseBigInt(N, 16);
    this.e = parseInt(E, 16);
  } else
    alert('Invalid RSA public key');
}

// Set the private key fields N, e, d and CRT params from hex strings
function RSASetPrivateEx(N,E,D,P,Q,DP,DQ,C) {
    if(N != null && E != null && N.length > 0 && E.length > 0) {
      this.n = parseBigInt(N,16);
      this.e = parseInt(E,16);
      this.d = parseBigInt(D,16);
      this.p = parseBigInt(P,16);
      this.q = parseBigInt(Q,16);
      this.dmp1 = parseBigInt(DP,16);
      this.dmq1 = parseBigInt(DQ,16);
      this.coeff = parseBigInt(C,16);
    }
    else
      alert("Invalid RSA private key");
  }

// Perform raw private operation on "x": return x^d (mod n)
function RSADoPrivate(x) {
  if(this.p == null || this.q == null)
    return x.modPow(this.d, this.n);

  // TODO: re-calculate any missing CRT params
  var xp = x.mod(this.p).modPow(this.dmp1, this.p);
  var xq = x.mod(this.q).modPow(this.dmq1, this.q);

  while(xp.compareTo(xq) < 0)
    xp = xp.add(this.p);
  return xp.subtract(xq).multiply(this.coeff).mod(this.p).multiply(this.q).add(xq);
}

// Perform raw public operation on "x": return x^e (mod n)
function RSADoPublic(x) {
  return x.modPowInt(this.e, this.n);
}

// Return the PKCS#1 RSA encryption of "text" as an even-length hex string
function RSAEncrypt(text) {
  var m = pkcs1pad2(text, (this.n.bitLength() + 7) >> 3);
  if (m == null) return null;
  var c = this.doPublic(m);
  if (c == null) return null;
  var h = c.toString(16);
  if ((h.length & 1) == 0)
    return h;
  else
    return '0' + h;
}

// Return the PKCS#1 RSA encryption of "text" as a Base64-encoded string
// function RSAEncryptB64(text) {
//  var h = this.encrypt(text);
//  if(h) return hex2b64(h); else return null;
//}

// protected
RSAKey.prototype.doPublic = RSADoPublic;

// public
RSAKey.prototype.doPrivate = RSADoPrivate;
RSAKey.prototype.setPublic = RSASetPublic;
RSAKey.prototype.setPrivateEx = RSASetPrivateEx;
RSAKey.prototype.encrypt = RSAEncrypt;
// RSAKey.prototype.encrypt_b64 = RSAEncryptB64;

// Random number generator - requires a PRNG backend, e.g. prng4.js

// For best results, put code like
// <body onClick='rng_seed_time();' onKeyPress='rng_seed_time();'>
// in your main HTML document.

var rng_state;
var rng_pool;
var rng_pptr;

// Mix in a 32-bit integer into the pool
function rng_seed_int(x) {
  rng_pool[rng_pptr++] ^= x & 255;
  rng_pool[rng_pptr++] ^= (x >> 8) & 255;
  rng_pool[rng_pptr++] ^= (x >> 16) & 255;
  rng_pool[rng_pptr++] ^= (x >> 24) & 255;
  if (rng_pptr >= rng_psize) rng_pptr -= rng_psize;
}

// Mix in the current time (w/milliseconds) into the pool
function rng_seed_time() {
  rng_seed_int(new Date().getTime());
}

// Initialize the pool with junk if needed.
if (rng_pool == null) {
  rng_pool = new Array();
  rng_pptr = 0;
  var t;
  if (inBrowser && window.crypto && window.crypto.getRandomValues) {
    // Use webcrypto if available
    var ua = new Uint8Array(32);
    window.crypto.getRandomValues(ua);
    for (t = 0; t < 32; ++t) rng_pool[rng_pptr++] = ua[t];
  }
  if (inBrowser && navigator.appName == 'Netscape' &&
      navigator.appVersion < '5' && window.crypto) {
    // Extract entropy (256 bits) from NS4 RNG if available
    var z = window.crypto.random(32);
    for (t = 0; t < z.length; ++t) rng_pool[rng_pptr++] = z.charCodeAt(t) & 255;
  }
  while (rng_pptr < rng_psize) {  // extract some randomness from Math.random()
    t = Math.floor(65536 * Math.random());
    rng_pool[rng_pptr++] = t >>> 8;
    rng_pool[rng_pptr++] = t & 255;
  }
  rng_pptr = 0;
  rng_seed_time();
  // rng_seed_int(window.screenX);
  // rng_seed_int(window.screenY);
}

function rng_get_byte() {
  if (rng_state == null) {
    rng_seed_time();
    rng_state = prng_newstate();
    rng_state.init(rng_pool);
    for (rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr)
      rng_pool[rng_pptr] = 0;
    rng_pptr = 0;
    // rng_pool = null;
  }
  // TODO: allow reseeding after first request
  return rng_state.next();
}

function rng_get_bytes(ba) {
  var i;
  for (i = 0; i < ba.length; ++i) ba[i] = rng_get_byte();
}

// tslint:disable-next-line
function SecureRandom() {}

SecureRandom.prototype.nextBytes = rng_get_bytes;

// prng4.js - uses Arcfour as a PRNG

function Arcfour() {
  this.i = 0;
  this.j = 0;
  this.S = new Array();
}

// Initialize arcfour context from key, an array of ints, each from [0..255]
function ARC4init(key) {
  var i, j, t;
  for (i = 0; i < 256; ++i) this.S[i] = i;
  j = 0;
  for (i = 0; i < 256; ++i) {
    j = (j + this.S[i] + key[i % key.length]) & 255;
    t = this.S[i];
    this.S[i] = this.S[j];
    this.S[j] = t;
  }
  this.i = 0;
  this.j = 0;
}

function ARC4next() {
  var t;
  this.i = (this.i + 1) & 255;
  this.j = (this.j + this.S[this.i]) & 255;
  t = this.S[this.i];
  this.S[this.i] = this.S[this.j];
  this.S[this.j] = t;
  return this.S[(t + this.S[this.i]) & 255];
}

Arcfour.prototype.init = ARC4init;
Arcfour.prototype.next = ARC4next;

// Plug in your RNG constructor here
function prng_newstate() {
  return new Arcfour();
}

// Pool size must be a multiple of 4 and greater than 32.
// An array of bytes the size of the pool will be passed to init()
var rng_psize = 256;

{
  module.exports = {
      default: BigInteger,
      BigInteger: BigInteger,
      RSAKey: RSAKey,
  };
}

}).call(commonjsGlobal);
});

var recording_utils = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.PARSING_UNRECOGNIZED_MESSAGE = exports.PARSING_UNRECOGNIZED_PORT = exports.PARSING_UNABLE_TO_DECODE_METHOD = exports.PARSING_UNKNWON_REQUEST_ID = exports.RECORDING_IN_PROGRESS = exports.BUFFER_USAGE_INCORRECT_FORMAT = exports.BUFFER_USAGE_NOT_ACCESSIBLE = exports.MALFORMED_EXTENSION_MESSAGE = exports.EXTENSION_NOT_INSTALLED = exports.EXTENSION_NAME = exports.EXTENSION_URL = exports.EXTENSION_ID = exports.findInterfaceAndEndpoint = exports.ADB_DEVICE_FILTER = exports.NO_DEVICE_SELECTED = exports.CUSTOM_TRACED_CONSUMER_SOCKET_PATH = exports.DEFAULT_TRACED_CONSUMER_SOCKET_PATH = exports.ALLOW_USB_DEBUGGING = exports.TRACEBOX_FETCH_TIMEOUT = exports.TRACEBOX_DEVICE_PATH = exports.BINARY_PUSH_UNKNOWN_RESPONSE = exports.BINARY_PUSH_FAILURE = exports.isCrOS = exports.isLinux = exports.isMacOs = exports.buildAbdWebsocketCommand = exports.WEBSOCKET_CLOSED_ABNORMALLY_CODE = exports.WEBSOCKET_UNABLE_TO_CONNECT = void 0;
// Begin Websocket ////////////////////////////////////////////////////////
exports.WEBSOCKET_UNABLE_TO_CONNECT = 'Unable to connect to device via websocket.';
// https://www.rfc-editor.org/rfc/rfc6455#section-7.4.1
exports.WEBSOCKET_CLOSED_ABNORMALLY_CODE = 1006;
// The messages read by the adb server have their length prepended in hex.
// This method adds the length at the beginning of the message.
// Example: 'host:track-devices' -> '0012host:track-devices'
// go/codesearch/aosp-android11/system/core/adb/SERVICES.TXT
function buildAbdWebsocketCommand(cmd) {
    const hdr = cmd.length.toString(16).padStart(4, '0');
    return hdr + cmd;
}
exports.buildAbdWebsocketCommand = buildAbdWebsocketCommand;
// Sample user agent for Chrome on Mac OS:
// 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36
// (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36'
function isMacOs(userAgent) {
    return userAgent.toLowerCase().includes(' mac os ');
}
exports.isMacOs = isMacOs;
// Sample user agent for Chrome on Linux:
// Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)
// Chrome/105.0.0.0 Safari/537.36
function isLinux(userAgent) {
    return userAgent.toLowerCase().includes(' linux ');
}
exports.isLinux = isLinux;
// Sample user agent for Chrome on Chrome OS:
// "Mozilla/5.0 (X11; CrOS x86_64 14816.99.0) AppleWebKit/537.36
// (KHTML, like Gecko) Chrome/103.0.5060.114 Safari/537.36"
// This condition is wider, in the unlikely possibility of different casing,
function isCrOS(userAgent) {
    return userAgent.toLowerCase().includes(' cros ');
}
exports.isCrOS = isCrOS;
// End Websocket //////////////////////////////////////////////////////////
// Begin Adb //////////////////////////////////////////////////////////////
exports.BINARY_PUSH_FAILURE = 'BinaryPushFailure';
exports.BINARY_PUSH_UNKNOWN_RESPONSE = 'BinaryPushUnknownResponse';
// In case the device doesn't have the tracebox, we upload the latest version
// to this path.
exports.TRACEBOX_DEVICE_PATH = '/data/local/tmp/tracebox';
// Experimentally, this takes 900ms on the first fetch and 20-30ms after
// because of caching.
exports.TRACEBOX_FETCH_TIMEOUT = 30000;
// Message shown to the user when they need to allow authentication on the
// device in order to connect.
exports.ALLOW_USB_DEBUGGING = 'Please allow USB debugging on device and try again.';
// If the Android device has the tracing service on it (from API version 29),
// then we can connect to this consumer socket.
exports.DEFAULT_TRACED_CONSUMER_SOCKET_PATH = 'localfilesystem:/dev/socket/traced_consumer';
// If the Android device does not have the tracing service on it (before API
// version 29), we will have to push the tracebox on the device. Then, we
// can connect to this consumer socket (using it does not require system admin
// privileges).
exports.CUSTOM_TRACED_CONSUMER_SOCKET_PATH = 'localabstract:traced_consumer';
// End Adb /////////////////////////////////////////////////////////////////
// Begin Webusb ///////////////////////////////////////////////////////////
exports.NO_DEVICE_SELECTED = 'No device selected.';
exports.ADB_DEVICE_FILTER = {
    classCode: 255,
    subclassCode: 66,
    protocolCode: 1, // Adb protocol
};
function findInterfaceAndEndpoint(device) {
    const adbDeviceFilter = exports.ADB_DEVICE_FILTER;
    for (const config of device.configurations) {
        for (const interface_ of config.interfaces) {
            for (const alt of interface_.alternates) {
                if (alt.interfaceClass === adbDeviceFilter.classCode &&
                    alt.interfaceSubclass === adbDeviceFilter.subclassCode &&
                    alt.interfaceProtocol === adbDeviceFilter.protocolCode) {
                    return {
                        configurationValue: config.configurationValue,
                        usbInterfaceNumber: interface_.interfaceNumber,
                        endpoints: alt.endpoints,
                    };
                } // if (alternate)
            } // for (interface.alternates)
        } // for (configuration.interfaces)
    } // for (configurations)
    return undefined;
}
exports.findInterfaceAndEndpoint = findInterfaceAndEndpoint;
// End Webusb //////////////////////////////////////////////////////////////
// Begin Chrome ///////////////////////////////////////////////////////////
exports.EXTENSION_ID = 'lfmkphfpdbjijhpomgecfikhfohaoine';
exports.EXTENSION_URL = `https://chrome.google.com/webstore/detail/perfetto-ui/${exports.EXTENSION_ID}`;
exports.EXTENSION_NAME = 'Chrome extension';
exports.EXTENSION_NOT_INSTALLED = `To trace Chrome from the Perfetto UI, you need to install our
    ${exports.EXTENSION_URL} and then reload this page.`;
exports.MALFORMED_EXTENSION_MESSAGE = 'Malformed extension message.';
exports.BUFFER_USAGE_NOT_ACCESSIBLE = 'Buffer usage not accessible';
exports.BUFFER_USAGE_INCORRECT_FORMAT = 'The buffer usage data has am incorrect format';
// End Chrome /////////////////////////////////////////////////////////////
// Begin Traced //////////////////////////////////////////////////////////
exports.RECORDING_IN_PROGRESS = 'Recording in progress';
exports.PARSING_UNKNWON_REQUEST_ID = 'Unknown request id';
exports.PARSING_UNABLE_TO_DECODE_METHOD = 'Unable to decode method';
exports.PARSING_UNRECOGNIZED_PORT = 'Unrecognized consumer port response';
exports.PARSING_UNRECOGNIZED_MESSAGE = 'Unrecognized frame message';
// End Traced ///////////////////////////////////////////////////////////

});

var upload_utils = createCommonjsModule(function (module, exports) {
// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.toSha256 = exports.saveState = exports.saveTrace = exports.BUCKET_NAME = void 0;

exports.BUCKET_NAME = 'perfetto-ui-data';

function saveTrace(trace) {
    return tslib.__awaiter(this, void 0, void 0, function* () {
        // TODO(hjd): This should probably also be a hash but that requires
        // trace processor support.
        const name = (0, dist$1.v4)();
        const url = 'https://www.googleapis.com/upload/storage/v1/b/' +
            `${exports.BUCKET_NAME}/o?uploadType=media` +
            `&name=${name}&predefinedAcl=publicRead`;
        const response = yield fetch(url, {
            method: 'post',
            headers: { 'Content-Type': 'application/octet-stream;' },
            body: trace,
        });
        yield response.json();
        return `https://storage.googleapis.com/${exports.BUCKET_NAME}/${name}`;
    });
}
exports.saveTrace = saveTrace;
function saveState(stateOrConfig) {
    return tslib.__awaiter(this, void 0, void 0, function* () {
        const text = JSON.stringify(stateOrConfig, (key, value) => {
            return key === 'nonSerializableState' ? undefined : value;
        });
        const hash = yield toSha256(text);
        const url = 'https://www.googleapis.com/upload/storage/v1/b/' +
            `${exports.BUCKET_NAME}/o?uploadType=media` +
            `&name=${hash}&predefinedAcl=publicRead`;
        const response = yield fetch(url, {
            method: 'post',
            headers: {
                'Content-Type': 'application/json; charset=utf-8',
            },
            body: text,
        });
        yield response.json();
        return hash;
    });
}
exports.saveState = saveState;
function toSha256(str) {
    return tslib.__awaiter(this, void 0, void 0, function* () {
        // TODO(hjd): TypeScript bug with definition of TextEncoder.
        const buffer = new TextEncoder('utf-8').encode(str);
        const digest = yield crypto.subtle.digest('SHA-256', buffer);
        return Array.from(new Uint8Array(digest)).map((x) => x.toString(16)).join('');
    });
}
exports.toSha256 = toSha256;

});

var trace_attrs = createCommonjsModule(function (module, exports) {
// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.isDownloadable = exports.isShareable = void 0;

function isShareable() {
    return (globals.globals.isInternalUser && isDownloadable());
}
exports.isShareable = isShareable;
function isDownloadable() {
    const engine = globals.globals.getCurrentEngine();
    if (!engine) {
        return false;
    }
    if (engine.source.type === 'ARRAY_BUFFER' && engine.source.localOnly) {
        return false;
    }
    if (engine.source.type === 'HTTP_RPC') {
        return false;
    }
    return true;
}
exports.isDownloadable = isDownloadable;

});

var error_dialog = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.showFailedToPushBinary = exports.showIssueParsingTheTracedResponse = exports.showWebsocketConnectionIssue = exports.showExtensionNotInstalled = exports.showNoDeviceSelected = exports.showAllowUSBDebugging = exports.showConnectionLostError = exports.showWebUSBErrorV2 = exports.maybeShowErrorDialog = void 0;








// Never show more than one dialog per minute.
const MIN_REPORT_PERIOD_MS = 60000;
let timeLastReport = 0;
// Keeps the last ERR_QUEUE_MAX_LEN errors while the dialog is throttled.
const queuedErrors = new Array();
const ERR_QUEUE_MAX_LEN = 10;
function maybeShowErrorDialog(errLog) {
    globals.globals.logging.logError(errLog);
    const now = performance.now();
    // Here we rely on the exception message from onCannotGrowMemory function
    if (errLog.includes('Cannot enlarge memory')) {
        showOutOfMemoryDialog();
        // Refresh timeLastReport to prevent a different error showing a dialog
        timeLastReport = now;
        return;
    }
    if (!feature_flags.RECORDING_V2_FLAG.get()) {
        if (errLog.includes('Unable to claim interface')) {
            showWebUSBError();
            timeLastReport = now;
            return;
        }
        if (errLog.includes('A transfer error has occurred') ||
            errLog.includes('The device was disconnected') ||
            errLog.includes('The transfer was cancelled')) {
            showConnectionLostError();
            timeLastReport = now;
            return;
        }
    }
    if (errLog.includes('(ERR:fmt)')) {
        showUnknownFileError();
        return;
    }
    if (errLog.includes('(ERR:rpc_seq)')) {
        showRpcSequencingError();
        return;
    }
    if (timeLastReport > 0 && now - timeLastReport <= MIN_REPORT_PERIOD_MS) {
        queuedErrors.unshift(errLog);
        if (queuedErrors.length > ERR_QUEUE_MAX_LEN)
            queuedErrors.pop();
        console.log('Suppressing crash dialog, last error notified too soon.');
        return;
    }
    timeLastReport = now;
    // Append queued errors.
    while (queuedErrors.length > 0) {
        const queuedErr = queuedErrors.shift();
        errLog += `\n\n---------------------------------------\n${queuedErr}`;
    }
    const errTitle = errLog.split('\n', 1)[0].substr(0, 80);
    const userDescription = '';
    let checked = false;
    const engine = globals.globals.getCurrentEngine();
    const shareTraceSection = [];
    if ((0, trace_attrs.isShareable)() && !urlExists()) {
        shareTraceSection.push(mithril(`input[type=checkbox]`, {
            checked,
            oninput: (ev) => {
                checked = ev.target.checked;
                if (checked && engine && engine.source.type === 'FILE') {
                    (0, upload_utils.saveTrace)(engine.source.file).then((url) => {
                        const errMessage = createErrorMessage(errLog, checked, url);
                        renderModal(errTitle, errMessage, userDescription, shareTraceSection);
                        return;
                    });
                }
                const errMessage = createErrorMessage(errLog, checked);
                renderModal(errTitle, errMessage, userDescription, shareTraceSection);
            },
        }), mithril('span', `Check this box to share the current trace for debugging
     purposes.`), mithril('div.modal-small', `This will create a permalink to this trace, you may
     leave it unchecked and attach the trace manually
     to the bug if preferred.`));
    }
    renderModal(errTitle, createErrorMessage(errLog, checked), userDescription, shareTraceSection);
}
exports.maybeShowErrorDialog = maybeShowErrorDialog;
function renderModal(errTitle, errMessage, userDescription, shareTraceSection) {
    (0, modal.showModal)({
        title: 'Oops, something went wrong. Please file a bug.',
        content: mithril('div', mithril('.modal-logs', errMessage), mithril('span', `Please provide any additional details describing
           how the crash occurred:`), mithril('textarea.modal-textarea', {
            rows: 3,
            maxlength: 1000,
            oninput: (ev) => {
                userDescription = ev.target.value;
            },
            onkeydown: (e) => {
                e.stopPropagation();
            },
            onkeyup: (e) => {
                e.stopPropagation();
            },
        }), shareTraceSection),
        buttons: [
            {
                text: 'File a bug (Googlers only)',
                primary: true,
                id: 'file_bug',
                action: () => {
                    window.open(createLink(errTitle, errMessage, userDescription), '_blank');
                },
            },
        ],
    });
}
// If there is a trace URL to share, we don't have to show the upload checkbox.
function urlExists() {
    const engine = globals.globals.getCurrentEngine();
    return engine !== undefined &&
        (engine.source.type === 'ARRAY_BUFFER' || engine.source.type === 'URL') &&
        engine.source.url !== undefined;
}
function createErrorMessage(errLog, checked, url) {
    let errMessage = '';
    const engine = globals.globals.getCurrentEngine();
    if (checked && url !== undefined) {
        errMessage += `Trace: ${url}`;
    }
    else if (urlExists()) {
        errMessage +=
            `Trace: ${(0, logging.assertExists)(engine).source.url}`;
    }
    else {
        errMessage += 'To assist with debugging please attach or link to the ' +
            'trace you were viewing.';
    }
    return errMessage + '\n\n' +
        'Viewed on: ' + self.location.origin + '\n\n' + errLog;
}
function createLink(errTitle, errMessage, userDescription) {
    let link = 'https://goto.google.com/perfetto-ui-bug';
    link += '?title=' + encodeURIComponent(`UI Error: ${errTitle}`);
    link += '&description=';
    if (userDescription !== '') {
        link +=
            encodeURIComponent('User description:\n' + userDescription + '\n\n');
    }
    link += encodeURIComponent(errMessage);
    // 8kb is common limit on request size so restrict links to that long:
    return link.substr(0, 8000);
}
function showOutOfMemoryDialog() {
    const url = 'https://perfetto.dev/docs/quickstart/trace-analysis#get-trace-processor';
    const tpCmd = 'curl -LO https://get.perfetto.dev/trace_processor\n' +
        'chmod +x ./trace_processor\n' +
        'trace_processor --httpd /path/to/trace.pftrace\n' +
        '# Reload the UI, it will prompt to use the HTTP+RPC interface';
    (0, modal.showModal)({
        title: 'Oops! Your WASM trace processor ran out of memory',
        content: mithril('div', mithril('span', 'The in-memory representation of the trace is too big ' +
            'for the browser memory limits (typically 2GB per tab).'), mithril('br'), mithril('span', 'You can work around this problem by using the trace_processor ' +
            'native binary as an accelerator for the UI as follows:'), mithril('br'), mithril('br'), mithril('.modal-bash', tpCmd), mithril('br'), mithril('span', 'For details see '), mithril('a', { href: url, target: '_blank' }, url)),
        buttons: [],
    });
}
function showUnknownFileError() {
    (0, modal.showModal)({
        title: 'Cannot open this file',
        content: mithril('div', mithril('p', 'The file opened doesn\'t look like a Perfetto trace or any ' +
            'other format recognized by the Perfetto TraceProcessor.'), mithril('p', 'Formats supported:'), mithril('ul', mithril('li', 'Perfetto protobuf trace'), mithril('li', 'chrome://tracing JSON'), mithril('li', 'Android systrace'), mithril('li', 'Fuchsia trace'), mithril('li', 'Ninja build log'))),
        buttons: [],
    });
}
function showWebUSBError() {
    (0, modal.showModal)({
        title: 'A WebUSB error occurred',
        content: mithril('div', mithril('span', `Is adb already running on the host? Run this command and
      try again.`), mithril('br'), mithril('.modal-bash', '> adb kill-server'), mithril('br'), mithril('span', 'For details see '), mithril('a', { href: 'http://b/159048331', target: '_blank' }, 'b/159048331')),
        buttons: [],
    });
}
function showWebUSBErrorV2() {
    (0, modal.showModal)({
        title: 'A WebUSB error occurred',
        content: mithril('div', mithril('span', `Is adb already running on the host? Run this command and
      try again.`), mithril('br'), mithril('.modal-bash', '> adb kill-server'), mithril('br'), 
        // The statement below covers the following edge case:
        // 1. 'adb server' is running on the device.
        // 2. The user selects the new Android target, so we try to fetch the
        // OS version and do QSS.
        // 3. The error modal is shown.
        // 4. The user runs 'adb kill-server'.
        // At this point we don't have a trigger to try fetching the OS version
        // + QSS again. Therefore, the user will need to refresh the page.
        mithril('span', 'If after running \'adb kill-server\', you don\'t see ' +
            'a \'Start Recording\' button on the page and you don\'t see ' +
            '\'Allow USB debugging\' on the device, ' +
            'you will need to reload this page.'), mithril('br'), mithril('br'), mithril('span', 'For details see '), mithril('a', { href: 'http://b/159048331', target: '_blank' }, 'b/159048331')),
        buttons: [],
    });
}
exports.showWebUSBErrorV2 = showWebUSBErrorV2;
function showConnectionLostError() {
    (0, modal.showModal)({
        title: 'Connection with the ADB device lost',
        content: mithril('div', mithril('span', `Please connect the device again to restart the recording.`), mithril('br')),
        buttons: [],
    });
}
exports.showConnectionLostError = showConnectionLostError;
function showAllowUSBDebugging() {
    (0, modal.showModal)({
        title: 'Could not connect to the device',
        content: mithril('div', mithril('span', 'Please allow USB debugging on the device.'), mithril('br')),
        buttons: [],
    });
}
exports.showAllowUSBDebugging = showAllowUSBDebugging;
function showNoDeviceSelected() {
    (0, modal.showModal)({
        title: 'No device was selected for recording',
        content: mithril('div', mithril('span', `If you want to connect to an ADB device,
           please select it from the list.`), mithril('br')),
        buttons: [],
    });
}
exports.showNoDeviceSelected = showNoDeviceSelected;
function showExtensionNotInstalled() {
    (0, modal.showModal)({
        title: 'Perfetto Chrome extension not installed',
        content: mithril('div', mithril('.note', `To trace Chrome from the Perfetto UI, you need to install our `, mithril('a', { href: recording_utils.EXTENSION_URL, target: '_blank' }, 'Chrome extension'), ' and then reload this page.'), mithril('br')),
        buttons: [],
    });
}
exports.showExtensionNotInstalled = showExtensionNotInstalled;
function showWebsocketConnectionIssue(message) {
    (0, modal.showModal)({
        title: 'Unable to connect to the device via websocket',
        content: mithril('div', mithril('span', message), mithril('br')),
        buttons: [],
    });
}
exports.showWebsocketConnectionIssue = showWebsocketConnectionIssue;
function showIssueParsingTheTracedResponse(message) {
    (0, modal.showModal)({
        title: 'A problem was encountered while connecting to' +
            ' the Perfetto tracing service',
        content: mithril('div', mithril('span', message), mithril('br')),
        buttons: [],
    });
}
exports.showIssueParsingTheTracedResponse = showIssueParsingTheTracedResponse;
function showFailedToPushBinary(message) {
    (0, modal.showModal)({
        title: 'Failed to push a binary to the device',
        content: mithril('div', mithril('span', 'This can happen if your Android device has an OS version lower ' +
            'than Q. Perfetto tried to push the latest version of its ' +
            'embedded binary but failed.'), mithril('br'), mithril('br'), mithril('span', 'Error message:'), mithril('br'), mithril('span', message)),
        buttons: [],
    });
}
exports.showFailedToPushBinary = showFailedToPushBinary;
function showRpcSequencingError() {
    (0, modal.showModal)({
        title: 'A TraceProcessor RPC error occurred',
        content: mithril('div', mithril('p', 'The trace processor RPC sequence ID was broken'), mithril('p', `This can happen when using a HTTP trace processor instance and
either accidentally sharing this between multiple tabs or
restarting the trace processor while still in use by UI.`), mithril('p', `Please refresh this tab and ensure that trace processor is used
at most one tab at a time.`)),
        buttons: [],
    });
}

});

var recording_error_handling = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.RecordingError = exports.showRecordingModal = exports.wrapRecordingError = void 0;




// The pattern for handling recording error can have the following nesting in
// case of errors:
// A. wrapRecordingError -> wraps a promise
// B. onFailure -> has user defined logic and calls showRecordingModal
// C. showRecordingModal -> shows UX for a given error; this is not called
//    directly by wrapRecordingError, because we want the caller (such as the
//    UI) to dictate the UX
// This method takes a promise and a callback to be execute in case the promise
// fails. It then awaits the promise and executes the callback in case of
// failure. In the recording code it is used to wrap:
// 1. Acessing the WebUSB API.
// 2. Methods returning promises which can be rejected. For instance:
// a) When the user clicks 'Add a new device' but then doesn't select a valid
//    device.
// b) When the user starts a tracing session, but cancels it before they
//    authorize the session on the device.
function wrapRecordingError(promise, onFailure) {
    return tslib.__awaiter(this, void 0, void 0, function* () {
        try {
            return yield promise;
        }
        catch (e) {
            // Sometimes the message is wrapped in an Error object, sometimes not, so
            // we make sure we transform it into a string.
            const errorMessage = (0, errors.getErrorMessage)(e);
            onFailure(errorMessage);
            return undefined;
        }
    });
}
exports.wrapRecordingError = wrapRecordingError;
// Shows a modal for every known type of error which can arise during recording.
// In this way, errors occuring at different levels of the recording process
// can be handled in a central location.
function showRecordingModal(message) {
    if ([
        'Unable to claim interface.',
        'The specified endpoint is not part of a claimed and selected ' +
            'alternate interface.',
        // thrown when calling the 'reset' method on a WebUSB device.
        'Unable to reset the device.',
    ].some((partOfMessage) => message.includes(partOfMessage))) {
        (0, error_dialog.showWebUSBErrorV2)();
    }
    else if ([
        'A transfer error has occurred.',
        'The device was disconnected.',
        'The transfer was cancelled.',
    ].some((partOfMessage) => message.includes(partOfMessage)) ||
        isDeviceDisconnectedError(message)) {
        (0, error_dialog.showConnectionLostError)();
    }
    else if (message === recording_utils.ALLOW_USB_DEBUGGING) {
        (0, error_dialog.showAllowUSBDebugging)();
    }
    else if (isMessageComposedOf(message, [recording_utils.BINARY_PUSH_FAILURE, recording_utils.BINARY_PUSH_UNKNOWN_RESPONSE])) {
        (0, error_dialog.showFailedToPushBinary)(message.substring(message.indexOf(':') + 1));
    }
    else if (message === recording_utils.NO_DEVICE_SELECTED) {
        (0, error_dialog.showNoDeviceSelected)();
    }
    else if (recording_utils.WEBSOCKET_UNABLE_TO_CONNECT === message) {
        (0, error_dialog.showWebsocketConnectionIssue)(message);
    }
    else if (message === recording_utils.EXTENSION_NOT_INSTALLED) {
        (0, error_dialog.showExtensionNotInstalled)();
    }
    else if (isMessageComposedOf(message, [
        recording_utils.PARSING_UNKNWON_REQUEST_ID,
        recording_utils.PARSING_UNABLE_TO_DECODE_METHOD,
        recording_utils.PARSING_UNRECOGNIZED_PORT,
        recording_utils.PARSING_UNRECOGNIZED_MESSAGE,
    ])) {
        (0, error_dialog.showIssueParsingTheTracedResponse)(message);
    }
    else {
        throw new Error(`${message}`);
    }
}
exports.showRecordingModal = showRecordingModal;
function isDeviceDisconnectedError(message) {
    return message.includes('Device with serial') &&
        message.includes('was disconnected.');
}
function isMessageComposedOf(message, issues) {
    for (const issue of issues) {
        if (message.includes(issue)) {
            return true;
        }
    }
    return false;
}
// Exception thrown by the Recording logic.
class RecordingError extends Error {
}
exports.RecordingError = RecordingError;

});

var adb_auth = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AdbKey = void 0;





const WORD_SIZE = 4;
const MODULUS_SIZE_BITS = 2048;
const MODULUS_SIZE = MODULUS_SIZE_BITS / 8;
const MODULUS_SIZE_WORDS = MODULUS_SIZE / WORD_SIZE;
const PUBKEY_ENCODED_SIZE = 3 * WORD_SIZE + 2 * MODULUS_SIZE;
const ADB_WEB_CRYPTO_ALGORITHM = {
    name: 'RSASSA-PKCS1-v1_5',
    hash: { name: 'SHA-1' },
    publicExponent: new Uint8Array([0x01, 0x00, 0x01]),
    modulusLength: MODULUS_SIZE_BITS,
};
const ADB_WEB_CRYPTO_EXPORTABLE = true;
const ADB_WEB_CRYPTO_OPERATIONS = ['sign'];
const SIGNING_ASN1_PREFIX = [
    0x00,
    0x30,
    0x21,
    0x30,
    0x09,
    0x06,
    0x05,
    0x2B,
    0x0E,
    0x03,
    0x02,
    0x1A,
    0x05,
    0x00,
    0x04,
    0x14,
];
const R32 = jsbn.BigInteger.ONE.shiftLeft(32); // 1 << 32
function isValidJsonWebKey(key) {
    return key.n !== undefined && key.e !== undefined && key.d !== undefined &&
        key.p !== undefined && key.q !== undefined && key.dp !== undefined &&
        key.dq !== undefined && key.qi !== undefined;
}
// Convert a BigInteger to an array of a specified size in bytes.
function bigIntToFixedByteArray(bn, size) {
    const paddedBnBytes = bn.toByteArray();
    let firstNonZeroIndex = 0;
    while (firstNonZeroIndex < paddedBnBytes.length &&
        paddedBnBytes[firstNonZeroIndex] === 0) {
        firstNonZeroIndex++;
    }
    const bnBytes = Uint8Array.from(paddedBnBytes.slice(firstNonZeroIndex));
    const res = new Uint8Array(size);
    (0, logging.assertTrue)(bnBytes.length <= res.length);
    res.set(bnBytes, res.length - bnBytes.length);
    return res;
}
class AdbKey {
    constructor(jwkPrivate) {
        this.jwkPrivate = jwkPrivate;
    }
    static GenerateNewKeyPair() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            // Construct a new CryptoKeyPair and keep its private key in JWB format.
            const keyPair = yield crypto.subtle.generateKey(ADB_WEB_CRYPTO_ALGORITHM, ADB_WEB_CRYPTO_EXPORTABLE, ADB_WEB_CRYPTO_OPERATIONS);
            const jwkPrivate = yield crypto.subtle.exportKey('jwk', keyPair.privateKey);
            if (!isValidJsonWebKey(jwkPrivate)) {
                throw new recording_error_handling.RecordingError('Could not generate a valid private key.');
            }
            return new AdbKey(jwkPrivate);
        });
    }
    static DeserializeKey(serializedKey) {
        return new AdbKey(JSON.parse(serializedKey));
    }
    // Perform an RSA signing operation for the ADB auth challenge.
    //
    // For the RSA signature, the token is expected to have already
    // had the SHA-1 message digest applied.
    //
    // However, the adb token we receive from the device is made up of 20 randomly
    // generated bytes that are treated like a SHA-1. Therefore, we need to update
    // the message format.
    sign(token) {
        const rsaKey = new jsbn.RSAKey();
        rsaKey.setPrivateEx((0, string_utils.hexEncode)((0, string_utils.base64Decode)(this.jwkPrivate.n)), (0, string_utils.hexEncode)((0, string_utils.base64Decode)(this.jwkPrivate.e)), (0, string_utils.hexEncode)((0, string_utils.base64Decode)(this.jwkPrivate.d)), (0, string_utils.hexEncode)((0, string_utils.base64Decode)(this.jwkPrivate.p)), (0, string_utils.hexEncode)((0, string_utils.base64Decode)(this.jwkPrivate.q)), (0, string_utils.hexEncode)((0, string_utils.base64Decode)(this.jwkPrivate.dp)), (0, string_utils.hexEncode)((0, string_utils.base64Decode)(this.jwkPrivate.dq)), (0, string_utils.hexEncode)((0, string_utils.base64Decode)(this.jwkPrivate.qi)));
        (0, logging.assertTrue)(rsaKey.n.bitLength() === MODULUS_SIZE_BITS);
        // Message Layout (size equals that of the key modulus):
        // 00 01 FF FF FF FF ... FF [ASN.1 PREFIX] [TOKEN]
        const message = new Uint8Array(MODULUS_SIZE);
        // Initially fill the buffer with the padding
        message.fill(0xFF);
        // add prefix
        message[0] = 0x00;
        message[1] = 0x01;
        // add the ASN.1 prefix
        message.set(SIGNING_ASN1_PREFIX, message.length - SIGNING_ASN1_PREFIX.length - token.length);
        // then the actual token at the end
        message.set(token, message.length - token.length);
        const messageInteger = new jsbn.BigInteger(Array.from(message));
        const signature = rsaKey.doPrivate(messageInteger);
        return new Uint8Array(bigIntToFixedByteArray(signature, MODULUS_SIZE));
    }
    // Construct public key to match the adb format:
    // go/codesearch/rvc-arc/system/core/libcrypto_utils/android_pubkey.c;l=38-53
    getPublicKey() {
        const rsaKey = new jsbn.RSAKey();
        rsaKey.setPublic((0, string_utils.hexEncode)((0, string_utils.base64Decode)(((0, logging.assertExists)(this.jwkPrivate.n)))), (0, string_utils.hexEncode)((0, string_utils.base64Decode)(((0, logging.assertExists)(this.jwkPrivate.e)))));
        const n0inv = R32.subtract(rsaKey.n.modInverse(R32)).intValue();
        const r = jsbn.BigInteger.ONE.shiftLeft(1).pow(MODULUS_SIZE_BITS);
        const rr = r.multiply(r).mod(rsaKey.n);
        const buffer = new ArrayBuffer(PUBKEY_ENCODED_SIZE);
        const dv = new DataView(buffer);
        dv.setUint32(0, MODULUS_SIZE_WORDS, true);
        dv.setUint32(WORD_SIZE, n0inv, true);
        const dvU8 = new Uint8Array(dv.buffer, dv.byteOffset, dv.byteLength);
        dvU8.set(bigIntToFixedByteArray(rsaKey.n, MODULUS_SIZE).reverse(), 2 * WORD_SIZE);
        dvU8.set(bigIntToFixedByteArray(rr, MODULUS_SIZE).reverse(), 2 * WORD_SIZE + MODULUS_SIZE);
        dv.setUint32(2 * WORD_SIZE + 2 * MODULUS_SIZE, rsaKey.e, true);
        return (0, string_utils.base64Encode)(dvU8) + ' ui.perfetto.dev';
    }
    serializeKey() {
        return JSON.stringify(this.jwkPrivate);
    }
}
exports.AdbKey = AdbKey;

});

var adb_key_manager = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AdbKeyManager = exports.maybeStoreKey = void 0;



function isPasswordCredential(cred) {
    return cred !== null && cred.type === 'password';
}
function hasPasswordCredential() {
    return 'PasswordCredential' in window;
}
// how long we will store the key in memory
const KEY_IN_MEMORY_TIMEOUT = 1000 * 60 * 30; // 30 minutes
// Update credential store with the given key.
function maybeStoreKey(key) {
    return tslib.__awaiter(this, void 0, void 0, function* () {
        if (!hasPasswordCredential()) {
            return;
        }
        const credential = new PasswordCredential({
            id: 'webusb-adb-key',
            password: key.serializeKey(),
            name: 'WebUSB ADB Key',
            iconURL: `${globals.globals.root}assets/favicon.png`,
        });
        // The 'Save password?' Chrome dialogue only appears if the key is
        // not already stored in Chrome.
        yield navigator.credentials.store(credential);
        // 'preventSilentAccess' guarantees the user is always notified when
        // credentials are accessed. Sometimes the user is asked to click a button
        // and other times only a notification is shown temporarily.
        yield navigator.credentials.preventSilentAccess();
    });
}
exports.maybeStoreKey = maybeStoreKey;
class AdbKeyManager {
    // Finds a key, by priority:
    // - looking in memory (i.e. this.key)
    // - looking in the credential store
    // - and finally creating one from scratch if needed
    getKey() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            // 1. If we have a private key in memory, we return it.
            if (this.key) {
                return this.key;
            }
            // 2. We try to get the private key from the browser.
            // The mediation is set as 'optional', because we use
            // 'preventSilentAccess', which sometimes requests the user to click
            // on a button to allow the auth, but sometimes only shows a
            // notification and does not require the user to click on anything.
            // If we had set mediation to 'required', the user would have been
            // asked to click on a button every time.
            if (hasPasswordCredential()) {
                const options = {
                    password: true,
                    mediation: 'optional',
                };
                const credential = yield navigator.credentials.get(options);
                if (isPasswordCredential(credential)) {
                    return this.assignKey(adb_auth.AdbKey.DeserializeKey(credential.password));
                }
            }
            // 3. We generate a new key pair.
            return this.assignKey(yield adb_auth.AdbKey.GenerateNewKeyPair());
        });
    }
    // Assigns the key a new value, sets a timeout for storing the key in memory
    // and then returns the new key.
    assignKey(key) {
        this.key = key;
        if (this.keyInMemoryTimerId) {
            clearTimeout(this.keyInMemoryTimerId);
        }
        this.keyInMemoryTimerId =
            window.setTimeout(() => this.key = undefined, KEY_IN_MEMORY_TIMEOUT);
        return key;
    }
}
exports.AdbKeyManager = AdbKeyManager;

});

var target_factory_registry = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.targetFactoryRegistry = exports.TargetFactoryRegistry = void 0;

class TargetFactoryRegistry extends registry.Registry {
    listTargets() {
        const targets = [];
        for (const factory of this.registry.values()) {
            for (const target of factory.listTargets()) {
                targets.push(target);
            }
        }
        return targets;
    }
    listTargetFactories() {
        return Array.from(this.registry.values());
    }
    listRecordingProblems() {
        const recordingProblems = [];
        for (const factory of this.registry.values()) {
            for (const recordingProblem of factory.listRecordingProblems()) {
                recordingProblems.push(recordingProblem);
            }
        }
        return recordingProblems;
    }
}
exports.TargetFactoryRegistry = TargetFactoryRegistry;
exports.targetFactoryRegistry = new TargetFactoryRegistry((f) => {
    return f.kind;
});

});

// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

const _TextDecoder = TextDecoder;
const _TextEncoder = TextEncoder;

var indexBrowser = /*#__PURE__*/Object.freeze({
__proto__: null,
_TextDecoder: _TextDecoder,
_TextEncoder: _TextEncoder
});

var array_buffer_builder = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.ArrayBufferBuilder = void 0;


// Return the length, in bytes, of a token to be inserted.
function tokenLength(token) {
    if (typeof token === 'string') {
        return (0, utf8_1.length)(token);
    }
    else if (token instanceof Uint8Array) {
        return token.byteLength;
    }
    else {
        (0, logging.assertTrue)(token >= 0 && token <= 0xffffffff);
        // 32-bit integers take 4 bytes
        return 4;
    }
}
// Insert a token into the buffer, at position `byteOffset`.
//
// @param dataView A DataView into the buffer to write into.
// @param typedArray A Uint8Array view into the buffer to write into.
// @param byteOffset Position to write at, in the buffer.
// @param token Token to insert into the buffer.
function insertToken(dataView, typedArray, byteOffset, token) {
    if (typeof token === 'string') {
        // Encode the string in UTF-8
        const written = (0, utf8_1.write)(token, typedArray, byteOffset);
        (0, logging.assertTrue)(written === (0, utf8_1.length)(token));
    }
    else if (token instanceof Uint8Array) {
        // Copy the bytes from the other array
        typedArray.set(token, byteOffset);
    }
    else {
        (0, logging.assertTrue)(token >= 0 && token <= 0xffffffff);
        // 32-bit little-endian value
        dataView.setUint32(byteOffset, token, true);
    }
}
// Like a string builder, but for an ArrayBuffer instead of a string. This
// allows us to assemble messages to send/receive over the wire. Data can be
// appended to the buffer using `append()`. The data we append can be of the
// following types:
//
// - string: the ASCII string is appended. Throws an error if there are
//           non-ASCII characters.
// - number: the number is appended as a 32-bit little-endian integer.
// - Uint8Array: the bytes are appended as-is to the buffer.
class ArrayBufferBuilder {
    constructor() {
        this.tokens = [];
    }
    // Return an `ArrayBuffer` that is the concatenation of all the tokens.
    toArrayBuffer() {
        // Calculate the size of the buffer we need.
        let byteLength = 0;
        for (const token of this.tokens) {
            byteLength += tokenLength(token);
        }
        // Allocate the buffer.
        const buffer = new ArrayBuffer(byteLength);
        const dataView = new DataView(buffer);
        const typedArray = new Uint8Array(buffer);
        // Fill the buffer with the tokens.
        let byteOffset = 0;
        for (const token of this.tokens) {
            insertToken(dataView, typedArray, byteOffset, token);
            byteOffset += tokenLength(token);
        }
        (0, logging.assertTrue)(byteOffset === byteLength);
        // Return the values.
        return buffer;
    }
    // Add one or more tokens to the value of this object.
    append(token) {
        this.tokens.push(token);
    }
}
exports.ArrayBufferBuilder = ArrayBufferBuilder;

});

var custom_utils_1 = getCjsExportFromNamespace(indexBrowser);

var adb_file_handler = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AdbFileHandler = void 0;







// https://cs.android.com/android/platform/superproject/+/master:packages/
// modules/adb/file_sync_protocol.h;l=144
const MAX_SYNC_SEND_CHUNK_SIZE = 64 * 1024;
// Adb does not accurately send some file permissions. If you need a special set
// of permissions, do not rely on this value. Rather, send a shell command which
// explicitly sets permissions, such as:
// 'shell:chmod ${permissions} ${path}'
const FILE_PERMISSIONS = Math.pow(2, 15) + 0o644;
const textDecoder = new custom_utils_1._TextDecoder();
// For details about the protocol, see:
// https://cs.android.com/android/platform/superproject/+/master:packages/modules/adb/SYNC.TXT
class AdbFileHandler {
    constructor(byteStream) {
        this.byteStream = byteStream;
        this.sentByteCount = 0;
        this.isPushOngoing = false;
    }
    pushBinary(binary, path) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            // For a given byteStream, we only support pushing one binary at a time.
            (0, logging.assertFalse)(this.isPushOngoing);
            this.isPushOngoing = true;
            const transferFinished = (0, deferred.defer)();
            this.byteStream.addOnStreamDataCallback((data) => this.onStreamData(data, transferFinished));
            this.byteStream.addOnStreamCloseCallback(() => this.isPushOngoing = false);
            const sendMessage = new array_buffer_builder.ArrayBufferBuilder();
            // 'SEND' is the API method used to send a file to device.
            sendMessage.append('SEND');
            // The remote file name is split into two parts separated by the last
            // comma (","). The first part is the actual path, while the second is a
            // decimal encoded file mode containing the permissions of the file on
            // device.
            sendMessage.append(path.length + 6);
            sendMessage.append(path);
            sendMessage.append(',');
            sendMessage.append(FILE_PERMISSIONS.toString());
            this.byteStream.write(new Uint8Array(sendMessage.toArrayBuffer()));
            while (!(yield this.sendNextDataChunk(binary)))
                ;
            return transferFinished;
        });
    }
    onStreamData(data, transferFinished) {
        this.sentByteCount = 0;
        const response = textDecoder.decode(data);
        if (response.split('\n')[0].includes('FAIL')) {
            // Sample failure response (when the file is transferred successfully
            // but the date is not formatted correctly):
            // 'OKAYFAIL\npath too long'
            transferFinished.reject(new recording_error_handling.RecordingError(`${recording_utils.BINARY_PUSH_FAILURE}: ${response}`));
        }
        else if (textDecoder.decode(data).substring(0, 4) === 'OKAY') {
            // In case of success, the server responds to the last request with
            // 'OKAY'.
            transferFinished.resolve();
        }
        else {
            throw new recording_error_handling.RecordingError(`${recording_utils.BINARY_PUSH_UNKNOWN_RESPONSE}: ${response}`);
        }
    }
    sendNextDataChunk(binary) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const endPosition = Math.min(this.sentByteCount + MAX_SYNC_SEND_CHUNK_SIZE, binary.byteLength);
            const chunk = yield binary.slice(this.sentByteCount, endPosition);
            // The file is sent in chunks. Each chunk is prefixed with "DATA" and the
            // chunk length. This is repeated until the entire file is transferred. Each
            // chunk must not be larger than 64k.
            const chunkLength = chunk.byteLength;
            const dataMessage = new array_buffer_builder.ArrayBufferBuilder();
            dataMessage.append('DATA');
            dataMessage.append(chunkLength);
            dataMessage.append(new Uint8Array(chunk.buffer, chunk.byteOffset, chunkLength));
            this.sentByteCount += chunkLength;
            const isDone = this.sentByteCount === binary.byteLength;
            if (isDone) {
                // When the file is transferred a sync request "DONE" is sent, together
                // with a timestamp, representing the last modified time for the file. The
                // server responds to this last request.
                dataMessage.append('DONE');
                // We send the date in seconds.
                dataMessage.append(Math.floor(Date.now() / 1000));
            }
            this.byteStream.write(new Uint8Array(dataMessage.toArrayBuffer()));
            return isDone;
        });
    }
}
exports.AdbFileHandler = AdbFileHandler;

});

var adb_connection_impl = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AdbConnectionImpl = void 0;





const textDecoder = new custom_utils_1._TextDecoder();
class AdbConnectionImpl {
    constructor() {
        // onStatus and onDisconnect are set to callbacks passed from the caller.
        // This happens for instance in the AndroidWebusbTarget, which instantiates
        // them with callbacks passed from the UI.
        this.onStatus = () => { };
        this.onDisconnect = (_) => { };
    }
    // Starts a shell command, and returns a promise resolved when the command
    // completes.
    shellAndWaitCompletion(cmd) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const adbStream = yield this.shell(cmd);
            const onStreamingEnded = (0, deferred.defer)();
            // We wait for the stream to be closed by the device, which happens
            // after the shell command is successfully received.
            adbStream.addOnStreamCloseCallback(() => {
                onStreamingEnded.resolve();
            });
            return onStreamingEnded;
        });
    }
    // Starts a shell command, then gathers all its output and returns it as
    // a string.
    shellAndGetOutput(cmd) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const adbStream = yield this.shell(cmd);
            const commandOutput = new array_buffer_builder.ArrayBufferBuilder();
            const onStreamingEnded = (0, deferred.defer)();
            adbStream.addOnStreamDataCallback((data) => {
                commandOutput.append(data);
            });
            adbStream.addOnStreamCloseCallback(() => {
                onStreamingEnded.resolve(textDecoder.decode(commandOutput.toArrayBuffer()));
            });
            return onStreamingEnded;
        });
    }
    push(binary, path) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const byteStream = yield this.openStream('sync:');
            yield (new adb_file_handler.AdbFileHandler(byteStream)).pushBinary(binary, path);
            // We need to wait until the bytestream is closed. Otherwise, we can have a
            // race condition:
            // If this is the last stream, it will try to disconnect the device. In the
            // meantime, the caller might create another stream which will try to open
            // the device.
            yield byteStream.closeAndWaitForTeardown();
        });
    }
}
exports.AdbConnectionImpl = AdbConnectionImpl;

});

var adb_connection_over_webusb = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AdbOverWebusbStream = exports.AdbConnectionOverWebusb = exports.AdbState = exports.DEFAULT_MAX_PAYLOAD_BYTES = exports.VERSION_NO_CHECKSUM = exports.VERSION_WITH_CHECKSUM = void 0;








const textEncoder = new custom_utils_1._TextEncoder();
const textDecoder = new custom_utils_1._TextDecoder();
exports.VERSION_WITH_CHECKSUM = 0x01000000;
exports.VERSION_NO_CHECKSUM = 0x01000001;
exports.DEFAULT_MAX_PAYLOAD_BYTES = 256 * 1024;
var AdbState;
(function (AdbState) {
    AdbState[AdbState["DISCONNECTED"] = 0] = "DISCONNECTED";
    // Authentication steps, see AdbConnectionOverWebUsb's handleAuthentication().
    AdbState[AdbState["AUTH_STARTED"] = 1] = "AUTH_STARTED";
    AdbState[AdbState["AUTH_WITH_PRIVATE"] = 2] = "AUTH_WITH_PRIVATE";
    AdbState[AdbState["AUTH_WITH_PUBLIC"] = 3] = "AUTH_WITH_PUBLIC";
    AdbState[AdbState["CONNECTED"] = 4] = "CONNECTED";
})(AdbState = exports.AdbState || (exports.AdbState = {}));
var AuthCmd;
(function (AuthCmd) {
    AuthCmd[AuthCmd["TOKEN"] = 1] = "TOKEN";
    AuthCmd[AuthCmd["SIGNATURE"] = 2] = "SIGNATURE";
    AuthCmd[AuthCmd["RSAPUBLICKEY"] = 3] = "RSAPUBLICKEY";
})(AuthCmd || (AuthCmd = {}));
function generateChecksum(data) {
    let res = 0;
    for (let i = 0; i < data.byteLength; i++)
        res += data[i];
    return res & 0xFFFFFFFF;
}
class AdbConnectionOverWebusb extends adb_connection_impl.AdbConnectionImpl {
    // We use a key pair for authenticating with the device, which we do in
    // two ways:
    // - Firstly, signing with the private key.
    // - Secondly, sending over the public key (at which point the device asks the
    //   user for permissions).
    // Once we've sent the public key, for future recordings we only need to
    // sign with the private key, so the user doesn't need to give permissions
    // again.
    constructor(device, keyManager) {
        super();
        this.device = device;
        this.keyManager = keyManager;
        this.state = AdbState.DISCONNECTED;
        this.connectingStreams = new Map();
        this.streams = new Set();
        this.maxPayload = exports.DEFAULT_MAX_PAYLOAD_BYTES;
        this.writeInProgress = false;
        this.writeQueue = [];
        // Devices after Dec 2017 don't use checksum. This will be auto-detected
        // during the connection.
        this.useChecksum = true;
        this.lastStreamId = 0;
        this.usbReadEndpoint = -1;
        this.usbWriteEpEndpoint = -1;
        this.isUsbReceiveLoopRunning = false;
        this.pendingConnPromises = [];
    }
    shell(cmd) {
        return this.openStream('shell:' + cmd);
    }
    connectSocket(path) {
        return this.openStream(path);
    }
    canConnectWithoutContention() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            yield this.device.open();
            const usbInterfaceNumber = yield this.setupUsbInterface();
            try {
                yield this.device.claimInterface(usbInterfaceNumber);
                yield this.device.releaseInterface(usbInterfaceNumber);
                return true;
            }
            catch (e) {
                return false;
            }
        });
    }
    openStream(destination) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const streamId = ++this.lastStreamId;
            const connectingStream = (0, deferred.defer)();
            this.connectingStreams.set(streamId, connectingStream);
            // We create the stream before trying to establish the connection, so
            // that if we fail to connect, we will reject the connecting stream.
            yield this.ensureConnectionEstablished();
            yield this.sendMessage('OPEN', streamId, 0, destination);
            return connectingStream;
        });
    }
    ensureConnectionEstablished() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            if (this.state === AdbState.CONNECTED) {
                return;
            }
            if (this.state === AdbState.DISCONNECTED) {
                yield this.device.open();
                if (!(yield this.canConnectWithoutContention())) {
                    yield this.device.reset();
                }
                const usbInterfaceNumber = yield this.setupUsbInterface();
                yield this.device.claimInterface(usbInterfaceNumber);
            }
            yield this.startAdbAuth();
            if (!this.isUsbReceiveLoopRunning) {
                this.usbReceiveLoop();
            }
            const connPromise = (0, deferred.defer)();
            this.pendingConnPromises.push(connPromise);
            yield connPromise;
        });
    }
    setupUsbInterface() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const interfaceAndEndpoint = (0, recording_utils.findInterfaceAndEndpoint)(this.device);
            // `findInterfaceAndEndpoint` will always return a non-null value because
            // we check for this in 'android_webusb_target_factory'. If no interface and
            // endpoints are found, we do not create a target, so we can not connect to
            // it, so we will never reach this logic.
            const { configurationValue, usbInterfaceNumber, endpoints } = (0, logging.assertExists)(interfaceAndEndpoint);
            this.usbInterfaceNumber = usbInterfaceNumber;
            this.usbReadEndpoint = this.findEndpointNumber(endpoints, 'in');
            this.usbWriteEpEndpoint = this.findEndpointNumber(endpoints, 'out');
            (0, logging.assertTrue)(this.usbReadEndpoint >= 0 && this.usbWriteEpEndpoint >= 0);
            yield this.device.selectConfiguration(configurationValue);
            return usbInterfaceNumber;
        });
    }
    streamClose(stream) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const otherStreamsQueue = this.writeQueue.filter((queueElement) => queueElement.localStreamId !== stream.localStreamId);
            const droppedPacketCount = this.writeQueue.length - otherStreamsQueue.length;
            if (droppedPacketCount > 0) {
                console.debug(`Dropping ${droppedPacketCount} queued messages due to stream closing.`);
                this.writeQueue = otherStreamsQueue;
            }
            this.streams.delete(stream);
            if (this.streams.size === 0) {
                // We disconnect BEFORE calling `signalStreamClosed`. Otherwise, there can
                // be a race condition:
                // Stream A: streamA.onStreamClose
                // Stream B: device.open
                // Stream A: device.releaseInterface
                // Stream B: device.transferOut -> CRASH
                yield this.disconnect();
            }
            stream.signalStreamClosed();
        });
    }
    streamWrite(msg, stream) {
        const raw = (typeof msg === 'string') ? textEncoder.encode(msg) : msg;
        if (this.writeInProgress) {
            this.writeQueue.push({ message: raw, localStreamId: stream.localStreamId });
            return;
        }
        this.writeInProgress = true;
        this.sendMessage('WRTE', stream.localStreamId, stream.remoteStreamId, raw);
    }
    // We disconnect in 2 cases:
    // 1. When we close the last stream of the connection. This is to prevent the
    // browser holding onto the USB interface after having finished a trace
    // recording, which would make it impossible to use "adb shell" from the same
    // machine until the browser is closed.
    // 2. When we get a USB disconnect event. This happens for instance when the
    // device is unplugged.
    disconnect(disconnectMessage) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            if (this.state === AdbState.DISCONNECTED) {
                return;
            }
            // Clear the resources in a synchronous method, because this can be used
            // for error handling callbacks as well.
            this.reachDisconnectState(disconnectMessage);
            // We have already disconnected so there is no need to pass a callback
            // which clears resources or notifies the user into 'wrapRecordingError'.
            yield (0, recording_error_handling.wrapRecordingError)(this.device.releaseInterface((0, logging.assertExists)(this.usbInterfaceNumber)), () => { });
            this.usbInterfaceNumber = undefined;
        });
    }
    // This is a synchronous method which clears all resources.
    // It can be used as a callback for error handling.
    reachDisconnectState(disconnectMessage) {
        // We need to delete the streams BEFORE checking the Adb state because:
        //
        // We create streams before changing the Adb state from DISCONNECTED.
        // In case we can not claim the device, we will create a stream, but fail
        // to connect to the WebUSB device so the state will remain DISCONNECTED.
        const streamsToDelete = this.connectingStreams.entries();
        // Clear the streams before rejecting so we are not caught in a loop of
        // handling promise rejections.
        this.connectingStreams.clear();
        for (const [id, stream] of streamsToDelete) {
            stream.reject(`Failed to open stream with id ${id} because adb was disconnected.`);
        }
        if (this.state === AdbState.DISCONNECTED) {
            return;
        }
        this.state = AdbState.DISCONNECTED;
        this.writeInProgress = false;
        this.writeQueue = [];
        this.streams.forEach((stream) => stream.close());
        this.onDisconnect(disconnectMessage);
    }
    startAdbAuth() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const VERSION = this.useChecksum ? exports.VERSION_WITH_CHECKSUM : exports.VERSION_NO_CHECKSUM;
            this.state = AdbState.AUTH_STARTED;
            yield this.sendMessage('CNXN', VERSION, this.maxPayload, 'host:1:UsbADB');
        });
    }
    findEndpointNumber(endpoints, direction, type = 'bulk') {
        const ep = endpoints.find((ep) => ep.type === type && ep.direction === direction);
        if (ep)
            return ep.endpointNumber;
        throw new recording_error_handling.RecordingError(`Cannot find ${direction} endpoint`);
    }
    usbReceiveLoop() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            (0, logging.assertFalse)(this.isUsbReceiveLoopRunning);
            this.isUsbReceiveLoopRunning = true;
            for (; this.state !== AdbState.DISCONNECTED;) {
                const res = yield this.wrapUsb(this.device.transferIn(this.usbReadEndpoint, ADB_MSG_SIZE));
                if (!res) {
                    this.isUsbReceiveLoopRunning = false;
                    return;
                }
                if (res.status !== 'ok') {
                    // Log and ignore messages with invalid status. These can occur
                    // when the device is connected/disconnected repeatedly.
                    console.error(`Received message with unexpected status '${res.status}'`);
                    continue;
                }
                const msg = AdbMsg.decodeHeader(res.data);
                if (msg.dataLen > 0) {
                    const resp = yield this.wrapUsb(this.device.transferIn(this.usbReadEndpoint, msg.dataLen));
                    if (!resp) {
                        this.isUsbReceiveLoopRunning = false;
                        return;
                    }
                    msg.data = new Uint8Array(resp.data.buffer, resp.data.byteOffset, resp.data.byteLength);
                }
                if (this.useChecksum && generateChecksum(msg.data) !== msg.dataChecksum) {
                    // We ignore messages with an invalid checksum. These sometimes appear
                    // when the page is re-loaded in a middle of a recording.
                    continue;
                }
                // The server can still send messages streams for previous streams.
                // This happens for instance if we record, reload the recording page and
                // then record again. We can also receive a 'WRTE' or 'OKAY' after
                // we have sent a 'CLSE' and marked the state as disconnected.
                if ((msg.cmd === 'CLSE' || msg.cmd === 'WRTE') &&
                    !this.getStreamForLocalStreamId(msg.arg1)) {
                    continue;
                }
                else if (msg.cmd === 'OKAY' && !this.connectingStreams.has(msg.arg1) &&
                    !this.getStreamForLocalStreamId(msg.arg1)) {
                    continue;
                }
                else if (msg.cmd === 'AUTH' && msg.arg0 === AuthCmd.TOKEN &&
                    this.state === AdbState.AUTH_WITH_PUBLIC) {
                    // If we start a recording but fail because of a faulty physical
                    // connection to the device, when we start a new recording, we will
                    // received multiple AUTH tokens, of which we should ignore all but
                    // one.
                    continue;
                }
                // handle the ADB message from the device
                if (msg.cmd === 'CLSE') {
                    (0, logging.assertExists)(this.getStreamForLocalStreamId(msg.arg1)).close();
                }
                else if (msg.cmd === 'AUTH' && msg.arg0 === AuthCmd.TOKEN) {
                    const key = yield this.keyManager.getKey();
                    if (this.state === AdbState.AUTH_STARTED) {
                        // During this step, we send back the token received signed with our
                        // private key. If the device has previously received our public key,
                        // the dialog asking for user confirmation will not be displayed on
                        // the device.
                        this.state = AdbState.AUTH_WITH_PRIVATE;
                        yield this.sendMessage('AUTH', AuthCmd.SIGNATURE, 0, key.sign(msg.data));
                    }
                    else {
                        // If our signature with the private key is not accepted by the
                        // device, we generate a new keypair and send the public key.
                        this.state = AdbState.AUTH_WITH_PUBLIC;
                        yield this.sendMessage('AUTH', AuthCmd.RSAPUBLICKEY, 0, key.getPublicKey() + '\0');
                        this.onStatus(recording_utils.ALLOW_USB_DEBUGGING);
                        yield (0, adb_key_manager.maybeStoreKey)(key);
                    }
                }
                else if (msg.cmd === 'CNXN') {
                    (0, logging.assertTrue)([AdbState.AUTH_WITH_PRIVATE, AdbState.AUTH_WITH_PUBLIC].includes(this.state));
                    this.state = AdbState.CONNECTED;
                    this.maxPayload = msg.arg1;
                    const deviceVersion = msg.arg0;
                    if (![exports.VERSION_WITH_CHECKSUM, exports.VERSION_NO_CHECKSUM].includes(deviceVersion)) {
                        throw new recording_error_handling.RecordingError(`Version ${msg.arg0} not supported.`);
                    }
                    this.useChecksum = deviceVersion === exports.VERSION_WITH_CHECKSUM;
                    this.state = AdbState.CONNECTED;
                    // This will resolve the promises awaited by
                    // "ensureConnectionEstablished".
                    this.pendingConnPromises.forEach((connPromise) => connPromise.resolve());
                    this.pendingConnPromises = [];
                }
                else if (msg.cmd === 'OKAY') {
                    if (this.connectingStreams.has(msg.arg1)) {
                        const connectingStream = (0, logging.assertExists)(this.connectingStreams.get(msg.arg1));
                        const stream = new AdbOverWebusbStream(this, msg.arg1, msg.arg0);
                        this.streams.add(stream);
                        this.connectingStreams.delete(msg.arg1);
                        connectingStream.resolve(stream);
                    }
                    else {
                        (0, logging.assertTrue)(this.writeInProgress);
                        this.writeInProgress = false;
                        for (; this.writeQueue.length;) {
                            // We go through the queued writes and choose the first one
                            // corresponding to a stream that's still active.
                            const queuedElement = (0, logging.assertExists)(this.writeQueue.shift());
                            const queuedStream = this.getStreamForLocalStreamId(queuedElement.localStreamId);
                            if (queuedStream) {
                                queuedStream.write(queuedElement.message);
                                break;
                            }
                        }
                    }
                }
                else if (msg.cmd === 'WRTE') {
                    const stream = (0, logging.assertExists)(this.getStreamForLocalStreamId(msg.arg1));
                    yield this.sendMessage('OKAY', stream.localStreamId, stream.remoteStreamId);
                    stream.signalStreamData(msg.data);
                }
                else {
                    this.isUsbReceiveLoopRunning = false;
                    throw new recording_error_handling.RecordingError(`Unexpected message ${msg} in state ${this.state}`);
                }
            }
            this.isUsbReceiveLoopRunning = false;
        });
    }
    getStreamForLocalStreamId(localStreamId) {
        for (const stream of this.streams) {
            if (stream.localStreamId === localStreamId) {
                return stream;
            }
        }
        return undefined;
    }
    //  The header and the message data must be sent consecutively. Using 2 awaits
    //  Another message can interleave after the first header has been sent,
    //  resulting in something like [header1] [header2] [data1] [data2];
    //  In this way we are waiting both promises to be resolved before continuing.
    sendMessage(cmd, arg0, arg1, data) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const msg = AdbMsg.create({ cmd, arg0, arg1, data, useChecksum: this.useChecksum });
            const msgHeader = msg.encodeHeader();
            const msgData = msg.data;
            (0, logging.assertTrue)(msgHeader.length <= this.maxPayload &&
                msgData.length <= this.maxPayload);
            const sendPromises = [this.wrapUsb(this.device.transferOut(this.usbWriteEpEndpoint, msgHeader.buffer))];
            if (msg.data.length > 0) {
                sendPromises.push(this.wrapUsb(this.device.transferOut(this.usbWriteEpEndpoint, msgData.buffer)));
            }
            yield Promise.all(sendPromises);
        });
    }
    wrapUsb(promise) {
        return (0, recording_error_handling.wrapRecordingError)(promise, this.reachDisconnectState.bind(this));
    }
}
exports.AdbConnectionOverWebusb = AdbConnectionOverWebusb;
// An AdbOverWebusbStream is instantiated after the creation of a socket to the
// device. Thanks to this, we can send commands and receive their output.
// Messages are received in the main adb class, and are forwarded to an instance
// of this class based on a stream id match.
class AdbOverWebusbStream {
    constructor(adb, localStreamId, remoteStreamId) {
        this.onStreamDataCallbacks = [];
        this.onStreamCloseCallbacks = [];
        this.remoteStreamId = -1;
        this.adbConnection = adb;
        this.localStreamId = localStreamId;
        this.remoteStreamId = remoteStreamId;
        // When the stream is created, the connection has been already established.
        this._isConnected = true;
    }
    addOnStreamDataCallback(onStreamData) {
        this.onStreamDataCallbacks.push(onStreamData);
    }
    addOnStreamCloseCallback(onStreamClose) {
        this.onStreamCloseCallbacks.push(onStreamClose);
    }
    // Used by the connection object to signal newly received data, not exposed
    // in the interface.
    signalStreamData(data) {
        for (const onStreamData of this.onStreamDataCallbacks) {
            onStreamData(data);
        }
    }
    // Used by the connection object to signal the stream is closed, not exposed
    // in the interface.
    signalStreamClosed() {
        for (const onStreamClose of this.onStreamCloseCallbacks) {
            onStreamClose();
        }
        this.onStreamDataCallbacks = [];
        this.onStreamCloseCallbacks = [];
    }
    close() {
        this.closeAndWaitForTeardown();
    }
    closeAndWaitForTeardown() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            this._isConnected = false;
            yield this.adbConnection.streamClose(this);
        });
    }
    write(msg) {
        this.adbConnection.streamWrite(msg, this);
    }
    isConnected() {
        return this._isConnected;
    }
}
exports.AdbOverWebusbStream = AdbOverWebusbStream;
const ADB_MSG_SIZE = 6 * 4; // 6 * int32.
class AdbMsg {
    constructor(cmd, arg0, arg1, dataLen, dataChecksum, useChecksum = false) {
        (0, logging.assertTrue)(cmd.length === 4);
        this.cmd = cmd;
        this.arg0 = arg0;
        this.arg1 = arg1;
        this.dataLen = dataLen;
        this.data = new Uint8Array(dataLen);
        this.dataChecksum = dataChecksum;
        this.useChecksum = useChecksum;
    }
    static create({ cmd, arg0, arg1, data, useChecksum = true }) {
        const encodedData = this.encodeData(data);
        const msg = new AdbMsg(cmd, arg0, arg1, encodedData.length, 0, useChecksum);
        msg.data = encodedData;
        return msg;
    }
    get dataStr() {
        return textDecoder.decode(this.data);
    }
    toString() {
        return `${this.cmd} [${this.arg0},${this.arg1}] ${this.dataStr}`;
    }
    // A brief description of the message can be found here:
    // https://android.googlesource.com/platform/system/core/+/master/adb/protocol.txt
    //
    // struct amessage {
    //     uint32_t command;    // command identifier constant
    //     uint32_t arg0;       // first argument
    //     uint32_t arg1;       // second argument
    //     uint32_t data_length;// length of payload (0 is allowed)
    //     uint32_t data_check; // checksum of data payload
    //     uint32_t magic;      // command ^ 0xffffffff
    // };
    static decodeHeader(dv) {
        (0, logging.assertTrue)(dv.byteLength === ADB_MSG_SIZE);
        const cmd = textDecoder.decode(dv.buffer.slice(0, 4));
        const cmdNum = dv.getUint32(0, true);
        const arg0 = dv.getUint32(4, true);
        const arg1 = dv.getUint32(8, true);
        const dataLen = dv.getUint32(12, true);
        const dataChecksum = dv.getUint32(16, true);
        const cmdChecksum = dv.getUint32(20, true);
        (0, logging.assertTrue)(cmdNum === (cmdChecksum ^ 0xFFFFFFFF));
        return new AdbMsg(cmd, arg0, arg1, dataLen, dataChecksum);
    }
    encodeHeader() {
        const buf = new Uint8Array(ADB_MSG_SIZE);
        const dv = new DataView(buf.buffer);
        const cmdBytes = textEncoder.encode(this.cmd);
        const rawMsg = AdbMsg.encodeData(this.data);
        const checksum = this.useChecksum ? generateChecksum(rawMsg) : 0;
        for (let i = 0; i < 4; i++)
            dv.setUint8(i, cmdBytes[i]);
        dv.setUint32(4, this.arg0, true);
        dv.setUint32(8, this.arg1, true);
        dv.setUint32(12, rawMsg.byteLength, true);
        dv.setUint32(16, checksum, true);
        dv.setUint32(20, dv.getUint32(0, true) ^ 0xFFFFFFFF, true);
        return buf;
    }
    static encodeData(data) {
        if (data === undefined)
            return new Uint8Array([]);
        if (typeof data === 'string')
            return textEncoder.encode(data + '\0');
        return data;
    }
}

});

var http_utils = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.fetchWithTimeout = void 0;
function fetchWithTimeout(input, init, timeoutMs) {
    return new Promise((resolve, reject) => {
        const timer = setTimeout(() => reject(new Error(`fetch(${input}) timed out after ${timeoutMs} ms`)), timeoutMs);
        fetch(input, init)
            .then((response) => resolve(response))
            .catch((err) => reject(err))
            .finally(() => clearTimeout(timer));
    });
}
exports.fetchWithTimeout = fetchWithTimeout;

});

var traced_tracing_session = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.TracedTracingSession = void 0;







// See wire_protocol.proto for more details.
const WIRE_PROTOCOL_HEADER_SIZE = 4;
// See basic_types.h (kIPCBufferSize) for more details.
const MAX_IPC_BUFFER_SIZE = 128 * 1024;
const PROTO_LEN_DELIMITED_WIRE_TYPE = 2;
const TRACE_PACKET_PROTO_ID = 1;
const TRACE_PACKET_PROTO_TAG = (TRACE_PACKET_PROTO_ID << 3) | PROTO_LEN_DELIMITED_WIRE_TYPE;
function parseMessageSize(buffer) {
    const dv = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);
    return dv.getUint32(0, true);
}
// This class implements the protocol described in
// https://perfetto.dev/docs/design-docs/api-and-abi#tracing-protocol-abi
class TracedTracingSession {
    // The bytestream is obtained when creating a connection with a target.
    // For instance, the AdbStream is obtained from a connection with an Adb
    // device.
    constructor(byteStream, tracingSessionListener) {
        this.byteStream = byteStream;
        this.tracingSessionListener = tracingSessionListener;
        // Buffers received wire protocol data.
        this.incomingBuffer = new Uint8Array(MAX_IPC_BUFFER_SIZE);
        this.bufferedPartLength = 0;
        this.availableMethods = [];
        this.serviceId = -1;
        this.requestMethods = new Map();
        // Needed for ReadBufferResponse: all the trace packets are split into
        // several slices. |partialPacket| is the buffer for them. Once we receive a
        // slice with the flag |lastSliceForPacket|, a new packet is created.
        this.partialPacket = [];
        // Accumulates trace packets into a proto trace file..
        this.traceProtoWriter = minimal$1.Writer.create();
        // Accumulates DataSource objects from QueryServiceStateResponse,
        // which can have >1 replies for each query
        // go/codesearch/android/external/perfetto/protos/
        // perfetto/ipc/consumer_port.proto;l=243-246
        this.pendingDataSources = [];
        // Wire protocol request ID. After each request it is increased. It is needed
        // to keep track of the type of request, and parse the response correctly.
        this.requestId = 1;
        this.pendingStatsMessages = new Array();
        this.byteStream.addOnStreamDataCallback((data) => this.handleReceivedData(data));
        this.byteStream.addOnStreamCloseCallback(() => this.clearState());
    }
    queryServiceState() {
        if (this.pendingQssMessage) {
            return this.pendingQssMessage;
        }
        const requestProto = protos_1.QueryServiceStateRequest.encode(new protos_1.QueryServiceStateRequest())
            .finish();
        this.rpcInvoke('QueryServiceState', requestProto);
        return this.pendingQssMessage = (0, deferred.defer)();
    }
    start(config) {
        const duration = config.durationMs;
        this.tracingSessionListener.onStatus(`${recording_utils.RECORDING_IN_PROGRESS}${duration ? ' for ' + duration.toString() + ' ms' : ''}...`);
        const enableTracingRequest = new protos_1.EnableTracingRequest();
        enableTracingRequest.traceConfig = config;
        const enableTracingRequestProto = protos_1.EnableTracingRequest.encode(enableTracingRequest).finish();
        this.rpcInvoke('EnableTracing', enableTracingRequestProto);
    }
    cancel() {
        this.terminateConnection();
    }
    stop() {
        const requestProto = protos_1.DisableTracingRequest.encode(new protos_1.DisableTracingRequest()).finish();
        this.rpcInvoke('DisableTracing', requestProto);
    }
    getTraceBufferUsage() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            if (!this.byteStream.isConnected()) {
                // TODO(octaviant): make this more in line with the other trace buffer
                //  error cases.
                return 0;
            }
            const bufferStats = yield this.getBufferStats();
            let percentageUsed = -1;
            for (const buffer of bufferStats) {
                if (!Number.isFinite(buffer.bytesWritten) ||
                    !Number.isFinite(buffer.bufferSize)) {
                    continue;
                }
                const used = (0, logging.assertExists)(buffer.bytesWritten);
                const total = (0, logging.assertExists)(buffer.bufferSize);
                if (total >= 0) {
                    percentageUsed = Math.max(percentageUsed, used / total);
                }
            }
            if (percentageUsed === -1) {
                return Promise.reject(new recording_error_handling.RecordingError(recording_utils.BUFFER_USAGE_INCORRECT_FORMAT));
            }
            return percentageUsed;
        });
    }
    initConnection() {
        // bind IPC methods
        const requestId = this.requestId++;
        const frame = new protos_1.IPCFrame({
            requestId,
            msgBindService: new protos_1.IPCFrame.BindService({ serviceName: 'ConsumerPort' }),
        });
        this.writeFrame(frame);
        // We shouldn't bind multiple times to the service in the same tracing
        // session.
        (0, logging.assertFalse)(!!this.resolveBindingPromise);
        this.resolveBindingPromise = (0, deferred.defer)();
        return this.resolveBindingPromise;
    }
    getBufferStats() {
        const getTraceStatsRequestProto = protos_1.GetTraceStatsRequest.encode(new protos_1.GetTraceStatsRequest()).finish();
        try {
            this.rpcInvoke('GetTraceStats', getTraceStatsRequestProto);
        }
        catch (e) {
            // GetTraceStats was introduced only on Android 10.
            this.raiseError(e);
        }
        const statsMessage = (0, deferred.defer)();
        this.pendingStatsMessages.push(statsMessage);
        return statsMessage;
    }
    terminateConnection() {
        this.clearState();
        const requestProto = protos_1.FreeBuffersRequest.encode(new protos_1.FreeBuffersRequest()).finish();
        this.rpcInvoke('FreeBuffers', requestProto);
        this.byteStream.close();
    }
    clearState() {
        for (const statsMessage of this.pendingStatsMessages) {
            statsMessage.reject(new recording_error_handling.RecordingError(recording_utils.BUFFER_USAGE_NOT_ACCESSIBLE));
        }
        this.pendingStatsMessages = [];
        this.pendingDataSources = [];
        this.pendingQssMessage = undefined;
    }
    rpcInvoke(methodName, argsProto) {
        if (!this.byteStream.isConnected()) {
            return;
        }
        const method = this.availableMethods.find((m) => m.name === methodName);
        if (!method || !method.id) {
            throw new recording_error_handling.RecordingError(`Method ${methodName} not supported by the target`);
        }
        const requestId = this.requestId++;
        const frame = new protos_1.IPCFrame({
            requestId,
            msgInvokeMethod: new protos_1.IPCFrame.InvokeMethod({ serviceId: this.serviceId, methodId: method.id, argsProto }),
        });
        this.requestMethods.set(requestId, methodName);
        this.writeFrame(frame);
    }
    writeFrame(frame) {
        const frameProto = protos_1.IPCFrame.encode(frame).finish();
        const frameLen = frameProto.length;
        const buf = new Uint8Array(WIRE_PROTOCOL_HEADER_SIZE + frameLen);
        const dv = new DataView(buf.buffer);
        dv.setUint32(0, frameProto.length, /* littleEndian */ true);
        for (let i = 0; i < frameLen; i++) {
            dv.setUint8(WIRE_PROTOCOL_HEADER_SIZE + i, frameProto[i]);
        }
        this.byteStream.write(buf);
    }
    handleReceivedData(rawData) {
        // we parse the length of the next frame if it's available
        if (this.currentFrameLength === undefined &&
            this.canCompleteLengthHeader(rawData)) {
            const remainingFrameBytes = WIRE_PROTOCOL_HEADER_SIZE - this.bufferedPartLength;
            this.appendToIncomingBuffer(rawData.subarray(0, remainingFrameBytes));
            rawData = rawData.subarray(remainingFrameBytes);
            this.currentFrameLength = parseMessageSize(this.incomingBuffer);
            this.bufferedPartLength = 0;
        }
        // Parse all complete frames.
        while (this.currentFrameLength !== undefined &&
            this.bufferedPartLength + rawData.length >=
                this.currentFrameLength) {
            // Read the remaining part of this message.
            const bytesToCompleteMessage = this.currentFrameLength - this.bufferedPartLength;
            this.appendToIncomingBuffer(rawData.subarray(0, bytesToCompleteMessage));
            this.parseFrame(this.incomingBuffer.subarray(0, this.currentFrameLength));
            this.bufferedPartLength = 0;
            // Remove the data just parsed.
            rawData = rawData.subarray(bytesToCompleteMessage);
            if (!this.canCompleteLengthHeader(rawData)) {
                this.currentFrameLength = undefined;
                break;
            }
            this.currentFrameLength = parseMessageSize(rawData);
            rawData = rawData.subarray(WIRE_PROTOCOL_HEADER_SIZE);
        }
        // Buffer the remaining data (part of the next message).
        this.appendToIncomingBuffer(rawData);
    }
    canCompleteLengthHeader(newData) {
        return newData.length + this.bufferedPartLength > WIRE_PROTOCOL_HEADER_SIZE;
    }
    appendToIncomingBuffer(array) {
        this.incomingBuffer.set(array, this.bufferedPartLength);
        this.bufferedPartLength += array.length;
    }
    parseFrame(frameBuffer) {
        var _a, _b, _c;
        // Get a copy of the ArrayBuffer to avoid the original being overriden.
        // See 170256902#comment21
        const frame = protos_1.IPCFrame.decode(frameBuffer.slice());
        if (frame.msg === 'msgBindServiceReply') {
            const msgBindServiceReply = frame.msgBindServiceReply;
            if (msgBindServiceReply && msgBindServiceReply.methods &&
                msgBindServiceReply.serviceId) {
                (0, logging.assertTrue)(msgBindServiceReply.success === true);
                this.availableMethods = msgBindServiceReply.methods;
                this.serviceId = msgBindServiceReply.serviceId;
                this.resolveBindingPromise.resolve();
            }
        }
        else if (frame.msg === 'msgInvokeMethodReply') {
            const msgInvokeMethodReply = frame.msgInvokeMethodReply;
            // We process messages without a `replyProto` field (for instance
            // `FreeBuffers` does not have `replyProto`). However, we ignore messages
            // without a valid 'success' field.
            if (!msgInvokeMethodReply || !msgInvokeMethodReply.success) {
                return;
            }
            const method = this.requestMethods.get(frame.requestId);
            if (!method) {
                this.raiseError(`${recording_utils.PARSING_UNKNWON_REQUEST_ID}: ${frame.requestId}`);
                return;
            }
            const decoder = decoders.get(method);
            if (decoder === undefined) {
                this.raiseError(`${recording_utils.PARSING_UNABLE_TO_DECODE_METHOD}: ${method}`);
                return;
            }
            const data = Object.assign({}, decoder(msgInvokeMethodReply.replyProto));
            if (method === 'ReadBuffers') {
                if (data.slices) {
                    for (const slice of data.slices) {
                        this.partialPacket.push(slice);
                        if (slice.lastSliceForPacket) {
                            let bufferSize = 0;
                            for (const slice of this.partialPacket) {
                                bufferSize += slice.data.length;
                            }
                            const tracePacket = new Uint8Array(bufferSize);
                            let written = 0;
                            for (const slice of this.partialPacket) {
                                const data = slice.data;
                                tracePacket.set(data, written);
                                written += data.length;
                            }
                            this.traceProtoWriter.uint32(TRACE_PACKET_PROTO_TAG);
                            this.traceProtoWriter.bytes(tracePacket);
                            this.partialPacket = [];
                        }
                    }
                }
                if (msgInvokeMethodReply.hasMore === false) {
                    this.tracingSessionListener.onTraceData(this.traceProtoWriter.finish());
                    this.terminateConnection();
                }
            }
            else if (method === 'EnableTracing') {
                const readBuffersRequestProto = protos_1.ReadBuffersRequest.encode(new protos_1.ReadBuffersRequest()).finish();
                this.rpcInvoke('ReadBuffers', readBuffersRequestProto);
            }
            else if (method === 'GetTraceStats') {
                const maybePendingStatsMessage = this.pendingStatsMessages.shift();
                if (maybePendingStatsMessage) {
                    maybePendingStatsMessage.resolve(((_a = data === null || data === void 0 ? void 0 : data.traceStats) === null || _a === void 0 ? void 0 : _a.bufferStats) || []);
                }
            }
            else if (method === 'FreeBuffers') ;
            else if (method === 'DisableTracing') ;
            else if (method === 'QueryServiceState') {
                const dataSources = ((_b = data === null || data === void 0 ? void 0 : data.serviceState) === null || _b === void 0 ? void 0 : _b.dataSources) ||
                    [];
                for (const dataSource of dataSources) {
                    const name = (_c = dataSource === null || dataSource === void 0 ? void 0 : dataSource.dsDescriptor) === null || _c === void 0 ? void 0 : _c.name;
                    if (name) {
                        this.pendingDataSources.push({ name, descriptor: dataSource.dsDescriptor });
                    }
                }
                if (msgInvokeMethodReply.hasMore === false) {
                    (0, logging.assertExists)(this.pendingQssMessage).resolve(this.pendingDataSources);
                    this.pendingDataSources = [];
                    this.pendingQssMessage = undefined;
                }
            }
            else {
                this.raiseError(`${recording_utils.PARSING_UNRECOGNIZED_PORT}: ${method}`);
            }
        }
        else {
            this.raiseError(`${recording_utils.PARSING_UNRECOGNIZED_MESSAGE}: ${frame.msg}`);
        }
    }
    raiseError(message) {
        this.terminateConnection();
        this.tracingSessionListener.onError(message);
    }
}
exports.TracedTracingSession = TracedTracingSession;
const decoders = new Map()
    .set('EnableTracing', protos_1.EnableTracingResponse.decode)
    .set('FreeBuffers', protos_1.FreeBuffersResponse.decode)
    .set('ReadBuffers', protos_1.ReadBuffersResponse.decode)
    .set('DisableTracing', protos_1.DisableTracingResponse.decode)
    .set('GetTraceStats', protos_1.GetTraceStatsResponse.decode)
    .set('QueryServiceState', protos_1.QueryServiceStateResponse.decode);

});

var android_target = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AndroidTarget = void 0;





class AndroidTarget {
    constructor(adbConnection, onTargetChange) {
        this.adbConnection = adbConnection;
        this.onTargetChange = onTargetChange;
        this.consumerSocketPath = recording_utils.DEFAULT_TRACED_CONSUMER_SOCKET_PATH;
    }
    // This is called when a usb USBConnectionEvent of type 'disconnect' event is
    // emitted. This event is emitted when the USB connection is lost (example:
    // when the user unplugged the connecting cable).
    disconnect(disconnectMessage) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            yield this.adbConnection.disconnect(disconnectMessage);
        });
    }
    // Starts a tracing session in order to fetch information such as apiLevel
    // and dataSources from the device. Then, it cancels the session.
    fetchTargetInfo(listener) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const tracingSession = yield this.createTracingSession(listener);
            tracingSession.cancel();
        });
    }
    // We do not support long tracing on Android.
    canCreateTracingSession(recordingMode) {
        return recordingMode !== 'LONG_TRACE';
    }
    createTracingSession(tracingSessionListener) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            this.adbConnection.onStatus = tracingSessionListener.onStatus;
            this.adbConnection.onDisconnect = tracingSessionListener.onDisconnect;
            if (!this.androidApiLevel) {
                // 1. Fetch the API version from the device.
                const version = yield this.adbConnection.shellAndGetOutput('getprop ro.build.version.sdk');
                this.androidApiLevel = Number(version);
                this.onTargetChange();
                // 2. For older OS versions we push the tracebox binary.
                if (this.androidApiLevel < 29) {
                    yield this.pushTracebox();
                    this.consumerSocketPath = recording_utils.CUSTOM_TRACED_CONSUMER_SOCKET_PATH;
                    yield this.adbConnection.shellAndWaitCompletion(this.composeTraceboxCommand('traced'));
                    yield this.adbConnection.shellAndWaitCompletion(this.composeTraceboxCommand('traced_probes'));
                }
            }
            const adbStream = yield this.adbConnection.connectSocket(this.consumerSocketPath);
            // 3. Start a tracing session.
            const tracingSession = new traced_tracing_session.TracedTracingSession(adbStream, tracingSessionListener);
            yield tracingSession.initConnection();
            if (!this.dataSources) {
                // 4. Fetch dataSources from QueryServiceState.
                this.dataSources = yield tracingSession.queryServiceState();
                this.onTargetChange();
            }
            return tracingSession;
        });
    }
    pushTracebox() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const arch = yield this.fetchArchitecture();
            const shortVersion = perfetto_version.VERSION.split('-')[0];
            const requestUrl = `https://commondatastorage.googleapis.com/perfetto-luci-artifacts/${shortVersion}/${arch}/tracebox`;
            const fetchResponse = yield (0, http_utils.fetchWithTimeout)(requestUrl, { method: 'get' }, recording_utils.TRACEBOX_FETCH_TIMEOUT);
            const traceboxBin = yield fetchResponse.arrayBuffer();
            yield this.adbConnection.push(new Uint8Array(traceboxBin), recording_utils.TRACEBOX_DEVICE_PATH);
            // We explicitly set the tracebox permissions because adb does not reliably
            // set permissions when uploading the binary.
            yield this.adbConnection.shellAndWaitCompletion(`chmod 755 ${recording_utils.TRACEBOX_DEVICE_PATH}`);
        });
    }
    fetchArchitecture() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const abiList = yield this.adbConnection.shellAndGetOutput('getprop ro.vendor.product.cpu.abilist');
            // If multiple ABIs are allowed, the 64bit ones should have higher priority.
            if (abiList.includes('arm64-v8a')) {
                return 'android-arm64';
            }
            else if (abiList.includes('x86')) {
                return 'android-x86';
            }
            else if (abiList.includes('armeabi-v7a') || abiList.includes('armeabi')) {
                return 'android-arm';
            }
            else if (abiList.includes('x86_64')) {
                return 'android-x64';
            }
            // Most devices have arm64 architectures, so we should return this if
            // nothing else is found.
            return 'android-arm64';
        });
    }
    canConnectWithoutContention() {
        return this.adbConnection.canConnectWithoutContention();
    }
    composeTraceboxCommand(applet) {
        // 1. Set the consumer socket.
        return 'PERFETTO_CONSUMER_SOCK_NAME=@traced_consumer ' +
            // 2. Set the producer socket.
            'PERFETTO_PRODUCER_SOCK_NAME=@traced_producer ' +
            // 3. Start the applet in the background.
            `/data/local/tmp/tracebox ${applet} --background`;
    }
}
exports.AndroidTarget = AndroidTarget;

});

var android_webusb_target = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AndroidWebusbTarget = void 0;



class AndroidWebusbTarget extends android_target.AndroidTarget {
    constructor(device, keyManager, onTargetChange) {
        super(new adb_connection_over_webusb.AdbConnectionOverWebusb(device, keyManager), onTargetChange);
        this.device = device;
    }
    getInfo() {
        const name = (0, logging.assertExists)(this.device.productName) + ' ' +
            (0, logging.assertExists)(this.device.serialNumber) + ' WebUsb';
        return {
            targetType: 'ANDROID',
            // 'androidApiLevel' will be populated after ADB authorization.
            androidApiLevel: this.androidApiLevel,
            dataSources: this.dataSources || [],
            name,
        };
    }
}
exports.AndroidWebusbTarget = AndroidWebusbTarget;

});

createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AndroidWebusbTargetFactory = exports.ANDROID_WEBUSB_TARGET_FACTORY = void 0;









exports.ANDROID_WEBUSB_TARGET_FACTORY = 'AndroidWebusbTargetFactory';
const SERIAL_NUMBER_ISSUE = 'an invalid serial number';
const ADB_INTERFACE_ISSUE = 'an incompatible adb interface';
function createDeviceErrorMessage(device, issue) {
    const productName = device.productName;
    return `USB device${productName ? ' ' + productName : ''} has ${issue}`;
}
class AndroidWebusbTargetFactory {
    constructor(usb) {
        this.usb = usb;
        this.kind = exports.ANDROID_WEBUSB_TARGET_FACTORY;
        this.onTargetChange = () => { };
        this.recordingProblems = [];
        this.targets = new Map();
        // AdbKeyManager should only be instantiated once, so we can use the same key
        // for all devices.
        this.keyManager = new adb_key_manager.AdbKeyManager();
        this.init();
    }
    getName() {
        return 'Android WebUsb';
    }
    listTargets() {
        return Array.from(this.targets.values());
    }
    listRecordingProblems() {
        return this.recordingProblems;
    }
    connectNewTarget() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            let device;
            try {
                device = yield this.usb.requestDevice({ filters: [recording_utils.ADB_DEVICE_FILTER] });
            }
            catch (e) {
                throw new recording_error_handling.RecordingError((0, errors.getErrorMessage)(e));
            }
            const deviceValid = this.checkDeviceValidity(device);
            if (!deviceValid.isValid) {
                throw new recording_error_handling.RecordingError(deviceValid.issues.join('\n'));
            }
            const androidTarget = new android_webusb_target.AndroidWebusbTarget(device, this.keyManager, this.onTargetChange);
            this.targets.set((0, logging.assertExists)(device.serialNumber), androidTarget);
            return androidTarget;
        });
    }
    setOnTargetChange(onTargetChange) {
        this.onTargetChange = onTargetChange;
    }
    init() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            for (const device of yield this.usb.getDevices()) {
                if (this.checkDeviceValidity(device).isValid) {
                    this.targets.set((0, logging.assertExists)(device.serialNumber), new android_webusb_target.AndroidWebusbTarget(device, this.keyManager, this.onTargetChange));
                }
            }
            this.usb.addEventListener('connect', (ev) => {
                if (this.checkDeviceValidity(ev.device).isValid) {
                    this.targets.set((0, logging.assertExists)(ev.device.serialNumber), new android_webusb_target.AndroidWebusbTarget(ev.device, this.keyManager, this.onTargetChange));
                    this.onTargetChange();
                }
            });
            this.usb.addEventListener('disconnect', (ev) => tslib.__awaiter(this, void 0, void 0, function* () {
                // We don't check device validity when disconnecting because if the device
                // is invalid we would not have connected in the first place.
                const serialNumber = (0, logging.assertExists)(ev.device.serialNumber);
                yield (0, logging.assertExists)(this.targets.get(serialNumber))
                    .disconnect(`Device with serial ${serialNumber} was disconnected.`);
                this.targets.delete(serialNumber);
                this.onTargetChange();
            }));
        });
    }
    checkDeviceValidity(device) {
        const deviceValidity = { isValid: true, issues: [] };
        if (!device.serialNumber) {
            deviceValidity.issues.push(createDeviceErrorMessage(device, SERIAL_NUMBER_ISSUE));
            deviceValidity.isValid = false;
        }
        if (!(0, recording_utils.findInterfaceAndEndpoint)(device)) {
            deviceValidity.issues.push(createDeviceErrorMessage(device, ADB_INTERFACE_ISSUE));
            deviceValidity.isValid = false;
        }
        this.recordingProblems.push(...deviceValidity.issues);
        return deviceValidity;
    }
}
exports.AndroidWebusbTargetFactory = AndroidWebusbTargetFactory;
// We only want to instantiate this class if:
// 1. The browser implements the USB functionality.
// 2. Recording V2 is enabled.
if (navigator.usb && feature_flags.RECORDING_V2_FLAG.get()) {
    target_factory_registry.targetFactoryRegistry.register(new AndroidWebusbTargetFactory(navigator.usb));
}

});

var adb_connection_over_websocket = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AdbOverWebsocketStream = exports.AdbConnectionOverWebsocket = void 0;






const textDecoder = new custom_utils_1._TextDecoder();
class AdbConnectionOverWebsocket extends adb_connection_impl.AdbConnectionImpl {
    constructor(deviceSerialNumber, websocketUrl) {
        super();
        this.deviceSerialNumber = deviceSerialNumber;
        this.websocketUrl = websocketUrl;
        this.streams = new Set();
        this.onDisconnect = (_) => { };
    }
    shell(cmd) {
        return this.openStream('shell:' + cmd);
    }
    connectSocket(path) {
        return this.openStream(path);
    }
    openStream(destination) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            return AdbOverWebsocketStream.create(this.websocketUrl, destination, this.deviceSerialNumber, this.closeStream.bind(this));
        });
    }
    // The disconnection for AdbConnectionOverWebsocket is synchronous, but this
    // method is async to have a common interface with other types of connections
    // which are async.
    disconnect(disconnectMessage) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            for (const stream of this.streams) {
                stream.close();
            }
            this.onDisconnect(disconnectMessage);
        });
    }
    closeStream(stream) {
        if (this.streams.has(stream)) {
            this.streams.delete(stream);
        }
    }
    // There will be no contention for the websocket connection, because it will
    // communicate with the 'adb server' running on the computer which opened
    // Perfetto.
    canConnectWithoutContention() {
        return Promise.resolve(true);
    }
}
exports.AdbConnectionOverWebsocket = AdbConnectionOverWebsocket;
// An AdbOverWebsocketStream instantiates a websocket connection to the device.
// It exposes an API to write commands to this websocket and read its output.
class AdbOverWebsocketStream {
    constructor(websocketUrl, destination, deviceSerialNumber, removeFromConnection) {
        this.removeFromConnection = removeFromConnection;
        // commandSentSignal gets resolved if we successfully connect to the device
        // and send the command this socket wraps. commandSentSignal gets rejected if
        // we fail to connect to the device.
        this.commandSentSignal = (0, deferred.defer)();
        // We store a promise for each messge while the message is processed.
        // This way, if the websocket server closes the connection, we first process
        // all previously received messages and only afterwards disconnect.
        // An application is when the stream wraps a shell command. The websocket
        // server will reply and then immediately disconnect.
        this.messageProcessedSignals = new Set();
        this._isConnected = false;
        this.onStreamDataCallbacks = [];
        this.onStreamCloseCallbacks = [];
        this.websocket = new WebSocket(websocketUrl);
        this.websocket.onopen = this.onOpen.bind(this, deviceSerialNumber);
        this.websocket.onmessage = this.onMessage.bind(this, destination);
        // The websocket may be closed by the websocket server. This happens
        // for instance when we get the full result of a shell command.
        this.websocket.onclose = this.onClose.bind(this);
    }
    addOnStreamDataCallback(onStreamData) {
        this.onStreamDataCallbacks.push(onStreamData);
    }
    addOnStreamCloseCallback(onStreamClose) {
        this.onStreamCloseCallbacks.push(onStreamClose);
    }
    // Used by the connection object to signal newly received data, not exposed
    // in the interface.
    signalStreamData(data) {
        for (const onStreamData of this.onStreamDataCallbacks) {
            onStreamData(data);
        }
    }
    // Used by the connection object to signal the stream is closed, not exposed
    // in the interface.
    signalStreamClosed() {
        for (const onStreamClose of this.onStreamCloseCallbacks) {
            onStreamClose();
        }
        this.onStreamDataCallbacks = [];
        this.onStreamCloseCallbacks = [];
    }
    // We close the websocket and notify the AdbConnection to remove this stream.
    close() {
        // If the websocket connection is still open (ie. the close did not
        // originate from the server), we close the websocket connection.
        if (this.websocket.readyState === this.websocket.OPEN) {
            this.websocket.close();
            // We remove the 'onclose' callback so the 'close' method doesn't get
            // executed twice.
            this.websocket.onclose = null;
        }
        this._isConnected = false;
        this.removeFromConnection(this);
        this.signalStreamClosed();
    }
    // For websocket, the teardown happens synchronously.
    closeAndWaitForTeardown() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            this.close();
        });
    }
    write(msg) {
        this.websocket.send(msg);
    }
    isConnected() {
        return this._isConnected;
    }
    onOpen(deviceSerialNumber) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            this.websocket.send((0, recording_utils.buildAbdWebsocketCommand)(`host:transport:${deviceSerialNumber}`));
        });
    }
    onMessage(destination, evt) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const messageProcessed = (0, deferred.defer)();
            this.messageProcessedSignals.add(messageProcessed);
            try {
                if (!this._isConnected) {
                    const txt = yield evt.data.text();
                    const prefix = txt.substr(0, 4);
                    if (prefix === 'OKAY') {
                        this._isConnected = true;
                        this.websocket.send((0, recording_utils.buildAbdWebsocketCommand)(destination));
                        this.commandSentSignal.resolve(this);
                    }
                    else if (prefix === 'FAIL' && txt.includes('device unauthorized')) {
                        this.commandSentSignal.reject(new recording_error_handling.RecordingError(recording_utils.ALLOW_USB_DEBUGGING));
                        this.close();
                    }
                    else {
                        this.commandSentSignal.reject(new recording_error_handling.RecordingError(recording_utils.WEBSOCKET_UNABLE_TO_CONNECT));
                        this.close();
                    }
                }
                else {
                    // Upon a successful connection we first receive an 'OKAY' message.
                    // After that, we receive messages with traced binary payloads.
                    const arrayBufferResponse = yield evt.data.arrayBuffer();
                    if (textDecoder.decode(arrayBufferResponse) !== 'OKAY') {
                        this.signalStreamData(new Uint8Array(arrayBufferResponse));
                    }
                }
                messageProcessed.resolve();
            }
            finally {
                this.messageProcessedSignals.delete(messageProcessed);
            }
        });
    }
    onClose() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            // Wait for all messages to be processed before closing the connection.
            yield Promise.allSettled(this.messageProcessedSignals);
            this.close();
        });
    }
    static create(websocketUrl, destination, deviceSerialNumber, removeFromConnection) {
        return (new AdbOverWebsocketStream(websocketUrl, destination, deviceSerialNumber, removeFromConnection))
            .commandSentSignal;
    }
}
exports.AdbOverWebsocketStream = AdbOverWebsocketStream;

});

var android_websocket_target = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AndroidWebsocketTarget = void 0;


class AndroidWebsocketTarget extends android_target.AndroidTarget {
    constructor(serialNumber, websocketUrl, onTargetChange) {
        super(new adb_connection_over_websocket.AdbConnectionOverWebsocket(serialNumber, websocketUrl), onTargetChange);
        this.serialNumber = serialNumber;
    }
    getInfo() {
        return {
            targetType: 'ANDROID',
            // 'androidApiLevel' will be populated after ADB authorization.
            androidApiLevel: this.androidApiLevel,
            dataSources: this.dataSources || [],
            name: this.serialNumber + ' WebSocket',
        };
    }
}
exports.AndroidWebsocketTarget = AndroidWebsocketTarget;

});

createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AndroidWebsocketTargetFactory = exports.WebsocketConnection = exports.parseWebsocketResponse = exports.ANDROID_WEBSOCKET_TARGET_FACTORY = void 0;





exports.ANDROID_WEBSOCKET_TARGET_FACTORY = 'AndroidWebsocketTargetFactory';
// https://cs.android.com/android/platform/superproject/+/master:packages/
// modules/adb/SERVICES.TXT;l=135
const PREFIX_LENGTH = 4;
// We issue the command 'track-devices' which will encode the short form
// of the device:
// see go/codesearch/android/packages/modules/adb/services.cpp;l=244-245
// and go/codesearch/android/packages/modules/adb/transport.cpp;l=1417-1420
// Therefore a line will contain solely the device serial number and the
// connectionState (and no other properties).
function parseListedDevice(line) {
    const parts = line.split('\t');
    if (parts.length === 2) {
        return {
            serialNumber: parts[0],
            connectionState: parts[1],
        };
    }
    return undefined;
}
function parseWebsocketResponse(message) {
    // A response we receive on the websocket contains multiple messages:
    // "{m1.length}{m1.payload}{m2.length}{m2.payload}..."
    // where m1, m2 are messages
    // Each message has the form:
    // "{message.length}SN1\t${connectionState1}\nSN2\t${connectionState2}\n..."
    // where SN1, SN2 are device serial numbers
    // and connectionState1, connectionState2 are adb connection states, created
    // here: go/codesearch/android/packages/modules/adb/adb.cpp;l=115-139
    const latestStatusByDevice = new Map();
    while (message.length >= PREFIX_LENGTH) {
        const payloadLength = parseInt(message.substring(0, PREFIX_LENGTH), 16);
        const prefixAndPayloadLength = PREFIX_LENGTH + payloadLength;
        if (message.length < prefixAndPayloadLength) {
            break;
        }
        const payload = message.substring(PREFIX_LENGTH, prefixAndPayloadLength);
        for (const line of payload.split('\n')) {
            const listedDevice = parseListedDevice(line);
            if (listedDevice) {
                // We overwrite previous states for the same serial number.
                latestStatusByDevice.set(listedDevice.serialNumber, listedDevice.connectionState);
            }
        }
        message = message.substring(prefixAndPayloadLength);
    }
    const listedDevices = [];
    for (const [serialNumber, connectionState] of latestStatusByDevice
        .entries()) {
        listedDevices.push({ serialNumber, connectionState });
    }
    return { listedDevices, messageRemainder: message };
}
exports.parseWebsocketResponse = parseWebsocketResponse;
class WebsocketConnection {
    constructor(websocket, maybeClearConnection, onTargetChange) {
        this.websocket = websocket;
        this.maybeClearConnection = maybeClearConnection;
        this.onTargetChange = onTargetChange;
        this.targets = new Map();
        this.pendingData = '';
        this.initWebsocket();
    }
    listTargets() {
        return Array.from(this.targets.values());
    }
    // Setup websocket callbacks.
    initWebsocket() {
        this.websocket.onclose = (ev) => {
            if (ev.code === recording_utils.WEBSOCKET_CLOSED_ABNORMALLY_CODE) {
                console.info(`It's safe to ignore the 'WebSocket connection to ${this.websocket.url} error above, if present. It occurs when ` +
                    'checking the connection to the local Websocket server.');
            }
            this.maybeClearConnection(this);
            this.close();
        };
        // once the websocket is open, we start tracking the devices
        this.websocket.onopen = () => {
            this.websocket.send((0, recording_utils.buildAbdWebsocketCommand)('host:track-devices'));
        };
        this.websocket.onmessage = (evt) => tslib.__awaiter(this, void 0, void 0, function* () {
            let resp = yield evt.data.text();
            if (resp.substr(0, 4) === 'OKAY') {
                resp = resp.substr(4);
            }
            const parsingResult = parseWebsocketResponse(this.pendingData + resp);
            this.pendingData = parsingResult.messageRemainder;
            this.trackDevices(parsingResult.listedDevices);
        });
    }
    close() {
        // The websocket connection may have already been closed by the websocket
        // server.
        if (this.websocket.readyState === this.websocket.OPEN) {
            this.websocket.close();
        }
        // Disconnect all the targets, to release all the websocket connections that
        // they hold and end their tracing sessions.
        for (const target of this.targets.values()) {
            target.disconnect();
        }
        this.targets.clear();
        if (this.onTargetChange) {
            this.onTargetChange();
        }
    }
    getUrl() {
        return this.websocket.url;
    }
    // Handle messages received over the websocket regarding devices connecting
    // or disconnecting.
    trackDevices(listedDevices) {
        // When a SN becomes offline, we should remove it from the list
        // of targets. Otherwise, we should check if it maps to a target. If the
        // SN does not map to a target, we should create one for it.
        let targetsUpdated = false;
        for (const listedDevice of listedDevices) {
            if (['offline', 'unknown'].includes(listedDevice.connectionState)) {
                const target = this.targets.get(listedDevice.serialNumber);
                if (target === undefined) {
                    continue;
                }
                target.disconnect();
                this.targets.delete(listedDevice.serialNumber);
                targetsUpdated = true;
            }
            else if (!this.targets.has(listedDevice.serialNumber)) {
                this.targets.set(listedDevice.serialNumber, new android_websocket_target.AndroidWebsocketTarget(listedDevice.serialNumber, this.websocket.url, this.onTargetChange));
                targetsUpdated = true;
            }
        }
        // Notify the calling code that the list of targets has been updated.
        if (targetsUpdated) {
            this.onTargetChange();
        }
    }
}
exports.WebsocketConnection = WebsocketConnection;
class AndroidWebsocketTargetFactory {
    constructor() {
        this.kind = exports.ANDROID_WEBSOCKET_TARGET_FACTORY;
        this.onTargetChange = () => { };
    }
    getName() {
        return 'Android Websocket';
    }
    listTargets() {
        return this.websocketConnection ? this.websocketConnection.listTargets() :
            [];
    }
    listRecordingProblems() {
        return [];
    }
    // This interface method can not return anything because a websocket target
    // can not be created on user input. It can only be created when the websocket
    // server detects a new target.
    connectNewTarget() {
        return Promise.reject(new Error('The websocket can only automatically connect targets ' +
            'when they become available.'));
    }
    tryEstablishWebsocket(websocketUrl) {
        if (this.websocketConnection) {
            if (this.websocketConnection.getUrl() === websocketUrl) {
                return;
            }
            else {
                this.websocketConnection.close();
            }
        }
        const websocket = new WebSocket(websocketUrl);
        this.websocketConnection = new WebsocketConnection(websocket, this.maybeClearConnection, this.onTargetChange);
    }
    maybeClearConnection(connection) {
        if (this.websocketConnection === connection) {
            this.websocketConnection = undefined;
        }
    }
    setOnTargetChange(onTargetChange) {
        this.onTargetChange = onTargetChange;
    }
}
exports.AndroidWebsocketTargetFactory = AndroidWebsocketTargetFactory;
// We only want to instantiate this class if Recording V2 is enabled.
if (feature_flags.RECORDING_V2_FLAG.get()) {
    target_factory_registry.targetFactoryRegistry.register(new AndroidWebsocketTargetFactory());
}

});

var consumer_port_types = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.isDisableTracingResponse = exports.isFreeBuffersResponse = exports.isGetTraceStatsResponse = exports.isEnableTracingResponse = exports.isReadBuffersResponse = exports.isTyped = exports.hasProperty = void 0;
// A type guard that can be used in order to be able to access the property of
// an object in a checked manner.
function hasProperty(obj, prop) {
    return obj.hasOwnProperty(prop);
}
exports.hasProperty = hasProperty;
function isTyped(obj) {
    return obj.hasOwnProperty('type');
}
exports.isTyped = isTyped;
function isReadBuffersResponse(obj) {
    return obj.type === 'ReadBuffersResponse';
}
exports.isReadBuffersResponse = isReadBuffersResponse;
function isEnableTracingResponse(obj) {
    return obj.type === 'EnableTracingResponse';
}
exports.isEnableTracingResponse = isEnableTracingResponse;
function isGetTraceStatsResponse(obj) {
    return obj.type === 'GetTraceStatsResponse';
}
exports.isGetTraceStatsResponse = isGetTraceStatsResponse;
function isFreeBuffersResponse(obj) {
    return obj.type === 'FreeBuffersResponse';
}
exports.isFreeBuffersResponse = isFreeBuffersResponse;
function isDisableTracingResponse(obj) {
    return obj.type === 'DisableTracingResponse';
}
exports.isDisableTracingResponse = isDisableTracingResponse;

});

var record_controller_interfaces = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.RpcConsumerPort = void 0;

class RpcConsumerPort {
    constructor(consumerPortListener) {
        this.consumerPortListener = consumerPortListener;
    }
    sendMessage(data) {
        this.consumerPortListener.onConsumerPortResponse(data);
    }
    sendErrorMessage(message) {
        this.consumerPortListener.onError(message);
    }
    sendStatus(status) {
        this.consumerPortListener.onStatus(status);
    }
    // Allows the recording controller to customise the suffix added to recorded
    // traces when they are downloaded. In the general case this will be
    // .perfetto-trace however if the trace is recorded compressed if could be
    // .perfetto-trace.gz etc.
    getRecordedTraceSuffix() {
        return constants.TRACE_SUFFIX;
    }
}
exports.RpcConsumerPort = RpcConsumerPort;

});

var chrome_proxy_record_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.ChromeExtensionConsumerPort = exports.isGetCategoriesResponse = exports.isChromeExtensionStatus = exports.isChromeExtensionError = void 0;




function isChromeExtensionError(obj) {
    return obj.type === 'ChromeExtensionError';
}
exports.isChromeExtensionError = isChromeExtensionError;
function isChromeExtensionStatus(obj) {
    return obj.type === 'ChromeExtensionStatus';
}
exports.isChromeExtensionStatus = isChromeExtensionStatus;
function isObject(obj) {
    return typeof obj === 'object' && obj !== null;
}
function isGetCategoriesResponse(obj) {
    if (!(isObject(obj) && (0, consumer_port_types.hasProperty)(obj, 'type') &&
        obj.type === 'GetCategoriesResponse')) {
        return false;
    }
    return (0, consumer_port_types.hasProperty)(obj, 'categories') && Array.isArray(obj.categories);
}
exports.isGetCategoriesResponse = isGetCategoriesResponse;
// This class acts as a proxy from the record controller (running in a worker),
// to the frontend. This is needed because we can't directly talk with the
// extension from a web-worker, so we use a MessagePort to communicate with the
// frontend, that will consecutively forward it to the extension.
// Rationale for the binaryEncode / binaryDecode calls below:
// Messages to/from extensions need to be JSON serializable. ArrayBuffers are
// not supported. For this reason here we use binaryEncode/Decode.
// See https://developer.chrome.com/extensions/messaging#simple
class ChromeExtensionConsumerPort extends record_controller_interfaces.RpcConsumerPort {
    constructor(extensionPort, consumer) {
        super(consumer);
        this.extensionPort = extensionPort;
        this.extensionPort.onmessage = this.onExtensionMessage.bind(this);
    }
    onExtensionMessage(message) {
        if (isChromeExtensionError(message.data)) {
            this.sendErrorMessage(message.data.error);
            return;
        }
        if (isChromeExtensionStatus(message.data)) {
            this.sendStatus(message.data.status);
            return;
        }
        // In this else branch message.data will be a ConsumerPortResponse.
        if ((0, consumer_port_types.isReadBuffersResponse)(message.data) && message.data.slices) {
            const slice = message.data.slices[0].data;
            message.data.slices[0].data = (0, string_utils.binaryDecode)(slice);
        }
        this.sendMessage(message.data);
    }
    handleCommand(method, requestData) {
        const reqEncoded = (0, string_utils.binaryEncode)(requestData);
        this.extensionPort.postMessage({ method, requestData: reqEncoded });
    }
    getRecordedTraceSuffix() {
        return `${constants.TRACE_SUFFIX}.gz`;
    }
}
exports.ChromeExtensionConsumerPort = ChromeExtensionConsumerPort;

});

var chrome_traced_tracing_session = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.ChromeTracedTracingSession = void 0;









// This class implements the protocol described in
// https://perfetto.dev/docs/design-docs/api-and-abi#tracing-protocol-abi
// However, with the Chrome extension we communicate using JSON messages.
class ChromeTracedTracingSession {
    constructor(tracingSessionListener) {
        this.tracingSessionListener = tracingSessionListener;
        // Needed for ReadBufferResponse: all the trace packets are split into
        // several slices. |partialPacket| is the buffer for them. Once we receive a
        // slice with the flag |lastSliceForPacket|, a new packet is created.
        this.partialPacket = [];
        this.pendingStatsMessages = new Array();
        this.chromePort = chrome.runtime.connect(recording_utils.EXTENSION_ID);
        this.isPortConnected = true;
    }
    start(config) {
        if (!this.isPortConnected)
            return;
        const duration = config.durationMs;
        this.tracingSessionListener.onStatus(`Recording in progress${duration ? ' for ' + duration.toString() + ' ms' : ''}...`);
        const enableTracingRequest = new protos_1.EnableTracingRequest();
        enableTracingRequest.traceConfig = config;
        const enableTracingRequestProto = (0, string_utils.binaryEncode)(protos_1.EnableTracingRequest.encode(enableTracingRequest).finish());
        this.chromePort.postMessage({ method: 'EnableTracing', requestData: enableTracingRequestProto });
    }
    // The 'cancel' method will end the tracing session and will NOT return the
    // trace. Therefore, we do not need to keep the connection open.
    cancel() {
        if (!this.isPortConnected)
            return;
        this.terminateConnection();
    }
    // The 'stop' method will end the tracing session and cause the trace to be
    // returned via a callback. We maintain the connection to the target so we can
    // extract the trace.
    // See 'DisableTracing' in:
    // https://perfetto.dev/docs/design-docs/life-of-a-tracing-session
    stop() {
        if (!this.isPortConnected)
            return;
        this.chromePort.postMessage({ method: 'DisableTracing' });
    }
    getCategories() {
        if (!this.isPortConnected) {
            throw new recording_error_handling.RecordingError('Attempting to get categories from a ' +
                'disconnected tracing session.');
        }
        if (this.pendingGetCategoriesMessage) {
            return this.pendingGetCategoriesMessage;
        }
        this.chromePort.postMessage({ method: 'GetCategories' });
        return this.pendingGetCategoriesMessage = (0, deferred.defer)();
    }
    getTraceBufferUsage() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            if (!this.isPortConnected)
                return 0;
            const bufferStats = yield this.getBufferStats();
            let percentageUsed = -1;
            for (const buffer of bufferStats) {
                const used = (0, logging.assertExists)(buffer.bytesWritten);
                const total = (0, logging.assertExists)(buffer.bufferSize);
                if (total >= 0) {
                    percentageUsed = Math.max(percentageUsed, used / total);
                }
            }
            if (percentageUsed === -1) {
                throw new recording_error_handling.RecordingError(recording_utils.BUFFER_USAGE_INCORRECT_FORMAT);
            }
            return percentageUsed;
        });
    }
    initConnection() {
        this.chromePort.onMessage.addListener((message) => {
            this.handleExtensionMessage(message);
        });
    }
    getBufferStats() {
        this.chromePort.postMessage({ method: 'GetTraceStats' });
        const statsMessage = (0, deferred.defer)();
        this.pendingStatsMessages.push(statsMessage);
        return statsMessage;
    }
    terminateConnection() {
        this.chromePort.postMessage({ method: 'FreeBuffers' });
        this.clearState();
    }
    clearState() {
        this.chromePort.disconnect();
        this.isPortConnected = false;
        for (const statsMessage of this.pendingStatsMessages) {
            statsMessage.reject(new recording_error_handling.RecordingError(recording_utils.BUFFER_USAGE_NOT_ACCESSIBLE));
        }
        this.pendingStatsMessages = [];
        this.pendingGetCategoriesMessage = undefined;
    }
    handleExtensionMessage(message) {
        var _a;
        if ((0, chrome_proxy_record_controller.isChromeExtensionError)(message)) {
            this.terminateConnection();
            this.tracingSessionListener.onError(message.error);
        }
        else if ((0, chrome_proxy_record_controller.isChromeExtensionStatus)(message)) {
            this.tracingSessionListener.onStatus(message.status);
        }
        else if ((0, consumer_port_types.isReadBuffersResponse)(message)) {
            if (!message.slices) {
                return;
            }
            for (const messageSlice of message.slices) {
                // The extension sends the binary data as a string.
                // see http://shortn/_oPmO2GT6Vb
                if (typeof messageSlice.data !== 'string') {
                    throw new recording_error_handling.RecordingError(recording_utils.MALFORMED_EXTENSION_MESSAGE);
                }
                const decodedSlice = {
                    data: (0, string_utils.binaryDecode)(messageSlice.data),
                };
                this.partialPacket.push(decodedSlice);
                if (messageSlice.lastSliceForPacket) {
                    let bufferSize = 0;
                    for (const slice of this.partialPacket) {
                        bufferSize += slice.data.length;
                    }
                    const completeTrace = new Uint8Array(bufferSize);
                    let written = 0;
                    for (const slice of this.partialPacket) {
                        const data = slice.data;
                        completeTrace.set(data, written);
                        written += data.length;
                    }
                    // The trace already comes encoded as a proto.
                    this.tracingSessionListener.onTraceData(completeTrace);
                    this.terminateConnection();
                }
            }
        }
        else if ((0, chrome_proxy_record_controller.isGetCategoriesResponse)(message)) {
            (0, logging.assertExists)(this.pendingGetCategoriesMessage)
                .resolve(message.categories);
            this.pendingGetCategoriesMessage = undefined;
        }
        else if ((0, consumer_port_types.isEnableTracingResponse)(message)) {
            // Once the service notifies us that a tracing session is enabled,
            // we can start streaming the response using 'ReadBuffers'.
            this.chromePort.postMessage({ method: 'ReadBuffers' });
        }
        else if ((0, consumer_port_types.isGetTraceStatsResponse)(message)) {
            const maybePendingStatsMessage = this.pendingStatsMessages.shift();
            if (maybePendingStatsMessage) {
                maybePendingStatsMessage.resolve(((_a = message === null || message === void 0 ? void 0 : message.traceStats) === null || _a === void 0 ? void 0 : _a.bufferStats) || []);
            }
        }
        else if ((0, consumer_port_types.isFreeBuffersResponse)(message)) ;
        else {
            (0, logging.assertTrue)((0, consumer_port_types.isDisableTracingResponse)(message));
            // No action required. Same reasoning as for FreeBuffers.
        }
    }
}
exports.ChromeTracedTracingSession = ChromeTracedTracingSession;

});

var chrome_target = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.ChromeTarget = void 0;


class ChromeTarget {
    constructor(name, targetType) {
        this.name = name;
        this.targetType = targetType;
    }
    getInfo() {
        return {
            targetType: this.targetType,
            name: this.name,
            dataSources: [{ name: 'chromeCategories', descriptor: this.chromeCategories }],
        };
    }
    // Chrome targets are created after we check that the extension is installed,
    // so they support tracing sessions.
    canCreateTracingSession() {
        return true;
    }
    createTracingSession(tracingSessionListener) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const tracingSession = new chrome_traced_tracing_session.ChromeTracedTracingSession(tracingSessionListener);
            tracingSession.initConnection();
            if (!this.chromeCategories) {
                // Fetch chrome categories from the extension.
                this.chromeCategories = yield tracingSession.getCategories();
                if (this.onTargetChange) {
                    this.onTargetChange();
                }
            }
            return tracingSession;
        });
    }
    // Starts a tracing session in order to fetch chrome categories from the
    // device. Then, it cancels the session.
    fetchTargetInfo(tracingSessionListener) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const tracingSession = yield this.createTracingSession(tracingSessionListener);
            tracingSession.cancel();
        });
    }
    disconnect(_disconnectMessage) {
        return Promise.resolve(undefined);
    }
    // We can connect to the Chrome target without taking the connection away
    // from another process.
    canConnectWithoutContention() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            return true;
        });
    }
}
exports.ChromeTarget = ChromeTarget;

});

createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.ChromeTargetFactory = exports.CHROME_TARGET_FACTORY = void 0;




exports.CHROME_TARGET_FACTORY = 'ChromeTargetFactory';
class ChromeTargetFactory {
    constructor() {
        this.kind = exports.CHROME_TARGET_FACTORY;
        // We only check the connection once at the beginning to:
        // a) Avoid creating a 'Port' object every time 'getInfo' is called.
        // b) When a new Port is created, the extension starts communicating with it
        // and leaves aside the old Port objects, so creating a new Port would break
        // any ongoing tracing session.
        this.isExtensionInstalled = false;
        this.targets = [];
        this.init();
    }
    init() {
        const testPort = chrome.runtime.connect(recording_utils.EXTENSION_ID);
        this.isExtensionInstalled = !!testPort;
        testPort.disconnect();
        if (!this.isExtensionInstalled) {
            return;
        }
        this.targets.push(new chrome_target.ChromeTarget('Chrome', 'CHROME'));
        if ((0, recording_utils.isCrOS)(navigator.userAgent)) {
            this.targets.push(new chrome_target.ChromeTarget('ChromeOS', 'CHROME_OS'));
        }
    }
    connectNewTarget() {
        throw new recording_error_handling.RecordingError('Can not create a new Chrome target.' +
            'All Chrome targets are created at factory initialisation.');
    }
    getName() {
        return 'Chrome';
    }
    listRecordingProblems() {
        const recordingProblems = [];
        if (!this.isExtensionInstalled) {
            recordingProblems.push(recording_utils.EXTENSION_NOT_INSTALLED);
        }
        return recordingProblems;
    }
    listTargets() {
        return this.targets;
    }
    setOnTargetChange(onTargetChange) {
        for (const target of this.targets) {
            target.onTargetChange = onTargetChange;
        }
    }
}
exports.ChromeTargetFactory = ChromeTargetFactory;
// We only instantiate the factory if Perfetto UI is open in the Chrome browser.
if (window.chrome && chrome.runtime) {
    target_factory_registry.targetFactoryRegistry.register(new ChromeTargetFactory());
}

});

var host_os_byte_stream = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.HostOsByteStream = void 0;


// A HostOsByteStream instantiates a websocket connection to the host OS.
// It exposes an API to write commands to this websocket and read its output.
class HostOsByteStream {
    constructor(websocketUrl) {
        // handshakeSignal will be resolved with the stream when the websocket
        // connection becomes open.
        this.handshakeSignal = (0, deferred.defer)();
        this._isConnected = false;
        this.onStreamDataCallbacks = [];
        this.onStreamCloseCallbacks = [];
        this.websocket = new WebSocket(websocketUrl);
        this.websocket.onmessage = this.onMessage.bind(this);
        this.websocket.onopen = this.onOpen.bind(this);
    }
    addOnStreamDataCallback(onStreamData) {
        this.onStreamDataCallbacks.push(onStreamData);
    }
    addOnStreamCloseCallback(onStreamClose) {
        this.onStreamCloseCallbacks.push(onStreamClose);
    }
    close() {
        this.websocket.close();
        for (const onStreamClose of this.onStreamCloseCallbacks) {
            onStreamClose();
        }
        this.onStreamDataCallbacks = [];
        this.onStreamCloseCallbacks = [];
    }
    closeAndWaitForTeardown() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            this.close();
        });
    }
    isConnected() {
        return this._isConnected;
    }
    write(msg) {
        this.websocket.send(msg);
    }
    onMessage(evt) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            for (const onStreamData of this.onStreamDataCallbacks) {
                const arrayBufferResponse = yield evt.data.arrayBuffer();
                onStreamData(new Uint8Array(arrayBufferResponse));
            }
        });
    }
    onOpen() {
        this._isConnected = true;
        this.handshakeSignal.resolve(this);
    }
    static create(websocketUrl) {
        return (new HostOsByteStream(websocketUrl)).handshakeSignal;
    }
}
exports.HostOsByteStream = HostOsByteStream;

});

var host_os_target = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.HostOsTarget = void 0;





class HostOsTarget {
    constructor(websocketUrl, maybeClearTarget, onTargetChange) {
        this.maybeClearTarget = maybeClearTarget;
        this.onTargetChange = onTargetChange;
        this.streams = new Set();
        this.onDisconnect = (_) => { };
        if ((0, recording_utils.isMacOs)(navigator.userAgent)) {
            this.name = 'MacOS';
            this.targetType = 'MACOS';
        }
        else if ((0, recording_utils.isLinux)(navigator.userAgent)) {
            this.name = 'Linux';
            this.targetType = 'LINUX';
        }
        else {
            throw new recording_error_handling.RecordingError('Host OS target created on an unsupported operating system.');
        }
        this.websocket = new WebSocket(websocketUrl);
        this.websocket.onclose = this.onClose.bind(this);
        // 'onError' gets called when the websocketURL where the UI tries to connect
        // is disallowed by the Content Security Policy. In this case, we disconnect
        // the target.
        this.websocket.onerror = this.disconnect.bind(this);
    }
    getInfo() {
        return {
            targetType: this.targetType,
            name: this.name,
            dataSources: this.dataSources || [],
        };
    }
    canCreateTracingSession() {
        return true;
    }
    createTracingSession(tracingSessionListener) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            this.onDisconnect = tracingSessionListener.onDisconnect;
            const osStream = yield host_os_byte_stream.HostOsByteStream.create(this.getUrl());
            this.streams.add(osStream);
            const tracingSession = new traced_tracing_session.TracedTracingSession(osStream, tracingSessionListener);
            yield tracingSession.initConnection();
            if (!this.dataSources) {
                this.dataSources = yield tracingSession.queryServiceState();
                this.onTargetChange();
            }
            return tracingSession;
        });
    }
    // Starts a tracing session in order to fetch data sources from the
    // device. Then, it cancels the session.
    fetchTargetInfo(tracingSessionListener) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const tracingSession = yield this.createTracingSession(tracingSessionListener);
            tracingSession.cancel();
        });
    }
    disconnect() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            if (this.websocket.readyState === this.websocket.OPEN) {
                this.websocket.close();
                // We remove the 'onclose' callback so the 'disconnect' method doesn't get
                // executed twice.
                this.websocket.onclose = null;
            }
            for (const stream of this.streams) {
                stream.close();
            }
            // We remove the existing target from the factory if present.
            this.maybeClearTarget(this);
            // We run the onDisconnect callback in case this target is used for tracing.
            this.onDisconnect();
        });
    }
    // We can connect to the Host OS without taking the connection away from
    // another process.
    canConnectWithoutContention() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            return true;
        });
    }
    getUrl() {
        return this.websocket.url;
    }
    onClose(ev) {
        if (ev.code === recording_utils.WEBSOCKET_CLOSED_ABNORMALLY_CODE) {
            console.info(`It's safe to ignore the 'WebSocket connection to ${this.getUrl()} error above, if present. It occurs when ` +
                'checking the connection to the local Websocket server.');
        }
        this.disconnect();
    }
}
exports.HostOsTarget = HostOsTarget;

});

createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.HostOsTargetFactory = exports.HOST_OS_TARGET_FACTORY = void 0;




exports.HOST_OS_TARGET_FACTORY = 'HostOsTargetFactory';
class HostOsTargetFactory {
    constructor() {
        this.kind = exports.HOST_OS_TARGET_FACTORY;
        this.onTargetChange = () => { };
    }
    connectNewTarget() {
        throw new recording_error_handling.RecordingError('Can not create a new Host OS target.' +
            'The Host OS target is created at factory initialisation.');
    }
    getName() {
        return 'HostOs';
    }
    listRecordingProblems() {
        return [];
    }
    listTargets() {
        if (this.target) {
            return [this.target];
        }
        return [];
    }
    tryEstablishWebsocket(websocketUrl) {
        if (this.target) {
            if (this.target.getUrl() === websocketUrl) {
                return;
            }
            else {
                this.target.disconnect();
            }
        }
        this.target = new host_os_target.HostOsTarget(websocketUrl, this.maybeClearTarget.bind(this), this.onTargetChange);
        this.onTargetChange();
    }
    maybeClearTarget(target) {
        if (this.target === target) {
            this.target = undefined;
            this.onTargetChange();
        }
    }
    setOnTargetChange(onTargetChange) {
        this.onTargetChange = onTargetChange;
    }
}
exports.HostOsTargetFactory = HostOsTargetFactory;
// We instantiate the host target factory only on Mac and Linux.
if ((0, recording_utils.isMacOs)(navigator.userAgent) || (0, recording_utils.isLinux)(navigator.userAgent)) {
    target_factory_registry.targetFactoryRegistry.register(new HostOsTargetFactory());
}

});

var android_virtual_target = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AndroidVirtualTarget = void 0;

class AndroidVirtualTarget {
    constructor(name, androidApiLevel) {
        this.name = name;
        this.androidApiLevel = androidApiLevel;
    }
    canConnectWithoutContention() {
        return Promise.resolve(true);
    }
    canCreateTracingSession() {
        return false;
    }
    createTracingSession(_) {
        throw new recording_error_handling.RecordingError('Can not create tracing session for a virtual target');
    }
    disconnect(_) {
        throw new recording_error_handling.RecordingError('Can not disconnect from a virtual target');
    }
    fetchTargetInfo(_) {
        return Promise.resolve();
    }
    getInfo() {
        return {
            name: this.name,
            androidApiLevel: this.androidApiLevel,
            targetType: 'ANDROID',
            dataSources: [],
        };
    }
}
exports.AndroidVirtualTarget = AndroidVirtualTarget;

});

createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.VirtualTargetFactory = void 0;



const VIRTUAL_TARGET_FACTORY = 'VirtualTargetFactory';
class VirtualTargetFactory {
    constructor() {
        this.kind = VIRTUAL_TARGET_FACTORY;
        this.targets = [];
        this.targets.push(new android_virtual_target.AndroidVirtualTarget('Android Q', 29));
        this.targets.push(new android_virtual_target.AndroidVirtualTarget('Android P', 28));
        this.targets.push(new android_virtual_target.AndroidVirtualTarget('Android O-', 27));
    }
    connectNewTarget() {
        throw new recording_error_handling.RecordingError('Can not create a new virtual target.' +
            'All virtual targets are created at factory initialisation.');
    }
    getName() {
        return 'Virtual';
    }
    listRecordingProblems() {
        return [];
    }
    listTargets() {
        return this.targets;
    }
    // Virtual targets won't change.
    setOnTargetChange(_) { }
}
exports.VirtualTargetFactory = VirtualTargetFactory;
target_factory_registry.targetFactoryRegistry.register(new VirtualTargetFactory());

});

createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });






});

var permalink_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.PermalinkController = void 0;















class PermalinkController extends controller.Controller {
    constructor() {
        super('main');
    }
    run() {
        if (globals$1.globals.state.permalink.requestId === undefined ||
            globals$1.globals.state.permalink.requestId === this.lastRequestId) {
            return;
        }
        const requestId = (0, logging.assertExists)(globals$1.globals.state.permalink.requestId);
        this.lastRequestId = requestId;
        // if the |hash| is not set, this is a request to create a permalink.
        if (globals$1.globals.state.permalink.hash === undefined) {
            const isRecordingConfig = (0, logging.assertExists)(globals$1.globals.state.permalink.isRecordingConfig);
            const jobName = 'create_permalink';
            (0, publish.publishConversionJobStatusUpdate)({
                jobName,
                jobStatus: conversion_jobs.ConversionJobStatus.InProgress,
            });
            PermalinkController.createPermalink(isRecordingConfig)
                .then((hash) => {
                globals$1.globals.dispatch(actions.Actions.setPermalink({ requestId, hash }));
            })
                .finally(() => {
                (0, publish.publishConversionJobStatusUpdate)({
                    jobName,
                    jobStatus: conversion_jobs.ConversionJobStatus.NotRunning,
                });
            });
            return;
        }
        // Otherwise, this is a request to load the permalink.
        PermalinkController.loadState(globals$1.globals.state.permalink.hash)
            .then((stateOrConfig) => {
            if (PermalinkController.isRecordConfig(stateOrConfig)) {
                // This permalink state only contains a RecordConfig. Show the
                // recording page with the config, but keep other state as-is.
                const validConfig = (0, validators.runValidator)(record_config_types.recordConfigValidator, stateOrConfig)
                    .result;
                globals$1.globals.dispatch(actions.Actions.setRecordConfig({ config: validConfig }));
                router$1.Router.navigate('#!/record');
                return;
            }
            globals$1.globals.dispatch(actions.Actions.setState({ newState: stateOrConfig }));
            this.lastRequestId = stateOrConfig.permalink.requestId;
        });
    }
    static upgradeState(state$1) {
        if (state$1.version !== state.STATE_VERSION) {
            const newState = (0, empty_state.createEmptyState)();
            let maxEngineId = Number.MIN_SAFE_INTEGER;
            // Copy the URL of the trace into the empty state.
            for (const cfg of Object.values(state$1.engines)) {
                newState
                    .engines[cfg.id] = { id: cfg.id, ready: false, source: cfg.source };
                maxEngineId = Math.max(maxEngineId, Number(cfg.id));
            }
            if (maxEngineId !== Number.MIN_SAFE_INTEGER) {
                // set the current engine Id to the maximum engine Id in the permalink
                newState.currentEngineId = String(maxEngineId);
            }
            const message = `Unable to parse old state version. Discarding state ` +
                `and loading trace.`;
            console.warn(message);
            PermalinkController.updateStatus(message);
            return newState;
        }
        else {
            // Loaded state is presumed to be compatible with the State type
            // definition in the app. However, a non-serializable part has to be
            // recreated.
            state$1.nonSerializableState = (0, empty_state.createEmptyNonSerializableState)();
        }
        return state$1;
    }
    static isRecordConfig(stateOrConfig) {
        const mode = stateOrConfig.mode;
        return mode !== undefined &&
            ['STOP_WHEN_FULL', 'RING_BUFFER', 'LONG_TRACE'].includes(mode);
    }
    static createPermalink(isRecordingConfig) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            let uploadState = globals$1.globals.state;
            if (isRecordingConfig) {
                uploadState = globals$1.globals.state.recordConfig;
            }
            else {
                const engine = (0, logging.assertExists)(globals.globals.getCurrentEngine());
                let dataToUpload = undefined;
                let traceName = `trace ${engine.id}`;
                if (engine.source.type === 'FILE') {
                    dataToUpload = engine.source.file;
                    traceName = dataToUpload.name;
                }
                else if (engine.source.type === 'ARRAY_BUFFER') {
                    dataToUpload = engine.source.buffer;
                }
                else if (engine.source.type !== 'URL') {
                    throw new Error(`Cannot share trace ${JSON.stringify(engine.source)}`);
                }
                if (dataToUpload !== undefined) {
                    PermalinkController.updateStatus(`Uploading ${traceName}`);
                    const url = yield (0, upload_utils.saveTrace)(dataToUpload);
                    // Convert state to use URLs and remove permalink.
                    uploadState = (0, dist.produce)(globals$1.globals.state, (draft) => {
                        draft.engines[engine.id].source = { type: 'URL', url };
                        draft.permalink = {};
                    });
                }
            }
            // Upload state.
            PermalinkController.updateStatus(`Creating permalink...`);
            const hash = yield (0, upload_utils.saveState)(uploadState);
            PermalinkController.updateStatus(`Permalink ready`);
            return hash;
        });
    }
    static loadState(id) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const url = `https://storage.googleapis.com/${upload_utils.BUCKET_NAME}/${id}`;
            const response = yield fetch(url);
            if (!response.ok) {
                throw new Error(`Could not fetch permalink.\n` +
                    `Are you sure the id (${id}) is correct?\n` +
                    `URL: ${url}`);
            }
            const text = yield response.text();
            const stateHash = yield (0, upload_utils.toSha256)(text);
            const state = JSON.parse(text);
            if (stateHash !== id) {
                throw new Error(`State hash does not match ${id} vs. ${stateHash}`);
            }
            if (!this.isRecordConfig(state)) {
                return this.upgradeState(state);
            }
            return state;
        });
    }
    static updateStatus(msg) {
        // TODO(hjd): Unify loading updates.
        globals$1.globals.dispatch(actions.Actions.updateStatus({
            msg,
            timestamp: Date.now() / 1000,
        }));
    }
}
exports.PermalinkController = PermalinkController;

});

var recording_config_utils = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.genTraceConfig = exports.RecordingConfigUtils = void 0;


class RecordingConfigUtils {
    constructor() {
        this.hasDataSources = false;
    }
    fetchLatestRecordCommand(recordConfig, targetInfo) {
        if (recordConfig === this.lastConfig &&
            targetInfo === this.lastTargetInfo) {
            return {
                configProtoText: this.configProtoText,
                configProtoBase64: this.configProtoBase64,
                hasDataSources: this.hasDataSources,
            };
        }
        this.lastConfig = recordConfig;
        this.lastTargetInfo = targetInfo;
        const traceConfig = genTraceConfig(recordConfig, targetInfo);
        const configProto = protos_1.TraceConfig.encode(traceConfig).finish();
        this.configProtoText = toPbtxt(configProto);
        this.configProtoBase64 = (0, string_utils.base64Encode)(configProto);
        this.hasDataSources = traceConfig.dataSources.length > 0;
        return {
            configProtoText: this.configProtoText,
            configProtoBase64: this.configProtoBase64,
            hasDataSources: this.hasDataSources,
        };
    }
}
exports.RecordingConfigUtils = RecordingConfigUtils;
function genTraceConfig(uiCfg, targetInfo) {
    const androidApiLevel = (targetInfo.targetType === 'ANDROID') ?
        targetInfo.androidApiLevel :
        undefined;
    const protoCfg = new protos_1.TraceConfig();
    protoCfg.durationMs = uiCfg.durationMs;
    // Auxiliary buffer for slow-rate events.
    // Set to 1/8th of the main buffer size, with reasonable limits.
    let slowBufSizeKb = uiCfg.bufferSizeMb * (1024 / 8);
    slowBufSizeKb = Math.min(slowBufSizeKb, 2 * 1024);
    slowBufSizeKb = Math.max(slowBufSizeKb, 256);
    // Main buffer for ftrace and other high-freq events.
    const fastBufSizeKb = uiCfg.bufferSizeMb * 1024 - slowBufSizeKb;
    protoCfg.buffers.push(new protos_1.BufferConfig());
    protoCfg.buffers.push(new protos_1.BufferConfig());
    protoCfg.buffers[1].sizeKb = slowBufSizeKb;
    protoCfg.buffers[0].sizeKb = fastBufSizeKb;
    if (uiCfg.mode === 'STOP_WHEN_FULL') {
        protoCfg.buffers[0].fillPolicy = protos_1.BufferConfig.FillPolicy.DISCARD;
        protoCfg.buffers[1].fillPolicy = protos_1.BufferConfig.FillPolicy.DISCARD;
    }
    else {
        protoCfg.buffers[0].fillPolicy = protos_1.BufferConfig.FillPolicy.RING_BUFFER;
        protoCfg.buffers[1].fillPolicy = protos_1.BufferConfig.FillPolicy.RING_BUFFER;
        protoCfg.flushPeriodMs = 30000;
        if (uiCfg.mode === 'LONG_TRACE') {
            protoCfg.writeIntoFile = true;
            protoCfg.fileWritePeriodMs = uiCfg.fileWritePeriodMs;
            protoCfg.maxFileSizeBytes = uiCfg.maxFileSizeMb * 1e6;
        }
        // Clear incremental state every 5 seconds when tracing into a ring
        // buffer.
        const incStateConfig = new protos_1.TraceConfig.IncrementalStateConfig();
        incStateConfig.clearPeriodMs = 5000;
        protoCfg.incrementalStateConfig = incStateConfig;
    }
    const ftraceEvents = new Set(uiCfg.ftrace ? uiCfg.ftraceEvents : []);
    const atraceCats = new Set(uiCfg.atrace ? uiCfg.atraceCats : []);
    const atraceApps = new Set();
    const chromeCategories = new Set();
    uiCfg.chromeCategoriesSelected.forEach((it) => chromeCategories.add(it));
    uiCfg.chromeHighOverheadCategoriesSelected.forEach((it) => chromeCategories.add(it));
    let procThreadAssociationPolling = false;
    let procThreadAssociationFtrace = false;
    let trackInitialOomScore = false;
    if (uiCfg.cpuSched) {
        procThreadAssociationPolling = true;
        procThreadAssociationFtrace = true;
        uiCfg.ftrace = true;
        if (androidApiLevel && androidApiLevel >= 31) {
            uiCfg.symbolizeKsyms = true;
        }
        ftraceEvents.add('sched/sched_switch');
        ftraceEvents.add('power/suspend_resume');
        ftraceEvents.add('sched/sched_wakeup');
        ftraceEvents.add('sched/sched_wakeup_new');
        ftraceEvents.add('sched/sched_waking');
        ftraceEvents.add('power/suspend_resume');
    }
    if (uiCfg.cpuFreq) {
        ftraceEvents.add('power/cpu_frequency');
        ftraceEvents.add('power/cpu_idle');
        ftraceEvents.add('power/suspend_resume');
    }
    if (uiCfg.gpuFreq) {
        ftraceEvents.add('power/gpu_frequency');
    }
    if (uiCfg.gpuMemTotal) {
        ftraceEvents.add('gpu_mem/gpu_mem_total');
        if (targetInfo.targetType !== 'CHROME') {
            const ds = new protos_1.TraceConfig.DataSource();
            ds.config = new protos_1.DataSourceConfig();
            ds.config.name = 'android.gpu.memory';
            protoCfg.dataSources.push(ds);
        }
    }
    if (uiCfg.cpuSyscall) {
        ftraceEvents.add('raw_syscalls/sys_enter');
        ftraceEvents.add('raw_syscalls/sys_exit');
    }
    if (uiCfg.batteryDrain) {
        const ds = new protos_1.TraceConfig.DataSource();
        ds.config = new protos_1.DataSourceConfig();
        if (targetInfo.targetType === 'CHROME_OS' ||
            targetInfo.targetType === 'LINUX') {
            ds.config.name = 'linux.sysfs_power';
        }
        else {
            ds.config.name = 'android.power';
            ds.config.androidPowerConfig = new protos_1.AndroidPowerConfig();
            ds.config.androidPowerConfig.batteryPollMs = uiCfg.batteryDrainPollMs;
            ds.config.androidPowerConfig.batteryCounters = [
                protos_1.AndroidPowerConfig.BatteryCounters.BATTERY_COUNTER_CAPACITY_PERCENT,
                protos_1.AndroidPowerConfig.BatteryCounters.BATTERY_COUNTER_CHARGE,
                protos_1.AndroidPowerConfig.BatteryCounters.BATTERY_COUNTER_CURRENT,
            ];
            ds.config.androidPowerConfig.collectPowerRails = true;
        }
        if (targetInfo.targetType !== 'CHROME') {
            protoCfg.dataSources.push(ds);
        }
    }
    if (uiCfg.boardSensors) {
        ftraceEvents.add('regulator/regulator_set_voltage');
        ftraceEvents.add('regulator/regulator_set_voltage_complete');
        ftraceEvents.add('power/clock_enable');
        ftraceEvents.add('power/clock_disable');
        ftraceEvents.add('power/clock_set_rate');
        ftraceEvents.add('power/suspend_resume');
    }
    let sysStatsCfg = undefined;
    if (uiCfg.cpuCoarse) {
        sysStatsCfg = new protos_1.SysStatsConfig();
        sysStatsCfg.statPeriodMs = uiCfg.cpuCoarsePollMs;
        sysStatsCfg.statCounters = [
            protos_1.SysStatsConfig.StatCounters.STAT_CPU_TIMES,
            protos_1.SysStatsConfig.StatCounters.STAT_FORK_COUNT,
        ];
    }
    if (uiCfg.memHiFreq) {
        procThreadAssociationPolling = true;
        procThreadAssociationFtrace = true;
        ftraceEvents.add('mm_event/mm_event_record');
        ftraceEvents.add('kmem/rss_stat');
        ftraceEvents.add('ion/ion_stat');
        ftraceEvents.add('dmabuf_heap/dma_heap_stat');
        ftraceEvents.add('kmem/ion_heap_grow');
        ftraceEvents.add('kmem/ion_heap_shrink');
    }
    if (procThreadAssociationFtrace) {
        ftraceEvents.add('sched/sched_process_exit');
        ftraceEvents.add('sched/sched_process_free');
        ftraceEvents.add('task/task_newtask');
        ftraceEvents.add('task/task_rename');
    }
    if (uiCfg.meminfo) {
        if (sysStatsCfg === undefined)
            sysStatsCfg = new protos_1.SysStatsConfig();
        sysStatsCfg.meminfoPeriodMs = uiCfg.meminfoPeriodMs;
        sysStatsCfg.meminfoCounters = uiCfg.meminfoCounters.map((name) => {
            return protos_1.MeminfoCounters[name];
        });
    }
    if (uiCfg.vmstat) {
        if (sysStatsCfg === undefined)
            sysStatsCfg = new protos_1.SysStatsConfig();
        sysStatsCfg.vmstatPeriodMs = uiCfg.vmstatPeriodMs;
        sysStatsCfg.vmstatCounters = uiCfg.vmstatCounters.map((name) => {
            return protos_1.VmstatCounters[name];
        });
    }
    if (uiCfg.memLmk) {
        // For in-kernel LMK (roughly older devices until Go and Pixel 3).
        ftraceEvents.add('lowmemorykiller/lowmemory_kill');
        // For userspace LMKd (newer devices).
        // 'lmkd' is not really required because the code in lmkd.c emits events
        // with ATRACE_TAG_ALWAYS. We need something just to ensure that the final
        // config will enable atrace userspace events.
        atraceApps.add('lmkd');
        ftraceEvents.add('oom/oom_score_adj_update');
        procThreadAssociationPolling = true;
        trackInitialOomScore = true;
    }
    let heapprofd = undefined;
    if (uiCfg.heapProfiling) {
        // TODO(hjd): Check or inform user if buffer size are too small.
        const cfg = new protos_1.HeapprofdConfig();
        cfg.samplingIntervalBytes = uiCfg.hpSamplingIntervalBytes;
        if (uiCfg.hpSharedMemoryBuffer >= 8192 &&
            uiCfg.hpSharedMemoryBuffer % 4096 === 0) {
            cfg.shmemSizeBytes = uiCfg.hpSharedMemoryBuffer;
        }
        for (const value of uiCfg.hpProcesses.split('\n')) {
            if (value === '') ;
            else if (isNaN(+value)) {
                cfg.processCmdline.push(value);
            }
            else {
                cfg.pid.push(+value);
            }
        }
        if (uiCfg.hpContinuousDumpsInterval > 0) {
            const cdc = cfg.continuousDumpConfig = new protos_1.NativeContinuousDumpConfig();
            cdc.dumpIntervalMs = uiCfg.hpContinuousDumpsInterval;
            if (uiCfg.hpContinuousDumpsPhase > 0) {
                cdc.dumpPhaseMs = uiCfg.hpContinuousDumpsPhase;
            }
        }
        cfg.blockClient = uiCfg.hpBlockClient;
        if (uiCfg.hpAllHeaps) {
            cfg.allHeaps = true;
        }
        heapprofd = cfg;
    }
    let javaHprof = undefined;
    if (uiCfg.javaHeapDump) {
        const cfg = new protos_1.JavaHprofConfig();
        for (const value of uiCfg.jpProcesses.split('\n')) {
            if (value === '') ;
            else if (isNaN(+value)) {
                cfg.processCmdline.push(value);
            }
            else {
                cfg.pid.push(+value);
            }
        }
        if (uiCfg.jpContinuousDumpsInterval > 0) {
            const cdc = cfg.continuousDumpConfig = new protos_1.JavaContinuousDumpConfig();
            cdc.dumpIntervalMs = uiCfg.jpContinuousDumpsInterval;
            if (uiCfg.hpContinuousDumpsPhase > 0) {
                cdc.dumpPhaseMs = uiCfg.jpContinuousDumpsPhase;
            }
        }
        javaHprof = cfg;
    }
    if (uiCfg.procStats || procThreadAssociationPolling || trackInitialOomScore) {
        const ds = new protos_1.TraceConfig.DataSource();
        ds.config = new protos_1.DataSourceConfig();
        ds.config.targetBuffer = 1; // Aux
        ds.config.name = 'linux.process_stats';
        ds.config.processStatsConfig = new protos_1.ProcessStatsConfig();
        if (uiCfg.procStats) {
            ds.config.processStatsConfig.procStatsPollMs = uiCfg.procStatsPeriodMs;
        }
        if (procThreadAssociationPolling || trackInitialOomScore) {
            ds.config.processStatsConfig.scanAllProcessesOnStart = true;
        }
        if (targetInfo.targetType !== 'CHROME') {
            protoCfg.dataSources.push(ds);
        }
    }
    if (uiCfg.androidLogs) {
        const ds = new protos_1.TraceConfig.DataSource();
        ds.config = new protos_1.DataSourceConfig();
        ds.config.name = 'android.log';
        ds.config.androidLogConfig = new protos_1.AndroidLogConfig();
        ds.config.androidLogConfig.logIds = uiCfg.androidLogBuffers.map((name) => {
            return protos_1.AndroidLogId[name];
        });
        if (targetInfo.targetType !== 'CHROME') {
            protoCfg.dataSources.push(ds);
        }
    }
    if (uiCfg.androidFrameTimeline) {
        const ds = new protos_1.TraceConfig.DataSource();
        ds.config = new protos_1.DataSourceConfig();
        ds.config.name = 'android.surfaceflinger.frametimeline';
        if (targetInfo.targetType !== 'CHROME') {
            protoCfg.dataSources.push(ds);
        }
    }
    if (uiCfg.androidGameInterventionList) {
        const ds = new protos_1.TraceConfig.DataSource();
        ds.config = new protos_1.DataSourceConfig();
        ds.config.name = 'android.game_interventions';
        if (targetInfo.targetType !== 'CHROME') {
            protoCfg.dataSources.push(ds);
        }
    }
    if (uiCfg.chromeLogs) {
        chromeCategories.add('log');
    }
    if (uiCfg.taskScheduling) {
        chromeCategories.add('toplevel');
        chromeCategories.add('toplevel.flow');
        chromeCategories.add('scheduler');
        chromeCategories.add('sequence_manager');
        chromeCategories.add('disabled-by-default-toplevel.flow');
    }
    if (uiCfg.ipcFlows) {
        chromeCategories.add('toplevel');
        chromeCategories.add('toplevel.flow');
        chromeCategories.add('disabled-by-default-ipc.flow');
        chromeCategories.add('mojom');
    }
    if (uiCfg.jsExecution) {
        chromeCategories.add('toplevel');
        chromeCategories.add('v8');
    }
    if (uiCfg.webContentRendering) {
        chromeCategories.add('toplevel');
        chromeCategories.add('blink');
        chromeCategories.add('cc');
        chromeCategories.add('gpu');
    }
    if (uiCfg.uiRendering) {
        chromeCategories.add('toplevel');
        chromeCategories.add('cc');
        chromeCategories.add('gpu');
        chromeCategories.add('viz');
        chromeCategories.add('ui');
        chromeCategories.add('views');
    }
    if (uiCfg.inputEvents) {
        chromeCategories.add('toplevel');
        chromeCategories.add('benchmark');
        chromeCategories.add('evdev');
        chromeCategories.add('input');
        chromeCategories.add('disabled-by-default-toplevel.flow');
    }
    if (uiCfg.navigationAndLoading) {
        chromeCategories.add('loading');
        chromeCategories.add('net');
        chromeCategories.add('netlog');
        chromeCategories.add('navigation');
        chromeCategories.add('browser');
    }
    if (chromeCategories.size !== 0) {
        let chromeRecordMode;
        if (uiCfg.mode === 'STOP_WHEN_FULL') {
            chromeRecordMode = 'record-until-full';
        }
        else {
            chromeRecordMode = 'record-continuously';
        }
        const configStruct = {
            record_mode: chromeRecordMode,
            included_categories: [...chromeCategories.values()],
            // Only include explicitly selected categories
            excluded_categories: ['*'],
            memory_dump_config: {},
        };
        if (chromeCategories.has('disabled-by-default-memory-infra')) {
            configStruct.memory_dump_config = {
                allowed_dump_modes: ['background', 'light', 'detailed'],
                triggers: [{
                        min_time_between_dumps_ms: 10000,
                        mode: 'detailed',
                        type: 'periodic_interval',
                    }],
            };
        }
        const chromeConfig = new protos_1.ChromeConfig();
        chromeConfig.clientPriority = protos_1.ChromeConfig.ClientPriority.USER_INITIATED;
        chromeConfig.privacyFilteringEnabled = uiCfg.chromePrivacyFiltering;
        chromeConfig.traceConfig = JSON.stringify(configStruct);
        const traceDs = new protos_1.TraceConfig.DataSource();
        traceDs.config = new protos_1.DataSourceConfig();
        traceDs.config.name = 'org.chromium.trace_event';
        traceDs.config.chromeConfig = chromeConfig;
        protoCfg.dataSources.push(traceDs);
        // Configure "track_event" datasource for the Chrome SDK build.
        const trackEventDs = new protos_1.TraceConfig.DataSource();
        trackEventDs.config = new protos_1.DataSourceConfig();
        trackEventDs.config.name = 'track_event';
        trackEventDs.config.chromeConfig = chromeConfig;
        trackEventDs.config.trackEventConfig = new protos_1.TrackEventConfig();
        trackEventDs.config.trackEventConfig.disabledCategories = ['*'];
        trackEventDs.config.trackEventConfig.enabledCategories =
            [...chromeCategories.values(), '__metadata'];
        trackEventDs.config.trackEventConfig.enableThreadTimeSampling = true;
        trackEventDs.config.trackEventConfig.timestampUnitMultiplier = 1000;
        trackEventDs.config.trackEventConfig.filterDynamicEventNames =
            uiCfg.chromePrivacyFiltering;
        trackEventDs.config.trackEventConfig.filterDebugAnnotations =
            uiCfg.chromePrivacyFiltering;
        protoCfg.dataSources.push(trackEventDs);
        const metadataDs = new protos_1.TraceConfig.DataSource();
        metadataDs.config = new protos_1.DataSourceConfig();
        metadataDs.config.name = 'org.chromium.trace_metadata';
        metadataDs.config.chromeConfig = chromeConfig;
        protoCfg.dataSources.push(metadataDs);
        if (chromeCategories.has('disabled-by-default-memory-infra')) {
            const memoryDs = new protos_1.TraceConfig.DataSource();
            memoryDs.config = new protos_1.DataSourceConfig();
            memoryDs.config.name = 'org.chromium.memory_instrumentation';
            memoryDs.config.chromeConfig = chromeConfig;
            protoCfg.dataSources.push(memoryDs);
            const HeapProfDs = new protos_1.TraceConfig.DataSource();
            HeapProfDs.config = new protos_1.DataSourceConfig();
            HeapProfDs.config.name = 'org.chromium.native_heap_profiler';
            HeapProfDs.config.chromeConfig = chromeConfig;
            protoCfg.dataSources.push(HeapProfDs);
        }
        if (chromeCategories.has('disabled-by-default-cpu_profiler') ||
            chromeCategories.has('disabled-by-default-cpu_profiler.debug')) {
            const dataSource = new protos_1.TraceConfig.DataSource();
            dataSource.config = new protos_1.DataSourceConfig();
            dataSource.config.name = 'org.chromium.sampler_profiler';
            dataSource.config.chromeConfig = chromeConfig;
            protoCfg.dataSources.push(dataSource);
        }
    }
    // Keep these last. The stages above can enrich them.
    if (sysStatsCfg !== undefined && targetInfo.targetType !== 'CHROME') {
        const ds = new protos_1.TraceConfig.DataSource();
        ds.config = new protos_1.DataSourceConfig();
        ds.config.name = 'linux.sys_stats';
        ds.config.sysStatsConfig = sysStatsCfg;
        protoCfg.dataSources.push(ds);
    }
    if (heapprofd !== undefined && targetInfo.targetType !== 'CHROME') {
        const ds = new protos_1.TraceConfig.DataSource();
        ds.config = new protos_1.DataSourceConfig();
        ds.config.targetBuffer = 0;
        ds.config.name = 'android.heapprofd';
        ds.config.heapprofdConfig = heapprofd;
        protoCfg.dataSources.push(ds);
    }
    if (javaHprof !== undefined && targetInfo.targetType !== 'CHROME') {
        const ds = new protos_1.TraceConfig.DataSource();
        ds.config = new protos_1.DataSourceConfig();
        ds.config.targetBuffer = 0;
        ds.config.name = 'android.java_hprof';
        ds.config.javaHprofConfig = javaHprof;
        protoCfg.dataSources.push(ds);
    }
    if (uiCfg.ftrace || uiCfg.atrace || ftraceEvents.size > 0 ||
        atraceCats.size > 0 || atraceApps.size > 0) {
        const ds = new protos_1.TraceConfig.DataSource();
        ds.config = new protos_1.DataSourceConfig();
        ds.config.name = 'linux.ftrace';
        ds.config.ftraceConfig = new protos_1.FtraceConfig();
        // Override the advanced ftrace parameters only if the user has ticked the
        // "Advanced ftrace config" tab.
        if (uiCfg.ftrace) {
            if (uiCfg.ftraceBufferSizeKb) {
                ds.config.ftraceConfig.bufferSizeKb = uiCfg.ftraceBufferSizeKb;
            }
            if (uiCfg.ftraceDrainPeriodMs) {
                ds.config.ftraceConfig.drainPeriodMs = uiCfg.ftraceDrainPeriodMs;
            }
            if (uiCfg.symbolizeKsyms) {
                ds.config.ftraceConfig.symbolizeKsyms = true;
                ftraceEvents.add('sched/sched_blocked_reason');
            }
            for (const line of uiCfg.ftraceExtraEvents.split('\n')) {
                if (line.trim().length > 0)
                    ftraceEvents.add(line.trim());
            }
        }
        if (uiCfg.atrace) {
            if (uiCfg.allAtraceApps) {
                atraceApps.clear();
                atraceApps.add('*');
            }
            else {
                for (const line of uiCfg.atraceApps.split('\n')) {
                    if (line.trim().length > 0)
                        atraceApps.add(line.trim());
                }
            }
        }
        if (atraceCats.size > 0 || atraceApps.size > 0) {
            ftraceEvents.add('ftrace/print');
        }
        let ftraceEventsArray = [];
        if (androidApiLevel && androidApiLevel === 28) {
            for (const ftraceEvent of ftraceEvents) {
                // On P, we don't support groups so strip all group names from ftrace
                // events.
                const groupAndName = ftraceEvent.split('/');
                if (groupAndName.length !== 2) {
                    ftraceEventsArray.push(ftraceEvent);
                    continue;
                }
                // Filter out any wildcard event groups which was not supported
                // before Q.
                if (groupAndName[1] === '*') {
                    continue;
                }
                ftraceEventsArray.push(groupAndName[1]);
            }
        }
        else {
            ftraceEventsArray = Array.from(ftraceEvents);
        }
        ds.config.ftraceConfig.ftraceEvents = ftraceEventsArray;
        ds.config.ftraceConfig.atraceCategories = Array.from(atraceCats);
        ds.config.ftraceConfig.atraceApps = Array.from(atraceApps);
        if (androidApiLevel && androidApiLevel >= 31) {
            const compact = new protos_1.FtraceConfig.CompactSchedConfig();
            compact.enabled = true;
            ds.config.ftraceConfig.compactSched = compact;
        }
        if (targetInfo.targetType !== 'CHROME') {
            protoCfg.dataSources.push(ds);
        }
    }
    return protoCfg;
}
exports.genTraceConfig = genTraceConfig;
function toPbtxt(configBuffer) {
    const msg = protos_1.TraceConfig.decode(configBuffer);
    const json = msg.toJSON();
    function snakeCase(s) {
        return s.replace(/[A-Z]/g, (c) => '_' + c.toLowerCase());
    }
    // With the ahead of time compiled protos we can't seem to tell which
    // fields are enums.
    function isEnum(value) {
        return value.startsWith('MEMINFO_') || value.startsWith('VMSTAT_') ||
            value.startsWith('STAT_') || value.startsWith('LID_') ||
            value.startsWith('BATTERY_COUNTER_') || value === 'DISCARD' ||
            value === 'RING_BUFFER';
    }
    // Since javascript doesn't have 64 bit numbers when converting protos to
    // json the proto library encodes them as strings. This is lossy since
    // we can't tell which strings that look like numbers are actually strings
    // and which are actually numbers. Ideally we would reflect on the proto
    // definition somehow but for now we just hard code keys which have this
    // problem in the config.
    function is64BitNumber(key) {
        return [
            'maxFileSizeBytes',
            'samplingIntervalBytes',
            'shmemSizeBytes',
            'pid',
        ].includes(key);
    }
    function* message(msg, indent) {
        for (const [key, value] of Object.entries(msg)) {
            const isRepeated = Array.isArray(value);
            const isNested = typeof value === 'object' && !isRepeated;
            for (const entry of (isRepeated ? value : [value])) {
                yield ' '.repeat(indent) + `${snakeCase(key)}${isNested ? '' : ':'} `;
                if (typeof entry === 'string') {
                    if (isEnum(entry) || is64BitNumber(key)) {
                        yield entry;
                    }
                    else {
                        yield `"${entry.replace(new RegExp('"', 'g'), '\\"')}"`;
                    }
                }
                else if (typeof entry === 'number') {
                    yield entry.toString();
                }
                else if (typeof entry === 'boolean') {
                    yield entry.toString();
                }
                else if (typeof entry === 'object' && entry !== null) {
                    yield '{\n';
                    yield* message(entry, indent + 4);
                    yield ' '.repeat(indent) + '}';
                }
                else {
                    throw new Error(`Record proto entry "${entry}" with unexpected type ${typeof entry}`);
                }
                yield '\n';
            }
        }
    }
    return [...message(json, 0)].join('');
}

});

var adb = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AdbMsgImpl = exports.AdbStreamImpl = exports.AdbOverWebUsb = exports.AdbState = exports.DEFAULT_MAX_PAYLOAD_BYTES = exports.VERSION_NO_CHECKSUM = exports.VERSION_WITH_CHECKSUM = void 0;



const textEncoder = new custom_utils_1._TextEncoder();
const textDecoder = new custom_utils_1._TextDecoder();
exports.VERSION_WITH_CHECKSUM = 0x01000000;
exports.VERSION_NO_CHECKSUM = 0x01000001;
exports.DEFAULT_MAX_PAYLOAD_BYTES = 256 * 1024;
var AdbState;
(function (AdbState) {
    AdbState[AdbState["DISCONNECTED"] = 0] = "DISCONNECTED";
    // Authentication steps, see AdbOverWebUsb's handleAuthentication().
    AdbState[AdbState["AUTH_STEP1"] = 1] = "AUTH_STEP1";
    AdbState[AdbState["AUTH_STEP2"] = 2] = "AUTH_STEP2";
    AdbState[AdbState["AUTH_STEP3"] = 3] = "AUTH_STEP3";
    AdbState[AdbState["CONNECTED"] = 2] = "CONNECTED";
})(AdbState = exports.AdbState || (exports.AdbState = {}));
var AuthCmd;
(function (AuthCmd) {
    AuthCmd[AuthCmd["TOKEN"] = 1] = "TOKEN";
    AuthCmd[AuthCmd["SIGNATURE"] = 2] = "SIGNATURE";
    AuthCmd[AuthCmd["RSAPUBLICKEY"] = 3] = "RSAPUBLICKEY";
})(AuthCmd || (AuthCmd = {}));
const DEVICE_NOT_SET_ERROR = 'Device not set.';
// This class is a basic TypeScript implementation of adb that only supports
// shell commands. It is used to send the start tracing command to the connected
// android device, and to automatically pull the trace after the end of the
// recording. It works through the webUSB API. A brief description of how it
// works is the following:
// - The connection with the device is initiated by findAndConnect, which shows
//   a dialog with a list of connected devices. Once one is selected the
//   authentication begins. The authentication has to pass different steps, as
//   described in the "handeAuthentication" method.
// - AdbOverWebUsb tracks the state of the authentication via a state machine
//   (see AdbState).
// - A Message handler loop is executed to keep receiving the messages.
// - All the messages received from the device are passed to "onMessage" that is
//   implemented as a state machine.
// - When a new shell is established, it becomes an AdbStream, and is kept in
//   the "streams" map. Each time a message from the device is for a specific
//   previously opened stream, the "onMessage" function will forward it to the
//   stream (identified by a number).
class AdbOverWebUsb {
    constructor() {
        this.state = AdbState.DISCONNECTED;
        this.streams = new Map();
        this.devProps = '';
        this.maxPayload = exports.DEFAULT_MAX_PAYLOAD_BYTES;
        this.onConnected = () => { };
        // Devices after Dec 2017 don't use checksum. This will be auto-detected
        // during the connection.
        this.useChecksum = true;
        this.lastStreamId = 0;
        this.usbReadEndpoint = -1;
        this.usbWriteEpEndpoint = -1;
        this.filter = {
            classCode: 255,
            subclassCode: 66,
            protocolCode: 1, // Adb protocol
        };
    }
    findDevice() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            if (!('usb' in navigator)) {
                throw new Error('WebUSB not supported by the browser (requires HTTPS)');
            }
            return navigator.usb.requestDevice({ filters: [this.filter] });
        });
    }
    getPairedDevices() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            try {
                return navigator.usb.getDevices();
            }
            catch (e) { // WebUSB not available.
                return Promise.resolve([]);
            }
        });
    }
    connect(device) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            // If we are already connected, we are also already authenticated, so we can
            // skip doing the authentication again.
            if (this.state === AdbState.CONNECTED) {
                if (this.dev === device && device.opened) {
                    this.onConnected();
                    this.onConnected = () => { };
                    return;
                }
                // Another device was connected.
                yield this.disconnect();
            }
            this.dev = device;
            this.useChecksum = true;
            this.key = yield AdbOverWebUsb.initKey();
            yield this.dev.open();
            const { configValue, usbInterfaceNumber, endpoints } = this.findInterfaceAndEndpoint();
            this.usbInterfaceNumber = usbInterfaceNumber;
            this.usbReadEndpoint = this.findEndpointNumber(endpoints, 'in');
            this.usbWriteEpEndpoint = this.findEndpointNumber(endpoints, 'out');
            console.assert(this.usbReadEndpoint >= 0 && this.usbWriteEpEndpoint >= 0);
            yield this.dev.selectConfiguration(configValue);
            yield this.dev.claimInterface(usbInterfaceNumber);
            yield this.startAuthentication();
            // This will start a message handler loop.
            this.receiveDeviceMessages();
            // The promise will be resolved after the handshake.
            return new Promise((resolve, _) => this.onConnected = resolve);
        });
    }
    disconnect() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            if (this.state === AdbState.DISCONNECTED) {
                return;
            }
            this.state = AdbState.DISCONNECTED;
            if (!this.dev)
                return;
            new Map(this.streams).forEach((stream, _id) => stream.setClosed());
            console.assert(this.streams.size === 0);
            yield this.dev.releaseInterface((0, logging.assertExists)(this.usbInterfaceNumber));
            this.dev = undefined;
            this.usbInterfaceNumber = undefined;
        });
    }
    startAuthentication() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            // USB connected, now let's authenticate.
            const VERSION = this.useChecksum ? exports.VERSION_WITH_CHECKSUM : exports.VERSION_NO_CHECKSUM;
            this.state = AdbState.AUTH_STEP1;
            yield this.send('CNXN', VERSION, this.maxPayload, 'host:1:UsbADB');
        });
    }
    findInterfaceAndEndpoint() {
        if (!this.dev)
            throw Error(DEVICE_NOT_SET_ERROR);
        for (const config of this.dev.configurations) {
            for (const interface_ of config.interfaces) {
                for (const alt of interface_.alternates) {
                    if (alt.interfaceClass === this.filter.classCode &&
                        alt.interfaceSubclass === this.filter.subclassCode &&
                        alt.interfaceProtocol === this.filter.protocolCode) {
                        return {
                            configValue: config.configurationValue,
                            usbInterfaceNumber: interface_.interfaceNumber,
                            endpoints: alt.endpoints,
                        };
                    } // if (alternate)
                } // for (interface.alternates)
            } // for (configuration.interfaces)
        } // for (configurations)
        throw Error('Cannot find interfaces and endpoints');
    }
    findEndpointNumber(endpoints, direction, type = 'bulk') {
        const ep = endpoints.find((ep) => ep.type === type && ep.direction === direction);
        if (ep)
            return ep.endpointNumber;
        throw Error(`Cannot find ${direction} endpoint`);
    }
    receiveDeviceMessages() {
        this.recv()
            .then((msg) => {
            this.onMessage(msg);
            this.receiveDeviceMessages();
        })
            .catch((e) => {
            // Ignore error with "DEVICE_NOT_SET_ERROR" message since it is always
            // thrown after the device disconnects.
            if (e.message !== DEVICE_NOT_SET_ERROR) {
                console.error(`Exception in recv: ${e.name}. error: ${e.message}`);
            }
            this.disconnect();
        });
    }
    onMessage(msg) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            if (!this.key)
                throw Error('ADB key not initialized');
            if (msg.cmd === 'AUTH' && msg.arg0 === AuthCmd.TOKEN) {
                this.handleAuthentication(msg);
            }
            else if (msg.cmd === 'CNXN') {
                console.assert([AdbState.AUTH_STEP2, AdbState.AUTH_STEP3].includes(this.state));
                this.state = AdbState.CONNECTED;
                this.handleConnectedMessage(msg);
            }
            else if (this.state === AdbState.CONNECTED && [
                'OKAY',
                'WRTE',
                'CLSE',
            ].indexOf(msg.cmd) >= 0) {
                const stream = this.streams.get(msg.arg1);
                if (!stream) {
                    console.warn(`Received message ${msg} for unknown stream ${msg.arg1}`);
                    return;
                }
                stream.onMessage(msg);
            }
            else {
                console.error(`Unexpected message `, msg, ` in state ${this.state}`);
            }
        });
    }
    handleAuthentication(msg) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            if (!this.key)
                throw Error('ADB key not initialized');
            console.assert(msg.cmd === 'AUTH' && msg.arg0 === AuthCmd.TOKEN);
            const token = msg.data;
            if (this.state === AdbState.AUTH_STEP1) {
                // During this step, we send back the token received signed with our
                // private key. If the device has previously received our public key, the
                // dialog will not be displayed. Otherwise we will receive another message
                // ending up in AUTH_STEP3.
                this.state = AdbState.AUTH_STEP2;
                const signedToken = yield signAdbTokenWithPrivateKey(this.key.privateKey, token);
                this.send('AUTH', AuthCmd.SIGNATURE, 0, new Uint8Array(signedToken));
                return;
            }
            console.assert(this.state === AdbState.AUTH_STEP2);
            // During this step, we send our public key. The dialog will appear, and
            // if the user chooses to remember our public key, it will be
            // saved, so that the next time we will only pass through AUTH_STEP1.
            this.state = AdbState.AUTH_STEP3;
            const encodedPubKey = yield encodePubKey(this.key.publicKey);
            this.send('AUTH', AuthCmd.RSAPUBLICKEY, 0, encodedPubKey);
        });
    }
    handleConnectedMessage(msg) {
        console.assert(msg.cmd === 'CNXN');
        this.maxPayload = msg.arg1;
        this.devProps = textDecoder.decode(msg.data);
        const deviceVersion = msg.arg0;
        if (![exports.VERSION_WITH_CHECKSUM, exports.VERSION_NO_CHECKSUM].includes(deviceVersion)) {
            console.error('Version ', msg.arg0, ' not really supported!');
        }
        this.useChecksum = deviceVersion === exports.VERSION_WITH_CHECKSUM;
        this.state = AdbState.CONNECTED;
        // This will resolve the promise returned by "onConnect"
        this.onConnected();
        this.onConnected = () => { };
    }
    shell(cmd) {
        return this.openStream('shell:' + cmd);
    }
    socket(path) {
        return this.openStream('localfilesystem:' + path);
    }
    openStream(svc) {
        const stream = new AdbStreamImpl(this, ++this.lastStreamId);
        this.streams.set(stream.localStreamId, stream);
        this.send('OPEN', stream.localStreamId, 0, svc);
        //  The stream will resolve this promise once it receives the
        //  acknowledgement message from the device.
        return new Promise((resolve, reject) => {
            stream.onConnect = () => {
                stream.onClose = () => { };
                resolve(stream);
            };
            stream.onClose = () => reject(new Error(`Failed to openStream svc=${svc}`));
        });
    }
    shellOutputAsString(cmd) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const shell = yield this.shell(cmd);
            return new Promise((resolve, _) => {
                const output = [];
                shell.onData = (raw) => output.push(textDecoder.decode(raw));
                shell.onClose = () => resolve(output.join());
            });
        });
    }
    send(cmd, arg0, arg1, data) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            yield this.sendMsg(AdbMsgImpl.create({ cmd, arg0, arg1, data, useChecksum: this.useChecksum }));
        });
    }
    //  The header and the message data must be sent consecutively. Using 2 awaits
    //  Another message can interleave after the first header has been sent,
    //  resulting in something like [header1] [header2] [data1] [data2];
    //  In this way we are waiting both promises to be resolved before continuing.
    sendMsg(msg) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const sendPromises = [this.sendRaw(msg.encodeHeader())];
            if (msg.data.length > 0)
                sendPromises.push(this.sendRaw(msg.data));
            yield Promise.all(sendPromises);
        });
    }
    recv() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const res = yield this.recvRaw(ADB_MSG_SIZE);
            console.assert(res.status === 'ok');
            const msg = AdbMsgImpl.decodeHeader(res.data);
            if (msg.dataLen > 0) {
                const resp = yield this.recvRaw(msg.dataLen);
                msg.data = new Uint8Array(resp.data.buffer, resp.data.byteOffset, resp.data.byteLength);
            }
            if (this.useChecksum) {
                console.assert(AdbOverWebUsb.checksum(msg.data) === msg.dataChecksum);
            }
            return msg;
        });
    }
    static initKey() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const KEY_SIZE = 2048;
            const keySpec = {
                name: 'RSASSA-PKCS1-v1_5',
                modulusLength: KEY_SIZE,
                publicExponent: new Uint8Array([0x01, 0x00, 0x01]),
                hash: { name: 'SHA-1' },
            };
            const key = yield crypto.subtle.generateKey(keySpec, /* extractable=*/ true, ['sign', 'verify']);
            return key;
        });
    }
    static checksum(data) {
        let res = 0;
        for (let i = 0; i < data.byteLength; i++)
            res += data[i];
        return res & 0xFFFFFFFF;
    }
    sendRaw(buf) {
        console.assert(buf.length <= this.maxPayload);
        if (!this.dev)
            throw Error(DEVICE_NOT_SET_ERROR);
        return this.dev.transferOut(this.usbWriteEpEndpoint, buf.buffer);
    }
    recvRaw(dataLen) {
        if (!this.dev)
            throw Error(DEVICE_NOT_SET_ERROR);
        return this.dev.transferIn(this.usbReadEndpoint, dataLen);
    }
}
exports.AdbOverWebUsb = AdbOverWebUsb;
var AdbStreamState;
(function (AdbStreamState) {
    AdbStreamState[AdbStreamState["WAITING_INITIAL_OKAY"] = 0] = "WAITING_INITIAL_OKAY";
    AdbStreamState[AdbStreamState["CONNECTED"] = 1] = "CONNECTED";
    AdbStreamState[AdbStreamState["CLOSED"] = 2] = "CLOSED";
})(AdbStreamState || (AdbStreamState = {}));
// An AdbStream is instantiated after the creation of a shell to the device.
// Thanks to this, we can send commands and receive their output. Messages are
// received in the main adb class, and are forwarded to an instance of this
// class based on a stream id match. Also streams have an initialization flow:
//   1. WAITING_INITIAL_OKAY: waiting for first "OKAY" message. Once received,
//      the next state will be "CONNECTED".
//   2. CONNECTED: ready to receive or send messages.
//   3. WRITING: this is needed because we must receive an ack after sending
//      each message (so, before sending the next one). For this reason, many
//      subsequent "write" calls will result in different messages in the
//      writeQueue. After each new acknowledgement ('OKAY') a new one will be
//      sent. When the queue is empty, the state will return to CONNECTED.
//   4. CLOSED: entered when the device closes the stream or close() is called.
//      For shell commands, the stream is closed after the command completed.
class AdbStreamImpl {
    constructor(adb, localStreamId) {
        this.remoteStreamId = -1;
        this.state = AdbStreamState.WAITING_INITIAL_OKAY;
        this.writeQueue = [];
        this.sendInProgress = false;
        this.onData = (_) => { };
        this.onConnect = () => { };
        this.onClose = () => { };
        this.adb = adb;
        this.localStreamId = localStreamId;
    }
    close() {
        console.assert(this.state === AdbStreamState.CONNECTED);
        if (this.writeQueue.length > 0) {
            console.error(`Dropping ${this.writeQueue.length} queued messages due to stream closing.`);
            this.writeQueue = [];
        }
        this.adb.send('CLSE', this.localStreamId, this.remoteStreamId);
    }
    write(msg) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const raw = (typeof msg === 'string') ? textEncoder.encode(msg) : msg;
            if (this.sendInProgress ||
                this.state === AdbStreamState.WAITING_INITIAL_OKAY) {
                this.writeQueue.push(raw);
                return;
            }
            console.assert(this.state === AdbStreamState.CONNECTED);
            this.sendInProgress = true;
            yield this.adb.send('WRTE', this.localStreamId, this.remoteStreamId, raw);
        });
    }
    setClosed() {
        this.state = AdbStreamState.CLOSED;
        this.adb.streams.delete(this.localStreamId);
        this.onClose();
    }
    onMessage(msg) {
        console.assert(msg.arg1 === this.localStreamId);
        if (this.state === AdbStreamState.WAITING_INITIAL_OKAY &&
            msg.cmd === 'OKAY') {
            this.remoteStreamId = msg.arg0;
            this.state = AdbStreamState.CONNECTED;
            this.onConnect();
            return;
        }
        if (msg.cmd === 'WRTE') {
            this.adb.send('OKAY', this.localStreamId, this.remoteStreamId);
            this.onData(msg.data);
            return;
        }
        if (msg.cmd === 'OKAY') {
            console.assert(this.sendInProgress);
            this.sendInProgress = false;
            const queuedMsg = this.writeQueue.shift();
            if (queuedMsg !== undefined)
                this.write(queuedMsg);
            return;
        }
        if (msg.cmd === 'CLSE') {
            this.setClosed();
            return;
        }
        console.error(`Unexpected stream msg ${msg.toString()} in state ${this.state}`);
    }
}
exports.AdbStreamImpl = AdbStreamImpl;
const ADB_MSG_SIZE = 6 * 4; // 6 * int32.
class AdbMsgImpl {
    constructor(cmd, arg0, arg1, dataLen, dataChecksum, useChecksum = false) {
        console.assert(cmd.length === 4);
        this.cmd = cmd;
        this.arg0 = arg0;
        this.arg1 = arg1;
        this.dataLen = dataLen;
        this.data = new Uint8Array(dataLen);
        this.dataChecksum = dataChecksum;
        this.useChecksum = useChecksum;
    }
    static create({ cmd, arg0, arg1, data, useChecksum = true }) {
        const encodedData = this.encodeData(data);
        const msg = new AdbMsgImpl(cmd, arg0, arg1, encodedData.length, 0, useChecksum);
        msg.data = encodedData;
        return msg;
    }
    get dataStr() {
        return textDecoder.decode(this.data);
    }
    toString() {
        return `${this.cmd} [${this.arg0},${this.arg1}] ${this.dataStr}`;
    }
    // A brief description of the message can be found here:
    // https://android.googlesource.com/platform/system/core/+/master/adb/protocol.txt
    //
    // struct amessage {
    //     uint32_t command;    // command identifier constant
    //     uint32_t arg0;       // first argument
    //     uint32_t arg1;       // second argument
    //     uint32_t data_length;// length of payload (0 is allowed)
    //     uint32_t data_check; // checksum of data payload
    //     uint32_t magic;      // command ^ 0xffffffff
    // };
    static decodeHeader(dv) {
        console.assert(dv.byteLength === ADB_MSG_SIZE);
        const cmd = textDecoder.decode(dv.buffer.slice(0, 4));
        const cmdNum = dv.getUint32(0, true);
        const arg0 = dv.getUint32(4, true);
        const arg1 = dv.getUint32(8, true);
        const dataLen = dv.getUint32(12, true);
        const dataChecksum = dv.getUint32(16, true);
        const cmdChecksum = dv.getUint32(20, true);
        console.assert(cmdNum === (cmdChecksum ^ 0xFFFFFFFF));
        return new AdbMsgImpl(cmd, arg0, arg1, dataLen, dataChecksum);
    }
    encodeHeader() {
        const buf = new Uint8Array(ADB_MSG_SIZE);
        const dv = new DataView(buf.buffer);
        const cmdBytes = textEncoder.encode(this.cmd);
        const rawMsg = AdbMsgImpl.encodeData(this.data);
        const checksum = this.useChecksum ? AdbOverWebUsb.checksum(rawMsg) : 0;
        for (let i = 0; i < 4; i++)
            dv.setUint8(i, cmdBytes[i]);
        dv.setUint32(4, this.arg0, true);
        dv.setUint32(8, this.arg1, true);
        dv.setUint32(12, rawMsg.byteLength, true);
        dv.setUint32(16, checksum, true);
        dv.setUint32(20, dv.getUint32(0, true) ^ 0xFFFFFFFF, true);
        return buf;
    }
    static encodeData(data) {
        if (data === undefined)
            return new Uint8Array([]);
        if (typeof data === 'string')
            return textEncoder.encode(data + '\0');
        return data;
    }
}
exports.AdbMsgImpl = AdbMsgImpl;
function base64StringToArray(s) {
    const decoded = atob(s.replace(/-/g, '+').replace(/_/g, '/'));
    return [...decoded].map((char) => char.charCodeAt(0));
}
const ANDROID_PUBKEY_MODULUS_SIZE = 2048;
const MODULUS_SIZE_BYTES = ANDROID_PUBKEY_MODULUS_SIZE / 8;
// RSA Public keys are encoded in a rather unique way. It's a base64 encoded
// struct of 524 bytes in total as follows (see
// libcrypto_utils/android_pubkey.c):
//
// typedef struct RSAPublicKey {
//   // Modulus length. This must be ANDROID_PUBKEY_MODULUS_SIZE.
//   uint32_t modulus_size_words;
//
//   // Precomputed montgomery parameter: -1 / n[0] mod 2^32
//   uint32_t n0inv;
//
//   // RSA modulus as a little-endian array.
//   uint8_t modulus[ANDROID_PUBKEY_MODULUS_SIZE];
//
//   // Montgomery parameter R^2 as a little-endian array of little-endian
//   words. uint8_t rr[ANDROID_PUBKEY_MODULUS_SIZE];
//
//   // RSA modulus: 3 or 65537
//   uint32_t exponent;
// } RSAPublicKey;
//
// However, the Montgomery params (n0inv and rr) are not really used, see
// comment in android_pubkey_decode() ("Note that we don't extract the
// montgomery parameters...")
function encodePubKey(key) {
    return tslib.__awaiter(this, void 0, void 0, function* () {
        const expPubKey = yield crypto.subtle.exportKey('jwk', key);
        const nArr = base64StringToArray(expPubKey.n).reverse();
        const eArr = base64StringToArray(expPubKey.e).reverse();
        const arr = new Uint8Array(3 * 4 + 2 * MODULUS_SIZE_BYTES);
        const dv = new DataView(arr.buffer);
        dv.setUint32(0, MODULUS_SIZE_BYTES / 4, true);
        // The Mongomery params (n0inv and rr) are not computed.
        dv.setUint32(4, 0 /* n0inv*/, true);
        // Modulus
        for (let i = 0; i < MODULUS_SIZE_BYTES; i++)
            dv.setUint8(8 + i, nArr[i]);
        // rr:
        for (let i = 0; i < MODULUS_SIZE_BYTES; i++) {
            dv.setUint8(8 + MODULUS_SIZE_BYTES + i, 0 /* rr*/);
        }
        // Exponent
        for (let i = 0; i < 4; i++) {
            dv.setUint8(8 + (2 * MODULUS_SIZE_BYTES) + i, eArr[i]);
        }
        return btoa(String.fromCharCode(...new Uint8Array(dv.buffer))) +
            ' perfetto@webusb';
    });
}
// TODO(nicomazz): This token signature will be useful only when we save the
// generated keys. So far, we are not doing so. As a consequence, a dialog is
// displayed every time a tracing session is started.
// The reason why it has not already been implemented is that the standard
// crypto.subtle.sign function assumes that the input needs hashing, which is
// not the case for ADB, where the 20 bytes token is already hashed.
// A solution to this is implementing a custom private key signature with a js
// implementation of big integers. Maybe, wrapping the key like in the following
// CL can work:
// https://android-review.googlesource.com/c/platform/external/perfetto/+/1105354/18
function signAdbTokenWithPrivateKey(_privateKey, token) {
    return tslib.__awaiter(this, void 0, void 0, function* () {
        // This function is not implemented.
        return token.buffer;
    });
}

});

var trace_config_utils = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.hasSystemDataSourceConfig = exports.browserSupportsPerfettoConfig = exports.extractDurationFromTraceConfig = exports.extractTraceConfig = void 0;

// In this file are contained a few functions to simplify the proto parsing.
function extractTraceConfig(enableTracingRequest) {
    try {
        const enableTracingObject = protos.perfetto.protos.EnableTracingRequest.decode(enableTracingRequest);
        if (!enableTracingObject.traceConfig)
            return undefined;
        return protos.perfetto.protos.TraceConfig.encode(enableTracingObject.traceConfig)
            .finish();
    }
    catch (e) { // This catch is for possible proto encoding/decoding issues.
        console.error('Error extracting the config: ', e.message);
        return undefined;
    }
}
exports.extractTraceConfig = extractTraceConfig;
function extractDurationFromTraceConfig(traceConfigProto) {
    try {
        return protos.perfetto.protos.TraceConfig.decode(traceConfigProto).durationMs;
    }
    catch (e) { // This catch is for possible proto encoding/decoding issues.
        return undefined;
    }
}
exports.extractDurationFromTraceConfig = extractDurationFromTraceConfig;
function browserSupportsPerfettoConfig() {
    const minimumChromeVersion = '91.0.4448.0';
    const runningVersion = String((/Chrome\/(([0-9]+\.?){4})/.exec(navigator.userAgent) || [, 0])[1]);
    if (!runningVersion)
        return false;
    const minVerArray = minimumChromeVersion.split('.').map(Number);
    const runVerArray = runningVersion.split('.').map(Number);
    for (let index = 0; index < minVerArray.length; index++) {
        if (runVerArray[index] === minVerArray[index])
            continue;
        return runVerArray[index] > minVerArray[index];
    }
    return true; // Exact version match.
}
exports.browserSupportsPerfettoConfig = browserSupportsPerfettoConfig;
function hasSystemDataSourceConfig(config) {
    for (const ds of config.dataSources) {
        if (ds.config && ds.config.name &&
            !ds.config.name.startsWith('org.chromium.')) {
            return true;
        }
    }
    return false;
}
exports.hasSystemDataSourceConfig = hasSystemDataSourceConfig;

});

var adb_base_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AdbBaseConsumerPort = exports.AdbConnectionState = void 0;


const trace_config_utils_2 = trace_config_utils;



var AdbConnectionState;
(function (AdbConnectionState) {
    AdbConnectionState[AdbConnectionState["READY_TO_CONNECT"] = 0] = "READY_TO_CONNECT";
    AdbConnectionState[AdbConnectionState["AUTH_IN_PROGRESS"] = 1] = "AUTH_IN_PROGRESS";
    AdbConnectionState[AdbConnectionState["CONNECTED"] = 2] = "CONNECTED";
    AdbConnectionState[AdbConnectionState["CLOSED"] = 3] = "CLOSED";
})(AdbConnectionState = exports.AdbConnectionState || (exports.AdbConnectionState = {}));
class AdbBaseConsumerPort extends record_controller_interfaces.RpcConsumerPort {
    constructor(adb, consumer) {
        super(consumer);
        // Contains the commands sent while the authentication is in progress. They
        // will all be executed afterwards. If the device disconnects, they are
        // removed.
        this.commandQueue = [];
        this.state = AdbConnectionState.READY_TO_CONNECT;
        this.adb = adb;
    }
    handleCommand(method, params) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            try {
                if (method === 'FreeBuffers') {
                    // When we finish tracing, we disconnect the adb device interface.
                    // Otherwise, we will keep holding the device interface and won't allow
                    // adb to access it. https://wicg.github.io/webusb/#abusing-a-device
                    // "Lastly, since USB devices are unable to distinguish requests from
                    // multiple sources, operating systems only allow a USB interface to
                    // have a single owning user-space or kernel-space driver."
                    this.state = AdbConnectionState.CLOSED;
                    yield this.adb.disconnect();
                }
                else if (method === 'EnableTracing') {
                    this.state = AdbConnectionState.READY_TO_CONNECT;
                }
                if (this.state === AdbConnectionState.CLOSED)
                    return;
                this.commandQueue.push({ method, params });
                if (this.state === AdbConnectionState.READY_TO_CONNECT ||
                    this.deviceDisconnected()) {
                    this.state = AdbConnectionState.AUTH_IN_PROGRESS;
                    this.device = yield this.findDevice();
                    if (!this.device) {
                        this.state = AdbConnectionState.READY_TO_CONNECT;
                        const target = globals$1.globals.state.recordingTarget;
                        throw Error(`Device with serial ${(0, state.isAdbTarget)(target) ? target.serial : 'n/a'} not found.`);
                    }
                    this.sendStatus(`Please allow USB debugging on device.
          If you press cancel, reload the page.`);
                    yield this.adb.connect(this.device);
                    // During the authentication the device may have been disconnected.
                    if (!globals$1.globals.state.recordingInProgress || this.deviceDisconnected()) {
                        throw Error('Recording not in progress after adb authorization.');
                    }
                    this.state = AdbConnectionState.CONNECTED;
                    this.sendStatus('Device connected.');
                }
                if (this.state === AdbConnectionState.AUTH_IN_PROGRESS)
                    return;
                console.assert(this.state === AdbConnectionState.CONNECTED);
                for (const cmd of this.commandQueue)
                    this.invoke(cmd.method, cmd.params);
                this.commandQueue = [];
            }
            catch (e) {
                this.commandQueue = [];
                this.state = AdbConnectionState.READY_TO_CONNECT;
                this.sendErrorMessage(e.message);
            }
        });
    }
    deviceDisconnected() {
        return !this.device || !this.device.opened;
    }
    setDurationStatus(enableTracingProto) {
        const traceConfigProto = (0, trace_config_utils_2.extractTraceConfig)(enableTracingProto);
        if (!traceConfigProto)
            return;
        const duration = (0, trace_config_utils.extractDurationFromTraceConfig)(traceConfigProto);
        this.sendStatus(`Recording in progress${duration ? ' for ' + duration.toString() + ' ms' : ''}...`);
    }
    generateChunkReadResponse(data, last = false) {
        return {
            type: 'ReadBuffersResponse',
            slices: [{ data, lastSliceForPacket: last }],
        };
    }
    findDevice() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            if (!('usb' in navigator))
                return undefined;
            const connectedDevice = globals$1.globals.state.recordingTarget;
            if (!(0, state.isAdbTarget)(connectedDevice))
                return undefined;
            const devices = yield navigator.usb.getDevices();
            return devices.find((d) => d.serialNumber === connectedDevice.serial);
        });
    }
}
exports.AdbBaseConsumerPort = AdbBaseConsumerPort;

});

var adb_shell_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AdbConsumerPort = void 0;





var AdbShellState;
(function (AdbShellState) {
    AdbShellState[AdbShellState["READY"] = 0] = "READY";
    AdbShellState[AdbShellState["RECORDING"] = 1] = "RECORDING";
    AdbShellState[AdbShellState["FETCHING"] = 2] = "FETCHING";
})(AdbShellState || (AdbShellState = {}));
const DEFAULT_DESTINATION_FILE = '/data/misc/perfetto-traces/trace-by-ui';
const textDecoder = new custom_utils_1._TextDecoder();
class AdbConsumerPort extends adb_base_controller.AdbBaseConsumerPort {
    constructor(adb, consumer) {
        super(adb, consumer);
        this.traceDestFile = DEFAULT_DESTINATION_FILE;
        this.shellState = AdbShellState.READY;
        this.adb = adb;
    }
    invoke(method, params) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            // ADB connection & authentication is handled by the superclass.
            console.assert(this.state === adb_base_controller.AdbConnectionState.CONNECTED);
            switch (method) {
                case 'EnableTracing':
                    this.enableTracing(params);
                    break;
                case 'ReadBuffers':
                    this.readBuffers();
                    break;
                case 'DisableTracing':
                    this.disableTracing();
                    break;
                case 'FreeBuffers':
                    this.freeBuffers();
                    break;
                case 'GetTraceStats':
                    break;
                default:
                    this.sendErrorMessage(`Method not recognized: ${method}`);
                    break;
            }
        });
    }
    enableTracing(enableTracingProto) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            try {
                const traceConfigProto = (0, trace_config_utils.extractTraceConfig)(enableTracingProto);
                if (!traceConfigProto) {
                    this.sendErrorMessage('Invalid config.');
                    return;
                }
                yield this.startRecording(traceConfigProto);
                this.setDurationStatus(enableTracingProto);
            }
            catch (e) {
                this.sendErrorMessage(e.message);
            }
        });
    }
    startRecording(configProto) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            this.shellState = AdbShellState.RECORDING;
            const recordCommand = this.generateStartTracingCommand(configProto);
            this.recordShell = yield this.adb.shell(recordCommand);
            const output = [];
            this.recordShell.onData = (raw) => output.push(textDecoder.decode(raw));
            this.recordShell.onClose = () => {
                const response = output.join();
                if (!this.tracingEndedSuccessfully(response)) {
                    this.sendErrorMessage(response);
                    this.shellState = AdbShellState.READY;
                    return;
                }
                this.sendStatus('Recording ended successfully. Fetching the trace..');
                this.sendMessage({ type: 'EnableTracingResponse' });
                this.recordShell = undefined;
            };
        });
    }
    tracingEndedSuccessfully(response) {
        return !response.includes(' 0 ms') && response.includes('Wrote ');
    }
    readBuffers() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            console.assert(this.shellState === AdbShellState.RECORDING);
            this.shellState = AdbShellState.FETCHING;
            const readTraceShell = yield this.adb.shell(this.generateReadTraceCommand());
            readTraceShell.onData = (raw) => this.sendMessage(this.generateChunkReadResponse(raw));
            readTraceShell.onClose = () => {
                this.sendMessage(this.generateChunkReadResponse(new Uint8Array(), /* last */ true));
            };
        });
    }
    getPidFromShellAsString() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const pidStr = yield this.adb.shellOutputAsString(`ps -u shell | grep perfetto`);
            // We used to use awk '{print $2}' but older phones/Go phones don't have
            // awk installed. Instead we implement similar functionality here.
            const awk = pidStr.split(' ').filter((str) => str !== '');
            if (awk.length < 1) {
                throw Error(`Unabled to find perfetto pid in string "${pidStr}"`);
            }
            return awk[1];
        });
    }
    disableTracing() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            if (!this.recordShell)
                return;
            try {
                // We are not using 'pidof perfetto' so that we can use more filters. 'ps
                // -u shell' is meant to catch processes started from shell, so if there
                // are other ongoing tracing sessions started by others, we are not
                // killing them.
                const pid = yield this.getPidFromShellAsString();
                if (pid.length === 0 || isNaN(Number(pid))) {
                    throw Error(`Perfetto pid not found. Impossible to stop/cancel the
     recording. Command output: ${pid}`);
                }
                // Perfetto stops and finalizes the tracing session on SIGINT.
                const killOutput = yield this.adb.shellOutputAsString(`kill -SIGINT ${pid}`);
                if (killOutput.length !== 0) {
                    throw Error(`Unable to kill perfetto: ${killOutput}`);
                }
            }
            catch (e) {
                this.sendErrorMessage(e.message);
            }
        });
    }
    freeBuffers() {
        this.shellState = AdbShellState.READY;
        if (this.recordShell) {
            this.recordShell.close();
            this.recordShell = undefined;
        }
    }
    generateChunkReadResponse(data, last = false) {
        return {
            type: 'ReadBuffersResponse',
            slices: [{ data, lastSliceForPacket: last }],
        };
    }
    generateReadTraceCommand() {
        // We attempt to delete the trace file after tracing. On a non-root shell,
        // this will fail (due to selinux denial), but perfetto cmd will be able to
        // override the file later. However, on a root shell, we need to clean up
        // the file since perfetto cmd might otherwise fail to override it in a
        // future session.
        return `gzip -c ${this.traceDestFile} && rm -f ${this.traceDestFile}`;
    }
    generateStartTracingCommand(tracingConfig) {
        const configBase64 = (0, string_utils.base64Encode)(tracingConfig);
        const perfettoCmd = `perfetto -c - -o ${this.traceDestFile}`;
        return `echo '${configBase64}' | base64 -d | ${perfettoCmd}`;
    }
}
exports.AdbConsumerPort = AdbConsumerPort;

});

var adb_socket_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AdbSocketConsumerPort = void 0;





var SocketState;
(function (SocketState) {
    SocketState[SocketState["DISCONNECTED"] = 0] = "DISCONNECTED";
    SocketState[SocketState["BINDING_IN_PROGRESS"] = 1] = "BINDING_IN_PROGRESS";
    SocketState[SocketState["BOUND"] = 2] = "BOUND";
})(SocketState || (SocketState = {}));
// See wire_protocol.proto for more details.
const WIRE_PROTOCOL_HEADER_SIZE = 4;
const MAX_IPC_BUFFER_SIZE = 128 * 1024;
const PROTO_LEN_DELIMITED_WIRE_TYPE = 2;
const TRACE_PACKET_PROTO_ID = 1;
const TRACE_PACKET_PROTO_TAG = (TRACE_PACKET_PROTO_ID << 3) | PROTO_LEN_DELIMITED_WIRE_TYPE;
const TRACED_SOCKET = '/dev/socket/traced_consumer';
class AdbSocketConsumerPort extends adb_base_controller.AdbBaseConsumerPort {
    constructor(adb, consumer) {
        super(adb, consumer);
        this.socketState = SocketState.DISCONNECTED;
        // Wire protocol request ID. After each request it is increased. It is needed
        // to keep track of the type of request, and parse the response correctly.
        this.requestId = 1;
        // Buffers received wire protocol data.
        this.incomingBuffer = new Uint8Array(MAX_IPC_BUFFER_SIZE);
        this.incomingBufferLen = 0;
        this.frameToParseLen = 0;
        this.availableMethods = [];
        this.serviceId = -1;
        this.requestMethods = new Map();
        // Needed for ReadBufferResponse: all the trace packets are split into
        // several slices. |partialPacket| is the buffer for them. Once we receive a
        // slice with the flag |lastSliceForPacket|, a new packet is created.
        this.partialPacket = [];
        // Accumulates trace packets into a proto trace file..
        this.traceProtoWriter = minimal$1.Writer.create();
        this.socketCommandQueue = [];
    }
    invoke(method, params) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            // ADB connection & authentication is handled by the superclass.
            console.assert(this.state === adb_base_controller.AdbConnectionState.CONNECTED);
            this.socketCommandQueue.push({ method, params });
            if (this.socketState === SocketState.BINDING_IN_PROGRESS)
                return;
            if (this.socketState === SocketState.DISCONNECTED) {
                this.socketState = SocketState.BINDING_IN_PROGRESS;
                yield this.listenForMessages();
                yield this.bind();
                this.traceProtoWriter = minimal$1.Writer.create();
                this.socketState = SocketState.BOUND;
            }
            console.assert(this.socketState === SocketState.BOUND);
            for (const cmd of this.socketCommandQueue) {
                this.invokeInternal(cmd.method, cmd.params);
            }
            this.socketCommandQueue = [];
        });
    }
    invokeInternal(method, argsProto) {
        // Socket is bound in invoke().
        console.assert(this.socketState === SocketState.BOUND);
        const requestId = this.requestId++;
        const methodId = this.findMethodId(method);
        if (methodId === undefined) {
            // This can happen with 'GetTraceStats': it seems that not all the Android
            // <= 9 devices support it.
            console.error(`Method ${method} not supported by the target`);
            return;
        }
        const frame = new protos.perfetto.protos.IPCFrame({
            requestId,
            msgInvokeMethod: new protos.perfetto.protos.IPCFrame.InvokeMethod({ serviceId: this.serviceId, methodId, argsProto }),
        });
        this.requestMethods.set(requestId, method);
        this.sendFrame(frame);
        if (method === 'EnableTracing')
            this.setDurationStatus(argsProto);
    }
    static generateFrameBufferToSend(frame) {
        const frameProto = protos.perfetto.protos.IPCFrame.encode(frame).finish();
        const frameLen = frameProto.length;
        const buf = new Uint8Array(WIRE_PROTOCOL_HEADER_SIZE + frameLen);
        const dv = new DataView(buf.buffer);
        dv.setUint32(0, frameProto.length, /* littleEndian */ true);
        for (let i = 0; i < frameLen; i++) {
            dv.setUint8(WIRE_PROTOCOL_HEADER_SIZE + i, frameProto[i]);
        }
        return buf;
    }
    sendFrame(frame) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            console.assert(this.socket !== undefined);
            if (!this.socket)
                return;
            const buf = AdbSocketConsumerPort.generateFrameBufferToSend(frame);
            yield this.socket.write(buf);
        });
    }
    listenForMessages() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            this.socket = yield this.adb.socket(TRACED_SOCKET);
            this.socket.onData = (raw) => this.handleReceivedData(raw);
            this.socket.onClose = () => {
                this.socketState = SocketState.DISCONNECTED;
                this.socketCommandQueue = [];
            };
        });
    }
    parseMessageSize(buffer) {
        const dv = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);
        return dv.getUint32(0, true);
    }
    parseMessage(frameBuffer) {
        // Copy message to new array:
        const buf = new ArrayBuffer(frameBuffer.byteLength);
        const arr = new Uint8Array(buf);
        arr.set(frameBuffer);
        const frame = protos.perfetto.protos.IPCFrame.decode(arr);
        this.handleIncomingFrame(frame);
    }
    incompleteSizeHeader() {
        if (!this.frameToParseLen) {
            console.assert(this.incomingBufferLen < WIRE_PROTOCOL_HEADER_SIZE);
            return true;
        }
        return false;
    }
    canCompleteSizeHeader(newData) {
        return newData.length + this.incomingBufferLen > WIRE_PROTOCOL_HEADER_SIZE;
    }
    canParseFullMessage(newData) {
        return this.frameToParseLen &&
            this.incomingBufferLen + newData.length >= this.frameToParseLen;
    }
    appendToIncomingBuffer(array) {
        this.incomingBuffer.set(array, this.incomingBufferLen);
        this.incomingBufferLen += array.length;
    }
    handleReceivedData(newData) {
        if (this.incompleteSizeHeader() && this.canCompleteSizeHeader(newData)) {
            const newDataBytesToRead = WIRE_PROTOCOL_HEADER_SIZE - this.incomingBufferLen;
            // Add to the incoming buffer the remaining bytes to arrive at
            // WIRE_PROTOCOL_HEADER_SIZE
            this.appendToIncomingBuffer(newData.subarray(0, newDataBytesToRead));
            newData = newData.subarray(newDataBytesToRead);
            this.frameToParseLen = this.parseMessageSize(this.incomingBuffer);
            this.incomingBufferLen = 0;
        }
        // Parse all complete messages in incomingBuffer and newData.
        while (this.canParseFullMessage(newData)) {
            // All the message is in the newData buffer.
            if (this.incomingBufferLen === 0) {
                this.parseMessage(newData.subarray(0, this.frameToParseLen));
                newData = newData.subarray(this.frameToParseLen);
            }
            else { // We need to complete the local buffer.
                // Read the remaining part of this message.
                const bytesToCompleteMessage = this.frameToParseLen - this.incomingBufferLen;
                this.appendToIncomingBuffer(newData.subarray(0, bytesToCompleteMessage));
                this.parseMessage(this.incomingBuffer.subarray(0, this.frameToParseLen));
                this.incomingBufferLen = 0;
                // Remove the data just parsed.
                newData = newData.subarray(bytesToCompleteMessage);
            }
            this.frameToParseLen = 0;
            if (!this.canCompleteSizeHeader(newData))
                break;
            this.frameToParseLen =
                this.parseMessageSize(newData.subarray(0, WIRE_PROTOCOL_HEADER_SIZE));
            newData = newData.subarray(WIRE_PROTOCOL_HEADER_SIZE);
        }
        // Buffer the remaining data (part of the next header + message).
        this.appendToIncomingBuffer(newData);
    }
    decodeResponse(requestId, responseProto, hasMore = false) {
        const method = this.requestMethods.get(requestId);
        if (!method) {
            console.error(`Unknown request id: ${requestId}`);
            this.sendErrorMessage(`Wire protocol error.`);
            return;
        }
        const decoder = decoders.get(method);
        if (decoder === undefined) {
            console.error(`Unable to decode method: ${method}`);
            return;
        }
        const decodedResponse = decoder(responseProto);
        const response = Object.assign({ type: `${method}Response` }, decodedResponse);
        // TODO(nicomazz): Fix this.
        // We assemble all the trace and then send it back to the main controller.
        // This is a temporary solution, that will be changed in a following CL,
        // because now both the chrome consumer port and the other adb consumer port
        // send back the entire trace, while the correct behavior should be to send
        // back the slices, that are assembled by the main record controller.
        if ((0, consumer_port_types.isReadBuffersResponse)(response)) {
            if (response.slices)
                this.handleSlices(response.slices);
            if (!hasMore)
                this.sendReadBufferResponse();
            return;
        }
        this.sendMessage(response);
    }
    handleSlices(slices) {
        for (const slice of slices) {
            this.partialPacket.push(slice);
            if (slice.lastSliceForPacket) {
                const tracePacket = this.generateTracePacket(this.partialPacket);
                this.traceProtoWriter.uint32(TRACE_PACKET_PROTO_TAG);
                this.traceProtoWriter.bytes(tracePacket);
                this.partialPacket = [];
            }
        }
    }
    generateTracePacket(slices) {
        let bufferSize = 0;
        for (const slice of slices)
            bufferSize += slice.data.length;
        const fullBuffer = new Uint8Array(bufferSize);
        let written = 0;
        for (const slice of slices) {
            const data = slice.data;
            fullBuffer.set(data, written);
            written += data.length;
        }
        return fullBuffer;
    }
    sendReadBufferResponse() {
        this.sendMessage(this.generateChunkReadResponse(this.traceProtoWriter.finish(), /* last */ true));
        this.traceProtoWriter = minimal$1.Writer.create();
    }
    bind() {
        console.assert(this.socket !== undefined);
        const requestId = this.requestId++;
        const frame = new protos.perfetto.protos.IPCFrame({
            requestId,
            msgBindService: new protos.perfetto.protos.IPCFrame.BindService({ serviceName: 'ConsumerPort' }),
        });
        return new Promise((resolve, _) => {
            this.resolveBindingPromise = resolve;
            this.sendFrame(frame);
        });
    }
    findMethodId(method) {
        const methodObject = this.availableMethods.find((m) => m.name === method);
        if (methodObject && methodObject.id)
            return methodObject.id;
        return undefined;
    }
    static hasSocketAccess(device, adb) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            yield adb.connect(device);
            try {
                const socket = yield adb.socket(TRACED_SOCKET);
                socket.close();
                return true;
            }
            catch (e) {
                return false;
            }
        });
    }
    handleIncomingFrame(frame) {
        const requestId = frame.requestId;
        switch (frame.msg) {
            case 'msgBindServiceReply': {
                const msgBindServiceReply = frame.msgBindServiceReply;
                if (msgBindServiceReply && msgBindServiceReply.methods &&
                    msgBindServiceReply.serviceId) {
                    console.assert(msgBindServiceReply.success);
                    this.availableMethods = msgBindServiceReply.methods;
                    this.serviceId = msgBindServiceReply.serviceId;
                    this.resolveBindingPromise();
                    this.resolveBindingPromise = () => { };
                }
                return;
            }
            case 'msgInvokeMethodReply': {
                const msgInvokeMethodReply = frame.msgInvokeMethodReply;
                if (msgInvokeMethodReply && msgInvokeMethodReply.replyProto) {
                    if (!msgInvokeMethodReply.success) {
                        console.error('Unsuccessful method invocation: ', msgInvokeMethodReply);
                        return;
                    }
                    this.decodeResponse(requestId, msgInvokeMethodReply.replyProto, msgInvokeMethodReply.hasMore === true);
                }
                return;
            }
            default:
                console.error(`not recognized frame message: ${frame.msg}`);
        }
    }
}
exports.AdbSocketConsumerPort = AdbSocketConsumerPort;
const decoders = new Map()
    .set('EnableTracing', protos.perfetto.protos.EnableTracingResponse.decode)
    .set('FreeBuffers', protos.perfetto.protos.FreeBuffersResponse.decode)
    .set('ReadBuffers', protos.perfetto.protos.ReadBuffersResponse.decode)
    .set('DisableTracing', protos.perfetto.protos.DisableTracingResponse.decode)
    .set('GetTraceStats', protos.perfetto.protos.GetTraceStatsResponse.decode);

});

var record_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.RecordController = exports.toPbtxt = exports.genConfigProto = void 0;















function genConfigProto(uiCfg, target) {
    return protos_1.TraceConfig.encode(convertToRecordingV2Input(uiCfg, target)).finish();
}
exports.genConfigProto = genConfigProto;
// This method converts the 'RecordingTarget' to the 'TargetInfo' used by V2 of
// the recording code. It is used so the logic is not duplicated and does not
// diverge.
// TODO(octaviant) delete this once we switch to RecordingV2.
function convertToRecordingV2Input(uiCfg, target) {
    let targetType;
    let androidApiLevel;
    switch (target.os) {
        case 'L':
            targetType = 'LINUX';
            break;
        case 'C':
            targetType = 'CHROME';
            break;
        case 'CrOS':
            targetType = 'CHROME_OS';
            break;
        case 'S':
            androidApiLevel = 31;
            targetType = 'ANDROID';
            break;
        case 'R':
            androidApiLevel = 30;
            targetType = 'ANDROID';
            break;
        case 'Q':
            androidApiLevel = 29;
            targetType = 'ANDROID';
            break;
        case 'P':
            androidApiLevel = 28;
            targetType = 'ANDROID';
            break;
        default:
            androidApiLevel = 26;
            targetType = 'ANDROID';
    }
    let targetInfo;
    if (targetType === 'ANDROID') {
        targetInfo = {
            targetType,
            androidApiLevel,
            dataSources: [],
            name: '',
        };
    }
    else if (targetType === 'CHROME' || targetType === 'CHROME_OS') {
        targetInfo = {
            targetType,
            dataSources: [],
            name: '',
        };
    }
    else {
        targetInfo = { targetType, dataSources: [], name: '' };
    }
    return (0, recording_config_utils.genTraceConfig)(uiCfg, targetInfo);
}
function toPbtxt(configBuffer) {
    const msg = protos_1.TraceConfig.decode(configBuffer);
    const json = msg.toJSON();
    function snakeCase(s) {
        return s.replace(/[A-Z]/g, (c) => '_' + c.toLowerCase());
    }
    // With the ahead of time compiled protos we can't seem to tell which
    // fields are enums.
    function isEnum(value) {
        return value.startsWith('MEMINFO_') || value.startsWith('VMSTAT_') ||
            value.startsWith('STAT_') || value.startsWith('LID_') ||
            value.startsWith('BATTERY_COUNTER_') || value === 'DISCARD' ||
            value === 'RING_BUFFER';
    }
    // Since javascript doesn't have 64 bit numbers when converting protos to
    // json the proto library encodes them as strings. This is lossy since
    // we can't tell which strings that look like numbers are actually strings
    // and which are actually numbers. Ideally we would reflect on the proto
    // definition somehow but for now we just hard code keys which have this
    // problem in the config.
    function is64BitNumber(key) {
        return [
            'maxFileSizeBytes',
            'samplingIntervalBytes',
            'shmemSizeBytes',
            'pid',
        ].includes(key);
    }
    function* message(msg, indent) {
        for (const [key, value] of Object.entries(msg)) {
            const isRepeated = Array.isArray(value);
            const isNested = typeof value === 'object' && !isRepeated;
            for (const entry of (isRepeated ? value : [value])) {
                yield ' '.repeat(indent) + `${snakeCase(key)}${isNested ? '' : ':'} `;
                if (typeof entry === 'string') {
                    if (isEnum(entry) || is64BitNumber(key)) {
                        yield entry;
                    }
                    else {
                        yield `"${entry.replace(new RegExp('"', 'g'), '\\"')}"`;
                    }
                }
                else if (typeof entry === 'number') {
                    yield entry.toString();
                }
                else if (typeof entry === 'boolean') {
                    yield entry.toString();
                }
                else if (typeof entry === 'object' && entry !== null) {
                    yield '{\n';
                    yield* message(entry, indent + 4);
                    yield ' '.repeat(indent) + '}';
                }
                else {
                    throw new Error(`Record proto entry "${entry}" with unexpected type ${typeof entry}`);
                }
                yield '\n';
            }
        }
    }
    return [...message(json, 0)].join('');
}
exports.toPbtxt = toPbtxt;
class RecordController extends controller.Controller {
    constructor(args) {
        super('main');
        this.config = null;
        this.recordingInProgress = false;
        this.traceBuffer = [];
        this.adb = new adb.AdbOverWebUsb();
        this.recordedTraceSuffix = constants.TRACE_SUFFIX;
        this.fetchedCategories = false;
        // We have a different controller for each targetOS. The correct one will be
        // created when needed, and stored here. When the key is a string, it is the
        // serial of the target (used for android devices). When the key is a single
        // char, it is the 'targetOS'
        this.controllerPromises = new Map();
        this.app = args.app;
        this.consumerPort = protos_1.ConsumerPort.create(this.rpcImpl.bind(this));
        this.extensionPort = args.extensionPort;
    }
    run() {
        // TODO(eseckler): Use ConsumerPort's QueryServiceState instead
        // of posting a custom extension message to retrieve the category list.
        if (this.app.state.fetchChromeCategories && !this.fetchedCategories) {
            this.fetchedCategories = true;
            if (this.app.state.extensionInstalled) {
                this.extensionPort.postMessage({ method: 'GetCategories' });
            }
            globals$1.globals.dispatch(actions.Actions.setFetchChromeCategories({ fetch: false }));
        }
        if (this.app.state.recordConfig === this.config &&
            this.app.state.recordingInProgress === this.recordingInProgress) {
            return;
        }
        this.config = this.app.state.recordConfig;
        const configProto = genConfigProto(this.config, this.app.state.recordingTarget);
        const configProtoText = toPbtxt(configProto);
        const configProtoBase64 = (0, string_utils.base64Encode)(configProto);
        const commandline = `
      echo '${configProtoBase64}' |
      base64 --decode |
      adb shell "perfetto -c - -o /data/misc/perfetto-traces/trace" &&
      adb pull /data/misc/perfetto-traces/trace /tmp/trace
    `;
        const traceConfig = convertToRecordingV2Input(this.config, this.app.state.recordingTarget);
        // TODO(hjd): This should not be TrackData after we unify the stores.
        (0, publish.publishTrackData)({
            id: 'config',
            data: {
                commandline,
                pbBase64: configProtoBase64,
                pbtxt: configProtoText,
                traceConfig,
            },
        });
        // If the recordingInProgress boolean state is different, it means that we
        // have to start or stop recording a trace.
        if (this.app.state.recordingInProgress === this.recordingInProgress)
            return;
        this.recordingInProgress = this.app.state.recordingInProgress;
        if (this.recordingInProgress) {
            this.startRecordTrace(traceConfig);
        }
        else {
            this.stopRecordTrace();
        }
    }
    startRecordTrace(traceConfig) {
        this.scheduleBufferUpdateRequests();
        this.traceBuffer = [];
        this.consumerPort.enableTracing({ traceConfig });
    }
    stopRecordTrace() {
        if (this.bufferUpdateInterval)
            clearInterval(this.bufferUpdateInterval);
        this.consumerPort.disableTracing({});
    }
    scheduleBufferUpdateRequests() {
        if (this.bufferUpdateInterval)
            clearInterval(this.bufferUpdateInterval);
        this.bufferUpdateInterval = setInterval(() => {
            this.consumerPort.getTraceStats({});
        }, 200);
    }
    readBuffers() {
        this.consumerPort.readBuffers({});
    }
    onConsumerPortResponse(data) {
        if (data === undefined)
            return;
        if ((0, consumer_port_types.isReadBuffersResponse)(data)) {
            if (!data.slices || data.slices.length === 0)
                return;
            // TODO(nicomazz): handle this as intended by consumer_port.proto.
            console.assert(data.slices.length === 1);
            if (data.slices[0].data)
                this.traceBuffer.push(data.slices[0].data);
            // The line underneath is 'misusing' the format ReadBuffersResponse.
            // The boolean field 'lastSliceForPacket' is used as 'lastPacketInTrace'.
            // See http://shortn/_53WB8A1aIr.
            if (data.slices[0].lastSliceForPacket)
                this.onTraceComplete();
        }
        else if ((0, consumer_port_types.isEnableTracingResponse)(data)) {
            this.readBuffers();
        }
        else if ((0, consumer_port_types.isGetTraceStatsResponse)(data)) {
            const percentage = this.getBufferUsagePercentage(data);
            if (percentage) {
                (0, publish.publishBufferUsage)({ percentage });
            }
        }
        else if ((0, consumer_port_types.isFreeBuffersResponse)(data)) ;
        else if ((0, consumer_port_types.isDisableTracingResponse)(data)) ;
        else {
            console.error('Unrecognized consumer port response:', data);
        }
    }
    onTraceComplete() {
        this.consumerPort.freeBuffers({});
        globals$1.globals.dispatch(actions.Actions.setRecordingStatus({ status: undefined }));
        if (globals$1.globals.state.recordingCancelled) {
            globals$1.globals.dispatch(actions.Actions.setLastRecordingError({ error: 'Recording cancelled.' }));
            this.traceBuffer = [];
            return;
        }
        const trace = this.generateTrace();
        globals$1.globals.dispatch(actions.Actions.openTraceFromBuffer({
            title: 'Recorded trace',
            buffer: trace.buffer,
            fileName: `recorded_trace${this.recordedTraceSuffix}`,
        }));
        this.traceBuffer = [];
    }
    // TODO(nicomazz): stream each chunk into the trace processor, instead of
    // creating a big long trace.
    generateTrace() {
        let traceLen = 0;
        for (const chunk of this.traceBuffer)
            traceLen += chunk.length;
        const completeTrace = new Uint8Array(traceLen);
        let written = 0;
        for (const chunk of this.traceBuffer) {
            completeTrace.set(chunk, written);
            written += chunk.length;
        }
        return completeTrace;
    }
    getBufferUsagePercentage(data) {
        if (!data.traceStats || !data.traceStats.bufferStats)
            return 0.0;
        let maximumUsage = 0;
        for (const buffer of data.traceStats.bufferStats) {
            const used = buffer.bytesWritten;
            const total = buffer.bufferSize;
            maximumUsage = Math.max(maximumUsage, used / total);
        }
        return maximumUsage;
    }
    onError(message) {
        // TODO(octaviant): b/204998302
        console.error('Error in record controller: ', message);
        globals$1.globals.dispatch(actions.Actions.setLastRecordingError({ error: message.substr(0, 150) }));
        globals$1.globals.dispatch(actions.Actions.stopRecording({}));
    }
    onStatus(message) {
        globals$1.globals.dispatch(actions.Actions.setRecordingStatus({ status: message }));
    }
    // Depending on the recording target, different implementation of the
    // consumer_port will be used.
    // - Chrome target: This forwards the messages that have to be sent
    // to the extension to the frontend. This is necessary because this
    // controller is running in a separate worker, that can't directly send
    // messages to the extension.
    // - Android device target: WebUSB is used to communicate using the adb
    // protocol. Actually, there is no full consumer_port implementation, but
    // only the support to start tracing and fetch the file.
    getTargetController(target) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const identifier = RecordController.getTargetIdentifier(target);
            // The reason why caching the target 'record controller' Promise is that
            // multiple rcp calls can happen while we are trying to understand if an
            // android device has a socket connection available or not.
            const precedentPromise = this.controllerPromises.get(identifier);
            if (precedentPromise)
                return precedentPromise;
            const controllerPromise = new Promise((resolve, _) => tslib.__awaiter(this, void 0, void 0, function* () {
                let controller = undefined;
                if ((0, state.isChromeTarget)(target)) {
                    controller =
                        new chrome_proxy_record_controller.ChromeExtensionConsumerPort(this.extensionPort, this);
                }
                else if ((0, state.isAdbTarget)(target)) {
                    this.onStatus(`Please allow USB debugging on device.
                 If you press cancel, reload the page.`);
                    const socketAccess = yield this.hasSocketAccess(target);
                    controller = socketAccess ?
                        new adb_socket_controller.AdbSocketConsumerPort(this.adb, this) :
                        new adb_shell_controller.AdbConsumerPort(this.adb, this);
                }
                else {
                    throw Error(`No device connected`);
                }
                if (!controller)
                    throw Error(`Unknown target: ${target}`);
                resolve(controller);
            }));
            this.controllerPromises.set(identifier, controllerPromise);
            return controllerPromise;
        });
    }
    static getTargetIdentifier(target) {
        return (0, state.isAdbTarget)(target) ? target.serial : target.os;
    }
    hasSocketAccess(target) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const devices = yield navigator.usb.getDevices();
            const device = devices.find((d) => d.serialNumber === target.serial);
            console.assert(device);
            if (!device)
                return Promise.resolve(false);
            return adb_socket_controller.AdbSocketConsumerPort.hasSocketAccess(device, this.adb);
        });
    }
    rpcImpl(method, requestData, _callback) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            try {
                const state = this.app.state;
                // TODO(hjd): This is a bit weird. We implicity send each RPC message to
                // whichever target is currently selected (creating that target if needed)
                // it would be nicer if the setup/teardown was more explicit.
                const target = yield this.getTargetController(state.recordingTarget);
                this.recordedTraceSuffix = target.getRecordedTraceSuffix();
                target.handleCommand(method.name, requestData);
            }
            catch (e) {
                console.error(`error invoking ${method}: ${e.message}`);
            }
        });
    }
}
exports.RecordController = RecordController;

});

var cache_manager = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.tryGetTrace = exports.cacheTrace = void 0;

/**
 * This file deals with caching traces in the browser's Cache storage. The
 * traces are cached so that the UI can gracefully reload a trace when the tab
 * containing it is discarded by Chrome (e.g. because the tab was not used for
 * a long time) or when the user accidentally hits reload.
 */

const TRACE_CACHE_NAME = 'cached_traces';
const TRACE_CACHE_SIZE = 10;
let LAZY_CACHE = undefined;
// Occasionally operations using the cache API throw:
// 'UnknownError: Unexpected internal error. {}'
// It's not clear under which circumstances this can occur. A dive of
// the Chromium code didn't shed much light:
// https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/cache_storage/cache_storage_error.cc;l=26;drc=4cfe86482b000e848009077783ba35f83f3c3cfe
// https://source.chromium.org/chromium/chromium/src/+/main:content/browser/cache_storage/cache_storage_cache.cc;l=1686;drc=ab68c05beb790d04d1cb7fd8faa0a197fb40d399
// Given the error is not actionable at present and caching is 'best
// effort' in any case ignore this error. We will want to throw for
// errors in general though so as not to hide errors we actually could
// fix.
// See b/227785665 for an example.
function ignoreNonActionableErrors(e, result) {
    if ((0, errors.getErrorMessage)(e).includes('UnknownError')) {
        return result;
    }
    else {
        throw e;
    }
}
function getCache() {
    return tslib.__awaiter(this, void 0, void 0, function* () {
        if (self.caches === undefined) {
            // The browser doesn't support cache storage or the page is opened from
            // a non-secure origin.
            return undefined;
        }
        if (LAZY_CACHE !== undefined) {
            return LAZY_CACHE;
        }
        LAZY_CACHE = yield caches.open(TRACE_CACHE_NAME);
        return LAZY_CACHE;
    });
}
function cacheDelete(key) {
    return tslib.__awaiter(this, void 0, void 0, function* () {
        try {
            const cache = yield getCache();
            if (cache === undefined)
                return false; // Cache storage not supported.
            return cache.delete(key);
        }
        catch (e) {
            return ignoreNonActionableErrors(e, false);
        }
    });
}
function cachePut(key, value) {
    return tslib.__awaiter(this, void 0, void 0, function* () {
        try {
            const cache = yield getCache();
            if (cache === undefined)
                return; // Cache storage not supported.
            cache.put(key, value);
        }
        catch (e) {
            ignoreNonActionableErrors(e, undefined);
        }
    });
}
function cacheMatch(key) {
    return tslib.__awaiter(this, void 0, void 0, function* () {
        try {
            const cache = yield getCache();
            if (cache === undefined)
                return undefined; // Cache storage not supported.
            return cache.match(key);
        }
        catch (e) {
            return ignoreNonActionableErrors(e, undefined);
        }
    });
}
function cacheKeys() {
    return tslib.__awaiter(this, void 0, void 0, function* () {
        try {
            const cache = yield getCache();
            if (cache === undefined)
                return []; // Cache storage not supported.
            return cache.keys();
        }
        catch (e) {
            return ignoreNonActionableErrors(e, []);
        }
    });
}
function cacheTrace(traceSource, traceUuid) {
    return tslib.__awaiter(this, void 0, void 0, function* () {
        let trace;
        let title = '';
        let fileName = '';
        let url = '';
        let contentLength = 0;
        let localOnly = false;
        switch (traceSource.type) {
            case 'ARRAY_BUFFER':
                trace = traceSource.buffer;
                title = traceSource.title;
                fileName = traceSource.fileName || '';
                url = traceSource.url || '';
                contentLength = traceSource.buffer.byteLength;
                localOnly = traceSource.localOnly || false;
                break;
            case 'FILE':
                trace = yield traceSource.file.arrayBuffer();
                title = traceSource.file.name;
                contentLength = traceSource.file.size;
                break;
            default:
                return false;
        }
        const headers = new Headers([
            ['x-trace-title', title],
            ['x-trace-url', url],
            ['x-trace-filename', fileName],
            ['x-trace-local-only', `${localOnly}`],
            ['content-type', 'application/octet-stream'],
            ['content-length', `${contentLength}`],
            [
                'expires',
                // Expires in a week from now (now = upload time)
                (new Date((new Date()).getTime() + (1000 * 60 * 60 * 24 * 7)))
                    .toUTCString(),
            ],
        ]);
        yield deleteStaleEntries();
        yield cachePut(`/_${TRACE_CACHE_NAME}/${traceUuid}`, new Response(trace, { headers }));
        return true;
    });
}
exports.cacheTrace = cacheTrace;
function tryGetTrace(traceUuid) {
    return tslib.__awaiter(this, void 0, void 0, function* () {
        yield deleteStaleEntries();
        const response = yield cacheMatch(`/_${TRACE_CACHE_NAME}/${traceUuid}`);
        if (!response)
            return undefined;
        return {
            type: 'ARRAY_BUFFER',
            buffer: yield response.arrayBuffer(),
            title: response.headers.get('x-trace-title') || '',
            fileName: response.headers.get('x-trace-filename') || undefined,
            url: response.headers.get('x-trace-url') || undefined,
            uuid: traceUuid,
            localOnly: response.headers.get('x-trace-local-only') === 'true',
        };
    });
}
exports.tryGetTrace = tryGetTrace;
function deleteStaleEntries() {
    return tslib.__awaiter(this, void 0, void 0, function* () {
        // Loop through stored traces and invalidate all but the most recent
        // TRACE_CACHE_SIZE.
        const keys = yield cacheKeys();
        const storedTraces = [];
        const now = new Date();
        const deletions = [];
        for (const key of keys) {
            const existingTrace = yield cacheMatch(key);
            if (existingTrace === undefined) {
                continue;
            }
            const expires = existingTrace.headers.get('expires');
            if (expires === undefined || expires === null) {
                // Missing `expires`, so give up and delete which is better than
                // keeping it around forever.
                deletions.push(cacheDelete(key));
                continue;
            }
            const expiryDate = new Date(expires);
            if (expiryDate < now) {
                deletions.push(cacheDelete(key));
            }
            else {
                storedTraces.push({ key, date: expiryDate });
            }
        }
        // Sort the traces descending by time, such that most recent ones are placed
        // at the beginning. Then, take traces from TRACE_CACHE_SIZE onwards and
        // delete them from cache.
        const oldTraces = storedTraces.sort((a, b) => b.date.getTime() - a.date.getTime())
            .slice(TRACE_CACHE_SIZE);
        for (const oldTrace of oldTraces) {
            deletions.push(cacheDelete(oldTrace.key));
        }
        // TODO(hjd): Wrong Promise.all here, should use the one that
        // ignores failures but need to upgrade TypeScript for that.
        yield Promise.all(deletions);
    });
}

});

var proto_ring_buffer = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.ProtoRingBuffer = void 0;

// This class is the TypeScript equivalent of the identically-named C++ class in
// //protozero/proto_ring_buffer.h. See comments in that header for a detailed
// description. The architecture is identical.
const kGrowBytes = 128 * 1024;
const kMaxMsgSize = 64 * 1024 * 1024;
class ProtoRingBuffer {
    constructor() {
        this.buf = new Uint8Array(kGrowBytes);
        this.rd = 0;
        this.wr = 0;
    }
    // The caller must call ReadMessage() after each append() call.
    // The |data| might be either copied in the internal ring buffer or returned
    // (% subarray()) to the next ReadMessage() call.
    append(data) {
        (0, logging.assertTrue)(this.wr <= this.buf.length);
        (0, logging.assertTrue)(this.rd <= this.wr);
        // If the last call to ReadMessage() consumed all the data in the buffer and
        // there are no incomplete messages pending, restart from the beginning
        // rather than keep ringing. This is the most common case.
        if (this.rd === this.wr) {
            this.rd = this.wr = 0;
        }
        // The caller is expected to issue a ReadMessage() after each append().
        const dataLen = data.length;
        if (dataLen === 0)
            return;
        (0, logging.assertTrue)(this.fastpath === undefined);
        if (this.rd === this.wr) {
            const msg = ProtoRingBuffer.tryReadMessage(data, 0, dataLen);
            if (msg !== undefined &&
                ((msg.byteOffset + msg.length) === (data.byteOffset + dataLen))) {
                // Fastpath: in many cases, the underlying stream will effectively
                // preserve the atomicity of messages for most small messages.
                // In this case we can avoid the extra buffer roundtrip and return the
                // original array (actually a subarray that skips the proto header).
                // The next call to ReadMessage() will return this.
                this.fastpath = msg;
                return;
            }
        }
        let avail = this.buf.length - this.wr;
        if (dataLen > avail) {
            // This whole section should be hit extremely rarely.
            // Try first just recompacting the buffer by moving everything to the
            // left. This can happen if we received "a message and a bit" on each
            // append() call.
            this.buf.copyWithin(0, this.rd, this.wr);
            avail += this.rd;
            this.wr -= this.rd;
            this.rd = 0;
            if (dataLen > avail) {
                // Still not enough, expand the buffer.
                let newSize = this.buf.length;
                while (dataLen > newSize - this.wr) {
                    newSize += kGrowBytes;
                }
                (0, logging.assertTrue)(newSize <= kMaxMsgSize * 2);
                const newBuf = new Uint8Array(newSize);
                newBuf.set(this.buf);
                this.buf = newBuf;
                // No need to touch rd / wr.
            }
        }
        // Append the received data at the end of the ring buffer.
        this.buf.set(data, this.wr);
        this.wr += dataLen;
    }
    // Tries to extract a message from the ring buffer. If there is no message,
    // or if the current message is still incomplete, returns undefined.
    // The caller is expected to call this in a loop until it returns undefined.
    // Note that a single write to Append() can yield more than one message
    // (see ProtoRingBufferTest.CoalescingStream in the unittest).
    readMessage() {
        if (this.fastpath !== undefined) {
            (0, logging.assertTrue)(this.rd === this.wr);
            const msg = this.fastpath;
            this.fastpath = undefined;
            return msg;
        }
        (0, logging.assertTrue)(this.rd <= this.wr);
        if (this.rd >= this.wr) {
            return undefined; // Completely empty.
        }
        const msg = ProtoRingBuffer.tryReadMessage(this.buf, this.rd, this.wr);
        if (msg === undefined)
            return undefined;
        (0, logging.assertTrue)(msg.buffer === this.buf.buffer);
        (0, logging.assertTrue)(this.buf.byteOffset === 0);
        this.rd = msg.byteOffset + msg.length;
        // Deliberately returning a copy of the data with slice(). In various cases
        // (streaming query response) the caller will hold onto the returned buffer.
        // If we get to this point, |msg| is a view of the circular buffer that we
        // will overwrite on the next calls to append().
        return msg.slice();
    }
    static tryReadMessage(data, dataStart, dataEnd) {
        (0, logging.assertTrue)(dataEnd <= data.length);
        let pos = dataStart;
        if (pos >= dataEnd)
            return undefined;
        const tag = data[pos++]; // Assume one-byte tag.
        if (tag >= 0x80 || (tag & 0x07) !== 2 /* len delimited */) {
            throw new Error(`RPC framing error, unexpected tag ${tag} @ offset ${pos - 1}`);
        }
        let len = 0;
        for (let shift = 0; /* no check */; shift += 7) {
            if (pos >= dataEnd) {
                return undefined; // Not enough data to read varint.
            }
            const val = data[pos++];
            len |= ((val & 0x7f) << shift) >>> 0;
            if (val < 0x80)
                break;
        }
        if (len >= kMaxMsgSize) {
            throw new Error(`RPC framing error, message too large (${len} > ${kMaxMsgSize}`);
        }
        const end = pos + len;
        if (end > dataEnd)
            return undefined;
        // This is a subarray() and not a slice() because in the |fastpath| case
        // we want to just return the original buffer pushed by append().
        // In the slow-path (ring-buffer) case, the readMessage() above will create
        // a copy via slice() before returning it.
        return data.subarray(pos, end);
    }
}
exports.ProtoRingBuffer = ProtoRingBuffer;

});

var engine = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.EngineProxy = exports.Engine = exports.NullLoadingTracker = void 0;







const query_result_2 = query_result;

var TraceProcessorRpc = protos.perfetto.protos.TraceProcessorRpc;
var TraceProcessorRpcStream = protos.perfetto.protos.TraceProcessorRpcStream;
var TPM = protos.perfetto.protos.TraceProcessorRpc.TraceProcessorMethod;
class NullLoadingTracker {
    beginLoading() { }
    endLoading() { }
}
exports.NullLoadingTracker = NullLoadingTracker;
// Abstract interface of a trace proccessor.
// This is the TypeScript equivalent of src/trace_processor/rpc.h.
// There are two concrete implementations:
//   1. WasmEngineProxy: creates a Wasm module and interacts over postMessage().
//   2. HttpRpcEngine: connects to an external `trace_processor_shell --httpd`.
//      and interacts via fetch().
// In both cases, we have a byte-oriented pipe to interact with TraceProcessor.
// The derived class is only expected to deal with these two functions:
// 1. Implement the abstract rpcSendRequestBytes() function, sending the
//    proto-encoded TraceProcessorRpc requests to the TraceProcessor instance.
// 2. Call onRpcResponseBytes() when response data is received.
class Engine {
    constructor(tracker) {
        this.txSeqId = 0;
        this.rxSeqId = 0;
        this.rxBuf = new proto_ring_buffer.ProtoRingBuffer();
        this.pendingParses = new Array();
        this.pendingEOFs = new Array();
        this.pendingQueries = new Array();
        this.pendingRestoreTables = new Array();
        this.pendingComputeMetrics = new Array();
        this._isMetatracingEnabled = false;
        this.loadingTracker = tracker ? tracker : new NullLoadingTracker();
    }
    // Called when an inbound message is received by the Engine implementation
    // (e.g. onmessage for the Wasm case, on when HTTP replies are received for
    // the HTTP+RPC case).
    onRpcResponseBytes(dataWillBeRetained) {
        // Note: when hitting the fastpath inside ProtoRingBuffer, the |data| buffer
        // is returned back by readMessage() (% subarray()-ing it) and held onto by
        // other classes (e.g., QueryResult). For both fetch() and Wasm we are fine
        // because every response creates a new buffer.
        this.rxBuf.append(dataWillBeRetained);
        for (;;) {
            const msg = this.rxBuf.readMessage();
            if (msg === undefined)
                break;
            this.onRpcResponseMessage(msg);
        }
    }
    // Parses a response message.
    // |rpcMsgEncoded| is a sub-array to to the start of a TraceProcessorRpc
    // proto-encoded message (without the proto preamble and varint size).
    onRpcResponseMessage(rpcMsgEncoded) {
        // Here we override the protobufjs-generated code to skip the parsing of the
        // new streaming QueryResult and instead passing it through like a buffer.
        // This is the overall problem: All trace processor responses are wrapped
        // into a perfetto.protos.TraceProcessorRpc proto message. In all cases %
        // TPM_QUERY_STREAMING, we want protobufjs to decode the proto bytes and
        // give us a structured object. In the case of TPM_QUERY_STREAMING, instead,
        // we want to deal with the proto parsing ourselves using the new
        // QueryResult.appendResultBatch() method, because that handled streaming
        // results more efficiently and skips several copies.
        // By overriding the decode method below, we achieve two things:
        // 1. We avoid protobufjs decoding the TraceProcessorRpc.query_result field.
        // 2. We stash (a view of) the original buffer into the |rawQueryResult| so
        //    the `case TPM_QUERY_STREAMING` below can take it.
        protos.perfetto.protos.QueryResult.decode =
            (reader, length) => {
                const res = protos.perfetto.protos.QueryResult.create();
                res.rawQueryResult =
                    reader.buf.subarray(reader.pos, reader.pos + length);
                // All this works only if protobufjs returns the original ArrayBuffer
                // from |rpcMsgEncoded|. It should be always the case given the
                // current implementation. This check mainly guards against future
                // behavioral changes of protobufjs. We don't want to accidentally
                // hold onto some internal protobufjs buffer. We are fine holding
                // onto |rpcMsgEncoded| because those come from ProtoRingBuffer which
                // is buffer-retention-friendly.
                (0, logging.assertTrue)(res.rawQueryResult.buffer === rpcMsgEncoded.buffer);
                reader.pos += length;
                return res;
            };
        const rpc = TraceProcessorRpc.decode(rpcMsgEncoded);
        if (rpc.fatalError !== undefined && rpc.fatalError.length > 0) {
            throw new Error(`${rpc.fatalError}`);
        }
        // Allow restarting sequences from zero (when reloading the browser).
        if (rpc.seq !== this.rxSeqId + 1 && this.rxSeqId !== 0 && rpc.seq !== 0) {
            // "(ERR:rpc_seq)" is intercepted by error_dialog.ts to show a more
            // graceful and actionable error.
            throw new Error(`RPC sequence id mismatch cur=${rpc.seq} last=${this.rxSeqId} (ERR:rpc_seq)`);
        }
        this.rxSeqId = rpc.seq;
        let isFinalResponse = true;
        switch (rpc.response) {
            case TPM.TPM_APPEND_TRACE_DATA:
                const appendResult = (0, logging.assertExists)(rpc.appendResult);
                const pendingPromise = (0, logging.assertExists)(this.pendingParses.shift());
                if (appendResult.error && appendResult.error.length > 0) {
                    pendingPromise.reject(appendResult.error);
                }
                else {
                    pendingPromise.resolve();
                }
                break;
            case TPM.TPM_FINALIZE_TRACE_DATA:
                (0, logging.assertExists)(this.pendingEOFs.shift()).resolve();
                break;
            case TPM.TPM_RESTORE_INITIAL_TABLES:
                (0, logging.assertExists)(this.pendingRestoreTables.shift()).resolve();
                break;
            case TPM.TPM_QUERY_STREAMING:
                const qRes = (0, logging.assertExists)(rpc.queryResult);
                const pendingQuery = (0, logging.assertExists)(this.pendingQueries[0]);
                pendingQuery.appendResultBatch(qRes.rawQueryResult);
                if (pendingQuery.isComplete()) {
                    this.pendingQueries.shift();
                }
                else {
                    isFinalResponse = false;
                }
                break;
            case TPM.TPM_COMPUTE_METRIC:
                const metricRes = (0, logging.assertExists)(rpc.metricResult);
                const pendingComputeMetric = (0, logging.assertExists)(this.pendingComputeMetrics.shift());
                if (metricRes.error && metricRes.error.length > 0) {
                    const error = new query_result_2.QueryError(`ComputeMetric() error: ${metricRes.error}`, {
                        query: 'COMPUTE_METRIC',
                    });
                    pendingComputeMetric.reject(error);
                }
                else {
                    pendingComputeMetric.resolve(metricRes);
                }
                break;
            case TPM.TPM_DISABLE_AND_READ_METATRACE:
                const metatraceRes = (0, logging.assertExists)(rpc.metatrace);
                (0, logging.assertExists)(this.pendingReadMetatrace).resolve(metatraceRes);
                this.pendingReadMetatrace = undefined;
                break;
            default:
                console.log('Unexpected TraceProcessor response received: ', rpc.response);
                break;
        } // switch(rpc.response);
        if (isFinalResponse) {
            this.loadingTracker.endLoading();
        }
    }
    // TraceProcessor methods below this point.
    // The methods below are called by the various controllers in the UI and
    // deal with marshalling / unmarshaling requests to/from TraceProcessor.
    // Push trace data into the engine. The engine is supposed to automatically
    // figure out the type of the trace (JSON vs Protobuf).
    parse(data) {
        const asyncRes = (0, deferred.defer)();
        this.pendingParses.push(asyncRes);
        const rpc = TraceProcessorRpc.create();
        rpc.request = TPM.TPM_APPEND_TRACE_DATA;
        rpc.appendTraceData = data;
        this.rpcSendRequest(rpc);
        return asyncRes; // Linearize with the worker.
    }
    // Notify the engine that we reached the end of the trace.
    // Called after the last parse() call.
    notifyEof() {
        const asyncRes = (0, deferred.defer)();
        this.pendingEOFs.push(asyncRes);
        const rpc = TraceProcessorRpc.create();
        rpc.request = TPM.TPM_FINALIZE_TRACE_DATA;
        this.rpcSendRequest(rpc);
        return asyncRes; // Linearize with the worker.
    }
    // Resets the trace processor state by destroying any table/views created by
    // the UI after loading.
    restoreInitialTables() {
        const asyncRes = (0, deferred.defer)();
        this.pendingRestoreTables.push(asyncRes);
        const rpc = TraceProcessorRpc.create();
        rpc.request = TPM.TPM_RESTORE_INITIAL_TABLES;
        this.rpcSendRequest(rpc);
        return asyncRes; // Linearize with the worker.
    }
    // Shorthand for sending a compute metrics request to the engine.
    computeMetric(metrics) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const asyncRes = (0, deferred.defer)();
            this.pendingComputeMetrics.push(asyncRes);
            const rpc = TraceProcessorRpc.create();
            rpc.request = TPM.TPM_COMPUTE_METRIC;
            const args = rpc.computeMetricArgs = new protos_1.ComputeMetricArgs();
            args.metricNames = metrics;
            args.format = protos_1.ComputeMetricArgs.ResultFormat.TEXTPROTO;
            this.rpcSendRequest(rpc);
            return asyncRes;
        });
    }
    // Issues a streaming query and retrieve results in batches.
    // The returned QueryResult object will be populated over time with batches
    // of rows (each batch conveys ~128KB of data and a variable number of rows).
    // The caller can decide whether to wait that all batches have been received
    // (by awaiting the returned object or calling result.waitAllRows()) or handle
    // the rows incrementally.
    //
    // Example usage:
    // const res = engine.query('SELECT foo, bar FROM table');
    // console.log(res.numRows());  // Will print 0 because we didn't await.
    // await(res.waitAllRows());
    // console.log(res.numRows());  // Will print the total number of rows.
    //
    // for (const it = res.iter({foo: NUM, bar:STR}); it.valid(); it.next()) {
    //   console.log(it.foo, it.bar);
    // }
    //
    // Optional |tag| (usually a component name) can be provided to allow
    // attributing trace processor workload to different UI components.
    query(sqlQuery, tag) {
        const rpc = TraceProcessorRpc.create();
        rpc.request = TPM.TPM_QUERY_STREAMING;
        rpc.queryArgs = new protos_1.QueryArgs();
        rpc.queryArgs.sqlQuery = sqlQuery;
        if (tag) {
            rpc.queryArgs.tag = tag;
        }
        const result = (0, query_result_2.createQueryResult)({
            query: sqlQuery,
        });
        this.pendingQueries.push(result);
        this.rpcSendRequest(rpc);
        return result;
    }
    isMetatracingEnabled() {
        return this._isMetatracingEnabled;
    }
    enableMetatrace(categories) {
        const rpc = TraceProcessorRpc.create();
        rpc.request = TPM.TPM_ENABLE_METATRACE;
        if (categories) {
            rpc.enableMetatraceArgs = new protos.perfetto.protos.EnableMetatraceArgs();
            rpc.enableMetatraceArgs.categories = categories;
        }
        this._isMetatracingEnabled = true;
        this.rpcSendRequest(rpc);
    }
    stopAndGetMetatrace() {
        // If we are already finalising a metatrace, ignore the request.
        if (this.pendingReadMetatrace) {
            return Promise.reject(new Error('Already finalising a metatrace'));
        }
        const result = (0, deferred.defer)();
        const rpc = TraceProcessorRpc.create();
        rpc.request = TPM.TPM_DISABLE_AND_READ_METATRACE;
        this._isMetatracingEnabled = false;
        this.pendingReadMetatrace = result;
        this.rpcSendRequest(rpc);
        return result;
    }
    // Marshals the TraceProcessorRpc request arguments and sends the request
    // to the concrete Engine (Wasm or HTTP).
    rpcSendRequest(rpc) {
        rpc.seq = this.txSeqId++;
        // Each message is wrapped in a TraceProcessorRpcStream to add the varint
        // preamble with the size, which allows tokenization on the other end.
        const outerProto = TraceProcessorRpcStream.create();
        outerProto.msg.push(rpc);
        const buf = TraceProcessorRpcStream.encode(outerProto).finish();
        this.loadingTracker.beginLoading();
        this.rpcSendRequestBytes(buf);
    }
    // TODO(hjd): When streaming must invalidate this somehow.
    getCpus() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            if (!this._cpus) {
                const cpus = [];
                const queryRes = yield this.query('select distinct(cpu) as cpu from sched order by cpu;');
                for (const it = queryRes.iter({ cpu: query_result.NUM }); it.valid(); it.next()) {
                    cpus.push(it.cpu);
                }
                this._cpus = cpus;
            }
            return this._cpus;
        });
    }
    getNumberOfGpus() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            if (!this._numGpus) {
                const result = yield this.query(`
        select count(distinct(gpu_id)) as gpuCount
        from gpu_counter_track
        where name = 'gpufreq';
      `);
                this._numGpus = result.firstRow({ gpuCount: query_result.NUM }).gpuCount;
            }
            return this._numGpus;
        });
    }
    // TODO: This should live in code that's more specific to chrome, instead of
    // in engine.
    getNumberOfProcesses() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const result = yield this.query('select count(*) as cnt from process;');
            return result.firstRow({ cnt: query_result.NUM }).cnt;
        });
    }
    getTraceTimeBounds() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const result = yield this.query(`select start_ts as startTs, end_ts as endTs from trace_bounds`);
            const bounds = result.firstRow({
                startTs: query_result.NUM,
                endTs: query_result.NUM,
            });
            return new time.TimeSpan(bounds.startTs / 1e9, bounds.endTs / 1e9);
        });
    }
    getTracingMetadataTimeBounds() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const queryRes = yield this.query(`select
         name,
         int_value as intValue
         from metadata
         where name = 'tracing_started_ns' or name = 'tracing_disabled_ns'
         or name = 'all_data_source_started_ns'`);
            let startBound = -Infinity;
            let endBound = Infinity;
            const it = queryRes.iter({ 'name': query_result.STR, 'intValue': query_result.NUM_NULL });
            for (; it.valid(); it.next()) {
                const columnName = it.name;
                const timestamp = it.intValue;
                if (timestamp === null)
                    continue;
                if (columnName === 'tracing_disabled_ns') {
                    endBound = Math.min(endBound, timestamp / 1e9);
                }
                else {
                    startBound = Math.max(startBound, timestamp / 1e9);
                }
            }
            return new time.TimeSpan(startBound, endBound);
        });
    }
    getProxy(tag) {
        return new EngineProxy(this, tag);
    }
}
exports.Engine = Engine;
// Lightweight wrapper over Engine exposing only `query` method and annotating
// all queries going through it with a tag.
class EngineProxy {
    constructor(engine, tag) {
        this.engine = engine;
        this.tag = tag;
    }
    query(sqlQuery, tag) {
        return this.engine.query(sqlQuery, tag || this.tag);
    }
}
exports.EngineProxy = EngineProxy;

});

var http_rpc_engine = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.HttpRpcEngine = exports.WS_URL = exports.RPC_URL = void 0;





exports.RPC_URL = 'http://127.0.0.1:9001/';
exports.WS_URL = 'ws://127.0.0.1:9001/websocket';
const RPC_CONNECT_TIMEOUT_MS = 2000;
class HttpRpcEngine extends engine.Engine {
    constructor(id, loadingTracker) {
        super(loadingTracker);
        this.errorHandler = () => { };
        this.requestQueue = new Array();
        this.connected = false;
        this.id = id;
    }
    rpcSendRequestBytes(data) {
        if (this.websocket === undefined) {
            this.websocket = new WebSocket(exports.WS_URL);
            this.websocket.onopen = () => this.onWebsocketConnected();
            this.websocket.onmessage = (e) => this.onWebsocketMessage(e);
            this.websocket.onclose = (e) => this.errorHandler(`Websocket closed (${e.code}: ${e.reason})`);
            this.websocket.onerror = (e) => this.errorHandler(`WebSocket error: ${e}`);
        }
        if (this.connected) {
            this.websocket.send(data);
        }
        else {
            this.requestQueue.push(data); // onWebsocketConnected() will flush this.
        }
    }
    onWebsocketConnected() {
        for (;;) {
            const queuedMsg = this.requestQueue.shift();
            if (queuedMsg === undefined)
                break;
            (0, logging.assertExists)(this.websocket).send(queuedMsg);
        }
        this.connected = true;
    }
    onWebsocketMessage(e) {
        (0, logging.assertExists)(e.data).arrayBuffer().then((buf) => {
            super.onRpcResponseBytes(new Uint8Array(buf));
        });
    }
    static checkConnection() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const httpRpcState = { connected: false };
            console.info(`It's safe to ignore the ERR_CONNECTION_REFUSED on ${exports.RPC_URL} below. ` +
                `That might happen while probing the external native accelerator. The ` +
                `error is non-fatal and unlikely to be the culprit for any UI bug.`);
            try {
                const resp = yield (0, http_utils.fetchWithTimeout)(exports.RPC_URL + 'status', { method: 'post', cache: 'no-cache' }, RPC_CONNECT_TIMEOUT_MS);
                if (resp.status !== 200) {
                    httpRpcState.failure = `${resp.status} - ${resp.statusText}`;
                }
                else {
                    const buf = new Uint8Array(yield resp.arrayBuffer());
                    httpRpcState.connected = true;
                    httpRpcState.status = protos_1.StatusResult.decode(buf);
                }
            }
            catch (err) {
                httpRpcState.failure = `${err}`;
            }
            return httpRpcState;
        });
    }
}
exports.HttpRpcEngine = HttpRpcEngine;

});

var wasm_engine_proxy = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.WasmEngineProxy = exports.resetEngineWorker = exports.initWasm = void 0;


let bundlePath;
let idleWasmWorker;
let activeWasmWorker;
function initWasm(root) {
    bundlePath = root + 'engine_bundle.js';
    idleWasmWorker = new Worker(bundlePath);
}
exports.initWasm = initWasm;
// This method is called trace_controller whenever a new trace is loaded.
function resetEngineWorker() {
    const channel = new MessageChannel();
    const port = channel.port1;
    // We keep always an idle worker around, the first one is created by the
    // main() below, so we can hide the latency of the Wasm initialization.
    if (activeWasmWorker !== undefined) {
        activeWasmWorker.terminate();
    }
    // Swap the active worker with the idle one and create a new idle worker
    // for the next trace.
    activeWasmWorker = (0, logging.assertExists)(idleWasmWorker);
    const msg = { enginePort: port };
    activeWasmWorker.postMessage(msg, [port]);
    idleWasmWorker = new Worker(bundlePath);
    return channel.port2;
}
exports.resetEngineWorker = resetEngineWorker;
/**
 * This implementation of Engine uses a WASM backend hosted in a separate
 * worker thread.
 */
class WasmEngineProxy extends engine.Engine {
    constructor(id, port, loadingTracker) {
        super(loadingTracker);
        this.id = id;
        this.port = port;
        this.port.onmessage = this.onMessage.bind(this);
    }
    onMessage(m) {
        (0, logging.assertTrue)(m.data instanceof Uint8Array);
        super.onRpcResponseBytes(m.data);
    }
    rpcSendRequestBytes(data) {
        // We deliberately don't use a transfer list because protobufjs reuses the
        // same buffer when encoding messages (which is good, because creating a new
        // TypedArray for each decode operation would be too expensive).
        this.port.postMessage(data);
    }
}
exports.WasmEngineProxy = WasmEngineProxy;

});

var aggregation_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AggregationController = void 0;






function isStringColumn(column) {
    return column.kind === 'STRING' || column.kind === 'STATE';
}
class AggregationController extends controller.Controller {
    constructor(args) {
        super('main');
        this.args = args;
        this.requestingData = false;
        this.queuedRequest = false;
        this.kind = this.args.kind;
        this.areaSelectionHandler = new area_selection_handler.AreaSelectionHandler();
    }
    run() {
        const selection = globals$1.globals.state.currentSelection;
        if (selection === null || selection.kind !== 'AREA') {
            (0, publish.publishAggregateData)({
                data: {
                    tabName: this.getTabName(),
                    columns: [],
                    strings: [],
                    columnSums: [],
                },
                kind: this.args.kind,
            });
            return;
        }
        const aggregatePreferences = globals$1.globals.state.aggregatePreferences[this.args.kind];
        const sortingChanged = aggregatePreferences &&
            this.previousSorting !== aggregatePreferences.sorting;
        const [hasAreaChanged, area] = this.areaSelectionHandler.getAreaChange();
        if ((!hasAreaChanged && !sortingChanged) || !area)
            return;
        if (this.requestingData) {
            this.queuedRequest = true;
        }
        else {
            this.requestingData = true;
            if (sortingChanged)
                this.previousSorting = aggregatePreferences.sorting;
            this.getAggregateData(area, hasAreaChanged)
                .then((data) => (0, publish.publishAggregateData)({ data, kind: this.args.kind }))
                .finally(() => {
                this.requestingData = false;
                if (this.queuedRequest) {
                    this.queuedRequest = false;
                    this.run();
                }
            });
        }
    }
    getAggregateData(area, areaChanged) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            if (areaChanged) {
                const viewExists = yield this.createAggregateView(this.args.engine, area);
                if (!viewExists) {
                    return {
                        tabName: this.getTabName(),
                        columns: [],
                        strings: [],
                        columnSums: [],
                    };
                }
            }
            const defs = this.getColumnDefinitions();
            const colIds = defs.map((col) => col.columnId);
            const pref = globals$1.globals.state.aggregatePreferences[this.kind];
            let sorting = `${this.getDefaultSorting().column} ${this.getDefaultSorting().direction}`;
            if (pref && pref.sorting) {
                sorting = `${pref.sorting.column} ${pref.sorting.direction}`;
            }
            const query = `select ${colIds} from ${this.kind} order by ${sorting}`;
            const result = yield this.args.engine.query(query);
            const numRows = result.numRows();
            const columns = defs.map((def) => this.columnFromColumnDef(def, numRows));
            const columnSums = yield Promise.all(defs.map((def) => this.getSum(def)));
            const extraData = yield this.getExtra(this.args.engine, area);
            const extra = extraData ? extraData : undefined;
            const data = { tabName: this.getTabName(), columns, columnSums, strings: [], extra };
            const stringIndexes = new Map();
            function internString(str) {
                let idx = stringIndexes.get(str);
                if (idx !== undefined)
                    return idx;
                idx = data.strings.length;
                data.strings.push(str);
                stringIndexes.set(str, idx);
                return idx;
            }
            const it = result.iter({});
            for (let i = 0; it.valid(); it.next(), ++i) {
                for (const column of data.columns) {
                    const item = it.get(column.columnId);
                    if (item === null) {
                        column.data[i] = isStringColumn(column) ? internString('NULL') : 0;
                    }
                    else if (typeof item === 'string') {
                        column.data[i] = internString(item);
                    }
                    else {
                        column.data[i] = item;
                    }
                }
            }
            return data;
        });
    }
    getSum(def) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            if (!def.sum)
                return '';
            const result = yield this.args.engine.query(`select ifnull(sum(${def.columnId}), 0) as s from ${this.kind}`);
            let sum = result.firstRow({ s: query_result.NUM }).s;
            if (def.kind === 'TIMESTAMP_NS') {
                sum = sum / 1e6;
            }
            return `${sum}`;
        });
    }
    columnFromColumnDef(def, numRows) {
        // TODO(hjd): The Column type should be based on the
        // ColumnDef type or vice versa to avoid this cast.
        return {
            title: def.title,
            kind: def.kind,
            data: new def.columnConstructor(numRows),
            columnId: def.columnId,
        };
    }
}
exports.AggregationController = AggregationController;

});

var counter_aggregation_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.CounterAggregationController = void 0;





class CounterAggregationController extends aggregation_controller.AggregationController {
    createAggregateView(engine, area) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            yield engine.query(`drop view if exists ${this.kind};`);
            const ids = [];
            for (const trackId of area.tracks) {
                const track = globals$1.globals.state.tracks[trackId];
                // Track will be undefined for track groups.
                if (track !== undefined && track.kind === counter.COUNTER_TRACK_KIND) {
                    const config = track.config;
                    // TODO(hjd): Also aggregate annotation (with namespace) counters.
                    if (config.namespace === undefined) {
                        ids.push(config.trackId);
                    }
                }
            }
            if (ids.length === 0)
                return false;
            const query = `create view ${this.kind} as select
    name,
    count(1) as count,
    round(sum(weighted_value)/${(0, time.toNs)(area.endSec) - (0, time.toNs)(area.startSec)}, 2) as avg_value,
    last as last_value,
    first as first_value,
    max(last) - min(first) as delta_value,
    round((max(last) - min(first))/${area.endSec - area.startSec}, 2) as rate,
    min(value) as min_value,
    max(value) as max_value
    from
        (select *,
        (min(ts + dur, ${(0, time.toNs)(area.endSec)}) - max(ts,${(0, time.toNs)(area.startSec)}))
        * value as weighted_value,
        first_value(value) over
        (partition by track_id order by ts) as first,
        last_value(value) over
        (partition by track_id order by ts
            range between unbounded preceding and unbounded following) as last
        from experimental_counter_dur
        where track_id in (${ids})
        and ts + dur >= ${(0, time.toNs)(area.startSec)} and
        ts <= ${(0, time.toNs)(area.endSec)})
    join counter_track
    on track_id = counter_track.id
    group by track_id`;
            yield engine.query(query);
            return true;
        });
    }
    getColumnDefinitions() {
        return [
            {
                title: 'Name',
                kind: 'STRING',
                columnConstructor: Uint16Array,
                columnId: 'name',
            },
            {
                title: 'Delta value',
                kind: 'NUMBER',
                columnConstructor: Float64Array,
                columnId: 'delta_value',
            },
            {
                title: 'Rate /s',
                kind: 'Number',
                columnConstructor: Float64Array,
                columnId: 'rate',
            },
            {
                title: 'Weighted avg value',
                kind: 'Number',
                columnConstructor: Float64Array,
                columnId: 'avg_value',
            },
            {
                title: 'Count',
                kind: 'Number',
                columnConstructor: Float64Array,
                columnId: 'count',
                sum: true,
            },
            {
                title: 'First value',
                kind: 'NUMBER',
                columnConstructor: Float64Array,
                columnId: 'first_value',
            },
            {
                title: 'Last value',
                kind: 'NUMBER',
                columnConstructor: Float64Array,
                columnId: 'last_value',
            },
            {
                title: 'Min value',
                kind: 'NUMBER',
                columnConstructor: Float64Array,
                columnId: 'min_value',
            },
            {
                title: 'Max value',
                kind: 'NUMBER',
                columnConstructor: Float64Array,
                columnId: 'max_value',
            },
        ];
    }
    getExtra() {
        return tslib.__awaiter(this, void 0, void 0, function* () { });
    }
    getTabName() {
        return 'Counters';
    }
    getDefaultSorting() {
        return { column: 'name', direction: 'DESC' };
    }
}
exports.CounterAggregationController = CounterAggregationController;

});

var cpu_aggregation_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.CpuAggregationController = void 0;





class CpuAggregationController extends aggregation_controller.AggregationController {
    createAggregateView(engine, area) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            yield engine.query(`drop view if exists ${this.kind};`);
            const selectedCpus = [];
            for (const trackId of area.tracks) {
                const track = globals$1.globals.state.tracks[trackId];
                // Track will be undefined for track groups.
                if (track !== undefined && track.kind === cpu_slices.CPU_SLICE_TRACK_KIND) {
                    selectedCpus.push(track.config.cpu);
                }
            }
            if (selectedCpus.length === 0)
                return false;
            const query = `create view ${this.kind} as
        SELECT process.name as process_name, pid, thread.name as thread_name,
        tid, sum(dur) AS total_dur,
        sum(dur)/count(1) as avg_dur,
        count(1) as occurrences
        FROM process
        JOIN thread USING(upid)
        JOIN thread_state USING(utid)
        WHERE cpu IN (${selectedCpus}) AND
        state = "Running" AND
        thread_state.ts + thread_state.dur > ${(0, time.toNs)(area.startSec)} AND
        thread_state.ts < ${(0, time.toNs)(area.endSec)} group by utid`;
            yield engine.query(query);
            return true;
        });
    }
    getTabName() {
        return 'CPU by thread';
    }
    getExtra() {
        return tslib.__awaiter(this, void 0, void 0, function* () { });
    }
    getDefaultSorting() {
        return { column: 'total_dur', direction: 'DESC' };
    }
    getColumnDefinitions() {
        return [
            {
                title: 'Process',
                kind: 'STRING',
                columnConstructor: Uint16Array,
                columnId: 'process_name',
            },
            {
                title: 'PID',
                kind: 'NUMBER',
                columnConstructor: Uint16Array,
                columnId: 'pid',
            },
            {
                title: 'Thread',
                kind: 'STRING',
                columnConstructor: Uint16Array,
                columnId: 'thread_name',
            },
            {
                title: 'TID',
                kind: 'NUMBER',
                columnConstructor: Uint16Array,
                columnId: 'tid',
            },
            {
                title: 'Wall duration (ms)',
                kind: 'TIMESTAMP_NS',
                columnConstructor: Float64Array,
                columnId: 'total_dur',
                sum: true,
            },
            {
                title: 'Avg Wall duration (ms)',
                kind: 'TIMESTAMP_NS',
                columnConstructor: Float64Array,
                columnId: 'avg_dur',
            },
            {
                title: 'Occurrences',
                kind: 'NUMBER',
                columnConstructor: Uint16Array,
                columnId: 'occurrences',
                sum: true,
            },
        ];
    }
}
exports.CpuAggregationController = CpuAggregationController;

});

var cpu_by_process_aggregation_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.CpuByProcessAggregationController = void 0;





class CpuByProcessAggregationController extends aggregation_controller.AggregationController {
    createAggregateView(engine, area) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            yield engine.query(`drop view if exists ${this.kind};`);
            const selectedCpus = [];
            for (const trackId of area.tracks) {
                const track = globals$1.globals.state.tracks[trackId];
                // Track will be undefined for track groups.
                if (track !== undefined && track.kind === cpu_slices.CPU_SLICE_TRACK_KIND) {
                    selectedCpus.push(track.config.cpu);
                }
            }
            if (selectedCpus.length === 0)
                return false;
            const query = `create view ${this.kind} as
        SELECT process.name as process_name, pid,
        sum(dur) AS total_dur,
        sum(dur)/count(1) as avg_dur,
        count(1) as occurrences
        FROM process
        JOIN thread USING(upid)
        JOIN thread_state USING(utid)
        WHERE cpu IN (${selectedCpus}) AND
        state = "Running" AND
        thread_state.ts + thread_state.dur > ${(0, time.toNs)(area.startSec)} AND
        thread_state.ts < ${(0, time.toNs)(area.endSec)} group by upid`;
            yield engine.query(query);
            return true;
        });
    }
    getTabName() {
        return 'CPU by process';
    }
    getExtra() {
        return tslib.__awaiter(this, void 0, void 0, function* () { });
    }
    getDefaultSorting() {
        return { column: 'total_dur', direction: 'DESC' };
    }
    getColumnDefinitions() {
        return [
            {
                title: 'Process',
                kind: 'STRING',
                columnConstructor: Uint16Array,
                columnId: 'process_name',
            },
            {
                title: 'PID',
                kind: 'NUMBER',
                columnConstructor: Uint16Array,
                columnId: 'pid',
            },
            {
                title: 'Wall duration (ms)',
                kind: 'TIMESTAMP_NS',
                columnConstructor: Float64Array,
                columnId: 'total_dur',
                sum: true,
            },
            {
                title: 'Avg Wall duration (ms)',
                kind: 'TIMESTAMP_NS',
                columnConstructor: Float64Array,
                columnId: 'avg_dur',
            },
            {
                title: 'Occurrences',
                kind: 'NUMBER',
                columnConstructor: Uint16Array,
                columnId: 'occurrences',
                sum: true,
            },
        ];
    }
}
exports.CpuByProcessAggregationController = CpuByProcessAggregationController;

});

var frame_aggregation_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.FrameAggregationController = void 0;





class FrameAggregationController extends aggregation_controller.AggregationController {
    createAggregateView(engine, area) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            yield engine.query(`drop view if exists ${this.kind};`);
            const selectedSqlTrackIds = [];
            for (const trackId of area.tracks) {
                const track = globals$1.globals.state.tracks[trackId];
                // Track will be undefined for track groups.
                if (track !== undefined &&
                    track.kind === actual_frames.ACTUAL_FRAMES_SLICE_TRACK_KIND) {
                    selectedSqlTrackIds.push(track.config.trackIds);
                }
            }
            if (selectedSqlTrackIds.length === 0)
                return false;
            const query = `create view ${this.kind} as
        SELECT
        jank_type,
        count(1) as occurrences,
        MIN(dur) as minDur,
        AVG(dur) as meanDur,
        MAX(dur) as maxDur
        FROM actual_frame_timeline_slice
        WHERE track_id IN (${selectedSqlTrackIds}) AND
        ts + dur > ${(0, time.toNs)(area.startSec)} AND
        ts < ${(0, time.toNs)(area.endSec)} group by jank_type`;
            yield engine.query(query);
            return true;
        });
    }
    getTabName() {
        return 'Frames';
    }
    getExtra() {
        return tslib.__awaiter(this, void 0, void 0, function* () { });
    }
    getDefaultSorting() {
        return { column: 'occurrences', direction: 'DESC' };
    }
    getColumnDefinitions() {
        return [
            {
                title: 'Jank Type',
                kind: 'STRING',
                columnConstructor: Uint16Array,
                columnId: 'jank_type',
            },
            {
                title: 'Min duration',
                kind: 'NUMBER',
                columnConstructor: Uint16Array,
                columnId: 'minDur',
            },
            {
                title: 'Max duration',
                kind: 'NUMBER',
                columnConstructor: Uint16Array,
                columnId: 'maxDur',
            },
            {
                title: 'Mean duration',
                kind: 'NUMBER',
                columnConstructor: Uint16Array,
                columnId: 'meanDur',
            },
            {
                title: 'Occurrences',
                kind: 'NUMBER',
                columnConstructor: Uint16Array,
                columnId: 'occurrences',
                sum: true,
            },
        ];
    }
}
exports.FrameAggregationController = FrameAggregationController;

});

var slice_aggregation_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.SliceAggregationController = exports.getSelectedTrackIds = void 0;






function getSelectedTrackIds(area) {
    const selectedTrackIds = [];
    for (const trackId of area.tracks) {
        const track = globals$1.globals.state.tracks[trackId];
        // Track will be undefined for track groups.
        if (track !== undefined) {
            if (track.kind === chrome_slices.SLICE_TRACK_KIND) {
                selectedTrackIds.push(track.config.trackId);
            }
            if (track.kind === async_slices.ASYNC_SLICE_TRACK_KIND) {
                const config = track.config;
                for (const id of config.trackIds) {
                    selectedTrackIds.push(id);
                }
            }
        }
    }
    return selectedTrackIds;
}
exports.getSelectedTrackIds = getSelectedTrackIds;
class SliceAggregationController extends aggregation_controller.AggregationController {
    createAggregateView(engine, area) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            yield engine.query(`drop view if exists ${this.kind};`);
            const selectedTrackIds = getSelectedTrackIds(area);
            if (selectedTrackIds.length === 0)
                return false;
            const query = `create view ${this.kind} as
        SELECT
        name,
        sum(dur) AS total_dur,
        sum(dur)/count(1) as avg_dur,
        count(1) as occurrences
        FROM slices
        WHERE track_id IN (${selectedTrackIds}) AND
        ts + dur > ${(0, time.toNs)(area.startSec)} AND
        ts < ${(0, time.toNs)(area.endSec)} group by name`;
            yield engine.query(query);
            return true;
        });
    }
    getTabName() {
        return 'Slices';
    }
    getExtra() {
        return tslib.__awaiter(this, void 0, void 0, function* () { });
    }
    getDefaultSorting() {
        return { column: 'total_dur', direction: 'DESC' };
    }
    getColumnDefinitions() {
        return [
            {
                title: 'Name',
                kind: 'STRING',
                columnConstructor: Uint32Array,
                columnId: 'name',
            },
            {
                title: 'Wall duration (ms)',
                kind: 'TIMESTAMP_NS',
                columnConstructor: Float64Array,
                columnId: 'total_dur',
                sum: true,
            },
            {
                title: 'Avg Wall duration (ms)',
                kind: 'TIMESTAMP_NS',
                columnConstructor: Float64Array,
                columnId: 'avg_dur',
            },
            {
                title: 'Occurrences',
                kind: 'NUMBER',
                columnConstructor: Uint32Array,
                columnId: 'occurrences',
                sum: true,
            },
        ];
    }
}
exports.SliceAggregationController = SliceAggregationController;

});

var thread_aggregation_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.ThreadAggregationController = void 0;







class ThreadAggregationController extends aggregation_controller.AggregationController {
    setThreadStateUtids(tracks) {
        this.utids = [];
        for (const trackId of tracks) {
            const track = globals$1.globals.state.tracks[trackId];
            // Track will be undefined for track groups.
            if (track !== undefined && track.kind === thread_state$1.THREAD_STATE_TRACK_KIND) {
                this.utids.push(track.config.utid);
            }
        }
    }
    createAggregateView(engine, area) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            yield engine.query(`drop view if exists ${this.kind};`);
            this.setThreadStateUtids(area.tracks);
            if (this.utids === undefined || this.utids.length === 0)
                return false;
            const query = `
      create view ${this.kind} as
      SELECT
        process.name as process_name,
        pid,
        thread.name as thread_name,
        tid,
        state || ',' || IFNULL(io_wait, 'NULL') as concat_state,
        sum(dur) AS total_dur,
        sum(dur)/count(1) as avg_dur,
        count(1) as occurrences
      FROM process
      JOIN thread USING(upid)
      JOIN thread_state USING(utid)
      WHERE utid IN (${this.utids}) AND
      thread_state.ts + thread_state.dur > ${(0, time.toNs)(area.startSec)} AND
      thread_state.ts < ${(0, time.toNs)(area.endSec)}
      GROUP BY utid, concat_state
    `;
            yield engine.query(query);
            return true;
        });
    }
    getExtra(engine, area) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            this.setThreadStateUtids(area.tracks);
            if (this.utids === undefined || this.utids.length === 0)
                return;
            const query = `select state, io_wait as ioWait, sum(dur) as totalDur from process
      JOIN thread USING(upid)
      JOIN thread_state USING(utid)
      WHERE utid IN (${this.utids}) AND thread_state.ts + thread_state.dur > ${(0, time.toNs)(area.startSec)} AND
      thread_state.ts < ${(0, time.toNs)(area.endSec)}
      GROUP BY state, io_wait`;
            const result = yield engine.query(query);
            const it = result.iter({
                state: query_result.STR_NULL,
                ioWait: query_result.NUM_NULL,
                totalDur: query_result.NUM,
            });
            const summary = {
                kind: 'THREAD_STATE',
                states: [],
                values: new Float64Array(result.numRows()),
                totalMs: 0,
            };
            summary.totalMs = 0;
            for (let i = 0; it.valid(); ++i, it.next()) {
                const state = it.state == null ? undefined : it.state;
                const ioWait = it.ioWait === null ? undefined : it.ioWait > 0;
                summary.states.push((0, thread_state.translateState)(state, ioWait));
                const ms = it.totalDur / 1000000;
                summary.values[i] = ms;
                summary.totalMs += ms;
            }
            return summary;
        });
    }
    getColumnDefinitions() {
        return [
            {
                title: 'Process',
                kind: 'STRING',
                columnConstructor: Uint16Array,
                columnId: 'process_name',
            },
            {
                title: 'PID',
                kind: 'NUMBER',
                columnConstructor: Uint16Array,
                columnId: 'pid',
            },
            {
                title: 'Thread',
                kind: 'STRING',
                columnConstructor: Uint16Array,
                columnId: 'thread_name',
            },
            {
                title: 'TID',
                kind: 'NUMBER',
                columnConstructor: Uint16Array,
                columnId: 'tid',
            },
            {
                title: 'State',
                kind: 'STATE',
                columnConstructor: Uint16Array,
                columnId: 'concat_state',
            },
            {
                title: 'Wall duration (ms)',
                kind: 'TIMESTAMP_NS',
                columnConstructor: Float64Array,
                columnId: 'total_dur',
                sum: true,
            },
            {
                title: 'Avg Wall duration (ms)',
                kind: 'TIMESTAMP_NS',
                columnConstructor: Float64Array,
                columnId: 'avg_dur',
            },
            {
                title: 'Occurrences',
                kind: 'NUMBER',
                columnConstructor: Uint16Array,
                columnId: 'occurrences',
                sum: true,
            },
        ];
    }
    getTabName() {
        return 'Thread States';
    }
    getDefaultSorting() {
        return { column: 'total_dur', direction: 'DESC' };
    }
}
exports.ThreadAggregationController = ThreadAggregationController;

});

var cpu_profile_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.CpuProfileController = void 0;





class CpuProfileController extends controller.Controller {
    constructor(args) {
        super('main');
        this.args = args;
        this.requestingData = false;
        this.queuedRunRequest = false;
    }
    run() {
        const selection = globals$1.globals.state.currentSelection;
        if (!selection || selection.kind !== 'CPU_PROFILE_SAMPLE') {
            return;
        }
        const selectedSample = selection;
        if (!this.shouldRequestData(selectedSample)) {
            return;
        }
        if (this.requestingData) {
            this.queuedRunRequest = true;
            return;
        }
        this.requestingData = true;
        (0, publish.publishCpuProfileDetails)({});
        this.lastSelectedSample = this.copyCpuProfileSample(selection);
        this.getSampleData(selectedSample.id)
            .then((sampleData) => {
            if (sampleData !== undefined && selectedSample &&
                this.lastSelectedSample &&
                this.lastSelectedSample.id === selectedSample.id) {
                const cpuProfileDetails = {
                    id: selectedSample.id,
                    ts: selectedSample.ts,
                    utid: selectedSample.utid,
                    stack: sampleData,
                };
                (0, publish.publishCpuProfileDetails)(cpuProfileDetails);
            }
        })
            .finally(() => {
            this.requestingData = false;
            if (this.queuedRunRequest) {
                this.queuedRunRequest = false;
                this.run();
            }
        });
    }
    copyCpuProfileSample(cpuProfileSample) {
        return {
            kind: cpuProfileSample.kind,
            id: cpuProfileSample.id,
            utid: cpuProfileSample.utid,
            ts: cpuProfileSample.ts,
        };
    }
    shouldRequestData(selection) {
        return this.lastSelectedSample === undefined ||
            (this.lastSelectedSample !== undefined &&
                (this.lastSelectedSample.id !== selection.id));
    }
    getSampleData(id) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            // The goal of the query is to get all the frames of
            // the callstack at the callsite given by |id|. To do this, it does
            // the following:
            // 1. Gets the leaf callsite id for the sample given by |id|.
            // 2. For this callsite, get all the frame ids and depths
            //    for the frame and all ancestors in the callstack.
            // 3. For each frame, get the mapping name (i.e. library which
            //    contains the frame).
            // 4. Symbolize each frame using the symbol table if possible.
            // 5. Sort the query by the depth of the callstack frames.
            const sampleQuery = `
      SELECT
        samples.id as id,
        IFNULL(
          (
            SELECT name
            FROM stack_profile_symbol symbol
            WHERE symbol.symbol_set_id = spf.symbol_set_id
            LIMIT 1
          ),
          spf.name
        ) AS name,
        spm.name AS mapping
      FROM cpu_profile_stack_sample AS samples
      LEFT JOIN (
        SELECT
          id,
          frame_id,
          depth
        FROM stack_profile_callsite
        UNION ALL
        SELECT
          leaf.id AS id,
          callsite.frame_id AS frame_id,
          callsite.depth AS depth
        FROM stack_profile_callsite leaf
        JOIN experimental_ancestor_stack_profile_callsite(leaf.id) AS callsite
      ) AS callsites
        ON samples.callsite_id = callsites.id
      LEFT JOIN stack_profile_frame AS spf
        ON callsites.frame_id = spf.id
      LEFT JOIN stack_profile_mapping AS spm
        ON spf.mapping = spm.id
      WHERE samples.id = ${id}
      ORDER BY callsites.depth;
    `;
            const callsites = yield this.args.engine.query(sampleQuery);
            if (callsites.numRows() === 0) {
                return undefined;
            }
            const it = callsites.iter({
                id: query_result.NUM,
                name: query_result.STR,
                mapping: query_result.STR,
            });
            const sampleData = [];
            for (; it.valid(); it.next()) {
                sampleData.push({
                    id: it.id,
                    totalSize: 0,
                    depth: 0,
                    parentId: 0,
                    name: it.name,
                    selfSize: 0,
                    mapping: it.mapping,
                    merged: false,
                    highlighted: false,
                });
            }
            return sampleData;
        });
    }
}
exports.CpuProfileController = CpuProfileController;

});

var flow_events_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use size file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.FlowEventsController = void 0;








const SHOW_INDIRECT_PRECEDING_FLOWS_FLAG = feature_flags.featureFlags.register({
    id: 'showIndirectPrecedingFlows',
    name: 'Show indirect preceding flows',
    description: 'Show indirect preceding flows (connected through ancestor ' +
        'slices) when a slice is selected.',
    defaultValue: false,
});
class FlowEventsController extends controller.Controller {
    constructor(args) {
        super('main');
        this.args = args;
        this.lastSelectedKind = 'NONE';
        // Create |CHROME_CUSTOME_SLICE_NAME| helper, which combines slice name
        // and args for some slices (scheduler tasks and mojo messages) for more
        // helpful messages.
        // In the future, it should be replaced with this a more scalable and
        // customisable solution.
        // Note that a function here is significantly faster than a join.
        this.args.engine.query(`
      SELECT CREATE_FUNCTION(
        'CHROME_CUSTOM_SLICE_NAME(slice_id LONG)',
        'STRING',
        'select case
           when name="Receive mojo message" then
            printf("Receive mojo message (interface=%s, hash=%s)",
              EXTRACT_ARG(arg_set_id,
                          "chrome_mojo_event_info.mojo_interface_tag"),
              EXTRACT_ARG(arg_set_id, "chrome_mojo_event_info.ipc_hash"))
           when name="ThreadControllerImpl::RunTask" or
                name="ThreadPool_RunTask" then
            printf("RunTask(posted_from=%s:%s)",
             EXTRACT_ARG(arg_set_id, "task.posted_from.file_name"),
             EXTRACT_ARG(arg_set_id, "task.posted_from.function_name"))
         end
         from slice where id=$slice_id'
    );`);
    }
    queryFlowEvents(query, callback) {
        this.args.engine.query(query).then((result) => {
            const flows = [];
            const it = result.iter({
                beginSliceId: query_result.NUM,
                beginTrackId: query_result.NUM,
                beginSliceName: query_result.STR_NULL,
                beginSliceChromeCustomName: query_result.STR_NULL,
                beginSliceCategory: query_result.STR_NULL,
                beginSliceStartTs: query_result.NUM,
                beginSliceEndTs: query_result.NUM,
                beginDepth: query_result.NUM,
                beginThreadName: query_result.STR_NULL,
                beginProcessName: query_result.STR_NULL,
                endSliceId: query_result.NUM,
                endTrackId: query_result.NUM,
                endSliceName: query_result.STR_NULL,
                endSliceChromeCustomName: query_result.STR_NULL,
                endSliceCategory: query_result.STR_NULL,
                endSliceStartTs: query_result.NUM,
                endSliceEndTs: query_result.NUM,
                endDepth: query_result.NUM,
                endThreadName: query_result.STR_NULL,
                endProcessName: query_result.STR_NULL,
                name: query_result.STR_NULL,
                category: query_result.STR_NULL,
                id: query_result.NUM,
            });
            for (; it.valid(); it.next()) {
                const beginSliceId = it.beginSliceId;
                const beginTrackId = it.beginTrackId;
                const beginSliceName = it.beginSliceName === null ? 'NULL' : it.beginSliceName;
                const beginSliceChromeCustomName = it.beginSliceChromeCustomName === null ?
                    undefined :
                    it.beginSliceChromeCustomName;
                const beginSliceCategory = it.beginSliceCategory === null ? 'NULL' : it.beginSliceCategory;
                const beginSliceStartTs = (0, time.fromNs)(it.beginSliceStartTs);
                const beginSliceEndTs = (0, time.fromNs)(it.beginSliceEndTs);
                const beginDepth = it.beginDepth;
                const beginThreadName = it.beginThreadName === null ? 'NULL' : it.beginThreadName;
                const beginProcessName = it.beginProcessName === null ? 'NULL' : it.beginProcessName;
                const endSliceId = it.endSliceId;
                const endTrackId = it.endTrackId;
                const endSliceName = it.endSliceName === null ? 'NULL' : it.endSliceName;
                const endSliceChromeCustomName = it.endSliceChromeCustomName === null ?
                    undefined :
                    it.endSliceChromeCustomName;
                const endSliceCategory = it.endSliceCategory === null ? 'NULL' : it.endSliceCategory;
                const endSliceStartTs = (0, time.fromNs)(it.endSliceStartTs);
                const endSliceEndTs = (0, time.fromNs)(it.endSliceEndTs);
                const endDepth = it.endDepth;
                const endThreadName = it.endThreadName === null ? 'NULL' : it.endThreadName;
                const endProcessName = it.endProcessName === null ? 'NULL' : it.endProcessName;
                // Category and name present only in version 1 flow events
                // It is most likelly NULL for all other versions
                const category = it.category === null ? undefined : it.category;
                const name = it.name === null ? undefined : it.name;
                const id = it.id;
                flows.push({
                    id,
                    begin: {
                        trackId: beginTrackId,
                        sliceId: beginSliceId,
                        sliceName: beginSliceName,
                        sliceChromeCustomName: beginSliceChromeCustomName,
                        sliceCategory: beginSliceCategory,
                        sliceStartTs: beginSliceStartTs,
                        sliceEndTs: beginSliceEndTs,
                        depth: beginDepth,
                        threadName: beginThreadName,
                        processName: beginProcessName,
                    },
                    end: {
                        trackId: endTrackId,
                        sliceId: endSliceId,
                        sliceName: endSliceName,
                        sliceChromeCustomName: endSliceChromeCustomName,
                        sliceCategory: endSliceCategory,
                        sliceStartTs: endSliceStartTs,
                        sliceEndTs: endSliceEndTs,
                        depth: endDepth,
                        threadName: endThreadName,
                        processName: endProcessName,
                    },
                    dur: endSliceStartTs - beginSliceEndTs,
                    category,
                    name,
                });
            }
            callback(flows);
        });
    }
    sliceSelected(sliceId) {
        if (this.lastSelectedKind === 'CHROME_SLICE' &&
            this.lastSelectedSliceId === sliceId) {
            return;
        }
        this.lastSelectedSliceId = sliceId;
        this.lastSelectedKind = 'CHROME_SLICE';
        const connectedFlows = SHOW_INDIRECT_PRECEDING_FLOWS_FLAG.get() ?
            `(
           select * from directly_connected_flow(${sliceId})
           union
           select * from preceding_flow(${sliceId})
         )` :
            `directly_connected_flow(${sliceId})`;
        const query = `
    select
      f.slice_out as beginSliceId,
      t1.track_id as beginTrackId,
      t1.name as beginSliceName,
      CHROME_CUSTOM_SLICE_NAME(t1.slice_id) as beginSliceChromeCustomName,
      t1.category as beginSliceCategory,
      t1.ts as beginSliceStartTs,
      (t1.ts+t1.dur) as beginSliceEndTs,
      t1.depth as beginDepth,
      (thread_out.name || ' ' || thread_out.tid) as beginThreadName,
      (process_out.name || ' ' || process_out.pid) as beginProcessName,
      f.slice_in as endSliceId,
      t2.track_id as endTrackId,
      t2.name as endSliceName,
      CHROME_CUSTOM_SLICE_NAME(t2.slice_id) as endSliceChromeCustomName,
      t2.category as endSliceCategory,
      t2.ts as endSliceStartTs,
      (t2.ts+t2.dur) as endSliceEndTs,
      t2.depth as endDepth,
      (thread_in.name || ' ' || thread_in.tid) as endThreadName,
      (process_in.name || ' ' || process_in.pid) as endProcessName,
      extract_arg(f.arg_set_id, 'cat') as category,
      extract_arg(f.arg_set_id, 'name') as name,
      f.id as id
    from ${connectedFlows} f
    join slice t1 on f.slice_out = t1.slice_id
    join slice t2 on f.slice_in = t2.slice_id
    left join thread_track track_out on track_out.id = t1.track_id
    left join thread thread_out on thread_out.utid = track_out.utid
    left join thread_track track_in on track_in.id = t2.track_id
    left join thread thread_in on thread_in.utid = track_in.utid
    left join process process_out on process_out.upid = thread_out.upid
    left join process process_in on process_in.upid = thread_in.upid
    `;
        this.queryFlowEvents(query, (flows) => (0, publish.publishConnectedFlows)(flows));
    }
    areaSelected(areaId) {
        const area = globals$1.globals.state.areas[areaId];
        if (this.lastSelectedKind === 'AREA' && this.lastSelectedArea &&
            this.lastSelectedArea.tracks.join(',') === area.tracks.join(',') &&
            this.lastSelectedArea.endSec === area.endSec &&
            this.lastSelectedArea.startSec === area.startSec) {
            return;
        }
        this.lastSelectedArea = area;
        this.lastSelectedKind = 'AREA';
        const trackIds = [];
        for (const uiTrackId of area.tracks) {
            const track = globals$1.globals.state.tracks[uiTrackId];
            if (track === undefined) {
                continue;
            }
            if (track.kind === chrome_slices.SLICE_TRACK_KIND) {
                trackIds.push(track.config.trackId);
            }
            else if (track.kind === actual_frames.ACTUAL_FRAMES_SLICE_TRACK_KIND) {
                const actualConfig = track.config;
                for (const trackId of actualConfig.trackIds) {
                    trackIds.push(trackId);
                }
            }
        }
        const tracks = `(${trackIds.join(',')})`;
        const startNs = (0, time.toNs)(area.startSec);
        const endNs = (0, time.toNs)(area.endSec);
        const query = `
    select
      f.slice_out as beginSliceId,
      t1.track_id as beginTrackId,
      t1.name as beginSliceName,
      CHROME_CUSTOM_SLICE_NAME(t1.slice_id) as beginSliceChromeCustomName,
      t1.category as beginSliceCategory,
      t1.ts as beginSliceStartTs,
      (t1.ts+t1.dur) as beginSliceEndTs,
      t1.depth as beginDepth,
      NULL as beginThreadName,
      NULL as beginProcessName,
      f.slice_in as endSliceId,
      t2.track_id as endTrackId,
      t2.name as endSliceName,
      CHROME_CUSTOM_SLICE_NAME(t2.slice_id) as endSliceChromeCustomName,
      t2.category as endSliceCategory,
      t2.ts as endSliceStartTs,
      (t2.ts+t2.dur) as endSliceEndTs,
      t2.depth as endDepth,
      NULL as endThreadName,
      NULL as endProcessName,
      extract_arg(f.arg_set_id, 'cat') as category,
      extract_arg(f.arg_set_id, 'name') as name,
      f.id as id
    from flow f
    join slice t1 on f.slice_out = t1.slice_id
    join slice t2 on f.slice_in = t2.slice_id
    where
      (t1.track_id in ${tracks}
        and (t1.ts+t1.dur <= ${endNs} and t1.ts+t1.dur >= ${startNs}))
      or
      (t2.track_id in ${tracks}
        and (t2.ts <= ${endNs} and t2.ts >= ${startNs}))
    `;
        this.queryFlowEvents(query, (flows) => (0, publish.publishSelectedFlows)(flows));
    }
    refreshVisibleFlows() {
        const selection = globals$1.globals.state.currentSelection;
        if (!selection) {
            this.lastSelectedKind = 'NONE';
            (0, publish.publishConnectedFlows)([]);
            (0, publish.publishSelectedFlows)([]);
            return;
        }
        // TODO(b/155483804): This is a hack as annotation slices don't contain
        // flows. We should tidy this up when fixing this bug.
        if (selection && selection.kind === 'CHROME_SLICE' &&
            selection.table !== 'annotation') {
            this.sliceSelected(selection.id);
        }
        else {
            (0, publish.publishConnectedFlows)([]);
        }
        if (selection && selection.kind === 'AREA') {
            this.areaSelected(selection.areaId);
        }
        else {
            (0, publish.publishSelectedFlows)([]);
        }
    }
    run() {
        this.refreshVisibleFlows();
    }
}
exports.FlowEventsController = FlowEventsController;

});

var loading_manager = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.LoadingManager = void 0;

// Used to keep track of whether the engine is currently querying.
class LoadingManager {
    constructor() {
        this.numQueuedQueries = 0;
        this.numLastUpdate = 0;
    }
    static get getInstance() {
        return this._instance || (this._instance = new this());
    }
    beginLoading() {
        this.update(1);
    }
    endLoading() {
        this.update(-1);
    }
    update(change) {
        this.numQueuedQueries += change;
        if (this.numQueuedQueries === 0 ||
            Math.abs(this.numLastUpdate - this.numQueuedQueries) > 2) {
            this.numLastUpdate = this.numQueuedQueries;
            (0, publish.publishLoading)(this.numQueuedQueries);
        }
    }
}
exports.LoadingManager = LoadingManager;

});

var logs_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.LogsController = void 0;






function updateLogBounds(engine, span) {
    return tslib.__awaiter(this, void 0, void 0, function* () {
        const vizStartNs = (0, time.toNsFloor)(span.start);
        const vizEndNs = (0, time.toNsCeil)(span.end);
        const countResult = yield engine.query(`
     select
      ifnull(min(ts), 0) as minTs,
      ifnull(max(ts), 0) as maxTs,
      count(ts) as countTs
     from android_logs where ts >= ${vizStartNs} and ts <= ${vizEndNs}`);
        const countRow = countResult.firstRow({ minTs: query_result.NUM, maxTs: query_result.NUM, countTs: query_result.NUM });
        const firstRowNs = countRow.minTs;
        const lastRowNs = countRow.maxTs;
        const total = countRow.countTs;
        const minResult = yield engine.query(`
     select ifnull(max(ts), 0) as maxTs from android_logs where ts < ${vizStartNs}`);
        const startNs = minResult.firstRow({ maxTs: query_result.NUM }).maxTs;
        const maxResult = yield engine.query(`
     select ifnull(min(ts), 0) as minTs from android_logs where ts > ${vizEndNs}`);
        const endNs = maxResult.firstRow({ minTs: query_result.NUM }).minTs;
        const startTs = startNs ? (0, time.fromNs)(startNs) : 0;
        const endTs = endNs ? (0, time.fromNs)(endNs) : Number.MAX_SAFE_INTEGER;
        const firstRowTs = firstRowNs ? (0, time.fromNs)(firstRowNs) : endTs;
        const lastRowTs = lastRowNs ? (0, time.fromNs)(lastRowNs) : startTs;
        return {
            startTs,
            endTs,
            firstRowTs,
            lastRowTs,
            total,
        };
    });
}
function updateLogEntries(engine, span, pagination) {
    return tslib.__awaiter(this, void 0, void 0, function* () {
        const vizStartNs = (0, time.toNsFloor)(span.start);
        const vizEndNs = (0, time.toNsCeil)(span.end);
        const vizSqlBounds = `ts >= ${vizStartNs} and ts <= ${vizEndNs}`;
        const rowsResult = yield engine.query(`
        select
          ts,
          prio,
          ifnull(tag, '[NULL]') as tag,
          ifnull(msg, '[NULL]') as msg
        from android_logs
        where ${vizSqlBounds}
        order by ts
        limit ${pagination.start}, ${pagination.count}
    `);
        const timestamps = [];
        const priorities = [];
        const tags = [];
        const messages = [];
        const it = rowsResult.iter({ ts: query_result.NUM, prio: query_result.NUM, tag: query_result.STR, msg: query_result.STR });
        for (; it.valid(); it.next()) {
            timestamps.push(it.ts);
            priorities.push(it.prio);
            tags.push(it.tag);
            messages.push(it.msg);
        }
        return {
            offset: pagination.start,
            timestamps,
            priorities,
            tags,
            messages,
        };
    });
}
class Pagination {
    constructor(offset, count) {
        this._offset = offset;
        this._count = count;
    }
    get start() {
        return this._offset;
    }
    get count() {
        return this._count;
    }
    get end() {
        return this._offset + this._count;
    }
    contains(other) {
        return this.start <= other.start && other.end <= this.end;
    }
    grow(n) {
        const newStart = Math.max(0, this.start - n / 2);
        const newCount = this.count + n;
        return new Pagination(newStart, newCount);
    }
}
/**
 * LogsController looks at two parts of the state:
 * 1. The visible trace window
 * 2. The requested offset and count the log lines to display
 * And keeps two bits of published information up to date:
 * 1. The total number of log messages in visible range
 * 2. The logs lines that should be displayed
 */
class LogsController extends controller.Controller {
    constructor(args) {
        super('main');
        this.hasLogs = false;
        this.app = args.app;
        this.engine = args.engine;
        this.span = new time.TimeSpan(0, 10);
        this.pagination = new Pagination(0, 0);
        this.hasAnyLogs().then((exists) => {
            this.hasLogs = exists;
            (0, publish.publishTrackData)({
                id: logs.LogExistsKey,
                data: {
                    exists,
                },
            });
        });
    }
    hasAnyLogs() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const result = yield this.engine.query(`
      select count(*) as cnt from android_logs
    `);
            return result.firstRow({ cnt: query_result.NUM }).cnt > 0;
        });
    }
    run() {
        if (!this.hasLogs)
            return;
        const traceTime = this.app.state.frontendLocalState.visibleState;
        const newSpan = new time.TimeSpan(traceTime.startSec, traceTime.endSec);
        const oldSpan = this.span;
        const pagination = this.app.state.logsPagination;
        // This can occur when loading old traces.
        // TODO(hjd): Fix the problem of accessing state from a previous version of
        // the UI in a general way.
        if (pagination === undefined) {
            return;
        }
        const { offset, count } = pagination;
        const requestedPagination = new Pagination(offset, count);
        const oldPagination = this.pagination;
        const needSpanUpdate = !oldSpan.equals(newSpan);
        const needPaginationUpdate = !oldPagination.contains(requestedPagination);
        // TODO(hjd): We could waste a lot of time queueing useless updates here.
        // We should avoid enqueuing a request when one is in progress.
        if (needSpanUpdate) {
            this.span = newSpan;
            updateLogBounds(this.engine, newSpan).then((data) => {
                if (!newSpan.equals(this.span))
                    return;
                (0, publish.publishTrackData)({
                    id: logs.LogBoundsKey,
                    data,
                });
            });
        }
        // TODO(hjd): We could waste a lot of time queueing useless updates here.
        // We should avoid enqueuing a request when one is in progress.
        if (needSpanUpdate || needPaginationUpdate) {
            this.pagination = requestedPagination.grow(100);
            updateLogEntries(this.engine, newSpan, this.pagination).then((data) => {
                if (!this.pagination.contains(requestedPagination))
                    return;
                (0, publish.publishTrackData)({
                    id: logs.LogEntriesKey,
                    data,
                });
            });
        }
        return [];
    }
}
exports.LogsController = LogsController;

});

var metrics_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.MetricsController = void 0;






class MetricsController extends controller.Controller {
    constructor(args) {
        super('main');
        this.engine = args.engine;
        this.run();
    }
    computeMetric(name) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            if (name === this.currentlyRunningMetric)
                return;
            this.currentlyRunningMetric = name;
            try {
                const metricResult = yield this.engine.computeMetric([name]);
                (0, publish.publishMetricResult)({
                    name,
                    resultString: metricResult.metricsAsPrototext,
                });
            }
            catch (e) {
                if (e instanceof query_result.QueryError) {
                    // Reroute error to be displated differently when metric is run through
                    // metric page.
                    (0, publish.publishMetricResult)({ name, error: e.message });
                }
                else {
                    throw e;
                }
            }
            globals$1.globals.dispatch(actions.Actions.resetMetricRequest({ name }));
            this.currentlyRunningMetric = undefined;
        });
    }
    run() {
        const { requestedMetric } = globals$1.globals.state.metrics;
        if (!requestedMetric)
            return;
        this.computeMetric(requestedMetric);
    }
}
exports.MetricsController = MetricsController;

});

var pivot_table_redux_query_generator = createCommonjsModule(function (module, exports) {
/*
 * Copyright (C) 2022 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateQueryFromState = exports.aggregationIndex = exports.extractArgumentExpression = exports.expression = exports.areaFilter = exports.QueryGeneratorError = exports.tables = exports.sliceAggregationColumns = exports.sliceTable = void 0;





exports.sliceTable = {
    name: 'slice',
    columns: ['type', 'ts', 'dur', 'category', 'name'],
};
// Columns of `slice` table available for aggregation.
exports.sliceAggregationColumns = [
    'ts',
    'dur',
    'depth',
    'thread_ts',
    'thread_dur',
    'thread_instruction_count',
    'thread_instruction_delta',
];
// List of available tables to query, used to populate selectors of pivot
// columns in the UI.
exports.tables = [
    exports.sliceTable,
    {
        name: 'process',
        columns: [
            'type',
            'pid',
            'name',
            'parent_upid',
            'uid',
            'android_appid',
            'cmdline',
        ],
    },
    { name: 'thread', columns: ['type', 'name', 'tid', 'upid', 'is_main_thread'] },
    { name: 'thread_track', columns: ['type', 'name', 'utid'] },
];
function outerAggregation(fn) {
    if (fn === 'COUNT') {
        return 'SUM';
    }
    return fn;
}
// Exception thrown by query generator in case incoming parameters are not
// suitable in order to build a correct query; these are caught by the UI and
// displayed to the user.
class QueryGeneratorError extends Error {
}
exports.QueryGeneratorError = QueryGeneratorError;
// Internal column name for different rollover levels of aggregate columns.
function aggregationAlias(aggregationIndex, rolloverLevel) {
    return `agg_${aggregationIndex}_level_${rolloverLevel}`;
}
function areaFilter(area) {
    return `
    ts + dur > ${(0, time.toNs)(area.startSec)}
    and ts < ${(0, time.toNs)(area.endSec)}
    and track_id in (${(0, slice_aggregation_controller.getSelectedTrackIds)(area).join(', ')})
  `;
}
exports.areaFilter = areaFilter;
function expression(column) {
    switch (column.kind) {
        case 'regular':
            return column.column;
        case 'argument':
            return extractArgumentExpression(column.argument);
    }
}
exports.expression = expression;
function aggregationExpression(aggregation) {
    if (aggregation.aggregationFunction === 'COUNT') {
        return 'COUNT()';
    }
    return `${aggregation.aggregationFunction}(${expression(aggregation.column)})`;
}
function extractArgumentExpression(argument, table) {
    const prefix = table === undefined ? '' : `${table}.`;
    return `extract_arg(${prefix}arg_set_id, ${(0, string_utils.sqliteString)(argument)})`;
}
exports.extractArgumentExpression = extractArgumentExpression;
function generateInnerQuery(pivots, aggregations, includeTrack, area, constrainToArea) {
    const aggregationColumns = [];
    for (let i = 0; i < aggregations.length; i++) {
        aggregationColumns.push(`${aggregationExpression(aggregations[i])} as ${aggregationAlias(i, 0)}`);
    }
    const selectColumns = [];
    const groupByColumns = [];
    let argumentCount = 0;
    for (const column of pivots) {
        switch (column.kind) {
            case 'regular': {
                selectColumns.push(column.column);
                groupByColumns.push(column.column);
                break;
            }
            case 'argument': {
                const alias = `pivot_argument_${argumentCount++}`;
                selectColumns.push(`${extractArgumentExpression(column.argument)} as ${alias}`);
                groupByColumns.push(alias);
                break;
            }
        }
    }
    if (includeTrack) {
        selectColumns.push('track_id');
    }
    const query = `
    select
      ${selectColumns.concat(aggregationColumns).join(',\n')}
    from slice
    ${(constrainToArea ? `where ${areaFilter(area)}` : '')}
    group by ${groupByColumns.concat(includeTrack ? ['track_id'] : []).join(', ')}
  `;
    return { query, groupByColumns };
}
// Every aggregation in the request is contained in the result in (number of
// pivots + 1) times for each rollover level. This helper function returs an
// index of the necessary column in the response.
function aggregationIndex(pivotColumns, aggregationNo, depth) {
    return pivotColumns + aggregationNo * (pivotColumns + 1) +
        (pivotColumns - depth);
}
exports.aggregationIndex = aggregationIndex;
function generateQueryFromState(state) {
    if (state.selectionArea === undefined) {
        throw new QueryGeneratorError('Should not be called without area');
    }
    const sliceTableAggregations = [...state.selectedAggregations.values()];
    if (sliceTableAggregations.length === 0) {
        throw new QueryGeneratorError('No aggregations selected');
    }
    const nonSlicePivots = state.selectedPivots;
    const slicePivots = state.selectedSlicePivots;
    if (slicePivots.length === 0 && nonSlicePivots.length === 0) {
        throw new QueryGeneratorError('No pivots selected');
    }
    const outerAggregations = [];
    const innerQuery = generateInnerQuery(slicePivots, sliceTableAggregations, nonSlicePivots.length > 0, globals.globals.state.areas[state.selectionArea.areaId], state.constrainToArea);
    const prefixedSlicePivots = innerQuery.groupByColumns.map((p) => `preaggregated.${p}`);
    const renderedNonSlicePivots = nonSlicePivots.map((pivot) => `${pivot.table}.${pivot.column}`);
    const totalPivotsArray = renderedNonSlicePivots.concat(prefixedSlicePivots);
    const sortCriteria = globals.globals.state.nonSerializableState.pivotTableRedux.sortCriteria;
    const sortClauses = [];
    for (let i = 0; i < sliceTableAggregations.length; i++) {
        const agg = `preaggregated.${aggregationAlias(i, 0)}`;
        const fn = outerAggregation(sliceTableAggregations[i].aggregationFunction);
        outerAggregations.push(`${fn}(${agg}) as ${aggregationAlias(i, 0)}`);
        for (let level = 1; level < totalPivotsArray.length; level++) {
            // Peculiar form "SUM(SUM(agg)) over (partition by columns)" here means
            // following: inner SUM(agg) is an aggregation that is going to collapse
            // tracks with the same pivot values, which is going to be post-aggregated
            // by the set of columns by outer **window** SUM function.
            // Need to use complicated query syntax can be avoided by having yet
            // another nested subquery computing only aggregation values with window
            // functions in the wrapper, but the generation code is going to be more
            // complex; so complexity of the query is traded for complexity of the
            // query generator.
            outerAggregations.push(`${fn}(${fn}(${agg})) over (partition by ${totalPivotsArray.slice(0, totalPivotsArray.length - level)
                .join(', ')}) as ${aggregationAlias(i, level)}`);
        }
        outerAggregations.push(`${fn}(${fn}(${agg})) over () as ${aggregationAlias(i, totalPivotsArray.length)}`);
        if (sortCriteria !== undefined &&
            (0, pivot_table_redux_types.tableColumnEquals)(sliceTableAggregations[i].column, sortCriteria.column)) {
            for (let level = totalPivotsArray.length - 1; level >= 0; level--) {
                sortClauses.push(`${aggregationAlias(i, level)} ${sortCriteria.order}`);
            }
        }
    }
    const joins = `
    left join thread_track on thread_track.id = preaggregated.track_id
    left join thread using (utid)
    left join process using (upid)
  `;
    const text = `
    select
      ${renderedNonSlicePivots.concat(prefixedSlicePivots, outerAggregations)
        .join(',\n')}
    from (
      ${innerQuery.query}
    ) preaggregated
    ${nonSlicePivots.length > 0 ? joins : ''}
    group by ${renderedNonSlicePivots.concat(prefixedSlicePivots).join(', ')}
    ${sortClauses.length > 0 ? ('order by ' + sortClauses.join(', ')) : ''}
  `;
    return {
        text,
        metadata: {
            pivotColumns: nonSlicePivots.concat(slicePivots),
            aggregationColumns: sliceTableAggregations,
        },
    };
}
exports.generateQueryFromState = generateQueryFromState;

});

var pivot_table_redux_controller = createCommonjsModule(function (module, exports) {
/*
 * Copyright (C) 2022 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.PivotTableReduxController = exports.PIVOT_TABLE_REDUX_FLAG = void 0;







exports.PIVOT_TABLE_REDUX_FLAG = feature_flags.featureFlags.register({
    id: 'pivotTableRedux',
    name: 'Pivot tables V2',
    description: 'Second version of pivot table',
    defaultValue: true,
});
// Auxiliary class to build the tree from query response.
class TreeBuilder {
    constructor(pivotColumns, aggregateColumns, firstRow) {
        this.pivotColumns = pivotColumns;
        this.aggregateColumns = aggregateColumns;
        this.root = this.createNode(0, firstRow);
        let tree = this.root;
        for (let i = 0; i + 1 < this.pivotColumns; i++) {
            const value = firstRow[i];
            tree = TreeBuilder.insertChild(tree, value, this.createNode(i + 1, firstRow));
        }
        tree.rows.push(firstRow);
        this.lastRow = firstRow;
    }
    // Add incoming row to the tree being built.
    ingestRow(row) {
        let tree = this.root;
        for (let i = 0; i + 1 < this.pivotColumns; i++) {
            const nextTree = tree.children.get(row[i]);
            if (nextTree === undefined) {
                // Insert the new node into the tree, and make variable `tree` point
                // to the newly created node.
                tree =
                    TreeBuilder.insertChild(tree, row[i], this.createNode(i + 1, row));
            }
            else {
                tree = nextTree;
            }
        }
        tree.rows.push(row);
        this.lastRow = row;
    }
    build() {
        return this.root;
    }
    // Helper method that inserts child node into the tree and returns it, used
    // for more concise modification of local variable pointing to the current
    // node being built.
    static insertChild(tree, key, child) {
        tree.children.set(key, child);
        return child;
    }
    // Initialize PivotTree from a row.
    createNode(depth, row) {
        const aggregates = [];
        for (let j = 0; j < this.aggregateColumns; j++) {
            aggregates.push(row[(0, pivot_table_redux_query_generator.aggregationIndex)(this.pivotColumns, j, depth)]);
        }
        return {
            isCollapsed: false,
            children: new Map(),
            aggregates,
            rows: [],
        };
    }
}
function createEmptyQueryResult(metadata) {
    return {
        tree: {
            aggregates: [],
            isCollapsed: false,
            children: new Map(),
            rows: [],
        },
        metadata,
    };
}
// Controller responsible for showing the panel with pivot table, as well as
// executing its queries and post-processing query results.
class PivotTableReduxController extends controller.Controller {
    constructor(args) {
        super({});
        this.lastQueryAreaId = '';
        this.lastQueryAreaTracks = new Set();
        this.requestedArgumentNames = false;
        this.engine = args.engine;
    }
    sameTracks(tracks) {
        if (this.lastQueryAreaTracks.size !== tracks.size) {
            return false;
        }
        // ES6 Set does not have .every method, only Array does.
        for (const track in tracks) {
            if (!this.lastQueryAreaTracks.has(track)) {
                return false;
            }
        }
        return true;
    }
    shouldRerun(state, selection) {
        if (state.selectionArea === undefined) {
            return false;
        }
        const newTracks = new Set(globals$1.globals.state.areas[selection.areaId].tracks);
        if (this.lastQueryAreaId !== state.selectionArea.areaId ||
            !this.sameTracks(newTracks)) {
            this.lastQueryAreaId = state.selectionArea.areaId;
            this.lastQueryAreaTracks = newTracks;
            return true;
        }
        return false;
    }
    processQuery(query) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const result = yield this.engine.query(query.text);
            try {
                yield result.waitAllRows();
            }
            catch (_a) {
                // waitAllRows() frequently throws an exception, which is ignored in
                // its other calls, so it's ignored here as well.
            }
            const columns = result.columns();
            const it = result.iter({});
            function nextRow() {
                const row = [];
                for (const column of columns) {
                    row.push(it.get(column));
                }
                it.next();
                return row;
            }
            if (!it.valid()) {
                // Iterator is invalid after creation; means that there are no rows
                // satisfying filtering criteria. Return an empty tree.
                globals$1.globals.dispatch(actions.Actions.setPivotStateQueryResult({ queryResult: createEmptyQueryResult(query.metadata) }));
                return;
            }
            const treeBuilder = new TreeBuilder(query.metadata.pivotColumns.length, query.metadata.aggregationColumns.length, nextRow());
            while (it.valid()) {
                treeBuilder.ingestRow(nextRow());
            }
            globals$1.globals.dispatch(actions.Actions.setPivotStateQueryResult({ queryResult: { tree: treeBuilder.build(), metadata: query.metadata } }));
            globals$1.globals.dispatch(actions.Actions.setCurrentTab({ tab: 'pivot_table_redux' }));
        });
    }
    requestArgumentNames() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            this.requestedArgumentNames = true;
            const result = yield this.engine.query(`
      select distinct flat_key from args
    `);
            const it = result.iter({ flat_key: query_result.STR });
            const argumentNames = [];
            while (it.valid()) {
                argumentNames.push(it.flat_key);
                it.next();
            }
            globals$1.globals.dispatch(actions.Actions.setPivotTableArgumentNames({ argumentNames }));
        });
    }
    run() {
        if (!exports.PIVOT_TABLE_REDUX_FLAG.get()) {
            return;
        }
        if (!this.requestedArgumentNames) {
            this.requestArgumentNames();
        }
        const pivotTableState = globals$1.globals.state.nonSerializableState.pivotTableRedux;
        const selection = globals$1.globals.state.currentSelection;
        if (pivotTableState.queryRequested ||
            (selection !== null && selection.kind === 'AREA' &&
                this.shouldRerun(pivotTableState, selection))) {
            globals$1.globals.dispatch(actions.Actions.setPivotTableQueryRequested({ queryRequested: false }));
            // Need to re-run the existing query, clear the current result.
            globals$1.globals.dispatch(actions.Actions.setPivotStateQueryResult({ queryResult: null }));
            this.processQuery((0, pivot_table_redux_query_generator.generateQueryFromState)(pivotTableState));
        }
        if (selection !== null && selection.kind === 'AREA' &&
            (pivotTableState.selectionArea === undefined ||
                pivotTableState.selectionArea.areaId !== selection.areaId)) {
            globals$1.globals.dispatch(actions.Actions.togglePivotTableRedux({ areaId: selection.areaId }));
        }
    }
}
exports.PivotTableReduxController = PivotTableReduxController;
PivotTableReduxController.detailsCount = 0;

});

var queries = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.runQuery = void 0;

const MAX_DISPLAY_ROWS = 10000;
function runQuery(queryId, sqlQuery, engine) {
    return tslib.__awaiter(this, void 0, void 0, function* () {
        const startMs = performance.now();
        const queryRes = engine.query(sqlQuery);
        // TODO(primiano): once the controller thread is gone we should pass down
        // the result objects directly to the frontend, iterate over the result
        // and deal with pagination there. For now we keep the old behavior and
        // truncate to 10k rows.
        try {
            yield queryRes.waitAllRows();
        }
        catch (_a) {
            // In the case of a query error we don't want the exception to bubble up
            // as a crash. The |queryRes| object will be populated anyways.
            // queryRes.error() is used to tell if the query errored or not. If it
            // errored, the frontend will show a graceful message instead.
        }
        const durationMs = performance.now() - startMs;
        const rows = [];
        const columns = queryRes.columns();
        let numRows = 0;
        for (const iter = queryRes.iter({}); iter.valid(); iter.next()) {
            const row = {};
            for (const colName of columns) {
                const value = iter.get(colName);
                row[colName] = value === null ? 'NULL' : value;
            }
            rows.push(row);
            if (++numRows >= MAX_DISPLAY_ROWS)
                break;
        }
        const result = {
            id: queryId,
            query: sqlQuery,
            durationMs,
            error: queryRes.error(),
            totalRowCount: queryRes.numRows(),
            columns,
            rows,
            statementCount: queryRes.statementCount(),
            statementWithOutputCount: queryRes.statementWithOutputCount(),
        };
        return result;
    });
}
exports.runQuery = runQuery;

});

var query_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.QueryController = void 0;






class QueryController extends controller.Controller {
    constructor(args) {
        super('init');
        this.args = args;
    }
    run() {
        switch (this.state) {
            case 'init':
                const config = (0, logging.assertExists)(globals$1.globals.state.queries[this.args.queryId]);
                (0, queries.runQuery)(this.args.queryId, config.query, this.args.engine)
                    .then((result) => {
                    console.log(`Query ${config.query} took ${result.durationMs} ms`);
                    (0, publish.publishQueryResult)({ id: this.args.queryId, data: result });
                    globals$1.globals.dispatch(actions.Actions.deleteQuery({ queryId: this.args.queryId }));
                });
                this.setState('querying');
                break;
            case 'querying':
                // Nothing to do here, as soon as the deleteQuery is dispatched this
                // controller will be destroyed (by the TraceController).
                break;
            default:
                throw new Error(`Unexpected state ${this.state}`);
        }
    }
}
exports.QueryController = QueryController;

});

var search_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.SearchController = exports.escapeQuery = void 0;







function escapeQuery(s) {
    // See https://www.sqlite.org/lang_expr.html#:~:text=A%20string%20constant
    s = s.replace(/\'/g, '\'\'');
    s = s.replace(/\[/g, '[[]');
    s = s.replace(/\?/g, '[?]');
    s = s.replace(/\*/g, '[*]');
    return `'*${s}*'`;
}
exports.escapeQuery = escapeQuery;
class SearchController extends controller.Controller {
    constructor(args) {
        super('main');
        this.engine = args.engine;
        this.app = args.app;
        this.previousSpan = new time.TimeSpan(0, 1);
        this.previousSearch = '';
        this.updateInProgress = false;
        this.setupInProgress = true;
        this.previousResolution = 1;
        this.setup().finally(() => {
            this.setupInProgress = false;
            this.run();
        });
    }
    setup() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            yield this.query(`create virtual table search_summary_window
      using window;`);
            yield this.query(`create virtual table search_summary_sched_span using
      span_join(sched PARTITIONED cpu, search_summary_window);`);
            yield this.query(`create virtual table search_summary_slice_span using
      span_join(slice PARTITIONED track_id, search_summary_window);`);
        });
    }
    run() {
        if (this.setupInProgress || this.updateInProgress) {
            return;
        }
        const visibleState = this.app.state.frontendLocalState.visibleState;
        const omniboxState = this.app.state.frontendLocalState.omniboxState;
        if (visibleState === undefined || omniboxState === undefined ||
            omniboxState.mode === 'COMMAND') {
            return;
        }
        const newSpan = new time.TimeSpan(visibleState.startSec, visibleState.endSec);
        const newSearch = omniboxState.omnibox;
        let newResolution = visibleState.resolution;
        if (this.previousSpan.contains(newSpan) &&
            this.previousResolution === newResolution &&
            newSearch === this.previousSearch) {
            return;
        }
        this.previousSpan = new time.TimeSpan(Math.max(newSpan.start - newSpan.duration, -constants.TRACE_MARGIN_TIME_S), newSpan.end + newSpan.duration);
        this.previousResolution = newResolution;
        this.previousSearch = newSearch;
        if (newSearch === '' || newSearch.length < 4) {
            (0, publish.publishSearch)({
                tsStarts: new Float64Array(0),
                tsEnds: new Float64Array(0),
                count: new Uint8Array(0),
            });
            (0, publish.publishSearchResult)({
                sliceIds: new Float64Array(0),
                tsStarts: new Float64Array(0),
                utids: new Float64Array(0),
                sources: [],
                trackIds: [],
                totalResults: 0,
            });
            return;
        }
        let startNs = Math.round(newSpan.start * 1e9);
        let endNs = Math.round(newSpan.end * 1e9);
        // TODO(hjd): We shouldn't need to be so defensive here:
        if (!Number.isFinite(startNs)) {
            startNs = 0;
        }
        if (!Number.isFinite(endNs)) {
            endNs = 1;
        }
        if (!Number.isFinite(newResolution)) {
            newResolution = 1;
        }
        this.updateInProgress = true;
        const computeSummary = this.update(newSearch, startNs, endNs, newResolution)
            .then((summary) => {
            (0, publish.publishSearch)(summary);
        });
        const computeResults = this.specificSearch(newSearch).then((searchResults) => {
            (0, publish.publishSearchResult)(searchResults);
        });
        Promise.all([computeSummary, computeResults])
            .finally(() => {
            this.updateInProgress = false;
            this.run();
        });
    }
    onDestroy() { }
    update(search, startNs, endNs, resolution) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const quantumNs = Math.round(resolution * 10 * 1e9);
            const searchLiteral = escapeQuery(search);
            startNs = Math.floor(startNs / quantumNs) * quantumNs;
            const windowDur = Math.max(endNs - startNs, 1);
            yield this.query(`update search_summary_window set
      window_start=${startNs},
      window_dur=${windowDur},
      quantum=${quantumNs}
      where rowid = 0;`);
            const utidRes = yield this.query(`select utid from thread join process
      using(upid) where thread.name glob ${searchLiteral}
      or process.name glob ${searchLiteral}`);
            const utids = [];
            for (const it = utidRes.iter({ utid: query_result.NUM }); it.valid(); it.next()) {
                utids.push(it.utid);
            }
            const cpus = yield this.engine.getCpus();
            const maxCpu = Math.max(...cpus, -1);
            const res = yield this.query(`
        select
          (quantum_ts * ${quantumNs} + ${startNs})/1e9 as tsStart,
          ((quantum_ts+1) * ${quantumNs} + ${startNs})/1e9 as tsEnd,
          min(count(*), 255) as count
          from (
              select
              quantum_ts
              from search_summary_sched_span
              where utid in (${utids.join(',')}) and cpu <= ${maxCpu}
            union all
              select
              quantum_ts
              from search_summary_slice_span
              where name glob ${searchLiteral}
          )
          group by quantum_ts
          order by quantum_ts;`);
            const numRows = res.numRows();
            const summary = {
                tsStarts: new Float64Array(numRows),
                tsEnds: new Float64Array(numRows),
                count: new Uint8Array(numRows),
            };
            const it = res.iter({ tsStart: query_result.NUM, tsEnd: query_result.NUM, count: query_result.NUM });
            for (let row = 0; it.valid(); it.next(), ++row) {
                summary.tsStarts[row] = it.tsStart;
                summary.tsEnds[row] = it.tsEnd;
                summary.count[row] = it.count;
            }
            return summary;
        });
    }
    specificSearch(search) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const searchLiteral = escapeQuery(search);
            // TODO(hjd): we should avoid recomputing this every time. This will be
            // easier once the track table has entries for all the tracks.
            const cpuToTrackId = new Map();
            for (const track of Object.values(this.app.state.tracks)) {
                if (track.kind === 'CpuSliceTrack') {
                    cpuToTrackId.set(track.config.cpu, track.id);
                    continue;
                }
            }
            const utidRes = yield this.query(`select utid from thread join process
    using(upid) where
      thread.name glob ${searchLiteral} or
      process.name glob ${searchLiteral}`);
            const utids = [];
            for (const it = utidRes.iter({ utid: query_result.NUM }); it.valid(); it.next()) {
                utids.push(it.utid);
            }
            const queryRes = yield this.query(`
    select
      id as sliceId,
      ts,
      'cpu' as source,
      cpu as sourceId,
      utid
    from sched where utid in (${utids.join(',')})
    union
    select
      slice_id as sliceId,
      ts,
      'track' as source,
      track_id as sourceId,
      0 as utid
      from slice
      where slice.name glob ${searchLiteral}
        or (
          0 != CAST(${((0, string_utils.sqliteString)(search))} AS INT) and
          sliceId = CAST(${((0, string_utils.sqliteString)(search))} AS INT)
        )
    union
    select
      slice_id as sliceId,
      ts,
      'track' as source,
      track_id as sourceId,
      0 as utid
      from slice
      join args using(arg_set_id)
      where string_value glob ${searchLiteral} or key glob ${searchLiteral}
    union
    select
      id as sliceId,
      ts,
      'log' as source,
      0 as sourceId,
      utid
    from android_logs where msg glob ${searchLiteral}
    order by ts

    `);
            const rows = queryRes.numRows();
            const searchResults = {
                sliceIds: new Float64Array(rows),
                tsStarts: new Float64Array(rows),
                utids: new Float64Array(rows),
                trackIds: [],
                sources: [],
                totalResults: 0,
            };
            const it = queryRes.iter({ sliceId: query_result.NUM, ts: query_result.NUM, source: query_result.STR, sourceId: query_result.NUM, utid: query_result.NUM });
            for (; it.valid(); it.next()) {
                let trackId = undefined;
                if (it.source === 'cpu') {
                    trackId = cpuToTrackId.get(it.sourceId);
                }
                else if (it.source === 'track') {
                    trackId = this.app.state.uiTrackIdByTraceTrackId[it.sourceId];
                }
                else if (it.source === 'log') {
                    const logTracks = Object.values(this.app.state.tracks)
                        .filter((t) => t.kind === 'AndroidLogTrack');
                    if (logTracks.length > 0) {
                        trackId = logTracks[0].id;
                    }
                }
                // The .get() calls above could return undefined, this isn't just an else.
                if (trackId === undefined) {
                    continue;
                }
                const i = searchResults.totalResults++;
                searchResults.trackIds.push(trackId);
                searchResults.sources.push(it.source);
                searchResults.sliceIds[i] = it.sliceId;
                searchResults.tsStarts[i] = it.ts;
                searchResults.utids[i] = it.utid;
            }
            return searchResults;
        });
    }
    query(query) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const result = yield this.engine.query(query);
            return result;
        });
    }
}
exports.SearchController = SearchController;

});

var arg_types = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use size file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.isArgTreeMap = exports.isArgTreeArray = void 0;
function isArgTreeArray(item) {
    return typeof item === 'object' && Array.isArray(item);
}
exports.isArgTreeArray = isArgTreeArray;
function isArgTreeMap(item) {
    return typeof item === 'object' && !Array.isArray(item);
}
exports.isArgTreeMap = isArgTreeMap;

});

var args_parser = createCommonjsModule(function (module, exports) {
// Copyright (C) 2021 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use size file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseArgs = void 0;

// Converts a flats sequence of key-value pairs into a JSON-like nested
// structure. Dots in keys are used to create a nested dictionary, indices in
// brackets used to create nested array. For example, consider the following
// sequence of key-value pairs:
//
// simple_key = simple_value
// thing.key = value
// thing.point[0].x = 10
// thing.point[0].y = 20
// thing.point[1].x = 0
// thing.point[1].y = -10
//
// It's going to be converted to a following object:
//
// {
//   "simple_key": "simple_value",
//   "thing": {
//     "key": "value",
//     "point": [
//       { "x": "10", "y": "20" },
//       { "x": "0", "y": "-10" }
//     ]
//   }
// }
function parseArgs(args) {
    const result = {};
    for (const [key, value] of args) {
        if (typeof value === 'string') {
            fillObject(result, key.split('.'), value);
        }
    }
    return result;
}
exports.parseArgs = parseArgs;
function getOrCreateMap(object, key) {
    let value;
    if ((0, arg_types.isArgTreeMap)(object) && typeof key === 'string') {
        value = object[key];
    }
    else if ((0, arg_types.isArgTreeArray)(object) && typeof key === 'number') {
        value = object[key];
    }
    else {
        throw new Error('incompatible parameters to getOrCreateSubmap');
    }
    if (value !== undefined) {
        if ((0, arg_types.isArgTreeMap)(value)) {
            return value;
        }
        else {
            // There is a value, but it's not a map - something wrong with the key set
            throw new Error('inconsistent keys');
        }
    }
    value = {};
    if ((0, arg_types.isArgTreeMap)(object) && typeof key === 'string') {
        object[key] = value;
    }
    else if ((0, arg_types.isArgTreeArray)(object) && typeof key === 'number') {
        object[key] = value;
    }
    return value;
}
function getOrCreateArray(object, key) {
    let value = object[key];
    if (value !== undefined) {
        if ((0, arg_types.isArgTreeArray)(value)) {
            return value;
        }
        else {
            // There is a value, but it's not an array - something wrong with the key
            // set
            throw new Error('inconsistent keys');
        }
    }
    value = [];
    object[key] = value;
    return value;
}
function fillObject(object, path, value) {
    let current = object;
    for (let i = 0; i < path.length - 1; i++) {
        const [part, index] = parsePathSegment(path[i]);
        if (index === undefined) {
            current = getOrCreateMap(current, part);
        }
        else {
            const array = getOrCreateArray(current, part);
            current = getOrCreateMap(array, index);
        }
    }
    const [part, index] = parsePathSegment(path[path.length - 1]);
    if (index === undefined) {
        current[part] = value;
    }
    else {
        const array = getOrCreateArray(current, part);
        array[index] = value;
    }
}
// Segment is either a simple key (e.g. "foo") or a key with an index (e.g.
// "bar[42]"). This function returns a pair of key and index (if present).
function parsePathSegment(segment) {
    if (!segment.endsWith(']')) {
        return [segment, undefined];
    }
    const indexStart = segment.indexOf('[');
    const indexString = segment.substring(indexStart + 1, segment.length - 1);
    return [segment.substring(0, indexStart), Math.floor(Number(indexString))];
}

});

var selection_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.SelectionController = void 0;










// This class queries the TP for the details on a specific slice that has
// been clicked.
class SelectionController extends controller.Controller {
    constructor(args) {
        super('main');
        this.args = args;
    }
    run() {
        const selection = globals$1.globals.state.currentSelection;
        if (!selection || selection.kind === 'AREA')
            return;
        const selectWithId = ['SLICE', 'COUNTER', 'CHROME_SLICE', 'HEAP_PROFILE', 'THREAD_STATE'];
        if (!selectWithId.includes(selection.kind) ||
            (selectWithId.includes(selection.kind) &&
                selection.id === this.lastSelectedId &&
                selection.kind === this.lastSelectedKind)) {
            return;
        }
        const selectedId = selection.id;
        const selectedKind = selection.kind;
        this.lastSelectedId = selectedId;
        this.lastSelectedKind = selectedKind;
        if (selectedId === undefined)
            return;
        if (selection.kind === 'COUNTER') {
            this.counterDetails(selection.leftTs, selection.rightTs, selection.id)
                .then((results) => {
                if (results !== undefined && selection &&
                    selection.kind === selectedKind &&
                    selection.id === selectedId) {
                    (0, publish.publishCounterDetails)(results);
                }
            });
        }
        else if (selection.kind === 'SLICE') {
            this.sliceDetails(selectedId);
        }
        else if (selection.kind === 'THREAD_STATE') {
            this.threadStateDetails(selection.id);
        }
        else if (selection.kind === 'CHROME_SLICE') {
            this.chromeSliceDetails(selection);
        }
    }
    chromeSliceDetails(selection) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const selectedId = selection.id;
            const table = selection.table;
            let leafTable;
            let promisedDescription;
            let promisedArgs;
            // TODO(b/155483804): This is a hack to ensure annotation slices are
            // selectable for now. We should tidy this up when improving this class.
            if (table === 'annotation') {
                leafTable = 'annotation_slice';
                promisedDescription = Promise.resolve(new Map());
                promisedArgs = Promise.resolve(new Map());
            }
            else {
                const result = yield this.args.engine.query(`
        SELECT
          type as leafTable,
          arg_set_id as argSetId
        FROM slice WHERE id = ${selectedId}`);
                if (result.numRows() === 0) {
                    return;
                }
                const row = result.firstRow({
                    leafTable: query_result.STR,
                    argSetId: query_result.NUM,
                });
                leafTable = row.leafTable;
                const argSetId = row.argSetId;
                promisedDescription = this.describeSlice(selectedId);
                promisedArgs = this.getArgs(argSetId);
            }
            const promisedDetails = this.args.engine.query(`
      SELECT *, ABS_TIME_STR(ts) as absTime FROM ${leafTable} WHERE id = ${selectedId};
    `);
            const [details, args, description] = yield Promise.all([promisedDetails, promisedArgs, promisedDescription]);
            if (details.numRows() <= 0)
                return;
            const rowIter = details.iter({});
            (0, logging.assertTrue)(rowIter.valid());
            // A few columns are hard coded as part of the SliceDetails interface.
            // Long term these should be handled generically as args but for now
            // handle them specially:
            let ts = undefined;
            let absTime = undefined;
            let dur = undefined;
            let name = undefined;
            let category = undefined;
            let threadDur = undefined;
            let threadTs = undefined;
            let trackId = undefined;
            // We select all columns from the leafTable to ensure that we include
            // additional fields from the child tables (like `thread_dur` from
            // `thread_slice` or `frame_number` from `frame_slice`).
            // However, this also includes some basic columns (especially from `slice`)
            // that are not interesting (i.e. `arg_set_id`, which has already been used
            // to resolve and show the arguments) and should not be shown to the user.
            const ignoredColumns = [
                'type',
                'depth',
                'parent_id',
                'stack_id',
                'parent_stack_id',
                'arg_set_id',
                'thread_instruction_count',
                'thread_instruction_delta',
            ];
            for (const k of details.columns()) {
                const v = rowIter.get(k);
                switch (k) {
                    case 'id':
                        break;
                    case 'ts':
                        ts = (0, time.fromNs)(Number(v)) - globals$1.globals.state.traceTime.startSec;
                        break;
                    case 'thread_ts':
                        threadTs = (0, time.fromNs)(Number(v));
                        break;
                    case 'absTime':
                        if (v)
                            absTime = `${v}`;
                        break;
                    case 'name':
                        name = `${v}`;
                        break;
                    case 'dur':
                        dur = (0, time.fromNs)(Number(v));
                        break;
                    case 'thread_dur':
                        threadDur = (0, time.fromNs)(Number(v));
                        break;
                    case 'category':
                    case 'cat':
                        category = `${v}`;
                        break;
                    case 'track_id':
                        trackId = Number(v);
                        break;
                    default:
                        if (!ignoredColumns.includes(k))
                            args.set(k, `${v}`);
                }
            }
            const argsTree = (0, args_parser.parseArgs)(args);
            const selected = {
                id: selectedId,
                ts,
                threadTs,
                absTime,
                dur,
                threadDur,
                name,
                category,
                args,
                argsTree,
                description,
            };
            if (trackId !== undefined) {
                const columnInfo = (yield this.args.engine.query(`
        WITH
           leafTrackTable AS (SELECT type FROM track WHERE id = ${trackId}),
           cols AS (
                SELECT name
                FROM pragma_table_info((SELECT type FROM leafTrackTable))
            )
        SELECT
           type as leafTrackTable,
          'upid' in cols AS hasUpid,
          'utid' in cols AS hasUtid
        FROM leafTrackTable
      `)).firstRow({ hasUpid: query_result.NUM, hasUtid: query_result.NUM, leafTrackTable: query_result.STR });
                const hasUpid = columnInfo.hasUpid !== 0;
                const hasUtid = columnInfo.hasUtid !== 0;
                if (hasUtid) {
                    const utid = (yield this.args.engine.query(`
            SELECT utid
            FROM ${columnInfo.leafTrackTable}
            WHERE id = ${trackId};
        `)).firstRow({
                        utid: query_result.NUM,
                    }).utid;
                    Object.assign(selected, yield this.computeThreadDetails(utid));
                }
                else if (hasUpid) {
                    const upid = (yield this.args.engine.query(`
            SELECT upid
            FROM ${columnInfo.leafTrackTable}
            WHERE id = ${trackId};
        `)).firstRow({
                        upid: query_result.NUM,
                    }).upid;
                    Object.assign(selected, yield this.computeProcessDetails(upid));
                }
            }
            // Check selection is still the same on completion of query.
            if (selection === globals$1.globals.state.currentSelection) {
                (0, publish.publishSliceDetails)(selected);
            }
        });
    }
    describeSlice(id) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const map = new Map();
            if (id === -1)
                return map;
            const query = `
      select
        ifnull(description, '') as description,
        ifnull(doc_link, '') as docLink
      from describe_slice
      where slice_id = ${id}
    `;
            const result = yield this.args.engine.query(query);
            const it = result.iter({ description: query_result.STR, docLink: query_result.STR });
            for (; it.valid(); it.next()) {
                const description = it.description;
                const docLink = it.docLink;
                map.set('Description', description);
                map.set('Documentation', docLink);
            }
            return map;
        });
    }
    getArgs(argId) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const args = new Map();
            const query = `
      select
        key AS name,
        display_value AS value
      FROM args
      WHERE arg_set_id = ${argId}
    `;
            const result = yield this.args.engine.query(query);
            const it = result.iter({
                name: query_result.STR,
                value: query_result.STR_NULL,
            });
            for (; it.valid(); it.next()) {
                const name = it.name;
                const value = it.value || 'NULL';
                if (name === 'destination slice id' && !isNaN(Number(value))) {
                    const destTrackId = yield this.getDestTrackId(value);
                    args.set('Destination Slice', { kind: 'SLICE', trackId: destTrackId, sliceId: Number(value) });
                }
                else {
                    args.set(name, value);
                }
            }
            return args;
        });
    }
    getDestTrackId(sliceId) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const trackIdQuery = `select track_id as trackId from slice
    where slice_id = ${sliceId}`;
            const result = yield this.args.engine.query(trackIdQuery);
            const trackIdTp = result.firstRow({ trackId: query_result.NUM }).trackId;
            // TODO(hjd): If we had a consistent mapping from TP track_id
            // UI track id for slice tracks this would be unnecessary.
            let trackId = '';
            for (const track of Object.values(globals$1.globals.state.tracks)) {
                if (track.kind === chrome_slices.SLICE_TRACK_KIND &&
                    track.config.trackId === Number(trackIdTp)) {
                    trackId = track.id;
                    break;
                }
            }
            return trackId;
        });
    }
    threadStateDetails(id) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const query = `
      SELECT
        ts,
        thread_state.dur as dur,
        state,
        io_wait as ioWait,
        thread_state.utid as utid,
        thread_state.cpu as cpu,
        sched.id as id,
        thread_state.blocked_function as blockedFunction
      from thread_state
      left join sched using(ts) where thread_state.id = ${id}
    `;
            const result = yield this.args.engine.query(query);
            const selection = globals$1.globals.state.currentSelection;
            if (result.numRows() > 0 && selection) {
                const row = result.firstRow({
                    ts: query_result.NUM,
                    dur: query_result.NUM,
                    state: query_result.STR_NULL,
                    ioWait: query_result.NUM_NULL,
                    utid: query_result.NUM,
                    cpu: query_result.NUM_NULL,
                    id: query_result.NUM_NULL,
                    blockedFunction: query_result.STR_NULL,
                });
                const ts = row.ts;
                const timeFromStart = (0, time.fromNs)(ts) - globals$1.globals.state.traceTime.startSec;
                const dur = (0, time.fromNs)(row.dur);
                const ioWait = row.ioWait === null ? undefined : row.ioWait > 0;
                const state = (0, thread_state.translateState)(row.state || undefined, ioWait);
                const utid = row.utid;
                const cpu = row.cpu === null ? undefined : row.cpu;
                const sliceId = row.id === null ? undefined : row.id;
                const blockedFunction = row.blockedFunction === null ? undefined : row.blockedFunction;
                const selected = { ts: timeFromStart, dur, state, utid, cpu, sliceId, blockedFunction };
                (0, publish.publishThreadStateDetails)(selected);
            }
        });
    }
    sliceDetails(id) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const sqlQuery = `SELECT
      sched.ts,
      sched.dur,
      sched.priority,
      sched.end_state as endState,
      sched.utid,
      sched.cpu,
      thread_state.id as threadStateId
    FROM sched left join thread_state using(ts, utid, cpu)
    WHERE sched.id = ${id}`;
            const result = yield this.args.engine.query(sqlQuery);
            // Check selection is still the same on completion of query.
            const selection = globals$1.globals.state.currentSelection;
            if (result.numRows() > 0 && selection) {
                const row = result.firstRow({
                    ts: query_result.NUM,
                    dur: query_result.NUM,
                    priority: query_result.NUM,
                    endState: query_result.STR_NULL,
                    utid: query_result.NUM,
                    cpu: query_result.NUM,
                    threadStateId: query_result.NUM_NULL,
                });
                const ts = row.ts;
                const timeFromStart = (0, time.fromNs)(ts) - globals$1.globals.state.traceTime.startSec;
                const dur = (0, time.fromNs)(row.dur);
                const priority = row.priority;
                const endState = row.endState;
                const utid = row.utid;
                const cpu = row.cpu;
                const threadStateId = row.threadStateId || undefined;
                const selected = {
                    ts: timeFromStart,
                    dur,
                    priority,
                    endState,
                    cpu,
                    id,
                    utid,
                    threadStateId,
                };
                Object.assign(selected, yield this.computeThreadDetails(utid));
                this.schedulingDetails(ts, utid)
                    .then((wakeResult) => {
                    Object.assign(selected, wakeResult);
                })
                    .finally(() => {
                    (0, publish.publishSliceDetails)(selected);
                });
            }
        });
    }
    counterDetails(ts, rightTs, id) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const counter = yield this.args.engine.query(`SELECT value, track_id as trackId FROM counter WHERE id = ${id}`);
            const row = counter.iter({
                value: query_result.NUM,
                trackId: query_result.NUM,
            });
            const value = row.value;
            const trackId = row.trackId;
            // Finding previous value. If there isn't previous one, it will return 0 for
            // ts and value.
            const previous = yield this.args.engine.query(`SELECT
          MAX(ts),
          IFNULL(value, 0) as value
        FROM counter WHERE ts < ${ts} and track_id = ${trackId}`);
            const previousValue = previous.firstRow({ value: query_result.NUM }).value;
            const endTs = rightTs !== -1 ? rightTs : (0, time.toNs)(globals$1.globals.state.traceTime.endSec);
            const delta = value - previousValue;
            const duration = endTs - ts;
            const startTime = (0, time.fromNs)(ts) - globals$1.globals.state.traceTime.startSec;
            const uiTrackId = globals$1.globals.state.uiTrackIdByTraceTrackId[trackId];
            const name = uiTrackId ? globals$1.globals.state.tracks[uiTrackId].name : undefined;
            return { startTime, value, delta, duration, name };
        });
    }
    schedulingDetails(ts, utid) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            // Find the ts of the first wakeup before the current slice.
            const wakeResult = yield this.args.engine.query(`
      select ts, waker_utid as wakerUtid
      from thread_state
      where utid = ${utid} and ts < ${ts} and state = 'R'
      order by ts desc
      limit 1
    `);
            if (wakeResult.numRows() === 0) {
                return undefined;
            }
            const wakeFirstRow = wakeResult.firstRow({ ts: query_result.NUM, wakerUtid: query_result.NUM_NULL });
            const wakeupTs = wakeFirstRow.ts;
            const wakerUtid = wakeFirstRow.wakerUtid;
            if (wakerUtid === null) {
                return undefined;
            }
            // Find the previous sched slice for the current utid.
            const prevSchedResult = yield this.args.engine.query(`
      select ts
      from sched
      where utid = ${utid} and ts < ${ts}
      order by ts desc
      limit 1
    `);
            // If this is the first sched slice for this utid or if the wakeup found
            // was after the previous slice then we know the wakeup was for this slice.
            if (prevSchedResult.numRows() === 0 ||
                wakeupTs < prevSchedResult.firstRow({ ts: query_result.NUM }).ts) {
                return undefined;
            }
            // Find the sched slice with the utid of the waker running when the
            // sched wakeup occurred. This is the waker.
            const wakerResult = yield this.args.engine.query(`
      select cpu
      from sched
      where
        utid = ${wakerUtid} and
        ts < ${wakeupTs} and
        ts + dur >= ${wakeupTs};
    `);
            if (wakerResult.numRows() === 0) {
                return undefined;
            }
            const wakerRow = wakerResult.firstRow({ cpu: query_result.NUM });
            return { wakeupTs: (0, time.fromNs)(wakeupTs), wakerUtid, wakerCpu: wakerRow.cpu };
        });
    }
    computeThreadDetails(utid) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const threadInfo = (yield this.args.engine.query(`
          SELECT tid, name, upid
          FROM thread
          WHERE utid = ${utid};
      `)).firstRow({ tid: query_result.NUM, name: query_result.STR_NULL, upid: query_result.NUM_NULL });
            const threadDetails = {
                tid: threadInfo.tid,
                threadName: threadInfo.name || undefined,
            };
            if (threadInfo.upid) {
                return Object.assign({}, threadDetails, yield this.computeProcessDetails(threadInfo.upid));
            }
            return threadDetails;
        });
    }
    computeProcessDetails(upid) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const details = {};
            const processResult = (yield this.args.engine.query(`
                SELECT pid, name, uid FROM process WHERE upid = ${upid};
              `)).firstRow({ pid: query_result.NUM, name: query_result.STR_NULL, uid: query_result.NUM_NULL });
            details.pid = processResult.pid;
            details.processName = processResult.name || undefined;
            if (processResult.uid === null) {
                return details;
            }
            details.uid = processResult.uid;
            const packageResult = yield this.args.engine.query(`
                  SELECT
                    package_name as packageName,
                    version_code as versionCode
                  FROM package_list WHERE uid = ${details.uid};
                `);
            // The package_list table is not populated in some traces so we need to
            // check if the result has returned any rows.
            if (packageResult.numRows() > 0) {
                const packageDetails = packageResult.firstRow({
                    packageName: query_result.STR,
                    versionCode: query_result.NUM,
                });
                details.packageName = packageDetails.packageName;
                details.versionCode = packageDetails.versionCode;
            }
            return details;
        });
    }
}
exports.SelectionController = SelectionController;

});

var trace_error_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.TraceErrorController = void 0;



class TraceErrorController extends controller.Controller {
    constructor(args) {
        super('main');
        this.args = args;
        this.hasRun = false;
    }
    run() {
        if (this.hasRun) {
            return;
        }
        this.hasRun = true;
        const engine = this.args.engine;
        engine
            .query(`SELECT sum(value) as sumValue FROM stats WHERE severity != 'info'`)
            .then((result) => {
            const errors = result.firstRow({ sumValue: query_result.NUM }).sumValue;
            (0, publish.publishTraceErrors)(errors);
        });
    }
}
exports.TraceErrorController = TraceErrorController;

});

var trace_stream = createCommonjsModule(function (module, exports) {
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.TraceHttpStream = exports.TraceBufferStream = exports.TraceFileStream = void 0;



const SLICE_SIZE = 32 * 1024 * 1024;
// Loads a trace from a File object. For the "open file" use case.
class TraceFileStream {
    constructor(traceFile) {
        this.bytesRead = 0;
        this.traceFile = traceFile;
        this.reader = new FileReader();
        this.reader.onloadend = () => this.onLoad();
    }
    onLoad() {
        const res = (0, logging.assertExists)(this.reader.result);
        const pendingRead = (0, logging.assertExists)(this.pendingRead);
        this.pendingRead = undefined;
        if (this.reader.error) {
            pendingRead.reject(this.reader.error);
            return;
        }
        this.bytesRead += res.byteLength;
        pendingRead.resolve({
            data: new Uint8Array(res),
            eof: this.bytesRead >= this.traceFile.size,
            bytesRead: this.bytesRead,
            bytesTotal: this.traceFile.size,
        });
    }
    readChunk() {
        const sliceEnd = Math.min(this.bytesRead + SLICE_SIZE, this.traceFile.size);
        const slice = this.traceFile.slice(this.bytesRead, sliceEnd);
        this.pendingRead = (0, deferred.defer)();
        this.reader.readAsArrayBuffer(slice);
        return this.pendingRead;
    }
}
exports.TraceFileStream = TraceFileStream;
// Loads a trace from an ArrayBuffer. For the window.open() + postMessage
// use-case, used by other dashboards (see post_message_handler.ts).
class TraceBufferStream {
    constructor(traceBuf) {
        this.bytesRead = 0;
        this.traceBuf = traceBuf;
    }
    readChunk() {
        (0, logging.assertTrue)(this.bytesRead <= this.traceBuf.byteLength);
        const len = Math.min(SLICE_SIZE, this.traceBuf.byteLength - this.bytesRead);
        const data = new Uint8Array(this.traceBuf, this.bytesRead, len);
        this.bytesRead += len;
        return Promise.resolve({
            data,
            eof: this.bytesRead >= this.traceBuf.byteLength,
            bytesRead: this.bytesRead,
            bytesTotal: this.traceBuf.byteLength,
        });
    }
}
exports.TraceBufferStream = TraceBufferStream;
// Loads a stream from a URL via fetch(). For the permalink (?s=UUID) and
// open url (?url=http://...) cases.
class TraceHttpStream {
    constructor(uri) {
        this.bytesRead = 0;
        this.bytesTotal = 0;
        (0, logging.assertTrue)(uri.startsWith('http://') || uri.startsWith('https://'));
        this.uri = uri;
    }
    readChunk() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            // Initialize the fetch() job on the first read request.
            if (this.httpStream === undefined) {
                const response = yield fetch(this.uri);
                if (response.status !== 200) {
                    throw new Error(`HTTP ${response.status} - ${response.statusText}`);
                }
                const len = response.headers.get('Content-Length');
                this.bytesTotal = len ? Number.parseInt(len, 10) : 0;
                this.httpStream = response.body.getReader();
            }
            let eof = false;
            let bytesRead = 0;
            const chunks = [];
            // httpStream can return very small chunks which can slow down
            // TraceProcessor. Here we accumulate chunks until we get at least 32mb
            // or hit EOF.
            while (!eof && bytesRead < 32 * 1024 * 1024) {
                const res = yield this.httpStream.read();
                if (res.value) {
                    chunks.push(res.value);
                    bytesRead += res.value.length;
                }
                eof = res.done;
            }
            let data;
            if (chunks.length === 1) {
                data = chunks[0];
            }
            else {
                // Stitch all the chunks into one big array:
                data = new Uint8Array(bytesRead);
                let offset = 0;
                for (const chunk of chunks) {
                    data.set(chunk, offset);
                    offset += chunk.length;
                }
            }
            this.bytesRead += data.length;
            return {
                data,
                eof,
                bytesRead: this.bytesRead,
                bytesTotal: this.bytesTotal,
            };
        });
    }
}
exports.TraceHttpStream = TraceHttpStream;

});

var track_decider = createCommonjsModule(function (module, exports) {
// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.decideTracks = void 0;
























const NULL_TRACKS_FLAG = feature_flags.featureFlags.register({
    id: 'nullTracks',
    name: 'Null tracks',
    description: 'Display some empty tracks.',
    defaultValue: false,
});
const TRACKS_V2_FLAG = feature_flags.featureFlags.register({
    id: 'tracksV2',
    name: 'Tracks V2',
    description: 'Show tracks built on top of the Track V2 API.',
    defaultValue: false,
});
const MEM_DMA_COUNTER_NAME = 'mem.dma_heap';
const MEM_DMA = 'mem.dma_buffer';
const MEM_ION = 'mem.ion';
const F2FS_IOSTAT_TAG = 'f2fs_iostat.';
const F2FS_IOSTAT_GROUP_NAME = 'f2fs_iostat';
const F2FS_IOSTAT_LAT_TAG = 'f2fs_iostat_latency.';
const F2FS_IOSTAT_LAT_GROUP_NAME = 'f2fs_iostat_latency';
const DISK_IOSTAT_TAG = 'diskstat.';
const DISK_IOSTAT_GROUP_NAME = 'diskstat';
const UFS_CMD_TAG = 'io.ufs.command.tag';
const UFS_CMD_TAG_GROUP_NAME = 'io.ufs.command.tags';
const BUDDY_INFO_TAG = 'mem.buddyinfo';
const KERNEL_WAKELOCK_PREFIX = 'Wakelock';
// Sets the default 'scale' for counter tracks. If the regex matches
// then the paired mode is used. Entries are in priority order so the
// first match wins.
const COUNTER_REGEX = [
    // Power counters make more sense in rate mode since you're typically
    // interested in the slope of the graph rather than the absolute
    // value.
    [new RegExp('^power\..*$'), 'RATE'],
    // Same for network counters.
    [new RegExp('^.* (Received|Transmitted) KB$'), 'RATE'],
];
function getCounterScale(name) {
    for (const [re, scale] of COUNTER_REGEX) {
        if (name.match(re)) {
            return scale;
        }
    }
    return undefined;
}
function decideTracks(engineId, engine) {
    return tslib.__awaiter(this, void 0, void 0, function* () {
        return (new TrackDecider(engineId, engine)).decideTracks();
    });
}
exports.decideTracks = decideTracks;
class TrackDecider {
    constructor(engineId, engine) {
        this.upidToUuid = new Map();
        this.utidToUuid = new Map();
        this.tracksToAdd = [];
        this.addTrackGroupActions = [];
        this.engineId = engineId;
        this.engine = engine;
    }
    static getTrackName(args) {
        const { name, upid, utid, processName, threadName, pid, tid, kind, threadTrack, } = args;
        const hasName = name !== undefined && name !== null && name !== '[NULL]';
        const hasUpid = upid !== undefined && upid !== null;
        const hasUtid = utid !== undefined && utid !== null;
        const hasProcessName = processName !== undefined && processName !== null;
        const hasThreadName = threadName !== undefined && threadName !== null;
        const hasTid = tid !== undefined && tid !== null;
        const hasPid = pid !== undefined && pid !== null;
        const hasKind = kind !== undefined;
        const isThreadTrack = threadTrack !== undefined && threadTrack;
        // If we don't have any useful information (better than
        // upid/utid) we show the track kind to help with tracking
        // down where this is coming from.
        const kindSuffix = hasKind ? ` (${kind})` : '';
        if (isThreadTrack && hasName && hasTid) {
            return `${name} (${tid})`;
        }
        else if (hasName) {
            return `${name}`;
        }
        else if (hasUpid && hasPid && hasProcessName) {
            return `${processName} ${pid}`;
        }
        else if (hasUpid && hasPid) {
            return `Process ${pid}`;
        }
        else if (hasThreadName && hasTid) {
            return `${threadName} ${tid}`;
        }
        else if (hasTid) {
            return `Thread ${tid}`;
        }
        else if (hasUpid) {
            return `upid: ${upid}${kindSuffix}`;
        }
        else if (hasUtid) {
            return `utid: ${utid}${kindSuffix}`;
        }
        else if (hasKind) {
            return `Unnamed ${kind}`;
        }
        return 'Unknown';
    }
    addNullTracks() {
        this.tracksToAdd.push({
            engineId: this.engineId,
            kind: null_track.NULL_TRACK_KIND,
            trackSortKey: state.PrimaryTrackSortKey.NULL_TRACK,
            name: `Null track foo`,
            trackGroup: state.SCROLLING_TRACK_GROUP,
            config: {},
        });
        this.tracksToAdd.push({
            engineId: this.engineId,
            kind: null_track.NULL_TRACK_KIND,
            trackSortKey: state.PrimaryTrackSortKey.NULL_TRACK,
            name: `Null track bar`,
            trackGroup: state.SCROLLING_TRACK_GROUP,
            config: {},
        });
    }
    addCpuSchedulingTracks() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const cpus = yield this.engine.getCpus();
            for (const cpu of cpus) {
                this.tracksToAdd.push({
                    engineId: this.engineId,
                    kind: cpu_slices.CPU_SLICE_TRACK_KIND,
                    trackSortKey: state.PrimaryTrackSortKey.ORDINARY_TRACK,
                    name: `Cpu ${cpu}`,
                    trackGroup: state.SCROLLING_TRACK_GROUP,
                    config: {
                        cpu,
                    },
                });
            }
        });
    }
    addCpuFreqTracks(engine) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const cpus = yield this.engine.getCpus();
            const maxCpuFreqResult = yield engine.query(`
    select ifnull(max(value), 0) as freq
    from counter c
    inner join cpu_counter_track t on c.track_id = t.id
    where name = 'cpufreq';
  `);
            const maxCpuFreq = maxCpuFreqResult.firstRow({ freq: query_result.NUM }).freq;
            for (const cpu of cpus) {
                // Only add a cpu freq track if we have
                // cpu freq data.
                // TODO(hjd): Find a way to display cpu idle
                // events even if there are no cpu freq events.
                const cpuFreqIdleResult = yield engine.query(`
      select
        id as cpuFreqId,
        (
          select id
          from cpu_counter_track
          where name = 'cpuidle'
          and cpu = ${cpu}
          limit 1
        ) as cpuIdleId
      from cpu_counter_track
      where name = 'cpufreq' and cpu = ${cpu}
      limit 1;
    `);
                if (cpuFreqIdleResult.numRows() > 0) {
                    const row = cpuFreqIdleResult.firstRow({
                        cpuFreqId: query_result.NUM,
                        cpuIdleId: query_result.NUM_NULL,
                    });
                    const freqTrackId = row.cpuFreqId;
                    const idleTrackId = row.cpuIdleId === null ? undefined : row.cpuIdleId;
                    this.tracksToAdd.push({
                        engineId: this.engineId,
                        kind: cpu_freq.CPU_FREQ_TRACK_KIND,
                        trackSortKey: state.PrimaryTrackSortKey.ORDINARY_TRACK,
                        name: `Cpu ${cpu} Frequency`,
                        trackGroup: state.SCROLLING_TRACK_GROUP,
                        config: {
                            cpu,
                            maximumValue: maxCpuFreq,
                            freqTrackId,
                            idleTrackId,
                        },
                    });
                }
            }
        });
    }
    addGlobalAsyncTracks(engine) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const rawGlobalAsyncTracks = yield engine.query(`
      with global_tracks as materialized (
        select
          track.name,
          group_concat(track.id) as trackIds,
          count(track.id) as trackCount
        from track
        where
          (track.type = "track" or track.type = "gpu_track") and
          exists(
            select 1
            from slice
            where slice.track_id = track.id
            limit 1
          )
        group by track.name
      )
      select
        t.name as name,
        t.trackIds as trackIds,
        max_layout_depth(t.trackCount, t.trackIds) as maxDepth
      from global_tracks AS t
      order by t.name;
    `);
            const it = rawGlobalAsyncTracks.iter({
                name: query_result.STR_NULL,
                trackIds: query_result.STR,
                maxDepth: query_result.NUM,
            });
            for (; it.valid(); it.next()) {
                const name = it.name === null ? undefined : it.name;
                const rawTrackIds = it.trackIds;
                const trackIds = rawTrackIds.split(',').map((v) => Number(v));
                const maxDepth = it.maxDepth;
                const kind = async_slices.ASYNC_SLICE_TRACK_KIND;
                const track = {
                    engineId: this.engineId,
                    kind,
                    trackSortKey: state.PrimaryTrackSortKey.ASYNC_SLICE_TRACK,
                    trackGroup: state.SCROLLING_TRACK_GROUP,
                    name: TrackDecider.getTrackName({ name, kind }),
                    config: {
                        maxDepth,
                        trackIds,
                    },
                };
                this.tracksToAdd.push(track);
            }
        });
    }
    addGpuFreqTracks(engine) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const numGpus = yield this.engine.getNumberOfGpus();
            const maxGpuFreqResult = yield engine.query(`
    select ifnull(max(value), 0) as maximumValue
    from counter c
    inner join gpu_counter_track t on c.track_id = t.id
    where name = 'gpufreq';
  `);
            const maximumValue = maxGpuFreqResult.firstRow({ maximumValue: query_result.NUM }).maximumValue;
            for (let gpu = 0; gpu < numGpus; gpu++) {
                // Only add a gpu freq track if we have
                // gpu freq data.
                const freqExistsResult = yield engine.query(`
      select id
      from gpu_counter_track
      where name = 'gpufreq' and gpu_id = ${gpu}
      limit 1;
    `);
                if (freqExistsResult.numRows() > 0) {
                    const trackId = freqExistsResult.firstRow({ id: query_result.NUM }).id;
                    this.tracksToAdd.push({
                        engineId: this.engineId,
                        kind: counter.COUNTER_TRACK_KIND,
                        name: `Gpu ${gpu} Frequency`,
                        trackSortKey: state.PrimaryTrackSortKey.COUNTER_TRACK,
                        trackGroup: state.SCROLLING_TRACK_GROUP,
                        config: {
                            trackId,
                            maximumValue,
                        },
                    });
                }
            }
        });
    }
    addGlobalCounterTracks(engine) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            // Add global or GPU counter tracks that are not bound to any pid/tid.
            const globalCounters = yield engine.query(`
    select name, id
    from (
      select name, id
      from counter_track
      where type = 'counter_track'
      union
      select name, id
      from gpu_counter_track
      where name != 'gpufreq'
    )
    order by name
  `);
            const it = globalCounters.iter({
                name: query_result.STR,
                id: query_result.NUM,
            });
            for (; it.valid(); it.next()) {
                const name = it.name;
                const trackId = it.id;
                this.tracksToAdd.push({
                    engineId: this.engineId,
                    kind: counter.COUNTER_TRACK_KIND,
                    name,
                    trackSortKey: state.PrimaryTrackSortKey.COUNTER_TRACK,
                    trackGroup: state.SCROLLING_TRACK_GROUP,
                    config: {
                        name,
                        trackId,
                        scale: getCounterScale(name),
                    },
                });
            }
        });
    }
    addCpuPerfCounterTracks(engine) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            // Perf counter tracks are bound to CPUs, follow the scheduling and
            // frequency track naming convention ("Cpu N ...").
            // Note: we might not have a track for a given cpu if no data was seen from
            // it. This might look surprising in the UI, but placeholder tracks are
            // wasteful as there's no way of collapsing global counter tracks at the
            // moment.
            const result = yield engine.query(`
      select printf("Cpu %u %s", cpu, name) as name, id
      from perf_counter_track as pct
      order by perf_session_id asc, pct.name asc, cpu asc
  `);
            const it = result.iter({
                name: query_result.STR,
                id: query_result.NUM,
            });
            for (; it.valid(); it.next()) {
                const name = it.name;
                const trackId = it.id;
                this.tracksToAdd.push({
                    engineId: this.engineId,
                    kind: counter.COUNTER_TRACK_KIND,
                    name,
                    trackSortKey: state.PrimaryTrackSortKey.COUNTER_TRACK,
                    trackGroup: state.SCROLLING_TRACK_GROUP,
                    config: {
                        name,
                        trackId,
                        scale: getCounterScale(name),
                    },
                });
            }
        });
    }
    groupGlobalIonTracks() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const ionTracks = [];
            let hasSummary = false;
            for (const track of this.tracksToAdd) {
                const isIon = track.name.startsWith(MEM_ION);
                const isIonCounter = track.name === MEM_ION;
                const isDmaHeapCounter = track.name === MEM_DMA_COUNTER_NAME;
                const isDmaBuffferSlices = track.name === MEM_DMA;
                if (isIon || isIonCounter || isDmaHeapCounter || isDmaBuffferSlices) {
                    ionTracks.push(track);
                }
                hasSummary = hasSummary || isIonCounter;
                hasSummary = hasSummary || isDmaHeapCounter;
            }
            if (ionTracks.length === 0 || !hasSummary) {
                return;
            }
            const id = (0, dist$1.v4)();
            const summaryTrackId = (0, dist$1.v4)();
            let foundSummary = false;
            for (const track of ionTracks) {
                if (!foundSummary &&
                    [MEM_DMA_COUNTER_NAME, MEM_ION].includes(track.name)) {
                    foundSummary = true;
                    track.id = summaryTrackId;
                    track.trackGroup = undefined;
                }
                else {
                    track.trackGroup = id;
                }
            }
            const addGroup = actions.Actions.addTrackGroup({
                engineId: this.engineId,
                summaryTrackId,
                name: MEM_DMA_COUNTER_NAME,
                id,
                collapsed: true,
            });
            this.addTrackGroupActions.push(addGroup);
        });
    }
    groupGlobalIostatTracks(tag, group) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const iostatTracks = [];
            const devMap = new Map();
            for (const track of this.tracksToAdd) {
                if (track.name.startsWith(tag)) {
                    iostatTracks.push(track);
                }
            }
            if (iostatTracks.length === 0) {
                return;
            }
            for (const track of iostatTracks) {
                const name = track.name.split('.', 3);
                if (!devMap.has(name[1])) {
                    devMap.set(name[1], (0, dist$1.v4)());
                }
                track.name = name[2];
                track.trackGroup = devMap.get(name[1]);
            }
            for (const [key, value] of devMap) {
                const groupName = group + key;
                const summaryTrackId = (0, dist$1.v4)();
                this.tracksToAdd.push({
                    id: summaryTrackId,
                    engineId: this.engineId,
                    kind: null_track.NULL_TRACK_KIND,
                    trackSortKey: state.PrimaryTrackSortKey.NULL_TRACK,
                    name: groupName,
                    trackGroup: undefined,
                    config: {},
                });
                const addGroup = actions.Actions.addTrackGroup({
                    engineId: this.engineId,
                    summaryTrackId,
                    name: groupName,
                    id: value,
                    collapsed: true,
                });
                this.addTrackGroupActions.push(addGroup);
            }
        });
    }
    groupGlobalUfsCmdTagTracks(tag, group) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const ufsCmdTagTracks = [];
            for (const track of this.tracksToAdd) {
                if (track.name.startsWith(tag)) {
                    ufsCmdTagTracks.push(track);
                }
            }
            if (ufsCmdTagTracks.length === 0) {
                return;
            }
            const id = (0, dist$1.v4)();
            const summaryTrackId = (0, dist$1.v4)();
            ufsCmdTagTracks[0].id = summaryTrackId;
            for (const track of ufsCmdTagTracks) {
                track.trackGroup = id;
            }
            const addGroup = actions.Actions.addTrackGroup({
                engineId: this.engineId,
                summaryTrackId,
                name: group,
                id,
                collapsed: true,
            });
            this.addTrackGroupActions.push(addGroup);
        });
    }
    groupGlobalBuddyInfoTracks() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const buddyInfoTracks = [];
            const devMap = new Map();
            for (const track of this.tracksToAdd) {
                if (track.name.startsWith(BUDDY_INFO_TAG)) {
                    buddyInfoTracks.push(track);
                }
            }
            if (buddyInfoTracks.length === 0) {
                return;
            }
            for (const track of buddyInfoTracks) {
                const tokens = track.name.split('[');
                const node = tokens[1].slice(0, -1);
                const zone = tokens[2].slice(0, -1);
                const size = tokens[3].slice(0, -1);
                const groupName = 'Buddyinfo:  Node: ' + node + ' Zone: ' + zone;
                if (!devMap.has(groupName)) {
                    devMap.set(groupName, (0, dist$1.v4)());
                }
                track.name = 'Size: ' + size;
                track.trackGroup = devMap.get(groupName);
            }
            for (const [key, value] of devMap) {
                const groupName = key;
                const summaryTrackId = (0, dist$1.v4)();
                this.tracksToAdd.push({
                    id: summaryTrackId,
                    engineId: this.engineId,
                    kind: null_track.NULL_TRACK_KIND,
                    trackSortKey: state.PrimaryTrackSortKey.NULL_TRACK,
                    name: groupName,
                    trackGroup: undefined,
                    config: {},
                });
                const addGroup = actions.Actions.addTrackGroup({
                    engineId: this.engineId,
                    summaryTrackId,
                    name: groupName,
                    id: value,
                    collapsed: true,
                });
                this.addTrackGroupActions.push(addGroup);
            }
        });
    }
    groupKernelWakelockTracks() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            let groupUuid = undefined;
            for (const track of this.tracksToAdd) {
                // NB: Userspace wakelocks start with "WakeLock" not "Wakelock".
                if (track.name.startsWith(KERNEL_WAKELOCK_PREFIX)) {
                    if (groupUuid === undefined) {
                        groupUuid = (0, dist$1.v4)();
                    }
                    track.trackGroup = groupUuid;
                }
            }
            if (groupUuid !== undefined) {
                const summaryTrackId = (0, dist$1.v4)();
                this.tracksToAdd.push({
                    id: summaryTrackId,
                    engineId: this.engineId,
                    kind: null_track.NULL_TRACK_KIND,
                    trackSortKey: state.PrimaryTrackSortKey.NULL_TRACK,
                    name: 'Kernel wakelocks',
                    trackGroup: undefined,
                    config: {},
                });
                const addGroup = actions.Actions.addTrackGroup({
                    engineId: this.engineId,
                    summaryTrackId,
                    name: 'Kernel wakelocks',
                    id: groupUuid,
                    collapsed: true,
                });
                this.addTrackGroupActions.push(addGroup);
            }
        });
    }
    addLogsTrack(engine) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const result = yield engine.query(`select count(1) as cnt from android_logs`);
            const count = result.firstRow({ cnt: query_result.NUM }).cnt;
            if (count > 0) {
                this.tracksToAdd.push({
                    engineId: this.engineId,
                    kind: android_log.ANDROID_LOGS_TRACK_KIND,
                    name: 'Android logs',
                    trackSortKey: state.PrimaryTrackSortKey.ORDINARY_TRACK,
                    trackGroup: state.SCROLLING_TRACK_GROUP,
                    config: {},
                });
            }
        });
    }
    addAnnotationTracks(engine) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const sliceResult = yield engine.query(`
      select id, name, upid, group_name
      from annotation_slice_track
      order by name
    `);
            const sliceIt = sliceResult.iter({
                id: query_result.NUM,
                name: query_result.STR,
                upid: query_result.NUM,
                group_name: query_result.STR_NULL,
            });
            const groupNameToIds = new Map();
            for (; sliceIt.valid(); sliceIt.next()) {
                const id = sliceIt.id;
                const name = sliceIt.name;
                const upid = sliceIt.upid;
                const groupName = sliceIt.group_name;
                let summaryTrackId = undefined;
                let trackGroupId = upid === 0 ? state.SCROLLING_TRACK_GROUP : this.upidToUuid.get(upid);
                if (groupName) {
                    // If this is the first track encountered for a certain group,
                    // create an id for the group and use this track as the group's
                    // summary track.
                    const groupIds = groupNameToIds.get(groupName);
                    if (groupIds) {
                        trackGroupId = groupIds.id;
                    }
                    else {
                        trackGroupId = (0, dist$1.v4)();
                        summaryTrackId = (0, dist$1.v4)();
                        groupNameToIds.set(groupName, {
                            id: trackGroupId,
                            summaryTrackId,
                        });
                    }
                }
                this.tracksToAdd.push({
                    id: summaryTrackId,
                    engineId: this.engineId,
                    kind: chrome_slices.SLICE_TRACK_KIND,
                    name,
                    trackSortKey: state.PrimaryTrackSortKey.ORDINARY_TRACK,
                    trackGroup: trackGroupId,
                    config: {
                        maxDepth: 0,
                        namespace: 'annotation',
                        trackId: id,
                    },
                });
            }
            for (const [groupName, groupIds] of groupNameToIds) {
                const addGroup = actions.Actions.addTrackGroup({
                    engineId: this.engineId,
                    summaryTrackId: groupIds.summaryTrackId,
                    name: groupName,
                    id: groupIds.id,
                    collapsed: true,
                });
                this.addTrackGroupActions.push(addGroup);
            }
            const counterResult = yield engine.query(`
    SELECT
      id,
      name,
      upid,
      min_value as minValue,
      max_value as maxValue
    FROM annotation_counter_track`);
            const counterIt = counterResult.iter({
                id: query_result.NUM,
                name: query_result.STR,
                upid: query_result.NUM,
                minValue: query_result.NUM_NULL,
                maxValue: query_result.NUM_NULL,
            });
            for (; counterIt.valid(); counterIt.next()) {
                const id = counterIt.id;
                const name = counterIt.name;
                const upid = counterIt.upid;
                const minimumValue = counterIt.minValue === null ? undefined : counterIt.minValue;
                const maximumValue = counterIt.maxValue === null ? undefined : counterIt.maxValue;
                this.tracksToAdd.push({
                    engineId: this.engineId,
                    kind: 'CounterTrack',
                    name,
                    trackSortKey: state.PrimaryTrackSortKey.COUNTER_TRACK,
                    trackGroup: upid === 0 ? state.SCROLLING_TRACK_GROUP :
                        this.upidToUuid.get(upid),
                    config: {
                        name,
                        namespace: 'annotation',
                        trackId: id,
                        minimumValue,
                        maximumValue,
                    },
                });
            }
        });
    }
    addThreadStateTracks(engine) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const result = yield engine.query(`
      select
        utid,
        tid,
        upid,
        pid,
        thread.name as threadName
      from
        thread_state
        left join thread using(utid)
        left join process using(upid)
      where utid != 0
      group by utid`);
            const it = result.iter({
                utid: query_result.NUM,
                upid: query_result.NUM_NULL,
                tid: query_result.NUM_NULL,
                pid: query_result.NUM_NULL,
                threadName: query_result.STR_NULL,
            });
            for (; it.valid(); it.next()) {
                const utid = it.utid;
                const tid = it.tid;
                const upid = it.upid;
                const threadName = it.threadName;
                const uuid = this.getUuidUnchecked(utid, upid);
                if (uuid === undefined) {
                    // If a thread has no scheduling activity (i.e. the sched table has zero
                    // rows for that uid) no track group will be created and we want to skip
                    // the track creation as well.
                    continue;
                }
                const kind = thread_state$1.THREAD_STATE_TRACK_KIND;
                this.tracksToAdd.push({
                    engineId: this.engineId,
                    kind,
                    name: TrackDecider.getTrackName({ utid, tid, threadName, kind }),
                    trackGroup: uuid,
                    trackSortKey: {
                        utid,
                        priority: state.InThreadTrackSortKey.THREAD_SCHEDULING_STATE_TRACK,
                    },
                    config: { utid, tid },
                });
            }
        });
    }
    addThreadCpuSampleTracks(engine) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const result = yield engine.query(`
      select
        utid,
        tid,
        upid,
        thread.name as threadName
      from
        thread
        join (select utid
            from cpu_profile_stack_sample group by utid
        ) using(utid)
        left join process using(upid)
      where utid != 0
      group by utid`);
            const it = result.iter({
                utid: query_result.NUM,
                upid: query_result.NUM_NULL,
                tid: query_result.NUM_NULL,
                threadName: query_result.STR_NULL,
            });
            for (; it.valid(); it.next()) {
                const utid = it.utid;
                const upid = it.upid;
                const threadName = it.threadName;
                const uuid = this.getUuid(utid, upid);
                this.tracksToAdd.push({
                    engineId: this.engineId,
                    kind: cpu_profile.CPU_PROFILE_TRACK_KIND,
                    trackSortKey: {
                        utid,
                        priority: state.InThreadTrackSortKey.CPU_STACK_SAMPLES_TRACK,
                    },
                    name: `${threadName} (CPU Stack Samples)`,
                    trackGroup: uuid,
                    config: { utid },
                });
            }
        });
    }
    addThreadCounterTracks(engine) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const result = yield engine.query(`
    select
      thread_counter_track.name as trackName,
      utid,
      upid,
      tid,
      thread.name as threadName,
      thread_counter_track.id as trackId,
      thread.start_ts as startTs,
      thread.end_ts as endTs
    from thread_counter_track
    join thread using(utid)
    left join process using(upid)
    where thread_counter_track.name != 'thread_time'
  `);
            const it = result.iter({
                trackName: query_result.STR_NULL,
                utid: query_result.NUM,
                upid: query_result.NUM_NULL,
                tid: query_result.NUM_NULL,
                threadName: query_result.STR_NULL,
                startTs: query_result.NUM_NULL,
                trackId: query_result.NUM,
                endTs: query_result.NUM_NULL,
            });
            for (; it.valid(); it.next()) {
                const utid = it.utid;
                const tid = it.tid;
                const upid = it.upid;
                const trackId = it.trackId;
                const trackName = it.trackName;
                const threadName = it.threadName;
                const uuid = this.getUuid(utid, upid);
                const startTs = it.startTs === null ? undefined : it.startTs;
                const endTs = it.endTs === null ? undefined : it.endTs;
                const kind = counter.COUNTER_TRACK_KIND;
                const name = TrackDecider.getTrackName({ name: trackName, utid, tid, kind, threadName, threadTrack: true });
                this.tracksToAdd.push({
                    engineId: this.engineId,
                    kind,
                    name,
                    trackSortKey: {
                        utid,
                        priority: state.InThreadTrackSortKey.ORDINARY,
                    },
                    trackGroup: uuid,
                    config: {
                        name,
                        trackId,
                        startTs,
                        endTs,
                        tid,
                        scale: getCounterScale(name),
                    },
                });
            }
        });
    }
    addProcessAsyncSliceTracks(engine) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const result = yield engine.query(`
      with process_async_tracks as materialized (
        select
          process_track.upid as upid,
          process_track.name as trackName,
          process.name as processName,
          process.pid as pid,
          group_concat(process_track.id) as trackIds,
          count(1) as trackCount
        from process_track
        left join process using(upid)
        where
            process_track.name is null or
            process_track.name not like "% Timeline"
        group by
          process_track.upid,
          process_track.name
      )
      select
        t.*,
        max_layout_depth(t.trackCount, t.trackIds) as maxDepth
      from process_async_tracks t;
    `);
            const it = result.iter({
                upid: query_result.NUM,
                trackName: query_result.STR_NULL,
                trackIds: query_result.STR,
                processName: query_result.STR_NULL,
                pid: query_result.NUM_NULL,
                maxDepth: query_result.NUM,
            });
            for (; it.valid(); it.next()) {
                const upid = it.upid;
                const trackName = it.trackName;
                const rawTrackIds = it.trackIds;
                const trackIds = rawTrackIds.split(',').map((v) => Number(v));
                const processName = it.processName;
                const pid = it.pid;
                const maxDepth = it.maxDepth;
                const uuid = this.getUuid(0, upid);
                const kind = async_slices.ASYNC_SLICE_TRACK_KIND;
                const name = TrackDecider.getTrackName({ name: trackName, upid, pid, processName, kind });
                this.tracksToAdd.push({
                    engineId: this.engineId,
                    kind,
                    name,
                    trackSortKey: state.PrimaryTrackSortKey.ASYNC_SLICE_TRACK,
                    trackGroup: uuid,
                    config: {
                        trackIds,
                        maxDepth,
                    },
                });
            }
        });
    }
    addActualFramesTracks(engine) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const result = yield engine.query(`
      with process_async_tracks as materialized (
        select
          process_track.upid as upid,
          process_track.name as trackName,
          process.name as processName,
          process.pid as pid,
          group_concat(process_track.id) as trackIds,
          count(1) as trackCount
        from process_track
        left join process using(upid)
        where process_track.name = "Actual Timeline"
        group by
          process_track.upid,
          process_track.name
      )
      select
        t.*,
        max_layout_depth(t.trackCount, t.trackIds) as maxDepth
      from process_async_tracks t;
  `);
            const it = result.iter({
                upid: query_result.NUM,
                trackName: query_result.STR_NULL,
                trackIds: query_result.STR,
                processName: query_result.STR_NULL,
                pid: query_result.NUM_NULL,
                maxDepth: query_result.NUM,
            });
            for (; it.valid(); it.next()) {
                const upid = it.upid;
                const trackName = it.trackName;
                const rawTrackIds = it.trackIds;
                const trackIds = rawTrackIds.split(',').map((v) => Number(v));
                const processName = it.processName;
                const pid = it.pid;
                const maxDepth = it.maxDepth;
                const uuid = this.getUuid(0, upid);
                const kind = actual_frames.ACTUAL_FRAMES_SLICE_TRACK_KIND;
                const name = TrackDecider.getTrackName({ name: trackName, upid, pid, processName, kind });
                this.tracksToAdd.push({
                    engineId: this.engineId,
                    kind,
                    name,
                    trackSortKey: state.PrimaryTrackSortKey.ACTUAL_FRAMES_SLICE_TRACK,
                    trackGroup: uuid,
                    config: {
                        trackIds,
                        maxDepth,
                    },
                });
            }
        });
    }
    addExpectedFramesTracks(engine) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const result = yield engine.query(`
      with process_async_tracks as materialized (
        select
          process_track.upid as upid,
          process_track.name as trackName,
          process.name as processName,
          process.pid as pid,
          group_concat(process_track.id) as trackIds,
          count(1) as trackCount
        from process_track
        left join process using(upid)
        where process_track.name = "Expected Timeline"
        group by
          process_track.upid,
          process_track.name
      )
      select
        t.*,
        max_layout_depth(t.trackCount, t.trackIds) as maxDepth
      from process_async_tracks t;
  `);
            const it = result.iter({
                upid: query_result.NUM,
                trackName: query_result.STR_NULL,
                trackIds: query_result.STR,
                processName: query_result.STR_NULL,
                pid: query_result.NUM_NULL,
                maxDepth: query_result.NUM,
            });
            for (; it.valid(); it.next()) {
                const upid = it.upid;
                const trackName = it.trackName;
                const rawTrackIds = it.trackIds;
                const trackIds = rawTrackIds.split(',').map((v) => Number(v));
                const processName = it.processName;
                const pid = it.pid;
                const maxDepth = it.maxDepth;
                const uuid = this.getUuid(0, upid);
                const kind = expected_frames.EXPECTED_FRAMES_SLICE_TRACK_KIND;
                const name = TrackDecider.getTrackName({ name: trackName, upid, pid, processName, kind });
                this.tracksToAdd.push({
                    engineId: this.engineId,
                    kind,
                    name,
                    trackSortKey: state.PrimaryTrackSortKey.EXPECTED_FRAMES_SLICE_TRACK,
                    trackGroup: uuid,
                    config: {
                        trackIds,
                        maxDepth,
                    },
                });
            }
        });
    }
    addThreadSliceTracks(engine) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const result = yield engine.query(`
        select
          thread_track.utid as utid,
          thread_track.id as trackId,
          thread_track.name as trackName,
          EXTRACT_ARG(thread_track.source_arg_set_id,
                      'is_root_in_scope') as isDefaultTrackForScope,
          tid,
          thread.name as threadName,
          max(slice.depth) as maxDepth,
          process.upid as upid
        from slice
        join thread_track on slice.track_id = thread_track.id
        join thread using(utid)
        left join process using(upid)
        group by thread_track.id
  `);
            const it = result.iter({
                utid: query_result.NUM,
                trackId: query_result.NUM,
                trackName: query_result.STR_NULL,
                isDefaultTrackForScope: query_result.NUM_NULL,
                tid: query_result.NUM_NULL,
                threadName: query_result.STR_NULL,
                maxDepth: query_result.NUM,
                upid: query_result.NUM_NULL,
            });
            for (; it.valid(); it.next()) {
                const utid = it.utid;
                const trackId = it.trackId;
                const trackName = it.trackName;
                // Note that !!null === false.
                const isDefaultTrackForScope = !!it.isDefaultTrackForScope;
                const tid = it.tid;
                const threadName = it.threadName;
                const upid = it.upid;
                const maxDepth = it.maxDepth;
                const uuid = this.getUuid(utid, upid);
                const kind = chrome_slices.SLICE_TRACK_KIND;
                const name = TrackDecider.getTrackName({ name: trackName, utid, tid, threadName, kind });
                this.tracksToAdd.push({
                    engineId: this.engineId,
                    kind,
                    name,
                    trackGroup: uuid,
                    trackSortKey: {
                        utid,
                        priority: isDefaultTrackForScope ?
                            state.InThreadTrackSortKey.DEFAULT_TRACK :
                            state.InThreadTrackSortKey.ORDINARY,
                    },
                    config: {
                        trackId,
                        maxDepth,
                        tid,
                    },
                });
                if (TRACKS_V2_FLAG.get()) {
                    this.tracksToAdd.push({
                        engineId: this.engineId,
                        kind: 'GenericSliceTrack',
                        name,
                        trackGroup: uuid,
                        trackSortKey: {
                            utid,
                            priority: isDefaultTrackForScope ?
                                state.InThreadTrackSortKey.DEFAULT_TRACK :
                                state.InThreadTrackSortKey.ORDINARY,
                        },
                        config: { sqlTrackId: trackId },
                    });
                }
            }
        });
    }
    addProcessCounterTracks(engine) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const result = yield engine.query(`
    select
      process_counter_track.id as trackId,
      process_counter_track.name as trackName,
      upid,
      process.pid,
      process.name as processName,
      process.start_ts as startTs,
      process.end_ts as endTs
    from process_counter_track
    join process using(upid);
  `);
            const it = result.iter({
                trackId: query_result.NUM,
                trackName: query_result.STR_NULL,
                upid: query_result.NUM,
                pid: query_result.NUM_NULL,
                processName: query_result.STR_NULL,
                startTs: query_result.NUM_NULL,
                endTs: query_result.NUM_NULL,
            });
            for (; it.valid(); it.next()) {
                const pid = it.pid;
                const upid = it.upid;
                const trackId = it.trackId;
                const trackName = it.trackName;
                const processName = it.processName;
                const uuid = this.getUuid(0, upid);
                const startTs = it.startTs === null ? undefined : it.startTs;
                const endTs = it.endTs === null ? undefined : it.endTs;
                const kind = counter.COUNTER_TRACK_KIND;
                const name = TrackDecider.getTrackName({ name: trackName, upid, pid, kind, processName });
                this.tracksToAdd.push({
                    engineId: this.engineId,
                    kind,
                    name,
                    trackSortKey: yield this.resolveTrackSortKeyForProcessCounterTrack(upid, trackName || undefined),
                    trackGroup: uuid,
                    config: {
                        name,
                        trackId,
                        startTs,
                        endTs,
                        scale: getCounterScale(name),
                    },
                });
            }
        });
    }
    addProcessHeapProfileTracks(engine) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const result = yield engine.query(`
    select distinct(upid) from heap_profile_allocation
    union
    select distinct(upid) from heap_graph_object
  `);
            for (const it = result.iter({ upid: query_result.NUM }); it.valid(); it.next()) {
                const upid = it.upid;
                const uuid = this.getUuid(0, upid);
                this.tracksToAdd.push({
                    engineId: this.engineId,
                    kind: heap_profile.HEAP_PROFILE_TRACK_KIND,
                    trackSortKey: state.PrimaryTrackSortKey.HEAP_PROFILE_TRACK,
                    name: `Heap Profile`,
                    trackGroup: uuid,
                    config: { upid },
                });
            }
        });
    }
    addProcessPerfSamplesTracks(engine) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const result = yield engine.query(`
      select distinct upid, pid
      from perf_sample join thread using (utid) join process using (upid)
      where callsite_id is not null
  `);
            for (const it = result.iter({ upid: query_result.NUM, pid: query_result.NUM }); it.valid(); it.next()) {
                const upid = it.upid;
                const pid = it.pid;
                const uuid = this.getUuid(0, upid);
                this.tracksToAdd.push({
                    engineId: this.engineId,
                    kind: perf_samples_profile.PERF_SAMPLES_PROFILE_TRACK_KIND,
                    trackSortKey: state.PrimaryTrackSortKey.PERF_SAMPLES_PROFILE_TRACK,
                    name: `Callstacks ${pid}`,
                    trackGroup: uuid,
                    config: { upid },
                });
            }
        });
    }
    getUuidUnchecked(utid, upid) {
        return upid === null ? this.utidToUuid.get(utid) :
            this.upidToUuid.get(upid);
    }
    getUuid(utid, upid) {
        return (0, logging.assertExists)(this.getUuidUnchecked(utid, upid));
    }
    getOrCreateUuid(utid, upid) {
        let uuid = this.getUuidUnchecked(utid, upid);
        if (uuid === undefined) {
            uuid = (0, dist$1.v4)();
            if (upid === null) {
                this.utidToUuid.set(utid, uuid);
            }
            else {
                this.upidToUuid.set(upid, uuid);
            }
        }
        return uuid;
    }
    setUuidForUpid(upid, uuid) {
        this.upidToUuid.set(upid, uuid);
    }
    addKernelThreadGrouping(engine) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            // Identify kernel threads if this is a linux system trace, and sufficient
            // process information is available. Kernel threads are identified by being
            // children of kthreadd (always pid 2).
            // The query will return the kthreadd process row first, which must exist
            // for any other kthreads to be returned by the query.
            // TODO(rsavitski): figure out how to handle the idle process (swapper),
            // which has pid 0 but appears as a distinct process (with its own comm) on
            // each cpu. It'd make sense to exclude its thread state track, but still
            // put process-scoped tracks in this group.
            const result = yield engine.query(`
      select
        t.utid, p.upid, (case p.pid when 2 then 1 else 0 end) isKthreadd
      from
        thread t
        join process p using (upid)
        left join process parent on (p.parent_upid = parent.upid)
        join
          (select true from metadata m
             where (m.name = 'system_name' and m.str_value = 'Linux')
           union
           select 1 from (select true from sched limit 1))
      where
        p.pid = 2 or parent.pid = 2
      order by isKthreadd desc
    `);
            const it = result.iter({
                utid: query_result.NUM,
                upid: query_result.NUM,
            });
            // Not applying kernel thread grouping.
            if (!it.valid()) {
                return;
            }
            // Create the track group. Use kthreadd's PROCESS_SUMMARY_TRACK for the
            // main track. It doesn't summarise the kernel threads within the group,
            // but creating a dedicated track type is out of scope at the time of
            // writing.
            const kthreadGroupUuid = (0, dist$1.v4)();
            const summaryTrackId = (0, dist$1.v4)();
            this.tracksToAdd.push({
                id: summaryTrackId,
                engineId: this.engineId,
                kind: process_summary.PROCESS_SUMMARY_TRACK,
                trackSortKey: state.PrimaryTrackSortKey.PROCESS_SUMMARY_TRACK,
                name: `Kernel thread summary`,
                config: { pidForColor: 2, upid: it.upid, utid: it.utid },
            });
            const addTrackGroup = actions.Actions.addTrackGroup({
                engineId: this.engineId,
                summaryTrackId,
                name: `Kernel threads`,
                id: kthreadGroupUuid,
                collapsed: true,
            });
            this.addTrackGroupActions.push(addTrackGroup);
            // Set the group for all kernel threads (including kthreadd itself).
            for (; it.valid(); it.next()) {
                this.setUuidForUpid(it.upid, kthreadGroupUuid);
            }
        });
    }
    addProcessTrackGroups(engine) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            // We want to create groups of tracks in a specific order.
            // The tracks should be grouped:
            //    by upid
            //    or (if upid is null) by utid
            // the groups should be sorted by:
            //  Chrome-based process rank based on process names (e.g. Browser)
            //  has a heap profile or not
            //  total cpu time *for the whole parent process*
            //  process name
            //  upid
            //  thread name
            //  utid
            const result = yield engine.query(`
    select
      the_tracks.upid,
      the_tracks.utid,
      total_dur as hasSched,
      hasHeapProfiles,
      process.pid as pid,
      thread.tid as tid,
      process.name as processName,
      thread.name as threadName,
      ifnull((
        select group_concat(string_value)
        from args
        where
          process.arg_set_id is not null and
          arg_set_id = process.arg_set_id and
          flat_key = 'chrome.process_label'
      ), '') AS chromeProcessLabels,
      (case process.name
         when 'Browser' then 3
         when 'Gpu' then 2
         when 'Renderer' then 1
         else 0
      end) as chromeProcessRank
    from (
      select upid, 0 as utid from process_track
      union
      select upid, 0 as utid from process_counter_track
      union
      select upid, utid from thread_counter_track join thread using(utid)
      union
      select upid, utid from thread_track join thread using(utid)
      union
      select upid, utid from sched join thread using(utid) group by utid
      union
      select upid, 0 as utid from (
        select distinct upid
        from perf_sample join thread using (utid) join process using (upid)
        where callsite_id is not null)
      union
      select upid, utid from (
        select distinct(utid) from cpu_profile_stack_sample
      ) join thread using(utid)
      union
      select distinct(upid) as upid, 0 as utid from heap_profile_allocation
      union
      select distinct(upid) as upid, 0 as utid from heap_graph_object
    ) the_tracks
    left join (
      select upid, sum(thread_total_dur) as total_dur
      from (
        select utid, sum(dur) as thread_total_dur
        from sched where dur != -1 and utid != 0
        group by utid
      )
      join thread using (utid)
      group by upid
    ) using(upid)
    left join (
      select
        distinct(upid) as upid,
        true as hasHeapProfiles
      from heap_profile_allocation
      union
      select
        distinct(upid) as upid,
        true as hasHeapProfiles
      from heap_graph_object
    ) using (upid)
    left join (
      select
        thread.upid as upid,
        sum(cnt) as perfSampleCount
      from (
          select utid, count(*) as cnt
          from perf_sample where callsite_id is not null
          group by utid
      ) join thread using (utid)
      group by thread.upid
    ) using (upid)
    left join (
      select
        process.upid as upid,
        sum(cnt) as sliceCount
      from (select track_id, count(*) as cnt from slice group by track_id)
        left join thread_track on track_id = thread_track.id
        left join thread on thread_track.utid = thread.utid
        left join process_track on track_id = process_track.id
        join process on process.upid = thread.upid
          or process_track.upid = process.upid
      where process.upid is not null
      group by process.upid
    ) using (upid)
    left join thread using(utid)
    left join process using(upid)
    order by
      chromeProcessRank desc,
      hasHeapProfiles desc,
      perfSampleCount desc,
      total_dur desc,
      sliceCount desc,
      processName asc nulls last,
      the_tracks.upid asc nulls last,
      threadName asc nulls last,
      the_tracks.utid asc nulls last;
  `);
            const it = result.iter({
                utid: query_result.NUM,
                upid: query_result.NUM_NULL,
                tid: query_result.NUM_NULL,
                pid: query_result.NUM_NULL,
                threadName: query_result.STR_NULL,
                processName: query_result.STR_NULL,
                hasSched: query_result.NUM_NULL,
                hasHeapProfiles: query_result.NUM_NULL,
                chromeProcessLabels: query_result.STR,
            });
            for (; it.valid(); it.next()) {
                const utid = it.utid;
                const tid = it.tid;
                const upid = it.upid;
                const pid = it.pid;
                const threadName = it.threadName;
                const processName = it.processName;
                const hasSched = !!it.hasSched;
                const hasHeapProfiles = !!it.hasHeapProfiles;
                // Group by upid if present else by utid.
                let pUuid = upid === null ? this.utidToUuid.get(utid) : this.upidToUuid.get(upid);
                // These should only happen once for each track group.
                if (pUuid === undefined) {
                    pUuid = this.getOrCreateUuid(utid, upid);
                    const summaryTrackId = (0, dist$1.v4)();
                    const pidForColor = pid || tid || upid || utid || 0;
                    const kind = hasSched ? process_scheduling.PROCESS_SCHEDULING_TRACK_KIND : process_summary.PROCESS_SUMMARY_TRACK;
                    this.tracksToAdd.push({
                        id: summaryTrackId,
                        engineId: this.engineId,
                        kind,
                        trackSortKey: hasSched ?
                            state.PrimaryTrackSortKey.PROCESS_SCHEDULING_TRACK :
                            state.PrimaryTrackSortKey.PROCESS_SUMMARY_TRACK,
                        name: `${upid === null ? tid : pid} summary`,
                        config: { pidForColor, upid, utid, tid },
                        labels: it.chromeProcessLabels.split(','),
                    });
                    const name = TrackDecider.getTrackName({ utid, processName, pid, threadName, tid, upid });
                    const addTrackGroup = actions.Actions.addTrackGroup({
                        engineId: this.engineId,
                        summaryTrackId,
                        name,
                        id: pUuid,
                        // Perf profiling tracks remain collapsed, otherwise we would have too
                        // many expanded process tracks for some perf traces, leading to
                        // jankyness.
                        collapsed: !hasHeapProfiles,
                    });
                    this.addTrackGroupActions.push(addTrackGroup);
                }
            }
        });
    }
    computeThreadOrderingMetadata() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const result = yield this.engine.query(`
    select
      utid,
      tid,
      pid,
      thread.name as threadName
    from thread
    left join process using(upid)`);
            const it = result.iter({
                utid: query_result.NUM,
                tid: query_result.NUM_NULL,
                pid: query_result.NUM_NULL,
                threadName: query_result.STR_NULL,
            });
            const threadOrderingMetadata = {};
            for (; it.valid(); it.next()) {
                threadOrderingMetadata[it.utid] = {
                    tid: it.tid === null ? undefined : it.tid,
                    sortKey: TrackDecider.getThreadSortKey(it.threadName, it.tid, it.pid),
                };
            }
            return threadOrderingMetadata;
        });
    }
    defineMaxLayoutDepthSqlFunction() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            yield this.engine.query(`
      select create_function(
        'max_layout_depth(track_count INT, track_ids STRING)',
        'INT',
        '
          select ifnull(iif(
            $track_count = 1,
            (
              select max(depth)
              from slice
              where track_id = cast($track_ids AS int)
            ),
            (
              select max(layout_depth)
              from experimental_slice_layout($track_ids)
            )
          ), 0);
        '
      );
    `);
        });
    }
    decideTracks() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            // Add first the global tracks that don't require per-process track groups.
            if (NULL_TRACKS_FLAG.get()) {
                yield this.addNullTracks();
            }
            yield this.defineMaxLayoutDepthSqlFunction();
            yield this.addCpuSchedulingTracks();
            yield this.addCpuFreqTracks(this.engine.getProxy('TrackDecider::addCpuFreqTracks'));
            yield this.addGlobalAsyncTracks(this.engine.getProxy('TrackDecider::addCpuFreqTracks'));
            yield this.addGpuFreqTracks(this.engine.getProxy('TrackDecider::addCpuFreqTracks'));
            yield this.addGlobalCounterTracks(this.engine.getProxy('TrackDecider::addCpuFreqTracks'));
            yield this.addCpuPerfCounterTracks(this.engine.getProxy('TrackDecider::addCpuFreqTracks'));
            yield this.addAnnotationTracks(this.engine.getProxy('TrackDecider::addCpuFreqTracks'));
            yield this.groupGlobalIonTracks();
            yield this.groupGlobalIostatTracks(F2FS_IOSTAT_TAG, F2FS_IOSTAT_GROUP_NAME);
            yield this.groupGlobalIostatTracks(F2FS_IOSTAT_LAT_TAG, F2FS_IOSTAT_LAT_GROUP_NAME);
            yield this.groupGlobalIostatTracks(DISK_IOSTAT_TAG, DISK_IOSTAT_GROUP_NAME);
            yield this.groupGlobalUfsCmdTagTracks(UFS_CMD_TAG, UFS_CMD_TAG_GROUP_NAME);
            yield this.groupGlobalBuddyInfoTracks();
            yield this.groupKernelWakelockTracks();
            // Pre-group all kernel "threads" (actually processes) if this is a linux
            // system trace. Below, addProcessTrackGroups will skip them due to an
            // existing group uuid, and addThreadStateTracks will fill in the
            // per-thread tracks. Quirk: since all threads will appear to be
            // TrackKindPriority.MAIN_THREAD, any process-level tracks will end up
            // pushed to the bottom of the group in the UI.
            yield this.addKernelThreadGrouping(this.engine.getProxy('TrackDecider::addCpuFreqTracks'));
            // Create the per-process track groups. Note that this won't necessarily
            // create a track per process. If a process has been completely idle and has
            // no sched events, no track group will be emitted.
            // Will populate this.addTrackGroupActions
            yield this.addProcessTrackGroups(this.engine.getProxy('TrackDecider::addCpuFreqTracks'));
            yield this.addProcessHeapProfileTracks(this.engine.getProxy('TrackDecider::addCpuFreqTracks'));
            if (feature_flags.PERF_SAMPLE_FLAG.get()) {
                yield this.addProcessPerfSamplesTracks(this.engine.getProxy('TrackDecider::addCpuFreqTracks'));
            }
            yield this.addProcessCounterTracks(this.engine.getProxy('TrackDecider::addCpuFreqTracks'));
            yield this.addProcessAsyncSliceTracks(this.engine.getProxy('TrackDecider::addCpuFreqTracks'));
            yield this.addActualFramesTracks(this.engine.getProxy('TrackDecider::addCpuFreqTracks'));
            yield this.addExpectedFramesTracks(this.engine.getProxy('TrackDecider::addCpuFreqTracks'));
            yield this.addThreadCounterTracks(this.engine.getProxy('TrackDecider::addCpuFreqTracks'));
            yield this.addThreadStateTracks(this.engine.getProxy('TrackDecider::addCpuFreqTracks'));
            yield this.addThreadSliceTracks(this.engine.getProxy('TrackDecider::addCpuFreqTracks'));
            yield this.addThreadCpuSampleTracks(this.engine.getProxy('TrackDecider::addCpuFreqTracks'));
            yield this.addLogsTrack(this.engine.getProxy('TrackDecider::addCpuFreqTracks'));
            // TODO(hjd): Move into plugin API.
            {
                const result = (0, chrome_scroll_jank.decideTracks)(this.engine, (utid, upid) => {
                    return this.getUuid(utid, upid);
                });
                if (result !== null) {
                    const { tracksToAdd } = yield result;
                    this.tracksToAdd.push(...tracksToAdd);
                }
            }
            this.addTrackGroupActions.push(actions.Actions.addTracks({ tracks: this.tracksToAdd }));
            const threadOrderingMetadata = yield this.computeThreadOrderingMetadata();
            this.addTrackGroupActions.push(actions.Actions.setUtidToTrackSortKey({ threadOrderingMetadata }));
            return this.addTrackGroupActions;
        });
    }
    // Some process counter tracks are tied to specific threads based on their
    // name.
    resolveTrackSortKeyForProcessCounterTrack(upid, threadName) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            if (threadName !== 'GPU completion') {
                return state.PrimaryTrackSortKey.COUNTER_TRACK;
            }
            const result = yield this.engine.query(`
    select utid
    from thread
    where upid=${upid} and name=${(0, string_utils.sqliteString)(threadName)}
    `);
            const it = result.iter({
                utid: query_result.NUM,
            });
            for (; it; it.next()) {
                return {
                    utid: it.utid,
                    priority: state.InThreadTrackSortKey.THREAD_COUNTER_TRACK,
                };
            }
            return state.PrimaryTrackSortKey.COUNTER_TRACK;
        });
    }
    static getThreadSortKey(threadName, tid, pid) {
        if (pid !== undefined && pid !== null && pid === tid) {
            return state.PrimaryTrackSortKey.MAIN_THREAD;
        }
        if (threadName === undefined || threadName === null) {
            return state.PrimaryTrackSortKey.ORDINARY_THREAD;
        }
        // Chrome main threads should always come first within their process.
        if (threadName === 'CrBrowserMain' || threadName === 'CrRendererMain' ||
            threadName === 'CrGpuMain') {
            return state.PrimaryTrackSortKey.MAIN_THREAD;
        }
        // Chrome IO threads should always come immediately after the main thread.
        if (threadName === 'Chrome_ChildIOThread' ||
            threadName === 'Chrome_IOThread') {
            return state.PrimaryTrackSortKey.CHROME_IO_THREAD;
        }
        // A Chrome process can have only one compositor thread, so we want to put
        // it next to other named processes.
        if (threadName === 'Compositor' || threadName === 'VizCompositorThread') {
            return state.PrimaryTrackSortKey.CHROME_COMPOSITOR_THREAD;
        }
        switch (true) {
            case /.*RenderThread.*/.test(threadName):
                return state.PrimaryTrackSortKey.RENDER_THREAD;
            case /.*GPU completion.*/.test(threadName):
                return state.PrimaryTrackSortKey.GPU_COMPLETION_THREAD;
            default:
                return state.PrimaryTrackSortKey.ORDINARY_THREAD;
        }
    }
}

});

var visualised_args_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2022 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.VisualisedArgController = void 0;








class VisualisedArgController extends controller.Controller {
    constructor(args) {
        super('init');
        this.argName = args.argName;
        this.engine = args.engine;
        this.escapedArgName = this.argName.replace(/[^a-zA-Z]/g, '_');
        this.tableName = `__arg_visualisation_helper_${this.escapedArgName}_slice`;
        this.addedTrackIds = [];
    }
    onDestroy() {
        this.engine.query(`drop table if exists ${this.tableName}`);
        globals$1.globals.dispatch(actions.Actions.removeVisualisedArgTracks({ trackIds: this.addedTrackIds }));
    }
    createTracks() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const result = yield this.engine.query(`
        drop table if exists ${this.tableName};

        create table ${this.tableName} as
        with slice_with_arg as (
          select
            slice.id,
            slice.track_id,
            slice.ts,
            slice.dur,
            slice.thread_dur,
            NULL as cat,
            args.display_value as name
          from slice
          join args using (arg_set_id)
          where args.key='${this.argName}'
        )
        select
          *,
          (select count()
           from ancestor_slice(s1.id) s2
           join slice_with_arg s3 on s2.id=s3.id
          ) as depth
        from slice_with_arg s1
        order by id;

        select
          track_id as trackId,
          max(depth) as maxDepth
        from ${this.tableName}
        group by track_id;
    `);
            const tracksToAdd = [];
            const it = result.iter({ 'trackId': query_result.NUM, 'maxDepth': query_result.NUM });
            for (; it.valid(); it.next()) {
                const track = globals$1.globals.state
                    .tracks[globals$1.globals.state.uiTrackIdByTraceTrackId[it.trackId]];
                const utid = track.trackSortKey.utid;
                const id = (0, dist$1.v4)();
                this.addedTrackIds.push(id);
                tracksToAdd.push({
                    id,
                    trackGroup: track.trackGroup,
                    engineId: this.engine.id,
                    kind: visualised_args.VISUALISED_ARGS_SLICE_TRACK_KIND,
                    name: this.argName,
                    trackSortKey: utid === undefined ?
                        track.trackSortKey :
                        { utid, priority: state.InThreadTrackSortKey.VISUALISED_ARGS_TRACK },
                    config: {
                        maxDepth: it.maxDepth,
                        namespace: `__arg_visualisation_helper_${this.escapedArgName}`,
                        trackId: it.trackId,
                        argName: this.argName,
                        tid: track.config.tid,
                    },
                });
            }
            globals$1.globals.dispatch(actions.Actions.addTracks({ tracks: tracksToAdd }));
            globals$1.globals.dispatch(actions.Actions.sortThreadTracks({}));
        });
    }
    run() {
        switch (this.state) {
            case 'init':
                this.createTracks();
                this.setState('running');
                break;
            case 'running':
                // Nothing to do here.
                break;
            default:
                throw new Error(`Unexpected state ${this.state}`);
        }
    }
}
exports.VisualisedArgController = VisualisedArgController;

});

var trace_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.TraceController = void 0;







































const METRICS = [
    'android_startup',
    'android_ion',
    'android_lmk',
    'android_dma_heap',
    'android_surfaceflinger',
    'android_batt',
    'android_sysui_cuj',
    'android_camera',
    'android_other_traces',
    'chrome_dropped_frames',
    'chrome_long_latency',
    'trace_metadata',
    'android_trusty_workqueues',
];
const FLAGGED_METRICS = METRICS.map((m) => {
    const id = `forceMetric${m}`;
    let name = m.split('_').join(' ') + ' metric';
    name = name[0].toUpperCase() + name.slice(1);
    const flag = feature_flags.featureFlags.register({
        id,
        name,
        description: `Overrides running the '${m}' metric at import time.`,
        defaultValue: true,
    });
    return [flag, m];
});
const ENABLE_CHROME_RELIABLE_RANGE_ZOOM_FLAG = feature_flags.featureFlags.register({
    id: 'enableChromeReliableRangeZoom',
    name: 'Enable Chrome reliable range zoom',
    description: 'Automatically zoom into the reliable range for Chrome traces',
    defaultValue: false,
});
const ENABLE_CHROME_RELIABLE_RANGE_ANNOTATION_FLAG = feature_flags.featureFlags.register({
    id: 'enableChromeReliableRangeAnnotation',
    name: 'Enable Chrome reliable range annotation',
    description: 'Automatically adds an annotation for the reliable range start',
    defaultValue: false,
});
function showJsonWarning() {
    (0, modal.showModal)({
        title: 'Warning',
        content: m('div', m('span', 'Perfetto UI features are limited for JSON traces. ', 'We recommend recording ', m('a', { href: 'https://perfetto.dev/docs/quickstart/chrome-tracing' }, 'proto-format traces'), ' from Chrome.'), m('br')),
        buttons: [],
    });
}
// TraceController handles handshakes with the frontend for everything that
// concerns a single trace. It owns the WASM trace processor engine, handles
// tracks data and SQL queries. There is one TraceController instance for each
// trace opened in the UI (for now only one trace is supported).
class TraceController extends controller.Controller {
    constructor(engineId) {
        super('init');
        this.engineId = engineId;
    }
    run() {
        const engineCfg = (0, logging.assertExists)(globals$1.globals.state.engines[this.engineId]);
        switch (this.state) {
            case 'init':
                this.loadTrace()
                    .then((mode) => {
                    globals$1.globals.dispatch(actions.Actions.setEngineReady({
                        engineId: this.engineId,
                        ready: true,
                        mode,
                    }));
                })
                    .catch((err) => {
                    this.updateStatus(`${err}`);
                    throw err;
                });
                this.updateStatus('Opening trace');
                this.setState('loading_trace');
                break;
            case 'loading_trace':
                // Stay in this state until loadTrace() returns and marks the engine as
                // ready.
                if (this.engine === undefined || !engineCfg.ready)
                    return;
                this.setState('ready');
                break;
            case 'ready':
                // At this point we are ready to serve queries and handle tracks.
                const engine = (0, logging.assertExists)(this.engine);
                const childControllers = [];
                // Create a TrackController for each track.
                for (const trackId of Object.keys(globals$1.globals.state.tracks)) {
                    const trackCfg = globals$1.globals.state.tracks[trackId];
                    if (trackCfg.engineId !== this.engineId)
                        continue;
                    if (!track_controller.trackControllerRegistry.has(trackCfg.kind))
                        continue;
                    const trackCtlFactory = track_controller.trackControllerRegistry.get(trackCfg.kind);
                    const trackArgs = { trackId, engine };
                    childControllers.push((0, controller.Child)(trackId, trackCtlFactory, trackArgs));
                }
                // Create a QueryController for each query.
                for (const queryId of Object.keys(globals$1.globals.state.queries)) {
                    // If the expected engineId was not specified in the query, we
                    // assume it's `state.currentEngineId`. The engineId is not specified
                    // for instances with queries created prior to the creation of the
                    // first engine.
                    const expectedEngineId = globals$1.globals.state.queries[queryId].engineId ||
                        globals.globals.state.currentEngineId;
                    // Check that we are executing the query on the correct engine.
                    if (expectedEngineId !== engine.id) {
                        continue;
                    }
                    const queryArgs = { queryId, engine };
                    childControllers.push((0, controller.Child)(queryId, query_controller.QueryController, queryArgs));
                }
                for (const argName of globals$1.globals.state.visualisedArgs) {
                    childControllers.push((0, controller.Child)(argName, visualised_args_controller.VisualisedArgController, { argName, engine }));
                }
                const selectionArgs = { engine };
                childControllers.push((0, controller.Child)('selection', selection_controller.SelectionController, selectionArgs));
                const flowEventsArgs = { engine };
                childControllers.push((0, controller.Child)('flowEvents', flow_events_controller.FlowEventsController, flowEventsArgs));
                const cpuProfileArgs = { engine };
                childControllers.push((0, controller.Child)('cpuProfile', cpu_profile_controller.CpuProfileController, cpuProfileArgs));
                const flamegraphArgs = { engine };
                childControllers.push((0, controller.Child)('flamegraph', flamegraph_controller.FlamegraphController, flamegraphArgs));
                childControllers.push((0, controller.Child)('cpu_aggregation', cpu_aggregation_controller.CpuAggregationController, { engine, kind: 'cpu_aggregation' }));
                childControllers.push((0, controller.Child)('thread_aggregation', thread_aggregation_controller.ThreadAggregationController, { engine, kind: 'thread_state_aggregation' }));
                childControllers.push((0, controller.Child)('cpu_process_aggregation', cpu_by_process_aggregation_controller.CpuByProcessAggregationController, { engine, kind: 'cpu_by_process_aggregation' }));
                if (!pivot_table_redux_controller.PIVOT_TABLE_REDUX_FLAG.get()) {
                    // Pivot table is supposed to handle the use cases the slice
                    // aggregation panel is used right now. When a flag to use pivot
                    // tables is enabled, do not add slice aggregation controller.
                    childControllers.push((0, controller.Child)('slice_aggregation', slice_aggregation_controller.SliceAggregationController, { engine, kind: 'slice_aggregation' }));
                }
                childControllers.push((0, controller.Child)('counter_aggregation', counter_aggregation_controller.CounterAggregationController, { engine, kind: 'counter_aggregation' }));
                childControllers.push((0, controller.Child)('frame_aggregation', frame_aggregation_controller.FrameAggregationController, { engine, kind: 'frame_aggregation' }));
                childControllers.push((0, controller.Child)('search', search_controller.SearchController, {
                    engine,
                    app: globals$1.globals,
                }));
                childControllers.push((0, controller.Child)('pivot_table_redux', pivot_table_redux_controller.PivotTableReduxController, { engine }));
                childControllers.push((0, controller.Child)('logs', logs_controller.LogsController, {
                    engine,
                    app: globals$1.globals,
                }));
                childControllers.push((0, controller.Child)('traceError', trace_error_controller.TraceErrorController, { engine }));
                childControllers.push((0, controller.Child)('metrics', metrics_controller.MetricsController, { engine }));
                return childControllers;
            default:
                throw new Error(`unknown state ${this.state}`);
        }
        return;
    }
    onDestroy() {
        globals.globals.engines.delete(this.engineId);
    }
    loadTrace() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            this.updateStatus('Creating trace processor');
            // Check if there is any instance of the trace_processor_shell running in
            // HTTP RPC mode (i.e. trace_processor_shell -D).
            let engineMode;
            let useRpc = false;
            if (globals$1.globals.state.newEngineMode === 'USE_HTTP_RPC_IF_AVAILABLE') {
                useRpc = (yield http_rpc_engine.HttpRpcEngine.checkConnection()).connected;
            }
            let engine;
            if (useRpc) {
                console.log('Opening trace using native accelerator over HTTP+RPC');
                engineMode = 'HTTP_RPC';
                engine = new http_rpc_engine.HttpRpcEngine(this.engineId, loading_manager.LoadingManager.getInstance);
                engine.errorHandler = (err) => {
                    globals$1.globals.dispatch(actions.Actions.setEngineFailed({ mode: 'HTTP_RPC', failure: `${err}` }));
                    throw err;
                };
            }
            else {
                console.log('Opening trace using built-in WASM engine');
                engineMode = 'WASM';
                const enginePort = (0, wasm_engine_proxy.resetEngineWorker)();
                engine = new wasm_engine_proxy.WasmEngineProxy(this.engineId, enginePort, loading_manager.LoadingManager.getInstance);
            }
            this.engine = engine;
            if ((0, metatracing.isMetatracingEnabled)()) {
                this.engine.enableMetatrace((0, logging.assertExists)((0, metatracing.getEnabledMetatracingCategories)()));
            }
            globals.globals.engines.set(this.engineId, engine);
            globals$1.globals.dispatch(actions.Actions.setEngineReady({
                engineId: this.engineId,
                ready: false,
                mode: engineMode,
            }));
            const engineCfg = (0, logging.assertExists)(globals$1.globals.state.engines[this.engineId]);
            let traceStream;
            if (engineCfg.source.type === 'FILE') {
                traceStream = new trace_stream.TraceFileStream(engineCfg.source.file);
            }
            else if (engineCfg.source.type === 'ARRAY_BUFFER') {
                traceStream = new trace_stream.TraceBufferStream(engineCfg.source.buffer);
            }
            else if (engineCfg.source.type === 'URL') {
                traceStream = new trace_stream.TraceHttpStream(engineCfg.source.url);
            }
            else if (engineCfg.source.type === 'HTTP_RPC') {
                traceStream = undefined;
            }
            else {
                throw new Error(`Unknown source: ${JSON.stringify(engineCfg.source)}`);
            }
            // |traceStream| can be undefined in the case when we are using the external
            // HTTP+RPC endpoint and the trace processor instance has already loaded
            // a trace (because it was passed as a cmdline argument to
            // trace_processor_shell). In this case we don't want the UI to load any
            // file/stream and we just want to jump to the loading phase.
            if (traceStream !== undefined) {
                const tStart = performance.now();
                for (;;) {
                    const res = yield traceStream.readChunk();
                    yield this.engine.parse(res.data);
                    const elapsed = (performance.now() - tStart) / 1000;
                    let status = 'Loading trace ';
                    if (res.bytesTotal > 0) {
                        const progress = Math.round(res.bytesRead / res.bytesTotal * 100);
                        status += `${progress}%`;
                    }
                    else {
                        status += `${Math.round(res.bytesRead / 1e6)} MB`;
                    }
                    status += ` - ${Math.ceil(res.bytesRead / elapsed / 1e6)} MB/s`;
                    this.updateStatus(status);
                    if (res.eof)
                        break;
                }
                yield this.engine.notifyEof();
            }
            else {
                (0, logging.assertTrue)(this.engine instanceof http_rpc_engine.HttpRpcEngine);
                yield this.engine.restoreInitialTables();
            }
            // traceUuid will be '' if the trace is not cacheable (URL or RPC).
            const traceUuid = yield this.cacheCurrentTrace();
            const traceTime = yield this.engine.getTraceTimeBounds();
            let startSec = traceTime.start;
            let endSec = traceTime.end;
            startSec -= constants.TRACE_MARGIN_TIME_S;
            endSec += constants.TRACE_MARGIN_TIME_S;
            const traceTimeState = {
                startSec,
                endSec,
            };
            {
                // Show warning if the trace is in JSON format.
                const query = `select str_value from metadata where name = 'trace_type'`;
                const result = yield (0, logging.assertExists)(this.engine).query(query);
                const traceType = result.firstRow({ str_value: query_result.STR });
                // When in embedded mode, the host app will control which trace format
                // it passes to Perfetto, so we don't need to show this warning.
                if (traceType.str_value == 'json' && !globals.globals.embeddedMode) {
                    showJsonWarning();
                }
            }
            const emptyOmniboxState = {
                omnibox: '',
                mode: globals.globals.state.frontendLocalState.omniboxState.mode ||
                    'SEARCH',
                lastUpdate: Date.now() / 1000,
            };
            const actions$1 = [
                actions.Actions.setOmnibox(emptyOmniboxState),
                actions.Actions.setTraceUuid({ traceUuid }),
                actions.Actions.setTraceTime(traceTimeState),
            ];
            const [startVisibleTime, endVisibleTime] = yield computeVisibleTime(startSec, endSec, this.engine);
            // We don't know the resolution at this point. However this will be
            // replaced in 50ms so a guess is fine.
            const resolution = (endVisibleTime - startVisibleTime) / 1000;
            actions$1.push(actions.Actions.setVisibleTraceTime({
                startSec: startVisibleTime,
                endSec: endVisibleTime,
                lastUpdate: Date.now() / 1000,
                resolution,
            }));
            globals$1.globals.dispatchMultiple(actions$1);
            router$1.Router.navigate(`#!/viewer?local_cache_key=${traceUuid}`);
            // Make sure the helper views are available before we start adding tracks.
            yield this.initialiseHelperViews();
            {
                // When we reload from a permalink don't create extra tracks:
                const { pinnedTracks, tracks } = globals$1.globals.state;
                if (!pinnedTracks.length && !Object.keys(tracks).length) {
                    yield this.listTracks();
                }
            }
            yield this.listThreads();
            yield this.loadTimelineOverview(traceTime);
            {
                // A quick heuristic to check if the trace has ftrace events. This is
                // based on the assumption that most traces that have ftrace either:
                // - Are proto traces captured via perfetto, in which case traced_probes
                //   emits ftrace per-cpu stats that end up in the stats table.
                // - Have a raw event with non-zero cpu or utid.
                // Notes:
                // - The "+1 > 1" is to avoid pushing down the constraints to the "raw"
                //   table, which would compute a full column filter without being aware
                //   of the limit 1, and instead delegate the filtering to the iterator.
                const query = `select '_' as _ from raw
          where cpu + 1 > 1 or utid + 1 > 1 limit 1`;
                const result = yield (0, logging.assertExists)(this.engine).query(query);
                const hasFtrace = result.numRows() > 0;
                (0, publish.publishHasFtrace)(hasFtrace);
            }
            globals$1.globals.dispatch(actions.Actions.removeDebugTrack({}));
            globals$1.globals.dispatch(actions.Actions.sortThreadTracks({}));
            globals$1.globals.dispatch(actions.Actions.maybeExpandOnlyTrackGroup({}));
            yield this.selectFirstHeapProfile();
            if (feature_flags.PERF_SAMPLE_FLAG.get()) {
                yield this.selectPerfSample();
            }
            if (ENABLE_CHROME_RELIABLE_RANGE_ANNOTATION_FLAG.get()) {
                const reliableRangeStart = yield computeTraceReliableRangeStart(engine);
                if (reliableRangeStart > 0) {
                    globals$1.globals.dispatch(actions.Actions.addAutomaticNote({
                        timestamp: reliableRangeStart,
                        color: '#ff0000',
                        text: 'Reliable Range Start',
                    }));
                }
            }
            return engineMode;
        });
    }
    selectPerfSample() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const query = `select upid
        from perf_sample
        join thread using (utid)
        where callsite_id is not null
        order by ts desc limit 1`;
            const profile = yield (0, logging.assertExists)(this.engine).query(query);
            if (profile.numRows() !== 1)
                return;
            const row = profile.firstRow({ upid: query_result.NUM });
            const upid = row.upid;
            const leftTs = (0, time.toNs)(globals$1.globals.state.traceTime.startSec);
            const rightTs = (0, time.toNs)(globals$1.globals.state.traceTime.endSec);
            globals$1.globals.dispatch(actions.Actions.selectPerfSamples({ id: 0, upid, leftTs, rightTs, type: state.ProfileType.PERF_SAMPLE }));
        });
    }
    selectFirstHeapProfile() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const query = `select * from (
      select
        min(ts) AS ts,
        'heap_profile:' || group_concat(distinct heap_name) AS type,
        upid
      from heap_profile_allocation
      group by upid
      union
      select distinct graph_sample_ts as ts, 'graph' as type, upid
      from heap_graph_object)
      order by ts limit 1`;
            const profile = yield (0, logging.assertExists)(this.engine).query(query);
            if (profile.numRows() !== 1)
                return;
            const row = profile.firstRow({ ts: query_result.NUM, type: query_result.STR, upid: query_result.NUM });
            const ts = row.ts;
            const type = (0, flamegraph_controller.profileType)(row.type);
            const upid = row.upid;
            globals$1.globals.dispatch(actions.Actions.selectHeapProfile({ id: 0, upid, ts, type }));
        });
    }
    listTracks() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            this.updateStatus('Loading tracks');
            const engine = (0, logging.assertExists)(this.engine);
            const actions = yield (0, track_decider.decideTracks)(this.engineId, engine);
            globals$1.globals.dispatchMultiple(actions);
        });
    }
    listThreads() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            this.updateStatus('Reading thread list');
            const query = `select
        utid,
        tid,
        pid,
        ifnull(thread.name, '') as threadName,
        ifnull(
          case when length(process.name) > 0 then process.name else null end,
          thread.name) as procName,
        process.cmdline as cmdline
        from (select * from thread order by upid) as thread
        left join (select * from process order by upid) as process
        using(upid)`;
            const result = yield (0, logging.assertExists)(this.engine).query(query);
            const threads = [];
            const it = result.iter({
                utid: query_result.NUM,
                tid: query_result.NUM,
                pid: query_result.NUM_NULL,
                threadName: query_result.STR,
                procName: query_result.STR_NULL,
                cmdline: query_result.STR_NULL,
            });
            for (; it.valid(); it.next()) {
                const utid = it.utid;
                const tid = it.tid;
                const pid = it.pid === null ? undefined : it.pid;
                const threadName = it.threadName;
                const procName = it.procName === null ? undefined : it.procName;
                const cmdline = it.cmdline === null ? undefined : it.cmdline;
                threads.push({ utid, tid, threadName, pid, procName, cmdline });
            }
            (0, publish.publishThreads)(threads);
        });
    }
    loadTimelineOverview(traceTime) {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const engine = (0, logging.assertExists)(this.engine);
            const numSteps = 100;
            const stepSec = traceTime.duration / numSteps;
            let hasSchedOverview = false;
            for (let step = 0; step < numSteps; step++) {
                this.updateStatus('Loading overview ' +
                    `${Math.round((step + 1) / numSteps * 1000) / 10}%`);
                const startSec = traceTime.start + step * stepSec;
                const startNs = (0, time.toNsFloor)(startSec);
                const endSec = startSec + stepSec;
                const endNs = (0, time.toNsCeil)(endSec);
                // Sched overview.
                const schedResult = yield engine.query(`select sum(dur)/${stepSec}/1e9 as load, cpu from sched ` +
                    `where ts >= ${startNs} and ts < ${endNs} and utid != 0 ` +
                    'group by cpu order by cpu');
                const schedData = {};
                const it = schedResult.iter({ load: query_result.NUM, cpu: query_result.NUM });
                for (; it.valid(); it.next()) {
                    const load = it.load;
                    const cpu = it.cpu;
                    schedData[cpu] = { startSec, endSec, load };
                    hasSchedOverview = true;
                }
                (0, publish.publishOverviewData)(schedData);
            }
            if (hasSchedOverview) {
                return;
            }
            // Slices overview.
            const traceStartNs = (0, time.toNs)(traceTime.start);
            const stepSecNs = (0, time.toNs)(stepSec);
            const sliceResult = yield engine.query(`select
           bucket,
           upid,
           ifnull(sum(utid_sum) / cast(${stepSecNs} as float), 0) as load
         from thread
         inner join (
           select
             ifnull(cast((ts - ${traceStartNs})/${stepSecNs} as int), 0) as bucket,
             sum(dur) as utid_sum,
             utid
           from slice
           inner join thread_track on slice.track_id = thread_track.id
           group by bucket, utid
         ) using(utid)
         where upid is not null
         group by bucket, upid`);
            const slicesData = {};
            const it = sliceResult.iter({ bucket: query_result.NUM, upid: query_result.NUM, load: query_result.NUM });
            for (; it.valid(); it.next()) {
                const bucket = it.bucket;
                const upid = it.upid;
                const load = it.load;
                const startSec = traceTime.start + stepSec * bucket;
                const endSec = startSec + stepSec;
                const upidStr = upid.toString();
                let loadArray = slicesData[upidStr];
                if (loadArray === undefined) {
                    loadArray = slicesData[upidStr] = [];
                }
                loadArray.push({ startSec, endSec, load });
            }
            (0, publish.publishOverviewData)(slicesData);
        });
    }
    cacheCurrentTrace() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const engine = (0, logging.assertExists)(this.engine);
            const result = yield engine.query(`select str_value as uuid from metadata
                  where name = 'trace_uuid'`);
            if (result.numRows() === 0) {
                // One of the cases covered is an empty trace.
                return '';
            }
            const traceUuid = result.firstRow({ uuid: query_result.STR }).uuid;
            const engineConfig = (0, logging.assertExists)(globals$1.globals.state.engines[engine.id]);
            if (!(yield (0, cache_manager.cacheTrace)(engineConfig.source, traceUuid))) {
                // If the trace is not cacheable (cacheable means it has been opened from
                // URL or RPC) only append '?local_cache_key' to the URL, without the
                // local_cache_key value. Doing otherwise would cause an error if the tab
                // is discarded or the user hits the reload button because the trace is
                // not in the cache.
                return '';
            }
            return traceUuid;
        });
    }
    initialiseHelperViews() {
        return tslib.__awaiter(this, void 0, void 0, function* () {
            const engine = (0, logging.assertExists)(this.engine);
            this.updateStatus('Creating annotation counter track table');
            // Create the helper tables for all the annotations related data.
            // NULL in min/max means "figure it out per track in the usual way".
            yield engine.query(`
      CREATE TABLE annotation_counter_track(
        id INTEGER PRIMARY KEY,
        name STRING,
        __metric_name STRING,
        upid INTEGER,
        min_value DOUBLE,
        max_value DOUBLE
      );
    `);
            this.updateStatus('Creating annotation slice track table');
            yield engine.query(`
      CREATE TABLE annotation_slice_track(
        id INTEGER PRIMARY KEY,
        name STRING,
        __metric_name STRING,
        upid INTEGER,
        group_name STRING
      );
    `);
            this.updateStatus('Creating annotation counter table');
            yield engine.query(`
      CREATE TABLE annotation_counter(
        id BIG INT,
        track_id INT,
        ts BIG INT,
        value DOUBLE,
        PRIMARY KEY (track_id, ts)
      ) WITHOUT ROWID;
    `);
            this.updateStatus('Creating annotation slice table');
            yield engine.query(`
      CREATE TABLE annotation_slice(
        id INTEGER PRIMARY KEY,
        track_id INT,
        ts BIG INT,
        dur BIG INT,
        thread_dur BIG INT,
        depth INT,
        cat STRING,
        name STRING,
        UNIQUE(track_id, ts)
      );
    `);
            const availableMetrics = [];
            const metricsResult = yield engine.query('select name from trace_metrics');
            for (const it = metricsResult.iter({ name: query_result.STR }); it.valid(); it.next()) {
                availableMetrics.push(it.name);
            }
            globals$1.globals.dispatch(actions.Actions.setAvailableMetrics({ availableMetrics }));
            const availableMetricsSet = new Set(availableMetrics);
            for (const [flag, metric] of FLAGGED_METRICS) {
                if (!flag.get() || !availableMetricsSet.has(metric)) {
                    continue;
                }
                this.updateStatus(`Computing ${metric} metric`);
                try {
                    // We don't care about the actual result of metric here as we are just
                    // interested in the annotation tracks.
                    yield engine.computeMetric([metric]);
                }
                catch (e) {
                    if (e instanceof query_result.QueryError) {
                        (0, publish.publishMetricError)('MetricError: ' + e.message);
                        continue;
                    }
                    else {
                        throw e;
                    }
                }
                this.updateStatus(`Inserting data for ${metric} metric`);
                try {
                    const result = yield engine.query(`pragma table_info(${metric}_event)`);
                    let hasSliceName = false;
                    let hasDur = false;
                    let hasUpid = false;
                    let hasValue = false;
                    let hasGroupName = false;
                    const it = result.iter({ name: query_result.STR });
                    for (; it.valid(); it.next()) {
                        const name = it.name;
                        hasSliceName = hasSliceName || name === 'slice_name';
                        hasDur = hasDur || name === 'dur';
                        hasUpid = hasUpid || name === 'upid';
                        hasValue = hasValue || name === 'value';
                        hasGroupName = hasGroupName || name === 'group_name';
                    }
                    const upidColumnSelect = hasUpid ? 'upid' : '0 AS upid';
                    const upidColumnWhere = hasUpid ? 'upid' : '0';
                    const groupNameColumn = hasGroupName ? 'group_name' : 'NULL AS group_name';
                    if (hasSliceName && hasDur) {
                        yield engine.query(`
            INSERT INTO annotation_slice_track(
              name, __metric_name, upid, group_name)
            SELECT DISTINCT
              track_name,
              '${metric}' as metric_name,
              ${upidColumnSelect},
              ${groupNameColumn}
            FROM ${metric}_event
            WHERE track_type = 'slice'
          `);
                        yield engine.query(`
            INSERT INTO annotation_slice(
              track_id, ts, dur, thread_dur, depth, cat, name
            )
            SELECT
              t.id AS track_id,
              ts,
              dur,
              NULL as thread_dur,
              0 AS depth,
              a.track_name as cat,
              slice_name AS name
            FROM ${metric}_event a
            JOIN annotation_slice_track t
            ON a.track_name = t.name AND t.__metric_name = '${metric}'
            ORDER BY t.id, ts
          `);
                    }
                    if (hasValue) {
                        const minMax = yield engine.query(`
            SELECT
              IFNULL(MIN(value), 0) as minValue,
              IFNULL(MAX(value), 0) as maxValue
            FROM ${metric}_event
            WHERE ${upidColumnWhere} != 0`);
                        const row = minMax.firstRow({ minValue: query_result.NUM, maxValue: query_result.NUM });
                        yield engine.query(`
            INSERT INTO annotation_counter_track(
              name, __metric_name, min_value, max_value, upid)
            SELECT DISTINCT
              track_name,
              '${metric}' as metric_name,
              CASE ${upidColumnWhere} WHEN 0 THEN NULL ELSE ${row.minValue} END,
              CASE ${upidColumnWhere} WHEN 0 THEN NULL ELSE ${row.maxValue} END,
              ${upidColumnSelect}
            FROM ${metric}_event
            WHERE track_type = 'counter'
          `);
                        yield engine.query(`
            INSERT INTO annotation_counter(id, track_id, ts, value)
            SELECT
              -1 as id,
              t.id AS track_id,
              ts,
              value
            FROM ${metric}_event a
            JOIN annotation_counter_track t
            ON a.track_name = t.name AND t.__metric_name = '${metric}'
            ORDER BY t.id, ts
          `);
                    }
                }
                catch (e) {
                    if (e instanceof query_result.QueryError) {
                        (0, publish.publishMetricError)('MetricError: ' + e.message);
                    }
                    else {
                        throw e;
                    }
                }
            }
        });
    }
    updateStatus(msg) {
        globals$1.globals.dispatch(actions.Actions.updateStatus({
            msg,
            timestamp: Date.now() / 1000,
        }));
    }
}
exports.TraceController = TraceController;
function computeTraceReliableRangeStart(engine) {
    return tslib.__awaiter(this, void 0, void 0, function* () {
        const result = yield engine.query(`SELECT RUN_METRIC('chrome/chrome_reliable_range.sql');
       SELECT start FROM chrome_reliable_range`);
        const bounds = result.firstRow({ start: query_result.NUM });
        return bounds.start / 1e9;
    });
}
function computeVisibleTime(traceStartSec, traceEndSec, engine) {
    return tslib.__awaiter(this, void 0, void 0, function* () {
        // if we have non-default visible state, update the visible time to it
        const previousVisibleState = globals$1.globals.state.frontendLocalState.visibleState;
        if (!(previousVisibleState.startSec === state.defaultTraceTime.startSec &&
            previousVisibleState.endSec === state.defaultTraceTime.endSec)) {
            return [previousVisibleState.startSec, previousVisibleState.endSec];
        }
        // initialise visible time to the trace time bounds
        let visibleStartSec = traceStartSec;
        let visibleEndSec = traceEndSec;
        // compare start and end with metadata computed by the trace processor
        const mdTime = yield engine.getTracingMetadataTimeBounds();
        // make sure the bounds hold
        if (Math.max(visibleStartSec, mdTime.start - constants.TRACE_MARGIN_TIME_S) <
            Math.min(visibleEndSec, mdTime.end + constants.TRACE_MARGIN_TIME_S)) {
            visibleStartSec =
                Math.max(visibleStartSec, mdTime.start - constants.TRACE_MARGIN_TIME_S);
            visibleEndSec = Math.min(visibleEndSec, mdTime.end + constants.TRACE_MARGIN_TIME_S);
        }
        if (ENABLE_CHROME_RELIABLE_RANGE_ZOOM_FLAG.get()) {
            const reliableRangeStart = yield computeTraceReliableRangeStart(engine);
            visibleStartSec = Math.max(visibleStartSec, reliableRangeStart);
        }
        return [visibleStartSec, visibleEndSec];
    });
}

});

var app_controller = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.AppController = void 0;






// The root controller for the entire app. It handles the lifetime of all
// the other controllers (e.g., track and query controllers) according to the
// global state.
class AppController extends controller.Controller {
    constructor(extensionPort) {
        super('main');
        this.extensionPort = extensionPort;
    }
    // This is the root method that is called every time the controller tree is
    // re-triggered. This can happen due to:
    // - An action received from the frontend.
    // - An internal promise of a nested controller being resolved and manually
    //   re-triggering the controllers.
    run() {
        const childControllers = [(0, controller.Child)('permalink', permalink_controller.PermalinkController, {})];
        if (!feature_flags.RECORDING_V2_FLAG.get()) {
            childControllers.push((0, controller.Child)('record', record_controller.RecordController, { app: globals$1.globals, extensionPort: this.extensionPort }));
        }
        for (const engineCfg of Object.values(globals$1.globals.state.engines)) {
            childControllers.push((0, controller.Child)(engineCfg.id, trace_controller.TraceController, engineCfg.id));
        }
        return childControllers;
    }
}
exports.AppController = AppController;

});

var controller$1 = createCommonjsModule(function (module, exports) {
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
Object.defineProperty(exports, "__esModule", { value: true });
exports.initController = void 0;





let initialized = false;
function initController(init) {
    (0, logging.assertTrue)(!initialized);
    initialized = true;
    const controllerPort = init.controllerPort;
    const extensionPort = init.extensionPort;
    controllerPort.onmessage = ({ data }) => globals$1.globals.patchState(data);
    globals$1.globals.initialize(new app_controller.AppController(extensionPort));
}
exports.initController = initController;
// For devtools-based debugging.
self.controllerGlobals = globals$1.globals;

});

return controller$1;

}());
//# sourceMappingURL=controller_bundle.js.map
